@shipfox/api-auth-dto 9.0.2 → 9.3.0

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.
@@ -1,2 +1,2 @@
1
1
  $ shipfox-swc
2
- Successfully compiled: 9 files with swc (78.46ms)
2
+ Successfully compiled: 10 files with swc (304ms)
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @shipfox/api-auth-dto
2
2
 
3
+ ## 9.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 10cf63c: Add first-owner bootstrap and administrator grant management routes.
8
+
9
+ ## 9.2.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 456c884: Add Auth-owned local administrator grants and server-side role evaluation.
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies [36d8338]
18
+ - @shipfox/api-common-dto@9.2.0
19
+
3
20
  ## 9.0.2
4
21
 
5
22
  ### Patch Changes
@@ -32,6 +32,44 @@ export declare const authInterModuleContract: import("@shipfox/inter-module").In
32
32
  token: z.ZodString;
33
33
  }, z.core.$strip>;
34
34
  };
35
+ readonly getCurrentAdminRole: {
36
+ readonly input: z.ZodObject<{
37
+ userId: z.ZodString;
38
+ }, z.core.$strip>;
39
+ readonly output: z.ZodObject<{
40
+ role: z.ZodNullable<z.ZodEnum<{
41
+ "admin-observer": "admin-observer";
42
+ "admin-operator": "admin-operator";
43
+ "admin-owner": "admin-owner";
44
+ }>>;
45
+ }, z.core.$strip>;
46
+ };
47
+ readonly requireAdminRole: {
48
+ readonly input: z.ZodObject<{
49
+ userId: z.ZodString;
50
+ minimumRole: z.ZodEnum<{
51
+ "admin-observer": "admin-observer";
52
+ "admin-operator": "admin-operator";
53
+ "admin-owner": "admin-owner";
54
+ }>;
55
+ }, z.core.$strip>;
56
+ readonly output: z.ZodObject<{
57
+ role: z.ZodEnum<{
58
+ "admin-observer": "admin-observer";
59
+ "admin-operator": "admin-operator";
60
+ "admin-owner": "admin-owner";
61
+ }>;
62
+ }, z.core.$strip>;
63
+ readonly errors: {
64
+ readonly 'admin-role-required': z.ZodObject<{
65
+ requiredRole: z.ZodEnum<{
66
+ "admin-observer": "admin-observer";
67
+ "admin-operator": "admin-operator";
68
+ "admin-owner": "admin-owner";
69
+ }>;
70
+ }, z.core.$strip>;
71
+ };
72
+ };
35
73
  };
36
74
  }>;
37
75
  export type AuthInterModuleClient = InterModuleClient<typeof authInterModuleContract>;
