@logto/schemas 1.39.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.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.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 +6 -2
- package/lib/db-entries/account-center.js +5 -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 +4 -2
- package/lib/db-entries/sign-in-experience.js +5 -1
- package/lib/foundations/jsonb-types/account-centers.d.ts +26 -0
- package/lib/foundations/jsonb-types/account-centers.js +4 -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 +1 -1
- package/lib/foundations/jsonb-types/sign-in-experience.js +1 -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/application.d.ts +99 -0
- 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/logto-config/index.d.ts +38 -0
- package/lib/types/logto-config/jwt-customizer.d.ts +65 -0
- package/lib/types/saml-application.d.ts +3 -0
- package/lib/types/sign-in-experience.d.ts +14 -0
- 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-sessions.d.ts +2516 -0
- package/lib/types/user-sessions.js +21 -0
- package/package.json +4 -4
- package/tables/account_centers.sql +2 -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 +1 -0
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 {};
|