@fireproof/core-types-protocols-dashboard 0.24.8 → 0.24.9
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/index.d.ts +1 -0
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/package.json +5 -5
- package/token.d.ts +36 -0
- package/token.js +7 -0
- package/token.js.map +1 -0
package/index.d.ts
CHANGED
package/index.js
CHANGED
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../jsr/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../jsr/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAE/B,cAAc,YAAY,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fireproof/core-types-protocols-dashboard",
|
|
3
|
-
"version": "0.24.
|
|
3
|
+
"version": "0.24.9",
|
|
4
4
|
"description": "Live ledger for the web.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"url": "https://github.com/fireproof-storage/fireproof/issues"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@adviser/cement": "~0.5.
|
|
38
|
-
"@fireproof/core-types-base": "0.24.
|
|
39
|
-
"@fireproof/core-types-device-id": "0.24.
|
|
40
|
-
"@fireproof/core-types-protocols-cloud": "0.24.
|
|
37
|
+
"@adviser/cement": "~0.5.17",
|
|
38
|
+
"@fireproof/core-types-base": "0.24.9",
|
|
39
|
+
"@fireproof/core-types-device-id": "0.24.9",
|
|
40
|
+
"@fireproof/core-types-protocols-cloud": "0.24.9"
|
|
41
41
|
}
|
|
42
42
|
}
|
package/token.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Result } from "@adviser/cement";
|
|
2
|
+
import { DashAuthType, User } from "./msg-types.js";
|
|
3
|
+
import { ClerkClaim } from "@fireproof/core-types-base";
|
|
4
|
+
export interface TokenByResultIdParam {
|
|
5
|
+
readonly status: "found" | "not-found";
|
|
6
|
+
readonly resultId: string;
|
|
7
|
+
readonly token?: string;
|
|
8
|
+
readonly now: Date;
|
|
9
|
+
}
|
|
10
|
+
export interface FPApiToken {
|
|
11
|
+
verify(token: string): Promise<Result<VerifiedClaimsResult>>;
|
|
12
|
+
}
|
|
13
|
+
export interface WithAuth {
|
|
14
|
+
readonly auth: DashAuthType;
|
|
15
|
+
}
|
|
16
|
+
export interface VerifiedClaimsResult {
|
|
17
|
+
readonly type: DashAuthType["type"];
|
|
18
|
+
readonly token: string;
|
|
19
|
+
readonly claims: unknown;
|
|
20
|
+
}
|
|
21
|
+
export interface ClerkVerifiedAuth {
|
|
22
|
+
readonly type: "clerk";
|
|
23
|
+
readonly claims: ClerkClaim;
|
|
24
|
+
}
|
|
25
|
+
export interface VerifiedAuthResult {
|
|
26
|
+
readonly type: "VerifiedAuthResult";
|
|
27
|
+
readonly inDashAuth: DashAuthType;
|
|
28
|
+
readonly verifiedAuth: ClerkVerifiedAuth;
|
|
29
|
+
}
|
|
30
|
+
export interface VerifiedAuthUserResult extends Omit<VerifiedAuthResult, "type"> {
|
|
31
|
+
readonly type: "VerifiedAuthUserResult";
|
|
32
|
+
readonly user: User;
|
|
33
|
+
}
|
|
34
|
+
export type VerifiedResult = VerifiedAuthResult | VerifiedAuthUserResult;
|
|
35
|
+
export declare function isVerifiedAuth(obj: VerifiedResult): obj is VerifiedAuthResult;
|
|
36
|
+
export declare function isVerifiedAuthUser(obj: VerifiedResult): obj is VerifiedAuthUserResult;
|
package/token.js
ADDED
package/token.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token.js","sourceRoot":"","sources":["../jsr/token.ts"],"names":[],"mappings":"AAiDA,MAAM,UAAU,cAAc,CAAC,GAAmB,EAA6B;IAC7E,OAAQ,GAA0B,CAAC,IAAI,KAAK,oBAAoB,CAAC;AAAA,CAClE;AAED,MAAM,UAAU,kBAAkB,CAAC,GAAmB,EAAiC;IACrF,OAAQ,GAA8B,CAAC,IAAI,KAAK,wBAAwB,CAAC;AAAA,CAC1E"}
|