@meistrari/data-token 1.2.1 → 1.2.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/dist/adapters/elysia.d.mts +1 -0
- package/dist/adapters/elysia.d.ts +1 -0
- package/dist/adapters/hono.d.mts +1 -1
- package/dist/adapters/hono.d.ts +1 -1
- package/dist/index.d.mts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.mjs +2 -1
- package/dist/shared/{data-token.1d70cb5e.d.mts → data-token.f2fe9a18.d.mts} +5 -0
- package/dist/shared/{data-token.1d70cb5e.d.ts → data-token.f2fe9a18.d.ts} +5 -0
- package/package.json +1 -1
package/dist/adapters/hono.d.mts
CHANGED
package/dist/adapters/hono.d.ts
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as jose from 'jose';
|
|
2
2
|
import { RemoteJWKSetOptions, errors } from 'jose';
|
|
3
3
|
import * as zod from 'zod';
|
|
4
|
-
export { D as DataToken, V as ValidatorConfig } from './shared/data-token.
|
|
4
|
+
export { D as DataToken, V as ValidatorConfig } from './shared/data-token.f2fe9a18.mjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Get a validator function that can validate a data token.
|
|
@@ -26,6 +26,7 @@ declare function getValidator(jwksUrl: string, { algorithms, remoteJwksOptions,
|
|
|
26
26
|
id: string;
|
|
27
27
|
email: string;
|
|
28
28
|
uuid: string | null;
|
|
29
|
+
roles?: string[] | null | undefined;
|
|
29
30
|
} | undefined;
|
|
30
31
|
}>;
|
|
31
32
|
/**
|
|
@@ -53,6 +54,7 @@ declare function safeParse(jwt: string): zod.SafeParseReturnType<{
|
|
|
53
54
|
id: string;
|
|
54
55
|
email: string;
|
|
55
56
|
uuid: string | null;
|
|
57
|
+
roles?: string[] | null | undefined;
|
|
56
58
|
} | undefined;
|
|
57
59
|
}, {
|
|
58
60
|
requestId: string;
|
|
@@ -64,6 +66,7 @@ declare function safeParse(jwt: string): zod.SafeParseReturnType<{
|
|
|
64
66
|
id: string;
|
|
65
67
|
email: string;
|
|
66
68
|
uuid: string | null;
|
|
69
|
+
roles?: string[] | null | undefined;
|
|
67
70
|
} | undefined;
|
|
68
71
|
}>;
|
|
69
72
|
/**
|
|
@@ -84,6 +87,7 @@ declare function unsafeDecode(jwt: string): {
|
|
|
84
87
|
id: string;
|
|
85
88
|
email: string;
|
|
86
89
|
uuid: string | null;
|
|
90
|
+
roles?: string[] | null | undefined;
|
|
87
91
|
} | undefined;
|
|
88
92
|
} & jose.JWTPayload;
|
|
89
93
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as jose from 'jose';
|
|
2
2
|
import { RemoteJWKSetOptions, errors } from 'jose';
|
|
3
3
|
import * as zod from 'zod';
|
|
4
|
-
export { D as DataToken, V as ValidatorConfig } from './shared/data-token.
|
|
4
|
+
export { D as DataToken, V as ValidatorConfig } from './shared/data-token.f2fe9a18.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Get a validator function that can validate a data token.
|
|
@@ -26,6 +26,7 @@ declare function getValidator(jwksUrl: string, { algorithms, remoteJwksOptions,
|
|
|
26
26
|
id: string;
|
|
27
27
|
email: string;
|
|
28
28
|
uuid: string | null;
|
|
29
|
+
roles?: string[] | null | undefined;
|
|
29
30
|
} | undefined;
|
|
30
31
|
}>;
|
|
31
32
|
/**
|
|
@@ -53,6 +54,7 @@ declare function safeParse(jwt: string): zod.SafeParseReturnType<{
|
|
|
53
54
|
id: string;
|
|
54
55
|
email: string;
|
|
55
56
|
uuid: string | null;
|
|
57
|
+
roles?: string[] | null | undefined;
|
|
56
58
|
} | undefined;
|
|
57
59
|
}, {
|
|
58
60
|
requestId: string;
|
|
@@ -64,6 +66,7 @@ declare function safeParse(jwt: string): zod.SafeParseReturnType<{
|
|
|
64
66
|
id: string;
|
|
65
67
|
email: string;
|
|
66
68
|
uuid: string | null;
|
|
69
|
+
roles?: string[] | null | undefined;
|
|
67
70
|
} | undefined;
|
|
68
71
|
}>;
|
|
69
72
|
/**
|
|
@@ -84,6 +87,7 @@ declare function unsafeDecode(jwt: string): {
|
|
|
84
87
|
id: string;
|
|
85
88
|
email: string;
|
|
86
89
|
uuid: string | null;
|
|
90
|
+
roles?: string[] | null | undefined;
|
|
87
91
|
} | undefined;
|
|
88
92
|
} & jose.JWTPayload;
|
|
89
93
|
|
package/dist/index.mjs
CHANGED
|
@@ -16,14 +16,17 @@ declare const DataToken: z.ZodObject<{
|
|
|
16
16
|
id: z.ZodString;
|
|
17
17
|
email: z.ZodString;
|
|
18
18
|
uuid: z.ZodNullable<z.ZodString>;
|
|
19
|
+
roles: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
19
20
|
}, "strip", z.ZodTypeAny, {
|
|
20
21
|
id: string;
|
|
21
22
|
email: string;
|
|
22
23
|
uuid: string | null;
|
|
24
|
+
roles?: string[] | null | undefined;
|
|
23
25
|
}, {
|
|
24
26
|
id: string;
|
|
25
27
|
email: string;
|
|
26
28
|
uuid: string | null;
|
|
29
|
+
roles?: string[] | null | undefined;
|
|
27
30
|
}>>;
|
|
28
31
|
}, "strip", z.ZodTypeAny, {
|
|
29
32
|
requestId: string;
|
|
@@ -35,6 +38,7 @@ declare const DataToken: z.ZodObject<{
|
|
|
35
38
|
id: string;
|
|
36
39
|
email: string;
|
|
37
40
|
uuid: string | null;
|
|
41
|
+
roles?: string[] | null | undefined;
|
|
38
42
|
} | undefined;
|
|
39
43
|
}, {
|
|
40
44
|
requestId: string;
|
|
@@ -46,6 +50,7 @@ declare const DataToken: z.ZodObject<{
|
|
|
46
50
|
id: string;
|
|
47
51
|
email: string;
|
|
48
52
|
uuid: string | null;
|
|
53
|
+
roles?: string[] | null | undefined;
|
|
49
54
|
} | undefined;
|
|
50
55
|
}>;
|
|
51
56
|
type DataToken = z.infer<typeof DataToken>;
|
|
@@ -16,14 +16,17 @@ declare const DataToken: z.ZodObject<{
|
|
|
16
16
|
id: z.ZodString;
|
|
17
17
|
email: z.ZodString;
|
|
18
18
|
uuid: z.ZodNullable<z.ZodString>;
|
|
19
|
+
roles: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
19
20
|
}, "strip", z.ZodTypeAny, {
|
|
20
21
|
id: string;
|
|
21
22
|
email: string;
|
|
22
23
|
uuid: string | null;
|
|
24
|
+
roles?: string[] | null | undefined;
|
|
23
25
|
}, {
|
|
24
26
|
id: string;
|
|
25
27
|
email: string;
|
|
26
28
|
uuid: string | null;
|
|
29
|
+
roles?: string[] | null | undefined;
|
|
27
30
|
}>>;
|
|
28
31
|
}, "strip", z.ZodTypeAny, {
|
|
29
32
|
requestId: string;
|
|
@@ -35,6 +38,7 @@ declare const DataToken: z.ZodObject<{
|
|
|
35
38
|
id: string;
|
|
36
39
|
email: string;
|
|
37
40
|
uuid: string | null;
|
|
41
|
+
roles?: string[] | null | undefined;
|
|
38
42
|
} | undefined;
|
|
39
43
|
}, {
|
|
40
44
|
requestId: string;
|
|
@@ -46,6 +50,7 @@ declare const DataToken: z.ZodObject<{
|
|
|
46
50
|
id: string;
|
|
47
51
|
email: string;
|
|
48
52
|
uuid: string | null;
|
|
53
|
+
roles?: string[] | null | undefined;
|
|
49
54
|
} | undefined;
|
|
50
55
|
}>;
|
|
51
56
|
type DataToken = z.infer<typeof DataToken>;
|
package/package.json
CHANGED