@proveanything/smartlinks 2.2.1 → 3.0.0-alpha.1

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 (326) hide show
  1. package/README.md +741 -754
  2. package/dist/README.md +573 -573
  3. package/dist/adminCardsView.js +55 -55
  4. package/dist/api/adminCards.d.ts +8 -0
  5. package/dist/api/adminCards.js +9 -1
  6. package/dist/api/ai.d.ts +22 -11
  7. package/dist/api/ai.js +18 -14
  8. package/dist/api/analytics.d.ts +13 -0
  9. package/dist/api/analytics.js +13 -0
  10. package/dist/api/appConfiguration.d.ts +17 -14
  11. package/dist/api/appConfiguration.js +14 -12
  12. package/dist/api/appObjects.d.ts +80 -16
  13. package/dist/api/appObjects.js +74 -11
  14. package/dist/api/asset.d.ts +55 -19
  15. package/dist/api/asset.js +52 -32
  16. package/dist/api/attestation.d.ts +3 -2
  17. package/dist/api/attestation.js +1 -1
  18. package/dist/api/attestations.d.ts +22 -7
  19. package/dist/api/attestations.js +22 -7
  20. package/dist/api/authKit.d.ts +22 -5
  21. package/dist/api/authKit.js +21 -4
  22. package/dist/api/batch.d.ts +23 -16
  23. package/dist/api/batch.js +19 -13
  24. package/dist/api/bookings.d.ts +45 -9
  25. package/dist/api/bookings.js +39 -3
  26. package/dist/api/broadcasts.d.ts +26 -6
  27. package/dist/api/broadcasts.js +22 -2
  28. package/dist/api/claimSet.d.ts +48 -13
  29. package/dist/api/claimSet.js +43 -7
  30. package/dist/api/collection.d.ts +20 -6
  31. package/dist/api/collection.js +19 -8
  32. package/dist/api/comms.d.ts +43 -12
  33. package/dist/api/comms.js +43 -13
  34. package/dist/api/conditions.d.ts +12 -2
  35. package/dist/api/conditions.js +10 -1
  36. package/dist/api/config.d.ts +15 -2
  37. package/dist/api/config.js +12 -0
  38. package/dist/api/contact.d.ts +34 -13
  39. package/dist/api/contact.js +35 -10
  40. package/dist/api/containers.d.ts +41 -23
  41. package/dist/api/containers.js +37 -21
  42. package/dist/api/crate.d.ts +9 -8
  43. package/dist/api/crate.js +8 -8
  44. package/dist/api/dpp.d.ts +58 -10
  45. package/dist/api/dpp.js +57 -15
  46. package/dist/api/facets.d.ts +71 -0
  47. package/dist/api/facets.js +71 -0
  48. package/dist/api/files.d.ts +11 -5
  49. package/dist/api/files.js +9 -1
  50. package/dist/api/form.d.ts +9 -2
  51. package/dist/api/form.js +7 -1
  52. package/dist/api/index.d.ts +0 -1
  53. package/dist/api/index.js +0 -1
  54. package/dist/api/integrations.d.ts +82 -27
  55. package/dist/api/integrations.js +63 -7
  56. package/dist/api/interactions.d.ts +42 -6
  57. package/dist/api/interactions.js +41 -5
  58. package/dist/api/jobs.d.ts +9 -2
  59. package/dist/api/jobs.js +6 -0
  60. package/dist/api/journeys.d.ts +13 -2
  61. package/dist/api/journeys.js +10 -1
  62. package/dist/api/journeysAnalytics.d.ts +12 -3
  63. package/dist/api/journeysAnalytics.js +9 -1
  64. package/dist/api/knowledge.d.ts +43 -10
  65. package/dist/api/knowledge.js +37 -5
  66. package/dist/api/location.d.ts +10 -3
  67. package/dist/api/location.js +7 -1
  68. package/dist/api/lots.d.ts +40 -13
  69. package/dist/api/lots.js +38 -8
  70. package/dist/api/loyalty.d.ts +70 -12
  71. package/dist/api/loyalty.js +60 -3
  72. package/dist/api/nfc.d.ts +8 -2
  73. package/dist/api/nfc.js +6 -1
  74. package/dist/api/order.d.ts +51 -160
  75. package/dist/api/order.js +46 -208
  76. package/dist/api/partner.d.ts +41 -8
  77. package/dist/api/partner.js +36 -4
  78. package/dist/api/products.d.ts +41 -8
  79. package/dist/api/products.js +33 -4
  80. package/dist/api/proof.d.ts +50 -13
  81. package/dist/api/proof.js +43 -7
  82. package/dist/api/realtime.d.ts +1 -11
  83. package/dist/api/realtime.js +1 -22
  84. package/dist/api/secrets.d.ts +25 -5
  85. package/dist/api/secrets.js +21 -2
  86. package/dist/api/segments.d.ts +26 -6
  87. package/dist/api/segments.js +22 -2
  88. package/dist/api/serviceAccounts.d.ts +8 -1
  89. package/dist/api/serviceAccounts.js +8 -1
  90. package/dist/api/shop.d.ts +41 -13
  91. package/dist/api/shop.js +35 -4
  92. package/dist/api/subscriptions.d.ts +47 -12
  93. package/dist/api/subscriptions.js +40 -4
  94. package/dist/api/tags.d.ts +40 -19
  95. package/dist/api/tags.js +38 -18
  96. package/dist/api/template.d.ts +31 -3
  97. package/dist/api/template.js +27 -0
  98. package/dist/api/translations.d.ts +17 -2
  99. package/dist/api/translations.js +14 -0
  100. package/dist/api/userGroups.d.ts +35 -9
  101. package/dist/api/userGroups.js +30 -5
  102. package/dist/api/variant.d.ts +11 -3
  103. package/dist/api/variant.js +9 -2
  104. package/dist/api/wallet.d.ts +23 -10
  105. package/dist/api/wallet.js +20 -2
  106. package/dist/apiVersion.d.ts +1 -1
  107. package/dist/apiVersion.js +1 -1
  108. package/dist/baseline.css +194 -194
  109. package/dist/docs/API_SUMMARY.md +1389 -2298
  110. package/dist/docs/PRODUCT_FACETS_SDK.md +10 -15
  111. package/dist/docs/admin-cards.md +189 -189
  112. package/dist/docs/admin-lists-and-pickers.md +1 -1
  113. package/dist/docs/agent-tools.md +156 -156
  114. package/dist/docs/ai-tools-and-skills.md +180 -180
  115. package/dist/docs/ai.md +1721 -1721
  116. package/dist/docs/analytics.md +3 -2
  117. package/dist/docs/api-versions.md +85 -76
  118. package/dist/docs/app-data-storage.md +277 -277
  119. package/dist/docs/app-docs.md +73 -73
  120. package/dist/docs/app-manifest.md +852 -852
  121. package/dist/docs/app-objects.md +38 -50
  122. package/dist/docs/app-records-pattern.md +388 -388
  123. package/dist/docs/appConfig.md +550 -550
  124. package/dist/docs/assets.md +17 -3
  125. package/dist/docs/assistant-apps.md +172 -172
  126. package/dist/docs/assistant-context.md +119 -119
  127. package/dist/docs/attestations.md +5 -4
  128. package/dist/docs/auth-kit.md +1 -1
  129. package/dist/docs/bookings.md +442 -442
  130. package/dist/docs/comms.md +689 -686
  131. package/dist/docs/connectors.md +340 -340
  132. package/dist/docs/contact-search.md +4 -3
  133. package/dist/docs/container-tracking.md +7 -7
  134. package/dist/docs/css-baseline.md +133 -133
  135. package/dist/docs/customer-guide.md +70 -70
  136. package/dist/docs/deploying-apps.md +340 -340
  137. package/dist/docs/dpp.md +115 -115
  138. package/dist/docs/entitlements.md +90 -90
  139. package/dist/docs/executor.md +1 -1
  140. package/dist/docs/files.md +69 -69
  141. package/dist/docs/forms.md +1 -1
  142. package/dist/docs/headless-providers.md +3 -3
  143. package/dist/docs/host-dependency-contract.md +252 -210
  144. package/dist/docs/integrations.md +322 -322
  145. package/dist/docs/interactions.md +544 -545
  146. package/dist/docs/item-context.md +181 -181
  147. package/dist/docs/knowledge.md +105 -102
  148. package/dist/docs/lists.md +114 -0
  149. package/dist/docs/lots.md +112 -111
  150. package/dist/docs/loyalty.md +348 -352
  151. package/dist/docs/members.md +183 -183
  152. package/dist/docs/memberships.md +150 -149
  153. package/dist/docs/mobile-admin-container.md +693 -693
  154. package/dist/docs/operations.md +281 -281
  155. package/dist/docs/overview.md +485 -485
  156. package/dist/docs/proof-claiming-methods.md +6 -6
  157. package/dist/docs/proof-comms-triggers.md +142 -142
  158. package/dist/docs/proof-ownership-transfer.md +155 -155
  159. package/dist/docs/proof-product-data-scoping.md +462 -462
  160. package/dist/docs/proof-share-grants.md +305 -305
  161. package/dist/docs/realtime.md +139 -138
  162. package/dist/docs/records-admin-pattern.md +304 -304
  163. package/dist/docs/server-functions.md +2 -2
  164. package/dist/docs/service-accounts.md +64 -64
  165. package/dist/docs/shop.md +4 -2
  166. package/dist/docs/site-seo.md +2 -1
  167. package/dist/docs/standard-query.md +187 -187
  168. package/dist/docs/tag-codes.md +97 -97
  169. package/dist/docs/tag-ranges.md +106 -106
  170. package/dist/docs/theme-tokens.md +252 -252
  171. package/dist/docs/translations.md +6 -1
  172. package/dist/docs/upgrading-to-3.md +430 -0
  173. package/dist/docs/user-groups.md +4 -4
  174. package/dist/docs/utils.md +1 -1
  175. package/dist/docs/wallet-passes.md +107 -107
  176. package/dist/docs/websites.md +123 -123
  177. package/dist/headless.d.ts +1 -1
  178. package/dist/headless.js +2 -2
  179. package/dist/http.d.ts +15 -2
  180. package/dist/http.js +60 -2
  181. package/dist/index.d.ts +7 -8
  182. package/dist/index.js +2 -0
  183. package/dist/list.d.ts +24 -0
  184. package/dist/list.js +80 -0
  185. package/dist/mobile-admin/types.d.ts +0 -16
  186. package/dist/openapi.yaml +290 -2723
  187. package/dist/shared-dependencies.d.ts +3 -3
  188. package/dist/shared-dependencies.js +13 -5
  189. package/dist/site.d.ts +1 -7
  190. package/dist/site.js +1 -14
  191. package/dist/theme-boot.js +82 -82
  192. package/dist/theme.css +75 -75
  193. package/dist/types/adminCards.d.ts +6 -3
  194. package/dist/types/ai.d.ts +0 -6
  195. package/dist/types/analytics.d.ts +5 -8
  196. package/dist/types/appManifest.d.ts +4 -5
  197. package/dist/types/appObjects.d.ts +14 -18
  198. package/dist/types/appObjects.js +0 -1
  199. package/dist/types/appOptions.d.ts +18 -0
  200. package/dist/types/asset.d.ts +3 -22
  201. package/dist/types/attestations.d.ts +7 -10
  202. package/dist/types/batch.d.ts +6 -14
  203. package/dist/types/bookings.d.ts +22 -4
  204. package/dist/types/broadcasts.d.ts +5 -13
  205. package/dist/types/broadcasts.js +0 -1
  206. package/dist/types/claimSet.d.ts +0 -5
  207. package/dist/types/comms.d.ts +11 -9
  208. package/dist/types/contact.d.ts +5 -29
  209. package/dist/types/contact.js +0 -13
  210. package/dist/types/containers.d.ts +15 -26
  211. package/dist/types/crate.d.ts +4 -12
  212. package/dist/types/dpp.d.ts +3 -3
  213. package/dist/types/dpp.js +0 -1
  214. package/dist/types/error.d.ts +8 -5
  215. package/dist/types/error.js +12 -5
  216. package/dist/types/facets.d.ts +15 -15
  217. package/dist/types/index.d.ts +1 -0
  218. package/dist/types/index.js +1 -0
  219. package/dist/types/integrations.d.ts +3 -28
  220. package/dist/types/interaction.d.ts +3 -9
  221. package/dist/types/jobs.d.ts +3 -8
  222. package/dist/types/jobs.js +0 -1
  223. package/dist/types/journeys.d.ts +3 -8
  224. package/dist/types/journeys.js +0 -1
  225. package/dist/types/journeysAnalytics.d.ts +0 -1
  226. package/dist/types/list.d.ts +24 -0
  227. package/dist/types/list.js +2 -0
  228. package/dist/types/location.d.ts +0 -4
  229. package/dist/types/lots.d.ts +0 -9
  230. package/dist/types/loyalty.d.ts +0 -9
  231. package/dist/types/order.d.ts +7 -134
  232. package/dist/types/product.d.ts +11 -24
  233. package/dist/types/proof.d.ts +16 -0
  234. package/dist/types/realtime.d.ts +0 -29
  235. package/dist/types/segments.d.ts +5 -13
  236. package/dist/types/segments.js +0 -1
  237. package/dist/types/serviceAccounts.d.ts +3 -2
  238. package/dist/types/serviceAccounts.js +0 -1
  239. package/dist/types/shop.d.ts +5 -12
  240. package/dist/types/shop.js +0 -4
  241. package/dist/types/subscriptions.d.ts +18 -0
  242. package/dist/types/subscriptions.js +0 -8
  243. package/dist/types/tags.d.ts +6 -16
  244. package/dist/types/tags.js +0 -7
  245. package/dist/types/translations.d.ts +3 -9
  246. package/dist/types/variant.d.ts +0 -2
  247. package/dist/version.d.ts +1 -1
  248. package/dist/version.js +1 -1
  249. package/docs/API_SUMMARY.md +1389 -2298
  250. package/docs/PRODUCT_FACETS_SDK.md +10 -15
  251. package/docs/admin-cards.md +189 -189
  252. package/docs/admin-lists-and-pickers.md +1 -1
  253. package/docs/agent-tools.md +156 -156
  254. package/docs/ai-tools-and-skills.md +180 -180
  255. package/docs/ai.md +1721 -1721
  256. package/docs/analytics.md +3 -2
  257. package/docs/api-versions.md +85 -76
  258. package/docs/app-data-storage.md +277 -277
  259. package/docs/app-docs.md +73 -73
  260. package/docs/app-manifest.md +852 -852
  261. package/docs/app-objects.md +38 -50
  262. package/docs/app-records-pattern.md +388 -388
  263. package/docs/appConfig.md +550 -550
  264. package/docs/assets.md +17 -3
  265. package/docs/assistant-apps.md +172 -172
  266. package/docs/assistant-context.md +119 -119
  267. package/docs/attestations.md +5 -4
  268. package/docs/auth-kit.md +1 -1
  269. package/docs/bookings.md +442 -442
  270. package/docs/comms.md +689 -686
  271. package/docs/connectors.md +340 -340
  272. package/docs/contact-search.md +4 -3
  273. package/docs/container-tracking.md +7 -7
  274. package/docs/css-baseline.md +133 -133
  275. package/docs/customer-guide.md +70 -70
  276. package/docs/deploying-apps.md +340 -340
  277. package/docs/dpp.md +115 -115
  278. package/docs/entitlements.md +90 -90
  279. package/docs/executor.md +1 -1
  280. package/docs/files.md +69 -69
  281. package/docs/forms.md +1 -1
  282. package/docs/headless-providers.md +3 -3
  283. package/docs/host-dependency-contract.md +252 -210
  284. package/docs/integrations.md +322 -322
  285. package/docs/interactions.md +544 -545
  286. package/docs/item-context.md +181 -181
  287. package/docs/knowledge.md +105 -102
  288. package/docs/lists.md +114 -0
  289. package/docs/lots.md +112 -111
  290. package/docs/loyalty.md +348 -352
  291. package/docs/members.md +183 -183
  292. package/docs/memberships.md +150 -149
  293. package/docs/mobile-admin-container.md +693 -693
  294. package/docs/operations.md +281 -281
  295. package/docs/overview.md +485 -485
  296. package/docs/proof-claiming-methods.md +6 -6
  297. package/docs/proof-comms-triggers.md +142 -142
  298. package/docs/proof-ownership-transfer.md +155 -155
  299. package/docs/proof-product-data-scoping.md +462 -462
  300. package/docs/proof-share-grants.md +305 -305
  301. package/docs/realtime.md +139 -138
  302. package/docs/server-functions.md +2 -2
  303. package/docs/service-accounts.md +64 -64
  304. package/docs/shop.md +4 -2
  305. package/docs/site-seo.md +2 -1
  306. package/docs/standard-query.md +187 -187
  307. package/docs/tag-codes.md +97 -97
  308. package/docs/tag-ranges.md +106 -106
  309. package/docs/theme-lookbook.v1.json +120 -120
  310. package/docs/theme-tokens.md +252 -252
  311. package/docs/translations.md +6 -1
  312. package/docs/upgrading-to-3.md +430 -0
  313. package/docs/user-groups.md +4 -4
  314. package/docs/utils.md +1 -1
  315. package/docs/wallet-passes.md +107 -107
  316. package/docs/websites.md +123 -123
  317. package/openapi.yaml +290 -2723
  318. package/package.json +8 -4
  319. package/scripts/headless-check.mjs +87 -87
  320. package/scripts/lib/bare-imports.mjs +57 -57
  321. package/scripts/lib/keyed-app-data.mjs +21 -21
  322. package/scripts/lib/upgrade.mjs +512 -0
  323. package/scripts/publish.mjs +272 -272
  324. package/scripts/register-release.mjs +91 -91
  325. package/scripts/upgrade.mjs +56 -0
  326. package/upgrade/3.json +2213 -0
