@01.software/sdk 0.51.0 → 0.65.0

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.
Files changed (67) hide show
  1. package/CHANGELOG.md +313 -0
  2. package/README.md +228 -102
  3. package/dist/client.cjs +556 -60
  4. package/dist/client.cjs.map +1 -1
  5. package/dist/client.d.cts +6 -6
  6. package/dist/client.d.ts +6 -6
  7. package/dist/client.js +556 -60
  8. package/dist/client.js.map +1 -1
  9. package/dist/{collection-client-CWAeuzV4.d.cts → collection-client-B7rsTtVj.d.cts} +6 -6
  10. package/dist/{collection-client-hYvVfHIm.d.ts → collection-client-C2sMvfme.d.ts} +6 -6
  11. package/dist/{const-JD8obaKg.d.ts → const-CRxPTDGt.d.ts} +2 -2
  12. package/dist/{const-D8LixhAJ.d.cts → const-D6ZRQLxI.d.cts} +2 -2
  13. package/dist/{index-B0Hjh3Ey.d.ts → index-1auUEYrl.d.ts} +24 -7
  14. package/dist/{index-Bu0kCc6o.d.cts → index-Bbpf5t-l.d.cts} +24 -7
  15. package/dist/index.cjs +573 -260
  16. package/dist/index.cjs.map +1 -1
  17. package/dist/index.d.cts +19 -12
  18. package/dist/index.d.ts +19 -12
  19. package/dist/index.js +573 -260
  20. package/dist/index.js.map +1 -1
  21. package/dist/{payload-types-BOsckg8B.d.cts → payload-types-BnIET0xU.d.cts} +567 -438
  22. package/dist/{payload-types-BOsckg8B.d.ts → payload-types-BnIET0xU.d.ts} +567 -438
  23. package/dist/query.cjs +62 -3
  24. package/dist/query.cjs.map +1 -1
  25. package/dist/query.d.cts +5 -5
  26. package/dist/query.d.ts +5 -5
  27. package/dist/query.js +62 -3
  28. package/dist/query.js.map +1 -1
  29. package/dist/realtime.d.cts +2 -2
  30. package/dist/realtime.d.ts +2 -2
  31. package/dist/server.cjs +557 -20
  32. package/dist/server.cjs.map +1 -1
  33. package/dist/server.d.cts +14 -8
  34. package/dist/server.d.ts +14 -8
  35. package/dist/server.js +557 -20
  36. package/dist/server.js.map +1 -1
  37. package/dist/{types-5ZlcAFuU.d.ts → types-D1y4TgQm.d.ts} +2 -2
  38. package/dist/{types-Bj8j7VHU.d.ts → types-DnRC3nLG.d.ts} +464 -16
  39. package/dist/{types-B14sEt1z.d.cts → types-Dp1oYpD3.d.cts} +2 -2
  40. package/dist/{types-CM5qiR2k.d.cts → types-Dzn0LD2N.d.cts} +464 -16
  41. package/dist/ui/form.d.cts +1 -1
  42. package/dist/ui/form.d.ts +1 -1
  43. package/dist/ui/video.cjs +4 -2
  44. package/dist/ui/video.cjs.map +1 -1
  45. package/dist/ui/video.d.cts +4 -2
  46. package/dist/ui/video.d.ts +4 -2
  47. package/dist/ui/video.js +4 -2
  48. package/dist/ui/video.js.map +1 -1
  49. package/dist/webhook.cjs +13 -2
  50. package/dist/webhook.cjs.map +1 -1
  51. package/dist/webhook.d.cts +5 -5
  52. package/dist/webhook.d.ts +5 -5
  53. package/dist/webhook.js +13 -2
  54. package/dist/webhook.js.map +1 -1
  55. package/package.json +9 -28
  56. package/dist/analytics/react.cjs +0 -344
  57. package/dist/analytics/react.cjs.map +0 -1
  58. package/dist/analytics/react.d.cts +0 -24
  59. package/dist/analytics/react.d.ts +0 -24
  60. package/dist/analytics/react.js +0 -319
  61. package/dist/analytics/react.js.map +0 -1
  62. package/dist/analytics.cjs +0 -238
  63. package/dist/analytics.cjs.map +0 -1
  64. package/dist/analytics.d.cts +0 -39
  65. package/dist/analytics.d.ts +0 -39
  66. package/dist/analytics.js +0 -215
  67. package/dist/analytics.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,318 @@
1
1
  # @01.software/sdk
2
2
 
