@logto/schemas 1.41.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 (151) hide show
  1. package/alterations/1.42.0-1783916980-add-domain-verification-files.ts +20 -0
  2. package/alterations/1.42.0-1784619793-add-service-logs-created-at-index.ts +33 -0
  3. package/alterations/1.42.0-1784620000-add-saml-sso-connector-signing-keys-table.ts +38 -0
  4. package/alterations/1.43.0-1785393731-add-oidc-model-instances-account-id-partial-index.ts +33 -0
  5. package/alterations/1.43.0-1785481546-add-tenant-aware-scope-indexes.ts +33 -0
  6. package/alterations/1.43.0-1785488115-add-cimd-permission-ceiling-tables.ts +77 -0
  7. package/alterations/1.43.0-1785722831-add-oidc-session-extensions-account-id-index.ts +27 -0
  8. package/alterations/1.43.0-1785835991-add-cimd-client-identifier-columns.ts +31 -0
  9. package/alterations/1.43.0-1786325989-add-cimd-grant-organizations-table.ts +54 -0
  10. package/alterations/1.43.0-1786333495-add-trusted-devices.ts +57 -0
  11. package/alterations/1.43.0-1786373004-tighten-cimd-grant-organizations-pkey.ts +28 -0
  12. package/alterations/1.43.0-1786414712-add-service-logs-email-indexes.ts +34 -0
  13. package/alterations/1.43.0-1786431364-add-cimd-grant-client-snapshots-table.ts +43 -0
  14. package/alterations/utils/1704934999-tables.ts +22 -1
  15. package/alterations-js/1.42.0-1783916980-add-domain-verification-files.js +16 -0
  16. package/alterations-js/1.42.0-1784619793-add-service-logs-created-at-index.js +29 -0
  17. package/alterations-js/1.42.0-1784620000-add-saml-sso-connector-signing-keys-table.js +33 -0
  18. package/alterations-js/1.43.0-1785393731-add-oidc-model-instances-account-id-partial-index.js +28 -0
  19. package/alterations-js/1.43.0-1785481546-add-tenant-aware-scope-indexes.js +28 -0
  20. package/alterations-js/1.43.0-1785488115-add-cimd-permission-ceiling-tables.js +69 -0
  21. package/alterations-js/1.43.0-1785722831-add-oidc-session-extensions-account-id-index.js +23 -0
  22. package/alterations-js/1.43.0-1785835991-add-cimd-client-identifier-columns.js +27 -0
  23. package/alterations-js/1.43.0-1786325989-add-cimd-grant-organizations-table.js +49 -0
  24. package/alterations-js/1.43.0-1786333495-add-trusted-devices.js +50 -0
  25. package/alterations-js/1.43.0-1786373004-tighten-cimd-grant-organizations-pkey.js +24 -0
  26. package/alterations-js/1.43.0-1786414712-add-service-logs-email-indexes.js +30 -0
  27. package/alterations-js/1.43.0-1786431364-add-cimd-grant-client-snapshots-table.js +38 -0
  28. package/alterations-js/utils/1704934999-tables.js +19 -1
  29. package/lib/consts/experience.d.ts +1 -0
  30. package/lib/consts/experience.js +1 -0
  31. package/lib/consts/index.d.ts +1 -0
  32. package/lib/consts/index.js +1 -0
  33. package/lib/consts/product-event.d.ts +5 -1
  34. package/lib/consts/product-event.js +4 -0
  35. package/lib/consts/social-state.d.ts +12 -0
  36. package/lib/consts/social-state.js +12 -0
  37. package/lib/db-entries/cimd-grant-client-snapshot.d.ts +32 -0
  38. package/lib/db-entries/cimd-grant-client-snapshot.js +45 -0
  39. package/lib/db-entries/cimd-grant-organization.d.ts +30 -0
  40. package/lib/db-entries/cimd-grant-organization.js +37 -0
  41. package/lib/db-entries/cimd-organization-resource-scope.d.ts +20 -0
  42. package/lib/db-entries/cimd-organization-resource-scope.js +25 -0
  43. package/lib/db-entries/cimd-organization-scope.d.ts +20 -0
  44. package/lib/db-entries/cimd-organization-scope.js +25 -0
  45. package/lib/db-entries/cimd-resource-scope.d.ts +20 -0
  46. package/lib/db-entries/cimd-resource-scope.js +25 -0
  47. package/lib/db-entries/cimd-user-scope.d.ts +20 -0
  48. package/lib/db-entries/cimd-user-scope.js +25 -0
  49. package/lib/db-entries/domain.d.ts +4 -2
  50. package/lib/db-entries/domain.js +5 -1
  51. package/lib/db-entries/index.d.ts +8 -0
  52. package/lib/db-entries/index.js +8 -0
  53. package/lib/db-entries/oidc-session-extension.d.ts +3 -1
  54. package/lib/db-entries/oidc-session-extension.js +4 -0
  55. package/lib/db-entries/organization.d.ts +5 -1
  56. package/lib/db-entries/organization.js +4 -0
  57. package/lib/db-entries/saml-sso-connector-signing-key.d.ts +32 -0
  58. package/lib/db-entries/saml-sso-connector-signing-key.js +49 -0
  59. package/lib/db-entries/sign-in-experience.d.ts +4 -2
  60. package/lib/db-entries/sign-in-experience.js +5 -1
  61. package/lib/db-entries/trusted-device.d.ts +36 -0
  62. package/lib/db-entries/trusted-device.js +62 -0
  63. package/lib/db-entries/user.d.ts +3 -1
  64. package/lib/db-entries/user.js +4 -0
  65. package/lib/foundations/jsonb-types/account-centers.d.ts +3 -0
  66. package/lib/foundations/jsonb-types/account-centers.js +1 -0
  67. package/lib/foundations/jsonb-types/account-centers.test.d.ts +1 -0
  68. package/lib/foundations/jsonb-types/account-centers.test.js +13 -0
  69. package/lib/foundations/jsonb-types/custom-domain.d.ts +57 -0
  70. package/lib/foundations/jsonb-types/custom-domain.js +51 -0
  71. package/lib/foundations/jsonb-types/custom-domain.test.d.ts +1 -0
  72. package/lib/foundations/jsonb-types/custom-domain.test.js +38 -0
  73. package/lib/foundations/jsonb-types/hooks.d.ts +9 -5
  74. package/lib/foundations/jsonb-types/hooks.js +8 -0
  75. package/lib/foundations/jsonb-types/logs.d.ts +18 -0
  76. package/lib/foundations/jsonb-types/logs.js +6 -0
  77. package/lib/foundations/jsonb-types/one-time-tokens.d.ts +5 -0
  78. package/lib/foundations/jsonb-types/one-time-tokens.js +2 -0
  79. package/lib/foundations/jsonb-types/sign-in-experience.d.ts +39 -4
  80. package/lib/foundations/jsonb-types/sign-in-experience.js +10 -0
  81. package/lib/foundations/jsonb-types/sign-in-experience.test.js +17 -1
  82. package/lib/types/application.d.ts +131 -1
  83. package/lib/types/application.js +8 -0
  84. package/lib/types/connector.d.ts +8 -0
  85. package/lib/types/consent.d.ts +16 -190
  86. package/lib/types/consent.js +10 -1
  87. package/lib/types/custom-profile-fields.d.ts +2 -1
  88. package/lib/types/domain.d.ts +9 -0
  89. package/lib/types/hook.d.ts +37 -5
  90. package/lib/types/index.d.ts +1 -0
  91. package/lib/types/index.js +1 -0
  92. package/lib/types/interaction-event.d.ts +11 -0
  93. package/lib/types/interaction-event.js +12 -0
  94. package/lib/types/interactions.d.ts +2 -11
  95. package/lib/types/interactions.js +2 -11
  96. package/lib/types/log/action.d.ts +7 -0
  97. package/lib/types/log/action.js +6 -0
  98. package/lib/types/log/index.d.ts +8 -2
  99. package/lib/types/log/index.js +2 -0
  100. package/lib/types/log/trusted-device.d.ts +7 -0
  101. package/lib/types/log/trusted-device.js +6 -0
  102. package/lib/types/logto-config/action.d.ts +963 -0
  103. package/lib/types/logto-config/action.js +77 -0
  104. package/lib/types/logto-config/index.d.ts +68 -26
  105. package/lib/types/logto-config/index.js +20 -7
  106. package/lib/types/logto-config/index.test.js +32 -9
  107. package/lib/types/logto-config/jwt-customizer.d.ts +60 -10
  108. package/lib/types/logto-config/jwt-customizer.js +1 -1
  109. package/lib/types/logto-config/oidc-provider.d.ts +2 -2
  110. package/lib/types/organization.d.ts +136 -1
  111. package/lib/types/organization.js +3 -2
  112. package/lib/types/service-log.d.ts +14 -1
  113. package/lib/types/service-log.js +13 -0
  114. package/lib/types/sign-in-experience.d.ts +18 -10
  115. package/lib/types/sign-in-experience.js +2 -1
  116. package/lib/types/sso-connector.d.ts +58 -0
  117. package/lib/types/sso-connector.js +12 -0
  118. package/lib/types/system.d.ts +2 -2
  119. package/lib/types/trusted-device.d.ts +67 -0
  120. package/lib/types/trusted-device.js +16 -0
  121. package/lib/types/user-sessions.d.ts +117 -238
  122. package/lib/types/user-sessions.js +9 -4
  123. package/lib/types/user.d.ts +10 -3
  124. package/lib/types/user.js +1 -0
  125. package/lib/types/verification-records/one-time-token-verification.d.ts +5 -0
  126. package/lib/utils/cimd.d.ts +14 -0
  127. package/lib/utils/cimd.js +14 -0
  128. package/lib/utils/cimd.test.d.ts +1 -0
  129. package/lib/utils/cimd.test.js +9 -0
  130. package/lib/utils/index.d.ts +1 -0
  131. package/lib/utils/index.js +1 -0
  132. package/package.json +7 -7
  133. package/tables/cimd_grant_client_snapshots.sql +27 -0
  134. package/tables/cimd_grant_organizations.sql +38 -0
  135. package/tables/cimd_organization_resource_scopes.sql +16 -0
  136. package/tables/cimd_organization_scopes.sql +15 -0
  137. package/tables/cimd_resource_scopes.sql +15 -0
  138. package/tables/cimd_user_scopes.sql +13 -0
  139. package/tables/domains.sql +1 -0
  140. package/tables/oidc_model_instances.sql +5 -0
  141. package/tables/oidc_session_extensions.sql +5 -0
  142. package/tables/organization_scopes.sql +4 -0
  143. package/tables/organizations.sql +2 -0
  144. package/tables/saml_sso_connector_signing_keys.sql +21 -0
  145. package/tables/scopes.sql +4 -0
  146. package/tables/service_logs.sql +19 -0
  147. package/tables/sign_in_experiences.sql +1 -0
  148. package/tables/trusted_devices.sql +25 -0
  149. package/tables/users.sql +1 -0
  150. package/lib/types/logto-config/inline-hook.d.ts +0 -76
  151. package/lib/types/logto-config/inline-hook.js +0 -25
