@proveanything/smartlinks 1.0.31 → 1.0.32
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 +4 -6
- package/dist/api/auth.d.ts +2 -4
- package/package.json +1 -1
package/API_SUMMARY.md
CHANGED
|
@@ -263,8 +263,6 @@ interface ProofResponse {
|
|
|
263
263
|
}`
|
|
264
264
|
|
|
265
265
|
**AccountInfoResponse** = `{
|
|
266
|
-
jwtToken: string;
|
|
267
|
-
jwtExpiry: number;
|
|
268
266
|
accessType: string;
|
|
269
267
|
analyticsCode: string;
|
|
270
268
|
analyticsId: string;
|
|
@@ -483,10 +481,10 @@ Logout (clears bearerToken for future API calls).
|
|
|
483
481
|
**verifyToken**(token?: string) → `Promise<VerifyTokenResponse>`
|
|
484
482
|
Verifies the current bearerToken (or a provided token). Returns user/account info if valid.
|
|
485
483
|
|
|
486
|
-
**requestAdminJWT**(collectionId: string) → `Promise<
|
|
484
|
+
**requestAdminJWT**(collectionId: string) → `Promise<string>`
|
|
487
485
|
Requests an admin JWT for the current user and a specific collection Returns JWT if valid.
|
|
488
486
|
|
|
489
|
-
**requestPublicJWT**(collectionId: string, productId: string, proofId: string) → `Promise<
|
|
487
|
+
**requestPublicJWT**(collectionId: string, productId: string, proofId: string) → `Promise<string>`
|
|
490
488
|
Requests a JWT for the current user and a specific collection/product/proof Validates if the user has access to the resource, and returns a JWT
|
|
491
489
|
|
|
492
490
|
**getAccount**() → `Promise<AccountInfoResponse>`
|
|
@@ -501,10 +499,10 @@ Logout (clears bearerToken for future API calls).
|
|
|
501
499
|
**verifyToken**(token?: string) → `Promise<VerifyTokenResponse>`
|
|
502
500
|
Verifies the current bearerToken (or a provided token). Returns user/account info if valid.
|
|
503
501
|
|
|
504
|
-
**requestAdminJWT**(collectionId: string) → `Promise<
|
|
502
|
+
**requestAdminJWT**(collectionId: string) → `Promise<string>`
|
|
505
503
|
Requests an admin JWT for the current user and a specific collection Returns JWT if valid.
|
|
506
504
|
|
|
507
|
-
**requestPublicJWT**(collectionId: string, productId: string, proofId: string) → `Promise<
|
|
505
|
+
**requestPublicJWT**(collectionId: string, productId: string, proofId: string) → `Promise<string>`
|
|
508
506
|
Requests a JWT for the current user and a specific collection/product/proof Validates if the user has access to the resource, and returns a JWT
|
|
509
507
|
|
|
510
508
|
**getAccount**() → `Promise<AccountInfoResponse>`
|
package/dist/api/auth.d.ts
CHANGED
|
@@ -13,8 +13,6 @@ export type VerifyTokenResponse = {
|
|
|
13
13
|
account?: Record<string, any>;
|
|
14
14
|
};
|
|
15
15
|
export type AccountInfoResponse = {
|
|
16
|
-
jwtToken: string;
|
|
17
|
-
jwtExpiry: number;
|
|
18
16
|
accessType: string;
|
|
19
17
|
analyticsCode: string;
|
|
20
18
|
analyticsId: string;
|
|
@@ -66,12 +64,12 @@ export declare namespace auth {
|
|
|
66
64
|
* Requests an admin JWT for the current user and a specific collection
|
|
67
65
|
* Returns JWT if valid.
|
|
68
66
|
*/
|
|
69
|
-
function requestAdminJWT(collectionId: string): Promise<
|
|
67
|
+
function requestAdminJWT(collectionId: string): Promise<string>;
|
|
70
68
|
/**
|
|
71
69
|
* Requests a JWT for the current user and a specific collection/product/proof
|
|
72
70
|
* Validates if the user has access to the resource, and returns a JWT
|
|
73
71
|
*/
|
|
74
|
-
function requestPublicJWT(collectionId: string, productId: string, proofId: string): Promise<
|
|
72
|
+
function requestPublicJWT(collectionId: string, productId: string, proofId: string): Promise<string>;
|
|
75
73
|
/**
|
|
76
74
|
* Gets current account information for the logged in user.
|
|
77
75
|
* Returns user, owner, account, and location objects.
|