📐 Product schemas
Product schemas define public request contracts and reusable product shapes. Reusable shapes are strict where the source sets additionalProperties: false; request contracts below preserve source locations and requiredness.
Inventory
| Export | Request location | Contract |
|---|---|---|
productSchema | N/A | Reusable strict object shape. |
createProductImageSchema | Body | Source-defined request contract. |
ProductImage | N/A | Public TypeScript image shape. |
NormalizedProductImage | N/A | Public TypeScript image shape. |
productVariantSchema | N/A | Reusable strict object shape. |
createProductSchema | Body | Source-defined request contract. |
updateProductSchema | Path, body | Source-defined request contract. |
createProductBatchSchema | Body | Source-defined request contract. |
updateProductBatchSchema | Body | Source-defined request contract. |
deleteProductBatchSchema | Body | Source-defined request contract. |
copyProductBatchSchema | Body | Source-defined request contract. |
getProductSchema | Path | Source-defined request contract. |
deleteProductSchema | Path | Source-defined request contract. |
copyProductSchema | Path | Source-defined request contract. |
findProductsSchema | Query | Source-defined request contract. |
deleteProductImageSchema | Path | Source-defined request contract. |
createProductVariantSchema | Path, body | Source-defined request contract. |
getProductVariantSchema | Path | Source-defined request contract. |
updateProductVariantSchema | Path, body | Source-defined request contract. |
deleteProductVariantSchema | Path | Source-defined request contract. |
findProductVariantsSchema | Path, Query | Source-defined request contract. |
createProductVariantBulkSchema | Path, body | Source-defined request contract. |
updateProductVariantBulkSchema | Path, body | Source-defined request contract. |
deleteProductVariantBulkSchema | Path, body | Source-defined request contract. |
getProductLikersSchema | Path | Source-defined request contract. |
Details
productSchema
Definition
This export defines the source-backed request or reusable validation shape.
| Location | Field | Type | Required | Constraints |
|---|---|---|---|---|
| N/A | description | string | No | additionalProperties: false. |
| N/A | name | string | No | additionalProperties: false. |
Used by route: None
Used by feature: None
Used by schemas: createProductSchema, updateProductSchema, createProductBatchSchema, updateProductBatchSchema.View complete source
createProductImageSchema
Definition
This export defines the source-backed request or reusable validation shape.
| Location | Field | Type | Required | Constraints |
|---|---|---|---|---|
| Body | objectId | string | Yes | UUID format; JSON body required. |
| Body | type | string | Yes | JSON body required; inherited strict object. |
Used by route: createProductImageRoute
Used by feature: createProductImageFeatureView complete source
ProductImage
Definition
This exported TypeScript shape describes stored or normalized product image data.
| Location | Field | Type | Required | Constraints |
|---|---|---|---|---|
| N/A | objectId | string | Yes | Stored image object identifier. |
| N/A | type | string | Yes | Stored image type. |
Used by route: None
Used by feature: NoneView complete source
NormalizedProductImage
Definition
This exported TypeScript shape describes stored or normalized product image data.
| Location | Field | Type | Required | Constraints |
|---|---|---|---|---|
| N/A | url | string | Yes | Public normalized URL. |
| N/A | type | string | Yes | Image type. |
Used by route: None
Used by feature: NoneView complete source
productVariantSchema
Definition
This export defines the source-backed request or reusable validation shape.
| Location | Field | Type | Required | Constraints |
|---|---|---|---|---|
| N/A | description | string | No | additionalProperties: false. |
| N/A | imageIds | string[] | No | Array items are strings. |
| N/A | price.amount | number | No | Nested price object is strict. |
| N/A | price.currency | string | No | Nested price object is strict. |
| N/A | price.taxIncluded | boolean | No | Nested price object is strict. |
| N/A | price.taxable | boolean | No | Nested price object is strict. |
| N/A | sku | string | No | Strict reusable shape. |
| N/A | title | string | No | Strict reusable shape. |
Used by route: None
Used by feature: None
Used by schemas: createProductVariantSchema, updateProductVariantSchema, createProductVariantBulkSchema, updateProductVariantBulkSchema.View complete source
createProductSchema
Definition
This export defines the source-backed request or reusable validation shape.
| Location | Field | Type | Required | Constraints |
|---|---|---|---|---|
| Body | description | string | Yes | JSON body required; inherited from productSchema. |
| Body | name | string | Yes | JSON body required; inherited from productSchema. |
Used by route: createProductRoute
Used by feature: createProductFeatureView complete source
updateProductSchema
Definition
This export defines the source-backed request or reusable validation shape.
| Location | Field | Type | Required | Constraints |
|---|---|---|---|---|
| Path | productId | string | Yes | Shared path parameter. |
| Body | description | string | No | JSON body itself is required; strict product shape. |
| Body | name | string | No | JSON body itself is required; strict product shape. |
Used by route: updateProductRoute
Used by feature: editProductFeaturesView complete source
createProductBatchSchema
Definition
This export defines the source-backed request or reusable validation shape.
| Location | Field | Type | Required | Constraints |
|---|---|---|---|---|
| Body | [] | Product[] | Yes | JSON array; each item requires name and description, using strict productSchema. |
Used by route: createProductBatchRoute
Used by feature: createProductBatchFeatureView complete source
updateProductBatchSchema
Definition
This export defines the source-backed request or reusable validation shape.
| Location | Field | Type | Required | Constraints |
|---|---|---|---|---|
| Body | ids | string[] | Yes | arrayOfStringsSchema. |
| Body | data | Product | Yes | Strict productSchema with no required fields. |
Used by route: updateProductBatchRoute
Used by feature: editProductBatchFeaturesView complete source
deleteProductBatchSchema
Definition
This export defines the source-backed request or reusable validation shape.
| Location | Field | Type | Required | Constraints |
|---|---|---|---|---|
| Body | [] | string[] | Yes | arrayOfStringsSchema; JSON body required. |
Used by route: deleteProductBatchRoute
Used by feature: deleteProductBatchFeaturesView complete source
copyProductBatchSchema
Definition
This export defines the source-backed request or reusable validation shape.
| Location | Field | Type | Required | Constraints |
|---|---|---|---|---|
| Body | [] | string[] | Yes | arrayOfStringsSchema; JSON body required. |
Used by route: copyProductBatchRoute
Used by feature: copyProductBatchFeaturesView complete source
getProductSchema
Definition
This export defines the source-backed request or reusable validation shape.
| Location | Field | Type | Required | Constraints |
|---|---|---|---|---|
| Path | productId | string | Yes | Shared path parameter. |
Used by route: getProductRoute
Used by feature: getProductFeaturesView complete source
deleteProductSchema
Definition
This export defines the source-backed request or reusable validation shape.
| Location | Field | Type | Required | Constraints |
|---|---|---|---|---|
| Path | productId | string | Yes | Shared path parameter. |
Used by route: deleteProductRoute
Used by feature: deleteProductFeaturesView complete source
copyProductSchema
Definition
This export defines the source-backed request or reusable validation shape.
| Location | Field | Type | Required | Constraints |
|---|---|---|---|---|
| Path | productId | string | Yes | Shared path parameter. |
Used by route: copyProductRoute
Used by feature: copyProductFeaturesView complete source
findProductsSchema
Definition
This export defines the source-backed request or reusable validation shape.
| Location | Field | Type | Required | Constraints |
|---|---|---|---|---|
| Query | name | string | No | Product name filter. |
| Query | description | string | No | Product description filter. |
| Query | pagination parameters | Shared | No | Spread from paginationQueryParametersSchema. |
Used by route: findProductsRoute
Used by feature: findProductsFeaturesView complete source
deleteProductImageSchema
Definition
This export defines the source-backed request or reusable validation shape.
| Location | Field | Type | Required | Constraints |
|---|---|---|---|---|
| Path | productId | string | Yes | Shared path parameter. |
| Path | imageId | string | Yes | Shared path parameter. |
Used by route: deleteProductImageRoute
Used by feature: deleteProductImageFeatureView complete source
createProductVariantSchema
Definition
This export defines the source-backed request or reusable validation shape.
| Location | Field | Type | Required | Constraints |
|---|---|---|---|---|
| Path | productId | string | Yes | Shared path parameter. |
| Body | title | string | Yes | JSON body required; strict variant shape. |
| Body | description, imageIds, price, sku | Variant fields | No | Inherited from productVariantSchema. |
Used by route: createProductVariantRoute
Used by feature: createProductVariantFeatureView complete source
getProductVariantSchema
Definition
This export defines the source-backed request or reusable validation shape.
| Location | Field | Type | Required | Constraints |
|---|---|---|---|---|
| Path | productId | string | Yes | Shared path parameter. |
| Path | productVariantId | string | Yes | Shared path parameter. |
Used by route: getProductVariantRoute
Used by feature: getProductVariantFeatureView complete source
updateProductVariantSchema
Definition
This export defines the source-backed request or reusable validation shape.
| Location | Field | Type | Required | Constraints |
|---|---|---|---|---|
| Path | productId | string | Yes | Shared path parameter. |
| Path | productVariantId | string | Yes | Shared path parameter. |
| Body | variant fields | productVariantSchema | No | Body is present in the operation but requestBody.required is omitted. |
Used by route: updateProductVariantRoute
Used by feature: updateProductVariantFeatureView complete source
deleteProductVariantSchema
Definition
This export defines the source-backed request or reusable validation shape.
| Location | Field | Type | Required | Constraints |
|---|---|---|---|---|
| Path | productId | string | Yes | Shared path parameter. |
| Path | productVariantId | string | Yes | Shared path parameter. |
Used by route: deleteProductVariantRoute
Used by feature: deleteProductVariantFeatureView complete source
findProductVariantsSchema
Definition
This export defines the source-backed request or reusable validation shape.
| Location | Field | Type | Required | Constraints |
|---|---|---|---|---|
| Path | productId | string | Yes | Shared path parameter. |
| Query | pagination parameters | Shared | No | Spread from paginationQueryParametersSchema. |
Used by route: findProductVariantsRoute
Used by feature: findProductVariantsFeatureView complete source
createProductVariantBulkSchema
Definition
This export defines the source-backed request or reusable validation shape.
| Location | Field | Type | Required | Constraints |
|---|---|---|---|---|
| Path | productId | string | Yes | Shared path parameter. |
| Body | [] | ProductVariant[] | Yes | JSON array, 1–100 items; each requires title. |
Used by route: createProductVariantBulkRoute
Used by feature: createProductVariantBulkFeatureView complete source
updateProductVariantBulkSchema
Definition
This export defines the source-backed request or reusable validation shape.
| Location | Field | Type | Required | Constraints |
|---|---|---|---|---|
| Path | productId | string | Yes | Shared path parameter. |
| Body | ids | string[] | Yes | arrayOfStringsSchema, 1–100 items. |
| Body | data | object | Yes | Variant properties, no required nested fields. |
Used by route: updateProductVariantBulkRoute
Used by feature: updateProductVariantBulkFeatureView complete source
deleteProductVariantBulkSchema
Definition
This export defines the source-backed request or reusable validation shape.
| Location | Field | Type | Required | Constraints |
|---|---|---|---|---|
| Path | productId | string | Yes | Shared path parameter. |
| Body | [] | string[] | Yes | arrayOfStringsSchema, 1–100 items. |
Used by route: deleteProductVariantBulkRoute
Used by feature: deleteProductVariantBulkFeatureView complete source
getProductLikersSchema
Definition
This export defines the source-backed request or reusable validation shape.
| Location | Field | Type | Required | Constraints |
|---|---|---|---|---|
| Path | productId | string | Yes | Shared path parameter. |
Used by route: getProductLikersRoute
Used by feature: getProductLikersFeatureView complete source