@@ -1 +1 @@
1
- {"version":3,"file":"inter-module.d.ts","sourceRoot":"","sources":["../src/inter-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,iBAAiB,EAAC,MAAM,uBAAuB,CAAC;AACxF,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAWtB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYlC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
1
+ {"version":3,"file":"inter-module.d.ts","sourceRoot":"","sources":["../src/inter-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,iBAAiB,EAAC,MAAM,uBAAuB,CAAC;AACxF,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAYtB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BlC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { defineInterModuleContract } from '@shipfox/inter-module';
2
2
  import { z } from 'zod';
3
+ import { adminRoleSchema } from './schemas/admin.js';
3
4
  import { jobLeaseTokenClaimsSchema } from './schemas/job-lease-token.js';
4
5
  import { runnerSessionTokenClaimsSchema } from './schemas/runner-session-token.js';
5
6
  const runnerSessionClaimsSchema = runnerSessionTokenClaimsSchema.omit({
@@ -26,6 +27,28 @@ export const authInterModuleContract = defineInterModuleContract({
26
27
  output: z.object({
27
28
  token: z.string().min(1)
28
29
  })
30
+ },
31
+ getCurrentAdminRole: {
32
+ input: z.object({
33
+ userId: z.string().uuid()
34
+ }),
35
+ output: z.object({
36
+ role: adminRoleSchema.nullable()
37
+ })
38
+ },
39
+ requireAdminRole: {
40
+ input: z.object({
41
+ userId: z.string().uuid(),
42
+ minimumRole: adminRoleSchema
43
+ }),
44
+ output: z.object({
45
+ role: adminRoleSchema
46
+ }),
47
+ errors: {
48
+ 'admin-role-required': z.object({
49
+ requiredRole: adminRoleSchema
50
+ })
51
+ }
29
52
  }
30
53
  }
31
54
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/inter-module.ts"],"sourcesContent":["import {defineInterModuleContract, type InterModuleClient} from '@shipfox/inter-module';\nimport {z} from 'zod';\nimport {jobLeaseTokenClaimsSchema} from './schemas/job-lease-token.js';\nimport {runnerSessionTokenClaimsSchema} from './schemas/runner-session-token.js';\n\nconst runnerSessionClaimsSchema = runnerSessionTokenClaimsSchema.omit({\n aud: true,\n iat: true,\n exp: true,\n});\nconst jobLeaseClaimsSchema = jobLeaseTokenClaimsSchema.omit({aud: true, iat: true, exp: true});\n\nexport const authInterModuleContract = defineInterModuleContract({\n module: 'auth',\n methods: {\n mintRunnerSessionToken: {\n input: runnerSessionClaimsSchema,\n output: z.object({token: z.string().min(1)}),\n },\n mintJobLeaseToken: {\n input: jobLeaseClaimsSchema,\n output: z.object({token: z.string().min(1)}),\n },\n },\n});\n\nexport type AuthInterModuleClient = InterModuleClient<typeof authInterModuleContract>;\n"],"names":["defineInterModuleContract","z","jobLeaseTokenClaimsSchema","runnerSessionTokenClaimsSchema","runnerSessionClaimsSchema","omit","aud","iat","exp","jobLeaseClaimsSchema","authInterModuleContract","module","methods","mintRunnerSessionToken","input","output","object","token","string","min","mintJobLeaseToken"],"mappings":"AAAA,SAAQA,yBAAyB,QAA+B,wBAAwB;AACxF,SAAQC,CAAC,QAAO,MAAM;AACtB,SAAQC,yBAAyB,QAAO,+BAA+B;AACvE,SAAQC,8BAA8B,QAAO,oCAAoC;AAEjF,MAAMC,4BAA4BD,+BAA+BE,IAAI,CAAC;IACpEC,KAAK;IACLC,KAAK;IACLC,KAAK;AACP;AACA,MAAMC,uBAAuBP,0BAA0BG,IAAI,CAAC;IAACC,KAAK;IAAMC,KAAK;IAAMC,KAAK;AAAI;AAE5F,OAAO,MAAME,0BAA0BV,0BAA0B;IAC/DW,QAAQ;IACRC,SAAS;QACPC,wBAAwB;YACtBC,OAAOV;YACPW,QAAQd,EAAEe,MAAM,CAAC;gBAACC,OAAOhB,EAAEiB,MAAM,GAAGC,GAAG,CAAC;YAAE;QAC5C;QACAC,mBAAmB;YACjBN,OAAOL;YACPM,QAAQd,EAAEe,MAAM,CAAC;gBAACC,OAAOhB,EAAEiB,MAAM,GAAGC,GAAG,CAAC;YAAE;QAC5C;IACF;AACF,GAAG"}
1
+ {"version":3,"sources":["../src/inter-module.ts"],"sourcesContent":["import {defineInterModuleContract, type InterModuleClient} from '@shipfox/inter-module';\nimport {z} from 'zod';\nimport {adminRoleSchema} from './schemas/admin.js';\nimport {jobLeaseTokenClaimsSchema} from './schemas/job-lease-token.js';\nimport {runnerSessionTokenClaimsSchema} from './schemas/runner-session-token.js';\n\nconst runnerSessionClaimsSchema = runnerSessionTokenClaimsSchema.omit({\n aud: true,\n iat: true,\n exp: true,\n});\nconst jobLeaseClaimsSchema = jobLeaseTokenClaimsSchema.omit({aud: true, iat: true, exp: true});\n\nexport const authInterModuleContract = defineInterModuleContract({\n module: 'auth',\n methods: {\n mintRunnerSessionToken: {\n input: runnerSessionClaimsSchema,\n output: z.object({token: z.string().min(1)}),\n },\n mintJobLeaseToken: {\n input: jobLeaseClaimsSchema,\n output: z.object({token: z.string().min(1)}),\n },\n getCurrentAdminRole: {\n input: z.object({userId: z.string().uuid()}),\n output: z.object({role: adminRoleSchema.nullable()}),\n },\n requireAdminRole: {\n input: z.object({\n userId: z.string().uuid(),\n minimumRole: adminRoleSchema,\n }),\n output: z.object({role: adminRoleSchema}),\n errors: {\n 'admin-role-required': z.object({requiredRole: adminRoleSchema}),\n },\n },\n },\n});\n\nexport type AuthInterModuleClient = InterModuleClient<typeof authInterModuleContract>;\n"],"names":["defineInterModuleContract","z","adminRoleSchema","jobLeaseTokenClaimsSchema","runnerSessionTokenClaimsSchema","runnerSessionClaimsSchema","omit","aud","iat","exp","jobLeaseClaimsSchema","authInterModuleContract","module","methods","mintRunnerSessionToken","input","output","object","token","string","min","mintJobLeaseToken","getCurrentAdminRole","userId","uuid","role","nullable","requireAdminRole","minimumRole","errors","requiredRole"],"mappings":"AAAA,SAAQA,yBAAyB,QAA+B,wBAAwB;AACxF,SAAQC,CAAC,QAAO,MAAM;AACtB,SAAQC,eAAe,QAAO,qBAAqB;AACnD,SAAQC,yBAAyB,QAAO,+BAA+B;AACvE,SAAQC,8BAA8B,QAAO,oCAAoC;AAEjF,MAAMC,4BAA4BD,+BAA+BE,IAAI,CAAC;IACpEC,KAAK;IACLC,KAAK;IACLC,KAAK;AACP;AACA,MAAMC,uBAAuBP,0BAA0BG,IAAI,CAAC;IAACC,KAAK;IAAMC,KAAK;IAAMC,KAAK;AAAI;AAE5F,OAAO,MAAME,0BAA0BX,0BAA0B;IAC/DY,QAAQ;IACRC,SAAS;QACPC,wBAAwB;YACtBC,OAAOV;YACPW,QAAQf,EAAEgB,MAAM,CAAC;gBAACC,OAAOjB,EAAEkB,MAAM,GAAGC,GAAG,CAAC;YAAE;QAC5C;QACAC,mBAAmB;YACjBN,OAAOL;YACPM,QAAQf,EAAEgB,MAAM,CAAC;gBAACC,OAAOjB,EAAEkB,MAAM,GAAGC,GAAG,CAAC;YAAE;QAC5C;QACAE,qBAAqB;YACnBP,OAAOd,EAAEgB,MAAM,CAAC;gBAACM,QAAQtB,EAAEkB,MAAM,GAAGK,IAAI;YAAE;YAC1CR,QAAQf,EAAEgB,MAAM,CAAC;gBAACQ,MAAMvB,gBAAgBwB,QAAQ;YAAE;QACpD;QACAC,kBAAkB;YAChBZ,OAAOd,EAAEgB,MAAM,CAAC;gBACdM,QAAQtB,EAAEkB,MAAM,GAAGK,IAAI;gBACvBI,aAAa1B;YACf;YACAc,QAAQf,EAAEgB,MAAM,CAAC;gBAACQ,MAAMvB;YAAe;YACvC2B,QAAQ;gBACN,uBAAuB5B,EAAEgB,MAAM,CAAC;oBAACa,cAAc5B;gBAAe;YAChE;QACF;IACF;AACF,GAAG"}
@@ -0,0 +1,93 @@
1
+ import { z } from 'zod';
2
+ export declare const adminRoleSchema: z.ZodEnum<{
3
+ "admin-observer": "admin-observer";
4
+ "admin-operator": "admin-operator";
5
+ "admin-owner": "admin-owner";
6
+ }>;
7
+ export type AdminRole = z.infer<typeof adminRoleSchema>;
8
+ export declare const adminGrantDtoSchema: z.ZodObject<{
9
+ id: z.ZodString;
10
+ user_id: z.ZodString;
11
+ role: z.ZodEnum<{
12
+ "admin-observer": "admin-observer";
13
+ "admin-operator": "admin-operator";
14
+ "admin-owner": "admin-owner";
15
+ }>;
16
+ revoked_at: z.ZodNullable<z.ZodString>;
17
+ created_at: z.ZodString;
18
+ updated_at: z.ZodString;
19
+ }, z.core.$strip>;
20
+ export type AdminGrantDto = z.infer<typeof adminGrantDtoSchema>;
21
+ export declare const listAdminGrantsResponseSchema: z.ZodObject<{
22
+ grants: z.ZodArray<z.ZodObject<{
23
+ id: z.ZodString;
24
+ user_id: z.ZodString;
25
+ role: z.ZodEnum<{
26
+ "admin-observer": "admin-observer";
27
+ "admin-operator": "admin-operator";
28
+ "admin-owner": "admin-owner";
29
+ }>;
30
+ revoked_at: z.ZodNullable<z.ZodString>;
31
+ created_at: z.ZodString;
32
+ updated_at: z.ZodString;
33
+ }, z.core.$strip>>;
34
+ }, z.core.$strip>;
35
+ export type ListAdminGrantsResponseDto = z.infer<typeof listAdminGrantsResponseSchema>;
36
+ export declare const bootstrapAdminOwnerBodySchema: z.ZodObject<{
37
+ bootstrap_token: z.ZodString;
38
+ }, z.core.$strip>;
39
+ export type BootstrapAdminOwnerBodyDto = z.infer<typeof bootstrapAdminOwnerBodySchema>;
40
+ export declare const bootstrapAdminOwnerResponseSchema: z.ZodObject<{
41
+ id: z.ZodString;
42
+ user_id: z.ZodString;
43
+ role: z.ZodEnum<{
44
+ "admin-observer": "admin-observer";
45
+ "admin-operator": "admin-operator";
46
+ "admin-owner": "admin-owner";
47
+ }>;
48
+ revoked_at: z.ZodNullable<z.ZodString>;
49
+ created_at: z.ZodString;
50
+ updated_at: z.ZodString;
51
+ }, z.core.$strip>;
52
+ export type BootstrapAdminOwnerResponseDto = z.infer<typeof bootstrapAdminOwnerResponseSchema>;
53
+ export declare const grantAdminRoleBodySchema: z.ZodObject<{
54
+ user_id: z.ZodString;
55
+ role: z.ZodEnum<{
56
+ "admin-observer": "admin-observer";
57
+ "admin-operator": "admin-operator";
58
+ "admin-owner": "admin-owner";
59
+ }>;
60
+ reason: z.ZodString;
61
+ }, z.core.$strip>;
62
+ export type GrantAdminRoleBodyDto = z.infer<typeof grantAdminRoleBodySchema>;
63
+ export declare const grantAdminRoleResponseSchema: z.ZodObject<{
64
+ id: z.ZodString;
65
+ user_id: z.ZodString;
66
+ role: z.ZodEnum<{
67
+ "admin-observer": "admin-observer";
68
+ "admin-operator": "admin-operator";
69
+ "admin-owner": "admin-owner";
70
+ }>;
71
+ revoked_at: z.ZodNullable<z.ZodString>;
72
+ created_at: z.ZodString;
73
+ updated_at: z.ZodString;
74
+ }, z.core.$strip>;
75
+ export type GrantAdminRoleResponseDto = z.infer<typeof grantAdminRoleResponseSchema>;
76
+ export declare const revokeAdminGrantBodySchema: z.ZodObject<{
77
+ reason: z.ZodString;
78
+ }, z.core.$strip>;
79
+ export type RevokeAdminGrantBodyDto = z.infer<typeof revokeAdminGrantBodySchema>;
80
+ export declare const revokeAdminGrantResponseSchema: z.ZodObject<{
81
+ id: z.ZodString;
82
+ user_id: z.ZodString;
83
+ role: z.ZodEnum<{
84
+ "admin-observer": "admin-observer";
85
+ "admin-operator": "admin-operator";
86
+ "admin-owner": "admin-owner";
87
+ }>;
88
+ revoked_at: z.ZodNullable<z.ZodString>;
89
+ created_at: z.ZodString;
90
+ updated_at: z.ZodString;
91
+ }, z.core.$strip>;
92
+ export type RevokeAdminGrantResponseDto = z.infer<typeof revokeAdminGrantResponseSchema>;
93
+ //# sourceMappingURL=admin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../src/schemas/admin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,eAAO,MAAM,eAAe;;;;EAA8D,CAAC;AAE3F,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAYxD,eAAO,MAAM,mBAAmB;;;;;;;;;;;iBAO9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;iBAExC,CAAC;AAEH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEvF,eAAO,MAAM,6BAA6B;;iBAExC,CAAC;AAEH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEvF,eAAO,MAAM,iCAAiC;;;;;;;;;;;iBAAsB,CAAC;AAErE,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAE/F,eAAO,MAAM,wBAAwB;;;;;;;;iBAInC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE7E,eAAO,MAAM,4BAA4B;;;;;;;;;;;iBAAsB,CAAC;AAEhE,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAErF,eAAO,MAAM,0BAA0B;;iBAErC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAEjF,eAAO,MAAM,8BAA8B;;;;;;;;;;;iBAAsB,CAAC;AAElE,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC"}
@@ -0,0 +1,38 @@
1
+ import { z } from 'zod';
2
+ export const adminRoleSchema = z.enum([
3
+ 'admin-observer',
4
+ 'admin-operator',
5
+ 'admin-owner'
6
+ ]);
7
+ const timestampSchema = z.string().datetime();
8
+ const CONTROL_OR_FORMAT_CHARACTER_RE = /[\p{Cc}\p{Cf}]/u;
9
+ const reasonSchema = z.string().min(1).max(512).refine((value)=>!CONTROL_OR_FORMAT_CHARACTER_RE.test(value), {
10
+ message: 'must not contain control or format characters'
11
+ });
12
+ export const adminGrantDtoSchema = z.object({
13
+ id: z.string().uuid(),
14
+ user_id: z.string().uuid(),
15
+ role: adminRoleSchema,
16
+ revoked_at: timestampSchema.nullable(),
17
+ created_at: timestampSchema,
18
+ updated_at: timestampSchema
19
+ });
20
+ export const listAdminGrantsResponseSchema = z.object({
21
+ grants: z.array(adminGrantDtoSchema)
22
+ });
23
+ export const bootstrapAdminOwnerBodySchema = z.object({
24
+ bootstrap_token: z.string().min(1).max(512)
25
+ });
26
+ export const bootstrapAdminOwnerResponseSchema = adminGrantDtoSchema;
27
+ export const grantAdminRoleBodySchema = z.object({
28
+ user_id: z.string().uuid(),
29
+ role: adminRoleSchema,
30
+ reason: reasonSchema
31
+ });
32
+ export const grantAdminRoleResponseSchema = adminGrantDtoSchema;
33
+ export const revokeAdminGrantBodySchema = z.object({
34
+ reason: reasonSchema
35
+ });
36
+ export const revokeAdminGrantResponseSchema = adminGrantDtoSchema;
37
+
38
+ //# sourceMappingURL=admin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/schemas/admin.ts"],"sourcesContent":["import {z} from 'zod';\n\nexport const adminRoleSchema = z.enum(['admin-observer', 'admin-operator', 'admin-owner']);\n\nexport type AdminRole = z.infer<typeof adminRoleSchema>;\n\nconst timestampSchema = z.string().datetime();\nconst CONTROL_OR_FORMAT_CHARACTER_RE = /[\\p{Cc}\\p{Cf}]/u;\nconst reasonSchema = z\n .string()\n .min(1)\n .max(512)\n .refine((value) => !CONTROL_OR_FORMAT_CHARACTER_RE.test(value), {\n message: 'must not contain control or format characters',\n });\n\nexport const adminGrantDtoSchema = z.object({\n id: z.string().uuid(),\n user_id: z.string().uuid(),\n role: adminRoleSchema,\n revoked_at: timestampSchema.nullable(),\n created_at: timestampSchema,\n updated_at: timestampSchema,\n});\n\nexport type AdminGrantDto = z.infer<typeof adminGrantDtoSchema>;\n\nexport const listAdminGrantsResponseSchema = z.object({\n grants: z.array(adminGrantDtoSchema),\n});\n\nexport type ListAdminGrantsResponseDto = z.infer<typeof listAdminGrantsResponseSchema>;\n\nexport const bootstrapAdminOwnerBodySchema = z.object({\n bootstrap_token: z.string().min(1).max(512),\n});\n\nexport type BootstrapAdminOwnerBodyDto = z.infer<typeof bootstrapAdminOwnerBodySchema>;\n\nexport const bootstrapAdminOwnerResponseSchema = adminGrantDtoSchema;\n\nexport type BootstrapAdminOwnerResponseDto = z.infer<typeof bootstrapAdminOwnerResponseSchema>;\n\nexport const grantAdminRoleBodySchema = z.object({\n user_id: z.string().uuid(),\n role: adminRoleSchema,\n reason: reasonSchema,\n});\n\nexport type GrantAdminRoleBodyDto = z.infer<typeof grantAdminRoleBodySchema>;\n\nexport const grantAdminRoleResponseSchema = adminGrantDtoSchema;\n\nexport type GrantAdminRoleResponseDto = z.infer<typeof grantAdminRoleResponseSchema>;\n\nexport const revokeAdminGrantBodySchema = z.object({\n reason: reasonSchema,\n});\n\nexport type RevokeAdminGrantBodyDto = z.infer<typeof revokeAdminGrantBodySchema>;\n\nexport const revokeAdminGrantResponseSchema = adminGrantDtoSchema;\n\nexport type RevokeAdminGrantResponseDto = z.infer<typeof revokeAdminGrantResponseSchema>;\n"],"names":["z","adminRoleSchema","enum","timestampSchema","string","datetime","CONTROL_OR_FORMAT_CHARACTER_RE","reasonSchema","min","max","refine","value","test","message","adminGrantDtoSchema","object","id","uuid","user_id","role","revoked_at","nullable","created_at","updated_at","listAdminGrantsResponseSchema","grants","array","bootstrapAdminOwnerBodySchema","bootstrap_token","bootstrapAdminOwnerResponseSchema","grantAdminRoleBodySchema","reason","grantAdminRoleResponseSchema","revokeAdminGrantBodySchema","revokeAdminGrantResponseSchema"],"mappings":"AAAA,SAAQA,CAAC,QAAO,MAAM;AAEtB,OAAO,MAAMC,kBAAkBD,EAAEE,IAAI,CAAC;IAAC;IAAkB;IAAkB;CAAc,EAAE;AAI3F,MAAMC,kBAAkBH,EAAEI,MAAM,GAAGC,QAAQ;AAC3C,MAAMC,iCAAiC;AACvC,MAAMC,eAAeP,EAClBI,MAAM,GACNI,GAAG,CAAC,GACJC,GAAG,CAAC,KACJC,MAAM,CAAC,CAACC,QAAU,CAACL,+BAA+BM,IAAI,CAACD,QAAQ;IAC9DE,SAAS;AACX;AAEF,OAAO,MAAMC,sBAAsBd,EAAEe,MAAM,CAAC;IAC1CC,IAAIhB,EAAEI,MAAM,GAAGa,IAAI;IACnBC,SAASlB,EAAEI,MAAM,GAAGa,IAAI;IACxBE,MAAMlB;IACNmB,YAAYjB,gBAAgBkB,QAAQ;IACpCC,YAAYnB;IACZoB,YAAYpB;AACd,GAAG;AAIH,OAAO,MAAMqB,gCAAgCxB,EAAEe,MAAM,CAAC;IACpDU,QAAQzB,EAAE0B,KAAK,CAACZ;AAClB,GAAG;AAIH,OAAO,MAAMa,gCAAgC3B,EAAEe,MAAM,CAAC;IACpDa,iBAAiB5B,EAAEI,MAAM,GAAGI,GAAG,CAAC,GAAGC,GAAG,CAAC;AACzC,GAAG;AAIH,OAAO,MAAMoB,oCAAoCf,oBAAoB;AAIrE,OAAO,MAAMgB,2BAA2B9B,EAAEe,MAAM,CAAC;IAC/CG,SAASlB,EAAEI,MAAM,GAAGa,IAAI;IACxBE,MAAMlB;IACN8B,QAAQxB;AACV,GAAG;AAIH,OAAO,MAAMyB,+BAA+BlB,oBAAoB;AAIhE,OAAO,MAAMmB,6BAA6BjC,EAAEe,MAAM,CAAC;IACjDgB,QAAQxB;AACV,GAAG;AAIH,OAAO,MAAM2B,iCAAiCpB,oBAAoB"}
@@ -80,6 +80,11 @@ export declare const loginResponseSchema: z.ZodObject<{
80
80
  created_at: z.ZodString;
81
81
  updated_at: z.ZodString;
82
82
  }, z.core.$strip>;
83
+ admin_role: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
84
+ "admin-observer": "admin-observer";
85
+ "admin-operator": "admin-operator";
86
+ "admin-owner": "admin-owner";
87
+ }>>>;
83
88
  }, z.core.$strip>;
84
89
  export type LoginResponseDto = z.infer<typeof loginResponseSchema>;
85
90
  export declare const refreshResponseSchema: z.ZodObject<{
@@ -97,6 +102,11 @@ export declare const refreshResponseSchema: z.ZodObject<{
97
102
  created_at: z.ZodString;
98
103
  updated_at: z.ZodString;
99
104
  }, z.core.$strip>;
105
+ admin_role: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
106
+ "admin-observer": "admin-observer";
107
+ "admin-operator": "admin-operator";
108
+ "admin-owner": "admin-owner";
109
+ }>>>;
100
110
  }, z.core.$strip>;
101
111
  export type RefreshResponseDto = z.infer<typeof refreshResponseSchema>;
102
112
  export declare const meResponseSchema: z.ZodObject<{
@@ -113,6 +123,11 @@ export declare const meResponseSchema: z.ZodObject<{
113
123
  created_at: z.ZodString;
114
124
  updated_at: z.ZodString;
115
125
  }, z.core.$strip>;
126
+ admin_role: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
127
+ "admin-observer": "admin-observer";
128
+ "admin-operator": "admin-operator";
129
+ "admin-owner": "admin-owner";
130
+ }>>>;
116
131
  }, z.core.$strip>;
117
132
  export type MeResponseDto = z.infer<typeof meResponseSchema>;
118
133
  export declare const logoutBodySchema: z.ZodObject<{}, z.core.$strip>;
@@ -146,6 +161,11 @@ export declare const passwordResetConfirmResponseSchema: z.ZodObject<{
146
161
  created_at: z.ZodString;
147
162
  updated_at: z.ZodString;
148
163
  }, z.core.$strip>;
164
+ admin_role: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
165
+ "admin-observer": "admin-observer";
166
+ "admin-operator": "admin-operator";
167
+ "admin-owner": "admin-owner";
168
+ }>>>;
149
169
  }, z.core.$strip>;
