Hierarchy

  • Specs

Properties

impersonating: boolean = false

Methods

  • Description

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

    Example

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

    Returns Specs

  • Create a spec option A Spec can have multiple Options-- for example, if the spec is called 'Color', the options might be 'Blue', 'Red', and 'Green'. Check out the docs for more info

    Type Parameters

    Parameters

    Returns Promise<RequiredDeep<TSpecOption>>

  • Delete a spec Check out the docs for more info

    Parameters

    Returns Promise<void>

  • Delete a spec option Check out the docs for more info

    Parameters

    • specID: string

      ID of the spec.

    • optionID: string

      ID of the option.

    • requestOptions: RequestOptions = {}

    Returns Promise<void>

  • Delete a spec product assignment Check out the docs for more info

    Parameters

    • specID: string

      ID of the spec.

    • productID: string

      ID of the product.

    • requestOptions: RequestOptions = {}

    Returns Promise<void>

  • Retrieve a spec option Check out the docs for more info

    Type Parameters

    Parameters

    • specID: string

      ID of the spec.

    • optionID: string

      ID of the option.

    • requestOptions: RequestOptions = {}

    Returns Promise<RequiredDeep<TSpecOption>>

  • List specs Check out the docs for more info

    Type Parameters

    • TSpec extends Spec<any, any, TSpec>

    Parameters

    • listOptions: {
          filters?: Filters;
          page?: number;
          pageSize?: number;
          search?: string;
          searchOn?: ("ID" | "Name")[];
          sortBy?: ("ID" | "Name" | "!ID" | "!Name" | "ListOrder" | "!ListOrder")[];
      } = {}
      • 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. 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.

      • Optional search?: string

        Word or phrase to search for.

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

        Comma-delimited list of fields to search on.

      • Optional sortBy?: ("ID" | "Name" | "!ID" | "!Name" | "ListOrder" | "!ListOrder")[]

        Comma-delimited list of fields to sort by.

    • requestOptions: RequestOptions = {}

    Returns Promise<RequiredObjectDeep<ListPage<TSpec>>>

  • List spec options Check out the docs for more info

    Type Parameters

    Parameters

    • specID: string

      ID of the spec.

    • listOptions: {
          filters?: Filters;
          page?: number;
          pageSize?: number;
          search?: string;
          searchOn?: ("ID" | "Value")[];
          sortBy?: ("ID" | "!ID" | "ListOrder" | "!ListOrder")[];
      } = {}
      • 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. 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.

      • Optional search?: string

        Word or phrase to search for.

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

        Comma-delimited list of fields to search on.

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

        Comma-delimited list of fields to sort by.

    • requestOptions: RequestOptions = {}

    Returns Promise<RequiredObjectDeep<ListPage<TSpecOption>>>

  • List spec product assignments Check out the docs for more info

    Type Parameters

    Parameters

    • listOptions: {
          filters?: Filters;
          page?: number;
          pageSize?: number;
          search?: string;
          searchOn?: ("ProductID" | "SpecID")[];
          sortBy?: ("ProductID" | "SpecID" | "!ProductID" | "DefaultOptionID" | "DefaultValue" | "!SpecID" | "!DefaultOptionID" | "!DefaultValue")[];
      } = {}
      • 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. 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.

      • Optional search?: string

        Word or phrase to search for.

      • Optional searchOn?: ("ProductID" | "SpecID")[]

        Comma-delimited list of fields to search on.

      • Optional sortBy?: ("ProductID" | "SpecID" | "!ProductID" | "DefaultOptionID" | "DefaultValue" | "!SpecID" | "!DefaultOptionID" | "!DefaultValue")[]

        Comma-delimited list of fields to sort by.

    • requestOptions: RequestOptions = {}

    Returns Promise<RequiredObjectDeep<ListPage<TSpecProductAssignment>>>

  • Create or update a spec If an object with the same ID already exists, it will be overwritten. Check out the docs for more info

    Type Parameters

    • TSpec extends Spec<any, any, TSpec>

    Parameters

    • specID: string

      ID of the spec.

    • spec: Spec<any, any>

      Required fields: Name

    • requestOptions: RequestOptions = {}

    Returns Promise<RequiredDeep<TSpec>>

  • Create or update a spec option Check out the docs for more info

    Type Parameters

    Parameters

    • specID: string

      ID of the spec.

    • optionID: string

      ID of the option.

    • specOption: SpecOption<any>

      Required fields: Value

    • requestOptions: RequestOptions = {}

    Returns Promise<RequiredDeep<TSpecOption>>

Generated using TypeDoc