@proveanything/smartlinks 1.0.56 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Smartlinks API Summary
2
2
 
3
- Version: 1.0.56 | Generated: 2025-12-10T12:13:56.087Z
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
 
@@ -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
@@ -552,15 +552,15 @@ interface NfcClaimTagRequest {
552
552
  **ProductResponse** (interface)
553
553
  ```typescript
554
554
  interface ProductResponse {
555
- id: string
556
- name: string
557
- collectionId: string
558
- description: string
559
- gtin?: string
560
- 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
561
561
  heroImage: {
562
- url: string
563
- thumbnails: {
562
+ url: string // URL to the asset
563
+ thumbnails: { // Thumbnail URLs in different sizes
564
564
  x100: string
565
565
  x200: string
566
566
  x512: string
@@ -568,10 +568,10 @@ interface ProductResponse {
568
568
  }
569
569
  tags: {
570
570
  [tagName: string]: boolean
571
- }
571
+ } // Flexible map of tags with true/false values
572
572
  data: {
573
573
  [key: string]: any
574
- }
574
+ } // Flexible key/value data map
575
575
  }
576
576
  ```
577
577
 
@@ -584,15 +584,15 @@ interface ProductResponse {
584
584
  **ProofResponse** (interface)
585
585
  ```typescript
586
586
  interface ProofResponse {
587
- collectionId: string
588
- createdAt: string
589
- id: string
590
- productId: string
591
- tokenId: string
592
- userId: string
593
- claimable: boolean
594
- transient: boolean
595
- values: Record<string, any>
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
596
596
  }
597
597
  ```
598
598
 
@@ -1,21 +1,11 @@
1
- /**
2
- * Reference to a specific claim attached to a code/tag.
3
- */
4
1
  export interface ClaimCodeRef {
5
2
  codeId: string;
6
3
  claimId: string;
7
4
  }
8
- /**
9
- * Request body for updating claim data on a claim set.
10
- * Contains arbitrary key/value pairs and a list of code+claim references to update.
11
- */
12
5
  export interface UpdateClaimDataRequest {
13
6
  data: Record<string, any>;
14
7
  codes: ClaimCodeRef[];
15
8
  }
16
- /**
17
- * Request body for assigning claims to codes or ranges within a collection.
18
- */
19
9
  export interface AssignClaimsRequest {
20
10
  id: string;
21
11
  collectionId: string;
@@ -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 */
@@ -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;
@@ -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;
@@ -2,22 +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
- /** Is this proof available to be claimed */
18
11
  claimable: boolean;
19
- /** Is this proof transient */
20
12
  transient: boolean;
21
- /** Arbitrary key-value pairs for proof values */
22
13
  values: Record<string, any>;
23
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proveanything/smartlinks",
3
- "version": "1.0.56",
3
+ "version": "1.0.58",
4
4
  "description": "Official JavaScript/TypeScript SDK for the Smartlinks API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",