@spree/docs 0.1.264 → 0.1.266

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1615,6 +1615,8 @@ paths:
1615
1615
  default: true
1616
1616
  country_codes:
1617
1617
  - US
1618
+ country_isos:
1619
+ - US
1618
1620
  supported_locales:
1619
1621
  - en
1620
1622
  - id: cart_gbHJdmfrXB
@@ -1734,6 +1736,8 @@ paths:
1734
1736
  default: true
1735
1737
  country_codes:
1736
1738
  - US
1739
+ country_isos:
1740
+ - US
1737
1741
  supported_locales:
1738
1742
  - en
1739
1743
  meta:
@@ -1885,6 +1889,8 @@ paths:
1885
1889
  default: true
1886
1890
  country_codes:
1887
1891
  - US
1892
+ country_isos:
1893
+ - US
1888
1894
  supported_locales:
1889
1895
  - en
1890
1896
  schema:
@@ -2085,6 +2091,8 @@ paths:
2085
2091
  default: true
2086
2092
  country_codes:
2087
2093
  - US
2094
+ country_isos:
2095
+ - US
2088
2096
  supported_locales:
2089
2097
  - en
2090
2098
  schema:
@@ -2283,6 +2291,8 @@ paths:
2283
2291
  default: true
2284
2292
  country_codes:
2285
2293
  - US
2294
+ country_isos:
2295
+ - US
2286
2296
  supported_locales:
2287
2297
  - en
2288
2298
  schema:
@@ -2611,6 +2621,8 @@ paths:
2611
2621
  default: true
2612
2622
  country_codes:
2613
2623
  - US
2624
+ country_isos:
2625
+ - US
2614
2626
  supported_locales:
2615
2627
  - en
2616
2628
  schema:
@@ -2926,6 +2938,8 @@ paths:
2926
2938
  default: true
2927
2939
  country_codes:
2928
2940
  - US
2941
+ country_isos:
2942
+ - US
2929
2943
  supported_locales:
2930
2944
  - en
2931
2945
  schema:
@@ -3122,6 +3136,8 @@ paths:
3122
3136
  default: true
3123
3137
  country_codes:
3124
3138
  - US
3139
+ country_isos:
3140
+ - US
3125
3141
  supported_locales:
3126
3142
  - en
3127
3143
  schema:
@@ -3321,6 +3337,8 @@ paths:
3321
3337
  default: true
3322
3338
  country_codes:
3323
3339
  - US
3340
+ country_isos:
3341
+ - US
3324
3342
  supported_locales:
3325
3343
  - en
3326
3344
  schema:
@@ -3607,6 +3625,8 @@ paths:
3607
3625
  default: true
3608
3626
  country_codes:
3609
3627
  - US
3628
+ country_isos:
3629
+ - US
3610
3630
  supported_locales:
3611
3631
  - en
3612
3632
  schema:
@@ -3851,6 +3871,8 @@ paths:
3851
3871
  default: true
3852
3872
  country_codes:
3853
3873
  - US
3874
+ country_isos:
3875
+ - US
3854
3876
  supported_locales:
3855
3877
  - en
3856
3878
  schema:
@@ -4084,6 +4106,8 @@ paths:
4084
4106
  default: true
4085
4107
  country_codes:
4086
4108
  - US
4109
+ country_isos:
4110
+ - US
4087
4111
  supported_locales:
4088
4112
  - en
4089
4113
  schema:
@@ -4305,6 +4329,8 @@ paths:
4305
4329
  default: true
4306
4330
  country_codes:
4307
4331
  - US
4332
+ country_isos:
4333
+ - US
4308
4334
  supported_locales:
4309
4335
  - en
4310
4336
  schema:
@@ -4535,6 +4561,8 @@ paths:
4535
4561
  default: true
4536
4562
  country_codes:
4537
4563
  - US
4564
+ country_isos:
4565
+ - US
4538
4566
  supported_locales:
4539
4567
  - en
4540
4568
  schema:
@@ -4688,6 +4716,8 @@ paths:
4688
4716
  default: true
4689
4717
  country_codes:
4690
4718
  - US
4719
+ country_isos:
4720
+ - US
4691
4721
  supported_locales:
4692
4722
  - en
4693
4723
  schema:
@@ -5396,6 +5426,8 @@ paths:
5396
5426
  default: true
5397
5427
  country_codes:
5398
5428
  - US
