@logto/schemas 1.42.0 → 1.44.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.
- package/alterations/1.43.0-1785393731-add-oidc-model-instances-account-id-partial-index.ts +33 -0
- package/alterations/1.43.0-1785481546-add-tenant-aware-scope-indexes.ts +33 -0
- package/alterations/1.43.0-1785488115-add-cimd-permission-ceiling-tables.ts +77 -0
- package/alterations/1.43.0-1785722831-add-oidc-session-extensions-account-id-index.ts +27 -0
- package/alterations/1.43.0-1785835991-add-cimd-client-identifier-columns.ts +31 -0
- package/alterations/1.43.0-1786325989-add-cimd-grant-organizations-table.ts +54 -0
- package/alterations/1.43.0-1786333495-add-trusted-devices.ts +57 -0
- package/alterations/1.43.0-1786373004-tighten-cimd-grant-organizations-pkey.ts +28 -0
- package/alterations/1.43.0-1786414712-add-service-logs-email-indexes.ts +34 -0
- package/alterations/1.43.0-1786431364-add-cimd-grant-client-snapshots-table.ts +43 -0
- package/alterations/1.44.0-1788946735-add-saml-authn-request-config.ts +18 -0
- package/alterations/1.44.0-1789000000-extend-user-id-length.ts +61 -0
- package/alterations-js/1.43.0-1785393731-add-oidc-model-instances-account-id-partial-index.js +28 -0
- package/alterations-js/1.43.0-1785481546-add-tenant-aware-scope-indexes.js +28 -0
- package/alterations-js/1.43.0-1785488115-add-cimd-permission-ceiling-tables.js +69 -0
- package/alterations-js/1.43.0-1785722831-add-oidc-session-extensions-account-id-index.js +23 -0
- package/alterations-js/1.43.0-1785835991-add-cimd-client-identifier-columns.js +27 -0
- package/alterations-js/1.43.0-1786325989-add-cimd-grant-organizations-table.js +49 -0
- package/alterations-js/1.43.0-1786333495-add-trusted-devices.js +50 -0
- package/alterations-js/1.43.0-1786373004-tighten-cimd-grant-organizations-pkey.js +24 -0
- package/alterations-js/1.43.0-1786414712-add-service-logs-email-indexes.js +30 -0
- package/alterations-js/1.43.0-1786431364-add-cimd-grant-client-snapshots-table.js +38 -0
- package/alterations-js/1.44.0-1788946735-add-saml-authn-request-config.js +14 -0
- package/alterations-js/1.44.0-1789000000-extend-user-id-length.js +47 -0
- package/lib/consts/experience.d.ts +3 -0
- package/lib/consts/experience.js +3 -0
- package/lib/consts/index.d.ts +2 -0
- package/lib/consts/index.js +2 -0
- package/lib/consts/license.d.ts +222 -0
- package/lib/consts/license.js +81 -0
- package/lib/consts/license.test.d.ts +1 -0
- package/lib/consts/license.test.js +96 -0
- package/lib/consts/oidc.d.ts +15 -1
- package/lib/consts/oidc.js +11 -0
- package/lib/consts/oidc.test.d.ts +1 -0
- package/lib/consts/oidc.test.js +15 -0
- package/lib/consts/product-event.d.ts +5 -1
- package/lib/consts/product-event.js +4 -0
- package/lib/consts/social-state.d.ts +12 -0
- package/lib/consts/social-state.js +12 -0
- package/lib/consts/subscriptions.d.ts +13 -1
- package/lib/consts/subscriptions.js +12 -0
- package/lib/db-entries/aggregated-daily-active-user.js +2 -2
- package/lib/db-entries/application-access-control-user-relation.js +2 -2
- package/lib/db-entries/application-user-consent-organization.js +2 -2
- package/lib/db-entries/cimd-grant-client-snapshot.d.ts +32 -0
- package/lib/db-entries/cimd-grant-client-snapshot.js +45 -0
- package/lib/db-entries/cimd-grant-organization.d.ts +30 -0
- package/lib/db-entries/cimd-grant-organization.js +37 -0
- package/lib/db-entries/cimd-organization-resource-scope.d.ts +20 -0
- package/lib/db-entries/cimd-organization-resource-scope.js +25 -0
- package/lib/db-entries/cimd-organization-scope.d.ts +20 -0
- package/lib/db-entries/cimd-organization-scope.js +25 -0
- package/lib/db-entries/cimd-resource-scope.d.ts +20 -0
- package/lib/db-entries/cimd-resource-scope.js +25 -0
- package/lib/db-entries/cimd-user-scope.d.ts +20 -0
- package/lib/db-entries/cimd-user-scope.js +25 -0
- package/lib/db-entries/daily-active-user.js +2 -2
- package/lib/db-entries/index.d.ts +7 -0
- package/lib/db-entries/index.js +7 -0
- package/lib/db-entries/oidc-session-extension.d.ts +3 -1
- package/lib/db-entries/oidc-session-extension.js +6 -2
- package/lib/db-entries/organization-invitation.js +4 -4
- package/lib/db-entries/organization-role-user-relation.js +2 -2
- package/lib/db-entries/organization-user-relation.js +2 -2
- package/lib/db-entries/organization.d.ts +5 -1
- package/lib/db-entries/organization.js +4 -0
- package/lib/db-entries/personal-access-token.js +2 -2
- package/lib/db-entries/saml-application-config.d.ts +4 -2
- package/lib/db-entries/saml-application-config.js +5 -1
- package/lib/db-entries/secret.js +2 -2
- package/lib/db-entries/sign-in-experience.d.ts +4 -2
- package/lib/db-entries/sign-in-experience.js +5 -1
- package/lib/db-entries/subject-token.js +2 -2
- package/lib/db-entries/trusted-device.d.ts +36 -0
- package/lib/db-entries/trusted-device.js +62 -0
- package/lib/db-entries/user-geo-location.js +2 -2
- package/lib/db-entries/user-sign-in-country.js +2 -2
- package/lib/db-entries/user-sso-identity.js +2 -2
- package/lib/db-entries/user.d.ts +3 -1
- package/lib/db-entries/user.js +6 -2
- package/lib/db-entries/users-role.js +2 -2
- package/lib/db-entries/verification-record.js +2 -2
- package/lib/db-entries/verification-status.js +2 -2
- package/lib/foundations/jsonb-types/account-centers.d.ts +3 -0
- package/lib/foundations/jsonb-types/account-centers.js +1 -0
- package/lib/foundations/jsonb-types/account-centers.test.d.ts +1 -0
- package/lib/foundations/jsonb-types/account-centers.test.js +13 -0
- package/lib/foundations/jsonb-types/captcha.d.ts +47 -1
- package/lib/foundations/jsonb-types/captcha.js +20 -0
- package/lib/foundations/jsonb-types/hooks.d.ts +5 -4
- package/lib/foundations/jsonb-types/hooks.js +3 -0
- package/lib/foundations/jsonb-types/logs.d.ts +18 -0
- package/lib/foundations/jsonb-types/logs.js +6 -0
- package/lib/foundations/jsonb-types/saml-application-configs.d.ts +23 -0
- package/lib/foundations/jsonb-types/saml-application-configs.js +16 -0
- package/lib/foundations/jsonb-types/saml-application-configs.test.js +24 -1
- package/lib/foundations/jsonb-types/sign-in-experience.d.ts +23 -3
- package/lib/foundations/jsonb-types/sign-in-experience.js +9 -0
- package/lib/foundations/jsonb-types/sign-in-experience.test.js +17 -1
- package/lib/types/authentication-context.d.ts +224 -0
- package/lib/types/authentication-context.js +238 -0
- package/lib/types/authentication-context.test.d.ts +1 -0
- package/lib/types/authentication-context.test.js +186 -0
- package/lib/types/connector.d.ts +8 -0
- package/lib/types/consent.d.ts +16 -190
- package/lib/types/consent.js +10 -1
- package/lib/types/cookie.d.ts +4 -0
- package/lib/types/cookie.js +6 -1
- package/lib/types/custom-profile-fields.d.ts +1 -0
- package/lib/types/hook.d.ts +31 -6
- package/lib/types/index.d.ts +2 -0
- package/lib/types/index.js +2 -0
- package/lib/types/interactions.d.ts +161 -0
- package/lib/types/interactions.js +23 -0
- package/lib/types/log/index.d.ts +5 -2
- package/lib/types/log/index.js +1 -0
- package/lib/types/log/interaction.d.ts +15 -2
- package/lib/types/log/interaction.js +5 -0
- package/lib/types/log/trusted-device.d.ts +7 -0
- package/lib/types/log/trusted-device.js +6 -0
- package/lib/types/logto-config/action.d.ts +1 -1
- package/lib/types/logto-config/action.js +1 -1
- package/lib/types/logto-config/index.d.ts +83 -7
- package/lib/types/logto-config/index.js +14 -0
- package/lib/types/logto-config/index.test.js +23 -0
- package/lib/types/logto-config/jwt-customizer.d.ts +123 -10
- package/lib/types/logto-config/jwt-customizer.js +1 -1
- package/lib/types/logto-config/oidc-provider.d.ts +2 -2
- package/lib/types/saml-application.d.ts +55 -1
- package/lib/types/saml-application.js +7 -1
- package/lib/types/service-log.d.ts +14 -1
- package/lib/types/service-log.js +13 -0
- package/lib/types/sign-in-experience.d.ts +20 -6
- package/lib/types/sign-in-experience.js +1 -0
- package/lib/types/ssr.d.ts +2 -0
- package/lib/types/system.d.ts +59 -7
- package/lib/types/system.js +36 -0
- package/lib/types/system.test.d.ts +1 -0
- package/lib/types/system.test.js +26 -0
- package/lib/types/trusted-device.d.ts +67 -0
- package/lib/types/trusted-device.js +16 -0
- package/lib/types/user-sessions.d.ts +195 -209
- package/lib/types/user-sessions.js +9 -4
- package/lib/types/user.d.ts +10 -3
- package/lib/types/user.js +1 -0
- package/lib/types/verification-records/code-verification.d.ts +17 -0
- package/lib/types/verification-records/code-verification.js +1 -0
- package/lib/utils/cimd.d.ts +14 -0
- package/lib/utils/cimd.js +14 -0
- package/lib/utils/cimd.test.d.ts +1 -0
- package/lib/utils/cimd.test.js +9 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +1 -0
- package/lib/utils/oidc-private-key.test.js +44 -0
- package/package.json +9 -9
- package/tables/aggregated_daily_active_users.sql +1 -1
- package/tables/application_access_control_user_relations.sql +1 -1
- package/tables/application_user_consent_organizations.sql +1 -1
- package/tables/cimd_grant_client_snapshots.sql +27 -0
- package/tables/cimd_grant_organizations.sql +38 -0
- package/tables/cimd_organization_resource_scopes.sql +16 -0
- package/tables/cimd_organization_scopes.sql +15 -0
- package/tables/cimd_resource_scopes.sql +15 -0
- package/tables/cimd_user_scopes.sql +13 -0
- package/tables/daily_active_users.sql +1 -1
- package/tables/oidc_model_instances.sql +5 -0
- package/tables/oidc_session_extensions.sql +6 -1
- package/tables/organization_invitations.sql +2 -2
- package/tables/organization_role_user_relations.sql +1 -1
- package/tables/organization_scopes.sql +4 -0
- package/tables/organization_user_relations.sql +1 -1
- package/tables/organizations.sql +2 -0
- package/tables/personal_access_tokens.sql +1 -1
- package/tables/saml_application_configs.sql +1 -0
- package/tables/scopes.sql +4 -0
- package/tables/secrets.sql +1 -1
- package/tables/service_logs.sql +14 -0
- package/tables/sign_in_experiences.sql +1 -0
- package/tables/subject_tokens.sql +1 -1
- package/tables/trusted_devices.sql +25 -0
- package/tables/user_geo_locations.sql +1 -1
- package/tables/user_sign_in_countries.sql +1 -1
- package/tables/user_sso_identities.sql +1 -1
- package/tables/users.sql +2 -1
- package/tables/users_roles.sql +1 -1
- package/tables/verification_records.sql +1 -1
- package/tables/verification_statuses.sql +1 -1
- package/LICENSE +0 -373
package/lib/types/connector.d.ts
CHANGED
|
@@ -255,6 +255,7 @@ export declare const connectorResponseGuard: z.ZodObject<{
|
|
|
255
255
|
es?: string | undefined;
|
|
256
256
|
"es-ES"?: string | undefined;
|
|
257
257
|
"es-419"?: string | undefined;
|
|
258
|
+
"es-MX"?: string | undefined;
|
|
258
259
|
"et-EE"?: string | undefined;
|
|
259
260
|
"eu-ES"?: string | undefined;
|
|
260
261
|
"fa-IR"?: string | undefined;
|
|
@@ -389,6 +390,7 @@ export declare const connectorResponseGuard: z.ZodObject<{
|
|
|
389
390
|
es?: string | undefined;
|
|
390
391
|
"es-ES"?: string | undefined;
|
|
391
392
|
"es-419"?: string | undefined;
|
|
393
|
+
"es-MX"?: string | undefined;
|
|
392
394
|
"et-EE"?: string | undefined;
|
|
393
395
|
"eu-ES"?: string | undefined;
|
|
394
396
|
"fa-IR"?: string | undefined;
|
|
@@ -593,6 +595,7 @@ export declare const connectorResponseGuard: z.ZodObject<{
|
|
|
593
595
|
es?: string | undefined;
|
|
594
596
|
"es-ES"?: string | undefined;
|
|
595
597
|
"es-419"?: string | undefined;
|
|
598
|
+
"es-MX"?: string | undefined;
|
|
596
599
|
"et-EE"?: string | undefined;
|
|
597
600
|
"eu-ES"?: string | undefined;
|
|
598
601
|
"fa-IR"?: string | undefined;
|
|
@@ -727,6 +730,7 @@ export declare const connectorResponseGuard: z.ZodObject<{
|
|
|
727
730
|
es?: string | undefined;
|
|
728
731
|
"es-ES"?: string | undefined;
|
|
729
732
|
"es-419"?: string | undefined;
|
|
733
|
+
"es-MX"?: string | undefined;
|
|
730
734
|
"et-EE"?: string | undefined;
|
|
731
735
|
"eu-ES"?: string | undefined;
|
|
732
736
|
"fa-IR"?: string | undefined;
|
|
@@ -1136,6 +1140,7 @@ export declare const connectorFactoryResponseGuard: z.ZodObject<{
|
|
|
1136
1140
|
es?: string | undefined;
|
|
1137
1141
|
"es-ES"?: string | undefined;
|
|
1138
1142
|
"es-419"?: string | undefined;
|
|
1143
|
+
"es-MX"?: string | undefined;
|
|
1139
1144
|
"et-EE"?: string | undefined;
|
|
1140
1145
|
"eu-ES"?: string | undefined;
|
|
1141
1146
|
"fa-IR"?: string | undefined;
|
|
@@ -1270,6 +1275,7 @@ export declare const connectorFactoryResponseGuard: z.ZodObject<{
|
|
|
1270
1275
|
es?: string | undefined;
|
|
1271
1276
|
"es-ES"?: string | undefined;
|
|
1272
1277
|
"es-419"?: string | undefined;
|
|
1278
|
+
"es-MX"?: string | undefined;
|
|
1273
1279
|
"et-EE"?: string | undefined;
|
|
1274
1280
|
"eu-ES"?: string | undefined;
|
|
1275
1281
|
"fa-IR"?: string | undefined;
|
|
@@ -1467,6 +1473,7 @@ export declare const connectorFactoryResponseGuard: z.ZodObject<{
|
|
|
1467
1473
|
es?: string | undefined;
|
|
1468
1474
|
"es-ES"?: string | undefined;
|
|
1469
1475
|
"es-419"?: string | undefined;
|
|
1476
|
+
"es-MX"?: string | undefined;
|
|
1470
1477
|
"et-EE"?: string | undefined;
|
|
1471
1478
|
"eu-ES"?: string | undefined;
|
|
1472
1479
|
"fa-IR"?: string | undefined;
|
|
@@ -1601,6 +1608,7 @@ export declare const connectorFactoryResponseGuard: z.ZodObject<{
|
|
|
1601
1608
|
es?: string | undefined;
|
|
1602
1609
|
"es-ES"?: string | undefined;
|
|
1603
1610
|
"es-419"?: string | undefined;
|
|
1611
|
+
"es-MX"?: string | undefined;
|
|
1604
1612
|
"et-EE"?: string | undefined;
|
|
1605
1613
|
"eu-ES"?: string | undefined;
|
|
1606
1614
|
"fa-IR"?: string | undefined;
|
package/lib/types/consent.d.ts
CHANGED
|
@@ -54,6 +54,7 @@ export declare const publicUserInfoGuard: z.ZodObject<Pick<{
|
|
|
54
54
|
}>;
|
|
55
55
|
}>>;
|
|
56
56
|
applicationId: z.ZodType<string | null, z.ZodTypeDef, string | null>;
|
|
57
|
+
cimdClientId: z.ZodType<string | null, z.ZodTypeDef, string | null>;
|
|
57
58
|
identities: z.ZodType<Record<string, {
|
|
58
59
|
userId: string;
|
|
59
60
|
details?: Record<string, import("@withtyped/server").Json> | undefined;
|
|
@@ -144,102 +145,15 @@ export declare const publicUserInfoGuard: z.ZodObject<Pick<{
|
|
|
144
145
|
export type PublicUserInfo = z.infer<typeof publicUserInfoGuard>;
|
|
145
146
|
/**
|
|
146
147
|
* Define the public application info that can be exposed to the public. e.g. on the user consent page.
|
|
148
|
+
*
|
|
149
|
+
* The overrides lift the applications-table column length bounds for CIMD clients: `id` carries
|
|
150
|
+
* the identifier URL (up to 2048 characters), and `name` the remote document's `client_name`,
|
|
151
|
+
* which is unbounded and empty when the document omits it.
|
|
147
152
|
*/
|
|
148
|
-
export declare const publicApplicationGuard: z.ZodObject<
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
secret: z.ZodType<string, z.ZodTypeDef, string>;
|
|
153
|
-
description: z.ZodType<string | null, z.ZodTypeDef, string | null>;
|
|
154
|
-
type: z.ZodType<import("../db-entries/custom-types.js").ApplicationType, z.ZodTypeDef, import("../db-entries/custom-types.js").ApplicationType>;
|
|
155
|
-
oidcClientMetadata: z.ZodType<import("../index.js").OidcClientMetadata, z.ZodTypeDef, import("../index.js").OidcClientMetadata>;
|
|
156
|
-
customClientMetadata: z.ZodType<{
|
|
157
|
-
corsAllowedOrigins?: string[] | undefined;
|
|
158
|
-
idTokenTtl?: number | undefined;
|
|
159
|
-
refreshTokenTtl?: number | undefined;
|
|
160
|
-
refreshTokenTtlInDays?: number | undefined;
|
|
161
|
-
tenantId?: string | undefined;
|
|
162
|
-
alwaysIssueRefreshToken?: boolean | undefined;
|
|
163
|
-
rotateRefreshToken?: boolean | undefined;
|
|
164
|
-
allowTokenExchange?: boolean | undefined;
|
|
165
|
-
isDeviceFlow?: boolean | undefined;
|
|
166
|
-
maxAllowedGrants?: number | undefined;
|
|
167
|
-
}, z.ZodTypeDef, {
|
|
168
|
-
corsAllowedOrigins?: string[] | undefined;
|
|
169
|
-
idTokenTtl?: number | undefined;
|
|
170
|
-
refreshTokenTtl?: number | undefined;
|
|
171
|
-
refreshTokenTtlInDays?: number | undefined;
|
|
172
|
-
tenantId?: string | undefined;
|
|
173
|
-
alwaysIssueRefreshToken?: boolean | undefined;
|
|
174
|
-
rotateRefreshToken?: boolean | undefined;
|
|
175
|
-
allowTokenExchange?: boolean | undefined;
|
|
176
|
-
isDeviceFlow?: boolean | undefined;
|
|
177
|
-
maxAllowedGrants?: number | undefined;
|
|
178
|
-
}>;
|
|
179
|
-
protectedAppMetadata: z.ZodType<{
|
|
180
|
-
host: string;
|
|
181
|
-
origin: string;
|
|
182
|
-
sessionDuration: number;
|
|
183
|
-
pageRules: {
|
|
184
|
-
path: string;
|
|
185
|
-
}[];
|
|
186
|
-
additionalScopes?: (import("@logto/core-kit").UserScope.CustomData | import("@logto/core-kit").UserScope.Identities | import("@logto/core-kit").UserScope.Roles | import("@logto/core-kit").UserScope.Organizations | import("@logto/core-kit").UserScope.OrganizationRoles)[] | undefined;
|
|
187
|
-
customDomains?: {
|
|
188
|
-
status: import("../index.js").DomainStatus;
|
|
189
|
-
domain: string;
|
|
190
|
-
errorMessage: string | null;
|
|
191
|
-
dnsRecords: {
|
|
192
|
-
value: string;
|
|
193
|
-
type: string;
|
|
194
|
-
name: string;
|
|
195
|
-
}[];
|
|
196
|
-
cloudflareData: {
|
|
197
|
-
status: string;
|
|
198
|
-
id: string;
|
|
199
|
-
ssl: {
|
|
200
|
-
status: string;
|
|
201
|
-
validation_errors?: {
|
|
202
|
-
message: string;
|
|
203
|
-
}[] | undefined;
|
|
204
|
-
};
|
|
205
|
-
verification_errors?: string[] | undefined;
|
|
206
|
-
} | null;
|
|
207
|
-
}[] | undefined;
|
|
208
|
-
} | null, z.ZodTypeDef, {
|
|
209
|
-
host: string;
|
|
210
|
-
origin: string;
|
|
211
|
-
sessionDuration: number;
|
|
212
|
-
pageRules: {
|
|
213
|
-
path: string;
|
|
214
|
-
}[];
|
|
215
|
-
additionalScopes?: (import("@logto/core-kit").UserScope.CustomData | import("@logto/core-kit").UserScope.Identities | import("@logto/core-kit").UserScope.Roles | import("@logto/core-kit").UserScope.Organizations | import("@logto/core-kit").UserScope.OrganizationRoles)[] | undefined;
|
|
216
|
-
customDomains?: {
|
|
217
|
-
status: import("../index.js").DomainStatus;
|
|
218
|
-
domain: string;
|
|
219
|
-
errorMessage: string | null;
|
|
220
|
-
dnsRecords: {
|
|
221
|
-
value: string;
|
|
222
|
-
type: string;
|
|
223
|
-
name: string;
|
|
224
|
-
}[];
|
|
225
|
-
cloudflareData: {
|
|
226
|
-
status: string;
|
|
227
|
-
id: string;
|
|
228
|
-
ssl: {
|
|
229
|
-
status: string;
|
|
230
|
-
validation_errors?: {
|
|
231
|
-
message: string;
|
|
232
|
-
}[] | undefined;
|
|
233
|
-
};
|
|
234
|
-
verification_errors?: string[] | undefined;
|
|
235
|
-
} | null;
|
|
236
|
-
}[] | undefined;
|
|
237
|
-
} | null>;
|
|
238
|
-
customData: z.ZodType<import("@withtyped/server").JsonObject, z.ZodTypeDef, import("@withtyped/server").JsonObject>;
|
|
239
|
-
isThirdParty: z.ZodType<boolean, z.ZodTypeDef, boolean>;
|
|
240
|
-
appLevelAccessControlEnabled: z.ZodType<boolean, z.ZodTypeDef, boolean>;
|
|
241
|
-
createdAt: z.ZodType<number, z.ZodTypeDef, number>;
|
|
242
|
-
}, "name" | "id">, "strip", z.ZodTypeAny, {
|
|
153
|
+
export declare const publicApplicationGuard: z.ZodObject<{} & {
|
|
154
|
+
id: z.ZodString;
|
|
155
|
+
name: z.ZodString;
|
|
156
|
+
}, "strip", z.ZodTypeAny, {
|
|
243
157
|
name: string;
|
|
244
158
|
id: string;
|
|
245
159
|
}, {
|
|
@@ -357,6 +271,7 @@ export declare const publicOrganizationGuard: z.ZodObject<Pick<{
|
|
|
357
271
|
description: z.ZodType<string | null, z.ZodTypeDef, string | null>;
|
|
358
272
|
customData: z.ZodType<import("@withtyped/server").JsonObject, z.ZodTypeDef, import("@withtyped/server").JsonObject>;
|
|
359
273
|
isMfaRequired: z.ZodType<boolean, z.ZodTypeDef, boolean>;
|
|
274
|
+
isTrustedDeviceAllowed: z.ZodType<boolean, z.ZodTypeDef, boolean>;
|
|
360
275
|
color: z.ZodType<Partial<{
|
|
361
276
|
primaryColor: string;
|
|
362
277
|
isDarkModeEnabled: boolean;
|
|
@@ -471,101 +386,10 @@ export declare const publicOrganizationGuard: z.ZodObject<Pick<{
|
|
|
471
386
|
}>;
|
|
472
387
|
export type PublicOrganization = z.infer<typeof publicOrganizationGuard>;
|
|
473
388
|
export declare const consentInfoResponseGuard: z.ZodObject<{
|
|
474
|
-
application: z.ZodObject<
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
secret: z.ZodType<string, z.ZodTypeDef, string>;
|
|
479
|
-
description: z.ZodType<string | null, z.ZodTypeDef, string | null>;
|
|
480
|
-
type: z.ZodType<import("../db-entries/custom-types.js").ApplicationType, z.ZodTypeDef, import("../db-entries/custom-types.js").ApplicationType>;
|
|
481
|
-
oidcClientMetadata: z.ZodType<import("../index.js").OidcClientMetadata, z.ZodTypeDef, import("../index.js").OidcClientMetadata>;
|
|
482
|
-
customClientMetadata: z.ZodType<{
|
|
483
|
-
corsAllowedOrigins?: string[] | undefined;
|
|
484
|
-
idTokenTtl?: number | undefined;
|
|
485
|
-
refreshTokenTtl?: number | undefined;
|
|
486
|
-
refreshTokenTtlInDays?: number | undefined;
|
|
487
|
-
tenantId?: string | undefined;
|
|
488
|
-
alwaysIssueRefreshToken?: boolean | undefined;
|
|
489
|
-
rotateRefreshToken?: boolean | undefined;
|
|
490
|
-
allowTokenExchange?: boolean | undefined;
|
|
491
|
-
isDeviceFlow?: boolean | undefined;
|
|
492
|
-
maxAllowedGrants?: number | undefined;
|
|
493
|
-
}, z.ZodTypeDef, {
|
|
494
|
-
corsAllowedOrigins?: string[] | undefined;
|
|
495
|
-
idTokenTtl?: number | undefined;
|
|
496
|
-
refreshTokenTtl?: number | undefined;
|
|
497
|
-
refreshTokenTtlInDays?: number | undefined;
|
|
498
|
-
tenantId?: string | undefined;
|
|
499
|
-
alwaysIssueRefreshToken?: boolean | undefined;
|
|
500
|
-
rotateRefreshToken?: boolean | undefined;
|
|
501
|
-
allowTokenExchange?: boolean | undefined;
|
|
502
|
-
isDeviceFlow?: boolean | undefined;
|
|
503
|
-
maxAllowedGrants?: number | undefined;
|
|
504
|
-
}>;
|
|
505
|
-
protectedAppMetadata: z.ZodType<{
|
|
506
|
-
host: string;
|
|
507
|
-
origin: string;
|
|
508
|
-
sessionDuration: number;
|
|
509
|
-
pageRules: {
|
|
510
|
-
path: string;
|
|
511
|
-
}[];
|
|
512
|
-
additionalScopes?: (import("@logto/core-kit").UserScope.CustomData | import("@logto/core-kit").UserScope.Identities | import("@logto/core-kit").UserScope.Roles | import("@logto/core-kit").UserScope.Organizations | import("@logto/core-kit").UserScope.OrganizationRoles)[] | undefined;
|
|
513
|
-
customDomains?: {
|
|
514
|
-
status: import("../index.js").DomainStatus;
|
|
515
|
-
domain: string;
|
|
516
|
-
errorMessage: string | null;
|
|
517
|
-
dnsRecords: {
|
|
518
|
-
value: string;
|
|
519
|
-
type: string;
|
|
520
|
-
name: string;
|
|
521
|
-
}[];
|
|
522
|
-
cloudflareData: {
|
|
523
|
-
status: string;
|
|
524
|
-
id: string;
|
|
525
|
-
ssl: {
|
|
526
|
-
status: string;
|
|
527
|
-
validation_errors?: {
|
|
528
|
-
message: string;
|
|
529
|
-
}[] | undefined;
|
|
530
|
-
};
|
|
531
|
-
verification_errors?: string[] | undefined;
|
|
532
|
-
} | null;
|
|
533
|
-
}[] | undefined;
|
|
534
|
-
} | null, z.ZodTypeDef, {
|
|
535
|
-
host: string;
|
|
536
|
-
origin: string;
|
|
537
|
-
sessionDuration: number;
|
|
538
|
-
pageRules: {
|
|
539
|
-
path: string;
|
|
540
|
-
}[];
|
|
541
|
-
additionalScopes?: (import("@logto/core-kit").UserScope.CustomData | import("@logto/core-kit").UserScope.Identities | import("@logto/core-kit").UserScope.Roles | import("@logto/core-kit").UserScope.Organizations | import("@logto/core-kit").UserScope.OrganizationRoles)[] | undefined;
|
|
542
|
-
customDomains?: {
|
|
543
|
-
status: import("../index.js").DomainStatus;
|
|
544
|
-
domain: string;
|
|
545
|
-
errorMessage: string | null;
|
|
546
|
-
dnsRecords: {
|
|
547
|
-
value: string;
|
|
548
|
-
type: string;
|
|
549
|
-
name: string;
|
|
550
|
-
}[];
|
|
551
|
-
cloudflareData: {
|
|
552
|
-
status: string;
|
|
553
|
-
id: string;
|
|
554
|
-
ssl: {
|
|
555
|
-
status: string;
|
|
556
|
-
validation_errors?: {
|
|
557
|
-
message: string;
|
|
558
|
-
}[] | undefined;
|
|
559
|
-
};
|
|
560
|
-
verification_errors?: string[] | undefined;
|
|
561
|
-
} | null;
|
|
562
|
-
}[] | undefined;
|
|
563
|
-
} | null>;
|
|
564
|
-
customData: z.ZodType<import("@withtyped/server").JsonObject, z.ZodTypeDef, import("@withtyped/server").JsonObject>;
|
|
565
|
-
isThirdParty: z.ZodType<boolean, z.ZodTypeDef, boolean>;
|
|
566
|
-
appLevelAccessControlEnabled: z.ZodType<boolean, z.ZodTypeDef, boolean>;
|
|
567
|
-
createdAt: z.ZodType<number, z.ZodTypeDef, number>;
|
|
568
|
-
}, "name" | "id"> & {
|
|
389
|
+
application: z.ZodObject<{} & {
|
|
390
|
+
id: z.ZodString;
|
|
391
|
+
name: z.ZodString;
|
|
392
|
+
} & {
|
|
569
393
|
displayName: z.ZodOptional<z.ZodType<string | null, z.ZodTypeDef, string | null>>;
|
|
570
394
|
branding: z.ZodOptional<z.ZodType<{
|
|
571
395
|
logoUrl?: string | undefined;
|
|
@@ -657,6 +481,7 @@ export declare const consentInfoResponseGuard: z.ZodObject<{
|
|
|
657
481
|
}>;
|
|
658
482
|
}>>;
|
|
659
483
|
applicationId: z.ZodType<string | null, z.ZodTypeDef, string | null>;
|
|
484
|
+
cimdClientId: z.ZodType<string | null, z.ZodTypeDef, string | null>;
|
|
660
485
|
identities: z.ZodType<Record<string, {
|
|
661
486
|
userId: string;
|
|
662
487
|
details?: Record<string, import("@withtyped/server").Json> | undefined;
|
|
@@ -751,6 +576,7 @@ export declare const consentInfoResponseGuard: z.ZodObject<{
|
|
|
751
576
|
description: z.ZodType<string | null, z.ZodTypeDef, string | null>;
|
|
752
577
|
customData: z.ZodType<import("@withtyped/server").JsonObject, z.ZodTypeDef, import("@withtyped/server").JsonObject>;
|
|
753
578
|
isMfaRequired: z.ZodType<boolean, z.ZodTypeDef, boolean>;
|
|
579
|
+
isTrustedDeviceAllowed: z.ZodType<boolean, z.ZodTypeDef, boolean>;
|
|
754
580
|
color: z.ZodType<Partial<{
|
|
755
581
|
primaryColor: string;
|
|
756
582
|
isDarkModeEnabled: boolean;
|
package/lib/types/consent.js
CHANGED
|
@@ -13,10 +13,19 @@ export const publicUserInfoGuard = Users.guard.pick({
|
|
|
13
13
|
});
|
|
14
14
|
/**
|
|
15
15
|
* Define the public application info that can be exposed to the public. e.g. on the user consent page.
|
|
16
|
+
*
|
|
17
|
+
* The overrides lift the applications-table column length bounds for CIMD clients: `id` carries
|
|
18
|
+
* the identifier URL (up to 2048 characters), and `name` the remote document's `client_name`,
|
|
19
|
+
* which is unbounded and empty when the document omits it.
|
|
16
20
|
*/
|
|
17
|
-
export const publicApplicationGuard = Applications.guard
|
|
21
|
+
export const publicApplicationGuard = Applications.guard
|
|
22
|
+
.pick({
|
|
18
23
|
id: true,
|
|
19
24
|
name: true,
|
|
25
|
+
})
|
|
26
|
+
.extend({
|
|
27
|
+
id: z.string(),
|
|
28
|
+
name: z.string(),
|
|
20
29
|
});
|
|
21
30
|
export const applicationSignInExperienceGuard = ApplicationSignInExperiences.guard.pick({
|
|
22
31
|
branding: true,
|
package/lib/types/cookie.d.ts
CHANGED
|
@@ -3,17 +3,21 @@ export type LogtoUiCookie = Partial<{
|
|
|
3
3
|
appId: string;
|
|
4
4
|
organizationId: string;
|
|
5
5
|
uiLocales: string;
|
|
6
|
+
theme: string;
|
|
6
7
|
}>;
|
|
7
8
|
export declare const logtoUiCookieGuard: z.ZodObject<{
|
|
8
9
|
appId: z.ZodOptional<z.ZodString>;
|
|
9
10
|
organizationId: z.ZodOptional<z.ZodString>;
|
|
10
11
|
uiLocales: z.ZodOptional<z.ZodString>;
|
|
12
|
+
theme: z.ZodOptional<z.ZodString>;
|
|
11
13
|
}, "strip", z.ZodTypeAny, {
|
|
12
14
|
organizationId?: string | undefined;
|
|
13
15
|
appId?: string | undefined;
|
|
14
16
|
uiLocales?: string | undefined;
|
|
17
|
+
theme?: string | undefined;
|
|
15
18
|
}, {
|
|
16
19
|
organizationId?: string | undefined;
|
|
17
20
|
appId?: string | undefined;
|
|
18
21
|
uiLocales?: string | undefined;
|
|
22
|
+
theme?: string | undefined;
|
|
19
23
|
}>;
|
package/lib/types/cookie.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export const logtoUiCookieGuard = z
|
|
3
|
-
.object({
|
|
3
|
+
.object({
|
|
4
|
+
appId: z.string(),
|
|
5
|
+
organizationId: z.string(),
|
|
6
|
+
uiLocales: z.string(),
|
|
7
|
+
theme: z.string(),
|
|
8
|
+
})
|
|
4
9
|
.partial();
|
|
@@ -2457,6 +2457,7 @@ export declare const signInIdentifierKeyGuard: z.ZodObject<Pick<{
|
|
|
2457
2457
|
}>;
|
|
2458
2458
|
}>>>;
|
|
2459
2459
|
applicationId: z.ZodOptional<z.ZodType<string | null, z.ZodTypeDef, string | null>>;
|
|
2460
|
+
cimdClientId: z.ZodOptional<z.ZodType<string | null, z.ZodTypeDef, string | null>>;
|
|
2460
2461
|
identities: z.ZodOptional<z.ZodType<Record<string, {
|
|
2461
2462
|
userId: string;
|
|
2462
2463
|
details?: Record<string, import("@withtyped/server/lib/types.js").Json> | undefined;
|
package/lib/types/hook.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { type Application, type User } from '../db-entries/index.js';
|
|
2
|
+
import { type Application, type TrustedDevice, type User } from '../db-entries/index.js';
|
|
3
3
|
import { type ExceptionHookEvent, type DataHookEvent, type InteractionHookEvent } from '../foundations/index.js';
|
|
4
4
|
import { type InteractionEvent } from './interactions.js';
|
|
5
5
|
import { type userInfoSelectFields } from './user.js';
|
|
@@ -18,8 +18,8 @@ export declare const hookResponseGuard: z.ZodObject<{
|
|
|
18
18
|
tenantId: z.ZodType<string, z.ZodTypeDef, string>;
|
|
19
19
|
id: z.ZodType<string, z.ZodTypeDef, string>;
|
|
20
20
|
name: z.ZodType<string, z.ZodTypeDef, string>;
|
|
21
|
-
event: z.ZodType<"User.Created" | "User.Deleted" | "Role.Created" | "Role.Deleted" | "Scope.Created" | "Scope.Deleted" | "Organization.Created" | "Organization.Deleted" | "OrganizationRole.Created" | "OrganizationRole.Deleted" | "OrganizationScope.Created" | "OrganizationScope.Deleted" | "User.Data.Updated" | "Role.Data.Updated" | "Scope.Data.Updated" | "Organization.Data.Updated" | "OrganizationRole.Data.Updated" | "OrganizationScope.Data.Updated" | "User.SuspensionStatus.Updated" | "Role.Scopes.Updated" | "Organization.Membership.Updated" | "OrganizationRole.Scopes.Updated" | "Identifier.Lockout" | "Message.RateLimited" | "Grant.LimitExceeded" | InteractionHookEvent | null, z.ZodTypeDef, "User.Created" | "User.Deleted" | "Role.Created" | "Role.Deleted" | "Scope.Created" | "Scope.Deleted" | "Organization.Created" | "Organization.Deleted" | "OrganizationRole.Created" | "OrganizationRole.Deleted" | "OrganizationScope.Created" | "OrganizationScope.Deleted" | "User.Data.Updated" | "Role.Data.Updated" | "Scope.Data.Updated" | "Organization.Data.Updated" | "OrganizationRole.Data.Updated" | "OrganizationScope.Data.Updated" | "User.SuspensionStatus.Updated" | "Role.Scopes.Updated" | "Organization.Membership.Updated" | "OrganizationRole.Scopes.Updated" | "Identifier.Lockout" | "Message.RateLimited" | "Grant.LimitExceeded" | InteractionHookEvent | null>;
|
|
22
|
-
events: z.ZodType<("User.Created" | "User.Deleted" | "Role.Created" | "Role.Deleted" | "Scope.Created" | "Scope.Deleted" | "Organization.Created" | "Organization.Deleted" | "OrganizationRole.Created" | "OrganizationRole.Deleted" | "OrganizationScope.Created" | "OrganizationScope.Deleted" | "User.Data.Updated" | "Role.Data.Updated" | "Scope.Data.Updated" | "Organization.Data.Updated" | "OrganizationRole.Data.Updated" | "OrganizationScope.Data.Updated" | "User.SuspensionStatus.Updated" | "Role.Scopes.Updated" | "Organization.Membership.Updated" | "OrganizationRole.Scopes.Updated" | "Identifier.Lockout" | "Message.RateLimited" | "Grant.LimitExceeded" | InteractionHookEvent)[], z.ZodTypeDef, ("User.Created" | "User.Deleted" | "Role.Created" | "Role.Deleted" | "Scope.Created" | "Scope.Deleted" | "Organization.Created" | "Organization.Deleted" | "OrganizationRole.Created" | "OrganizationRole.Deleted" | "OrganizationScope.Created" | "OrganizationScope.Deleted" | "User.Data.Updated" | "Role.Data.Updated" | "Scope.Data.Updated" | "Organization.Data.Updated" | "OrganizationRole.Data.Updated" | "OrganizationScope.Data.Updated" | "User.SuspensionStatus.Updated" | "Role.Scopes.Updated" | "Organization.Membership.Updated" | "OrganizationRole.Scopes.Updated" | "Identifier.Lockout" | "Message.RateLimited" | "Grant.LimitExceeded" | InteractionHookEvent)[]>;
|
|
21
|
+
event: z.ZodType<"User.Created" | "User.Deleted" | "TrustedDevice.Created" | "TrustedDevice.Deleted" | "Role.Created" | "Role.Deleted" | "Scope.Created" | "Scope.Deleted" | "Organization.Created" | "Organization.Deleted" | "OrganizationRole.Created" | "OrganizationRole.Deleted" | "OrganizationScope.Created" | "OrganizationScope.Deleted" | "User.Data.Updated" | "Role.Data.Updated" | "Scope.Data.Updated" | "Organization.Data.Updated" | "OrganizationRole.Data.Updated" | "OrganizationScope.Data.Updated" | "User.SuspensionStatus.Updated" | "Role.Scopes.Updated" | "Organization.Membership.Updated" | "OrganizationRole.Scopes.Updated" | "Identifier.Lockout" | "Message.RateLimited" | "Grant.LimitExceeded" | InteractionHookEvent | null, z.ZodTypeDef, "User.Created" | "User.Deleted" | "TrustedDevice.Created" | "TrustedDevice.Deleted" | "Role.Created" | "Role.Deleted" | "Scope.Created" | "Scope.Deleted" | "Organization.Created" | "Organization.Deleted" | "OrganizationRole.Created" | "OrganizationRole.Deleted" | "OrganizationScope.Created" | "OrganizationScope.Deleted" | "User.Data.Updated" | "Role.Data.Updated" | "Scope.Data.Updated" | "Organization.Data.Updated" | "OrganizationRole.Data.Updated" | "OrganizationScope.Data.Updated" | "User.SuspensionStatus.Updated" | "Role.Scopes.Updated" | "Organization.Membership.Updated" | "OrganizationRole.Scopes.Updated" | "Identifier.Lockout" | "Message.RateLimited" | "Grant.LimitExceeded" | InteractionHookEvent | null>;
|
|
22
|
+
events: z.ZodType<("User.Created" | "User.Deleted" | "TrustedDevice.Created" | "TrustedDevice.Deleted" | "Role.Created" | "Role.Deleted" | "Scope.Created" | "Scope.Deleted" | "Organization.Created" | "Organization.Deleted" | "OrganizationRole.Created" | "OrganizationRole.Deleted" | "OrganizationScope.Created" | "OrganizationScope.Deleted" | "User.Data.Updated" | "Role.Data.Updated" | "Scope.Data.Updated" | "Organization.Data.Updated" | "OrganizationRole.Data.Updated" | "OrganizationScope.Data.Updated" | "User.SuspensionStatus.Updated" | "Role.Scopes.Updated" | "Organization.Membership.Updated" | "OrganizationRole.Scopes.Updated" | "Identifier.Lockout" | "Message.RateLimited" | "Grant.LimitExceeded" | InteractionHookEvent)[], z.ZodTypeDef, ("User.Created" | "User.Deleted" | "TrustedDevice.Created" | "TrustedDevice.Deleted" | "Role.Created" | "Role.Deleted" | "Scope.Created" | "Scope.Deleted" | "Organization.Created" | "Organization.Deleted" | "OrganizationRole.Created" | "OrganizationRole.Deleted" | "OrganizationScope.Created" | "OrganizationScope.Deleted" | "User.Data.Updated" | "Role.Data.Updated" | "Scope.Data.Updated" | "Organization.Data.Updated" | "OrganizationRole.Data.Updated" | "OrganizationScope.Data.Updated" | "User.SuspensionStatus.Updated" | "Role.Scopes.Updated" | "Organization.Membership.Updated" | "OrganizationRole.Scopes.Updated" | "Identifier.Lockout" | "Message.RateLimited" | "Grant.LimitExceeded" | InteractionHookEvent)[]>;
|
|
23
23
|
config: z.ZodType<{
|
|
24
24
|
url: string;
|
|
25
25
|
headers?: Record<string, string> | undefined;
|
|
@@ -90,8 +90,13 @@ export type HookTestErrorResponseData = z.infer<typeof hookTestErrorResponseData
|
|
|
90
90
|
* we will store the context before processing the interaction and consume it after the interaction is processed if needed.
|
|
91
91
|
*/
|
|
92
92
|
export type InteractionApiMetadata = {
|
|
93
|
-
/** The application ID if the hook is triggered by interaction API. */
|
|
93
|
+
/** The registered application ID if the hook is triggered by interaction API. */
|
|
94
94
|
applicationId?: string;
|
|
95
|
+
/**
|
|
96
|
+
* The CIMD client identifier URL, kept apart from `applicationId` so payload consumers
|
|
97
|
+
* branch on key presence instead of URL shape.
|
|
98
|
+
*/
|
|
99
|
+
cimdClientId?: string;
|
|
95
100
|
/** The session ID if the hook is triggered by interaction API. */
|
|
96
101
|
sessionId?: string;
|
|
97
102
|
/** The InteractionEvent if the hook is triggered by interaction API. */
|
|
@@ -100,6 +105,8 @@ export type InteractionApiMetadata = {
|
|
|
100
105
|
type InteractionApiContextPayload = {
|
|
101
106
|
/** Fetch application detail by application ID before sending the hook event */
|
|
102
107
|
application?: Pick<Application, 'id' | 'type' | 'name' | 'description'>;
|
|
108
|
+
/** CIMD clients are unregistered, so the identifier URL stands in for `application`. */
|
|
109
|
+
cimdClientId?: string;
|
|
103
110
|
sessionId?: string;
|
|
104
111
|
interactionEvent?: InteractionEvent;
|
|
105
112
|
};
|
|
@@ -140,12 +147,30 @@ export type DataHookEventPayload = {
|
|
|
140
147
|
userAgent?: string;
|
|
141
148
|
data?: unknown;
|
|
142
149
|
} & Partial<InteractionApiContextPayload> & Partial<ManagementApiContext> & Record<string, unknown>;
|
|
143
|
-
|
|
150
|
+
/** The intentionally limited trusted-device projection exposed by lifecycle events. */
|
|
151
|
+
export type TrustedDeviceEventData = Pick<TrustedDevice, 'id' | 'userId' | 'expiresAt'>;
|
|
152
|
+
/**
|
|
153
|
+
* A key-remapping omit instead of the built-in `Omit`: on a type carrying a string index
|
|
154
|
+
* signature (e.g. the hook event payloads), `Omit` collapses every named property into
|
|
155
|
+
* `unknown`; the homomorphic form keeps the named properties typed.
|
|
156
|
+
*/
|
|
157
|
+
export type BetterOmit<T, Ignore> = {
|
|
158
|
+
[key in keyof T as key extends Ignore ? never : key]: T[key];
|
|
159
|
+
};
|
|
160
|
+
export type ExceptionHookEventPayload = BetterOmit<DataHookEventPayload, 'event'> & {
|
|
144
161
|
event: ExceptionHookEvent;
|
|
145
162
|
};
|
|
146
163
|
export type GrantLimitExceededEventData = {
|
|
147
164
|
userId: string;
|
|
148
|
-
|
|
165
|
+
/** The registered application ID; absent for a CIMD client. */
|
|
166
|
+
applicationId?: string;
|
|
167
|
+
/**
|
|
168
|
+
* The CIMD client identifier URL, set instead of `applicationId`. No grant-ceiling source
|
|
169
|
+
* exists for CIMD clients today (the CIMD policy denies Logto private client metadata
|
|
170
|
+
* regardless of source), so this key is defensive: it keeps `applicationId` registered-only
|
|
171
|
+
* by construction should a ceiling for CIMD clients ever be introduced.
|
|
172
|
+
*/
|
|
173
|
+
cimdClientId?: string;
|
|
149
174
|
revokedGrantIds: string[];
|
|
150
175
|
maxAllowedGrants: number;
|
|
151
176
|
preRevocationActiveGrantCount: number;
|
package/lib/types/index.d.ts
CHANGED
package/lib/types/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { AdditionalIdentifier, MfaFactor, SignInIdentifier } from '../foundations/index.js';
|
|
3
|
+
import { type RequestedAuthenticationContext } from './authentication-context.js';
|
|
3
4
|
import { InteractionEvent } from './interaction-event.js';
|
|
4
5
|
import type { EmailVerificationCodePayload, PhoneVerificationCodePayload } from './verification-code.js';
|
|
6
|
+
import { VerificationType } from './verification-records/verification-type.js';
|
|
5
7
|
export { eventGuard, InteractionEvent } from './interaction-event.js';
|
|
6
8
|
export type VerificationIdentifier = {
|
|
7
9
|
type: SignInIdentifier | AdditionalIdentifier;
|
|
@@ -57,6 +59,55 @@ export declare const verificationCodeIdentifierGuard: z.ZodDiscriminatedUnion<"t
|
|
|
57
59
|
value: string;
|
|
58
60
|
type: SignInIdentifier.Phone;
|
|
59
61
|
}>]>;
|
|
62
|
+
/**
|
|
63
|
+
* The subject-bound verification code identifier: the type alone. Accepted once the interaction
|
|
64
|
+
* carries a subject; core fills the value from that user's primary email / phone. A present
|
|
65
|
+
* `value` is rejected so a malformed full identifier is never mistaken for this shape.
|
|
66
|
+
*/
|
|
67
|
+
export type SubjectVerificationCodeIdentifier = {
|
|
68
|
+
type: VerificationCodeSignInIdentifier;
|
|
69
|
+
value?: undefined;
|
|
70
|
+
};
|
|
71
|
+
export declare const subjectVerificationCodeIdentifierGuard: z.ZodObject<{
|
|
72
|
+
type: z.ZodEnum<[SignInIdentifier.Email, SignInIdentifier.Phone]>;
|
|
73
|
+
value: z.ZodUndefined;
|
|
74
|
+
}, "strip", z.ZodTypeAny, {
|
|
75
|
+
type: SignInIdentifier.Email | SignInIdentifier.Phone;
|
|
76
|
+
value?: undefined;
|
|
77
|
+
}, {
|
|
78
|
+
type: SignInIdentifier.Email | SignInIdentifier.Phone;
|
|
79
|
+
value?: undefined;
|
|
80
|
+
}>;
|
|
81
|
+
/** The full identifier, or the subject-bound shape. */
|
|
82
|
+
export type VerificationCodeIdentifierPayload = VerificationCodeIdentifier | SubjectVerificationCodeIdentifier;
|
|
83
|
+
export declare const verificationCodeIdentifierPayloadGuard: z.ZodUnion<[z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
84
|
+
type: z.ZodLiteral<SignInIdentifier.Email>;
|
|
85
|
+
value: z.ZodString;
|
|
86
|
+
}, "strip", z.ZodTypeAny, {
|
|
87
|
+
value: string;
|
|
88
|
+
type: SignInIdentifier.Email;
|
|
89
|
+
}, {
|
|
90
|
+
value: string;
|
|
91
|
+
type: SignInIdentifier.Email;
|
|
92
|
+
}>, z.ZodObject<{
|
|
93
|
+
type: z.ZodLiteral<SignInIdentifier.Phone>;
|
|
94
|
+
value: z.ZodString;
|
|
95
|
+
}, "strip", z.ZodTypeAny, {
|
|
96
|
+
value: string;
|
|
97
|
+
type: SignInIdentifier.Phone;
|
|
98
|
+
}, {
|
|
99
|
+
value: string;
|
|
100
|
+
type: SignInIdentifier.Phone;
|
|
101
|
+
}>]>, z.ZodObject<{
|
|
102
|
+
type: z.ZodEnum<[SignInIdentifier.Email, SignInIdentifier.Phone]>;
|
|
103
|
+
value: z.ZodUndefined;
|
|
104
|
+
}, "strip", z.ZodTypeAny, {
|
|
105
|
+
type: SignInIdentifier.Email | SignInIdentifier.Phone;
|
|
106
|
+
value?: undefined;
|
|
107
|
+
}, {
|
|
108
|
+
type: SignInIdentifier.Email | SignInIdentifier.Phone;
|
|
109
|
+
value?: undefined;
|
|
110
|
+
}>]>;
|
|
60
111
|
/** Payload type for `POST /api/experience/verification/{social|sso}/:connectorId/authorization-uri`. */
|
|
61
112
|
export type SocialAuthorizationUrlPayload = {
|
|
62
113
|
state: string;
|
|
@@ -128,6 +179,26 @@ export declare const passwordVerificationPayloadGuard: z.ZodObject<{
|
|
|
128
179
|
type: SignInIdentifier;
|
|
129
180
|
};
|
|
130
181
|
}>;
|
|
182
|
+
/**
|
|
183
|
+
* The subject-bound password payload: the password alone. Accepted only when the interaction
|
|
184
|
+
* carries a subject; the password is then verified against that user's credential.
|
|
185
|
+
*/
|
|
186
|
+
export type SubjectPasswordVerificationPayload = {
|
|
187
|
+
identifier?: undefined;
|
|
188
|
+
password: string;
|
|
189
|
+
};
|
|
190
|
+
export declare const subjectPasswordVerificationPayloadGuard: z.ZodObject<{
|
|
191
|
+
identifier: z.ZodUndefined;
|
|
192
|
+
password: z.ZodString;
|
|
193
|
+
}, "strip", z.ZodTypeAny, {
|
|
194
|
+
password: string;
|
|
195
|
+
identifier?: undefined;
|
|
196
|
+
}, {
|
|
197
|
+
password: string;
|
|
198
|
+
identifier?: undefined;
|
|
199
|
+
}>;
|
|
200
|
+
/** The full password payload, or the subject-bound shape. */
|
|
201
|
+
export type PasswordVerificationRequestBody = PasswordVerificationPayload | SubjectPasswordVerificationPayload;
|
|
131
202
|
/** Payload type for `POST /api/experience/verification/totp/verify`. */
|
|
132
203
|
export type TotpVerificationVerifyPayload = {
|
|
133
204
|
code: string;
|
|
@@ -472,6 +543,96 @@ export declare enum MissingProfile {
|
|
|
472
543
|
emailOrPhone = "emailOrPhone",
|
|
473
544
|
extraProfile = "extraProfile"
|
|
474
545
|
}
|
|
546
|
+
/** A social or enterprise SSO connector linked to the pinned user that can serve as subject proof. */
|
|
547
|
+
export type SubjectProofConnector = {
|
|
548
|
+
type: 'social' | 'sso';
|
|
549
|
+
connectorId: string;
|
|
550
|
+
};
|
|
551
|
+
/**
|
|
552
|
+
* The masked primary identifiers of the pinned user. Only the masked values ever leave the
|
|
553
|
+
* server: the step-up UI shows them as hints and never supplies a raw identifier.
|
|
554
|
+
*/
|
|
555
|
+
export type MaskedIdentifiers = {
|
|
556
|
+
email?: string;
|
|
557
|
+
phone?: string;
|
|
558
|
+
};
|
|
559
|
+
/**
|
|
560
|
+
* The authentication context `GET /api/experience/interaction` exposes when the interaction was
|
|
561
|
+
* created from a login prompt that carries requested `acr_values`. The requested part is copied
|
|
562
|
+
* verbatim from the prompt details at creation and never mutated; the lists are evaluated on
|
|
563
|
+
* every read from the pinned user's enrolled methods and the context the interaction achieved so
|
|
564
|
+
* far, and are never persisted, so a factor change during the interaction's lifetime is reflected.
|
|
565
|
+
*/
|
|
566
|
+
export type InteractionAuthenticationContext = RequestedAuthenticationContext & {
|
|
567
|
+
/** The methods that can still contribute to the selected class from where the interaction stands. */
|
|
568
|
+
availableMethods: VerificationType[];
|
|
569
|
+
/** The first factors the user may establish under a fresh subject proof; `[]` until enrollment lands. */
|
|
570
|
+
establishableMethods: MissingProfile[];
|
|
571
|
+
/** The MFA factors the user may enroll after a fresh first factor; `[]` until enrollment lands. */
|
|
572
|
+
enrollableFactors: MfaFactor[];
|
|
573
|
+
/** The linked connectors that can serve as subject proof in pure step-up; `[]` until enrollment lands. */
|
|
574
|
+
subjectProofConnectors: SubjectProofConnector[];
|
|
575
|
+
maskedIdentifiers: MaskedIdentifiers;
|
|
576
|
+
};
|
|
577
|
+
export declare const interactionAuthenticationContextGuard: z.ZodObject<{
|
|
578
|
+
requestedAcrValues: z.ZodArray<z.ZodNativeEnum<typeof import("./authentication-context.js").LogtoAcr>, "many">;
|
|
579
|
+
selectedAcr: z.ZodOptional<z.ZodNativeEnum<typeof import("./authentication-context.js").LogtoAcr>>;
|
|
580
|
+
mode: z.ZodOptional<z.ZodNativeEnum<typeof import("./authentication-context.js").AuthenticationContextMode>>;
|
|
581
|
+
} & {
|
|
582
|
+
availableMethods: z.ZodArray<z.ZodNativeEnum<typeof VerificationType>, "many">;
|
|
583
|
+
establishableMethods: z.ZodArray<z.ZodNativeEnum<typeof MissingProfile>, "many">;
|
|
584
|
+
enrollableFactors: z.ZodArray<z.ZodNativeEnum<typeof MfaFactor>, "many">;
|
|
585
|
+
subjectProofConnectors: z.ZodArray<z.ZodObject<{
|
|
586
|
+
type: z.ZodEnum<["social", "sso"]>;
|
|
587
|
+
connectorId: z.ZodString;
|
|
588
|
+
}, "strip", z.ZodTypeAny, {
|
|
589
|
+
type: "social" | "sso";
|
|
590
|
+
connectorId: string;
|
|
591
|
+
}, {
|
|
592
|
+
type: "social" | "sso";
|
|
593
|
+
connectorId: string;
|
|
594
|
+
}>, "many">;
|
|
595
|
+
maskedIdentifiers: z.ZodObject<{
|
|
596
|
+
email: z.ZodOptional<z.ZodString>;
|
|
597
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
598
|
+
}, "strip", z.ZodTypeAny, {
|
|
599
|
+
email?: string | undefined;
|
|
600
|
+
phone?: string | undefined;
|
|
601
|
+
}, {
|
|
602
|
+
email?: string | undefined;
|
|
603
|
+
phone?: string | undefined;
|
|
604
|
+
}>;
|
|
605
|
+
}, "strip", z.ZodTypeAny, {
|
|
606
|
+
requestedAcrValues: import("./authentication-context.js").LogtoAcr[];
|
|
607
|
+
availableMethods: VerificationType[];
|
|
608
|
+
establishableMethods: MissingProfile[];
|
|
609
|
+
enrollableFactors: MfaFactor[];
|
|
610
|
+
subjectProofConnectors: {
|
|
611
|
+
type: "social" | "sso";
|
|
612
|
+
connectorId: string;
|
|
613
|
+
}[];
|
|
614
|
+
maskedIdentifiers: {
|
|
615
|
+
email?: string | undefined;
|
|
616
|
+
phone?: string | undefined;
|
|
617
|
+
};
|
|
618
|
+
mode?: import("./authentication-context.js").AuthenticationContextMode | undefined;
|
|
619
|
+
selectedAcr?: import("./authentication-context.js").LogtoAcr | undefined;
|
|
620
|
+
}, {
|
|
621
|
+
requestedAcrValues: import("./authentication-context.js").LogtoAcr[];
|
|
622
|
+
availableMethods: VerificationType[];
|
|
623
|
+
establishableMethods: MissingProfile[];
|
|
624
|
+
enrollableFactors: MfaFactor[];
|
|
625
|
+
subjectProofConnectors: {
|
|
626
|
+
type: "social" | "sso";
|
|
627
|
+
connectorId: string;
|
|
628
|
+
}[];
|
|
629
|
+
maskedIdentifiers: {
|
|
630
|
+
email?: string | undefined;
|
|
631
|
+
phone?: string | undefined;
|
|
632
|
+
};
|
|
633
|
+
mode?: import("./authentication-context.js").AuthenticationContextMode | undefined;
|
|
634
|
+
selectedAcr?: import("./authentication-context.js").LogtoAcr | undefined;
|
|
635
|
+
}>;
|
|
475
636
|
export declare const bindTotpPayloadGuard: z.ZodObject<{
|
|
476
637
|
type: z.ZodLiteral<MfaFactor.TOTP>;
|
|
477
638
|
code: z.ZodString;
|