3
+ ## 0.65.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 49d3944: Add optional image/video gallery item descriptors to storefront content reads, with safe thumbnails and explicit ready, processing, or unavailable states. Keep existing image responses and gallery ordering compatible; video playback continues through the server-only admission helper.
8
+
9
+ ### Patch Changes
10
+
11
+ - 210e4a8: Sync generated tenant types with the optional Console menu display-name preference. Saved preferences remain restricted to Console operators.
12
+
13
+ ## 0.64.1
14
+
15
+ ### Patch Changes
16
+
17
+ - 94917e1: Align the SDK's Payload development dependencies with the stable 3.90.0 security fixes used by Console.
18
+ - 72131ac: Refresh the generated video types to reflect the chapter editor's placement in the General tab. Existing chapter data and playback behavior are unchanged.
19
+
20
+ ## 0.64.0
21
+
22
+ ### Minor Changes
23
+
24
+ - 6ec64b3: Preserve collection filter meaning for browser and server `find`/`count` and
25
+ server bulk mutations. Null equality filters were not filtered correctly before
26
+ for fields such as text: null became an empty string. `equals: null` and
27
+ `not_equals: null` now retain null through Payload's native JSON `where` query
28
+ parameter; date null filters, including the documented `publishedAt` example,
29
+ remain supported. Bulk mutations now also accept these null equality filters.
30
+
31
+ BREAKING (0.x minor): reads now share bulk's pre-request `ValidationError`
32
+ rejection. Newly rejected read inputs explicitly include `where: {}`,
33
+ `and: []`, `or: []`, an empty condition object such as `{ id: {} }`,
34
+ `not_in: []`, `in: []`, and undefined filter values. Nesting beyond 10 and
35
+ arrays above 1000 elements are also rejected. Null outside equality operators
36
+ remains rejected. This narrows the accepted read inputs, including empty forms
37
+ that previously succeeded. When no conditions remain, omit `where` instead of
38
+ passing `where: {}`. Remove undefined conditions explicitly or return an empty
39
+ result for an empty ID selection. Collection access rules stay unchanged.
40
+
41
+ ### Patch Changes
42
+
43
+ - 9a86409: Expose the server-only Membership renewal benefit hold field in generated collection types.
44
+ - e4d1efe: Fix collection updateMany and removeMany filters to use Payload query encoding.
45
+ Send update fields directly as JSON so authorized bulk mutations reach the existing
46
+ collection access checks and hooks.
47
+
48
+ Calls that previously failed with 400 now actually run.
49
+ Review existing bulk callers before upgrading. Filters with null/undefined values,
50
+ empty condition objects, empty arrays, nesting beyond 10 levels, or arrays over
51
+ 1000 elements are rejected
52
+ before sending a mutation.
53
+
54
+ - 745bd40: Classify unapplied membership paid evidence as an internal Console collection.
55
+ - 7caa6cc: Document unapplied membership payment evidence in generated payload types.
56
+
57
+ ## 0.63.0
58
+
59
+ ### Minor Changes
60
+
61
+ - a8f7691: Add `customer.auth.withdraw(currentPassword)` for password-reauthenticated self-withdrawal. Successful withdrawal archives the account and clears the local SDK session; active memberships and passwordless-only accounts return explicit refusal reasons.
62
+
63
+ ### Patch Changes
64
+
65
+ - 741b7d8: Synchronize the generated Payload type description for customer consent receipts.
66
+ - a33e6ea: Clarify in the generated Link field documentation that expiration removes a link from storefront lists while leaving stored state and direct collection reads unchanged.
67
+ - 4e47268: Clarify the generated audit-log payload documentation: audit summaries contain structural evidence, not personal-data values, secrets or request/response bodies.
68
+ - 0e80819: Synchronize generated internal usage types with the Console's separate email observation field. Public collection buckets and billing meters remain unchanged.
69
+
70
+ ## 0.62.2
71
+
72
+ ### Patch Changes
73
+
74
+ - e10f77f: Sync generated tenant customer-auth settings and the internal hosted consent receipt type. The receipt collection remains outside published collection clients and HTTP contracts.
75
+ - ee4176a: Clarify generated Customer consent field documentation as tenant self-reports while the hosted server receipt remains the authority for hosted reconsent.
76
+
77
+ ## 0.62.1
78
+
79
+ ### Patch Changes
80
+
81
+ - 676c69f: Add nullable usage invoice minimum-charge exemption evidence to generated types.
82
+ - bb4d0e2: Update API key scope guidance and generated types after retiring the stored web analytics scope.
83
+
84
+ ## 0.62.0
85
+
86
+ ### Minor Changes
87
+
88
+ - 4c023aa: BREAKING (0.x minor): Orders raw bulk updates now fail before document mutation.
89
+ Generic Orders `updateMany` and Admin Panel bulk edit are rejected. Keep top-ID
90
+ updates for unconditional edits; conditional callers must preserve the complete
91
+ where query and an at-most-one bound using raw HTTP or the Console Local API.
92
+ Document native admission/failure codes and retain the SDK's terminal HTTP 400
93
+ handling. Other collections and SDK transport signatures are unchanged.
94
+ Transaction-disabled Orders updates without a live external transaction also
95
+ fail before mutation with a localized HTTP 400; normal and sequential external
96
+ transactions continue to work.
97
+
98
+ ### Patch Changes
99
+
100
+ - 5a372d8: Correct the form submissions collection description to match its available actions.
101
+ - 87b450e: Synchronize generated Payload types for internal personal saved order views. Published collection addressability is unchanged.
102
+ - 2bcf3ae: Sync generated customer OAuth client types with implemented-only social provider
103
+ selection and validation in Console. Previously saved unimplemented providers
104
+ remain readable but are omitted from hosted login.
105
+
106
+ ## 0.61.1
107
+
108
+ ### Patch Changes
109
+
110
+ - 4283bcd: Synchronize generated Payload type documentation for hidden event locations. SDK field shapes remain unchanged.
111
+
112
+ ## 0.61.0
113
+
114
+ ### Minor Changes
115
+
116
+ - 22061d6: BREAKING (0.x minor): `useCustomerLogout()` now awaits direct refresh-family revocation and can report a server failure after local credentials are cleared. Use `customer.auth.logoutAsync()` for server logout; the synchronous `logout()` remains local-only compatibility.
117
+ - 418cdca: Add server-only external Customer link helpers with bounded previous-state snapshots, version-fenced mutations, and explicit request replay identity.
118
+
119
+ ### Patch Changes
120
+
121
+ - 0b1704a: Expose the existing billing custody method on the server client factory and withMarket return types.
122
+
123
+ ## 0.60.0
124
+
125
+ ### Minor Changes
126
+
127
+ - 1fea398: Add server-only delegated Membership ciphertext custody operations.
128
+ - cad9245: Add a server-only API for purpose-bound tenant-encrypted installation credentials.
129
+
130
+ ## 0.59.2
131
+
132
+ ### Patch Changes
133
+
134
+ - 936c20a: Include the tenant password-registration setting in generated Payload types. The existing Customer registration method preserves the new `registration_disabled` API reason.
135
+
136
+ ## 0.59.1
137
+
138
+ ### Patch Changes
139
+
140
+ - 259d977: Sync the internal generated Payload result type for the reconciled ticket payment outcome. No public SDK API changes.
141
+
142
+ ## 0.59.0
143
+
144
+ ### Minor Changes
145
+
146
+ - ad385ac: Add the server-only external-effect claims API for tenant-owned provider work. Require redacted report evidence and a remote operation identity before reporting no effect.
147
+
148
+ ## 0.58.0
149
+
150
+ ### Minor Changes
151
+
152
+ - d558727: Add server Customer delegation inputs for Customer Group restricted paid admission purchases across Cart, Checkout, and PaymentSession APIs.
153
+ - 6ce7cf3: BREAKING (0.x minor): Remove the three retired analytics collection slugs from
154
+ the exported `INTERNAL_COLLECTIONS` list and `InternalCollection` union, along
155
+ with their generated SDK types.
156
+
157
+ ### Patch Changes
158
+
159
+ - 26f94eb: Expose the tenant-wide timezone field in generated Payload collection types.
160
+
161
+ ## 0.57.0
162
+
163
+ ### Minor Changes
164
+
165
+ - 1b0deb7: BREAKING (0.x minor): Remove the SDK `createAnalytics`, `Analytics`, and `AnalyticsConfig` root exports and the `@01.software/sdk/analytics` and `/analytics/react` subpaths. Existing integrations should use an external analytics tool such as GA4, Plausible, or Vercel Analytics instead. The init CLI no longer generates or advertises an analytics helper.
166
+ - b91e56a: Add server-only `video.playback(videoId)` and `VideoPlayer.streamUrl` for signed,
167
+ quota-metered VOD playback. BREAKING for assets explicitly migrated to signed
168
+ playback: a stored legacy `muxPlaybackId` remains historical usage evidence,
169
+ but raw Mux HLS, thumbnail, and MP4 URLs built from it stop working. Existing
170
+ unmigrated paid assets retain their public playback path.
171
+
172
+ ### Patch Changes
173
+
174
+ - 6ab5331: Synchronize generated Payload types and collection ordering for the internal MCP daily usage collection.
175
+ - eb1e49f: Sync internal generated Payload types for the objectless ticket payment kernel result. No public SDK API changes.
176
+
177
+ ## 0.56.3
178
+
179
+ ### Patch Changes
180
+
181
+ - ef686ff: Synchronize generated entitlement types for explicit tenant-local Project Free grants and their server-owned activation key.
182
+
183
+ ## 0.56.2
184
+
185
+ ### Patch Changes
186
+
187
+ - ee75768: Synchronize the SDK Payload types with the TicketPurchase kernel obligation schema.
188
+
189
+ ## 0.56.1
190
+
191
+ ### Patch Changes
192
+
193
+ - d7ac700: Sync the shipping policy free-shipping field description from Console schemas.
194
+ - e15348a: The generated `Article` type now documents `slug` as the URL slug that stays fixed once an article is created.
195
+ - c3ab3b9: Sync the product slug field description, which now notes that the slug is fixed after creation.
196
+
197
+ ## 0.56.0
198
+
199
+ ### Minor Changes
200
+
201
+ - bab54b6: BREAKING (0.x minor): Make paid membership subscribe return a first-charge prepare instruction instead of accepting a caller payment identifier. Tenant billing now uses the returned idempotency key and the existing signed charge-result flow.
202
+
203
+ ## 0.55.1
204
+
205
+ ### Patch Changes
206
+
207
+ - 9ee5438: Synchronize generated Payload event hold and internal TicketPurchase draft types
208
+ with the Console schema.
209
+
210
+ ## 0.55.0
211
+
212
+ ### Minor Changes
213
+
214
+ - 3ddc653: BREAKING (0.x minor): Generated Membership payment method and credential types
215
+ now expose delegated-only fields. Legacy connect and backend-charge metadata is
216
+ removed from the SDK type surface; stored database columns remain intact.
217
+
218
+ ### Patch Changes
219
+
220
+ - 4732259: Sync event registration provenance fields from Console schemas.
221
+ - 313ed5b: Synchronize generated Payload membership-charge types with normalized terminal
222
+ decline evidence fields.
223
+
224
+ ## 0.54.2
225
+
226
+ ### Patch Changes
227
+
228
+ - c040018: Add typed webhook support for thin membership lifecycle notifications.
229
+
230
+ ## 0.54.1
231
+
232
+ ### Patch Changes
233
+
234
+ - d09060b: Add generated internal usage-attribution fields for Project environment billing evidence.
235
+
236
+ ## 0.54.0
237
+
238
+ ### Minor Changes
239
+
240
+ - 1e2f5ce: Add server-only source-aware Customer Group member listing, grant, and revoke helpers.
241
+
242
+ ### Patch Changes
243
+
244
+ - 5d183fd: Add optional Checkout and Order discount snapshot fields for canonical
245
+ condition digests and private customer-eligibility evidence.
246
+
247
+ ## 0.53.0
248
+
249
+ ### Minor Changes
250
+
251
+ - b3b3878: Synchronize generated Payload types for Project-scoped subscription authority.
252
+ `Project.authorityMode` now includes `project-billing`, and `Subscription` gains
253
+ an optional `project` relationship while retaining its required Live tenant
254
+ anchor.
255
+
256
+ This is additive only: no collection becomes publicly addressable, existing
257
+ tenant identifiers keep their meaning, and tenant-scoped SDK behavior is
258
+ unchanged.
259
+
260
+ ## 0.52.2
261
+
262
+ ### Patch Changes
263
+
264
+ - e808fb7: Improve PaymentSession provider-mismatch cancellation recovery guidance after
265
+ validating the complete actual-provider response and cancellation state.
266
+
267
+ **BREAKING (0.x minor):** `01 payment-session retrieve` and `01 payment-session cancel` now require `--provider toss` or `--provider portone`; the CLI no longer assumes Toss when it is omitted.
268
+
269
+ ## 0.52.1
270
+
271
+ ### Patch Changes
272
+
273
+ - 1f62cb3: Keep managed payment-provider response validation aligned with the SDK's public checkout provider type.
274
+ - 2848ab8: Remove retired stg smoke reconciliation wording from the generated PAT type mirror.
275
+
276
+ ## 0.52.0
277
+
278
+ ### Minor Changes
279
+
280
+ - ebd2544: Synchronize generated types for the Project environment expand phase (ADR 0056). A `Project` interface is added, and `Tenant` gains five optional, nullable fields describing its Project/environment binding: `project`, `environmentKind`, `environmentGeneration`, `environmentState`, and `environmentIsCurrent`.
281
+
282
+ Additive only. Every new field is optional, no existing field becomes nullable, and `tenantId` keeps its exact meaning. The `projects` slug is deliberately absent from `COLLECTIONS`, `SERVER_ONLY_COLLECTIONS`, and `INTERNAL_COLLECTIONS`, so no collection is newly addressable and no runtime behavior changes; the additive public client context is owned by a later issue.
283
+
284
+ ### Patch Changes
285
+
286
+ - 9620154: Keep generated SDK collection metadata and Payload types aligned with the Console customer-group grant authority.
287
+
288
+ ## 0.51.2
289
+
290
+ ### Patch Changes
291
+
292
+ - 6f08721: Align the generated Order field order with the Admin Panel order information tab.
293
+ - 18c9eb7: Synchronize the generated Payload types after the Console `customers`
294
+ collection declares `email` before `name`: `Customer` and `CustomersSelect`
295
+ change property order only. This does not add, remove, or retype any SDK
296
+ surface.
297
+ - 6d2e6ac: Update the audited Next runtime dependencies used by SDK verification and the
298
+ published app templates.
299
+ - 7eb25b2: Payload CMS 3.89.0 선행 업그레이드에 맞춰 SDK 검증용 개발 의존성을 갱신하고,
300
+ upstream 실제 수정 전까지 보상 통제를 유지합니다.
301
+
302
+ ## 0.51.1
303
+
304
+ ### Patch Changes
305
+
306
+ - ff7a716: Serialize persisted `CustomerAuth` refresh rotation across browser contexts and make the persisted session atomic.
307
+
308
+ The canonical session now lives in a single versioned JSON record at `<key>:session` holding the access/refresh pair plus a monotonic revision. Writing the pair in one store operation removes the torn write that could publish a new access token beside an already-consumed refresh token, and every write re-reads the record first and carries forward the field it does not change, which keeps a stale instance from carrying its own outdated counterpart into the write. That merge is best-effort, not a compare-and-swap.
309
+
310
+ Refresh-token rotation — and only rotation — is serialized through a Web Locks lease keyed by the storage key plus the canonical API/tenant identity (equivalent URL spellings share one namespace; token material never appears in a lease name). Inside the lease the rotation re-reads canonical state and classifies it on the credential it will present, so it never replays a credential the record already replaced, never strands the successor it already paid for, and preserves an access token another context deliberately replaced while committing the successor refresh in the same write. `getToken()` / `getRefreshToken()` re-read canonical state before use, so another tab's rotation or logout is observed before the next credential use.
311
+
312
+ Limits, stated rather than implied: Web Storage has no compare-and-swap, so the read preceding a write is not atomic with it, and the synchronous mutators (`logout`, `setToken`, `setRefreshToken`) cannot await the lease. A commit landing inside that window is lost by ordering — including a counterpart the merge just read, which is then republished stale. Those interleavings are last-writer-wins; server-side single-use rotation and refresh-family reuse detection remain the only authority. Browsers without Web Locks, a throwing `navigator.locks` accessor, a failed acquisition, an expired bounded wait, or storage that denies access all degrade to a per-instance or memory-only session while still presenting the canonical credential.
313
+
314
+ Storage compatibility: `<key>` still holds the current access token as a single-value publication for code that reads it directly, and an existing pair under the older `<key>` / `<key>:refresh` layout is migrated on first read — but only while `<key>:session` is absent. `logout()` writes a cleared record even against empty storage, so an ended session cannot be migrated back out of the older keys. The older refresh entry is retired before any newer access token is mirrored, so those two are never published together, and if that retirement fails the newer access token is not mirrored beside it; such a reader falls back to the bearer refresh path, and server-side reuse detection resolves an older pair it may still hold. A record this version cannot interpret fails closed to a memory-only session rather than being reinterpreted through the older keys. A context running an SDK version that predates the record is outside the coordination guarantee. `persist: false` and SSR behavior are unchanged.
315
+
3
316
  ## 0.51.0
4
317
 
5
318
  ### Minor Changes