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.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Changed true/false filter examples to the eq predicate
Damian Legawiec911e5b0a0fbf
diff --git a/docs/api-reference/admin-api/querying.mdx b/docs/api-reference/admin-api/querying.mdxindex e489dfdcc6..81aa39ed26 100644--- a/docs/api-reference/admin-api/querying.mdx+++ b/docs/api-reference/admin-api/querying.mdx@@ -47,7 +47,7 @@ The SDK automatically wraps filter keys in `q[...]` and appends `[]` for array v| `gt` / `gteq` | Greater than / greater than or equal | `total_gteq: 100` | `q[total_gteq]=100` || `in` | In a list | `status_in: ['complete', 'canceled']` | `q[status_in][]=complete&q[status_in][]=canceled` || `null` / `not_null` | Is null / not null | `completed_at_not_null: true` | `q[completed_at_not_null]=true` |-| `true` / `false` | Boolean | `accepts_email_marketing_true: true` | `q[accepts_email_marketing_true]=true` |+| `eq` on a true/false field | Is true, or is false | `accepts_email_marketing_eq: false` | `q[accepts_email_marketing_eq]=false` |### Which filters an endpoint acceptsdiff --git a/docs/api-reference/store-api/querying.mdx b/docs/api-reference/store-api/querying.mdxindex df69fbe589..fa3dd07e57 100644--- a/docs/api-reference/store-api/querying.mdx+++ b/docs/api-reference/store-api/querying.mdx@@ -48,8 +48,7 @@ curl -G 'http://localhost:3000/api/v3/store/products' \| `not_null` | Is not null | `completed_at_not_null: true` | `q[completed_at_not_null]=true` || `present` | Is present (not empty) | `description_present: true` | `q[description_present]=true` || `blank` | Is blank (null or empty) | `description_blank: true` | `q[description_blank]=true` |-| `true` | Is true (boolean) | `automatic_true: true` | `q[automatic_true]=true` |-| `false` | Is false (boolean) | `automatic_false: true` | `q[automatic_false]=true` |+| `eq` on a true/false field | Is true, or is false | `automatic_eq: true` | `q[automatic_eq]=true` |<Note>The SDK automatically wraps filter keys in `q[...]` and appends `[]` for array values — just pass flat params.diff --git a/packages/dashboard/src/components/spree/setup-tasks/store-address-task.tsx b/packages/dashboard/src/components/spree/setup-tasks/store-address-task.tsxindex e188c24201..349f5ee45e 100644--- a/packages/dashboard/src/components/spree/setup-tasks/store-address-task.tsx+++ b/packages/dashboard/src/components/spree/setup-tasks/store-address-task.tsx@@ -44,14 +44,14 @@ export function StoreAddressTask({ task }: SetupTaskSlotContext) {//// The list endpoint cannot express the preference in one call: it orders by// default then name, and its `sort` param collapses to a single key.- const firstParty = { seller_id_null: true, active_true: true, limit: 1 }+ const firstParty = { seller_id_null: true, active_eq: true, limit: 1 }const {data: takesReturns,isFetching: fetchingReturns,isError: returnsFailed,} = useQuery({queryKey: useResourceKey('stock-locations', { firstParty: true, returns: true }),- queryFn: () => adminClient.stockLocations.list({ ...firstParty, returns_enabled_true: true }),+ queryFn: () => adminClient.stockLocations.list({ ...firstParty, returns_enabled_eq: true }),})const hasReturnsLocation = (takesReturns?.data.length ?? 0) > 0const {diff --git a/packages/seller-dashboard/src/components/seller-returns-location-card.tsx b/packages/seller-dashboard/src/components/seller-returns-location-card.tsxindex e21353ae63..d62ab95df3 100644--- a/packages/seller-dashboard/src/components/seller-returns-location-card.tsx+++ b/packages/seller-dashboard/src/components/seller-returns-location-card.tsx@@ -46,11 +46,11 @@ export function SellerReturnsLocationCard({ headless = false }: { headless?: boo// more locations than one page holds would otherwise see one address while// the server sent their returns to another, with nothing on screen saying// so — and they would edit the wrong one.- const activeParams = { active_true: true, limit: 1 }+ const activeParams = { active_eq: true, limit: 1 }const { data: takesReturns, isError: returnsFailed } = useQuery({queryKey: ['seller', sellerId, 'stock-locations', 'returns'],queryFn: () =>- sellerClient().stockLocations.list({ ...activeParams, returns_enabled_true: true }),+ sellerClient().stockLocations.list({ ...activeParams, returns_enabled_eq: true }),})const hasReturnsLocation = (takesReturns?.data.length ?? 0) > 0const { data: anyActive, isError: anyFailed } = useQuery({