@proveanything/smartlinks 1.8.11 → 1.9.0
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/facets.d.ts +26 -0
- package/dist/api/facets.js +106 -0
- package/dist/api/index.d.ts +3 -0
- package/dist/api/index.js +3 -0
- package/dist/api/loyalty.d.ts +65 -0
- package/dist/api/loyalty.js +139 -0
- package/dist/api/product.d.ts +52 -3
- package/dist/api/product.js +103 -0
- package/dist/api/products.d.ts +21 -0
- package/dist/api/products.js +114 -0
- package/dist/docs/API_SUMMARY.md +770 -31
- package/dist/docs/PRODUCT_FACETS_SDK.md +347 -0
- package/dist/docs/loyalty.md +333 -0
- package/dist/http.d.ts +2 -1
- package/dist/http.js +3 -2
- package/dist/iframeResponder.js +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/openapi.yaml +5234 -2401
- package/dist/types/facets.d.ts +126 -0
- package/dist/types/facets.js +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.js +2 -0
- package/dist/types/loyalty.d.ts +145 -0
- package/dist/types/loyalty.js +2 -0
- package/dist/types/product.d.ts +161 -48
- package/dist/utils/paths.js +3 -2
- package/docs/API_SUMMARY.md +770 -31
- package/docs/PRODUCT_FACETS_SDK.md +347 -0
- package/docs/loyalty.md +333 -0
- package/openapi.yaml +5234 -2401
- package/package.json +1 -1
package/dist/docs/API_SUMMARY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Smartlinks API Summary
|
|
2
2
|
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.9.0 | Generated: 2026-03-22T15:51:25.814Z
|
|
4
4
|
|
|
5
5
|
This is a concise summary of all available API functions and types.
|
|
6
6
|
|
|
@@ -26,6 +26,7 @@ For detailed guides on specific features:
|
|
|
26
26
|
- **[App Objects: Cases, Threads & Records](app-objects.md)** - Generic app-scoped building blocks for support cases, discussions, bookings, registrations, and more
|
|
27
27
|
- **[Communications](comms.md)** - Transactional sends, multi-channel broadcasts, consent management, push registration, and analytics
|
|
28
28
|
- **[Interactions & Event Tracking](interactions.md)** - Log user events, count outcomes, query history, and define interaction types with permissions
|
|
29
|
+
- **[Loyalty: Points, Members & Earning Rules](loyalty.md)** - Loyalty schemes, automatic point earning via interaction rules, member balances, transaction history, and manual adjustments
|
|
29
30
|
- **[Deep Link Discovery](deep-link-discovery.md)** - Registering and discovering navigable app states for portal menus and AI orchestration
|
|
30
31
|
- **[AI-Native App Manifests](manifests.md)** - How AI workflows discover, configure, and import apps via structured manifests and prose guides
|
|
31
32
|
- **[AI Guide Template](ai-guide-template.md)** - A sample for an app on how to build an AI setup guide
|
|
@@ -79,6 +80,7 @@ The Smartlinks SDK is organized into the following namespaces:
|
|
|
79
80
|
|
|
80
81
|
— Analytics & Events —
|
|
81
82
|
- **interactions** - Log and analyze interactions/outcomes; aggregates and actor lists; interaction definition CRUD. → [Guide](interactions.md)
|
|
83
|
+
- **loyalty** - Loyalty programmes: schemes, earning rules tied to interactions, member balances, transaction ledger, and manual adjustments. → [Guide](loyalty.md)
|
|
82
84
|
|
|
83
85
|
— Automation —
|
|
84
86
|
- **journeys** - Configure automated flows triggered by events or schedules; steps, rules; full CRUD.
|
|
@@ -99,10 +101,12 @@ The Smartlinks SDK is organized into the following namespaces:
|
|
|
99
101
|
- **attestation** - Functions for attestation operations
|
|
100
102
|
- **attestations** - Functions for attestations operations
|
|
101
103
|
- **containers** - Functions for containers operations
|
|
104
|
+
- **facets** - Functions for facets operations
|
|
102
105
|
- **jobs** - Functions for jobs operations
|
|
103
106
|
- **journeysAnalytics** - Functions for journeysAnalytics operations
|
|
104
107
|
- **location** - Functions for location operations
|
|
105
108
|
- **order** - Functions for order operations
|
|
109
|
+
- **products** - Functions for products operations
|
|
106
110
|
- **realtime** - Functions for realtime operations
|
|
107
111
|
- **tags** - Functions for tags operations
|
|
108
112
|
- **template** - Functions for template operations
|
|
@@ -159,7 +163,7 @@ Returns true if the SDK currently has any auth credential set (bearer token or A
|
|
|
159
163
|
Configure the SDK's built-in in-memory GET cache. The cache is transparent — it sits inside the HTTP layer and requires no changes to your existing API calls. All GET requests benefit automatically. Per-resource rules (collections/products → 1 h, proofs → 30 s, etc.) override this value. in-memory only (`'none'`, default). Ignored in Node.js. fallback, from the original fetch time (default: 7 days). `SmartlinksOfflineError` with stale data instead of propagating the network error. caches on page load/refresh. IndexedDB persists for offline. ```ts // Enable IndexedDB persistence for offline support configureSdkCache({ persistence: 'indexeddb' }) // Disable cache entirely in test environments configureSdkCache({ enabled: false }) // Keep caches across page refreshes (not recommended for production) configureSdkCache({ clearOnPageLoad: false }) ```
|
|
160
164
|
|
|
161
165
|
**invalidateCache**(urlPattern?: string) → `void`
|
|
162
|
-
Manually invalidate entries in the SDK's GET cache. *contains* this string is removed. Omit (or pass `undefined`) to wipe the entire cache. ```ts invalidateCache() // clear everything invalidateCache('/collection/abc123') // one specific collection invalidateCache('/product/') // all product responses ```
|
|
166
|
+
Manually invalidate entries in the SDK's GET cache. *contains* this string is removed. Omit (or pass `undefined`) to wipe the entire cache. ```ts invalidateCache() // clear everything invalidateCache('/collection/abc123') // one specific collection invalidateCache('/product/') // all legacy singular product responses invalidateCache('/products/') // all canonical plural product responses ```
|
|
163
167
|
|
|
164
168
|
**proxyUploadFormData**(path: string,
|
|
165
169
|
formData: FormData,
|
|
@@ -4173,6 +4177,194 @@ interface ErrorResponse {
|
|
|
4173
4177
|
}
|
|
4174
4178
|
```
|
|
4175
4179
|
|
|
4180
|
+
### facets
|
|
4181
|
+
|
|
4182
|
+
**FacetDefinition** (interface)
|
|
4183
|
+
```typescript
|
|
4184
|
+
interface FacetDefinition {
|
|
4185
|
+
id?: string
|
|
4186
|
+
orgId?: string
|
|
4187
|
+
collectionId?: string | null
|
|
4188
|
+
key: string
|
|
4189
|
+
name: string
|
|
4190
|
+
description?: string | null
|
|
4191
|
+
cardinality?: "single" | "multi"
|
|
4192
|
+
kind?: "system" | "custom"
|
|
4193
|
+
hierarchical?: boolean
|
|
4194
|
+
reserved?: boolean
|
|
4195
|
+
enabled?: boolean
|
|
4196
|
+
sortOrder?: number | null
|
|
4197
|
+
config?: Record<string, JsonValue>
|
|
4198
|
+
createdAt?: string
|
|
4199
|
+
updatedAt?: string
|
|
4200
|
+
deletedAt?: string | null
|
|
4201
|
+
values?: FacetValue[]
|
|
4202
|
+
}
|
|
4203
|
+
```
|
|
4204
|
+
|
|
4205
|
+
**FacetValue** (interface)
|
|
4206
|
+
```typescript
|
|
4207
|
+
interface FacetValue {
|
|
4208
|
+
id?: string
|
|
4209
|
+
orgId?: string
|
|
4210
|
+
collectionId?: string | null
|
|
4211
|
+
facetDefinitionId?: string
|
|
4212
|
+
facetKey: string
|
|
4213
|
+
key: string
|
|
4214
|
+
slug?: string | null
|
|
4215
|
+
name: string
|
|
4216
|
+
shortName?: string | null
|
|
4217
|
+
description?: string | null
|
|
4218
|
+
color?: string | null
|
|
4219
|
+
icon?: string | null
|
|
4220
|
+
image?: Record<string, JsonValue> | null
|
|
4221
|
+
metadata?: Record<string, JsonValue>
|
|
4222
|
+
sortOrder?: number | null
|
|
4223
|
+
parentValueId?: string | null
|
|
4224
|
+
parentValueKey?: string | null
|
|
4225
|
+
enabled?: boolean
|
|
4226
|
+
createdAt?: string
|
|
4227
|
+
updatedAt?: string
|
|
4228
|
+
deletedAt?: string | null
|
|
4229
|
+
count?: number
|
|
4230
|
+
}
|
|
4231
|
+
```
|
|
4232
|
+
|
|
4233
|
+
**FacetDefinitionWriteInput** (interface)
|
|
4234
|
+
```typescript
|
|
4235
|
+
interface FacetDefinitionWriteInput {
|
|
4236
|
+
key?: string
|
|
4237
|
+
name: string
|
|
4238
|
+
description?: string | null
|
|
4239
|
+
cardinality?: "single" | "multi"
|
|
4240
|
+
kind?: "system" | "custom"
|
|
4241
|
+
hierarchical?: boolean
|
|
4242
|
+
reserved?: boolean
|
|
4243
|
+
enabled?: boolean
|
|
4244
|
+
sortOrder?: number | null
|
|
4245
|
+
config?: Record<string, JsonValue>
|
|
4246
|
+
}
|
|
4247
|
+
```
|
|
4248
|
+
|
|
4249
|
+
**FacetValueWriteInput** (interface)
|
|
4250
|
+
```typescript
|
|
4251
|
+
interface FacetValueWriteInput {
|
|
4252
|
+
key?: string
|
|
4253
|
+
slug?: string | null
|
|
4254
|
+
name: string
|
|
4255
|
+
shortName?: string | null
|
|
4256
|
+
description?: string | null
|
|
4257
|
+
color?: string | null
|
|
4258
|
+
icon?: string | null
|
|
4259
|
+
image?: Record<string, JsonValue> | null
|
|
4260
|
+
metadata?: Record<string, JsonValue>
|
|
4261
|
+
sortOrder?: number | null
|
|
4262
|
+
parentValueKey?: string | null
|
|
4263
|
+
enabled?: boolean
|
|
4264
|
+
}
|
|
4265
|
+
```
|
|
4266
|
+
|
|
4267
|
+
**FacetListResponse** (interface)
|
|
4268
|
+
```typescript
|
|
4269
|
+
interface FacetListResponse {
|
|
4270
|
+
items: FacetDefinition[]
|
|
4271
|
+
}
|
|
4272
|
+
```
|
|
4273
|
+
|
|
4274
|
+
**FacetValueListResponse** (interface)
|
|
4275
|
+
```typescript
|
|
4276
|
+
interface FacetValueListResponse {
|
|
4277
|
+
facet: FacetDefinition
|
|
4278
|
+
items: FacetValue[]
|
|
4279
|
+
}
|
|
4280
|
+
```
|
|
4281
|
+
|
|
4282
|
+
**FacetValueResponse** (interface)
|
|
4283
|
+
```typescript
|
|
4284
|
+
interface FacetValueResponse {
|
|
4285
|
+
facet: FacetDefinition
|
|
4286
|
+
item: FacetValue
|
|
4287
|
+
}
|
|
4288
|
+
```
|
|
4289
|
+
|
|
4290
|
+
**FacetQueryRequest** (interface)
|
|
4291
|
+
```typescript
|
|
4292
|
+
interface FacetQueryRequest {
|
|
4293
|
+
facetKeys?: string[]
|
|
4294
|
+
includeEmpty?: boolean
|
|
4295
|
+
includeDeleted?: boolean
|
|
4296
|
+
query?: ProductQueryRequest["query"] & {
|
|
4297
|
+
facetEquals?: Record<string, JsonValue | JsonValue[]>
|
|
4298
|
+
}
|
|
4299
|
+
}
|
|
4300
|
+
```
|
|
4301
|
+
|
|
4302
|
+
**FacetBucket** (interface)
|
|
4303
|
+
```typescript
|
|
4304
|
+
interface FacetBucket {
|
|
4305
|
+
facetKey: string
|
|
4306
|
+
valueKey: string
|
|
4307
|
+
name?: string
|
|
4308
|
+
count: number
|
|
4309
|
+
}
|
|
4310
|
+
```
|
|
4311
|
+
|
|
4312
|
+
**FacetQueryResponse** (interface)
|
|
4313
|
+
```typescript
|
|
4314
|
+
interface FacetQueryResponse {
|
|
4315
|
+
items: Array<{
|
|
4316
|
+
facet: FacetDefinition
|
|
4317
|
+
values: FacetValue[]
|
|
4318
|
+
}>
|
|
4319
|
+
buckets: FacetBucket[]
|
|
4320
|
+
meta?: {
|
|
4321
|
+
source?: "postgres"
|
|
4322
|
+
matchedProducts?: number
|
|
4323
|
+
}
|
|
4324
|
+
}
|
|
4325
|
+
```
|
|
4326
|
+
|
|
4327
|
+
**FacetListParams** (interface)
|
|
4328
|
+
```typescript
|
|
4329
|
+
interface FacetListParams {
|
|
4330
|
+
includeValues?: boolean
|
|
4331
|
+
includeDeleted?: boolean
|
|
4332
|
+
kind?: "system" | "custom"
|
|
4333
|
+
reserved?: boolean
|
|
4334
|
+
}
|
|
4335
|
+
```
|
|
4336
|
+
|
|
4337
|
+
**PublicFacetListParams** (interface)
|
|
4338
|
+
```typescript
|
|
4339
|
+
interface PublicFacetListParams {
|
|
4340
|
+
includeValues?: boolean
|
|
4341
|
+
}
|
|
4342
|
+
```
|
|
4343
|
+
|
|
4344
|
+
**FacetGetParams** (interface)
|
|
4345
|
+
```typescript
|
|
4346
|
+
interface FacetGetParams {
|
|
4347
|
+
includeValues?: boolean
|
|
4348
|
+
includeDeleted?: boolean
|
|
4349
|
+
}
|
|
4350
|
+
```
|
|
4351
|
+
|
|
4352
|
+
**FacetValueListParams** (interface)
|
|
4353
|
+
```typescript
|
|
4354
|
+
interface FacetValueListParams {
|
|
4355
|
+
includeDeleted?: boolean
|
|
4356
|
+
}
|
|
4357
|
+
```
|
|
4358
|
+
|
|
4359
|
+
**FacetValueGetParams** (interface)
|
|
4360
|
+
```typescript
|
|
4361
|
+
interface FacetValueGetParams {
|
|
4362
|
+
includeDeleted?: boolean
|
|
4363
|
+
}
|
|
4364
|
+
```
|
|
4365
|
+
|
|
4366
|
+
**FacetValueDefinition** = `FacetValue`
|
|
4367
|
+
|
|
4176
4368
|
### iframeResponder
|
|
4177
4369
|
|
|
4178
4370
|
**CachedData** (interface)
|
|
@@ -4861,6 +5053,174 @@ interface LocationSearchResponse {
|
|
|
4861
5053
|
|
|
4862
5054
|
**LocationPayload** = `Omit<`
|
|
4863
5055
|
|
|
5056
|
+
### loyalty
|
|
5057
|
+
|
|
5058
|
+
**LoyaltyScheme** (interface)
|
|
5059
|
+
```typescript
|
|
5060
|
+
interface LoyaltyScheme {
|
|
5061
|
+
id: string
|
|
5062
|
+
orgId: string
|
|
5063
|
+
collectionId: string
|
|
5064
|
+
name: string
|
|
5065
|
+
type: string
|
|
5066
|
+
active: boolean
|
|
5067
|
+
createdAt: string // ISO
|
|
5068
|
+
updatedAt: string // ISO
|
|
5069
|
+
deletedAt: string | null // ISO
|
|
5070
|
+
data: DataBlock
|
|
5071
|
+
owner?: DataBlock
|
|
5072
|
+
admin?: DataBlock
|
|
5073
|
+
}
|
|
5074
|
+
```
|
|
5075
|
+
|
|
5076
|
+
**LoyaltyMember** (interface)
|
|
5077
|
+
```typescript
|
|
5078
|
+
interface LoyaltyMember {
|
|
5079
|
+
id: string
|
|
5080
|
+
orgId: string
|
|
5081
|
+
collectionId: string
|
|
5082
|
+
schemeId: string
|
|
5083
|
+
contactId: string
|
|
5084
|
+
userId: string | null
|
|
5085
|
+
balance: number
|
|
5086
|
+
lifetimePoints: number
|
|
5087
|
+
createdAt: string // ISO
|
|
5088
|
+
updatedAt: string // ISO
|
|
5089
|
+
data: DataBlock
|
|
5090
|
+
owner?: DataBlock
|
|
5091
|
+
admin?: DataBlock
|
|
5092
|
+
}
|
|
5093
|
+
```
|
|
5094
|
+
|
|
5095
|
+
**LoyaltyTransaction** (interface)
|
|
5096
|
+
```typescript
|
|
5097
|
+
interface LoyaltyTransaction {
|
|
5098
|
+
id: string
|
|
5099
|
+
orgId: string
|
|
5100
|
+
collectionId: string
|
|
5101
|
+
schemeId: string
|
|
5102
|
+
memberId: string
|
|
5103
|
+
points: number
|
|
5104
|
+
reason: string | null
|
|
5105
|
+
idempotencyKey: string | null
|
|
5106
|
+
metadata: DataBlock
|
|
5107
|
+
createdAt: string // ISO
|
|
5108
|
+
}
|
|
5109
|
+
```
|
|
5110
|
+
|
|
5111
|
+
**LoyaltyEarningRule** (interface)
|
|
5112
|
+
```typescript
|
|
5113
|
+
interface LoyaltyEarningRule {
|
|
5114
|
+
id: string
|
|
5115
|
+
orgId: string
|
|
5116
|
+
collectionId: string
|
|
5117
|
+
schemeId: string
|
|
5118
|
+
interactionId: string
|
|
5119
|
+
points: number
|
|
5120
|
+
* Key-value conditions matched against the interaction event before awarding.
|
|
5121
|
+
* Supports top-level event fields (outcome, scope, status, eventType, etc.)
|
|
5122
|
+
* and dot-path into metadata (e.g. `"metadata.tier": "gold"`).
|
|
5123
|
+
* Empty object = always fires for any event on this interaction.
|
|
5124
|
+
conditions: Record<string, string>
|
|
5125
|
+
maxPerContact: number | null
|
|
5126
|
+
cooldownHours: number | null
|
|
5127
|
+
active: boolean
|
|
5128
|
+
createdAt: string // ISO
|
|
5129
|
+
updatedAt: string // ISO
|
|
5130
|
+
data: DataBlock
|
|
5131
|
+
}
|
|
5132
|
+
```
|
|
5133
|
+
|
|
5134
|
+
**LoyaltyTransactionResult** (interface)
|
|
5135
|
+
```typescript
|
|
5136
|
+
interface LoyaltyTransactionResult {
|
|
5137
|
+
member: LoyaltyMember
|
|
5138
|
+
transaction: LoyaltyTransaction
|
|
5139
|
+
}
|
|
5140
|
+
```
|
|
5141
|
+
|
|
5142
|
+
**LoyaltyPaginationParams** (interface)
|
|
5143
|
+
```typescript
|
|
5144
|
+
interface LoyaltyPaginationParams {
|
|
5145
|
+
limit?: number // default 50, max 200
|
|
5146
|
+
offset?: number
|
|
5147
|
+
}
|
|
5148
|
+
```
|
|
5149
|
+
|
|
5150
|
+
**LoyaltyPaginatedResult<T>** (interface)
|
|
5151
|
+
```typescript
|
|
5152
|
+
interface LoyaltyPaginatedResult<T> {
|
|
5153
|
+
items: T[]
|
|
5154
|
+
limit: number
|
|
5155
|
+
offset: number
|
|
5156
|
+
}
|
|
5157
|
+
```
|
|
5158
|
+
|
|
5159
|
+
**CreateLoyaltySchemeBody** (interface)
|
|
5160
|
+
```typescript
|
|
5161
|
+
interface CreateLoyaltySchemeBody {
|
|
5162
|
+
name: string
|
|
5163
|
+
type: string
|
|
5164
|
+
active?: boolean
|
|
5165
|
+
data?: DataBlock
|
|
5166
|
+
owner?: DataBlock
|
|
5167
|
+
admin?: DataBlock
|
|
5168
|
+
}
|
|
5169
|
+
```
|
|
5170
|
+
|
|
5171
|
+
**UpdateLoyaltySchemeBody** (interface)
|
|
5172
|
+
```typescript
|
|
5173
|
+
interface UpdateLoyaltySchemeBody {
|
|
5174
|
+
name?: string
|
|
5175
|
+
type?: string
|
|
5176
|
+
active?: boolean
|
|
5177
|
+
data?: DataBlock
|
|
5178
|
+
owner?: DataBlock
|
|
5179
|
+
admin?: DataBlock
|
|
5180
|
+
}
|
|
5181
|
+
```
|
|
5182
|
+
|
|
5183
|
+
**CreateLoyaltyEarningRuleBody** (interface)
|
|
5184
|
+
```typescript
|
|
5185
|
+
interface CreateLoyaltyEarningRuleBody {
|
|
5186
|
+
interactionId: string
|
|
5187
|
+
points: number
|
|
5188
|
+
conditions?: Record<string, string>
|
|
5189
|
+
maxPerContact?: number | null
|
|
5190
|
+
cooldownHours?: number | null
|
|
5191
|
+
active?: boolean
|
|
5192
|
+
data?: DataBlock
|
|
5193
|
+
}
|
|
5194
|
+
```
|
|
5195
|
+
|
|
5196
|
+
**UpdateLoyaltyEarningRuleBody** (interface)
|
|
5197
|
+
```typescript
|
|
5198
|
+
interface UpdateLoyaltyEarningRuleBody {
|
|
5199
|
+
points?: number
|
|
5200
|
+
conditions?: Record<string, string>
|
|
5201
|
+
maxPerContact?: number | null
|
|
5202
|
+
cooldownHours?: number | null
|
|
5203
|
+
active?: boolean
|
|
5204
|
+
data?: DataBlock
|
|
5205
|
+
}
|
|
5206
|
+
```
|
|
5207
|
+
|
|
5208
|
+
**RecordLoyaltyTransactionBody** (interface)
|
|
5209
|
+
```typescript
|
|
5210
|
+
interface RecordLoyaltyTransactionBody {
|
|
5211
|
+
points: number
|
|
5212
|
+
reason?: string
|
|
5213
|
+
* Optional caller-supplied key scoped to the scheme.
|
|
5214
|
+
* If a transaction with this key already exists the server returns 409.
|
|
5215
|
+
* Use to safely retry without double-crediting points.
|
|
5216
|
+
idempotencyKey?: string
|
|
5217
|
+
metadata?: DataBlock
|
|
5218
|
+
userId?: string
|
|
5219
|
+
}
|
|
5220
|
+
```
|
|
5221
|
+
|
|
5222
|
+
**DataBlock** = `Record<string, unknown>`
|
|
5223
|
+
|
|
4864
5224
|
### nfc
|
|
4865
5225
|
|
|
4866
5226
|
**NfcTagInfo** (interface)
|
|
@@ -5408,46 +5768,175 @@ interface CollectionSummaryResponse {
|
|
|
5408
5768
|
|
|
5409
5769
|
### product
|
|
5410
5770
|
|
|
5411
|
-
**
|
|
5771
|
+
**ProductKey** (interface)
|
|
5412
5772
|
```typescript
|
|
5413
|
-
interface
|
|
5414
|
-
id: string
|
|
5415
|
-
name: string
|
|
5773
|
+
interface ProductKey {
|
|
5416
5774
|
collectionId: string
|
|
5417
|
-
|
|
5418
|
-
|
|
5775
|
+
id: string
|
|
5776
|
+
}
|
|
5777
|
+
```
|
|
5778
|
+
|
|
5779
|
+
**ProductImageThumbnails** (interface)
|
|
5780
|
+
```typescript
|
|
5781
|
+
interface ProductImageThumbnails {
|
|
5782
|
+
x100?: string
|
|
5783
|
+
x200?: string
|
|
5784
|
+
x512?: string
|
|
5785
|
+
}
|
|
5786
|
+
```
|
|
5787
|
+
|
|
5788
|
+
**ProductImage** (interface)
|
|
5789
|
+
```typescript
|
|
5790
|
+
interface ProductImage {
|
|
5791
|
+
id?: string
|
|
5792
|
+
collectionId?: string
|
|
5793
|
+
productId?: string
|
|
5794
|
+
site?: string
|
|
5795
|
+
name?: string
|
|
5796
|
+
cleanName?: string
|
|
5797
|
+
assetType?: string
|
|
5419
5798
|
type?: string
|
|
5420
|
-
|
|
5421
|
-
|
|
5422
|
-
|
|
5423
|
-
|
|
5424
|
-
|
|
5799
|
+
url?: string
|
|
5800
|
+
thumbnails?: ProductImageThumbnails
|
|
5801
|
+
contentType?: string
|
|
5802
|
+
size?: string | number
|
|
5803
|
+
hash?: string
|
|
5804
|
+
createdAt?: ISODateString | null
|
|
5805
|
+
updatedAt?: ISODateString | null
|
|
5806
|
+
deletedAt?: ISODateString | null
|
|
5807
|
+
}
|
|
5808
|
+
```
|
|
5809
|
+
|
|
5810
|
+
**ProductImageUrlInput** (interface)
|
|
5811
|
+
```typescript
|
|
5812
|
+
interface ProductImageUrlInput {
|
|
5425
5813
|
url: string
|
|
5426
|
-
|
|
5427
|
-
|
|
5428
|
-
|
|
5429
|
-
|
|
5814
|
+
}
|
|
5815
|
+
```
|
|
5816
|
+
|
|
5817
|
+
**AdditionalGtin** (interface)
|
|
5818
|
+
```typescript
|
|
5819
|
+
interface AdditionalGtin {
|
|
5820
|
+
gtin: string
|
|
5821
|
+
owner?: boolean | null
|
|
5822
|
+
}
|
|
5823
|
+
```
|
|
5824
|
+
|
|
5825
|
+
**ProductFacetValue** (interface)
|
|
5826
|
+
```typescript
|
|
5827
|
+
interface ProductFacetValue {
|
|
5828
|
+
id?: string
|
|
5829
|
+
key: string
|
|
5830
|
+
slug?: string
|
|
5831
|
+
name: string
|
|
5832
|
+
shortName?: string
|
|
5833
|
+
description?: string
|
|
5834
|
+
color?: string
|
|
5835
|
+
icon?: string
|
|
5836
|
+
}
|
|
5837
|
+
```
|
|
5838
|
+
|
|
5839
|
+
**ProductFacetMap** (interface)
|
|
5840
|
+
```typescript
|
|
5841
|
+
interface ProductFacetMap {
|
|
5842
|
+
[facetKey: string]: ProductFacetValue[]
|
|
5843
|
+
}
|
|
5844
|
+
```
|
|
5845
|
+
|
|
5846
|
+
**ProductQueryRequest** (interface)
|
|
5847
|
+
```typescript
|
|
5848
|
+
interface ProductQueryRequest {
|
|
5849
|
+
query?: {
|
|
5850
|
+
search?: string
|
|
5851
|
+
status?: string[]
|
|
5852
|
+
category?: string[]
|
|
5853
|
+
type?: string[]
|
|
5854
|
+
schemaType?: string[]
|
|
5855
|
+
tags?: string[]
|
|
5856
|
+
productIds?: string[]
|
|
5857
|
+
sku?: string
|
|
5858
|
+
gtin?: string
|
|
5859
|
+
updatedAfter?: ISODateString
|
|
5860
|
+
updatedBefore?: ISODateString
|
|
5861
|
+
createdAfter?: ISODateString
|
|
5862
|
+
createdBefore?: ISODateString
|
|
5863
|
+
facetEquals?: Record<string, JsonValue>
|
|
5864
|
+
}
|
|
5865
|
+
sort?: Array<{
|
|
5866
|
+
field: string
|
|
5867
|
+
direction: 'asc' | 'desc'
|
|
5868
|
+
}>
|
|
5869
|
+
page?: {
|
|
5870
|
+
limit?: number
|
|
5871
|
+
offset?: number
|
|
5872
|
+
cursor?: string | null
|
|
5430
5873
|
}
|
|
5874
|
+
includeDeleted?: boolean
|
|
5875
|
+
}
|
|
5876
|
+
```
|
|
5877
|
+
|
|
5878
|
+
**ProductWriteInput** (interface)
|
|
5879
|
+
```typescript
|
|
5880
|
+
interface ProductWriteInput {
|
|
5881
|
+
id?: string
|
|
5882
|
+
name: string
|
|
5883
|
+
description?: string | null
|
|
5884
|
+
gtin?: string | null
|
|
5885
|
+
ownGtin?: boolean | null
|
|
5886
|
+
additionalGtins?: AdditionalGtin[]
|
|
5887
|
+
sku?: string | null
|
|
5888
|
+
schemaType?: string | null
|
|
5889
|
+
type?: string | null
|
|
5890
|
+
category?: string | null
|
|
5891
|
+
label?: string | null
|
|
5892
|
+
status?: string | null
|
|
5893
|
+
sortOrder?: number | null
|
|
5894
|
+
heroImage?: ProductImage | ProductImageUrlInput | string | null
|
|
5895
|
+
facets?: ProductFacetMap
|
|
5896
|
+
tags?: Record<string, boolean>
|
|
5897
|
+
data?: Record<string, JsonValue>
|
|
5898
|
+
admin?: ProductAdminData
|
|
5899
|
+
extra?: Record<string, JsonValue>
|
|
5900
|
+
validCollections?: string[]
|
|
5901
|
+
}
|
|
5902
|
+
```
|
|
5903
|
+
|
|
5904
|
+
**ProductQueryResponse** (interface)
|
|
5905
|
+
```typescript
|
|
5906
|
+
interface ProductQueryResponse {
|
|
5907
|
+
items: Product[]
|
|
5908
|
+
page?: {
|
|
5909
|
+
limit?: number
|
|
5910
|
+
offset?: number
|
|
5911
|
+
returned?: number
|
|
5912
|
+
total?: number
|
|
5913
|
+
hasMore?: boolean
|
|
5914
|
+
nextCursor?: string | null
|
|
5431
5915
|
}
|
|
5432
|
-
|
|
5433
|
-
|
|
5434
|
-
|
|
5435
|
-
|
|
5436
|
-
|
|
5437
|
-
|
|
5438
|
-
|
|
5439
|
-
allowAutoGenerateClaims?: boolean
|
|
5440
|
-
lastSerialId?: number
|
|
5441
|
-
[key: string]: any
|
|
5916
|
+
meta?: {
|
|
5917
|
+
apiVersion?: 'v1'
|
|
5918
|
+
mode?: 'canonical-products' | 'legacy-product-compatibility'
|
|
5919
|
+
source?: 'postgres' | 'firestore' | 'compatibility-layer'
|
|
5920
|
+
queryMode?: 'canonical' | 'compatibility'
|
|
5921
|
+
unsupportedFilters?: string[]
|
|
5922
|
+
supportedSortFields?: string[]
|
|
5442
5923
|
}
|
|
5443
5924
|
}
|
|
5444
5925
|
```
|
|
5445
5926
|
|
|
5927
|
+
**JsonPrimitive** = `string | number | boolean | null`
|
|
5928
|
+
|
|
5929
|
+
**JsonValue** = ``
|
|
5930
|
+
|
|
5931
|
+
**ISODateString** = `string`
|
|
5932
|
+
|
|
5933
|
+
**ProductClaimCreateRequestBody** = `Omit<ProductClaimCreateInput, 'collectionId' | 'id'>`
|
|
5934
|
+
|
|
5446
5935
|
**ProductResponse** = `Product`
|
|
5447
5936
|
|
|
5448
|
-
**ProductCreateRequest** = `
|
|
5937
|
+
**ProductCreateRequest** = `ProductWriteInput`
|
|
5449
5938
|
|
|
5450
|
-
**ProductUpdateRequest** = `Partial<Omit<
|
|
5939
|
+
**ProductUpdateRequest** = `Partial<Omit<ProductWriteInput, 'id'>>`
|
|
5451
5940
|
|
|
5452
5941
|
### proof
|
|
5453
5942
|
|
|
@@ -5931,6 +6420,10 @@ type VerifyTokenResponse = {
|
|
|
5931
6420
|
}
|
|
5932
6421
|
```
|
|
5933
6422
|
|
|
6423
|
+
### products (api)
|
|
6424
|
+
|
|
6425
|
+
**ProductPublicFindParams** = `Record<`
|
|
6426
|
+
|
|
5934
6427
|
## API Functions
|
|
5935
6428
|
|
|
5936
6429
|
### analytics.admin
|
|
@@ -6913,6 +7406,67 @@ Update a crate for a collection (admin only). ```typescript const updated = awai
|
|
|
6913
7406
|
crateId: string) → `Promise<DeleteCrateResponse>`
|
|
6914
7407
|
Delete a crate for a collection (admin only). This performs a soft delete. ```typescript await crate.remove('coll_123', 'crate_abc123') ```
|
|
6915
7408
|
|
|
7409
|
+
### facets
|
|
7410
|
+
|
|
7411
|
+
**list**(collectionId: string,
|
|
7412
|
+
params?: FacetListParams) → `Promise<FacetListResponse>`
|
|
7413
|
+
|
|
7414
|
+
**create**(collectionId: string,
|
|
7415
|
+
data: FacetDefinitionWriteInput) → `Promise<FacetDefinition>`
|
|
7416
|
+
|
|
7417
|
+
**get**(collectionId: string,
|
|
7418
|
+
facetKey: string,
|
|
7419
|
+
params?: FacetGetParams) → `Promise<FacetDefinition>`
|
|
7420
|
+
|
|
7421
|
+
**update**(collectionId: string,
|
|
7422
|
+
facetKey: string,
|
|
7423
|
+
data: FacetDefinitionWriteInput) → `Promise<FacetDefinition>`
|
|
7424
|
+
|
|
7425
|
+
**remove**(collectionId: string,
|
|
7426
|
+
facetKey: string) → `Promise<void>`
|
|
7427
|
+
|
|
7428
|
+
**listValues**(collectionId: string,
|
|
7429
|
+
facetKey: string,
|
|
7430
|
+
params?: FacetValueListParams) → `Promise<FacetValueListResponse>`
|
|
7431
|
+
|
|
7432
|
+
**createValue**(collectionId: string,
|
|
7433
|
+
facetKey: string,
|
|
7434
|
+
data: FacetValueWriteInput) → `Promise<FacetValueResponse>`
|
|
7435
|
+
|
|
7436
|
+
**getValue**(collectionId: string,
|
|
7437
|
+
facetKey: string,
|
|
7438
|
+
valueKey: string,
|
|
7439
|
+
params?: FacetValueGetParams) → `Promise<FacetValueResponse>`
|
|
7440
|
+
|
|
7441
|
+
**updateValue**(collectionId: string,
|
|
7442
|
+
facetKey: string,
|
|
7443
|
+
valueKey: string,
|
|
7444
|
+
data: FacetValueWriteInput) → `Promise<FacetValueResponse>`
|
|
7445
|
+
|
|
7446
|
+
**removeValue**(collectionId: string,
|
|
7447
|
+
facetKey: string,
|
|
7448
|
+
valueKey: string) → `Promise<void>`
|
|
7449
|
+
|
|
7450
|
+
**query**(collectionId: string,
|
|
7451
|
+
body: FacetQueryRequest) → `Promise<FacetQueryResponse>`
|
|
7452
|
+
|
|
7453
|
+
**publicList**(collectionId: string,
|
|
7454
|
+
params?: PublicFacetListParams) → `Promise<FacetListResponse>`
|
|
7455
|
+
|
|
7456
|
+
**publicGet**(collectionId: string,
|
|
7457
|
+
facetKey: string,
|
|
7458
|
+
params?: PublicFacetListParams) → `Promise<FacetDefinition>`
|
|
7459
|
+
|
|
7460
|
+
**publicListValues**(collectionId: string,
|
|
7461
|
+
facetKey: string) → `Promise<FacetValueListResponse>`
|
|
7462
|
+
|
|
7463
|
+
**publicGetValue**(collectionId: string,
|
|
7464
|
+
facetKey: string,
|
|
7465
|
+
valueKey: string) → `Promise<FacetValueResponse>`
|
|
7466
|
+
|
|
7467
|
+
**publicQuery**(collectionId: string,
|
|
7468
|
+
body: FacetQueryRequest) → `Promise<FacetQueryResponse>`
|
|
7469
|
+
|
|
6916
7470
|
### form
|
|
6917
7471
|
|
|
6918
7472
|
**get**(collectionId: string, formId: string, admin?: boolean) → `Promise<any>`
|
|
@@ -7064,6 +7618,89 @@ Public: Fetch a global location by ID GET /public/location/:locationId
|
|
|
7064
7618
|
locationId: string) → `Promise<Location>`
|
|
7065
7619
|
Public: Fetch a location for a collection; returns either a collection-owned or global fallback GET /public/collection/:collectionId/location/:locationId
|
|
7066
7620
|
|
|
7621
|
+
### loyalty
|
|
7622
|
+
|
|
7623
|
+
Loyalty programmes built on top of collections. Configure schemes and earning rules; contacts earn points automatically via interaction events. See the [Loyalty guide](loyalty.md) for the full walkthrough.
|
|
7624
|
+
|
|
7625
|
+
**list**(collectionId: string,
|
|
7626
|
+
params: { includeDeleted?: boolean } = {}) → `Promise<LoyaltyScheme[]>`
|
|
7627
|
+
|
|
7628
|
+
**get**(collectionId: string,
|
|
7629
|
+
schemeId: string) → `Promise<LoyaltyScheme>`
|
|
7630
|
+
|
|
7631
|
+
**create**(collectionId: string,
|
|
7632
|
+
body: CreateLoyaltySchemeBody) → `Promise<LoyaltyScheme>`
|
|
7633
|
+
|
|
7634
|
+
**update**(collectionId: string,
|
|
7635
|
+
schemeId: string,
|
|
7636
|
+
body: UpdateLoyaltySchemeBody) → `Promise<LoyaltyScheme>`
|
|
7637
|
+
|
|
7638
|
+
**remove**(collectionId: string,
|
|
7639
|
+
schemeId: string) → `Promise<LoyaltyScheme>`
|
|
7640
|
+
|
|
7641
|
+
**listEarningRules**(collectionId: string,
|
|
7642
|
+
schemeId: string) → `Promise<LoyaltyEarningRule[]>`
|
|
7643
|
+
|
|
7644
|
+
**getEarningRule**(collectionId: string,
|
|
7645
|
+
schemeId: string,
|
|
7646
|
+
ruleId: string) → `Promise<LoyaltyEarningRule>`
|
|
7647
|
+
|
|
7648
|
+
**createEarningRule**(collectionId: string,
|
|
7649
|
+
schemeId: string,
|
|
7650
|
+
body: CreateLoyaltyEarningRuleBody) → `Promise<LoyaltyEarningRule>`
|
|
7651
|
+
|
|
7652
|
+
**updateEarningRule**(collectionId: string,
|
|
7653
|
+
schemeId: string,
|
|
7654
|
+
ruleId: string,
|
|
7655
|
+
body: UpdateLoyaltyEarningRuleBody) → `Promise<LoyaltyEarningRule>`
|
|
7656
|
+
|
|
7657
|
+
**removeEarningRule**(collectionId: string,
|
|
7658
|
+
schemeId: string,
|
|
7659
|
+
ruleId: string) → `Promise<LoyaltyEarningRule>`
|
|
7660
|
+
|
|
7661
|
+
**listMembers**(collectionId: string,
|
|
7662
|
+
schemeId: string,
|
|
7663
|
+
params: LoyaltyPaginationParams = {}) → `Promise<LoyaltyPaginatedResult<LoyaltyMember>>`
|
|
7664
|
+
|
|
7665
|
+
**getMember**(collectionId: string,
|
|
7666
|
+
schemeId: string,
|
|
7667
|
+
contactId: string) → `Promise<LoyaltyMember>`
|
|
7668
|
+
|
|
7669
|
+
**recordTransaction**(collectionId: string,
|
|
7670
|
+
schemeId: string,
|
|
7671
|
+
contactId: string,
|
|
7672
|
+
body: RecordLoyaltyTransactionBody) → `Promise<LoyaltyTransactionResult>`
|
|
7673
|
+
Manually award or deduct points for a contact. - `points` must be a non-zero integer - Positive = award, negative = deduct - Deducting below zero returns HTTP 422 `INSUFFICIENT_BALANCE` - Supply `idempotencyKey` to safely retry without double-crediting Points earned via interaction events are awarded automatically by the server — this endpoint is for manual adjustments and admin overrides.
|
|
7674
|
+
|
|
7675
|
+
**getMemberHistory**(collectionId: string,
|
|
7676
|
+
schemeId: string,
|
|
7677
|
+
contactId: string,
|
|
7678
|
+
params: LoyaltyPaginationParams = {}) → `Promise<LoyaltyPaginatedResult<LoyaltyTransaction>>`
|
|
7679
|
+
Manually award or deduct points for a contact. - `points` must be a non-zero integer - Positive = award, negative = deduct - Deducting below zero returns HTTP 422 `INSUFFICIENT_BALANCE` - Supply `idempotencyKey` to safely retry without double-crediting Points earned via interaction events are awarded automatically by the server — this endpoint is for manual adjustments and admin overrides.
|
|
7680
|
+
|
|
7681
|
+
**publicList**(collectionId: string) → `Promise<LoyaltyScheme[]>`
|
|
7682
|
+
List active schemes for a collection. No authentication required.
|
|
7683
|
+
|
|
7684
|
+
**publicGet**(collectionId: string,
|
|
7685
|
+
schemeId: string) → `Promise<LoyaltyScheme>`
|
|
7686
|
+
Get a single active scheme. No authentication required.
|
|
7687
|
+
|
|
7688
|
+
**publicListEarningRules**(collectionId: string,
|
|
7689
|
+
schemeId: string) → `Promise<LoyaltyEarningRule[]>`
|
|
7690
|
+
List active earning rules for a scheme — useful for showing "how to earn" in a loyalty UI. No authentication required.
|
|
7691
|
+
|
|
7692
|
+
**publicGetMe**(collectionId: string) → `Promise<LoyaltySchemeWithMembership[]>`
|
|
7693
|
+
Get all active schemes with the caller's membership embedded in each. This is the primary entry point for a loyalty widget — one call gives you everything needed to render a user's loyalty status across all programs in a collection. - Authenticated: `member` is populated with balance + lifetimePoints (or null if not yet enrolled in that scheme) - Unauthenticated: `member` is null on all schemes
|
|
7694
|
+
|
|
7695
|
+
**publicGetMine**(collectionId: string,
|
|
7696
|
+
schemeId: string) → `Promise<LoyaltyMember>`
|
|
7697
|
+
Get the authenticated caller's membership (balance + lifetimePoints) on a specific scheme. Requires authentication.
|
|
7698
|
+
|
|
7699
|
+
**publicGetMineHistory**(collectionId: string,
|
|
7700
|
+
schemeId: string,
|
|
7701
|
+
params: LoyaltyPaginationParams = {}) → `Promise<LoyaltyPaginatedResult<LoyaltyTransaction>>`
|
|
7702
|
+
Get the authenticated caller's transaction history on a specific scheme. Ordered newest first. Requires authentication.
|
|
7703
|
+
|
|
7067
7704
|
### models
|
|
7068
7705
|
|
|
7069
7706
|
**list**(collectionId: string, params?: AIModelListParams) → `Promise<AIModelListResponse>`
|
|
@@ -7210,17 +7847,119 @@ Update a product for a collection (admin only). The `data` payload is a partial
|
|
|
7210
7847
|
productId: string) → `Promise<void>`
|
|
7211
7848
|
Delete a product for a collection (admin only).
|
|
7212
7849
|
|
|
7850
|
+
**query**(collectionId: string,
|
|
7851
|
+
body: ProductQueryRequest) → `Promise<ProductQueryResponse>`
|
|
7852
|
+
|
|
7853
|
+
**find**(collectionId: string,
|
|
7854
|
+
body: ProductQueryRequest) → `Promise<ProductQueryResponse>`
|
|
7855
|
+
|
|
7856
|
+
**publicFind**(collectionId: string,
|
|
7857
|
+
params?: ProductPublicFindParams) → `Promise<ProductResponse[]>`
|
|
7858
|
+
|
|
7859
|
+
**clone**(collectionId: string,
|
|
7860
|
+
productId: string,
|
|
7861
|
+
body: Record<string, JsonValue> = {}) → `Promise<ProductResponse>`
|
|
7862
|
+
|
|
7863
|
+
**listAssets**(collectionId: string,
|
|
7864
|
+
productId: string,
|
|
7865
|
+
admin?: boolean) → `Promise<unknown>`
|
|
7866
|
+
|
|
7867
|
+
**createClaimWindow**(collectionId: string,
|
|
7868
|
+
productId: string,
|
|
7869
|
+
body: Record<string, JsonValue>) → `Promise<unknown>`
|
|
7870
|
+
|
|
7871
|
+
**updateClaimWindow**(collectionId: string,
|
|
7872
|
+
productId: string,
|
|
7873
|
+
claimId: string,
|
|
7874
|
+
body: Record<string, JsonValue>) → `Promise<unknown>`
|
|
7875
|
+
|
|
7876
|
+
**refresh**(collectionId: string,
|
|
7877
|
+
productId: string) → `Promise<ProductResponse>`
|
|
7878
|
+
|
|
7213
7879
|
**getSN**(collectionId: string,
|
|
7214
7880
|
productId: string,
|
|
7215
7881
|
startIndex: number = 0,
|
|
7216
|
-
count: number = 10) → `Promise<
|
|
7882
|
+
count: number = 10) → `Promise<unknown>`
|
|
7217
7883
|
Get serial numbers for a product (admin only).
|
|
7218
7884
|
|
|
7219
7885
|
**lookupSN**(collectionId: string,
|
|
7220
7886
|
productId: string,
|
|
7221
|
-
codeId: string) → `Promise<
|
|
7887
|
+
codeId: string) → `Promise<unknown>`
|
|
7222
7888
|
Look up a serial number by code for a product (admin only).
|
|
7223
7889
|
|
|
7890
|
+
**publicLookupClaim**(collectionId: string,
|
|
7891
|
+
productId: string,
|
|
7892
|
+
claimId: string) → `Promise<unknown>`
|
|
7893
|
+
|
|
7894
|
+
**publicCreateClaim**(collectionId: string,
|
|
7895
|
+
productId: string,
|
|
7896
|
+
body: ProductClaimCreateRequestBody) → `Promise<unknown>`
|
|
7897
|
+
|
|
7898
|
+
### products
|
|
7899
|
+
|
|
7900
|
+
**get**(collectionId: string,
|
|
7901
|
+
productId: string,
|
|
7902
|
+
admin?: boolean) → `Promise<ProductResponse>`
|
|
7903
|
+
|
|
7904
|
+
**list**(collectionId: string,
|
|
7905
|
+
admin?: boolean) → `Promise<ProductResponse[]>`
|
|
7906
|
+
|
|
7907
|
+
**create**(collectionId: string,
|
|
7908
|
+
data: ProductCreateRequest) → `Promise<ProductResponse>`
|
|
7909
|
+
|
|
7910
|
+
**update**(collectionId: string,
|
|
7911
|
+
productId: string,
|
|
7912
|
+
data: ProductUpdateRequest) → `Promise<ProductResponse>`
|
|
7913
|
+
|
|
7914
|
+
**remove**(collectionId: string,
|
|
7915
|
+
productId: string) → `Promise<void>`
|
|
7916
|
+
|
|
7917
|
+
**query**(collectionId: string,
|
|
7918
|
+
body: ProductQueryRequest) → `Promise<ProductQueryResponse>`
|
|
7919
|
+
|
|
7920
|
+
**find**(collectionId: string,
|
|
7921
|
+
body: ProductQueryRequest | Record<string, JsonValue>) → `Promise<ProductQueryResponse>`
|
|
7922
|
+
|
|
7923
|
+
**publicFind**(collectionId: string,
|
|
7924
|
+
params?: ProductPublicFindParams) → `Promise<ProductResponse[]>`
|
|
7925
|
+
|
|
7926
|
+
**clone**(collectionId: string,
|
|
7927
|
+
productId: string,
|
|
7928
|
+
body: Record<string, JsonValue> = {}) → `Promise<ProductResponse>`
|
|
7929
|
+
|
|
7930
|
+
**listAssets**(collectionId: string,
|
|
7931
|
+
productId: string,
|
|
7932
|
+
admin?: boolean) → `Promise<unknown>`
|
|
7933
|
+
|
|
7934
|
+
**createClaimWindow**(collectionId: string,
|
|
7935
|
+
productId: string,
|
|
7936
|
+
body: Record<string, JsonValue>) → `Promise<unknown>`
|
|
7937
|
+
|
|
7938
|
+
**updateClaimWindow**(collectionId: string,
|
|
7939
|
+
productId: string,
|
|
7940
|
+
claimId: string,
|
|
7941
|
+
body: Record<string, JsonValue>) → `Promise<unknown>`
|
|
7942
|
+
|
|
7943
|
+
**refresh**(collectionId: string,
|
|
7944
|
+
productId: string) → `Promise<ProductResponse>`
|
|
7945
|
+
|
|
7946
|
+
**getSN**(collectionId: string,
|
|
7947
|
+
productId: string,
|
|
7948
|
+
startIndex: number = 0,
|
|
7949
|
+
count: number = 10) → `Promise<unknown>`
|
|
7950
|
+
|
|
7951
|
+
**lookupSN**(collectionId: string,
|
|
7952
|
+
productId: string,
|
|
7953
|
+
codeId: string) → `Promise<unknown>`
|
|
7954
|
+
|
|
7955
|
+
**publicLookupClaim**(collectionId: string,
|
|
7956
|
+
productId: string,
|
|
7957
|
+
claimId: string) → `Promise<unknown>`
|
|
7958
|
+
|
|
7959
|
+
**publicCreateClaim**(collectionId: string,
|
|
7960
|
+
productId: string,
|
|
7961
|
+
body: ProductClaimCreateRequestBody) → `Promise<unknown>`
|
|
7962
|
+
|
|
7224
7963
|
### proof
|
|
7225
7964
|
|
|
7226
7965
|
**get**(collectionId: string,
|