@proveanything/smartlinks 1.17.4 → 1.17.6
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/api/integrations.d.ts +7 -1
- package/dist/api/integrations.js +9 -0
- package/dist/docs/API_SUMMARY.md +85 -300
- package/dist/docs/ai-tools-and-skills.md +13 -1
- package/dist/docs/server-functions.md +234 -0
- package/dist/openapi.yaml +169 -0
- package/dist/types/appManifest.d.ts +107 -0
- package/dist/types/integrations.d.ts +8 -0
- package/docs/API_SUMMARY.md +85 -300
- package/docs/ai-tools-and-skills.md +13 -1
- package/docs/server-functions.md +234 -0
- package/openapi.yaml +169 -0
- package/package.json +1 -1
package/dist/docs/API_SUMMARY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Smartlinks API Summary
|
|
2
2
|
|
|
3
|
-
Version: 1.17.
|
|
3
|
+
Version: 1.17.6 | Generated: 2026-09-14T10:25:34.491Z
|
|
4
4
|
|
|
5
5
|
This is a concise summary of all available API functions and types.
|
|
6
6
|
|
|
@@ -21,6 +21,7 @@ For detailed guides on specific features:
|
|
|
21
21
|
- **[Multi-Page App Architecture](mpa.md)** - Vite MPA build pipeline: public/admin entry points, widget/container/executor bundles, content-hashed CDN assets
|
|
22
22
|
- **[App Configuration Files](app-manifest.md)** - `app.manifest.json` and `app.admin.json` reference — bundles, components, setup questions, import schemas, tunable fields, and metrics
|
|
23
23
|
- **[Executor Model](executor.md)** - Programmatic JS bundles for AI-driven setup, server-side SEO metadata generation, and LLM content for AI crawlers
|
|
24
|
+
- **[Server Functions](server-functions.md)** - App-authored server-side "edge functions" (`async (ctx, event) => result`): http/event/cron triggers, the visibility/authority/capabilities security model, and the pre-scoped `ctx` (authority-scoped SDK, capability-gated secrets + fetch)
|
|
24
25
|
- **[Realtime](realtime.md)** - Real-time data updates and WebSocket connections
|
|
25
26
|
- **[iframe Responder](iframe-responder.md)** - iframe integration and cross-origin communication
|
|
26
27
|
- **[iframe Streaming Parent Changes](iframe-streaming-parent-changes.md)** - Parent-side changes required to support AI streaming in iframe proxy mode
|
|
@@ -985,9 +986,6 @@ interface AIGenerateImageRequest {
|
|
|
985
986
|
prompt: string
|
|
986
987
|
provider?: string
|
|
987
988
|
model?: string
|
|
988
|
-
* Requested image size.
|
|
989
|
-
* OpenAI supported values: '1024x1024', '1024x1792', '1792x1024'
|
|
990
|
-
* Other providers may support different sizes.
|
|
991
989
|
size?: string
|
|
992
990
|
[key: string]: any
|
|
993
991
|
}
|
|
@@ -1245,14 +1243,6 @@ interface AnalyticsFilterRequest {
|
|
|
1245
1243
|
claimIds?: string[]
|
|
1246
1244
|
isAdmin?: boolean
|
|
1247
1245
|
hasLocation?: boolean
|
|
1248
|
-
* Filter web-events rows by the `source` column (list-match). Web-events
|
|
1249
|
-
* only - has no effect on `source: 'tag'` queries.
|
|
1250
|
-
*
|
|
1251
|
-
* There is deliberately no singular `source` filter: the request's own
|
|
1252
|
-
* top-level `source` field (`'events'` vs `'tag'`) already owns that name
|
|
1253
|
-
* as the table selector and predates this column - same word, two
|
|
1254
|
-
* different things. Use a single-element array (`sources: ['portal']`)
|
|
1255
|
-
* for an exact-match filter.
|
|
1256
1246
|
sources?: string[]
|
|
1257
1247
|
redirectMode?: string
|
|
1258
1248
|
redirectModes?: string[]
|
|
@@ -1536,24 +1526,12 @@ interface AppliedOverridesSummary {
|
|
|
1536
1526
|
```typescript
|
|
1537
1527
|
interface SystemBlock {
|
|
1538
1528
|
basePlanId?: string
|
|
1539
|
-
* Stable capability tier microapps should branch on instead of
|
|
1540
|
-
* `basePlanId` — see docs/appConfig.md §4.1. Known tiers are `ProductMode`;
|
|
1541
|
-
* an unrecognised value is a future tier your code doesn't know about yet
|
|
1542
|
-
* — fail closed to the nearest tier you do understand rather than erroring.
|
|
1543
1529
|
productMode?: ProductMode | (string & {})
|
|
1544
1530
|
addOnKeys?: string[]
|
|
1545
1531
|
apps?: string[]
|
|
1546
|
-
* Explicit overrides only — an absent key is NOT "off". Resolve with
|
|
1547
|
-
* `resolveFeature()` / `isFeatureEnabled()`, which apply the accountType
|
|
1548
|
-
* default: `enterprise` defaults every flag to on unless explicitly
|
|
1549
|
-
* `false` here; `standard` defaults every flag to off unless explicitly
|
|
1550
|
-
* `true` here.
|
|
1551
1532
|
features?: Record<string, boolean>
|
|
1552
1533
|
meters?: Record<string, MeterEntry>
|
|
1553
1534
|
entitledAppGroups?: string[]
|
|
1554
|
-
* Explicit account tier. `'enterprise'` flips the default for every
|
|
1555
|
-
* feature flag to on (see `features`), not just an "unlimited baseline" —
|
|
1556
|
-
* absence of a flag no longer means disabled for enterprise accounts.
|
|
1557
1535
|
accountType?: 'enterprise' | 'standard'
|
|
1558
1536
|
syncedAt?: string
|
|
1559
1537
|
syncedFromSubscriptionId?: string
|
|
@@ -1594,10 +1572,6 @@ interface AppManifestFiles {
|
|
|
1594
1572
|
umd: string;
|
|
1595
1573
|
esm?: string;
|
|
1596
1574
|
};
|
|
1597
|
-
* CSS file path — set to `null` (or omit) when the bundle ships no CSS.
|
|
1598
|
-
* Most widgets and containers use Tailwind/shadcn classes from the parent and produce no CSS file.
|
|
1599
|
-
* Only set to a non-null string if an actual CSS file exists in dist/;
|
|
1600
|
-
* a non-null value pointing to a missing file will cause a 404 in the parent portal.
|
|
1601
1575
|
css?: string | null;
|
|
1602
1576
|
}
|
|
1603
1577
|
```
|
|
@@ -1642,23 +1616,8 @@ interface AppContainerComponent {
|
|
|
1642
1616
|
```typescript
|
|
1643
1617
|
interface DeepLinkEntry {
|
|
1644
1618
|
title: string;
|
|
1645
|
-
* Hash route path within the app (optional).
|
|
1646
|
-
* Defaults to "/" if omitted.
|
|
1647
|
-
* @example "/gallery"
|
|
1648
1619
|
path?: string;
|
|
1649
|
-
* App-specific query params appended to the hash route URL.
|
|
1650
|
-
* Do NOT include platform context params (collectionId, appId, productId, etc.) —
|
|
1651
|
-
* those are injected by the platform automatically.
|
|
1652
1620
|
params?: Record<string, string>;
|
|
1653
|
-
* When `true`, this entry is also available as a dynamic data context for widgets
|
|
1654
|
-
* (in addition to being a navigable page / container route).
|
|
1655
|
-
*
|
|
1656
|
-
* Entries with `widget: true` appear in the widget config picker so an admin can
|
|
1657
|
-
* select this dataset to drive how the widget renders. The widget receives `params`
|
|
1658
|
-
* and decides its own presentation — no separate rendering contract is required.
|
|
1659
|
-
*
|
|
1660
|
-
* Omit (or `false`) for entries that are only meaningful as full-page navigation
|
|
1661
|
-
* (e.g. multi-step forms, settings pages, checkout flows).
|
|
1662
1621
|
widget?: true;
|
|
1663
1622
|
}
|
|
1664
1623
|
```
|
|
@@ -1744,13 +1703,67 @@ interface AppManifestExecutor {
|
|
|
1744
1703
|
}
|
|
1745
1704
|
```
|
|
1746
1705
|
|
|
1706
|
+
**AppFunctionTrigger** (interface)
|
|
1707
|
+
```typescript
|
|
1708
|
+
interface AppFunctionTrigger {
|
|
1709
|
+
type: AppFunctionTriggerType;
|
|
1710
|
+
eventTypes?: string[];
|
|
1711
|
+
schedule?: string;
|
|
1712
|
+
route?: string;
|
|
1713
|
+
methods?: Array<'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'>;
|
|
1714
|
+
}
|
|
1715
|
+
```
|
|
1716
|
+
|
|
1717
|
+
**AppFunctionDef** (interface)
|
|
1718
|
+
```typescript
|
|
1719
|
+
interface AppFunctionDef {
|
|
1720
|
+
name: string;
|
|
1721
|
+
description?: string;
|
|
1722
|
+
trigger: AppFunctionTrigger;
|
|
1723
|
+
visibility?: AppFunctionVisibility;
|
|
1724
|
+
authority?: AppFunctionAuthority;
|
|
1725
|
+
capabilities?: string[];
|
|
1726
|
+
apiVersion?: string;
|
|
1727
|
+
handler?: string;
|
|
1728
|
+
}
|
|
1729
|
+
```
|
|
1730
|
+
|
|
1731
|
+
**AppManifestFunctions** (interface)
|
|
1732
|
+
```typescript
|
|
1733
|
+
interface AppManifestFunctions {
|
|
1734
|
+
files: AppManifestFiles;
|
|
1735
|
+
definitions: AppFunctionDef[];
|
|
1736
|
+
}
|
|
1737
|
+
```
|
|
1738
|
+
|
|
1739
|
+
**ServerFunctionCaller** (interface)
|
|
1740
|
+
```typescript
|
|
1741
|
+
interface ServerFunctionCaller {
|
|
1742
|
+
userId: string | null;
|
|
1743
|
+
anonymous: boolean;
|
|
1744
|
+
origin?: string | null;
|
|
1745
|
+
ip?: string | null;
|
|
1746
|
+
via: AppFunctionTriggerType;
|
|
1747
|
+
}
|
|
1748
|
+
```
|
|
1749
|
+
|
|
1750
|
+
**ServerFunctionContext** (interface)
|
|
1751
|
+
```typescript
|
|
1752
|
+
interface ServerFunctionContext {
|
|
1753
|
+
collectionId: string;
|
|
1754
|
+
appId: string;
|
|
1755
|
+
sl: any;
|
|
1756
|
+
secrets: { get(ref: string): Promise<string | null> };
|
|
1757
|
+
caller: ServerFunctionCaller;
|
|
1758
|
+
fetch: typeof fetch;
|
|
1759
|
+
log: (message: string, data?: Record<string, any>) => void;
|
|
1760
|
+
}
|
|
1761
|
+
```
|
|
1762
|
+
|
|
1747
1763
|
**AppAdminConfig** (interface)
|
|
1748
1764
|
```typescript
|
|
1749
1765
|
interface AppAdminConfig {
|
|
1750
1766
|
$schema?: string;
|
|
1751
|
-
* Path (relative to the app's public root) to an AI guide markdown file.
|
|
1752
|
-
* Provides natural-language context for AI-assisted configuration.
|
|
1753
|
-
* @example "ai-guide.md"
|
|
1754
1767
|
aiGuide?: string;
|
|
1755
1768
|
setup?: {
|
|
1756
1769
|
description?: string;
|
|
@@ -1818,9 +1831,6 @@ interface AppManifest {
|
|
|
1818
1831
|
version: string;
|
|
1819
1832
|
platformRevision?: string;
|
|
1820
1833
|
appId: string;
|
|
1821
|
-
* SEO configuration for this app.
|
|
1822
|
-
* `priority` controls which app's singular fields (title, description, ogImage) win
|
|
1823
|
-
* when multiple apps appear on the same page. Default is 0; higher wins.
|
|
1824
1834
|
seo?: {
|
|
1825
1835
|
strategy?: 'executor' | string;
|
|
1826
1836
|
priority?: number;
|
|
@@ -1832,26 +1842,15 @@ interface AppManifest {
|
|
|
1832
1842
|
};
|
|
1833
1843
|
};
|
|
1834
1844
|
};
|
|
1835
|
-
* Relative path to the admin configuration file (e.g. `"app.admin.json"`).
|
|
1836
|
-
* When present, fetch this file to get the full {@link AppAdminConfig}
|
|
1837
|
-
* (setup questions, import schema, tunable fields, metrics definitions).
|
|
1838
|
-
* Absent when the app has no admin UI.
|
|
1839
1845
|
admin?: string;
|
|
1840
1846
|
widgets?: AppManifestWidgets;
|
|
1841
1847
|
containers?: {
|
|
1842
1848
|
files: AppManifestFiles;
|
|
1843
1849
|
components: AppContainerComponent[];
|
|
1844
1850
|
};
|
|
1845
|
-
* Static deep-linkable states built into this app.
|
|
1846
|
-
* These are fixed routes that exist regardless of content — declared once at build time.
|
|
1847
|
-
* Dynamic content entries (e.g. CMS pages) are stored separately in `appConfig.linkable`.
|
|
1848
|
-
* Consumers should merge both sources to get the full set of navigable states.
|
|
1849
|
-
* @see DeepLinkEntry
|
|
1850
1851
|
linkable?: DeepLinkEntry[];
|
|
1851
|
-
* Executor bundle declaration. Present when the app ships a programmatic executor
|
|
1852
|
-
* for AI-driven configuration, server-side SEO, and LLM content generation.
|
|
1853
|
-
* @see AppManifestExecutor
|
|
1854
1852
|
executor?: AppManifestExecutor;
|
|
1853
|
+
functions?: AppManifestFunctions;
|
|
1855
1854
|
[key: string]: any;
|
|
1856
1855
|
}
|
|
1857
1856
|
```
|
|
@@ -1881,6 +1880,12 @@ interface GetCollectionWidgetsOptions {
|
|
|
1881
1880
|
}
|
|
1882
1881
|
```
|
|
1883
1882
|
|
|
1883
|
+
**AppFunctionTriggerType** = `'http' | 'event' | 'cron'`
|
|
1884
|
+
|
|
1885
|
+
**AppFunctionVisibility** = `'admin' | 'public'`
|
|
1886
|
+
|
|
1887
|
+
**AppFunctionAuthority** = `'caller' | 'collection'`
|
|
1888
|
+
|
|
1884
1889
|
### appObjects
|
|
1885
1890
|
|
|
1886
1891
|
**PaginatedResponse<T>** (interface)
|
|
@@ -2090,9 +2095,6 @@ interface CreateThreadInput {
|
|
|
2090
2095
|
data?: Record<string, unknown>
|
|
2091
2096
|
owner?: Record<string, unknown>
|
|
2092
2097
|
admin?: Record<string, unknown> // admin only
|
|
2093
|
-
* Optional atomic first reply. Posting a comment no longer needs a separate
|
|
2094
|
-
* create-thread-then-reply round trip (which could orphan an empty thread on
|
|
2095
|
-
* partial failure). The reply is stored with a generated `id` and timestamp.
|
|
2096
2098
|
firstReply?: ReplyInput
|
|
2097
2099
|
}
|
|
2098
2100
|
```
|
|
@@ -2124,11 +2126,7 @@ interface ReplyInput {
|
|
|
2124
2126
|
**FacetRuleClause** (interface)
|
|
2125
2127
|
```typescript
|
|
2126
2128
|
interface FacetRuleClause {
|
|
2127
|
-
* Facet key this clause tests, e.g. "brand", "type", "bread-type".
|
|
2128
|
-
* Must reference a defined facet on the collection.
|
|
2129
2129
|
facetKey: string
|
|
2130
|
-
* One or more facet value keys that satisfy the clause (OR semantics).
|
|
2131
|
-
* At least one value required. Server deduplicates and sorts.
|
|
2132
2130
|
anyOf: string[]
|
|
2133
2131
|
}
|
|
2134
2132
|
```
|
|
@@ -2136,8 +2134,6 @@ interface FacetRuleClause {
|
|
|
2136
2134
|
**FacetRule** (interface)
|
|
2137
2135
|
```typescript
|
|
2138
2136
|
interface FacetRule {
|
|
2139
|
-
* All clauses must be satisfied (AND semantics).
|
|
2140
|
-
* Must be non-empty; no duplicate facetKey entries.
|
|
2141
2137
|
all: FacetRuleClause[]
|
|
2142
2138
|
}
|
|
2143
2139
|
```
|
|
@@ -2149,10 +2145,6 @@ interface RecordTarget {
|
|
|
2149
2145
|
variantId?: string
|
|
2150
2146
|
proofId?: string
|
|
2151
2147
|
batchId?: string
|
|
2152
|
-
* Facet assignments for the product (e.g. `{ brand: ['samsung'], type: ['tv'] }`).
|
|
2153
|
-
* Used exclusively to match FacetRule records via GIN-indexed containment check.
|
|
2154
|
-
* Does NOT filter legacy scope.facets arrays (that system is removed in SDK 1.12).
|
|
2155
|
-
* Omit to exclude rule records from results.
|
|
2156
2148
|
facets?: Record<string, string[]>
|
|
2157
2149
|
}
|
|
2158
2150
|
```
|
|
@@ -2230,8 +2222,6 @@ interface UpsertRecordInput {
|
|
|
2230
2222
|
```typescript
|
|
2231
2223
|
interface MatchRecordsInput {
|
|
2232
2224
|
target: RecordTarget
|
|
2233
|
-
* 'all' — return all matching records (default)
|
|
2234
|
-
* 'best' — return the highest-specificity record per recordType
|
|
2235
2225
|
strategy?: 'all' | 'best'
|
|
2236
2226
|
recordType?: string
|
|
2237
2227
|
limit?: number
|
|
@@ -2271,11 +2261,7 @@ interface AppRecord {
|
|
|
2271
2261
|
startsAt: string | null
|
|
2272
2262
|
expiresAt: string | null
|
|
2273
2263
|
deletedAt: string | null // admin only
|
|
2274
|
-
* Numeric specificity score. Server-computed from anchor IDs and facetRule.
|
|
2275
|
-
* Higher = more specific. 0 = universal (no anchors, no rule).
|
|
2276
2264
|
specificity: number
|
|
2277
|
-
* Facet rule for rule records (ref starts with "rule:").
|
|
2278
|
-
* null on all other record types. Mutually exclusive with anchor IDs.
|
|
2279
2265
|
facetRule: FacetRule | null
|
|
2280
2266
|
singletonKey: string | null
|
|
2281
2267
|
data: Record<string, unknown>
|
|
@@ -2307,8 +2293,6 @@ interface CreateRecordInput {
|
|
|
2307
2293
|
scopeId?: string | null
|
|
2308
2294
|
customId?: string | null
|
|
2309
2295
|
sourceSystem?: string | null
|
|
2310
|
-
* Opt-in singleton cardinality. When set, the server upserts rather than
|
|
2311
|
-
* inserting a duplicate. Values: 'collection' | 'product' | 'variant' | 'batch' | 'proof'
|
|
2312
2296
|
singletonPer?: string
|
|
2313
2297
|
data?: Record<string, unknown>
|
|
2314
2298
|
owner?: Record<string, unknown>
|
|
@@ -2351,9 +2335,6 @@ interface ResolveAllParams {
|
|
|
2351
2335
|
variantId?: string
|
|
2352
2336
|
batchId?: string
|
|
2353
2337
|
proofId?: string
|
|
2354
|
-
* Facet assignments for the product — used for both legacy facet-ref matching
|
|
2355
|
-
* and facetRule evaluation.
|
|
2356
|
-
* e.g. { "brand": "samsung", "type": ["tv", "laptop"] }
|
|
2357
2338
|
facets?: Record<string, string | string[]>
|
|
2358
2339
|
}
|
|
2359
2340
|
recordType?: string
|
|
@@ -2444,32 +2425,12 @@ interface PublicCreateObjectRule {
|
|
|
2444
2425
|
```typescript
|
|
2445
2426
|
interface PublicCreateBranch {
|
|
2446
2427
|
allow: boolean
|
|
2447
|
-
* Field values merged **over** the caller's request body before writing.
|
|
2448
|
-
* Use this to lock down `visibility` and `status` regardless of what the
|
|
2449
|
-
* client sends.
|
|
2450
2428
|
enforce?: {
|
|
2451
2429
|
visibility?: 'public' | 'owner' | 'admin'
|
|
2452
2430
|
status?: string
|
|
2453
2431
|
}
|
|
2454
|
-
* Anonymous edit-token configuration.
|
|
2455
|
-
* **Records only** — ignored for cases and threads.
|
|
2456
|
-
*
|
|
2457
|
-
* When `editToken: true`, the server generates a one-time 256-bit hex token
|
|
2458
|
-
* on anonymous record creation, stores it in `admin.editToken` (never
|
|
2459
|
-
* exposed to public / owner responses), and returns it **once** in the
|
|
2460
|
-
* creation response under the `editToken` key.
|
|
2461
|
-
*
|
|
2462
|
-
* The client can then pass that token as the `X-Edit-Token` header on
|
|
2463
|
-
* `PATCH /records/:recordId` to amend the `data` zone without
|
|
2464
|
-
* authentication.
|
|
2465
|
-
*
|
|
2466
|
-
* @see {@link CreateRecordResponse} — creation response shape
|
|
2467
|
-
* @see {@link records.updateWithToken} — SDK method for the amendment call
|
|
2468
2432
|
edit?: {
|
|
2469
2433
|
editToken: boolean
|
|
2470
|
-
* Optional expiry window in minutes from `createdAt`.
|
|
2471
|
-
* After this many minutes the token is rejected with HTTP 403
|
|
2472
|
-
* `EDIT_WINDOW_EXPIRED`. Omit for no expiry.
|
|
2473
2434
|
windowMinutes?: number
|
|
2474
2435
|
}
|
|
2475
2436
|
}
|
|
@@ -2518,8 +2479,6 @@ interface Asset {
|
|
|
2518
2479
|
proofId: string | null
|
|
2519
2480
|
appId: string | null
|
|
2520
2481
|
url: string
|
|
2521
|
-
* CDN URL of the WebP thumbnail (max 512px longest edge, no crop).
|
|
2522
|
-
* Always .webp — null until thumbnail generation has run.
|
|
2523
2482
|
thumbnail: string | null
|
|
2524
2483
|
name: string
|
|
2525
2484
|
cleanName: string | null
|
|
@@ -2543,7 +2502,6 @@ interface Asset {
|
|
|
2543
2502
|
createdAt: string
|
|
2544
2503
|
updatedAt: string
|
|
2545
2504
|
deletedAt: string | null
|
|
2546
|
-
* @deprecated Use `thumbnail` instead. Legacy multi-size thumbnail map.
|
|
2547
2505
|
thumbnails?: {
|
|
2548
2506
|
x100?: string
|
|
2549
2507
|
x200?: string
|
|
@@ -2705,8 +2663,6 @@ interface UploadPolicyConfig {
|
|
|
2705
2663
|
```typescript
|
|
2706
2664
|
interface RequestUploadTokenOptions {
|
|
2707
2665
|
collectionId: string
|
|
2708
|
-
* App ID whose collection-scoped config provides `uploadPolicy`.
|
|
2709
|
-
* Resolved from `sites/{collectionId}/apps/{appId}`.
|
|
2710
2666
|
appId: string
|
|
2711
2667
|
contactId?: string
|
|
2712
2668
|
productId?: string
|
|
@@ -2759,8 +2715,6 @@ interface CreateResumableUploadOptions {
|
|
|
2759
2715
|
metadata?: Record<string, any>
|
|
2760
2716
|
appId?: string
|
|
2761
2717
|
admin?: boolean
|
|
2762
|
-
* Upload token id (from {@link requestUploadToken}) for public/unauthenticated
|
|
2763
|
-
* uploads. When provided, the public resumable route is used.
|
|
2764
2718
|
token?: string
|
|
2765
2719
|
}
|
|
2766
2720
|
```
|
|
@@ -2836,14 +2790,7 @@ interface Attestation {
|
|
|
2836
2790
|
unit?: string
|
|
2837
2791
|
source?: string
|
|
2838
2792
|
authorId?: string
|
|
2839
|
-
* When authored under a `contribute` grant (rather than by identity), the id of
|
|
2840
|
-
* the granting token — provenance for a contributed record. `null`/absent for
|
|
2841
|
-
* owner/admin/identity writes.
|
|
2842
2793
|
grantId?: string | null
|
|
2843
|
-
* Moderation gate, orthogonal to {@link visibility} and excluded from the hash
|
|
2844
|
-
* chain. `'approved'` (default) is live; `'pending'` is held for owner review
|
|
2845
|
-
* (visible only to its author and owner/admin audiences); `'rejected'` was
|
|
2846
|
-
* declined. Contributions under a `moderate` grant start `'pending'`.
|
|
2847
2794
|
moderationStatus?: AttestationModerationStatus
|
|
2848
2795
|
metadata?: Record<string, any>
|
|
2849
2796
|
contentHash: string
|
|
@@ -2910,8 +2857,6 @@ interface OwnerAttestationInput {
|
|
|
2910
2857
|
unit?: string
|
|
2911
2858
|
source?: string
|
|
2912
2859
|
metadata?: Record<string, any>
|
|
2913
|
-
* Attribution for an anonymous (public-link) contribute-grant write. Ignored
|
|
2914
|
-
* for owner writes and for named-grant writes (attributed to the signed-in uid).
|
|
2915
2860
|
guestName?: string
|
|
2916
2861
|
}
|
|
2917
2862
|
```
|
|
@@ -3022,9 +2967,6 @@ interface ListAttestationsParams {
|
|
|
3022
2967
|
subjectType: AttestationSubjectType
|
|
3023
2968
|
subjectId: string
|
|
3024
2969
|
attestationType?: string
|
|
3025
|
-
* Filter by moderation state. Primarily for the owner review queue
|
|
3026
|
-
* (`moderationStatus: 'pending'`). ANDs with the server's audience gate, so a
|
|
3027
|
-
* public caller can never use it to widen access.
|
|
3028
2970
|
moderationStatus?: AttestationModerationStatus
|
|
3029
2971
|
recordedAfter?: string
|
|
3030
2972
|
recordedBefore?: string
|
|
@@ -3259,20 +3201,9 @@ interface AuthLoginResponse {
|
|
|
3259
3201
|
requiresEmailVerification?: boolean // True if email verification is required but not yet completed
|
|
3260
3202
|
emailVerificationDeadline?: number // Unix timestamp - for 'immediate' mode grace period deadline
|
|
3261
3203
|
accountLocked?: boolean // True if account is locked due to expired verification deadline
|
|
3262
|
-
* True when this login created a brand-new account. Currently only populated by
|
|
3263
|
-
* the Apple login endpoint; left undefined by the other AuthKit login endpoints.
|
|
3264
3204
|
isNewUser?: boolean
|
|
3265
|
-
* Session token expiry, in **milliseconds since epoch** (not seconds, not a duration),
|
|
3266
|
-
* or null when the server could not decode it. Currently only populated by the Apple
|
|
3267
|
-
* login endpoint.
|
|
3268
3205
|
expiresAt?: number | null
|
|
3269
|
-
* Opaque, single-use refresh token. **Native clients only** — present only when the
|
|
3270
|
-
* request opted in via `initializeApi({ platform: 'native' })` (or the
|
|
3271
|
-
* `X-Client-Platform: native` header). For native logins, `token` above is the
|
|
3272
|
-
* short-lived access token; pair it with this refresh token. Undefined for web.
|
|
3273
3206
|
refreshToken?: string
|
|
3274
|
-
* Absolute expiry of the refresh-token family, in **milliseconds since epoch**.
|
|
3275
|
-
* Fixed at login — it does **not** move when the token is rotated. Native only.
|
|
3276
3207
|
refreshTokenExpiresAt?: number
|
|
3277
3208
|
}
|
|
3278
3209
|
```
|
|
@@ -3300,16 +3231,8 @@ interface LogoutResponse {
|
|
|
3300
3231
|
```typescript
|
|
3301
3232
|
interface AppleLoginOptions {
|
|
3302
3233
|
authorizationCode?: string
|
|
3303
|
-
* The **raw** nonce the client generated, if nonce binding was used. The server
|
|
3304
|
-
* accepts either `token.nonce === nonce` (native) or `token.nonce === sha256hex(nonce)` (web).
|
|
3305
3234
|
nonce?: string
|
|
3306
|
-
* Name/email from Apple's **first** authorization callback only — Apple never returns
|
|
3307
|
-
* these again, and never inside the token. Forwarded so the server can persist the
|
|
3308
|
-
* display name on first account creation. Treated as untrusted (never used for identity).
|
|
3309
3235
|
userInfo?: { email?: string; name?: string }
|
|
3310
|
-
* A previously-issued trusted-device token (from a prior MFA `challenge/verify`
|
|
3311
|
-
* or `challenge/recovery-code` response). If still valid, the server skips any
|
|
3312
|
-
* step-up challenge for this login. See `SDK_AUTHKIT_MFA_UPDATE.md` §3.
|
|
3313
3236
|
trustedDeviceToken?: string
|
|
3314
3237
|
}
|
|
3315
3238
|
```
|
|
@@ -3616,10 +3539,6 @@ interface AuthKitConfig {
|
|
|
3616
3539
|
supportEmail?: string
|
|
3617
3540
|
redirectUrl?: string
|
|
3618
3541
|
updatedAt?: string
|
|
3619
|
-
* Per-collection security policy. On the public config endpoint only
|
|
3620
|
-
* `passwordPolicy` + `session` are returned (the client renders password
|
|
3621
|
-
* checklists / idle sign-out from them); `lockout` is admin-only and enforced
|
|
3622
|
-
* server-side. See {@link AuthKitSecurityConfig}.
|
|
3623
3542
|
security?: AuthKitSecurityConfig
|
|
3624
3543
|
}
|
|
3625
3544
|
```
|
|
@@ -3981,9 +3900,6 @@ interface ImportClaimSetTagItem {
|
|
|
3981
3900
|
```typescript
|
|
3982
3901
|
interface ImportClaimSetTagsRequest {
|
|
3983
3902
|
tags: ImportClaimSetTagItem[]
|
|
3984
|
-
* Import mode:
|
|
3985
|
-
* - "upsert" (default) merges with existing tags
|
|
3986
|
-
* - "replace" wipes all existing tags first then writes the new set
|
|
3987
3903
|
mode?: 'upsert' | 'replace'
|
|
3988
3904
|
}
|
|
3989
3905
|
```
|
|
@@ -4046,9 +3962,6 @@ interface Collection {
|
|
|
4046
3962
|
allowAutoGenerateClaims?: boolean
|
|
4047
3963
|
defaultAuthKitId: string // default auth kit for this collection, used for auth
|
|
4048
3964
|
admin?: {
|
|
4049
|
-
* Redirect behavior for plain collection-level scans (a short link with
|
|
4050
|
-
* no product/serial code in the path, e.g. `https://.../c/shortId`).
|
|
4051
|
-
* Unset means such links always go to the normal collection page.
|
|
4052
3965
|
redirect?: CollectionRedirectConfig
|
|
4053
3966
|
}
|
|
4054
3967
|
}
|
|
@@ -4470,9 +4383,6 @@ interface SubscriptionsResolveResponse {
|
|
|
4470
4383
|
interface TransactionalSendRequest {
|
|
4471
4384
|
contactId: string
|
|
4472
4385
|
templateId: string
|
|
4473
|
-
* Channel to send on. Defaults to 'preferred', which auto-selects the
|
|
4474
|
-
* contact's best available channel respecting consent, suppression, and
|
|
4475
|
-
* template availability.
|
|
4476
4386
|
channel?: 'email' | 'sms' | 'whatsapp' | 'push' | 'wallet' | 'preferred'
|
|
4477
4387
|
props?: Record<string, unknown>
|
|
4478
4388
|
include?: {
|
|
@@ -4502,15 +4412,6 @@ interface TransactionalSendResponse {
|
|
|
4502
4412
|
```typescript
|
|
4503
4413
|
interface TransactionalSendError {
|
|
4504
4414
|
ok: false
|
|
4505
|
-
* Error code. Known values:
|
|
4506
|
-
* - `transactional.contact_not_found`
|
|
4507
|
-
* - `transactional.template_not_found`
|
|
4508
|
-
* - `transactional.no_channel_available`
|
|
4509
|
-
* - `transactional.email_missing`
|
|
4510
|
-
* - `transactional.phone_missing`
|
|
4511
|
-
* - `transactional.whatsapp_missing`
|
|
4512
|
-
* - `transactional.no_push_methods`
|
|
4513
|
-
* - `transactional.no_wallet_methods`
|
|
4514
4415
|
error: string
|
|
4515
4416
|
}
|
|
4516
4417
|
```
|
|
@@ -4876,8 +4777,6 @@ interface FieldDefinition {
|
|
|
4876
4777
|
accept?: string
|
|
4877
4778
|
clearable?: boolean
|
|
4878
4779
|
disabled?: boolean
|
|
4879
|
-
* Conditional visibility. If absent the field is always shown.
|
|
4880
|
-
* Object form: `{ field: 'someKey', equals: 'someValue' }` — show when `model[field] === equals`.
|
|
4881
4780
|
showIf?: { field: string; equals: unknown }
|
|
4882
4781
|
}
|
|
4883
4782
|
```
|
|
@@ -4888,39 +4787,19 @@ interface ProofTypeDefinition {
|
|
|
4888
4787
|
id: string
|
|
4889
4788
|
name: string
|
|
4890
4789
|
description?: string
|
|
4891
|
-
* Grouping used to organise proof types in the picker.
|
|
4892
|
-
* Examples: 'basic', 'retail', 'ownable', 'consumable', 'attendance',
|
|
4893
|
-
* 'qualification', 'creative', 'memories', 'safety', 'connected',
|
|
4894
|
-
* 'smartdocent', 'tradable'
|
|
4895
4790
|
category?: string
|
|
4896
|
-
* Whether this proof type is shown to users.
|
|
4897
|
-
* Only types with `active === true` are returned to the public API
|
|
4898
|
-
* when the platform admin has filtered by "Only Active".
|
|
4899
4791
|
active?: boolean
|
|
4900
4792
|
group: boolean
|
|
4901
|
-
* The underlying proof mechanisms that products of this type can use.
|
|
4902
|
-
* Stored as `proofTypes` (plural) on the product document.
|
|
4903
4793
|
proofTypes?: ProofMechanism[]
|
|
4904
4794
|
proofType?: ProofMechanism
|
|
4905
|
-
* Field IDs (from the field catalog) shown when creating/editing the product group.
|
|
4906
|
-
* Ordered — rendered in this sequence.
|
|
4907
4795
|
groupFields?: string[]
|
|
4908
|
-
* Field IDs shown when creating/editing an individual proof item within the group.
|
|
4909
|
-
* If absent, falls back to groupFields.
|
|
4910
4796
|
proofFields?: string[]
|
|
4911
|
-
* Column definitions shown in the proof list view.
|
|
4912
|
-
* Keys are field IDs; value true means show the column.
|
|
4913
4797
|
listFields?: Record<string, boolean>
|
|
4914
|
-
* App uniqueNames automatically installed (for free) when this proof type is selected.
|
|
4915
4798
|
freeApps?: string[]
|
|
4916
|
-
* App uniqueNames shown as recommended paid add-ons for this proof type.
|
|
4917
4799
|
apps?: string[]
|
|
4918
4800
|
collection?: string
|
|
4919
4801
|
action?: string
|
|
4920
4802
|
bound?: 'soul'
|
|
4921
|
-
* UI translation overrides for this proof type.
|
|
4922
|
-
* Keys are source English words; values are replacement strings.
|
|
4923
|
-
* Example: `{ "Products": "Works" }`
|
|
4924
4803
|
translations?: Record<string, string>
|
|
4925
4804
|
hideProductTools?: boolean
|
|
4926
4805
|
}
|
|
@@ -5139,9 +5018,6 @@ interface ContactSchemaProperty {
|
|
|
5139
5018
|
description?: string
|
|
5140
5019
|
format?: string
|
|
5141
5020
|
enum?: string[]
|
|
5142
|
-
* Display labels for `enum` values — parallel array.
|
|
5143
|
-
* `enum[i]` is the stored value; `enumNames[i]` is the display label.
|
|
5144
|
-
* When absent, `enum` values are used as labels.
|
|
5145
5021
|
enumNames?: string[]
|
|
5146
5022
|
default?: unknown
|
|
5147
5023
|
minLength?: number
|
|
@@ -5214,8 +5090,6 @@ interface Container {
|
|
|
5214
5090
|
id: string
|
|
5215
5091
|
orgId: string
|
|
5216
5092
|
collectionId: string
|
|
5217
|
-
* Domain label describing what kind of container this is.
|
|
5218
|
-
* Examples: `'pallet'`, `'fridge'`, `'cask'`, `'warehouse'`, `'shipping_container'`
|
|
5219
5093
|
containerType: string
|
|
5220
5094
|
ref?: string
|
|
5221
5095
|
name?: string
|
|
@@ -6034,6 +5908,22 @@ interface ListSecretsQuery {
|
|
|
6034
5908
|
}
|
|
6035
5909
|
```
|
|
6036
5910
|
|
|
5911
|
+
**RecordTypeInfo** (interface)
|
|
5912
|
+
```typescript
|
|
5913
|
+
interface RecordTypeInfo {
|
|
5914
|
+
appId: string
|
|
5915
|
+
recordType: string
|
|
5916
|
+
count: number
|
|
5917
|
+
}
|
|
5918
|
+
```
|
|
5919
|
+
|
|
5920
|
+
**RecordTypesResponse** (interface)
|
|
5921
|
+
```typescript
|
|
5922
|
+
interface RecordTypesResponse {
|
|
5923
|
+
recordTypes: RecordTypeInfo[]
|
|
5924
|
+
}
|
|
5925
|
+
```
|
|
5926
|
+
|
|
6037
5927
|
**FlowDirection** = `'inbound' | 'outbound'`
|
|
6038
5928
|
|
|
6039
5929
|
**FlowStatus** = `'draft' | 'active' | 'paused' | 'error'`
|
|
@@ -6215,20 +6105,13 @@ interface InteractionPermissions {
|
|
|
6215
6105
|
allowedOrigins?: string[]
|
|
6216
6106
|
startAt?: string
|
|
6217
6107
|
endAt?: string
|
|
6218
|
-
* Enforce uniqueness per user: prevent duplicate submissions for this interaction.
|
|
6219
|
-
* If true, optionally use `uniquePerUserWindowSeconds` to scope the window.
|
|
6220
6108
|
uniquePerUser?: boolean
|
|
6221
6109
|
uniquePerUserWindowSeconds?: number
|
|
6222
6110
|
uniqueOutcome?: string
|
|
6223
|
-
* Public summary visibility (counts, aggregates) without auth.
|
|
6224
|
-
* If false, summaries require `allowAuthenticatedSummary` + user auth.
|
|
6225
6111
|
allowPublicSummary?: boolean
|
|
6226
|
-
* Authenticated summary visibility (counts, aggregates) when user is signed in.
|
|
6227
6112
|
allowAuthenticatedSummary?: boolean
|
|
6228
6113
|
allowOwnRead?: boolean
|
|
6229
6114
|
uniquePerAnonId?: boolean
|
|
6230
|
-
* Time window in seconds for `uniquePerAnonId` enforcement.
|
|
6231
|
-
* `0` or omitted means all-time deduplication.
|
|
6232
6115
|
uniquePerAnonIdWindowSeconds?: number
|
|
6233
6116
|
}
|
|
6234
6117
|
```
|
|
@@ -6341,8 +6224,6 @@ interface LoyaltyEffectConfig {
|
|
|
6341
6224
|
```typescript
|
|
6342
6225
|
interface TransactionalEffectConfig {
|
|
6343
6226
|
templateId: string
|
|
6344
|
-
* Channel to use.
|
|
6345
|
-
* Default: 'preferred' — auto-selects the contact's best available channel.
|
|
6346
6227
|
channel?: 'email' | 'sms' | 'push' | 'whatsapp' | 'wallet' | 'preferred'
|
|
6347
6228
|
props?: Record<string, unknown>
|
|
6348
6229
|
include?: {
|
|
@@ -6381,8 +6262,6 @@ interface TagEffectConfig {
|
|
|
6381
6262
|
interface AppRecordEffectConfig {
|
|
6382
6263
|
appId?: string
|
|
6383
6264
|
recordType?: string
|
|
6384
|
-
* Singleton cardinality key. At most one record per recordType+singletonPer will
|
|
6385
|
-
* exist per scope. Common values: 'contact', 'product', 'proof', 'global'
|
|
6386
6265
|
singletonPer?: string
|
|
6387
6266
|
data?: Record<string, unknown>
|
|
6388
6267
|
anchors?: {
|
|
@@ -6878,10 +6757,6 @@ interface LoyaltyEarningRule {
|
|
|
6878
6757
|
schemeId: string
|
|
6879
6758
|
interactionId: string
|
|
6880
6759
|
points: number
|
|
6881
|
-
* Key-value conditions matched against the interaction event before awarding.
|
|
6882
|
-
* Supports top-level event fields (outcome, scope, status, eventType, etc.)
|
|
6883
|
-
* and dot-path into metadata (e.g. `"metadata.tier": "gold"`).
|
|
6884
|
-
* Empty object = always fires for any event on this interaction.
|
|
6885
6760
|
conditions: Record<string, string>
|
|
6886
6761
|
maxPerContact: number | null
|
|
6887
6762
|
cooldownHours: number | null
|
|
@@ -6971,9 +6846,6 @@ interface UpdateLoyaltyEarningRuleBody {
|
|
|
6971
6846
|
interface RecordLoyaltyTransactionBody {
|
|
6972
6847
|
points: number
|
|
6973
6848
|
reason?: string
|
|
6974
|
-
* Optional caller-supplied key scoped to the scheme.
|
|
6975
|
-
* If a transaction with this key already exists the server returns 409.
|
|
6976
|
-
* Use to safely retry without double-crediting points.
|
|
6977
6849
|
idempotencyKey?: string
|
|
6978
6850
|
metadata?: DataBlock
|
|
6979
6851
|
userId?: string
|
|
@@ -6987,31 +6859,9 @@ interface RecordLoyaltyTransactionBody {
|
|
|
6987
6859
|
**ResolveLinkContext** (interface)
|
|
6988
6860
|
```typescript
|
|
6989
6861
|
interface ResolveLinkContext {
|
|
6990
|
-
* True when running inside a SmartLinks container, widget, or iframe.
|
|
6991
|
-
* Defaults to auto-detection via `window.parent !== window`.
|
|
6992
6862
|
embedded?: boolean;
|
|
6993
|
-
* Override for the `postMessage` target window.
|
|
6994
|
-
* Defaults to `window.parent`. Useful in tests and hosts that proxy messages.
|
|
6995
6863
|
postTarget?: Window | null;
|
|
6996
|
-
* Override for the navigation window.
|
|
6997
|
-
* Defaults to `window`. Useful in tests.
|
|
6998
6864
|
win?: Window;
|
|
6999
|
-
* When provided, `resolveLink` automatically fires a `click_link` analytics
|
|
7000
|
-
* event via `SL.analytics.browser.trackLinkClick` immediately before
|
|
7001
|
-
* navigating. Supply at minimum `collectionId`; add `productId`, `proofId`,
|
|
7002
|
-
* or any other `CollectionAnalyticsEvent` fields you want on the event.
|
|
7003
|
-
*
|
|
7004
|
-
* The resolver derives `isExternal`, `destinationAppId`, `linkTitle`, and
|
|
7005
|
-
* `href` from the `LinkTarget` automatically. Fields you supply here take
|
|
7006
|
-
* precedence over the derived values if there is a conflict.
|
|
7007
|
-
*
|
|
7008
|
-
* Called synchronously so the event fires even for external `_blank` links
|
|
7009
|
-
* that unload the page immediately after.
|
|
7010
|
-
*
|
|
7011
|
-
* @example
|
|
7012
|
-
* SL.navigation.resolveLink(link, {
|
|
7013
|
-
* track: { collectionId, productId },
|
|
7014
|
-
* });
|
|
7015
6865
|
track?: LinkTrackingContext;
|
|
7016
6866
|
}
|
|
7017
6867
|
```
|
|
@@ -7677,11 +7527,7 @@ interface ProductWriteInput {
|
|
|
7677
7527
|
label?: string | null
|
|
7678
7528
|
status?: string | null
|
|
7679
7529
|
sortOrder?: number | null
|
|
7680
|
-
* Pass the existing `AssetRef` unchanged to keep the current image,
|
|
7681
|
-
* or a URL string / `{ url }` object to import a new file.
|
|
7682
7530
|
heroImage?: AssetRef | ProductImageUrlInput | string | null
|
|
7683
|
-
* Pass existing `AssetRef` entries unchanged; replace entries with a URL string
|
|
7684
|
-
* or `{ url }` object to import new files.
|
|
7685
7531
|
additionalImages?: Array<AssetRef | ProductImageUrlInput | string>
|
|
7686
7532
|
facets?: ProductFacetMap
|
|
7687
7533
|
tags?: Record<string, boolean>
|
|
@@ -7774,9 +7620,6 @@ interface ProductFieldsConfig {
|
|
|
7774
7620
|
```typescript
|
|
7775
7621
|
interface ProofValues {
|
|
7776
7622
|
[key: string]: JsonValue | Record<string, JsonValue> | Record<string, Record<string, JsonValue>> | undefined
|
|
7777
|
-
* Owner-scoped: read/write by business + current owner; transfers with ownership.
|
|
7778
|
-
* Read exception: while the proof is `claimable`, this bag is also readable by everyone
|
|
7779
|
-
* (so a prospective claimer sees pre-set owner data); it reverts to owner-only once claimed.
|
|
7780
7623
|
owner?: Record<string, JsonValue>
|
|
7781
7624
|
personal?: Record<string, Record<string, JsonValue>>
|
|
7782
7625
|
}
|
|
@@ -7805,9 +7648,6 @@ interface Proof {
|
|
|
7805
7648
|
**ProofWrite** (interface)
|
|
7806
7649
|
```typescript
|
|
7807
7650
|
interface ProofWrite {
|
|
7808
|
-
* Choose the proof's ID (serial, NFC id, etc.). Honoured **on create only** —
|
|
7809
|
-
* the ledger doc becomes `{productId}-{id}`. Omit to auto-generate. Ignored on
|
|
7810
|
-
* update (a proof's ID is immutable).
|
|
7811
7651
|
id?: string
|
|
7812
7652
|
values?: ProofValues
|
|
7813
7653
|
data?: Record<string, JsonValue>
|
|
@@ -7821,15 +7661,11 @@ interface ProofWrite {
|
|
|
7821
7661
|
**ProofCreateRequest** (interface)
|
|
7822
7662
|
```typescript
|
|
7823
7663
|
interface ProofCreateRequest {
|
|
7824
|
-
* The proof to create, by zone (mirrors the proof document). This is the clear,
|
|
7825
|
-
* recommended shape — `create(collectionId, productId, { proof: {...} })`.
|
|
7826
7664
|
proof?: ProofWrite
|
|
7827
7665
|
values?: ProofValues
|
|
7828
7666
|
claimable?: boolean
|
|
7829
7667
|
virtual?: boolean
|
|
7830
7668
|
core?: ProofWrite
|
|
7831
|
-
* @deprecated On the request body this is folded into the **values bag**
|
|
7832
|
-
* (public + owner-writable) — NOT `proof.data`. Use `proof.data`.
|
|
7833
7669
|
data?: Record<string, JsonValue>
|
|
7834
7670
|
admin?: Record<string, JsonValue>
|
|
7835
7671
|
}
|
|
@@ -7876,8 +7712,6 @@ interface ProofGrant {
|
|
|
7876
7712
|
proofId: string
|
|
7877
7713
|
productId?: string | null
|
|
7878
7714
|
scope: GrantScope[]
|
|
7879
|
-
* `contribute` grants only: when true, records/attestations added under this
|
|
7880
|
-
* grant land `pending` (owner-only) until the owner approves them.
|
|
7881
7715
|
moderate?: boolean
|
|
7882
7716
|
audience: GrantAudience
|
|
7883
7717
|
createdBy: string
|
|
@@ -7897,10 +7731,6 @@ interface CreateGrantOptions {
|
|
|
7897
7731
|
scope: GrantScope[]
|
|
7898
7732
|
audience?: GrantAudience
|
|
7899
7733
|
expiresAt?: Date | string
|
|
7900
|
-
* Only meaningful with the `contribute` scope: hold contributions made under
|
|
7901
|
-
* this grant for owner review (they start `pending` and are owner-only until
|
|
7902
|
-
* approved). Ignored for other scopes. Defaults to `false` (contributions live
|
|
7903
|
-
* on write).
|
|
7904
7734
|
moderate?: boolean
|
|
7905
7735
|
}
|
|
7906
7736
|
```
|
|
@@ -7947,20 +7777,12 @@ interface CommsTrigger {
|
|
|
7947
7777
|
**TransferProofOptions** (interface)
|
|
7948
7778
|
```typescript
|
|
7949
7779
|
interface TransferProofOptions {
|
|
7950
|
-
* Comms to send. Roles: `recipient` (the named new owner) and `sender` (the
|
|
7951
|
-
* initiator) for a directed transfer; `owner` for an open release. For an
|
|
7952
|
-
* SMS recipient, set `comms.recipient.channel = 'sms'`.
|
|
7953
7780
|
comms?: CommsTriggerMap
|
|
7954
7781
|
toEmail?: string
|
|
7955
|
-
* Directed: recipient phone in E.164 (e.g. `+14155551234`). Resolves to the same
|
|
7956
|
-
* user they log in as via SMS OTP (created if needed). Pair with an SMS comms
|
|
7957
|
-
* trigger to notify them: `comms.recipient.channel = 'sms'`.
|
|
7958
7782
|
toPhone?: string
|
|
7959
7783
|
toUserId?: string
|
|
7960
7784
|
toName?: string
|
|
7961
7785
|
release?: boolean
|
|
7962
|
-
* @deprecated The legacy fixed transfer email is gone. Put a note in a comms
|
|
7963
|
-
* trigger's props instead, e.g. `comms.recipient.props.note`.
|
|
7964
7786
|
message?: string
|
|
7965
7787
|
notify?: boolean
|
|
7966
7788
|
}
|
|
@@ -8182,8 +8004,6 @@ interface Tag {
|
|
|
8182
8004
|
variantId: string | null // Product variant
|
|
8183
8005
|
batchId: string | null // Production batch
|
|
8184
8006
|
proofId: string | null // Proof / serial number
|
|
8185
|
-
* Polymorphic ref type: `'app_record'`, `'app_case'`, `'app_thread'`, `'container'`, etc.
|
|
8186
|
-
* Always paired with `refId`.
|
|
8187
8007
|
refType: string | null
|
|
8188
8008
|
refId: string | null
|
|
8189
8009
|
metadata: Record<string, any>
|
|
@@ -8204,14 +8024,8 @@ interface TagIndexEntry {
|
|
|
8204
8024
|
```typescript
|
|
8205
8025
|
interface TagEmbedded {
|
|
8206
8026
|
products?: Record<string, any>
|
|
8207
|
-
* `proofId → proof record or virtual serial-number proof`
|
|
8208
|
-
* (when `embed` includes `'proof'`)
|
|
8209
8027
|
proofs?: Record<string, any>
|
|
8210
|
-
* `containerId → Container row`
|
|
8211
|
-
* (for tags where `refType === 'container'`, when `embed` includes `'container'`)
|
|
8212
8028
|
containers?: Record<string, any>
|
|
8213
|
-
* `refId → app_record | app_case | app_thread | container`
|
|
8214
|
-
* (when `embed` includes `'ref'`)
|
|
8215
8029
|
refs?: Record<string, any>
|
|
8216
8030
|
}
|
|
8217
8031
|
```
|
|
@@ -8646,22 +8460,10 @@ interface SmartLinksWidgetProps {
|
|
|
8646
8460
|
name?: string
|
|
8647
8461
|
admin?: boolean
|
|
8648
8462
|
}
|
|
8649
|
-
* Pre-initialised SmartLinks SDK instance provided by the parent platform.
|
|
8650
|
-
* At runtime this is `typeof import('@proveanything/smartlinks')`.
|
|
8651
8463
|
SL: Record<string, unknown>
|
|
8652
|
-
* Navigation callback. Emit a `NavigationRequest` to ask the parent
|
|
8653
|
-
* platform to navigate to another app. A legacy plain-string path is also
|
|
8654
|
-
* accepted for backward compatibility.
|
|
8655
8464
|
onNavigate?: (request: NavigationRequest | string) => void
|
|
8656
8465
|
publicPortalUrl?: string
|
|
8657
|
-
* Authenticity context for the specific item (proof) the URL points at,
|
|
8658
|
-
* resolved via an NFC tap or a serial proof URL. `undefined` for
|
|
8659
|
-
* collection- and product-only URLs, where there's no item to verify.
|
|
8660
|
-
* See docs/item-context.md.
|
|
8661
8466
|
itemContext?: ItemContext
|
|
8662
|
-
* @deprecated Use `itemContext.tag` instead. Kept for one release for
|
|
8663
|
-
* backward compatibility with scanner-aware apps that read raw NFC/SUN
|
|
8664
|
-
* data directly. See docs/item-context.md.
|
|
8665
8467
|
tag?: TagContext
|
|
8666
8468
|
size?: 'compact' | 'standard' | 'large'
|
|
8667
8469
|
lang?: string
|
|
@@ -8793,13 +8595,6 @@ interface UserInfo {
|
|
|
8793
8595
|
interface ProductInfo {
|
|
8794
8596
|
id: string
|
|
8795
8597
|
tags?: Record<string, any>
|
|
8796
|
-
* Facet assignments on this product: maps each facet key to an array of assigned
|
|
8797
|
-
* value slugs/keys. Matches the slim shape returned by the Products API.
|
|
8798
|
-
*
|
|
8799
|
-
* @example
|
|
8800
|
-
* ```ts
|
|
8801
|
-
* { material: ['cotton'], certifications: ['organic', 'recycled'] }
|
|
8802
|
-
* ```
|
|
8803
8598
|
facets?: Record<string, string[]>
|
|
8804
8599
|
}
|
|
8805
8600
|
```
|
|
@@ -8870,10 +8665,6 @@ interface PortalPathParams {
|
|
|
8870
8665
|
proof?: Proof | string
|
|
8871
8666
|
queryParams?: Record<string, string>
|
|
8872
8667
|
pathOnly?: boolean
|
|
8873
|
-
* Override custom-domain detection. When the collection is served from its own
|
|
8874
|
-
* custom domain, a GS1 link resolves `/01/{gtin}` directly (the host identifies
|
|
8875
|
-
* the collection), so the `/gc/{shortId}` prefix is dropped. Left undefined, this
|
|
8876
|
-
* is auto-detected from `collection.redirectUrl` or a non-platform `portalUrl` host.
|
|
8877
8668
|
customDomain?: boolean
|
|
8878
8669
|
}
|
|
8879
8670
|
```
|
|
@@ -8886,21 +8677,12 @@ interface Gs1DigitalLinkParams {
|
|
|
8886
8677
|
gtin?: string
|
|
8887
8678
|
product?: Product
|
|
8888
8679
|
ownGtin?: boolean
|
|
8889
|
-
* A real GS1 **Consumer Product Variant** code (AI 22). Use this when the brand has a
|
|
8890
|
-
* genuine CPV. Takes precedence over `variant` when both are given.
|
|
8891
8680
|
cpv?: string | { id: string }
|
|
8892
|
-
* Internal variant id, emitted as AI 22 (the SmartLinks resolver reads path segment 22
|
|
8893
|
-
* as the variant). Prefer `cpv` when you have a real GS1 CPV code — a non-CPV variant id
|
|
8894
|
-
* in AI 22 is only meaningful to the SmartLinks resolver, not to third-party GS1 resolvers.
|
|
8895
8681
|
variant?: string | { id: string }
|
|
8896
8682
|
lot?: string | { id: string }
|
|
8897
8683
|
batch?: BatchResponse | string
|
|
8898
8684
|
serial?: string | { id?: string; serialNumber?: string }
|
|
8899
8685
|
expiry?: string | Date
|
|
8900
|
-
* Any other GS1 Application Identifiers as `{ [ai]: value }` — e.g.
|
|
8901
|
-
* `{ '11': prodDate, '3103': '000500' }`. Date AIs (11/12/13/15/16/17) accept a
|
|
8902
|
-
* `Date` and are formatted `YYMMDD`; path-qualifier AIs (22/10/21) are placed in
|
|
8903
|
-
* the path in canonical order; everything else becomes a query-string data attribute.
|
|
8904
8686
|
ais?: Record<string, string | number | Date>
|
|
8905
8687
|
linkType?: string
|
|
8906
8688
|
queryParams?: Record<string, string>
|
|
@@ -10241,6 +10023,9 @@ Perform a DELETE request to any API endpoint.
|
|
|
10241
10023
|
**listFlows**(collectionId: string, query: ListFlowsQuery = {}) → `Promise<FlowList>`
|
|
10242
10024
|
List flows in a collection. GET /integrations/flows
|
|
10243
10025
|
|
|
10026
|
+
**listRecordTypes**(collectionId: string) → `Promise<RecordTypesResponse>`
|
|
10027
|
+
Discover the app-record types present in a collection + which app owns each (introspected), for picking a sub-record source/trigger. GET /integrations/record-types
|
|
10028
|
+
|
|
10244
10029
|
**createFlow**(collectionId: string, input: CreateFlowInput) → `Promise<IntegrationFlow>`
|
|
10245
10030
|
Create a flow. POST /integrations/flows
|
|
10246
10031
|
|