@authhero/cloudflare-adapter 2.30.1 → 2.31.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cloudflare-adapter.cjs +113 -50
- package/dist/cloudflare-adapter.d.ts +274 -1357
- package/dist/cloudflare-adapter.mjs +4311 -3430
- package/dist/tsconfig.types.tsbuildinfo +1 -0
- package/dist/types/analytics-engine-action-executions/actionExecutions.d.ts +8 -0
- package/dist/types/analytics-engine-action-executions/index.d.ts +29 -0
- package/dist/types/analytics-engine-action-executions/types.d.ts +29 -0
- package/dist/types/analytics-engine-logs/analytics.d.ts +3 -0
- package/dist/types/analytics-engine-logs/index.d.ts +53 -0
- package/dist/types/analytics-engine-logs/list.d.ts +10 -0
- package/dist/types/analytics-engine-logs/logs.d.ts +43 -0
- package/dist/types/analytics-engine-logs/query.d.ts +23 -0
- package/dist/types/analytics-engine-logs/stats.d.ts +6 -0
- package/dist/types/analytics-engine-logs/types.d.ts +39 -0
- package/dist/types/cache/index.d.ts +44 -0
- package/dist/types/code-executor/index.d.ts +106 -0
- package/dist/types/code-executor/worker-loader.d.ts +57 -0
- package/dist/types/code-executor/worker-template.d.ts +10 -0
- package/dist/types/customDomains/index.d.ts +3 -0
- package/dist/types/geo/index.d.ts +37 -0
- package/dist/types/index.d.ts +31 -0
- package/dist/types/r2-sql-logs/index.d.ts +60 -0
- package/dist/types/r2-sql-logs/list.d.ts +11 -0
- package/dist/types/r2-sql-logs/logs.d.ts +8 -0
- package/dist/types/r2-sql-logs/query.d.ts +13 -0
- package/dist/types/r2-sql-logs/stats.d.ts +8 -0
- package/dist/types/r2-sql-logs/types.d.ts +45 -0
- package/dist/types/rate-limit/index.d.ts +30 -0
- package/dist/types/types/CloudflareConfig.d.ts +47 -0
- package/dist/types/types/CustomDomain.d.ts +185 -0
- package/package.json +7 -7
|
@@ -1,1151 +1,59 @@
|
|
|
1
|
-
|
|
1
|
+
import { StatsAdapter, LogsDataAdapter, AnalyticsAdapter, ActionExecutionsAdapter, RateLimitScope, RateLimitAdapter, CustomDomainsAdapter, CodeExecutor, CodeExecutionResult, CacheAdapter, GeoAdapter } from '@authhero/adapter-interfaces';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
msg: string;
|
|
48
|
-
url?: string | undefined;
|
|
49
|
-
} | null;
|
|
50
|
-
started_at: string;
|
|
51
|
-
ended_at: string;
|
|
52
|
-
}>, "many">;
|
|
53
|
-
logs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
54
|
-
action_name: z.ZodString;
|
|
55
|
-
lines: z.ZodArray<z.ZodObject<{
|
|
56
|
-
level: z.ZodEnum<[
|
|
57
|
-
"log",
|
|
58
|
-
"info",
|
|
59
|
-
"warn",
|
|
60
|
-
"error",
|
|
61
|
-
"debug"
|
|
62
|
-
]>;
|
|
63
|
-
message: z.ZodString;
|
|
64
|
-
}, "strip", z.ZodTypeAny, {
|
|
65
|
-
message: string;
|
|
66
|
-
level: "error" | "log" | "info" | "warn" | "debug";
|
|
67
|
-
}, {
|
|
68
|
-
message: string;
|
|
69
|
-
level: "error" | "log" | "info" | "warn" | "debug";
|
|
70
|
-
}>, "many">;
|
|
71
|
-
}, "strip", z.ZodTypeAny, {
|
|
72
|
-
action_name: string;
|
|
73
|
-
lines: {
|
|
74
|
-
message: string;
|
|
75
|
-
level: "error" | "log" | "info" | "warn" | "debug";
|
|
76
|
-
}[];
|
|
77
|
-
}, {
|
|
78
|
-
action_name: string;
|
|
79
|
-
lines: {
|
|
80
|
-
message: string;
|
|
81
|
-
level: "error" | "log" | "info" | "warn" | "debug";
|
|
82
|
-
}[];
|
|
83
|
-
}>, "many">>;
|
|
84
|
-
created_at: z.ZodString;
|
|
85
|
-
updated_at: z.ZodString;
|
|
86
|
-
}, "strip", z.ZodTypeAny, {
|
|
87
|
-
created_at: string;
|
|
88
|
-
updated_at: string;
|
|
89
|
-
status: "unspecified" | "pending" | "final" | "partial" | "canceled" | "suspended";
|
|
90
|
-
id: string;
|
|
91
|
-
tenant_id: string;
|
|
92
|
-
trigger_id: string;
|
|
93
|
-
results: {
|
|
94
|
-
action_name: string;
|
|
95
|
-
error: {
|
|
96
|
-
id: string;
|
|
97
|
-
msg: string;
|
|
98
|
-
url?: string | undefined;
|
|
99
|
-
} | null;
|
|
100
|
-
started_at: string;
|
|
101
|
-
ended_at: string;
|
|
102
|
-
}[];
|
|
103
|
-
logs?: {
|
|
104
|
-
action_name: string;
|
|
105
|
-
lines: {
|
|
106
|
-
message: string;
|
|
107
|
-
level: "error" | "log" | "info" | "warn" | "debug";
|
|
108
|
-
}[];
|
|
109
|
-
}[] | undefined;
|
|
110
|
-
}, {
|
|
111
|
-
created_at: string;
|
|
112
|
-
updated_at: string;
|
|
113
|
-
status: "unspecified" | "pending" | "final" | "partial" | "canceled" | "suspended";
|
|
114
|
-
id: string;
|
|
115
|
-
tenant_id: string;
|
|
116
|
-
trigger_id: string;
|
|
117
|
-
results: {
|
|
118
|
-
action_name: string;
|
|
119
|
-
error: {
|
|
120
|
-
id: string;
|
|
121
|
-
msg: string;
|
|
122
|
-
url?: string | undefined;
|
|
123
|
-
} | null;
|
|
124
|
-
started_at: string;
|
|
125
|
-
ended_at: string;
|
|
126
|
-
}[];
|
|
127
|
-
logs?: {
|
|
128
|
-
action_name: string;
|
|
129
|
-
lines: {
|
|
130
|
-
message: string;
|
|
131
|
-
level: "error" | "log" | "info" | "warn" | "debug";
|
|
132
|
-
}[];
|
|
133
|
-
}[] | undefined;
|
|
134
|
-
}>;
|
|
135
|
-
export type ActionExecution = z.infer<typeof actionExecutionSchema>;
|
|
136
|
-
declare const actionExecutionInsertSchema: z.ZodObject<Omit<{
|
|
137
|
-
id: z.ZodString;
|
|
138
|
-
tenant_id: z.ZodString;
|
|
139
|
-
trigger_id: z.ZodString;
|
|
140
|
-
status: z.ZodEnum<[
|
|
141
|
-
"unspecified",
|
|
142
|
-
"pending",
|
|
143
|
-
"final",
|
|
144
|
-
"partial",
|
|
145
|
-
"canceled",
|
|
146
|
-
"suspended"
|
|
147
|
-
]>;
|
|
148
|
-
results: z.ZodArray<z.ZodObject<{
|
|
149
|
-
action_name: z.ZodString;
|
|
150
|
-
error: z.ZodNullable<z.ZodObject<{
|
|
151
|
-
id: z.ZodString;
|
|
152
|
-
msg: z.ZodString;
|
|
153
|
-
url: z.ZodOptional<z.ZodString>;
|
|
154
|
-
}, "strip", z.ZodTypeAny, {
|
|
155
|
-
id: string;
|
|
156
|
-
msg: string;
|
|
157
|
-
url?: string | undefined;
|
|
158
|
-
}, {
|
|
159
|
-
id: string;
|
|
160
|
-
msg: string;
|
|
161
|
-
url?: string | undefined;
|
|
162
|
-
}>>;
|
|
163
|
-
started_at: z.ZodString;
|
|
164
|
-
ended_at: z.ZodString;
|
|
165
|
-
}, "strip", z.ZodTypeAny, {
|
|
166
|
-
action_name: string;
|
|
167
|
-
error: {
|
|
168
|
-
id: string;
|
|
169
|
-
msg: string;
|
|
170
|
-
url?: string | undefined;
|
|
171
|
-
} | null;
|
|
172
|
-
started_at: string;
|
|
173
|
-
ended_at: string;
|
|
174
|
-
}, {
|
|
175
|
-
action_name: string;
|
|
176
|
-
error: {
|
|
177
|
-
id: string;
|
|
178
|
-
msg: string;
|
|
179
|
-
url?: string | undefined;
|
|
180
|
-
} | null;
|
|
181
|
-
started_at: string;
|
|
182
|
-
ended_at: string;
|
|
183
|
-
}>, "many">;
|
|
184
|
-
logs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
185
|
-
action_name: z.ZodString;
|
|
186
|
-
lines: z.ZodArray<z.ZodObject<{
|
|
187
|
-
level: z.ZodEnum<[
|
|
188
|
-
"log",
|
|
189
|
-
"info",
|
|
190
|
-
"warn",
|
|
191
|
-
"error",
|
|
192
|
-
"debug"
|
|
193
|
-
]>;
|
|
194
|
-
message: z.ZodString;
|
|
195
|
-
}, "strip", z.ZodTypeAny, {
|
|
196
|
-
message: string;
|
|
197
|
-
level: "error" | "log" | "info" | "warn" | "debug";
|
|
198
|
-
}, {
|
|
199
|
-
message: string;
|
|
200
|
-
level: "error" | "log" | "info" | "warn" | "debug";
|
|
201
|
-
}>, "many">;
|
|
202
|
-
}, "strip", z.ZodTypeAny, {
|
|
203
|
-
action_name: string;
|
|
204
|
-
lines: {
|
|
205
|
-
message: string;
|
|
206
|
-
level: "error" | "log" | "info" | "warn" | "debug";
|
|
207
|
-
}[];
|
|
208
|
-
}, {
|
|
209
|
-
action_name: string;
|
|
210
|
-
lines: {
|
|
211
|
-
message: string;
|
|
212
|
-
level: "error" | "log" | "info" | "warn" | "debug";
|
|
213
|
-
}[];
|
|
214
|
-
}>, "many">>;
|
|
215
|
-
created_at: z.ZodString;
|
|
216
|
-
updated_at: z.ZodString;
|
|
217
|
-
}, "created_at" | "updated_at" | "tenant_id">, "strip", z.ZodTypeAny, {
|
|
218
|
-
status: "unspecified" | "pending" | "final" | "partial" | "canceled" | "suspended";
|
|
219
|
-
id: string;
|
|
220
|
-
trigger_id: string;
|
|
221
|
-
results: {
|
|
222
|
-
action_name: string;
|
|
223
|
-
error: {
|
|
224
|
-
id: string;
|
|
225
|
-
msg: string;
|
|
226
|
-
url?: string | undefined;
|
|
227
|
-
} | null;
|
|
228
|
-
started_at: string;
|
|
229
|
-
ended_at: string;
|
|
230
|
-
}[];
|
|
231
|
-
logs?: {
|
|
232
|
-
action_name: string;
|
|
233
|
-
lines: {
|
|
234
|
-
message: string;
|
|
235
|
-
level: "error" | "log" | "info" | "warn" | "debug";
|
|
236
|
-
}[];
|
|
237
|
-
}[] | undefined;
|
|
238
|
-
}, {
|
|
239
|
-
status: "unspecified" | "pending" | "final" | "partial" | "canceled" | "suspended";
|
|
240
|
-
id: string;
|
|
241
|
-
trigger_id: string;
|
|
242
|
-
results: {
|
|
243
|
-
action_name: string;
|
|
244
|
-
error: {
|
|
245
|
-
id: string;
|
|
246
|
-
msg: string;
|
|
247
|
-
url?: string | undefined;
|
|
248
|
-
} | null;
|
|
249
|
-
started_at: string;
|
|
250
|
-
ended_at: string;
|
|
251
|
-
}[];
|
|
252
|
-
logs?: {
|
|
253
|
-
action_name: string;
|
|
254
|
-
lines: {
|
|
255
|
-
message: string;
|
|
256
|
-
level: "error" | "log" | "info" | "warn" | "debug";
|
|
257
|
-
}[];
|
|
258
|
-
}[] | undefined;
|
|
259
|
-
}>;
|
|
260
|
-
export type ActionExecutionInsert = z.infer<typeof actionExecutionInsertSchema>;
|
|
261
|
-
export interface Totals {
|
|
262
|
-
start: number;
|
|
263
|
-
limit: number;
|
|
264
|
-
length: number;
|
|
265
|
-
total?: number;
|
|
266
|
-
}
|
|
267
|
-
declare const customDomainInsertSchema: z.ZodObject<{
|
|
268
|
-
domain: z.ZodString;
|
|
269
|
-
custom_domain_id: z.ZodOptional<z.ZodString>;
|
|
270
|
-
type: z.ZodEnum<[
|
|
271
|
-
"auth0_managed_certs",
|
|
272
|
-
"self_managed_certs"
|
|
273
|
-
]>;
|
|
274
|
-
verification_method: z.ZodOptional<z.ZodEnum<[
|
|
275
|
-
"txt"
|
|
276
|
-
]>>;
|
|
277
|
-
tls_policy: z.ZodOptional<z.ZodEnum<[
|
|
278
|
-
"recommended"
|
|
279
|
-
]>>;
|
|
280
|
-
custom_client_ip_header: z.ZodOptional<z.ZodEnum<[
|
|
281
|
-
"true-client-ip",
|
|
282
|
-
"cf-connecting-ip",
|
|
283
|
-
"x-forwarded-for",
|
|
284
|
-
"x-azure-clientip",
|
|
285
|
-
"null"
|
|
286
|
-
]>>;
|
|
287
|
-
domain_metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
288
|
-
}, "strip", z.ZodTypeAny, {
|
|
289
|
-
type: "auth0_managed_certs" | "self_managed_certs";
|
|
290
|
-
domain: string;
|
|
291
|
-
verification_method?: "txt" | undefined;
|
|
292
|
-
custom_domain_id?: string | undefined;
|
|
293
|
-
tls_policy?: "recommended" | undefined;
|
|
294
|
-
custom_client_ip_header?: "null" | "true-client-ip" | "cf-connecting-ip" | "x-forwarded-for" | "x-azure-clientip" | undefined;
|
|
295
|
-
domain_metadata?: Record<string, string> | undefined;
|
|
296
|
-
}, {
|
|
297
|
-
type: "auth0_managed_certs" | "self_managed_certs";
|
|
298
|
-
domain: string;
|
|
299
|
-
verification_method?: "txt" | undefined;
|
|
300
|
-
custom_domain_id?: string | undefined;
|
|
301
|
-
tls_policy?: "recommended" | undefined;
|
|
302
|
-
custom_client_ip_header?: "null" | "true-client-ip" | "cf-connecting-ip" | "x-forwarded-for" | "x-azure-clientip" | undefined;
|
|
303
|
-
domain_metadata?: Record<string, string> | undefined;
|
|
304
|
-
}>;
|
|
305
|
-
export type CustomDomainInsert = z.infer<typeof customDomainInsertSchema>;
|
|
306
|
-
declare const customDomainSchema: z.ZodObject<{
|
|
307
|
-
custom_domain_id: z.ZodString;
|
|
308
|
-
primary: z.ZodBoolean;
|
|
309
|
-
status: z.ZodEnum<[
|
|
310
|
-
"disabled",
|
|
311
|
-
"pending",
|
|
312
|
-
"pending_verification",
|
|
313
|
-
"ready"
|
|
314
|
-
]>;
|
|
315
|
-
origin_domain_name: z.ZodOptional<z.ZodString>;
|
|
316
|
-
verification: z.ZodOptional<z.ZodObject<{
|
|
317
|
-
methods: z.ZodArray<z.ZodDiscriminatedUnion<"name", [
|
|
318
|
-
z.ZodObject<{
|
|
319
|
-
name: z.ZodLiteral<"txt">;
|
|
320
|
-
record: z.ZodString;
|
|
321
|
-
domain: z.ZodString;
|
|
322
|
-
}, "strip", z.ZodTypeAny, {
|
|
323
|
-
name: "txt";
|
|
324
|
-
domain: string;
|
|
325
|
-
record: string;
|
|
326
|
-
}, {
|
|
327
|
-
name: "txt";
|
|
328
|
-
domain: string;
|
|
329
|
-
record: string;
|
|
330
|
-
}>,
|
|
331
|
-
z.ZodObject<{
|
|
332
|
-
name: z.ZodLiteral<"http">;
|
|
333
|
-
http_body: z.ZodString;
|
|
334
|
-
http_url: z.ZodString;
|
|
335
|
-
}, "strip", z.ZodTypeAny, {
|
|
336
|
-
name: "http";
|
|
337
|
-
http_body: string;
|
|
338
|
-
http_url: string;
|
|
339
|
-
}, {
|
|
340
|
-
name: "http";
|
|
341
|
-
http_body: string;
|
|
342
|
-
http_url: string;
|
|
343
|
-
}>
|
|
344
|
-
]>, "many">;
|
|
345
|
-
}, "strip", z.ZodTypeAny, {
|
|
346
|
-
methods: ({
|
|
347
|
-
name: "txt";
|
|
348
|
-
domain: string;
|
|
349
|
-
record: string;
|
|
350
|
-
} | {
|
|
351
|
-
name: "http";
|
|
352
|
-
http_body: string;
|
|
353
|
-
http_url: string;
|
|
354
|
-
})[];
|
|
355
|
-
}, {
|
|
356
|
-
methods: ({
|
|
357
|
-
name: "txt";
|
|
358
|
-
domain: string;
|
|
359
|
-
record: string;
|
|
360
|
-
} | {
|
|
361
|
-
name: "http";
|
|
362
|
-
http_body: string;
|
|
363
|
-
http_url: string;
|
|
364
|
-
})[];
|
|
365
|
-
}>>;
|
|
366
|
-
tls_policy: z.ZodOptional<z.ZodString>;
|
|
367
|
-
domain: z.ZodString;
|
|
368
|
-
type: z.ZodEnum<[
|
|
369
|
-
"auth0_managed_certs",
|
|
370
|
-
"self_managed_certs"
|
|
371
|
-
]>;
|
|
372
|
-
verification_method: z.ZodOptional<z.ZodEnum<[
|
|
373
|
-
"txt"
|
|
374
|
-
]>>;
|
|
375
|
-
custom_client_ip_header: z.ZodOptional<z.ZodEnum<[
|
|
376
|
-
"true-client-ip",
|
|
377
|
-
"cf-connecting-ip",
|
|
378
|
-
"x-forwarded-for",
|
|
379
|
-
"x-azure-clientip",
|
|
380
|
-
"null"
|
|
381
|
-
]>>;
|
|
382
|
-
domain_metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
383
|
-
}, "strip", z.ZodTypeAny, {
|
|
384
|
-
type: "auth0_managed_certs" | "self_managed_certs";
|
|
385
|
-
status: "pending" | "disabled" | "pending_verification" | "ready";
|
|
386
|
-
primary: boolean;
|
|
387
|
-
domain: string;
|
|
388
|
-
custom_domain_id: string;
|
|
389
|
-
verification?: {
|
|
390
|
-
methods: ({
|
|
391
|
-
name: "txt";
|
|
392
|
-
domain: string;
|
|
393
|
-
record: string;
|
|
394
|
-
} | {
|
|
395
|
-
name: "http";
|
|
396
|
-
http_body: string;
|
|
397
|
-
http_url: string;
|
|
398
|
-
})[];
|
|
399
|
-
} | undefined;
|
|
400
|
-
verification_method?: "txt" | undefined;
|
|
401
|
-
tls_policy?: string | undefined;
|
|
402
|
-
custom_client_ip_header?: "null" | "true-client-ip" | "cf-connecting-ip" | "x-forwarded-for" | "x-azure-clientip" | undefined;
|
|
403
|
-
domain_metadata?: Record<string, string> | undefined;
|
|
404
|
-
origin_domain_name?: string | undefined;
|
|
405
|
-
}, {
|
|
406
|
-
type: "auth0_managed_certs" | "self_managed_certs";
|
|
407
|
-
status: "pending" | "disabled" | "pending_verification" | "ready";
|
|
408
|
-
primary: boolean;
|
|
409
|
-
domain: string;
|
|
410
|
-
custom_domain_id: string;
|
|
411
|
-
verification?: {
|
|
412
|
-
methods: ({
|
|
413
|
-
name: "txt";
|
|
414
|
-
domain: string;
|
|
415
|
-
record: string;
|
|
416
|
-
} | {
|
|
417
|
-
name: "http";
|
|
418
|
-
http_body: string;
|
|
419
|
-
http_url: string;
|
|
420
|
-
})[];
|
|
421
|
-
} | undefined;
|
|
422
|
-
verification_method?: "txt" | undefined;
|
|
423
|
-
tls_policy?: string | undefined;
|
|
424
|
-
custom_client_ip_header?: "null" | "true-client-ip" | "cf-connecting-ip" | "x-forwarded-for" | "x-azure-clientip" | undefined;
|
|
425
|
-
domain_metadata?: Record<string, string> | undefined;
|
|
426
|
-
origin_domain_name?: string | undefined;
|
|
427
|
-
}>;
|
|
428
|
-
export type CustomDomain = z.infer<typeof customDomainSchema>;
|
|
429
|
-
declare const customDomainWithTenantIdSchema: z.ZodObject<{
|
|
430
|
-
custom_domain_id: z.ZodString;
|
|
431
|
-
primary: z.ZodBoolean;
|
|
432
|
-
status: z.ZodEnum<[
|
|
433
|
-
"disabled",
|
|
434
|
-
"pending",
|
|
435
|
-
"pending_verification",
|
|
436
|
-
"ready"
|
|
437
|
-
]>;
|
|
438
|
-
origin_domain_name: z.ZodOptional<z.ZodString>;
|
|
439
|
-
verification: z.ZodOptional<z.ZodObject<{
|
|
440
|
-
methods: z.ZodArray<z.ZodDiscriminatedUnion<"name", [
|
|
441
|
-
z.ZodObject<{
|
|
442
|
-
name: z.ZodLiteral<"txt">;
|
|
443
|
-
record: z.ZodString;
|
|
444
|
-
domain: z.ZodString;
|
|
445
|
-
}, "strip", z.ZodTypeAny, {
|
|
446
|
-
name: "txt";
|
|
447
|
-
domain: string;
|
|
448
|
-
record: string;
|
|
449
|
-
}, {
|
|
450
|
-
name: "txt";
|
|
451
|
-
domain: string;
|
|
452
|
-
record: string;
|
|
453
|
-
}>,
|
|
454
|
-
z.ZodObject<{
|
|
455
|
-
name: z.ZodLiteral<"http">;
|
|
456
|
-
http_body: z.ZodString;
|
|
457
|
-
http_url: z.ZodString;
|
|
458
|
-
}, "strip", z.ZodTypeAny, {
|
|
459
|
-
name: "http";
|
|
460
|
-
http_body: string;
|
|
461
|
-
http_url: string;
|
|
462
|
-
}, {
|
|
463
|
-
name: "http";
|
|
464
|
-
http_body: string;
|
|
465
|
-
http_url: string;
|
|
466
|
-
}>
|
|
467
|
-
]>, "many">;
|
|
468
|
-
}, "strip", z.ZodTypeAny, {
|
|
469
|
-
methods: ({
|
|
470
|
-
name: "txt";
|
|
471
|
-
domain: string;
|
|
472
|
-
record: string;
|
|
473
|
-
} | {
|
|
474
|
-
name: "http";
|
|
475
|
-
http_body: string;
|
|
476
|
-
http_url: string;
|
|
477
|
-
})[];
|
|
478
|
-
}, {
|
|
479
|
-
methods: ({
|
|
480
|
-
name: "txt";
|
|
481
|
-
domain: string;
|
|
482
|
-
record: string;
|
|
483
|
-
} | {
|
|
484
|
-
name: "http";
|
|
485
|
-
http_body: string;
|
|
486
|
-
http_url: string;
|
|
487
|
-
})[];
|
|
488
|
-
}>>;
|
|
489
|
-
tls_policy: z.ZodOptional<z.ZodString>;
|
|
490
|
-
domain: z.ZodString;
|
|
491
|
-
type: z.ZodEnum<[
|
|
492
|
-
"auth0_managed_certs",
|
|
493
|
-
"self_managed_certs"
|
|
494
|
-
]>;
|
|
495
|
-
verification_method: z.ZodOptional<z.ZodEnum<[
|
|
496
|
-
"txt"
|
|
497
|
-
]>>;
|
|
498
|
-
custom_client_ip_header: z.ZodOptional<z.ZodEnum<[
|
|
499
|
-
"true-client-ip",
|
|
500
|
-
"cf-connecting-ip",
|
|
501
|
-
"x-forwarded-for",
|
|
502
|
-
"x-azure-clientip",
|
|
503
|
-
"null"
|
|
504
|
-
]>>;
|
|
505
|
-
domain_metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
506
|
-
} & {
|
|
507
|
-
tenant_id: z.ZodString;
|
|
508
|
-
}, "strip", z.ZodTypeAny, {
|
|
509
|
-
type: "auth0_managed_certs" | "self_managed_certs";
|
|
510
|
-
status: "pending" | "disabled" | "pending_verification" | "ready";
|
|
511
|
-
tenant_id: string;
|
|
512
|
-
primary: boolean;
|
|
513
|
-
domain: string;
|
|
514
|
-
custom_domain_id: string;
|
|
515
|
-
verification?: {
|
|
516
|
-
methods: ({
|
|
517
|
-
name: "txt";
|
|
518
|
-
domain: string;
|
|
519
|
-
record: string;
|
|
520
|
-
} | {
|
|
521
|
-
name: "http";
|
|
522
|
-
http_body: string;
|
|
523
|
-
http_url: string;
|
|
524
|
-
})[];
|
|
525
|
-
} | undefined;
|
|
526
|
-
verification_method?: "txt" | undefined;
|
|
527
|
-
tls_policy?: string | undefined;
|
|
528
|
-
custom_client_ip_header?: "null" | "true-client-ip" | "cf-connecting-ip" | "x-forwarded-for" | "x-azure-clientip" | undefined;
|
|
529
|
-
domain_metadata?: Record<string, string> | undefined;
|
|
530
|
-
origin_domain_name?: string | undefined;
|
|
531
|
-
}, {
|
|
532
|
-
type: "auth0_managed_certs" | "self_managed_certs";
|
|
533
|
-
status: "pending" | "disabled" | "pending_verification" | "ready";
|
|
534
|
-
tenant_id: string;
|
|
535
|
-
primary: boolean;
|
|
536
|
-
domain: string;
|
|
537
|
-
custom_domain_id: string;
|
|
538
|
-
verification?: {
|
|
539
|
-
methods: ({
|
|
540
|
-
name: "txt";
|
|
541
|
-
domain: string;
|
|
542
|
-
record: string;
|
|
543
|
-
} | {
|
|
544
|
-
name: "http";
|
|
545
|
-
http_body: string;
|
|
546
|
-
http_url: string;
|
|
547
|
-
})[];
|
|
548
|
-
} | undefined;
|
|
549
|
-
verification_method?: "txt" | undefined;
|
|
550
|
-
tls_policy?: string | undefined;
|
|
551
|
-
custom_client_ip_header?: "null" | "true-client-ip" | "cf-connecting-ip" | "x-forwarded-for" | "x-azure-clientip" | undefined;
|
|
552
|
-
domain_metadata?: Record<string, string> | undefined;
|
|
553
|
-
origin_domain_name?: string | undefined;
|
|
554
|
-
}>;
|
|
555
|
-
export type CustomDomainWithTenantId = z.infer<typeof customDomainWithTenantIdSchema>;
|
|
556
|
-
export interface ListParams {
|
|
557
|
-
page?: number;
|
|
558
|
-
per_page?: number;
|
|
559
|
-
include_totals?: boolean;
|
|
560
|
-
q?: string;
|
|
561
|
-
sort?: {
|
|
562
|
-
sort_by: string;
|
|
563
|
-
sort_order: "asc" | "desc";
|
|
564
|
-
};
|
|
565
|
-
from?: string;
|
|
566
|
-
take?: number;
|
|
567
|
-
from_date?: number;
|
|
568
|
-
to_date?: number;
|
|
569
|
-
}
|
|
570
|
-
declare const logInsertSchema: z.ZodObject<{
|
|
571
|
-
type: z.ZodEffects<z.ZodString, "acls_summary" | "actions_execution_failed" | "api_limit" | "api_limit_warning" | "appi" | "ciba_exchange_failed" | "ciba_exchange_succeeded" | "ciba_start_failed" | "ciba_start_succeeded" | "cls" | "cs" | "depnote" | "f" | "fc" | "fce" | "fco" | "fcoa" | "fcp" | "fcph" | "fcpn" | "fcpr" | "fcpro" | "fcu" | "fd" | "fdeac" | "fdeaz" | "fdecc" | "fdu" | "feacft" | "feccft" | "fecte" | "fede" | "federated_logout_failed" | "fens" | "feoobft" | "feotpft" | "fepft" | "fepotpft" | "fercft" | "ferrt" | "fertft" | "fh" | "fimp" | "fi" | "flo" | "flows_execution_completed" | "flows_execution_failed" | "fn" | "forms_submission_failed" | "forms_submission_succeeded" | "fp" | "fpar" | "fpurh" | "fs" | "fsa" | "fu" | "fui" | "fv" | "fvr" | "gd_auth_email_verification" | "gd_auth_fail_email_verification" | "gd_auth_failed" | "gd_auth_rejected" | "gd_auth_succeed" | "gd_enrollment_complete" | "gd_otp_rate_limit_exceed" | "gd_recovery_failed" | "gd_recovery_rate_limit_exceed" | "gd_recovery_succeed" | "gd_send_email" | "gd_send_email_verification" | "gd_send_email_verification_failure" | "gd_send_pn" | "gd_send_pn_failure" | "gd_send_sms" | "gd_send_sms_failure" | "gd_send_voice" | "gd_send_voice_failure" | "gd_start_auth" | "gd_start_enroll" | "gd_start_enroll_failed" | "gd_tenant_update" | "gd_unenroll" | "gd_update_device_account" | "gd_webauthn_challenge_failed" | "gd_webauthn_enrollment_failed" | "kms_key_management_failure" | "kms_key_management_success" | "kms_key_state_changed" | "limit_delegation" | "limit_mu" | "limit_sul" | "limit_wc" | "i" | "mfar" | "mgmt_api_read" | "my_account_authentication_method_failed" | "my_account_authentication_method_succeeded" | "oidc_backchannel_logout_failed" | "oidc_backchannel_logout_succeeded" | "organization_member_added" | "passkey_challenge_failed" | "passkey_challenge_started" | "pla" | "pwd_leak" | "reset_pwd_leak" | "resource_cleanup" | "rich_consents_access_error" | "s" | "sapi" | "fapi" | "sce" | "scoa" | "scp" | "scpn" | "scpr" | "scu" | "scv" | "sd" | "sdu" | "seacft" | "seccft" | "secte" | "sede" | "sens" | "seoobft" | "seotpft" | "sepotpft" | "sepft" | "sepkoobft" | "sepkotpft" | "sepkrcft" | "sercft" | "sertft" | "simp" | "si" | "signup_pwd_leak" | "slo" | "sh" | "spm" | "srrt" | "ss" | "ss_sso_failure" | "ss_sso_info" | "ss_sso_success" | "ssa" | "sscim" | "sui" | "sv" | "svr" | "too_many_records" | "ublkdu" | "universal_logout_failed" | "universal_logout_succeeded" | "w" | "wn" | "wum", string>;
|
|
572
|
-
date: z.ZodString;
|
|
573
|
-
description: z.ZodOptional<z.ZodString>;
|
|
574
|
-
ip: z.ZodOptional<z.ZodString>;
|
|
575
|
-
user_agent: z.ZodOptional<z.ZodString>;
|
|
576
|
-
details: z.ZodOptional<z.ZodAny>;
|
|
577
|
-
isMobile: z.ZodBoolean;
|
|
578
|
-
user_id: z.ZodOptional<z.ZodString>;
|
|
579
|
-
user_name: z.ZodOptional<z.ZodString>;
|
|
580
|
-
connection: z.ZodOptional<z.ZodString>;
|
|
581
|
-
connection_id: z.ZodOptional<z.ZodString>;
|
|
582
|
-
client_id: z.ZodOptional<z.ZodString>;
|
|
583
|
-
client_name: z.ZodOptional<z.ZodString>;
|
|
584
|
-
audience: z.ZodOptional<z.ZodString>;
|
|
585
|
-
scope: z.ZodOptional<z.ZodString>;
|
|
586
|
-
strategy: z.ZodOptional<z.ZodString>;
|
|
587
|
-
strategy_type: z.ZodOptional<z.ZodString>;
|
|
588
|
-
hostname: z.ZodOptional<z.ZodString>;
|
|
589
|
-
auth0_client: z.ZodOptional<z.ZodObject<{
|
|
590
|
-
name: z.ZodString;
|
|
591
|
-
version: z.ZodString;
|
|
592
|
-
env: z.ZodOptional<z.ZodObject<{
|
|
593
|
-
node: z.ZodOptional<z.ZodString>;
|
|
594
|
-
}, "strip", z.ZodTypeAny, {
|
|
595
|
-
node?: string | undefined;
|
|
596
|
-
}, {
|
|
597
|
-
node?: string | undefined;
|
|
598
|
-
}>>;
|
|
599
|
-
}, "strip", z.ZodTypeAny, {
|
|
600
|
-
version: string;
|
|
601
|
-
name: string;
|
|
602
|
-
env?: {
|
|
603
|
-
node?: string | undefined;
|
|
604
|
-
} | undefined;
|
|
605
|
-
}, {
|
|
606
|
-
version: string;
|
|
607
|
-
name: string;
|
|
608
|
-
env?: {
|
|
609
|
-
node?: string | undefined;
|
|
610
|
-
} | undefined;
|
|
611
|
-
}>>;
|
|
612
|
-
log_id: z.ZodOptional<z.ZodString>;
|
|
613
|
-
location_info: z.ZodOptional<z.ZodObject<{
|
|
614
|
-
country_code: z.ZodString;
|
|
615
|
-
city_name: z.ZodString;
|
|
616
|
-
latitude: z.ZodString;
|
|
617
|
-
longitude: z.ZodString;
|
|
618
|
-
time_zone: z.ZodString;
|
|
619
|
-
continent_code: z.ZodString;
|
|
620
|
-
}, "strip", z.ZodTypeAny, {
|
|
621
|
-
country_code: string;
|
|
622
|
-
city_name: string;
|
|
623
|
-
latitude: string;
|
|
624
|
-
longitude: string;
|
|
625
|
-
time_zone: string;
|
|
626
|
-
continent_code: string;
|
|
627
|
-
}, {
|
|
628
|
-
country_code: string;
|
|
629
|
-
city_name: string;
|
|
630
|
-
latitude: string;
|
|
631
|
-
longitude: string;
|
|
632
|
-
time_zone: string;
|
|
633
|
-
continent_code: string;
|
|
634
|
-
}>>;
|
|
635
|
-
}, "strip", z.ZodTypeAny, {
|
|
636
|
-
type: "acls_summary" | "actions_execution_failed" | "api_limit" | "api_limit_warning" | "appi" | "ciba_exchange_failed" | "ciba_exchange_succeeded" | "ciba_start_failed" | "ciba_start_succeeded" | "cls" | "cs" | "depnote" | "f" | "fc" | "fce" | "fco" | "fcoa" | "fcp" | "fcph" | "fcpn" | "fcpr" | "fcpro" | "fcu" | "fd" | "fdeac" | "fdeaz" | "fdecc" | "fdu" | "feacft" | "feccft" | "fecte" | "fede" | "federated_logout_failed" | "fens" | "feoobft" | "feotpft" | "fepft" | "fepotpft" | "fercft" | "ferrt" | "fertft" | "fh" | "fimp" | "fi" | "flo" | "flows_execution_completed" | "flows_execution_failed" | "fn" | "forms_submission_failed" | "forms_submission_succeeded" | "fp" | "fpar" | "fpurh" | "fs" | "fsa" | "fu" | "fui" | "fv" | "fvr" | "gd_auth_email_verification" | "gd_auth_fail_email_verification" | "gd_auth_failed" | "gd_auth_rejected" | "gd_auth_succeed" | "gd_enrollment_complete" | "gd_otp_rate_limit_exceed" | "gd_recovery_failed" | "gd_recovery_rate_limit_exceed" | "gd_recovery_succeed" | "gd_send_email" | "gd_send_email_verification" | "gd_send_email_verification_failure" | "gd_send_pn" | "gd_send_pn_failure" | "gd_send_sms" | "gd_send_sms_failure" | "gd_send_voice" | "gd_send_voice_failure" | "gd_start_auth" | "gd_start_enroll" | "gd_start_enroll_failed" | "gd_tenant_update" | "gd_unenroll" | "gd_update_device_account" | "gd_webauthn_challenge_failed" | "gd_webauthn_enrollment_failed" | "kms_key_management_failure" | "kms_key_management_success" | "kms_key_state_changed" | "limit_delegation" | "limit_mu" | "limit_sul" | "limit_wc" | "i" | "mfar" | "mgmt_api_read" | "my_account_authentication_method_failed" | "my_account_authentication_method_succeeded" | "oidc_backchannel_logout_failed" | "oidc_backchannel_logout_succeeded" | "organization_member_added" | "passkey_challenge_failed" | "passkey_challenge_started" | "pla" | "pwd_leak" | "reset_pwd_leak" | "resource_cleanup" | "rich_consents_access_error" | "s" | "sapi" | "fapi" | "sce" | "scoa" | "scp" | "scpn" | "scpr" | "scu" | "scv" | "sd" | "sdu" | "seacft" | "seccft" | "secte" | "sede" | "sens" | "seoobft" | "seotpft" | "sepotpft" | "sepft" | "sepkoobft" | "sepkotpft" | "sepkrcft" | "sercft" | "sertft" | "simp" | "si" | "signup_pwd_leak" | "slo" | "sh" | "spm" | "srrt" | "ss" | "ss_sso_failure" | "ss_sso_info" | "ss_sso_success" | "ssa" | "sscim" | "sui" | "sv" | "svr" | "too_many_records" | "ublkdu" | "universal_logout_failed" | "universal_logout_succeeded" | "w" | "wn" | "wum";
|
|
637
|
-
date: string;
|
|
638
|
-
isMobile: boolean;
|
|
639
|
-
description?: string | undefined;
|
|
640
|
-
client_id?: string | undefined;
|
|
641
|
-
ip?: string | undefined;
|
|
642
|
-
user_agent?: string | undefined;
|
|
643
|
-
connection?: string | undefined;
|
|
644
|
-
strategy?: string | undefined;
|
|
645
|
-
strategy_type?: string | undefined;
|
|
646
|
-
audience?: string | undefined;
|
|
647
|
-
scope?: string | undefined;
|
|
648
|
-
auth0_client?: {
|
|
649
|
-
version: string;
|
|
650
|
-
name: string;
|
|
651
|
-
env?: {
|
|
652
|
-
node?: string | undefined;
|
|
653
|
-
} | undefined;
|
|
654
|
-
} | undefined;
|
|
655
|
-
hostname?: string | undefined;
|
|
656
|
-
connection_id?: string | undefined;
|
|
657
|
-
user_id?: string | undefined;
|
|
658
|
-
details?: any;
|
|
659
|
-
user_name?: string | undefined;
|
|
660
|
-
client_name?: string | undefined;
|
|
661
|
-
log_id?: string | undefined;
|
|
662
|
-
location_info?: {
|
|
663
|
-
country_code: string;
|
|
664
|
-
city_name: string;
|
|
665
|
-
latitude: string;
|
|
666
|
-
longitude: string;
|
|
667
|
-
time_zone: string;
|
|
668
|
-
continent_code: string;
|
|
669
|
-
} | undefined;
|
|
670
|
-
}, {
|
|
671
|
-
type: string;
|
|
672
|
-
date: string;
|
|
673
|
-
isMobile: boolean;
|
|
674
|
-
description?: string | undefined;
|
|
675
|
-
client_id?: string | undefined;
|
|
676
|
-
ip?: string | undefined;
|
|
677
|
-
user_agent?: string | undefined;
|
|
678
|
-
connection?: string | undefined;
|
|
679
|
-
strategy?: string | undefined;
|
|
680
|
-
strategy_type?: string | undefined;
|
|
681
|
-
audience?: string | undefined;
|
|
682
|
-
scope?: string | undefined;
|
|
683
|
-
auth0_client?: {
|
|
684
|
-
version: string;
|
|
685
|
-
name: string;
|
|
686
|
-
env?: {
|
|
687
|
-
node?: string | undefined;
|
|
688
|
-
} | undefined;
|
|
689
|
-
} | undefined;
|
|
690
|
-
hostname?: string | undefined;
|
|
691
|
-
connection_id?: string | undefined;
|
|
692
|
-
user_id?: string | undefined;
|
|
693
|
-
details?: any;
|
|
694
|
-
user_name?: string | undefined;
|
|
695
|
-
client_name?: string | undefined;
|
|
696
|
-
log_id?: string | undefined;
|
|
697
|
-
location_info?: {
|
|
698
|
-
country_code: string;
|
|
699
|
-
city_name: string;
|
|
700
|
-
latitude: string;
|
|
701
|
-
longitude: string;
|
|
702
|
-
time_zone: string;
|
|
703
|
-
continent_code: string;
|
|
704
|
-
} | undefined;
|
|
705
|
-
}>;
|
|
706
|
-
export type LogInsert = z.infer<typeof logInsertSchema>;
|
|
707
|
-
declare const logSchema: z.ZodObject<{
|
|
708
|
-
log_id: z.ZodString;
|
|
709
|
-
type: z.ZodEffects<z.ZodString, "acls_summary" | "actions_execution_failed" | "api_limit" | "api_limit_warning" | "appi" | "ciba_exchange_failed" | "ciba_exchange_succeeded" | "ciba_start_failed" | "ciba_start_succeeded" | "cls" | "cs" | "depnote" | "f" | "fc" | "fce" | "fco" | "fcoa" | "fcp" | "fcph" | "fcpn" | "fcpr" | "fcpro" | "fcu" | "fd" | "fdeac" | "fdeaz" | "fdecc" | "fdu" | "feacft" | "feccft" | "fecte" | "fede" | "federated_logout_failed" | "fens" | "feoobft" | "feotpft" | "fepft" | "fepotpft" | "fercft" | "ferrt" | "fertft" | "fh" | "fimp" | "fi" | "flo" | "flows_execution_completed" | "flows_execution_failed" | "fn" | "forms_submission_failed" | "forms_submission_succeeded" | "fp" | "fpar" | "fpurh" | "fs" | "fsa" | "fu" | "fui" | "fv" | "fvr" | "gd_auth_email_verification" | "gd_auth_fail_email_verification" | "gd_auth_failed" | "gd_auth_rejected" | "gd_auth_succeed" | "gd_enrollment_complete" | "gd_otp_rate_limit_exceed" | "gd_recovery_failed" | "gd_recovery_rate_limit_exceed" | "gd_recovery_succeed" | "gd_send_email" | "gd_send_email_verification" | "gd_send_email_verification_failure" | "gd_send_pn" | "gd_send_pn_failure" | "gd_send_sms" | "gd_send_sms_failure" | "gd_send_voice" | "gd_send_voice_failure" | "gd_start_auth" | "gd_start_enroll" | "gd_start_enroll_failed" | "gd_tenant_update" | "gd_unenroll" | "gd_update_device_account" | "gd_webauthn_challenge_failed" | "gd_webauthn_enrollment_failed" | "kms_key_management_failure" | "kms_key_management_success" | "kms_key_state_changed" | "limit_delegation" | "limit_mu" | "limit_sul" | "limit_wc" | "i" | "mfar" | "mgmt_api_read" | "my_account_authentication_method_failed" | "my_account_authentication_method_succeeded" | "oidc_backchannel_logout_failed" | "oidc_backchannel_logout_succeeded" | "organization_member_added" | "passkey_challenge_failed" | "passkey_challenge_started" | "pla" | "pwd_leak" | "reset_pwd_leak" | "resource_cleanup" | "rich_consents_access_error" | "s" | "sapi" | "fapi" | "sce" | "scoa" | "scp" | "scpn" | "scpr" | "scu" | "scv" | "sd" | "sdu" | "seacft" | "seccft" | "secte" | "sede" | "sens" | "seoobft" | "seotpft" | "sepotpft" | "sepft" | "sepkoobft" | "sepkotpft" | "sepkrcft" | "sercft" | "sertft" | "simp" | "si" | "signup_pwd_leak" | "slo" | "sh" | "spm" | "srrt" | "ss" | "ss_sso_failure" | "ss_sso_info" | "ss_sso_success" | "ssa" | "sscim" | "sui" | "sv" | "svr" | "too_many_records" | "ublkdu" | "universal_logout_failed" | "universal_logout_succeeded" | "w" | "wn" | "wum", string>;
|
|
710
|
-
date: z.ZodString;
|
|
711
|
-
description: z.ZodOptional<z.ZodString>;
|
|
712
|
-
ip: z.ZodOptional<z.ZodString>;
|
|
713
|
-
user_agent: z.ZodOptional<z.ZodString>;
|
|
714
|
-
details: z.ZodOptional<z.ZodAny>;
|
|
715
|
-
isMobile: z.ZodBoolean;
|
|
716
|
-
user_id: z.ZodOptional<z.ZodString>;
|
|
717
|
-
user_name: z.ZodOptional<z.ZodString>;
|
|
718
|
-
connection: z.ZodOptional<z.ZodString>;
|
|
719
|
-
connection_id: z.ZodOptional<z.ZodString>;
|
|
720
|
-
client_id: z.ZodOptional<z.ZodString>;
|
|
721
|
-
client_name: z.ZodOptional<z.ZodString>;
|
|
722
|
-
audience: z.ZodOptional<z.ZodString>;
|
|
723
|
-
scope: z.ZodOptional<z.ZodString>;
|
|
724
|
-
strategy: z.ZodOptional<z.ZodString>;
|
|
725
|
-
strategy_type: z.ZodOptional<z.ZodString>;
|
|
726
|
-
hostname: z.ZodOptional<z.ZodString>;
|
|
727
|
-
auth0_client: z.ZodOptional<z.ZodObject<{
|
|
728
|
-
name: z.ZodString;
|
|
729
|
-
version: z.ZodString;
|
|
730
|
-
env: z.ZodOptional<z.ZodObject<{
|
|
731
|
-
node: z.ZodOptional<z.ZodString>;
|
|
732
|
-
}, "strip", z.ZodTypeAny, {
|
|
733
|
-
node?: string | undefined;
|
|
734
|
-
}, {
|
|
735
|
-
node?: string | undefined;
|
|
736
|
-
}>>;
|
|
737
|
-
}, "strip", z.ZodTypeAny, {
|
|
738
|
-
version: string;
|
|
739
|
-
name: string;
|
|
740
|
-
env?: {
|
|
741
|
-
node?: string | undefined;
|
|
742
|
-
} | undefined;
|
|
743
|
-
}, {
|
|
744
|
-
version: string;
|
|
745
|
-
name: string;
|
|
746
|
-
env?: {
|
|
747
|
-
node?: string | undefined;
|
|
748
|
-
} | undefined;
|
|
749
|
-
}>>;
|
|
750
|
-
location_info: z.ZodOptional<z.ZodObject<{
|
|
751
|
-
country_code: z.ZodString;
|
|
752
|
-
city_name: z.ZodString;
|
|
753
|
-
latitude: z.ZodString;
|
|
754
|
-
longitude: z.ZodString;
|
|
755
|
-
time_zone: z.ZodString;
|
|
756
|
-
continent_code: z.ZodString;
|
|
757
|
-
}, "strip", z.ZodTypeAny, {
|
|
758
|
-
country_code: string;
|
|
759
|
-
city_name: string;
|
|
760
|
-
latitude: string;
|
|
761
|
-
longitude: string;
|
|
762
|
-
time_zone: string;
|
|
763
|
-
continent_code: string;
|
|
764
|
-
}, {
|
|
765
|
-
country_code: string;
|
|
766
|
-
city_name: string;
|
|
767
|
-
latitude: string;
|
|
768
|
-
longitude: string;
|
|
769
|
-
time_zone: string;
|
|
770
|
-
continent_code: string;
|
|
771
|
-
}>>;
|
|
772
|
-
}, "strip", z.ZodTypeAny, {
|
|
773
|
-
type: "acls_summary" | "actions_execution_failed" | "api_limit" | "api_limit_warning" | "appi" | "ciba_exchange_failed" | "ciba_exchange_succeeded" | "ciba_start_failed" | "ciba_start_succeeded" | "cls" | "cs" | "depnote" | "f" | "fc" | "fce" | "fco" | "fcoa" | "fcp" | "fcph" | "fcpn" | "fcpr" | "fcpro" | "fcu" | "fd" | "fdeac" | "fdeaz" | "fdecc" | "fdu" | "feacft" | "feccft" | "fecte" | "fede" | "federated_logout_failed" | "fens" | "feoobft" | "feotpft" | "fepft" | "fepotpft" | "fercft" | "ferrt" | "fertft" | "fh" | "fimp" | "fi" | "flo" | "flows_execution_completed" | "flows_execution_failed" | "fn" | "forms_submission_failed" | "forms_submission_succeeded" | "fp" | "fpar" | "fpurh" | "fs" | "fsa" | "fu" | "fui" | "fv" | "fvr" | "gd_auth_email_verification" | "gd_auth_fail_email_verification" | "gd_auth_failed" | "gd_auth_rejected" | "gd_auth_succeed" | "gd_enrollment_complete" | "gd_otp_rate_limit_exceed" | "gd_recovery_failed" | "gd_recovery_rate_limit_exceed" | "gd_recovery_succeed" | "gd_send_email" | "gd_send_email_verification" | "gd_send_email_verification_failure" | "gd_send_pn" | "gd_send_pn_failure" | "gd_send_sms" | "gd_send_sms_failure" | "gd_send_voice" | "gd_send_voice_failure" | "gd_start_auth" | "gd_start_enroll" | "gd_start_enroll_failed" | "gd_tenant_update" | "gd_unenroll" | "gd_update_device_account" | "gd_webauthn_challenge_failed" | "gd_webauthn_enrollment_failed" | "kms_key_management_failure" | "kms_key_management_success" | "kms_key_state_changed" | "limit_delegation" | "limit_mu" | "limit_sul" | "limit_wc" | "i" | "mfar" | "mgmt_api_read" | "my_account_authentication_method_failed" | "my_account_authentication_method_succeeded" | "oidc_backchannel_logout_failed" | "oidc_backchannel_logout_succeeded" | "organization_member_added" | "passkey_challenge_failed" | "passkey_challenge_started" | "pla" | "pwd_leak" | "reset_pwd_leak" | "resource_cleanup" | "rich_consents_access_error" | "s" | "sapi" | "fapi" | "sce" | "scoa" | "scp" | "scpn" | "scpr" | "scu" | "scv" | "sd" | "sdu" | "seacft" | "seccft" | "secte" | "sede" | "sens" | "seoobft" | "seotpft" | "sepotpft" | "sepft" | "sepkoobft" | "sepkotpft" | "sepkrcft" | "sercft" | "sertft" | "simp" | "si" | "signup_pwd_leak" | "slo" | "sh" | "spm" | "srrt" | "ss" | "ss_sso_failure" | "ss_sso_info" | "ss_sso_success" | "ssa" | "sscim" | "sui" | "sv" | "svr" | "too_many_records" | "ublkdu" | "universal_logout_failed" | "universal_logout_succeeded" | "w" | "wn" | "wum";
|
|
774
|
-
date: string;
|
|
775
|
-
isMobile: boolean;
|
|
776
|
-
log_id: string;
|
|
777
|
-
description?: string | undefined;
|
|
778
|
-
client_id?: string | undefined;
|
|
779
|
-
ip?: string | undefined;
|
|
780
|
-
user_agent?: string | undefined;
|
|
781
|
-
connection?: string | undefined;
|
|
782
|
-
strategy?: string | undefined;
|
|
783
|
-
strategy_type?: string | undefined;
|
|
784
|
-
audience?: string | undefined;
|
|
785
|
-
scope?: string | undefined;
|
|
786
|
-
auth0_client?: {
|
|
787
|
-
version: string;
|
|
788
|
-
name: string;
|
|
789
|
-
env?: {
|
|
790
|
-
node?: string | undefined;
|
|
791
|
-
} | undefined;
|
|
792
|
-
} | undefined;
|
|
793
|
-
hostname?: string | undefined;
|
|
794
|
-
connection_id?: string | undefined;
|
|
795
|
-
user_id?: string | undefined;
|
|
796
|
-
details?: any;
|
|
797
|
-
user_name?: string | undefined;
|
|
798
|
-
client_name?: string | undefined;
|
|
799
|
-
location_info?: {
|
|
800
|
-
country_code: string;
|
|
801
|
-
city_name: string;
|
|
802
|
-
latitude: string;
|
|
803
|
-
longitude: string;
|
|
804
|
-
time_zone: string;
|
|
805
|
-
continent_code: string;
|
|
806
|
-
} | undefined;
|
|
807
|
-
}, {
|
|
808
|
-
type: string;
|
|
809
|
-
date: string;
|
|
810
|
-
isMobile: boolean;
|
|
811
|
-
log_id: string;
|
|
812
|
-
description?: string | undefined;
|
|
813
|
-
client_id?: string | undefined;
|
|
814
|
-
ip?: string | undefined;
|
|
815
|
-
user_agent?: string | undefined;
|
|
816
|
-
connection?: string | undefined;
|
|
817
|
-
strategy?: string | undefined;
|
|
818
|
-
strategy_type?: string | undefined;
|
|
819
|
-
audience?: string | undefined;
|
|
820
|
-
scope?: string | undefined;
|
|
821
|
-
auth0_client?: {
|
|
822
|
-
version: string;
|
|
823
|
-
name: string;
|
|
824
|
-
env?: {
|
|
825
|
-
node?: string | undefined;
|
|
826
|
-
} | undefined;
|
|
827
|
-
} | undefined;
|
|
828
|
-
hostname?: string | undefined;
|
|
829
|
-
connection_id?: string | undefined;
|
|
830
|
-
user_id?: string | undefined;
|
|
831
|
-
details?: any;
|
|
832
|
-
user_name?: string | undefined;
|
|
833
|
-
client_name?: string | undefined;
|
|
834
|
-
location_info?: {
|
|
835
|
-
country_code: string;
|
|
836
|
-
city_name: string;
|
|
837
|
-
latitude: string;
|
|
838
|
-
longitude: string;
|
|
839
|
-
time_zone: string;
|
|
840
|
-
continent_code: string;
|
|
841
|
-
} | undefined;
|
|
842
|
-
}>;
|
|
843
|
-
export type Log = z.infer<typeof logSchema>;
|
|
844
|
-
declare const dailyStatsSchema: z.ZodObject<{
|
|
845
|
-
date: z.ZodString;
|
|
846
|
-
logins: z.ZodNumber;
|
|
847
|
-
signups: z.ZodNumber;
|
|
848
|
-
leaked_passwords: z.ZodNumber;
|
|
849
|
-
updated_at: z.ZodString;
|
|
850
|
-
created_at: z.ZodString;
|
|
851
|
-
}, "strip", z.ZodTypeAny, {
|
|
852
|
-
created_at: string;
|
|
853
|
-
updated_at: string;
|
|
854
|
-
date: string;
|
|
855
|
-
logins: number;
|
|
856
|
-
signups: number;
|
|
857
|
-
leaked_passwords: number;
|
|
858
|
-
}, {
|
|
859
|
-
created_at: string;
|
|
860
|
-
updated_at: string;
|
|
861
|
-
date: string;
|
|
862
|
-
logins: number;
|
|
863
|
-
signups: number;
|
|
864
|
-
leaked_passwords: number;
|
|
865
|
-
}>;
|
|
866
|
-
export type DailyStats = z.infer<typeof dailyStatsSchema>;
|
|
867
|
-
declare const analyticsResourceSchema: z.ZodEnum<[
|
|
868
|
-
"active-users",
|
|
869
|
-
"logins",
|
|
870
|
-
"signups",
|
|
871
|
-
"refresh-tokens",
|
|
872
|
-
"sessions"
|
|
873
|
-
]>;
|
|
874
|
-
export type AnalyticsResource = z.infer<typeof analyticsResourceSchema>;
|
|
875
|
-
declare const analyticsIntervalSchema: z.ZodEnum<[
|
|
876
|
-
"hour",
|
|
877
|
-
"day",
|
|
878
|
-
"week",
|
|
879
|
-
"month"
|
|
880
|
-
]>;
|
|
881
|
-
export type AnalyticsInterval = z.infer<typeof analyticsIntervalSchema>;
|
|
882
|
-
declare const analyticsGroupBySchema: z.ZodEnum<[
|
|
883
|
-
"time",
|
|
884
|
-
"connection",
|
|
885
|
-
"client_id",
|
|
886
|
-
"user_type",
|
|
887
|
-
"event"
|
|
888
|
-
]>;
|
|
889
|
-
export type AnalyticsGroupBy = z.infer<typeof analyticsGroupBySchema>;
|
|
890
|
-
declare const analyticsUserTypeSchema: z.ZodEnum<[
|
|
891
|
-
"password",
|
|
892
|
-
"social",
|
|
893
|
-
"passwordless",
|
|
894
|
-
"enterprise"
|
|
895
|
-
]>;
|
|
896
|
-
export type AnalyticsUserType = z.infer<typeof analyticsUserTypeSchema>;
|
|
897
|
-
export interface AnalyticsFilters {
|
|
898
|
-
connection?: string[];
|
|
899
|
-
client_id?: string[];
|
|
900
|
-
user_type?: AnalyticsUserType[];
|
|
901
|
-
user_id?: string[];
|
|
902
|
-
}
|
|
903
|
-
export interface AnalyticsQueryParams {
|
|
904
|
-
/** Inclusive lower bound, ISO 8601 datetime in UTC */
|
|
905
|
-
from: string;
|
|
906
|
-
/** Exclusive upper bound, ISO 8601 datetime in UTC */
|
|
907
|
-
to: string;
|
|
908
|
-
interval: AnalyticsInterval;
|
|
909
|
-
/** IANA timezone for bucket boundaries */
|
|
910
|
-
tz: string;
|
|
911
|
-
filters: AnalyticsFilters;
|
|
912
|
-
group_by: AnalyticsGroupBy[];
|
|
913
|
-
limit: number;
|
|
914
|
-
offset: number;
|
|
915
|
-
/** Column name, prefix with `-` for descending */
|
|
916
|
-
order_by?: string;
|
|
917
|
-
}
|
|
918
|
-
export interface AnalyticsColumnMeta {
|
|
919
|
-
name: string;
|
|
920
|
-
/** ClickHouse-style type label (e.g. "Date", "String", "UInt64", "DateTime") */
|
|
921
|
-
type: string;
|
|
922
|
-
}
|
|
923
|
-
export interface AnalyticsQueryResponse {
|
|
924
|
-
meta: AnalyticsColumnMeta[];
|
|
925
|
-
data: Array<Record<string, unknown>>;
|
|
926
|
-
rows: number;
|
|
927
|
-
rows_before_limit_at_least?: number;
|
|
928
|
-
statistics?: {
|
|
929
|
-
elapsed: number;
|
|
930
|
-
rows_read?: number;
|
|
931
|
-
bytes_read?: number;
|
|
932
|
-
};
|
|
933
|
-
}
|
|
934
|
-
export interface ActionExecutionsAdapter {
|
|
935
|
-
create: (tenant_id: string, execution: ActionExecutionInsert) => Promise<ActionExecution>;
|
|
936
|
-
get: (tenant_id: string, execution_id: string) => Promise<ActionExecution | null>;
|
|
937
|
-
}
|
|
938
|
-
export interface CacheAdapter {
|
|
939
|
-
/**
|
|
940
|
-
* Get a value from the cache
|
|
941
|
-
* @param key The cache key
|
|
942
|
-
* @returns The cached value or null if not found or expired
|
|
943
|
-
*/
|
|
944
|
-
get<T = any>(key: string): Promise<T | null>;
|
|
945
|
-
/**
|
|
946
|
-
* Set a value in the cache
|
|
947
|
-
* @param key The cache key
|
|
948
|
-
* @param value The value to cache
|
|
949
|
-
* @param ttlSeconds Time to live in seconds (optional)
|
|
950
|
-
*/
|
|
951
|
-
set<T = any>(key: string, value: T, ttlSeconds?: number): Promise<void>;
|
|
952
|
-
/**
|
|
953
|
-
* Delete a value from the cache
|
|
954
|
-
* @param key The cache key
|
|
955
|
-
* @returns True if the key existed and was deleted, false otherwise
|
|
956
|
-
*/
|
|
957
|
-
delete(key: string): Promise<boolean>;
|
|
958
|
-
/**
|
|
959
|
-
* Delete all values from the cache that match a key prefix
|
|
960
|
-
* @param prefix The key prefix to match
|
|
961
|
-
* @returns The number of keys deleted
|
|
962
|
-
*/
|
|
963
|
-
deleteByPrefix(prefix: string): Promise<number>;
|
|
964
|
-
/**
|
|
965
|
-
* Clear all items from the cache
|
|
966
|
-
*/
|
|
967
|
-
clear(): Promise<void>;
|
|
968
|
-
}
|
|
969
|
-
export interface ListLogsResponse extends Totals {
|
|
970
|
-
logs: Log[];
|
|
971
|
-
}
|
|
972
|
-
export interface LogsDataAdapter {
|
|
973
|
-
create(tenantId: string, params: LogInsert): Promise<Log>;
|
|
974
|
-
list(tenantId: string, params?: ListParams): Promise<ListLogsResponse>;
|
|
975
|
-
get(tenantId: string, logId: string): Promise<Log | null>;
|
|
976
|
-
}
|
|
977
|
-
export interface CustomDomainsAdapter {
|
|
978
|
-
create: (tenant_id: string, custom_domain: CustomDomainInsert) => Promise<CustomDomain>;
|
|
979
|
-
get: (tenant_id: string, id: string) => Promise<CustomDomain | null>;
|
|
980
|
-
getByDomain: (domain: string) => Promise<CustomDomainWithTenantId | null>;
|
|
981
|
-
list: (tenant_id: string) => Promise<CustomDomain[]>;
|
|
982
|
-
remove: (tenant_id: string, id: string) => Promise<boolean>;
|
|
983
|
-
update: (tenant_id: string, id: string, custom_domain: Partial<CustomDomain>) => Promise<boolean>;
|
|
984
|
-
}
|
|
985
|
-
export interface GeoInfo {
|
|
986
|
-
country_code: string;
|
|
987
|
-
city_name: string;
|
|
988
|
-
latitude: string;
|
|
989
|
-
longitude: string;
|
|
990
|
-
time_zone: string;
|
|
991
|
-
continent_code: string;
|
|
992
|
-
}
|
|
993
|
-
export interface GeoAdapter {
|
|
994
|
-
/**
|
|
995
|
-
* Get geo information from request headers
|
|
996
|
-
* @param headers - Record of HTTP headers (lowercase keys)
|
|
997
|
-
* @returns Geo information or null if not available
|
|
998
|
-
*/
|
|
999
|
-
getGeoInfo(headers: Record<string, string>): Promise<GeoInfo | null>;
|
|
1000
|
-
}
|
|
1001
|
-
export interface StatsListParams {
|
|
1002
|
-
from?: string;
|
|
1003
|
-
to?: string;
|
|
1004
|
-
}
|
|
1005
|
-
export interface StatsAdapter {
|
|
1006
|
-
/**
|
|
1007
|
-
* Get daily statistics (logins, signups, etc.) for a date range
|
|
1008
|
-
*/
|
|
1009
|
-
getDaily(tenantId: string, params?: StatsListParams): Promise<DailyStats[]>;
|
|
1010
|
-
/**
|
|
1011
|
-
* Get the number of active users in the last 30 days
|
|
1012
|
-
*/
|
|
1013
|
-
getActiveUsers(tenantId: string): Promise<number>;
|
|
1014
|
-
}
|
|
1015
|
-
export interface AnalyticsAdapter {
|
|
1016
|
-
/**
|
|
1017
|
-
* Run an analytics query for a tenant. The adapter is responsible for
|
|
1018
|
-
* injecting the tenant_id predicate; the route handler never trusts a
|
|
1019
|
-
* tenant value from a client-controlled source.
|
|
1020
|
-
*/
|
|
1021
|
-
query(tenantId: string, resource: AnalyticsResource, params: AnalyticsQueryParams): Promise<AnalyticsQueryResponse>;
|
|
1022
|
-
}
|
|
1023
|
-
/**
|
|
1024
|
-
* Logical buckets that consumers can rate-limit against. Backends decide
|
|
1025
|
-
* how each scope is enforced (e.g. mapping to a separate Cloudflare Workers
|
|
1026
|
-
* Rate Limiter binding with its own deploy-time limit/period).
|
|
1027
|
-
*/
|
|
1028
|
-
export type RateLimitScope = "pre-login" | "pre-user-registration" | "brute-force";
|
|
1029
|
-
export interface RateLimitDecision {
|
|
1030
|
-
/** True if the request is allowed; false if the limit was exceeded. */
|
|
1031
|
-
allowed: boolean;
|
|
1032
|
-
/** Optional retry-after hint in seconds (omitted if the backend can't tell). */
|
|
1033
|
-
retryAfterSeconds?: number;
|
|
1034
|
-
}
|
|
1035
|
-
export interface RateLimitAdapter {
|
|
1036
|
-
/**
|
|
1037
|
-
* Consume one unit of quota for the given scope and key.
|
|
1038
|
-
*
|
|
1039
|
-
* The numeric threshold and window are backend-specific; the
|
|
1040
|
-
* Cloudflare Workers Rate Limiter binding bakes them in at deploy
|
|
1041
|
-
* time and cannot honor a per-tenant override. Callers that need
|
|
1042
|
-
* per-tenant `max_attempts` should layer their own counter on top.
|
|
1043
|
-
*
|
|
1044
|
-
* Returns `{ allowed: true }` if the scope is not configured, so
|
|
1045
|
-
* callers can opt in by configuring backends without changing call
|
|
1046
|
-
* sites.
|
|
1047
|
-
*/
|
|
1048
|
-
consume(scope: RateLimitScope, key: string): Promise<RateLimitDecision>;
|
|
1049
|
-
}
|
|
1050
|
-
export interface CodeExecutionLog {
|
|
1051
|
-
level: "log" | "info" | "warn" | "error" | "debug";
|
|
1052
|
-
message: string;
|
|
1053
|
-
}
|
|
1054
|
-
export interface CodeExecutionResult {
|
|
1055
|
-
success: boolean;
|
|
1056
|
-
error?: string;
|
|
1057
|
-
durationMs: number;
|
|
1058
|
-
apiCalls: Array<{
|
|
1059
|
-
method: string;
|
|
1060
|
-
args: unknown[];
|
|
1061
|
-
}>;
|
|
1062
|
-
/**
|
|
1063
|
-
* Console output captured from the user code during execution. Populated by
|
|
1064
|
-
* executors that shadow `console.*` inside the sandbox; absent on executors
|
|
1065
|
-
* that don't support capture.
|
|
1066
|
-
*/
|
|
1067
|
-
logs?: CodeExecutionLog[];
|
|
1068
|
-
}
|
|
1069
|
-
export interface CodeExecutor {
|
|
1070
|
-
execute(params: {
|
|
1071
|
-
code: string;
|
|
1072
|
-
hookCodeId?: string;
|
|
1073
|
-
triggerId: string;
|
|
1074
|
-
event: Record<string, unknown>;
|
|
1075
|
-
/** Wall-clock timeout for the entire execution (ms). */
|
|
1076
|
-
timeoutMs?: number;
|
|
1077
|
-
/**
|
|
1078
|
-
* CPU-time limit (ms) for runtimes that distinguish CPU time from
|
|
1079
|
-
* wall-clock time (e.g. Cloudflare Workers for Platforms).
|
|
1080
|
-
* Ignored by executors that do not support CPU-time limits.
|
|
1081
|
-
*/
|
|
1082
|
-
cpuLimitMs?: number;
|
|
1083
|
-
}): Promise<CodeExecutionResult>;
|
|
1084
|
-
/**
|
|
1085
|
-
* Deploy user code to the execution environment.
|
|
1086
|
-
* Called when hook code is created or updated.
|
|
1087
|
-
* Optional — LocalCodeExecutor does not need this.
|
|
1088
|
-
*/
|
|
1089
|
-
deploy?(hookCodeId: string, code: string): Promise<void>;
|
|
1090
|
-
/**
|
|
1091
|
-
* Remove user code from the execution environment.
|
|
1092
|
-
* Called when hook code is deleted.
|
|
1093
|
-
* Optional — LocalCodeExecutor does not need this.
|
|
1094
|
-
*/
|
|
1095
|
-
remove?(hookCodeId: string): Promise<void>;
|
|
1096
|
-
}
|
|
1097
|
-
export interface R2SQLLogsAdapterConfig {
|
|
1098
|
-
/**
|
|
1099
|
-
* Cloudflare Pipeline HTTP endpoint URL for ingesting logs
|
|
1100
|
-
* Example: "https://{stream-id}.ingest.cloudflare.com"
|
|
1101
|
-
* Optional if using pipelineBinding or baseAdapter
|
|
1102
|
-
*/
|
|
1103
|
-
pipelineEndpoint?: string;
|
|
1104
|
-
/**
|
|
1105
|
-
* Cloudflare Pipeline binding (for Workers)
|
|
1106
|
-
* Use this instead of pipelineEndpoint when running in a Worker
|
|
1107
|
-
* Pass the Pipeline object from env (e.g., env.AUTH_LOGS_STREAM)
|
|
1108
|
-
* The Pipeline has a send() method for ingesting data
|
|
1109
|
-
*/
|
|
1110
|
-
pipelineBinding?: {
|
|
1111
|
-
send: (data: any) => Promise<void>;
|
|
1112
|
-
};
|
|
1113
|
-
/**
|
|
1114
|
-
* Cloudflare account ID for R2 SQL API
|
|
1115
|
-
* Required for the official API endpoint
|
|
1116
|
-
* Can be passed via environment variable: CLOUDFLARE_ACCOUNT_ID
|
|
1117
|
-
*/
|
|
1118
|
-
accountId: string;
|
|
1119
|
-
/**
|
|
1120
|
-
* Cloudflare R2 SQL API token for querying logs
|
|
1121
|
-
* Can be passed via environment variable: R2_SQL_AUTH_TOKEN
|
|
1122
|
-
*/
|
|
1123
|
-
authToken: string;
|
|
1124
|
-
/**
|
|
1125
|
-
* R2 warehouse name (e.g., "default")
|
|
1126
|
-
* Can be passed via environment variable: R2_WAREHOUSE_NAME
|
|
1127
|
-
*/
|
|
1128
|
-
warehouseName: string;
|
|
1129
|
-
/**
|
|
1130
|
-
* Catalog database/namespace for logs (default: "default")
|
|
1131
|
-
*/
|
|
1132
|
-
namespace?: string;
|
|
1133
|
-
/**
|
|
1134
|
-
* Catalog table name for logs (default: "logs")
|
|
1135
|
-
*/
|
|
1136
|
-
tableName?: string;
|
|
1137
|
-
/**
|
|
1138
|
-
* HTTP timeout in milliseconds (default: 30000)
|
|
1139
|
-
*/
|
|
1140
|
-
timeout?: number;
|
|
3
|
+
interface R2SQLLogsAdapterConfig {
|
|
4
|
+
/**
|
|
5
|
+
* Cloudflare Pipeline HTTP endpoint URL for ingesting logs
|
|
6
|
+
* Example: "https://{stream-id}.ingest.cloudflare.com"
|
|
7
|
+
* Optional if using pipelineBinding or baseAdapter
|
|
8
|
+
*/
|
|
9
|
+
pipelineEndpoint?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Cloudflare Pipeline binding (for Workers)
|
|
12
|
+
* Use this instead of pipelineEndpoint when running in a Worker
|
|
13
|
+
* Pass the Pipeline object from env (e.g., env.AUTH_LOGS_STREAM)
|
|
14
|
+
* The Pipeline has a send() method for ingesting data
|
|
15
|
+
*/
|
|
16
|
+
pipelineBinding?: {
|
|
17
|
+
send: (data: any) => Promise<void>;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Cloudflare account ID for R2 SQL API
|
|
21
|
+
* Required for the official API endpoint
|
|
22
|
+
* Can be passed via environment variable: CLOUDFLARE_ACCOUNT_ID
|
|
23
|
+
*/
|
|
24
|
+
accountId: string;
|
|
25
|
+
/**
|
|
26
|
+
* Cloudflare R2 SQL API token for querying logs
|
|
27
|
+
* Can be passed via environment variable: R2_SQL_AUTH_TOKEN
|
|
28
|
+
*/
|
|
29
|
+
authToken: string;
|
|
30
|
+
/**
|
|
31
|
+
* R2 warehouse name (e.g., "default")
|
|
32
|
+
* Can be passed via environment variable: R2_WAREHOUSE_NAME
|
|
33
|
+
*/
|
|
34
|
+
warehouseName: string;
|
|
35
|
+
/**
|
|
36
|
+
* Catalog database/namespace for logs (default: "default")
|
|
37
|
+
*/
|
|
38
|
+
namespace?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Catalog table name for logs (default: "logs")
|
|
41
|
+
*/
|
|
42
|
+
tableName?: string;
|
|
43
|
+
/**
|
|
44
|
+
* HTTP timeout in milliseconds (default: 30000)
|
|
45
|
+
*/
|
|
46
|
+
timeout?: number;
|
|
1141
47
|
}
|
|
48
|
+
|
|
1142
49
|
/**
|
|
1143
50
|
* Create a stats adapter for R2 SQL that returns "not supported" errors
|
|
1144
51
|
*
|
|
1145
52
|
* R2 SQL logs does not currently support stats queries.
|
|
1146
53
|
* Use the Analytics Engine stats adapter or Kysely stats adapter instead.
|
|
1147
54
|
*/
|
|
1148
|
-
|
|
55
|
+
declare function createR2SQLStatsAdapter(): StatsAdapter;
|
|
56
|
+
|
|
1149
57
|
/**
|
|
1150
58
|
* Create an R2 SQL logs adapter
|
|
1151
59
|
*
|
|
@@ -1200,51 +108,55 @@ export declare function createR2SQLStatsAdapter(): StatsAdapter;
|
|
|
1200
108
|
* });
|
|
1201
109
|
* ```
|
|
1202
110
|
*/
|
|
1203
|
-
|
|
111
|
+
declare function createR2SQLLogsAdapter(config: R2SQLLogsAdapterConfig): LogsDataAdapter;
|
|
112
|
+
|
|
1204
113
|
/**
|
|
1205
114
|
* Analytics Engine dataset binding type
|
|
1206
115
|
* This is the binding object provided by Cloudflare Workers
|
|
1207
116
|
*/
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
}
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
117
|
+
interface AnalyticsEngineDataset {
|
|
118
|
+
writeDataPoint(data: {
|
|
119
|
+
blobs?: string[];
|
|
120
|
+
doubles?: number[];
|
|
121
|
+
indexes?: string[];
|
|
122
|
+
}): void;
|
|
123
|
+
}
|
|
124
|
+
interface AnalyticsEngineLogsAdapterConfig {
|
|
125
|
+
/**
|
|
126
|
+
* Cloudflare Analytics Engine dataset binding (for Workers)
|
|
127
|
+
* Pass the Analytics Engine dataset object from env (e.g., env.AUTH_LOGS)
|
|
128
|
+
*/
|
|
129
|
+
analyticsEngineBinding?: AnalyticsEngineDataset;
|
|
130
|
+
/**
|
|
131
|
+
* Cloudflare account ID for querying logs via SQL API
|
|
132
|
+
* Required for the SQL API endpoint
|
|
133
|
+
* Can be passed via environment variable: CLOUDFLARE_ACCOUNT_ID
|
|
134
|
+
*/
|
|
135
|
+
accountId: string;
|
|
136
|
+
/**
|
|
137
|
+
* Cloudflare API token for querying logs via SQL API
|
|
138
|
+
* Must have Analytics Engine SQL API permissions
|
|
139
|
+
* Can be passed via environment variable: ANALYTICS_ENGINE_API_TOKEN
|
|
140
|
+
*/
|
|
141
|
+
apiToken: string;
|
|
142
|
+
/**
|
|
143
|
+
* Analytics Engine dataset name (default: "authhero_logs")
|
|
144
|
+
* This should match the dataset name configured in wrangler.toml
|
|
145
|
+
*/
|
|
146
|
+
dataset?: string;
|
|
147
|
+
/**
|
|
148
|
+
* HTTP timeout in milliseconds for SQL API queries (default: 30000)
|
|
149
|
+
*/
|
|
150
|
+
timeout?: number;
|
|
1242
151
|
}
|
|
152
|
+
|
|
1243
153
|
/**
|
|
1244
154
|
* Create a stats adapter that queries Analytics Engine
|
|
1245
155
|
*/
|
|
1246
|
-
|
|
1247
|
-
|
|
156
|
+
declare function createAnalyticsEngineStatsAdapter(config: AnalyticsEngineLogsAdapterConfig): StatsAdapter;
|
|
157
|
+
|
|
158
|
+
declare function createAnalyticsEngineAnalyticsAdapter(config: AnalyticsEngineLogsAdapterConfig): AnalyticsAdapter;
|
|
159
|
+
|
|
1248
160
|
/**
|
|
1249
161
|
* Create an Analytics Engine logs adapter
|
|
1250
162
|
*
|
|
@@ -1292,35 +204,37 @@ export declare function createAnalyticsEngineAnalyticsAdapter(config: AnalyticsE
|
|
|
1292
204
|
* });
|
|
1293
205
|
* ```
|
|
1294
206
|
*/
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
207
|
+
declare function createAnalyticsEngineLogsAdapter(config: AnalyticsEngineLogsAdapterConfig): LogsDataAdapter;
|
|
208
|
+
|
|
209
|
+
interface AnalyticsEngineActionExecutionsAdapterConfig {
|
|
210
|
+
/**
|
|
211
|
+
* Cloudflare Analytics Engine dataset binding (for Workers).
|
|
212
|
+
* Pass the Analytics Engine dataset object from env (e.g.
|
|
213
|
+
* env.AUTH_ACTION_EXECUTIONS).
|
|
214
|
+
*/
|
|
215
|
+
analyticsEngineBinding?: AnalyticsEngineDataset;
|
|
216
|
+
/**
|
|
217
|
+
* Cloudflare account ID for querying via the SQL API.
|
|
218
|
+
* Can be passed via environment variable: CLOUDFLARE_ACCOUNT_ID.
|
|
219
|
+
*/
|
|
220
|
+
accountId: string;
|
|
221
|
+
/**
|
|
222
|
+
* Cloudflare API token for querying via the SQL API.
|
|
223
|
+
* Must have Analytics Engine SQL API permissions.
|
|
224
|
+
* Can be passed via environment variable: ANALYTICS_ENGINE_API_TOKEN.
|
|
225
|
+
*/
|
|
226
|
+
apiToken: string;
|
|
227
|
+
/**
|
|
228
|
+
* Analytics Engine dataset name (default: "authhero_action_executions").
|
|
229
|
+
* Should match the dataset name configured in wrangler.toml.
|
|
230
|
+
*/
|
|
231
|
+
dataset?: string;
|
|
232
|
+
/**
|
|
233
|
+
* HTTP timeout in milliseconds for SQL API queries (default: 30000).
|
|
234
|
+
*/
|
|
235
|
+
timeout?: number;
|
|
1323
236
|
}
|
|
237
|
+
|
|
1324
238
|
/**
|
|
1325
239
|
* Create an Analytics Engine action_executions adapter.
|
|
1326
240
|
*
|
|
@@ -1346,7 +260,8 @@ export interface AnalyticsEngineActionExecutionsAdapterConfig {
|
|
|
1346
260
|
* });
|
|
1347
261
|
* ```
|
|
1348
262
|
*/
|
|
1349
|
-
|
|
263
|
+
declare function createAnalyticsEngineActionExecutionsAdapter(config: AnalyticsEngineActionExecutionsAdapterConfig): ActionExecutionsAdapter;
|
|
264
|
+
|
|
1350
265
|
/**
|
|
1351
266
|
* Minimal shape of the Cloudflare Workers Rate Limiter binding. We declare
|
|
1352
267
|
* it locally rather than depending on `@cloudflare/workers-types` so the
|
|
@@ -1354,12 +269,12 @@ export declare function createAnalyticsEngineActionExecutionsAdapter(config: Ana
|
|
|
1354
269
|
*
|
|
1355
270
|
* Reference: https://developers.cloudflare.com/workers/runtime-apis/bindings/rate-limit/
|
|
1356
271
|
*/
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
272
|
+
interface CloudflareRateLimitBinding {
|
|
273
|
+
limit(options: {
|
|
274
|
+
key: string;
|
|
275
|
+
}): Promise<{
|
|
276
|
+
success: boolean;
|
|
277
|
+
}>;
|
|
1363
278
|
}
|
|
1364
279
|
/**
|
|
1365
280
|
* Map of scopes to Cloudflare Workers Rate Limiter bindings. Each binding's
|
|
@@ -1374,50 +289,52 @@ export interface CloudflareRateLimitBinding {
|
|
|
1374
289
|
* Any scope omitted from this map results in a permissive ("allowed: true")
|
|
1375
290
|
* decision so callers can configure backends incrementally.
|
|
1376
291
|
*/
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
292
|
+
type CloudflareRateLimitBindings = Partial<Record<RateLimitScope, CloudflareRateLimitBinding>>;
|
|
293
|
+
declare function createCloudflareRateLimitAdapter(bindings: CloudflareRateLimitBindings | undefined): RateLimitAdapter | undefined;
|
|
294
|
+
|
|
295
|
+
interface CloudflareConfig {
|
|
296
|
+
zoneId: string;
|
|
297
|
+
authKey: string;
|
|
298
|
+
authEmail: string;
|
|
299
|
+
enterprise?: boolean;
|
|
300
|
+
customDomainAdapter: CustomDomainsAdapter;
|
|
301
|
+
/**
|
|
302
|
+
* Cache name to use (optional, defaults to "default")
|
|
303
|
+
*/
|
|
304
|
+
cacheName?: string;
|
|
305
|
+
/**
|
|
306
|
+
* Default TTL in seconds for cache entries (optional)
|
|
307
|
+
*/
|
|
308
|
+
defaultTtlSeconds?: number;
|
|
309
|
+
/**
|
|
310
|
+
* Key prefix to namespace cache entries (optional)
|
|
311
|
+
*/
|
|
312
|
+
keyPrefix?: string;
|
|
313
|
+
/**
|
|
314
|
+
* R2 SQL logs adapter configuration (optional)
|
|
315
|
+
* Use this for high-volume log storage with R2 Pipelines and R2 SQL
|
|
316
|
+
*/
|
|
317
|
+
r2SqlLogs?: R2SQLLogsAdapterConfig;
|
|
318
|
+
/**
|
|
319
|
+
* Analytics Engine logs adapter configuration (optional)
|
|
320
|
+
* Use this for low-latency log writes with Cloudflare Analytics Engine
|
|
321
|
+
*/
|
|
322
|
+
analyticsEngineLogs?: AnalyticsEngineLogsAdapterConfig;
|
|
323
|
+
/**
|
|
324
|
+
* Analytics Engine action_executions adapter configuration (optional).
|
|
325
|
+
* Stores Auth0-shaped action execution records in a dedicated AE dataset
|
|
326
|
+
* so logs and the executions they reference can both live in AE.
|
|
327
|
+
*/
|
|
328
|
+
analyticsEngineActionExecutions?: AnalyticsEngineActionExecutionsAdapterConfig;
|
|
329
|
+
/**
|
|
330
|
+
* Cloudflare Workers Rate Limiter bindings, keyed by logical scope.
|
|
331
|
+
* Each binding's `limit` and `period` are baked in at deploy time; this
|
|
332
|
+
* adapter can't override them per tenant. Bindings are optional — any
|
|
333
|
+
* unconfigured scope is treated as permissive.
|
|
334
|
+
*/
|
|
335
|
+
rateLimitBindings?: CloudflareRateLimitBindings;
|
|
1420
336
|
}
|
|
337
|
+
|
|
1421
338
|
/**
|
|
1422
339
|
* Cloudflare Workers for Platforms dispatch namespace binding type.
|
|
1423
340
|
* This is the type of `env.DISPATCHER` when configured in wrangler.toml:
|
|
@@ -1428,40 +345,40 @@ export interface CloudflareConfig {
|
|
|
1428
345
|
* namespace = "authhero-hooks"
|
|
1429
346
|
* ```
|
|
1430
347
|
*/
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
}
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
348
|
+
interface DispatchNamespace {
|
|
349
|
+
get(name: string, options?: Record<string, unknown>, init?: {
|
|
350
|
+
limits?: {
|
|
351
|
+
cpuMs?: number;
|
|
352
|
+
subrequests?: number;
|
|
353
|
+
};
|
|
354
|
+
}): {
|
|
355
|
+
fetch(request: Request | string, init?: RequestInit): Promise<Response>;
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
interface DispatchNamespaceCodeExecutorConfig {
|
|
359
|
+
/** Cloudflare account ID */
|
|
360
|
+
accountId: string;
|
|
361
|
+
/** API token with Workers Scripts write permission */
|
|
362
|
+
apiToken: string;
|
|
363
|
+
/** Dispatch namespace name (e.g., "authhero-hooks") */
|
|
364
|
+
dispatchNamespace: string;
|
|
365
|
+
/**
|
|
366
|
+
* Dispatch namespace binding from the worker environment.
|
|
367
|
+
* When running inside a Cloudflare Worker, pass `env.DISPATCHER`.
|
|
368
|
+
* Enables low-latency same-origin invocation.
|
|
369
|
+
*/
|
|
370
|
+
dispatcher?: DispatchNamespace;
|
|
371
|
+
/**
|
|
372
|
+
* Fallback URL for invoking user workers when no dispatcher binding is available.
|
|
373
|
+
* The executor appends `/{scriptName}` to this URL.
|
|
374
|
+
* Only used when `dispatcher` is not provided.
|
|
375
|
+
*/
|
|
376
|
+
dispatchUrl?: string;
|
|
377
|
+
/**
|
|
378
|
+
* Cloudflare Workers compatibility date used when deploying scripts.
|
|
379
|
+
* Defaults to "2024-11-20" if not provided.
|
|
380
|
+
*/
|
|
381
|
+
compatibilityDate?: string;
|
|
1465
382
|
}
|
|
1466
383
|
/**
|
|
1467
384
|
* Code executor that uses Cloudflare Workers for Platforms dispatch namespaces.
|
|
@@ -1487,32 +404,32 @@ export interface DispatchNamespaceCodeExecutorConfig {
|
|
|
1487
404
|
* const { app } = init({ dataAdapter, codeExecutor });
|
|
1488
405
|
* ```
|
|
1489
406
|
*/
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
407
|
+
declare class DispatchNamespaceCodeExecutor implements CodeExecutor {
|
|
408
|
+
private config;
|
|
409
|
+
constructor(config: DispatchNamespaceCodeExecutorConfig);
|
|
410
|
+
execute(params: {
|
|
411
|
+
code: string;
|
|
412
|
+
hookCodeId?: string;
|
|
413
|
+
triggerId: string;
|
|
414
|
+
event: Record<string, unknown>;
|
|
415
|
+
/** Wall-clock timeout (ms). Used for HTTP-based fallback invocation. */
|
|
416
|
+
timeoutMs?: number;
|
|
417
|
+
/**
|
|
418
|
+
* CPU-time limit (ms) passed to the Cloudflare dispatcher binding.
|
|
419
|
+
* Unlike timeoutMs (wall-clock), this caps only actual CPU cycles;
|
|
420
|
+
* I/O wait does not count against it. Defaults to 5 000 ms.
|
|
421
|
+
*/
|
|
422
|
+
cpuLimitMs?: number;
|
|
423
|
+
}): Promise<CodeExecutionResult>;
|
|
424
|
+
/**
|
|
425
|
+
* Deploy user code as a worker to the dispatch namespace.
|
|
426
|
+
* Wraps the code in a worker template and uploads via Cloudflare API.
|
|
427
|
+
*/
|
|
428
|
+
deploy(hookCodeId: string, code: string): Promise<void>;
|
|
429
|
+
/**
|
|
430
|
+
* Remove a user worker from the dispatch namespace.
|
|
431
|
+
*/
|
|
432
|
+
remove(hookCodeId: string): Promise<void>;
|
|
1516
433
|
}
|
|
1517
434
|
/**
|
|
1518
435
|
* @deprecated Renamed to `DispatchNamespaceCodeExecutor` to disambiguate from
|
|
@@ -1520,9 +437,10 @@ export declare class DispatchNamespaceCodeExecutor implements CodeExecutor {
|
|
|
1520
437
|
* Loader binding instead of Workers for Platforms). This alias will be removed
|
|
1521
438
|
* in the next major.
|
|
1522
439
|
*/
|
|
1523
|
-
|
|
440
|
+
declare const CloudflareCodeExecutor: typeof DispatchNamespaceCodeExecutor;
|
|
1524
441
|
/** @deprecated Use `DispatchNamespaceCodeExecutorConfig`. */
|
|
1525
|
-
|
|
442
|
+
type CloudflareCodeExecutorConfig = DispatchNamespaceCodeExecutorConfig;
|
|
443
|
+
|
|
1526
444
|
/**
|
|
1527
445
|
* Generates a Cloudflare Worker script that wraps user-authored code.
|
|
1528
446
|
*
|
|
@@ -1532,30 +450,31 @@ export type CloudflareCodeExecutorConfig = DispatchNamespaceCodeExecutorConfig;
|
|
|
1532
450
|
* 3. Runs the user's exported function (e.g., exports.onExecutePostLogin)
|
|
1533
451
|
* 4. Returns { success, apiCalls, error, durationMs } as JSON
|
|
1534
452
|
*/
|
|
1535
|
-
|
|
453
|
+
declare function generateWorkerScript(userCode: string): string;
|
|
454
|
+
|
|
1536
455
|
/**
|
|
1537
456
|
* Worker Loader binding type (Cloudflare Dynamic Workers).
|
|
1538
457
|
* Configure in wrangler.toml:
|
|
1539
458
|
* [[worker_loaders]]
|
|
1540
459
|
* binding = "LOADER"
|
|
1541
460
|
*/
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
461
|
+
interface WorkerLoader {
|
|
462
|
+
load(code: WorkerCode): WorkerStub;
|
|
463
|
+
get(id: string, callback: () => Promise<WorkerCode>): WorkerStub;
|
|
1545
464
|
}
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
465
|
+
interface WorkerCode {
|
|
466
|
+
compatibilityDate: string;
|
|
467
|
+
mainModule: string;
|
|
468
|
+
modules: Record<string, string>;
|
|
1550
469
|
}
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
470
|
+
interface WorkerStub {
|
|
471
|
+
getEntrypoint(): {
|
|
472
|
+
fetch(request: Request): Promise<Response>;
|
|
473
|
+
};
|
|
1555
474
|
}
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
475
|
+
interface WorkerLoaderCodeExecutorOptions {
|
|
476
|
+
loader: WorkerLoader;
|
|
477
|
+
compatibilityDate?: string;
|
|
1559
478
|
}
|
|
1560
479
|
/**
|
|
1561
480
|
* Cloudflare Dynamic Workers code executor (Worker Loader binding).
|
|
@@ -1575,32 +494,30 @@ export interface WorkerLoaderCodeExecutorOptions {
|
|
|
1575
494
|
* Platforms dispatch namespaces and requires user code to be pre-deployed
|
|
1576
495
|
* as individual worker scripts via the Cloudflare API.
|
|
1577
496
|
*/
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
497
|
+
declare class WorkerLoaderCodeExecutor implements CodeExecutor {
|
|
498
|
+
private loader;
|
|
499
|
+
private compatibilityDate;
|
|
500
|
+
constructor(options: WorkerLoaderCodeExecutorOptions);
|
|
501
|
+
execute(params: {
|
|
502
|
+
code: string;
|
|
503
|
+
hookCodeId?: string;
|
|
504
|
+
triggerId: string;
|
|
505
|
+
event: Record<string, unknown>;
|
|
506
|
+
timeoutMs?: number;
|
|
507
|
+
cpuLimitMs?: number;
|
|
508
|
+
}): Promise<CodeExecutionResult>;
|
|
1590
509
|
}
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
510
|
+
|
|
511
|
+
interface CloudflareAdapters {
|
|
512
|
+
customDomains: CustomDomainsAdapter;
|
|
513
|
+
cache: CacheAdapter;
|
|
514
|
+
logs?: LogsDataAdapter;
|
|
515
|
+
analytics?: AnalyticsAdapter;
|
|
516
|
+
geo?: GeoAdapter;
|
|
517
|
+
rateLimit?: RateLimitAdapter;
|
|
518
|
+
actionExecutions?: ActionExecutionsAdapter;
|
|
1599
519
|
}
|
|
1600
520
|
declare function createAdapters(config: CloudflareConfig): CloudflareAdapters;
|
|
1601
521
|
|
|
1602
|
-
export {
|
|
1603
|
-
|
|
1604
|
-
};
|
|
1605
|
-
|
|
1606
|
-
export {};
|
|
522
|
+
export { CloudflareCodeExecutor, DispatchNamespaceCodeExecutor, WorkerLoaderCodeExecutor, createAnalyticsEngineActionExecutionsAdapter, createAnalyticsEngineAnalyticsAdapter, createAnalyticsEngineLogsAdapter, createAnalyticsEngineStatsAdapter, createCloudflareRateLimitAdapter, createR2SQLLogsAdapter, createR2SQLStatsAdapter, createAdapters as default, generateWorkerScript };
|
|
523
|
+
export type { AnalyticsEngineActionExecutionsAdapterConfig, AnalyticsEngineDataset, AnalyticsEngineLogsAdapterConfig, CloudflareAdapters, CloudflareCodeExecutorConfig, CloudflareConfig, CloudflareRateLimitBinding, CloudflareRateLimitBindings, DispatchNamespace, DispatchNamespaceCodeExecutorConfig, R2SQLLogsAdapterConfig };
|