@gradientedge/commercetools-utils
    Preparing search index...

    Interface CommercetoolsBaseConfig

    Provides a base configuration definition from which other class specific configurations can be extended.

    interface CommercetoolsBaseConfig {
        clientId: string;
        clientSecret: string;
        onAfterResponse?: (response: CommercetoolsRequestResponse) => void;
        onBeforeRequest?: (
            requestConfig: CommercetoolsRequest,
        ) =>
            | Omit<
                CommercetoolsRequest,
                "timeoutMs"
                | "retry"
                | "aggregateTimeoutMs"
                | "abortController",
            >
            | Promise<
                Omit<
                    CommercetoolsRequest,
                    "timeoutMs"
                    | "retry"
                    | "aggregateTimeoutMs"
                    | "abortController",
                >,
            >;
        projectKey: string;
        region: Region;
        retry?: Partial<CommercetoolsRetryConfig>;
        storeKey?: string;
        systemIdentifier?: string;
        timeoutMs?: number;
    }

    Hierarchy (View Summary)

    Index

    Properties

    clientId: string
    clientSecret: string
    onAfterResponse?: (response: CommercetoolsRequestResponse) => void

    If passed in, will be called once a request has been made and the response received (or error thrown).

    onBeforeRequest?: (
        requestConfig: CommercetoolsRequest,
    ) =>
        | Omit<
            CommercetoolsRequest,
            "timeoutMs"
            | "retry"
            | "aggregateTimeoutMs"
            | "abortController",
        >
        | Promise<
            Omit<
                CommercetoolsRequest,
                "timeoutMs"
                | "retry"
                | "aggregateTimeoutMs"
                | "abortController",
            >,
        >

    If passed in, will be called before sending a request to commercetools. The {@see requestConfig} parameter can be manipulated if you wish to modify/add headers or any other request data.

    projectKey: string
    region: Region
    retry?: Partial<CommercetoolsRetryConfig>
    storeKey?: string
    systemIdentifier?: string

    If provided, will be passed across to commercetools in the 'User-Agent' HTTP header, in order to help commercetools identify the source of incoming requests.

    timeoutMs?: number