@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.
- package/alterations/1.42.0-1783916980-add-domain-verification-files.ts +20 -0
- package/alterations/1.42.0-1784619793-add-service-logs-created-at-index.ts +33 -0
- package/alterations/1.42.0-1784620000-add-saml-sso-connector-signing-keys-table.ts +38 -0
- 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/utils/1704934999-tables.ts +22 -1
- package/alterations-js/1.42.0-1783916980-add-domain-verification-files.js +16 -0
- package/alterations-js/1.42.0-1784619793-add-service-logs-created-at-index.js +29 -0
- package/alterations-js/1.42.0-1784620000-add-saml-sso-connector-signing-keys-table.js +33 -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/utils/1704934999-tables.js +19 -1
- package/lib/consts/experience.d.ts +1 -0
- package/lib/consts/experience.js +1 -0
- package/lib/consts/index.d.ts +1 -0
- package/lib/consts/index.js +1 -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/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/domain.d.ts +4 -2
- package/lib/db-entries/domain.js +5 -1
- package/lib/db-entries/index.d.ts +8 -0
- package/lib/db-entries/index.js +8 -0
- package/lib/db-entries/oidc-session-extension.d.ts +3 -1
- package/lib/db-entries/oidc-session-extension.js +4 -0
- package/lib/db-entries/organization.d.ts +5 -1
- package/lib/db-entries/organization.js +4 -0
- package/lib/db-entries/saml-sso-connector-signing-key.d.ts +32 -0
- package/lib/db-entries/saml-sso-connector-signing-key.js +49 -0
- 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/trusted-device.d.ts +36 -0
- package/lib/db-entries/trusted-device.js +62 -0
- package/lib/db-entries/user.d.ts +3 -1
- package/lib/db-entries/user.js +4 -0
- 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/custom-domain.d.ts +57 -0
- package/lib/foundations/jsonb-types/custom-domain.js +51 -0
- package/lib/foundations/jsonb-types/custom-domain.test.d.ts +1 -0
- package/lib/foundations/jsonb-types/custom-domain.test.js +38 -0
- package/lib/foundations/jsonb-types/hooks.d.ts +9 -5
- package/lib/foundations/jsonb-types/hooks.js +8 -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/one-time-tokens.d.ts +5 -0
- package/lib/foundations/jsonb-types/one-time-tokens.js +2 -0
- package/lib/foundations/jsonb-types/sign-in-experience.d.ts +39 -4
- package/lib/foundations/jsonb-types/sign-in-experience.js +10 -0
- package/lib/foundations/jsonb-types/sign-in-experience.test.js +17 -1
- package/lib/types/application.d.ts +131 -1
- package/lib/types/application.js +8 -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/custom-profile-fields.d.ts +2 -1
- package/lib/types/domain.d.ts +9 -0
- package/lib/types/hook.d.ts +37 -5
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.js +1 -0
- package/lib/types/interaction-event.d.ts +11 -0
- package/lib/types/interaction-event.js +12 -0
- package/lib/types/interactions.d.ts +2 -11
- package/lib/types/interactions.js +2 -11
- package/lib/types/log/action.d.ts +7 -0
- package/lib/types/log/action.js +6 -0
- package/lib/types/log/index.d.ts +8 -2
- package/lib/types/log/index.js +2 -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 +963 -0
- package/lib/types/logto-config/action.js +77 -0
- package/lib/types/logto-config/index.d.ts +68 -26
- package/lib/types/logto-config/index.js +20 -7
- package/lib/types/logto-config/index.test.js +32 -9
- package/lib/types/logto-config/jwt-customizer.d.ts +60 -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/organization.d.ts +136 -1
- package/lib/types/organization.js +3 -2
- 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 +18 -10
- package/lib/types/sign-in-experience.js +2 -1
- package/lib/types/sso-connector.d.ts +58 -0
- package/lib/types/sso-connector.js +12 -0
- package/lib/types/system.d.ts +2 -2
- package/lib/types/trusted-device.d.ts +67 -0
- package/lib/types/trusted-device.js +16 -0
- package/lib/types/user-sessions.d.ts +117 -238
- 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/one-time-token-verification.d.ts +5 -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/package.json +7 -7
- 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/domains.sql +1 -0
- package/tables/oidc_model_instances.sql +5 -0
- package/tables/oidc_session_extensions.sql +5 -0
- package/tables/organization_scopes.sql +4 -0
- package/tables/organizations.sql +2 -0
- package/tables/saml_sso_connector_signing_keys.sql +21 -0
- package/tables/scopes.sql +4 -0
- package/tables/service_logs.sql +19 -0
- package/tables/sign_in_experiences.sql +1 -0
- package/tables/trusted_devices.sql +25 -0
- package/tables/users.sql +1 -0
- package/lib/types/logto-config/inline-hook.d.ts +0 -76
- package/lib/types/logto-config/inline-hook.js +0 -25
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { AdditionalIdentifier, MfaFactor, SignInIdentifier } from '../foundations/index.js';
|
|
3
|
+
import { InteractionEvent } from './interaction-event.js';
|
|
3
4
|
import type { EmailVerificationCodePayload, PhoneVerificationCodePayload } from './verification-code.js';
|
|
4
|
-
|
|
5
|
-
* User interaction events defined in Logto RFC 0004.
|
|
6
|
-
* @see {@link https://github.com/logto-io/rfcs | Logto RFCs} for more information.
|
|
7
|
-
*/
|
|
8
|
-
export declare enum InteractionEvent {
|
|
9
|
-
SignIn = "SignIn",
|
|
10
|
-
Register = "Register",
|
|
11
|
-
ForgotPassword = "ForgotPassword"
|
|
12
|
-
}
|
|
5
|
+
export { eventGuard, InteractionEvent } from './interaction-event.js';
|
|
13
6
|
export type VerificationIdentifier = {
|
|
14
7
|
type: SignInIdentifier | AdditionalIdentifier;
|
|
15
8
|
value: string;
|
|
@@ -377,7 +370,6 @@ export declare const socialPhonePayloadGuard: z.ZodObject<{
|
|
|
377
370
|
connectorId: string;
|
|
378
371
|
}>;
|
|
379
372
|
export type SocialPhonePayload = z.infer<typeof socialPhonePayloadGuard>;
|
|
380
|
-
export declare const eventGuard: z.ZodNativeEnum<typeof InteractionEvent>;
|
|
381
373
|
export declare const identifierPayloadGuard: z.ZodUnion<[z.ZodObject<{
|
|
382
374
|
username: z.ZodString;
|
|
383
375
|
password: z.ZodString;
|
|
@@ -1181,4 +1173,3 @@ export declare const verifyMfaResultGuard: z.ZodObject<{
|
|
|
1181
1173
|
id: string;
|
|
1182
1174
|
}>;
|
|
1183
1175
|
export type VerifyMfaResult = z.infer<typeof verifyMfaResultGuard>;
|
|
1184
|
-
export {};
|
|
@@ -2,17 +2,9 @@
|
|
|
2
2
|
import { emailRegEx, numberAndAlphabetRegEx, phoneRegEx, usernameRegEx } from '@logto/core-kit';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { AdditionalIdentifier, MfaFactor, SignInIdentifier, jsonObjectGuard, webAuthnTransportGuard, } from '../foundations/index.js';
|
|
5
|
+
import { InteractionEvent } from './interaction-event.js';
|
|
5
6
|
import { emailVerificationCodePayloadGuard, phoneVerificationCodePayloadGuard, } from './verification-code.js';
|
|
6
|
-
|
|
7
|
-
* User interaction events defined in Logto RFC 0004.
|
|
8
|
-
* @see {@link https://github.com/logto-io/rfcs | Logto RFCs} for more information.
|
|
9
|
-
*/
|
|
10
|
-
export var InteractionEvent;
|
|
11
|
-
(function (InteractionEvent) {
|
|
12
|
-
InteractionEvent["SignIn"] = "SignIn";
|
|
13
|
-
InteractionEvent["Register"] = "Register";
|
|
14
|
-
InteractionEvent["ForgotPassword"] = "ForgotPassword";
|
|
15
|
-
})(InteractionEvent || (InteractionEvent = {}));
|
|
7
|
+
export { eventGuard, InteractionEvent } from './interaction-event.js';
|
|
16
8
|
export const verificationIdentifierGuard = z.object({
|
|
17
9
|
type: z.union([z.nativeEnum(SignInIdentifier), z.nativeEnum(AdditionalIdentifier)]),
|
|
18
10
|
value: z.string(),
|
|
@@ -131,7 +123,6 @@ export const socialPhonePayloadGuard = z.object({
|
|
|
131
123
|
connectorId: z.string(),
|
|
132
124
|
phone: z.string(),
|
|
133
125
|
});
|
|
134
|
-
export const eventGuard = z.nativeEnum(InteractionEvent);
|
|
135
126
|
export const identifierPayloadGuard = z.union([
|
|
136
127
|
usernamePasswordPayloadGuard,
|
|
137
128
|
emailPasswordPayloadGuard,
|
package/lib/types/log/index.d.ts
CHANGED
|
@@ -1,31 +1,37 @@
|
|
|
1
|
+
import type * as action from './action.js';
|
|
1
2
|
import type * as hook from './hook.js';
|
|
2
3
|
import type * as interaction from './interaction.js';
|
|
3
4
|
import type * as jwtCustomizer from './jwt-customizer.js';
|
|
4
5
|
import type * as saml from './saml.js';
|
|
5
6
|
import type * as token from './token.js';
|
|
7
|
+
import type * as trustedDevice from './trusted-device.js';
|
|
6
8
|
export * as interaction from './interaction.js';
|
|
7
9
|
export * as token from './token.js';
|
|
8
10
|
export * as hook from './hook.js';
|
|
11
|
+
export * as action from './action.js';
|
|
9
12
|
export * as jwtCustomizer from './jwt-customizer.js';
|
|
10
13
|
export * as saml from './saml.js';
|
|
14
|
+
export * as trustedDevice from './trusted-device.js';
|
|
11
15
|
/** Fallback for empty or unrecognized log keys. */
|
|
12
16
|
export declare const LogKeyUnknown = "Unknown";
|
|
13
17
|
export type InteractionLogKey = interaction.LogKey;
|
|
14
18
|
export type TokenLogKey = token.LogKey;
|
|
15
19
|
export type WebhookLogKey = hook.LogKey;
|
|
20
|
+
export type ActionLogKey = action.LogKey;
|
|
16
21
|
export type JwtCustomizerLogKey = jwtCustomizer.LogKey;
|
|
17
22
|
export type SamlLogKey = saml.LogKey;
|
|
23
|
+
export type TrustedDeviceLogKey = trustedDevice.LogKey;
|
|
18
24
|
/**
|
|
19
25
|
* The union type of all available audit log keys.
|
|
20
26
|
*
|
|
21
27
|
* - All user-facing audit log keys should be included here.
|
|
22
28
|
* - Webhook log keys are excluded.
|
|
23
29
|
*/
|
|
24
|
-
export type AuditLogKey = typeof LogKeyUnknown | InteractionLogKey | TokenLogKey | SamlLogKey | JwtCustomizerLogKey;
|
|
30
|
+
export type AuditLogKey = typeof LogKeyUnknown | InteractionLogKey | TokenLogKey | SamlLogKey | ActionLogKey | JwtCustomizerLogKey | TrustedDeviceLogKey;
|
|
25
31
|
/**
|
|
26
32
|
* The union type of all available log keys.
|
|
27
33
|
* Note duplicate keys are allowed but should be avoided.
|
|
28
34
|
**/
|
|
29
35
|
export type LogKey = AuditLogKey | WebhookLogKey;
|
|
30
|
-
export type AuditLogPrefix = interaction.Prefix | token.Type | saml.Prefix | jwtCustomizer.Prefix | typeof LogKeyUnknown;
|
|
36
|
+
export type AuditLogPrefix = interaction.Prefix | token.Type | saml.Prefix | action.Prefix | jwtCustomizer.Prefix | trustedDevice.Prefix | typeof LogKeyUnknown;
|
|
31
37
|
export type WebhookLogPrefix = hook.Type;
|
package/lib/types/log/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export * as interaction from './interaction.js';
|
|
2
2
|
export * as token from './token.js';
|
|
3
3
|
export * as hook from './hook.js';
|
|
4
|
+
export * as action from './action.js';
|
|
4
5
|
export * as jwtCustomizer from './jwt-customizer.js';
|
|
5
6
|
export * as saml from './saml.js';
|
|
7
|
+
export * as trustedDevice from './trusted-device.js';
|
|
6
8
|
/** Fallback for empty or unrecognized log keys. */
|
|
7
9
|
export const LogKeyUnknown = 'Unknown';
|