@meistrari/data-token 0.0.15 → 0.0.16

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.
@@ -22,7 +22,18 @@ declare function createDataTokenPlugin(url: string, skipOnError?: boolean, getTo
22
22
  decorator: {};
23
23
  store: {};
24
24
  derive: {
25
- readonly authData?: any;
25
+ readonly authData: {
26
+ requestId: string;
27
+ workspace: {
28
+ id: string;
29
+ title: string;
30
+ };
31
+ user?: {
32
+ id: string;
33
+ email: string;
34
+ uuid: string | null;
35
+ } | undefined;
36
+ } | null;
26
37
  };
27
38
  resolve: {};
28
39
  }, {
@@ -22,7 +22,18 @@ declare function createDataTokenPlugin(url: string, skipOnError?: boolean, getTo
22
22
  decorator: {};
23
23
  store: {};
24
24
  derive: {
25
- readonly authData?: any;
25
+ readonly authData: {
26
+ requestId: string;
27
+ workspace: {
28
+ id: string;
29
+ title: string;
30
+ };
31
+ user?: {
32
+ id: string;
33
+ email: string;
34
+ uuid: string | null;
35
+ } | undefined;
36
+ } | null;
26
37
  };
27
38
  resolve: {};
28
39
  }, {
@@ -1,6 +1,6 @@
1
1
  import * as hono from 'hono';
2
2
  import { Context } from 'hono';
3
- import { D as DataToken } from '../shared/data-token.81835829.mjs';
3
+ import { D as DataToken } from '../shared/data-token.815fae84.mjs';
4
4
  import 'zod';
5
5
 
6
6
  type DataTokenContext = {
@@ -1,6 +1,6 @@
1
1
  import * as hono from 'hono';
2
2
  import { Context } from 'hono';
3
- import { D as DataToken } from '../shared/data-token.81835829.js';
3
+ import { D as DataToken } from '../shared/data-token.815fae84.js';
4
4
  import 'zod';
5
5
 
6
6
  type DataTokenContext = {
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- export { D as DataToken, V as ValidatorConfig } from './shared/data-token.81835829.mjs';
1
+ export { D as DataToken, V as ValidatorConfig } from './shared/data-token.815fae84.mjs';
2
2
  import 'zod';
3
3
 
4
4
  /**
@@ -12,16 +12,16 @@ import 'zod';
12
12
  declare function getValidator(jwksUrl: string, { algorithms }?: {
13
13
  algorithms: string[];
14
14
  }): (token: string) => Promise<{
15
- requestId?: string;
16
- workspace?: {
17
- id?: string;
18
- title?: string;
15
+ requestId: string;
16
+ workspace: {
17
+ id: string;
18
+ title: string;
19
19
  };
20
20
  user?: {
21
- id?: string;
22
- email?: string;
23
- uuid?: string;
24
- };
21
+ id: string;
22
+ email: string;
23
+ uuid: string | null;
24
+ } | undefined;
25
25
  }>;
26
26
 
27
27
  export { getValidator };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { D as DataToken, V as ValidatorConfig } from './shared/data-token.81835829.js';
1
+ export { D as DataToken, V as ValidatorConfig } from './shared/data-token.815fae84.js';
2
2
  import 'zod';
3
3
 
4
4
  /**
@@ -12,16 +12,16 @@ import 'zod';
12
12
  declare function getValidator(jwksUrl: string, { algorithms }?: {
13
13
  algorithms: string[];
14
14
  }): (token: string) => Promise<{
15
- requestId?: string;
16
- workspace?: {
17
- id?: string;
18
- title?: string;
15
+ requestId: string;
16
+ workspace: {
17
+ id: string;
18
+ title: string;
19
19
  };
20
20
  user?: {
21
- id?: string;
22
- email?: string;
23
- uuid?: string;
24
- };
21
+ id: string;
22
+ email: string;
23
+ uuid: string | null;
24
+ } | undefined;
25
25
  }>;
26
26
 
27
27
  export { getValidator };
@@ -6,47 +6,47 @@ declare const DataToken: z.ZodObject<{
6
6
  id: z.ZodString;
7
7
  title: z.ZodString;
8
8
  }, "strip", z.ZodTypeAny, {
9
- id?: string;
10
- title?: string;
9
+ id: string;
10
+ title: string;
11
11
  }, {
12
- id?: string;
13
- title?: string;
12
+ id: string;
13
+ title: string;
14
14
  }>;
15
15
  user: z.ZodOptional<z.ZodObject<{
16
16
  id: z.ZodString;
17
17
  email: z.ZodString;
18
18
  uuid: z.ZodNullable<z.ZodString>;
19
19
  }, "strip", z.ZodTypeAny, {
20
- id?: string;
21
- email?: string;
22
- uuid?: string;
20
+ id: string;
21
+ email: string;
22
+ uuid: string | null;
23
23
  }, {
24
- id?: string;
25
- email?: string;
26
- uuid?: string;
24
+ id: string;
25
+ email: string;
26
+ uuid: string | null;
27
27
  }>>;
28
28
  }, "strip", z.ZodTypeAny, {
29
- requestId?: string;
30
- workspace?: {
31
- id?: string;
32
- title?: string;
29
+ requestId: string;
30
+ workspace: {
31
+ id: string;
32
+ title: string;
33
33
  };
34
34
  user?: {
35
- id?: string;
36
- email?: string;
37
- uuid?: string;
38
- };
35
+ id: string;
36
+ email: string;
37
+ uuid: string | null;
38
+ } | undefined;
39
39
  }, {
40
- requestId?: string;
41
- workspace?: {
42
- id?: string;
43
- title?: string;
40
+ requestId: string;
41
+ workspace: {
42
+ id: string;
43
+ title: string;
44
44
  };
45
45
  user?: {
46
- id?: string;
47
- email?: string;
48
- uuid?: string;
49
- };
46
+ id: string;
47
+ email: string;
48
+ uuid: string | null;
49
+ } | undefined;
50
50
  }>;
51
51
  type DataToken = z.infer<typeof DataToken>;
52
52
  type ValidatorConfig = {
@@ -6,47 +6,47 @@ declare const DataToken: z.ZodObject<{
6
6
  id: z.ZodString;
7
7
  title: z.ZodString;
8
8
  }, "strip", z.ZodTypeAny, {
9
- id?: string;
10
- title?: string;
9
+ id: string;
10
+ title: string;
11
11
  }, {
12
- id?: string;
13
- title?: string;
12
+ id: string;
13
+ title: string;
14
14
  }>;
15
15
  user: z.ZodOptional<z.ZodObject<{
16
16
  id: z.ZodString;
17
17
  email: z.ZodString;
18
18
  uuid: z.ZodNullable<z.ZodString>;
19
19
  }, "strip", z.ZodTypeAny, {
20
- id?: string;
21
- email?: string;
22
- uuid?: string;
20
+ id: string;
21
+ email: string;
22
+ uuid: string | null;
23
23
  }, {
24
- id?: string;
25
- email?: string;
26
- uuid?: string;
24
+ id: string;
25
+ email: string;
26
+ uuid: string | null;
27
27
  }>>;
28
28
  }, "strip", z.ZodTypeAny, {
29
- requestId?: string;
30
- workspace?: {
31
- id?: string;
32
- title?: string;
29
+ requestId: string;
30
+ workspace: {
31
+ id: string;
32
+ title: string;
33
33
  };
34
34
  user?: {
35
- id?: string;
36
- email?: string;
37
- uuid?: string;
38
- };
35
+ id: string;
36
+ email: string;
37
+ uuid: string | null;
38
+ } | undefined;
39
39
  }, {
40
- requestId?: string;
41
- workspace?: {
42
- id?: string;
43
- title?: string;
40
+ requestId: string;
41
+ workspace: {
42
+ id: string;
43
+ title: string;
44
44
  };
45
45
  user?: {
46
- id?: string;
47
- email?: string;
48
- uuid?: string;
49
- };
46
+ id: string;
47
+ email: string;
48
+ uuid: string | null;
49
+ } | undefined;
50
50
  }>;
51
51
  type DataToken = z.infer<typeof DataToken>;
52
52
  type ValidatorConfig = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@meistrari/data-token",
3
3
  "type": "module",
4
- "version": "0.0.15",
4
+ "version": "0.0.16",
5
5
  "description": "Internal library to verify and decode the API Gateway data token",
6
6
  "author": "Roz <roz@meistrari.com>",
7
7
  "license": "UNLICENSED",