@schemavaults/auth-common 0.25.0 → 0.25.1

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.
Files changed (55) hide show
  1. package/dist/audience-schema.d.ts +2 -2
  2. package/dist/audience-schema.js +0 -1
  3. package/dist/audience-schema.js.map +1 -1
  4. package/dist/auth_acquire_tokens_grant_types.d.ts +12 -42
  5. package/dist/auth_acquire_tokens_grant_types.js +1 -1
  6. package/dist/auth_acquire_tokens_grant_types.js.map +1 -1
  7. package/dist/authenticate_result.d.ts +29 -144
  8. package/dist/authenticate_result.js +2 -2
  9. package/dist/authenticate_result.js.map +1 -1
  10. package/dist/authorize-client-application-form-type.d.ts +2 -6
  11. package/dist/credentials/email_credentials.d.ts +3 -9
  12. package/dist/credentials/normalize-email.d.ts +1 -1
  13. package/dist/credentials/normalize-email.js +5 -1
  14. package/dist/credentials/normalize-email.js.map +1 -1
  15. package/dist/credentials/password_requirements.d.ts +1 -1
  16. package/dist/credentials/register_credentials.d.ts +6 -26
  17. package/dist/invite-code/invite-code-definition.d.ts +5 -17
  18. package/dist/invite-code/invite-code-definition.js +1 -1
  19. package/dist/invite-code/invite-code-definition.js.map +1 -1
  20. package/dist/mfa/mfa-challenge.d.ts +2 -8
  21. package/dist/mfa/mfa-challenge.js +1 -1
  22. package/dist/mfa/mfa-challenge.js.map +1 -1
  23. package/dist/mfa/mfa-factor-type.d.ts +4 -1
  24. package/dist/mfa/mfa-verify-body.d.ts +57 -315
  25. package/dist/mfa/mfa-verify-body.js +9 -9
  26. package/dist/mfa/mfa-verify-body.js.map +1 -1
  27. package/dist/mfa/webauthn.d.ts +21 -145
  28. package/dist/mfa/webauthn.js +3 -3
  29. package/dist/mfa/webauthn.js.map +1 -1
  30. package/dist/middleware/auth-middleware-error.d.ts +1 -1
  31. package/dist/middleware/middleware-rules.d.ts +11 -15
  32. package/dist/organizations/invite_member_form.d.ts +8 -21
  33. package/dist/organizations/invite_member_form.js +5 -5
  34. package/dist/organizations/invite_member_form.js.map +1 -1
  35. package/dist/organizations/organization-membership-role-type.d.ts +1 -1
  36. package/dist/organizations/organization_definition.d.ts +5 -15
  37. package/dist/organizations/organization_definition.js +1 -1
  38. package/dist/organizations/organization_definition.js.map +1 -1
  39. package/dist/organizations/organization_invitation.d.ts +21 -33
  40. package/dist/organizations/organization_invitation.js +5 -5
  41. package/dist/organizations/organization_invitation.js.map +1 -1
  42. package/dist/organizations/organization_membership_role_details.d.ts +6 -18
  43. package/dist/pagination.d.ts +1 -7
  44. package/dist/pkce/code_challenge.d.ts +5 -13
  45. package/dist/pkce/code_verifier.d.ts +6 -16
  46. package/dist/pkce/pkce.d.ts +11 -29
  47. package/dist/request_tokens_result.d.ts +54 -524
  48. package/dist/token-data/token-data.d.ts +23 -73
  49. package/dist/token-data/token-data.js +1 -1
  50. package/dist/token-data/token-data.js.map +1 -1
  51. package/dist/user_data/user_data.d.ts +7 -71
  52. package/dist/user_data/user_data.js +3 -3
  53. package/dist/user_data/user_data.js.map +1 -1
  54. package/dist/user_data/user_profile.d.ts +4 -58
  55. package/package.json +3 -3
@@ -2,181 +2,57 @@ import { z } from "zod";
2
2
  export declare const webauthnRegistrationResponseSchema: z.ZodObject<{
3
3
  id: z.ZodString;
4
4
  rawId: z.ZodString;
5
- response: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
5
+ response: z.ZodObject<{}, z.core.$loose>;
6
6
  authenticatorAttachment: z.ZodOptional<z.ZodString>;
7
- clientExtensionResults: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
7
+ clientExtensionResults: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
8
8
  type: z.ZodString;
9
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
10
- id: z.ZodString;
11
- rawId: z.ZodString;
12
- response: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
13
- authenticatorAttachment: z.ZodOptional<z.ZodString>;
14
- clientExtensionResults: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
15
- type: z.ZodString;
16
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
17
- id: z.ZodString;
18
- rawId: z.ZodString;
19
- response: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
20
- authenticatorAttachment: z.ZodOptional<z.ZodString>;
21
- clientExtensionResults: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
22
- type: z.ZodString;
23
- }, z.ZodTypeAny, "passthrough">>;
9
+ }, z.core.$loose>;
24
10
  export type WebauthnRegistrationResponse = z.infer<typeof webauthnRegistrationResponseSchema>;
