@contio/partner-sdk - v1.7.1
    Preparing search index...

    Class BaseClientAbstract

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    axiosInstance: AxiosInstance
    config: ClientConfig

    Methods

    • Abstract method to add authentication headers. Can be async to support token refresh before requests.

      Parameters

      • config: InternalAxiosRequestConfig

      Returns InternalAxiosRequestConfig<any> | Promise<InternalAxiosRequestConfig<any>>

    • Build axios config with optional per-request timezone override

      Parameters

      • Optionaloptions: RequestOptions
      • OptionalbaseConfig: AxiosRequestConfig<any>

      Returns AxiosRequestConfig

    • Make a GET request that returns the full AxiosResponse, including headers and raw data.

      Use this for endpoints that return binary content (e.g. file downloads) where the caller needs access to response headers such as Content-Disposition or Content-Type.

      Parameters

      • path: string

        Request path relative to the client's base URL

      • Optionalparams: object

        Optional query parameters

      • Optionaloptions: RequestOptions

        Optional per-request options (e.g. timezone override)

      • responseType: "arraybuffer" | "blob" | "stream" = 'arraybuffer'

        Axios response type (default: 'arraybuffer')

      Returns Promise<AxiosResponse<any, any, {}>>

      The full axios response

    Protectedpost

    • Make a POST request with multipart/form-data.

      Overrides the default application/json content type so that axios sets the correct multipart/form-data boundary automatically.

      Type Parameters

      • T

      Parameters

      • path: string

        Request path relative to the client's base URL

      • formData: FormData

        A FormData instance containing the fields and files to upload

      • Optionaloptions: RequestOptions

        Optional per-request options (e.g. timezone override)

      Returns Promise<T>

      Parsed response body