Hierarchy

  • ApiClients

Properties

impersonating: boolean = false

Methods

  • Description

    enables impersonation by calling the subsequent method with the stored impersonation token

    Example

    ApiClients.As().List() // lists ApiClients using the impersonated users' token
    

    Returns ApiClients

  • Create a new API client. If ID is provided and an object with that ID already exists, a 409 (conflict) error is returned. Check out the docs for more info

    Type Parameters

    • TApiClient extends ApiClient<any, TApiClient>

    Parameters

    Returns Promise<RequiredDeep<TApiClient>>

  • Delete a API client. Check out the docs for more info

    Parameters

    • apiClientID: string

      ID of the api client.

    • requestOptions: RequestOptions = {}

    Returns Promise<void>

  • Delete a API client buyer assignment. Check out the docs for more info

    Parameters

    • apiClientID: string

      ID of the api client.

    • buyerID: string

      ID of the buyer.

    • requestOptions: RequestOptions = {}

    Returns Promise<void>

  • Delete a API client supplier assignment. Check out the docs for more info

    Parameters

    • apiClientID: string

      ID of the api client.

    • supplierID: string

      ID of the supplier.

    • requestOptions: RequestOptions = {}

    Returns Promise<void>

  • Get a list of API clients. Check out the docs for more info

    Type Parameters

    • TApiClient extends ApiClient<any, TApiClient>

    Parameters

    • listOptions: {
          filters?: Filters;
          page?: number;
          pageSize?: number;
          search?: string;
          searchOn?: ("ID" | "AppName" | "DefaultContextUserName")[];
          sortBy?: ("ID" | "AppName" | "DefaultContextUserName" | "!ID" | "!AppName" | "!DefaultContextUserName")[];
      } = {}
      • Optional filters?: Filters

        An object or dictionary representing key/value pairs to apply as filters. Valid keys are top-level properties of the returned model or 'xp.???'

      • Optional page?: number

        Page of results to return. Default: 1. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation.

      • Optional pageSize?: number

        Number of results to return per page. Default: 20, max: 100.

      • Optional search?: string

        Word or phrase to search for.

      • Optional searchOn?: ("ID" | "AppName" | "DefaultContextUserName")[]

        Comma-delimited list of fields to search on.

      • Optional sortBy?: ("ID" | "AppName" | "DefaultContextUserName" | "!ID" | "!AppName" | "!DefaultContextUserName")[]

        Comma-delimited list of fields to sort by.

    • requestOptions: RequestOptions = {}

    Returns Promise<RequiredObjectDeep<ListPage<TApiClient>>>

  • Get a list of API client assignments. Check out the docs for more info

    Type Parameters

    Parameters

    • listOptions: {
          apiClientID?: string;
          buyerID?: string;
          page?: number;
          pageSize?: number;
          supplierID?: string;
      } = {}
      • Optional apiClientID?: string

        ID of the api client.

      • Optional buyerID?: string

        ID of the buyer.

      • Optional page?: number

        Page of results to return. Default: 1. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation.

      • Optional pageSize?: number

        Number of results to return per page. Default: 20, max: 100.

      • Optional supplierID?: string

        ID of the supplier.

    • requestOptions: RequestOptions = {}

    Returns Promise<RequiredObjectDeep<ListPage<TApiClientAssignment>>>

  • Update an API client. If an object with the same ID already exists, it will be overwritten. Check out the docs for more info

    Type Parameters

    • TApiClient extends ApiClient<any, TApiClient>

    Parameters

    • apiClientID: string

      ID of the api client.

    • apiClient: ApiClient<any>

      Required fields: AccessTokenDuration, AppName

    • requestOptions: RequestOptions = {}

    Returns Promise<RequiredDeep<TApiClient>>

Generated using TypeDoc