@proveanything/smartlinks 2.1.33 → 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.
@@ -14,6 +14,11 @@ export type AddressFront =
14
14
  kind: 'website';
15
15
  appId: string;
16
16
  }
17
+ /** One of the business's apps as its whole front page (its only game, say): installed and live. */
18
+ | {
19
+ kind: 'app';
20
+ appId: string;
21
+ }
17
22
  /** Send visitors to another address. Temporary (302) unless `permanent`; `keepPath` carries /about → target/about. */
18
23
  | {
19
24
  kind: 'redirect';
@@ -36,6 +41,8 @@ export interface AddressPage {
36
41
  defaultName: string;
37
42
  /** Shown on the holding page. */
38
43
  listed: boolean;
44
+ /** Live (stable, released): its page works on the business's chosen name, and it can be the front page. */
45
+ live: boolean;
39
46
  /** The full address of the page, on the business's main address. */
40
47
  url: string;
41
48
  }
@@ -67,3 +74,19 @@ export interface AddressNameAvailability {
67
74
  available: boolean;
68
75
  host: string;
69
76
  }
77
+ /** Where an app's public page is (`address.page`): always a working address. */
78
+ export interface AppPageLink {
79
+ /** The one to link to: the business's address itself when the app IS its front page, else `pageUrl`. */
80
+ url: string;
81
+ /** The app's page under the business's address: `https://<address>/_apps/<name>/`. */
82
+ pageUrl: string;
83
+ /** The page name (the business can rename it in Studio → Your address). */
84
+ name: string;
85
+ /** Live (stable, released): on the business's own domain or name. A test build is on the automatic address. */
86
+ live: boolean;
87
+ /** This app is the business's whole front page. */
88
+ isFront: boolean;
89
+ host: string;
90
+ /** The release channel the collection runs the app on. */
91
+ channel: string | null;
92
+ }
@@ -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.33 | Generated: 2026-11-20T18:06:02.523Z
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
 
@@ -498,6 +498,7 @@ interface AddressPage {
498
498
  name: string
499
499
  defaultName: string
500
500
  listed: boolean
501
+ live: boolean
501
502
  url: string
502
503
  }
503
504
  ```
@@ -533,6 +534,19 @@ interface AddressNameAvailability {
533
534
  }
534
535
  ```
535
536
 
537
+ **AppPageLink** (interface)
538
+ ```typescript
539
+ interface AppPageLink {
540
+ url: string
541
+ pageUrl: string
542
+ name: string
543
+ live: boolean
544
+ isFront: boolean
545
+ host: string
546
+ channel: string | null
547
+ }
548
+ ```
549
+
536
550
  **AddressFront** = ``
537
551
 
538
552
  ### adminCards
@@ -5315,6 +5329,8 @@ interface AuthKitConfig {
5315
5329
  afterSignInUrl?: string
5316
5330
  allowedRedirectDomains?: string[]
5317
5331
  texts?: Partial<Record<AuthKitTextKey, string>>
5332
+ textsLanguage?: string
5333
+ textsByLanguage?: Record<string, Partial<Record<AuthKitTextKey, string>>>
5318
5334
  emailTemplates?: Partial<Record<AuthKitEmailKind, AuthKitEmailTemplate>>
5319
5335
  emailBranding?: { logoUrl?: string; buttonColor?: string; footerHtml?: string }
5320
5336
  secrets?: Record<string, { ref: string; hint?: string | null; collectionId?: string; setAt?: string }>
@@ -7908,6 +7924,7 @@ interface ContainerItem {
7908
7924
  itemId: string
7909
7925
  productId?: string
7910
7926
  proofId?: string
7927
+ itemUid?: string | null
7911
7928
  addedAt: string
7912
7929
  removedAt?: string
7913
7930
  metadata?: Record<string, any>
@@ -8046,12 +8063,13 @@ interface ListContainerItemsParams {
8046
8063
  interface FindContainersForItemParams {
8047
8064
  itemType: ContainerItemType
8048
8065
  itemId: string
8066
+ productId?: string
8049
8067
  }
8050
8068
  ```
8051
8069
 
8052
8070
  **ContainerStatus** = `'active' | 'archived' | string`
8053
8071
 
8054
- **ContainerItemType** = `'tag' | 'proof' | 'serial' | 'order_item' | 'container'`
8072
+ **ContainerItemType** = `'tag' | 'proof'`
8055
8073
 
8056
8074
  ### crate
8057
8075
 
@@ -11275,6 +11293,7 @@ interface Proof {
11275
11293
  collectionId: string
11276
11294
  createdAt: string
11277
11295
  id: string
11296
+ uid?: string | null
11278
11297
  productId: string
11279
11298
  tokenId: string
11280
11299
  userId: string
@@ -11771,6 +11790,8 @@ interface Tag {
11771
11790
  proofId: string | null // Proof / serial number
11772
11791
  refType: string | null
11773
11792
  refId: string | null
11793
+ containerId?: string | null
11794
+ itemUid?: string | null
11774
11795
  metadata: Record<string, any>
11775
11796
  createdAt: string // ISO 8601
11776
11797
  updatedAt: string // ISO 8601
@@ -11806,6 +11827,7 @@ interface CreateTagRequest {
11806
11827
  useSerialNumber?: boolean // Auto-generate a serial number as proofId
11807
11828
  refType?: string // Must be paired with refId
11808
11829
  refId?: string // Must be paired with refType
11830
+ containerId?: string // The label on this container (not with proofId)
11809
11831
  metadata?: Record<string, any>
11810
11832
  force?: boolean // Overwrite if tag already exists in this collection
11811
11833
  }
@@ -11828,6 +11850,7 @@ interface UpdateTagRequest {
11828
11850
  proofId?: string
11829
11851
  refType?: string | null
11830
11852
  refId?: string | null
11853
+ containerId?: string | null
11831
11854
  metadata?: Record<string, any> // Merged with existing metadata
11832
11855
  }
11833
11856
  ```
@@ -12356,6 +12379,15 @@ interface WalletPassContent {
12356
12379
  }
12357
12380
  ```
12358
12381
 
12382
+ **WalletInWallet** (interface)
12383
+ ```typescript
12384
+ interface WalletInWallet {
12385
+ saved: boolean
12386
+ savedAt?: string | null
12387
+ removedAt?: string
12388
+ }
12389
+ ```
12390
+
12359
12391
  **WalletPassLinks** (interface)
12360
12392
  ```typescript
12361
12393
  interface WalletPassLinks {
@@ -12390,6 +12422,7 @@ interface WalletPass {
12390
12422
  code: string
12391
12423
  version: number
12392
12424
  notice?: { header: string; body: string; at: string }
12425
+ inWallet?: { apple?: WalletInWallet; google?: WalletInWallet }
12393
12426
  voidReason?: string | null
12394
12427
  links?: WalletPassLinks
12395
12428
  createdAt?: string
@@ -12846,6 +12879,9 @@ interface Gs1DigitalLinkParams {
12846
12879
 
12847
12880
  ### address
12848
12881
 
12882
+ **page**(collectionId: string, appId: string) → `Promise<AppPageLink | null>`
12883
+ Where an app's public page is, on the business's own address. Public: use it from the app's admin ("Open the game") and from share buttons, instead of building the CDN address by hand. Add the app's own route to it: `${link.url}#/play`. The page carries no collectionId or appId: the address says it. Resolves null when the app has no page on that collection (not installed, or a connector). const link = await SL.address.page(collectionId, appId) window.open(`${link?.url ?? fallback}#/play`, '_blank')
12884
+
12849
12885
  **get**(collectionId: string) → `Promise<AddressResponse>`
12850
12886
  Everything about the business's address: name, own domain, front page, websites that can take it, app pages.
12851
12887
 
@@ -14266,58 +14302,58 @@ Admin: the contact that carries a sign-in, attaching the sign-in first to the co
14266
14302
 
14267
14303
  ### containers
14268
14304
 
14269
- **create**(collectionId: string,
14305
+ **create**(collectionId: string,
14270
14306
  data: CreateContainerInput) → `Promise<Container>`
14271
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 }, }) ```
14272
14308
 
14273
- **list**(collectionId: string,
14309
+ **list**(collectionId: string,
14274
14310
  params?: ListContainersParams) → `Promise<ListContainersResponse>`
14275
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 }) ```
14276
14312
 
14277
- **findForItem**(collectionId: string,
14313
+ **findForItem**(collectionId: string,
14278
14314
  params: FindContainersForItemParams) → `Promise<FindContainersForItemResponse>`
14279
- 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', }) ```
14280
14316
 
14281
- **get**(collectionId: string,
14282
- containerId: string,
14317
+ **get**(collectionId: string,
14318
+ containerId: string,
14283
14319
  params?: GetContainerParams) → `Promise<Container>`
14284
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, }) ```
14285
14321
 
14286
- **update**(collectionId: string,
14287
- containerId: string,
14322
+ **update**(collectionId: string,
14323
+ containerId: string,
14288
14324
  data: UpdateContainerInput) → `Promise<Container>`
14289
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' }, }) ```
14290
14326
 
14291
- **remove**(collectionId: string,
14327
+ **remove**(collectionId: string,
14292
14328
  containerId: string) → `Promise<`
14293
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.
14294
14330
 
14295
- **listItems**(collectionId: string,
14296
- containerId: string,
14331
+ **listItems**(collectionId: string,
14332
+ containerId: string,
14297
14333
  params?: ListContainerItemsParams) → `Promise<ContainerItemsResponse>`
14298
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 }) ```
14299
14335
 
14300
- **addItems**(collectionId: string,
14301
- containerId: string,
14336
+ **addItems**(collectionId: string,
14337
+ containerId: string,
14302
14338
  data: AddContainerItemsInput) → `Promise<AddContainerItemsResponse>`
14303
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' }, ], }) ```
14304
14340
 
14305
- **removeItems**(collectionId: string,
14306
- containerId: string,
14341
+ **removeItems**(collectionId: string,
14342
+ containerId: string,
14307
14343
  data: RemoveContainerItemsInput) → `Promise<RemoveContainerItemsResponse>`
14308
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`) ```
14309
14345
 
14310
- **publicList**(collectionId: string,
14346
+ **publicList**(collectionId: string,
14311
14347
  params?: ListContainersParams) → `Promise<PublicListContainersResponse>`
14312
14348
  List containers (public). Soft-deleted containers and containers with `metadata.publicListing === false` are excluded from results.
14313
14349
 
14314
- **publicGet**(collectionId: string,
14315
- containerId: string,
14350
+ **publicGet**(collectionId: string,
14351
+ containerId: string,
14316
14352
  params?: GetContainerParams) → `Promise<Container>`
14317
14353
  Get a single container (public). Soft-deleted containers return a 404. Same `?tree` and `?includeContents` options as the admin version.
14318
14354
 
14319
- **publicListItems**(collectionId: string,
14320
- containerId: string,
14355
+ **publicListItems**(collectionId: string,
14356
+ containerId: string,
14321
14357
  params?: Pick<ListContainerItemsParams, 'limit' | 'offset'>) → `Promise<ContainerItemsResponse>`
14322
14358
  List current contents of a container (public). Returns only items where `removedAt` is null. No `?history` option on the public side.
14323
14359
 
@@ -15786,6 +15822,9 @@ Change what a pass shows; both wallets follow (admin).
15786
15822
  **voidPass**(collectionId: string, passId: string, reason?: string) → `Promise<`
15787
15823
  The pass no longer counts: shown as void on the phone (admin).
15788
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
+
15789
15828
  **message**(collectionId: string, passId: string, msg: { header?: string; body: string }) → `Promise<`
15790
15829
  A lock-screen message on the pass (admin).
15791
15830
 
@@ -191,6 +191,7 @@ const canMessage = await SL.adminViews.canOpen('message.compose')
191
191
  | `proof` | **productId**, **proofId** | One item of a product |
192
192
  | `interaction.type` | **interactionId** | One interaction type (Customers) |
193
193
  | `settings` | | Studio → Settings |
194
+ | `settings.address` | `appId`? | Your address: the business's name, front page, app pages (with `appId`, that app's page: where the owner renames it or makes it the front page) and links domain. Put a "Change this address" link beside any link to your app's page. |
194
195
  | `settings.domain` · `.languages` · `.translations` · `.email` · `.team` · `.userGroups` | | That Studio page |
195
196
  | `settings.setupLists` | appId | Set-up lists, for that app |
196
197
  | `settings.portal` · `.hub` · `.signIn` | | The Portal, the Hub, customer sign-in |
@@ -413,6 +413,11 @@ who it belongs to, so **the URL carries no `collectionId` or `appId`**:
413
413
  - Build with a **relative base** (`base: './'` in Vite) so assets load under `/_apps/<name>/`.
414
414
  - Use hash routes (`#/play`); the path after `/_apps/<name>/` is served the app's `index.html` either way.
415
415
  - Never put `collectionId` in your own share links: the address already says which business it is.
416
+ - **Linking to your page from anywhere else** (your admin's "Open the game", a QR code, an email): ask
417
+ where it is with **`await SL.address.page(collectionId, appId)`** and use its `url` plus your route
418
+ (`${link.url}#/play`). Never build `smartlinks.app/apps/<id>/stable/index.html…` by hand: the business
419
+ may have renamed the page, made it its front page, or put it on its own domain, and `url` follows all of
420
+ that. It's a test build's automatic address until the app is live there.
416
421
 
417
422
  ##### Public views vs the two portal surfaces
418
423
 
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: