Function: productService()
productService(
client):object
Defined in: service/ProductService.ts:151
Service class for Product-related GraphQL operations
Parameters
client
Returns
addSurchargesToProduct()
addSurchargesToProduct(
input):Promise<ConfirmationResponse>
Adds surcharges to a product *
Parameters
input
Surcharges input data *
Returns
Promise<ConfirmationResponse>
Promise<boolean> Success status
baseProductCategoryMoveAbove()
baseProductCategoryMoveAbove(
variables):Promise<BaseProductCategoryRelationship[]>
baseProductCategoryMoveAbove operation
Parameters
variables
BaseProductCategoryMoveAboveVariables
Returns
Promise<BaseProductCategoryRelationship[]>
baseProductCategoryMoveAboveByUuids()
baseProductCategoryMoveAboveByUuids(
variables):Promise<BaseProductCategoryRelationship[]>
baseProductCategoryMoveAboveByUuids operation
Parameters
variables
BaseProductCategoryMoveAboveByUuidsVariables
Returns
Promise<BaseProductCategoryRelationship[]>
baseProductCategoryMoveBelow()
baseProductCategoryMoveBelow(
variables):Promise<BaseProductCategoryRelationship[]>
baseProductCategoryMoveBelow operation
Parameters
variables
BaseProductCategoryMoveBelowVariables
Returns
Promise<BaseProductCategoryRelationship[]>
baseProductCategoryMoveBelowByUuids()
baseProductCategoryMoveBelowByUuids(
variables):Promise<BaseProductCategoryRelationship[]>
baseProductCategoryMoveBelowByUuids operation
Parameters
variables
BaseProductCategoryMoveBelowByUuidsVariables
Returns
Promise<BaseProductCategoryRelationship[]>
baseProductCategoryMoveToBottom()
baseProductCategoryMoveToBottom(
variables):Promise<BaseProductCategoryRelationship[]>
baseProductCategoryMoveToBottom operation
Parameters
variables
BaseProductCategoryMoveToBottomVariables
Returns
Promise<BaseProductCategoryRelationship[]>
baseProductCategoryMoveToBottomByUuids()
baseProductCategoryMoveToBottomByUuids(
variables):Promise<BaseProductCategoryRelationship[]>
baseProductCategoryMoveToBottomByUuids operation
Parameters
variables
BaseProductCategoryMoveToBottomByUuidsVariables
Returns
Promise<BaseProductCategoryRelationship[]>
baseProductCategoryMoveToTop()
baseProductCategoryMoveToTop(
variables):Promise<BaseProductCategoryRelationship[]>
baseProductCategoryMoveToTop operation
Parameters
variables
BaseProductCategoryMoveToTopVariables
Returns
Promise<BaseProductCategoryRelationship[]>
baseProductCategoryMoveToTopByUuids()
baseProductCategoryMoveToTopByUuids(
variables):Promise<BaseProductCategoryRelationship[]>
baseProductCategoryMoveToTopByUuids operation
Parameters
variables
BaseProductCategoryMoveToTopByUuidsVariables
Returns
Promise<BaseProductCategoryRelationship[]>
createProduct()
createProduct(
input):Promise<Product>
Creates a new product *
Parameters
input
Product creation input data *
Returns
Promise<Product>
Promise<Product> The created product
getAttributeResultByProductId()
getAttributeResultByProductId(
productId,input):Promise<AttributeResultResponse>
Fetches attribute results for a product *
Parameters
productId
number
Product ID *
input
Attribute result search input *
Returns
Promise<AttributeResultResponse>
Promise<AttributeResultResponse> The attribute result response
getAttributesByProductId()
getAttributesByProductId(
productId,input):Promise<AttributeResponse>
Fetches attributes for a product *
Parameters
productId
number
Product ID *
input
Attribute search input *
Returns
Promise<AttributeResponse>
Promise<AttributeResponse> The attributes response
getBaseProducts()
getBaseProducts(
variables):Promise<BaseProductsResponse>
Search both products and clusters in a single result set.
Parameters
variables
Returns
Promise<BaseProductsResponse>
getProduct()
getProduct(
variables,fetchOptions?):Promise<Product>
Fetches a single product by ID, slug, or SKU *
Parameters
variables
input variables for aproduct to fetch
-
- productId: int - Product ID to fetch
-
- slug: string - Product slug to fetch
-
- sku: string - Product SKU to fetch
-
- language: string - Language for localized content
-
- applyOrderlists: boolean - Whether to apply orderlist logic
-
- orderlistIds: number[] - Array of orderlist IDs to apply
-
- priceCalculateProductInput: PriceCalculateProductInput - Price calculation input
-
- userBulkPriceProductInput: UserBulkPriceProductInput - User bulk price input
-
- attributeResultSearchInput: AttributeResultSearchInput - Attribute search input
-
- imageSearchFilters: MediaImageProductSearchInput - Image search filters
-
- mediaVideoSearchInput: MediaVideoProductSearchInput - Video search input
-
- mediaDocumentSearchInput: MediaDocumentProductSearchInput - Document search input
-
- imageVariantFilters: TransformationsInput - Image transformation filters
fetchOptions?
Returns
Promise<Product>
Promise<Product> The product data
getProducts()
getProducts(
variables):Promise<ProductsResponse>
Fetches a list of products with search criteria *
Parameters
variables
-
- input: ProductSearchInput - Product search input parameters
-
- language: string - Language for localized content
-
- priceCalculateProductInput: PriceCalculateProductInput - Price calculation input
-
- imageSearchFilters: MediaImageProductSearchInput - Image search filters
-
- imageVariantFilters: TransformationsInput - Image transformation filters
-
- filterAvailableAttributeInput: FilterAvailableAttributeInput - Filter available attributes input
Returns
Promise<ProductsResponse>
Promise<ProductsResponse> The products response data
getProductSearchBatchMetrics()
getProductSearchBatchMetrics():
Promise<BatchMetricsTenantResponse>
Current batch metrics for the current tenant
Returns
Promise<BatchMetricsTenantResponse>
getProductSearchBatchMetricsFailedJobs()
getProductSearchBatchMetricsFailedJobs(
variables):Promise<BatchMetricsFailedJobsResponse>
Failed batch jobs for the current tenant
Parameters
variables
ProductSearchBatchMetricsFailedJobsVariables
Returns
Promise<BatchMetricsFailedJobsResponse>
getProductSearchBatchMetricsHourly()
getProductSearchBatchMetricsHourly():
Promise<BatchMetricsTenantHourlyResponse>
Hourly batch metrics for the current tenant (last 48 hours)
Returns
Promise<BatchMetricsTenantHourlyResponse>
getProductSearchBatchMetricsQueueStatus()
getProductSearchBatchMetricsQueueStatus():
Promise<BatchMetricsQueueStatusResponse>
Aggregate status of all batch-related queues
Returns
Promise<BatchMetricsQueueStatusResponse>
getProductSearchByCategory()
getProductSearchByCategory(
variables):Promise<ProductSearchByCategoryResponse>
Search for products across multiple categories. Each category is searched separately with the same filters applied. Results are grouped by category ID for dataloader patterns.
Parameters
variables
ProductSearchByCategoryVariables
Returns
Promise<ProductSearchByCategoryResponse>
getProductSearchReindexLock()
getProductSearchReindexLock():
Promise<ReindexLockResponse>
Check if a reindex is currently running for the current tenant
Returns
Promise<ReindexLockResponse>
getProductSearchReindexStatus()
getProductSearchReindexStatus(
variables):Promise<ReindexStatusResponse>
Get the progress of a reindex by its ID
Parameters
variables
ProductSearchReindexStatusVariables
Returns
Promise<ReindexStatusResponse>
getProductSearchSolr()
getProductSearchSolr(
variables):Promise<ProductSearchResponse>
Search for products using Solr (parallel implementation for testing and migration)
Parameters
variables
Returns
Promise<ProductSearchResponse>
getProductsRaw()
getProductsRaw(
variables):Promise<ProductsRawResponse>
Search products with filtering, sorting and pagination, returning raw records without orderlist enrichment.
Parameters
variables
Returns
Promise<ProductsRawResponse>
getProductSurcharges()
getProductSurcharges(
productId):Promise<SurchargeProductResponse>
Fetches surcharges for a product *
Parameters
productId
number
Product ID *
Returns
Promise<SurchargeProductResponse>
Promise<SurchargesResponse> The surcharges response
importProductsCsv()
importProductsCsv(
input):Promise<CsvImportResponse>
Imports products from CSV *
Parameters
input
CSV import input data *
Returns
Promise<CsvImportResponse>
Promise<CsvImportResponse> The import response
productAddToCategory()
productAddToCategory(
variables):Promise<ProductCategoryRelationship>
productAddToCategory operation
Parameters
variables
Returns
Promise<ProductCategoryRelationship>
productAssignToCluster()
productAssignToCluster(
variables):Promise<Product>
Attach an existing product to a cluster.
Parameters
variables
ProductAssignToClusterVariables
Returns
Promise<Product>
productCategoryMoveAbove()
productCategoryMoveAbove(
variables):Promise<ProductCategoryRelationship[]>
productCategoryMoveAbove operation
Parameters
variables
ProductCategoryMoveAboveVariables
Returns
Promise<ProductCategoryRelationship[]>
productCategoryMoveBelow()
productCategoryMoveBelow(
variables):Promise<ProductCategoryRelationship[]>
productCategoryMoveBelow operation
Parameters
variables
ProductCategoryMoveBelowVariables
Returns
Promise<ProductCategoryRelationship[]>
productCategoryMoveToBottom()
productCategoryMoveToBottom(
variables):Promise<ProductCategoryRelationship[]>
productCategoryMoveToBottom operation
Parameters
variables
ProductCategoryMoveToBottomVariables
Returns
Promise<ProductCategoryRelationship[]>
productCategoryMoveToTop()
productCategoryMoveToTop(
variables):Promise<ProductCategoryRelationship[]>
productCategoryMoveToTop operation
Parameters
variables
ProductCategoryMoveToTopVariables
Returns
Promise<ProductCategoryRelationship[]>
productClusterMoveAbove()
productClusterMoveAbove(
variables):Promise<BaseProductClusterRelationship[]>
Reorder a product within its cluster so it appears immediately before another product.
Parameters
variables
ProductClusterMoveAboveVariables
Returns
Promise<BaseProductClusterRelationship[]>
productClusterMoveBelow()
productClusterMoveBelow(
variables):Promise<BaseProductClusterRelationship[]>
Reorder a product within its cluster so it appears immediately after another product.
Parameters
variables
ProductClusterMoveBelowVariables
Returns
Promise<BaseProductClusterRelationship[]>
productClusterOptionMoveAbove()
productClusterOptionMoveAbove(
variables):Promise<ProductClusterOptionRelationship[]>
Reorder a product within its cluster option so it appears immediately before another product.
Parameters
variables
ProductClusterOptionMoveAboveVariables
Returns
Promise<ProductClusterOptionRelationship[]>
productClusterOptionMoveBelow()
productClusterOptionMoveBelow(
variables):Promise<ProductClusterOptionRelationship[]>
Reorder a product within its cluster option so it appears immediately after another product.
Parameters
variables
ProductClusterOptionMoveBelowVariables
Returns
Promise<ProductClusterOptionRelationship[]>
productRemoveFromCategory()
productRemoveFromCategory(
variables):Promise<boolean>
productRemoveFromCategory operation
Parameters
variables
ProductRemoveFromCategoryVariables
Returns
Promise<boolean>
productsBulkAddToCategory()
productsBulkAddToCategory(
variables):Promise<ProductCategoryRelationship[]>
productsBulkAddToCategory operation
Parameters
variables
ProductsBulkAddToCategoryVariables
Returns
Promise<ProductCategoryRelationship[]>
productsBulkRemoveFromCategory()
productsBulkRemoveFromCategory(
variables):Promise<boolean>
productsBulkRemoveFromCategory operation
Parameters
variables
ProductsBulkRemoveFromCategoryVariables
Returns
Promise<boolean>
productSearchCategoriesIndex()
productSearchCategoriesIndex(
variables):Promise<IndexEntitiesResponse>
Queue one or more categories for indexing
Parameters
variables
ProductSearchCategoriesIndexVariables
Returns
Promise<IndexEntitiesResponse>
productSearchClustersIndex()
productSearchClustersIndex(
variables):Promise<IndexEntitiesResponse>
Queue one or more clusters for indexing
Parameters
variables
ProductSearchClustersIndexVariables
Returns
Promise<IndexEntitiesResponse>
productSearchFullReindexCancel()
productSearchFullReindexCancel(
variables):Promise<CancelReindexResponse>
Cancel a running reindex by its ID
Parameters
variables
ProductSearchFullReindexCancelVariables
Returns
Promise<CancelReindexResponse>
productSearchFullReindexStart()
productSearchFullReindexStart(
variables):Promise<StartReindexResponse>
Start a full reindex for the current tenant
Parameters
variables
ProductSearchFullReindexStartVariables
Returns
Promise<StartReindexResponse>
productSearchProductsIndex()
productSearchProductsIndex(
variables):Promise<IndexEntitiesResponse>
Queue one or more products for indexing
Parameters
variables
ProductSearchProductsIndexVariables
Returns
Promise<IndexEntitiesResponse>
productSearchReindexLockForceRelease()
productSearchReindexLockForceRelease():
Promise<ForceReleaseLockResponse>
Force release a reindex lock for the current tenant (admin operation)
Returns
Promise<ForceReleaseLockResponse>
productSetDefaultCategory()
productSetDefaultCategory(
variables):Promise<Product>
productSetDefaultCategory operation
Parameters
variables
ProductSetDefaultCategoryVariables
Returns
Promise<Product>
productUnassignFromCluster()
productUnassignFromCluster(
variables):Promise<Product>
Detach a product from its current cluster.
Parameters
variables
ProductUnassignFromClusterVariables
Returns
Promise<Product>
updateProduct()
updateProduct(
variables):Promise<Product>
Updates an existing product *
Parameters
variables
ProductUpdateVariables update input data
-
- productId: number - ID of the product to update
-
- input: UpdateProductInput - The fields to update for the product
Returns
Promise<Product>
Promise<Product> The updated product