@authhero/kysely-adapter 10.133.0 → 10.135.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -239,6 +239,164 @@ declare const actionSchema: z.ZodObject<{
239
239
  deployed_at?: string | undefined;
240
240
  }>;
241
241
  export type Action = z.infer<typeof actionSchema>;
242
+ declare const actionVersionInsertSchema: z.ZodObject<{
243
+ action_id: z.ZodString;
244
+ code: z.ZodString;
245
+ runtime: z.ZodOptional<z.ZodString>;
246
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodObject<{
247
+ name: z.ZodString;
248
+ version: z.ZodString;
249
+ }, "strip", z.ZodTypeAny, {
250
+ version: string;
251
+ name: string;
252
+ }, {
253
+ version: string;
254
+ name: string;
255
+ }>, "many">>;
256
+ secrets: z.ZodOptional<z.ZodArray<z.ZodObject<{
257
+ name: z.ZodString;
258
+ value: z.ZodOptional<z.ZodString>;
259
+ }, "strip", z.ZodTypeAny, {
260
+ name: string;
261
+ value?: string | undefined;
262
+ }, {
263
+ name: string;
264
+ value?: string | undefined;
265
+ }>, "many">>;
266
+ supported_triggers: z.ZodOptional<z.ZodArray<z.ZodObject<{
267
+ id: z.ZodString;
268
+ version: z.ZodOptional<z.ZodString>;
269
+ }, "strip", z.ZodTypeAny, {
270
+ id: string;
271
+ version?: string | undefined;
272
+ }, {
273
+ id: string;
274
+ version?: string | undefined;
275
+ }>, "many">>;
276
+ deployed: z.ZodDefault<z.ZodBoolean>;
277
+ }, "strip", z.ZodTypeAny, {
278
+ code: string;
279
+ action_id: string;
280
+ deployed: boolean;
281
+ supported_triggers?: {
282
+ id: string;
283
+ version?: string | undefined;
284
+ }[] | undefined;
285
+ runtime?: string | undefined;
286
+ dependencies?: {
287
+ version: string;
288
+ name: string;
289
+ }[] | undefined;
290
+ secrets?: {
291
+ name: string;
292
+ value?: string | undefined;
293
+ }[] | undefined;
294
+ }, {
295
+ code: string;
296
+ action_id: string;
297
+ supported_triggers?: {
298
+ id: string;
299
+ version?: string | undefined;
300
+ }[] | undefined;
301
+ runtime?: string | undefined;
302
+ dependencies?: {
303
+ version: string;
304
+ name: string;
305
+ }[] | undefined;
306
+ secrets?: {
307
+ name: string;
308
+ value?: string | undefined;
309
+ }[] | undefined;
310
+ deployed?: boolean | undefined;
311
+ }>;
312
+ export type ActionVersionInsert = z.infer<typeof actionVersionInsertSchema>;
313
+ declare const actionVersionSchema: z.ZodObject<{
314
+ action_id: z.ZodString;
315
+ code: z.ZodString;
316
+ runtime: z.ZodOptional<z.ZodString>;
317
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodObject<{
318
+ name: z.ZodString;
319
+ version: z.ZodString;
320
+ }, "strip", z.ZodTypeAny, {
321
+ version: string;
322
+ name: string;
323
+ }, {
324
+ version: string;
325
+ name: string;
326
+ }>, "many">>;
327
+ secrets: z.ZodOptional<z.ZodArray<z.ZodObject<{
328
+ name: z.ZodString;
329
+ value: z.ZodOptional<z.ZodString>;
330
+ }, "strip", z.ZodTypeAny, {
331
+ name: string;
332
+ value?: string | undefined;
333
+ }, {
334
+ name: string;
335
+ value?: string | undefined;
336
+ }>, "many">>;
337
+ supported_triggers: z.ZodOptional<z.ZodArray<z.ZodObject<{
338
+ id: z.ZodString;
339
+ version: z.ZodOptional<z.ZodString>;
340
+ }, "strip", z.ZodTypeAny, {
341
+ id: string;
342
+ version?: string | undefined;
343
+ }, {
344
+ id: string;
345
+ version?: string | undefined;
346
+ }>, "many">>;
347
+ deployed: z.ZodDefault<z.ZodBoolean>;
348
+ } & {
349
+ created_at: z.ZodString;
350
+ updated_at: z.ZodString;
351
+ id: z.ZodString;
352
+ tenant_id: z.ZodString;
353
+ number: z.ZodNumber;
354
+ }, "strip", z.ZodTypeAny, {
355
+ number: number;
356
+ created_at: string;
357
+ updated_at: string;
358
+ code: string;
359
+ id: string;
360
+ tenant_id: string;
361
+ action_id: string;
362
+ deployed: boolean;
363
+ supported_triggers?: {
364
+ id: string;
365
+ version?: string | undefined;
366
+ }[] | undefined;
367
+ runtime?: string | undefined;
368
+ dependencies?: {
369
+ version: string;
370
+ name: string;
371
+ }[] | undefined;
372
+ secrets?: {
373
+ name: string;
374
+ value?: string | undefined;
375
+ }[] | undefined;
376
+ }, {
377
+ number: number;
378
+ created_at: string;
379
+ updated_at: string;
380
+ code: string;
381
+ id: string;
382
+ tenant_id: string;
383
+ action_id: string;
384
+ supported_triggers?: {
385
+ id: string;
386
+ version?: string | undefined;
387
+ }[] | undefined;
388
+ runtime?: string | undefined;
389
+ dependencies?: {
390
+ version: string;
391
+ name: string;
392
+ }[] | undefined;
393
+ secrets?: {
394
+ name: string;
395
+ value?: string | undefined;
396
+ }[] | undefined;
397
+ deployed?: boolean | undefined;
398
+ }>;
399
+ export type ActionVersion = z.infer<typeof actionVersionSchema>;
242
400
  declare const auditEventInsertSchema: z.ZodObject<{
243
401
  tenant_id: z.ZodString;
244
402
  event_type: z.ZodString;
@@ -2465,7 +2623,10 @@ declare enum AuthorizationResponseType {
2465
2623
  TOKEN = "token",
2466
2624
  ID_TOKEN = "id_token",
2467
2625
  TOKEN_ID_TOKEN = "id_token token",
2468
- CODE = "code"
2626
+ CODE = "code",
2627
+ CODE_ID_TOKEN = "code id_token",
2628
+ CODE_TOKEN = "code token",
2629
+ CODE_ID_TOKEN_TOKEN = "code id_token token"
2469
2630
  }
2470
2631
  declare enum AuthorizationResponseMode {
2471
2632
  QUERY = "query",
@@ -2527,6 +2688,11 @@ declare const brandingSchema: z.ZodObject<{
2527
2688
  }, {
2528
2689
  url: string;
2529
2690
  }>>;
2691
+ dark_mode: z.ZodOptional<z.ZodEnum<[
2692
+ "dark",
2693
+ "light",
2694
+ "auto"
2695
+ ]>>;
2530
2696
  }, "strip", z.ZodTypeAny, {
2531
2697
  colors?: {
2532
2698
  primary: string;
@@ -2543,6 +2709,7 @@ declare const brandingSchema: z.ZodObject<{
2543
2709
  font?: {
2544
2710
  url: string;
2545
2711
  } | undefined;
2712
+ dark_mode?: "dark" | "light" | "auto" | undefined;
2546
2713
  }, {
2547
2714
  colors?: {
2548
2715
  primary: string;
@@ -2559,6 +2726,7 @@ declare const brandingSchema: z.ZodObject<{
2559
2726
  font?: {
2560
2727
  url: string;
2561
2728
  } | undefined;
2729
+ dark_mode?: "dark" | "light" | "auto" | undefined;
2562
2730
  }>;
2563
2731
  export type Branding = z.infer<typeof brandingSchema>;
2564
2732
  declare const codeTypeSchema: z.ZodEnum<[
@@ -18012,7 +18180,7 @@ declare const themeInsertSchema: z.ZodObject<{
18012
18180
  base_focus_color: string;
18013
18181
  base_hover_color: string;
18014
18182
  body_text: string;
18015
- captcha_widget_theme: "auto" | "dark" | "light";
18183
+ captcha_widget_theme: "dark" | "light" | "auto";
18016
18184
  header: string;
18017
18185
  icons: string;
18018
18186
  input_background: string;
@@ -18032,7 +18200,7 @@ declare const themeInsertSchema: z.ZodObject<{
18032
18200
  base_focus_color: string;
18033
18201
  base_hover_color: string;
18034
18202
  body_text: string;
18035
- captcha_widget_theme: "auto" | "dark" | "light";
18203
+ captcha_widget_theme: "dark" | "light" | "auto";
18036
18204
  header: string;
18037
18205
  icons: string;
18038
18206
  input_background: string;
@@ -18248,7 +18416,7 @@ declare const themeInsertSchema: z.ZodObject<{
18248
18416
  base_focus_color: string;
18249
18417
  base_hover_color: string;
18250
18418
  body_text: string;
18251
- captcha_widget_theme: "auto" | "dark" | "light";
18419
+ captcha_widget_theme: "dark" | "light" | "auto";
18252
18420
  header: string;
18253
18421
  icons: string;
18254
18422
  input_background: string;
@@ -18324,7 +18492,7 @@ declare const themeInsertSchema: z.ZodObject<{
18324
18492
  base_focus_color: string;
18325
18493
  base_hover_color: string;
18326
18494
  body_text: string;
18327
- captcha_widget_theme: "auto" | "dark" | "light";
18495
+ captcha_widget_theme: "dark" | "light" | "auto";
18328
18496
  header: string;
18329
18497
  icons: string;
18330
18498
  input_background: string;
@@ -18459,7 +18627,7 @@ declare const themeSchema: z.ZodObject<{
18459
18627
  base_focus_color: string;
18460
18628
  base_hover_color: string;
18461
18629
  body_text: string;
18462
- captcha_widget_theme: "auto" | "dark" | "light";
18630
+ captcha_widget_theme: "dark" | "light" | "auto";
18463
18631
  header: string;
18464
18632
  icons: string;
18465
18633
  input_background: string;
@@ -18479,7 +18647,7 @@ declare const themeSchema: z.ZodObject<{
18479
18647
  base_focus_color: string;
18480
18648
  base_hover_color: string;
18481
18649
  body_text: string;
18482
- captcha_widget_theme: "auto" | "dark" | "light";
18650
+ captcha_widget_theme: "dark" | "light" | "auto";
18483
18651
  header: string;
18484
18652
  icons: string;
18485
18653
  input_background: string;
@@ -18697,7 +18865,7 @@ declare const themeSchema: z.ZodObject<{
18697
18865
  base_focus_color: string;
18698
18866
  base_hover_color: string;
18699
18867
  body_text: string;
18700
- captcha_widget_theme: "auto" | "dark" | "light";
18868
+ captcha_widget_theme: "dark" | "light" | "auto";
18701
18869
  header: string;
18702
18870
  icons: string;
18703
18871
  input_background: string;
@@ -18774,7 +18942,7 @@ declare const themeSchema: z.ZodObject<{
18774
18942
  base_focus_color: string;
18775
18943
  base_hover_color: string;
18776
18944
  body_text: string;
18777
- captcha_widget_theme: "auto" | "dark" | "light";
18945
+ captcha_widget_theme: "dark" | "light" | "auto";
18778
18946
  header: string;
18779
18947
  icons: string;
18780
18948
  input_background: string;
@@ -20078,6 +20246,24 @@ export interface ActionsAdapter {
20078
20246
  remove: (tenant_id: string, action_id: string) => Promise<boolean>;
20079
20247
  list: (tenant_id: string, params?: ListParams) => Promise<ListActionsResponse>;
20080
20248
  }
20249
+ export interface ListActionVersionsResponse extends Totals {
20250
+ versions: ActionVersion[];
20251
+ }
20252
+ export interface ActionVersionsAdapter {
20253
+ /**
20254
+ * Append a new version row for an action. The adapter assigns the next
20255
+ * sequential `number` per action_id and clears the `deployed` flag on any
20256
+ * prior versions when the new one is created with `deployed: true`.
20257
+ */
20258
+ create: (tenant_id: string, version: ActionVersionInsert) => Promise<ActionVersion>;
20259
+ get: (tenant_id: string, action_id: string, version_id: string) => Promise<ActionVersion | null>;
20260
+ list: (tenant_id: string, action_id: string, params?: ListParams) => Promise<ListActionVersionsResponse>;
20261
+ /**
20262
+ * Remove every version row for an action — used when the parent action is
20263
+ * deleted. Returns the number of rows removed.
20264
+ */
20265
+ removeForAction: (tenant_id: string, action_id: string) => Promise<number>;
20266
+ }
20081
20267
  export interface ListFlowsResponse extends Totals {
20082
20268
  flows: Flow[];
20083
20269
  }
@@ -20661,6 +20847,7 @@ export interface SessionCleanupParams {
20661
20847
  }
20662
20848
  export interface DataAdapters {
20663
20849
  actions: ActionsAdapter;
20850
+ actionVersions: ActionVersionsAdapter;
20664
20851
  branding: BrandingAdapter;
20665
20852
  cache?: CacheAdapter;
20666
20853
  clients: ClientsAdapter;
@@ -21241,6 +21428,46 @@ declare const sqlActionSchema: z.ZodObject<{
21241
21428
  supported_triggers?: string | null | undefined;
21242
21429
  deployed_at_ts?: number | null | undefined;
21243
21430
  }>;
21431
+ declare const sqlActionVersionSchema: z.ZodObject<{
21432
+ id: z.ZodString;
21433
+ tenant_id: z.ZodString;
21434
+ action_id: z.ZodString;
21435
+ number: z.ZodNumber;
21436
+ code: z.ZodString;
21437
+ runtime: z.ZodNullable<z.ZodOptional<z.ZodString>>;
21438
+ secrets: z.ZodNullable<z.ZodOptional<z.ZodString>>;
21439
+ dependencies: z.ZodNullable<z.ZodOptional<z.ZodString>>;
21440
+ supported_triggers: z.ZodNullable<z.ZodOptional<z.ZodString>>;
21441
+ deployed: z.ZodNumber;
21442
+ created_at_ts: z.ZodNumber;
21443
+ updated_at_ts: z.ZodNumber;
21444
+ }, "strip", z.ZodTypeAny, {
21445
+ number: number;
21446
+ code: string;
21447
+ tenant_id: string;
21448
+ created_at_ts: number;
21449
+ updated_at_ts: number;
21450
+ id: string;
21451
+ action_id: string;
21452
+ deployed: number;
21453
+ runtime?: string | null | undefined;
21454
+ secrets?: string | null | undefined;
21455
+ dependencies?: string | null | undefined;
21456
+ supported_triggers?: string | null | undefined;
21457
+ }, {
21458
+ number: number;
21459
+ code: string;
21460
+ tenant_id: string;
21461
+ created_at_ts: number;
21462
+ updated_at_ts: number;
21463
+ id: string;
21464
+ action_id: string;
21465
+ deployed: number;
21466
+ runtime?: string | null | undefined;
21467
+ secrets?: string | null | undefined;
21468
+ dependencies?: string | null | undefined;
21469
+ supported_triggers?: string | null | undefined;
21470
+ }>;
21244
21471
  declare const sqlHookCodeSchema: z.ZodObject<{
21245
21472
  id: z.ZodString;
21246
21473
  tenant_id: z.ZodString;
@@ -23421,6 +23648,7 @@ declare const sqlAuthenticationMethodSchema: z.ZodObject<{
23421
23648
  }>;
23422
23649
  export interface Database {
23423
23650
  actions: z.infer<typeof sqlActionSchema>;
23651
+ action_versions: z.infer<typeof sqlActionVersionSchema>;
23424
23652
  flows: z.infer<typeof sqlFlowSchema>;
23425
23653
  branding: z.infer<typeof sqlBrandingSchema>;
23426
23654
  clients: z.infer<typeof sqlClientSchema>;