@proveanything/smartlinks 1.0.55 → 1.0.58
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/API_SUMMARY.md +157 -96
- package/dist/api/nfc.d.ts +12 -1
- package/dist/api/nfc.js +15 -1
- package/dist/types/claimSet.d.ts +0 -22
- package/dist/types/collection.d.ts +0 -14
- package/dist/types/comms.d.ts +0 -30
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/nfc.d.ts +41 -0
- package/dist/types/nfc.js +2 -0
- package/dist/types/product.d.ts +0 -8
- package/dist/types/proof.d.ts +2 -7
- package/package.json +1 -1
package/API_SUMMARY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Smartlinks API Summary
|
|
2
2
|
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.58 | Generated: 2025-12-10T12:43:07.554Z
|
|
4
4
|
|
|
5
5
|
This is a concise summary of all available API functions and types.
|
|
6
6
|
|
|
@@ -108,29 +108,29 @@ interface AssetResponse {
|
|
|
108
108
|
**AttestationResponse** (interface)
|
|
109
109
|
```typescript
|
|
110
110
|
interface AttestationResponse {
|
|
111
|
-
id: string
|
|
112
|
-
createdAt: string
|
|
113
|
-
updatedAt: string
|
|
114
|
-
public: Record<string, any>
|
|
115
|
-
private: Record<string, any>
|
|
116
|
-
proof: Record<string, any>
|
|
111
|
+
id: string // Attestation id
|
|
112
|
+
createdAt: string // Creation timestamp
|
|
113
|
+
updatedAt: string // Last updated timestamp
|
|
114
|
+
public: Record<string, any> // Public attestation data
|
|
115
|
+
private: Record<string, any> // Private attestation data
|
|
116
|
+
proof: Record<string, any> // Associated proof reference/data
|
|
117
117
|
}
|
|
118
118
|
```
|
|
119
119
|
|
|
120
120
|
**AttestationCreateRequest** (interface)
|
|
121
121
|
```typescript
|
|
122
122
|
interface AttestationCreateRequest {
|
|
123
|
-
public: Record<string, any>
|
|
124
|
-
private: Record<string, any>
|
|
125
|
-
proof: Record<string, any>
|
|
123
|
+
public: Record<string, any> // Public attestation payload
|
|
124
|
+
private: Record<string, any> // Private attestation payload
|
|
125
|
+
proof: Record<string, any> // Proof linkage or payload
|
|
126
126
|
}
|
|
127
127
|
```
|
|
128
128
|
|
|
129
129
|
**AttestationUpdateRequest** (interface)
|
|
130
130
|
```typescript
|
|
131
131
|
interface AttestationUpdateRequest {
|
|
132
|
-
type?: string
|
|
133
|
-
data?: Record<string, any>
|
|
132
|
+
type?: string // Update operation/type
|
|
133
|
+
data?: Record<string, any> // Partial attestation data
|
|
134
134
|
}
|
|
135
135
|
```
|
|
136
136
|
|
|
@@ -139,13 +139,13 @@ interface AttestationUpdateRequest {
|
|
|
139
139
|
**UserAccountRegistrationRequest** (type)
|
|
140
140
|
```typescript
|
|
141
141
|
type UserAccountRegistrationRequest = {
|
|
142
|
-
name: string
|
|
143
|
-
email?: string
|
|
144
|
-
phone?: string
|
|
145
|
-
password?: string
|
|
146
|
-
sendAccountConfirmation?: boolean
|
|
147
|
-
collectionId?: string,
|
|
148
|
-
tokenType?: 'bearer' | 'firebase'
|
|
142
|
+
name: string // User's display name
|
|
143
|
+
email?: string // Optional user email
|
|
144
|
+
phone?: string // Optional user phone number
|
|
145
|
+
password?: string // Optional password for email login
|
|
146
|
+
sendAccountConfirmation?: boolean // Send confirmation email after registration
|
|
147
|
+
collectionId?: string, // Optional collection context for registration
|
|
148
|
+
tokenType?: 'bearer' | 'firebase' // Desired token type returned
|
|
149
149
|
}
|
|
150
150
|
```
|
|
151
151
|
|
|
@@ -320,30 +320,30 @@ interface AuthKitConfig {
|
|
|
320
320
|
**ClaimCodeRef** (interface)
|
|
321
321
|
```typescript
|
|
322
322
|
interface ClaimCodeRef {
|
|
323
|
-
codeId: string
|
|
324
|
-
claimId: string
|
|
323
|
+
codeId: string // Identifier of the code (e.g., tag or QR code)
|
|
324
|
+
claimId: string // Identifier of the claim within the claim set
|
|
325
325
|
}
|
|
326
326
|
```
|
|
327
327
|
|
|
328
328
|
**UpdateClaimDataRequest** (interface)
|
|
329
329
|
```typescript
|
|
330
330
|
interface UpdateClaimDataRequest {
|
|
331
|
-
data: Record<string, any>
|
|
332
|
-
codes: ClaimCodeRef[]
|
|
331
|
+
data: Record<string, any> // Arbitrary key/value pairs for the claim data update
|
|
332
|
+
codes: ClaimCodeRef[] // Array of code+claim references affected by this update
|
|
333
333
|
}
|
|
334
334
|
```
|
|
335
335
|
|
|
336
336
|
**AssignClaimsRequest** (interface)
|
|
337
337
|
```typescript
|
|
338
338
|
interface AssignClaimsRequest {
|
|
339
|
-
id: string
|
|
340
|
-
collectionId: string
|
|
341
|
-
productId: string
|
|
342
|
-
batchId?: string
|
|
343
|
-
start?: number
|
|
344
|
-
end?: number
|
|
345
|
-
codeId?: string
|
|
346
|
-
data?: Record<string, any>
|
|
339
|
+
id: string // The claim set ID (required)
|
|
340
|
+
collectionId: string // The collection ID (required)
|
|
341
|
+
productId: string // The product ID (required)
|
|
342
|
+
batchId?: string // Optional batch identifier
|
|
343
|
+
start?: number // Optional start index for bulk assignment
|
|
344
|
+
end?: number // Optional end index for bulk assignment
|
|
345
|
+
codeId?: string // Optional single code identifier for single assignment
|
|
346
|
+
data?: Record<string, any> // Optional key/value pairs to set on the claim
|
|
347
347
|
}
|
|
348
348
|
```
|
|
349
349
|
|
|
@@ -352,43 +352,43 @@ interface AssignClaimsRequest {
|
|
|
352
352
|
**CollectionResponse** (interface)
|
|
353
353
|
```typescript
|
|
354
354
|
interface CollectionResponse {
|
|
355
|
-
id: string
|
|
356
|
-
title: string
|
|
357
|
-
description: string
|
|
355
|
+
id: string // Unique identifier for the collection
|
|
356
|
+
title: string // Human-readable title of the collection
|
|
357
|
+
description: string // Description of collection
|
|
358
358
|
headerImage?: {
|
|
359
|
-
url: string
|
|
360
|
-
thumbnails: {
|
|
359
|
+
url: string // URL to the asset
|
|
360
|
+
thumbnails: { // Thumbnail URLs in different sizes
|
|
361
361
|
x100: string
|
|
362
362
|
x200: string
|
|
363
363
|
x512: string
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
366
|
logoImage?: {
|
|
367
|
-
url: string
|
|
368
|
-
thumbnails: {
|
|
367
|
+
url: string // URL to the asset
|
|
368
|
+
thumbnails: { // Thumbnail URLs in different sizes
|
|
369
369
|
x100: string
|
|
370
370
|
x200: string
|
|
371
371
|
x512: string
|
|
372
372
|
}
|
|
373
373
|
}
|
|
374
374
|
loaderImage?: {
|
|
375
|
-
overwriteName: string
|
|
376
|
-
name: string
|
|
377
|
-
type: string
|
|
378
|
-
url: string
|
|
375
|
+
overwriteName: string // Override name for the file
|
|
376
|
+
name: string // Name of the asset
|
|
377
|
+
type: string // File type/extension
|
|
378
|
+
url: string // URL to the asset
|
|
379
379
|
}
|
|
380
380
|
languages?: {
|
|
381
|
-
code: string
|
|
382
|
-
lang: string
|
|
383
|
-
supported: boolean
|
|
381
|
+
code: string // Language code (e.g., "fr", "it", "es")
|
|
382
|
+
lang: string // Human-readable language name (e.g., "French", "Italian")
|
|
383
|
+
supported: boolean // Whether this language is supported
|
|
384
384
|
}[],
|
|
385
385
|
roles: {
|
|
386
386
|
[userId: string]: string
|
|
387
|
-
}
|
|
388
|
-
groupTags?: string[]
|
|
389
|
-
redirectUrl?: string
|
|
390
|
-
shortId: string,
|
|
391
|
-
dark?: boolean
|
|
387
|
+
} // User roles mapping with user IDs as keys and role names as values
|
|
388
|
+
groupTags?: string[] // Array of group tag names
|
|
389
|
+
redirectUrl?: string // Whether the collection has a custom domain
|
|
390
|
+
shortId: string, // The shortId of this collection
|
|
391
|
+
dark?: boolean // if dark mode is enabled for this collection
|
|
392
392
|
}
|
|
393
393
|
```
|
|
394
394
|
|
|
@@ -397,25 +397,25 @@ interface CollectionResponse {
|
|
|
397
397
|
**NotificationSubjectTarget** (interface)
|
|
398
398
|
```typescript
|
|
399
399
|
interface NotificationSubjectTarget {
|
|
400
|
-
type: 'product' | 'collection' | 'user' | 'batch' | 'proof'
|
|
401
|
-
id: string
|
|
400
|
+
type: 'product' | 'collection' | 'user' | 'batch' | 'proof' // Type of target entity
|
|
401
|
+
id: string // ID of the target entity
|
|
402
402
|
}
|
|
403
403
|
```
|
|
404
404
|
|
|
405
405
|
**PushNotificationTemplate** (interface)
|
|
406
406
|
```typescript
|
|
407
407
|
interface PushNotificationTemplate {
|
|
408
|
-
title: string
|
|
409
|
-
body: string
|
|
410
|
-
icon?: string
|
|
408
|
+
title: string // Notification title
|
|
409
|
+
body: string // Notification body text
|
|
410
|
+
icon?: string // Optional icon URL for the notification
|
|
411
411
|
}
|
|
412
412
|
```
|
|
413
413
|
|
|
414
414
|
**EmailNotificationTemplate** (interface)
|
|
415
415
|
```typescript
|
|
416
416
|
interface EmailNotificationTemplate {
|
|
417
|
-
subject: string
|
|
418
|
-
body: string
|
|
417
|
+
subject: string // Email subject line
|
|
418
|
+
body: string // Email body content (plain text or HTML)
|
|
419
419
|
}
|
|
420
420
|
```
|
|
421
421
|
|
|
@@ -423,9 +423,9 @@ interface EmailNotificationTemplate {
|
|
|
423
423
|
```typescript
|
|
424
424
|
interface WalletUpdateTemplate {
|
|
425
425
|
textModulesData?: Array<{
|
|
426
|
-
id: string
|
|
427
|
-
header: string
|
|
428
|
-
body: string
|
|
426
|
+
id: string // Module ID
|
|
427
|
+
header: string // Module header text
|
|
428
|
+
body: string // Module body text
|
|
429
429
|
}>
|
|
430
430
|
}
|
|
431
431
|
```
|
|
@@ -433,42 +433,42 @@ interface WalletUpdateTemplate {
|
|
|
433
433
|
**NotificationTemplate** (interface)
|
|
434
434
|
```typescript
|
|
435
435
|
interface NotificationTemplate {
|
|
436
|
-
push?: PushNotificationTemplate
|
|
437
|
-
email?: EmailNotificationTemplate
|
|
438
|
-
walletUpdate?: WalletUpdateTemplate
|
|
436
|
+
push?: PushNotificationTemplate // Push notification content
|
|
437
|
+
email?: EmailNotificationTemplate // Email notification content
|
|
438
|
+
walletUpdate?: WalletUpdateTemplate // Wallet pass update content
|
|
439
439
|
}
|
|
440
440
|
```
|
|
441
441
|
|
|
442
442
|
**SendNotificationRequest** (interface)
|
|
443
443
|
```typescript
|
|
444
444
|
interface SendNotificationRequest {
|
|
445
|
-
subjectTargets: NotificationSubjectTarget[]
|
|
446
|
-
severity: 'low' | 'normal' | 'important' | 'critical'
|
|
447
|
-
mode: 'preferred' | 'all'
|
|
448
|
-
channels : ("push" | "email" | "wallet")[]
|
|
449
|
-
template: NotificationTemplate
|
|
445
|
+
subjectTargets: NotificationSubjectTarget[] // Target subjects that should receive the notification
|
|
446
|
+
severity: 'low' | 'normal' | 'important' | 'critical' // Severity level of the notification
|
|
447
|
+
mode: 'preferred' | 'all' // Delivery channel mode preference
|
|
448
|
+
channels : ("push" | "email" | "wallet")[] // Specific channels to use for delivery
|
|
449
|
+
template: NotificationTemplate // Notification content templates for different delivery methods
|
|
450
450
|
}
|
|
451
451
|
```
|
|
452
452
|
|
|
453
453
|
**SendNotificationResponse** (interface)
|
|
454
454
|
```typescript
|
|
455
455
|
interface SendNotificationResponse {
|
|
456
|
-
ok: boolean
|
|
457
|
-
notificationId: string
|
|
458
|
-
counts: {
|
|
456
|
+
ok: boolean // Whether the request was accepted
|
|
457
|
+
notificationId: string // Unique ID for this notification
|
|
458
|
+
counts: { // Basic counts for contacts and attempts
|
|
459
459
|
contacts: number
|
|
460
460
|
attempts: number
|
|
461
461
|
}
|
|
462
|
-
status: {
|
|
462
|
+
status: { // Detailed status for the notification
|
|
463
463
|
notification: {
|
|
464
|
-
notificationId: string
|
|
465
|
-
state: 'queued' | 'sent' | 'failed' | 'confirmed' | string
|
|
466
|
-
subjectTargets: NotificationSubjectTarget[]
|
|
467
|
-
severity: 'low' | 'normal' | 'important' | 'critical' | string
|
|
468
|
-
channelsOverride: Record<string, any>
|
|
469
|
-
template: NotificationTemplate
|
|
464
|
+
notificationId: string // The notification ID (repeated for convenience)
|
|
465
|
+
state: 'queued' | 'sent' | 'failed' | 'confirmed' | string // Current processing state
|
|
466
|
+
subjectTargets: NotificationSubjectTarget[] // Targets this notification refers to
|
|
467
|
+
severity: 'low' | 'normal' | 'important' | 'critical' | string // Severity of this notification
|
|
468
|
+
channelsOverride: Record<string, any> // Optional channel overrides used when sending
|
|
469
|
+
template: NotificationTemplate // The effective template used
|
|
470
470
|
}
|
|
471
|
-
totals: {
|
|
471
|
+
totals: { // Totals across all contacts
|
|
472
472
|
queued: number
|
|
473
473
|
sent: number
|
|
474
474
|
failed: number
|
|
@@ -488,20 +488,79 @@ interface ErrorResponse {
|
|
|
488
488
|
}
|
|
489
489
|
```
|
|
490
490
|
|
|
491
|
+
### nfc
|
|
492
|
+
|
|
493
|
+
**NfcTagInfo** (interface)
|
|
494
|
+
```typescript
|
|
495
|
+
interface NfcTagInfo {
|
|
496
|
+
id: string
|
|
497
|
+
tagId: string
|
|
498
|
+
claimSetId: string
|
|
499
|
+
collectionId?: string
|
|
500
|
+
productId?: string
|
|
501
|
+
batchId?: string
|
|
502
|
+
variantId?: string
|
|
503
|
+
proofId?: string
|
|
504
|
+
index?: number
|
|
505
|
+
data?: Record<string, any>
|
|
506
|
+
}
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
**NfcValidateRequest** (interface)
|
|
510
|
+
```typescript
|
|
511
|
+
interface NfcValidateRequest {
|
|
512
|
+
claimSetId: string
|
|
513
|
+
codeId: string
|
|
514
|
+
mirror?: string
|
|
515
|
+
userId?: string
|
|
516
|
+
}
|
|
517
|
+
```
|
|
518
|
+
|
|
519
|
+
**NfcValidateResponse** (interface)
|
|
520
|
+
```typescript
|
|
521
|
+
interface NfcValidateResponse {
|
|
522
|
+
claimSetId: string
|
|
523
|
+
codeId: string
|
|
524
|
+
tagId: string
|
|
525
|
+
index?: number
|
|
526
|
+
isAdmin: boolean
|
|
527
|
+
path?: string
|
|
528
|
+
collectionId?: string
|
|
529
|
+
collection?: Record<string, any>
|
|
530
|
+
count: number,
|
|
531
|
+
previousCount: number
|
|
532
|
+
data?: Record<string, any>
|
|
533
|
+
productId?: string
|
|
534
|
+
product?: Record<string, any>
|
|
535
|
+
batchId?: string
|
|
536
|
+
variantId?: string
|
|
537
|
+
proofId?: string
|
|
538
|
+
}
|
|
539
|
+
```
|
|
540
|
+
|
|
541
|
+
**NfcClaimTagRequest** (interface)
|
|
542
|
+
```typescript
|
|
543
|
+
interface NfcClaimTagRequest {
|
|
544
|
+
claimSetId: string
|
|
545
|
+
codeId: string
|
|
546
|
+
data: Record<string, any>
|
|
547
|
+
}
|
|
548
|
+
```
|
|
549
|
+
|
|
491
550
|
### product
|
|
492
551
|
|
|
493
552
|
**ProductResponse** (interface)
|
|
494
553
|
```typescript
|
|
495
554
|
interface ProductResponse {
|
|
496
|
-
id: string
|
|
497
|
-
name: string
|
|
498
|
-
collectionId: string
|
|
499
|
-
description: string
|
|
500
|
-
gtin?: string
|
|
501
|
-
type?: string
|
|
555
|
+
id: string // Unique identifier for the product
|
|
556
|
+
name: string // Name of the product
|
|
557
|
+
collectionId: string // Unique identifier for the product's collection
|
|
558
|
+
description: string // Detailed description of the product
|
|
559
|
+
gtin?: string // A product GTIN (Global Trade Item Number)
|
|
560
|
+
type?: string // An optional product type from the standard smartlinks types
|
|
502
561
|
heroImage: {
|
|
503
|
-
url: string
|
|
504
|
-
thumbnails: {
|
|
562
|
+
url: string // URL to the asset
|
|
563
|
+
thumbnails: { // Thumbnail URLs in different sizes
|
|
505
564
|
x100: string
|
|
506
565
|
x200: string
|
|
507
566
|
x512: string
|
|
@@ -509,10 +568,10 @@ interface ProductResponse {
|
|
|
509
568
|
}
|
|
510
569
|
tags: {
|
|
511
570
|
[tagName: string]: boolean
|
|
512
|
-
}
|
|
571
|
+
} // Flexible map of tags with true/false values
|
|
513
572
|
data: {
|
|
514
573
|
[key: string]: any
|
|
515
|
-
}
|
|
574
|
+
} // Flexible key/value data map
|
|
516
575
|
}
|
|
517
576
|
```
|
|
518
577
|
|
|
@@ -525,13 +584,15 @@ interface ProductResponse {
|
|
|
525
584
|
**ProofResponse** (interface)
|
|
526
585
|
```typescript
|
|
527
586
|
interface ProofResponse {
|
|
528
|
-
collectionId: string
|
|
529
|
-
createdAt: string
|
|
530
|
-
id: string
|
|
531
|
-
productId: string
|
|
532
|
-
tokenId: string
|
|
533
|
-
userId: string
|
|
534
|
-
|
|
587
|
+
collectionId: string // Unique identifier for the collection
|
|
588
|
+
createdAt: string // Creation timestamp
|
|
589
|
+
id: string // Unique identifier for the proof
|
|
590
|
+
productId: string // Unique identifier for the product
|
|
591
|
+
tokenId: string // Unique identifier for the token
|
|
592
|
+
userId: string // Unique identifier for the user
|
|
593
|
+
claimable: boolean // Is this proof available to be claimed
|
|
594
|
+
transient: boolean // Is this proof transient
|
|
595
|
+
values: Record<string, any> // Arbitrary key-value pairs for proof values
|
|
535
596
|
}
|
|
536
597
|
```
|
|
537
598
|
|
package/dist/api/nfc.d.ts
CHANGED
|
@@ -1,7 +1,18 @@
|
|
|
1
|
+
import type { NfcValidateRequest, NfcValidateResponse, NfcTagInfo, NfcClaimTagRequest } from "../types/nfc";
|
|
1
2
|
export declare const nfc: {
|
|
2
3
|
/**
|
|
3
4
|
* Claim an NFC tag (public).
|
|
4
5
|
* POST /api/va/public/nfc/claimTag
|
|
5
6
|
*/
|
|
6
|
-
claimTag
|
|
7
|
+
claimTag(data: NfcClaimTagRequest): Promise<NfcTagInfo>;
|
|
8
|
+
/**
|
|
9
|
+
* Validate an NFC tag payload (public).
|
|
10
|
+
* POST /public/nfc/validate
|
|
11
|
+
*/
|
|
12
|
+
validate(data: NfcValidateRequest): Promise<NfcValidateResponse>;
|
|
13
|
+
/**
|
|
14
|
+
* Lookup a tag by its ID (public).
|
|
15
|
+
* GET /public/nfc/findByTag/:tagId
|
|
16
|
+
*/
|
|
17
|
+
lookupTag(tagId: string): Promise<NfcTagInfo[]>;
|
|
7
18
|
};
|
package/dist/api/nfc.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/api/nfc.ts
|
|
2
|
-
import { post } from "../http";
|
|
2
|
+
import { post, request } from "../http";
|
|
3
3
|
export const nfc = {
|
|
4
4
|
/**
|
|
5
5
|
* Claim an NFC tag (public).
|
|
@@ -8,4 +8,18 @@ export const nfc = {
|
|
|
8
8
|
async claimTag(data) {
|
|
9
9
|
return post("/public/nfc/claimTag", data);
|
|
10
10
|
},
|
|
11
|
+
/**
|
|
12
|
+
* Validate an NFC tag payload (public).
|
|
13
|
+
* POST /public/nfc/validate
|
|
14
|
+
*/
|
|
15
|
+
async validate(data) {
|
|
16
|
+
return post("/public/nfc/validate", data);
|
|
17
|
+
},
|
|
18
|
+
/**
|
|
19
|
+
* Lookup a tag by its ID (public).
|
|
20
|
+
* GET /public/nfc/findByTag/:tagId
|
|
21
|
+
*/
|
|
22
|
+
async lookupTag(tagId) {
|
|
23
|
+
return request(`/public/nfc/findByTag/${encodeURIComponent(tagId)}`);
|
|
24
|
+
},
|
|
11
25
|
};
|
package/dist/types/claimSet.d.ts
CHANGED
|
@@ -1,40 +1,18 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Reference to a specific claim attached to a code/tag.
|
|
3
|
-
*/
|
|
4
1
|
export interface ClaimCodeRef {
|
|
5
|
-
/** Identifier of the code (e.g., tag or QR code) */
|
|
6
2
|
codeId: string;
|
|
7
|
-
/** Identifier of the claim within the claim set */
|
|
8
3
|
claimId: string;
|
|
9
4
|
}
|
|
10
|
-
/**
|
|
11
|
-
* Request body for updating claim data on a claim set.
|
|
12
|
-
* Contains arbitrary key/value pairs and a list of code+claim references to update.
|
|
13
|
-
*/
|
|
14
5
|
export interface UpdateClaimDataRequest {
|
|
15
|
-
/** Arbitrary key/value pairs for the claim data update */
|
|
16
6
|
data: Record<string, any>;
|
|
17
|
-
/** Array of code+claim references affected by this update */
|
|
18
7
|
codes: ClaimCodeRef[];
|
|
19
8
|
}
|
|
20
|
-
/**
|
|
21
|
-
* Request body for assigning claims to codes or ranges within a collection.
|
|
22
|
-
*/
|
|
23
9
|
export interface AssignClaimsRequest {
|
|
24
|
-
/** The claim set ID (required) */
|
|
25
10
|
id: string;
|
|
26
|
-
/** The collection ID (required) */
|
|
27
11
|
collectionId: string;
|
|
28
|
-
/** The product ID (required) */
|
|
29
12
|
productId: string;
|
|
30
|
-
/** Optional batch identifier */
|
|
31
13
|
batchId?: string;
|
|
32
|
-
/** Optional start index for bulk assignment */
|
|
33
14
|
start?: number;
|
|
34
|
-
/** Optional end index for bulk assignment */
|
|
35
15
|
end?: number;
|
|
36
|
-
/** Optional single code identifier for single assignment */
|
|
37
16
|
codeId?: string;
|
|
38
|
-
/** Optional key/value pairs to set on the claim */
|
|
39
17
|
data?: Record<string, any>;
|
|
40
18
|
}
|
|
@@ -2,17 +2,12 @@
|
|
|
2
2
|
* Represents a Collection object.
|
|
3
3
|
*/
|
|
4
4
|
export interface CollectionResponse {
|
|
5
|
-
/** Unique identifier for the collection */
|
|
6
5
|
id: string;
|
|
7
|
-
/** Human-readable title of the collection */
|
|
8
6
|
title: string;
|
|
9
|
-
/** Description of collection */
|
|
10
7
|
description: string;
|
|
11
8
|
/** URL to the collection's larger header/hero image */
|
|
12
9
|
headerImage?: {
|
|
13
|
-
/** URL to the asset */
|
|
14
10
|
url: string;
|
|
15
|
-
/** Thumbnail URLs in different sizes */
|
|
16
11
|
thumbnails: {
|
|
17
12
|
x100: string;
|
|
18
13
|
x200: string;
|
|
@@ -21,9 +16,7 @@ export interface CollectionResponse {
|
|
|
21
16
|
};
|
|
22
17
|
/** URL to the collection's logo image */
|
|
23
18
|
logoImage?: {
|
|
24
|
-
/** URL to the asset */
|
|
25
19
|
url: string;
|
|
26
|
-
/** Thumbnail URLs in different sizes */
|
|
27
20
|
thumbnails: {
|
|
28
21
|
x100: string;
|
|
29
22
|
x200: string;
|
|
@@ -32,22 +25,15 @@ export interface CollectionResponse {
|
|
|
32
25
|
};
|
|
33
26
|
/** Collection's loader image */
|
|
34
27
|
loaderImage?: {
|
|
35
|
-
/** Override name for the file */
|
|
36
28
|
overwriteName: string;
|
|
37
|
-
/** Name of the asset */
|
|
38
29
|
name: string;
|
|
39
|
-
/** File type/extension */
|
|
40
30
|
type: string;
|
|
41
|
-
/** URL to the asset */
|
|
42
31
|
url: string;
|
|
43
32
|
};
|
|
44
33
|
/** Array of supported languages */
|
|
45
34
|
languages?: {
|
|
46
|
-
/** Language code (e.g., "fr", "it", "es") */
|
|
47
35
|
code: string;
|
|
48
|
-
/** Human-readable language name (e.g., "French", "Italian") */
|
|
49
36
|
lang: string;
|
|
50
|
-
/** Whether this language is supported */
|
|
51
37
|
supported: boolean;
|
|
52
38
|
}[];
|
|
53
39
|
/** User roles mapping with user IDs as keys and role names as values */
|
package/dist/types/comms.d.ts
CHANGED
|
@@ -2,42 +2,31 @@
|
|
|
2
2
|
* Target subject for notifications (product, collection, etc.)
|
|
3
3
|
*/
|
|
4
4
|
export interface NotificationSubjectTarget {
|
|
5
|
-
/** Type of target entity */
|
|
6
5
|
type: 'product' | 'collection' | 'user' | 'batch' | 'proof';
|
|
7
|
-
/** ID of the target entity */
|
|
8
6
|
id: string;
|
|
9
7
|
}
|
|
10
8
|
/**
|
|
11
9
|
* Push notification template content
|
|
12
10
|
*/
|
|
13
11
|
export interface PushNotificationTemplate {
|
|
14
|
-
/** Notification title */
|
|
15
12
|
title: string;
|
|
16
|
-
/** Notification body text */
|
|
17
13
|
body: string;
|
|
18
|
-
/** Optional icon URL for the notification */
|
|
19
14
|
icon?: string;
|
|
20
15
|
}
|
|
21
16
|
/**
|
|
22
17
|
* Email notification template content
|
|
23
18
|
*/
|
|
24
19
|
export interface EmailNotificationTemplate {
|
|
25
|
-
/** Email subject line */
|
|
26
20
|
subject: string;
|
|
27
|
-
/** Email body content (plain text or HTML) */
|
|
28
21
|
body: string;
|
|
29
22
|
}
|
|
30
23
|
/**
|
|
31
24
|
* Wallet pass update template content
|
|
32
25
|
*/
|
|
33
26
|
export interface WalletUpdateTemplate {
|
|
34
|
-
/** Text modules to update in the wallet pass */
|
|
35
27
|
textModulesData?: Array<{
|
|
36
|
-
/** Module ID */
|
|
37
28
|
id: string;
|
|
38
|
-
/** Module header text */
|
|
39
29
|
header: string;
|
|
40
|
-
/** Module body text */
|
|
41
30
|
body: string;
|
|
42
31
|
}>;
|
|
43
32
|
}
|
|
@@ -45,58 +34,39 @@ export interface WalletUpdateTemplate {
|
|
|
45
34
|
* Notification template containing different delivery methods
|
|
46
35
|
*/
|
|
47
36
|
export interface NotificationTemplate {
|
|
48
|
-
/** Push notification content */
|
|
49
37
|
push?: PushNotificationTemplate;
|
|
50
|
-
/** Email notification content */
|
|
51
38
|
email?: EmailNotificationTemplate;
|
|
52
|
-
/** Wallet pass update content */
|
|
53
39
|
walletUpdate?: WalletUpdateTemplate;
|
|
54
40
|
}
|
|
55
41
|
/**
|
|
56
42
|
* Request payload for sending notifications
|
|
57
43
|
*/
|
|
58
44
|
export interface SendNotificationRequest {
|
|
59
|
-
/** Target subjects that should receive the notification */
|
|
60
45
|
subjectTargets: NotificationSubjectTarget[];
|
|
61
|
-
/** Severity level of the notification */
|
|
62
46
|
severity: 'low' | 'normal' | 'important' | 'critical';
|
|
63
|
-
/** Delivery chanell mode preference */
|
|
64
47
|
mode: 'preferred' | 'all';
|
|
65
|
-
/** Specific channels to use for delivery */
|
|
66
48
|
channels: ("push" | "email" | "wallet")[];
|
|
67
|
-
/** Notification content templates for different delivery methods */
|
|
68
49
|
template: NotificationTemplate;
|
|
69
50
|
}
|
|
70
51
|
/**
|
|
71
52
|
* Response from sending notifications
|
|
72
53
|
*/
|
|
73
54
|
export interface SendNotificationResponse {
|
|
74
|
-
/** Whether the request was accepted */
|
|
75
55
|
ok: boolean;
|
|
76
|
-
/** Unique ID for this notification */
|
|
77
56
|
notificationId: string;
|
|
78
|
-
/** Basic counts for contacts and attempts */
|
|
79
57
|
counts: {
|
|
80
58
|
contacts: number;
|
|
81
59
|
attempts: number;
|
|
82
60
|
};
|
|
83
|
-
/** Detailed status for the notification */
|
|
84
61
|
status: {
|
|
85
62
|
notification: {
|
|
86
|
-
/** The notification ID (repeated for convenience) */
|
|
87
63
|
notificationId: string;
|
|
88
|
-
/** Current processing state */
|
|
89
64
|
state: 'queued' | 'sent' | 'failed' | 'confirmed' | string;
|
|
90
|
-
/** Targets this notification refers to */
|
|
91
65
|
subjectTargets: NotificationSubjectTarget[];
|
|
92
|
-
/** Severity of this notification */
|
|
93
66
|
severity: 'low' | 'normal' | 'important' | 'critical' | string;
|
|
94
|
-
/** Optional channel overrides used when sending */
|
|
95
67
|
channelsOverride: Record<string, any>;
|
|
96
|
-
/** The effective template used */
|
|
97
68
|
template: NotificationTemplate;
|
|
98
69
|
};
|
|
99
|
-
/** Totals across all contacts */
|
|
100
70
|
totals: {
|
|
101
71
|
queued: number;
|
|
102
72
|
sent: number;
|
package/dist/types/index.d.ts
CHANGED
package/dist/types/index.js
CHANGED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export interface NfcTagInfo {
|
|
2
|
+
id: string;
|
|
3
|
+
tagId: string;
|
|
4
|
+
claimSetId: string;
|
|
5
|
+
collectionId?: string;
|
|
6
|
+
productId?: string;
|
|
7
|
+
batchId?: string;
|
|
8
|
+
variantId?: string;
|
|
9
|
+
proofId?: string;
|
|
10
|
+
index?: number;
|
|
11
|
+
data?: Record<string, any>;
|
|
12
|
+
}
|
|
13
|
+
export interface NfcValidateRequest {
|
|
14
|
+
claimSetId: string;
|
|
15
|
+
codeId: string;
|
|
16
|
+
mirror?: string;
|
|
17
|
+
userId?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface NfcValidateResponse {
|
|
20
|
+
claimSetId: string;
|
|
21
|
+
codeId: string;
|
|
22
|
+
tagId: string;
|
|
23
|
+
index?: number;
|
|
24
|
+
isAdmin: boolean;
|
|
25
|
+
path?: string;
|
|
26
|
+
collectionId?: string;
|
|
27
|
+
collection?: Record<string, any>;
|
|
28
|
+
count: number;
|
|
29
|
+
previousCount: number;
|
|
30
|
+
data?: Record<string, any>;
|
|
31
|
+
productId?: string;
|
|
32
|
+
product?: Record<string, any>;
|
|
33
|
+
batchId?: string;
|
|
34
|
+
variantId?: string;
|
|
35
|
+
proofId?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface NfcClaimTagRequest {
|
|
38
|
+
claimSetId: string;
|
|
39
|
+
codeId: string;
|
|
40
|
+
data: Record<string, any>;
|
|
41
|
+
}
|
package/dist/types/product.d.ts
CHANGED
|
@@ -2,23 +2,15 @@
|
|
|
2
2
|
* Represents a Product Item object.
|
|
3
3
|
*/
|
|
4
4
|
export interface ProductResponse {
|
|
5
|
-
/** Unique identifier for the product */
|
|
6
5
|
id: string;
|
|
7
|
-
/** Name of the product */
|
|
8
6
|
name: string;
|
|
9
|
-
/** Unique identifier for the product's collection */
|
|
10
7
|
collectionId: string;
|
|
11
|
-
/** Detailed description of the product */
|
|
12
8
|
description: string;
|
|
13
|
-
/** A product GTIN (Global Trade Item Number) */
|
|
14
9
|
gtin?: string;
|
|
15
|
-
/** An optional product type from the standard smartlinks types */
|
|
16
10
|
type?: string;
|
|
17
11
|
/** Hero image asset object */
|
|
18
12
|
heroImage: {
|
|
19
|
-
/** URL to the asset */
|
|
20
13
|
url: string;
|
|
21
|
-
/** Thumbnail URLs in different sizes */
|
|
22
14
|
thumbnails: {
|
|
23
15
|
x100: string;
|
|
24
16
|
x200: string;
|
package/dist/types/proof.d.ts
CHANGED
|
@@ -2,18 +2,13 @@
|
|
|
2
2
|
* Represents a Proof object.
|
|
3
3
|
*/
|
|
4
4
|
export interface ProofResponse {
|
|
5
|
-
/** Unique identifier for the collection */
|
|
6
5
|
collectionId: string;
|
|
7
|
-
/** Creation timestamp */
|
|
8
6
|
createdAt: string;
|
|
9
|
-
/** Unique identifier for the proof */
|
|
10
7
|
id: string;
|
|
11
|
-
/** Unique identifier for the product */
|
|
12
8
|
productId: string;
|
|
13
|
-
/** Unique identifier for the token */
|
|
14
9
|
tokenId: string;
|
|
15
|
-
/** Unique identifier for the user */
|
|
16
10
|
userId: string;
|
|
17
|
-
|
|
11
|
+
claimable: boolean;
|
|
12
|
+
transient: boolean;
|
|
18
13
|
values: Record<string, any>;
|
|
19
14
|
}
|