25
11
  export declare const webauthnAuthenticationResponseSchema: z.ZodObject<{
26
12
  id: z.ZodString;
27
13
  rawId: z.ZodString;
28
- response: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
29
- authenticatorAttachment: z.ZodOptional<z.ZodString>;
30
- clientExtensionResults: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
31
- type: z.ZodString;
32
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
33
- id: z.ZodString;
34
- rawId: z.ZodString;
35
- response: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
14
+ response: z.ZodObject<{}, z.core.$loose>;
36
15
  authenticatorAttachment: z.ZodOptional<z.ZodString>;
37
- clientExtensionResults: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
16
+ clientExtensionResults: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
38
17
  type: z.ZodString;
39
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
40
- id: z.ZodString;
41
- rawId: z.ZodString;
42
- response: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
43
- authenticatorAttachment: z.ZodOptional<z.ZodString>;
44
- clientExtensionResults: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
45
- type: z.ZodString;
46
- }, z.ZodTypeAny, "passthrough">>;
18
+ }, z.core.$loose>;
47
19
  export type WebauthnAuthenticationResponse = z.infer<typeof webauthnAuthenticationResponseSchema>;
48
20
  export declare const webauthnLabelSchema: z.ZodString;
49
21
  export declare const webauthnEnrollOptionsResponseSchema: z.ZodObject<{
50
- factor_id: z.ZodString;
51
- options: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
52
- }, "strict", z.ZodTypeAny, {
53
- options: {} & {
54
- [k: string]: unknown;
55
- };
56
- factor_id: string;
57
- }, {
58
- options: {} & {
59
- [k: string]: unknown;
60
- };
61
- factor_id: string;
62
- }>;
22
+ factor_id: z.ZodGUID;
23
+ options: z.ZodObject<{}, z.core.$loose>;
24
+ }, z.core.$strict>;
63
25
  export type WebauthnEnrollOptionsResponse = z.infer<typeof webauthnEnrollOptionsResponseSchema>;
64
26
  export declare const webauthnVerifyEnrollmentBodySchema: z.ZodObject<{
65
- factor_id: z.ZodString;
27
+ factor_id: z.ZodGUID;
66
28
  label: z.ZodOptional<z.ZodString>;
67
29
  attestation: z.ZodObject<{
68
30
  id: z.ZodString;
69
31
  rawId: z.ZodString;
70
- response: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
71
- authenticatorAttachment: z.ZodOptional<z.ZodString>;
72
- clientExtensionResults: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
73
- type: z.ZodString;
74
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
75
- id: z.ZodString;
76
- rawId: z.ZodString;
77
- response: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
78
- authenticatorAttachment: z.ZodOptional<z.ZodString>;
79
- clientExtensionResults: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
80
- type: z.ZodString;
81
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
82
- id: z.ZodString;
83
- rawId: z.ZodString;
84
- response: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
32
+ response: z.ZodObject<{}, z.core.$loose>;
85
33
  authenticatorAttachment: z.ZodOptional<z.ZodString>;
86
- clientExtensionResults: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
34
+ clientExtensionResults: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
87
35
  type: z.ZodString;
88
- }, z.ZodTypeAny, "passthrough">>;
89
- }, "strict", z.ZodTypeAny, {
90
- factor_id: string;
91
- attestation: {
92
- type: string;
93
- id: string;
94
- rawId: string;
95
- response: {} & {
96
- [k: string]: unknown;
97
- };
98
- authenticatorAttachment?: string | undefined;
99
- clientExtensionResults?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
100
- } & {
101
- [k: string]: unknown;
102
- };
103
- label?: string | undefined;
104
- }, {
105
- factor_id: string;
106
- attestation: {
107
- type: string;
108
- id: string;
109
- rawId: string;
110
- response: {} & {
111
- [k: string]: unknown;
112
- };
113
- authenticatorAttachment?: string | undefined;
114
- clientExtensionResults?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
115
- } & {
116
- [k: string]: unknown;
117
- };
118
- label?: string | undefined;
119
- }>;
36
+ }, z.core.$loose>;
37
+ }, z.core.$strict>;
120
38
  export type WebauthnVerifyEnrollmentBody = z.infer<typeof webauthnVerifyEnrollmentBodySchema>;
