diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminBatchProductVariantRequest.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminBatchProductVariantRequest.yaml index 090be1d3698bf..f09479c287687 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminBatchProductVariantRequest.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminBatchProductVariantRequest.yaml @@ -11,7 +11,7 @@ properties: type: array description: The product variants to update. items: - $ref: ./AdminUpdateProductVariant.yaml + $ref: ./AdminBatchUpdateProductVariant.yaml delete: type: array description: The product variants to delete. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminBatchUpdateProductVariant.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminBatchUpdateProductVariant.yaml new file mode 100644 index 0000000000000..82a68abb60700 --- /dev/null +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminBatchUpdateProductVariant.yaml @@ -0,0 +1,87 @@ +type: object +description: The properties to update of a product variant. +x-schemaName: AdminBatchUpdateProductVariant +properties: + title: + type: string + title: title + description: The product variant's title. + sku: + type: string + title: sku + description: The product variant's SKU. + ean: + type: string + title: ean + description: The product variant's EAN. + upc: + type: string + title: upc + description: The product variant's UPC. + barcode: + type: string + title: barcode + description: The product variant's barcode. + hs_code: + type: string + title: hs_code + description: The product variant's HS code. + mid_code: + type: string + title: mid_code + description: The product variant's MID code. + allow_backorder: + type: boolean + title: allow_backorder + description: Whether customers can order the variant even if it's not in stock. + manage_inventory: + type: boolean + title: manage_inventory + description: >- + Whether the Medusa application manages the variant's inventory. If + disabled, the product variant is always considered in stock. + variant_rank: + type: number + title: variant_rank + description: The product variant's rank among its siblings. + weight: + type: number + title: weight + description: The product variant's weight. + length: + type: number + title: length + description: The product variant's length. + height: + type: number + title: height + description: The product variant's height. + width: + type: number + title: width + description: The product variant's width. + origin_country: + type: string + title: origin_country + description: The product variant's origin country. + material: + type: string + title: material + description: The product variant's material. + metadata: + type: object + description: The product variant's metadata, can hold custom key-value pairs. + prices: + type: array + description: The product variant's prices. + items: + $ref: ./AdminCreateProductVariantPrice.yaml + options: + type: object + description: The product variant's options. + id: + type: string + title: id + description: The update's ID. +required: + - id diff --git a/www/apps/api-reference/specs/admin/openapi.full.yaml b/www/apps/api-reference/specs/admin/openapi.full.yaml index cace33e139412..f4a66516074b7 100644 --- a/www/apps/api-reference/specs/admin/openapi.full.yaml +++ b/www/apps/api-reference/specs/admin/openapi.full.yaml @@ -43651,7 +43651,7 @@ components: type: array description: The product variants to update. items: - $ref: '#/components/schemas/AdminUpdateProductVariant' + $ref: '#/components/schemas/AdminBatchUpdateProductVariant' delete: type: array description: The product variants to delete. @@ -43702,6 +43702,92 @@ components: type: boolean title: deleted description: Whether the product variants were deleted. + AdminBatchUpdateProductVariant: + type: object + description: The properties to update of a product variant. + x-schemaName: AdminBatchUpdateProductVariant + properties: + title: + type: string + title: title + description: The product variant's title. + sku: + type: string + title: sku + description: The product variant's SKU. + ean: + type: string + title: ean + description: The product variant's EAN. + upc: + type: string + title: upc + description: The product variant's UPC. + barcode: + type: string + title: barcode + description: The product variant's barcode. + hs_code: + type: string + title: hs_code + description: The product variant's HS code. + mid_code: + type: string + title: mid_code + description: The product variant's MID code. + allow_backorder: + type: boolean + title: allow_backorder + description: Whether customers can order the variant even if it's not in stock. + manage_inventory: + type: boolean + title: manage_inventory + description: Whether the Medusa application manages the variant's inventory. If disabled, the product variant is always considered in stock. + variant_rank: + type: number + title: variant_rank + description: The product variant's rank among its siblings. + weight: + type: number + title: weight + description: The product variant's weight. + length: + type: number + title: length + description: The product variant's length. + height: + type: number + title: height + description: The product variant's height. + width: + type: number + title: width + description: The product variant's width. + origin_country: + type: string + title: origin_country + description: The product variant's origin country. + material: + type: string + title: material + description: The product variant's material. + metadata: + type: object + description: The product variant's metadata, can hold custom key-value pairs. + prices: + type: array + description: The product variant's prices. + items: + $ref: '#/components/schemas/AdminCreateProductVariantPrice' + options: + type: object + description: The product variant's options. + id: + type: string + title: id + description: The update's ID. + required: + - id AdminCampaign: type: object description: The campaign's details. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminBatchProductVariantRequest.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminBatchProductVariantRequest.yaml index 090be1d3698bf..f09479c287687 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminBatchProductVariantRequest.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminBatchProductVariantRequest.yaml @@ -11,7 +11,7 @@ properties: type: array description: The product variants to update. items: - $ref: ./AdminUpdateProductVariant.yaml + $ref: ./AdminBatchUpdateProductVariant.yaml delete: type: array description: The product variants to delete. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminBatchUpdateProductVariant.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminBatchUpdateProductVariant.yaml new file mode 100644 index 0000000000000..82a68abb60700 --- /dev/null +++ b/www/apps/api-reference/specs/store/components/schemas/AdminBatchUpdateProductVariant.yaml @@ -0,0 +1,87 @@ +type: object +description: The properties to update of a product variant. +x-schemaName: AdminBatchUpdateProductVariant +properties: + title: + type: string + title: title + description: The product variant's title. + sku: + type: string + title: sku + description: The product variant's SKU. + ean: + type: string + title: ean + description: The product variant's EAN. + upc: + type: string + title: upc + description: The product variant's UPC. + barcode: + type: string + title: barcode + description: The product variant's barcode. + hs_code: + type: string + title: hs_code + description: The product variant's HS code. + mid_code: + type: string + title: mid_code + description: The product variant's MID code. + allow_backorder: + type: boolean + title: allow_backorder + description: Whether customers can order the variant even if it's not in stock. + manage_inventory: + type: boolean + title: manage_inventory + description: >- + Whether the Medusa application manages the variant's inventory. If + disabled, the product variant is always considered in stock. + variant_rank: + type: number + title: variant_rank + description: The product variant's rank among its siblings. + weight: + type: number + title: weight + description: The product variant's weight. + length: + type: number + title: length + description: The product variant's length. + height: + type: number + title: height + description: The product variant's height. + width: + type: number + title: width + description: The product variant's width. + origin_country: + type: string + title: origin_country + description: The product variant's origin country. + material: + type: string + title: material + description: The product variant's material. + metadata: + type: object + description: The product variant's metadata, can hold custom key-value pairs. + prices: + type: array + description: The product variant's prices. + items: + $ref: ./AdminCreateProductVariantPrice.yaml + options: + type: object + description: The product variant's options. + id: + type: string + title: id + description: The update's ID. +required: + - id diff --git a/www/apps/api-reference/specs/store/openapi.full.yaml b/www/apps/api-reference/specs/store/openapi.full.yaml index 937bfe0141b0d..03e2e02ddad47 100644 --- a/www/apps/api-reference/specs/store/openapi.full.yaml +++ b/www/apps/api-reference/specs/store/openapi.full.yaml @@ -5681,7 +5681,7 @@ components: type: array description: The product variants to update. items: - $ref: '#/components/schemas/AdminUpdateProductVariant' + $ref: '#/components/schemas/AdminBatchUpdateProductVariant' delete: type: array description: The product variants to delete. @@ -5732,6 +5732,92 @@ components: type: boolean title: deleted description: Whether the product variants were deleted. + AdminBatchUpdateProductVariant: + type: object + description: The properties to update of a product variant. + x-schemaName: AdminBatchUpdateProductVariant + properties: + title: + type: string + title: title + description: The product variant's title. + sku: + type: string + title: sku + description: The product variant's SKU. + ean: + type: string + title: ean + description: The product variant's EAN. + upc: + type: string + title: upc + description: The product variant's UPC. + barcode: + type: string + title: barcode + description: The product variant's barcode. + hs_code: + type: string + title: hs_code + description: The product variant's HS code. + mid_code: + type: string + title: mid_code + description: The product variant's MID code. + allow_backorder: + type: boolean + title: allow_backorder + description: Whether customers can order the variant even if it's not in stock. + manage_inventory: + type: boolean + title: manage_inventory + description: Whether the Medusa application manages the variant's inventory. If disabled, the product variant is always considered in stock. + variant_rank: + type: number + title: variant_rank + description: The product variant's rank among its siblings. + weight: + type: number + title: weight + description: The product variant's weight. + length: + type: number + title: length + description: The product variant's length. + height: + type: number + title: height + description: The product variant's height. + width: + type: number + title: width + description: The product variant's width. + origin_country: + type: string + title: origin_country + description: The product variant's origin country. + material: + type: string + title: material + description: The product variant's material. + metadata: + type: object + description: The product variant's metadata, can hold custom key-value pairs. + prices: + type: array + description: The product variant's prices. + items: + $ref: '#/components/schemas/AdminCreateProductVariantPrice' + options: + type: object + description: The product variant's options. + id: + type: string + title: id + description: The update's ID. + required: + - id AdminCampaign: type: object description: The campaign's details. diff --git a/www/utils/generated/oas-output/schemas/AdminBatchProductVariantRequest.ts b/www/utils/generated/oas-output/schemas/AdminBatchProductVariantRequest.ts index 7277ed3fce475..49edc526bb84b 100644 --- a/www/utils/generated/oas-output/schemas/AdminBatchProductVariantRequest.ts +++ b/www/utils/generated/oas-output/schemas/AdminBatchProductVariantRequest.ts @@ -13,7 +13,7 @@ * type: array * description: The product variants to update. * items: - * $ref: "#/components/schemas/AdminUpdateProductVariant" + * $ref: "#/components/schemas/AdminBatchUpdateProductVariant" * delete: * type: array * description: The product variants to delete. diff --git a/www/utils/generated/oas-output/schemas/AdminBatchUpdateProductVariant.ts b/www/utils/generated/oas-output/schemas/AdminBatchUpdateProductVariant.ts new file mode 100644 index 0000000000000..6bc0755222b1c --- /dev/null +++ b/www/utils/generated/oas-output/schemas/AdminBatchUpdateProductVariant.ts @@ -0,0 +1,90 @@ +/** + * @schema AdminBatchUpdateProductVariant + * type: object + * description: The properties to update of a product variant. + * x-schemaName: AdminBatchUpdateProductVariant + * properties: + * title: + * type: string + * title: title + * description: The product variant's title. + * sku: + * type: string + * title: sku + * description: The product variant's SKU. + * ean: + * type: string + * title: ean + * description: The product variant's EAN. + * upc: + * type: string + * title: upc + * description: The product variant's UPC. + * barcode: + * type: string + * title: barcode + * description: The product variant's barcode. + * hs_code: + * type: string + * title: hs_code + * description: The product variant's HS code. + * mid_code: + * type: string + * title: mid_code + * description: The product variant's MID code. + * allow_backorder: + * type: boolean + * title: allow_backorder + * description: Whether customers can order the variant even if it's not in stock. + * manage_inventory: + * type: boolean + * title: manage_inventory + * description: Whether the Medusa application manages the variant's inventory. If disabled, the product variant is always considered in stock. + * variant_rank: + * type: number + * title: variant_rank + * description: The product variant's rank among its siblings. + * weight: + * type: number + * title: weight + * description: The product variant's weight. + * length: + * type: number + * title: length + * description: The product variant's length. + * height: + * type: number + * title: height + * description: The product variant's height. + * width: + * type: number + * title: width + * description: The product variant's width. + * origin_country: + * type: string + * title: origin_country + * description: The product variant's origin country. + * material: + * type: string + * title: material + * description: The product variant's material. + * metadata: + * type: object + * description: The product variant's metadata, can hold custom key-value pairs. + * prices: + * type: array + * description: The product variant's prices. + * items: + * $ref: "#/components/schemas/AdminCreateProductVariantPrice" + * options: + * type: object + * description: The product variant's options. + * id: + * type: string + * title: id + * description: The update's ID. + * required: + * - id + * +*/ +