@proveanything/smartlinks 3.0.0-alpha.1 → 3.0.0-alpha.2

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 (145) hide show
  1. package/README.md +7 -7
  2. package/dist/api/analytics.d.ts +5 -4
  3. package/dist/api/analytics.js +5 -4
  4. package/dist/api/appConfiguration.d.ts +23 -18
  5. package/dist/api/appConfiguration.js +24 -18
  6. package/dist/api/appObjects.d.ts +54 -10
  7. package/dist/api/appObjects.js +75 -40
  8. package/dist/api/asset.d.ts +28 -22
  9. package/dist/api/asset.js +45 -56
  10. package/dist/api/attestation.d.ts +11 -3
  11. package/dist/api/attestation.js +12 -3
  12. package/dist/api/attestations.d.ts +12 -8
  13. package/dist/api/attestations.js +18 -21
  14. package/dist/api/authKit.d.ts +15 -10
  15. package/dist/api/authKit.js +17 -11
  16. package/dist/api/batch.d.ts +36 -25
  17. package/dist/api/batch.js +46 -39
  18. package/dist/api/bookings.d.ts +18 -9
  19. package/dist/api/bookings.js +23 -13
  20. package/dist/api/broadcasts.js +3 -17
  21. package/dist/api/claimSet.d.ts +26 -12
  22. package/dist/api/claimSet.js +32 -24
  23. package/dist/api/collection.d.ts +15 -10
  24. package/dist/api/collection.js +17 -11
  25. package/dist/api/comms.d.ts +12 -6
  26. package/dist/api/comms.js +12 -6
  27. package/dist/api/conditions.d.ts +7 -6
  28. package/dist/api/conditions.js +8 -6
  29. package/dist/api/contact.d.ts +6 -2
  30. package/dist/api/contact.js +25 -60
  31. package/dist/api/containers.d.ts +14 -10
  32. package/dist/api/containers.js +19 -14
  33. package/dist/api/crate.js +7 -9
  34. package/dist/api/dpp.d.ts +20 -13
  35. package/dist/api/dpp.js +23 -15
  36. package/dist/api/facets.d.ts +38 -13
  37. package/dist/api/facets.js +40 -15
  38. package/dist/api/files.d.ts +5 -2
  39. package/dist/api/files.js +7 -4
  40. package/dist/api/form.d.ts +8 -5
  41. package/dist/api/form.js +9 -5
  42. package/dist/api/index.d.ts +0 -1
  43. package/dist/api/index.js +0 -1
  44. package/dist/api/integrations.d.ts +29 -17
  45. package/dist/api/integrations.js +32 -25
  46. package/dist/api/interactions.d.ts +11 -6
  47. package/dist/api/interactions.js +14 -23
  48. package/dist/api/jobs.d.ts +16 -6
  49. package/dist/api/jobs.js +30 -20
  50. package/dist/api/journeys.js +2 -14
  51. package/dist/api/journeysAnalytics.d.ts +8 -5
  52. package/dist/api/journeysAnalytics.js +8 -5
  53. package/dist/api/knowledge.d.ts +20 -14
  54. package/dist/api/knowledge.js +22 -15
  55. package/dist/api/location.d.ts +6 -3
  56. package/dist/api/location.js +8 -22
  57. package/dist/api/lots.d.ts +9 -5
  58. package/dist/api/lots.js +22 -26
  59. package/dist/api/loyalty.d.ts +25 -16
  60. package/dist/api/loyalty.js +33 -32
  61. package/dist/api/nfc.d.ts +3 -1
  62. package/dist/api/nfc.js +3 -1
  63. package/dist/api/order.d.ts +45 -39
  64. package/dist/api/order.js +48 -65
  65. package/dist/api/partner.d.ts +17 -14
  66. package/dist/api/partner.js +21 -22
  67. package/dist/api/products.d.ts +35 -12
  68. package/dist/api/products.js +36 -13
  69. package/dist/api/proof.d.ts +41 -19
  70. package/dist/api/proof.js +44 -23
  71. package/dist/api/segments.js +3 -15
  72. package/dist/api/serviceAccounts.d.ts +8 -5
  73. package/dist/api/serviceAccounts.js +9 -6
  74. package/dist/api/shop.d.ts +7 -5
  75. package/dist/api/shop.js +13 -19
  76. package/dist/api/subscriptions.d.ts +12 -10
  77. package/dist/api/subscriptions.js +17 -25
  78. package/dist/api/tags.d.ts +23 -20
  79. package/dist/api/tags.js +40 -52
  80. package/dist/api/template.d.ts +16 -11
  81. package/dist/api/template.js +19 -13
  82. package/dist/api/translations.js +2 -12
  83. package/dist/api/userGroups.d.ts +26 -16
  84. package/dist/api/userGroups.js +43 -30
  85. package/dist/api/variant.d.ts +10 -7
  86. package/dist/api/variant.js +11 -7
  87. package/dist/api/wallet.d.ts +14 -11
  88. package/dist/api/wallet.js +15 -12
  89. package/dist/docs/API_SUMMARY.md +289 -483
  90. package/dist/docs/ai.md +15 -15
  91. package/dist/docs/analytics.md +1 -1
  92. package/dist/docs/app-objects.md +4 -4
  93. package/dist/docs/attestations.md +8 -8
  94. package/dist/docs/contact-search.md +2 -3
  95. package/dist/docs/knowledge.md +3 -3
  96. package/dist/docs/lists.md +58 -15
  97. package/dist/docs/upgrading-to-3.md +238 -136
  98. package/dist/list.d.ts +12 -0
  99. package/dist/list.js +59 -0
  100. package/dist/openapi.yaml +301 -662
  101. package/dist/types/analytics.d.ts +7 -3
  102. package/dist/types/appObjects.d.ts +27 -12
  103. package/dist/types/appOptions.d.ts +2 -2
  104. package/dist/types/asset.d.ts +5 -6
  105. package/dist/types/attestations.d.ts +7 -9
  106. package/dist/types/batch.d.ts +5 -5
  107. package/dist/types/bookings.d.ts +10 -5
  108. package/dist/types/comms.d.ts +9 -5
  109. package/dist/types/contact.d.ts +7 -4
  110. package/dist/types/containers.d.ts +2 -1
  111. package/dist/types/facets.d.ts +14 -2
  112. package/dist/types/files.d.ts +3 -2
  113. package/dist/types/integrations.d.ts +2 -1
  114. package/dist/types/interaction.d.ts +15 -7
  115. package/dist/types/jobs.d.ts +1 -1
  116. package/dist/types/journeysAnalytics.d.ts +3 -2
  117. package/dist/types/knowledge.d.ts +6 -3
  118. package/dist/types/knowledge.js +0 -1
  119. package/dist/types/list.d.ts +30 -2
  120. package/dist/types/location.d.ts +7 -2
  121. package/dist/types/location.js +0 -1
  122. package/dist/types/lots.d.ts +5 -2
  123. package/dist/types/lots.js +0 -6
  124. package/dist/types/order.d.ts +22 -20
  125. package/dist/types/product.d.ts +28 -11
  126. package/dist/types/proof.d.ts +7 -8
  127. package/dist/types/tags.d.ts +5 -3
  128. package/dist/types/userGroups.d.ts +3 -3
  129. package/dist/types/userGroups.js +0 -4
  130. package/dist/version.d.ts +1 -1
  131. package/dist/version.js +1 -1
  132. package/docs/API_SUMMARY.md +289 -483
  133. package/docs/ai.md +15 -15
  134. package/docs/analytics.md +1 -1
  135. package/docs/app-objects.md +4 -4
  136. package/docs/attestations.md +8 -8
  137. package/docs/contact-search.md +2 -3
  138. package/docs/knowledge.md +3 -3
  139. package/docs/lists.md +58 -15
  140. package/docs/upgrading-to-3.md +238 -136
  141. package/openapi.yaml +301 -662
  142. package/package.json +1 -1
  143. package/scripts/lib/upgrade.mjs +216 -60
  144. package/scripts/upgrade.mjs +33 -10
  145. package/upgrade/3.json +2731 -2213
@@ -1,6 +1,6 @@
1
1
  # Smartlinks API Summary
2
2
 
3
- Version: 3.0.0-alpha.1 | Generated: 2026-11-24T15:23:46.728Z
3
+ Version: 3.0.0-alpha.2 | Generated: 2026-11-25T11:02:24.959Z
4
4
 
5
5
  This is a concise summary of all available API functions and types.
6
6
 
@@ -141,7 +141,6 @@ The Smartlinks SDK is organized into the following namespaces:
141
141
  - **adminCards** - Functions for adminCards operations
142
142
  - **aiGuide** - Functions for aiGuide operations
143
143
  - **analytics** - Functions for analytics operations
144
- - **async** - Functions for async operations
145
144
  - **attestation** - Functions for attestation operations
146
145
  - **attestations** - Functions for attestations operations
147
146
  - **bookings** - Functions for bookings operations
