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.
@spree/seller-sdk
6.0.2
Released with Spree 6.0.2, with no changes of its own.
6.0.1
Patch Changes
#15015
29d95e3Thanks @damianlegawiec! - Fixed the invitation link redirecting anyone already signed in to the dashboard instead of letting them accept. Someone signed in as the invited account now accepts with one click, and someone signed in as another account is asked to sign out first. The seller panel's acceptance page shares these screens: an existing account confirms its password instead of being asked to set a new one, and the seller invitation lookup now says whether the invitee has an account.#14996
30493b4Thanks @damianlegawiec! - Added an optionalcustom_fieldsproperty to every record type that can carry custom fields, such as sellers, option types, media, orders, line items, addresses and customers. Request it withexpand: ['custom_fields']. The Store API returns only fields marked storefront visible, and the Admin API returns every field.#15001
21dc28fThanks @damianlegawiec! - Typed the store's regional settings. The store'sdefault_country_codeis nowCountryCode, itsadmin_localeisLocaleCode(sendnullto clear it), and itstimezone— also on the seller profile — is the newTimeZonetype, which suggests common IANA time zones while accepting any other.TIME_ZONESin@spree/corelists the suggested zones.
6.0.0
No changes in this release.
6.0.0-rc.7
Released with Spree 6.0.0.rc7, with no changes of its own. From this release the version matches the version of the Spree gems.
1.0.0-rc.6
Minor Changes
#14971
98a79caThanks @damianlegawiec! - Sellers can manage the downloadable files on their own digital products. The Seller SDK addsproducts.digitalAssets(list,get,create,update,delete), and the seller panel's product page shows the same Digital files card as the dashboard: upload, replace and delete files, and set per-file download limits. A file the marketplace delivers through its own provider is listed but cannot be replaced by the seller. The card now lives in@spree/dashboard-coreasDigitalAssetsCard, and a panel enables it by registeringdigitalAssetson its API client;readOnlyshows the files without any way to change them andacceptnarrows the file picker.Seller uploads are a marketplace decision: three store settings, edited on the dashboard's Marketplace settings page, say whether sellers may upload at all (off by default), which content types their files may have, and whether a file added to or replaced on an approved product sends it back to review. The seller
/meresponse carries them understore, and the Admin SDK'sStoretype gains the three fields.
1.0.0-rc.5
Patch Changes
#14933
1a86817Thanks @damianlegawiec! - Order filter and sort types includemarket_idandlocale. Locale, currency and country filters (locale,currency,cost_currency,country_code,country_of_origin) accept onlyLocaleCode,CurrencyCodeandCountryCodevalues (newCodeFilterstype) instead of free text.#14944
a0e5b66Thanks @damianlegawiec! - Added every status, kind and other value list the Spree API returns to@spree/core, each as a list of its values (PRODUCT_STATUSES,MEDIA_TYPES, …) and a type (ProductStatus,MediaType, …) — open where extensions may add values, closed otherwise — plussubsetOffor picking the values an action accepts with each one checked at compile time. The SDKs re-export these types instead of each carrying its own copy, so their names and values are unchanged. The dashboards and the seller panel build their status filters and action checks from these lists, so a status added on the server shows up without a dashboard change. Value lists the SDKs used to spell out inline, such as a seller transfer'skind, now have names of their own;MediaType,CollectionRuleMatchPolicyandCollectionSortOrderin@spree/admin-sdk, andClaimResolutionin@spree/dashboard-ui, now come from the generated lists under the same names. A seller'stax_remittanceandpayouts_schedule_interval, a claim'sresolution, a collection'ssort_order, a shipping label'sformat, purchase order and stock transfer statuses, and tax and commission lines'taxability_reasonare now typed with their lists instead of as plain strings.#14936
06fc8b0Thanks @damianlegawiec! - Weight and dimension units are closed code lists, exported asWeightUnitandDimensionUnit(values and types) likeCountryCodeandCurrencyCode, and every unit field in responses and request types uses them; unit fields in requests acceptnullto fall back to the store default. The Admin and Seller SDKs publish oneVariantParamstype:ProductVariantParams,VariantCreateParamsandVariantUpdateParamsbuild on it. The Seller SDK'sSellerProductVariantParamsis renamed toProductVariantParams(the old name stays as a deprecated alias). The variant editor and bulk variant editor now offer feet as a dimension unit.
1.0.0-rc.4
Minor Changes
- #14900
11b9a03Thanks @damianlegawiec! - AddedCountryCode,CurrencyCodeandLocaleCodeas values as well as types, so you can writeCurrencyCode.USD, list every code withObject.values(CurrencyCode)and see each code's name in your editor. Plain strings such as'USD'still type-check.
1.0.0-rc.3
Patch Changes
Entries of
qon every list method always stay insideq, even one namedpageorsort, and nested objects are sent in bracket form.sumMoney,subtractMoney,multiplyMoneyandnegateMoneynow write every result the same way: with the decimals their inputs carry, and at least the currency's when one is given (sumMoney(['1.50', '2.50'])is"4.00", not"4"). Nothing is rounded away.formatMoneyreturns an empty string for a currencyIntldoes not know, falls back to the reader's language for a locale it does not know, and no longer shows a minus sign on an amount that rounds to zero.
1.0.0-rc.2
Minor Changes
#14856
05d6372Thanks @damianlegawiec! - The Admin and Seller APIs no longer returndisplay_*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.formatMoneywrites a currency's ISO 4217 decimals and takes{ unitPrice: true }for up to four.#14866
cbde8feThanks @damianlegawiec! -directUploads.create()is replaced byfiles.create()andfiles.upload(), which uploads a file and resolves to asigned_idin one call, either straight to storage or in the request itself. Thesigned_idexpires after a day. Every parameter that takes one is now namedsigned_idor<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,useDirectUploadbecomesuseFileUpload({ visibility }), andsignedIdParambuilds the three-state write for an image or document field.#14885
34b80f0Thanks @damianlegawiec! - AddedformatMoney(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
9b5911dThanks @damianlegawiec! - Country and currency names move to the client: the Store API's countrynameand currencynameandsymbolare deprecated (name them withIntl.DisplayNames, format amounts withformatMoney), and the Admin and Seller APIs no longer return a country'sname. The seller SDK'sSellerCountryis now the generatedCountrytype, and the setup country list'slocalesare typed asLocaleCode[]. The dashboard and seller panel name and sort countries in the admin's own language.In
@spree/dashboard-core,CountryOptionno longer hasnameandcountryFilteris removed: name countries withuseCountryDisplayNameand sort them with the newuseSortByCountryName, which collates in the admin's language.#14852
525959dThanks @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. AddedsumMoney,subtractMoney,multiplyMoney,negateMoney,compareMoney,isZeroMoney,isDecimalStringanddecimalPlacesfor exact arithmetic on those strings. Currencies carrydecimal_places; prices no longer carryamount_in_centsorcompare_at_amount_in_cents; tax rates read and writerateandrate_percentinstead ofamountandamount_percentage.#14879
f184f25Thanks @damianlegawiec! - Methods that delete a record are nameddeletein both SDKs. In the Seller SDK,taxIdentifiers.remove,team.removeandinvitations.revokeare nowtaxIdentifiers.delete,team.deleteandinvitations.delete. In the Admin SDK,sellers.team.removeandsellers.invitations.removeare nowsellers.team.deleteandsellers.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.invitereturns theInvitation, andauth.providersreturnsAuthProvidersResponse.#14858
a90a9ccThanks @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 nowCustomFieldValueFilters, so it no longer hides the generated filters for custom field lists. The product digital files list now pages by 25 as intended.#14854
90af080Thanks @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,CollectionListParamsandOrderListParamskeep their names and are now generated; they no longer accept arbitrary keys. Filters an app adds through its own extensions can be sent unchecked insideq(list({ q: { erp_id_eq: 'ERP-1' } })), generated as declarations withspree filters types, or declared by hand by extending<Resource>FilterExtensionsand<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
5c1eeeeThanks @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.AddressParamsandCompanyAddressParamsin@spree/sdkstay as deprecated aliases until 6.1. The Admin SDK'sorders.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_atandverified_atare typedstring | null: a certificate that is still pending has no dates yet.#14853
3001ebfThanks @damianlegawiec! - Changed preferences to a typed contract. Every/…/typesentry returnsschema, the JSON Schema of the type'spreferences, instead ofpreference_schema, and rows no longer repeat it;PreferenceFieldandDeliveryPreferenceFieldare replaced byPreferenceSchema. Each configurable family's settings are typed pertype(PromotionRulePreferencesMap,TypedPromotionRule, …), and an extension adds its own by declaration merging. Store, channel, import and seller profile settings drop thepreferred_prefix (guest_checkout,timezone,delimiter), the store's decimal settings are strings, and delivery methods read and writecalculator: { type, preferences }. Preference writes are validated, refused withinvalid_preferencesand a JSON pointer per failing value.paymentMethods.types()lists every provider withinstalledset on those the store already has.#14871
6990f37Thanks @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 exampleVariantPriceis nowPriceParams,LineItemInputis nowLineItemInputParams). 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
CountryCodeandCurrencyCodeunions in both requests and responses. Deprecated fields are marked@deprecatedin the types; the Store SDK keeps them until 6.1, while the Admin and Seller SDKs drop them (addresscountry_iso/state_abbr, cartnumber, marketcountry_isos, importowner_type/owner_id, payment methodauto_capture).
1.0.0-rc.1
Minor Changes
#14837
3b80c52Thanks @damianlegawiec! - Changed every type value the APIs send or accept to a short name instead of a Ruby class name: delivery method, digital asset, payout, tax and pickup point providers (manual,internal,system,file), order routing strategies (rules), custom field definitionresource_type(product,category), tagtaggable_type, the owner and originator types on addresses, refunds and media usage, payment setup sessionpayment_source_type(credit_card), and type filters such astype_eqandreceivable_type_eq. Removedintegration_classfrom the provider listings and the deprecated custom fieldtypefield (usefield_type), and corrected the shipping labelowner_typetype to'fulfillment' | 'return'.#14799
c9d9a2fThanks @mad-eel! - Returns, claims and exchanges now give back the tax the customer paid. Return lines carryincluded_tax_total,additional_tax_total,tax_totalandrefund_amount(tax included), and returns carryrefund_tax_total. On a store whose prices include VAT, a return line'spre_tax_amountnow reads the price before tax rather than the gross price. Claim and exchange lines carry the tax on each half, tax lines name the return, claim or exchange line they belong to and whether they are acredit, Admin refunds carrytax_amount, and Seller order line items carryadditional_tax_total. Fees gain theexchangekind.#14776
9335e9fThanks @mad-eel! - Order line items now carrydiscounted_amountanddisplay_discounted_amount: what the customer paid for the line after discounts, which is also the most a claim on it can refund.#14780
95c27afThanks @damianlegawiec! -client.meis now an object: read the signed-in person withclient.me.get()and edit their own account — first and last name, photo (avatar: a direct-upload signed id, ornullto remove it) and the panel'sselected_locale— withclient.me.update(params).me.get()andme.update()returnuseras anAccount, which addsselected_localeto the fieldsTeamMemberhad.1.0.0-beta.3 made this change without keeping the old form, so code written against beta.1 or beta.2 failed with
client.me is not a function. Callingclient.me()works again and returns the same response asclient.me.get(), but it is deprecated and logs a one-timeconsole.warn. To migrate, replaceclient.me()withclient.me.get().#14763
53d9925Thanks @damianlegawiec! - Added runtime Zod schemas to the Admin and Seller SDKs, exported from@spree/admin-sdk/zodand@spree/seller-sdk/zod, matching what@spree/sdk/zodalready offers for the Store API. Schemas for inline objects, unions and records are now precise instead of accepting any value, which also tightens a few Store SDK schemas (cart warnings, payment sources, product filters).
Patch Changes
- #14839
446d3cbThanks @damianlegawiec! - Changed permission subjects to short names:/mereturnsproduct,category,customerinstead of Ruby class names, and theSubjectconstants,<Can>checks and navigationsubjectentries use the same names. Plugins that pass class names ('Spree::Order') topermissions.can,<Can>or a navigation entry must switch to the short name ('order') or aSubjectconstant. Category checks now work for roles without full access.
1.0.0-beta.3
Minor Changes
- #14736
e601826Thanks @damianlegawiec! - Invitation listings no longer includeacceptance_url, because the link carries the token that accepts the invitation. Fetch it on demand withinvitations.acceptanceLink(id)(andsellers.invitations.acceptanceLink(sellerId, id)in the Admin SDK), which needs write access. The "Copy invitation link" actions in the dashboard and the seller panel now use it.
1.0.0-beta.2
Patch Changes
- Released alongside the dashboard packages it is versioned with.
1.0.0-beta.1
Patch Changes
- #14593
0f22450Thanks @Hemang-ai! - Preserve HTTP error statuses when a server returns an empty, non-JSON, or malformed error body. Avoid treating these responses as network failures, and allow admin and seller session recovery to handle unauthorized responses.