0.0.8 • Published 6 months ago

@types/apigee-access v0.0.8

Weekly downloads
9
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/apigee-access

Summary

This package contains type definitions for apigee-access (https://www.npmjs.com/package/apigee-access).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/apigee-access.

index.d.ts

// Type definitions for apigee-access
// Project: https://www.npmjs.com/package/apigee-access
// Definitions by: Casper Skydt <https://github.com/CasperSkydt>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

declare namespace ApigeeAccess {

    function getVariable(request: any, name: string): string | number | boolean;
    function setVariable(request: any, name: string, value: string | number | boolean ): void;
    function setIntVariable(request: any, name: string, value: string | number): void;
    function deleteVariable(request: any, name: string): void;
    function getCache(name: string, options?: CacheOptions): any;
    function getVault(name: string, scope?: "organization" | "environment"): SecureVault;
    function getQuota(options?: any): QuotaService;
    function getMode(): "apigee" | "standalone";

    interface CacheOptions{
        resource?: string | undefined;
        scope?: "global" | "application" | "exclusive" | undefined;
        defaultTtl?: number | undefined;
        timeout?: number | undefined;
    }

    interface Cache{
        put(key: string, data: any, ttl?: number, callback?: (err: any) => void): void;
        get(key: string, callback: (err: any, data: any) => void): void;
        remove(key: string, callback?: (err: any) => void): void;
    }

    interface SecureVault{
        getKeys(callback: (err: any, data: any) => void): void;
        get(key: string, callback: (err: any, data: any) => void): void;    
    }

    interface QuotaService{
        apply(options?: QuotaServiceApplyOptions, callback?: (err: any, data: QuotaServiceApplyCallbackData) => void): void;
    }

    interface QuotaServiceApplyOptions{
        identifier: string;
        timeUnit: "minute" | "hour" | "day" | "week" | "month";
        allow: number;
        interval?: number | undefined;
        weight?: number | undefined;
    }

    interface QuotaServiceApplyCallbackData{
        used: number;
        allowed: number;
        isAllowed: boolean;
        expiryTime: number;
        timestamp: number;
    }
}

export default ApigeeAccess;

Additional Details

  • Last updated: Wed, 07 Jul 2021 21:44:26 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Casper Skydt.

0.0.8

6 months ago

0.0.7

7 months ago

0.0.6

8 months ago

0.0.5

3 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago