@shipfox/api-auth-dto 10.1.0 → 10.2.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.
- package/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +7 -0
- package/dist/schemas/admin.d.ts +52 -0
- package/dist/schemas/admin.d.ts.map +1 -1
- package/dist/schemas/admin.js +19 -0
- package/dist/schemas/admin.js.map +1 -1
- package/dist/schemas/index.d.ts +1 -1
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +1 -1
- package/dist/schemas/index.js.map +1 -1
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +3 -1
- package/src/schemas/admin.test.ts +12 -0
- package/src/schemas/admin.ts +49 -0
- package/src/schemas/index.ts +11 -0
- package/tsconfig.build.tsbuildinfo +1 -1
- package/vitest.config.ts +3 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
$ shipfox-swc
|
|
2
|
-
Successfully compiled: 10 files with swc (
|
|
2
|
+
Successfully compiled: 10 files with swc (174.46ms)
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @shipfox/api-auth-dto
|
|
2
2
|
|
|
3
|
+
## 10.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 95d1456: Add administrator user suspension, reactivation, and all-session revocation commands.
|
|
8
|
+
- 0773b85: Expose the Auth-owned `isAdminRole` predicate for downstream consumers.
|
|
9
|
+
|
|
3
10
|
## 10.1.0
|
|
4
11
|
|
|
5
12
|
### Minor Changes
|
package/dist/schemas/admin.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export declare const adminRoleSchema: z.ZodEnum<{
|
|
|
5
5
|
"admin-owner": "admin-owner";
|
|
6
6
|
}>;
|
|
7
7
|
export type AdminRole = z.infer<typeof adminRoleSchema>;
|
|
8
|
+
export declare function isAdminRole(value: unknown): value is AdminRole;
|
|
8
9
|
export declare const adminGrantDtoSchema: z.ZodObject<{
|
|
9
10
|
id: z.ZodString;
|
|
10
11
|
user_id: z.ZodString;
|
|
@@ -111,6 +112,57 @@ export declare const administratorUserSummarySchema: z.ZodObject<{
|
|
|
111
112
|
}>>;
|
|
112
113
|
}, z.core.$strip>;
|
|
113
114
|
export type AdministratorUserSummaryDto = z.infer<typeof administratorUserSummarySchema>;
|
|
115
|
+
export declare const suspendAdministratorUserBodySchema: z.ZodObject<{
|
|
116
|
+
reason: z.ZodString;
|
|
117
|
+
}, z.core.$strip>;
|
|
118
|
+
export type SuspendAdministratorUserBodyDto = z.infer<typeof suspendAdministratorUserBodySchema>;
|
|
119
|
+
export declare const reactivateAdministratorUserBodySchema: z.ZodDefault<z.ZodObject<{
|
|
120
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
121
|
+
}, z.core.$strip>>;
|
|
122
|
+
export type ReactivateAdministratorUserBodyDto = z.infer<typeof reactivateAdministratorUserBodySchema>;
|
|
123
|
+
export declare const revokeAdministratorUserSessionsBodySchema: z.ZodDefault<z.ZodObject<{
|
|
124
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
125
|
+
}, z.core.$strip>>;
|
|
126
|
+
export type RevokeAdministratorUserSessionsBodyDto = z.infer<typeof revokeAdministratorUserSessionsBodySchema>;
|
|
127
|
+
export declare const administratorUserMutationResponseSchema: z.ZodObject<{
|
|
128
|
+
id: z.ZodString;
|
|
129
|
+
email: z.ZodString;
|
|
130
|
+
name: z.ZodNullable<z.ZodString>;
|
|
131
|
+
status: z.ZodEnum<{
|
|
132
|
+
active: "active";
|
|
133
|
+
suspended: "suspended";
|
|
134
|
+
deleted: "deleted";
|
|
135
|
+
}>;
|
|
136
|
+
email_verified_at: z.ZodNullable<z.ZodString>;
|
|
137
|
+
created_at: z.ZodString;
|
|
138
|
+
admin_role: z.ZodNullable<z.ZodEnum<{
|
|
139
|
+
"admin-observer": "admin-observer";
|
|
140
|
+
"admin-operator": "admin-operator";
|
|
141
|
+
"admin-owner": "admin-owner";
|
|
142
|
+
}>>;
|
|
143
|
+
correlation_id: z.ZodString;
|
|
144
|
+
}, z.core.$strip>;
|
|
145
|
+
export type AdministratorUserMutationResponseDto = z.infer<typeof administratorUserMutationResponseSchema>;
|
|
146
|
+
export declare const revokeAdministratorUserSessionsResponseSchema: z.ZodObject<{
|
|
147
|
+
id: z.ZodString;
|
|
148
|
+
email: z.ZodString;
|
|
149
|
+
name: z.ZodNullable<z.ZodString>;
|
|
150
|
+
status: z.ZodEnum<{
|
|
151
|
+
active: "active";
|
|
152
|
+
suspended: "suspended";
|
|
153
|
+
deleted: "deleted";
|
|
154
|
+
}>;
|
|
155
|
+
email_verified_at: z.ZodNullable<z.ZodString>;
|
|
156
|
+
created_at: z.ZodString;
|
|
157
|
+
admin_role: z.ZodNullable<z.ZodEnum<{
|
|
158
|
+
"admin-observer": "admin-observer";
|
|
159
|
+
"admin-operator": "admin-operator";
|
|
160
|
+
"admin-owner": "admin-owner";
|
|
161
|
+
}>>;
|
|
162
|
+
correlation_id: z.ZodString;
|
|
163
|
+
sessions_revoked: z.ZodNumber;
|
|
164
|
+
}, z.core.$strip>;
|
|
165
|
+
export type RevokeAdministratorUserSessionsResponseDto = z.infer<typeof revokeAdministratorUserSessionsResponseSchema>;
|
|
114
166
|
export declare const administratorUserLookupQuerySchema: z.ZodObject<{
|
|
115
167
|
id: z.ZodOptional<z.ZodString>;
|
|
116
168
|
user_id: z.ZodOptional<z.ZodString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../src/schemas/admin.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAGtB,eAAO,MAAM,eAAe;;;;EAA8D,CAAC;AAE3F,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"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;;;;;;;;;;;;;;;;iBAM1C,CAAC;AAEH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAE3F,eAAO,MAAM,0BAA0B;;;iBAGrC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAEjF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;iBAGxC,CAAC;AAEH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC"}
|
package/dist/schemas/admin.js
CHANGED
|
@@ -6,6 +6,9 @@ export const adminRoleSchema = z.enum([
|
|
|
6
6
|
'admin-operator',
|
|
7
7
|
'admin-owner'
|
|
8
8
|
]);
|
|
9
|
+
export function isAdminRole(value) {
|
|
10
|
+
return adminRoleSchema.safeParse(value).success;
|
|
11
|
+
}
|
|
9
12
|
const timestampSchema = z.string().datetime();
|
|
10
13
|
const identifierEmailSchema = z.string().email();
|
|
11
14
|
const CONTROL_OR_FORMAT_CHARACTER_RE = /[\p{Cc}\p{Cf}]/u;
|
|
@@ -51,6 +54,22 @@ export const administratorUserSummarySchema = administratorUserIdentitySchema.ex
|
|
|
51
54
|
created_at: timestampSchema,
|
|
52
55
|
admin_role: adminRoleSchema.nullable()
|
|
53
56
|
});
|
|
57
|
+
const correlationIdSchema = z.string().min(1).max(255);
|
|
58
|
+
export const suspendAdministratorUserBodySchema = z.object({
|
|
59
|
+
reason: reasonSchema
|
|
60
|
+
});
|
|
61
|
+
export const reactivateAdministratorUserBodySchema = z.object({
|
|
62
|
+
reason: reasonSchema.optional()
|
|
63
|
+
}).default({});
|
|
64
|
+
export const revokeAdministratorUserSessionsBodySchema = z.object({
|
|
65
|
+
reason: reasonSchema.optional()
|
|
66
|
+
}).default({});
|
|
67
|
+
export const administratorUserMutationResponseSchema = administratorUserSummarySchema.extend({
|
|
68
|
+
correlation_id: correlationIdSchema
|
|
69
|
+
});
|
|
70
|
+
export const revokeAdministratorUserSessionsResponseSchema = administratorUserMutationResponseSchema.extend({
|
|
71
|
+
sessions_revoked: z.number().int().nonnegative()
|
|
72
|
+
});
|
|
54
73
|
export const administratorUserLookupQuerySchema = z.object({
|
|
55
74
|
id: z.string().uuid().optional(),
|
|
56
75
|
user_id: z.string().uuid().optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/schemas/admin.ts"],"sourcesContent":["import {emailSchema} from '@shipfox/api-common-dto';\nimport {z} from 'zod';\nimport {userStatusSchema} from './user.js';\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 identifierEmailSchema = z.string().email();\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 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 adminBootstrapStateSchema = z.object({\n state: z.enum(['available', 'closed']),\n});\n\nexport type AdminBootstrapStateDto = z.infer<typeof adminBootstrapStateSchema>;\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\nexport const administratorUserIdentitySchema = z.object({\n id: z.string().uuid(),\n email: identifierEmailSchema,\n name: z.string().nullable(),\n status: userStatusSchema,\n});\n\nexport type AdministratorUserIdentityDto = z.infer<typeof administratorUserIdentitySchema>;\n\nexport const administratorUserSummarySchema = administratorUserIdentitySchema.extend({\n email_verified_at: timestampSchema.nullable(),\n created_at: timestampSchema,\n admin_role: adminRoleSchema.nullable(),\n});\n\nexport type AdministratorUserSummaryDto = z.infer<typeof administratorUserSummarySchema>;\n\nexport const administratorUserLookupQuerySchema = z\n .object({\n id: z.string().uuid().optional(),\n user_id: z.string().uuid().optional(),\n email: emailSchema.optional(),\n })\n .superRefine((value, context) => {\n const identifiers = [value.id, value.user_id, value.email].filter(\n (identifier) => identifier !== undefined,\n );\n if (identifiers.length !== 1) {\n context.addIssue({\n code: 'custom',\n message: 'provide exactly one of id, user_id, or email',\n path: [],\n });\n }\n });\n\nexport type AdministratorUserLookupQueryDto = z.infer<typeof administratorUserLookupQuerySchema>;\n\nexport const administratorGrantSummarySchema = z.object({\n grant_id: z.string().uuid(),\n role: adminRoleSchema,\n created_at: timestampSchema,\n revoked_at: timestampSchema.nullable(),\n user: administratorUserIdentitySchema,\n});\n\nexport type AdministratorGrantSummaryDto = z.infer<typeof administratorGrantSummarySchema>;\n\nexport const listAdminGrantsQuerySchema = z.object({\n limit: z.coerce.number().int().min(1).max(100).default(50),\n cursor: z.string().optional(),\n});\n\nexport type ListAdminGrantsQueryDto = z.infer<typeof listAdminGrantsQuerySchema>;\n\nexport const listAdminGrantsResponseSchema = z.object({\n grants: z.array(administratorGrantSummarySchema),\n next_cursor: z.string().nullable(),\n});\n\nexport type ListAdminGrantsResponseDto = z.infer<typeof listAdminGrantsResponseSchema>;\n"],"names":["emailSchema","z","userStatusSchema","adminRoleSchema","enum","timestampSchema","string","datetime","identifierEmailSchema","email","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","bootstrapAdminOwnerBodySchema","bootstrap_token","bootstrapAdminOwnerResponseSchema","adminBootstrapStateSchema","state","grantAdminRoleBodySchema","reason","grantAdminRoleResponseSchema","revokeAdminGrantBodySchema","revokeAdminGrantResponseSchema","administratorUserIdentitySchema","name","status","administratorUserSummarySchema","extend","email_verified_at","admin_role","administratorUserLookupQuerySchema","optional","superRefine","context","identifiers","filter","identifier","undefined","length","addIssue","code","path","administratorGrantSummarySchema","grant_id","user","listAdminGrantsQuerySchema","limit","coerce","number","int","default","cursor","listAdminGrantsResponseSchema","grants","array","next_cursor"],"mappings":"AAAA,SAAQA,WAAW,QAAO,0BAA0B;AACpD,SAAQC,CAAC,QAAO,MAAM;AACtB,SAAQC,gBAAgB,QAAO,YAAY;AAE3C,OAAO,MAAMC,kBAAkBF,EAAEG,IAAI,CAAC;IAAC;IAAkB;IAAkB;CAAc,EAAE;AAI3F,MAAMC,kBAAkBJ,EAAEK,MAAM,GAAGC,QAAQ;AAC3C,MAAMC,wBAAwBP,EAAEK,MAAM,GAAGG,KAAK;AAC9C,MAAMC,iCAAiC;AACvC,MAAMC,eAAeV,EAClBK,MAAM,GACNM,GAAG,CAAC,GACJC,GAAG,CAAC,KACJC,MAAM,CAAC,CAACC,Q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AC/CkB,MAAM,CAAC;IACNC,IAAInB,EAAEK,MAAM,GAAGe,IAAI,GAAGyB,QAAQ;IAC9BxB,SAASrB,EAAEK,MAAM,GAAGe,IAAI,GAAGyB,QAAQ;IACnCrC,OAAOT,YAAY8C,QAAQ;AAC7B,GACCC,WAAW,CAAC,CAAChC,OAAOiC;IACnB,MAAMC,cAAc;QAAClC,MAAMK,EAAE;QAAEL,MAAMO,OAAO;QAAEP,MAAMN,KAAK;KAAC,CAACyC,MAAM,CAC/D,CAACC,aAAeA,eAAeC;IAEjC,IAAIH,YAAYI,MAAM,KAAK,GAAG;QAC5BL,QAAQM,QAAQ,CAAC;YACfC,MAAM;YACNtC,SAAS;YACTuC,MAAM,EAAE;QACV;IACF;AACF,GAAG;AAIL,OAAO,MAAMC,kCAAkCxD,EAAEkB,MAAM,CAAC;IACtDuC,UAAUzD,EAAEK,MAAM,GAAGe,IAAI;IACzBE,MAAMpB;IACNuB,YAAYrB;IACZmB,YAAYnB,gBAAgBoB,QAAQ;IACpCkC,MAAMrB;AACR,GAAG;AAIH,OAAO,MAAMsB,6BAA6B3D,EAAEkB,MAAM,CAAC;IACjD0C,OAAO5D,EAAE6D,MAAM,CAACC,MAAM,GAAGC,GAAG,GAAGpD,GAAG,CAAC,GAAGC,GAAG,CAAC,KAAKoD,OAAO,CAAC;IACvDC,QAAQjE,EAAEK,MAAM,GAAGwC,QAAQ;AAC7B,GAAG;AAIH,OAAO,MAAMqB,gCAAgClE,EAAEkB,MAAM,CAAC;IACpDiD,QAAQnE,EAAEoE,KAAK,CAACZ;IAChBa,aAAarE,EAAEK,MAAM,GAAGmB,QAAQ;AAClC,GAAG"}
|
|
1
|
+
{"version":3,"sources":["../../src/schemas/admin.ts"],"sourcesContent":["import {emailSchema} from '@shipfox/api-common-dto';\nimport {z} from 'zod';\nimport {userStatusSchema} from './user.js';\n\nexport const adminRoleSchema = z.enum(['admin-observer', 'admin-operator', 'admin-owner']);\n\nexport type AdminRole = z.infer<typeof adminRoleSchema>;\n\nexport function isAdminRole(value: unknown): value is AdminRole {\n return adminRoleSchema.safeParse(value).success;\n}\n\nconst timestampSchema = z.string().datetime();\nconst identifierEmailSchema = z.string().email();\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 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 adminBootstrapStateSchema = z.object({\n state: z.enum(['available', 'closed']),\n});\n\nexport type AdminBootstrapStateDto = z.infer<typeof adminBootstrapStateSchema>;\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\nexport const administratorUserIdentitySchema = z.object({\n id: z.string().uuid(),\n email: identifierEmailSchema,\n name: z.string().nullable(),\n status: userStatusSchema,\n});\n\nexport type AdministratorUserIdentityDto = z.infer<typeof administratorUserIdentitySchema>;\n\nexport const administratorUserSummarySchema = administratorUserIdentitySchema.extend({\n email_verified_at: timestampSchema.nullable(),\n created_at: timestampSchema,\n admin_role: adminRoleSchema.nullable(),\n});\n\nexport type AdministratorUserSummaryDto = z.infer<typeof administratorUserSummarySchema>;\n\nconst correlationIdSchema = z.string().min(1).max(255);\n\nexport const suspendAdministratorUserBodySchema = z.object({\n reason: reasonSchema,\n});\n\nexport type SuspendAdministratorUserBodyDto = z.infer<typeof suspendAdministratorUserBodySchema>;\n\nexport const reactivateAdministratorUserBodySchema = z\n .object({\n reason: reasonSchema.optional(),\n })\n .default({});\n\nexport type ReactivateAdministratorUserBodyDto = z.infer<\n typeof reactivateAdministratorUserBodySchema\n>;\n\nexport const revokeAdministratorUserSessionsBodySchema = z\n .object({\n reason: reasonSchema.optional(),\n })\n .default({});\n\nexport type RevokeAdministratorUserSessionsBodyDto = z.infer<\n typeof revokeAdministratorUserSessionsBodySchema\n>;\n\nexport const administratorUserMutationResponseSchema = administratorUserSummarySchema.extend({\n correlation_id: correlationIdSchema,\n});\n\nexport type AdministratorUserMutationResponseDto = z.infer<\n typeof administratorUserMutationResponseSchema\n>;\n\nexport const revokeAdministratorUserSessionsResponseSchema =\n administratorUserMutationResponseSchema.extend({\n sessions_revoked: z.number().int().nonnegative(),\n });\n\nexport type RevokeAdministratorUserSessionsResponseDto = z.infer<\n typeof revokeAdministratorUserSessionsResponseSchema\n>;\n\nexport const administratorUserLookupQuerySchema = z\n .object({\n id: z.string().uuid().optional(),\n user_id: z.string().uuid().optional(),\n email: emailSchema.optional(),\n })\n .superRefine((value, context) => {\n const identifiers = [value.id, value.user_id, value.email].filter(\n (identifier) => identifier !== undefined,\n );\n if (identifiers.length !== 1) {\n context.addIssue({\n code: 'custom',\n message: 'provide exactly one of id, user_id, or email',\n path: [],\n });\n }\n });\n\nexport type AdministratorUserLookupQueryDto = z.infer<typeof administratorUserLookupQuerySchema>;\n\nexport const administratorGrantSummarySchema = z.object({\n grant_id: z.string().uuid(),\n role: adminRoleSchema,\n created_at: timestampSchema,\n revoked_at: timestampSchema.nullable(),\n user: administratorUserIdentitySchema,\n});\n\nexport type AdministratorGrantSummaryDto = z.infer<typeof administratorGrantSummarySchema>;\n\nexport const listAdminGrantsQuerySchema = z.object({\n limit: z.coerce.number().int().min(1).max(100).default(50),\n cursor: z.string().optional(),\n});\n\nexport type ListAdminGrantsQueryDto = z.infer<typeof listAdminGrantsQuerySchema>;\n\nexport const listAdminGrantsResponseSchema = z.object({\n grants: z.array(administratorGrantSummarySchema),\n next_cursor: z.string().nullable(),\n});\n\nexport type ListAdminGrantsResponseDto = z.infer<typeof listAdminGrantsResponseSchema>;\n"],"names":["emailSchema","z","userStatusSchema","adminRoleSchema","enum","isAdminRole","value","safeParse","success","timestampSchema","string","datetime","identifierEmailSchema","email","CONTROL_OR_FORMAT_CHARACTER_RE","reasonSchema","min","max","refine","test","message","adminGrantDtoSchema","object","id","uuid","user_id","role","revoked_at","nullable","created_at","updated_at","bootstrapAdminOwnerBodySchema","bootstrap_token","bootstrapAdminOwnerResponseSchema","adminBootstrapStateSchema","state","grantAdminRoleBodySchema","reason","grantAdminRoleResponseSchema","revokeAdminGrantBodySchema","revokeAdminGrantResponseSchema","administratorUserIdentitySchema","name","status","administratorUserSummarySchema","extend","email_verified_at","admin_role","correlationIdSchema","suspendAdministratorUserBodySchema","reactivateAdministratorUserBodySchema","optional","default","revokeAdministratorUserSessionsBodySchema","administratorUserMutationResponseSchema","correlation_id","revokeAdministratorUserSessionsResponseSchema","sessions_revoked","number","int","nonnegative","administratorUserLookupQuerySchema","superRefine","context","identifiers","filter","identifier","undefined","length","addIssue","code","path","administratorGrantSummarySchema","grant_id","user","listAdminGrantsQuerySchema","limit","coer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G2B,QAAQ;IACnCtC,OAAOb,YAAYmD,QAAQ;AAC7B,GACCW,WAAW,CAAC,CAACxD,OAAOyD;IACnB,MAAMC,cAAc;QAAC1D,MAAMiB,EAAE;QAAEjB,MAAMmB,OAAO;QAAEnB,MAAMO,KAAK;KAAC,CAACoD,MAAM,CAC/D,CAACC,aAAeA,eAAeC;IAEjC,IAAIH,YAAYI,MAAM,KAAK,GAAG;QAC5BL,QAAQM,QAAQ,CAAC;YACfC,MAAM;YACNlD,SAAS;YACTmD,MAAM,EAAE;QACV;IACF;AACF,GAAG;AAIL,OAAO,MAAMC,kCAAkCvE,EAAEqB,MAAM,CAAC;IACtDmD,UAAUxE,EAAES,MAAM,GAAGc,IAAI;IACzBE,MAAMvB;IACN0B,YAAYpB;IACZkB,YAAYlB,gBAAgBmB,QAAQ;IACpC8C,MAAMjC;AACR,GAAG;AAIH,OAAO,MAAMkC,6BAA6B1E,EAAEqB,MAAM,CAAC;IACjDsD,OAAO3E,EAAE4E,MAAM,CAACnB,MAAM,GAAGC,GAAG,GAAG3C,GAAG,CAAC,GAAGC,GAAG,CAAC,KAAKmC,OAAO,CAAC;IACvD0B,QAAQ7E,EAAES,MAAM,GAAGyC,QAAQ;AAC7B,GAAG;AAIH,OAAO,MAAM4B,gCAAgC9E,EAAEqB,MAAM,CAAC;IACpD0D,QAAQ/E,EAAEgF,KAAK,CAACT;IAChBU,aAAajF,EAAES,MAAM,GAAGkB,QAAQ;AAClC,GAAG"}
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -1,5 +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 AdminBootstrapStateDto, type AdminGrantDto, type AdministratorGrantSummaryDto, type AdministratorUserIdentityDto, type AdministratorUserLookupQueryDto, type AdministratorUserSummaryDto, type AdminRole, adminBootstrapStateSchema, adminGrantDtoSchema, administratorGrantSummarySchema, administratorUserIdentitySchema, administratorUserLookupQuerySchema, administratorUserSummarySchema, adminRoleSchema, type BootstrapAdminOwnerBodyDto, type BootstrapAdminOwnerResponseDto, bootstrapAdminOwnerBodySchema, bootstrapAdminOwnerResponseSchema, type GrantAdminRoleBodyDto, type GrantAdminRoleResponseDto, grantAdminRoleBodySchema, grantAdminRoleResponseSchema, type ListAdminGrantsQueryDto, type ListAdminGrantsResponseDto, listAdminGrantsQuerySchema, listAdminGrantsResponseSchema, type RevokeAdminGrantBodyDto, type RevokeAdminGrantResponseDto, revokeAdminGrantBodySchema, revokeAdminGrantResponseSchema, } from './admin.js';
|
|
2
|
+
export { type AdminBootstrapStateDto, type AdminGrantDto, type AdministratorGrantSummaryDto, type AdministratorUserIdentityDto, type AdministratorUserLookupQueryDto, type AdministratorUserMutationResponseDto, type AdministratorUserSummaryDto, type AdminRole, adminBootstrapStateSchema, adminGrantDtoSchema, administratorGrantSummarySchema, administratorUserIdentitySchema, administratorUserLookupQuerySchema, administratorUserMutationResponseSchema, administratorUserSummarySchema, adminRoleSchema, type BootstrapAdminOwnerBodyDto, type BootstrapAdminOwnerResponseDto, bootstrapAdminOwnerBodySchema, bootstrapAdminOwnerResponseSchema, type GrantAdminRoleBodyDto, type GrantAdminRoleResponseDto, grantAdminRoleBodySchema, grantAdminRoleResponseSchema, isAdminRole, type ListAdminGrantsQueryDto, type ListAdminGrantsResponseDto, listAdminGrantsQuerySchema, listAdminGrantsResponseSchema, type ReactivateAdministratorUserBodyDto, type RevokeAdminGrantBodyDto, type RevokeAdminGrantResponseDto, type RevokeAdministratorUserSessionsBodyDto, type RevokeAdministratorUserSessionsResponseDto, reactivateAdministratorUserBodySchema, revokeAdminGrantBodySchema, revokeAdminGrantResponseSchema, revokeAdministratorUserSessionsBodySchema, revokeAdministratorUserSessionsResponseSchema, type SuspendAdministratorUserBodyDto, suspendAdministratorUserBodySchema, } from './admin.js';
|
|
3
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';
|
|
4
4
|
export { type E2eCreateSessionBodyDto, type E2eCreateSessionResponseDto, type E2eCreateUserBodyDto, type E2eCreateUserResponseDto, type E2eSessionDto, e2eCreateSessionBodySchema, e2eCreateSessionResponseSchema, e2eCreateUserBodySchema, e2eCreateUserResponseSchema, } from './e2e.js';
|
|
5
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,sBAAsB,EAC3B,KAA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ACxB,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"}
|
package/dist/schemas/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { AUTH_PASSWORD_RESET_SEND_REQUESTED, AUTH_USER_SIGNED_UP, authEventSchemas, authPasswordResetSendRequestedSchema, authUserSignedUpSchema } from '../events.js';
|
|
2
|
-
export { adminBootstrapStateSchema, adminGrantDtoSchema, administratorGrantSummarySchema, administratorUserIdentitySchema, administratorUserLookupQuerySchema, administratorUserSummarySchema, adminRoleSchema, bootstrapAdminOwnerBodySchema, bootstrapAdminOwnerResponseSchema, grantAdminRoleBodySchema, grantAdminRoleResponseSchema, listAdminGrantsQuerySchema, listAdminGrantsResponseSchema, revokeAdminGrantBodySchema, revokeAdminGrantResponseSchema } from './admin.js';
|
|
2
|
+
export { adminBootstrapStateSchema, adminGrantDtoSchema, administratorGrantSummarySchema, administratorUserIdentitySchema, administratorUserLookupQuerySchema, administratorUserMutationResponseSchema, administratorUserSummarySchema, adminRoleSchema, bootstrapAdminOwnerBodySchema, bootstrapAdminOwnerResponseSchema, grantAdminRoleBodySchema, grantAdminRoleResponseSchema, isAdminRole, listAdminGrantsQuerySchema, listAdminGrantsResponseSchema, reactivateAdministratorUserBodySchema, revokeAdminGrantBodySchema, revokeAdminGrantResponseSchema, revokeAdministratorUserSessionsBodySchema, revokeAdministratorUserSessionsResponseSchema, suspendAdministratorUserBodySchema } from './admin.js';
|
|
3
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';
|
|
4
4
|
export { e2eCreateSessionBodySchema, e2eCreateSessionResponseSchema, e2eCreateUserBodySchema, e2eCreateUserResponseSchema } from './e2e.js';
|
|
5
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 AdminBootstrapStateDto,\n type AdminGrantDto,\n type AdministratorGrantSummaryDto,\n type AdministratorUserIdentityDto,\n type AdministratorUserLookupQueryDto,\n type AdministratorUserSummaryDto,\n type AdminRole,\n adminBootstrapStateSchema,\n adminGrantDtoSchema,\n administratorGrantSummarySchema,\n administratorUserIdentitySchema,\n administratorUserLookupQuerySchema,\n administratorUserSummarySchema,\n adminRoleSchema,\n type BootstrapAdminOwnerBodyDto,\n type BootstrapAdminOwnerResponseDto,\n bootstrapAdminOwnerBodySchema,\n bootstrapAdminOwnerResponseSchema,\n type GrantAdminRoleBodyDto,\n type GrantAdminRoleResponseDto,\n grantAdminRoleBodySchema,\n grantAdminRoleResponseSchema,\n type ListAdminGrantsQueryDto,\n type ListAdminGrantsResponseDto,\n listAdminGrantsQuerySchema,\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","adminBootstrapStateSchema","adminGrantDtoSchema","administratorGrantSummarySchema","administratorUserIdentitySchema","administratorUserLookupQuerySchema","administratorUserSummarySchema","adminRoleSchema","bootstrapAdminOwnerBodySchema","bootstrapAdminOwnerResponseSchema","grantAdminRoleBodySchema","grantAdminRoleResponseSchema","listAdminGrantsQuerySchema","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,
|
|
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 AdminBootstrapStateDto,\n type AdminGrantDto,\n type AdministratorGrantSummaryDto,\n type AdministratorUserIdentityDto,\n type AdministratorUserLookupQueryDto,\n type AdministratorUserMutationResponseDto,\n type AdministratorUserSummaryDto,\n type AdminRole,\n adminBootstrapStateSchema,\n adminGrantDtoSchema,\n administratorGrantSummarySchema,\n administratorUserIdentitySchema,\n administratorUserLookupQuerySchema,\n administratorUserMutationResponseSchema,\n administratorUserSummarySchema,\n adminRoleSchema,\n type BootstrapAdminOwnerBodyDto,\n type BootstrapAdminOwnerResponseDto,\n bootstrapAdminOwnerBodySchema,\n bootstrapAdminOwnerResponseSchema,\n type GrantAdminRoleBodyDto,\n type GrantAdminRoleResponseDto,\n grantAdminRoleBodySchema,\n grantAdminRoleResponseSchema,\n isAdminRole,\n type ListAdminGrantsQueryDto,\n type ListAdminGrantsResponseDto,\n listAdminGrantsQuerySchema,\n listAdminGrantsResponseSchema,\n type ReactivateAdministratorUserBodyDto,\n type RevokeAdminGrantBodyDto,\n type RevokeAdminGrantResponseDto,\n type RevokeAdministratorUserSessionsBodyDto,\n type RevokeAdministratorUserSessionsResponseDto,\n reactivateAdministratorUserBodySchema,\n revokeAdminGrantBodySchema,\n revokeAdminGrantResponseSchema,\n revokeAdministratorUserSessionsBodySchema,\n revokeAdministratorUserSessionsResponseSchema,\n type SuspendAdministratorUserBodyDto,\n suspendAdministratorUserBodySchema,\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","adminBootstrapStateSchema","adminGrantDtoSchema","administratorGrantSummarySchema","administratorUserIdentitySchema","administratorUserLookupQuerySchema","administratorUserMutationResponseSchema","administratorUserSummarySchema","adminRoleSchema","bootstrapAdminOwnerBodySchema","bootstrapAdminOwnerResponseSchema","grantAdminRoleBodySchema","grantAdminRoleResponseSchema","isAdminRole","listAdminGrantsQuerySchema","listAdminGrantsResponseSchema","reactivateAdministratorUserBodySchema","revokeAdminGrantBodySchema","revokeAdminGrantResponseSchema","revokeAdministratorUserSessionsBodySchema","revokeAdministratorUserSessionsResponseSchema","suspendAdministratorUserBodySchema","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,SASEC,yBAAyB,EACzBC,mBAAmB,EACnBC,+BAA+B,EAC/BC,+BAA+B,EAC/BC,kCAAkC,EAClCC,uCAAuC,EACvCC,8BAA8B,EAC9BC,eAAe,EAGfC,6BAA6B,EAC7BC,iCAAiC,EAGjCC,wBAAwB,EACxBC,4BAA4B,EAC5BC,WAAW,EAGXC,0BAA0B,EAC1BC,6BAA6B,EAM7BC,qCAAqC,EACrCC,0BAA0B,EAC1BC,8BAA8B,EAC9BC,yCAAyC,EACzCC,6CAA6C,EAE7CC,kCAAkC,QAC7B,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"}
|