@logto/schemas 1.42.0 → 1.43.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 (113) hide show
  1. package/alterations/1.43.0-1785393731-add-oidc-model-instances-account-id-partial-index.ts +33 -0
  2. package/alterations/1.43.0-1785481546-add-tenant-aware-scope-indexes.ts +33 -0
  3. package/alterations/1.43.0-1785488115-add-cimd-permission-ceiling-tables.ts +77 -0
  4. package/alterations/1.43.0-1785722831-add-oidc-session-extensions-account-id-index.ts +27 -0
  5. package/alterations/1.43.0-1785835991-add-cimd-client-identifier-columns.ts +31 -0
  6. package/alterations/1.43.0-1786325989-add-cimd-grant-organizations-table.ts +54 -0
  7. package/alterations/1.43.0-1786333495-add-trusted-devices.ts +57 -0
  8. package/alterations/1.43.0-1786373004-tighten-cimd-grant-organizations-pkey.ts +28 -0
  9. package/alterations/1.43.0-1786414712-add-service-logs-email-indexes.ts +34 -0
  10. package/alterations/1.43.0-1786431364-add-cimd-grant-client-snapshots-table.ts +43 -0
  11. package/alterations-js/1.43.0-1785393731-add-oidc-model-instances-account-id-partial-index.js +28 -0
  12. package/alterations-js/1.43.0-1785481546-add-tenant-aware-scope-indexes.js +28 -0
  13. package/alterations-js/1.43.0-1785488115-add-cimd-permission-ceiling-tables.js +69 -0
  14. package/alterations-js/1.43.0-1785722831-add-oidc-session-extensions-account-id-index.js +23 -0
  15. package/alterations-js/1.43.0-1785835991-add-cimd-client-identifier-columns.js +27 -0
  16. package/alterations-js/1.43.0-1786325989-add-cimd-grant-organizations-table.js +49 -0
  17. package/alterations-js/1.43.0-1786333495-add-trusted-devices.js +50 -0
  18. package/alterations-js/1.43.0-1786373004-tighten-cimd-grant-organizations-pkey.js +24 -0
  19. package/alterations-js/1.43.0-1786414712-add-service-logs-email-indexes.js +30 -0
  20. package/alterations-js/1.43.0-1786431364-add-cimd-grant-client-snapshots-table.js +38 -0
  21. package/lib/consts/index.d.ts +1 -0
  22. package/lib/consts/index.js +1 -0
  23. package/lib/consts/product-event.d.ts +5 -1
  24. package/lib/consts/product-event.js +4 -0
  25. package/lib/consts/social-state.d.ts +12 -0
  26. package/lib/consts/social-state.js +12 -0
  27. package/lib/db-entries/cimd-grant-client-snapshot.d.ts +32 -0
  28. package/lib/db-entries/cimd-grant-client-snapshot.js +45 -0
  29. package/lib/db-entries/cimd-grant-organization.d.ts +30 -0
  30. package/lib/db-entries/cimd-grant-organization.js +37 -0
  31. package/lib/db-entries/cimd-organization-resource-scope.d.ts +20 -0
  32. package/lib/db-entries/cimd-organization-resource-scope.js +25 -0
  33. package/lib/db-entries/cimd-organization-scope.d.ts +20 -0
  34. package/lib/db-entries/cimd-organization-scope.js +25 -0
  35. package/lib/db-entries/cimd-resource-scope.d.ts +20 -0
  36. package/lib/db-entries/cimd-resource-scope.js +25 -0
  37. package/lib/db-entries/cimd-user-scope.d.ts +20 -0
  38. package/lib/db-entries/cimd-user-scope.js +25 -0
  39. package/lib/db-entries/index.d.ts +7 -0
  40. package/lib/db-entries/index.js +7 -0
  41. package/lib/db-entries/oidc-session-extension.d.ts +3 -1
  42. package/lib/db-entries/oidc-session-extension.js +4 -0
  43. package/lib/db-entries/organization.d.ts +5 -1
  44. package/lib/db-entries/organization.js +4 -0
  45. package/lib/db-entries/sign-in-experience.d.ts +4 -2
  46. package/lib/db-entries/sign-in-experience.js +5 -1
  47. package/lib/db-entries/trusted-device.d.ts +36 -0
  48. package/lib/db-entries/trusted-device.js +62 -0
  49. package/lib/db-entries/user.d.ts +3 -1
  50. package/lib/db-entries/user.js +4 -0
  51. package/lib/foundations/jsonb-types/account-centers.d.ts +3 -0
  52. package/lib/foundations/jsonb-types/account-centers.js +1 -0
  53. package/lib/foundations/jsonb-types/account-centers.test.d.ts +1 -0
  54. package/lib/foundations/jsonb-types/account-centers.test.js +13 -0
  55. package/lib/foundations/jsonb-types/hooks.d.ts +8 -4
  56. package/lib/foundations/jsonb-types/hooks.js +7 -0
  57. package/lib/foundations/jsonb-types/logs.d.ts +18 -0
  58. package/lib/foundations/jsonb-types/logs.js +6 -0
  59. package/lib/foundations/jsonb-types/sign-in-experience.d.ts +23 -3
  60. package/lib/foundations/jsonb-types/sign-in-experience.js +9 -0
  61. package/lib/foundations/jsonb-types/sign-in-experience.test.js +17 -1
  62. package/lib/types/connector.d.ts +8 -0
  63. package/lib/types/consent.d.ts +16 -190
  64. package/lib/types/consent.js +10 -1
  65. package/lib/types/custom-profile-fields.d.ts +1 -0
  66. package/lib/types/hook.d.ts +31 -6
  67. package/lib/types/index.d.ts +1 -0
  68. package/lib/types/index.js +1 -0
  69. package/lib/types/log/index.d.ts +5 -2
  70. package/lib/types/log/index.js +1 -0
  71. package/lib/types/log/trusted-device.d.ts +7 -0
  72. package/lib/types/log/trusted-device.js +6 -0
  73. package/lib/types/logto-config/action.d.ts +1 -1
  74. package/lib/types/logto-config/action.js +1 -1
  75. package/lib/types/logto-config/index.d.ts +36 -7
  76. package/lib/types/logto-config/index.js +13 -0
  77. package/lib/types/logto-config/index.test.js +23 -0
  78. package/lib/types/logto-config/jwt-customizer.d.ts +31 -10
  79. package/lib/types/logto-config/jwt-customizer.js +1 -1
  80. package/lib/types/logto-config/oidc-provider.d.ts +2 -2
  81. package/lib/types/service-log.d.ts +14 -1
  82. package/lib/types/service-log.js +13 -0
  83. package/lib/types/sign-in-experience.d.ts +18 -8
  84. package/lib/types/sign-in-experience.js +2 -1
  85. package/lib/types/system.d.ts +2 -2
  86. package/lib/types/trusted-device.d.ts +67 -0
  87. package/lib/types/trusted-device.js +16 -0
  88. package/lib/types/user-sessions.d.ts +39 -209
  89. package/lib/types/user-sessions.js +9 -4
  90. package/lib/types/user.d.ts +10 -3
  91. package/lib/types/user.js +1 -0
  92. package/lib/utils/cimd.d.ts +14 -0
  93. package/lib/utils/cimd.js +14 -0
  94. package/lib/utils/cimd.test.d.ts +1 -0
  95. package/lib/utils/cimd.test.js +9 -0
  96. package/lib/utils/index.d.ts +1 -0
  97. package/lib/utils/index.js +1 -0
  98. package/package.json +7 -7
  99. package/tables/cimd_grant_client_snapshots.sql +27 -0
  100. package/tables/cimd_grant_organizations.sql +38 -0
  101. package/tables/cimd_organization_resource_scopes.sql +16 -0
  102. package/tables/cimd_organization_scopes.sql +15 -0
  103. package/tables/cimd_resource_scopes.sql +15 -0
  104. package/tables/cimd_user_scopes.sql +13 -0
  105. package/tables/oidc_model_instances.sql +5 -0
  106. package/tables/oidc_session_extensions.sql +5 -0
  107. package/tables/organization_scopes.sql +4 -0
  108. package/tables/organizations.sql +2 -0
  109. package/tables/scopes.sql +4 -0
  110. package/tables/service_logs.sql +14 -0
  111. package/tables/sign_in_experiences.sql +1 -0
  112. package/tables/trusted_devices.sql +25 -0
  113. package/tables/users.sql +1 -0