5429
+ country_isos:
5430
+ - US
5399
5431
  supported_locales:
5400
5432
  - en
5401
5433
  schema:
@@ -5583,6 +5615,8 @@ paths:
5583
5615
  default: true
5584
5616
  country_codes:
5585
5617
  - US
5618
+ country_isos:
5619
+ - US
5586
5620
  supported_locales:
5587
5621
  - en
5588
5622
  schema:
@@ -5890,6 +5924,8 @@ paths:
5890
5924
  default: true
5891
5925
  country_codes:
5892
5926
  - US
5927
+ country_isos:
5928
+ - US
5893
5929
  supported_locales:
5894
5930
  - en
5895
5931
  schema:
@@ -7014,6 +7050,8 @@ paths:
7014
7050
  default: true
7015
7051
  country_codes:
7016
7052
  - US
7053
+ country_isos:
7054
+ - US
7017
7055
  supported_locales:
7018
7056
  - en
7019
7057
  meta:
@@ -7336,6 +7374,8 @@ paths:
7336
7374
  default: true
7337
7375
  country_codes:
7338
7376
  - US
7377
+ country_isos:
7378
+ - US
7339
7379
  supported_locales:
7340
7380
  - en
7341
7381
  schema:
@@ -8955,6 +8995,8 @@ paths:
8955
8995
  default: true
8956
8996
  country_codes:
8957
8997
  - US
8998
+ country_isos:
8999
+ - US
8958
9000
  supported_locales:
8959
9001
  - en
8960
9002
  - es
@@ -8973,6 +9015,9 @@ paths:
8973
9015
  country_codes:
8974
9016
  - DE
8975
9017
  - FR
9018
+ country_isos:
9019
+ - DE
9020
+ - FR
8976
9021
  supported_locales:
8977
9022
  - de
8978
9023
  - en
@@ -9060,6 +9105,9 @@ paths:
9060
9105
  country_codes:
9061
9106
  - DE
9062
9107
  - FR
9108
+ country_isos:
9109
+ - DE
9110
+ - FR
9063
9111
  supported_locales:
9064
9112
  - de
9065
9113
  - en
@@ -9143,6 +9191,9 @@ paths:
9143
9191
  country_codes:
9144
9192
  - DE
9145
9193
  - FR
9194
+ country_isos:
9195
+ - DE
9196
+ - FR
9146
9197
  supported_locales:
9147
9198
  - de
9148
9199
  - en
@@ -10570,9 +10621,11 @@ paths:
10570
10621
  - api_key: []
10571
10622
  bearer_auth: []
10572
10623
  description: |
10573
- Adds a person to the node by email. An email that already belongs to a customer of
10574
- this store becomes a membership immediately (a `cmem_...` id); any other email
10575
- becomes an invitation (a `cinv_...` id) and the invite email goes out.
10624
+ Invites a person to the node by email (a `cinv_...` id) and sends the invite email.
10625
+ This is an invitation even when the email already belongs to a customer: they join
10626
+ by accepting the emailed token, which proves they own the address and agree to join.
10627
+ The response is the same either way, so it does not reveal whether the email has an
10628
+ account.
10576
10629
  x-codeSamples:
10577
10630
  - lang: javascript
10578
10631
  label: Spree SDK
@@ -10584,9 +10637,8 @@ paths:
10584
10637
  publishableKey: '<api-key>',
10585
10638
  })
10586
10639
 
