@proveanything/smartlinks 3.0.0-alpha.2 → 3.0.0-alpha.3
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.
- package/README.md +741 -741
- package/dist/README.md +573 -573
- package/dist/adminCardsView.js +55 -55
- package/dist/api/bookings.d.ts +49 -2
- package/dist/api/bookings.js +59 -2
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.js +1 -0
- package/dist/api/payments.d.ts +60 -0
- package/dist/api/payments.js +94 -0
- package/dist/api/realtime.d.ts +3 -0
- package/dist/api/realtime.js +10 -2
- package/dist/baseline.css +194 -194
- package/dist/dataChanged.d.ts +74 -0
- package/dist/dataChanged.js +162 -0
- package/dist/docs/API_SUMMARY.md +1086 -858
- package/dist/docs/admin-cards.md +189 -189
- package/dist/docs/agent-tools.md +156 -156
- package/dist/docs/ai-tools-and-skills.md +180 -180
- package/dist/docs/ai.md +1721 -1721
- package/dist/docs/api-versions.md +85 -85
- package/dist/docs/app-data-storage.md +277 -277
- package/dist/docs/app-docs.md +73 -73
- package/dist/docs/app-manifest.md +852 -852
- package/dist/docs/app-records-pattern.md +388 -388
- package/dist/docs/appConfig.md +550 -550
- package/dist/docs/assistant-apps.md +172 -172
- package/dist/docs/assistant-context.md +119 -119
- package/dist/docs/bookings.md +105 -8
- package/dist/docs/caching.md +32 -3
- package/dist/docs/comms.md +689 -689
- package/dist/docs/connectors.md +340 -340
- package/dist/docs/css-baseline.md +133 -133
- package/dist/docs/customer-guide.md +70 -70
- package/dist/docs/data-changed.md +91 -0
- package/dist/docs/deploying-apps.md +340 -340
- package/dist/docs/dpp.md +115 -115
- package/dist/docs/entitlements.md +90 -90
- package/dist/docs/files.md +69 -69
- package/dist/docs/host-dependency-contract.md +252 -252
- package/dist/docs/iframe-responder.md +11 -0
- package/dist/docs/integrations.md +322 -322
- package/dist/docs/interactions.md +544 -544
- package/dist/docs/item-context.md +181 -181
- package/dist/docs/knowledge.md +105 -105
- package/dist/docs/lists.md +157 -157
- package/dist/docs/lots.md +112 -112
- package/dist/docs/loyalty.md +348 -348
- package/dist/docs/members.md +183 -183
- package/dist/docs/memberships.md +150 -150
- package/dist/docs/mobile-admin-container.md +693 -693
- package/dist/docs/operations.md +281 -281
- package/dist/docs/overview.md +487 -485
- package/dist/docs/payments.md +94 -0
- package/dist/docs/proof-comms-triggers.md +142 -142
- package/dist/docs/proof-ownership-transfer.md +155 -155
- package/dist/docs/proof-product-data-scoping.md +462 -462
- package/dist/docs/proof-share-grants.md +305 -305
- package/dist/docs/realtime.md +149 -139
- package/dist/docs/records-admin-pattern.md +304 -304
- package/dist/docs/service-accounts.md +64 -64
- package/dist/docs/standard-query.md +196 -187
- package/dist/docs/tag-codes.md +97 -97
- package/dist/docs/tag-ranges.md +106 -106
- package/dist/docs/theme-tokens.md +252 -252
- package/dist/docs/upgrading-to-3.md +550 -532
- package/dist/docs/wallet-passes.md +107 -107
- package/dist/docs/websites.md +123 -123
- package/dist/http.d.ts +6 -3
- package/dist/http.js +48 -19
- package/dist/iframeResponder.d.ts +7 -0
- package/dist/iframeResponder.js +10 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/openapi.yaml +426 -3
- package/dist/testing/bookingsMemory.d.ts +29 -1
- package/dist/testing/bookingsMemory.js +89 -1
- package/dist/testing/index.js +4 -1
- package/dist/theme-boot.js +82 -82
- package/dist/theme.css +75 -75
- package/dist/types/appManifest.d.ts +26 -4
- package/dist/types/bookings.d.ts +99 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/payments.d.ts +101 -0
- package/dist/types/payments.js +5 -0
- package/dist/types/realtime.d.ts +5 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/API_SUMMARY.md +1086 -858
- package/docs/admin-cards.md +189 -189
- package/docs/agent-tools.md +156 -156
- package/docs/ai-tools-and-skills.md +180 -180
- package/docs/ai.md +1721 -1721
- package/docs/api-versions.md +85 -85
- package/docs/app-data-storage.md +277 -277
- package/docs/app-docs.md +73 -73
- package/docs/app-manifest.md +852 -852
- package/docs/app-records-pattern.md +388 -388
- package/docs/appConfig.md +550 -550
- package/docs/assistant-apps.md +172 -172
- package/docs/assistant-context.md +119 -119
- package/docs/bookings.md +105 -8
- package/docs/caching.md +32 -3
- package/docs/comms.md +689 -689
- package/docs/connectors.md +340 -340
- package/docs/css-baseline.md +133 -133
- package/docs/customer-guide.md +70 -70
- package/docs/data-changed.md +91 -0
- package/docs/deploying-apps.md +340 -340
- package/docs/dpp.md +115 -115
- package/docs/entitlements.md +90 -90
- package/docs/files.md +69 -69
- package/docs/host-dependency-contract.md +252 -252
- package/docs/iframe-responder.md +11 -0
- package/docs/integrations.md +322 -322
- package/docs/interactions.md +544 -544
- package/docs/item-context.md +181 -181
- package/docs/knowledge.md +105 -105
- package/docs/lists.md +157 -157
- package/docs/lots.md +112 -112
- package/docs/loyalty.md +348 -348
- package/docs/members.md +183 -183
- package/docs/memberships.md +150 -150
- package/docs/mobile-admin-container.md +693 -693
- package/docs/operations.md +281 -281
- package/docs/overview.md +487 -485
- package/docs/payments.md +94 -0
- package/docs/proof-comms-triggers.md +142 -142
- package/docs/proof-ownership-transfer.md +155 -155
- package/docs/proof-product-data-scoping.md +462 -462
- package/docs/proof-share-grants.md +305 -305
- package/docs/realtime.md +149 -139
- package/docs/service-accounts.md +64 -64
- package/docs/standard-query.md +196 -187
- package/docs/tag-codes.md +97 -97
- package/docs/tag-ranges.md +106 -106
- package/docs/theme-lookbook.v1.json +120 -120
- package/docs/theme-tokens.md +252 -252
- package/docs/upgrading-to-3.md +550 -532
- package/docs/wallet-passes.md +107 -107
- package/docs/websites.md +123 -123
- package/openapi.yaml +426 -3
- package/package.json +91 -91
- package/scripts/headless-check.mjs +87 -87
- package/scripts/lib/bare-imports.mjs +57 -57
- package/scripts/lib/keyed-app-data.mjs +21 -21
- package/scripts/lib/upgrade.mjs +708 -668
- package/scripts/publish.mjs +272 -272
- package/scripts/register-release.mjs +91 -91
- package/scripts/upgrade.mjs +79 -79
- package/upgrade/3.json +2 -2
|
@@ -1,532 +1,550 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Upgrading to SDK 3
|
|
3
|
-
description: What changed between SDK 2 and SDK 3, and how to move each call. The same changes are in upgrade/3.json as data.
|
|
4
|
-
category: Platform
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Upgrading to SDK 3
|
|
8
|
-
|
|
9
|
-
SDK 3 is SDK 2 with three things made the same everywhere:
|
|
10
|
-
|
|
11
|
-
1. **Every list returns one shape and pages one way.** `{ items, nextCursor, count? }`, with `limit` and
|
|
12
|
-
`cursor`. SDK 2 had nine list shapes and six ways to page.
|
|
13
|
-
2. **Every error has one shape**, with one style of code.
|
|
14
|
-
3. **What was marked deprecated in SDK 2 is gone.**
|
|
15
|
-
|
|
16
|
-
Nothing is renamed for its own sake. A call that isn't a list and wasn't deprecated is the same call.
|
|
17
|
-
|
|
18
|
-
SDK 3 asks the API for version `2027-01` ([API versions](api-versions.md)). **SDK 2 keeps working**: it
|
|
19
|
-
asks for `2026-11`, and the API keeps answering it as it always has. Move when you're ready, one app at a
|
|
20
|
-
time.
|
|
21
|
-
|
|
22
|
-
The changes below are also in `upgrade/3.json` in this package, as data: one entry for each renamed or
|
|
23
|
-
removed name, each list whose shape changed and each option that went. Scripts and AI agents should read
|
|
24
|
-
that file; this page explains it.
|
|
25
|
-
|
|
26
|
-
## How to move an app
|
|
27
|
-
|
|
28
|
-
Set the dependency to `^3` and install. Update `@proveanything/smartlinks-utils-ui` and
|
|
29
|
-
`@proveanything/smartlinks-auth-ui` to their SDK 3 versions if the app uses them. Then run
|
|
30
|
-
`npx smartlinks-upgrade`: it shows the move as five passes, with every place left in each.
|
|
31
|
-
|
|
32
|
-
**Do the passes in order, one at a time. A pass is finished when its check passes, not when it looks
|
|
33
|
-
finished.** Different kinds of change fail in different ways, and the ones nothing complains about are
|
|
34
|
-
the ones that get missed when everything is done in one go.
|
|
35
|
-
|
|
36
|
-
| | Pass | What it is | Finished when |
|
|
37
|
-
|---|---|---|---|
|
|
38
|
-
| 1 | `automatic` | The renames and dropped arguments the script makes itself | `npx smartlinks-upgrade --write` has run |
|
|
39
|
-
| 2 | `replace` | Calls that no longer exist, and options that went. Each needs a decision | `npx smartlinks-upgrade --check replace` finds nothing |
|
|
40
|
-
| 3 | `lists` | Every list returns `{ items, nextCursor, count? }` and takes the standard words | the app type-checks, and `--check lists` finds nothing |
|
|
41
|
-
| 4 | `pages` | A list that used to return everything now returns one page: all of them, or a page? | `--check pages` finds nothing |
|
|
42
|
-
| 5 | `errors` | Error codes compared as text, the SDK read from `window` | `--check errors` finds nothing |
|
|
43
|
-
|
|
44
|
-
Then build, run `npx smartlinks-doctor`, run the app's own tests, and try each screen that lists
|
|
45
|
-
something.
|
|
46
|
-
|
|
47
|
-
`--check` exits 0 when nothing is left and 2 when something is, so a script or an agent can use it as a
|
|
48
|
-
gate. `--check pages` (or any pass) prints only that pass's places.
|
|
49
|
-
|
|
50
|
-
**
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
|
218
|
-
|
|
219
|
-
| `
|
|
220
|
-
| `
|
|
221
|
-
| `
|
|
222
|
-
| `
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
|
227
|
-
|
|
228
|
-
| `
|
|
229
|
-
| `
|
|
230
|
-
| `
|
|
231
|
-
| `
|
|
232
|
-
| `
|
|
233
|
-
| `
|
|
234
|
-
| `
|
|
235
|
-
| `
|
|
236
|
-
| `
|
|
237
|
-
| `
|
|
238
|
-
| `
|
|
239
|
-
| `
|
|
240
|
-
| `
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
|
245
|
-
|
|
246
|
-
| `
|
|
247
|
-
| `
|
|
248
|
-
| `
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
|
259
|
-
|
|
260
|
-
| `
|
|
261
|
-
| `
|
|
262
|
-
| `
|
|
263
|
-
| `
|
|
264
|
-
| `
|
|
265
|
-
| `
|
|
266
|
-
| `
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
|
277
|
-
|
|
278
|
-
| `
|
|
279
|
-
| `
|
|
280
|
-
| `
|
|
281
|
-
| `
|
|
282
|
-
| `
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
`
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
A
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
-
|
|
357
|
-
|
|
358
|
-
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
|
399
|
-
|
|
400
|
-
| `
|
|
401
|
-
| `
|
|
402
|
-
| `
|
|
403
|
-
| `
|
|
404
|
-
| `
|
|
405
|
-
| `
|
|
406
|
-
| `
|
|
407
|
-
| `
|
|
408
|
-
| `
|
|
409
|
-
| `
|
|
410
|
-
| `
|
|
411
|
-
| `
|
|
412
|
-
| `
|
|
413
|
-
| `
|
|
414
|
-
| `
|
|
415
|
-
| `
|
|
416
|
-
| `
|
|
417
|
-
| `
|
|
418
|
-
| `
|
|
419
|
-
| `
|
|
420
|
-
| `
|
|
421
|
-
| `
|
|
422
|
-
| `
|
|
423
|
-
| `
|
|
424
|
-
| `
|
|
425
|
-
| `
|
|
426
|
-
| `
|
|
427
|
-
| `
|
|
428
|
-
| `
|
|
429
|
-
| `
|
|
430
|
-
| `
|
|
431
|
-
| `
|
|
432
|
-
| `
|
|
433
|
-
| `
|
|
434
|
-
| `
|
|
435
|
-
| `
|
|
436
|
-
| `
|
|
437
|
-
| `
|
|
438
|
-
| `
|
|
439
|
-
| `
|
|
440
|
-
| `
|
|
441
|
-
| `
|
|
442
|
-
| `
|
|
443
|
-
| `
|
|
444
|
-
| `
|
|
445
|
-
| `
|
|
446
|
-
| `
|
|
447
|
-
| `
|
|
448
|
-
| `
|
|
449
|
-
| `
|
|
450
|
-
| `
|
|
451
|
-
| `
|
|
452
|
-
| `
|
|
453
|
-
| `
|
|
454
|
-
| `
|
|
455
|
-
| `
|
|
456
|
-
| `
|
|
457
|
-
| `
|
|
458
|
-
| `
|
|
459
|
-
| `
|
|
460
|
-
| `
|
|
461
|
-
| `
|
|
462
|
-
| `
|
|
463
|
-
| `
|
|
464
|
-
| `
|
|
465
|
-
| `
|
|
466
|
-
| `
|
|
467
|
-
| `
|
|
468
|
-
| `
|
|
469
|
-
| `
|
|
470
|
-
| `
|
|
471
|
-
| `
|
|
472
|
-
| `
|
|
473
|
-
| `
|
|
474
|
-
| `
|
|
475
|
-
| `
|
|
476
|
-
| `
|
|
477
|
-
| `
|
|
478
|
-
| `
|
|
479
|
-
| `
|
|
480
|
-
| `
|
|
481
|
-
| `
|
|
482
|
-
| `
|
|
483
|
-
| `
|
|
484
|
-
| `
|
|
485
|
-
| `
|
|
486
|
-
| `
|
|
487
|
-
| `
|
|
488
|
-
| `
|
|
489
|
-
| `
|
|
490
|
-
| `
|
|
491
|
-
| `
|
|
492
|
-
| `
|
|
493
|
-
| `
|
|
494
|
-
| `
|
|
495
|
-
| `
|
|
496
|
-
| `
|
|
497
|
-
| `
|
|
498
|
-
| `
|
|
499
|
-
| `
|
|
500
|
-
| `
|
|
501
|
-
| `
|
|
502
|
-
| `
|
|
503
|
-
| `
|
|
504
|
-
| `
|
|
505
|
-
| `
|
|
506
|
-
| `
|
|
507
|
-
| `
|
|
508
|
-
| `
|
|
509
|
-
| `
|
|
510
|
-
| `
|
|
511
|
-
| `
|
|
512
|
-
| `
|
|
513
|
-
| `
|
|
514
|
-
| `
|
|
515
|
-
| `
|
|
516
|
-
| `
|
|
517
|
-
| `
|
|
518
|
-
| `
|
|
519
|
-
| `
|
|
520
|
-
| `
|
|
521
|
-
| `
|
|
522
|
-
| `
|
|
523
|
-
| `
|
|
524
|
-
| `
|
|
525
|
-
| `
|
|
526
|
-
| `
|
|
527
|
-
| `
|
|
528
|
-
| `
|
|
529
|
-
| `
|
|
530
|
-
| `
|
|
531
|
-
| `
|
|
532
|
-
|
|
1
|
+
---
|
|
2
|
+
title: Upgrading to SDK 3
|
|
3
|
+
description: What changed between SDK 2 and SDK 3, and how to move each call. The same changes are in upgrade/3.json as data.
|
|
4
|
+
category: Platform
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Upgrading to SDK 3
|
|
8
|
+
|
|
9
|
+
SDK 3 is SDK 2 with three things made the same everywhere:
|
|
10
|
+
|
|
11
|
+
1. **Every list returns one shape and pages one way.** `{ items, nextCursor, count? }`, with `limit` and
|
|
12
|
+
`cursor`. SDK 2 had nine list shapes and six ways to page.
|
|
13
|
+
2. **Every error has one shape**, with one style of code.
|
|
14
|
+
3. **What was marked deprecated in SDK 2 is gone.**
|
|
15
|
+
|
|
16
|
+
Nothing is renamed for its own sake. A call that isn't a list and wasn't deprecated is the same call.
|
|
17
|
+
|
|
18
|
+
SDK 3 asks the API for version `2027-01` ([API versions](api-versions.md)). **SDK 2 keeps working**: it
|
|
19
|
+
asks for `2026-11`, and the API keeps answering it as it always has. Move when you're ready, one app at a
|
|
20
|
+
time.
|
|
21
|
+
|
|
22
|
+
The changes below are also in `upgrade/3.json` in this package, as data: one entry for each renamed or
|
|
23
|
+
removed name, each list whose shape changed and each option that went. Scripts and AI agents should read
|
|
24
|
+
that file; this page explains it.
|
|
25
|
+
|
|
26
|
+
## How to move an app
|
|
27
|
+
|
|
28
|
+
Set the dependency to `^3` and install. Update `@proveanything/smartlinks-utils-ui` and
|
|
29
|
+
`@proveanything/smartlinks-auth-ui` to their SDK 3 versions if the app uses them. Then run
|
|
30
|
+
`npx smartlinks-upgrade`: it shows the move as five passes, with every place left in each.
|
|
31
|
+
|
|
32
|
+
**Do the passes in order, one at a time. A pass is finished when its check passes, not when it looks
|
|
33
|
+
finished.** Different kinds of change fail in different ways, and the ones nothing complains about are
|
|
34
|
+
the ones that get missed when everything is done in one go.
|
|
35
|
+
|
|
36
|
+
| | Pass | What it is | Finished when |
|
|
37
|
+
|---|---|---|---|
|
|
38
|
+
| 1 | `automatic` | The renames and dropped arguments the script makes itself | `npx smartlinks-upgrade --write` has run |
|
|
39
|
+
| 2 | `replace` | Calls that no longer exist, and options that went. Each needs a decision | `npx smartlinks-upgrade --check replace` finds nothing |
|
|
40
|
+
| 3 | `lists` | Every list returns `{ items, nextCursor, count? }` and takes the standard words | the app type-checks, and `--check lists` finds nothing |
|
|
41
|
+
| 4 | `pages` | A list that used to return everything now returns one page: all of them, or a page? | `--check pages` finds nothing |
|
|
42
|
+
| 5 | `errors` | Error codes compared as text, the SDK read from `window` | `--check errors` finds nothing |
|
|
43
|
+
|
|
44
|
+
Then build, run `npx smartlinks-doctor`, run the app's own tests, and try each screen that lists
|
|
45
|
+
something.
|
|
46
|
+
|
|
47
|
+
`--check` exits 0 when nothing is left and 2 when something is, so a script or an agent can use it as a
|
|
48
|
+
gate. `--check pages` (or any pass) prints only that pass's places.
|
|
49
|
+
|
|
50
|
+
**In pass 3, `any` hides a call from the type-check.** `(SL as any).batch.list(…)` or
|
|
51
|
+
`const res: any = await x.list()` compiles whatever it does with the answer, so the type-check passes
|
|
52
|
+
without having looked at it. On the first real app moved, 11 of its 17 list calls were like this. The
|
|
53
|
+
script marks each one **typed `any`** and the pass is not finished while any is left: take the `any`
|
|
54
|
+
away so the type-check can do the work, or go through the call and note it (`// sl-upgrade: ok <why>`).
|
|
55
|
+
|
|
56
|
+
**Pass 4 is the one to take slowly.** Nothing else catches it: code that reads `.items` from a list that
|
|
57
|
+
used to return everything compiles, runs, and is wrong once there are more than 50. The script counts a
|
|
58
|
+
call as decided when it says how many it wants (`limit`), follows the pages (`cursor`, or it sits inside
|
|
59
|
+
`all()` / `each()`), or carries a note from a person:
|
|
60
|
+
|
|
61
|
+
```typescript
|
|
62
|
+
// sl-upgrade: ok the picker shows the first few on purpose
|
|
63
|
+
const { items } = await lots.list(collectionId)
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
The same note settles a place in pass 5 that is right as it is. It never excuses a call that no longer
|
|
67
|
+
exists.
|
|
68
|
+
|
|
69
|
+
Apps built in Forge move with the **Move to SDK 3** upgrade step, which goes through these passes.
|
|
70
|
+
|
|
71
|
+
### An app that embeds other apps
|
|
72
|
+
|
|
73
|
+
A few apps load other apps' widgets themselves, with a loader of their own, instead of the host's
|
|
74
|
+
`EmbeddedWidget` prop. **Such an app should not move to SDK 3 until it uses the host's `EmbeddedWidget`.**
|
|
75
|
+
Its loader hands its own SDK to whatever it embeds, and puts it on `window.SL`. On SDK 3 that gives SDK 3
|
|
76
|
+
to every embedded app built for SDK 2, and replaces the page's SDK 2 for every other older app on the
|
|
77
|
+
page. The host's `EmbeddedWidget` chooses the SDK each embedded app was built for.
|
|
78
|
+
|
|
79
|
+
The script flags this in pass 5 (a loader that names the SDK's global, or that puts things on `window`),
|
|
80
|
+
and `smartlinks-doctor` warns about a hand-rolled loader on any SDK. The rule behind it: `window.SL` is the
|
|
81
|
+
host's, and is SDK 2. An app on SDK 3 never writes to it.
|
|
82
|
+
|
|
83
|
+
### What `smartlinks-upgrade` does
|
|
84
|
+
|
|
85
|
+
It reads `upgrade/3.json` and your source, and finds SDK calls by what a name is bound to, not by how
|
|
86
|
+
it's spelled: `product.get(…)` only counts where `product` is the SDK's (an import, `SL.product`, or a
|
|
87
|
+
name taken from one of those). A variable of your own called `product` is never touched.
|
|
88
|
+
|
|
89
|
+
| It changes (with `--write`) | It lists for you, by pass |
|
|
90
|
+
|---|---|
|
|
91
|
+
| Calls that only changed name: `product.get` → `products.get`, `jobs.listJobs` → `jobs.list`, with the import | Every removed call, with what replaces it, and options that went |
|
|
92
|
+
| Renamed types, with their imports | Every call to a list whose result changed, and any option it passes that is gone |
|
|
93
|
+
| The argument that went from `collection.list` and `authKit.list` | Every call to a list that used to return everything, until it is decided |
|
|
94
|
+
| `sharedDependencies` in the manifest, to `v8` | Error codes compared with a dotted or camel-case string |
|
|
95
|
+
| | Old `attestation` writes, to leave alone |
|
|
96
|
+
|
|
97
|
+
Where the new name is already a variable in a file (`const products = await product.list(…)` is
|
|
98
|
+
common), it imports the SDK's under another name: `products as productsApi`. Running it twice changes
|
|
99
|
+
nothing the second time. It never installs, builds, commits or releases.
|
|
100
|
+
|
|
101
|
+
## Lists
|
|
102
|
+
|
|
103
|
+
Every function that lists returns a `ListResult<T>`:
|
|
104
|
+
|
|
105
|
+
```typescript
|
|
106
|
+
// SDK 2: each list had its own shape
|
|
107
|
+
const tagList = await tags.list(collectionId) // { tags, limit, offset }
|
|
108
|
+
const { orders } = await order.list(collectionId, { offset: 50 }) // { orders, limit, offset }
|
|
109
|
+
const all = await products.list(collectionId) // [...]
|
|
110
|
+
const page = await app.records.list(collectionId, appId) // { data, pagination: { total, hasMore, … } }
|
|
111
|
+
|
|
112
|
+
// SDK 3: one shape
|
|
113
|
+
const { items } = await tags.list(collectionId)
|
|
114
|
+
const { items, nextCursor } = await order.list(collectionId, { limit: 50 })
|
|
115
|
+
const { items, nextCursor } = await products.list(collectionId) // the first 50, not all of them
|
|
116
|
+
const { items, count } = await app.records.list(collectionId, appId)
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
What to change at each call:
|
|
120
|
+
|
|
121
|
+
| SDK 2 | SDK 3 |
|
|
122
|
+
|---|---|
|
|
123
|
+
| The list itself (`const xs = await x.list()`), or under its own name (`.tags`, `.orders`, `.data`, `.results`, …) | `.items` |
|
|
124
|
+
| `total`, `pagination.total`, `page.total` | `count` (the total; absent where the server doesn't know it) |
|
|
125
|
+
| `hasMore`, `pagination.hasMore`, `more` | `nextCursor !== null` |
|
|
126
|
+
| `offset`, `page`, `startAfter`, `lastId`, `from` used as a place to carry on | `cursor`: pass the last page's `nextCursor` |
|
|
127
|
+
| `pageSize`, `perPage` | `limit` |
|
|
128
|
+
| `limit` and `offset` echoed back in the answer | gone: you already know what you asked for |
|
|
129
|
+
| Other fields beside the list (`meta`, `mode`, `scanned`, …) | still there, beside `items` |
|
|
130
|
+
|
|
131
|
+
Paging by offset is gone, so "jump to page 7" is gone with it. Page forward with the cursor; for a
|
|
132
|
+
numbered pager, use the [standard query](standard-query.md), which counts and sorts.
|
|
133
|
+
|
|
134
|
+
To fetch everything, don't loop by hand:
|
|
135
|
+
|
|
136
|
+
```typescript
|
|
137
|
+
import { all, each, tags } from '@proveanything/smartlinks'
|
|
138
|
+
|
|
139
|
+
const everyTag = await all((cursor) => tags.list(collectionId, { cursor }))
|
|
140
|
+
for await (const t of each((cursor) => tags.list(collectionId, { cursor }))) { /* … */ }
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### A list is one page now, even where it used to be everything
|
|
144
|
+
|
|
145
|
+
This is the change most likely to break an app quietly. In SDK 2 many lists returned everything in one
|
|
146
|
+
answer: products, variants, batches, the proofs of a product, forms, templates, lots, claim sets, the
|
|
147
|
+
members of a group, an app's config items. In SDK 3 every list returns **50 items unless you pass
|
|
148
|
+
`limit`**, and `nextCursor` says whether there are more.
|
|
149
|
+
|
|
150
|
+
```typescript
|
|
151
|
+
// SDK 2: every variant of the product
|
|
152
|
+
const variants = await variant.list(collectionId, productId)
|
|
153
|
+
|
|
154
|
+
// SDK 3, when you need them all (to filter, count, look one up, fill a picker)
|
|
155
|
+
const variants = await all((cursor) => variant.list(collectionId, productId, { limit: 200, cursor }))
|
|
156
|
+
|
|
157
|
+
// SDK 3, when you show a page
|
|
158
|
+
const { items, nextCursor } = await variant.list(collectionId, productId, { limit: 20 })
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
The upgrade report marks every such call **"used to return everything"**, and the table at the end of
|
|
162
|
+
this guide marks them "one page now". Code that only reads `.items` compiles and runs, and is wrong
|
|
163
|
+
once there are more than 50.
|
|
164
|
+
|
|
165
|
+
The exception is a small fixed set: a page's widgets, the facet definitions, config fields, the
|
|
166
|
+
connectors that exist, a look-up by ids. Those always come back whole, with `nextCursor: null`, and
|
|
167
|
+
their functions take no `limit` or `cursor` (the API refuses them). More in [Lists](lists.md).
|
|
168
|
+
|
|
169
|
+
### One word for search, sort, dates and related things
|
|
170
|
+
|
|
171
|
+
Where a list can do one of these, it now says it the same way as every other list. The older spelling
|
|
172
|
+
is gone from the types, and the API refuses it by name (`This list has no "search" parameter. Use "q".`).
|
|
173
|
+
|
|
174
|
+
| To | SDK 2 (varied by list) | SDK 3 |
|
|
175
|
+
|---|---|---|
|
|
176
|
+
| Search | `search`, `query`, `query.search` | `q` |
|
|
177
|
+
| Sort | `sort: 'createdAt:desc'`, `sort` + `order`, `sortBy` + `sortOrder`, `order: 'ASC'` | `orderBy: [{ createdAt: 'desc' }]` |
|
|
178
|
+
| Filter on a date field | `createdFrom` / `createdTo`, `recordedAfter` / `recordedBefore`, `query.createdAfter` / `Before`, `createdAt: 'gte:…'` | `createdAt: { gte, lte }` (the field's own name) |
|
|
179
|
+
| Bring related things along | `includeItems: true`, `expandFacets`, `includes: ['assets']`, `include` | `expand: ['items']` |
|
|
180
|
+
| Time window of a log or schedule | `from` / `to` (`since` on the error log) | `from` / `to` |
|
|
181
|
+
|
|
182
|
+
```typescript
|
|
183
|
+
// SDK 2
|
|
184
|
+
await app.cases.list(c, appId, { sort: '-createdAt', createdAt: 'gte:2026-11-01' })
|
|
185
|
+
await products.query(c, { query: { search: 'oak', updatedAfter: since }, sort: [{ field: 'name', direction: 'asc' }] })
|
|
186
|
+
await order.list(c, { includeItems: true })
|
|
187
|
+
await knowledge.publicSearch(c, { query: 'descale', k: 3 })
|
|
188
|
+
|
|
189
|
+
// SDK 3
|
|
190
|
+
await app.cases.list(c, appId, { orderBy: [{ createdAt: 'desc' }], createdAt: { gte: '2026-11-01T00:00:00Z' } })
|
|
191
|
+
await products.query(c, { q: 'oak', updatedAt: { gte: since }, orderBy: [{ name: 'asc' }] })
|
|
192
|
+
await order.list(c, { expand: ['items'] })
|
|
193
|
+
await knowledge.publicSearch(c, { q: 'descale', limit: 3 })
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
Three things to watch:
|
|
197
|
+
|
|
198
|
+
- **A bare sort field used to mean descending** on app records, cases, threads and bookings
|
|
199
|
+
(`sort: 'createdAt'` was newest first). `orderBy` always says the direction.
|
|
200
|
+
- **A date is a full date and time.** A plain date, a `gte:` prefix or an operator the list doesn't have
|
|
201
|
+
used to be ignored without a word; now it is refused. `gte` and `lte` include the moment you give.
|
|
202
|
+
- **A list sorts by the fields it names** and brings along the things it names; anything else is refused,
|
|
203
|
+
with the ones it has. The option types list them.
|
|
204
|
+
|
|
205
|
+
**A common pattern to fix while you're here:** fetching a whole list and filtering or counting it in the
|
|
206
|
+
browser. That worked on small collections and falls over on large ones. Ask the server instead, with the
|
|
207
|
+
[standard query](standard-query.md).
|
|
208
|
+
|
|
209
|
+
## Renamed and removed
|
|
210
|
+
|
|
211
|
+
Everything marked `@deprecated` in SDK 2 is removed, except the old `attestation` namespace (see
|
|
212
|
+
[What hasn't changed](#what-hasnt-changed)).
|
|
213
|
+
|
|
214
|
+
<!-- upgrade-table:names:start -->
|
|
215
|
+
**Renamed** (the same call under a new name):
|
|
216
|
+
|
|
217
|
+
| SDK 2 | SDK 3 | Note |
|
|
218
|
+
|---|---|---|
|
|
219
|
+
| `ContactSchema` | `ContactSchemaResponse` | |
|
|
220
|
+
| `MobileAdminBundleManifest` | `AdminMobileBundleManifest` | |
|
|
221
|
+
| `MobileAdminComponentManifest` | `AdminMobileComponentManifest` | |
|
|
222
|
+
| `product.clone` | `products.clone` | |
|
|
223
|
+
| `product.create` | `products.create` | |
|
|
224
|
+
| `product.createClaimWindow` | `products.createClaimWindow` | |
|
|
225
|
+
| `product.get` | `products.get` | The whole `product` namespace (singular) is gone: use `products`. |
|
|
226
|
+
| `product.getSN` | `products.getSN` | |
|
|
227
|
+
| `product.list` | `products.list` | Then treat it as a list: `products.list` returns ListResult<ProductResponse>. |
|
|
228
|
+
| `product.listAssets` | `products.listAssets` | Then treat it as a list: `products.listAssets` returns ListResult<AssetResponse>. |
|
|
229
|
+
| `product.lookupSN` | `products.lookupSN` | |
|
|
230
|
+
| `product.publicCreateClaim` | `products.publicCreateClaim` | |
|
|
231
|
+
| `product.publicLookupClaim` | `products.publicLookupClaim` | |
|
|
232
|
+
| `product.refresh` | `products.refresh` | |
|
|
233
|
+
| `product.remove` | `products.remove` | |
|
|
234
|
+
| `product.update` | `products.update` | |
|
|
235
|
+
| `product.updateClaimWindow` | `products.updateClaimWindow` | |
|
|
236
|
+
| `ScannerEventSubscriber` | `AdminMobileEventCallback` | |
|
|
237
|
+
| `async.enqueueAsyncJob` | `jobs.enqueue` | The `async` namespace is gone: starting and following a job live in `jobs` with listing them. |
|
|
238
|
+
| `async.getAsyncJobStatus` | `jobs.status` | |
|
|
239
|
+
| `jobs.listJobs` | `jobs.list` | Then treat it as a list: `jobs.list` returns ListResult<Job>. |
|
|
240
|
+
| `jobs.getJob` | `jobs.get` | |
|
|
241
|
+
|
|
242
|
+
**Removed** (no like-for-like call):
|
|
243
|
+
|
|
244
|
+
| SDK 2 | Do this instead |
|
|
245
|
+
|---|---|
|
|
246
|
+
| `ai.generateContent` | Use `ai.chat.completions.create`. A different call: it takes chat messages, not `contents`, and answers in the chat-completions shape (`choices[0].message.content`). `ai.chat.completions.create(collectionId, { messages: [{ role: "user", content }] })`. |
|
|
247
|
+
| `Asset.thumbnails` | Use `Asset.thumbnail`. One thumbnail address (`string \| null`), not a map of sizes. |
|
|
248
|
+
| `asset.uploadAsset` | Use `asset.upload`. Takes one options object: `asset.upload({ file, scope, … })` (type UploadAssetOptions). |
|
|
249
|
+
| `BatchCreateRequest.id` | The server generates the batch id. Don't send one. |
|
|
250
|
+
| `comms.queryRecipientsWithAction` | Use `comms.queryRecipientsWithInteraction`. It posted to an address the API never had, so it never worked. The real call takes `interactionId` (not `actionId`) and returns a list of ids, or of `{ id, outcome }` with `includeOutcome: true`. |
|
|
251
|
+
| `comms.queryRecipientsWithoutAction` | Use `comms.queryRecipientsWithoutInteraction`. It posted to an address the API never had, so it never worked. The real call takes `interactionId` (not `actionId`) and returns a list of ids. |
|
|
252
|
+
| `CommsRecipientsWithActionQuery` | Use `CommsRecipientsWithInteractionQuery`. `actionId` is `interactionId`. |
|
|
253
|
+
| `CommsRecipientsWithoutActionQuery` | Use `CommsRecipientsWithoutInteractionQuery`. `actionId` is `interactionId`. |
|
|
254
|
+
| `evaluateCondition` | Use `evaluateConditions`. Takes the field's whole condition list: `evaluateConditions(property.conditions, property.showWhen, values)`. |
|
|
255
|
+
| `FirebaseTimestamp` | Dates are ISO 8601 strings or a Date: `BatchCreateRequest.expiryDate` and `BatchUpdateRequest.expiryDate` are `string \| Date`. |
|
|
256
|
+
| `order.findByProduct` | Use `order.query`. The API never had this address, so the call could only fail. Use `order.query(collectionId, { query: { productId } })`. |
|
|
257
|
+
| `order.findItemsByProduct` | Use `order.query`. The API never had this address, so the call could only fail. Use `order.query(collectionId, { query: { productId }, includeItems: true })` and read each order's items. |
|
|
258
|
+
| `order.findOrdersByProduct` | Use `order.query`. The API never had this address, so the call could only fail. Use `order.query(collectionId, { query: { productId } })`. |
|
|
259
|
+
| `order.getOrderIdsByAttribute` | Use `order.query`. The API never had this address, so the call could only fail. Use `order.query` with `productId`, `batchId` or `variantId` in `query`, and read the ids from `items`. |
|
|
260
|
+
| `order.lookup` | Use `order.query`. The API never had this address, so the call could only fail. Find the orders that hold items with `order.query(collectionId, { query: { items: [{ itemType, itemId }] } })`. |
|
|
261
|
+
| `product.find` | Use `products.query`. A different body (type ProductQueryRequest). Returns a list and pages with `limit` + `cursor`. |
|
|
262
|
+
| `product.publicFind` | Use `products.get` when you know the id, `products.query` to search. The server retired this route some time ago. |
|
|
263
|
+
| `realtime.getAdminToken` | Use `realtime.onMine`. The SDK gets its own tokens. Subscribe with `realtime.onMine(scope, onMessage)`. |
|
|
264
|
+
| `realtime.getPublicToken` | The SDK gets its own tokens. Subscribe with `realtime.channel(scope, name)` or `realtime.onChange(scope, filter, onChange)`. |
|
|
265
|
+
| `site.ready` | Sites are server-rendered and nothing waits for the signal. Delete the call. |
|
|
266
|
+
| `VariantCreateRequest.id` | The server generates the variant id. Don't send one. |
|
|
267
|
+
|
|
268
|
+
<!-- upgrade-table:names:end -->
|
|
269
|
+
|
|
270
|
+
## Options that went
|
|
271
|
+
|
|
272
|
+
These options were accepted by SDK 2 and did nothing, or only worked for an admin. SDK 3's types no
|
|
273
|
+
longer have them.
|
|
274
|
+
|
|
275
|
+
<!-- upgrade-table:options:start -->
|
|
276
|
+
| Function | Option | Why, and what to do |
|
|
277
|
+
|---|---|---|
|
|
278
|
+
| `asset.list` | `mimeTypePrefix` | No asset list ever read it, so it never filtered anything. Filter the items you get back (`a.mimeType?.startsWith('image/')`), or as an admin use `asset.listAdmin` with `assetType`. |
|
|
279
|
+
| `authKit.list` | `admin (the argument)` | There is no public list of AuthKit configs, so the call without `true` always failed. Call `authKit.list(collectionId)`. |
|
|
280
|
+
| `bookings.mine` | `contactId` | `mine` is always the caller's own bookings. To list a contact's bookings as an admin use `bookings.list`. |
|
|
281
|
+
| `collection.list` | `admin (the argument)` | There is no public list of collections, so `collection.list(false)` always failed. Call `collection.list()`: it lists the collections the signed-in user can work on. |
|
|
282
|
+
| `comms.queryRecipientIds` | `journeyStepId` | The server never read it. For one journey step's recipients use `journeysAnalytics.recipients`. |
|
|
283
|
+
| `containers.publicList` | `status` | The public list is always the active containers. |
|
|
284
|
+
| `containers.publicList` | `ref` | The public list never filtered by ref. |
|
|
285
|
+
| `facets.list` | `includeValues` | The list never read it, and never needed it: every facet in the list already comes with its `values`. Remove the option. |
|
|
286
|
+
| `facets.publicList` | `includeValues` | The list never read it, and never needed it: every facet in the list already comes with its `values`. Remove the option. |
|
|
287
|
+
| `interactions.publicMyInteractions` | `scope` | The server never read it. |
|
|
288
|
+
| `lots.publicList` | `includeDeleted` | Admin only: use `lots.list`. |
|
|
289
|
+
| `attestations.summary` | `recordedAfter` | Now `recordedAt: { gte: … }`, the same range the attestation lists take. |
|
|
290
|
+
| `attestations.summary` | `recordedBefore` | Now `recordedAt: { lte: … }`, the same range the attestation lists take. |
|
|
291
|
+
| `attestations.publicSummary` | `recordedAfter` | Now `recordedAt: { gte: … }`, the same range the attestation lists take. |
|
|
292
|
+
| `attestations.publicSummary` | `recordedBefore` | Now `recordedAt: { lte: … }`, the same range the attestation lists take. |
|
|
293
|
+
| `attestations.treeSummary` | `recordedAfter` | Now `recordedAt: { gte: … }`, the same range the attestation lists take. |
|
|
294
|
+
| `attestations.treeSummary` | `recordedBefore` | Now `recordedAt: { lte: … }`, the same range the attestation lists take. |
|
|
295
|
+
| `attestations.publicTreeSummary` | `recordedAfter` | Now `recordedAt: { gte: … }`, the same range the attestation lists take. |
|
|
296
|
+
| `attestations.publicTreeSummary` | `recordedBefore` | Now `recordedAt: { lte: … }`, the same range the attestation lists take. |
|
|
297
|
+
| `attestations.publicContainerSummary` | `recordedAfter` | Now `recordedAt: { gte: … }`, the same range the attestation lists take. |
|
|
298
|
+
| `attestations.publicContainerSummary` | `recordedBefore` | Now `recordedAt: { lte: … }`, the same range the attestation lists take. |
|
|
299
|
+
| `attestations.publicContainerTreeSummary` | `recordedAfter` | Now `recordedAt: { gte: … }`, the same range the attestation lists take. |
|
|
300
|
+
| `attestations.publicContainerTreeSummary` | `recordedBefore` | Now `recordedAt: { lte: … }`, the same range the attestation lists take. |
|
|
301
|
+
<!-- upgrade-table:options:end -->
|
|
302
|
+
|
|
303
|
+
## Errors
|
|
304
|
+
|
|
305
|
+
Every error from the API is now `{ error: { code, message, details, requestId } }`. The SDK still throws
|
|
306
|
+
`SmartlinksApiError`, so `try`/`catch` code keeps its structure. What changes is what's inside:
|
|
307
|
+
|
|
308
|
+
```typescript
|
|
309
|
+
try {
|
|
310
|
+
await products.get(collectionId, productId)
|
|
311
|
+
} catch (e) {
|
|
312
|
+
if (e instanceof SmartlinksApiError) {
|
|
313
|
+
e.statusCode // 404
|
|
314
|
+
e.errorCode // 'NOT_FOUND' ← check this in code
|
|
315
|
+
e.message // for people; may change
|
|
316
|
+
e.details // extra facts, e.g. { unknown: ['serach'], allowed: [...] }
|
|
317
|
+
e.requestId // quote this when reporting a problem
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
- **Codes are all `UPPER_SNAKE`.** A code that was dotted or camel-case in SDK 2 changes spelling:
|
|
323
|
+
`segments.list.failed` is `SEGMENTS_LIST_FAILED`. Search your app for string comparisons against
|
|
324
|
+
`errorCode`, `details.errorCode` and `details.error`.
|
|
325
|
+
- **Two statuses are corrected.** "Not signed in" used to arrive from some routes as `400`; it is `401`.
|
|
326
|
+
"Signed in but not allowed" used to arrive from some routes as `401`; it is `403`. `isAuthError()`
|
|
327
|
+
covers both.
|
|
328
|
+
- **Don't match on message text.** Messages are for people and are being rewritten. Use `errorCode`.
|
|
329
|
+
- **An address that doesn't exist** answers `404 ROUTE_NOT_FOUND` with what was wrong and the nearest
|
|
330
|
+
real addresses.
|
|
331
|
+
- **A `429`** carries `Retry-After` when the server knows when to try again.
|
|
332
|
+
|
|
333
|
+
Not changed: answers from an app's own server functions, and the OpenAI-compatible AI routes, which keep
|
|
334
|
+
their own error shapes.
|
|
335
|
+
|
|
336
|
+
## A list refuses options it doesn't read
|
|
337
|
+
|
|
338
|
+
In SDK 2 a mistyped or unsupported query option was silently ignored. Now a list answers
|
|
339
|
+
`400 UNKNOWN_PARAMETER`, naming the options it does read. Two things this catches in existing apps:
|
|
340
|
+
|
|
341
|
+
- one options object shared between an admin call and a public call, carrying an admin-only option
|
|
342
|
+
(`includeDeleted`, `status` on public app records, `contactId`, `assignedTo`);
|
|
343
|
+
- an option that never existed on that list.
|
|
344
|
+
|
|
345
|
+
Pass each list only the options its type has. The types now say which are admin-only.
|
|
346
|
+
|
|
347
|
+
## API version
|
|
348
|
+
|
|
349
|
+
`initializeApi({ apiVersion })` can ask for a **newer** version than the SDK was built for. An older one
|
|
350
|
+
is ignored: SDK 3's functions return `2027-01` shapes. To stay on `2026-11`, stay on SDK 2.
|
|
351
|
+
|
|
352
|
+
## Apps that run inside the Portal or Hub
|
|
353
|
+
|
|
354
|
+
A component doesn't bundle the SDK: it uses the host's copy. So that SDK 2 apps and SDK 3 apps can run
|
|
355
|
+
side by side, the shared-dependency contract goes to **v8** with SDK 3
|
|
356
|
+
([host-dependency-contract.md](host-dependency-contract.md)):
|
|
357
|
+
|
|
358
|
+
- Build with `SHARED_DEPENDENCY_SPECIFIERS` from SDK 3 as your externals, as before. Your manifest then
|
|
359
|
+
says `sharedDependencies: "v8"` and the host gives you SDK 3.
|
|
360
|
+
- An older build of your app, and other apps still on SDK 2, keep getting SDK 2. Nothing changes for them.
|
|
361
|
+
- The `SL` prop the host hands your component is SDK 3 too. If you read the SDK from the window
|
|
362
|
+
global rather than an import, it is `window.SL3` (`window.SL` stays SDK 2).
|
|
363
|
+
- Keep building both formats (`moduleFormat: "dual"`). For now the host loads the UMD build of an app
|
|
364
|
+
on SDK 3.
|
|
365
|
+
- The sign-in UI (`@proveanything/smartlinks-auth-ui`) is the host's one copy, as before.
|
|
366
|
+
- `@proveanything/smartlinks-utils-ui` is bundled into your app and calls the SDK itself, so it must be
|
|
367
|
+
a version that works on SDK 3.
|
|
368
|
+
|
|
369
|
+
## What the compiler won't catch
|
|
370
|
+
|
|
371
|
+
Search for these by hand (or let the Forge step do it):
|
|
372
|
+
|
|
373
|
+
- `errorCode` compared with a dotted or camel-case string, and any test on error message text.
|
|
374
|
+
- A list result typed `any` (JavaScript files, `as any`, untyped hooks): `.length`, `.map`, `.filter`
|
|
375
|
+
on the result itself instead of on `.items`.
|
|
376
|
+
- React Query (or other) caches keyed on `offset` or `page`: key on the cursor.
|
|
377
|
+
- A list that used to return everything, read as if it still does (`const { items } = await x.list(…)`
|
|
378
|
+
with no `limit`, `cursor` or `all`). It compiles. The upgrade report marks each one.
|
|
379
|
+
- An options object passed to both the admin and the public form of a list.
|
|
380
|
+
- `window.SL` used directly in a v8 build.
|
|
381
|
+
|
|
382
|
+
## What hasn't changed
|
|
383
|
+
|
|
384
|
+
- **The old `attestation` namespace** (singular) is still there, still deprecated. Its data hasn't been
|
|
385
|
+
moved to the new `attestations` yet, so apps that write with it can't move yet. It goes in a later
|
|
386
|
+
release, once the data has moved.
|
|
387
|
+
- **Server functions.** `ctx.sl.*` inside an app's server function runs on the server, not through the
|
|
388
|
+
SDK, and keeps the shapes it has.
|
|
389
|
+
- **The standard query** (`proof.query`, `contact.query`, `products.standardQuery`, `app.records.query`)
|
|
390
|
+
already returned `{ items, nextCursor, count? }`.
|
|
391
|
+
- **Everything that isn't a list**: get, create, update, delete, actions.
|
|
392
|
+
|
|
393
|
+
## Every list that changed
|
|
394
|
+
|
|
395
|
+
<!-- upgrade-table:lists:start -->
|
|
396
|
+
150 functions. `ListResult<T>` is `{ items: T[], nextCursor, count? }`.
|
|
397
|
+
|
|
398
|
+
| Function | SDK 2 returned | SDK 3 returns | Options |
|
|
399
|
+
|---|---|---|---|
|
|
400
|
+
| `adminCards.list` | `{ cards, hidden, layout }` | `ListResult<AdminCard> & { hidden, layout }` | always whole |
|
|
401
|
+
| `ai.agent.listTools` | `AgentToolsResponse { tools }` | `ListResult<AgentToolDefinition>` | always whole |
|
|
402
|
+
| `ai.skills.list` | `SkillsListResponse { skills }` | `ListResult<SkillDescriptor>` | always whole |
|
|
403
|
+
| `analytics.admin.events` | `{ source, limit, offset, sort, count, rows }` | `ListResult<Record<string, any>> & { source, sort }` | no `offset`, `sort`; now `cursor`, `orderBy` |
|
|
404
|
+
| `app.cases.list` | `{ data, pagination: { total, limit, offset, hasMore } }` | `ListResult<AppCase>` | no `offset`, `sort`; now `cursor`, `orderBy` |
|
|
405
|
+
| `app.options.get` | `{ items, version, mode, total? } | { unchanged: true, version }` | `(ListResult<AppOption> & { version, mode }) | { unchanged: true, version }` | now `limit`, `cursor`; **one page now** |
|
|
406
|
+
| `app.records.list` | `{ data, pagination: { total, limit, offset, hasMore } }` | `ListResult<AppRecord>` | no `offset`, `sort`; now `cursor`, `orderBy` |
|
|
407
|
+
| `app.records.match` | `{ data, total, strategy }` | `ListResult<MatchEntry> & { strategy }` | now `cursor`, `limit` |
|
|
408
|
+
| `app.records.resolveAll` | `{ records, total, context, truncated }` | `ListResult<ResolveAllEntry> & { context, truncated }` | now `cursor`, `limit` |
|
|
409
|
+
| `app.threads.list` | `{ data, pagination: { total, limit, offset, hasMore } }` | `ListResult<AppThread>` | no `offset`, `sort`; now `cursor`, `orderBy` |
|
|
410
|
+
| `appConfiguration.getData` | `any[]` | `ListResult<any>` | now `limit`, `cursor`; **one page now** |
|
|
411
|
+
| `appConfiguration.getWidgets` | `{ apps }` | `ListResult<CollectionAppWidget>` | always whole |
|
|
412
|
+
| `asset.list` | `Asset[]` | `ListResult<Asset>` | no `offset`; now `cursor`, `limit`; **one page now** |
|
|
413
|
+
| `asset.listAdmin` | `AdminListAssetsResponse { data, total, limit, offset }` | `ListResult<Asset>` | no `offset`, `sort`, `order`; now `cursor`, `orderBy` |
|
|
414
|
+
| `asset.listForCollection` | `Asset[]` | `ListResult<Asset>` | now `limit`, `cursor`; **one page now** |
|
|
415
|
+
| `asset.listForProduct` | `Asset[]` | `ListResult<Asset>` | now `limit`, `cursor`; **one page now** |
|
|
416
|
+
| `asset.listForProof` | `Asset[]` | `ListResult<Asset>` | now `limit`, `cursor`; **one page now** |
|
|
417
|
+
| `attestation.list` | `AttestationResponse[]` | `ListResult<AttestationResponse>` | now `limit`, `cursor`; **one page now** |
|
|
418
|
+
| `attestations.list` | `{ attestations }` | `ListResult<Attestation>` | no `offset`, `recordedAfter`, `recordedBefore`; now `cursor`, `recordedAt` |
|
|
419
|
+
| `attestations.publicContainerList` | `{ attestations, audience }` | `ListResult<Attestation> & { audience }` | no `offset`, `recordedAfter`, `recordedBefore`; now `cursor`, `recordedAt` |
|
|
420
|
+
| `attestations.publicList` | `{ attestations, audience }` | `ListResult<Attestation> & { audience }` | no `offset`, `recordedAfter`, `recordedBefore`; now `cursor`, `recordedAt` |
|
|
421
|
+
| `authKit.list` | `AuthKitConfig[]` | `ListResult<AuthKitConfig>` | now `limit`, `cursor`; **one page now** |
|
|
422
|
+
| `authKit.listTrustedDevices` | `{ devices: TrustedDevice[] }` | `ListResult<TrustedDevice>` | now `limit`, `cursor`; **one page now** |
|
|
423
|
+
| `batch.getBatchTags` | `BatchTag[]` | `ListResult<BatchTag>` | now `limit`, `cursor`; **one page now** |
|
|
424
|
+
| `batch.list` | `BatchResponse[]` | `ListResult<BatchResponse>` | now `limit`, `cursor`; **one page now** |
|
|
425
|
+
| `batch.searchInCollection` | `BatchResponse[]` | `ListResult<BatchResponse>` | no `search`; now `q`, `cursor`, `limit` |
|
|
426
|
+
| `bookings.blocks.list` | `PaginatedResponse<BookingAllocation>` | `ListResult<BookingAllocation> (with count)` | no `offset`; now `cursor` |
|
|
427
|
+
| `bookings.list` | `PaginatedResponse<Booking> = { data, pagination: { total, limit, offset, hasMore } }` | `ListResult<Booking> (with count)` | no `offset`, `sort`; now `cursor`, `orderBy` |
|
|
428
|
+
| `bookings.mine` | `PaginatedResponse<Booking>` | `ListResult<Booking> (with count)` | no `offset`, `sort`; now `cursor`, `orderBy` |
|
|
429
|
+
| `bookings.slots.list` | `PaginatedResponse<BookingSlot>` | `ListResult<BookingSlot> (with count)` | no `offset`, `sort`; now `cursor`, `orderBy` |
|
|
430
|
+
| `broadcasts.list` | `BroadcastList = { items, limit, offset }` | `ListResult<BroadcastRecord>` | no `offset`; now `cursor` |
|
|
431
|
+
| `broadcasts.recipients` | `{ items, total, limit, offset, note? }` | `ListResult<Recipient> & { note?: string } (with count)` | no `offset`; now `cursor` |
|
|
432
|
+
| `claimSet.getAll` | `any[]` | `ListResult<any>` | now `limit`, `cursor`; **one page now** |
|
|
433
|
+
| `claimSet.getAssignedTags` | `any (the claim set with its tags in tags)` | `ListResult<any> & Record<string, any>` | now `limit`, `cursor`; **one page now** |
|
|
434
|
+
| `claimSet.ranges.list` | `ClaimSetRange[]` | `ListResult<ClaimSetRange>` | now `limit`, `cursor`; **one page now** |
|
|
435
|
+
| `claimSet.ranges.tags` | `ClaimSetRangeTagsPage { tags, next }` | `ListResult<ClaimSetRangeTag>` | no `from`; now `cursor` |
|
|
436
|
+
| `collection.getUsers` | `CollectionUser[]` | `ListResult<CollectionUser>` | now `limit`, `cursor`; **one page now** |
|
|
437
|
+
| `collection.list` | `CollectionResponse[]` | `ListResult<CollectionResponse>` | now `limit`, `cursor`; **one page now** |
|
|
438
|
+
| `comms.listMethods` | `{ ok: true, methods: CommMethod[] }` | `ListResult<CommMethod>` | always whole |
|
|
439
|
+
| `comms.queryByUser` | `CommunicationEvent[]` | `ListResult<CommunicationEvent>` | now `cursor`, `limit` |
|
|
440
|
+
| `comms.queryRecipientIds` | `RecipientId[]` | `ListResult<RecipientId>` | now `cursor`, `limit` |
|
|
441
|
+
| `conditions.list` | `SavedCondition[]` | `ListResult<SavedCondition>` | now `limit`, `cursor`; **one page now** |
|
|
442
|
+
| `config.getFields` | `FieldDefinition[]` | `ListResult<FieldDefinition>` | always whole |
|
|
443
|
+
| `config.getProofTypes` | `ProofTypeDefinition[]` | `ListResult<ProofTypeDefinition>` | always whole |
|
|
444
|
+
| `contact.findDuplicates` | `{ pairs, scanned, more }` | `ListResult<ContactDuplicatePair> & { scanned: number }` | no `offset`; now `cursor` |
|
|
445
|
+
| `contact.list` | `ContactListResponse = { items, limit, offset }` | `ListResult<Contact>` | no `offset`; now `cursor` |
|
|
446
|
+
| `contact.search` | `ContactSearchResponse = { items, limit, offset }` | `ListResult<Contact>` | no `offset`, `createdFrom`, `createdTo`; now `cursor`, `createdAt` |
|
|
447
|
+
| `containers.findForItem` | `{ items: ContainerItem[], containers: Container[] }` | `ListResult<ContainerItem> & { containers: Container[] }` | now `limit`, `cursor`; **one page now** |
|
|
448
|
+
| `containers.list` | `ListContainersResponse = { containers, limit, offset }` | `ListResult<Container>` | no `offset`; now `cursor` |
|
|
449
|
+
| `containers.listItems` | `ContainerItemsResponse = { items, limit, offset }` | `ListResult<ContainerItem>` | no `offset`; now `cursor` |
|
|
450
|
+
| `containers.publicList` | `PublicListContainersResponse = { containers }` | `ListResult<Container>` | no `offset`; now `cursor` |
|
|
451
|
+
| `containers.publicListItems` | `ContainerItemsResponse = { items, limit, offset }` | `ListResult<ContainerItem>` | no `limit`, `offset`; now `limit`, `cursor`; **one page now** |
|
|
452
|
+
| `crate.list` | `ListCratesResponse = { items, hasMore, lastId }` | `ListResult<Crate>` | no `startAfter`; now `cursor` |
|
|
453
|
+
| `dpp.groups` | `DppGroup[] (the function unwrapped { groups })` | `ListResult<DppGroup>` | always whole |
|
|
454
|
+
| `dpp.passports.list` | `DppPassport[] (unwrapped { passports })` | `ListResult<DppPassport>` | no `offset`; now `cursor` |
|
|
455
|
+
| `dpp.passports.versions` | `DppPassportVersion[] (unwrapped { versions })` | `ListResult<DppPassportVersion>` | now `limit`, `cursor`; **one page now** |
|
|
456
|
+
| `dpp.registry.list` | `DppRegistry[] (unwrapped { registries })` | `ListResult<DppRegistry>` | always whole |
|
|
457
|
+
| `dpp.tasks.list` | `DppTask[] (unwrapped { tasks })` | `ListResult<DppTask>` | now `limit`, `cursor`; **one page now** |
|
|
458
|
+
| `facets.list` | `FacetListResponse = { items }` | `ListResult<FacetDefinition>` | always whole |
|
|
459
|
+
| `facets.listValues` | `FacetValueListResponse = { facet, items }` | `ListResult<FacetValue> & { facet: FacetDefinition }` | now `limit`, `cursor`; **one page now** |
|
|
460
|
+
| `facets.namespaces` | `FacetNamespaceListResponse = { namespaces: string[] }` | `ListResult<string>` | always whole |
|
|
461
|
+
| `facets.publicList` | `FacetListResponse = { items }` | `ListResult<FacetDefinition>` | always whole |
|
|
462
|
+
| `facets.publicListValues` | `FacetValueListResponse = { facet, items }` | `ListResult<FacetValue> & { facet: FacetDefinition }` | now `limit`, `cursor`; **one page now** |
|
|
463
|
+
| `facets.publicNamespaces` | `FacetNamespaceListResponse = { namespaces: string[] }` | `ListResult<string>` | always whole |
|
|
464
|
+
| `facets.publicQuery` | `FacetQueryResponse = { items, buckets, meta? }` | `ListResult<{ facet, values }> & { buckets: FacetBucket[], meta? }` | no `query.search`, `query.createdAfter`, `query.createdBefore`, `query.updatedAfter`, `query.updatedBefore`; now `q`, `createdAt`, `updatedAt`; always whole |
|
|
465
|
+
| `facets.query` | `FacetQueryResponse = { items, buckets, meta? }` | `ListResult<{ facet, values }> & { buckets: FacetBucket[], meta? }` | no `query.search`, `query.createdAfter`, `query.createdBefore`, `query.updatedAfter`, `query.updatedBefore`; now `q`, `createdAt`, `updatedAt`; always whole |
|
|
466
|
+
| `files.list` | `{ ok: true, files: FileRecord[] }` | `ListResult<FileRecord>` | now `cursor`, `limit` |
|
|
467
|
+
| `form.list` | `any[]` | `ListResult<any>` | now `limit`, `cursor`; **one page now** |
|
|
468
|
+
| `integrations.listConnectorActions` | `{ actions }` | `ListResult<{ name, title, description?, visibility, input?, output? }>` | always whole |
|
|
469
|
+
| `integrations.listConnectors` | `{ connectors }` | `ListResult<InstalledConnector>` | always whole |
|
|
470
|
+
| `integrations.listEntityRuns` | `{ runs, nextCursor? }` | `ListResult<FlowRun>` | now `cursor`, `limit` |
|
|
471
|
+
| `integrations.listFailed` | `{ direction, items, nextCursor }` | `ListResult<FailedRecord> & { direction: FlowDirection }` | |
|
|
472
|
+
| `integrations.listFlows` | `{ flows }` | `ListResult<IntegrationFlow>` | now `limit`, `cursor`; **one page now** |
|
|
473
|
+
| `integrations.listRecordTypes` | `{ recordTypes }` | `ListResult<RecordTypeInfo>` | always whole |
|
|
474
|
+
| `integrations.listRunItems` | `{ items, nextCursor? }` | `ListResult<FlowRunItem>` | |
|
|
475
|
+
| `integrations.listRuns` | `{ runs, nextCursor? }` | `ListResult<FlowRun>` | |
|
|
476
|
+
| `interactions.list` | `{ items, limit, offset }` | `ListResult<InteractionTypeRecord>` | no `offset`; now `cursor` |
|
|
477
|
+
| `interactions.publicList` | `{ items, limit, offset }` | `ListResult<InteractionTypeRecord>` | no `offset`; now `cursor` |
|
|
478
|
+
| `interactions.publicMyInteractions` | `InteractionEventRow[]` | `ListResult<InteractionEventRow>` | now `cursor`, `limit` |
|
|
479
|
+
| `interactions.query` | `InteractionEventRow[]` | `ListResult<InteractionEventRow>` | no `order`, `include`; now `cursor`, `orderBy`, `expand`, `limit` |
|
|
480
|
+
| `jobs.list` | `{ items, limit, offset }` | `ListResult<Job>` | no `offset`; now `cursor` |
|
|
481
|
+
| `journeys.list` | `{ items, limit, offset }` | `ListResult<JourneyRecord>` | no `offset`; now `cursor` |
|
|
482
|
+
| `journeysAnalytics.recipients` | `string[]` | `ListResult<string>` | now `cursor`, `limit` |
|
|
483
|
+
| `knowledge.listSets` | `KnowledgeSet[]` | `ListResult<KnowledgeSet>` | now `limit`, `cursor`; **one page now** |
|
|
484
|
+
| `knowledge.listSources` | `KnowledgeSource[]` | `ListResult<KnowledgeSource>` | now `limit`, `cursor`; **one page now** |
|
|
485
|
+
| `knowledge.publicSearch` | `KnowledgeSearchResponse { query, results, mode }` | `ListResult<KnowledgeSearchResult> & Pick<KnowledgeSearchResponse, 'query' | 'mode'>` | no `query`, `k`; now `q`, `limit`, `cursor` |
|
|
486
|
+
| `knowledge.search` | `{ query, results, mode }` | `ListResult<KnowledgeSearchResult> & { query, mode }` | no `query`, `k`; now `q`, `limit`, `cursor` |
|
|
487
|
+
| `location.search` | `{ items, count }` | `ListResult<Location>` | no `sort`; now `cursor`, `orderBy`, `limit` |
|
|
488
|
+
| `lots.list` | `Lot[] (the SDK unwrapped { lots })` | `ListResult<Lot>` | no `search`; now `limit`, `cursor`, `q`; **one page now** |
|
|
489
|
+
| `lots.listProducts` | `{ products, total, page, limit }` | `ListResult<LotProductSummary>` | no `page`; now `cursor` |
|
|
490
|
+
| `lots.publicList` | `Lot[] (the SDK unwrapped { lots })` | `ListResult<Lot>` | no `search`; now `limit`, `cursor`, `q`; **one page now** |
|
|
491
|
+
| `lots.publicListProducts` | `{ products, total, page, limit }` | `ListResult<LotProductSummary>` | no `page`; now `cursor` |
|
|
492
|
+
| `loyalty.getMemberHistory` | `{ items, limit, offset }` | `ListResult<LoyaltyTransaction>` | no `offset`; now `cursor` |
|
|
493
|
+
| `loyalty.list` | `LoyaltyScheme[]` | `ListResult<LoyaltyScheme>` | now `limit`, `cursor`; **one page now** |
|
|
494
|
+
| `loyalty.listEarningRules` | `LoyaltyEarningRule[]` | `ListResult<LoyaltyEarningRule>` | now `limit`, `cursor`; **one page now** |
|
|
495
|
+
| `loyalty.listMembers` | `{ items, limit, offset }` | `ListResult<LoyaltyMember>` | no `offset`; now `cursor` |
|
|
496
|
+
| `loyalty.publicGetMe` | `LoyaltySchemeWithMembership[]` | `ListResult<LoyaltySchemeWithMembership>` | now `limit`, `cursor`; **one page now** |
|
|
497
|
+
| `loyalty.publicGetMineHistory` | `{ items, limit, offset }` | `ListResult<LoyaltyTransaction>` | no `offset`; now `cursor` |
|
|
498
|
+
| `loyalty.publicList` | `LoyaltyScheme[]` | `ListResult<LoyaltyScheme>` | now `limit`, `cursor`; **one page now** |
|
|
499
|
+
| `loyalty.publicListEarningRules` | `LoyaltyEarningRule[]` | `ListResult<LoyaltyEarningRule>` | now `limit`, `cursor`; **one page now** |
|
|
500
|
+
| `nfc.lookupTag` | `NfcTagInfo[]` | `ListResult<NfcTagInfo>` | always whole |
|
|
501
|
+
| `order.getItems` | `{ items, limit, offset }` | `ListResult<OrderItem>` | no `offset`; now `cursor` |
|
|
502
|
+
| `order.getLocationHistory` | `{ orderRef, orderId, locations, count }` | `ListResult<LocationScan> & { orderRef: string; orderId: string }` | now `cursor`, `limit` |
|
|
503
|
+
| `order.getTimeline` | `{ orderRef, orderId, timeline, count }` | `ListResult<TagScanEvent> & { orderRef: string; orderId: string }` | now `cursor`, `limit` |
|
|
504
|
+
| `order.list` | `{ orders, limit, offset }` | `ListResult<Order>` | no `offset`, `includeItems`; now `cursor`, `expand` |
|
|
505
|
+
| `order.query` | `{ orders, limit, offset }` | `ListResult<Order>` | no `offset`, `query.sortBy`, `query.sortOrder`, `query.createdAfter`, `query.createdBefore`, `query.updatedAfter`, `query.updatedBefore`, `includeItems`; now `cursor`, `orderBy`, `createdAt`, `updatedAt`, `expand` |
|
|
506
|
+
| `partner.claimSets` | `PartnerClaimSet[]` | `ListResult<PartnerClaimSet>` | now `limit`, `cursor`; **one page now** |
|
|
507
|
+
| `partner.list` | `Partner[]` | `ListResult<Partner>` | now `limit`, `cursor`; **one page now** |
|
|
508
|
+
| `partner.lookupTags` | `PartnerTagHit[]` | `ListResult<PartnerTagHit>` | always whole |
|
|
509
|
+
| `partner.tagAttempts` | `ClientErrorEvent[]` | `ListResult<ClientErrorEvent>` | now `limit`, `cursor` |
|
|
510
|
+
| `products.list` | `ProductResponse[]` | `ListResult<ProductResponse>` | now `limit`, `cursor`, `expand`; **one page now** |
|
|
511
|
+
| `products.listAssets` | `unknown` | `ListResult<AssetResponse>` | now `limit`, `cursor`; **one page now** |
|
|
512
|
+
| `products.query` | `{ items, page: { limit, offset, returned, total, hasMore, nextCursor }, meta }` | `ListResult<ProductResponse> & { meta?: ProductQueryMeta }` | no `page.limit`, `page.offset`, `page.cursor`, `query.search`, `sort`, `query.createdAfter`, `query.createdBefore`, `query.updatedAfter`, `query.updatedBefore`; now `limit`, `cursor`, `q`, `orderBy`, `createdAt`, `updatedAt`, `expand` |
|
|
513
|
+
| `proof.findByProduct` | `ProofResponse[]` | `ListResult<ProofResponse>` | no `lastCursor`, `page`, `perPage`, `includes`; now `limit`, `cursor`, `expand` |
|
|
514
|
+
| `proof.getByBatch` | `ProofResponse[]` | `ListResult<ProofResponse>` | now `limit`, `cursor`; **one page now** |
|
|
515
|
+
| `proof.getByProduct` | `ProofResponse[]` | `ListResult<ProofResponse>` | now `limit`, `cursor`; **one page now** |
|
|
516
|
+
| `proof.getByUser` | `ProofResponse[]` | `ListResult<ProofResponse>` | now `limit`, `cursor`; **one page now** |
|
|
517
|
+
| `proof.list` | `ProofResponse[]` | `ListResult<ProofResponse>` | no `include`; now `limit`, `cursor`, `expand`; **one page now** |
|
|
518
|
+
| `proof.listGrants` | `ProofGrant[]` | `ListResult<ProofGrant>` | now `limit`, `cursor`; **one page now** |
|
|
519
|
+
| `secrets.list` | `SecretList { secrets }` | `ListResult<SecretMeta>` | always whole |
|
|
520
|
+
| `secrets.listOwn` | `SecretList { secrets }` | `ListResult<SecretMeta>` | always whole |
|
|
521
|
+
| `segments.list` | `{ items, limit, offset }` | `ListResult<SegmentRecord>` | no `offset`; now `cursor` |
|
|
522
|
+
| `segments.recipients` | `{ items, limit, offset, total, note? }` | `ListResult<Recipient> & { note?: string }` | no `offset`; now `cursor` |
|
|
523
|
+
| `serviceAccounts.list` | `{ serviceAccounts, access }` | `ListResult<ServiceAccount> & { access: ServiceAccountAccess[] }` | now `limit`, `cursor`; **one page now** |
|
|
524
|
+
| `shop.admin.listOrders` | `{ items, total, limit, offset }` | `ListResult<ShopAdminOrder>` | no `offset`; now `cursor` |
|
|
525
|
+
| `shop.admin.listPrices` | `{ items, total, limit, offset }` | `ListResult<ShopPrice>` | no `offset`; now `cursor` |
|
|
526
|
+
| `shop.myOrders` | `{ items, total, limit, offset }` | `ListResult<ShopBuyerOrder>` | no `offset`; now `cursor` |
|
|
527
|
+
| `shop.products` | `{ currency, items }` | `ListResult<ShopProduct> & { currency: string }` | now `limit`, `cursor`; **one page now** |
|
|
528
|
+
| `subscriptions.admin.list` | `{ items, total, limit, offset }` | `ListResult<Membership>` | no `offset`; now `cursor` |
|
|
529
|
+
| `subscriptions.admin.listPlans` | `{ items, total, limit, offset }` | `ListResult<PlanWithPrices>` | no `offset`; now `cursor` |
|
|
530
|
+
| `subscriptions.mine` | `MySubscription[]` | `ListResult<MySubscription>` | now `limit`, `cursor`; **one page now** |
|
|
531
|
+
| `subscriptions.plans` | `PublicPlan[]` | `ListResult<PublicPlan>` | now `limit`, `cursor`; **one page now** |
|
|
532
|
+
| `tags.byRef` | `{ tags }` | `ListResult<Tag>` | now `limit`, `cursor`; **one page now** |
|
|
533
|
+
| `tags.list` | `{ tags, limit, offset }` | `ListResult<Tag>` | no `offset`; now `cursor` |
|
|
534
|
+
| `tags.lookupTags` | `{ count, tags, embedded }` | `ListResult<Tag> & { count: number; embedded: TagEmbedded }` | always whole |
|
|
535
|
+
| `tags.lookupTagsQuery` | `{ count, tags, embedded }` | `ListResult<Tag> & { count: number; embedded: TagEmbedded }` | always whole |
|
|
536
|
+
| `tags.publicByRef` | `{ tags, embedded }` | `ListResult<Tag> & { embedded: TagEmbedded }` | now `limit`, `cursor`; **one page now** |
|
|
537
|
+
| `tags.publicByRefPost` | `{ tags, embedded }` | `ListResult<Tag> & { embedded: TagEmbedded }` | now `limit`, `cursor`; **one page now** |
|
|
538
|
+
| `template.getAll` | `Template[]` | `ListResult<Template>` | now `limit`, `cursor`; **one page now** |
|
|
539
|
+
| `template.getAllowed` | `TemplatePublic[]` | `ListResult<TemplatePublic>` | now `limit`, `cursor`; **one page now** |
|
|
540
|
+
| `template.getAllowedGlobal` | `TemplatePublic[]` | `ListResult<TemplatePublic>` | now `limit`, `cursor`; **one page now** |
|
|
541
|
+
| `translations.list` | `{ items, total?, limit?, offset? }` | `ListResult<TranslationRecord>` | no `offset`; now `cursor` |
|
|
542
|
+
| `userAppData.list` | `any[]` | `ListResult<any>` | now `limit`, `cursor`; **one page now** |
|
|
543
|
+
| `userGroups.history` | `UserGroupChange[]` | `ListResult<UserGroupChange>` | now `cursor`, `limit` |
|
|
544
|
+
| `userGroups.list` | `UserGroup[]` | `ListResult<UserGroup>` | now `limit`, `cursor`; **one page now** |
|
|
545
|
+
| `userGroups.members` | `UserGroupMember[]` | `ListResult<UserGroupMember>` | now `limit`, `cursor`; **one page now** |
|
|
546
|
+
| `userGroups.ofUser` | `UserGroupRef[]` | `ListResult<UserGroupRef>` | now `limit`, `cursor`; **one page now** |
|
|
547
|
+
| `variant.list` | `VariantResponse[]` | `ListResult<VariantResponse>` | now `limit`, `cursor`; **one page now** |
|
|
548
|
+
| `wallet.list` | `{ ok: true, passes }` | `ListResult<WalletPass>` | now `limit`, `cursor`; **one page now** |
|
|
549
|
+
| `wallet.mine` | `{ ok: true, passes }` | `ListResult<WalletPassSummary>` | now `limit`, `cursor`; **one page now** |
|
|
550
|
+
<!-- upgrade-table:lists:end -->
|