@proveanything/smartlinks 1.3.1 → 1.3.3
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/README.md +13 -4
- package/dist/api/contact.d.ts +12 -0
- package/dist/api/contact.js +12 -1
- package/dist/api/index.d.ts +2 -0
- package/dist/api/index.js +2 -0
- package/dist/api/order.d.ts +189 -0
- package/dist/api/order.js +240 -0
- package/dist/api/tags.d.ts +194 -0
- package/dist/api/tags.js +258 -0
- package/dist/docs/API_SUMMARY.md +587 -221
- package/dist/i18n.md +287 -0
- package/dist/liquid-templates.md +484 -0
- package/dist/realtime.md +764 -0
- package/dist/theme-defaults.md +100 -0
- package/dist/theme.system.md +338 -0
- package/dist/types/contact.d.ts +32 -1
- package/dist/types/contact.js +35 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.js +2 -0
- package/dist/types/order.d.ts +137 -0
- package/dist/types/order.js +7 -0
- package/dist/types/tags.d.ts +172 -0
- package/dist/types/tags.js +7 -0
- package/dist/widgets.md +510 -0
- package/docs/API_SUMMARY.md +3596 -0
- package/docs/i18n.md +287 -0
- package/docs/liquid-templates.md +484 -0
- package/docs/realtime.md +764 -0
- package/docs/theme-defaults.md +100 -0
- package/docs/theme.system.md +338 -0
- package/docs/widgets.md +510 -0
- package/package.json +2 -1
package/dist/docs/API_SUMMARY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Smartlinks API Summary
|
|
2
2
|
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.3 | Generated: 2026-02-02T14:12:19.424Z
|
|
4
4
|
|
|
5
5
|
This is a concise summary of all available API functions and types.
|
|
6
6
|
|
|
@@ -51,7 +51,9 @@ The Smartlinks SDK is organized into the following namespaces:
|
|
|
51
51
|
- **jobs** - Functions for jobs operations
|
|
52
52
|
- **journeysAnalytics** - Functions for journeysAnalytics operations
|
|
53
53
|
- **location** - Functions for location operations
|
|
54
|
+
- **order** - Functions for order operations
|
|
54
55
|
- **realtime** - Functions for realtime operations
|
|
56
|
+
- **tags** - Functions for tags operations
|
|
55
57
|
- **template** - Functions for template operations
|
|
56
58
|
|
|
57
59
|
## HTTP Utilities
|
|
@@ -1386,6 +1388,15 @@ interface CommsState {
|
|
|
1386
1388
|
}
|
|
1387
1389
|
```
|
|
1388
1390
|
|
|
1391
|
+
**FieldCondition** (interface)
|
|
1392
|
+
```typescript
|
|
1393
|
+
interface FieldCondition {
|
|
1394
|
+
dependsOn: string // key of the field to check (not path)
|
|
1395
|
+
operator: ConditionOperator
|
|
1396
|
+
value?: string | string[] // required for equals/notEquals/contains/notContains
|
|
1397
|
+
}
|
|
1398
|
+
```
|
|
1399
|
+
|
|
1389
1400
|
**BaseField** (interface)
|
|
1390
1401
|
```typescript
|
|
1391
1402
|
interface BaseField {
|
|
@@ -1429,7 +1440,9 @@ interface ContactSchema {
|
|
|
1429
1440
|
|
|
1430
1441
|
**SubjectType** = `'product' | 'proof' | 'batch'`
|
|
1431
1442
|
|
|
1432
|
-
**
|
|
1443
|
+
**ConditionOperator** = ``
|
|
1444
|
+
|
|
1445
|
+
**FieldWidget** = `'text' | 'email' | 'tel' | 'select' | 'multiselect' | 'checkbox' | 'number' | 'date' | 'url'`
|
|
1433
1446
|
|
|
1434
1447
|
**FieldType** = ``
|
|
1435
1448
|
|
|
@@ -1943,6 +1956,124 @@ interface NfcClaimTagRequest {
|
|
|
1943
1956
|
}
|
|
1944
1957
|
```
|
|
1945
1958
|
|
|
1959
|
+
### order
|
|
1960
|
+
|
|
1961
|
+
**OrderItem** (interface)
|
|
1962
|
+
```typescript
|
|
1963
|
+
interface OrderItem {
|
|
1964
|
+
id: string // UUID
|
|
1965
|
+
orderId: string // Parent order ID
|
|
1966
|
+
itemType: 'tag' | 'proof' | 'serial' // Type of item
|
|
1967
|
+
itemId: string // The tag ID, proof ID, or serial number
|
|
1968
|
+
metadata: Record<string, any> // Item-specific metadata
|
|
1969
|
+
createdAt: string // ISO 8601 timestamp
|
|
1970
|
+
}
|
|
1971
|
+
```
|
|
1972
|
+
|
|
1973
|
+
**Order** (interface)
|
|
1974
|
+
```typescript
|
|
1975
|
+
interface Order {
|
|
1976
|
+
id: string // UUID
|
|
1977
|
+
orgId: string // Organization ID
|
|
1978
|
+
collectionId: string // Collection ID
|
|
1979
|
+
orderRef?: string // Customer's own order reference/ID (e.g., "ORD-12345")
|
|
1980
|
+
customerId?: string // Customer's own customer ID (can map to CRM/contacts)
|
|
1981
|
+
status: string // e.g., "pending", "processing", "shipped", "completed"
|
|
1982
|
+
itemCount: number // Cached count of items (maintained automatically)
|
|
1983
|
+
metadata: Record<string, any> // Flexible additional data
|
|
1984
|
+
items: OrderItem[] // Array of items in this order
|
|
1985
|
+
createdAt: string // ISO 8601 timestamp
|
|
1986
|
+
updatedAt: string // ISO 8601 timestamp
|
|
1987
|
+
}
|
|
1988
|
+
```
|
|
1989
|
+
|
|
1990
|
+
**CreateOrderRequest** (interface)
|
|
1991
|
+
```typescript
|
|
1992
|
+
interface CreateOrderRequest {
|
|
1993
|
+
items: Array<{
|
|
1994
|
+
itemType: 'tag' | 'proof' | 'serial' // Required: Type of item
|
|
1995
|
+
itemId: string // Required: Item identifier
|
|
1996
|
+
metadata?: Record<string, any> // Optional: Item-specific data
|
|
1997
|
+
}>
|
|
1998
|
+
orderRef?: string // Optional: Your own order reference/ID
|
|
1999
|
+
customerId?: string // Optional: Your customer ID
|
|
2000
|
+
status?: string // Optional: Order status (default: "pending")
|
|
2001
|
+
metadata?: Record<string, any> // Optional: Order-level metadata
|
|
2002
|
+
}
|
|
2003
|
+
```
|
|
2004
|
+
|
|
2005
|
+
**UpdateOrderRequest** (interface)
|
|
2006
|
+
```typescript
|
|
2007
|
+
interface UpdateOrderRequest {
|
|
2008
|
+
orderRef?: string // Optional: Update order reference
|
|
2009
|
+
customerId?: string // Optional: Update customer ID
|
|
2010
|
+
status?: string // Optional: Update status
|
|
2011
|
+
metadata?: Record<string, any> // Optional: Merge with existing metadata
|
|
2012
|
+
}
|
|
2013
|
+
```
|
|
2014
|
+
|
|
2015
|
+
**DeleteOrderResponse** (interface)
|
|
2016
|
+
```typescript
|
|
2017
|
+
interface DeleteOrderResponse {
|
|
2018
|
+
success: boolean
|
|
2019
|
+
}
|
|
2020
|
+
```
|
|
2021
|
+
|
|
2022
|
+
**ListOrdersRequest** (interface)
|
|
2023
|
+
```typescript
|
|
2024
|
+
interface ListOrdersRequest {
|
|
2025
|
+
limit?: number // Optional: Max results (default: 100)
|
|
2026
|
+
offset?: number // Optional: Pagination offset (default: 0)
|
|
2027
|
+
status?: string // Optional: Filter by status
|
|
2028
|
+
orderRef?: string // Optional: Filter by order reference
|
|
2029
|
+
customerId?: string // Optional: Filter by customer ID
|
|
2030
|
+
}
|
|
2031
|
+
```
|
|
2032
|
+
|
|
2033
|
+
**ListOrdersResponse** (interface)
|
|
2034
|
+
```typescript
|
|
2035
|
+
interface ListOrdersResponse {
|
|
2036
|
+
orders: Order[]
|
|
2037
|
+
limit: number
|
|
2038
|
+
offset: number
|
|
2039
|
+
}
|
|
2040
|
+
```
|
|
2041
|
+
|
|
2042
|
+
**AddItemsRequest** (interface)
|
|
2043
|
+
```typescript
|
|
2044
|
+
interface AddItemsRequest {
|
|
2045
|
+
items: Array<{
|
|
2046
|
+
itemType: 'tag' | 'proof' | 'serial' // Required: Type of item
|
|
2047
|
+
itemId: string // Required: Item identifier
|
|
2048
|
+
metadata?: Record<string, any> // Optional: Item-specific data
|
|
2049
|
+
}>
|
|
2050
|
+
}
|
|
2051
|
+
```
|
|
2052
|
+
|
|
2053
|
+
**RemoveItemsRequest** (interface)
|
|
2054
|
+
```typescript
|
|
2055
|
+
interface RemoveItemsRequest {
|
|
2056
|
+
itemIds: string[] // Array of OrderItem IDs to remove
|
|
2057
|
+
}
|
|
2058
|
+
```
|
|
2059
|
+
|
|
2060
|
+
**LookupOrdersRequest** (interface)
|
|
2061
|
+
```typescript
|
|
2062
|
+
interface LookupOrdersRequest {
|
|
2063
|
+
items: Array<{
|
|
2064
|
+
itemType: 'tag' | 'proof' | 'serial' // Required: Type of item
|
|
2065
|
+
itemId: string // Required: Item identifier
|
|
2066
|
+
}>
|
|
2067
|
+
}
|
|
2068
|
+
```
|
|
2069
|
+
|
|
2070
|
+
**LookupOrdersResponse** (interface)
|
|
2071
|
+
```typescript
|
|
2072
|
+
interface LookupOrdersResponse {
|
|
2073
|
+
orders: Order[] // All orders containing any of the specified items
|
|
2074
|
+
}
|
|
2075
|
+
```
|
|
2076
|
+
|
|
1946
2077
|
### product
|
|
1947
2078
|
|
|
1948
2079
|
**Product** (interface)
|
|
@@ -2108,6 +2239,164 @@ interface SegmentRecipientsResponse {
|
|
|
2108
2239
|
}
|
|
2109
2240
|
```
|
|
2110
2241
|
|
|
2242
|
+
### tags
|
|
2243
|
+
|
|
2244
|
+
**Tag** (interface)
|
|
2245
|
+
```typescript
|
|
2246
|
+
interface Tag {
|
|
2247
|
+
id: string // UUID
|
|
2248
|
+
orgId: string // Organization ID
|
|
2249
|
+
tagId: string // Unique tag identifier (globally unique)
|
|
2250
|
+
collectionId: string // Collection ID
|
|
2251
|
+
productId: string // Product ID
|
|
2252
|
+
variantId?: string | null // Optional: Variant ID
|
|
2253
|
+
batchId?: string | null // Optional: Batch ID
|
|
2254
|
+
proofId: string // Proof ID (serial number or explicit)
|
|
2255
|
+
metadata: Record<string, any> // Additional metadata (e.g., serialIndex)
|
|
2256
|
+
createdAt: string // ISO 8601 timestamp
|
|
2257
|
+
updatedAt: string // ISO 8601 timestamp
|
|
2258
|
+
}
|
|
2259
|
+
```
|
|
2260
|
+
|
|
2261
|
+
**CreateTagRequest** (interface)
|
|
2262
|
+
```typescript
|
|
2263
|
+
interface CreateTagRequest {
|
|
2264
|
+
tagId: string // Required: Unique tag identifier
|
|
2265
|
+
productId: string // Required: Product ID
|
|
2266
|
+
variantId?: string // Optional: Variant ID
|
|
2267
|
+
batchId?: string // Optional: Batch ID
|
|
2268
|
+
proofId?: string // Optional: Explicit proof ID (if omitted, auto-generates serial)
|
|
2269
|
+
useSerialNumber?: boolean // Optional: Explicitly request serial number generation
|
|
2270
|
+
metadata?: Record<string, any> // Optional: Additional metadata
|
|
2271
|
+
force?: boolean // Optional: Overwrite if tag exists in same collection (default: false)
|
|
2272
|
+
}
|
|
2273
|
+
```
|
|
2274
|
+
|
|
2275
|
+
**CreateTagsBatchRequest** (interface)
|
|
2276
|
+
```typescript
|
|
2277
|
+
interface CreateTagsBatchRequest {
|
|
2278
|
+
tags: Array<{
|
|
2279
|
+
tagId: string // Required: Unique tag identifier
|
|
2280
|
+
productId: string // Required: Product ID
|
|
2281
|
+
variantId?: string // Optional: Variant ID
|
|
2282
|
+
batchId?: string // Optional: Batch ID
|
|
2283
|
+
proofId?: string // Optional: If omitted, auto-generates serial number
|
|
2284
|
+
metadata?: Record<string, any> // Optional: Additional metadata
|
|
2285
|
+
}>
|
|
2286
|
+
force?: boolean // Optional: Overwrite existing tags in same collection (default: false)
|
|
2287
|
+
}
|
|
2288
|
+
```
|
|
2289
|
+
|
|
2290
|
+
**CreateTagsBatchResponse** (interface)
|
|
2291
|
+
```typescript
|
|
2292
|
+
interface CreateTagsBatchResponse {
|
|
2293
|
+
summary: {
|
|
2294
|
+
total: number // Total tags in request
|
|
2295
|
+
created: number // Successfully created
|
|
2296
|
+
updated: number // Successfully updated (with force=true)
|
|
2297
|
+
failed: number // Failed to create/update
|
|
2298
|
+
conflicts: number // Already exist (without force=true)
|
|
2299
|
+
}
|
|
2300
|
+
results: {
|
|
2301
|
+
created: Tag[] // Array of successfully created tags
|
|
2302
|
+
updated: Tag[] // Array of successfully updated tags
|
|
2303
|
+
failed: Array<{
|
|
2304
|
+
tagId: string
|
|
2305
|
+
reason: string // Error code (e.g., "TAG_ASSIGNED_ELSEWHERE", "CREATE_FAILED")
|
|
2306
|
+
message: string // Human-readable error message
|
|
2307
|
+
existingTag?: Tag // Existing tag if applicable
|
|
2308
|
+
}>
|
|
2309
|
+
conflicts: Array<{
|
|
2310
|
+
tagId: string
|
|
2311
|
+
reason: string // "TAG_ALREADY_ASSIGNED"
|
|
2312
|
+
message: string
|
|
2313
|
+
existingTag: Tag // The existing tag
|
|
2314
|
+
}>
|
|
2315
|
+
}
|
|
2316
|
+
}
|
|
2317
|
+
```
|
|
2318
|
+
|
|
2319
|
+
**UpdateTagRequest** (interface)
|
|
2320
|
+
```typescript
|
|
2321
|
+
interface UpdateTagRequest {
|
|
2322
|
+
productId?: string // Optional: Update product ID
|
|
2323
|
+
variantId?: string | null // Optional: Update variant ID (null to clear)
|
|
2324
|
+
batchId?: string | null // Optional: Update batch ID (null to clear)
|
|
2325
|
+
proofId?: string // Optional: Update proof ID
|
|
2326
|
+
metadata?: Record<string, any> // Optional: Merge with existing metadata
|
|
2327
|
+
}
|
|
2328
|
+
```
|
|
2329
|
+
|
|
2330
|
+
**DeleteTagResponse** (interface)
|
|
2331
|
+
```typescript
|
|
2332
|
+
interface DeleteTagResponse {
|
|
2333
|
+
success: boolean
|
|
2334
|
+
}
|
|
2335
|
+
```
|
|
2336
|
+
|
|
2337
|
+
**ListTagsRequest** (interface)
|
|
2338
|
+
```typescript
|
|
2339
|
+
interface ListTagsRequest {
|
|
2340
|
+
limit?: number // Optional: Max results (default: 100)
|
|
2341
|
+
offset?: number // Optional: Pagination offset (default: 0)
|
|
2342
|
+
productId?: string // Optional: Filter by product ID
|
|
2343
|
+
variantId?: string // Optional: Filter by variant ID
|
|
2344
|
+
batchId?: string // Optional: Filter by batch ID
|
|
2345
|
+
}
|
|
2346
|
+
```
|
|
2347
|
+
|
|
2348
|
+
**ListTagsResponse** (interface)
|
|
2349
|
+
```typescript
|
|
2350
|
+
interface ListTagsResponse {
|
|
2351
|
+
tags: Tag[]
|
|
2352
|
+
limit: number
|
|
2353
|
+
offset: number
|
|
2354
|
+
}
|
|
2355
|
+
```
|
|
2356
|
+
|
|
2357
|
+
**PublicGetTagRequest** (interface)
|
|
2358
|
+
```typescript
|
|
2359
|
+
interface PublicGetTagRequest {
|
|
2360
|
+
embed?: string // Optional: Comma-separated values: "collection", "product", "proof"
|
|
2361
|
+
}
|
|
2362
|
+
```
|
|
2363
|
+
|
|
2364
|
+
**PublicGetTagResponse** (interface)
|
|
2365
|
+
```typescript
|
|
2366
|
+
interface PublicGetTagResponse {
|
|
2367
|
+
tag: Tag
|
|
2368
|
+
collection?: any // Included if embed contains "collection"
|
|
2369
|
+
product?: any // Included if embed contains "product"
|
|
2370
|
+
proof?: any // Included if embed contains "proof"
|
|
2371
|
+
}
|
|
2372
|
+
```
|
|
2373
|
+
|
|
2374
|
+
**PublicBatchLookupRequest** (interface)
|
|
2375
|
+
```typescript
|
|
2376
|
+
interface PublicBatchLookupRequest {
|
|
2377
|
+
tagIds: string[] // Array of tag IDs to lookup
|
|
2378
|
+
embed?: string // Optional: Comma-separated: "collection", "product", "proof"
|
|
2379
|
+
}
|
|
2380
|
+
```
|
|
2381
|
+
|
|
2382
|
+
**PublicBatchLookupResponse** (interface)
|
|
2383
|
+
```typescript
|
|
2384
|
+
interface PublicBatchLookupResponse {
|
|
2385
|
+
tags: Record<string, Tag> // Map: tagId → Tag object
|
|
2386
|
+
collections?: Record<string, any> // Map: collectionId → Collection (if embed=collection)
|
|
2387
|
+
products?: Record<string, any> // Map: productId → Product (if embed=product)
|
|
2388
|
+
proofs?: Record<string, any> // Map: proofId → Proof (if embed=proof)
|
|
2389
|
+
}
|
|
2390
|
+
```
|
|
2391
|
+
|
|
2392
|
+
**PublicBatchLookupQueryRequest** (interface)
|
|
2393
|
+
```typescript
|
|
2394
|
+
interface PublicBatchLookupQueryRequest {
|
|
2395
|
+
tagIds: string // Comma-separated tag IDs
|
|
2396
|
+
embed?: string // Optional: Comma-separated: "collection", "product", "proof"
|
|
2397
|
+
}
|
|
2398
|
+
```
|
|
2399
|
+
|
|
2111
2400
|
### template
|
|
2112
2401
|
|
|
2113
2402
|
**TemplateBase** (interface)
|
|
@@ -2256,61 +2545,61 @@ type AppConfigOptions = {
|
|
|
2256
2545
|
|
|
2257
2546
|
**LoginResponse** (type)
|
|
2258
2547
|
```typescript
|
|
2259
|
-
type LoginResponse = {
|
|
2260
|
-
id: string
|
|
2261
|
-
name: string
|
|
2262
|
-
email: string
|
|
2263
|
-
bearerToken: string
|
|
2264
|
-
account: Record<string, any>
|
|
2548
|
+
type LoginResponse = {
|
|
2549
|
+
id: string
|
|
2550
|
+
name: string
|
|
2551
|
+
email: string
|
|
2552
|
+
bearerToken: string
|
|
2553
|
+
account: Record<string, any>
|
|
2265
2554
|
}
|
|
2266
2555
|
```
|
|
2267
2556
|
|
|
2268
2557
|
**VerifyTokenResponse** (type)
|
|
2269
2558
|
```typescript
|
|
2270
|
-
type VerifyTokenResponse = {
|
|
2271
|
-
valid: boolean
|
|
2272
|
-
id?: string
|
|
2273
|
-
name?: string
|
|
2274
|
-
email?: string
|
|
2275
|
-
account?: Record<string, any>
|
|
2559
|
+
type VerifyTokenResponse = {
|
|
2560
|
+
valid: boolean
|
|
2561
|
+
id?: string
|
|
2562
|
+
name?: string
|
|
2563
|
+
email?: string
|
|
2564
|
+
account?: Record<string, any>
|
|
2276
2565
|
}
|
|
2277
2566
|
```
|
|
2278
2567
|
|
|
2279
2568
|
**AccountInfoResponse** (type)
|
|
2280
2569
|
```typescript
|
|
2281
|
-
type AccountInfoResponse = {
|
|
2282
|
-
accessType: string;
|
|
2283
|
-
analyticsCode: string;
|
|
2284
|
-
analyticsId: string;
|
|
2285
|
-
auth_time: number;
|
|
2286
|
-
baseCollectionId: string;
|
|
2287
|
-
clientType: string;
|
|
2288
|
-
email: string;
|
|
2289
|
-
email_verified: boolean;
|
|
2290
|
-
features: {
|
|
2291
|
-
actionLogger: boolean;
|
|
2292
|
-
adminCollections: boolean;
|
|
2293
|
-
adminApps: boolean;
|
|
2294
|
-
apiKeys: boolean;
|
|
2295
|
-
adminUsers: boolean;
|
|
2296
|
-
[key: string]: boolean;
|
|
2297
|
-
};
|
|
2298
|
-
iat: number;
|
|
2299
|
-
id: string;
|
|
2300
|
-
iss: string;
|
|
2301
|
-
location: string | null;
|
|
2302
|
-
name: string;
|
|
2303
|
-
picture: string;
|
|
2304
|
-
sites: {
|
|
2305
|
-
[siteName: string]: boolean;
|
|
2306
|
-
};
|
|
2307
|
-
sub: string;
|
|
2308
|
-
uid: string;
|
|
2309
|
-
userId: string;
|
|
2310
|
-
contactId: string
|
|
2311
|
-
whitelabel: {
|
|
2312
|
-
[key: string]: any;
|
|
2313
|
-
}
|
|
2570
|
+
type AccountInfoResponse = {
|
|
2571
|
+
accessType: string;
|
|
2572
|
+
analyticsCode: string;
|
|
2573
|
+
analyticsId: string;
|
|
2574
|
+
auth_time: number;
|
|
2575
|
+
baseCollectionId: string;
|
|
2576
|
+
clientType: string;
|
|
2577
|
+
email: string;
|
|
2578
|
+
email_verified: boolean;
|
|
2579
|
+
features: {
|
|
2580
|
+
actionLogger: boolean;
|
|
2581
|
+
adminCollections: boolean;
|
|
2582
|
+
adminApps: boolean;
|
|
2583
|
+
apiKeys: boolean;
|
|
2584
|
+
adminUsers: boolean;
|
|
2585
|
+
[key: string]: boolean;
|
|
2586
|
+
};
|
|
2587
|
+
iat: number;
|
|
2588
|
+
id: string;
|
|
2589
|
+
iss: string;
|
|
2590
|
+
location: string | null;
|
|
2591
|
+
name: string;
|
|
2592
|
+
picture: string;
|
|
2593
|
+
sites: {
|
|
2594
|
+
[siteName: string]: boolean;
|
|
2595
|
+
};
|
|
2596
|
+
sub: string;
|
|
2597
|
+
uid: string;
|
|
2598
|
+
userId: string;
|
|
2599
|
+
contactId: string
|
|
2600
|
+
whitelabel: {
|
|
2601
|
+
[key: string]: any;
|
|
2602
|
+
}
|
|
2314
2603
|
}
|
|
2315
2604
|
```
|
|
2316
2605
|
|
|
@@ -2318,15 +2607,15 @@ type AccountInfoResponse = {
|
|
|
2318
2607
|
|
|
2319
2608
|
### ai
|
|
2320
2609
|
|
|
2321
|
-
**generateContent**(collectionId: string,
|
|
2322
|
-
params: AIGenerateContentRequest,
|
|
2610
|
+
**generateContent**(collectionId: string,
|
|
2611
|
+
params: AIGenerateContentRequest,
|
|
2323
2612
|
admin: boolean = true) → `Promise<any>`
|
|
2324
2613
|
Generate text/content via AI (admin)
|
|
2325
2614
|
|
|
2326
2615
|
**generateImage**(collectionId: string, params: AIGenerateImageRequest) → `Promise<any>`
|
|
2327
2616
|
Generate an image via AI (admin)
|
|
2328
2617
|
|
|
2329
|
-
**searchPhotos**(collectionId: string,
|
|
2618
|
+
**searchPhotos**(collectionId: string,
|
|
2330
2619
|
params: AISearchPhotosRequest) → `Promise<AISearchPhotosPhoto[]>`
|
|
2331
2620
|
Search stock photos or similar via AI (admin)
|
|
2332
2621
|
|
|
@@ -2370,39 +2659,39 @@ Post a chat message to the AI (admin or public)
|
|
|
2370
2659
|
**upload**(options: UploadAssetOptions) → `Promise<Asset>`
|
|
2371
2660
|
Upload an asset file
|
|
2372
2661
|
|
|
2373
|
-
**getForCollection**(collectionId: string,
|
|
2662
|
+
**getForCollection**(collectionId: string,
|
|
2374
2663
|
assetId: string) → `Promise<AssetResponse>`
|
|
2375
2664
|
Upload an asset file
|
|
2376
2665
|
|
|
2377
2666
|
**listForCollection**(collectionId: string) → `Promise<AssetResponse[]>`
|
|
2378
2667
|
Upload an asset file
|
|
2379
2668
|
|
|
2380
|
-
**getForProduct**(collectionId: string,
|
|
2381
|
-
productId: string,
|
|
2669
|
+
**getForProduct**(collectionId: string,
|
|
2670
|
+
productId: string,
|
|
2382
2671
|
assetId: string) → `Promise<AssetResponse>`
|
|
2383
2672
|
Upload an asset file
|
|
2384
2673
|
|
|
2385
|
-
**listForProduct**(collectionId: string,
|
|
2674
|
+
**listForProduct**(collectionId: string,
|
|
2386
2675
|
productId: string) → `Promise<AssetResponse[]>`
|
|
2387
2676
|
Upload an asset file
|
|
2388
2677
|
|
|
2389
|
-
**getForProof**(collectionId: string,
|
|
2390
|
-
productId: string,
|
|
2391
|
-
proofId: string,
|
|
2678
|
+
**getForProof**(collectionId: string,
|
|
2679
|
+
productId: string,
|
|
2680
|
+
proofId: string,
|
|
2392
2681
|
assetId: string) → `Promise<AssetResponse>`
|
|
2393
2682
|
Upload an asset file
|
|
2394
2683
|
|
|
2395
|
-
**listForProof**(collectionId: string,
|
|
2396
|
-
productId: string,
|
|
2397
|
-
proofId: string,
|
|
2684
|
+
**listForProof**(collectionId: string,
|
|
2685
|
+
productId: string,
|
|
2686
|
+
proofId: string,
|
|
2398
2687
|
appId?: string) → `Promise<AssetResponse[]>`
|
|
2399
2688
|
Upload an asset file
|
|
2400
2689
|
|
|
2401
|
-
**uploadAsset**(collectionId: string,
|
|
2402
|
-
productId: string,
|
|
2403
|
-
proofId: string,
|
|
2404
|
-
file: File,
|
|
2405
|
-
extraData?: Record<string, any>,
|
|
2690
|
+
**uploadAsset**(collectionId: string,
|
|
2691
|
+
productId: string,
|
|
2692
|
+
proofId: string,
|
|
2693
|
+
file: File,
|
|
2694
|
+
extraData?: Record<string, any>,
|
|
2406
2695
|
onProgress?: (percent: number) → `void`
|
|
2407
2696
|
Uploads an asset file to a proof, with optional extraData as JSON. Supports progress reporting via onProgress callback (browser only).
|
|
2408
2697
|
|
|
@@ -2417,43 +2706,43 @@ Remove an asset by id within a scope (admin)
|
|
|
2417
2706
|
|
|
2418
2707
|
### async
|
|
2419
2708
|
|
|
2420
|
-
**enqueueAsyncJob**(collectionId: string,
|
|
2709
|
+
**enqueueAsyncJob**(collectionId: string,
|
|
2421
2710
|
params: EnqueueAsyncJobRequest) → `Promise<EnqueueAsyncJobResponse>`
|
|
2422
2711
|
Enqueue a background job for a collection POST /admin/collection/:collectionId/async/jobs (202)
|
|
2423
2712
|
|
|
2424
|
-
**getAsyncJobStatus**(collectionId: string,
|
|
2713
|
+
**getAsyncJobStatus**(collectionId: string,
|
|
2425
2714
|
jobId: number) → `Promise<Job>`
|
|
2426
2715
|
Get job status by ID (may return 404 if completed/removed) GET /admin/collection/:collectionId/async/jobs/:jobId
|
|
2427
2716
|
|
|
2428
2717
|
### attestation
|
|
2429
2718
|
|
|
2430
|
-
**list**(collectionId: string,
|
|
2431
|
-
productId: string,
|
|
2719
|
+
**list**(collectionId: string,
|
|
2720
|
+
productId: string,
|
|
2432
2721
|
proofId: string) → `Promise<AttestationResponse[]>`
|
|
2433
2722
|
List all attestations for a proof.
|
|
2434
2723
|
|
|
2435
|
-
**get**(collectionId: string,
|
|
2436
|
-
productId: string,
|
|
2437
|
-
proofId: string,
|
|
2724
|
+
**get**(collectionId: string,
|
|
2725
|
+
productId: string,
|
|
2726
|
+
proofId: string,
|
|
2438
2727
|
attestationId: string) → `Promise<AttestationResponse>`
|
|
2439
2728
|
Get a single attestation by ID.
|
|
2440
2729
|
|
|
2441
|
-
**create**(collectionId: string,
|
|
2442
|
-
productId: string,
|
|
2443
|
-
proofId: string,
|
|
2730
|
+
**create**(collectionId: string,
|
|
2731
|
+
productId: string,
|
|
2732
|
+
proofId: string,
|
|
2444
2733
|
data: AttestationCreateRequest) → `Promise<AttestationResponse>`
|
|
2445
2734
|
Create a new attestation for a proof.
|
|
2446
2735
|
|
|
2447
|
-
**update**(collectionId: string,
|
|
2448
|
-
productId: string,
|
|
2449
|
-
proofId: string,
|
|
2450
|
-
attestationId: string,
|
|
2736
|
+
**update**(collectionId: string,
|
|
2737
|
+
productId: string,
|
|
2738
|
+
proofId: string,
|
|
2739
|
+
attestationId: string,
|
|
2451
2740
|
data: AttestationUpdateRequest) → `Promise<AttestationResponse>`
|
|
2452
2741
|
Update an attestation.
|
|
2453
2742
|
|
|
2454
|
-
**remove**(collectionId: string,
|
|
2455
|
-
productId: string,
|
|
2456
|
-
proofId: string,
|
|
2743
|
+
**remove**(collectionId: string,
|
|
2744
|
+
productId: string,
|
|
2745
|
+
proofId: string,
|
|
2457
2746
|
attestationId: string) → `Promise<void>`
|
|
2458
2747
|
Delete an attestation.
|
|
2459
2748
|
|
|
@@ -2477,11 +2766,11 @@ Requests a JWT for the current user and a specific collection/product/proof Vali
|
|
|
2477
2766
|
**registerUser**(user: UserAccountRegistrationRequest) → `Promise<LoginResponse>`
|
|
2478
2767
|
Tries to register a new user account. Can return a bearer token, or a Firebase token
|
|
2479
2768
|
|
|
2480
|
-
**getUserToken**(opts?: {
|
|
2481
|
-
email?: string
|
|
2482
|
-
collectionId?: string
|
|
2483
|
-
userId?: string
|
|
2484
|
-
expiry?: string
|
|
2769
|
+
**getUserToken**(opts?: {
|
|
2770
|
+
email?: string
|
|
2771
|
+
collectionId?: string
|
|
2772
|
+
userId?: string
|
|
2773
|
+
expiry?: string
|
|
2485
2774
|
}) → `Promise<`
|
|
2486
2775
|
Admin: Get a user bearer token (impersonation/automation). POST /admin/auth/userToken All fields are optional; at least one identifier should be provided.
|
|
2487
2776
|
|
|
@@ -2570,91 +2859,91 @@ Verify phone verification code (public).
|
|
|
2570
2859
|
|
|
2571
2860
|
### batch
|
|
2572
2861
|
|
|
2573
|
-
**get**(collectionId: string,
|
|
2574
|
-
productId: string,
|
|
2862
|
+
**get**(collectionId: string,
|
|
2863
|
+
productId: string,
|
|
2575
2864
|
batchId: string) → `Promise<BatchResponse>`
|
|
2576
2865
|
Get a single batch by ID for a collection and product (admin only).
|
|
2577
2866
|
|
|
2578
|
-
**list**(collectionId: string,
|
|
2867
|
+
**list**(collectionId: string,
|
|
2579
2868
|
productId: string) → `Promise<BatchResponse[]>`
|
|
2580
2869
|
List all batches for a collection and product (admin only).
|
|
2581
2870
|
|
|
2582
|
-
**create**(collectionId: string,
|
|
2583
|
-
productId: string,
|
|
2871
|
+
**create**(collectionId: string,
|
|
2872
|
+
productId: string,
|
|
2584
2873
|
data: BatchCreateRequest) → `Promise<BatchResponse>`
|
|
2585
2874
|
Create a new batch for a collection and product (admin only).
|
|
2586
2875
|
|
|
2587
|
-
**update**(collectionId: string,
|
|
2588
|
-
productId: string,
|
|
2589
|
-
batchId: string,
|
|
2876
|
+
**update**(collectionId: string,
|
|
2877
|
+
productId: string,
|
|
2878
|
+
batchId: string,
|
|
2590
2879
|
data: BatchUpdateRequest) → `Promise<BatchResponse>`
|
|
2591
2880
|
Update a batch for a collection and product (admin only).
|
|
2592
2881
|
|
|
2593
|
-
**remove**(collectionId: string,
|
|
2594
|
-
productId: string,
|
|
2882
|
+
**remove**(collectionId: string,
|
|
2883
|
+
productId: string,
|
|
2595
2884
|
batchId: string) → `Promise<void>`
|
|
2596
2885
|
Delete a batch for a collection and product (admin only).
|
|
2597
2886
|
|
|
2598
|
-
**getPublic**(collectionId: string,
|
|
2599
|
-
productId: string,
|
|
2887
|
+
**getPublic**(collectionId: string,
|
|
2888
|
+
productId: string,
|
|
2600
2889
|
batchId: string) → `Promise<BatchResponse>`
|
|
2601
2890
|
Get a single batch by ID for a collection and product (public endpoint).
|
|
2602
2891
|
|
|
2603
|
-
**getSN**(collectionId: string,
|
|
2604
|
-
productId: string,
|
|
2605
|
-
batchId: string,
|
|
2606
|
-
startIndex: number = 0,
|
|
2892
|
+
**getSN**(collectionId: string,
|
|
2893
|
+
productId: string,
|
|
2894
|
+
batchId: string,
|
|
2895
|
+
startIndex: number = 0,
|
|
2607
2896
|
count: number = 10) → `Promise<any>`
|
|
2608
2897
|
Get serial numbers for a batch (admin only).
|
|
2609
2898
|
|
|
2610
|
-
**lookupSN**(collectionId: string,
|
|
2611
|
-
productId: string,
|
|
2612
|
-
batchId: string,
|
|
2899
|
+
**lookupSN**(collectionId: string,
|
|
2900
|
+
productId: string,
|
|
2901
|
+
batchId: string,
|
|
2613
2902
|
codeId: string) → `Promise<any>`
|
|
2614
2903
|
Look up a serial number by code for a batch (admin only).
|
|
2615
2904
|
|
|
2616
2905
|
### broadcasts
|
|
2617
2906
|
|
|
2618
|
-
**create**(collectionId: string,
|
|
2907
|
+
**create**(collectionId: string,
|
|
2619
2908
|
body: Omit<BroadcastRecord, 'id' | 'collectionId' | 'createdAt'>) → `Promise<BroadcastRecord>`
|
|
2620
2909
|
|
|
2621
|
-
**list**(collectionId: string,
|
|
2910
|
+
**list**(collectionId: string,
|
|
2622
2911
|
query: ListBroadcastsQuery = {}) → `Promise<BroadcastList>`
|
|
2623
2912
|
|
|
2624
|
-
**get**(collectionId: string,
|
|
2913
|
+
**get**(collectionId: string,
|
|
2625
2914
|
id: string) → `Promise<BroadcastRecord>`
|
|
2626
2915
|
|
|
2627
|
-
**update**(collectionId: string,
|
|
2628
|
-
id: string,
|
|
2916
|
+
**update**(collectionId: string,
|
|
2917
|
+
id: string,
|
|
2629
2918
|
body: Partial<Omit<BroadcastRecord, 'id' | 'collectionId' | 'createdAt'>>) → `Promise<BroadcastRecord>`
|
|
2630
2919
|
|
|
2631
|
-
**remove**(collectionId: string,
|
|
2920
|
+
**remove**(collectionId: string,
|
|
2632
2921
|
id: string) → `Promise<void>`
|
|
2633
2922
|
|
|
2634
|
-
**recipients**(collectionId: string,
|
|
2635
|
-
id: string,
|
|
2923
|
+
**recipients**(collectionId: string,
|
|
2924
|
+
id: string,
|
|
2636
2925
|
query: { limit?: number; offset?: number } = {}) → `Promise<BroadcastRecipientsResponse>`
|
|
2637
2926
|
|
|
2638
|
-
**preview**(collectionId: string,
|
|
2639
|
-
id: string,
|
|
2927
|
+
**preview**(collectionId: string,
|
|
2928
|
+
id: string,
|
|
2640
2929
|
body: BroadcastPreviewRequest) → `Promise<BroadcastPreviewResponse>`
|
|
2641
2930
|
|
|
2642
|
-
**send**(collectionId: string,
|
|
2643
|
-
id: string,
|
|
2931
|
+
**send**(collectionId: string,
|
|
2932
|
+
id: string,
|
|
2644
2933
|
body: BroadcastSendRequest = {}) → `Promise<`
|
|
2645
2934
|
|
|
2646
|
-
**sendTest**(collectionId: string,
|
|
2647
|
-
id: string,
|
|
2935
|
+
**sendTest**(collectionId: string,
|
|
2936
|
+
id: string,
|
|
2648
2937
|
body: BroadcastSendTestRequest) → `Promise<BroadcastSendTestResponse>`
|
|
2649
2938
|
|
|
2650
|
-
**sendManual**(collectionId: string,
|
|
2651
|
-
id: string,
|
|
2939
|
+
**sendManual**(collectionId: string,
|
|
2940
|
+
id: string,
|
|
2652
2941
|
body: BroadcastSendManualRequest) → `Promise<BroadcastSendManualResponse>`
|
|
2653
2942
|
|
|
2654
|
-
**append**(collectionId: string,
|
|
2943
|
+
**append**(collectionId: string,
|
|
2655
2944
|
body: BroadcastAppendEventBody) → `Promise<AppendResult>`
|
|
2656
2945
|
|
|
2657
|
-
**appendBulk**(collectionId: string,
|
|
2946
|
+
**appendBulk**(collectionId: string,
|
|
2658
2947
|
body: BroadcastAppendBulkBody) → `Promise<AppendBulkResult>`
|
|
2659
2948
|
|
|
2660
2949
|
### claimSet
|
|
@@ -2740,78 +3029,78 @@ Assign a value to a serial number for a collection (admin only).
|
|
|
2740
3029
|
**getPushVapidPublicKey**(collectionId: string) → `Promise<import("../types/comms").PushVapidResponse>`
|
|
2741
3030
|
Public: Get VAPID public key used for Web Push subscriptions. GET /public/collection/:collectionId/comm/push/vapidPublicKey Note: Key may be global; path is collection-scoped for consistency.
|
|
2742
3031
|
|
|
2743
|
-
**registerPush**(collectionId: string,
|
|
3032
|
+
**registerPush**(collectionId: string,
|
|
2744
3033
|
body: import("../types/comms") → `void`
|
|
2745
3034
|
Public: Register a Web Push subscription under unified comms. POST /public/collection/:collectionId/comm/push/register
|
|
2746
3035
|
|
|
2747
|
-
**getSettings**(collectionId: string,
|
|
3036
|
+
**getSettings**(collectionId: string,
|
|
2748
3037
|
opts: { includeSecret?: boolean } = {}) → `Promise<import("../types/comms").CommsSettingsGetResponse>`
|
|
2749
3038
|
Admin: Get current comms settings for a collection. GET /admin/collection/:collectionId/comm.settings Optional query: includeSecret=true to include unsub.secret in response.
|
|
2750
3039
|
|
|
2751
|
-
**patchSettings**(collectionId: string,
|
|
3040
|
+
**patchSettings**(collectionId: string,
|
|
2752
3041
|
body: import("../types/comms") → `void`
|
|
2753
3042
|
Admin: Patch comms settings for a collection. PATCH /admin/collection/:collectionId/comm.settings
|
|
2754
3043
|
|
|
2755
3044
|
**getPublicTopics**(collectionId: string) → `Promise<import("../types/comms").CommsPublicTopicsResponse>`
|
|
2756
3045
|
Public: Fetch configured topics for a collection. GET /public/collection/:collectionId/comm/topics
|
|
2757
3046
|
|
|
2758
|
-
**unsubscribe**(collectionId: string,
|
|
3047
|
+
**unsubscribe**(collectionId: string,
|
|
2759
3048
|
query: import("../types/comms") → `void`
|
|
2760
3049
|
Public: Unsubscribe a contact from a category or channel. GET /public/collection/:collectionId/comm/unsubscribe
|
|
2761
3050
|
|
|
2762
|
-
**upsertConsent**(collectionId: string,
|
|
3051
|
+
**upsertConsent**(collectionId: string,
|
|
2763
3052
|
body: import("../types/comms") → `void`
|
|
2764
3053
|
Public: Upsert default consent for a contact. POST /public/collection/:collectionId/comm/consent
|
|
2765
3054
|
|
|
2766
|
-
**upsertPreferences**(collectionId: string,
|
|
3055
|
+
**upsertPreferences**(collectionId: string,
|
|
2767
3056
|
body: import("../types/comms") → `void`
|
|
2768
3057
|
Public: Upsert preferences for a specific subject (or default if subject omitted). POST /public/collection/:collectionId/comm/preferences
|
|
2769
3058
|
|
|
2770
|
-
**subscribe**(collectionId: string,
|
|
3059
|
+
**subscribe**(collectionId: string,
|
|
2771
3060
|
body: import("../types/comms") → `void`
|
|
2772
3061
|
Public: Subscribe/unsubscribe contact to a subject. POST /public/collection/:collectionId/comm/subscribe
|
|
2773
3062
|
|
|
2774
|
-
**checkSubscription**(collectionId: string,
|
|
3063
|
+
**checkSubscription**(collectionId: string,
|
|
2775
3064
|
query: import("../types/comms") → `void`
|
|
2776
3065
|
Public: Check subscription status for a subject. GET /public/collection/:collectionId/comm/subscription/check
|
|
2777
3066
|
|
|
2778
|
-
**listMethods**(collectionId: string,
|
|
3067
|
+
**listMethods**(collectionId: string,
|
|
2779
3068
|
query: import("../types/comms") → `void`
|
|
2780
3069
|
Public: List registered contact methods. GET /public/collection/:collectionId/comm/methods
|
|
2781
3070
|
|
|
2782
|
-
**registerEmail**(collectionId: string,
|
|
3071
|
+
**registerEmail**(collectionId: string,
|
|
2783
3072
|
body: import("../types/comms") → `void`
|
|
2784
3073
|
Public: Register email method for a contact. POST /public/collection/:collectionId/comm/email/register
|
|
2785
3074
|
|
|
2786
|
-
**registerSms**(collectionId: string,
|
|
3075
|
+
**registerSms**(collectionId: string,
|
|
2787
3076
|
body: import("../types/comms") → `void`
|
|
2788
3077
|
Public: Register SMS method for a contact. POST /public/collection/:collectionId/comm/sms/register
|
|
2789
3078
|
|
|
2790
|
-
**resolveSubscriptions**(collectionId: string,
|
|
3079
|
+
**resolveSubscriptions**(collectionId: string,
|
|
2791
3080
|
body: import("../types/comms") → `void`
|
|
2792
3081
|
Public: Resolve contacts for a subject with identity hints. POST /public/collection/:collectionId/comm/subscriptions/resolve
|
|
2793
3082
|
|
|
2794
|
-
**queryByUser**(collectionId: string,
|
|
3083
|
+
**queryByUser**(collectionId: string,
|
|
2795
3084
|
body: CommsQueryByUser = {}) → `Promise<CommunicationEvent[]>`
|
|
2796
3085
|
Analytics: Query communication events by user or contact. POST /admin/collection/:collectionId/comm/query/by-user
|
|
2797
3086
|
|
|
2798
|
-
**queryRecipientIds**(collectionId: string,
|
|
3087
|
+
**queryRecipientIds**(collectionId: string,
|
|
2799
3088
|
body: CommsRecipientIdsQuery) → `Promise<RecipientId[]>`
|
|
2800
3089
|
Analytics: Recipient IDs for a communication source. POST /admin/collection/:collectionId/comm/query/recipient-ids
|
|
2801
3090
|
|
|
2802
|
-
**queryRecipientsWithoutAction**(collectionId: string,
|
|
3091
|
+
**queryRecipientsWithoutAction**(collectionId: string,
|
|
2803
3092
|
body: CommsRecipientsWithoutActionQuery) → `Promise<RecipientId[]>`
|
|
2804
3093
|
Analytics: Recipients who did not perform an action. POST /admin/collection/:collectionId/comm/query/recipients/without-action
|
|
2805
3094
|
|
|
2806
|
-
**queryRecipientsWithAction**(collectionId: string,
|
|
3095
|
+
**queryRecipientsWithAction**(collectionId: string,
|
|
2807
3096
|
body: CommsRecipientsWithActionQuery) → `Promise<RecipientId[] | RecipientWithOutcome[]>`
|
|
2808
3097
|
Analytics: Recipients who performed an action, optionally with outcome. POST /admin/collection/:collectionId/comm/query/recipients/with-action
|
|
2809
3098
|
|
|
2810
|
-
**logCommunicationEvent**(collectionId: string,
|
|
3099
|
+
**logCommunicationEvent**(collectionId: string,
|
|
2811
3100
|
body: LogCommunicationEventBody) → `Promise<AppendResult>`
|
|
2812
3101
|
Logging: Append a single communication event. POST /admin/collection/:collectionId/comm/log
|
|
2813
3102
|
|
|
2814
|
-
**logBulkCommunicationEvents**(collectionId: string,
|
|
3103
|
+
**logBulkCommunicationEvents**(collectionId: string,
|
|
2815
3104
|
body: LogBulkCommunicationEventsBody | ({ sourceId: string; ids: string[]; idField?: 'userId'|'contactId'; [k: string]: any }) → `void`
|
|
2816
3105
|
Logging: Append many communication events for a list of IDs. POST /admin/collection/:collectionId/comm/log/bulk
|
|
2817
3106
|
|
|
@@ -2819,39 +3108,42 @@ Logging: Append many communication events for a list of IDs. POST /admin/collect
|
|
|
2819
3108
|
|
|
2820
3109
|
**create**(collectionId: string, data: ContactCreateRequest) → `Promise<ContactResponse>`
|
|
2821
3110
|
|
|
2822
|
-
**list**(collectionId: string,
|
|
3111
|
+
**list**(collectionId: string,
|
|
2823
3112
|
params?: { limit?: number; offset?: number; includeDeleted?: boolean }) → `Promise<ContactListResponse>`
|
|
2824
3113
|
|
|
2825
|
-
**get**(collectionId: string,
|
|
2826
|
-
contactId: string,
|
|
3114
|
+
**get**(collectionId: string,
|
|
3115
|
+
contactId: string,
|
|
2827
3116
|
params?: { includeDeleted?: boolean }) → `Promise<ContactResponse>`
|
|
2828
3117
|
|
|
2829
|
-
**update**(collectionId: string,
|
|
2830
|
-
contactId: string,
|
|
3118
|
+
**update**(collectionId: string,
|
|
3119
|
+
contactId: string,
|
|
2831
3120
|
data: ContactUpdateRequest) → `Promise<ContactResponse>`
|
|
2832
3121
|
|
|
2833
3122
|
**remove**(collectionId: string, contactId: string) → `Promise<void>`
|
|
2834
3123
|
|
|
2835
|
-
**lookup**(collectionId: string,
|
|
3124
|
+
**lookup**(collectionId: string,
|
|
2836
3125
|
params: { email?: string; phone?: string }) → `Promise<ContactResponse>`
|
|
2837
3126
|
|
|
2838
|
-
**upsert**(collectionId: string,
|
|
3127
|
+
**upsert**(collectionId: string,
|
|
2839
3128
|
data: ContactCreateRequest) → `Promise<ContactResponse>`
|
|
2840
3129
|
|
|
2841
|
-
**publicUpsert**(collectionId: string,
|
|
3130
|
+
**publicUpsert**(collectionId: string,
|
|
2842
3131
|
data: PublicContactUpsertRequest) → `Promise<PublicContactUpsertResponse>`
|
|
2843
3132
|
|
|
2844
3133
|
**publicGetMine**(collectionId: string) → `Promise<PublicGetMyContactResponse>`
|
|
2845
3134
|
|
|
2846
|
-
**publicUpdateMine**(collectionId: string,
|
|
3135
|
+
**publicUpdateMine**(collectionId: string,
|
|
2847
3136
|
data: ContactPatch) → `Promise<PublicUpdateMyContactResponse>`
|
|
2848
3137
|
|
|
2849
3138
|
**publicGetSchema**(collectionId: string) → `Promise<ContactSchema>`
|
|
3139
|
+
Public: Get contact update schema for a collection Fetches the public contact schema including core fields, custom fields with conditional visibility rules, and visibility/editability settings. Custom fields may include a `condition` property that specifies when the field should be displayed. Apps rendering these forms should: 1. Evaluate each field's `condition` against current form values 2. Hide fields whose conditions are not met 3. Skip validation for hidden fields (they shouldn't be required when not visible)
|
|
2850
3140
|
|
|
2851
3141
|
**erase**(collectionId: string, contactId: string, body?: any) → `Promise<ContactResponse>`
|
|
3142
|
+
Public: Get contact update schema for a collection Fetches the public contact schema including core fields, custom fields with conditional visibility rules, and visibility/editability settings. Custom fields may include a `condition` property that specifies when the field should be displayed. Apps rendering these forms should: 1. Evaluate each field's `condition` against current form values 2. Hide fields whose conditions are not met 3. Skip validation for hidden fields (they shouldn't be required when not visible)
|
|
2852
3143
|
|
|
2853
|
-
**getUser**(collectionId: string,
|
|
3144
|
+
**getUser**(collectionId: string,
|
|
2854
3145
|
userId: string,) → `Promise<UserSearchResponse>`
|
|
3146
|
+
Public: Get contact update schema for a collection Fetches the public contact schema including core fields, custom fields with conditional visibility rules, and visibility/editability settings. Custom fields may include a `condition` property that specifies when the field should be displayed. Apps rendering these forms should: 1. Evaluate each field's `condition` against current form values 2. Hide fields whose conditions are not met 3. Skip validation for hidden fields (they shouldn't be required when not visible)
|
|
2855
3147
|
|
|
2856
3148
|
### crate
|
|
2857
3149
|
|
|
@@ -2889,108 +3181,108 @@ Delete a form for a collection (admin only).
|
|
|
2889
3181
|
|
|
2890
3182
|
### interactions
|
|
2891
3183
|
|
|
2892
|
-
**query**(collectionId: string,
|
|
3184
|
+
**query**(collectionId: string,
|
|
2893
3185
|
body: AdminInteractionsQueryRequest) → `Promise<InteractionEventRow[]>`
|
|
2894
3186
|
POST /admin/collection/:collectionId/interactions/query Flexible query for interaction events with optional includes.
|
|
2895
3187
|
|
|
2896
|
-
**countsByOutcome**(collectionId: string,
|
|
3188
|
+
**countsByOutcome**(collectionId: string,
|
|
2897
3189
|
query: AdminInteractionsCountsByOutcomeRequest = {}) → `Promise<OutcomeCount[]>`
|
|
2898
3190
|
POST /admin/collection/:collectionId/interactions/counts-by-outcome Returns array of { outcome, count }.
|
|
2899
3191
|
|
|
2900
|
-
**appendEvent**(collectionId: string,
|
|
3192
|
+
**appendEvent**(collectionId: string,
|
|
2901
3193
|
body: AppendInteractionBody) → `Promise<`
|
|
2902
3194
|
POST /admin/collection/:collectionId/interactions/append Appends one interaction event.
|
|
2903
3195
|
|
|
2904
|
-
**updateEvent**(collectionId: string,
|
|
3196
|
+
**updateEvent**(collectionId: string,
|
|
2905
3197
|
body: UpdateInteractionBody) → `Promise<`
|
|
2906
3198
|
POST /admin/collection/:collectionId/interactions/append Appends one interaction event.
|
|
2907
3199
|
|
|
2908
|
-
**submitPublicEvent**(collectionId: string,
|
|
3200
|
+
**submitPublicEvent**(collectionId: string,
|
|
2909
3201
|
body: AppendInteractionBody) → `Promise<`
|
|
2910
3202
|
Appends one interaction event from a public source.
|
|
2911
3203
|
|
|
2912
|
-
**create**(collectionId: string,
|
|
3204
|
+
**create**(collectionId: string,
|
|
2913
3205
|
body: CreateInteractionTypeBody) → `Promise<InteractionTypeRecord>`
|
|
2914
3206
|
Appends one interaction event from a public source.
|
|
2915
3207
|
|
|
2916
|
-
**list**(collectionId: string,
|
|
3208
|
+
**list**(collectionId: string,
|
|
2917
3209
|
query: ListInteractionTypesQuery = {}) → `Promise<InteractionTypeList>`
|
|
2918
3210
|
Appends one interaction event from a public source.
|
|
2919
3211
|
|
|
2920
|
-
**get**(collectionId: string,
|
|
3212
|
+
**get**(collectionId: string,
|
|
2921
3213
|
id: string) → `Promise<InteractionTypeRecord>`
|
|
2922
3214
|
Appends one interaction event from a public source.
|
|
2923
3215
|
|
|
2924
|
-
**update**(collectionId: string,
|
|
2925
|
-
id: string,
|
|
3216
|
+
**update**(collectionId: string,
|
|
3217
|
+
id: string,
|
|
2926
3218
|
patchBody: UpdateInteractionTypeBody) → `Promise<InteractionTypeRecord>`
|
|
2927
3219
|
Appends one interaction event from a public source.
|
|
2928
3220
|
|
|
2929
|
-
**remove**(collectionId: string,
|
|
3221
|
+
**remove**(collectionId: string,
|
|
2930
3222
|
id: string) → `Promise<void>`
|
|
2931
3223
|
Appends one interaction event from a public source.
|
|
2932
3224
|
|
|
2933
|
-
**publicCountsByOutcome**(collectionId: string,
|
|
2934
|
-
body: PublicInteractionsCountsByOutcomeRequest,
|
|
3225
|
+
**publicCountsByOutcome**(collectionId: string,
|
|
3226
|
+
body: PublicInteractionsCountsByOutcomeRequest,
|
|
2935
3227
|
authToken?: string) → `Promise<OutcomeCount[]>`
|
|
2936
3228
|
Appends one interaction event from a public source.
|
|
2937
3229
|
|
|
2938
|
-
**publicMyInteractions**(collectionId: string,
|
|
2939
|
-
body: PublicInteractionsByUserRequest,
|
|
3230
|
+
**publicMyInteractions**(collectionId: string,
|
|
3231
|
+
body: PublicInteractionsByUserRequest,
|
|
2940
3232
|
authToken?: string) → `Promise<InteractionEventRow[]>`
|
|
2941
3233
|
Appends one interaction event from a public source.
|
|
2942
3234
|
|
|
2943
|
-
**publicList**(collectionId: string,
|
|
3235
|
+
**publicList**(collectionId: string,
|
|
2944
3236
|
query: ListInteractionTypesQuery = {}) → `Promise<InteractionTypeList>`
|
|
2945
3237
|
Appends one interaction event from a public source.
|
|
2946
3238
|
|
|
2947
|
-
**publicGet**(collectionId: string,
|
|
3239
|
+
**publicGet**(collectionId: string,
|
|
2948
3240
|
id: string) → `Promise<InteractionTypeRecord>`
|
|
2949
3241
|
Appends one interaction event from a public source.
|
|
2950
3242
|
|
|
2951
3243
|
### jobs
|
|
2952
3244
|
|
|
2953
|
-
**listJobs**(collectionId: string,
|
|
3245
|
+
**listJobs**(collectionId: string,
|
|
2954
3246
|
query: ListJobsQuery = {}) → `Promise<JobsPage>`
|
|
2955
3247
|
List visible jobs for a collection GET /admin/collection/:collectionId/jobs
|
|
2956
3248
|
|
|
2957
|
-
**getJob**(collectionId: string,
|
|
3249
|
+
**getJob**(collectionId: string,
|
|
2958
3250
|
jobId: number) → `Promise<Job>`
|
|
2959
3251
|
Get a single job GET /admin/collection/:collectionId/jobs/:jobId
|
|
2960
3252
|
|
|
2961
3253
|
### journeys
|
|
2962
3254
|
|
|
2963
|
-
**create**(collectionId: string,
|
|
3255
|
+
**create**(collectionId: string,
|
|
2964
3256
|
body: CreateJourneyBody) → `Promise<JourneyRecord>`
|
|
2965
3257
|
|
|
2966
|
-
**list**(collectionId: string,
|
|
3258
|
+
**list**(collectionId: string,
|
|
2967
3259
|
query: ListJourneysQuery = {}) → `Promise<JourneyList>`
|
|
2968
3260
|
|
|
2969
|
-
**get**(collectionId: string,
|
|
3261
|
+
**get**(collectionId: string,
|
|
2970
3262
|
id: string) → `Promise<JourneyRecord>`
|
|
2971
3263
|
|
|
2972
|
-
**update**(collectionId: string,
|
|
2973
|
-
id: string,
|
|
3264
|
+
**update**(collectionId: string,
|
|
3265
|
+
id: string,
|
|
2974
3266
|
body: UpdateJourneyBody) → `Promise<JourneyRecord>`
|
|
2975
3267
|
|
|
2976
|
-
**remove**(collectionId: string,
|
|
3268
|
+
**remove**(collectionId: string,
|
|
2977
3269
|
id: string) → `Promise<void>`
|
|
2978
3270
|
|
|
2979
3271
|
### journeysAnalytics
|
|
2980
3272
|
|
|
2981
|
-
**stats**(collectionId: string,
|
|
2982
|
-
journeyId: string,
|
|
3273
|
+
**stats**(collectionId: string,
|
|
3274
|
+
journeyId: string,
|
|
2983
3275
|
body: JourneyStatsRequest = {}) → `Promise<JourneyStatsResponse>`
|
|
2984
3276
|
POST /admin/collection/:collectionId/journeys.analytics/:journeyId/stats Computes journey stats over a time window; outcome defaults to 'success'. If `finalStepId` is provided, includes `currentlyActive` and `completed` fields.
|
|
2985
3277
|
|
|
2986
|
-
**recipients**(collectionId: string,
|
|
2987
|
-
journeyId: string,
|
|
2988
|
-
stepId: string,
|
|
3278
|
+
**recipients**(collectionId: string,
|
|
3279
|
+
journeyId: string,
|
|
3280
|
+
stepId: string,
|
|
2989
3281
|
body: JourneyStepRecipientsRequest = {}) → `Promise<JourneyStepRecipientsResponse>`
|
|
2990
3282
|
POST /admin/collection/:collectionId/journeys.analytics/:journeyId/steps/:stepId/recipients Returns recipient IDs for a given journey step. For completed/pending, `interactionId` is required; outcome defaults to 'success'.
|
|
2991
3283
|
|
|
2992
|
-
**funnelReport**(collectionId: string,
|
|
2993
|
-
journeyId: string,
|
|
3284
|
+
**funnelReport**(collectionId: string,
|
|
3285
|
+
journeyId: string,
|
|
2994
3286
|
body: JourneyFunnelReportRequest) → `Promise<JourneyFunnelReportResponse>`
|
|
2995
3287
|
POST /admin/collection/:collectionId/journeys.analytics/:journeyId/funnel-report Computes conversion, counts, and avg time across mapped steps in a period.
|
|
2996
3288
|
|
|
@@ -3002,14 +3294,14 @@ Platform: Create a global location (super admin; requires features.adminApps) PO
|
|
|
3002
3294
|
**create**(collectionId: string, params: LocationPayload) → `Promise<Location>`
|
|
3003
3295
|
Admin: Create a collection-scoped location POST /admin/collection/:collectionId/location
|
|
3004
3296
|
|
|
3005
|
-
**search**(collectionId: string,
|
|
3297
|
+
**search**(collectionId: string,
|
|
3006
3298
|
query: LocationSearchQuery = {}) → `Promise<LocationSearchResponse>`
|
|
3007
3299
|
Admin: Search locations to pick during setup (combines collection + global) GET /admin/collection/:collectionId/location/search
|
|
3008
3300
|
|
|
3009
3301
|
**getPublic**(locationId: string) → `Promise<Location>`
|
|
3010
3302
|
Public: Fetch a global location by ID GET /public/location/:locationId
|
|
3011
3303
|
|
|
3012
|
-
**getPublicForCollection**(collectionId: string,
|
|
3304
|
+
**getPublicForCollection**(collectionId: string,
|
|
3013
3305
|
locationId: string) → `Promise<Location>`
|
|
3014
3306
|
Public: Fetch a location for a collection; returns either a collection-owned or global fallback GET /public/collection/:collectionId/location/:locationId
|
|
3015
3307
|
|
|
@@ -3024,6 +3316,43 @@ Validate an NFC tag payload (public). POST /public/nfc/validate
|
|
|
3024
3316
|
**lookupTag**(tagId: string) → `Promise<NfcTagInfo[]>`
|
|
3025
3317
|
Lookup a tag by its ID (public). GET /public/nfc/findByTag/:tagId
|
|
3026
3318
|
|
|
3319
|
+
### order
|
|
3320
|
+
|
|
3321
|
+
**create**(collectionId: string,
|
|
3322
|
+
data: CreateOrderRequest) → `Promise<CreateOrderResponse>`
|
|
3323
|
+
Create a new order with items. ```typescript const order = await order.create('coll_123', { orderRef: 'ORD-12345', customerId: 'CUST-789', items: [ { itemType: 'tag', itemId: 'TAG001' }, { itemType: 'tag', itemId: 'TAG002' }, { itemType: 'serial', itemId: 'SN12345' } ], status: 'pending', metadata: { shipmentId: 'SHIP-789', destination: 'Warehouse B' } }) ```
|
|
3324
|
+
|
|
3325
|
+
**get**(collectionId: string,
|
|
3326
|
+
orderId: string) → `Promise<GetOrderResponse>`
|
|
3327
|
+
Get a single order by ID with all its items. ```typescript const order = await order.get('coll_123', 'order_abc123') console.log(`Order has ${order.itemCount} items`) ```
|
|
3328
|
+
|
|
3329
|
+
**update**(collectionId: string,
|
|
3330
|
+
orderId: string,
|
|
3331
|
+
data: UpdateOrderRequest) → `Promise<UpdateOrderResponse>`
|
|
3332
|
+
Update order status or metadata. Items are managed separately via addItems/removeItems. ```typescript const updated = await order.update('coll_123', 'order_abc123', { status: 'shipped', metadata: { trackingNumber: '1Z999AA10123456784', shippedAt: '2026-02-02T14:30:00Z' } }) ```
|
|
3333
|
+
|
|
3334
|
+
**remove**(collectionId: string,
|
|
3335
|
+
orderId: string) → `Promise<DeleteOrderResponse>`
|
|
3336
|
+
Delete an order and all its items (cascade delete). ```typescript await order.remove('coll_123', 'order_abc123') ```
|
|
3337
|
+
|
|
3338
|
+
**list**(collectionId: string,
|
|
3339
|
+
params?: ListOrdersRequest) → `Promise<ListOrdersResponse>`
|
|
3340
|
+
List orders for a collection with optional filters and pagination. Orders are returned in descending order by createdAt (newest first). ```typescript // List all orders const all = await order.list('coll_123') // List with filters const pending = await order.list('coll_123', { status: 'pending', limit: 50, offset: 0 }) // Filter by customer const customerOrders = await order.list('coll_123', { customerId: 'CUST-789' }) ```
|
|
3341
|
+
|
|
3342
|
+
**addItems**(collectionId: string,
|
|
3343
|
+
orderId: string,
|
|
3344
|
+
data: AddItemsRequest) → `Promise<AddItemsResponse>`
|
|
3345
|
+
Add additional items to an existing order. ```typescript const updated = await order.addItems('coll_123', 'order_abc123', { items: [ { itemType: 'tag', itemId: 'TAG003' }, { itemType: 'proof', itemId: 'proof_xyz' } ] }) console.log(`Order now has ${updated.itemCount} items`) ```
|
|
3346
|
+
|
|
3347
|
+
**removeItems**(collectionId: string,
|
|
3348
|
+
orderId: string,
|
|
3349
|
+
data: RemoveItemsRequest) → `Promise<RemoveItemsResponse>`
|
|
3350
|
+
Remove specific items from an order. ```typescript const updated = await order.removeItems('coll_123', 'order_abc123', { itemIds: ['item_001', 'item_002'] }) ```
|
|
3351
|
+
|
|
3352
|
+
**lookup**(collectionId: string,
|
|
3353
|
+
data: LookupOrdersRequest) → `Promise<LookupOrdersResponse>`
|
|
3354
|
+
Find all orders containing specific items (tags, proofs, or serial numbers). Use case: Scan a tag and immediately see if it's part of any order. ```typescript // Scan a tag and find associated orders const result = await order.lookup('coll_123', { items: [ { itemType: 'tag', itemId: 'TAG001' } ] }) if (result.orders.length > 0) { console.log(`Tag is part of ${result.orders.length} order(s)`) result.orders.forEach(ord => { console.log(`Order ${ord.orderRef}: ${ord.status}`) }) } // Batch lookup multiple items const batchResult = await order.lookup('coll_123', { items: [ { itemType: 'tag', itemId: 'TAG001' }, { itemType: 'serial', itemId: 'SN12345' }, { itemType: 'proof', itemId: 'proof_xyz' } ] }) ```
|
|
3355
|
+
|
|
3027
3356
|
### product
|
|
3028
3357
|
|
|
3029
3358
|
**get**(collectionId: string,
|
|
@@ -3127,29 +3456,66 @@ Get an Ably token for admin real-time communication. This endpoint returns an Ab
|
|
|
3127
3456
|
|
|
3128
3457
|
### segments
|
|
3129
3458
|
|
|
3130
|
-
**create**(collectionId: string,
|
|
3459
|
+
**create**(collectionId: string,
|
|
3131
3460
|
body: Omit<SegmentRecord, 'id' | 'collectionId' | 'createdAt'>) → `Promise<SegmentRecord>`
|
|
3132
3461
|
|
|
3133
|
-
**list**(collectionId: string,
|
|
3462
|
+
**list**(collectionId: string,
|
|
3134
3463
|
query: ListSegmentsQuery = {}) → `Promise<SegmentList>`
|
|
3135
3464
|
|
|
3136
|
-
**get**(collectionId: string,
|
|
3465
|
+
**get**(collectionId: string,
|
|
3137
3466
|
id: string) → `Promise<SegmentRecord>`
|
|
3138
3467
|
|
|
3139
|
-
**update**(collectionId: string,
|
|
3140
|
-
id: string,
|
|
3468
|
+
**update**(collectionId: string,
|
|
3469
|
+
id: string,
|
|
3141
3470
|
body: Partial<Omit<SegmentRecord, 'id' | 'collectionId' | 'createdAt'>>) → `Promise<SegmentRecord>`
|
|
3142
3471
|
|
|
3143
|
-
**remove**(collectionId: string,
|
|
3472
|
+
**remove**(collectionId: string,
|
|
3144
3473
|
id: string) → `Promise<void>`
|
|
3145
3474
|
|
|
3146
|
-
**calculate**(collectionId: string,
|
|
3475
|
+
**calculate**(collectionId: string,
|
|
3147
3476
|
id: string) → `Promise<SegmentCalculateResult>`
|
|
3148
3477
|
|
|
3149
|
-
**recipients**(collectionId: string,
|
|
3150
|
-
id: string,
|
|
3478
|
+
**recipients**(collectionId: string,
|
|
3479
|
+
id: string,
|
|
3151
3480
|
query: { limit?: number; offset?: number } = {}) → `Promise<SegmentRecipientsResponse>`
|
|
3152
3481
|
|
|
3482
|
+
### tags
|
|
3483
|
+
|
|
3484
|
+
**create**(collectionId: string,
|
|
3485
|
+
data: CreateTagRequest) → `Promise<CreateTagResponse>`
|
|
3486
|
+
Create a single tag mapping. If proofId is not provided, automatically generates a serial number. ```typescript // Auto-generate serial number const tag = await tags.create('coll_123', { tagId: 'TAG001', productId: 'prod_456', variantId: 'var_789' }) // Use explicit proof ID const tag2 = await tags.create('coll_123', { tagId: 'TAG002', productId: 'prod_456', proofId: 'proof_explicit_123' }) ```
|
|
3487
|
+
|
|
3488
|
+
**createBatch**(collectionId: string,
|
|
3489
|
+
data: CreateTagsBatchRequest) → `Promise<CreateTagsBatchResponse>`
|
|
3490
|
+
Create multiple tag mappings efficiently in a batch operation. By default, auto-generates serial numbers for all tags without explicit proofId. Tags are grouped by product/variant/batch and serial numbers are generated in a single transaction per group for optimal performance. ```typescript const result = await tags.createBatch('coll_123', { tags: [ { tagId: 'TAG001', productId: 'prod_456', variantId: 'var_789' }, { tagId: 'TAG002', productId: 'prod_456', variantId: 'var_789' }, { tagId: 'TAG003', productId: 'prod_456', batchId: 'batch_100' } ] }) console.log(`Created: ${result.summary.created}, Failed: ${result.summary.failed}`) ```
|
|
3491
|
+
|
|
3492
|
+
**update**(collectionId: string,
|
|
3493
|
+
tagId: string,
|
|
3494
|
+
data: UpdateTagRequest) → `Promise<UpdateTagResponse>`
|
|
3495
|
+
Update an existing tag mapping. ```typescript const updated = await tags.update('coll_123', 'TAG001', { variantId: 'var_999', metadata: { notes: 'Updated variant' } }) ```
|
|
3496
|
+
|
|
3497
|
+
**remove**(collectionId: string,
|
|
3498
|
+
tagId: string) → `Promise<DeleteTagResponse>`
|
|
3499
|
+
Delete a tag mapping. ```typescript await tags.remove('coll_123', 'TAG001') ```
|
|
3500
|
+
|
|
3501
|
+
**get**(collectionId: string,
|
|
3502
|
+
tagId: string) → `Promise<GetTagResponse>`
|
|
3503
|
+
Get a single tag mapping by tagId. ```typescript const tag = await tags.get('coll_123', 'TAG001') ```
|
|
3504
|
+
|
|
3505
|
+
**list**(collectionId: string,
|
|
3506
|
+
params?: ListTagsRequest) → `Promise<ListTagsResponse>`
|
|
3507
|
+
List all tags for a collection with optional filters and pagination. ```typescript // List all tags const all = await tags.list('coll_123') // List with filters const filtered = await tags.list('coll_123', { productId: 'prod_456', variantId: 'var_789', limit: 50, offset: 0 }) ```
|
|
3508
|
+
|
|
3509
|
+
**publicGet**(tagId: string,
|
|
3510
|
+
params?: PublicGetTagRequest) → `Promise<PublicGetTagResponse>`
|
|
3511
|
+
Public lookup of a single tag by tagId. Optionally embed related collection, product, or proof data. No authentication required. ```typescript // Simple lookup const result = await tags.publicGet('TAG001') // With embedded data const withData = await tags.publicGet('TAG001', { embed: 'collection,product,proof' }) console.log(withData.tag, withData.collection, withData.product, withData.proof) ```
|
|
3512
|
+
|
|
3513
|
+
**publicBatchLookup**(data: PublicBatchLookupRequest) → `Promise<PublicBatchLookupResponse>`
|
|
3514
|
+
Public batch lookup of multiple tags in a single request (POST). Optionally embed related data. Related data is deduplicated and batch-fetched. No authentication required. ```typescript const result = await tags.publicBatchLookup({ tagIds: ['TAG001', 'TAG002', 'TAG003'], embed: 'collection,product' }) // Access tags and deduplicated collections/products console.log(result.tags['TAG001']) console.log(result.collections) console.log(result.products) ```
|
|
3515
|
+
|
|
3516
|
+
**publicBatchLookupQuery**(params: PublicBatchLookupQueryRequest) → `Promise<PublicBatchLookupQueryResponse>`
|
|
3517
|
+
Public batch lookup of multiple tags using query parameters (GET). Alternative to publicBatchLookup for simple GET requests. No authentication required. ```typescript const result = await tags.publicBatchLookupQuery({ tagIds: 'TAG001,TAG002,TAG003', embed: 'collection' }) ```
|
|
3518
|
+
|
|
3153
3519
|
### template
|
|
3154
3520
|
|
|
3155
3521
|
**getAll**(collectionId: string) → `Promise<Template[]>`
|
|
@@ -3158,14 +3524,14 @@ Get an Ably token for admin real-time communication. This endpoint returns an Ab
|
|
|
3158
3524
|
|
|
3159
3525
|
**create**(collectionId: string, data: TemplateInput) → `Promise<Template>`
|
|
3160
3526
|
|
|
3161
|
-
**update**(collectionId: string,
|
|
3162
|
-
templateId: string,
|
|
3527
|
+
**update**(collectionId: string,
|
|
3528
|
+
templateId: string,
|
|
3163
3529
|
data: TemplateUpdate) → `Promise<Template>`
|
|
3164
3530
|
|
|
3165
3531
|
**del**(collectionId: string, templateId: string) → `Promise<Template>`
|
|
3166
3532
|
|
|
3167
|
-
**uploadAsset**(collectionId: string,
|
|
3168
|
-
templateId: string,
|
|
3533
|
+
**uploadAsset**(collectionId: string,
|
|
3534
|
+
templateId: string,
|
|
3169
3535
|
file: File | Blob) → `Promise<`
|
|
3170
3536
|
|
|
3171
3537
|
**getAllowed**(collectionId: string) → `Promise<TemplatePublic[]>`
|
|
@@ -3176,55 +3542,55 @@ Get an Ably token for admin real-time communication. This endpoint returns an Ab
|
|
|
3176
3542
|
|
|
3177
3543
|
**getAllowedGlobal**(collectionId: string) → `Promise<TemplatePublic[]>`
|
|
3178
3544
|
|
|
3179
|
-
**render**(collectionId: string,
|
|
3180
|
-
templateId: string,
|
|
3545
|
+
**render**(collectionId: string,
|
|
3546
|
+
templateId: string,
|
|
3181
3547
|
body: TemplateRenderRequest) → `Promise<TemplateRenderResponse>`
|
|
3182
3548
|
|
|
3183
|
-
**renderSource**(collectionId: string,
|
|
3549
|
+
**renderSource**(collectionId: string,
|
|
3184
3550
|
body: TemplateRenderSourceRequest) → `Promise<TemplateRenderSourceResponse>`
|
|
3185
3551
|
|
|
3186
3552
|
### variant
|
|
3187
3553
|
|
|
3188
|
-
**get**(collectionId: string,
|
|
3189
|
-
productId: string,
|
|
3554
|
+
**get**(collectionId: string,
|
|
3555
|
+
productId: string,
|
|
3190
3556
|
variantId: string) → `Promise<VariantResponse>`
|
|
3191
3557
|
Get a single variant by ID for a collection and product (admin only).
|
|
3192
3558
|
|
|
3193
|
-
**list**(collectionId: string,
|
|
3559
|
+
**list**(collectionId: string,
|
|
3194
3560
|
productId: string) → `Promise<VariantResponse[]>`
|
|
3195
3561
|
List all variants for a collection and product (admin only).
|
|
3196
3562
|
|
|
3197
|
-
**create**(collectionId: string,
|
|
3198
|
-
productId: string,
|
|
3563
|
+
**create**(collectionId: string,
|
|
3564
|
+
productId: string,
|
|
3199
3565
|
data: VariantCreateRequest) → `Promise<VariantResponse>`
|
|
3200
3566
|
Create a new variant for a collection and product (admin only).
|
|
3201
3567
|
|
|
3202
|
-
**update**(collectionId: string,
|
|
3203
|
-
productId: string,
|
|
3204
|
-
variantId: string,
|
|
3568
|
+
**update**(collectionId: string,
|
|
3569
|
+
productId: string,
|
|
3570
|
+
variantId: string,
|
|
3205
3571
|
data: VariantUpdateRequest) → `Promise<VariantResponse>`
|
|
3206
3572
|
Update a variant for a collection and product (admin only).
|
|
3207
3573
|
|
|
3208
|
-
**remove**(collectionId: string,
|
|
3209
|
-
productId: string,
|
|
3574
|
+
**remove**(collectionId: string,
|
|
3575
|
+
productId: string,
|
|
3210
3576
|
variantId: string) → `Promise<void>`
|
|
3211
3577
|
Delete a variant for a collection and product (admin only).
|
|
3212
3578
|
|
|
3213
|
-
**getPublic**(collectionId: string,
|
|
3214
|
-
productId: string,
|
|
3579
|
+
**getPublic**(collectionId: string,
|
|
3580
|
+
productId: string,
|
|
3215
3581
|
variantId: string) → `Promise<VariantResponse>`
|
|
3216
3582
|
Get a single variant by ID for a collection and product (public endpoint).
|
|
3217
3583
|
|
|
3218
|
-
**getSN**(collectionId: string,
|
|
3219
|
-
productId: string,
|
|
3220
|
-
variantId: string,
|
|
3221
|
-
startIndex: number = 0,
|
|
3584
|
+
**getSN**(collectionId: string,
|
|
3585
|
+
productId: string,
|
|
3586
|
+
variantId: string,
|
|
3587
|
+
startIndex: number = 0,
|
|
3222
3588
|
count: number = 10) → `Promise<any>`
|
|
3223
3589
|
Get serial numbers for a variant (admin only).
|
|
3224
3590
|
|
|
3225
|
-
**lookupSN**(collectionId: string,
|
|
3226
|
-
productId: string,
|
|
3227
|
-
variantId: string,
|
|
3591
|
+
**lookupSN**(collectionId: string,
|
|
3592
|
+
productId: string,
|
|
3593
|
+
variantId: string,
|
|
3228
3594
|
codeId: string) → `Promise<any>`
|
|
3229
3595
|
Look up a serial number by code for a variant (admin only).
|
|
3230
3596
|
|