150
170
  export type PasswordResetConfirmResponseDto = z.infer<typeof passwordResetConfirmResponseSchema>;
151
171
  export declare const verifyEmailConfirmBodySchema: z.ZodObject<{
@@ -169,6 +189,11 @@ export declare const verifyEmailConfirmResponseSchema: z.ZodObject<{
169
189
  created_at: z.ZodString;
170
190
  updated_at: z.ZodString;
171
191
  }, z.core.$strip>;
192
+ admin_role: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
193
+ "admin-observer": "admin-observer";
194
+ "admin-operator": "admin-operator";
195
+ "admin-owner": "admin-owner";
196
+ }>>>;
172
197
  }, z.core.$strip>;
173
198
  export type VerifyEmailConfirmResponseDto = z.infer<typeof verifyEmailConfirmResponseSchema>;
174
199
  export declare const verifyEmailResendBodySchema: z.ZodObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/schemas/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,WAAW,EAAC,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAGtB,eAAO,MAAM,cAAc,aAA8B,CAAC;AAC1D,OAAO,EAAC,WAAW,EAAC,CAAC;AAErB,eAAO,MAAM,iBAAiB;;iBAE5B,CAAC;AAEH,MAAM,MAAM,cAAc,G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AAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE7F,eAAO,MAAM,2BAA2B;;;iBAGtC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEnF,eAAO,MAAM,+BAA+B;;iBAE1C,CAAC;AAEH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { displayNameSchema, emailSchema } from '@shipfox/api-common-dto';
