@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.
- package/dist/adminViews.d.ts +1 -1
- package/dist/adminViews.js +2 -1
- package/dist/api/address.d.ts +12 -1
- package/dist/api/address.js +21 -0
- package/dist/api/containers.d.ts +2 -1
- package/dist/api/containers.js +2 -1
- package/dist/api/wallet.d.ts +17 -0
- package/dist/api/wallet.js +13 -0
- package/dist/docs/API_SUMMARY.md +61 -22
- package/dist/docs/admin-views.md +1 -0
- package/dist/docs/app-manifest.md +5 -0
- package/dist/docs/auth-kit.md +6 -0
- package/dist/docs/wallet-passes.md +20 -0
- package/dist/openapi.yaml +102 -3
- package/dist/types/address.d.ts +23 -0
- package/dist/types/authKit.d.ts +5 -1
- package/dist/types/containers.d.ts +7 -2
- package/dist/types/product.d.ts +5 -0
- package/dist/types/proof.d.ts +5 -0
- package/dist/types/tags.d.ts +9 -2
- package/dist/types/wallet.d.ts +10 -0
- package/docs/API_SUMMARY.md +61 -22
- package/docs/admin-views.md +1 -0
- package/docs/app-manifest.md +5 -0
- package/docs/auth-kit.md +6 -0
- package/docs/wallet-passes.md +20 -0
- package/openapi.yaml +102 -3
- package/package.json +1 -1
package/dist/adminViews.d.ts
CHANGED
|
@@ -110,7 +110,7 @@ export interface DestinationInfo {
|
|
|
110
110
|
/** The platform's screens any admin screen can open by name. */
|
|
111
111
|
export declare const DESTINATIONS: DestinationInfo[];
|
|
112
112
|
/** A destination name. Any string is accepted, so a newer host's names work on an older SDK. */
|
|
113
|
-
export type Destination = 'contacts' | 'contact' | 'contact.messages' | 'conversation' | 'segment' | 'message.compose' | 'message.log' | 'campaign.new' | 'campaign' | 'templates' | 'template' | 'product' | 'proof' | 'interaction.type' | 'settings' | 'settings.domain' | 'settings.languages' | 'settings.translations' | 'settings.email' | 'settings.team' | 'settings.userGroups' | 'settings.setupLists' | 'settings.portal' | 'settings.hub' | 'settings.signIn' | 'media' | 'app' | (string & {});
|
|
113
|
+
export type Destination = 'contacts' | 'contact' | 'contact.messages' | 'conversation' | 'segment' | 'message.compose' | 'message.log' | 'campaign.new' | 'campaign' | 'templates' | 'template' | 'product' | 'proof' | 'interaction.type' | 'settings' | 'settings.address' | 'settings.domain' | 'settings.languages' | 'settings.translations' | 'settings.email' | 'settings.team' | 'settings.userGroups' | 'settings.setupLists' | 'settings.portal' | 'settings.hub' | 'settings.signIn' | 'media' | 'app' | (string & {});
|
|
114
114
|
/** What a message is about (the same shape as `comms.sendTransactional`'s `about`). Ids only. */
|
|
115
115
|
export interface DestinationAbout {
|
|
116
116
|
appId?: string;
|
package/dist/adminViews.js
CHANGED
|
@@ -279,7 +279,8 @@ export const DESTINATIONS = [
|
|
|
279
279
|
{ name: 'interaction.type', required: ['interactionId'], description: 'One interaction type in Customers.' },
|
|
280
280
|
// Settings
|
|
281
281
|
{ name: 'settings', required: [], description: 'The business settings in Studio.' },
|
|
282
|
-
{ name: 'settings.
|
|
282
|
+
{ name: 'settings.address', required: [], optional: ['appId'], description: "The business's address: its name, front page, app pages (appId: point at that app's page) and links domain." },
|
|
283
|
+
{ name: 'settings.domain', required: [], description: 'The links domain (QR codes, GS1 Digital Links), on the Your address page.' },
|
|
283
284
|
{ name: 'settings.languages', required: [], description: 'The languages customers see.' },
|
|
284
285
|
{ name: 'settings.translations', required: [], description: 'Everything translated for customers.' },
|
|
285
286
|
{ name: 'settings.email', required: [], description: 'Email settings: the sending address and its look.' },
|
package/dist/api/address.d.ts
CHANGED
|
@@ -1,10 +1,21 @@
|
|
|
1
|
-
import type { AddressFront, AddressNameAvailability, AddressResponse } from "../types/address.js";
|
|
1
|
+
import type { AddressFront, AddressNameAvailability, AddressResponse, AppPageLink } from "../types/address.js";
|
|
2
2
|
/**
|
|
3
3
|
* The business's address in one place (admin): its name, what its front page shows, and its apps' pages
|
|
4
4
|
* under `/_apps/<name>/` (prove docs/design/business-address.md, app-page-addresses.md). Changes reach
|
|
5
5
|
* visitors within about a minute.
|
|
6
6
|
*/
|
|
7
7
|
export declare namespace address {
|
|
8
|
+
/**
|
|
9
|
+
* Where an app's public page is, on the business's own address. Public: use it from the app's admin
|
|
10
|
+
* ("Open the game") and from share buttons, instead of building the CDN address by hand. Add the app's
|
|
11
|
+
* own route to it: `${link.url}#/play`. The page carries no collectionId or appId: the address says it.
|
|
12
|
+
* Resolves null when the app has no page on that collection (not installed, or a connector).
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* const link = await SL.address.page(collectionId, appId)
|
|
16
|
+
* window.open(`${link?.url ?? fallback}#/play`, '_blank')
|
|
17
|
+
*/
|
|
18
|
+
function page(collectionId: string, appId: string): Promise<AppPageLink | null>;
|
|
8
19
|
/** Everything about the business's address: name, own domain, front page, websites that can take it, app pages. */
|
|
9
20
|
function get(collectionId: string): Promise<AddressResponse>;
|
|
10
21
|
/** Is this name free? (lower-case letters, numbers and hyphens) */
|
package/dist/api/address.js
CHANGED
|
@@ -7,6 +7,27 @@ import { request, post } from "../http.js";
|
|
|
7
7
|
export var address;
|
|
8
8
|
(function (address) {
|
|
9
9
|
const base = (collectionId) => `/admin/collection/${encodeURIComponent(collectionId)}/address`;
|
|
10
|
+
/**
|
|
11
|
+
* Where an app's public page is, on the business's own address. Public: use it from the app's admin
|
|
12
|
+
* ("Open the game") and from share buttons, instead of building the CDN address by hand. Add the app's
|
|
13
|
+
* own route to it: `${link.url}#/play`. The page carries no collectionId or appId: the address says it.
|
|
14
|
+
* Resolves null when the app has no page on that collection (not installed, or a connector).
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* const link = await SL.address.page(collectionId, appId)
|
|
18
|
+
* window.open(`${link?.url ?? fallback}#/play`, '_blank')
|
|
19
|
+
*/
|
|
20
|
+
async function page(collectionId, appId) {
|
|
21
|
+
try {
|
|
22
|
+
return await request(`/public/collection/${encodeURIComponent(collectionId)}/app/${encodeURIComponent(appId)}/page`);
|
|
23
|
+
}
|
|
24
|
+
catch (e) {
|
|
25
|
+
if ((e === null || e === void 0 ? void 0 : e.statusCode) === 404)
|
|
26
|
+
return null;
|
|
27
|
+
throw e;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
address.page = page;
|
|
10
31
|
/** Everything about the business's address: name, own domain, front page, websites that can take it, app pages. */
|
|
11
32
|
async function get(collectionId) {
|
|
12
33
|
return request(base(collectionId));
|
package/dist/api/containers.d.ts
CHANGED
|
@@ -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: '
|
|
76
|
+
* itemId: 'unit-0007',
|
|
77
|
+
* productId: 'drill',
|
|
77
78
|
* })
|
|
78
79
|
* ```
|
|
79
80
|
*/
|
package/dist/api/containers.js
CHANGED
|
@@ -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: '
|
|
102
|
+
* itemId: 'unit-0007',
|
|
103
|
+
* productId: 'drill',
|
|
103
104
|
* })
|
|
104
105
|
* ```
|
|
105
106
|
*/
|
package/dist/api/wallet.d.ts
CHANGED
|
@@ -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;
|
package/dist/api/wallet.js
CHANGED
|
@@ -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);
|
package/dist/docs/API_SUMMARY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Smartlinks API Summary
|
|
2
2
|
|
|
3
|
-
Version: 2.1.
|
|
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'
|
|
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: '
|
|
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
|
|
package/dist/docs/admin-views.md
CHANGED
|
@@ -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/dist/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/dist/openapi.yaml
CHANGED
|
@@ -10,6 +10,8 @@ servers:
|
|
|
10
10
|
- url: "https://smartlinks.app/api/v1"
|
|
11
11
|
description: Production
|
|
12
12
|
tags:
|
|
13
|
+
- name: address
|
|
14
|
+
description: address API
|
|
13
15
|
- name: responses
|
|
14
16
|
description: Agentic responses API (server-tool runs).
|
|
15
17
|
- name: completions
|
|
@@ -3815,6 +3817,11 @@ paths:
|
|
|
3815
3817
|
required: false
|
|
3816
3818
|
schema:
|
|
3817
3819
|
type: string
|
|
3820
|
+
- name: productId
|
|
3821
|
+
in: query
|
|
3822
|
+
required: false
|
|
3823
|
+
schema:
|
|
3824
|
+
type: string
|
|
3818
3825
|
responses:
|
|
3819
3826
|
200:
|
|
3820
3827
|
description: Success
|
|
@@ -11954,6 +11961,37 @@ paths:
|
|
|
11954
11961
|
description: Unauthorized
|
|
11955
11962
|
404:
|
|
11956
11963
|
description: Not found
|
|
11964
|
+
/public/collection/{collectionId}/app/{appId}/page:
|
|
11965
|
+
get:
|
|
11966
|
+
tags:
|
|
11967
|
+
- address
|
|
11968
|
+
summary: "Where an app's public page is, on the business's own address."
|
|
11969
|
+
operationId: address_page
|
|
11970
|
+
security: []
|
|
11971
|
+
parameters:
|
|
11972
|
+
- name: collectionId
|
|
11973
|
+
in: path
|
|
11974
|
+
required: true
|
|
11975
|
+
schema:
|
|
11976
|
+
type: string
|
|
11977
|
+
- name: appId
|
|
11978
|
+
in: path
|
|
11979
|
+
required: true
|
|
11980
|
+
schema:
|
|
11981
|
+
type: string
|
|
11982
|
+
responses:
|
|
11983
|
+
200:
|
|
11984
|
+
description: Success
|
|
11985
|
+
content:
|
|
11986
|
+
application/json:
|
|
11987
|
+
schema:
|
|
11988
|
+
$ref: "#/components/schemas/AppPageLink"
|
|
11989
|
+
400:
|
|
11990
|
+
description: Bad request
|
|
11991
|
+
401:
|
|
11992
|
+
description: Unauthorized
|
|
11993
|
+
404:
|
|
11994
|
+
description: Not found
|
|
11957
11995
|
/public/collection/{collectionId}/asset:
|
|
11958
11996
|
get:
|
|
11959
11997
|
tags:
|
|
@@ -17421,6 +17459,8 @@ components:
|
|
|
17421
17459
|
type: string
|
|
17422
17460
|
listed:
|
|
17423
17461
|
type: boolean
|
|
17462
|
+
live:
|
|
17463
|
+
type: boolean
|
|
17424
17464
|
url:
|
|
17425
17465
|
type: string
|
|
17426
17466
|
required:
|
|
@@ -17429,6 +17469,7 @@ components:
|
|
|
17429
17469
|
- name
|
|
17430
17470
|
- defaultName
|
|
17431
17471
|
- listed
|
|
17472
|
+
- live
|
|
17432
17473
|
- url
|
|
17433
17474
|
AddressWebsite:
|
|
17434
17475
|
type: object
|
|
@@ -17486,6 +17527,31 @@ components:
|
|
|
17486
17527
|
required:
|
|
17487
17528
|
- available
|
|
17488
17529
|
- host
|
|
17530
|
+
AppPageLink:
|
|
17531
|
+
type: object
|
|
17532
|
+
properties:
|
|
17533
|
+
url:
|
|
17534
|
+
type: string
|
|
17535
|
+
pageUrl:
|
|
17536
|
+
type: string
|
|
17537
|
+
name:
|
|
17538
|
+
type: string
|
|
17539
|
+
live:
|
|
17540
|
+
type: boolean
|
|
17541
|
+
isFront:
|
|
17542
|
+
type: boolean
|
|
17543
|
+
host:
|
|
17544
|
+
type: string
|
|
17545
|
+
channel:
|
|
17546
|
+
type: string
|
|
17547
|
+
required:
|
|
17548
|
+
- url
|
|
17549
|
+
- pageUrl
|
|
17550
|
+
- name
|
|
17551
|
+
- live
|
|
17552
|
+
- isFront
|
|
17553
|
+
- host
|
|
17554
|
+
- channel
|
|
17489
17555
|
AddressFront:
|
|
17490
17556
|
type: object
|
|
17491
17557
|
additionalProperties: true
|
|
@@ -25974,6 +26040,12 @@ components:
|
|
|
25974
26040
|
type: string
|
|
25975
26041
|
texts:
|
|
25976
26042
|
$ref: "#/components/schemas/AuthKitTextKey"
|
|
26043
|
+
textsLanguage:
|
|
26044
|
+
type: string
|
|
26045
|
+
textsByLanguage:
|
|
26046
|
+
type: object
|
|
26047
|
+
additionalProperties:
|
|
26048
|
+
$ref: "#/components/schemas/AuthKitTextKey"
|
|
25977
26049
|
emailTemplates:
|
|
25978
26050
|
$ref: "#/components/schemas/AuthKitEmailKind"
|
|
25979
26051
|
emailBranding:
|
|
@@ -29892,6 +29964,8 @@ components:
|
|
|
29892
29964
|
type: string
|
|
29893
29965
|
proofId:
|
|
29894
29966
|
type: string
|
|
29967
|
+
itemUid:
|
|
29968
|
+
type: string
|
|
29895
29969
|
addedAt:
|
|
29896
29970
|
type: string
|
|
29897
29971
|
removedAt:
|
|
@@ -30093,6 +30167,8 @@ components:
|
|
|
30093
30167
|
$ref: "#/components/schemas/ContainerItemType"
|
|
30094
30168
|
itemId:
|
|
30095
30169
|
type: string
|
|
30170
|
+
productId:
|
|
30171
|
+
type: string
|
|
30096
30172
|
required:
|
|
30097
30173
|
- itemType
|
|
30098
30174
|
- itemId
|
|
@@ -30106,9 +30182,6 @@ components:
|
|
|
30106
30182
|
enum:
|
|
30107
30183
|
- tag
|
|
30108
30184
|
- proof
|
|
30109
|
-
- serial
|
|
30110
|
-
- order_item
|
|
30111
|
-
- container
|
|
30112
30185
|
CrateItem:
|
|
30113
30186
|
type: object
|
|
30114
30187
|
properties:
|
|
@@ -35516,6 +35589,8 @@ components:
|
|
|
35516
35589
|
Product:
|
|
35517
35590
|
type: object
|
|
35518
35591
|
properties:
|
|
35592
|
+
uid:
|
|
35593
|
+
type: string
|
|
35519
35594
|
orgId:
|
|
35520
35595
|
type: string
|
|
35521
35596
|
name:
|
|
@@ -35842,6 +35917,8 @@ components:
|
|
|
35842
35917
|
type: string
|
|
35843
35918
|
id:
|
|
35844
35919
|
type: string
|
|
35920
|
+
uid:
|
|
35921
|
+
type: string
|
|
35845
35922
|
productId:
|
|
35846
35923
|
type: string
|
|
35847
35924
|
tokenId:
|
|
@@ -36676,6 +36753,10 @@ components:
|
|
|
36676
36753
|
type: string
|
|
36677
36754
|
refId:
|
|
36678
36755
|
type: string
|
|
36756
|
+
containerId:
|
|
36757
|
+
type: string
|
|
36758
|
+
itemUid:
|
|
36759
|
+
type: string
|
|
36679
36760
|
metadata:
|
|
36680
36761
|
type: object
|
|
36681
36762
|
additionalProperties: true
|
|
@@ -36741,6 +36822,8 @@ components:
|
|
|
36741
36822
|
type: string
|
|
36742
36823
|
refId:
|
|
36743
36824
|
type: string
|
|
36825
|
+
containerId:
|
|
36826
|
+
type: string
|
|
36744
36827
|
metadata:
|
|
36745
36828
|
type: object
|
|
36746
36829
|
additionalProperties: true
|
|
@@ -36774,6 +36857,8 @@ components:
|
|
|
36774
36857
|
type: string
|
|
36775
36858
|
refId:
|
|
36776
36859
|
type: string
|
|
36860
|
+
containerId:
|
|
36861
|
+
type: string
|
|
36777
36862
|
metadata:
|
|
36778
36863
|
type: object
|
|
36779
36864
|
additionalProperties: true
|
|
@@ -37639,6 +37724,17 @@ components:
|
|
|
37639
37724
|
required:
|
|
37640
37725
|
- kind
|
|
37641
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
|
|
37642
37738
|
WalletPassLinks:
|
|
37643
37739
|
type: object
|
|
37644
37740
|
properties:
|
|
@@ -37695,6 +37791,9 @@ components:
|
|
|
37695
37791
|
notice:
|
|
37696
37792
|
type: object
|
|
37697
37793
|
additionalProperties: true
|
|
37794
|
+
inWallet:
|
|
37795
|
+
type: object
|
|
37796
|
+
additionalProperties: true
|
|
37698
37797
|
voidReason:
|
|
37699
37798
|
type: string
|
|
37700
37799
|
links:
|