Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Updated the API reference and SDK filter types for order market and locale, and code-list filters (#14933)

Damian Legawiec1a8681759871
diff --git a/.changeset/order-market-locale-filter-types.md b/.changeset/order-market-locale-filter-types.md
new file mode 100644
index 0000000000..66317ac039
--- /dev/null
+++ b/.changeset/order-market-locale-filter-types.md
@@ -0,0 +1,7 @@
+---
+"@spree/sdk": patch
+"@spree/admin-sdk": patch
+"@spree/seller-sdk": patch
+---
+
+Order filter and sort types include `market_id` and `locale`. Locale, currency and country filters (`locale`, `currency`, `cost_currency`, `country_code`, `country_of_origin`) accept only `LocaleCode`, `CurrencyCode` and `CountryCode` values (new `CodeFilters` type) instead of free text.
diff --git a/docs/api-reference/admin.yaml b/docs/api-reference/admin.yaml
index 02ebb56436..d444626287 100644
--- a/docs/api-reference/admin.yaml
+++ b/docs/api-reference/admin.yaml
@@ -6561,7 +6561,7 @@ paths:
| `address2` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
| `city` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
| `company` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
- | `country_code` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
+ | `country_code` | One of the `CountryCode` codes | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `created_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `first_name` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
| `id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
@@ -7210,7 +7210,7 @@ paths:
| `amount` | Amount | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `created_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `created_by_id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
- | `currency` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
+ | `currency` | One of the `CurrencyCode` codes | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `customer_id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `memo` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
@@ -7228,7 +7228,7 @@ paths:
| `customer_addresses_` | `address1`, `address2`, `city`, `company`, `country_code`, `created_at`, `first_name`, `id`, `last_name`, `phone`, `postal_code`, `state_code`, `updated_at` |
| `customer_bill_address_` | `address1`, `address2`, `city`, `company`, `country_code`, `created_at`, `first_name`, `id`, `last_name`, `phone`, `postal_code`, `state_code`, `updated_at` |
| `customer_customer_groups_` | `created_at`, `id`, `name`, `updated_at` |
- | `customer_orders_` | `channel_id`, `completed_at`, `considered_risky`, `coupon_code`, `created_at`, `currency`, `customer_id`, `delivery_total`, `email`, `fulfillment_status`, `id`, `item_total`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at` |
+ | `customer_orders_` | `channel_id`, `completed_at`, `considered_risky`, `coupon_code`, `created_at`, `currency`, `customer_id`, `delivery_total`, `email`, `fulfillment_status`, `id`, `item_total`, `locale`, `market_id`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at` |
| `customer_ship_address_` | `address1`, `address2`, `city`, `company`, `country_code`, `created_at`, `first_name`, `id`, `last_name`, `phone`, `postal_code`, `state_code`, `updated_at` |
| `customer_spree_roles_` | `created_at`, `id`, `name`, `updated_at` |
| `customer_tags_` | `created_at`, `id`, `name`, `updated_at` |
@@ -7803,7 +7803,7 @@ paths:
| `addresses_` | `address1`, `address2`, `city`, `company`, `country_code`, `created_at`, `first_name`, `id`, `last_name`, `phone`, `postal_code`, `state_code`, `updated_at` |
| `bill_address_` | `address1`, `address2`, `city`, `company`, `country_code`, `created_at`, `first_name`, `id`, `last_name`, `phone`, `postal_code`, `state_code`, `updated_at` |
| `customer_groups_` | `created_at`, `id`, `name`, `updated_at` |
- | `orders_` | `channel_id`, `completed_at`, `considered_risky`, `coupon_code`, `created_at`, `currency`, `customer_id`, `delivery_total`, `email`, `fulfillment_status`, `id`, `item_total`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at` |
+ | `orders_` | `channel_id`, `completed_at`, `considered_risky`, `coupon_code`, `created_at`, `currency`, `customer_id`, `delivery_total`, `email`, `fulfillment_status`, `id`, `item_total`, `locale`, `market_id`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at` |
| `orders_bill_address_` | `address1`, `address2`, `city`, `company`, `country_code`, `created_at`, `first_name`, `id`, `last_name`, `phone`, `postal_code`, `state_code`, `updated_at` |
| `orders_channel_` | `active`, `code`, `created_at`, `default`, `id`, `name`, `store_id`, `updated_at` |
| `orders_fulfillments_` | `created_at`, `id`, `number`, `updated_at` |
@@ -11591,7 +11591,7 @@ paths:
| `code` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
| `created_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `created_by_id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
- | `currency` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
+ | `currency` | One of the `CurrencyCode` codes | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `customer_id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `expires_at` | Date | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `gift_card_batch_id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
@@ -11611,11 +11611,11 @@ paths:
| `customers_addresses_` | `address1`, `address2`, `city`, `company`, `country_code`, `created_at`, `first_name`, `id`, `last_name`, `phone`, `postal_code`, `state_code`, `updated_at` |
| `customers_bill_address_` | `address1`, `address2`, `city`, `company`, `country_code`, `created_at`, `first_name`, `id`, `last_name`, `phone`, `postal_code`, `state_code`, `updated_at` |
| `customers_customer_groups_` | `created_at`, `id`, `name`, `updated_at` |
- | `customers_orders_` | `channel_id`, `completed_at`, `considered_risky`, `coupon_code`, `created_at`, `currency`, `customer_id`, `delivery_total`, `email`, `fulfillment_status`, `id`, `item_total`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at` |
+ | `customers_orders_` | `channel_id`, `completed_at`, `considered_risky`, `coupon_code`, `created_at`, `currency`, `customer_id`, `delivery_total`, `email`, `fulfillment_status`, `id`, `item_total`, `locale`, `market_id`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at` |
| `customers_ship_address_` | `address1`, `address2`, `city`, `company`, `country_code`, `created_at`, `first_name`, `id`, `last_name`, `phone`, `postal_code`, `state_code`, `updated_at` |
| `customers_spree_roles_` | `created_at`, `id`, `name`, `updated_at` |
| `customers_tags_` | `created_at`, `id`, `name`, `updated_at` |
- | `orders_` | `channel_id`, `completed_at`, `considered_risky`, `coupon_code`, `created_at`, `currency`, `customer_id`, `delivery_total`, `email`, `fulfillment_status`, `id`, `item_total`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at` |
+ | `orders_` | `channel_id`, `completed_at`, `considered_risky`, `coupon_code`, `created_at`, `currency`, `customer_id`, `delivery_total`, `email`, `fulfillment_status`, `id`, `item_total`, `locale`, `market_id`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at` |
| `orders_bill_address_` | `address1`, `address2`, `city`, `company`, `country_code`, `created_at`, `first_name`, `id`, `last_name`, `phone`, `postal_code`, `state_code`, `updated_at` |
| `orders_channel_` | `active`, `code`, `created_at`, `default`, `id`, `name`, `store_id`, `updated_at` |
| `orders_customer_` | `accepts_email_marketing`, `created_at`, `email`, `first_name`, `id`, `last_name`, `phone`, `updated_at` |
@@ -11632,7 +11632,7 @@ paths:
| `users_addresses_` | `address1`, `address2`, `city`, `company`, `country_code`, `created_at`, `first_name`, `id`, `last_name`, `phone`, `postal_code`, `state_code`, `updated_at` |
| `users_bill_address_` | `address1`, `address2`, `city`, `company`, `country_code`, `created_at`, `first_name`, `id`, `last_name`, `phone`, `postal_code`, `state_code`, `updated_at` |
| `users_customer_groups_` | `created_at`, `id`, `name`, `updated_at` |
- | `users_orders_` | `channel_id`, `completed_at`, `considered_risky`, `coupon_code`, `created_at`, `currency`, `customer_id`, `delivery_total`, `email`, `fulfillment_status`, `id`, `item_total`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at` |
+ | `users_orders_` | `channel_id`, `completed_at`, `considered_risky`, `coupon_code`, `created_at`, `currency`, `customer_id`, `delivery_total`, `email`, `fulfillment_status`, `id`, `item_total`, `locale`, `market_id`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at` |
| `users_ship_address_` | `address1`, `address2`, `city`, `company`, `country_code`, `created_at`, `first_name`, `id`, `last_name`, `phone`, `postal_code`, `state_code`, `updated_at` |
| `users_spree_roles_` | `created_at`, `id`, `name`, `updated_at` |
| `users_tags_` | `created_at`, `id`, `name`, `updated_at` |
@@ -13944,8 +13944,8 @@ paths:
| Attribute | Kind | Predicates |
|---|---|---|
| `created_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
- | `currency` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
- | `default_locale` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
+ | `currency` | One of the `CurrencyCode` codes | `eq` `not_eq` `in` `not_in` `null` `not_null` |
+ | `default_locale` | One of the `LocaleCode` codes | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `name` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
| `position` | Number | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
@@ -15031,7 +15031,7 @@ paths:
| Prefix | Attributes |
|---|---|
- | `order_` | `channel_id`, `completed_at`, `considered_risky`, `coupon_code`, `created_at`, `currency`, `customer_id`, `delivery_total`, `email`, `fulfillment_status`, `id`, `item_total`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at` |
+ | `order_` | `channel_id`, `completed_at`, `considered_risky`, `coupon_code`, `created_at`, `currency`, `customer_id`, `delivery_total`, `email`, `fulfillment_status`, `id`, `item_total`, `locale`, `market_id`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at` |
| `order_bill_address_` | `address1`, `address2`, `city`, `company`, `country_code`, `created_at`, `first_name`, `id`, `last_name`, `phone`, `postal_code`, `state_code`, `updated_at` |
| `order_channel_` | `active`, `code`, `created_at`, `default`, `id`, `name`, `store_id`, `updated_at` |
| `order_customer_` | `accepts_email_marketing`, `created_at`, `email`, `first_name`, `id`, `last_name`, `phone`, `updated_at` |
@@ -15195,7 +15195,7 @@ paths:
| Prefix | Attributes |
|---|---|
- | `order_` | `channel_id`, `completed_at`, `considered_risky`, `coupon_code`, `created_at`, `currency`, `customer_id`, `delivery_total`, `email`, `fulfillment_status`, `id`, `item_total`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at` |
+ | `order_` | `channel_id`, `completed_at`, `considered_risky`, `coupon_code`, `created_at`, `currency`, `customer_id`, `delivery_total`, `email`, `fulfillment_status`, `id`, `item_total`, `locale`, `market_id`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at` |
| `order_bill_address_` | `address1`, `address2`, `city`, `company`, `country_code`, `created_at`, `first_name`, `id`, `last_name`, `phone`, `postal_code`, `state_code`, `updated_at` |
| `order_channel_` | `active`, `code`, `created_at`, `default`, `id`, `name`, `store_id`, `updated_at` |
| `order_customer_` | `accepts_email_marketing`, `created_at`, `email`, `first_name`, `id`, `last_name`, `phone`, `updated_at` |
@@ -16039,7 +16039,7 @@ paths:
| Prefix | Attributes |
|---|---|
- | `order_` | `channel_id`, `completed_at`, `considered_risky`, `coupon_code`, `created_at`, `currency`, `customer_id`, `delivery_total`, `email`, `fulfillment_status`, `id`, `item_total`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at` |
+ | `order_` | `channel_id`, `completed_at`, `considered_risky`, `coupon_code`, `created_at`, `currency`, `customer_id`, `delivery_total`, `email`, `fulfillment_status`, `id`, `item_total`, `locale`, `market_id`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at` |
| `order_bill_address_` | `address1`, `address2`, `city`, `company`, `country_code`, `created_at`, `first_name`, `id`, `last_name`, `phone`, `postal_code`, `state_code`, `updated_at` |
| `order_channel_` | `active`, `code`, `created_at`, `default`, `id`, `name`, `store_id`, `updated_at` |
| `order_customer_` | `accepts_email_marketing`, `created_at`, `email`, `first_name`, `id`, `last_name`, `phone`, `updated_at` |
@@ -16203,7 +16203,7 @@ paths:
| Prefix | Attributes |
|---|---|
- | `order_` | `channel_id`, `completed_at`, `considered_risky`, `coupon_code`, `created_at`, `currency`, `customer_id`, `delivery_total`, `email`, `fulfillment_status`, `id`, `item_total`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at` |
+ | `order_` | `channel_id`, `completed_at`, `considered_risky`, `coupon_code`, `created_at`, `currency`, `customer_id`, `delivery_total`, `email`, `fulfillment_status`, `id`, `item_total`, `locale`, `market_id`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at` |
| `order_bill_address_` | `address1`, `address2`, `city`, `company`, `country_code`, `created_at`, `first_name`, `id`, `last_name`, `phone`, `postal_code`, `state_code`, `updated_at` |
| `order_channel_` | `active`, `code`, `created_at`, `default`, `id`, `name`, `store_id`, `updated_at` |
| `order_customer_` | `accepts_email_marketing`, `created_at`, `email`, `first_name`, `id`, `last_name`, `phone`, `updated_at` |
@@ -16751,7 +16751,7 @@ paths:
| Attribute | Kind | Predicates |
|---|---|---|
- | `country_code` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
+ | `country_code` | One of the `CountryCode` codes | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `created_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `included` | True or false | `eq` `not_eq` `in` `not_in` `true` `false` `null` |
@@ -17409,7 +17409,7 @@ paths:
| Attribute | Kind | Predicates |
|---|---|---|
| `created_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
- | `currency` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
+ | `currency` | One of the `CurrencyCode` codes | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `email` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
| `id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `number` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
@@ -17425,11 +17425,11 @@ paths:
| `customer_addresses_` | `address1`, `address2`, `city`, `company`, `country_code`, `created_at`, `first_name`, `id`, `last_name`, `phone`, `postal_code`, `state_code`, `updated_at` |
| `customer_bill_address_` | `address1`, `address2`, `city`, `company`, `country_code`, `created_at`, `first_name`, `id`, `last_name`, `phone`, `postal_code`, `state_code`, `updated_at` |
| `customer_customer_groups_` | `created_at`, `id`, `name`, `updated_at` |
- | `customer_orders_` | `channel_id`, `completed_at`, `considered_risky`, `coupon_code`, `created_at`, `currency`, `customer_id`, `delivery_total`, `email`, `fulfillment_status`, `id`, `item_total`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at` |
+ | `customer_orders_` | `channel_id`, `completed_at`, `considered_risky`, `coupon_code`, `created_at`, `currency`, `customer_id`, `delivery_total`, `email`, `fulfillment_status`, `id`, `item_total`, `locale`, `market_id`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at` |
| `customer_ship_address_` | `address1`, `address2`, `city`, `company`, `country_code`, `created_at`, `first_name`, `id`, `last_name`, `phone`, `postal_code`, `state_code`, `updated_at` |
| `customer_spree_roles_` | `created_at`, `id`, `name`, `updated_at` |
| `customer_tags_` | `created_at`, `id`, `name`, `updated_at` |
- | `orders_` | `channel_id`, `completed_at`, `considered_risky`, `coupon_code`, `created_at`, `currency`, `customer_id`, `delivery_total`, `email`, `fulfillment_status`, `id`, `item_total`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at` |
+ | `orders_` | `channel_id`, `completed_at`, `considered_risky`, `coupon_code`, `created_at`, `currency`, `customer_id`, `delivery_total`, `email`, `fulfillment_status`, `id`, `item_total`, `locale`, `market_id`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at` |
| `orders_bill_address_` | `address1`, `address2`, `city`, `company`, `country_code`, `created_at`, `first_name`, `id`, `last_name`, `phone`, `postal_code`, `state_code`, `updated_at` |
| `orders_channel_` | `active`, `code`, `created_at`, `default`, `id`, `name`, `store_id`, `updated_at` |
| `orders_customer_` | `accepts_email_marketing`, `created_at`, `email`, `first_name`, `id`, `last_name`, `phone`, `updated_at` |
@@ -17891,7 +17891,7 @@ paths:
| Prefix | Attributes |
|---|---|
- | `order_` | `channel_id`, `completed_at`, `considered_risky`, `coupon_code`, `created_at`, `currency`, `customer_id`, `delivery_total`, `email`, `fulfillment_status`, `id`, `item_total`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at` |
+ | `order_` | `channel_id`, `completed_at`, `considered_risky`, `coupon_code`, `created_at`, `currency`, `customer_id`, `delivery_total`, `email`, `fulfillment_status`, `id`, `item_total`, `locale`, `market_id`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at` |
| `order_bill_address_` | `address1`, `address2`, `city`, `company`, `country_code`, `created_at`, `first_name`, `id`, `last_name`, `phone`, `postal_code`, `state_code`, `updated_at` |
| `order_channel_` | `active`, `code`, `created_at`, `default`, `id`, `name`, `store_id`, `updated_at` |
| `order_customer_` | `accepts_email_marketing`, `created_at`, `email`, `first_name`, `id`, `last_name`, `phone`, `updated_at` |
@@ -18700,13 +18700,15 @@ paths:
| `considered_risky` | True or false | `eq` `not_eq` `in` `not_in` `true` `false` `null` |
| `coupon_code` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
| `created_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
- | `currency` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
+ | `currency` | One of the `CurrencyCode` codes | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `customer_id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `delivery_total` | Amount | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `email` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
| `fulfillment_status` | One of `backorder`, `canceled`, `partial`, `unfulfilled`, `fulfilled`, `delivered`, `pending`, `ready`, `shipped` | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `item_total` | Amount | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
+ | `locale` | One of the `LocaleCode` codes | `eq` `not_eq` `in` `not_in` `null` `not_null` |
+ | `market_id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `number` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
| `order_group_id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `payment_status` | One of `none`, `authorized`, `partially_paid`, `paid`, `partially_refunded`, `refunded`, `overcharged`, `voided`, `balance_due`, `credit_owed`, `failed`, `void` | `eq` `not_eq` `in` `not_in` `null` `not_null` |
@@ -18748,7 +18750,7 @@ paths:
</Accordion>
- **Sort by:** `channel_id`, `completed_at`, `considered_risky`, `coupon_code`, `created_at`, `currency`, `customer_id`, `delivery_total`, `email`, `fulfillment_status`, `id`, `item_total`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at`. Prefix a field with `-` to sort descending.
+ **Sort by:** `channel_id`, `completed_at`, `considered_risky`, `coupon_code`, `created_at`, `currency`, `customer_id`, `delivery_total`, `email`, `fulfillment_status`, `id`, `item_total`, `locale`, `market_id`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at`. Prefix a field with `-` to sort descending.
x-spree-filters:
table: Order
sortable:
@@ -18764,6 +18766,8 @@ paths:
- fulfillment_status
- id
- item_total
+ - locale
+ - market_id
- number
- order_group_id
- payment_state
@@ -20128,7 +20132,7 @@ paths:
| Prefix | Attributes |
|---|---|
- | `order_` | `channel_id`, `completed_at`, `considered_risky`, `coupon_code`, `created_at`, `currency`, `customer_id`, `delivery_total`, `email`, `fulfillment_status`, `id`, `item_total`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at` |
+ | `order_` | `channel_id`, `completed_at`, `considered_risky`, `coupon_code`, `created_at`, `currency`, `customer_id`, `delivery_total`, `email`, `fulfillment_status`, `id`, `item_total`, `locale`, `market_id`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at` |
| `order_bill_address_` | `address1`, `address2`, `city`, `company`, `country_code`, `created_at`, `first_name`, `id`, `last_name`, `phone`, `postal_code`, `state_code`, `updated_at` |
| `order_channel_` | `active`, `code`, `created_at`, `default`, `id`, `name`, `store_id`, `updated_at` |
| `order_customer_` | `accepts_email_marketing`, `created_at`, `email`, `first_name`, `id`, `last_name`, `phone`, `updated_at` |
@@ -20299,7 +20303,7 @@ paths:
| Prefix | Attributes |
|---|---|
- | `order_` | `channel_id`, `completed_at`, `considered_risky`, `coupon_code`, `created_at`, `currency`, `customer_id`, `delivery_total`, `email`, `fulfillment_status`, `id`, `item_total`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at` |
+ | `order_` | `channel_id`, `completed_at`, `considered_risky`, `coupon_code`, `created_at`, `currency`, `customer_id`, `delivery_total`, `email`, `fulfillment_status`, `id`, `item_total`, `locale`, `market_id`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at` |
| `order_bill_address_` | `address1`, `address2`, `city`, `company`, `country_code`, `created_at`, `first_name`, `id`, `last_name`, `phone`, `postal_code`, `state_code`, `updated_at` |
| `order_channel_` | `active`, `code`, `created_at`, `default`, `id`, `name`, `store_id`, `updated_at` |
| `order_customer_` | `accepts_email_marketing`, `created_at`, `email`, `first_name`, `id`, `last_name`, `phone`, `updated_at` |
@@ -21552,7 +21556,7 @@ paths:
| Prefix | Attributes |
|---|---|
- | `order_` | `channel_id`, `completed_at`, `considered_risky`, `coupon_code`, `created_at`, `currency`, `customer_id`, `delivery_total`, `email`, `fulfillment_status`, `id`, `item_total`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at` |
+ | `order_` | `channel_id`, `completed_at`, `considered_risky`, `coupon_code`, `created_at`, `currency`, `customer_id`, `delivery_total`, `email`, `fulfillment_status`, `id`, `item_total`, `locale`, `market_id`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at` |
| `order_bill_address_` | `address1`, `address2`, `city`, `company`, `country_code`, `created_at`, `first_name`, `id`, `last_name`, `phone`, `postal_code`, `state_code`, `updated_at` |
| `order_channel_` | `active`, `code`, `created_at`, `default`, `id`, `name`, `store_id`, `updated_at` |
| `order_customer_` | `accepts_email_marketing`, `created_at`, `email`, `first_name`, `id`, `last_name`, `phone`, `updated_at` |
@@ -22740,7 +22744,7 @@ paths:
| `amount` | Amount | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `compare_at_amount` | Amount | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `created_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
- | `currency` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
+ | `currency` | One of the `CurrencyCode` codes | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `min_quantity` | Number | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `price_list_id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
@@ -30909,7 +30913,7 @@ paths:
| Attribute | Kind | Predicates |
|---|---|---|
| `amount` | Amount | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
- | `country_code` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
+ | `country_code` | One of the `CountryCode` codes | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `created_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `name` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
@@ -33061,7 +33065,7 @@ paths:
| Attribute | Kind | Predicates |
|---|---|---|
| `active` | True or false | `eq` `not_eq` `in` `not_in` `true` `false` `null` |
- | `country_code` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
+ | `country_code` | One of the `CountryCode` codes | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `created_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `default` | True or false | `eq` `not_eq` `in` `not_in` `true` `false` `null` |
| `id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
@@ -33644,7 +33648,7 @@ paths:
| `amount` | Amount | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `created_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `created_by_id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
- | `currency` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
+ | `currency` | One of the `CurrencyCode` codes | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `customer_id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `memo` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
@@ -33662,7 +33666,7 @@ paths:
| `customer_addresses_` | `address1`, `address2`, `city`, `company`, `country_code`, `created_at`, `first_name`, `id`, `last_name`, `phone`, `postal_code`, `state_code`, `updated_at` |
| `customer_bill_address_` | `address1`, `address2`, `city`, `company`, `country_code`, `created_at`, `first_name`, `id`, `last_name`, `phone`, `postal_code`, `state_code`, `updated_at` |
| `customer_customer_groups_` | `created_at`, `id`, `name`, `updated_at` |
- | `customer_orders_` | `channel_id`, `completed_at`, `considered_risky`, `coupon_code`, `created_at`, `currency`, `customer_id`, `delivery_total`, `email`, `fulfillment_status`, `id`, `item_total`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at` |
+ | `customer_orders_` | `channel_id`, `completed_at`, `considered_risky`, `coupon_code`, `created_at`, `currency`, `customer_id`, `delivery_total`, `email`, `fulfillment_status`, `id`, `item_total`, `locale`, `market_id`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at` |
| `customer_ship_address_` | `address1`, `address2`, `city`, `company`, `country_code`, `created_at`, `first_name`, `id`, `last_name`, `phone`, `postal_code`, `state_code`, `updated_at` |
| `customer_spree_roles_` | `created_at`, `id`, `name`, `updated_at` |
| `customer_tags_` | `created_at`, `id`, `name`, `updated_at` |
@@ -34194,9 +34198,9 @@ paths:
| `carton_package_type_id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `carton_weight` | Amount | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `cartons_per_pallet` | Number | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
- | `cost_currency` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
+ | `cost_currency` | One of the `CurrencyCode` codes | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `cost_price` | Amount | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
- | `country_of_origin` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
+ | `country_of_origin` | One of the `CountryCode` codes | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `created_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `deleted_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `depth` | Amount | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
@@ -35019,9 +35023,9 @@ paths:
| `carton_package_type_id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `carton_weight` | Amount | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `cartons_per_pallet` | Number | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
- | `cost_currency` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
+ | `cost_currency` | One of the `CurrencyCode` codes | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `cost_price` | Amount | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
- | `country_of_origin` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
+ | `country_of_origin` | One of the `CountryCode` codes | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `created_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `deleted_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `depth` | Amount | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
@@ -40131,7 +40135,7 @@ paths:
|---|---|---|
| `amount` | Amount | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `created_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
- | `currency` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
+ | `currency` | One of the `CurrencyCode` codes | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `kind` | One of `percentage`, `fixed` | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `order_id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
@@ -41003,7 +41007,7 @@ paths:
| `address2` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
| `city` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
| `company` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
- | `country_code` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
+ | `country_code` | One of the `CountryCode` codes | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `created_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `first_name` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
| `id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
@@ -48923,7 +48927,7 @@ paths:
| `cancel_by` | Date | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `closed_short_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `created_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
- | `currency` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
+ | `currency` | One of the `CurrencyCode` codes | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `destination_location_id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `expected_at` | Date | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
@@ -52773,7 +52777,7 @@ paths:
|---|---|---|
| `amount` | Amount | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `created_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
- | `currency` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
+ | `currency` | One of the `CurrencyCode` codes | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `kind` | One of `earning`, `refund_reversal` | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `order_id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
@@ -52944,7 +52948,7 @@ paths:
|---|---|---|
| `amount` | Amount | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `created_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
- | `currency` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
+ | `currency` | One of the `CurrencyCode` codes | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `period_end` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `period_start` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
@@ -53909,10 +53913,10 @@ paths:
| Prefix | Attributes |
|---|---|
| `line_item_` | `additional_tax_total`, `adjustment_total`, `cost_price`, `created_at`, `discount_total`, `id`, `included_tax_total`, `non_taxable_adjustment_total`, `order_id`, `pre_tax_amount`, `price`, `quantity`, `tax_category_id`, `taxable_adjustment_total`, `updated_at`, `variant_id` |
- | `line_item_order_` | `channel_id`, `completed_at`, `considered_risky`, `coupon_code`, `created_at`, `currency`, `customer_id`, `delivery_total`, `email`, `fulfillment_status`, `id`, `item_total`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at` |
+ | `line_item_order_` | `channel_id`, `completed_at`, `considered_risky`, `coupon_code`, `created_at`, `currency`, `customer_id`, `delivery_total`, `email`, `fulfillment_status`, `id`, `item_total`, `locale`, `market_id`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at` |
| `line_item_tax_category_` | `created_at`, `id`, `is_default`, `name`, `tax_code`, `updated_at` |
| `line_item_variant_` | `carton_package_type_id`, `carton_weight`, `cartons_per_pallet`, `cost_currency`, `cost_price`, `country_of_origin`, `created_at`, `deleted_at`, `depth`, `discontinue_on`, `height`, `hs_code`, `id`, `minimum_order_quantity`, `order_multiple`, `position`, `product_id`, `purchase_unit`, `sku`, `track_inventory`, `units_per_carton`, `updated_at`, `weight`, `width` |
- | `order_` | `channel_id`, `completed_at`, `considered_risky`, `coupon_code`, `created_at`, `currency`, `customer_id`, `delivery_total`, `email`, `fulfillment_status`, `id`, `item_total`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at` |
+ | `order_` | `channel_id`, `completed_at`, `considered_risky`, `coupon_code`, `created_at`, `currency`, `customer_id`, `delivery_total`, `email`, `fulfillment_status`, `id`, `item_total`, `locale`, `market_id`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at` |
| `order_bill_address_` | `address1`, `address2`, `city`, `company`, `country_code`, `created_at`, `first_name`, `id`, `last_name`, `phone`, `postal_code`, `state_code`, `updated_at` |
| `order_channel_` | `active`, `code`, `created_at`, `default`, `id`, `name`, `store_id`, `updated_at` |
| `order_customer_` | `accepts_email_marketing`, `created_at`, `email`, `first_name`, `id`, `last_name`, `phone`, `updated_at` |
@@ -55339,7 +55343,7 @@ paths:
|---|---|---|
| `city` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
| `contact_name` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
- | `country_code` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
+ | `country_code` | One of the `CountryCode` codes | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `created_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `email` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
| `id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
@@ -82841,7 +82845,8 @@ components:
address2: text
city: text
company: text
- country_code: text
+ country_code:
+ code: CountryCode
created_at: datetime
first_name: text
id: id
@@ -82983,7 +82988,8 @@ components:
attributes:
amount: decimal
created_at: datetime
- currency: text
+ currency:
+ code: CurrencyCode
id: id
kind:
enum:
@@ -83340,7 +83346,8 @@ components:
code: text
created_at: datetime
created_by_id: id
- currency: text
+ currency:
+ code: CurrencyCode
customer_id: id
expires_at: date
gift_card_batch_id: id
@@ -83451,8 +83458,10 @@ components:
Market:
attributes:
created_at: datetime
- currency: text
- default_locale: text
+ currency:
+ code: CurrencyCode
+ default_locale:
+ code: LocaleCode
id: id
name: text
position: integer
@@ -83511,7 +83520,8 @@ components:
considered_risky: boolean
coupon_code: text
created_at: datetime
- currency: text
+ currency:
+ code: CurrencyCode
customer_id: id
delivery_total: decimal
email: text
@@ -83528,6 +83538,9 @@ components:
- shipped
id: id
item_total: decimal
+ locale:
+ code: LocaleCode
+ market_id: id
number: text
order_group_id: id
payment_state:
@@ -83610,7 +83623,8 @@ components:
OrderGroup:
attributes:
created_at: datetime
- currency: text
+ currency:
+ code: CurrencyCode
email: text
id: id
number: text
@@ -83711,7 +83725,8 @@ components:
amount: decimal
compare_at_amount: decimal
created_at: datetime
- currency: text
+ currency:
+ code: CurrencyCode
id: id
min_quantity: integer
price_list_id: id
@@ -83856,7 +83871,8 @@ components:
cancel_by: date
closed_short_at: datetime
created_at: datetime
- currency: text
+ currency:
+ code: CurrencyCode
destination_location_id: id
expected_at: date
id: id
@@ -83982,7 +83998,8 @@ components:
attributes:
amount: decimal
created_at: datetime
- currency: text
+ currency:
+ code: CurrencyCode
id: id
period_end: datetime
period_start: datetime
@@ -84031,7 +84048,8 @@ components:
attributes:
amount: decimal
created_at: datetime
- currency: text
+ currency:
+ code: CurrencyCode
id: id
kind:
enum:
@@ -84095,7 +84113,8 @@ components:
StockLocation:
attributes:
active: boolean
- country_code: text
+ country_code:
+ code: CountryCode
created_at: datetime
default: boolean
id: id
@@ -84221,7 +84240,8 @@ components:
amount: decimal
created_at: datetime
created_by_id: id
- currency: text
+ currency:
+ code: CurrencyCode
customer_id: id
id: id
memo: text
@@ -84244,7 +84264,8 @@ components:
attributes:
city: text
contact_name: text
- country_code: text
+ country_code:
+ code: CountryCode
created_at: datetime
email: text
id: id
@@ -84308,7 +84329,8 @@ components:
scopes: {}
TaxLine:
attributes:
- country_code: text
+ country_code:
+ code: CountryCode
created_at: datetime
id: id
included: boolean
@@ -84321,7 +84343,8 @@ components:
TaxRate:
attributes:
amount: decimal
- country_code: text
+ country_code:
+ code: CountryCode
created_at: datetime
id: id
name: text
@@ -84337,9 +84360,11 @@ components:
carton_package_type_id: id
carton_weight: decimal
cartons_per_pallet: integer
- cost_currency: text
+ cost_currency:
+ code: CurrencyCode
cost_price: decimal
- country_of_origin: text
+ country_of_origin:
+ code: CountryCode
created_at: datetime
deleted_at: datetime
depth: decimal
diff --git a/docs/api-reference/seller.yaml b/docs/api-reference/seller.yaml
index 8eb4520ade..55b380c09a 100644
--- a/docs/api-reference/seller.yaml
+++ b/docs/api-reference/seller.yaml
@@ -15232,7 +15232,7 @@ paths:
| Attribute | Kind | Predicates |
|---|---|---|
| `active` | True or false | `eq` `not_eq` `in` `not_in` `true` `false` `null` |
- | `country_code` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
+ | `country_code` | One of the `CountryCode` codes | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `created_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `default` | True or false | `eq` `not_eq` `in` `not_in` `true` `false` `null` |
| `id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
@@ -20681,12 +20681,14 @@ paths:
| `channel_id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `completed_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `created_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
- | `currency` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
+ | `currency` | One of the `CurrencyCode` codes | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `customer_id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `delivery_total` | Amount | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `fulfillment_status` | One of `backorder`, `canceled`, `partial`, `unfulfilled`, `fulfilled`, `delivered`, `pending`, `ready`, `shipped` | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `item_total` | Amount | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
+ | `locale` | One of the `LocaleCode` codes | `eq` `not_eq` `in` `not_in` `null` `not_null` |
+ | `market_id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `number` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
| `order_group_id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `payment_status` | One of `none`, `authorized`, `partially_paid`, `paid`, `partially_refunded`, `refunded`, `overcharged`, `voided`, `balance_due`, `credit_owed`, `failed`, `void` | `eq` `not_eq` `in` `not_in` `null` `not_null` |
@@ -20697,7 +20699,7 @@ paths:
| `total_quantity` | Number | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `updated_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
- **Sort by:** `channel_id`, `completed_at`, `created_at`, `currency`, `customer_id`, `delivery_total`, `fulfillment_status`, `id`, `item_total`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at`. Prefix a field with `-` to sort descending.
+ **Sort by:** `channel_id`, `completed_at`, `created_at`, `currency`, `customer_id`, `delivery_total`, `fulfillment_status`, `id`, `item_total`, `locale`, `market_id`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at`. Prefix a field with `-` to sort descending.
x-spree-filters:
table: Order
sortable:
@@ -20710,6 +20712,8 @@ paths:
- fulfillment_status
- id
- item_total
+ - locale
+ - market_id
- number
- order_group_id
- payment_state
@@ -22393,7 +22397,7 @@ paths:
|---|---|---|
| `amount` | Amount | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `created_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
- | `currency` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
+ | `currency` | One of the `CurrencyCode` codes | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `period_end` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `period_start` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
@@ -23506,7 +23510,7 @@ paths:
|---|---|---|
| `amount` | Amount | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `created_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
- | `currency` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
+ | `currency` | One of the `CurrencyCode` codes | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `kind` | One of `earning`, `refund_reversal` | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `order_id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
@@ -32821,7 +32825,8 @@ components:
channel_id: id
completed_at: datetime
created_at: datetime
- currency: text
+ currency:
+ code: CurrencyCode
customer_id: id
delivery_total: decimal
fulfillment_status:
@@ -32837,6 +32842,9 @@ components:
- shipped
id: id
item_total: decimal
+ locale:
+ code: LocaleCode
+ market_id: id
number: text
order_group_id: id
payment_state:
@@ -33010,7 +33018,8 @@ components:
attributes:
amount: decimal
created_at: datetime
- currency: text
+ currency:
+ code: CurrencyCode
id: id
period_end: datetime
period_start: datetime
@@ -33032,7 +33041,8 @@ components:
attributes:
amount: decimal
created_at: datetime
- currency: text
+ currency:
+ code: CurrencyCode
id: id
kind:
enum:
@@ -33075,7 +33085,8 @@ components:
StockLocation:
attributes:
active: boolean
- country_code: text
+ country_code:
+ code: CountryCode
created_at: datetime
default: boolean
id: id
diff --git a/docs/api-reference/store.yaml b/docs/api-reference/store.yaml
index b657095a20..fe6a5f045b 100644
--- a/docs/api-reference/store.yaml
+++ b/docs/api-reference/store.yaml
@@ -2131,12 +2131,14 @@ paths:
| `channel_id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `completed_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `created_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
- | `currency` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
+ | `currency` | One of the `CurrencyCode` codes | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `customer_id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `delivery_total` | Amount | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `fulfillment_status` | One of `backorder`, `canceled`, `partial`, `unfulfilled`, `fulfilled`, `delivered`, `pending`, `ready`, `shipped` | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `item_total` | Amount | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
+ | `locale` | One of the `LocaleCode` codes | `eq` `not_eq` `in` `not_in` `null` `not_null` |
+ | `market_id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `number` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
| `order_group_id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `payment_status` | One of `none`, `authorized`, `partially_paid`, `paid`, `partially_refunded`, `refunded`, `overcharged`, `voided`, `balance_due`, `credit_owed`, `failed`, `void` | `eq` `not_eq` `in` `not_in` `null` `not_null` |
@@ -2147,7 +2149,7 @@ paths:
| `total_quantity` | Number | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `updated_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
- **Sort by:** `channel_id`, `completed_at`, `created_at`, `currency`, `customer_id`, `delivery_total`, `fulfillment_status`, `id`, `item_total`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at`. Prefix a field with `-` to sort descending.
+ **Sort by:** `channel_id`, `completed_at`, `created_at`, `currency`, `customer_id`, `delivery_total`, `fulfillment_status`, `id`, `item_total`, `locale`, `market_id`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at`. Prefix a field with `-` to sort descending.
x-spree-filters:
table: Order
sortable:
@@ -2160,6 +2162,8 @@ paths:
- fulfillment_status
- id
- item_total
+ - locale
+ - market_id
- number
- order_group_id
- payment_state
@@ -6864,7 +6868,7 @@ paths:
| `address2` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
| `city` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
| `company` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
- | `country_code` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
+ | `country_code` | One of the `CountryCode` codes | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `created_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `first_name` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
| `id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
@@ -7678,12 +7682,14 @@ paths:
| `channel_id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `completed_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `created_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
- | `currency` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
+ | `currency` | One of the `CurrencyCode` codes | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `customer_id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `delivery_total` | Amount | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `fulfillment_status` | One of `backorder`, `canceled`, `partial`, `unfulfilled`, `fulfilled`, `delivered`, `pending`, `ready`, `shipped` | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `item_total` | Amount | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
+ | `locale` | One of the `LocaleCode` codes | `eq` `not_eq` `in` `not_in` `null` `not_null` |
+ | `market_id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `number` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
| `order_group_id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `payment_status` | One of `none`, `authorized`, `partially_paid`, `paid`, `partially_refunded`, `refunded`, `overcharged`, `voided`, `balance_due`, `credit_owed`, `failed`, `void` | `eq` `not_eq` `in` `not_in` `null` `not_null` |
@@ -7694,7 +7700,7 @@ paths:
| `total_quantity` | Number | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `updated_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
- **Sort by:** `channel_id`, `completed_at`, `created_at`, `currency`, `customer_id`, `delivery_total`, `fulfillment_status`, `id`, `item_total`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at`. Prefix a field with `-` to sort descending.
+ **Sort by:** `channel_id`, `completed_at`, `created_at`, `currency`, `customer_id`, `delivery_total`, `fulfillment_status`, `id`, `item_total`, `locale`, `market_id`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at`. Prefix a field with `-` to sort descending.
x-spree-filters:
table: Order
sortable:
@@ -7707,6 +7713,8 @@ paths:
- fulfillment_status
- id
- item_total
+ - locale
+ - market_id
- number
- order_group_id
- payment_state
@@ -9041,7 +9049,7 @@ paths:
| `code` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
| `created_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `created_by_id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
- | `currency` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
+ | `currency` | One of the `CurrencyCode` codes | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `customer_id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `expires_at` | Date | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `gift_card_batch_id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
@@ -9535,7 +9543,7 @@ paths:
|---|---|---|
| `amount` | Amount | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `created_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
- | `currency` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
+ | `currency` | One of the `CurrencyCode` codes | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `customer_id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `updated_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
@@ -11974,7 +11982,7 @@ paths:
| `address2` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
| `city` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
| `company` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
- | `country_code` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
+ | `country_code` | One of the `CountryCode` codes | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `created_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `first_name` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
| `id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
@@ -12296,12 +12304,14 @@ paths:
| `channel_id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `completed_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `created_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
- | `currency` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
+ | `currency` | One of the `CurrencyCode` codes | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `customer_id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `delivery_total` | Amount | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `fulfillment_status` | One of `backorder`, `canceled`, `partial`, `unfulfilled`, `fulfilled`, `delivered`, `pending`, `ready`, `shipped` | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `item_total` | Amount | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
+ | `locale` | One of the `LocaleCode` codes | `eq` `not_eq` `in` `not_in` `null` `not_null` |
+ | `market_id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `number` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |
| `order_group_id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |
| `payment_status` | One of `none`, `authorized`, `partially_paid`, `paid`, `partially_refunded`, `refunded`, `overcharged`, `voided`, `balance_due`, `credit_owed`, `failed`, `void` | `eq` `not_eq` `in` `not_in` `null` `not_null` |
@@ -12312,7 +12322,7 @@ paths:
| `total_quantity` | Number | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
| `updated_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |
- **Sort by:** `channel_id`, `completed_at`, `created_at`, `currency`, `customer_id`, `delivery_total`, `fulfillment_status`, `id`, `item_total`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at`. Prefix a field with `-` to sort descending.
+ **Sort by:** `channel_id`, `completed_at`, `created_at`, `currency`, `customer_id`, `delivery_total`, `fulfillment_status`, `id`, `item_total`, `locale`, `market_id`, `number`, `order_group_id`, `payment_status`, `po_number`, `seller_id`, `status`, `total`, `total_quantity`, `updated_at`. Prefix a field with `-` to sort descending.
x-spree-filters:
table: Order
sortable:
@@ -12325,6 +12335,8 @@ paths:
- fulfillment_status
- id
- item_total
+ - locale
+ - market_id
- number
- order_group_id
- payment_state
@@ -24230,7 +24242,8 @@ components:
address2: text
city: text
company: text
- country_code: text
+ country_code:
+ code: CountryCode
created_at: datetime
first_name: text
id: id
@@ -24368,7 +24381,8 @@ components:
code: text
created_at: datetime
created_by_id: id
- currency: text
+ currency:
+ code: CurrencyCode
customer_id: id
expires_at: date
gift_card_batch_id: id
@@ -24398,7 +24412,8 @@ components:
channel_id: id
completed_at: datetime
created_at: datetime
- currency: text
+ currency:
+ code: CurrencyCode
customer_id: id
delivery_total: decimal
fulfillment_status:
@@ -24414,6 +24429,9 @@ components:
- shipped
id: id
item_total: decimal
+ locale:
+ code: LocaleCode
+ market_id: id
number: text
order_group_id: id
payment_state:
@@ -24554,7 +24572,8 @@ components:
attributes:
amount: decimal
created_at: datetime
- currency: text
+ currency:
+ code: CurrencyCode
customer_id: id
id: id
updated_at: datetime
diff --git a/packages/admin-sdk/src/types/filters.generated.ts b/packages/admin-sdk/src/types/filters.generated.ts
index 6e03c20e5e..7aa6465f50 100644
--- a/packages/admin-sdk/src/types/filters.generated.ts
+++ b/packages/admin-sdk/src/types/filters.generated.ts
@@ -2,9 +2,10 @@
import type * as Filter from '@spree/sdk-core'
-export type AddressFields = Filter.TextFilters<'address1' | 'address2' | 'city' | 'company' | 'country_code' | 'first_name' | 'last_name' | 'phone' | 'postal_code' | 'state_code'>
+export type AddressFields = Filter.TextFilters<'address1' | 'address2' | 'city' | 'company' | 'first_name' | 'last_name' | 'phone' | 'postal_code' | 'state_code'>
& Filter.RangeFilters<'created_at' | 'updated_at'>
& Filter.IdFilters<'id'>
+ & Filter.CodeFilters<'country_code', Filter.CountryCode>
export type AdminUserFields = Filter.RangeFilters<'created_at' | 'updated_at'>
& Filter.TextFilters<'email' | 'first_name' | 'last_name'>
@@ -56,8 +57,8 @@ export type CollectionFields = Filter.BooleanFilters<'automatic'>
& Filter.EnumFilters<'sort_order', 'manual' | 'best_selling' | 'price asc' | 'price desc' | 'available_on desc' | 'available_on asc' | 'name asc' | 'name desc'>
export type CommissionLineFields = Filter.RangeFilters<'amount' | 'created_at' | 'rate' | 'tax_amount' | 'total' | 'updated_at'>
- & Filter.TextFilters<'currency'>
& Filter.IdFilters<'id' | 'order_id'>
+ & Filter.CodeFilters<'currency', Filter.CurrencyCode>
& Filter.EnumFilters<'kind', 'percentage' | 'fixed'>
export type CommissionRateFields = Filter.TextFilters<'code' | 'name'>
@@ -181,9 +182,10 @@ export type FulfillmentFields = Filter.RangeFilters<'created_at' | 'updated_at'>
& Filter.IdFilters<'id'>
& Filter.TextFilters<'number'>
-export type GiftCardFields = Filter.TextFilters<'code' | 'currency'>
+export type GiftCardFields = Filter.TextFilters<'code'>
& Filter.RangeFilters<'created_at' | 'expires_at' | 'updated_at'>
& Filter.IdFilters<'created_by_id' | 'customer_id' | 'gift_card_batch_id' | 'id'>
+ & Filter.CodeFilters<'currency', Filter.CurrencyCode>
& Filter.EnumFilters<'state', 'active' | 'partially_redeemed' | 'redeemed' | 'canceled'>
& Filter.EnumFilters<'status', 'active' | 'partially_redeemed' | 'redeemed' | 'canceled'>
@@ -212,9 +214,11 @@ export type LineItemFields = Filter.RangeFilters<'additional_tax_total' | 'adjus
& Filter.RangeFilters<'quantity', number>
export type MarketFields = Filter.RangeFilters<'created_at' | 'updated_at'>
- & Filter.TextFilters<'currency' | 'default_locale' | 'name'>
& Filter.IdFilters<'id'>
+ & Filter.TextFilters<'name'>
& Filter.RangeFilters<'position', number>
+ & Filter.CodeFilters<'currency', Filter.CurrencyCode>
+ & Filter.CodeFilters<'default_locale', Filter.LocaleCode>
export type MediaFields = Filter.TextFilters<'alt'>
& Filter.RangeFilters<'created_at' | 'updated_at'>
@@ -233,12 +237,14 @@ export type OptionValueFields = Filter.RangeFilters<'created_at' | 'updated_at'>
& Filter.TextFilters<'label' | 'name'>
& Filter.RangeFilters<'position', number>
-export type OrderFields = Filter.IdFilters<'channel_id' | 'customer_id' | 'id' | 'order_group_id' | 'seller_id'>
+export type OrderFields = Filter.IdFilters<'channel_id' | 'customer_id' | 'id' | 'market_id' | 'order_group_id' | 'seller_id'>
& Filter.RangeFilters<'completed_at' | 'created_at' | 'delivery_total' | 'item_total' | 'total' | 'updated_at'>
& Filter.BooleanFilters<'considered_risky'>
- & Filter.TextFilters<'coupon_code' | 'currency' | 'email' | 'number' | 'po_number'>
+ & Filter.TextFilters<'coupon_code' | 'email' | 'number' | 'po_number'>
& Filter.RangeFilters<'total_quantity', number>
+ & Filter.CodeFilters<'currency', Filter.CurrencyCode>
& Filter.EnumFilters<'fulfillment_status', 'backorder' | 'canceled' | 'partial' | 'unfulfilled' | 'fulfilled' | 'delivered' | 'pending' | 'ready' | 'shipped'>
+ & Filter.CodeFilters<'locale', Filter.LocaleCode>
& Filter.EnumFilters<'payment_state', 'none' | 'authorized' | 'partially_paid' | 'paid' | 'partially_refunded' | 'refunded' | 'overcharged' | 'voided' | 'balance_due' | 'credit_owed' | 'failed' | 'void'>
& Filter.EnumFilters<'payment_status', 'none' | 'authorized' | 'partially_paid' | 'paid' | 'partially_refunded' | 'refunded' | 'overcharged' | 'voided' | 'balance_due' | 'credit_owed' | 'failed' | 'void'>
& Filter.EnumFilters<'shipment_state', 'backorder' | 'canceled' | 'partial' | 'unfulfilled' | 'fulfilled' | 'delivered' | 'pending' | 'ready' | 'shipped'>
@@ -250,8 +256,9 @@ export type OrderCancellationReasonFields = Filter.BooleanFilters<'active'>
& Filter.TextFilters<'name'>
export type OrderGroupFields = Filter.RangeFilters<'created_at' | 'updated_at'>
- & Filter.TextFilters<'currency' | 'email' | 'number'>
+ & Filter.TextFilters<'email' | 'number'>
& Filter.IdFilters<'id'>
+ & Filter.CodeFilters<'currency', Filter.CurrencyCode>
export type OrderRoutingRuleFields = Filter.BooleanFilters<'active'>
& Filter.IdFilters<'channel_id' | 'id' | 'store_id' | 'type'>
@@ -281,9 +288,9 @@ export type PolicyFields = Filter.RangeFilters<'created_at' | 'updated_at'>
& Filter.TextFilters<'name'>
export type PriceFields = Filter.RangeFilters<'amount' | 'compare_at_amount' | 'created_at' | 'updated_at'>
- & Filter.TextFilters<'currency'>
& Filter.IdFilters<'id' | 'price_list_id' | 'variant_id'>
& Filter.RangeFilters<'min_quantity', number>
+ & Filter.CodeFilters<'currency', Filter.CurrencyCode>
export type PriceListFields = Filter.IdFilters<'catalog_id' | 'id'>
& Filter.RangeFilters<'created_at' | 'ends_at' | 'starts_at' | 'updated_at'>
@@ -318,8 +325,9 @@ export type PromotionRuleFields = Filter.RangeFilters<'created_at' | 'updated_at
& Filter.IdFilters<'id'>
export type PurchaseOrderFields = Filter.RangeFilters<'cancel_by' | 'closed_short_at' | 'created_at' | 'expected_at' | 'ordered_at' | 'received_at' | 'updated_at'>
- & Filter.TextFilters<'currency' | 'number' | 'reference'>
& Filter.IdFilters<'destination_location_id' | 'id' | 'supplier_id'>
+ & Filter.TextFilters<'number' | 'reference'>
+ & Filter.CodeFilters<'currency', Filter.CurrencyCode>
& Filter.EnumFilters<'status', 'draft' | 'ordered' | 'partially_received' | 'received' | 'over_received' | 'canceled'>
export type PurchaseOrderItemFields = Filter.RangeFilters<'created_at' | 'unit_cost' | 'updated_at'>
@@ -359,8 +367,9 @@ export type SellerFields = Filter.TextFilters<'contact_email' | 'name'>
& Filter.EnumFilters<'status', 'pending' | 'invited' | 'canceled' | 'onboarding' | 'ready_for_review' | 'approved' | 'rejected' | 'suspended'>
export type SellerPayoutFields = Filter.RangeFilters<'amount' | 'created_at' | 'period_end' | 'period_start' | 'updated_at'>
- & Filter.TextFilters<'currency' | 'provider' | 'reference'>
& Filter.IdFilters<'id' | 'seller_id'>
+ & Filter.TextFilters<'provider' | 'reference'>
+ & Filter.CodeFilters<'currency', Filter.CurrencyCode>
& Filter.EnumFilters<'status', 'pending' | 'processing' | 'completed' | 'failed' | 'unresolved'>
export type SellerRequirementFields = Filter.RangeFilters<'created_at' | 'updated_at'>
@@ -373,8 +382,9 @@ export type SellerRequirementSubmissionFields = Filter.RangeFilters<'created_at'
& Filter.EnumFilters<'status', 'pending' | 'accepted' | 'rejected' | 'waived'>
export type SellerTransferFields = Filter.RangeFilters<'amount' | 'created_at' | 'updated_at'>
- & Filter.TextFilters<'currency' | 'provider' | 'reference'>
& Filter.IdFilters<'id' | 'order_id' | 'payout_id' | 'seller_id'>
+ & Filter.TextFilters<'provider' | 'reference'>
+ & Filter.CodeFilters<'currency', Filter.CurrencyCode>
& Filter.EnumFilters<'kind', 'earning' | 'refund_reversal'>
& Filter.EnumFilters<'status', 'pending' | 'processing' | 'completed' | 'failed' | 'unresolved'>
@@ -389,9 +399,10 @@ export type StockLevelFields = Filter.RangeFilters<'allocated_count' | 'count_on
& Filter.IdFilters<'id' | 'stock_location_id' | 'variant_id'>
export type StockLocationFields = Filter.BooleanFilters<'active' | 'default' | 'pickup_enabled' | 'returns_enabled'>
- & Filter.TextFilters<'country_code' | 'kind' | 'name' | 'state_code'>
& Filter.RangeFilters<'created_at' | 'updated_at'>
& Filter.IdFilters<'id' | 'seller_id'>
+ & Filter.TextFilters<'kind' | 'name' | 'state_code'>
+ & Filter.CodeFilters<'country_code', Filter.CountryCode>
export type StockMovementFields = Filter.RangeFilters<'created_at' | 'unit_cost' | 'updated_at'>
& Filter.IdFilters<'exchange_id' | 'fulfillment_id' | 'id' | 'order_id' | 'purchase_order_id' | 'return_id' | 'stock_item_id' | 'stock_level_id' | 'stock_receipt_id' | 'stock_transfer_id'>
@@ -422,14 +433,16 @@ export type StoreFields = Filter.RangeFilters<'created_at' | 'updated_at'>
export type StoreCreditFields = Filter.RangeFilters<'amount' | 'created_at' | 'updated_at'>
& Filter.IdFilters<'created_by_id' | 'customer_id' | 'id'>
- & Filter.TextFilters<'currency' | 'memo'>
+ & Filter.TextFilters<'memo'>
+ & Filter.CodeFilters<'currency', Filter.CurrencyCode>
export type StoreCreditEventFields = Filter.RangeFilters<'created_at' | 'updated_at'>
& Filter.IdFilters<'id'>
-export type SupplierFields = Filter.TextFilters<'city' | 'contact_name' | 'country_code' | 'email' | 'name' | 'phone'>
+export type SupplierFields = Filter.TextFilters<'city' | 'contact_name' | 'email' | 'name' | 'phone'>
& Filter.RangeFilters<'created_at' | 'updated_at'>
& Filter.IdFilters<'id'>
+ & Filter.CodeFilters<'country_code', Filter.CountryCode>
export type TagFields = Filter.RangeFilters<'created_at' | 'updated_at'>
& Filter.IdFilters<'id'>
@@ -453,20 +466,24 @@ export type TaxExemptionReasonFields = Filter.BooleanFilters<'active'>
export type TaxIdentifierFields = Filter.RangeFilters<'created_at' | 'updated_at'>
& Filter.IdFilters<'id'>
-export type TaxLineFields = Filter.TextFilters<'country_code' | 'provider_id' | 'state_code' | 'taxability_reason'>
- & Filter.RangeFilters<'created_at' | 'updated_at'>
+export type TaxLineFields = Filter.RangeFilters<'created_at' | 'updated_at'>
& Filter.IdFilters<'id'>
& Filter.BooleanFilters<'included'>
+ & Filter.TextFilters<'provider_id' | 'state_code' | 'taxability_reason'>
+ & Filter.CodeFilters<'country_code', Filter.CountryCode>
export type TaxRateFields = Filter.RangeFilters<'amount' | 'created_at' | 'rate' | 'updated_at'>
- & Filter.TextFilters<'country_code' | 'name' | 'state_code'>
& Filter.IdFilters<'id' | 'tax_category_id'>
+ & Filter.TextFilters<'name' | 'state_code'>
+ & Filter.CodeFilters<'country_code', Filter.CountryCode>
export type VariantFields = Filter.IdFilters<'carton_package_type_id' | 'id' | 'product_id'>
& Filter.RangeFilters<'carton_weight' | 'cost_price' | 'created_at' | 'deleted_at' | 'depth' | 'discontinue_on' | 'height' | 'updated_at' | 'weight' | 'width'>
& Filter.RangeFilters<'cartons_per_pallet' | 'minimum_order_quantity' | 'order_multiple' | 'position' | 'units_per_carton', number>
- & Filter.TextFilters<'cost_currency' | 'country_of_origin' | 'hs_code' | 'sku'>
+ & Filter.TextFilters<'hs_code' | 'sku'>
& Filter.BooleanFilters<'track_inventory'>
+ & Filter.CodeFilters<'cost_currency', Filter.CurrencyCode>
+ & Filter.CodeFilters<'country_of_origin', Filter.CountryCode>
& Filter.EnumFilters<'purchase_unit', 'unit' | 'carton'>
export type WebhookDeliveryFields = Filter.RangeFilters<'created_at' | 'delivered_at' | 'updated_at'>
@@ -1580,7 +1597,7 @@ export type OrderFilters = OrderFields
& Filter.OrFilters
& OrderFilterExtensions
-export type OrderSort = Filter.SortKey<'channel_id' | 'completed_at' | 'considered_risky' | 'coupon_code' | 'created_at' | 'currency' | 'customer_id' | 'delivery_total' | 'email' | 'fulfillment_status' | 'id' | 'item_total' | 'number' | 'order_group_id' | 'payment_state' | 'payment_status' | 'po_number' | 'seller_id' | 'shipment_state' | 'status' | 'total' | 'total_quantity' | 'updated_at' | (keyof OrderSortExtensions & string)>
+export type OrderSort = Filter.SortKey<'channel_id' | 'completed_at' | 'considered_risky' | 'coupon_code' | 'created_at' | 'currency' | 'customer_id' | 'delivery_total' | 'email' | 'fulfillment_status' | 'id' | 'item_total' | 'locale' | 'market_id' | 'number' | 'order_group_id' | 'payment_state' | 'payment_status' | 'po_number' | 'seller_id' | 'shipment_state' | 'status' | 'total' | 'total_quantity' | 'updated_at' | (keyof OrderSortExtensions & string)>
/**
* Filters your app adds to OrderCancellationReason lists. Generate them with `spree filters types`,
diff --git a/packages/admin-sdk/src/types/index.ts b/packages/admin-sdk/src/types/index.ts
index abbc2f52f7..10cfb036ca 100644
--- a/packages/admin-sdk/src/types/index.ts
+++ b/packages/admin-sdk/src/types/index.ts
@@ -3,6 +3,7 @@
// `spree filters types`).
export type {
BooleanFilters,
+ CodeFilters,
CustomFieldValueFilters,
EnumFilters,
ErrorResponse,
diff --git a/packages/sdk-core/src/filter-types.ts b/packages/sdk-core/src/filter-types.ts
index 07438b0053..76eda182ba 100644
--- a/packages/sdk-core/src/filter-types.ts
+++ b/packages/sdk-core/src/filter-types.ts
@@ -21,7 +21,10 @@ type Kind =
| 'id'
| 'type'
| 'boolean'
-type AttributeKind = Kind | { enum: string[] }
+// `code` names one of the shared code-list types the SDKs export
+// (`LocaleCode`, `CurrencyCode`, `CountryCode`), for a closed list the API
+// does not enumerate per table.
+type AttributeKind = Kind | { enum: string[] } | { code: string }
type ScopeType = Kind | Kind[] | { list: Kind }
interface FilterTable {
@@ -103,7 +106,11 @@ function fieldsType(table: FilterTable): string {
for (const [attribute, kind] of Object.entries(table.attributes)) {
if (typeof kind === 'object') {
- enums.push(`Filter.EnumFilters<${literal(attribute)}, ${union(kind.enum)}>`)
+ enums.push(
+ 'code' in kind
+ ? `Filter.CodeFilters<${literal(attribute)}, Filter.${kind.code}>`
+ : `Filter.EnumFilters<${literal(attribute)}, ${union(kind.enum)}>`,
+ )
continue
}
const block = KIND_TYPES[kind as Exclude<Kind, 'enum'>].block
diff --git a/packages/sdk-core/src/filters.ts b/packages/sdk-core/src/filters.ts
index 21de59e43e..499cbedac3 100644
--- a/packages/sdk-core/src/filters.ts
+++ b/packages/sdk-core/src/filters.ts
@@ -54,6 +54,9 @@ export type EnumFilters<K extends string, V extends string> = KindFilters<
V | (string & {})
>
+/** A code from a closed standard list (`CurrencyCode`, `CountryCode`, `LocaleCode`); no other value is accepted. */
+export type CodeFilters<K extends string, V extends string> = KindFilters<K, 'equality', V>
+
/** Prefixed IDs (`prod_86Rf07xd4z`) and type short names (`credit_card`). */
export type IdFilters<K extends string> = KindFilters<K, 'equality', string>
diff --git a/packages/sdk-core/src/index.ts b/packages/sdk-core/src/index.ts
index 54290122be..6a18c0e829 100644
--- a/packages/sdk-core/src/index.ts
+++ b/packages/sdk-core/src/index.ts
@@ -4,6 +4,7 @@ export type { FilterSpec } from './filter-types'
export { renderAppFilterTypes, renderFilterTypes } from './filter-types'
export type {
BooleanFilters,
+ CodeFilters,
CustomFieldValueFilters,
EnumFilters,
IdFilters,
diff --git a/packages/sdk/src/types/filters.generated.ts b/packages/sdk/src/types/filters.generated.ts
index 8ef88c7e6d..425b935f6b 100644
--- a/packages/sdk/src/types/filters.generated.ts
+++ b/packages/sdk/src/types/filters.generated.ts
@@ -2,9 +2,10 @@
import type * as Filter from '@spree/sdk-core'
-export type AddressFields = Filter.TextFilters<'address1' | 'address2' | 'city' | 'company' | 'country_code' | 'first_name' | 'last_name' | 'phone' | 'postal_code' | 'state_code'>
+export type AddressFields = Filter.TextFilters<'address1' | 'address2' | 'city' | 'company' | 'first_name' | 'last_name' | 'phone' | 'postal_code' | 'state_code'>
& Filter.RangeFilters<'created_at' | 'updated_at'>
& Filter.IdFilters<'id'>
+ & Filter.CodeFilters<'country_code', Filter.CountryCode>
export type CategoryFields = Filter.BooleanFilters<'automatic'>
& Filter.RangeFilters<'children_count' | 'depth' | 'position' | 'products_count', number>
@@ -49,17 +50,20 @@ export type DeliveryMethodFields = Filter.BooleanFilters<'available_to_sellers'
export type DigitalLinkFields = Filter.RangeFilters<'created_at' | 'updated_at'>
& Filter.IdFilters<'id'>
-export type GiftCardFields = Filter.TextFilters<'code' | 'currency'>
+export type GiftCardFields = Filter.TextFilters<'code'>
& Filter.RangeFilters<'created_at' | 'expires_at' | 'updated_at'>
& Filter.IdFilters<'created_by_id' | 'customer_id' | 'gift_card_batch_id' | 'id'>
+ & Filter.CodeFilters<'currency', Filter.CurrencyCode>
& Filter.EnumFilters<'state', 'active' | 'partially_redeemed' | 'redeemed' | 'canceled'>
& Filter.EnumFilters<'status', 'active' | 'partially_redeemed' | 'redeemed' | 'canceled'>
-export type OrderFields = Filter.IdFilters<'channel_id' | 'customer_id' | 'id' | 'order_group_id' | 'seller_id'>
+export type OrderFields = Filter.IdFilters<'channel_id' | 'customer_id' | 'id' | 'market_id' | 'order_group_id' | 'seller_id'>
& Filter.RangeFilters<'completed_at' | 'created_at' | 'delivery_total' | 'item_total' | 'total' | 'updated_at'>
- & Filter.TextFilters<'currency' | 'number' | 'po_number'>
+ & Filter.TextFilters<'number' | 'po_number'>
& Filter.RangeFilters<'total_quantity', number>
+ & Filter.CodeFilters<'currency', Filter.CurrencyCode>
& Filter.EnumFilters<'fulfillment_status', 'backorder' | 'canceled' | 'partial' | 'unfulfilled' | 'fulfilled' | 'delivered' | 'pending' | 'ready' | 'shipped'>
+ & Filter.CodeFilters<'locale', Filter.LocaleCode>
& Filter.EnumFilters<'payment_state', 'none' | 'authorized' | 'partially_paid' | 'paid' | 'partially_refunded' | 'refunded' | 'overcharged' | 'voided' | 'balance_due' | 'credit_owed' | 'failed' | 'void'>
& Filter.EnumFilters<'payment_status', 'none' | 'authorized' | 'partially_paid' | 'paid' | 'partially_refunded' | 'refunded' | 'overcharged' | 'voided' | 'balance_due' | 'credit_owed' | 'failed' | 'void'>
& Filter.EnumFilters<'shipment_state', 'backorder' | 'canceled' | 'partial' | 'unfulfilled' | 'fulfilled' | 'delivered' | 'pending' | 'ready' | 'shipped'>
@@ -84,8 +88,8 @@ export type SellerFields = Filter.RangeFilters<'created_at' | 'updated_at'>
& Filter.TextFilters<'name'>
export type StoreCreditFields = Filter.RangeFilters<'amount' | 'created_at' | 'updated_at'>
- & Filter.TextFilters<'currency'>
& Filter.IdFilters<'customer_id' | 'id'>
+ & Filter.CodeFilters<'currency', Filter.CurrencyCode>
export type TagFields = Filter.RangeFilters<'created_at' | 'updated_at'>
& Filter.IdFilters<'id'>
@@ -363,7 +367,7 @@ export type OrderFilters = OrderFields
& Filter.OrFilters
& OrderFilterExtensions
-export type OrderSort = Filter.SortKey<'channel_id' | 'completed_at' | 'created_at' | 'currency' | 'customer_id' | 'delivery_total' | 'fulfillment_status' | 'id' | 'item_total' | 'number' | 'order_group_id' | 'payment_state' | 'payment_status' | 'po_number' | 'seller_id' | 'shipment_state' | 'status' | 'total' | 'total_quantity' | 'updated_at' | (keyof OrderSortExtensions & string)>
+export type OrderSort = Filter.SortKey<'channel_id' | 'completed_at' | 'created_at' | 'currency' | 'customer_id' | 'delivery_total' | 'fulfillment_status' | 'id' | 'item_total' | 'locale' | 'market_id' | 'number' | 'order_group_id' | 'payment_state' | 'payment_status' | 'po_number' | 'seller_id' | 'shipment_state' | 'status' | 'total' | 'total_quantity' | 'updated_at' | (keyof OrderSortExtensions & string)>
/**
* Filters your app adds to Policy lists. Generate them with `spree filters types`,
diff --git a/packages/sdk/src/types/index.ts b/packages/sdk/src/types/index.ts
index 06a29b7379..2aafca0e8f 100644
--- a/packages/sdk/src/types/index.ts
+++ b/packages/sdk/src/types/index.ts
@@ -168,6 +168,7 @@ export interface ProductFiltersParams {
// that extends them (see `spree filters types`).
export type {
BooleanFilters,
+ CodeFilters,
CustomFieldValueFilters,
EnumFilters,
IdFilters,
diff --git a/packages/seller-sdk/src/types/filters.generated.ts b/packages/seller-sdk/src/types/filters.generated.ts
index 819539e824..3efeb54be7 100644
--- a/packages/seller-sdk/src/types/filters.generated.ts
+++ b/packages/seller-sdk/src/types/filters.generated.ts
@@ -50,11 +50,13 @@ export type ImportRowFields = Filter.RangeFilters<'created_at' | 'updated_at'>
& Filter.RangeFilters<'row_number', number>
& Filter.EnumFilters<'status', 'pending' | 'processing' | 'completed' | 'failed'>
-export type OrderFields = Filter.IdFilters<'channel_id' | 'customer_id' | 'id' | 'order_group_id' | 'seller_id'>
+export type OrderFields = Filter.IdFilters<'channel_id' | 'customer_id' | 'id' | 'market_id' | 'order_group_id' | 'seller_id'>
& Filter.RangeFilters<'completed_at' | 'created_at' | 'delivery_total' | 'item_total' | 'total' | 'updated_at'>
- & Filter.TextFilters<'currency' | 'number' | 'po_number'>
+ & Filter.TextFilters<'number' | 'po_number'>
& Filter.RangeFilters<'total_quantity', number>
+ & Filter.CodeFilters<'currency', Filter.CurrencyCode>
& Filter.EnumFilters<'fulfillment_status', 'backorder' | 'canceled' | 'partial' | 'unfulfilled' | 'fulfilled' | 'delivered' | 'pending' | 'ready' | 'shipped'>
+ & Filter.CodeFilters<'locale', Filter.LocaleCode>
& Filter.EnumFilters<'payment_state', 'none' | 'authorized' | 'partially_paid' | 'paid' | 'partially_refunded' | 'refunded' | 'overcharged' | 'voided' | 'balance_due' | 'credit_owed' | 'failed' | 'void'>
& Filter.EnumFilters<'payment_status', 'none' | 'authorized' | 'partially_paid' | 'paid' | 'partially_refunded' | 'refunded' | 'overcharged' | 'voided' | 'balance_due' | 'credit_owed' | 'failed' | 'void'>
& Filter.EnumFilters<'shipment_state', 'backorder' | 'canceled' | 'partial' | 'unfulfilled' | 'fulfilled' | 'delivered' | 'pending' | 'ready' | 'shipped'>
@@ -95,13 +97,15 @@ export type ReturnReasonFields = Filter.BooleanFilters<'active'>
& Filter.TextFilters<'name'>
export type SellerPayoutFields = Filter.RangeFilters<'amount' | 'created_at' | 'period_end' | 'period_start' | 'updated_at'>
- & Filter.TextFilters<'currency' | 'provider' | 'reference'>
& Filter.IdFilters<'id' | 'seller_id'>
+ & Filter.TextFilters<'provider' | 'reference'>
+ & Filter.CodeFilters<'currency', Filter.CurrencyCode>
& Filter.EnumFilters<'status', 'pending' | 'processing' | 'completed' | 'failed' | 'unresolved'>
export type SellerTransferFields = Filter.RangeFilters<'amount' | 'created_at' | 'updated_at'>
- & Filter.TextFilters<'currency' | 'provider' | 'reference'>
& Filter.IdFilters<'id' | 'order_id' | 'payout_id' | 'seller_id'>
+ & Filter.TextFilters<'provider' | 'reference'>
+ & Filter.CodeFilters<'currency', Filter.CurrencyCode>
& Filter.EnumFilters<'kind', 'earning' | 'refund_reversal'>
& Filter.EnumFilters<'status', 'pending' | 'processing' | 'completed' | 'failed' | 'unresolved'>
@@ -112,9 +116,10 @@ export type ShippingLabelFields = Filter.TextFilters<'carrier' | 'tracking_numbe
& Filter.EnumFilters<'status', 'purchased' | 'refund_requested' | 'refunded'>
export type StockLocationFields = Filter.BooleanFilters<'active' | 'default' | 'pickup_enabled' | 'returns_enabled'>
- & Filter.TextFilters<'country_code' | 'kind' | 'name' | 'state_code'>
& Filter.RangeFilters<'created_at' | 'updated_at'>
& Filter.IdFilters<'id' | 'seller_id'>
+ & Filter.TextFilters<'kind' | 'name' | 'state_code'>
+ & Filter.CodeFilters<'country_code', Filter.CountryCode>
export type TaxIdentifierFields = Filter.RangeFilters<'created_at' | 'updated_at'>
& Filter.IdFilters<'id'>
@@ -358,7 +363,7 @@ export type OrderFilters = OrderFields
& Filter.OrFilters
& OrderFilterExtensions
-export type OrderSort = Filter.SortKey<'channel_id' | 'completed_at' | 'created_at' | 'currency' | 'customer_id' | 'delivery_total' | 'fulfillment_status' | 'id' | 'item_total' | 'number' | 'order_group_id' | 'payment_state' | 'payment_status' | 'po_number' | 'seller_id' | 'shipment_state' | 'status' | 'total' | 'total_quantity' | 'updated_at' | (keyof OrderSortExtensions & string)>
+export type OrderSort = Filter.SortKey<'channel_id' | 'completed_at' | 'created_at' | 'currency' | 'customer_id' | 'delivery_total' | 'fulfillment_status' | 'id' | 'item_total' | 'locale' | 'market_id' | 'number' | 'order_group_id' | 'payment_state' | 'payment_status' | 'po_number' | 'seller_id' | 'shipment_state' | 'status' | 'total' | 'total_quantity' | 'updated_at' | (keyof OrderSortExtensions & string)>
/**
* Filters your app adds to OrderCancellationReason lists. Generate them with `spree filters types`,
diff --git a/packages/seller-sdk/src/types/index.ts b/packages/seller-sdk/src/types/index.ts
index cd6661cd8c..e10741e736 100644
--- a/packages/seller-sdk/src/types/index.ts
+++ b/packages/seller-sdk/src/types/index.ts
@@ -46,6 +46,7 @@ export interface AuthTokens {
// that extends them (see `spree filters types`).
export type {
BooleanFilters,
+ CodeFilters,
CustomFieldValueFilters,
EnumFilters,
IdFilters,
diff --git a/spree/api/app/services/spree/api/v3/filter_table.rb b/spree/api/app/services/spree/api/v3/filter_table.rb
index 07a4d8272d..0f489324c7 100644
--- a/spree/api/app/services/spree/api/v3/filter_table.rb
+++ b/spree/api/app/services/spree/api/v3/filter_table.rb
@@ -25,6 +25,17 @@ module Spree
boolean: 'boolean'
}.freeze
+ # Columns holding a value from one of the closed code lists the API
+ # publishes as a shared type, matched by name (`locale`,
+ # `default_locale`, `cost_currency`), so clients filter with that type,
+ # not free text.
+ CODE_TYPES = {
+ 'locale' => 'LocaleCode',
+ 'currency' => 'CurrencyCode',
+ 'country_code' => 'CountryCode',
+ 'country_of_origin' => 'CountryCode'
+ }.freeze
+
# Raised when an endpoint's table cannot be described — a column of a
# kind the contract has no predicates for, or two models sharing a name.
class Error < StandardError; end
@@ -124,8 +135,9 @@ module Spree
self.class.name_for(model)
end
- # @return [Hash{String => String, Hash}] attribute => value kind, or
- # `{ 'enum' => [values] }` for a status
+ # @return [Hash{String => String, Hash}] attribute => value kind,
+ # `{ 'enum' => [values] }` for a status, or `{ 'code' => type }` for
+ # a value from a shared code list
def attributes
@attributes ||= kinds.reject { |_, kind| kind == :unclassified }.compact
end
@@ -210,6 +222,10 @@ module Spree
# attribute the model does not have (`position` on a table without
# one), `:unclassified` for one the contract cannot describe
def attribute_kind(attribute)
+ if (code_type = code_type(attribute))
+ return { 'code' => code_type }
+ end
+
aliased = model._ransack_aliases[attribute] || model.attribute_aliases[attribute]
return attribute_kind(aliased) if aliased
return ransacker_kind(model._ransackers[attribute]) if model._ransackers.key?(attribute)
@@ -220,7 +236,6 @@ module Spree
if (values = inclusion_values(attribute))
return { 'enum' => values }
end
-
column = model.columns_hash[attribute]
return COLUMN_KINDS.fetch(column.type, :unclassified) if column
return 'text' if translated_attribute?(attribute)
@@ -229,6 +244,10 @@ module Spree
:unclassified
end
+ def code_type(attribute)
+ CODE_TYPES.find { |name, _| attribute == name || attribute.end_with?("_#{name}") }&.last
+ end
+
# The fixed list an inclusion validation allows, for a column that
# holds one of a known set of values (`payment_status`, `kind`).
def inclusion_values(attribute)
diff --git a/spree/api/lib/spree/api/openapi/filter_documentation.rb b/spree/api/lib/spree/api/openapi/filter_documentation.rb
index 4051572ba9..b4bb3bb789 100644
--- a/spree/api/lib/spree/api/openapi/filter_documentation.rb
+++ b/spree/api/lib/spree/api/openapi/filter_documentation.rb
@@ -106,13 +106,20 @@ module Spree
def attribute_rows(table)
rows = ['| Attribute | Kind | Predicates |', '|---|---|---|']
table.attributes.except(*table.aliased_attributes).each do |attribute, kind|
- label = kind.is_a?(Hash) ? "One of #{kind['enum'].map { |value| "`#{value}`" }.join(', ')}" : KIND_LABELS.fetch(kind)
+ label = kind_label(kind)
predicates = Spree::Api::V3::FilterPredicates::BY_KIND.fetch(kind.is_a?(Hash) ? 'enum' : kind)
rows << "| `#{attribute}` | #{label} | #{predicates.map { |predicate| "`#{predicate}`" }.join(' ')} |"
end
rows
end
+ def kind_label(kind)
+ return KIND_LABELS.fetch(kind) unless kind.is_a?(Hash)
+ return "One of the `#{kind['code']}` codes" if kind['code']
+
+ "One of #{kind['enum'].map { |value| "`#{value}`" }.join(', ')}"
+ end
+
def association_rows
visible = ->(table) { table.attributes.keys - table.aliased_attributes }
@table.associations.flat_map do |name, associated|
diff --git a/spree/api/spec/services/spree/api/v3/filter_table_spec.rb b/spree/api/spec/services/spree/api/v3/filter_table_spec.rb
index c08d618948..a243732ac9 100644
--- a/spree/api/spec/services/spree/api/v3/filter_table_spec.rb
+++ b/spree/api/spec/services/spree/api/v3/filter_table_spec.rb
@@ -46,6 +46,16 @@ RSpec.describe Spree::Api::V3::FilterTable do
)
end
+ it 'publishes locale, currency and country columns as their shared code types' do
+ expect(table['attributes']).to include('locale' => { 'code' => 'LocaleCode' }, 'currency' => { 'code' => 'CurrencyCode' })
+ expect(described_class.for_model(Spree::Market, nil).attributes).to include('default_locale' => { 'code' => 'LocaleCode' })
+ expect(described_class.for_model(Spree::Variant, nil).attributes).to include(
+ 'cost_currency' => { 'code' => 'CurrencyCode' },
+ 'country_of_origin' => { 'code' => 'CountryCode' }
+ )
+ expect(described_class.for_model(Spree::Address, nil).attributes).to include('country_code' => { 'code' => 'CountryCode' })
+ end
+
it 'names associated tables instead of nesting them' do
expect(table['associations']).to include('line_items' => 'LineItem', 'customer' => 'Customer')
end