@logto/schemas 1.38.0 → 1.40.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.39.0-1774752400-add-delete-account-url.ts +20 -0
- package/alterations/1.39.0-1774770686-add-account-center-custom-css.ts +20 -0
- package/alterations/1.39.0-1776502301-add-sign-up-profile-fields.ts +20 -0
- package/alterations/1.40.0-1776516232-add-account-center-profile-fields.ts +20 -0
- package/alterations/1.40.0-1778318116-add-custom-ui-csp-to-sie.ts +20 -0
- package/alterations/1.40.0-1778500000-add-organization-user-relations-user-id-index.ts +41 -0
- package/alterations/1.40.0-1778500001-add-organization-role-user-relations-org-user-index.ts +43 -0
- package/alterations/1.40.0-1779421396-add-application-access-control-schema.ts +90 -0
- package/alterations-js/1.39.0-1774752400-add-delete-account-url.js +16 -0
- package/alterations-js/1.39.0-1774770686-add-account-center-custom-css.js +16 -0
- package/alterations-js/1.39.0-1776502301-add-sign-up-profile-fields.js +16 -0
- package/alterations-js/1.40.0-1776516232-add-account-center-profile-fields.js +16 -0
- package/alterations-js/1.40.0-1778318116-add-custom-ui-csp-to-sie.js +16 -0
- package/alterations-js/1.40.0-1778500000-add-organization-user-relations-user-id-index.js +37 -0
- package/alterations-js/1.40.0-1778500001-add-organization-role-user-relations-org-user-index.js +39 -0
- package/alterations-js/1.40.0-1779421396-add-application-access-control-schema.js +82 -0
- package/lib/consts/application.d.ts +1 -0
- package/lib/consts/application.js +1 -0
- package/lib/consts/index.d.ts +1 -0
- package/lib/consts/index.js +1 -0
- package/lib/db-entries/account-center.d.ts +14 -2
- package/lib/db-entries/account-center.js +13 -1
- package/lib/db-entries/application-access-control-org-role-relation.d.ts +22 -0
- package/lib/db-entries/application-access-control-org-role-relation.js +33 -0
- package/lib/db-entries/application-access-control-organization-relation.d.ts +20 -0
- package/lib/db-entries/application-access-control-organization-relation.js +29 -0
- package/lib/db-entries/application-access-control-user-relation.d.ts +20 -0
- package/lib/db-entries/application-access-control-user-relation.js +29 -0
- package/lib/db-entries/application-access-control-user-role-relation.d.ts +20 -0
- package/lib/db-entries/application-access-control-user-role-relation.js +29 -0
- package/lib/db-entries/application.d.ts +3 -1
- package/lib/db-entries/application.js +4 -0
- package/lib/db-entries/index.d.ts +4 -0
- package/lib/db-entries/index.js +4 -0
- package/lib/db-entries/sign-in-experience.d.ts +8 -2
- package/lib/db-entries/sign-in-experience.js +9 -1
- package/lib/foundations/jsonb-types/account-centers.d.ts +27 -0
- package/lib/foundations/jsonb-types/account-centers.js +12 -0
- package/lib/foundations/jsonb-types/applications.d.ts +3 -0
- package/lib/foundations/jsonb-types/applications.js +4 -0
- package/lib/foundations/jsonb-types/applications.test.d.ts +1 -0
- package/lib/foundations/jsonb-types/applications.test.js +23 -0
- package/lib/foundations/jsonb-types/sign-in-experience.d.ts +27 -1
- package/lib/foundations/jsonb-types/sign-in-experience.js +5 -0
- package/lib/foundations/jsonb-types/sign-in-experience.test.d.ts +1 -0
- package/lib/foundations/jsonb-types/sign-in-experience.test.js +18 -0
- package/lib/seeds/application.js +2 -0
- package/lib/seeds/sign-in-experience.d.ts +13 -1
- package/lib/seeds/sign-in-experience.js +10 -1
- package/lib/seeds/sign-in-experience.test.d.ts +1 -0
- package/lib/seeds/sign-in-experience.test.js +27 -0
- package/lib/types/alteration.d.ts +5 -0
- package/lib/types/application.d.ts +101 -2
- package/lib/types/application.js +55 -0
- package/lib/types/application.test.d.ts +1 -0
- package/lib/types/application.test.js +120 -0
- package/lib/types/consent.d.ts +6 -0
- package/lib/types/custom-profile-fields.d.ts +7 -13
- package/lib/types/custom-profile-fields.js +6 -13
- package/lib/types/logto-config/index.d.ts +93 -2
- package/lib/types/logto-config/index.js +22 -4
- package/lib/types/logto-config/index.test.d.ts +1 -0
- package/lib/types/logto-config/index.test.js +29 -0
- package/lib/types/logto-config/jwt-customizer.d.ts +74 -0
- package/lib/types/logto-config/jwt-customizer.js +1 -0
- package/lib/types/logto-config/jwt-customizer.test.js +14 -2
- package/lib/types/onboarding.d.ts +93 -1
- package/lib/types/onboarding.js +22 -1
- package/lib/types/saml-application.d.ts +3 -0
- package/lib/types/sign-in-experience.d.ts +23 -2
- package/lib/types/sign-in-experience.js +1 -0
- package/lib/types/system.d.ts +46 -7
- package/lib/types/system.js +9 -0
- package/lib/types/user-assets.d.ts +1 -1
- package/lib/types/user-logto-config.d.ts +11 -0
- package/lib/types/user-logto-config.js +6 -0
- package/lib/types/user-sessions.d.ts +2516 -0
- package/lib/types/user-sessions.js +21 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +1 -0
- package/lib/utils/oidc-private-key.d.ts +88 -0
- package/lib/utils/oidc-private-key.js +163 -0
- package/lib/utils/oidc-private-key.test.d.ts +1 -0
- package/lib/utils/oidc-private-key.test.js +128 -0
- package/package.json +6 -6
- package/tables/account_centers.sql +6 -0
- package/tables/application_access_control_org_role_relations.sql +16 -0
- package/tables/application_access_control_organization_relations.sql +12 -0
- package/tables/application_access_control_user_relations.sql +12 -0
- package/tables/application_access_control_user_role_relations.sql +14 -0
- package/tables/applications.sql +1 -0
- package/tables/organization_role_user_relations.sql +3 -0
- package/tables/organization_user_relations.sql +3 -0
- package/tables/sign_in_experiences.sql +3 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const userOnboardingDataKey = "onboarding";
|
|
3
|
+
export declare const ossUserOnboardingDataKey = "ossOnboarding";
|
|
3
4
|
export declare enum Project {
|
|
4
5
|
Personal = "personal",
|
|
5
6
|
Company = "company"
|
|
@@ -18,7 +19,6 @@ export declare enum Title {
|
|
|
18
19
|
Product = "product",
|
|
19
20
|
Others = "others"
|
|
20
21
|
}
|
|
21
|
-
/** @deprecated */
|
|
22
22
|
export declare enum CompanySize {
|
|
23
23
|
Scale1 = "1",
|
|
24
24
|
Scale2 = "2-49",
|
|
@@ -81,6 +81,52 @@ declare const questionnaireGuard: z.ZodObject<{
|
|
|
81
81
|
additionalFeatures?: AdditionalFeatures[] | undefined;
|
|
82
82
|
}>;
|
|
83
83
|
export type Questionnaire = z.infer<typeof questionnaireGuard>;
|
|
84
|
+
declare const ossQuestionnaireGuard: z.ZodObject<{
|
|
85
|
+
emailAddress: z.ZodOptional<z.ZodString>;
|
|
86
|
+
newsletter: z.ZodOptional<z.ZodBoolean>;
|
|
87
|
+
project: z.ZodOptional<z.ZodNativeEnum<typeof Project>>;
|
|
88
|
+
projectName: z.ZodOptional<z.ZodString>;
|
|
89
|
+
companyName: z.ZodOptional<z.ZodString>;
|
|
90
|
+
companySize: z.ZodOptional<z.ZodNativeEnum<typeof CompanySize>>;
|
|
91
|
+
}, "strip", z.ZodTypeAny, {
|
|
92
|
+
project?: Project | undefined;
|
|
93
|
+
companyName?: string | undefined;
|
|
94
|
+
companySize?: CompanySize | undefined;
|
|
95
|
+
emailAddress?: string | undefined;
|
|
96
|
+
newsletter?: boolean | undefined;
|
|
97
|
+
projectName?: string | undefined;
|
|
98
|
+
}, {
|
|
99
|
+
project?: Project | undefined;
|
|
100
|
+
companyName?: string | undefined;
|
|
101
|
+
companySize?: CompanySize | undefined;
|
|
102
|
+
emailAddress?: string | undefined;
|
|
103
|
+
newsletter?: boolean | undefined;
|
|
104
|
+
projectName?: string | undefined;
|
|
105
|
+
}>;
|
|
106
|
+
export type OssQuestionnaire = z.infer<typeof ossQuestionnaireGuard>;
|
|
107
|
+
export declare const ossSurveyReportPayloadGuard: z.ZodObject<{
|
|
108
|
+
emailAddress: z.ZodString;
|
|
109
|
+
newsletter: z.ZodOptional<z.ZodBoolean>;
|
|
110
|
+
project: z.ZodNativeEnum<typeof Project>;
|
|
111
|
+
projectName: z.ZodOptional<z.ZodString>;
|
|
112
|
+
companyName: z.ZodOptional<z.ZodString>;
|
|
113
|
+
companySize: z.ZodOptional<z.ZodNativeEnum<typeof CompanySize>>;
|
|
114
|
+
}, "strip", z.ZodTypeAny, {
|
|
115
|
+
project: Project;
|
|
116
|
+
emailAddress: string;
|
|
117
|
+
companyName?: string | undefined;
|
|
118
|
+
companySize?: CompanySize | undefined;
|
|
119
|
+
newsletter?: boolean | undefined;
|
|
120
|
+
projectName?: string | undefined;
|
|
121
|
+
}, {
|
|
122
|
+
project: Project;
|
|
123
|
+
emailAddress: string;
|
|
124
|
+
companyName?: string | undefined;
|
|
125
|
+
companySize?: CompanySize | undefined;
|
|
126
|
+
newsletter?: boolean | undefined;
|
|
127
|
+
projectName?: string | undefined;
|
|
128
|
+
}>;
|
|
129
|
+
export type OssSurveyReportPayload = z.infer<typeof ossSurveyReportPayloadGuard>;
|
|
84
130
|
export declare const userOnboardingDataGuard: z.ZodObject<{
|
|
85
131
|
questionnaire: z.ZodOptional<z.ZodObject<{
|
|
86
132
|
project: z.ZodOptional<z.ZodNativeEnum<typeof Project>>;
|
|
@@ -141,4 +187,50 @@ export declare const userOnboardingDataGuard: z.ZodObject<{
|
|
|
141
187
|
isOnboardingDone?: boolean | undefined;
|
|
142
188
|
}>;
|
|
143
189
|
export type UserOnboardingData = z.infer<typeof userOnboardingDataGuard>;
|
|
190
|
+
export declare const ossUserOnboardingDataGuard: z.ZodObject<{
|
|
191
|
+
questionnaire: z.ZodOptional<z.ZodObject<{
|
|
192
|
+
emailAddress: z.ZodOptional<z.ZodString>;
|
|
193
|
+
newsletter: z.ZodOptional<z.ZodBoolean>;
|
|
194
|
+
project: z.ZodOptional<z.ZodNativeEnum<typeof Project>>;
|
|
195
|
+
projectName: z.ZodOptional<z.ZodString>;
|
|
196
|
+
companyName: z.ZodOptional<z.ZodString>;
|
|
197
|
+
companySize: z.ZodOptional<z.ZodNativeEnum<typeof CompanySize>>;
|
|
198
|
+
}, "strip", z.ZodTypeAny, {
|
|
199
|
+
project?: Project | undefined;
|
|
200
|
+
companyName?: string | undefined;
|
|
201
|
+
companySize?: CompanySize | undefined;
|
|
202
|
+
emailAddress?: string | undefined;
|
|
203
|
+
newsletter?: boolean | undefined;
|
|
204
|
+
projectName?: string | undefined;
|
|
205
|
+
}, {
|
|
206
|
+
project?: Project | undefined;
|
|
207
|
+
companyName?: string | undefined;
|
|
208
|
+
companySize?: CompanySize | undefined;
|
|
209
|
+
emailAddress?: string | undefined;
|
|
210
|
+
newsletter?: boolean | undefined;
|
|
211
|
+
projectName?: string | undefined;
|
|
212
|
+
}>>;
|
|
213
|
+
isOnboardingDone: z.ZodOptional<z.ZodBoolean>;
|
|
214
|
+
}, "strip", z.ZodTypeAny, {
|
|
215
|
+
questionnaire?: {
|
|
216
|
+
project?: Project | undefined;
|
|
217
|
+
companyName?: string | undefined;
|
|
218
|
+
companySize?: CompanySize | undefined;
|
|
219
|
+
emailAddress?: string | undefined;
|
|
220
|
+
newsletter?: boolean | undefined;
|
|
221
|
+
projectName?: string | undefined;
|
|
222
|
+
} | undefined;
|
|
223
|
+
isOnboardingDone?: boolean | undefined;
|
|
224
|
+
}, {
|
|
225
|
+
questionnaire?: {
|
|
226
|
+
project?: Project | undefined;
|
|
227
|
+
companyName?: string | undefined;
|
|
228
|
+
companySize?: CompanySize | undefined;
|
|
229
|
+
emailAddress?: string | undefined;
|
|
230
|
+
newsletter?: boolean | undefined;
|
|
231
|
+
projectName?: string | undefined;
|
|
232
|
+
} | undefined;
|
|
233
|
+
isOnboardingDone?: boolean | undefined;
|
|
234
|
+
}>;
|
|
235
|
+
export type OssUserOnboardingData = z.infer<typeof ossUserOnboardingDataGuard>;
|
|
144
236
|
export {};
|
package/lib/types/onboarding.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export const userOnboardingDataKey = 'onboarding';
|
|
3
|
+
export const ossUserOnboardingDataKey = 'ossOnboarding';
|
|
3
4
|
export var Project;
|
|
4
5
|
(function (Project) {
|
|
5
6
|
Project["Personal"] = "personal";
|
|
@@ -21,7 +22,6 @@ export var Title;
|
|
|
21
22
|
Title["Product"] = "product";
|
|
22
23
|
Title["Others"] = "others";
|
|
23
24
|
})(Title || (Title = {}));
|
|
24
|
-
/** @deprecated */
|
|
25
25
|
export var CompanySize;
|
|
26
26
|
(function (CompanySize) {
|
|
27
27
|
CompanySize["Scale1"] = "1";
|
|
@@ -30,6 +30,7 @@ export var CompanySize;
|
|
|
30
30
|
CompanySize["Scale4"] = "200-999";
|
|
31
31
|
CompanySize["Scale5"] = "1000+";
|
|
32
32
|
})(CompanySize || (CompanySize = {}));
|
|
33
|
+
// Kept as a shared enum for OSS onboarding and existing questionnaire payloads.
|
|
33
34
|
/** @deprecated */
|
|
34
35
|
export var Reason;
|
|
35
36
|
(function (Reason) {
|
|
@@ -69,7 +70,27 @@ const questionnaireGuard = z.object({
|
|
|
69
70
|
stage: z.nativeEnum(Stage).optional(),
|
|
70
71
|
additionalFeatures: z.array(z.nativeEnum(AdditionalFeatures)).optional(),
|
|
71
72
|
});
|
|
73
|
+
const ossQuestionnaireGuard = z.object({
|
|
74
|
+
emailAddress: z.string().optional(),
|
|
75
|
+
newsletter: z.boolean().optional(),
|
|
76
|
+
project: z.nativeEnum(Project).optional(),
|
|
77
|
+
projectName: z.string().max(200).optional(),
|
|
78
|
+
companyName: z.string().optional(),
|
|
79
|
+
companySize: z.nativeEnum(CompanySize).optional(),
|
|
80
|
+
});
|
|
81
|
+
export const ossSurveyReportPayloadGuard = z.object({
|
|
82
|
+
emailAddress: z.string().email().max(320),
|
|
83
|
+
newsletter: z.boolean().optional(),
|
|
84
|
+
project: z.nativeEnum(Project),
|
|
85
|
+
projectName: z.string().max(200).optional(),
|
|
86
|
+
companyName: z.string().max(200).optional(),
|
|
87
|
+
companySize: z.nativeEnum(CompanySize).optional(),
|
|
88
|
+
});
|
|
72
89
|
export const userOnboardingDataGuard = z.object({
|
|
73
90
|
questionnaire: questionnaireGuard.optional(),
|
|
74
91
|
isOnboardingDone: z.boolean().optional(),
|
|
75
92
|
});
|
|
93
|
+
export const ossUserOnboardingDataGuard = z.object({
|
|
94
|
+
questionnaire: ossQuestionnaireGuard.optional(),
|
|
95
|
+
isOnboardingDone: z.boolean().optional(),
|
|
96
|
+
});
|
|
@@ -101,6 +101,7 @@ export declare const samlApplicationResponseGuard: z.ZodObject<{
|
|
|
101
101
|
customData: z.ZodType<import("@withtyped/server/lib/types.js").JsonObject, z.ZodTypeDef, import("@withtyped/server/lib/types.js").JsonObject>;
|
|
102
102
|
description: z.ZodType<string | null, z.ZodTypeDef, string | null>;
|
|
103
103
|
isThirdParty: z.ZodType<boolean, z.ZodTypeDef, boolean>;
|
|
104
|
+
appLevelAccessControlEnabled: z.ZodType<boolean, z.ZodTypeDef, boolean>;
|
|
104
105
|
attributeMapping: z.ZodType<Partial<Record<"name" | "username" | "email" | "sub" | "nickname" | "profile" | "website" | "gender" | "birthdate" | "zoneinfo" | "locale" | "address" | "given_name" | "family_name" | "middle_name" | "preferred_username" | "picture" | "email_verified" | "phone_number" | "phone_number_verified" | "updated_at" | "created_at" | "custom_data" | "identities" | "sso_identities" | "roles" | "organizations" | "organization_data" | "organization_roles", string>>, z.ZodTypeDef, Partial<Record<"name" | "username" | "email" | "sub" | "nickname" | "profile" | "website" | "gender" | "birthdate" | "zoneinfo" | "locale" | "address" | "given_name" | "family_name" | "middle_name" | "preferred_username" | "picture" | "email_verified" | "phone_number" | "phone_number_verified" | "updated_at" | "created_at" | "custom_data" | "identities" | "sso_identities" | "roles" | "organizations" | "organization_data" | "organization_roles", string>>>;
|
|
105
106
|
entityId: z.ZodType<string | null, z.ZodTypeDef, string | null>;
|
|
106
107
|
acsUrl: z.ZodType<import("../foundations/index.js").SamlAcsUrl | null, z.ZodTypeDef, import("../foundations/index.js").SamlAcsUrl | null>;
|
|
@@ -124,6 +125,7 @@ export declare const samlApplicationResponseGuard: z.ZodObject<{
|
|
|
124
125
|
customData: import("@withtyped/server/lib/types.js").JsonObject;
|
|
125
126
|
description: string | null;
|
|
126
127
|
isThirdParty: boolean;
|
|
128
|
+
appLevelAccessControlEnabled: boolean;
|
|
127
129
|
attributeMapping: import("../foundations/index.js").SamlAttributeMapping;
|
|
128
130
|
entityId: string | null;
|
|
129
131
|
acsUrl: import("../foundations/index.js").SamlAcsUrl | null;
|
|
@@ -138,6 +140,7 @@ export declare const samlApplicationResponseGuard: z.ZodObject<{
|
|
|
138
140
|
customData: import("@withtyped/server/lib/types.js").JsonObject;
|
|
139
141
|
description: string | null;
|
|
140
142
|
isThirdParty: boolean;
|
|
143
|
+
appLevelAccessControlEnabled: boolean;
|
|
141
144
|
attributeMapping: import("../foundations/index.js").SamlAttributeMapping;
|
|
142
145
|
entityId: string | null;
|
|
143
146
|
acsUrl: import("../foundations/index.js").SamlAcsUrl | null;
|
|
@@ -35,7 +35,15 @@ export type FullSignInExperience = Omit<SignInExperience, 'forgotPasswordMethods
|
|
|
35
35
|
domain?: string;
|
|
36
36
|
mode?: RecaptchaEnterpriseMode;
|
|
37
37
|
};
|
|
38
|
+
/**
|
|
39
|
+
* Custom profile fields selected for the sign-up (Collect user profile) flow.
|
|
40
|
+
*/
|
|
38
41
|
customProfileFields?: Readonly<CustomProfileField[]>;
|
|
42
|
+
/**
|
|
43
|
+
* Full custom profile field catalog used to resolve field metadata (for example `required`
|
|
44
|
+
* and `type`) outside the sign-up field list, such as the account center profile page.
|
|
45
|
+
*/
|
|
46
|
+
customProfileFieldCatalog?: Readonly<CustomProfileField[]>;
|
|
39
47
|
};
|
|
40
48
|
export declare const fullSignInExperienceGuard: z.ZodObject<Omit<{
|
|
41
49
|
tenantId: z.ZodType<string, z.ZodTypeDef, string>;
|
|
@@ -99,6 +107,7 @@ export declare const fullSignInExperienceGuard: z.ZodObject<Omit<{
|
|
|
99
107
|
id: string;
|
|
100
108
|
createdAt: number;
|
|
101
109
|
} | null>;
|
|
110
|
+
customUiCsp: z.ZodType<import("../foundations/jsonb-types/index.js").CustomUiCsp, z.ZodTypeDef, import("../foundations/jsonb-types/index.js").CustomUiCsp>;
|
|
102
111
|
passwordPolicy: z.ZodType<{
|
|
103
112
|
length?: {
|
|
104
113
|
min?: number | undefined;
|
|
@@ -143,6 +152,11 @@ export declare const fullSignInExperienceGuard: z.ZodObject<Omit<{
|
|
|
143
152
|
emailBlocklistPolicy: z.ZodType<import("../foundations/jsonb-types/sign-in-experience.js").EmailBlocklistPolicy, z.ZodTypeDef, import("../foundations/jsonb-types/sign-in-experience.js").EmailBlocklistPolicy>;
|
|
144
153
|
forgotPasswordMethods: z.ZodType<import("../foundations/jsonb-types/sign-in-experience.js").ForgotPasswordMethod[] | null, z.ZodTypeDef, import("../foundations/jsonb-types/sign-in-experience.js").ForgotPasswordMethod[] | null>;
|
|
145
154
|
passkeySignIn: z.ZodType<import("../foundations/jsonb-types/sign-in-experience.js").PasskeySignIn, z.ZodTypeDef, import("../foundations/jsonb-types/sign-in-experience.js").PasskeySignIn>;
|
|
155
|
+
signUpProfileFields: z.ZodType<{
|
|
156
|
+
name: string;
|
|
157
|
+
}[] | null, z.ZodTypeDef, {
|
|
158
|
+
name: string;
|
|
159
|
+
}[] | null>;
|
|
146
160
|
}, "forgotPasswordMethods"> & {
|
|
147
161
|
socialConnectors: z.ZodArray<z.ZodObject<Omit<{
|
|
148
162
|
id: z.ZodString;
|
|
@@ -694,13 +708,14 @@ export declare const fullSignInExperienceGuard: z.ZodObject<Omit<{
|
|
|
694
708
|
mode?: RecaptchaEnterpriseMode | undefined;
|
|
695
709
|
}>>;
|
|
696
710
|
customProfileFields: z.ZodArray<import("../index.js").Guard<CustomProfileField>, "many">;
|
|
711
|
+
customProfileFieldCatalog: z.ZodOptional<z.ZodArray<import("../index.js").Guard<CustomProfileField>, "many">>;
|
|
697
712
|
}, "strip", z.ZodTypeAny, {
|
|
698
713
|
id: string;
|
|
699
714
|
tenantId: string;
|
|
700
715
|
mfa: import("../foundations/jsonb-types/sign-in-experience.js").Mfa;
|
|
716
|
+
customCss: string | null;
|
|
701
717
|
color: import("../foundations/jsonb-types/sign-in-experience.js").Color;
|
|
702
718
|
branding: import("../foundations/jsonb-types/sign-in-experience.js").Branding;
|
|
703
|
-
customCss: string | null;
|
|
704
719
|
termsOfUseUrl: string | null;
|
|
705
720
|
privacyPolicyUrl: string | null;
|
|
706
721
|
hideLogtoBranding: boolean;
|
|
@@ -713,6 +728,7 @@ export declare const fullSignInExperienceGuard: z.ZodObject<Omit<{
|
|
|
713
728
|
signInMode: import("../db-entries/custom-types.js").SignInMode;
|
|
714
729
|
customContent: import("../foundations/jsonb-types/sign-in-experience.js").CustomContent;
|
|
715
730
|
customUiAssets: import("../foundations/jsonb-types/sign-in-experience.js").CustomUiAssets | null;
|
|
731
|
+
customUiCsp: import("../foundations/jsonb-types/index.js").CustomUiCsp;
|
|
716
732
|
passwordPolicy: import("../foundations/jsonb-types/logs.js").PartialPasswordPolicy;
|
|
717
733
|
adaptiveMfa: import("../foundations/jsonb-types/sign-in-experience.js").AdaptiveMfa;
|
|
718
734
|
singleSignOnEnabled: boolean;
|
|
@@ -723,6 +739,7 @@ export declare const fullSignInExperienceGuard: z.ZodObject<Omit<{
|
|
|
723
739
|
sentinelPolicy: import("../foundations/jsonb-types/sign-in-experience.js").SentinelPolicy;
|
|
724
740
|
emailBlocklistPolicy: import("../foundations/jsonb-types/sign-in-experience.js").EmailBlocklistPolicy;
|
|
725
741
|
passkeySignIn: import("../foundations/jsonb-types/sign-in-experience.js").PasskeySignIn;
|
|
742
|
+
signUpProfileFields: import("../foundations/jsonb-types/sign-in-experience.js").SignUpProfileFields | null;
|
|
726
743
|
socialConnectors: {
|
|
727
744
|
name: {
|
|
728
745
|
en: string;
|
|
@@ -891,13 +908,14 @@ export declare const fullSignInExperienceGuard: z.ZodObject<Omit<{
|
|
|
891
908
|
domain?: string | undefined;
|
|
892
909
|
mode?: RecaptchaEnterpriseMode | undefined;
|
|
893
910
|
} | undefined;
|
|
911
|
+
customProfileFieldCatalog?: CustomProfileField[] | undefined;
|
|
894
912
|
}, {
|
|
895
913
|
id: string;
|
|
896
914
|
tenantId: string;
|
|
897
915
|
mfa: import("../foundations/jsonb-types/sign-in-experience.js").Mfa;
|
|
916
|
+
customCss: string | null;
|
|
898
917
|
color: import("../foundations/jsonb-types/sign-in-experience.js").Color;
|
|
899
918
|
branding: import("../foundations/jsonb-types/sign-in-experience.js").Branding;
|
|
900
|
-
customCss: string | null;
|
|
901
919
|
termsOfUseUrl: string | null;
|
|
902
920
|
privacyPolicyUrl: string | null;
|
|
903
921
|
hideLogtoBranding: boolean;
|
|
@@ -910,6 +928,7 @@ export declare const fullSignInExperienceGuard: z.ZodObject<Omit<{
|
|
|
910
928
|
signInMode: import("../db-entries/custom-types.js").SignInMode;
|
|
911
929
|
customContent: import("../foundations/jsonb-types/sign-in-experience.js").CustomContent;
|
|
912
930
|
customUiAssets: import("../foundations/jsonb-types/sign-in-experience.js").CustomUiAssets | null;
|
|
931
|
+
customUiCsp: import("../foundations/jsonb-types/index.js").CustomUiCsp;
|
|
913
932
|
passwordPolicy: import("../foundations/jsonb-types/logs.js").PartialPasswordPolicy;
|
|
914
933
|
adaptiveMfa: import("../foundations/jsonb-types/sign-in-experience.js").AdaptiveMfa;
|
|
915
934
|
singleSignOnEnabled: boolean;
|
|
@@ -920,6 +939,7 @@ export declare const fullSignInExperienceGuard: z.ZodObject<Omit<{
|
|
|
920
939
|
sentinelPolicy: import("../foundations/jsonb-types/sign-in-experience.js").SentinelPolicy;
|
|
921
940
|
emailBlocklistPolicy: import("../foundations/jsonb-types/sign-in-experience.js").EmailBlocklistPolicy;
|
|
922
941
|
passkeySignIn: import("../foundations/jsonb-types/sign-in-experience.js").PasskeySignIn;
|
|
942
|
+
signUpProfileFields: import("../foundations/jsonb-types/sign-in-experience.js").SignUpProfileFields | null;
|
|
923
943
|
socialConnectors: {
|
|
924
944
|
name: {
|
|
925
945
|
en: string;
|
|
@@ -1088,5 +1108,6 @@ export declare const fullSignInExperienceGuard: z.ZodObject<Omit<{
|
|
|
1088
1108
|
domain?: string | undefined;
|
|
1089
1109
|
mode?: RecaptchaEnterpriseMode | undefined;
|
|
1090
1110
|
} | undefined;
|
|
1111
|
+
customProfileFieldCatalog?: CustomProfileField[] | undefined;
|
|
1091
1112
|
}>;
|
|
1092
1113
|
export {};
|
package/lib/types/system.d.ts
CHANGED
|
@@ -94,46 +94,85 @@ export declare const storageProviderGuard: Readonly<{
|
|
|
94
94
|
[key in StorageProviderKey]: ZodType<StorageProviderType[key]>;
|
|
95
95
|
}>;
|
|
96
96
|
export declare enum EmailServiceProvider {
|
|
97
|
-
SendGrid = "SendGrid"
|
|
97
|
+
SendGrid = "SendGrid",
|
|
98
|
+
Cloudflare = "Cloudflare"
|
|
98
99
|
}
|
|
99
100
|
export declare const sendgridEmailServiceConfigGuard: z.ZodObject<{
|
|
100
|
-
provider: z.ZodLiteral<EmailServiceProvider>;
|
|
101
|
+
provider: z.ZodLiteral<EmailServiceProvider.SendGrid>;
|
|
101
102
|
apiKey: z.ZodString;
|
|
102
103
|
templateId: z.ZodString;
|
|
103
104
|
fromName: z.ZodString;
|
|
104
105
|
fromEmail: z.ZodString;
|
|
105
106
|
}, "strip", z.ZodTypeAny, {
|
|
106
107
|
fromEmail: string;
|
|
107
|
-
provider: EmailServiceProvider;
|
|
108
|
+
provider: EmailServiceProvider.SendGrid;
|
|
108
109
|
apiKey: string;
|
|
109
110
|
templateId: string;
|
|
110
111
|
fromName: string;
|
|
111
112
|
}, {
|
|
112
113
|
fromEmail: string;
|
|
113
|
-
provider: EmailServiceProvider;
|
|
114
|
+
provider: EmailServiceProvider.SendGrid;
|
|
114
115
|
apiKey: string;
|
|
115
116
|
templateId: string;
|
|
116
117
|
fromName: string;
|
|
117
118
|
}>;
|
|
118
119
|
export type SendgridEmailServiceConfig = z.infer<typeof sendgridEmailServiceConfigGuard>;
|
|
120
|
+
export declare const cloudflareEmailServiceConfigGuard: z.ZodObject<{
|
|
121
|
+
provider: z.ZodLiteral<EmailServiceProvider.Cloudflare>;
|
|
122
|
+
apiKey: z.ZodString;
|
|
123
|
+
accountId: z.ZodString;
|
|
124
|
+
fromName: z.ZodString;
|
|
125
|
+
fromEmail: z.ZodString;
|
|
126
|
+
}, "strip", z.ZodTypeAny, {
|
|
127
|
+
accountId: string;
|
|
128
|
+
fromEmail: string;
|
|
129
|
+
provider: EmailServiceProvider.Cloudflare;
|
|
130
|
+
apiKey: string;
|
|
131
|
+
fromName: string;
|
|
132
|
+
}, {
|
|
133
|
+
accountId: string;
|
|
134
|
+
fromEmail: string;
|
|
135
|
+
provider: EmailServiceProvider.Cloudflare;
|
|
136
|
+
apiKey: string;
|
|
137
|
+
fromName: string;
|
|
138
|
+
}>;
|
|
139
|
+
export type CloudflareEmailServiceConfig = z.infer<typeof cloudflareEmailServiceConfigGuard>;
|
|
119
140
|
export declare const emailServiceConfigGuard: z.ZodDiscriminatedUnion<"provider", [z.ZodObject<{
|
|
120
|
-
provider: z.ZodLiteral<EmailServiceProvider>;
|
|
141
|
+
provider: z.ZodLiteral<EmailServiceProvider.SendGrid>;
|
|
121
142
|
apiKey: z.ZodString;
|
|
122
143
|
templateId: z.ZodString;
|
|
123
144
|
fromName: z.ZodString;
|
|
124
145
|
fromEmail: z.ZodString;
|
|
125
146
|
}, "strip", z.ZodTypeAny, {
|
|
126
147
|
fromEmail: string;
|
|
127
|
-
provider: EmailServiceProvider;
|
|
148
|
+
provider: EmailServiceProvider.SendGrid;
|
|
128
149
|
apiKey: string;
|
|
129
150
|
templateId: string;
|
|
130
151
|
fromName: string;
|
|
131
152
|
}, {
|
|
132
153
|
fromEmail: string;
|
|
133
|
-
provider: EmailServiceProvider;
|
|
154
|
+
provider: EmailServiceProvider.SendGrid;
|
|
134
155
|
apiKey: string;
|
|
135
156
|
templateId: string;
|
|
136
157
|
fromName: string;
|
|
158
|
+
}>, z.ZodObject<{
|
|
159
|
+
provider: z.ZodLiteral<EmailServiceProvider.Cloudflare>;
|
|
160
|
+
apiKey: z.ZodString;
|
|
161
|
+
accountId: z.ZodString;
|
|
162
|
+
fromName: z.ZodString;
|
|
163
|
+
fromEmail: z.ZodString;
|
|
164
|
+
}, "strip", z.ZodTypeAny, {
|
|
165
|
+
accountId: string;
|
|
166
|
+
fromEmail: string;
|
|
167
|
+
provider: EmailServiceProvider.Cloudflare;
|
|
168
|
+
apiKey: string;
|
|
169
|
+
fromName: string;
|
|
170
|
+
}, {
|
|
171
|
+
accountId: string;
|
|
172
|
+
fromEmail: string;
|
|
173
|
+
provider: EmailServiceProvider.Cloudflare;
|
|
174
|
+
apiKey: string;
|
|
175
|
+
fromName: string;
|
|
137
176
|
}>]>;
|
|
138
177
|
export type EmailServiceConfig = z.infer<typeof emailServiceConfigGuard>;
|
|
139
178
|
export declare enum EmailServiceProviderKey {
|
package/lib/types/system.js
CHANGED
|
@@ -60,6 +60,7 @@ export const storageProviderGuard = Object.freeze({
|
|
|
60
60
|
export var EmailServiceProvider;
|
|
61
61
|
(function (EmailServiceProvider) {
|
|
62
62
|
EmailServiceProvider["SendGrid"] = "SendGrid";
|
|
63
|
+
EmailServiceProvider["Cloudflare"] = "Cloudflare";
|
|
63
64
|
})(EmailServiceProvider || (EmailServiceProvider = {}));
|
|
64
65
|
export const sendgridEmailServiceConfigGuard = z.object({
|
|
65
66
|
provider: z.literal(EmailServiceProvider.SendGrid),
|
|
@@ -68,8 +69,16 @@ export const sendgridEmailServiceConfigGuard = z.object({
|
|
|
68
69
|
fromName: z.string(),
|
|
69
70
|
fromEmail: z.string(),
|
|
70
71
|
});
|
|
72
|
+
export const cloudflareEmailServiceConfigGuard = z.object({
|
|
73
|
+
provider: z.literal(EmailServiceProvider.Cloudflare),
|
|
74
|
+
apiKey: z.string(),
|
|
75
|
+
accountId: z.string(),
|
|
76
|
+
fromName: z.string(),
|
|
77
|
+
fromEmail: z.string(),
|
|
78
|
+
});
|
|
71
79
|
export const emailServiceConfigGuard = z.discriminatedUnion('provider', [
|
|
72
80
|
sendgridEmailServiceConfigGuard,
|
|
81
|
+
cloudflareEmailServiceConfigGuard,
|
|
73
82
|
]);
|
|
74
83
|
export var EmailServiceProviderKey;
|
|
75
84
|
(function (EmailServiceProviderKey) {
|
|
@@ -42,7 +42,7 @@ export declare const uploadFileGuard: z.ZodObject<{
|
|
|
42
42
|
size: number;
|
|
43
43
|
}>;
|
|
44
44
|
type MimeTypeToFileExtensionMappings = {
|
|
45
|
-
[key in AllowedUploadMimeType]: readonly string[];
|
|
45
|
+
[key in AllowedUploadMimeType]: readonly [string, ...string[]];
|
|
46
46
|
};
|
|
47
47
|
export declare const mimeTypeToFileExtensionMappings: MimeTypeToFileExtensionMappings;
|
|
48
48
|
export {};
|
|
@@ -58,6 +58,17 @@ export declare const userPasskeySignInDataGuard: z.ZodObject<{
|
|
|
58
58
|
skipped?: boolean | undefined;
|
|
59
59
|
}>;
|
|
60
60
|
export type UserPasskeySignInData = z.infer<typeof userPasskeySignInDataGuard>;
|
|
61
|
+
/**
|
|
62
|
+
* Schema for the MFA settings API response (GET/PATCH /api/my-account/mfa-settings)
|
|
63
|
+
*/
|
|
64
|
+
export declare const userMfaSettingsResponseGuard: z.ZodObject<{
|
|
65
|
+
skipMfaOnSignIn: z.ZodBoolean;
|
|
66
|
+
}, "strip", z.ZodTypeAny, {
|
|
67
|
+
skipMfaOnSignIn: boolean;
|
|
68
|
+
}, {
|
|
69
|
+
skipMfaOnSignIn: boolean;
|
|
70
|
+
}>;
|
|
71
|
+
export type UserMfaSettingsResponse = z.infer<typeof userMfaSettingsResponseGuard>;
|
|
61
72
|
/**
|
|
62
73
|
* Schema for user's logto_config field
|
|
63
74
|
*/
|
|
@@ -45,6 +45,12 @@ export const userPasskeySignInDataGuard = z.object({
|
|
|
45
45
|
*/
|
|
46
46
|
skipped: z.boolean().optional(),
|
|
47
47
|
});
|
|
48
|
+
/**
|
|
49
|
+
* Schema for the MFA settings API response (GET/PATCH /api/my-account/mfa-settings)
|
|
50
|
+
*/
|
|
51
|
+
export const userMfaSettingsResponseGuard = z.object({
|
|
52
|
+
skipMfaOnSignIn: z.boolean(),
|
|
53
|
+
});
|
|
48
54
|
/**
|
|
49
55
|
* Schema for user's logto_config field
|
|
50
56
|
*/
|