ordercloud-javascript-sdk
    Preparing search index...

    Class ImpersonationConfigs

    Index
    • Returns this

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

      ImpersonationConfigs.As().List() // lists ImpersonationConfigs using the impersonated users' token
      
    • Delete an impersonation config Check out the docs for more info

      Parameters

      • impersonationConfigID: string

        ID of the impersonation config.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

        • Optionalsignal?: AbortSignal

          AbortSignal that can be used to cancel the request.

      Returns Promise<void>

    • List impersonation configs Check out the docs for more info

      Type Parameters

      Parameters

      • listOptions: {
            filters?: Filters;
            page?: number;
            pageSize?: number;
            search?: string;
            searchOn?: (
                | "ID"
                | "ImpersonationBuyerID"
                | "ImpersonationGroupID"
                | "ImpersonationUserID"
                | "BuyerID"
                | "GroupID"
                | "UserID"
                | "SecurityProfileID"
                | "ClientID"
            )[];
            sortBy?: (
                | "ID"
                | "ImpersonationBuyerID"
                | "ImpersonationGroupID"
                | "ImpersonationUserID"
                | "BuyerID"
                | "GroupID"
                | "UserID"
                | "SecurityProfileID"
                | "ClientID"
                | "!ID"
                | "!GroupID"
                | "!ImpersonationBuyerID"
                | "!ImpersonationGroupID"
                | "!ImpersonationUserID"
                | "!BuyerID"
                | "!UserID"
                | "!SecurityProfileID"
                | "!ClientID"
            )[];
        } = {}
        • Optionalfilters?: 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.???'

        • Optionalpage?: number

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

        • OptionalpageSize?: number

          Number of results to return per page.

        • Optionalsearch?: string

          Word or phrase to search for.

        • OptionalsearchOn?: (
              | "ID"
              | "ImpersonationBuyerID"
              | "ImpersonationGroupID"
              | "ImpersonationUserID"
              | "BuyerID"
              | "GroupID"
              | "UserID"
              | "SecurityProfileID"
              | "ClientID"
          )[]

          Comma-delimited list of fields to search on.

        • OptionalsortBy?: (
              | "ID"
              | "ImpersonationBuyerID"
              | "ImpersonationGroupID"
              | "ImpersonationUserID"
              | "BuyerID"
              | "GroupID"
              | "UserID"
              | "SecurityProfileID"
              | "ClientID"
              | "!ID"
              | "!GroupID"
              | "!ImpersonationBuyerID"
              | "!ImpersonationGroupID"
              | "!ImpersonationUserID"
              | "!BuyerID"
              | "!UserID"
              | "!SecurityProfileID"
              | "!ClientID"
          )[]

          Comma-delimited list of fields to sort by.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

        • Optionalsignal?: AbortSignal

          AbortSignal that can be used to cancel the request.

      Returns Promise<RequiredObjectDeep<ListPage<TImpersonationConfig>>>