@proveanything/smartlinks 3.0.0-alpha.1 → 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.
Files changed (272) hide show
  1. package/README.md +741 -741
  2. package/dist/README.md +573 -573
  3. package/dist/adminCardsView.js +55 -55
  4. package/dist/api/analytics.d.ts +5 -4
  5. package/dist/api/analytics.js +5 -4
  6. package/dist/api/appConfiguration.d.ts +23 -18
  7. package/dist/api/appConfiguration.js +24 -18
  8. package/dist/api/appObjects.d.ts +54 -10
  9. package/dist/api/appObjects.js +75 -40
  10. package/dist/api/asset.d.ts +28 -22
  11. package/dist/api/asset.js +45 -56
  12. package/dist/api/attestation.d.ts +11 -3
  13. package/dist/api/attestation.js +12 -3
  14. package/dist/api/attestations.d.ts +12 -8
  15. package/dist/api/attestations.js +18 -21
  16. package/dist/api/authKit.d.ts +15 -10
  17. package/dist/api/authKit.js +17 -11
  18. package/dist/api/batch.d.ts +36 -25
  19. package/dist/api/batch.js +46 -39
  20. package/dist/api/bookings.d.ts +67 -11
  21. package/dist/api/bookings.js +82 -15
  22. package/dist/api/broadcasts.js +3 -17
  23. package/dist/api/claimSet.d.ts +26 -12
  24. package/dist/api/claimSet.js +32 -24
  25. package/dist/api/collection.d.ts +15 -10
  26. package/dist/api/collection.js +17 -11
  27. package/dist/api/comms.d.ts +12 -6
  28. package/dist/api/comms.js +12 -6
  29. package/dist/api/conditions.d.ts +7 -6
  30. package/dist/api/conditions.js +8 -6
  31. package/dist/api/contact.d.ts +6 -2
  32. package/dist/api/contact.js +25 -60
  33. package/dist/api/containers.d.ts +14 -10
  34. package/dist/api/containers.js +19 -14
  35. package/dist/api/crate.js +7 -9
  36. package/dist/api/dpp.d.ts +20 -13
  37. package/dist/api/dpp.js +23 -15
  38. package/dist/api/facets.d.ts +38 -13
  39. package/dist/api/facets.js +40 -15
  40. package/dist/api/files.d.ts +5 -2
  41. package/dist/api/files.js +7 -4
  42. package/dist/api/form.d.ts +8 -5
  43. package/dist/api/form.js +9 -5
  44. package/dist/api/index.d.ts +1 -1
  45. package/dist/api/index.js +1 -1
  46. package/dist/api/integrations.d.ts +29 -17
  47. package/dist/api/integrations.js +32 -25
  48. package/dist/api/interactions.d.ts +11 -6
  49. package/dist/api/interactions.js +14 -23
  50. package/dist/api/jobs.d.ts +16 -6
  51. package/dist/api/jobs.js +30 -20
  52. package/dist/api/journeys.js +2 -14
  53. package/dist/api/journeysAnalytics.d.ts +8 -5
  54. package/dist/api/journeysAnalytics.js +8 -5
  55. package/dist/api/knowledge.d.ts +20 -14
  56. package/dist/api/knowledge.js +22 -15
  57. package/dist/api/location.d.ts +6 -3
  58. package/dist/api/location.js +8 -22
  59. package/dist/api/lots.d.ts +9 -5
  60. package/dist/api/lots.js +22 -26
  61. package/dist/api/loyalty.d.ts +25 -16
  62. package/dist/api/loyalty.js +33 -32
  63. package/dist/api/nfc.d.ts +3 -1
  64. package/dist/api/nfc.js +3 -1
  65. package/dist/api/order.d.ts +45 -39
  66. package/dist/api/order.js +48 -65
  67. package/dist/api/partner.d.ts +17 -14
  68. package/dist/api/partner.js +21 -22
  69. package/dist/api/payments.d.ts +60 -0
  70. package/dist/api/payments.js +94 -0
  71. package/dist/api/products.d.ts +35 -12
  72. package/dist/api/products.js +36 -13
  73. package/dist/api/proof.d.ts +41 -19
  74. package/dist/api/proof.js +44 -23
  75. package/dist/api/realtime.d.ts +3 -0
  76. package/dist/api/realtime.js +10 -2
  77. package/dist/api/segments.js +3 -15
  78. package/dist/api/serviceAccounts.d.ts +8 -5
  79. package/dist/api/serviceAccounts.js +9 -6
  80. package/dist/api/shop.d.ts +7 -5
  81. package/dist/api/shop.js +13 -19
  82. package/dist/api/subscriptions.d.ts +12 -10
  83. package/dist/api/subscriptions.js +17 -25
  84. package/dist/api/tags.d.ts +23 -20
  85. package/dist/api/tags.js +40 -52
  86. package/dist/api/template.d.ts +16 -11
  87. package/dist/api/template.js +19 -13
  88. package/dist/api/translations.js +2 -12
  89. package/dist/api/userGroups.d.ts +26 -16
  90. package/dist/api/userGroups.js +43 -30
  91. package/dist/api/variant.d.ts +10 -7
  92. package/dist/api/variant.js +11 -7
  93. package/dist/api/wallet.d.ts +14 -11
  94. package/dist/api/wallet.js +15 -12
  95. package/dist/baseline.css +194 -194
  96. package/dist/dataChanged.d.ts +74 -0
  97. package/dist/dataChanged.js +162 -0
  98. package/dist/docs/API_SUMMARY.md +1443 -1409
  99. package/dist/docs/admin-cards.md +189 -189
  100. package/dist/docs/agent-tools.md +156 -156
  101. package/dist/docs/ai-tools-and-skills.md +180 -180
  102. package/dist/docs/ai.md +1721 -1721
  103. package/dist/docs/analytics.md +1 -1
  104. package/dist/docs/api-versions.md +85 -85
  105. package/dist/docs/app-data-storage.md +277 -277
  106. package/dist/docs/app-docs.md +73 -73
  107. package/dist/docs/app-manifest.md +852 -852
  108. package/dist/docs/app-objects.md +4 -4
  109. package/dist/docs/app-records-pattern.md +388 -388
  110. package/dist/docs/appConfig.md +550 -550
  111. package/dist/docs/assistant-apps.md +172 -172
  112. package/dist/docs/assistant-context.md +119 -119
  113. package/dist/docs/attestations.md +8 -8
  114. package/dist/docs/bookings.md +105 -8
  115. package/dist/docs/caching.md +32 -3
  116. package/dist/docs/comms.md +689 -689
  117. package/dist/docs/connectors.md +340 -340
  118. package/dist/docs/contact-search.md +2 -3
  119. package/dist/docs/css-baseline.md +133 -133
  120. package/dist/docs/customer-guide.md +70 -70
  121. package/dist/docs/data-changed.md +91 -0
  122. package/dist/docs/deploying-apps.md +340 -340
  123. package/dist/docs/dpp.md +115 -115
  124. package/dist/docs/entitlements.md +90 -90
  125. package/dist/docs/files.md +69 -69
  126. package/dist/docs/host-dependency-contract.md +252 -252
  127. package/dist/docs/iframe-responder.md +11 -0
  128. package/dist/docs/integrations.md +322 -322
  129. package/dist/docs/interactions.md +544 -544
  130. package/dist/docs/item-context.md +181 -181
  131. package/dist/docs/knowledge.md +105 -105
  132. package/dist/docs/lists.md +157 -114
  133. package/dist/docs/lots.md +112 -112
  134. package/dist/docs/loyalty.md +348 -348
  135. package/dist/docs/members.md +183 -183
  136. package/dist/docs/memberships.md +150 -150
  137. package/dist/docs/mobile-admin-container.md +693 -693
  138. package/dist/docs/operations.md +281 -281
  139. package/dist/docs/overview.md +487 -485
  140. package/dist/docs/payments.md +94 -0
  141. package/dist/docs/proof-comms-triggers.md +142 -142
  142. package/dist/docs/proof-ownership-transfer.md +155 -155
  143. package/dist/docs/proof-product-data-scoping.md +462 -462
  144. package/dist/docs/proof-share-grants.md +305 -305
  145. package/dist/docs/realtime.md +149 -139
  146. package/dist/docs/records-admin-pattern.md +304 -304
  147. package/dist/docs/service-accounts.md +64 -64
  148. package/dist/docs/standard-query.md +196 -187
  149. package/dist/docs/tag-codes.md +97 -97
  150. package/dist/docs/tag-ranges.md +106 -106
  151. package/dist/docs/theme-tokens.md +252 -252
  152. package/dist/docs/upgrading-to-3.md +550 -430
  153. package/dist/docs/wallet-passes.md +107 -107
  154. package/dist/docs/websites.md +123 -123
  155. package/dist/http.d.ts +6 -3
  156. package/dist/http.js +48 -19
  157. package/dist/iframeResponder.d.ts +7 -0
  158. package/dist/iframeResponder.js +10 -0
  159. package/dist/index.d.ts +2 -0
  160. package/dist/index.js +2 -0
  161. package/dist/list.d.ts +12 -0
  162. package/dist/list.js +59 -0
  163. package/dist/openapi.yaml +722 -660
  164. package/dist/testing/bookingsMemory.d.ts +29 -1
  165. package/dist/testing/bookingsMemory.js +89 -1
  166. package/dist/testing/index.js +4 -1
  167. package/dist/theme-boot.js +82 -82
  168. package/dist/theme.css +75 -75
  169. package/dist/types/analytics.d.ts +7 -3
  170. package/dist/types/appManifest.d.ts +26 -4
  171. package/dist/types/appObjects.d.ts +27 -12
  172. package/dist/types/appOptions.d.ts +2 -2
  173. package/dist/types/asset.d.ts +5 -6
  174. package/dist/types/attestations.d.ts +7 -9
  175. package/dist/types/batch.d.ts +5 -5
  176. package/dist/types/bookings.d.ts +109 -6
  177. package/dist/types/comms.d.ts +9 -5
  178. package/dist/types/contact.d.ts +7 -4
  179. package/dist/types/containers.d.ts +2 -1
  180. package/dist/types/facets.d.ts +14 -2
  181. package/dist/types/files.d.ts +3 -2
  182. package/dist/types/index.d.ts +1 -0
  183. package/dist/types/index.js +1 -0
  184. package/dist/types/integrations.d.ts +2 -1
  185. package/dist/types/interaction.d.ts +15 -7
  186. package/dist/types/jobs.d.ts +1 -1
  187. package/dist/types/journeysAnalytics.d.ts +3 -2
  188. package/dist/types/knowledge.d.ts +6 -3
  189. package/dist/types/knowledge.js +0 -1
  190. package/dist/types/list.d.ts +30 -2
  191. package/dist/types/location.d.ts +7 -2
  192. package/dist/types/location.js +0 -1
  193. package/dist/types/lots.d.ts +5 -2
  194. package/dist/types/lots.js +0 -6
  195. package/dist/types/order.d.ts +22 -20
  196. package/dist/types/payments.d.ts +101 -0
  197. package/dist/types/payments.js +5 -0
  198. package/dist/types/product.d.ts +28 -11
  199. package/dist/types/proof.d.ts +7 -8
  200. package/dist/types/realtime.d.ts +5 -1
  201. package/dist/types/tags.d.ts +5 -3
  202. package/dist/types/userGroups.d.ts +3 -3
  203. package/dist/types/userGroups.js +0 -4
  204. package/dist/version.d.ts +1 -1
  205. package/dist/version.js +1 -1
  206. package/docs/API_SUMMARY.md +1443 -1409
  207. package/docs/admin-cards.md +189 -189
  208. package/docs/agent-tools.md +156 -156
  209. package/docs/ai-tools-and-skills.md +180 -180
  210. package/docs/ai.md +1721 -1721
  211. package/docs/analytics.md +1 -1
  212. package/docs/api-versions.md +85 -85
  213. package/docs/app-data-storage.md +277 -277
  214. package/docs/app-docs.md +73 -73
  215. package/docs/app-manifest.md +852 -852
  216. package/docs/app-objects.md +4 -4
  217. package/docs/app-records-pattern.md +388 -388
  218. package/docs/appConfig.md +550 -550
  219. package/docs/assistant-apps.md +172 -172
  220. package/docs/assistant-context.md +119 -119
  221. package/docs/attestations.md +8 -8
  222. package/docs/bookings.md +105 -8
  223. package/docs/caching.md +32 -3
  224. package/docs/comms.md +689 -689
  225. package/docs/connectors.md +340 -340
  226. package/docs/contact-search.md +2 -3
  227. package/docs/css-baseline.md +133 -133
  228. package/docs/customer-guide.md +70 -70
  229. package/docs/data-changed.md +91 -0
  230. package/docs/deploying-apps.md +340 -340
  231. package/docs/dpp.md +115 -115
  232. package/docs/entitlements.md +90 -90
  233. package/docs/files.md +69 -69
  234. package/docs/host-dependency-contract.md +252 -252
  235. package/docs/iframe-responder.md +11 -0
  236. package/docs/integrations.md +322 -322
  237. package/docs/interactions.md +544 -544
  238. package/docs/item-context.md +181 -181
  239. package/docs/knowledge.md +105 -105
  240. package/docs/lists.md +157 -114
  241. package/docs/lots.md +112 -112
  242. package/docs/loyalty.md +348 -348
  243. package/docs/members.md +183 -183
  244. package/docs/memberships.md +150 -150
  245. package/docs/mobile-admin-container.md +693 -693
  246. package/docs/operations.md +281 -281
  247. package/docs/overview.md +487 -485
  248. package/docs/payments.md +94 -0
  249. package/docs/proof-comms-triggers.md +142 -142
  250. package/docs/proof-ownership-transfer.md +155 -155
  251. package/docs/proof-product-data-scoping.md +462 -462
  252. package/docs/proof-share-grants.md +305 -305
  253. package/docs/realtime.md +149 -139
  254. package/docs/service-accounts.md +64 -64
  255. package/docs/standard-query.md +196 -187
  256. package/docs/tag-codes.md +97 -97
  257. package/docs/tag-ranges.md +106 -106
  258. package/docs/theme-lookbook.v1.json +120 -120
  259. package/docs/theme-tokens.md +252 -252
  260. package/docs/upgrading-to-3.md +550 -430
  261. package/docs/wallet-passes.md +107 -107
  262. package/docs/websites.md +123 -123
  263. package/openapi.yaml +722 -660
  264. package/package.json +91 -91
  265. package/scripts/headless-check.mjs +87 -87
  266. package/scripts/lib/bare-imports.mjs +57 -57
  267. package/scripts/lib/keyed-app-data.mjs +21 -21
  268. package/scripts/lib/upgrade.mjs +708 -512
  269. package/scripts/publish.mjs +272 -272
  270. package/scripts/register-release.mjs +91 -91
  271. package/scripts/upgrade.mjs +79 -56
  272. package/upgrade/3.json +2731 -2213
