@logto/schemas 1.12.0 → 1.13.1
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.13.0-1702274830-add-new-third-party-column-to-applications-table.ts +20 -0
- package/alterations/1.13.0-1702372401-add-application-permissions-tables.ts +93 -0
- package/alterations/1.13.0-1702544178-sync-tenant-orgs.ts +296 -0
- package/alterations/1.13.0-1702871078-protected-application-type.ts +24 -0
- package/alterations/1.13.0-1702877515-protected-app-configs.ts +18 -0
- package/alterations/1.13.0-1702978120-application-sign-in-experience-table.ts +61 -0
- package/alterations/1.13.0-1703229996-daily-token-usage.ts +62 -0
- package/alterations/1.13.0-1703230000-update-tenant-roles.ts +94 -0
- package/alterations/1.13.0-1704692973-remove-legacy-resources.ts +147 -0
- package/alterations/1.13.0-1704934999-add-magic-links-table.ts +37 -0
- package/alterations/1.13.0-1704935001-add-organization-invitation-tables.ts +78 -0
- package/alterations/1.13.0-1705288654-add-application-user-consent-organizations-table.ts +62 -0
- package/alterations/1.13.0-1705991158-update-invitation-indices.ts +32 -0
- package/alterations/1.13.0-1706449174-update-organization-invitation-column.ts +24 -0
- package/alterations/1.13.0-1706510290-protected-app-host-index.ts +21 -0
- package/alterations/1.13.0-1706512952-restore-get-started-page.ts +17 -0
- package/alterations/1.13.0-1706528755-remove-magic-links.ts +46 -0
- package/alterations/1.13.0-1706585206-protected-app-custom-domain-unique.ts +21 -0
- package/alterations/1.13.1-1707360939-grant-is-suspended-read-permission.ts +39 -0
- package/alterations/utils/1704934999-tables.ts +49 -0
- package/alterations/utils/README.md +9 -0
- package/alterations-js/1.13.0-1702274830-add-new-third-party-column-to-applications-table.d.ts +3 -0
- package/alterations-js/1.13.0-1702274830-add-new-third-party-column-to-applications-table.js +16 -0
- package/alterations-js/1.13.0-1702372401-add-application-permissions-tables.d.ts +3 -0
- package/alterations-js/1.13.0-1702372401-add-application-permissions-tables.js +79 -0
- package/alterations-js/1.13.0-1702544178-sync-tenant-orgs.d.ts +18 -0
- package/alterations-js/1.13.0-1702544178-sync-tenant-orgs.js +225 -0
- package/alterations-js/1.13.0-1702871078-protected-application-type.d.ts +3 -0
- package/alterations-js/1.13.0-1702871078-protected-application-type.js +20 -0
- package/alterations-js/1.13.0-1702877515-protected-app-configs.d.ts +3 -0
- package/alterations-js/1.13.0-1702877515-protected-app-configs.js +14 -0
- package/alterations-js/1.13.0-1702978120-application-sign-in-experience-table.d.ts +3 -0
- package/alterations-js/1.13.0-1702978120-application-sign-in-experience-table.js +51 -0
- package/alterations-js/1.13.0-1703229996-daily-token-usage.d.ts +3 -0
- package/alterations-js/1.13.0-1703229996-daily-token-usage.js +51 -0
- package/alterations-js/1.13.0-1703230000-update-tenant-roles.d.ts +11 -0
- package/alterations-js/1.13.0-1703230000-update-tenant-roles.js +87 -0
- package/alterations-js/1.13.0-1704692973-remove-legacy-resources.d.ts +3 -0
- package/alterations-js/1.13.0-1704692973-remove-legacy-resources.js +124 -0
- package/alterations-js/1.13.0-1704934999-add-magic-links-table.d.ts +3 -0
- package/alterations-js/1.13.0-1704934999-add-magic-links-table.js +32 -0
- package/alterations-js/1.13.0-1704935001-add-organization-invitation-tables.d.ts +3 -0
- package/alterations-js/1.13.0-1704935001-add-organization-invitation-tables.js +72 -0
- package/alterations-js/1.13.0-1705288654-add-application-user-consent-organizations-table.d.ts +3 -0
- package/alterations-js/1.13.0-1705288654-add-application-user-consent-organizations-table.js +52 -0
- package/alterations-js/1.13.0-1705991158-update-invitation-indices.d.ts +7 -0
- package/alterations-js/1.13.0-1705991158-update-invitation-indices.js +27 -0
- package/alterations-js/1.13.0-1706449174-update-organization-invitation-column.d.ts +3 -0
- package/alterations-js/1.13.0-1706449174-update-organization-invitation-column.js +20 -0
- package/alterations-js/1.13.0-1706510290-protected-app-host-index.d.ts +3 -0
- package/alterations-js/1.13.0-1706510290-protected-app-host-index.js +17 -0
- package/alterations-js/1.13.0-1706512952-restore-get-started-page.d.ts +3 -0
- package/alterations-js/1.13.0-1706512952-restore-get-started-page.js +13 -0
- package/alterations-js/1.13.0-1706528755-remove-magic-links.d.ts +3 -0
- package/alterations-js/1.13.0-1706528755-remove-magic-links.js +41 -0
- package/alterations-js/1.13.0-1706585206-protected-app-custom-domain-unique.d.ts +3 -0
- package/alterations-js/1.13.0-1706585206-protected-app-custom-domain-unique.js +17 -0
- package/alterations-js/1.13.1-1707360939-grant-is-suspended-read-permission.d.ts +6 -0
- package/alterations-js/1.13.1-1707360939-grant-is-suspended-read-permission.js +31 -0
- package/alterations-js/utils/1704934999-tables.d.ts +11 -0
- package/alterations-js/utils/1704934999-tables.js +43 -0
- package/lib/db-entries/application-sign-in-experience.d.ts +26 -0
- package/lib/db-entries/application-sign-in-experience.js +42 -0
- package/lib/db-entries/application-user-consent-organization-scope.d.ts +24 -0
- package/lib/db-entries/application-user-consent-organization-scope.js +29 -0
- package/lib/db-entries/application-user-consent-organization.d.ts +22 -0
- package/lib/db-entries/application-user-consent-organization.js +33 -0
- package/lib/db-entries/application-user-consent-resource-scope.d.ts +24 -0
- package/lib/db-entries/application-user-consent-resource-scope.js +29 -0
- package/lib/db-entries/application-user-consent-user-scope.d.ts +24 -0
- package/lib/db-entries/application-user-consent-user-scope.js +29 -0
- package/lib/db-entries/application.d.ts +6 -2
- package/lib/db-entries/application.js +9 -1
- package/lib/db-entries/custom-types.d.ts +8 -1
- package/lib/db-entries/custom-types.js +8 -0
- package/lib/db-entries/daily-token-usage.d.ts +20 -0
- package/lib/db-entries/daily-token-usage.js +33 -0
- package/lib/db-entries/index.d.ts +8 -0
- package/lib/db-entries/index.js +8 -0
- package/lib/db-entries/organization-invitation-role-relation.d.ts +24 -0
- package/lib/db-entries/organization-invitation-role-relation.js +29 -0
- package/lib/db-entries/organization-invitation.d.ts +53 -0
- package/lib/db-entries/organization-invitation.js +58 -0
- package/lib/foundations/jsonb-types/applications.d.ts +380 -0
- package/lib/foundations/jsonb-types/applications.js +29 -0
- package/lib/foundations/jsonb-types/custom-domain.d.ts +37 -89
- package/lib/foundations/jsonb-types/custom-domain.js +4 -9
- package/lib/foundations/jsonb-types/index.d.ts +1 -0
- package/lib/foundations/jsonb-types/index.js +1 -0
- package/lib/foundations/jsonb-types/users.d.ts +1 -2
- package/lib/foundations/jsonb-types/users.js +1 -1
- package/lib/models/tenants.d.ts +1 -1
- package/lib/seeds/application.d.ts +1 -1
- package/lib/seeds/application.js +3 -1
- package/lib/seeds/cloud-api.d.ts +3 -3
- package/lib/seeds/cloud-api.js +2 -3
- package/lib/seeds/management-api.d.ts +77 -6
- package/lib/seeds/management-api.js +14 -10
- package/lib/types/application.d.ts +576 -1
- package/lib/types/application.js +42 -1
- package/lib/types/connector.js +1 -1
- package/lib/types/consent.d.ts +568 -0
- package/lib/types/consent.js +47 -0
- package/lib/types/domain.d.ts +21 -65
- package/lib/types/index.d.ts +3 -0
- package/lib/types/index.js +3 -0
- package/lib/types/interactions.d.ts +6 -6
- package/lib/types/logto-config.d.ts +32 -6
- package/lib/types/logto-config.js +12 -2
- package/lib/types/mapi-proxy.d.ts +30 -0
- package/lib/types/mapi-proxy.js +49 -0
- package/lib/types/organization.d.ts +10 -1
- package/lib/types/organization.js +4 -1
- package/lib/types/sso-connector.d.ts +9 -9
- package/lib/types/sso-connector.js +1 -1
- package/lib/types/system.d.ts +28 -1
- package/lib/types/system.js +17 -0
- package/lib/types/tenant-organization.d.ts +107 -0
- package/lib/types/tenant-organization.js +145 -0
- package/lib/types/tenant.d.ts +0 -1
- package/lib/types/tenant.js +2 -4
- package/lib/types/user-assets.d.ts +5 -5
- package/lib/types/user-assets.js +1 -0
- package/lib/types/user.d.ts +14 -15
- package/lib/types/user.js +0 -1
- package/package.json +14 -14
- package/tables/_after_all.sql +1 -1
- package/tables/application_sign_in_experiences.sql +15 -0
- package/tables/application_user_consent_organization_scopes.sql +14 -0
- package/tables/application_user_consent_organizations.sql +16 -0
- package/tables/application_user_consent_resource_scopes.sql +14 -0
- package/tables/application_user_consent_user_scopes.sql +13 -0
- package/tables/applications.sql +16 -1
- package/tables/daily_token_usage.sql +11 -0
- package/tables/organization_invitation_role_relations.sql +14 -0
- package/tables/organization_invitations.sql +36 -0
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const customDomainGuard: z.ZodObject<{
|
|
3
|
+
domain: z.ZodString;
|
|
4
|
+
status: z.ZodNativeEnum<typeof import("./custom-domain.js").DomainStatus>;
|
|
5
|
+
errorMessage: z.ZodNullable<z.ZodString>;
|
|
6
|
+
dnsRecords: z.ZodArray<z.ZodObject<{
|
|
7
|
+
name: z.ZodString;
|
|
8
|
+
type: z.ZodString;
|
|
9
|
+
value: z.ZodString;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
type: string;
|
|
12
|
+
value: string;
|
|
13
|
+
name: string;
|
|
14
|
+
}, {
|
|
15
|
+
type: string;
|
|
16
|
+
value: string;
|
|
17
|
+
name: string;
|
|
18
|
+
}>, "many">;
|
|
19
|
+
cloudflareData: z.ZodNullable<z.ZodObject<{
|
|
20
|
+
id: z.ZodString;
|
|
21
|
+
status: z.ZodString;
|
|
22
|
+
ssl: z.ZodObject<{
|
|
23
|
+
status: z.ZodString;
|
|
24
|
+
validation_errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
25
|
+
message: z.ZodString;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
message: string;
|
|
28
|
+
}, {
|
|
29
|
+
message: string;
|
|
30
|
+
}>, "many">>;
|
|
31
|
+
}, "strip", z.ZodTypeAny, {
|
|
32
|
+
status: string;
|
|
33
|
+
validation_errors?: {
|
|
34
|
+
message: string;
|
|
35
|
+
}[] | undefined;
|
|
36
|
+
}, {
|
|
37
|
+
status: string;
|
|
38
|
+
validation_errors?: {
|
|
39
|
+
message: string;
|
|
40
|
+
}[] | undefined;
|
|
41
|
+
}>;
|
|
42
|
+
verification_errors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
43
|
+
}, "strip", z.ZodTypeAny, {
|
|
44
|
+
status: string;
|
|
45
|
+
id: string;
|
|
46
|
+
ssl: {
|
|
47
|
+
status: string;
|
|
48
|
+
validation_errors?: {
|
|
49
|
+
message: string;
|
|
50
|
+
}[] | undefined;
|
|
51
|
+
};
|
|
52
|
+
verification_errors?: string[] | undefined;
|
|
53
|
+
}, {
|
|
54
|
+
status: string;
|
|
55
|
+
id: string;
|
|
56
|
+
ssl: {
|
|
57
|
+
status: string;
|
|
58
|
+
validation_errors?: {
|
|
59
|
+
message: string;
|
|
60
|
+
}[] | undefined;
|
|
61
|
+
};
|
|
62
|
+
verification_errors?: string[] | undefined;
|
|
63
|
+
}>>;
|
|
64
|
+
}, "strip", z.ZodTypeAny, {
|
|
65
|
+
status: import("./custom-domain.js").DomainStatus;
|
|
66
|
+
domain: string;
|
|
67
|
+
errorMessage: string | null;
|
|
68
|
+
dnsRecords: {
|
|
69
|
+
type: string;
|
|
70
|
+
value: string;
|
|
71
|
+
name: string;
|
|
72
|
+
}[];
|
|
73
|
+
cloudflareData: {
|
|
74
|
+
status: string;
|
|
75
|
+
id: string;
|
|
76
|
+
ssl: {
|
|
77
|
+
status: string;
|
|
78
|
+
validation_errors?: {
|
|
79
|
+
message: string;
|
|
80
|
+
}[] | undefined;
|
|
81
|
+
};
|
|
82
|
+
verification_errors?: string[] | undefined;
|
|
83
|
+
} | null;
|
|
84
|
+
}, {
|
|
85
|
+
status: import("./custom-domain.js").DomainStatus;
|
|
86
|
+
domain: string;
|
|
87
|
+
errorMessage: string | null;
|
|
88
|
+
dnsRecords: {
|
|
89
|
+
type: string;
|
|
90
|
+
value: string;
|
|
91
|
+
name: string;
|
|
92
|
+
}[];
|
|
93
|
+
cloudflareData: {
|
|
94
|
+
status: string;
|
|
95
|
+
id: string;
|
|
96
|
+
ssl: {
|
|
97
|
+
status: string;
|
|
98
|
+
validation_errors?: {
|
|
99
|
+
message: string;
|
|
100
|
+
}[] | undefined;
|
|
101
|
+
};
|
|
102
|
+
verification_errors?: string[] | undefined;
|
|
103
|
+
} | null;
|
|
104
|
+
}>;
|
|
105
|
+
export declare const customDomainsGuard: z.ZodArray<z.ZodObject<{
|
|
106
|
+
domain: z.ZodString;
|
|
107
|
+
status: z.ZodNativeEnum<typeof import("./custom-domain.js").DomainStatus>;
|
|
108
|
+
errorMessage: z.ZodNullable<z.ZodString>;
|
|
109
|
+
dnsRecords: z.ZodArray<z.ZodObject<{
|
|
110
|
+
name: z.ZodString;
|
|
111
|
+
type: z.ZodString;
|
|
112
|
+
value: z.ZodString;
|
|
113
|
+
}, "strip", z.ZodTypeAny, {
|
|
114
|
+
type: string;
|
|
115
|
+
value: string;
|
|
116
|
+
name: string;
|
|
117
|
+
}, {
|
|
118
|
+
type: string;
|
|
119
|
+
value: string;
|
|
120
|
+
name: string;
|
|
121
|
+
}>, "many">;
|
|
122
|
+
cloudflareData: z.ZodNullable<z.ZodObject<{
|
|
123
|
+
id: z.ZodString;
|
|
124
|
+
status: z.ZodString;
|
|
125
|
+
ssl: z.ZodObject<{
|
|
126
|
+
status: z.ZodString;
|
|
127
|
+
validation_errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
128
|
+
message: z.ZodString;
|
|
129
|
+
}, "strip", z.ZodTypeAny, {
|
|
130
|
+
message: string;
|
|
131
|
+
}, {
|
|
132
|
+
message: string;
|
|
133
|
+
}>, "many">>;
|
|
134
|
+
}, "strip", z.ZodTypeAny, {
|
|
135
|
+
status: string;
|
|
136
|
+
validation_errors?: {
|
|
137
|
+
message: string;
|
|
138
|
+
}[] | undefined;
|
|
139
|
+
}, {
|
|
140
|
+
status: string;
|
|
141
|
+
validation_errors?: {
|
|
142
|
+
message: string;
|
|
143
|
+
}[] | undefined;
|
|
144
|
+
}>;
|
|
145
|
+
verification_errors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
146
|
+
}, "strip", z.ZodTypeAny, {
|
|
147
|
+
status: string;
|
|
148
|
+
id: string;
|
|
149
|
+
ssl: {
|
|
150
|
+
status: string;
|
|
151
|
+
validation_errors?: {
|
|
152
|
+
message: string;
|
|
153
|
+
}[] | undefined;
|
|
154
|
+
};
|
|
155
|
+
verification_errors?: string[] | undefined;
|
|
156
|
+
}, {
|
|
157
|
+
status: string;
|
|
158
|
+
id: string;
|
|
159
|
+
ssl: {
|
|
160
|
+
status: string;
|
|
161
|
+
validation_errors?: {
|
|
162
|
+
message: string;
|
|
163
|
+
}[] | undefined;
|
|
164
|
+
};
|
|
165
|
+
verification_errors?: string[] | undefined;
|
|
166
|
+
}>>;
|
|
167
|
+
}, "strip", z.ZodTypeAny, {
|
|
168
|
+
status: import("./custom-domain.js").DomainStatus;
|
|
169
|
+
domain: string;
|
|
170
|
+
errorMessage: string | null;
|
|
171
|
+
dnsRecords: {
|
|
172
|
+
type: string;
|
|
173
|
+
value: string;
|
|
174
|
+
name: string;
|
|
175
|
+
}[];
|
|
176
|
+
cloudflareData: {
|
|
177
|
+
status: string;
|
|
178
|
+
id: string;
|
|
179
|
+
ssl: {
|
|
180
|
+
status: string;
|
|
181
|
+
validation_errors?: {
|
|
182
|
+
message: string;
|
|
183
|
+
}[] | undefined;
|
|
184
|
+
};
|
|
185
|
+
verification_errors?: string[] | undefined;
|
|
186
|
+
} | null;
|
|
187
|
+
}, {
|
|
188
|
+
status: import("./custom-domain.js").DomainStatus;
|
|
189
|
+
domain: string;
|
|
190
|
+
errorMessage: string | null;
|
|
191
|
+
dnsRecords: {
|
|
192
|
+
type: string;
|
|
193
|
+
value: string;
|
|
194
|
+
name: string;
|
|
195
|
+
}[];
|
|
196
|
+
cloudflareData: {
|
|
197
|
+
status: string;
|
|
198
|
+
id: string;
|
|
199
|
+
ssl: {
|
|
200
|
+
status: string;
|
|
201
|
+
validation_errors?: {
|
|
202
|
+
message: string;
|
|
203
|
+
}[] | undefined;
|
|
204
|
+
};
|
|
205
|
+
verification_errors?: string[] | undefined;
|
|
206
|
+
} | null;
|
|
207
|
+
}>, "many">;
|
|
208
|
+
export type CustomDomain = z.infer<typeof customDomainGuard>;
|
|
209
|
+
export declare const protectedAppMetadataGuard: z.ZodObject<{
|
|
210
|
+
host: z.ZodString;
|
|
211
|
+
origin: z.ZodString;
|
|
212
|
+
sessionDuration: z.ZodNumber;
|
|
213
|
+
pageRules: z.ZodArray<z.ZodObject<{
|
|
214
|
+
path: z.ZodString;
|
|
215
|
+
}, "strip", z.ZodTypeAny, {
|
|
216
|
+
path: string;
|
|
217
|
+
}, {
|
|
218
|
+
path: string;
|
|
219
|
+
}>, "many">;
|
|
220
|
+
customDomains: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
221
|
+
domain: z.ZodString;
|
|
222
|
+
status: z.ZodNativeEnum<typeof import("./custom-domain.js").DomainStatus>;
|
|
223
|
+
errorMessage: z.ZodNullable<z.ZodString>;
|
|
224
|
+
dnsRecords: z.ZodArray<z.ZodObject<{
|
|
225
|
+
name: z.ZodString;
|
|
226
|
+
type: z.ZodString;
|
|
227
|
+
value: z.ZodString;
|
|
228
|
+
}, "strip", z.ZodTypeAny, {
|
|
229
|
+
type: string;
|
|
230
|
+
value: string;
|
|
231
|
+
name: string;
|
|
232
|
+
}, {
|
|
233
|
+
type: string;
|
|
234
|
+
value: string;
|
|
235
|
+
name: string;
|
|
236
|
+
}>, "many">;
|
|
237
|
+
cloudflareData: z.ZodNullable<z.ZodObject<{
|
|
238
|
+
id: z.ZodString;
|
|
239
|
+
status: z.ZodString;
|
|
240
|
+
ssl: z.ZodObject<{
|
|
241
|
+
status: z.ZodString;
|
|
242
|
+
validation_errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
243
|
+
message: z.ZodString;
|
|
244
|
+
}, "strip", z.ZodTypeAny, {
|
|
245
|
+
message: string;
|
|
246
|
+
}, {
|
|
247
|
+
message: string;
|
|
248
|
+
}>, "many">>;
|
|
249
|
+
}, "strip", z.ZodTypeAny, {
|
|
250
|
+
status: string;
|
|
251
|
+
validation_errors?: {
|
|
252
|
+
message: string;
|
|
253
|
+
}[] | undefined;
|
|
254
|
+
}, {
|
|
255
|
+
status: string;
|
|
256
|
+
validation_errors?: {
|
|
257
|
+
message: string;
|
|
258
|
+
}[] | undefined;
|
|
259
|
+
}>;
|
|
260
|
+
verification_errors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
261
|
+
}, "strip", z.ZodTypeAny, {
|
|
262
|
+
status: string;
|
|
263
|
+
id: string;
|
|
264
|
+
ssl: {
|
|
265
|
+
status: string;
|
|
266
|
+
validation_errors?: {
|
|
267
|
+
message: string;
|
|
268
|
+
}[] | undefined;
|
|
269
|
+
};
|
|
270
|
+
verification_errors?: string[] | undefined;
|
|
271
|
+
}, {
|
|
272
|
+
status: string;
|
|
273
|
+
id: string;
|
|
274
|
+
ssl: {
|
|
275
|
+
status: string;
|
|
276
|
+
validation_errors?: {
|
|
277
|
+
message: string;
|
|
278
|
+
}[] | undefined;
|
|
279
|
+
};
|
|
280
|
+
verification_errors?: string[] | undefined;
|
|
281
|
+
}>>;
|
|
282
|
+
}, "strip", z.ZodTypeAny, {
|
|
283
|
+
status: import("./custom-domain.js").DomainStatus;
|
|
284
|
+
domain: string;
|
|
285
|
+
errorMessage: string | null;
|
|
286
|
+
dnsRecords: {
|
|
287
|
+
type: string;
|
|
288
|
+
value: string;
|
|
289
|
+
name: string;
|
|
290
|
+
}[];
|
|
291
|
+
cloudflareData: {
|
|
292
|
+
status: string;
|
|
293
|
+
id: string;
|
|
294
|
+
ssl: {
|
|
295
|
+
status: string;
|
|
296
|
+
validation_errors?: {
|
|
297
|
+
message: string;
|
|
298
|
+
}[] | undefined;
|
|
299
|
+
};
|
|
300
|
+
verification_errors?: string[] | undefined;
|
|
301
|
+
} | null;
|
|
302
|
+
}, {
|
|
303
|
+
status: import("./custom-domain.js").DomainStatus;
|
|
304
|
+
domain: string;
|
|
305
|
+
errorMessage: string | null;
|
|
306
|
+
dnsRecords: {
|
|
307
|
+
type: string;
|
|
308
|
+
value: string;
|
|
309
|
+
name: string;
|
|
310
|
+
}[];
|
|
311
|
+
cloudflareData: {
|
|
312
|
+
status: string;
|
|
313
|
+
id: string;
|
|
314
|
+
ssl: {
|
|
315
|
+
status: string;
|
|
316
|
+
validation_errors?: {
|
|
317
|
+
message: string;
|
|
318
|
+
}[] | undefined;
|
|
319
|
+
};
|
|
320
|
+
verification_errors?: string[] | undefined;
|
|
321
|
+
} | null;
|
|
322
|
+
}>, "many">>;
|
|
323
|
+
}, "strip", z.ZodTypeAny, {
|
|
324
|
+
host: string;
|
|
325
|
+
origin: string;
|
|
326
|
+
sessionDuration: number;
|
|
327
|
+
pageRules: {
|
|
328
|
+
path: string;
|
|
329
|
+
}[];
|
|
330
|
+
customDomains?: {
|
|
331
|
+
status: import("./custom-domain.js").DomainStatus;
|
|
332
|
+
domain: string;
|
|
333
|
+
errorMessage: string | null;
|
|
334
|
+
dnsRecords: {
|
|
335
|
+
type: string;
|
|
336
|
+
value: string;
|
|
337
|
+
name: string;
|
|
338
|
+
}[];
|
|
339
|
+
cloudflareData: {
|
|
340
|
+
status: string;
|
|
341
|
+
id: string;
|
|
342
|
+
ssl: {
|
|
343
|
+
status: string;
|
|
344
|
+
validation_errors?: {
|
|
345
|
+
message: string;
|
|
346
|
+
}[] | undefined;
|
|
347
|
+
};
|
|
348
|
+
verification_errors?: string[] | undefined;
|
|
349
|
+
} | null;
|
|
350
|
+
}[] | undefined;
|
|
351
|
+
}, {
|
|
352
|
+
host: string;
|
|
353
|
+
origin: string;
|
|
354
|
+
sessionDuration: number;
|
|
355
|
+
pageRules: {
|
|
356
|
+
path: string;
|
|
357
|
+
}[];
|
|
358
|
+
customDomains?: {
|
|
359
|
+
status: import("./custom-domain.js").DomainStatus;
|
|
360
|
+
domain: string;
|
|
361
|
+
errorMessage: string | null;
|
|
362
|
+
dnsRecords: {
|
|
363
|
+
type: string;
|
|
364
|
+
value: string;
|
|
365
|
+
name: string;
|
|
366
|
+
}[];
|
|
367
|
+
cloudflareData: {
|
|
368
|
+
status: string;
|
|
369
|
+
id: string;
|
|
370
|
+
ssl: {
|
|
371
|
+
status: string;
|
|
372
|
+
validation_errors?: {
|
|
373
|
+
message: string;
|
|
374
|
+
}[] | undefined;
|
|
375
|
+
};
|
|
376
|
+
verification_errors?: string[] | undefined;
|
|
377
|
+
} | null;
|
|
378
|
+
}[] | undefined;
|
|
379
|
+
}>;
|
|
380
|
+
export type ProtectedAppMetadata = z.infer<typeof protectedAppMetadataGuard>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { cloudflareDataGuard, domainDnsRecordsGuard, domainStatusGuard } from './custom-domain.js';
|
|
3
|
+
export const customDomainGuard = z.object({
|
|
4
|
+
/* The domain name, e.g app.example.com */
|
|
5
|
+
domain: z.string(),
|
|
6
|
+
/* The status of the domain in Cloudflare */
|
|
7
|
+
status: domainStatusGuard,
|
|
8
|
+
/* The error message if any */
|
|
9
|
+
errorMessage: z.string().nullable(),
|
|
10
|
+
/* The DNS records of the domain */
|
|
11
|
+
dnsRecords: domainDnsRecordsGuard,
|
|
12
|
+
/* The remote Cloudflare data */
|
|
13
|
+
cloudflareData: cloudflareDataGuard.nullable(),
|
|
14
|
+
});
|
|
15
|
+
export const customDomainsGuard = z.array(customDomainGuard);
|
|
16
|
+
export const protectedAppMetadataGuard = z.object({
|
|
17
|
+
/* The host of the site */
|
|
18
|
+
host: z.string(),
|
|
19
|
+
/* The origin of the site */
|
|
20
|
+
origin: z.string(),
|
|
21
|
+
/* Session duration in seconds */
|
|
22
|
+
sessionDuration: z.number(),
|
|
23
|
+
pageRules: z.array(z.object({
|
|
24
|
+
/* The path pattern (regex) to match */
|
|
25
|
+
path: z.string(),
|
|
26
|
+
})),
|
|
27
|
+
/* Custom domain */
|
|
28
|
+
customDomains: customDomainsGuard.optional(),
|
|
29
|
+
});
|
|
@@ -34,96 +34,44 @@ export declare const cloudflareDataGuard: z.ZodObject<{
|
|
|
34
34
|
status: z.ZodString;
|
|
35
35
|
validation_errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
36
36
|
message: z.ZodString;
|
|
37
|
-
}, "strip", z.
|
|
38
|
-
message:
|
|
39
|
-
},
|
|
40
|
-
message:
|
|
41
|
-
}
|
|
42
|
-
}, "strip", z.
|
|
43
|
-
status:
|
|
44
|
-
validation_errors
|
|
45
|
-
message:
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
validation_errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
54
|
-
message: z.ZodString;
|
|
55
|
-
}, "strip", z.ZodUnknown, z.objectOutputType<{
|
|
56
|
-
message: z.ZodString;
|
|
57
|
-
}, z.ZodUnknown, "strip">, z.objectInputType<{
|
|
58
|
-
message: z.ZodString;
|
|
59
|
-
}, z.ZodUnknown, "strip">>, "many">>;
|
|
60
|
-
}, z.ZodUnknown, "strip">>;
|
|
37
|
+
}, "strip", z.ZodTypeAny, {
|
|
38
|
+
message: string;
|
|
39
|
+
}, {
|
|
40
|
+
message: string;
|
|
41
|
+
}>, "many">>;
|
|
42
|
+
}, "strip", z.ZodTypeAny, {
|
|
43
|
+
status: string;
|
|
44
|
+
validation_errors?: {
|
|
45
|
+
message: string;
|
|
46
|
+
}[] | undefined;
|
|
47
|
+
}, {
|
|
48
|
+
status: string;
|
|
49
|
+
validation_errors?: {
|
|
50
|
+
message: string;
|
|
51
|
+
}[] | undefined;
|
|
52
|
+
}>;
|
|
61
53
|
verification_errors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
62
|
-
}, "strip", z.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
ssl:
|
|
66
|
-
status:
|
|
67
|
-
validation_errors
|
|
68
|
-
message:
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}, z.ZodUnknown, "strip">, z.objectInputType<{
|
|
84
|
-
status: z.ZodString;
|
|
85
|
-
validation_errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
86
|
-
message: z.ZodString;
|
|
87
|
-
}, "strip", z.ZodUnknown, z.objectOutputType<{
|
|
88
|
-
message: z.ZodString;
|
|
89
|
-
}, z.ZodUnknown, "strip">, z.objectInputType<{
|
|
90
|
-
message: z.ZodString;
|
|
91
|
-
}, z.ZodUnknown, "strip">>, "many">>;
|
|
92
|
-
}, z.ZodUnknown, "strip">>;
|
|
93
|
-
verification_errors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
94
|
-
}, z.ZodUnknown, "strip">, z.objectInputType<{
|
|
95
|
-
id: z.ZodString;
|
|
96
|
-
status: z.ZodString;
|
|
97
|
-
ssl: z.ZodObject<{
|
|
98
|
-
status: z.ZodString;
|
|
99
|
-
validation_errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
100
|
-
message: z.ZodString;
|
|
101
|
-
}, "strip", z.ZodUnknown, z.objectOutputType<{
|
|
102
|
-
message: z.ZodString;
|
|
103
|
-
}, z.ZodUnknown, "strip">, z.objectInputType<{
|
|
104
|
-
message: z.ZodString;
|
|
105
|
-
}, z.ZodUnknown, "strip">>, "many">>;
|
|
106
|
-
}, "strip", z.ZodUnknown, z.objectOutputType<{
|
|
107
|
-
status: z.ZodString;
|
|
108
|
-
validation_errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
109
|
-
message: z.ZodString;
|
|
110
|
-
}, "strip", z.ZodUnknown, z.objectOutputType<{
|
|
111
|
-
message: z.ZodString;
|
|
112
|
-
}, z.ZodUnknown, "strip">, z.objectInputType<{
|
|
113
|
-
message: z.ZodString;
|
|
114
|
-
}, z.ZodUnknown, "strip">>, "many">>;
|
|
115
|
-
}, z.ZodUnknown, "strip">, z.objectInputType<{
|
|
116
|
-
status: z.ZodString;
|
|
117
|
-
validation_errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
118
|
-
message: z.ZodString;
|
|
119
|
-
}, "strip", z.ZodUnknown, z.objectOutputType<{
|
|
120
|
-
message: z.ZodString;
|
|
121
|
-
}, z.ZodUnknown, "strip">, z.objectInputType<{
|
|
122
|
-
message: z.ZodString;
|
|
123
|
-
}, z.ZodUnknown, "strip">>, "many">>;
|
|
124
|
-
}, z.ZodUnknown, "strip">>;
|
|
125
|
-
verification_errors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
126
|
-
}, z.ZodUnknown, "strip">>;
|
|
54
|
+
}, "strip", z.ZodTypeAny, {
|
|
55
|
+
status: string;
|
|
56
|
+
id: string;
|
|
57
|
+
ssl: {
|
|
58
|
+
status: string;
|
|
59
|
+
validation_errors?: {
|
|
60
|
+
message: string;
|
|
61
|
+
}[] | undefined;
|
|
62
|
+
};
|
|
63
|
+
verification_errors?: string[] | undefined;
|
|
64
|
+
}, {
|
|
65
|
+
status: string;
|
|
66
|
+
id: string;
|
|
67
|
+
ssl: {
|
|
68
|
+
status: string;
|
|
69
|
+
validation_errors?: {
|
|
70
|
+
message: string;
|
|
71
|
+
}[] | undefined;
|
|
72
|
+
};
|
|
73
|
+
verification_errors?: string[] | undefined;
|
|
74
|
+
}>;
|
|
127
75
|
export type CloudflareData = z.infer<typeof cloudflareDataGuard>;
|
|
128
76
|
export declare enum DomainStatus {
|
|
129
77
|
PendingVerification = "PendingVerification",
|
|
@@ -7,25 +7,20 @@ export const domainDnsRecordGuard = z.object({
|
|
|
7
7
|
export const domainDnsRecordsGuard = domainDnsRecordGuard.array();
|
|
8
8
|
// https://developers.cloudflare.com/api/operations/custom-hostname-for-a-zone-list-custom-hostnames#Responses
|
|
9
9
|
// Predefine the "useful" fields
|
|
10
|
-
export const cloudflareDataGuard = z
|
|
11
|
-
.object({
|
|
10
|
+
export const cloudflareDataGuard = z.object({
|
|
12
11
|
id: z.string(),
|
|
13
12
|
status: z.string(),
|
|
14
|
-
ssl: z
|
|
15
|
-
.object({
|
|
13
|
+
ssl: z.object({
|
|
16
14
|
status: z.string(),
|
|
17
15
|
validation_errors: z
|
|
18
16
|
.object({
|
|
19
17
|
message: z.string(),
|
|
20
18
|
})
|
|
21
|
-
.catchall(z.unknown())
|
|
22
19
|
.array()
|
|
23
20
|
.optional(),
|
|
24
|
-
})
|
|
25
|
-
.catchall(z.unknown()),
|
|
21
|
+
}),
|
|
26
22
|
verification_errors: z.string().array().optional(),
|
|
27
|
-
})
|
|
28
|
-
.catchall(z.unknown());
|
|
23
|
+
});
|
|
29
24
|
export var DomainStatus;
|
|
30
25
|
(function (DomainStatus) {
|
|
31
26
|
DomainStatus["PendingVerification"] = "PendingVerification";
|
|
@@ -9,6 +9,7 @@ export * from './sign-in-experience.js';
|
|
|
9
9
|
export * from './sentinel.js';
|
|
10
10
|
export * from './users.js';
|
|
11
11
|
export * from './sso-connector.js';
|
|
12
|
+
export * from './applications.js';
|
|
12
13
|
export { configurableConnectorMetadataGuard, type ConfigurableConnectorMetadata, } from '@logto/connector-kit';
|
|
13
14
|
export type { Json, JsonObject } from '@withtyped/server';
|
|
14
15
|
export declare const jsonGuard: z.ZodType<Json>;
|
|
@@ -8,6 +8,7 @@ export * from './sign-in-experience.js';
|
|
|
8
8
|
export * from './sentinel.js';
|
|
9
9
|
export * from './users.js';
|
|
10
10
|
export * from './sso-connector.js';
|
|
11
|
+
export * from './applications.js';
|
|
11
12
|
export { configurableConnectorMetadataGuard, } from '@logto/connector-kit';
|
|
12
13
|
/* === Commonly Used === */
|
|
13
14
|
// Copied from https://github.com/colinhacks/zod#json-type
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { MfaFactor } from './sign-in-experience.js';
|
|
3
3
|
export declare const roleNamesGuard: z.ZodArray<z.ZodString, "many">;
|
|
4
|
-
declare const identityGuard: z.ZodObject<{
|
|
4
|
+
export declare const identityGuard: z.ZodObject<{
|
|
5
5
|
userId: z.ZodString;
|
|
6
6
|
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
7
7
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -282,4 +282,3 @@ export declare const mfaVerificationsGuard: z.ZodArray<z.ZodDiscriminatedUnion<"
|
|
|
282
282
|
lastUsedAt?: string | undefined;
|
|
283
283
|
}>]>, "many">;
|
|
284
284
|
export type MfaVerifications = z.infer<typeof mfaVerificationsGuard>;
|
|
285
|
-
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { MfaFactor } from './sign-in-experience.js';
|
|
3
3
|
export const roleNamesGuard = z.string().array();
|
|
4
|
-
const identityGuard = z.object({
|
|
4
|
+
export const identityGuard = z.object({
|
|
5
5
|
userId: z.string(),
|
|
6
6
|
details: z.record(z.unknown()).optional(), // Connector's userinfo details, schemaless
|
|
7
7
|
});
|
package/lib/models/tenants.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { InferModelType } from '@withtyped/server/model';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { TenantTag } from '../types/tenant.js';
|
|
4
|
-
export declare const Tenants: import("@withtyped/server/model").default<"tenants", {
|
|
4
|
+
export declare const Tenants: import("@withtyped/server/lib/model/index.js").default<"tenants", {
|
|
5
5
|
id: string;
|
|
6
6
|
dbUser: string | null;
|
|
7
7
|
dbUserPassword: string | null;
|
|
@@ -9,5 +9,5 @@ export declare const demoAppApplicationId = "demo-app";
|
|
|
9
9
|
export declare const buildDemoAppDataForTenant: (tenantId: string) => Application;
|
|
10
10
|
export declare const createDefaultAdminConsoleApplication: () => Readonly<CreateApplication>;
|
|
11
11
|
export declare const createTenantMachineToMachineApplication: (tenantId: string) => Readonly<CreateApplication>;
|
|
12
|
-
/** Create role
|
|
12
|
+
/** Create an entry to assign a role to an application in the admin tenant. */
|
|
13
13
|
export declare const createAdminTenantApplicationRole: (applicationId: string, roleId: string) => Readonly<CreateApplicationsRole>;
|
package/lib/seeds/application.js
CHANGED
|
@@ -17,6 +17,8 @@ export const buildDemoAppDataForTenant = (tenantId) => ({
|
|
|
17
17
|
type: ApplicationType.SPA,
|
|
18
18
|
oidcClientMetadata: { redirectUris: [], postLogoutRedirectUris: [] },
|
|
19
19
|
customClientMetadata: {},
|
|
20
|
+
protectedAppMetadata: null,
|
|
21
|
+
isThirdParty: false,
|
|
20
22
|
createdAt: 0,
|
|
21
23
|
});
|
|
22
24
|
export const createDefaultAdminConsoleApplication = () => Object.freeze({
|
|
@@ -43,7 +45,7 @@ export const createTenantMachineToMachineApplication = (tenantId) => Object.free
|
|
|
43
45
|
tenantId,
|
|
44
46
|
},
|
|
45
47
|
});
|
|
46
|
-
/** Create role
|
|
48
|
+
/** Create an entry to assign a role to an application in the admin tenant. */
|
|
47
49
|
export const createAdminTenantApplicationRole = (applicationId, roleId) => Object.freeze({
|
|
48
50
|
id: generateStandardId(),
|
|
49
51
|
tenantId: adminTenantId,
|
package/lib/seeds/cloud-api.d.ts
CHANGED
|
@@ -5,8 +5,6 @@ export declare const cloudApiIndicator = "https://cloud.logto.io/api";
|
|
|
5
5
|
export declare enum CloudScope {
|
|
6
6
|
/** The user can create a user tenant. */
|
|
7
7
|
CreateTenant = "create:tenant",
|
|
8
|
-
/** The user can perform arbitrary operations on any tenant. */
|
|
9
|
-
ManageTenant = "manage:tenant",
|
|
10
8
|
/** The user can update or delete its own tenants. */
|
|
11
9
|
ManageTenantSelf = "manage:tenant:self",
|
|
12
10
|
SendSms = "send:sms",
|
|
@@ -14,7 +12,9 @@ export declare enum CloudScope {
|
|
|
14
12
|
/** The user can see and manage affiliates, including create, update, and delete. */
|
|
15
13
|
ManageAffiliate = "manage:affiliate",
|
|
16
14
|
/** The user can create new affiliates and logs. */
|
|
17
|
-
CreateAffiliate = "create:affiliate"
|
|
15
|
+
CreateAffiliate = "create:affiliate",
|
|
16
|
+
/** The user can cleanup outdated logs. */
|
|
17
|
+
CleanupOutdatedLogs = "cleanup:outdated-logs"
|
|
18
18
|
}
|
|
19
19
|
export declare const createCloudApi: () => readonly [UpdateAdminData, ...CreateScope[]];
|
|
20
20
|
export declare const createTenantApplicationRole: () => Readonly<Role>;
|