@authhero/proxy 0.11.6 → 0.11.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/proxy.cjs +1 -1
- package/dist/proxy.mjs +603 -568
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +2 -2
package/dist/proxy.mjs
CHANGED
|
@@ -4,30 +4,43 @@ import { Hono as t } from "hono";
|
|
|
4
4
|
var n = e.object({
|
|
5
5
|
created_at: e.string(),
|
|
6
6
|
updated_at: e.string()
|
|
7
|
-
}), r = e.
|
|
7
|
+
}), r = e.enum([
|
|
8
|
+
"local",
|
|
9
|
+
"shared",
|
|
10
|
+
"platform"
|
|
11
|
+
]), i = e.enum([
|
|
12
|
+
"none",
|
|
13
|
+
"secrets",
|
|
14
|
+
"fields"
|
|
15
|
+
]), a = {
|
|
16
|
+
scope: r.optional(),
|
|
17
|
+
override: i.optional(),
|
|
18
|
+
enforce: e.boolean().optional()
|
|
19
|
+
}, o = e.object({
|
|
8
20
|
id: e.string(),
|
|
9
21
|
version: e.string().optional()
|
|
10
|
-
}),
|
|
22
|
+
}), s = e.object({
|
|
11
23
|
name: e.string(),
|
|
12
24
|
version: e.string()
|
|
13
|
-
}),
|
|
25
|
+
}), c = e.object({
|
|
14
26
|
name: e.string(),
|
|
15
27
|
value: e.string().optional()
|
|
16
|
-
}),
|
|
28
|
+
}), l = e.object({
|
|
17
29
|
name: e.string().max(255),
|
|
18
30
|
code: e.string().max(1e5),
|
|
19
|
-
supported_triggers: e.array(
|
|
31
|
+
supported_triggers: e.array(o).optional(),
|
|
20
32
|
runtime: e.string().max(50).optional(),
|
|
21
|
-
dependencies: e.array(
|
|
22
|
-
secrets: e.array(
|
|
33
|
+
dependencies: e.array(s).optional(),
|
|
34
|
+
secrets: e.array(c).optional(),
|
|
23
35
|
is_system: e.boolean().optional(),
|
|
36
|
+
...a,
|
|
24
37
|
inherit: e.boolean().optional()
|
|
25
38
|
});
|
|
26
|
-
|
|
39
|
+
l.partial().extend({
|
|
27
40
|
status: e.enum(["draft", "built"]).optional(),
|
|
28
41
|
deployed_at: e.string().optional()
|
|
29
42
|
});
|
|
30
|
-
var
|
|
43
|
+
var u = l.extend({
|
|
31
44
|
id: e.string(),
|
|
32
45
|
tenant_id: e.string(),
|
|
33
46
|
status: e.enum(["draft", "built"]).default("built"),
|
|
@@ -36,25 +49,25 @@ var s = o.extend({
|
|
|
36
49
|
name: e.string(),
|
|
37
50
|
value: e.string().optional()
|
|
38
51
|
})).optional()
|
|
39
|
-
}).extend(n.shape),
|
|
40
|
-
|
|
41
|
-
var
|
|
52
|
+
}).extend(n.shape), d = e.object({ name: e.string() });
|
|
53
|
+
u.extend({ secrets: e.array(d).optional() });
|
|
54
|
+
var f = e.string(), p = e.enum([
|
|
42
55
|
"unspecified",
|
|
43
56
|
"pending",
|
|
44
57
|
"final",
|
|
45
58
|
"partial",
|
|
46
59
|
"canceled",
|
|
47
60
|
"suspended"
|
|
48
|
-
]),
|
|
61
|
+
]), m = e.object({
|
|
49
62
|
id: e.string(),
|
|
50
63
|
msg: e.string(),
|
|
51
64
|
url: e.string().optional()
|
|
52
|
-
}),
|
|
65
|
+
}), h = e.object({
|
|
53
66
|
action_name: e.string(),
|
|
54
|
-
error:
|
|
67
|
+
error: m.nullable(),
|
|
55
68
|
started_at: e.string(),
|
|
56
69
|
ended_at: e.string()
|
|
57
|
-
}),
|
|
70
|
+
}), g = e.object({
|
|
58
71
|
level: e.enum([
|
|
59
72
|
"log",
|
|
60
73
|
"info",
|
|
@@ -63,17 +76,17 @@ var l = e.string(), u = e.enum([
|
|
|
63
76
|
"debug"
|
|
64
77
|
]),
|
|
65
78
|
message: e.string()
|
|
66
|
-
}),
|
|
79
|
+
}), _ = e.array(e.object({
|
|
67
80
|
action_name: e.string(),
|
|
68
|
-
lines: e.array(
|
|
81
|
+
lines: e.array(g)
|
|
69
82
|
}));
|
|
70
83
|
e.object({
|
|
71
84
|
id: e.string(),
|
|
72
85
|
tenant_id: e.string(),
|
|
73
|
-
trigger_id:
|
|
74
|
-
status:
|
|
75
|
-
results: e.array(
|
|
76
|
-
logs:
|
|
86
|
+
trigger_id: f,
|
|
87
|
+
status: p,
|
|
88
|
+
results: e.array(h),
|
|
89
|
+
logs: _.optional(),
|
|
77
90
|
created_at: e.string(),
|
|
78
91
|
updated_at: e.string()
|
|
79
92
|
}).omit({
|
|
@@ -84,21 +97,21 @@ e.object({
|
|
|
84
97
|
action_id: e.string(),
|
|
85
98
|
code: e.string().max(1e5),
|
|
86
99
|
runtime: e.string().max(50).optional(),
|
|
87
|
-
dependencies: e.array(
|
|
88
|
-
secrets: e.array(
|
|
89
|
-
supported_triggers: e.array(
|
|
100
|
+
dependencies: e.array(s).optional(),
|
|
101
|
+
secrets: e.array(c).optional(),
|
|
102
|
+
supported_triggers: e.array(o).optional(),
|
|
90
103
|
deployed: e.boolean().default(!0)
|
|
91
104
|
}).extend({
|
|
92
105
|
id: e.string(),
|
|
93
106
|
tenant_id: e.string(),
|
|
94
107
|
number: e.number().int()
|
|
95
108
|
}).extend(n.shape);
|
|
96
|
-
var
|
|
109
|
+
var ee = e.enum([
|
|
97
110
|
"user_action",
|
|
98
111
|
"admin_action",
|
|
99
112
|
"system",
|
|
100
113
|
"api"
|
|
101
|
-
]),
|
|
114
|
+
]), v = e.object({
|
|
102
115
|
type: e.enum([
|
|
103
116
|
"user",
|
|
104
117
|
"admin",
|
|
@@ -112,7 +125,7 @@ var h = e.enum([
|
|
|
112
125
|
org_name: e.string().optional(),
|
|
113
126
|
scopes: e.array(e.string()).optional(),
|
|
114
127
|
client_id: e.string().optional()
|
|
115
|
-
}),
|
|
128
|
+
}), te = e.object({
|
|
116
129
|
type: e.string(),
|
|
117
130
|
id: e.string(),
|
|
118
131
|
before: e.record(e.string(), e.unknown()).optional(),
|
|
@@ -121,7 +134,18 @@ var h = e.enum([
|
|
|
121
134
|
old: e.unknown(),
|
|
122
135
|
new: e.unknown()
|
|
123
136
|
})).optional()
|
|
124
|
-
}),
|
|
137
|
+
}), ne = e.object({
|
|
138
|
+
user: e.object({
|
|
139
|
+
user_id: e.string(),
|
|
140
|
+
name: e.string().optional(),
|
|
141
|
+
email: e.string().optional()
|
|
142
|
+
}).optional(),
|
|
143
|
+
strategy: e.string(),
|
|
144
|
+
credentials: e.object({
|
|
145
|
+
jti: e.string().optional(),
|
|
146
|
+
scopes: e.array(e.string()).optional()
|
|
147
|
+
}).optional()
|
|
148
|
+
}), re = e.object({
|
|
125
149
|
method: e.string(),
|
|
126
150
|
path: e.string(),
|
|
127
151
|
query: e.record(e.string(), e.string()).optional(),
|
|
@@ -130,18 +154,19 @@ var h = e.enum([
|
|
|
130
154
|
user_agent: e.string().optional(),
|
|
131
155
|
correlation_id: e.string().optional(),
|
|
132
156
|
redirect_uri: e.string().optional(),
|
|
133
|
-
authorization_url: e.string().optional()
|
|
134
|
-
|
|
157
|
+
authorization_url: e.string().optional(),
|
|
158
|
+
auth: ne.optional()
|
|
159
|
+
}), ie = e.object({
|
|
135
160
|
status_code: e.number(),
|
|
136
161
|
body: e.unknown().optional()
|
|
137
|
-
}),
|
|
162
|
+
}), ae = e.object({
|
|
138
163
|
country_code: e.string(),
|
|
139
164
|
city_name: e.string(),
|
|
140
165
|
latitude: e.string(),
|
|
141
166
|
longitude: e.string(),
|
|
142
167
|
time_zone: e.string(),
|
|
143
168
|
continent_code: e.string()
|
|
144
|
-
}),
|
|
169
|
+
}), oe = e.object({
|
|
145
170
|
name: e.string(),
|
|
146
171
|
version: e.string(),
|
|
147
172
|
env: e.record(e.string(), e.string()).optional()
|
|
@@ -151,11 +176,11 @@ e.object({
|
|
|
151
176
|
event_type: e.string(),
|
|
152
177
|
log_type: e.string(),
|
|
153
178
|
description: e.string().optional(),
|
|
154
|
-
category:
|
|
155
|
-
actor:
|
|
156
|
-
target:
|
|
157
|
-
request:
|
|
158
|
-
response:
|
|
179
|
+
category: ee,
|
|
180
|
+
actor: v,
|
|
181
|
+
target: te,
|
|
182
|
+
request: re,
|
|
183
|
+
response: ie.optional(),
|
|
159
184
|
connection: e.string().optional(),
|
|
160
185
|
connection_id: e.string().optional(),
|
|
161
186
|
client_name: e.string().optional(),
|
|
@@ -163,11 +188,13 @@ e.object({
|
|
|
163
188
|
strategy_type: e.string().optional(),
|
|
164
189
|
audience: e.string().optional(),
|
|
165
190
|
scope: e.string().optional(),
|
|
166
|
-
location:
|
|
167
|
-
auth0_client:
|
|
191
|
+
location: ae.optional(),
|
|
192
|
+
auth0_client: oe.optional(),
|
|
168
193
|
hostname: e.string(),
|
|
169
194
|
is_mobile: e.boolean().optional(),
|
|
170
195
|
execution_id: e.string().optional(),
|
|
196
|
+
details: e.record(e.string(), e.unknown()).optional(),
|
|
197
|
+
login_session_id: e.string().optional(),
|
|
171
198
|
timestamp: e.string()
|
|
172
199
|
}).extend({ id: e.string() }), e.enum([
|
|
173
200
|
"AUTH0",
|
|
@@ -180,14 +207,14 @@ e.object({
|
|
|
180
207
|
"SEND_REQUEST",
|
|
181
208
|
"SEND_EMAIL"
|
|
182
209
|
]), e.enum(["VERIFY_EMAIL"]);
|
|
183
|
-
var
|
|
210
|
+
var se = e.object({
|
|
184
211
|
require_mx_record: e.boolean().optional(),
|
|
185
212
|
block_aliases: e.boolean().optional(),
|
|
186
213
|
block_free_emails: e.boolean().optional(),
|
|
187
214
|
block_disposable_emails: e.boolean().optional(),
|
|
188
215
|
blocklist: e.array(e.string()).optional(),
|
|
189
216
|
allowlist: e.array(e.string()).optional()
|
|
190
|
-
}),
|
|
217
|
+
}), ce = e.object({
|
|
191
218
|
id: e.string(),
|
|
192
219
|
alias: e.string().max(100).optional(),
|
|
193
220
|
type: e.literal("AUTH0"),
|
|
@@ -199,7 +226,7 @@ var re = e.object({
|
|
|
199
226
|
user_id: e.string(),
|
|
200
227
|
changes: e.record(e.string(), e.any())
|
|
201
228
|
})
|
|
202
|
-
}),
|
|
229
|
+
}), le = e.object({
|
|
203
230
|
id: e.string(),
|
|
204
231
|
alias: e.string().max(100).optional(),
|
|
205
232
|
type: e.literal("EMAIL"),
|
|
@@ -208,13 +235,13 @@ var re = e.object({
|
|
|
208
235
|
mask_output: e.boolean().optional(),
|
|
209
236
|
params: e.object({
|
|
210
237
|
email: e.string(),
|
|
211
|
-
rules:
|
|
238
|
+
rules: se.optional()
|
|
212
239
|
})
|
|
213
|
-
}),
|
|
240
|
+
}), ue = e.enum([
|
|
214
241
|
"change-email",
|
|
215
242
|
"account",
|
|
216
243
|
"custom"
|
|
217
|
-
]),
|
|
244
|
+
]), de = e.object({
|
|
218
245
|
id: e.string(),
|
|
219
246
|
alias: e.string().max(100).optional(),
|
|
220
247
|
type: e.literal("REDIRECT"),
|
|
@@ -222,17 +249,17 @@ var re = e.object({
|
|
|
222
249
|
allow_failure: e.boolean().optional(),
|
|
223
250
|
mask_output: e.boolean().optional(),
|
|
224
251
|
params: e.object({
|
|
225
|
-
target:
|
|
252
|
+
target: ue.openapi({ description: "The predefined target to redirect to, or 'custom' for a custom URL" }),
|
|
226
253
|
custom_url: e.string().optional().openapi({ description: "Custom URL to redirect to when target is 'custom'" })
|
|
227
254
|
})
|
|
228
|
-
}),
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
255
|
+
}), fe = e.union([
|
|
256
|
+
ce,
|
|
257
|
+
le,
|
|
258
|
+
de
|
|
232
259
|
]);
|
|
233
260
|
e.object({
|
|
234
261
|
name: e.string().min(1).max(150).openapi({ description: "The name of the flow" }),
|
|
235
|
-
actions: e.array(
|
|
262
|
+
actions: e.array(fe).optional().default([]).openapi({ description: "The list of actions to execute in sequence" })
|
|
236
263
|
}).extend(n.shape).extend({ id: e.string().openapi({
|
|
237
264
|
description: "Unique identifier for the flow",
|
|
238
265
|
example: "af_12tMpdJ3iek7svMyZkSh5M"
|
|
@@ -249,7 +276,7 @@ e.object({
|
|
|
249
276
|
total: e.number().optional(),
|
|
250
277
|
next: e.string().optional()
|
|
251
278
|
});
|
|
252
|
-
var
|
|
279
|
+
var pe = e.object({
|
|
253
280
|
email: e.string().optional(),
|
|
254
281
|
email_verified: e.boolean().optional(),
|
|
255
282
|
name: e.string().optional(),
|
|
@@ -258,7 +285,7 @@ var le = e.object({
|
|
|
258
285
|
phone_number: e.string().optional(),
|
|
259
286
|
phone_verified: e.boolean().optional(),
|
|
260
287
|
family_name: e.string().optional()
|
|
261
|
-
}).catchall(e.any()),
|
|
288
|
+
}).catchall(e.any()), me = e.object({
|
|
262
289
|
connection: e.string(),
|
|
263
290
|
user_id: e.string(),
|
|
264
291
|
provider: e.string(),
|
|
@@ -271,15 +298,15 @@ var le = e.object({
|
|
|
271
298
|
access_token: e.string().optional(),
|
|
272
299
|
access_token_secret: e.string().optional(),
|
|
273
300
|
refresh_token: e.string().optional(),
|
|
274
|
-
profileData:
|
|
275
|
-
}),
|
|
301
|
+
profileData: pe.optional()
|
|
302
|
+
}), he = e.object({
|
|
276
303
|
formatted: e.string().optional(),
|
|
277
304
|
street_address: e.string().optional(),
|
|
278
305
|
locality: e.string().optional(),
|
|
279
306
|
region: e.string().optional(),
|
|
280
307
|
postal_code: e.string().optional(),
|
|
281
308
|
country: e.string().optional()
|
|
282
|
-
}).optional(),
|
|
309
|
+
}).optional(), ge = e.object({
|
|
283
310
|
email: e.string().transform((e) => e.toLowerCase()).optional(),
|
|
284
311
|
username: e.string().refine((e) => !e.includes("@"), { message: "Usernames must not contain \"@\". Use the email field for email addresses." }).optional(),
|
|
285
312
|
phone_number: e.string().optional(),
|
|
@@ -302,9 +329,9 @@ var le = e.object({
|
|
|
302
329
|
gender: e.string().optional(),
|
|
303
330
|
birthdate: e.string().optional(),
|
|
304
331
|
zoneinfo: e.string().optional(),
|
|
305
|
-
address:
|
|
332
|
+
address: he
|
|
306
333
|
});
|
|
307
|
-
|
|
334
|
+
ge.extend({
|
|
308
335
|
email_verified: e.boolean().default(!1),
|
|
309
336
|
verify_email: e.boolean().optional(),
|
|
310
337
|
last_ip: e.string().optional(),
|
|
@@ -325,24 +352,24 @@ fe.extend({
|
|
|
325
352
|
is_social: e.boolean(),
|
|
326
353
|
email: e.string().optional(),
|
|
327
354
|
login_count: e.number().default(0),
|
|
328
|
-
identities: e.array(
|
|
329
|
-
}).omit({ registration_completed_at: !0 }),
|
|
355
|
+
identities: e.array(me).optional()
|
|
356
|
+
}).omit({ registration_completed_at: !0 }), ge.extend({
|
|
330
357
|
login_count: e.number(),
|
|
331
358
|
multifactor: e.array(e.string()).optional(),
|
|
332
359
|
last_ip: e.string().optional(),
|
|
333
360
|
last_login: e.string().optional(),
|
|
334
361
|
user_id: e.string()
|
|
335
362
|
}).catchall(e.any());
|
|
336
|
-
var
|
|
363
|
+
var _e = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", ve = (e = 21) => {
|
|
337
364
|
let t = "", n = crypto.getRandomValues(new Uint8Array(e |= 0));
|
|
338
|
-
for (; e--;) t +=
|
|
365
|
+
for (; e--;) t += _e[n[e] & 63];
|
|
339
366
|
return t;
|
|
340
|
-
},
|
|
367
|
+
}, ye = e.object({
|
|
341
368
|
client_id: e.string().optional().openapi({ description: "ID of this client. Generated server-side if omitted (Auth0 behavior)." }),
|
|
342
369
|
name: e.string().min(1).openapi({ description: "Name of this client (min length: 1 character, does not allow < or >)." }),
|
|
343
370
|
description: e.string().max(140).optional().openapi({ description: "Free text description of this client (max length: 140 characters)." }),
|
|
344
371
|
global: e.boolean().default(!1).openapi({ description: "Whether this is your global 'All Applications' client representing legacy tenant settings (true) or a regular client (false)." }),
|
|
345
|
-
client_secret: e.string().default(() =>
|
|
372
|
+
client_secret: e.string().default(() => ve()).optional().openapi({ description: "Client secret (which you must not make public)." }),
|
|
346
373
|
app_type: e.enum([
|
|
347
374
|
"native",
|
|
348
375
|
"spa",
|
|
@@ -460,8 +487,8 @@ var pe = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", me
|
|
|
460
487
|
e.object({
|
|
461
488
|
created_at: e.string(),
|
|
462
489
|
updated_at: e.string()
|
|
463
|
-
}).extend(
|
|
464
|
-
var
|
|
490
|
+
}).extend(ye.shape).extend({ client_id: e.string() });
|
|
491
|
+
var be = e.object({
|
|
465
492
|
client_id: e.string().min(1).openapi({ description: "ID of the client." }),
|
|
466
493
|
audience: e.string().min(1).openapi({ description: "The audience (API identifier) of this client grant." }),
|
|
467
494
|
scope: e.array(e.string()).optional().openapi({ description: "Scopes allowed for this client grant." }),
|
|
@@ -474,15 +501,15 @@ var ge = e.object({
|
|
|
474
501
|
is_system: e.boolean().optional().openapi({ description: "If enabled, this grant is a special grant created by Auth0. It cannot be modified or deleted directly." }),
|
|
475
502
|
subject_type: e.enum(["client", "user"]).optional().openapi({ description: "The type of application access the client grant allows. Use of this field is subject to the applicable Free Trial terms in Okta's Master Subscription Agreement." }),
|
|
476
503
|
authorization_details_types: e.array(e.string()).optional().openapi({ description: "Types of authorization_details allowed for this client grant. Use of this field is subject to the applicable Free Trial terms in Okta's Master Subscription Agreement." })
|
|
477
|
-
}),
|
|
504
|
+
}), xe = e.object({ id: e.string().openapi({ description: "ID of the client grant." }) }).extend(be.shape).extend({
|
|
478
505
|
created_at: e.string().optional(),
|
|
479
506
|
updated_at: e.string().optional()
|
|
480
507
|
});
|
|
481
|
-
e.array(
|
|
482
|
-
var
|
|
508
|
+
e.array(xe);
|
|
509
|
+
var Se = e.enum(["iat", "rat"]), Ce = e.object({
|
|
483
510
|
id: e.string(),
|
|
484
511
|
token_hash: e.string(),
|
|
485
|
-
type:
|
|
512
|
+
type: Se,
|
|
486
513
|
client_id: e.string().optional(),
|
|
487
514
|
sub: e.string().optional(),
|
|
488
515
|
constraints: e.record(e.string(), e.unknown()).optional(),
|
|
@@ -493,23 +520,23 @@ e.object({
|
|
|
493
520
|
created_at: e.string(),
|
|
494
521
|
used_at: e.string().optional(),
|
|
495
522
|
revoked_at: e.string().optional()
|
|
496
|
-
}).extend(
|
|
523
|
+
}).extend(Ce.shape);
|
|
497
524
|
var y = e.object({
|
|
498
525
|
x: e.number(),
|
|
499
526
|
y: e.number()
|
|
500
|
-
}),
|
|
527
|
+
}), we = /* @__PURE__ */ function(e) {
|
|
501
528
|
return e.RICH_TEXT = "RICH_TEXT", e.NEXT_BUTTON = "NEXT_BUTTON", e.BACK_BUTTON = "BACK_BUTTON", e.SUBMIT_BUTTON = "SUBMIT_BUTTON", e.DIVIDER = "DIVIDER", e.TEXT = "TEXT", e.EMAIL = "EMAIL", e.PASSWORD = "PASSWORD", e.NUMBER = "NUMBER", e.PHONE = "PHONE", e.DATE = "DATE", e.CHECKBOX = "CHECKBOX", e.RADIO = "RADIO", e.SELECT = "SELECT", e.HIDDEN = "HIDDEN", e.LEGAL = "LEGAL", e;
|
|
502
|
-
}({}),
|
|
529
|
+
}({}), Te = /* @__PURE__ */ function(e) {
|
|
503
530
|
return e.BLOCK = "BLOCK", e.FIELD = "FIELD", e;
|
|
504
531
|
}({}), b = e.object({
|
|
505
532
|
id: e.string(),
|
|
506
|
-
category: e.nativeEnum(
|
|
507
|
-
type: e.nativeEnum(
|
|
508
|
-
}),
|
|
533
|
+
category: e.nativeEnum(Te),
|
|
534
|
+
type: e.nativeEnum(we)
|
|
535
|
+
}), Ee = b.extend({
|
|
509
536
|
category: e.literal("BLOCK"),
|
|
510
537
|
type: e.literal("RICH_TEXT"),
|
|
511
538
|
config: e.object({ content: e.string() }).passthrough()
|
|
512
|
-
}),
|
|
539
|
+
}), De = b.extend({
|
|
513
540
|
category: e.literal("BLOCK"),
|
|
514
541
|
type: e.union([
|
|
515
542
|
e.literal("NEXT_BUTTON"),
|
|
@@ -517,13 +544,13 @@ var y = e.object({
|
|
|
517
544
|
e.literal("SUBMIT_BUTTON")
|
|
518
545
|
]),
|
|
519
546
|
config: e.object({ text: e.string() }).passthrough()
|
|
520
|
-
}),
|
|
547
|
+
}), Oe = b.extend({
|
|
521
548
|
category: e.literal("FIELD"),
|
|
522
549
|
type: e.literal("LEGAL"),
|
|
523
550
|
required: e.boolean().optional(),
|
|
524
551
|
sensitive: e.boolean().optional(),
|
|
525
552
|
config: e.object({ text: e.string() }).passthrough()
|
|
526
|
-
}),
|
|
553
|
+
}), ke = b.extend({
|
|
527
554
|
category: e.literal("FIELD"),
|
|
528
555
|
type: e.union([
|
|
529
556
|
e.literal("TEXT"),
|
|
@@ -543,26 +570,26 @@ var y = e.object({
|
|
|
543
570
|
label: e.string().optional(),
|
|
544
571
|
placeholder: e.string().optional()
|
|
545
572
|
}).passthrough()
|
|
546
|
-
}),
|
|
573
|
+
}), Ae = e.object({
|
|
547
574
|
id: e.string(),
|
|
548
575
|
category: e.string(),
|
|
549
576
|
type: e.string()
|
|
550
|
-
}).passthrough(),
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
]),
|
|
577
|
+
}).passthrough(), je = e.union([
|
|
578
|
+
Ee,
|
|
579
|
+
De,
|
|
580
|
+
Oe,
|
|
581
|
+
ke,
|
|
582
|
+
Ae
|
|
583
|
+
]), Me = e.object({
|
|
557
584
|
id: e.string(),
|
|
558
585
|
type: e.literal("STEP"),
|
|
559
586
|
coordinates: y,
|
|
560
587
|
alias: e.string().optional(),
|
|
561
588
|
config: e.object({
|
|
562
|
-
components: e.array(
|
|
589
|
+
components: e.array(je),
|
|
563
590
|
next_node: e.string()
|
|
564
591
|
}).passthrough()
|
|
565
|
-
}),
|
|
592
|
+
}), Ne = e.object({
|
|
566
593
|
id: e.string(),
|
|
567
594
|
type: e.literal("FLOW"),
|
|
568
595
|
coordinates: y,
|
|
@@ -571,7 +598,7 @@ var y = e.object({
|
|
|
571
598
|
flow_id: e.string(),
|
|
572
599
|
next_node: e.string()
|
|
573
600
|
})
|
|
574
|
-
}),
|
|
601
|
+
}), Pe = e.object({
|
|
575
602
|
id: e.string(),
|
|
576
603
|
type: e.literal("ACTION"),
|
|
577
604
|
coordinates: y,
|
|
@@ -586,19 +613,19 @@ var y = e.object({
|
|
|
586
613
|
custom_url: e.string().optional().openapi({ description: "Custom URL when target is 'custom'" }),
|
|
587
614
|
next_node: e.string().openapi({ description: "The next node to navigate to after action (for non-redirect actions)" })
|
|
588
615
|
}).passthrough()
|
|
589
|
-
}),
|
|
616
|
+
}), Fe = e.object({
|
|
590
617
|
id: e.string(),
|
|
591
618
|
type: e.string(),
|
|
592
619
|
coordinates: y
|
|
593
|
-
}).passthrough(),
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
]),
|
|
620
|
+
}).passthrough(), Ie = e.union([
|
|
621
|
+
Me,
|
|
622
|
+
Ne,
|
|
623
|
+
Pe,
|
|
624
|
+
Fe
|
|
625
|
+
]), Le = e.object({
|
|
599
626
|
next_node: e.string(),
|
|
600
627
|
coordinates: y
|
|
601
|
-
}).passthrough(),
|
|
628
|
+
}).passthrough(), Re = e.object({
|
|
602
629
|
resume_flow: e.boolean().optional(),
|
|
603
630
|
coordinates: y
|
|
604
631
|
}).passthrough();
|
|
@@ -606,9 +633,9 @@ e.object({
|
|
|
606
633
|
id: e.string(),
|
|
607
634
|
name: e.string(),
|
|
608
635
|
languages: e.object({ primary: e.string() }).passthrough(),
|
|
609
|
-
nodes: e.array(
|
|
610
|
-
start:
|
|
611
|
-
ending:
|
|
636
|
+
nodes: e.array(Ie),
|
|
637
|
+
start: Le,
|
|
638
|
+
ending: Re,
|
|
612
639
|
created_at: e.string(),
|
|
613
640
|
updated_at: e.string(),
|
|
614
641
|
links: e.object({
|
|
@@ -620,24 +647,24 @@ e.object({
|
|
|
620
647
|
created_at: !0,
|
|
621
648
|
updated_at: !0
|
|
622
649
|
});
|
|
623
|
-
var
|
|
650
|
+
var ze = /* @__PURE__ */ function(e) {
|
|
624
651
|
return e.TOKEN = "token", e.ID_TOKEN = "id_token", e.TOKEN_ID_TOKEN = "id_token token", e.CODE = "code", e.CODE_ID_TOKEN = "code id_token", e.CODE_TOKEN = "code token", e.CODE_ID_TOKEN_TOKEN = "code id_token token", e;
|
|
625
|
-
}({}),
|
|
652
|
+
}({}), Be = /* @__PURE__ */ function(e) {
|
|
626
653
|
return e.QUERY = "query", e.FRAGMENT = "fragment", e.FORM_POST = "form_post", e.WEB_MESSAGE = "web_message", e.SAML_POST = "saml_post", e;
|
|
627
|
-
}({}),
|
|
654
|
+
}({}), Ve = /* @__PURE__ */ function(e) {
|
|
628
655
|
return e.S256 = "S256", e.Plain = "plain", e;
|
|
629
|
-
}({}),
|
|
656
|
+
}({}), x = e.union([e.null(), e.object({
|
|
630
657
|
essential: e.boolean().optional(),
|
|
631
658
|
value: e.unknown().optional(),
|
|
632
659
|
values: e.array(e.unknown()).optional()
|
|
633
|
-
})]).nullable(),
|
|
634
|
-
userinfo: e.record(e.string(),
|
|
635
|
-
id_token: e.record(e.string(),
|
|
636
|
-
}),
|
|
660
|
+
})]).nullable(), He = e.object({
|
|
661
|
+
userinfo: e.record(e.string(), x).optional(),
|
|
662
|
+
id_token: e.record(e.string(), x).optional()
|
|
663
|
+
}), Ue = e.object({
|
|
637
664
|
client_id: e.string(),
|
|
638
665
|
act_as: e.string().optional(),
|
|
639
|
-
response_type: e.nativeEnum(
|
|
640
|
-
response_mode: e.nativeEnum(
|
|
666
|
+
response_type: e.nativeEnum(ze).optional(),
|
|
667
|
+
response_mode: e.nativeEnum(Be).optional(),
|
|
641
668
|
redirect_uri: e.string().optional(),
|
|
642
669
|
audience: e.string().optional(),
|
|
643
670
|
organization: e.string().optional(),
|
|
@@ -645,16 +672,17 @@ var Fe = /* @__PURE__ */ function(e) {
|
|
|
645
672
|
nonce: e.string().optional(),
|
|
646
673
|
scope: e.string().optional(),
|
|
647
674
|
prompt: e.string().optional(),
|
|
648
|
-
code_challenge_method: e.nativeEnum(
|
|
675
|
+
code_challenge_method: e.nativeEnum(Ve).optional(),
|
|
649
676
|
code_challenge: e.string().optional(),
|
|
650
677
|
username: e.string().optional(),
|
|
651
678
|
ui_locales: e.string().optional(),
|
|
652
679
|
max_age: e.number().optional(),
|
|
653
680
|
acr_values: e.string().optional(),
|
|
654
|
-
claims:
|
|
681
|
+
claims: He.optional(),
|
|
655
682
|
vendor_id: e.string().optional()
|
|
656
683
|
});
|
|
657
684
|
e.object({
|
|
685
|
+
...a,
|
|
658
686
|
colors: e.object({
|
|
659
687
|
primary: e.string(),
|
|
660
688
|
page_background: e.union([e.string(), e.object({
|
|
@@ -674,7 +702,7 @@ e.object({
|
|
|
674
702
|
"auto"
|
|
675
703
|
]).optional()
|
|
676
704
|
});
|
|
677
|
-
var
|
|
705
|
+
var We = e.enum([
|
|
678
706
|
"password_reset",
|
|
679
707
|
"email_verification",
|
|
680
708
|
"otp",
|
|
@@ -689,7 +717,7 @@ e.object({
|
|
|
689
717
|
code_id: e.string().openapi({ description: "The code that will be used in for instance an email verification flow" }),
|
|
690
718
|
login_id: e.string().optional().openapi({ description: "The id of the login session that the code is connected to" }),
|
|
691
719
|
connection_id: e.string().optional().openapi({ description: "The connection that the code is connected to" }),
|
|
692
|
-
code_type:
|
|
720
|
+
code_type: We,
|
|
693
721
|
code_verifier: e.string().optional().openapi({ description: "The code verifier used in PKCE in outbound flows" }),
|
|
694
722
|
code_challenge: e.string().optional().openapi({ description: "The code challenge used in PKCE in outbound flows" }),
|
|
695
723
|
code_challenge_method: e.enum(["plain", "S256"]).optional().openapi({ description: "The code challenge method used in PKCE in outbound flows" }),
|
|
@@ -701,7 +729,7 @@ e.object({
|
|
|
701
729
|
used_at: e.string().optional(),
|
|
702
730
|
user_id: e.string().optional()
|
|
703
731
|
}).extend({ created_at: e.string() });
|
|
704
|
-
var
|
|
732
|
+
var Ge = e.object({
|
|
705
733
|
kid: e.string().optional(),
|
|
706
734
|
team_id: e.string().optional(),
|
|
707
735
|
realms: e.string().optional(),
|
|
@@ -821,37 +849,38 @@ var He = e.object({
|
|
|
821
849
|
"never_on_login"
|
|
822
850
|
]).optional()
|
|
823
851
|
});
|
|
824
|
-
function
|
|
852
|
+
function S(e) {
|
|
825
853
|
if (e !== null) {
|
|
826
|
-
if (Array.isArray(e)) return e.filter((e) => e !== null).map(
|
|
854
|
+
if (Array.isArray(e)) return e.filter((e) => e !== null).map(S);
|
|
827
855
|
if (e && typeof e == "object") {
|
|
828
856
|
let t = {};
|
|
829
|
-
for (let [n, r] of Object.entries(e)) r !== null && (t[n] =
|
|
857
|
+
for (let [n, r] of Object.entries(e)) r !== null && (t[n] = S(r));
|
|
830
858
|
return t;
|
|
831
859
|
}
|
|
832
860
|
return e;
|
|
833
861
|
}
|
|
834
862
|
}
|
|
835
|
-
var
|
|
863
|
+
var Ke = e.object({
|
|
836
864
|
id: e.string().optional(),
|
|
837
865
|
name: e.string(),
|
|
838
866
|
display_name: e.string().optional(),
|
|
839
867
|
strategy: e.string(),
|
|
840
|
-
options: e.preprocess((e) => e === null ? {} :
|
|
868
|
+
options: e.preprocess((e) => e === null ? {} : S(e), Ge).default({}),
|
|
841
869
|
enabled_clients: e.array(e.string()).default([]).optional(),
|
|
842
|
-
response_type: e.nativeEnum(
|
|
843
|
-
response_mode: e.nativeEnum(
|
|
870
|
+
response_type: e.nativeEnum(ze).optional(),
|
|
871
|
+
response_mode: e.nativeEnum(Be).optional(),
|
|
844
872
|
is_domain_connection: e.boolean().optional(),
|
|
845
873
|
show_as_button: e.boolean().optional(),
|
|
846
874
|
metadata: e.record(e.string(), e.any()).optional(),
|
|
847
|
-
is_system: e.boolean().optional()
|
|
875
|
+
is_system: e.boolean().optional(),
|
|
876
|
+
...a
|
|
848
877
|
});
|
|
849
878
|
e.object({
|
|
850
879
|
id: e.string(),
|
|
851
880
|
created_at: e.string().transform((e) => e === null ? "" : e),
|
|
852
881
|
updated_at: e.string().transform((e) => e === null ? "" : e)
|
|
853
|
-
}).extend(
|
|
854
|
-
var
|
|
882
|
+
}).extend(Ke.shape);
|
|
883
|
+
var qe = e.object({
|
|
855
884
|
domain: e.string(),
|
|
856
885
|
custom_domain_id: e.string().optional(),
|
|
857
886
|
type: e.enum(["auth0_managed_certs", "self_managed_certs"]),
|
|
@@ -865,7 +894,7 @@ var We = e.object({
|
|
|
865
894
|
"null"
|
|
866
895
|
]).optional(),
|
|
867
896
|
domain_metadata: e.record(e.string(), e.string().max(255)).optional()
|
|
868
|
-
}),
|
|
897
|
+
}), Je = e.discriminatedUnion("name", [e.object({
|
|
869
898
|
name: e.literal("txt"),
|
|
870
899
|
record: e.string(),
|
|
871
900
|
domain: e.string()
|
|
@@ -873,7 +902,7 @@ var We = e.object({
|
|
|
873
902
|
name: e.literal("http"),
|
|
874
903
|
http_body: e.string(),
|
|
875
904
|
http_url: e.string()
|
|
876
|
-
})]),
|
|
905
|
+
})]), Ye = qe.extend({
|
|
877
906
|
custom_domain_id: e.string(),
|
|
878
907
|
primary: e.boolean(),
|
|
879
908
|
status: e.enum([
|
|
@@ -883,28 +912,28 @@ var We = e.object({
|
|
|
883
912
|
"ready"
|
|
884
913
|
]),
|
|
885
914
|
origin_domain_name: e.string().optional(),
|
|
886
|
-
verification: e.object({ methods: e.array(
|
|
915
|
+
verification: e.object({ methods: e.array(Je) }).optional(),
|
|
887
916
|
tls_policy: e.string().optional()
|
|
888
917
|
});
|
|
889
|
-
|
|
918
|
+
qe.pick({
|
|
890
919
|
tls_policy: !0,
|
|
891
920
|
custom_client_ip_header: !0,
|
|
892
921
|
domain_metadata: !0
|
|
893
|
-
}).strict(),
|
|
922
|
+
}).strict(), Ye.extend({ tenant_id: e.string() }), e.object({
|
|
894
923
|
certificate: e.string().regex(/^-----BEGIN CERTIFICATE-----[\s\S]+-----END CERTIFICATE-----\s*$/, "must be PEM-encoded; include the full certificate chain in leaf-first order"),
|
|
895
924
|
private_key: e.string().regex(/-----BEGIN (RSA |EC |ENCRYPTED )?PRIVATE KEY-----[\s\S]+-----END \1PRIVATE KEY-----\s*$/, "must be a PEM-encoded private key")
|
|
896
925
|
});
|
|
897
|
-
var
|
|
926
|
+
var C = e.object({
|
|
898
927
|
id: e.string(),
|
|
899
928
|
order: e.number().optional(),
|
|
900
929
|
visible: e.boolean().optional().default(!0)
|
|
901
|
-
}),
|
|
930
|
+
}), w = C.extend({ category: e.literal("BLOCK").optional() }), Xe = w.extend({
|
|
902
931
|
type: e.literal("DIVIDER"),
|
|
903
932
|
config: e.object({ text: e.string().optional() }).optional()
|
|
904
|
-
}),
|
|
933
|
+
}), Ze = w.extend({
|
|
905
934
|
type: e.literal("HTML"),
|
|
906
935
|
config: e.object({ content: e.string().optional() }).optional()
|
|
907
|
-
}),
|
|
936
|
+
}), Qe = w.extend({
|
|
908
937
|
type: e.literal("IMAGE"),
|
|
909
938
|
config: e.object({
|
|
910
939
|
src: e.string().optional(),
|
|
@@ -912,47 +941,47 @@ var S = e.object({
|
|
|
912
941
|
width: e.number().optional(),
|
|
913
942
|
height: e.number().optional()
|
|
914
943
|
}).optional()
|
|
915
|
-
}),
|
|
944
|
+
}), $e = w.extend({
|
|
916
945
|
type: e.literal("JUMP_BUTTON"),
|
|
917
946
|
config: e.object({
|
|
918
947
|
text: e.string().optional(),
|
|
919
948
|
target_step: e.string().optional()
|
|
920
949
|
})
|
|
921
|
-
}),
|
|
950
|
+
}), et = w.extend({
|
|
922
951
|
type: e.literal("RESEND_BUTTON"),
|
|
923
952
|
config: e.object({
|
|
924
953
|
text: e.string().optional(),
|
|
925
954
|
resend_action: e.string().optional()
|
|
926
955
|
})
|
|
927
|
-
}),
|
|
956
|
+
}), tt = w.extend({
|
|
928
957
|
type: e.literal("NEXT_BUTTON"),
|
|
929
958
|
config: e.object({
|
|
930
959
|
text: e.string().optional(),
|
|
931
960
|
variant: e.enum(["primary", "secondary"]).optional(),
|
|
932
961
|
skip_validation: e.boolean().optional()
|
|
933
962
|
})
|
|
934
|
-
}),
|
|
963
|
+
}), nt = w.extend({
|
|
935
964
|
type: e.literal("PREVIOUS_BUTTON"),
|
|
936
965
|
config: e.object({ text: e.string().optional() })
|
|
937
|
-
}),
|
|
966
|
+
}), rt = w.extend({
|
|
938
967
|
type: e.literal("RICH_TEXT"),
|
|
939
968
|
config: e.object({ content: e.string().optional() }).optional()
|
|
940
|
-
}),
|
|
969
|
+
}), T = C.extend({
|
|
941
970
|
category: e.literal("WIDGET").optional(),
|
|
942
971
|
label: e.string().min(1).optional(),
|
|
943
972
|
hint: e.string().min(1).max(500).optional(),
|
|
944
973
|
required: e.boolean().optional(),
|
|
945
974
|
sensitive: e.boolean().optional()
|
|
946
|
-
}),
|
|
975
|
+
}), it = T.extend({
|
|
947
976
|
type: e.literal("AUTH0_VERIFIABLE_CREDENTIALS"),
|
|
948
977
|
config: e.object({ credential_type: e.string().optional() })
|
|
949
|
-
}),
|
|
978
|
+
}), at = T.extend({
|
|
950
979
|
type: e.literal("GMAPS_ADDRESS"),
|
|
951
980
|
config: e.object({ api_key: e.string().optional() })
|
|
952
|
-
}),
|
|
981
|
+
}), ot = T.extend({
|
|
953
982
|
type: e.literal("RECAPTCHA"),
|
|
954
983
|
config: e.object({ site_key: e.string().optional() })
|
|
955
|
-
}),
|
|
984
|
+
}), E = C.extend({
|
|
956
985
|
category: e.literal("FIELD").optional(),
|
|
957
986
|
label: e.string().min(1).optional(),
|
|
958
987
|
hint: e.string().min(1).max(500).optional(),
|
|
@@ -968,10 +997,10 @@ var S = e.object({
|
|
|
968
997
|
})).optional(),
|
|
969
998
|
required: e.boolean().optional(),
|
|
970
999
|
sensitive: e.boolean().optional()
|
|
971
|
-
}),
|
|
1000
|
+
}), st = E.extend({
|
|
972
1001
|
type: e.literal("BOOLEAN"),
|
|
973
1002
|
config: e.object({ default_value: e.boolean().optional() }).optional()
|
|
974
|
-
}),
|
|
1003
|
+
}), ct = E.extend({
|
|
975
1004
|
type: e.literal("CARDS"),
|
|
976
1005
|
config: e.object({
|
|
977
1006
|
options: e.array(e.object({
|
|
@@ -982,7 +1011,7 @@ var S = e.object({
|
|
|
982
1011
|
})).optional(),
|
|
983
1012
|
multi_select: e.boolean().optional()
|
|
984
1013
|
}).optional()
|
|
985
|
-
}),
|
|
1014
|
+
}), lt = E.extend({
|
|
986
1015
|
type: e.literal("CHOICE"),
|
|
987
1016
|
config: e.object({
|
|
988
1017
|
options: e.array(e.object({
|
|
@@ -993,7 +1022,7 @@ var S = e.object({
|
|
|
993
1022
|
multiple: e.boolean().optional(),
|
|
994
1023
|
default_value: e.union([e.string(), e.array(e.string())]).optional()
|
|
995
1024
|
}).optional()
|
|
996
|
-
}),
|
|
1025
|
+
}), ut = E.extend({
|
|
997
1026
|
type: e.literal("CODE"),
|
|
998
1027
|
config: e.object({
|
|
999
1028
|
length: e.number().int().positive().max(100).optional(),
|
|
@@ -1010,7 +1039,7 @@ var S = e.object({
|
|
|
1010
1039
|
message: "default_value is longer than the configured length",
|
|
1011
1040
|
path: ["default_value"]
|
|
1012
1041
|
}).optional()
|
|
1013
|
-
}),
|
|
1042
|
+
}), dt = E.extend({
|
|
1014
1043
|
type: e.literal("CUSTOM"),
|
|
1015
1044
|
config: e.object({
|
|
1016
1045
|
component: e.string().optional(),
|
|
@@ -1018,7 +1047,7 @@ var S = e.object({
|
|
|
1018
1047
|
schema: e.record(e.string(), e.any()).optional(),
|
|
1019
1048
|
code: e.string().optional()
|
|
1020
1049
|
})
|
|
1021
|
-
}),
|
|
1050
|
+
}), ft = E.extend({
|
|
1022
1051
|
type: e.literal("DATE"),
|
|
1023
1052
|
config: e.object({
|
|
1024
1053
|
format: e.string().optional(),
|
|
@@ -1026,7 +1055,7 @@ var S = e.object({
|
|
|
1026
1055
|
max: e.string().optional(),
|
|
1027
1056
|
default_value: e.string().optional()
|
|
1028
1057
|
}).optional()
|
|
1029
|
-
}),
|
|
1058
|
+
}), pt = E.extend({
|
|
1030
1059
|
type: e.literal("DROPDOWN"),
|
|
1031
1060
|
config: e.object({
|
|
1032
1061
|
options: e.array(e.object({
|
|
@@ -1038,7 +1067,7 @@ var S = e.object({
|
|
|
1038
1067
|
multiple: e.boolean().optional(),
|
|
1039
1068
|
default_value: e.union([e.string(), e.array(e.string())]).optional()
|
|
1040
1069
|
}).optional()
|
|
1041
|
-
}),
|
|
1070
|
+
}), mt = E.extend({
|
|
1042
1071
|
type: e.literal("EMAIL"),
|
|
1043
1072
|
config: e.object({
|
|
1044
1073
|
placeholder: e.string().optional(),
|
|
@@ -1046,20 +1075,20 @@ var S = e.object({
|
|
|
1046
1075
|
last_used: e.boolean().optional(),
|
|
1047
1076
|
last_used_label: e.string().optional()
|
|
1048
1077
|
}).optional()
|
|
1049
|
-
}),
|
|
1078
|
+
}), ht = E.extend({
|
|
1050
1079
|
type: e.literal("FILE"),
|
|
1051
1080
|
config: e.object({
|
|
1052
1081
|
accept: e.string().optional(),
|
|
1053
1082
|
max_size: e.number().optional(),
|
|
1054
1083
|
multiple: e.boolean().optional()
|
|
1055
1084
|
}).optional()
|
|
1056
|
-
}),
|
|
1085
|
+
}), gt = E.extend({
|
|
1057
1086
|
type: e.literal("LEGAL"),
|
|
1058
1087
|
config: e.object({
|
|
1059
1088
|
text: e.string(),
|
|
1060
1089
|
html: e.boolean().optional()
|
|
1061
1090
|
}).optional()
|
|
1062
|
-
}),
|
|
1091
|
+
}), _t = E.extend({
|
|
1063
1092
|
type: e.literal("NUMBER"),
|
|
1064
1093
|
config: e.object({
|
|
1065
1094
|
placeholder: e.string().optional(),
|
|
@@ -1068,7 +1097,7 @@ var S = e.object({
|
|
|
1068
1097
|
step: e.number().optional(),
|
|
1069
1098
|
default_value: e.string().optional()
|
|
1070
1099
|
}).optional()
|
|
1071
|
-
}),
|
|
1100
|
+
}), vt = E.extend({
|
|
1072
1101
|
type: e.literal("PASSWORD"),
|
|
1073
1102
|
config: e.object({
|
|
1074
1103
|
placeholder: e.string().optional(),
|
|
@@ -1077,13 +1106,13 @@ var S = e.object({
|
|
|
1077
1106
|
forgot_password_link: e.string().optional(),
|
|
1078
1107
|
default_value: e.string().optional()
|
|
1079
1108
|
}).optional()
|
|
1080
|
-
}),
|
|
1109
|
+
}), yt = E.extend({
|
|
1081
1110
|
type: e.literal("PAYMENT"),
|
|
1082
1111
|
config: e.object({
|
|
1083
1112
|
provider: e.string().optional(),
|
|
1084
1113
|
currency: e.string().optional()
|
|
1085
1114
|
}).optional()
|
|
1086
|
-
}),
|
|
1115
|
+
}), bt = E.extend({
|
|
1087
1116
|
type: e.literal("SOCIAL"),
|
|
1088
1117
|
config: e.object({
|
|
1089
1118
|
providers: e.array(e.string()).optional(),
|
|
@@ -1098,7 +1127,7 @@ var S = e.object({
|
|
|
1098
1127
|
last_used_label: e.string().optional()
|
|
1099
1128
|
})).optional()
|
|
1100
1129
|
}).optional()
|
|
1101
|
-
}),
|
|
1130
|
+
}), xt = E.extend({
|
|
1102
1131
|
type: e.literal("TEL"),
|
|
1103
1132
|
config: e.object({
|
|
1104
1133
|
placeholder: e.string().optional(),
|
|
@@ -1106,7 +1135,7 @@ var S = e.object({
|
|
|
1106
1135
|
default_value: e.string().optional(),
|
|
1107
1136
|
allow_email: e.boolean().optional()
|
|
1108
1137
|
}).optional()
|
|
1109
|
-
}),
|
|
1138
|
+
}), St = E.extend({
|
|
1110
1139
|
type: e.literal("TEXT"),
|
|
1111
1140
|
config: e.object({
|
|
1112
1141
|
placeholder: e.string().optional(),
|
|
@@ -1116,40 +1145,37 @@ var S = e.object({
|
|
|
1116
1145
|
last_used: e.boolean().optional(),
|
|
1117
1146
|
last_used_label: e.string().optional()
|
|
1118
1147
|
}).optional()
|
|
1119
|
-
}),
|
|
1148
|
+
}), Ct = E.extend({
|
|
1120
1149
|
type: e.literal("COUNTRY"),
|
|
1121
1150
|
config: e.object({
|
|
1122
1151
|
placeholder: e.string().optional(),
|
|
1123
1152
|
default_value: e.string().optional()
|
|
1124
1153
|
}).optional()
|
|
1125
|
-
}),
|
|
1154
|
+
}), wt = E.extend({
|
|
1126
1155
|
type: e.literal("URL"),
|
|
1127
1156
|
config: e.object({
|
|
1128
1157
|
placeholder: e.string().optional(),
|
|
1129
1158
|
default_value: e.string().optional()
|
|
1130
1159
|
}).optional()
|
|
1131
|
-
}),
|
|
1132
|
-
qe,
|
|
1133
|
-
Je,
|
|
1134
|
-
Ye,
|
|
1160
|
+
}), Tt = e.discriminatedUnion("type", [
|
|
1135
1161
|
Xe,
|
|
1136
1162
|
Ze,
|
|
1137
1163
|
Qe,
|
|
1138
1164
|
$e,
|
|
1139
|
-
et
|
|
1140
|
-
]), Ct = e.discriminatedUnion("type", [
|
|
1165
|
+
et,
|
|
1141
1166
|
tt,
|
|
1142
1167
|
nt,
|
|
1143
1168
|
rt
|
|
1144
|
-
]),
|
|
1169
|
+
]), Et = e.discriminatedUnion("type", [
|
|
1145
1170
|
it,
|
|
1146
1171
|
at,
|
|
1147
|
-
ot
|
|
1172
|
+
ot
|
|
1173
|
+
]), Dt = e.discriminatedUnion("type", [
|
|
1148
1174
|
st,
|
|
1149
|
-
bt,
|
|
1150
1175
|
ct,
|
|
1151
1176
|
lt,
|
|
1152
1177
|
ut,
|
|
1178
|
+
Ct,
|
|
1153
1179
|
dt,
|
|
1154
1180
|
ft,
|
|
1155
1181
|
pt,
|
|
@@ -1159,11 +1185,14 @@ var S = e.object({
|
|
|
1159
1185
|
_t,
|
|
1160
1186
|
vt,
|
|
1161
1187
|
yt,
|
|
1162
|
-
|
|
1163
|
-
|
|
1188
|
+
bt,
|
|
1189
|
+
xt,
|
|
1164
1190
|
St,
|
|
1165
|
-
Ct,
|
|
1166
1191
|
wt
|
|
1192
|
+
]), Ot = e.union([
|
|
1193
|
+
Tt,
|
|
1194
|
+
Et,
|
|
1195
|
+
Dt
|
|
1167
1196
|
]);
|
|
1168
1197
|
new Set([
|
|
1169
1198
|
"BOOLEAN",
|
|
@@ -1190,22 +1219,22 @@ new Set([
|
|
|
1190
1219
|
visible: e.boolean().optional().default(!0),
|
|
1191
1220
|
customizations: e.record(e.string(), e.any()).optional()
|
|
1192
1221
|
});
|
|
1193
|
-
var
|
|
1222
|
+
var D = e.object({
|
|
1194
1223
|
x: e.number(),
|
|
1195
1224
|
y: e.number()
|
|
1196
|
-
}),
|
|
1225
|
+
}), kt = e.object({
|
|
1197
1226
|
id: e.string(),
|
|
1198
1227
|
type: e.literal("FLOW"),
|
|
1199
|
-
coordinates:
|
|
1228
|
+
coordinates: D,
|
|
1200
1229
|
alias: e.string().min(1).max(150).optional(),
|
|
1201
1230
|
config: e.object({
|
|
1202
1231
|
flow_id: e.string().max(30),
|
|
1203
1232
|
next_node: e.string().optional()
|
|
1204
1233
|
})
|
|
1205
|
-
}),
|
|
1234
|
+
}), At = e.object({
|
|
1206
1235
|
id: e.string(),
|
|
1207
1236
|
type: e.literal("ROUTER"),
|
|
1208
|
-
coordinates:
|
|
1237
|
+
coordinates: D,
|
|
1209
1238
|
alias: e.string().min(1).max(150),
|
|
1210
1239
|
config: e.object({
|
|
1211
1240
|
rules: e.array(e.object({
|
|
@@ -1216,20 +1245,20 @@ var E = e.object({
|
|
|
1216
1245
|
})),
|
|
1217
1246
|
fallback: e.string()
|
|
1218
1247
|
})
|
|
1219
|
-
}),
|
|
1248
|
+
}), jt = e.object({
|
|
1220
1249
|
id: e.string(),
|
|
1221
1250
|
type: e.literal("STEP"),
|
|
1222
|
-
coordinates:
|
|
1251
|
+
coordinates: D,
|
|
1223
1252
|
alias: e.string().min(1).max(150).optional(),
|
|
1224
1253
|
config: e.object({
|
|
1225
|
-
components: e.array(
|
|
1254
|
+
components: e.array(Ot),
|
|
1226
1255
|
next_node: e.string().optional()
|
|
1227
1256
|
})
|
|
1228
|
-
}),
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
]),
|
|
1257
|
+
}), Mt = e.discriminatedUnion("type", [
|
|
1258
|
+
kt,
|
|
1259
|
+
At,
|
|
1260
|
+
jt
|
|
1261
|
+
]), Nt = e.object({
|
|
1233
1262
|
name: e.string().openapi({ description: "The name of the form" }),
|
|
1234
1263
|
messages: e.object({
|
|
1235
1264
|
errors: e.record(e.string(), e.any()).optional(),
|
|
@@ -1240,14 +1269,14 @@ var E = e.object({
|
|
|
1240
1269
|
default: e.string().optional()
|
|
1241
1270
|
}).optional(),
|
|
1242
1271
|
translations: e.record(e.string(), e.any()).optional(),
|
|
1243
|
-
nodes: e.array(
|
|
1272
|
+
nodes: e.array(Mt).optional(),
|
|
1244
1273
|
start: e.object({
|
|
1245
1274
|
hidden_fields: e.array(e.object({
|
|
1246
1275
|
key: e.string(),
|
|
1247
1276
|
value: e.string()
|
|
1248
1277
|
})).optional(),
|
|
1249
1278
|
next_node: e.string().optional(),
|
|
1250
|
-
coordinates:
|
|
1279
|
+
coordinates: D.optional()
|
|
1251
1280
|
}).optional(),
|
|
1252
1281
|
ending: e.object({
|
|
1253
1282
|
redirection: e.object({
|
|
@@ -1255,7 +1284,7 @@ var E = e.object({
|
|
|
1255
1284
|
target: e.string().optional()
|
|
1256
1285
|
}).optional(),
|
|
1257
1286
|
after_submit: e.object({ flow_id: e.string().optional() }).optional(),
|
|
1258
|
-
coordinates:
|
|
1287
|
+
coordinates: D.optional(),
|
|
1259
1288
|
resume_flow: e.boolean().optional()
|
|
1260
1289
|
}).optional(),
|
|
1261
1290
|
style: e.object({ css: e.string().optional() }).optional(),
|
|
@@ -1264,8 +1293,8 @@ var E = e.object({
|
|
|
1264
1293
|
sdk_src: e.string().optional()
|
|
1265
1294
|
}).optional()
|
|
1266
1295
|
}).openapi({ description: "Schema for flow-based forms (matches Auth0 Forms structure)" });
|
|
1267
|
-
n.extend(
|
|
1268
|
-
var
|
|
1296
|
+
n.extend(Nt.shape).extend({ id: e.string() });
|
|
1297
|
+
var Pt = e.object({
|
|
1269
1298
|
id: e.number().optional(),
|
|
1270
1299
|
text: e.string(),
|
|
1271
1300
|
type: e.enum([
|
|
@@ -1274,12 +1303,12 @@ var jt = e.object({
|
|
|
1274
1303
|
"success",
|
|
1275
1304
|
"warning"
|
|
1276
1305
|
])
|
|
1277
|
-
}),
|
|
1306
|
+
}), Ft = e.object({
|
|
1278
1307
|
id: e.string().optional(),
|
|
1279
1308
|
text: e.string(),
|
|
1280
1309
|
href: e.string(),
|
|
1281
1310
|
linkText: e.string().optional()
|
|
1282
|
-
}),
|
|
1311
|
+
}), It = e.object({
|
|
1283
1312
|
"form-content-start": e.string().optional(),
|
|
1284
1313
|
"form-content-end": e.string().optional(),
|
|
1285
1314
|
"form-footer-start": e.string().optional(),
|
|
@@ -1293,13 +1322,13 @@ e.object({
|
|
|
1293
1322
|
method: e.enum(["POST", "GET"]),
|
|
1294
1323
|
title: e.string().optional(),
|
|
1295
1324
|
description: e.string().optional(),
|
|
1296
|
-
components: e.array(
|
|
1297
|
-
messages: e.array(
|
|
1298
|
-
links: e.array(
|
|
1299
|
-
partials:
|
|
1325
|
+
components: e.array(Ot),
|
|
1326
|
+
messages: e.array(Pt).optional(),
|
|
1327
|
+
links: e.array(Ft).optional(),
|
|
1328
|
+
partials: It.optional(),
|
|
1300
1329
|
footer: e.string().optional()
|
|
1301
1330
|
});
|
|
1302
|
-
var
|
|
1331
|
+
var O = e.enum([
|
|
1303
1332
|
"pre-user-registration",
|
|
1304
1333
|
"post-user-registration",
|
|
1305
1334
|
"post-user-login",
|
|
@@ -1307,95 +1336,96 @@ var D = e.enum([
|
|
|
1307
1336
|
"validate-registration-username",
|
|
1308
1337
|
"pre-user-deletion",
|
|
1309
1338
|
"post-user-deletion"
|
|
1310
|
-
]),
|
|
1339
|
+
]), k = e.enum(["post-user-login"]), A = e.enum([
|
|
1311
1340
|
"post-user-login",
|
|
1312
1341
|
"post-user-registration",
|
|
1313
1342
|
"post-user-update",
|
|
1314
1343
|
"credentials-exchange"
|
|
1315
|
-
]),
|
|
1344
|
+
]), j = e.enum([
|
|
1316
1345
|
"post-user-login",
|
|
1317
1346
|
"credentials-exchange",
|
|
1318
1347
|
"pre-user-registration",
|
|
1319
1348
|
"post-user-registration"
|
|
1320
|
-
]),
|
|
1321
|
-
|
|
1322
|
-
var
|
|
1349
|
+
]), M = e.enum(["post-user-login"]);
|
|
1350
|
+
O.options, k.options, A.options, j.options, M.options;
|
|
1351
|
+
var Lt = e.enum(["impersonate"]), Rt = e.enum([
|
|
1323
1352
|
"ensure-username",
|
|
1324
1353
|
"set-preferred-username",
|
|
1325
1354
|
"account-linking"
|
|
1326
|
-
]),
|
|
1355
|
+
]), N = {
|
|
1327
1356
|
enabled: e.boolean().default(!1),
|
|
1328
1357
|
synchronous: e.boolean().default(!1),
|
|
1329
1358
|
priority: e.number().optional(),
|
|
1330
1359
|
hook_id: e.string().optional(),
|
|
1331
|
-
metadata: e.record(e.string(), e.unknown()).optional()
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
url: e.string()
|
|
1336
|
-
}), Lt = e.object({
|
|
1337
|
-
...M,
|
|
1360
|
+
metadata: e.record(e.string(), e.unknown()).optional(),
|
|
1361
|
+
...a
|
|
1362
|
+
}, zt = e.object({
|
|
1363
|
+
...N,
|
|
1338
1364
|
trigger_id: O,
|
|
1339
|
-
|
|
1340
|
-
}),
|
|
1341
|
-
...
|
|
1365
|
+
url: e.string()
|
|
1366
|
+
}), Bt = e.object({
|
|
1367
|
+
...N,
|
|
1342
1368
|
trigger_id: k,
|
|
1343
|
-
|
|
1344
|
-
}),
|
|
1345
|
-
...
|
|
1369
|
+
form_id: e.string()
|
|
1370
|
+
}), Vt = e.object({
|
|
1371
|
+
...N,
|
|
1346
1372
|
trigger_id: A,
|
|
1347
|
-
|
|
1348
|
-
}),
|
|
1349
|
-
...
|
|
1373
|
+
template_id: Rt
|
|
1374
|
+
}), Ht = e.object({
|
|
1375
|
+
...N,
|
|
1350
1376
|
trigger_id: j,
|
|
1351
|
-
|
|
1377
|
+
code_id: e.string()
|
|
1378
|
+
}), Ut = e.object({
|
|
1379
|
+
...N,
|
|
1380
|
+
trigger_id: M,
|
|
1381
|
+
page_id: Lt,
|
|
1352
1382
|
permission_required: e.string().optional()
|
|
1353
1383
|
});
|
|
1354
1384
|
e.union([
|
|
1355
|
-
It,
|
|
1356
|
-
Lt,
|
|
1357
|
-
Rt,
|
|
1358
1385
|
zt,
|
|
1359
|
-
Bt
|
|
1386
|
+
Bt,
|
|
1387
|
+
Vt,
|
|
1388
|
+
Ht,
|
|
1389
|
+
Ut
|
|
1360
1390
|
]);
|
|
1361
|
-
var
|
|
1362
|
-
...
|
|
1363
|
-
trigger_id:
|
|
1391
|
+
var Wt = e.object({
|
|
1392
|
+
...N,
|
|
1393
|
+
trigger_id: O
|
|
1364
1394
|
}).extend(n.shape).extend({
|
|
1365
1395
|
hook_id: e.string(),
|
|
1366
1396
|
url: e.string()
|
|
1367
|
-
}),
|
|
1368
|
-
...
|
|
1369
|
-
trigger_id:
|
|
1397
|
+
}), Gt = e.object({
|
|
1398
|
+
...N,
|
|
1399
|
+
trigger_id: k
|
|
1370
1400
|
}).extend(n.shape).extend({
|
|
1371
1401
|
hook_id: e.string(),
|
|
1372
1402
|
form_id: e.string()
|
|
1373
|
-
}),
|
|
1374
|
-
...
|
|
1375
|
-
trigger_id:
|
|
1403
|
+
}), Kt = e.object({
|
|
1404
|
+
...N,
|
|
1405
|
+
trigger_id: A
|
|
1376
1406
|
}).extend(n.shape).extend({
|
|
1377
1407
|
hook_id: e.string(),
|
|
1378
|
-
template_id:
|
|
1379
|
-
}),
|
|
1380
|
-
...
|
|
1381
|
-
trigger_id:
|
|
1408
|
+
template_id: Rt
|
|
1409
|
+
}), qt = e.object({
|
|
1410
|
+
...N,
|
|
1411
|
+
trigger_id: j
|
|
1382
1412
|
}).extend(n.shape).extend({
|
|
1383
1413
|
hook_id: e.string(),
|
|
1384
1414
|
code_id: e.string()
|
|
1385
|
-
}),
|
|
1386
|
-
...
|
|
1387
|
-
trigger_id:
|
|
1415
|
+
}), Jt = e.object({
|
|
1416
|
+
...N,
|
|
1417
|
+
trigger_id: M
|
|
1388
1418
|
}).extend(n.shape).extend({
|
|
1389
1419
|
hook_id: e.string(),
|
|
1390
|
-
page_id:
|
|
1420
|
+
page_id: Lt,
|
|
1391
1421
|
permission_required: e.string().optional()
|
|
1392
1422
|
});
|
|
1393
1423
|
e.union([
|
|
1394
|
-
Vt,
|
|
1395
|
-
Ht,
|
|
1396
|
-
Ut,
|
|
1397
1424
|
Wt,
|
|
1398
|
-
Gt
|
|
1425
|
+
Gt,
|
|
1426
|
+
Kt,
|
|
1427
|
+
qt,
|
|
1428
|
+
Jt
|
|
1399
1429
|
]), e.object({
|
|
1400
1430
|
code: e.string().max(1e5),
|
|
1401
1431
|
secrets: e.record(e.string(), e.string()).optional()
|
|
@@ -1403,11 +1433,11 @@ e.union([
|
|
|
1403
1433
|
id: e.string(),
|
|
1404
1434
|
tenant_id: e.string()
|
|
1405
1435
|
}).extend(n.shape);
|
|
1406
|
-
var
|
|
1436
|
+
var Yt = e.object({ name: e.string().optional() }), Xt = e.object({ email: e.string().optional() }), Zt = e.object({
|
|
1407
1437
|
id: e.string().optional(),
|
|
1408
1438
|
organization_id: e.string().max(50),
|
|
1409
|
-
inviter:
|
|
1410
|
-
invitee:
|
|
1439
|
+
inviter: Yt,
|
|
1440
|
+
invitee: Xt,
|
|
1411
1441
|
invitation_url: e.string().url(),
|
|
1412
1442
|
client_id: e.string(),
|
|
1413
1443
|
connection_id: e.string().optional(),
|
|
@@ -1423,8 +1453,8 @@ e.object({
|
|
|
1423
1453
|
created_at: e.string().datetime(),
|
|
1424
1454
|
expires_at: e.string().datetime(),
|
|
1425
1455
|
ticket_id: e.string().optional()
|
|
1426
|
-
}).extend(
|
|
1427
|
-
var
|
|
1456
|
+
}).extend(Zt.omit({ id: !0 }).shape);
|
|
1457
|
+
var Qt = e.object({
|
|
1428
1458
|
alg: e.enum([
|
|
1429
1459
|
"RS256",
|
|
1430
1460
|
"RS384",
|
|
@@ -1466,7 +1496,7 @@ var Yt = e.object({
|
|
|
1466
1496
|
path: [r],
|
|
1467
1497
|
message: `EC JWK is missing required member '${r}'`
|
|
1468
1498
|
});
|
|
1469
|
-
}),
|
|
1499
|
+
}), $t = e.object({ keys: e.array(Qt) });
|
|
1470
1500
|
e.object({
|
|
1471
1501
|
issuer: e.string(),
|
|
1472
1502
|
authorization_endpoint: e.string(),
|
|
@@ -1494,35 +1524,35 @@ e.object({
|
|
|
1494
1524
|
backchannel_logout_supported: e.boolean().optional(),
|
|
1495
1525
|
backchannel_logout_session_supported: e.boolean().optional()
|
|
1496
1526
|
});
|
|
1497
|
-
var
|
|
1527
|
+
var en = /* @__PURE__ */ function(e) {
|
|
1498
1528
|
return e.PENDING = "pending", e.AUTHENTICATED = "authenticated", e.AWAITING_EMAIL_VERIFICATION = "awaiting_email_verification", e.AWAITING_MFA = "awaiting_mfa", e.AWAITING_HOOK = "awaiting_hook", e.AWAITING_CONTINUATION = "awaiting_continuation", e.AWAITING_CONSENT = "awaiting_consent", e.COMPLETED = "completed", e.FAILED = "failed", e.EXPIRED = "expired", e;
|
|
1499
|
-
}({}),
|
|
1529
|
+
}({}), tn = e.nativeEnum(en), nn = e.object({
|
|
1500
1530
|
strategy: e.string(),
|
|
1501
1531
|
strategy_type: e.string()
|
|
1502
1532
|
});
|
|
1503
1533
|
e.object({
|
|
1504
1534
|
csrf_token: e.string(),
|
|
1505
1535
|
auth0Client: e.string().optional(),
|
|
1506
|
-
authParams:
|
|
1536
|
+
authParams: Ue,
|
|
1507
1537
|
expires_at: e.string(),
|
|
1508
1538
|
deleted_at: e.string().optional(),
|
|
1509
1539
|
ip: e.string().optional(),
|
|
1510
1540
|
useragent: e.string().optional(),
|
|
1511
1541
|
session_id: e.string().optional(),
|
|
1512
1542
|
authorization_url: e.string().optional(),
|
|
1513
|
-
state:
|
|
1543
|
+
state: tn.optional().default("pending"),
|
|
1514
1544
|
state_data: e.string().optional(),
|
|
1515
1545
|
failure_reason: e.string().optional(),
|
|
1516
1546
|
user_id: e.string().optional(),
|
|
1517
1547
|
auth_connection: e.string().optional(),
|
|
1518
|
-
auth_strategy:
|
|
1548
|
+
auth_strategy: nn.optional(),
|
|
1519
1549
|
authenticated_at: e.string().optional()
|
|
1520
1550
|
}).openapi({ description: "This represents a login sesion" }).extend({
|
|
1521
1551
|
id: e.string().openapi({ description: "This is is used as the state in the universal login" }),
|
|
1522
1552
|
created_at: e.string(),
|
|
1523
1553
|
updated_at: e.string()
|
|
1524
1554
|
});
|
|
1525
|
-
var
|
|
1555
|
+
var P = {
|
|
1526
1556
|
ACLS_SUMMARY: "acls_summary",
|
|
1527
1557
|
ACTIONS_EXECUTION_FAILED: "actions_execution_failed",
|
|
1528
1558
|
API_LIMIT: "api_limit",
|
|
@@ -1535,6 +1565,7 @@ var N = {
|
|
|
1535
1565
|
CODE_LINK_SENT: "cls",
|
|
1536
1566
|
CODE_SENT: "cs",
|
|
1537
1567
|
DEPRECATION_NOTICE: "depnote",
|
|
1568
|
+
CONFIG_INHERITANCE_DIFF: "cfgdiff",
|
|
1538
1569
|
FAILED_LOGIN: "f",
|
|
1539
1570
|
FAILED_BY_CONNECTOR: "fc",
|
|
1540
1571
|
FAILED_CHANGE_EMAIL: "fce",
|
|
@@ -1682,17 +1713,17 @@ var N = {
|
|
|
1682
1713
|
WARNING_DURING_LOGIN: "w",
|
|
1683
1714
|
WARNING_SENDING_NOTIFICATION: "wn",
|
|
1684
1715
|
WARNING_USER_MANAGEMENT: "wum"
|
|
1685
|
-
},
|
|
1686
|
-
|
|
1716
|
+
}, rn = e.string().refine((e) => Object.values(P).includes(e), { message: "Invalid log type" });
|
|
1717
|
+
P.ACLS_SUMMARY, P.ACTIONS_EXECUTION_FAILED, P.API_LIMIT, P.API_LIMIT_WARNING, P.APPI, P.CIBA_EXCHANGE_FAILED, P.CIBA_EXCHANGE_SUCCEEDED, P.CIBA_START_FAILED, P.CIBA_START_SUCCEEDED, P.CODE_LINK_SENT, P.CODE_SENT, P.DEPRECATION_NOTICE, P.CONFIG_INHERITANCE_DIFF, P.FAILED_LOGIN, P.FAILED_BY_CONNECTOR, P.FAILED_CHANGE_EMAIL, P.FAILED_BY_CORS, P.FAILED_CROSS_ORIGIN_AUTHENTICATION, P.FAILED_CHANGE_PASSWORD, P.FAILED_POST_CHANGE_PASSWORD_HOOK, P.FAILED_CHANGE_PHONE_NUMBER, P.FAILED_CHANGE_PASSWORD_REQUEST, P.FAILED_CONNECTOR_PROVISIONING, P.FAILED_CHANGE_USERNAME, P.FAILED_DELEGATION, P.FAILED_DEVICE_ACTIVATION, P.FAILED_DEVICE_AUTHORIZATION_REQUEST, P.USER_CANCELED_DEVICE_CONFIRMATION, P.FAILED_USER_DELETION, P.FAILED_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN, P.FAILED_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS, P.FAILED_EXCHANGE_CUSTOM_TOKEN, P.FAILED_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN, P.FAILED_FEDERATED_LOGOUT, P.FAILED_EXCHANGE_NATIVE_SOCIAL_LOGIN, P.FAILED_EXCHANGE_PASSWORD_OOB_FOR_ACCESS_TOKEN, P.FAILED_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN, P.FAILED_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN, P.FAILED_EXCHANGE_PASSWORDLESS_OTP_FOR_ACCESS_TOKEN, P.FAILED_EXCHANGE_PASSWORD_MFA_RECOVERY_FOR_ACCESS_TOKEN, P.FAILED_EXCHANGE_ROTATING_REFRESH_TOKEN, P.FAILED_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN, P.FAILED_EXCHANGE_SUBJECT_TOKEN_FOR_ACCESS_TOKEN, P.FAILED_HOOK, P.FAILED_IMPERSONATION, P.FAILED_INVITE_ACCEPT, P.FAILED_LOGOUT, P.FLOWS_EXECUTION_COMPLETED, P.FLOWS_EXECUTION_FAILED, P.FAILED_SENDING_NOTIFICATION, P.FORMS_SUBMISSION_FAILED, P.FORMS_SUBMISSION_SUCCEEDED, P.FAILED_LOGIN_INCORRECT_PASSWORD, P.FAILED_PUSHED_AUTHORIZATION_REQUEST, P.FAILED_POST_USER_REGISTRATION_HOOK, P.FAILED_SIGNUP, P.FAILED_SILENT_AUTH, P.FAILED_LOGIN_INVALID_EMAIL_USERNAME, P.FAILED_USERS_IMPORT, P.FAILED_VERIFICATION_EMAIL, P.FAILED_VERIFICATION_EMAIL_REQUEST, P.EMAIL_VERIFICATION_CONFIRMED, P.EMAIL_VERIFICATION_FAILED, P.MFA_AUTH_FAILED, P.MFA_AUTH_REJECTED, P.MFA_AUTH_SUCCESS, P.MFA_ENROLLMENT_COMPLETE, P.TOO_MANY_MFA_FAILURES, P.MFA_RECOVERY_FAILED, P.MFA_RECOVERY_RATE_LIMIT_EXCEED, P.MFA_RECOVERY_SUCCESS, P.MFA_EMAIL_SENT, P.EMAIL_VERIFICATION_SENT, P.EMAIL_VERIFICATION_SEND_FAILURE, P.PUSH_NOTIFICATION_SENT, P.ERROR_SENDING_MFA_PUSH_NOTIFICATION, P.MFA_SMS_SENT, P.ERROR_SENDING_MFA_SMS, P.MFA_VOICE_CALL_SUCCESS, P.MFA_VOICE_CALL_FAILED, P.SECOND_FACTOR_STARTED, P.MFA_ENROLL_STARTED, P.MFA_ENROLLMENT_FAILED, P.GUARDIAN_TENANT_UPDATE, P.UNENROLL_DEVICE_ACCOUNT, P.UPDATE_DEVICE_ACCOUNT, P.WEBAUTHN_CHALLENGE_FAILED, P.WEBAUTHN_ENROLLMENT_FAILED, P.FAILED_KMS_API_OPERATION, P.SUCCESS_KMS_API_OPERATION, P.KMS_KEY_STATE_CHANGED, P.TOO_MANY_CALLS_TO_DELEGATION, P.BLOCKED_IP_ADDRESS, P.BLOCKED_ACCOUNT_IP, P.BLOCKED_ACCOUNT_EMAIL, P.INFORMATION, P.MFA_REQUIRED, P.MANAGEMENT_API_READ_OPERATION, P.FAILED_AUTHENTICATION_METHOD_OPERATION_MY_ACCOUNT, P.SUCCESSFUL_AUTHENTICATION_METHOD_OPERATION_MY_ACCOUNT, P.FAILED_OIDC_BACKCHANNEL_LOGOUT, P.SUCCESSFUL_OIDC_BACKCHANNEL_LOGOUT, P.ORGANIZATION_MEMBER_ADDED, P.PASSKEY_CHALLENGE_FAILED, P.PASSKEY_CHALLENGE_STARTED, P.PRE_LOGIN_ASSESSMENT, P.BREACHED_PASSWORD, P.BREACHED_PASSWORD_ON_RESET, P.SUCCESS_RESOURCE_CLEANUP, P.RICH_CONSENTS_ACCESS_ERROR, P.SUCCESS_LOGIN, P.SUCCESS_API_OPERATION, P.FAILED_API_OPERATION, P.SUCCESS_CHANGE_EMAIL, P.SUCCESS_CROSS_ORIGIN_AUTHENTICATION, P.SUCCESS_CHANGE_PASSWORD, P.SUCCESS_CHANGE_PHONE_NUMBER, P.SUCCESS_CHANGE_PASSWORD_REQUEST, P.SUCCESS_CHANGE_USERNAME, P.SUCCESS_CREDENTIAL_VALIDATION, P.SUCCESS_DELEGATION, P.SUCCESS_USER_DELETION, P.SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS, P.SUCCESS_EXCHANGE_CUSTOM_TOKEN, P.SUCCESS_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_NATIVE_SOCIAL_LOGIN, P.SUCCESS_EXCHANGE_PASSWORD_OOB_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_PASSWORDLESS_OTP_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_PASSKEY_OOB_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_PASSKEY_OTP_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_PASSKEY_MFA_RECOVERY_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_PASSWORD_MFA_RECOVERY_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_SUBJECT_TOKEN_FOR_ACCESS_TOKEN, P.SUCCESS_IMPERSONATION, P.SUCCESSFULLY_ACCEPTED_USER_INVITE, P.BREACHED_PASSWORD_ON_SIGNUP, P.SUCCESS_LOGOUT, P.SUCCESS_HOOK, P.SUCCESS_PASSWORD_MIGRATION, P.SUCCESS_REVOCATION, P.SUCCESS_SIGNUP, P.FAILED_SS_SSO_OPERATION, P.INFORMATION_FROM_SS_SSO_OPERATION, P.SUCCESS_SS_SSO_OPERATION, P.SUCCESS_SILENT_AUTH, P.SUCCESSFUL_SCIM_OPERATION, P.SUCCESSFULLY_IMPORTED_USERS, P.SUCCESS_VERIFICATION_EMAIL, P.SUCCESS_VERIFICATION_EMAIL_REQUEST, P.MAX_AMOUNT_OF_AUTHENTICATORS, P.USER_LOGIN_BLOCK_RELEASED, P.FAILED_UNIVERSAL_LOGOUT, P.SUCCESSFUL_UNIVERSAL_LOGOUT, P.WARNING_DURING_LOGIN, P.WARNING_SENDING_NOTIFICATION, P.WARNING_USER_MANAGEMENT, (() => {
|
|
1687
1718
|
let e = {};
|
|
1688
|
-
for (let [t, n] of Object.entries(
|
|
1719
|
+
for (let [t, n] of Object.entries(P)) t.startsWith("SUCCESS_") || t.startsWith("SUCCESSFUL_") || t.startsWith("SUCCESSFULLY_") || t.endsWith("_SUCCEEDED") || t.endsWith("_COMPLETED") ? e[n] = "success" : t.startsWith("FAILED_") || t.startsWith("ERROR_") || t.startsWith("BREACHED_") || t.startsWith("BLOCKED_") || t === "MFA_AUTH_FAILED" || t === "MFA_AUTH_REJECTED" || t === "MFA_RECOVERY_FAILED" || t === "MFA_ENROLLMENT_FAILED" || t === "EMAIL_VERIFICATION_FAILED" || t === "WEBAUTHN_CHALLENGE_FAILED" || t === "WEBAUTHN_ENROLLMENT_FAILED" || t === "PASSKEY_CHALLENGE_FAILED" || t === "FLOWS_EXECUTION_FAILED" || t === "FORMS_SUBMISSION_FAILED" || t === "CIBA_EXCHANGE_FAILED" || t === "CIBA_START_FAILED" || t === "ACTIONS_EXECUTION_FAILED" || t === "RICH_CONSENTS_ACCESS_ERROR" || t === "USER_CANCELED_DEVICE_CONFIRMATION" || t === "TOO_MANY_MFA_FAILURES" || t === "MFA_RECOVERY_RATE_LIMIT_EXCEED" || t === "API_LIMIT" || t === "MAX_AMOUNT_OF_AUTHENTICATORS" ? e[n] = "failure" : t.startsWith("WARNING_") || t === "API_LIMIT_WARNING" || t === "DEPRECATION_NOTICE" || t === "PRE_LOGIN_ASSESSMENT" ? e[n] = "warning" : t === "CODE_SENT" || t === "CODE_LINK_SENT" || t === "MFA_EMAIL_SENT" || t === "MFA_SMS_SENT" || t === "EMAIL_VERIFICATION_SENT" || t === "PUSH_NOTIFICATION_SENT" ? e[n] = "code_sent" : t === "INFORMATION" || t === "INFORMATION_FROM_SS_SSO_OPERATION" || t === "MANAGEMENT_API_READ_OPERATION" || t === "APPI" || t === "CONFIG_INHERITANCE_DIFF" || t === "ACLS_SUMMARY" || t === "ORGANIZATION_MEMBER_ADDED" ? e[n] = "info" : e[n] = "other";
|
|
1689
1720
|
return e;
|
|
1690
1721
|
})();
|
|
1691
|
-
var
|
|
1722
|
+
var an = e.object({
|
|
1692
1723
|
name: e.string(),
|
|
1693
1724
|
version: e.string(),
|
|
1694
1725
|
env: e.object({ node: e.string().optional() }).optional()
|
|
1695
|
-
}),
|
|
1726
|
+
}), on = e.object({
|
|
1696
1727
|
country_code: e.string().length(2),
|
|
1697
1728
|
city_name: e.string(),
|
|
1698
1729
|
latitude: e.string(),
|
|
@@ -1701,7 +1732,7 @@ var tn = e.object({
|
|
|
1701
1732
|
continent_code: e.string()
|
|
1702
1733
|
});
|
|
1703
1734
|
e.object({
|
|
1704
|
-
type:
|
|
1735
|
+
type: rn,
|
|
1705
1736
|
date: e.string(),
|
|
1706
1737
|
description: e.string().optional(),
|
|
1707
1738
|
ip: e.string().optional(),
|
|
@@ -1719,63 +1750,63 @@ e.object({
|
|
|
1719
1750
|
strategy: e.string().optional(),
|
|
1720
1751
|
strategy_type: e.string().optional(),
|
|
1721
1752
|
hostname: e.string().optional(),
|
|
1722
|
-
auth0_client:
|
|
1753
|
+
auth0_client: an.optional(),
|
|
1723
1754
|
log_id: e.string().optional(),
|
|
1724
|
-
location_info:
|
|
1755
|
+
location_info: on.optional()
|
|
1725
1756
|
}).extend({ log_id: e.string() });
|
|
1726
|
-
var
|
|
1757
|
+
var sn = e.enum([
|
|
1727
1758
|
"http",
|
|
1728
1759
|
"eventbridge",
|
|
1729
1760
|
"eventgrid",
|
|
1730
1761
|
"splunk",
|
|
1731
1762
|
"datadog",
|
|
1732
1763
|
"sumo"
|
|
1733
|
-
]),
|
|
1764
|
+
]), cn = e.enum([
|
|
1734
1765
|
"active",
|
|
1735
1766
|
"paused",
|
|
1736
1767
|
"suspended"
|
|
1737
|
-
]),
|
|
1768
|
+
]), ln = e.object({
|
|
1738
1769
|
type: e.string(),
|
|
1739
1770
|
name: e.string()
|
|
1740
1771
|
});
|
|
1741
1772
|
e.object({
|
|
1742
1773
|
name: e.string(),
|
|
1743
|
-
type:
|
|
1744
|
-
status:
|
|
1774
|
+
type: sn,
|
|
1775
|
+
status: cn.optional(),
|
|
1745
1776
|
sink: e.record(e.string(), e.unknown()),
|
|
1746
|
-
filters: e.array(
|
|
1777
|
+
filters: e.array(ln).optional(),
|
|
1747
1778
|
isPriority: e.boolean().optional()
|
|
1748
1779
|
}).extend({
|
|
1749
1780
|
id: e.string(),
|
|
1750
|
-
status:
|
|
1781
|
+
status: cn,
|
|
1751
1782
|
created_at: e.string().optional(),
|
|
1752
1783
|
updated_at: e.string().optional()
|
|
1753
1784
|
});
|
|
1754
|
-
var
|
|
1785
|
+
var un = e.enum([
|
|
1755
1786
|
"auth0",
|
|
1756
1787
|
"cognito",
|
|
1757
1788
|
"okta",
|
|
1758
1789
|
"oidc"
|
|
1759
|
-
]),
|
|
1790
|
+
]), dn = e.object({
|
|
1760
1791
|
domain: e.string(),
|
|
1761
1792
|
client_id: e.string(),
|
|
1762
1793
|
client_secret: e.string(),
|
|
1763
1794
|
audience: e.string().optional(),
|
|
1764
1795
|
scope: e.string().optional()
|
|
1765
|
-
}),
|
|
1796
|
+
}), fn = e.object({
|
|
1766
1797
|
id: e.string().optional(),
|
|
1767
1798
|
name: e.string(),
|
|
1768
|
-
provider:
|
|
1799
|
+
provider: un,
|
|
1769
1800
|
connection: e.string(),
|
|
1770
1801
|
enabled: e.boolean().default(!0),
|
|
1771
|
-
credentials:
|
|
1802
|
+
credentials: dn
|
|
1772
1803
|
});
|
|
1773
1804
|
e.object({
|
|
1774
1805
|
id: e.string(),
|
|
1775
1806
|
created_at: e.string(),
|
|
1776
1807
|
updated_at: e.string()
|
|
1777
|
-
}).extend(
|
|
1778
|
-
var
|
|
1808
|
+
}).extend(fn.shape);
|
|
1809
|
+
var pn = e.object({
|
|
1779
1810
|
enabled: e.boolean().optional(),
|
|
1780
1811
|
shields: e.array(e.string()).optional(),
|
|
1781
1812
|
admin_notification_frequency: e.array(e.string()).optional(),
|
|
@@ -1784,13 +1815,13 @@ var un = e.object({
|
|
|
1784
1815
|
"pre-user-registration": e.object({ shields: e.array(e.string()).optional() }).optional(),
|
|
1785
1816
|
"pre-change-password": e.object({ shields: e.array(e.string()).optional() }).optional()
|
|
1786
1817
|
}).optional()
|
|
1787
|
-
}),
|
|
1818
|
+
}), mn = e.object({
|
|
1788
1819
|
enabled: e.boolean().optional(),
|
|
1789
1820
|
shields: e.array(e.string()).optional(),
|
|
1790
1821
|
allowlist: e.array(e.string()).optional(),
|
|
1791
1822
|
mode: e.string().optional(),
|
|
1792
1823
|
max_attempts: e.number().optional()
|
|
1793
|
-
}),
|
|
1824
|
+
}), hn = e.object({
|
|
1794
1825
|
enabled: e.boolean().optional(),
|
|
1795
1826
|
shields: e.array(e.string()).optional(),
|
|
1796
1827
|
allowlist: e.array(e.string()).optional(),
|
|
@@ -1804,10 +1835,10 @@ var un = e.object({
|
|
|
1804
1835
|
rate: e.number().optional()
|
|
1805
1836
|
}).optional()
|
|
1806
1837
|
}).optional()
|
|
1807
|
-
}),
|
|
1808
|
-
breached_password_detection:
|
|
1809
|
-
brute_force_protection:
|
|
1810
|
-
suspicious_ip_throttling:
|
|
1838
|
+
}), gn = e.object({
|
|
1839
|
+
breached_password_detection: pn.optional(),
|
|
1840
|
+
brute_force_protection: mn.optional(),
|
|
1841
|
+
suspicious_ip_throttling: hn.optional()
|
|
1811
1842
|
});
|
|
1812
1843
|
e.object({
|
|
1813
1844
|
id: e.string().optional(),
|
|
@@ -1820,14 +1851,14 @@ e.object({
|
|
|
1820
1851
|
created_at: e.string(),
|
|
1821
1852
|
updated_at: e.string()
|
|
1822
1853
|
});
|
|
1823
|
-
var
|
|
1854
|
+
var _n = e.object({
|
|
1824
1855
|
initial_user_agent: e.string().describe("First user agent of the device from which this user logged in"),
|
|
1825
1856
|
initial_ip: e.string().describe("First IP address associated with this session"),
|
|
1826
1857
|
initial_asn: e.string().describe("First autonomous system number associated with this session"),
|
|
1827
1858
|
last_user_agent: e.string().describe("Last user agent of the device from which this user logged in"),
|
|
1828
1859
|
last_ip: e.string().describe("Last IP address from which this user logged in"),
|
|
1829
1860
|
last_asn: e.string().describe("Last autonomous system number from which this user logged in")
|
|
1830
|
-
}),
|
|
1861
|
+
}), vn = e.object({
|
|
1831
1862
|
id: e.string(),
|
|
1832
1863
|
revoked_at: e.string().optional(),
|
|
1833
1864
|
used_at: e.string().optional(),
|
|
@@ -1835,7 +1866,7 @@ var mn = e.object({
|
|
|
1835
1866
|
expires_at: e.string().optional(),
|
|
1836
1867
|
login_session_id: e.string(),
|
|
1837
1868
|
idle_expires_at: e.string().optional(),
|
|
1838
|
-
device:
|
|
1869
|
+
device: _n.describe("Metadata related to the device used in the session"),
|
|
1839
1870
|
clients: e.array(e.string()).describe("List of client details for the session")
|
|
1840
1871
|
});
|
|
1841
1872
|
e.object({
|
|
@@ -1843,7 +1874,7 @@ e.object({
|
|
|
1843
1874
|
updated_at: e.string(),
|
|
1844
1875
|
authenticated_at: e.string(),
|
|
1845
1876
|
last_interaction_at: e.string()
|
|
1846
|
-
}).extend(
|
|
1877
|
+
}).extend(vn.shape), e.object({
|
|
1847
1878
|
kid: e.string().openapi({ description: "The key id of the signing key" }),
|
|
1848
1879
|
tenant_id: e.string().optional().openapi({ description: "The tenant the key belongs to. Omitted means the key is shared / control-plane scoped." }),
|
|
1849
1880
|
cert: e.string().openapi({ description: "The public certificate of the signing key" }),
|
|
@@ -1860,8 +1891,9 @@ e.object({
|
|
|
1860
1891
|
connection: e.string().optional().openapi({ description: "The connection identifier associated with the key" }),
|
|
1861
1892
|
type: e.enum(["jwt_signing", "saml_encryption"]).openapi({ description: "The type of the signing key" })
|
|
1862
1893
|
});
|
|
1863
|
-
var
|
|
1894
|
+
var yn = e.object({
|
|
1864
1895
|
id: e.string().optional(),
|
|
1896
|
+
parent_tenant_id: e.string().nullish(),
|
|
1865
1897
|
audience: e.string().optional(),
|
|
1866
1898
|
friendly_name: e.string(),
|
|
1867
1899
|
picture_url: e.string().optional(),
|
|
@@ -1978,7 +2010,7 @@ var gn = e.object({
|
|
|
1978
2010
|
"shared_planetscale"
|
|
1979
2011
|
]).optional(),
|
|
1980
2012
|
d1_database_id: e.string().max(64).optional(),
|
|
1981
|
-
attack_protection:
|
|
2013
|
+
attack_protection: gn.optional(),
|
|
1982
2014
|
mfa: e.object({
|
|
1983
2015
|
policy: e.enum(["never", "always"]).default("never").optional(),
|
|
1984
2016
|
factors: e.object({
|
|
@@ -2009,29 +2041,29 @@ var gn = e.object({
|
|
|
2009
2041
|
e.object({
|
|
2010
2042
|
created_at: e.string().nullable().transform((e) => e ?? ""),
|
|
2011
2043
|
updated_at: e.string().nullable().transform((e) => e ?? "")
|
|
2012
|
-
}).extend(
|
|
2044
|
+
}).extend(yn.shape).extend({
|
|
2013
2045
|
id: e.string(),
|
|
2014
2046
|
is_control_plane: e.boolean().optional()
|
|
2015
2047
|
});
|
|
2016
|
-
var
|
|
2048
|
+
var bn = e.enum([
|
|
2017
2049
|
"provision",
|
|
2018
2050
|
"seed",
|
|
2019
2051
|
"upgrade",
|
|
2020
2052
|
"backup",
|
|
2021
2053
|
"deprovision",
|
|
2022
2054
|
"users_import"
|
|
2023
|
-
]),
|
|
2055
|
+
]), xn = e.enum([
|
|
2024
2056
|
"pending",
|
|
2025
2057
|
"running",
|
|
2026
2058
|
"succeeded",
|
|
2027
2059
|
"failed",
|
|
2028
2060
|
"cancelled"
|
|
2029
|
-
]),
|
|
2061
|
+
]), Sn = e.string().max(64);
|
|
2030
2062
|
e.object({
|
|
2031
2063
|
tenant_id: e.string().max(255).nullable().default(null),
|
|
2032
2064
|
rollout_id: e.string().max(255).nullable().optional(),
|
|
2033
|
-
kind:
|
|
2034
|
-
engine:
|
|
2065
|
+
kind: bn,
|
|
2066
|
+
engine: Sn,
|
|
2035
2067
|
engine_instance_id: e.string().max(100).nullable().optional(),
|
|
2036
2068
|
target_worker_version: e.string().max(255).nullable().optional(),
|
|
2037
2069
|
target_database_version: e.string().max(255).nullable().optional(),
|
|
@@ -2039,7 +2071,7 @@ e.object({
|
|
|
2039
2071
|
input: e.record(e.string(), e.unknown()).nullable().optional()
|
|
2040
2072
|
}).extend({
|
|
2041
2073
|
id: e.string(),
|
|
2042
|
-
status:
|
|
2074
|
+
status: xn,
|
|
2043
2075
|
current_step: e.string().max(255).nullable().optional(),
|
|
2044
2076
|
error: e.string().nullable().optional(),
|
|
2045
2077
|
result: e.record(e.string(), e.unknown()).nullable().optional(),
|
|
@@ -2060,7 +2092,7 @@ e.object({
|
|
|
2060
2092
|
claim_expires_at: !0,
|
|
2061
2093
|
finished_at: !0
|
|
2062
2094
|
}).partial();
|
|
2063
|
-
var
|
|
2095
|
+
var Cn = e.enum([
|
|
2064
2096
|
"started",
|
|
2065
2097
|
"succeeded",
|
|
2066
2098
|
"failed",
|
|
@@ -2071,14 +2103,14 @@ var bn = e.enum([
|
|
|
2071
2103
|
e.object({
|
|
2072
2104
|
operation_id: e.string().max(255),
|
|
2073
2105
|
step: e.string().max(255),
|
|
2074
|
-
outcome:
|
|
2106
|
+
outcome: Cn,
|
|
2075
2107
|
detail: e.record(e.string(), e.unknown()).nullable().optional(),
|
|
2076
2108
|
attempt: e.number().int().min(1).default(1)
|
|
2077
2109
|
}).extend({
|
|
2078
2110
|
id: e.string(),
|
|
2079
2111
|
created_at: e.string()
|
|
2080
2112
|
});
|
|
2081
|
-
var
|
|
2113
|
+
var F = e.enum([
|
|
2082
2114
|
"pending",
|
|
2083
2115
|
"inserted",
|
|
2084
2116
|
"updated",
|
|
@@ -2089,28 +2121,28 @@ e.object({
|
|
|
2089
2121
|
operation_id: e.string().max(255),
|
|
2090
2122
|
seq: e.number().int().min(0),
|
|
2091
2123
|
payload: e.record(e.string(), e.unknown()),
|
|
2092
|
-
status:
|
|
2124
|
+
status: F.default("pending"),
|
|
2093
2125
|
error_code: e.string().max(64).nullable().optional(),
|
|
2094
2126
|
error_message: e.string().nullable().optional(),
|
|
2095
2127
|
error_path: e.string().max(255).nullable().optional(),
|
|
2096
2128
|
entity_id: e.string().max(255).nullable().optional()
|
|
2097
2129
|
}).extend({
|
|
2098
|
-
status:
|
|
2130
|
+
status: F,
|
|
2099
2131
|
created_at: e.string(),
|
|
2100
2132
|
updated_at: e.string()
|
|
2101
2133
|
}), e.object({
|
|
2102
2134
|
seq: e.number().int().min(0),
|
|
2103
|
-
status:
|
|
2135
|
+
status: F,
|
|
2104
2136
|
error_code: e.string().max(64).nullable().optional(),
|
|
2105
2137
|
error_message: e.string().nullable().optional(),
|
|
2106
2138
|
error_path: e.string().max(255).nullable().optional(),
|
|
2107
2139
|
entity_id: e.string().max(255).nullable().optional()
|
|
2108
2140
|
});
|
|
2109
|
-
var
|
|
2141
|
+
var wn = e.enum([
|
|
2110
2142
|
"upgrade",
|
|
2111
2143
|
"reseed",
|
|
2112
2144
|
"backup"
|
|
2113
|
-
]),
|
|
2145
|
+
]), Tn = e.enum([
|
|
2114
2146
|
"pending",
|
|
2115
2147
|
"canary",
|
|
2116
2148
|
"rolling",
|
|
@@ -2119,7 +2151,7 @@ var xn = e.enum([
|
|
|
2119
2151
|
"failed"
|
|
2120
2152
|
]);
|
|
2121
2153
|
e.object({
|
|
2122
|
-
kind:
|
|
2154
|
+
kind: wn,
|
|
2123
2155
|
target_worker_version: e.string().max(255).nullable().optional(),
|
|
2124
2156
|
target_database_version: e.string().max(255).nullable().optional(),
|
|
2125
2157
|
wave_size: e.number().int().min(1).default(10),
|
|
@@ -2128,7 +2160,7 @@ e.object({
|
|
|
2128
2160
|
initiated_by: e.string().max(255).nullable().optional()
|
|
2129
2161
|
}).extend({
|
|
2130
2162
|
id: e.string(),
|
|
2131
|
-
status:
|
|
2163
|
+
status: Tn,
|
|
2132
2164
|
created_at: e.string(),
|
|
2133
2165
|
updated_at: e.string(),
|
|
2134
2166
|
finished_at: e.string().nullable().optional()
|
|
@@ -2150,7 +2182,7 @@ e.object({
|
|
|
2150
2182
|
code: e.string(),
|
|
2151
2183
|
state: e.string().optional()
|
|
2152
2184
|
});
|
|
2153
|
-
var
|
|
2185
|
+
var En = e.object({
|
|
2154
2186
|
button_border_radius: e.number(),
|
|
2155
2187
|
button_border_weight: e.number(),
|
|
2156
2188
|
buttons_style: e.enum([
|
|
@@ -2168,7 +2200,7 @@ var Cn = e.object({
|
|
|
2168
2200
|
show_widget_shadow: e.boolean(),
|
|
2169
2201
|
widget_border_weight: e.number(),
|
|
2170
2202
|
widget_corner_radius: e.number()
|
|
2171
|
-
}),
|
|
2203
|
+
}), Dn = e.object({
|
|
2172
2204
|
base_focus_color: e.string(),
|
|
2173
2205
|
base_hover_color: e.string(),
|
|
2174
2206
|
body_text: e.string(),
|
|
@@ -2192,20 +2224,20 @@ var Cn = e.object({
|
|
|
2192
2224
|
success: e.string(),
|
|
2193
2225
|
widget_background: e.string(),
|
|
2194
2226
|
widget_border: e.string()
|
|
2195
|
-
}),
|
|
2227
|
+
}), I = e.object({
|
|
2196
2228
|
bold: e.boolean(),
|
|
2197
2229
|
size: e.number()
|
|
2198
|
-
}),
|
|
2199
|
-
body_text:
|
|
2200
|
-
buttons_text:
|
|
2230
|
+
}), On = e.object({
|
|
2231
|
+
body_text: I,
|
|
2232
|
+
buttons_text: I,
|
|
2201
2233
|
font_url: e.string(),
|
|
2202
|
-
input_labels:
|
|
2203
|
-
links:
|
|
2234
|
+
input_labels: I,
|
|
2235
|
+
links: I,
|
|
2204
2236
|
links_style: e.enum(["normal", "underlined"]),
|
|
2205
2237
|
reference_text_size: e.number(),
|
|
2206
|
-
subtitle:
|
|
2207
|
-
title:
|
|
2208
|
-
}),
|
|
2238
|
+
subtitle: I,
|
|
2239
|
+
title: I
|
|
2240
|
+
}), kn = e.object({
|
|
2209
2241
|
background_color: e.string(),
|
|
2210
2242
|
background_image_url: e.string(),
|
|
2211
2243
|
page_layout: e.enum([
|
|
@@ -2218,7 +2250,7 @@ var Cn = e.object({
|
|
|
2218
2250
|
"chip",
|
|
2219
2251
|
"none"
|
|
2220
2252
|
]).optional()
|
|
2221
|
-
}),
|
|
2253
|
+
}), An = e.object({
|
|
2222
2254
|
header_text_alignment: e.enum([
|
|
2223
2255
|
"center",
|
|
2224
2256
|
"left",
|
|
@@ -2235,43 +2267,44 @@ var Cn = e.object({
|
|
|
2235
2267
|
social_buttons_layout: e.enum(["bottom", "top"])
|
|
2236
2268
|
});
|
|
2237
2269
|
e.object({
|
|
2238
|
-
borders:
|
|
2239
|
-
colors:
|
|
2270
|
+
borders: En,
|
|
2271
|
+
colors: Dn,
|
|
2240
2272
|
displayName: e.string(),
|
|
2241
|
-
fonts:
|
|
2242
|
-
page_background:
|
|
2243
|
-
widget:
|
|
2273
|
+
fonts: On,
|
|
2274
|
+
page_background: kn,
|
|
2275
|
+
widget: An
|
|
2244
2276
|
}).extend({ themeId: e.string() }), e.object({
|
|
2277
|
+
...a,
|
|
2245
2278
|
universal_login_experience: e.enum(["new", "classic"]).default("new"),
|
|
2246
2279
|
identifier_first: e.boolean().default(!0),
|
|
2247
2280
|
password_first: e.boolean().default(!1),
|
|
2248
2281
|
show_last_used_connection: e.boolean().default(!1),
|
|
2249
2282
|
webauthn_platform_first_factor: e.boolean()
|
|
2250
2283
|
});
|
|
2251
|
-
var
|
|
2284
|
+
var jn = e.object({
|
|
2252
2285
|
hosts: e.array(e.string()).optional(),
|
|
2253
2286
|
methods: e.array(e.string()).optional(),
|
|
2254
2287
|
path: e.string().default("/*"),
|
|
2255
2288
|
headers: e.record(e.string(), e.string()).optional(),
|
|
2256
2289
|
query: e.record(e.string(), e.string()).optional()
|
|
2257
|
-
}),
|
|
2290
|
+
}), Mn = e.object({
|
|
2258
2291
|
type: e.string(),
|
|
2259
2292
|
options: e.record(e.string(), e.unknown()).default({})
|
|
2260
|
-
}),
|
|
2293
|
+
}), L = e.object({
|
|
2261
2294
|
id: e.string().optional(),
|
|
2262
2295
|
custom_domain_id: e.string(),
|
|
2263
2296
|
priority: e.number().int().default(100),
|
|
2264
|
-
match:
|
|
2265
|
-
handlers: e.array(
|
|
2266
|
-
}),
|
|
2297
|
+
match: jn,
|
|
2298
|
+
handlers: e.array(Mn).min(1)
|
|
2299
|
+
}), Nn = L.extend({
|
|
2267
2300
|
id: e.string(),
|
|
2268
2301
|
tenant_id: e.string(),
|
|
2269
2302
|
created_at: e.string(),
|
|
2270
2303
|
updated_at: e.string()
|
|
2271
|
-
}),
|
|
2304
|
+
}), Pn = L.partial().omit({
|
|
2272
2305
|
id: !0,
|
|
2273
2306
|
custom_domain_id: !0
|
|
2274
|
-
}),
|
|
2307
|
+
}), Fn = "custom_authentication", In = [
|
|
2275
2308
|
"urn:ietf:params:oauth:",
|
|
2276
2309
|
"urn:auth0",
|
|
2277
2310
|
"urn:okta",
|
|
@@ -2279,56 +2312,56 @@ var On = e.object({
|
|
|
2279
2312
|
"https://auth0.com",
|
|
2280
2313
|
"http://okta.com",
|
|
2281
2314
|
"https://okta.com"
|
|
2282
|
-
],
|
|
2315
|
+
], Ln = e.string().min(1).max(200).refine((e) => e.startsWith("https://") || e.startsWith("urn:"), { message: "subject_token_type must be a URI starting with https:// or urn:" }).refine((e) => !In.some((t) => e.toLowerCase().startsWith(t)), { message: "subject_token_type uses a reserved namespace" }), Rn = e.enum([
|
|
2283
2316
|
"RS256",
|
|
2284
2317
|
"RS384",
|
|
2285
2318
|
"RS512",
|
|
2286
2319
|
"ES256",
|
|
2287
2320
|
"ES384",
|
|
2288
2321
|
"ES512"
|
|
2289
|
-
]),
|
|
2322
|
+
]), zn = e.discriminatedUnion("type", [e.object({
|
|
2290
2323
|
type: e.literal("connection"),
|
|
2291
2324
|
connection: e.string().min(1),
|
|
2292
2325
|
create_if_not_exists: e.boolean().default(!0),
|
|
2293
2326
|
trust_email_verified: e.boolean().default(!1)
|
|
2294
|
-
}), e.object({ type: e.literal("user_id") })]),
|
|
2327
|
+
}), e.object({ type: e.literal("user_id") })]), Bn = e.object({
|
|
2295
2328
|
issuer: e.string().min(1).max(2048),
|
|
2296
|
-
jwks:
|
|
2329
|
+
jwks: $t.optional(),
|
|
2297
2330
|
jwks_uri: e.string().url().optional(),
|
|
2298
2331
|
audience: e.array(e.string().min(1)).min(1).optional(),
|
|
2299
|
-
algorithms: e.array(
|
|
2332
|
+
algorithms: e.array(Rn).min(1).optional(),
|
|
2300
2333
|
max_lifetime_seconds: e.number().int().min(1).max(3600).default(300),
|
|
2301
2334
|
require_jti: e.boolean().default(!0),
|
|
2302
|
-
user_mapping:
|
|
2335
|
+
user_mapping: zn
|
|
2303
2336
|
});
|
|
2304
2337
|
e.object({
|
|
2305
2338
|
name: e.string().min(1).max(255),
|
|
2306
|
-
subject_token_type:
|
|
2339
|
+
subject_token_type: Ln,
|
|
2307
2340
|
action_id: e.string().min(1).optional(),
|
|
2308
|
-
type: e.literal(
|
|
2309
|
-
jwt_verification:
|
|
2341
|
+
type: e.literal(Fn),
|
|
2342
|
+
jwt_verification: Bn.optional()
|
|
2310
2343
|
}).extend({
|
|
2311
2344
|
id: e.string(),
|
|
2312
2345
|
created_at: e.string(),
|
|
2313
2346
|
updated_at: e.string()
|
|
2314
2347
|
}), e.object({
|
|
2315
2348
|
name: e.string().min(1).max(255).optional(),
|
|
2316
|
-
subject_token_type:
|
|
2317
|
-
jwt_verification:
|
|
2349
|
+
subject_token_type: Ln.optional(),
|
|
2350
|
+
jwt_verification: Bn.optional()
|
|
2318
2351
|
});
|
|
2319
|
-
var
|
|
2352
|
+
var Vn = e.object({
|
|
2320
2353
|
scim: e.string(),
|
|
2321
2354
|
auth0: e.string()
|
|
2322
|
-
}),
|
|
2355
|
+
}), Hn = e.object({
|
|
2323
2356
|
connection_id: e.string(),
|
|
2324
2357
|
user_id_attribute: e.string().default("externalId"),
|
|
2325
|
-
mapping: e.array(
|
|
2358
|
+
mapping: e.array(Vn).default([])
|
|
2326
2359
|
});
|
|
2327
2360
|
e.object({
|
|
2328
2361
|
created_at: e.string(),
|
|
2329
2362
|
updated_at: e.string()
|
|
2330
|
-
}).extend(
|
|
2331
|
-
var
|
|
2363
|
+
}).extend(Hn.shape);
|
|
2364
|
+
var Un = e.object({
|
|
2332
2365
|
token_id: e.string(),
|
|
2333
2366
|
connection_id: e.string(),
|
|
2334
2367
|
token_hash: e.string(),
|
|
@@ -2338,20 +2371,21 @@ var Bn = e.object({
|
|
|
2338
2371
|
e.object({
|
|
2339
2372
|
created_at: e.string(),
|
|
2340
2373
|
last_used_at: e.string().optional()
|
|
2341
|
-
}).extend(
|
|
2342
|
-
var
|
|
2374
|
+
}).extend(Un.shape);
|
|
2375
|
+
var Wn = e.object({
|
|
2343
2376
|
connection_id: e.string(),
|
|
2344
2377
|
external_id: e.string(),
|
|
2345
2378
|
user_id: e.string()
|
|
2346
2379
|
});
|
|
2347
|
-
e.object({ created_at: e.string() }).extend(
|
|
2380
|
+
e.object({ created_at: e.string() }).extend(Wn.shape), e.object({
|
|
2381
|
+
...a,
|
|
2348
2382
|
name: e.string(),
|
|
2349
2383
|
enabled: e.boolean().optional().default(!0),
|
|
2350
2384
|
default_from_address: e.string().optional(),
|
|
2351
2385
|
credentials: e.record(e.string(), e.unknown()),
|
|
2352
2386
|
settings: e.object({}).optional()
|
|
2353
2387
|
});
|
|
2354
|
-
var
|
|
2388
|
+
var Gn = e.enum([
|
|
2355
2389
|
"verify_email",
|
|
2356
2390
|
"verify_email_by_code",
|
|
2357
2391
|
"reset_email",
|
|
@@ -2366,7 +2400,7 @@ var Hn = e.enum([
|
|
|
2366
2400
|
"user_invitation"
|
|
2367
2401
|
]);
|
|
2368
2402
|
e.object({
|
|
2369
|
-
template:
|
|
2403
|
+
template: Gn,
|
|
2370
2404
|
body: e.string(),
|
|
2371
2405
|
from: e.string(),
|
|
2372
2406
|
subject: e.string(),
|
|
@@ -2381,13 +2415,13 @@ e.object({
|
|
|
2381
2415
|
session_id: e.string().optional(),
|
|
2382
2416
|
organization: e.string().optional(),
|
|
2383
2417
|
auth_connection: e.string().optional(),
|
|
2384
|
-
auth_strategy:
|
|
2418
|
+
auth_strategy: nn.optional(),
|
|
2385
2419
|
user_id: e.string(),
|
|
2386
2420
|
client_id: e.string(),
|
|
2387
2421
|
expires_at: e.string().optional(),
|
|
2388
2422
|
idle_expires_at: e.string().optional(),
|
|
2389
2423
|
last_exchanged_at: e.string().optional(),
|
|
2390
|
-
device:
|
|
2424
|
+
device: _n,
|
|
2391
2425
|
resource_servers: e.array(e.object({
|
|
2392
2426
|
audience: e.string(),
|
|
2393
2427
|
scopes: e.string()
|
|
@@ -2408,10 +2442,10 @@ e.object({
|
|
|
2408
2442
|
name: e.string(),
|
|
2409
2443
|
options: e.object({})
|
|
2410
2444
|
});
|
|
2411
|
-
var
|
|
2445
|
+
var Kn = e.object({
|
|
2412
2446
|
value: e.string(),
|
|
2413
2447
|
description: e.string().optional()
|
|
2414
|
-
}),
|
|
2448
|
+
}), qn = e.object({
|
|
2415
2449
|
token_dialect: e.enum(["access_token", "access_token_authz"]).optional(),
|
|
2416
2450
|
enforce_policies: e.boolean().optional(),
|
|
2417
2451
|
allow_skipping_userinfo: e.boolean().optional(),
|
|
@@ -2419,11 +2453,11 @@ var Un = e.object({
|
|
|
2419
2453
|
persist_client_authorization: e.boolean().optional(),
|
|
2420
2454
|
enable_introspection_endpoint: e.boolean().optional(),
|
|
2421
2455
|
mtls: e.object({ bound_access_tokens: e.boolean().optional() }).optional()
|
|
2422
|
-
}),
|
|
2456
|
+
}), Jn = e.object({
|
|
2423
2457
|
id: e.string().optional(),
|
|
2424
2458
|
name: e.string(),
|
|
2425
2459
|
identifier: e.string(),
|
|
2426
|
-
scopes: e.array(
|
|
2460
|
+
scopes: e.array(Kn).optional(),
|
|
2427
2461
|
signing_alg: e.string().optional(),
|
|
2428
2462
|
signing_secret: e.string().optional(),
|
|
2429
2463
|
token_lifetime: e.number().default(86400),
|
|
@@ -2431,20 +2465,21 @@ var Un = e.object({
|
|
|
2431
2465
|
skip_consent_for_verifiable_first_party_clients: e.boolean().optional(),
|
|
2432
2466
|
allow_offline_access: e.boolean().optional(),
|
|
2433
2467
|
verificationKey: e.string().optional(),
|
|
2434
|
-
options:
|
|
2468
|
+
options: qn.optional(),
|
|
2435
2469
|
is_system: e.boolean().optional(),
|
|
2470
|
+
...a,
|
|
2436
2471
|
metadata: e.record(e.string(), e.any()).optional()
|
|
2437
2472
|
}).extend({
|
|
2438
2473
|
created_at: e.string().optional(),
|
|
2439
2474
|
updated_at: e.string().optional()
|
|
2440
2475
|
});
|
|
2441
|
-
e.array(
|
|
2442
|
-
var
|
|
2476
|
+
e.array(Jn);
|
|
2477
|
+
var Yn = e.object({
|
|
2443
2478
|
role_id: e.string(),
|
|
2444
2479
|
resource_server_identifier: e.string(),
|
|
2445
2480
|
permission_name: e.string()
|
|
2446
2481
|
}).extend({ created_at: e.string() });
|
|
2447
|
-
e.array(
|
|
2482
|
+
e.array(Yn), e.object({
|
|
2448
2483
|
user_id: e.string().openapi({ description: "The id of the user that granted the consent" }),
|
|
2449
2484
|
clientID: e.string().openapi({ description: "The id of the client the grant was issued to" }),
|
|
2450
2485
|
audience: e.string().optional().openapi({ description: "The audience the grant applies to" }),
|
|
@@ -2457,7 +2492,7 @@ e.array(Kn), e.object({
|
|
|
2457
2492
|
failed_logins: e.array(e.string()).optional(),
|
|
2458
2493
|
last_password_reset: e.string().optional()
|
|
2459
2494
|
});
|
|
2460
|
-
var
|
|
2495
|
+
var Xn = e.object({
|
|
2461
2496
|
user_id: e.string(),
|
|
2462
2497
|
resource_server_identifier: e.string(),
|
|
2463
2498
|
permission_name: e.string(),
|
|
@@ -2466,8 +2501,8 @@ var qn = e.object({
|
|
|
2466
2501
|
tenant_id: e.string(),
|
|
2467
2502
|
created_at: e.string().optional()
|
|
2468
2503
|
});
|
|
2469
|
-
e.array(
|
|
2470
|
-
var
|
|
2504
|
+
e.array(Xn);
|
|
2505
|
+
var Zn = e.object({
|
|
2471
2506
|
user_id: e.string(),
|
|
2472
2507
|
resource_server_identifier: e.string(),
|
|
2473
2508
|
resource_server_name: e.string(),
|
|
@@ -2476,8 +2511,8 @@ var Jn = e.object({
|
|
|
2476
2511
|
created_at: e.string().optional(),
|
|
2477
2512
|
organization_id: e.string().optional()
|
|
2478
2513
|
});
|
|
2479
|
-
e.array(
|
|
2480
|
-
var
|
|
2514
|
+
e.array(Zn);
|
|
2515
|
+
var Qn = e.object({
|
|
2481
2516
|
user_id: e.string(),
|
|
2482
2517
|
role_id: e.string(),
|
|
2483
2518
|
organization_id: e.string().optional()
|
|
@@ -2485,8 +2520,8 @@ var Yn = e.object({
|
|
|
2485
2520
|
tenant_id: e.string(),
|
|
2486
2521
|
created_at: e.string().optional()
|
|
2487
2522
|
});
|
|
2488
|
-
e.array(
|
|
2489
|
-
var
|
|
2523
|
+
e.array(Qn);
|
|
2524
|
+
var $n = e.object({
|
|
2490
2525
|
id: e.string().optional().openapi({ description: "The unique identifier of the role. If not provided, one will be generated." }),
|
|
2491
2526
|
name: e.string().min(1).max(50).openapi({ description: "The name of the role. Cannot include '<' or '>'" }),
|
|
2492
2527
|
description: e.string().max(255).optional().openapi({ description: "The description of the role" }),
|
|
@@ -2497,19 +2532,19 @@ var Xn = e.object({
|
|
|
2497
2532
|
created_at: e.string().optional(),
|
|
2498
2533
|
updated_at: e.string().optional()
|
|
2499
2534
|
});
|
|
2500
|
-
e.array(
|
|
2501
|
-
var
|
|
2535
|
+
e.array($n);
|
|
2536
|
+
var er = e.object({
|
|
2502
2537
|
logo_url: e.string().optional().openapi({ description: "URL of the organization's logo" }),
|
|
2503
2538
|
colors: e.object({
|
|
2504
2539
|
primary: e.string().optional().openapi({ description: "Primary color in hex format (e.g., #FF0000)" }),
|
|
2505
2540
|
page_background: e.string().optional().openapi({ description: "Page background color in hex format (e.g., #FFFFFF)" })
|
|
2506
2541
|
}).optional()
|
|
2507
|
-
}).optional(),
|
|
2542
|
+
}).optional(), tr = e.object({
|
|
2508
2543
|
connection_id: e.string().openapi({ description: "ID of the connection" }),
|
|
2509
2544
|
assign_membership_on_login: e.boolean().default(!1).openapi({ description: "Whether to assign membership to the organization on login" }),
|
|
2510
2545
|
show_as_button: e.boolean().default(!0).openapi({ description: "Whether to show this connection as a button in the login screen" }),
|
|
2511
2546
|
is_signup_enabled: e.boolean().default(!0).openapi({ description: "Whether signup is enabled for this connection" })
|
|
2512
|
-
}),
|
|
2547
|
+
}), nr = e.object({ client_credentials: e.object({
|
|
2513
2548
|
enforce: e.boolean().default(!1).openapi({ description: "Whether to enforce token quota limits" }),
|
|
2514
2549
|
per_day: e.number().min(0).default(0).openapi({ description: "Maximum tokens per day (0 = unlimited)" }),
|
|
2515
2550
|
per_hour: e.number().min(0).default(0).openapi({ description: "Maximum tokens per hour (0 = unlimited)" })
|
|
@@ -2518,15 +2553,15 @@ e.object({
|
|
|
2518
2553
|
id: e.string().optional(),
|
|
2519
2554
|
name: e.string().min(1).regex(/^[a-z0-9_-]+$/, { message: "Organization name must be lowercase and can only contain letters, numbers, hyphens, and underscores" }).openapi({ description: "The name of the organization. Must be lowercase and can only contain letters, numbers, hyphens, and underscores." }),
|
|
2520
2555
|
display_name: e.string().optional().openapi({ description: "The display name of the organization" }),
|
|
2521
|
-
branding:
|
|
2556
|
+
branding: er,
|
|
2522
2557
|
metadata: e.record(e.string(), e.any()).default({}).optional().openapi({ description: "Custom metadata for the organization" }),
|
|
2523
|
-
enabled_connections: e.array(
|
|
2524
|
-
token_quota:
|
|
2558
|
+
enabled_connections: e.array(tr).default([]).optional().openapi({ description: "List of enabled connections for the organization" }),
|
|
2559
|
+
token_quota: nr
|
|
2525
2560
|
}).extend(n.shape).extend({
|
|
2526
2561
|
id: e.string(),
|
|
2527
2562
|
name: e.string().min(1).openapi({ description: "The name of the organization" })
|
|
2528
2563
|
});
|
|
2529
|
-
var
|
|
2564
|
+
var rr = e.object({
|
|
2530
2565
|
connection_id: e.string().openapi({ description: "ID of the tenant-level connection to enable for the org." }),
|
|
2531
2566
|
assign_membership_on_login: e.boolean().optional().default(!1),
|
|
2532
2567
|
show_as_button: e.boolean().optional().default(!0),
|
|
@@ -2539,7 +2574,7 @@ var er = e.object({
|
|
|
2539
2574
|
created_at: e.string().optional(),
|
|
2540
2575
|
updated_at: e.string().optional()
|
|
2541
2576
|
});
|
|
2542
|
-
e.array(
|
|
2577
|
+
e.array(rr), e.object({
|
|
2543
2578
|
user_id: e.string().openapi({ description: "ID of the user" }),
|
|
2544
2579
|
organization_id: e.string().openapi({ description: "ID of the organization" })
|
|
2545
2580
|
}).extend(n.shape).extend({ id: e.string() }), e.object({
|
|
@@ -2678,7 +2713,7 @@ e.array(er), e.object({
|
|
|
2678
2713
|
"passwordless",
|
|
2679
2714
|
"enterprise"
|
|
2680
2715
|
]);
|
|
2681
|
-
var
|
|
2716
|
+
var ir = e.object({
|
|
2682
2717
|
cohort: e.string(),
|
|
2683
2718
|
sessions: e.number(),
|
|
2684
2719
|
active: e.array(e.number())
|
|
@@ -2687,9 +2722,9 @@ e.object({
|
|
|
2687
2722
|
interval: e.literal("week"),
|
|
2688
2723
|
from: e.string(),
|
|
2689
2724
|
to: e.string(),
|
|
2690
|
-
cohorts: e.array(
|
|
2725
|
+
cohorts: e.array(ir)
|
|
2691
2726
|
});
|
|
2692
|
-
var
|
|
2727
|
+
var ar = e.object({
|
|
2693
2728
|
cohort: e.string(),
|
|
2694
2729
|
tokens: e.number(),
|
|
2695
2730
|
active: e.array(e.number())
|
|
@@ -2698,24 +2733,24 @@ e.object({
|
|
|
2698
2733
|
interval: e.literal("week"),
|
|
2699
2734
|
from: e.string(),
|
|
2700
2735
|
to: e.string(),
|
|
2701
|
-
cohorts: e.array(
|
|
2736
|
+
cohorts: e.array(ar)
|
|
2702
2737
|
});
|
|
2703
|
-
var
|
|
2738
|
+
var or = e.object({
|
|
2704
2739
|
name: e.string(),
|
|
2705
2740
|
type: e.string()
|
|
2706
|
-
}),
|
|
2741
|
+
}), sr = e.object({
|
|
2707
2742
|
elapsed: e.number(),
|
|
2708
2743
|
rows_read: e.number().optional(),
|
|
2709
2744
|
bytes_read: e.number().optional()
|
|
2710
2745
|
});
|
|
2711
2746
|
e.object({
|
|
2712
|
-
meta: e.array(
|
|
2747
|
+
meta: e.array(or),
|
|
2713
2748
|
data: e.array(e.record(e.string(), e.any())),
|
|
2714
2749
|
rows: e.number(),
|
|
2715
2750
|
rows_before_limit_at_least: e.number().optional(),
|
|
2716
|
-
statistics:
|
|
2751
|
+
statistics: sr.optional()
|
|
2717
2752
|
});
|
|
2718
|
-
var
|
|
2753
|
+
var cr = e.enum(/* @__PURE__ */ "login.login-id.login-password.signup.signup-id.signup-password.reset-password.consent.mfa.mfa-push.mfa-otp.mfa-voice.mfa-phone.mfa-webauthn.mfa-email.mfa-recovery-code.status.device-flow.email-verification.email-otp-challenge.organizations.invitation.common.passkeys.captcha.custom-form.login-passwordless.mfa-login-options".split(".")), lr = e.record(e.string(), e.record(e.string(), e.string())).openapi({
|
|
2719
2754
|
type: "object",
|
|
2720
2755
|
additionalProperties: {
|
|
2721
2756
|
type: "object",
|
|
@@ -2723,23 +2758,23 @@ var ar = e.enum(/* @__PURE__ */ "login.login-id.login-password.signup.signup-id.
|
|
|
2723
2758
|
}
|
|
2724
2759
|
});
|
|
2725
2760
|
e.object({
|
|
2726
|
-
prompt:
|
|
2761
|
+
prompt: cr,
|
|
2727
2762
|
language: e.string(),
|
|
2728
|
-
custom_text:
|
|
2763
|
+
custom_text: lr
|
|
2729
2764
|
});
|
|
2730
|
-
var
|
|
2765
|
+
var ur = e.object({
|
|
2731
2766
|
"form-content-start": e.string().optional(),
|
|
2732
2767
|
"form-content-end": e.string().optional(),
|
|
2733
2768
|
"form-footer-start": e.string().optional(),
|
|
2734
2769
|
"form-footer-end": e.string().optional(),
|
|
2735
2770
|
"secondary-actions-start": e.string().optional(),
|
|
2736
2771
|
"secondary-actions-end": e.string().optional()
|
|
2737
|
-
}).strict(),
|
|
2772
|
+
}).strict(), dr = e.record(e.string(), ur);
|
|
2738
2773
|
e.object({
|
|
2739
2774
|
prompt: e.string(),
|
|
2740
|
-
partials:
|
|
2775
|
+
partials: dr
|
|
2741
2776
|
});
|
|
2742
|
-
var
|
|
2777
|
+
var fr = e.enum([
|
|
2743
2778
|
"phone",
|
|
2744
2779
|
"totp",
|
|
2745
2780
|
"email",
|
|
@@ -2747,9 +2782,9 @@ var lr = e.enum([
|
|
|
2747
2782
|
"webauthn-roaming",
|
|
2748
2783
|
"webauthn-platform",
|
|
2749
2784
|
"passkey"
|
|
2750
|
-
]),
|
|
2785
|
+
]), pr = e.object({
|
|
2751
2786
|
user_id: e.string(),
|
|
2752
|
-
type:
|
|
2787
|
+
type: fr,
|
|
2753
2788
|
phone_number: e.string().optional(),
|
|
2754
2789
|
totp_secret: e.string().optional(),
|
|
2755
2790
|
credential_id: e.string().optional(),
|
|
@@ -2783,7 +2818,7 @@ function R(t, n) {
|
|
|
2783
2818
|
path: ["public_key"]
|
|
2784
2819
|
}));
|
|
2785
2820
|
}
|
|
2786
|
-
|
|
2821
|
+
pr.superRefine(R), pr.extend({
|
|
2787
2822
|
id: e.string(),
|
|
2788
2823
|
created_at: e.string(),
|
|
2789
2824
|
updated_at: e.string()
|
|
@@ -2792,7 +2827,7 @@ L.superRefine(R), L.extend({
|
|
|
2792
2827
|
created_at: e.string().datetime({ offset: !0 }).optional(),
|
|
2793
2828
|
updated_at: e.string().datetime({ offset: !0 }).optional()
|
|
2794
2829
|
});
|
|
2795
|
-
var
|
|
2830
|
+
var mr = "x-authhero-preserve-location", z = class extends Error {
|
|
2796
2831
|
ms;
|
|
2797
2832
|
constructor(e, t) {
|
|
2798
2833
|
super(`${t ?? "Operation"} timed out after ${e}ms`), this.name = "TimeoutError", this.ms = e;
|
|
@@ -2805,7 +2840,7 @@ function V(e, t) {
|
|
|
2805
2840
|
let n = new AbortController(), r = setTimeout(() => n.abort(), e);
|
|
2806
2841
|
return t(n.signal).finally(() => clearTimeout(r));
|
|
2807
2842
|
}
|
|
2808
|
-
function
|
|
2843
|
+
function hr(e) {
|
|
2809
2844
|
let t = e.filter((e) => e !== void 0);
|
|
2810
2845
|
if (t.length <= 1) return t[0];
|
|
2811
2846
|
if (typeof AbortSignal.any == "function") return AbortSignal.any(t);
|
|
@@ -2819,7 +2854,7 @@ function dr(e) {
|
|
|
2819
2854
|
return n.signal;
|
|
2820
2855
|
}
|
|
2821
2856
|
function H(e, t, n, r) {
|
|
2822
|
-
let i = new AbortController(), a =
|
|
2857
|
+
let i = new AbortController(), a = hr([n, i.signal]) ?? i.signal, o, s = new Promise((n, r) => {
|
|
2823
2858
|
o = setTimeout(() => {
|
|
2824
2859
|
let n = new z(e, t);
|
|
2825
2860
|
i.abort(n), r(n);
|
|
@@ -2837,12 +2872,12 @@ function U(e, t, n) {
|
|
|
2837
2872
|
}
|
|
2838
2873
|
//#endregion
|
|
2839
2874
|
//#region src/data-plane/cache.ts
|
|
2840
|
-
var
|
|
2875
|
+
var gr = 1e4, _r = 8e3;
|
|
2841
2876
|
function W(e, t, n) {
|
|
2842
2877
|
let r = typeof t == "number" ? {
|
|
2843
2878
|
freshTtlMs: t,
|
|
2844
2879
|
maxEntries: n
|
|
2845
|
-
} : t, i = r.freshTtlMs, a = r.staleTtlMs ?? 0, o = r.staleIfErrorTtlMs ?? 0, s = r.negativeTtlMs ?? i, c = r.maxEntries ??
|
|
2880
|
+
} : t, i = r.freshTtlMs, a = r.staleTtlMs ?? 0, o = r.staleIfErrorTtlMs ?? 0, s = r.negativeTtlMs ?? i, c = r.maxEntries ?? gr, l = r.waitUntil, u = r.upstreamTimeoutMs ?? _r, d = u > 0 ? u : 1e4, f = /* @__PURE__ */ new Map();
|
|
2846
2881
|
function p(e) {
|
|
2847
2882
|
for (let [t, n] of f) n.stale_if_error_until <= e && n.stale_until <= e && f.delete(t);
|
|
2848
2883
|
for (; f.size >= c;) {
|
|
@@ -2897,7 +2932,7 @@ function W(e, t, n) {
|
|
|
2897
2932
|
}
|
|
2898
2933
|
//#endregion
|
|
2899
2934
|
//#region src/data-plane/registry.ts
|
|
2900
|
-
var
|
|
2935
|
+
var vr = class {
|
|
2901
2936
|
definitions = /* @__PURE__ */ new Map();
|
|
2902
2937
|
bindings;
|
|
2903
2938
|
constructor(e = {}) {
|
|
@@ -2922,33 +2957,33 @@ function G(e) {
|
|
|
2922
2957
|
}
|
|
2923
2958
|
//#endregion
|
|
2924
2959
|
//#region src/data-plane/handlers/util.ts
|
|
2925
|
-
var
|
|
2926
|
-
function
|
|
2927
|
-
e.set(
|
|
2960
|
+
var yr = "__authhero_proxy_request__", br = "__authhero_proxy_tenant_id__", xr = "__authhero_proxy_custom_domain_id__", Sr = "__authhero_proxy_domain__", Cr = "x-authhero-proxy-mutability-probe";
|
|
2961
|
+
function wr(e, t) {
|
|
2962
|
+
e.set(yr, t);
|
|
2928
2963
|
}
|
|
2929
2964
|
function K(e) {
|
|
2930
|
-
return e.get(
|
|
2965
|
+
return e.get(yr) ?? e.req.raw;
|
|
2931
2966
|
}
|
|
2932
|
-
function
|
|
2933
|
-
e.set(
|
|
2967
|
+
function Tr(e, t) {
|
|
2968
|
+
e.set(br, t.tenant_id), e.set(xr, t.custom_domain_id), e.set(Sr, t.domain);
|
|
2934
2969
|
}
|
|
2935
|
-
function
|
|
2936
|
-
return e.get(
|
|
2970
|
+
function Er(e) {
|
|
2971
|
+
return e.get(br);
|
|
2937
2972
|
}
|
|
2938
|
-
function
|
|
2939
|
-
return e.get(
|
|
2973
|
+
function Dr(e) {
|
|
2974
|
+
return e.get(xr);
|
|
2940
2975
|
}
|
|
2941
|
-
function
|
|
2942
|
-
return e.get(
|
|
2976
|
+
function Or(e) {
|
|
2977
|
+
return e.get(Sr);
|
|
2943
2978
|
}
|
|
2944
|
-
function
|
|
2979
|
+
function kr(e, t) {
|
|
2945
2980
|
let n = K(e), r = new Headers(n.headers);
|
|
2946
|
-
t(r),
|
|
2981
|
+
t(r), wr(e, new Request(n, { headers: r }));
|
|
2947
2982
|
}
|
|
2948
2983
|
function q(e) {
|
|
2949
2984
|
let t = e.res;
|
|
2950
2985
|
try {
|
|
2951
|
-
t.headers.append(
|
|
2986
|
+
t.headers.append(Cr, "1"), t.headers.delete(Cr);
|
|
2952
2987
|
return;
|
|
2953
2988
|
} catch {
|
|
2954
2989
|
e.res = new Response(t.body, {
|
|
@@ -2960,7 +2995,7 @@ function q(e) {
|
|
|
2960
2995
|
}
|
|
2961
2996
|
//#endregion
|
|
2962
2997
|
//#region src/data-plane/handlers/cors.ts
|
|
2963
|
-
var
|
|
2998
|
+
var Ar = e.object({
|
|
2964
2999
|
origins: e.array(e.string()).optional(),
|
|
2965
3000
|
allow_credentials: e.boolean().optional(),
|
|
2966
3001
|
allow_headers: e.array(e.string()).optional(),
|
|
@@ -2968,44 +3003,44 @@ var Er = e.object({
|
|
|
2968
3003
|
expose_headers: e.array(e.string()).optional(),
|
|
2969
3004
|
max_age: e.number().int().optional()
|
|
2970
3005
|
}).refine((e) => !(e.allow_credentials && e.origins?.includes("*")), { message: "Cannot use wildcard origin (*) with allow_credentials" });
|
|
2971
|
-
function
|
|
3006
|
+
function jr(e, t) {
|
|
2972
3007
|
let n = new Headers(), r = e.origins ?? ["*"], i = r.includes("*");
|
|
2973
3008
|
return i && !e.allow_credentials ? n.set("Access-Control-Allow-Origin", "*") : t && (i || r.includes(t)) && (n.set("Access-Control-Allow-Origin", t), n.append("Vary", "Origin")), e.allow_credentials && n.set("Access-Control-Allow-Credentials", "true"), e.allow_methods?.length && n.set("Access-Control-Allow-Methods", e.allow_methods.join(", ")), e.allow_headers?.length && n.set("Access-Control-Allow-Headers", e.allow_headers.join(", ")), e.expose_headers?.length && n.set("Access-Control-Expose-Headers", e.expose_headers.join(", ")), e.max_age !== void 0 && n.set("Access-Control-Max-Age", String(e.max_age)), n;
|
|
2974
3009
|
}
|
|
2975
|
-
var
|
|
3010
|
+
var Mr = G({
|
|
2976
3011
|
type: "cors",
|
|
2977
|
-
optionsSchema:
|
|
3012
|
+
optionsSchema: Ar,
|
|
2978
3013
|
build(e) {
|
|
2979
3014
|
return async (t, n) => {
|
|
2980
3015
|
let r = t.req.header("origin") ?? null;
|
|
2981
3016
|
if (t.req.method === "OPTIONS" && r !== null && t.req.header("access-control-request-method") !== void 0) {
|
|
2982
|
-
let t =
|
|
3017
|
+
let t = jr(e, r);
|
|
2983
3018
|
return new Response(null, {
|
|
2984
3019
|
status: 204,
|
|
2985
3020
|
headers: t
|
|
2986
3021
|
});
|
|
2987
3022
|
}
|
|
2988
3023
|
await n();
|
|
2989
|
-
let i =
|
|
3024
|
+
let i = jr(e, r);
|
|
2990
3025
|
q(t), i.forEach((e, n) => {
|
|
2991
3026
|
n.toLowerCase() === "vary" ? t.res.headers.append(n, e) : t.res.headers.set(n, e);
|
|
2992
3027
|
});
|
|
2993
3028
|
};
|
|
2994
3029
|
}
|
|
2995
|
-
}),
|
|
3030
|
+
}), Nr = e.object({
|
|
2996
3031
|
username: e.string(),
|
|
2997
3032
|
password: e.string(),
|
|
2998
3033
|
realm: e.string().optional()
|
|
2999
3034
|
});
|
|
3000
|
-
function
|
|
3035
|
+
function Pr(e, t) {
|
|
3001
3036
|
let n = `${e}:${t}`;
|
|
3002
3037
|
return typeof btoa == "function" ? btoa(n) : Buffer.from(n, "utf-8").toString("base64");
|
|
3003
3038
|
}
|
|
3004
|
-
var
|
|
3039
|
+
var Fr = G({
|
|
3005
3040
|
type: "basic_auth",
|
|
3006
|
-
optionsSchema:
|
|
3041
|
+
optionsSchema: Nr,
|
|
3007
3042
|
build(e) {
|
|
3008
|
-
let t =
|
|
3043
|
+
let t = Pr(e.username, e.password), n = (e.realm ?? "Restricted").replace(/["\\\r\n]/g, "");
|
|
3009
3044
|
return async (e, r) => {
|
|
3010
3045
|
let i = e.req.header("authorization");
|
|
3011
3046
|
if (i) {
|
|
@@ -3021,7 +3056,7 @@ var jr = G({
|
|
|
3021
3056
|
});
|
|
3022
3057
|
};
|
|
3023
3058
|
}
|
|
3024
|
-
}),
|
|
3059
|
+
}), Ir = G({
|
|
3025
3060
|
type: "headers",
|
|
3026
3061
|
optionsSchema: e.object({
|
|
3027
3062
|
request: e.record(e.string(), e.string()).optional(),
|
|
@@ -3031,12 +3066,12 @@ var jr = G({
|
|
|
3031
3066
|
}),
|
|
3032
3067
|
build(e) {
|
|
3033
3068
|
return async (t, n) => {
|
|
3034
|
-
if ((e.request || e.remove_request) &&
|
|
3069
|
+
if ((e.request || e.remove_request) && kr(t, (t) => {
|
|
3035
3070
|
if (e.remove_request?.forEach((e) => t.delete(e)), e.request) for (let [n, r] of Object.entries(e.request)) t.set(n, r);
|
|
3036
3071
|
}), await n(), (e.response || e.remove_response) && (q(t), e.remove_response?.forEach((e) => t.res.headers.delete(e)), e.response)) for (let [n, r] of Object.entries(e.response)) t.res.headers.set(n, r);
|
|
3037
3072
|
};
|
|
3038
3073
|
}
|
|
3039
|
-
}),
|
|
3074
|
+
}), Lr = G({
|
|
3040
3075
|
type: "cache",
|
|
3041
3076
|
optionsSchema: e.object({ ttl_seconds: e.number().int().positive() }),
|
|
3042
3077
|
build(e) {
|
|
@@ -3047,7 +3082,7 @@ var jr = G({
|
|
|
3047
3082
|
}
|
|
3048
3083
|
};
|
|
3049
3084
|
}
|
|
3050
|
-
}),
|
|
3085
|
+
}), Rr = [
|
|
3051
3086
|
"173.245.48.0/20",
|
|
3052
3087
|
"103.21.244.0/22",
|
|
3053
3088
|
"103.22.200.0/22",
|
|
@@ -3071,7 +3106,7 @@ var jr = G({
|
|
|
3071
3106
|
"2a06:98c0::/29",
|
|
3072
3107
|
"2c0f:f248::/32"
|
|
3073
3108
|
];
|
|
3074
|
-
function
|
|
3109
|
+
function zr(e) {
|
|
3075
3110
|
let t = e.split(".");
|
|
3076
3111
|
if (t.length !== 4) return null;
|
|
3077
3112
|
let n = [];
|
|
@@ -3083,14 +3118,14 @@ function Fr(e) {
|
|
|
3083
3118
|
}
|
|
3084
3119
|
return n;
|
|
3085
3120
|
}
|
|
3086
|
-
function
|
|
3121
|
+
function Br(e) {
|
|
3087
3122
|
if (e === "") return [];
|
|
3088
3123
|
let t = e.split(":"), n = [];
|
|
3089
3124
|
for (let e = 0; e < t.length; e++) {
|
|
3090
3125
|
let r = t[e];
|
|
3091
3126
|
if (r.includes(".")) {
|
|
3092
3127
|
if (e !== t.length - 1) return null;
|
|
3093
|
-
let i =
|
|
3128
|
+
let i = zr(r);
|
|
3094
3129
|
if (!i) return null;
|
|
3095
3130
|
n.push(i[0] << 8 | i[1], i[2] << 8 | i[3]);
|
|
3096
3131
|
continue;
|
|
@@ -3100,14 +3135,14 @@ function Ir(e) {
|
|
|
3100
3135
|
}
|
|
3101
3136
|
return n;
|
|
3102
3137
|
}
|
|
3103
|
-
function
|
|
3138
|
+
function Vr(e) {
|
|
3104
3139
|
let t = e.split("::");
|
|
3105
3140
|
if (t.length > 2) return null;
|
|
3106
|
-
let n =
|
|
3141
|
+
let n = Br(t[0] ?? "");
|
|
3107
3142
|
if (!n) return null;
|
|
3108
3143
|
let r;
|
|
3109
3144
|
if (t.length === 2) {
|
|
3110
|
-
let e =
|
|
3145
|
+
let e = Br(t[1] ?? "");
|
|
3111
3146
|
if (!e) return null;
|
|
3112
3147
|
let i = 8 - n.length - e.length;
|
|
3113
3148
|
if (i < 1) return null;
|
|
@@ -3122,25 +3157,25 @@ function Lr(e) {
|
|
|
3122
3157
|
for (let e of r) i.push(e >> 8 & 255, e & 255);
|
|
3123
3158
|
return i;
|
|
3124
3159
|
}
|
|
3125
|
-
function
|
|
3160
|
+
function Hr(e) {
|
|
3126
3161
|
let t = e.trim();
|
|
3127
3162
|
t.startsWith("[") && t.endsWith("]") && (t = t.slice(1, -1));
|
|
3128
3163
|
let n = t.indexOf("%");
|
|
3129
3164
|
if (n !== -1 && (t = t.slice(0, n)), t === "") return null;
|
|
3130
|
-
if (!t.includes(":")) return
|
|
3131
|
-
let r =
|
|
3165
|
+
if (!t.includes(":")) return zr(t);
|
|
3166
|
+
let r = Vr(t);
|
|
3132
3167
|
return r ? r.slice(0, 10).every((e) => e === 0) && r[10] === 255 && r[11] === 255 ? r.slice(12) : r : null;
|
|
3133
3168
|
}
|
|
3134
|
-
function
|
|
3135
|
-
let [t, n] = e.split("/"), r =
|
|
3169
|
+
function Ur(e) {
|
|
3170
|
+
let [t, n] = e.split("/"), r = Hr(t ?? ""), i = Number(n);
|
|
3136
3171
|
if (!r || !Number.isInteger(i)) throw Error(`Invalid Cloudflare CIDR: ${e}`);
|
|
3137
3172
|
return {
|
|
3138
3173
|
bytes: r,
|
|
3139
3174
|
prefixBits: i
|
|
3140
3175
|
};
|
|
3141
3176
|
}
|
|
3142
|
-
var
|
|
3143
|
-
function
|
|
3177
|
+
var Wr = Rr.map(Ur);
|
|
3178
|
+
function Gr(e, t) {
|
|
3144
3179
|
if (e.length !== t.bytes.length) return !1;
|
|
3145
3180
|
let n = t.prefixBits >> 3;
|
|
3146
3181
|
for (let r = 0; r < n; r++) if (e[r] !== t.bytes[r]) return !1;
|
|
@@ -3149,11 +3184,11 @@ function Br(e, t) {
|
|
|
3149
3184
|
let i = 255 << 8 - r & 255;
|
|
3150
3185
|
return (e[n] & i) === (t.bytes[n] & i);
|
|
3151
3186
|
}
|
|
3152
|
-
function
|
|
3153
|
-
let t =
|
|
3154
|
-
return t ?
|
|
3187
|
+
function Kr(e) {
|
|
3188
|
+
let t = Hr(e);
|
|
3189
|
+
return t ? Wr.some((e) => Gr(t, e)) : !1;
|
|
3155
3190
|
}
|
|
3156
|
-
var
|
|
3191
|
+
var qr = G({
|
|
3157
3192
|
type: "forwarded_headers",
|
|
3158
3193
|
optionsSchema: e.object({
|
|
3159
3194
|
client_ip_header: e.string().default("cf-connecting-ip"),
|
|
@@ -3164,46 +3199,46 @@ var Hr = G({
|
|
|
3164
3199
|
build(e) {
|
|
3165
3200
|
return async (t, n) => {
|
|
3166
3201
|
let r = new URL(t.req.url);
|
|
3167
|
-
|
|
3202
|
+
kr(t, (n) => {
|
|
3168
3203
|
n.set("x-forwarded-host", r.host), n.set("x-forwarded-proto", r.protocol.replace(":", "")), e.set_x_original_url && n.set("x-original-url", t.req.url);
|
|
3169
|
-
let i = n.get(e.client_ip_header), a = i && e.skip_cloudflare_client_ip &&
|
|
3204
|
+
let i = n.get(e.client_ip_header), a = i && e.skip_cloudflare_client_ip && Kr(i) ? null : i, o = (n.get("x-forwarded-for") ?? "").split(",").map((e) => e.trim()).filter(Boolean), s = a ?? o[o.length - 1] ?? "127.0.0.1", c = o.length === 0 || o[o.length - 1] !== s, l = o.length ? c ? `${o.join(", ")}, ${s}` : o.join(", ") : s;
|
|
3170
3205
|
n.set("x-forwarded-for", l), e.set_x_real_ip && n.set("x-real-ip", s);
|
|
3171
3206
|
}), await n();
|
|
3172
3207
|
};
|
|
3173
3208
|
}
|
|
3174
|
-
}),
|
|
3175
|
-
function
|
|
3209
|
+
}), Jr = e.object({ upstream_host: e.string().optional() });
|
|
3210
|
+
function Yr(e) {
|
|
3176
3211
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
3177
3212
|
}
|
|
3178
|
-
function
|
|
3213
|
+
function Xr(e) {
|
|
3179
3214
|
if (typeof e.getSetCookie == "function") return e.getSetCookie();
|
|
3180
3215
|
let t = [];
|
|
3181
3216
|
return e.forEach((e, n) => {
|
|
3182
3217
|
n.toLowerCase() === "set-cookie" && t.push(e);
|
|
3183
3218
|
}), t;
|
|
3184
3219
|
}
|
|
3185
|
-
var
|
|
3220
|
+
var Zr = G({
|
|
3186
3221
|
type: "rewrite_cookies",
|
|
3187
|
-
optionsSchema:
|
|
3222
|
+
optionsSchema: Jr,
|
|
3188
3223
|
build(e) {
|
|
3189
3224
|
return async (t, n) => {
|
|
3190
3225
|
await n();
|
|
3191
3226
|
let r = new URL(t.req.url).hostname, i = e.upstream_host ?? t.get("__proxy_upstream_host__");
|
|
3192
3227
|
if (!i) return;
|
|
3193
|
-
let a =
|
|
3228
|
+
let a = Xr(t.res.headers);
|
|
3194
3229
|
if (a.length === 0) return;
|
|
3195
|
-
let o =
|
|
3230
|
+
let o = Yr(i), s = RegExp(`(?:^|;\\s*)Domain=\\.?${o}(?=;|$)`, "i");
|
|
3196
3231
|
q(t), t.res.headers.delete("set-cookie");
|
|
3197
3232
|
for (let e of a) t.res.headers.append("set-cookie", e.replace(s, `Domain=${r}`));
|
|
3198
3233
|
};
|
|
3199
3234
|
}
|
|
3200
|
-
}),
|
|
3235
|
+
}), Qr = G({
|
|
3201
3236
|
type: "rewrite_location",
|
|
3202
3237
|
optionsSchema: e.object({ upstream_origin: e.string().optional() }),
|
|
3203
3238
|
build(e) {
|
|
3204
3239
|
return async (t, n) => {
|
|
3205
3240
|
if (await n(), t.res.headers.has("x-authhero-preserve-location")) {
|
|
3206
|
-
q(t), t.res.headers.delete(
|
|
3241
|
+
q(t), t.res.headers.delete(mr);
|
|
3207
3242
|
return;
|
|
3208
3243
|
}
|
|
3209
3244
|
let r = t.res.status;
|
|
@@ -3223,7 +3258,7 @@ var Kr = G({
|
|
|
3223
3258
|
q(t), t.res.headers.set("location", c);
|
|
3224
3259
|
};
|
|
3225
3260
|
}
|
|
3226
|
-
}),
|
|
3261
|
+
}), $r = new Set([
|
|
3227
3262
|
"connection",
|
|
3228
3263
|
"keep-alive",
|
|
3229
3264
|
"proxy-authenticate",
|
|
@@ -3232,25 +3267,25 @@ var Kr = G({
|
|
|
3232
3267
|
"trailers",
|
|
3233
3268
|
"transfer-encoding",
|
|
3234
3269
|
"upgrade"
|
|
3235
|
-
]),
|
|
3270
|
+
]), ei = 3e4, ti = e.object({
|
|
3236
3271
|
upstream_url: e.string(),
|
|
3237
3272
|
preserve_host: e.boolean().default(!1),
|
|
3238
3273
|
timeout_ms: e.number().int().positive().optional()
|
|
3239
3274
|
});
|
|
3240
|
-
function
|
|
3275
|
+
function ni(e, t) {
|
|
3241
3276
|
return e === "" || e === "/" ? t : `${e.endsWith("/") ? e.slice(0, -1) : e}${t.startsWith("/") ? t : `/${t}`}`;
|
|
3242
3277
|
}
|
|
3243
|
-
function
|
|
3278
|
+
function ri(e) {
|
|
3244
3279
|
return e !== "GET" && e !== "HEAD";
|
|
3245
3280
|
}
|
|
3246
|
-
var
|
|
3247
|
-
function
|
|
3281
|
+
var ii = 128 * 1024;
|
|
3282
|
+
function ai(e) {
|
|
3248
3283
|
let t = e.headers.get("content-length");
|
|
3249
3284
|
if (t === null) return null;
|
|
3250
3285
|
let n = Number(t);
|
|
3251
3286
|
return Number.isInteger(n) && n >= 0 ? n : null;
|
|
3252
3287
|
}
|
|
3253
|
-
async function
|
|
3288
|
+
async function oi(e, t) {
|
|
3254
3289
|
let n = e.getReader(), r = !1, i = setTimeout(() => {
|
|
3255
3290
|
r = !0, n.cancel().catch(() => {});
|
|
3256
3291
|
}, t), a = [], o = 0;
|
|
@@ -3268,7 +3303,7 @@ async function ti(e, t) {
|
|
|
3268
3303
|
for (let e of a) s.set(e, c), c += e.byteLength;
|
|
3269
3304
|
return s.buffer;
|
|
3270
3305
|
}
|
|
3271
|
-
function
|
|
3306
|
+
function si(e) {
|
|
3272
3307
|
return B(e) ? new Response("Request body timeout", {
|
|
3273
3308
|
status: 408,
|
|
3274
3309
|
headers: { "x-authhero-proxy-error": "request_body_timeout" }
|
|
@@ -3277,20 +3312,20 @@ function ni(e) {
|
|
|
3277
3312
|
headers: { "x-authhero-proxy-error": "request_body_failed" }
|
|
3278
3313
|
});
|
|
3279
3314
|
}
|
|
3280
|
-
async function
|
|
3281
|
-
if (!
|
|
3282
|
-
let r =
|
|
3283
|
-
if (r === null || r >
|
|
3284
|
-
let i = await
|
|
3315
|
+
async function ci(e, t, n) {
|
|
3316
|
+
if (!ri(e.method) || !e.body) return;
|
|
3317
|
+
let r = ai(e);
|
|
3318
|
+
if (r === null || r > ii) return e.body;
|
|
3319
|
+
let i = await oi(e.body, n);
|
|
3285
3320
|
return t.set("content-length", String(i.byteLength)), i;
|
|
3286
3321
|
}
|
|
3287
|
-
async function
|
|
3322
|
+
async function li(e, t, n) {
|
|
3288
3323
|
let r = new URL(t.url), i = new URL(e.upstream_url);
|
|
3289
|
-
i.pathname =
|
|
3324
|
+
i.pathname = ni(i.pathname, r.pathname), i.search = r.search;
|
|
3290
3325
|
let a = new Headers(t.headers);
|
|
3291
|
-
for (let e of
|
|
3326
|
+
for (let e of $r) a.delete(e);
|
|
3292
3327
|
e.preserve_host || a.set("host", i.host), a.has("x-forwarded-host") || a.set("x-forwarded-host", r.host), a.has("x-forwarded-proto") || a.set("x-forwarded-proto", r.protocol.replace(":", ""));
|
|
3293
|
-
let o = await
|
|
3328
|
+
let o = await ci(t, a, n), s = {
|
|
3294
3329
|
method: t.method,
|
|
3295
3330
|
headers: a,
|
|
3296
3331
|
body: o,
|
|
@@ -3301,17 +3336,17 @@ async function ii(e, t, n) {
|
|
|
3301
3336
|
init: s
|
|
3302
3337
|
};
|
|
3303
3338
|
}
|
|
3304
|
-
var
|
|
3339
|
+
var ui = G({
|
|
3305
3340
|
type: "http",
|
|
3306
|
-
optionsSchema:
|
|
3341
|
+
optionsSchema: ti,
|
|
3307
3342
|
build(e) {
|
|
3308
|
-
let t = e.timeout_ms ??
|
|
3343
|
+
let t = e.timeout_ms ?? ei;
|
|
3309
3344
|
return async (n) => {
|
|
3310
3345
|
let r = K(n), i;
|
|
3311
3346
|
try {
|
|
3312
|
-
i = await
|
|
3347
|
+
i = await li(e, r, t);
|
|
3313
3348
|
} catch (e) {
|
|
3314
|
-
return
|
|
3349
|
+
return si(e);
|
|
3315
3350
|
}
|
|
3316
3351
|
let { target: a, init: o } = i;
|
|
3317
3352
|
n.set("__proxy_upstream_host__", a.hostname), n.set("__proxy_upstream_origin__", `${a.protocol}//${a.host}`);
|
|
@@ -3325,31 +3360,31 @@ var ai = G({
|
|
|
3325
3360
|
}
|
|
3326
3361
|
};
|
|
3327
3362
|
}
|
|
3328
|
-
}),
|
|
3363
|
+
}), di = 3e4, fi = e.object({
|
|
3329
3364
|
binding: e.string(),
|
|
3330
3365
|
upstream_url: e.string().optional(),
|
|
3331
3366
|
preserve_host: e.boolean().default(!0),
|
|
3332
3367
|
timeout_ms: e.number().int().positive().optional()
|
|
3333
3368
|
});
|
|
3334
|
-
function
|
|
3369
|
+
function pi(e) {
|
|
3335
3370
|
return typeof e == "object" && !!e && typeof e.fetch == "function";
|
|
3336
3371
|
}
|
|
3337
|
-
var
|
|
3372
|
+
var mi = G({
|
|
3338
3373
|
type: "service_binding",
|
|
3339
|
-
optionsSchema:
|
|
3374
|
+
optionsSchema: fi,
|
|
3340
3375
|
build(e, t) {
|
|
3341
3376
|
let n = t.bindings[e.binding];
|
|
3342
|
-
if (!
|
|
3343
|
-
let r = e.upstream_url ?? `https://${e.binding}.binding.invalid/`, i = e.timeout_ms ??
|
|
3377
|
+
if (!pi(n)) throw Error(`Service binding "${e.binding}" is not configured or is not a Fetcher`);
|
|
3378
|
+
let r = e.upstream_url ?? `https://${e.binding}.binding.invalid/`, i = e.timeout_ms ?? di;
|
|
3344
3379
|
return async (t) => {
|
|
3345
3380
|
let a = K(t), o;
|
|
3346
3381
|
try {
|
|
3347
|
-
o = await
|
|
3382
|
+
o = await li({
|
|
3348
3383
|
upstream_url: r,
|
|
3349
3384
|
preserve_host: e.preserve_host
|
|
3350
3385
|
}, a, i);
|
|
3351
3386
|
} catch (e) {
|
|
3352
|
-
return
|
|
3387
|
+
return si(e);
|
|
3353
3388
|
}
|
|
3354
3389
|
let { target: s, init: c } = o;
|
|
3355
3390
|
t.set("__proxy_upstream_host__", s.hostname), t.set("__proxy_upstream_origin__", `${s.protocol}//${s.host}`);
|
|
@@ -3363,35 +3398,35 @@ var li = G({
|
|
|
3363
3398
|
}
|
|
3364
3399
|
};
|
|
3365
3400
|
}
|
|
3366
|
-
}),
|
|
3401
|
+
}), hi = 3e4, gi = e.object({
|
|
3367
3402
|
binding: e.string(),
|
|
3368
3403
|
script_name: e.string(),
|
|
3369
3404
|
cpu_ms: e.number().int().positive().optional(),
|
|
3370
3405
|
subrequests: e.number().int().positive().optional(),
|
|
3371
3406
|
timeout_ms: e.number().int().positive().optional()
|
|
3372
3407
|
});
|
|
3373
|
-
function
|
|
3408
|
+
function _i(e) {
|
|
3374
3409
|
return typeof e == "object" && !!e && typeof e.get == "function";
|
|
3375
3410
|
}
|
|
3376
|
-
var
|
|
3377
|
-
function
|
|
3378
|
-
return
|
|
3411
|
+
var J = /\{(tenant_id|custom_domain_id|domain|host)\}/g;
|
|
3412
|
+
function vi(e) {
|
|
3413
|
+
return J.lastIndex = 0, J.test(e);
|
|
3379
3414
|
}
|
|
3380
|
-
var
|
|
3415
|
+
var yi = G({
|
|
3381
3416
|
type: "dispatch_namespace",
|
|
3382
|
-
optionsSchema:
|
|
3417
|
+
optionsSchema: gi,
|
|
3383
3418
|
build(e, t) {
|
|
3384
3419
|
let n = t.bindings[e.binding];
|
|
3385
|
-
if (!
|
|
3386
|
-
let r =
|
|
3420
|
+
if (!_i(n)) throw Error(`Dispatch namespace binding "${e.binding}" is not configured or does not expose .get()`);
|
|
3421
|
+
let r = vi(e.script_name), i = e.timeout_ms ?? hi, a = e.cpu_ms || e.subrequests ? { limits: {
|
|
3387
3422
|
...e.cpu_ms ? { cpuMs: e.cpu_ms } : {},
|
|
3388
3423
|
...e.subrequests ? { subrequests: e.subrequests } : {}
|
|
3389
3424
|
} } : void 0;
|
|
3390
3425
|
return async (t) => {
|
|
3391
3426
|
let o = e.script_name;
|
|
3392
3427
|
if (r) {
|
|
3393
|
-
let n =
|
|
3394
|
-
if (o = o.replace(
|
|
3428
|
+
let n = Er(t), r = Dr(t), i = Or(t), a = t.req.header("host") ?? t.req.header("x-forwarded-host") ?? "";
|
|
3429
|
+
if (o = o.replace(J, (e, t) => {
|
|
3395
3430
|
switch (t) {
|
|
3396
3431
|
case "tenant_id": return n ?? "";
|
|
3397
3432
|
case "custom_domain_id": return r ?? "";
|
|
@@ -3413,7 +3448,7 @@ var mi = G({
|
|
|
3413
3448
|
}
|
|
3414
3449
|
};
|
|
3415
3450
|
}
|
|
3416
|
-
}),
|
|
3451
|
+
}), bi = G({
|
|
3417
3452
|
type: "redirect",
|
|
3418
3453
|
optionsSchema: e.object({
|
|
3419
3454
|
upstream_url: e.string().refine((e) => {
|
|
@@ -3442,7 +3477,7 @@ var mi = G({
|
|
|
3442
3477
|
});
|
|
3443
3478
|
};
|
|
3444
3479
|
}
|
|
3445
|
-
}),
|
|
3480
|
+
}), xi = G({
|
|
3446
3481
|
type: "static",
|
|
3447
3482
|
optionsSchema: e.object({
|
|
3448
3483
|
status: e.number().int().default(200),
|
|
@@ -3462,15 +3497,15 @@ var mi = G({
|
|
|
3462
3497
|
});
|
|
3463
3498
|
//#endregion
|
|
3464
3499
|
//#region src/data-plane/handlers/index.ts
|
|
3465
|
-
function
|
|
3466
|
-
e.add(
|
|
3500
|
+
function Si(e) {
|
|
3501
|
+
e.add(Mr).add(Fr).add(Ir).add(Lr).add(qr).add(Zr).add(Qr).add(ui).add(mi).add(yi).add(bi).add(xi);
|
|
3467
3502
|
}
|
|
3468
3503
|
//#endregion
|
|
3469
3504
|
//#region src/data-plane/matcher.ts
|
|
3470
|
-
function
|
|
3505
|
+
function Ci(e) {
|
|
3471
3506
|
return [...e].sort((e, t) => e.priority === t.priority ? e.created_at.localeCompare(t.created_at) : e.priority - t.priority);
|
|
3472
3507
|
}
|
|
3473
|
-
function
|
|
3508
|
+
function wi(e, t) {
|
|
3474
3509
|
let n = e.toLowerCase(), r = t.toLowerCase();
|
|
3475
3510
|
if (n === r) return !0;
|
|
3476
3511
|
if (n.startsWith("*.")) {
|
|
@@ -3479,13 +3514,13 @@ function yi(e, t) {
|
|
|
3479
3514
|
}
|
|
3480
3515
|
return !1;
|
|
3481
3516
|
}
|
|
3482
|
-
function
|
|
3483
|
-
return !e || e.length === 0 ? !0 : e.some((e) =>
|
|
3517
|
+
function Ti(e, t) {
|
|
3518
|
+
return !e || e.length === 0 ? !0 : e.some((e) => wi(e, t));
|
|
3484
3519
|
}
|
|
3485
|
-
function
|
|
3520
|
+
function Ei(e) {
|
|
3486
3521
|
let t = (e.headers ? Object.entries(e.headers) : []).map(([e, t]) => [e.toLowerCase(), new RegExp(t)]), n = (e.query ? Object.entries(e.query) : []).map(([e, t]) => [e, new RegExp(t)]), r = e.hosts;
|
|
3487
3522
|
return async (e, i) => {
|
|
3488
|
-
if (r && !
|
|
3523
|
+
if (r && !Ti(r, e.req.header("host") ?? "")) return new Response("No matching route", { status: 404 });
|
|
3489
3524
|
for (let [n, r] of t) {
|
|
3490
3525
|
let t = e.req.header(n);
|
|
3491
3526
|
if (t === void 0 || !r.test(t)) return new Response("No matching route", { status: 404 });
|
|
@@ -3502,17 +3537,17 @@ function xi(e) {
|
|
|
3502
3537
|
}
|
|
3503
3538
|
//#endregion
|
|
3504
3539
|
//#region src/data-plane/compile.ts
|
|
3505
|
-
var
|
|
3506
|
-
function
|
|
3540
|
+
var Di = "forwarded_headers";
|
|
3541
|
+
function Oi(e) {
|
|
3507
3542
|
return e.some((e) => e.type === "forwarded_headers") ? [...e] : [{
|
|
3508
|
-
type:
|
|
3543
|
+
type: Di,
|
|
3509
3544
|
options: {}
|
|
3510
3545
|
}, ...e];
|
|
3511
3546
|
}
|
|
3512
|
-
function
|
|
3513
|
-
return e.has("forwarded_headers") ?
|
|
3547
|
+
function Y(e, t) {
|
|
3548
|
+
return e.has("forwarded_headers") ? Oi(t) : [...t];
|
|
3514
3549
|
}
|
|
3515
|
-
var
|
|
3550
|
+
var X = [
|
|
3516
3551
|
"GET",
|
|
3517
3552
|
"POST",
|
|
3518
3553
|
"PUT",
|
|
@@ -3524,34 +3559,34 @@ var wi = [
|
|
|
3524
3559
|
function Z(e, n, r, i) {
|
|
3525
3560
|
let a = new t();
|
|
3526
3561
|
r && a.use("*", async (e, t) => {
|
|
3527
|
-
|
|
3562
|
+
Tr(e, r), await t();
|
|
3528
3563
|
});
|
|
3529
|
-
let o =
|
|
3564
|
+
let o = Ci(e);
|
|
3530
3565
|
for (let e of o) {
|
|
3531
3566
|
let t = [];
|
|
3532
|
-
t.push(
|
|
3533
|
-
for (let r of
|
|
3534
|
-
let r = e.match.methods?.length ? e.match.methods.map((e) => e.toUpperCase()) :
|
|
3567
|
+
t.push(Ei(e.match));
|
|
3568
|
+
for (let r of Y(n, e.handlers)) t.push(n.build(r.type, r.options));
|
|
3569
|
+
let r = e.match.methods?.length ? e.match.methods.map((e) => e.toUpperCase()) : X, i = e.match.path || "/*";
|
|
3535
3570
|
a.on(r, [i], ...t);
|
|
3536
3571
|
}
|
|
3537
|
-
return i && i.length > 0 ? a.on(
|
|
3572
|
+
return i && i.length > 0 ? a.on(X, ["*"], ...i) : a.all("*", (e) => e.text("No matching route", 404)), a.onError((e, t) => {
|
|
3538
3573
|
let n = B(e);
|
|
3539
3574
|
return t.text(n ? "Upstream timeout" : "Bad gateway", n ? 504 : 502, { "x-authhero-proxy-error": n ? "handler_timeout" : "handler_failed" });
|
|
3540
3575
|
}), a;
|
|
3541
3576
|
}
|
|
3542
3577
|
//#endregion
|
|
3543
3578
|
//#region src/data-plane/router.ts
|
|
3544
|
-
var
|
|
3545
|
-
function
|
|
3579
|
+
var ki = 1e4;
|
|
3580
|
+
function Ai(e) {
|
|
3546
3581
|
return e.resolver ? e.resolver : e.cache ? W(e.data, e.cache) : W(e.data, e.cacheTtlMs ?? 3e4);
|
|
3547
3582
|
}
|
|
3548
|
-
function
|
|
3583
|
+
function ji(e) {
|
|
3549
3584
|
if (e.registry) return e.registry;
|
|
3550
|
-
let t = new
|
|
3551
|
-
return
|
|
3585
|
+
let t = new vr(e.bindings ?? {});
|
|
3586
|
+
return Si(t), t;
|
|
3552
3587
|
}
|
|
3553
3588
|
function Q(e) {
|
|
3554
|
-
let t =
|
|
3589
|
+
let t = Ai(e), n = ji(e), r = /* @__PURE__ */ new WeakMap(), i = e.resolveHostTimeoutMs ?? ki, a = e.defaultHandlers && e.defaultHandlers.length > 0 ? Y(n, e.defaultHandlers).map((e) => n.build(e.type, e.options)) : void 0, o = a ? Z([], n, void 0, a) : void 0;
|
|
3555
3590
|
return async (e) => {
|
|
3556
3591
|
let s = e.req.header("host") ?? e.req.header("x-forwarded-host");
|
|
3557
3592
|
if (!s) return e.text("Missing host", 400);
|
|
@@ -3569,13 +3604,13 @@ function Q(e) {
|
|
|
3569
3604
|
}
|
|
3570
3605
|
};
|
|
3571
3606
|
}
|
|
3572
|
-
function
|
|
3607
|
+
function Mi(e) {
|
|
3573
3608
|
let n = new t();
|
|
3574
3609
|
return n.all("*", Q(e)), n;
|
|
3575
3610
|
}
|
|
3576
3611
|
//#endregion
|
|
3577
3612
|
//#region src/app.ts
|
|
3578
|
-
function
|
|
3613
|
+
function Ni(e) {
|
|
3579
3614
|
let n = new t();
|
|
3580
3615
|
return n.all("*", Q({
|
|
3581
3616
|
data: e.data,
|
|
@@ -3593,17 +3628,17 @@ function ki(e) {
|
|
|
3593
3628
|
}
|
|
3594
3629
|
//#endregion
|
|
3595
3630
|
//#region src/data-plane/cache-api-cache.ts
|
|
3596
|
-
var
|
|
3597
|
-
function
|
|
3631
|
+
var Pi = 1e3, Fi = 1e3;
|
|
3632
|
+
function Ii(e, t) {
|
|
3598
3633
|
return new Request(`https://proxy-cache.internal/${encodeURIComponent(e)}/hosts/${encodeURIComponent(t.toLowerCase())}`, { method: "GET" });
|
|
3599
3634
|
}
|
|
3600
|
-
function
|
|
3635
|
+
function Li() {
|
|
3601
3636
|
return globalThis.caches?.default;
|
|
3602
3637
|
}
|
|
3603
|
-
function
|
|
3604
|
-
let t = e.cache ??
|
|
3638
|
+
function Ri(e) {
|
|
3639
|
+
let t = e.cache ?? Li();
|
|
3605
3640
|
if (!t) return e.upstream;
|
|
3606
|
-
let n = t, r = e.namespace ?? "authhero-proxy", i = e.cacheTtlSeconds ?? 60, a = e.negativeCacheTtlSeconds ?? 10, o = e.waitUntil, s = e.cacheReadTimeoutMs ??
|
|
3641
|
+
let n = t, r = e.namespace ?? "authhero-proxy", i = e.cacheTtlSeconds ?? 60, a = e.negativeCacheTtlSeconds ?? 10, o = e.waitUntil, s = e.cacheReadTimeoutMs ?? Pi, c = e.cacheWriteTimeoutMs ?? Fi;
|
|
3607
3642
|
async function l(e) {
|
|
3608
3643
|
try {
|
|
3609
3644
|
return await U(Promise.resolve(n.match(e)), s, "cache.match");
|
|
@@ -3612,7 +3647,7 @@ function Pi(e) {
|
|
|
3612
3647
|
}
|
|
3613
3648
|
}
|
|
3614
3649
|
return { async resolveHost(t, s) {
|
|
3615
|
-
let u =
|
|
3650
|
+
let u = Ii(r, t), d = await l(u);
|
|
3616
3651
|
if (d) try {
|
|
3617
3652
|
return (await d.json()).value;
|
|
3618
3653
|
} catch {}
|
|
@@ -3623,14 +3658,14 @@ function Pi(e) {
|
|
|
3623
3658
|
return o ? o(h) : await h, f;
|
|
3624
3659
|
} };
|
|
3625
3660
|
}
|
|
3626
|
-
function
|
|
3627
|
-
return
|
|
3661
|
+
function zi(e, t) {
|
|
3662
|
+
return Ii(e, t);
|
|
3628
3663
|
}
|
|
3629
3664
|
//#endregion
|
|
3630
3665
|
//#region src/data-plane/cache-adapter-cache.ts
|
|
3631
|
-
var
|
|
3632
|
-
function
|
|
3633
|
-
let { upstream: t, cache: n, freshTtlMs: r, staleTtlMs: i = 0, staleIfErrorTtlMs: a = 0, negativeTtlMs: o = r, keyPrefix: s = "authhero-proxy-host", waitUntil: c, cacheReadTimeoutMs: l =
|
|
3666
|
+
var Bi = 1e3, Vi = 1e3, Hi = 5e3;
|
|
3667
|
+
function Ui(e) {
|
|
3668
|
+
let { upstream: t, cache: n, freshTtlMs: r, staleTtlMs: i = 0, staleIfErrorTtlMs: a = 0, negativeTtlMs: o = r, keyPrefix: s = "authhero-proxy-host", waitUntil: c, cacheReadTimeoutMs: l = Bi, cacheWriteTimeoutMs: u = Vi, upstreamTimeoutMs: d = Hi } = e, f = d > 0 ? d : 1e4, p = /* @__PURE__ */ new Map();
|
|
3634
3669
|
function m(e) {
|
|
3635
3670
|
return `${s}:${e.toLowerCase()}`;
|
|
3636
3671
|
}
|
|
@@ -3687,7 +3722,7 @@ function zi(e) {
|
|
|
3687
3722
|
}
|
|
3688
3723
|
} };
|
|
3689
3724
|
}
|
|
3690
|
-
function
|
|
3725
|
+
function Wi(e, t) {
|
|
3691
3726
|
return `${e}:${t.toLowerCase()}`;
|
|
3692
3727
|
}
|
|
3693
3728
|
//#endregion
|
|
@@ -3695,7 +3730,7 @@ function Bi(e, t) {
|
|
|
3695
3730
|
function $() {
|
|
3696
3731
|
throw Error("Static proxy adapter is read-only; configure routes at init time");
|
|
3697
3732
|
}
|
|
3698
|
-
function
|
|
3733
|
+
function Gi(e, t, n, r, i, a) {
|
|
3699
3734
|
return {
|
|
3700
3735
|
id: e.id ?? `${n}:${t}`,
|
|
3701
3736
|
tenant_id: r,
|
|
@@ -3710,10 +3745,10 @@ function Vi(e, t, n, r, i, a) {
|
|
|
3710
3745
|
updated_at: e.updated_at ?? a
|
|
3711
3746
|
};
|
|
3712
3747
|
}
|
|
3713
|
-
function
|
|
3748
|
+
function Ki(e) {
|
|
3714
3749
|
let t = (/* @__PURE__ */ new Date()).toISOString(), n = e.defaultTenantId ?? "static", r = /* @__PURE__ */ new Map();
|
|
3715
3750
|
for (let [i, a] of Object.entries(e.hosts)) {
|
|
3716
|
-
let e = i.toLowerCase(), o = Array.isArray(a) ? { routes: a } : a, s = o.tenant_id ?? n, c = o.custom_domain_id ?? e, l = o.routes.map((n, r) =>
|
|
3751
|
+
let e = i.toLowerCase(), o = Array.isArray(a) ? { routes: a } : a, s = o.tenant_id ?? n, c = o.custom_domain_id ?? e, l = o.routes.map((n, r) => Gi(n, r, e, s, c, t)).sort((e, t) => e.priority - t.priority);
|
|
3717
3752
|
r.set(e, {
|
|
3718
3753
|
tenant_id: s,
|
|
3719
3754
|
custom_domain_id: c,
|
|
@@ -3757,7 +3792,7 @@ function Hi(e) {
|
|
|
3757
3792
|
}
|
|
3758
3793
|
};
|
|
3759
3794
|
}
|
|
3760
|
-
function
|
|
3795
|
+
function qi(e, t = {}) {
|
|
3761
3796
|
return {
|
|
3762
3797
|
priority: t.priority,
|
|
3763
3798
|
match: { path: t.path ?? "/*" },
|
|
@@ -3772,10 +3807,10 @@ function Ui(e, t = {}) {
|
|
|
3772
3807
|
}
|
|
3773
3808
|
//#endregion
|
|
3774
3809
|
//#region src/constants.ts
|
|
3775
|
-
var
|
|
3810
|
+
var Ji = "proxy:resolve_host";
|
|
3776
3811
|
//#endregion
|
|
3777
3812
|
//#region src/http-adapter/index.ts
|
|
3778
|
-
function
|
|
3813
|
+
function Yi() {
|
|
3779
3814
|
let e = () => {
|
|
3780
3815
|
throw Error("HTTP proxy adapter does not expose write access to proxy_routes; mutate via the control-plane management API");
|
|
3781
3816
|
};
|
|
@@ -3797,10 +3832,10 @@ function Gi() {
|
|
|
3797
3832
|
}
|
|
3798
3833
|
};
|
|
3799
3834
|
}
|
|
3800
|
-
function
|
|
3835
|
+
function Xi(e) {
|
|
3801
3836
|
let t = e.fetch ?? fetch, n = e.baseUrl.replace(/\/+$/, ""), r = e.resolveHostPath ?? "/api/v2/proxy/control-plane/hosts/", i = e.audience ?? `${n}/api/v2/`, a = e.scope ?? "proxy:resolve_host", o = e.tokenRefreshSkewSeconds ?? 60, s = e.timeoutMs ?? 2500;
|
|
3802
3837
|
function c(e, t) {
|
|
3803
|
-
let n = new AbortController(), r =
|
|
3838
|
+
let n = new AbortController(), r = hr([e, n.signal]) ?? n.signal, i, a = new Promise((e, t) => {
|
|
3804
3839
|
i = setTimeout(() => {
|
|
3805
3840
|
n.abort(), t(new z(s, "control plane"));
|
|
3806
3841
|
}, s);
|
|
@@ -3834,7 +3869,7 @@ function Ki(e) {
|
|
|
3834
3869
|
return l && l.expires_at > Date.now() ? l.value : u(e);
|
|
3835
3870
|
}
|
|
3836
3871
|
return {
|
|
3837
|
-
proxyRoutes:
|
|
3872
|
+
proxyRoutes: Yi(),
|
|
3838
3873
|
async resolveHost(e, i) {
|
|
3839
3874
|
let a = i?.signal, o = await d(a), s = `${n}${r}${encodeURIComponent(e.toLowerCase())}`;
|
|
3840
3875
|
return c(a, async (e) => {
|
|
@@ -3851,7 +3886,7 @@ function Ki(e) {
|
|
|
3851
3886
|
}
|
|
3852
3887
|
//#endregion
|
|
3853
3888
|
//#region src/http-adapter/service-binding-fetch.ts
|
|
3854
|
-
function
|
|
3889
|
+
function Zi(e) {
|
|
3855
3890
|
return (t, n) => {
|
|
3856
3891
|
let r = t instanceof Request && n === void 0 ? t : new Request(t, n);
|
|
3857
3892
|
return e.fetch(r);
|
|
@@ -3859,11 +3894,11 @@ function qi(e) {
|
|
|
3859
3894
|
}
|
|
3860
3895
|
//#endregion
|
|
3861
3896
|
//#region src/kv-adapter/index.ts
|
|
3862
|
-
var
|
|
3863
|
-
function
|
|
3897
|
+
var Qi = "authhero-proxy-host:";
|
|
3898
|
+
function $i(e, t) {
|
|
3864
3899
|
return `${e}${t.toLowerCase()}`;
|
|
3865
3900
|
}
|
|
3866
|
-
function
|
|
3901
|
+
function ea() {
|
|
3867
3902
|
let e = () => {
|
|
3868
3903
|
throw Error("KV proxy adapter does not expose write access to proxy_routes; mutate via the control-plane management API");
|
|
3869
3904
|
};
|
|
@@ -3885,15 +3920,15 @@ function Xi() {
|
|
|
3885
3920
|
}
|
|
3886
3921
|
};
|
|
3887
3922
|
}
|
|
3888
|
-
function
|
|
3889
|
-
let { kv: t, keyPrefix: n =
|
|
3923
|
+
function ta(e) {
|
|
3924
|
+
let { kv: t, keyPrefix: n = Qi, timeoutMs: r } = e;
|
|
3890
3925
|
return {
|
|
3891
|
-
proxyRoutes:
|
|
3926
|
+
proxyRoutes: ea(),
|
|
3892
3927
|
async resolveHost(e) {
|
|
3893
|
-
let i =
|
|
3928
|
+
let i = $i(n, e), a = t.get(i, "json");
|
|
3894
3929
|
return (r && r > 0 ? await U(a, r, "kv.get") : await a) ?? null;
|
|
3895
3930
|
}
|
|
3896
3931
|
};
|
|
3897
3932
|
}
|
|
3898
3933
|
//#endregion
|
|
3899
|
-
export {
|
|
3934
|
+
export { Qi as DEFAULT_KV_HOST_KEY_PREFIX, Di as FORWARDED_HEADERS_HANDLER_TYPE, vr as HandlerRegistry, Ji as PROXY_RESOLVE_HOST_SCOPE, Fr as basicAuthHandler, Wi as buildCacheAdapterKey, zi as buildCacheApiKey, $i as buildKvHostKey, Ei as buildMatchFilter, Lr as cacheHandler, Z as compileHostApp, Mr as corsHandler, Ui as createCacheAdapterHostCache, Ri as createCacheApiHostCache, Xi as createHttpProxyAdapter, W as createInMemoryHostCache, ta as createKvProxyAdapter, Ni as createProxyApp, Q as createProxyDataPlaneHandler, Mi as createProxyDataPlaneRouter, Zi as createServiceBindingFetch, Ki as createStaticProxyAdapter, G as defineHandler, yi as dispatchNamespaceHandler, qr as forwardedHeadersHandler, Mn as handlerConfigSchema, Ir as headersHandler, ui as httpHandler, qi as httpRoute, Kr as isCloudflareIp, jn as matchSchema, Ti as matchesAnyHost, wi as matchesHost, L as proxyRouteInsertSchema, Nn as proxyRouteSchema, Pn as proxyRouteUpdateSchema, bi as redirectHandler, Si as registerBuiltinHandlers, Zr as rewriteCookiesHandler, Qr as rewriteLocationHandler, mi as serviceBindingHandler, Ci as sortRoutes, xi as staticHandler, Oi as withForwardedHeaders, Y as withForwardedHeadersFor };
|