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
Released Spree 6.0.0.rc2 and bumped the TypeScript packages (#14888)
Damian Legawiec07286b7f9bd9
diff --git a/.changeset/admin-api-without-display-money.md b/.changeset/admin-api-without-display-money.mddeleted file mode 100644index c3e3e13c96..0000000000--- a/.changeset/admin-api-without-display-money.md+++ /dev/null@@ -1,10 +0,0 @@-----"@spree/admin-sdk": minor-"@spree/seller-sdk": minor-"@spree/dashboard": minor-"@spree/dashboard-core": minor-"@spree/dashboard-ui": minor-"@spree/seller-dashboard": minor------The Admin and Seller APIs no longer return `display_*` money fields, so their types drop them; format the amount with its currency instead. The dashboard and seller panel format every amount in the admin's own language. `formatMoney` writes a currency's ISO 4217 decimals and takes `{ unitPrice: true }` for up to four.diff --git a/.changeset/cli-api-upload.md b/.changeset/cli-api-upload.mddeleted file mode 100644index c03ccb6e6a..0000000000--- a/.changeset/cli-api-upload.md+++ /dev/null@@ -1,5 +0,0 @@-----"@spree/cli": minor------`spree api upload <file>` uploads a file and prints the `signed_id` to pass to the endpoint that uses it. Add `--private` for documents, imports and digital products.diff --git a/.changeset/dashboard-root-routes.md b/.changeset/dashboard-root-routes.mddeleted file mode 100644index ccd05cd4c4..0000000000--- a/.changeset/dashboard-root-routes.md+++ /dev/null@@ -1,8 +0,0 @@-----"@spree/dashboard": minor-"@spree/dashboard-core": minor------Plugins and host apps can now add pages outside a store, such as onboarding, sign-up and account pages. File routes go in the new `authenticatedRoutes` (signed-in users) or `publicRoutes` (anyone) directories of a plugin's `spree.dashboard` marker; registry routes take `scope: 'authenticated'` or `scope: 'public'` with a full URL path. Both mount at the root, outside the store layout, and a page that takes the path of a built-in page fails with an error naming it.--The signed-in landing page at `/` can be replaced through the new `store_selection` slot, for example with a list of stores and a way to create one, and the login page renders extra content, such as a sign-up link, from the new `login.after` slot.diff --git a/.changeset/deprecate-store-display-money.md b/.changeset/deprecate-store-display-money.mddeleted file mode 100644index 8d3f13aea8..0000000000--- a/.changeset/deprecate-store-display-money.md+++ /dev/null@@ -1,5 +0,0 @@-----"@spree/sdk": patch------Marked the Store API's `display_*` money fields as deprecated. Format the amount beside each one with its currency instead (`total` for `display_total`); the fields are removed in 6.1.diff --git a/.changeset/discount-create-value.md b/.changeset/discount-create-value.mddeleted file mode 100644index 97d3985b1d..0000000000--- a/.changeset/discount-create-value.md+++ /dev/null@@ -1,5 +0,0 @@-----"@spree/admin-sdk": patch------`orders.discounts.create()` takes the discount as `value` (with `value_type`); the older `amount` spelling on create is gone. `orders.discounts.update()` still edits `amount`.diff --git a/.changeset/email-money-filter.md b/.changeset/email-money-filter.mddeleted file mode 100644index 1638fbf4cf..0000000000--- a/.changeset/email-money-filter.md+++ /dev/null@@ -1,6 +0,0 @@-----"@spree/dashboard": patch-"@spree/admin-sdk": patch------The email template editor inserts an amount through the `money` filter (`{{ order.total | money }}`) instead of a pre-formatted `display_*` field. Email types gain the raw amounts the default templates now format: `total_minus_store_credits`, a line item's and a parcel item's `amount`, a parcel item's `price`, a fulfillment group's `cost` and `unpriced`, and a return's `refunded_total`.diff --git a/.changeset/email-types-without-display-money.md b/.changeset/email-types-without-display-money.mddeleted file mode 100644index de5d6892b5..0000000000--- a/.changeset/email-types-without-display-money.md+++ /dev/null@@ -1,6 +0,0 @@-----"@spree/dashboard": patch-"@spree/admin-sdk": patch------Removed the `display_*` money fields from the `Email*` types and Zod schemas; templates format amounts with the `money` filter. Added `EmailCustomer`, `EmailCustomerGroup` and `EmailNewsletterSubscriber`, which the password reset email's `customer` variable now uses.diff --git a/.changeset/files-upload-endpoint.md b/.changeset/files-upload-endpoint.mddeleted file mode 100644index 568984b6ea..0000000000--- a/.changeset/files-upload-endpoint.md+++ /dev/null@@ -1,10 +0,0 @@-----"@spree/admin-sdk": minor-"@spree/seller-sdk": minor-"@spree/dashboard": minor-"@spree/dashboard-core": minor-"@spree/dashboard-ui": minor-"@spree/seller-dashboard": minor------`directUploads.create()` is replaced by `files.create()` and `files.upload()`, which uploads a file and resolves to a `signed_id` in one call, either straight to storage or in the request itself. The `signed_id` expires after a day. Every parameter that takes one is now named `signed_id` or `<slot>_signed_id` (`avatar_signed_id`, `logo_signed_id`, `attachment_signed_id`, `document_signed_id`, `file_signed_id`, `po_document_signed_id`, …). In `@spree/dashboard-core`, `useDirectUpload` becomes `useFileUpload({ visibility })`, and `signedIdParam` builds the three-state write for an image or document field.diff --git a/.changeset/filters-types-command.md b/.changeset/filters-types-command.mddeleted file mode 100644index 37b77f3f3e..0000000000--- a/.changeset/filters-types-command.md+++ /dev/null@@ -1,5 +0,0 @@-----"@spree/cli": minor------Added `spree filters types`, which writes TypeScript declarations for an app's own list filters and sort fields from its running backend (or from `bin/rails spree:api:filter_tables` output with `--from`), so the SDKs accept and autocomplete them.diff --git a/.changeset/filters-types-every-app.md b/.changeset/filters-types-every-app.mddeleted file mode 100644index 71ff272b6e..0000000000--- a/.changeset/filters-types-every-app.md+++ /dev/null@@ -1,5 +0,0 @@-----"@spree/cli": minor------`spree filters types` now writes declarations into every app under `apps/` in one run, each for the SDK that app uses. `--api` and `--out` write a single file for an app outside that layout.diff --git a/.changeset/format-money-helper.md b/.changeset/format-money-helper.mddeleted file mode 100644index 474afb8eae..0000000000--- a/.changeset/format-money-helper.md+++ /dev/null@@ -1,8 +0,0 @@-----"@spree/sdk": minor-"@spree/admin-sdk": minor-"@spree/seller-sdk": minor-"@spree/dashboard": patch------Added `formatMoney(amount, currency, locale?, { unitPrice? })`, which formats a decimal-string amount in its currency and the reader's language with the currency's own decimal places, without passing it through a JavaScript number. The dashboard now uses the SDK's copy.diff --git a/.changeset/intl-country-currency-names.md b/.changeset/intl-country-currency-names.mddeleted file mode 100644index 6a4eb7abef..0000000000--- a/.changeset/intl-country-currency-names.md+++ /dev/null@@ -1,10 +0,0 @@-----"@spree/sdk": minor-"@spree/admin-sdk": minor-"@spree/seller-sdk": minor-"@spree/dashboard": patch------Country and currency names move to the client: the Store API's country `name` and currency `name` and `symbol` are deprecated (name them with `Intl.DisplayNames`, format amounts with `formatMoney`), and the Admin and Seller APIs no longer return a country's `name`. The seller SDK's `SellerCountry` is now the generated `Country` type, and the setup country list's `locales` are typed as `LocaleCode[]`. The dashboard and seller panel name and sort countries in the admin's own language.--In `@spree/dashboard-core`, `CountryOption` no longer has `name` and `countryFilter` is removed: name countries with `useCountryDisplayName` and sort them with the new `useSortByCountryName`, which collates in the admin's language.diff --git a/.changeset/locale-code-type.md b/.changeset/locale-code-type.mddeleted file mode 100644index 07b92fc4cf..0000000000--- a/.changeset/locale-code-type.md+++ /dev/null@@ -1,9 +0,0 @@-----"@spree/sdk": minor-"@spree/admin-sdk": minor-"@spree/dashboard": patch------Added the `LocaleCode` type: the locale codes Spree accepts (every ISO 639-1 language plus regional variants such as `en-US` and `pt-BR`). Order, cart and market locales, the store's default, supported and available locales, and the matching request params now use it. The dashboard validates locale fields with the new `localeCodeSchema`.--The Store API's locale `name` is deprecated (name a locale from its `code` with `Intl.DisplayNames`) and the Admin API no longer returns it, so the admin SDK's `Locale` type drops `name` and types `code` as `LocaleCode`; the dashboard names locales in the browser.diff --git a/.changeset/money-decimal-strings.md b/.changeset/money-decimal-strings.mddeleted file mode 100644index a66678fcf2..0000000000--- a/.changeset/money-decimal-strings.md+++ /dev/null@@ -1,7 +0,0 @@-----"@spree/sdk": minor-"@spree/admin-sdk": minor-"@spree/seller-sdk": minor------Money is a decimal string written to its currency's decimals, and Admin and Seller writes take money and rates only as decimal strings. Added `sumMoney`, `subtractMoney`, `multiplyMoney`, `negateMoney`, `compareMoney`, `isZeroMoney`, `isDecimalString` and `decimalPlaces` for exact arithmetic on those strings. Currencies carry `decimal_places`; prices no longer carry `amount_in_cents` or `compare_at_amount_in_cents`; tax rates read and write `rate` and `rate_percent` instead of `amount` and `amount_percentage`.diff --git a/.changeset/money-in-the-admins-number-format.md b/.changeset/money-in-the-admins-number-format.mddeleted file mode 100644index 98e0940550..0000000000--- a/.changeset/money-in-the-admins-number-format.md+++ /dev/null@@ -1,6 +0,0 @@-----"@spree/dashboard": patch-"@spree/dashboard-core": patch------Money fields are now shown and read in the number format of the person using the dashboard, whatever the currency or market: an admin whose dashboard is in German types `1.234,56` for dollars and euros alike. Previously the format followed the currency's market, which was ambiguous when two markets shared a currency. `useFormCurrencyLocale` and the panel client's `markets` entry are removed; use `useMoneyLocale()`.diff --git a/.changeset/money-preference-type.md b/.changeset/money-preference-type.mddeleted file mode 100644index 53881e0d9e..0000000000--- a/.changeset/money-preference-type.md+++ /dev/null@@ -1,8 +0,0 @@-----"@spree/dashboard": patch-"@spree/dashboard-core": patch-"@spree/dashboard-ui": patch-"@spree/admin-sdk": patch------Preferences of the new `money` type are shown with their currency's symbol in settings forms and as money in calculator summaries, instead of being guessed from the preference's name. `PreferenceField.type` documents the `money` type.diff --git a/.changeset/order-group-summary.md b/.changeset/order-group-summary.mddeleted file mode 100644index 32e0975ffc..0000000000--- a/.changeset/order-group-summary.md+++ /dev/null@@ -1,8 +0,0 @@-----"@spree/sdk": minor-"@spree/admin-sdk": minor------`orders.get` now returns `Order | OrderGroup`. Called with the id of the cart a checkout was placed from, it returns the whole purchase: one order, or, when the checkout reached several sellers, the order group holding one order per seller. Narrow the result with `isOrderGroup` before reading order-only fields such as `items`. An order group now carries the same money summary as an order (delivery, discount, tax, fee, gift card and store credit totals, the amount still due) and its payments.--`store_credit_total` on carts, orders and order groups no longer includes what a gift card paid. That amount is reported only in `gift_card_total`, so a summary that shows both rows no longer deducts it twice. `amount_due` no longer subtracts store credit that has already been captured.diff --git a/.changeset/po-document-spreadsheets.md b/.changeset/po-document-spreadsheets.mddeleted file mode 100644index 2777cb6904..0000000000--- a/.changeset/po-document-spreadsheets.md+++ /dev/null@@ -1,5 +0,0 @@-----"@spree/dashboard": patch------Purchase order documents on orders can now be Excel, OpenDocument or CSV spreadsheets, as well as PDFs, images and Word documents.diff --git a/.changeset/seller-sdk-delete-and-types.md b/.changeset/seller-sdk-delete-and-types.mddeleted file mode 100644index 57433e156f..0000000000--- a/.changeset/seller-sdk-delete-and-types.md+++ /dev/null@@ -1,10 +0,0 @@-----"@spree/seller-sdk": minor-"@spree/admin-sdk": minor-"@spree/dashboard": patch-"@spree/seller-dashboard": patch------Methods that delete a record are named `delete` in both SDKs. In the Seller SDK, `taxIdentifiers.remove`, `team.remove` and `invitations.revoke` are now `taxIdentifiers.delete`, `team.delete` and `invitations.delete`. In the Admin SDK, `sellers.team.remove` and `sellers.invitations.remove` are now `sellers.team.delete` and `sellers.invitations.delete`. Methods that detach something from a cart or order (`remove`), or change a record without deleting it (`revoke`), keep their names.--Seller SDK types are corrected: `team.invite` returns the `Invitation`, and `auth.providers` returns `AuthProvidersResponse`.diff --git a/.changeset/store-credit-amount-string.md b/.changeset/store-credit-amount-string.mddeleted file mode 100644index 4a6deb983e..0000000000--- a/.changeset/store-credit-amount-string.md+++ /dev/null@@ -1,5 +0,0 @@-----"@spree/sdk": minor------`carts.storeCredits.apply()` takes the amount as a decimal string (`'10.00'`), like every other money value; a number is no longer accepted.diff --git a/.changeset/store-deprecated-fields.md b/.changeset/store-deprecated-fields.mddeleted file mode 100644index 7bafdfa9c1..0000000000--- a/.changeset/store-deprecated-fields.md+++ /dev/null@@ -1,5 +0,0 @@-----"@spree/sdk": patch------Stock locations bring back `country_iso` and `state_abbr`, and refunds bring back `reimbursement_id` (always `null`), all marked `@deprecated` until 6.1 so a 5.6 storefront keeps compiling. `AppliedPromotion`, `Fee`, `TaxLine` and `Delivery`, which carts, orders and their items already carry, are now exported from the package root.diff --git a/.changeset/store-po-document-signed-id.md b/.changeset/store-po-document-signed-id.mddeleted file mode 100644index 5350bb6ae0..0000000000--- a/.changeset/store-po-document-signed-id.md+++ /dev/null@@ -1,5 +0,0 @@-----"@spree/sdk": minor------A cart's purchase order document is now set with `po_document_signed_id` instead of `po_document`.diff --git a/.changeset/typed-filters-every-list.md b/.changeset/typed-filters-every-list.mddeleted file mode 100644index de71626c54..0000000000--- a/.changeset/typed-filters-every-list.md+++ /dev/null@@ -1,8 +0,0 @@-----"@spree/sdk": minor-"@spree/admin-sdk": minor-"@spree/seller-sdk": minor-"@spree/dashboard": patch------Every filterable list method now takes typed filter and sort parameters, including returns, claims, exchanges, custom fields, digital links, payouts, imports and the rest that still accepted any key. The building block for custom field value filters is now `CustomFieldValueFilters`, so it no longer hides the generated filters for custom field lists. The product digital files list now pages by 25 as intended.diff --git a/.changeset/typed-list-filters.md b/.changeset/typed-list-filters.mddeleted file mode 100644index b95430e29b..0000000000--- a/.changeset/typed-list-filters.md+++ /dev/null@@ -1,11 +0,0 @@-----"@spree/sdk": minor-"@spree/admin-sdk": minor-"@spree/seller-sdk": minor-"@spree/dashboard": patch-"@spree/dashboard-core": patch------List methods of documented endpoints now accept typed filter and sort parameters, generated from the filters each endpoint actually accepts; methods of endpoints the API reference does not document yet keep loose parameters. A misspelled filter, a filter the endpoint does not support, or an unknown sort field is now a type error instead of a request that silently returns the unfiltered list. `ProductListParams`, `CategoryListParams`, `CollectionListParams` and `OrderListParams` keep their names and are now generated; they no longer accept arbitrary keys. Filters an app adds through its own extensions can be sent unchecked inside `q` (`list({ q: { erp_id_eq: 'ERP-1' } })`), generated as declarations with `spree filters types`, or declared by hand by extending `<Resource>FilterExtensions` and `<Resource>SortExtensions`. The filter building blocks (`TextFilters`, `SortKey`, …) are exported for those declarations.--The dashboard's allowed-origins search, delivery zones by profile, and several filters and sorts on payment methods, sellers, option types, markets, custom field definitions and gift cards now take effect; the API used to ignore them.diff --git a/.changeset/typed-params-create-update-split.md b/.changeset/typed-params-create-update-split.mddeleted file mode 100644index bc2556f4ff..0000000000--- a/.changeset/typed-params-create-update-split.md+++ /dev/null@@ -1,10 +0,0 @@-----"@spree/sdk": minor-"@spree/admin-sdk": minor-"@spree/seller-sdk": minor-"@spree/dashboard": patch------Request types that served both create and update are split by action, so creating marks what the API requires (a company's or tax rate's name, a tax registration's kind and value, an address's name, street, city and country) while updating takes any field. `AddressParams` and `CompanyAddressParams` in `@spree/sdk` stay as deprecated aliases until 6.1. The Admin SDK's `orders.payments.capture(orderId, id, params?, options?)` takes an optional `{ amount }` for a partial capture; request options move from the third argument to the fourth.--A tax exemption certificate's `issued_at`, `expires_at` and `verified_at` are typed `string | null`: a certificate that is still pending has no dates yet.diff --git a/.changeset/typed-preferences.md b/.changeset/typed-preferences.mddeleted file mode 100644index 52da7f9e80..0000000000--- a/.changeset/typed-preferences.md+++ /dev/null@@ -1,8 +0,0 @@-----"@spree/admin-sdk": minor-"@spree/seller-sdk": minor-"@spree/dashboard": minor-"@spree/seller-dashboard": minor------Changed preferences to a typed contract. Every `/…/types` entry returns `schema`, the JSON Schema of the type's `preferences`, instead of `preference_schema`, and rows no longer repeat it; `PreferenceField` and `DeliveryPreferenceField` are replaced by `PreferenceSchema`. Each configurable family's settings are typed per `type` (`PromotionRulePreferencesMap`, `TypedPromotionRule`, …), and an extension adds its own by declaration merging. Store, channel, import and seller profile settings drop the `preferred_` prefix (`guest_checkout`, `timezone`, `delimiter`), the store's decimal settings are strings, and delivery methods read and write `calculator: { type, preferences }`. Preference writes are validated, refused with `invalid_preferences` and a JSON pointer per failing value. `paymentMethods.types()` lists every provider with `installed` set on those the store already has.diff --git a/.changeset/typed-request-params.md b/.changeset/typed-request-params.mddeleted file mode 100644index 3d57c9a19b..0000000000--- a/.changeset/typed-request-params.md+++ /dev/null@@ -1,10 +0,0 @@-----"@spree/sdk": minor-"@spree/admin-sdk": minor-"@spree/seller-sdk": minor-"@spree/dashboard": patch------Request body types are now generated from the API itself, so every create, update and action method takes exactly the fields its endpoint accepts. Fields the API never accepted are gone from the types, and fields it accepted but the types left out are added. Renamed types keep their old names as deprecated aliases (for example `VariantPrice` is now `PriceParams`, `LineItemInput` is now `LineItemInputParams`). The dashboard now saves the store's digital download limits, which the API used to drop.--Country and currency codes are typed as the closed `CountryCode` and `CurrencyCode` unions in both requests and responses. Deprecated fields are marked `@deprecated` in the types; the Store SDK keeps them until 6.1, while the Admin and Seller SDKs drop them (address `country_iso`/`state_abbr`, cart `number`, market `country_isos`, import `owner_type`/`owner_id`, payment method `auto_capture`).diff --git a/packages/admin-sdk/CHANGELOG.md b/packages/admin-sdk/CHANGELOG.mdindex ed124168be..357165b2d8 100644--- a/packages/admin-sdk/CHANGELOG.md+++ b/packages/admin-sdk/CHANGELOG.md@@ -1,5 +1,59 @@# @spree/admin-sdk+## 1.0.0-rc.2++### Minor Changes++- [#14856](https://github.com/spree/spree/pull/14856) [`05d6372`](https://github.com/spree/spree/commit/05d637294259a03b53e1849be6638bcb2b328d14) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - The Admin and Seller APIs no longer return `display_*` money fields, so their types drop them; format the amount with its currency instead. The dashboard and seller panel format every amount in the admin's own language. `formatMoney` writes a currency's ISO 4217 decimals and takes `{ unitPrice: true }` for up to four.++- [#14866](https://github.com/spree/spree/pull/14866) [`cbde8fe`](https://github.com/spree/spree/commit/cbde8fef8d27b91ef0cc415f3a7f69135b52113a) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - `directUploads.create()` is replaced by `files.create()` and `files.upload()`, which uploads a file and resolves to a `signed_id` in one call, either straight to storage or in the request itself. The `signed_id` expires after a day. Every parameter that takes one is now named `signed_id` or `<slot>_signed_id` (`avatar_signed_id`, `logo_signed_id`, `attachment_signed_id`, `document_signed_id`, `file_signed_id`, `po_document_signed_id`, …). In `@spree/dashboard-core`, `useDirectUpload` becomes `useFileUpload({ visibility })`, and `signedIdParam` builds the three-state write for an image or document field.++- [#14885](https://github.com/spree/spree/pull/14885) [`34b80f0`](https://github.com/spree/spree/commit/34b80f0db561300db3e6982543c7ec724e2f4c03) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Added `formatMoney(amount, currency, locale?, { unitPrice? })`, which formats a decimal-string amount in its currency and the reader's language with the currency's own decimal places, without passing it through a JavaScript number. The dashboard now uses the SDK's copy.++- [#14887](https://github.com/spree/spree/pull/14887) [`9b5911d`](https://github.com/spree/spree/commit/9b5911d12649671ce9896f28473a2940f9a1cba0) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Country and currency names move to the client: the Store API's country `name` and currency `name` and `symbol` are deprecated (name them with `Intl.DisplayNames`, format amounts with `formatMoney`), and the Admin and Seller APIs no longer return a country's `name`. The seller SDK's `SellerCountry` is now the generated `Country` type, and the setup country list's `locales` are typed as `LocaleCode[]`. The dashboard and seller panel name and sort countries in the admin's own language.++ In `@spree/dashboard-core`, `CountryOption` no longer has `name` and `countryFilter` is removed: name countries with `useCountryDisplayName` and sort them with the new `useSortByCountryName`, which collates in the admin's language.++- [#14886](https://github.com/spree/spree/pull/14886) [`6034c11`](https://github.com/spree/spree/commit/6034c11340ddc997e0287935992cc603be3d756e) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Added the `LocaleCode` type: the locale codes Spree accepts (every ISO 639-1 language plus regional variants such as `en-US` and `pt-BR`). Order, cart and market locales, the store's default, supported and available locales, and the matching request params now use it. The dashboard validates locale fields with the new `localeCodeSchema`.++ The Store API's locale `name` is deprecated (name a locale from its `code` with `Intl.DisplayNames`) and the Admin API no longer returns it, so the admin SDK's `Locale` type drops `name` and types `code` as `LocaleCode`; the dashboard names locales in the browser.++- [#14852](https://github.com/spree/spree/pull/14852) [`525959d`](https://github.com/spree/spree/commit/525959de11cf10af12fc0936f908ab3af000857f) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Money is a decimal string written to its currency's decimals, and Admin and Seller writes take money and rates only as decimal strings. Added `sumMoney`, `subtractMoney`, `multiplyMoney`, `negateMoney`, `compareMoney`, `isZeroMoney`, `isDecimalString` and `decimalPlaces` for exact arithmetic on those strings. Currencies carry `decimal_places`; prices no longer carry `amount_in_cents` or `compare_at_amount_in_cents`; tax rates read and write `rate` and `rate_percent` instead of `amount` and `amount_percentage`.++- [#14877](https://github.com/spree/spree/pull/14877) [`8dbe607`](https://github.com/spree/spree/commit/8dbe607bdd0c66ecebadb383ea9765ba3a971cbd) Thanks [@KacperMekarski](https://github.com/KacperMekarski)! - `orders.get` now returns `Order | OrderGroup`. Called with the id of the cart a checkout was placed from, it returns the whole purchase: one order, or, when the checkout reached several sellers, the order group holding one order per seller. Narrow the result with `isOrderGroup` before reading order-only fields such as `items`. An order group now carries the same money summary as an order (delivery, discount, tax, fee, gift card and store credit totals, the amount still due) and its payments.++ `store_credit_total` on carts, orders and order groups no longer includes what a gift card paid. That amount is reported only in `gift_card_total`, so a summary that shows both rows no longer deducts it twice. `amount_due` no longer subtracts store credit that has already been captured.++- [#14879](https://github.com/spree/spree/pull/14879) [`f184f25`](https://github.com/spree/spree/commit/f184f25097c94977eb930ac34dcbac98ff8ced7d) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Methods that delete a record are named `delete` in both SDKs. In the Seller SDK, `taxIdentifiers.remove`, `team.remove` and `invitations.revoke` are now `taxIdentifiers.delete`, `team.delete` and `invitations.delete`. In the Admin SDK, `sellers.team.remove` and `sellers.invitations.remove` are now `sellers.team.delete` and `sellers.invitations.delete`. Methods that detach something from a cart or order (`remove`), or change a record without deleting it (`revoke`), keep their names.++ Seller SDK types are corrected: `team.invite` returns the `Invitation`, and `auth.providers` returns `AuthProvidersResponse`.++- [#14858](https://github.com/spree/spree/pull/14858) [`a90a9cc`](https://github.com/spree/spree/commit/a90a9ccc68caff9349af1c0a888e6497f72d7228) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Every filterable list method now takes typed filter and sort parameters, including returns, claims, exchanges, custom fields, digital links, payouts, imports and the rest that still accepted any key. The building block for custom field value filters is now `CustomFieldValueFilters`, so it no longer hides the generated filters for custom field lists. The product digital files list now pages by 25 as intended.++- [#14854](https://github.com/spree/spree/pull/14854) [`90af080`](https://github.com/spree/spree/commit/90af080e5e3745423475ef9deef21f4dfc0bb71b) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - List methods of documented endpoints now accept typed filter and sort parameters, generated from the filters each endpoint actually accepts; methods of endpoints the API reference does not document yet keep loose parameters. A misspelled filter, a filter the endpoint does not support, or an unknown sort field is now a type error instead of a request that silently returns the unfiltered list. `ProductListParams`, `CategoryListParams`, `CollectionListParams` and `OrderListParams` keep their names and are now generated; they no longer accept arbitrary keys. Filters an app adds through its own extensions can be sent unchecked inside `q` (`list({ q: { erp_id_eq: 'ERP-1' } })`), generated as declarations with `spree filters types`, or declared by hand by extending `<Resource>FilterExtensions` and `<Resource>SortExtensions`. The filter building blocks (`TextFilters`, `SortKey`, …) are exported for those declarations.++ The dashboard's allowed-origins search, delivery zones by profile, and several filters and sorts on payment methods, sellers, option types, markets, custom field definitions and gift cards now take effect; the API used to ignore them.++- [#14876](https://github.com/spree/spree/pull/14876) [`5c1eeee`](https://github.com/spree/spree/commit/5c1eeee6b5f2570c34271bcd8fd6c93fa6dbe36e) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Request types that served both create and update are split by action, so creating marks what the API requires (a company's or tax rate's name, a tax registration's kind and value, an address's name, street, city and country) while updating takes any field. `AddressParams` and `CompanyAddressParams` in `@spree/sdk` stay as deprecated aliases until 6.1. The Admin SDK's `orders.payments.capture(orderId, id, params?, options?)` takes an optional `{ amount }` for a partial capture; request options move from the third argument to the fourth.++ A tax exemption certificate's `issued_at`, `expires_at` and `verified_at` are typed `string | null`: a certificate that is still pending has no dates yet.++- [#14853](https://github.com/spree/spree/pull/14853) [`3001ebf`](https://github.com/spree/spree/commit/3001ebf19fa8c361f13a7d627384d4d86a829787) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Changed preferences to a typed contract. Every `/…/types` entry returns `schema`, the JSON Schema of the type's `preferences`, instead of `preference_schema`, and rows no longer repeat it; `PreferenceField` and `DeliveryPreferenceField` are replaced by `PreferenceSchema`. Each configurable family's settings are typed per `type` (`PromotionRulePreferencesMap`, `TypedPromotionRule`, …), and an extension adds its own by declaration merging. Store, channel, import and seller profile settings drop the `preferred_` prefix (`guest_checkout`, `timezone`, `delimiter`), the store's decimal settings are strings, and delivery methods read and write `calculator: { type, preferences }`. Preference writes are validated, refused with `invalid_preferences` and a JSON pointer per failing value. `paymentMethods.types()` lists every provider with `installed` set on those the store already has.++- [#14871](https://github.com/spree/spree/pull/14871) [`6990f37`](https://github.com/spree/spree/commit/6990f3730ffad5245dd116b458a7b8ceeb67d310) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Request body types are now generated from the API itself, so every create, update and action method takes exactly the fields its endpoint accepts. Fields the API never accepted are gone from the types, and fields it accepted but the types left out are added. Renamed types keep their old names as deprecated aliases (for example `VariantPrice` is now `PriceParams`, `LineItemInput` is now `LineItemInputParams`). The dashboard now saves the store's digital download limits, which the API used to drop.++ Country and currency codes are typed as the closed `CountryCode` and `CurrencyCode` unions in both requests and responses. Deprecated fields are marked `@deprecated` in the types; the Store SDK keeps them until 6.1, while the Admin and Seller SDKs drop them (address `country_iso`/`state_abbr`, cart `number`, market `country_isos`, import `owner_type`/`owner_id`, payment method `auto_capture`).++### Patch Changes++- [#14874](https://github.com/spree/spree/pull/14874) [`293200e`](https://github.com/spree/spree/commit/293200e34b7f82c94eeaeec95fe34329956619d7) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - `orders.discounts.create()` takes the discount as `value` (with `value_type`); the older `amount` spelling on create is gone. `orders.discounts.update()` still edits `amount`.++- [#14864](https://github.com/spree/spree/pull/14864) [`614347a`](https://github.com/spree/spree/commit/614347a959b753efa76ed3eff145840856dc009a) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - The email template editor inserts an amount through the `money` filter (`{{ order.total | money }}`) instead of a pre-formatted `display_*` field. Email types gain the raw amounts the default templates now format: `total_minus_store_credits`, a line item's and a parcel item's `amount`, a parcel item's `price`, a fulfillment group's `cost` and `unpriced`, and a return's `refunded_total`.++- [#14884](https://github.com/spree/spree/pull/14884) [`9736316`](https://github.com/spree/spree/commit/9736316f970de9a8a360a5c88c9d91ef9783727a) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Removed the `display_*` money fields from the `Email*` types and Zod schemas; templates format amounts with the `money` filter. Added `EmailCustomer`, `EmailCustomerGroup` and `EmailNewsletterSubscriber`, which the password reset email's `customer` variable now uses.++- [#14856](https://github.com/spree/spree/pull/14856) [`f508a38`](https://github.com/spree/spree/commit/f508a389f7f09f5ca85bfa32a2dfcec9517ea1bf) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Preferences of the new `money` type are shown with their currency's symbol in settings forms and as money in calculator summaries, instead of being guessed from the preference's name. `PreferenceField.type` documents the `money` type.+## 1.0.0-rc.1### Minor Changesdiff --git a/packages/admin-sdk/package.json b/packages/admin-sdk/package.jsonindex e097b52fcd..bc52fa8073 100644--- a/packages/admin-sdk/package.json+++ b/packages/admin-sdk/package.json@@ -1,6 +1,6 @@{"name": "@spree/admin-sdk",- "version": "1.0.0-rc.1",+ "version": "1.0.0-rc.2","description": "Official TypeScript SDK for Spree Commerce Admin API","type": "module","main": "./dist/index.cjs",diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.mdindex a5847df0c8..06ab8d12e4 100644--- a/packages/cli/CHANGELOG.md+++ b/packages/cli/CHANGELOG.md@@ -1,5 +1,15 @@# @spree/cli+## 3.3.0++### Minor Changes++- [#14866](https://github.com/spree/spree/pull/14866) [`cbde8fe`](https://github.com/spree/spree/commit/cbde8fef8d27b91ef0cc415f3a7f69135b52113a) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - `spree api upload <file>` uploads a file and prints the `signed_id` to pass to the endpoint that uses it. Add `--private` for documents, imports and digital products.++- [#14854](https://github.com/spree/spree/pull/14854) [`0cb8656`](https://github.com/spree/spree/commit/0cb86561b020e0744e92b60afd10041dcccf0d17) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Added `spree filters types`, which writes TypeScript declarations for an app's own list filters and sort fields from its running backend (or from `bin/rails spree:api:filter_tables` output with `--from`), so the SDKs accept and autocomplete them.++- [#14858](https://github.com/spree/spree/pull/14858) [`b5208d0`](https://github.com/spree/spree/commit/b5208d0ab283797445d8b350d100bcfa9070251b) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - `spree filters types` now writes declarations into every app under `apps/` in one run, each for the SDK that app uses. `--api` and `--out` write a single file for an app outside that layout.+## 3.2.2### Patch Changesdiff --git a/packages/cli/package.json b/packages/cli/package.jsonindex a6c0388469..43c2b5feb8 100644--- a/packages/cli/package.json+++ b/packages/cli/package.json@@ -1,6 +1,6 @@{"name": "@spree/cli",- "version": "3.2.2",+ "version": "3.3.0","description": "CLI for managing Spree Commerce projects","type": "module","bin": {diff --git a/packages/create-spree-app/CHANGELOG.md b/packages/create-spree-app/CHANGELOG.mdindex b1440beb25..aecebe9729 100644--- a/packages/create-spree-app/CHANGELOG.md+++ b/packages/create-spree-app/CHANGELOG.md@@ -1,5 +1,11 @@# create-spree-app+## 2.3.1++### Patch Changes++- Released alongside Spree 6.0.0.rc2 and `@spree/cli` 3.3.0. No changes of its own.+## 2.3.0### Minor Changesdiff --git a/packages/create-spree-app/package.json b/packages/create-spree-app/package.jsonindex 7b744eb7f0..3e248d413b 100644--- a/packages/create-spree-app/package.json+++ b/packages/create-spree-app/package.json@@ -1,6 +1,6 @@{"name": "create-spree-app",- "version": "2.3.0",+ "version": "2.3.1","description": "Create a new Spree Commerce project with a single command","type": "module","bin": "./dist/index.js",diff --git a/packages/dashboard-core/CHANGELOG.md b/packages/dashboard-core/CHANGELOG.mdindex 875f6dd2a2..f9366746e5 100644--- a/packages/dashboard-core/CHANGELOG.md+++ b/packages/dashboard-core/CHANGELOG.md@@ -1,5 +1,27 @@# @spree/dashboard-core+## 1.0.0-rc.3++### Minor Changes++- [#14856](https://github.com/spree/spree/pull/14856) [`05d6372`](https://github.com/spree/spree/commit/05d637294259a03b53e1849be6638bcb2b328d14) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - The Admin and Seller APIs no longer return `display_*` money fields, so their types drop them; format the amount with its currency instead. The dashboard and seller panel format every amount in the admin's own language. `formatMoney` writes a currency's ISO 4217 decimals and takes `{ unitPrice: true }` for up to four.++- [#14859](https://github.com/spree/spree/pull/14859) [`9728851`](https://github.com/spree/spree/commit/9728851b963a288e89f00ab85bcb993d3ebf5293) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Plugins and host apps can now add pages outside a store, such as onboarding, sign-up and account pages. File routes go in the new `authenticatedRoutes` (signed-in users) or `publicRoutes` (anyone) directories of a plugin's `spree.dashboard` marker; registry routes take `scope: 'authenticated'` or `scope: 'public'` with a full URL path. Both mount at the root, outside the store layout, and a page that takes the path of a built-in page fails with an error naming it.++ The signed-in landing page at `/` can be replaced through the new `store_selection` slot, for example with a list of stores and a way to create one, and the login page renders extra content, such as a sign-up link, from the new `login.after` slot.++- [#14866](https://github.com/spree/spree/pull/14866) [`cbde8fe`](https://github.com/spree/spree/commit/cbde8fef8d27b91ef0cc415f3a7f69135b52113a) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - `directUploads.create()` is replaced by `files.create()` and `files.upload()`, which uploads a file and resolves to a `signed_id` in one call, either straight to storage or in the request itself. The `signed_id` expires after a day. Every parameter that takes one is now named `signed_id` or `<slot>_signed_id` (`avatar_signed_id`, `logo_signed_id`, `attachment_signed_id`, `document_signed_id`, `file_signed_id`, `po_document_signed_id`, …). In `@spree/dashboard-core`, `useDirectUpload` becomes `useFileUpload({ visibility })`, and `signedIdParam` builds the three-state write for an image or document field.++### Patch Changes++- [#14852](https://github.com/spree/spree/pull/14852) [`3525c00`](https://github.com/spree/spree/commit/3525c00440076a17cce671f3e20801309d8ba586) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Money fields are now shown and read in the number format of the person using the dashboard, whatever the currency or market: an admin whose dashboard is in German types `1.234,56` for dollars and euros alike. Previously the format followed the currency's market, which was ambiguous when two markets shared a currency. `useFormCurrencyLocale` and the panel client's `markets` entry are removed; use `useMoneyLocale()`.++- [#14856](https://github.com/spree/spree/pull/14856) [`f508a38`](https://github.com/spree/spree/commit/f508a389f7f09f5ca85bfa32a2dfcec9517ea1bf) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Preferences of the new `money` type are shown with their currency's symbol in settings forms and as money in calculator summaries, instead of being guessed from the preference's name. `PreferenceField.type` documents the `money` type.++- [#14854](https://github.com/spree/spree/pull/14854) [`90af080`](https://github.com/spree/spree/commit/90af080e5e3745423475ef9deef21f4dfc0bb71b) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - List methods of documented endpoints now accept typed filter and sort parameters, generated from the filters each endpoint actually accepts; methods of endpoints the API reference does not document yet keep loose parameters. A misspelled filter, a filter the endpoint does not support, or an unknown sort field is now a type error instead of a request that silently returns the unfiltered list. `ProductListParams`, `CategoryListParams`, `CollectionListParams` and `OrderListParams` keep their names and are now generated; they no longer accept arbitrary keys. Filters an app adds through its own extensions can be sent unchecked inside `q` (`list({ q: { erp_id_eq: 'ERP-1' } })`), generated as declarations with `spree filters types`, or declared by hand by extending `<Resource>FilterExtensions` and `<Resource>SortExtensions`. The filter building blocks (`TextFilters`, `SortKey`, …) are exported for those declarations.++ The dashboard's allowed-origins search, delivery zones by profile, and several filters and sorts on payment methods, sellers, option types, markets, custom field definitions and gift cards now take effect; the API used to ignore them.+## 1.0.0-rc.2### Patch Changesdiff --git a/packages/dashboard-core/package.json b/packages/dashboard-core/package.jsonindex b31d47e85d..5d382dfea6 100644--- a/packages/dashboard-core/package.json+++ b/packages/dashboard-core/package.json@@ -1,7 +1,7 @@{"name": "@spree/dashboard-core","license": "MIT",- "version": "1.0.0-rc.2",+ "version": "1.0.0-rc.3","description": "Spree Dashboard framework — registries (table, nav, slot, settings-nav), providers (auth, permission, store), admin SDK client, generic infra hooks, and the defineDashboardPlugin extension API. Developer Preview.","author": "Vendo Connect Inc.","homepage": "https://spreecommerce.org",diff --git a/packages/dashboard-ui/CHANGELOG.md b/packages/dashboard-ui/CHANGELOG.mdindex c7f9a12162..404c2c69c7 100644--- a/packages/dashboard-ui/CHANGELOG.md+++ b/packages/dashboard-ui/CHANGELOG.md@@ -1,5 +1,17 @@# @spree/dashboard-ui+## 1.0.0-rc.3++### Minor Changes++- [#14856](https://github.com/spree/spree/pull/14856) [`05d6372`](https://github.com/spree/spree/commit/05d637294259a03b53e1849be6638bcb2b328d14) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - The Admin and Seller APIs no longer return `display_*` money fields, so their types drop them; format the amount with its currency instead. The dashboard and seller panel format every amount in the admin's own language. `formatMoney` writes a currency's ISO 4217 decimals and takes `{ unitPrice: true }` for up to four.++- [#14866](https://github.com/spree/spree/pull/14866) [`cbde8fe`](https://github.com/spree/spree/commit/cbde8fef8d27b91ef0cc415f3a7f69135b52113a) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - `directUploads.create()` is replaced by `files.create()` and `files.upload()`, which uploads a file and resolves to a `signed_id` in one call, either straight to storage or in the request itself. The `signed_id` expires after a day. Every parameter that takes one is now named `signed_id` or `<slot>_signed_id` (`avatar_signed_id`, `logo_signed_id`, `attachment_signed_id`, `document_signed_id`, `file_signed_id`, `po_document_signed_id`, …). In `@spree/dashboard-core`, `useDirectUpload` becomes `useFileUpload({ visibility })`, and `signedIdParam` builds the three-state write for an image or document field.++### Patch Changes++- [#14856](https://github.com/spree/spree/pull/14856) [`f508a38`](https://github.com/spree/spree/commit/f508a389f7f09f5ca85bfa32a2dfcec9517ea1bf) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Preferences of the new `money` type are shown with their currency's symbol in settings forms and as money in calculator summaries, instead of being guessed from the preference's name. `PreferenceField.type` documents the `money` type.+## 1.0.0-rc.2### Patch Changesdiff --git a/packages/dashboard-ui/package.json b/packages/dashboard-ui/package.jsonindex 20124c8ef0..96197eac75 100644--- a/packages/dashboard-ui/package.json+++ b/packages/dashboard-ui/package.json@@ -1,7 +1,7 @@{"name": "@spree/dashboard-ui","license": "MIT",- "version": "1.0.0-rc.2",+ "version": "1.0.0-rc.3","description": "Spree Dashboard design system — shadcn primitives, headless composed components, and design tokens. Source-only package; consumers compile via their own Vite/Tailwind setup. Developer Preview.","author": "Vendo Connect Inc.","homepage": "https://spreecommerce.org",diff --git a/packages/dashboard/CHANGELOG.md b/packages/dashboard/CHANGELOG.mdindex 00d68375b4..f3af1d4f9e 100644--- a/packages/dashboard/CHANGELOG.md+++ b/packages/dashboard/CHANGELOG.md@@ -1,5 +1,64 @@# @spree/dashboard+## 1.0.0-rc.3++### Minor Changes++- [#14856](https://github.com/spree/spree/pull/14856) [`05d6372`](https://github.com/spree/spree/commit/05d637294259a03b53e1849be6638bcb2b328d14) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - The Admin and Seller APIs no longer return `display_*` money fields, so their types drop them; format the amount with its currency instead. The dashboard and seller panel format every amount in the admin's own language. `formatMoney` writes a currency's ISO 4217 decimals and takes `{ unitPrice: true }` for up to four.++- [#14859](https://github.com/spree/spree/pull/14859) [`9728851`](https://github.com/spree/spree/commit/9728851b963a288e89f00ab85bcb993d3ebf5293) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Plugins and host apps can now add pages outside a store, such as onboarding, sign-up and account pages. File routes go in the new `authenticatedRoutes` (signed-in users) or `publicRoutes` (anyone) directories of a plugin's `spree.dashboard` marker; registry routes take `scope: 'authenticated'` or `scope: 'public'` with a full URL path. Both mount at the root, outside the store layout, and a page that takes the path of a built-in page fails with an error naming it.++ The signed-in landing page at `/` can be replaced through the new `store_selection` slot, for example with a list of stores and a way to create one, and the login page renders extra content, such as a sign-up link, from the new `login.after` slot.++- [#14866](https://github.com/spree/spree/pull/14866) [`cbde8fe`](https://github.com/spree/spree/commit/cbde8fef8d27b91ef0cc415f3a7f69135b52113a) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - `directUploads.create()` is replaced by `files.create()` and `files.upload()`, which uploads a file and resolves to a `signed_id` in one call, either straight to storage or in the request itself. The `signed_id` expires after a day. Every parameter that takes one is now named `signed_id` or `<slot>_signed_id` (`avatar_signed_id`, `logo_signed_id`, `attachment_signed_id`, `document_signed_id`, `file_signed_id`, `po_document_signed_id`, …). In `@spree/dashboard-core`, `useDirectUpload` becomes `useFileUpload({ visibility })`, and `signedIdParam` builds the three-state write for an image or document field.++- [#14853](https://github.com/spree/spree/pull/14853) [`3001ebf`](https://github.com/spree/spree/commit/3001ebf19fa8c361f13a7d627384d4d86a829787) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Changed preferences to a typed contract. Every `/…/types` entry returns `schema`, the JSON Schema of the type's `preferences`, instead of `preference_schema`, and rows no longer repeat it; `PreferenceField` and `DeliveryPreferenceField` are replaced by `PreferenceSchema`. Each configurable family's settings are typed per `type` (`PromotionRulePreferencesMap`, `TypedPromotionRule`, …), and an extension adds its own by declaration merging. Store, channel, import and seller profile settings drop the `preferred_` prefix (`guest_checkout`, `timezone`, `delimiter`), the store's decimal settings are strings, and delivery methods read and write `calculator: { type, preferences }`. Preference writes are validated, refused with `invalid_preferences` and a JSON pointer per failing value. `paymentMethods.types()` lists every provider with `installed` set on those the store already has.++### Patch Changes++- [#14864](https://github.com/spree/spree/pull/14864) [`614347a`](https://github.com/spree/spree/commit/614347a959b753efa76ed3eff145840856dc009a) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - The email template editor inserts an amount through the `money` filter (`{{ order.total | money }}`) instead of a pre-formatted `display_*` field. Email types gain the raw amounts the default templates now format: `total_minus_store_credits`, a line item's and a parcel item's `amount`, a parcel item's `price`, a fulfillment group's `cost` and `unpriced`, and a return's `refunded_total`.++- [#14884](https://github.com/spree/spree/pull/14884) [`9736316`](https://github.com/spree/spree/commit/9736316f970de9a8a360a5c88c9d91ef9783727a) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Removed the `display_*` money fields from the `Email*` types and Zod schemas; templates format amounts with the `money` filter. Added `EmailCustomer`, `EmailCustomerGroup` and `EmailNewsletterSubscriber`, which the password reset email's `customer` variable now uses.++- [#14885](https://github.com/spree/spree/pull/14885) [`34b80f0`](https://github.com/spree/spree/commit/34b80f0db561300db3e6982543c7ec724e2f4c03) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Added `formatMoney(amount, currency, locale?, { unitPrice? })`, which formats a decimal-string amount in its currency and the reader's language with the currency's own decimal places, without passing it through a JavaScript number. The dashboard now uses the SDK's copy.++- [#14887](https://github.com/spree/spree/pull/14887) [`9b5911d`](https://github.com/spree/spree/commit/9b5911d12649671ce9896f28473a2940f9a1cba0) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Country and currency names move to the client: the Store API's country `name` and currency `name` and `symbol` are deprecated (name them with `Intl.DisplayNames`, format amounts with `formatMoney`), and the Admin and Seller APIs no longer return a country's `name`. The seller SDK's `SellerCountry` is now the generated `Country` type, and the setup country list's `locales` are typed as `LocaleCode[]`. The dashboard and seller panel name and sort countries in the admin's own language.++ In `@spree/dashboard-core`, `CountryOption` no longer has `name` and `countryFilter` is removed: name countries with `useCountryDisplayName` and sort them with the new `useSortByCountryName`, which collates in the admin's language.++- [#14886](https://github.com/spree/spree/pull/14886) [`6034c11`](https://github.com/spree/spree/commit/6034c11340ddc997e0287935992cc603be3d756e) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Added the `LocaleCode` type: the locale codes Spree accepts (every ISO 639-1 language plus regional variants such as `en-US` and `pt-BR`). Order, cart and market locales, the store's default, supported and available locales, and the matching request params now use it. The dashboard validates locale fields with the new `localeCodeSchema`.++ The Store API's locale `name` is deprecated (name a locale from its `code` with `Intl.DisplayNames`) and the Admin API no longer returns it, so the admin SDK's `Locale` type drops `name` and types `code` as `LocaleCode`; the dashboard names locales in the browser.++- [#14852](https://github.com/spree/spree/pull/14852) [`3525c00`](https://github.com/spree/spree/commit/3525c00440076a17cce671f3e20801309d8ba586) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Money fields are now shown and read in the number format of the person using the dashboard, whatever the currency or market: an admin whose dashboard is in German types `1.234,56` for dollars and euros alike. Previously the format followed the currency's market, which was ambiguous when two markets shared a currency. `useFormCurrencyLocale` and the panel client's `markets` entry are removed; use `useMoneyLocale()`.++- [#14856](https://github.com/spree/spree/pull/14856) [`f508a38`](https://github.com/spree/spree/commit/f508a389f7f09f5ca85bfa32a2dfcec9517ea1bf) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Preferences of the new `money` type are shown with their currency's symbol in settings forms and as money in calculator summaries, instead of being guessed from the preference's name. `PreferenceField.type` documents the `money` type.++- [#14869](https://github.com/spree/spree/pull/14869) [`bf1f47d`](https://github.com/spree/spree/commit/bf1f47daaca69e9262e63bced762c350206395a5) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Purchase order documents on orders can now be Excel, OpenDocument or CSV spreadsheets, as well as PDFs, images and Word documents.++- [#14879](https://github.com/spree/spree/pull/14879) [`f184f25`](https://github.com/spree/spree/commit/f184f25097c94977eb930ac34dcbac98ff8ced7d) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Methods that delete a record are named `delete` in both SDKs. In the Seller SDK, `taxIdentifiers.remove`, `team.remove` and `invitations.revoke` are now `taxIdentifiers.delete`, `team.delete` and `invitations.delete`. In the Admin SDK, `sellers.team.remove` and `sellers.invitations.remove` are now `sellers.team.delete` and `sellers.invitations.delete`. Methods that detach something from a cart or order (`remove`), or change a record without deleting it (`revoke`), keep their names.++ Seller SDK types are corrected: `team.invite` returns the `Invitation`, and `auth.providers` returns `AuthProvidersResponse`.++- [#14858](https://github.com/spree/spree/pull/14858) [`a90a9cc`](https://github.com/spree/spree/commit/a90a9ccc68caff9349af1c0a888e6497f72d7228) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Every filterable list method now takes typed filter and sort parameters, including returns, claims, exchanges, custom fields, digital links, payouts, imports and the rest that still accepted any key. The building block for custom field value filters is now `CustomFieldValueFilters`, so it no longer hides the generated filters for custom field lists. The product digital files list now pages by 25 as intended.++- [#14854](https://github.com/spree/spree/pull/14854) [`90af080`](https://github.com/spree/spree/commit/90af080e5e3745423475ef9deef21f4dfc0bb71b) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - List methods of documented endpoints now accept typed filter and sort parameters, generated from the filters each endpoint actually accepts; methods of endpoints the API reference does not document yet keep loose parameters. A misspelled filter, a filter the endpoint does not support, or an unknown sort field is now a type error instead of a request that silently returns the unfiltered list. `ProductListParams`, `CategoryListParams`, `CollectionListParams` and `OrderListParams` keep their names and are now generated; they no longer accept arbitrary keys. Filters an app adds through its own extensions can be sent unchecked inside `q` (`list({ q: { erp_id_eq: 'ERP-1' } })`), generated as declarations with `spree filters types`, or declared by hand by extending `<Resource>FilterExtensions` and `<Resource>SortExtensions`. The filter building blocks (`TextFilters`, `SortKey`, …) are exported for those declarations.++ The dashboard's allowed-origins search, delivery zones by profile, and several filters and sorts on payment methods, sellers, option types, markets, custom field definitions and gift cards now take effect; the API used to ignore them.++- [#14876](https://github.com/spree/spree/pull/14876) [`5c1eeee`](https://github.com/spree/spree/commit/5c1eeee6b5f2570c34271bcd8fd6c93fa6dbe36e) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Request types that served both create and update are split by action, so creating marks what the API requires (a company's or tax rate's name, a tax registration's kind and value, an address's name, street, city and country) while updating takes any field. `AddressParams` and `CompanyAddressParams` in `@spree/sdk` stay as deprecated aliases until 6.1. The Admin SDK's `orders.payments.capture(orderId, id, params?, options?)` takes an optional `{ amount }` for a partial capture; request options move from the third argument to the fourth.++ A tax exemption certificate's `issued_at`, `expires_at` and `verified_at` are typed `string | null`: a certificate that is still pending has no dates yet.++- [#14871](https://github.com/spree/spree/pull/14871) [`6990f37`](https://github.com/spree/spree/commit/6990f3730ffad5245dd116b458a7b8ceeb67d310) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Request body types are now generated from the API itself, so every create, update and action method takes exactly the fields its endpoint accepts. Fields the API never accepted are gone from the types, and fields it accepted but the types left out are added. Renamed types keep their old names as deprecated aliases (for example `VariantPrice` is now `PriceParams`, `LineItemInput` is now `LineItemInputParams`). The dashboard now saves the store's digital download limits, which the API used to drop.++ Country and currency codes are typed as the closed `CountryCode` and `CurrencyCode` unions in both requests and responses. Deprecated fields are marked `@deprecated` in the types; the Store SDK keeps them until 6.1, while the Admin and Seller SDKs drop them (address `country_iso`/`state_abbr`, cart `number`, market `country_isos`, import `owner_type`/`owner_id`, payment method `auto_capture`).++- Updated dependencies [[`05d6372`](https://github.com/spree/spree/commit/05d637294259a03b53e1849be6638bcb2b328d14), [`9728851`](https://github.com/spree/spree/commit/9728851b963a288e89f00ab85bcb993d3ebf5293), [`293200e`](https://github.com/spree/spree/commit/293200e34b7f82c94eeaeec95fe34329956619d7), [`614347a`](https://github.com/spree/spree/commit/614347a959b753efa76ed3eff145840856dc009a), [`9736316`](https://github.com/spree/spree/commit/9736316f970de9a8a360a5c88c9d91ef9783727a), [`cbde8fe`](https://github.com/spree/spree/commit/cbde8fef8d27b91ef0cc415f3a7f69135b52113a), [`34b80f0`](https://github.com/spree/spree/commit/34b80f0db561300db3e6982543c7ec724e2f4c03), [`9b5911d`](https://github.com/spree/spree/commit/9b5911d12649671ce9896f28473a2940f9a1cba0), [`6034c11`](https://github.com/spree/spree/commit/6034c11340ddc997e0287935992cc603be3d756e), [`525959d`](https://github.com/spree/spree/commit/525959de11cf10af12fc0936f908ab3af000857f), [`3525c00`](https://github.com/spree/spree/commit/3525c00440076a17cce671f3e20801309d8ba586), [`f508a38`](https://github.com/spree/spree/commit/f508a389f7f09f5ca85bfa32a2dfcec9517ea1bf), [`8dbe607`](https://github.com/spree/spree/commit/8dbe607bdd0c66ecebadb383ea9765ba3a971cbd), [`f184f25`](https://github.com/spree/spree/commit/f184f25097c94977eb930ac34dcbac98ff8ced7d), [`a90a9cc`](https://github.com/spree/spree/commit/a90a9ccc68caff9349af1c0a888e6497f72d7228), [`90af080`](https://github.com/spree/spree/commit/90af080e5e3745423475ef9deef21f4dfc0bb71b), [`5c1eeee`](https://github.com/spree/spree/commit/5c1eeee6b5f2570c34271bcd8fd6c93fa6dbe36e), [`3001ebf`](https://github.com/spree/spree/commit/3001ebf19fa8c361f13a7d627384d4d86a829787), [`6990f37`](https://github.com/spree/spree/commit/6990f3730ffad5245dd116b458a7b8ceeb67d310)]:+ - @spree/[email protected]+ - @spree/[email protected]+ - @spree/[email protected]+## 1.0.0-rc.2### Patch Changesdiff --git a/packages/dashboard/package.json b/packages/dashboard/package.jsonindex e8cb0c3b24..ec3d3905bf 100644--- a/packages/dashboard/package.json+++ b/packages/dashboard/package.json@@ -1,7 +1,7 @@{"name": "@spree/dashboard","license": "MIT",- "version": "1.0.0-rc.2",+ "version": "1.0.0-rc.3","description": "Spree Dashboard app shell — the next-gen React admin for Spree Commerce. Routes, resource hooks, schemas, locales, and the <Dashboard /> component. Source-only package; hosts compile it via @spree/dashboard/vite. Developer Preview.","author": "Vendo Connect Inc.","homepage": "https://spreecommerce.org",diff --git a/packages/sdk/CHANGELOG.md b/packages/sdk/CHANGELOG.mdindex 0adc095eb3..04f2d5717c 100644--- a/packages/sdk/CHANGELOG.md+++ b/packages/sdk/CHANGELOG.md@@ -1,5 +1,49 @@# @spree/sdk+## 2.0.0-rc.2++### Minor Changes++- [#14885](https://github.com/spree/spree/pull/14885) [`34b80f0`](https://github.com/spree/spree/commit/34b80f0db561300db3e6982543c7ec724e2f4c03) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Added `formatMoney(amount, currency, locale?, { unitPrice? })`, which formats a decimal-string amount in its currency and the reader's language with the currency's own decimal places, without passing it through a JavaScript number. The dashboard now uses the SDK's copy.++- [#14887](https://github.com/spree/spree/pull/14887) [`9b5911d`](https://github.com/spree/spree/commit/9b5911d12649671ce9896f28473a2940f9a1cba0) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Country and currency names move to the client: the Store API's country `name` and currency `name` and `symbol` are deprecated (name them with `Intl.DisplayNames`, format amounts with `formatMoney`), and the Admin and Seller APIs no longer return a country's `name`. The seller SDK's `SellerCountry` is now the generated `Country` type, and the setup country list's `locales` are typed as `LocaleCode[]`. The dashboard and seller panel name and sort countries in the admin's own language.++ In `@spree/dashboard-core`, `CountryOption` no longer has `name` and `countryFilter` is removed: name countries with `useCountryDisplayName` and sort them with the new `useSortByCountryName`, which collates in the admin's language.++- [#14886](https://github.com/spree/spree/pull/14886) [`6034c11`](https://github.com/spree/spree/commit/6034c11340ddc997e0287935992cc603be3d756e) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Added the `LocaleCode` type: the locale codes Spree accepts (every ISO 639-1 language plus regional variants such as `en-US` and `pt-BR`). Order, cart and market locales, the store's default, supported and available locales, and the matching request params now use it. The dashboard validates locale fields with the new `localeCodeSchema`.++ The Store API's locale `name` is deprecated (name a locale from its `code` with `Intl.DisplayNames`) and the Admin API no longer returns it, so the admin SDK's `Locale` type drops `name` and types `code` as `LocaleCode`; the dashboard names locales in the browser.++- [#14852](https://github.com/spree/spree/pull/14852) [`525959d`](https://github.com/spree/spree/commit/525959de11cf10af12fc0936f908ab3af000857f) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Money is a decimal string written to its currency's decimals, and Admin and Seller writes take money and rates only as decimal strings. Added `sumMoney`, `subtractMoney`, `multiplyMoney`, `negateMoney`, `compareMoney`, `isZeroMoney`, `isDecimalString` and `decimalPlaces` for exact arithmetic on those strings. Currencies carry `decimal_places`; prices no longer carry `amount_in_cents` or `compare_at_amount_in_cents`; tax rates read and write `rate` and `rate_percent` instead of `amount` and `amount_percentage`.++- [#14877](https://github.com/spree/spree/pull/14877) [`8dbe607`](https://github.com/spree/spree/commit/8dbe607bdd0c66ecebadb383ea9765ba3a971cbd) Thanks [@KacperMekarski](https://github.com/KacperMekarski)! - `orders.get` now returns `Order | OrderGroup`. Called with the id of the cart a checkout was placed from, it returns the whole purchase: one order, or, when the checkout reached several sellers, the order group holding one order per seller. Narrow the result with `isOrderGroup` before reading order-only fields such as `items`. An order group now carries the same money summary as an order (delivery, discount, tax, fee, gift card and store credit totals, the amount still due) and its payments.++ `store_credit_total` on carts, orders and order groups no longer includes what a gift card paid. That amount is reported only in `gift_card_total`, so a summary that shows both rows no longer deducts it twice. `amount_due` no longer subtracts store credit that has already been captured.++- [#14873](https://github.com/spree/spree/pull/14873) [`f71fb8a`](https://github.com/spree/spree/commit/f71fb8ac5ef84ed969cde61b7d228452b1eb2428) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - `carts.storeCredits.apply()` takes the amount as a decimal string (`'10.00'`), like every other money value; a number is no longer accepted.++- [#14866](https://github.com/spree/spree/pull/14866) [`cbde8fe`](https://github.com/spree/spree/commit/cbde8fef8d27b91ef0cc415f3a7f69135b52113a) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - A cart's purchase order document is now set with `po_document_signed_id` instead of `po_document`.++- [#14858](https://github.com/spree/spree/pull/14858) [`a90a9cc`](https://github.com/spree/spree/commit/a90a9ccc68caff9349af1c0a888e6497f72d7228) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Every filterable list method now takes typed filter and sort parameters, including returns, claims, exchanges, custom fields, digital links, payouts, imports and the rest that still accepted any key. The building block for custom field value filters is now `CustomFieldValueFilters`, so it no longer hides the generated filters for custom field lists. The product digital files list now pages by 25 as intended.++- [#14854](https://github.com/spree/spree/pull/14854) [`90af080`](https://github.com/spree/spree/commit/90af080e5e3745423475ef9deef21f4dfc0bb71b) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - List methods of documented endpoints now accept typed filter and sort parameters, generated from the filters each endpoint actually accepts; methods of endpoints the API reference does not document yet keep loose parameters. A misspelled filter, a filter the endpoint does not support, or an unknown sort field is now a type error instead of a request that silently returns the unfiltered list. `ProductListParams`, `CategoryListParams`, `CollectionListParams` and `OrderListParams` keep their names and are now generated; they no longer accept arbitrary keys. Filters an app adds through its own extensions can be sent unchecked inside `q` (`list({ q: { erp_id_eq: 'ERP-1' } })`), generated as declarations with `spree filters types`, or declared by hand by extending `<Resource>FilterExtensions` and `<Resource>SortExtensions`. The filter building blocks (`TextFilters`, `SortKey`, …) are exported for those declarations.++ The dashboard's allowed-origins search, delivery zones by profile, and several filters and sorts on payment methods, sellers, option types, markets, custom field definitions and gift cards now take effect; the API used to ignore them.++- [#14876](https://github.com/spree/spree/pull/14876) [`5c1eeee`](https://github.com/spree/spree/commit/5c1eeee6b5f2570c34271bcd8fd6c93fa6dbe36e) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Request types that served both create and update are split by action, so creating marks what the API requires (a company's or tax rate's name, a tax registration's kind and value, an address's name, street, city and country) while updating takes any field. `AddressParams` and `CompanyAddressParams` in `@spree/sdk` stay as deprecated aliases until 6.1. The Admin SDK's `orders.payments.capture(orderId, id, params?, options?)` takes an optional `{ amount }` for a partial capture; request options move from the third argument to the fourth.++ A tax exemption certificate's `issued_at`, `expires_at` and `verified_at` are typed `string | null`: a certificate that is still pending has no dates yet.++- [#14871](https://github.com/spree/spree/pull/14871) [`6990f37`](https://github.com/spree/spree/commit/6990f3730ffad5245dd116b458a7b8ceeb67d310) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Request body types are now generated from the API itself, so every create, update and action method takes exactly the fields its endpoint accepts. Fields the API never accepted are gone from the types, and fields it accepted but the types left out are added. Renamed types keep their old names as deprecated aliases (for example `VariantPrice` is now `PriceParams`, `LineItemInput` is now `LineItemInputParams`). The dashboard now saves the store's digital download limits, which the API used to drop.++ Country and currency codes are typed as the closed `CountryCode` and `CurrencyCode` unions in both requests and responses. Deprecated fields are marked `@deprecated` in the types; the Store SDK keeps them until 6.1, while the Admin and Seller SDKs drop them (address `country_iso`/`state_abbr`, cart `number`, market `country_isos`, import `owner_type`/`owner_id`, payment method `auto_capture`).++### Patch Changes++- [#14885](https://github.com/spree/spree/pull/14885) [`34b80f0`](https://github.com/spree/spree/commit/34b80f0db561300db3e6982543c7ec724e2f4c03) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Marked the Store API's `display_*` money fields as deprecated. Format the amount beside each one with its currency instead (`total` for `display_total`); the fields are removed in 6.1.++- [#14877](https://github.com/spree/spree/pull/14877) [`8dbe607`](https://github.com/spree/spree/commit/8dbe607bdd0c66ecebadb383ea9765ba3a971cbd) Thanks [@KacperMekarski](https://github.com/KacperMekarski)! - Stock locations bring back `country_iso` and `state_abbr`, and refunds bring back `reimbursement_id` (always `null`), all marked `@deprecated` until 6.1 so a 5.6 storefront keeps compiling. `AppliedPromotion`, `Fee`, `TaxLine` and `Delivery`, which carts, orders and their items already carry, are now exported from the package root.+## 2.0.0-rc.1### Minor Changesdiff --git a/packages/sdk/package.json b/packages/sdk/package.jsonindex 572899db0e..3781a19ff0 100644--- a/packages/sdk/package.json+++ b/packages/sdk/package.json@@ -1,6 +1,6 @@{"name": "@spree/sdk",- "version": "2.0.0-rc.1",+ "version": "2.0.0-rc.2","description": "Official TypeScript SDK for Spree Commerce Store API","type": "module","main": "./dist/index.cjs",diff --git a/packages/seller-dashboard/CHANGELOG.md b/packages/seller-dashboard/CHANGELOG.mdindex 1f16c21a61..6e8392c7dc 100644--- a/packages/seller-dashboard/CHANGELOG.md+++ b/packages/seller-dashboard/CHANGELOG.md@@ -1,5 +1,26 @@# @spree/seller-dashboard+## 1.0.0-rc.3++### Minor Changes++- [#14856](https://github.com/spree/spree/pull/14856) [`05d6372`](https://github.com/spree/spree/commit/05d637294259a03b53e1849be6638bcb2b328d14) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - The Admin and Seller APIs no longer return `display_*` money fields, so their types drop them; format the amount with its currency instead. The dashboard and seller panel format every amount in the admin's own language. `formatMoney` writes a currency's ISO 4217 decimals and takes `{ unitPrice: true }` for up to four.++- [#14866](https://github.com/spree/spree/pull/14866) [`cbde8fe`](https://github.com/spree/spree/commit/cbde8fef8d27b91ef0cc415f3a7f69135b52113a) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - `directUploads.create()` is replaced by `files.create()` and `files.upload()`, which uploads a file and resolves to a `signed_id` in one call, either straight to storage or in the request itself. The `signed_id` expires after a day. Every parameter that takes one is now named `signed_id` or `<slot>_signed_id` (`avatar_signed_id`, `logo_signed_id`, `attachment_signed_id`, `document_signed_id`, `file_signed_id`, `po_document_signed_id`, …). In `@spree/dashboard-core`, `useDirectUpload` becomes `useFileUpload({ visibility })`, and `signedIdParam` builds the three-state write for an image or document field.++- [#14853](https://github.com/spree/spree/pull/14853) [`3001ebf`](https://github.com/spree/spree/commit/3001ebf19fa8c361f13a7d627384d4d86a829787) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Changed preferences to a typed contract. Every `/…/types` entry returns `schema`, the JSON Schema of the type's `preferences`, instead of `preference_schema`, and rows no longer repeat it; `PreferenceField` and `DeliveryPreferenceField` are replaced by `PreferenceSchema`. Each configurable family's settings are typed per `type` (`PromotionRulePreferencesMap`, `TypedPromotionRule`, …), and an extension adds its own by declaration merging. Store, channel, import and seller profile settings drop the `preferred_` prefix (`guest_checkout`, `timezone`, `delimiter`), the store's decimal settings are strings, and delivery methods read and write `calculator: { type, preferences }`. Preference writes are validated, refused with `invalid_preferences` and a JSON pointer per failing value. `paymentMethods.types()` lists every provider with `installed` set on those the store already has.++### Patch Changes++- [#14879](https://github.com/spree/spree/pull/14879) [`f184f25`](https://github.com/spree/spree/commit/f184f25097c94977eb930ac34dcbac98ff8ced7d) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Methods that delete a record are named `delete` in both SDKs. In the Seller SDK, `taxIdentifiers.remove`, `team.remove` and `invitations.revoke` are now `taxIdentifiers.delete`, `team.delete` and `invitations.delete`. In the Admin SDK, `sellers.team.remove` and `sellers.invitations.remove` are now `sellers.team.delete` and `sellers.invitations.delete`. Methods that detach something from a cart or order (`remove`), or change a record without deleting it (`revoke`), keep their names.++ Seller SDK types are corrected: `team.invite` returns the `Invitation`, and `auth.providers` returns `AuthProvidersResponse`.++- Updated dependencies [[`05d6372`](https://github.com/spree/spree/commit/05d637294259a03b53e1849be6638bcb2b328d14), [`9728851`](https://github.com/spree/spree/commit/9728851b963a288e89f00ab85bcb993d3ebf5293), [`cbde8fe`](https://github.com/spree/spree/commit/cbde8fef8d27b91ef0cc415f3a7f69135b52113a), [`34b80f0`](https://github.com/spree/spree/commit/34b80f0db561300db3e6982543c7ec724e2f4c03), [`9b5911d`](https://github.com/spree/spree/commit/9b5911d12649671ce9896f28473a2940f9a1cba0), [`525959d`](https://github.com/spree/spree/commit/525959de11cf10af12fc0936f908ab3af000857f), [`3525c00`](https://github.com/spree/spree/commit/3525c00440076a17cce671f3e20801309d8ba586), [`f508a38`](https://github.com/spree/spree/commit/f508a389f7f09f5ca85bfa32a2dfcec9517ea1bf), [`f184f25`](https://github.com/spree/spree/commit/f184f25097c94977eb930ac34dcbac98ff8ced7d), [`a90a9cc`](https://github.com/spree/spree/commit/a90a9ccc68caff9349af1c0a888e6497f72d7228), [`90af080`](https://github.com/spree/spree/commit/90af080e5e3745423475ef9deef21f4dfc0bb71b), [`5c1eeee`](https://github.com/spree/spree/commit/5c1eeee6b5f2570c34271bcd8fd6c93fa6dbe36e), [`3001ebf`](https://github.com/spree/spree/commit/3001ebf19fa8c361f13a7d627384d4d86a829787), [`6990f37`](https://github.com/spree/spree/commit/6990f3730ffad5245dd116b458a7b8ceeb67d310)]:+ - @spree/[email protected]+ - @spree/[email protected]+ - @spree/[email protected]+## 1.0.0-rc.2### Patch Changesdiff --git a/packages/seller-dashboard/package.json b/packages/seller-dashboard/package.jsonindex a6785a2eef..ecfc3b598e 100644--- a/packages/seller-dashboard/package.json+++ b/packages/seller-dashboard/package.json@@ -1,6 +1,6 @@{"name": "@spree/seller-dashboard",- "version": "1.0.0-rc.2",+ "version": "1.0.0-rc.3","license": "MIT","type": "module","description": "Spree marketplace seller panel — the seller-facing counterpart to the admin dashboard.",diff --git a/packages/seller-sdk/CHANGELOG.md b/packages/seller-sdk/CHANGELOG.mdindex 19bb328cc5..8b6c8520fd 100644--- a/packages/seller-sdk/CHANGELOG.md+++ b/packages/seller-sdk/CHANGELOG.md@@ -1,5 +1,41 @@# @spree/seller-sdk+## 1.0.0-rc.2++### Minor Changes++- [#14856](https://github.com/spree/spree/pull/14856) [`05d6372`](https://github.com/spree/spree/commit/05d637294259a03b53e1849be6638bcb2b328d14) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - The Admin and Seller APIs no longer return `display_*` money fields, so their types drop them; format the amount with its currency instead. The dashboard and seller panel format every amount in the admin's own language. `formatMoney` writes a currency's ISO 4217 decimals and takes `{ unitPrice: true }` for up to four.++- [#14866](https://github.com/spree/spree/pull/14866) [`cbde8fe`](https://github.com/spree/spree/commit/cbde8fef8d27b91ef0cc415f3a7f69135b52113a) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - `directUploads.create()` is replaced by `files.create()` and `files.upload()`, which uploads a file and resolves to a `signed_id` in one call, either straight to storage or in the request itself. The `signed_id` expires after a day. Every parameter that takes one is now named `signed_id` or `<slot>_signed_id` (`avatar_signed_id`, `logo_signed_id`, `attachment_signed_id`, `document_signed_id`, `file_signed_id`, `po_document_signed_id`, …). In `@spree/dashboard-core`, `useDirectUpload` becomes `useFileUpload({ visibility })`, and `signedIdParam` builds the three-state write for an image or document field.++- [#14885](https://github.com/spree/spree/pull/14885) [`34b80f0`](https://github.com/spree/spree/commit/34b80f0db561300db3e6982543c7ec724e2f4c03) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Added `formatMoney(amount, currency, locale?, { unitPrice? })`, which formats a decimal-string amount in its currency and the reader's language with the currency's own decimal places, without passing it through a JavaScript number. The dashboard now uses the SDK's copy.++- [#14887](https://github.com/spree/spree/pull/14887) [`9b5911d`](https://github.com/spree/spree/commit/9b5911d12649671ce9896f28473a2940f9a1cba0) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Country and currency names move to the client: the Store API's country `name` and currency `name` and `symbol` are deprecated (name them with `Intl.DisplayNames`, format amounts with `formatMoney`), and the Admin and Seller APIs no longer return a country's `name`. The seller SDK's `SellerCountry` is now the generated `Country` type, and the setup country list's `locales` are typed as `LocaleCode[]`. The dashboard and seller panel name and sort countries in the admin's own language.++ In `@spree/dashboard-core`, `CountryOption` no longer has `name` and `countryFilter` is removed: name countries with `useCountryDisplayName` and sort them with the new `useSortByCountryName`, which collates in the admin's language.++- [#14852](https://github.com/spree/spree/pull/14852) [`525959d`](https://github.com/spree/spree/commit/525959de11cf10af12fc0936f908ab3af000857f) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Money is a decimal string written to its currency's decimals, and Admin and Seller writes take money and rates only as decimal strings. Added `sumMoney`, `subtractMoney`, `multiplyMoney`, `negateMoney`, `compareMoney`, `isZeroMoney`, `isDecimalString` and `decimalPlaces` for exact arithmetic on those strings. Currencies carry `decimal_places`; prices no longer carry `amount_in_cents` or `compare_at_amount_in_cents`; tax rates read and write `rate` and `rate_percent` instead of `amount` and `amount_percentage`.++- [#14879](https://github.com/spree/spree/pull/14879) [`f184f25`](https://github.com/spree/spree/commit/f184f25097c94977eb930ac34dcbac98ff8ced7d) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Methods that delete a record are named `delete` in both SDKs. In the Seller SDK, `taxIdentifiers.remove`, `team.remove` and `invitations.revoke` are now `taxIdentifiers.delete`, `team.delete` and `invitations.delete`. In the Admin SDK, `sellers.team.remove` and `sellers.invitations.remove` are now `sellers.team.delete` and `sellers.invitations.delete`. Methods that detach something from a cart or order (`remove`), or change a record without deleting it (`revoke`), keep their names.++ Seller SDK types are corrected: `team.invite` returns the `Invitation`, and `auth.providers` returns `AuthProvidersResponse`.++- [#14858](https://github.com/spree/spree/pull/14858) [`a90a9cc`](https://github.com/spree/spree/commit/a90a9ccc68caff9349af1c0a888e6497f72d7228) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Every filterable list method now takes typed filter and sort parameters, including returns, claims, exchanges, custom fields, digital links, payouts, imports and the rest that still accepted any key. The building block for custom field value filters is now `CustomFieldValueFilters`, so it no longer hides the generated filters for custom field lists. The product digital files list now pages by 25 as intended.++- [#14854](https://github.com/spree/spree/pull/14854) [`90af080`](https://github.com/spree/spree/commit/90af080e5e3745423475ef9deef21f4dfc0bb71b) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - List methods of documented endpoints now accept typed filter and sort parameters, generated from the filters each endpoint actually accepts; methods of endpoints the API reference does not document yet keep loose parameters. A misspelled filter, a filter the endpoint does not support, or an unknown sort field is now a type error instead of a request that silently returns the unfiltered list. `ProductListParams`, `CategoryListParams`, `CollectionListParams` and `OrderListParams` keep their names and are now generated; they no longer accept arbitrary keys. Filters an app adds through its own extensions can be sent unchecked inside `q` (`list({ q: { erp_id_eq: 'ERP-1' } })`), generated as declarations with `spree filters types`, or declared by hand by extending `<Resource>FilterExtensions` and `<Resource>SortExtensions`. The filter building blocks (`TextFilters`, `SortKey`, …) are exported for those declarations.++ The dashboard's allowed-origins search, delivery zones by profile, and several filters and sorts on payment methods, sellers, option types, markets, custom field definitions and gift cards now take effect; the API used to ignore them.++- [#14876](https://github.com/spree/spree/pull/14876) [`5c1eeee`](https://github.com/spree/spree/commit/5c1eeee6b5f2570c34271bcd8fd6c93fa6dbe36e) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Request types that served both create and update are split by action, so creating marks what the API requires (a company's or tax rate's name, a tax registration's kind and value, an address's name, street, city and country) while updating takes any field. `AddressParams` and `CompanyAddressParams` in `@spree/sdk` stay as deprecated aliases until 6.1. The Admin SDK's `orders.payments.capture(orderId, id, params?, options?)` takes an optional `{ amount }` for a partial capture; request options move from the third argument to the fourth.++ A tax exemption certificate's `issued_at`, `expires_at` and `verified_at` are typed `string | null`: a certificate that is still pending has no dates yet.++- [#14853](https://github.com/spree/spree/pull/14853) [`3001ebf`](https://github.com/spree/spree/commit/3001ebf19fa8c361f13a7d627384d4d86a829787) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Changed preferences to a typed contract. Every `/…/types` entry returns `schema`, the JSON Schema of the type's `preferences`, instead of `preference_schema`, and rows no longer repeat it; `PreferenceField` and `DeliveryPreferenceField` are replaced by `PreferenceSchema`. Each configurable family's settings are typed per `type` (`PromotionRulePreferencesMap`, `TypedPromotionRule`, …), and an extension adds its own by declaration merging. Store, channel, import and seller profile settings drop the `preferred_` prefix (`guest_checkout`, `timezone`, `delimiter`), the store's decimal settings are strings, and delivery methods read and write `calculator: { type, preferences }`. Preference writes are validated, refused with `invalid_preferences` and a JSON pointer per failing value. `paymentMethods.types()` lists every provider with `installed` set on those the store already has.++- [#14871](https://github.com/spree/spree/pull/14871) [`6990f37`](https://github.com/spree/spree/commit/6990f3730ffad5245dd116b458a7b8ceeb67d310) Thanks [@damianlegawiec](https://github.com/damianlegawiec)! - Request body types are now generated from the API itself, so every create, update and action method takes exactly the fields its endpoint accepts. Fields the API never accepted are gone from the types, and fields it accepted but the types left out are added. Renamed types keep their old names as deprecated aliases (for example `VariantPrice` is now `PriceParams`, `LineItemInput` is now `LineItemInputParams`). The dashboard now saves the store's digital download limits, which the API used to drop.++ Country and currency codes are typed as the closed `CountryCode` and `CurrencyCode` unions in both requests and responses. Deprecated fields are marked `@deprecated` in the types; the Store SDK keeps them until 6.1, while the Admin and Seller SDKs drop them (address `country_iso`/`state_abbr`, cart `number`, market `country_isos`, import `owner_type`/`owner_id`, payment method `auto_capture`).+## 1.0.0-rc.1### Minor Changesdiff --git a/packages/seller-sdk/package.json b/packages/seller-sdk/package.jsonindex 6ea5ee429b..539aed9b8f 100644--- a/packages/seller-sdk/package.json+++ b/packages/seller-sdk/package.json@@ -1,6 +1,6 @@{"name": "@spree/seller-sdk",- "version": "1.0.0-rc.1",+ "version": "1.0.0-rc.2","description": "TypeScript client for the Spree Seller API — the marketplace seller panel.","type": "module","main": "./dist/index.cjs",diff --git a/spree/core/lib/spree/core/version.rb b/spree/core/lib/spree/core/version.rbindex 953aa50925..212c353aa5 100644--- a/spree/core/lib/spree/core/version.rb+++ b/spree/core/lib/spree/core/version.rb@@ -1,5 +1,5 @@module Spree- VERSION = '6.0.0.rc1'.freeze+ VERSION = '6.0.0.rc2'.freezedef self.versionVERSION