@logto/schemas 1.31.0 → 1.32.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.
Files changed (34) hide show
  1. package/alterations/1.32.0-1756370721-align-app-and-org-sign-in-exp-configs.ts +28 -0
  2. package/alterations/1.32.0-1756954492-add-default-to-forgot-password-methods.ts +35 -0
  3. package/alterations/1.32.0-1759041888-add-tenant-date-index-to-daily-active-users-table.ts +18 -0
  4. package/alterations-js/1.32.0-1756370721-align-app-and-org-sign-in-exp-configs.js +24 -0
  5. package/alterations-js/1.32.0-1756954492-add-default-to-forgot-password-methods.js +29 -0
  6. package/alterations-js/1.32.0-1759041888-add-tenant-date-index-to-daily-active-users-table.js +15 -0
  7. package/lib/consts/oidc.d.ts +11 -0
  8. package/lib/consts/oidc.js +8 -0
  9. package/lib/db-entries/application-sign-in-experience.d.ts +3 -1
  10. package/lib/db-entries/application-sign-in-experience.js +4 -0
  11. package/lib/db-entries/organization.d.ts +10 -2
  12. package/lib/db-entries/organization.js +9 -1
  13. package/lib/foundations/jsonb-types/users.d.ts +9 -0
  14. package/lib/foundations/jsonb-types/users.js +1 -0
  15. package/lib/types/application.d.ts +3 -0
  16. package/lib/types/consent.d.ts +25 -0
  17. package/lib/types/cookie.d.ts +4 -0
  18. package/lib/types/cookie.js +1 -1
  19. package/lib/types/custom-profile-fields.d.ts +2 -0
  20. package/lib/types/interactions.d.ts +6 -0
  21. package/lib/types/interactions.js +1 -0
  22. package/lib/types/logto-config/index.d.ts +64 -40
  23. package/lib/types/logto-config/jwt-customizer.d.ts +134 -70
  24. package/lib/types/mfa.d.ts +2 -2
  25. package/lib/types/sign-in-experience.d.ts +2 -2
  26. package/lib/types/ssr.d.ts +1 -0
  27. package/lib/types/user.d.ts +6 -0
  28. package/lib/types/verification-records/web-authn-verification.d.ts +16 -2
  29. package/lib/types/verification-records/web-authn-verification.js +2 -0
  30. package/package.json +6 -6
  31. package/tables/application_sign_in_experiences.sql +1 -0
  32. package/tables/daily_active_users.sql +3 -0
  33. package/tables/organizations.sql +4 -0
  34. package/tables/sign_in_experiences.sql +1 -1
