@proveanything/smartlinks 1.17.5 → 2.0.0-alpha.1
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 +87 -300
- package/dist/docs/deploying-apps.md +193 -0
- package/dist/docs/server-functions.md +306 -0
- package/dist/openapi.yaml +171 -0
- package/dist/testing/index.d.ts +64 -0
- package/dist/testing/index.js +145 -0
- package/dist/types/appManifest.d.ts +114 -0
- package/dist/types/integrations.d.ts +8 -0
- package/docs/API_SUMMARY.md +87 -300
- package/docs/deploying-apps.md +193 -0
- package/docs/server-functions.md +306 -0
- package/openapi.yaml +171 -0
- package/package.json +7 -2
package/dist/docs/API_SUMMARY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Smartlinks API Summary
|
|
2
2
|
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.0-alpha.1 | Generated: 2026-09-14T11:30:24.015Z
|
|
4
4
|
|
|
5
5
|
This is a concise summary of all available API functions and types.
|
|
6
6
|
|
|
@@ -21,6 +21,8 @@ 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)
|
|
25
|
+
- **[Deploying & Registering an App](deploying-apps.md)** - Publish → build → register: the app CDN layout (smartlinks.app), dev/beta/prod channels, channel-scoped deploy keys, the `POST /apps/:appId/releases` registration endpoint + validation, and how to wire it into your build so a bad manifest fails the deploy
|
|
24
26
|
- **[Realtime](realtime.md)** - Real-time data updates and WebSocket connections
|
|
25
27
|
- **[iframe Responder](iframe-responder.md)** - iframe integration and cross-origin communication
|
|
26
28
|
- **[iframe Streaming Parent Changes](iframe-streaming-parent-changes.md)** - Parent-side changes required to support AI streaming in iframe proxy mode
|
|
@@ -985,9 +987,6 @@ interface AIGenerateImageRequest {
|
|
|
985
987
|
prompt: string
|
|
986
988
|
provider?: string
|
|
987
989
|
model?: string
|
|
988
|
-
* Requested image size.
|
|
989
|
-
* OpenAI supported values: '1024x1024', '1024x1792', '1792x1024'
|
|
990
|
-
* Other providers may support different sizes.
|
|
991
990
|
size?: string
|
|
992
991
|
[key: string]: any
|
|
993
992
|
}
|
|
@@ -1245,14 +1244,6 @@ interface AnalyticsFilterRequest {
|
|
|
1245
1244
|
claimIds?: string[]
|
|
1246
1245
|
isAdmin?: boolean
|
|
1247
1246
|
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
1247
|
sources?: string[]
|
|
1257
1248
|
redirectMode?: string
|
|
1258
1249
|
redirectModes?: string[]
|
|
@@ -1536,24 +1527,12 @@ interface AppliedOverridesSummary {
|
|
|
1536
1527
|
```typescript
|
|
1537
1528
|
interface SystemBlock {
|
|
1538
1529
|
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
1530
|
productMode?: ProductMode | (string & {})
|
|
1544
1531
|
addOnKeys?: string[]
|
|
1545
1532
|
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
1533
|
features?: Record<string, boolean>
|
|
1552
1534
|
meters?: Record<string, MeterEntry>
|
|
1553
1535
|
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
1536
|
accountType?: 'enterprise' | 'standard'
|
|
1558
1537
|
syncedAt?: string
|
|
1559
1538
|
syncedFromSubscriptionId?: string
|
|
@@ -1594,10 +1573,6 @@ interface AppManifestFiles {
|
|
|
1594
1573
|
umd: string;
|
|
1595
1574
|
esm?: string;
|
|
1596
1575
|
};
|
|
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
1576
|
css?: string | null;
|
|
1602
1577
|
}
|
|
1603
1578
|
```
|
|
@@ -1642,23 +1617,8 @@ interface AppContainerComponent {
|
|
|
1642
1617
|
```typescript
|
|
1643
1618
|
interface DeepLinkEntry {
|
|
1644
1619
|
title: string;
|
|
1645
|
-
* Hash route path within the app (optional).
|
|
1646
|
-
* Defaults to "/" if omitted.
|
|
1647
|
-
* @example "/gallery"
|
|
1648
1620
|
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
1621
|
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
1622
|
widget?: true;
|
|
1663
1623
|
}
|
|
1664
1624
|
```
|
|
@@ -1744,13 +1704,68 @@ interface AppManifestExecutor {
|
|
|
1744
1704
|
}
|
|
1745
1705
|
```
|
|
1746
1706
|
|
|
1707
|
+
**AppFunctionTrigger** (interface)
|
|
1708
|
+
```typescript
|
|
1709
|
+
interface AppFunctionTrigger {
|
|
1710
|
+
type: AppFunctionTriggerType;
|
|
1711
|
+
eventTypes?: string[];
|
|
1712
|
+
schedule?: string;
|
|
1713
|
+
route?: string;
|
|
1714
|
+
methods?: Array<'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'>;
|
|
1715
|
+
}
|
|
1716
|
+
```
|
|
1717
|
+
|
|
1718
|
+
**AppFunctionDef** (interface)
|
|
1719
|
+
```typescript
|
|
1720
|
+
interface AppFunctionDef {
|
|
1721
|
+
name: string;
|
|
1722
|
+
description?: string;
|
|
1723
|
+
trigger: AppFunctionTrigger;
|
|
1724
|
+
visibility?: AppFunctionVisibility;
|
|
1725
|
+
authority?: AppFunctionAuthority;
|
|
1726
|
+
elevated?: boolean;
|
|
1727
|
+
capabilities?: string[];
|
|
1728
|
+
apiVersion?: string;
|
|
1729
|
+
handler?: string;
|
|
1730
|
+
}
|
|
1731
|
+
```
|
|
1732
|
+
|
|
1733
|
+
**AppManifestFunctions** (interface)
|
|
1734
|
+
```typescript
|
|
1735
|
+
interface AppManifestFunctions {
|
|
1736
|
+
files: AppManifestFiles;
|
|
1737
|
+
definitions: AppFunctionDef[];
|
|
1738
|
+
}
|
|
1739
|
+
```
|
|
1740
|
+
|
|
1741
|
+
**ServerFunctionCaller** (interface)
|
|
1742
|
+
```typescript
|
|
1743
|
+
interface ServerFunctionCaller {
|
|
1744
|
+
userId: string | null;
|
|
1745
|
+
anonymous: boolean;
|
|
1746
|
+
origin?: string | null;
|
|
1747
|
+
ip?: string | null;
|
|
1748
|
+
via: AppFunctionTriggerType;
|
|
1749
|
+
}
|
|
1750
|
+
```
|
|
1751
|
+
|
|
1752
|
+
**ServerFunctionContext** (interface)
|
|
1753
|
+
```typescript
|
|
1754
|
+
interface ServerFunctionContext {
|
|
1755
|
+
collectionId: string;
|
|
1756
|
+
appId: string;
|
|
1757
|
+
sl: any;
|
|
1758
|
+
secrets: { get(ref: string): Promise<string | null> };
|
|
1759
|
+
caller: ServerFunctionCaller;
|
|
1760
|
+
fetch: typeof fetch;
|
|
1761
|
+
log: (message: string, data?: Record<string, any>) => void;
|
|
1762
|
+
}
|
|
1763
|
+
```
|
|
1764
|
+
|
|
1747
1765
|
**AppAdminConfig** (interface)
|
|
1748
1766
|
```typescript
|
|
1749
1767
|
interface AppAdminConfig {
|
|
1750
1768
|
$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
1769
|
aiGuide?: string;
|
|
1755
1770
|
setup?: {
|
|
1756
1771
|
description?: string;
|
|
@@ -1818,9 +1833,6 @@ interface AppManifest {
|
|
|
1818
1833
|
version: string;
|
|
1819
1834
|
platformRevision?: string;
|
|
1820
1835
|
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
1836
|
seo?: {
|
|
1825
1837
|
strategy?: 'executor' | string;
|
|
1826
1838
|
priority?: number;
|
|
@@ -1832,26 +1844,15 @@ interface AppManifest {
|
|
|
1832
1844
|
};
|
|
1833
1845
|
};
|
|
1834
1846
|
};
|
|
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
1847
|
admin?: string;
|
|
1840
1848
|
widgets?: AppManifestWidgets;
|
|
1841
1849
|
containers?: {
|
|
1842
1850
|
files: AppManifestFiles;
|
|
1843
1851
|
components: AppContainerComponent[];
|
|
1844
1852
|
};
|
|
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
1853
|
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
1854
|
executor?: AppManifestExecutor;
|
|
1855
|
+
functions?: AppManifestFunctions;
|
|
1855
1856
|
[key: string]: any;
|
|
1856
1857
|
}
|
|
1857
1858
|
```
|
|
@@ -1881,6 +1882,12 @@ interface GetCollectionWidgetsOptions {
|
|
|
1881
1882
|
}
|
|
1882
1883
|
```
|
|
1883
1884
|
|
|
1885
|
+
**AppFunctionTriggerType** = `'http' | 'event' | 'cron'`
|
|
1886
|
+
|
|
1887
|
+
**AppFunctionVisibility** = `'admin' | 'public'`
|
|
1888
|
+
|
|
1889
|
+
**AppFunctionAuthority** = `'caller' | 'collection'`
|
|
1890
|
+
|
|
1884
1891
|
### appObjects
|
|
1885
1892
|
|
|
1886
1893
|
**PaginatedResponse<T>** (interface)
|
|
@@ -2090,9 +2097,6 @@ interface CreateThreadInput {
|
|
|
2090
2097
|
data?: Record<string, unknown>
|
|
2091
2098
|
owner?: Record<string, unknown>
|
|
2092
2099
|
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
2100
|
firstReply?: ReplyInput
|
|
2097
2101
|
}
|
|
2098
2102
|
```
|
|
@@ -2124,11 +2128,7 @@ interface ReplyInput {
|
|
|
2124
2128
|
**FacetRuleClause** (interface)
|
|
2125
2129
|
```typescript
|
|
2126
2130
|
interface FacetRuleClause {
|
|
2127
|
-
* Facet key this clause tests, e.g. "brand", "type", "bread-type".
|
|
2128
|
-
* Must reference a defined facet on the collection.
|
|
2129
2131
|
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
2132
|
anyOf: string[]
|
|
2133
2133
|
}
|
|
2134
2134
|
```
|
|
@@ -2136,8 +2136,6 @@ interface FacetRuleClause {
|
|
|
2136
2136
|
**FacetRule** (interface)
|
|
2137
2137
|
```typescript
|
|
2138
2138
|
interface FacetRule {
|
|
2139
|
-
* All clauses must be satisfied (AND semantics).
|
|
2140
|
-
* Must be non-empty; no duplicate facetKey entries.
|
|
2141
2139
|
all: FacetRuleClause[]
|
|
2142
2140
|
}
|
|
2143
2141
|
```
|
|
@@ -2149,10 +2147,6 @@ interface RecordTarget {
|
|
|
2149
2147
|
variantId?: string
|
|
2150
2148
|
proofId?: string
|
|
2151
2149
|
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
2150
|
facets?: Record<string, string[]>
|
|
2157
2151
|
}
|
|
2158
2152
|
```
|
|
@@ -2230,8 +2224,6 @@ interface UpsertRecordInput {
|
|
|
2230
2224
|
```typescript
|
|
2231
2225
|
interface MatchRecordsInput {
|
|
2232
2226
|
target: RecordTarget
|
|
2233
|
-
* 'all' — return all matching records (default)
|
|
2234
|
-
* 'best' — return the highest-specificity record per recordType
|
|
2235
2227
|
strategy?: 'all' | 'best'
|
|
2236
2228
|
recordType?: string
|
|
2237
2229
|
limit?: number
|
|
@@ -2271,11 +2263,7 @@ interface AppRecord {
|
|
|
2271
2263
|
startsAt: string | null
|
|
2272
2264
|
expiresAt: string | null
|
|
2273
2265
|
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
2266
|
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
2267
|
facetRule: FacetRule | null
|
|
2280
2268
|
singletonKey: string | null
|
|
2281
2269
|
data: Record<string, unknown>
|
|
@@ -2307,8 +2295,6 @@ interface CreateRecordInput {
|
|
|
2307
2295
|
scopeId?: string | null
|
|
2308
2296
|
customId?: string | null
|
|
2309
2297
|
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
2298
|
singletonPer?: string
|
|
2313
2299
|
data?: Record<string, unknown>
|
|
2314
2300
|
owner?: Record<string, unknown>
|
|
@@ -2351,9 +2337,6 @@ interface ResolveAllParams {
|
|
|
2351
2337
|
variantId?: string
|
|
2352
2338
|
batchId?: string
|
|
2353
2339
|
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
2340
|
facets?: Record<string, string | string[]>
|
|
2358
2341
|
}
|
|
2359
2342
|
recordType?: string
|
|
@@ -2444,32 +2427,12 @@ interface PublicCreateObjectRule {
|
|
|
2444
2427
|
```typescript
|
|
2445
2428
|
interface PublicCreateBranch {
|
|
2446
2429
|
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
2430
|
enforce?: {
|
|
2451
2431
|
visibility?: 'public' | 'owner' | 'admin'
|
|
2452
2432
|
status?: string
|
|
2453
2433
|
}
|
|
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
2434
|
edit?: {
|
|
2469
2435
|
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
2436
|
windowMinutes?: number
|
|
2474
2437
|
}
|
|
2475
2438
|
}
|
|
@@ -2518,8 +2481,6 @@ interface Asset {
|
|
|
2518
2481
|
proofId: string | null
|
|
2519
2482
|
appId: string | null
|
|
2520
2483
|
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
2484
|
thumbnail: string | null
|
|
2524
2485
|
name: string
|
|
2525
2486
|
cleanName: string | null
|
|
@@ -2543,7 +2504,6 @@ interface Asset {
|
|
|
2543
2504
|
createdAt: string
|
|
2544
2505
|
updatedAt: string
|
|
2545
2506
|
deletedAt: string | null
|
|
2546
|
-
* @deprecated Use `thumbnail` instead. Legacy multi-size thumbnail map.
|
|
2547
2507
|
thumbnails?: {
|
|
2548
2508
|
x100?: string
|
|
2549
2509
|
x200?: string
|
|
@@ -2705,8 +2665,6 @@ interface UploadPolicyConfig {
|
|
|
2705
2665
|
```typescript
|
|
2706
2666
|
interface RequestUploadTokenOptions {
|
|
2707
2667
|
collectionId: string
|
|
2708
|
-
* App ID whose collection-scoped config provides `uploadPolicy`.
|
|
2709
|
-
* Resolved from `sites/{collectionId}/apps/{appId}`.
|
|
2710
2668
|
appId: string
|
|
2711
2669
|
contactId?: string
|
|
2712
2670
|
productId?: string
|
|
@@ -2759,8 +2717,6 @@ interface CreateResumableUploadOptions {
|
|
|
2759
2717
|
metadata?: Record<string, any>
|
|
2760
2718
|
appId?: string
|
|
2761
2719
|
admin?: boolean
|
|
2762
|
-
* Upload token id (from {@link requestUploadToken}) for public/unauthenticated
|
|
2763
|
-
* uploads. When provided, the public resumable route is used.
|
|
2764
2720
|
token?: string
|
|
2765
2721
|
}
|
|
2766
2722
|
```
|
|
@@ -2836,14 +2792,7 @@ interface Attestation {
|
|
|
2836
2792
|
unit?: string
|
|
2837
2793
|
source?: string
|
|
2838
2794
|
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
2795
|
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
2796
|
moderationStatus?: AttestationModerationStatus
|
|
2848
2797
|
metadata?: Record<string, any>
|
|
2849
2798
|
contentHash: string
|
|
@@ -2910,8 +2859,6 @@ interface OwnerAttestationInput {
|
|
|
2910
2859
|
unit?: string
|
|
2911
2860
|
source?: string
|
|
2912
2861
|
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
2862
|
guestName?: string
|
|
2916
2863
|
}
|
|
2917
2864
|
```
|
|
@@ -3022,9 +2969,6 @@ interface ListAttestationsParams {
|
|
|
3022
2969
|
subjectType: AttestationSubjectType
|
|
3023
2970
|
subjectId: string
|
|
3024
2971
|
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
2972
|
moderationStatus?: AttestationModerationStatus
|
|
3029
2973
|
recordedAfter?: string
|
|
3030
2974
|
recordedBefore?: string
|
|
@@ -3259,20 +3203,9 @@ interface AuthLoginResponse {
|
|
|
3259
3203
|
requiresEmailVerification?: boolean // True if email verification is required but not yet completed
|
|
3260
3204
|
emailVerificationDeadline?: number // Unix timestamp - for 'immediate' mode grace period deadline
|
|
3261
3205
|
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
3206
|
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
3207
|
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
3208
|
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
3209
|
refreshTokenExpiresAt?: number
|
|
3277
3210
|
}
|
|
3278
3211
|
```
|
|
@@ -3300,16 +3233,8 @@ interface LogoutResponse {
|
|
|
3300
3233
|
```typescript
|
|
3301
3234
|
interface AppleLoginOptions {
|
|
3302
3235
|
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
3236
|
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
3237
|
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
3238
|
trustedDeviceToken?: string
|
|
3314
3239
|
}
|
|
3315
3240
|
```
|
|
@@ -3616,10 +3541,6 @@ interface AuthKitConfig {
|
|
|
3616
3541
|
supportEmail?: string
|
|
3617
3542
|
redirectUrl?: string
|
|
3618
3543
|
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
3544
|
security?: AuthKitSecurityConfig
|
|
3624
3545
|
}
|
|
3625
3546
|
```
|
|
@@ -3981,9 +3902,6 @@ interface ImportClaimSetTagItem {
|
|
|
3981
3902
|
```typescript
|
|
3982
3903
|
interface ImportClaimSetTagsRequest {
|
|
3983
3904
|
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
3905
|
mode?: 'upsert' | 'replace'
|
|
3988
3906
|
}
|
|
3989
3907
|
```
|
|
@@ -4046,9 +3964,6 @@ interface Collection {
|
|
|
4046
3964
|
allowAutoGenerateClaims?: boolean
|
|
4047
3965
|
defaultAuthKitId: string // default auth kit for this collection, used for auth
|
|
4048
3966
|
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
3967
|
redirect?: CollectionRedirectConfig
|
|
4053
3968
|
}
|
|
4054
3969
|
}
|
|
@@ -4470,9 +4385,6 @@ interface SubscriptionsResolveResponse {
|
|
|
4470
4385
|
interface TransactionalSendRequest {
|
|
4471
4386
|
contactId: string
|
|
4472
4387
|
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
4388
|
channel?: 'email' | 'sms' | 'whatsapp' | 'push' | 'wallet' | 'preferred'
|
|
4477
4389
|
props?: Record<string, unknown>
|
|
4478
4390
|
include?: {
|
|
@@ -4502,15 +4414,6 @@ interface TransactionalSendResponse {
|
|
|
4502
4414
|
```typescript
|
|
4503
4415
|
interface TransactionalSendError {
|
|
4504
4416
|
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
4417
|
error: string
|
|
4515
4418
|
}
|
|
4516
4419
|
```
|
|
@@ -4876,8 +4779,6 @@ interface FieldDefinition {
|
|
|
4876
4779
|
accept?: string
|
|
4877
4780
|
clearable?: boolean
|
|
4878
4781
|
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
4782
|
showIf?: { field: string; equals: unknown }
|
|
4882
4783
|
}
|
|
4883
4784
|
```
|
|
@@ -4888,39 +4789,19 @@ interface ProofTypeDefinition {
|
|
|
4888
4789
|
id: string
|
|
4889
4790
|
name: string
|
|
4890
4791
|
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
4792
|
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
4793
|
active?: boolean
|
|
4900
4794
|
group: boolean
|
|
4901
|
-
* The underlying proof mechanisms that products of this type can use.
|
|
4902
|
-
* Stored as `proofTypes` (plural) on the product document.
|
|
4903
4795
|
proofTypes?: ProofMechanism[]
|
|
4904
4796
|
proofType?: ProofMechanism
|
|
4905
|
-
* Field IDs (from the field catalog) shown when creating/editing the product group.
|
|
4906
|
-
* Ordered — rendered in this sequence.
|
|
4907
4797
|
groupFields?: string[]
|
|
4908
|
-
* Field IDs shown when creating/editing an individual proof item within the group.
|
|
4909
|
-
* If absent, falls back to groupFields.
|
|
4910
4798
|
proofFields?: string[]
|
|
4911
|
-
* Column definitions shown in the proof list view.
|
|
4912
|
-
* Keys are field IDs; value true means show the column.
|
|
4913
4799
|
listFields?: Record<string, boolean>
|
|
4914
|
-
* App uniqueNames automatically installed (for free) when this proof type is selected.
|
|
4915
4800
|
freeApps?: string[]
|
|
4916
|
-
* App uniqueNames shown as recommended paid add-ons for this proof type.
|
|
4917
4801
|
apps?: string[]
|
|
4918
4802
|
collection?: string
|
|
4919
4803
|
action?: string
|
|
4920
4804
|
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
4805
|
translations?: Record<string, string>
|
|
4925
4806
|
hideProductTools?: boolean
|
|
4926
4807
|
}
|
|
@@ -5139,9 +5020,6 @@ interface ContactSchemaProperty {
|
|
|
5139
5020
|
description?: string
|
|
5140
5021
|
format?: string
|
|
5141
5022
|
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
5023
|
enumNames?: string[]
|
|
5146
5024
|
default?: unknown
|
|
5147
5025
|
minLength?: number
|
|
@@ -5214,8 +5092,6 @@ interface Container {
|
|
|
5214
5092
|
id: string
|
|
5215
5093
|
orgId: string
|
|
5216
5094
|
collectionId: string
|
|
5217
|
-
* Domain label describing what kind of container this is.
|
|
5218
|
-
* Examples: `'pallet'`, `'fridge'`, `'cask'`, `'warehouse'`, `'shipping_container'`
|
|
5219
5095
|
containerType: string
|
|
5220
5096
|
ref?: string
|
|
5221
5097
|
name?: string
|
|
@@ -6034,6 +5910,22 @@ interface ListSecretsQuery {
|
|
|
6034
5910
|
}
|
|
6035
5911
|
```
|
|
6036
5912
|
|
|
5913
|
+
**RecordTypeInfo** (interface)
|
|
5914
|
+
```typescript
|
|
5915
|
+
interface RecordTypeInfo {
|
|
5916
|
+
appId: string
|
|
5917
|
+
recordType: string
|
|
5918
|
+
count: number
|
|
5919
|
+
}
|
|
5920
|
+
```
|
|
5921
|
+
|
|
5922
|
+
**RecordTypesResponse** (interface)
|
|
5923
|
+
```typescript
|
|
5924
|
+
interface RecordTypesResponse {
|
|
5925
|
+
recordTypes: RecordTypeInfo[]
|
|
5926
|
+
}
|
|
5927
|
+
```
|
|
5928
|
+
|
|
6037
5929
|
**FlowDirection** = `'inbound' | 'outbound'`
|
|
6038
5930
|
|
|
6039
5931
|
**FlowStatus** = `'draft' | 'active' | 'paused' | 'error'`
|
|
@@ -6215,20 +6107,13 @@ interface InteractionPermissions {
|
|
|
6215
6107
|
allowedOrigins?: string[]
|
|
6216
6108
|
startAt?: string
|
|
6217
6109
|
endAt?: string
|
|
6218
|
-
* Enforce uniqueness per user: prevent duplicate submissions for this interaction.
|
|
6219
|
-
* If true, optionally use `uniquePerUserWindowSeconds` to scope the window.
|
|
6220
6110
|
uniquePerUser?: boolean
|
|
6221
6111
|
uniquePerUserWindowSeconds?: number
|
|
6222
6112
|
uniqueOutcome?: string
|
|
6223
|
-
* Public summary visibility (counts, aggregates) without auth.
|
|
6224
|
-
* If false, summaries require `allowAuthenticatedSummary` + user auth.
|
|
6225
6113
|
allowPublicSummary?: boolean
|
|
6226
|
-
* Authenticated summary visibility (counts, aggregates) when user is signed in.
|
|
6227
6114
|
allowAuthenticatedSummary?: boolean
|
|
6228
6115
|
allowOwnRead?: boolean
|
|
6229
6116
|
uniquePerAnonId?: boolean
|
|
6230
|
-
* Time window in seconds for `uniquePerAnonId` enforcement.
|
|
6231
|
-
* `0` or omitted means all-time deduplication.
|
|
6232
6117
|
uniquePerAnonIdWindowSeconds?: number
|
|
6233
6118
|
}
|
|
6234
6119
|
```
|
|
@@ -6341,8 +6226,6 @@ interface LoyaltyEffectConfig {
|
|
|
6341
6226
|
```typescript
|
|
6342
6227
|
interface TransactionalEffectConfig {
|
|
6343
6228
|
templateId: string
|
|
6344
|
-
* Channel to use.
|
|
6345
|
-
* Default: 'preferred' — auto-selects the contact's best available channel.
|
|
6346
6229
|
channel?: 'email' | 'sms' | 'push' | 'whatsapp' | 'wallet' | 'preferred'
|
|
6347
6230
|
props?: Record<string, unknown>
|
|
6348
6231
|
include?: {
|
|
@@ -6381,8 +6264,6 @@ interface TagEffectConfig {
|
|
|
6381
6264
|
interface AppRecordEffectConfig {
|
|
6382
6265
|
appId?: string
|
|
6383
6266
|
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
6267
|
singletonPer?: string
|
|
6387
6268
|
data?: Record<string, unknown>
|
|
6388
6269
|
anchors?: {
|
|
@@ -6878,10 +6759,6 @@ interface LoyaltyEarningRule {
|
|
|
6878
6759
|
schemeId: string
|
|
6879
6760
|
interactionId: string
|
|
6880
6761
|
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
6762
|
conditions: Record<string, string>
|
|
6886
6763
|
maxPerContact: number | null
|
|
6887
6764
|
cooldownHours: number | null
|
|
@@ -6971,9 +6848,6 @@ interface UpdateLoyaltyEarningRuleBody {
|
|
|
6971
6848
|
interface RecordLoyaltyTransactionBody {
|
|
6972
6849
|
points: number
|
|
6973
6850
|
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
6851
|
idempotencyKey?: string
|
|
6978
6852
|
metadata?: DataBlock
|
|
6979
6853
|
userId?: string
|
|
@@ -6987,31 +6861,9 @@ interface RecordLoyaltyTransactionBody {
|
|
|
6987
6861
|
**ResolveLinkContext** (interface)
|
|
6988
6862
|
```typescript
|
|
6989
6863
|
interface ResolveLinkContext {
|
|
6990
|
-
* True when running inside a SmartLinks container, widget, or iframe.
|
|
6991
|
-
* Defaults to auto-detection via `window.parent !== window`.
|
|
6992
6864
|
embedded?: boolean;
|
|
6993
|
-
* Override for the `postMessage` target window.
|
|
6994
|
-
* Defaults to `window.parent`. Useful in tests and hosts that proxy messages.
|
|
6995
6865
|
postTarget?: Window | null;
|
|
6996
|
-
* Override for the navigation window.
|
|
6997
|
-
* Defaults to `window`. Useful in tests.
|
|
6998
6866
|
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
6867
|
track?: LinkTrackingContext;
|
|
7016
6868
|
}
|
|
7017
6869
|
```
|
|
@@ -7677,11 +7529,7 @@ interface ProductWriteInput {
|
|
|
7677
7529
|
label?: string | null
|
|
7678
7530
|
status?: string | null
|
|
7679
7531
|
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
7532
|
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
7533
|
additionalImages?: Array<AssetRef | ProductImageUrlInput | string>
|
|
7686
7534
|
facets?: ProductFacetMap
|
|
7687
7535
|
tags?: Record<string, boolean>
|
|
@@ -7774,9 +7622,6 @@ interface ProductFieldsConfig {
|
|
|
7774
7622
|
```typescript
|
|
7775
7623
|
interface ProofValues {
|
|
7776
7624
|
[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
7625
|
owner?: Record<string, JsonValue>
|
|
7781
7626
|
personal?: Record<string, Record<string, JsonValue>>
|
|
7782
7627
|
}
|
|
@@ -7805,9 +7650,6 @@ interface Proof {
|
|
|
7805
7650
|
**ProofWrite** (interface)
|
|
7806
7651
|
```typescript
|
|
7807
7652
|
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
7653
|
id?: string
|
|
7812
7654
|
values?: ProofValues
|
|
7813
7655
|
data?: Record<string, JsonValue>
|
|
@@ -7821,15 +7663,11 @@ interface ProofWrite {
|
|
|
7821
7663
|
**ProofCreateRequest** (interface)
|
|
7822
7664
|
```typescript
|
|
7823
7665
|
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
7666
|
proof?: ProofWrite
|
|
7827
7667
|
values?: ProofValues
|
|
7828
7668
|
claimable?: boolean
|
|
7829
7669
|
virtual?: boolean
|
|
7830
7670
|
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
7671
|
data?: Record<string, JsonValue>
|
|
7834
7672
|
admin?: Record<string, JsonValue>
|
|
7835
7673
|
}
|
|
@@ -7876,8 +7714,6 @@ interface ProofGrant {
|
|
|
7876
7714
|
proofId: string
|
|
7877
7715
|
productId?: string | null
|
|
7878
7716
|
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
7717
|
moderate?: boolean
|
|
7882
7718
|
audience: GrantAudience
|
|
7883
7719
|
createdBy: string
|
|
@@ -7897,10 +7733,6 @@ interface CreateGrantOptions {
|
|
|
7897
7733
|
scope: GrantScope[]
|
|
7898
7734
|
audience?: GrantAudience
|
|
7899
7735
|
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
7736
|
moderate?: boolean
|
|
7905
7737
|
}
|
|
7906
7738
|
```
|
|
@@ -7947,20 +7779,12 @@ interface CommsTrigger {
|
|
|
7947
7779
|
**TransferProofOptions** (interface)
|
|
7948
7780
|
```typescript
|
|
7949
7781
|
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
7782
|
comms?: CommsTriggerMap
|
|
7954
7783
|
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
7784
|
toPhone?: string
|
|
7959
7785
|
toUserId?: string
|
|
7960
7786
|
toName?: string
|
|
7961
7787
|
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
7788
|
message?: string
|
|
7965
7789
|
notify?: boolean
|
|
7966
7790
|
}
|
|
@@ -8182,8 +8006,6 @@ interface Tag {
|
|
|
8182
8006
|
variantId: string | null // Product variant
|
|
8183
8007
|
batchId: string | null // Production batch
|
|
8184
8008
|
proofId: string | null // Proof / serial number
|
|
8185
|
-
* Polymorphic ref type: `'app_record'`, `'app_case'`, `'app_thread'`, `'container'`, etc.
|
|
8186
|
-
* Always paired with `refId`.
|
|
8187
8009
|
refType: string | null
|
|
8188
8010
|
refId: string | null
|
|
8189
8011
|
metadata: Record<string, any>
|
|
@@ -8204,14 +8026,8 @@ interface TagIndexEntry {
|
|
|
8204
8026
|
```typescript
|
|
8205
8027
|
interface TagEmbedded {
|
|
8206
8028
|
products?: Record<string, any>
|
|
8207
|
-
* `proofId → proof record or virtual serial-number proof`
|
|
8208
|
-
* (when `embed` includes `'proof'`)
|
|
8209
8029
|
proofs?: Record<string, any>
|
|
8210
|
-
* `containerId → Container row`
|
|
8211
|
-
* (for tags where `refType === 'container'`, when `embed` includes `'container'`)
|
|
8212
8030
|
containers?: Record<string, any>
|
|
8213
|
-
* `refId → app_record | app_case | app_thread | container`
|
|
8214
|
-
* (when `embed` includes `'ref'`)
|
|
8215
8031
|
refs?: Record<string, any>
|
|
8216
8032
|
}
|
|
8217
8033
|
```
|
|
@@ -8646,22 +8462,10 @@ interface SmartLinksWidgetProps {
|
|
|
8646
8462
|
name?: string
|
|
8647
8463
|
admin?: boolean
|
|
8648
8464
|
}
|
|
8649
|
-
* Pre-initialised SmartLinks SDK instance provided by the parent platform.
|
|
8650
|
-
* At runtime this is `typeof import('@proveanything/smartlinks')`.
|
|
8651
8465
|
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
8466
|
onNavigate?: (request: NavigationRequest | string) => void
|
|
8656
8467
|
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
8468
|
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
8469
|
tag?: TagContext
|
|
8666
8470
|
size?: 'compact' | 'standard' | 'large'
|
|
8667
8471
|
lang?: string
|
|
@@ -8793,13 +8597,6 @@ interface UserInfo {
|
|
|
8793
8597
|
interface ProductInfo {
|
|
8794
8598
|
id: string
|
|
8795
8599
|
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
8600
|
facets?: Record<string, string[]>
|
|
8804
8601
|
}
|
|
8805
8602
|
```
|
|
@@ -8870,10 +8667,6 @@ interface PortalPathParams {
|
|
|
8870
8667
|
proof?: Proof | string
|
|
8871
8668
|
queryParams?: Record<string, string>
|
|
8872
8669
|
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
8670
|
customDomain?: boolean
|
|
8878
8671
|
}
|
|
8879
8672
|
```
|
|
@@ -8886,21 +8679,12 @@ interface Gs1DigitalLinkParams {
|
|
|
8886
8679
|
gtin?: string
|
|
8887
8680
|
product?: Product
|
|
8888
8681
|
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
8682
|
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
8683
|
variant?: string | { id: string }
|
|
8896
8684
|
lot?: string | { id: string }
|
|
8897
8685
|
batch?: BatchResponse | string
|
|
8898
8686
|
serial?: string | { id?: string; serialNumber?: string }
|
|
8899
8687
|
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
8688
|
ais?: Record<string, string | number | Date>
|
|
8905
8689
|
linkType?: string
|
|
8906
8690
|
queryParams?: Record<string, string>
|
|
@@ -10241,6 +10025,9 @@ Perform a DELETE request to any API endpoint.
|
|
|
10241
10025
|
**listFlows**(collectionId: string, query: ListFlowsQuery = {}) → `Promise<FlowList>`
|
|
10242
10026
|
List flows in a collection. GET /integrations/flows
|
|
10243
10027
|
|
|
10028
|
+
**listRecordTypes**(collectionId: string) → `Promise<RecordTypesResponse>`
|
|
10029
|
+
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
|
|
10030
|
+
|
|
10244
10031
|
**createFlow**(collectionId: string, input: CreateFlowInput) → `Promise<IntegrationFlow>`
|
|
10245
10032
|
Create a flow. POST /integrations/flows
|
|
10246
10033
|
|