From c6c660c4d39da102d0912bbabc24d93e15e8ab23 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 13 May 2025 13:43:58 +0000 Subject: [PATCH] chore(docs): Updated API Reference (automated) (#12461) Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com> Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com> --- .../generated/generated-admin-sidebar.mjs | 18 + .../generated/generated-store-sidebar.mjs | 12 +- .../JavaScript/admin_tax-providers/get.js | 14 + .../Shell/admin_tax-providers/get.sh | 2 + .../schemas/AdminClaimListResponse.yaml | 7 + .../schemas/AdminCollectionListResponse.yaml | 7 + .../schemas/AdminCreateCollection.yaml | 17 - .../schemas/AdminCreateTaxRegion.yaml | 6 + .../schemas/AdminCurrencyListResponse.yaml | 7 + .../schemas/AdminDraftOrderListResponse.yaml | 7 + .../AdminFulfillmentProviderListResponse.yaml | 7 + ...ulfillmentProviderOptionsListResponse.yaml | 7 + .../AdminNotificationListResponse.yaml | 7 + .../schemas/AdminPriceListListResponse.yaml | 7 + .../AdminPricePreferenceListResponse.yaml | 7 + .../AdminProductCategoryListResponse.yaml | 7 + .../schemas/AdminProductTagListResponse.yaml | 7 + .../schemas/AdminProductTypeListResponse.yaml | 7 + .../AdminReturnReasonListResponse.yaml | 7 + .../AdminStockLocationListResponse.yaml | 7 + .../schemas/AdminStoreListResponse.yaml | 7 + .../components/schemas/AdminTaxProvider.yaml | 16 + .../schemas/AdminUpdateCollection.yaml | 15 - .../schemas/AdminUpdateTaxRegion.yaml | 6 + .../schemas/AdminUserListResponse.yaml | 7 + .../components/schemas/BaseOrderAddress.yaml | 2 +- .../schemas/StoreCurrencyListResponse.yaml | 7 + .../StoreCustomerAddressListResponse.yaml | 7 + .../StoreProductCategoryListResponse.yaml | 7 + .../schemas/StoreProductTagListResponse.yaml | 7 + .../schemas/StoreProductTypeListResponse.yaml | 7 + .../admin/components/schemas/StoreReturn.yaml | 77 +-- .../components/schemas/StoreReturnItem.yaml | 14 +- .../specs/admin/openapi.full.yaml | 558 +++++++++++++++--- .../api-reference/specs/admin/openapi.yaml | 14 + .../specs/admin/paths/admin_collections.yaml | 28 +- .../admin/paths/admin_collections_{id}.yaml | 26 +- .../admin/paths/admin_order-edits_{id}.yaml | 14 +- .../paths/admin_order-edits_{id}_confirm.yaml | 12 + .../paths/admin_order-edits_{id}_request.yaml | 12 + .../admin/paths/admin_tax-providers.yaml | 187 ++++++ .../admin/paths/admin_tax-regions_{id}.yaml | 29 + .../paths/admin_workflows-executions.yaml | 8 + .../{store_return => store_returns}/post.sh | 6 +- .../schemas/AdminClaimListResponse.yaml | 7 + .../schemas/AdminCollectionListResponse.yaml | 7 + .../schemas/AdminCreateCollection.yaml | 17 - .../schemas/AdminCreateTaxRegion.yaml | 6 + .../schemas/AdminCurrencyListResponse.yaml | 7 + .../schemas/AdminDraftOrderListResponse.yaml | 7 + .../AdminFulfillmentProviderListResponse.yaml | 7 + ...ulfillmentProviderOptionsListResponse.yaml | 7 + .../AdminNotificationListResponse.yaml | 7 + .../schemas/AdminPriceListListResponse.yaml | 7 + .../AdminPricePreferenceListResponse.yaml | 7 + .../AdminProductCategoryListResponse.yaml | 7 + .../schemas/AdminProductTagListResponse.yaml | 7 + .../schemas/AdminProductTypeListResponse.yaml | 7 + .../AdminReturnReasonListResponse.yaml | 7 + .../AdminStockLocationListResponse.yaml | 7 + .../schemas/AdminStoreListResponse.yaml | 7 + .../components/schemas/AdminTaxProvider.yaml | 16 + .../schemas/AdminUpdateCollection.yaml | 15 - .../schemas/AdminUpdateTaxRegion.yaml | 6 + .../schemas/AdminUserListResponse.yaml | 7 + .../components/schemas/BaseOrderAddress.yaml | 2 +- .../schemas/StoreCurrencyListResponse.yaml | 7 + .../StoreCustomerAddressListResponse.yaml | 7 + .../StoreProductCategoryListResponse.yaml | 7 + .../schemas/StoreProductTagListResponse.yaml | 7 + .../schemas/StoreProductTypeListResponse.yaml | 7 + .../store/components/schemas/StoreReturn.yaml | 77 +-- .../components/schemas/StoreReturnItem.yaml | 14 +- .../specs/store/openapi.full.yaml | 426 ++++++++----- .../api-reference/specs/store/openapi.yaml | 6 +- .../paths/store_carts_{id}_customer.yaml | 13 +- .../{store_return.yaml => store_returns.yaml} | 46 +- .../components/FeatureFlagNotice/index.tsx | 10 +- .../oas-output/base/admin.oas.base.yaml | 14 +- .../oas-output/base/store.oas.base.yaml | 4 +- .../admin/delete_admin_order-edits_[id].ts | 14 +- .../admin/get_admin_tax-providers.ts | 179 ++++++ .../admin/get_admin_tax-regions_[id].ts | 23 + .../admin/get_admin_workflows-executions.ts | 8 + .../admin/post_admin_collections.ts | 25 +- .../admin/post_admin_collections_[id].ts | 23 +- .../post_admin_order-edits_[id]_confirm.ts | 12 + .../post_admin_order-edits_[id]_request.ts | 12 + .../store/post_store_carts_[id]_customer.ts | 13 +- ..._store_return.ts => post_store_returns.ts} | 52 +- .../schemas/AdminClaimListResponse.ts | 5 + .../schemas/AdminCollectionListResponse.ts | 5 + .../schemas/AdminCreateCollection.ts | 22 - .../schemas/AdminCreateFulfillment.ts | 2 +- .../schemas/AdminCreateTaxRegion.ts | 6 +- .../schemas/AdminCurrencyListResponse.ts | 5 + .../schemas/AdminCustomerAddress.ts | 2 +- .../schemas/AdminDraftOrderListResponse.ts | 5 + .../schemas/AdminFulfillmentAddress.ts | 2 +- .../AdminFulfillmentProviderListResponse.ts | 5 + ...nFulfillmentProviderOptionsListResponse.ts | 5 + .../oas-output/schemas/AdminGeoZone.ts | 2 +- .../schemas/AdminNotificationListResponse.ts | 5 + .../oas-output/schemas/AdminOrderAddress.ts | 2 +- .../schemas/AdminPriceListListResponse.ts | 5 + .../AdminPricePreferenceListResponse.ts | 5 + .../AdminProductCategoryListResponse.ts | 5 + .../schemas/AdminProductTagListResponse.ts | 5 + .../schemas/AdminProductTypeListResponse.ts | 5 + .../schemas/AdminReturnReasonListResponse.ts | 5 + .../schemas/AdminStockLocationAddress.ts | 2 +- .../schemas/AdminStockLocationListResponse.ts | 5 + .../schemas/AdminStoreListResponse.ts | 5 + .../oas-output/schemas/AdminTaxProvider.ts | 21 + .../oas-output/schemas/AdminTaxRegion.ts | 2 +- .../schemas/AdminUpdateCollection.ts | 20 - .../schemas/AdminUpdateDraftOrder.ts | 4 +- .../oas-output/schemas/AdminUpdateOrder.ts | 4 +- .../schemas/AdminUpdateStockLocation.ts | 2 +- .../schemas/AdminUpdateTaxRegion.ts | 6 +- .../AdminUpsertStockLocationAddress.ts | 2 +- .../schemas/AdminUserListResponse.ts | 5 + .../oas-output/schemas/BaseOrderAddress.ts | 2 +- .../oas-output/schemas/OrderAddress.ts | 2 +- .../oas-output/schemas/StoreCartAddress.ts | 2 +- .../schemas/StoreCurrencyListResponse.ts | 5 + .../schemas/StoreCustomerAddress.ts | 2 +- .../StoreCustomerAddressListResponse.ts | 5 + .../oas-output/schemas/StoreOrderAddress.ts | 2 +- .../StoreProductCategoryListResponse.ts | 5 + .../schemas/StoreProductTagListResponse.ts | 5 + .../schemas/StoreProductTypeListResponse.ts | 5 + .../oas-output/schemas/StoreReturn.ts | 77 +-- .../oas-output/schemas/StoreReturnItem.ts | 14 +- .../route-examples-output/route-examples.json | 20 +- 135 files changed, 2202 insertions(+), 545 deletions(-) create mode 100644 www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_tax-providers/get.js create mode 100644 www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-providers/get.sh delete mode 100644 www/apps/api-reference/specs/admin/components/schemas/AdminCreateCollection.yaml create mode 100644 www/apps/api-reference/specs/admin/components/schemas/AdminTaxProvider.yaml delete mode 100644 www/apps/api-reference/specs/admin/components/schemas/AdminUpdateCollection.yaml create mode 100644 www/apps/api-reference/specs/admin/paths/admin_tax-providers.yaml rename www/apps/api-reference/specs/store/code_samples/Shell/{store_return => store_returns}/post.sh (84%) delete mode 100644 www/apps/api-reference/specs/store/components/schemas/AdminCreateCollection.yaml create mode 100644 www/apps/api-reference/specs/store/components/schemas/AdminTaxProvider.yaml delete mode 100644 www/apps/api-reference/specs/store/components/schemas/AdminUpdateCollection.yaml rename www/apps/api-reference/specs/store/paths/{store_return.yaml => store_returns.yaml} (65%) create mode 100644 www/utils/generated/oas-output/operations/admin/get_admin_tax-providers.ts rename www/utils/generated/oas-output/operations/store/{post_store_return.ts => post_store_returns.ts} (70%) delete mode 100644 www/utils/generated/oas-output/schemas/AdminCreateCollection.ts create mode 100644 www/utils/generated/oas-output/schemas/AdminTaxProvider.ts delete mode 100644 www/utils/generated/oas-output/schemas/AdminUpdateCollection.ts diff --git a/www/apps/api-reference/generated/generated-admin-sidebar.mjs b/www/apps/api-reference/generated/generated-admin-sidebar.mjs index ccc899c9f3..3f67e18252 100644 --- a/www/apps/api-reference/generated/generated-admin-sidebar.mjs +++ b/www/apps/api-reference/generated/generated-admin-sidebar.mjs @@ -727,6 +727,24 @@ const generatedgeneratedAdminSidebarSidebar = { "loaded": false, "showLoadingIfEmpty": true }, + { + "type": "category", + "title": "Tax Providers", + "children": [ + { + "type": "link", + "path": "tax-providers_taxprovider_schema", + "title": "TaxProvider Object", + "loaded": true, + "badge": { + "variant": "neutral", + "text": "Schema" + } + } + ], + "loaded": false, + "showLoadingIfEmpty": true + }, { "type": "category", "title": "Tax Rates", diff --git a/www/apps/api-reference/generated/generated-store-sidebar.mjs b/www/apps/api-reference/generated/generated-store-sidebar.mjs index e0e8f3a2e5..da4e878636 100644 --- a/www/apps/api-reference/generated/generated-store-sidebar.mjs +++ b/www/apps/api-reference/generated/generated-store-sidebar.mjs @@ -278,12 +278,12 @@ const generatedgeneratedStoreSidebarSidebar = { }, { "type": "category", - "title": "Return", + "title": "Return Reasons", "children": [ { "type": "link", - "path": "return_return_schema", - "title": "Return Object", + "path": "return-reasons_returnreason_schema", + "title": "ReturnReason Object", "loaded": true, "badge": { "variant": "neutral", @@ -296,12 +296,12 @@ const generatedgeneratedStoreSidebarSidebar = { }, { "type": "category", - "title": "Return Reasons", + "title": "Returns", "children": [ { "type": "link", - "path": "return-reasons_returnreason_schema", - "title": "ReturnReason Object", + "path": "returns_return_schema", + "title": "Return Object", "loaded": true, "badge": { "variant": "neutral", diff --git a/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_tax-providers/get.js b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_tax-providers/get.js new file mode 100644 index 0000000000..61e7a42cd1 --- /dev/null +++ b/www/apps/api-reference/specs/admin/code_samples/JavaScript/admin_tax-providers/get.js @@ -0,0 +1,14 @@ +import Medusa from "@medusajs/js-sdk" + +export const sdk = new Medusa({ + baseUrl: import.meta.env.VITE_BACKEND_URL || "/", + debug: import.meta.env.DEV, + auth: { + type: "session", + }, +}) + +sdk.admin.taxProvider.list() +.then(({ tax_providers, count, limit, offset }) => { + console.log(tax_providers) +}) \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-providers/get.sh b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-providers/get.sh new file mode 100644 index 0000000000..0970c161e0 --- /dev/null +++ b/www/apps/api-reference/specs/admin/code_samples/Shell/admin_tax-providers/get.sh @@ -0,0 +1,2 @@ +curl '{backend_url}/admin/tax-providers' \ +-H 'Authorization: Bearer {access_token}' \ No newline at end of file diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminClaimListResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminClaimListResponse.yaml index 90a81e24cf..b0e4ed8d1a 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminClaimListResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminClaimListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of claims. items: $ref: ./AdminClaim.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCollectionListResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCollectionListResponse.yaml index 8574aa0029..71c87ea356 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCollectionListResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCollectionListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of product collections. items: $ref: ./AdminCollection.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateCollection.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateCollection.yaml deleted file mode 100644 index 08bd1f58b4..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateCollection.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: object -description: the product collection's details. -x-schemaName: AdminCreateCollection -required: - - title -properties: - title: - type: string - title: title - description: The collection's title. - handle: - type: string - title: handle - description: The collection's handle. - metadata: - type: object - description: The collection's metadata, used to store custom key-value pairs. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateTaxRegion.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateTaxRegion.yaml index e1b10b47c9..f2343d568f 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCreateTaxRegion.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCreateTaxRegion.yaml @@ -54,3 +54,9 @@ properties: metadata: type: object description: The tax region's metadata, used to store custom key-value pairs. + provider_id: + type: string + title: provider_id + description: >- + The ID of the tax provider used to calculate the tax rate in this tax + region. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminCurrencyListResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminCurrencyListResponse.yaml index 896e430a10..560a9d0142 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminCurrencyListResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminCurrencyListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of currencies. items: $ref: ./AdminCurrency.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminDraftOrderListResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminDraftOrderListResponse.yaml index 1973bfc0ee..779ba73cc1 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminDraftOrderListResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminDraftOrderListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of draft orders. items: $ref: ./AdminDraftOrder.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminFulfillmentProviderListResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminFulfillmentProviderListResponse.yaml index 4f9ed03097..168eaadd35 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminFulfillmentProviderListResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminFulfillmentProviderListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of fulfillment providers. items: $ref: ./AdminFulfillmentProvider.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminFulfillmentProviderOptionsListResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminFulfillmentProviderOptionsListResponse.yaml index dce367d1ba..b53b539256 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminFulfillmentProviderOptionsListResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminFulfillmentProviderOptionsListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of fulfillment options. items: $ref: ./AdminFulfillmentProviderOption.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminNotificationListResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminNotificationListResponse.yaml index f17ab50d8b..9c49a23474 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminNotificationListResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminNotificationListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of notifications. items: $ref: ./AdminNotification.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPriceListListResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPriceListListResponse.yaml index 186db813c9..2fcefc7c80 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPriceListListResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminPriceListListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of price lists. items: $ref: ./AdminPriceList.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminPricePreferenceListResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminPricePreferenceListResponse.yaml index 06f53caac6..9a6bb2502d 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminPricePreferenceListResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminPricePreferenceListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of price preferences. items: $ref: ./AdminPricePreference.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminProductCategoryListResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminProductCategoryListResponse.yaml index 7f0f60468b..6572bfa377 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminProductCategoryListResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminProductCategoryListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of product categories. items: $ref: ./AdminProductCategory.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminProductTagListResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminProductTagListResponse.yaml index 72220d7041..74ffffc6bc 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminProductTagListResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminProductTagListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of product tags. items: $ref: ./AdminProductTag.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminProductTypeListResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminProductTypeListResponse.yaml index 19fa220fe9..dce60c846c 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminProductTypeListResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminProductTypeListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of product types. items: $ref: ./AdminProductType.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminReturnReasonListResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminReturnReasonListResponse.yaml index 4f931ef219..da5ef84cca 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminReturnReasonListResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminReturnReasonListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of return reasons. items: $ref: ./AdminReturnReason.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminStockLocationListResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminStockLocationListResponse.yaml index 9f23c06060..622239fffa 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminStockLocationListResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminStockLocationListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of stock locations. items: $ref: ./AdminStockLocation.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminStoreListResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminStoreListResponse.yaml index 639f93778b..d55bee965e 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminStoreListResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminStoreListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of stores. items: $ref: ./AdminStore.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminTaxProvider.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminTaxProvider.yaml new file mode 100644 index 0000000000..137b1817ac --- /dev/null +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminTaxProvider.yaml @@ -0,0 +1,16 @@ +type: object +description: The tax provider's details. +x-schemaName: AdminTaxProvider +required: + - id + - is_enabled +properties: + id: + type: string + title: id + description: The tax provider's ID. + example: tp_taxjar_taxjar + is_enabled: + type: boolean + title: is_enabled + description: Whether the tax provider is enabled in the Medusa application. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminUpdateCollection.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminUpdateCollection.yaml deleted file mode 100644 index 63cfe987d0..0000000000 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminUpdateCollection.yaml +++ /dev/null @@ -1,15 +0,0 @@ -type: object -description: The details to update in a collection. -x-schemaName: AdminUpdateCollection -properties: - title: - type: string - title: title - description: The collection's title. - handle: - type: string - title: handle - description: The collection's handle. - metadata: - type: object - description: The collection's metadata, can hold custom key-value pairs. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminUpdateTaxRegion.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminUpdateTaxRegion.yaml index a66fb3835b..9420709221 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminUpdateTaxRegion.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminUpdateTaxRegion.yaml @@ -13,3 +13,9 @@ properties: metadata: type: object description: The tax region's metadata, can hold custom key-value pairs. + provider_id: + type: string + title: provider_id + description: >- + The ID of the tax provider to use when calculating taxes for this tax + region. diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminUserListResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminUserListResponse.yaml index e595dad0cd..37be1e0ce9 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminUserListResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminUserListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of users. items: $ref: ./AdminUser.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/admin/components/schemas/BaseOrderAddress.yaml b/www/apps/api-reference/specs/admin/components/schemas/BaseOrderAddress.yaml index e1aafdc8fb..87e7549077 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/BaseOrderAddress.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/BaseOrderAddress.yaml @@ -52,7 +52,7 @@ properties: type: string title: province description: The address's lower-case ISO 3166-2 province code. - example: US-CA + example: us-ca externalDocs: url: https://en.wikipedia.org/wiki/ISO_3166-2 description: Learn more about ISO 3166-2 diff --git a/www/apps/api-reference/specs/admin/components/schemas/StoreCurrencyListResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/StoreCurrencyListResponse.yaml index 349a669091..a086212dc0 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/StoreCurrencyListResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/StoreCurrencyListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of currencies. items: $ref: ./StoreCurrency.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/admin/components/schemas/StoreCustomerAddressListResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/StoreCustomerAddressListResponse.yaml index e04348e7e3..06ef719ddb 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/StoreCustomerAddressListResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/StoreCustomerAddressListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of addresses. items: $ref: ./StoreCustomerAddress.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/admin/components/schemas/StoreProductCategoryListResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/StoreProductCategoryListResponse.yaml index 124035ab92..6a0ab5bbac 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/StoreProductCategoryListResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/StoreProductCategoryListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of product categories. items: $ref: ./StoreProductCategory.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/admin/components/schemas/StoreProductTagListResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/StoreProductTagListResponse.yaml index 3dc71d398d..ebe5c0b0e4 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/StoreProductTagListResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/StoreProductTagListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of product tags. items: $ref: ./StoreProductTag.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/admin/components/schemas/StoreProductTypeListResponse.yaml b/www/apps/api-reference/specs/admin/components/schemas/StoreProductTypeListResponse.yaml index 49f0435607..bbaca457e7 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/StoreProductTypeListResponse.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/StoreProductTypeListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of product types. items: $ref: ./StoreProductType.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/admin/components/schemas/StoreReturn.yaml b/www/apps/api-reference/specs/admin/components/schemas/StoreReturn.yaml index 346a9d0a1b..cee7b4f0b0 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/StoreReturn.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/StoreReturn.yaml @@ -10,53 +10,58 @@ required: - canceled_at - received_at properties: - id: - type: string - title: id - description: The return's ID. - order_id: - type: string - title: order_id - description: The ID of the order this return is created for. - status: - type: string - title: status - description: The return's status. - exchange_id: - type: string - title: exchange_id - description: The ID of the associated exchange. - location_id: - type: string - title: location_id - description: The ID of the location the items are returned to. - claim_id: - type: string - title: claim_id - description: The ID of the associated claim. - display_id: - type: number - title: display_id - description: The return's display ID. - refund_amount: - type: number - title: refund_amount - description: The return's refunded amount. items: type: array description: The return's items. items: $ref: ./StoreReturnItem.yaml - received_at: + status: type: string - title: received_at - description: The date the return was received. + description: The return's status. + enum: + - received + - canceled + - requested + - open + - partially_received + id: + type: string + title: id + description: The return's ID. + display_id: + type: number + title: display_id + description: The return's display ID. created_at: type: string format: date-time title: created_at description: The date the return was created. + order_id: + type: string + title: order_id + description: The ID of the order this return belongs to. + location_id: + type: string + title: location_id + description: The ID of the location the return items are being returned to. canceled_at: type: string title: canceled_at - description: The date the return was updated. + description: The date the return was canceled. + exchange_id: + type: string + title: exchange_id + description: The ID of the associated exchange. + claim_id: + type: string + title: claim_id + description: The ID of the associated claim. + refund_amount: + type: number + title: refund_amount + description: The amount to be refunded. + received_at: + type: string + title: received_at + description: The date the return items were received. diff --git a/www/apps/api-reference/specs/admin/components/schemas/StoreReturnItem.yaml b/www/apps/api-reference/specs/admin/components/schemas/StoreReturnItem.yaml index 878ce1a742..bd4223318c 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/StoreReturnItem.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/StoreReturnItem.yaml @@ -1,6 +1,13 @@ type: object description: The return item's details. x-schemaName: StoreReturnItem +required: + - id + - quantity + - received_quantity + - damaged_quantity + - item_id + - return_id properties: id: type: string @@ -37,10 +44,3 @@ properties: metadata: type: object description: The item's metadata, can hold custom key-value pairs. -required: - - id - - quantity - - received_quantity - - damaged_quantity - - item_id - - return_id diff --git a/www/apps/api-reference/specs/admin/openapi.full.yaml b/www/apps/api-reference/specs/admin/openapi.full.yaml index 095a0d6ae1..543f644169 100644 --- a/www/apps/api-reference/specs/admin/openapi.full.yaml +++ b/www/apps/api-reference/specs/admin/openapi.full.yaml @@ -430,6 +430,15 @@ tags: url: https://docs.medusajs.com/resources/commerce-modules/store x-associatedSchema: $ref: '#/components/schemas/AdminStore' + - name: Tax Providers + description: | + A tax provider is a third-party integration or custom logic used to calculate taxes for a cart or an order. + These API routes allow admin users to manage tax providers installed in their Medusa application. + externalDocs: + description: Learn more about the Tax Module Providers + url: https://docs.medusajs.com/resources/commerce-modules/tax/tax-provider + x-associatedSchema: + $ref: '#/components/schemas/AdminTaxProvider' - name: Tax Rates description: | A tax rate is a percentage amount used to calculate the tax amount of each taxable item's price, such as line items or shipping methods. @@ -6153,7 +6162,30 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AdminCreateCollection' + allOf: + - type: object + description: The collection's details. + required: + - title + properties: + title: + type: string + title: title + description: The collection's title. + handle: + type: string + title: handle + description: The collection's handle. + metadata: + type: object + description: The collection's metadata. Can hold custom key-value pairs. + - type: object + description: The collection's details. + properties: + additional_data: + type: object + description: Pass additional custom data to the API route. This data is passed to the underlying workflow under the `additional_data` parameter. + description: the product collection's details. x-codeSamples: - lang: JavaScript label: JS SDK @@ -6317,7 +6349,28 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AdminUpdateCollection' + allOf: + - type: object + description: The details to update in a collection. + properties: + title: + type: string + title: title + description: The collection's title. + handle: + type: string + title: handle + description: The collection's handle. + metadata: + type: object + description: The collection's metadata. + - type: object + description: The details to update in a collection. + properties: + additional_data: + type: object + description: Pass additional custom data to the API route. This data is passed to the underlying workflow under the `additional_data` parameter. + description: The details to update in a collection. x-codeSamples: - lang: JavaScript label: JS SDK @@ -22062,7 +22115,7 @@ paths: delete: operationId: DeleteOrderEditsId summary: Cancel Order Edit - description: Cancel an order edit. + description: Cancel a requested order edit. x-authenticated: true parameters: - name: id @@ -22139,6 +22192,18 @@ paths: '500': $ref: '#/components/responses/500_error' x-workflow: cancelBeginOrderEditWorkflow + x-events: + - name: order-edit.canceled + payload: |- + ```ts + { + order_id, // The ID of the order + actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order + } + ``` + description: Emitted when an order edit request is canceled. + deprecated: false + version: 2.8.0 /admin/order-edits/{id}/confirm: post: operationId: PostOrderEditsIdConfirm @@ -22201,6 +22266,18 @@ paths: '500': $ref: '#/components/responses/500_error' x-workflow: confirmOrderEditRequestWorkflow + x-events: + - name: order-edit.confirmed + payload: |- + ```ts + { + order_id, // The ID of the order + actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order + } + ``` + description: Emitted when an order edit request is confirmed. + deprecated: false + version: 2.8.0 /admin/order-edits/{id}/items: post: operationId: PostOrderEditsIdItems @@ -22583,6 +22660,18 @@ paths: '500': $ref: '#/components/responses/500_error' x-workflow: requestOrderEditRequestWorkflow + x-events: + - name: order-edit.requested + payload: |- + ```ts + { + order_id, // The ID of the order + actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order + } + ``` + description: Emitted when an order edit is requested. + deprecated: false + version: 2.8.0 /admin/order-edits/{id}/shipping-method: post: operationId: PostOrderEditsIdShippingMethod @@ -46729,6 +46818,181 @@ paths: $ref: '#/components/responses/500_error' x-workflow: updateStoresWorkflow x-events: [] + /admin/tax-providers: + get: + operationId: GetTaxProviders + summary: List Tax Providers + description: Retrieve a list of tax providers installed in the Medusa application through Tax Module Providers. The tax providers can be filtered by fields such as `id`. The tax providers can also be sorted or paginated. + x-authenticated: true + parameters: + - name: fields + in: query + 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. + required: false + schema: + type: string + 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. + externalDocs: + url: '#select-fields-and-relations' + - name: offset + in: query + description: The number of items to skip when retrieving a list. + required: false + schema: + type: number + title: offset + description: The number of items to skip when retrieving a list. + externalDocs: + url: '#pagination' + - name: limit + in: query + description: Limit the number of items returned in the list. + required: false + schema: + type: number + title: limit + description: Limit the number of items returned in the list. + externalDocs: + url: '#pagination' + - name: order + in: query + description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`. + required: false + schema: + type: string + title: order + description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`. + externalDocs: + url: '#pagination' + - name: id + in: query + required: false + schema: + oneOf: + - type: string + title: id + description: Filter by a tax provider's ID. + - type: array + description: Filter by tax provider IDs. + items: + type: string + title: id + description: A tax provider's ID. + - name: is_enabled + in: query + description: Filter by whether the tax provider is enabled. + required: false + schema: + type: boolean + title: is_enabled + description: Filter by whether the tax provider is enabled. + - name: $and + in: query + description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters. + required: false + schema: + type: array + description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters. + items: + type: object + title: $and + - name: $or + in: query + description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters. + required: false + schema: + type: array + description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters. + items: + type: object + title: $or + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] + x-codeSamples: + - lang: JavaScript + label: JS SDK + source: |- + import Medusa from "@medusajs/js-sdk" + + export const sdk = new Medusa({ + baseUrl: import.meta.env.VITE_BACKEND_URL || "/", + debug: import.meta.env.DEV, + auth: { + type: "session", + }, + }) + + sdk.admin.taxProvider.list() + .then(({ tax_providers, count, limit, offset }) => { + console.log(tax_providers) + }) + - lang: Shell + label: cURL + source: |- + curl '{backend_url}/admin/tax-providers' \ + -H 'Authorization: Bearer {access_token}' + tags: + - Tax Providers + responses: + '200': + description: OK + content: + application/json: + schema: + allOf: + - type: object + description: The pagination details. + required: + - limit + - offset + - count + properties: + limit: + type: number + title: limit + description: The maximum number of items retrieved. + offset: + type: number + title: offset + description: The number of items skipped before retrieving the returned items. + count: + type: number + title: count + description: The total number of items available. + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine + - type: object + description: The list of tax providers. + required: + - tax_providers + properties: + tax_providers: + type: array + description: The list of tax providers. + items: + $ref: '#/components/schemas/AdminTaxProvider' + '400': + $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' + '404': + $ref: '#/components/responses/not_found_error' + '409': + $ref: '#/components/responses/invalid_state_error' + '422': + $ref: '#/components/responses/invalid_request_error' + '500': + $ref: '#/components/responses/500_error' + x-version: 2.8.0 /admin/tax-rates: get: operationId: GetTaxRates @@ -48964,6 +49228,29 @@ paths: 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. externalDocs: url: '#select-fields-and-relations' + - name: province_code + in: query + description: Filter by a tax region's province code. + required: false + schema: + type: string + title: province_code + description: Filter by a tax region's province code. + - name: provider_id + in: query + description: Filter by a tax provider ID to retrieve the tax regions using it. + required: false + schema: + type: string + title: provider_id + description: Filter by a tax provider ID to retrieve the tax regions using it. + - name: metadata + in: query + description: Filter by a tax region's metadata. Refer to the [Object Query Parameter](https://docs.medusajs.com/api/admin#object) section to learn how to filter by object fields. + required: false + schema: + type: object + description: Filter by a tax region's metadata. Refer to the [Object Query Parameter](https://docs.medusajs.com/api/admin#object) section to learn how to filter by object fields. security: - api_token: [] - cookie_auth: [] @@ -50279,6 +50566,14 @@ paths: type: string title: workflow_id description: A workflow ID. + - name: q + in: query + description: Search query to filter by a workflow execution's searchable fields. + required: false + schema: + type: string + title: q + description: Search query to filter by a workflow execution's searchable fields. security: - api_token: [] - cookie_auth: [] @@ -52462,6 +52757,11 @@ components: description: The list of claims. items: $ref: '#/components/schemas/AdminClaim' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine AdminClaimOrderResponse: type: object description: The created claim's details. @@ -52619,6 +52919,11 @@ components: description: The list of product collections. items: $ref: '#/components/schemas/AdminCollection' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine AdminCollectionResponse: type: object description: The collection's details. @@ -52646,24 +52951,6 @@ components: enum: - publishable - secret - AdminCreateCollection: - type: object - description: the product collection's details. - x-schemaName: AdminCreateCollection - required: - - title - properties: - title: - type: string - title: title - description: The collection's title. - handle: - type: string - title: handle - description: The collection's handle. - metadata: - type: object - description: The collection's metadata, used to store custom key-value pairs. AdminCreateCustomerGroup: type: object description: The customer group's details. @@ -53928,6 +54215,10 @@ components: metadata: type: object description: The tax region's metadata, used to store custom key-value pairs. + provider_id: + type: string + title: provider_id + description: The ID of the tax provider used to calculate the tax rate in this tax region. AdminCreateVariantInventoryItem: type: object description: The details of the variant-inventory item association. @@ -54065,6 +54356,11 @@ components: description: The list of currencies. items: $ref: '#/components/schemas/AdminCurrency' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine AdminCurrencyResponse: type: object description: The currency's details. @@ -55179,6 +55475,11 @@ components: description: The list of draft orders. items: $ref: '#/components/schemas/AdminDraftOrder' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine AdminDraftOrderPreview: type: object description: The draft order preview's details. @@ -56396,6 +56697,11 @@ components: description: The list of fulfillment providers. items: $ref: '#/components/schemas/AdminFulfillmentProvider' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine AdminFulfillmentProviderOption: type: object description: The fulfillment option's details. @@ -56439,6 +56745,11 @@ components: description: The list of fulfillment options. items: $ref: '#/components/schemas/AdminFulfillmentProviderOption' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine AdminFulfillmentResponse: type: object description: A fulfillment's details. @@ -56938,6 +57249,11 @@ components: description: The list of notifications. items: $ref: '#/components/schemas/AdminNotification' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine AdminNotificationResponse: type: object description: The notification's details. @@ -59901,6 +60217,11 @@ components: description: The list of price lists. items: $ref: '#/components/schemas/AdminPriceList' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine AdminPriceListPrice: type: object description: The details of a price list's price. @@ -60078,6 +60399,11 @@ components: description: The list of price preferences. items: $ref: '#/components/schemas/AdminPricePreference' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine AdminPricePreferenceResponse: type: object description: The price preference's details. @@ -60388,6 +60714,11 @@ components: description: The list of product categories. items: $ref: '#/components/schemas/AdminProductCategory' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine AdminProductCategoryResponse: type: object description: The product category's details. @@ -60670,6 +61001,11 @@ components: description: The list of product tags. items: $ref: '#/components/schemas/AdminProductTag' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine AdminProductTagResponse: type: object description: The product tag's details. @@ -60764,6 +61100,11 @@ components: description: The list of product types. items: $ref: '#/components/schemas/AdminProductType' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine AdminProductTypeResponse: type: object description: The product type's details. @@ -61722,6 +62063,11 @@ components: description: The list of return reasons. items: $ref: '#/components/schemas/AdminReturnReason' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine AdminReturnReasonResponse: type: object description: The return reason's details. @@ -62554,6 +62900,11 @@ components: description: The list of stock locations. items: $ref: '#/components/schemas/AdminStockLocation' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine AdminStockLocationResponse: type: object description: The stock location's details. @@ -62691,6 +63042,11 @@ components: description: The list of stores. items: $ref: '#/components/schemas/AdminStore' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine AdminStoreResponse: type: object description: The store's details. @@ -62700,6 +63056,23 @@ components: properties: store: $ref: '#/components/schemas/AdminStore' + AdminTaxProvider: + type: object + description: The tax provider's details. + x-schemaName: AdminTaxProvider + required: + - id + - is_enabled + properties: + id: + type: string + title: id + description: The tax provider's ID. + example: tp_taxjar_taxjar + is_enabled: + type: boolean + title: is_enabled + description: Whether the tax provider is enabled in the Medusa application. AdminTaxRate: type: object description: The tax rate's details. @@ -62963,22 +63336,6 @@ components: type: string title: title description: The API key's title. - AdminUpdateCollection: - type: object - description: The details to update in a collection. - x-schemaName: AdminUpdateCollection - properties: - title: - type: string - title: title - description: The collection's title. - handle: - type: string - title: handle - description: The collection's handle. - metadata: - type: object - description: The collection's metadata, can hold custom key-value pairs. AdminUpdateCustomerGroup: type: object description: The details to update in a customer group. @@ -63909,6 +64266,10 @@ components: metadata: type: object description: The tax region's metadata, can hold custom key-value pairs. + provider_id: + type: string + title: provider_id + description: The ID of the tax provider to use when calculating taxes for this tax region. AdminUpdateUser: type: object description: The properties to update in a user. @@ -64088,6 +64449,11 @@ components: description: The list of users. items: $ref: '#/components/schemas/AdminUser' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine AdminUserResponse: type: object description: The user's details. @@ -65584,7 +65950,7 @@ components: type: string title: province description: The address's lower-case ISO 3166-2 province code. - example: US-CA + example: us-ca externalDocs: url: https://en.wikipedia.org/wiki/ISO_3166-2 description: Learn more about ISO 3166-2 @@ -71397,6 +71763,11 @@ components: description: The list of currencies. items: $ref: '#/components/schemas/StoreCurrency' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine StoreCurrencyResponse: type: object description: The currency's details. @@ -71605,6 +71976,11 @@ components: description: The list of addresses. items: $ref: '#/components/schemas/StoreCustomerAddress' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine StoreCustomerAddressResponse: type: object description: The address's details. @@ -78266,6 +78642,11 @@ components: description: The list of product categories. items: $ref: '#/components/schemas/StoreProductCategory' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine StoreProductCategoryResponse: type: object description: The product category's details. @@ -78471,6 +78852,11 @@ components: description: The list of product tags. items: $ref: '#/components/schemas/StoreProductTag' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine StoreProductTagResponse: type: object description: The product tag's details. @@ -78543,6 +78929,11 @@ components: description: The list of product types. items: $ref: '#/components/schemas/StoreProductType' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine StoreProductTypeResponse: type: object description: The product type's details. @@ -78792,60 +79183,72 @@ components: - canceled_at - received_at properties: - id: - type: string - title: id - description: The return's ID. - order_id: - type: string - title: order_id - description: The ID of the order this return is created for. - status: - type: string - title: status - description: The return's status. - exchange_id: - type: string - title: exchange_id - description: The ID of the associated exchange. - location_id: - type: string - title: location_id - description: The ID of the location the items are returned to. - claim_id: - type: string - title: claim_id - description: The ID of the associated claim. - display_id: - type: number - title: display_id - description: The return's display ID. - refund_amount: - type: number - title: refund_amount - description: The return's refunded amount. items: type: array description: The return's items. items: $ref: '#/components/schemas/StoreReturnItem' - received_at: + status: type: string - title: received_at - description: The date the return was received. + description: The return's status. + enum: + - received + - canceled + - requested + - open + - partially_received + id: + type: string + title: id + description: The return's ID. + display_id: + type: number + title: display_id + description: The return's display ID. created_at: type: string format: date-time title: created_at description: The date the return was created. + order_id: + type: string + title: order_id + description: The ID of the order this return belongs to. + location_id: + type: string + title: location_id + description: The ID of the location the return items are being returned to. canceled_at: type: string title: canceled_at - description: The date the return was updated. + description: The date the return was canceled. + exchange_id: + type: string + title: exchange_id + description: The ID of the associated exchange. + claim_id: + type: string + title: claim_id + description: The ID of the associated claim. + refund_amount: + type: number + title: refund_amount + description: The amount to be refunded. + received_at: + type: string + title: received_at + description: The date the return items were received. StoreReturnItem: type: object description: The return item's details. x-schemaName: StoreReturnItem + required: + - id + - quantity + - received_quantity + - damaged_quantity + - item_id + - return_id properties: id: type: string @@ -78882,13 +79285,6 @@ components: metadata: type: object description: The item's metadata, can hold custom key-value pairs. - required: - - id - - quantity - - received_quantity - - damaged_quantity - - item_id - - return_id StoreReturnReason: type: object description: The return reason's details. diff --git a/www/apps/api-reference/specs/admin/openapi.yaml b/www/apps/api-reference/specs/admin/openapi.yaml index b66897200d..0d17a4191e 100644 --- a/www/apps/api-reference/specs/admin/openapi.yaml +++ b/www/apps/api-reference/specs/admin/openapi.yaml @@ -568,6 +568,18 @@ tags: url: https://docs.medusajs.com/resources/commerce-modules/store x-associatedSchema: $ref: ./components/schemas/AdminStore.yaml + - name: Tax Providers + description: > + A tax provider is a third-party integration or custom logic used to + calculate taxes for a cart or an order. + + These API routes allow admin users to manage tax providers installed in + their Medusa application. + externalDocs: + description: Learn more about the Tax Module Providers + url: https://docs.medusajs.com/resources/commerce-modules/tax/tax-provider + x-associatedSchema: + $ref: ./components/schemas/AdminTaxProvider.yaml - name: Tax Rates description: > A tax rate is a percentage amount used to calculate the tax amount of each @@ -1014,6 +1026,8 @@ paths: $ref: paths/admin_stores.yaml /admin/stores/{id}: $ref: paths/admin_stores_{id}.yaml + /admin/tax-providers: + $ref: paths/admin_tax-providers.yaml /admin/tax-rates: $ref: paths/admin_tax-rates.yaml /admin/tax-rates/{id}: diff --git a/www/apps/api-reference/specs/admin/paths/admin_collections.yaml b/www/apps/api-reference/specs/admin/paths/admin_collections.yaml index af434edbbc..f369065360 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_collections.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_collections.yaml @@ -1008,7 +1008,33 @@ post: content: application/json: schema: - $ref: ../components/schemas/AdminCreateCollection.yaml + allOf: + - type: object + description: The collection's details. + required: + - title + properties: + title: + type: string + title: title + description: The collection's title. + handle: + type: string + title: handle + description: The collection's handle. + metadata: + type: object + description: The collection's metadata. Can hold custom key-value pairs. + - type: object + description: The collection's details. + properties: + additional_data: + type: object + description: >- + Pass additional custom data to the API route. This data is + passed to the underlying workflow under the + `additional_data` parameter. + description: the product collection's details. x-codeSamples: - lang: JavaScript label: JS SDK diff --git a/www/apps/api-reference/specs/admin/paths/admin_collections_{id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_collections_{id}.yaml index 27d604bbf3..6b917c6e26 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_collections_{id}.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_collections_{id}.yaml @@ -102,7 +102,31 @@ post: content: application/json: schema: - $ref: ../components/schemas/AdminUpdateCollection.yaml + allOf: + - type: object + description: The details to update in a collection. + properties: + title: + type: string + title: title + description: The collection's title. + handle: + type: string + title: handle + description: The collection's handle. + metadata: + type: object + description: The collection's metadata. + - type: object + description: The details to update in a collection. + properties: + additional_data: + type: object + description: >- + Pass additional custom data to the API route. This data is + passed to the underlying workflow under the + `additional_data` parameter. + description: The details to update in a collection. x-codeSamples: - lang: JavaScript label: JS SDK diff --git a/www/apps/api-reference/specs/admin/paths/admin_order-edits_{id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_order-edits_{id}.yaml index e9953f152d..15b2c1bbec 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_order-edits_{id}.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_order-edits_{id}.yaml @@ -1,7 +1,7 @@ delete: operationId: DeleteOrderEditsId summary: Cancel Order Edit - description: Cancel an order edit. + description: Cancel a requested order edit. x-authenticated: true parameters: - name: id @@ -64,3 +64,15 @@ delete: '500': $ref: ../components/responses/500_error.yaml x-workflow: cancelBeginOrderEditWorkflow + x-events: + - name: order-edit.canceled + payload: |- + ```ts + { + order_id, // The ID of the order + actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order + } + ``` + description: Emitted when an order edit request is canceled. + deprecated: false + version: 2.8.0 diff --git a/www/apps/api-reference/specs/admin/paths/admin_order-edits_{id}_confirm.yaml b/www/apps/api-reference/specs/admin/paths/admin_order-edits_{id}_confirm.yaml index 100f2ed2ad..ab4354f3f1 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_order-edits_{id}_confirm.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_order-edits_{id}_confirm.yaml @@ -45,3 +45,15 @@ post: '500': $ref: ../components/responses/500_error.yaml x-workflow: confirmOrderEditRequestWorkflow + x-events: + - name: order-edit.confirmed + payload: |- + ```ts + { + order_id, // The ID of the order + actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order + } + ``` + description: Emitted when an order edit request is confirmed. + deprecated: false + version: 2.8.0 diff --git a/www/apps/api-reference/specs/admin/paths/admin_order-edits_{id}_request.yaml b/www/apps/api-reference/specs/admin/paths/admin_order-edits_{id}_request.yaml index 853d4bb4fc..3cd6900e90 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_order-edits_{id}_request.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_order-edits_{id}_request.yaml @@ -45,3 +45,15 @@ post: '500': $ref: ../components/responses/500_error.yaml x-workflow: requestOrderEditRequestWorkflow + x-events: + - name: order-edit.requested + payload: |- + ```ts + { + order_id, // The ID of the order + actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order + } + ``` + description: Emitted when an order edit is requested. + deprecated: false + version: 2.8.0 diff --git a/www/apps/api-reference/specs/admin/paths/admin_tax-providers.yaml b/www/apps/api-reference/specs/admin/paths/admin_tax-providers.yaml new file mode 100644 index 0000000000..83c1cd5892 --- /dev/null +++ b/www/apps/api-reference/specs/admin/paths/admin_tax-providers.yaml @@ -0,0 +1,187 @@ +get: + operationId: GetTaxProviders + summary: List Tax Providers + description: >- + Retrieve a list of tax providers installed in the Medusa application through + Tax Module Providers. The tax providers can be filtered by fields such as + `id`. The tax providers can also be sorted or paginated. + x-authenticated: true + parameters: + - name: fields + in: query + 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. + required: false + schema: + type: string + 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. + externalDocs: + url: '#select-fields-and-relations' + - name: offset + in: query + description: The number of items to skip when retrieving a list. + required: false + schema: + type: number + title: offset + description: The number of items to skip when retrieving a list. + externalDocs: + url: '#pagination' + - name: limit + in: query + description: Limit the number of items returned in the list. + required: false + schema: + type: number + title: limit + description: Limit the number of items returned in the list. + externalDocs: + url: '#pagination' + - name: order + in: query + description: >- + The field to sort the data by. By default, the sort order is ascending. + To change the order to descending, prefix the field name with `-`. + required: false + schema: + type: string + title: order + description: >- + The field to sort the data by. By default, the sort order is + ascending. To change the order to descending, prefix the field name + with `-`. + externalDocs: + url: '#pagination' + - name: id + in: query + required: false + schema: + oneOf: + - type: string + title: id + description: Filter by a tax provider's ID. + - type: array + description: Filter by tax provider IDs. + items: + type: string + title: id + description: A tax provider's ID. + - name: is_enabled + in: query + description: Filter by whether the tax provider is enabled. + required: false + schema: + type: boolean + title: is_enabled + description: Filter by whether the tax provider is enabled. + - name: $and + in: query + description: >- + Join query parameters with an AND condition. Each object's content is + the same type as the expected query parameters. + required: false + schema: + type: array + description: >- + Join query parameters with an AND condition. Each object's content is + the same type as the expected query parameters. + items: + type: object + title: $and + - name: $or + in: query + description: >- + Join query parameters with an OR condition. Each object's content is the + same type as the expected query parameters. + required: false + schema: + type: array + description: >- + Join query parameters with an OR condition. Each object's content is + the same type as the expected query parameters. + items: + type: object + title: $or + security: + - api_token: [] + - cookie_auth: [] + - jwt_token: [] + x-codeSamples: + - lang: JavaScript + label: JS SDK + source: + $ref: ../code_samples/JavaScript/admin_tax-providers/get.js + - lang: Shell + label: cURL + source: + $ref: ../code_samples/Shell/admin_tax-providers/get.sh + tags: + - Tax Providers + responses: + '200': + description: OK + content: + application/json: + schema: + allOf: + - type: object + description: The pagination details. + required: + - limit + - offset + - count + properties: + limit: + type: number + title: limit + description: The maximum number of items retrieved. + offset: + type: number + title: offset + description: >- + The number of items skipped before retrieving the returned + items. + count: + type: number + title: count + description: The total number of items available. + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query + planner, which may be inaccurate. + x-featureFlag: index_engine + - type: object + description: The list of tax providers. + required: + - tax_providers + properties: + tax_providers: + type: array + description: The list of tax providers. + items: + $ref: ../components/schemas/AdminTaxProvider.yaml + '400': + $ref: ../components/responses/400_error.yaml + '401': + $ref: ../components/responses/unauthorized.yaml + '404': + $ref: ../components/responses/not_found_error.yaml + '409': + $ref: ../components/responses/invalid_state_error.yaml + '422': + $ref: ../components/responses/invalid_request_error.yaml + '500': + $ref: ../components/responses/500_error.yaml + x-version: 2.8.0 diff --git a/www/apps/api-reference/specs/admin/paths/admin_tax-regions_{id}.yaml b/www/apps/api-reference/specs/admin/paths/admin_tax-regions_{id}.yaml index 1c0f9880b6..defc8aa569 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_tax-regions_{id}.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_tax-regions_{id}.yaml @@ -30,6 +30,35 @@ get: prefix it will replace the entire default fields. externalDocs: url: '#select-fields-and-relations' + - name: province_code + in: query + description: Filter by a tax region's province code. + required: false + schema: + type: string + title: province_code + description: Filter by a tax region's province code. + - name: provider_id + in: query + description: Filter by a tax provider ID to retrieve the tax regions using it. + required: false + schema: + type: string + title: provider_id + description: Filter by a tax provider ID to retrieve the tax regions using it. + - name: metadata + in: query + description: >- + Filter by a tax region's metadata. Refer to the [Object Query + Parameter](https://docs.medusajs.com/api/admin#object) section to learn + how to filter by object fields. + required: false + schema: + type: object + description: >- + Filter by a tax region's metadata. Refer to the [Object Query + Parameter](https://docs.medusajs.com/api/admin#object) section to + learn how to filter by object fields. security: - api_token: [] - cookie_auth: [] diff --git a/www/apps/api-reference/specs/admin/paths/admin_workflows-executions.yaml b/www/apps/api-reference/specs/admin/paths/admin_workflows-executions.yaml index 02414cf2e9..d8ca673b96 100644 --- a/www/apps/api-reference/specs/admin/paths/admin_workflows-executions.yaml +++ b/www/apps/api-reference/specs/admin/paths/admin_workflows-executions.yaml @@ -86,6 +86,14 @@ get: type: string title: workflow_id description: A workflow ID. + - name: q + in: query + description: Search query to filter by a workflow execution's searchable fields. + required: false + schema: + type: string + title: q + description: Search query to filter by a workflow execution's searchable fields. security: - api_token: [] - cookie_auth: [] diff --git a/www/apps/api-reference/specs/store/code_samples/Shell/store_return/post.sh b/www/apps/api-reference/specs/store/code_samples/Shell/store_returns/post.sh similarity index 84% rename from www/apps/api-reference/specs/store/code_samples/Shell/store_return/post.sh rename to www/apps/api-reference/specs/store/code_samples/Shell/store_returns/post.sh index 2472a20acf..e662b17b8c 100644 --- a/www/apps/api-reference/specs/store/code_samples/Shell/store_return/post.sh +++ b/www/apps/api-reference/specs/store/code_samples/Shell/store_returns/post.sh @@ -1,8 +1,8 @@ -curl -X POST '{backend_url}/store/return' \ --H 'Content-Type: application/json' \ +curl -X POST '{backend_url}/store/returns' \ -H 'x-publishable-api-key: {your_publishable_api_key}' \ +-H 'Content-Type: application/json' \ --data-raw '{ - "order_id": "{value}", + "order_id": "order_123", "items": [ { "id": "id_XbfptxUVo2io9EI", diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminClaimListResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminClaimListResponse.yaml index 90a81e24cf..b0e4ed8d1a 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminClaimListResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminClaimListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of claims. items: $ref: ./AdminClaim.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCollectionListResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCollectionListResponse.yaml index 8574aa0029..71c87ea356 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCollectionListResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCollectionListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of product collections. items: $ref: ./AdminCollection.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCreateCollection.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCreateCollection.yaml deleted file mode 100644 index 08bd1f58b4..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCreateCollection.yaml +++ /dev/null @@ -1,17 +0,0 @@ -type: object -description: the product collection's details. -x-schemaName: AdminCreateCollection -required: - - title -properties: - title: - type: string - title: title - description: The collection's title. - handle: - type: string - title: handle - description: The collection's handle. - metadata: - type: object - description: The collection's metadata, used to store custom key-value pairs. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCreateTaxRegion.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCreateTaxRegion.yaml index e1b10b47c9..f2343d568f 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCreateTaxRegion.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCreateTaxRegion.yaml @@ -54,3 +54,9 @@ properties: metadata: type: object description: The tax region's metadata, used to store custom key-value pairs. + provider_id: + type: string + title: provider_id + description: >- + The ID of the tax provider used to calculate the tax rate in this tax + region. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminCurrencyListResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminCurrencyListResponse.yaml index 896e430a10..560a9d0142 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminCurrencyListResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminCurrencyListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of currencies. items: $ref: ./AdminCurrency.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminDraftOrderListResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminDraftOrderListResponse.yaml index 1973bfc0ee..779ba73cc1 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminDraftOrderListResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminDraftOrderListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of draft orders. items: $ref: ./AdminDraftOrder.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminFulfillmentProviderListResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminFulfillmentProviderListResponse.yaml index 4f9ed03097..168eaadd35 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminFulfillmentProviderListResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminFulfillmentProviderListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of fulfillment providers. items: $ref: ./AdminFulfillmentProvider.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminFulfillmentProviderOptionsListResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminFulfillmentProviderOptionsListResponse.yaml index dce367d1ba..b53b539256 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminFulfillmentProviderOptionsListResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminFulfillmentProviderOptionsListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of fulfillment options. items: $ref: ./AdminFulfillmentProviderOption.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminNotificationListResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminNotificationListResponse.yaml index f17ab50d8b..9c49a23474 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminNotificationListResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminNotificationListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of notifications. items: $ref: ./AdminNotification.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminPriceListListResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminPriceListListResponse.yaml index 186db813c9..2fcefc7c80 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminPriceListListResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminPriceListListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of price lists. items: $ref: ./AdminPriceList.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminPricePreferenceListResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminPricePreferenceListResponse.yaml index 06f53caac6..9a6bb2502d 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminPricePreferenceListResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminPricePreferenceListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of price preferences. items: $ref: ./AdminPricePreference.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminProductCategoryListResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminProductCategoryListResponse.yaml index 7f0f60468b..6572bfa377 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminProductCategoryListResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminProductCategoryListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of product categories. items: $ref: ./AdminProductCategory.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminProductTagListResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminProductTagListResponse.yaml index 72220d7041..74ffffc6bc 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminProductTagListResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminProductTagListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of product tags. items: $ref: ./AdminProductTag.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminProductTypeListResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminProductTypeListResponse.yaml index 19fa220fe9..dce60c846c 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminProductTypeListResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminProductTypeListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of product types. items: $ref: ./AdminProductType.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminReturnReasonListResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminReturnReasonListResponse.yaml index 4f931ef219..da5ef84cca 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminReturnReasonListResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminReturnReasonListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of return reasons. items: $ref: ./AdminReturnReason.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminStockLocationListResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminStockLocationListResponse.yaml index 9f23c06060..622239fffa 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminStockLocationListResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminStockLocationListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of stock locations. items: $ref: ./AdminStockLocation.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminStoreListResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminStoreListResponse.yaml index 639f93778b..d55bee965e 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminStoreListResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminStoreListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of stores. items: $ref: ./AdminStore.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminTaxProvider.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminTaxProvider.yaml new file mode 100644 index 0000000000..137b1817ac --- /dev/null +++ b/www/apps/api-reference/specs/store/components/schemas/AdminTaxProvider.yaml @@ -0,0 +1,16 @@ +type: object +description: The tax provider's details. +x-schemaName: AdminTaxProvider +required: + - id + - is_enabled +properties: + id: + type: string + title: id + description: The tax provider's ID. + example: tp_taxjar_taxjar + is_enabled: + type: boolean + title: is_enabled + description: Whether the tax provider is enabled in the Medusa application. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminUpdateCollection.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminUpdateCollection.yaml deleted file mode 100644 index 63cfe987d0..0000000000 --- a/www/apps/api-reference/specs/store/components/schemas/AdminUpdateCollection.yaml +++ /dev/null @@ -1,15 +0,0 @@ -type: object -description: The details to update in a collection. -x-schemaName: AdminUpdateCollection -properties: - title: - type: string - title: title - description: The collection's title. - handle: - type: string - title: handle - description: The collection's handle. - metadata: - type: object - description: The collection's metadata, can hold custom key-value pairs. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminUpdateTaxRegion.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminUpdateTaxRegion.yaml index a66fb3835b..9420709221 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminUpdateTaxRegion.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminUpdateTaxRegion.yaml @@ -13,3 +13,9 @@ properties: metadata: type: object description: The tax region's metadata, can hold custom key-value pairs. + provider_id: + type: string + title: provider_id + description: >- + The ID of the tax provider to use when calculating taxes for this tax + region. diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminUserListResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminUserListResponse.yaml index e595dad0cd..37be1e0ce9 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminUserListResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminUserListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of users. items: $ref: ./AdminUser.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/store/components/schemas/BaseOrderAddress.yaml b/www/apps/api-reference/specs/store/components/schemas/BaseOrderAddress.yaml index e1aafdc8fb..87e7549077 100644 --- a/www/apps/api-reference/specs/store/components/schemas/BaseOrderAddress.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/BaseOrderAddress.yaml @@ -52,7 +52,7 @@ properties: type: string title: province description: The address's lower-case ISO 3166-2 province code. - example: US-CA + example: us-ca externalDocs: url: https://en.wikipedia.org/wiki/ISO_3166-2 description: Learn more about ISO 3166-2 diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreCurrencyListResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreCurrencyListResponse.yaml index 349a669091..a086212dc0 100644 --- a/www/apps/api-reference/specs/store/components/schemas/StoreCurrencyListResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/StoreCurrencyListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of currencies. items: $ref: ./StoreCurrency.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreCustomerAddressListResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreCustomerAddressListResponse.yaml index e04348e7e3..06ef719ddb 100644 --- a/www/apps/api-reference/specs/store/components/schemas/StoreCustomerAddressListResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/StoreCustomerAddressListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of addresses. items: $ref: ./StoreCustomerAddress.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreProductCategoryListResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreProductCategoryListResponse.yaml index 124035ab92..6a0ab5bbac 100644 --- a/www/apps/api-reference/specs/store/components/schemas/StoreProductCategoryListResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/StoreProductCategoryListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of product categories. items: $ref: ./StoreProductCategory.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreProductTagListResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreProductTagListResponse.yaml index 3dc71d398d..ebe5c0b0e4 100644 --- a/www/apps/api-reference/specs/store/components/schemas/StoreProductTagListResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/StoreProductTagListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of product tags. items: $ref: ./StoreProductTag.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreProductTypeListResponse.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreProductTypeListResponse.yaml index 49f0435607..bbaca457e7 100644 --- a/www/apps/api-reference/specs/store/components/schemas/StoreProductTypeListResponse.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/StoreProductTypeListResponse.yaml @@ -24,3 +24,10 @@ properties: description: The list of product types. items: $ref: ./StoreProductType.yaml + estimate_count: + type: number + title: estimate_count + description: >- + The estimated count retrieved from the PostgreSQL query planner, which may + be inaccurate. + x-featureFlag: index_engine diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreReturn.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreReturn.yaml index 346a9d0a1b..cee7b4f0b0 100644 --- a/www/apps/api-reference/specs/store/components/schemas/StoreReturn.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/StoreReturn.yaml @@ -10,53 +10,58 @@ required: - canceled_at - received_at properties: - id: - type: string - title: id - description: The return's ID. - order_id: - type: string - title: order_id - description: The ID of the order this return is created for. - status: - type: string - title: status - description: The return's status. - exchange_id: - type: string - title: exchange_id - description: The ID of the associated exchange. - location_id: - type: string - title: location_id - description: The ID of the location the items are returned to. - claim_id: - type: string - title: claim_id - description: The ID of the associated claim. - display_id: - type: number - title: display_id - description: The return's display ID. - refund_amount: - type: number - title: refund_amount - description: The return's refunded amount. items: type: array description: The return's items. items: $ref: ./StoreReturnItem.yaml - received_at: + status: type: string - title: received_at - description: The date the return was received. + description: The return's status. + enum: + - received + - canceled + - requested + - open + - partially_received + id: + type: string + title: id + description: The return's ID. + display_id: + type: number + title: display_id + description: The return's display ID. created_at: type: string format: date-time title: created_at description: The date the return was created. + order_id: + type: string + title: order_id + description: The ID of the order this return belongs to. + location_id: + type: string + title: location_id + description: The ID of the location the return items are being returned to. canceled_at: type: string title: canceled_at - description: The date the return was updated. + description: The date the return was canceled. + exchange_id: + type: string + title: exchange_id + description: The ID of the associated exchange. + claim_id: + type: string + title: claim_id + description: The ID of the associated claim. + refund_amount: + type: number + title: refund_amount + description: The amount to be refunded. + received_at: + type: string + title: received_at + description: The date the return items were received. diff --git a/www/apps/api-reference/specs/store/components/schemas/StoreReturnItem.yaml b/www/apps/api-reference/specs/store/components/schemas/StoreReturnItem.yaml index 878ce1a742..bd4223318c 100644 --- a/www/apps/api-reference/specs/store/components/schemas/StoreReturnItem.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/StoreReturnItem.yaml @@ -1,6 +1,13 @@ type: object description: The return item's details. x-schemaName: StoreReturnItem +required: + - id + - quantity + - received_quantity + - damaged_quantity + - item_id + - return_id properties: id: type: string @@ -37,10 +44,3 @@ properties: metadata: type: object description: The item's metadata, can hold custom key-value pairs. -required: - - id - - quantity - - received_quantity - - damaged_quantity - - item_id - - return_id diff --git a/www/apps/api-reference/specs/store/openapi.full.yaml b/www/apps/api-reference/specs/store/openapi.full.yaml index 42a6bbf052..d0c5202958 100644 --- a/www/apps/api-reference/specs/store/openapi.full.yaml +++ b/www/apps/api-reference/specs/store/openapi.full.yaml @@ -127,7 +127,7 @@ tags: url: https://docs.medusajs.com/resources/storefront-development/regions x-associatedSchema: $ref: '#/components/schemas/StoreRegion' - - name: Return + - name: Returns description: | Customers can request to return items in their order. The admin user then receives and handles the return. @@ -1330,7 +1330,18 @@ paths: '500': $ref: '#/components/responses/500_error' x-workflow: transferCartCustomerWorkflow - x-events: [] + x-events: + - name: cart.customer_transferred + payload: |- + ```ts + { + id, // The ID of the cart + customer_id, // The ID of the customer + } + ``` + description: Emitted when the customer in the cart is transferred. + deprecated: false + version: 2.8.0 /store/carts/{id}/line-items: post: operationId: PostCartsIdLineItems @@ -8251,72 +8262,6 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' - /store/return: - post: - operationId: PostReturn - summary: Create Return - description: Create a return for an order's items. The admin receives the return and process it from their side. - x-authenticated: false - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/StoreCreateReturn' - x-codeSamples: - - lang: Shell - label: cURL - source: |- - curl -X POST '{backend_url}/store/return' \ - -H 'Content-Type: application/json' \ - -H 'x-publishable-api-key: {your_publishable_api_key}' \ - --data-raw '{ - "order_id": "{value}", - "items": [ - { - "id": "id_XbfptxUVo2io9EI", - "quantity": 7916429753974784, - "reason_id": "{value}", - "note": "{value}" - } - ], - "return_shipping": { - "option_id": "{value}", - "price": 1068364080349184 - }, - "note": "{value}", - "location_id": "{value}" - }' - tags: - - Return - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/StoreReturnResponse' - '400': - $ref: '#/components/responses/400_error' - '401': - $ref: '#/components/responses/unauthorized' - '404': - $ref: '#/components/responses/not_found_error' - '409': - $ref: '#/components/responses/invalid_state_error' - '422': - $ref: '#/components/responses/invalid_request_error' - '500': - $ref: '#/components/responses/500_error' - x-workflow: createAndCompleteReturnOrderWorkflow - parameters: - - name: x-publishable-api-key - in: header - description: Publishable API Key created in the Medusa Admin. - required: true - schema: - type: string - externalDocs: - url: https://docs.medusajs.com/api/store#publishable-api-key /store/return-reasons: get: operationId: GetReturnReasons @@ -8484,6 +8429,94 @@ paths: $ref: '#/components/responses/invalid_request_error' '500': $ref: '#/components/responses/500_error' + /store/returns: + post: + operationId: PostReturns + summary: Create Return + description: Create a return for an order's items. The admin receives the return and process it from their side. + x-authenticated: false + parameters: + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/StoreCreateReturn' + x-codeSamples: + - lang: Shell + label: cURL + source: |- + curl -X POST '{backend_url}/store/returns' \ + -H 'x-publishable-api-key: {your_publishable_api_key}' \ + -H 'Content-Type: application/json' \ + --data-raw '{ + "order_id": "order_123", + "items": [ + { + "id": "id_XbfptxUVo2io9EI", + "quantity": 7916429753974784, + "reason_id": "{value}", + "note": "{value}" + } + ], + "return_shipping": { + "option_id": "{value}", + "price": 1068364080349184 + }, + "note": "{value}", + "location_id": "{value}" + }' + tags: + - Returns + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/StoreReturnResponse' + '400': + $ref: '#/components/responses/400_error' + '401': + $ref: '#/components/responses/unauthorized' + '404': + $ref: '#/components/responses/not_found_error' + '409': + $ref: '#/components/responses/invalid_state_error' + '422': + $ref: '#/components/responses/invalid_request_error' + '500': + $ref: '#/components/responses/500_error' + x-workflow: createAndCompleteReturnOrderWorkflow + x-events: + - name: order.return_requested + payload: |- + ```ts + { + order_id, // The ID of the order + return_id, // The ID of the return + } + ``` + description: Emitted when a return request is confirmed. + deprecated: false + - name: order.return_received + payload: |- + ```ts + { + order_id, // The ID of the order + return_id, // The ID of the return + } + ``` + description: Emitted when a return is marked as received. + deprecated: false + x-version: 2.8.0 /store/shipping-options: get: operationId: GetShippingOptions @@ -9774,6 +9807,11 @@ components: description: The list of claims. items: $ref: '#/components/schemas/AdminClaim' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine AdminClaimOrderResponse: type: object description: The created claim's details. @@ -9931,6 +9969,11 @@ components: description: The list of product collections. items: $ref: '#/components/schemas/AdminCollection' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine AdminCollectionResponse: type: object description: The collection's details. @@ -9958,24 +10001,6 @@ components: enum: - publishable - secret - AdminCreateCollection: - type: object - description: the product collection's details. - x-schemaName: AdminCreateCollection - required: - - title - properties: - title: - type: string - title: title - description: The collection's title. - handle: - type: string - title: handle - description: The collection's handle. - metadata: - type: object - description: The collection's metadata, used to store custom key-value pairs. AdminCreateCustomerGroup: type: object description: The customer group's details. @@ -11240,6 +11265,10 @@ components: metadata: type: object description: The tax region's metadata, used to store custom key-value pairs. + provider_id: + type: string + title: provider_id + description: The ID of the tax provider used to calculate the tax rate in this tax region. AdminCreateVariantInventoryItem: type: object description: The details of the variant-inventory item association. @@ -11377,6 +11406,11 @@ components: description: The list of currencies. items: $ref: '#/components/schemas/AdminCurrency' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine AdminCurrencyResponse: type: object description: The currency's details. @@ -12491,6 +12525,11 @@ components: description: The list of draft orders. items: $ref: '#/components/schemas/AdminDraftOrder' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine AdminDraftOrderPreview: type: object description: The draft order preview's details. @@ -13708,6 +13747,11 @@ components: description: The list of fulfillment providers. items: $ref: '#/components/schemas/AdminFulfillmentProvider' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine AdminFulfillmentProviderOption: type: object description: The fulfillment option's details. @@ -13751,6 +13795,11 @@ components: description: The list of fulfillment options. items: $ref: '#/components/schemas/AdminFulfillmentProviderOption' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine AdminFulfillmentResponse: type: object description: A fulfillment's details. @@ -14250,6 +14299,11 @@ components: description: The list of notifications. items: $ref: '#/components/schemas/AdminNotification' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine AdminNotificationResponse: type: object description: The notification's details. @@ -17213,6 +17267,11 @@ components: description: The list of price lists. items: $ref: '#/components/schemas/AdminPriceList' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine AdminPriceListPrice: type: object description: The details of a price list's price. @@ -17390,6 +17449,11 @@ components: description: The list of price preferences. items: $ref: '#/components/schemas/AdminPricePreference' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine AdminPricePreferenceResponse: type: object description: The price preference's details. @@ -17700,6 +17764,11 @@ components: description: The list of product categories. items: $ref: '#/components/schemas/AdminProductCategory' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine AdminProductCategoryResponse: type: object description: The product category's details. @@ -17982,6 +18051,11 @@ components: description: The list of product tags. items: $ref: '#/components/schemas/AdminProductTag' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine AdminProductTagResponse: type: object description: The product tag's details. @@ -18076,6 +18150,11 @@ components: description: The list of product types. items: $ref: '#/components/schemas/AdminProductType' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine AdminProductTypeResponse: type: object description: The product type's details. @@ -19034,6 +19113,11 @@ components: description: The list of return reasons. items: $ref: '#/components/schemas/AdminReturnReason' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine AdminReturnReasonResponse: type: object description: The return reason's details. @@ -19866,6 +19950,11 @@ components: description: The list of stock locations. items: $ref: '#/components/schemas/AdminStockLocation' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine AdminStockLocationResponse: type: object description: The stock location's details. @@ -20003,6 +20092,11 @@ components: description: The list of stores. items: $ref: '#/components/schemas/AdminStore' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine AdminStoreResponse: type: object description: The store's details. @@ -20012,6 +20106,23 @@ components: properties: store: $ref: '#/components/schemas/AdminStore' + AdminTaxProvider: + type: object + description: The tax provider's details. + x-schemaName: AdminTaxProvider + required: + - id + - is_enabled + properties: + id: + type: string + title: id + description: The tax provider's ID. + example: tp_taxjar_taxjar + is_enabled: + type: boolean + title: is_enabled + description: Whether the tax provider is enabled in the Medusa application. AdminTaxRate: type: object description: The tax rate's details. @@ -20275,22 +20386,6 @@ components: type: string title: title description: The API key's title. - AdminUpdateCollection: - type: object - description: The details to update in a collection. - x-schemaName: AdminUpdateCollection - properties: - title: - type: string - title: title - description: The collection's title. - handle: - type: string - title: handle - description: The collection's handle. - metadata: - type: object - description: The collection's metadata, can hold custom key-value pairs. AdminUpdateCustomerGroup: type: object description: The details to update in a customer group. @@ -21221,6 +21316,10 @@ components: metadata: type: object description: The tax region's metadata, can hold custom key-value pairs. + provider_id: + type: string + title: provider_id + description: The ID of the tax provider to use when calculating taxes for this tax region. AdminUpdateUser: type: object description: The properties to update in a user. @@ -21400,6 +21499,11 @@ components: description: The list of users. items: $ref: '#/components/schemas/AdminUser' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine AdminUserResponse: type: object description: The user's details. @@ -22896,7 +23000,7 @@ components: type: string title: province description: The address's lower-case ISO 3166-2 province code. - example: US-CA + example: us-ca externalDocs: url: https://en.wikipedia.org/wiki/ISO_3166-2 description: Learn more about ISO 3166-2 @@ -28709,6 +28813,11 @@ components: description: The list of currencies. items: $ref: '#/components/schemas/StoreCurrency' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine StoreCurrencyResponse: type: object description: The currency's details. @@ -28917,6 +29026,11 @@ components: description: The list of addresses. items: $ref: '#/components/schemas/StoreCustomerAddress' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine StoreCustomerAddressResponse: type: object description: The address's details. @@ -35578,6 +35692,11 @@ components: description: The list of product categories. items: $ref: '#/components/schemas/StoreProductCategory' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine StoreProductCategoryResponse: type: object description: The product category's details. @@ -35783,6 +35902,11 @@ components: description: The list of product tags. items: $ref: '#/components/schemas/StoreProductTag' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine StoreProductTagResponse: type: object description: The product tag's details. @@ -35855,6 +35979,11 @@ components: description: The list of product types. items: $ref: '#/components/schemas/StoreProductType' + estimate_count: + type: number + title: estimate_count + description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + x-featureFlag: index_engine StoreProductTypeResponse: type: object description: The product type's details. @@ -36104,60 +36233,72 @@ components: - canceled_at - received_at properties: - id: - type: string - title: id - description: The return's ID. - order_id: - type: string - title: order_id - description: The ID of the order this return is created for. - status: - type: string - title: status - description: The return's status. - exchange_id: - type: string - title: exchange_id - description: The ID of the associated exchange. - location_id: - type: string - title: location_id - description: The ID of the location the items are returned to. - claim_id: - type: string - title: claim_id - description: The ID of the associated claim. - display_id: - type: number - title: display_id - description: The return's display ID. - refund_amount: - type: number - title: refund_amount - description: The return's refunded amount. items: type: array description: The return's items. items: $ref: '#/components/schemas/StoreReturnItem' - received_at: + status: type: string - title: received_at - description: The date the return was received. + description: The return's status. + enum: + - received + - canceled + - requested + - open + - partially_received + id: + type: string + title: id + description: The return's ID. + display_id: + type: number + title: display_id + description: The return's display ID. created_at: type: string format: date-time title: created_at description: The date the return was created. + order_id: + type: string + title: order_id + description: The ID of the order this return belongs to. + location_id: + type: string + title: location_id + description: The ID of the location the return items are being returned to. canceled_at: type: string title: canceled_at - description: The date the return was updated. + description: The date the return was canceled. + exchange_id: + type: string + title: exchange_id + description: The ID of the associated exchange. + claim_id: + type: string + title: claim_id + description: The ID of the associated claim. + refund_amount: + type: number + title: refund_amount + description: The amount to be refunded. + received_at: + type: string + title: received_at + description: The date the return items were received. StoreReturnItem: type: object description: The return item's details. x-schemaName: StoreReturnItem + required: + - id + - quantity + - received_quantity + - damaged_quantity + - item_id + - return_id properties: id: type: string @@ -36194,13 +36335,6 @@ components: metadata: type: object description: The item's metadata, can hold custom key-value pairs. - required: - - id - - quantity - - received_quantity - - damaged_quantity - - item_id - - return_id StoreReturnReason: type: object description: The return reason's details. diff --git a/www/apps/api-reference/specs/store/openapi.yaml b/www/apps/api-reference/specs/store/openapi.yaml index c85da21706..6dae8d2e49 100644 --- a/www/apps/api-reference/specs/store/openapi.yaml +++ b/www/apps/api-reference/specs/store/openapi.yaml @@ -159,7 +159,7 @@ tags: url: https://docs.medusajs.com/resources/storefront-development/regions x-associatedSchema: $ref: ./components/schemas/StoreRegion.yaml - - name: Return + - name: Returns description: > Customers can request to return items in their order. The admin user then receives and handles the return. @@ -281,12 +281,12 @@ paths: $ref: paths/store_regions.yaml /store/regions/{id}: $ref: paths/store_regions_{id}.yaml - /store/return: - $ref: paths/store_return.yaml /store/return-reasons: $ref: paths/store_return-reasons.yaml /store/return-reasons/{id}: $ref: paths/store_return-reasons_{id}.yaml + /store/returns: + $ref: paths/store_returns.yaml /store/shipping-options: $ref: paths/store_shipping-options.yaml /store/shipping-options/{id}/calculate: diff --git a/www/apps/api-reference/specs/store/paths/store_carts_{id}_customer.yaml b/www/apps/api-reference/specs/store/paths/store_carts_{id}_customer.yaml index c6d771b002..a084f14ad2 100644 --- a/www/apps/api-reference/specs/store/paths/store_carts_{id}_customer.yaml +++ b/www/apps/api-reference/specs/store/paths/store_carts_{id}_customer.yaml @@ -76,4 +76,15 @@ post: '500': $ref: ../components/responses/500_error.yaml x-workflow: transferCartCustomerWorkflow - x-events: [] + x-events: + - name: cart.customer_transferred + payload: |- + ```ts + { + id, // The ID of the cart + customer_id, // The ID of the customer + } + ``` + description: Emitted when the customer in the cart is transferred. + deprecated: false + version: 2.8.0 diff --git a/www/apps/api-reference/specs/store/paths/store_return.yaml b/www/apps/api-reference/specs/store/paths/store_returns.yaml similarity index 65% rename from www/apps/api-reference/specs/store/paths/store_return.yaml rename to www/apps/api-reference/specs/store/paths/store_returns.yaml index 62713dc6e2..b793d2cc0a 100644 --- a/www/apps/api-reference/specs/store/paths/store_return.yaml +++ b/www/apps/api-reference/specs/store/paths/store_returns.yaml @@ -1,10 +1,19 @@ post: - operationId: PostReturn + operationId: PostReturns summary: Create Return description: >- Create a return for an order's items. The admin receives the return and process it from their side. x-authenticated: false + parameters: + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key requestBody: content: application/json: @@ -14,9 +23,9 @@ post: - lang: Shell label: cURL source: - $ref: ../code_samples/Shell/store_return/post.sh + $ref: ../code_samples/Shell/store_returns/post.sh tags: - - Return + - Returns responses: '200': description: OK @@ -37,12 +46,25 @@ post: '500': $ref: ../components/responses/500_error.yaml x-workflow: createAndCompleteReturnOrderWorkflow - parameters: - - name: x-publishable-api-key - in: header - description: Publishable API Key created in the Medusa Admin. - required: true - schema: - type: string - externalDocs: - url: https://docs.medusajs.com/api/store#publishable-api-key + x-events: + - name: order.return_requested + payload: |- + ```ts + { + order_id, // The ID of the order + return_id, // The ID of the return + } + ``` + description: Emitted when a return request is confirmed. + deprecated: false + - name: order.return_received + payload: |- + ```ts + { + order_id, // The ID of the order + return_id, // The ID of the return + } + ``` + description: Emitted when a return is marked as received. + deprecated: false + x-version: 2.8.0 diff --git a/www/packages/docs-ui/src/components/FeatureFlagNotice/index.tsx b/www/packages/docs-ui/src/components/FeatureFlagNotice/index.tsx index 31c2a331ed..9e1163fad0 100644 --- a/www/packages/docs-ui/src/components/FeatureFlagNotice/index.tsx +++ b/www/packages/docs-ui/src/components/FeatureFlagNotice/index.tsx @@ -1,5 +1,5 @@ import React from "react" -import { Badge, Link, Tooltip } from "@/components" +import { Badge, Tooltip } from "@/components" export type FeatureFlagNoticeProps = { featureFlag: string @@ -22,12 +22,8 @@ export const FeatureFlagNotice = ({ To use this {type}, make sure to
- - enable its feature flag: {featureFlag} - + {/* TODO add doc link once available */} + enable its feature flag: {featureFlag}
} clickable diff --git a/www/utils/generated/oas-output/base/admin.oas.base.yaml b/www/utils/generated/oas-output/base/admin.oas.base.yaml index 77b8c285fb..3acc1e19aa 100644 --- a/www/utils/generated/oas-output/base/admin.oas.base.yaml +++ b/www/utils/generated/oas-output/base/admin.oas.base.yaml @@ -253,7 +253,8 @@ tags: $ref: "#/components/schemas/AdminPayment" - name: Plugins description: > - A plugin is a package of reusable Medusa customizations that you can install in any Medusa application. + A plugin is a package of reusable Medusa customizations that you can + install in any Medusa application. Plugins can be used to add new functionality, such as wishlists, or integrate third-party services, such as payment providers. @@ -516,6 +517,17 @@ tags: url: https://docs.medusajs.com/resources/commerce-modules/store x-associatedSchema: $ref: "#/components/schemas/AdminStore" + - name: Tax Providers + description: > + A tax provider is a third-party integration or custom logic used to + calculate taxes for a cart or an order. + + These API routes allow admin users to manage tax providers installed in their Medusa application. + externalDocs: + description: Learn more about the Tax Module Providers + url: https://docs.medusajs.com/resources/commerce-modules/tax/tax-provider + x-associatedSchema: + $ref: "#/components/schemas/AdminTaxProvider" - name: Tax Rates description: > A tax rate is a percentage amount used to calculate the tax amount of each diff --git a/www/utils/generated/oas-output/base/store.oas.base.yaml b/www/utils/generated/oas-output/base/store.oas.base.yaml index 06ec343cc8..b549a3bc01 100644 --- a/www/utils/generated/oas-output/base/store.oas.base.yaml +++ b/www/utils/generated/oas-output/base/store.oas.base.yaml @@ -142,7 +142,7 @@ tags: url: https://docs.medusajs.com/resources/storefront-development/regions x-associatedSchema: $ref: "#/components/schemas/StoreRegion" - - name: Return + - name: Returns description: > Customers can request to return items in their order. The admin user then receives and handles the return. @@ -353,4 +353,4 @@ components: type: http x-displayName: Reset Password Token scheme: bearer - x-is-auth: false \ No newline at end of file + x-is-auth: false diff --git a/www/utils/generated/oas-output/operations/admin/delete_admin_order-edits_[id].ts b/www/utils/generated/oas-output/operations/admin/delete_admin_order-edits_[id].ts index bf069cd9a6..1e41ba92ae 100644 --- a/www/utils/generated/oas-output/operations/admin/delete_admin_order-edits_[id].ts +++ b/www/utils/generated/oas-output/operations/admin/delete_admin_order-edits_[id].ts @@ -2,7 +2,7 @@ * @oas [delete] /admin/order-edits/{id} * operationId: DeleteOrderEditsId * summary: Cancel Order Edit - * description: Cancel an order edit. + * description: Cancel a requested order edit. * x-authenticated: true * parameters: * - name: id @@ -79,6 +79,18 @@ * "500": * $ref: "#/components/responses/500_error" * x-workflow: cancelBeginOrderEditWorkflow + * x-events: + * - name: order-edit.canceled + * payload: |- + * ```ts + * { + * order_id, // The ID of the order + * actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order + * } + * ``` + * description: Emitted when an order edit request is canceled. + * deprecated: false + * version: 2.8.0 * */ diff --git a/www/utils/generated/oas-output/operations/admin/get_admin_tax-providers.ts b/www/utils/generated/oas-output/operations/admin/get_admin_tax-providers.ts new file mode 100644 index 0000000000..7d336808bb --- /dev/null +++ b/www/utils/generated/oas-output/operations/admin/get_admin_tax-providers.ts @@ -0,0 +1,179 @@ +/** + * @oas [get] /admin/tax-providers + * operationId: GetTaxProviders + * summary: List Tax Providers + * description: Retrieve a list of tax providers installed in the Medusa application through Tax Module Providers. The tax providers can be filtered by fields such as `id`. The tax providers can also be sorted or paginated. + * x-authenticated: true + * parameters: + * - name: fields + * in: query + * 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. + * required: false + * schema: + * type: string + * 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. + * externalDocs: + * url: "#select-fields-and-relations" + * - name: offset + * in: query + * description: The number of items to skip when retrieving a list. + * required: false + * schema: + * type: number + * title: offset + * description: The number of items to skip when retrieving a list. + * externalDocs: + * url: "#pagination" + * - name: limit + * in: query + * description: Limit the number of items returned in the list. + * required: false + * schema: + * type: number + * title: limit + * description: Limit the number of items returned in the list. + * externalDocs: + * url: "#pagination" + * - name: order + * in: query + * description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`. + * required: false + * schema: + * type: string + * title: order + * description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`. + * externalDocs: + * url: "#pagination" + * - name: id + * in: query + * required: false + * schema: + * oneOf: + * - type: string + * title: id + * description: Filter by a tax provider's ID. + * - type: array + * description: Filter by tax provider IDs. + * items: + * type: string + * title: id + * description: A tax provider's ID. + * - name: is_enabled + * in: query + * description: Filter by whether the tax provider is enabled. + * required: false + * schema: + * type: boolean + * title: is_enabled + * description: Filter by whether the tax provider is enabled. + * - name: $and + * in: query + * description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters. + * required: false + * schema: + * type: array + * description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters. + * items: + * type: object + * title: $and + * - name: $or + * in: query + * description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters. + * required: false + * schema: + * type: array + * description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters. + * items: + * type: object + * title: $or + * security: + * - api_token: [] + * - cookie_auth: [] + * - jwt_token: [] + * x-codeSamples: + * - lang: JavaScript + * label: JS SDK + * source: |- + * import Medusa from "@medusajs/js-sdk" + * + * export const sdk = new Medusa({ + * baseUrl: import.meta.env.VITE_BACKEND_URL || "/", + * debug: import.meta.env.DEV, + * auth: { + * type: "session", + * }, + * }) + * + * sdk.admin.taxProvider.list() + * .then(({ tax_providers, count, limit, offset }) => { + * console.log(tax_providers) + * }) + * - lang: Shell + * label: cURL + * source: |- + * curl '{backend_url}/admin/tax-providers' \ + * -H 'Authorization: Bearer {access_token}' + * tags: + * - Tax Providers + * responses: + * "200": + * description: OK + * content: + * application/json: + * schema: + * allOf: + * - type: object + * description: The pagination details. + * required: + * - limit + * - offset + * - count + * properties: + * limit: + * type: number + * title: limit + * description: The maximum number of items retrieved. + * offset: + * type: number + * title: offset + * description: The number of items skipped before retrieving the returned items. + * count: + * type: number + * title: count + * description: The total number of items available. + * estimate_count: + * type: number + * title: estimate_count + * description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + * x-featureFlag: index_engine + * - type: object + * description: The list of tax providers. + * required: + * - tax_providers + * properties: + * tax_providers: + * type: array + * description: The list of tax providers. + * items: + * $ref: "#/components/schemas/AdminTaxProvider" + * "400": + * $ref: "#/components/responses/400_error" + * "401": + * $ref: "#/components/responses/unauthorized" + * "404": + * $ref: "#/components/responses/not_found_error" + * "409": + * $ref: "#/components/responses/invalid_state_error" + * "422": + * $ref: "#/components/responses/invalid_request_error" + * "500": + * $ref: "#/components/responses/500_error" + * x-version: 2.8.0 + * +*/ + diff --git a/www/utils/generated/oas-output/operations/admin/get_admin_tax-regions_[id].ts b/www/utils/generated/oas-output/operations/admin/get_admin_tax-regions_[id].ts index cff7412ab7..e6c3c0939c 100644 --- a/www/utils/generated/oas-output/operations/admin/get_admin_tax-regions_[id].ts +++ b/www/utils/generated/oas-output/operations/admin/get_admin_tax-regions_[id].ts @@ -23,6 +23,29 @@ * fields. without prefix it will replace the entire default fields. * externalDocs: * url: "#select-fields-and-relations" + * - name: province_code + * in: query + * description: Filter by a tax region's province code. + * required: false + * schema: + * type: string + * title: province_code + * description: Filter by a tax region's province code. + * - name: provider_id + * in: query + * description: Filter by a tax provider ID to retrieve the tax regions using it. + * required: false + * schema: + * type: string + * title: provider_id + * description: Filter by a tax provider ID to retrieve the tax regions using it. + * - name: metadata + * in: query + * description: Filter by a tax region's metadata. Refer to the [Object Query Parameter](https://docs.medusajs.com/api/admin#object) section to learn how to filter by object fields. + * required: false + * schema: + * type: object + * description: Filter by a tax region's metadata. Refer to the [Object Query Parameter](https://docs.medusajs.com/api/admin#object) section to learn how to filter by object fields. * security: * - api_token: [] * - cookie_auth: [] diff --git a/www/utils/generated/oas-output/operations/admin/get_admin_workflows-executions.ts b/www/utils/generated/oas-output/operations/admin/get_admin_workflows-executions.ts index 381e81bcf8..35c156beaf 100644 --- a/www/utils/generated/oas-output/operations/admin/get_admin_workflows-executions.ts +++ b/www/utils/generated/oas-output/operations/admin/get_admin_workflows-executions.ts @@ -73,6 +73,14 @@ * type: string * title: workflow_id * description: A workflow ID. + * - name: q + * in: query + * description: Search query to filter by a workflow execution's searchable fields. + * required: false + * schema: + * type: string + * title: q + * description: Search query to filter by a workflow execution's searchable fields. * security: * - api_token: [] * - cookie_auth: [] diff --git a/www/utils/generated/oas-output/operations/admin/post_admin_collections.ts b/www/utils/generated/oas-output/operations/admin/post_admin_collections.ts index 73edcba80a..ed787c870b 100644 --- a/www/utils/generated/oas-output/operations/admin/post_admin_collections.ts +++ b/www/utils/generated/oas-output/operations/admin/post_admin_collections.ts @@ -25,7 +25,30 @@ * content: * application/json: * schema: - * $ref: "#/components/schemas/AdminCreateCollection" + * allOf: + * - type: object + * description: The collection's details. + * required: + * - title + * properties: + * title: + * type: string + * title: title + * description: The collection's title. + * handle: + * type: string + * title: handle + * description: The collection's handle. + * metadata: + * type: object + * description: The collection's metadata. Can hold custom key-value pairs. + * - type: object + * description: The collection's details. + * properties: + * additional_data: + * type: object + * description: Pass additional custom data to the API route. This data is passed to the underlying workflow under the `additional_data` parameter. + * description: the product collection's details. * x-codeSamples: * - lang: JavaScript * label: JS SDK diff --git a/www/utils/generated/oas-output/operations/admin/post_admin_collections_[id].ts b/www/utils/generated/oas-output/operations/admin/post_admin_collections_[id].ts index 171d87e1b5..fba714fafc 100644 --- a/www/utils/generated/oas-output/operations/admin/post_admin_collections_[id].ts +++ b/www/utils/generated/oas-output/operations/admin/post_admin_collections_[id].ts @@ -31,7 +31,28 @@ * content: * application/json: * schema: - * $ref: "#/components/schemas/AdminUpdateCollection" + * allOf: + * - type: object + * description: The details to update in a collection. + * properties: + * title: + * type: string + * title: title + * description: The collection's title. + * handle: + * type: string + * title: handle + * description: The collection's handle. + * metadata: + * type: object + * description: The collection's metadata. + * - type: object + * description: The details to update in a collection. + * properties: + * additional_data: + * type: object + * description: Pass additional custom data to the API route. This data is passed to the underlying workflow under the `additional_data` parameter. + * description: The details to update in a collection. * x-codeSamples: * - lang: JavaScript * label: JS SDK diff --git a/www/utils/generated/oas-output/operations/admin/post_admin_order-edits_[id]_confirm.ts b/www/utils/generated/oas-output/operations/admin/post_admin_order-edits_[id]_confirm.ts index 4f05531f18..851bebfc92 100644 --- a/www/utils/generated/oas-output/operations/admin/post_admin_order-edits_[id]_confirm.ts +++ b/www/utils/generated/oas-output/operations/admin/post_admin_order-edits_[id]_confirm.ts @@ -60,6 +60,18 @@ * "500": * $ref: "#/components/responses/500_error" * x-workflow: confirmOrderEditRequestWorkflow + * x-events: + * - name: order-edit.confirmed + * payload: |- + * ```ts + * { + * order_id, // The ID of the order + * actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order + * } + * ``` + * description: Emitted when an order edit request is confirmed. + * deprecated: false + * version: 2.8.0 * */ diff --git a/www/utils/generated/oas-output/operations/admin/post_admin_order-edits_[id]_request.ts b/www/utils/generated/oas-output/operations/admin/post_admin_order-edits_[id]_request.ts index 6838cea330..85fed990b1 100644 --- a/www/utils/generated/oas-output/operations/admin/post_admin_order-edits_[id]_request.ts +++ b/www/utils/generated/oas-output/operations/admin/post_admin_order-edits_[id]_request.ts @@ -60,6 +60,18 @@ * "500": * $ref: "#/components/responses/500_error" * x-workflow: requestOrderEditRequestWorkflow + * x-events: + * - name: order-edit.requested + * payload: |- + * ```ts + * { + * order_id, // The ID of the order + * actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order + * } + * ``` + * description: Emitted when an order edit is requested. + * deprecated: false + * version: 2.8.0 * */ diff --git a/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_customer.ts b/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_customer.ts index b6f4c1cdb2..fba9bbc38e 100644 --- a/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_customer.ts +++ b/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_customer.ts @@ -86,7 +86,18 @@ * "500": * $ref: "#/components/responses/500_error" * x-workflow: transferCartCustomerWorkflow - * x-events: [] + * x-events: + * - name: cart.customer_transferred + * payload: |- + * ```ts + * { + * id, // The ID of the cart + * customer_id, // The ID of the customer + * } + * ``` + * description: Emitted when the customer in the cart is transferred. + * deprecated: false + * version: 2.8.0 * */ diff --git a/www/utils/generated/oas-output/operations/store/post_store_return.ts b/www/utils/generated/oas-output/operations/store/post_store_returns.ts similarity index 70% rename from www/utils/generated/oas-output/operations/store/post_store_return.ts rename to www/utils/generated/oas-output/operations/store/post_store_returns.ts index d0e2951e55..125f7acba0 100644 --- a/www/utils/generated/oas-output/operations/store/post_store_return.ts +++ b/www/utils/generated/oas-output/operations/store/post_store_returns.ts @@ -1,9 +1,18 @@ /** - * @oas [post] /store/return - * operationId: PostReturn + * @oas [post] /store/returns + * operationId: PostReturns * summary: Create Return * description: Create a return for an order's items. The admin receives the return and process it from their side. * x-authenticated: false + * parameters: + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * requestBody: * content: * application/json: @@ -13,11 +22,11 @@ * - lang: Shell * label: cURL * source: |- - * curl -X POST '{backend_url}/store/return' \ - * -H 'Content-Type: application/json' \ + * curl -X POST '{backend_url}/store/returns' \ * -H 'x-publishable-api-key: {your_publishable_api_key}' \ + * -H 'Content-Type: application/json' \ * --data-raw '{ - * "order_id": "{value}", + * "order_id": "order_123", * "items": [ * { * "id": "id_XbfptxUVo2io9EI", @@ -34,7 +43,7 @@ * "location_id": "{value}" * }' * tags: - * - Return + * - Returns * responses: * "200": * description: OK @@ -55,15 +64,28 @@ * "500": * $ref: "#/components/responses/500_error" * x-workflow: createAndCompleteReturnOrderWorkflow - * parameters: - * - name: x-publishable-api-key - * in: header - * description: Publishable API Key created in the Medusa Admin. - * required: true - * schema: - * type: string - * externalDocs: - * url: https://docs.medusajs.com/api/store#publishable-api-key + * x-events: + * - name: order.return_requested + * payload: |- + * ```ts + * { + * order_id, // The ID of the order + * return_id, // The ID of the return + * } + * ``` + * description: Emitted when a return request is confirmed. + * deprecated: false + * - name: order.return_received + * payload: |- + * ```ts + * { + * order_id, // The ID of the order + * return_id, // The ID of the return + * } + * ``` + * description: Emitted when a return is marked as received. + * deprecated: false + * x-version: 2.8.0 * */ diff --git a/www/utils/generated/oas-output/schemas/AdminClaimListResponse.ts b/www/utils/generated/oas-output/schemas/AdminClaimListResponse.ts index a0e24b747b..c291b602cd 100644 --- a/www/utils/generated/oas-output/schemas/AdminClaimListResponse.ts +++ b/www/utils/generated/oas-output/schemas/AdminClaimListResponse.ts @@ -26,6 +26,11 @@ * description: The list of claims. * items: * $ref: "#/components/schemas/AdminClaim" + * estimate_count: + * type: number + * title: estimate_count + * description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + * x-featureFlag: index_engine * */ diff --git a/www/utils/generated/oas-output/schemas/AdminCollectionListResponse.ts b/www/utils/generated/oas-output/schemas/AdminCollectionListResponse.ts index c578941bdd..8e14922cd9 100644 --- a/www/utils/generated/oas-output/schemas/AdminCollectionListResponse.ts +++ b/www/utils/generated/oas-output/schemas/AdminCollectionListResponse.ts @@ -26,6 +26,11 @@ * description: The list of product collections. * items: * $ref: "#/components/schemas/AdminCollection" + * estimate_count: + * type: number + * title: estimate_count + * description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + * x-featureFlag: index_engine * */ diff --git a/www/utils/generated/oas-output/schemas/AdminCreateCollection.ts b/www/utils/generated/oas-output/schemas/AdminCreateCollection.ts deleted file mode 100644 index 4fceeca1b6..0000000000 --- a/www/utils/generated/oas-output/schemas/AdminCreateCollection.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * @schema AdminCreateCollection - * type: object - * description: the product collection's details. - * x-schemaName: AdminCreateCollection - * required: - * - title - * properties: - * title: - * type: string - * title: title - * description: The collection's title. - * handle: - * type: string - * title: handle - * description: The collection's handle. - * metadata: - * type: object - * description: The collection's metadata, used to store custom key-value pairs. - * -*/ - diff --git a/www/utils/generated/oas-output/schemas/AdminCreateFulfillment.ts b/www/utils/generated/oas-output/schemas/AdminCreateFulfillment.ts index ab7876e7e5..c54962ed3f 100644 --- a/www/utils/generated/oas-output/schemas/AdminCreateFulfillment.ts +++ b/www/utils/generated/oas-output/schemas/AdminCreateFulfillment.ts @@ -61,7 +61,7 @@ * type: string * title: province * description: The delivery address's ISO 3166-2 province code. Must be lower-case. - * example: "us-ca" + * example: us-ca * externalDocs: * url: https://en.wikipedia.org/wiki/ISO_3166-2 * description: Learn more about ISO 3166-2 diff --git a/www/utils/generated/oas-output/schemas/AdminCreateTaxRegion.ts b/www/utils/generated/oas-output/schemas/AdminCreateTaxRegion.ts index 4e71514c31..e6cf9aa277 100644 --- a/www/utils/generated/oas-output/schemas/AdminCreateTaxRegion.ts +++ b/www/utils/generated/oas-output/schemas/AdminCreateTaxRegion.ts @@ -15,7 +15,7 @@ * type: string * title: province_code * description: The tax region's ISO 3166-2 province code. Must be lower-case. - * example: "us-ca" + * example: us-ca * externalDocs: * url: https://en.wikipedia.org/wiki/ISO_3166-2 * description: Learn more about ISO 3166-2 @@ -55,6 +55,10 @@ * metadata: * type: object * description: The tax region's metadata, used to store custom key-value pairs. + * provider_id: + * type: string + * title: provider_id + * description: The ID of the tax provider used to calculate the tax rate in this tax region. * */ diff --git a/www/utils/generated/oas-output/schemas/AdminCurrencyListResponse.ts b/www/utils/generated/oas-output/schemas/AdminCurrencyListResponse.ts index 63b32e1b92..c64369e069 100644 --- a/www/utils/generated/oas-output/schemas/AdminCurrencyListResponse.ts +++ b/www/utils/generated/oas-output/schemas/AdminCurrencyListResponse.ts @@ -26,6 +26,11 @@ * description: The list of currencies. * items: * $ref: "#/components/schemas/AdminCurrency" + * estimate_count: + * type: number + * title: estimate_count + * description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + * x-featureFlag: index_engine * */ diff --git a/www/utils/generated/oas-output/schemas/AdminCustomerAddress.ts b/www/utils/generated/oas-output/schemas/AdminCustomerAddress.ts index 576584c04a..4d6639b1a2 100644 --- a/www/utils/generated/oas-output/schemas/AdminCustomerAddress.ts +++ b/www/utils/generated/oas-output/schemas/AdminCustomerAddress.ts @@ -76,7 +76,7 @@ * type: string * title: province * description: The address's lower-case ISO 3166-2 province code. - * example: "us-ca" + * example: us-ca * externalDocs: * url: https://en.wikipedia.org/wiki/ISO_3166-2 * description: Learn more about ISO 3166-2 diff --git a/www/utils/generated/oas-output/schemas/AdminDraftOrderListResponse.ts b/www/utils/generated/oas-output/schemas/AdminDraftOrderListResponse.ts index 77fc6c8445..52f01896ef 100644 --- a/www/utils/generated/oas-output/schemas/AdminDraftOrderListResponse.ts +++ b/www/utils/generated/oas-output/schemas/AdminDraftOrderListResponse.ts @@ -26,6 +26,11 @@ * description: The list of draft orders. * items: * $ref: "#/components/schemas/AdminDraftOrder" + * estimate_count: + * type: number + * title: estimate_count + * description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + * x-featureFlag: index_engine * */ diff --git a/www/utils/generated/oas-output/schemas/AdminFulfillmentAddress.ts b/www/utils/generated/oas-output/schemas/AdminFulfillmentAddress.ts index f542d27224..383604fbdc 100644 --- a/www/utils/generated/oas-output/schemas/AdminFulfillmentAddress.ts +++ b/www/utils/generated/oas-output/schemas/AdminFulfillmentAddress.ts @@ -61,7 +61,7 @@ * type: string * title: province * description: The address's lower-case ISO 3166-2 province code. - * example: "us-ca" + * example: us-ca * externalDocs: * url: https://en.wikipedia.org/wiki/ISO_3166-2 * description: Learn more about ISO 3166-2 diff --git a/www/utils/generated/oas-output/schemas/AdminFulfillmentProviderListResponse.ts b/www/utils/generated/oas-output/schemas/AdminFulfillmentProviderListResponse.ts index bb105c4dd3..98e44948e3 100644 --- a/www/utils/generated/oas-output/schemas/AdminFulfillmentProviderListResponse.ts +++ b/www/utils/generated/oas-output/schemas/AdminFulfillmentProviderListResponse.ts @@ -26,6 +26,11 @@ * description: The list of fulfillment providers. * items: * $ref: "#/components/schemas/AdminFulfillmentProvider" + * estimate_count: + * type: number + * title: estimate_count + * description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + * x-featureFlag: index_engine * */ diff --git a/www/utils/generated/oas-output/schemas/AdminFulfillmentProviderOptionsListResponse.ts b/www/utils/generated/oas-output/schemas/AdminFulfillmentProviderOptionsListResponse.ts index beaf439abc..ababa04a6e 100644 --- a/www/utils/generated/oas-output/schemas/AdminFulfillmentProviderOptionsListResponse.ts +++ b/www/utils/generated/oas-output/schemas/AdminFulfillmentProviderOptionsListResponse.ts @@ -26,6 +26,11 @@ * description: The list of fulfillment options. * items: * $ref: "#/components/schemas/AdminFulfillmentProviderOption" + * estimate_count: + * type: number + * title: estimate_count + * description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + * x-featureFlag: index_engine * */ diff --git a/www/utils/generated/oas-output/schemas/AdminGeoZone.ts b/www/utils/generated/oas-output/schemas/AdminGeoZone.ts index 9ba0067f31..f5176525a6 100644 --- a/www/utils/generated/oas-output/schemas/AdminGeoZone.ts +++ b/www/utils/generated/oas-output/schemas/AdminGeoZone.ts @@ -34,7 +34,7 @@ * type: string * title: province_code * description: The geo zone's lower-case ISO 3166-2 province code. - * example: "us-ca" + * example: us-ca * externalDocs: * url: https://en.wikipedia.org/wiki/ISO_3166-2 * description: Learn more about ISO 3166-2 diff --git a/www/utils/generated/oas-output/schemas/AdminNotificationListResponse.ts b/www/utils/generated/oas-output/schemas/AdminNotificationListResponse.ts index d5570432be..5f5a3dfe90 100644 --- a/www/utils/generated/oas-output/schemas/AdminNotificationListResponse.ts +++ b/www/utils/generated/oas-output/schemas/AdminNotificationListResponse.ts @@ -26,6 +26,11 @@ * description: The list of notifications. * items: * $ref: "#/components/schemas/AdminNotification" + * estimate_count: + * type: number + * title: estimate_count + * description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + * x-featureFlag: index_engine * */ diff --git a/www/utils/generated/oas-output/schemas/AdminOrderAddress.ts b/www/utils/generated/oas-output/schemas/AdminOrderAddress.ts index c254cd2954..d14fcc9202 100644 --- a/www/utils/generated/oas-output/schemas/AdminOrderAddress.ts +++ b/www/utils/generated/oas-output/schemas/AdminOrderAddress.ts @@ -56,7 +56,7 @@ * type: string * title: province * description: The address's lower-case ISO 3166-2 province code. - * example: "us-ca" + * example: us-ca * externalDocs: * url: https://en.wikipedia.org/wiki/ISO_3166-2 * description: Learn more about ISO 3166-2 diff --git a/www/utils/generated/oas-output/schemas/AdminPriceListListResponse.ts b/www/utils/generated/oas-output/schemas/AdminPriceListListResponse.ts index 0254af92ba..cd90c7ff19 100644 --- a/www/utils/generated/oas-output/schemas/AdminPriceListListResponse.ts +++ b/www/utils/generated/oas-output/schemas/AdminPriceListListResponse.ts @@ -26,6 +26,11 @@ * description: The list of price lists. * items: * $ref: "#/components/schemas/AdminPriceList" + * estimate_count: + * type: number + * title: estimate_count + * description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + * x-featureFlag: index_engine * */ diff --git a/www/utils/generated/oas-output/schemas/AdminPricePreferenceListResponse.ts b/www/utils/generated/oas-output/schemas/AdminPricePreferenceListResponse.ts index a09964855a..6fc1af2750 100644 --- a/www/utils/generated/oas-output/schemas/AdminPricePreferenceListResponse.ts +++ b/www/utils/generated/oas-output/schemas/AdminPricePreferenceListResponse.ts @@ -26,6 +26,11 @@ * description: The list of price preferences. * items: * $ref: "#/components/schemas/AdminPricePreference" + * estimate_count: + * type: number + * title: estimate_count + * description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + * x-featureFlag: index_engine * */ diff --git a/www/utils/generated/oas-output/schemas/AdminProductCategoryListResponse.ts b/www/utils/generated/oas-output/schemas/AdminProductCategoryListResponse.ts index da538ec956..baee2b719a 100644 --- a/www/utils/generated/oas-output/schemas/AdminProductCategoryListResponse.ts +++ b/www/utils/generated/oas-output/schemas/AdminProductCategoryListResponse.ts @@ -26,6 +26,11 @@ * description: The list of product categories. * items: * $ref: "#/components/schemas/AdminProductCategory" + * estimate_count: + * type: number + * title: estimate_count + * description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + * x-featureFlag: index_engine * */ diff --git a/www/utils/generated/oas-output/schemas/AdminProductTagListResponse.ts b/www/utils/generated/oas-output/schemas/AdminProductTagListResponse.ts index 4c726ccdab..ba7a599e4c 100644 --- a/www/utils/generated/oas-output/schemas/AdminProductTagListResponse.ts +++ b/www/utils/generated/oas-output/schemas/AdminProductTagListResponse.ts @@ -26,6 +26,11 @@ * description: The list of product tags. * items: * $ref: "#/components/schemas/AdminProductTag" + * estimate_count: + * type: number + * title: estimate_count + * description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + * x-featureFlag: index_engine * */ diff --git a/www/utils/generated/oas-output/schemas/AdminProductTypeListResponse.ts b/www/utils/generated/oas-output/schemas/AdminProductTypeListResponse.ts index fbedc2d6d9..7b7eed2799 100644 --- a/www/utils/generated/oas-output/schemas/AdminProductTypeListResponse.ts +++ b/www/utils/generated/oas-output/schemas/AdminProductTypeListResponse.ts @@ -26,6 +26,11 @@ * description: The list of product types. * items: * $ref: "#/components/schemas/AdminProductType" + * estimate_count: + * type: number + * title: estimate_count + * description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + * x-featureFlag: index_engine * */ diff --git a/www/utils/generated/oas-output/schemas/AdminReturnReasonListResponse.ts b/www/utils/generated/oas-output/schemas/AdminReturnReasonListResponse.ts index 3c04049a7d..2c741b41df 100644 --- a/www/utils/generated/oas-output/schemas/AdminReturnReasonListResponse.ts +++ b/www/utils/generated/oas-output/schemas/AdminReturnReasonListResponse.ts @@ -26,6 +26,11 @@ * description: The list of return reasons. * items: * $ref: "#/components/schemas/AdminReturnReason" + * estimate_count: + * type: number + * title: estimate_count + * description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + * x-featureFlag: index_engine * */ diff --git a/www/utils/generated/oas-output/schemas/AdminStockLocationAddress.ts b/www/utils/generated/oas-output/schemas/AdminStockLocationAddress.ts index c47ce9e6bf..cad6873105 100644 --- a/www/utils/generated/oas-output/schemas/AdminStockLocationAddress.ts +++ b/www/utils/generated/oas-output/schemas/AdminStockLocationAddress.ts @@ -41,7 +41,7 @@ * type: string * title: province * description: The address's lower-case ISO 3166-2 province code. - * example: "us-ca" + * example: us-ca * externalDocs: * url: https://en.wikipedia.org/wiki/ISO_3166-2 * description: Learn more about ISO 3166-2 diff --git a/www/utils/generated/oas-output/schemas/AdminStockLocationListResponse.ts b/www/utils/generated/oas-output/schemas/AdminStockLocationListResponse.ts index 719e3d9609..b2d08ff613 100644 --- a/www/utils/generated/oas-output/schemas/AdminStockLocationListResponse.ts +++ b/www/utils/generated/oas-output/schemas/AdminStockLocationListResponse.ts @@ -26,6 +26,11 @@ * description: The list of stock locations. * items: * $ref: "#/components/schemas/AdminStockLocation" + * estimate_count: + * type: number + * title: estimate_count + * description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + * x-featureFlag: index_engine * */ diff --git a/www/utils/generated/oas-output/schemas/AdminStoreListResponse.ts b/www/utils/generated/oas-output/schemas/AdminStoreListResponse.ts index b2ab6595e8..4fc31aff7e 100644 --- a/www/utils/generated/oas-output/schemas/AdminStoreListResponse.ts +++ b/www/utils/generated/oas-output/schemas/AdminStoreListResponse.ts @@ -26,6 +26,11 @@ * description: The list of stores. * items: * $ref: "#/components/schemas/AdminStore" + * estimate_count: + * type: number + * title: estimate_count + * description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + * x-featureFlag: index_engine * */ diff --git a/www/utils/generated/oas-output/schemas/AdminTaxProvider.ts b/www/utils/generated/oas-output/schemas/AdminTaxProvider.ts new file mode 100644 index 0000000000..5ddf791ef2 --- /dev/null +++ b/www/utils/generated/oas-output/schemas/AdminTaxProvider.ts @@ -0,0 +1,21 @@ +/** + * @schema AdminTaxProvider + * type: object + * description: The tax provider's details. + * x-schemaName: AdminTaxProvider + * required: + * - id + * - is_enabled + * properties: + * id: + * type: string + * title: id + * description: The tax provider's ID. + * example: tp_taxjar_taxjar + * is_enabled: + * type: boolean + * title: is_enabled + * description: Whether the tax provider is enabled in the Medusa application. + * +*/ + diff --git a/www/utils/generated/oas-output/schemas/AdminTaxRegion.ts b/www/utils/generated/oas-output/schemas/AdminTaxRegion.ts index 12bd569868..deb0a1336c 100644 --- a/www/utils/generated/oas-output/schemas/AdminTaxRegion.ts +++ b/www/utils/generated/oas-output/schemas/AdminTaxRegion.ts @@ -30,7 +30,7 @@ * type: string * title: province_code * description: The tax region's lower-case ISO 3166-2 province code. - * example: "us-ca" + * example: us-ca * externalDocs: * url: https://en.wikipedia.org/wiki/ISO_3166-2 * description: Learn more about ISO 3166-2 diff --git a/www/utils/generated/oas-output/schemas/AdminUpdateCollection.ts b/www/utils/generated/oas-output/schemas/AdminUpdateCollection.ts deleted file mode 100644 index f6b54f2118..0000000000 --- a/www/utils/generated/oas-output/schemas/AdminUpdateCollection.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * @schema AdminUpdateCollection - * type: object - * description: The details to update in a collection. - * x-schemaName: AdminUpdateCollection - * properties: - * title: - * type: string - * title: title - * description: The collection's title. - * handle: - * type: string - * title: handle - * description: The collection's handle. - * metadata: - * type: object - * description: The collection's metadata, can hold custom key-value pairs. - * -*/ - diff --git a/www/utils/generated/oas-output/schemas/AdminUpdateDraftOrder.ts b/www/utils/generated/oas-output/schemas/AdminUpdateDraftOrder.ts index c304160318..73dcdc5a5b 100644 --- a/www/utils/generated/oas-output/schemas/AdminUpdateDraftOrder.ts +++ b/www/utils/generated/oas-output/schemas/AdminUpdateDraftOrder.ts @@ -50,7 +50,7 @@ * type: string * title: province * description: The shipping address's ISO 3166-2 province code. Must be lower-case. - * example: "us-ca" + * example: us-ca * externalDocs: * url: https://en.wikipedia.org/wiki/ISO_3166-2 * description: Learn more about ISO 3166-2 @@ -102,7 +102,7 @@ * type: string * title: province * description: The billing address's ISO 3166-2 province code. Must be lower-case. - * example: "us-ca" + * example: us-ca * externalDocs: * url: https://en.wikipedia.org/wiki/ISO_3166-2 * description: Learn more about ISO 3166-2 diff --git a/www/utils/generated/oas-output/schemas/AdminUpdateOrder.ts b/www/utils/generated/oas-output/schemas/AdminUpdateOrder.ts index e5c41b9c77..59c984a45e 100644 --- a/www/utils/generated/oas-output/schemas/AdminUpdateOrder.ts +++ b/www/utils/generated/oas-output/schemas/AdminUpdateOrder.ts @@ -50,7 +50,7 @@ * type: string * title: province * description: The address's ISO 3166-2 province code. Must be lower-case. - * example: "us-ca" + * example: us-ca * externalDocs: * url: https://en.wikipedia.org/wiki/ISO_3166-2 * description: Learn more about ISO 3166-2 @@ -102,7 +102,7 @@ * type: string * title: province * description: The address's ISO 3166-2 province code. Must be lower-case. - * example: "us-ca" + * example: us-ca * externalDocs: * url: https://en.wikipedia.org/wiki/ISO_3166-2 * description: Learn more about ISO 3166-2 diff --git a/www/utils/generated/oas-output/schemas/AdminUpdateStockLocation.ts b/www/utils/generated/oas-output/schemas/AdminUpdateStockLocation.ts index 9a58b5e005..a8aa8b84a5 100644 --- a/www/utils/generated/oas-output/schemas/AdminUpdateStockLocation.ts +++ b/www/utils/generated/oas-output/schemas/AdminUpdateStockLocation.ts @@ -48,7 +48,7 @@ * type: string * title: province * description: The address's ISO 3166-2 province code. Must be lower-case. - * example: "us-ca" + * example: us-ca * externalDocs: * url: https://en.wikipedia.org/wiki/ISO_3166-2 * description: Learn more about ISO 3166-2 diff --git a/www/utils/generated/oas-output/schemas/AdminUpdateTaxRegion.ts b/www/utils/generated/oas-output/schemas/AdminUpdateTaxRegion.ts index 1960232917..750a1d396d 100644 --- a/www/utils/generated/oas-output/schemas/AdminUpdateTaxRegion.ts +++ b/www/utils/generated/oas-output/schemas/AdminUpdateTaxRegion.ts @@ -8,13 +8,17 @@ * type: string * title: province_code * description: The tax region's ISO 3166-2 province code. Must be lower-case. - * example: "us-ca" + * example: us-ca * externalDocs: * url: https://en.wikipedia.org/wiki/ISO_3166-2 * description: Learn more about ISO 3166-2 * metadata: * type: object * description: The tax region's metadata, can hold custom key-value pairs. + * provider_id: + * type: string + * title: provider_id + * description: The ID of the tax provider to use when calculating taxes for this tax region. * */ diff --git a/www/utils/generated/oas-output/schemas/AdminUpsertStockLocationAddress.ts b/www/utils/generated/oas-output/schemas/AdminUpsertStockLocationAddress.ts index e094d06267..ce99b79b97 100644 --- a/www/utils/generated/oas-output/schemas/AdminUpsertStockLocationAddress.ts +++ b/www/utils/generated/oas-output/schemas/AdminUpsertStockLocationAddress.ts @@ -40,7 +40,7 @@ * type: string * title: province * description: The address's ISO 3166-2 province code. Must be lower-case. - * example: "us-ca" + * example: us-ca * externalDocs: * url: https://en.wikipedia.org/wiki/ISO_3166-2 * description: Learn more about ISO 3166-2 diff --git a/www/utils/generated/oas-output/schemas/AdminUserListResponse.ts b/www/utils/generated/oas-output/schemas/AdminUserListResponse.ts index e7ef35820f..cf72e58a56 100644 --- a/www/utils/generated/oas-output/schemas/AdminUserListResponse.ts +++ b/www/utils/generated/oas-output/schemas/AdminUserListResponse.ts @@ -26,6 +26,11 @@ * description: The list of users. * items: * $ref: "#/components/schemas/AdminUser" + * estimate_count: + * type: number + * title: estimate_count + * description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + * x-featureFlag: index_engine * */ diff --git a/www/utils/generated/oas-output/schemas/BaseOrderAddress.ts b/www/utils/generated/oas-output/schemas/BaseOrderAddress.ts index 69dfe6f1a7..0552e1b567 100644 --- a/www/utils/generated/oas-output/schemas/BaseOrderAddress.ts +++ b/www/utils/generated/oas-output/schemas/BaseOrderAddress.ts @@ -54,7 +54,7 @@ * type: string * title: province * description: The address's lower-case ISO 3166-2 province code. - * example: "US-CA" + * example: us-ca * externalDocs: * url: https://en.wikipedia.org/wiki/ISO_3166-2 * description: Learn more about ISO 3166-2 diff --git a/www/utils/generated/oas-output/schemas/OrderAddress.ts b/www/utils/generated/oas-output/schemas/OrderAddress.ts index ac66527a55..2990254894 100644 --- a/www/utils/generated/oas-output/schemas/OrderAddress.ts +++ b/www/utils/generated/oas-output/schemas/OrderAddress.ts @@ -53,7 +53,7 @@ * type: string * title: province * description: The address's lower-case ISO 3166-2 province code. - * example: "us-ca" + * example: us-ca * externalDocs: * url: https://en.wikipedia.org/wiki/ISO_3166-2 * description: Learn more about ISO 3166-2 diff --git a/www/utils/generated/oas-output/schemas/StoreCartAddress.ts b/www/utils/generated/oas-output/schemas/StoreCartAddress.ts index b6ed549187..707c1cb0b4 100644 --- a/www/utils/generated/oas-output/schemas/StoreCartAddress.ts +++ b/www/utils/generated/oas-output/schemas/StoreCartAddress.ts @@ -53,7 +53,7 @@ * type: string * title: province * description: The address's lower-case ISO 3166-2 province code. - * example: "us-ca" + * example: us-ca * externalDocs: * url: https://en.wikipedia.org/wiki/ISO_3166-2 * description: Learn more about ISO 3166-2 diff --git a/www/utils/generated/oas-output/schemas/StoreCurrencyListResponse.ts b/www/utils/generated/oas-output/schemas/StoreCurrencyListResponse.ts index b99c1bd088..e29d3fcd84 100644 --- a/www/utils/generated/oas-output/schemas/StoreCurrencyListResponse.ts +++ b/www/utils/generated/oas-output/schemas/StoreCurrencyListResponse.ts @@ -26,6 +26,11 @@ * description: The list of currencies. * items: * $ref: "#/components/schemas/StoreCurrency" + * estimate_count: + * type: number + * title: estimate_count + * description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + * x-featureFlag: index_engine * */ diff --git a/www/utils/generated/oas-output/schemas/StoreCustomerAddress.ts b/www/utils/generated/oas-output/schemas/StoreCustomerAddress.ts index 70236c0311..461b499d64 100644 --- a/www/utils/generated/oas-output/schemas/StoreCustomerAddress.ts +++ b/www/utils/generated/oas-output/schemas/StoreCustomerAddress.ts @@ -76,7 +76,7 @@ * type: string * title: province * description: The address's lower-case ISO 3166-2 province code. - * example: "us-ca" + * example: us-ca * externalDocs: * url: https://en.wikipedia.org/wiki/ISO_3166-2 * description: Learn more about ISO 3166-2 diff --git a/www/utils/generated/oas-output/schemas/StoreCustomerAddressListResponse.ts b/www/utils/generated/oas-output/schemas/StoreCustomerAddressListResponse.ts index bf1e942977..69f5fe3897 100644 --- a/www/utils/generated/oas-output/schemas/StoreCustomerAddressListResponse.ts +++ b/www/utils/generated/oas-output/schemas/StoreCustomerAddressListResponse.ts @@ -26,6 +26,11 @@ * description: The list of addresses. * items: * $ref: "#/components/schemas/StoreCustomerAddress" + * estimate_count: + * type: number + * title: estimate_count + * description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + * x-featureFlag: index_engine * */ diff --git a/www/utils/generated/oas-output/schemas/StoreOrderAddress.ts b/www/utils/generated/oas-output/schemas/StoreOrderAddress.ts index b45a54054a..71235a9f0c 100644 --- a/www/utils/generated/oas-output/schemas/StoreOrderAddress.ts +++ b/www/utils/generated/oas-output/schemas/StoreOrderAddress.ts @@ -56,7 +56,7 @@ * type: string * title: province * description: The address's lower-case ISO 3166-2 province code. - * example: "us-ca" + * example: us-ca * externalDocs: * url: https://en.wikipedia.org/wiki/ISO_3166-2 * description: Learn more about ISO 3166-2 diff --git a/www/utils/generated/oas-output/schemas/StoreProductCategoryListResponse.ts b/www/utils/generated/oas-output/schemas/StoreProductCategoryListResponse.ts index aaeba05e44..44963cf35d 100644 --- a/www/utils/generated/oas-output/schemas/StoreProductCategoryListResponse.ts +++ b/www/utils/generated/oas-output/schemas/StoreProductCategoryListResponse.ts @@ -26,6 +26,11 @@ * description: The list of product categories. * items: * $ref: "#/components/schemas/StoreProductCategory" + * estimate_count: + * type: number + * title: estimate_count + * description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + * x-featureFlag: index_engine * */ diff --git a/www/utils/generated/oas-output/schemas/StoreProductTagListResponse.ts b/www/utils/generated/oas-output/schemas/StoreProductTagListResponse.ts index bafc034f40..b0e2ca24cd 100644 --- a/www/utils/generated/oas-output/schemas/StoreProductTagListResponse.ts +++ b/www/utils/generated/oas-output/schemas/StoreProductTagListResponse.ts @@ -26,6 +26,11 @@ * description: The list of product tags. * items: * $ref: "#/components/schemas/StoreProductTag" + * estimate_count: + * type: number + * title: estimate_count + * description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + * x-featureFlag: index_engine * */ diff --git a/www/utils/generated/oas-output/schemas/StoreProductTypeListResponse.ts b/www/utils/generated/oas-output/schemas/StoreProductTypeListResponse.ts index c886973849..5734298918 100644 --- a/www/utils/generated/oas-output/schemas/StoreProductTypeListResponse.ts +++ b/www/utils/generated/oas-output/schemas/StoreProductTypeListResponse.ts @@ -26,6 +26,11 @@ * description: The list of product types. * items: * $ref: "#/components/schemas/StoreProductType" + * estimate_count: + * type: number + * title: estimate_count + * description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + * x-featureFlag: index_engine * */ diff --git a/www/utils/generated/oas-output/schemas/StoreReturn.ts b/www/utils/generated/oas-output/schemas/StoreReturn.ts index 3f1440b8cc..6614898120 100644 --- a/www/utils/generated/oas-output/schemas/StoreReturn.ts +++ b/www/utils/generated/oas-output/schemas/StoreReturn.ts @@ -12,56 +12,61 @@ * - canceled_at * - received_at * properties: - * id: - * type: string - * title: id - * description: The return's ID. - * order_id: - * type: string - * title: order_id - * description: The ID of the order this return is created for. - * status: - * type: string - * title: status - * description: The return's status. - * exchange_id: - * type: string - * title: exchange_id - * description: The ID of the associated exchange. - * location_id: - * type: string - * title: location_id - * description: The ID of the location the items are returned to. - * claim_id: - * type: string - * title: claim_id - * description: The ID of the associated claim. - * display_id: - * type: number - * title: display_id - * description: The return's display ID. - * refund_amount: - * type: number - * title: refund_amount - * description: The return's refunded amount. * items: * type: array * description: The return's items. * items: * $ref: "#/components/schemas/StoreReturnItem" - * received_at: + * status: * type: string - * title: received_at - * description: The date the return was received. + * description: The return's status. + * enum: + * - received + * - canceled + * - requested + * - open + * - partially_received + * id: + * type: string + * title: id + * description: The return's ID. + * display_id: + * type: number + * title: display_id + * description: The return's display ID. * created_at: * type: string * format: date-time * title: created_at * description: The date the return was created. + * order_id: + * type: string + * title: order_id + * description: The ID of the order this return belongs to. + * location_id: + * type: string + * title: location_id + * description: The ID of the location the return items are being returned to. * canceled_at: * type: string * title: canceled_at - * description: The date the return was updated. + * description: The date the return was canceled. + * exchange_id: + * type: string + * title: exchange_id + * description: The ID of the associated exchange. + * claim_id: + * type: string + * title: claim_id + * description: The ID of the associated claim. + * refund_amount: + * type: number + * title: refund_amount + * description: The amount to be refunded. + * received_at: + * type: string + * title: received_at + * description: The date the return items were received. * */ diff --git a/www/utils/generated/oas-output/schemas/StoreReturnItem.ts b/www/utils/generated/oas-output/schemas/StoreReturnItem.ts index 480b65bf20..9fddc06677 100644 --- a/www/utils/generated/oas-output/schemas/StoreReturnItem.ts +++ b/www/utils/generated/oas-output/schemas/StoreReturnItem.ts @@ -3,6 +3,13 @@ * type: object * description: The return item's details. * x-schemaName: StoreReturnItem + * required: + * - id + * - quantity + * - received_quantity + * - damaged_quantity + * - item_id + * - return_id * properties: * id: * type: string @@ -39,13 +46,6 @@ * metadata: * type: object * description: The item's metadata, can hold custom key-value pairs. - * required: - * - id - * - quantity - * - received_quantity - * - damaged_quantity - * - item_id - * - return_id * */ diff --git a/www/utils/generated/route-examples-output/route-examples.json b/www/utils/generated/route-examples-output/route-examples.json index edfc6c28b2..b2ddb46df6 100644 --- a/www/utils/generated/route-examples-output/route-examples.json +++ b/www/utils/generated/route-examples-output/route-examples.json @@ -200,6 +200,9 @@ "DELETE /admin/draft-orders/{id}/edit/shipping-methods/{actionid}": { "js-sdk": "sdk.admin.draftOrder.removeShippingMethod(\"order_123\", \"action_123\")\n.then(({ draft_order_preview }) => {\n console.log(draft_order_preview)\n})" }, + "DELETE /admin/draft-orders/{id}/edit/shipping-methods/method/{shippingmethodid}": { + "js-sdk": "sdk.admin.draftOrder.removeShippingMethod(\n \"order_123\", \n \"shipping_method_123\"\n)\n.then(({ draft_order_preview }) => {\n console.log(draft_order_preview)\n})" + }, "POST /admin/draft-orders/{id}/edit/shipping-methods/method/{methodid}": { "js-sdk": "sdk.admin.draftOrder.updateShippingMethod(\"order_123\", \"sm_123\", {\n shipping_option_id: \"so_123\",\n})\n.then(({ draft_order_preview }) => {\n console.log(draft_order_preview)\n})" }, @@ -485,6 +488,9 @@ "POST /admin/products/import": { "js-sdk": "sdk.admin.product.import({\n file // uploaded File instance\n})\n.then(({ transaction_id }) => {\n console.log(transaction_id)\n})" }, + "POST /admin/products/imports": { + "js-sdk": "sdk.admin.product.createImport({\n file // uploaded File instance\n})\n.then(({ transaction_id }) => {\n console.log(transaction_id)\n})" + }, "POST /admin/products/import/{transactionid}/confirm": { "js-sdk": "sdk.admin.product.confirmImport(\"transaction_123\")\n.then(() => {\n console.log(\"Import confirmed\")\n})" }, @@ -516,7 +522,7 @@ "js-sdk": "sdk.admin.product.createVariant(\"prod_123\", {\n title: \"Blue Shirt\",\n options: {\n Color: \"Blue\"\n },\n prices: [\n {\n amount: 10,\n currency_code: \"usd\"\n }\n ]\n})\n.then(({ product }) => {\n console.log(product)\n})" }, "POST /admin/products/{productid}/variants/{id}": { - "js-sdk": "sdk.admin.product.updateVariant(\n \"prod_123\", \n \"variant_123\",\n {\n title: \"Blue Shirt\",\n }\n)\n.then(({ product }) => {\n console.log(product)\n})" + "js-sdk": "sdk.admin.product.updateVariant(\n \"prod_123\",\n \"variant_123\",\n {\n title: \"Blue Shirt\",\n }\n)\n.then(({ product }) => {\n console.log(product)\n})" }, "GET /admin/products/{productid}/variants": { "js-sdk": "sdk.admin.product.listVariants(\"prod_123\")\n.then(({ variants, count, limit, offset }) => {\n console.log(variants)\n})" @@ -528,13 +534,13 @@ "js-sdk": "sdk.admin.product.deleteVariant(\"prod_123\", \"variant_123\")\n.then(({ deleted }) => {\n console.log(deleted)\n})" }, "POST /admin/products/{productid}/variants/inventory-items/batch": { - "js-sdk": "sdk.admin.product.batchVariantInventoryItems(\n \"prod_123\", \n {\n create: [\n {\n inventory_item_id: \"iitem_123\",\n variant_id: \"variant_123\",\n required_quantity: 10\n }\n ],\n update: [\n {\n inventory_item_id: \"iitem_1234\",\n variant_id: \"variant_1234\",\n required_quantity: 20\n }\n ],\n delete: [\n {\n inventory_item_id: \"iitem_321\",\n variant_id: \"variant_321\"\n }\n ]\n }\n)\n.then(({ created, updated, deleted }) => {\n console.log(created, updated, deleted)\n})" + "js-sdk": "sdk.admin.product.batchVariantInventoryItems(\n \"prod_123\",\n {\n create: [\n {\n inventory_item_id: \"iitem_123\",\n variant_id: \"variant_123\",\n required_quantity: 10\n }\n ],\n update: [\n {\n inventory_item_id: \"iitem_1234\",\n variant_id: \"variant_1234\",\n required_quantity: 20\n }\n ],\n delete: [\n {\n inventory_item_id: \"iitem_321\",\n variant_id: \"variant_321\"\n }\n ]\n }\n)\n.then(({ created, updated, deleted }) => {\n console.log(created, updated, deleted)\n})" }, "POST /admin/products/{productid}/options": { - "js-sdk": "sdk.admin.product.createOption(\n \"prod_123\", \n {\n title: \"Color\",\n values: [\"Green\", \"Blue\"]\n }\n)\n.then(({ product }) => {\n console.log(product)\n})" + "js-sdk": "sdk.admin.product.createOption(\n \"prod_123\",\n {\n title: \"Color\",\n values: [\"Green\", \"Blue\"]\n }\n)\n.then(({ product }) => {\n console.log(product)\n})" }, "POST /admin/products/{productid}/options/{id}": { - "js-sdk": "sdk.admin.product.updateOption(\n \"prod_123\", \n \"prodopt_123\",\n {\n title: \"Color\"\n }\n)\n.then(({ product }) => {\n console.log(product)\n})" + "js-sdk": "sdk.admin.product.updateOption(\n \"prod_123\",\n \"prodopt_123\",\n {\n title: \"Color\"\n }\n)\n.then(({ product }) => {\n console.log(product)\n})" }, "GET /admin/products/{productid}/options": { "js-sdk": "sdk.admin.product.listOptions(\"prod_123\")\n.then(({ product_options, count, limit, offset }) => {\n console.log(product_options)\n})" @@ -839,6 +845,9 @@ "POST /admin/stores/{id}": { "js-sdk": "sdk.admin.store.update(\"store_123\", {\n name: \"My Store\",\n})\n.then(({ store }) => {\n console.log(store)\n})" }, + "GET /admin/tax-providers": { + "js-sdk": "sdk.admin.taxProvider.list()\n.then(({ tax_providers, count, limit, offset }) => {\n console.log(tax_providers)\n})" + }, "POST /admin/tax-rates": { "js-sdk": "sdk.admin.taxRate.create({\n name: \"VAT\",\n tax_region_id: \"txreg_123\",\n code: \"VAT\",\n rate: 2, // 2%\n})\n.then(({ tax_rate }) => {\n console.log(tax_rate)\n})" }, @@ -857,6 +866,9 @@ "POST /admin/tax-regions": { "js-sdk": "sdk.admin.taxRegion.create({\n country_code: \"us\",\n province_code: \"ca\",\n default_tax_rate: {\n code: \"VAT\",\n name: \"VAT\",\n rate: 20, // 20%\n is_combinable: true,\n },\n})\n.then(({ tax_region }) => {\n console.log(tax_region)\n})" }, + "POST /admin/tax-regions/{id}": { + "js-sdk": "sdk.admin.taxRegion.update(\"txreg_123\", {\n province_code: \"ca\",\n})\n.then(({ tax_region }) => {\n console.log(tax_region)\n})" + }, "DELETE /admin/tax-regions/{id}": { "js-sdk": "sdk.admin.taxRegion.delete(\"txreg_123\")\n.then(({ deleted }) => {\n console.log(deleted)\n})" },