@subsidia-ch/sdk - v1.3.5
    Preparing search index...

    Configuration for API clients

    interface ClientConfig {
        apiKey: string;
        apiSecret: string;
        customFetch?: {
            (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
            (input: string | URL | Request, init?: RequestInit): Promise<Response>;
        };
        environment: Environment;
        getCachedToken?: () => Promise<null | string>;
        setCachedToken?: (tokenDataJSON: string) => Promise<void>;
        timeout?: number;
    }
    Index

    Properties

    apiKey: string

    API key for authentication

    apiSecret: string

    API key for authentication

    customFetch?: {
        (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
        (input: string | URL | Request, init?: RequestInit): Promise<Response>;
    }

    Optional custom fetch implementation

    Type declaration

      • (input: URL | RequestInfo, init?: RequestInit): Promise<Response>
      • Parameters

        • input: URL | RequestInfo
        • Optionalinit: RequestInit

        Returns Promise<Response>

      • (input: string | URL | Request, init?: RequestInit): Promise<Response>
      • Parameters

        • input: string | URL | Request
        • Optionalinit: RequestInit

        Returns Promise<Response>

    environment: Environment

    Environment to use

    getCachedToken?: () => Promise<null | string>

    Optional get function for cached auth token

    setCachedToken?: (tokenDataJSON: string) => Promise<void>

    Optional set function for cached auth token

    timeout?: number

    Request timeout in milliseconds

    30000