@@ -12,7 +12,9 @@ type ForgotPassword = {
12
12
  * the need to load the full connector metadata that is not needed for rendering.
13
13
  */
14
14
  export type ExperienceSocialConnector = Omit<ConnectorMetadata, 'description' | 'configTemplate' | 'formItems' | 'readme' | 'customData'>;
15
- export type FullSignInExperience = Omit<SignInExperience, 'emailBlocklistPolicy' | 'forgotPasswordMethods'> & {
15
+ export type FullSignInExperience = Omit<SignInExperience, 'emailBlocklistPolicy' | 'forgotPasswordMethods' | 'trustedDevice'> & {
16
+ /** Available while the MFA trusted-device feature is under development. */
17
+ trustedDevice?: SignInExperience['trustedDevice'];
16
18
  socialConnectors: ExperienceSocialConnector[];
17
19
  ssoConnectors: SsoConnectorMetadata[];
18
20
  forgotPassword: ForgotPassword;
@@ -71,10 +73,10 @@ export declare const fullSignInExperienceGuard: z.ZodObject<Omit<{
71
73
  hideLogtoBranding: z.ZodType<boolean, z.ZodTypeDef, boolean>;
72
74
  languageInfo: z.ZodType<{
73
75
  autoDetect: boolean;
74
- fallbackLanguage: "af-ZA" | "am-ET" | "ar" | "ar-AR" | "as-IN" | "az-AZ" | "be-BY" | "bg-BG" | "bn-IN" | "br-FR" | "bs-BA" | "ca-ES" | "cb-IQ" | "co-FR" | "cs" | "cs-CZ" | "cx-PH" | "cy-GB" | "da-DK" | "de" | "de-DE" | "el-GR" | "en" | "en-GB" | "en-US" | "eo-EO" | "es" | "es-ES" | "es-419" | "et-EE" | "eu-ES" | "fa-IR" | "ff-NG" | "fi" | "fi-FI" | "fo-FO" | "fr" | "fr-CA" | "fr-FR" | "fy-NL" | "ga-IE" | "gl-ES" | "gn-PY" | "gu-IN" | "ha-NG" | "he-IL" | "hi-IN" | "hr-HR" | "ht-HT" | "hu-HU" | "hy-AM" | "id-ID" | "ik-US" | "is-IS" | "it" | "it-IT" | "iu-CA" | "ja" | "ja-JP" | "ja-KS" | "jv-ID" | "ka-GE" | "kk-KZ" | "km-KH" | "kn-IN" | "ko" | "ko-KR" | "ku-TR" | "ky-KG" | "lo-LA" | "lt-LT" | "lv-LV" | "mg-MG" | "mk-MK" | "ml-IN" | "mn-MN" | "mr-IN" | "ms-MY" | "mt-MT" | "my-MM" | "nb-NO" | "ne-NP" | "nl" | "nl-BE" | "nl-NL" | "nn-NO" | "or-IN" | "pa-IN" | "pl-PL" | "ps-AF" | "pt" | "pt-BR" | "pt-PT" | "ro-RO" | "ru" | "ru-RU" | "rw-RW" | "sc-IT" | "si-LK" | "sk-SK" | "sl-SI" | "sn-ZW" | "sq-AL" | "sr-RS" | "sv" | "sv-SE" | "sw-KE" | "sy-SY" | "sz-PL" | "ta-IN" | "te-IN" | "tg-TJ" | "th" | "th-TH" | "tl-PH" | "tr" | "tr-TR" | "tt-RU" | "tz-MA" | "uk-UA" | "ur-PK" | "uz-UZ" | "vi-VN" | "zh" | "zh-CN" | "zh-HK" | "zh-MO" | "zh-TW" | "zz-TR";
76
+ fallbackLanguage: "af-ZA" | "am-ET" | "ar" | "ar-AR" | "as-IN" | "az-AZ" | "be-BY" | "bg-BG" | "bn-IN" | "br-FR" | "bs-BA" | "ca-ES" | "cb-IQ" | "co-FR" | "cs" | "cs-CZ" | "cx-PH" | "cy-GB" | "da-DK" | "de" | "de-DE" | "el-GR" | "en" | "en-GB" | "en-US" | "eo-EO" | "es" | "es-ES" | "es-419" | "es-MX" | "et-EE" | "eu-ES" | "fa-IR" | "ff-NG" | "fi" | "fi-FI" | "fo-FO" | "fr" | "fr-CA" | "fr-FR" | "fy-NL" | "ga-IE" | "gl-ES" | "gn-PY" | "gu-IN" | "ha-NG" | "he-IL" | "hi-IN" | "hr-HR" | "ht-HT" | "hu-HU" | "hy-AM" | "id-ID" | "ik-US" | "is-IS" | "it" | "it-IT" | "iu-CA" | "ja" | "ja-JP" | "ja-KS" | "jv-ID" | "ka-GE" | "kk-KZ" | "km-KH" | "kn-IN" | "ko" | "ko-KR" | "ku-TR" | "ky-KG" | "lo-LA" | "lt-LT" | "lv-LV" | "mg-MG" | "mk-MK" | "ml-IN" | "mn-MN" | "mr-IN" | "ms-MY" | "mt-MT" | "my-MM" | "nb-NO" | "ne-NP" | "nl" | "nl-BE" | "nl-NL" | "nn-NO" | "or-IN" | "pa-IN" | "pl-PL" | "ps-AF" | "pt" | "pt-BR" | "pt-PT" | "ro-RO" | "ru" | "ru-RU" | "rw-RW" | "sc-IT" | "si-LK" | "sk-SK" | "sl-SI" | "sn-ZW" | "sq-AL" | "sr-RS" | "sv" | "sv-SE" | "sw-KE" | "sy-SY" | "sz-PL" | "ta-IN" | "te-IN" | "tg-TJ" | "th" | "th-TH" | "tl-PH" | "tr" | "tr-TR" | "tt-RU" | "tz-MA" | "uk-UA" | "ur-PK" | "uz-UZ" | "vi-VN" | "zh" | "zh-CN" | "zh-HK" | "zh-MO" | "zh-TW" | "zz-TR";
75
77
  }, z.ZodTypeDef, {
76
78
  autoDetect: boolean;
77
- fallbackLanguage: "af-ZA" | "am-ET" | "ar" | "ar-AR" | "as-IN" | "az-AZ" | "be-BY" | "bg-BG" | "bn-IN" | "br-FR" | "bs-BA" | "ca-ES" | "cb-IQ" | "co-FR" | "cs" | "cs-CZ" | "cx-PH" | "cy-GB" | "da-DK" | "de" | "de-DE" | "el-GR" | "en" | "en-GB" | "en-US" | "eo-EO" | "es" | "es-ES" | "es-419" | "et-EE" | "eu-ES" | "fa-IR" | "ff-NG" | "fi" | "fi-FI" | "fo-FO" | "fr" | "fr-CA" | "fr-FR" | "fy-NL" | "ga-IE" | "gl-ES" | "gn-PY" | "gu-IN" | "ha-NG" | "he-IL" | "hi-IN" | "hr-HR" | "ht-HT" | "hu-HU" | "hy-AM" | "id-ID" | "ik-US" | "is-IS" | "it" | "it-IT" | "iu-CA" | "ja" | "ja-JP" | "ja-KS" | "jv-ID" | "ka-GE" | "kk-KZ" | "km-KH" | "kn-IN" | "ko" | "ko-KR" | "ku-TR" | "ky-KG" | "lo-LA" | "lt-LT" | "lv-LV" | "mg-MG" | "mk-MK" | "ml-IN" | "mn-MN" | "mr-IN" | "ms-MY" | "mt-MT" | "my-MM" | "nb-NO" | "ne-NP" | "nl" | "nl-BE" | "nl-NL" | "nn-NO" | "or-IN" | "pa-IN" | "pl-PL" | "ps-AF" | "pt" | "pt-BR" | "pt-PT" | "ro-RO" | "ru" | "ru-RU" | "rw-RW" | "sc-IT" | "si-LK" | "sk-SK" | "sl-SI" | "sn-ZW" | "sq-AL" | "sr-RS" | "sv" | "sv-SE" | "sw-KE" | "sy-SY" | "sz-PL" | "ta-IN" | "te-IN" | "tg-TJ" | "th" | "th-TH" | "tl-PH" | "tr" | "tr-TR" | "tt-RU" | "tz-MA" | "uk-UA" | "ur-PK" | "uz-UZ" | "vi-VN" | "zh" | "zh-CN" | "zh-HK" | "zh-MO" | "zh-TW" | "zz-TR";
79
+ fallbackLanguage: "af-ZA" | "am-ET" | "ar" | "ar-AR" | "as-IN" | "az-AZ" | "be-BY" | "bg-BG" | "bn-IN" | "br-FR" | "bs-BA" | "ca-ES" | "cb-IQ" | "co-FR" | "cs" | "cs-CZ" | "cx-PH" | "cy-GB" | "da-DK" | "de" | "de-DE" | "el-GR" | "en" | "en-GB" | "en-US" | "eo-EO" | "es" | "es-ES" | "es-419" | "es-MX" | "et-EE" | "eu-ES" | "fa-IR" | "ff-NG" | "fi" | "fi-FI" | "fo-FO" | "fr" | "fr-CA" | "fr-FR" | "fy-NL" | "ga-IE" | "gl-ES" | "gn-PY" | "gu-IN" | "ha-NG" | "he-IL" | "hi-IN" | "hr-HR" | "ht-HT" | "hu-HU" | "hy-AM" | "id-ID" | "ik-US" | "is-IS" | "it" | "it-IT" | "iu-CA" | "ja" | "ja-JP" | "ja-KS" | "jv-ID" | "ka-GE" | "kk-KZ" | "km-KH" | "kn-IN" | "ko" | "ko-KR" | "ku-TR" | "ky-KG" | "lo-LA" | "lt-LT" | "lv-LV" | "mg-MG" | "mk-MK" | "ml-IN" | "mn-MN" | "mr-IN" | "ms-MY" | "mt-MT" | "my-MM" | "nb-NO" | "ne-NP" | "nl" | "nl-BE" | "nl-NL" | "nn-NO" | "or-IN" | "pa-IN" | "pl-PL" | "ps-AF" | "pt" | "pt-BR" | "pt-PT" | "ro-RO" | "ru" | "ru-RU" | "rw-RW" | "sc-IT" | "si-LK" | "sk-SK" | "sl-SI" | "sn-ZW" | "sq-AL" | "sr-RS" | "sv" | "sv-SE" | "sw-KE" | "sy-SY" | "sz-PL" | "ta-IN" | "te-IN" | "tg-TJ" | "th" | "th-TH" | "tl-PH" | "tr" | "tr-TR" | "tt-RU" | "tz-MA" | "uk-UA" | "ur-PK" | "uz-UZ" | "vi-VN" | "zh" | "zh-CN" | "zh-HK" | "zh-MO" | "zh-TW" | "zz-TR";
78
80
  }>;
79
81
  termsOfUseUrl: z.ZodType<string | null, z.ZodTypeDef, string | null>;
80
82
  privacyPolicyUrl: z.ZodType<string | null, z.ZodTypeDef, string | null>;
@@ -139,6 +141,7 @@ export declare const fullSignInExperienceGuard: z.ZodObject<Omit<{
139
141
  }>;
140
142
  mfa: z.ZodType<import("../foundations/jsonb-types/sign-in-experience.js").Mfa, z.ZodTypeDef, import("../foundations/jsonb-types/sign-in-experience.js").Mfa>;
141
143
  adaptiveMfa: z.ZodType<import("../foundations/jsonb-types/sign-in-experience.js").AdaptiveMfa, z.ZodTypeDef, import("../foundations/jsonb-types/sign-in-experience.js").AdaptiveMfa>;
144
+ trustedDevice: z.ZodType<import("../foundations/jsonb-types/sign-in-experience.js").TrustedDevicePolicy, z.ZodTypeDef, import("../foundations/jsonb-types/sign-in-experience.js").TrustedDevicePolicy>;
142
145
  singleSignOnEnabled: z.ZodType<boolean, z.ZodTypeDef, boolean>;
143
146
  supportEmail: z.ZodType<string | null, z.ZodTypeDef, string | null>;
144
147
  supportWebsiteUrl: z.ZodType<string | null, z.ZodTypeDef, string | null>;
@@ -160,7 +163,8 @@ export declare const fullSignInExperienceGuard: z.ZodObject<Omit<{
160
163
  }[] | null>;
161
164
  passwordExpiration: z.ZodType<import("../foundations/jsonb-types/sign-in-experience.js").PasswordExpirationPolicy, z.ZodTypeDef, import("../foundations/jsonb-types/sign-in-experience.js").PasswordExpirationPolicy>;
162
165
  usernamePolicy: z.ZodType<import("../foundations/jsonb-types/index.js").UsernamePolicy, z.ZodTypeDef, import("../foundations/jsonb-types/index.js").UsernamePolicy>;
163
- }, "emailBlocklistPolicy" | "forgotPasswordMethods"> & {
166
+ }, "trustedDevice" | "emailBlocklistPolicy" | "forgotPasswordMethods"> & {
167
+ trustedDevice: z.ZodOptional<z.ZodType<import("../foundations/jsonb-types/sign-in-experience.js").TrustedDevicePolicy, z.ZodTypeDef, import("../foundations/jsonb-types/sign-in-experience.js").TrustedDevicePolicy>>;
164
168
  socialConnectors: z.ZodArray<z.ZodObject<Omit<{
165
169
  id: z.ZodString;
166
170
  target: z.ZodString;
@@ -393,6 +397,7 @@ export declare const fullSignInExperienceGuard: z.ZodObject<Omit<{
393
397
  es?: string | undefined;
394
398
  "es-ES"?: string | undefined;
395
399
  "es-419"?: string | undefined;
400
+ "es-MX"?: string | undefined;
396
401
  "et-EE"?: string | undefined;
397
402
  "eu-ES"?: string | undefined;
398
403
  "fa-IR"?: string | undefined;
@@ -534,6 +539,7 @@ export declare const fullSignInExperienceGuard: z.ZodObject<Omit<{
534
539
  es?: string | undefined;
535
540
  "es-ES"?: string | undefined;
536
541
  "es-419"?: string | undefined;
542
+ "es-MX"?: string | undefined;
537
543
  "et-EE"?: string | undefined;
538
544
  "eu-ES"?: string | undefined;
539
545
  "fa-IR"?: string | undefined;
@@ -680,15 +686,15 @@ export declare const fullSignInExperienceGuard: z.ZodObject<Omit<{
680
686
  clientId: z.ZodString;
681
687
  connectorId: z.ZodString;
682
688
  }, "strip", z.ZodTypeAny, {
683
- connectorId: string;
684
689
  clientId: string;
690
+ connectorId: string;
685
691
  isEnabled?: boolean | undefined;
686
692
  autoSelect?: boolean | undefined;
687
693
  closeOnTapOutside?: boolean | undefined;
688
694
  itpSupport?: boolean | undefined;
689
695
  }, {
690
- connectorId: string;
691
696
  clientId: string;
697
+ connectorId: string;
692
698
  isEnabled?: boolean | undefined;
693
699
  autoSelect?: boolean | undefined;
694
700
  closeOnTapOutside?: boolean | undefined;
@@ -777,6 +783,7 @@ export declare const fullSignInExperienceGuard: z.ZodObject<Omit<{
777
783
  es?: string | undefined;
778
784
  "es-ES"?: string | undefined;
779
785
  "es-419"?: string | undefined;
786
+ "es-MX"?: string | undefined;
780
787
  "et-EE"?: string | undefined;
781
788
  "eu-ES"?: string | undefined;
782
789
  "fa-IR"?: string | undefined;
@@ -899,9 +906,10 @@ export declare const fullSignInExperienceGuard: z.ZodObject<Omit<{
899
906
  };
900
907
  isDevelopmentTenant: boolean;
901
908
  customProfileFields: CustomProfileField[];
909
+ trustedDevice?: import("../foundations/jsonb-types/sign-in-experience.js").TrustedDevicePolicy | undefined;
902
910
  googleOneTap?: {
903
- connectorId: string;
904
911
  clientId: string;
912
+ connectorId: string;
905
913
  isEnabled?: boolean | undefined;
906
914
  autoSelect?: boolean | undefined;
907
915
  closeOnTapOutside?: boolean | undefined;
@@ -979,6 +987,7 @@ export declare const fullSignInExperienceGuard: z.ZodObject<Omit<{
979
987
  es?: string | undefined;
980
988
  "es-ES"?: string | undefined;
981
989
  "es-419"?: string | undefined;
990
+ "es-MX"?: string | undefined;
982
991
  "et-EE"?: string | undefined;
983
992
  "eu-ES"?: string | undefined;
984
993
  "fa-IR"?: string | undefined;
@@ -1101,9 +1110,10 @@ export declare const fullSignInExperienceGuard: z.ZodObject<Omit<{
1101
1110
  };
1102
1111
  isDevelopmentTenant: boolean;
1103
1112
  customProfileFields: CustomProfileField[];
1113
+ trustedDevice?: import("../foundations/jsonb-types/sign-in-experience.js").TrustedDevicePolicy | undefined;
1104
1114
  googleOneTap?: {
1105
- connectorId: string;
1106
1115
  clientId: string;
1116
+ connectorId: string;
1107
1117
  isEnabled?: boolean | undefined;
1108
1118
  autoSelect?: boolean | undefined;
1109
1119
  closeOnTapOutside?: boolean | undefined;
@@ -4,8 +4,9 @@ import { CustomProfileFields, SignInExperiences, } from '../db-entries/index.js'
4
4
  import { CaptchaType, RecaptchaEnterpriseMode } from '../foundations/jsonb-types/index.js';
5
5
  import { ssoConnectorMetadataGuard } from './sso-connector.js';
6
6
  export const fullSignInExperienceGuard = SignInExperiences.guard
7
- .omit({ emailBlocklistPolicy: true, forgotPasswordMethods: true })
7
+ .omit({ emailBlocklistPolicy: true, forgotPasswordMethods: true, trustedDevice: true })
8
8
  .extend({
9
+ trustedDevice: SignInExperiences.guard.shape.trustedDevice.optional(),
9
10
  socialConnectors: connectorMetadataGuard
10
11
  .omit({
11
12
  description: true,
@@ -198,14 +198,14 @@ export declare const demoSocialDataGuard: z.ZodArray<z.ZodObject<{
198
198
  }, "strip", z.ZodTypeAny, {
199
199
  name: string;
200
200
  logo: string;
201
- logoDark: string;
202
201
  clientId: string;
202
+ logoDark: string;
203
203
  provider: DemoSocialProvider;
204
204
  }, {
205
205
  name: string;
206
206
  logo: string;
207
- logoDark: string;
208
207
  clientId: string;
208
+ logoDark: string;
209
209
  provider: DemoSocialProvider;
210
210
  }>, "many">;
211
211
  export type DemoSocialData = z.infer<typeof demoSocialDataGuard>;
@@ -0,0 +1,67 @@
1
+ import { z } from 'zod';
2
+ /** Public trusted-device metadata returned by user management APIs. */
3
+ export declare const trustedDeviceResponseGuard: z.ZodObject<Pick<{
4
+ tenantId: z.ZodType<string, z.ZodTypeDef, string>;
5
+ id: z.ZodType<string, z.ZodTypeDef, string>;
6
+ userId: z.ZodType<string, z.ZodTypeDef, string>;
7
+ secretHash: z.ZodType<Buffer, z.ZodTypeDef, Buffer>;
8
+ userAgent: z.ZodType<string | null, z.ZodTypeDef, string | null>;
9
+ ip: z.ZodType<string | null, z.ZodTypeDef, string | null>;
10
+ country: z.ZodType<string | null, z.ZodTypeDef, string | null>;
11
+ city: z.ZodType<string | null, z.ZodTypeDef, string | null>;
12
+ createdAt: z.ZodType<number, z.ZodTypeDef, number>;
13
+ lastUsedAt: z.ZodType<number, z.ZodTypeDef, number>;
14
+ expiresAt: z.ZodType<number, z.ZodTypeDef, number>;
15
+ }, "id" | "userAgent" | "createdAt" | "country" | "lastUsedAt" | "expiresAt" | "city">, "strip", z.ZodTypeAny, {
16
+ id: string;
17
+ userAgent: string | null;
18
+ createdAt: number;
19
+ country: string | null;
20
+ lastUsedAt: number;
21
+ expiresAt: number;
22
+ city: string | null;
23
+ }, {
24
+ id: string;
25
+ userAgent: string | null;
26
+ createdAt: number;
27
+ country: string | null;
28
+ lastUsedAt: number;
29
+ expiresAt: number;
30
+ city: string | null;
31
+ }>;
32
+ export type TrustedDeviceResponse = z.infer<typeof trustedDeviceResponseGuard>;
33
+ /** Account API trusted-device metadata with current-browser state. */
34
+ export declare const accountTrustedDeviceResponseGuard: z.ZodObject<Pick<{
35
+ tenantId: z.ZodType<string, z.ZodTypeDef, string>;
36
+ id: z.ZodType<string, z.ZodTypeDef, string>;
37
+ userId: z.ZodType<string, z.ZodTypeDef, string>;
38
+ secretHash: z.ZodType<Buffer, z.ZodTypeDef, Buffer>;
39
+ userAgent: z.ZodType<string | null, z.ZodTypeDef, string | null>;
40
+ ip: z.ZodType<string | null, z.ZodTypeDef, string | null>;
41
+ country: z.ZodType<string | null, z.ZodTypeDef, string | null>;
42
+ city: z.ZodType<string | null, z.ZodTypeDef, string | null>;
43
+ createdAt: z.ZodType<number, z.ZodTypeDef, number>;
44
+ lastUsedAt: z.ZodType<number, z.ZodTypeDef, number>;
45
+ expiresAt: z.ZodType<number, z.ZodTypeDef, number>;
46
+ }, "id" | "userAgent" | "createdAt" | "country" | "lastUsedAt" | "expiresAt" | "city"> & {
47
+ isCurrent: z.ZodBoolean;
48
+ }, "strip", z.ZodTypeAny, {
49
+ id: string;
50
+ userAgent: string | null;
51
+ createdAt: number;
52
+ country: string | null;
53
+ lastUsedAt: number;
54
+ expiresAt: number;
55
+ city: string | null;
56
+ isCurrent: boolean;
57
+ }, {
58
+ id: string;
59
+ userAgent: string | null;
60
+ createdAt: number;
61
+ country: string | null;
62
+ lastUsedAt: number;
63
+ expiresAt: number;
64
+ city: string | null;
65
+ isCurrent: boolean;
66
+ }>;
67
+ export type AccountTrustedDeviceResponse = z.infer<typeof accountTrustedDeviceResponseGuard>;
@@ -0,0 +1,16 @@
1
+ import { z } from 'zod';
2
+ import { TrustedDevices } from '../db-entries/index.js';
3
+ /** Public trusted-device metadata returned by user management APIs. */
4
+ export const trustedDeviceResponseGuard = TrustedDevices.guard.pick({
5
+ id: true,
6
+ userAgent: true,
7
+ country: true,
8
+ city: true,
9
+ createdAt: true,
10
+ lastUsedAt: true,
11
+ expiresAt: true,
12
+ });
13
+ /** Account API trusted-device metadata with current-browser state. */
14
+ export const accountTrustedDeviceResponseGuard = trustedDeviceResponseGuard.extend({
15
+ isCurrent: z.boolean(),
16
+ });