@@ -1,6 +1,19 @@
1
+ /**
2
+ * Types of `service_logs` rows. The rows are written by the Logto Cloud service; some members
3
+ * are cloud-only concepts kept here so every type shares this single definition.
4
+ */
1
5
  export var ServiceLogType;
2
6
  (function (ServiceLogType) {
3
7
  ServiceLogType["SendEmail"] = "sendEmail";
4
8
  ServiceLogType["SendSms"] = "sendSms";
9
+ /** Cloud-only: custom JWT worker invocations. */
5
10
  ServiceLogType["FetchCustomJwt"] = "fetchCustomJwt";
11
+ /**
12
+ * Cloud-only: a hosted-email send that failed at the provider; the payload carries the
13
+ * normalized provider error. Deliberately distinct from {@link ServiceLogType.SendEmail}:
14
+ * usage counting matches on that exact type, so failed sends never count toward email usage.
15
+ */
16
+ ServiceLogType["SendEmailFailed"] = "sendEmailFailed";
17
+ /** Cloud-only: an Actions script run on the script runner. Mirrors the `runAction` entry. */
18
+ ServiceLogType["RunAction"] = "runAction";
6
19
  })(ServiceLogType || (ServiceLogType = {}));
@@ -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, '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
- }, "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;
@@ -740,7 +746,6 @@ export declare const fullSignInExperienceGuard: z.ZodObject<Omit<{
740
746
  unknownSessionRedirectUrl: string | null;
741
747
  captchaPolicy: import("../foundations/jsonb-types/sign-in-experience.js").CaptchaPolicy;
742
748
  sentinelPolicy: import("../foundations/jsonb-types/sign-in-experience.js").SentinelPolicy;
743
- emailBlocklistPolicy: import("../foundations/jsonb-types/sign-in-experience.js").EmailBlocklistPolicy;
744
749
  verificationCodePolicy: import("../foundations/jsonb-types/sign-in-experience.js").VerificationCodePolicy;
745
750
  passkeySignIn: import("../foundations/jsonb-types/sign-in-experience.js").PasskeySignIn;
746
751
  signUpProfileFields: import("../foundations/jsonb-types/sign-in-experience.js").SignUpProfileFields | null;
@@ -778,6 +783,7 @@ export declare const fullSignInExperienceGuard: z.ZodObject<Omit<{
778
783
  es?: string | undefined;
779
784
  "es-ES"?: string | undefined;
780
785
  "es-419"?: string | undefined;
786
+ "es-MX"?: string | undefined;
781
787
  "et-EE"?: string | undefined;
782
788
  "eu-ES"?: string | undefined;
783
789
  "fa-IR"?: string | undefined;
@@ -900,9 +906,10 @@ export declare const fullSignInExperienceGuard: z.ZodObject<Omit<{
900
906
  };
901
907
  isDevelopmentTenant: boolean;
902
908
  customProfileFields: CustomProfileField[];
909
+ trustedDevice?: import("../foundations/jsonb-types/sign-in-experience.js").TrustedDevicePolicy | undefined;
903
910
  googleOneTap?: {
904
- connectorId: string;
905
911
  clientId: string;
912
+ connectorId: string;
906
913
  isEnabled?: boolean | undefined;
907
914
  autoSelect?: boolean | undefined;
908
915
  closeOnTapOutside?: boolean | undefined;
@@ -943,7 +950,6 @@ export declare const fullSignInExperienceGuard: z.ZodObject<Omit<{
943
950
  unknownSessionRedirectUrl: string | null;
944
951
  captchaPolicy: import("../foundations/jsonb-types/sign-in-experience.js").CaptchaPolicy;
945
952
  sentinelPolicy: import("../foundations/jsonb-types/sign-in-experience.js").SentinelPolicy;
946
- emailBlocklistPolicy: import("../foundations/jsonb-types/sign-in-experience.js").EmailBlocklistPolicy;
947
953
  verificationCodePolicy: import("../foundations/jsonb-types/sign-in-experience.js").VerificationCodePolicy;
948
954
  passkeySignIn: import("../foundations/jsonb-types/sign-in-experience.js").PasskeySignIn;
949
955
  signUpProfileFields: import("../foundations/jsonb-types/sign-in-experience.js").SignUpProfileFields | null;
@@ -981,6 +987,7 @@ export declare const fullSignInExperienceGuard: z.ZodObject<Omit<{
981
987
  es?: string | undefined;
982
988
  "es-ES"?: string | undefined;
983
989
  "es-419"?: string | undefined;
990
+ "es-MX"?: string | undefined;
984
991
  "et-EE"?: string | undefined;
985
992
  "eu-ES"?: string | undefined;
986
993
  "fa-IR"?: string | undefined;
@@ -1103,9 +1110,10 @@ export declare const fullSignInExperienceGuard: z.ZodObject<Omit<{
1103
1110
  };
1104
1111
  isDevelopmentTenant: boolean;
1105
1112
  customProfileFields: CustomProfileField[];
1113
+ trustedDevice?: import("../foundations/jsonb-types/sign-in-experience.js").TrustedDevicePolicy | undefined;
1106
1114
  googleOneTap?: {
1107
- connectorId: string;
1108
1115
  clientId: string;
1116
+ connectorId: string;
1109
1117
  isEnabled?: boolean | undefined;
1110
1118
  autoSelect?: boolean | undefined;
1111
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({ 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,
@@ -168,4 +168,62 @@ export declare const extendedSocialUserInfoGuard: z.ZodObject<{
168
168
  rawData: z.ZodOptional<z.ZodType<import("@withtyped/server").Json, z.ZodTypeDef, import("@withtyped/server").Json>>;
169
169
  }, z.ZodUnknown, "strip">>;
170
170
  export type ExtendedSocialUserInfo = z.infer<typeof extendedSocialUserInfoGuard>;
171
+ export declare const samlSsoConnectorSigningKeyResponseGuard: z.ZodObject<Omit<{
172
+ id: z.ZodType<string, z.ZodTypeDef, string>;
173
+ tenantId: z.ZodType<string, z.ZodTypeDef, string>;
174
+ ssoConnectorId: z.ZodType<string, z.ZodTypeDef, string>;
175
+ privateKey: z.ZodType<string, z.ZodTypeDef, string>;
176
+ certificate: z.ZodType<string, z.ZodTypeDef, string>;
177
+ createdAt: z.ZodType<number, z.ZodTypeDef, number>;
178
+ expiresAt: z.ZodType<number, z.ZodTypeDef, number>;
179
+ active: z.ZodType<boolean, z.ZodTypeDef, boolean>;
180
+ }, "tenantId" | "ssoConnectorId" | "privateKey"> & {
181
+ fingerprints: z.ZodObject<{
182
+ sha256: z.ZodObject<{
183
+ formatted: z.ZodString;
184
+ unformatted: z.ZodString;
185
+ }, "strip", z.ZodTypeAny, {
186
+ formatted: string;
187
+ unformatted: string;
188
+ }, {
189
+ formatted: string;
190
+ unformatted: string;
191
+ }>;
192
+ }, "strip", z.ZodTypeAny, {
193
+ sha256: {
194
+ formatted: string;
195
+ unformatted: string;
196
+ };
197
+ }, {
198
+ sha256: {
199
+ formatted: string;
200
+ unformatted: string;
201
+ };
202
+ }>;
203
+ }, "strip", z.ZodTypeAny, {
204
+ id: string;
205
+ createdAt: number;
206
+ certificate: string;
207
+ active: boolean;
208
+ expiresAt: number;
209
+ fingerprints: {
210
+ sha256: {
211
+ formatted: string;
212
+ unformatted: string;
213
+ };
214
+ };
215
+ }, {
216
+ id: string;
217
+ createdAt: number;
218
+ certificate: string;
219
+ active: boolean;
220
+ expiresAt: number;
221
+ fingerprints: {
222
+ sha256: {
223
+ formatted: string;
224
+ unformatted: string;
225
+ };
226
+ };
227
+ }>;
228
+ export type SamlSsoConnectorSigningKeyResponse = z.infer<typeof samlSsoConnectorSigningKeyResponseGuard>;
171
229
  export {};
@@ -1,6 +1,8 @@
1
1
  import { socialUserInfoGuard } from '@logto/connector-kit';
2
2
  import { z } from 'zod';
3
+ import { SamlSsoConnectorSigningKeys } from '../db-entries/saml-sso-connector-signing-key.js';
3
4
  import { SsoConnectors } from '../db-entries/sso-connector.js';
5
+ import { certificateFingerprintsGuard } from './saml-application.js';
4
6
  /**
5
7
  * SSO Connector data type that are returned to the experience client for sign-in use.
6
8
  */
@@ -76,3 +78,13 @@ export var SsoAuthenticationQueryKey;
76
78
  })(SsoAuthenticationQueryKey || (SsoAuthenticationQueryKey = {}));
77
79
  // Saml assertion returned user attribute value
78
80
  export const extendedSocialUserInfoGuard = socialUserInfoGuard.catchall(z.unknown());
81
+ // Make sure the `privateKey` is not exposed in the response.
82
+ export const samlSsoConnectorSigningKeyResponseGuard = SamlSsoConnectorSigningKeys.guard
83
+ .omit({
84
+ tenantId: true,
85
+ ssoConnectorId: true,
86
+ privateKey: true,
87
+ })
88
+ .extend({
89
+ fingerprints: certificateFingerprintsGuard,
90
+ });
@@ -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
+ });