@@ -1,430 +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
- 1. 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.
30
- 2. Run `npx smartlinks-upgrade`. It shows what it can change by itself and lists every other place that
31
- needs changing, with file and line. `npx smartlinks-upgrade --write` makes the mechanical changes.
32
- 3. Work through its list with the sections below.
33
- 4. Type-check. What's left is a compile error: a removed name, a list used as an array, an option that
34
- no longer exists.
35
- 5. Search for the things neither can see (see [What the compiler won't catch](#what-the-compiler-wont-catch)).
36
- 6. Build, run `npx smartlinks-doctor`, and try each screen that lists something.
37
-
38
- Apps built in Forge move with the **Move to SDK 3** upgrade step, which follows these steps.
39
-
40
- ### What `smartlinks-upgrade` does
41
-
42
- It reads `upgrade/3.json` and your source, and finds SDK calls by what a name is bound to, not by how
43
- it's spelled: `product.get(…)` only counts where `product` is the SDK's (an import, `SL.product`, or a
44
- name taken from one of those). A variable of your own called `product` is never touched.
45
-
46
- | It changes (with `--write`) | It lists for you |
47
- |---|---|
48
- | Calls that only changed name: `product.get` → `products.get`, with the import | Every call to a list whose result changed, and whether it passes `offset` or `page` |
49
- | Renamed types, with their imports | Every removed call, with what replaces it |
50
- | The argument that went from `collection.list` and `authKit.list` | Options that went |
51
- | `sharedDependencies` in the manifest, to `v8` | Error codes compared with a dotted or camel-case string |
52
- | | Old `attestation` writes, to leave alone |
53
-
54
- Where the new name is already a variable in a file (`const products = await product.list(…)` is
55
- common), it imports the SDK's under another name: `products as productsApi`. Running it twice changes
56
- nothing the second time. It never installs, builds, commits or releases.
57
-
58
- ## Lists
59
-
60
- Every function that lists returns a `ListResult<T>`:
61
-
62
- ```typescript
63
- // SDK 2: each list had its own shape
64
- const tagList = await tags.list(collectionId) // { tags, limit, offset }
65
- const { orders } = await order.list(collectionId, { offset: 50 }) // { orders, limit, offset }
66
- const all = await products.list(collectionId) // [...]
67
- const page = await app.records.list(collectionId, appId) // { data, pagination: { total, hasMore, … } }
68
-
69
- // SDK 3: one shape
70
- const { items } = await tags.list(collectionId)
71
- const { items, nextCursor } = await order.list(collectionId, { limit: 50 })
72
- const { items } = await products.list(collectionId)
73
- const { items, count } = await app.records.list(collectionId, appId)
74
- ```
75
-
76
- What to change at each call:
77
-
78
- | SDK 2 | SDK 3 |
79
- |---|---|
80
- | The list itself (`const xs = await x.list()`), or under its own name (`.tags`, `.orders`, `.data`, `.results`, …) | `.items` |
81
- | `total`, `pagination.total`, `page.total` | `count` (the total; absent where the server doesn't know it) |
82
- | `hasMore`, `pagination.hasMore`, `more` | `nextCursor !== null` |
83
- | `offset`, `page`, `startAfter`, `lastId`, `from` used as a place to carry on | `cursor`: pass the last page's `nextCursor` |
84
- | `pageSize`, `perPage` | `limit` |
85
- | `limit` and `offset` echoed back in the answer | gone: you already know what you asked for |
86
- | Other fields beside the list (`meta`, `mode`, `scanned`, …) | still there, beside `items` |
87
-
88
- Paging by offset is gone, so "jump to page 7" is gone with it. Page forward with the cursor; for a
89
- numbered pager, use the [standard query](standard-query.md), which counts and sorts.
90
-
91
- To fetch everything, don't loop by hand:
92
-
93
- ```typescript
94
- import { all, each, tags } from '@proveanything/smartlinks'
95
-
96
- const everyTag = await all((cursor) => tags.list(collectionId, { cursor }))
97
- for await (const t of each((cursor) => tags.list(collectionId, { cursor }))) { /* … */ }
98
- ```
99
-
100
- A list that was never paged still isn't: it returns everything in `items` with `nextCursor: null`, and
101
- its function takes no `limit` or `cursor`. More in [Lists](lists.md).
102
-
103
- **A common pattern to fix while you're here:** fetching a whole list and filtering or counting it in the
104
- browser. That worked on small collections and falls over on large ones. Ask the server instead, with the
105
- [standard query](standard-query.md).
106
-
107
- ## Renamed and removed
108
-
109
- Everything marked `@deprecated` in SDK 2 is removed, except the old `attestation` namespace (see
110
- [What hasn't changed](#what-hasnt-changed)).
111
-
112
- <!-- upgrade-table:names:start -->
113
- **Renamed** (the same call under a new name):
114
-
115
- | SDK 2 | SDK 3 | Note |
116
- |---|---|---|
117
- | `ContactSchema` | `ContactSchemaResponse` | |
118
- | `MobileAdminBundleManifest` | `AdminMobileBundleManifest` | |
119
- | `MobileAdminComponentManifest` | `AdminMobileComponentManifest` | |
120
- | `product.clone` | `products.clone` | |
121
- | `product.create` | `products.create` | |
122
- | `product.createClaimWindow` | `products.createClaimWindow` | |
123
- | `product.get` | `products.get` | The whole `product` namespace (singular) is gone: use `products`. |
124
- | `product.getSN` | `products.getSN` | |
125
- | `product.list` | `products.list` | Then treat it as a list: `products.list` returns ListResult<ProductResponse>. |
126
- | `product.listAssets` | `products.listAssets` | Then treat it as a list: `products.listAssets` returns ListResult<AssetResponse>. |
127
- | `product.lookupSN` | `products.lookupSN` | |
128
- | `product.publicCreateClaim` | `products.publicCreateClaim` | |
129
- | `product.publicLookupClaim` | `products.publicLookupClaim` | |
130
- | `product.refresh` | `products.refresh` | |
131
- | `product.remove` | `products.remove` | |
132
- | `product.update` | `products.update` | |
133
- | `product.updateClaimWindow` | `products.updateClaimWindow` | |
134
- | `ScannerEventSubscriber` | `AdminMobileEventCallback` | |
135
-
136
- **Removed** (no like-for-like call):
137
-
138
- | SDK 2 | Do this instead |
139
- |---|---|
140
- | `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 }] })`. |
141
- | `Asset.thumbnails` | Use `Asset.thumbnail`. One thumbnail address (`string \| null`), not a map of sizes. |
142
- | `asset.uploadAsset` | Use `asset.upload`. Takes one options object: `asset.upload({ file, scope, … })` (type UploadAssetOptions). |
143
- | `BatchCreateRequest.id` | The server generates the batch id. Don't send one. |
144
- | `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`. |
145
- | `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. |
146
- | `CommsRecipientsWithActionQuery` | Use `CommsRecipientsWithInteractionQuery`. `actionId` is `interactionId`. |
147
- | `CommsRecipientsWithoutActionQuery` | Use `CommsRecipientsWithoutInteractionQuery`. `actionId` is `interactionId`. |
148
- | `evaluateCondition` | Use `evaluateConditions`. Takes the field's whole condition list: `evaluateConditions(property.conditions, property.showWhen, values)`. |
149
- | `FirebaseTimestamp` | Dates are ISO 8601 strings or a Date: `BatchCreateRequest.expiryDate` and `BatchUpdateRequest.expiryDate` are `string \| Date`. |
150
- | `order.findByProduct` | Use `order.query`. The API never had this address, so the call could only fail. Use `order.query(collectionId, { query: { productId } })`. |
151
- | `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. |
152
- | `order.findOrdersByProduct` | Use `order.query`. The API never had this address, so the call could only fail. Use `order.query(collectionId, { query: { productId } })`. |
153
- | `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`. |
154
- | `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 }] } })`. |
155
- | `product.find` | Use `products.query`. A different body (type ProductQueryRequest). Returns a list and pages with `limit` + `cursor`. |
156
- | `product.publicFind` | Use `products.get` when you know the id, `products.query` to search. The server retired this route some time ago. |
157
- | `realtime.getAdminToken` | Use `realtime.onMine`. The SDK gets its own tokens. Subscribe with `realtime.onMine(scope, onMessage)`. |
158
- | `realtime.getPublicToken` | The SDK gets its own tokens. Subscribe with `realtime.channel(scope, name)` or `realtime.onChange(scope, filter, onChange)`. |
159
- | `site.ready` | Sites are server-rendered and nothing waits for the signal. Delete the call. |
160
- | `VariantCreateRequest.id` | The server generates the variant id. Don't send one. |
161
-
162
- <!-- upgrade-table:names:end -->
163
-
164
- ## Options that went
165
-
166
- These options were accepted by SDK 2 and did nothing, or only worked for an admin. SDK 3's types no
167
- longer have them.
168
-
169
- <!-- upgrade-table:options:start -->
170
- | Function | Option | Why, and what to do |
171
- |---|---|---|
172
- | `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`. |
173
- | `authKit.list` | `admin (the argument)` | There is no public list of AuthKit configs, so the call without `true` always failed. Call `authKit.list(collectionId)`. |
174
- | `bookings.mine` | `contactId` | `mine` is always the caller's own bookings. To list a contact's bookings as an admin use `bookings.list`. |
175
- | `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. |
176
- | `comms.queryRecipientIds` | `journeyStepId` | The server never read it. For one journey step's recipients use `journeysAnalytics.recipients`. |
177
- | `containers.publicList` | `status` | The public list is always the active containers. |
178
- | `containers.publicList` | `ref` | The public list never filtered by ref. |
179
- | `facets.list` | `includeValues` | The list never read it: a facet list has no values. Read one facet with `facets.get(…, { includeValues: true })`, or its values with `facets.listValues`. |
180
- | `facets.publicList` | `includeValues` | The list never read it. Read a facet's values with `facets.publicListValues`. |
181
- | `interactions.publicMyInteractions` | `scope` | The server never read it. |
182
- | `lots.publicList` | `includeDeleted` | Admin only: use `lots.list`. |
183
- <!-- upgrade-table:options:end -->
184
-
185
- ## Errors
186
-
187
- Every error from the API is now `{ error: { code, message, details, requestId } }`. The SDK still throws
188
- `SmartlinksApiError`, so `try`/`catch` code keeps its structure. What changes is what's inside:
189
-
190
- ```typescript
191
- try {
192
- await products.get(collectionId, productId)
193
- } catch (e) {
194
- if (e instanceof SmartlinksApiError) {
195
- e.statusCode // 404
196
- e.errorCode // 'NOT_FOUND' ← check this in code
197
- e.message // for people; may change
198
- e.details // extra facts, e.g. { unknown: ['serach'], allowed: [...] }
199
- e.requestId // quote this when reporting a problem
200
- }
201
- }
202
- ```
203
-
204
- - **Codes are all `UPPER_SNAKE`.** A code that was dotted or camel-case in SDK 2 changes spelling:
205
- `segments.list.failed` is `SEGMENTS_LIST_FAILED`. Search your app for string comparisons against
206
- `errorCode`, `details.errorCode` and `details.error`.
207
- - **Two statuses are corrected.** "Not signed in" used to arrive from some routes as `400`; it is `401`.
208
- "Signed in but not allowed" used to arrive from some routes as `401`; it is `403`. `isAuthError()`
209
- covers both.
210
- - **Don't match on message text.** Messages are for people and are being rewritten. Use `errorCode`.
211
- - **An address that doesn't exist** answers `404 ROUTE_NOT_FOUND` with what was wrong and the nearest
212
- real addresses.
213
- - **A `429`** carries `Retry-After` when the server knows when to try again.
214
-
215
- Not changed: answers from an app's own server functions, and the OpenAI-compatible AI routes, which keep
216
- their own error shapes.
217
-
218
- ## A list refuses options it doesn't read
219
-
220
- In SDK 2 a mistyped or unsupported query option was silently ignored. Now a list answers
221
- `400 UNKNOWN_PARAMETER`, naming the options it does read. Two things this catches in existing apps:
222
-
223
- - one options object shared between an admin call and a public call, carrying an admin-only option
224
- (`includeDeleted`, `status` on public app records, `contactId`, `assignedTo`);
225
- - an option that never existed on that list.
226
-
227
- Pass each list only the options its type has. The types now say which are admin-only.
228
-
229
- ## API version
230
-
231
- `initializeApi({ apiVersion })` can ask for a **newer** version than the SDK was built for. An older one
232
- is ignored: SDK 3's functions return `2027-01` shapes. To stay on `2026-11`, stay on SDK 2.
233
-
234
- ## Apps that run inside the Portal or Hub
235
-
236
- A component doesn't bundle the SDK: it uses the host's copy. So that SDK 2 apps and SDK 3 apps can run
237
- side by side, the shared-dependency contract goes to **v8** with SDK 3
238
- ([host-dependency-contract.md](host-dependency-contract.md)):
239
-
240
- - Build with `SHARED_DEPENDENCY_SPECIFIERS` from SDK 3 as your externals, as before. Your manifest then
241
- says `sharedDependencies: "v8"` and the host gives you SDK 3.
242
- - An older build of your app, and other apps still on SDK 2, keep getting SDK 2. Nothing changes for them.
243
- - The `SL` prop the host hands your component is SDK 3 too. If you read the SDK from the window
244
- global rather than an import, it is `window.SL3` (`window.SL` stays SDK 2).
245
- - Keep building both formats (`moduleFormat: "dual"`). For now the host loads the UMD build of an app
246
- on SDK 3.
247
- - The sign-in UI (`@proveanything/smartlinks-auth-ui`) is the host's one copy, as before.
248
- - `@proveanything/smartlinks-utils-ui` is bundled into your app and calls the SDK itself, so it must be
249
- a version that works on SDK 3.
250
-
251
- ## What the compiler won't catch
252
-
253
- Search for these by hand (or let the Forge step do it):
254
-
255
- - `errorCode` compared with a dotted or camel-case string, and any test on error message text.
256
- - A list result typed `any` (JavaScript files, `as any`, untyped hooks): `.length`, `.map`, `.filter`
257
- on the result itself instead of on `.items`.
258
- - React Query (or other) caches keyed on `offset` or `page`: key on the cursor.
259
- - An options object passed to both the admin and the public form of a list.
260
- - `window.SL` used directly in a v8 build.
261
-
262
- ## What hasn't changed
263
-
264
- - **The old `attestation` namespace** (singular) is still there, still deprecated. Its data hasn't been
265
- moved to the new `attestations` yet, so apps that write with it can't move yet. It goes in a later
266
- release, once the data has moved.
267
- - **Server functions.** `ctx.sl.*` inside an app's server function runs on the server, not through the
268
- SDK, and keeps the shapes it has.
269
- - **The standard query** (`proof.query`, `contact.query`, `products.standardQuery`, `app.records.query`)
270
- already returned `{ items, nextCursor, count? }`.
271
- - **Everything that isn't a list**: get, create, update, delete, actions.
272
-
273
- ## Every list that changed
274
-
275
- <!-- upgrade-table:lists:start -->
276
- 150 functions. `ListResult<T>` is `{ items: T[], nextCursor, count? }`.
277
-
278
- | Function | SDK 2 returned | SDK 3 returns | Options |
279
- |---|---|---|---|
280
- | `adminCards.list` | `{ cards, hidden, layout }` | `ListResult<AdminCard> & { hidden, layout }` | |
281
- | `ai.agent.listTools` | `AgentToolsResponse { tools }` | `ListResult<AgentToolDefinition>` | |
282
- | `ai.skills.list` | `SkillsListResponse { skills }` | `ListResult<SkillDescriptor>` | |
283
- | `analytics.admin.events` | `{ source, limit, offset, sort, count, rows }` | `ListResult<Record<string, any>> & { source, sort }` | no `offset`; now `cursor` |
284
- | `app.cases.list` | `{ data, pagination: { total, limit, offset, hasMore } }` | `ListResult<AppCase>` | no `offset`; now `cursor` |
285
- | `app.options.get` | `{ items, version, mode, total? } | { unchanged: true, version }` | `(ListResult<AppOption> & { version, mode }) | { unchanged: true, version }` | |
286
- | `app.records.list` | `{ data, pagination: { total, limit, offset, hasMore } }` | `ListResult<AppRecord>` | no `offset`; now `cursor` |
287
- | `app.records.match` | `{ data, total, strategy }` | `ListResult<MatchEntry> & { strategy }` | |
288
- | `app.records.resolveAll` | `{ records, total, context, truncated }` | `ListResult<ResolveAllEntry> & { context, truncated }` | |
289
- | `app.threads.list` | `{ data, pagination: { total, limit, offset, hasMore } }` | `ListResult<AppThread>` | no `offset`; now `cursor` |
290
- | `appConfiguration.getData` | `any[]` | `ListResult<any>` | |
291
- | `appConfiguration.getWidgets` | `{ apps }` | `ListResult<CollectionAppWidget>` | |
292
- | `asset.list` | `Asset[]` | `ListResult<Asset>` | no `offset` |
293
- | `asset.listAdmin` | `AdminListAssetsResponse { data, total, limit, offset }` | `ListResult<Asset>` | no `offset`; now `cursor` |
294
- | `asset.listForCollection` | `Asset[]` | `ListResult<Asset>` | |
295
- | `asset.listForProduct` | `Asset[]` | `ListResult<Asset>` | |
296
- | `asset.listForProof` | `Asset[]` | `ListResult<Asset>` | |
297
- | `attestation.list` | `AttestationResponse[]` | `ListResult<AttestationResponse>` | |
298
- | `attestations.list` | `{ attestations }` | `ListResult<Attestation>` | no `offset`; now `cursor` |
299
- | `attestations.publicContainerList` | `{ attestations, audience }` | `ListResult<Attestation> & { audience }` | no `offset`; now `cursor` |
300
- | `attestations.publicList` | `{ attestations, audience }` | `ListResult<Attestation> & { audience }` | no `offset`; now `cursor` |
301
- | `authKit.list` | `AuthKitConfig[]` | `ListResult<AuthKitConfig>` | |
302
- | `authKit.listTrustedDevices` | `{ devices: TrustedDevice[] }` | `ListResult<TrustedDevice>` | |
303
- | `batch.getBatchTags` | `BatchTag[]` | `ListResult<BatchTag>` | |
304
- | `batch.list` | `BatchResponse[]` | `ListResult<BatchResponse>` | |
305
- | `batch.searchInCollection` | `BatchResponse[]` | `ListResult<BatchResponse>` | |
306
- | `bookings.blocks.list` | `PaginatedResponse<BookingAllocation>` | `ListResult<BookingAllocation> (with count)` | no `offset`; now `cursor` |
307
- | `bookings.list` | `PaginatedResponse<Booking> = { data, pagination: { total, limit, offset, hasMore } }` | `ListResult<Booking> (with count)` | no `offset`; now `cursor` |
308
- | `bookings.mine` | `PaginatedResponse<Booking>` | `ListResult<Booking> (with count)` | no `offset`; now `cursor` |
309
- | `bookings.slots.list` | `PaginatedResponse<BookingSlot>` | `ListResult<BookingSlot> (with count)` | no `offset`; now `cursor` |
310
- | `broadcasts.list` | `BroadcastList = { items, limit, offset }` | `ListResult<BroadcastRecord>` | no `offset`; now `cursor` |
311
- | `broadcasts.recipients` | `{ items, total, limit, offset, note? }` | `ListResult<Recipient> & { note?: string } (with count)` | no `offset`; now `cursor` |
312
- | `claimSet.getAll` | `any[]` | `ListResult<any>` | |
313
- | `claimSet.getAssignedTags` | `any (the claim set with its tags in tags)` | `ListResult<any> & Record<string, any>` | |
314
- | `claimSet.ranges.list` | `ClaimSetRange[]` | `ListResult<ClaimSetRange>` | |
315
- | `claimSet.ranges.tags` | `ClaimSetRangeTagsPage { tags, next }` | `ListResult<ClaimSetRangeTag>` | no `from`; now `cursor` |
316
- | `collection.getUsers` | `CollectionUser[]` | `ListResult<CollectionUser>` | |
317
- | `collection.list` | `CollectionResponse[]` | `ListResult<CollectionResponse>` | |
318
- | `comms.listMethods` | `{ ok: true, methods: CommMethod[] }` | `ListResult<CommMethod>` | |
319
- | `comms.queryByUser` | `CommunicationEvent[]` | `ListResult<CommunicationEvent>` | |
320
- | `comms.queryRecipientIds` | `RecipientId[]` | `ListResult<RecipientId>` | |
321
- | `conditions.list` | `SavedCondition[]` | `ListResult<SavedCondition>` | |
322
- | `config.getFields` | `FieldDefinition[]` | `ListResult<FieldDefinition>` | |
323
- | `config.getProofTypes` | `ProofTypeDefinition[]` | `ListResult<ProofTypeDefinition>` | |
324
- | `contact.findDuplicates` | `{ pairs, scanned, more }` | `ListResult<ContactDuplicatePair> & { scanned: number }` | no `offset`; now `cursor` |
325
- | `contact.list` | `ContactListResponse = { items, limit, offset }` | `ListResult<Contact>` | no `offset`; now `cursor` |
326
- | `contact.search` | `ContactSearchResponse = { items, limit, offset }` | `ListResult<Contact>` | no `offset`; now `cursor` |
327
- | `containers.findForItem` | `{ items: ContainerItem[], containers: Container[] }` | `ListResult<ContainerItem> & { containers: Container[] }` | |
328
- | `containers.list` | `ListContainersResponse = { containers, limit, offset }` | `ListResult<Container>` | no `offset`; now `cursor` |
329
- | `containers.listItems` | `ContainerItemsResponse = { items, limit, offset }` | `ListResult<ContainerItem>` | no `offset`; now `cursor` |
330
- | `containers.publicList` | `PublicListContainersResponse = { containers }` | `ListResult<Container>` | no `offset`; now `cursor` |
331
- | `containers.publicListItems` | `ContainerItemsResponse = { items, limit, offset }` | `ListResult<ContainerItem>` | no `limit`, `offset` |
332
- | `crate.list` | `ListCratesResponse = { items, hasMore, lastId }` | `ListResult<Crate>` | no `startAfter`; now `cursor` |
333
- | `dpp.groups` | `DppGroup[] (the function unwrapped { groups })` | `ListResult<DppGroup>` | |
334
- | `dpp.passports.list` | `DppPassport[] (unwrapped { passports })` | `ListResult<DppPassport>` | no `offset`; now `cursor` |
335
- | `dpp.passports.versions` | `DppPassportVersion[] (unwrapped { versions })` | `ListResult<DppPassportVersion>` | |
336
- | `dpp.registry.list` | `DppRegistry[] (unwrapped { registries })` | `ListResult<DppRegistry>` | |
337
- | `dpp.tasks.list` | `DppTask[] (unwrapped { tasks })` | `ListResult<DppTask>` | |
338
- | `facets.list` | `FacetListResponse = { items }` | `ListResult<FacetDefinition>` | |
339
- | `facets.listValues` | `FacetValueListResponse = { facet, items }` | `ListResult<FacetValue> & { facet: FacetDefinition }` | |
340
- | `facets.namespaces` | `FacetNamespaceListResponse = { namespaces: string[] }` | `ListResult<string>` | |
341
- | `facets.publicList` | `FacetListResponse = { items }` | `ListResult<FacetDefinition>` | |
342
- | `facets.publicListValues` | `FacetValueListResponse = { facet, items }` | `ListResult<FacetValue> & { facet: FacetDefinition }` | |
343
- | `facets.publicNamespaces` | `FacetNamespaceListResponse = { namespaces: string[] }` | `ListResult<string>` | |
344
- | `facets.publicQuery` | `FacetQueryResponse = { items, buckets, meta? }` | `ListResult<{ facet, values }> & { buckets: FacetBucket[], meta? }` | |
345
- | `facets.query` | `FacetQueryResponse = { items, buckets, meta? }` | `ListResult<{ facet, values }> & { buckets: FacetBucket[], meta? }` | |
346
- | `files.list` | `{ ok: true, files: FileRecord[] }` | `ListResult<FileRecord>` | |
347
- | `form.list` | `any[]` | `ListResult<any>` | |
348
- | `integrations.listConnectorActions` | `{ actions }` | `ListResult<{ name, title, description?, visibility, input?, output? }>` | |
349
- | `integrations.listConnectors` | `{ connectors }` | `ListResult<InstalledConnector>` | |
350
- | `integrations.listEntityRuns` | `{ runs, nextCursor? }` | `ListResult<FlowRun>` | |
351
- | `integrations.listFailed` | `{ direction, items, nextCursor }` | `ListResult<FailedRecord> & { direction: FlowDirection }` | |
352
- | `integrations.listFlows` | `{ flows }` | `ListResult<IntegrationFlow>` | |
353
- | `integrations.listRecordTypes` | `{ recordTypes }` | `ListResult<RecordTypeInfo>` | |
354
- | `integrations.listRunItems` | `{ items, nextCursor? }` | `ListResult<FlowRunItem>` | |
355
- | `integrations.listRuns` | `{ runs, nextCursor? }` | `ListResult<FlowRun>` | |
356
- | `interactions.list` | `{ items, limit, offset }` | `ListResult<InteractionTypeRecord>` | no `offset`; now `cursor` |
357
- | `interactions.publicList` | `{ items, limit, offset }` | `ListResult<InteractionTypeRecord>` | no `offset`; now `cursor` |
358
- | `interactions.publicMyInteractions` | `InteractionEventRow[]` | `ListResult<InteractionEventRow>` | |
359
- | `interactions.query` | `InteractionEventRow[]` | `ListResult<InteractionEventRow>` | |
360
- | `jobs.listJobs` | `{ items, limit, offset }` | `ListResult<Job>` | no `offset`; now `cursor` |
361
- | `journeys.list` | `{ items, limit, offset }` | `ListResult<JourneyRecord>` | no `offset`; now `cursor` |
362
- | `journeysAnalytics.recipients` | `string[]` | `ListResult<string>` | |
363
- | `knowledge.listSets` | `KnowledgeSet[]` | `ListResult<KnowledgeSet>` | |
364
- | `knowledge.listSources` | `KnowledgeSource[]` | `ListResult<KnowledgeSource>` | |
365
- | `knowledge.publicSearch` | `KnowledgeSearchResponse { query, results, mode }` | `ListResult<KnowledgeSearchResult> & Pick<KnowledgeSearchResponse, 'query' | 'mode'>` | |
366
- | `knowledge.search` | `{ query, results, mode }` | `ListResult<KnowledgeSearchResult> & { query, mode }` | |
367
- | `location.search` | `{ items, count }` | `ListResult<Location>` | |
368
- | `lots.list` | `Lot[] (the SDK unwrapped { lots })` | `ListResult<Lot>` | |
369
- | `lots.listProducts` | `{ products, total, page, limit }` | `ListResult<LotProductSummary>` | no `page`; now `cursor` |
370
- | `lots.publicList` | `Lot[] (the SDK unwrapped { lots })` | `ListResult<Lot>` | |
371
- | `lots.publicListProducts` | `{ products, total, page, limit }` | `ListResult<LotProductSummary>` | no `page`; now `cursor` |
372
- | `loyalty.getMemberHistory` | `{ items, limit, offset }` | `ListResult<LoyaltyTransaction>` | no `offset`; now `cursor` |
373
- | `loyalty.list` | `LoyaltyScheme[]` | `ListResult<LoyaltyScheme>` | |
374
- | `loyalty.listEarningRules` | `LoyaltyEarningRule[]` | `ListResult<LoyaltyEarningRule>` | |
375
- | `loyalty.listMembers` | `{ items, limit, offset }` | `ListResult<LoyaltyMember>` | no `offset`; now `cursor` |
376
- | `loyalty.publicGetMe` | `LoyaltySchemeWithMembership[]` | `ListResult<LoyaltySchemeWithMembership>` | |
377
- | `loyalty.publicGetMineHistory` | `{ items, limit, offset }` | `ListResult<LoyaltyTransaction>` | no `offset`; now `cursor` |
378
- | `loyalty.publicList` | `LoyaltyScheme[]` | `ListResult<LoyaltyScheme>` | |
379
- | `loyalty.publicListEarningRules` | `LoyaltyEarningRule[]` | `ListResult<LoyaltyEarningRule>` | |
380
- | `nfc.lookupTag` | `NfcTagInfo[]` | `ListResult<NfcTagInfo>` | |
381
- | `order.getItems` | `{ items, limit, offset }` | `ListResult<OrderItem>` | no `offset`; now `cursor` |
382
- | `order.getLocationHistory` | `{ orderRef, orderId, locations, count }` | `ListResult<LocationScan> & { orderRef: string; orderId: string }` | |
383
- | `order.getTimeline` | `{ orderRef, orderId, timeline, count }` | `ListResult<TagScanEvent> & { orderRef: string; orderId: string }` | |
384
- | `order.list` | `{ orders, limit, offset }` | `ListResult<Order>` | no `offset`; now `cursor` |
385
- | `order.query` | `{ orders, limit, offset }` | `ListResult<Order>` | no `offset`; now `cursor` |
386
- | `partner.claimSets` | `PartnerClaimSet[]` | `ListResult<PartnerClaimSet>` | |
387
- | `partner.list` | `Partner[]` | `ListResult<Partner>` | |
388
- | `partner.lookupTags` | `PartnerTagHit[]` | `ListResult<PartnerTagHit>` | |
389
- | `partner.tagAttempts` | `ClientErrorEvent[]` | `ListResult<ClientErrorEvent>` | |
390
- | `products.list` | `ProductResponse[]` | `ListResult<ProductResponse>` | |
391
- | `products.listAssets` | `unknown` | `ListResult<AssetResponse>` | |
392
- | `products.query` | `{ items, page: { limit, offset, returned, total, hasMore, nextCursor }, meta }` | `ListResult<ProductResponse> & { meta?: ProductQueryMeta }` | no `page.limit`, `page.offset`, `page.cursor`; now `limit`, `cursor` |
393
- | `proof.findByProduct` | `ProofResponse[]` | `ListResult<ProofResponse>` | no `lastCursor`, `page`, `perPage`; now `limit` |
394
- | `proof.getByBatch` | `ProofResponse[]` | `ListResult<ProofResponse>` | |
395
- | `proof.getByProduct` | `ProofResponse[]` | `ListResult<ProofResponse>` | |
396
- | `proof.getByUser` | `ProofResponse[]` | `ListResult<ProofResponse>` | |
397
- | `proof.list` | `ProofResponse[]` | `ListResult<ProofResponse>` | |
398
- | `proof.listGrants` | `ProofGrant[]` | `ListResult<ProofGrant>` | |
399
- | `secrets.list` | `SecretList { secrets }` | `ListResult<SecretMeta>` | |
400
- | `secrets.listOwn` | `SecretList { secrets }` | `ListResult<SecretMeta>` | |
401
- | `segments.list` | `{ items, limit, offset }` | `ListResult<SegmentRecord>` | no `offset`; now `cursor` |
402
- | `segments.recipients` | `{ items, limit, offset, total, note? }` | `ListResult<Recipient> & { note?: string }` | no `offset`; now `cursor` |
403
- | `serviceAccounts.list` | `{ serviceAccounts, access }` | `ListResult<ServiceAccount> & { access: ServiceAccountAccess[] }` | |
404
- | `shop.admin.listOrders` | `{ items, total, limit, offset }` | `ListResult<ShopAdminOrder>` | no `offset`; now `cursor` |
405
- | `shop.admin.listPrices` | `{ items, total, limit, offset }` | `ListResult<ShopPrice>` | no `offset`; now `cursor` |
406
- | `shop.myOrders` | `{ items, total, limit, offset }` | `ListResult<ShopBuyerOrder>` | no `offset`; now `cursor` |
407
- | `shop.products` | `{ currency, items }` | `ListResult<ShopProduct> & { currency: string }` | |
408
- | `subscriptions.admin.list` | `{ items, total, limit, offset }` | `ListResult<Membership>` | no `offset`; now `cursor` |
409
- | `subscriptions.admin.listPlans` | `{ items, total, limit, offset }` | `ListResult<PlanWithPrices>` | no `offset`; now `cursor` |
410
- | `subscriptions.mine` | `MySubscription[]` | `ListResult<MySubscription>` | |
411
- | `subscriptions.plans` | `PublicPlan[]` | `ListResult<PublicPlan>` | |
412
- | `tags.byRef` | `{ tags }` | `ListResult<Tag>` | |
413
- | `tags.list` | `{ tags, limit, offset }` | `ListResult<Tag>` | no `offset`; now `cursor` |
414
- | `tags.lookupTags` | `{ count, tags, embedded }` | `ListResult<Tag> & { count: number; embedded: TagEmbedded }` | |
415
- | `tags.lookupTagsQuery` | `{ count, tags, embedded }` | `ListResult<Tag> & { count: number; embedded: TagEmbedded }` | |
416
- | `tags.publicByRef` | `{ tags, embedded }` | `ListResult<Tag> & { embedded: TagEmbedded }` | |
417
- | `tags.publicByRefPost` | `{ tags, embedded }` | `ListResult<Tag> & { embedded: TagEmbedded }` | |
418
- | `template.getAll` | `Template[]` | `ListResult<Template>` | |
419
- | `template.getAllowed` | `TemplatePublic[]` | `ListResult<TemplatePublic>` | |
420
- | `template.getAllowedGlobal` | `TemplatePublic[]` | `ListResult<TemplatePublic>` | |
421
- | `translations.list` | `{ items, total?, limit?, offset? }` | `ListResult<TranslationRecord>` | no `offset`; now `cursor` |
422
- | `userAppData.list` | `any[]` | `ListResult<any>` | |
423
- | `userGroups.history` | `UserGroupChange[]` | `ListResult<UserGroupChange>` | |
424
- | `userGroups.list` | `UserGroup[]` | `ListResult<UserGroup>` | |
425
- | `userGroups.members` | `UserGroupMember[]` | `ListResult<UserGroupMember>` | |
426
- | `userGroups.ofUser` | `UserGroupRef[]` | `ListResult<UserGroupRef>` | |
427
- | `variant.list` | `VariantResponse[]` | `ListResult<VariantResponse>` | |
428
- | `wallet.list` | `{ ok: true, passes }` | `ListResult<WalletPass>` | |
429
- | `wallet.mine` | `{ ok: true, passes }` | `ListResult<WalletPassSummary>` | |
430
- <!-- upgrade-table:lists:end -->
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 -->