@proveanything/smartlinks 2.1.34 → 2.1.36

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.
@@ -73,7 +73,8 @@ export declare namespace containers {
73
73
  * ```typescript
74
74
  * const { containers: holding } = await containers.findForItem('coll_123', {
75
75
  * itemType: 'proof',
76
- * itemId: 'proof-uuid',
76
+ * itemId: 'unit-0007',
77
+ * productId: 'drill',
77
78
  * })
78
79
  * ```
79
80
  */
@@ -99,7 +99,8 @@ export var containers;
99
99
  * ```typescript
100
100
  * const { containers: holding } = await containers.findForItem('coll_123', {
101
101
  * itemType: 'proof',
102
- * itemId: 'proof-uuid',
102
+ * itemId: 'unit-0007',
103
+ * productId: 'drill',
103
104
  * })
104
105
  * ```
105
106
  */
@@ -81,6 +81,23 @@ export declare namespace wallet {
81
81
  ok: true;
82
82
  pass: WalletPass;
83
83
  }>;
84
+ /**
85
+ * The same lock-screen message on every active pass for one thing, e.g. everyone holding a ticket for an event
86
+ * (admin).
87
+ *
88
+ * @example
89
+ * ```typescript
90
+ * await wallet.messageAll('coll_123', { type: 'event', id: eventId }, { header: 'Doors open', body: 'Doors open at 7pm' })
91
+ * ```
92
+ */
93
+ function messageAll(collectionId: string, ref: WalletPassRef, msg: {
94
+ header?: string;
95
+ body: string;
96
+ }): Promise<{
97
+ ok: true;
98
+ passes: number;
99
+ sent: number;
100
+ }>;
84
101
  /** A lock-screen message on the pass (admin). */
85
102
  function message(collectionId: string, passId: string, msg: {
86
103
  header?: string;
@@ -78,6 +78,19 @@ export var wallet;
78
78
  return post(`${adm(collectionId)}/passes/${encodeURIComponent(passId)}/void`, { reason });
79
79
  }
80
80
  wallet.voidPass = voidPass;
81
+ /**
82
+ * The same lock-screen message on every active pass for one thing, e.g. everyone holding a ticket for an event
83
+ * (admin).
84
+ *
85
+ * @example
86
+ * ```typescript
87
+ * await wallet.messageAll('coll_123', { type: 'event', id: eventId }, { header: 'Doors open', body: 'Doors open at 7pm' })
88
+ * ```
89
+ */
90
+ async function messageAll(collectionId, ref, msg) {
91
+ return post(`${adm(collectionId)}/message`, Object.assign({ ref }, msg));
92
+ }
93
+ wallet.messageAll = messageAll;
81
94
  /** A lock-screen message on the pass (admin). */
82
95
  async function message(collectionId, passId, msg) {
83
96
  return post(`${adm(collectionId)}/passes/${encodeURIComponent(passId)}/message`, msg);
@@ -1,6 +1,6 @@
1
1
  # Smartlinks API Summary
2
2
 
3
- Version: 2.1.34 | Generated: 2026-11-20T19:32:22.299Z
3
+ Version: 2.1.36 | Generated: 2026-11-21T12:59:21.332Z
4
4
 
5
5
  This is a concise summary of all available API functions and types.
6
6
 
@@ -5329,6 +5329,8 @@ interface AuthKitConfig {
5329
5329
  afterSignInUrl?: string
5330
5330
  allowedRedirectDomains?: string[]
5331
5331
  texts?: Partial<Record<AuthKitTextKey, string>>
5332
+ textsLanguage?: string
5333
+ textsByLanguage?: Record<string, Partial<Record<AuthKitTextKey, string>>>
5332
5334
  emailTemplates?: Partial<Record<AuthKitEmailKind, AuthKitEmailTemplate>>
5333
5335
  emailBranding?: { logoUrl?: string; buttonColor?: string; footerHtml?: string }
5334
5336
  secrets?: Record<string, { ref: string; hint?: string | null; collectionId?: string; setAt?: string }>
@@ -7922,6 +7924,7 @@ interface ContainerItem {
7922
7924
  itemId: string
7923
7925
  productId?: string
7924
7926
  proofId?: string
7927
+ itemUid?: string | null
7925
7928
  addedAt: string
7926
7929
  removedAt?: string
7927
7930
  metadata?: Record<string, any>
@@ -8060,12 +8063,13 @@ interface ListContainerItemsParams {
8060
8063
  interface FindContainersForItemParams {
8061
8064
  itemType: ContainerItemType
8062
8065
  itemId: string
8066
+ productId?: string
8063
8067
  }
8064
8068
  ```
8065
8069
 
8066
8070
  **ContainerStatus** = `'active' | 'archived' | string`
8067
8071
 
8068
- **ContainerItemType** = `'tag' | 'proof' | 'serial' | 'order_item' | 'container'`
8072
+ **ContainerItemType** = `'tag' | 'proof'`
8069
8073
 
8070
8074
  ### crate
8071
8075
 
@@ -11289,6 +11293,7 @@ interface Proof {
11289
11293
  collectionId: string
11290
11294
  createdAt: string
11291
11295
  id: string
11296
+ uid?: string | null
11292
11297
  productId: string
11293
11298
  tokenId: string
11294
11299
  userId: string
@@ -11785,6 +11790,8 @@ interface Tag {
11785
11790
  proofId: string | null // Proof / serial number
11786
11791
  refType: string | null
11787
11792
  refId: string | null
11793
+ containerId?: string | null
11794
+ itemUid?: string | null
11788
11795
  metadata: Record<string, any>
11789
11796
  createdAt: string // ISO 8601
11790
11797
  updatedAt: string // ISO 8601
@@ -11820,6 +11827,7 @@ interface CreateTagRequest {
11820
11827
  useSerialNumber?: boolean // Auto-generate a serial number as proofId
11821
11828
  refType?: string // Must be paired with refId
11822
11829
  refId?: string // Must be paired with refType
11830
+ containerId?: string // The label on this container (not with proofId)
11823
11831
  metadata?: Record<string, any>
11824
11832
  force?: boolean // Overwrite if tag already exists in this collection
11825
11833
  }
@@ -11842,6 +11850,7 @@ interface UpdateTagRequest {
11842
11850
  proofId?: string
11843
11851
  refType?: string | null
11844
11852
  refId?: string | null
11853
+ containerId?: string | null
11845
11854
  metadata?: Record<string, any> // Merged with existing metadata
11846
11855
  }
11847
11856
  ```
@@ -12370,6 +12379,15 @@ interface WalletPassContent {
12370
12379
  }
12371
12380
  ```
12372
12381
 
12382
+ **WalletInWallet** (interface)
12383
+ ```typescript
12384
+ interface WalletInWallet {
12385
+ saved: boolean
12386
+ savedAt?: string | null
12387
+ removedAt?: string
12388
+ }
12389
+ ```
12390
+
12373
12391
  **WalletPassLinks** (interface)
12374
12392
  ```typescript
12375
12393
  interface WalletPassLinks {
@@ -12404,6 +12422,7 @@ interface WalletPass {
12404
12422
  code: string
12405
12423
  version: number
12406
12424
  notice?: { header: string; body: string; at: string }
12425
+ inWallet?: { apple?: WalletInWallet; google?: WalletInWallet }
12407
12426
  voidReason?: string | null
12408
12427
  links?: WalletPassLinks
12409
12428
  createdAt?: string
@@ -14283,58 +14302,58 @@ Admin: the contact that carries a sign-in, attaching the sign-in first to the co
14283
14302
 
14284
14303
  ### containers
14285
14304
 
14286
- **create**(collectionId: string,
14305
+ **create**(collectionId: string,
14287
14306
  data: CreateContainerInput) → `Promise<Container>`
14288
14307
  Create a new container (admin). ```typescript const cask = await containers.create('coll_123', { containerType: 'cask', ref: 'CASK-0042', name: 'Cask 42 — Single Malt', metadata: { distilleryYear: 2019, capacity: 200 }, }) ```
14289
14308
 
14290
- **list**(collectionId: string,
14309
+ **list**(collectionId: string,
14291
14310
  params?: ListContainersParams) → `Promise<ListContainersResponse>`
14292
14311
  List containers (admin). Supports filtering by type, status, ref, parent, and top-level flag. ```typescript // All active pallets const { containers: pallets } = await containers.list('coll_123', { containerType: 'pallet', status: 'active', limit: 50, }) // Top-level containers only const { containers: roots } = await containers.list('coll_123', { topLevel: true }) ```
14293
14312
 
14294
- **findForItem**(collectionId: string,
14313
+ **findForItem**(collectionId: string,
14295
14314
  params: FindContainersForItemParams) → `Promise<FindContainersForItemResponse>`
14296
- Reverse lookup — find all containers currently holding a specific item (admin). ```typescript const { containers: holding } = await containers.findForItem('coll_123', { itemType: 'proof', itemId: 'proof-uuid', }) ```
14315
+ Reverse lookup — find all containers currently holding a specific item (admin). ```typescript const { containers: holding } = await containers.findForItem('coll_123', { itemType: 'proof', itemId: 'unit-0007', productId: 'drill', }) ```
14297
14316
 
14298
- **get**(collectionId: string,
14299
- containerId: string,
14317
+ **get**(collectionId: string,
14318
+ containerId: string,
14300
14319
  params?: GetContainerParams) → `Promise<Container>`
14301
14320
  Get a single container by ID (admin). Pass `?tree=true` to recursively embed children, and/or `?includeContents=true` to embed the current item list. ```typescript // Flat const cask = await containers.get('coll_123', 'cask-uuid') // Full tree with contents const tree = await containers.get('coll_123', 'warehouse-uuid', { tree: true, treeDepth: 3, includeContents: true, }) ```
14302
14321
 
14303
- **update**(collectionId: string,
14304
- containerId: string,
14322
+ **update**(collectionId: string,
14323
+ containerId: string,
14305
14324
  data: UpdateContainerInput) → `Promise<Container>`
14306
14325
  Partially update a container (admin). Only fields present in the request body are modified. Pass `parentContainerId: null` to promote a container to top-level. ```typescript const updated = await containers.update('coll_123', 'cask-uuid', { status: 'archived', metadata: { bottledAt: '2025-04-01' }, }) ```
14307
14326
 
14308
- **remove**(collectionId: string,
14327
+ **remove**(collectionId: string,
14309
14328
  containerId: string) → `Promise<`
14310
14329
  Soft-delete a container (admin). Sets `deletedAt`; the record and its full item history remain queryable by admins. Public API responses automatically exclude deleted containers.
14311
14330
 
14312
- **listItems**(collectionId: string,
14313
- containerId: string,
14331
+ **listItems**(collectionId: string,
14332
+ containerId: string,
14314
14333
  params?: ListContainerItemsParams) → `Promise<ContainerItemsResponse>`
14315
14334
  List items currently (or historically) inside a container (admin). Pass `history: true` to include removed items and see the full membership log. ```typescript // Current contents const { items } = await containers.listItems('coll_123', 'cask-uuid') // Full history including removed items const { items: history } = await containers.listItems('coll_123', 'cask-uuid', { history: true }) ```
14316
14335
 
14317
- **addItems**(collectionId: string,
14318
- containerId: string,
14336
+ **addItems**(collectionId: string,
14337
+ containerId: string,
14319
14338
  data: AddContainerItemsInput) → `Promise<AddContainerItemsResponse>`
14320
14339
  Add one or more items to a container (admin). Each item requires `itemType` and `itemId`. Pass `productId` / `proofId` for denormalisation convenience. ```typescript const { items } = await containers.addItems('coll_123', 'pallet-uuid', { items: [ { itemType: 'tag', itemId: 'NFC-00AABBCC' }, { itemType: 'proof', itemId: 'proof-uuid', productId: 'product-id' }, ], }) ```
14321
14340
 
14322
- **removeItems**(collectionId: string,
14323
- containerId: string,
14341
+ **removeItems**(collectionId: string,
14342
+ containerId: string,
14324
14343
  data: RemoveContainerItemsInput) → `Promise<RemoveContainerItemsResponse>`
14325
14344
  Soft-remove items from a container (admin). Sets `removedAt` on the specified `ContainerItem` records. The records are retained in the history log and can be queried with `history: true`. ```typescript const result = await containers.removeItems('coll_123', 'pallet-uuid', { ids: ['container-item-uuid-1', 'container-item-uuid-2'], }) console.log(`Removed ${result.removedCount} items`) ```
14326
14345
 
14327
- **publicList**(collectionId: string,
14346
+ **publicList**(collectionId: string,
14328
14347
  params?: ListContainersParams) → `Promise<PublicListContainersResponse>`
14329
14348
  List containers (public). Soft-deleted containers and containers with `metadata.publicListing === false` are excluded from results.
14330
14349
 
14331
- **publicGet**(collectionId: string,
14332
- containerId: string,
14350
+ **publicGet**(collectionId: string,
14351
+ containerId: string,
14333
14352
  params?: GetContainerParams) → `Promise<Container>`
14334
14353
  Get a single container (public). Soft-deleted containers return a 404. Same `?tree` and `?includeContents` options as the admin version.
14335
14354
 
14336
- **publicListItems**(collectionId: string,
14337
- containerId: string,
14355
+ **publicListItems**(collectionId: string,
14356
+ containerId: string,
14338
14357
  params?: Pick<ListContainerItemsParams, 'limit' | 'offset'>) → `Promise<ContainerItemsResponse>`
14339
14358
  List current contents of a container (public). Returns only items where `removedAt` is null. No `?history` option on the public side.
14340
14359
 
@@ -15803,6 +15822,9 @@ Change what a pass shows; both wallets follow (admin).
15803
15822
  **voidPass**(collectionId: string, passId: string, reason?: string) → `Promise<`
15804
15823
  The pass no longer counts: shown as void on the phone (admin).
15805
15824
 
15825
+ **messageAll**(collectionId: string, ref: WalletPassRef, msg: { header?: string; body: string }) → `Promise<`
15826
+ The same lock-screen message on every active pass for one thing, e.g. everyone holding a ticket for an event (admin). ```typescript await wallet.messageAll('coll_123', { type: 'event', id: eventId }, { header: 'Doors open', body: 'Doors open at 7pm' }) ```
15827
+
15806
15828
  **message**(collectionId: string, passId: string, msg: { header?: string; body: string }) → `Promise<`
15807
15829
  A lock-screen message on the pass (admin).
15808
15830
 
@@ -101,6 +101,12 @@ show), `minimal`, `customCss`. `termsUrl`, `privacyUrl`, `supportEmail`. **Wordi
101
101
  `continueWithPhone`, `continueWithWhatsApp`, `continueWithMagicLink`, `sendMagicLink`, `magicLinkSent`, `inviteOnlyNotice` (a key
102
102
  left out keeps the built-in words).
103
103
 
104
+ **Languages.** The screens' own words come in English, Simplified Chinese, French, German, Dutch,
105
+ Spanish, Portuguese and Italian, and follow the page's `<html lang>` (or the `language` prop of
106
+ `SmartlinksAuthUI`); other languages show English. `texts` is shown only in the language it is written
107
+ in: `textsLanguage` (default `en`). For other languages give `textsByLanguage`, e.g.
108
+ `{ fr: { signInTitle: 'Connexion membres' }, de: { signInTitle: 'Mitglieder-Anmeldung' } }`.
109
+
104
110
  **The account emails** — `emailTemplates.<kind>`: `{ subject, header, introText, buttonText,
105
111
  footerText }` for `passwordReset`, `emailVerification`, `magicLink`, `memberInvite` (site member
106
112
  invitations), `invite` / `addedToCollection` (staff), `mfaCode`, `providerLinked`. `emailBranding`:
@@ -56,6 +56,8 @@ await ctx.sl.wallet.update(passId, { points: 145 })
56
56
 
57
57
  await ctx.sl.wallet.void(passId, 'refunded')
58
58
  await ctx.sl.wallet.message(passId, { header: 'Doors open', body: 'Doors open at 7pm. See you soon!' })
59
+ // Everyone holding a ticket for this event
60
+ await ctx.sl.wallet.messageAll({ type: 'event', id: eventId }, { header: 'Running late', body: 'We start at 7:30 tonight.' })
59
61
  ```
60
62
 
61
63
  - **Contact:** `contactId` defaults to the caller's contact.
@@ -64,6 +66,24 @@ await ctx.sl.wallet.message(passId, { header: 'Doors open', body: 'Doors open at
64
66
  person's passes about the message's `about`, otherwise to your app's own passes for them. It's worded from the
65
67
  template's push version.
66
68
 
69
+ ## Knowing who added it
70
+
71
+ Every pass belongs to a known person, so you can tell who has actually put it in their wallet:
72
+
73
+ - **Apple:** the phone registers the pass with SmartLinks when it's added, and unregisters it when it's removed.
74
+ - **Google:** Google sends a signed "saved" or "deleted" notice.
75
+
76
+ The pass's `inWallet` shows `{ apple: { saved, savedAt }, google: { saved, savedAt } }`. Each change raises an
77
+ event for the pass holder, so a flow in your app's blueprint can react, for example by sending a "see you there"
78
+ email when someone adds their ticket:
79
+
80
+ | Event | When |
81
+ |---|---|
82
+ | `wallet.pass_added` | the person added the pass to Apple or Google Wallet |
83
+ | `wallet.pass_removed` | they removed it |
84
+
85
+ Google's notices are best-effort, so treat them as a good signal rather than a guarantee.
86
+
67
87
  ## Checking a pass at the door
68
88
 
69
89
  The QR holds the pass's own code, never an id. Scan it, then:
package/dist/openapi.yaml CHANGED
@@ -3817,6 +3817,11 @@ paths:
3817
3817
  required: false
3818
3818
  schema:
3819
3819
  type: string
3820
+ - name: productId
3821
+ in: query
3822
+ required: false
3823
+ schema:
3824
+ type: string
3820
3825
  responses:
3821
3826
  200:
3822
3827
  description: Success
@@ -26035,6 +26040,12 @@ components:
26035
26040
  type: string
26036
26041
  texts:
26037
26042
  $ref: "#/components/schemas/AuthKitTextKey"
26043
+ textsLanguage:
26044
+ type: string
26045
+ textsByLanguage:
26046
+ type: object
26047
+ additionalProperties:
26048
+ $ref: "#/components/schemas/AuthKitTextKey"
26038
26049
  emailTemplates:
26039
26050
  $ref: "#/components/schemas/AuthKitEmailKind"
26040
26051
  emailBranding:
@@ -29953,6 +29964,8 @@ components:
29953
29964
  type: string
29954
29965
  proofId:
29955
29966
  type: string
29967
+ itemUid:
29968
+ type: string
29956
29969
  addedAt:
29957
29970
  type: string
29958
29971
  removedAt:
@@ -30154,6 +30167,8 @@ components:
30154
30167
  $ref: "#/components/schemas/ContainerItemType"
30155
30168
  itemId:
30156
30169
  type: string
30170
+ productId:
30171
+ type: string
30157
30172
  required:
30158
30173
  - itemType
30159
30174
  - itemId
@@ -30167,9 +30182,6 @@ components:
30167
30182
  enum:
30168
30183
  - tag
30169
30184
  - proof
30170
- - serial
30171
- - order_item
30172
- - container
30173
30185
  CrateItem:
30174
30186
  type: object
30175
30187
  properties:
@@ -35577,6 +35589,8 @@ components:
35577
35589
  Product:
35578
35590
  type: object
35579
35591
  properties:
35592
+ uid:
35593
+ type: string
35580
35594
  orgId:
35581
35595
  type: string
35582
35596
  name:
@@ -35903,6 +35917,8 @@ components:
35903
35917
  type: string
35904
35918
  id:
35905
35919
  type: string
35920
+ uid:
35921
+ type: string
35906
35922
  productId:
35907
35923
  type: string
35908
35924
  tokenId:
@@ -36737,6 +36753,10 @@ components:
36737
36753
  type: string
36738
36754
  refId:
36739
36755
  type: string
36756
+ containerId:
36757
+ type: string
36758
+ itemUid:
36759
+ type: string
36740
36760
  metadata:
36741
36761
  type: object
36742
36762
  additionalProperties: true
@@ -36802,6 +36822,8 @@ components:
36802
36822
  type: string
36803
36823
  refId:
36804
36824
  type: string
36825
+ containerId:
36826
+ type: string
36805
36827
  metadata:
36806
36828
  type: object
36807
36829
  additionalProperties: true
@@ -36835,6 +36857,8 @@ components:
36835
36857
  type: string
36836
36858
  refId:
36837
36859
  type: string
36860
+ containerId:
36861
+ type: string
36838
36862
  metadata:
36839
36863
  type: object
36840
36864
  additionalProperties: true
@@ -37700,6 +37724,17 @@ components:
37700
37724
  required:
37701
37725
  - kind
37702
37726
  - title
37727
+ WalletInWallet:
37728
+ type: object
37729
+ properties:
37730
+ saved:
37731
+ type: boolean
37732
+ savedAt:
37733
+ type: string
37734
+ removedAt:
37735
+ type: string
37736
+ required:
37737
+ - saved
37703
37738
  WalletPassLinks:
37704
37739
  type: object
37705
37740
  properties:
@@ -37756,6 +37791,9 @@ components:
37756
37791
  notice:
37757
37792
  type: object
37758
37793
  additionalProperties: true
37794
+ inWallet:
37795
+ type: object
37796
+ additionalProperties: true
37759
37797
  voidReason:
37760
37798
  type: string
37761
37799
  links:
@@ -548,8 +548,12 @@ export interface AuthKitConfig {
548
548
  afterSignInUrl?: string;
549
549
  /** Extra domains emailed links may return to (the collection's own domains are always allowed). */
550
550
  allowedRedirectDomains?: string[];
551
- /** Wording on the screens. */
551
+ /** Wording on the screens, in the language `textsLanguage` names (English when not set). */
552
552
  texts?: Partial<Record<AuthKitTextKey, string>>;
553
+ /** The language `texts` is written in ("en", "de", ...): only visitors in that language see it. */
554
+ textsLanguage?: string;
555
+ /** The same wording per language, e.g. `{ fr: { signInTitle: 'Connexion' } }`; wins over `texts`. */
556
+ textsByLanguage?: Record<string, Partial<Record<AuthKitTextKey, string>>>;
553
557
  /** Wording of the account emails, per email. Preview with {@link authKit.previewEmail}. */
554
558
  emailTemplates?: Partial<Record<AuthKitEmailKind, AuthKitEmailTemplate>>;
555
559
  /** The account emails' look. The sender is the collection's email settings (verified domain). */
@@ -13,7 +13,8 @@ export type ContainerStatus = 'active' | 'archived' | string;
13
13
  * Types of items that can be placed inside a container.
14
14
  * A `container` item type allows containers to nest inside other containers.
15
15
  */
16
- export type ContainerItemType = 'tag' | 'proof' | 'serial' | 'order_item' | 'container';
16
+ /** What a container holds: items (proofs) and tags. A container goes inside another by its parent, never as an entry. */
17
+ export type ContainerItemType = 'tag' | 'proof';
17
18
  /**
18
19
  * A physical or logical container entity.
19
20
  *
@@ -76,6 +77,8 @@ export interface ContainerItem {
76
77
  productId?: string;
77
78
  /** Convenience denormalisation — proof / serial UUID if applicable */
78
79
  proofId?: string;
80
+ /** The item's global id (`itm_…`) for itemType 'proof': how the platform tells same-id items under different products apart */
81
+ itemUid?: string | null;
79
82
  /** ISO 8601 — when the item was placed into the container */
80
83
  addedAt: string;
81
84
  /** ISO 8601 — when the item was removed; `null` / `undefined` = still inside */
@@ -191,6 +194,8 @@ export interface ListContainerItemsParams {
191
194
  export interface FindContainersForItemParams {
192
195
  /** Required */
193
196
  itemType: ContainerItemType;
194
- /** Required */
197
+ /** Required: a tag's id, or an item's proof id (or its uid, `itm_…`) */
195
198
  itemId: string;
199
+ /** For an item: its product. Needed when the proof id repeats across products (else 400 AMBIGUOUS_ITEM). */
200
+ productId?: string;
196
201
  }
@@ -62,6 +62,11 @@ export interface ProductQueryRequest {
62
62
  includeDeleted?: boolean;
63
63
  }
64
64
  export interface Product extends ProductKey {
65
+ /**
66
+ * The product's global id (`prd_` + 14 characters): never changes, unique everywhere. Identity only, not an
67
+ * address: links keep using `id`. Accepted wherever a product id goes in a path. Ids can't start with prd_ / itm_.
68
+ */
69
+ uid?: string | null;
65
70
  orgId?: string | null;
66
71
  name: string;
67
72
  description?: string | null;
@@ -26,6 +26,11 @@ export interface Proof {
26
26
  createdAt: string;
27
27
  /** Unique identifier for the proof */
28
28
  id: string;
29
+ /**
30
+ * The item's global id (`itm_` + 14 characters): never changes, unique everywhere. Identity only, not an
31
+ * address: links, QR codes and tags keep using `productId` + `id`. Accepted wherever a proof id goes in a path.
32
+ */
33
+ uid?: string | null;
29
34
  /** Unique identifier for the product */
30
35
  productId: string;
31
36
  /** Unique identifier for the token */
@@ -19,12 +19,16 @@ export interface Tag {
19
19
  batchId: string | null;
20
20
  proofId: string | null;
21
21
  /**
22
- * Polymorphic ref type: `'app_record'`, `'app_case'`, `'app_thread'`, `'container'`, etc.
23
- * Always paired with `refId`.
22
+ * Polymorphic ref type: `'app_record'`, `'app_case'`, `'app_thread'`, etc.
23
+ * Always paired with `refId`. The label on a container is `containerId`, not a ref.
24
24
  */
25
25
  refType: string | null;
26
26
  /** UUID of the referenced object. Always paired with `refType`. */
27
27
  refId: string | null;
28
+ /** The container this tag is the label on (a box, a cask): never where the tag is. Not with `proofId`. */
29
+ containerId?: string | null;
30
+ /** The item's global id when the tag is on an item */
31
+ itemUid?: string | null;
28
32
  metadata: Record<string, any>;
29
33
  createdAt: string;
30
34
  updatedAt: string;
@@ -77,6 +81,7 @@ export interface CreateTagRequest {
77
81
  useSerialNumber?: boolean;
78
82
  refType?: string;
79
83
  refId?: string;
84
+ containerId?: string;
80
85
  metadata?: Record<string, any>;
81
86
  force?: boolean;
82
87
  }
@@ -95,6 +100,8 @@ export interface UpdateTagRequest {
95
100
  refType?: string | null;
96
101
  /** Pass `null` to clear the polymorphic ref. Must be paired with `refType`. */
97
102
  refId?: string | null;
103
+ /** The label on this container; `null` to clear. Putting the tag on an item clears it. */
104
+ containerId?: string | null;
98
105
  metadata?: Record<string, any>;
99
106
  }
100
107
  /** Returned when creating a single tag (`wasUpdated: true` when force triggered an update). */
@@ -46,6 +46,11 @@ export interface WalletPassContent {
46
46
  /** The QR value; the pass's own code unless you give one. */
47
47
  barcode?: string;
48
48
  }
49
+ export interface WalletInWallet {
50
+ saved: boolean;
51
+ savedAt?: string | null;
52
+ removedAt?: string;
53
+ }
49
54
  /** "Add to Wallet" links that work for this pass now (a wallet that isn't set up is left out). */
50
55
  export interface WalletPassLinks {
51
56
  google?: string;
@@ -79,6 +84,11 @@ export interface WalletPass {
79
84
  body: string;
80
85
  at: string;
81
86
  };
87
+ /** Whether the person has it in each wallet (Apple: a phone registered it; Google: Google's save / delete callback). */
88
+ inWallet?: {
89
+ apple?: WalletInWallet;
90
+ google?: WalletInWallet;
91
+ };
82
92
  voidReason?: string | null;
83
93
  links?: WalletPassLinks;
84
94
  createdAt?: string;
@@ -1,6 +1,6 @@
1
1
  # Smartlinks API Summary
2
2
 
3
- Version: 2.1.34 | Generated: 2026-11-20T19:32:22.299Z
3
+ Version: 2.1.36 | Generated: 2026-11-21T12:59:21.332Z
4
4
 
5
5
  This is a concise summary of all available API functions and types.
6
6
 
@@ -5329,6 +5329,8 @@ interface AuthKitConfig {
5329
5329
  afterSignInUrl?: string
5330
5330
  allowedRedirectDomains?: string[]
5331
5331
  texts?: Partial<Record<AuthKitTextKey, string>>
5332
+ textsLanguage?: string
5333
+ textsByLanguage?: Record<string, Partial<Record<AuthKitTextKey, string>>>
5332
5334
  emailTemplates?: Partial<Record<AuthKitEmailKind, AuthKitEmailTemplate>>
5333
5335
  emailBranding?: { logoUrl?: string; buttonColor?: string; footerHtml?: string }
5334
5336
  secrets?: Record<string, { ref: string; hint?: string | null; collectionId?: string; setAt?: string }>
@@ -7922,6 +7924,7 @@ interface ContainerItem {
7922
7924
  itemId: string
7923
7925
  productId?: string
7924
7926
  proofId?: string
7927
+ itemUid?: string | null
7925
7928
  addedAt: string
7926
7929
  removedAt?: string
7927
7930
  metadata?: Record<string, any>
@@ -8060,12 +8063,13 @@ interface ListContainerItemsParams {
8060
8063
  interface FindContainersForItemParams {
8061
8064
  itemType: ContainerItemType
8062
8065
  itemId: string
8066
+ productId?: string
8063
8067
  }
8064
8068
  ```
8065
8069
 
8066
8070
  **ContainerStatus** = `'active' | 'archived' | string`
8067
8071
 
8068
- **ContainerItemType** = `'tag' | 'proof' | 'serial' | 'order_item' | 'container'`
8072
+ **ContainerItemType** = `'tag' | 'proof'`
8069
8073
 
8070
8074
  ### crate
8071
8075
 
@@ -11289,6 +11293,7 @@ interface Proof {
11289
11293
  collectionId: string
11290
11294
  createdAt: string
11291
11295
  id: string
11296
+ uid?: string | null
11292
11297
  productId: string
11293
11298
  tokenId: string
11294
11299
  userId: string
@@ -11785,6 +11790,8 @@ interface Tag {
11785
11790
  proofId: string | null // Proof / serial number
11786
11791
  refType: string | null
11787
11792
  refId: string | null
11793
+ containerId?: string | null
11794
+ itemUid?: string | null
11788
11795
  metadata: Record<string, any>
11789
11796
  createdAt: string // ISO 8601
11790
11797
  updatedAt: string // ISO 8601
@@ -11820,6 +11827,7 @@ interface CreateTagRequest {
11820
11827
  useSerialNumber?: boolean // Auto-generate a serial number as proofId
11821
11828
  refType?: string // Must be paired with refId
11822
11829
  refId?: string // Must be paired with refType
11830
+ containerId?: string // The label on this container (not with proofId)
11823
11831
  metadata?: Record<string, any>
11824
11832
  force?: boolean // Overwrite if tag already exists in this collection
11825
11833
  }
@@ -11842,6 +11850,7 @@ interface UpdateTagRequest {
11842
11850
  proofId?: string
11843
11851
  refType?: string | null
11844
11852
  refId?: string | null
11853
+ containerId?: string | null
11845
11854
  metadata?: Record<string, any> // Merged with existing metadata
11846
11855
  }
11847
11856
  ```
@@ -12370,6 +12379,15 @@ interface WalletPassContent {
12370
12379
  }
12371
12380
  ```
12372
12381
 
12382
+ **WalletInWallet** (interface)
12383
+ ```typescript
12384
+ interface WalletInWallet {
12385
+ saved: boolean
12386
+ savedAt?: string | null
12387
+ removedAt?: string
12388
+ }
12389
+ ```
12390
+
12373
12391
  **WalletPassLinks** (interface)
12374
12392
  ```typescript
12375
12393
  interface WalletPassLinks {
@@ -12404,6 +12422,7 @@ interface WalletPass {
12404
12422
  code: string
12405
12423
  version: number
12406
12424
  notice?: { header: string; body: string; at: string }
12425
+ inWallet?: { apple?: WalletInWallet; google?: WalletInWallet }
12407
12426
  voidReason?: string | null
12408
12427
  links?: WalletPassLinks
12409
12428
  createdAt?: string
@@ -14283,58 +14302,58 @@ Admin: the contact that carries a sign-in, attaching the sign-in first to the co
14283
14302
 
14284
14303
  ### containers
14285
14304
 
14286
- **create**(collectionId: string,
14305
+ **create**(collectionId: string,
14287
14306
  data: CreateContainerInput) → `Promise<Container>`
14288
14307
  Create a new container (admin). ```typescript const cask = await containers.create('coll_123', { containerType: 'cask', ref: 'CASK-0042', name: 'Cask 42 — Single Malt', metadata: { distilleryYear: 2019, capacity: 200 }, }) ```
14289
14308
 
14290
- **list**(collectionId: string,
14309
+ **list**(collectionId: string,
14291
14310
  params?: ListContainersParams) → `Promise<ListContainersResponse>`
14292
14311
  List containers (admin). Supports filtering by type, status, ref, parent, and top-level flag. ```typescript // All active pallets const { containers: pallets } = await containers.list('coll_123', { containerType: 'pallet', status: 'active', limit: 50, }) // Top-level containers only const { containers: roots } = await containers.list('coll_123', { topLevel: true }) ```
14293
14312
 
14294
- **findForItem**(collectionId: string,
14313
+ **findForItem**(collectionId: string,
14295
14314
  params: FindContainersForItemParams) → `Promise<FindContainersForItemResponse>`
14296
- Reverse lookup — find all containers currently holding a specific item (admin). ```typescript const { containers: holding } = await containers.findForItem('coll_123', { itemType: 'proof', itemId: 'proof-uuid', }) ```
14315
+ Reverse lookup — find all containers currently holding a specific item (admin). ```typescript const { containers: holding } = await containers.findForItem('coll_123', { itemType: 'proof', itemId: 'unit-0007', productId: 'drill', }) ```
14297
14316
 
14298
- **get**(collectionId: string,
14299
- containerId: string,
14317
+ **get**(collectionId: string,
14318
+ containerId: string,
14300
14319
  params?: GetContainerParams) → `Promise<Container>`
14301
14320
  Get a single container by ID (admin). Pass `?tree=true` to recursively embed children, and/or `?includeContents=true` to embed the current item list. ```typescript // Flat const cask = await containers.get('coll_123', 'cask-uuid') // Full tree with contents const tree = await containers.get('coll_123', 'warehouse-uuid', { tree: true, treeDepth: 3, includeContents: true, }) ```
14302
14321
 
14303
- **update**(collectionId: string,
14304
- containerId: string,
14322
+ **update**(collectionId: string,
14323
+ containerId: string,
14305
14324
  data: UpdateContainerInput) → `Promise<Container>`
14306
14325
  Partially update a container (admin). Only fields present in the request body are modified. Pass `parentContainerId: null` to promote a container to top-level. ```typescript const updated = await containers.update('coll_123', 'cask-uuid', { status: 'archived', metadata: { bottledAt: '2025-04-01' }, }) ```
14307
14326
 
14308
- **remove**(collectionId: string,
14327
+ **remove**(collectionId: string,
14309
14328
  containerId: string) → `Promise<`
14310
14329
  Soft-delete a container (admin). Sets `deletedAt`; the record and its full item history remain queryable by admins. Public API responses automatically exclude deleted containers.
14311
14330
 
14312
- **listItems**(collectionId: string,
14313
- containerId: string,
14331
+ **listItems**(collectionId: string,
14332
+ containerId: string,
14314
14333
  params?: ListContainerItemsParams) → `Promise<ContainerItemsResponse>`
14315
14334
  List items currently (or historically) inside a container (admin). Pass `history: true` to include removed items and see the full membership log. ```typescript // Current contents const { items } = await containers.listItems('coll_123', 'cask-uuid') // Full history including removed items const { items: history } = await containers.listItems('coll_123', 'cask-uuid', { history: true }) ```
14316
14335
 
14317
- **addItems**(collectionId: string,
14318
- containerId: string,
14336
+ **addItems**(collectionId: string,
14337
+ containerId: string,
14319
14338
  data: AddContainerItemsInput) → `Promise<AddContainerItemsResponse>`
14320
14339
  Add one or more items to a container (admin). Each item requires `itemType` and `itemId`. Pass `productId` / `proofId` for denormalisation convenience. ```typescript const { items } = await containers.addItems('coll_123', 'pallet-uuid', { items: [ { itemType: 'tag', itemId: 'NFC-00AABBCC' }, { itemType: 'proof', itemId: 'proof-uuid', productId: 'product-id' }, ], }) ```
14321
14340
 
14322
- **removeItems**(collectionId: string,
14323
- containerId: string,
14341
+ **removeItems**(collectionId: string,
14342
+ containerId: string,
14324
14343
  data: RemoveContainerItemsInput) → `Promise<RemoveContainerItemsResponse>`
14325
14344
  Soft-remove items from a container (admin). Sets `removedAt` on the specified `ContainerItem` records. The records are retained in the history log and can be queried with `history: true`. ```typescript const result = await containers.removeItems('coll_123', 'pallet-uuid', { ids: ['container-item-uuid-1', 'container-item-uuid-2'], }) console.log(`Removed ${result.removedCount} items`) ```
14326
14345
 
14327
- **publicList**(collectionId: string,
14346
+ **publicList**(collectionId: string,
14328
14347
  params?: ListContainersParams) → `Promise<PublicListContainersResponse>`
14329
14348
  List containers (public). Soft-deleted containers and containers with `metadata.publicListing === false` are excluded from results.
14330
14349
 
14331
- **publicGet**(collectionId: string,
14332
- containerId: string,
14350
+ **publicGet**(collectionId: string,
14351
+ containerId: string,
14333
14352
  params?: GetContainerParams) → `Promise<Container>`
14334
14353
  Get a single container (public). Soft-deleted containers return a 404. Same `?tree` and `?includeContents` options as the admin version.
14335
14354
 
14336
- **publicListItems**(collectionId: string,
14337
- containerId: string,
14355
+ **publicListItems**(collectionId: string,
14356
+ containerId: string,
14338
14357
  params?: Pick<ListContainerItemsParams, 'limit' | 'offset'>) → `Promise<ContainerItemsResponse>`
14339
14358
  List current contents of a container (public). Returns only items where `removedAt` is null. No `?history` option on the public side.
14340
14359
 
@@ -15803,6 +15822,9 @@ Change what a pass shows; both wallets follow (admin).
15803
15822
  **voidPass**(collectionId: string, passId: string, reason?: string) → `Promise<`
15804
15823
  The pass no longer counts: shown as void on the phone (admin).
15805
15824
 
15825
+ **messageAll**(collectionId: string, ref: WalletPassRef, msg: { header?: string; body: string }) → `Promise<`
15826
+ The same lock-screen message on every active pass for one thing, e.g. everyone holding a ticket for an event (admin). ```typescript await wallet.messageAll('coll_123', { type: 'event', id: eventId }, { header: 'Doors open', body: 'Doors open at 7pm' }) ```
15827
+
15806
15828
  **message**(collectionId: string, passId: string, msg: { header?: string; body: string }) → `Promise<`
15807
15829
  A lock-screen message on the pass (admin).
15808
15830
 
package/docs/auth-kit.md CHANGED
@@ -101,6 +101,12 @@ show), `minimal`, `customCss`. `termsUrl`, `privacyUrl`, `supportEmail`. **Wordi
101
101
  `continueWithPhone`, `continueWithWhatsApp`, `continueWithMagicLink`, `sendMagicLink`, `magicLinkSent`, `inviteOnlyNotice` (a key
102
102
  left out keeps the built-in words).
103
103
 
104
+ **Languages.** The screens' own words come in English, Simplified Chinese, French, German, Dutch,
105
+ Spanish, Portuguese and Italian, and follow the page's `<html lang>` (or the `language` prop of
106
+ `SmartlinksAuthUI`); other languages show English. `texts` is shown only in the language it is written
107
+ in: `textsLanguage` (default `en`). For other languages give `textsByLanguage`, e.g.
108
+ `{ fr: { signInTitle: 'Connexion membres' }, de: { signInTitle: 'Mitglieder-Anmeldung' } }`.
109
+
104
110
  **The account emails** — `emailTemplates.<kind>`: `{ subject, header, introText, buttonText,
105
111
  footerText }` for `passwordReset`, `emailVerification`, `magicLink`, `memberInvite` (site member
106
112
  invitations), `invite` / `addedToCollection` (staff), `mfaCode`, `providerLinked`. `emailBranding`:
@@ -56,6 +56,8 @@ await ctx.sl.wallet.update(passId, { points: 145 })
56
56
 
57
57
  await ctx.sl.wallet.void(passId, 'refunded')
58
58
  await ctx.sl.wallet.message(passId, { header: 'Doors open', body: 'Doors open at 7pm. See you soon!' })
59
+ // Everyone holding a ticket for this event
60
+ await ctx.sl.wallet.messageAll({ type: 'event', id: eventId }, { header: 'Running late', body: 'We start at 7:30 tonight.' })
59
61
  ```
60
62
 
61
63
  - **Contact:** `contactId` defaults to the caller's contact.
@@ -64,6 +66,24 @@ await ctx.sl.wallet.message(passId, { header: 'Doors open', body: 'Doors open at
64
66
  person's passes about the message's `about`, otherwise to your app's own passes for them. It's worded from the
65
67
  template's push version.
66
68
 
69
+ ## Knowing who added it
70
+
71
+ Every pass belongs to a known person, so you can tell who has actually put it in their wallet:
72
+
73
+ - **Apple:** the phone registers the pass with SmartLinks when it's added, and unregisters it when it's removed.
74
+ - **Google:** Google sends a signed "saved" or "deleted" notice.
75
+
76
+ The pass's `inWallet` shows `{ apple: { saved, savedAt }, google: { saved, savedAt } }`. Each change raises an
77
+ event for the pass holder, so a flow in your app's blueprint can react, for example by sending a "see you there"
78
+ email when someone adds their ticket:
79
+
80
+ | Event | When |
81
+ |---|---|
82
+ | `wallet.pass_added` | the person added the pass to Apple or Google Wallet |
83
+ | `wallet.pass_removed` | they removed it |
84
+
85
+ Google's notices are best-effort, so treat them as a good signal rather than a guarantee.
86
+
67
87
  ## Checking a pass at the door
68
88
 
69
89
  The QR holds the pass's own code, never an id. Scan it, then:
package/openapi.yaml CHANGED
@@ -3817,6 +3817,11 @@ paths:
3817
3817
  required: false
3818
3818
  schema:
3819
3819
  type: string
3820
+ - name: productId
3821
+ in: query
3822
+ required: false
3823
+ schema:
3824
+ type: string
3820
3825
  responses:
3821
3826
  200:
3822
3827
  description: Success
@@ -26035,6 +26040,12 @@ components:
26035
26040
  type: string
26036
26041
  texts:
26037
26042
  $ref: "#/components/schemas/AuthKitTextKey"
26043
+ textsLanguage:
26044
+ type: string
26045
+ textsByLanguage:
26046
+ type: object
26047
+ additionalProperties:
26048
+ $ref: "#/components/schemas/AuthKitTextKey"
26038
26049
  emailTemplates:
26039
26050
  $ref: "#/components/schemas/AuthKitEmailKind"
26040
26051
  emailBranding:
@@ -29953,6 +29964,8 @@ components:
29953
29964
  type: string
29954
29965
  proofId:
29955
29966
  type: string
29967
+ itemUid:
29968
+ type: string
29956
29969
  addedAt:
29957
29970
  type: string
29958
29971
  removedAt:
@@ -30154,6 +30167,8 @@ components:
30154
30167
  $ref: "#/components/schemas/ContainerItemType"
30155
30168
  itemId:
30156
30169
  type: string
30170
+ productId:
30171
+ type: string
30157
30172
  required:
30158
30173
  - itemType
30159
30174
  - itemId
@@ -30167,9 +30182,6 @@ components:
30167
30182
  enum:
30168
30183
  - tag
30169
30184
  - proof
30170
- - serial
30171
- - order_item
30172
- - container
30173
30185
  CrateItem:
30174
30186
  type: object
30175
30187
  properties:
@@ -35577,6 +35589,8 @@ components:
35577
35589
  Product:
35578
35590
  type: object
35579
35591
  properties:
35592
+ uid:
35593
+ type: string
35580
35594
  orgId:
35581
35595
  type: string
35582
35596
  name:
@@ -35903,6 +35917,8 @@ components:
35903
35917
  type: string
35904
35918
  id:
35905
35919
  type: string
35920
+ uid:
35921
+ type: string
35906
35922
  productId:
35907
35923
  type: string
35908
35924
  tokenId:
@@ -36737,6 +36753,10 @@ components:
36737
36753
  type: string
36738
36754
  refId:
36739
36755
  type: string
36756
+ containerId:
36757
+ type: string
36758
+ itemUid:
36759
+ type: string
36740
36760
  metadata:
36741
36761
  type: object
36742
36762
  additionalProperties: true
@@ -36802,6 +36822,8 @@ components:
36802
36822
  type: string
36803
36823
  refId:
36804
36824
  type: string
36825
+ containerId:
36826
+ type: string
36805
36827
  metadata:
36806
36828
  type: object
36807
36829
  additionalProperties: true
@@ -36835,6 +36857,8 @@ components:
36835
36857
  type: string
36836
36858
  refId:
36837
36859
  type: string
36860
+ containerId:
36861
+ type: string
36838
36862
  metadata:
36839
36863
  type: object
36840
36864
  additionalProperties: true
@@ -37700,6 +37724,17 @@ components:
37700
37724
  required:
37701
37725
  - kind
37702
37726
  - title
37727
+ WalletInWallet:
37728
+ type: object
37729
+ properties:
37730
+ saved:
37731
+ type: boolean
37732
+ savedAt:
37733
+ type: string
37734
+ removedAt:
37735
+ type: string
37736
+ required:
37737
+ - saved
37703
37738
  WalletPassLinks:
37704
37739
  type: object
37705
37740
  properties:
@@ -37756,6 +37791,9 @@ components:
37756
37791
  notice:
37757
37792
  type: object
37758
37793
  additionalProperties: true
37794
+ inWallet:
37795
+ type: object
37796
+ additionalProperties: true
37759
37797
  voidReason:
37760
37798
  type: string
37761
37799
  links:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proveanything/smartlinks",
3
- "version": "2.1.34",
3
+ "version": "2.1.36",
4
4
  "description": "Official JavaScript/TypeScript SDK for the Smartlinks API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",