2
2
  import { z } from 'zod';
3
+ import { adminRoleSchema } from './admin.js';
3
4
  import { userDtoSchema } from './user.js';
4
5
  export const passwordSchema = z.string().min(12).max(128);
5
6
  export { emailSchema };
@@ -40,11 +41,13 @@ export const loginBodySchema = z.object({
40
41
  });
41
42
  export const loginResponseSchema = z.object({
42
43
  token: z.string(),
43
- user: userDtoSchema
44
+ user: userDtoSchema,
45
+ admin_role: adminRoleSchema.nullable().optional()
44
46
  });
45
47
  export const refreshResponseSchema = loginResponseSchema;
46
48
  export const meResponseSchema = z.object({
47
- user: userDtoSchema
49
+ user: userDtoSchema,
50
+ admin_role: adminRoleSchema.nullable().optional()
48
51
  });
49
52
  export const logoutBodySchema = z.object({});
50
53
  export const changePasswordBodySchema = z.object({
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/schemas/auth.ts"],"sourcesContent":["import {displayNameSchema, emailSchema} from '@shipfox/api-common-dto';\nimport {z} from 'zod';\nimport {userDtoSchema} from './user.js';\n\nexport const passwordSchema = z.string().min(12).max(128);\nexport {emailSchema};\n\nexport const loginMethodSchema = z.object({\n id: z.string().min(1).max(128),\n});\n\nexport type LoginMethodDto = z.infer<typeof loginMethodSchema>;\n\nexport const loginMethodsResponseSchema = z.object({\n login_methods: z.array(loginMethodSchema),\n});\n\nexport type LoginMethodsResponseDto = z.infer<typeof loginMethodsResponseSchema>;\n\nexport const signupBodySchema = z.object({\n email: emailSchema,\n password: passwordSchema,\n name: displayNameSchema,\n invitation_token: z.string().min(1).max(256).optional(),\n});\n\nexport type SignupBodyDto = z.infer<typeof signupBodySchema>;\n\nexport const signupAcceptErrorSchema = z.object({\n code: z.string(),\n message: z.string(),\n});\n\nexport type SignupAcceptErrorDto = z.infer<typeof signupAcceptErrorSchema>;\n\nexport const signupMembershipSchema = z.object({\n id: z.string().uuid(),\n user_id: z.string().uuid(),\n workspace_id: z.string().uuid(),\n});\n\nexport type SignupMembershipDto = z.infer<typeof signupMembershipSchema>;\n\nexport const signupResponseSchema = z.object({\n user: userDtoSchema,\n email_challenge: z\n .object({\n id: z.string().uuid(),\n next_resend_available_at: z.string().datetime(),\n })\n .optional(),\n token: z.string().optional(),\n membership: signupMembershipSchema.nullable().optional(),\n accept_error: signupAcceptErrorSchema.optional(),\n});\n\nexport type SignupResponseDto = z.infer<typeof signupResponseSchema>;\n\nexport const loginBodySchema = z.object({\n email: emailSchema,\n password: z.string().min(1).max(128),\n});\n\nexport type LoginBodyDto = z.infer<typeof loginBodySchema>;\n\nexport const loginResponseSchema = z.object({\n token: z.string(),\n user: userDtoSchema,\n});\n\nexport type LoginResponseDto = z.infer<typeof loginResponseSchema>;\n\nexport const refreshResponseSchema = loginResponseSchema;\n\nexport type RefreshResponseDto = z.infer<typeof refreshResponseSchema>;\n\nexport const meResponseSchema = z.object({\n user: userDtoSchema,\n});\n\nexport type MeResponseDto = z.infer<typeof meResponseSchema>;\n\nexport const logoutBodySchema = z.object({});\n\nexport type LogoutBodyDto = z.infer<typeof logoutBodySchema>;\n\nexport const changePasswordBodySchema = z.object({\n current_password: z.string().min(1).max(128),\n new_password: passwordSchema,\n});\n\nexport type ChangePasswordBodyDto = z.infer<typeof changePasswordBodySchema>;\n\nexport const passwordResetRequestBodySchema = z.object({\n email: emailSchema,\n});\n\nexport type PasswordResetRequestBodyDto = z.infer<typeof passwordResetRequestBodySchema>;\n\nexport const passwordResetConfirmBodySchema = z.object({\n token: z.string().min(1),\n new_password: passwordSchema,\n});\n\nexport type PasswordResetConfirmBodyDto = z.infer<typeof passwordResetConfirmBodySchema>;\n\nexport const passwordResetConfirmResponseSchema = loginResponseSchema;\n\nexport type PasswordResetConfirmResponseDto = z.infer<typeof passwordResetConfirmResponseSchema>;\n\nexport const verifyEmailConfirmBodySchema = z.object({\n email: emailSchema,\n challenge_id: z.string().uuid(),\n code: z.string().regex(/^\\d{8}$/u),\n});\n\nexport type VerifyEmailConfirmBodyDto = z.infer<typeof verifyEmailConfirmBodySchema>;\n\nexport const verifyEmailConfirmResponseSchema = loginResponseSchema;\n\nexport type VerifyEmailConfirmResponseDto = z.infer<typeof verifyEmailConfirmResponseSchema>;\n\nexport const verifyEmailResendBodySchema = z.object({\n email: emailSchema,\n challenge_id: z.string().uuid(),\n});\n\nexport type VerifyEmailResendBodyDto = z.infer<typeof verifyEmailResendBodySchema>;\n\nexport const verifyEmailResendResponseSchema = z.object({\n next_resend_available_at: z.string().datetime(),\n});\n\nexport type VerifyEmailResendResponseDto = z.infer<typeof verifyEmailResendResponseSchema>;\n"],"names":["displayNameSchema","emailSchema","z","userDtoSchema","passwordSchema","string","min","max","loginMethodSchema","object","id","loginMethodsResponseSchema","login_methods","array","signupBodySchema","email","password","name","invitation_token","optional","signupAcceptErrorSchema","code","message","signupMembershipSchema","uuid","user_id","workspace_id","signupResponseSchema","user","email_challenge","next_resend_available_at","datetime","token","membership","nullable","accept_error","loginBodySchema","loginResponseSchema","refreshResponseSchema","meResponseSchema","logoutBodySchema","changePasswordBodySchema","current_password","new_password","passwordResetRequestBodySchema","passwordResetConfirmBodySchema","passwordResetConfirmResponseSchema","verifyEmailConfirmBodySchema","challenge_id","regex","verifyEmailConfirmResponseSchema","verifyEmailResendBodySchema","verifyEmailResendResponseSchema"],"mappings":"AAAA,SAAQA,iBAAiB,EAAEC,WAAW,QAAO,0BAA0B;AACvE,SAAQC,CAAC,QAAO,MAAM;AACtB,SAAQC,aAAa,QAAO,YAAY;AAExC,O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schemas/auth.ts"],"sourcesContent":["import {displayNameSchema, emailSchema} from '@shipfox/api-common-dto';\nimport {z} from 'zod';\nimport {adminRoleSchema} from './admin.js';\nimport {userDtoSchema} from './user.js';\n\nexport const passwordSchema = z.string().min(12).max(128);\nexport {emailSchema};\n\nexport const loginMethodSchema = z.object({\n id: z.string().min(1).max(128),\n});\n\nexport type LoginMethodDto = z.infer<typeof loginMethodSchema>;\n\nexport const loginMethodsResponseSchema = z.object({\n login_methods: z.array(loginMethodSchema),\n});\n\nexport type LoginMethodsResponseDto = z.infer<typeof loginMethodsResponseSchema>;\n\nexport const signupBodySchema = z.object({\n email: emailSchema,\n password: passwordSchema,\n name: displayNameSchema,\n invitation_token: z.string().min(1).max(256).optional(),\n});\n\nexport type SignupBodyDto = z.infer<typeof signupBodySchema>;\n\nexport const signupAcceptErrorSchema = z.object({\n code: z.string(),\n message: z.string(),\n});\n\nexport type SignupAcceptErrorDto = z.infer<typeof signupAcceptErrorSchema>;\n\nexport const signupMembershipSchema = z.object({\n id: z.string().uuid(),\n user_id: z.string().uuid(),\n workspace_id: z.string().uuid(),\n});\n\nexport type SignupMembershipDto = z.infer<typeof signupMembershipSchema>;\n\nexport const signupResponseSchema = z.object({\n user: userDtoSchema,\n email_challenge: z\n .object({\n id: z.string().uuid(),\n next_resend_available_at: z.string().datetime(),\n })\n .optional(),\n token: z.string().optional(),\n membership: signupMembershipSchema.nullable().optional(),\n accept_error: signupAcceptErrorSchema.optional(),\n});\n\nexport type SignupResponseDto = z.infer<typeof signupResponseSchema>;\n\nexport const loginBodySchema = z.object({\n email: emailSchema,\n password: z.string().min(1).max(128),\n});\n\nexport type LoginBodyDto = z.infer<typeof loginBodySchema>;\n\nexport const loginResponseSchema = z.object({\n token: z.string(),\n user: userDtoSchema,\n admin_role: adminRoleSchema.nullable().optional(),\n});\n\nexport type LoginResponseDto = z.infer<typeof loginResponseSchema>;\n\nexport const refreshResponseSchema = loginResponseSchema;\n\nexport type RefreshResponseDto = z.infer<typeof refreshResponseSchema>;\n\nexport const meResponseSchema = z.object({\n user: userDtoSchema,\n admin_role: adminRoleSchema.nullable().optional(),\n});\n\nexport type MeResponseDto = z.infer<typeof meResponseSchema>;\n\nexport const logoutBodySchema = z.object({});\n\nexport type LogoutBodyDto = z.infer<typeof logoutBodySchema>;\n\nexport const changePasswordBodySchema = z.object({\n current_password: z.string().min(1).max(128),\n new_password: passwordSchema,\n});\n\nexport type ChangePasswordBodyDto = z.infer<typeof changePasswordBodySchema>;\n\nexport const passwordResetRequestBodySchema = z.object({\n email: emailSchema,\n});\n\nexport type PasswordResetRequestBodyDto = z.infer<typeof passwordResetRequestBodySchema>;\n\nexport const passwordResetConfirmBodySchema = z.object({\n token: z.string().min(1),\n new_password: passwordSchema,\n});\n\nexport type PasswordResetConfirmBodyDto = z.infer<typeof passwordResetConfirmBodySchema>;\n\nexport const passwordResetConfirmResponseSchema = loginResponseSchema;\n\nexport type PasswordResetConfirmResponseDto = z.infer<typeof passwordResetConfirmResponseSchema>;\n\nexport const verifyEmailConfirmBodySchema = z.object({\n email: emailSchema,\n challenge_id: z.string().uuid(),\n code: z.string().regex(/^\\d{8}$/u),\n});\n\nexport type VerifyEmailConfirmBodyDto = z.infer<typeof verifyEmailConfirmBodySchema>;\n\nexport const verifyEmailConfirmResponseSchema = loginResponseSchema;\n\nexport type VerifyEmailConfirmResponseDto = z.infer<typeof verifyEmailConfirmResponseSchema>;\n\nexport const verifyEmailResendBodySchema = z.object({\n email: emailSchema,\n challenge_id: z.string().uuid(),\n});\n\nexport type VerifyEmailResendBodyDto = z.infer<typeof verifyEmailResendBodySchema>;\n\nexport const verifyEmailResendResponseSchema = z.object({\n next_resend_available_at: z.string().datetime(),\n});\n\nexport type VerifyEmailResendResponseDto = z.infer<typeof verifyEmailResendResponseSchema>;\n"],"names":["displayNameSchema","emailSchema","z","adminRoleSchema","userDtoSchema","passwordSchema","string","min","max","loginMethodSchema","object","id","loginMethodsResponseSchema","login_methods","array","signupBodySchema","email","password","name","invitation_token","optional","signupAcceptErrorSchema","code","message","signupMembershipSchema","uuid","user_id","workspace_id","signupResponseSchema","user","email_challenge","next_resend_available_at","datetime","token","membership","nullable","accept_error","loginBodySchema","loginResponseSchema","admin_role","refreshResponseSchema","meResponseSchema","logoutBodySchema","changePasswordBodySchema","current_password","new_password","passwordResetRequestBodySchema","passwordResetConfirmBodySchema","passwordResetConfirmResponseSchema","verifyEmailConfirmBodySchema","challenge_id","regex","verifyEmailConfirmResponseSchema","verifyEmailResendBodySchema","verifyEmailResendResponseSchema"],"mappings":"AAAA,SAAQA,iBAAiB,EAAEC,WAAW,QAAO,0BAA0B;AACvE,SAAQC,CAAC,QAAO,MAAM;AACtB,SAAQC,eAAe,QAAO,aAAa;AAC3C,SAAQC,aAAa,QAAO,YAAY;AAExC,OAAO,MAAMC,iBAAiBH,EAAEI,MAAM,GAAGC,GAAG,CAAC,IAAIC,GAAG,CAAC,KAAK;AAC1D,SAAQP,WAAW,GAAE;AAErB,OAAO,MAAMQ,oBAAoBP,EAAEQ,MAAM,CAAC;IACxCC,IAAIT,EAAEI,MAAM,GAAGC,GAAG,CAAC,GAAGC,GAAG,CAAC;AAC5B,GAAG;AAIH,OAAO,MAAMI,6BAA6BV,EAAEQ,MAAM,CAAC;IACjDG,eAAeX,EAAEY,KAAK,CAACL;AACzB,GAAG;AAIH,OAAO,MAAMM,mBAAmBb,EAAEQ,MAAM,CAAC;IACvCM,OAAOf;IACPgB,UAAUZ;IACVa,MAAMlB;IACNmB,kBAAkBjB,EAAEI,MAAM,GAAGC,GAAG,CAAC,GAAGC,GAAG,CAAC,KAAKY,QAAQ;AACvD,GAAG;AAIH,OAAO,MAAMC,0BAA0BnB,EAAEQ,MAAM,CAAC;IAC9CY,MAAMpB,EAAEI,MAAM;IACdiB,SAASrB,EAAEI,MAAM;AACnB,GAAG;AAIH,OAAO,MAAMkB,yBAAyBtB,EAAEQ,MAAM,CAAC;IAC7CC,IAAIT,EAAEI,MAAM,GAAGmB,IAA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8C,iCAAiC7C,EAAEQ,MAAM,CAAC;IACrDuB,OAAO/B,EAAEI,MAAM,GAAGC,GAAG,CAAC;IACtBsC,cAAcxC;AAChB,GAAG;AAIH,OAAO,MAAM2C,qCAAqCV,oBAAoB;AAItE,OAAO,MAAMW,+BAA+B/C,EAAEQ,MAAM,CAAC;IACnDM,OAAOf;IACPiD,cAAchD,EAAEI,MAAM,GAAGmB,IAAI;IAC7BH,MAAMpB,EAAEI,MAAM,GAAG6C,KAAK,CAAC;AACzB,GAAG;AAIH,OAAO,MAAMC,mCAAmCd,oBAAoB;AAIpE,OAAO,MAAMe,8BAA8BnD,EAAEQ,MAAM,CAAC;IAClDM,OAAOf;IACPiD,cAAchD,EAAEI,MAAM,GAAGmB,IAAI;AAC/B,GAAG;AAIH,OAAO,MAAM6B,kCAAkCpD,EAAEQ,MAAM,CAAC;IACtDqB,0BAA0B7B,EAAEI,MAAM,GAAG0B,QAAQ;AAC/C,GAAG"}
@@ -44,6 +44,11 @@ export declare const e2eCreateSessionResponseSchema: z.ZodObject<{
44
44
  created_at: z.ZodString;
45
45
  updated_at: z.ZodString;
46
46
  }, z.core.$strip>;
47
+ admin_role: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
48
+ "admin-observer": "admin-observer";
49
+ "admin-operator": "admin-operator";
50
+ "admin-owner": "admin-owner";
51
+ }>>>;
47
52
  }, z.core.$strip>;
