authhero 8.6.0 → 8.7.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.
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Sample screens for the full-page Universal Login preview.
3
+ *
4
+ * These mirror the shapes the screen registry produces at runtime, but with
5
+ * static placeholder content so the preview endpoint can render a full page
6
+ * without a real login session. They intentionally use inert `#` actions and
7
+ * links — the preview is for visual layout, not interaction.
8
+ */
9
+ export declare const PREVIEW_SCREEN_IDS: readonly ["login", "identifier", "password", "signup"];
10
+ export type PreviewScreenId = (typeof PREVIEW_SCREEN_IDS)[number];
11
+ interface PreviewComponent {
12
+ id: string;
13
+ type: string;
14
+ category: "FIELD" | "BLOCK" | "WIDGET";
15
+ visible: boolean;
16
+ label?: string;
17
+ config?: Record<string, unknown>;
18
+ required?: boolean;
19
+ sensitive?: boolean;
20
+ order: number;
21
+ }
22
+ interface PreviewScreen {
23
+ name: string;
24
+ action: string;
25
+ method: string;
26
+ title?: string;
27
+ description?: string;
28
+ components: PreviewComponent[];
29
+ links?: Array<{
30
+ id?: string;
31
+ text: string;
32
+ linkText?: string;
33
+ href: string;
34
+ }>;
35
+ }
36
+ /**
37
+ * Build a sample screen object for the given preview screen id. Falls back to
38
+ * the identifier/login screen for unknown ids.
39
+ */
40
+ export declare function buildPreviewScreen(screenId: string): PreviewScreen;
41
+ export {};
@@ -27,7 +27,7 @@ export declare const brandingRoutes: OpenAPIHono<{
27
27
  base_focus_color: string;
28
28
  base_hover_color: string;
29
29
  body_text: string;
30
- captcha_widget_theme: "dark" | "light" | "auto";
30
+ captcha_widget_theme: "auto" | "light" | "dark";
31
31
  error: string;
32
32
  header: string;
33
33
  icons: string;
@@ -78,7 +78,7 @@ export declare const brandingRoutes: OpenAPIHono<{
78
78
  background_color: string;
79
79
  background_image_url: string;
80
80
  page_layout: "center" | "left" | "right";
81
- logo_placement?: "none" | "widget" | "chip" | undefined;
81
+ logo_placement?: "widget" | "chip" | "none" | undefined;
82
82
  };
83
83
  widget: {
84
84
  header_text_alignment: "center" | "left" | "right";
@@ -117,7 +117,7 @@ export declare const brandingRoutes: OpenAPIHono<{
117
117
  base_focus_color: string;
118
118
  base_hover_color: string;
119
119
  body_text: string;
120
- captcha_widget_theme: "dark" | "light" | "auto";
120
+ captcha_widget_theme: "auto" | "light" | "dark";
121
121
  error: string;
122
122
  header: string;
123
123
  icons: string;
@@ -168,7 +168,7 @@ export declare const brandingRoutes: OpenAPIHono<{
168
168
  background_color: string;
169
169
  background_image_url: string;
170
170
  page_layout: "center" | "left" | "right";
171
- logo_placement?: "none" | "widget" | "chip" | undefined;
171
+ logo_placement?: "widget" | "chip" | "none" | undefined;
172
172
  };
173
173
  widget: {
174
174
  header_text_alignment: "center" | "left" | "right";
@@ -196,7 +196,7 @@ export declare const brandingRoutes: OpenAPIHono<{
196
196
  base_focus_color: string;
197
197
  base_hover_color: string;
198
198
  body_text: string;
199
- captcha_widget_theme: "dark" | "light" | "auto";
199
+ captcha_widget_theme: "auto" | "light" | "dark";
200
200
  error: string;
201
201
  header: string;
202
202
  icons: string;
@@ -247,7 +247,7 @@ export declare const brandingRoutes: OpenAPIHono<{
247
247
  background_color: string;
248
248
  background_image_url: string;
249
249
  page_layout: "center" | "left" | "right";
250
- logo_placement?: "none" | "widget" | "chip" | undefined;
250
+ logo_placement?: "widget" | "chip" | "none" | undefined;
251
251
  };
252
252
  widget: {
253
253
  header_text_alignment: "center" | "left" | "right";
@@ -286,7 +286,7 @@ export declare const brandingRoutes: OpenAPIHono<{
286
286
  font?: {
287
287
  url: string;
288
288
  } | undefined;
289
- dark_mode?: "dark" | "light" | "auto" | undefined;
289
+ dark_mode?: "auto" | "light" | "dark" | undefined;
290
290
  };
291
291
  outputFormat: "json";
292
292
  status: 200;
@@ -316,7 +316,7 @@ export declare const brandingRoutes: OpenAPIHono<{
316
316
  font?: {
317
317
  url: string;
318
318
  } | undefined;
319
- dark_mode?: "dark" | "light" | "auto" | undefined;
319
+ dark_mode?: "auto" | "light" | "dark" | undefined;
320
320
  };
321
321
  };
322
322
  output: {
@@ -335,7 +335,7 @@ export declare const brandingRoutes: OpenAPIHono<{
335
335
  font?: {
336
336
  url: string;
337
337
  } | undefined;
338
- dark_mode?: "dark" | "light" | "auto" | undefined;
338
+ dark_mode?: "auto" | "light" | "dark" | undefined;
339
339
  };
340
340
  outputFormat: "json";
341
341
  status: 200;
@@ -399,4 +399,118 @@ export declare const brandingRoutes: OpenAPIHono<{
399
399
  status: 204;
400
400
  };
401
401
  };
402
+ } & {
403
+ "/templates/universal-login/preview": {
404
+ $post: {
405
+ input: {
406
+ header: {
407
+ "tenant-id"?: string | undefined;
408
+ };
409
+ } & {
410
+ json: {
411
+ body?: string | undefined;
412
+ screen?: "login" | "identifier" | "password" | "signup" | undefined;
413
+ branding?: {
414
+ colors?: {
415
+ primary: string;
416
+ page_background?: string | {
417
+ type?: string | undefined;
418
+ start?: string | undefined;
419
+ end?: string | undefined;
420
+ angle_deg?: number | undefined;
421
+ } | undefined;
422
+ } | undefined;
423
+ logo_url?: string | undefined;
424
+ favicon_url?: string | undefined;
425
+ powered_by_logo_url?: string | undefined;
426
+ font?: {
427
+ url: string;
428
+ } | undefined;
429
+ dark_mode?: "auto" | "light" | "dark" | undefined;
430
+ } | undefined;
431
+ theme?: {
432
+ borders?: {
433
+ button_border_radius: number;
434
+ button_border_weight: number;
435
+ buttons_style: "pill" | "rounded" | "sharp";
436
+ input_border_radius: number;
437
+ input_border_weight: number;
438
+ inputs_style: "pill" | "rounded" | "sharp";
439
+ show_widget_shadow: boolean;
440
+ widget_border_weight: number;
441
+ widget_corner_radius: number;
442
+ } | undefined;
443
+ colors?: {
444
+ base_focus_color: string;
445
+ base_hover_color: string;
446
+ body_text: string;
447
+ captcha_widget_theme: "auto" | "light" | "dark";
448
+ error: string;
449
+ header: string;
450
+ icons: string;
451
+ input_background: string;
452
+ input_border: string;
453
+ input_filled_text: string;
454
+ input_labels_placeholders: string;
455
+ links_focused_components: string;
456
+ primary_button: string;
457
+ primary_button_label: string;
458
+ secondary_button_border: string;
459
+ secondary_button_label: string;
460
+ success: string;
461
+ widget_background: string;
462
+ widget_border: string;
463
+ } | undefined;
464
+ displayName?: string | undefined;
465
+ fonts?: {
466
+ body_text: {
467
+ bold: boolean;
468
+ size: number;
469
+ };
470
+ buttons_text: {
471
+ bold: boolean;
472
+ size: number;
473
+ };
474
+ font_url: string;
475
+ input_labels: {
476
+ bold: boolean;
477
+ size: number;
478
+ };
479
+ links: {
480
+ bold: boolean;
481
+ size: number;
482
+ };
483
+ links_style: "normal" | "underlined";
484
+ reference_text_size: number;
485
+ subtitle: {
486
+ bold: boolean;
487
+ size: number;
488
+ };
489
+ title: {
490
+ bold: boolean;
491
+ size: number;
492
+ };
493
+ } | undefined;
494
+ page_background?: {
495
+ background_color: string;
496
+ background_image_url: string;
497
+ page_layout: "center" | "left" | "right";
498
+ logo_placement?: "widget" | "chip" | "none" | undefined;
499
+ } | undefined;
500
+ widget?: {
501
+ header_text_alignment: "center" | "left" | "right";
502
+ logo_height: number;
503
+ logo_position: "none" | "center" | "left" | "right";
504
+ logo_url: string;
505
+ social_buttons_layout: "bottom" | "top";
506
+ } | undefined;
507
+ themeId?: string | undefined;
508
+ } | undefined;
509
+ };
510
+ };
511
+ output: Response;
512
+ outputFormat: "json";
513
+ status: import("hono/utils/http-status").StatusCode;
514
+ };
515
+ };
402
516
  }, "/">;