Interface for Catalog's Default Adapter's API

Description

This interface is used to define the API for Catalog's Default Adapter. Implement this interface to create a custom API for communicating with Catalog functionality.

interface CatalogDefaultAdapterAPI {
    createProduct(args, requestContext?): Promise<ProductResponse>;
    deleteMultipleProducts(args, requestContext?): Promise<void>;
    getAllProducts(args, requestContext?): Promise<PaginatedQueryResult<ProductResponse>>;
    getAttachmentByIds(idList, requestContext?): Promise<(null | AttachmentResponse)[]>;
    getAttributes(args, requestContext?): Promise<PaginatedQueryResult<AttributesResponse>>;
    getAvailableProducts(args, requestContext?): Promise<PaginatedQueryResult<ProductResponse>>;
    getCategories(args, requestContext?): Promise<PaginatedQueryResult<CategoryResponse>>;
    getOneProduct(args, requestContext?): Promise<ProductResponse>;
    getProducts(args, requestContext?): Promise<PaginatedQueryResult<ProductResponse>>;
    updateMultipleProducts(args, requestContext?): Promise<void>;
}

Implemented by

Catalog

  • API for creating a single product

    Parameters

    • args: {
          options?: {
              expand?: string;
          };
          orgId: string;
          product: Partial<CreateProductDto>;
      }

      Input containing properties for creating product.

      • Optional options?: {
            expand?: string;
        }

        Options to modify the returned product response.

        • Optional expand?: string
      • orgId: string

        Organization ID of the organization to which the product belongs.

      • product: Partial<CreateProductDto>

        Product data to be created.

    • Optional requestContext: RequestContext

    Returns Promise<ProductResponse>

    Product data that was created.

    Description

    This API is used to create a single product in the Catalog service.

  • API for deleting multiple products

    Parameters

    Returns Promise<void>

    Void

    Description

    This API is used to delete products in the Catalog service.

  • API for getting multiple products, regardless of their publication status

    Parameters

    • args: {
          queryOptions?: PaginatedListQueryOptions;
      }

      Input containing property for fetching products.

      • Optional queryOptions?: PaginatedListQueryOptions

        Query options for the product response.

    • Optional requestContext: RequestContext

    Returns Promise<PaginatedQueryResult<ProductResponse>>

    Paginated list of products.

    Description

    This API is used to get multiple products from the Catalog service.

  • API for getting multiple catalog attachments

    Parameters

    • idList: string[]

      List of catalog attachment IDs to be fetched.

    • Optional requestContext: RequestContext

      request context (requestId, serviceHistory)

    Returns Promise<(null | AttachmentResponse)[]>

    Catalog attachments array that fetched if the id is not exist return null.

    Description

    This API is used to get multiple catalog attachments from the Catalog service. It will return array exactly the same length as the idList, if the id is not exist return null instead in for the specific attachment.

  • API for getting attributes

    Parameters

    • args: {
          queryOptions?: PaginatedListQueryOptions;
      }

      Input containing properties for fetching attributes.

      • Optional queryOptions?: PaginatedListQueryOptions

        Query options for the attribute response.

    • Optional requestContext: RequestContext

    Returns Promise<PaginatedQueryResult<AttributesResponse>>

    Paginated list of attributes.

    Description

    This API is used to get the attributes from the Catalog service.

  • API for getting multiple products that are:

    • publication.status is ACTIVE
    • publication.since is less than or equal to current date
    • publication.until is greater than or equal to current date

    Parameters

    • args: {
          queryOptions?: PaginatedListQueryOptions;
      }

      Input containing properties for fetching products.

      • Optional queryOptions?: PaginatedListQueryOptions

        Query options for the product response.

    • Optional requestContext: RequestContext

    Returns Promise<PaginatedQueryResult<ProductResponse>>

    Paginated list of products.

    Description

    This API is used to get multiple products from the Catalog service.

  • API for getting categories

    Parameters

    • args: {
          queryOptions?: PaginatedListQueryOptions;
      }

      Input containing properties for fetching categories.

      • Optional queryOptions?: PaginatedListQueryOptions

        Query options for the category response.

    • Optional requestContext: RequestContext

    Returns Promise<PaginatedQueryResult<CategoryResponse>>

    Paginated list of categories.

    Description

    This API is used to get the categories from the Catalog service.

  • API for getting a single product

    Parameters

    • args: {
          expand?: string;
          productId: string;
      }

      Input containing properties for fetching product.

      • Optional expand?: string

        Expand options for the product response.

      • productId: string

        ID of the product to be fetched.

    • Optional requestContext: RequestContext

      request context (requestId, serviceHistory)

    Returns Promise<ProductResponse>

    Product data that was fetched.

    Description

    This API is used to get a single product from the Catalog service.

  • API for getting multiple products that are:

    • publication.status is ACTIVE
    • publication.since is less than or equal to current date
    • publication.until is greater than or equal to current date

    Parameters

    • args: {
          queryOptions?: PaginatedListQueryOptions;
      }

      Input containing properties for fetching products.

      • Optional queryOptions?: PaginatedListQueryOptions

        Query options for the product response.

    • Optional requestContext: RequestContext

    Returns Promise<PaginatedQueryResult<ProductResponse>>

    Paginated list of products.

    Deprecated

    Use getAvailableProducts instead

    Description

    This API is used to get multiple products from the Catalog service.

  • API for updating multiple products

    Parameters

    • args: {
          orgId: string;
          updates: UpdateManyProductsDto;
      }

      Input containing properties for update product.

      • orgId: string

        Organization ID of the products to update. All products must belong to the same organization.

      • updates: UpdateManyProductsDto

        List of batch updates to perform. Each update contains a list of product IDs to update and the data to update.

    • Optional requestContext: RequestContext

    Returns Promise<void>

    Void

    Description

    This API is used to update products in the Catalog service.

Generated using TypeDoc