@proveanything/smartlinks 1.1.2 → 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 +39 -23
- package/dist/api/collection.d.ts +3 -3
- package/dist/api/proof.d.ts +4 -4
- package/dist/index.d.ts +4 -2
- package/dist/types/auth.d.ts +2 -2
- package/dist/types/collection.d.ts +4 -1
- package/dist/types/product.d.ts +5 -4
- package/dist/types/proof.d.ts +9 -1
- package/package.json +1 -1
package/API_SUMMARY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Smartlinks API Summary
|
|
2
2
|
|
|
3
|
-
Version: 1.1.
|
|
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** (
|
|
347
|
+
**UserAccountRegistrationRequest** (interface)
|
|
348
348
|
```typescript
|
|
349
|
-
|
|
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
|
-
**
|
|
605
|
+
**Collection** (interface)
|
|
613
606
|
```typescript
|
|
614
|
-
interface
|
|
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'`
|
|
@@ -1063,9 +1062,9 @@ interface NfcClaimTagRequest {
|
|
|
1063
1062
|
|
|
1064
1063
|
### product
|
|
1065
1064
|
|
|
1066
|
-
**
|
|
1065
|
+
**Product** (interface)
|
|
1067
1066
|
```typescript
|
|
1068
|
-
interface
|
|
1067
|
+
interface Product {
|
|
1069
1068
|
id: string
|
|
1070
1069
|
name: string
|
|
1071
1070
|
collectionId: string
|
|
@@ -1089,15 +1088,17 @@ interface ProductResponse {
|
|
|
1089
1088
|
}
|
|
1090
1089
|
```
|
|
1091
1090
|
|
|
1092
|
-
**
|
|
1091
|
+
**ProductResponse** = `Product`
|
|
1092
|
+
|
|
1093
|
+
**ProductCreateRequest** = `Omit<Product, 'id' | 'collectionId'>`
|
|
1093
1094
|
|
|
1094
|
-
**ProductUpdateRequest** = `Partial<Omit<
|
|
1095
|
+
**ProductUpdateRequest** = `Partial<Omit<Product, 'id' | 'collectionId'>>`
|
|
1095
1096
|
|
|
1096
1097
|
### proof
|
|
1097
1098
|
|
|
1098
|
-
**
|
|
1099
|
+
**Proof** (interface)
|
|
1099
1100
|
```typescript
|
|
1100
|
-
interface
|
|
1101
|
+
interface Proof {
|
|
1101
1102
|
collectionId: string
|
|
1102
1103
|
createdAt: string
|
|
1103
1104
|
id: string
|
|
@@ -1110,6 +1111,21 @@ interface ProofResponse {
|
|
|
1110
1111
|
}
|
|
1111
1112
|
```
|
|
1112
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
|
+
|
|
1113
1129
|
### segments
|
|
1114
1130
|
|
|
1115
1131
|
**SegmentRecord** (interface)
|
|
@@ -1699,10 +1715,10 @@ Retrieve a specific settings group for a collection (public endpoint).
|
|
|
1699
1715
|
**updateSettings**(collectionId: string, settingGroup: string, settings: any) → `Promise<any>`
|
|
1700
1716
|
Update a specific settings group for a collection (admin endpoint).
|
|
1701
1717
|
|
|
1702
|
-
**create**(data:
|
|
1718
|
+
**create**(data: CollectionCreateRequest) → `Promise<CollectionResponse>`
|
|
1703
1719
|
Create a new collection (admin only).
|
|
1704
1720
|
|
|
1705
|
-
**update**(collectionId: string, data:
|
|
1721
|
+
**update**(collectionId: string, data: CollectionUpdateRequest) → `Promise<CollectionResponse>`
|
|
1706
1722
|
Update a collection (admin only).
|
|
1707
1723
|
|
|
1708
1724
|
**remove**(collectionId: string) → `Promise<void>`
|
|
@@ -1890,19 +1906,19 @@ List all Proofs for a Collection.
|
|
|
1890
1906
|
|
|
1891
1907
|
**create**(collectionId: string,
|
|
1892
1908
|
productId: string,
|
|
1893
|
-
values:
|
|
1909
|
+
values: ProofCreateRequest) → `Promise<ProofResponse>`
|
|
1894
1910
|
Create a proof for a product (admin only). POST /admin/collection/:collectionId/product/:productId/proof
|
|
1895
1911
|
|
|
1896
1912
|
**update**(collectionId: string,
|
|
1897
1913
|
productId: string,
|
|
1898
1914
|
proofId: string,
|
|
1899
|
-
values:
|
|
1915
|
+
values: ProofUpdateRequest) → `Promise<ProofResponse>`
|
|
1900
1916
|
Update a proof for a product (admin only). PUT /admin/collection/:collectionId/product/:productId/proof/:proofId
|
|
1901
1917
|
|
|
1902
1918
|
**claim**(collectionId: string,
|
|
1903
1919
|
productId: string,
|
|
1904
1920
|
proofId: string,
|
|
1905
|
-
values:
|
|
1921
|
+
values: ProofClaimRequest) → `Promise<ProofResponse>`
|
|
1906
1922
|
Claim a proof for a product. PUT /public/collection/:collectionId/product/:productId/proof/:proofId
|
|
1907
1923
|
|
|
1908
1924
|
**remove**(collectionId: string,
|
package/dist/api/collection.d.ts
CHANGED
|
@@ -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:
|
|
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:
|
|
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
|
package/dist/api/proof.d.ts
CHANGED
|
@@ -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:
|
|
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:
|
|
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:
|
|
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";
|
package/dist/types/auth.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
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
|
|
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'>>;
|
package/dist/types/product.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Product domain model.
|
|
3
3
|
*/
|
|
4
|
-
export interface
|
|
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
|
|
38
|
-
export type
|
|
37
|
+
export type ProductResponse = Product;
|
|
38
|
+
export type ProductCreateRequest = Omit<Product, 'id' | 'collectionId'>;
|
|
39
|
+
export type ProductUpdateRequest = Partial<Omit<Product, 'id' | 'collectionId'>>;
|
package/dist/types/proof.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Represents a Proof object.
|
|
3
3
|
*/
|
|
4
|
-
export interface
|
|
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>;
|