48
53
  export type E2eCreateSessionResponseDto = z.infer<typeof e2eCreateSessionResponseSchema>;
49
54
  export type E2eSessionDto = E2eCreateSessionResponseDto & {
@@ -1 +1 @@
1
- {"version":3,"file":"e2e.d.ts","sourceRoot":"","sources":["../../src/schemas/e2e.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAItB,eAAO,MAAM,uBAAuB;;;;;iBAKlC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE3E,eA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AAC;CACnB,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export { AUTH_PASSWORD_RESET_SEND_REQUESTED, AUTH_USER_SIGNED_UP, type AuthEventMap, type AuthPasswordResetSendRequestedEvent, type AuthUserSignedUpEvent, authEventSchemas, authPasswordResetSendRequestedSchema, authUserSignedUpSchema, } from '../events.js';
2
+ export { type AdminGrantDto, type AdminRole, adminGrantDtoSchema, adminRoleSchema, type BootstrapAdminOwnerBodyDto, type BootstrapAdminOwnerResponseDto, bootstrapAdminOwnerBodySchema, bootstrapAdminOwnerResponseSchema, type GrantAdminRoleBodyDto, type GrantAdminRoleResponseDto, grantAdminRoleBodySchema, grantAdminRoleResponseSchema, type ListAdminGrantsResponseDto, listAdminGrantsResponseSchema, type RevokeAdminGrantBodyDto, type RevokeAdminGrantResponseDto, revokeAdminGrantBodySchema, revokeAdminGrantResponseSchema, } from './admin.js';
2
3
  export { type ChangePasswordBodyDto, changePasswordBodySchema, emailSchema, type LoginBodyDto, type LoginMethodDto, type LoginMethodsResponseDto, type LoginResponseDto, type LogoutBodyDto, loginBodySchema, loginMethodSchema, loginMethodsResponseSchema, loginResponseSchema, logoutBodySchema, type MeResponseDto, meResponseSchema, type PasswordResetConfirmBodyDto, type PasswordResetConfirmResponseDto, type PasswordResetRequestBodyDto, passwordResetConfirmBodySchema, passwordResetConfirmResponseSchema, passwordResetRequestBodySchema, passwordSchema, type RefreshResponseDto, refreshResponseSchema, type SignupAcceptErrorDto, type SignupBodyDto, type SignupMembershipDto, type SignupResponseDto, signupAcceptErrorSchema, signupBodySchema, signupMembershipSchema, signupResponseSchema, type VerifyEmailConfirmBodyDto, type VerifyEmailConfirmResponseDto, type VerifyEmailResendBodyDto, type VerifyEmailResendResponseDto, verifyEmailConfirmBodySchema, verifyEmailConfirmResponseSchema, verifyEmailResendBodySchema, verifyEmailResendResponseSchema, } from './auth.js';
3
4
  export { type E2eCreateSessionBodyDto, type E2eCreateSessionResponseDto, type E2eCreateUserBodyDto, type E2eCreateUserResponseDto, type E2eSessionDto, e2eCreateSessionBodySchema, e2eCreateSessionResponseSchema, e2eCreateUserBodySchema, e2eCreateUserResponseSchema, } from './e2e.js';
4
5
  export { JOB_LEASE_TOKEN_AUDIENCE, type JobLeaseTokenClaims, jobLeaseTokenClaimsSchema, } from './job-lease-token.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kCAAkC,EAClC,mBAAmB,EACnB,KAAK,YAAY,EACjB,KAAK,mCAAmC,EACxC,KAAK,qBAAqB,EAC1B,gBAAgB,EAChB,oCAAoC,EACpC,sBAAsB,GACvB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,KAAK,qBAAqB,EAC1B,wBAAwB,EACxB,WAAW,EACX,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,eAAe,EACf,iBAAiB,EACjB,0BAA0B,EAC1B,mBAAmB,EACnB,gBAAgB,EAChB,KAAK,aAAa,EAClB,gBAAgB,EAChB,KAAK,2BAA2B,EAChC,KAAK,+BAA+B,EACpC,KAAK,2BAA2B,EAChC,8BAA8B,EAC9B,kCAAkC,EAClC,8BAA8B,EAC9B,cAAc,EACd,KAAK,kBAAkB,EACvB,qBAAqB,EACrB,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,uBAAuB,EACvB,gBAAgB,EAChB,sBAAsB,EACtB,oBAAoB,EACpB,KAAK,yBAAyB,EAC9B,KAAK,6BAA6B,EAClC,KAAK,wBAAwB,EAC7B,KAAK,4BAA4B,EACjC,4BAA4B,EAC5B,gCAAgC,EAChC,2BAA2B,EAC3B,+BAA+B,GAChC,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,2BAA2B,EAChC,KAAK,oBAAo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gB,EAChB,KAAK,2BAA2B,EAChC,KAAK,+BAA+B,EACpC,KAAK,2BAA2B,EAChC,8BAA8B,EAC9B,kCAAkC,EAClC,8BAA8B,EAC9B,cAAc,EACd,KAAK,kBAAkB,EACvB,qBAAqB,EACrB,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,uBAAuB,EACvB,gBAAgB,EAChB,sBAAsB,EACtB,oBAAoB,EACpB,KAAK,yBAAyB,EAC9B,KAAK,6BAA6B,EAClC,KAAK,wBAAwB,EAC7B,KAAK,4BAA4B,EACjC,4BAA4B,EAC5B,gCAAgC,EAChC,2BAA2B,EAC3B,+BAA+B,GAChC,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,2BAA2B,EAChC,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAClB,0BAA0B,EAC1B,8BAA8B,EAC9B,uBAAuB,EACvB,2BAA2B,GAC5B,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,wBAAwB,EACxB,KAAK,mBAAmB,EACxB,yBAAyB,GAC1B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,6BAA6B,EAC7B,KAAK,wBAAwB,EAC7B,8BAA8B,GAC/B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAC,KAAK,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAC,MAAM,WAAW,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export { AUTH_PASSWORD_RESET_SEND_REQUESTED, AUTH_USER_SIGNED_UP, authEventSchemas, authPasswordResetSendRequestedSchema, authUserSignedUpSchema } from '../events.js';
2
+ export { adminGrantDtoSchema, adminRoleSchema, bootstrapAdminOwnerBodySchema, bootstrapAdminOwnerResponseSchema, grantAdminRoleBodySchema, grantAdminRoleResponseSchema, listAdminGrantsResponseSchema, revokeAdminGrantBodySchema, revokeAdminGrantResponseSchema } from './admin.js';
2
3
  export { changePasswordBodySchema, emailSchema, loginBodySchema, loginMethodSchema, loginMethodsResponseSchema, loginResponseSchema, logoutBodySchema, meResponseSchema, passwordResetConfirmBodySchema, passwordResetConfirmResponseSchema, passwordResetRequestBodySchema, passwordSchema, refreshResponseSchema, signupAcceptErrorSchema, signupBodySchema, signupMembershipSchema, signupResponseSchema, verifyEmailConfirmBodySchema, verifyEmailConfirmResponseSchema, verifyEmailResendBodySchema, verifyEmailResendResponseSchema } from './auth.js';
3
4
  export { e2eCreateSessionBodySchema, e2eCreateSessionResponseSchema, e2eCreateUserBodySchema, e2eCreateUserResponseSchema } from './e2e.js';
4
5
  export { JOB_LEASE_TOKEN_AUDIENCE, jobLeaseTokenClaimsSchema } from './job-lease-token.js';
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/schemas/index.ts"],"sourcesContent":["export {\n AUTH_PASSWORD_RESET_SEND_REQUESTED,\n AUTH_USER_SIGNED_UP,\n type AuthEventMap,\n type AuthPasswordResetSendRequestedEvent,\n type AuthUserSignedUpEvent,\n authEventSchemas,\n authPasswordResetSendRequestedSchema,\n authUserSignedUpSchema,\n} from '../events.js';\nexport {\n type ChangePasswordBodyDto,\n changePasswordBodySchema,\n emailSchema,\n type LoginBodyDto,\n type LoginMethodDto,\n type LoginMethodsResponseDto,\n type LoginResponseDto,\n type LogoutBodyDto,\n loginBodySchema,\n loginMethodSchema,\n loginMethodsResponseSchema,\n loginResponseSchema,\n logoutBodySchema,\n type MeResponseDto,\n meResponseSchema,\n type PasswordResetConfirmBodyDto,\n type PasswordResetConfirmResponseDto,\n type PasswordResetRequestBodyDto,\n passwordResetConfirmBodySchema,\n passwordResetConfirmResponseSchema,\n passwordResetRequestBodySchema,\n passwordSchema,\n type RefreshResponseDto,\n refreshResponseSchema,\n type SignupAcceptErrorDto,\n type SignupBodyDto,\n type SignupMembershipDto,\n type SignupResponseDto,\n signupAcceptErrorSchema,\n signupBodySchema,\n signupMembershipSchema,\n signupResponseSchema,\n type VerifyEmailConfirmBodyDto,\n type VerifyEmailConfirmResponseDto,\n type VerifyEmailResendBodyDto,\n type VerifyEmailResendResponseDto,\n verifyEmailConfirmBodySchema,\n verifyEmailConfirmResponseSchema,\n verifyEmailResendBodySchema,\n verifyEmailResendResponseSchema,\n} from './auth.js';\nexport {\n type E2eCreateSessionBodyDto,\n type E2eCreateSessionResponseDto,\n type E2eCreateUserBodyDto,\n type E2eCreateUserResponseDto,\n type E2eSessionDto,\n e2eCreateSessionBodySchema,\n e2eCreateSessionResponseSchema,\n e2eCreateUserBodySchema,\n e2eCreateUserResponseSchema,\n} from './e2e.js';\nexport {\n JOB_LEASE_TOKEN_AUDIENCE,\n type JobLeaseTokenClaims,\n jobLeaseTokenClaimsSchema,\n} from './job-lease-token.js';\nexport {\n RUNNER_SESSION_TOKEN_AUDIENCE,\n type RunnerSessionTokenClaims,\n runnerSessionTokenClaimsSchema,\n} from './runner-session-token.js';\nexport {type UserDto, userDtoSchema, userStatusSchema} from './user.js';\n"],"names":["AUTH_PASSWORD_RESET_SEND_REQUESTED","AUTH_USER_SIGNED_UP","authEventSchemas","authPasswordResetSendRequestedSchema","authUserSignedUpSchema","changePasswordBodySchema","emailSchema","loginBodySchema","loginMethodSchema","loginMethodsResponseSchema","loginResponseSchema","logoutBodySchema","meResponseSchema","passwordResetConfirmBodySchema","passwordResetConfirmResponseSchema","passwordResetRequestBodySchema","passwordSchema","refreshResponseSchema","signupAcceptErrorSchema","signupBodySchema","signupMembershipSchema","signupResponseSchema","verifyEmailConfirmBodySchema","verifyEmailConfirmResponseSchema","verifyEmailResendBodySchema","verifyEmailResendResponseSchema","e2eCreateSessionBodySchema","e2eCreateSessionResponseSchema","e2eCreateUserBodySchema","e2eCreateUserResponseSchema","JOB_LEASE_TOKEN_AUDIENCE","jobLeaseTokenClaimsSchema","RUNNER_SESSION_TOKEN_AUDIENCE","runnerSessionTokenClaimsSchema","userDtoSchema","userStatusSchema"],"mappings":"AAAA,SACEA,kCAAkC,EAClCC,mBAAmB,EAInBC,gBAAgB,EAChBC,oCAAoC,EACpCC,sBAAsB,QACjB,eAAe;AACtB,SAEEC,wBAAwB,EACxBC,WAAW,EAMXC,eAAe,EACfC,iBAAiB,EACjBC,0BAA0B,EAC1BC,mBAAmB,EACnBC,gBAAgB,EAEhBC,gBAAgB,EAIhBC,8BAA8B,EAC9BC,kCAAkC,EAClCC,8BAA8B,EAC9BC,cAAc,EAEdC,qBAAqB,EAKrBC,uBAAuB,EACvBC,gBAAgB,EAChBC,sBAAsB,EACtBC,oBAAoB,EAKpBC,4BAA4B,EAC5BC,gCAAgC,EAChCC,2BAA2B,EAC3BC,+BAA+B,QAC1B,YAAY;AACnB,SAMEC,0BAA0B,EAC1BC,8BAA8B,EAC9BC,uBAAuB,EACvBC,2BAA2B,QACtB,WAAW;AAClB,SACEC,wBAAwB,EAExBC,yBAAyB,QACpB,uBAAuB;AAC9B,SACEC,6BAA6B,EAE7BC,8BAA8B,QACzB,4BAA4B;AACnC,SAAsBC,aAAa,EAAEC,gBAAgB,QAAO,YAAY"}
1
+ {"version":3,"sources":["../../src/schemas/index.ts"],"sourcesContent":["export {\n AUTH_PASSWORD_RESET_SEND_REQUESTED,\n AUTH_USER_SIGNED_UP,\n type AuthEventMap,\n type AuthPasswordResetSendRequestedEvent,\n type AuthUserSignedUpEvent,\n authEventSchemas,\n authPasswordResetSendRequestedSchema,\n authUserSignedUpSchema,\n} from '../events.js';\nexport {\n type AdminGrantDto,\n type AdminRole,\n adminGrantDtoSchema,\n adminRoleSchema,\n type BootstrapAdminOwnerBodyDto,\n type BootstrapAdminOwnerResponseDto,\n bootstrapAdminOwnerBodySchema,\n bootstrapAdminOwnerResponseSchema,\n type GrantAdminRoleBodyDto,\n type GrantAdminRoleResponseDto,\n grantAdminRoleBodySchema,\n grantAdminRoleResponseSchema,\n type ListAdminGrantsResponseDto,\n listAdminGrantsResponseSchema,\n type RevokeAdminGrantBodyDto,\n type RevokeAdminGrantResponseDto,\n revokeAdminGrantBodySchema,\n revokeAdminGrantResponseSchema,\n} from './admin.js';\nexport {\n type ChangePasswordBodyDto,\n changePasswordBodySchema,\n emailSchema,\n type LoginBodyDto,\n type LoginMethodDto,\n type LoginMethodsResponseDto,\n type LoginResponseDto,\n type LogoutBodyDto,\n loginBodySchema,\n loginMethodSchema,\n loginMethodsResponseSchema,\n loginResponseSchema,\n logoutBodySchema,\n type MeResponseDto,\n meResponseSchema,\n type PasswordResetConfirmBodyDto,\n type PasswordResetConfirmResponseDto,\n type PasswordResetRequestBodyDto,\n passwordResetConfirmBodySchema,\n passwordResetConfirmResponseSchema,\n passwordResetRequestBodySchema,\n passwordSchema,\n type RefreshResponseDto,\n refreshResponseSchema,\n type SignupAcceptErrorDto,\n type SignupBodyDto,\n type SignupMembershipDto,\n type SignupResponseDto,\n signupAcceptErrorSchema,\n signupBodySchema,\n signupMembershipSchema,\n signupResponseSchema,\n type VerifyEmailConfirmBodyDto,\n type VerifyEmailConfirmResponseDto,\n type VerifyEmailResendBodyDto,\n type VerifyEmailResendResponseDto,\n verifyEmailConfirmBodySchema,\n verifyEmailConfirmResponseSchema,\n verifyEmailResendBodySchema,\n verifyEmailResendResponseSchema,\n} from './auth.js';\nexport {\n type E2eCreateSessionBodyDto,\n type E2eCreateSessionResponseDto,\n type E2eCreateUserBodyDto,\n type E2eCreateUserResponseDto,\n type E2eSessionDto,\n e2eCreateSessionBodySchema,\n e2eCreateSessionResponseSchema,\n e2eCreateUserBodySchema,\n e2eCreateUserResponseSchema,\n} from './e2e.js';\nexport {\n JOB_LEASE_TOKEN_AUDIENCE,\n type JobLeaseTokenClaims,\n jobLeaseTokenClaimsSchema,\n} from './job-lease-token.js';\nexport {\n RUNNER_SESSION_TOKEN_AUDIENCE,\n type RunnerSessionTokenClaims,\n runnerSessionTokenClaimsSchema,\n} from './runner-session-token.js';\nexport {type UserDto, userDtoSchema, userStatusSchema} from './user.js';\n"],"names":["AUTH_PASSWORD_RESET_SEND_REQUESTED","AUTH_USER_SIGNED_UP","authEventSchemas","authPasswordResetSendRequestedSchema","authUserSignedUpSchema","adminGrantDtoSchema","adminRoleSchema","bootstrapAdminOwnerBodySchema","bootstrapAdminOwnerResponseSchema","grantAdminRoleBodySchema","grantAdminRoleResponseSchema","listAdminGrantsResponseSchema","revokeAdminGrantBodySchema","revokeAdminGrantResponseSchema","changePasswordBodySchema","emailSchema","loginBodySchema","loginMethodSchema","loginMethodsResponseSchema","loginResponseSchema","logoutBodySchema","meResponseSchema","passwordResetConfirmBodySchema","passwordResetConfirmResponseSchema","passwordResetRequestBodySchema","passwordSchema","refreshResponseSchema","signupAcceptErrorSchema","signupBodySchema","signupMembershipSchema","signupResponseSchema","verifyEmailConfirmBodySchema","verifyEmailConfirmResponseSchema","verifyEmailResendBodySchema","verifyEmailResendResponseSchema","e2eCreateSessionBodySchema","e2eCreateSessionResponseSchema","e2eCreateUserBodySchema","e2eCreateUserResponseSchema","JOB_LEASE_TOKEN_AUDIENCE","jobLeaseTokenClaimsSchema","RUNNER_SESSION_TOKEN_AUDIENCE","runnerSessionTokenClaimsSchema","userDtoSchema","userStatusSchema"],"mappings":"AAAA,SACEA,kCAAkC,EAClCC,mBAAmB,EAInBC,gBAAgB,EAChBC,oCAAoC,EACpCC,sBAAsB,QACjB,eAAe;AACtB,SAGEC,mBAAmB,EACnBC,eAAe,EAGfC,6BAA6B,EAC7BC,iCAAiC,EAGjCC,wBAAwB,EACxBC,4BAA4B,EAE5BC,6BAA6B,EAG7BC,0BAA0B,EAC1BC,8BAA8B,QACzB,aAAa;AACpB,SAEEC,wBAAwB,EACxBC,WAAW,EAMXC,eAAe,EACfC,iBAAiB,EACjBC,0BAA0B,EAC1BC,mBAAmB,EACnBC,gBAAgB,EAEhBC,gBAAgB,EAIhBC,8BAA8B,EAC9BC,kCAAkC,EAClCC,8BAA8B,EAC9BC,cAAc,EAEdC,qBAAqB,EAKrBC,uBAAuB,EACvBC,gBAAgB,EAChBC,sBAAsB,EACtBC,oBAAoB,EAKpBC,4BAA4B,EAC5BC,gCAAgC,EAChCC,2BAA2B,EAC3BC,+BAA+B,QAC1B,YAAY;AACnB,SAMEC,0BAA0B,EAC1BC,8BAA8B,EAC9BC,uBAAuB,EACvBC,2BAA2B,QACtB,WAAW;AAClB,SACEC,wBAAwB,EAExBC,yBAAyB,QACpB,uBAAuB;AAC9B,SACEC,6BAA6B,EAE7BC,8BAA8B,QACzB,4BAA4B;AACnC,SAAsBC,aAAa,EAAEC,gBAAgB,QAAO,YAAY"}