@logto/schemas 1.41.0 → 1.42.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/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/utils/1704934999-tables.js +19 -1
- package/lib/consts/experience.d.ts +1 -0
- package/lib/consts/experience.js +1 -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 +1 -0
- package/lib/db-entries/index.js +1 -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/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 +4 -4
- package/lib/foundations/jsonb-types/hooks.js +1 -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 +16 -1
- package/lib/foundations/jsonb-types/sign-in-experience.js +1 -0
- package/lib/types/application.d.ts +131 -1
- package/lib/types/application.js +8 -0
- package/lib/types/custom-profile-fields.d.ts +1 -1
- package/lib/types/domain.d.ts +9 -0
- package/lib/types/hook.d.ts +9 -2
- 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 +5 -2
- package/lib/types/log/index.js +1 -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 +32 -19
- package/lib/types/logto-config/index.js +7 -7
- package/lib/types/logto-config/index.test.js +9 -9
- package/lib/types/logto-config/jwt-customizer.d.ts +29 -0
- package/lib/types/organization.d.ts +136 -1
- package/lib/types/organization.js +3 -2
- package/lib/types/sign-in-experience.d.ts +2 -4
- package/lib/types/sign-in-experience.js +1 -1
- package/lib/types/sso-connector.d.ts +58 -0
- package/lib/types/sso-connector.js +12 -0
- package/lib/types/user-sessions.d.ts +78 -29
- package/lib/types/verification-records/one-time-token-verification.d.ts +5 -0
- package/package.json +5 -5
- package/tables/domains.sql +1 -0
- package/tables/saml_sso_connector_signing_keys.sql +21 -0
- package/tables/service_logs.sql +5 -0
- package/lib/types/logto-config/inline-hook.d.ts +0 -76
- package/lib/types/logto-config/inline-hook.js +0 -25
|
@@ -391,27 +391,42 @@ export type EmailBlocklistPolicy = {
|
|
|
391
391
|
blockDisposableAddresses?: boolean;
|
|
392
392
|
blockSubaddressing?: boolean;
|
|
393
393
|
/**
|
|
394
|
-
* Custom
|
|
394
|
+
* Custom allowlist of email addresses, domains, or wildcard email address patterns.
|
|
395
|
+
*
|
|
396
|
+
* The matching semantics are the same as {@link customBlocklist}.
|
|
397
|
+
*/
|
|
398
|
+
customAllowlist?: string[];
|
|
399
|
+
/**
|
|
400
|
+
* Custom blocklist of email addresses, domains, or wildcard email address patterns.
|
|
395
401
|
*
|
|
396
402
|
* @example
|
|
397
403
|
* Email address: abc@xyx.com
|
|
398
404
|
*
|
|
399
405
|
* @example
|
|
400
406
|
* Domain name: @xyz.com
|
|
407
|
+
*
|
|
408
|
+
* @example
|
|
409
|
+
* Wildcard email address pattern: foo*@example.com
|
|
410
|
+
*
|
|
411
|
+
* @example
|
|
412
|
+
* Wildcard domain pattern: @*.example.com
|
|
401
413
|
*/
|
|
402
414
|
customBlocklist?: string[];
|
|
403
415
|
};
|
|
404
416
|
export declare const emailBlocklistPolicyGuard: z.ZodObject<{
|
|
405
417
|
blockDisposableAddresses: z.ZodOptional<z.ZodBoolean>;
|
|
406
418
|
blockSubaddressing: z.ZodOptional<z.ZodBoolean>;
|
|
419
|
+
customAllowlist: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
407
420
|
customBlocklist: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
408
421
|
}, "strip", z.ZodTypeAny, {
|
|
409
422
|
blockDisposableAddresses?: boolean | undefined;
|
|
410
423
|
blockSubaddressing?: boolean | undefined;
|
|
424
|
+
customAllowlist?: string[] | undefined;
|
|
411
425
|
customBlocklist?: string[] | undefined;
|
|
412
426
|
}, {
|
|
413
427
|
blockDisposableAddresses?: boolean | undefined;
|
|
414
428
|
blockSubaddressing?: boolean | undefined;
|
|
429
|
+
customAllowlist?: string[] | undefined;
|
|
415
430
|
customBlocklist?: string[] | undefined;
|
|
416
431
|
}>;
|
|
417
432
|
export declare enum ForgotPasswordMethod {
|
|
@@ -130,6 +130,7 @@ export const verificationCodePolicyGuard = z.object({
|
|
|
130
130
|
export const emailBlocklistPolicyGuard = z.object({
|
|
131
131
|
blockDisposableAddresses: z.boolean().optional(),
|
|
132
132
|
blockSubaddressing: z.boolean().optional(),
|
|
133
|
+
customAllowlist: z.string().array().optional(),
|
|
133
134
|
customBlocklist: z.string().array().optional(),
|
|
134
135
|
});
|
|
135
136
|
export var ForgotPasswordMethod;
|
|
@@ -1,7 +1,137 @@
|
|
|
1
1
|
import { UserScope } from '@logto/core-kit';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { type Application } from '../db-entries/index.js';
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* The application response returned by Management APIs.
|
|
6
|
+
*
|
|
7
|
+
* The legacy client secret is only present before it has been replaced by an internal secret.
|
|
8
|
+
*/
|
|
9
|
+
export declare const applicationResponseGuard: z.ZodObject<{
|
|
10
|
+
tenantId: z.ZodType<string, z.ZodTypeDef, string>;
|
|
11
|
+
id: z.ZodType<string, z.ZodTypeDef, string>;
|
|
12
|
+
name: z.ZodType<string, z.ZodTypeDef, string>;
|
|
13
|
+
description: z.ZodType<string | null, z.ZodTypeDef, string | null>;
|
|
14
|
+
type: z.ZodType<import("../db-entries/custom-types.js").ApplicationType, z.ZodTypeDef, import("../db-entries/custom-types.js").ApplicationType>;
|
|
15
|
+
oidcClientMetadata: z.ZodType<import("../index.js").OidcClientMetadata, z.ZodTypeDef, import("../index.js").OidcClientMetadata>;
|
|
16
|
+
customClientMetadata: z.ZodType<{
|
|
17
|
+
corsAllowedOrigins?: string[] | undefined;
|
|
18
|
+
idTokenTtl?: number | undefined;
|
|
19
|
+
refreshTokenTtl?: number | undefined;
|
|
20
|
+
refreshTokenTtlInDays?: number | undefined;
|
|
21
|
+
tenantId?: string | undefined;
|
|
22
|
+
alwaysIssueRefreshToken?: boolean | undefined;
|
|
23
|
+
rotateRefreshToken?: boolean | undefined;
|
|
24
|
+
allowTokenExchange?: boolean | undefined;
|
|
25
|
+
isDeviceFlow?: boolean | undefined;
|
|
26
|
+
maxAllowedGrants?: number | undefined;
|
|
27
|
+
}, z.ZodTypeDef, {
|
|
28
|
+
corsAllowedOrigins?: string[] | undefined;
|
|
29
|
+
idTokenTtl?: number | undefined;
|
|
30
|
+
refreshTokenTtl?: number | undefined;
|
|
31
|
+
refreshTokenTtlInDays?: number | undefined;
|
|
32
|
+
tenantId?: string | undefined;
|
|
33
|
+
alwaysIssueRefreshToken?: boolean | undefined;
|
|
34
|
+
rotateRefreshToken?: boolean | undefined;
|
|
35
|
+
allowTokenExchange?: boolean | undefined;
|
|
36
|
+
isDeviceFlow?: boolean | undefined;
|
|
37
|
+
maxAllowedGrants?: number | undefined;
|
|
38
|
+
}>;
|
|
39
|
+
protectedAppMetadata: z.ZodType<{
|
|
40
|
+
host: string;
|
|
41
|
+
origin: string;
|
|
42
|
+
sessionDuration: number;
|
|
43
|
+
pageRules: {
|
|
44
|
+
path: string;
|
|
45
|
+
}[];
|
|
46
|
+
additionalScopes?: (UserScope.CustomData | UserScope.Identities | UserScope.Roles | UserScope.Organizations | UserScope.OrganizationRoles)[] | undefined;
|
|
47
|
+
customDomains?: {
|
|
48
|
+
status: import("../index.js").DomainStatus;
|
|
49
|
+
domain: string;
|
|
50
|
+
errorMessage: string | null;
|
|
51
|
+
dnsRecords: {
|
|
52
|
+
value: string;
|
|
53
|
+
type: string;
|
|
54
|
+
name: string;
|
|
55
|
+
}[];
|
|
56
|
+
cloudflareData: {
|
|
57
|
+
status: string;
|
|
58
|
+
id: string;
|
|
59
|
+
ssl: {
|
|
60
|
+
status: string;
|
|
61
|
+
validation_errors?: {
|
|
62
|
+
message: string;
|
|
63
|
+
}[] | undefined;
|
|
64
|
+
};
|
|
65
|
+
verification_errors?: string[] | undefined;
|
|
66
|
+
} | null;
|
|
67
|
+
}[] | undefined;
|
|
68
|
+
} | null, z.ZodTypeDef, {
|
|
69
|
+
host: string;
|
|
70
|
+
origin: string;
|
|
71
|
+
sessionDuration: number;
|
|
72
|
+
pageRules: {
|
|
73
|
+
path: string;
|
|
74
|
+
}[];
|
|
75
|
+
additionalScopes?: (UserScope.CustomData | UserScope.Identities | UserScope.Roles | UserScope.Organizations | UserScope.OrganizationRoles)[] | undefined;
|
|
76
|
+
customDomains?: {
|
|
77
|
+
status: import("../index.js").DomainStatus;
|
|
78
|
+
domain: string;
|
|
79
|
+
errorMessage: string | null;
|
|
80
|
+
dnsRecords: {
|
|
81
|
+
value: string;
|
|
82
|
+
type: string;
|
|
83
|
+
name: string;
|
|
84
|
+
}[];
|
|
85
|
+
cloudflareData: {
|
|
86
|
+
status: string;
|
|
87
|
+
id: string;
|
|
88
|
+
ssl: {
|
|
89
|
+
status: string;
|
|
90
|
+
validation_errors?: {
|
|
91
|
+
message: string;
|
|
92
|
+
}[] | undefined;
|
|
93
|
+
};
|
|
94
|
+
verification_errors?: string[] | undefined;
|
|
95
|
+
} | null;
|
|
96
|
+
}[] | undefined;
|
|
97
|
+
} | null>;
|
|
98
|
+
customData: z.ZodType<import("@withtyped/server").JsonObject, z.ZodTypeDef, import("@withtyped/server").JsonObject>;
|
|
99
|
+
isThirdParty: z.ZodType<boolean, z.ZodTypeDef, boolean>;
|
|
100
|
+
appLevelAccessControlEnabled: z.ZodType<boolean, z.ZodTypeDef, boolean>;
|
|
101
|
+
createdAt: z.ZodType<number, z.ZodTypeDef, number>;
|
|
102
|
+
} & {
|
|
103
|
+
secret: z.ZodOptional<z.ZodType<string, z.ZodTypeDef, string>>;
|
|
104
|
+
}, "strip", z.ZodTypeAny, {
|
|
105
|
+
type: import("../db-entries/custom-types.js").ApplicationType;
|
|
106
|
+
name: string;
|
|
107
|
+
id: string;
|
|
108
|
+
tenantId: string;
|
|
109
|
+
createdAt: number;
|
|
110
|
+
customData: import("@withtyped/server").JsonObject;
|
|
111
|
+
description: string | null;
|
|
112
|
+
oidcClientMetadata: import("../index.js").OidcClientMetadata;
|
|
113
|
+
customClientMetadata: import("../index.js").CustomClientMetadata;
|
|
114
|
+
protectedAppMetadata: import("../index.js").ProtectedAppMetadata | null;
|
|
115
|
+
isThirdParty: boolean;
|
|
116
|
+
appLevelAccessControlEnabled: boolean;
|
|
117
|
+
secret?: string | undefined;
|
|
118
|
+
}, {
|
|
119
|
+
type: import("../db-entries/custom-types.js").ApplicationType;
|
|
120
|
+
name: string;
|
|
121
|
+
id: string;
|
|
122
|
+
tenantId: string;
|
|
123
|
+
createdAt: number;
|
|
124
|
+
customData: import("@withtyped/server").JsonObject;
|
|
125
|
+
description: string | null;
|
|
126
|
+
oidcClientMetadata: import("../index.js").OidcClientMetadata;
|
|
127
|
+
customClientMetadata: import("../index.js").CustomClientMetadata;
|
|
128
|
+
protectedAppMetadata: import("../index.js").ProtectedAppMetadata | null;
|
|
129
|
+
isThirdParty: boolean;
|
|
130
|
+
appLevelAccessControlEnabled: boolean;
|
|
131
|
+
secret?: string | undefined;
|
|
132
|
+
}>;
|
|
133
|
+
export type ApplicationApiResponse = z.infer<typeof applicationResponseGuard>;
|
|
134
|
+
export type ApplicationResponse = ApplicationApiResponse & {
|
|
5
135
|
isAdmin: boolean;
|
|
6
136
|
};
|
|
7
137
|
/**
|
package/lib/types/application.js
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { UserScope } from '@logto/core-kit';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { Applications, OrganizationScopes, Resources, Scopes, ApplicationSignInExperiences, } from '../db-entries/index.js';
|
|
4
|
+
/**
|
|
5
|
+
* The application response returned by Management APIs.
|
|
6
|
+
*
|
|
7
|
+
* The legacy client secret is only present before it has been replaced by an internal secret.
|
|
8
|
+
*/
|
|
9
|
+
export const applicationResponseGuard = Applications.guard.extend({
|
|
10
|
+
secret: Applications.guard.shape.secret.optional(),
|
|
11
|
+
});
|
|
4
12
|
/** The guard for {@link FeaturedApplication}. */
|
|
5
13
|
export const featuredApplicationGuard = Applications.guard.pick({
|
|
6
14
|
id: true,
|
|
@@ -2545,7 +2545,7 @@ export declare const signInIdentifierKeyGuard: z.ZodObject<Pick<{
|
|
|
2545
2545
|
primaryEmail?: string | null;
|
|
2546
2546
|
primaryPhone?: string | null;
|
|
2547
2547
|
}>;
|
|
2548
|
-
export declare const reservedSignInIdentifierKeys: readonly ["username", "
|
|
2548
|
+
export declare const reservedSignInIdentifierKeys: readonly ["username", "primaryEmail", "primaryPhone", "email", "phone"];
|
|
2549
2549
|
/** Reserved user profile keys. Currently only `preferredUsername` is reserved for standard IdP usage. */
|
|
2550
2550
|
export declare const reservedBuiltInProfileKeyGuard: z.ZodObject<Pick<{
|
|
2551
2551
|
familyName: z.ZodOptional<z.ZodString>;
|
package/lib/types/domain.d.ts
CHANGED
|
@@ -15,6 +15,15 @@ export declare const domainResponseGuard: z.ZodObject<Pick<{
|
|
|
15
15
|
type: string;
|
|
16
16
|
name: string;
|
|
17
17
|
}[]>;
|
|
18
|
+
verificationFiles: z.ZodType<{
|
|
19
|
+
path: string;
|
|
20
|
+
content: string;
|
|
21
|
+
contentType: import("../index.js").DomainVerificationFileContentType;
|
|
22
|
+
}[], z.ZodTypeDef, {
|
|
23
|
+
path: string;
|
|
24
|
+
content: string;
|
|
25
|
+
contentType: import("../index.js").DomainVerificationFileContentType;
|
|
26
|
+
}[]>;
|
|
18
27
|
cloudflareData: z.ZodType<{
|
|
19
28
|
status: string;
|
|
20
29
|
id: string;
|
package/lib/types/hook.d.ts
CHANGED
|
@@ -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" | 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" | 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" | 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" | InteractionHookEvent)[]>;
|
|
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)[]>;
|
|
23
23
|
config: z.ZodType<{
|
|
24
24
|
url: string;
|
|
25
25
|
headers?: Record<string, string> | undefined;
|
|
@@ -143,5 +143,12 @@ export type DataHookEventPayload = {
|
|
|
143
143
|
export type ExceptionHookEventPayload = Omit<DataHookEventPayload, 'event'> & {
|
|
144
144
|
event: ExceptionHookEvent;
|
|
145
145
|
};
|
|
146
|
+
export type GrantLimitExceededEventData = {
|
|
147
|
+
userId: string;
|
|
148
|
+
applicationId: string;
|
|
149
|
+
revokedGrantIds: string[];
|
|
150
|
+
maxAllowedGrants: number;
|
|
151
|
+
preRevocationActiveGrantCount: number;
|
|
152
|
+
};
|
|
146
153
|
export type HookEventPayload = InteractionHookEventPayload | DataHookEventPayload | ExceptionHookEventPayload;
|
|
147
154
|
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* User interaction events defined in Logto RFC 0004.
|
|
4
|
+
* @see {@link https://github.com/logto-io/rfcs | Logto RFCs} for more information.
|
|
5
|
+
*/
|
|
6
|
+
export declare enum InteractionEvent {
|
|
7
|
+
SignIn = "SignIn",
|
|
8
|
+
Register = "Register",
|
|
9
|
+
ForgotPassword = "ForgotPassword"
|
|
10
|
+
}
|
|
11
|
+
export declare const eventGuard: z.ZodNativeEnum<typeof InteractionEvent>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* User interaction events defined in Logto RFC 0004.
|
|
4
|
+
* @see {@link https://github.com/logto-io/rfcs | Logto RFCs} for more information.
|
|
5
|
+
*/
|
|
6
|
+
export var InteractionEvent;
|
|
7
|
+
(function (InteractionEvent) {
|
|
8
|
+
InteractionEvent["SignIn"] = "SignIn";
|
|
9
|
+
InteractionEvent["Register"] = "Register";
|
|
10
|
+
InteractionEvent["ForgotPassword"] = "ForgotPassword";
|
|
11
|
+
})(InteractionEvent || (InteractionEvent = {}));
|
|
12
|
+
export const eventGuard = z.nativeEnum(InteractionEvent);
|
|
@@ -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,3 +1,4 @@
|
|
|
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';
|
|
@@ -6,6 +7,7 @@ import type * as token from './token.js';
|
|
|
6
7
|
export * as interaction from './interaction.js';
|
|
7
8
|
export * as token from './token.js';
|
|
8
9
|
export * as hook from './hook.js';
|
|
10
|
+
export * as action from './action.js';
|
|
9
11
|
export * as jwtCustomizer from './jwt-customizer.js';
|
|
10
12
|
export * as saml from './saml.js';
|
|
11
13
|
/** Fallback for empty or unrecognized log keys. */
|
|
@@ -13,6 +15,7 @@ export declare const LogKeyUnknown = "Unknown";
|
|
|
13
15
|
export type InteractionLogKey = interaction.LogKey;
|
|
14
16
|
export type TokenLogKey = token.LogKey;
|
|
15
17
|
export type WebhookLogKey = hook.LogKey;
|
|
18
|
+
export type ActionLogKey = action.LogKey;
|
|
16
19
|
export type JwtCustomizerLogKey = jwtCustomizer.LogKey;
|
|
17
20
|
export type SamlLogKey = saml.LogKey;
|
|
18
21
|
/**
|
|
@@ -21,11 +24,11 @@ export type SamlLogKey = saml.LogKey;
|
|
|
21
24
|
* - All user-facing audit log keys should be included here.
|
|
22
25
|
* - Webhook log keys are excluded.
|
|
23
26
|
*/
|
|
24
|
-
export type AuditLogKey = typeof LogKeyUnknown | InteractionLogKey | TokenLogKey | SamlLogKey | JwtCustomizerLogKey;
|
|
27
|
+
export type AuditLogKey = typeof LogKeyUnknown | InteractionLogKey | TokenLogKey | SamlLogKey | ActionLogKey | JwtCustomizerLogKey;
|
|
25
28
|
/**
|
|
26
29
|
* The union type of all available log keys.
|
|
27
30
|
* Note duplicate keys are allowed but should be avoided.
|
|
28
31
|
**/
|
|
29
32
|
export type LogKey = AuditLogKey | WebhookLogKey;
|
|
30
|
-
export type AuditLogPrefix = interaction.Prefix | token.Type | saml.Prefix | jwtCustomizer.Prefix | typeof LogKeyUnknown;
|
|
33
|
+
export type AuditLogPrefix = interaction.Prefix | token.Type | saml.Prefix | action.Prefix | jwtCustomizer.Prefix | typeof LogKeyUnknown;
|
|
31
34
|
export type WebhookLogPrefix = hook.Type;
|
package/lib/types/log/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
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';
|
|
6
7
|
/** Fallback for empty or unrecognized log keys. */
|