Run a series of updates on multiple product variants. Updates will be performed using the bulkWrite method.
List of product variants to update and their ids
TODO: Add transaction support in the future
Create many Product variants
List of product variants
object containing the id of the created record blocks-58c1
Create Product variant
Data of product variant
object containing the id of the created record blocks-58c1
Expand a list of product variants with image data from the attachment service
Note: This expand always expands, as images are expanded by default
Optional
expand: ExpandExpand the products varients with other microservices and data types
Optional
expand: ExpandProductResponse[]
Get product variant from database. Optionally, you can pass forProductId to filter by product id.
Optional
forProductId: stringPromise<Product | undefined> Product Variant data if fetched successfully, or null if data not found by id
Get product variants from database for a list of ids.
Get product variants from database for a single product.
List paginated product variants
paginated list query options
Optional
extraFilters: { Optional
productpaginated product variants list query result
Normalize a single product variant response
Normalize a list of product variant responses
Update product variant by productId and variantId
data to update
true if variant updated successfully blocks-3f1c
Update product variants for a product, deleting the variants that are not in the list
Private
attachmentPrivate
dbPrivate
productStatic
Readonly
COLLECTION_Generated using TypeDoc
Product variant service