121
39
  export declare const webauthnAuthenticationOptionsResponseSchema: z.ZodObject<{
122
- options: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
123
- }, "strict", z.ZodTypeAny, {
124
- options: {} & {
125
- [k: string]: unknown;
126
- };
127
- }, {
128
- options: {} & {
129
- [k: string]: unknown;
130
- };
131
- }>;
40
+ options: z.ZodObject<{}, z.core.$loose>;
41
+ }, z.core.$strict>;
132
42
  export type WebauthnAuthenticationOptionsResponse = z.infer<typeof webauthnAuthenticationOptionsResponseSchema>;
133
43
  export declare const webauthnCredentialSummarySchema: z.ZodObject<{
134
- factor_id: z.ZodString;
44
+ factor_id: z.ZodGUID;
135
45
  label: z.ZodNullable<z.ZodString>;
136
46
  created_at: z.ZodNumber;
137
47
  last_used_at: z.ZodNullable<z.ZodNumber>;
138
- }, "strict", z.ZodTypeAny, {
139
- factor_id: string;
140
- last_used_at: number | null;
141
- created_at: number;
142
- label: string | null;
143
- }, {
144
- factor_id: string;
145
- last_used_at: number | null;
146
- created_at: number;
147
- label: string | null;
148
- }>;
48
+ }, z.core.$strict>;
149
49
  export type WebauthnCredentialSummary = z.infer<typeof webauthnCredentialSummarySchema>;
150
50
  export declare const webauthnCredentialListResponseSchema: z.ZodObject<{
151
51
  credentials: z.ZodArray<z.ZodObject<{
152
- factor_id: z.ZodString;
52
+ factor_id: z.ZodGUID;
153
53
  label: z.ZodNullable<z.ZodString>;
154
54
  created_at: z.ZodNumber;
155
55
  last_used_at: z.ZodNullable<z.ZodNumber>;
156
- }, "strict", z.ZodTypeAny, {
157
- factor_id: string;
158
- last_used_at: number | null;
159
- created_at: number;
160
- label: string | null;
161
- }, {
162
- factor_id: string;
163
- last_used_at: number | null;
164
- created_at: number;
165
- label: string | null;
166
- }>, "many">;
167
- }, "strict", z.ZodTypeAny, {
168
- credentials: {
169
- factor_id: string;
170
- last_used_at: number | null;
171
- created_at: number;
172
- label: string | null;
173
- }[];
174
- }, {
175
- credentials: {
176
- factor_id: string;
177
- last_used_at: number | null;
178
- created_at: number;
179
- label: string | null;
180
- }[];
181
- }>;
56
+ }, z.core.$strict>>;
57
+ }, z.core.$strict>;
182
58
  export type WebauthnCredentialListResponse = z.infer<typeof webauthnCredentialListResponseSchema>;
@@ -41,7 +41,7 @@ export const webauthnLabelSchema = z
41
41
  // enrollment will be confirmed against.
42
42
  export const webauthnEnrollOptionsResponseSchema = z
