@proveanything/smartlinks 1.1.1 → 1.1.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/API_SUMMARY.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Smartlinks API Summary
2
2
 
3
- Version: 1.1.1 | Generated: 2025-12-18T22:33:00.019Z
3
+ Version: 1.1.3 | Generated: 2025-12-19T16:03:17.326Z
4
4
 
5
5
  This is a concise summary of all available API functions and types.
6
6
 
@@ -344,22 +344,15 @@ interface AttestationUpdateRequest {
344
344
 
345
345
  ### auth
346
346
 
347
- **UserAccountRegistrationRequest** (type)
347
+ **UserAccountRegistrationRequest** (interface)
348
348
  ```typescript
349
- type UserAccountRegistrationRequest = {
350
- /** User's display name */
349
+ interface UserAccountRegistrationRequest {
351
350
  name: string
352
- /** Optional user email */
353
351
  email?: string
354
- /** Optional user phone number */
355
352
  phone?: string
356
- /** Optional password for email login */
357
353
  password?: string
358
- /** Send confirmation email after registration */
359
354
  sendAccountConfirmation?: boolean
360
- /** Optional collection context for registration */
361
355
  collectionId?: string,
362
- /** Desired token type returned */
363
356
  tokenType?: 'bearer' | 'firebase'
364
357
  }
365
358
  ```
@@ -609,9 +602,9 @@ interface AssignClaimsRequest {
609
602
 
610
603
  ### collection
611
604
 
612
- **CollectionResponse** (interface)
605
+ **Collection** (interface)
613
606
  ```typescript
614
- interface CollectionResponse {
607
+ interface Collection {
615
608
  id: string
616
609
  title: string
617
610
  description: string
@@ -652,6 +645,12 @@ interface CollectionResponse {
652
645
  }
653
646
  ```
654
647
 
648
+ **CollectionResponse** = `Collection`
649
+
650
+ **CollectionCreateRequest** = `Omit<Collection, 'id' | 'shortId'>`
651
+
652
+ **CollectionUpdateRequest** = `Partial<Omit<Collection, 'id' | 'shortId'>>`
653
+
655
654
  ### common
656
655
 
657
656
  **IdField** = `'userId' | 'contactId'`
@@ -746,12 +745,13 @@ interface SendNotificationResponse {
746
745
  ```typescript
747
746
  interface CommunicationEvent {
748
747
  orgId: string
749
- sourceId?: string
748
+ broadcastId?: string
749
+ journeyId?: string
750
750
  userId?: string
751
751
  contactId?: string
752
752
  channel?: string
753
753
  timestamp: string
754
- eventType?: string
754
+ eventType: string
755
755
  outcome?: string | null
756
756
  templateId?: string | null
757
757
  [k: string]: any
@@ -779,8 +779,9 @@ interface RecipientWithOutcome {
779
779
  **CommsRecipientIdsQuery** (interface)
780
780
  ```typescript
781
781
  interface CommsRecipientIdsQuery {
782
- sourceId: string
783
- idField?: 'userId' | 'contactId'
782
+ broadcastId?: string
783
+ journeyId?: string
784
+ idField?: IdField
784
785
  from?: string
785
786
  to?: string
786
787
  limit?: number
@@ -790,10 +791,11 @@ interface CommsRecipientIdsQuery {
790
791
  **CommsRecipientsWithoutActionQuery** (interface)
791
792
  ```typescript
792
793
  interface CommsRecipientsWithoutActionQuery {
793
- sourceId: string
794
+ broadcastId?: string
795
+ journeyId?: string
794
796
  actionId?: string
795
797
  appId?: string
796
- idField?: 'userId' | 'contactId'
798
+ idField?: IdField
797
799
  from?: string
798
800
  to?: string
799
801
  limit?: number
@@ -803,11 +805,12 @@ interface CommsRecipientsWithoutActionQuery {
803
805
  **CommsRecipientsWithActionQuery** (interface)
804
806
  ```typescript
805
807
  interface CommsRecipientsWithActionQuery {
806
- sourceId: string
808
+ broadcastId?: string
809
+ journeyId?: string
807
810
  actionId?: string
808
811
  appId?: string
809
812
  outcome?: string
810
- idField?: 'userId' | 'contactId'
813
+ idField?: IdField
811
814
  includeOutcome?: boolean
812
815
  from?: string
813
816
  to?: string
@@ -818,11 +821,12 @@ interface CommsRecipientsWithActionQuery {
818
821
  **LogCommunicationEventBody** (interface)
819
822
  ```typescript
820
823
  interface LogCommunicationEventBody {
821
- sourceId: string
824
+ broadcastId?: string
825
+ journeyId?: string
822
826
  userId?: string
823
827
  contactId?: string
824
828
  channel?: string
825
- eventType?: string
829
+ eventType: string
826
830
  outcome?: string
827
831
  templateId?: string
828
832
  timestamp?: string
@@ -833,9 +837,9 @@ interface LogCommunicationEventBody {
833
837
  **LogBulkCommunicationEventsBody** (interface)
834
838
  ```typescript
835
839
  interface LogBulkCommunicationEventsBody {
836
- params: { sourceId: string; [k: string]: any }
840
+ params: { broadcastId?: string; journeyId?: string; [k: string]: any }
837
841
  ids: string[]
838
- idField?: 'userId' | 'contactId'
842
+ idField?: IdField
839
843
  }
840
844
  ```
841
845
 
@@ -1058,9 +1062,9 @@ interface NfcClaimTagRequest {
1058
1062
 
1059
1063
  ### product
1060
1064
 
1061
- **ProductResponse** (interface)
1065
+ **Product** (interface)
1062
1066
  ```typescript
1063
- interface ProductResponse {
1067
+ interface Product {
1064
1068
  id: string
1065
1069
  name: string
1066
1070
  collectionId: string
@@ -1084,15 +1088,17 @@ interface ProductResponse {
1084
1088
  }
1085
1089
  ```
1086
1090
 
1087
- **ProductCreateRequest** = `Omit<ProductResponse, 'id' | 'collectionId'>`
1091
+ **ProductResponse** = `Product`
1088
1092
 
1089
- **ProductUpdateRequest** = `Partial<Omit<ProductResponse, 'id' | 'collectionId'>>`
1093
+ **ProductCreateRequest** = `Omit<Product, 'id' | 'collectionId'>`
1094
+
1095
+ **ProductUpdateRequest** = `Partial<Omit<Product, 'id' | 'collectionId'>>`
1090
1096
 
1091
1097
  ### proof
1092
1098
 
1093
- **ProofResponse** (interface)
1099
+ **Proof** (interface)
1094
1100
  ```typescript
1095
- interface ProofResponse {
1101
+ interface Proof {
1096
1102
  collectionId: string
1097
1103
  createdAt: string
1098
1104
  id: string
@@ -1105,6 +1111,21 @@ interface ProofResponse {
1105
1111
  }
1106
1112
  ```
1107
1113
 
1114
+ **ProofCreateRequest** (interface)
1115
+ ```typescript
1116
+ interface ProofCreateRequest {
1117
+ values: Record<string, any>
1118
+ claimable?: boolean
1119
+ transient?: boolean
1120
+ }
1121
+ ```
1122
+
1123
+ **ProofResponse** = `Proof`
1124
+
1125
+ **ProofUpdateRequest** = `Partial<ProofCreateRequest>`
1126
+
1127
+ **ProofClaimRequest** = `Record<string, any>`
1128
+
1108
1129
  ### segments
1109
1130
 
1110
1131
  **SegmentRecord** (interface)
@@ -1694,10 +1715,10 @@ Retrieve a specific settings group for a collection (public endpoint).
1694
1715
  **updateSettings**(collectionId: string, settingGroup: string, settings: any) → `Promise<any>`
1695
1716
  Update a specific settings group for a collection (admin endpoint).
1696
1717
 
1697
- **create**(data: any) → `Promise<CollectionResponse>`
1718
+ **create**(data: CollectionCreateRequest) → `Promise<CollectionResponse>`
1698
1719
  Create a new collection (admin only).
1699
1720
 
1700
- **update**(collectionId: string, data: any) → `Promise<CollectionResponse>`
1721
+ **update**(collectionId: string, data: CollectionUpdateRequest) → `Promise<CollectionResponse>`
1701
1722
  Update a collection (admin only).
1702
1723
 
1703
1724
  **remove**(collectionId: string) → `Promise<void>`
@@ -1885,19 +1906,19 @@ List all Proofs for a Collection.
1885
1906
 
1886
1907
  **create**(collectionId: string,
1887
1908
  productId: string,
1888
- values: any) → `Promise<ProofResponse>`
1909
+ values: ProofCreateRequest) → `Promise<ProofResponse>`
1889
1910
  Create a proof for a product (admin only). POST /admin/collection/:collectionId/product/:productId/proof
1890
1911
 
1891
1912
  **update**(collectionId: string,
1892
1913
  productId: string,
1893
1914
  proofId: string,
1894
- values: any) → `Promise<ProofResponse>`
1915
+ values: ProofUpdateRequest) → `Promise<ProofResponse>`
1895
1916
  Update a proof for a product (admin only). PUT /admin/collection/:collectionId/product/:productId/proof/:proofId
1896
1917
 
1897
1918
  **claim**(collectionId: string,
1898
1919
  productId: string,
1899
1920
  proofId: string,
1900
- values: any) → `Promise<ProofResponse>`
1921
+ values: ProofClaimRequest) → `Promise<ProofResponse>`
1901
1922
  Claim a proof for a product. PUT /public/collection/:collectionId/product/:productId/proof/:proofId
1902
1923
 
1903
1924
  **remove**(collectionId: string,
@@ -1,4 +1,4 @@
1
- import { CollectionResponse } from "../types/collection";
1
+ import { CollectionResponse, CollectionCreateRequest, CollectionUpdateRequest } from "../types/collection";
2
2
  export declare namespace collection {
3
3
  /**
4
4
  * Retrieves a single Collection by its ID.
@@ -42,7 +42,7 @@ export declare namespace collection {
42
42
  * @returns Promise resolving to a CollectionResponse object
43
43
  * @throws ErrorResponse if the request fails
44
44
  */
45
- function create(data: any): Promise<CollectionResponse>;
45
+ function create(data: CollectionCreateRequest): Promise<CollectionResponse>;
46
46
  /**
47
47
  * Update a collection (admin only).
48
48
  * @param collectionId – Identifier of the collection
@@ -50,7 +50,7 @@ export declare namespace collection {
50
50
  * @returns Promise resolving to a CollectionResponse object
51
51
  * @throws ErrorResponse if the request fails
52
52
  */
53
- function update(collectionId: string, data: any): Promise<CollectionResponse>;
53
+ function update(collectionId: string, data: CollectionUpdateRequest): Promise<CollectionResponse>;
54
54
  /**
55
55
  * Delete a collection (admin only).
56
56
  * @param collectionId – Identifier of the collection
@@ -1,4 +1,4 @@
1
- import { ProofResponse } from "../types/proof";
1
+ import { ProofResponse, ProofCreateRequest, ProofUpdateRequest, ProofClaimRequest } from "../types/proof";
2
2
  export declare namespace proof {
3
3
  /**
4
4
  * Retrieves a single Proof by Collection ID, Product ID, and Proof ID.
@@ -13,17 +13,17 @@ export declare namespace proof {
13
13
  * Create a proof for a product (admin only).
14
14
  * POST /admin/collection/:collectionId/product/:productId/proof
15
15
  */
16
- function create(collectionId: string, productId: string, values: any): Promise<ProofResponse>;
16
+ function create(collectionId: string, productId: string, values: ProofCreateRequest): Promise<ProofResponse>;
17
17
  /**
18
18
  * Update a proof for a product (admin only).
19
19
  * PUT /admin/collection/:collectionId/product/:productId/proof/:proofId
20
20
  */
21
- function update(collectionId: string, productId: string, proofId: string, values: any): Promise<ProofResponse>;
21
+ function update(collectionId: string, productId: string, proofId: string, values: ProofUpdateRequest): Promise<ProofResponse>;
22
22
  /**
23
23
  * Claim a proof for a product.
24
24
  * PUT /public/collection/:collectionId/product/:productId/proof/:proofId
25
25
  */
26
- function claim(collectionId: string, productId: string, proofId: string, values: any): Promise<ProofResponse>;
26
+ function claim(collectionId: string, productId: string, proofId: string, values: ProofClaimRequest): Promise<ProofResponse>;
27
27
  /**
28
28
  * Delete a proof for a product (admin only).
29
29
  * DELETE /admin/collection/:collectionId/product/:productId/proof/:proofId
package/dist/index.d.ts CHANGED
@@ -4,9 +4,11 @@ export * from "./types";
4
4
  export { iframe } from "./iframe";
5
5
  export type { LoginResponse, VerifyTokenResponse, AccountInfoResponse, } from "./api/auth";
6
6
  export type { UserAccountRegistrationRequest, } from "./types/auth";
7
- export type { SendNotificationRequest, SendNotificationResponse, NotificationSubjectTarget, NotificationTemplate, PushNotificationTemplate, EmailNotificationTemplate, WalletUpdateTemplate, } from "./types/comms";
7
+ export type { SendNotificationRequest, SendNotificationResponse, NotificationSubjectTarget, NotificationTemplate, PushNotificationTemplate, EmailNotificationTemplate, WalletUpdateTemplate, CommunicationEvent, CommsQueryByUser, CommsRecipientIdsQuery, CommsRecipientsWithoutActionQuery, CommsRecipientsWithActionQuery, RecipientId, RecipientWithOutcome, LogCommunicationEventBody, LogBulkCommunicationEventsBody, AppendResult, AppendBulkResult, } from "./types/comms";
8
8
  export type { AttestationResponse, AttestationCreateRequest, AttestationUpdateRequest, } from "./types/attestation";
9
9
  export type { BatchResponse, BatchCreateRequest, BatchUpdateRequest, } from "./types/batch";
10
10
  export type { VariantResponse, VariantCreateRequest, VariantUpdateRequest, } from "./types/variant";
11
11
  export type { AppConfigOptions } from "./api/appConfiguration";
12
- export type { ProductCreateRequest, ProductUpdateRequest, } from "./types/product";
12
+ export type { ProductCreateRequest, ProductUpdateRequest, Product, } from "./types/product";
13
+ export type { Collection, CollectionResponse, CollectionCreateRequest, CollectionUpdateRequest, } from "./types/collection";
14
+ export type { Proof, ProofResponse, ProofCreateRequest, ProofUpdateRequest, ProofClaimRequest, } from "./types/proof";
@@ -1,4 +1,4 @@
1
- export type UserAccountRegistrationRequest = {
1
+ export interface UserAccountRegistrationRequest {
2
2
  /** User's display name */
3
3
  name: string;
4
4
  /** Optional user email */
@@ -13,4 +13,4 @@ export type UserAccountRegistrationRequest = {
13
13
  collectionId?: string;
14
14
  /** Desired token type returned */
15
15
  tokenType?: 'bearer' | 'firebase';
16
- };
16
+ }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Represents a Collection object.
3
3
  */
4
- export interface CollectionResponse {
4
+ export interface Collection {
5
5
  /** Unique identifier for the collection */
6
6
  id: string;
7
7
  /** Human-readable title of the collection */
@@ -63,3 +63,6 @@ export interface CollectionResponse {
63
63
  /** if dark mode is enabled for this collection */
64
64
  dark?: boolean;
65
65
  }
66
+ export type CollectionResponse = Collection;
67
+ export type CollectionCreateRequest = Omit<Collection, 'id' | 'shortId'>;
68
+ export type CollectionUpdateRequest = Partial<Omit<Collection, 'id' | 'shortId'>>;
@@ -1,3 +1,4 @@
1
+ import type { IdField } from './common';
1
2
  /**
2
3
  * Target subject for notifications (product, collection, etc.)
3
4
  */
@@ -106,12 +107,13 @@ export interface SendNotificationResponse {
106
107
  }
107
108
  export interface CommunicationEvent {
108
109
  orgId: string;
109
- sourceId?: string;
110
+ broadcastId?: string;
111
+ journeyId?: string;
110
112
  userId?: string;
111
113
  contactId?: string;
112
114
  channel?: string;
113
115
  timestamp: string;
114
- eventType?: string;
116
+ eventType: string;
115
117
  outcome?: string | null;
116
118
  templateId?: string | null;
117
119
  [k: string]: any;
@@ -129,38 +131,42 @@ export interface RecipientWithOutcome {
129
131
  outcome: string;
130
132
  }
131
133
  export interface CommsRecipientIdsQuery {
132
- sourceId: string;
133
- idField?: 'userId' | 'contactId';
134
+ broadcastId?: string;
135
+ journeyId?: string;
136
+ idField?: IdField;
134
137
  from?: string;
135
138
  to?: string;
136
139
  limit?: number;
137
140
  }
138
141
  export interface CommsRecipientsWithoutActionQuery {
139
- sourceId: string;
142
+ broadcastId?: string;
143
+ journeyId?: string;
140
144
  actionId?: string;
141
145
  appId?: string;
142
- idField?: 'userId' | 'contactId';
146
+ idField?: IdField;
143
147
  from?: string;
144
148
  to?: string;
145
149
  limit?: number;
146
150
  }
147
151
  export interface CommsRecipientsWithActionQuery {
148
- sourceId: string;
152
+ broadcastId?: string;
153
+ journeyId?: string;
149
154
  actionId?: string;
150
155
  appId?: string;
151
156
  outcome?: string;
152
- idField?: 'userId' | 'contactId';
157
+ idField?: IdField;
153
158
  includeOutcome?: boolean;
154
159
  from?: string;
155
160
  to?: string;
156
161
  limit?: number;
157
162
  }
158
163
  export interface LogCommunicationEventBody {
159
- sourceId: string;
164
+ broadcastId?: string;
165
+ journeyId?: string;
160
166
  userId?: string;
161
167
  contactId?: string;
162
168
  channel?: string;
163
- eventType?: string;
169
+ eventType: string;
164
170
  outcome?: string;
165
171
  templateId?: string;
166
172
  timestamp?: string;
@@ -168,11 +174,12 @@ export interface LogCommunicationEventBody {
168
174
  }
169
175
  export interface LogBulkCommunicationEventsBody {
170
176
  params: {
171
- sourceId: string;
177
+ broadcastId?: string;
178
+ journeyId?: string;
172
179
  [k: string]: any;
173
180
  };
174
181
  ids: string[];
175
- idField?: 'userId' | 'contactId';
182
+ idField?: IdField;
176
183
  }
177
184
  export interface AppendResult {
178
185
  success: true;
@@ -1,3 +1 @@
1
- // src/types/comms.ts
2
- // Communication and notification types for the Smartlinks API
3
1
  export {};
@@ -1,7 +1,7 @@
1
1
  /**
2
- * Represents a Product Item object.
2
+ * Product domain model.
3
3
  */
4
- export interface ProductResponse {
4
+ export interface Product {
5
5
  /** Unique identifier for the product */
6
6
  id: string;
7
7
  /** Name of the product */
@@ -34,5 +34,6 @@ export interface ProductResponse {
34
34
  [key: string]: any;
35
35
  };
36
36
  }
37
- export type ProductCreateRequest = Omit<ProductResponse, 'id' | 'collectionId'>;
38
- export type ProductUpdateRequest = Partial<Omit<ProductResponse, 'id' | 'collectionId'>>;
37
+ export type ProductResponse = Product;
38
+ export type ProductCreateRequest = Omit<Product, 'id' | 'collectionId'>;
39
+ export type ProductUpdateRequest = Partial<Omit<Product, 'id' | 'collectionId'>>;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Represents a Proof object.
3
3
  */
4
- export interface ProofResponse {
4
+ export interface Proof {
5
5
  /** Unique identifier for the collection */
6
6
  collectionId: string;
7
7
  /** Creation timestamp */
@@ -21,3 +21,11 @@ export interface ProofResponse {
21
21
  /** Arbitrary key-value pairs for proof values */
22
22
  values: Record<string, any>;
23
23
  }
24
+ export type ProofResponse = Proof;
25
+ export interface ProofCreateRequest {
26
+ values: Record<string, any>;
27
+ claimable?: boolean;
28
+ transient?: boolean;
29
+ }
30
+ export type ProofUpdateRequest = Partial<ProofCreateRequest>;
31
+ export type ProofClaimRequest = Record<string, any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proveanything/smartlinks",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "description": "Official JavaScript/TypeScript SDK for the Smartlinks API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",