@authhero/adapter-interfaces 0.2.1 → 0.2.2

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.
@@ -2,960 +2,232 @@
2
2
 
3
3
  import { z } from '@hono/zod-openapi';
4
4
 
5
- export declare const applicationInsertSchema: z.ZodObject<{
6
- id: z.ZodString;
7
- name: z.ZodString;
8
- allowed_web_origins: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
9
- allowed_callback_urls: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
10
- allowed_logout_urls: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
11
- email_validation: z.ZodDefault<z.ZodEnum<[
12
- "enabled",
13
- "disabled",
14
- "enforced"
15
- ]>>;
16
- client_secret: z.ZodDefault<z.ZodString>;
17
- disable_sign_ups: z.ZodDefault<z.ZodBoolean>;
5
+ export declare const totalsSchema: z.ZodObject<{
6
+ start: z.ZodNumber;
7
+ limit: z.ZodNumber;
8
+ length: z.ZodNumber;
18
9
  }, "strip", z.ZodTypeAny, {
19
- id: string;
20
- name: string;
21
- allowed_web_origins: string;
22
- allowed_callback_urls: string;
23
- allowed_logout_urls: string;
24
- email_validation: "enabled" | "disabled" | "enforced";
25
- client_secret: string;
26
- disable_sign_ups: boolean;
27
- }, {
28
- id: string;
29
- name: string;
30
- allowed_web_origins?: string | undefined;
31
- allowed_callback_urls?: string | undefined;
32
- allowed_logout_urls?: string | undefined;
33
- email_validation?: "enabled" | "disabled" | "enforced" | undefined;
34
- client_secret?: string | undefined;
35
- disable_sign_ups?: boolean | undefined;
36
- }>;
37
- export type ApplicationInsert = z.infer<typeof applicationInsertSchema>;
38
- export declare const applicationSchema: z.ZodObject<z.objectUtil.extendShape<{
39
- created_at: z.ZodEffects<z.ZodString, string, string>;
40
- updated_at: z.ZodEffects<z.ZodString, string, string>;
41
- }, {
42
- id: z.ZodString;
43
- name: z.ZodString;
44
- allowed_web_origins: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
45
- allowed_callback_urls: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
46
- allowed_logout_urls: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
47
- email_validation: z.ZodDefault<z.ZodEnum<[
48
- "enabled",
49
- "disabled",
50
- "enforced"
51
- ]>>;
52
- client_secret: z.ZodDefault<z.ZodString>;
53
- disable_sign_ups: z.ZodDefault<z.ZodBoolean>;
54
- }>, "strip", z.ZodTypeAny, {
55
- id: string;
56
- name: string;
57
- allowed_web_origins: string;
58
- allowed_callback_urls: string;
59
- allowed_logout_urls: string;
60
- email_validation: "enabled" | "disabled" | "enforced";
61
- client_secret: string;
62
- disable_sign_ups: boolean;
63
- created_at: string;
64
- updated_at: string;
10
+ start: number;
11
+ limit: number;
12
+ length: number;
65
13
  }, {
66
- id: string;
67
- name: string;
68
- created_at: string;
69
- updated_at: string;
70
- allowed_web_origins?: string | undefined;
71
- allowed_callback_urls?: string | undefined;
72
- allowed_logout_urls?: string | undefined;
73
- email_validation?: "enabled" | "disabled" | "enforced" | undefined;
74
- client_secret?: string | undefined;
75
- disable_sign_ups?: boolean | undefined;
14
+ start: number;
15
+ limit: number;
16
+ length: number;
76
17
  }>;
77
- export type Application = z.infer<typeof applicationSchema>;
78
- export declare enum AuthorizationResponseType {
79
- TOKEN = "token",
80
- TOKEN_ID_TOKEN = "token id_token",
81
- CODE = "code"
82
- }
83
- export declare enum AuthorizationResponseMode {
84
- QUERY = "query",
85
- FRAGMENT = "fragment",
86
- FORM_POST = "form_post",
87
- WEB_MESSAGE = "web_message"
88
- }
89
- export declare enum CodeChallengeMethod {
90
- S265 = "S256",
91
- plain = "plain"
18
+ export interface Totals {
19
+ start: number;
20
+ limit: number;
21
+ length: number;
92
22
  }
93
- export declare const authParamsSchema: z.ZodObject<{
94
- client_id: z.ZodString;
95
- vendor_id: z.ZodOptional<z.ZodString>;
96
- response_type: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseType>>;
97
- response_mode: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseMode>>;
98
- redirect_uri: z.ZodOptional<z.ZodString>;
99
- audience: z.ZodOptional<z.ZodString>;
100
- state: z.ZodOptional<z.ZodString>;
101
- nonce: z.ZodOptional<z.ZodString>;
102
- scope: z.ZodOptional<z.ZodString>;
103
- code_challenge_method: z.ZodOptional<z.ZodNativeEnum<typeof CodeChallengeMethod>>;
104
- code_challenge: z.ZodOptional<z.ZodString>;
23
+ export declare const baseUserSchema: z.ZodObject<{
24
+ email: z.ZodOptional<z.ZodString>;
105
25
  username: z.ZodOptional<z.ZodString>;
26
+ given_name: z.ZodOptional<z.ZodString>;
27
+ family_name: z.ZodOptional<z.ZodString>;
28
+ nickname: z.ZodOptional<z.ZodString>;
29
+ name: z.ZodOptional<z.ZodString>;
30
+ picture: z.ZodOptional<z.ZodString>;
31
+ locale: z.ZodOptional<z.ZodString>;
32
+ linked_to: z.ZodOptional<z.ZodString>;
33
+ profileData: z.ZodOptional<z.ZodString>;
34
+ user_id: z.ZodOptional<z.ZodString>;
106
35
  }, "strip", z.ZodTypeAny, {
107
- client_id: string;
108
- vendor_id?: string | undefined;
109
- response_type?: AuthorizationResponseType | undefined;
110
- response_mode?: AuthorizationResponseMode | undefined;
111
- redirect_uri?: string | undefined;
112
- audience?: string | undefined;
113
- state?: string | undefined;
114
- nonce?: string | undefined;
115
- scope?: string | undefined;
116
- code_challenge_method?: CodeChallengeMethod | undefined;
117
- code_challenge?: string | undefined;
36
+ email?: string | undefined;
37
+ name?: string | undefined;
118
38
  username?: string | undefined;
39
+ given_name?: string | undefined;
40
+ family_name?: string | undefined;
41
+ user_id?: string | undefined;
42
+ profileData?: string | undefined;
43
+ nickname?: string | undefined;
44
+ picture?: string | undefined;
45
+ locale?: string | undefined;
46
+ linked_to?: string | undefined;
119
47
  }, {
120
- client_id: string;
121
- vendor_id?: string | undefined;
122
- response_type?: AuthorizationResponseType | undefined;
123
- response_mode?: AuthorizationResponseMode | undefined;
124
- redirect_uri?: string | undefined;
125
- audience?: string | undefined;
126
- state?: string | undefined;
127
- nonce?: string | undefined;
128
- scope?: string | undefined;
129
- code_challenge_method?: CodeChallengeMethod | undefined;
130
- code_challenge?: string | undefined;
48
+ email?: string | undefined;
49
+ name?: string | undefined;
131
50
  username?: string | undefined;
51
+ given_name?: string | undefined;
52
+ family_name?: string | undefined;
53
+ user_id?: string | undefined;
54
+ profileData?: string | undefined;
55
+ nickname?: string | undefined;
56
+ picture?: string | undefined;
57
+ locale?: string | undefined;
58
+ linked_to?: string | undefined;
132
59
  }>;
133
- export type AuthParams = z.infer<typeof authParamsSchema>;
134
- export declare const authenticationCodeSchema: z.ZodObject<{
135
- authParams: z.ZodObject<{
136
- client_id: z.ZodString;
137
- vendor_id: z.ZodOptional<z.ZodString>;
138
- response_type: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseType>>;
139
- response_mode: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseMode>>;
140
- redirect_uri: z.ZodOptional<z.ZodString>;
141
- audience: z.ZodOptional<z.ZodString>;
142
- state: z.ZodOptional<z.ZodString>;
143
- nonce: z.ZodOptional<z.ZodString>;
144
- scope: z.ZodOptional<z.ZodString>;
145
- code_challenge_method: z.ZodOptional<z.ZodNativeEnum<typeof CodeChallengeMethod>>;
146
- code_challenge: z.ZodOptional<z.ZodString>;
147
- username: z.ZodOptional<z.ZodString>;
148
- }, "strip", z.ZodTypeAny, {
149
- client_id: string;
150
- vendor_id?: string | undefined;
151
- response_type?: AuthorizationResponseType | undefined;
152
- response_mode?: AuthorizationResponseMode | undefined;
153
- redirect_uri?: string | undefined;
154
- audience?: string | undefined;
155
- state?: string | undefined;
156
- nonce?: string | undefined;
157
- scope?: string | undefined;
158
- code_challenge_method?: CodeChallengeMethod | undefined;
159
- code_challenge?: string | undefined;
160
- username?: string | undefined;
161
- }, {
162
- client_id: string;
163
- vendor_id?: string | undefined;
164
- response_type?: AuthorizationResponseType | undefined;
165
- response_mode?: AuthorizationResponseMode | undefined;
166
- redirect_uri?: string | undefined;
167
- audience?: string | undefined;
168
- state?: string | undefined;
169
- nonce?: string | undefined;
170
- scope?: string | undefined;
171
- code_challenge_method?: CodeChallengeMethod | undefined;
172
- code_challenge?: string | undefined;
173
- username?: string | undefined;
174
- }>;
175
- nonce: z.ZodOptional<z.ZodString>;
176
- code: z.ZodString;
177
- user_id: z.ZodString;
178
- created_at: z.ZodString;
179
- expires_at: z.ZodString;
180
- used_at: z.ZodOptional<z.ZodString>;
181
- }, "strip", z.ZodTypeAny, {
182
- code: string;
183
- created_at: string;
184
- authParams: {
185
- client_id: string;
186
- vendor_id?: string | undefined;
187
- response_type?: AuthorizationResponseType | undefined;
188
- response_mode?: AuthorizationResponseMode | undefined;
189
- redirect_uri?: string | undefined;
190
- audience?: string | undefined;
191
- state?: string | undefined;
192
- nonce?: string | undefined;
193
- scope?: string | undefined;
194
- code_challenge_method?: CodeChallengeMethod | undefined;
195
- code_challenge?: string | undefined;
196
- username?: string | undefined;
197
- };
198
- user_id: string;
199
- expires_at: string;
200
- nonce?: string | undefined;
201
- used_at?: string | undefined;
60
+ export type BaseUser = z.infer<typeof baseUserSchema>;
61
+ export declare const userInsertSchema: z.ZodObject<z.objectUtil.extendShape<{
62
+ email: z.ZodOptional<z.ZodString>;
63
+ username: z.ZodOptional<z.ZodString>;
64
+ given_name: z.ZodOptional<z.ZodString>;
65
+ family_name: z.ZodOptional<z.ZodString>;
66
+ nickname: z.ZodOptional<z.ZodString>;
67
+ name: z.ZodOptional<z.ZodString>;
68
+ picture: z.ZodOptional<z.ZodString>;
69
+ locale: z.ZodOptional<z.ZodString>;
70
+ linked_to: z.ZodOptional<z.ZodString>;
71
+ profileData: z.ZodOptional<z.ZodString>;
72
+ user_id: z.ZodOptional<z.ZodString>;
202
73
  }, {
203
- code: string;
204
- created_at: string;
205
- authParams: {
206
- client_id: string;
207
- vendor_id?: string | undefined;
208
- response_type?: AuthorizationResponseType | undefined;
209
- response_mode?: AuthorizationResponseMode | undefined;
210
- redirect_uri?: string | undefined;
211
- audience?: string | undefined;
212
- state?: string | undefined;
213
- nonce?: string | undefined;
214
- scope?: string | undefined;
215
- code_challenge_method?: CodeChallengeMethod | undefined;
216
- code_challenge?: string | undefined;
217
- username?: string | undefined;
218
- };
219
- user_id: string;
220
- expires_at: string;
221
- nonce?: string | undefined;
222
- used_at?: string | undefined;
223
- }>;
224
- export type AuthenticationCode = z.infer<typeof authenticationCodeSchema>;
225
- export declare enum GrantType {
226
- RefreshToken = "refresh_token",
227
- AuthorizationCode = "authorization_code",
228
- ClientCredential = "client_credentials",
229
- Passwordless = "passwordless",
230
- Password = "password"
231
- }
232
- export declare const authorizationCodeGrantTypeParamsSchema: z.ZodObject<{
233
- grant_type: z.ZodEffects<z.ZodNativeEnum<typeof GrantType>, GrantType.AuthorizationCode, GrantType>;
234
- code: z.ZodString;
235
- client_secret: z.ZodString;
236
- client_id: z.ZodString;
237
- }, "strip", z.ZodTypeAny, {
238
- client_secret: string;
239
- code: string;
240
- client_id: string;
241
- grant_type: GrantType.AuthorizationCode;
242
- }, {
243
- client_secret: string;
244
- code: string;
245
- client_id: string;
246
- grant_type: GrantType;
247
- }>;
248
- export type AuthorizationCodeGrantTypeParams = z.infer<typeof authorizationCodeGrantTypeParamsSchema>;
249
- export declare const pkceAuthorizationCodeGrantTypeParamsSchema: z.ZodObject<{
250
- grant_type: z.ZodEffects<z.ZodNativeEnum<typeof GrantType>, GrantType.AuthorizationCode, GrantType>;
251
- code: z.ZodString;
252
- code_verifier: z.ZodString;
253
- client_id: z.ZodOptional<z.ZodString>;
254
- redirect_uri: z.ZodString;
255
- }, "strip", z.ZodTypeAny, {
256
- code: string;
257
- redirect_uri: string;
258
- grant_type: GrantType.AuthorizationCode;
259
- code_verifier: string;
260
- client_id?: string | undefined;
261
- }, {
262
- code: string;
263
- redirect_uri: string;
264
- grant_type: GrantType;
265
- code_verifier: string;
266
- client_id?: string | undefined;
267
- }>;
268
- export type PKCEAuthorizationCodeGrantTypeParams = z.infer<typeof pkceAuthorizationCodeGrantTypeParamsSchema>;
269
- export declare const clientCredentialGrantTypeParamsSchema: z.ZodObject<{
270
- grant_type: z.ZodEffects<z.ZodNativeEnum<typeof GrantType>, GrantType.ClientCredential, GrantType>;
271
- scope: z.ZodOptional<z.ZodString>;
272
- client_secret: z.ZodString;
273
- client_id: z.ZodString;
274
- audience: z.ZodOptional<z.ZodString>;
275
- }, "strip", z.ZodTypeAny, {
276
- client_secret: string;
277
- client_id: string;
278
- grant_type: GrantType.ClientCredential;
279
- audience?: string | undefined;
280
- scope?: string | undefined;
281
- }, {
282
- client_secret: string;
283
- client_id: string;
284
- grant_type: GrantType;
285
- audience?: string | undefined;
286
- scope?: string | undefined;
287
- }>;
288
- export type ClientCredentialsGrantTypeParams = z.infer<typeof clientCredentialGrantTypeParamsSchema>;
289
- declare const tokenResponseSchema: z.ZodObject<{
290
- access_token: z.ZodString;
291
- id_token: z.ZodOptional<z.ZodString>;
292
- scope: z.ZodOptional<z.ZodString>;
293
- state: z.ZodOptional<z.ZodString>;
294
- refresh_token: z.ZodOptional<z.ZodString>;
295
- token_type: z.ZodString;
296
- expires_in: z.ZodNumber;
297
- }, "strip", z.ZodTypeAny, {
298
- access_token: string;
299
- token_type: string;
300
- expires_in: number;
301
- state?: string | undefined;
302
- scope?: string | undefined;
303
- refresh_token?: string | undefined;
304
- id_token?: string | undefined;
74
+ email_verified: z.ZodDefault<z.ZodBoolean>;
75
+ verify_email: z.ZodOptional<z.ZodBoolean>;
76
+ last_ip: z.ZodOptional<z.ZodString>;
77
+ last_login: z.ZodOptional<z.ZodString>;
78
+ user_id: z.ZodOptional<z.ZodString>;
79
+ provider: z.ZodDefault<z.ZodString>;
80
+ connection: z.ZodDefault<z.ZodString>;
81
+ }>, "strip", z.ZodTypeAny, {
82
+ email_verified: boolean;
83
+ connection: string;
84
+ provider: string;
85
+ email?: string | undefined;
86
+ name?: string | undefined;
87
+ username?: string | undefined;
88
+ given_name?: string | undefined;
89
+ family_name?: string | undefined;
90
+ user_id?: string | undefined;
91
+ profileData?: string | undefined;
92
+ nickname?: string | undefined;
93
+ picture?: string | undefined;
94
+ locale?: string | undefined;
95
+ linked_to?: string | undefined;
96
+ verify_email?: boolean | undefined;
97
+ last_ip?: string | undefined;
98
+ last_login?: string | undefined;
305
99
  }, {
306
- access_token: string;
307
- token_type: string;
308
- expires_in: number;
309
- state?: string | undefined;
310
- scope?: string | undefined;
311
- refresh_token?: string | undefined;
312
- id_token?: string | undefined;
100
+ email?: string | undefined;
101
+ email_verified?: boolean | undefined;
102
+ name?: string | undefined;
103
+ username?: string | undefined;
104
+ given_name?: string | undefined;
105
+ family_name?: string | undefined;
106
+ connection?: string | undefined;
107
+ user_id?: string | undefined;
108
+ provider?: string | undefined;
109
+ profileData?: string | undefined;
110
+ nickname?: string | undefined;
111
+ picture?: string | undefined;
112
+ locale?: string | undefined;
113
+ linked_to?: string | undefined;
114
+ verify_email?: boolean | undefined;
115
+ last_ip?: string | undefined;
116
+ last_login?: string | undefined;
313
117
  }>;
314
- export type TokenResponse = z.infer<typeof tokenResponseSchema>;
315
- declare const codeResponseSchema: z.ZodObject<{
316
- code: z.ZodString;
317
- state: z.ZodOptional<z.ZodString>;
318
- }, "strip", z.ZodTypeAny, {
319
- code: string;
320
- state?: string | undefined;
118
+ export declare const userSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
119
+ email: z.ZodOptional<z.ZodString>;
120
+ username: z.ZodOptional<z.ZodString>;
121
+ given_name: z.ZodOptional<z.ZodString>;
122
+ family_name: z.ZodOptional<z.ZodString>;
123
+ nickname: z.ZodOptional<z.ZodString>;
124
+ name: z.ZodOptional<z.ZodString>;
125
+ picture: z.ZodOptional<z.ZodString>;
126
+ locale: z.ZodOptional<z.ZodString>;
127
+ linked_to: z.ZodOptional<z.ZodString>;
128
+ profileData: z.ZodOptional<z.ZodString>;
129
+ user_id: z.ZodOptional<z.ZodString>;
321
130
  }, {
322
- code: string;
323
- state?: string | undefined;
324
- }>;
325
- export type CodeResponse = z.infer<typeof codeResponseSchema>;
326
- export interface LoginState {
327
- connection?: string;
328
- authParams: AuthParams;
329
- state: string;
330
- errorMessage?: string;
331
- }
332
- export declare const ClientSchema: z.ZodObject<z.objectUtil.extendShape<{
333
- id: z.ZodString;
334
- name: z.ZodString;
335
- domains: z.ZodArray<z.ZodObject<{
336
- domain: z.ZodString;
337
- dkim_private_key: z.ZodOptional<z.ZodString>;
338
- dkim_public_key: z.ZodOptional<z.ZodString>;
339
- email_api_key: z.ZodOptional<z.ZodString>;
340
- email_service: z.ZodOptional<z.ZodUnion<[
341
- z.ZodLiteral<"mailgun">,
342
- z.ZodLiteral<"mailchannels">
343
- ]>>;
131
+ email_verified: z.ZodDefault<z.ZodBoolean>;
132
+ verify_email: z.ZodOptional<z.ZodBoolean>;
133
+ last_ip: z.ZodOptional<z.ZodString>;
134
+ last_login: z.ZodOptional<z.ZodString>;
135
+ user_id: z.ZodOptional<z.ZodString>;
136
+ provider: z.ZodDefault<z.ZodString>;
137
+ connection: z.ZodDefault<z.ZodString>;
138
+ }>, {
139
+ created_at: z.ZodString;
140
+ updated_at: z.ZodString;
141
+ }>, {
142
+ user_id: z.ZodString;
143
+ email: z.ZodString;
144
+ is_social: z.ZodBoolean;
145
+ login_count: z.ZodNumber;
146
+ identities: z.ZodOptional<z.ZodArray<z.ZodObject<{
147
+ connection: z.ZodString;
148
+ user_id: z.ZodString;
149
+ provider: z.ZodString;
150
+ isSocial: z.ZodBoolean;
151
+ access_token: z.ZodOptional<z.ZodString>;
152
+ access_token_secret: z.ZodOptional<z.ZodString>;
153
+ refresh_token: z.ZodOptional<z.ZodString>;
154
+ profileData: z.ZodOptional<z.ZodObject<{
155
+ email: z.ZodOptional<z.ZodString>;
156
+ email_verified: z.ZodOptional<z.ZodBoolean>;
157
+ name: z.ZodOptional<z.ZodString>;
158
+ username: z.ZodOptional<z.ZodString>;
159
+ given_name: z.ZodOptional<z.ZodString>;
160
+ phone_number: z.ZodOptional<z.ZodString>;
161
+ phone_verified: z.ZodOptional<z.ZodBoolean>;
162
+ family_name: z.ZodOptional<z.ZodString>;
163
+ }, "strip", z.ZodAny, z.objectOutputType<{
164
+ email: z.ZodOptional<z.ZodString>;
165
+ email_verified: z.ZodOptional<z.ZodBoolean>;
166
+ name: z.ZodOptional<z.ZodString>;
167
+ username: z.ZodOptional<z.ZodString>;
168
+ given_name: z.ZodOptional<z.ZodString>;
169
+ phone_number: z.ZodOptional<z.ZodString>;
170
+ phone_verified: z.ZodOptional<z.ZodBoolean>;
171
+ family_name: z.ZodOptional<z.ZodString>;
172
+ }, z.ZodAny, "strip">, z.objectInputType<{
173
+ email: z.ZodOptional<z.ZodString>;
174
+ email_verified: z.ZodOptional<z.ZodBoolean>;
175
+ name: z.ZodOptional<z.ZodString>;
176
+ username: z.ZodOptional<z.ZodString>;
177
+ given_name: z.ZodOptional<z.ZodString>;
178
+ phone_number: z.ZodOptional<z.ZodString>;
179
+ phone_verified: z.ZodOptional<z.ZodBoolean>;
180
+ family_name: z.ZodOptional<z.ZodString>;
181
+ }, z.ZodAny, "strip">>>;
344
182
  }, "strip", z.ZodTypeAny, {
345
- domain: string;
346
- dkim_private_key?: string | undefined;
347
- dkim_public_key?: string | undefined;
348
- email_api_key?: string | undefined;
349
- email_service?: "mailgun" | "mailchannels" | undefined;
183
+ connection: string;
184
+ user_id: string;
185
+ provider: string;
186
+ isSocial: boolean;
187
+ access_token?: string | undefined;
188
+ access_token_secret?: string | undefined;
189
+ refresh_token?: string | undefined;
190
+ profileData?: z.objectOutputType<{
191
+ email: z.ZodOptional<z.ZodString>;
192
+ email_verified: z.ZodOptional<z.ZodBoolean>;
193
+ name: z.ZodOptional<z.ZodString>;
194
+ username: z.ZodOptional<z.ZodString>;
195
+ given_name: z.ZodOptional<z.ZodString>;
196
+ phone_number: z.ZodOptional<z.ZodString>;
197
+ phone_verified: z.ZodOptional<z.ZodBoolean>;
198
+ family_name: z.ZodOptional<z.ZodString>;
199
+ }, z.ZodAny, "strip"> | undefined;
350
200
  }, {
351
- domain: string;
352
- dkim_private_key?: string | undefined;
353
- dkim_public_key?: string | undefined;
354
- email_api_key?: string | undefined;
355
- email_service?: "mailgun" | "mailchannels" | undefined;
356
- }>, "many">;
357
- allowed_callback_urls: z.ZodArray<z.ZodString, "many">;
358
- allowed_logout_urls: z.ZodArray<z.ZodString, "many">;
359
- allowed_web_origins: z.ZodArray<z.ZodString, "many">;
360
- email_validation: z.ZodUnion<[
361
- z.ZodLiteral<"enabled">,
362
- z.ZodLiteral<"disabled">,
363
- z.ZodLiteral<"enforced">
364
- ]>;
365
- tenant_id: z.ZodString;
366
- client_secret: z.ZodString;
367
- disable_sign_ups: z.ZodBoolean;
368
- tenant: z.ZodObject<{
369
- name: z.ZodString;
370
- audience: z.ZodOptional<z.ZodString>;
371
- logo: z.ZodOptional<z.ZodString>;
372
- primary_color: z.ZodOptional<z.ZodString>;
373
- secondary_color: z.ZodOptional<z.ZodString>;
374
- sender_email: z.ZodString;
375
- sender_name: z.ZodString;
376
- support_url: z.ZodOptional<z.ZodString>;
377
- language: z.ZodOptional<z.ZodString>;
378
- }, "strip", z.ZodTypeAny, {
379
- name: string;
380
- sender_email: string;
381
- sender_name: string;
382
- audience?: string | undefined;
383
- logo?: string | undefined;
384
- primary_color?: string | undefined;
385
- secondary_color?: string | undefined;
386
- support_url?: string | undefined;
387
- language?: string | undefined;
388
- }, {
389
- name: string;
390
- sender_email: string;
391
- sender_name: string;
392
- audience?: string | undefined;
393
- logo?: string | undefined;
394
- primary_color?: string | undefined;
395
- secondary_color?: string | undefined;
396
- support_url?: string | undefined;
397
- language?: string | undefined;
398
- }>;
399
- }, {
400
- connections: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
401
- id: z.ZodString;
402
- created_at: z.ZodEffects<z.ZodString, string, string>;
403
- updated_at: z.ZodEffects<z.ZodString, string, string>;
404
- }, {
405
- id: z.ZodOptional<z.ZodString>;
406
- name: z.ZodString;
407
- client_id: z.ZodOptional<z.ZodString>;
408
- client_secret: z.ZodOptional<z.ZodString>;
409
- authorization_endpoint: z.ZodOptional<z.ZodString>;
410
- response_type: z.ZodOptional<z.ZodType<AuthorizationResponseType, z.ZodTypeDef, AuthorizationResponseType>>;
411
- response_mode: z.ZodOptional<z.ZodType<AuthorizationResponseMode, z.ZodTypeDef, AuthorizationResponseMode>>;
412
- private_key: z.ZodOptional<z.ZodString>;
413
- kid: z.ZodOptional<z.ZodString>;
414
- team_id: z.ZodOptional<z.ZodString>;
415
- token_endpoint: z.ZodOptional<z.ZodString>;
416
- token_exchange_basic_auth: z.ZodOptional<z.ZodBoolean>;
417
- userinfo_endpoint: z.ZodOptional<z.ZodString>;
418
- scope: z.ZodOptional<z.ZodString>;
419
- }>, "strip", z.ZodTypeAny, {
420
- name: string;
421
- created_at: string;
422
- updated_at: string;
423
- id?: string | undefined;
424
- client_secret?: string | undefined;
425
- client_id?: string | undefined;
426
- response_type?: AuthorizationResponseType | undefined;
427
- response_mode?: AuthorizationResponseMode | undefined;
428
- scope?: string | undefined;
429
- authorization_endpoint?: string | undefined;
430
- private_key?: string | undefined;
431
- kid?: string | undefined;
432
- team_id?: string | undefined;
433
- token_endpoint?: string | undefined;
434
- token_exchange_basic_auth?: boolean | undefined;
435
- userinfo_endpoint?: string | undefined;
436
- }, {
437
- name: string;
438
- created_at: string;
439
- updated_at: string;
440
- id?: string | undefined;
441
- client_secret?: string | undefined;
442
- client_id?: string | undefined;
443
- response_type?: AuthorizationResponseType | undefined;
444
- response_mode?: AuthorizationResponseMode | undefined;
445
- scope?: string | undefined;
446
- authorization_endpoint?: string | undefined;
447
- private_key?: string | undefined;
448
- kid?: string | undefined;
449
- team_id?: string | undefined;
450
- token_endpoint?: string | undefined;
451
- token_exchange_basic_auth?: boolean | undefined;
452
- userinfo_endpoint?: string | undefined;
453
- }>, "many">;
454
- }>, "strip", z.ZodTypeAny, {
455
- id: string;
456
- name: string;
457
- allowed_web_origins: string[];
458
- allowed_callback_urls: string[];
459
- allowed_logout_urls: string[];
460
- email_validation: "enabled" | "disabled" | "enforced";
461
- client_secret: string;
462
- disable_sign_ups: boolean;
463
- domains: {
464
- domain: string;
465
- dkim_private_key?: string | undefined;
466
- dkim_public_key?: string | undefined;
467
- email_api_key?: string | undefined;
468
- email_service?: "mailgun" | "mailchannels" | undefined;
469
- }[];
470
- tenant_id: string;
471
- tenant: {
472
- name: string;
473
- sender_email: string;
474
- sender_name: string;
475
- audience?: string | undefined;
476
- logo?: string | undefined;
477
- primary_color?: string | undefined;
478
- secondary_color?: string | undefined;
479
- support_url?: string | undefined;
480
- language?: string | undefined;
481
- };
482
- connections: {
483
- name: string;
484
- created_at: string;
485
- updated_at: string;
486
- id?: string | undefined;
487
- client_secret?: string | undefined;
488
- client_id?: string | undefined;
489
- response_type?: AuthorizationResponseType | undefined;
490
- response_mode?: AuthorizationResponseMode | undefined;
491
- scope?: string | undefined;
492
- authorization_endpoint?: string | undefined;
493
- private_key?: string | undefined;
494
- kid?: string | undefined;
495
- team_id?: string | undefined;
496
- token_endpoint?: string | undefined;
497
- token_exchange_basic_auth?: boolean | undefined;
498
- userinfo_endpoint?: string | undefined;
499
- }[];
500
- }, {
501
- id: string;
502
- name: string;
503
- allowed_web_origins: string[];
504
- allowed_callback_urls: string[];
505
- allowed_logout_urls: string[];
506
- email_validation: "enabled" | "disabled" | "enforced";
507
- client_secret: string;
508
- disable_sign_ups: boolean;
509
- domains: {
510
- domain: string;
511
- dkim_private_key?: string | undefined;
512
- dkim_public_key?: string | undefined;
513
- email_api_key?: string | undefined;
514
- email_service?: "mailgun" | "mailchannels" | undefined;
515
- }[];
516
- tenant_id: string;
517
- tenant: {
518
- name: string;
519
- sender_email: string;
520
- sender_name: string;
521
- audience?: string | undefined;
522
- logo?: string | undefined;
523
- primary_color?: string | undefined;
524
- secondary_color?: string | undefined;
525
- support_url?: string | undefined;
526
- language?: string | undefined;
527
- };
528
- connections: {
529
- name: string;
530
- created_at: string;
531
- updated_at: string;
532
- id?: string | undefined;
533
- client_secret?: string | undefined;
534
- client_id?: string | undefined;
535
- response_type?: AuthorizationResponseType | undefined;
536
- response_mode?: AuthorizationResponseMode | undefined;
537
- scope?: string | undefined;
538
- authorization_endpoint?: string | undefined;
539
- private_key?: string | undefined;
540
- kid?: string | undefined;
541
- team_id?: string | undefined;
542
- token_endpoint?: string | undefined;
543
- token_exchange_basic_auth?: boolean | undefined;
544
- userinfo_endpoint?: string | undefined;
545
- }[];
546
- }>;
547
- export declare const PartialClientSchema: z.ZodObject<z.objectUtil.extendShape<{
548
- id: z.ZodString;
549
- name: z.ZodString;
550
- domains: z.ZodArray<z.ZodObject<{
551
- domain: z.ZodString;
552
- dkim_private_key: z.ZodOptional<z.ZodString>;
553
- dkim_public_key: z.ZodOptional<z.ZodString>;
554
- email_api_key: z.ZodOptional<z.ZodString>;
555
- email_service: z.ZodOptional<z.ZodUnion<[
556
- z.ZodLiteral<"mailgun">,
557
- z.ZodLiteral<"mailchannels">
558
- ]>>;
559
- }, "strip", z.ZodTypeAny, {
560
- domain: string;
561
- dkim_private_key?: string | undefined;
562
- dkim_public_key?: string | undefined;
563
- email_api_key?: string | undefined;
564
- email_service?: "mailgun" | "mailchannels" | undefined;
565
- }, {
566
- domain: string;
567
- dkim_private_key?: string | undefined;
568
- dkim_public_key?: string | undefined;
569
- email_api_key?: string | undefined;
570
- email_service?: "mailgun" | "mailchannels" | undefined;
571
- }>, "many">;
572
- allowed_callback_urls: z.ZodArray<z.ZodString, "many">;
573
- allowed_logout_urls: z.ZodArray<z.ZodString, "many">;
574
- allowed_web_origins: z.ZodArray<z.ZodString, "many">;
575
- email_validation: z.ZodUnion<[
576
- z.ZodLiteral<"enabled">,
577
- z.ZodLiteral<"disabled">,
578
- z.ZodLiteral<"enforced">
579
- ]>;
580
- tenant_id: z.ZodString;
581
- client_secret: z.ZodString;
582
- disable_sign_ups: z.ZodBoolean;
583
- tenant: z.ZodObject<{
584
- name: z.ZodString;
585
- audience: z.ZodOptional<z.ZodString>;
586
- logo: z.ZodOptional<z.ZodString>;
587
- primary_color: z.ZodOptional<z.ZodString>;
588
- secondary_color: z.ZodOptional<z.ZodString>;
589
- sender_email: z.ZodString;
590
- sender_name: z.ZodString;
591
- support_url: z.ZodOptional<z.ZodString>;
592
- language: z.ZodOptional<z.ZodString>;
593
- }, "strip", z.ZodTypeAny, {
594
- name: string;
595
- sender_email: string;
596
- sender_name: string;
597
- audience?: string | undefined;
598
- logo?: string | undefined;
599
- primary_color?: string | undefined;
600
- secondary_color?: string | undefined;
601
- support_url?: string | undefined;
602
- language?: string | undefined;
603
- }, {
604
- name: string;
605
- sender_email: string;
606
- sender_name: string;
607
- audience?: string | undefined;
608
- logo?: string | undefined;
609
- primary_color?: string | undefined;
610
- secondary_color?: string | undefined;
611
- support_url?: string | undefined;
612
- language?: string | undefined;
613
- }>;
614
- }, {
615
- connections: z.ZodArray<z.ZodObject<{
616
- created_at: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
617
- updated_at: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
618
- id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
619
- name: z.ZodOptional<z.ZodString>;
620
- client_id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
621
- client_secret: z.ZodOptional<z.ZodOptional<z.ZodString>>;
622
- authorization_endpoint: z.ZodOptional<z.ZodOptional<z.ZodString>>;
623
- response_type: z.ZodOptional<z.ZodOptional<z.ZodType<AuthorizationResponseType, z.ZodTypeDef, AuthorizationResponseType>>>;
624
- response_mode: z.ZodOptional<z.ZodOptional<z.ZodType<AuthorizationResponseMode, z.ZodTypeDef, AuthorizationResponseMode>>>;
625
- private_key: z.ZodOptional<z.ZodOptional<z.ZodString>>;
626
- kid: z.ZodOptional<z.ZodOptional<z.ZodString>>;
627
- team_id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
628
- token_endpoint: z.ZodOptional<z.ZodOptional<z.ZodString>>;
629
- token_exchange_basic_auth: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
630
- userinfo_endpoint: z.ZodOptional<z.ZodOptional<z.ZodString>>;
631
- scope: z.ZodOptional<z.ZodOptional<z.ZodString>>;
632
- }, "strip", z.ZodTypeAny, {
633
- id?: string | undefined;
634
- name?: string | undefined;
635
- client_secret?: string | undefined;
636
- created_at?: string | undefined;
637
- updated_at?: string | undefined;
638
- client_id?: string | undefined;
639
- response_type?: AuthorizationResponseType | undefined;
640
- response_mode?: AuthorizationResponseMode | undefined;
641
- scope?: string | undefined;
642
- authorization_endpoint?: string | undefined;
643
- private_key?: string | undefined;
644
- kid?: string | undefined;
645
- team_id?: string | undefined;
646
- token_endpoint?: string | undefined;
647
- token_exchange_basic_auth?: boolean | undefined;
648
- userinfo_endpoint?: string | undefined;
649
- }, {
650
- id?: string | undefined;
651
- name?: string | undefined;
652
- client_secret?: string | undefined;
653
- created_at?: string | undefined;
654
- updated_at?: string | undefined;
655
- client_id?: string | undefined;
656
- response_type?: AuthorizationResponseType | undefined;
657
- response_mode?: AuthorizationResponseMode | undefined;
658
- scope?: string | undefined;
659
- authorization_endpoint?: string | undefined;
660
- private_key?: string | undefined;
661
- kid?: string | undefined;
662
- team_id?: string | undefined;
663
- token_endpoint?: string | undefined;
664
- token_exchange_basic_auth?: boolean | undefined;
665
- userinfo_endpoint?: string | undefined;
666
- }>, "many">;
667
- }>, "strip", z.ZodTypeAny, {
668
- id: string;
669
- name: string;
670
- allowed_web_origins: string[];
671
- allowed_callback_urls: string[];
672
- allowed_logout_urls: string[];
673
- email_validation: "enabled" | "disabled" | "enforced";
674
- client_secret: string;
675
- disable_sign_ups: boolean;
676
- domains: {
677
- domain: string;
678
- dkim_private_key?: string | undefined;
679
- dkim_public_key?: string | undefined;
680
- email_api_key?: string | undefined;
681
- email_service?: "mailgun" | "mailchannels" | undefined;
682
- }[];
683
- tenant_id: string;
684
- tenant: {
685
- name: string;
686
- sender_email: string;
687
- sender_name: string;
688
- audience?: string | undefined;
689
- logo?: string | undefined;
690
- primary_color?: string | undefined;
691
- secondary_color?: string | undefined;
692
- support_url?: string | undefined;
693
- language?: string | undefined;
694
- };
695
- connections: {
696
- id?: string | undefined;
697
- name?: string | undefined;
698
- client_secret?: string | undefined;
699
- created_at?: string | undefined;
700
- updated_at?: string | undefined;
701
- client_id?: string | undefined;
702
- response_type?: AuthorizationResponseType | undefined;
703
- response_mode?: AuthorizationResponseMode | undefined;
704
- scope?: string | undefined;
705
- authorization_endpoint?: string | undefined;
706
- private_key?: string | undefined;
707
- kid?: string | undefined;
708
- team_id?: string | undefined;
709
- token_endpoint?: string | undefined;
710
- token_exchange_basic_auth?: boolean | undefined;
711
- userinfo_endpoint?: string | undefined;
712
- }[];
713
- }, {
714
- id: string;
715
- name: string;
716
- allowed_web_origins: string[];
717
- allowed_callback_urls: string[];
718
- allowed_logout_urls: string[];
719
- email_validation: "enabled" | "disabled" | "enforced";
720
- client_secret: string;
721
- disable_sign_ups: boolean;
722
- domains: {
723
- domain: string;
724
- dkim_private_key?: string | undefined;
725
- dkim_public_key?: string | undefined;
726
- email_api_key?: string | undefined;
727
- email_service?: "mailgun" | "mailchannels" | undefined;
728
- }[];
729
- tenant_id: string;
730
- tenant: {
731
- name: string;
732
- sender_email: string;
733
- sender_name: string;
734
- audience?: string | undefined;
735
- logo?: string | undefined;
736
- primary_color?: string | undefined;
737
- secondary_color?: string | undefined;
738
- support_url?: string | undefined;
739
- language?: string | undefined;
740
- };
741
- connections: {
742
- id?: string | undefined;
743
- name?: string | undefined;
744
- client_secret?: string | undefined;
745
- created_at?: string | undefined;
746
- updated_at?: string | undefined;
747
- client_id?: string | undefined;
748
- response_type?: AuthorizationResponseType | undefined;
749
- response_mode?: AuthorizationResponseMode | undefined;
750
- scope?: string | undefined;
751
- authorization_endpoint?: string | undefined;
752
- private_key?: string | undefined;
753
- kid?: string | undefined;
754
- team_id?: string | undefined;
755
- token_endpoint?: string | undefined;
756
- token_exchange_basic_auth?: boolean | undefined;
757
- userinfo_endpoint?: string | undefined;
758
- }[];
759
- }>;
760
- export type Client = z.infer<typeof ClientSchema>;
761
- export type PartialClient = z.infer<typeof PartialClientSchema>;
762
- export declare const certificateSchema: z.ZodObject<{
763
- private_key: z.ZodString;
764
- public_key: z.ZodString;
765
- kid: z.ZodString;
766
- created_at: z.ZodString;
767
- revoked_at: z.ZodOptional<z.ZodString>;
768
- }, "strip", z.ZodTypeAny, {
769
- created_at: string;
770
- private_key: string;
771
- kid: string;
772
- public_key: string;
773
- revoked_at?: string | undefined;
774
- }, {
775
- created_at: string;
776
- private_key: string;
777
- kid: string;
778
- public_key: string;
779
- revoked_at?: string | undefined;
780
- }>;
781
- export interface Certificate {
782
- private_key: string;
783
- public_key: string;
784
- kid: string;
785
- created_at: string;
786
- revoked_at?: string;
787
- }
788
- export declare const signingKeySchema: z.ZodObject<{
789
- kid: z.ZodString;
790
- cert: z.ZodString;
791
- fingerprint: z.ZodString;
792
- thumbprint: z.ZodString;
793
- pkcs7: z.ZodOptional<z.ZodString>;
794
- current: z.ZodOptional<z.ZodBoolean>;
795
- next: z.ZodOptional<z.ZodBoolean>;
796
- previous: z.ZodOptional<z.ZodBoolean>;
797
- current_since: z.ZodOptional<z.ZodString>;
798
- current_until: z.ZodOptional<z.ZodString>;
799
- revoked: z.ZodOptional<z.ZodBoolean>;
800
- revoked_at: z.ZodOptional<z.ZodString>;
801
- }, "strip", z.ZodTypeAny, {
802
- kid: string;
803
- cert: string;
804
- fingerprint: string;
805
- thumbprint: string;
806
- revoked_at?: string | undefined;
807
- pkcs7?: string | undefined;
808
- current?: boolean | undefined;
809
- next?: boolean | undefined;
810
- previous?: boolean | undefined;
811
- current_since?: string | undefined;
812
- current_until?: string | undefined;
813
- revoked?: boolean | undefined;
814
- }, {
815
- kid: string;
816
- cert: string;
817
- fingerprint: string;
818
- thumbprint: string;
819
- revoked_at?: string | undefined;
820
- pkcs7?: string | undefined;
821
- current?: boolean | undefined;
822
- next?: boolean | undefined;
823
- previous?: boolean | undefined;
824
- current_since?: string | undefined;
825
- current_until?: string | undefined;
826
- revoked?: boolean | undefined;
827
- }>;
828
- export interface Session {
829
- id: string;
830
- tenant_id: string;
831
- client_id: string;
832
- created_at: Date;
833
- expires_at: Date;
834
- used_at: Date;
835
- deleted_at?: Date;
836
- user_id: string;
837
- }
838
- export interface OTP {
839
- id: string;
840
- tenant_id: string;
841
- client_id: string;
842
- email: string;
843
- code: string;
844
- ip?: string;
845
- send: "link" | "code";
846
- authParams: {
847
- nonce?: string;
848
- state?: string;
849
- scope?: string;
850
- response_type?: AuthorizationResponseType;
851
- response_mode?: AuthorizationResponseMode;
852
- redirect_uri?: string;
853
- };
854
- created_at: Date;
855
- expires_at: Date;
856
- used_at?: string;
857
- user_id?: string;
858
- }
859
- export interface Ticket {
860
- id: string;
861
- tenant_id: string;
862
- client_id: string;
863
- email: string;
864
- authParams?: {
865
- nonce?: string;
866
- state?: string;
867
- scope?: string;
868
- response_type?: AuthorizationResponseType;
869
- response_mode?: AuthorizationResponseMode;
870
- redirect_uri?: string;
871
- };
872
- created_at: Date;
873
- expires_at: Date;
874
- used_at?: Date;
875
- }
876
- export interface Code {
877
- id: string;
878
- code: string;
879
- type: "password_reset" | "validation";
880
- created_at: string;
881
- expires_at: string;
882
- used_at?: string;
883
- user_id: string;
884
- }
885
- export interface PasswordResponse {
886
- valid: boolean;
887
- message: string;
888
- }
889
- export interface PasswordParams {
890
- user_id: string;
891
- password: string;
892
- }
893
- export declare const baseUserSchema: z.ZodObject<{
894
- email: z.ZodOptional<z.ZodString>;
895
- username: z.ZodOptional<z.ZodString>;
896
- given_name: z.ZodOptional<z.ZodString>;
897
- family_name: z.ZodOptional<z.ZodString>;
898
- nickname: z.ZodOptional<z.ZodString>;
899
- name: z.ZodOptional<z.ZodString>;
900
- picture: z.ZodOptional<z.ZodString>;
901
- locale: z.ZodOptional<z.ZodString>;
902
- linked_to: z.ZodOptional<z.ZodString>;
903
- profileData: z.ZodOptional<z.ZodString>;
904
- user_id: z.ZodOptional<z.ZodString>;
905
- }, "strip", z.ZodTypeAny, {
906
- name?: string | undefined;
907
- username?: string | undefined;
908
- user_id?: string | undefined;
909
- email?: string | undefined;
910
- given_name?: string | undefined;
911
- family_name?: string | undefined;
912
- profileData?: string | undefined;
913
- nickname?: string | undefined;
914
- picture?: string | undefined;
915
- locale?: string | undefined;
916
- linked_to?: string | undefined;
917
- }, {
918
- name?: string | undefined;
919
- username?: string | undefined;
920
- user_id?: string | undefined;
921
- email?: string | undefined;
922
- given_name?: string | undefined;
923
- family_name?: string | undefined;
924
- profileData?: string | undefined;
925
- nickname?: string | undefined;
926
- picture?: string | undefined;
927
- locale?: string | undefined;
928
- linked_to?: string | undefined;
929
- }>;
930
- export type BaseUser = z.infer<typeof baseUserSchema>;
931
- export declare const userInsertSchema: z.ZodObject<z.objectUtil.extendShape<{
932
- email: z.ZodOptional<z.ZodString>;
933
- username: z.ZodOptional<z.ZodString>;
934
- given_name: z.ZodOptional<z.ZodString>;
935
- family_name: z.ZodOptional<z.ZodString>;
936
- nickname: z.ZodOptional<z.ZodString>;
937
- name: z.ZodOptional<z.ZodString>;
938
- picture: z.ZodOptional<z.ZodString>;
939
- locale: z.ZodOptional<z.ZodString>;
940
- linked_to: z.ZodOptional<z.ZodString>;
941
- profileData: z.ZodOptional<z.ZodString>;
942
- user_id: z.ZodOptional<z.ZodString>;
943
- }, {
944
- email_verified: z.ZodDefault<z.ZodBoolean>;
945
- verify_email: z.ZodOptional<z.ZodBoolean>;
946
- last_ip: z.ZodOptional<z.ZodString>;
947
- last_login: z.ZodOptional<z.ZodString>;
948
- user_id: z.ZodOptional<z.ZodString>;
949
- provider: z.ZodDefault<z.ZodString>;
950
- connection: z.ZodDefault<z.ZodString>;
201
+ connection: string;
202
+ user_id: string;
203
+ provider: string;
204
+ isSocial: boolean;
205
+ access_token?: string | undefined;
206
+ access_token_secret?: string | undefined;
207
+ refresh_token?: string | undefined;
208
+ profileData?: z.objectInputType<{
209
+ email: z.ZodOptional<z.ZodString>;
210
+ email_verified: z.ZodOptional<z.ZodBoolean>;
211
+ name: z.ZodOptional<z.ZodString>;
212
+ username: z.ZodOptional<z.ZodString>;
213
+ given_name: z.ZodOptional<z.ZodString>;
214
+ phone_number: z.ZodOptional<z.ZodString>;
215
+ phone_verified: z.ZodOptional<z.ZodBoolean>;
216
+ family_name: z.ZodOptional<z.ZodString>;
217
+ }, z.ZodAny, "strip"> | undefined;
218
+ }>, "many">>;
951
219
  }>, "strip", z.ZodTypeAny, {
220
+ created_at: string;
221
+ updated_at: string;
222
+ email: string;
952
223
  email_verified: boolean;
953
224
  connection: string;
225
+ user_id: string;
954
226
  provider: string;
227
+ is_social: boolean;
228
+ login_count: number;
955
229
  name?: string | undefined;
956
230
  username?: string | undefined;
957
- user_id?: string | undefined;
958
- email?: string | undefined;
959
231
  given_name?: string | undefined;
960
232
  family_name?: string | undefined;
961
233
  profileData?: string | undefined;
@@ -966,12 +238,35 @@ export declare const userInsertSchema: z.ZodObject<z.objectUtil.extendShape<{
966
238
  verify_email?: boolean | undefined;
967
239
  last_ip?: string | undefined;
968
240
  last_login?: string | undefined;
241
+ identities?: {
242
+ connection: string;
243
+ user_id: string;
244
+ provider: string;
245
+ isSocial: boolean;
246
+ access_token?: string | undefined;
247
+ access_token_secret?: string | undefined;
248
+ refresh_token?: string | undefined;
249
+ profileData?: z.objectOutputType<{
250
+ email: z.ZodOptional<z.ZodString>;
251
+ email_verified: z.ZodOptional<z.ZodBoolean>;
252
+ name: z.ZodOptional<z.ZodString>;
253
+ username: z.ZodOptional<z.ZodString>;
254
+ given_name: z.ZodOptional<z.ZodString>;
255
+ phone_number: z.ZodOptional<z.ZodString>;
256
+ phone_verified: z.ZodOptional<z.ZodBoolean>;
257
+ family_name: z.ZodOptional<z.ZodString>;
258
+ }, z.ZodAny, "strip"> | undefined;
259
+ }[] | undefined;
969
260
  }, {
261
+ created_at: string;
262
+ updated_at: string;
263
+ email: string;
264
+ user_id: string;
265
+ is_social: boolean;
266
+ login_count: number;
267
+ email_verified?: boolean | undefined;
970
268
  name?: string | undefined;
971
269
  username?: string | undefined;
972
- user_id?: string | undefined;
973
- email?: string | undefined;
974
- email_verified?: boolean | undefined;
975
270
  given_name?: string | undefined;
976
271
  family_name?: string | undefined;
977
272
  connection?: string | undefined;
@@ -984,8 +279,28 @@ export declare const userInsertSchema: z.ZodObject<z.objectUtil.extendShape<{
984
279
  verify_email?: boolean | undefined;
985
280
  last_ip?: string | undefined;
986
281
  last_login?: string | undefined;
282
+ identities?: {
283
+ connection: string;
284
+ user_id: string;
285
+ provider: string;
286
+ isSocial: boolean;
287
+ access_token?: string | undefined;
288
+ access_token_secret?: string | undefined;
289
+ refresh_token?: string | undefined;
290
+ profileData?: z.objectInputType<{
291
+ email: z.ZodOptional<z.ZodString>;
292
+ email_verified: z.ZodOptional<z.ZodBoolean>;
293
+ name: z.ZodOptional<z.ZodString>;
294
+ username: z.ZodOptional<z.ZodString>;
295
+ given_name: z.ZodOptional<z.ZodString>;
296
+ phone_number: z.ZodOptional<z.ZodString>;
297
+ phone_verified: z.ZodOptional<z.ZodBoolean>;
298
+ family_name: z.ZodOptional<z.ZodString>;
299
+ }, z.ZodAny, "strip"> | undefined;
300
+ }[] | undefined;
987
301
  }>;
988
- export declare const userSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
302
+ export type User = z.infer<typeof userSchema>;
303
+ export declare const auth0UserResponseSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
989
304
  email: z.ZodOptional<z.ZodString>;
990
305
  username: z.ZodOptional<z.ZodString>;
991
306
  given_name: z.ZodOptional<z.ZodString>;
@@ -1050,13 +365,13 @@ export declare const userSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUt
1050
365
  family_name: z.ZodOptional<z.ZodString>;
1051
366
  }, z.ZodAny, "strip">>>;
1052
367
  }, "strip", z.ZodTypeAny, {
1053
- user_id: string;
1054
368
  connection: string;
369
+ user_id: string;
1055
370
  provider: string;
1056
371
  isSocial: boolean;
1057
- refresh_token?: string | undefined;
1058
372
  access_token?: string | undefined;
1059
373
  access_token_secret?: string | undefined;
374
+ refresh_token?: string | undefined;
1060
375
  profileData?: z.objectOutputType<{
1061
376
  email: z.ZodOptional<z.ZodString>;
1062
377
  email_verified: z.ZodOptional<z.ZodBoolean>;
@@ -1068,13 +383,13 @@ export declare const userSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUt
1068
383
  family_name: z.ZodOptional<z.ZodString>;
1069
384
  }, z.ZodAny, "strip"> | undefined;
1070
385
  }, {
1071
- user_id: string;
1072
386
  connection: string;
387
+ user_id: string;
1073
388
  provider: string;
1074
389
  isSocial: boolean;
1075
- refresh_token?: string | undefined;
1076
390
  access_token?: string | undefined;
1077
391
  access_token_secret?: string | undefined;
392
+ refresh_token?: string | undefined;
1078
393
  profileData?: z.objectInputType<{
1079
394
  email: z.ZodOptional<z.ZodString>;
1080
395
  email_verified: z.ZodOptional<z.ZodBoolean>;
@@ -1089,10 +404,10 @@ export declare const userSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUt
1089
404
  }>, "strip", z.ZodTypeAny, {
1090
405
  created_at: string;
1091
406
  updated_at: string;
1092
- user_id: string;
1093
407
  email: string;
1094
408
  email_verified: boolean;
1095
409
  connection: string;
410
+ user_id: string;
1096
411
  provider: string;
1097
412
  is_social: boolean;
1098
413
  login_count: number;
@@ -1109,13 +424,13 @@ export declare const userSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUt
1109
424
  last_ip?: string | undefined;
1110
425
  last_login?: string | undefined;
1111
426
  identities?: {
1112
- user_id: string;
1113
427
  connection: string;
428
+ user_id: string;
1114
429
  provider: string;
1115
430
  isSocial: boolean;
1116
- refresh_token?: string | undefined;
1117
431
  access_token?: string | undefined;
1118
432
  access_token_secret?: string | undefined;
433
+ refresh_token?: string | undefined;
1119
434
  profileData?: z.objectOutputType<{
1120
435
  email: z.ZodOptional<z.ZodString>;
1121
436
  email_verified: z.ZodOptional<z.ZodBoolean>;
@@ -1130,13 +445,13 @@ export declare const userSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUt
1130
445
  }, {
1131
446
  created_at: string;
1132
447
  updated_at: string;
1133
- user_id: string;
1134
448
  email: string;
449
+ user_id: string;
1135
450
  is_social: boolean;
1136
451
  login_count: number;
452
+ email_verified?: boolean | undefined;
1137
453
  name?: string | undefined;
1138
454
  username?: string | undefined;
1139
- email_verified?: boolean | undefined;
1140
455
  given_name?: string | undefined;
1141
456
  family_name?: string | undefined;
1142
457
  connection?: string | undefined;
@@ -1150,13 +465,13 @@ export declare const userSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUt
1150
465
  last_ip?: string | undefined;
1151
466
  last_login?: string | undefined;
1152
467
  identities?: {
1153
- user_id: string;
1154
468
  connection: string;
469
+ user_id: string;
1155
470
  provider: string;
1156
471
  isSocial: boolean;
1157
- refresh_token?: string | undefined;
1158
472
  access_token?: string | undefined;
1159
473
  access_token_secret?: string | undefined;
474
+ refresh_token?: string | undefined;
1160
475
  profileData?: z.objectInputType<{
1161
476
  email: z.ZodOptional<z.ZodString>;
1162
477
  email_verified: z.ZodOptional<z.ZodBoolean>;
@@ -1169,8 +484,52 @@ export declare const userSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUt
1169
484
  }, z.ZodAny, "strip"> | undefined;
1170
485
  }[] | undefined;
1171
486
  }>;
1172
- export type User = z.infer<typeof userSchema>;
1173
- export declare const auth0UserResponseSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
487
+ export interface PostUsersBody extends BaseUser {
488
+ password?: string;
489
+ verify_email?: boolean;
490
+ username?: string;
491
+ connection?: string;
492
+ email_verified?: boolean;
493
+ }
494
+ export declare const userResponseSchema: z.ZodObject<z.objectUtil.extendShape<{
495
+ email: z.ZodOptional<z.ZodString>;
496
+ username: z.ZodOptional<z.ZodString>;
497
+ given_name: z.ZodOptional<z.ZodString>;
498
+ family_name: z.ZodOptional<z.ZodString>;
499
+ nickname: z.ZodOptional<z.ZodString>;
500
+ name: z.ZodOptional<z.ZodString>;
501
+ picture: z.ZodOptional<z.ZodString>;
502
+ locale: z.ZodOptional<z.ZodString>;
503
+ linked_to: z.ZodOptional<z.ZodString>;
504
+ profileData: z.ZodOptional<z.ZodString>;
505
+ user_id: z.ZodOptional<z.ZodString>;
506
+ }, {
507
+ email: z.ZodString;
508
+ login_count: z.ZodNumber;
509
+ multifactor: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
510
+ last_ip: z.ZodOptional<z.ZodString>;
511
+ last_login: z.ZodOptional<z.ZodString>;
512
+ user_id: z.ZodString;
513
+ }>, "strip", z.ZodAny, z.objectOutputType<z.objectUtil.extendShape<{
514
+ email: z.ZodOptional<z.ZodString>;
515
+ username: z.ZodOptional<z.ZodString>;
516
+ given_name: z.ZodOptional<z.ZodString>;
517
+ family_name: z.ZodOptional<z.ZodString>;
518
+ nickname: z.ZodOptional<z.ZodString>;
519
+ name: z.ZodOptional<z.ZodString>;
520
+ picture: z.ZodOptional<z.ZodString>;
521
+ locale: z.ZodOptional<z.ZodString>;
522
+ linked_to: z.ZodOptional<z.ZodString>;
523
+ profileData: z.ZodOptional<z.ZodString>;
524
+ user_id: z.ZodOptional<z.ZodString>;
525
+ }, {
526
+ email: z.ZodString;
527
+ login_count: z.ZodNumber;
528
+ multifactor: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
529
+ last_ip: z.ZodOptional<z.ZodString>;
530
+ last_login: z.ZodOptional<z.ZodString>;
531
+ user_id: z.ZodString;
532
+ }>, z.ZodAny, "strip">, z.objectInputType<z.objectUtil.extendShape<{
1174
533
  email: z.ZodOptional<z.ZodString>;
1175
534
  username: z.ZodOptional<z.ZodString>;
1176
535
  given_name: z.ZodOptional<z.ZodString>;
@@ -1183,520 +542,1034 @@ export declare const auth0UserResponseSchema: z.ZodObject<z.objectUtil.extendSha
1183
542
  profileData: z.ZodOptional<z.ZodString>;
1184
543
  user_id: z.ZodOptional<z.ZodString>;
1185
544
  }, {
1186
- email_verified: z.ZodDefault<z.ZodBoolean>;
1187
- verify_email: z.ZodOptional<z.ZodBoolean>;
1188
- last_ip: z.ZodOptional<z.ZodString>;
1189
- last_login: z.ZodOptional<z.ZodString>;
545
+ email: z.ZodString;
546
+ login_count: z.ZodNumber;
547
+ multifactor: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
548
+ last_ip: z.ZodOptional<z.ZodString>;
549
+ last_login: z.ZodOptional<z.ZodString>;
550
+ user_id: z.ZodString;
551
+ }>, z.ZodAny, "strip">>;
552
+ export type UserResponse = z.infer<typeof userResponseSchema>;
553
+ export declare enum LogTypes {
554
+ SUCCESS_API_OPERATION = "sapi",
555
+ SUCCESS_SILENT_AUTH = "ssa",
556
+ FAILED_SILENT_AUTH = "fsa",
557
+ SUCCESS_SIGNUP = "ss",
558
+ FAILED_SIGNUP = "fs",
559
+ SUCCESS_LOGIN = "s",
560
+ FAILED_LOGIN = "f",
561
+ FAILED_LOGIN_INCORRECT_PASSWORD = "fp",
562
+ SUCCESS_LOGOUT = "slo",
563
+ SUCCESS_CROSS_ORIGIN_AUTHENTICATION = "scoa",
564
+ FAILED_CROSS_ORIGIN_AUTHENTICATION = "fcoa",
565
+ SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN = "seacft",
566
+ SUCCESS_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN = "serft",
567
+ CODE_LINK_SENT = "cls",
568
+ NOT_IMPLEMENTED_1 = "seccft"
569
+ }
570
+ declare const LogType: z.ZodEnum<[
571
+ "sapi",
572
+ "ssa",
573
+ "fsa",
574
+ "ss",
575
+ "ssa",
576
+ "fs",
577
+ "s",
578
+ "f",
579
+ "fp",
580
+ "slo",
581
+ "scoa",
582
+ "fcoa",
583
+ "seccft",
584
+ "cls",
585
+ "seacft",
586
+ "serft"
587
+ ]>;
588
+ type LogType$1 = z.infer<typeof LogType>;
589
+ export declare const Auth0Client: z.ZodObject<{
590
+ name: z.ZodString;
591
+ version: z.ZodString;
592
+ env: z.ZodOptional<z.ZodObject<{
593
+ node: z.ZodOptional<z.ZodString>;
594
+ }, "strip", z.ZodTypeAny, {
595
+ node?: string | undefined;
596
+ }, {
597
+ node?: string | undefined;
598
+ }>>;
599
+ }, "strip", z.ZodTypeAny, {
600
+ name: string;
601
+ version: string;
602
+ env?: {
603
+ node?: string | undefined;
604
+ } | undefined;
605
+ }, {
606
+ name: string;
607
+ version: string;
608
+ env?: {
609
+ node?: string | undefined;
610
+ } | undefined;
611
+ }>;
612
+ export declare const logSchema: z.ZodObject<{
613
+ type: z.ZodEnum<[
614
+ "sapi",
615
+ "ssa",
616
+ "fsa",
617
+ "ss",
618
+ "ssa",
619
+ "fs",
620
+ "s",
621
+ "f",
622
+ "fp",
623
+ "slo",
624
+ "scoa",
625
+ "fcoa",
626
+ "seccft",
627
+ "cls",
628
+ "seacft",
629
+ "serft"
630
+ ]>;
631
+ date: z.ZodString;
632
+ description: z.ZodOptional<z.ZodString>;
633
+ log_id: z.ZodOptional<z.ZodString>;
634
+ _id: z.ZodOptional<z.ZodString>;
635
+ ip: z.ZodString;
636
+ user_agent: z.ZodString;
637
+ details: z.ZodOptional<z.ZodAny>;
638
+ isMobile: z.ZodBoolean;
1190
639
  user_id: z.ZodOptional<z.ZodString>;
1191
- provider: z.ZodDefault<z.ZodString>;
1192
- connection: z.ZodDefault<z.ZodString>;
1193
- }>, {
1194
- created_at: z.ZodString;
1195
- updated_at: z.ZodString;
1196
- }>, {
1197
- user_id: z.ZodString;
1198
- email: z.ZodString;
1199
- is_social: z.ZodBoolean;
1200
- login_count: z.ZodNumber;
1201
- identities: z.ZodOptional<z.ZodArray<z.ZodObject<{
1202
- connection: z.ZodString;
1203
- user_id: z.ZodString;
1204
- provider: z.ZodString;
1205
- isSocial: z.ZodBoolean;
1206
- access_token: z.ZodOptional<z.ZodString>;
1207
- access_token_secret: z.ZodOptional<z.ZodString>;
1208
- refresh_token: z.ZodOptional<z.ZodString>;
1209
- profileData: z.ZodOptional<z.ZodObject<{
1210
- email: z.ZodOptional<z.ZodString>;
1211
- email_verified: z.ZodOptional<z.ZodBoolean>;
1212
- name: z.ZodOptional<z.ZodString>;
1213
- username: z.ZodOptional<z.ZodString>;
1214
- given_name: z.ZodOptional<z.ZodString>;
1215
- phone_number: z.ZodOptional<z.ZodString>;
1216
- phone_verified: z.ZodOptional<z.ZodBoolean>;
1217
- family_name: z.ZodOptional<z.ZodString>;
1218
- }, "strip", z.ZodAny, z.objectOutputType<{
1219
- email: z.ZodOptional<z.ZodString>;
1220
- email_verified: z.ZodOptional<z.ZodBoolean>;
1221
- name: z.ZodOptional<z.ZodString>;
1222
- username: z.ZodOptional<z.ZodString>;
1223
- given_name: z.ZodOptional<z.ZodString>;
1224
- phone_number: z.ZodOptional<z.ZodString>;
1225
- phone_verified: z.ZodOptional<z.ZodBoolean>;
1226
- family_name: z.ZodOptional<z.ZodString>;
1227
- }, z.ZodAny, "strip">, z.objectInputType<{
1228
- email: z.ZodOptional<z.ZodString>;
1229
- email_verified: z.ZodOptional<z.ZodBoolean>;
1230
- name: z.ZodOptional<z.ZodString>;
1231
- username: z.ZodOptional<z.ZodString>;
1232
- given_name: z.ZodOptional<z.ZodString>;
1233
- phone_number: z.ZodOptional<z.ZodString>;
1234
- phone_verified: z.ZodOptional<z.ZodBoolean>;
1235
- family_name: z.ZodOptional<z.ZodString>;
1236
- }, z.ZodAny, "strip">>>;
640
+ user_name: z.ZodOptional<z.ZodString>;
641
+ connection: z.ZodOptional<z.ZodString>;
642
+ connection_id: z.ZodOptional<z.ZodString>;
643
+ client_id: z.ZodOptional<z.ZodString>;
644
+ client_name: z.ZodOptional<z.ZodString>;
645
+ audience: z.ZodOptional<z.ZodString>;
646
+ scope: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
647
+ strategy: z.ZodOptional<z.ZodString>;
648
+ strategy_type: z.ZodOptional<z.ZodString>;
649
+ hostname: z.ZodOptional<z.ZodString>;
650
+ auth0_client: z.ZodOptional<z.ZodObject<{
651
+ name: z.ZodString;
652
+ version: z.ZodString;
653
+ env: z.ZodOptional<z.ZodObject<{
654
+ node: z.ZodOptional<z.ZodString>;
655
+ }, "strip", z.ZodTypeAny, {
656
+ node?: string | undefined;
657
+ }, {
658
+ node?: string | undefined;
659
+ }>>;
1237
660
  }, "strip", z.ZodTypeAny, {
1238
- user_id: string;
1239
- connection: string;
1240
- provider: string;
1241
- isSocial: boolean;
1242
- refresh_token?: string | undefined;
1243
- access_token?: string | undefined;
1244
- access_token_secret?: string | undefined;
1245
- profileData?: z.objectOutputType<{
1246
- email: z.ZodOptional<z.ZodString>;
1247
- email_verified: z.ZodOptional<z.ZodBoolean>;
1248
- name: z.ZodOptional<z.ZodString>;
1249
- username: z.ZodOptional<z.ZodString>;
1250
- given_name: z.ZodOptional<z.ZodString>;
1251
- phone_number: z.ZodOptional<z.ZodString>;
1252
- phone_verified: z.ZodOptional<z.ZodBoolean>;
1253
- family_name: z.ZodOptional<z.ZodString>;
1254
- }, z.ZodAny, "strip"> | undefined;
661
+ name: string;
662
+ version: string;
663
+ env?: {
664
+ node?: string | undefined;
665
+ } | undefined;
1255
666
  }, {
1256
- user_id: string;
1257
- connection: string;
1258
- provider: string;
1259
- isSocial: boolean;
1260
- refresh_token?: string | undefined;
1261
- access_token?: string | undefined;
1262
- access_token_secret?: string | undefined;
1263
- profileData?: z.objectInputType<{
1264
- email: z.ZodOptional<z.ZodString>;
1265
- email_verified: z.ZodOptional<z.ZodBoolean>;
1266
- name: z.ZodOptional<z.ZodString>;
1267
- username: z.ZodOptional<z.ZodString>;
1268
- given_name: z.ZodOptional<z.ZodString>;
1269
- phone_number: z.ZodOptional<z.ZodString>;
1270
- phone_verified: z.ZodOptional<z.ZodBoolean>;
1271
- family_name: z.ZodOptional<z.ZodString>;
1272
- }, z.ZodAny, "strip"> | undefined;
1273
- }>, "many">>;
667
+ name: string;
668
+ version: string;
669
+ env?: {
670
+ node?: string | undefined;
671
+ } | undefined;
672
+ }>>;
673
+ }, "strip", z.ZodTypeAny, {
674
+ type: "sapi" | "ssa" | "fsa" | "ss" | "fs" | "s" | "f" | "fp" | "slo" | "scoa" | "fcoa" | "seacft" | "serft" | "cls" | "seccft";
675
+ date: string;
676
+ ip: string;
677
+ user_agent: string;
678
+ isMobile: boolean;
679
+ description?: string | undefined;
680
+ connection?: string | undefined;
681
+ user_id?: string | undefined;
682
+ log_id?: string | undefined;
683
+ _id?: string | undefined;
684
+ details?: any;
685
+ user_name?: string | undefined;
686
+ connection_id?: string | undefined;
687
+ client_id?: string | undefined;
688
+ client_name?: string | undefined;
689
+ audience?: string | undefined;
690
+ scope?: string[] | undefined;
691
+ strategy?: string | undefined;
692
+ strategy_type?: string | undefined;
693
+ hostname?: string | undefined;
694
+ auth0_client?: {
695
+ name: string;
696
+ version: string;
697
+ env?: {
698
+ node?: string | undefined;
699
+ } | undefined;
700
+ } | undefined;
701
+ }, {
702
+ type: "sapi" | "ssa" | "fsa" | "ss" | "fs" | "s" | "f" | "fp" | "slo" | "scoa" | "fcoa" | "seacft" | "serft" | "cls" | "seccft";
703
+ date: string;
704
+ ip: string;
705
+ user_agent: string;
706
+ isMobile: boolean;
707
+ description?: string | undefined;
708
+ connection?: string | undefined;
709
+ user_id?: string | undefined;
710
+ log_id?: string | undefined;
711
+ _id?: string | undefined;
712
+ details?: any;
713
+ user_name?: string | undefined;
714
+ connection_id?: string | undefined;
715
+ client_id?: string | undefined;
716
+ client_name?: string | undefined;
717
+ audience?: string | undefined;
718
+ scope?: string[] | undefined;
719
+ strategy?: string | undefined;
720
+ strategy_type?: string | undefined;
721
+ hostname?: string | undefined;
722
+ auth0_client?: {
723
+ name: string;
724
+ version: string;
725
+ env?: {
726
+ node?: string | undefined;
727
+ } | undefined;
728
+ } | undefined;
729
+ }>;
730
+ export type Log = z.infer<typeof logSchema>;
731
+ export type LogsResponse = Log & {
732
+ log_id: string;
733
+ _id: string;
734
+ };
735
+ export declare const applicationInsertSchema: z.ZodObject<{
736
+ id: z.ZodString;
737
+ name: z.ZodString;
738
+ allowed_web_origins: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
739
+ allowed_callback_urls: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
740
+ allowed_logout_urls: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
741
+ email_validation: z.ZodDefault<z.ZodEnum<[
742
+ "enabled",
743
+ "disabled",
744
+ "enforced"
745
+ ]>>;
746
+ client_secret: z.ZodDefault<z.ZodString>;
747
+ disable_sign_ups: z.ZodDefault<z.ZodBoolean>;
748
+ }, "strip", z.ZodTypeAny, {
749
+ name: string;
750
+ id: string;
751
+ allowed_web_origins: string;
752
+ allowed_callback_urls: string;
753
+ allowed_logout_urls: string;
754
+ email_validation: "enabled" | "disabled" | "enforced";
755
+ client_secret: string;
756
+ disable_sign_ups: boolean;
757
+ }, {
758
+ name: string;
759
+ id: string;
760
+ allowed_web_origins?: string | undefined;
761
+ allowed_callback_urls?: string | undefined;
762
+ allowed_logout_urls?: string | undefined;
763
+ email_validation?: "enabled" | "disabled" | "enforced" | undefined;
764
+ client_secret?: string | undefined;
765
+ disable_sign_ups?: boolean | undefined;
766
+ }>;
767
+ export type ApplicationInsert = z.infer<typeof applicationInsertSchema>;
768
+ export declare const applicationSchema: z.ZodObject<z.objectUtil.extendShape<{
769
+ created_at: z.ZodEffects<z.ZodString, string, string>;
770
+ updated_at: z.ZodEffects<z.ZodString, string, string>;
771
+ }, {
772
+ id: z.ZodString;
773
+ name: z.ZodString;
774
+ allowed_web_origins: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
775
+ allowed_callback_urls: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
776
+ allowed_logout_urls: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
777
+ email_validation: z.ZodDefault<z.ZodEnum<[
778
+ "enabled",
779
+ "disabled",
780
+ "enforced"
781
+ ]>>;
782
+ client_secret: z.ZodDefault<z.ZodString>;
783
+ disable_sign_ups: z.ZodDefault<z.ZodBoolean>;
1274
784
  }>, "strip", z.ZodTypeAny, {
1275
785
  created_at: string;
1276
786
  updated_at: string;
1277
- user_id: string;
1278
- email: string;
1279
- email_verified: boolean;
1280
- connection: string;
1281
- provider: string;
1282
- is_social: boolean;
1283
- login_count: number;
1284
- name?: string | undefined;
1285
- username?: string | undefined;
1286
- given_name?: string | undefined;
1287
- family_name?: string | undefined;
1288
- profileData?: string | undefined;
1289
- nickname?: string | undefined;
1290
- picture?: string | undefined;
1291
- locale?: string | undefined;
1292
- linked_to?: string | undefined;
1293
- verify_email?: boolean | undefined;
1294
- last_ip?: string | undefined;
1295
- last_login?: string | undefined;
1296
- identities?: {
1297
- user_id: string;
1298
- connection: string;
1299
- provider: string;
1300
- isSocial: boolean;
1301
- refresh_token?: string | undefined;
1302
- access_token?: string | undefined;
1303
- access_token_secret?: string | undefined;
1304
- profileData?: z.objectOutputType<{
1305
- email: z.ZodOptional<z.ZodString>;
1306
- email_verified: z.ZodOptional<z.ZodBoolean>;
1307
- name: z.ZodOptional<z.ZodString>;
1308
- username: z.ZodOptional<z.ZodString>;
1309
- given_name: z.ZodOptional<z.ZodString>;
1310
- phone_number: z.ZodOptional<z.ZodString>;
1311
- phone_verified: z.ZodOptional<z.ZodBoolean>;
1312
- family_name: z.ZodOptional<z.ZodString>;
1313
- }, z.ZodAny, "strip"> | undefined;
1314
- }[] | undefined;
787
+ name: string;
788
+ id: string;
789
+ allowed_web_origins: string;
790
+ allowed_callback_urls: string;
791
+ allowed_logout_urls: string;
792
+ email_validation: "enabled" | "disabled" | "enforced";
793
+ client_secret: string;
794
+ disable_sign_ups: boolean;
1315
795
  }, {
1316
796
  created_at: string;
1317
797
  updated_at: string;
1318
- user_id: string;
1319
- email: string;
1320
- is_social: boolean;
1321
- login_count: number;
1322
- name?: string | undefined;
1323
- username?: string | undefined;
1324
- email_verified?: boolean | undefined;
1325
- given_name?: string | undefined;
1326
- family_name?: string | undefined;
1327
- connection?: string | undefined;
1328
- provider?: string | undefined;
1329
- profileData?: string | undefined;
1330
- nickname?: string | undefined;
1331
- picture?: string | undefined;
1332
- locale?: string | undefined;
1333
- linked_to?: string | undefined;
1334
- verify_email?: boolean | undefined;
1335
- last_ip?: string | undefined;
1336
- last_login?: string | undefined;
1337
- identities?: {
1338
- user_id: string;
1339
- connection: string;
1340
- provider: string;
1341
- isSocial: boolean;
1342
- refresh_token?: string | undefined;
1343
- access_token?: string | undefined;
1344
- access_token_secret?: string | undefined;
1345
- profileData?: z.objectInputType<{
1346
- email: z.ZodOptional<z.ZodString>;
1347
- email_verified: z.ZodOptional<z.ZodBoolean>;
1348
- name: z.ZodOptional<z.ZodString>;
1349
- username: z.ZodOptional<z.ZodString>;
1350
- given_name: z.ZodOptional<z.ZodString>;
1351
- phone_number: z.ZodOptional<z.ZodString>;
1352
- phone_verified: z.ZodOptional<z.ZodBoolean>;
1353
- family_name: z.ZodOptional<z.ZodString>;
1354
- }, z.ZodAny, "strip"> | undefined;
1355
- }[] | undefined;
1356
- }>;
1357
- export declare const totalsSchema: z.ZodObject<{
1358
- start: z.ZodNumber;
1359
- limit: z.ZodNumber;
1360
- length: z.ZodNumber;
1361
- }, "strip", z.ZodTypeAny, {
1362
- length: number;
1363
- start: number;
1364
- limit: number;
1365
- }, {
1366
- length: number;
1367
- start: number;
1368
- limit: number;
798
+ name: string;
799
+ id: string;
800
+ allowed_web_origins?: string | undefined;
801
+ allowed_callback_urls?: string | undefined;
802
+ allowed_logout_urls?: string | undefined;
803
+ email_validation?: "enabled" | "disabled" | "enforced" | undefined;
804
+ client_secret?: string | undefined;
805
+ disable_sign_ups?: boolean | undefined;
1369
806
  }>;
1370
- export interface Totals {
1371
- start: number;
1372
- limit: number;
1373
- length: number;
807
+ export type Application = z.infer<typeof applicationSchema>;
808
+ export declare enum AuthorizationResponseType {
809
+ TOKEN = "token",
810
+ TOKEN_ID_TOKEN = "token id_token",
811
+ CODE = "code"
1374
812
  }
1375
- export interface PostUsersBody extends BaseUser {
1376
- password?: string;
1377
- verify_email?: boolean;
1378
- username?: string;
1379
- connection?: string;
1380
- email_verified?: boolean;
813
+ export declare enum AuthorizationResponseMode {
814
+ QUERY = "query",
815
+ FRAGMENT = "fragment",
816
+ FORM_POST = "form_post",
817
+ WEB_MESSAGE = "web_message"
1381
818
  }
1382
- export declare const userResponseSchema: z.ZodObject<z.objectUtil.extendShape<{
1383
- email: z.ZodOptional<z.ZodString>;
1384
- username: z.ZodOptional<z.ZodString>;
1385
- given_name: z.ZodOptional<z.ZodString>;
1386
- family_name: z.ZodOptional<z.ZodString>;
1387
- nickname: z.ZodOptional<z.ZodString>;
1388
- name: z.ZodOptional<z.ZodString>;
1389
- picture: z.ZodOptional<z.ZodString>;
1390
- locale: z.ZodOptional<z.ZodString>;
1391
- linked_to: z.ZodOptional<z.ZodString>;
1392
- profileData: z.ZodOptional<z.ZodString>;
1393
- user_id: z.ZodOptional<z.ZodString>;
1394
- }, {
1395
- email: z.ZodString;
1396
- login_count: z.ZodNumber;
1397
- multifactor: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1398
- last_ip: z.ZodOptional<z.ZodString>;
1399
- last_login: z.ZodOptional<z.ZodString>;
1400
- user_id: z.ZodString;
1401
- }>, "strip", z.ZodAny, z.objectOutputType<z.objectUtil.extendShape<{
1402
- email: z.ZodOptional<z.ZodString>;
819
+ export declare enum CodeChallengeMethod {
820
+ S265 = "S256",
821
+ plain = "plain"
822
+ }
823
+ export declare const authParamsSchema: z.ZodObject<{
824
+ client_id: z.ZodString;
825
+ vendor_id: z.ZodOptional<z.ZodString>;
826
+ response_type: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseType>>;
827
+ response_mode: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseMode>>;
828
+ redirect_uri: z.ZodOptional<z.ZodString>;
829
+ audience: z.ZodOptional<z.ZodString>;
830
+ state: z.ZodOptional<z.ZodString>;
831
+ nonce: z.ZodOptional<z.ZodString>;
832
+ scope: z.ZodOptional<z.ZodString>;
833
+ code_challenge_method: z.ZodOptional<z.ZodNativeEnum<typeof CodeChallengeMethod>>;
834
+ code_challenge: z.ZodOptional<z.ZodString>;
1403
835
  username: z.ZodOptional<z.ZodString>;
1404
- given_name: z.ZodOptional<z.ZodString>;
1405
- family_name: z.ZodOptional<z.ZodString>;
1406
- nickname: z.ZodOptional<z.ZodString>;
1407
- name: z.ZodOptional<z.ZodString>;
1408
- picture: z.ZodOptional<z.ZodString>;
1409
- locale: z.ZodOptional<z.ZodString>;
1410
- linked_to: z.ZodOptional<z.ZodString>;
1411
- profileData: z.ZodOptional<z.ZodString>;
1412
- user_id: z.ZodOptional<z.ZodString>;
836
+ }, "strip", z.ZodTypeAny, {
837
+ client_id: string;
838
+ username?: string | undefined;
839
+ audience?: string | undefined;
840
+ scope?: string | undefined;
841
+ vendor_id?: string | undefined;
842
+ response_type?: AuthorizationResponseType | undefined;
843
+ response_mode?: AuthorizationResponseMode | undefined;
844
+ redirect_uri?: string | undefined;
845
+ state?: string | undefined;
846
+ nonce?: string | undefined;
847
+ code_challenge_method?: CodeChallengeMethod | undefined;
848
+ code_challenge?: string | undefined;
1413
849
  }, {
1414
- email: z.ZodString;
1415
- login_count: z.ZodNumber;
1416
- multifactor: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1417
- last_ip: z.ZodOptional<z.ZodString>;
1418
- last_login: z.ZodOptional<z.ZodString>;
850
+ client_id: string;
851
+ username?: string | undefined;
852
+ audience?: string | undefined;
853
+ scope?: string | undefined;
854
+ vendor_id?: string | undefined;
855
+ response_type?: AuthorizationResponseType | undefined;
856
+ response_mode?: AuthorizationResponseMode | undefined;
857
+ redirect_uri?: string | undefined;
858
+ state?: string | undefined;
859
+ nonce?: string | undefined;
860
+ code_challenge_method?: CodeChallengeMethod | undefined;
861
+ code_challenge?: string | undefined;
862
+ }>;
863
+ export type AuthParams = z.infer<typeof authParamsSchema>;
864
+ export declare const authenticationCodeSchema: z.ZodObject<{
865
+ authParams: z.ZodObject<{
866
+ client_id: z.ZodString;
867
+ vendor_id: z.ZodOptional<z.ZodString>;
868
+ response_type: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseType>>;
869
+ response_mode: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseMode>>;
870
+ redirect_uri: z.ZodOptional<z.ZodString>;
871
+ audience: z.ZodOptional<z.ZodString>;
872
+ state: z.ZodOptional<z.ZodString>;
873
+ nonce: z.ZodOptional<z.ZodString>;
874
+ scope: z.ZodOptional<z.ZodString>;
875
+ code_challenge_method: z.ZodOptional<z.ZodNativeEnum<typeof CodeChallengeMethod>>;
876
+ code_challenge: z.ZodOptional<z.ZodString>;
877
+ username: z.ZodOptional<z.ZodString>;
878
+ }, "strip", z.ZodTypeAny, {
879
+ client_id: string;
880
+ username?: string | undefined;
881
+ audience?: string | undefined;
882
+ scope?: string | undefined;
883
+ vendor_id?: string | undefined;
884
+ response_type?: AuthorizationResponseType | undefined;
885
+ response_mode?: AuthorizationResponseMode | undefined;
886
+ redirect_uri?: string | undefined;
887
+ state?: string | undefined;
888
+ nonce?: string | undefined;
889
+ code_challenge_method?: CodeChallengeMethod | undefined;
890
+ code_challenge?: string | undefined;
891
+ }, {
892
+ client_id: string;
893
+ username?: string | undefined;
894
+ audience?: string | undefined;
895
+ scope?: string | undefined;
896
+ vendor_id?: string | undefined;
897
+ response_type?: AuthorizationResponseType | undefined;
898
+ response_mode?: AuthorizationResponseMode | undefined;
899
+ redirect_uri?: string | undefined;
900
+ state?: string | undefined;
901
+ nonce?: string | undefined;
902
+ code_challenge_method?: CodeChallengeMethod | undefined;
903
+ code_challenge?: string | undefined;
904
+ }>;
905
+ nonce: z.ZodOptional<z.ZodString>;
906
+ code: z.ZodString;
1419
907
  user_id: z.ZodString;
1420
- }>, z.ZodAny, "strip">, z.objectInputType<z.objectUtil.extendShape<{
1421
- email: z.ZodOptional<z.ZodString>;
1422
- username: z.ZodOptional<z.ZodString>;
1423
- given_name: z.ZodOptional<z.ZodString>;
1424
- family_name: z.ZodOptional<z.ZodString>;
1425
- nickname: z.ZodOptional<z.ZodString>;
1426
- name: z.ZodOptional<z.ZodString>;
1427
- picture: z.ZodOptional<z.ZodString>;
1428
- locale: z.ZodOptional<z.ZodString>;
1429
- linked_to: z.ZodOptional<z.ZodString>;
1430
- profileData: z.ZodOptional<z.ZodString>;
1431
- user_id: z.ZodOptional<z.ZodString>;
908
+ created_at: z.ZodString;
909
+ expires_at: z.ZodString;
910
+ used_at: z.ZodOptional<z.ZodString>;
911
+ }, "strip", z.ZodTypeAny, {
912
+ code: string;
913
+ created_at: string;
914
+ user_id: string;
915
+ authParams: {
916
+ client_id: string;
917
+ username?: string | undefined;
918
+ audience?: string | undefined;
919
+ scope?: string | undefined;
920
+ vendor_id?: string | undefined;
921
+ response_type?: AuthorizationResponseType | undefined;
922
+ response_mode?: AuthorizationResponseMode | undefined;
923
+ redirect_uri?: string | undefined;
924
+ state?: string | undefined;
925
+ nonce?: string | undefined;
926
+ code_challenge_method?: CodeChallengeMethod | undefined;
927
+ code_challenge?: string | undefined;
928
+ };
929
+ expires_at: string;
930
+ nonce?: string | undefined;
931
+ used_at?: string | undefined;
1432
932
  }, {
1433
- email: z.ZodString;
1434
- login_count: z.ZodNumber;
1435
- multifactor: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1436
- last_ip: z.ZodOptional<z.ZodString>;
1437
- last_login: z.ZodOptional<z.ZodString>;
1438
- user_id: z.ZodString;
1439
- }>, z.ZodAny, "strip">>;
1440
- export type UserResponse = z.infer<typeof userResponseSchema>;
1441
- export declare enum LogTypes {
1442
- SUCCESS_API_OPERATION = "sapi",
1443
- SUCCESS_SILENT_AUTH = "ssa",
1444
- FAILED_SILENT_AUTH = "fsa",
1445
- SUCCESS_SIGNUP = "ss",
1446
- FAILED_SIGNUP = "fs",
1447
- SUCCESS_LOGIN = "s",
1448
- FAILED_LOGIN = "f",
1449
- FAILED_LOGIN_INCORRECT_PASSWORD = "fp",
1450
- SUCCESS_LOGOUT = "slo",
1451
- SUCCESS_CROSS_ORIGIN_AUTHENTICATION = "scoa",
1452
- FAILED_CROSS_ORIGIN_AUTHENTICATION = "fcoa",
1453
- SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN = "seacft",
1454
- SUCCESS_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN = "serft",
1455
- CODE_LINK_SENT = "cls",
1456
- NOT_IMPLEMENTED_1 = "seccft"
1457
- }
1458
- declare const LogType: z.ZodEnum<[
1459
- "sapi",
1460
- "ssa",
1461
- "fsa",
1462
- "ss",
1463
- "ssa",
1464
- "fs",
1465
- "s",
1466
- "f",
1467
- "fp",
1468
- "slo",
1469
- "scoa",
1470
- "fcoa",
1471
- "seccft",
1472
- "cls",
1473
- "seacft",
1474
- "serft"
1475
- ]>;
1476
- type LogType$1 = z.infer<typeof LogType>;
1477
- export declare const Auth0Client: z.ZodObject<{
1478
- name: z.ZodString;
1479
- version: z.ZodString;
1480
- env: z.ZodOptional<z.ZodObject<{
1481
- node: z.ZodOptional<z.ZodString>;
933
+ code: string;
934
+ created_at: string;
935
+ user_id: string;
936
+ authParams: {
937
+ client_id: string;
938
+ username?: string | undefined;
939
+ audience?: string | undefined;
940
+ scope?: string | undefined;
941
+ vendor_id?: string | undefined;
942
+ response_type?: AuthorizationResponseType | undefined;
943
+ response_mode?: AuthorizationResponseMode | undefined;
944
+ redirect_uri?: string | undefined;
945
+ state?: string | undefined;
946
+ nonce?: string | undefined;
947
+ code_challenge_method?: CodeChallengeMethod | undefined;
948
+ code_challenge?: string | undefined;
949
+ };
950
+ expires_at: string;
951
+ nonce?: string | undefined;
952
+ used_at?: string | undefined;
953
+ }>;
954
+ export type AuthenticationCode = z.infer<typeof authenticationCodeSchema>;
955
+ export declare const brandingSchema: z.ZodObject<{
956
+ colors: z.ZodOptional<z.ZodObject<{
957
+ primary: z.ZodString;
958
+ page_background: z.ZodOptional<z.ZodObject<{
959
+ type: z.ZodOptional<z.ZodString>;
960
+ start: z.ZodOptional<z.ZodString>;
961
+ end: z.ZodOptional<z.ZodString>;
962
+ angle_deg: z.ZodOptional<z.ZodNumber>;
963
+ }, "strip", z.ZodTypeAny, {
964
+ start?: string | undefined;
965
+ type?: string | undefined;
966
+ end?: string | undefined;
967
+ angle_deg?: number | undefined;
968
+ }, {
969
+ start?: string | undefined;
970
+ type?: string | undefined;
971
+ end?: string | undefined;
972
+ angle_deg?: number | undefined;
973
+ }>>;
1482
974
  }, "strip", z.ZodTypeAny, {
1483
- node?: string | undefined;
975
+ primary: string;
976
+ page_background?: {
977
+ start?: string | undefined;
978
+ type?: string | undefined;
979
+ end?: string | undefined;
980
+ angle_deg?: number | undefined;
981
+ } | undefined;
1484
982
  }, {
1485
- node?: string | undefined;
983
+ primary: string;
984
+ page_background?: {
985
+ start?: string | undefined;
986
+ type?: string | undefined;
987
+ end?: string | undefined;
988
+ angle_deg?: number | undefined;
989
+ } | undefined;
990
+ }>>;
991
+ logo_url: z.ZodOptional<z.ZodString>;
992
+ favicon_url: z.ZodOptional<z.ZodString>;
993
+ font: z.ZodOptional<z.ZodObject<{
994
+ url: z.ZodString;
995
+ }, "strip", z.ZodTypeAny, {
996
+ url: string;
997
+ }, {
998
+ url: string;
1486
999
  }>>;
1487
1000
  }, "strip", z.ZodTypeAny, {
1488
- name: string;
1489
- version: string;
1490
- env?: {
1491
- node?: string | undefined;
1001
+ colors?: {
1002
+ primary: string;
1003
+ page_background?: {
1004
+ start?: string | undefined;
1005
+ type?: string | undefined;
1006
+ end?: string | undefined;
1007
+ angle_deg?: number | undefined;
1008
+ } | undefined;
1009
+ } | undefined;
1010
+ logo_url?: string | undefined;
1011
+ favicon_url?: string | undefined;
1012
+ font?: {
1013
+ url: string;
1492
1014
  } | undefined;
1493
1015
  }, {
1494
- name: string;
1495
- version: string;
1496
- env?: {
1497
- node?: string | undefined;
1016
+ colors?: {
1017
+ primary: string;
1018
+ page_background?: {
1019
+ start?: string | undefined;
1020
+ type?: string | undefined;
1021
+ end?: string | undefined;
1022
+ angle_deg?: number | undefined;
1023
+ } | undefined;
1024
+ } | undefined;
1025
+ logo_url?: string | undefined;
1026
+ favicon_url?: string | undefined;
1027
+ font?: {
1028
+ url: string;
1498
1029
  } | undefined;
1499
1030
  }>;
1500
- export declare const logSchema: z.ZodObject<{
1501
- type: z.ZodEnum<[
1502
- "sapi",
1503
- "ssa",
1504
- "fsa",
1505
- "ss",
1506
- "ssa",
1507
- "fs",
1508
- "s",
1509
- "f",
1510
- "fp",
1511
- "slo",
1512
- "scoa",
1513
- "fcoa",
1514
- "seccft",
1515
- "cls",
1516
- "seacft",
1517
- "serft"
1518
- ]>;
1519
- date: z.ZodString;
1520
- description: z.ZodOptional<z.ZodString>;
1521
- log_id: z.ZodOptional<z.ZodString>;
1522
- _id: z.ZodOptional<z.ZodString>;
1523
- ip: z.ZodString;
1524
- user_agent: z.ZodString;
1525
- details: z.ZodOptional<z.ZodAny>;
1526
- isMobile: z.ZodBoolean;
1527
- user_id: z.ZodOptional<z.ZodString>;
1528
- user_name: z.ZodOptional<z.ZodString>;
1529
- connection: z.ZodOptional<z.ZodString>;
1530
- connection_id: z.ZodOptional<z.ZodString>;
1531
- client_id: z.ZodOptional<z.ZodString>;
1532
- client_name: z.ZodOptional<z.ZodString>;
1533
- audience: z.ZodOptional<z.ZodString>;
1534
- scope: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1535
- strategy: z.ZodOptional<z.ZodString>;
1536
- strategy_type: z.ZodOptional<z.ZodString>;
1537
- hostname: z.ZodOptional<z.ZodString>;
1538
- auth0_client: z.ZodOptional<z.ZodObject<{
1031
+ export type Branding = z.infer<typeof brandingSchema>;
1032
+ export declare const ClientSchema: z.ZodObject<z.objectUtil.extendShape<{
1033
+ id: z.ZodString;
1034
+ name: z.ZodString;
1035
+ domains: z.ZodArray<z.ZodObject<{
1036
+ domain: z.ZodString;
1037
+ dkim_private_key: z.ZodOptional<z.ZodString>;
1038
+ dkim_public_key: z.ZodOptional<z.ZodString>;
1039
+ email_api_key: z.ZodOptional<z.ZodString>;
1040
+ email_service: z.ZodOptional<z.ZodUnion<[
1041
+ z.ZodLiteral<"mailgun">,
1042
+ z.ZodLiteral<"mailchannels">
1043
+ ]>>;
1044
+ }, "strip", z.ZodTypeAny, {
1045
+ domain: string;
1046
+ dkim_private_key?: string | undefined;
1047
+ dkim_public_key?: string | undefined;
1048
+ email_api_key?: string | undefined;
1049
+ email_service?: "mailgun" | "mailchannels" | undefined;
1050
+ }, {
1051
+ domain: string;
1052
+ dkim_private_key?: string | undefined;
1053
+ dkim_public_key?: string | undefined;
1054
+ email_api_key?: string | undefined;
1055
+ email_service?: "mailgun" | "mailchannels" | undefined;
1056
+ }>, "many">;
1057
+ allowed_callback_urls: z.ZodArray<z.ZodString, "many">;
1058
+ allowed_logout_urls: z.ZodArray<z.ZodString, "many">;
1059
+ allowed_web_origins: z.ZodArray<z.ZodString, "many">;
1060
+ email_validation: z.ZodUnion<[
1061
+ z.ZodLiteral<"enabled">,
1062
+ z.ZodLiteral<"disabled">,
1063
+ z.ZodLiteral<"enforced">
1064
+ ]>;
1065
+ tenant_id: z.ZodString;
1066
+ client_secret: z.ZodString;
1067
+ disable_sign_ups: z.ZodBoolean;
1068
+ tenant: z.ZodObject<{
1539
1069
  name: z.ZodString;
1540
- version: z.ZodString;
1541
- env: z.ZodOptional<z.ZodObject<{
1542
- node: z.ZodOptional<z.ZodString>;
1543
- }, "strip", z.ZodTypeAny, {
1544
- node?: string | undefined;
1545
- }, {
1546
- node?: string | undefined;
1547
- }>>;
1070
+ audience: z.ZodOptional<z.ZodString>;
1071
+ logo: z.ZodOptional<z.ZodString>;
1072
+ primary_color: z.ZodOptional<z.ZodString>;
1073
+ secondary_color: z.ZodOptional<z.ZodString>;
1074
+ sender_email: z.ZodString;
1075
+ sender_name: z.ZodString;
1076
+ support_url: z.ZodOptional<z.ZodString>;
1077
+ language: z.ZodOptional<z.ZodString>;
1548
1078
  }, "strip", z.ZodTypeAny, {
1549
1079
  name: string;
1550
- version: string;
1551
- env?: {
1552
- node?: string | undefined;
1553
- } | undefined;
1080
+ sender_email: string;
1081
+ sender_name: string;
1082
+ audience?: string | undefined;
1083
+ logo?: string | undefined;
1084
+ primary_color?: string | undefined;
1085
+ secondary_color?: string | undefined;
1086
+ support_url?: string | undefined;
1087
+ language?: string | undefined;
1554
1088
  }, {
1555
1089
  name: string;
1556
- version: string;
1557
- env?: {
1558
- node?: string | undefined;
1559
- } | undefined;
1560
- }>>;
1561
- }, "strip", z.ZodTypeAny, {
1562
- type: "sapi" | "ssa" | "fsa" | "ss" | "fs" | "s" | "f" | "fp" | "slo" | "scoa" | "fcoa" | "seacft" | "serft" | "cls" | "seccft";
1563
- date: string;
1564
- ip: string;
1565
- user_agent: string;
1566
- isMobile: boolean;
1567
- description?: string | undefined;
1568
- client_id?: string | undefined;
1569
- audience?: string | undefined;
1570
- scope?: string[] | undefined;
1571
- user_id?: string | undefined;
1572
- connection?: string | undefined;
1573
- log_id?: string | undefined;
1574
- _id?: string | undefined;
1575
- details?: any;
1576
- user_name?: string | undefined;
1577
- connection_id?: string | undefined;
1578
- client_name?: string | undefined;
1579
- strategy?: string | undefined;
1580
- strategy_type?: string | undefined;
1581
- hostname?: string | undefined;
1582
- auth0_client?: {
1090
+ sender_email: string;
1091
+ sender_name: string;
1092
+ audience?: string | undefined;
1093
+ logo?: string | undefined;
1094
+ primary_color?: string | undefined;
1095
+ secondary_color?: string | undefined;
1096
+ support_url?: string | undefined;
1097
+ language?: string | undefined;
1098
+ }>;
1099
+ }, {
1100
+ connections: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
1101
+ id: z.ZodString;
1102
+ created_at: z.ZodEffects<z.ZodString, string, string>;
1103
+ updated_at: z.ZodEffects<z.ZodString, string, string>;
1104
+ }, {
1105
+ id: z.ZodOptional<z.ZodString>;
1106
+ name: z.ZodString;
1107
+ client_id: z.ZodOptional<z.ZodString>;
1108
+ client_secret: z.ZodOptional<z.ZodString>;
1109
+ authorization_endpoint: z.ZodOptional<z.ZodString>;
1110
+ response_type: z.ZodOptional<z.ZodType<AuthorizationResponseType, z.ZodTypeDef, AuthorizationResponseType>>;
1111
+ response_mode: z.ZodOptional<z.ZodType<AuthorizationResponseMode, z.ZodTypeDef, AuthorizationResponseMode>>;
1112
+ private_key: z.ZodOptional<z.ZodString>;
1113
+ kid: z.ZodOptional<z.ZodString>;
1114
+ team_id: z.ZodOptional<z.ZodString>;
1115
+ token_endpoint: z.ZodOptional<z.ZodString>;
1116
+ token_exchange_basic_auth: z.ZodOptional<z.ZodBoolean>;
1117
+ userinfo_endpoint: z.ZodOptional<z.ZodString>;
1118
+ scope: z.ZodOptional<z.ZodString>;
1119
+ }>, "strip", z.ZodTypeAny, {
1120
+ created_at: string;
1121
+ updated_at: string;
1583
1122
  name: string;
1584
- version: string;
1585
- env?: {
1586
- node?: string | undefined;
1587
- } | undefined;
1588
- } | undefined;
1123
+ client_id?: string | undefined;
1124
+ scope?: string | undefined;
1125
+ id?: string | undefined;
1126
+ client_secret?: string | undefined;
1127
+ response_type?: AuthorizationResponseType | undefined;
1128
+ response_mode?: AuthorizationResponseMode | undefined;
1129
+ authorization_endpoint?: string | undefined;
1130
+ private_key?: string | undefined;
1131
+ kid?: string | undefined;
1132
+ team_id?: string | undefined;
1133
+ token_endpoint?: string | undefined;
1134
+ token_exchange_basic_auth?: boolean | undefined;
1135
+ userinfo_endpoint?: string | undefined;
1136
+ }, {
1137
+ created_at: string;
1138
+ updated_at: string;
1139
+ name: string;
1140
+ client_id?: string | undefined;
1141
+ scope?: string | undefined;
1142
+ id?: string | undefined;
1143
+ client_secret?: string | undefined;
1144
+ response_type?: AuthorizationResponseType | undefined;
1145
+ response_mode?: AuthorizationResponseMode | undefined;
1146
+ authorization_endpoint?: string | undefined;
1147
+ private_key?: string | undefined;
1148
+ kid?: string | undefined;
1149
+ team_id?: string | undefined;
1150
+ token_endpoint?: string | undefined;
1151
+ token_exchange_basic_auth?: boolean | undefined;
1152
+ userinfo_endpoint?: string | undefined;
1153
+ }>, "many">;
1154
+ }>, "strip", z.ZodTypeAny, {
1155
+ name: string;
1156
+ id: string;
1157
+ allowed_web_origins: string[];
1158
+ allowed_callback_urls: string[];
1159
+ allowed_logout_urls: string[];
1160
+ email_validation: "enabled" | "disabled" | "enforced";
1161
+ client_secret: string;
1162
+ disable_sign_ups: boolean;
1163
+ domains: {
1164
+ domain: string;
1165
+ dkim_private_key?: string | undefined;
1166
+ dkim_public_key?: string | undefined;
1167
+ email_api_key?: string | undefined;
1168
+ email_service?: "mailgun" | "mailchannels" | undefined;
1169
+ }[];
1170
+ tenant_id: string;
1171
+ tenant: {
1172
+ name: string;
1173
+ sender_email: string;
1174
+ sender_name: string;
1175
+ audience?: string | undefined;
1176
+ logo?: string | undefined;
1177
+ primary_color?: string | undefined;
1178
+ secondary_color?: string | undefined;
1179
+ support_url?: string | undefined;
1180
+ language?: string | undefined;
1181
+ };
1182
+ connections: {
1183
+ created_at: string;
1184
+ updated_at: string;
1185
+ name: string;
1186
+ client_id?: string | undefined;
1187
+ scope?: string | undefined;
1188
+ id?: string | undefined;
1189
+ client_secret?: string | undefined;
1190
+ response_type?: AuthorizationResponseType | undefined;
1191
+ response_mode?: AuthorizationResponseMode | undefined;
1192
+ authorization_endpoint?: string | undefined;
1193
+ private_key?: string | undefined;
1194
+ kid?: string | undefined;
1195
+ team_id?: string | undefined;
1196
+ token_endpoint?: string | undefined;
1197
+ token_exchange_basic_auth?: boolean | undefined;
1198
+ userinfo_endpoint?: string | undefined;
1199
+ }[];
1589
1200
  }, {
1590
- type: "sapi" | "ssa" | "fsa" | "ss" | "fs" | "s" | "f" | "fp" | "slo" | "scoa" | "fcoa" | "seacft" | "serft" | "cls" | "seccft";
1591
- date: string;
1592
- ip: string;
1593
- user_agent: string;
1594
- isMobile: boolean;
1595
- description?: string | undefined;
1596
- client_id?: string | undefined;
1597
- audience?: string | undefined;
1598
- scope?: string[] | undefined;
1599
- user_id?: string | undefined;
1600
- connection?: string | undefined;
1601
- log_id?: string | undefined;
1602
- _id?: string | undefined;
1603
- details?: any;
1604
- user_name?: string | undefined;
1605
- connection_id?: string | undefined;
1606
- client_name?: string | undefined;
1607
- strategy?: string | undefined;
1608
- strategy_type?: string | undefined;
1609
- hostname?: string | undefined;
1610
- auth0_client?: {
1201
+ name: string;
1202
+ id: string;
1203
+ allowed_web_origins: string[];
1204
+ allowed_callback_urls: string[];
1205
+ allowed_logout_urls: string[];
1206
+ email_validation: "enabled" | "disabled" | "enforced";
1207
+ client_secret: string;
1208
+ disable_sign_ups: boolean;
1209
+ domains: {
1210
+ domain: string;
1211
+ dkim_private_key?: string | undefined;
1212
+ dkim_public_key?: string | undefined;
1213
+ email_api_key?: string | undefined;
1214
+ email_service?: "mailgun" | "mailchannels" | undefined;
1215
+ }[];
1216
+ tenant_id: string;
1217
+ tenant: {
1611
1218
  name: string;
1612
- version: string;
1613
- env?: {
1614
- node?: string | undefined;
1615
- } | undefined;
1616
- } | undefined;
1219
+ sender_email: string;
1220
+ sender_name: string;
1221
+ audience?: string | undefined;
1222
+ logo?: string | undefined;
1223
+ primary_color?: string | undefined;
1224
+ secondary_color?: string | undefined;
1225
+ support_url?: string | undefined;
1226
+ language?: string | undefined;
1227
+ };
1228
+ connections: {
1229
+ created_at: string;
1230
+ updated_at: string;
1231
+ name: string;
1232
+ client_id?: string | undefined;
1233
+ scope?: string | undefined;
1234
+ id?: string | undefined;
1235
+ client_secret?: string | undefined;
1236
+ response_type?: AuthorizationResponseType | undefined;
1237
+ response_mode?: AuthorizationResponseMode | undefined;
1238
+ authorization_endpoint?: string | undefined;
1239
+ private_key?: string | undefined;
1240
+ kid?: string | undefined;
1241
+ team_id?: string | undefined;
1242
+ token_endpoint?: string | undefined;
1243
+ token_exchange_basic_auth?: boolean | undefined;
1244
+ userinfo_endpoint?: string | undefined;
1245
+ }[];
1617
1246
  }>;
1618
- export type Log = z.infer<typeof logSchema>;
1619
- export type LogsResponse = Log & {
1620
- log_id: string;
1621
- _id: string;
1622
- };
1623
- export declare const brandingSchema: z.ZodObject<{
1624
- colors: z.ZodOptional<z.ZodObject<{
1625
- primary: z.ZodString;
1626
- page_background: z.ZodOptional<z.ZodObject<{
1627
- type: z.ZodOptional<z.ZodString>;
1628
- start: z.ZodOptional<z.ZodString>;
1629
- end: z.ZodOptional<z.ZodString>;
1630
- angle_deg: z.ZodOptional<z.ZodNumber>;
1631
- }, "strip", z.ZodTypeAny, {
1632
- type?: string | undefined;
1633
- start?: string | undefined;
1634
- end?: string | undefined;
1635
- angle_deg?: number | undefined;
1636
- }, {
1637
- type?: string | undefined;
1638
- start?: string | undefined;
1639
- end?: string | undefined;
1640
- angle_deg?: number | undefined;
1641
- }>>;
1247
+ export declare const PartialClientSchema: z.ZodObject<z.objectUtil.extendShape<{
1248
+ id: z.ZodString;
1249
+ name: z.ZodString;
1250
+ domains: z.ZodArray<z.ZodObject<{
1251
+ domain: z.ZodString;
1252
+ dkim_private_key: z.ZodOptional<z.ZodString>;
1253
+ dkim_public_key: z.ZodOptional<z.ZodString>;
1254
+ email_api_key: z.ZodOptional<z.ZodString>;
1255
+ email_service: z.ZodOptional<z.ZodUnion<[
1256
+ z.ZodLiteral<"mailgun">,
1257
+ z.ZodLiteral<"mailchannels">
1258
+ ]>>;
1642
1259
  }, "strip", z.ZodTypeAny, {
1643
- primary: string;
1644
- page_background?: {
1645
- type?: string | undefined;
1646
- start?: string | undefined;
1647
- end?: string | undefined;
1648
- angle_deg?: number | undefined;
1649
- } | undefined;
1260
+ domain: string;
1261
+ dkim_private_key?: string | undefined;
1262
+ dkim_public_key?: string | undefined;
1263
+ email_api_key?: string | undefined;
1264
+ email_service?: "mailgun" | "mailchannels" | undefined;
1650
1265
  }, {
1651
- primary: string;
1652
- page_background?: {
1653
- type?: string | undefined;
1654
- start?: string | undefined;
1655
- end?: string | undefined;
1656
- angle_deg?: number | undefined;
1657
- } | undefined;
1658
- }>>;
1659
- logo_url: z.ZodOptional<z.ZodString>;
1660
- favicon_url: z.ZodOptional<z.ZodString>;
1661
- font: z.ZodOptional<z.ZodObject<{
1662
- url: z.ZodString;
1266
+ domain: string;
1267
+ dkim_private_key?: string | undefined;
1268
+ dkim_public_key?: string | undefined;
1269
+ email_api_key?: string | undefined;
1270
+ email_service?: "mailgun" | "mailchannels" | undefined;
1271
+ }>, "many">;
1272
+ allowed_callback_urls: z.ZodArray<z.ZodString, "many">;
1273
+ allowed_logout_urls: z.ZodArray<z.ZodString, "many">;
1274
+ allowed_web_origins: z.ZodArray<z.ZodString, "many">;
1275
+ email_validation: z.ZodUnion<[
1276
+ z.ZodLiteral<"enabled">,
1277
+ z.ZodLiteral<"disabled">,
1278
+ z.ZodLiteral<"enforced">
1279
+ ]>;
1280
+ tenant_id: z.ZodString;
1281
+ client_secret: z.ZodString;
1282
+ disable_sign_ups: z.ZodBoolean;
1283
+ tenant: z.ZodObject<{
1284
+ name: z.ZodString;
1285
+ audience: z.ZodOptional<z.ZodString>;
1286
+ logo: z.ZodOptional<z.ZodString>;
1287
+ primary_color: z.ZodOptional<z.ZodString>;
1288
+ secondary_color: z.ZodOptional<z.ZodString>;
1289
+ sender_email: z.ZodString;
1290
+ sender_name: z.ZodString;
1291
+ support_url: z.ZodOptional<z.ZodString>;
1292
+ language: z.ZodOptional<z.ZodString>;
1663
1293
  }, "strip", z.ZodTypeAny, {
1664
- url: string;
1294
+ name: string;
1295
+ sender_email: string;
1296
+ sender_name: string;
1297
+ audience?: string | undefined;
1298
+ logo?: string | undefined;
1299
+ primary_color?: string | undefined;
1300
+ secondary_color?: string | undefined;
1301
+ support_url?: string | undefined;
1302
+ language?: string | undefined;
1665
1303
  }, {
1666
- url: string;
1667
- }>>;
1304
+ name: string;
1305
+ sender_email: string;
1306
+ sender_name: string;
1307
+ audience?: string | undefined;
1308
+ logo?: string | undefined;
1309
+ primary_color?: string | undefined;
1310
+ secondary_color?: string | undefined;
1311
+ support_url?: string | undefined;
1312
+ language?: string | undefined;
1313
+ }>;
1314
+ }, {
1315
+ connections: z.ZodArray<z.ZodObject<{
1316
+ created_at: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1317
+ updated_at: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1318
+ id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1319
+ name: z.ZodOptional<z.ZodString>;
1320
+ client_id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1321
+ client_secret: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1322
+ authorization_endpoint: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1323
+ response_type: z.ZodOptional<z.ZodOptional<z.ZodType<AuthorizationResponseType, z.ZodTypeDef, AuthorizationResponseType>>>;
1324
+ response_mode: z.ZodOptional<z.ZodOptional<z.ZodType<AuthorizationResponseMode, z.ZodTypeDef, AuthorizationResponseMode>>>;
1325
+ private_key: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1326
+ kid: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1327
+ team_id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1328
+ token_endpoint: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1329
+ token_exchange_basic_auth: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
1330
+ userinfo_endpoint: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1331
+ scope: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1332
+ }, "strip", z.ZodTypeAny, {
1333
+ created_at?: string | undefined;
1334
+ updated_at?: string | undefined;
1335
+ name?: string | undefined;
1336
+ client_id?: string | undefined;
1337
+ scope?: string | undefined;
1338
+ id?: string | undefined;
1339
+ client_secret?: string | undefined;
1340
+ response_type?: AuthorizationResponseType | undefined;
1341
+ response_mode?: AuthorizationResponseMode | undefined;
1342
+ authorization_endpoint?: string | undefined;
1343
+ private_key?: string | undefined;
1344
+ kid?: string | undefined;
1345
+ team_id?: string | undefined;
1346
+ token_endpoint?: string | undefined;
1347
+ token_exchange_basic_auth?: boolean | undefined;
1348
+ userinfo_endpoint?: string | undefined;
1349
+ }, {
1350
+ created_at?: string | undefined;
1351
+ updated_at?: string | undefined;
1352
+ name?: string | undefined;
1353
+ client_id?: string | undefined;
1354
+ scope?: string | undefined;
1355
+ id?: string | undefined;
1356
+ client_secret?: string | undefined;
1357
+ response_type?: AuthorizationResponseType | undefined;
1358
+ response_mode?: AuthorizationResponseMode | undefined;
1359
+ authorization_endpoint?: string | undefined;
1360
+ private_key?: string | undefined;
1361
+ kid?: string | undefined;
1362
+ team_id?: string | undefined;
1363
+ token_endpoint?: string | undefined;
1364
+ token_exchange_basic_auth?: boolean | undefined;
1365
+ userinfo_endpoint?: string | undefined;
1366
+ }>, "many">;
1367
+ }>, "strip", z.ZodTypeAny, {
1368
+ name: string;
1369
+ id: string;
1370
+ allowed_web_origins: string[];
1371
+ allowed_callback_urls: string[];
1372
+ allowed_logout_urls: string[];
1373
+ email_validation: "enabled" | "disabled" | "enforced";
1374
+ client_secret: string;
1375
+ disable_sign_ups: boolean;
1376
+ domains: {
1377
+ domain: string;
1378
+ dkim_private_key?: string | undefined;
1379
+ dkim_public_key?: string | undefined;
1380
+ email_api_key?: string | undefined;
1381
+ email_service?: "mailgun" | "mailchannels" | undefined;
1382
+ }[];
1383
+ tenant_id: string;
1384
+ tenant: {
1385
+ name: string;
1386
+ sender_email: string;
1387
+ sender_name: string;
1388
+ audience?: string | undefined;
1389
+ logo?: string | undefined;
1390
+ primary_color?: string | undefined;
1391
+ secondary_color?: string | undefined;
1392
+ support_url?: string | undefined;
1393
+ language?: string | undefined;
1394
+ };
1395
+ connections: {
1396
+ created_at?: string | undefined;
1397
+ updated_at?: string | undefined;
1398
+ name?: string | undefined;
1399
+ client_id?: string | undefined;
1400
+ scope?: string | undefined;
1401
+ id?: string | undefined;
1402
+ client_secret?: string | undefined;
1403
+ response_type?: AuthorizationResponseType | undefined;
1404
+ response_mode?: AuthorizationResponseMode | undefined;
1405
+ authorization_endpoint?: string | undefined;
1406
+ private_key?: string | undefined;
1407
+ kid?: string | undefined;
1408
+ team_id?: string | undefined;
1409
+ token_endpoint?: string | undefined;
1410
+ token_exchange_basic_auth?: boolean | undefined;
1411
+ userinfo_endpoint?: string | undefined;
1412
+ }[];
1413
+ }, {
1414
+ name: string;
1415
+ id: string;
1416
+ allowed_web_origins: string[];
1417
+ allowed_callback_urls: string[];
1418
+ allowed_logout_urls: string[];
1419
+ email_validation: "enabled" | "disabled" | "enforced";
1420
+ client_secret: string;
1421
+ disable_sign_ups: boolean;
1422
+ domains: {
1423
+ domain: string;
1424
+ dkim_private_key?: string | undefined;
1425
+ dkim_public_key?: string | undefined;
1426
+ email_api_key?: string | undefined;
1427
+ email_service?: "mailgun" | "mailchannels" | undefined;
1428
+ }[];
1429
+ tenant_id: string;
1430
+ tenant: {
1431
+ name: string;
1432
+ sender_email: string;
1433
+ sender_name: string;
1434
+ audience?: string | undefined;
1435
+ logo?: string | undefined;
1436
+ primary_color?: string | undefined;
1437
+ secondary_color?: string | undefined;
1438
+ support_url?: string | undefined;
1439
+ language?: string | undefined;
1440
+ };
1441
+ connections: {
1442
+ created_at?: string | undefined;
1443
+ updated_at?: string | undefined;
1444
+ name?: string | undefined;
1445
+ client_id?: string | undefined;
1446
+ scope?: string | undefined;
1447
+ id?: string | undefined;
1448
+ client_secret?: string | undefined;
1449
+ response_type?: AuthorizationResponseType | undefined;
1450
+ response_mode?: AuthorizationResponseMode | undefined;
1451
+ authorization_endpoint?: string | undefined;
1452
+ private_key?: string | undefined;
1453
+ kid?: string | undefined;
1454
+ team_id?: string | undefined;
1455
+ token_endpoint?: string | undefined;
1456
+ token_exchange_basic_auth?: boolean | undefined;
1457
+ userinfo_endpoint?: string | undefined;
1458
+ }[];
1459
+ }>;
1460
+ export type Client = z.infer<typeof ClientSchema>;
1461
+ export type PartialClient = z.infer<typeof PartialClientSchema>;
1462
+ export interface Code {
1463
+ id: string;
1464
+ code: string;
1465
+ type: "password_reset" | "validation";
1466
+ created_at: string;
1467
+ expires_at: string;
1468
+ used_at?: string;
1469
+ user_id: string;
1470
+ }
1471
+ export declare const connectionInsertSchema: z.ZodObject<{
1472
+ id: z.ZodOptional<z.ZodString>;
1473
+ name: z.ZodString;
1474
+ client_id: z.ZodOptional<z.ZodString>;
1475
+ client_secret: z.ZodOptional<z.ZodString>;
1476
+ authorization_endpoint: z.ZodOptional<z.ZodString>;
1477
+ response_type: z.ZodOptional<z.ZodType<AuthorizationResponseType, z.ZodTypeDef, AuthorizationResponseType>>;
1478
+ response_mode: z.ZodOptional<z.ZodType<AuthorizationResponseMode, z.ZodTypeDef, AuthorizationResponseMode>>;
1479
+ private_key: z.ZodOptional<z.ZodString>;
1480
+ kid: z.ZodOptional<z.ZodString>;
1481
+ team_id: z.ZodOptional<z.ZodString>;
1482
+ token_endpoint: z.ZodOptional<z.ZodString>;
1483
+ token_exchange_basic_auth: z.ZodOptional<z.ZodBoolean>;
1484
+ userinfo_endpoint: z.ZodOptional<z.ZodString>;
1485
+ scope: z.ZodOptional<z.ZodString>;
1668
1486
  }, "strip", z.ZodTypeAny, {
1669
- colors?: {
1670
- primary: string;
1671
- page_background?: {
1672
- type?: string | undefined;
1673
- start?: string | undefined;
1674
- end?: string | undefined;
1675
- angle_deg?: number | undefined;
1676
- } | undefined;
1677
- } | undefined;
1678
- logo_url?: string | undefined;
1679
- favicon_url?: string | undefined;
1680
- font?: {
1681
- url: string;
1682
- } | undefined;
1487
+ name: string;
1488
+ client_id?: string | undefined;
1489
+ scope?: string | undefined;
1490
+ id?: string | undefined;
1491
+ client_secret?: string | undefined;
1492
+ response_type?: AuthorizationResponseType | undefined;
1493
+ response_mode?: AuthorizationResponseMode | undefined;
1494
+ authorization_endpoint?: string | undefined;
1495
+ private_key?: string | undefined;
1496
+ kid?: string | undefined;
1497
+ team_id?: string | undefined;
1498
+ token_endpoint?: string | undefined;
1499
+ token_exchange_basic_auth?: boolean | undefined;
1500
+ userinfo_endpoint?: string | undefined;
1683
1501
  }, {
1684
- colors?: {
1685
- primary: string;
1686
- page_background?: {
1687
- type?: string | undefined;
1688
- start?: string | undefined;
1689
- end?: string | undefined;
1690
- angle_deg?: number | undefined;
1691
- } | undefined;
1692
- } | undefined;
1693
- logo_url?: string | undefined;
1694
- favicon_url?: string | undefined;
1695
- font?: {
1696
- url: string;
1697
- } | undefined;
1502
+ name: string;
1503
+ client_id?: string | undefined;
1504
+ scope?: string | undefined;
1505
+ id?: string | undefined;
1506
+ client_secret?: string | undefined;
1507
+ response_type?: AuthorizationResponseType | undefined;
1508
+ response_mode?: AuthorizationResponseMode | undefined;
1509
+ authorization_endpoint?: string | undefined;
1510
+ private_key?: string | undefined;
1511
+ kid?: string | undefined;
1512
+ team_id?: string | undefined;
1513
+ token_endpoint?: string | undefined;
1514
+ token_exchange_basic_auth?: boolean | undefined;
1515
+ userinfo_endpoint?: string | undefined;
1698
1516
  }>;
1699
- export type Branding = z.infer<typeof brandingSchema>;
1517
+ export type ConnectionInsert = z.infer<typeof connectionInsertSchema>;
1518
+ export declare const connectionSchema: z.ZodObject<z.objectUtil.extendShape<{
1519
+ id: z.ZodString;
1520
+ created_at: z.ZodEffects<z.ZodString, string, string>;
1521
+ updated_at: z.ZodEffects<z.ZodString, string, string>;
1522
+ }, {
1523
+ id: z.ZodOptional<z.ZodString>;
1524
+ name: z.ZodString;
1525
+ client_id: z.ZodOptional<z.ZodString>;
1526
+ client_secret: z.ZodOptional<z.ZodString>;
1527
+ authorization_endpoint: z.ZodOptional<z.ZodString>;
1528
+ response_type: z.ZodOptional<z.ZodType<AuthorizationResponseType, z.ZodTypeDef, AuthorizationResponseType>>;
1529
+ response_mode: z.ZodOptional<z.ZodType<AuthorizationResponseMode, z.ZodTypeDef, AuthorizationResponseMode>>;
1530
+ private_key: z.ZodOptional<z.ZodString>;
1531
+ kid: z.ZodOptional<z.ZodString>;
1532
+ team_id: z.ZodOptional<z.ZodString>;
1533
+ token_endpoint: z.ZodOptional<z.ZodString>;
1534
+ token_exchange_basic_auth: z.ZodOptional<z.ZodBoolean>;
1535
+ userinfo_endpoint: z.ZodOptional<z.ZodString>;
1536
+ scope: z.ZodOptional<z.ZodString>;
1537
+ }>, "strip", z.ZodTypeAny, {
1538
+ created_at: string;
1539
+ updated_at: string;
1540
+ name: string;
1541
+ client_id?: string | undefined;
1542
+ scope?: string | undefined;
1543
+ id?: string | undefined;
1544
+ client_secret?: string | undefined;
1545
+ response_type?: AuthorizationResponseType | undefined;
1546
+ response_mode?: AuthorizationResponseMode | undefined;
1547
+ authorization_endpoint?: string | undefined;
1548
+ private_key?: string | undefined;
1549
+ kid?: string | undefined;
1550
+ team_id?: string | undefined;
1551
+ token_endpoint?: string | undefined;
1552
+ token_exchange_basic_auth?: boolean | undefined;
1553
+ userinfo_endpoint?: string | undefined;
1554
+ }, {
1555
+ created_at: string;
1556
+ updated_at: string;
1557
+ name: string;
1558
+ client_id?: string | undefined;
1559
+ scope?: string | undefined;
1560
+ id?: string | undefined;
1561
+ client_secret?: string | undefined;
1562
+ response_type?: AuthorizationResponseType | undefined;
1563
+ response_mode?: AuthorizationResponseMode | undefined;
1564
+ authorization_endpoint?: string | undefined;
1565
+ private_key?: string | undefined;
1566
+ kid?: string | undefined;
1567
+ team_id?: string | undefined;
1568
+ token_endpoint?: string | undefined;
1569
+ token_exchange_basic_auth?: boolean | undefined;
1570
+ userinfo_endpoint?: string | undefined;
1571
+ }>;
1572
+ export type Connection = z.infer<typeof connectionSchema>;
1700
1573
  export declare const domainInsertSchema: z.ZodObject<{
1701
1574
  domain: z.ZodString;
1702
1575
  dkim_private_key: z.ZodOptional<z.ZodString>;
@@ -1734,18 +1607,18 @@ export declare const domainSchema: z.ZodObject<z.objectUtil.extendShape<{
1734
1607
  "mailchannels"
1735
1608
  ]>;
1736
1609
  }>, "strip", z.ZodTypeAny, {
1737
- id: string;
1738
1610
  created_at: string;
1739
1611
  updated_at: string;
1612
+ id: string;
1740
1613
  domain: string;
1741
1614
  email_service: "mailgun" | "mailchannels";
1742
1615
  dkim_private_key?: string | undefined;
1743
1616
  dkim_public_key?: string | undefined;
1744
1617
  email_api_key?: string | undefined;
1745
1618
  }, {
1746
- id: string;
1747
1619
  created_at: string;
1748
1620
  updated_at: string;
1621
+ id: string;
1749
1622
  domain: string;
1750
1623
  email_service: "mailgun" | "mailchannels";
1751
1624
  dkim_private_key?: string | undefined;
@@ -1786,21 +1659,299 @@ export declare const hookSchema: z.ZodObject<z.objectUtil.extendShape<{
1786
1659
  created_at: z.ZodString;
1787
1660
  updated_at: z.ZodString;
1788
1661
  }>, "strip", z.ZodTypeAny, {
1662
+ created_at: string;
1663
+ updated_at: string;
1789
1664
  enabled: boolean;
1665
+ url: string;
1666
+ trigger_id: "post-user-registration" | "post-user-login";
1667
+ hook_id: string;
1668
+ }, {
1669
+ created_at: string;
1670
+ updated_at: string;
1671
+ url: string;
1672
+ trigger_id: "post-user-registration" | "post-user-login";
1673
+ hook_id: string;
1674
+ enabled?: boolean | undefined;
1675
+ }>;
1676
+ export type Hook = z.infer<typeof hookSchema>;
1677
+ export declare const jwksSchema: z.ZodObject<{
1678
+ alg: z.ZodString;
1679
+ e: z.ZodString;
1680
+ kid: z.ZodString;
1681
+ kty: z.ZodString;
1682
+ n: z.ZodString;
1683
+ use: z.ZodOptional<z.ZodString>;
1684
+ }, "strip", z.ZodTypeAny, {
1685
+ kid: string;
1686
+ alg: string;
1687
+ e: string;
1688
+ kty: string;
1689
+ n: string;
1690
+ use?: string | undefined;
1691
+ }, {
1692
+ kid: string;
1693
+ alg: string;
1694
+ e: string;
1695
+ kty: string;
1696
+ n: string;
1697
+ use?: string | undefined;
1698
+ }>;
1699
+ export declare const jwksKeySchema: z.ZodObject<{
1700
+ keys: z.ZodArray<z.ZodObject<{
1701
+ alg: z.ZodString;
1702
+ e: z.ZodString;
1703
+ kid: z.ZodString;
1704
+ kty: z.ZodString;
1705
+ n: z.ZodString;
1706
+ use: z.ZodOptional<z.ZodString>;
1707
+ }, "strip", z.ZodTypeAny, {
1708
+ kid: string;
1709
+ alg: string;
1710
+ e: string;
1711
+ kty: string;
1712
+ n: string;
1713
+ use?: string | undefined;
1714
+ }, {
1715
+ kid: string;
1716
+ alg: string;
1717
+ e: string;
1718
+ kty: string;
1719
+ n: string;
1720
+ use?: string | undefined;
1721
+ }>, "many">;
1722
+ }, "strip", z.ZodTypeAny, {
1723
+ keys: {
1724
+ kid: string;
1725
+ alg: string;
1726
+ e: string;
1727
+ kty: string;
1728
+ n: string;
1729
+ use?: string | undefined;
1730
+ }[];
1731
+ }, {
1732
+ keys: {
1733
+ kid: string;
1734
+ alg: string;
1735
+ e: string;
1736
+ kty: string;
1737
+ n: string;
1738
+ use?: string | undefined;
1739
+ }[];
1740
+ }>;
1741
+ export declare const openIDConfigurationSchema: z.ZodObject<{
1742
+ issuer: z.ZodString;
1743
+ authorization_endpoint: z.ZodString;
1744
+ token_endpoint: z.ZodString;
1745
+ device_authorization_endpoint: z.ZodString;
1746
+ userinfo_endpoint: z.ZodString;
1747
+ mfa_challenge_endpoint: z.ZodString;
1748
+ jwks_uri: z.ZodString;
1749
+ registration_endpoint: z.ZodString;
1750
+ revocation_endpoint: z.ZodString;
1751
+ scopes_supported: z.ZodArray<z.ZodString, "many">;
1752
+ response_types_supported: z.ZodArray<z.ZodString, "many">;
1753
+ code_challenge_methods_supported: z.ZodArray<z.ZodString, "many">;
1754
+ response_modes_supported: z.ZodArray<z.ZodString, "many">;
1755
+ subject_types_supported: z.ZodArray<z.ZodString, "many">;
1756
+ id_token_signing_alg_values_supported: z.ZodArray<z.ZodString, "many">;
1757
+ token_endpoint_auth_methods_supported: z.ZodArray<z.ZodString, "many">;
1758
+ claims_supported: z.ZodArray<z.ZodString, "many">;
1759
+ request_uri_parameter_supported: z.ZodBoolean;
1760
+ request_parameter_supported: z.ZodBoolean;
1761
+ token_endpoint_auth_signing_alg_values_supported: z.ZodArray<z.ZodString, "many">;
1762
+ }, "strip", z.ZodTypeAny, {
1763
+ authorization_endpoint: string;
1764
+ token_endpoint: string;
1765
+ userinfo_endpoint: string;
1766
+ issuer: string;
1767
+ device_authorization_endpoint: string;
1768
+ mfa_challenge_endpoint: string;
1769
+ jwks_uri: string;
1770
+ registration_endpoint: string;
1771
+ revocation_endpoint: string;
1772
+ scopes_supported: string[];
1773
+ response_types_supported: string[];
1774
+ code_challenge_methods_supported: string[];
1775
+ response_modes_supported: string[];
1776
+ subject_types_supported: string[];
1777
+ id_token_signing_alg_values_supported: string[];
1778
+ token_endpoint_auth_methods_supported: string[];
1779
+ claims_supported: string[];
1780
+ request_uri_parameter_supported: boolean;
1781
+ request_parameter_supported: boolean;
1782
+ token_endpoint_auth_signing_alg_values_supported: string[];
1783
+ }, {
1784
+ authorization_endpoint: string;
1785
+ token_endpoint: string;
1786
+ userinfo_endpoint: string;
1787
+ issuer: string;
1788
+ device_authorization_endpoint: string;
1789
+ mfa_challenge_endpoint: string;
1790
+ jwks_uri: string;
1791
+ registration_endpoint: string;
1792
+ revocation_endpoint: string;
1793
+ scopes_supported: string[];
1794
+ response_types_supported: string[];
1795
+ code_challenge_methods_supported: string[];
1796
+ response_modes_supported: string[];
1797
+ subject_types_supported: string[];
1798
+ id_token_signing_alg_values_supported: string[];
1799
+ token_endpoint_auth_methods_supported: string[];
1800
+ claims_supported: string[];
1801
+ request_uri_parameter_supported: boolean;
1802
+ request_parameter_supported: boolean;
1803
+ token_endpoint_auth_signing_alg_values_supported: string[];
1804
+ }>;
1805
+ export interface LoginState {
1806
+ connection?: string;
1807
+ authParams: AuthParams;
1808
+ state: string;
1809
+ errorMessage?: string;
1810
+ }
1811
+ export interface OTP {
1812
+ id: string;
1813
+ tenant_id: string;
1814
+ client_id: string;
1815
+ email: string;
1816
+ code: string;
1817
+ ip?: string;
1818
+ send: "link" | "code";
1819
+ authParams: {
1820
+ nonce?: string;
1821
+ state?: string;
1822
+ scope?: string;
1823
+ response_type?: AuthorizationResponseType;
1824
+ response_mode?: AuthorizationResponseMode;
1825
+ redirect_uri?: string;
1826
+ };
1827
+ created_at: Date;
1828
+ expires_at: Date;
1829
+ used_at?: string;
1830
+ user_id?: string;
1831
+ }
1832
+ export interface PasswordResponse {
1833
+ valid: boolean;
1834
+ message: string;
1835
+ }
1836
+ export interface PasswordParams {
1837
+ user_id: string;
1838
+ password: string;
1839
+ }
1840
+ export declare const sessionInsertSchema: z.ZodObject<{
1841
+ session_id: z.ZodString;
1842
+ client_id: z.ZodString;
1843
+ expires_at: z.ZodString;
1844
+ used_at: z.ZodString;
1845
+ deleted_at: z.ZodOptional<z.ZodString>;
1846
+ user_id: z.ZodString;
1847
+ }, "strip", z.ZodTypeAny, {
1848
+ user_id: string;
1849
+ client_id: string;
1850
+ expires_at: string;
1851
+ used_at: string;
1852
+ session_id: string;
1853
+ deleted_at?: string | undefined;
1854
+ }, {
1855
+ user_id: string;
1856
+ client_id: string;
1857
+ expires_at: string;
1858
+ used_at: string;
1859
+ session_id: string;
1860
+ deleted_at?: string | undefined;
1861
+ }>;
1862
+ export type SessionInsert = z.infer<typeof sessionInsertSchema>;
1863
+ declare const sessionSchema: z.ZodObject<{
1864
+ session_id: z.ZodString;
1865
+ client_id: z.ZodString;
1866
+ expires_at: z.ZodString;
1867
+ used_at: z.ZodString;
1868
+ deleted_at: z.ZodOptional<z.ZodString>;
1869
+ user_id: z.ZodString;
1870
+ created_at: z.ZodString;
1871
+ }, "strip", z.ZodTypeAny, {
1872
+ created_at: string;
1873
+ user_id: string;
1874
+ client_id: string;
1875
+ expires_at: string;
1876
+ used_at: string;
1877
+ session_id: string;
1878
+ deleted_at?: string | undefined;
1879
+ }, {
1880
+ created_at: string;
1881
+ user_id: string;
1882
+ client_id: string;
1883
+ expires_at: string;
1884
+ used_at: string;
1885
+ session_id: string;
1886
+ deleted_at?: string | undefined;
1887
+ }>;
1888
+ export type Session = z.infer<typeof sessionSchema>;
1889
+ export declare const certificateSchema: z.ZodObject<{
1890
+ private_key: z.ZodString;
1891
+ public_key: z.ZodString;
1892
+ kid: z.ZodString;
1893
+ created_at: z.ZodString;
1894
+ revoked_at: z.ZodOptional<z.ZodString>;
1895
+ }, "strip", z.ZodTypeAny, {
1896
+ created_at: string;
1897
+ private_key: string;
1898
+ kid: string;
1899
+ public_key: string;
1900
+ revoked_at?: string | undefined;
1901
+ }, {
1902
+ created_at: string;
1903
+ private_key: string;
1904
+ kid: string;
1905
+ public_key: string;
1906
+ revoked_at?: string | undefined;
1907
+ }>;
1908
+ export interface Certificate {
1909
+ private_key: string;
1910
+ public_key: string;
1911
+ kid: string;
1790
1912
  created_at: string;
1791
- updated_at: string;
1792
- url: string;
1793
- trigger_id: "post-user-registration" | "post-user-login";
1794
- hook_id: string;
1913
+ revoked_at?: string;
1914
+ }
1915
+ export declare const signingKeySchema: z.ZodObject<{
1916
+ kid: z.ZodString;
1917
+ cert: z.ZodString;
1918
+ fingerprint: z.ZodString;
1919
+ thumbprint: z.ZodString;
1920
+ pkcs7: z.ZodOptional<z.ZodString>;
1921
+ current: z.ZodOptional<z.ZodBoolean>;
1922
+ next: z.ZodOptional<z.ZodBoolean>;
1923
+ previous: z.ZodOptional<z.ZodBoolean>;
1924
+ current_since: z.ZodOptional<z.ZodString>;
1925
+ current_until: z.ZodOptional<z.ZodString>;
1926
+ revoked: z.ZodOptional<z.ZodBoolean>;
1927
+ revoked_at: z.ZodOptional<z.ZodString>;
1928
+ }, "strip", z.ZodTypeAny, {
1929
+ kid: string;
1930
+ cert: string;
1931
+ fingerprint: string;
1932
+ thumbprint: string;
1933
+ revoked_at?: string | undefined;
1934
+ pkcs7?: string | undefined;
1935
+ current?: boolean | undefined;
1936
+ next?: boolean | undefined;
1937
+ previous?: boolean | undefined;
1938
+ current_since?: string | undefined;
1939
+ current_until?: string | undefined;
1940
+ revoked?: boolean | undefined;
1795
1941
  }, {
1796
- created_at: string;
1797
- updated_at: string;
1798
- url: string;
1799
- trigger_id: "post-user-registration" | "post-user-login";
1800
- hook_id: string;
1801
- enabled?: boolean | undefined;
1942
+ kid: string;
1943
+ cert: string;
1944
+ fingerprint: string;
1945
+ thumbprint: string;
1946
+ revoked_at?: string | undefined;
1947
+ pkcs7?: string | undefined;
1948
+ current?: boolean | undefined;
1949
+ next?: boolean | undefined;
1950
+ previous?: boolean | undefined;
1951
+ current_since?: string | undefined;
1952
+ current_until?: string | undefined;
1953
+ revoked?: boolean | undefined;
1802
1954
  }>;
1803
- export type Hook = z.infer<typeof hookSchema>;
1804
1955
  export declare const tenantInsertSchema: z.ZodObject<{
1805
1956
  name: z.ZodString;
1806
1957
  audience: z.ZodString;
@@ -1846,9 +1997,9 @@ export declare const tenantSchema: z.ZodObject<z.objectUtil.extendShape<{
1846
1997
  created_at: z.ZodEffects<z.ZodString, string, string>;
1847
1998
  updated_at: z.ZodEffects<z.ZodString, string, string>;
1848
1999
  }>, "strip", z.ZodTypeAny, {
1849
- name: string;
1850
2000
  created_at: string;
1851
2001
  updated_at: string;
2002
+ name: string;
1852
2003
  audience: string;
1853
2004
  sender_email: string;
1854
2005
  sender_name: string;
@@ -1858,9 +2009,9 @@ export declare const tenantSchema: z.ZodObject<z.objectUtil.extendShape<{
1858
2009
  support_url?: string | undefined;
1859
2010
  language?: string | undefined;
1860
2011
  }, {
1861
- name: string;
1862
2012
  created_at: string;
1863
2013
  updated_at: string;
2014
+ name: string;
1864
2015
  audience: string;
1865
2016
  sender_email: string;
1866
2017
  sender_name: string;
@@ -1900,153 +2051,339 @@ export declare const vendorSettingsSchema: z.ZodObject<{
1900
2051
  buttonTextColor: string;
1901
2052
  primaryHoverColor: string;
1902
2053
  }>;
1903
- supportEmail: z.ZodNullable<z.ZodString>;
1904
- supportUrl: z.ZodNullable<z.ZodString>;
1905
- name: z.ZodString;
1906
- showGreyishBackground: z.ZodOptional<z.ZodBoolean>;
1907
- termsAndConditionsUrl: z.ZodNullable<z.ZodString>;
1908
- companyName: z.ZodOptional<z.ZodString>;
1909
- checkoutHideSocial: z.ZodOptional<z.ZodBoolean>;
1910
- siteUrl: z.ZodNullable<z.ZodString>;
1911
- manageSubscriptionsUrl: z.ZodOptional<z.ZodString>;
2054
+ supportEmail: z.ZodNullable<z.ZodString>;
2055
+ supportUrl: z.ZodNullable<z.ZodString>;
2056
+ name: z.ZodString;
2057
+ showGreyishBackground: z.ZodOptional<z.ZodBoolean>;
2058
+ termsAndConditionsUrl: z.ZodNullable<z.ZodString>;
2059
+ companyName: z.ZodOptional<z.ZodString>;
2060
+ checkoutHideSocial: z.ZodOptional<z.ZodBoolean>;
2061
+ siteUrl: z.ZodNullable<z.ZodString>;
2062
+ manageSubscriptionsUrl: z.ZodOptional<z.ZodString>;
2063
+ }, "strip", z.ZodTypeAny, {
2064
+ name: string;
2065
+ style: {
2066
+ primaryColor: string;
2067
+ buttonTextColor: string;
2068
+ primaryHoverColor: string;
2069
+ };
2070
+ logoUrl: string;
2071
+ supportEmail: string | null;
2072
+ supportUrl: string | null;
2073
+ termsAndConditionsUrl: string | null;
2074
+ siteUrl: string | null;
2075
+ loginBackgroundImage?: string | null | undefined;
2076
+ showGreyishBackground?: boolean | undefined;
2077
+ companyName?: string | undefined;
2078
+ checkoutHideSocial?: boolean | undefined;
2079
+ manageSubscriptionsUrl?: string | undefined;
2080
+ }, {
2081
+ name: string;
2082
+ style: {
2083
+ primaryColor: string;
2084
+ buttonTextColor: string;
2085
+ primaryHoverColor: string;
2086
+ };
2087
+ logoUrl: string;
2088
+ supportEmail: string | null;
2089
+ supportUrl: string | null;
2090
+ termsAndConditionsUrl: string | null;
2091
+ siteUrl: string | null;
2092
+ loginBackgroundImage?: string | null | undefined;
2093
+ showGreyishBackground?: boolean | undefined;
2094
+ companyName?: string | undefined;
2095
+ checkoutHideSocial?: boolean | undefined;
2096
+ manageSubscriptionsUrl?: string | undefined;
2097
+ }>;
2098
+ export type VendorSettings = z.infer<typeof vendorSettingsSchema>;
2099
+ export declare enum GrantType {
2100
+ RefreshToken = "refresh_token",
2101
+ AuthorizationCode = "authorization_code",
2102
+ ClientCredential = "client_credentials",
2103
+ Passwordless = "passwordless",
2104
+ Password = "password"
2105
+ }
2106
+ export declare const authorizationCodeGrantTypeParamsSchema: z.ZodObject<{
2107
+ grant_type: z.ZodEffects<z.ZodNativeEnum<typeof GrantType>, GrantType.AuthorizationCode, GrantType>;
2108
+ code: z.ZodString;
2109
+ client_secret: z.ZodString;
2110
+ client_id: z.ZodString;
2111
+ }, "strip", z.ZodTypeAny, {
2112
+ code: string;
2113
+ client_id: string;
2114
+ client_secret: string;
2115
+ grant_type: GrantType.AuthorizationCode;
2116
+ }, {
2117
+ code: string;
2118
+ client_id: string;
2119
+ client_secret: string;
2120
+ grant_type: GrantType;
2121
+ }>;
2122
+ export type AuthorizationCodeGrantTypeParams = z.infer<typeof authorizationCodeGrantTypeParamsSchema>;
2123
+ export declare const pkceAuthorizationCodeGrantTypeParamsSchema: z.ZodObject<{
2124
+ grant_type: z.ZodEffects<z.ZodNativeEnum<typeof GrantType>, GrantType.AuthorizationCode, GrantType>;
2125
+ code: z.ZodString;
2126
+ code_verifier: z.ZodString;
2127
+ client_id: z.ZodOptional<z.ZodString>;
2128
+ redirect_uri: z.ZodString;
2129
+ }, "strip", z.ZodTypeAny, {
2130
+ code: string;
2131
+ redirect_uri: string;
2132
+ grant_type: GrantType.AuthorizationCode;
2133
+ code_verifier: string;
2134
+ client_id?: string | undefined;
2135
+ }, {
2136
+ code: string;
2137
+ redirect_uri: string;
2138
+ grant_type: GrantType;
2139
+ code_verifier: string;
2140
+ client_id?: string | undefined;
2141
+ }>;
2142
+ export type PKCEAuthorizationCodeGrantTypeParams = z.infer<typeof pkceAuthorizationCodeGrantTypeParamsSchema>;
2143
+ export declare const clientCredentialGrantTypeParamsSchema: z.ZodObject<{
2144
+ grant_type: z.ZodEffects<z.ZodNativeEnum<typeof GrantType>, GrantType.ClientCredential, GrantType>;
2145
+ scope: z.ZodOptional<z.ZodString>;
2146
+ client_secret: z.ZodString;
2147
+ client_id: z.ZodString;
2148
+ audience: z.ZodOptional<z.ZodString>;
2149
+ }, "strip", z.ZodTypeAny, {
2150
+ client_id: string;
2151
+ client_secret: string;
2152
+ grant_type: GrantType.ClientCredential;
2153
+ audience?: string | undefined;
2154
+ scope?: string | undefined;
2155
+ }, {
2156
+ client_id: string;
2157
+ client_secret: string;
2158
+ grant_type: GrantType;
2159
+ audience?: string | undefined;
2160
+ scope?: string | undefined;
2161
+ }>;
2162
+ export type ClientCredentialsGrantTypeParams = z.infer<typeof clientCredentialGrantTypeParamsSchema>;
2163
+ declare const tokenResponseSchema: z.ZodObject<{
2164
+ access_token: z.ZodString;
2165
+ id_token: z.ZodOptional<z.ZodString>;
2166
+ scope: z.ZodOptional<z.ZodString>;
2167
+ state: z.ZodOptional<z.ZodString>;
2168
+ refresh_token: z.ZodOptional<z.ZodString>;
2169
+ token_type: z.ZodString;
2170
+ expires_in: z.ZodNumber;
2171
+ }, "strip", z.ZodTypeAny, {
2172
+ access_token: string;
2173
+ token_type: string;
2174
+ expires_in: number;
2175
+ refresh_token?: string | undefined;
2176
+ scope?: string | undefined;
2177
+ state?: string | undefined;
2178
+ id_token?: string | undefined;
2179
+ }, {
2180
+ access_token: string;
2181
+ token_type: string;
2182
+ expires_in: number;
2183
+ refresh_token?: string | undefined;
2184
+ scope?: string | undefined;
2185
+ state?: string | undefined;
2186
+ id_token?: string | undefined;
2187
+ }>;
2188
+ export type TokenResponse = z.infer<typeof tokenResponseSchema>;
2189
+ declare const codeResponseSchema: z.ZodObject<{
2190
+ code: z.ZodString;
2191
+ state: z.ZodOptional<z.ZodString>;
2192
+ }, "strip", z.ZodTypeAny, {
2193
+ code: string;
2194
+ state?: string | undefined;
2195
+ }, {
2196
+ code: string;
2197
+ state?: string | undefined;
2198
+ }>;
2199
+ export type CodeResponse = z.infer<typeof codeResponseSchema>;
2200
+ export interface Ticket {
2201
+ id: string;
2202
+ tenant_id: string;
2203
+ client_id: string;
2204
+ email: string;
2205
+ authParams?: {
2206
+ nonce?: string;
2207
+ state?: string;
2208
+ scope?: string;
2209
+ response_type?: AuthorizationResponseType;
2210
+ response_mode?: AuthorizationResponseMode;
2211
+ redirect_uri?: string;
2212
+ };
2213
+ created_at: Date;
2214
+ expires_at: Date;
2215
+ used_at?: Date;
2216
+ }
2217
+ export declare const universalLoginSessionInsertSchema: z.ZodObject<{
2218
+ id: z.ZodString;
2219
+ expires_at: z.ZodString;
2220
+ auth0Client: z.ZodOptional<z.ZodString>;
2221
+ authParams: z.ZodObject<{
2222
+ client_id: z.ZodString;
2223
+ vendor_id: z.ZodOptional<z.ZodString>;
2224
+ response_type: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseType>>;
2225
+ response_mode: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseMode>>;
2226
+ redirect_uri: z.ZodOptional<z.ZodString>;
2227
+ audience: z.ZodOptional<z.ZodString>;
2228
+ state: z.ZodOptional<z.ZodString>;
2229
+ nonce: z.ZodOptional<z.ZodString>;
2230
+ scope: z.ZodOptional<z.ZodString>;
2231
+ code_challenge_method: z.ZodOptional<z.ZodNativeEnum<typeof CodeChallengeMethod>>;
2232
+ code_challenge: z.ZodOptional<z.ZodString>;
2233
+ username: z.ZodOptional<z.ZodString>;
2234
+ }, "strip", z.ZodTypeAny, {
2235
+ client_id: string;
2236
+ username?: string | undefined;
2237
+ audience?: string | undefined;
2238
+ scope?: string | undefined;
2239
+ vendor_id?: string | undefined;
2240
+ response_type?: AuthorizationResponseType | undefined;
2241
+ response_mode?: AuthorizationResponseMode | undefined;
2242
+ redirect_uri?: string | undefined;
2243
+ state?: string | undefined;
2244
+ nonce?: string | undefined;
2245
+ code_challenge_method?: CodeChallengeMethod | undefined;
2246
+ code_challenge?: string | undefined;
2247
+ }, {
2248
+ client_id: string;
2249
+ username?: string | undefined;
2250
+ audience?: string | undefined;
2251
+ scope?: string | undefined;
2252
+ vendor_id?: string | undefined;
2253
+ response_type?: AuthorizationResponseType | undefined;
2254
+ response_mode?: AuthorizationResponseMode | undefined;
2255
+ redirect_uri?: string | undefined;
2256
+ state?: string | undefined;
2257
+ nonce?: string | undefined;
2258
+ code_challenge_method?: CodeChallengeMethod | undefined;
2259
+ code_challenge?: string | undefined;
2260
+ }>;
1912
2261
  }, "strip", z.ZodTypeAny, {
1913
- name: string;
1914
- style: {
1915
- primaryColor: string;
1916
- buttonTextColor: string;
1917
- primaryHoverColor: string;
2262
+ id: string;
2263
+ authParams: {
2264
+ client_id: string;
2265
+ username?: string | undefined;
2266
+ audience?: string | undefined;
2267
+ scope?: string | undefined;
2268
+ vendor_id?: string | undefined;
2269
+ response_type?: AuthorizationResponseType | undefined;
2270
+ response_mode?: AuthorizationResponseMode | undefined;
2271
+ redirect_uri?: string | undefined;
2272
+ state?: string | undefined;
2273
+ nonce?: string | undefined;
2274
+ code_challenge_method?: CodeChallengeMethod | undefined;
2275
+ code_challenge?: string | undefined;
1918
2276
  };
1919
- logoUrl: string;
1920
- supportEmail: string | null;
1921
- supportUrl: string | null;
1922
- termsAndConditionsUrl: string | null;
1923
- siteUrl: string | null;
1924
- loginBackgroundImage?: string | null | undefined;
1925
- showGreyishBackground?: boolean | undefined;
1926
- companyName?: string | undefined;
1927
- checkoutHideSocial?: boolean | undefined;
1928
- manageSubscriptionsUrl?: string | undefined;
2277
+ expires_at: string;
2278
+ auth0Client?: string | undefined;
1929
2279
  }, {
1930
- name: string;
1931
- style: {
1932
- primaryColor: string;
1933
- buttonTextColor: string;
1934
- primaryHoverColor: string;
2280
+ id: string;
2281
+ authParams: {
2282
+ client_id: string;
2283
+ username?: string | undefined;
2284
+ audience?: string | undefined;
2285
+ scope?: string | undefined;
2286
+ vendor_id?: string | undefined;
2287
+ response_type?: AuthorizationResponseType | undefined;
2288
+ response_mode?: AuthorizationResponseMode | undefined;
2289
+ redirect_uri?: string | undefined;
2290
+ state?: string | undefined;
2291
+ nonce?: string | undefined;
2292
+ code_challenge_method?: CodeChallengeMethod | undefined;
2293
+ code_challenge?: string | undefined;
1935
2294
  };
1936
- logoUrl: string;
1937
- supportEmail: string | null;
1938
- supportUrl: string | null;
1939
- termsAndConditionsUrl: string | null;
1940
- siteUrl: string | null;
1941
- loginBackgroundImage?: string | null | undefined;
1942
- showGreyishBackground?: boolean | undefined;
1943
- companyName?: string | undefined;
1944
- checkoutHideSocial?: boolean | undefined;
1945
- manageSubscriptionsUrl?: string | undefined;
1946
- }>;
1947
- export type VendorSettings = z.infer<typeof vendorSettingsSchema>;
1948
- export declare const connectionInsertSchema: z.ZodObject<{
1949
- id: z.ZodOptional<z.ZodString>;
1950
- name: z.ZodString;
1951
- client_id: z.ZodOptional<z.ZodString>;
1952
- client_secret: z.ZodOptional<z.ZodString>;
1953
- authorization_endpoint: z.ZodOptional<z.ZodString>;
1954
- response_type: z.ZodOptional<z.ZodType<AuthorizationResponseType, z.ZodTypeDef, AuthorizationResponseType>>;
1955
- response_mode: z.ZodOptional<z.ZodType<AuthorizationResponseMode, z.ZodTypeDef, AuthorizationResponseMode>>;
1956
- private_key: z.ZodOptional<z.ZodString>;
1957
- kid: z.ZodOptional<z.ZodString>;
1958
- team_id: z.ZodOptional<z.ZodString>;
1959
- token_endpoint: z.ZodOptional<z.ZodString>;
1960
- token_exchange_basic_auth: z.ZodOptional<z.ZodBoolean>;
1961
- userinfo_endpoint: z.ZodOptional<z.ZodString>;
1962
- scope: z.ZodOptional<z.ZodString>;
1963
- }, "strip", z.ZodTypeAny, {
1964
- name: string;
1965
- id?: string | undefined;
1966
- client_secret?: string | undefined;
1967
- client_id?: string | undefined;
1968
- response_type?: AuthorizationResponseType | undefined;
1969
- response_mode?: AuthorizationResponseMode | undefined;
1970
- scope?: string | undefined;
1971
- authorization_endpoint?: string | undefined;
1972
- private_key?: string | undefined;
1973
- kid?: string | undefined;
1974
- team_id?: string | undefined;
1975
- token_endpoint?: string | undefined;
1976
- token_exchange_basic_auth?: boolean | undefined;
1977
- userinfo_endpoint?: string | undefined;
1978
- }, {
1979
- name: string;
1980
- id?: string | undefined;
1981
- client_secret?: string | undefined;
1982
- client_id?: string | undefined;
1983
- response_type?: AuthorizationResponseType | undefined;
1984
- response_mode?: AuthorizationResponseMode | undefined;
1985
- scope?: string | undefined;
1986
- authorization_endpoint?: string | undefined;
1987
- private_key?: string | undefined;
1988
- kid?: string | undefined;
1989
- team_id?: string | undefined;
1990
- token_endpoint?: string | undefined;
1991
- token_exchange_basic_auth?: boolean | undefined;
1992
- userinfo_endpoint?: string | undefined;
2295
+ expires_at: string;
2296
+ auth0Client?: string | undefined;
1993
2297
  }>;
1994
- export type ConnectionInsert = z.infer<typeof connectionInsertSchema>;
1995
- export declare const connectionSchema: z.ZodObject<z.objectUtil.extendShape<{
2298
+ export type UniversalLoginSessionInsert = z.infer<typeof universalLoginSessionInsertSchema>;
2299
+ export declare const universalLoginSessionSchema: z.ZodObject<{
2300
+ created_at: z.ZodString;
2301
+ updated_at: z.ZodString;
1996
2302
  id: z.ZodString;
1997
- created_at: z.ZodEffects<z.ZodString, string, string>;
1998
- updated_at: z.ZodEffects<z.ZodString, string, string>;
1999
- }, {
2000
- id: z.ZodOptional<z.ZodString>;
2001
- name: z.ZodString;
2002
- client_id: z.ZodOptional<z.ZodString>;
2003
- client_secret: z.ZodOptional<z.ZodString>;
2004
- authorization_endpoint: z.ZodOptional<z.ZodString>;
2005
- response_type: z.ZodOptional<z.ZodType<AuthorizationResponseType, z.ZodTypeDef, AuthorizationResponseType>>;
2006
- response_mode: z.ZodOptional<z.ZodType<AuthorizationResponseMode, z.ZodTypeDef, AuthorizationResponseMode>>;
2007
- private_key: z.ZodOptional<z.ZodString>;
2008
- kid: z.ZodOptional<z.ZodString>;
2009
- team_id: z.ZodOptional<z.ZodString>;
2010
- token_endpoint: z.ZodOptional<z.ZodString>;
2011
- token_exchange_basic_auth: z.ZodOptional<z.ZodBoolean>;
2012
- userinfo_endpoint: z.ZodOptional<z.ZodString>;
2013
- scope: z.ZodOptional<z.ZodString>;
2014
- }>, "strip", z.ZodTypeAny, {
2015
- name: string;
2303
+ expires_at: z.ZodString;
2304
+ auth0Client: z.ZodOptional<z.ZodString>;
2305
+ authParams: z.ZodObject<{
2306
+ client_id: z.ZodString;
2307
+ vendor_id: z.ZodOptional<z.ZodString>;
2308
+ response_type: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseType>>;
2309
+ response_mode: z.ZodOptional<z.ZodNativeEnum<typeof AuthorizationResponseMode>>;
2310
+ redirect_uri: z.ZodOptional<z.ZodString>;
2311
+ audience: z.ZodOptional<z.ZodString>;
2312
+ state: z.ZodOptional<z.ZodString>;
2313
+ nonce: z.ZodOptional<z.ZodString>;
2314
+ scope: z.ZodOptional<z.ZodString>;
2315
+ code_challenge_method: z.ZodOptional<z.ZodNativeEnum<typeof CodeChallengeMethod>>;
2316
+ code_challenge: z.ZodOptional<z.ZodString>;
2317
+ username: z.ZodOptional<z.ZodString>;
2318
+ }, "strip", z.ZodTypeAny, {
2319
+ client_id: string;
2320
+ username?: string | undefined;
2321
+ audience?: string | undefined;
2322
+ scope?: string | undefined;
2323
+ vendor_id?: string | undefined;
2324
+ response_type?: AuthorizationResponseType | undefined;
2325
+ response_mode?: AuthorizationResponseMode | undefined;
2326
+ redirect_uri?: string | undefined;
2327
+ state?: string | undefined;
2328
+ nonce?: string | undefined;
2329
+ code_challenge_method?: CodeChallengeMethod | undefined;
2330
+ code_challenge?: string | undefined;
2331
+ }, {
2332
+ client_id: string;
2333
+ username?: string | undefined;
2334
+ audience?: string | undefined;
2335
+ scope?: string | undefined;
2336
+ vendor_id?: string | undefined;
2337
+ response_type?: AuthorizationResponseType | undefined;
2338
+ response_mode?: AuthorizationResponseMode | undefined;
2339
+ redirect_uri?: string | undefined;
2340
+ state?: string | undefined;
2341
+ nonce?: string | undefined;
2342
+ code_challenge_method?: CodeChallengeMethod | undefined;
2343
+ code_challenge?: string | undefined;
2344
+ }>;
2345
+ }, "strip", z.ZodTypeAny, {
2016
2346
  created_at: string;
2017
2347
  updated_at: string;
2018
- id?: string | undefined;
2019
- client_secret?: string | undefined;
2020
- client_id?: string | undefined;
2021
- response_type?: AuthorizationResponseType | undefined;
2022
- response_mode?: AuthorizationResponseMode | undefined;
2023
- scope?: string | undefined;
2024
- authorization_endpoint?: string | undefined;
2025
- private_key?: string | undefined;
2026
- kid?: string | undefined;
2027
- team_id?: string | undefined;
2028
- token_endpoint?: string | undefined;
2029
- token_exchange_basic_auth?: boolean | undefined;
2030
- userinfo_endpoint?: string | undefined;
2348
+ id: string;
2349
+ authParams: {
2350
+ client_id: string;
2351
+ username?: string | undefined;
2352
+ audience?: string | undefined;
2353
+ scope?: string | undefined;
2354
+ vendor_id?: string | undefined;
2355
+ response_type?: AuthorizationResponseType | undefined;
2356
+ response_mode?: AuthorizationResponseMode | undefined;
2357
+ redirect_uri?: string | undefined;
2358
+ state?: string | undefined;
2359
+ nonce?: string | undefined;
2360
+ code_challenge_method?: CodeChallengeMethod | undefined;
2361
+ code_challenge?: string | undefined;
2362
+ };
2363
+ expires_at: string;
2364
+ auth0Client?: string | undefined;
2031
2365
  }, {
2032
- name: string;
2033
2366
  created_at: string;
2034
2367
  updated_at: string;
2035
- id?: string | undefined;
2036
- client_secret?: string | undefined;
2037
- client_id?: string | undefined;
2038
- response_type?: AuthorizationResponseType | undefined;
2039
- response_mode?: AuthorizationResponseMode | undefined;
2040
- scope?: string | undefined;
2041
- authorization_endpoint?: string | undefined;
2042
- private_key?: string | undefined;
2043
- kid?: string | undefined;
2044
- team_id?: string | undefined;
2045
- token_endpoint?: string | undefined;
2046
- token_exchange_basic_auth?: boolean | undefined;
2047
- userinfo_endpoint?: string | undefined;
2368
+ id: string;
2369
+ authParams: {
2370
+ client_id: string;
2371
+ username?: string | undefined;
2372
+ audience?: string | undefined;
2373
+ scope?: string | undefined;
2374
+ vendor_id?: string | undefined;
2375
+ response_type?: AuthorizationResponseType | undefined;
2376
+ response_mode?: AuthorizationResponseMode | undefined;
2377
+ redirect_uri?: string | undefined;
2378
+ state?: string | undefined;
2379
+ nonce?: string | undefined;
2380
+ code_challenge_method?: CodeChallengeMethod | undefined;
2381
+ code_challenge?: string | undefined;
2382
+ };
2383
+ expires_at: string;
2384
+ auth0Client?: string | undefined;
2048
2385
  }>;
2049
- export type Connection = z.infer<typeof connectionSchema>;
2386
+ export type UniversalLoginSession = z.infer<typeof universalLoginSessionSchema>;
2050
2387
  export interface CodesAdapter {
2051
2388
  create: (tenant_id: string, authCode: Code) => Promise<void>;
2052
2389
  list: (tenant_id: string, user_id: string) => Promise<Code[]>;
@@ -2062,7 +2399,7 @@ export interface PasswordsAdapter {
2062
2399
  validate: (tenant_id: string, params: PasswordParams) => Promise<PasswordResponse>;
2063
2400
  }
2064
2401
  export interface SessionsAdapter {
2065
- create: (session: Session) => Promise<void>;
2402
+ create: (tenant_id: string, session: SessionInsert) => Promise<Session>;
2066
2403
  get: (tenant_id: string, id: string) => Promise<Session | null>;
2067
2404
  update: (tenant_id: string, id: string, session: {
2068
2405
  used_at: string;
@@ -2140,18 +2477,9 @@ export interface ApplicationsAdapter {
2140
2477
  }>;
2141
2478
  update(tenant_id: string, id: string, application: Partial<Application>): Promise<boolean>;
2142
2479
  }
2143
- export interface UniversalLoginSession {
2144
- id: string;
2145
- tenant_id: string;
2146
- created_at: string;
2147
- updated_at: string;
2148
- expires_at: string;
2149
- authParams: AuthParams;
2150
- auth0Client?: string;
2151
- }
2152
2480
  export interface UniversalLoginSessionsAdapter {
2153
- create: (session: UniversalLoginSession) => Promise<void>;
2154
- update: (id: string, session: UniversalLoginSession) => Promise<boolean>;
2481
+ create: (tenant_id: string, session: UniversalLoginSessionInsert) => Promise<void>;
2482
+ update: (tenant_id: string, id: string, session: UniversalLoginSession) => Promise<boolean>;
2155
2483
  get: (id: string) => Promise<UniversalLoginSession | null>;
2156
2484
  }
2157
2485
  export interface ListConnectionsResponse extends Totals {