@@ -0,0 +1,28 @@
1
+ import { sql } from '@silverhand/slonik';
2
+
3
+ import type { AlterationScript } from '../lib/types/alteration.js';
4
+
5
+ const alteration: AlterationScript = {
6
+ up: async (pool) => {
7
+ await pool.query(sql`
8
+ alter table organizations
9
+ add column color jsonb not null default '{}'::jsonb,
10
+ add column custom_css text;
11
+ `);
12
+ await pool.query(sql`
13
+ alter table application_sign_in_experiences add column custom_css text;
14
+ `);
15
+ },
16
+ down: async (pool) => {
17
+ await pool.query(sql`
18
+ alter table organizations
19
+ drop column color,
20
+ drop column custom_css;
21
+ `);
22
+ await pool.query(sql`
23
+ alter table application_sign_in_experiences drop column custom_css;
24
+ `);
25
+ },
26
+ };
27
+
28
+ export default alteration;
@@ -0,0 +1,35 @@
1
+ import { sql } from '@silverhand/slonik';
2
+
3
+ import type { AlterationScript } from '../lib/types/alteration.js';
4
+
5
+ const alteration: AlterationScript = {
6
+ up: async (pool) => {
7
+ // Set default value for new rows, but keep the column nullable
8
+ // to preserve existing null values as migration markers
9
+ await pool.query(sql`
10
+ alter table sign_in_experiences
11
+ alter column forgot_password_methods set default '[]'::jsonb;
12
+ `);
13
+
14
+ // Update default and admin tenant to [], bypass the alter comparison
15
+ await pool.query(sql`
16
+ update sign_in_experiences
17
+ set forgot_password_methods = '[]'::jsonb
18
+ where forgot_password_methods is null and (tenant_id = 'admin' or tenant_id = 'default');
19
+ `);
20
+ },
21
+ down: async (pool) => {
22
+ await pool.query(sql`
23
+ alter table sign_in_experiences
24
+ alter column forgot_password_methods drop default;
25
+ `);
26
+
27
+ await pool.query(sql`
28
+ update sign_in_experiences
29
+ set forgot_password_methods = null
30
+ where forgot_password_methods = '[]'::jsonb and (tenant_id = 'admin' or tenant_id = 'default');
31
+ `);
32
+ },
33
+ };
34
+
35
+ export default alteration;
@@ -0,0 +1,18 @@
1
+ import { sql } from '@silverhand/slonik';
2
+
3
+ import type { AlterationScript } from '../lib/types/alteration.js';
4
+
5
+ const alteration: AlterationScript = {
6
+ up: async (pool) => {
7
+ await pool.query(sql`
8
+ create index daily_active_users__date
9
+ on daily_active_users (tenant_id, date);
10
+ `);
11
+ },
12
+ down: async (pool) => {
13
+ await pool.query(sql`
14
+ drop index daily_active_users__date;
15
+ `);
16
+ },
17
+ };
18
+ export default alteration;
@@ -0,0 +1,24 @@
1
+ import { sql } from '@silverhand/slonik';
2
+ const alteration = {
3
+ up: async (pool) => {
4
+ await pool.query(sql `
5
+ alter table organizations
6
+ add column color jsonb not null default '{}'::jsonb,
7
+ add column custom_css text;
8
+ `);
9
+ await pool.query(sql `
10
+ alter table application_sign_in_experiences add column custom_css text;
11
+ `);
12
+ },
13
+ down: async (pool) => {
14
+ await pool.query(sql `
15
+ alter table organizations
16
+ drop column color,
17
+ drop column custom_css;
18
+ `);
19
+ await pool.query(sql `
20
+ alter table application_sign_in_experiences drop column custom_css;
21
+ `);
22
+ },
23
+ };
24
+ export default alteration;
@@ -0,0 +1,29 @@
1
+ import { sql } from '@silverhand/slonik';
2
+ const alteration = {
3
+ up: async (pool) => {
4
+ // Set default value for new rows, but keep the column nullable
5
+ // to preserve existing null values as migration markers
6
+ await pool.query(sql `
7
+ alter table sign_in_experiences
8
+ alter column forgot_password_methods set default '[]'::jsonb;
9
+ `);
10
+ // Update default and admin tenant to [], bypass the alter comparison
11
+ await pool.query(sql `
12
+ update sign_in_experiences
13
+ set forgot_password_methods = '[]'::jsonb
14
+ where forgot_password_methods is null and (tenant_id = 'admin' or tenant_id = 'default');
15
+ `);
16
+ },
17
+ down: async (pool) => {
18
+ await pool.query(sql `
19
+ alter table sign_in_experiences
20
+ alter column forgot_password_methods drop default;
21
+ `);
22
+ await pool.query(sql `
23
+ update sign_in_experiences
24
+ set forgot_password_methods = null
25
+ where forgot_password_methods = '[]'::jsonb and (tenant_id = 'admin' or tenant_id = 'default');
26
+ `);
27
+ },
28
+ };
29
+ export default alteration;
@@ -0,0 +1,15 @@
1
+ import { sql } from '@silverhand/slonik';
2
+ const alteration = {
3
+ up: async (pool) => {
4
+ await pool.query(sql `
5
+ create index daily_active_users__date
6
+ on daily_active_users (tenant_id, date);
7
+ `);
8
+ },
9
+ down: async (pool) => {
10
+ await pool.query(sql `
11
+ drop index daily_active_users__date;
12
+ `);
13
+ },
14
+ };
15
+ export default alteration;
@@ -38,6 +38,13 @@ export declare enum ExtraParamsKey {
38
38
  * This can be used to pre-fill the identifier field **only on the first screen** of the sign-in/sign-up flow.
39
39
  */
40
40
  LoginHint = "login_hint",
41
+ /**
42
+ * The end-users preferred languages to use for the client application, represented as a space-separated list of BCP47 language tags.
43
+ * E.g. `en` or `en-US` or `en-US en`.
44
+ *
45
+ * @see {@link https://openid.net/specs/openid-connect-core-1_0.html#rfc.section.13.2.1}
46
+ */
47
+ UiLocales = "ui_locales",
41
48
  /**
42
49
  * Specifies the identifier used in the identifier sign-in or identifier register page.
43
50
  *
@@ -80,6 +87,7 @@ export declare const extraParamsObjectGuard: z.ZodObject<{
80
87
  direct_sign_in: z.ZodOptional<z.ZodString>;
81
88
  organization_id: z.ZodOptional<z.ZodString>;
82
89
  login_hint: z.ZodOptional<z.ZodString>;
90
+ ui_locales: z.ZodOptional<z.ZodString>;
83
91
  identifier: z.ZodOptional<z.ZodString>;
84
92
  one_time_token: z.ZodOptional<z.ZodString>;
85
93
  google_one_tap_credential: z.ZodOptional<z.ZodString>;
@@ -89,6 +97,7 @@ export declare const extraParamsObjectGuard: z.ZodObject<{
89
97
  direct_sign_in?: string | undefined;
90
98
  organization_id?: string | undefined;
91
99
  login_hint?: string | undefined;
100
+ ui_locales?: string | undefined;
92
101
  identifier?: string | undefined;
93
102
  one_time_token?: string | undefined;
94
103
  google_one_tap_credential?: string | undefined;
@@ -98,6 +107,7 @@ export declare const extraParamsObjectGuard: z.ZodObject<{
98
107
  direct_sign_in?: string | undefined;
99
108
  organization_id?: string | undefined;
100
109
  login_hint?: string | undefined;
110
+ ui_locales?: string | undefined;
101
111
  identifier?: string | undefined;
102
112
  one_time_token?: string | undefined;
103
113
  google_one_tap_credential?: string | undefined;
@@ -108,6 +118,7 @@ export type ExtraParamsObject = Partial<{
108
118
  [ExtraParamsKey.DirectSignIn]: string;
109
119
  [ExtraParamsKey.OrganizationId]: string;
110
120
  [ExtraParamsKey.LoginHint]: string;
121
+ [ExtraParamsKey.UiLocales]: string;
111
122
  [ExtraParamsKey.Identifier]: string;
112
123
  [ExtraParamsKey.OneTimeToken]: string;
113
124
  [ExtraParamsKey.GoogleOneTapCredential]: string;
@@ -40,6 +40,13 @@ export var ExtraParamsKey;
40
40
  * This can be used to pre-fill the identifier field **only on the first screen** of the sign-in/sign-up flow.
41
41
  */
42
42
  ExtraParamsKey["LoginHint"] = "login_hint";
43
+ /**
44
+ * The end-users preferred languages to use for the client application, represented as a space-separated list of BCP47 language tags.
45
+ * E.g. `en` or `en-US` or `en-US en`.
46
+ *
47
+ * @see {@link https://openid.net/specs/openid-connect-core-1_0.html#rfc.section.13.2.1}
48
+ */
49
+ ExtraParamsKey["UiLocales"] = "ui_locales";
43
50
  /**
44
51
  * Specifies the identifier used in the identifier sign-in or identifier register page.
45
52
  *
@@ -85,6 +92,7 @@ export const extraParamsObjectGuard = z
85
92
  [ExtraParamsKey.DirectSignIn]: z.string(),
86
93
  [ExtraParamsKey.OrganizationId]: z.string(),
87
94
  [ExtraParamsKey.LoginHint]: z.string(),
95
+ [ExtraParamsKey.UiLocales]: z.string(),
88
96
  [ExtraParamsKey.Identifier]: z.string(),
89
97
  [ExtraParamsKey.OneTimeToken]: z.string(),
90
98
  [ExtraParamsKey.GoogleOneTapCredential]: z.string(),
@@ -10,6 +10,7 @@ export type CreateApplicationSignInExperience = {
10
10
  applicationId: string;
11
11
  color?: PartialColor;
12
12
  branding?: Branding;
13
+ customCss?: string | null;
13
14
  termsOfUseUrl?: string | null;
14
15
  privacyPolicyUrl?: string | null;
15
16
  displayName?: string | null;
@@ -20,9 +21,10 @@ export type ApplicationSignInExperience = {
20
21
  applicationId: string;
21
22
  color: PartialColor;
22
23
  branding: Branding;
24
+ customCss: string | null;
23
25
  termsOfUseUrl: string | null;
24
26
  privacyPolicyUrl: string | null;
25
27
  displayName: string | null;
26
28
  };
27
- export type ApplicationSignInExperienceKeys = 'tenantId' | 'applicationId' | 'color' | 'branding' | 'termsOfUseUrl' | 'privacyPolicyUrl' | 'displayName';
29
+ export type ApplicationSignInExperienceKeys = 'tenantId' | 'applicationId' | 'color' | 'branding' | 'customCss' | 'termsOfUseUrl' | 'privacyPolicyUrl' | 'displayName';
28
30
  export declare const ApplicationSignInExperiences: GeneratedSchema<ApplicationSignInExperienceKeys, CreateApplicationSignInExperience, ApplicationSignInExperience, 'application_sign_in_experiences', 'application_sign_in_experience'>;
@@ -6,6 +6,7 @@ const createGuard = z.object({
6
6
  applicationId: z.string().min(1).max(21),
7
7
  color: partialColorGuard.optional(),
8
8
  branding: brandingGuard.optional(),
9
+ customCss: z.string().nullable().optional(),
9
10
  termsOfUseUrl: z.string().max(2048).nullable().optional(),
10
11
  privacyPolicyUrl: z.string().max(2048).nullable().optional(),
11
12
  displayName: z.string().max(256).nullable().optional(),
@@ -15,6 +16,7 @@ const guard = z.object({
15
16
  applicationId: z.string().min(1).max(21),
16
17
  color: partialColorGuard,
17
18
  branding: brandingGuard,
19
+ customCss: z.string().nullable(),
18
20
  termsOfUseUrl: z.string().max(2048).nullable(),
19
21
  privacyPolicyUrl: z.string().max(2048).nullable(),
20
22
  displayName: z.string().max(256).nullable(),
@@ -27,6 +29,7 @@ export const ApplicationSignInExperiences = Object.freeze({
27
29
  applicationId: 'application_id',
28
30
  color: 'color',
29
31
  branding: 'branding',
32
+ customCss: 'custom_css',
30
33
  termsOfUseUrl: 'terms_of_use_url',
31
34
  privacyPolicyUrl: 'privacy_policy_url',
32
35
  displayName: 'display_name',
@@ -36,6 +39,7 @@ export const ApplicationSignInExperiences = Object.freeze({
36
39
  'applicationId',
37
40
  'color',
38
41
  'branding',
42
+ 'customCss',
39
43
  'termsOfUseUrl',
40
44
  'privacyPolicyUrl',
41
45
  'displayName',
@@ -1,4 +1,4 @@
1
- import { JsonObject, Branding, GeneratedSchema } from './../foundations/index.js';
1
+ import { JsonObject, PartialColor, Branding, GeneratedSchema } from './../foundations/index.js';
2
2
  /**
3
3
  * Organizations defined by [RFC 0001](https://github.com/logto-io/rfcs/blob/HEAD/active/0001-organization.md).
4
4
  *
@@ -17,8 +17,12 @@ export type CreateOrganization = {
17
17
  customData?: JsonObject;
18
18
  /** Whether multi-factor authentication configuration is required for the members of the organization. */
19
19
  isMfaRequired?: boolean;
20
+ /** The organization's branding color configuration. */
21
+ color?: PartialColor;
20
22
  /** The organization's branding configuration. */
21
23
  branding?: Branding;
24
+ /** The custom CSS of the organization. */
25
+ customCss?: string | null;
22
26
  /** When the organization was created. */
23
27
  createdAt?: number;
24
28
  };
