@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
|
@@ -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
|
+
});
|