@proveanything/smartlinks 1.0.55 → 1.0.56
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 +74 -13
- package/dist/api/nfc.d.ts +12 -1
- package/dist/api/nfc.js +15 -1
- package/dist/types/claimSet.d.ts +0 -12
- 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/proof.d.ts +4 -0
- 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.56 | Generated: 2025-12-10T12:13:56.087Z
|
|
4
4
|
|
|
5
5
|
This is a concise summary of all available API functions and types.
|
|
6
6
|
|
|
@@ -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
|
|
|
@@ -488,6 +488,65 @@ 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)
|
|
@@ -531,6 +590,8 @@ interface ProofResponse {
|
|
|
531
590
|
productId: string
|
|
532
591
|
tokenId: string
|
|
533
592
|
userId: string
|
|
593
|
+
claimable: boolean
|
|
594
|
+
transient: boolean
|
|
534
595
|
values: Record<string, any>
|
|
535
596
|
}
|
|
536
597
|
```
|
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
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
* Reference to a specific claim attached to a code/tag.
|
|
3
3
|
*/
|
|
4
4
|
export interface ClaimCodeRef {
|
|
5
|
-
/** Identifier of the code (e.g., tag or QR code) */
|
|
6
5
|
codeId: string;
|
|
7
|
-
/** Identifier of the claim within the claim set */
|
|
8
6
|
claimId: string;
|
|
9
7
|
}
|
|
10
8
|
/**
|
|
@@ -12,29 +10,19 @@ export interface ClaimCodeRef {
|
|
|
12
10
|
* Contains arbitrary key/value pairs and a list of code+claim references to update.
|
|
13
11
|
*/
|
|
14
12
|
export interface UpdateClaimDataRequest {
|
|
15
|
-
/** Arbitrary key/value pairs for the claim data update */
|
|
16
13
|
data: Record<string, any>;
|
|
17
|
-
/** Array of code+claim references affected by this update */
|
|
18
14
|
codes: ClaimCodeRef[];
|
|
19
15
|
}
|
|
20
16
|
/**
|
|
21
17
|
* Request body for assigning claims to codes or ranges within a collection.
|
|
22
18
|
*/
|
|
23
19
|
export interface AssignClaimsRequest {
|
|
24
|
-
/** The claim set ID (required) */
|
|
25
20
|
id: string;
|
|
26
|
-
/** The collection ID (required) */
|
|
27
21
|
collectionId: string;
|
|
28
|
-
/** The product ID (required) */
|
|
29
22
|
productId: string;
|
|
30
|
-
/** Optional batch identifier */
|
|
31
23
|
batchId?: string;
|
|
32
|
-
/** Optional start index for bulk assignment */
|
|
33
24
|
start?: number;
|
|
34
|
-
/** Optional end index for bulk assignment */
|
|
35
25
|
end?: number;
|
|
36
|
-
/** Optional single code identifier for single assignment */
|
|
37
26
|
codeId?: string;
|
|
38
|
-
/** Optional key/value pairs to set on the claim */
|
|
39
27
|
data?: Record<string, any>;
|
|
40
28
|
}
|
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/proof.d.ts
CHANGED
|
@@ -14,6 +14,10 @@ export interface ProofResponse {
|
|
|
14
14
|
tokenId: string;
|
|
15
15
|
/** Unique identifier for the user */
|
|
16
16
|
userId: string;
|
|
17
|
+
/** Is this proof available to be claimed */
|
|
18
|
+
claimable: boolean;
|
|
19
|
+
/** Is this proof transient */
|
|
20
|
+
transient: boolean;
|
|
17
21
|
/** Arbitrary key-value pairs for proof values */
|
|
18
22
|
values: Record<string, any>;
|
|
19
23
|
}
|