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
Allow company users to use company addresses (#14911)
Kacper Mękarski3ca1f5e32f2e
diff --git a/.changeset/company-addresses-at-checkout.md b/.changeset/company-addresses-at-checkout.mdnew file mode 100644index 0000000000..6e3608172c--- /dev/null+++ b/.changeset/company-addresses-at-checkout.md@@ -0,0 +1,8 @@+---+"@spree/sdk": minor+"@spree/admin-sdk": minor+"@spree/dashboard": minor+"@spree/dashboard-ui": minor+---++Company members can now pick their company's addresses when choosing where an order goes. Picking a company site at checkout used to be dropped without an error, because the cart only ever looked in the buyer's own address book. A new `GET /store/carts/:id/addresses` returns everything a cart may be shipped or billed to — the buyer's book plus the sites of the company set as the cart's `company_id` and the ones it inherits, limited to the countries the cart's market sells to — and `client.carts.addresses.list()` reaches it. The company has to be set on the cart explicitly: a buyer who belongs to a single company is not assumed to be buying for it when it comes to addresses. Every `Address` now carries the `owner` it is filed under (`null` for an address in no book, such as the copy a placed order keeps), so a picker can label the two books from one response. On the Admin API this `owner` object replaces the separate `owner_id` and `owner_type` fields. Unlike the other cart endpoints this one needs a signed-in customer: it answers with the account's address books rather than the cart's own contents. Staff get the same reach: a company's sites are selectable when creating an order, and "use default addresses" takes the company's defaults for a company order. On a division's page, addresses inherited from the companies above it are labelled with their owner and cannot be edited there.diff --git a/docs/api-reference/admin.yaml b/docs/api-reference/admin.yamlindex 55673c02eb..e14853819e 100644--- a/docs/api-reference/admin.yaml+++ b/docs/api-reference/admin.yaml@@ -6614,14 +6614,16 @@ paths:is_default_billing: falseis_default_shipping: falsestate_name: New York+ owner:+ id: cust_UkLWZg9DAJ+ type: customer+ name:metadata: {}created_at: '2026-01-15T12:00:00.000Z'updated_at: '2026-01-15T12:00:00.000Z'latitude:longitude:customer_id: cust_UkLWZg9DAJ- owner_id: cust_UkLWZg9DAJ- owner_type: customermeta:page: 1limit: 25@@ -6712,14 +6714,16 @@ paths:is_default_billing: falseis_default_shipping: falsestate_name: New York+ owner:+ id: cust_UkLWZg9DAJ+ type: customer+ name:metadata: {}created_at: '2026-01-15T12:00:00.000Z'updated_at: '2026-01-15T12:00:00.000Z'latitude:longitude:customer_id: cust_UkLWZg9DAJ- owner_id: cust_UkLWZg9DAJ- owner_type: customerrequestBody:content:application/json:@@ -6801,14 +6805,16 @@ paths:is_default_billing: falseis_default_shipping: falsestate_name: New York+ owner:+ id: cust_UkLWZg9DAJ+ type: customer+ name:metadata: {}created_at: '2026-01-15T12:00:00.000Z'updated_at: '2026-01-15T12:00:00.000Z'latitude:longitude:customer_id: cust_UkLWZg9DAJ- owner_id: cust_UkLWZg9DAJ- owner_type: customerrequestBody:content:application/json:@@ -10202,7 +10208,7 @@ paths:content:application/json:example:- signed_id: eyJfcmFpbHMiOnsiZGF0YSI6MSwiZXhwIjoiMjAyNi0wMS0xNlQxMjowMDowMC4wMDBaIiwicHVyIjoiYmxvYl9pZCJ9fQ==--3f8bec6f6c76d54da7993efa8940c4e929b71478+ signed_id: eyJfcmFpbHMiOnsiZGF0YSI6MSwiZXhwIjoiMjAyNi0wMS0xNlQxMjowMDowMC4wMDBaIiwicHVyIjoiYmxvYl9pZCJ9fQ==--a9cd29e72a70654182038480207bd929343f6a07filename: products.csvcontent_type: text/csvbyte_size: 48213@@ -10210,7 +10216,7 @@ paths:expires_at: '2026-01-16T12:00:00.000Z'upload:method: PUT- url: http://www.example.com/rails/active_storage/disk/eyJfcmFpbHMiOnsiZGF0YSI6eyJrZXkiOiJxcmZsMnNod3YwYmR4cWF3ZWFocDZvYjhlYzh5IiwiY29udGVudF90eXBlIjoidGV4dC9jc3YiLCJjb250ZW50X2xlbmd0aCI6NDgyMTMsImNoZWNrc3VtIjoiaGdKTXJSNkRFQjJYTloxelVRVVJWZz09Iiwic2VydmljZV9uYW1lIjoidGVzdCJ9LCJleHAiOiIyMDI2LTAxLTE1VDEyOjA1OjAwLjAwMFoiLCJwdXIiOiJibG9iX3Rva2VuIn19--a294aa361a67bf05482ee35d5a92f7bda8903373+ url: http://www.example.com/rails/active_storage/disk/eyJfcmFpbHMiOnsiZGF0YSI6eyJrZXkiOiJxcmZsMnNod3YwYmR4cWF3ZWFocDZvYjhlYzh5IiwiY29udGVudF90eXBlIjoidGV4dC9jc3YiLCJjb250ZW50X2xlbmd0aCI6NDgyMTMsImNoZWNrc3VtIjoiaGdKTXJSNkRFQjJYTloxelVRVVJWZz09Iiwic2VydmljZV9uYW1lIjoidGVzdCJ9LCJleHAiOiIyMDI2LTAxLTE1VDEyOjA1OjAwLjAwMFoiLCJwdXIiOiJibG9iX3Rva2VuIn19--d4e8daa252ef4ddb8e82ab74394aab7d435572echeaders:Content-Type: text/csvschema:@@ -19142,7 +19148,7 @@ paths:market_id: mkt_UkLWZg9DAJwithdrawal_period_ends_at:within_withdrawal_period: false- shipping_eq_billing_address: true+ shipping_eq_billing_address: falsecart_id:channel_id: ch_UkLWZg9DAJcompany_id:@@ -23964,7 +23970,7 @@ paths:updated_at: '2026-01-15T12:00:00.000Z'provider_type:provider_name: File- download_url: http://www.example.com/rails/active_storage/disk/eyJfcmFpbHMiOnsiZGF0YSI6eyJrZXkiOiJ0Z252N2l0MG55YnkwbHhkczg5Y2hteTd6aXlvIiwiZGlzcG9zaXRpb24iOiJhdHRhY2htZW50OyBmaWxlbmFtZT1cInRoaW5raW5nLWNhdC5qcGdcIjsgZmlsZW5hbWUqPVVURi04Jyd0aGlua2luZy1jYXQuanBnIiwiY29udGVudF90eXBlIjoiaW1hZ2UvanBlZyIsInNlcnZpY2VfbmFtZSI6InRlc3QifSwiZXhwIjoiMjAyNi0wMS0xNVQxMjowNTowMC4wMDBaIiwicHVyIjoiYmxvYl9rZXkifX0=--ead0f2ac81a0f7ac756847931f8e1927ea68ba81/thinking-cat.jpg+ download_url: http://www.example.com/rails/active_storage/disk/eyJfcmFpbHMiOnsiZGF0YSI6eyJrZXkiOiJ0Z252N2l0MG55YnkwbHhkczg5Y2hteTd6aXlvIiwiZGlzcG9zaXRpb24iOiJhdHRhY2htZW50OyBmaWxlbmFtZT1cInRoaW5raW5nLWNhdC5qcGdcIjsgZmlsZW5hbWUqPVVURi04Jyd0aGlua2luZy1jYXQuanBnIiwiY29udGVudF90eXBlIjoiaW1hZ2UvanBlZyIsInNlcnZpY2VfbmFtZSI6InRlc3QifSwiZXhwIjoiMjAyNi0wMS0xNVQxMjowNTowMC4wMDBaIiwicHVyIjoiYmxvYl9rZXkifX0=--5d2a25a4ad70f44888bbbd044a07502208e6c914/thinking-cat.jpgeffective_authorized_clicks: 5effective_authorized_days: 7meta:@@ -24055,7 +24061,7 @@ paths:updated_at: '2026-01-15T12:00:00.000Z'provider_type:provider_name: File- download_url: http://www.example.com/rails/active_storage/disk/eyJfcmFpbHMiOnsiZGF0YSI6eyJrZXkiOiJhOXR0cGNpbmxxbThvbmtlNHM1NmI2Y3gxMWVzIiwiZGlzcG9zaXRpb24iOiJhdHRhY2htZW50OyBmaWxlbmFtZT1cIm1hbnVhbC5wZGZcIjsgZmlsZW5hbWUqPVVURi04JydtYW51YWwucGRmIiwiY29udGVudF90eXBlIjoiaW1hZ2UvanBlZyIsInNlcnZpY2VfbmFtZSI6InRlc3QifSwiZXhwIjoiMjAyNi0wMS0xNVQxMjowNTowMC4wMDBaIiwicHVyIjoiYmxvYl9rZXkifX0=--73db409a7ac92c07e323ae2157b9daa88b6b8921/manual.pdf+ download_url: http://www.example.com/rails/active_storage/disk/eyJfcmFpbHMiOnsiZGF0YSI6eyJrZXkiOiJhOXR0cGNpbmxxbThvbmtlNHM1NmI2Y3gxMWVzIiwiZGlzcG9zaXRpb24iOiJhdHRhY2htZW50OyBmaWxlbmFtZT1cIm1hbnVhbC5wZGZcIjsgZmlsZW5hbWUqPVVURi04JydtYW51YWwucGRmIiwiY29udGVudF90eXBlIjoiaW1hZ2UvanBlZyIsInNlcnZpY2VfbmFtZSI6InRlc3QifSwiZXhwIjoiMjAyNi0wMS0xNVQxMjowNTowMC4wMDBaIiwicHVyIjoiYmxvYl9rZXkifX0=--d2ff844668d772f5c118d6f435e5d6e2d651ff9a/manual.pdfeffective_authorized_clicks: 5effective_authorized_days: 30schema:@@ -24144,7 +24150,7 @@ paths:updated_at: '2026-01-15T12:00:00.000Z'provider_type:provider_name: File- download_url: http://www.example.com/rails/active_storage/disk/eyJfcmFpbHMiOnsiZGF0YSI6eyJrZXkiOiIwZXp6d3IzMzE3ajRoem9kc3Awc2czN3EzMnhzIiwiZGlzcG9zaXRpb24iOiJhdHRhY2htZW50OyBmaWxlbmFtZT1cInRoaW5raW5nLWNhdC5qcGdcIjsgZmlsZW5hbWUqPVVURi04Jyd0aGlua2luZy1jYXQuanBnIiwiY29udGVudF90eXBlIjoiaW1hZ2UvanBlZyIsInNlcnZpY2VfbmFtZSI6InRlc3QifSwiZXhwIjoiMjAyNi0wMS0xNVQxMjowNTowMC4wMDBaIiwicHVyIjoiYmxvYl9rZXkifX0=--d1a701884ca72f5d076bf8fe63cdd083f0bed7bd/thinking-cat.jpg+ download_url: http://www.example.com/rails/active_storage/disk/eyJfcmFpbHMiOnsiZGF0YSI6eyJrZXkiOiIwZXp6d3IzMzE3ajRoem9kc3Awc2czN3EzMnhzIiwiZGlzcG9zaXRpb24iOiJhdHRhY2htZW50OyBmaWxlbmFtZT1cInRoaW5raW5nLWNhdC5qcGdcIjsgZmlsZW5hbWUqPVVURi04Jyd0aGlua2luZy1jYXQuanBnIiwiY29udGVudF90eXBlIjoiaW1hZ2UvanBlZyIsInNlcnZpY2VfbmFtZSI6InRlc3QifSwiZXhwIjoiMjAyNi0wMS0xNVQxMjowNTowMC4wMDBaIiwicHVyIjoiYmxvYl9rZXkifX0=--a93638ab3e9ff88b2fee8f3b0d650f8cad8787d7/thinking-cat.jpgeffective_authorized_clicks: 10effective_authorized_days: 7schema:@@ -41864,14 +41870,16 @@ paths:is_default_billing: falseis_default_shipping: falsestate_name: New York+ owner:+ id: comp_UkLWZg9DAJ+ type: company+ name: Acme Corp 3metadata: {}created_at: '2026-01-15T12:00:00.000Z'updated_at: '2026-01-15T12:00:00.000Z'latitude:longitude:customer_id:- owner_id: comp_UkLWZg9DAJ- owner_type: companymeta:page: 1limit: 25@@ -41975,14 +41983,16 @@ paths:is_default_billing: falseis_default_shipping: truestate_name: New York+ owner:+ id: comp_UkLWZg9DAJ+ type: company+ name: Acme Corp 4metadata: {}created_at: '2026-01-15T12:00:00.000Z'updated_at: '2026-01-15T12:00:00.000Z'latitude:longitude:customer_id:- owner_id: comp_UkLWZg9DAJ- owner_type: companyschema:"$ref": "#/components/schemas/Address"requestBody:@@ -42068,14 +42078,16 @@ paths:is_default_billing: trueis_default_shipping: falsestate_name: New York+ owner:+ id: comp_UkLWZg9DAJ+ type: company+ name: Acme Corp 5metadata: {}created_at: '2026-01-15T12:00:00.000Z'updated_at: '2026-01-15T12:00:00.000Z'latitude:longitude:customer_id:- owner_id: comp_UkLWZg9DAJ- owner_type: companyschema:"$ref": "#/components/schemas/Address"requestBody:@@ -46578,13 +46590,13 @@ paths:video_embed_url:video_url:poster_url:- original_url: http://localhost:3000/rails/active_storage/blobs/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/thinking-cat.jpg- mini_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsxMjgsMTI4XSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--b7d4163e56d2e1c1224b82fcbf29c6d389418c35/thinking-cat.jpg- small_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsyNTYsMjU2XSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--1e4e9e92ff0d575e068b03d2347f9e63c034c7f0/thinking-cat.jpg- medium_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOls0MDAsNDAwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--e3cb86219678c00b3174ca00c64f04641a1742a5/thinking-cat.jpg- large_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOls3MjAsNzIwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--5abf9aeeafa5e725cf201c0560614c9317e73c8c/thinking-cat.jpg- xlarge_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsyMDAwLDIwMDBdLCJzYXZlciI6eyJzdHJpcCI6dHJ1ZSwicXVhbGl0eSI6NzUsImxvc3NsZXNzIjpmYWxzZSwiYWxwaGFfcSI6ODUsInJlZHVjdGlvbl9lZmZvcnQiOjYsInNtYXJ0X3N1YnNhbXBsZSI6dHJ1ZX19LCJwdXIiOiJ2YXJpYXRpb24ifX0=--5db1bd36ac712fe3dc607583f4ab31ecdf3a1f21/thinking-cat.jpg- og_image_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsxMjAwLDYzMF0sInNhdmVyIjp7InN0cmlwIjp0cnVlLCJxdWFsaXR5Ijo3NSwibG9zc2xlc3MiOmZhbHNlLCJhbHBoYV9xIjo4NSwicmVkdWN0aW9uX2VmZm9ydCI6Niwic21hcnRfc3Vic2FtcGxlIjp0cnVlfX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--04f02fc0aba9c7fed646166193caa31a9a247344/thinking-cat.jpg+ original_url: http://localhost:3000/rails/active_storage/blobs/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/thinking-cat.jpg+ mini_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsxMjgsMTI4XSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--4360105231729cff27f4227ea4304fac7e08a65e/thinking-cat.jpg+ small_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsyNTYsMjU2XSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--bba92085e6437e846cd0b9fca8d58f9c0b723eba/thinking-cat.jpg+ medium_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOls0MDAsNDAwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--242625616b48cff11334ec85f04b68042261f208/thinking-cat.jpg+ large_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOls3MjAsNzIwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--0fa218972b6a0c500c744b36fcd9fee8a0b3e995/thinking-cat.jpg+ xlarge_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsyMDAwLDIwMDBdLCJzYXZlciI6eyJzdHJpcCI6dHJ1ZSwicXVhbGl0eSI6NzUsImxvc3NsZXNzIjpmYWxzZSwiYWxwaGFfcSI6ODUsInJlZHVjdGlvbl9lZmZvcnQiOjYsInNtYXJ0X3N1YnNhbXBsZSI6dHJ1ZX19LCJwdXIiOiJ2YXJpYXRpb24ifX0=--4d30e1109a0549e5024fddaecdff7a8eb271730d/thinking-cat.jpg+ og_image_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsxMjAwLDYzMF0sInNhdmVyIjp7InN0cmlwIjp0cnVlLCJxdWFsaXR5Ijo3NSwibG9zc2xlc3MiOmZhbHNlLCJhbHBoYV9xIjo4NSwicmVkdWN0aW9uX2VmZm9ydCI6Niwic21hcnRfc3Vic2FtcGxlIjp0cnVlfX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--24a2fdb966aceb15786df6c2f570db0d2624d262/thinking-cat.jpgexternal_references: {}created_at: '2026-01-15T12:00:00.000Z'updated_at: '2026-01-15T12:00:00.000Z'@@ -46592,10 +46604,10 @@ paths:filename: thinking-cat.jpgcontent_type: image/jpegbyte_size: 18090- embed_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2xpbWl0IjpbMTIwMCwxMjAwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--11e07b486f19a616a54cd5b6e644a9a09062da00/thinking-cat.jpg- signed_id: eyJfcmFpbHMiOnsiZGF0YSI6MSwiZXhwIjoiMjAyNi0wMS0xNlQxMjowMDowMC4wMDBaIiwicHVyIjoiYmxvYl9pZCJ9fQ==--3f8bec6f6c76d54da7993efa8940c4e929b71478+ embed_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2xpbWl0IjpbMTIwMCwxMjAwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--67e4c38f8d0453b5c5c0d3d44862a9d1bd79c07c/thinking-cat.jpg+ signed_id: eyJfcmFpbHMiOnsiZGF0YSI6MSwiZXhwIjoiMjAyNi0wMS0xNlQxMjowMDowMC4wMDBaIiwicHVyIjoiYmxvYl9pZCJ9fQ==--a9cd29e72a70654182038480207bd929343f6a07viewable_id: prod_UkLWZg9DAJ- download_url: http://localhost:3000/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/thinking-cat.jpg?disposition=attachment+ download_url: http://localhost:3000/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/thinking-cat.jpg?disposition=attachmentmetadata: {}viewable_type: productmeta:@@ -46686,13 +46698,13 @@ paths:video_embed_url:video_url:poster_url:- original_url: http://localhost:3000/rails/active_storage/blobs/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MiwicHVyIjoiYmxvYl9pZCJ9fQ==--719bfa956a3578a33855c517211e1a484db6a78a/library-upload.jpg- mini_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MiwicHVyIjoiYmxvYl9pZCJ9fQ==--719bfa956a3578a33855c517211e1a484db6a78a/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsxMjgsMTI4XSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--b7d4163e56d2e1c1224b82fcbf29c6d389418c35/library-upload.jpg- small_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MiwicHVyIjoiYmxvYl9pZCJ9fQ==--719bfa956a3578a33855c517211e1a484db6a78a/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsyNTYsMjU2XSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--1e4e9e92ff0d575e068b03d2347f9e63c034c7f0/library-upload.jpg- medium_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MiwicHVyIjoiYmxvYl9pZCJ9fQ==--719bfa956a3578a33855c517211e1a484db6a78a/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOls0MDAsNDAwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--e3cb86219678c00b3174ca00c64f04641a1742a5/library-upload.jpg- large_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MiwicHVyIjoiYmxvYl9pZCJ9fQ==--719bfa956a3578a33855c517211e1a484db6a78a/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOls3MjAsNzIwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--5abf9aeeafa5e725cf201c0560614c9317e73c8c/library-upload.jpg- xlarge_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MiwicHVyIjoiYmxvYl9pZCJ9fQ==--719bfa956a3578a33855c517211e1a484db6a78a/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsyMDAwLDIwMDBdLCJzYXZlciI6eyJzdHJpcCI6dHJ1ZSwicXVhbGl0eSI6NzUsImxvc3NsZXNzIjpmYWxzZSwiYWxwaGFfcSI6ODUsInJlZHVjdGlvbl9lZmZvcnQiOjYsInNtYXJ0X3N1YnNhbXBsZSI6dHJ1ZX19LCJwdXIiOiJ2YXJpYXRpb24ifX0=--5db1bd36ac712fe3dc607583f4ab31ecdf3a1f21/library-upload.jpg- og_image_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MiwicHVyIjoiYmxvYl9pZCJ9fQ==--719bfa956a3578a33855c517211e1a484db6a78a/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsxMjAwLDYzMF0sInNhdmVyIjp7InN0cmlwIjp0cnVlLCJxdWFsaXR5Ijo3NSwibG9zc2xlc3MiOmZhbHNlLCJhbHBoYV9xIjo4NSwicmVkdWN0aW9uX2VmZm9ydCI6Niwic21hcnRfc3Vic2FtcGxlIjp0cnVlfX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--04f02fc0aba9c7fed646166193caa31a9a247344/library-upload.jpg+ original_url: http://localhost:3000/rails/active_storage/blobs/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MiwicHVyIjoiYmxvYl9pZCJ9fQ==--d46768bb9ae5b1c086c4952a77e29e46b5a9627b/library-upload.jpg+ mini_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MiwicHVyIjoiYmxvYl9pZCJ9fQ==--d46768bb9ae5b1c086c4952a77e29e46b5a9627b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsxMjgsMTI4XSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--4360105231729cff27f4227ea4304fac7e08a65e/library-upload.jpg+ small_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MiwicHVyIjoiYmxvYl9pZCJ9fQ==--d46768bb9ae5b1c086c4952a77e29e46b5a9627b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsyNTYsMjU2XSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--bba92085e6437e846cd0b9fca8d58f9c0b723eba/library-upload.jpg+ medium_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MiwicHVyIjoiYmxvYl9pZCJ9fQ==--d46768bb9ae5b1c086c4952a77e29e46b5a9627b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOls0MDAsNDAwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--242625616b48cff11334ec85f04b68042261f208/library-upload.jpg+ large_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MiwicHVyIjoiYmxvYl9pZCJ9fQ==--d46768bb9ae5b1c086c4952a77e29e46b5a9627b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOls3MjAsNzIwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--0fa218972b6a0c500c744b36fcd9fee8a0b3e995/library-upload.jpg+ xlarge_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MiwicHVyIjoiYmxvYl9pZCJ9fQ==--d46768bb9ae5b1c086c4952a77e29e46b5a9627b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsyMDAwLDIwMDBdLCJzYXZlciI6eyJzdHJpcCI6dHJ1ZSwicXVhbGl0eSI6NzUsImxvc3NsZXNzIjpmYWxzZSwiYWxwaGFfcSI6ODUsInJlZHVjdGlvbl9lZmZvcnQiOjYsInNtYXJ0X3N1YnNhbXBsZSI6dHJ1ZX19LCJwdXIiOiJ2YXJpYXRpb24ifX0=--4d30e1109a0549e5024fddaecdff7a8eb271730d/library-upload.jpg+ og_image_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MiwicHVyIjoiYmxvYl9pZCJ9fQ==--d46768bb9ae5b1c086c4952a77e29e46b5a9627b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsxMjAwLDYzMF0sInNhdmVyIjp7InN0cmlwIjp0cnVlLCJxdWFsaXR5Ijo3NSwibG9zc2xlc3MiOmZhbHNlLCJhbHBoYV9xIjo4NSwicmVkdWN0aW9uX2VmZm9ydCI6Niwic21hcnRfc3Vic2FtcGxlIjp0cnVlfX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--24a2fdb966aceb15786df6c2f570db0d2624d262/library-upload.jpgexternal_references: {}created_at: '2026-01-15T12:00:00.000Z'updated_at: '2026-01-15T12:00:00.000Z'@@ -46700,10 +46712,10 @@ paths:filename: library-upload.jpgcontent_type: image/jpegbyte_size: 18090- embed_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MiwicHVyIjoiYmxvYl9pZCJ9fQ==--719bfa956a3578a33855c517211e1a484db6a78a/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2xpbWl0IjpbMTIwMCwxMjAwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--11e07b486f19a616a54cd5b6e644a9a09062da00/library-upload.jpg- signed_id: eyJfcmFpbHMiOnsiZGF0YSI6MiwiZXhwIjoiMjAyNi0wMS0xNlQxMjowMDowMC4wMDBaIiwicHVyIjoiYmxvYl9pZCJ9fQ==--3b8702b07c49f5c3b0de775f88f23bfead0d5834+ embed_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MiwicHVyIjoiYmxvYl9pZCJ9fQ==--d46768bb9ae5b1c086c4952a77e29e46b5a9627b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2xpbWl0IjpbMTIwMCwxMjAwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--67e4c38f8d0453b5c5c0d3d44862a9d1bd79c07c/library-upload.jpg+ signed_id: eyJfcmFpbHMiOnsiZGF0YSI6MiwiZXhwIjoiMjAyNi0wMS0xNlQxMjowMDowMC4wMDBaIiwicHVyIjoiYmxvYl9pZCJ9fQ==--9d1feef473c267b5baf61ca104925f9833f26b25viewable_id:- download_url: http://localhost:3000/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MiwicHVyIjoiYmxvYl9pZCJ9fQ==--719bfa956a3578a33855c517211e1a484db6a78a/library-upload.jpg?disposition=attachment+ download_url: http://localhost:3000/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MiwicHVyIjoiYmxvYl9pZCJ9fQ==--d46768bb9ae5b1c086c4952a77e29e46b5a9627b/library-upload.jpg?disposition=attachmentmetadata: {}viewable_type:schema:@@ -46781,13 +46793,13 @@ paths:video_embed_url:video_url:poster_url:- original_url: http://localhost:3000/rails/active_storage/blobs/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/thinking-cat.jpg- mini_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsxMjgsMTI4XSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--b7d4163e56d2e1c1224b82fcbf29c6d389418c35/thinking-cat.jpg- small_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsyNTYsMjU2XSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--1e4e9e92ff0d575e068b03d2347f9e63c034c7f0/thinking-cat.jpg- medium_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOls0MDAsNDAwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--e3cb86219678c00b3174ca00c64f04641a1742a5/thinking-cat.jpg- large_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOls3MjAsNzIwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--5abf9aeeafa5e725cf201c0560614c9317e73c8c/thinking-cat.jpg- xlarge_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsyMDAwLDIwMDBdLCJzYXZlciI6eyJzdHJpcCI6dHJ1ZSwicXVhbGl0eSI6NzUsImxvc3NsZXNzIjpmYWxzZSwiYWxwaGFfcSI6ODUsInJlZHVjdGlvbl9lZmZvcnQiOjYsInNtYXJ0X3N1YnNhbXBsZSI6dHJ1ZX19LCJwdXIiOiJ2YXJpYXRpb24ifX0=--5db1bd36ac712fe3dc607583f4ab31ecdf3a1f21/thinking-cat.jpg- og_image_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsxMjAwLDYzMF0sInNhdmVyIjp7InN0cmlwIjp0cnVlLCJxdWFsaXR5Ijo3NSwibG9zc2xlc3MiOmZhbHNlLCJhbHBoYV9xIjo4NSwicmVkdWN0aW9uX2VmZm9ydCI6Niwic21hcnRfc3Vic2FtcGxlIjp0cnVlfX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--04f02fc0aba9c7fed646166193caa31a9a247344/thinking-cat.jpg+ original_url: http://localhost:3000/rails/active_storage/blobs/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/thinking-cat.jpg+ mini_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsxMjgsMTI4XSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--4360105231729cff27f4227ea4304fac7e08a65e/thinking-cat.jpg+ small_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsyNTYsMjU2XSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--bba92085e6437e846cd0b9fca8d58f9c0b723eba/thinking-cat.jpg+ medium_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOls0MDAsNDAwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--242625616b48cff11334ec85f04b68042261f208/thinking-cat.jpg+ large_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOls3MjAsNzIwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--0fa218972b6a0c500c744b36fcd9fee8a0b3e995/thinking-cat.jpg+ xlarge_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsyMDAwLDIwMDBdLCJzYXZlciI6eyJzdHJpcCI6dHJ1ZSwicXVhbGl0eSI6NzUsImxvc3NsZXNzIjpmYWxzZSwiYWxwaGFfcSI6ODUsInJlZHVjdGlvbl9lZmZvcnQiOjYsInNtYXJ0X3N1YnNhbXBsZSI6dHJ1ZX19LCJwdXIiOiJ2YXJpYXRpb24ifX0=--4d30e1109a0549e5024fddaecdff7a8eb271730d/thinking-cat.jpg+ og_image_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsxMjAwLDYzMF0sInNhdmVyIjp7InN0cmlwIjp0cnVlLCJxdWFsaXR5Ijo3NSwibG9zc2xlc3MiOmZhbHNlLCJhbHBoYV9xIjo4NSwicmVkdWN0aW9uX2VmZm9ydCI6Niwic21hcnRfc3Vic2FtcGxlIjp0cnVlfX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--24a2fdb966aceb15786df6c2f570db0d2624d262/thinking-cat.jpgexternal_references: {}created_at: '2026-01-15T12:00:00.000Z'updated_at: '2026-01-15T12:00:00.000Z'@@ -46795,10 +46807,10 @@ paths:filename: thinking-cat.jpgcontent_type: image/jpegbyte_size: 18090- embed_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2xpbWl0IjpbMTIwMCwxMjAwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--11e07b486f19a616a54cd5b6e644a9a09062da00/thinking-cat.jpg- signed_id: eyJfcmFpbHMiOnsiZGF0YSI6MSwiZXhwIjoiMjAyNi0wMS0xNlQxMjowMDowMC4wMDBaIiwicHVyIjoiYmxvYl9pZCJ9fQ==--3f8bec6f6c76d54da7993efa8940c4e929b71478+ embed_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2xpbWl0IjpbMTIwMCwxMjAwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--67e4c38f8d0453b5c5c0d3d44862a9d1bd79c07c/thinking-cat.jpg+ signed_id: eyJfcmFpbHMiOnsiZGF0YSI6MSwiZXhwIjoiMjAyNi0wMS0xNlQxMjowMDowMC4wMDBaIiwicHVyIjoiYmxvYl9pZCJ9fQ==--a9cd29e72a70654182038480207bd929343f6a07viewable_id: prod_UkLWZg9DAJ- download_url: http://localhost:3000/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/thinking-cat.jpg?disposition=attachment+ download_url: http://localhost:3000/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/thinking-cat.jpg?disposition=attachmentmetadata: {}viewable_type: productschema:@@ -47032,13 +47044,13 @@ paths:video_embed_url:video_url:poster_url:- original_url: http://localhost:3000/rails/active_storage/blobs/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/thinking-cat.jpg- mini_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsxMjgsMTI4XSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--b7d4163e56d2e1c1224b82fcbf29c6d389418c35/thinking-cat.jpg- small_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsyNTYsMjU2XSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--1e4e9e92ff0d575e068b03d2347f9e63c034c7f0/thinking-cat.jpg- medium_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOls0MDAsNDAwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--e3cb86219678c00b3174ca00c64f04641a1742a5/thinking-cat.jpg- large_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOls3MjAsNzIwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--5abf9aeeafa5e725cf201c0560614c9317e73c8c/thinking-cat.jpg- xlarge_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsyMDAwLDIwMDBdLCJzYXZlciI6eyJzdHJpcCI6dHJ1ZSwicXVhbGl0eSI6NzUsImxvc3NsZXNzIjpmYWxzZSwiYWxwaGFfcSI6ODUsInJlZHVjdGlvbl9lZmZvcnQiOjYsInNtYXJ0X3N1YnNhbXBsZSI6dHJ1ZX19LCJwdXIiOiJ2YXJpYXRpb24ifX0=--5db1bd36ac712fe3dc607583f4ab31ecdf3a1f21/thinking-cat.jpg- og_image_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsxMjAwLDYzMF0sInNhdmVyIjp7InN0cmlwIjp0cnVlLCJxdWFsaXR5Ijo3NSwibG9zc2xlc3MiOmZhbHNlLCJhbHBoYV9xIjo4NSwicmVkdWN0aW9uX2VmZm9ydCI6Niwic21hcnRfc3Vic2FtcGxlIjp0cnVlfX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--04f02fc0aba9c7fed646166193caa31a9a247344/thinking-cat.jpg+ original_url: http://localhost:3000/rails/active_storage/blobs/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/thinking-cat.jpg+ mini_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsxMjgsMTI4XSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--4360105231729cff27f4227ea4304fac7e08a65e/thinking-cat.jpg+ small_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsyNTYsMjU2XSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--bba92085e6437e846cd0b9fca8d58f9c0b723eba/thinking-cat.jpg+ medium_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOls0MDAsNDAwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--242625616b48cff11334ec85f04b68042261f208/thinking-cat.jpg+ large_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOls3MjAsNzIwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--0fa218972b6a0c500c744b36fcd9fee8a0b3e995/thinking-cat.jpg+ xlarge_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsyMDAwLDIwMDBdLCJzYXZlciI6eyJzdHJpcCI6dHJ1ZSwicXVhbGl0eSI6NzUsImxvc3NsZXNzIjpmYWxzZSwiYWxwaGFfcSI6ODUsInJlZHVjdGlvbl9lZmZvcnQiOjYsInNtYXJ0X3N1YnNhbXBsZSI6dHJ1ZX19LCJwdXIiOiJ2YXJpYXRpb24ifX0=--4d30e1109a0549e5024fddaecdff7a8eb271730d/thinking-cat.jpg+ og_image_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsxMjAwLDYzMF0sInNhdmVyIjp7InN0cmlwIjp0cnVlLCJxdWFsaXR5Ijo3NSwibG9zc2xlc3MiOmZhbHNlLCJhbHBoYV9xIjo4NSwicmVkdWN0aW9uX2VmZm9ydCI6Niwic21hcnRfc3Vic2FtcGxlIjp0cnVlfX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--24a2fdb966aceb15786df6c2f570db0d2624d262/thinking-cat.jpgexternal_references: {}created_at: '2026-01-15T12:00:00.000Z'updated_at: '2026-01-15T12:00:00.000Z'@@ -47046,10 +47058,10 @@ paths:filename: thinking-cat.jpgcontent_type: image/jpegbyte_size: 18090- embed_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2xpbWl0IjpbMTIwMCwxMjAwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--11e07b486f19a616a54cd5b6e644a9a09062da00/thinking-cat.jpg- signed_id: eyJfcmFpbHMiOnsiZGF0YSI6MSwiZXhwIjoiMjAyNi0wMS0xNlQxMjowMDowMC4wMDBaIiwicHVyIjoiYmxvYl9pZCJ9fQ==--3f8bec6f6c76d54da7993efa8940c4e929b71478+ embed_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2xpbWl0IjpbMTIwMCwxMjAwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--67e4c38f8d0453b5c5c0d3d44862a9d1bd79c07c/thinking-cat.jpg+ signed_id: eyJfcmFpbHMiOnsiZGF0YSI6MSwiZXhwIjoiMjAyNi0wMS0xNlQxMjowMDowMC4wMDBaIiwicHVyIjoiYmxvYl9pZCJ9fQ==--a9cd29e72a70654182038480207bd929343f6a07viewable_id: prod_UkLWZg9DAJ- download_url: http://localhost:3000/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/thinking-cat.jpg?disposition=attachment+ download_url: http://localhost:3000/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/thinking-cat.jpg?disposition=attachmentmetadata: {}viewable_type: productmeta:@@ -47140,13 +47152,13 @@ paths:video_embed_url:video_url:poster_url:- original_url: http://localhost:3000/rails/active_storage/blobs/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/thinking-cat.jpg- mini_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsxMjgsMTI4XSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--b7d4163e56d2e1c1224b82fcbf29c6d389418c35/thinking-cat.jpg- small_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsyNTYsMjU2XSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--1e4e9e92ff0d575e068b03d2347f9e63c034c7f0/thinking-cat.jpg- medium_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOls0MDAsNDAwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--e3cb86219678c00b3174ca00c64f04641a1742a5/thinking-cat.jpg- large_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOls3MjAsNzIwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--5abf9aeeafa5e725cf201c0560614c9317e73c8c/thinking-cat.jpg- xlarge_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsyMDAwLDIwMDBdLCJzYXZlciI6eyJzdHJpcCI6dHJ1ZSwicXVhbGl0eSI6NzUsImxvc3NsZXNzIjpmYWxzZSwiYWxwaGFfcSI6ODUsInJlZHVjdGlvbl9lZmZvcnQiOjYsInNtYXJ0X3N1YnNhbXBsZSI6dHJ1ZX19LCJwdXIiOiJ2YXJpYXRpb24ifX0=--5db1bd36ac712fe3dc607583f4ab31ecdf3a1f21/thinking-cat.jpg- og_image_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsxMjAwLDYzMF0sInNhdmVyIjp7InN0cmlwIjp0cnVlLCJxdWFsaXR5Ijo3NSwibG9zc2xlc3MiOmZhbHNlLCJhbHBoYV9xIjo4NSwicmVkdWN0aW9uX2VmZm9ydCI6Niwic21hcnRfc3Vic2FtcGxlIjp0cnVlfX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--04f02fc0aba9c7fed646166193caa31a9a247344/thinking-cat.jpg+ original_url: http://localhost:3000/rails/active_storage/blobs/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/thinking-cat.jpg+ mini_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsxMjgsMTI4XSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--4360105231729cff27f4227ea4304fac7e08a65e/thinking-cat.jpg+ small_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsyNTYsMjU2XSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--bba92085e6437e846cd0b9fca8d58f9c0b723eba/thinking-cat.jpg+ medium_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOls0MDAsNDAwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--242625616b48cff11334ec85f04b68042261f208/thinking-cat.jpg+ large_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOls3MjAsNzIwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--0fa218972b6a0c500c744b36fcd9fee8a0b3e995/thinking-cat.jpg+ xlarge_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsyMDAwLDIwMDBdLCJzYXZlciI6eyJzdHJpcCI6dHJ1ZSwicXVhbGl0eSI6NzUsImxvc3NsZXNzIjpmYWxzZSwiYWxwaGFfcSI6ODUsInJlZHVjdGlvbl9lZmZvcnQiOjYsInNtYXJ0X3N1YnNhbXBsZSI6dHJ1ZX19LCJwdXIiOiJ2YXJpYXRpb24ifX0=--4d30e1109a0549e5024fddaecdff7a8eb271730d/thinking-cat.jpg+ og_image_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsxMjAwLDYzMF0sInNhdmVyIjp7InN0cmlwIjp0cnVlLCJxdWFsaXR5Ijo3NSwibG9zc2xlc3MiOmZhbHNlLCJhbHBoYV9xIjo4NSwicmVkdWN0aW9uX2VmZm9ydCI6Niwic21hcnRfc3Vic2FtcGxlIjp0cnVlfX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--24a2fdb966aceb15786df6c2f570db0d2624d262/thinking-cat.jpgexternal_references: {}created_at: '2026-01-15T12:00:00.000Z'updated_at: '2026-01-15T12:00:00.000Z'@@ -47154,10 +47166,10 @@ paths:filename: thinking-cat.jpgcontent_type: image/jpegbyte_size: 18090- embed_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2xpbWl0IjpbMTIwMCwxMjAwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--11e07b486f19a616a54cd5b6e644a9a09062da00/thinking-cat.jpg- signed_id: eyJfcmFpbHMiOnsiZGF0YSI6MSwiZXhwIjoiMjAyNi0wMS0xNlQxMjowMDowMC4wMDBaIiwicHVyIjoiYmxvYl9pZCJ9fQ==--3f8bec6f6c76d54da7993efa8940c4e929b71478+ embed_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2xpbWl0IjpbMTIwMCwxMjAwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--67e4c38f8d0453b5c5c0d3d44862a9d1bd79c07c/thinking-cat.jpg+ signed_id: eyJfcmFpbHMiOnsiZGF0YSI6MSwiZXhwIjoiMjAyNi0wMS0xNlQxMjowMDowMC4wMDBaIiwicHVyIjoiYmxvYl9pZCJ9fQ==--a9cd29e72a70654182038480207bd929343f6a07viewable_id: prod_gbHJdmfrXB- download_url: http://localhost:3000/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/thinking-cat.jpg?disposition=attachment+ download_url: http://localhost:3000/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/thinking-cat.jpg?disposition=attachmentmetadata: {}viewable_type: productschema:@@ -47247,13 +47259,13 @@ paths:video_embed_url:video_url:poster_url:- original_url: http://localhost:3000/rails/active_storage/blobs/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/thinking-cat.jpg- mini_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsxMjgsMTI4XSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--b7d4163e56d2e1c1224b82fcbf29c6d389418c35/thinking-cat.jpg- small_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsyNTYsMjU2XSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--1e4e9e92ff0d575e068b03d2347f9e63c034c7f0/thinking-cat.jpg- medium_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOls0MDAsNDAwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--e3cb86219678c00b3174ca00c64f04641a1742a5/thinking-cat.jpg- large_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOls3MjAsNzIwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--5abf9aeeafa5e725cf201c0560614c9317e73c8c/thinking-cat.jpg- xlarge_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsyMDAwLDIwMDBdLCJzYXZlciI6eyJzdHJpcCI6dHJ1ZSwicXVhbGl0eSI6NzUsImxvc3NsZXNzIjpmYWxzZSwiYWxwaGFfcSI6ODUsInJlZHVjdGlvbl9lZmZvcnQiOjYsInNtYXJ0X3N1YnNhbXBsZSI6dHJ1ZX19LCJwdXIiOiJ2YXJpYXRpb24ifX0=--5db1bd36ac712fe3dc607583f4ab31ecdf3a1f21/thinking-cat.jpg- og_image_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsxMjAwLDYzMF0sInNhdmVyIjp7InN0cmlwIjp0cnVlLCJxdWFsaXR5Ijo3NSwibG9zc2xlc3MiOmZhbHNlLCJhbHBoYV9xIjo4NSwicmVkdWN0aW9uX2VmZm9ydCI6Niwic21hcnRfc3Vic2FtcGxlIjp0cnVlfX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--04f02fc0aba9c7fed646166193caa31a9a247344/thinking-cat.jpg+ original_url: http://localhost:3000/rails/active_storage/blobs/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/thinking-cat.jpg+ mini_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsxMjgsMTI4XSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--4360105231729cff27f4227ea4304fac7e08a65e/thinking-cat.jpg+ small_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsyNTYsMjU2XSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--bba92085e6437e846cd0b9fca8d58f9c0b723eba/thinking-cat.jpg+ medium_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOls0MDAsNDAwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--242625616b48cff11334ec85f04b68042261f208/thinking-cat.jpg+ large_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOls3MjAsNzIwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--0fa218972b6a0c500c744b36fcd9fee8a0b3e995/thinking-cat.jpg+ xlarge_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsyMDAwLDIwMDBdLCJzYXZlciI6eyJzdHJpcCI6dHJ1ZSwicXVhbGl0eSI6NzUsImxvc3NsZXNzIjpmYWxzZSwiYWxwaGFfcSI6ODUsInJlZHVjdGlvbl9lZmZvcnQiOjYsInNtYXJ0X3N1YnNhbXBsZSI6dHJ1ZX19LCJwdXIiOiJ2YXJpYXRpb24ifX0=--4d30e1109a0549e5024fddaecdff7a8eb271730d/thinking-cat.jpg+ og_image_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsxMjAwLDYzMF0sInNhdmVyIjp7InN0cmlwIjp0cnVlLCJxdWFsaXR5Ijo3NSwibG9zc2xlc3MiOmZhbHNlLCJhbHBoYV9xIjo4NSwicmVkdWN0aW9uX2VmZm9ydCI6Niwic21hcnRfc3Vic2FtcGxlIjp0cnVlfX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--24a2fdb966aceb15786df6c2f570db0d2624d262/thinking-cat.jpgexternal_references: {}created_at: '2026-01-15T12:00:00.000Z'updated_at: '2026-01-15T12:00:00.000Z'@@ -47261,10 +47273,10 @@ paths:filename: thinking-cat.jpgcontent_type: image/jpegbyte_size: 18090- embed_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2xpbWl0IjpbMTIwMCwxMjAwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--11e07b486f19a616a54cd5b6e644a9a09062da00/thinking-cat.jpg- signed_id: eyJfcmFpbHMiOnsiZGF0YSI6MSwiZXhwIjoiMjAyNi0wMS0xNlQxMjowMDowMC4wMDBaIiwicHVyIjoiYmxvYl9pZCJ9fQ==--3f8bec6f6c76d54da7993efa8940c4e929b71478+ embed_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2xpbWl0IjpbMTIwMCwxMjAwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--67e4c38f8d0453b5c5c0d3d44862a9d1bd79c07c/thinking-cat.jpg+ signed_id: eyJfcmFpbHMiOnsiZGF0YSI6MSwiZXhwIjoiMjAyNi0wMS0xNlQxMjowMDowMC4wMDBaIiwicHVyIjoiYmxvYl9pZCJ9fQ==--a9cd29e72a70654182038480207bd929343f6a07viewable_id: prod_UkLWZg9DAJ- download_url: http://localhost:3000/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--4aef6bb6c096b25410d225d848efa139fb02ef80/thinking-cat.jpg?disposition=attachment+ download_url: http://localhost:3000/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MSwicHVyIjoiYmxvYl9pZCJ9fQ==--f34e09859ba330793d603f7c22466732a512f47b/thinking-cat.jpg?disposition=attachmentmetadata: {}viewable_type: productschema:@@ -47416,13 +47428,13 @@ paths:video_embed_url:video_url:poster_url:- original_url: http://localhost:3000/rails/active_storage/blobs/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MiwicHVyIjoiYmxvYl9pZCJ9fQ==--719bfa956a3578a33855c517211e1a484db6a78a/thinking-cat.jpg- mini_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MiwicHVyIjoiYmxvYl9pZCJ9fQ==--719bfa956a3578a33855c517211e1a484db6a78a/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsxMjgsMTI4XSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--b7d4163e56d2e1c1224b82fcbf29c6d389418c35/thinking-cat.jpg- small_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MiwicHVyIjoiYmxvYl9pZCJ9fQ==--719bfa956a3578a33855c517211e1a484db6a78a/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsyNTYsMjU2XSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--1e4e9e92ff0d575e068b03d2347f9e63c034c7f0/thinking-cat.jpg- medium_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MiwicHVyIjoiYmxvYl9pZCJ9fQ==--719bfa956a3578a33855c517211e1a484db6a78a/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOls0MDAsNDAwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--e3cb86219678c00b3174ca00c64f04641a1742a5/thinking-cat.jpg- large_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MiwicHVyIjoiYmxvYl9pZCJ9fQ==--719bfa956a3578a33855c517211e1a484db6a78a/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOls3MjAsNzIwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--5abf9aeeafa5e725cf201c0560614c9317e73c8c/thinking-cat.jpg- xlarge_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MiwicHVyIjoiYmxvYl9pZCJ9fQ==--719bfa956a3578a33855c517211e1a484db6a78a/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsyMDAwLDIwMDBdLCJzYXZlciI6eyJzdHJpcCI6dHJ1ZSwicXVhbGl0eSI6NzUsImxvc3NsZXNzIjpmYWxzZSwiYWxwaGFfcSI6ODUsInJlZHVjdGlvbl9lZmZvcnQiOjYsInNtYXJ0X3N1YnNhbXBsZSI6dHJ1ZX19LCJwdXIiOiJ2YXJpYXRpb24ifX0=--5db1bd36ac712fe3dc607583f4ab31ecdf3a1f21/thinking-cat.jpg- og_image_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MiwicHVyIjoiYmxvYl9pZCJ9fQ==--719bfa956a3578a33855c517211e1a484db6a78a/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsxMjAwLDYzMF0sInNhdmVyIjp7InN0cmlwIjp0cnVlLCJxdWFsaXR5Ijo3NSwibG9zc2xlc3MiOmZhbHNlLCJhbHBoYV9xIjo4NSwicmVkdWN0aW9uX2VmZm9ydCI6Niwic21hcnRfc3Vic2FtcGxlIjp0cnVlfX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--04f02fc0aba9c7fed646166193caa31a9a247344/thinking-cat.jpg+ original_url: http://localhost:3000/rails/active_storage/blobs/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MiwicHVyIjoiYmxvYl9pZCJ9fQ==--d46768bb9ae5b1c086c4952a77e29e46b5a9627b/thinking-cat.jpg+ mini_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MiwicHVyIjoiYmxvYl9pZCJ9fQ==--d46768bb9ae5b1c086c4952a77e29e46b5a9627b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsxMjgsMTI4XSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--4360105231729cff27f4227ea4304fac7e08a65e/thinking-cat.jpg+ small_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MiwicHVyIjoiYmxvYl9pZCJ9fQ==--d46768bb9ae5b1c086c4952a77e29e46b5a9627b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsyNTYsMjU2XSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--bba92085e6437e846cd0b9fca8d58f9c0b723eba/thinking-cat.jpg+ medium_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MiwicHVyIjoiYmxvYl9pZCJ9fQ==--d46768bb9ae5b1c086c4952a77e29e46b5a9627b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOls0MDAsNDAwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--242625616b48cff11334ec85f04b68042261f208/thinking-cat.jpg+ large_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MiwicHVyIjoiYmxvYl9pZCJ9fQ==--d46768bb9ae5b1c086c4952a77e29e46b5a9627b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOls3MjAsNzIwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--0fa218972b6a0c500c744b36fcd9fee8a0b3e995/thinking-cat.jpg+ xlarge_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MiwicHVyIjoiYmxvYl9pZCJ9fQ==--d46768bb9ae5b1c086c4952a77e29e46b5a9627b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsyMDAwLDIwMDBdLCJzYXZlciI6eyJzdHJpcCI6dHJ1ZSwicXVhbGl0eSI6NzUsImxvc3NsZXNzIjpmYWxzZSwiYWxwaGFfcSI6ODUsInJlZHVjdGlvbl9lZmZvcnQiOjYsInNtYXJ0X3N1YnNhbXBsZSI6dHJ1ZX19LCJwdXIiOiJ2YXJpYXRpb24ifX0=--4d30e1109a0549e5024fddaecdff7a8eb271730d/thinking-cat.jpg+ og_image_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MiwicHVyIjoiYmxvYl9pZCJ9fQ==--d46768bb9ae5b1c086c4952a77e29e46b5a9627b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2ZpbGwiOlsxMjAwLDYzMF0sInNhdmVyIjp7InN0cmlwIjp0cnVlLCJxdWFsaXR5Ijo3NSwibG9zc2xlc3MiOmZhbHNlLCJhbHBoYV9xIjo4NSwicmVkdWN0aW9uX2VmZm9ydCI6Niwic21hcnRfc3Vic2FtcGxlIjp0cnVlfX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--24a2fdb966aceb15786df6c2f570db0d2624d262/thinking-cat.jpgexternal_references: {}created_at: '2026-01-15T12:00:00.000Z'updated_at: '2026-01-15T12:00:00.000Z'@@ -47430,10 +47442,10 @@ paths:filename: thinking-cat.jpgcontent_type: image/jpegbyte_size: 18090- embed_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MiwicHVyIjoiYmxvYl9pZCJ9fQ==--719bfa956a3578a33855c517211e1a484db6a78a/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2xpbWl0IjpbMTIwMCwxMjAwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--11e07b486f19a616a54cd5b6e644a9a09062da00/thinking-cat.jpg- signed_id: eyJfcmFpbHMiOnsiZGF0YSI6MiwiZXhwIjoiMjAyNi0wMS0xNlQxMjowMDowMC4wMDBaIiwicHVyIjoiYmxvYl9pZCJ9fQ==--3b8702b07c49f5c3b0de775f88f23bfead0d5834+ embed_url: http://localhost:3000/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MiwicHVyIjoiYmxvYl9pZCJ9fQ==--d46768bb9ae5b1c086c4952a77e29e46b5a9627b/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2xpbWl0IjpbMTIwMCwxMjAwXSwic2F2ZXIiOnsic3RyaXAiOnRydWUsInF1YWxpdHkiOjc1LCJsb3NzbGVzcyI6ZmFsc2UsImFscGhhX3EiOjg1LCJyZWR1Y3Rpb25fZWZmb3J0Ijo2LCJzbWFydF9zdWJzYW1wbGUiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--67e4c38f8d0453b5c5c0d3d44862a9d1bd79c07c/thinking-cat.jpg+ signed_id: eyJfcmFpbHMiOnsiZGF0YSI6MiwiZXhwIjoiMjAyNi0wMS0xNlQxMjowMDowMC4wMDBaIiwicHVyIjoiYmxvYl9pZCJ9fQ==--9d1feef473c267b5baf61ca104925f9833f26b25viewable_id: variant_gbHJdmfrXB- download_url: http://localhost:3000/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MiwicHVyIjoiYmxvYl9pZCJ9fQ==--719bfa956a3578a33855c517211e1a484db6a78a/thinking-cat.jpg?disposition=attachment+ download_url: http://localhost:3000/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MiwicHVyIjoiYmxvYl9pZCJ9fQ==--d46768bb9ae5b1c086c4952a77e29e46b5a9627b/thinking-cat.jpg?disposition=attachmentmetadata: {}viewable_type: variantmeta:@@ -53473,14 +53485,16 @@ paths:is_default_billing: falseis_default_shipping: falsestate_name:+ owner:+ id: sel_UkLWZg9DAJ+ type: seller+ name:metadata: {}created_at: '2026-01-15T12:00:00.000Z'updated_at: '2026-01-15T12:00:00.000Z'latitude:longitude:customer_id:- owner_id: sel_UkLWZg9DAJ- owner_type: sellerschema:"$ref": "#/components/schemas/Seller"'422':@@ -57773,6 +57787,29 @@ components:- type- labelx-typelizer: true+ AddressOwner:+ type: object+ properties:+ id:+ type: string+ type:+ anyOf:+ - type: string+ enum:+ - customer+ - company+ - seller+ - type: string+ description: The values listed are the built-in ones; extensions may add+ more.+ name:+ type: string+ nullable: true+ required:+ - id+ - type+ - name+ x-typelizer: trueAddress:type: objectproperties:@@ -58067,6 +58104,10 @@ components:state_name:type: stringnullable: true+ owner:+ allOf:+ - "$ref": "#/components/schemas/AddressOwner"+ nullable: truemetadata:type: objectcreated_at:@@ -58082,12 +58123,6 @@ components:customer_id:type: stringnullable: true- owner_id:- type: string- nullable: true- owner_type:- type: string- nullable: truerequired:- id- label@@ -58108,14 +58143,13 @@ components:- is_default_billing- is_default_shipping- state_name+ - owner- metadata- created_at- updated_at- latitude- longitude- customer_id- - owner_id- - owner_typex-typelizer: trueAdminUser:type: object@@ -80543,8 +80577,10 @@ components:nullable: trueuse_customer_default_address:type: boolean- description: With `customer_id`, copies the customer's saved billing and- shipping addresses onto the order.+ description: Copies the saved default billing and shipping addresses onto+ the order. Sent with `company_id`, it takes that company's defaults, inherited+ from its parent nodes when the company holds none of its own; otherwise+ it takes the customer's.currency:allOf:- "$ref": "#/components/schemas/CurrencyCode"@@ -80576,10 +80612,12 @@ components:nullable: trueshipping_address_id:type: string- description: An existing address of the customer.+ description: An existing address from the customer's address book, or from+ the address book of the company the order is for.billing_address_id:type: string- description: An existing address of the customer.+ description: An existing address from the customer's address book, or from+ the address book of the company the order is for.preferred_stock_location_id:type: stringdescription: Stock location to prefer for fulfillment. Order Routing's built-indiff --git a/docs/api-reference/seller.yaml b/docs/api-reference/seller.yamlindex baa8e5472a..e77b94cca0 100644--- a/docs/api-reference/seller.yaml+++ b/docs/api-reference/seller.yaml@@ -12324,7 +12324,7 @@ paths:data:- id: dm_UkLWZg9DAJname: My courier- code: UPS_GROUND_117+ code: UPS_GROUND_118estimated_transit_business_days_min:estimated_transit_business_days_max:digital: false@@ -12347,7 +12347,7 @@ paths:currency: USD- id: dm_gbHJdmfrXBname: Marketplace post- code: UPS_GROUND_118+ code: UPS_GROUND_119estimated_transit_business_days_min:estimated_transit_business_days_max:digital: false@@ -12516,7 +12516,7 @@ paths:example:id: dm_UkLWZg9DAJname: My courier- code: UPS_GROUND_123+ code: UPS_GROUND_124estimated_transit_business_days_min:estimated_transit_business_days_max:digital: false@@ -12573,7 +12573,7 @@ paths:example:id: dm_UkLWZg9DAJname: My express courier- code: UPS_GROUND_125+ code: UPS_GROUND_126estimated_transit_business_days_min:estimated_transit_business_days_max:digital: false@@ -14172,8 +14172,8 @@ paths:example:data:- id: prod_UkLWZg9DAJ- name: Product 2823250- slug: product-2823250+ name: Product 2843250+ slug: product-2843250meta_title:meta_description:meta_keywords:@@ -14386,8 +14386,8 @@ paths:application/json:example:id: prod_UkLWZg9DAJ- name: Product 2856710- slug: product-2856710+ name: Product 2876710+ slug: product-2876710meta_title:meta_description:meta_keywords:@@ -14477,7 +14477,7 @@ paths:example:id: prod_UkLWZg9DAJname: Hand-thrown mug, large- slug: product-2888212+ slug: product-2908212meta_title:meta_description:meta_keywords:@@ -14600,8 +14600,8 @@ paths:application/json:example:id: prod_gbHJdmfrXB- name: Product 2917816- slug: product-2917816+ name: Product 2937816+ slug: product-2937816meta_title:meta_description:meta_keywords:@@ -14711,8 +14711,8 @@ paths:application/json:example:id: prod_UkLWZg9DAJ- name: Product 293209- slug: product-293209+ name: Product 295209+ slug: product-295209meta_title:meta_description:meta_keywords:@@ -14801,8 +14801,8 @@ paths:application/json:example:id: prod_UkLWZg9DAJ- name: Product 2949405- slug: product-2949405+ name: Product 2969405+ slug: product-2969405meta_title:meta_description:meta_keywords:@@ -15990,7 +15990,7 @@ paths:content:application/json:example:- signed_id: eyJfcmFpbHMiOnsiZGF0YSI6MSwiZXhwIjoiMjAyNi0wMS0xNlQxMjowMDowMC4wMDBaIiwicHVyIjoiYmxvYl9pZCJ9fQ==--37ea8559a3ea6e9f4877608b795389de5d0a2325+ signed_id: eyJfcmFpbHMiOnsiZGF0YSI6MSwiZXhwIjoiMjAyNi0wMS0xNlQxMjowMDowMC4wMDBaIiwicHVyIjoiYmxvYl9pZCJ9fQ==--a9cd29e72a70654182038480207bd929343f6a07filename: registration.pdfcontent_type: application/pdfbyte_size: 51234@@ -15998,7 +15998,7 @@ paths:expires_at: '2026-01-16T12:00:00.000Z'upload:method: PUT- url: http://www.example.com/rails/active_storage/disk/eyJfcmFpbHMiOnsiZGF0YSI6eyJrZXkiOiI4NDFrenlvbTQ5cnRhcDk0cmZxbGV6dnM1cGJsIiwiY29udGVudF90eXBlIjoiYXBwbGljYXRpb24vcGRmIiwiY29udGVudF9sZW5ndGgiOjUxMjM0LCJjaGVja3N1bSI6IlZqaHowNGxRdUVHdXY0bkR2aHNhTlE9PSIsInNlcnZpY2VfbmFtZSI6InRlc3QifSwiZXhwIjoiMjAyNi0wMS0xNVQxMjowNTowMC4wMDBaIiwicHVyIjoiYmxvYl90b2tlbiJ9fQ==--db026124d00ca5e74d7fe8d3b919aaf931a505f7+ url: http://www.example.com/rails/active_storage/disk/eyJfcmFpbHMiOnsiZGF0YSI6eyJrZXkiOiI4NDFrenlvbTQ5cnRhcDk0cmZxbGV6dnM1cGJsIiwiY29udGVudF90eXBlIjoiYXBwbGljYXRpb24vcGRmIiwiY29udGVudF9sZW5ndGgiOjUxMjM0LCJjaGVja3N1bSI6IlZqaHowNGxRdUVHdXY0bkR2aHNhTlE9PSIsInNlcnZpY2VfbmFtZSI6InRlc3QifSwiZXhwIjoiMjAyNi0wMS0xNVQxMjowNTowMC4wMDBaIiwicHVyIjoiYmxvYl90b2tlbiJ9fQ==--abe303073ba7e7a0de1e5dc55e6c2a9a162c265eheaders:Content-Type: application/pdfschema:@@ -17453,7 +17453,7 @@ paths:created_at: '2026-01-15T12:00:00.000Z'updated_at: '2026-01-15T12:00:00.000Z'fulfillment_type: shipping- delivery_method_name: UPS Ground 128+ delivery_method_name: UPS Ground 129stock_location_name: Vernie Lehnerstock_location_id: sloc_UkLWZg9DAJfulfillment_items:@@ -17461,13 +17461,13 @@ paths:quantity: 1line_item_id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJ- name: Product 2509315- sku: SKU-334+ name: Product 2529315+ sku: SKU-338options_text: ''selected_delivery_rate_id: dr_gbHJdmfrXBdelivery_rates:- id: dr_gbHJdmfrXB- name: UPS Ground 128+ name: UPS Ground 129selected: truecost: '10.00'total: '10.00'@@ -17576,7 +17576,7 @@ paths:created_at: '2026-01-15T12:00:00.000Z'updated_at: '2026-01-15T12:00:00.000Z'fulfillment_type: shipping- delivery_method_name: UPS Ground 129+ delivery_method_name: UPS Ground 130stock_location_name: Mirta Hermanstock_location_id: sloc_UkLWZg9DAJfulfillment_items:@@ -17584,13 +17584,13 @@ paths:quantity: 1line_item_id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJ- name: Product 251961- sku: SKU-335+ name: Product 253961+ sku: SKU-339options_text: ''selected_delivery_rate_id: dr_gbHJdmfrXBdelivery_rates:- id: dr_gbHJdmfrXB- name: UPS Ground 129+ name: UPS Ground 130selected: truecost: '10.00'total: '10.00'@@ -17674,7 +17674,7 @@ paths:created_at: '2026-01-15T12:00:00.000Z'updated_at: '2026-01-15T12:00:00.000Z'fulfillment_type: shipping- delivery_method_name: UPS Ground 130+ delivery_method_name: UPS Ground 131stock_location_name: Melony Blockstock_location_id: sloc_UkLWZg9DAJfulfillment_items:@@ -17682,13 +17682,13 @@ paths:quantity: 1line_item_id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJ- name: Product 2522065- sku: SKU-336+ name: Product 2542065+ sku: SKU-340options_text: ''selected_delivery_rate_id: dr_gbHJdmfrXBdelivery_rates:- id: dr_gbHJdmfrXB- name: UPS Ground 130+ name: UPS Ground 131selected: truecost: '10.00'total: '10.00'@@ -17760,7 +17760,7 @@ paths:created_at: '2026-01-15T12:00:00.000Z'updated_at: '2026-01-15T12:00:00.000Z'fulfillment_type: shipping- delivery_method_name: UPS Ground 131+ delivery_method_name: UPS Ground 132stock_location_name: Eugena Schultzstock_location_id: sloc_UkLWZg9DAJfulfillment_items:@@ -17768,13 +17768,13 @@ paths:quantity: 1line_item_id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJ- name: Product 2533170- sku: SKU-337+ name: Product 2553170+ sku: SKU-341options_text: ''selected_delivery_rate_id: dr_gbHJdmfrXBdelivery_rates:- id: dr_gbHJdmfrXB- name: UPS Ground 131+ name: UPS Ground 132selected: truecost: '10.00'total: '10.00'@@ -17860,7 +17860,7 @@ paths:created_at: '2026-01-15T12:00:00.000Z'updated_at: '2026-01-15T12:00:00.000Z'fulfillment_type: shipping- delivery_method_name: UPS Ground 132+ delivery_method_name: UPS Ground 133stock_location_name: Karyn Moorestock_location_id: sloc_UkLWZg9DAJfulfillment_items:@@ -17868,13 +17868,13 @@ paths:quantity: 1line_item_id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJ- name: Product 2547276- sku: SKU-338+ name: Product 2567276+ sku: SKU-342options_text: ''selected_delivery_rate_id: dr_gbHJdmfrXBdelivery_rates:- id: dr_gbHJdmfrXB- name: UPS Ground 132+ name: UPS Ground 133selected: truecost: '10.00'total: '10.00'@@ -17963,7 +17963,7 @@ paths:created_at: '2026-01-15T12:00:00.000Z'updated_at: '2026-01-15T12:00:00.000Z'fulfillment_type: shipping- delivery_method_name: UPS Ground 133+ delivery_method_name: UPS Ground 134stock_location_name: Fred Handstock_location_id: sloc_UkLWZg9DAJfulfillment_items:@@ -17971,13 +17971,13 @@ paths:quantity: 1line_item_id: li_gbHJdmfrXBvariant_id: variant_gbHJdmfrXB- name: Product 2561765- sku: SKU-340+ name: Product 2581765+ sku: SKU-344options_text: ''selected_delivery_rate_id: dr_EfhxLZ9ck8delivery_rates:- id: dr_EfhxLZ9ck8- name: UPS Ground 133+ name: UPS Ground 134selected: truecost: '10.00'total: '10.00'@@ -18009,7 +18009,7 @@ paths:created_at: '2026-01-15T12:00:00.000Z'updated_at: '2026-01-15T12:00:00.000Z'fulfillment_type: shipping- delivery_method_name: UPS Ground 133+ delivery_method_name: UPS Ground 134stock_location_name: Fred Handstock_location_id: sloc_UkLWZg9DAJfulfillment_items:@@ -18017,13 +18017,13 @@ paths:quantity: 1line_item_id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJ- name: Product 2553520- sku: SKU-339+ name: Product 2573520+ sku: SKU-343options_text: ''selected_delivery_rate_id: dr_VqXmZF31wYdelivery_rates:- id: dr_VqXmZF31wY- name: UPS Ground 133+ name: UPS Ground 134selected: truecost: '10.00'total: '10.00'@@ -20763,7 +20763,7 @@ paths:cancel_note:items:- id: li_UkLWZg9DAJ- name: Product 26895+ name: Product 27095options_text: ''quantity: 1currency: USD@@ -20772,7 +20772,7 @@ paths:additional_tax_total: '0.00'total: '10.00'variant_id: variant_UkLWZg9DAJ- sku: SKU-352+ sku: SKU-356thumbnail_url:fulfillments:- id: ful_UkLWZg9DAJ@@ -20785,7 +20785,7 @@ paths:created_at: '2026-01-15T12:00:00.000Z'updated_at: '2026-01-15T12:00:00.000Z'fulfillment_type: shipping- delivery_method_name: UPS Ground 145+ delivery_method_name: UPS Ground 146stock_location_name: Roseline Robertsstock_location_id: sloc_UkLWZg9DAJfulfillment_items:@@ -20793,13 +20793,13 @@ paths:quantity: 1line_item_id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJ- name: Product 26895- sku: SKU-352+ name: Product 27095+ sku: SKU-356options_text: ''selected_delivery_rate_id: dr_gbHJdmfrXBdelivery_rates:- id: dr_gbHJdmfrXB- name: UPS Ground 145+ name: UPS Ground 146selected: truecost: '10.00'total: '10.00'@@ -20959,7 +20959,7 @@ paths:cancel_note:items:- id: li_UkLWZg9DAJ- name: Product 2699755+ name: Product 2719755options_text: ''quantity: 1currency: USD@@ -20968,7 +20968,7 @@ paths:additional_tax_total: '0.00'total: '10.00'variant_id: variant_UkLWZg9DAJ- sku: SKU-353+ sku: SKU-357thumbnail_url:fulfillments:- id: ful_UkLWZg9DAJ@@ -20981,7 +20981,7 @@ paths:created_at: '2026-01-15T12:00:00.000Z'updated_at: '2026-01-15T12:00:00.000Z'fulfillment_type: shipping- delivery_method_name: UPS Ground 146+ delivery_method_name: UPS Ground 147stock_location_name: Woodrow Handstock_location_id: sloc_UkLWZg9DAJfulfillment_items:@@ -20989,13 +20989,13 @@ paths:quantity: 1line_item_id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJ- name: Product 2699755- sku: SKU-353+ name: Product 2719755+ sku: SKU-357options_text: ''selected_delivery_rate_id: dr_gbHJdmfrXBdelivery_rates:- id: dr_gbHJdmfrXB- name: UPS Ground 146+ name: UPS Ground 147selected: truecost: '10.00'total: '10.00'@@ -21155,7 +21155,7 @@ paths:cancel_note:items:- id: li_UkLWZg9DAJ- name: Product 2726554+ name: Product 2746554options_text: ''quantity: 1currency: USD@@ -21164,7 +21164,7 @@ paths:additional_tax_total: '0.00'total: '10.00'variant_id: variant_UkLWZg9DAJ- sku: SKU-356+ sku: SKU-360thumbnail_url:fulfillments:- id: ful_UkLWZg9DAJ@@ -21177,7 +21177,7 @@ paths:created_at: '2026-01-15T12:00:00.000Z'updated_at: '2026-01-15T12:00:00.000Z'fulfillment_type: shipping- delivery_method_name: UPS Ground 149+ delivery_method_name: UPS Ground 150stock_location_name: Savanna Hillsstock_location_id: sloc_UkLWZg9DAJfulfillment_items:@@ -21185,13 +21185,13 @@ paths:quantity: 1line_item_id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJ- name: Product 2726554- sku: SKU-356+ name: Product 2746554+ sku: SKU-360options_text: ''selected_delivery_rate_id: dr_gbHJdmfrXBdelivery_rates:- id: dr_gbHJdmfrXB- name: UPS Ground 149+ name: UPS Ground 150selected: truecost: '10.00'total: '10.00'@@ -21341,7 +21341,7 @@ paths:cancel_note:items:- id: li_UkLWZg9DAJ- name: Product 2735038+ name: Product 2755038options_text: ''quantity: 1currency: USD@@ -21350,7 +21350,7 @@ paths:additional_tax_total: '0.00'total: '10.00'variant_id: variant_UkLWZg9DAJ- sku: SKU-357+ sku: SKU-361thumbnail_url:fulfillments:- id: ful_UkLWZg9DAJ@@ -21363,7 +21363,7 @@ paths:created_at: '2026-01-15T12:00:00.000Z'updated_at: '2026-01-15T12:00:00.000Z'fulfillment_type: shipping- delivery_method_name: UPS Ground 150+ delivery_method_name: UPS Ground 151stock_location_name: Rudy Mosciskistock_location_id: sloc_UkLWZg9DAJfulfillment_items:@@ -21371,13 +21371,13 @@ paths:quantity: 1line_item_id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJ- name: Product 2735038- sku: SKU-357+ name: Product 2755038+ sku: SKU-361options_text: ''selected_delivery_rate_id: dr_gbHJdmfrXBdelivery_rates:- id: dr_gbHJdmfrXB- name: UPS Ground 150+ name: UPS Ground 151selected: truecost: '10.00'total: '10.00'@@ -21534,7 +21534,7 @@ paths:cancel_note:items:- id: li_UkLWZg9DAJ- name: Product 2753962+ name: Product 2773962options_text: ''quantity: 1currency: USD@@ -21543,7 +21543,7 @@ paths:additional_tax_total: '0.00'total: '10.00'variant_id: variant_UkLWZg9DAJ- sku: SKU-359+ sku: SKU-363thumbnail_url:fulfillments:- id: ful_UkLWZg9DAJ@@ -21556,7 +21556,7 @@ paths:created_at: '2026-01-15T12:00:00.000Z'updated_at: '2026-01-15T12:00:00.000Z'fulfillment_type: shipping- delivery_method_name: UPS Ground 152+ delivery_method_name: UPS Ground 153stock_location_name: Kecia Pollichstock_location_id: sloc_UkLWZg9DAJfulfillment_items:@@ -21564,13 +21564,13 @@ paths:quantity: 1line_item_id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJ- name: Product 2753962- sku: SKU-359+ name: Product 2773962+ sku: SKU-363options_text: ''selected_delivery_rate_id: dr_gbHJdmfrXBdelivery_rates:- id: dr_gbHJdmfrXB- name: UPS Ground 152+ name: UPS Ground 153selected: truecost: '10.00'total: '10.00'@@ -21704,7 +21704,7 @@ paths:cancel_note:items:- id: li_UkLWZg9DAJ- name: Product 2765749+ name: Product 2785749options_text: ''quantity: 1currency: USD@@ -21713,7 +21713,7 @@ paths:additional_tax_total: '0.00'total: '10.00'variant_id: variant_UkLWZg9DAJ- sku: SKU-360+ sku: SKU-364thumbnail_url:fulfillments:- id: ful_UkLWZg9DAJ@@ -21726,7 +21726,7 @@ paths:created_at: '2026-01-15T12:00:00.000Z'updated_at: '2026-01-15T12:00:00.000Z'fulfillment_type: shipping- delivery_method_name: UPS Ground 153+ delivery_method_name: UPS Ground 154stock_location_name: Ophelia Hartmannstock_location_id: sloc_UkLWZg9DAJfulfillment_items:@@ -21734,13 +21734,13 @@ paths:quantity: 1line_item_id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJ- name: Product 2765749- sku: SKU-360+ name: Product 2785749+ sku: SKU-364options_text: ''selected_delivery_rate_id: dr_gbHJdmfrXBdelivery_rates:- id: dr_gbHJdmfrXB- name: UPS Ground 153+ name: UPS Ground 154selected: truecost: '10.00'total: '10.00'@@ -22710,7 +22710,7 @@ paths:example:error:code: processing_error- message: Only 1 of Product 3017120 can be returned+ message: Only 1 of Product 3037120 can be returnedrequestBody:content:application/json:diff --git a/docs/api-reference/store.yaml b/docs/api-reference/store.yamlindex e29be05146..c81462a73b 100644--- a/docs/api-reference/store.yaml+++ b/docs/api-reference/store.yaml@@ -1097,8 +1097,8 @@ paths:example:data:- id: prod_UkLWZg9DAJ- name: Product 3436979- slug: product-3436979+ name: Product 3476979+ slug: product-3476979meta_title:meta_description:meta_keywords:@@ -1390,8 +1390,8 @@ paths:example:data:- id: prod_UkLWZg9DAJ- name: Product 3919085- slug: product-3919085+ name: Product 3959085+ slug: product-3959085meta_title:meta_description:meta_keywords:@@ -1422,8 +1422,8 @@ paths:original_price:seller_id:- id: prod_gbHJdmfrXB- name: Product 3928209- slug: product-3928209+ name: Product 3968209+ slug: product-3968209meta_title:meta_description:meta_keywords:@@ -1552,8 +1552,8 @@ paths:application/json:example:id: prod_UkLWZg9DAJ- name: Product 4196885- slug: product-4196885+ name: Product 4236885+ slug: product-4236885meta_title:meta_description:meta_keywords:@@ -1902,6 +1902,250 @@ paths:message: Valid API key requiredschema:"$ref": "#/components/schemas/ErrorResponse"+ "/api/v3/store/carts/{cart_id}/addresses":+ parameters:+ - name: cart_id+ in: path+ required: true+ description: Cart prefixed ID+ schema:+ type: string+ get:+ summary: List addresses this cart may use+ tags:+ - Carts+ security:+ - api_key: []+ bearer_auth: []+ description: |+ Everything a checkout address step may offer for this cart: the buyer's own address+ book, plus the address book of the company set as the cart's `company_id` — that+ company's own sites and the ones it inherits from the companies above it. Only+ addresses in a country the cart's market sells to are listed.++ Requires a signed-in customer, unlike the rest of the cart endpoints. The response+ is the account's address books rather than the cart's own data, so a guest cart+ token is not accepted here. A guest cart has neither book and would get an empty+ list in any case.++ Each entry carries the `owner` it was filed under — the customer, or the company+ node that owns the site — so a picker can group and label them from one+ response. An inherited site names the node above, not the+ one the cart is for.++ Any address returned here is accepted as `shipping_address_id` or+ `billing_address_id` on the cart, so the picker and the cart cannot disagree.+ Curating either book stays with `/store/customers/me/addresses` and+ `/store/companies/{company_id}/addresses`.+ x-codeSamples:+ - lang: javascript+ label: Spree SDK+ source: |-+ import { createClient } from '@spree/sdk'++ const client = createClient({+ baseUrl: 'https://your-store.com',+ publishableKey: '<api-key>',+ })++ const addresses = await client.carts.addresses.list(+ 'cart_abc123',+ {},+ {+ token: '<token>',+ },+ )+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ schema:+ type: string+ - name: page+ in: query+ required: false+ schema:+ type: integer+ - name: limit+ in: query+ required: false+ schema:+ type: integer+ - name: q+ in: query+ required: false+ style: deepObject+ explode: true+ schema:+ type: object+ additionalProperties: true+ description: Attribute filters, as `q[<attribute>_<predicate>]=value`. See+ Filters above for the list.+ x-mint:+ content: |-+ ## Filters++ Filter with `q[<attribute>_<predicate>]=value`, for example `q[address1_cont]=…`. Send a list as `q[<attribute>_in][]=a&q[<attribute>_in][]=b`. [How filters work](/api-reference/store-api/querying#which-filters-an-endpoint-accepts).++ | Attribute | Kind | Predicates |+ |---|---|---|+ | `address1` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |+ | `address2` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |+ | `city` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |+ | `company` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |+ | `country_code` | One of the `CountryCode` codes | `eq` `not_eq` `in` `not_in` `null` `not_null` |+ | `created_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |+ | `first_name` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |+ | `id` | Prefixed ID | `eq` `not_eq` `in` `not_in` `null` `not_null` |+ | `last_name` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |+ | `phone` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |+ | `postal_code` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |+ | `state_code` | Text | `eq` `not_eq` `in` `not_in` `cont` `i_cont` `not_cont` `start` `end` `null` `not_null` `present` `blank` |+ | `updated_at` | Date and time | `eq` `not_eq` `in` `not_in` `lt` `lteq` `gt` `gteq` `null` `not_null` |++ **Sort by:** `address1`, `address2`, `city`, `company`, `country_code`, `created_at`, `first_name`, `id`, `last_name`, `phone`, `postal_code`, `state_code`, `updated_at`. Prefix a field with `-` to sort descending.+ x-spree-filters:+ table: Address+ sortable:+ - address1+ - address2+ - city+ - company+ - country_code+ - created_at+ - first_name+ - id+ - last_name+ - phone+ - postal_code+ - state_code+ - updated_at+ responses:+ '200':+ description: addresses found+ content:+ application/json:+ example:+ data:+ - id: addr_UkLWZg9DAJ+ label:+ first_name: John+ last_name: Doe+ full_name: John Doe+ address1: 362 Lovely Street+ address2: Northwest+ postal_code: '10118'+ city: New York+ phone: 555-555-0199+ company: Company+ country_name: United States+ country_code: US+ state_text: NY+ state_code: NY+ quick_checkout: false+ is_default_billing: false+ is_default_shipping: true+ state_abbr: NY+ country_iso: US+ state_name: New York+ owner:+ id: cust_UkLWZg9DAJ+ type: customer+ name:+ - id: addr_gbHJdmfrXB+ label:+ first_name: John+ last_name: Doe+ full_name: John Doe+ address1: 363 Lovely Street+ address2: Northwest+ postal_code: '10118'+ city: New York+ phone: 555-555-0199+ company: Company+ country_name: United States+ country_code: US+ state_text: NY+ state_code: NY+ quick_checkout: false+ is_default_billing: true+ is_default_shipping: false+ state_abbr: NY+ country_iso: US+ state_name: New York+ owner:+ id: cust_UkLWZg9DAJ+ type: customer+ name:+ - id: addr_EfhxLZ9ck8+ label:+ first_name: John+ last_name: Doe+ full_name: John Doe+ address1: 364 Lovely Street+ address2: Northwest+ postal_code: '10118'+ city: New York+ phone: 555-555-0199+ company: Company+ country_name: United States+ country_code: US+ state_text: NY+ state_code: NY+ quick_checkout: false+ is_default_billing: false+ is_default_shipping: false+ state_abbr: NY+ country_iso: US+ state_name: New York+ owner:+ id: cust_UkLWZg9DAJ+ type: customer+ name:+ meta:+ page: 1+ limit: 25+ count: 3+ pages: 1+ from: 1+ to: 3+ in: 3+ previous:+ next:+ schema:+ type: object+ properties:+ data:+ type: array+ items:+ "$ref": "#/components/schemas/Address"+ meta:+ "$ref": "#/components/schemas/PaginationMeta"+ '401':+ description: not authenticated+ content:+ application/json:+ example:+ error:+ code: authentication_required+ message: Authentication required+ schema:+ "$ref": "#/components/schemas/ErrorResponse"+ '404':+ description: cart not found+ content:+ application/json:+ example:+ error:+ code: record_not_found+ message: Cart not found+ schema:+ "$ref": "#/components/schemas/ErrorResponse""/api/v3/store/carts/{cart_id}/po_document":parameters:- name: cart_id@@ -1946,7 +2190,7 @@ paths:content:application/json:example:- signed_id: eyJfcmFpbHMiOnsiZGF0YSI6MSwiZXhwIjoiMjAyNi0wMS0xNlQxMjowMDowMC4wMDBaIiwicHVyIjoiYmxvYl9pZCJ9fQ==--37ea8559a3ea6e9f4877608b795389de5d0a2325+ signed_id: eyJfcmFpbHMiOnsiZGF0YSI6MSwiZXhwIjoiMjAyNi0wMS0xNlQxMjowMDowMC4wMDBaIiwicHVyIjoiYmxvYl9pZCJ9fQ==--a9cd29e72a70654182038480207bd929343f6a07filename: purchase-order.pdfcontent_type: application/pdfbyte_size: 48210@@ -1954,7 +2198,7 @@ paths:expires_at: '2026-01-16T12:00:00.000Z'upload:method: PUT- url: http://www.example.com/rails/active_storage/disk/eyJfcmFpbHMiOnsiZGF0YSI6eyJrZXkiOiIwc3NuNW5kM3RneWtwcWJndXdybGprZjNwbjc4IiwiY29udGVudF90eXBlIjoiYXBwbGljYXRpb24vcGRmIiwiY29udGVudF9sZW5ndGgiOjQ4MjEwLCJjaGVja3N1bSI6IjVXMjhrY2ZxcDlLMGY1djRZN2VyUkE9PSIsInNlcnZpY2VfbmFtZSI6InRlc3QifSwiZXhwIjoiMjAyNi0wMS0xNVQxMjowNTowMC4wMDBaIiwicHVyIjoiYmxvYl90b2tlbiJ9fQ==--c371f81d2998190ebc1edf0b658c9b3921921de1+ url: http://www.example.com/rails/active_storage/disk/eyJfcmFpbHMiOnsiZGF0YSI6eyJrZXkiOiIwc3NuNW5kM3RneWtwcWJndXdybGprZjNwbjc4IiwiY29udGVudF90eXBlIjoiYXBwbGljYXRpb24vcGRmIiwiY29udGVudF9sZW5ndGgiOjQ4MjEwLCJjaGVja3N1bSI6IjVXMjhrY2ZxcDlLMGY1djRZN2VyUkE9PSIsInNlcnZpY2VfbmFtZSI6InRlc3QifSwiZXhwIjoiMjAyNi0wMS0xNVQxMjowNTowMC4wMDBaIiwicHVyIjoiYmxvYl90b2tlbiJ9fQ==--d1ccdf3e94900f0c8f62feb07f43a3d33eb3b0dfheaders:Content-Type: application/pdfschema:@@ -2250,7 +2494,7 @@ paths:order_minimum_shortfall:below_order_minimum: falsefreight_summary:- shipping_eq_billing_address: true+ shipping_eq_billing_address: falsediscounts: []fees: []items:@@ -2261,8 +2505,8 @@ paths:preorder_ships_at:quantity: 1currency: USD- name: Product 314715- slug: product-314715+ name: Product 318715+ slug: product-318715options_text: ''price: '10.00'display_price: "$10.00"@@ -2371,7 +2615,7 @@ paths:order_minimum_shortfall:below_order_minimum: falsefreight_summary:- shipping_eq_billing_address: true+ shipping_eq_billing_address: falsediscounts: []fees: []items:@@ -2382,8 +2626,8 @@ paths:preorder_ships_at:quantity: 1currency: USD- name: Product 3152171- slug: product-3152171+ name: Product 3192171+ slug: product-3192171options_text: ''price: '10.00'display_price: "$10.00"@@ -2555,7 +2799,7 @@ paths:order_minimum_shortfall:below_order_minimum: falsefreight_summary:- shipping_eq_billing_address: true+ shipping_eq_billing_address: falsediscounts: []fees: []items: []@@ -2671,7 +2915,7 @@ paths:total_quantity: 0warnings:- code: line_item_removed- message: Product 319307 was removed because it was sold out+ message: Product 323307 was removed because it was sold outline_item_id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJcoupon_code:@@ -2720,7 +2964,7 @@ paths:order_minimum_shortfall:below_order_minimum: falsefreight_summary:- shipping_eq_billing_address: true+ shipping_eq_billing_address: falsediscounts: []fees:- id: fee_UkLWZg9DAJ@@ -2903,7 +3147,7 @@ paths:order_minimum_shortfall:below_order_minimum: falsefreight_summary:- shipping_eq_billing_address: true+ shipping_eq_billing_address: falsediscounts: []fees: []items:@@ -2914,8 +3158,8 @@ paths:preorder_ships_at:quantity: 1currency: USD- name: Product 3203263- slug: product-3203263+ name: Product 3243263+ slug: product-3243263options_text: ''price: '10.00'display_price: "$10.00"@@ -3138,8 +3382,8 @@ paths:preorder_ships_at:quantity: 1currency: USD- name: Product 3228992- slug: product-3228992+ name: Product 3268992+ slug: product-3268992options_text: ''price: '10.00'display_price: "$10.00"@@ -3169,7 +3413,7 @@ paths:first_name: Johnlast_name: Doefull_name: John Doe- address1: 375 Lovely Street+ address1: 384 Lovely Streetaddress2: Northwestpostal_code: '10118'city: New York@@ -3185,13 +3429,17 @@ paths:state_abbr: NYcountry_iso: USstate_name: New York+ owner:+ id: cust_UkLWZg9DAJ+ type: customer+ name:shipping_address:id: addr_UkLWZg9DAJlabel:first_name: Johnlast_name: Doefull_name: John Doe- address1: 374 Lovely Street+ address1: 383 Lovely Streetaddress2: Northwestpostal_code: '10118'city: New York@@ -3207,6 +3455,10 @@ paths:state_abbr: NYcountry_iso: USstate_name: New York+ owner:+ id: cust_UkLWZg9DAJ+ type: customer+ name:payment_methods: []gift_card:market:@@ -3362,7 +3614,7 @@ paths:gateway_payment_profile_id:payment_method:id: pm_UkLWZg9DAJ- name: Check 8+ name: Check 9description:type: checksession_required: false@@ -3379,8 +3631,8 @@ paths:preorder_ships_at:quantity: 1currency: USD- name: Product 3254794- slug: product-3254794+ name: Product 3294794+ slug: product-3294794options_text: ''price: '10.00'display_price: "$10.00"@@ -3434,8 +3686,8 @@ paths:deliveries: []delivery_method:id: dm_UkLWZg9DAJ- name: UPS Ground 173- code: UPS_GROUND_191+ name: UPS Ground 174+ code: UPS_GROUND_192estimated_transit_business_days_min:estimated_transit_business_days_max:digital: false@@ -3458,7 +3710,7 @@ paths:delivery_rates:- id: dr_gbHJdmfrXBdelivery_method_id: dm_UkLWZg9DAJ- name: UPS Ground 173+ name: UPS Ground 174selected: truecost: '10.00'total: '10.00'@@ -3477,8 +3729,8 @@ paths:display_tax_total: "$0.00"delivery_method:id: dm_UkLWZg9DAJ- name: UPS Ground 173- code: UPS_GROUND_191+ name: UPS Ground 174+ code: UPS_GROUND_192estimated_transit_business_days_min:estimated_transit_business_days_max:digital: false@@ -3490,7 +3742,7 @@ paths:first_name: Johnlast_name: Doefull_name: John Doe- address1: 381 Lovely Street+ address1: 390 Lovely Streetaddress2: Northwestpostal_code: '10118'city: New York@@ -3506,13 +3758,14 @@ paths:state_abbr: NYcountry_iso: USstate_name: New York+ owner:shipping_address:id: addr_OIJLhNcSbflabel:first_name: Johnlast_name: Doefull_name: John Doe- address1: 380 Lovely Street+ address1: 389 Lovely Streetaddress2: Northwestpostal_code: '10118'city: New York@@ -3528,6 +3781,7 @@ paths:state_abbr: NYcountry_iso: USstate_name: New York+ owner:gift_card:market:id: mkt_UkLWZg9DAJ@@ -3687,7 +3941,7 @@ paths:order_minimum_shortfall:below_order_minimum: falsefreight_summary:- shipping_eq_billing_address: true+ shipping_eq_billing_address: falsediscounts: []fees: []items:@@ -3698,8 +3952,8 @@ paths:preorder_ships_at:quantity: 1currency: USD- name: Product 3582614- slug: product-3582614+ name: Product 3622614+ slug: product-3622614options_text: ''price: '10.00'display_price: "$10.00"@@ -3882,7 +4136,7 @@ paths:order_minimum_shortfall:below_order_minimum: falsefreight_summary:- shipping_eq_billing_address: true+ shipping_eq_billing_address: falsediscounts: []fees: []items:@@ -3893,8 +4147,8 @@ paths:preorder_ships_at:quantity: 1currency: USD- name: Product 3593461- slug: product-3593461+ name: Product 3633461+ slug: product-3633461options_text: ''price: '10.00'display_price: "$10.00"@@ -4082,8 +4336,8 @@ paths:preorder_ships_at:quantity: 1currency: USD- name: Product 3618182- slug: product-3618182+ name: Product 3658182+ slug: product-3658182options_text: ''price: '10.00'display_price: "$10.00"@@ -4137,8 +4391,8 @@ paths:deliveries: []delivery_method:id: dm_UkLWZg9DAJ- name: UPS Ground 194- code: UPS_GROUND_213+ name: UPS Ground 195+ code: UPS_GROUND_214estimated_transit_business_days_min:estimated_transit_business_days_max:digital: false@@ -4161,7 +4415,7 @@ paths:delivery_rates:- id: dr_gbHJdmfrXBdelivery_method_id: dm_UkLWZg9DAJ- name: UPS Ground 194+ name: UPS Ground 195selected: truecost: '10.00'total: '10.00'@@ -4180,8 +4434,8 @@ paths:display_tax_total: "$0.00"delivery_method:id: dm_UkLWZg9DAJ- name: UPS Ground 194- code: UPS_GROUND_213+ name: UPS Ground 195+ code: UPS_GROUND_214estimated_transit_business_days_min:estimated_transit_business_days_max:digital: false@@ -4194,7 +4448,7 @@ paths:first_name: Johnlast_name: Doefull_name: John Doe- address1: 496 Lovely Street+ address1: 509 Lovely Streetaddress2: Northwestpostal_code: '10118'city: New York@@ -4210,6 +4464,7 @@ paths:state_abbr: NYcountry_iso: USstate_name: New York+ owner:payment_methods: []gift_card:market:@@ -4391,7 +4646,7 @@ paths:order_minimum_shortfall:below_order_minimum: falsefreight_summary:- shipping_eq_billing_address: true+ shipping_eq_billing_address: falsediscounts: []fees: []items:@@ -4402,8 +4657,8 @@ paths:preorder_ships_at:quantity: 1currency: USD- name: Product 3635702- slug: product-3635702+ name: Product 3675702+ slug: product-3675702options_text: ''price: '10.00'display_price: "$10.00"@@ -4635,7 +4890,7 @@ paths:order_minimum_shortfall:below_order_minimum: falsefreight_summary:- shipping_eq_billing_address: true+ shipping_eq_billing_address: falsediscounts: []fees: []items:@@ -4646,8 +4901,8 @@ paths:preorder_ships_at:quantity: 1currency: USD- name: Product 3679569- slug: product-3679569+ name: Product 3719569+ slug: product-3719569options_text: ''price: '10.00'display_price: "$10.00"@@ -4776,10 +5031,10 @@ paths:total_quantity: 2warnings:- code: delivery_unavailable- message: Product 37063 cannot be delivered to the selected address+ message: Product 37463 cannot be delivered to the selected addressline_item_id: li_UkLWZg9DAJ- code: delivery_unavailable- message: Product 371298 cannot be delivered to the selected address+ message: Product 375298 cannot be delivered to the selected addressline_item_id: li_gbHJdmfrXBcoupon_code:item_total: '29.99'@@ -4827,7 +5082,7 @@ paths:order_minimum_shortfall:below_order_minimum: falsefreight_summary:- shipping_eq_billing_address: true+ shipping_eq_billing_address: falsediscounts: []fees: []items:@@ -4838,8 +5093,8 @@ paths:preorder_ships_at:quantity: 1currency: USD- name: Product 37063- slug: product-37063+ name: Product 37463+ slug: product-37463options_text: ''price: '10.00'display_price: "$10.00"@@ -4869,8 +5124,8 @@ paths:preorder_ships_at:quantity: 1currency: USD- name: Product 371298- slug: product-371298+ name: Product 375298+ slug: product-375298options_text: ''price: '19.99'display_price: "$19.99"@@ -5074,7 +5329,7 @@ paths:order_minimum_shortfall:below_order_minimum: falsefreight_summary:- shipping_eq_billing_address: true+ shipping_eq_billing_address: falsediscounts: []fees: []items:@@ -5085,8 +5340,8 @@ paths:preorder_ships_at:quantity: 1currency: USD- name: Product 3779165- slug: product-3779165+ name: Product 3819165+ slug: product-3819165options_text: ''price: '10.00'display_price: "$10.00"@@ -5250,7 +5505,7 @@ paths:order_minimum_shortfall:below_order_minimum: falsefreight_summary:- shipping_eq_billing_address: true+ shipping_eq_billing_address: falsediscounts: []fees: []items: []@@ -5716,7 +5971,7 @@ paths:source:payment_method:id: pm_UkLWZg9DAJ- name: Check 9+ name: Check 10description:type: checksession_required: false@@ -5882,7 +6137,7 @@ paths:order_minimum_shortfall:below_order_minimum: falsefreight_summary:- shipping_eq_billing_address: true+ shipping_eq_billing_address: falsediscounts: []fees: []items:@@ -5893,8 +6148,8 @@ paths:preorder_ships_at:quantity: 1currency: USD- name: Product 4429789- slug: product-4429789+ name: Product 4469789+ slug: product-4469789options_text: ''price: '10.00'display_price: "$10.00"@@ -6067,7 +6322,7 @@ paths:order_minimum_shortfall:below_order_minimum: falsefreight_summary:- shipping_eq_billing_address: true+ shipping_eq_billing_address: falsediscounts: []fees: []items:@@ -6078,8 +6333,8 @@ paths:preorder_ships_at:quantity: 1currency: USD- name: Product 444179- slug: product-444179+ name: Product 448179+ slug: product-448179options_text: ''price: '10.00'display_price: "$10.00"@@ -6439,8 +6694,8 @@ paths:preorder_ships_at:quantity: 1currency: USD- name: Product 381496- slug: product-381496+ name: Product 385496+ slug: product-385496options_text: ''price: '10.00'display_price: "$10.00"@@ -6503,8 +6758,8 @@ paths:delivered_at:delivery_method:id: dm_UkLWZg9DAJ- name: UPS Ground 208- code: UPS_GROUND_227+ name: UPS Ground 209+ code: UPS_GROUND_228estimated_transit_business_days_min:estimated_transit_business_days_max:digital: false@@ -6527,7 +6782,7 @@ paths:delivery_rates:- id: dr_gbHJdmfrXBdelivery_method_id: dm_UkLWZg9DAJ- name: UPS Ground 208+ name: UPS Ground 209selected: truecost: '10.00'total: '10.00'@@ -6546,8 +6801,8 @@ paths:display_tax_total: "$0.00"delivery_method:id: dm_UkLWZg9DAJ- name: UPS Ground 208- code: UPS_GROUND_227+ name: UPS Ground 209+ code: UPS_GROUND_228estimated_transit_business_days_min:estimated_transit_business_days_max:digital: false@@ -6559,7 +6814,7 @@ paths:first_name: Johnlast_name: Doefull_name: John Doe- address1: 552 Lovely Street+ address1: 565 Lovely Streetaddress2: Northwestpostal_code: '10118'city: New York@@ -6575,13 +6830,14 @@ paths:state_abbr: NYcountry_iso: USstate_name: New York+ owner:shipping_address:id: addr_gbHJdmfrXBlabel:first_name: Johnlast_name: Doefull_name: John Doe- address1: 553 Lovely Street+ address1: 566 Lovely Streetaddress2: Northwestpostal_code: '10118'city: New York@@ -6597,6 +6853,7 @@ paths:state_abbr: NYcountry_iso: USstate_name: New York+ owner:gift_card:market:id: mkt_UkLWZg9DAJ@@ -6925,6 +7182,10 @@ paths:state_abbr: NYcountry_iso: USstate_name: New York+ owner:+ id: cust_UkLWZg9DAJ+ type: customer+ name:- id: addr_gbHJdmfrXBlabel:first_name: John@@ -6946,6 +7207,10 @@ paths:state_abbr: NYcountry_iso: USstate_name: New York+ owner:+ id: cust_UkLWZg9DAJ+ type: customer+ name:- id: addr_EfhxLZ9ck8label:first_name: John@@ -6967,6 +7232,10 @@ paths:state_abbr: NYcountry_iso: USstate_name: New York+ owner:+ id: cust_UkLWZg9DAJ+ type: customer+ name:meta:page: 1limit: 25@@ -7068,6 +7337,10 @@ paths:state_abbr: NYcountry_iso: USstate_name: New York+ owner:+ id: cust_UkLWZg9DAJ+ type: customer+ name:schema:"$ref": "#/components/schemas/Address"'422':@@ -7173,6 +7446,10 @@ paths:state_abbr: NYcountry_iso: USstate_name: New York+ owner:+ id: cust_UkLWZg9DAJ+ type: customer+ name:schema:"$ref": "#/components/schemas/Address"'404':@@ -7255,6 +7532,10 @@ paths:state_abbr: NYcountry_iso: USstate_name: New York+ owner:+ id: cust_UkLWZg9DAJ+ type: customer+ name:schema:"$ref": "#/components/schemas/Address"requestBody:@@ -7793,8 +8074,8 @@ paths:preorder_ships_at:quantity: 1currency: USD- name: Product 3455270- slug: product-3455270+ name: Product 3495270+ slug: product-3495270options_text: ''price: '10.00'display_price: "$10.00"@@ -7857,8 +8138,8 @@ paths:delivered_at:delivery_method:id: dm_UkLWZg9DAJ- name: UPS Ground 186- code: UPS_GROUND_204+ name: UPS Ground 187+ code: UPS_GROUND_205estimated_transit_business_days_min:estimated_transit_business_days_max:digital: false@@ -7881,7 +8162,7 @@ paths:delivery_rates:- id: dr_gbHJdmfrXBdelivery_method_id: dm_UkLWZg9DAJ- name: UPS Ground 186+ name: UPS Ground 187selected: truecost: '10.00'total: '10.00'@@ -7900,8 +8181,8 @@ paths:display_tax_total: "$0.00"delivery_method:id: dm_UkLWZg9DAJ- name: UPS Ground 186- code: UPS_GROUND_204+ name: UPS Ground 187+ code: UPS_GROUND_205estimated_transit_business_days_min:estimated_transit_business_days_max:digital: false@@ -7913,7 +8194,7 @@ paths:first_name: Johnlast_name: Doefull_name: John Doe- address1: 440 Lovely Street+ address1: 449 Lovely Streetaddress2: Northwestpostal_code: '10118'city: New York@@ -7929,13 +8210,14 @@ paths:state_abbr: NYcountry_iso: USstate_name: New York+ owner:shipping_address:id: addr_VqXmZF31wYlabel:first_name: Johnlast_name: Doefull_name: John Doe- address1: 441 Lovely Street+ address1: 450 Lovely Streetaddress2: Northwestpostal_code: '10118'city: New York@@ -7951,6 +8233,7 @@ paths:state_abbr: NYcountry_iso: USstate_name: New York+ owner:gift_card:market:id: mkt_UkLWZg9DAJ@@ -8120,8 +8403,8 @@ paths:preorder_ships_at:quantity: 1currency: USD- name: Product 3475633- slug: product-3475633+ name: Product 3515633+ slug: product-3515633options_text: ''price: '10.00'display_price: "$10.00"@@ -8184,8 +8467,8 @@ paths:delivered_at:delivery_method:id: dm_UkLWZg9DAJ- name: UPS Ground 188- code: UPS_GROUND_206+ name: UPS Ground 189+ code: UPS_GROUND_207estimated_transit_business_days_min:estimated_transit_business_days_max:digital: false@@ -8208,7 +8491,7 @@ paths:delivery_rates:- id: dr_gbHJdmfrXBdelivery_method_id: dm_UkLWZg9DAJ- name: UPS Ground 188+ name: UPS Ground 189selected: truecost: '10.00'total: '10.00'@@ -8227,8 +8510,8 @@ paths:display_tax_total: "$0.00"delivery_method:id: dm_UkLWZg9DAJ- name: UPS Ground 188- code: UPS_GROUND_206+ name: UPS Ground 189+ code: UPS_GROUND_207estimated_transit_business_days_min:estimated_transit_business_days_max:digital: false@@ -8240,7 +8523,7 @@ paths:first_name: Johnlast_name: Doefull_name: John Doe- address1: 446 Lovely Street+ address1: 455 Lovely Streetaddress2: Northwestpostal_code: '10118'city: New York@@ -8256,13 +8539,14 @@ paths:state_abbr: NYcountry_iso: USstate_name: New York+ owner:shipping_address:id: addr_VqXmZF31wYlabel:first_name: Johnlast_name: Doefull_name: John Doe- address1: 447 Lovely Street+ address1: 456 Lovely Streetaddress2: Northwestpostal_code: '10118'city: New York@@ -8278,6 +8562,7 @@ paths:state_abbr: NYcountry_iso: USstate_name: New York+ owner:gift_card:market:id: mkt_UkLWZg9DAJ@@ -8455,7 +8740,7 @@ paths:first_name: Johnlast_name: Doefull_name: John Doe- address1: 452 Lovely Street+ address1: 461 Lovely Streetaddress2: Northwestpostal_code: '10118'city: New York@@ -8471,12 +8756,16 @@ paths:state_abbr: NYcountry_iso: USstate_name: New York+ owner:+ id: cust_UkLWZg9DAJ+ type: customer+ name:- id: addr_gbHJdmfrXBlabel:first_name: Johnlast_name: Doefull_name: John Doe- address1: 453 Lovely Street+ address1: 462 Lovely Streetaddress2: Northwestpostal_code: '10118'city: New York@@ -8492,13 +8781,17 @@ paths:state_abbr: NYcountry_iso: USstate_name: New York+ owner:+ id: cust_UkLWZg9DAJ+ type: customer+ name:default_billing_address:id: addr_gbHJdmfrXBlabel:first_name: Johnlast_name: Doefull_name: John Doe- address1: 453 Lovely Street+ address1: 462 Lovely Streetaddress2: Northwestpostal_code: '10118'city: New York@@ -8514,13 +8807,17 @@ paths:state_abbr: NYcountry_iso: USstate_name: New York+ owner:+ id: cust_UkLWZg9DAJ+ type: customer+ name:default_shipping_address:id: addr_UkLWZg9DAJlabel:first_name: Johnlast_name: Doefull_name: John Doe- address1: 452 Lovely Street+ address1: 461 Lovely Streetaddress2: Northwestpostal_code: '10118'city: New York@@ -8536,6 +8833,10 @@ paths:state_abbr: NYcountry_iso: USstate_name: New York+ owner:+ id: cust_UkLWZg9DAJ+ type: customer+ name:newsletter_subscriber:customer_groups: []schema:@@ -8612,7 +8913,7 @@ paths:first_name: Johnlast_name: Doefull_name: John Doe- address1: 454 Lovely Street+ address1: 463 Lovely Streetaddress2: Northwestpostal_code: '10118'city: New York@@ -8628,12 +8929,16 @@ paths:state_abbr: NYcountry_iso: USstate_name: New York+ owner:+ id: cust_UkLWZg9DAJ+ type: customer+ name:- id: addr_gbHJdmfrXBlabel:first_name: Johnlast_name: Doefull_name: John Doe- address1: 455 Lovely Street+ address1: 464 Lovely Streetaddress2: Northwestpostal_code: '10118'city: New York@@ -8649,13 +8954,17 @@ paths:state_abbr: NYcountry_iso: USstate_name: New York+ owner:+ id: cust_UkLWZg9DAJ+ type: customer+ name:default_billing_address:id: addr_gbHJdmfrXBlabel:first_name: Johnlast_name: Doefull_name: John Doe- address1: 455 Lovely Street+ address1: 464 Lovely Streetaddress2: Northwestpostal_code: '10118'city: New York@@ -8671,13 +8980,17 @@ paths:state_abbr: NYcountry_iso: USstate_name: New York+ owner:+ id: cust_UkLWZg9DAJ+ type: customer+ name:default_shipping_address:id: addr_UkLWZg9DAJlabel:first_name: Johnlast_name: Doefull_name: John Doe- address1: 454 Lovely Street+ address1: 463 Lovely Streetaddress2: Northwestpostal_code: '10118'city: New York@@ -8693,6 +9006,10 @@ paths:state_abbr: NYcountry_iso: USstate_name: New York+ owner:+ id: cust_UkLWZg9DAJ+ type: customer+ name:newsletter_subscriber:customer_groups: []schema:@@ -10921,7 +11238,7 @@ paths:variant:id: variant_gbHJdmfrXBproduct_id: prod_gbHJdmfrXB- sku: SKU-550+ sku: SKU-556options_text: ''track_inventory: truemedia_count: 0@@ -11007,7 +11324,7 @@ paths:variant:id: variant_UkLWZg9DAJproduct_id: prod_UkLWZg9DAJ- sku: SKU-551+ sku: SKU-557options_text: ''track_inventory: truemedia_count: 0@@ -12133,7 +12450,7 @@ paths:first_name:last_name:full_name: ''- address1: 410 Lovely Street+ address1: 419 Lovely Streetaddress2: Northwestpostal_code: '10118'city: New York@@ -12149,6 +12466,10 @@ paths:state_abbr: NYcountry_iso: USstate_name: New York+ owner:+ id: comp_UkLWZg9DAJ+ type: company+ name: Acme Industrialmeta:page: 1limit: 25@@ -12206,6 +12527,10 @@ paths:state_abbr: NYcountry_iso: USstate_name: New York+ owner:+ id: comp_UkLWZg9DAJ+ type: company+ name: Acme Industrialschema:"$ref": "#/components/schemas/Address"requestBody:@@ -12259,7 +12584,7 @@ paths:first_name:last_name:full_name: ''- address1: 416 Lovely Street+ address1: 425 Lovely Streetaddress2: Northwestpostal_code: '10118'city: New York@@ -12275,6 +12600,10 @@ paths:state_abbr: NYcountry_iso: USstate_name: New York+ owner:+ id: comp_UkLWZg9DAJ+ type: company+ name: Acme Industrialschema:"$ref": "#/components/schemas/Address"requestBody:@@ -12525,8 +12854,8 @@ paths:preorder_ships_at:quantity: 1currency: USD- name: Product 3445649- slug: product-3445649+ name: Product 3485649+ slug: product-3485649options_text: ''price: '10.00'display_price: "$10.00"@@ -12588,8 +12917,8 @@ paths:delivered_at:delivery_method:id: dm_UkLWZg9DAJ- name: UPS Ground 177- code: UPS_GROUND_195+ name: UPS Ground 178+ code: UPS_GROUND_196estimated_transit_business_days_min:estimated_transit_business_days_max:digital: false@@ -12612,7 +12941,7 @@ paths:delivery_rates:- id: dr_gbHJdmfrXBdelivery_method_id: dm_UkLWZg9DAJ- name: UPS Ground 177+ name: UPS Ground 178selected: truecost: '10.00'total: '10.00'@@ -12631,8 +12960,8 @@ paths:display_tax_total: "$0.00"delivery_method:id: dm_UkLWZg9DAJ- name: UPS Ground 177- code: UPS_GROUND_195+ name: UPS Ground 178+ code: UPS_GROUND_196estimated_transit_business_days_min:estimated_transit_business_days_max:digital: false@@ -12644,7 +12973,7 @@ paths:first_name: Johnlast_name: Doefull_name: John Doe- address1: 424 Lovely Street+ address1: 433 Lovely Streetaddress2: Northwestpostal_code: '10118'city: New York@@ -12660,13 +12989,14 @@ paths:state_abbr: NYcountry_iso: USstate_name: New York+ owner:shipping_address:id: addr_VqXmZF31wYlabel:first_name: Johnlast_name: Doefull_name: John Doe- address1: 425 Lovely Street+ address1: 434 Lovely Streetaddress2: Northwestpostal_code: '10118'city: New York@@ -12682,6 +13012,7 @@ paths:state_abbr: NYcountry_iso: USstate_name: New York+ owner:gift_card:market:id: mkt_UkLWZg9DAJ@@ -13614,6 +13945,29 @@ components:required:- variant_id- quantity+ AddressOwner:+ type: object+ properties:+ id:+ type: string+ type:+ anyOf:+ - type: string+ enum:+ - customer+ - company+ - seller+ - type: string+ description: The values listed are the built-in ones; extensions may add+ more.+ name:+ type: string+ nullable: true+ required:+ - id+ - type+ - name+ x-typelizer: trueAddress:type: objectproperties:@@ -13915,6 +14269,10 @@ components:state_name:type: stringnullable: true+ owner:+ allOf:+ - "$ref": "#/components/schemas/AddressOwner"+ nullable: truerequired:- id- label@@ -13937,6 +14295,7 @@ components:- state_abbr- country_iso- state_name+ - ownerx-typelizer: trueAppliedPromotion:type: object@@ -23744,8 +24103,8 @@ components:properties:id:type: string- description: An existing address of the customer to use. The other fields- are then ignored.+ description: An existing address from the buyer's address book, or from+ the book of the company the cart is for. The other fields are then ignored.first_name:type: stringlast_name:@@ -23918,11 +24277,13 @@ components:"$ref": "#/components/schemas/LocaleCode"shipping_address_id:type: string- description: An existing address to ship to.+ description: An existing address to ship to, from the buyer's address book+ or from the book of the company the cart is for. List both with `GET /store/carts/:id/addresses`.example: addr_abc123billing_address_id:type: string- description: An existing address to bill.+ description: An existing address to bill, from the buyer's address book+ or from the book of the company the cart is for. List both with `GET /store/carts/:id/addresses`.example: addr_def456preferred_stock_location_id:type: string@@ -24278,11 +24639,13 @@ components:"$ref": "#/components/schemas/LocaleCode"shipping_address_id:type: string- description: An existing address to ship to.+ description: An existing address to ship to, from the buyer's address book+ or from the book of the company the cart is for. List both with `GET /store/carts/:id/addresses`.example: addr_abc123billing_address_id:type: string- description: An existing address to bill.+ description: An existing address to bill, from the buyer's address book+ or from the book of the company the cart is for. List both with `GET /store/carts/:id/addresses`.example: addr_def456preferred_stock_location_id:type: stringdiff --git a/docs/developer/core-concepts/addresses.mdx b/docs/developer/core-concepts/addresses.mdxindex d13c3efa43..f516e9de32 100644--- a/docs/developer/core-concepts/addresses.mdx+++ b/docs/developer/core-concepts/addresses.mdx@@ -43,6 +43,7 @@ erDiagram| `state_name` | Free text, for countries with no official list || `label` | What the customer filed it under — "Home", "Office" || `is_default_shipping`, `is_default_billing` | Whether it is the default in the address book |+| `owner` | The address book it belongs to — `{ id, type, name }`, where `type` is `customer` or [`company`](/developer/core-concepts/companies). Read-only, and `null` for an address in no book: one a guest typed in, or the copy a placed order keeps |<Note>Countries and states are named by their **ISO codes** — `country_code: "US"`, `state_code: "CA"` — never by an ID. A code means the same thing everywhere, so you can send one without looking anything up first.diff --git a/docs/developer/core-concepts/companies.mdx b/docs/developer/core-concepts/companies.mdxindex b162e5935a..9e26768e8a 100644--- a/docs/developer/core-concepts/companies.mdx+++ b/docs/developer/core-concepts/companies.mdx@@ -215,6 +215,46 @@ curl -X POST 'https://api.mystore.com/api/v3/store/companies/comp_xxx/addresses'Note that a delivery site is just an address. Ten warehouses do not mean ten company nodes — nodes exist for organizational and legal structure, addresses for where things go.+### Addresses inherit downwards++Listing a node's addresses returns its own entries **and** the ones it inherits from the nodes above it, so a division can ship to the headquarters site it shares. Writing one stays with the node that owns it: a division can add and edit its own entries, and reads its parent's without being able to change them. Each entry's `owner` names the node it belongs to, so a client can tell inherited entries apart from the node's own.++### Picking an address at checkout++A member buying for their company ships to the company's sites, not only to their own saved addresses. Set the company on the cart with `company_id` first, then ask the cart which addresses it can use:++<CodeGroup>++```typescript Store SDK+await client.carts.update('cart_xxx', { company_id: 'comp_xxx' })++const { data: addresses } = await client.carts.addresses.list('cart_xxx')++// Each entry names the book it came out of, so a picker can label them.+// A personal purchase has no company sites, so there may be none.+const site = addresses.find((address) => address.owner?.type === 'company')++if (site) {+ await client.carts.update('cart_xxx', { shipping_address_id: site.id })+}+```++```bash cURL+curl 'https://api.mystore.com/api/v3/store/carts/cart_xxx/addresses' \+ -H 'X-Spree-API-Key: pk_xxx' \+ -H 'Authorization: Bearer $CUSTOMER_JWT'+```++</CodeGroup>++This call needs a signed-in customer. Unlike the rest of the cart endpoints, a guest cart token is not enough: what comes back is the account's address books rather than the cart's own contents. A guest cart has neither book, so the list would be empty anyway.++The list holds the buyer's own address book plus the address book of the company set on the cart, limited to the countries the cart's [market](/developer/core-concepts/markets) sells to. Every entry in it is accepted as `shipping_address_id` or `billing_address_id`, so a picker built from it never offers an address the checkout cannot use. A buyer who belongs to a single company still has to set it on the cart: until then, only their own addresses are listed and accepted. An address belonging to anyone else is rejected, and completing the order copies the chosen address onto it, leaving the book entry free to be renamed or retired later.++Each entry carries the `owner` it is filed under — `{ id, type, name }`, where `type` is `customer` or `company` — so a picker can group and label the two books from one response. An inherited site names the node that owns it rather than the one the cart is for, so a division's own docks and the headquarters docks it shares are told apart.++Staff placing an order get the same reach: `shipping_address_id` and `billing_address_id` on the Admin API's order creation accept the company's sites, and `use_customer_default_address` fills the slots from the company's defaults when the request names a company with `company_id`. Without one it takes the customer's own defaults, even for a buyer who belongs to a single company — prefilling follows what the caller asked for rather than inferring an organization on their behalf.+## TaxTax registrations and exemption certificates live **only on legal entities**, and a purchase resolves tax through the node's nearest `company` ancestor.diff --git a/docs/developer/core-concepts/data-privacy.mdx b/docs/developer/core-concepts/data-privacy.mdxindex 534ac3495f..f2f2aa2dbe 100644--- a/docs/developer/core-concepts/data-privacy.mdx+++ b/docs/developer/core-concepts/data-privacy.mdx@@ -141,6 +141,14 @@ trade one legal duty for another. On order addresses the country, state and atruncated postal code survive deliberately, so the jurisdiction a past sale wastaxed in stays provable.+A business-to-business order is the narrower case. An address book belonging to+a company is left alone entirely — it is shared by every member, and one+person's erasure is no warrant to rewrite it. Where an order recorded delivery+to one of the company's sites, the contact name and phone on that record are+erased and the site and trading name stay: they are the company's details, not+the person's, and taking them would erase the merchant's record of a lawful+sale along with them.+A `customer.anonymized` event is published when it completes.<Warning>diff --git a/docs/plans/6.0-b2b-storefront-purchasing.md b/docs/plans/6.0-b2b-storefront-purchasing.mdindex fcbd61b81d..1c55c542e9 100644--- a/docs/plans/6.0-b2b-storefront-purchasing.md+++ b/docs/plans/6.0-b2b-storefront-purchasing.md@@ -66,8 +66,18 @@ this plan is the single record for the work in both repos.so the book row is never frozen by a sale. A company address never entersthe *customer's* book and vice versa; the guard refuses ids across thatline exactly as it refuses another customer's.+- **A purchase deletes only the rows it owns.** Pointing a cart at a book+ entry means the cart borrows it, so the bill/ship cascade was narrowed from+ `dependent: :destroy` to the ownerless rows — the guest's typed-in address+ and the snapshot completion writes. Without that, deleting a cart deleted+ whatever it happened to be pointing at, which for a company site is shared+ tenant data any member could have wiped. `Purchase::Addresses#owns_address?`+ is the one predicate; anything else that destroys a purchase asks it rather+ than restating the rule.- **Company context is explicit past one membership.** A buyer with a single- standing gets it resolved silently (`sole_standing_company`, shipped); a+ standing gets catalog, pricing and tax resolved silently+ (`sole_standing_company`, shipped), but not the company address book,+ which needs the cart's `company_id` set; abuyer with several picks the node at checkout, writing the cart's`company_id` (shipped, standing-validated). The storefront never guessesbetween memberships. Buying personally remains possible: clearing the@@ -118,14 +128,24 @@ navigation only when `GET /store/account/companies` returns memberships:cart's company: set later, the buyer reviews a basket priced for the wrongaudience and watches the totals move at the last step.- **Address step.** With a company on the cart, `AddressSelector` lists the- company book **only** — fetched from the company addresses endpoint,- walking the same node-then-ancestors chain the server prefills from, with- the company's default preselected. The buyer's personal book is hidden: a- purchase for the organization ships to the organization's sites, and- offering someone's home address beside them invites the mis-click (the- Shopify behaviour). Company entries submit by id like personal ones do;- the "new address" form is unchanged and writes a plain cart address, never- into the company book — curating the book is the account area's job.+ company book **and** the buyer's own, as labelled groups — the company's+ sites first, under the name of the node that owns them, then "Your+ addresses" — with the company's default shipping site preselected. The+ whole list comes from `GET /store/carts/:id/addresses` in one call, grouped+ by the `owner` each entry carries. Company entries submit by id like+ personal ones do; the "new address" form is unchanged and writes a plain+ cart address, never into the company book — curating the book is the+ account area's job. The Edit control is withheld from the company groups:+ those rows belong to the organization, and the customer address endpoint+ would refuse the write.++ **Corrected 2026-10-19.** This first shipped reassembling the list in the+ storefront from `/account/companies`, `/companies/:id` and the two address+ endpoints — three round-trips, and `sole_standing_company` restated in+ TypeScript, which is exactly what the cart endpoint below exists to+ prevent. Asking the cart also fixed a quieter wrong: every company address+ was labelled with the cart's node, so a headquarters dock a division+ inherits was filed under the division. Each entry now names its own owner.- **Order display.** The order-placed page and the account order page namethe company the purchase was for (already on the store order serializer).@@ -165,6 +185,76 @@ the customer-shaped assumptions reached.is proved against both a customer and a company node in the`HasAddressBook` spec, including the race.+### Follow-up (2026-10-15) — the guard was widened, the paths to it were not++The widened guard was only ever reachable from the model. Everything that+resolves a client-supplied address id sat in front of it and narrowed to the+customer first, so a company address was dropped before `selectable_address`+saw it. This round closes that and extends the same reach to the surfaces+staff use, since most B2B orders are keyed in rather than checked out.++- `Spree::Carts::Update#resolve_address_id` looked the id up in+ `cart.customer.addresses`. **This is the bug the storefront work was+ written against**: a buyer picking a company site saw checkout keep whatever+ was in the slot before, with no error. It now asks the cart, which is the+ one place that knows both books.+- `selectable_address` is public and takes a prefixed id or a raw key, so+ every caller shares one rule instead of restating it. `selectable_addresses`+ is its listing counterpart — the buyer's book unioned with the named+ company's `address_book`, soft-deleted rows excluded, limited to the+ countries of the purchase's market. The listing is a subset of what the+ writers accept: a billing address abroad is still accepted by id, but a+ picker never offers an address the checkout cannot deliver to.+- **The company book follows the cart's explicit `company_id` only**+ (2026-10-22), never `sole_standing_company`. Which addresses a checkout+ offers is the storefront's decision; inferring the company from a sole+ membership made the accepted set depend on a rule the client could not+ see, since the cart reports the stored column. Catalog, pricing and tax+ keep the sole-standing fallback.+- **`GET /store/carts/:id/addresses`** (new, read-only) returns that union.+ Without it a storefront has to merge the personal and company books and+ filter them by the market's countries itself — two places to drift from+ the server. Curating either book stays with the account and company+ surfaces; this endpoint only answers "what may this cart use".+ **Signed-in customers only**, unlike every other cart endpoint: the answer+ is the account's two books, not the cart's own contents, and a guest token+ proves possession of a cart — possibly one the buyer adopted from whoever+ started it — rather than of the account. It costs nothing, since a guest+ cart has neither book.+ Each entry carries its `owner` so a picker can label the books from the+ one response. Without it the client can tell a warehouse from a flat only+ by asking which company the cart is for — the resolution this endpoint+ exists to keep on the server. `owner` is part of every `Address`, not a+ checkout-only variant: one type serves the picker, the cart's own+ addresses and the company book (whose listing also mixes a node's own+ sites with inherited ones). It is null for an address in no book — a+ guest's, or the copy a placed order keeps.+- `Spree::Orders::Create` accepts a company site as+ `shipping_address_id`/`billing_address_id`, and `use_customer_default_address`+ fills from the company's defaults (inherited from ancestors) when the request+ **names** one. It does **not** fall back to the buyer's personal default+ there: an order for the organization ships to the organization's sites, and+ substituting someone's home address is exactly the mis-delivery this surface+ exists to prevent.+- `Admin::Companies::AddressesController#index` now lists inherited sites,+ matching the Store controller; writes still only reach the owning node.+- `Address#snapshot` freezes the company line before dropping the owner. A+ node's entry normally stores none and reads the node's name through the+ owner, so every completed B2B order was recording a street with no business+ on it. The copy also keeps its `owner_type` so it still answers+ `business_owned?` — a business address names no person, and without it the+ snapshot starts demanding a contact name it never had.+- **Ownership is `owner_id`, never `owner_type`.** The line above overloads+ the type column: a business snapshot has a type and no id. Every test of+ "does anyone own this row" therefore reads the id — `owns_address?`, and+ `Customers::Anonymize`, which matched on both and so quietly stopped+ erasing the contact details on B2B order snapshots. Nothing fails loudly+ when a privacy sweep covers less than it did, so new code near this column+ gets a spec rather than a careful reading.+- Dashboard: the new-order page offers both books behind the existing+ "use default addresses" switch, through a headless `AddressSelect` in+ `dashboard-ui`.+### Explicitly out of scope- Roles, approvals, spend limits, order-on-behalf, invoices — Enterprise@@ -186,6 +276,10 @@ guard.- New storefront company UI calls only the shipped Store API self-serviceendpoints — no new bespoke endpoints without updating this plan.+- Anything resolving a client-supplied address id for a cart or an order asks+ the purchase (`selectable_address` / `selectable_addresses`), never a book+ directly. Narrowing to the customer in front of the guard is what broke this+ once already, and it fails silently.- Nothing storefront-side may branch on a member's "role" — OSS has none;gate on standing (the server already does) and nothing else.- Cart/order code must keep treating `customer_id` and `company_id` as two@@ -195,11 +289,19 @@ guard.## Open QuestionsBoth first-cut questions were answered 2026-08-26 and folded into Design-Details: the address step hides the personal book once a company is on the+Details: the address step hid the personal book once a company was on thecart (strict B2B, the Shopify behaviour), and the company picker appears onthe cart page as well as checkout so catalog pricing is honest while thebuyer is still filling the basket.+The first of those was **reversed on 2026-10-19**: checkout now shows both+books as labelled groups. The strict reading only ever held in the+storefront — the cart has always accepted an id from either book — so hiding+half the list made the UI disagree with the API without preventing anything.+Legibility replaced omission. If the strict behaviour is wanted back, it has+to be enforced on the server (refuse a personal address id once a company is+on the cart), which is a contract change needing its own entry here.+1. **Should a member be able to rename their own company node from thestorefront?** The Store API allows it and `updateCompany` is wired in thestorefront data layer, but no edit control ships — the node page renders@@ -210,6 +312,16 @@ buyer is still filling the basket.the merchant can rename from the dashboard, and Enterprise's roles decidewho may in the portal.+2. **Should the cart token rotate when a guest cart is associated to an+ account?** It does not today, so whoever started a cart keeps a working+ token after the buyer signs in and adopts it. The address listing no+ longer accepts that token, but everything else on the cart still does —+ the line items, the chosen addresses, the email. Rotating closes it and+ costs a contract change: the token is on the cart serializer, so the new+ value comes back in the `associate` response, and any client holding the+ old one (a second tab, a retried request) loses the cart. Raised by the+ 2026-10-19 review; not decided.+## References- `6.0-b2b-companies-and-catalogs.md` — the shipped substrate.diff --git a/packages/admin-sdk/src/types/generated/Address.ts b/packages/admin-sdk/src/types/generated/Address.tsindex 441bee48ab..df0f0305fe 100644--- a/packages/admin-sdk/src/types/generated/Address.ts+++ b/packages/admin-sdk/src/types/generated/Address.ts@@ -1,7 +1,7 @@-// Typelizer digest 03dc69fbb65ff9ecedc1f0f61083253c+// Typelizer digest 04597eec5c9da4000defad75b2fa3b11//// DO NOT MODIFY: This file was automatically generated by Typelizer.-import type {CountryCode} from '@/types'+import type {AddressOwner, CountryCode} from '@/types'interface Address {id: string;@@ -23,14 +23,13 @@ interface Address {is_default_billing: boolean;is_default_shipping: boolean;state_name: string | null;+ owner: AddressOwner | null;metadata: Record<string, unknown>;created_at: string;updated_at: string;latitude: number | null;longitude: number | null;customer_id: string | null;- owner_id: string | null;- owner_type: string | null;}export default Address;diff --git a/packages/admin-sdk/src/types/generated/AddressOwner.ts b/packages/admin-sdk/src/types/generated/AddressOwner.tsnew file mode 100644index 0000000000..aeb25cca4b--- /dev/null+++ b/packages/admin-sdk/src/types/generated/AddressOwner.ts@@ -0,0 +1,12 @@+// Typelizer digest d63b6d88dbcde55551514555b9e995ab+//+// DO NOT MODIFY: This file was automatically generated by Typelizer.+import type {AddressOwnerType} from '@/types'++interface AddressOwner {+ id: string;+ type: AddressOwnerType;+ name: string | null;+}++export default AddressOwner;diff --git a/packages/admin-sdk/src/types/generated/Enums.ts b/packages/admin-sdk/src/types/generated/Enums.tsindex 7318a07b02..278a6c69df 100644--- a/packages/admin-sdk/src/types/generated/Enums.ts+++ b/packages/admin-sdk/src/types/generated/Enums.ts@@ -1,7 +1,8 @@-// Typelizer digest cdb6adfc6a419646986c78dcee805b20+// Typelizer digest 771274d4f112bf2d088672d1632b082e//// DO NOT MODIFY: This file was automatically generated by Typelizer.export type { ActorKind } from '@spree/sdk-core';+export type { AddressOwnerType } from '@spree/sdk-core';export type { ApiKeyType } from '@spree/sdk-core';export type { CaptureMethod } from '@spree/sdk-core';export type { CatalogAssignableType } from '@spree/sdk-core';diff --git a/packages/admin-sdk/src/types/generated/index.ts b/packages/admin-sdk/src/types/generated/index.tsindex 2ec19e91b3..0eb044f5cd 100644--- a/packages/admin-sdk/src/types/generated/index.ts+++ b/packages/admin-sdk/src/types/generated/index.ts@@ -1,8 +1,9 @@-// Typelizer digest b31c2be73196fd09d9e083281ce62250+// Typelizer digest 4a2758b46bf42f6eaba07f0103ccf757//// DO NOT MODIFY: This file was automatically generated by Typelizer.-export type { ActorKind, ApiKeyType, CaptureMethod, CatalogAssignableType, CatalogPriceSource, ClaimResolution, ClaimStatus, CollectionRuleMatchPolicy, CollectionSortOrder, CommissionKind, CompanyInvitationStatus, CompanyKind, ConsentSource, CountryCode, CurrencyCode, DataRequestKind, DataRequestStatus, DeliveryStatus, DeliveryZoneMemberType, DimensionUnit, DiscountKind, DocumentNumberFormat, EmailFont, EmailTemplateKind, ExchangeStatus, FeeKind, FileUploadVisibility, FulfillmentItemStatus, FulfillmentStatus, FulfillmentType, GiftCardStatus, ImportRowStatus, ImportStatus, InvitationStatus, LocaleCode, MatchPolicy, MediaType, OptionTypeKind, OrderFulfillmentStatus, OrderPaymentStatus, OrderStatus, PackageTypeKind, PaymentSourceType, PaymentStatus, PayoutScheduleInterval, PermissionKind, PickupStockPolicy, PriceListStatus, ProductStatus, ProductSubmissionStatus, ProviderFailurePolicy, PurchaseOrderStatus, PurchaseUnit, ReturnStatus, SellerPayoutStatus, SellerRequirementState, SellerRequirementSubmissionStatus, SellerStatus, SellerTransferKind, SellerTransferStatus, ShippingLabelFormat, ShippingLabelOwnerType, ShippingLabelSource, ShippingLabelStatus, StockLocationKind, StockMovementKind, StockReceiptLineType, StockReceiptReceivableType, StockReceiptRejectionReason, StockTransferStatus, StorefrontAccess, TaxExemptionCertificateStatus, TaxIdentifierSource, TaxIdentifierValidationStatus, TaxRemittance, TaxabilityReason, UnitSystem, WeightUnit } from './Enums'+export type { ActorKind, AddressOwnerType, ApiKeyType, CaptureMethod, CatalogAssignableType, CatalogPriceSource, ClaimResolution, ClaimStatus, CollectionRuleMatchPolicy, CollectionSortOrder, CommissionKind, CompanyInvitationStatus, CompanyKind, ConsentSource, CountryCode, CurrencyCode, DataRequestKind, DataRequestStatus, DeliveryStatus, DeliveryZoneMemberType, DimensionUnit, DiscountKind, DocumentNumberFormat, EmailFont, EmailTemplateKind, ExchangeStatus, FeeKind, FileUploadVisibility, FulfillmentItemStatus, FulfillmentStatus, FulfillmentType, GiftCardStatus, ImportRowStatus, ImportStatus, InvitationStatus, LocaleCode, MatchPolicy, MediaType, OptionTypeKind, OrderFulfillmentStatus, OrderPaymentStatus, OrderStatus, PackageTypeKind, PaymentSourceType, PaymentStatus, PayoutScheduleInterval, PermissionKind, PickupStockPolicy, PriceListStatus, ProductStatus, ProductSubmissionStatus, ProviderFailurePolicy, PurchaseOrderStatus, PurchaseUnit, ReturnStatus, SellerPayoutStatus, SellerRequirementState, SellerRequirementSubmissionStatus, SellerStatus, SellerTransferKind, SellerTransferStatus, ShippingLabelFormat, ShippingLabelOwnerType, ShippingLabelSource, ShippingLabelStatus, StockLocationKind, StockMovementKind, StockReceiptLineType, StockReceiptReceivableType, StockReceiptRejectionReason, StockTransferStatus, StorefrontAccess, TaxExemptionCertificateStatus, TaxIdentifierSource, TaxIdentifierValidationStatus, TaxRemittance, TaxabilityReason, UnitSystem, WeightUnit } from './Enums'export type { default as Actor } from './Actor'+export type { default as AddressOwner } from './AddressOwner'export type { default as Address } from './Address'export type { default as AdminUser } from './AdminUser'export type { default as AllowedOrigin } from './AllowedOrigin'diff --git a/packages/admin-sdk/src/types/params/OrderCreateParams.ts b/packages/admin-sdk/src/types/params/OrderCreateParams.tsindex 8bcf918fb0..4001536610 100644--- a/packages/admin-sdk/src/types/params/OrderCreateParams.ts+++ b/packages/admin-sdk/src/types/params/OrderCreateParams.ts@@ -16,7 +16,9 @@ export type OrderCreateParams = {/** Null detaches the customer, leaving a guest order under its `email`. */customer_id?: string | null/**- * With `customer_id`, copies the customer's saved billing and shipping addresses onto the order.+ * Copies the saved default billing and shipping addresses onto the order. Sent with `company_id`,+ * it takes that company's defaults, inherited from its parent nodes when the company holds none+ * of its own; otherwise it takes the customer's.*/use_customer_default_address?: booleancurrency?: CurrencyCode@@ -38,9 +40,15 @@ export type OrderCreateParams = {* `visibility: 'private'`. Null removes the document the order carries.*/po_document_signed_id?: string | null- /** An existing address of the customer. */+ /**+ * An existing address from the customer's address book, or from the address book of the company+ * the order is for.+ */shipping_address_id?: string- /** An existing address of the customer. */+ /**+ * An existing address from the customer's address book, or from the address book of the company+ * the order is for.+ */billing_address_id?: string/*** Stock location to prefer for fulfillment. Order Routing's built-in preferred-location rulediff --git a/packages/admin-sdk/src/zod/generated/Address.ts b/packages/admin-sdk/src/zod/generated/Address.tsindex 471a9fad1d..f32744b686 100644--- a/packages/admin-sdk/src/zod/generated/Address.ts+++ b/packages/admin-sdk/src/zod/generated/Address.ts@@ -1,5 +1,6 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';+import { AddressOwnerSchema } from './AddressOwner';export const AddressSchema = z.object({id: z.string(),@@ -21,14 +22,13 @@ export const AddressSchema = z.object({is_default_billing: z.boolean(),is_default_shipping: z.boolean(),state_name: z.string().nullable(),+ owner: AddressOwnerSchema.nullable(),metadata: z.record(z.string(), z.unknown()),created_at: z.string(),updated_at: z.string(),latitude: z.number().nullable(),longitude: z.number().nullable(),customer_id: z.string().nullable(),- owner_id: z.string().nullable(),- owner_type: z.string().nullable(),});export type Address = z.infer<typeof AddressSchema>;diff --git a/packages/admin-sdk/src/zod/generated/AddressOwner.ts b/packages/admin-sdk/src/zod/generated/AddressOwner.tsnew file mode 100644index 0000000000..1c899f45ce--- /dev/null+++ b/packages/admin-sdk/src/zod/generated/AddressOwner.ts@@ -0,0 +1,10 @@+// This file is auto-generated. Do not edit directly.+import { z } from 'zod';++export const AddressOwnerSchema = z.object({+ id: z.string(),+ type: z.string(),+ name: z.string().nullable(),+});++export type AddressOwner = z.infer<typeof AddressOwnerSchema>;diff --git a/packages/admin-sdk/src/zod/generated/index.ts b/packages/admin-sdk/src/zod/generated/index.tsindex fc0000cf57..5f43ff2bc8 100644--- a/packages/admin-sdk/src/zod/generated/index.ts+++ b/packages/admin-sdk/src/zod/generated/index.ts@@ -1,6 +1,7 @@// This file is auto-generated. Do not edit directly.export { ActorSchema, type Actor } from './Actor';export { AddressSchema, type Address } from './Address';+export { AddressOwnerSchema, type AddressOwner } from './AddressOwner';export { AdminUserSchema, type AdminUser } from './AdminUser';export { AllowedOriginSchema, type AllowedOrigin } from './AllowedOrigin';export { ApiKeySchema, type ApiKey } from './ApiKey';diff --git a/packages/core/src/enums.generated.ts b/packages/core/src/enums.generated.tsindex 0535a0219e..a1e39475df 100644--- a/packages/core/src/enums.generated.ts+++ b/packages/core/src/enums.generated.ts@@ -4,6 +4,10 @@export const ACTOR_KINDS = ['admin_user', 'api_key'] as constexport type ActorKind = (typeof ACTOR_KINDS)[number] | (string & {})+/** The built-in values of `AddressOwnerType`. Extensions may add more. */+export const ADDRESS_OWNER_TYPES = ['customer', 'company', 'seller'] as const+export type AddressOwnerType = (typeof ADDRESS_OWNER_TYPES)[number] | (string & {})+/** Every value of `ApiKeyType`. */export const API_KEY_TYPES = ['publishable', 'secret'] as constexport type ApiKeyType = (typeof API_KEY_TYPES)[number]diff --git a/packages/dashboard-core/src/locales/ar.json b/packages/dashboard-core/src/locales/ar.jsonindex 01cc73c6ac..85d7e47604 100644--- a/packages/dashboard-core/src/locales/ar.json+++ b/packages/dashboard-core/src/locales/ar.json@@ -1,5 +1,8 @@{"admin": {+ "address_select": {+ "none": "لم يتم اختيار عنوان"+ },"app_name": "Spree Admin","a11y": {"breadcrumb": "مسار التنقل",@@ -97,6 +100,7 @@"address_book": {"default_billing": "الفوترة الافتراضية","default_shipping": "الشحن الافتراضي",+ "inherited_from": "موروث من {{name}}","set_default_billing": "تعيين كعنوان فوترة افتراضي","set_default_shipping": "تعيين كعنوان شحن افتراضي"},diff --git a/packages/dashboard-core/src/locales/de.json b/packages/dashboard-core/src/locales/de.jsonindex 2a1f0b5c9f..2725edb54a 100644--- a/packages/dashboard-core/src/locales/de.json+++ b/packages/dashboard-core/src/locales/de.json@@ -1,5 +1,8 @@{"admin": {+ "address_select": {+ "none": "Keine Adresse ausgewählt"+ },"app_name": "Spree Admin","a11y": {"breadcrumb": "Breadcrumb",@@ -97,6 +100,7 @@"address_book": {"default_billing": "Standard-Rechnung","default_shipping": "Standard-Versand",+ "inherited_from": "Geerbt von {{name}}","set_default_billing": "Als Standard-Rechnungsadresse festlegen","set_default_shipping": "Als Standard-Versandadresse festlegen"},diff --git a/packages/dashboard-core/src/locales/en.json b/packages/dashboard-core/src/locales/en.jsonindex 6370afb0ba..2b3ee2b1ff 100644--- a/packages/dashboard-core/src/locales/en.json+++ b/packages/dashboard-core/src/locales/en.json@@ -1,5 +1,8 @@{"admin": {+ "address_select": {+ "none": "No address selected"+ },"app_name": "Spree Admin","a11y": {"breadcrumb": "Breadcrumb",@@ -97,6 +100,7 @@"address_book": {"default_billing": "Default billing","default_shipping": "Default shipping",+ "inherited_from": "Inherited from {{name}}","set_default_billing": "Set as default billing","set_default_shipping": "Set as default shipping"},diff --git a/packages/dashboard-core/src/locales/es.json b/packages/dashboard-core/src/locales/es.jsonindex 8a9994b163..97f90f0606 100644--- a/packages/dashboard-core/src/locales/es.json+++ b/packages/dashboard-core/src/locales/es.json@@ -1,5 +1,8 @@{"admin": {+ "address_select": {+ "none": "Ninguna dirección seleccionada"+ },"components": {"address_block": {"not_provided": "No proporcionado"@@ -2003,6 +2006,7 @@"address_book": {"default_billing": "Facturación predeterminada","default_shipping": "Envío predeterminado",+ "inherited_from": "Heredada de {{name}}","set_default_billing": "Establecer como facturación predeterminada","set_default_shipping": "Establecer como envío predeterminado"},diff --git a/packages/dashboard-core/src/locales/fr.json b/packages/dashboard-core/src/locales/fr.jsonindex 0f5da64864..5576af2fff 100644--- a/packages/dashboard-core/src/locales/fr.json+++ b/packages/dashboard-core/src/locales/fr.json@@ -1,5 +1,8 @@{"admin": {+ "address_select": {+ "none": "Aucune adresse sélectionnée"+ },"app_name": "Spree Admin","a11y": {"breadcrumb": "Fil d'Ariane",@@ -97,6 +100,7 @@"address_book": {"default_billing": "Facturation par défaut","default_shipping": "Livraison par défaut",+ "inherited_from": "Héritée de {{name}}","set_default_billing": "Définir comme adresse de facturation par défaut","set_default_shipping": "Définir comme adresse de livraison par défaut"},diff --git a/packages/dashboard-core/src/locales/pl.json b/packages/dashboard-core/src/locales/pl.jsonindex 327034d127..40391fdcf6 100644--- a/packages/dashboard-core/src/locales/pl.json+++ b/packages/dashboard-core/src/locales/pl.json@@ -1,5 +1,8 @@{"admin": {+ "address_select": {+ "none": "Nie wybrano adresu"+ },"app_name": "Spree Admin","a11y": {"breadcrumb": "Ścieżka nawigacji",@@ -97,6 +100,7 @@"address_book": {"default_billing": "Domyślny rozliczeniowy","default_shipping": "Domyślny wysyłkowy",+ "inherited_from": "Dziedziczony z: {{name}}","set_default_billing": "Ustaw jako domyślny adres rozliczeniowy","set_default_shipping": "Ustaw jako domyślny adres wysyłkowy"},diff --git a/packages/dashboard-core/src/locales/zh-CN.json b/packages/dashboard-core/src/locales/zh-CN.jsonindex 2a9b3fd439..a78fbaca85 100644--- a/packages/dashboard-core/src/locales/zh-CN.json+++ b/packages/dashboard-core/src/locales/zh-CN.json@@ -1,5 +1,8 @@{"admin": {+ "address_select": {+ "none": "未选择地址"+ },"app_name": "Spree Admin","a11y": {"breadcrumb": "面包屑导航",@@ -97,6 +100,7 @@"address_book": {"default_billing": "默认账单","default_shipping": "默认收货",+ "inherited_from": "继承自 {{name}}","set_default_billing": "设为默认账单地址","set_default_shipping": "设为默认收货地址"},diff --git a/packages/dashboard-ui/src/index.ts b/packages/dashboard-ui/src/index.tsindex cc7d92b627..a31f743a9a 100644--- a/packages/dashboard-ui/src/index.ts+++ b/packages/dashboard-ui/src/index.ts@@ -32,6 +32,7 @@ export { decimalPlacesMessage, requiredMessage } from './lib/validation-messages// ---------------------------------------------------------------------------export * from './spree/address-block'export * from './spree/address-book-row'+export * from './spree/address-select'export * from './spree/back-button'export * from './spree/bulk-dialog'export * from './spree/bulk-price-table'diff --git a/packages/dashboard-ui/src/spree/address-book-row.tsx b/packages/dashboard-ui/src/spree/address-book-row.tsxindex 5c30413ca3..b3fc664300 100644--- a/packages/dashboard-ui/src/spree/address-book-row.tsx+++ b/packages/dashboard-ui/src/spree/address-book-row.tsx@@ -23,6 +23,7 @@ export interface AddressBookEntry extends AddressBlockValue {export function AddressBookRow({address,canEdit = true,+ inheritedFrom,onEdit,onRemove,onSetDefaultBilling,@@ -30,6 +31,11 @@ export function AddressBookRow({}: {address: AddressBookEntrycanEdit?: boolean+ /**+ * Names the book this entry is inherited from. An inherited entry is read+ * only here, and its defaults are its owner's, so neither is shown.+ */+ inheritedFrom?: string | nullonEdit: () => voidonRemove: () => void/** Omit either to hide that action — a book with one address has no choice. */@@ -37,17 +43,25 @@ export function AddressBookRow({onSetDefaultShipping?: () => void}) {const { t } = useTranslation()+ const inherited = inheritedFrom != null+ const isDefaultBilling = !inherited && address.is_default_billing+ const isDefaultShipping = !inherited && address.is_default_shippingreturn (<Item variant="outline" className="items-start"><ItemContent className="min-w-0">- {(address.label || address.is_default_billing || address.is_default_shipping) && (+ {(address.label || inherited || isDefaultBilling || isDefaultShipping) && (<ItemTitle className="flex-wrap">{address.label}- {address.is_default_billing && (+ {inherited && (+ <Badge variant="secondary">+ {t('admin.address_book.inherited_from', { name: inheritedFrom })}+ </Badge>+ )}+ {isDefaultBilling && (<Badge variant="outline">{t('admin.address_book.default_billing')}</Badge>)}- {address.is_default_shipping && (+ {isDefaultShipping && (<Badge variant="outline">{t('admin.address_book.default_shipping')}</Badge>)}</ItemTitle>@@ -55,7 +69,7 @@ export function AddressBookRow({<AddressBlock address={address} /></ItemContent>- {canEdit && (+ {canEdit && !inherited && (<ItemActions><RowActionsactions={[diff --git a/packages/dashboard-ui/src/spree/address-select.tsx b/packages/dashboard-ui/src/spree/address-select.tsxnew file mode 100644index 0000000000..0bbd8eef3b--- /dev/null+++ b/packages/dashboard-ui/src/spree/address-select.tsx@@ -0,0 +1,105 @@+import { useTranslation } from 'react-i18next'+import {+ Select,+ SelectContent,+ SelectGroup,+ SelectItem,+ SelectLabel,+ SelectTrigger,+ SelectValue,+} from '../ui/select'+import type { AddressBlockValue } from './address-block'++/** One entry a picker may offer, from whichever book it came out of. */+export interface AddressOption extends AddressBlockValue {+ id: string+ label?: string | null+}++/**+ * A set of entries under the name of the book they came from — a customer's+ * own addresses, a company's sites. Groups are rendered in the order given.+ */+export interface AddressOptionGroup {+ key: string+ heading: string+ addresses: AddressOption[]+}++/** The one-line form a picker shows: the entry's own name, then the street. */+export function summarizeAddress(address: AddressOption): string {+ const place = [address.address1, address.city, address.state_text, address.postal_code]+ .filter(Boolean)+ .join(', ')++ const who = address.label || address.company || address.full_name++ return [who, place].filter(Boolean).join(' — ')+}++/**+ * Picks one saved address out of the books a purchase may draw on.+ *+ * Headless: the groups arrive as props, so the same control serves a buyer's+ * own book, a company's sites, and both at once — which is the B2B case, where+ * an order for a company may ship to that company's sites and to the ones it+ * inherits from the companies above it.+ *+ * Base UI resolves the trigger's label from `items`, so the summary line shows+ * instead of the raw prefixed id.+ */+export function AddressSelect({+ id,+ value,+ onValueChange,+ groups,+ placeholder,+ emptyLabel,+ disabled,+}: {+ id?: string+ /** The chosen address id, or `''` for "none picked". */+ value: string+ onValueChange: (value: string) => void+ groups: AddressOptionGroup[]+ placeholder?: string+ /** Offered first so a merchant can take the choice back. */+ emptyLabel?: string+ disabled?: boolean+}) {+ const { t } = useTranslation()+ const none = emptyLabel ?? t('admin.address_select.none')++ const items = [+ { value: '', label: none },+ ...groups.flatMap((group) =>+ group.addresses.map((address) => ({+ value: address.id,+ label: summarizeAddress(address),+ })),+ ),+ ]++ return (+ <Select items={items} value={value} onValueChange={onValueChange} disabled={disabled}>+ <SelectTrigger id={id}>+ <SelectValue placeholder={placeholder ?? none} />+ </SelectTrigger>+ <SelectContent>+ <SelectItem value="">{none}</SelectItem>+ {groups+ .filter((group) => group.addresses.length > 0)+ .map((group) => (+ <SelectGroup key={group.key}>+ <SelectLabel>{group.heading}</SelectLabel>+ {group.addresses.map((address) => (+ <SelectItem key={address.id} value={address.id}>+ {summarizeAddress(address)}+ </SelectItem>+ ))}+ </SelectGroup>+ ))}+ </SelectContent>+ </Select>+ )+}diff --git a/packages/dashboard/e2e/companies.spec.ts b/packages/dashboard/e2e/companies.spec.tsindex 4a18b037fe..e22d086cc7 100644--- a/packages/dashboard/e2e/companies.spec.ts+++ b/packages/dashboard/e2e/companies.spec.ts@@ -32,6 +32,26 @@ async function createCompany(page: Page, storeId: string, name: string) {await expect(page.getByRole('heading', { name })).toBeVisible()}+/** Adds an address to the open company's address book through its sheet. */+async function addCompanyAddress(page: Page, label: string, address1: string) {+ await card(page, /^address book/i)+ .getByRole('button', { name: /add address/i })+ .click()+ await expect(page.getByRole('heading', { name: /^new address$/i })).toBeVisible()+ await fillAddressForm(page, {+ label,+ address1,+ city: 'Los Angeles',+ postalCode: '90001',+ // Country starts at the store's own, the United States.+ state: 'California',+ })+ await page+ .getByRole('dialog')+ .getByRole('button', { name: /^save$/i })+ .click()+}+test.describe('companies', () => {test('creates a company and requires PO numbers on its orders', async ({ page }) => {const creds = await login(page)@@ -143,28 +163,75 @@ test.describe('companies', () => {await expect(addressBook.getByText('1 Test Street')).toHaveCount(0)})- test('adds an address to the address book', async ({ page }) => {+ test('adds, edits, promotes to default and deletes addresses', async ({ page }) => {const creds = await login(page)await createCompany(page, creds.store_id, `E2E Depots ${Date.now()}`)const addressBook = card(page, /^address book/i)await expect(addressBook.getByText(/no addresses yet/i)).toBeVisible()- await addressBook.getByRole('button', { name: /add address/i }).click()- await expect(page.getByRole('heading', { name: /^new address$/i })).toBeVisible()- await fillAddressForm(page, {- label: 'Main warehouse',- address1: '400 Dock Rd',- city: 'Los Angeles',- postalCode: '90001',- // Country starts at the store's own, the United States.- state: 'California',- })+ await addCompanyAddress(page, 'Main warehouse', '400 Dock Rd')+ await expect(addressBook.getByText('400 Dock Rd')).toBeVisible({ timeout: 15_000 })++ await addressBook.getByRole('button', { name: /open actions/i }).click()+ await page.getByRole('menuitem', { name: /^edit$/i }).click()+ await expect(page.getByRole('heading', { name: /^edit address$/i })).toBeVisible()+ await fillAddressForm(page, { label: 'North warehouse' })await page.getByRole('dialog').getByRole('button', { name: /^save$/i }).click()+ await expect(addressBook.getByText('North warehouse')).toBeVisible({ timeout: 15_000 })++ // A new address is saved as both defaults, so adding a second takes them+ // over and leaves the first to be promoted back.+ await addCompanyAddress(page, 'Dock 2', '500 Pier Ave')+ const first = addressBook.locator('[data-slot="item"]').filter({ hasText: '400 Dock Rd' })+ const second = addressBook.locator('[data-slot="item"]').filter({ hasText: '500 Pier Ave' })+ await expect(second.getByText(/^default shipping$/i)).toBeVisible({ timeout: 15_000 })+ await expect(first.getByText(/^default shipping$/i)).toHaveCount(0)+ await first.getByRole('button', { name: /open actions/i }).click()+ await page.getByRole('menuitem', { name: /set as default shipping/i }).click()+ await expect(first.getByText(/^default shipping$/i)).toBeVisible({ timeout: 15_000 })+ await expect(second.getByText(/^default shipping$/i)).toHaveCount(0)++ await second.getByRole('button', { name: /open actions/i }).click()+ await page.getByRole('menuitem', { name: /^delete$/i }).click()+ await expect(page.getByRole('heading', { name: /delete this address\?/i })).toBeVisible()+ await page+ .getByRole('dialog')+ .getByRole('button', { name: /^delete$/i })+ .click()+ await expect(addressBook.getByText('500 Pier Ave')).toHaveCount(0, { timeout: 15_000 })+ await expect(addressBook.getByText('400 Dock Rd')).toBeVisible()+ })++ // A division ships to the sites it inherits, but they stay its parent's to+ // change: the row names where it comes from and offers no actions.+ test("shows a parent's address on a division as inherited and read-only", async ({ page }) => {+ const creds = await login(page)+ const name = `E2E Parent ${Date.now()}`+ await createCompany(page, creds.store_id, name)+ await addCompanyAddress(page, 'Headquarters', '1 Main St')+ await expect(card(page, /^address book/i).getByText('1 Main St')).toBeVisible({+ timeout: 15_000,+ })++ const subUnits = card(page, /sub-units/i)+ await subUnits.getByRole('button', { name: /add sub-unit/i }).click()+ await page.getByRole('dialog').locator('#sub-unit-name').fill(`${name} West`)+ await page+ .getByRole('dialog')+ .getByRole('button', { name: /^create$/i })+ .click()+ await subUnits.getByRole('link', { name: new RegExp(`${name} West`) }).click()+ await expect(page.getByRole('heading', { name: `${name} West` })).toBeVisible({+ timeout: 15_000,+ })- await expect(addressBook.getByText('400 Dock Rd')).toBeVisible({ timeout: 15_000 })+ const addressBook = card(page, /^address book/i)+ await expect(addressBook.getByText('1 Main St')).toBeVisible({ timeout: 15_000 })+ await expect(addressBook.getByText(`Inherited from ${name}`)).toBeVisible()+ await expect(addressBook.getByRole('button', { name: /open actions/i })).toHaveCount(0)})// The document goes to private storage: a PDF is refused by the publicdiff --git a/packages/dashboard/e2e/orders.spec.ts b/packages/dashboard/e2e/orders.spec.tsindex f0db51f097..252dda3751 100644--- a/packages/dashboard/e2e/orders.spec.ts+++ b/packages/dashboard/e2e/orders.spec.ts@@ -175,6 +175,53 @@ test.describe('new order', () => {await expect(poCard.getByRole('button', { name: /test-image\.png/i })).toBeVisible()})+ // A division buys for itself but ships to the sites it inherits, so the+ // picker offers its parent's address and the order keeps it.+ test("ships an order for a division to its parent company's address", async ({ page }) => {+ const creds = await login(page)+ const stamp = Date.now()+ const street = `${stamp} Harbor Road`+ const parent = await adminRequest<{ id: string }>(page, creds, 'post', '/companies', {+ name: `E2E Group ${stamp}`,+ })+ await adminRequest(page, creds, 'post', `/companies/${parent.id}/addresses`, {+ label: 'Headquarters',+ first_name: 'Dana',+ last_name: 'Reyes',+ address1: street,+ city: 'Los Angeles',+ postal_code: '90001',+ country_code: 'US',+ state_code: 'CA',+ })+ const divisionName = `E2E Group West ${stamp}`+ await adminRequest(page, creds, 'post', '/companies', {+ name: divisionName,+ kind: 'division',+ parent_id: parent.id,+ })++ await page.goto(NEW_ORDER_PATH(creds.store_id))+ await expect(page.getByRole('heading', { name: CTA })).toBeVisible({ timeout: 15_000 })+ await page.getByPlaceholder(/search companies/i).fill(divisionName)+ await page+ .getByRole('option', { name: new RegExp(divisionName) })+ .first()+ .click()+ await fillNewOrderForm(page, `e2e-division-${stamp}@example.com`)++ await page.getByRole('switch').click()+ await page.locator('#order-shipping-address').click()+ await page.getByRole('option', { name: new RegExp(street) }).click()+ await expect(page.locator('#order-shipping-address')).toContainText(street)++ await page.locator('button[type="submit"]').click()+ await expect(page).toHaveURL(new RegExp(`/${creds.store_id}/orders/or_[^/]+$`), {+ timeout: 15_000,+ })+ await expect(page.getByText(street)).toBeVisible({ timeout: 15_000 })+ })+test('newly-created draft shows up in the drafts list', async ({ page }) => {const creds = await login(page)await page.goto(NEW_ORDER_PATH(creds.store_id))diff --git a/packages/dashboard/src/hooks/use-customers.ts b/packages/dashboard/src/hooks/use-customers.tsindex 81bba0251f..88c24e0465 100644--- a/packages/dashboard/src/hooks/use-customers.ts+++ b/packages/dashboard/src/hooks/use-customers.ts@@ -126,6 +126,15 @@ export function useCustomerOrders(customerId: string, params: { limit: number; stype AddressCreateParams = Parameters<typeof adminClient.customers.addresses.create>[1]type AddressUpdateParams = Parameters<typeof adminClient.customers.addresses.update>[2]+/** The customer's own book, for a picker that offers it. */+export function useCustomerAddresses(customerId: string | undefined, limit = 50) {+ return useQuery({+ queryKey: useResourceKey('customers', customerId ?? 'noop', 'addresses', `${limit}`),+ queryFn: () => adminClient.customers.addresses.list(customerId as string, { limit }),+ enabled: !!customerId,+ })+}+export function useCreateCustomerAddress(customerId: string) {return useResourceMutation({mutationFn: (params: AddressCreateParams) =>diff --git a/packages/dashboard/src/locales/ar.json b/packages/dashboard/src/locales/ar.jsonindex ed2273bc97..96ac9ccb2e 100644--- a/packages/dashboard/src/locales/ar.json+++ b/packages/dashboard/src/locales/ar.json@@ -3345,6 +3345,7 @@"sku": "SKU","variant": "البديل"},+ "use_company_default_addresses": "استخدم عناوين الفوترة والشحن الافتراضية المحفوظة لدى {{company}}","use_default_addresses": "استخدم عناوين الفواتير والشحن الافتراضية لـ العميل"},"payment_statuses": {@@ -3727,7 +3728,10 @@"drafts_title": "Draft Orders","new": {"add_line_item": "إضافة بند",+ "address_help": "اترك العنوان دون اختيار لإدخاله في الطلب لاحقًا. يمكن لطلب الشركة استخدام مواقع تلك الشركة والمواقع التي ترثها.",+ "company_addresses": "عناوين الشركة","company_help": "اربط هذا الطلب بشركة. ستعرض قائمة العملاء عندئذ الأشخاص المخوّلين بالشراء لها فقط.",+ "customer_addresses": "عناوين العميل","reset_items": {"confirm": "تغيير وإزالة العناصر","message_few": "قد لا تُباع العناصر المختارة ({{count}}) لهذا المشتري أو في هذا السوق أو هذه القناة، أو قد يختلف سعرها. ستتم إزالتها.",@@ -3746,8 +3750,10 @@"section_market_help": "ما يمكن بيعه وسعره يعتمدان على المشتري والسوق والقناة.","section_notes": "ملحوظات","section_summary": "ملخص",+ "select_billing_address": "عنوان الفوترة","select_company": "الشركة (اختياري)","select_customer": "اختر عميلًا",+ "select_shipping_address": "عنوان الشحن","title": "طلب جديد"}},diff --git a/packages/dashboard/src/locales/de.json b/packages/dashboard/src/locales/de.jsonindex 0575203ff5..527568bb83 100644--- a/packages/dashboard/src/locales/de.json+++ b/packages/dashboard/src/locales/de.json@@ -3325,6 +3325,7 @@"sku": "SKU","variant": "Variante"},+ "use_company_default_addresses": "Die von {{company}} gespeicherte Standard-Rechnungs- und Lieferadresse verwenden","use_default_addresses": "Standard-Rechnungs- und Lieferadresse des Kunden verwenden"},"payment_statuses": {@@ -3699,7 +3700,10 @@"drafts_title": "Bestellentwürfe","new": {"add_line_item": "Position hinzufügen",+ "address_help": "Lassen Sie eine Adresse frei, um sie später in der Bestellung einzugeben. Eine Firmenbestellung kann die Standorte dieser Firma und die geerbten Standorte verwenden.",+ "company_addresses": "Firmenadressen","company_help": "Diese Bestellung einem Unternehmen zuordnen. Die Kundenliste zeigt dann nur Personen, die dafür einkaufen dürfen.",+ "customer_addresses": "Kundenadressen","reset_items": {"confirm": "Ändern und Artikel entfernen","message_one": "Der ausgewählte Artikel ({{count}}) ist für diesen Käufer, Markt oder Kanal eventuell nicht verfügbar oder kostet etwas anderes. Er wird entfernt.",@@ -3714,8 +3718,10 @@"section_market_help": "Was verkauft werden kann und zu welchem Preis, hängt vom Käufer, vom Markt und vom Kanal ab.","section_notes": "Notizen","section_summary": "Zusammenfassung",+ "select_billing_address": "Rechnungsadresse","select_company": "Firma (optional)","select_customer": "Kunde auswählen",+ "select_shipping_address": "Lieferadresse","title": "Neue Bestellung"}},diff --git a/packages/dashboard/src/locales/en.json b/packages/dashboard/src/locales/en.jsonindex c654c6ed89..0904615475 100644--- a/packages/dashboard/src/locales/en.json+++ b/packages/dashboard/src/locales/en.json@@ -3325,6 +3325,7 @@"sku": "SKU","variant": "Variant"},+ "use_company_default_addresses": "Use the default billing & shipping addresses saved by {{company}}","use_default_addresses": "Use customer's default billing & shipping addresses"},"payment_statuses": {@@ -3699,7 +3700,10 @@"drafts_title": "Draft Orders","new": {"add_line_item": "Add line item",+ "address_help": "Leave an address unpicked to enter it on the order once it exists. A company order may use that company’s sites and the ones it inherits.",+ "company_addresses": "Company addresses","company_help": "Attach this order to a business. The customer list then shows only people who can buy for it.",+ "customer_addresses": "Customer addresses","reset_items": {"confirm": "Change and remove items","message_one": "The {{count}} item you picked may not be sold, or may cost something else, for this buyer, market or channel. It will be removed.",@@ -3714,8 +3718,10 @@"section_market_help": "What can be sold, and at what price, depends on the buyer, the market and the channel.","section_notes": "Notes","section_summary": "Summary",+ "select_billing_address": "Billing address","select_company": "Company (optional)","select_customer": "Select customer",+ "select_shipping_address": "Shipping address","title": "New Order"}},diff --git a/packages/dashboard/src/locales/es.json b/packages/dashboard/src/locales/es.jsonindex f6152d1241..e5e9d98591 100644--- a/packages/dashboard/src/locales/es.json+++ b/packages/dashboard/src/locales/es.json@@ -348,7 +348,10 @@"drafts_title": "Pedidos en borrador","new": {"add_line_item": "Agregar línea de pedido",+ "address_help": "Deja una dirección sin elegir para introducirla en el pedido más adelante. Un pedido de empresa puede usar las sedes de esa empresa y las que hereda.",+ "company_addresses": "Direcciones de la empresa","company_help": "Vinculá este pedido a una empresa. La lista de clientes mostrará solo a quienes puedan comprar para ella.",+ "customer_addresses": "Direcciones del cliente","reset_items": {"confirm": "Cambiar y quitar artículos","message_many": "Es posible que los {{count}} artículos elegidos no se vendan, o cuesten otra cosa, para este comprador, mercado o canal. Se quitarán.",@@ -364,8 +367,10 @@"section_market_help": "Lo que se puede vender, y a qué precio, depende del comprador, el mercado y el canal.","section_notes": "Notas","section_summary": "Resumen",+ "select_billing_address": "Dirección de facturación","select_company": "Empresa (opcional)","select_customer": "Seleccionar cliente",+ "select_shipping_address": "Dirección de envío","title": "Nuevo pedido"}},@@ -2973,6 +2978,7 @@"sku": "SKU","variant": "Variante"},+ "use_company_default_addresses": "Usar las direcciones de facturación y envío predeterminadas guardadas por {{company}}","use_default_addresses": "Usar las direcciones de facturación y envío predeterminadas del cliente"},"payment_statuses": {diff --git a/packages/dashboard/src/locales/fr.json b/packages/dashboard/src/locales/fr.jsonindex 8ced251026..a60137bedd 100644--- a/packages/dashboard/src/locales/fr.json+++ b/packages/dashboard/src/locales/fr.json@@ -3325,6 +3325,7 @@"sku": "SKU","variant": "Variante"},+ "use_company_default_addresses": "Utiliser les adresses de facturation et de livraison par défaut enregistrées par {{company}}","use_default_addresses": "Utiliser les adresses de facturation et de livraison par défaut du client"},"payment_statuses": {@@ -3699,7 +3700,10 @@"drafts_title": "Brouillons de commandes","new": {"add_line_item": "Ajouter une ligne d'article",+ "address_help": "Laissez une adresse non choisie pour la saisir ensuite dans la commande. Une commande d’entreprise peut utiliser les sites de cette entreprise et ceux dont elle hérite.",+ "company_addresses": "Adresses de l’entreprise","company_help": "Rattacher cette commande à une entreprise. La liste des clients n'affiche alors que les personnes autorisées à acheter pour elle.",+ "customer_addresses": "Adresses du client","reset_items": {"confirm": "Modifier et retirer les articles","message_many": "Les {{count}} articles choisis ne sont peut-être pas vendus, ou à un autre prix, pour cet acheteur, ce marché ou ce canal. Ils seront retirés.",@@ -3715,8 +3719,10 @@"section_market_help": "Ce qui peut être vendu, et à quel prix, dépend de l'acheteur, du marché et du canal.","section_notes": "Notes","section_summary": "Récapitulatif",+ "select_billing_address": "Adresse de facturation","select_company": "Entreprise (facultatif)","select_customer": "Sélectionner un client",+ "select_shipping_address": "Adresse de livraison","title": "Nouvelle commande"}},diff --git a/packages/dashboard/src/locales/pl.json b/packages/dashboard/src/locales/pl.jsonindex 5426c0bdac..f7ff4d89dc 100644--- a/packages/dashboard/src/locales/pl.json+++ b/packages/dashboard/src/locales/pl.json@@ -3359,6 +3359,7 @@"sku": "SKU","variant": "Wariant"},+ "use_company_default_addresses": "Użyj domyślnych adresów rozliczeniowego i wysyłki zapisanych przez {{company}}","use_default_addresses": "Użyj domyślnych adresów rozliczeniowego i wysyłki klienta"},"payment_statuses": {@@ -3737,7 +3738,10 @@"drafts_title": "Wersje robocze zamówień","new": {"add_line_item": "Dodaj pozycję",+ "address_help": "Zostaw adres niewybrany, aby wpisać go później w zamówieniu. Zamówienie firmowe może korzystać z lokalizacji tej firmy oraz tych, które dziedziczy.",+ "company_addresses": "Adresy firmy","company_help": "Przypisz to zamówienie do firmy. Lista klientów pokaże wtedy tylko osoby, które mogą dla niej kupować.",+ "customer_addresses": "Adresy klienta","reset_items": {"confirm": "Zmień i usuń pozycje","message_few": "{{count}} wybrane pozycje mogą nie być sprzedawane temu kupującemu, na tym rynku lub w tym kanale albo mieć inną cenę. Zostaną usunięte.",@@ -3754,8 +3758,10 @@"section_market_help": "To, co można sprzedać i po jakiej cenie, zależy od kupującego, rynku i kanału.","section_notes": "Notatki","section_summary": "Podsumowanie",+ "select_billing_address": "Adres rozliczeniowy","select_company": "Firma (opcjonalnie)","select_customer": "Wybierz klienta",+ "select_shipping_address": "Adres dostawy","title": "Nowe zamówienie"}},diff --git a/packages/dashboard/src/locales/zh-CN.json b/packages/dashboard/src/locales/zh-CN.jsonindex 9156f98507..1aca2d985f 100644--- a/packages/dashboard/src/locales/zh-CN.json+++ b/packages/dashboard/src/locales/zh-CN.json@@ -3317,6 +3317,7 @@"sku": "SKU","variant": "变体"},+ "use_company_default_addresses": "使用 {{company}} 保存的默认账单和配送地址","use_default_addresses": "使用客户的默认账单和配送地址"},"payment_statuses": {@@ -3689,7 +3690,10 @@"drafts_title": "草稿订单","new": {"add_line_item": "添加订单项",+ "address_help": "不选择地址则可在订单创建后再填写。公司订单可使用该公司的地址及其继承的地址。",+ "company_addresses": "公司地址","company_help": "将此订单关联到某个公司。客户列表随后只显示可为其采购的人员。",+ "customer_addresses": "客户地址","reset_items": {"confirm": "更改并移除商品","message_other": "已选的 {{count}} 件商品可能不向此买家、市场或渠道销售,或价格不同。它们将被移除。",@@ -3703,8 +3707,10 @@"section_market_help": "可销售的商品及其价格取决于买家、市场和渠道。","section_notes": "备注","section_summary": "概览",+ "select_billing_address": "账单地址","select_company": "公司(可选)","select_customer": "选择客户",+ "select_shipping_address": "收货地址","title": "新建订单"}},diff --git a/packages/dashboard/src/routes/_authenticated/$storeId/companies/$companyId.tsx b/packages/dashboard/src/routes/_authenticated/$storeId/companies/$companyId.tsxindex cf021659a9..32e053fcf2 100644--- a/packages/dashboard/src/routes/_authenticated/$storeId/companies/$companyId.tsx+++ b/packages/dashboard/src/routes/_authenticated/$storeId/companies/$companyId.tsx@@ -595,6 +595,9 @@ function AddressBookCard({ company, canEdit }: { company: Company; canEdit: boolkey={entry.id}address={entry}canEdit={canEdit}+ inheritedFrom={+ entry.owner && entry.owner.id !== company.id ? (entry.owner.name ?? '') : null+ }onEdit={() => setEditing(entry)}onSetDefaultBilling={() => setDefault(entry.id, 'billing')}onSetDefaultShipping={() => setDefault(entry.id, 'shipping')}diff --git a/packages/dashboard/src/routes/_authenticated/$storeId/orders/new.tsx b/packages/dashboard/src/routes/_authenticated/$storeId/orders/new.tsxindex 1885911579..28915b5cc0 100644--- a/packages/dashboard/src/routes/_authenticated/$storeId/orders/new.tsx+++ b/packages/dashboard/src/routes/_authenticated/$storeId/orders/new.tsx@@ -14,6 +14,8 @@ import {useStore,} from '@spree/dashboard-core'import {+ type AddressOptionGroup,+ AddressSelect,Button,Card,CardContent,@@ -51,8 +53,8 @@ import { useTranslation } from 'react-i18next'import { ChannelSelect } from '../../../../components/spree/channel-select'import { CompanyComboboxOption } from '../../../../components/spree/company-combobox-option'import { useChannels } from '../../../../hooks/use-channels'-import { companyAutocompleteProps } from '../../../../hooks/use-companies'-import { customerAutocompleteProps } from '../../../../hooks/use-customers'+import { companyAutocompleteProps, useCompanyAddresses } from '../../../../hooks/use-companies'+import { customerAutocompleteProps, useCustomerAddresses } from '../../../../hooks/use-customers'import { useAllMarkets } from '../../../../hooks/use-markets'import {NEW_ORDER_DEFAULTS,@@ -82,6 +84,8 @@ function NewOrderPage() {const [company, setCompany] = useState<Company | null>(null)const [items, setItems] = useState<PendingItem[]>([])const [useDefaultAddress, setUseDefaultAddress] = useState(true)+ const [shippingAddressId, setShippingAddressId] = useState('')+ const [billingAddressId, setBillingAddressId] = useState('')const [poDocument, setPoDocument] = useState<FileUploadValue>(EMPTY_FILE_UPLOAD_VALUE)// The signed id does not exist until the upload resolves, so submitting// during one would create the order without the document.@@ -101,6 +105,37 @@ function NewOrderPage() {const { data: channelsData, isLoading: channelsLoading } = useChannels()const channels = channelsData?.data ?? []+ // Both books the order will accept an address from. The company's listing+ // already carries the sites inherited from the companies above it, so the+ // picker offers exactly what the order would take.+ const { data: customerAddressData } = useCustomerAddresses(+ useDefaultAddress ? undefined : customer?.id,+ )+ const { data: companyAddressData } = useCompanyAddresses(+ useDefaultAddress ? undefined : company?.id,+ 1,+ 50,+ )++ function clearPickedAddresses() {+ setShippingAddressId('')+ setBillingAddressId('')+ }++ const addressGroups: AddressOptionGroup[] = [+ {+ key: 'company',+ heading: company?.name ?? t('admin.pages.orders.new.company_addresses'),+ addresses: companyAddressData?.data ?? [],+ },+ {+ key: 'customer',+ heading:+ customer?.full_name || customer?.email || t('admin.pages.orders.new.customer_addresses'),+ addresses: customerAddressData?.data ?? [],+ },+ ]+// A market fixes the order's currency and narrows its languages, so the two// follow the market rather than being chosen independently of it.const { markets, isLoading: marketsLoading } = useAllMarkets()@@ -154,11 +189,15 @@ function NewOrderPage() {}if (customer) {payload.customer_id = customer.id- payload.use_customer_default_address = useDefaultAddress} else if (values.email) {payload.email = values.email}if (company) payload.company_id = company.id+ if (customer || company) payload.use_customer_default_address = useDefaultAddress+ if (!useDefaultAddress) {+ if (shippingAddressId) payload.shipping_address_id = shippingAddressId+ if (billingAddressId) payload.billing_address_id = billingAddressId+ }if (values.internal_note) payload.internal_note = values.internal_noteif (values.customer_note) payload.customer_note = values.customer_noteif (values.po_number) payload.po_number = values.po_number@@ -266,10 +305,13 @@ function NewOrderPage() {// A customer already chosen may have no standing for the// new company, and silently sending that pair would// attach the order to a business this person cannot buy- // for. Clearing is the honest reset.+ // for. Clearing is the honest reset — and so is dropping+ // the picked addresses, which belong to the books the+ // old pair opened and would be refused by the new one.changeSalesContext(() => {setCompany(record)setCustomer(null)+ clearPickedAddresses()})}}renderOption={(company) => <CompanyComboboxOption company={company} />}@@ -283,7 +325,10 @@ function NewOrderPage() {value={customer?.id}onChange={(_id, record) => {if (record?.id !== customer?.id)- changeSalesContext(() => setCustomer(record))+ changeSalesContext(() => {+ setCustomer(record)+ clearPickedAddresses()+ })}}renderOption={(c) => (<div>@@ -312,12 +357,49 @@ function NewOrderPage() {)}</FieldGroup>- {customer && (+ {(customer || company) && (<div className="mt-4 flex items-center gap-3"><Switch checked={useDefaultAddress} onCheckedChange={setUseDefaultAddress} />- <span className="text-sm">{t('admin.orders.new.use_default_addresses')}</span>+ <span className="text-sm">+ {company+ ? t('admin.orders.new.use_company_default_addresses', {+ company: company.name,+ })+ : t('admin.orders.new.use_default_addresses')}+ </span></div>)}++ {/* Picking a company opens its sites here, including the ones+ it inherits from the companies above it — the same list the+ order itself accepts an address from. */}+ {(customer || company) && !useDefaultAddress && (+ <FieldGroup className="mt-4">+ <Field>+ <FieldLabel htmlFor="order-shipping-address">+ {t('admin.pages.orders.new.select_shipping_address')}+ </FieldLabel>+ <AddressSelect+ id="order-shipping-address"+ value={shippingAddressId}+ onValueChange={setShippingAddressId}+ groups={addressGroups}+ />+ </Field>+ <Field>+ <FieldLabel htmlFor="order-billing-address">+ {t('admin.pages.orders.new.select_billing_address')}+ </FieldLabel>+ <AddressSelect+ id="order-billing-address"+ value={billingAddressId}+ onValueChange={setBillingAddressId}+ groups={addressGroups}+ />+ </Field>+ <FieldDescription>{t('admin.pages.orders.new.address_help')}</FieldDescription>+ </FieldGroup>+ )}</CardContent></Card>diff --git a/packages/sdk/examples/cart-addresses/list.ts b/packages/sdk/examples/cart-addresses/list.tsnew file mode 100644index 0000000000..9895ffb163--- /dev/null+++ b/packages/sdk/examples/cart-addresses/list.ts@@ -0,0 +1,19 @@+import { createClient } from '@spree/sdk'++const client = createClient({+ baseUrl: 'https://your-store.com',+ publishableKey: '<api-key>',+})++// region:example+const addresses = await client.carts.addresses.list(+ 'cart_abc123',+ {},+ {+ token: '<token>',+ },+)++// endregion:example++export { addresses }diff --git a/packages/sdk/src/store-client.ts b/packages/sdk/src/store-client.tsindex f9f96569a9..c9a2c8779d 100644--- a/packages/sdk/src/store-client.ts+++ b/packages/sdk/src/store-client.ts@@ -576,6 +576,34 @@ export class StoreClient {complete: (cartId: string, options?: RequestOptions): Promise<Order | OrderGroup> =>this.request<Order | OrderGroup>('POST', `/carts/${cartId}/complete`, options),+ /**+ * Nested resource: the addresses this cart may be shipped or billed to —+ * the buyer's own book, plus the book of the company set as the cart's+ * `company_id` and the sites that company inherits from the ones above+ * it, limited to the countries the cart's market sells to. Every address+ * listed here is accepted as `shipping_address_id` or `billing_address_id`+ * on the cart.+ *+ * Requires a customer JWT (`token`), unlike the rest of the cart calls: it+ * returns the account's address books rather than the cart's own data, so a+ * guest cart token is not accepted. A guest cart has neither book anyway.+ */+ addresses: {+ /**+ * List the addresses this cart may use. Requires a customer JWT.+ * @param cartId - Cart prefixed ID+ */+ list: (+ cartId: string,+ params?: ListParams<AddressFilters, AddressSort>,+ options?: RequestOptions,+ ): Promise<PaginatedResponse<Address>> =>+ this.request<PaginatedResponse<Address>>('GET', `/carts/${cartId}/addresses`, {+ ...options,+ params: transformListParams({ ...params }),+ }),+ },+/*** Nested resource: Line items*/diff --git a/packages/sdk/src/types/generated/Address.ts b/packages/sdk/src/types/generated/Address.tsindex dc19c2808c..fd52006257 100644--- a/packages/sdk/src/types/generated/Address.ts+++ b/packages/sdk/src/types/generated/Address.ts@@ -1,7 +1,7 @@-// Typelizer digest 1cd33e6185da0315702b11764b65034b+// Typelizer digest 26af200054ae4eb2cde3a33d43e3cabd//// DO NOT MODIFY: This file was automatically generated by Typelizer.-import type {CountryCode} from '@/types'+import type {AddressOwner, CountryCode} from '@/types'interface Address {id: string;@@ -27,6 +27,7 @@ interface Address {/** @deprecated Use `country_code`. Removed in 6.1. */country_iso: string;state_name: string | null;+ owner: AddressOwner | null;}export default Address;diff --git a/packages/sdk/src/types/generated/AddressOwner.ts b/packages/sdk/src/types/generated/AddressOwner.tsnew file mode 100644index 0000000000..aeb25cca4b--- /dev/null+++ b/packages/sdk/src/types/generated/AddressOwner.ts@@ -0,0 +1,12 @@+// Typelizer digest d63b6d88dbcde55551514555b9e995ab+//+// DO NOT MODIFY: This file was automatically generated by Typelizer.+import type {AddressOwnerType} from '@/types'++interface AddressOwner {+ id: string;+ type: AddressOwnerType;+ name: string | null;+}++export default AddressOwner;diff --git a/packages/sdk/src/types/generated/Enums.ts b/packages/sdk/src/types/generated/Enums.tsindex e651e2e34e..c2d99cae93 100644--- a/packages/sdk/src/types/generated/Enums.ts+++ b/packages/sdk/src/types/generated/Enums.ts@@ -1,6 +1,7 @@-// Typelizer digest 4d64a7bd647c2e146960a67b8bcf16f0+// Typelizer digest e51aa32debf28439c41a7291b8c9cfa2//// DO NOT MODIFY: This file was automatically generated by Typelizer.+export type { AddressOwnerType } from '@spree/sdk-core';export type { ClaimResolution } from '@spree/sdk-core';export type { ClaimStatus } from '@spree/sdk-core';export type { CollectionSortOrder } from '@spree/sdk-core';diff --git a/packages/sdk/src/types/generated/index.ts b/packages/sdk/src/types/generated/index.tsindex 7e9f518841..ddc49d1106 100644--- a/packages/sdk/src/types/generated/index.ts+++ b/packages/sdk/src/types/generated/index.ts@@ -1,7 +1,8 @@-// Typelizer digest cfd112ed419f6758d03a3ef2986bfd8a+// Typelizer digest cad37b1a1c0f234fa29aacb42d37ceb6//// DO NOT MODIFY: This file was automatically generated by Typelizer.-export type { ClaimResolution, ClaimStatus, CollectionSortOrder, CompanyInvitationStatus, CompanyKind, CountryCode, CurrencyCode, DataRequestKind, DataRequestStatus, DeliveryStatus, DeliveryZoneMemberType, DimensionUnit, DiscountKind, ExchangeStatus, FeeKind, FileUploadVisibility, FulfillmentStatus, FulfillmentType, GiftCardStatus, ImportRowStatus, ImportStatus, InvitationStatus, LocaleCode, MediaType, OptionTypeKind, OrderFulfillmentStatus, OrderPaymentStatus, PaymentSessionStatus, PaymentSetupSessionStatus, PaymentSourceType, PaymentStatus, ProductSubmissionStatus, PurchaseUnit, ReturnStatus, ShippingLabelOwnerType, ShippingLabelStatus, StockAvailability, StockMovementKind, StockReceiptReceivableType, WeightUnit } from './Enums'+export type { AddressOwnerType, ClaimResolution, ClaimStatus, CollectionSortOrder, CompanyInvitationStatus, CompanyKind, CountryCode, CurrencyCode, DataRequestKind, DataRequestStatus, DeliveryStatus, DeliveryZoneMemberType, DimensionUnit, DiscountKind, ExchangeStatus, FeeKind, FileUploadVisibility, FulfillmentStatus, FulfillmentType, GiftCardStatus, ImportRowStatus, ImportStatus, InvitationStatus, LocaleCode, MediaType, OptionTypeKind, OrderFulfillmentStatus, OrderPaymentStatus, PaymentSessionStatus, PaymentSetupSessionStatus, PaymentSourceType, PaymentStatus, ProductSubmissionStatus, PurchaseUnit, ReturnStatus, ShippingLabelOwnerType, ShippingLabelStatus, StockAvailability, StockMovementKind, StockReceiptReceivableType, WeightUnit } from './Enums'+export type { default as AddressOwner } from './AddressOwner'export type { default as Address } from './Address'export type { default as AppliedPromotion } from './AppliedPromotion'export type { default as Base } from './Base'diff --git a/packages/sdk/src/types/index.ts b/packages/sdk/src/types/index.tsindex b9e2b9d654..558ddd8f30 100644--- a/packages/sdk/src/types/index.ts+++ b/packages/sdk/src/types/index.ts@@ -28,6 +28,7 @@ export * from './filters.generated'// Re-export all generated types (unprefixed: Product, Order, etc.)export type {Address,+ AddressOwner,AppliedPromotion,Base,Cart,diff --git a/packages/sdk/src/types/params/CartAddressParams.ts b/packages/sdk/src/types/params/CartAddressParams.tsindex d99d222219..e073d826fb 100644--- a/packages/sdk/src/types/params/CartAddressParams.ts+++ b/packages/sdk/src/types/params/CartAddressParams.ts@@ -3,7 +3,10 @@import type { CountryCode } from '../generated'export type CartAddressParams = {- /** An existing address of the customer to use. The other fields are then ignored. */+ /**+ * An existing address from the buyer's address book, or from the book of the company the cart is+ * for. The other fields are then ignored.+ */id?: stringfirst_name?: stringlast_name?: stringdiff --git a/packages/sdk/src/types/params/CreateCartParams.ts b/packages/sdk/src/types/params/CreateCartParams.tsindex b2fef1b3ee..8037635ea5 100644--- a/packages/sdk/src/types/params/CreateCartParams.ts+++ b/packages/sdk/src/types/params/CreateCartParams.ts@@ -11,9 +11,15 @@ export type CreateCartParams = {market_id?: stringcurrency?: CurrencyCodelocale?: LocaleCode- /** An existing address to ship to. */+ /**+ * An existing address to ship to, from the buyer's address book or from the book of the company+ * the cart is for. List both with `GET /store/carts/:id/addresses`.+ */shipping_address_id?: string- /** An existing address to bill. */+ /**+ * An existing address to bill, from the buyer's address book or from the book of the company the+ * cart is for. List both with `GET /store/carts/:id/addresses`.+ */billing_address_id?: stringpreferred_stock_location_id?: string/**diff --git a/packages/sdk/src/types/params/UpdateCartParams.ts b/packages/sdk/src/types/params/UpdateCartParams.tsindex 8e79001b3a..dd889b49fb 100644--- a/packages/sdk/src/types/params/UpdateCartParams.ts+++ b/packages/sdk/src/types/params/UpdateCartParams.ts@@ -11,9 +11,15 @@ export type UpdateCartParams = {market_id?: stringcurrency?: CurrencyCodelocale?: LocaleCode- /** An existing address to ship to. */+ /**+ * An existing address to ship to, from the buyer's address book or from the book of the company+ * the cart is for. List both with `GET /store/carts/:id/addresses`.+ */shipping_address_id?: string- /** An existing address to bill. */+ /**+ * An existing address to bill, from the buyer's address book or from the book of the company the+ * cart is for. List both with `GET /store/carts/:id/addresses`.+ */billing_address_id?: stringpreferred_stock_location_id?: string/**diff --git a/packages/sdk/src/zod/generated/Address.ts b/packages/sdk/src/zod/generated/Address.tsindex ee0f2d0143..aa2397ec42 100644--- a/packages/sdk/src/zod/generated/Address.ts+++ b/packages/sdk/src/zod/generated/Address.ts@@ -1,5 +1,6 @@// This file is auto-generated. Do not edit directly.import { z } from 'zod';+import { AddressOwnerSchema } from './AddressOwner';export const AddressSchema = z.object({id: z.string(),@@ -23,6 +24,7 @@ export const AddressSchema = z.object({state_abbr: z.string().nullable(),country_iso: z.string(),state_name: z.string().nullable(),+ owner: AddressOwnerSchema.nullable(),});export type Address = z.infer<typeof AddressSchema>;diff --git a/packages/sdk/src/zod/generated/AddressOwner.ts b/packages/sdk/src/zod/generated/AddressOwner.tsnew file mode 100644index 0000000000..1c899f45ce--- /dev/null+++ b/packages/sdk/src/zod/generated/AddressOwner.ts@@ -0,0 +1,10 @@+// This file is auto-generated. Do not edit directly.+import { z } from 'zod';++export const AddressOwnerSchema = z.object({+ id: z.string(),+ type: z.string(),+ name: z.string().nullable(),+});++export type AddressOwner = z.infer<typeof AddressOwnerSchema>;diff --git a/packages/sdk/src/zod/generated/index.ts b/packages/sdk/src/zod/generated/index.tsindex 32197d1799..abfa0127a1 100644--- a/packages/sdk/src/zod/generated/index.ts+++ b/packages/sdk/src/zod/generated/index.ts@@ -1,5 +1,6 @@// This file is auto-generated. Do not edit directly.export { AddressSchema, type Address } from './Address';+export { AddressOwnerSchema, type AddressOwner } from './AddressOwner';export { AppliedPromotionSchema, type AppliedPromotion } from './AppliedPromotion';export { BaseSchema, type Base } from './Base';export { CartSchema, type Cart } from './Cart';diff --git a/spree/api/app/controllers/concerns/spree/api/v3/cart_resolvable.rb b/spree/api/app/controllers/concerns/spree/api/v3/cart_resolvable.rbindex 73a74466a0..6eb1e4d5f5 100644--- a/spree/api/app/controllers/concerns/spree/api/v3/cart_resolvable.rb+++ b/spree/api/app/controllers/concerns/spree/api/v3/cart_resolvable.rb@@ -11,10 +11,16 @@ module Spree# Find cart by prefixed ID and authorize read access (owner or guest# token). Completed carts are not carts anymore — they 404 unless the# caller opts in (idempotent completion, payment-session confirm races).+ #+ # Pass +token: nil+ to demand ownership. A guest token proves the+ # caller holds this cart, which is the right bar for the cart's own+ # contents and no higher — an endpoint reaching past the cart into+ # something the account holds asks for the account instead.+ ## @return [Spree::Cart]- def find_cart(include_completed: false)+ def find_cart(include_completed: false, token: cart_token)@cart = resolve_cart(include_completed: include_completed)- authorize_storefront_read!(@cart, token: cart_token)+ authorize_storefront_read!(@cart, token: token)@cartenddiff --git a/spree/api/app/controllers/spree/api/v3/admin/companies/addresses_controller.rb b/spree/api/app/controllers/spree/api/v3/admin/companies/addresses_controller.rbindex b03a312f7c..d7ddd34893 100644--- a/spree/api/app/controllers/spree/api/v3/admin/companies/addresses_controller.rb+++ b/spree/api/app/controllers/spree/api/v3/admin/companies/addresses_controller.rb@@ -61,8 +61,14 @@ module SpreeSpree.api.admin_address_serializerend+ def collection_includes+ [:owner]+ end++ # The listing includes what the node inherits: a division's orders may ship to its headquarters' sites,+ # so staff placing one must be able to see them — while writes stay with the node that owns the row.def scope- @parent.addresses+ action_name == 'index' ? @parent.address_book : @parent.addressesendendenddiff --git a/spree/api/app/controllers/spree/api/v3/admin/customers/addresses_controller.rb b/spree/api/app/controllers/spree/api/v3/admin/customers/addresses_controller.rbindex 18b00cd8d4..669032ba21 100644--- a/spree/api/app/controllers/spree/api/v3/admin/customers/addresses_controller.rb+++ b/spree/api/app/controllers/spree/api/v3/admin/customers/addresses_controller.rb@@ -69,6 +69,10 @@ module SpreeSpree.api.admin_address_serializerend+ def collection_includes+ [:owner]+ end+privatedef address_attrsdiff --git a/spree/api/app/controllers/spree/api/v3/admin/orders_controller.rb b/spree/api/app/controllers/spree/api/v3/admin/orders_controller.rbindex 53e986d28d..8d7124b7cf 100644--- a/spree/api/app/controllers/spree/api/v3/admin/orders_controller.rb+++ b/spree/api/app/controllers/spree/api/v3/admin/orders_controller.rb@@ -22,7 +22,7 @@ module Spreedescription: 'Null detaches the customer, leaving a guest order under its `email`.'body.attribute :use_customer_default_address, :boolean,only: :create,- description: "With `customer_id`, copies the customer's saved billing and shipping addresses onto the order."+ description: "Copies the saved default billing and shipping addresses onto the order. Sent with `company_id`, it takes that company's defaults, inherited from its parent nodes when the company holds none of its own; otherwise it takes the customer's."body.attribute :currency, :currency, example: 'USD'body.attribute :market_id, :idbody.attribute :channel_id, :id, description: 'Defaults to the store primary channel when omitted.'@@ -37,10 +37,10 @@ module Spreedescription: "The `signed_id` of the buyer's purchase order, from `files.upload()` with `visibility: 'private'`. Null removes the document the order carries."body.attribute :shipping_address_id, :id,only: :create,- description: 'An existing address of the customer.'+ description: "An existing address from the customer's address book, or from the address book of the company the order is for."body.attribute :billing_address_id, :id,only: :create,- description: 'An existing address of the customer.'+ description: "An existing address from the customer's address book, or from the address book of the company the order is for."body.attribute :preferred_stock_location_id, :id,description: "Stock location to prefer for fulfillment. Order Routing's built-in preferred-location rule ranks it first; routing falls back to the next rule when the location can't cover the cart."body.attribute :company_id, :id,diff --git a/spree/api/app/controllers/spree/api/v3/store/carts/addresses_controller.rb b/spree/api/app/controllers/spree/api/v3/store/carts/addresses_controller.rbnew file mode 100644index 0000000000..497f646b26--- /dev/null+++ b/spree/api/app/controllers/spree/api/v3/store/carts/addresses_controller.rb@@ -0,0 +1,53 @@+module Spree+ module Api+ module V3+ module Store+ module Carts+ # Every address this cart may be shipped or billed to, in one call:+ # the buyer's own book, plus the book of the company the cart names+ # — that node's entries and the ones it inherits from the nodes above+ # it — limited to the countries the cart's market sells to.+ #+ # A checkout address step would otherwise merge two books and filter+ # them by the market itself. Asking the cart keeps the picker and the+ # checkout from ever disagreeing about what is usable.+ #+ # Signed in only, unlike the rest of the cart surface. What comes+ # back is not the cart's own data but the books behind it — every+ # address the buyer has saved, and their company's sites. A guest+ # token says the caller holds this cart, which it may well do+ # because the account holder adopted a cart the attacker started;+ # it says nothing about the account. A genuine guest cart has+ # neither book, so requiring the account costs nothing but the 401.+ class AddressesController < Store::ResourceController+ include Spree::Api::V3::CartResolvable++ prepend_before_action :require_authentication!++ protected++ def set_parent+ @parent = @cart = find_cart(token: nil)+ end++ def model_class+ Spree::Address+ end++ def serializer_class+ Spree.api.address_serializer+ end++ def collection_includes+ [:owner]+ end++ def parent_association+ :selectable_addresses+ end+ end+ end+ end+ end+ end+enddiff --git a/spree/api/app/controllers/spree/api/v3/store/carts_controller.rb b/spree/api/app/controllers/spree/api/v3/store/carts_controller.rbindex 2332df9e58..4dc8af38cb 100644--- a/spree/api/app/controllers/spree/api/v3/store/carts_controller.rb+++ b/spree/api/app/controllers/spree/api/v3/store/carts_controller.rb@@ -13,7 +13,7 @@ module SpreeCART_ADDRESS = Spree::Api::V3::RequestSchema.shape('CartAddressParams') do |schema|schema.attribute :id, :id,- description: 'An existing address of the customer to use. The other fields are then ignored.'+ description: "An existing address from the buyer's address book, or from the book of the company the cart is for. The other fields are then ignored."schema.include_attributes Spree::Api::V3::Store::AddressRequestSchemaend@@ -25,10 +25,10 @@ module Spreeschema.attribute :currency, :currencyschema.attribute :locale, :localeschema.attribute :shipping_address_id, :id,- description: 'An existing address to ship to.',+ description: "An existing address to ship to, from the buyer's address book or from the book of the company the cart is for. List both with `GET /store/carts/:id/addresses`.",example: 'addr_abc123'schema.attribute :billing_address_id, :id,- description: 'An existing address to bill.',+ description: "An existing address to bill, from the buyer's address book or from the book of the company the cart is for. List both with `GET /store/carts/:id/addresses`.",example: 'addr_def456'schema.attribute :preferred_stock_location_id, :idschema.attribute :company_id, :id, nullable: true, description: <<~TEXT.squishdiff --git a/spree/api/app/controllers/spree/api/v3/store/companies/addresses_controller.rb b/spree/api/app/controllers/spree/api/v3/store/companies/addresses_controller.rbindex 467edad69e..be33ea5d6c 100644--- a/spree/api/app/controllers/spree/api/v3/store/companies/addresses_controller.rb+++ b/spree/api/app/controllers/spree/api/v3/store/companies/addresses_controller.rb@@ -69,6 +69,10 @@ module SpreeSpree.api.address_serializerend+ def collection_includes+ [:owner]+ end+# Reading a book and keeping one are different rights: the listing# includes what this node inherits, writes stay with the node that# owns the row. The Store API authorizes purely by what this scopediff --git a/spree/api/app/controllers/spree/api/v3/store/customer/addresses_controller.rb b/spree/api/app/controllers/spree/api/v3/store/customer/addresses_controller.rbindex 85723e73ac..f3dfa247e9 100644--- a/spree/api/app/controllers/spree/api/v3/store/customer/addresses_controller.rb+++ b/spree/api/app/controllers/spree/api/v3/store/customer/addresses_controller.rb@@ -64,6 +64,10 @@ module SpreeSpree.api.address_serializerend+ def collection_includes+ [:owner]+ end+def permitted_paramsparams.permit(*permitted_attributes)enddiff --git a/spree/api/app/serializers/spree/api/v3/address_owner_serializer.rb b/spree/api/app/serializers/spree/api/v3/address_owner_serializer.rbnew file mode 100644index 0000000000..e7f73a1318--- /dev/null+++ b/spree/api/app/serializers/spree/api/v3/address_owner_serializer.rb@@ -0,0 +1,27 @@+module Spree+ module Api+ module V3+ # Which address book an entry came out of. A checkout offering the+ # buyer's own addresses beside their company's sites has to label the+ # two, and the owner is the only thing that tells a warehouse from+ # somebody's flat.+ class AddressOwnerSerializer < BaseSerializer+ typelize type: [:string, enum: %w[customer company seller], enum_type_name: 'AddressOwnerType'],+ name: [:string, nullable: true]++ attribute :type do |owner|+ Spree::Base.polymorphic_api_type(owner.class.to_s)+ end++ # What to call the book. A company node answers with its own name, so+ # a division's own sites and the headquarters sites it inherits are+ # told apart rather than filed under one heading. A customer's book is+ # the caller's own and needs no name — "your addresses" is the client's+ # word for it, in the shopper's language.+ attribute :name do |owner|+ owner.name if owner.is_a?(Spree::Company)+ end+ end+ end+ end+enddiff --git a/spree/api/app/serializers/spree/api/v3/address_serializer.rb b/spree/api/app/serializers/spree/api/v3/address_serializer.rbindex 9aa2ca51e4..b886fcedbd 100644--- a/spree/api/app/serializers/spree/api/v3/address_serializer.rb+++ b/spree/api/app/serializers/spree/api/v3/address_serializer.rb@@ -12,7 +12,7 @@ module Spreecountry_iso: [:string, deprecated: 'Use `country_code`. Removed in 6.1.'],country_name: :string,quick_checkout: :boolean, is_default_billing: :boolean, is_default_shipping: :boolean,- label: [:string, nullable: true]+ label: [:string, nullable: true], owner: { nullable: true }# What the address is filed under in whichever book owns it — a# customer's ("Home") or a company node's ("Northern Warehouse").@@ -31,6 +31,10 @@ module Spreeattribute :state_name do |address|address.state_name.presence || address.state&.nameend++ # The address book the entry belongs to. Null for an address in no+ # book: one a guest typed in, or the copy a placed order keeps.+ one :owner, resource: proc { Spree.api.address_owner_serializer }endendenddiff --git a/spree/api/app/serializers/spree/api/v3/admin/address_owner_serializer.rb b/spree/api/app/serializers/spree/api/v3/admin/address_owner_serializer.rbnew file mode 100644index 0000000000..5c7db503a1--- /dev/null+++ b/spree/api/app/serializers/spree/api/v3/admin/address_owner_serializer.rb@@ -0,0 +1,10 @@+module Spree+ module Api+ module V3+ module Admin+ class AddressOwnerSerializer < V3::AddressOwnerSerializer+ end+ end+ end+ end+enddiff --git a/spree/api/app/serializers/spree/api/v3/admin/address_serializer.rb b/spree/api/app/serializers/spree/api/v3/admin/address_serializer.rbindex c5d9871994..3115494b29 100644--- a/spree/api/app/serializers/spree/api/v3/admin/address_serializer.rb+++ b/spree/api/app/serializers/spree/api/v3/admin/address_serializer.rb@@ -7,8 +7,6 @@ module Spree%i[state_abbr country_iso].each { |key| _attributes.delete(key) }typelize customer_id: [:string, nullable: true],- owner_id: [:string, nullable: true],- owner_type: [:string, nullable: true],latitude: [:number, nullable: true],longitude: [:number, nullable: true],metadata: 'Record<string, unknown>'@@ -29,14 +27,7 @@ module Spreeprefixed_id_attributes customer_id: :customer_owner- # Who the row belongs to — a customer's book, a company node's, or a- # seller's billing address. `customer_id` above stays as the- # customer-only shorthand the customers surface reads.- prefixed_id_attributes :owner-- attribute :owner_type do |address|- Spree::Base.polymorphic_api_type(address.owner_type)- end+ one :owner, resource: proc { Spree.api.admin_address_owner_serializer }endendenddiff --git a/spree/api/app/serializers/spree/api/v3/seller/address_serializer.rb b/spree/api/app/serializers/spree/api/v3/seller/address_serializer.rbindex 19af3a5d96..4653cec47c 100644--- a/spree/api/app/serializers/spree/api/v3/seller/address_serializer.rb+++ b/spree/api/app/serializers/spree/api/v3/seller/address_serializer.rb@@ -3,8 +3,9 @@ module Spreemodule V3module Sellerclass AddressSerializer < V3::AddressSerializer- # The Store API keeps these deprecated names until 6.1.- %i[state_abbr country_iso].each { |key| _attributes.delete(key) }+ # The Store API keeps these deprecated names until 6.1. A seller+ # keeps no address book of the buyer's, so has no owner to read.+ %i[state_abbr country_iso owner].each { |key| _attributes.delete(key) }endendenddiff --git a/spree/api/config/routes.rb b/spree/api/config/routes.rbindex e7e78722d9..48eab9b4cb 100644--- a/spree/api/config/routes.rb+++ b/spree/api/config/routes.rb@@ -43,6 +43,7 @@ Spree::Core::Engine.add_routes dopatch :associatepost :completeend+ resources :addresses, only: [:index], controller: 'carts/addresses'resources :items, only: [:create, :update, :destroy], controller: 'carts/items'resources :discount_codes, only: [:create, :destroy], controller: 'carts/discount_codes'resources :gift_cards, only: [:create, :destroy], controller: 'carts/gift_cards'diff --git a/spree/api/lib/spree/api/dependencies.rb b/spree/api/lib/spree/api/dependencies.rbindex 9282443565..d7da6edea6 100644--- a/spree/api/lib/spree/api/dependencies.rb+++ b/spree/api/lib/spree/api/dependencies.rb@@ -9,7 +9,7 @@ module SpreeSTORE_SERIALIZERS =%i[credit_card price price_history product product_type variant media option_type option_value cart orderorder_group line_item payment payment_session payment_setup_session payment_source store_credit- fulfillment delivery address customer data_request customer_group country channel product_publication+ fulfillment delivery address address_owner customer data_request customer_group country channel product_publicationmarket state wishlist wishlist_item payment_method delivery_method delivery_rate freight_summarystock_location category collection applied_promotion discount tax_line delivery_zone delivery_zone_memberfee digital_link gift_card currency locale policy custom_field tax_category tax_identifier@@ -34,7 +34,7 @@ module Spreecatalog_product price_list_product catalog_assignment catalog_quantity_rule catalog_product_termcatalog_order_minimum tax_exemption_certificate tax_exemption_reason admin_user actor seller_team_member product_submissionseller seller_requirement seller_requirement_submission seller_requirement_status commission_rate- commission_rule commission_line seller_transfer seller_payout seller_balance payment_split payment_capture_event address+ commission_rule commission_line seller_transfer seller_payout seller_balance payment_split payment_capture_event address address_ownerchannel order_routing_rule product_publication market delivery_method delivery_method_servicestock_location stock_reservation delivery_rate freight_summary freight_summary_line payment_methodcredit_card store_credit store_credit_event customer_group payment_source digital_asset digital_linkdiff --git a/spree/api/spec/controllers/spree/api/v3/admin/companies/addresses_controller_spec.rb b/spree/api/spec/controllers/spree/api/v3/admin/companies/addresses_controller_spec.rbindex 96e0a456de..4e7cc0bf2b 100644--- a/spree/api/spec/controllers/spree/api/v3/admin/companies/addresses_controller_spec.rb+++ b/spree/api/spec/controllers/spree/api/v3/admin/companies/addresses_controller_spec.rb@@ -27,6 +27,26 @@ RSpec.describe Spree::Api::V3::Admin::Companies::AddressesController, type: :conexpect(response).to have_http_status(:not_found)end++ context 'for a division' do+ let!(:division) { create(:company, store: store, kind: 'division', parent: company) }+ let!(:headquarters) { create(:company_address, owner: company, label: 'HQ') }+ let!(:dock) { create(:company_address, owner: division, label: 'Dock') }++ it 'includes the sites inherited from the nodes above it' do+ get :index, params: { company_id: division.prefixed_id }, as: :json++ expect(json_response['data'].map { |row| row['id'] }).+ to contain_exactly(headquarters.prefixed_id, dock.prefixed_id)+ end++ it 'still refuses to rewrite an inherited site' do+ patch :update, params: { company_id: division.prefixed_id, id: headquarters.prefixed_id, label: 'Taken' }, as: :json++ expect(response).to have_http_status(:not_found)+ expect(headquarters.reload.label).to eq('HQ')+ end+ endenddescribe 'POST #create' dodiff --git a/spree/api/spec/controllers/spree/api/v3/store/carts/addresses_controller_spec.rb b/spree/api/spec/controllers/spree/api/v3/store/carts/addresses_controller_spec.rbnew file mode 100644index 0000000000..ae64ca0318--- /dev/null+++ b/spree/api/spec/controllers/spree/api/v3/store/carts/addresses_controller_spec.rb@@ -0,0 +1,116 @@+require 'spec_helper'++RSpec.describe Spree::Api::V3::Store::Carts::AddressesController, type: :controller do+ render_views++ include_context 'API v3 Store'++ let!(:cart) { create(:cart_with_line_items, customer: user, store: store) }+ let!(:own_address) { create(:address, customer: user) }++ before do+ request.headers['X-Spree-Api-Key'] = api_key.token+ request.headers['Authorization'] = "Bearer #{jwt_token}"+ end++ def listed_ids+ json_response['data'].map { |address| address['id'] }+ end++ def owner_of(address)+ json_response['data'].find { |row| row['id'] == address.prefixed_id }['owner']+ end++ describe 'GET #index' do+ it 'lists the buyer\'s own book' do+ get :index, params: { cart_id: cart.prefixed_id }++ expect(response).to have_http_status(:ok)+ expect(listed_ids).to include(own_address.prefixed_id)+ expect(listed_ids).to match_array(user.addresses.map(&:prefixed_id))+ end++ # A picker showing both books has to label them, and nothing else in the+ # payload distinguishes a warehouse from somebody's flat.+ it 'names the book each address came out of' do+ get :index, params: { cart_id: cart.prefixed_id }++ expect(owner_of(own_address)).to eq('id' => user.prefixed_id, 'type' => 'customer', 'name' => nil)+ end++ it 'leaves out another customer\'s book' do+ foreign = create(:address, customer: create(:user))++ get :index, params: { cart_id: cart.prefixed_id }++ expect(listed_ids).not_to include(foreign.prefixed_id)+ end++ context 'when the cart is for a company' do+ let(:company) { create(:company, store: store) }+ let(:division) { create(:company, store: store, kind: 'division', parent: company) }+ let!(:headquarters) { create(:company_address, owner: company, first_name: 'Dana', last_name: 'Reyes') }+ let!(:site) { create(:company_address, owner: division, first_name: 'Sam', last_name: 'Okafor') }++ before do+ create(:company_membership, company: company, customer: user)+ cart.update!(company: division)+ end++ it 'adds the node\'s own sites and the ones it inherits' do+ get :index, params: { cart_id: cart.prefixed_id }++ expect(listed_ids).to include(own_address.prefixed_id, headquarters.prefixed_id, site.prefixed_id)+ end++ # An inherited site belongs to the node above, not to the one the cart+ # is for — so each entry names its own node and a picker can say where+ # a dock actually is, rather than filing the lot under the division.+ it 'names the owning node, not the cart\'s' do+ get :index, params: { cart_id: cart.prefixed_id }++ expect(owner_of(headquarters)).to eq('id' => company.prefixed_id, 'type' => 'company', 'name' => company.name)+ expect(owner_of(site)).to eq('id' => division.prefixed_id, 'type' => 'company', 'name' => division.name)+ end++ it 'leaves out a company the cart is not for' do+ outsider = create(:company_address, owner: create(:company, store: store))++ get :index, params: { cart_id: cart.prefixed_id }++ expect(listed_ids).not_to include(outsider.prefixed_id)+ end+ end++ it 'refuses a cart belonging to another customer' do+ other_cart = create(:cart, store: store, customer: create(:user))++ get :index, params: { cart_id: other_cart.prefixed_id }++ expect(response).to have_http_status(:forbidden).or have_http_status(:not_found)+ end++ # What comes back is the account's books, not the cart's own data, so+ # holding the cart is not enough. The attacker's route is a cart they+ # started and the buyer later adopted: the token is not rotated on+ # association, so it would still read everything the buyer has saved.+ context 'without a signed-in customer' do+ before { request.headers['Authorization'] = nil }++ it 'refuses the cart token that matches' do+ request.headers['X-Spree-Token'] = cart.token++ get :index, params: { cart_id: cart.prefixed_id }++ expect(response).to have_http_status(:unauthorized)+ expect(response.body).not_to include(own_address.address1)+ end++ it 'refuses a request carrying nothing but the publishable key' do+ get :index, params: { cart_id: cart.prefixed_id }++ expect(response).to have_http_status(:unauthorized)+ end+ end+ end+enddiff --git a/spree/api/spec/controllers/spree/api/v3/store/carts_controller_spec.rb b/spree/api/spec/controllers/spree/api/v3/store/carts_controller_spec.rbindex 6fa8c6ac4a..cc2bab68c5 100644--- a/spree/api/spec/controllers/spree/api/v3/store/carts_controller_spec.rb+++ b/spree/api/spec/controllers/spree/api/v3/store/carts_controller_spec.rb@@ -708,6 +708,20 @@ RSpec.describe Spree::Api::V3::Store::CartsController, type: :controller doexpect(order.reload.ship_address_id).to eq(existing_address.id)end+ it 'accepts shipping_address_id from the company the cart is for' do+ company = create(:company, store: store)+ create(:company_membership, company: company, customer: user)+ site = create(:company_address, owner: company, first_name: 'Dana', last_name: 'Reyes',+ country: country, state: us_state)++ patch :update, params: {+ id: order.prefixed_id, company_id: company.prefixed_id, shipping_address_id: site.prefixed_id+ }++ expect(response).to have_http_status(:ok)+ expect(order.reload.ship_address_id).to eq(site.id)+ end+context 'the buyer purchase order' doit 'persists the reference and reports it back' dopatch :update, params: { id: order.prefixed_id, po_number: 'PO-4471' }diff --git a/spree/api/spec/controllers/spree/api/v3/store/companies/addresses_controller_spec.rb b/spree/api/spec/controllers/spree/api/v3/store/companies/addresses_controller_spec.rbindex 2049957bc0..a56546baa4 100644--- a/spree/api/spec/controllers/spree/api/v3/store/companies/addresses_controller_spec.rb+++ b/spree/api/spec/controllers/spree/api/v3/store/companies/addresses_controller_spec.rb@@ -58,6 +58,8 @@ RSpec.describe Spree::Api::V3::Store::Companies::AddressesController, type: :conexpect(response).to have_http_status(:ok)expect(json_response['data'].map { |row| row['id'] }).to contain_exactly(own.prefixed_id, inherited.prefixed_id)+ expect(json_response['data'].to_h { |row| [row['id'], row.dig('owner', 'id')] }).+ to eq(own.prefixed_id => division.prefixed_id, inherited.prefixed_id => company.prefixed_id)endend# Reading what you inherit is not the same as editing it. A division memberdiff --git a/spree/api/spec/integration/spree/api/v3/store/cart_addresses_spec.rb b/spree/api/spec/integration/spree/api/v3/store/cart_addresses_spec.rbnew file mode 100644index 0000000000..6b18515753--- /dev/null+++ b/spree/api/spec/integration/spree/api/v3/store/cart_addresses_spec.rb@@ -0,0 +1,87 @@+# frozen_string_literal: true++require 'swagger_helper'++RSpec.describe 'Cart Addresses API', type: :request, swagger_doc: 'api-reference/store.yaml' do+ include_context 'API v3 Store'++ let(:cart) { create(:cart_with_line_items, store: store, customer: user) }+ let!(:address) { create(:address, customer: user) }++ path '/api/v3/store/carts/{cart_id}/addresses' do+ parameter name: :cart_id, in: :path, type: :string, required: true, description: 'Cart prefixed ID'++ get 'List addresses this cart may use' do+ tags 'Carts'+ produces 'application/json'+ security [api_key: [], bearer_auth: []]+ description <<~DESC+ Everything a checkout address step may offer for this cart: the buyer's own address+ book, plus the address book of the company set as the cart's `company_id` — that+ company's own sites and the ones it inherits from the companies above it. Only+ addresses in a country the cart's market sells to are listed.++ Requires a signed-in customer, unlike the rest of the cart endpoints. The response+ is the account's address books rather than the cart's own data, so a guest cart+ token is not accepted here. A guest cart has neither book and would get an empty+ list in any case.++ Each entry carries the `owner` it was filed under — the customer, or the company+ node that owns the site — so a picker can group and label them from one+ response. An inherited site names the node above, not the+ one the cart is for.++ Any address returned here is accepted as `shipping_address_id` or+ `billing_address_id` on the cart, so the picker and the cart cannot disagree.+ Curating either book stays with `/store/customers/me/addresses` and+ `/store/companies/{company_id}/addresses`.+ DESC++ sdk_example 'cart-addresses/list'++ parameter name: 'x-spree-api-key', in: :header, type: :string, required: true+ parameter name: 'Authorization', in: :header, type: :string, required: true+ parameter name: :page, in: :query, type: :integer, required: false+ parameter name: :limit, in: :query, type: :integer, required: false+ filter_parameters_for++ response '200', 'addresses found' do+ let(:'x-spree-api-key') { api_key.token }+ let(:'Authorization') { "Bearer #{jwt_token}" }+ let(:cart_id) { cart.prefixed_id }++ schema type: :object,+ properties: {+ data: { type: :array, items: { '$ref' => '#/components/schemas/Address' } },+ meta: { '$ref' => '#/components/schemas/PaginationMeta' }+ }++ run_test! do |response|+ data = JSON.parse(response.body)+ expect(data['data'].map { |row| row['id'] }).to include(address.prefixed_id)+ expect(data['data'].first['owner']['type']).to eq('customer')+ end+ end++ response '401', 'not authenticated' do+ let(:'x-spree-api-key') { api_key.token }+ let(:'Authorization') { nil }+ let(:cart_id) { cart.prefixed_id }++ schema '$ref' => '#/components/schemas/ErrorResponse'++ run_test!+ end++ response '404', 'cart not found' do+ let(:'x-spree-api-key') { api_key.token }+ let(:'Authorization') { "Bearer #{jwt_token}" }+ let(:cart_id) { 'cart_missing' }++ schema '$ref' => '#/components/schemas/ErrorResponse'++ run_test!+ end+ end+ end+enddiff --git a/spree/core/app/models/concerns/spree/purchase/addresses.rb b/spree/core/app/models/concerns/spree/purchase/addresses.rbindex 078c2f85e9..1300090c26 100644--- a/spree/core/app/models/concerns/spree/purchase/addresses.rb+++ b/spree/core/app/models/concerns/spree/purchase/addresses.rb@@ -3,8 +3,8 @@ module Spree# The full address surface shared by Spree::Cart and Spree::Order:# the bill/ship associations and their public aliases, default filling# from the customer's saved addresses, address-row deduplication on- # write, ownership-guarded address_id assignment, promotion of checkout- # addresses to the customer's defaults, and the ship→bill cloning+ # write, ownership-guarded address_id assignment and deletion, promotion+ # of checkout addresses to the customer's defaults, and the ship→bill cloning# predicate. The shipping address is canonical: use_shipping copies it# onto the billing address; the reverse use_billing direction is a# deprecated 6.1-removal bridge. Clone callbacks are wired per model.@@ -12,8 +12,13 @@ module Spreeextend ActiveSupport::Concernincluded do- belongs_to :bill_address, class_name: 'Spree::Address', optional: true, dependent: :destroy- belongs_to :ship_address, class_name: 'Spree::Address', optional: true, dependent: :destroy+ belongs_to :bill_address, class_name: 'Spree::Address', optional: true+ belongs_to :ship_address, class_name: 'Spree::Address', optional: true++ # Stands in for `dependent: :destroy`, which would take any attached+ # row down with the purchase. See {#owns_address?} for why only some+ # of them may go.+ after_destroy :destroy_own_addresses# The writers these generate are shadowed by the hand-written ones# below, which deduplicate address rows. The declarations still earn@@ -93,6 +98,68 @@ module Spreeuse_shipping.in?([true, 'true', '1'])end+ # The address behind an id a client may select, or nil when the id names+ # one this purchase has no business shipping to. Takes a prefixed id or a+ # raw primary key, so the services that resolve a client-supplied id and+ # the writers below share one rule rather than each inventing their own.+ #+ # Two books qualify. The buyer's own is the ordinary case. The company's+ # is the B2B one: a purchase for a node ships to that node's sites, and+ # to its ancestors' — the same self-and-ancestors chain the node's+ # default address is prefilled from, so a division can pick the+ # headquarters address it already inherits.+ #+ # @param id [Integer, String, nil]+ # @return [Spree::Address, nil]+ def selectable_address(id)+ address = ::Spree::Address.not_deleted.find_by_param(id) || ::Spree::Address.not_deleted.find_by(id: id)+ return if address.nil?++ return address if customer_id.present? && address.customer_owned? && address.owner_id == customer_id++ company = readable_company+ return if company.nil? || address.owner_type != 'Spree::Company'++ company.self_and_ancestors.any? { |node| node.id == address.owner_id } ? address : nil+ end++ # Everything a checkout address picker may offer for this purchase: the+ # buyer's own book plus the book of the company it names, that node's+ # own entries and the ones it inherits, limited to the countries the+ # purchase's market sells to. A subset of what {#selectable_address}+ # accepts, so a picker built from it never offers an address the+ # checkout cannot deliver to.+ #+ # @return [ActiveRecord::Relation<Spree::Address>]+ def selectable_addresses+ books = []+ books << ::Spree::Address.not_deleted.where(owner_type: ::Spree.customer_class.to_s, owner_id: customer_id) if customer_id.present?+ books << readable_company&.address_book++ addresses = books.compact.reduce { |left, right| left.or(right) } || ::Spree::Address.none+ return addresses if market.nil?++ addresses.where(country_code: market.market_countries.select(:country_code))+ end++ # Whether an attached address row is this purchase's own to delete.+ #+ # Only the ownerless rows are: the one a guest typed in, and the+ # snapshot completion copies onto the order. Everything else is an entry+ # in somebody's address book — the buyer's, a company node's, a seller's+ # — which the purchase is merely pointing at. A cart may name a company+ # site every other member ships from, so taking an attached row down+ # with the cart would let one member empty the shared book.+ #+ # A business snapshot keeps its +owner_type+ to stay addressed to a+ # company rather than to a person, so ownership is the id, not the type.+ #+ # @param address [Spree::Address, nil]+ # @return [Boolean]+ def owns_address?(address)+ address.present? && address.owner_id.blank?+ end+# Fills any blank bill/ship address from the customer's valid saved# defaults. The ship address is skipped when no physical delivery is# required, so shipping-address validations never fire on digital-only@@ -177,6 +244,26 @@ module Spreeprivate+ # The company whose book this purchase may read: only the one the+ # client named, never one inferred from a sole membership. A cart asks+ # again rather than trusting the column, which nothing clears when a+ # membership is revoked; an order's authority is staff or a completed+ # cart, so it keeps what it was given.+ #+ # @return [Spree::Company, nil]+ def readable_company+ return company if company.nil? || !is_a?(Spree::Cart)++ company if customer&.standing_for?(company)+ end++ # Both slots often hold the same row, so destroy it once.+ def destroy_own_addresses+ [bill_address, ship_address].compact.uniq.each do |address|+ address.destroy if owns_address?(address)+ end+ end+def items_require_shipping_address?# Answered by the profile kind, resolved once per profile.profile_requires_address = Hash.new do |cache, profile|@@ -190,33 +277,6 @@ module Spreeendend- # The address behind an id a client may select, or nil when the id names- # one this purchase has no business shipping to.- #- # Two books qualify. The buyer's own is the ordinary case. The company's- # is the B2B one: a purchase for a node ships to that node's sites, and- # to its ancestors' — the same self-and-ancestors chain the node's- # default address is prefilled from, so a division can pick the- # headquarters address it already inherits.- #- # Standing is not re-checked here: a cart cannot name a company its- # customer lacks standing over, so reaching this point already means the- # buyer may act for the node.- #- # @param id [Integer, String, nil]- # @return [Spree::Address, nil]- def selectable_address(id)- address = ::Spree::Address.find_by(id: id)- return nil if address.nil?-- return address if customer_id.present? && address.customer_owned? && address.owner_id == customer_id-- company = resolved_company- return nil if company.nil? || address.owner_type != 'Spree::Company'-- company.self_and_ancestors.any? { |node| node.id == address.owner_id } ? address : nil- end-# Reuse never reaches past what the buyer already owns: a signed-in buyer# may name any entry of their own address book, and a guest — who keeps# no book — may only edit the row already in the slot being written.diff --git a/spree/core/app/models/spree/address.rb b/spree/core/app/models/spree/address.rbindex ba912671f9..b68615922b 100644--- a/spree/core/app/models/spree/address.rb+++ b/spree/core/app/models/spree/address.rb@@ -343,6 +343,12 @@ module Spreedef snapshotdup.tap do |copy|copy.owner = nil++ if business_owned?+ copy.company = company.presence || owner&.name+ copy.owner_type = owner_type+ end+copy.label = nilcopy.deleted_at = nilenddiff --git a/spree/core/app/models/spree/company.rb b/spree/core/app/models/spree/company.rbindex 5fd83d6800..b841ae3e9a 100644--- a/spree/core/app/models/spree/company.rb+++ b/spree/core/app/models/spree/company.rb@@ -245,7 +245,7 @@ module Spree## @return [ActiveRecord::Relation]def address_book- Spree::Address.where(owner_type: 'Spree::Company', owner_id: self_and_ancestors.map(&:id))+ Spree::Address.not_deleted.where(owner_type: 'Spree::Company', owner_id: self_and_ancestors.map(&:id))endprivatediff --git a/spree/core/app/services/spree/carts/destroy.rb b/spree/core/app/services/spree/carts/destroy.rbindex 685b2753a2..e49ab0706f 100644--- a/spree/core/app/services/spree/carts/destroy.rb+++ b/spree/core/app/services/spree/carts/destroy.rb@@ -52,9 +52,14 @@ module Spreesuccess(cart: cart)end+ # Lets go of everything the cart was only borrowing, so the cascade that+ # follows reaches nothing but the cart's own rows. An entry in somebody's+ # address book stays in it, and a row a fulfillment or a completed order+ # still points at is detached rather than soft-deleted out from under+ # them.def clear_addresses(cart:)- cart.ship_address = nil unless cart.ship_address&.can_be_deleted?- cart.bill_address = nil unless cart.bill_address&.can_be_deleted?+ cart.ship_address = nil unless cart.owns_address?(cart.ship_address) && cart.ship_address.can_be_deleted?+ cart.bill_address = nil unless cart.owns_address?(cart.bill_address) && cart.bill_address.can_be_deleted?success(cart: cart)enddiff --git a/spree/core/app/services/spree/carts/update.rb b/spree/core/app/services/spree/carts/update.rbindex 42ca65c4f4..a2594a198a 100644--- a/spree/core/app/services/spree/carts/update.rb+++ b/spree/core/app/services/spree/carts/update.rb@@ -206,10 +206,7 @@ module Spreeenddef resolve_address_id(prefixed_id)- return unless cart.customer-- decoded = Spree::Address.decode_prefixed_id(prefixed_id)- decoded ? cart.customer.addresses.find_by(id: decoded)&.id : nil+ cart.selectable_address(prefixed_id)&.idenddef assign_marketdiff --git a/spree/core/app/workflows/spree/customers/anonymize.rb b/spree/core/app/workflows/spree/customers/anonymize.rbindex 752af6bd2f..3922324e1f 100644--- a/spree/core/app/workflows/spree/customers/anonymize.rb+++ b/spree/core/app/workflows/spree/customers/anonymize.rb@@ -212,9 +212,15 @@ module Spree# redacting that would overwrite the shared address for every other# member and every other order. Only rows this person owns, or rows# nobody owns, are this erasure's to rewrite.+ #+ # Ownership is the id alone, never the type. A snapshot taken from a+ # company site keeps its owner_type so the copy stays addressed to a+ # business rather than to a person, so matching on the type too would+ # skip exactly those copies — and an erasure that quietly covers less+ # than it did raises nothing.snapshots = Spree::Address.where(id: address_ids)mine = snapshots.where(owner_type: customer.class.base_class.to_s, owner_id: customer.id)- unowned = snapshots.where(owner_type: nil, owner_id: nil)+ unowned = snapshots.where(owner_id: nil)mine.or(unowned).find_each do |address|redact_address(address, deleted: false)@@ -460,22 +466,35 @@ module Spree# @param address [Spree::Address]# @param deleted [Boolean] whether to soft-delete it as well+ # What the person left on an address, rewritten; the address itself kept+ # readable enough to answer a tax enquiry.+ #+ # A snapshot copied from a company site is the narrower case. The dock+ # and the trading name on it are the business's, not this person's, and+ # erasing them would take the merchant's record of a lawful sale with+ # them — so only the contact details go. A business address is allowed+ # to name nobody, which is why those fields are emptied rather than+ # stamped: writing "Redacted" where a company never named anyone would+ # invent a person who was not there.def redact_address(address, deleted:)- attributes = {- first_name: REDACTED_NAME,- last_name: REDACTED_NAME,- address1: REDACTED_NAME,- address2: nil,- phone: nil,- alternative_phone: nil,- company: nil,- label: nil,- latitude: nil,- longitude: nil,- postal_code: truncated_postal_code(address.postal_code),- metadata: {},- updated_at: Time.current- }+ attributes =+ if address.business_owned?+ { first_name: nil, last_name: nil }+ else+ {+ first_name: REDACTED_NAME,+ last_name: REDACTED_NAME,+ address1: REDACTED_NAME,+ address2: nil,+ company: nil,+ label: nil,+ latitude: nil,+ longitude: nil,+ postal_code: truncated_postal_code(address.postal_code)+ }+ end++ attributes.merge!(phone: nil, alternative_phone: nil, metadata: {}, updated_at: Time.current)attributes[:deleted_at] = Time.current if deleted && address.deleted_at.nil?address.update_columns(attributes)diff --git a/spree/core/app/workflows/spree/orders/create.rb b/spree/core/app/workflows/spree/orders/create.rbindex 46558b3b85..0b5adbe0fd 100644--- a/spree/core/app/workflows/spree/orders/create.rb+++ b/spree/core/app/workflows/spree/orders/create.rb@@ -114,33 +114,39 @@ module Spreeenddef assign_addresses(order)- if @params[:use_customer_default_address] && @customer- @customer.association(:bill_address).load_target- @customer.association(:ship_address).load_target- order.bill_address = @customer.bill_address&.snapshot- order.ship_address = @customer.ship_address&.snapshot- end+ assign_default_addresses(order) if @params[:use_customer_default_address]assign_address(order, :ship_address, @params[:shipping_address_id], @params[:shipping_address])assign_address(order, :bill_address, @params[:billing_address_id], @params[:billing_address])order.use_shipping = @params[:use_shipping]end+ def assign_default_addresses(order)+ company = order.company++ if company.present?+ order.bill_address = company.default_billing_address&.snapshot+ order.ship_address = company.default_shipping_address&.snapshot+ return+ end++ return if @customer.nil?++ @customer.association(:bill_address).load_target+ @customer.association(:ship_address).load_target+ order.bill_address = @customer.bill_address&.snapshot+ order.ship_address = @customer.ship_address&.snapshot+ end+def assign_address(order, association, address_id, address_attrs)if address_id.present?- address = resolve_user_address(address_id)+ address = order.selectable_address(address_id)order.public_send(:"#{association}_id=", address.id) if addresselsif address_attrs.present?order.public_send(:"#{association}_attributes=", address_attrs)endend- def resolve_user_address(address_id)- return unless @customer-- @customer.addresses.find_by_param(address_id)- end-def add_items(order)result = Spree::Orders::UpsertItems.call(order: order, items: @params[:items],diff --git a/spree/core/spec/models/concerns/spree/purchase/addresses_spec.rb b/spree/core/spec/models/concerns/spree/purchase/addresses_spec.rbindex b538ef068b..600c18a67f 100644--- a/spree/core/spec/models/concerns/spree/purchase/addresses_spec.rb+++ b/spree/core/spec/models/concerns/spree/purchase/addresses_spec.rb@@ -160,6 +160,20 @@ RSpec.shared_examples 'an addresses host' doexpect(record.ship_address_id).to eq(company_address.id)end+ it 'accepts an address from the company book for billing too' do+ record.company = company+ record.bill_address_id = company_address.id++ expect(record.bill_address_id).to eq(company_address.id)+ end++ it 'refuses another company\'s book for billing' do+ record.company = company+ record.bill_address_id = create(:company_address, owner: create(:company, store: store)).id++ expect(record.bill_address_id).to be_nil+ end+# The same self-and-ancestors chain the node's default address is# prefilled from: a division may ship to the headquarters it inherits.it 'accepts an address from an ancestor of the purchase node' do@@ -170,12 +184,13 @@ RSpec.shared_examples 'an addresses host' doexpect(record.ship_address_id).to eq(company_address.id)end- # Sole standing resolves the node without an explicit choice, so the- # book is selectable for a one-membership buyer who never picked.- it 'accepts the book of the sole standing company without an explicit choice' do+ # The storefront names the company; a sole membership is not taken as+ # a choice the buyer never made.+ it 'refuses the company book until the purchase names the company' dorecord.ship_address_id = company_address.id- expect(record.ship_address_id).to eq(company_address.id)+ expect(record.ship_address_id).to be_nil+ expect(record.selectable_addresses).not_to include(company_address)endit 'refuses a company book to a buyer with no standing anywhere' do@@ -204,6 +219,110 @@ RSpec.shared_examples 'an addresses host' doendend+ describe '#selectable_address' do+ let(:own_address) { create(:address, customer: user) }++ it 'accepts a prefixed id as well as a raw one' do+ expect(record.selectable_address(own_address.prefixed_id)).to eq(own_address)+ expect(record.selectable_address(own_address.id)).to eq(own_address)+ end++ it 'answers nil for a blank id' do+ expect(record.selectable_address(nil)).to be_nil+ expect(record.selectable_address('')).to be_nil+ end++ it 'answers nil for another customer\'s address' do+ expect(record.selectable_address(create(:address, customer: create(:user)).id)).to be_nil+ end++ context 'when the entry has been retired' do+ it 'answers nil for a retired entry of the buyer\'s own book' do+ own_address.update_column(:deleted_at, Time.current)++ expect(record.selectable_address(own_address.id)).to be_nil+ expect(record.selectable_address(own_address.prefixed_id)).to be_nil+ end++ it 'answers nil for a retired company site' do+ company = create(:company, store: store)+ create(:company_membership, company: company, customer: user)+ site = create(:company_address, owner: company)+ record.company = company+ site.update_column(:deleted_at, Time.current)++ expect(record.selectable_address(site.id)).to be_nil+ expect(record.selectable_address(site.prefixed_id)).to be_nil+ end++ it 'refuses a retired company site on the writers too' do+ company = create(:company, store: store)+ create(:company_membership, company: company, customer: user)+ site = create(:company_address, owner: company)+ record.company = company+ site.update_column(:deleted_at, Time.current)++ record.ship_address_id = site.id+ record.bill_address_id = site.id++ expect(record.ship_address_id).to be_nil+ expect(record.bill_address_id).to be_nil+ expect(record.selectable_addresses).not_to include(site)+ end+ end+ end++ describe '#selectable_addresses' do+ let!(:own_address) { create(:address, customer: user) }+ let!(:foreign_address) { create(:address, customer: create(:user)) }++ it 'lists the buyer\'s own book and nobody else\'s' do+ expect(record.selectable_addresses).to include(own_address)+ expect(record.selectable_addresses).not_to include(foreign_address)+ end++ it 'is empty for a guest' do+ expect(guest_record.selectable_addresses).to be_empty+ end++ it 'omits an address in a country the purchase\'s market does not sell to' do+ germany = Spree::Country.by_iso('DE')+ record.market = create(:market, store: store, countries: [germany])+ german_address = create(:address, customer: user, country: germany)++ expect(record.selectable_addresses).to include(german_address)+ expect(record.selectable_addresses).not_to include(own_address)+ end++ context 'when the purchase is for a company' do+ let(:company) { create(:company, store: store) }+ let(:division) { create(:company, store: store, kind: 'division', parent: company) }+ let!(:headquarters_address) { create(:company_address, owner: company) }+ let!(:division_address) { create(:company_address, owner: division) }++ before do+ create(:company_membership, company: company, customer: user)+ record.company = division+ end++ it 'adds the node\'s own sites and the ones it inherits' do+ expect(record.selectable_addresses).to include(own_address, headquarters_address, division_address)+ end++ it 'omits a company the purchase is not for' do+ other_address = create(:company_address, owner: create(:company, store: store))++ expect(record.selectable_addresses).not_to include(other_address)+ end++ it 'omits a retired site' do+ headquarters_address.update_column(:deleted_at, Time.current)++ expect(record.selectable_addresses).not_to include(headquarters_address)+ end+ end+ end+describe '#clone_shipping_address' doit 'copies the ship address onto the bill address and the user default' doship_address = create(:address, customer: user)@@ -354,6 +473,42 @@ RSpec.shared_examples 'an addresses host' doexpect(record.bill_address.first_name).to eq 'New name'endend++ describe 'destroying the purchase' do+ let(:company) { create(:company, store: store) }+ let(:company_address) { create(:company_address, owner: company) }+ let(:own_address) { create(:address, customer: user) }++ before { create(:company_membership, company: company, customer: user) }++ it 'keeps a company site the purchase was shipping to' do+ record.update!(company: company)+ record.ship_address_id = company_address.id+ record.save!++ record.destroy++ expect(company_address.reload.deleted_at).to be_nil+ end++ it "keeps an entry from the buyer's own book" do+ record.bill_address_id = own_address.id+ record.save!++ record.destroy++ expect(own_address.reload.deleted_at).to be_nil+ end++ it 'destroys the ownerless row it keeps for itself' do+ snapshot = Spree::Address.create!(address_attributes)+ record.update!(ship_address: snapshot)++ record.destroy++ expect(Spree::Address.where(id: snapshot.id)).to be_empty+ end+ endendRSpec.describe Spree::Purchase::Addresses do@@ -366,6 +521,31 @@ RSpec.describe Spree::Purchase::Addresses doit_behaves_like 'an addresses host'+ describe 'after the buyer loses standing over the cart\'s company' do+ let(:company) { create(:company, store: store) }+ let!(:membership) { create(:company_membership, company: company, customer: user) }+ let!(:company_address) { create(:company_address, owner: company) }++ before do+ record.update!(company: company)+ membership.destroy!+ end++ it 'refuses an entry from the company book' do+ expect(record.selectable_address(company_address.id)).to be_nil+ end++ it 'drops the company book from the listing' do+ expect(record.selectable_addresses).not_to include(company_address)+ end++ it 'still offers the buyer their own book' do+ own = create(:address, customer: user)++ expect(record.selectable_addresses).to include(own)+ end+ end+# Carts expose only use_shipping through the API — the ship→bill clone# is the one wired as a callback.describe 'use_shipping clone callback' do@@ -385,6 +565,25 @@ RSpec.describe Spree::Purchase::Addresses doit_behaves_like 'an addresses host'+ # An order's authority is the staff credential that created it, or the+ # cart that was validated at completion — never a membership that can be+ # revoked out from under it, so a past sale stays readable.+ describe 'after the buyer loses standing over the order\'s company' do+ let(:company) { create(:company, store: store) }+ let!(:membership) { create(:company_membership, company: company, customer: user) }+ let!(:company_address) { create(:company_address, owner: company) }++ before do+ record.update!(company: company)+ membership.destroy!+ end++ it 'keeps the company book reachable' do+ expect(record.selectable_address(company_address.id)).to eq(company_address)+ expect(record.selectable_addresses).to include(company_address)+ end+ end+describe 'use_billing clone callback (deprecated bridge, removed in 6.1)' dolet(:order) { build(:order) }diff --git a/spree/core/spec/models/spree/address_spec.rb b/spree/core/spec/models/spree/address_spec.rbindex d7ecc8dd61..1e88f2caf0 100644--- a/spree/core/spec/models/spree/address_spec.rb+++ b/spree/core/spec/models/spree/address_spec.rb@@ -993,6 +993,45 @@ describe Spree::Address, type: :model doexpect(address.snapshot.save).to be(true)expect(address.snapshot.save).to be(true)end++ context 'of a company site' do+ let(:company) { create(:company, name: 'Acme Logistics') }+ let(:address) do+ create(:company_address, owner: company, company: nil, first_name: 'Dana', last_name: 'Reyes')+ end++ it 'freezes the company line the owner was supplying' do+ expect(snapshot.company).to eq('Acme Logistics')+ end++ it 'keeps a line the entry stored for itself' do+ address.update!(company: 'Acme Logistics — Dock B')++ expect(snapshot.company).to eq('Acme Logistics — Dock B')+ end++ # A company site names the business, not a person, and the model exempts+ # it from needing a name. The copy has to stay exempt or placing the+ # order fails on a first name the site never had.+ context 'with no contact name on it' do+ let(:address) { create(:company_address, owner: company, first_name: nil, last_name: nil) }++ it 'is valid and saveable' do+ expect(snapshot).to be_valid+ expect(snapshot.save).to be(true)+ end++ it 'stays recognisably a business address' do+ expect(snapshot).to be_business_owned+ end+ end++ it 'keeps the copy out of the book it came from' do+ expect(snapshot.owner_id).to be_nil+ expect(snapshot.owner).to be_nil+ expect(company.addresses.reload).not_to include(snapshot.tap(&:save!))+ end+ endenddescribe '#duplicate_in_address_book' dodiff --git a/spree/core/spec/services/spree/carts/destroy_spec.rb b/spree/core/spec/services/spree/carts/destroy_spec.rbindex 00a1af011a..edb3ee19fa 100644--- a/spree/core/spec/services/spree/carts/destroy_spec.rb+++ b/spree/core/spec/services/spree/carts/destroy_spec.rb@@ -109,6 +109,20 @@ module Spreeendend+ context 'when an address belongs to an address book' do+ let(:ship_address) { create(:company_address) }+ let(:bill_address) { create(:address, customer: create(:customer)) }++ it 'destroys the cart but leaves the book entries in place' do+ subject++ expect(cart.destroyed?).to be true+ expect(Spree::Address.where(id: address_ids)).to contain_exactly(ship_address, bill_address)+ expect(ship_address.reload.deleted_at).to be_nil+ expect(bill_address.reload.deleted_at).to be_nil+ end+ end+context 'when a gift card is applied' dolet(:gift_card) { create(:gift_card, amount: 50, store: cart.store) }diff --git a/spree/core/spec/services/spree/carts/update_spec.rb b/spree/core/spec/services/spree/carts/update_spec.rbindex b1c056eae7..11fbdb57c0 100644--- a/spree/core/spec/services/spree/carts/update_spec.rb+++ b/spree/core/spec/services/spree/carts/update_spec.rb@@ -470,6 +470,45 @@ module Spreeexpect(cart.reload.ship_address_id).to eq(existing_address.id)endend++ context 'with an address from the company book' do+ let(:company) { create(:company, store: store) }+ let(:division) { create(:company, store: store, kind: 'division', parent: company) }+ let(:company_address) { create(:company_address, owner: company) }++ before { create(:company_membership, company: company, customer: user) }++ it 'accepts a site of the company the cart is for' do+ result = described_class.call(+ cart: cart,+ params: { company_id: company.prefixed_id, shipping_address_id: company_address.prefixed_id }+ )++ expect(result).to be_success+ expect(cart.reload.ship_address_id).to eq(company_address.id)+ end++ it 'accepts a site the purchase node inherits from its parent' do+ create(:company_membership, company: division, customer: user)++ result = described_class.call(+ cart: cart,+ params: { company_id: division.prefixed_id, shipping_address_id: company_address.prefixed_id }+ )++ expect(result).to be_success+ expect(cart.reload.ship_address_id).to eq(company_address.id)+ end++ it 'refuses the book of a company the buyer has no standing over' do+ outsider_address = create(:company_address, owner: create(:company, store: store))++ result = described_class.call(cart: cart, params: { shipping_address_id: outsider_address.prefixed_id })++ expect(result).to be_success+ expect(cart.reload.ship_address_id).to be_nil+ end+ endenddescribe 'billing_address' dodiff --git a/spree/core/spec/services/spree/orders/create_spec.rb b/spree/core/spec/services/spree/orders/create_spec.rbindex 6f8c10639c..62ea4f977c 100644--- a/spree/core/spec/services/spree/orders/create_spec.rb+++ b/spree/core/spec/services/spree/orders/create_spec.rb@@ -344,6 +344,105 @@ module Spreeendend+ describe 'addresses on an order for a company' do+ let(:company) { create(:company, store: store) }+ let(:division) { create(:company, store: store, kind: 'division', parent: company) }+ let(:headquarters) { create(:company_address, owner: company) }++ it 'accepts a site from the company address book' do+ result = described_class.call(+ store: store, customer: user,+ params: { company_id: company.prefixed_id, shipping_address_id: headquarters.prefixed_id }+ )++ expect(result).to be_success+ expect(result.value.ship_address_id).to eq(headquarters.id)+ end++ it 'accepts a site the purchase node inherits from its parent' do+ result = described_class.call(+ store: store, customer: user,+ params: { company_id: division.prefixed_id, shipping_address_id: headquarters.prefixed_id }+ )++ expect(result).to be_success+ expect(result.value.ship_address_id).to eq(headquarters.id)+ end++ it 'refuses a site belonging to another company' do+ outsider = create(:company_address, owner: create(:company, store: store))++ result = described_class.call(+ store: store, customer: user,+ params: { company_id: company.prefixed_id, shipping_address_id: outsider.prefixed_id }+ )++ expect(result).to be_success+ expect(result.value.ship_address_id).to be_nil+ end++ # Deliberately left on the factory's nameless company site: a company+ # address names the business and not a person, which is what broke the+ # copy the order keeps of it.+ describe 'use_customer_default_address' do+ before do+ company.update!(default_bill_address: headquarters, default_ship_address: headquarters)+ end++ it 'copies the company defaults rather than the buyer\'s own' do+ user.update!(bill_address: create(:address, customer: user), ship_address: create(:address, customer: user))++ result = described_class.call(+ store: store, customer: user,+ params: { company_id: company.prefixed_id, use_customer_default_address: true }+ )++ expect(result).to be_success+ expect(result.value.ship_address.address1).to eq(headquarters.address1)+ expect(result.value.ship_address_id).not_to eq(headquarters.id)+ end++ # Inherited for prefill the same way it is for selection.+ it 'reaches the parent node\'s default when the division holds none' do+ result = described_class.call(+ store: store, customer: user,+ params: { company_id: division.prefixed_id, use_customer_default_address: true }+ )++ expect(result).to be_success+ expect(result.value.bill_address.address1).to eq(headquarters.address1)+ end++ it 'leaves the slots empty rather than falling back to the buyer' do+ company.update!(default_bill_address: nil, default_ship_address: nil)+ user.update!(bill_address: create(:address, customer: user))++ result = described_class.call(+ store: store, customer: user,+ params: { company_id: company.prefixed_id, use_customer_default_address: true }+ )++ expect(result).to be_success+ expect(result.value.bill_address).to be_nil+ end++ it 'uses the buyer\'s own defaults when no company is named' do+ create(:company_membership, company: company, customer: user)+ own_address = create(:address, customer: user)+ user.update!(bill_address: own_address, ship_address: own_address)++ result = described_class.call(+ store: store, customer: user,+ params: { use_customer_default_address: true }+ )++ expect(result).to be_success+ expect(result.value.ship_address.address1).to eq(own_address.address1)+ expect(result.value.bill_address.address1).to eq(own_address.address1)+ end+ end+ end+# Same signed-id state as the storefront's, one step further along: without# handling this it is an unhandled 500 on the Admin API.describe 'a purchase order document whose upload never completed' dodiff --git a/spree/core/spec/workflows/spree/customers/anonymize_spec.rb b/spree/core/spec/workflows/spree/customers/anonymize_spec.rbindex 768d095511..b92522f893 100644--- a/spree/core/spec/workflows/spree/customers/anonymize_spec.rb+++ b/spree/core/spec/workflows/spree/customers/anonymize_spec.rb@@ -190,6 +190,39 @@ RSpec.describe Spree::Customers::Anonymize doexpect(shared.reload.address1).to eq('1 Shared Company Way')end+ # Completion copies the company's site onto the order. The copy keeps its+ # owner_type so it stays addressed to a business, and belongs to no book —+ # which is what makes it this erasure's to rewrite, unlike the shared row+ # above.+ context 'with a snapshot taken from a company site' do+ let(:company) { create(:company, store: store) }+ let(:snapshot) do+ create(:company_address, owner: company, company: 'Acme Logistics', address1: '14 Dock Road',+ first_name: 'Dana', last_name: 'Reyes', phone: '555-0100').+ snapshot.tap(&:save!)+ end+ let!(:order) { create(:order, customer: customer, store: store, ship_address: snapshot) }++ it 'erases the contact the person left on it' do+ result+ snapshot.reload++ expect(snapshot.first_name).to be_nil+ expect(snapshot.last_name).to be_nil+ expect(snapshot.phone).to be_nil+ end++ # The dock and the trading name are the company's, and the merchant's+ # record of a lawful sale goes with them.+ it 'keeps where the business took delivery' do+ result+ snapshot.reload++ expect(snapshot.address1).to eq('14 Dock Road')+ expect(snapshot.company).to eq('Acme Logistics')+ end+ end+it 'purges the carrier label, which prints the name and street' doshipped = create(:order_ready_to_ship, customer: customer, store: store)label = create(:shipping_label, :with_file, owner: shipped.fulfillments.first, store: store)diff --git a/spree/emails/app/serializers/spree/emails/address_serializer.rb b/spree/emails/app/serializers/spree/emails/address_serializer.rbindex 6f1f687fea..bf5e68b645 100644--- a/spree/emails/app/serializers/spree/emails/address_serializer.rb+++ b/spree/emails/app/serializers/spree/emails/address_serializer.rb@@ -1,6 +1,7 @@module Spreemodule Emailsclass AddressSerializer < Spree::Api::V3::AddressSerializer+ _attributes.delete(:owner)endendend