43
43
  .object({
44
- factor_id: z.string().uuid(),
44
+ factor_id: z.guid(),
45
45
  // PublicKeyCredentialCreationOptionsJSON — opaque to us, handed to the
46
46
  // browser verbatim.
47
47
  options: z.object({}).passthrough(),
@@ -50,7 +50,7 @@ export const webauthnEnrollOptionsResponseSchema = z
50
50
  // Body for POST /api/user/mfa/webauthn/verify-enrollment.
51
51
  export const webauthnVerifyEnrollmentBodySchema = z
52
52
  .object({
53
- factor_id: z.string().uuid(),
53
+ factor_id: z.guid(),
54
54
  label: webauthnLabelSchema.optional(),
55
55
  attestation: webauthnRegistrationResponseSchema,
56
56
  })
@@ -66,7 +66,7 @@ export const webauthnAuthenticationOptionsResponseSchema = z
66
66
  // A single enrolled passkey as surfaced to the account settings UI.
67
67
  export const webauthnCredentialSummarySchema = z
68
68
  .object({
69
- factor_id: z.string().uuid(),
69
+ factor_id: z.guid(),
70
70
  label: z.string().nullable(),
71
71
  created_at: z.number().int().positive(),
72
72
  last_used_at: z.number().int().positive().nullable(),
@@ -1 +1 @@
1
- {"version":3,"file":"webauthn.js","sourceRoot":"","sources":["../../src/mfa/webauthn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,wEAAwE;AACxE,wEAAwE;AACxE,2EAA2E;AAC3E,0EAA0E;AAC1E,yEAAyE;AACzE,4EAA4E;AAC5E,6EAA6E;AAC7E,iDAAiD;AAEjD,8DAA8D;AAC9D,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC;KAChD,MAAM,CAAC;IACN,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACrB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACxB,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE;IACpC,uBAAuB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9C,sBAAsB,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAA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,MAAM,oCAAoC,GAAG,CAAC;KAClD,MAAM,CAAC;IACN,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,+BAA+B,CAAC;CACtD,CAAC;KACD,MAAM,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
1
  import { z } from "zod";
2
2
  export declare const AuthMiddlewareErrorTypes: readonly ["Unauthorized", "Forbidden"];
3
3
  export type AuthMiddlewareError = (typeof AuthMiddlewareErrorTypes)[number];
4
- export declare const authMiddlewareErrorTypesSchema: z.ZodEffects<z.ZodString, "Unauthorized" | "Forbidden", string>;
4
+ export declare const authMiddlewareErrorTypesSchema: z.ZodString & z.ZodType<"Unauthorized" | "Forbidden", string, z.core.$ZodTypeInternals<"Unauthorized" | "Forbidden", string>>;
@@ -1,25 +1,21 @@
1
1
  import type { SchemaVaultsAppEnvironment } from "@schemavaults/app-definitions";
2
2
  import type { NavigationPath } from "./parse-navigation-path";
3
3
  import { z } from "zod";
4
- export declare const pageSecurityLevelSchema: z.ZodEnum<["public", "unauthed", "authed", "admin", "api"]>;
4
+ export declare const pageSecurityLevelSchema: z.ZodEnum<{
5
+ admin: "admin";
6
+ public: "public";
7
+ unauthed: "unauthed";
8
+ authed: "authed";
9
+ api: "api";
10
+ }>;
5
11
  type PageSecurityLevel = z.infer<typeof pageSecurityLevelSchema>;
6
12
  export type AuthMiddlewareRules = Record<PageSecurityLevel, NavigationPath[]>;
7
13
  export declare const authenticationStatusSchema: z.ZodUnion<readonly [z.ZodObject<{
8
- status: z.ZodLiteral<"logged-in">;
14
+ status: z.ZodNonOptional<z.ZodLiteral<"logged-in">>;
9
15
  admin: z.ZodOptional<z.ZodBoolean>;
10
- }, "strict", z.ZodTypeAny, {
11
- status: "logged-in";
12
- admin?: boolean | undefined;
13
- }, {
14
- status: "logged-in";
15
- admin?: boolean | undefined;
16
- }>, z.ZodObject<{
17
- status: z.ZodLiteral<"logged-out">;
18
- }, "strict", z.ZodTypeAny, {
19
- status: "logged-out";
20
- }, {
21
- status: "logged-out";
22
- }>]>;
16
+ }, z.core.$strict>, z.ZodObject<{
17
+ status: z.ZodNonOptional<z.ZodLiteral<"logged-out">>;
18
+ }, z.core.$strict>]>;
23
19
  export type AuthenticationStatus = z.infer<typeof authenticationStatusSchema>;
24
20
  type AuthMiddlewareResult = readonly [
25
21
  AuthenticationStatus["status"],
@@ -2,27 +2,14 @@ import { z } from "zod";
2
2
  import { type OrganizationID } from "./organization_id";
3
3
  export declare const inviteMemberInputModes: readonly ["email", "uid"];
4
4
  export type InviteMemberInputMode = (typeof inviteMemberInputModes)[number];
5
- export declare const inviteMemberFormSchema: z.ZodEffects<z.ZodObject<{
6
- organization_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
7
- input_mode: z.ZodEnum<["email", "uid"]>;
8
- identifier: z.ZodUnion<[z.ZodString, z.ZodString]>;
9
- }, "strict", z.ZodTypeAny, {
10
- organization_id: string;
11
- input_mode: "uid" | "email";
12
- identifier: string;
13
- }, {
14
- organization_id: string;
15
- input_mode: "uid" | "email";
16
- identifier: string;
17
- }>, {
18
- organization_id: string;
19
- input_mode: "uid" | "email";
20
- identifier: string;
21
- }, {
22
- organization_id: string;
23
- input_mode: "uid" | "email";
24
- identifier: string;
25
- }>;
5
+ export declare const inviteMemberFormSchema: z.ZodObject<{
6
+ organization_id: z.ZodNonOptional<z.ZodString>;
7
+ input_mode: z.ZodNonOptional<z.ZodEnum<{
8
+ uid: "uid";
9
+ email: "email";
10
+ }>>;
11
+ identifier: z.ZodNonOptional<z.ZodUnion<readonly [z.ZodGUID, z.ZodEmail]>>;
12
+ }, z.core.$strict>;
26
13
  export type InviteMemberFormValues = z.infer<typeof inviteMemberFormSchema>;
27
14
  export interface InviteMemberSubmitData {
28
15
  organization_id: OrganizationID;
@@ -5,7 +5,7 @@ export const inviteMemberFormSchema = z
5
5
  .object({
6
6
  organization_id: organizationIdSchema,
7
7
  input_mode: z.enum(inviteMemberInputModes),
8
- identifier: z.union([z.string().uuid(), z.string().email()]),
8
+ identifier: z.union([z.guid(), z.email()]),
9
9
  })
10
10
  .required({
11
11
  organization_id: true,
@@ -15,18 +15,18 @@ export const inviteMemberFormSchema = z
15
15
  .strict()
16
16
  .superRefine((data, ctx) => {
17
17
  if (data.input_mode === "uid") {
18
- if (!z.string().uuid().safeParse(data.identifier).success) {
18
+ if (!z.guid().safeParse(data.identifier).success) {
19
19
  ctx.addIssue({
20
- code: z.ZodIssueCode.custom,
20
+ code: "custom",
21
21
  message: "Must be a valid UUID",
22
22
  path: ["identifier"],
23
23
  });
24
24
  }
25
25
  }
26
26
  else if (data.input_mode === "email") {
27
- if (!z.string().email().safeParse(data.identifier).success) {
27
+ if (!z.email().safeParse(data.identifier).success) {
28
28
  ctx.addIssue({
29
- code: z.ZodIssueCode.custom,
29
+ code: "custom",
30
30
  message: "Must be a valid email address",
31
31
  path: ["identifier"],
32
32
  });
@@ -1 +1 @@
1
- {"version":3,"file":"invite_member_form.js","sourceRoot":"","sources":["../../src/organizations/invite_member_form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAuB,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE9E,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,OAAO,EAAE,KAAK,CAAU,CAAC;AAGhE,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC;KACpC,MAAM,CAAC;IACN,eAAe,EAAE,oBAAoB;IACrC,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,sBAAsB,CAAC;IAC1C,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;CAC7D,CAAC;KACD,QAAQ,CAAC;IACR,eAAe,EAAE,IAAI;IACrB,UAAU,EAAE,IAAI;IAChB,UAAU,EAAE,IAAI;CACjB,CAAC;KAC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C;IAC1C,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC;CAC3C,CAAC;KACD,QAAQ,CAAC;IACR,eAAe,EAAE,IAAI;IACrB,UAAU,EAAE,IAAI;IAChB,UAAU,EAAE,IAAI;CACjB,CAAC;KACD,MAAM,EAAE;KACR,WAAW,CAAC,CAAC,IAAI,EAAE,GAAoB,EAAE,EAAE;IAC1C,IAAI,IAAI,CAAC,UAAU,KAAK,KAAK,EAAE,CAAC;QAC9B,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,OAAO,EAAE,CAAC;YACjD,GAAG,CAAC,QAAQ,CAAC;gBACX,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,sBAAsB;gBAC/B,IAAI,EAAE,CAAC,YAAY,CAAC;aACrB,CAAC,CAAC;QACL,CAAC;IACH,CAAC;SAAM,IAAI,IAAI,CAAC,UAAU,KAAK,OAAO,EAAE,CAAC;QACvC,IAAI,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,OAAO,EAAE,CAAC;YAClD,GAAG,CAAC,QAAQ,CAAC;gBACX,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,+BAA+B;gBACxC,IAAI,EAAE,CAAC,YAAY,CAAC;aACrB,CAAC,CAAC;QACL,CAAC;IACH,CAAC;AACH,CAAC,CAAC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
2
  export declare const organizationMembershipRoleTypes: readonly ["owner", "admin", "member"];
3
3
  export type OrganizationMembershipRoleType = (typeof organizationMembershipRoleTypes)[number];
4
- export declare const organizationMembershipRoleTypeSchema: z.ZodEffects<z.ZodString, "admin" | "owner" | "member", string>;
4
+ export declare const organizationMembershipRoleTypeSchema: z.ZodString & z.ZodType<"admin" | "owner" | "member", string, z.core.$ZodTypeInternals<"admin" | "owner" | "member", string>>;
5
5
  export declare function isValidOrganizationMembershipRoleType(role: string): role is OrganizationMembershipRoleType;
@@ -1,18 +1,8 @@
1
1
  import { z } from "zod";
2
2
  export declare const organizationDefinitionSchema: z.ZodObject<{
3
- created_at: z.ZodNumber;
4
- organization_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
5
- name: z.ZodString;
6
- created_by: z.ZodNullable<z.ZodOptional<z.ZodString>>;
7
- }, "strict", z.ZodTypeAny, {
8
- created_at: number;
9
- organization_id: string;
10
- name: string;
11
- created_by?: string | null | undefined;
12
- }, {
13
- created_at: number;
14
- organization_id: string;
15
- name: string;
16
- created_by?: string | null | undefined;
17
- }>;
3
+ organization_id: z.ZodNonOptional<z.ZodString>;
4
+ name: z.ZodNonOptional<z.ZodString>;
5
+ created_at: z.ZodNonOptional<z.ZodNumber>;
6
+ created_by: z.ZodNullable<z.ZodOptional<z.ZodGUID>>;
7
+ }, z.core.$strict>;
18
8
  export type OrganizationDefinition = z.infer<typeof organizationDefinitionSchema>;
@@ -6,7 +6,7 @@ export const organizationDefinitionSchema = z
6
6
  organization_id: organizationIdSchema,
7
7
  name: organizationNameSchema,
8
8
  created_at: z.number().positive(),
9
- created_by: z.string().uuid().optional().nullable(),
9
+ created_by: z.guid().optional().nullable(),
10
10
  })
11
11
  .required({
12
12
  organization_id: true,
@@ -1 +1 @@
1
- {"version":3,"file":"organization_definition.js","sourceRoot":"","sources":["../../src/organizations/organization_definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC;KAC1C,MAAM,CAAC;IACN,eAAe,EAAE,oBAAoB;IACrC,IAAI,EAAE,sBAAsB;IAC5B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CACpD,CAAC;KACD,QAAQ,CAAC;IACR,eAAe,EAAE,IAAI;IACrB,IAAI,EAAE,IAAI;IACV,UAAU,EAAE,IAAI;CACjB,CAAC;KACD,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"organization_definition.js","sourceRoot":"","sources":["../../src/organizations/organization_definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC;KAC1C,MAAM,CAAC;IACN,eAAe,EAAE,oBAAoB;IACrC,IAAI,EAAE,sBAAsB;IAC5B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,UAAU,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CAC3C,CAAC;KACD,QAAQ,CAAC;IACR,eAAe,EAAE,IAAI;IACrB,IAAI,EAAE,IAAI;IACV,UAAU,EAAE,IAAI;CACjB,CAAC;KACD,MAAM,EAAE,CAAC"}
@@ -2,7 +2,13 @@ import { z } from "zod";
2
2
  import { type OrganizationID } from "./organization_id";
3
3
  export declare const organizationInvitationStatusTypes: readonly ["pending", "accepted", "declined", "revoked", "expired"];
4
4
  export type OrganizationInvitationStatus = (typeof organizationInvitationStatusTypes)[number];
5
- export declare const organizationInvitationStatusSchema: z.ZodEnum<["pending", "accepted", "declined", "revoked", "expired"]>;
5
+ export declare const organizationInvitationStatusSchema: z.ZodEnum<{
6
+ pending: "pending";
7
+ accepted: "accepted";
8
+ declined: "declined";
9
+ revoked: "revoked";
10
+ expired: "expired";
11
+ }>;
6
12
  /**
7
13
  * Organization invitation as returned by the API for display in the UI.
8
14
  * Includes display fields like organization_name and inviter_email.
@@ -49,39 +55,21 @@ export interface OrganizationInvitationWithUserData {
49
55
  responded_at?: number | null;
50
56
  }
51
57
  export declare const organizationInvitationSchema: z.ZodObject<{
52
- invitation_id: z.ZodString;
53
- organization_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
58
+ invitation_id: z.ZodGUID;
59
+ organization_id: z.ZodString;
54
60
  organization_name: z.ZodOptional<z.ZodString>;
55
- inviter_uid: z.ZodString;
56
- inviter_email: z.ZodOptional<z.ZodString>;
57
- invitee_uid: z.ZodString;
58
- invitee_email: z.ZodOptional<z.ZodString>;
59
- status: z.ZodEnum<["pending", "accepted", "declined", "revoked", "expired"]>;
61
+ inviter_uid: z.ZodGUID;
62
+ inviter_email: z.ZodOptional<z.ZodEmail>;
63
+ invitee_uid: z.ZodGUID;
64
+ invitee_email: z.ZodOptional<z.ZodEmail>;
65
+ status: z.ZodEnum<{
66
+ pending: "pending";
67
+ accepted: "accepted";
68
+ declined: "declined";
69
+ revoked: "revoked";
70
+ expired: "expired";
71
+ }>;
60
72
  created_at: z.ZodNumber;
61
73
  expires_at: z.ZodNumber;
62
74
  responded_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
63
- }, "strip", z.ZodTypeAny, {
64
- status: "pending" | "accepted" | "declined" | "revoked" | "expired";
65
- expires_at: number;
66
- created_at: number;
67
- organization_id: string;
68
- invitation_id: string;
69
- inviter_uid: string;
70
- invitee_uid: string;
71
- organization_name?: string | undefined;
72
- inviter_email?: string | undefined;
73
- invitee_email?: string | undefined;
74
- responded_at?: number | null | undefined;
75
- }, {
76
- status: "pending" | "accepted" | "declined" | "revoked" | "expired";
77
- expires_at: number;
78
- created_at: number;
79
- organization_id: string;
80
- invitation_id: string;
81
- inviter_uid: string;
82
- invitee_uid: string;
83
- organization_name?: string | undefined;
84
- inviter_email?: string | undefined;
85
- invitee_email?: string | undefined;
86
- responded_at?: number | null | undefined;
87
- }>;
75
+ }, z.core.$strip>;
@@ -9,13 +9,13 @@ export const organizationInvitationStatusTypes = [
9
9
  ];
10
10
  export const organizationInvitationStatusSchema = z.enum(organizationInvitationStatusTypes);
11
11
  export const organizationInvitationSchema = z.object({
12
- invitation_id: z.string().uuid(),
12
+ invitation_id: z.guid(),
13
13
  organization_id: organizationIdSchema,
14
14
  organization_name: z.string().optional(),
15
- inviter_uid: z.string().uuid(),
16
- inviter_email: z.string().email().optional(),
17
- invitee_uid: z.string().uuid(),
18
- invitee_email: z.string().email().optional(),
15
+ inviter_uid: z.guid(),
16
+ inviter_email: z.email().optional(),
17
+ invitee_uid: z.guid(),
18
+ invitee_email: z.email().optional(),
19
19
  status: organizationInvitationStatusSchema,
20
20
  created_at: z.number().positive(),
21
21
  expires_at: z.number().positive(),
@@ -1 +1 @@
1
- {"version":3,"file":"organization_invitation.js","sourceRoot":"","sources":["../../src/organizations/organization_invitation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAuB,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE9E,MAAM,CAAC,MAAM,iCAAiC,GAAG;IAC/C,SAAS;IACT,UAAU;IACV,UAAU;IACV,SAAS;IACT,SAAS;CACD,CAAC;AAKX,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC;AAkD5F,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IACnD,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAChC,eAAe,EAAE,oBAAoB;IACrC,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACxC,WAAW,EAAE,CAAC,CAAC,MAAM,E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;IACrB,aAAa,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;IACnC,MAAM,EAAE,kCAAkC;IAC1C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CAC1D,CAAC,CAAC"}
@@ -23,22 +23,10 @@ export interface OrganizationMembershipRoleDetails {
23
23
  joined_at: number;
24
24
  }
25
25
  export declare const organizationMembershipRoleDetailsSchema: z.ZodObject<{
26
- created_at: z.ZodNumber;
27
- organization_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
28
- organization_name: z.ZodString;
29
- joined_at: z.ZodNumber;
30
- role: z.ZodType<"admin" | "owner" | "member", z.ZodTypeDef, "admin" | "owner" | "member">;
31
- }, "strict", z.ZodTypeAny, {
32
- created_at: number;
33
- organization_id: string;
34
- organization_name: string;
35
- joined_at: number;
36
- role: "admin" | "owner" | "member";
37
- }, {
38
- created_at: number;
39
- organization_id: string;
40
- organization_name: string;
41
- joined_at: number;
42
- role: "admin" | "owner" | "member";
43
- }>;
26
+ organization_id: z.ZodNonOptional<z.ZodString>;
27
+ organization_name: z.ZodNonOptional<z.ZodString>;
28
+ role: z.ZodNonOptional<z.ZodType<"admin" | "owner" | "member", unknown, z.core.$ZodTypeInternals<"admin" | "owner" | "member", unknown>>>;
29
+ created_at: z.ZodNonOptional<z.ZodNumber>;
30
+ joined_at: z.ZodNonOptional<z.ZodNumber>;
31
+ }, z.core.$strict>;
44
32
  export declare function isValidOrganizationMembershipRoleDetails(value: unknown): value is OrganizationMembershipRoleDetails;
@@ -4,12 +4,6 @@ export declare const DEFAULT_PAGINATION_PAGE_INDEX: 0;
4
4
  export declare const paginationOptionsSchema: z.ZodObject<{
5
5
  page_index: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
6
6
  page_size: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
7
- }, "strict", z.ZodTypeAny, {
8
- page_index?: number | undefined;
9
- page_size?: number | undefined;
10
- }, {
11
- page_index?: number | undefined;
12
- page_size?: number | undefined;
13
- }>;
7
+ }, z.core.$strict>;
14
8
  export type PaginationOptions = z.infer<typeof paginationOptionsSchema>;
15
9
  export declare function isValidPaginationOptions(val: unknown): val is PaginationOptions;
@@ -9,21 +9,13 @@ export interface CreateCodeChallengeInputOptions {
9
9
  sha256: (code_verifier: string) => Promise<string>;
10
10
  }
11
11
  export declare function create_code_challenge(verifier_opts: CreateCodeChallengeInputOptions): Promise<CodeChallengeWithDetails>;
12
- export declare const codeChallengeSchema: z.ZodEffects<z.ZodString, string, string>;
12
+ export declare const codeChallengeSchema: z.ZodString;
13
13
  export type CodeChallenge = z.infer<typeof codeChallengeSchema>;
14
14
  export declare const codeChallengeWithDetailsSchema: z.ZodObject<{
15
- code_challenge: z.ZodEffects<z.ZodString, string, string>;
16
- code_challenge_method: z.ZodLiteral<"S256">;
17
- challenge_time: z.ZodNumber;
18
- }, "strict", z.ZodTypeAny, {
19
- challenge_time: number;
20
- code_challenge: string;
21
- code_challenge_method: "S256";
22
- }, {
23
- challenge_time: number;
24
- code_challenge: string;
25
- code_challenge_method: "S256";
26
- }>;
15
+ code_challenge: z.ZodNonOptional<z.ZodString>;
16
+ code_challenge_method: z.ZodNonOptional<z.ZodLiteral<"S256">>;
17
+ challenge_time: z.ZodNonOptional<z.ZodNumber>;
18
+ }, z.core.$strict>;
27
19
  export type CodeChallengeWithDetails = {
28
20
  code_challenge: CodeChallenge;
29
21
  code_challenge_method: typeof code_challenge_method;
@@ -6,22 +6,12 @@ export interface CreateCodeVerifierInputOptions {
6
6
  debug?: boolean;
7
7
  }
8
8
  export declare function create_code_verifier({ challenge_time, generateRandomCodeVerifier, debug, }: CreateCodeVerifierInputOptions): CodeVerifierWithDetails;
9
- export declare const codeVerifierSchema: z.ZodEffects<z.ZodString, string, string>;
9
+ export declare const codeVerifierSchema: z.ZodString;
10
10
  export type CodeVerifier = z.infer<typeof codeVerifierSchema>;
11
11
  export declare const codeVerifierWithDetailsSchema: z.ZodObject<{
12
- challenge_time: z.ZodNumber;
13
- code_verifier: z.ZodEffects<z.ZodString, string, string>;
14
- expires_at: z.ZodNumber;
15
- max_age: z.ZodNumber;
16
- }, "strict", z.ZodTypeAny, {
17
- challenge_time: number;
18
- code_verifier: string;
19
- expires_at: number;
20
- max_age: number;
21
- }, {
22
- challenge_time: number;
23
- code_verifier: string;
24
- expires_at: number;
25
- max_age: number;
26
- }>;
12
+ code_verifier: z.ZodNonOptional<z.ZodString>;
13
+ challenge_time: z.ZodNonOptional<z.ZodNumber>;
14
+ expires_at: z.ZodNonOptional<z.ZodNumber>;
15
+ max_age: z.ZodNonOptional<z.ZodNumber>;
16
+ }, z.core.$strict>;
27
17
  export type CodeVerifierWithDetails = z.infer<typeof codeVerifierWithDetailsSchema>;