From be1adac0243f7088be3df472173a875dbaeb6415 Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Thu, 26 Sep 2024 17:08:10 +0300 Subject: [PATCH] chore(oas): [18/n] improve oas schemas (#9311) Improve OAS schemas [18/n] --- .../admin/get_admin_reservations.ts | 4 +- .../operations/admin/post_admin_uploads.ts | 25 +- .../store/post_store_carts_[id]_taxes.ts | 5 - .../schemas/AdminImportProductRequest.ts | 7 +- .../oas-output/schemas/AdminInventoryItem.ts | 16 +- .../oas-output/schemas/AdminInventoryLevel.ts | 51 ++- .../oas-output/schemas/AdminProductImage.ts | 8 + .../generated/oas-output/schemas/BaseCart.ts | 178 ++++++++++ .../oas-output/schemas/BaseCartAddress.ts | 8 + .../oas-output/schemas/BaseCartLineItem.ts | 199 +++++++++++ .../oas-output/schemas/CreateAddress.ts | 2 +- .../oas-output/schemas/CreateCartAddress.ts | 52 --- .../schemas/CreateCartCreateLineItem.ts | 102 ------ .../schemas/CreateCartWorkflowInput.ts | 65 ---- .../schemas/CustomerGroupInCustomerFilters.ts | 26 +- .../generated/oas-output/schemas/File.ts | 50 --- .../generated/oas-output/schemas/FileList.ts | 23 -- .../oas-output/schemas/InventoryLevel.ts | 8 +- .../oas-output/schemas/RefundReason.ts | 40 +++ .../schemas/RefundReasonResponse.ts | 2 +- .../schemas/StoreAddCartLineItem.ts | 8 +- .../generated/oas-output/schemas/StoreCart.ts | 333 +++++------------- .../oas-output/schemas/StoreCartAddress.ts | 53 ++- .../oas-output/schemas/StoreCartLineItem.ts | 230 ++++-------- .../oas-output/schemas/StoreCartResponse.ts | 2 +- .../schemas/StoreCartShippingMethod.ts | 113 ++++++ .../oas-output/schemas/StorePaymentSession.ts | 63 ++++ .../oas-output/schemas/StoreProductImage.ts | 38 ++ .../oas-output/schemas/StoreProductOption.ts | 49 +++ .../schemas/StoreProductOptionValue.ts | 44 +++ .../oas-output/schemas/StoreProductTag.ts | 40 +++ .../oas-output/schemas/StoreProductVariant.ts | 133 +++++++ .../src/classes/helpers/schema-factory.ts | 20 ++ 33 files changed, 1178 insertions(+), 819 deletions(-) create mode 100644 www/utils/generated/oas-output/schemas/AdminProductImage.ts create mode 100644 www/utils/generated/oas-output/schemas/BaseCart.ts create mode 100644 www/utils/generated/oas-output/schemas/BaseCartAddress.ts create mode 100644 www/utils/generated/oas-output/schemas/BaseCartLineItem.ts delete mode 100644 www/utils/generated/oas-output/schemas/CreateCartAddress.ts delete mode 100644 www/utils/generated/oas-output/schemas/CreateCartCreateLineItem.ts delete mode 100644 www/utils/generated/oas-output/schemas/CreateCartWorkflowInput.ts delete mode 100644 www/utils/generated/oas-output/schemas/File.ts delete mode 100644 www/utils/generated/oas-output/schemas/FileList.ts create mode 100644 www/utils/generated/oas-output/schemas/RefundReason.ts create mode 100644 www/utils/generated/oas-output/schemas/StoreCartShippingMethod.ts create mode 100644 www/utils/generated/oas-output/schemas/StorePaymentSession.ts create mode 100644 www/utils/generated/oas-output/schemas/StoreProductImage.ts create mode 100644 www/utils/generated/oas-output/schemas/StoreProductOption.ts create mode 100644 www/utils/generated/oas-output/schemas/StoreProductOptionValue.ts create mode 100644 www/utils/generated/oas-output/schemas/StoreProductTag.ts create mode 100644 www/utils/generated/oas-output/schemas/StoreProductVariant.ts diff --git a/www/utils/generated/oas-output/operations/admin/get_admin_reservations.ts b/www/utils/generated/oas-output/operations/admin/get_admin_reservations.ts index d4e08c3c6f..abbfda2812 100644 --- a/www/utils/generated/oas-output/operations/admin/get_admin_reservations.ts +++ b/www/utils/generated/oas-output/operations/admin/get_admin_reservations.ts @@ -558,9 +558,9 @@ * properties: * reservations: * type: array - * description: The list of reservations`. + * description: The list of reservations. * items: - * $ref: "#/components/schemas/ReservationResponse" + * $ref: "#/components/schemas/AdminReservation" * "400": * $ref: "#/components/responses/400_error" * "401": diff --git a/www/utils/generated/oas-output/operations/admin/post_admin_uploads.ts b/www/utils/generated/oas-output/operations/admin/post_admin_uploads.ts index 2e495e2d9b..aa4d777053 100644 --- a/www/utils/generated/oas-output/operations/admin/post_admin_uploads.ts +++ b/www/utils/generated/oas-output/operations/admin/post_admin_uploads.ts @@ -14,17 +14,17 @@ * schema: * oneOf: * - type: object - * description: The files to upload. + * description: SUMMARY * required: * - files * properties: * files: * type: array - * description: The files to upload. + * description: The upload's files. * items: * oneOf: * - type: object - * description: A file's details. + * description: The file's files. * required: * - name * - content @@ -36,9 +36,22 @@ * content: * type: string * title: content - * description: The file's base64 content. - * - $ref: "#/components/schemas/File" - * - $ref: "#/components/schemas/FileList" + * description: The file's content. + * - type: object + * description: A File to upload. + * externalDocs: + * url: https://developer.mozilla.org/en-US/docs/Web/API/File + * description: Learn more about the File API + * title: files + * - type: array + * description: list of files to upload. + * items: + * type: object + * description: A File to upload. + * externalDocs: + * url: https://developer.mozilla.org/en-US/docs/Web/API/File + * description: Learn more about the File API + * title: FileList * description: The files to upload. * x-codeSamples: * - lang: Shell diff --git a/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_taxes.ts b/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_taxes.ts index 9e86d9ca22..e1bf303aa2 100644 --- a/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_taxes.ts +++ b/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_taxes.ts @@ -30,11 +30,6 @@ * title: fields * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * fields. without prefix it will replace the entire default fields. - * requestBody: - * content: - * application/json: - * schema: - * $ref: "#/components/schemas/StoreCalculateCartTaxes" * x-codeSamples: * - lang: Shell * label: cURL diff --git a/www/utils/generated/oas-output/schemas/AdminImportProductRequest.ts b/www/utils/generated/oas-output/schemas/AdminImportProductRequest.ts index 5ab63b32a2..1227758eae 100644 --- a/www/utils/generated/oas-output/schemas/AdminImportProductRequest.ts +++ b/www/utils/generated/oas-output/schemas/AdminImportProductRequest.ts @@ -7,7 +7,12 @@ * - file * properties: * file: - * $ref: "#/components/schemas/File" + * type: object + * description: A File to upload. + * externalDocs: + * url: https://developer.mozilla.org/en-US/docs/Web/API/File + * description: Learn more about the File API + * title: file * */ diff --git a/www/utils/generated/oas-output/schemas/AdminInventoryItem.ts b/www/utils/generated/oas-output/schemas/AdminInventoryItem.ts index b97f952087..9e0c686c3b 100644 --- a/www/utils/generated/oas-output/schemas/AdminInventoryItem.ts +++ b/www/utils/generated/oas-output/schemas/AdminInventoryItem.ts @@ -1,7 +1,7 @@ /** * @schema AdminInventoryItem * type: object - * description: The inventory item's details. + * description: The reservation's inventory item. * x-schemaName: AdminInventoryItem * required: * - id @@ -14,7 +14,7 @@ * sku: * type: string * title: sku - * description: The inventory item's SKU. + * description: The inventory item's sku. * origin_country: * type: string * title: origin_country @@ -22,15 +22,15 @@ * hs_code: * type: string * title: hs_code - * description: The inventory item's HS code. + * description: The inventory item's hs code. * requires_shipping: * type: boolean * title: requires_shipping - * description: Whether the inventory item requires shipping. + * description: The inventory item's requires shipping. * mid_code: * type: string * title: mid_code - * description: The inventory item's MID code. + * description: The inventory item's mid code. * material: * type: string * title: material @@ -62,13 +62,13 @@ * thumbnail: * type: string * title: thumbnail - * description: The URL of the inventory item's thumbnail. + * description: The inventory item's thumbnail. * metadata: * type: object - * description: The inventory item's metadata, can hold custom key-value pairs. + * description: The inventory item's metadata. * location_levels: * type: array - * description: The inventory item's associated inventory levels. + * description: The inventory item's location levels. * items: * $ref: "#/components/schemas/AdminInventoryLevel" * diff --git a/www/utils/generated/oas-output/schemas/AdminInventoryLevel.ts b/www/utils/generated/oas-output/schemas/AdminInventoryLevel.ts index ae848951a1..284322a404 100644 --- a/www/utils/generated/oas-output/schemas/AdminInventoryLevel.ts +++ b/www/utils/generated/oas-output/schemas/AdminInventoryLevel.ts @@ -1,7 +1,7 @@ /** * @schema AdminInventoryLevel * type: object - * description: The inventory level's details. + * description: The location level's location levels. * x-schemaName: AdminInventoryLevel * required: * - id @@ -11,62 +11,59 @@ * - inventory_item_id * - location_id * - stocked_quantity - * - raw_stocked_quantity * - reserved_quantity - * - raw_reserved_quantity * - incoming_quantity - * - raw_incoming_quantity * - metadata * - available_quantity * properties: * id: * type: string * title: id - * description: The inventory level's ID. + * description: The location level's ID. + * created_at: + * type: string + * format: date-time + * title: created_at + * description: The location level's created at. + * updated_at: + * type: string + * format: date-time + * title: updated_at + * description: The location level's updated at. + * deleted_at: + * type: string + * format: date-time + * title: deleted_at + * description: The location level's deleted at. * inventory_item_id: * type: string * title: inventory_item_id - * description: The ID of the inventory item this level belongs to. + * description: The location level's inventory item id. * location_id: * type: string * title: location_id - * description: The ID of the stock location this level belongs to. + * description: The location level's location id. * stocked_quantity: * type: number * title: stocked_quantity - * description: The quantity of the associated inventory item stocked in the associated stock location. + * description: The location level's stocked quantity. * reserved_quantity: * type: number * title: reserved_quantity - * description: The reserved quantity of the associated inventory item stocked in the associated stock location. + * description: The location level's reserved quantity. * incoming_quantity: * type: number * title: incoming_quantity - * description: The incoming quantity of the associated inventory item stocked in the associated stock location. + * description: The location level's incoming quantity. * metadata: * type: object - * description: The location level's metadata, can hold custom key-value pairs. + * description: The location level's metadata. * inventory_item: * $ref: "#/components/schemas/AdminInventoryItem" * available_quantity: * type: number * title: available_quantity - * description: The quantity available for order of the associated inventory item in the associated stock location. - * created_at: - * type: string - * format: date-time - * title: created_at - * description: The date the inventory level was created. - * updated_at: - * type: string - * format: date-time - * title: updated_at - * description: The date the inventory level was updated. - * deleted_at: - * type: string - * format: date-time - * title: deleted_at - * description: The date the inventory level was deleted. + * description: The location level's available quantity. * */ diff --git a/www/utils/generated/oas-output/schemas/AdminProductImage.ts b/www/utils/generated/oas-output/schemas/AdminProductImage.ts new file mode 100644 index 0000000000..3be440fd19 --- /dev/null +++ b/www/utils/generated/oas-output/schemas/AdminProductImage.ts @@ -0,0 +1,8 @@ +/** + * @schema AdminProductImage + * type: object + * description: The image's details. + * x-schemaName: AdminProductImage + * +*/ + diff --git a/www/utils/generated/oas-output/schemas/BaseCart.ts b/www/utils/generated/oas-output/schemas/BaseCart.ts new file mode 100644 index 0000000000..f9fbfae78b --- /dev/null +++ b/www/utils/generated/oas-output/schemas/BaseCart.ts @@ -0,0 +1,178 @@ +/** + * @schema BaseCart + * type: object + * description: The item's cart. + * x-schemaName: BaseCart + * required: + * - id + * - currency_code + * - original_item_total + * - original_item_subtotal + * - original_item_tax_total + * - item_total + * - item_subtotal + * - item_tax_total + * - original_total + * - original_subtotal + * - original_tax_total + * - total + * - subtotal + * - tax_total + * - discount_total + * - discount_tax_total + * - gift_card_total + * - gift_card_tax_total + * - shipping_total + * - shipping_subtotal + * - shipping_tax_total + * - original_shipping_total + * - original_shipping_subtotal + * - original_shipping_tax_total + * properties: + * id: + * type: string + * title: id + * description: The cart's ID. + * region: + * $ref: "#/components/schemas/BaseRegion" + * region_id: + * type: string + * title: region_id + * description: The cart's region id. + * customer_id: + * type: string + * title: customer_id + * description: The cart's customer id. + * sales_channel_id: + * type: string + * title: sales_channel_id + * description: The cart's sales channel id. + * email: + * type: string + * title: email + * description: The cart's email. + * format: email + * currency_code: + * type: string + * title: currency_code + * description: The cart's currency code. + * shipping_address: + * $ref: "#/components/schemas/BaseCartAddress" + * billing_address: + * $ref: "#/components/schemas/BaseCartAddress" + * items: + * type: array + * description: The cart's items. + * items: + * $ref: "#/components/schemas/BaseCartLineItem" + * shipping_methods: + * type: array + * description: The cart's shipping methods. + * items: + * $ref: "#/components/schemas/BaseCartShippingMethod" + * payment_collection: + * $ref: "#/components/schemas/BasePaymentCollection" + * metadata: + * type: object + * description: The cart's metadata. + * created_at: + * type: string + * format: date-time + * title: created_at + * description: The cart's created at. + * updated_at: + * type: string + * format: date-time + * title: updated_at + * description: The cart's updated at. + * original_item_total: + * type: number + * title: original_item_total + * description: The cart's original item total. + * original_item_subtotal: + * type: number + * title: original_item_subtotal + * description: The cart's original item subtotal. + * original_item_tax_total: + * type: number + * title: original_item_tax_total + * description: The cart's original item tax total. + * item_total: + * type: number + * title: item_total + * description: The cart's item total. + * item_subtotal: + * type: number + * title: item_subtotal + * description: The cart's item subtotal. + * item_tax_total: + * type: number + * title: item_tax_total + * description: The cart's item tax total. + * original_total: + * type: number + * title: original_total + * description: The cart's original total. + * original_subtotal: + * type: number + * title: original_subtotal + * description: The cart's original subtotal. + * original_tax_total: + * type: number + * title: original_tax_total + * description: The cart's original tax total. + * total: + * type: number + * title: total + * description: The cart's total. + * subtotal: + * type: number + * title: subtotal + * description: The cart's subtotal. + * tax_total: + * type: number + * title: tax_total + * description: The cart's tax total. + * discount_total: + * type: number + * title: discount_total + * description: The cart's discount total. + * discount_tax_total: + * type: number + * title: discount_tax_total + * description: The cart's discount tax total. + * gift_card_total: + * type: number + * title: gift_card_total + * description: The cart's gift card total. + * gift_card_tax_total: + * type: number + * title: gift_card_tax_total + * description: The cart's gift card tax total. + * shipping_total: + * type: number + * title: shipping_total + * description: The cart's shipping total. + * shipping_subtotal: + * type: number + * title: shipping_subtotal + * description: The cart's shipping subtotal. + * shipping_tax_total: + * type: number + * title: shipping_tax_total + * description: The cart's shipping tax total. + * original_shipping_total: + * type: number + * title: original_shipping_total + * description: The cart's original shipping total. + * original_shipping_subtotal: + * type: number + * title: original_shipping_subtotal + * description: The cart's original shipping subtotal. + * original_shipping_tax_total: + * type: number + * title: original_shipping_tax_total + * description: The cart's original shipping tax total. + * +*/ + diff --git a/www/utils/generated/oas-output/schemas/BaseCartAddress.ts b/www/utils/generated/oas-output/schemas/BaseCartAddress.ts new file mode 100644 index 0000000000..0c32ffe632 --- /dev/null +++ b/www/utils/generated/oas-output/schemas/BaseCartAddress.ts @@ -0,0 +1,8 @@ +/** + * @schema BaseCartAddress + * type: object + * description: The cart's shipping address. + * x-schemaName: BaseCartAddress + * +*/ + diff --git a/www/utils/generated/oas-output/schemas/BaseCartLineItem.ts b/www/utils/generated/oas-output/schemas/BaseCartLineItem.ts new file mode 100644 index 0000000000..022140712d --- /dev/null +++ b/www/utils/generated/oas-output/schemas/BaseCartLineItem.ts @@ -0,0 +1,199 @@ +/** + * @schema BaseCartLineItem + * type: object + * description: The tax line's item. + * x-schemaName: BaseCartLineItem + * required: + * - id + * - title + * - quantity + * - requires_shipping + * - is_discountable + * - is_tax_inclusive + * - unit_price + * - cart + * - cart_id + * - original_total + * - original_subtotal + * - original_tax_total + * - item_total + * - item_subtotal + * - item_tax_total + * - total + * - subtotal + * - tax_total + * - discount_total + * - discount_tax_total + * properties: + * id: + * type: string + * title: id + * description: The item's ID. + * title: + * type: string + * title: title + * description: The item's title. + * subtitle: + * type: string + * title: subtitle + * description: The item's subtitle. + * thumbnail: + * type: string + * title: thumbnail + * description: The item's thumbnail. + * quantity: + * type: number + * title: quantity + * description: The item's quantity. + * product: + * $ref: "#/components/schemas/BaseProduct" + * product_id: + * type: string + * title: product_id + * description: The item's product id. + * product_title: + * type: string + * title: product_title + * description: The item's product title. + * product_description: + * type: string + * title: product_description + * description: The item's product description. + * product_subtitle: + * type: string + * title: product_subtitle + * description: The item's product subtitle. + * product_type: + * type: string + * title: product_type + * description: The item's product type. + * product_collection: + * type: string + * title: product_collection + * description: The item's product collection. + * product_handle: + * type: string + * title: product_handle + * description: The item's product handle. + * variant: + * $ref: "#/components/schemas/BaseProductVariant" + * variant_id: + * type: string + * title: variant_id + * description: The item's variant id. + * variant_sku: + * type: string + * title: variant_sku + * description: The item's variant sku. + * variant_barcode: + * type: string + * title: variant_barcode + * description: The item's variant barcode. + * variant_title: + * type: string + * title: variant_title + * description: The item's variant title. + * variant_option_values: + * type: object + * description: The item's variant option values. + * requires_shipping: + * type: boolean + * title: requires_shipping + * description: The item's requires shipping. + * is_discountable: + * type: boolean + * title: is_discountable + * description: The item's is discountable. + * is_tax_inclusive: + * type: boolean + * title: is_tax_inclusive + * description: The item's is tax inclusive. + * compare_at_unit_price: + * type: number + * title: compare_at_unit_price + * description: The item's compare at unit price. + * unit_price: + * type: number + * title: unit_price + * description: The item's unit price. + * tax_lines: + * type: array + * description: The item's tax lines. + * items: + * $ref: "#/components/schemas/BaseLineItemTaxLine" + * adjustments: + * type: array + * description: The item's adjustments. + * items: + * $ref: "#/components/schemas/BaseLineItemAdjustment" + * cart: + * $ref: "#/components/schemas/BaseCart" + * cart_id: + * type: string + * title: cart_id + * description: The item's cart id. + * metadata: + * type: object + * description: The item's metadata. + * created_at: + * type: string + * format: date-time + * title: created_at + * description: The item's created at. + * updated_at: + * type: string + * format: date-time + * title: updated_at + * description: The item's updated at. + * deleted_at: + * type: string + * format: date-time + * title: deleted_at + * description: The item's deleted at. + * original_total: + * type: number + * title: original_total + * description: The item's original total. + * original_subtotal: + * type: number + * title: original_subtotal + * description: The item's original subtotal. + * original_tax_total: + * type: number + * title: original_tax_total + * description: The item's original tax total. + * item_total: + * type: number + * title: item_total + * description: The item's item total. + * item_subtotal: + * type: number + * title: item_subtotal + * description: The item's item subtotal. + * item_tax_total: + * type: number + * title: item_tax_total + * description: The item's item tax total. + * total: + * type: number + * title: total + * description: The item's total. + * subtotal: + * type: number + * title: subtotal + * description: The item's subtotal. + * tax_total: + * type: number + * title: tax_total + * description: The item's tax total. + * discount_total: + * type: number + * title: discount_total + * description: The item's discount total. + * discount_tax_total: + * type: number + * title: discount_tax_total + * description: The item's discount tax total. + * +*/ + diff --git a/www/utils/generated/oas-output/schemas/CreateAddress.ts b/www/utils/generated/oas-output/schemas/CreateAddress.ts index 22c7b11858..988ac9cc66 100644 --- a/www/utils/generated/oas-output/schemas/CreateAddress.ts +++ b/www/utils/generated/oas-output/schemas/CreateAddress.ts @@ -1,7 +1,7 @@ /** * @schema CreateAddress * type: object - * description: The cart's address details. + * description: The address to create. * x-schemaName: CreateAddress * properties: * customer_id: diff --git a/www/utils/generated/oas-output/schemas/CreateCartAddress.ts b/www/utils/generated/oas-output/schemas/CreateCartAddress.ts deleted file mode 100644 index e88ef0b05b..0000000000 --- a/www/utils/generated/oas-output/schemas/CreateCartAddress.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * @schema CreateCartAddress - * type: object - * description: The cart's billing address. - * x-schemaName: CreateCartAddress - * properties: - * first_name: - * type: string - * title: first_name - * description: The billing address's first name. - * last_name: - * type: string - * title: last_name - * description: The billing address's last name. - * phone: - * type: string - * title: phone - * description: The billing address's phone. - * company: - * type: string - * title: company - * description: The billing address's company. - * address_1: - * type: string - * title: address_1 - * description: The billing address's address 1. - * address_2: - * type: string - * title: address_2 - * description: The billing address's address 2. - * city: - * type: string - * title: city - * description: The billing address's city. - * country_code: - * type: string - * title: country_code - * description: The billing address's country code. - * province: - * type: string - * title: province - * description: The billing address's province. - * postal_code: - * type: string - * title: postal_code - * description: The billing address's postal code. - * metadata: - * type: object - * description: The billing address's metadata. - * -*/ - diff --git a/www/utils/generated/oas-output/schemas/CreateCartCreateLineItem.ts b/www/utils/generated/oas-output/schemas/CreateCartCreateLineItem.ts deleted file mode 100644 index 990c11c653..0000000000 --- a/www/utils/generated/oas-output/schemas/CreateCartCreateLineItem.ts +++ /dev/null @@ -1,102 +0,0 @@ -/** - * @schema CreateCartCreateLineItem - * type: object - * description: The item's items. - * x-schemaName: CreateCartCreateLineItem - * required: - * - quantity - * - variant_id - * properties: - * quantity: - * type: string - * title: quantity - * description: The item's quantity. - * variant_id: - * type: string - * title: variant_id - * description: The item's variant id. - * title: - * type: string - * title: title - * description: The item's title. - * subtitle: - * type: string - * title: subtitle - * description: The item's subtitle. - * thumbnail: - * type: string - * title: thumbnail - * description: The item's thumbnail. - * product_id: - * type: string - * title: product_id - * description: The item's product id. - * product_title: - * type: string - * title: product_title - * description: The item's product title. - * product_description: - * type: string - * title: product_description - * description: The item's product description. - * product_subtitle: - * type: string - * title: product_subtitle - * description: The item's product subtitle. - * product_type: - * type: string - * title: product_type - * description: The item's product type. - * product_collection: - * type: string - * title: product_collection - * description: The item's product collection. - * product_handle: - * type: string - * title: product_handle - * description: The item's product handle. - * variant_sku: - * type: string - * title: variant_sku - * description: The item's variant sku. - * variant_barcode: - * type: string - * title: variant_barcode - * description: The item's variant barcode. - * variant_title: - * type: string - * title: variant_title - * description: The item's variant title. - * variant_option_values: - * type: object - * description: The item's variant option values. - * requires_shipping: - * type: boolean - * title: requires_shipping - * description: The item's requires shipping. - * is_discountable: - * type: boolean - * title: is_discountable - * description: The item's is discountable. - * is_tax_inclusive: - * type: boolean - * title: is_tax_inclusive - * description: The item's is tax inclusive. - * is_giftcard: - * type: boolean - * title: is_giftcard - * description: The item's is giftcard. - * compare_at_unit_price: - * type: string - * title: compare_at_unit_price - * description: The item's compare at unit price. - * unit_price: - * type: string - * title: unit_price - * description: The item's unit price. - * metadata: - * type: object - * description: The item's metadata. - * -*/ - diff --git a/www/utils/generated/oas-output/schemas/CreateCartWorkflowInput.ts b/www/utils/generated/oas-output/schemas/CreateCartWorkflowInput.ts deleted file mode 100644 index 4da68eb2ef..0000000000 --- a/www/utils/generated/oas-output/schemas/CreateCartWorkflowInput.ts +++ /dev/null @@ -1,65 +0,0 @@ -/** - * @schema CreateCartWorkflowInput - * type: object - * description: SUMMARY - * x-schemaName: CreateCartWorkflowInput - * properties: - * region_id: - * type: string - * title: region_id - * description: The cart's region id. - * customer_id: - * type: string - * title: customer_id - * description: The cart's customer id. - * sales_channel_id: - * type: string - * title: sales_channel_id - * description: The cart's sales channel id. - * email: - * type: string - * title: email - * description: The cart's email. - * format: email - * currency_code: - * type: string - * title: currency_code - * description: The cart's currency code. - * shipping_address_id: - * type: string - * title: shipping_address_id - * description: The cart's shipping address id. - * billing_address_id: - * type: string - * title: billing_address_id - * description: The cart's billing address id. - * shipping_address: - * oneOf: - * - type: string - * title: shipping_address - * description: The cart's shipping address. - * - $ref: "#/components/schemas/CreateCartAddress" - * billing_address: - * oneOf: - * - type: string - * title: billing_address - * description: The cart's billing address. - * - $ref: "#/components/schemas/CreateCartAddress" - * metadata: - * type: object - * description: The cart's metadata. - * items: - * type: array - * description: The cart's items. - * items: - * $ref: "#/components/schemas/CreateCartCreateLineItem" - * promo_codes: - * type: array - * description: The cart's promo codes. - * items: - * type: string - * title: promo_codes - * description: The promo code's promo codes. - * -*/ - diff --git a/www/utils/generated/oas-output/schemas/CustomerGroupInCustomerFilters.ts b/www/utils/generated/oas-output/schemas/CustomerGroupInCustomerFilters.ts index 4ba9b2b6ec..8bc22392ff 100644 --- a/www/utils/generated/oas-output/schemas/CustomerGroupInCustomerFilters.ts +++ b/www/utils/generated/oas-output/schemas/CustomerGroupInCustomerFilters.ts @@ -1,7 +1,7 @@ /** * @schema CustomerGroupInCustomerFilters * type: object - * description: The customer's groups. + * description: Filter by customer groups to get their associated customers. * x-schemaName: CustomerGroupInCustomerFilters * required: * - id @@ -14,27 +14,27 @@ * oneOf: * - type: string * title: id - * description: The group's ID. + * description: Filter by a group's ID. * - type: array - * description: The group's ID. + * description: Filter by group IDs. * items: * type: string * title: id - * description: The id's ID. + * description: A group's ID. * name: * oneOf: * - type: string * title: name - * description: The group's name. + * description: Filter by a group's name. * - type: array - * description: The group's name. + * description: Filter by group names. * items: * type: string * title: name - * description: The name's details. + * description: A group's name. * created_at: * type: object - * description: The group's created at. + * description: Filter by the group's creation date. * properties: * $and: * type: array @@ -54,7 +54,7 @@ * title: $eq * description: Filter by an exact match. * - type: array - * description: Filter by an exact match. + * description: Filter by exact matches. * items: * type: string * title: $eq @@ -149,7 +149,7 @@ * description: Filter by whether a value for this parameter exists (not `null`). * updated_at: * type: object - * description: The group's updated at. + * description: Filter by the group's update date. * properties: * $and: * type: array @@ -169,7 +169,7 @@ * title: $eq * description: Filter by an exact match. * - type: array - * description: Filter by an exact match. + * description: Filter by exact matches. * items: * type: string * title: $eq @@ -264,7 +264,7 @@ * description: Filter by whether a value for this parameter exists (not `null`). * deleted_at: * type: object - * description: The group's deleted at. + * description: Filter by the group's deletion date. * properties: * $and: * type: array @@ -284,7 +284,7 @@ * title: $eq * description: Filter by an exact match. * - type: array - * description: Filter by an exact match. + * description: Filter by exact matches. * items: * type: string * title: $eq diff --git a/www/utils/generated/oas-output/schemas/File.ts b/www/utils/generated/oas-output/schemas/File.ts deleted file mode 100644 index 16cbced7d5..0000000000 --- a/www/utils/generated/oas-output/schemas/File.ts +++ /dev/null @@ -1,50 +0,0 @@ -/** - * @schema File - * type: object - * description: The product's file. - * x-schemaName: File - * required: - * - lastModified - * - name - * - webkitRelativePath - * - size - * - type - * - arrayBuffer - * - stream - * - text - * properties: - * lastModified: - * type: number - * title: lastModified - * description: The file's lastmodified. - * name: - * type: string - * title: name - * description: The file's name. - * webkitRelativePath: - * type: string - * title: webkitRelativePath - * description: The file's webkitrelativepath. - * size: - * type: number - * title: size - * description: The file's size. - * type: - * type: string - * title: type - * description: The file's type. - * arrayBuffer: - * type: object - * description: The file's arraybuffer. - * slice: - * type: object - * description: The file's slice. - * stream: - * type: object - * description: The file's stream. - * text: - * type: object - * description: The file's text. - * -*/ - diff --git a/www/utils/generated/oas-output/schemas/FileList.ts b/www/utils/generated/oas-output/schemas/FileList.ts deleted file mode 100644 index 882cf8fd41..0000000000 --- a/www/utils/generated/oas-output/schemas/FileList.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * @schema FileList - * type: object - * description: SUMMARY - * x-schemaName: FileList - * required: - * - length - * - item - * - __@iterator@258 - * properties: - * length: - * type: number - * title: length - * description: The upload's length. - * item: - * type: object - * description: The upload's item. - * __@iterator@258: - * type: object - * description: The upload's @iterator@258. - * -*/ - diff --git a/www/utils/generated/oas-output/schemas/InventoryLevel.ts b/www/utils/generated/oas-output/schemas/InventoryLevel.ts index 66df29b210..2f537ca249 100644 --- a/www/utils/generated/oas-output/schemas/InventoryLevel.ts +++ b/www/utils/generated/oas-output/schemas/InventoryLevel.ts @@ -1,7 +1,7 @@ /** * @schema InventoryLevel * type: object - * description: The inventory level's inventory levels. + * description: The inventory level's details * x-schemaName: InventoryLevel * required: * - id @@ -19,11 +19,11 @@ * inventory_item_id: * type: string * title: inventory_item_id - * description: The inventory level's inventory item id. + * description: The ID of the associated inventory item. * location_id: * type: string * title: location_id - * description: The inventory level's location id. + * description: The ID of the associated location. * stocked_quantity: * type: number * title: stocked_quantity @@ -42,7 +42,7 @@ * description: The inventory level's incoming quantity. * metadata: * type: object - * description: The inventory level's metadata. + * description: The inventory level's metadata, can hold custom key-value pairs. * */ diff --git a/www/utils/generated/oas-output/schemas/RefundReason.ts b/www/utils/generated/oas-output/schemas/RefundReason.ts new file mode 100644 index 0000000000..1629d82d76 --- /dev/null +++ b/www/utils/generated/oas-output/schemas/RefundReason.ts @@ -0,0 +1,40 @@ +/** + * @schema RefundReason + * type: object + * description: The refund's refund reason. + * x-schemaName: RefundReason + * required: + * - id + * - label + * - metadata + * - created_at + * - updated_at + * properties: + * id: + * type: string + * title: id + * description: The refund reason's ID. + * label: + * type: string + * title: label + * description: The refund reason's label. + * description: + * type: string + * title: description + * description: The refund reason's description. + * metadata: + * type: object + * description: The refund reason's metadata. + * created_at: + * type: string + * format: date-time + * title: created_at + * description: The refund reason's created at. + * updated_at: + * type: string + * format: date-time + * title: updated_at + * description: The refund reason's updated at. + * +*/ + diff --git a/www/utils/generated/oas-output/schemas/RefundReasonResponse.ts b/www/utils/generated/oas-output/schemas/RefundReasonResponse.ts index 09df8f68a7..d93ecc331b 100644 --- a/www/utils/generated/oas-output/schemas/RefundReasonResponse.ts +++ b/www/utils/generated/oas-output/schemas/RefundReasonResponse.ts @@ -1,7 +1,7 @@ /** * @schema RefundReasonResponse * type: object - * description: SUMMARY + * description: The refund reason's details. * x-schemaName: RefundReasonResponse * required: * - refund_reason diff --git a/www/utils/generated/oas-output/schemas/StoreAddCartLineItem.ts b/www/utils/generated/oas-output/schemas/StoreAddCartLineItem.ts index e6146a4bcf..fbef5c7a82 100644 --- a/www/utils/generated/oas-output/schemas/StoreAddCartLineItem.ts +++ b/www/utils/generated/oas-output/schemas/StoreAddCartLineItem.ts @@ -1,7 +1,7 @@ /** * @schema StoreAddCartLineItem * type: object - * description: SUMMARY + * description: The details of the line item to add. * x-schemaName: StoreAddCartLineItem * required: * - variant_id @@ -10,14 +10,14 @@ * variant_id: * type: string * title: variant_id - * description: The cart's variant id. + * description: The ID of the product variant to add to the cart. * quantity: * type: number * title: quantity - * description: The cart's quantity. + * description: The item's quantity. * metadata: * type: object - * description: The cart's metadata. + * description: The item's metadata, can hold custom key-value pairs. * */ diff --git a/www/utils/generated/oas-output/schemas/StoreCart.ts b/www/utils/generated/oas-output/schemas/StoreCart.ts index 661a9af3df..8aac82e9fd 100644 --- a/www/utils/generated/oas-output/schemas/StoreCart.ts +++ b/www/utils/generated/oas-output/schemas/StoreCart.ts @@ -1,7 +1,7 @@ /** * @schema StoreCart * type: object - * description: The cart's parent. + * description: The cart's details. * x-schemaName: StoreCart * required: * - id @@ -32,323 +32,148 @@ * id: * type: string * title: id - * description: The parent's ID. + * description: The cart's ID. * region: * $ref: "#/components/schemas/BaseRegion" * region_id: * type: string * title: region_id - * description: The parent's region id. + * description: The ID of the region the cart belongs to. * customer_id: * type: string * title: customer_id - * description: The parent's customer id. + * description: The ID of the customer the cart belongs to. * sales_channel_id: * type: string * title: sales_channel_id - * description: The parent's sales channel id. + * description: The ID of the cart's sales channel. Only products that belong to the same sales channel can be added to the cart. The created order will be associated with the same sales channel. * email: * type: string * title: email - * description: The parent's email. + * description: The email of the customer the cart belongs to. * format: email * currency_code: * type: string * title: currency_code - * description: The parent's currency code. + * description: The cart's currency code. + * example: usd * shipping_address: * $ref: "#/components/schemas/StoreCartAddress" * billing_address: * $ref: "#/components/schemas/StoreCartAddress" * items: * type: array - * description: The parent's items. + * description: The cart's items. * items: * $ref: "#/components/schemas/StoreCartLineItem" * shipping_methods: * type: array - * description: The parent's shipping methods. + * description: The cart's shipping methods. * items: * $ref: "#/components/schemas/BaseCartShippingMethod" * payment_collection: * $ref: "#/components/schemas/BasePaymentCollection" * metadata: * type: object - * description: The parent's metadata. + * description: The cart's metadata, can hold custom key-value pairs. * created_at: * type: string * format: date-time * title: created_at - * description: The parent's created at. + * description: The date the cart was created. * updated_at: * type: string * format: date-time * title: updated_at - * description: The parent's updated at. + * description: The date the cart was updated. * original_item_total: - * oneOf: - * - type: string - * title: original_item_total - * description: The parent's original item total. - * - type: number - * title: original_item_total - * description: The parent's original item total. - * - type: string - * title: original_item_total - * description: The parent's original item total. - * - $ref: "#/components/schemas/IBigNumber" + * type: number + * title: original_item_total + * description: The cart items' total including taxes, excluding promotions. * original_item_subtotal: - * oneOf: - * - type: string - * title: original_item_subtotal - * description: The parent's original item subtotal. - * - type: number - * title: original_item_subtotal - * description: The parent's original item subtotal. - * - type: string - * title: original_item_subtotal - * description: The parent's original item subtotal. - * - $ref: "#/components/schemas/IBigNumber" + * type: number + * title: original_item_subtotal + * description: The cart items' total excluding taxes, including promotions. * original_item_tax_total: - * oneOf: - * - type: string - * title: original_item_tax_total - * description: The parent's original item tax total. - * - type: number - * title: original_item_tax_total - * description: The parent's original item tax total. - * - type: string - * title: original_item_tax_total - * description: The parent's original item tax total. - * - $ref: "#/components/schemas/IBigNumber" + * type: number + * title: original_item_tax_total + * description: The cart items' tax total excluding promotions. * item_total: - * oneOf: - * - type: string - * title: item_total - * description: The parent's item total. - * - type: number - * title: item_total - * description: The parent's item total. - * - type: string - * title: item_total - * description: The parent's item total. - * - $ref: "#/components/schemas/IBigNumber" + * type: number + * title: item_total + * description: The cart items' total including taxes and promotions. * item_subtotal: - * oneOf: - * - type: string - * title: item_subtotal - * description: The parent's item subtotal. - * - type: number - * title: item_subtotal - * description: The parent's item subtotal. - * - type: string - * title: item_subtotal - * description: The parent's item subtotal. - * - $ref: "#/components/schemas/IBigNumber" + * type: number + * title: item_subtotal + * description: The cart items' total excluding taxes, including promotions. * item_tax_total: - * oneOf: - * - type: string - * title: item_tax_total - * description: The parent's item tax total. - * - type: number - * title: item_tax_total - * description: The parent's item tax total. - * - type: string - * title: item_tax_total - * description: The parent's item tax total. - * - $ref: "#/components/schemas/IBigNumber" + * type: number + * title: item_tax_total + * description: The cart items' tax total including promotions. * original_total: - * oneOf: - * - type: string - * title: original_total - * description: The parent's original total. - * - type: number - * title: original_total - * description: The parent's original total. - * - type: string - * title: original_total - * description: The parent's original total. - * - $ref: "#/components/schemas/IBigNumber" + * type: number + * title: original_total + * description: The cart's total including taxes, excluding promotions. * original_subtotal: - * oneOf: - * - type: string - * title: original_subtotal - * description: The parent's original subtotal. - * - type: number - * title: original_subtotal - * description: The parent's original subtotal. - * - type: string - * title: original_subtotal - * description: The parent's original subtotal. - * - $ref: "#/components/schemas/IBigNumber" + * type: number + * title: original_subtotal + * description: The cart's total excluding taxes, including promotions. * original_tax_total: - * oneOf: - * - type: string - * title: original_tax_total - * description: The parent's original tax total. - * - type: number - * title: original_tax_total - * description: The parent's original tax total. - * - type: string - * title: original_tax_total - * description: The parent's original tax total. - * - $ref: "#/components/schemas/IBigNumber" + * type: number + * title: original_tax_total + * description: The cart's tax total excluding promotions. * total: - * oneOf: - * - type: string - * title: total - * description: The parent's total. - * - type: number - * title: total - * description: The parent's total. - * - type: string - * title: total - * description: The parent's total. - * - $ref: "#/components/schemas/IBigNumber" + * type: number + * title: total + * description: The cart's total including taxes and promotions. * subtotal: - * oneOf: - * - type: string - * title: subtotal - * description: The parent's subtotal. - * - type: number - * title: subtotal - * description: The parent's subtotal. - * - type: string - * title: subtotal - * description: The parent's subtotal. - * - $ref: "#/components/schemas/IBigNumber" + * type: number + * title: subtotal + * description: The cart's total excluding taxes, including promotions. * tax_total: - * oneOf: - * - type: string - * title: tax_total - * description: The parent's tax total. - * - type: number - * title: tax_total - * description: The parent's tax total. - * - type: string - * title: tax_total - * description: The parent's tax total. - * - $ref: "#/components/schemas/IBigNumber" + * type: number + * title: tax_total + * description: The cart's tax total including promotions. * discount_total: - * oneOf: - * - type: string - * title: discount_total - * description: The parent's discount total. - * - type: number - * title: discount_total - * description: The parent's discount total. - * - type: string - * title: discount_total - * description: The parent's discount total. - * - $ref: "#/components/schemas/IBigNumber" + * type: number + * title: discount_total + * description: The cart's discount total. * discount_tax_total: - * oneOf: - * - type: string - * title: discount_tax_total - * description: The parent's discount tax total. - * - type: number - * title: discount_tax_total - * description: The parent's discount tax total. - * - type: string - * title: discount_tax_total - * description: The parent's discount tax total. - * - $ref: "#/components/schemas/IBigNumber" + * type: number + * title: discount_tax_total + * description: The tax total applied on the discounted amount. * gift_card_total: - * oneOf: - * - type: string - * title: gift_card_total - * description: The parent's gift card total. - * - type: number - * title: gift_card_total - * description: The parent's gift card total. - * - type: string - * title: gift_card_total - * description: The parent's gift card total. - * - $ref: "#/components/schemas/IBigNumber" + * type: number + * title: gift_card_total + * description: The total gift card amount applied on the cart. * gift_card_tax_total: - * oneOf: - * - type: string - * title: gift_card_tax_total - * description: The parent's gift card tax total. - * - type: number - * title: gift_card_tax_total - * description: The parent's gift card tax total. - * - type: string - * title: gift_card_tax_total - * description: The parent's gift card tax total. - * - $ref: "#/components/schemas/IBigNumber" + * type: number + * title: gift_card_tax_total + * description: The total taxes applied on the gift card amount. * shipping_total: - * oneOf: - * - type: string - * title: shipping_total - * description: The parent's shipping total. - * - type: number - * title: shipping_total - * description: The parent's shipping total. - * - type: string - * title: shipping_total - * description: The parent's shipping total. - * - $ref: "#/components/schemas/IBigNumber" + * type: number + * title: shipping_total + * description: The cart's shipping total including taxes and promotions. * shipping_subtotal: - * oneOf: - * - type: string - * title: shipping_subtotal - * description: The parent's shipping subtotal. - * - type: number - * title: shipping_subtotal - * description: The parent's shipping subtotal. - * - type: string - * title: shipping_subtotal - * description: The parent's shipping subtotal. - * - $ref: "#/components/schemas/IBigNumber" + * type: number + * title: shipping_subtotal + * description: The cart's shipping total excluding taxes, including promotions. * shipping_tax_total: - * oneOf: - * - type: string - * title: shipping_tax_total - * description: The parent's shipping tax total. - * - type: number - * title: shipping_tax_total - * description: The parent's shipping tax total. - * - type: string - * title: shipping_tax_total - * description: The parent's shipping tax total. - * - $ref: "#/components/schemas/IBigNumber" + * type: number + * title: shipping_tax_total + * description: The total taxes applied on the cart's shipping amount. * original_shipping_total: - * oneOf: - * - type: string - * title: original_shipping_total - * description: The parent's original shipping total. - * - type: number - * title: original_shipping_total - * description: The parent's original shipping total. - * - type: string - * title: original_shipping_total - * description: The parent's original shipping total. - * - $ref: "#/components/schemas/IBigNumber" + * type: number + * title: original_shipping_total + * description: The cart's shipping total including taxes, excluding promotions. * original_shipping_subtotal: - * oneOf: - * - type: string - * title: original_shipping_subtotal - * description: The parent's original shipping subtotal. - * - type: number - * title: original_shipping_subtotal - * description: The parent's original shipping subtotal. - * - type: string - * title: original_shipping_subtotal - * description: The parent's original shipping subtotal. - * - $ref: "#/components/schemas/IBigNumber" + * type: number + * title: original_shipping_subtotal + * description: The cart's shipping total excluding taxes, including promotions. * original_shipping_tax_total: - * oneOf: - * - type: string - * title: original_shipping_tax_total - * description: The parent's original shipping tax total. - * - type: number - * title: original_shipping_tax_total - * description: The parent's original shipping tax total. - * - type: string - * title: original_shipping_tax_total - * description: The parent's original shipping tax total. - * - $ref: "#/components/schemas/IBigNumber" + * type: number + * title: original_shipping_tax_total + * description: The total taxes applied on the cart's shipping amount. * */ diff --git a/www/utils/generated/oas-output/schemas/StoreCartAddress.ts b/www/utils/generated/oas-output/schemas/StoreCartAddress.ts index 40a384a435..30315c091f 100644 --- a/www/utils/generated/oas-output/schemas/StoreCartAddress.ts +++ b/www/utils/generated/oas-output/schemas/StoreCartAddress.ts @@ -1,7 +1,7 @@ /** * @schema StoreCartAddress * type: object - * description: The cart's billing address. + * description: The address's details. * x-schemaName: StoreCartAddress * required: * - id @@ -11,72 +11,65 @@ * id: * type: string * title: id - * description: The billing address's ID. + * description: The address's ID. * customer_id: * type: string * title: customer_id - * description: The billing address's customer id. + * description: The ID of the customer the address belongs to. * first_name: * type: string * title: first_name - * description: The billing address's first name. + * description: The address's first name. * last_name: * type: string * title: last_name - * description: The billing address's last name. + * description: The address's last name. * phone: * type: string * title: phone - * description: The billing address's phone. + * description: The address's phone. * company: * type: string * title: company - * description: The billing address's company. + * description: The address's company. * address_1: * type: string * title: address_1 - * description: The billing address's address 1. + * description: The address's first line. * address_2: * type: string * title: address_2 - * description: The billing address's address 2. + * description: The address's second line. * city: * type: string * title: city - * description: The billing address's city. + * description: The address's city. * country_code: * type: string * title: country_code - * description: The billing address's country code. + * description: The address's country code. + * example: us * province: * type: string * title: province - * description: The billing address's province. + * description: The address's province. * postal_code: * type: string * title: postal_code - * description: The billing address's postal code. + * description: The address's postal code. * metadata: * type: object - * description: The billing address's metadata. + * description: The address's metadata, can hold custom key-value pairs. * created_at: - * oneOf: - * - type: string - * title: created_at - * description: The billing address's created at. - * - type: string - * title: created_at - * description: The billing address's created at. - * format: date-time + * type: string + * title: created_at + * description: The date the address was created. + * format: date-time * updated_at: - * oneOf: - * - type: string - * title: updated_at - * description: The billing address's updated at. - * - type: string - * title: updated_at - * description: The billing address's updated at. - * format: date-time + * type: string + * title: updated_at + * description: The date the address was updated. + * format: date-time * */ diff --git a/www/utils/generated/oas-output/schemas/StoreCartLineItem.ts b/www/utils/generated/oas-output/schemas/StoreCartLineItem.ts index 6590e7cc81..c28f33d6fc 100644 --- a/www/utils/generated/oas-output/schemas/StoreCartLineItem.ts +++ b/www/utils/generated/oas-output/schemas/StoreCartLineItem.ts @@ -1,7 +1,7 @@ /** * @schema StoreCartLineItem * type: object - * description: The item's items. + * description: The item's details. * x-schemaName: StoreCartLineItem * required: * - id @@ -40,25 +40,17 @@ * thumbnail: * type: string * title: thumbnail - * description: The item's thumbnail. + * description: The item's thumbnail URL. * quantity: - * oneOf: - * - type: string - * title: quantity - * description: The item's quantity. - * - type: number - * title: quantity - * description: The item's quantity. - * - type: string - * title: quantity - * description: The item's quantity. - * - $ref: "#/components/schemas/IBigNumber" + * type: number + * title: quantity + * description: The item's quantity. * product: * $ref: "#/components/schemas/StoreProduct" * product_id: * type: string * title: product_id - * description: The item's product id. + * description: The ID of the associated product. * product_title: * type: string * title: product_title @@ -74,11 +66,11 @@ * product_type: * type: string * title: product_type - * description: The item's product type. + * description: The ID of the associated product's type. * product_collection: * type: string * title: product_collection - * description: The item's product collection. + * description: The ID of the associated product's collection. * product_handle: * type: string * title: product_handle @@ -88,11 +80,11 @@ * variant_id: * type: string * title: variant_id - * description: The item's variant id. + * description: The ID of the associated product variant. * variant_sku: * type: string * title: variant_sku - * description: The item's variant sku. + * description: The item's variant SKU. * variant_barcode: * type: string * title: variant_barcode @@ -103,43 +95,29 @@ * description: The item's variant title. * variant_option_values: * type: object - * description: The item's variant option values. + * description: The associated variant's value for the product's options. + * example: + * Color: Red * requires_shipping: * type: boolean * title: requires_shipping - * description: The item's requires shipping. + * description: Whether the item requires shipping. * is_discountable: * type: boolean * title: is_discountable - * description: The item's is discountable. + * description: Whether the item is discountable. * is_tax_inclusive: * type: boolean * title: is_tax_inclusive - * description: The item's is tax inclusive. + * description: Whether the item's price includes taxes. * compare_at_unit_price: - * oneOf: - * - type: string - * title: compare_at_unit_price - * description: The item's compare at unit price. - * - type: number - * title: compare_at_unit_price - * description: The item's compare at unit price. - * - type: string - * title: compare_at_unit_price - * description: The item's compare at unit price. - * - $ref: "#/components/schemas/IBigNumber" + * type: number + * title: compare_at_unit_price + * description: The original price of the item before a promotion or sale. * unit_price: - * oneOf: - * - type: string - * title: unit_price - * description: The item's unit price. - * - type: number - * title: unit_price - * description: The item's unit price. - * - type: string - * title: unit_price - * description: The item's unit price. - * - $ref: "#/components/schemas/IBigNumber" + * type: number + * title: unit_price + * description: The price of a single quantity of the item. * tax_lines: * type: array * description: The item's tax lines. @@ -155,157 +133,69 @@ * cart_id: * type: string * title: cart_id - * description: The item's cart id. + * description: The ID of the cart that the line item belongs to. * metadata: * type: object - * description: The item's metadata. + * description: The item's metadata, can hold custom key-value pairs. * created_at: * type: string * title: created_at - * description: The item's created at. + * description: The date the item was created. * format: date-time * updated_at: * type: string * title: updated_at - * description: The item's updated at. + * description: The date the item was updated. * format: date-time * deleted_at: * type: string * title: deleted_at - * description: The item's deleted at. + * description: The date the item was deleted. * format: date-time * original_total: - * oneOf: - * - type: string - * title: original_total - * description: The item's original total. - * - type: number - * title: original_total - * description: The item's original total. - * - type: string - * title: original_total - * description: The item's original total. - * - $ref: "#/components/schemas/IBigNumber" + * type: number + * title: original_total + * description: The item's total including taxes, excluding promotions. * original_subtotal: - * oneOf: - * - type: string - * title: original_subtotal - * description: The item's original subtotal. - * - type: number - * title: original_subtotal - * description: The item's original subtotal. - * - type: string - * title: original_subtotal - * description: The item's original subtotal. - * - $ref: "#/components/schemas/IBigNumber" + * type: number + * title: original_subtotal + * description: The item's total excluding taxes, including promotions. * original_tax_total: - * oneOf: - * - type: string - * title: original_tax_total - * description: The item's original tax total. - * - type: number - * title: original_tax_total - * description: The item's original tax total. - * - type: string - * title: original_tax_total - * description: The item's original tax total. - * - $ref: "#/components/schemas/IBigNumber" + * type: number + * title: original_tax_total + * description: The total taxes of the item excluding promotions. * item_total: - * oneOf: - * - type: string - * title: item_total - * description: The item's item total. - * - type: number - * title: item_total - * description: The item's item total. - * - type: string - * title: item_total - * description: The item's item total. - * - $ref: "#/components/schemas/IBigNumber" + * type: number + * title: original_tax_total + * description: The item's total including taxes and promotions. * item_subtotal: - * oneOf: - * - type: string - * title: item_subtotal - * description: The item's item subtotal. - * - type: number - * title: item_subtotal - * description: The item's item subtotal. - * - type: string - * title: item_subtotal - * description: The item's item subtotal. - * - $ref: "#/components/schemas/IBigNumber" + * type: number + * title: item_subtotal + * description: The item's total excluding taxes, including promotions. * item_tax_total: - * oneOf: - * - type: string - * title: item_tax_total - * description: The item's item tax total. - * - type: number - * title: item_tax_total - * description: The item's item tax total. - * - type: string - * title: item_tax_total - * description: The item's item tax total. - * - $ref: "#/components/schemas/IBigNumber" + * type: number + * title: item_tax_total + * description: The total taxes of the item including promotions. * total: - * oneOf: - * - type: string - * title: total - * description: The item's total. - * - type: number - * title: total - * description: The item's total. - * - type: string - * title: total - * description: The item's total. - * - $ref: "#/components/schemas/IBigNumber" + * type: number + * title: total + * description: The item's total including taxes and promotions. * subtotal: - * oneOf: - * - type: string - * title: subtotal - * description: The item's subtotal. - * - type: number - * title: subtotal - * description: The item's subtotal. - * - type: string - * title: subtotal - * description: The item's subtotal. - * - $ref: "#/components/schemas/IBigNumber" + * type: number + * title: subtotal + * description: The item's total excluding taxes, including promotions. * tax_total: - * oneOf: - * - type: string - * title: tax_total - * description: The item's tax total. - * - type: number - * title: tax_total - * description: The item's tax total. - * - type: string - * title: tax_total - * description: The item's tax total. - * - $ref: "#/components/schemas/IBigNumber" + * type: number + * title: tax_total + * description: The total taxes of the item including promotions. * discount_total: - * oneOf: - * - type: string - * title: discount_total - * description: The item's discount total. - * - type: number - * title: discount_total - * description: The item's discount total. - * - type: string - * title: discount_total - * description: The item's discount total. - * - $ref: "#/components/schemas/IBigNumber" + * type: number + * title: discount_total + * description: The total discount of the item. * discount_tax_total: - * oneOf: - * - type: string - * title: discount_tax_total - * description: The item's discount tax total. - * - type: number - * title: discount_tax_total - * description: The item's discount tax total. - * - type: string - * title: discount_tax_total - * description: The item's discount tax total. - * - $ref: "#/components/schemas/IBigNumber" + * type: number + * title: discount_tax_total + * description: The total taxes applied on the discounted amount. * */ diff --git a/www/utils/generated/oas-output/schemas/StoreCartResponse.ts b/www/utils/generated/oas-output/schemas/StoreCartResponse.ts index 561d57bbf0..e82afbb771 100644 --- a/www/utils/generated/oas-output/schemas/StoreCartResponse.ts +++ b/www/utils/generated/oas-output/schemas/StoreCartResponse.ts @@ -1,7 +1,7 @@ /** * @schema StoreCartResponse * type: object - * description: SUMMARY + * description: The cart's details. * x-schemaName: StoreCartResponse * required: * - cart diff --git a/www/utils/generated/oas-output/schemas/StoreCartShippingMethod.ts b/www/utils/generated/oas-output/schemas/StoreCartShippingMethod.ts new file mode 100644 index 0000000000..7dcb01b665 --- /dev/null +++ b/www/utils/generated/oas-output/schemas/StoreCartShippingMethod.ts @@ -0,0 +1,113 @@ +/** + * @schema StoreCartShippingMethod + * type: object + * description: A cart's shipping method. + * x-schemaName: StoreCartShippingMethod + * required: + * - id + * - cart_id + * - name + * - amount + * - is_tax_inclusive + * - created_at + * - updated_at + * - original_total + * - original_subtotal + * - original_tax_total + * - total + * - subtotal + * - tax_total + * - discount_total + * - discount_tax_total + * properties: + * id: + * type: string + * title: id + * description: The shipping method's ID. + * cart_id: + * type: string + * title: cart_id + * description: The ID of the cart this shipping method belongs to. + * name: + * type: string + * title: name + * description: The shipping method's name. + * description: + * type: string + * title: description + * description: The shipping method's description. + * amount: + * type: number + * title: amount + * description: The shipping method's amount. + * is_tax_inclusive: + * type: boolean + * title: is_tax_inclusive + * description: Whether the shipping method's amount is tax inclusive. + * shipping_option_id: + * type: string + * title: shipping_option_id + * description: The ID of the shipping option this method was created from. + * data: + * type: object + * description: The shipping method's data, useful for fulfillment handling by third-party services. + * externalDocs: + * url: https://docs.medusajs.com/v2/resources/commerce-modules/cart/concepts#data-property + * metadata: + * type: object + * description: The shipping method's metadata, can hold custom key-value pairs. + * tax_lines: + * type: array + * description: The shipping method's tax lines. + * items: + * $ref: "#/components/schemas/BaseShippingMethodTaxLine" + * adjustments: + * type: array + * description: The shipping method's adjustments, such as applied promotions. + * items: + * $ref: "#/components/schemas/BaseShippingMethodAdjustment" + * created_at: + * type: string + * format: date-time + * title: created_at + * description: The date the shipping method was created. + * updated_at: + * type: string + * format: date-time + * title: updated_at + * description: The date the shipping method was updated. + * original_total: + * type: number + * title: original_total + * description: The shipping method's total including taxes, excluding promotions. + * original_subtotal: + * type: number + * title: original_subtotal + * description: The shipping method's total excluding taxes, including promotions. + * original_tax_total: + * type: number + * title: original_tax_total + * description: The total taxes applied on the shipping method's amount including promotions. + * total: + * type: number + * title: total + * description: The shipping method's total amount including taxes and promotions. + * subtotal: + * type: number + * title: subtotal + * description: The shipping method's total amount excluding taxes, including promotions. + * tax_total: + * type: number + * title: tax_total + * description: The total taxes applied on the shipping method's amount including promotions. + * discount_total: + * type: number + * title: discount_total + * description: The total amount discounted. + * discount_tax_total: + * type: number + * title: discount_tax_total + * description: The taxes applied on the discounted amount. + * +*/ + diff --git a/www/utils/generated/oas-output/schemas/StorePaymentSession.ts b/www/utils/generated/oas-output/schemas/StorePaymentSession.ts new file mode 100644 index 0000000000..d92517147c --- /dev/null +++ b/www/utils/generated/oas-output/schemas/StorePaymentSession.ts @@ -0,0 +1,63 @@ +/** + * @schema StorePaymentSession + * type: object + * description: The payment session's details. + * x-schemaName: StorePaymentSession + * properties: + * id: + * type: string + * title: id + * description: The payment session's ID. + * amount: + * type: number + * title: amount + * description: The payment session's amount. + * currency_code: + * type: string + * title: currency_code + * description: The payment session's currency code. + * example: usd + * provider_id: + * type: string + * title: provider_id + * description: The ID of the payment provider processing this session. + * data: + * type: object + * description: The payment session's data, useful for the payment provider processing the payment. + * externalDocs: + * url: https://docs.medusajs.com/v2/resources/commerce-modules/payment/payment-session#data-property + * context: + * type: object + * description: The context around the payment, such as the customer's details. + * example: + * customer: + * id: cus_123 + * status: + * type: string + * description: The payment session's status. + * enum: + * - authorized + * - captured + * - canceled + * - pending + * - requires_more + * - error + * authorized_at: + * type: string + * title: authorized_at + * description: The date the payment session was authorized. + * format: date-time + * payment_collection: + * $ref: "#/components/schemas/StorePaymentCollection" + * payment: + * $ref: "#/components/schemas/BasePayment" + * required: + * - id + * - amount + * - currency_code + * - provider_id + * - data + * - status + * +*/ + diff --git a/www/utils/generated/oas-output/schemas/StoreProductImage.ts b/www/utils/generated/oas-output/schemas/StoreProductImage.ts new file mode 100644 index 0000000000..0892479bb1 --- /dev/null +++ b/www/utils/generated/oas-output/schemas/StoreProductImage.ts @@ -0,0 +1,38 @@ +/** + * @schema StoreProductImage + * type: object + * description: The image's details. + * x-schemaName: StoreProductImage + * properties: + * id: + * type: string + * title: id + * description: The image's ID. + * url: + * type: string + * title: url + * description: The image's URL. + * created_at: + * type: string + * format: date-time + * title: created_at + * description: The date the image was created. + * updated_at: + * type: string + * format: date-time + * title: updated_at + * description: The date the image was updated. + * deleted_at: + * type: string + * format: date-time + * title: deleted_at + * description: The date the image was deleted. + * metadata: + * type: object + * description: The image's metadata, can hold custom key-value pairs. + * required: + * - id + * - url + * +*/ + diff --git a/www/utils/generated/oas-output/schemas/StoreProductOption.ts b/www/utils/generated/oas-output/schemas/StoreProductOption.ts new file mode 100644 index 0000000000..3d2a558c9a --- /dev/null +++ b/www/utils/generated/oas-output/schemas/StoreProductOption.ts @@ -0,0 +1,49 @@ +/** + * @schema StoreProductOption + * type: object + * description: The product option's details. + * x-schemaName: StoreProductOption + * properties: + * id: + * type: string + * title: id + * description: The option's ID. + * title: + * type: string + * title: title + * description: The option's title. + * product: + * $ref: "#/components/schemas/StoreProduct" + * product_id: + * type: string + * title: product_id + * description: The option's product id. + * values: + * type: array + * description: The option's values. + * items: + * $ref: "#/components/schemas/StoreProductOptionValue" + * metadata: + * type: object + * description: The option's metadata. + * created_at: + * type: string + * format: date-time + * title: created_at + * description: The option's created at. + * updated_at: + * type: string + * format: date-time + * title: updated_at + * description: The option's updated at. + * deleted_at: + * type: string + * format: date-time + * title: deleted_at + * description: The option's deleted at. + * required: + * - id + * - title + * +*/ + diff --git a/www/utils/generated/oas-output/schemas/StoreProductOptionValue.ts b/www/utils/generated/oas-output/schemas/StoreProductOptionValue.ts new file mode 100644 index 0000000000..7100b32829 --- /dev/null +++ b/www/utils/generated/oas-output/schemas/StoreProductOptionValue.ts @@ -0,0 +1,44 @@ +/** + * @schema StoreProductOptionValue + * type: object + * description: The product option value's details. + * x-schemaName: StoreProductOptionValue + * required: + * - id + * - value + * properties: + * id: + * type: string + * title: id + * description: The value's ID. + * value: + * type: string + * title: value + * description: The value. + * option: + * $ref: "#/components/schemas/StoreProductOption" + * option_id: + * type: string + * title: option_id + * description: The ID of the option this value belongs to. + * metadata: + * type: object + * description: The value's metadata, can hold custom key-value pairs. + * created_at: + * type: string + * format: date-time + * title: created_at + * description: The date the value was created. + * updated_at: + * type: string + * format: date-time + * title: updated_at + * description: The date the value was updated. + * deleted_at: + * type: string + * format: date-time + * title: deleted_at + * description: The date the value was deleted. + * +*/ + diff --git a/www/utils/generated/oas-output/schemas/StoreProductTag.ts b/www/utils/generated/oas-output/schemas/StoreProductTag.ts new file mode 100644 index 0000000000..f2678d1006 --- /dev/null +++ b/www/utils/generated/oas-output/schemas/StoreProductTag.ts @@ -0,0 +1,40 @@ +/** + * @schema StoreProductTag + * type: object + * description: The tag's tags. + * x-schemaName: StoreProductTag + * properties: + * id: + * type: string + * title: id + * description: The tag's ID. + * value: + * type: string + * title: value + * description: The tag's value. + * created_at: + * type: string + * format: date-time + * title: created_at + * description: The tag's created at. + * updated_at: + * type: string + * format: date-time + * title: updated_at + * description: The tag's updated at. + * deleted_at: + * type: string + * format: date-time + * title: deleted_at + * description: The tag's deleted at. + * metadata: + * type: object + * description: The tag's metadata. + * required: + * - id + * - value + * - created_at + * - updated_at + * +*/ + diff --git a/www/utils/generated/oas-output/schemas/StoreProductVariant.ts b/www/utils/generated/oas-output/schemas/StoreProductVariant.ts new file mode 100644 index 0000000000..f36d2becb5 --- /dev/null +++ b/www/utils/generated/oas-output/schemas/StoreProductVariant.ts @@ -0,0 +1,133 @@ +/** + * @schema StoreProductVariant + * type: object + * description: The variant's variants. + * x-schemaName: StoreProductVariant + * properties: + * options: + * type: array + * description: The variant's options. + * items: + * $ref: "#/components/schemas/StoreProductOptionValue" + * product: + * $ref: "#/components/schemas/StoreProduct" + * id: + * type: string + * title: id + * description: The variant's ID. + * metadata: + * type: object + * description: The variant's metadata. + * created_at: + * type: string + * format: date-time + * title: created_at + * description: The variant's created at. + * updated_at: + * type: string + * format: date-time + * title: updated_at + * description: The variant's updated at. + * title: + * type: string + * title: title + * description: The variant's title. + * product_id: + * type: string + * title: product_id + * description: The variant's product id. + * deleted_at: + * type: string + * format: date-time + * title: deleted_at + * description: The variant's deleted at. + * width: + * type: number + * title: width + * description: The variant's width. + * weight: + * type: number + * title: weight + * description: The variant's weight. + * length: + * type: number + * title: length + * description: The variant's length. + * height: + * type: number + * title: height + * description: The variant's height. + * origin_country: + * type: string + * title: origin_country + * description: The variant's origin country. + * hs_code: + * type: string + * title: hs_code + * description: The variant's hs code. + * mid_code: + * type: string + * title: mid_code + * description: The variant's mid code. + * material: + * type: string + * title: material + * description: The variant's material. + * sku: + * type: string + * title: sku + * description: The variant's sku. + * barcode: + * type: string + * title: barcode + * description: The variant's barcode. + * ean: + * type: string + * title: ean + * description: The variant's ean. + * upc: + * type: string + * title: upc + * description: The variant's upc. + * allow_backorder: + * oneOf: + * - {} + * - {} + * manage_inventory: + * oneOf: + * - {} + * - {} + * inventory_quantity: + * type: number + * title: inventory_quantity + * description: The variant's inventory quantity. + * variant_rank: + * type: number + * title: variant_rank + * description: The variant's variant rank. + * calculated_price: + * $ref: "#/components/schemas/BaseCalculatedPriceSet" + * required: + * - options + * - id + * - created_at + * - updated_at + * - title + * - deleted_at + * - width + * - weight + * - length + * - height + * - origin_country + * - hs_code + * - mid_code + * - material + * - sku + * - barcode + * - ean + * - upc + * - allow_backorder + * - manage_inventory + * +*/ + diff --git a/www/utils/packages/docs-generator/src/classes/helpers/schema-factory.ts b/www/utils/packages/docs-generator/src/classes/helpers/schema-factory.ts index 2e3a37b983..26366c7167 100644 --- a/www/utils/packages/docs-generator/src/classes/helpers/schema-factory.ts +++ b/www/utils/packages/docs-generator/src/classes/helpers/schema-factory.ts @@ -37,6 +37,26 @@ class SchemaFactory { BigNumberValue: { type: "number", }, + File: { + type: "object", + description: "A File to upload.", + externalDocs: { + url: "https://developer.mozilla.org/en-US/docs/Web/API/File", + description: "Learn more about the File API", + }, + }, + FileList: { + type: "array", + description: "list of files to upload.", + items: { + type: "object", + description: "A File to upload.", + externalDocs: { + url: "https://developer.mozilla.org/en-US/docs/Web/API/File", + description: "Learn more about the File API", + }, + }, + }, } /** * Schemas used only for response types.