@@ -0,0 +1,430 @@
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 -->
@@ -113,9 +113,9 @@ await userGroups.addMember(collectionId, qc.id, { email: 'sam@example.com', name
113
113
  await userGroups.addMember(collectionId, qc.id, { userId: 'uid_2' })
114
114
  await userGroups.removeMember(collectionId, qc.id, 'uid_2')
115
115
 
116
- await userGroups.members(collectionId, qc.id) // [{ uid, name, email }]
117
- await userGroups.ofUser(collectionId, 'uid_1') // [{ id, key, name }]
118
- await userGroups.list(collectionId)
116
+ await userGroups.members(collectionId, qc.id) // { items: [{ uid, name, email }], nextCursor: null }
117
+ await userGroups.ofUser(collectionId, 'uid_1') // { items: [{ id, key, name }], nextCursor: null }
118
+ await userGroups.list(collectionId) // { items: [{ id, key, name, … }], nextCursor: null }
119
119
  await userGroups.update(collectionId, qc.id, { name: 'Quality control' }) // key stays 'qc-controllers'
120
120
  await userGroups.remove(collectionId, qc.id)
121
121
  ```
@@ -136,7 +136,7 @@ with the admin who did it and when.
136
136
  ```ts
137
137
  await userGroups.history(collectionId, { userGroupId: qc.id }) // one user group
138
138
  await userGroups.history(collectionId, { userId: 'uid_1' }) // everything about one person
139
- // [{ at, type: 'usergroup.member-added', actorId: 'uid_admin', data: { key: 'qc-controllers', userId: 'uid_1', … } }]
139
+ // { items: [{ at, type: 'usergroup.member-added', actorId: 'uid_admin', data: { key: 'qc-controllers', userId: 'uid_1', … } }], nextCursor: null }
140
140
  ```
141
141
 
142
142
  It covers the last 30 days unless you pass `from` / `to` (up to 400 days), and takes about a second.
@@ -683,7 +683,7 @@ const show = await utils.validateCondition({
683
683
  })
684
684
 
685
685
  // Admin: list, create, change, remove
686
- const all = await conditions.list('col1', true)
686
+ const { items: all } = await conditions.list('col1', true)
687
687
  await conditions.create('col1', { title: 'UK only', type: 'and', conditions: [{ type: 'country', countries: ['GB'], contains: true }] })
688
688
  ```
689
689