Astrada TypeScript SDK
    Preparing search index...

    Interface ConfigurationOptions

    interface ConfigurationOptions {
        basePath?: string;
        basePathIsSandbox?: boolean;
        credentials?: RequestCredentials;
        environment?: "production" | "sandbox";
        fetchApi?: {
            (input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
            (input: string | Request | URL, init?: RequestInit): Promise<Response>;
        };
        headers?: HTTPHeaders;
        maxRetries?: number;
        middleware?: Middleware[];
        queryParamsStringify?: (params: HTTPQuery) => string;
        retryDelayMs?: number;
        timeoutMs?: number;
    }
    Index
    basePath?: string

    A full base URL instead of an environment, such as a local stand-in server. Wins over environment.

    basePathIsSandbox?: boolean

    Marks a custom basePath as a sandbox stand-in (a mock server in tests), so the sandbox module accepts it. Needs environment: 'sandbox' too. Default false.

    credentials?: RequestCredentials
    environment?: "production" | "sandbox"

    'sandbox' or 'production'. Sets the API host and the token host.

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

    Type Declaration

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

        • input: RequestInfo | URL
        • Optionalinit: RequestInit

        Returns Promise<Response>

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

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

        Returns Promise<Response>

    headers?: HTTPHeaders
    maxRetries?: number

    Retries after the first attempt, for network errors, timeouts, 408, 429 and 5xx answers to GET, HEAD, OPTIONS, PUT and DELETE requests and to the token request. Default 2; 0 turns retries off.

    middleware?: Middleware[]
    queryParamsStringify?: (params: HTTPQuery) => string
    retryDelayMs?: number

    First backoff delay in milliseconds, doubled on each retry with jitter. A Retry-After header wins. Default 500.

    timeoutMs?: number

    Time to wait for each response, in milliseconds. Default 30000; 0 turns the timeout off.