@@ -3774,6 +3773,7 @@ interface MatchRecordsInput {
3774
3773
  strategy?: 'all' | 'best'
3775
3774
  recordType?: string
3776
3775
  limit?: number
3776
+ cursor?: string
3777
3777
  includeScheduled?: boolean
3778
3778
  includeExpired?: boolean
3779
3779
  at?: string
@@ -3889,6 +3889,7 @@ interface ResolveAllParams {
3889
3889
  recordType?: string
3890
3890
  tiers?: Array<'proof' | 'batch' | 'variant' | 'product' | 'rule' | 'facet' | 'collection'>
3891
3891
  limit?: number
3892
+ cursor?: string
3892
3893
  at?: string
3893
3894
  includeScheduled?: boolean
3894
3895
  includeExpired?: boolean
@@ -4109,18 +4110,6 @@ interface UploadFromUrlOptions {
4109
4110
  }
4110
4111
  ```
4111
4112
 
4112
- **ListAssetsOptions** (interface)
4113
- ```typescript
4114
- interface ListAssetsOptions {
4115
- scope:
4116
- | { type: 'collection'; collectionId: string }
4117
- | { type: 'product'; collectionId: string; productId: string }
4118
- | { type: 'proof'; collectionId: string; productId: string; proofId: string }
4119
- appId?: string
4120
- limit?: number
4121
- }
4122
- ```
4123
-
4124
4113
  **GetAssetOptions** (interface)
4125
4114
  ```typescript
4126
4115
  interface GetAssetOptions {
@@ -4493,8 +4482,7 @@ interface AttestationSummaryParams {
4493
4482
  attestationType: string
4494
4483
  valueField?: string
4495
4484
  groupBy?: AttestationGroupBy
4496
- recordedAfter?: string
4497
- recordedBefore?: string
4485
+ recordedAt?: DateRange
4498
4486
  limit?: number
4499
4487
  }
4500
4488
  ```
@@ -4523,8 +4511,7 @@ interface AttestationTreeSummaryParams {
4523
4511
  attestationType: string
4524
4512
  valueField?: string
4525
4513
  groupBy?: AttestationGroupBy
4526
- recordedAfter?: string
4527
- recordedBefore?: string
4514
+ recordedAt?: DateRange
4528
4515
  limit?: number
4529
4516
  includeItems?: boolean
4530
4517
  }
@@ -5382,15 +5369,6 @@ interface BatchUpdateRequest {
5382
5369
  }
5383
5370
  ```
5384
5371
 
5385
- **SearchBatchesRequest** (interface)
5386
- ```typescript
5387
- interface SearchBatchesRequest {
5388
- search?: string // Search term (batch ID or name)
5389
- productId?: string // Filter by specific product
5390
- limit?: number // Max results (default: 100)
5391
- }
5392
- ```
5393
-
5394
5372
  **BatchTag** (interface)
5395
5373
  ```typescript
5396
5374
  interface BatchTag {
@@ -6462,17 +6440,6 @@ interface CommunicationEvent {
6462
6440
  }
6463
6441
  ```
6464
6442
 
6465
- **CommsQueryByUser** (interface)
6466
- ```typescript
6467
- interface CommsQueryByUser {
6468
- userId?: string
6469
- contactId?: string
6470
- from?: string
6471
- to?: string
6472
- limit?: number
6473
- }
6474
- ```
6475
-
6476
6443
  **RecipientWithOutcome** (interface)
6477
6444
  ```typescript
6478
6445
  interface RecipientWithOutcome {
@@ -6480,18 +6447,6 @@ interface RecipientWithOutcome {
6480
6447
  }
6481
6448
  ```
6482
6449
 
6483
- **CommsRecipientIdsQuery** (interface)
6484
- ```typescript
6485
- interface CommsRecipientIdsQuery {
6486
- broadcastId?: string
6487
- journeyId?: string
6488
- idField?: IdField
6489
- from?: string
6490
- to?: string
6491
- limit?: number
6492
- }
6493
- ```
6494
-
6495
6450
  **CommsRecipientsWithoutInteractionQuery** (interface)
6496
6451
  ```typescript
6497
6452
  interface CommsRecipientsWithoutInteractionQuery {
@@ -6503,6 +6458,7 @@ interface CommsRecipientsWithoutInteractionQuery {
6503
6458
  from?: string
6504
6459
  to?: string
6505
6460
  limit?: number
6461
+ cursor?: string
6506
6462
  }
6507
6463
  ```
6508
6464
 
@@ -6519,6 +6475,7 @@ interface CommsRecipientsWithInteractionQuery {
6519
6475
  from?: string
6520
6476
  to?: string
6521
6477
  limit?: number
6478
+ cursor?: string
6522
6479
  }
6523
6480
  ```
6524
6481
 
@@ -6880,7 +6837,7 @@ interface TransactionalSendError {
6880
6837
  // Communication and notification types for the Smartlinks API
6881
6838
  import type { IdField } from './common'
6882
6839
  import type { BroadcastChannel } from './broadcasts'
6883
- import type { ListResult } from './list'
6840
+ import type { ListResult, ListOptions } from './list'
6884
6841
 
6885
6842
  /**
6886
6843
  * Target subject for notifications (product, collection, etc.)
@@ -6909,24 +6866,24 @@ export interface CommunicationEvent {
6909
6866
  [k: string]: any
6910
6867
  }
6911
6868
 
6912
- export interface CommsQueryByUser {
6869
+ /** `comms.queryByUser` options: who, the time window (`from` / `to`), plus `limit` and `cursor`. */
6870
+ export interface CommsQueryByUser extends ListOptions {
6913
6871
  userId?: string
6914
6872
  contactId?: string
6915
6873
  from?: string
6916
6874
  to?: string
6917
- limit?: number
6918
6875
  }
6919
6876
 
6920
6877
  export type RecipientId = string
6921
6878
  export interface RecipientWithOutcome { id: string; outcome: string }
6922
6879
 
6923
- export interface CommsRecipientIdsQuery {
6880
+ /** `comms.queryRecipientIds` options: the source, the time window (`from` / `to`), plus `limit` and `cursor`. */
6881
+ export interface CommsRecipientIdsQuery extends ListOptions {
6924
6882
  broadcastId?: string
6925
6883
  journeyId?: string
6926
6884
  idField?: IdField
6927
6885
  from?: string
6928
6886
  to?: string
6929
- limit?: number
6930
6887
  }
6931
6888
 
6932
6889
  /** Who a broadcast or journey reached that did NOT then do an interaction. */
@@ -6940,6 +6897,8 @@ export interface CommsRecipientsWithoutInteractionQuery {
6940
6897
  from?: string
6941
6898
  to?: string
6942
6899
  limit?: number
6900
+ /** A `nextCursor` from the previous page. */
6901
+ cursor?: string
6943
6902
  }
6944
6903
 
6945
6904
  /** Who a broadcast or journey reached that then did an interaction. */
@@ -6955,6 +6914,8 @@ export interface CommsRecipientsWithInteractionQuery {
6955
6914
  from?: string
6956
6915
  to?: string
6957
6916
  limit?: number
6917
+ /** A `nextCursor` from the previous page. */
6918
+ cursor?: string
6958
6919
  }
6959
6920
 
6960
6921
  export interface LogCommunicationEventBody {
@@ -7741,15 +7702,6 @@ interface GetContainerParams {
7741
7702
  }
7742
7703
  ```
7743
7704
 
7744
- **FindContainersForItemParams** (interface)
7745
- ```typescript
7746
- interface FindContainersForItemParams {
7747
- itemType: ContainerItemType
7748
- itemId: string
7749
- productId?: string
7750
- }
7751
- ```
7752
-
7753
7705
  **ContainerStatus** = `'active' | 'archived' | string`
7754
7706
 
7755
7707
  **ContainerItemType** = `'tag' | 'proof'`
@@ -8162,6 +8114,9 @@ interface FacetQueryRequest {
8162
8114
  includeEmpty?: boolean
8163
8115
  includeDeleted?: boolean
8164
8116
  namespace?: string | null
8117
+ q?: string
8118
+ createdAt?: DateRange
8119
+ updatedAt?: DateRange
8165
8120
  query?: ProductQueryRequest["query"] & {
8166
8121
  facetEquals?: Record<string, JsonValue | JsonValue[]>
8167
8122
  }
@@ -8203,13 +8158,6 @@ interface FacetGetParams {
8203
8158
  }
8204
8159
  ```
8205
8160
 
8206
- **FacetValueListParams** (interface)
8207
- ```typescript
8208
- interface FacetValueListParams {
8209
- includeDeleted?: boolean
8210
- }
8211
- ```
8212
-
8213
8161
  **FacetValueGetParams** (interface)
8214
8162
  ```typescript
8215
8163
  interface FacetValueGetParams {
@@ -8249,17 +8197,6 @@ interface FetchFileRequest {
8249
8197
  }
8250
8198
  ```
8251
8199
 
8252
- **ListFilesQuery** (interface)
8253
- ```typescript
8254
- interface ListFilesQuery {
8255
- origin?: "upload" | "fetched" | "derived" | "generated"
8256
- retention?: "temporary" | "permanent"
8257
- appId?: string
8258
- derivedFromId?: string
8259
- limit?: number
8260
- }
8261
- ```
8262
-
8263
8200
  **ExtractFileRequest** (interface)
8264
8201
  ```typescript
8265
8202
  interface ExtractFileRequest {
@@ -8803,15 +8740,6 @@ interface CreateFlowInput {
8803
8740
  }
8804
8741
  ```
8805
8742
 
8806
- **ListFlowsQuery** (interface)
8807
- ```typescript
8808
- interface ListFlowsQuery {
8809
- direction?: FlowDirection
8810
- status?: FlowStatus
8811
- appId?: string
8812
- }
8813
- ```
8814
-
8815
8743
  **RunFlowInput** (interface)
8816
8744
  ```typescript
8817
8745
  interface RunFlowInput {
@@ -9100,27 +9028,6 @@ interface RecordTypeInfo {
9100
9028
 
9101
9029
  ### interaction
9102
9030
 
9103
- **AdminInteractionsQueryRequest** (interface)
9104
- ```typescript
9105
- interface AdminInteractionsQueryRequest {
9106
- userId?: string
9107
- contactId?: string
9108
- appId?: string
9109
- interactionId?: string
9110
- scope?: string
9111
- interactionIds?: string[]
9112
- broadcastId?: string
9113
- outcome?: string | null
9114
- from?: string
9115
- to?: string
9116
- limit?: number
9117
- includeDeleted?: boolean
9118
- latestPerEventId?: boolean
9119
- order?: 'ASC' | 'DESC'
9120
- include?: Array<'interaction'>
9121
- }
9122
- ```
9123
-
9124
9031
  **AdminInteractionsCountsByOutcomeRequest** (interface)
9125
9032
  ```typescript
9126
9033
  interface AdminInteractionsCountsByOutcomeRequest {
@@ -9193,17 +9100,6 @@ interface PublicInteractionsCountsByOutcomeRequest {
9193
9100
  }
9194
9101
  ```
9195
9102
 
9196
- **PublicInteractionsByUserRequest** (interface)
9197
- ```typescript
9198
- interface PublicInteractionsByUserRequest {
9199
- appId?: string
9200
- interactionId?: string
9201
- from?: string
9202
- to?: string
9203
- limit?: number
9204
- }
9205
- ```
9206
-
9207
9103
  **InteractionEventRow** (interface)
9208
9104
  ```typescript
9209
9105
  interface InteractionEventRow {
@@ -9599,19 +9495,6 @@ interface JourneyStatsResponse {
9599
9495
  }
9600
9496
  ```
9601
9497
 
9602
- **JourneyStepRecipientsRequest** (interface)
9603
- ```typescript
9604
- interface JourneyStepRecipientsRequest {
9605
- status?: 'entered' | 'completed' | 'pending'
9606
- idField?: IdField
9607
- interactionId?: string
9608
- outcome?: string
9609
- from?: string
9610
- to?: string
9611
- limit?: number
9612
- }
9613
- ```
9614
-
9615
9498
  **JourneyFunnelReportRequest** (interface)
9616
9499
  ```typescript
9617
9500
  interface JourneyFunnelReportRequest {
@@ -9724,16 +9607,6 @@ interface KnowledgeDocument {
9724
9607
  }
9725
9608
  ```
9726
9609
 
9727
- **KnowledgeSearchRequest** (interface)
9728
- ```typescript
9729
- interface KnowledgeSearchRequest {
9730
- query: string
9731
- sets?: string[]
9732
- filters?: Record<string, any>
9733
- k?: number
9734
- }
9735
- ```
9736
-
9737
9610
  **KnowledgeSearchResult** (interface)
9738
9611
  ```typescript
9739
9612
  interface KnowledgeSearchResult {
@@ -9782,6 +9655,16 @@ interface ListOptions {
9782
9655
  }
9783
9656
  ```
9784
9657
 
9658
+ **DateRange** (interface)
9659
+ ```typescript
9660
+ interface DateRange {
9661
+ gte?: string | Date
9662
+ lte?: string | Date
9663
+ }
9664
+ ```
9665
+
9666
+ **SortDirection** = `'asc' | 'desc'`
9667
+
9785
9668
  ### location
9786
9669
 
9787
9670
  **Location** (interface)
@@ -9806,18 +9689,6 @@ interface Location {
9806
9689
  }
9807
9690
  ```
9808
9691
 
9809
- **LocationSearchQuery** (interface)
9810
- ```typescript
9811
- interface LocationSearchQuery {
9812
- q?: string
9813
- category?: string
9814
- countryCode?: string
9815
- countryName?: string
9816
- limit?: number // default 20; max 100
9817
- sort?: 'name' | 'countryCode' | 'countryName' // default 'name'
9818
- }
9819
- ```
9820
-
9821
9692
  **Geofence** = ``
9822
9693
 
9823
9694
  **LocationPayload** = `Omit<`
@@ -9872,16 +9743,6 @@ interface LotCreateInput {
9872
9743
  }
9873
9744
  ```
9874
9745
 
9875
- **ListLotsParams** (interface)
9876
- ```typescript
9877
- interface ListLotsParams {
9878
- status?: LotStatus
9879
- search?: string
9880
- productId?: string
9881
- includeDeleted?: boolean
9882
- }
9883
- ```
9884
-
9885
9746
  **LotMemberDiff** (interface)
9886
9747
  ```typescript
9887
9748
  interface LotMemberDiff {
@@ -10759,23 +10620,6 @@ interface TagScanEvent {
10759
10620
  }
10760
10621
  ```
10761
10622
 
10762
- **TimelineRequest** (interface)
10763
- ```typescript
10764
- interface TimelineRequest {
10765
- limit?: number // Max results (default: 1000)
10766
- from?: string // ISO 8601 start date filter
10767
- to?: string // ISO 8601 end date filter
10768
- isAdmin?: boolean // Filter by admin scans only
10769
- }
10770
- ```
10771
-
10772
- **LocationRequest** (interface)
10773
- ```typescript
10774
- interface LocationRequest {
10775
- limit?: number // Max results (default: 1000)
10776
- }
10777
- ```
10778
-
10779
10623
  **BulkAnalyticsRequest** (interface)
10780
10624
  ```typescript
10781
10625
  interface BulkAnalyticsRequest {
@@ -11037,16 +10881,6 @@ interface ProofCreateRequest {
11037
10881
  }
11038
10882
  ```
11039
10883
 
11040
- **ProofFindQuery** (interface)
11041
- ```typescript
11042
- interface ProofFindQuery {
11043
- limit?: number
11044
- filterBy?: Array<{ field: string; value: JsonValue }>
11045
- includes?: string[]
11046
- [key: string]: any
11047
- }
11048
- ```
11049
-
11050
10884
  **ProofValuesUpdateRequest** (interface)
11051
10885
  ```typescript
11052
10886
  interface ProofValuesUpdateRequest {
@@ -12100,24 +11934,6 @@ interface LookupTagsQueryRequest {
12100
11934
  }
12101
11935
  ```
12102
11936
 
12103
- **ByRefRequest** (interface)
12104
- ```typescript
12105
- interface ByRefRequest {
12106
- refType: string
12107
- refId: string
12108
- embed?: string
12109
- }
12110
- ```
12111
-
12112
- **ReverseTagLookupParams** (interface)
12113
- ```typescript
12114
- interface ReverseTagLookupParams {
12115
- refType: string
12116
- refId: string
12117
- embed?: string
12118
- }
12119
- ```
12120
-
12121
11937
  **PublicGetTagResponse** (interface)
12122
11938
  ```typescript
12123
11939
  interface PublicGetTagResponse {
@@ -12428,17 +12244,6 @@ interface UserGroupChange {
12428
12244
  }
12429
12245
  ```
12430
12246
 
12431
- **UserGroupHistoryParams** (interface)
12432
- ```typescript
12433
- interface UserGroupHistoryParams {
12434
- userGroupId?: string
12435
- userId?: string
12436
- from?: string
12437
- to?: string
12438
- limit?: number
12439
- }
12440
- ```
12441
-
12442
12247
  **AddUserGroupMemberRequest** = ``
12443
12248
 
12444
12249
  **UserGroupChangeType** = ``
@@ -13060,59 +12865,59 @@ List the tools the agent can use (optionally scoped by capability / name). Retur
13060
12865
 
13061
12866
  **events**(collectionId: string,
13062
12867
  body: AnalyticsEventsRequest) → `Promise<AnalyticsEventsResponse>`
13063
- The raw events behind the reports, newest first unless `sort` says otherwise. Returns `{ items, nextCursor, source, sort }`: the event rows are in `items`; `nextCursor` is `null` on the last page. Page with `limit` and `cursor`. ```typescript let page = await analytics.admin.events(collectionId, { source: 'events', eventType: 'page_view', limit: 100 }) while (page.nextCursor) { page = await analytics.admin.events(collectionId, { source: 'events', eventType: 'page_view', limit: 100, cursor: page.nextCursor }) } ```
12868
+ The raw events behind the reports, newest first unless `orderBy` says otherwise. Returns `{ items, nextCursor, source, sort }`: the event rows are in `items`; `nextCursor` is `null` on the last page. Page with `limit` and `cursor`; the time window is `from` / `to`. ```typescript const query = { source: 'events' as const, eventType: 'page_view', from: '2026-11-01T00:00:00Z', limit: 100 } let page = await analytics.admin.events(collectionId, { ...query, orderBy: [{ timestamp: 'asc' }] }) while (page.nextCursor) { page = await analytics.admin.events(collectionId, { ...query, orderBy: [{ timestamp: 'asc' }], cursor: page.nextCursor }) } ```
13064
12869
 
13065
12870
  **web**(collectionId: string,
13066
12871
  body: LegacyAnalyticsRequest = {}) → `Promise<AnalyticsDashboardResponse>`
13067
- The raw events behind the reports, newest first unless `sort` says otherwise. Returns `{ items, nextCursor, source, sort }`: the event rows are in `items`; `nextCursor` is `null` on the last page. Page with `limit` and `cursor`. ```typescript let page = await analytics.admin.events(collectionId, { source: 'events', eventType: 'page_view', limit: 100 }) while (page.nextCursor) { page = await analytics.admin.events(collectionId, { source: 'events', eventType: 'page_view', limit: 100, cursor: page.nextCursor }) } ```
12872
+ The raw events behind the reports, newest first unless `orderBy` says otherwise. Returns `{ items, nextCursor, source, sort }`: the event rows are in `items`; `nextCursor` is `null` on the last page. Page with `limit` and `cursor`; the time window is `from` / `to`. ```typescript const query = { source: 'events' as const, eventType: 'page_view', from: '2026-11-01T00:00:00Z', limit: 100 } let page = await analytics.admin.events(collectionId, { ...query, orderBy: [{ timestamp: 'asc' }] }) while (page.nextCursor) { page = await analytics.admin.events(collectionId, { ...query, orderBy: [{ timestamp: 'asc' }], cursor: page.nextCursor }) } ```
13068
12873
 
13069
12874
  **clicks**(collectionId: string,
13070
12875
  body: LegacyAnalyticsRequest = {}) → `Promise<AnalyticsDashboardResponse>`
13071
- The raw events behind the reports, newest first unless `sort` says otherwise. Returns `{ items, nextCursor, source, sort }`: the event rows are in `items`; `nextCursor` is `null` on the last page. Page with `limit` and `cursor`. ```typescript let page = await analytics.admin.events(collectionId, { source: 'events', eventType: 'page_view', limit: 100 }) while (page.nextCursor) { page = await analytics.admin.events(collectionId, { source: 'events', eventType: 'page_view', limit: 100, cursor: page.nextCursor }) } ```
12876
+ The raw events behind the reports, newest first unless `orderBy` says otherwise. Returns `{ items, nextCursor, source, sort }`: the event rows are in `items`; `nextCursor` is `null` on the last page. Page with `limit` and `cursor`; the time window is `from` / `to`. ```typescript const query = { source: 'events' as const, eventType: 'page_view', from: '2026-11-01T00:00:00Z', limit: 100 } let page = await analytics.admin.events(collectionId, { ...query, orderBy: [{ timestamp: 'asc' }] }) while (page.nextCursor) { page = await analytics.admin.events(collectionId, { ...query, orderBy: [{ timestamp: 'asc' }], cursor: page.nextCursor }) } ```
13072
12877
 
13073
12878
  **tagScans**(collectionId: string,
13074
12879
  body: LegacyAnalyticsRequest = {}) → `Promise<AnalyticsDashboardResponse>`
13075
- The raw events behind the reports, newest first unless `sort` says otherwise. Returns `{ items, nextCursor, source, sort }`: the event rows are in `items`; `nextCursor` is `null` on the last page. Page with `limit` and `cursor`. ```typescript let page = await analytics.admin.events(collectionId, { source: 'events', eventType: 'page_view', limit: 100 }) while (page.nextCursor) { page = await analytics.admin.events(collectionId, { source: 'events', eventType: 'page_view', limit: 100, cursor: page.nextCursor }) } ```
12880
+ The raw events behind the reports, newest first unless `orderBy` says otherwise. Returns `{ items, nextCursor, source, sort }`: the event rows are in `items`; `nextCursor` is `null` on the last page. Page with `limit` and `cursor`; the time window is `from` / `to`. ```typescript const query = { source: 'events' as const, eventType: 'page_view', from: '2026-11-01T00:00:00Z', limit: 100 } let page = await analytics.admin.events(collectionId, { ...query, orderBy: [{ timestamp: 'asc' }] }) while (page.nextCursor) { page = await analytics.admin.events(collectionId, { ...query, orderBy: [{ timestamp: 'asc' }], cursor: page.nextCursor }) } ```
13076
12881
 
13077
12882
  **products**(collectionId: string,
13078
12883
  body: LegacyAnalyticsRequest = {}) → `Promise<AnalyticsProductsResponse>`
13079
- The raw events behind the reports, newest first unless `sort` says otherwise. Returns `{ items, nextCursor, source, sort }`: the event rows are in `items`; `nextCursor` is `null` on the last page. Page with `limit` and `cursor`. ```typescript let page = await analytics.admin.events(collectionId, { source: 'events', eventType: 'page_view', limit: 100 }) while (page.nextCursor) { page = await analytics.admin.events(collectionId, { source: 'events', eventType: 'page_view', limit: 100, cursor: page.nextCursor }) } ```
12884
+ The raw events behind the reports, newest first unless `orderBy` says otherwise. Returns `{ items, nextCursor, source, sort }`: the event rows are in `items`; `nextCursor` is `null` on the last page. Page with `limit` and `cursor`; the time window is `from` / `to`. ```typescript const query = { source: 'events' as const, eventType: 'page_view', from: '2026-11-01T00:00:00Z', limit: 100 } let page = await analytics.admin.events(collectionId, { ...query, orderBy: [{ timestamp: 'asc' }] }) while (page.nextCursor) { page = await analytics.admin.events(collectionId, { ...query, orderBy: [{ timestamp: 'asc' }], cursor: page.nextCursor }) } ```
13080
12885
 
13081
12886
  **qrCodes**(collectionId: string,
13082
12887
  body: LegacyAnalyticsRequest = {}) → `Promise<AnalyticsQrCodesResponse>`
13083
- The raw events behind the reports, newest first unless `sort` says otherwise. Returns `{ items, nextCursor, source, sort }`: the event rows are in `items`; `nextCursor` is `null` on the last page. Page with `limit` and `cursor`. ```typescript let page = await analytics.admin.events(collectionId, { source: 'events', eventType: 'page_view', limit: 100 }) while (page.nextCursor) { page = await analytics.admin.events(collectionId, { source: 'events', eventType: 'page_view', limit: 100, cursor: page.nextCursor }) } ```
12888
+ The raw events behind the reports, newest first unless `orderBy` says otherwise. Returns `{ items, nextCursor, source, sort }`: the event rows are in `items`; `nextCursor` is `null` on the last page. Page with `limit` and `cursor`; the time window is `from` / `to`. ```typescript const query = { source: 'events' as const, eventType: 'page_view', from: '2026-11-01T00:00:00Z', limit: 100 } let page = await analytics.admin.events(collectionId, { ...query, orderBy: [{ timestamp: 'asc' }] }) while (page.nextCursor) { page = await analytics.admin.events(collectionId, { ...query, orderBy: [{ timestamp: 'asc' }], cursor: page.nextCursor }) } ```
13084
12889
 
13085
12890
  **tags**(collectionId: string,
13086
12891
  body: LegacyAnalyticsRequest = {}) → `Promise<AnalyticsTagsResponse>`
13087
- The raw events behind the reports, newest first unless `sort` says otherwise. Returns `{ items, nextCursor, source, sort }`: the event rows are in `items`; `nextCursor` is `null` on the last page. Page with `limit` and `cursor`. ```typescript let page = await analytics.admin.events(collectionId, { source: 'events', eventType: 'page_view', limit: 100 }) while (page.nextCursor) { page = await analytics.admin.events(collectionId, { source: 'events', eventType: 'page_view', limit: 100, cursor: page.nextCursor }) } ```
12892
+ The raw events behind the reports, newest first unless `orderBy` says otherwise. Returns `{ items, nextCursor, source, sort }`: the event rows are in `items`; `nextCursor` is `null` on the last page. Page with `limit` and `cursor`; the time window is `from` / `to`. ```typescript const query = { source: 'events' as const, eventType: 'page_view', from: '2026-11-01T00:00:00Z', limit: 100 } let page = await analytics.admin.events(collectionId, { ...query, orderBy: [{ timestamp: 'asc' }] }) while (page.nextCursor) { page = await analytics.admin.events(collectionId, { ...query, orderBy: [{ timestamp: 'asc' }], cursor: page.nextCursor }) } ```
13088
12893
 
13089
12894
  **weekly**(collectionId: string,
13090
12895
  body: AnalyticsWeeklyRequest = {}) → `Promise<AnalyticsTimeseriesResponse>`
13091
- The raw events behind the reports, newest first unless `sort` says otherwise. Returns `{ items, nextCursor, source, sort }`: the event rows are in `items`; `nextCursor` is `null` on the last page. Page with `limit` and `cursor`. ```typescript let page = await analytics.admin.events(collectionId, { source: 'events', eventType: 'page_view', limit: 100 }) while (page.nextCursor) { page = await analytics.admin.events(collectionId, { source: 'events', eventType: 'page_view', limit: 100, cursor: page.nextCursor }) } ```
12896
+ The raw events behind the reports, newest first unless `orderBy` says otherwise. Returns `{ items, nextCursor, source, sort }`: the event rows are in `items`; `nextCursor` is `null` on the last page. Page with `limit` and `cursor`; the time window is `from` / `to`. ```typescript const query = { source: 'events' as const, eventType: 'page_view', from: '2026-11-01T00:00:00Z', limit: 100 } let page = await analytics.admin.events(collectionId, { ...query, orderBy: [{ timestamp: 'asc' }] }) while (page.nextCursor) { page = await analytics.admin.events(collectionId, { ...query, orderBy: [{ timestamp: 'asc' }], cursor: page.nextCursor }) } ```
13092
12897
 
13093
12898
  **country**(collectionId: string,
13094
12899
  body: AnalyticsCountryRequest = {}) → `Promise<AnalyticsBreakdownResponse>`
13095
- The raw events behind the reports, newest first unless `sort` says otherwise. Returns `{ items, nextCursor, source, sort }`: the event rows are in `items`; `nextCursor` is `null` on the last page. Page with `limit` and `cursor`. ```typescript let page = await analytics.admin.events(collectionId, { source: 'events', eventType: 'page_view', limit: 100 }) while (page.nextCursor) { page = await analytics.admin.events(collectionId, { source: 'events', eventType: 'page_view', limit: 100, cursor: page.nextCursor }) } ```
12900
+ The raw events behind the reports, newest first unless `orderBy` says otherwise. Returns `{ items, nextCursor, source, sort }`: the event rows are in `items`; `nextCursor` is `null` on the last page. Page with `limit` and `cursor`; the time window is `from` / `to`. ```typescript const query = { source: 'events' as const, eventType: 'page_view', from: '2026-11-01T00:00:00Z', limit: 100 } let page = await analytics.admin.events(collectionId, { ...query, orderBy: [{ timestamp: 'asc' }] }) while (page.nextCursor) { page = await analytics.admin.events(collectionId, { ...query, orderBy: [{ timestamp: 'asc' }], cursor: page.nextCursor }) } ```
13096
12901
 
13097
12902
  **topPages**(collectionId: string,
13098
12903
  body: AnalyticsClassicReportRequest = {}) → `Promise<AnalyticsBreakdownResponse>`
13099
- The raw events behind the reports, newest first unless `sort` says otherwise. Returns `{ items, nextCursor, source, sort }`: the event rows are in `items`; `nextCursor` is `null` on the last page. Page with `limit` and `cursor`. ```typescript let page = await analytics.admin.events(collectionId, { source: 'events', eventType: 'page_view', limit: 100 }) while (page.nextCursor) { page = await analytics.admin.events(collectionId, { source: 'events', eventType: 'page_view', limit: 100, cursor: page.nextCursor }) } ```
12904
+ The raw events behind the reports, newest first unless `orderBy` says otherwise. Returns `{ items, nextCursor, source, sort }`: the event rows are in `items`; `nextCursor` is `null` on the last page. Page with `limit` and `cursor`; the time window is `from` / `to`. ```typescript const query = { source: 'events' as const, eventType: 'page_view', from: '2026-11-01T00:00:00Z', limit: 100 } let page = await analytics.admin.events(collectionId, { ...query, orderBy: [{ timestamp: 'asc' }] }) while (page.nextCursor) { page = await analytics.admin.events(collectionId, { ...query, orderBy: [{ timestamp: 'asc' }], cursor: page.nextCursor }) } ```
13100
12905
 
13101
12906
  **topReferrers**(collectionId: string,
13102
12907
  body: AnalyticsClassicReportRequest = {}) → `Promise<AnalyticsBreakdownResponse>`
13103
- The raw events behind the reports, newest first unless `sort` says otherwise. Returns `{ items, nextCursor, source, sort }`: the event rows are in `items`; `nextCursor` is `null` on the last page. Page with `limit` and `cursor`. ```typescript let page = await analytics.admin.events(collectionId, { source: 'events', eventType: 'page_view', limit: 100 }) while (page.nextCursor) { page = await analytics.admin.events(collectionId, { source: 'events', eventType: 'page_view', limit: 100, cursor: page.nextCursor }) } ```
12908
+ The raw events behind the reports, newest first unless `orderBy` says otherwise. Returns `{ items, nextCursor, source, sort }`: the event rows are in `items`; `nextCursor` is `null` on the last page. Page with `limit` and `cursor`; the time window is `from` / `to`. ```typescript const query = { source: 'events' as const, eventType: 'page_view', from: '2026-11-01T00:00:00Z', limit: 100 } let page = await analytics.admin.events(collectionId, { ...query, orderBy: [{ timestamp: 'asc' }] }) while (page.nextCursor) { page = await analytics.admin.events(collectionId, { ...query, orderBy: [{ timestamp: 'asc' }], cursor: page.nextCursor }) } ```
13104
12909
 
13105
12910
  **topCampaigns**(collectionId: string,
13106
12911
  body: AnalyticsClassicReportRequest = {}) → `Promise<AnalyticsBreakdownResponse>`
13107
- The raw events behind the reports, newest first unless `sort` says otherwise. Returns `{ items, nextCursor, source, sort }`: the event rows are in `items`; `nextCursor` is `null` on the last page. Page with `limit` and `cursor`. ```typescript let page = await analytics.admin.events(collectionId, { source: 'events', eventType: 'page_view', limit: 100 }) while (page.nextCursor) { page = await analytics.admin.events(collectionId, { source: 'events', eventType: 'page_view', limit: 100, cursor: page.nextCursor }) } ```
12912
+ The raw events behind the reports, newest first unless `orderBy` says otherwise. Returns `{ items, nextCursor, source, sort }`: the event rows are in `items`; `nextCursor` is `null` on the last page. Page with `limit` and `cursor`; the time window is `from` / `to`. ```typescript const query = { source: 'events' as const, eventType: 'page_view', from: '2026-11-01T00:00:00Z', limit: 100 } let page = await analytics.admin.events(collectionId, { ...query, orderBy: [{ timestamp: 'asc' }] }) while (page.nextCursor) { page = await analytics.admin.events(collectionId, { ...query, orderBy: [{ timestamp: 'asc' }], cursor: page.nextCursor }) } ```
13108
12913
 
13109
12914
  **topSources**(collectionId: string,
13110
12915
  body: AnalyticsClassicReportRequest = {}) → `Promise<AnalyticsBreakdownResponse>`
13111
- The raw events behind the reports, newest first unless `sort` says otherwise. Returns `{ items, nextCursor, source, sort }`: the event rows are in `items`; `nextCursor` is `null` on the last page. Page with `limit` and `cursor`. ```typescript let page = await analytics.admin.events(collectionId, { source: 'events', eventType: 'page_view', limit: 100 }) while (page.nextCursor) { page = await analytics.admin.events(collectionId, { source: 'events', eventType: 'page_view', limit: 100, cursor: page.nextCursor }) } ```
12916
+ The raw events behind the reports, newest first unless `orderBy` says otherwise. Returns `{ items, nextCursor, source, sort }`: the event rows are in `items`; `nextCursor` is `null` on the last page. Page with `limit` and `cursor`; the time window is `from` / `to`. ```typescript const query = { source: 'events' as const, eventType: 'page_view', from: '2026-11-01T00:00:00Z', limit: 100 } let page = await analytics.admin.events(collectionId, { ...query, orderBy: [{ timestamp: 'asc' }] }) while (page.nextCursor) { page = await analytics.admin.events(collectionId, { ...query, orderBy: [{ timestamp: 'asc' }], cursor: page.nextCursor }) } ```
13112
12917
 
13113
12918
  **topDestinations**(collectionId: string,
13114
12919
  body: AnalyticsClassicReportRequest = {}) → `Promise<AnalyticsBreakdownResponse>`
13115
- The raw events behind the reports, newest first unless `sort` says otherwise. Returns `{ items, nextCursor, source, sort }`: the event rows are in `items`; `nextCursor` is `null` on the last page. Page with `limit` and `cursor`. ```typescript let page = await analytics.admin.events(collectionId, { source: 'events', eventType: 'page_view', limit: 100 }) while (page.nextCursor) { page = await analytics.admin.events(collectionId, { source: 'events', eventType: 'page_view', limit: 100, cursor: page.nextCursor }) } ```
12920
+ The raw events behind the reports, newest first unless `orderBy` says otherwise. Returns `{ items, nextCursor, source, sort }`: the event rows are in `items`; `nextCursor` is `null` on the last page. Page with `limit` and `cursor`; the time window is `from` / `to`. ```typescript const query = { source: 'events' as const, eventType: 'page_view', from: '2026-11-01T00:00:00Z', limit: 100 } let page = await analytics.admin.events(collectionId, { ...query, orderBy: [{ timestamp: 'asc' }] }) while (page.nextCursor) { page = await analytics.admin.events(collectionId, { ...query, orderBy: [{ timestamp: 'asc' }], cursor: page.nextCursor }) } ```
13116
12921
 
13117
12922
  ### analytics.browser
13118
12923
 
@@ -13184,7 +12989,7 @@ Create a new case POST /cases
13184
12989
  appId: string,
13185
12990
  params?: CaseListQueryParams,
13186
12991
  admin: boolean = false) → `Promise<ListResult<AppCase>>`
13187
- List cases with optional query parameters GET /cases Returns `{ items, nextCursor, count }`: the cases are in `items`, `count` is how many match in all, and `nextCursor` is `null` on the last page. Page with `limit` and `cursor`. `includeDeleted`, `contactId` and `assignedTo` are for admin calls (`admin = true`) only: the public list refuses a parameter it does not read. ```typescript let page = await app.cases.list(collectionId, appId, { status: 'open', limit: 50 }) console.log(page.items, page.count) while (page.nextCursor) { page = await app.cases.list(collectionId, appId, { status: 'open', limit: 50, cursor: page.nextCursor }) } ```
12992
+ List cases with optional query parameters GET /cases Returns `{ items, nextCursor, count }`: the cases are in `items`, `count` is how many match in all, and `nextCursor` is `null` on the last page. Page with `limit` and `cursor`. Sort with `orderBy`. A date field (`createdAt`, `updatedAt`, `closedAt`) takes a range: `{ gte, lte }`. `includeDeleted`, `contactId` and `assignedTo` are for admin calls (`admin = true`) only: the public list refuses a parameter it does not read. ```typescript let page = await app.cases.list(collectionId, appId, { status: 'open', limit: 50 }) console.log(page.items, page.count) while (page.nextCursor) { page = await app.cases.list(collectionId, appId, { status: 'open', limit: 50, cursor: page.nextCursor }) } // This month's cases, most urgent first await app.cases.list(collectionId, appId, { createdAt: { gte: '2026-11-01T00:00:00Z', lte: '2026-11-30T23:59:59Z' }, orderBy: [{ priority: 'desc' }, { createdAt: 'asc' }], }) ```
13188
12993
 
13189
12994
  **get**(collectionId: string,
13190
12995
  appId: string,
@@ -13232,8 +13037,8 @@ Get related threads and records for a case (admin only) GET /cases/:caseId/relat
13232
13037
  **get**(collectionId: string,
13233
13038
  appId: string,
13234
13039
  source: string,
13235
- opts: { q?: string; version?: string; admin?: boolean } = {},) → `Promise<import('../types/appOptions').AppOptionsList>`
13236
- `source` = `type:<record type or declared type id>` | `list:<list id>`. Admins (`admin: true`) see every entry; the public API lists public records and lists the app declares public. Hold on to `version` and pass it back to get `{ unchanged: true }` when nothing changed. Returns `{ items, nextCursor, count?, version, mode }`: the entries are in `items`, already sorted. A picker is not paged, so `nextCursor` is always `null`. ```typescript const res = await app.options.get(collectionId, appId, 'type:machine', { admin: true }) if (!res.unchanged) { options = res.items; version = res.version } ```
13040
+ opts: ListOptions & { q?: string; version?: string; admin?: boolean } = {},) → `Promise<import('../types/appOptions').AppOptionsList>`
13041
+ `source` = `type:<record type or declared type id>` | `list:<list id>`. Admins (`admin: true`) see every entry; the public API lists public records and lists the app declares public. Hold on to `version` and pass it back to get `{ unchanged: true }` when nothing changed. Returns `{ items, nextCursor, count?, version, mode }`: the entries are in `items`, already sorted, 50 at a time unless you give a `limit` (at most 1000). Pass `nextCursor` back as `cursor` for the next page; `null` means that was the last one. `q` searches the entries. ```typescript const res = await app.options.get(collectionId, appId, 'type:machine', { admin: true, limit: 200 }) if (!res.unchanged) { options = res.items; version = res.version } // A type too large to send whole: search it const found = await app.options.get(collectionId, appId, 'type:machine', { q: 'mix', limit: 20 }) ```
13237
13042
 
13238
13043
  **saveList**(collectionId: string,
13239
13044
  appId: string,
@@ -13263,7 +13068,7 @@ What a records query can use: its fields, what each can filter, sort, group or t
13263
13068
  appId: string,
13264
13069
  params?: RecordListQueryParams,
13265
13070
  admin: boolean = false) → `Promise<ListResult<AppRecord>>`
13266
- List records with optional query parameters GET /records Returns `{ items, nextCursor, count }`: the records are in `items`, `count` is how many match in all, and `nextCursor` is `null` on the last page. Page with `limit` and `cursor`. Public/owner callers only receive records with `status: "active"`. Admin callers can query all statuses (for example `draft`/`archived`). `qFields`, `dataFilter`, `contactId` and `includeDeleted` are for admin calls (`admin = true`) only: the public list refuses a parameter it does not read. ```typescript let page = await app.records.list(collectionId, appId, { recordType: 'tip', limit: 100 }) console.log(page.items, page.count) while (page.nextCursor) { page = await app.records.list(collectionId, appId, { recordType: 'tip', limit: 100, cursor: page.nextCursor }) } ```
13071
+ List records with optional query parameters GET /records Returns `{ items, nextCursor, count }`: the records are in `items`, `count` is how many match in all, and `nextCursor` is `null` on the last page. Page with `limit` and `cursor`. Search with `q`, sort with `orderBy`. A date field (`createdAt`, `updatedAt`, `startsAt`, `expiresAt`) takes a range: `{ gte, lte }`. Public/owner callers only receive records with `status: "active"`. Admin callers can query all statuses (for example `draft`/`archived`). `qFields`, `dataFilter`, `contactId` and `includeDeleted` are for admin calls (`admin = true`) only: the public list refuses a parameter it does not read. ```typescript let page = await app.records.list(collectionId, appId, { recordType: 'tip', limit: 100 }) console.log(page.items, page.count) while (page.nextCursor) { page = await app.records.list(collectionId, appId, { recordType: 'tip', limit: 100, cursor: page.nextCursor }) } // Tips about watering, changed this month, newest change first await app.records.list(collectionId, appId, { recordType: 'tip', q: 'watering', updatedAt: { gte: '2026-11-01T00:00:00Z' }, orderBy: [{ updatedAt: 'desc' }], }) ```
13267
13072
 
13268
13073
  **get**(collectionId: string,
13269
13074
  appId: string,
@@ -13311,7 +13116,7 @@ Upsert a record by ref — creates if no record with that ref exists, otherwise
13311
13116
  appId: string,
13312
13117
  input: MatchRecordsInput,
13313
13118
  admin: boolean = false) → `Promise<MatchResult>`
13314
- Match records against a runtime target scope. Returns `{ items, nextCursor, count, strategy }`: `items` are the records whose scope is satisfied by the target, most specific first, and `count` is how many matched. It is not paged (`nextCursor` is always `null`); cap the answer with `limit`. POST /records/match ```ts const { items } = await app.records.match(collectionId, appId, { target: { productId: 'prod_abc', facets: { tier: ['gold'] } }, strategy: 'best', recordType: 'nutrition', }, true); const best = items[0] // the single highest-specificity nutrition record ```
13119
+ Match records against a runtime target scope. Returns `{ items, nextCursor, count, strategy }`: `items` are the records whose scope is satisfied by the target, most specific first, and `count` is how many matched. Without a `limit` it answers up to 100. Give a `limit` (in `input`) to page: when there are more, pass `nextCursor` back as `cursor`. POST /records/match ```ts const { items } = await app.records.match(collectionId, appId, { target: { productId: 'prod_abc', facets: { tier: ['gold'] } }, strategy: 'best', recordType: 'nutrition', }, true); const best = items[0] // the single highest-specificity nutrition record // 50 at a time const target = { productId: 'prod_abc' } let page = await app.records.match(collectionId, appId, { target, limit: 50 }) while (page.nextCursor) { page = await app.records.match(collectionId, appId, { target, limit: 50, cursor: page.nextCursor }) } ```
13315
13120
 
13316
13121
  **bulkUpsert**(collectionId: string,
13317
13122
  appId: string,
@@ -13327,7 +13132,7 @@ Soft-delete records in bulk. Supports two modes: - **refs mode**: explicit list
13327
13132
  appId: string,
13328
13133
  input: ResolveAllParams,
13329
13134
  admin: boolean = false) → `Promise<ResolveAllResult>`
13330
- Resolve every applicable record for a product context in one call. Returns `{ items, nextCursor, count, context, truncated }`: `items` are the records across all tiers (proof, batch, variant, product, rule, facet, collection), deduplicated and sorted by specificity descending, each as `{ record, matchedAt, specificity }`. It is not paged (`nextCursor` is always `null`); `truncated` says the answer was cut at `limit`. POST /records/resolve-all ```ts const { items, truncated } = await app.records.resolveAll(collectionId, appId, { context: { productId: 'prod_abc' }, recordType: 'nutrition', }) for (const { record, matchedAt } of items) console.log(matchedAt, record.data) ```
13135
+ Resolve every applicable record for a product context in one call. Returns `{ items, nextCursor, count, context, truncated }`: `items` are the records across all tiers (proof, batch, variant, product, rule, facet, collection), deduplicated and sorted by specificity descending, each as `{ record, matchedAt, specificity }`. Without a `limit` it answers up to 500. Give a `limit` (in `input`) to page: when there are more, pass `nextCursor` back as `cursor`. POST /records/resolve-all ```ts const { items } = await app.records.resolveAll(collectionId, appId, { context: { productId: 'prod_abc' }, recordType: 'nutrition', }) for (const { record, matchedAt } of items) console.log(matchedAt, record.data) // 100 at a time const context = { productId: 'prod_abc' } let page = await app.records.resolveAll(collectionId, appId, { context, limit: 100 }) while (page.nextCursor) { page = await app.records.resolveAll(collectionId, appId, { context, limit: 100, cursor: page.nextCursor }) } ```
13331
13136
 
13332
13137
  **previewRule**(collectionId: string,
13333
13138
  appId: string,
@@ -13348,7 +13153,7 @@ Create a new thread POST /threads
13348
13153
  appId: string,
13349
13154
  params?: ThreadListQueryParams,
13350
13155
  admin: boolean = false) → `Promise<ListResult<AppThread>>`
13351
- List threads with optional query parameters GET /threads Returns `{ items, nextCursor, count }`: the threads are in `items`, `count` is how many match in all, and `nextCursor` is `null` on the last page. Page with `limit` and `cursor`. `includeDeleted` and `contactId` are for admin calls (`admin = true`) only: the public list refuses a parameter it does not read. ```typescript let page = await app.threads.list(collectionId, appId, { parentType: 'case', parentId: caseId, limit: 50 }) console.log(page.items, page.count) while (page.nextCursor) { page = await app.threads.list(collectionId, appId, { parentType: 'case', parentId: caseId, limit: 50, cursor: page.nextCursor }) } ```
13156
+ List threads with optional query parameters GET /threads Returns `{ items, nextCursor, count }`: the threads are in `items`, `count` is how many match in all, and `nextCursor` is `null` on the last page. Page with `limit` and `cursor`. Sort with `orderBy`. A date field (`createdAt`, `updatedAt`) takes a range: `{ gte, lte }`. `includeDeleted` and `contactId` are for admin calls (`admin = true`) only: the public list refuses a parameter it does not read. ```typescript let page = await app.threads.list(collectionId, appId, { parentType: 'case', parentId: caseId, limit: 50 }) console.log(page.items, page.count) while (page.nextCursor) { page = await app.threads.list(collectionId, appId, { parentType: 'case', parentId: caseId, limit: 50, cursor: page.nextCursor }) } // The threads with the newest replies, started this month await app.threads.list(collectionId, appId, { createdAt: { gte: '2026-11-01T00:00:00Z' }, orderBy: [{ lastReplyAt: 'desc' }], }) ```
13352
13157
 
13353
13158
  **get**(collectionId: string,
13354
13159
  appId: string,
@@ -13408,8 +13213,8 @@ Set app configuration for a collection/product scope. Requires admin authenticat
13408
13213
  **deleteConfig**(opts: AppConfigOptions) → `Promise<void>`
13409
13214
  Delete app configuration for a collection/product scope. Requires admin authentication. ```typescript await appConfiguration.deleteConfig({ appId: 'warranty-portal', collectionId: 'my-collection', admin: true }); ```
13410
13215
 
13411
- **getData**(opts: AppConfigOptions) → `Promise<ListResult<any>>`
13412
- Get all keyed data items for an app within a scope. Best for a small set of standalone documents such as FAQs, menus, lookup tables, or content fragments where the caller typically knows the item IDs. If you are modelling richer app entities that need filtering, lifecycle fields, visibility, ownership, or relationships, prefer `app.records`, `app.cases`, or `app.threads` instead. `nextCursor` is always `null`. ```typescript const { items } = await appConfiguration.getData({ appId: 'product-docs', collectionId: 'my-collection', productId: 'product-123' }); ```
13216
+ **getData**(opts: AppConfigOptions & ListOptions) → `Promise<ListResult<any>>`
13217
+ Get all keyed data items for an app within a scope. Best for a small set of standalone documents such as FAQs, menus, lookup tables, or content fragments where the caller typically knows the item IDs. If you are modelling richer app entities that need filtering, lifecycle fields, visibility, ownership, or relationships, prefer `app.records`, `app.cases`, or `app.threads` instead. `limit` and `cursor` give a `limit` (at most 1000). Pass `nextCursor` back as `cursor` for the next page; `null` means that was the last one. ```typescript const scope = { appId: 'product-docs', collectionId: 'my-collection', productId: 'product-123' } let page = await appConfiguration.getData({ ...scope, limit: 100 }); while (page.nextCursor) { page = await appConfiguration.getData({ ...scope, limit: 100, cursor: page.nextCursor }); } ```
13413
13218
 
13414
13219
  **getDataItem**(opts: AppConfigOptions) → `Promise<any>`
13415
13220
  Get a single keyed data item by ID within a scope. This is ideal when you already know the exact ID of a simple scoped document. For richer domain objects that users browse or query, prefer `app.records`, `app.cases`, or `app.threads`. ```typescript const item = await appConfiguration.getDataItem({ appId: 'product-docs', collectionId: 'my-collection', productId: 'product-123', itemId: 'manual-1' }); ```
@@ -13422,7 +13227,7 @@ Delete a keyed data item by ID within a scope. Requires admin authentication. ``
13422
13227
 
13423
13228
  **getWidgets**(collectionId: string,
13424
13229
  options?: GetCollectionWidgetsOptions) → `Promise<CollectionWidgetsResponse>`
13425
- Fetches ALL widget data (manifests + bundle files) for a collection in one call. Returns everything needed to render widgets with zero additional requests. This solves N+1 query problems by fetching manifests, JavaScript bundles, and CSS files in parallel on the server. and bundle files. The list is not paged, so `nextCursor` is always `null`. ```typescript // Fetch all widget data for a collection const { items: apps } = await Api.AppConfiguration.getWidgets(collectionId); // apps: [{ appId, manifest, widget, container, admin }, ...] // widget / container: { js: { umd?, esm? }, css?, source?, styles? } // source / styles - the bundle inlined (when small enough); js / css - URLs otherwise. // admin - URL of the app's app.admin.json (setup / tunable options), or null. // Bundles don't ship React: they resolve shared libraries from the HOST's globals // (host-dependency-contract.md), so loading one is a host's job. // // Inside a host (Portal / Hub), an app showing ANOTHER app's widget should not load // bundles itself - use the host-provided EmbeddedWidget prop: // <EmbeddedWidget appId="raffle" size="standard" /> (docs/widgets.md) // Force refresh all widgets const { items: fresh } = await Api.AppConfiguration.getWidgets(collectionId, { force: true }); ```
13230
+ Fetches ALL widget data (manifests + bundle files) for a collection in one call. Returns everything needed to render widgets with zero additional requests. This solves N+1 query problems by fetching manifests, JavaScript bundles, and CSS files in parallel on the server. and bundle files. It always comes back whole: there is no `limit` or `cursor`, and `nextCursor` is always `null`. ```typescript // Fetch all widget data for a collection const { items: apps } = await Api.AppConfiguration.getWidgets(collectionId); // apps: [{ appId, manifest, widget, container, admin }, ...] // widget / container: { js: { umd?, esm? }, css?, source?, styles? } // source / styles - the bundle inlined (when small enough); js / css - URLs otherwise. // admin - URL of the app's app.admin.json (setup / tunable options), or null. // Bundles don't ship React: they resolve shared libraries from the HOST's globals // (host-dependency-contract.md), so loading one is a host's job. // // Inside a host (Portal / Hub), an app showing ANOTHER app's widget should not load // bundles itself - use the host-provided EmbeddedWidget prop: // <EmbeddedWidget appId="raffle" size="standard" /> (docs/widgets.md) // Force refresh all widgets const { items: fresh } = await Api.AppConfiguration.getWidgets(collectionId, { force: true }); ```
13426
13231
 
13427
13232
  **resolveFeature**(system: SystemBlock | undefined, flag: string) → `boolean`
13428
13233
  Resolve whether a feature flag is on, applying the `accountType` default: `enterprise` accounts default every flag to **on** unless `features[flag]` is explicitly `false`; `standard` accounts (or missing `accountType`) default every flag to **off** unless `features[flag]` is explicitly `true`. An explicit value always wins over the default either way. This is the same logic `isFeatureEnabled()` / `isFeatureEnabledSync()` use internally — call those instead in normal code. `system.features` and `accountType` are public data (no admin-only feature-check path exists), so there's no reason to fetch differently for an admin surface. This is exposed separately only for the rare case where you already have a `system` block in hand from somewhere other than `getAppConfig()` (e.g. server-rendered props) and want to resolve a flag from it directly. ```typescript const enabled = appConfiguration.resolveFeature(someSystemBlock, 'custom_domain'); ```
@@ -13460,32 +13265,35 @@ Upload an asset from a URL The server will fetch the file from the provided URL
13460
13265
  assetId: string) → `Promise<AssetResponse>`
13461
13266
  Upload an asset from a URL The server will fetch the file from the provided URL and store it permanently in your CDN. This solves CORS issues and ensures files are permanently stored. ```typescript // Upload AI-generated image const asset = await asset.uploadFromUrl({ url: 'https://oaidalleapiprodscus.blob.core.windows.net/...', scope: { type: 'collection', collectionId: 'my-collection' }, metadata: { name: 'AI Generated Image', app: 'gallery' } }); // Upload stock photo const asset = await asset.uploadFromUrl({ url: 'https://images.unsplash.com/photo-...', scope: { type: 'product', collectionId: 'my-collection', productId: 'wine-bottle' }, folder: 'images', metadata: { name: 'Product Photo' } }); ```
13462
13267
 
13463
- **listForCollection**(collectionId: string) → `Promise<ListResult<AssetResponse>>`
13464
- The collection's own assets (public). Returns `{ items, nextCursor }`: the assets are in `items`. The list is not paged, so `nextCursor` is always `null`. ```typescript const { items } = await asset.listForCollection('my-collection') ```
13268
+ **listForCollection**(collectionId: string,
13269
+ options: ListOptions = {}) → `Promise<ListResult<AssetResponse>>`
13270
+ The collection's own assets (public). Returns `{ items, nextCursor, count }`: the assets are in `items`, 50 at a time unless you give a `limit` (at most 1000). Pass `nextCursor` back as `cursor` for the next page; `null` means that was the last one. ```typescript let page = await asset.listForCollection('my-collection', { limit: 100 }) while (page.nextCursor) page = await asset.listForCollection('my-collection', { limit: 100, cursor: page.nextCursor }) ```
13465
13271
 
13466
13272
  **getForProduct**(collectionId: string,
13467
13273
  productId: string,
13468
13274
  assetId: string) → `Promise<AssetResponse>`
13469
- The collection's own assets (public). Returns `{ items, nextCursor }`: the assets are in `items`. The list is not paged, so `nextCursor` is always `null`. ```typescript const { items } = await asset.listForCollection('my-collection') ```
13275
+ The collection's own assets (public). Returns `{ items, nextCursor, count }`: the assets are in `items`, 50 at a time unless you give a `limit` (at most 1000). Pass `nextCursor` back as `cursor` for the next page; `null` means that was the last one. ```typescript let page = await asset.listForCollection('my-collection', { limit: 100 }) while (page.nextCursor) page = await asset.listForCollection('my-collection', { limit: 100, cursor: page.nextCursor }) ```
13470
13276
 
13471
13277
  **listForProduct**(collectionId: string,
13472
- productId: string) → `Promise<ListResult<AssetResponse>>`
13473
- A product's assets (public). Returns `{ items, nextCursor }`: the assets are in `items`. The list is not paged, so `nextCursor` is always `null`. ```typescript const { items } = await asset.listForProduct('my-collection', 'wine-bottle') ```
13278
+ productId: string,
13279
+ options: ListOptions = {}) → `Promise<ListResult<AssetResponse>>`
13280
+ A product's assets (public). Returns `{ items, nextCursor, count }`: the assets are in `items`, 50 at a time unless you give a `limit` (at most 1000). Pass `nextCursor` back as `cursor` for the next page; `null` means that was the last one. ```typescript const { items, nextCursor } = await asset.listForProduct('my-collection', 'wine-bottle', { limit: 100 }) ```
13474
13281
 
13475
13282
  **getForProof**(collectionId: string,
13476
13283
  productId: string,
13477
13284
  proofId: string,
13478
13285
  assetId: string) → `Promise<AssetResponse>`
13479
- A product's assets (public). Returns `{ items, nextCursor }`: the assets are in `items`. The list is not paged, so `nextCursor` is always `null`. ```typescript const { items } = await asset.listForProduct('my-collection', 'wine-bottle') ```
13286
+ A product's assets (public). Returns `{ items, nextCursor, count }`: the assets are in `items`, 50 at a time unless you give a `limit` (at most 1000). Pass `nextCursor` back as `cursor` for the next page; `null` means that was the last one. ```typescript const { items, nextCursor } = await asset.listForProduct('my-collection', 'wine-bottle', { limit: 100 }) ```
13480
13287
 
13481
13288
  **listForProof**(collectionId: string,
13482
13289
  productId: string,
13483
13290
  proofId: string,
13484
- appId?: string) → `Promise<ListResult<AssetResponse>>`
13485
- A proof's assets (public), optionally only one app's. Returns `{ items, nextCursor }`: the assets are in `items`. The list is not paged, so `nextCursor` is always `null`. ```typescript const { items } = await asset.listForProof('my-collection', 'wine-bottle', proofId, 'gallery') ```
13291
+ appId?: string,
13292
+ options: ListOptions = {}) → `Promise<ListResult<AssetResponse>>`
13293
+ A proof's assets (public), optionally only one app's. Returns `{ items, nextCursor, count }`: the assets are in `items`, 50 at a time unless you give a `limit` (at most 1000). Pass `nextCursor` back as `cursor` for the next page; `null` means that was the last one. ```typescript const { items, nextCursor } = await asset.listForProof('my-collection', 'wine-bottle', proofId, 'gallery', { limit: 100 }) ```
13486
13294
 
13487
13295
  **list**(options: ListAssetsOptions) → `Promise<ListResult<Asset>>`
13488
- List assets for a given scope (a collection, a product or a proof). Returns `{ items, nextCursor }`: the assets are in `items`. These lists are not paged, so `nextCursor` is always `null`. ```typescript const { items } = await asset.list({ scope: { type: 'product', collectionId: 'my-collection', productId: 'wine-bottle' }, appId: 'gallery', }) ```
13296
+ List assets for a given scope (a collection, a product or a proof). Returns `{ items, nextCursor, count }`: the assets are in `items`, 50 at a time unless you give a `limit` (at most 1000). Pass `nextCursor` back as `cursor` for the next page; `null` means that was the last one. ```typescript const scope = { type: 'product', collectionId: 'my-collection', productId: 'wine-bottle' } as const let page = await asset.list({ scope, appId: 'gallery', limit: 100 }) while (page.nextCursor) page = await asset.list({ scope, appId: 'gallery', limit: 100, cursor: page.nextCursor }) ```
13489
13297
 
13490
13298
  **get**(options: GetAssetOptions) → `Promise<Asset>`
13491
13299
  Get an asset by id within a scope (public)
@@ -13494,7 +13302,7 @@ Get an asset by id within a scope (public)
13494
13302
  Remove an asset by id within a scope (admin)
13495
13303
 
13496
13304
  **listAdmin**(options: AdminListAssetsOptions) → `Promise<ListResult<Asset>>`
13497
- List assets for a collection with full filtering options (admin). Returns `{ items, nextCursor }`: the assets are in `items`, 50 at a time unless you give a `limit` (at most 200). Pass `nextCursor` back as `cursor` for the next page; `null` means that was the last one. `count` (how many match in all) is there when you gave a `limit` or a `cursor`. ```typescript let page = await asset.listAdmin({ collectionId: 'my-collection', assetType: 'Image', limit: 20 }) console.log(`${page.count} images`) while (page.nextCursor) { page = await asset.listAdmin({ collectionId: 'my-collection', assetType: 'Image', limit: 20, cursor: page.nextCursor }) } ```
13305
+ List assets for a collection with full filtering options (admin). Returns `{ items, nextCursor }`: the assets are in `items`, 50 at a time unless you give a `limit` (at most 200). Pass `nextCursor` back as `cursor` for the next page; `null` means that was the last one. `count` (how many match in all) is there when you gave a `limit` or a `cursor`. Sort with `orderBy` (`createdAt`, `name`, `size` or `assetType`). ```typescript let page = await asset.listAdmin({ collectionId: 'my-collection', assetType: 'Image', orderBy: [{ name: 'asc' }], limit: 20 }) console.log(`${page.count} images`) while (page.nextCursor) { page = await asset.listAdmin({ collectionId: 'my-collection', assetType: 'Image', orderBy: [{ name: 'asc' }], limit: 20, cursor: page.nextCursor }) } ```
13498
13306
 
13499
13307
  **getAdmin**(collectionId: string, assetId: string) → `Promise<Asset>`
13500
13308
  Get a single asset by ID (admin).
@@ -13529,22 +13337,13 @@ Open a resumable upload for a large file (e.g. video). The bytes are chunked dir
13529
13337
  **resumeUpload**(handleId: string, file: File) → `Promise<ResumableUploadHandle>`
13530
13338
  Resume a previously-created resumable upload after a reload/app restart. Pass the persisted `handle.id` and the same `File`; the transfer continues from the offset storage already holds rather than restarting.
13531
13339
 
13532
- ### async
13533
-
13534
- **enqueueAsyncJob**(collectionId: string,
13535
- params: EnqueueAsyncJobRequest) → `Promise<EnqueueAsyncJobResponse>`
13536
- Enqueue a background job for a collection POST /admin/collection/:collectionId/async/jobs (202)
13537
-
13538
- **getAsyncJobStatus**(collectionId: string,
13539
- jobId: number) → `Promise<Job>`
13540
- Get job status by ID (may return 404 if completed/removed) GET /admin/collection/:collectionId/async/jobs/:jobId
13541
-
13542
13340
  ### attestation
13543
13341
 
13544
13342
  **list**(collectionId: string,
13545
13343
  productId: string,
13546
- proofId: string) → `Promise<ListResult<AttestationResponse>>`
13547
- List all attestations for a proof, in one list (no pages): `{ items, nextCursor: null }`.
13344
+ proofId: string,
13345
+ options: ListOptions = {}) → `Promise<ListResult<AttestationResponse>>`
13346
+ List the attestations for a proof: `{ items, nextCursor, count }`, 50 at a time unless you give a `limit` (at most 1000). Pass `nextCursor` back as `cursor` for the next page; `null` means that was the last one. ```typescript let page = await attestation.list('coll_123', 'prod_abc', 'proof_1', { limit: 100 }) while (page.nextCursor) page = await attestation.list('coll_123', 'prod_abc', 'proof_1', { limit: 100, cursor: page.nextCursor }) ```
13548
13347
 
13549
13348
  **get**(collectionId: string,
13550
13349
  productId: string,
@@ -13583,11 +13382,11 @@ Batch-create attestations (admin). Sends an array of `CreateAttestationInput` ob
13583
13382
 
13584
13383
  **list**(collectionId: string,
13585
13384
  params: ListAttestationsParams) → `Promise<ListAttestationsResponse>`
13586
- List attestations for a subject (admin). Returns all three data zones. Supports filtering by type and date range. `limit` and `cursor` ```typescript let page = await attestations.list('coll_123', { subjectType: 'container', subjectId: 'uuid-of-cask', attestationType: 'temperature', recordedAfter: '2025-01-01T00:00:00Z', limit: 50, }) const records = page.items // next page: pass the cursor back with the same filters if (page.nextCursor) page = await attestations.list('coll_123', { ...filters, limit: 50, cursor: page.nextCursor }) ```
13385
+ List attestations for a subject (admin). Returns all three data zones. Supports filtering by type and by when it was recorded (`recordedAt: { gte, lte }`). `limit` and `cursor` ```typescript const filters = { subjectType: 'container', subjectId: 'uuid-of-cask', attestationType: 'temperature', recordedAt: { gte: '2025-01-01T00:00:00Z' }, } as const let page = await attestations.list('coll_123', { ...filters, limit: 50 }) const records = page.items // next page: pass the cursor back with the same filters if (page.nextCursor) page = await attestations.list('coll_123', { ...filters, limit: 50, cursor: page.nextCursor }) ```
13587
13386
 
13588
13387
  **summary**(collectionId: string,
13589
13388
  params: AttestationSummaryParams) → `Promise<AttestationSummaryResponse>`
13590
- Time-series summary of attestations (admin). Aggregates attestation counts (and optionally a numeric `value` field) into time buckets. Useful for charting trends. `attestationType` are required ```typescript const { summary } = await attestations.summary('coll_123', { subjectType: 'container', subjectId: 'uuid-of-cask', attestationType: 'temperature', valueField: 'celsius', groupBy: 'day', recordedAfter: '2025-01-01T00:00:00Z', }) ```
13389
+ Time-series summary of attestations (admin). Aggregates attestation counts (and optionally a numeric `value` field) into time buckets. Useful for charting trends. `attestationType` are required ```typescript const { summary } = await attestations.summary('coll_123', { subjectType: 'container', subjectId: 'uuid-of-cask', attestationType: 'temperature', valueField: 'celsius', groupBy: 'day', recordedAt: { gte: '2025-01-01T00:00:00Z' }, }) ```
13591
13390
 
13592
13391
  **latest**(collectionId: string,
13593
13392
  params: AttestationLatestParams) → `Promise<AttestationLatestResponse>`
@@ -13607,7 +13406,7 @@ Tree latest snapshot — most-recent record per type across a container subtree
13607
13406
 
13608
13407
  **publicList**(collectionId: string,
13609
13408
  params: ListAttestationsParams) → `Promise<PublicListAttestationsResponse>`
13610
- List attestations for a subject (public). Records with `visibility='admin'` are always excluded. Records with `visibility='owner'` are included only when the caller provides a valid Firebase ID token that resolves to the subject owner. The `audience` field in the response indicates the tier that was served. `limit` and `cursor` `null` on the last page ```typescript const { items: records, nextCursor, audience } = await attestations.publicList('coll_123', { subjectType: 'proof', subjectId: 'proof-uuid', }) ```
13409
+ List attestations for a subject (public). Records with `visibility='admin'` are always excluded. Records with `visibility='owner'` are included only when the caller provides a valid Firebase ID token that resolves to the subject owner. The `audience` field in the response indicates the tier that was served. `limit` and `cursor`; filter by when it was recorded with `recordedAt: { gte, lte }` `null` on the last page ```typescript const { items: records, nextCursor, audience } = await attestations.publicList('coll_123', { subjectType: 'proof', subjectId: 'proof-uuid', recordedAt: { gte: '2025-01-01T00:00:00Z', lte: '2025-12-31T23:59:59Z' }, limit: 50, }) ```
13611
13410
 
13612
13411
  **publicCreate**(collectionId: string,
13613
13412
  data: OwnerAttestationInput) → `Promise<CreateOwnerAttestationResponse>`
@@ -13637,7 +13436,7 @@ Tree latest snapshot (public).
13637
13436
  **publicContainerList**(collectionId: string,
13638
13437
  containerId: string,
13639
13438
  params?: Omit<ListAttestationsParams, 'subjectType' | 'subjectId'>) → `Promise<PublicListAttestationsResponse>`
13640
- List attestations for a specific container (public shortcut). Equivalent to `publicList` with `subjectType='container'` and `subjectId=containerId` pre-filled. ```typescript const { items: records, nextCursor } = await attestations.publicContainerList('coll_123', containerId, { attestationType: 'temperature', limit: 50, }) ```
13439
+ List attestations for a specific container (public shortcut). Equivalent to `publicList` with `subjectType='container'` and `subjectId=containerId` pre-filled. ```typescript const { items: records, nextCursor } = await attestations.publicContainerList('coll_123', containerId, { attestationType: 'temperature', recordedAt: { gte: '2025-01-01T00:00:00Z' }, limit: 50, }) ```
13641
13440
 
13642
13441
  **publicContainerSummary**(collectionId: string,
13643
13442
  containerId: string,
@@ -13832,8 +13631,8 @@ Generate a fresh set of recovery codes, invalidating any previous set (authentic
13832
13631
  **removeMfaFactor**(clientId: string, factor: MfaFactor, password: string) → `Promise<SuccessResponse>`
13833
13632
  Remove an enrolled MFA factor (authenticated). Server route is DELETE with a body.
13834
13633
 
13835
- **listTrustedDevices**(clientId: string) → `Promise<ListResult<TrustedDevice>>`
13836
- List devices trusted to skip MFA challenges for the current user (authenticated). Returns `{ items, nextCursor }`: the devices are in `items`. The list is not paged, so `nextCursor` is always `null`. ```typescript const { items: devices } = await authKit.listTrustedDevices(clientId) ```
13634
+ **listTrustedDevices**(clientId: string, options: ListOptions = {}) → `Promise<ListResult<TrustedDevice>>`
13635
+ List devices trusted to skip MFA challenges for the current user (authenticated), a page at a time. Returns `{ items, nextCursor }`: the devices are in `items`. Page with `limit` (50 unless you say) and `cursor`. ```typescript let page = await authKit.listTrustedDevices(clientId, { limit: 50 }) page.items // TrustedDevice[] while (page.nextCursor) page = await authKit.listTrustedDevices(clientId, { limit: 50, cursor: page.nextCursor }) ```
13837
13636
 
13838
13637
  **revokeTrustedDevice**(clientId: string, id: string) → `Promise<SuccessResponse>`
13839
13638
  Revoke a single trusted device by id (authenticated).
@@ -13844,8 +13643,8 @@ Load the **public** AuthKit config for a client (no auth). Returns branding + th
13844
13643
  **get**(collectionId: string, authKitId: string) → `Promise<AuthKitConfig>`
13845
13644
  Get the full AuthKit config, including admin-only fields like `security.lockout` (admin auth).
13846
13645
 
13847
- **list**(collectionId: string) → `Promise<ListResult<AuthKitConfig>>`
13848
- List a collection's AuthKit configs (admin). Returns `{ items, nextCursor }`: the configs are in `items`. The list is not paged, so `nextCursor` is always `null`. There is no public list. ```typescript const { items: kits } = await authKit.list('coll_123') ```
13646
+ **list**(collectionId: string, options: ListOptions = {}) → `Promise<ListResult<AuthKitConfig>>`
13647
+ List a collection's AuthKit configs (admin), a page at a time. Returns `{ items, nextCursor }`: the configs are in `items`. Page with `limit` (50 unless you say) and `cursor`. There is no public list. ```typescript let page = await authKit.list('coll_123', { limit: 50 }) page.items // AuthKitConfig[] while (page.nextCursor) page = await authKit.list('coll_123', { limit: 50, cursor: page.nextCursor }) ```
13849
13648
 
13850
13649
  **create**(collectionId: string, data: AuthKitConfigInput) → `Promise<AuthKitConfig>`
13851
13650
  Create an AuthKit client config (admin). Accepts the account `security` policy — see {@link AuthKitConfigInput}.
@@ -13894,8 +13693,9 @@ An account email as it would be sent now — or with draft settings (`emailTempl
13894
13693
  Get a single batch by ID for a collection and product (admin only).
13895
13694
 
13896
13695
  **list**(collectionId: string,
13897
- productId: string) → `Promise<ListResult<BatchResponse>>`
13898
- List all batches for a collection and product (admin only). All of them come back in one answer: `nextCursor` is always null. ```typescript const { items } = await batch.list('coll_123', 'prod_abc') console.log(`${items.length} batches`) ```
13696
+ productId: string,
13697
+ options: ListOptions = {}) → `Promise<ListResult<BatchResponse>>`
13698
+ List the batches for a collection and product (admin only), 50 at a time unless you give a `limit` (at most 1000). Pass `nextCursor` back as `cursor` for the next page; `null` means that was the last one. ```typescript let page = await batch.list('coll_123', 'prod_abc', { limit: 100 }) console.log(`${page.count} batches`) while (page.nextCursor) page = await batch.list('coll_123', 'prod_abc', { limit: 100, cursor: page.nextCursor }) ```
13899
13699
 
13900
13700
  **create**(collectionId: string,
13901
13701
  productId: string,
@@ -13933,7 +13733,7 @@ Look up a serial number by code for a batch (admin only).
13933
13733
 
13934
13734
  **searchInCollection**(collectionId: string,
13935
13735
  params?: SearchBatchesRequest) → `Promise<ListResult<BatchResponse>>`
13936
- Search for batches across all products in a collection. Allows searching by batch ID or name, with optional product filtering. The matches come back in one answer (`nextCursor` is always null); `limit` is the most it returns. ```typescript // Search for batches containing "2024" const { items: batches } = await batch.searchInCollection('coll_123', { search: 'BATCH-2024', limit: 50 }) // Filter batches for a specific product const productBatches = await batch.searchInCollection('coll_123', { productId: 'prod_abc', limit: 100 }) // Get all batches in collection const allBatches = await batch.searchInCollection('coll_123') // Check for expired batches (expiryDate is an ISO 8601 string) batches.forEach(batch => { if (batch.expiryDate && new Date(batch.expiryDate) < new Date()) { console.log(`Batch ${batch.id} is expired`) } }) ```
13736
+ Search for batches across all products in a collection. Allows searching by batch ID or name (`q`), with optional product filtering. `limit` is how many it returns (100 unless you say). When there are more, pass `nextCursor` back as `cursor` for the next ones; `null` means there are no more. ```typescript // Search for batches containing "2024", 50 at a time let page = await batch.searchInCollection('coll_123', { q: 'BATCH-2024', limit: 50 }) const batches = [...page.items] while (page.nextCursor) { page = await batch.searchInCollection('coll_123', { q: 'BATCH-2024', limit: 50, cursor: page.nextCursor }) batches.push(...page.items) } // Filter batches for a specific product const productBatches = await batch.searchInCollection('coll_123', { productId: 'prod_abc', limit: 100 }) // The first batches in the collection const firstBatches = await batch.searchInCollection('coll_123') // Check for expired batches (expiryDate is an ISO 8601 string) batches.forEach(batch => { if (batch.expiryDate && new Date(batch.expiryDate) < new Date()) { console.log(`Batch ${batch.id} is expired`) } }) ```
13937
13737
 
13938
13738
  **findInCollection**(collectionId: string,
13939
13739
  batchId: string) → `Promise<BatchResponse>`
@@ -13941,8 +13741,9 @@ Find a specific batch by ID across all products in a collection. Returns the bat
13941
13741
 
13942
13742
  **getBatchTags**(collectionId: string,
13943
13743
  batchId: string,
13944
- claimSetId?: string) → `Promise<ListResult<BatchTag>>`
13945
- Get all tags/codes assigned to a specific batch. Shows which claim set codes have been assigned to this batch. All of them come back in one answer: `nextCursor` is always null. ```typescript // Get all tags assigned to a batch const { items: tags } = await batch.getBatchTags('coll_123', 'BATCH-2024-001') console.log(`Batch has ${tags.length} tags assigned`) tags.forEach(tag => { console.log(`Code: ${tag.code}, ClaimSet: ${tag.claimSetId}, TagID: ${tag.tagId}`) }) // Get tags from a specific claim set const claimSetTags = await batch.getBatchTags('coll_123', 'BATCH-2024-001', '000001') ```
13744
+ claimSetId?: string,
13745
+ options: ListOptions = {}) → `Promise<ListResult<BatchTag>>`
13746
+ Get all tags/codes assigned to a specific batch. Shows which claim set codes have been assigned to this batch, 50 at a time unless you give a `limit` (at most 1000). Pass `nextCursor` back as `cursor` for the next page; `null` means that was the last one. `count` is how many there are in all. ```typescript // The tags assigned to a batch, 200 at a time let page = await batch.getBatchTags('coll_123', 'BATCH-2024-001', undefined, { limit: 200 }) console.log(`Batch has ${page.count} tags assigned`) page.items.forEach(tag => { console.log(`Code: ${tag.code}, ClaimSet: ${tag.claimSetId}, TagID: ${tag.tagId}`) }) while (page.nextCursor) { page = await batch.getBatchTags('coll_123', 'BATCH-2024-001', undefined, { limit: 200, cursor: page.nextCursor }) } // Get tags from a specific claim set const claimSetTags = await batch.getBatchTags('coll_123', 'BATCH-2024-001', '000001') ```
13946
13747
 
13947
13748
  ### bookings
13948
13749
 
@@ -13950,10 +13751,10 @@ Get all tags/codes assigned to a specific batch. Shows which claim set codes hav
13950
13751
  Book. All claims succeed together or nothing is written; a clash fails with 409 (`SLOT_FULL`, `RESOURCE_TAKEN`, `PER_CONTACT_LIMIT`, …). Pass `idempotencyKey` so a retry never books twice. Public (admin = false): the app's `publicCreate.bookings` rules decide the status and limits; an anonymous guest may get `editToken` back (once) to manage the booking later. POST /bookings
13951
13752
 
13952
13753
  **list**(collectionId: string, appId: string, params?: BookingListOptions, admin: boolean = true) → `Promise<ListResult<Booking>>`
13953
- List bookings (admin), a page at a time. `count` is how many match in all. There is no public list: a signed-in booker uses {@link mine}. GET /bookings ```typescript let page = await bookings.list(collectionId, appId, { status: 'confirmed', from: new Date(), limit: 50 }) page.items // Booking[] page.count // how many match in all while (page.nextCursor) { page = await bookings.list(collectionId, appId, { status: 'confirmed', from: new Date(), limit: 50, cursor: page.nextCursor }) } ```
13754
+ List bookings (admin), a page at a time. `count` is how many match in all. `from` / `to` pick the bookings overlapping that time; `orderBy` sorts (earliest start first unless you say). There is no public list: a signed-in booker uses {@link mine}. GET /bookings ```typescript const from = new Date() let page = await bookings.list(collectionId, appId, { status: 'confirmed', from, orderBy: [{ startsAt: 'desc' }], limit: 50 }) page.items // Booking[] page.count // how many match in all while (page.nextCursor) { page = await bookings.list(collectionId, appId, { status: 'confirmed', from, orderBy: [{ startsAt: 'desc' }], limit: 50, cursor: page.nextCursor }) } ```
13954
13755
 
13955
13756
  **mine**(collectionId: string, appId: string, params?: Omit<BookingListOptions, 'contactId'>) → `Promise<ListResult<Booking>>`
13956
- The signed-in caller's own bookings (public), a page at a time. GET /bookings/mine ```typescript const { items, nextCursor, count } = await bookings.mine(collectionId, appId, { from: new Date() }) ```
13757
+ The signed-in caller's own bookings (public), a page at a time. Takes the same options as {@link list}, except `contactId`. GET /bookings/mine ```typescript const { items, nextCursor, count } = await bookings.mine(collectionId, appId, { from: new Date(), orderBy: [{ startsAt: 'asc' }], limit: 20 }) ```
13957
13758
 
13958
13759
  **get**(collectionId: string, appId: string, bookingId: string, admin: boolean = false, opts?: BookingAccessOptions) → `Promise<Booking>`
13959
13760
  Get one booking. Public: the signed-in booker, or a guest passing `{ editToken }`. GET /bookings/:bookingId
@@ -13990,10 +13791,10 @@ Message the people booked (admin): a template to everyone on a slot, or everyone
13990
13791
  **create**(collectionId: string, appId: string, input: CreateBlockInput) → `Promise<BookingAllocation>`
13991
13792
 
13992
13793
  **list**(collectionId: string, appId: string, params?: BlockListOptions) → `Promise<ListResult<BookingAllocation>>`
13993
- The blocks on a resource and/or in a date range, a page at a time. GET /bookings/blocks ```typescript const { items, nextCursor } = await bookings.blocks.list(collectionId, appId, { resourceType: 'record', resourceId: 'staff-1' }) ```
13794
+ The blocks on a resource and/or in a date range (`from` / `to`), a page at a time (`limit`, `cursor`). GET /bookings/blocks ```typescript const { items, nextCursor } = await bookings.blocks.list(collectionId, appId, { resourceType: 'record', resourceId: 'staff-1', from: '2026-12-01T00:00:00Z', to: '2027-01-01T00:00:00Z', limit: 50, }) ```
13994
13795
 
13995
13796
  **remove**(collectionId: string, appId: string, blockId: string) → `Promise<`
13996
- The blocks on a resource and/or in a date range, a page at a time. GET /bookings/blocks ```typescript const { items, nextCursor } = await bookings.blocks.list(collectionId, appId, { resourceType: 'record', resourceId: 'staff-1' }) ```
13797
+ The blocks on a resource and/or in a date range (`from` / `to`), a page at a time (`limit`, `cursor`). GET /bookings/blocks ```typescript const { items, nextCursor } = await bookings.blocks.list(collectionId, appId, { resourceType: 'record', resourceId: 'staff-1', from: '2026-12-01T00:00:00Z', to: '2027-01-01T00:00:00Z', limit: 50, }) ```
13997
13798
 
13998
13799
  ### bookings.slots
13999
13800
 
@@ -14004,7 +13805,7 @@ Create a slot (admin). POST /bookings/slots
14004
13805
  Create many slots at once — a series — all-or-nothing (admin, max 500). POST /bookings/slots/batch
14005
13806
 
14006
13807
  **list**(collectionId: string, appId: string, params?: SlotListOptions, admin: boolean = false) → `Promise<ListResult<BookingSlot>>`
14007
- List slots, a page at a time. Public: open, public slots only, each with `remaining`. GET /bookings/slots ```typescript const { items, nextCursor, count } = await bookings.slots.list(collectionId, appId, { from, to, available: true }) ```
13808
+ List slots, a page at a time. Public: open, public slots only, each with `remaining`. `from` / `to` pick the slots in that time; `orderBy` sorts them. GET /bookings/slots ```typescript const { items, nextCursor, count } = await bookings.slots.list(collectionId, appId, { from, to, available: true, orderBy: [{ startsAt: 'asc' }], limit: 50, }) ```
14008
13809
 
14009
13810
  **get**(collectionId: string, appId: string, slotId: string, admin: boolean = false) → `Promise<BookingSlot>`
14010
13811
  GET /bookings/slots/:slotId
@@ -14084,8 +13885,8 @@ Create a Responses API request (streaming or non-streaming)
14084
13885
 
14085
13886
  ### claimSet
14086
13887
 
14087
- **getAll**(collectionId?: string) → `Promise<ListResult<any>>`
14088
- Get all claim sets. Returns `{ items, nextCursor }`: the claim sets are in `items`. The list is not paged, so `nextCursor` is always `null`. When collectionId is provided, returns claim sets for that collection. When omitted, returns all claim sets owned by the authenticated user. ```typescript const { items } = await claimSet.getAll('coll_123') ```
13888
+ **getAll**(collectionId?: string, options: ListOptions = {}) → `Promise<ListResult<any>>`
13889
+ Get all claim sets, a page at a time. Returns `{ items, nextCursor }`: the claim sets are in `items`; pass `nextCursor` back as `cursor` for the next page (`null` means that was the last one). When collectionId is provided, returns claim sets for that collection. When omitted, returns all claim sets owned by the authenticated user. ```typescript let page = await claimSet.getAll('coll_123', { limit: 50 }) while (page.nextCursor) page = await claimSet.getAll('coll_123', { limit: 50, cursor: page.nextCursor }) // Your own claim sets (no collection) const { items } = await claimSet.getAll(undefined, { limit: 50 }) ```
14089
13890
 
14090
13891
  **get**(claimSetId: string, collectionId?: string) → `Promise<any>`
14091
13892
  Get a specific claim set by ID.
@@ -14102,8 +13903,8 @@ Delete (soft-delete) a claim set.
14102
13903
  **getAllTags**(claimSetId: string, collectionId?: string) → `Promise<any>`
14103
13904
  Get all tags for a claim set (including data). This is not one of the SDK 3 lists: the answer is the claim set itself with its tags inside. Without a collectionId (your own claim set) they are in `tags`; with one they are in `codes` (the tag ids), or in `codeMap` (id → key) for a secure set.
14104
13905
 
14105
- **getAssignedTags**(claimSetId: string, collectionId?: string) → `Promise<ListResult<any> & Record<string, any>>`
14106
- Get assigned tags for a claim set — tags soft-assigned to a collection or product. Returns `{ items, nextCursor }` with the claim set's own fields (`id`, `name`, …) beside them: the tags are in `items`. The list is not paged, so `nextCursor` is always `null`. ```typescript const { items, name } = await claimSet.getAssignedTags('12', 'coll_123') console.log(`${items.length} tags of ${name} are assigned`) ```
13906
+ **getAssignedTags**(claimSetId: string, collectionId?: string, options: ListOptions = {}) → `Promise<ListResult<any> & Record<string, any>>`
13907
+ Get assigned tags for a claim set — tags soft-assigned to a collection or product. Returns `{ items, nextCursor }` with the claim set's own fields (`id`, `name`, …) beside them: the tags are in `items`, a page at a time. Pass `nextCursor` back as `cursor` for the next page (`null` means that was the last one). ```typescript let page = await claimSet.getAssignedTags('12', 'coll_123', { limit: 50 }) console.log(`Assigned tags of ${page.name}:`, page.items) while (page.nextCursor) { page = await claimSet.getAssignedTags('12', 'coll_123', { limit: 50, cursor: page.nextCursor }) } ```
14107
13908
 
14108
13909
  **createTag**(claimSetId: string,
14109
13910
  data: CreateClaimSetTagRequest,
@@ -14135,8 +13936,8 @@ Update claim data for a claim set (collection-scoped).
14135
13936
 
14136
13937
  ### claimSet.ranges
14137
13938
 
14138
- **list**(scope: ClaimSetScope, claimSetId: string) → `Promise<ListResult<ClaimSetRange>>`
14139
- The ranges in a set, lowest index first. Returns `{ items, nextCursor }`: the ranges are in `items`. The list is not paged, so `nextCursor` is always `null`. ```typescript const { items: ranges } = await claimSet.ranges.list({ collectionId: 'coll_123' }, '12') ```
13939
+ **list**(scope: ClaimSetScope, claimSetId: string, options: ListOptions = {}) → `Promise<ListResult<ClaimSetRange>>`
13940
+ The ranges in a set, lowest index first, a page at a time (50 unless you give a `limit`). Returns `{ items, nextCursor }`: the ranges are in `items`; pass `nextCursor` back as `cursor` for the next page (`null` means that was the last one). ```typescript let page = await claimSet.ranges.list({ collectionId: 'coll_123' }, '12', { limit: 50 }) while (page.nextCursor) { page = await claimSet.ranges.list({ collectionId: 'coll_123' }, '12', { limit: 50, cursor: page.nextCursor }) } ```
14140
13941
 
14141
13942
  **create**(scope: ClaimSetScope, claimSetId: string, params: CreateClaimSetRangeRequest) → `Promise<ClaimSetRange>`
14142
13943
  Reserve the set's next indexes and mint a code (and, for NTAG 424, a key) for each.
@@ -14178,8 +13979,8 @@ What the collection's installed apps need and whether it's there (sign-in, custo
14178
13979
  **get**(collectionId: string, admin?: boolean) → `Promise<CollectionResponse>`
14179
13980
  Retrieves a single Collection by its ID.
14180
13981
 
14181
- **list**() → `Promise<ListResult<CollectionResponse>>`
14182
- The collections the signed-in user can work on (admin). All of them come back in one answer: `nextCursor` is always null. There is no public list of collections: read one with `collection.get`. ```typescript const { items } = await collection.list() items.forEach(c => console.log(c.id, c.title)) ```
13982
+ **list**(options: ListOptions = {}) → `Promise<ListResult<CollectionResponse>>`
13983
+ The collections the signed-in user can work on (admin), a page at a time. Page with `limit` (50 unless you say) and `cursor`. There is no public list of collections: read one with `collection.get`. ```typescript let page = await collection.list({ limit: 50 }) page.items.forEach(c => console.log(c.id, c.title)) while (page.nextCursor) page = await collection.list({ limit: 50, cursor: page.nextCursor }) ```
14183
13984
 
14184
13985
  **getShortId**(shortId: string) → `Promise<CollectionResponse>`
14185
13986
  Retrieve a collection by its shortId (public endpoint).
@@ -14237,8 +14038,8 @@ Look up a serial number by code for a collection (admin only).
14237
14038
  value: any) → `Promise<any>`
14238
14039
  Assign a value to a serial number for a collection (admin only).
14239
14040
 
14240
- **getUsers**(collectionId: string) → `Promise<ListResult<CollectionUser>>`
14241
- List the users with access to a collection, each with their access level (admin only). Access is stored in the collection's `roles` map (userId → level); this resolves each to name/email. All of them come back in one answer: `nextCursor` is always null. GET /admin/collection/:collectionId/getUsers ```typescript const { items: users } = await collection.getUsers('coll_123') users.forEach(u => console.log(u.email, u.access)) ```
14041
+ **getUsers**(collectionId: string, options: ListOptions = {}) → `Promise<ListResult<CollectionUser>>`
14042
+ List the users with access to a collection, each with their access level (admin only). Access is stored in the collection's `roles` map (userId → level); this resolves each to name/email. A page at a time: page with `limit` (50 unless you say) and `cursor`. GET /admin/collection/:collectionId/getUsers ```typescript let page = await collection.getUsers('coll_123', { limit: 50 }) page.items.forEach(u => console.log(u.email, u.access)) while (page.nextCursor) page = await collection.getUsers('coll_123', { limit: 50, cursor: page.nextCursor }) ```
14242
14043
 
14243
14044
  **setUserAccess**(collectionId: string,
14244
14045
  userId: string,
@@ -14311,11 +14112,11 @@ Public: Resolve contacts for a subject with identity hints. POST /public/collect
14311
14112
 
14312
14113
  **queryByUser**(collectionId: string,
14313
14114
  body: CommsQueryByUser = {}) → `Promise<ListResult<CommunicationEvent>>`
14314
- Analytics: Query communication events by user or contact. The events come back in one answer (`nextCursor` is always null); `limit` is the most it returns. POST /admin/collection/:collectionId/comm/query/by-user ```typescript const { items: events } = await comms.queryByUser(collectionId, { contactId, from: '2026-01-01', limit: 200 }) ```
14115
+ Analytics: Query communication events by user or contact, a page at a time (`limit` and `cursor` in the body). The time window is `from` / `to`. POST /admin/collection/:collectionId/comm/query/by-user ```typescript const query = { contactId, from: '2026-01-01T00:00:00Z', limit: 200 } let page = await comms.queryByUser(collectionId, query) page.items // CommunicationEvent[] while (page.nextCursor) page = await comms.queryByUser(collectionId, { ...query, cursor: page.nextCursor }) ```
14315
14116
 
14316
14117
  **queryRecipientIds**(collectionId: string,
14317
14118
  body: CommsRecipientIdsQuery) → `Promise<ListResult<RecipientId>>`
14318
- Analytics: Recipient IDs for a communication source. The ids come back in one answer (`nextCursor` is always null); `limit` is the most it returns. POST /admin/collection/:collectionId/comm/query/recipient-ids ```typescript const { items: ids } = await comms.queryRecipientIds(collectionId, { broadcastId, idField: 'contactId' }) ```
14119
+ Analytics: Recipient IDs for a communication source, a page at a time (`limit` and `cursor` in the body). The time window is `from` / `to`. POST /admin/collection/:collectionId/comm/query/recipient-ids ```typescript const query = { broadcastId, idField: 'contactId' as const, limit: 500 } let page = await comms.queryRecipientIds(collectionId, query) page.items // the ids while (page.nextCursor) page = await comms.queryRecipientIds(collectionId, { ...query, cursor: page.nextCursor }) ```
14319
14120
 
14320
14121
  **queryRecipientsWithoutInteraction**(collectionId: string,
14321
14122
  body: CommsRecipientsWithoutInteractionQuery) → `Promise<ListResult<RecipientId>>`
@@ -14339,8 +14140,8 @@ Logging: Append many communication events for a list of IDs. POST /admin/collect
14339
14140
 
14340
14141
  ### conditions
14341
14142
 
14342
- **list**(collectionId: string, admin = false) → `Promise<ListResult<SavedCondition>>`
14343
- Every saved condition in the collection (removed ones left out). All of them come back in one answer: `nextCursor` is always null. ```typescript const { items } = await conditions.list('coll_123') items.map(c => c.title) // ["UK only", "In the stadium"] ```
14143
+ **list**(collectionId: string, admin = false, options: ListOptions = {}) → `Promise<ListResult<SavedCondition>>`
14144
+ The collection's saved conditions (removed ones left out), a page at a time. Page with `limit` (50 unless you say) and `cursor`. ```typescript let page = await conditions.list('coll_123') page.items.map(c => c.title) // ["UK only", "In the stadium"] while (page.nextCursor) page = await conditions.list('coll_123', false, { cursor: page.nextCursor }) ```
14344
14145
 
14345
14146
  **get**(collectionId: string, conditionId: string, admin = false) → `Promise<SavedCondition>`
14346
14147
  One saved condition. Public reads 404 for a removed one; an admin read returns it with `deleted: true`. ```typescript const ukOnly = await conditions.get('coll_123', 'nfCmuWDY') ```
@@ -14380,58 +14181,43 @@ The collection's contacts, a page at a time (admin only). Pass `includeDeleted:
14380
14181
 
14381
14182
  **search**({
14382
14183
  collectionId,
14383
- q,
14384
- typeahead,
14385
- email,
14386
- phone,
14387
- id,
14388
- userId,
14389
14184
  tags,
14390
14185
  tagsAll,
14391
- source,
14392
- locale,
14393
- createdFrom,
14394
- createdTo,
14395
- externalIdKey,
14396
- externalIdValue,
14397
- customFieldKey,
14398
- customFieldValue,
14399
- limit,
14400
- cursor,
14186
+ ...rest
14401
14187
  }: ContactSearchParams) → `Promise<ListResult<ContactResponse>>`
14402
- Search the collection's contacts (admin only), a page at a time: free text (`q`, with `typeahead` for search-as-you-type), or filters on email, phone, id, tags, source, dates and custom fields. GET /admin/collection/:collectionId/contacts/search ```typescript let page = await contact.search({ collectionId, q: 'joh', typeahead: true, limit: 20 }) page.items // Contact[] if (page.nextCursor) page = await contact.search({ collectionId, q: 'joh', typeahead: true, limit: 20, cursor: page.nextCursor }) ```
14188
+ Search the collection's contacts (admin only), a page at a time: free text (`q`, with `typeahead` for search-as-you-type), or filters on email, phone, id, tags, source and custom fields. Filter by when the contact was created with a range: `createdAt: { gte, lte }`. GET /admin/collection/:collectionId/contacts/search ```typescript let page = await contact.search({ collectionId, q: 'joh', typeahead: true, limit: 20 }) page.items // Contact[] if (page.nextCursor) page = await contact.search({ collectionId, q: 'joh', typeahead: true, limit: 20, cursor: page.nextCursor }) // Contacts created in November await contact.search({ collectionId, createdAt: { gte: '2026-11-01T00:00:00Z', lte: '2026-11-30T23:59:59Z' } }) ```
14403
14189
 
14404
14190
  **get**(collectionId: string,
14405
14191
  contactId: string,
14406
14192
  params?: { includeDeleted?: boolean }) → `Promise<ContactResponse>`
14407
- Search the collection's contacts (admin only), a page at a time: free text (`q`, with `typeahead` for search-as-you-type), or filters on email, phone, id, tags, source, dates and custom fields. GET /admin/collection/:collectionId/contacts/search ```typescript let page = await contact.search({ collectionId, q: 'joh', typeahead: true, limit: 20 }) page.items // Contact[] if (page.nextCursor) page = await contact.search({ collectionId, q: 'joh', typeahead: true, limit: 20, cursor: page.nextCursor }) ```
14193
+ Search the collection's contacts (admin only), a page at a time: free text (`q`, with `typeahead` for search-as-you-type), or filters on email, phone, id, tags, source and custom fields. Filter by when the contact was created with a range: `createdAt: { gte, lte }`. GET /admin/collection/:collectionId/contacts/search ```typescript let page = await contact.search({ collectionId, q: 'joh', typeahead: true, limit: 20 }) page.items // Contact[] if (page.nextCursor) page = await contact.search({ collectionId, q: 'joh', typeahead: true, limit: 20, cursor: page.nextCursor }) // Contacts created in November await contact.search({ collectionId, createdAt: { gte: '2026-11-01T00:00:00Z', lte: '2026-11-30T23:59:59Z' } }) ```
14408
14194
 
14409
14195
  **update**(collectionId: string,
14410
14196
  contactId: string,
14411
14197
  data: ContactUpdateRequest) → `Promise<ContactResponse>`
14412
- Search the collection's contacts (admin only), a page at a time: free text (`q`, with `typeahead` for search-as-you-type), or filters on email, phone, id, tags, source, dates and custom fields. GET /admin/collection/:collectionId/contacts/search ```typescript let page = await contact.search({ collectionId, q: 'joh', typeahead: true, limit: 20 }) page.items // Contact[] if (page.nextCursor) page = await contact.search({ collectionId, q: 'joh', typeahead: true, limit: 20, cursor: page.nextCursor }) ```
14198
+ Search the collection's contacts (admin only), a page at a time: free text (`q`, with `typeahead` for search-as-you-type), or filters on email, phone, id, tags, source and custom fields. Filter by when the contact was created with a range: `createdAt: { gte, lte }`. GET /admin/collection/:collectionId/contacts/search ```typescript let page = await contact.search({ collectionId, q: 'joh', typeahead: true, limit: 20 }) page.items // Contact[] if (page.nextCursor) page = await contact.search({ collectionId, q: 'joh', typeahead: true, limit: 20, cursor: page.nextCursor }) // Contacts created in November await contact.search({ collectionId, createdAt: { gte: '2026-11-01T00:00:00Z', lte: '2026-11-30T23:59:59Z' } }) ```
14413
14199
 
14414
14200
  **remove**(collectionId: string, contactId: string) → `Promise<void>`
14415
- Search the collection's contacts (admin only), a page at a time: free text (`q`, with `typeahead` for search-as-you-type), or filters on email, phone, id, tags, source, dates and custom fields. GET /admin/collection/:collectionId/contacts/search ```typescript let page = await contact.search({ collectionId, q: 'joh', typeahead: true, limit: 20 }) page.items // Contact[] if (page.nextCursor) page = await contact.search({ collectionId, q: 'joh', typeahead: true, limit: 20, cursor: page.nextCursor }) ```
14201
+ Search the collection's contacts (admin only), a page at a time: free text (`q`, with `typeahead` for search-as-you-type), or filters on email, phone, id, tags, source and custom fields. Filter by when the contact was created with a range: `createdAt: { gte, lte }`. GET /admin/collection/:collectionId/contacts/search ```typescript let page = await contact.search({ collectionId, q: 'joh', typeahead: true, limit: 20 }) page.items // Contact[] if (page.nextCursor) page = await contact.search({ collectionId, q: 'joh', typeahead: true, limit: 20, cursor: page.nextCursor }) // Contacts created in November await contact.search({ collectionId, createdAt: { gte: '2026-11-01T00:00:00Z', lte: '2026-11-30T23:59:59Z' } }) ```
14416
14202
 
14417
14203
  **lookup**(collectionId: string,
14418
14204
  params: { email?: string; phone?: string }) → `Promise<ContactResponse>`
14419
- Search the collection's contacts (admin only), a page at a time: free text (`q`, with `typeahead` for search-as-you-type), or filters on email, phone, id, tags, source, dates and custom fields. GET /admin/collection/:collectionId/contacts/search ```typescript let page = await contact.search({ collectionId, q: 'joh', typeahead: true, limit: 20 }) page.items // Contact[] if (page.nextCursor) page = await contact.search({ collectionId, q: 'joh', typeahead: true, limit: 20, cursor: page.nextCursor }) ```
14205
+ Search the collection's contacts (admin only), a page at a time: free text (`q`, with `typeahead` for search-as-you-type), or filters on email, phone, id, tags, source and custom fields. Filter by when the contact was created with a range: `createdAt: { gte, lte }`. GET /admin/collection/:collectionId/contacts/search ```typescript let page = await contact.search({ collectionId, q: 'joh', typeahead: true, limit: 20 }) page.items // Contact[] if (page.nextCursor) page = await contact.search({ collectionId, q: 'joh', typeahead: true, limit: 20, cursor: page.nextCursor }) // Contacts created in November await contact.search({ collectionId, createdAt: { gte: '2026-11-01T00:00:00Z', lte: '2026-11-30T23:59:59Z' } }) ```
14420
14206
 
14421
14207
  **upsert**(collectionId: string,
14422
14208
  data: ContactCreateRequest) → `Promise<ContactResponse>`
14423
- Search the collection's contacts (admin only), a page at a time: free text (`q`, with `typeahead` for search-as-you-type), or filters on email, phone, id, tags, source, dates and custom fields. GET /admin/collection/:collectionId/contacts/search ```typescript let page = await contact.search({ collectionId, q: 'joh', typeahead: true, limit: 20 }) page.items // Contact[] if (page.nextCursor) page = await contact.search({ collectionId, q: 'joh', typeahead: true, limit: 20, cursor: page.nextCursor }) ```
14209
+ Search the collection's contacts (admin only), a page at a time: free text (`q`, with `typeahead` for search-as-you-type), or filters on email, phone, id, tags, source and custom fields. Filter by when the contact was created with a range: `createdAt: { gte, lte }`. GET /admin/collection/:collectionId/contacts/search ```typescript let page = await contact.search({ collectionId, q: 'joh', typeahead: true, limit: 20 }) page.items // Contact[] if (page.nextCursor) page = await contact.search({ collectionId, q: 'joh', typeahead: true, limit: 20, cursor: page.nextCursor }) // Contacts created in November await contact.search({ collectionId, createdAt: { gte: '2026-11-01T00:00:00Z', lte: '2026-11-30T23:59:59Z' } }) ```
14424
14210
 
14425
14211
  **publicUpsert**(collectionId: string,
14426
14212
  data: PublicContactUpsertRequest) → `Promise<PublicContactUpsertResponse>`
14427
- Search the collection's contacts (admin only), a page at a time: free text (`q`, with `typeahead` for search-as-you-type), or filters on email, phone, id, tags, source, dates and custom fields. GET /admin/collection/:collectionId/contacts/search ```typescript let page = await contact.search({ collectionId, q: 'joh', typeahead: true, limit: 20 }) page.items // Contact[] if (page.nextCursor) page = await contact.search({ collectionId, q: 'joh', typeahead: true, limit: 20, cursor: page.nextCursor }) ```
14213
+ Search the collection's contacts (admin only), a page at a time: free text (`q`, with `typeahead` for search-as-you-type), or filters on email, phone, id, tags, source and custom fields. Filter by when the contact was created with a range: `createdAt: { gte, lte }`. GET /admin/collection/:collectionId/contacts/search ```typescript let page = await contact.search({ collectionId, q: 'joh', typeahead: true, limit: 20 }) page.items // Contact[] if (page.nextCursor) page = await contact.search({ collectionId, q: 'joh', typeahead: true, limit: 20, cursor: page.nextCursor }) // Contacts created in November await contact.search({ collectionId, createdAt: { gte: '2026-11-01T00:00:00Z', lte: '2026-11-30T23:59:59Z' } }) ```
14428
14214
 
14429
14215
  **publicGetMine**(collectionId: string) → `Promise<PublicGetMyContactResponse>`
14430
- Search the collection's contacts (admin only), a page at a time: free text (`q`, with `typeahead` for search-as-you-type), or filters on email, phone, id, tags, source, dates and custom fields. GET /admin/collection/:collectionId/contacts/search ```typescript let page = await contact.search({ collectionId, q: 'joh', typeahead: true, limit: 20 }) page.items // Contact[] if (page.nextCursor) page = await contact.search({ collectionId, q: 'joh', typeahead: true, limit: 20, cursor: page.nextCursor }) ```
14216
+ Search the collection's contacts (admin only), a page at a time: free text (`q`, with `typeahead` for search-as-you-type), or filters on email, phone, id, tags, source and custom fields. Filter by when the contact was created with a range: `createdAt: { gte, lte }`. GET /admin/collection/:collectionId/contacts/search ```typescript let page = await contact.search({ collectionId, q: 'joh', typeahead: true, limit: 20 }) page.items // Contact[] if (page.nextCursor) page = await contact.search({ collectionId, q: 'joh', typeahead: true, limit: 20, cursor: page.nextCursor }) // Contacts created in November await contact.search({ collectionId, createdAt: { gte: '2026-11-01T00:00:00Z', lte: '2026-11-30T23:59:59Z' } }) ```
14431
14217
 
14432
14218
  **publicUpdateMine**(collectionId: string,
14433
14219
  data: ContactPatch) → `Promise<PublicUpdateMyContactResponse>`
14434
- Search the collection's contacts (admin only), a page at a time: free text (`q`, with `typeahead` for search-as-you-type), or filters on email, phone, id, tags, source, dates and custom fields. GET /admin/collection/:collectionId/contacts/search ```typescript let page = await contact.search({ collectionId, q: 'joh', typeahead: true, limit: 20 }) page.items // Contact[] if (page.nextCursor) page = await contact.search({ collectionId, q: 'joh', typeahead: true, limit: 20, cursor: page.nextCursor }) ```
14220
+ Search the collection's contacts (admin only), a page at a time: free text (`q`, with `typeahead` for search-as-you-type), or filters on email, phone, id, tags, source and custom fields. Filter by when the contact was created with a range: `createdAt: { gte, lte }`. GET /admin/collection/:collectionId/contacts/search ```typescript let page = await contact.search({ collectionId, q: 'joh', typeahead: true, limit: 20 }) page.items // Contact[] if (page.nextCursor) page = await contact.search({ collectionId, q: 'joh', typeahead: true, limit: 20, cursor: page.nextCursor }) // Contacts created in November await contact.search({ collectionId, createdAt: { gte: '2026-11-01T00:00:00Z', lte: '2026-11-30T23:59:59Z' } }) ```
14435
14221
 
14436
14222
  **publicGetSchema**(collectionId: string) → `Promise<ContactSchemaResponse>`
14437
14223
  Public: Get the contact schema for a collection. GET /public/collection/:collectionId/contact/schema Returns a ContactSchemaResponse describing all publicly visible contact fields. Core fields and collection-defined custom fields are merged into a single flat schema. Fields not in `publicVisibleFields` are stripped entirely from the response. Fields visible but not in `publicEditableFields` have `ui:disabled: true` in `uiSchema`. Use `fieldOrder` to render fields in the correct sequence, and `evaluateConditions` from the types package to handle conditional field visibility. ```typescript import { contact, evaluateConditions } from '@proveanything/smartlinks' const schema = await contact.publicGetSchema(collectionId) for (const fieldId of schema.fieldOrder) { const property = schema.schema.properties[fieldId] const ui = schema.uiSchema[fieldId] || {} const visible = evaluateConditions(property.conditions, property.showWhen, formValues) const disabled = ui['ui:disabled'] === true if (visible) renderField({ fieldId, property, ui, disabled }) } ```
@@ -14468,7 +14254,7 @@ List containers (admin), a page at a time. Supports filtering by type, status, r
14468
14254
 
14469
14255
  **findForItem**(collectionId: string,
14470
14256
  params: FindContainersForItemParams) → `Promise<FindContainersForItemResponse>`
14471
- Reverse lookup — find all containers currently holding a specific item (admin). containers. All of them in one answer: `nextCursor` is always null. ```typescript const { containers: holding } = await containers.findForItem('coll_123', { itemType: 'proof', itemId: 'unit-0007', productId: 'drill', }) ```
14257
+ Reverse lookup — find all containers currently holding a specific item (admin). containers, a page at a time. Pass `nextCursor` back as `cursor` for the next page. ```typescript const { containers: holding, nextCursor } = await containers.findForItem('coll_123', { itemType: 'proof', itemId: 'unit-0007', productId: 'drill', limit: 50, }) ```
14472
14258
 
14473
14259
  **get**(collectionId: string,
14474
14260
  containerId: string,
@@ -14509,8 +14295,9 @@ List containers (public), a page at a time. Only active containers are listed; s
14509
14295
  Get a single container (public). Soft-deleted containers return a 404. Same `?tree` and `?includeContents` options as the admin version.
14510
14296
 
14511
14297
  **publicListItems**(collectionId: string,
14512
- containerId: string) → `Promise<ListResult<ContainerItem>>`
14513
- List current contents of a container (public). Returns only items where `removedAt` is null. No `?history` option on the public side. All of them come back in one answer: `nextCursor` is always null. ```typescript const { items } = await containers.publicListItems('coll_123', 'cask-uuid') ```
14298
+ containerId: string,
14299
+ options: ListOptions = {}) → `Promise<ListResult<ContainerItem>>`
14300
+ List current contents of a container (public), a page at a time. Returns only items where `removedAt` is null. No `?history` option on the public side. ```typescript let page = await containers.publicListItems('coll_123', 'cask-uuid', { limit: 50 }) while (page.nextCursor) { page = await containers.publicListItems('coll_123', 'cask-uuid', { limit: 50, cursor: page.nextCursor }) } ```
14514
14301
 
14515
14302
  ### content
14516
14303
 
@@ -14546,7 +14333,7 @@ Delete a crate for a collection (admin only). This performs a soft delete. ```ty
14546
14333
  ### dpp
14547
14334
 
14548
14335
  **groups**(collectionId: string) → `Promise<ListResult<DppGroup>>`
14549
- What passports can be made: product groups, their kinds, and each view's fields and required fields. All of them in one answer (`nextCursor` is always null). GET /dpp/groups ```typescript const { items } = await dpp.groups(collectionId) items.map(g => g.productGroup) // ["BATTERIES", …] ```
14336
+ What passports can be made: product groups, their kinds, and each view's fields and required fields. A fixed set: always all of them in one answer (`nextCursor` is always null), so it takes no `limit` or `cursor`. GET /dpp/groups ```typescript const { items } = await dpp.groups(collectionId) items.map(g => g.productGroup) // ["BATTERIES", …] ```
14550
14337
 
14551
14338
  **read**(collectionId: string, passportId: string, opts: { version?: number } = {}) → `Promise<DppDocument>`
14552
14339
  Read a passport as the public sees it, at its address (the EU JSON document), or an earlier version of it. No sign-in needed. GET /public/dpp/:collectionId/:passportId
@@ -14574,8 +14361,8 @@ Publish the passport for a product, batch or item (`productId` / `batchId` / `pr
14574
14361
  **upsertMany**(collectionId: string, items: DppPassportUpsertInput[], opts: { merge?: boolean } = {}) → `Promise<DppPassportBulkResult>`
14575
14362
  `upsert` for up to 500 passports at once (e.g. one per battery); each answers on its own. POST /dpp/passports/bulk
14576
14363
 
14577
- **versions**(collectionId: string, passportId: string) → `Promise<ListResult<DppPassportVersion>>`
14578
- Its versions, newest first, all in one answer (`nextCursor` is always null); read one with `dpp.read(collectionId, id, { version })`. GET /dpp/passports/:id/versions ```typescript const { items } = await dpp.passports.versions(collectionId, passportId) const latest = items[0].version ```
14364
+ **versions**(collectionId: string, passportId: string, options: ListOptions = {}) → `Promise<ListResult<DppPassportVersion>>`
14365
+ Its versions, newest first, a page at a time (`limit` and `cursor`; 50 unless you say otherwise). Read one with `dpp.read(collectionId, id, { version })`. GET /dpp/passports/:id/versions ```typescript let page = await dpp.passports.versions(collectionId, passportId, { limit: 20 }) const latest = page.items[0].version while (page.nextCursor) { page = await dpp.passports.versions(collectionId, passportId, { limit: 20, cursor: page.nextCursor }) } ```
14579
14366
 
14580
14367
  **withdraw**(collectionId: string, passportId: string) → `Promise<DppPassport>`
14581
14368
  No longer valid: stays at its address, marked invalid (the registry keeps its record). POST /dpp/passports/:id/withdraw
@@ -14586,7 +14373,7 @@ Valid again. POST /dpp/passports/:id/restore
14586
14373
  ### dpp.registry
14587
14374
 
14588
14375
  **list**(collectionId: string) → `Promise<ListResult<DppRegistry>>`
14589
- Both environments, each with `nextStep` (what's left to connect). All of them in one answer (`nextCursor` is always null). GET /dpp/registry ```typescript const { items } = await dpp.registry.list(collectionId) const acc = items.find(r => r.environment === 'acc') ```
14376
+ Both environments, each with `nextStep` (what's left to connect). A fixed set: always all of them in one answer (`nextCursor` is always null), so it takes no `limit` or `cursor`. GET /dpp/registry ```typescript const { items } = await dpp.registry.list(collectionId) const acc = items.find(r => r.environment === 'acc') ```
14590
14377
 
14591
14378
  **get**(collectionId: string, env: DppEnvironment) → `Promise<DppRegistry>`
14592
14379
  One environment. GET /dpp/registry/:env
@@ -14605,8 +14392,8 @@ Sign in to the registry and read its product groups — proves the connection wo
14605
14392
 
14606
14393
  ### dpp.tasks
14607
14394
 
14608
- **list**(collectionId: string, env: DppEnvironment) → `Promise<ListResult<DppTask>>`
14609
- Requests sent to one environment, newest first, all in one answer (`nextCursor` is always null). GET /dpp/registry/:env/tasks ```typescript const { items } = await dpp.tasks.list(collectionId, 'acc') ```
14395
+ **list**(collectionId: string, env: DppEnvironment, options: ListOptions = {}) → `Promise<ListResult<DppTask>>`
14396
+ Requests sent to one environment, newest first, a page at a time (`limit` and `cursor`; 50 unless you say otherwise). GET /dpp/registry/:env/tasks ```typescript let page = await dpp.tasks.list(collectionId, 'acc', { limit: 20 }) while (page.nextCursor) { page = await dpp.tasks.list(collectionId, 'acc', { limit: 20, cursor: page.nextCursor }) } ```
14610
14397
 
14611
14398
  **refresh**(collectionId: string, env: DppEnvironment, taskId: string) → `Promise<DppTaskRefreshResult>`
14612
14399
  Ask the registry how a request went and record it on its passports. POST /dpp/registry/:env/tasks/:taskId/refresh
@@ -14619,89 +14406,90 @@ Ask the registry how a request went and record it on its passports. POST /dpp/re
14619
14406
 
14620
14407
  **list**(collectionId: string,
14621
14408
  params?: FacetListParams) → `Promise<FacetListResponse>`
14622
- The collection's facets (admin). All of them come back in one answer: `nextCursor` is always null. ```typescript const { items } = await facets.list('coll_123', { kind: 'custom' }) items.map(f => f.key) // ["brand", "material", …] ```
14409
+ The collection's facets (admin). A small fixed set: all of them come back in one answer, so there is no `limit` or `cursor` and `nextCursor` is always null. ```typescript const { items } = await facets.list('coll_123', { kind: 'custom' }) items.map(f => f.key) // ["brand", "material", …] ```
14623
14410
 
14624
14411
  **create**(collectionId: string,
14625
14412
  data: FacetDefinitionWriteInput) → `Promise<FacetDefinition>`
14626
- The collection's facets (admin). All of them come back in one answer: `nextCursor` is always null. ```typescript const { items } = await facets.list('coll_123', { kind: 'custom' }) items.map(f => f.key) // ["brand", "material", …] ```
14413
+ The collection's facets (admin). A small fixed set: all of them come back in one answer, so there is no `limit` or `cursor` and `nextCursor` is always null. ```typescript const { items } = await facets.list('coll_123', { kind: 'custom' }) items.map(f => f.key) // ["brand", "material", …] ```
14627
14414
 
14628
14415
  **get**(collectionId: string,
14629
14416
  facetKey: string,
14630
14417
  params?: FacetGetParams) → `Promise<FacetDefinition>`
14631
- The collection's facets (admin). All of them come back in one answer: `nextCursor` is always null. ```typescript const { items } = await facets.list('coll_123', { kind: 'custom' }) items.map(f => f.key) // ["brand", "material", …] ```
14418
+ The collection's facets (admin). A small fixed set: all of them come back in one answer, so there is no `limit` or `cursor` and `nextCursor` is always null. ```typescript const { items } = await facets.list('coll_123', { kind: 'custom' }) items.map(f => f.key) // ["brand", "material", …] ```
14632
14419
 
14633
14420
  **update**(collectionId: string,
14634
14421
  facetKey: string,
14635
14422
  data: FacetDefinitionWriteInput) → `Promise<FacetDefinition>`
14636
- The collection's facets (admin). All of them come back in one answer: `nextCursor` is always null. ```typescript const { items } = await facets.list('coll_123', { kind: 'custom' }) items.map(f => f.key) // ["brand", "material", …] ```
14423
+ The collection's facets (admin). A small fixed set: all of them come back in one answer, so there is no `limit` or `cursor` and `nextCursor` is always null. ```typescript const { items } = await facets.list('coll_123', { kind: 'custom' }) items.map(f => f.key) // ["brand", "material", …] ```
14637
14424
 
14638
14425
  **remove**(collectionId: string,
14639
14426
  facetKey: string) → `Promise<void>`
14640
- The collection's facets (admin). All of them come back in one answer: `nextCursor` is always null. ```typescript const { items } = await facets.list('coll_123', { kind: 'custom' }) items.map(f => f.key) // ["brand", "material", …] ```
14427
+ The collection's facets (admin). A small fixed set: all of them come back in one answer, so there is no `limit` or `cursor` and `nextCursor` is always null. ```typescript const { items } = await facets.list('coll_123', { kind: 'custom' }) items.map(f => f.key) // ["brand", "material", …] ```
14641
14428
 
14642
14429
  **listValues**(collectionId: string,
14643
14430
  facetKey: string,
14644
14431
  params?: FacetValueListParams) → `Promise<FacetValueListResponse>`
14645
- One facet and all its values (admin). The values are in `items`; `nextCursor` is always null. ```typescript const { facet, items } = await facets.listValues('coll_123', 'brand') items.map(v => v.name) ```
14432
+ One facet and its values (admin), a page at a time. The values are in `items`; pass `nextCursor` back as `cursor` for the next page (null means that was the last one). ```typescript let page = await facets.listValues('coll_123', 'brand', { limit: 50 }) const names = page.items.map(v => v.name) while (page.nextCursor) { page = await facets.listValues('coll_123', 'brand', { limit: 50, cursor: page.nextCursor }) names.push(...page.items.map(v => v.name)) } ```
14646
14433
 
14647
14434
  **createValue**(collectionId: string,
14648
14435
  facetKey: string,
14649
14436
  data: FacetValueWriteInput) → `Promise<FacetValueResponse>`
14650
- One facet and all its values (admin). The values are in `items`; `nextCursor` is always null. ```typescript const { facet, items } = await facets.listValues('coll_123', 'brand') items.map(v => v.name) ```
14437
+ One facet and its values (admin), a page at a time. The values are in `items`; pass `nextCursor` back as `cursor` for the next page (null means that was the last one). ```typescript let page = await facets.listValues('coll_123', 'brand', { limit: 50 }) const names = page.items.map(v => v.name) while (page.nextCursor) { page = await facets.listValues('coll_123', 'brand', { limit: 50, cursor: page.nextCursor }) names.push(...page.items.map(v => v.name)) } ```
14651
14438
 
14652
14439
  **getValue**(collectionId: string,
14653
14440
  facetKey: string,
14654
14441
  valueKey: string,
14655
14442
  params?: FacetValueGetParams) → `Promise<FacetValueResponse>`
14656
- One facet and all its values (admin). The values are in `items`; `nextCursor` is always null. ```typescript const { facet, items } = await facets.listValues('coll_123', 'brand') items.map(v => v.name) ```
14443
+ One facet and its values (admin), a page at a time. The values are in `items`; pass `nextCursor` back as `cursor` for the next page (null means that was the last one). ```typescript let page = await facets.listValues('coll_123', 'brand', { limit: 50 }) const names = page.items.map(v => v.name) while (page.nextCursor) { page = await facets.listValues('coll_123', 'brand', { limit: 50, cursor: page.nextCursor }) names.push(...page.items.map(v => v.name)) } ```
14657
14444
 
14658
14445
  **updateValue**(collectionId: string,
14659
14446
  facetKey: string,
14660
14447
  valueKey: string,
14661
14448
  data: FacetValueWriteInput) → `Promise<FacetValueResponse>`
14662
- One facet and all its values (admin). The values are in `items`; `nextCursor` is always null. ```typescript const { facet, items } = await facets.listValues('coll_123', 'brand') items.map(v => v.name) ```
14449
+ One facet and its values (admin), a page at a time. The values are in `items`; pass `nextCursor` back as `cursor` for the next page (null means that was the last one). ```typescript let page = await facets.listValues('coll_123', 'brand', { limit: 50 }) const names = page.items.map(v => v.name) while (page.nextCursor) { page = await facets.listValues('coll_123', 'brand', { limit: 50, cursor: page.nextCursor }) names.push(...page.items.map(v => v.name)) } ```
14663
14450
 
14664
14451
  **removeValue**(collectionId: string,
14665
14452
  facetKey: string,
14666
14453
  valueKey: string) → `Promise<void>`
14667
- One facet and all its values (admin). The values are in `items`; `nextCursor` is always null. ```typescript const { facet, items } = await facets.listValues('coll_123', 'brand') items.map(v => v.name) ```
14454
+ One facet and its values (admin), a page at a time. The values are in `items`; pass `nextCursor` back as `cursor` for the next page (null means that was the last one). ```typescript let page = await facets.listValues('coll_123', 'brand', { limit: 50 }) const names = page.items.map(v => v.name) while (page.nextCursor) { page = await facets.listValues('coll_123', 'brand', { limit: 50, cursor: page.nextCursor }) names.push(...page.items.map(v => v.name)) } ```
14668
14455
 
14669
14456
  **query**(collectionId: string,
14670
14457
  body: FacetQueryRequest) → `Promise<FacetQueryResponse>`
14671
- Facet counts for a set of products (admin): each facet with its values in `items`, and the count for each value in `buckets`. Everything comes back in one answer: `nextCursor` is always null. ```typescript const { items, buckets, meta } = await facets.query('coll_123', { facetKeys: ['brand', 'material'], query: { facetEquals: { brand: 'acme' } }, }) ```
14458
+ Facet counts for a set of products (admin): each facet with its values in `items`, and the count for each value in `buckets`. Everything comes back in one answer, so there is no `limit` or `cursor` and `nextCursor` is always null. Which products are counted: `q` (search text), `createdAt` / `updatedAt` (date ranges) and the filters in `query`, the same as `products.query`. ```typescript const { items, buckets, meta } = await facets.query('coll_123', { facetKeys: ['brand', 'material'], q: 'oak', createdAt: { gte: '2026-11-01T00:00:00Z' }, query: { facetEquals: { brand: 'acme' } }, }) ```
14672
14459
 
14673
14460
  **namespaces**(collectionId: string) → `Promise<FacetNamespaceListResponse>`
14674
- The facet namespaces in use (admin). The names are in `items`; `nextCursor` is always null. ```typescript const { items } = await facets.namespaces('coll_123') // items: string[] ```
14461
+ The facet namespaces in use (admin). A small fixed set: all the names are in `items`, there is no `limit` or `cursor`, and `nextCursor` is always null. ```typescript const { items } = await facets.namespaces('coll_123') // items: string[] ```
14675
14462
 
14676
14463
  **publicList**(collectionId: string,
14677
14464
  params?: PublicFacetListParams) → `Promise<FacetListResponse>`
14678
- The collection's facets (public). All of them come back in one answer: `nextCursor` is always null. ```typescript const { items } = await facets.publicList('coll_123', { namespace: 'catalog' }) ```
14465
+ The collection's facets (public). A small fixed set: all of them come back in one answer, so there is no `limit` or `cursor` and `nextCursor` is always null. ```typescript const { items } = await facets.publicList('coll_123', { namespace: 'catalog' }) ```
14679
14466
 
14680
14467
  **publicGet**(collectionId: string,
14681
14468
  facetKey: string,
14682
14469
  params?: PublicFacetListParams) → `Promise<FacetDefinition>`
14683
- The collection's facets (public). All of them come back in one answer: `nextCursor` is always null. ```typescript const { items } = await facets.publicList('coll_123', { namespace: 'catalog' }) ```
14470
+ The collection's facets (public). A small fixed set: all of them come back in one answer, so there is no `limit` or `cursor` and `nextCursor` is always null. ```typescript const { items } = await facets.publicList('coll_123', { namespace: 'catalog' }) ```
14684
14471
 
14685
14472
  **publicListValues**(collectionId: string,
14686
- facetKey: string) → `Promise<FacetValueListResponse>`
14687
- One facet and all its values (public). The values are in `items`; `nextCursor` is always null. ```typescript const { facet, items } = await facets.publicListValues('coll_123', 'brand') ```
14473
+ facetKey: string,
14474
+ options: ListOptions = {}) → `Promise<FacetValueListResponse>`
14475
+ One facet and its values (public), a page at a time. The values are in `items`; pass `nextCursor` back as `cursor` for the next page (null means that was the last one). ```typescript const { facet, items, nextCursor } = await facets.publicListValues('coll_123', 'brand', { limit: 50 }) ```
14688
14476
 
14689
14477
  **publicGetValue**(collectionId: string,
14690
14478
  facetKey: string,
14691
14479
  valueKey: string) → `Promise<FacetValueResponse>`
14692
- One facet and all its values (public). The values are in `items`; `nextCursor` is always null. ```typescript const { facet, items } = await facets.publicListValues('coll_123', 'brand') ```
14480
+ One facet and its values (public), a page at a time. The values are in `items`; pass `nextCursor` back as `cursor` for the next page (null means that was the last one). ```typescript const { facet, items, nextCursor } = await facets.publicListValues('coll_123', 'brand', { limit: 50 }) ```
14693
14481
 
14694
14482
  **publicQuery**(collectionId: string,
14695
14483
  body: FacetQueryRequest) → `Promise<FacetQueryResponse>`
14696
- Facet counts for a set of products (public): each facet with its values in `items`, and the count for each value in `buckets`. Everything comes back in one answer: `nextCursor` is always null. ```typescript const { items, buckets } = await facets.publicQuery('coll_123', { facetKeys: ['brand'] }) ```
14484
+ Facet counts for a set of products (public): each facet with its values in `items`, and the count for each value in `buckets`. Everything comes back in one answer, so there is no `limit` or `cursor` and `nextCursor` is always null. Which products are counted: `q` (search text), `createdAt` / `updatedAt` (date ranges) and the filters in `query`, the same as `products.query`. ```typescript const { items, buckets } = await facets.publicQuery('coll_123', { facetKeys: ['brand'], q: 'oak' }) ```
14697
14485
 
14698
14486
  **publicNamespaces**(collectionId: string) → `Promise<FacetNamespaceListResponse>`
14699
- The facet namespaces in use (public). The names are in `items`; `nextCursor` is always null. ```typescript const { items } = await facets.publicNamespaces('coll_123') // items: string[] ```
14487
+ The facet namespaces in use (public). A small fixed set: all the names are in `items`, there is no `limit` or `cursor`, and `nextCursor` is always null. ```typescript const { items } = await facets.publicNamespaces('coll_123') // items: string[] ```
14700
14488
 
14701
14489
  ### files
14702
14490
 
14703
14491
  **list**(collectionId: string, query: ListFilesQuery = {}) → `Promise<ListResult<FileRecord>>`
14704
- Files on this site that aren't ordinary uploads: temporary, fetched, derived or generated (admin). They come back in one answer (`nextCursor` is always null); `limit` is the most it returns. ```typescript const { items } = await files.list('coll_123', { appId: 'my-app', origin: 'fetched' }) ```
14492
+ Files on this site that aren't ordinary uploads: temporary, fetched, derived or generated (admin). A page at a time: `limit` says how many, `cursor` is the previous page's `nextCursor`. ```typescript let page = await files.list('coll_123', { appId: 'my-app', origin: 'fetched', limit: 50 }) while (page.nextCursor) { page = await files.list('coll_123', { appId: 'my-app', origin: 'fetched', limit: 50, cursor: page.nextCursor }) } ```
14705
14493
 
14706
14494
  **put**(collectionId: string, body: PutFileRequest) → `Promise<`
14707
14495
  A new file from text, base64 or JSON. Temporary (default 1 day) and private.
@@ -14732,8 +14520,8 @@ Remove a file (a kept file is deleted like any asset, and can be restored).
14732
14520
  **get**(collectionId: string, formId: string, admin?: boolean) → `Promise<any>`
14733
14521
  Get a single form by ID for a collection.
14734
14522
 
14735
- **list**(collectionId: string, admin?: boolean) → `Promise<ListResult<any>>`
14736
- List all forms for a collection. All of them come back in one answer: `nextCursor` is always null. ```typescript const { items: forms } = await form.list(collectionId, true) ```
14523
+ **list**(collectionId: string, admin?: boolean, options: ListOptions = {}) → `Promise<ListResult<any>>`
14524
+ List the forms for a collection, 50 at a time unless you give a `limit` (at most 1000). Pass `nextCursor` back as `cursor` for the next page; `null` means that was the last one. ```typescript let page = await form.list(collectionId, true, { limit: 100 }) while (page.nextCursor) page = await form.list(collectionId, true, { limit: 100, cursor: page.nextCursor }) ```
14737
14525
 
14738
14526
  **create**(collectionId: string, data: any) → `Promise<any>`
14739
14527
  Create a new form for a collection (admin only).
@@ -14800,10 +14588,10 @@ Perform a DELETE request to any API endpoint.
14800
14588
  ### integrations
14801
14589
 
14802
14590
  **listFlows**(collectionId: string, query: ListFlowsQuery = {}) → `Promise<ListResult<IntegrationFlow>>`
14803
- List flows in a collection (all of them: this list has no pages). GET /integrations/flows ```typescript const { items } = await integrations.listFlows('coll_123', { direction: 'outbound', status: 'active' }) ```
14591
+ List flows in a collection, a page at a time (`limit` and `cursor`; 50 unless you say otherwise). GET /integrations/flows ```typescript let page = await integrations.listFlows('coll_123', { direction: 'outbound', status: 'active' }) while (page.nextCursor) { page = await integrations.listFlows('coll_123', { direction: 'outbound', status: 'active', cursor: page.nextCursor }) } ```
14804
14592
 
14805
14593
  **listRecordTypes**(collectionId: string) → `Promise<ListResult<RecordTypeInfo>>`
14806
- Discover the app-record types present in a collection + which app owns each (introspected), for picking a sub-record source/trigger. One list, no pages. GET /integrations/record-types ```typescript const { items } = await integrations.listRecordTypes('coll_123') // items: [{ appId: 'warranty', recordType: 'claim', count: 42 }, …] ```
14594
+ Discover the app-record types present in a collection + which app owns each (introspected), for picking a sub-record source/trigger. A fixed set: always all of them in one answer, so it takes no `limit` or `cursor`. GET /integrations/record-types ```typescript const { items } = await integrations.listRecordTypes('coll_123') // items: [{ appId: 'warranty', recordType: 'claim', count: 42 }, …] ```
14807
14595
 
14808
14596
  **createFlow**(collectionId: string, input: CreateFlowInput) → `Promise<IntegrationFlow>`
14809
14597
  Create a flow. POST /integrations/flows
@@ -14837,8 +14625,8 @@ Get one run's summary. GET /integrations/flows/:id/runs/:runId
14837
14625
  **listRunItems**(collectionId: string, flowId: string, runId: string, query: ListRunItemsQuery = {}) → `Promise<ListResult<FlowRunItem>>`
14838
14626
  List a run's per-record items. GET /integrations/flows/:id/runs/:runId/items `request`/`response` are populated only for items captured while enhanced logging was active (and before the 24h body purge). ```typescript const { items, nextCursor } = await integrations.listRunItems('coll_123', flowId, runId, { status: 'failed', limit: 100 }) ```
14839
14627
 
14840
- **listEntityRuns**(collectionId: string, entityId: string, query: { limit?: number } = {}) → `Promise<ListResult<FlowRun>>`
14841
- Every run touching an entity (e.g. a product), across flows, newest first. One list, no pages: `limit` says how many. GET /integrations/runs/entity/:entityId ```typescript const { items } = await integrations.listEntityRuns('coll_123', productId, { limit: 20 }) ```
14628
+ **listEntityRuns**(collectionId: string, entityId: string, query: ListOptions = {}) → `Promise<ListResult<FlowRun>>`
14629
+ Every run touching an entity (e.g. a product), across flows, newest first. A page at a time: `limit` says how many, `cursor` is the previous page's `nextCursor`. GET /integrations/runs/entity/:entityId ```typescript let page = await integrations.listEntityRuns('coll_123', productId, { limit: 20 }) while (page.nextCursor) { page = await integrations.listEntityRuns('coll_123', productId, { limit: 20, cursor: page.nextCursor }) } ```
14842
14630
 
14843
14631
  **getLogging**(collectionId: string, connectionId: string) → `Promise<`
14844
14632
  Is enhanced logging active for a connection? GET /integrations/logging/:connectionId
@@ -14848,8 +14636,8 @@ Enable enhanced logging. POST /integrations/logging/:connectionId (omit ttlMinut
14848
14636
 
14849
14637
  **listFailed**(collectionId: string,
14850
14638
  flowId: string,
14851
- query: { status?: 'failed' | 'dead'; limit?: number; cursor?: string } = {}) → `Promise<ListResult<FailedRecord> &`
14852
- A flow's failed / dead records, with the flow's `direction` beside the list. GET /integrations/flows/:id/failed ```typescript const { items, nextCursor, direction } = await integrations.listFailed('coll_123', flowId, { status: 'dead' }) ```
14639
+ query: ListOptions & { status?: 'failed' | 'dead' } = {}) → `Promise<ListResult<FailedRecord> &`
14640
+ A flow's failed / dead records, a page at a time (`limit` and `cursor`), with the flow's `direction` beside the list. GET /integrations/flows/:id/failed ```typescript let page = await integrations.listFailed('coll_123', flowId, { status: 'dead', limit: 100 }) page.direction // 'inbound' | 'outbound' while (page.nextCursor) { page = await integrations.listFailed('coll_123', flowId, { status: 'dead', limit: 100, cursor: page.nextCursor }) } ```
14853
14641
 
14854
14642
  **retryFailed**(collectionId: string, flowId: string, ids?: string[]) → `Promise<`
14855
14643
  Retry failed / dead records now (all of them when `ids` is omitted). POST /integrations/flows/:id/failed/retry
@@ -14870,7 +14658,7 @@ Resume a flow that paused itself (circuit open): held records go out now. POST /
14870
14658
  Cancel enhanced logging now. DELETE /integrations/logging/:connectionId
14871
14659
 
14872
14660
  **listConnectors**(collectionId: string) → `Promise<ListResult<InstalledConnector>>`
14873
- The collection's installed connector apps (all of them: this list has no pages). GET /integrations/connectors ```typescript const { items } = await integrations.listConnectors('coll_123') ```
14661
+ The collection's installed connector apps. A fixed set: always all of them in one answer, so it takes no `limit` or `cursor`. GET /integrations/connectors ```typescript const { items } = await integrations.listConnectors('coll_123') ```
14874
14662
 
14875
14663
  **saveConnectorInstallation**(collectionId: string,
14876
14664
  appId: string,
@@ -14891,7 +14679,7 @@ Invoke a connector ACTION from the console (any visibility): redeem, enrol, adju
14891
14679
 
14892
14680
  **listConnectorActions**(collectionId: string,
14893
14681
  appId: string) → `Promise<ListResult<`
14894
- PUBLIC (the Hub, a site): the connector actions the caller may invoke — those declared `public`, plus `member` ones when signed in. One list, no pages. GET /public/collection/:collectionId/connectors/:appId/actions ```typescript const { items } = await integrations.listConnectorActions('coll_123', 'sessionm') const canRedeem = items.some((a) => a.name === 'redeem') ```
14682
+ PUBLIC (the Hub, a site): the connector actions the caller may invoke — those declared `public`, plus `member` ones when signed in. A fixed set: always all of them in one answer, so it takes no `limit` or `cursor`. GET /public/collection/:collectionId/connectors/:appId/actions ```typescript const { items } = await integrations.listConnectorActions('coll_123', 'sessionm') const canRedeem = items.some((a) => a.name === 'redeem') ```
14895
14683
 
14896
14684
  **callConnectorAction**(collectionId: string,
14897
14685
  appId: string,
@@ -14903,7 +14691,7 @@ PUBLIC (the Hub, a site): invoke a connector action — e.g. redeem a reward for
14903
14691
 
14904
14692
  **query**(collectionId: string,
14905
14693
  body: AdminInteractionsQueryRequest) → `Promise<ListResult<InteractionEventRow>>`
14906
- POST /admin/collection/:collectionId/interactions/query Flexible query for interaction events with optional includes. One list, no pages: `limit` in the body says how many events to return. ```typescript const { items } = await interactions.query('coll_123', { appId: 'my-app', interactionId: voteTypeId, limit: 500 }) ```
14694
+ POST /admin/collection/:collectionId/interactions/query Flexible query for interaction events, a page at a time (`limit` and `cursor` in the body). The time window is `from` / `to`. Sort with `orderBy: [{ timestamp: 'asc' }]`; bring each event's interaction type along with `expand: ['interaction']`. ```typescript const query = { appId: 'my-app', interactionId: voteTypeId, from: '2026-11-01T00:00:00Z', limit: 500 } let page = await interactions.query('coll_123', { ...query, orderBy: [{ timestamp: 'desc' }], expand: ['interaction'] }) while (page.nextCursor) page = await interactions.query('coll_123', { ...query, cursor: page.nextCursor }) ```
14907
14695
 
14908
14696
  **countsByOutcome**(collectionId: string,
14909
14697
  query: AdminInteractionsCountsByOutcomeRequest = {}) → `Promise<OutcomeCount[]>`
@@ -14962,7 +14750,7 @@ Find this app's interaction type by its readable `key` (data.interactionType), o
14962
14750
  **publicMyInteractions**(collectionId: string,
14963
14751
  body: PublicInteractionsByUserRequest,
14964
14752
  authToken?: string) → `Promise<ListResult<InteractionEventRow>>`
14965
- The signed-in person's own interaction events (where the type allows it). One list, no pages: `limit` in the body says how many. POST /public/collection/:collectionId/interactions/by-user ```typescript const { items } = await interactions.publicMyInteractions('coll_123', { appId: 'my-app', interactionId: voteTypeId }) ```
14753
+ The signed-in person's own interaction events (where the type allows it), a page at a time (`limit` and `cursor` in the body). The time window is `from` / `to`. POST /public/collection/:collectionId/interactions/by-user ```typescript const query = { appId: 'my-app', interactionId: voteTypeId, limit: 50 } let page = await interactions.publicMyInteractions('coll_123', query) while (page.nextCursor) page = await interactions.publicMyInteractions('coll_123', { ...query, cursor: page.nextCursor }) ```
14966
14754
 
14967
14755
  **publicList**(collectionId: string,
14968
14756
  query: ListInteractionTypesQuery = {}) → `Promise<ListResult<InteractionTypeRecord>>`
@@ -14974,14 +14762,22 @@ Public: list the collection's interaction types, optionally only one app's. GET
14974
14762
 
14975
14763
  ### jobs
14976
14764
 
14977
- **listJobs**(collectionId: string,
14765
+ **list**(collectionId: string,
14978
14766
  query: ListJobsQuery = {}) → `Promise<ListResult<Job>>`
14979
- List visible jobs for a collection GET /admin/collection/:collectionId/jobs ```typescript let page = await jobs.listJobs('coll_123', { state: 'errored', limit: 50 }) while (page.nextCursor) page = await jobs.listJobs('coll_123', { state: 'errored', limit: 50, cursor: page.nextCursor }) ```
14767
+ List visible jobs for a collection, newest first. GET /admin/collection/:collectionId/jobs ```typescript let page = await jobs.list('coll_123', { state: 'errored', limit: 50 }) while (page.nextCursor) page = await jobs.list('coll_123', { state: 'errored', limit: 50, cursor: page.nextCursor }) ```
14980
14768
 
14981
- **getJob**(collectionId: string,
14769
+ **get**(collectionId: string,
14982
14770
  jobId: number) → `Promise<Job>`
14983
14771
  Get a single job GET /admin/collection/:collectionId/jobs/:jobId
14984
14772
 
14773
+ **enqueue**(collectionId: string,
14774
+ params: EnqueueAsyncJobRequest) → `Promise<EnqueueAsyncJobResponse>`
14775
+ Start a background job for a collection. POST /admin/collection/:collectionId/async/jobs (202)
14776
+
14777
+ **status**(collectionId: string,
14778
+ jobId: number) → `Promise<Job>`
14779
+ How a job you started is getting on (may answer 404 once it has finished and been cleared away). GET /admin/collection/:collectionId/async/jobs/:jobId
14780
+
14985
14781
  ### journeys
14986
14782
 
14987
14783
  **create**(collectionId: string,
@@ -15015,7 +14811,7 @@ POST /admin/collection/:collectionId/journeys.analytics/:journeyId/stats Compute
15015
14811
  journeyId: string,
15016
14812
  stepId: string,
15017
14813
  body: JourneyStepRecipientsRequest = {}) → `Promise<ListResult<string>>`
15018
- POST /admin/collection/:collectionId/journeys.analytics/:journeyId/steps/:stepId/recipients Returns recipient IDs for a given journey step, as a list of ids. One list, no pages: `limit` in the body says how many. For completed/pending, `interactionId` is required; outcome defaults to 'success'. ```typescript const { items: contactIds } = await journeysAnalytics.recipients('coll_123', journeyId, stepId, { status: 'completed', interactionId, idField: 'contactId', limit: 1000, }) ```
14814
+ POST /admin/collection/:collectionId/journeys.analytics/:journeyId/steps/:stepId/recipients Returns recipient IDs for a given journey step, a page at a time (`limit` and `cursor` in the body). The time window is `from` / `to`. For completed/pending, `interactionId` is required; outcome defaults to 'success'. ```typescript const query = { status: 'completed' as const, interactionId, idField: 'contactId' as const, limit: 1000 } let page = await journeysAnalytics.recipients('coll_123', journeyId, stepId, query) page.items // contact ids while (page.nextCursor) { page = await journeysAnalytics.recipients('coll_123', journeyId, stepId, { ...query, cursor: page.nextCursor }) } ```
15019
14815
 
15020
14816
  **funnelReport**(collectionId: string,
15021
14817
  journeyId: string,
@@ -15024,8 +14820,8 @@ POST /admin/collection/:collectionId/journeys.analytics/:journeyId/funnel-report
15024
14820
 
15025
14821
  ### knowledge
15026
14822
 
15027
- **listSets**(collectionId: string) → `Promise<ListResult<KnowledgeSet>>`
15028
- Every set, with its source and passage counts (admin). One list, no pages. ```typescript const { items } = await knowledge.listSets('coll_123') ```
14823
+ **listSets**(collectionId: string, options: ListOptions = {}) → `Promise<ListResult<KnowledgeSet>>`
14824
+ The collection's sets, with their source and passage counts (admin). A page at a time (`limit` and `cursor`; 50 unless you say otherwise). ```typescript let page = await knowledge.listSets('coll_123') while (page.nextCursor) page = await knowledge.listSets('coll_123', { cursor: page.nextCursor }) ```
15029
14825
 
15030
14826
  **saveSet**(collectionId: string, body: SaveKnowledgeSetRequest) → `Promise<KnowledgeSet>`
15031
14827
  Create a set, or update the one with this key (admin).
@@ -15039,8 +14835,8 @@ One set, by id or key (admin).
15039
14835
  **deleteSet**(collectionId: string, set: string) → `Promise<`
15040
14836
  Delete a set with its sources and passages (admin).
15041
14837
 
15042
- **listSources**(collectionId: string, set: string) → `Promise<ListResult<KnowledgeSource>>`
15043
- A set's sources, with their status (admin). One list, no pages. ```typescript const { items } = await knowledge.listSources('coll_123', 'manuals') ```
14838
+ **listSources**(collectionId: string, set: string, options: ListOptions = {}) → `Promise<ListResult<KnowledgeSource>>`
14839
+ A set's sources, with their status (admin). A page at a time (`limit` and `cursor`; 50 unless you say otherwise). ```typescript let page = await knowledge.listSources('coll_123', 'manuals') while (page.nextCursor) page = await knowledge.listSources('coll_123', 'manuals', { cursor: page.nextCursor }) ```
15044
14840
 
15045
14841
  **addSource**(collectionId: string, set: string, body: AddKnowledgeSourceRequest) → `Promise<KnowledgeSource>`
15046
14842
  Add a source; feeds and pages are read in the background (admin).
@@ -15062,11 +14858,11 @@ Remove pushed documents by `ref` (admin).
15062
14858
 
15063
14859
  **search**(collectionId: string,
15064
14860
  body: KnowledgeSearchRequest) → `Promise<ListResult<KnowledgeSearchResult> & Pick<KnowledgeSearchResponse, 'query' | 'mode'>>`
15065
- Search every set, staff ones included (admin). The matches come back as `items`, best first, with the `query` and the search `mode` beside them. There are no pages: `k` says how many matches to return. ```typescript const { items, mode } = await knowledge.search('coll_123', { query: 'how do I descale', k: 5 }) ```
14861
+ Search every set, staff ones included (admin). `q` is what to look for. The matches come back as `items`, best first, with the `query` and the search `mode` beside them. `limit` says how many matches to return (default 8, at most 25); `cursor` is the previous page's `nextCursor`. ```typescript const { items, mode } = await knowledge.search('coll_123', { q: 'how do I descale', limit: 5 }) ```
15066
14862
 
15067
14863
  **publicSearch**(collectionId: string,
15068
14864
  body: KnowledgeSearchRequest) → `Promise<ListResult<KnowledgeSearchResult> & Pick<KnowledgeSearchResponse, 'query' | 'mode'>>`
15069
- Search from a website, Portal or Hub: public sets, plus customer sets for a signed-in person. The answer has the same shape as the admin `search`: the matches come back as `items`, best first, with the `query` and the search `mode` beside them. There are no pages: `k` says how many matches to return. ```typescript const { items } = await knowledge.publicSearch('coll_123', { query: 'how do I descale', k: 5 }) for (const r of items) console.log(r.title, r.heading, r.url, r.snippet) ```
14865
+ Search from a website, Portal or Hub: public sets, plus customer sets for a signed-in person. The options and the answer are the same as the admin `search`: `q` is what to look for, and the matches come back as `items`, best first, with the `query` and the search `mode` beside them. `limit` says how many matches to return (default 8, at most 25); `cursor` is the previous page's `nextCursor`. ```typescript const { items } = await knowledge.publicSearch('coll_123', { q: 'how do I descale', limit: 5 }) for (const r of items) console.log(r.title, r.heading, r.url, r.snippet) ```
15070
14866
 
15071
14867
  ### location
15072
14868
 
@@ -15078,7 +14874,7 @@ Admin: Create a collection-scoped location POST /admin/collection/:collectionId/
15078
14874
 
15079
14875
  **search**(collectionId: string,
15080
14876
  query: LocationSearchQuery = {}) → `Promise<ListResult<Location>>`
15081
- Admin: Search locations to pick during setup (combines collection + global). One list, no pages: `limit` says how many (default 20, at most 100). GET /admin/collection/:collectionId/location/search ```typescript const { items } = await location.search('coll_123', { q: 'distillery', countryCode: 'GB', limit: 10 }) ```
14877
+ Admin: Search locations to pick during setup (combines collection + global). `q` is the search text. `limit` says how many (default 20, at most 100) and `cursor` is the previous page's `nextCursor`. `orderBy` sorts by one field: `name` (the default), `countryCode` or `countryName`. GET /admin/collection/:collectionId/location/search ```typescript const { items, nextCursor } = await location.search('coll_123', { q: 'distillery', countryCode: 'GB', limit: 10, orderBy: [{ countryName: 'asc' }], }) ```
15082
14878
 
15083
14879
  **getPublic**(locationId: string) → `Promise<Location>`
15084
14880
  Public: Fetch a global location by ID GET /public/location/:locationId
@@ -15093,7 +14889,7 @@ Public: Fetch a location for a collection; returns either a collection-owned or
15093
14889
  Create a lot (resolves its selector into members).
15094
14890
 
15095
14891
  **list**(collectionId: string, params: ListLotsParams = {}) → `Promise<ListResult<Lot>>`
15096
- List lots (summary rows; `payload`/`productIds` omitted). Filter by status, search, or containing productId. One list, no pages. ```typescript const { items } = await lots.list('coll_123', { status: 'open' }) ```
14892
+ List lots (summary rows; `payload`/`productIds` omitted), a page at a time. Filter by `status`, search text (`q`), or containing `productId`; page with `limit` (default 50) and `cursor`. ```typescript let page = await lots.list('coll_123', { status: 'open', q: 'spring', limit: 50 }) while (page.nextCursor) { page = await lots.list('coll_123', { status: 'open', q: 'spring', limit: 50, cursor: page.nextCursor }) } ```
15097
14893
 
15098
14894
  **get**(collectionId: string, lotId: string, opts: { includeDeleted?: boolean } = {}) → `Promise<Lot>`
15099
14895
  Get the full lot record. Pass `{ includeDeleted: true }` to fetch a soft-deleted one.
@@ -15120,13 +14916,13 @@ Re-resolve members from the current selector; returns the lot + a member diff.
15120
14916
  A lot's member products (summaries), a page at a time. `count` is how many members there are in all. ```typescript let page = await lots.listProducts('coll_123', lotId, { limit: 50 }) while (page.nextCursor) page = await lots.listProducts('coll_123', lotId, { limit: 50, cursor: page.nextCursor }) ```
15121
14917
 
15122
14918
  **publicList**(collectionId: string, params: Omit<ListLotsParams, 'includeDeleted'> = {}) → `Promise<ListResult<Lot>>`
15123
- List lots from a public context (summary rows). One list, no pages. ```typescript const { items } = await lots.publicList('coll_123', { productId: 'prod_789' }) ```
14919
+ List lots from a public context (summary rows), a page at a time. Filter by `status`, search text (`q`), or containing `productId`; page with `limit` (default 50) and `cursor`. ```typescript const { items, nextCursor } = await lots.publicList('coll_123', { productId: 'prod_789', limit: 50 }) ```
15124
14920
 
15125
14921
  **publicGet**(collectionId: string, lotId: string) → `Promise<Lot>`
15126
- List lots from a public context (summary rows). One list, no pages. ```typescript const { items } = await lots.publicList('coll_123', { productId: 'prod_789' }) ```
14922
+ List lots from a public context (summary rows), a page at a time. Filter by `status`, search text (`q`), or containing `productId`; page with `limit` (default 50) and `cursor`. ```typescript const { items, nextCursor } = await lots.publicList('coll_123', { productId: 'prod_789', limit: 50 }) ```
15127
14923
 
15128
14924
  **publicGetByNumber**(collectionId: string, lotNumber: string) → `Promise<Lot>`
15129
- List lots from a public context (summary rows). One list, no pages. ```typescript const { items } = await lots.publicList('coll_123', { productId: 'prod_789' }) ```
14925
+ List lots from a public context (summary rows), a page at a time. Filter by `status`, search text (`q`), or containing `productId`; page with `limit` (default 50) and `cursor`. ```typescript const { items, nextCursor } = await lots.publicList('coll_123', { productId: 'prod_789', limit: 50 }) ```
15130
14926
 
15131
14927
  **publicListProducts**(collectionId: string, lotId: string, opts: ListOptions = {}) → `Promise<ListResult<LotProductSummary>>`
15132
14928
  A lot's member products (summaries) from a public context, a page at a time. ```typescript const { items, nextCursor, count } = await lots.publicListProducts('coll_123', lotId, { limit: 50 }) ```
@@ -15136,50 +14932,51 @@ A lot's member products (summaries) from a public context, a page at a time. ```
15136
14932
  Loyalty programmes built on top of collections. Configure schemes and earning rules; contacts earn points automatically via interaction events. See the [Loyalty guide](loyalty.md) for the full walkthrough.
15137
14933
 
15138
14934
  **list**(collectionId: string,
15139
- params: { includeDeleted?: boolean } = {}) → `Promise<ListResult<LoyaltyScheme>>`
15140
- The collection's loyalty schemes (admin). One list, no pages. ```typescript const { items } = await loyalty.list('coll_123') ```
14935
+ params: ListOptions & { includeDeleted?: boolean } = {}) → `Promise<ListResult<LoyaltyScheme>>`
14936
+ The collection's loyalty schemes (admin), a page at a time. Page with `limit` (50 unless you say) and `cursor`. Pass `includeDeleted: true` to include deleted schemes. ```typescript let page = await loyalty.list('coll_123', { limit: 50 }) while (page.nextCursor) page = await loyalty.list('coll_123', { limit: 50, cursor: page.nextCursor }) ```
15141
14937
 
15142
14938
  **get**(collectionId: string,
15143
14939
  schemeId: string) → `Promise<LoyaltyScheme>`
15144
- The collection's loyalty schemes (admin). One list, no pages. ```typescript const { items } = await loyalty.list('coll_123') ```
14940
+ The collection's loyalty schemes (admin), a page at a time. Page with `limit` (50 unless you say) and `cursor`. Pass `includeDeleted: true` to include deleted schemes. ```typescript let page = await loyalty.list('coll_123', { limit: 50 }) while (page.nextCursor) page = await loyalty.list('coll_123', { limit: 50, cursor: page.nextCursor }) ```
15145
14941
 
15146
14942
  **create**(collectionId: string,
15147
14943
  body: CreateLoyaltySchemeBody) → `Promise<LoyaltyScheme>`
15148
- The collection's loyalty schemes (admin). One list, no pages. ```typescript const { items } = await loyalty.list('coll_123') ```
14944
+ The collection's loyalty schemes (admin), a page at a time. Page with `limit` (50 unless you say) and `cursor`. Pass `includeDeleted: true` to include deleted schemes. ```typescript let page = await loyalty.list('coll_123', { limit: 50 }) while (page.nextCursor) page = await loyalty.list('coll_123', { limit: 50, cursor: page.nextCursor }) ```
15149
14945
 
15150
14946
  **update**(collectionId: string,
15151
14947
  schemeId: string,
15152
14948
  body: UpdateLoyaltySchemeBody) → `Promise<LoyaltyScheme>`
15153
- The collection's loyalty schemes (admin). One list, no pages. ```typescript const { items } = await loyalty.list('coll_123') ```
14949
+ The collection's loyalty schemes (admin), a page at a time. Page with `limit` (50 unless you say) and `cursor`. Pass `includeDeleted: true` to include deleted schemes. ```typescript let page = await loyalty.list('coll_123', { limit: 50 }) while (page.nextCursor) page = await loyalty.list('coll_123', { limit: 50, cursor: page.nextCursor }) ```
15154
14950
 
15155
14951
  **remove**(collectionId: string,
15156
14952
  schemeId: string) → `Promise<LoyaltyScheme>`
15157
- The collection's loyalty schemes (admin). One list, no pages. ```typescript const { items } = await loyalty.list('coll_123') ```
14953
+ The collection's loyalty schemes (admin), a page at a time. Page with `limit` (50 unless you say) and `cursor`. Pass `includeDeleted: true` to include deleted schemes. ```typescript let page = await loyalty.list('coll_123', { limit: 50 }) while (page.nextCursor) page = await loyalty.list('coll_123', { limit: 50, cursor: page.nextCursor }) ```
15158
14954
 
15159
14955
  **listEarningRules**(collectionId: string,
15160
- schemeId: string) → `Promise<ListResult<LoyaltyEarningRule>>`
15161
- A scheme's earning rules (admin). One list, no pages. ```typescript const { items } = await loyalty.listEarningRules('coll_123', schemeId) ```
14956
+ schemeId: string,
14957
+ options: ListOptions = {}) → `Promise<ListResult<LoyaltyEarningRule>>`
14958
+ A scheme's earning rules (admin), a page at a time. Page with `limit` (50 unless you say) and `cursor`. ```typescript let page = await loyalty.listEarningRules('coll_123', schemeId, { limit: 50 }) while (page.nextCursor) page = await loyalty.listEarningRules('coll_123', schemeId, { limit: 50, cursor: page.nextCursor }) ```
15162
14959
 
15163
14960
  **getEarningRule**(collectionId: string,
15164
14961
  schemeId: string,
15165
14962
  ruleId: string) → `Promise<LoyaltyEarningRule>`
15166
- A scheme's earning rules (admin). One list, no pages. ```typescript const { items } = await loyalty.listEarningRules('coll_123', schemeId) ```
14963
+ A scheme's earning rules (admin), a page at a time. Page with `limit` (50 unless you say) and `cursor`. ```typescript let page = await loyalty.listEarningRules('coll_123', schemeId, { limit: 50 }) while (page.nextCursor) page = await loyalty.listEarningRules('coll_123', schemeId, { limit: 50, cursor: page.nextCursor }) ```
15167
14964
 
15168
14965
  **createEarningRule**(collectionId: string,
15169
14966
  schemeId: string,
15170
14967
  body: CreateLoyaltyEarningRuleBody) → `Promise<LoyaltyEarningRule>`
15171
- A scheme's earning rules (admin). One list, no pages. ```typescript const { items } = await loyalty.listEarningRules('coll_123', schemeId) ```
14968
+ A scheme's earning rules (admin), a page at a time. Page with `limit` (50 unless you say) and `cursor`. ```typescript let page = await loyalty.listEarningRules('coll_123', schemeId, { limit: 50 }) while (page.nextCursor) page = await loyalty.listEarningRules('coll_123', schemeId, { limit: 50, cursor: page.nextCursor }) ```
15172
14969
 
15173
14970
  **updateEarningRule**(collectionId: string,
15174
14971
  schemeId: string,
15175
14972
  ruleId: string,
15176
14973
  body: UpdateLoyaltyEarningRuleBody) → `Promise<LoyaltyEarningRule>`
15177
- A scheme's earning rules (admin). One list, no pages. ```typescript const { items } = await loyalty.listEarningRules('coll_123', schemeId) ```
14974
+ A scheme's earning rules (admin), a page at a time. Page with `limit` (50 unless you say) and `cursor`. ```typescript let page = await loyalty.listEarningRules('coll_123', schemeId, { limit: 50 }) while (page.nextCursor) page = await loyalty.listEarningRules('coll_123', schemeId, { limit: 50, cursor: page.nextCursor }) ```
15178
14975
 
15179
14976
  **removeEarningRule**(collectionId: string,
15180
14977
  schemeId: string,
15181
14978
  ruleId: string) → `Promise<LoyaltyEarningRule>`
15182
- A scheme's earning rules (admin). One list, no pages. ```typescript const { items } = await loyalty.listEarningRules('coll_123', schemeId) ```
14979
+ A scheme's earning rules (admin), a page at a time. Page with `limit` (50 unless you say) and `cursor`. ```typescript let page = await loyalty.listEarningRules('coll_123', schemeId, { limit: 50 }) while (page.nextCursor) page = await loyalty.listEarningRules('coll_123', schemeId, { limit: 50, cursor: page.nextCursor }) ```
15183
14980
 
15184
14981
  **listMembers**(collectionId: string,
15185
14982
  schemeId: string,
@@ -15203,19 +15000,21 @@ Manually award or deduct points for a contact. - `points` must be a non-zero int
15203
15000
  params: ListOptions = {}) → `Promise<ListResult<LoyaltyTransaction>>`
15204
15001
  One member's points transactions (admin), newest first, a page at a time. ```typescript const { items, nextCursor } = await loyalty.getMemberHistory('coll_123', schemeId, contactId, { limit: 50 }) ```
15205
15002
 
15206
- **publicList**(collectionId: string) → `Promise<ListResult<LoyaltyScheme>>`
15207
- List active schemes for a collection. No authentication required. One list, no pages. ```typescript const { items } = await loyalty.publicList('coll_123') ```
15003
+ **publicList**(collectionId: string, options: ListOptions = {}) → `Promise<ListResult<LoyaltyScheme>>`
15004
+ List active schemes for a collection, a page at a time. No authentication required. Page with `limit` (50 unless you say) and `cursor`. ```typescript let page = await loyalty.publicList('coll_123', { limit: 50 }) while (page.nextCursor) page = await loyalty.publicList('coll_123', { limit: 50, cursor: page.nextCursor }) ```
15208
15005
 
15209
15006
  **publicGet**(collectionId: string,
15210
15007
  schemeId: string) → `Promise<LoyaltyScheme>`
15211
15008
  Get a single active scheme. No authentication required.
15212
15009
 
15213
15010
  **publicListEarningRules**(collectionId: string,
15214
- schemeId: string) → `Promise<ListResult<LoyaltyEarningRule>>`
15215
- List active earning rules for a scheme — useful for showing "how to earn" in a loyalty UI. No authentication required. One list, no pages. ```typescript const { items } = await loyalty.publicListEarningRules('coll_123', schemeId) ```
15011
+ schemeId: string,
15012
+ options: ListOptions = {}) → `Promise<ListResult<LoyaltyEarningRule>>`
15013
+ List active earning rules for a scheme — useful for showing "how to earn" in a loyalty UI. No authentication required. A page at a time: page with `limit` (50 unless you say) and `cursor`. ```typescript let page = await loyalty.publicListEarningRules('coll_123', schemeId, { limit: 50 }) while (page.nextCursor) page = await loyalty.publicListEarningRules('coll_123', schemeId, { limit: 50, cursor: page.nextCursor }) ```
15216
15014
 
15217
- **publicGetMe**(collectionId: string) → `Promise<ListResult<LoyaltySchemeWithMembership>>`
15218
- Get all active schemes with the caller's membership embedded in each. This is the primary entry point for a loyalty widget — one call gives you everything needed to render a user's loyalty status across all programs in a collection. - Authenticated: `member` is populated with balance + lifetimePoints (or null if not yet enrolled in that scheme) - Unauthenticated: `member` is null on all schemes One list, no pages. ```typescript const { items } = await loyalty.publicGetMe('coll_123') for (const scheme of items) console.log(scheme.name, scheme.member?.balance ?? 0) ```
15015
+ **publicGetMe**(collectionId: string,
15016
+ options: ListOptions = {}) → `Promise<ListResult<LoyaltySchemeWithMembership>>`
15017
+ Get all active schemes with the caller's membership embedded in each. This is the primary entry point for a loyalty widget — one call gives you everything needed to render a user's loyalty status across all programs in a collection. - Authenticated: `member` is populated with balance + lifetimePoints (or null if not yet enrolled in that scheme) - Unauthenticated: `member` is null on all schemes A page at a time: page with `limit` (50 unless you say) and `cursor`. ```typescript let page = await loyalty.publicGetMe('coll_123') for (const scheme of page.items) console.log(scheme.name, scheme.member?.balance ?? 0) while (page.nextCursor) page = await loyalty.publicGetMe('coll_123', { cursor: page.nextCursor }) ```
15219
15018
 
15220
15019
  **publicGetMine**(collectionId: string,
15221
15020
  schemeId: string) → `Promise<LoyaltyMember>`
@@ -15248,7 +15047,7 @@ Claim an NFC tag (public). POST /public/nfc/claimTag
15248
15047
  Validate an NFC tag payload (public). POST /public/nfc/validate
15249
15048
 
15250
15049
  **lookupTag**(tagId: string) → `Promise<ListResult<NfcTagInfo>>`
15251
- Lookup a tag by its ID (public): every code that tag is known as. One list, no pages. GET /public/nfc/findByTag/:tagId ```typescript const { items } = await nfc.lookupTag('04A1B2C3D4E5F6') ```
15050
+ Lookup a tag by its ID (public): every code that tag is known as, a page at a time. GET /public/nfc/findByTag/:tagId ```typescript const { items } = await nfc.lookupTag('04A1B2C3D4E5F6') ```
15252
15051
 
15253
15052
  ### operations
15254
15053
 
@@ -15280,12 +15079,12 @@ Delete an order and all its items (cascade delete). ```typescript await order.re
15280
15079
 
15281
15080
  **list**(collectionId: string,
15282
15081
  params?: ListOrdersRequest) → `Promise<ListResult<Order>>`
15283
- List orders for a collection with optional filters, a page at a time (default 100). Orders are returned in descending order by createdAt (newest first). ```typescript // The first page of orders (without items for better performance) const { items } = await order.list('coll_123') // List with filters, page by page let page = await order.list('coll_123', { status: 'pending', limit: 50 }) while (page.nextCursor) { page = await order.list('coll_123', { status: 'pending', limit: 50, cursor: page.nextCursor }) } // Filter by customer with items const customerOrders = await order.list('coll_123', { customerId: 'CUST-789', includeItems: true }) // Purchase orders from one supplier const purchases = await order.list('coll_123', { direction: 'purchase', partyId: supplierId }) ```
15082
+ List orders for a collection with optional filters, a page at a time (default 100). Orders are returned in descending order by createdAt (newest first). ```typescript // The first page of orders (without items for better performance) const { items } = await order.list('coll_123') // List with filters, page by page let page = await order.list('coll_123', { status: 'pending', limit: 50 }) while (page.nextCursor) { page = await order.list('coll_123', { status: 'pending', limit: 50, cursor: page.nextCursor }) } // Filter by customer with items const customerOrders = await order.list('coll_123', { customerId: 'CUST-789', expand: ['items'] }) // Purchase orders from one supplier const purchases = await order.list('coll_123', { direction: 'purchase', partyId: supplierId }) ```
15284
15083
 
15285
15084
  **getItems**(collectionId: string,
15286
15085
  orderId: string,
15287
15086
  params?: GetOrderItemsParams) → `Promise<ListResult<OrderItem>>`
15288
- Get items from an order with pagination support. Use this for orders with many items instead of includeItems. ```typescript // Get first page of items const page1 = await order.getItems('coll_123', 'order_abc123', { limit: 100 }) // Get next page if (page1.nextCursor) { const page2 = await order.getItems('coll_123', 'order_abc123', { limit: 100, cursor: page1.nextCursor }) } ```
15087
+ Get items from an order with pagination support. Use this for orders with many items instead of `expand: ['items']`. ```typescript // Get first page of items const page1 = await order.getItems('coll_123', 'order_abc123', { limit: 100 }) // Get next page if (page1.nextCursor) { const page2 = await order.getItems('coll_123', 'order_abc123', { limit: 100, cursor: page1.nextCursor }) } ```
15289
15088
 
15290
15089
  **addItems**(collectionId: string,
15291
15090
  orderId: string,
@@ -15302,7 +15101,7 @@ Add to (or take from) how much of a line has been shipped or received. Atomic, s
15302
15101
 
15303
15102
  **query**(collectionId: string,
15304
15103
  data: QueryOrdersRequest) → `Promise<ListResult<Order>>`
15305
- Advanced query for orders with order-level and item-level filtering. More powerful than the basic list() function. ```typescript // Find pending orders created in January 2026 const result = await order.query('coll_123', { query: { status: 'pending', createdAfter: '2026-01-01T00:00:00Z', createdBefore: '2026-02-01T00:00:00Z', sortBy: 'createdAt', sortOrder: 'desc' }, limit: 50 }) console.log(result.items.length) // The next page: the same query with the cursor if (result.nextCursor) { const next = await order.query('coll_123', { query: { status: 'pending', sortBy: 'createdAt', sortOrder: 'desc' }, limit: 50, cursor: result.nextCursor }) } // Find orders with specific metadata and item count const highPriority = await order.query('coll_123', { query: { metadata: { priority: 'high' }, minItemCount: 10, maxItemCount: 100 }, includeItems: true }) // Find orders containing a specific product batch const batchOrders = await order.query('coll_123', { query: { productId: 'prod_789', batchId: 'BATCH-2024-001' }, includeItems: true }) // Find an order containing one of several specific items const matched = await order.query('coll_123', { query: { items: [ { itemType: 'tag', itemId: 'TAG001' }, { itemType: 'serial', itemId: 'SN12345' } ] }, includeItems: true }) ```
15104
+ Advanced query for orders with order-level and item-level filtering. More powerful than the basic list() function. `expand: ['items']`, and `limit` and `cursor` for paging. These all sit beside `query`, not inside it. ```typescript // Find pending orders created in January 2026, newest first const result = await order.query('coll_123', { query: { status: 'pending' }, createdAt: { gte: '2026-01-01T00:00:00Z', lte: '2026-02-01T00:00:00Z' }, orderBy: [{ createdAt: 'desc' }], limit: 50 }) console.log(result.items.length) // The next page: the same query with the cursor if (result.nextCursor) { const next = await order.query('coll_123', { query: { status: 'pending' }, createdAt: { gte: '2026-01-01T00:00:00Z', lte: '2026-02-01T00:00:00Z' }, orderBy: [{ createdAt: 'desc' }], limit: 50, cursor: result.nextCursor }) } // Find orders with specific metadata and item count, with their items const highPriority = await order.query('coll_123', { query: { metadata: { priority: 'high' }, minItemCount: 10, maxItemCount: 100 }, expand: ['items'] }) // Find orders containing a specific product batch const batchOrders = await order.query('coll_123', { query: { productId: 'prod_789', batchId: 'BATCH-2024-001' }, expand: ['items'] }) // Find an order containing one of several specific items const matched = await order.query('coll_123', { query: { items: [ { itemType: 'tag', itemId: 'TAG001' }, { itemType: 'serial', itemId: 'SN12345' } ] }, expand: ['items'] }) ```
15306
15105
 
15307
15106
  **reports**(collectionId: string,
15308
15107
  params?: ReportsParams) → `Promise<ReportsResponse>`
@@ -15315,12 +15114,12 @@ Get comprehensive scan analytics for all tags in an order. Returns scan counts,
15315
15114
  **getTimeline**(collectionId: string,
15316
15115
  orderId: string,
15317
15116
  params?: TimelineRequest) → `Promise<ListResult<TagScanEvent> &`
15318
- Get chronological timeline of all scan events for an order's tags. Supports filtering by date range and admin/customer scans. pages: `limit` says how many, default 1000), with the order they belong to ```typescript // Get all scan events const timeline = await order.getTimeline('coll_123', 'order_abc123') timeline.items.forEach(event => { console.log(`${event.timestamp}: ${event.eventType} by ${event.isAdmin ? 'admin' : 'customer'}`) }) // Get admin scans only from last week const adminScans = await order.getTimeline('coll_123', 'order_abc123', { isAdmin: true, from: '2026-02-01T00:00:00Z', limit: 500 }) ```
15117
+ Get chronological timeline of all scan events for an order's tags. Supports filtering by date range and admin/customer scans. time (`limit` says how many, default 1000), with the order they belong to ```typescript // The first page of scan events let timeline = await order.getTimeline('coll_123', 'order_abc123') timeline.items.forEach(event => { console.log(`${event.timestamp}: ${event.eventType} by ${event.isAdmin ? 'admin' : 'customer'}`) }) // The next page if (timeline.nextCursor) timeline = await order.getTimeline('coll_123', 'order_abc123', { cursor: timeline.nextCursor }) // Get admin scans only from last week const adminScans = await order.getTimeline('coll_123', 'order_abc123', { isAdmin: true, from: '2026-02-01T00:00:00Z', limit: 500 }) ```
15319
15118
 
15320
15119
  **getLocationHistory**(collectionId: string,
15321
15120
  orderId: string,
15322
15121
  params?: LocationRequest) → `Promise<ListResult<LocationScan> &`
15323
- Get location-based scan history for an order's tags. Shows where the order's tags have been scanned. (one list, no pages: `limit` says how many, default 1000), with the order they belong to ```typescript const locations = await order.getLocationHistory('coll_123', 'order_abc123', { limit: 100 }) console.log(`Order has ${locations.items.length} scans with a location`) locations.items.forEach(scan => { console.log(`${scan.location} at ${scan.timestamp}`) }) ```
15122
+ Get location-based scan history for an order's tags. Shows where the order's tags have been scanned. a page at a time (`limit` says how many, default 1000), with the order they belong to ```typescript let locations = await order.getLocationHistory('coll_123', 'order_abc123', { limit: 100 }) locations.items.forEach(scan => { console.log(`${scan.location} at ${scan.timestamp}`) }) // The next page if (locations.nextCursor) { locations = await order.getLocationHistory('coll_123', 'order_abc123', { limit: 100, cursor: locations.nextCursor }) } ```
15324
15123
 
15325
15124
  **getBulkAnalytics**(collectionId: string,
15326
15125
  data: BulkAnalyticsRequest) → `Promise<BulkAnalyticsResponse>`
@@ -15332,14 +15131,14 @@ Get collection-wide analytics summary across all orders. Returns daily scan coun
15332
15131
 
15333
15132
  ### partner
15334
15133
 
15335
- **list**() → `Promise<ListResult<Partner>>`
15336
- The partners you belong to, with your role in each. Returns `{ items, nextCursor }`: the partners are in `items` (empty for everyone else). The list is not paged, so `nextCursor` is always `null`. ```typescript const { items: partners } = await partner.list() ```
15134
+ **list**(options: ListOptions = {}) → `Promise<ListResult<Partner>>`
15135
+ The partners you belong to, with your role in each. Returns `{ items, nextCursor }`: the partners are in `items` (empty for everyone else). A page at a time (`limit` and `cursor`; 50 unless you say otherwise). ```typescript let page = await partner.list() while (page.nextCursor) page = await partner.list({ cursor: page.nextCursor }) ```
15337
15136
 
15338
15137
  **get**(partnerId: string) → `Promise<Partner>`
15339
15138
  One partner (owners also see its members).
15340
15139
 
15341
- **claimSets**(partnerId: string) → `Promise<ListResult<PartnerClaimSet>>`
15342
- The partner's claim sets. Returns `{ items, nextCursor }`: the sets are in `items`. The list is not paged, so `nextCursor` is always `null`. ```typescript const { items: sets } = await partner.claimSets(partnerId) ```
15140
+ **claimSets**(partnerId: string, options: ListOptions = {}) → `Promise<ListResult<PartnerClaimSet>>`
15141
+ The partner's claim sets. Returns `{ items, nextCursor }`: the sets are in `items`. A page at a time (`limit` and `cursor`; 50 unless you say otherwise). ```typescript let page = await partner.claimSets(partnerId) while (page.nextCursor) page = await partner.claimSets(partnerId, { cursor: page.nextCursor }) ```
15343
15142
 
15344
15143
  **getClaimSet**(partnerId: string, claimSetId: string) → `Promise<PartnerClaimSet>`
15345
15144
  One of the partner's claim sets.
@@ -15348,10 +15147,10 @@ One of the partner's claim sets.
15348
15147
  A new claim set for the partner, on one of its tap domains (owners and admins).
15349
15148
 
15350
15149
  **lookupTags**(partnerId: string, query: { uid?: string; code?: string }) → `Promise<ListResult<PartnerTagHit>>`
15351
- Find a tag across the partner's sets by its chip UID (8 or 14 hex) or its code (printed or bare). Returns `{ items, nextCursor }`: `items` has one hit for each of the partner's sets the tag is in (usually one; none if the tag isn't the partner's). Never returns keys. The list is not paged, so `nextCursor` is always `null`. ```typescript const { items: hits } = await partner.lookupTags(partnerId, { uid: '04A1B2C3D4E5F6' }) ```
15150
+ Find a tag across the partner's sets by its chip UID (8 or 14 hex) or its code (printed or bare). Returns `{ items, nextCursor }`: `items` has one hit for each of the partner's sets the tag is in (usually one; none if the tag isn't the partner's). Never returns keys. A look-up is never paged: every hit comes back in the one answer. ```typescript const { items: hits } = await partner.lookupTags(partnerId, { uid: '04A1B2C3D4E5F6' }) ```
15352
15151
 
15353
- **tagAttempts**(partnerId: string, uid: string) → `Promise<ListResult<ClientErrorEvent>>`
15354
- What phones reported about one chip (errors.report with entityType 'tag'), newest first: a tag that failed to program or register, with the host's NFC log in context. For a chip in the partner's sets, or attempts that named one of them. Returns `{ items, nextCursor }`: the ten latest reports are in `items`. The list is not paged, so `nextCursor` is always `null`. ```typescript const { items: attempts } = await partner.tagAttempts(partnerId, '04A1B2C3D4E5F6') ```
15152
+ **tagAttempts**(partnerId: string, uid: string, options: ListOptions = {}) → `Promise<ListResult<ClientErrorEvent>>`
15153
+ What phones reported about one chip (errors.report with entityType 'tag'), newest first: a tag that failed to program or register, with the host's NFC log in context. For a chip in the partner's sets, or attempts that named one of them. Returns `{ items, nextCursor }`: the latest reports are in `items` (ten unless `limit` says otherwise); `cursor` is the previous page's `nextCursor`. ```typescript const { items: attempts } = await partner.tagAttempts(partnerId, '04A1B2C3D4E5F6', { limit: 20 }) ```
15355
15154
 
15356
15155
  ### places
15357
15156
 
@@ -15374,26 +15173,27 @@ Get podcast generation status
15374
15173
  admin?: boolean) → `Promise<ProductResponse>`
15375
15174
 
15376
15175
  **list**(collectionId: string,
15377
- admin?: boolean) → `Promise<ListResult<ProductResponse>>`
15378
- Every product in a collection, in one list (no pages). For filtering, sorting and paging use `products.query`. ```typescript const { items } = await products.list(collectionId) ```
15176
+ admin?: boolean,
15177
+ options: ListOptions & { expand?: Array<'facets'> } = {}) → `Promise<ListResult<ProductResponse>>`
15178
+ The products in a collection, a page at a time. For searching, filtering and sorting use `products.query`. as full values instead of their keys ```typescript let page = await products.list(collectionId, false, { limit: 50 }) while (page.nextCursor) { page = await products.list(collectionId, false, { limit: 50, cursor: page.nextCursor }) } // Admin, with full facet values const { items } = await products.list(collectionId, true, { expand: ['facets'] }) ```
15379
15179
 
15380
15180
  **create**(collectionId: string,
15381
15181
  data: ProductCreateRequest) → `Promise<ProductResponse>`
15382
- Every product in a collection, in one list (no pages). For filtering, sorting and paging use `products.query`. ```typescript const { items } = await products.list(collectionId) ```
15182
+ The products in a collection, a page at a time. For searching, filtering and sorting use `products.query`. as full values instead of their keys ```typescript let page = await products.list(collectionId, false, { limit: 50 }) while (page.nextCursor) { page = await products.list(collectionId, false, { limit: 50, cursor: page.nextCursor }) } // Admin, with full facet values const { items } = await products.list(collectionId, true, { expand: ['facets'] }) ```
15383
15183
 
15384
15184
  **update**(collectionId: string,
15385
15185
  productId: string,
15386
15186
  data: ProductUpdateRequest) → `Promise<ProductResponse>`
15387
- Every product in a collection, in one list (no pages). For filtering, sorting and paging use `products.query`. ```typescript const { items } = await products.list(collectionId) ```
15187
+ The products in a collection, a page at a time. For searching, filtering and sorting use `products.query`. as full values instead of their keys ```typescript let page = await products.list(collectionId, false, { limit: 50 }) while (page.nextCursor) { page = await products.list(collectionId, false, { limit: 50, cursor: page.nextCursor }) } // Admin, with full facet values const { items } = await products.list(collectionId, true, { expand: ['facets'] }) ```
15388
15188
 
15389
15189
  **remove**(collectionId: string,
15390
15190
  productId: string) → `Promise<void>`
15391
- Every product in a collection, in one list (no pages). For filtering, sorting and paging use `products.query`. ```typescript const { items } = await products.list(collectionId) ```
15191
+ The products in a collection, a page at a time. For searching, filtering and sorting use `products.query`. as full values instead of their keys ```typescript let page = await products.list(collectionId, false, { limit: 50 }) while (page.nextCursor) { page = await products.list(collectionId, false, { limit: 50, cursor: page.nextCursor }) } // Admin, with full facet values const { items } = await products.list(collectionId, true, { expand: ['facets'] }) ```
15392
15192
 
15393
15193
  **query**(collectionId: string,
15394
15194
  body: ProductQueryRequest,
15395
15195
  admin?: boolean) → `Promise<ListResult<ProductResponse> &`
15396
- Query products in a collection with filtering, sorting, and paging. authenticated admin context). Defaults to `false`, which targets the `/public` endpoint — consistent with `get`, `list`, and `listAssets`. for the next page (null on the last), how many match in all where the server counted, and `meta` (how the query was run) ```typescript // Public query (default) const { items, nextCursor, count } = await products.query(collectionId, { query: { search: 'cabernet' }, limit: 20 }) // The next page: the same query with the cursor if (nextCursor) { await products.query(collectionId, { query: { search: 'cabernet' }, limit: 20, cursor: nextCursor }) } // Admin query (authenticated) await products.query(collectionId, { query: { search: 'cabernet' } }, true) ```
15196
+ Query products in a collection with search, filtering, sorting, and paging. and the other filters in `query`, plus `limit` (default 50) and `cursor` for paging authenticated admin context). Defaults to `false`, which targets the `/public` endpoint — consistent with `get`, `list`, and `listAssets`. for the next page (null on the last), how many match in all where the server counted, and `meta` (how the query was run) ```typescript // Public query (default) const { items, nextCursor, count } = await products.query(collectionId, { q: 'cabernet', limit: 20 }) // The next page: the same query with the cursor if (nextCursor) { await products.query(collectionId, { q: 'cabernet', limit: 20, cursor: nextCursor }) } // Newest first, created this month, active only, with full facet values await products.query(collectionId, { orderBy: [{ createdAt: 'desc' }], createdAt: { gte: '2026-11-01T00:00:00Z', lte: '2026-11-30T23:59:59Z' }, query: { status: ['active'] }, expand: ['facets'], }) // Admin query (authenticated) await products.query(collectionId, { q: 'cabernet' }, true) ```
15397
15197
 
15398
15198
  **standardQuery**(collectionId: string,
15399
15199
  body: StandardQuery = {}) → `Promise<QueryResult>`
@@ -15409,44 +15209,45 @@ What a products standard query can use: its fields and what each can filter, sor
15409
15209
 
15410
15210
  **listAssets**(collectionId: string,
15411
15211
  productId: string,
15412
- admin?: boolean) → `Promise<ListResult<AssetResponse>>`
15413
- A product's assets (images, documents), in one list (no pages). ```typescript const { items } = await products.listAssets(collectionId, productId) ```
15212
+ admin?: boolean,
15213
+ options: ListOptions = {}) → `Promise<ListResult<AssetResponse>>`
15214
+ A product's assets (images, documents), a page at a time. ```typescript let page = await products.listAssets(collectionId, productId, false, { limit: 50 }) while (page.nextCursor) { page = await products.listAssets(collectionId, productId, false, { limit: 50, cursor: page.nextCursor }) } ```
15414
15215
 
15415
15216
  **createClaimWindow**(collectionId: string,
15416
15217
  productId: string,
15417
15218
  body: Record<string, JsonValue>) → `Promise<unknown>`
15418
- A product's assets (images, documents), in one list (no pages). ```typescript const { items } = await products.listAssets(collectionId, productId) ```
15219
+ A product's assets (images, documents), a page at a time. ```typescript let page = await products.listAssets(collectionId, productId, false, { limit: 50 }) while (page.nextCursor) { page = await products.listAssets(collectionId, productId, false, { limit: 50, cursor: page.nextCursor }) } ```
15419
15220
 
15420
15221
  **updateClaimWindow**(collectionId: string,
15421
15222
  productId: string,
15422
15223
  claimId: string,
15423
15224
  body: Record<string, JsonValue>) → `Promise<unknown>`
15424
- A product's assets (images, documents), in one list (no pages). ```typescript const { items } = await products.listAssets(collectionId, productId) ```
15225
+ A product's assets (images, documents), a page at a time. ```typescript let page = await products.listAssets(collectionId, productId, false, { limit: 50 }) while (page.nextCursor) { page = await products.listAssets(collectionId, productId, false, { limit: 50, cursor: page.nextCursor }) } ```
15425
15226
 
15426
15227
  **refresh**(collectionId: string,
15427
15228
  productId: string) → `Promise<ProductResponse>`
15428
- A product's assets (images, documents), in one list (no pages). ```typescript const { items } = await products.listAssets(collectionId, productId) ```
15229
+ A product's assets (images, documents), a page at a time. ```typescript let page = await products.listAssets(collectionId, productId, false, { limit: 50 }) while (page.nextCursor) { page = await products.listAssets(collectionId, productId, false, { limit: 50, cursor: page.nextCursor }) } ```
15429
15230
 
15430
15231
  **getSN**(collectionId: string,
15431
15232
  productId: string,
15432
15233
  startIndex: number = 0,
15433
15234
  count: number = 10) → `Promise<unknown>`
15434
- A product's assets (images, documents), in one list (no pages). ```typescript const { items } = await products.listAssets(collectionId, productId) ```
15235
+ A product's assets (images, documents), a page at a time. ```typescript let page = await products.listAssets(collectionId, productId, false, { limit: 50 }) while (page.nextCursor) { page = await products.listAssets(collectionId, productId, false, { limit: 50, cursor: page.nextCursor }) } ```
15435
15236
 
15436
15237
  **lookupSN**(collectionId: string,
15437
15238
  productId: string,
15438
15239
  codeId: string) → `Promise<unknown>`
15439
- A product's assets (images, documents), in one list (no pages). ```typescript const { items } = await products.listAssets(collectionId, productId) ```
15240
+ A product's assets (images, documents), a page at a time. ```typescript let page = await products.listAssets(collectionId, productId, false, { limit: 50 }) while (page.nextCursor) { page = await products.listAssets(collectionId, productId, false, { limit: 50, cursor: page.nextCursor }) } ```
15440
15241
 
15441
15242
  **publicLookupClaim**(collectionId: string,
15442
15243
  productId: string,
15443
15244
  claimId: string) → `Promise<unknown>`
15444
- A product's assets (images, documents), in one list (no pages). ```typescript const { items } = await products.listAssets(collectionId, productId) ```
15245
+ A product's assets (images, documents), a page at a time. ```typescript let page = await products.listAssets(collectionId, productId, false, { limit: 50 }) while (page.nextCursor) { page = await products.listAssets(collectionId, productId, false, { limit: 50, cursor: page.nextCursor }) } ```
15445
15246
 
15446
15247
  **publicCreateClaim**(collectionId: string,
15447
15248
  productId: string,
15448
15249
  body: ProductClaimCreateRequestBody) → `Promise<unknown>`
15449
- A product's assets (images, documents), in one list (no pages). ```typescript const { items } = await products.listAssets(collectionId, productId) ```
15250
+ A product's assets (images, documents), a page at a time. ```typescript let page = await products.listAssets(collectionId, productId, false, { limit: 50 }) while (page.nextCursor) { page = await products.listAssets(collectionId, productId, false, { limit: 50, cursor: page.nextCursor }) } ```
15450
15251
 
15451
15252
  ### proof
15452
15253
 
@@ -15465,8 +15266,8 @@ What a proofs query can use: its fields, what each can filter, sort, group or to
15465
15266
  Retrieves a single Proof by Collection ID, Product ID, and Proof ID. Both public and admin endpoints now include productId in the path.
15466
15267
 
15467
15268
  **list**(collectionId: string,
15468
- include?: string[]) → `Promise<ListResult<ProofResponse>>`
15469
- List all Proofs for a Collection, in one list (no pages). GET /public/collection/:collectionId/proof ```typescript const { items } = await proof.list(collectionId) ```
15269
+ options: ListOptions & { expand?: Array<'product'> } = {}) → `Promise<ListResult<ProofResponse>>`
15270
+ List all Proofs for a Collection, a page at a time. GET /public/collection/:collectionId/proof ```typescript let page = await proof.list(collectionId, { limit: 50, expand: ['product'] }) while (page.nextCursor) { page = await proof.list(collectionId, { limit: 50, expand: ['product'], cursor: page.nextCursor }) } ```
15470
15271
 
15471
15272
  **create**(collectionId: string,
15472
15273
  productId: string,
@@ -15502,22 +15303,25 @@ Claim a product without providing a proof ID. System auto-generates a unique ser
15502
15303
  Delete a proof for a product (admin only). DELETE /admin/collection/:collectionId/product/:productId/proof/:proofId
15503
15304
 
15504
15305
  **getByUser**(collectionId: string,
15505
- userId: string) → `Promise<ListResult<ProofResponse>>`
15506
- Get proofs for a user in a collection (admin only), in one list (no pages). GET /admin/collection/:collectionId/proof/findByUser/:userId ```typescript const { items } = await proof.getByUser(collectionId, userId) ```
15306
+ userId: string,
15307
+ options: ListOptions = {}) → `Promise<ListResult<ProofResponse>>`
15308
+ Get proofs for a user in a collection (admin only), a page at a time. GET /admin/collection/:collectionId/proof/findByUser/:userId ```typescript let page = await proof.getByUser(collectionId, userId, { limit: 50 }) while (page.nextCursor) page = await proof.getByUser(collectionId, userId, { limit: 50, cursor: page.nextCursor }) ```
15507
15309
 
15508
15310
  **getByProduct**(collectionId: string,
15509
- productId: string) → `Promise<ListResult<ProofResponse>>`
15510
- Get proofs for a product (admin only), in one list (no pages). GET /admin/collection/:collectionId/product/:productId/proof ```typescript const { items } = await proof.getByProduct(collectionId, productId) ```
15311
+ productId: string,
15312
+ options: ListOptions = {}) → `Promise<ListResult<ProofResponse>>`
15313
+ Get proofs for a product (admin only), a page at a time. GET /admin/collection/:collectionId/product/:productId/proof ```typescript let page = await proof.getByProduct(collectionId, productId, { limit: 50 }) while (page.nextCursor) page = await proof.getByProduct(collectionId, productId, { limit: 50, cursor: page.nextCursor }) ```
15511
15314
 
15512
15315
  **findByProduct**(collectionId: string,
15513
15316
  productId: string,
15514
15317
  query: ProofFindQuery = {}) → `Promise<ListResult<ProofResponse>>`
15515
- Find proofs for a product (admin only): the newest `limit` (default 100), or every proof matching `filterBy`. For counting, sorting and paging through a collection's proofs use `proof.query`. POST /admin/collection/:collectionId/product/:productId/proof/find ```typescript const { items } = await proof.findByProduct(collectionId, productId, { limit: 50, includes: ['assets'] }) const red = await proof.findByProduct(collectionId, productId, { filterBy: [{ field: 'values.colour', value: 'red' }] }) ```
15318
+ Find proofs for a product (admin only): the newest ones, `limit` at a time (default 100), or the proofs matching `filterBy`. `expand: ['assets']` attaches each proof's assets. Pass `nextCursor` back as `cursor` for the next page. For counting and sorting a collection's proofs use `proof.query`. POST /admin/collection/:collectionId/product/:productId/proof/find ```typescript const { items, nextCursor } = await proof.findByProduct(collectionId, productId, { limit: 50, expand: ['assets'] }) const red = await proof.findByProduct(collectionId, productId, { filterBy: [{ field: 'values.colour', value: 'red' }] }) ```
15516
15319
 
15517
15320
  **getByBatch**(collectionId: string,
15518
15321
  productId: string,
15519
- batchId: string) → `Promise<ListResult<ProofResponse>>`
15520
- Get proofs for a batch (admin only), in one list (no pages). GET /admin/collection/:collectionId/product/:productId/batch/:batchId/proof ```typescript const { items } = await proof.getByBatch(collectionId, productId, batchId) ```
15322
+ batchId: string,
15323
+ options: ListOptions = {}) → `Promise<ListResult<ProofResponse>>`
15324
+ Get proofs for a batch (admin only), a page at a time. GET /admin/collection/:collectionId/product/:productId/batch/:batchId/proof ```typescript let page = await proof.getByBatch(collectionId, productId, batchId, { limit: 50 }) while (page.nextCursor) { page = await proof.getByBatch(collectionId, productId, batchId, { limit: 50, cursor: page.nextCursor }) } ```
15521
15325
 
15522
15326
  **migrate**(collectionId: string,
15523
15327
  productId: string,
@@ -15534,8 +15338,9 @@ Create a share grant on a proof (owner / collection admin only). The returned gr
15534
15338
 
15535
15339
  **listGrants**(collectionId: string,
15536
15340
  productId: string,
15537
- proofId: string) → `Promise<ListResult<ProofGrant>>`
15538
- List the active + past grants on a proof (owner / collection admin only), in one list (no pages). Tokens are never returned here. ```typescript const { items } = await proof.listGrants(collectionId, productId, proofId) ```
15341
+ proofId: string,
15342
+ options: ListOptions = {}) → `Promise<ListResult<ProofGrant>>`
15343
+ List the active + past grants on a proof (owner / collection admin only), a page at a time. Tokens are never returned here. ```typescript const { items, nextCursor } = await proof.listGrants(collectionId, productId, proofId, { limit: 50 }) ```
15539
15344
 
15540
15345
  **revokeGrant**(collectionId: string,
15541
15346
  productId: string,
@@ -15697,8 +15502,8 @@ The contacts in a segment, a page at a time. `count` is how many there are in al
15697
15502
 
15698
15503
  ### serviceAccounts
15699
15504
 
15700
- **list**(collectionId: string) → `Promise<ServiceAccountList>`
15701
- The service accounts that work on this collection — its own (`home: true`, with `alsoOn`) and other collections' (`home: false`, with `homeCollection`) — never their keys, and the access levels that can be given (`access`). All of them in one answer: `nextCursor` is always null. GET /service-accounts ```typescript const { items, access } = await serviceAccounts.list('coll_123') items // ServiceAccount[] access // ["User", "Reporter", "Assigner", "Admin"] ```
15505
+ **list**(collectionId: string, options: ListOptions = {}) → `Promise<ServiceAccountList>`
15506
+ The service accounts that work on this collection — its own (`home: true`, with `alsoOn`) and other collections' (`home: false`, with `homeCollection`) — never their keys, and the access levels that can be given (`access`). A page at a time (`limit` and `cursor`; 50 unless you say otherwise). GET /service-accounts ```typescript let page = await serviceAccounts.list('coll_123') page.items // ServiceAccount[] page.access // ["User", "Reporter", "Assigner", "Admin"] while (page.nextCursor) page = await serviceAccounts.list('coll_123', { cursor: page.nextCursor }) ```
15702
15507
 
15703
15508
  **create**(collectionId: string, input: CreateServiceAccountInput) → `Promise<CreateServiceAccountResult>`
15704
15509
  Make a service account → `{ serviceAccount, key }`. Show the key once — it can't be read again. You can't give it more access than you have. POST /service-accounts
@@ -15746,8 +15551,8 @@ Archive (soft-delete) a session.
15746
15551
  **config**(collectionId: string) → `Promise<ShopPublicConfig>`
15747
15552
  What a shop front shows: currency, the seller's details (UK law: shown before paying), shipping rates, policies, and `ready` (false until the shop can take payments).
15748
15553
 
15749
- **products**(collectionId: string, params?: { productIds?: string[] }) → `Promise<ListResult<ShopProduct> &`
15750
- What is for sale, in the shop's currency, with stock (`inStock`, `available`) and whether the buyer must sign in first (`needsSignIn`: a proof or access goes to an account). Everything for sale comes in one answer (`nextCursor` is always null), with the shop's `currency` beside the list. ```typescript const { items, currency } = await shop.products(collectionId) items.map((p) => `${p.name}: ${formatMoney(p.amount, p.currency)}${p.inStock ? '' : ' (sold out)'}`) ```
15554
+ **products**(collectionId: string, params?: ListOptions & { productIds?: string[] }) → `Promise<ListResult<ShopProduct> &`
15555
+ What is for sale, in the shop's currency, with stock (`inStock`, `available`) and whether the buyer must sign in first (`needsSignIn`: a proof or access goes to an account). A page at a time: page with `limit` (50 unless you say) and `cursor`. The shop's `currency` comes beside the list. Pass `productIds` for just those products. ```typescript let page = await shop.products(collectionId, { limit: 50 }) page.items.map((p) => `${p.name}: ${formatMoney(p.amount, p.currency)}${p.inStock ? '' : ' (sold out)'}`) while (page.nextCursor) page = await shop.products(collectionId, { limit: 50, cursor: page.nextCursor }) ```
15751
15556
 
15752
15557
  **checkout**(collectionId: string, input: ShopCheckoutInput) → `Promise<ShopCheckoutResult>`
15753
15558
  Start paying: the server prices the basket, holds the stock and returns Stripe's checkout page. Send the buyer to `checkoutUrl`. Signed-in buyers' orders are theirs (`shop.myOrders`). ```typescript const { checkoutUrl } = await shop.checkout(collectionId, { lines: [{ productId: 'soap', quantity: 2 }], shippingRateId: 'std', successUrl: `${location.origin}/thanks`, // ?session_id= is added cancelUrl: `${location.origin}/basket`, }) location.href = checkoutUrl ``` `DIGITAL_CONSENT_REQUIRED`, `INVALID_INPUT` (e.g. a return page on another site), `PAYMENT_UNAVAILABLE` (nothing was charged)
@@ -15815,14 +15620,14 @@ Invoke a skill by name with structured input — the app-facing verb; no prompt-
15815
15620
 
15816
15621
  ### subscriptions
15817
15622
 
15818
- **plans**(collectionId: string) → `Promise<ListResult<PublicPlan>>`
15819
- Plans open to new members, each with its prices (monthly, yearly, one-off). All of them in one answer: `nextCursor` is always null. ```typescript const { items: plans } = await subscriptions.plans(collectionId) plans.map((p) => p.prices.map((price) => subscriptions.describePrice(price))) ```
15623
+ **plans**(collectionId: string, options: ListOptions = {}) → `Promise<ListResult<PublicPlan>>`
15624
+ Plans open to new members, each with its prices (monthly, yearly, one-off), a page at a time. Page with `limit` (50 unless you say) and `cursor`. ```typescript let page = await subscriptions.plans(collectionId, { limit: 50 }) page.items.map((p) => p.prices.map((price) => subscriptions.describePrice(price))) while (page.nextCursor) page = await subscriptions.plans(collectionId, { limit: 50, cursor: page.nextCursor }) ```
15820
15625
 
15821
15626
  **start**(collectionId: string, input: SubscriptionStartInput) → `Promise<SubscriptionStartResult>`
15822
15627
  Join a plan: Stripe's checkout page for the chosen price. Send them to `checkoutUrl`. Signed in only (a membership belongs to an account). The membership exists once Stripe confirms the payment. ```typescript const { items: plans } = await subscriptions.plans(collectionId) const yearly = plans[0].prices.find((p) => p.interval === 'year') const { checkoutUrl } = await subscriptions.start(collectionId, { priceId: yearly.id, successUrl: `${location.origin}/welcome`, cancelUrl: `${location.origin}/join`, }) location.href = checkoutUrl ```
15823
15628
 
15824
- **mine**(collectionId: string) → `Promise<ListResult<MySubscription>>`
15825
- The signed-in member's memberships, newest first (ended ones too: check `live`). All of them in one answer: `nextCursor` is always null. ```typescript const { items } = await subscriptions.mine(collectionId) const current = items.find((s) => s.live) ```
15629
+ **mine**(collectionId: string, options: ListOptions = {}) → `Promise<ListResult<MySubscription>>`
15630
+ The signed-in member's memberships, newest first (ended ones too: check `live`), a page at a time. Page with `limit` (50 unless you say) and `cursor`. ```typescript let page = await subscriptions.mine(collectionId) const current = page.items.find((s) => s.live) while (page.nextCursor) page = await subscriptions.mine(collectionId, { cursor: page.nextCursor }) ```
15826
15631
 
15827
15632
  **cancel**(collectionId: string, subscriptionId: string) → `Promise<MySubscription>`
15828
15633
  Cancel: it ends at the end of the paid period, and access stays until then. A one-off plan or a staff grant ends now. Undo with `resume` before the period ends.
@@ -15928,7 +15733,7 @@ List tags with optional filters, a page at a time (admin). ```typescript // Tags
15928
15733
 
15929
15734
  **byRef**(collectionId: string,
15930
15735
  params: ReverseTagLookupParams) → `Promise<ListResult<Tag>>`
15931
- Reverse lookup — find all tags linked to a given object (admin). Uses a compound index on `(orgId, refType, refId)` on the per-org shard. No embed support on the admin side. ```typescript const { items: linked } = await tags.byRef('coll_123', { refType: 'container', refId: 'container-uuid', }) ```
15736
+ Reverse lookup — find all tags linked to a given object (admin). Uses a compound index on `(orgId, refType, refId)` on the per-org shard. No embed support on the admin side. ```typescript let page = await tags.byRef('coll_123', { refType: 'container', refId: 'container-uuid', limit: 50 }) while (page.nextCursor) { page = await tags.byRef('coll_123', { refType: 'container', refId: 'container-uuid', limit: 50, cursor: page.nextCursor }) } ```
15932
15737
 
15933
15738
  **resolveTag**(tagId: string) → `Promise<TagIndexEntry>`
15934
15739
  Global tag resolve — returns `{ tagId, collectionId }` only. Use this **only** when you have a raw `tagId` and do not yet know which collection it belongs to. Queries the shared `tag_index` shard. Once `collectionId` is resolved, call `publicGetByCollection` for full data. > The global `/public/tags/by-ref` endpoint has been removed. > Use the collection-scoped `publicByRef` instead. ```typescript // Step 1: resolve collection const { collectionId } = await tags.resolveTag('NFC-001') // Step 2: full lookup with embedded data const { tag, embedded } = await tags.publicGetByCollection( collectionId, 'NFC-001', 'product,proof' ) ```
@@ -15940,64 +15745,64 @@ Single tag lookup with optional embedded data (public). `GET /public/collection/
15940
15745
 
15941
15746
  **lookupTags**(collectionId: string,
15942
15747
  data: LookupTagsRequest) → `Promise<TagLookupResponse>`
15943
- Batch tag lookup via POST (public). `POST /public/collection/:collectionId/tags/lookup` Tags not belonging to this collection are filtered out silently. Returns deduplicated embedded objects alongside the tag array. ```typescript const { items, count, embedded } = await tags.lookupTags('coll_123', { tagIds: ['NFC-001', 'NFC-002', 'NFC-003'], embed: 'product,proof', }) ```
15748
+ Batch tag lookup via POST (public). `POST /public/collection/:collectionId/tags/lookup` Tags not belonging to this collection are filtered out silently. Returns deduplicated embedded objects alongside the tag array. the tags found, a page at a time ```typescript const tagIds = ['NFC-001', 'NFC-002', 'NFC-003'] // Every tag found comes back in the one answer: a look-up is never paged. const { items, embedded } = await tags.lookupTags('coll_123', { tagIds, embed: 'product,proof' }) ```
15944
15749
 
15945
15750
  **lookupTagsQuery**(collectionId: string,
15946
15751
  params: LookupTagsQueryRequest) → `Promise<TagLookupResponse>`
15947
- Batch tag lookup via GET (public). `GET /public/collection/:collectionId/tags/lookup?tagIds=NFC-001,NFC-002&embed=product` ```typescript const { items, embedded } = await tags.lookupTagsQuery('coll_123', { tagIds: 'NFC-001,NFC-002', embed: 'product', }) ```
15752
+ Batch tag lookup via GET (public). `GET /public/collection/:collectionId/tags/lookup?tagIds=NFC-001,NFC-002&embed=product` the tags found, a page at a time ```typescript const { items, embedded } = await tags.lookupTagsQuery('coll_123', { tagIds: 'NFC-001,NFC-002', embed: 'product', }) ```
15948
15753
 
15949
15754
  **publicByRef**(collectionId: string,
15950
15755
  params: ReverseTagLookupParams) → `Promise<ByRefResponse>`
15951
- Reverse lookup by ref via GET (public). `GET /public/collection/:collectionId/tags/by-ref?refType=container&refId=<uuid>&embed=ref` ```typescript const { items: linked, embedded } = await tags.publicByRef('coll_123', { refType: 'container', refId: 'container-uuid', embed: 'container', }) const container = embedded.containers?.[containerId] ```
15756
+ Reverse lookup by ref via GET (public). `GET /public/collection/:collectionId/tags/by-ref?refType=container&refId=<uuid>&embed=ref` ```typescript const { items: linked, embedded, nextCursor } = await tags.publicByRef('coll_123', { refType: 'container', refId: 'container-uuid', embed: 'container', limit: 50, }) const container = embedded.containers?.[containerId] ```
15952
15757
 
15953
15758
  **publicByRefPost**(collectionId: string,
15954
15759
  data: ByRefRequest) → `Promise<ByRefResponse>`
15955
- Reverse lookup by ref via POST (public). `POST /public/collection/:collectionId/tags/by-ref` ```typescript const { items: linked, embedded } = await tags.publicByRefPost('coll_123', { refType: 'container', refId: 'container-uuid', embed: 'container', }) ```
15760
+ Reverse lookup by ref via POST (public). `POST /public/collection/:collectionId/tags/by-ref` ```typescript const { items: linked, embedded, nextCursor } = await tags.publicByRefPost('coll_123', { refType: 'container', refId: 'container-uuid', embed: 'container', limit: 50, }) ```
15956
15761
 
15957
15762
  ### template
15958
15763
 
15959
- **getAll**(collectionId: string) → `Promise<ListResult<Template>>`
15960
- Every template in the collection (admin), in one answer: `nextCursor` is always null. ```typescript const { items } = await template.getAll('coll_123') items // Template[] ```
15764
+ **getAll**(collectionId: string, options: ListOptions = {}) → `Promise<ListResult<Template>>`
15765
+ The templates in the collection (admin), 50 at a time unless you give a `limit` (at most 1000). Pass `nextCursor` back as `cursor` for the next page; `null` means that was the last one. ```typescript let page = await template.getAll('coll_123', { limit: 100 }) page.items // Template[] while (page.nextCursor) page = await template.getAll('coll_123', { limit: 100, cursor: page.nextCursor }) ```
15961
15766
 
15962
15767
  **get**(collectionId: string, templateId: string) → `Promise<Template>`
15963
- Every template in the collection (admin), in one answer: `nextCursor` is always null. ```typescript const { items } = await template.getAll('coll_123') items // Template[] ```
15768
+ The templates in the collection (admin), 50 at a time unless you give a `limit` (at most 1000). Pass `nextCursor` back as `cursor` for the next page; `null` means that was the last one. ```typescript let page = await template.getAll('coll_123', { limit: 100 }) page.items // Template[] while (page.nextCursor) page = await template.getAll('coll_123', { limit: 100, cursor: page.nextCursor }) ```
15964
15769
 
15965
15770
  **create**(collectionId: string, data: TemplateInput) → `Promise<Template>`
15966
- Every template in the collection (admin), in one answer: `nextCursor` is always null. ```typescript const { items } = await template.getAll('coll_123') items // Template[] ```
15771
+ The templates in the collection (admin), 50 at a time unless you give a `limit` (at most 1000). Pass `nextCursor` back as `cursor` for the next page; `null` means that was the last one. ```typescript let page = await template.getAll('coll_123', { limit: 100 }) page.items // Template[] while (page.nextCursor) page = await template.getAll('coll_123', { limit: 100, cursor: page.nextCursor }) ```
15967
15772
 
15968
15773
  **update**(collectionId: string,
15969
15774
  templateId: string,
15970
15775
  data: TemplateUpdate) → `Promise<Template>`
15971
- Every template in the collection (admin), in one answer: `nextCursor` is always null. ```typescript const { items } = await template.getAll('coll_123') items // Template[] ```
15776
+ The templates in the collection (admin), 50 at a time unless you give a `limit` (at most 1000). Pass `nextCursor` back as `cursor` for the next page; `null` means that was the last one. ```typescript let page = await template.getAll('coll_123', { limit: 100 }) page.items // Template[] while (page.nextCursor) page = await template.getAll('coll_123', { limit: 100, cursor: page.nextCursor }) ```
15972
15777
 
15973
15778
  **del**(collectionId: string, templateId: string) → `Promise<Template>`
15974
- Every template in the collection (admin), in one answer: `nextCursor` is always null. ```typescript const { items } = await template.getAll('coll_123') items // Template[] ```
15779
+ The templates in the collection (admin), 50 at a time unless you give a `limit` (at most 1000). Pass `nextCursor` back as `cursor` for the next page; `null` means that was the last one. ```typescript let page = await template.getAll('coll_123', { limit: 100 }) page.items // Template[] while (page.nextCursor) page = await template.getAll('coll_123', { limit: 100, cursor: page.nextCursor }) ```
15975
15780
 
15976
15781
  **uploadAsset**(collectionId: string,
15977
15782
  templateId: string,
15978
15783
  file: File | Blob) → `Promise<`
15979
- Every template in the collection (admin), in one answer: `nextCursor` is always null. ```typescript const { items } = await template.getAll('coll_123') items // Template[] ```
15784
+ The templates in the collection (admin), 50 at a time unless you give a `limit` (at most 1000). Pass `nextCursor` back as `cursor` for the next page; `null` means that was the last one. ```typescript let page = await template.getAll('coll_123', { limit: 100 }) page.items // Template[] while (page.nextCursor) page = await template.getAll('coll_123', { limit: 100, cursor: page.nextCursor }) ```
15980
15785
 
15981
- **getAllowed**(collectionId: string) → `Promise<ListResult<TemplatePublic>>`
15982
- The collection's templates that may be used publicly, in one answer: `nextCursor` is always null. ```typescript const { items } = await template.getAllowed('coll_123') items // TemplatePublic[] ```
15786
+ **getAllowed**(collectionId: string, options: ListOptions = {}) → `Promise<ListResult<TemplatePublic>>`
15787
+ The collection's templates that may be used publicly, 50 at a time unless you give a `limit` (at most 1000). Pass `nextCursor` back as `cursor` for the next page; `null` means that was the last one. ```typescript const { items, nextCursor } = await template.getAllowed('coll_123', { limit: 100 }) items // TemplatePublic[] ```
15983
15788
 
15984
15789
  **getPublic**(collectionId: string, templateId: string) → `Promise<TemplatePublic>`
15985
- The collection's templates that may be used publicly, in one answer: `nextCursor` is always null. ```typescript const { items } = await template.getAllowed('coll_123') items // TemplatePublic[] ```
15790
+ The collection's templates that may be used publicly, 50 at a time unless you give a `limit` (at most 1000). Pass `nextCursor` back as `cursor` for the next page; `null` means that was the last one. ```typescript const { items, nextCursor } = await template.getAllowed('coll_123', { limit: 100 }) items // TemplatePublic[] ```
15986
15791
 
15987
15792
  **getGlobal**(templateId: string) → `Promise<TemplatePublic>`
15988
- The collection's templates that may be used publicly, in one answer: `nextCursor` is always null. ```typescript const { items } = await template.getAllowed('coll_123') items // TemplatePublic[] ```
15793
+ The collection's templates that may be used publicly, 50 at a time unless you give a `limit` (at most 1000). Pass `nextCursor` back as `cursor` for the next page; `null` means that was the last one. ```typescript const { items, nextCursor } = await template.getAllowed('coll_123', { limit: 100 }) items // TemplatePublic[] ```
15989
15794
 
15990
- **getAllowedGlobal**(collectionId: string) → `Promise<ListResult<TemplatePublic>>`
15991
- The global templates this collection may use, in one answer: `nextCursor` is always null. ```typescript const { items } = await template.getAllowedGlobal('coll_123') items // TemplatePublic[] ```
15795
+ **getAllowedGlobal**(collectionId: string, options: ListOptions = {}) → `Promise<ListResult<TemplatePublic>>`
15796
+ The global templates this collection may use, 50 at a time unless you give a `limit` (at most 1000). Pass `nextCursor` back as `cursor` for the next page; `null` means that was the last one. ```typescript const { items, nextCursor } = await template.getAllowedGlobal('coll_123', { limit: 100 }) items // TemplatePublic[] ```
15992
15797
 
15993
15798
  **render**(collectionId: string,
15994
15799
  templateId: string,
15995
15800
  body: TemplateRenderRequest) → `Promise<TemplateRenderResponse>`
15996
- The global templates this collection may use, in one answer: `nextCursor` is always null. ```typescript const { items } = await template.getAllowedGlobal('coll_123') items // TemplatePublic[] ```
15801
+ The global templates this collection may use, 50 at a time unless you give a `limit` (at most 1000). Pass `nextCursor` back as `cursor` for the next page; `null` means that was the last one. ```typescript const { items, nextCursor } = await template.getAllowedGlobal('coll_123', { limit: 100 }) items // TemplatePublic[] ```
15997
15802
 
15998
15803
  **renderSource**(collectionId: string,
15999
15804
  body: TemplateRenderSourceRequest) → `Promise<TemplateRenderSourceResponse>`
16000
- The global templates this collection may use, in one answer: `nextCursor` is always null. ```typescript const { items } = await template.getAllowedGlobal('coll_123') items // TemplatePublic[] ```
15805
+ The global templates this collection may use, 50 at a time unless you give a `limit` (at most 1000). Pass `nextCursor` back as `cursor` for the next page; `null` means that was the last one. ```typescript const { items, nextCursor } = await template.getAllowedGlobal('coll_123', { limit: 100 }) items // TemplatePublic[] ```
16001
15806
 
16002
15807
  ### tools
16003
15808
 
@@ -16092,8 +15897,8 @@ Set user's config blob for an app. ```typescript await userAppData.setConfig('al
16092
15897
  **deleteConfig**(appId: string) → `Promise<void>`
16093
15898
  Delete user's config blob for an app. ```typescript await userAppData.deleteConfig('allergy-tracker'); ```
16094
15899
 
16095
- **list**(appId: string) → `Promise<ListResult<any>>`
16096
- List all user's data items for an app. is not paged, so `nextCursor` is always `null`. ```typescript const { items: beds } = await userAppData.list('garden-planner'); // beds: [{ id: 'bed-1', name: 'Vegetables', ... }, { id: 'bed-2', ... }] ```
15900
+ **list**(appId: string, options: ListOptions = {}) → `Promise<ListResult<any>>`
15901
+ List the user's data items for an app, a page at a time. `nextCursor` back as `cursor` for the next page (null on the last). ```typescript let page = await userAppData.list('garden-planner', { limit: 50 }); // page.items: [{ id: 'bed-1', name: 'Vegetables', ... }, { id: 'bed-2', ... }] while (page.nextCursor) page = await userAppData.list('garden-planner', { limit: 50, cursor: page.nextCursor }); ```
16097
15902
 
16098
15903
  **get**(appId: string, itemId: string) → `Promise<any>`
16099
15904
  Get a specific user data item by ID. ```typescript const bed = await userAppData.get('garden-planner', 'bed-1'); // Returns: { id: 'bed-1', name: 'Vegetable Bed', plants: [...] } ```
@@ -16109,8 +15914,8 @@ Delete a user data item by ID. ```typescript await userAppData.remove('garden-pl
16109
15914
  **mine**(collectionId: string) → `Promise<MyUserGroups>`
16110
15915
  The signed-in person's own user groups in this collection. Not signed in → both lists empty. Nobody can ask about anyone else with this. ```typescript const { userGroups: mine } = await userGroups.mine('coll_123') const canRelease = mine.includes('qc-controller') ```
16111
15916
 
16112
- **list**(collectionId: string) → `Promise<ListResult<UserGroup>>`
16113
- Every user group in the collection (admin), in one answer: `nextCursor` is always null. ```typescript const { items } = await userGroups.list('coll_123') items.map((g) => g.name) ```
15917
+ **list**(collectionId: string, options: ListOptions = {}) → `Promise<ListResult<UserGroup>>`
15918
+ The collection's user groups (admin), a page at a time. Page with `limit` (50 unless you say) and `cursor`. ```typescript let page = await userGroups.list('coll_123', { limit: 50 }) page.items.map((g) => g.name) while (page.nextCursor) page = await userGroups.list('coll_123', { limit: 50, cursor: page.nextCursor }) ```
16114
15919
 
16115
15920
  **get**(collectionId: string, userGroupId: string) → `Promise<UserGroup>`
16116
15921
  One user group (admin).
@@ -16124,8 +15929,8 @@ Change a user group (admin): its name, description, or anything else you keep on
16124
15929
  **remove**(collectionId: string, userGroupId: string) → `Promise<UserGroup>`
16125
15930
  Delete a user group (admin). Its members lose whatever it allowed.
16126
15931
 
16127
- **members**(collectionId: string, userGroupId: string) → `Promise<ListResult<UserGroupMember>>`
16128
- The people in a user group, with name and email (admin), in one answer: `nextCursor` is always null. ```typescript const { items } = await userGroups.members('coll_123', qc.id) items // [{ uid, name, email }] ```
15932
+ **members**(collectionId: string, userGroupId: string, options: ListOptions = {}) → `Promise<ListResult<UserGroupMember>>`
15933
+ The people in a user group, with name and email (admin), a page at a time. Page with `limit` (50 unless you say) and `cursor`. ```typescript let page = await userGroups.members('coll_123', qc.id, { limit: 50 }) page.items // [{ uid, name, email }] while (page.nextCursor) page = await userGroups.members('coll_123', qc.id, { limit: 50, cursor: page.nextCursor }) ```
16129
15934
 
16130
15935
  **addMember**(collectionId: string, userGroupId: string, who: AddUserGroupMemberRequest) → `Promise<UserGroup>`
16131
15936
  Add one person (admin), by user id or by email. By email, the person is found in the collection's logins or added to them (no welcome email is sent). Adding someone who is already in changes nothing. ```typescript await userGroups.addMember('coll_123', qc.id, { email: 'sam@example.com', name: 'Sam' }) ```
@@ -16134,10 +15939,10 @@ Add one person (admin), by user id or by email. By email, the person is found in
16134
15939
  Remove one person (admin).
16135
15940
 
16136
15941
  **history**(collectionId: string, params: UserGroupHistoryParams = {}) → `Promise<ListResult<UserGroupChange>>`
16137
- What changed, newest first (admin): user groups created, renamed and deleted, and every person added or removed, each with the admin who did it (`actorId`) and when (`at`). Give `userGroupId` for one user group, `userId` for everything about one person, or neither for the whole collection. Covers the last 30 days unless you give `from` / `to` (at most 400 days). Takes about a second. It has no further pages (`nextCursor` is always null): ask for more with `limit`, or narrow the dates. ```typescript const { items } = await userGroups.history('coll_123', { userId: 'uid_1' }) // items: [{ at, type: 'usergroup.member-added', actorId: 'uid_admin', data: { key: 'qc-controllers', userId: 'uid_1', … } }] ```
15942
+ What changed, newest first (admin): user groups created, renamed and deleted, and every person added or removed, each with the admin who did it (`actorId`) and when (`at`). Give `userGroupId` for one user group, `userId` for everything about one person, or neither for the whole collection. Covers the last 30 days unless you give `from` / `to` (at most 400 days). Takes about a second. A page at a time: `limit` says how many (default 100, at most 1000); pass `nextCursor` back as `cursor` for the next page. ```typescript let page = await userGroups.history('coll_123', { userId: 'uid_1', from: '2026-11-01T00:00:00Z' }) // page.items: [{ at, type: 'usergroup.member-added', actorId: 'uid_admin', data: { key: 'qc-controllers', userId: 'uid_1', … } }] while (page.nextCursor) { page = await userGroups.history('coll_123', { userId: 'uid_1', from: '2026-11-01T00:00:00Z', cursor: page.nextCursor }) } ```
16138
15943
 
16139
- **ofUser**(collectionId: string, userId: string) → `Promise<ListResult<UserGroupRef>>`
16140
- The user groups one person is in (admin), in one answer: `nextCursor` is always null. ```typescript const { items } = await userGroups.ofUser('coll_123', 'uid_1') items // [{ id, key, name }] ```
15944
+ **ofUser**(collectionId: string, userId: string, options: ListOptions = {}) → `Promise<ListResult<UserGroupRef>>`
15945
+ The user groups one person is in (admin), a page at a time. Page with `limit` (50 unless you say) and `cursor`. ```typescript let page = await userGroups.ofUser('coll_123', 'uid_1') page.items // [{ id, key, name }] while (page.nextCursor) page = await userGroups.ofUser('coll_123', 'uid_1', { cursor: page.nextCursor }) ```
16141
15946
 
16142
15947
  ### variant
16143
15948
 
@@ -16147,8 +15952,9 @@ The user groups one person is in (admin), in one answer: `nextCursor` is always
16147
15952
  Get a single variant by ID for a collection and product (admin only).
16148
15953
 
16149
15954
  **list**(collectionId: string,
16150
- productId: string) → `Promise<ListResult<VariantResponse>>`
16151
- List all variants for a collection and product (admin only). All of them come in one answer: `nextCursor` is always null. ```typescript const { items } = await variant.list('coll_123', 'prod_456') items.map((v) => v.name) ```
15955
+ productId: string,
15956
+ options: ListOptions = {}) → `Promise<ListResult<VariantResponse>>`
15957
+ List the variants for a collection and product (admin only), 50 at a time unless you give a `limit` (at most 1000). Pass `nextCursor` back as `cursor` for the next page; `null` means that was the last one. ```typescript let page = await variant.list('coll_123', 'prod_456', { limit: 100 }) page.items.map((v) => v.name) while (page.nextCursor) page = await variant.list('coll_123', 'prod_456', { limit: 100, cursor: page.nextCursor }) ```
16152
15958
 
16153
15959
  **create**(collectionId: string,
16154
15960
  productId: string,
@@ -16200,14 +16006,14 @@ Speak text
16200
16006
  **addLinks**(collectionId: string, ref: WalletPassRef) → `Promise<`
16201
16007
  "Add to Wallet" links for the signed-in person's pass about `ref` (made on first ask for a booking or a membership card). ```typescript const { pass } = await wallet.addLinks('coll_123', { type: 'booking', id: booking.id }) if (pass.links.apple) appleButton.href = pass.links.apple if (pass.links.google) googleButton.href = pass.links.google ```
16202
16008
 
16203
- **mine**(collectionId: string) → `Promise<ListResult<WalletPassSummary>>`
16204
- The signed-in person's active passes on this site, with their links. All of them in one answer: `nextCursor` is always null. ```typescript const { items } = await wallet.mine('coll_123') items.map((pass) => pass.links.google) ```
16009
+ **mine**(collectionId: string, options: ListOptions = {}) → `Promise<ListResult<WalletPassSummary>>`
16010
+ The signed-in person's active passes on this site, with their links, a page at a time. Page with `limit` (50 unless you say) and `cursor`. ```typescript let page = await wallet.mine('coll_123') page.items.map((pass) => pass.links.google) while (page.nextCursor) page = await wallet.mine('coll_123', { cursor: page.nextCursor }) ```
16205
16011
 
16206
16012
  **status**(collectionId: string) → `Promise<`
16207
16013
  Which wallets are switched on (admin).
16208
16014
 
16209
- **list**(collectionId: string, query: { refType?: string; refId?: string; contactId?: string; includeVoided?: boolean }) → `Promise<ListResult<WalletPass>>`
16210
- Passes for one thing (`refType` + `refId`) or one person (`contactId`) (admin). All of them in one answer: `nextCursor` is always null. Voided passes are left out unless `includeVoided` is true. ```typescript const { items } = await wallet.list('coll_123', { refType: 'event', refId: eventId }) items // WalletPass[] ```
16015
+ **list**(collectionId: string, query: ListOptions & { refType?: string; refId?: string; contactId?: string; includeVoided?: boolean }) → `Promise<ListResult<WalletPass>>`
16016
+ Passes for one thing (`refType` + `refId`) or one person (`contactId`) (admin), a page at a time. Page with `limit` (50 unless you say) and `cursor`. Voided passes are left out unless `includeVoided` is true. ```typescript let page = await wallet.list('coll_123', { refType: 'event', refId: eventId, limit: 50 }) page.items // WalletPass[] while (page.nextCursor) page = await wallet.list('coll_123', { refType: 'event', refId: eventId, limit: 50, cursor: page.nextCursor }) ```
16211
16017
 
16212
16018
  **get**(collectionId: string, passId: string) → `Promise<`
16213
16019
  One pass, with its links (admin).