10587
- // An existing customer joins immediately (cmem_…); anyone else is emailed an
10588
- // invitation (cinv_…).
10589
- const member = await client.companies.members.create(
10640
+ // Always an emailed invitation (cinv_…), even for an existing customer.
10641
+ const invitation = await client.companies.members.create(
10590
10642
  'comp_86Rf07xd4z',
10591
10643
  { customer_email: 'colleague@acme.test' },
10592
10644
  { token: '<token>' },
@@ -10604,14 +10656,15 @@ paths:
10604
10656
  type: string
10605
10657
  responses:
10606
10658
  '201':
10607
- description: member added or invitation sent
10659
+ description: invitation sent
10608
10660
  content:
10609
10661
  application/json:
10610
10662
  example:
10611
- id: cmem_gbHJdmfrXB
10612
- company_id: comp_UkLWZg9DAJ
10613
- customer_id: cust_gbHJdmfrXB
10663
+ id: cinv_UkLWZg9DAJ
10614
10664
  email: colleague@acme.test
10665
+ expires_at: '2026-02-14T12:00:00.000Z'
10666
+ company_id: comp_UkLWZg9DAJ
10667
+ status: pending
10615
10668
  requestBody:
10616
10669
  content:
10617
10670
  application/json:
@@ -10936,7 +10989,6 @@ paths:
10936
10989
  compare_at_amount:
10937
10990
  thumbnail_url:
10938
10991
  option_values: []
10939
- digital_links: []
10940
10992
  fulfillments:
10941
10993
  - id: ful_UkLWZg9DAJ
10942
10994
  number: R1001-F1
@@ -11080,6 +11132,8 @@ paths:
11080
11132
  default: true
11081
11133
  country_codes:
11082
11134
  - US
11135
+ country_isos:
11136
+ - US
11083
11137
  supported_locales:
11084
11138
  - en
11085
11139
  meta:
@@ -13668,7 +13722,6 @@ components:
13668
13722
  - compare_at_amount
13669
13723
  - thumbnail_url
13670
13724
  - option_values
13671
- - digital_links
13672
13725
  x-typelizer: true
13673
13726
  Locale:
13674
13727
  type: object
@@ -13706,6 +13759,10 @@ components:
13706
13759
  type: array
13707
13760
  items:
13708
13761
  type: string
13762
+ country_isos:
13763
+ type: array
13764
+ items:
13765
+ type: string
13709
13766
  supported_locales:
13710
13767
  type: array
13711
13768
  items:
@@ -13722,6 +13779,7 @@ components:
13722
13779
  - tax_inclusive
13723
13780
  - default
13724
13781
  - country_codes
13782
+ - country_isos
13725
13783
  - supported_locales
13726
13784
  x-typelizer: true
13727
13785
  MediaEvent:
@@ -205,7 +205,7 @@ The available rule and action types — including any custom ones you register
205
205
  Coupon codes track promotion usage and can be single-use or multi-use.
206
206
 
207
207
  - **Single code** — set the `code` attribute on the promotion; `usage_limit` controls how many times it can be redeemed.
208
- - **Multi-code** — bulk-generated codes each track their own state (`unused` / `used`).
208
+ - **Multi-code** — bulk-generated codes each track their own state (`unused` / `used`). A code is used up only when an order is placed with it. Applying it to a cart just holds it there, and a shopper who presents a code held by an abandoned cart takes it over, so an unfinished checkout never burns a code.
209
209
 
210
210
  Customers apply codes on the cart via the Store API:
211
211
 
@@ -125,7 +125,9 @@ A delivery site is an address, not a node. Ten warehouses do not mean ten compan
125
125
 
126
126
  ### Add the buyers
127
127
 
128
- People join a company by email. An existing customer becomes a member immediately. An unknown email receives an invitation that is valid for 30 days, and accepting it creates their account and their membership in one step. The ID prefix tells you which happened: `cmem_` for a membership, `cinv_` for an invitation.
128
+ People join a company by email. When staff add someone through the Admin API, an existing customer becomes a member immediately, and an unknown email receives an invitation. The ID prefix tells you which happened: `cmem_` for a membership, `cinv_` for an invitation.
129
+
130
+ When a member adds a colleague from the storefront, the colleague always receives an invitation, even if they already have an account. Anyone can type an email address, so joining requires accepting the emailed invitation, which proves the person owns that address. An invitation is valid for 30 days. Accepting it creates the account and the membership in one step, or links an existing signed-in customer whose email matches.
129
131
 
130
132
 
131
133
  ```typescript Admin SDK
@@ -135,8 +137,8 @@ const result = await adminClient.companies.memberships.create('comp_xxx', {
135
137
  ```
136
138
 
137
139
  ```typescript Store SDK
138
- // A member can add colleagues from the storefront in the same way
139
- const result = await client.companies.members.create('comp_xxx', {
140
+ // A member invites colleagues from the storefront; they join by accepting
141
+ const invitation = await client.companies.members.create('comp_xxx', {
140
142
  customer_email: 'colleague@acme.example',
141
143
  })
142
144
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spree/docs",
3
- "version": "0.1.264",
3
+ "version": "0.1.266",
4
4
  "description": "Spree Commerce developer documentation for AI agents and local reference",
5
5
  "type": "module",
6
6
  "license": "CC-BY-4.0",