@@ -35,10 +39,14 @@ export type Organization = {
35
39
  customData: JsonObject;
36
40
  /** Whether multi-factor authentication configuration is required for the members of the organization. */
37
41
  isMfaRequired: boolean;
42
+ /** The organization's branding color configuration. */
43
+ color: PartialColor;
38
44
  /** The organization's branding configuration. */
39
45
  branding: Branding;
46
+ /** The custom CSS of the organization. */
47
+ customCss: string | null;
40
48
  /** When the organization was created. */
41
49
  createdAt: number;
42
50
  };
43
- export type OrganizationKeys = 'tenantId' | 'id' | 'name' | 'description' | 'customData' | 'isMfaRequired' | 'branding' | 'createdAt';
51
+ export type OrganizationKeys = 'tenantId' | 'id' | 'name' | 'description' | 'customData' | 'isMfaRequired' | 'color' | 'branding' | 'customCss' | 'createdAt';
44
52
  export declare const Organizations: GeneratedSchema<OrganizationKeys, CreateOrganization, Organization, 'organizations', 'organization'>;
@@ -1,6 +1,6 @@
1
1
  // THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2
2
  import { z } from 'zod';
3
- import { jsonObjectGuard, brandingGuard } from './../foundations/index.js';
3
+ import { jsonObjectGuard, partialColorGuard, brandingGuard } from './../foundations/index.js';
4
4
  const createGuard = z.object({
5
5
  tenantId: z.string().max(21).optional(),
6
6
  id: z.string().min(1).max(21),
@@ -8,7 +8,9 @@ const createGuard = z.object({
8
8
  description: z.string().max(256).nullable().optional(),
9
9
  customData: jsonObjectGuard.optional(),
10
10
  isMfaRequired: z.boolean().optional(),
11
+ color: partialColorGuard.optional(),
11
12
  branding: brandingGuard.optional(),
13
+ customCss: z.string().nullable().optional(),
12
14
  createdAt: z.number().optional(),
13
15
  });
14
16
  const guard = z.object({
@@ -18,7 +20,9 @@ const guard = z.object({
18
20
  description: z.string().max(256).nullable(),
19
21
  customData: jsonObjectGuard,
20
22
  isMfaRequired: z.boolean(),
23
+ color: partialColorGuard,
21
24
  branding: brandingGuard,
25
+ customCss: z.string().nullable(),
22
26
  createdAt: z.number(),
23
27
  });
24
28
  export const Organizations = Object.freeze({
@@ -31,7 +35,9 @@ export const Organizations = Object.freeze({
31
35
  description: 'description',
32
36
  customData: 'custom_data',
33
37
  isMfaRequired: 'is_mfa_required',
38
+ color: 'color',
34
39
  branding: 'branding',
40
+ customCss: 'custom_css',
35
41
  createdAt: 'created_at',
36
42
  },
37
43
  fieldKeys: [
@@ -41,7 +47,9 @@ export const Organizations = Object.freeze({
41
47
  'description',
42
48
  'customData',
43
49
  'isMfaRequired',
50
+ 'color',
44
51
  'branding',
52
+ 'customCss',
45
53
  'createdAt',
46
54
  ],
47
55
  createGuard,
@@ -170,6 +170,7 @@ export declare const mfaVerificationTotp: z.ZodObject<{
170
170
  export type MfaVerificationTotp = z.infer<typeof mfaVerificationTotp>;
171
171
  export declare const webAuthnTransportGuard: z.ZodEnum<["usb", "nfc", "ble", "internal", "cable", "hybrid", "smart-card"]>;
172
172
  export declare const mfaVerificationWebAuthn: z.ZodObject<{
173
+ rpId: z.ZodOptional<z.ZodString>;
173
174
  credentialId: z.ZodString;
174
175
  publicKey: z.ZodString;
175
176
  transports: z.ZodOptional<z.ZodArray<z.ZodEnum<["usb", "nfc", "ble", "internal", "cable", "hybrid", "smart-card"]>, "many">>;
@@ -190,6 +191,7 @@ export declare const mfaVerificationWebAuthn: z.ZodObject<{
190
191
  agent: string;
191
192
  name?: string | undefined;
192
193
  lastUsedAt?: string | undefined;
194
+ rpId?: string | undefined;
193
195
  transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined;
194
196
  }, {
195
197
  type: MfaFactor.WebAuthn;
@@ -201,6 +203,7 @@ export declare const mfaVerificationWebAuthn: z.ZodObject<{
201
203
  agent: string;
202
204
  name?: string | undefined;
203
205
  lastUsedAt?: string | undefined;
206
+ rpId?: string | undefined;
204
207
  transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined;
205
208
  }>;
206
209
  export type MfaVerificationWebAuthn = z.infer<typeof mfaVerificationWebAuthn>;
@@ -258,6 +261,7 @@ export declare const mfaVerificationGuard: z.ZodDiscriminatedUnion<"type", [z.Zo
258
261
  createdAt: string;
259
262
  lastUsedAt?: string | undefined;
260
263
  }>, z.ZodObject<{
264
+ rpId: z.ZodOptional<z.ZodString>;
261
265
  credentialId: z.ZodString;
262
266
  publicKey: z.ZodString;
263
267
  transports: z.ZodOptional<z.ZodArray<z.ZodEnum<["usb", "nfc", "ble", "internal", "cable", "hybrid", "smart-card"]>, "many">>;
@@ -278,6 +282,7 @@ export declare const mfaVerificationGuard: z.ZodDiscriminatedUnion<"type", [z.Zo
278
282
  agent: string;
279
283
  name?: string | undefined;
280
284
  lastUsedAt?: string | undefined;
285
+ rpId?: string | undefined;
281
286
  transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined;
282
287
  }, {
283
288
  type: MfaFactor.WebAuthn;
@@ -289,6 +294,7 @@ export declare const mfaVerificationGuard: z.ZodDiscriminatedUnion<"type", [z.Zo
289
294
  agent: string;
290
295
  name?: string | undefined;
291
296
  lastUsedAt?: string | undefined;
297
+ rpId?: string | undefined;
292
298
  transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined;
293
299
  }>, z.ZodObject<{
294
300
  codes: z.ZodArray<z.ZodObject<{
@@ -344,6 +350,7 @@ export declare const mfaVerificationsGuard: z.ZodArray<z.ZodDiscriminatedUnion<"
344
350
  createdAt: string;
345
351
  lastUsedAt?: string | undefined;
346
352
  }>, z.ZodObject<{
353
+ rpId: z.ZodOptional<z.ZodString>;
347
354
  credentialId: z.ZodString;
348
355
  publicKey: z.ZodString;
349
356
  transports: z.ZodOptional<z.ZodArray<z.ZodEnum<["usb", "nfc", "ble", "internal", "cable", "hybrid", "smart-card"]>, "many">>;
@@ -364,6 +371,7 @@ export declare const mfaVerificationsGuard: z.ZodArray<z.ZodDiscriminatedUnion<"
364
371
  agent: string;
365
372
  name?: string | undefined;
366
373
  lastUsedAt?: string | undefined;
374
+ rpId?: string | undefined;
367
375
  transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined;
368
376
  }, {
369
377
  type: MfaFactor.WebAuthn;
@@ -375,6 +383,7 @@ export declare const mfaVerificationsGuard: z.ZodArray<z.ZodDiscriminatedUnion<"
375
383
  agent: string;
376
384
  name?: string | undefined;
377
385
  lastUsedAt?: string | undefined;
386
+ rpId?: string | undefined;
378
387
  transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined;
379
388
  }>, z.ZodObject<{
380
389
  codes: z.ZodArray<z.ZodObject<{
@@ -53,6 +53,7 @@ export const webAuthnTransportGuard = z.enum([
53
53
  export const mfaVerificationWebAuthn = z.object({
54
54
  type: z.literal(MfaFactor.WebAuthn),
55
55
  ...baseMfaVerification,
56
+ rpId: z.string().optional(),
56
57
  credentialId: z.string(),
57
58
  publicKey: z.string(),
58
59
  transports: webAuthnTransportGuard.array().optional(),
@@ -522,6 +522,7 @@ export declare const applicationSignInExperienceCreateGuard: z.ZodObject<Omit<{
522
522
  favicon?: string | undefined;
523
523
  darkFavicon?: string | undefined;
524
524
  }>>;
525
+ customCss: z.ZodOptional<z.ZodType<string | null, z.ZodTypeDef, string | null>>;
525
526
  termsOfUseUrl: z.ZodOptional<z.ZodType<string | null, z.ZodTypeDef, string | null>>;
526
527
  privacyPolicyUrl: z.ZodOptional<z.ZodType<string | null, z.ZodTypeDef, string | null>>;
527
528
  displayName: z.ZodOptional<z.ZodType<string | null, z.ZodTypeDef, string | null>>;
@@ -532,12 +533,14 @@ export declare const applicationSignInExperienceCreateGuard: z.ZodObject<Omit<{
532
533
  displayName?: string | null;
533
534
  color?: import("../index.js").PartialColor;
534
535
  branding?: import("../index.js").Branding;
536
+ customCss?: string | null;
535
537
  termsOfUseUrl?: string | null | undefined;
536
538
  privacyPolicyUrl?: string | null | undefined;
537
539
  }, {
538
540
  displayName?: string | null;
539
541
  color?: import("../index.js").PartialColor;
540
542
  branding?: import("../index.js").Branding;
543
+ customCss?: string | null;
541
544
  termsOfUseUrl?: string | null | undefined;
542
545
  privacyPolicyUrl?: string | null | undefined;
543
546
  }>;
@@ -79,6 +79,7 @@ export declare const publicUserInfoGuard: z.ZodObject<Pick<{
79
79
  agent: string;
80
80
  name?: string | undefined;
81
81
  lastUsedAt?: string | undefined;
82
+ rpId?: string | undefined;
82
83
  transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined;
83
84
  } | {
84
85
  type: import("../index.js").MfaFactor.BackupCode;
@@ -105,6 +106,7 @@ export declare const publicUserInfoGuard: z.ZodObject<Pick<{
105
106
  agent: string;
106
107
  name?: string | undefined;
107
108
  lastUsedAt?: string | undefined;
109
+ rpId?: string | undefined;
108
110
  transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined;
109
111
  } | {
110
112
  type: import("../index.js").MfaFactor.BackupCode;
@@ -255,6 +257,7 @@ export declare const applicationSignInExperienceGuard: z.ZodObject<Pick<{
255
257
  favicon?: string | undefined;
256
258
  darkFavicon?: string | undefined;
257
259
  }>;
260
+ customCss: z.ZodType<string | null, z.ZodTypeDef, string | null>;
258
261
  termsOfUseUrl: z.ZodType<string | null, z.ZodTypeDef, string | null>;
259
262
  privacyPolicyUrl: z.ZodType<string | null, z.ZodTypeDef, string | null>;
260
263
  displayName: z.ZodType<string | null, z.ZodTypeDef, string | null>;
@@ -341,6 +344,15 @@ export declare const publicOrganizationGuard: z.ZodObject<Pick<{
341
344
  description: z.ZodType<string | null, z.ZodTypeDef, string | null>;
342
345
  customData: z.ZodType<import("@withtyped/server").JsonObject, z.ZodTypeDef, import("@withtyped/server").JsonObject>;
343
346
  isMfaRequired: z.ZodType<boolean, z.ZodTypeDef, boolean>;
347
+ color: z.ZodType<Partial<{
348
+ primaryColor: string;
349
+ isDarkModeEnabled: boolean;
350
+ darkPrimaryColor: string;
351
+ }>, z.ZodTypeDef, Partial<{
352
+ primaryColor: string;
353
+ isDarkModeEnabled: boolean;
354
+ darkPrimaryColor: string;
355
+ }>>;
344
356
  branding: z.ZodType<{
345
357
  logoUrl?: string | undefined;
346
358
  darkLogoUrl?: string | undefined;
@@ -352,6 +364,7 @@ export declare const publicOrganizationGuard: z.ZodObject<Pick<{
352
364
  favicon?: string | undefined;
353
365
  darkFavicon?: string | undefined;
354
366
  }>;
367
+ customCss: z.ZodType<string | null, z.ZodTypeDef, string | null>;
355
368
  createdAt: z.ZodType<number, z.ZodTypeDef, number>;
356
369
  }, "name" | "id"> & {
357
370
  missingResourceScopes: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -647,6 +660,7 @@ export declare const consentInfoResponseGuard: z.ZodObject<{
647
660
  agent: string;
648
661
  name?: string | undefined;
649
662
  lastUsedAt?: string | undefined;
663
+ rpId?: string | undefined;
650
664
  transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined;
651
665
  } | {
652
666
  type: import("../index.js").MfaFactor.BackupCode;
@@ -673,6 +687,7 @@ export declare const consentInfoResponseGuard: z.ZodObject<{
673
687
  agent: string;
674
688
  name?: string | undefined;
675
689
  lastUsedAt?: string | undefined;
690
+ rpId?: string | undefined;
676
691
  transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined;
677
692
  } | {
678
693
  type: import("../index.js").MfaFactor.BackupCode;
@@ -710,6 +725,15 @@ export declare const consentInfoResponseGuard: z.ZodObject<{
710
725
  description: z.ZodType<string | null, z.ZodTypeDef, string | null>;
711
726
  customData: z.ZodType<import("@withtyped/server").JsonObject, z.ZodTypeDef, import("@withtyped/server").JsonObject>;
712
727
  isMfaRequired: z.ZodType<boolean, z.ZodTypeDef, boolean>;
728
+ color: z.ZodType<Partial<{
729
+ primaryColor: string;
730
+ isDarkModeEnabled: boolean;
731
+ darkPrimaryColor: string;
732
+ }>, z.ZodTypeDef, Partial<{
733
+ primaryColor: string;
734
+ isDarkModeEnabled: boolean;
735
+ darkPrimaryColor: string;
736
+ }>>;
713
737
  branding: z.ZodType<{
714
738
  logoUrl?: string | undefined;
715
739
  darkLogoUrl?: string | undefined;
@@ -721,6 +745,7 @@ export declare const consentInfoResponseGuard: z.ZodObject<{
721
745
  favicon?: string | undefined;
722
746
  darkFavicon?: string | undefined;
723
747
  }>;
748
+ customCss: z.ZodType<string | null, z.ZodTypeDef, string | null>;
724
749
  createdAt: z.ZodType<number, z.ZodTypeDef, number>;
725
750
  }, "name" | "id"> & {
726
751
  missingResourceScopes: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -2,14 +2,18 @@ import { z } from 'zod';
2
2
  export type LogtoUiCookie = Partial<{
3
3
  appId: string;
4
4
  organizationId: string;
5
+ uiLocales: string;
5
6
  }>;
6
7
  export declare const logtoUiCookieGuard: z.ZodObject<{
7
8
  appId: z.ZodOptional<z.ZodString>;
8
9
  organizationId: z.ZodOptional<z.ZodString>;
10
+ uiLocales: z.ZodOptional<z.ZodString>;
9
11
  }, "strip", z.ZodTypeAny, {
10
12
  organizationId?: string | undefined;
11
13
  appId?: string | undefined;
14
+ uiLocales?: string | undefined;
12
15
  }, {
13
16
  organizationId?: string | undefined;
14
17
  appId?: string | undefined;
18
+ uiLocales?: string | undefined;
15
19
  }>;
@@ -1,4 +1,4 @@
1
1
  import { z } from 'zod';
2
2
  export const logtoUiCookieGuard = z
3
- .object({ appId: z.string(), organizationId: z.string() })
3
+ .object({ appId: z.string(), organizationId: z.string(), uiLocales: z.string() })
4
4
  .partial();
@@ -2484,6 +2484,7 @@ export declare const signInIdentifierKeyGuard: z.ZodObject<Pick<{
2484
2484
  agent: string;
2485
2485
  name?: string | undefined;
2486
2486
  lastUsedAt?: string | undefined;
2487
+ rpId?: string | undefined;
2487
2488
  transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined;
2488
2489
  } | {
2489
2490
  type: import("../foundations/index.js").MfaFactor.BackupCode;
@@ -2510,6 +2511,7 @@ export declare const signInIdentifierKeyGuard: z.ZodObject<Pick<{
2510
2511
  agent: string;
2511
2512
  name?: string | undefined;
2512
2513
  lastUsedAt?: string | undefined;
2514
+ rpId?: string | undefined;
2513
2515
  transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined;
2514
2516
  } | {
2515
2517
  type: import("../foundations/index.js").MfaFactor.BackupCode;
@@ -1076,6 +1076,7 @@ export declare const bindTotpGuard: z.ZodObject<{
1076
1076
  export type BindTotp = z.infer<typeof bindTotpGuard>;
1077
1077
  export declare const bindWebAuthnGuard: z.ZodObject<{
1078
1078
  type: z.ZodLiteral<MfaFactor.WebAuthn>;
1079
+ rpId: z.ZodString;
1079
1080
  credentialId: z.ZodString;
1080
1081
  publicKey: z.ZodString;
1081
1082
  transports: z.ZodArray<z.ZodEnum<["usb", "nfc", "ble", "internal", "cable", "hybrid", "smart-card"]>, "many">;
@@ -1084,6 +1085,7 @@ export declare const bindWebAuthnGuard: z.ZodObject<{
1084
1085
  name: z.ZodOptional<z.ZodString>;
1085
1086
  }, "strip", z.ZodTypeAny, {
1086
1087
  type: MfaFactor.WebAuthn;
1088
+ rpId: string;
1087
1089
  credentialId: string;
1088
1090
  publicKey: string;
1089
1091
  transports: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[];
@@ -1092,6 +1094,7 @@ export declare const bindWebAuthnGuard: z.ZodObject<{
1092
1094
  name?: string | undefined;
1093
1095
  }, {
1094
1096
  type: MfaFactor.WebAuthn;
1097
+ rpId: string;
1095
1098
  credentialId: string;
1096
1099
  publicKey: string;
1097
1100
  transports: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[];
@@ -1122,6 +1125,7 @@ export declare const bindMfaGuard: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
1122
1125
  secret: string;
1123
1126
  }>, z.ZodObject<{
1124
1127
  type: z.ZodLiteral<MfaFactor.WebAuthn>;
1128
+ rpId: z.ZodString;
1125
1129
  credentialId: z.ZodString;
1126
1130
  publicKey: z.ZodString;
1127
1131
  transports: z.ZodArray<z.ZodEnum<["usb", "nfc", "ble", "internal", "cable", "hybrid", "smart-card"]>, "many">;
@@ -1130,6 +1134,7 @@ export declare const bindMfaGuard: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
1130
1134
  name: z.ZodOptional<z.ZodString>;
1131
1135
  }, "strip", z.ZodTypeAny, {
1132
1136
  type: MfaFactor.WebAuthn;
1137
+ rpId: string;
1133
1138
  credentialId: string;
1134
1139
  publicKey: string;
1135
1140
  transports: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[];
@@ -1138,6 +1143,7 @@ export declare const bindMfaGuard: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
1138
1143
  name?: string | undefined;
1139
1144
  }, {
1140
1145
  type: MfaFactor.WebAuthn;
1146
+ rpId: string;
1141
1147
  credentialId: string;
1142
1148
  publicKey: string;
1143
1149
  transports: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[];
@@ -245,6 +245,7 @@ export const pendingMfaGuard = z.discriminatedUnion('type', [
245
245
  export const bindTotpGuard = pendingTotpGuard;
246
246
  export const bindWebAuthnGuard = z.object({
247
247
  type: z.literal(MfaFactor.WebAuthn),
248
+ rpId: z.string(),
248
249
  credentialId: z.string(),
249
250
  publicKey: z.string(),
250
251
  transports: webAuthnTransportGuard.array(),