@logto/cloud 0.2.5-4ef0b45 → 0.2.5-50ff8fe
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/lib/routes/index.d.ts +428 -39
- package/package.json +10 -14
package/lib/routes/index.d.ts
CHANGED
|
@@ -31,10 +31,48 @@ declare enum TemplateType {
|
|
|
31
31
|
/** The template for generic usage. */
|
|
32
32
|
Generic = "Generic"
|
|
33
33
|
}
|
|
34
|
+
declare enum OrganizationInvitationStatus {
|
|
35
|
+
Pending = "Pending",
|
|
36
|
+
Accepted = "Accepted",
|
|
37
|
+
Expired = "Expired",
|
|
38
|
+
Revoked = "Revoked"
|
|
39
|
+
}
|
|
40
|
+
/** The scopes (permissions) defined by the organization template. */
|
|
41
|
+
export type OrganizationScope = {
|
|
42
|
+
tenantId: string;
|
|
43
|
+
/** The globally unique identifier of the organization scope. */
|
|
44
|
+
id: string;
|
|
45
|
+
/** The organization scope's name, unique within the organization template. */
|
|
46
|
+
name: string;
|
|
47
|
+
/** A brief description of the organization scope. */
|
|
48
|
+
description: string | null;
|
|
49
|
+
};
|
|
50
|
+
declare enum LogtoJwtTokenKeyType {
|
|
51
|
+
AccessToken = "access-token",
|
|
52
|
+
ClientCredentials = "client-credentials"
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* The simplified organization role entity that is returned in the `roles` field
|
|
56
|
+
* of the organization.
|
|
57
|
+
*/
|
|
58
|
+
export type OrganizationRoleEntity = {
|
|
59
|
+
id: string;
|
|
60
|
+
name: string;
|
|
61
|
+
};
|
|
34
62
|
declare enum TenantTag {
|
|
35
63
|
Development = "development",
|
|
36
64
|
Production = "production"
|
|
37
65
|
}
|
|
66
|
+
declare enum TenantRole {
|
|
67
|
+
/** Admin of the tenant, who has all permissions. */
|
|
68
|
+
Admin = "admin",
|
|
69
|
+
/** Collaborator of the tenant, who has permissions to operate the tenant data, but not the tenant settings. */
|
|
70
|
+
Collaborator = "collaborator"
|
|
71
|
+
}
|
|
72
|
+
declare enum LogtoSkuType {
|
|
73
|
+
Basic = "Basic",
|
|
74
|
+
AddOn = "AddOn"
|
|
75
|
+
}
|
|
38
76
|
declare const AffiliateProperties: import("@withtyped/server/lib/model/index.js").default<"affiliate_properties", {
|
|
39
77
|
createdAt: Date;
|
|
40
78
|
affiliateId: string;
|
|
@@ -43,16 +81,21 @@ declare const AffiliateProperties: import("@withtyped/server/lib/model/index.js"
|
|
|
43
81
|
}, "createdAt", "createdAt">;
|
|
44
82
|
export type AffiliateProperty = InferModelType<typeof AffiliateProperties>;
|
|
45
83
|
declare const Affiliates: import("@withtyped/server/lib/model/index.js").default<"affiliates", {
|
|
46
|
-
id: string;
|
|
47
|
-
createdAt: Date;
|
|
48
84
|
name: string;
|
|
49
|
-
|
|
85
|
+
createdAt: Date;
|
|
86
|
+
id: string;
|
|
87
|
+
}, "id" | "createdAt", "id" | "createdAt">;
|
|
50
88
|
export type Affiliate = InferModelType<typeof Affiliates>;
|
|
89
|
+
declare enum RegionName {
|
|
90
|
+
EU = "EU",
|
|
91
|
+
US = "US"
|
|
92
|
+
}
|
|
51
93
|
export type AffiliateData = Affiliate & {
|
|
52
94
|
properties: Array<Pick<AffiliateProperty, "type" | "value">>;
|
|
53
95
|
};
|
|
54
96
|
declare const router: import("@withtyped/server").Router<RequestContext, WithAuthContext<Omit<import("@withtyped/server").BaseContext & {
|
|
55
97
|
request: {
|
|
98
|
+
id?: string | undefined;
|
|
56
99
|
method?: import("@withtyped/server").RequestMethod | undefined;
|
|
57
100
|
headers: import("http").IncomingHttpHeaders;
|
|
58
101
|
url: URL;
|
|
@@ -60,6 +103,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
60
103
|
};
|
|
61
104
|
}, "request"> & {
|
|
62
105
|
request: Record<string, unknown> & {
|
|
106
|
+
id?: string | undefined;
|
|
63
107
|
method?: import("@withtyped/server").RequestMethod | undefined;
|
|
64
108
|
headers: import("http").IncomingHttpHeaders;
|
|
65
109
|
url: URL;
|
|
@@ -68,14 +112,14 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
68
112
|
body?: Json | undefined;
|
|
69
113
|
bodyRaw?: Buffer | undefined;
|
|
70
114
|
};
|
|
71
|
-
}>, import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").BaseRoutes, import("@withtyped/server").RoutesWithPrefix<{
|
|
72
|
-
options: {};
|
|
115
|
+
}>, import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").BaseRoutes, import("@withtyped/server").RoutesWithPrefix<{
|
|
73
116
|
patch: {
|
|
74
117
|
"/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, {
|
|
75
118
|
name?: string | undefined;
|
|
76
119
|
}, {
|
|
77
120
|
id: string;
|
|
78
121
|
name: string;
|
|
122
|
+
createdAt: Date;
|
|
79
123
|
usage: {
|
|
80
124
|
activeUsers: number;
|
|
81
125
|
cost: number;
|
|
@@ -89,12 +133,20 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
89
133
|
planId: string;
|
|
90
134
|
currentPeriodStart: Date;
|
|
91
135
|
currentPeriodEnd: Date;
|
|
136
|
+
id?: string | undefined;
|
|
137
|
+
upcomingInvoice?: {
|
|
138
|
+
subtotal: number;
|
|
139
|
+
subtotalExcludingTax: number | null;
|
|
140
|
+
total: number;
|
|
141
|
+
totalExcludingTax: number | null;
|
|
142
|
+
} | null | undefined;
|
|
92
143
|
};
|
|
144
|
+
regionName: RegionName;
|
|
93
145
|
tag: TenantTag;
|
|
94
146
|
openInvoices: {
|
|
95
147
|
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
96
|
-
createdAt: Date;
|
|
97
148
|
id: string;
|
|
149
|
+
createdAt: Date;
|
|
98
150
|
updatedAt: Date;
|
|
99
151
|
customerId: string | null;
|
|
100
152
|
billingReason: string | null;
|
|
@@ -108,10 +160,12 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
108
160
|
}[];
|
|
109
161
|
}>;
|
|
110
162
|
};
|
|
163
|
+
options: {};
|
|
111
164
|
get: {
|
|
112
165
|
"/tenants": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
|
|
113
166
|
id: string;
|
|
114
167
|
name: string;
|
|
168
|
+
createdAt: Date;
|
|
115
169
|
usage: {
|
|
116
170
|
activeUsers: number;
|
|
117
171
|
cost: number;
|
|
@@ -125,12 +179,20 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
125
179
|
planId: string;
|
|
126
180
|
currentPeriodStart: Date;
|
|
127
181
|
currentPeriodEnd: Date;
|
|
182
|
+
id?: string | undefined;
|
|
183
|
+
upcomingInvoice?: {
|
|
184
|
+
subtotal: number;
|
|
185
|
+
subtotalExcludingTax: number | null;
|
|
186
|
+
total: number;
|
|
187
|
+
totalExcludingTax: number | null;
|
|
188
|
+
} | null | undefined;
|
|
128
189
|
};
|
|
190
|
+
regionName: RegionName;
|
|
129
191
|
tag: TenantTag;
|
|
130
192
|
openInvoices: {
|
|
131
193
|
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
132
|
-
createdAt: Date;
|
|
133
194
|
id: string;
|
|
195
|
+
createdAt: Date;
|
|
134
196
|
updatedAt: Date;
|
|
135
197
|
customerId: string | null;
|
|
136
198
|
billingReason: string | null;
|
|
@@ -148,9 +210,11 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
148
210
|
"/tenants": import("@withtyped/server").PathGuard<"/", unknown, {
|
|
149
211
|
name?: string | undefined;
|
|
150
212
|
tag?: TenantTag | undefined;
|
|
213
|
+
regionName?: RegionName | undefined;
|
|
151
214
|
}, {
|
|
152
215
|
id: string;
|
|
153
216
|
name: string;
|
|
217
|
+
createdAt: Date;
|
|
154
218
|
usage: {
|
|
155
219
|
activeUsers: number;
|
|
156
220
|
cost: number;
|
|
@@ -164,12 +228,20 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
164
228
|
planId: string;
|
|
165
229
|
currentPeriodStart: Date;
|
|
166
230
|
currentPeriodEnd: Date;
|
|
231
|
+
id?: string | undefined;
|
|
232
|
+
upcomingInvoice?: {
|
|
233
|
+
subtotal: number;
|
|
234
|
+
subtotalExcludingTax: number | null;
|
|
235
|
+
total: number;
|
|
236
|
+
totalExcludingTax: number | null;
|
|
237
|
+
} | null | undefined;
|
|
167
238
|
};
|
|
239
|
+
regionName: RegionName;
|
|
168
240
|
tag: TenantTag;
|
|
169
241
|
openInvoices: {
|
|
170
242
|
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
171
|
-
createdAt: Date;
|
|
172
243
|
id: string;
|
|
244
|
+
createdAt: Date;
|
|
173
245
|
updatedAt: Date;
|
|
174
246
|
customerId: string | null;
|
|
175
247
|
billingReason: string | null;
|
|
@@ -190,28 +262,140 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
190
262
|
copy: {};
|
|
191
263
|
head: {};
|
|
192
264
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
193
|
-
options: {};
|
|
194
265
|
patch: {};
|
|
266
|
+
options: {};
|
|
195
267
|
get: {
|
|
196
268
|
"/tenants/my/subscription": import("@withtyped/server").PathGuard<"/my/subscription", unknown, unknown, {
|
|
197
269
|
status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
|
|
198
270
|
planId: string;
|
|
199
271
|
currentPeriodStart: Date;
|
|
200
272
|
currentPeriodEnd: Date;
|
|
273
|
+
id?: string | undefined;
|
|
274
|
+
upcomingInvoice?: {
|
|
275
|
+
subtotal: number;
|
|
276
|
+
subtotalExcludingTax: number | null;
|
|
277
|
+
total: number;
|
|
278
|
+
totalExcludingTax: number | null;
|
|
279
|
+
} | null | undefined;
|
|
280
|
+
}>;
|
|
281
|
+
} & {
|
|
282
|
+
"/tenants/my/subscription/quota": import("@withtyped/server").PathGuard<"/my/subscription/quota", unknown, unknown, {
|
|
283
|
+
mauLimit: number | null;
|
|
284
|
+
tokenLimit: number | null;
|
|
285
|
+
applicationsLimit: number | null;
|
|
286
|
+
machineToMachineLimit: number | null;
|
|
287
|
+
resourcesLimit: number | null;
|
|
288
|
+
scopesPerResourceLimit: number | null;
|
|
289
|
+
socialConnectorsLimit: number | null;
|
|
290
|
+
machineToMachineRolesLimit: number | null;
|
|
291
|
+
scopesPerRoleLimit: number | null;
|
|
292
|
+
hooksLimit: number | null;
|
|
293
|
+
auditLogsRetentionDays: number | null;
|
|
294
|
+
mfaEnabled: boolean;
|
|
295
|
+
organizationsEnabled: boolean;
|
|
296
|
+
thirdPartyApplicationsLimit: number | null;
|
|
297
|
+
tenantMembersLimit: number | null;
|
|
298
|
+
customJwtEnabled: boolean;
|
|
299
|
+
subjectTokenEnabled: boolean;
|
|
300
|
+
bringYourUiEnabled: boolean;
|
|
301
|
+
userRolesLimit: number | null;
|
|
302
|
+
enterpriseSsoLimit: number | null;
|
|
201
303
|
}>;
|
|
304
|
+
} & {
|
|
305
|
+
"/tenants/my/subscription/usage": import("@withtyped/server").PathGuard<"/my/subscription/usage", unknown, unknown, {
|
|
306
|
+
mauLimit: number;
|
|
307
|
+
tokenLimit: number;
|
|
308
|
+
applicationsLimit: number;
|
|
309
|
+
machineToMachineLimit: number;
|
|
310
|
+
resourcesLimit: number;
|
|
311
|
+
scopesPerResourceLimit: number;
|
|
312
|
+
socialConnectorsLimit: number;
|
|
313
|
+
machineToMachineRolesLimit: number;
|
|
314
|
+
scopesPerRoleLimit: number;
|
|
315
|
+
hooksLimit: number;
|
|
316
|
+
mfaEnabled: boolean;
|
|
317
|
+
organizationsEnabled: boolean;
|
|
318
|
+
thirdPartyApplicationsLimit: number;
|
|
319
|
+
tenantMembersLimit: number;
|
|
320
|
+
customJwtEnabled: boolean;
|
|
321
|
+
subjectTokenEnabled: boolean;
|
|
322
|
+
bringYourUiEnabled: boolean;
|
|
323
|
+
userRolesLimit: number;
|
|
324
|
+
enterpriseSsoLimit: number;
|
|
325
|
+
}>;
|
|
326
|
+
} & {
|
|
327
|
+
"/tenants/my/subscription/usage/:entityName/scopes": import("@withtyped/server").PathGuard<"/my/subscription/usage/:entityName/scopes", {
|
|
328
|
+
entityId?: string | undefined;
|
|
329
|
+
}, unknown, Record<string, number>>;
|
|
202
330
|
} & {
|
|
203
331
|
"/tenants/:tenantId/subscription": import("@withtyped/server").PathGuard<"/:tenantId/subscription", unknown, unknown, {
|
|
204
332
|
status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
|
|
205
333
|
planId: string;
|
|
206
334
|
currentPeriodStart: Date;
|
|
207
335
|
currentPeriodEnd: Date;
|
|
336
|
+
id?: string | undefined;
|
|
337
|
+
upcomingInvoice?: {
|
|
338
|
+
subtotal: number;
|
|
339
|
+
subtotalExcludingTax: number | null;
|
|
340
|
+
total: number;
|
|
341
|
+
totalExcludingTax: number | null;
|
|
342
|
+
} | null | undefined;
|
|
343
|
+
}>;
|
|
344
|
+
} & {
|
|
345
|
+
"/tenants/:tenantId/subscription/quota": import("@withtyped/server").PathGuard<"/:tenantId/subscription/quota", unknown, unknown, {
|
|
346
|
+
mauLimit: number | null;
|
|
347
|
+
tokenLimit: number | null;
|
|
348
|
+
applicationsLimit: number | null;
|
|
349
|
+
machineToMachineLimit: number | null;
|
|
350
|
+
resourcesLimit: number | null;
|
|
351
|
+
scopesPerResourceLimit: number | null;
|
|
352
|
+
socialConnectorsLimit: number | null;
|
|
353
|
+
machineToMachineRolesLimit: number | null;
|
|
354
|
+
scopesPerRoleLimit: number | null;
|
|
355
|
+
hooksLimit: number | null;
|
|
356
|
+
auditLogsRetentionDays: number | null;
|
|
357
|
+
mfaEnabled: boolean;
|
|
358
|
+
organizationsEnabled: boolean;
|
|
359
|
+
thirdPartyApplicationsLimit: number | null;
|
|
360
|
+
tenantMembersLimit: number | null;
|
|
361
|
+
customJwtEnabled: boolean;
|
|
362
|
+
subjectTokenEnabled: boolean;
|
|
363
|
+
bringYourUiEnabled: boolean;
|
|
364
|
+
userRolesLimit: number | null;
|
|
365
|
+
enterpriseSsoLimit: number | null;
|
|
208
366
|
}>;
|
|
367
|
+
} & {
|
|
368
|
+
"/tenants/:tenantId/subscription/usage": import("@withtyped/server").PathGuard<"/:tenantId/subscription/usage", unknown, unknown, {
|
|
369
|
+
mauLimit: number;
|
|
370
|
+
tokenLimit: number;
|
|
371
|
+
applicationsLimit: number;
|
|
372
|
+
machineToMachineLimit: number;
|
|
373
|
+
resourcesLimit: number;
|
|
374
|
+
scopesPerResourceLimit: number;
|
|
375
|
+
socialConnectorsLimit: number;
|
|
376
|
+
machineToMachineRolesLimit: number;
|
|
377
|
+
scopesPerRoleLimit: number;
|
|
378
|
+
hooksLimit: number;
|
|
379
|
+
mfaEnabled: boolean;
|
|
380
|
+
organizationsEnabled: boolean;
|
|
381
|
+
thirdPartyApplicationsLimit: number;
|
|
382
|
+
tenantMembersLimit: number;
|
|
383
|
+
customJwtEnabled: boolean;
|
|
384
|
+
subjectTokenEnabled: boolean;
|
|
385
|
+
bringYourUiEnabled: boolean;
|
|
386
|
+
userRolesLimit: number;
|
|
387
|
+
enterpriseSsoLimit: number;
|
|
388
|
+
}>;
|
|
389
|
+
} & {
|
|
390
|
+
"/tenants/:tenantId/subscription/usage/:entityName/scopes": import("@withtyped/server").PathGuard<"/:tenantId/subscription/usage/:entityName/scopes", {
|
|
391
|
+
entityId?: string | undefined;
|
|
392
|
+
}, unknown, Record<string, number>>;
|
|
209
393
|
} & {
|
|
210
394
|
"/tenants/:tenantId/invoices": import("@withtyped/server").PathGuard<"/:tenantId/invoices", unknown, unknown, {
|
|
211
395
|
invoices: {
|
|
212
396
|
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
213
|
-
createdAt: Date;
|
|
214
397
|
id: string;
|
|
398
|
+
createdAt: Date;
|
|
215
399
|
updatedAt: Date;
|
|
216
400
|
customerId: string | null;
|
|
217
401
|
billingReason: string | null;
|
|
@@ -223,6 +407,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
223
407
|
hostedInvoiceUrl: string | null;
|
|
224
408
|
invoicePdf: string | null;
|
|
225
409
|
planName: string | null;
|
|
410
|
+
skuId?: string | null | undefined;
|
|
226
411
|
}[];
|
|
227
412
|
}>;
|
|
228
413
|
} & {
|
|
@@ -237,6 +422,12 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
237
422
|
}>;
|
|
238
423
|
};
|
|
239
424
|
post: {
|
|
425
|
+
"/tenants/my/subscription/item-updates": import("@withtyped/server").PathGuard<"/my/subscription/item-updates", unknown, {
|
|
426
|
+
usageKey: "tokenLimit" | "machineToMachineLimit" | "resourcesLimit" | "enterpriseSsoLimit" | "tenantMembersLimit" | "mfaEnabled" | "organizationsEnabled";
|
|
427
|
+
}, {
|
|
428
|
+
message: string;
|
|
429
|
+
}>;
|
|
430
|
+
} & {
|
|
240
431
|
"/tenants/:tenantId/stripe-customer-portal": import("@withtyped/server").PathGuard<"/:tenantId/stripe-customer-portal", unknown, {
|
|
241
432
|
callbackUrl?: string | undefined;
|
|
242
433
|
}, {
|
|
@@ -250,8 +441,8 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
250
441
|
copy: {};
|
|
251
442
|
head: {};
|
|
252
443
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
253
|
-
options: {};
|
|
254
444
|
patch: {};
|
|
445
|
+
options: {};
|
|
255
446
|
get: {
|
|
256
447
|
"/services/mails/usage": import("@withtyped/server").PathGuard<"/mails/usage", {
|
|
257
448
|
from?: string | undefined;
|
|
@@ -266,6 +457,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
266
457
|
payload: {
|
|
267
458
|
code?: string | undefined;
|
|
268
459
|
link?: string | undefined;
|
|
460
|
+
} & Record<string, string> & {
|
|
269
461
|
senderName?: string | undefined;
|
|
270
462
|
companyInformation?: string | undefined;
|
|
271
463
|
appLogo?: string | undefined;
|
|
@@ -281,22 +473,51 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
281
473
|
payload: {
|
|
282
474
|
code?: string | undefined;
|
|
283
475
|
link?: string | undefined;
|
|
284
|
-
}
|
|
476
|
+
} & Record<string, string>;
|
|
285
477
|
};
|
|
286
478
|
}, unknown>;
|
|
479
|
+
} & {
|
|
480
|
+
"/services/custom-jwt": import("@withtyped/server").PathGuard<"/custom-jwt", {
|
|
481
|
+
isTest?: string | undefined;
|
|
482
|
+
}, {
|
|
483
|
+
context: Record<string, Json>;
|
|
484
|
+
script: string;
|
|
485
|
+
tokenType: LogtoJwtTokenKeyType.AccessToken;
|
|
486
|
+
token: Record<string, Json>;
|
|
487
|
+
environmentVariables?: Record<string, string> | undefined;
|
|
488
|
+
} | {
|
|
489
|
+
script: string;
|
|
490
|
+
tokenType: LogtoJwtTokenKeyType.ClientCredentials;
|
|
491
|
+
token: Record<string, Json>;
|
|
492
|
+
environmentVariables?: Record<string, string> | undefined;
|
|
493
|
+
}, Record<string, unknown>>;
|
|
494
|
+
};
|
|
495
|
+
put: {
|
|
496
|
+
"/services/custom-jwt/worker": import("@withtyped/server").PathGuard<"/custom-jwt/worker", unknown, {
|
|
497
|
+
"jwt.accessToken"?: {
|
|
498
|
+
production?: string | undefined;
|
|
499
|
+
test?: string | undefined;
|
|
500
|
+
} | undefined;
|
|
501
|
+
"jwt.clientCredentials"?: {
|
|
502
|
+
production?: string | undefined;
|
|
503
|
+
test?: string | undefined;
|
|
504
|
+
} | undefined;
|
|
505
|
+
}, unknown>;
|
|
506
|
+
};
|
|
507
|
+
delete: {
|
|
508
|
+
"/services/custom-jwt/worker": import("@withtyped/server").PathGuard<"/custom-jwt/worker", unknown, unknown, unknown>;
|
|
287
509
|
};
|
|
288
|
-
put: {};
|
|
289
|
-
delete: {};
|
|
290
510
|
copy: {};
|
|
291
511
|
head: {};
|
|
292
512
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
293
|
-
options: {};
|
|
294
513
|
patch: {};
|
|
514
|
+
options: {};
|
|
295
515
|
get: {
|
|
296
516
|
"/subscription-plans": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
|
|
297
|
-
createdAt: Date;
|
|
298
517
|
id: string;
|
|
518
|
+
createdAt: Date;
|
|
299
519
|
name: string;
|
|
520
|
+
updatedAt: Date;
|
|
300
521
|
quota: {
|
|
301
522
|
mauLimit: number | null;
|
|
302
523
|
tokenLimit: number | null;
|
|
@@ -318,6 +539,10 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
318
539
|
organizationsEnabled: boolean;
|
|
319
540
|
ssoEnabled: boolean;
|
|
320
541
|
thirdPartyApplicationsLimit: number | null;
|
|
542
|
+
tenantMembersLimit: number | null;
|
|
543
|
+
customJwtEnabled: boolean;
|
|
544
|
+
subjectTokenEnabled: boolean;
|
|
545
|
+
bringYourUiEnabled: boolean;
|
|
321
546
|
};
|
|
322
547
|
stripeProducts: {
|
|
323
548
|
type: "flat" | "tier1" | "tier2" | "tier3";
|
|
@@ -331,7 +556,6 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
331
556
|
};
|
|
332
557
|
description?: string | undefined;
|
|
333
558
|
}[];
|
|
334
|
-
updatedAt: Date;
|
|
335
559
|
}[]>;
|
|
336
560
|
};
|
|
337
561
|
post: {};
|
|
@@ -340,16 +564,41 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
340
564
|
copy: {};
|
|
341
565
|
head: {};
|
|
342
566
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
343
|
-
options: {};
|
|
344
567
|
patch: {};
|
|
568
|
+
options: {};
|
|
345
569
|
get: {
|
|
346
|
-
"/
|
|
347
|
-
|
|
570
|
+
"/skus": import("@withtyped/server").PathGuard<"/", {
|
|
571
|
+
type?: LogtoSkuType | undefined;
|
|
572
|
+
}, unknown, {
|
|
573
|
+
type: LogtoSkuType;
|
|
348
574
|
id: string;
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
575
|
+
name: string | null;
|
|
576
|
+
quota: {
|
|
577
|
+
mauLimit?: number | null | undefined;
|
|
578
|
+
tokenLimit?: number | null | undefined;
|
|
579
|
+
applicationsLimit?: number | null | undefined;
|
|
580
|
+
machineToMachineLimit?: number | null | undefined;
|
|
581
|
+
resourcesLimit?: number | null | undefined;
|
|
582
|
+
scopesPerResourceLimit?: number | null | undefined;
|
|
583
|
+
socialConnectorsLimit?: number | null | undefined;
|
|
584
|
+
machineToMachineRolesLimit?: number | null | undefined;
|
|
585
|
+
scopesPerRoleLimit?: number | null | undefined;
|
|
586
|
+
hooksLimit?: number | null | undefined;
|
|
587
|
+
auditLogsRetentionDays?: number | null | undefined;
|
|
588
|
+
mfaEnabled?: boolean | undefined;
|
|
589
|
+
organizationsEnabled?: boolean | undefined;
|
|
590
|
+
thirdPartyApplicationsLimit?: number | null | undefined;
|
|
591
|
+
tenantMembersLimit?: number | null | undefined;
|
|
592
|
+
customJwtEnabled?: boolean | undefined;
|
|
593
|
+
subjectTokenEnabled?: boolean | undefined;
|
|
594
|
+
bringYourUiEnabled?: boolean | undefined;
|
|
595
|
+
userRolesLimit?: number | null | undefined;
|
|
596
|
+
enterpriseSsoLimit?: number | null | undefined;
|
|
597
|
+
};
|
|
598
|
+
createdAt: Date;
|
|
599
|
+
updatedAt: Date;
|
|
600
|
+
unitPrice: number | null;
|
|
601
|
+
}[]>;
|
|
353
602
|
};
|
|
354
603
|
post: {};
|
|
355
604
|
put: {};
|
|
@@ -357,17 +606,18 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
357
606
|
copy: {};
|
|
358
607
|
head: {};
|
|
359
608
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
360
|
-
options: {};
|
|
361
609
|
patch: {};
|
|
610
|
+
options: {};
|
|
362
611
|
get: {
|
|
363
612
|
"/checkout-session/:id": import("@withtyped/server").PathGuard<"/:id", unknown, unknown, {
|
|
364
|
-
status: "open" | "complete" | "expired";
|
|
365
|
-
createdAt: Date;
|
|
366
613
|
id: string;
|
|
614
|
+
createdAt: Date;
|
|
367
615
|
userId: string;
|
|
368
|
-
|
|
616
|
+
status: "open" | "complete" | "expired";
|
|
369
617
|
tenantId: string | null;
|
|
618
|
+
updatedAt: Date;
|
|
370
619
|
planId: string;
|
|
620
|
+
skuId: string | null;
|
|
371
621
|
}>;
|
|
372
622
|
};
|
|
373
623
|
post: {
|
|
@@ -375,9 +625,11 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
375
625
|
planId: string;
|
|
376
626
|
successCallbackUrl: string;
|
|
377
627
|
tenantId?: string | undefined;
|
|
378
|
-
|
|
379
|
-
tenantTag?: TenantTag | undefined;
|
|
628
|
+
skuId?: string | undefined;
|
|
380
629
|
tenantName?: string | undefined;
|
|
630
|
+
tenantTag?: TenantTag | undefined;
|
|
631
|
+
tenantRegionName?: RegionName | undefined;
|
|
632
|
+
cancelCallbackUrl?: string | undefined;
|
|
381
633
|
}, {
|
|
382
634
|
sessionId: string;
|
|
383
635
|
redirectUri?: string | null | undefined;
|
|
@@ -388,8 +640,8 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
388
640
|
copy: {};
|
|
389
641
|
head: {};
|
|
390
642
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
391
|
-
options: {};
|
|
392
643
|
patch: {};
|
|
644
|
+
options: {};
|
|
393
645
|
get: {
|
|
394
646
|
"/affiliates": import("@withtyped/server").PathGuard<"/", unknown, unknown, AffiliateData[]>;
|
|
395
647
|
};
|
|
@@ -397,33 +649,33 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
397
649
|
"/affiliates": import("@withtyped/server").PathGuard<"/", unknown, {
|
|
398
650
|
name: string;
|
|
399
651
|
}, {
|
|
400
|
-
createdAt: Date;
|
|
401
652
|
id: string;
|
|
653
|
+
createdAt: Date;
|
|
402
654
|
name: string;
|
|
403
655
|
}>;
|
|
404
656
|
} & {
|
|
405
657
|
"/affiliates/:id/properties": import("@withtyped/server").PathGuard<"/:id/properties", unknown, {
|
|
406
|
-
value: string;
|
|
407
658
|
type: "hostname" | "query";
|
|
408
|
-
}, {
|
|
409
659
|
value: string;
|
|
410
|
-
|
|
660
|
+
}, {
|
|
411
661
|
createdAt: Date;
|
|
412
662
|
affiliateId: string;
|
|
663
|
+
type: "hostname" | "query";
|
|
664
|
+
value: string;
|
|
413
665
|
}>;
|
|
414
666
|
};
|
|
415
667
|
put: {};
|
|
416
668
|
delete: {
|
|
417
669
|
"/affiliates/:id/properties": import("@withtyped/server").PathGuard<"/:id/properties", unknown, {
|
|
418
|
-
value: string;
|
|
419
670
|
type: "hostname" | "query";
|
|
671
|
+
value: string;
|
|
420
672
|
}, unknown>;
|
|
421
673
|
};
|
|
422
674
|
copy: {};
|
|
423
675
|
head: {};
|
|
424
676
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
425
|
-
options: {};
|
|
426
677
|
patch: {};
|
|
678
|
+
options: {};
|
|
427
679
|
get: {};
|
|
428
680
|
post: {
|
|
429
681
|
"/affiliate-logs": import("@withtyped/server").PathGuard<"/", unknown, {
|
|
@@ -432,8 +684,8 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
432
684
|
hostname?: string | undefined;
|
|
433
685
|
query?: string | undefined;
|
|
434
686
|
}, {
|
|
435
|
-
createdAt: Date;
|
|
436
687
|
id: string;
|
|
688
|
+
createdAt: Date;
|
|
437
689
|
affiliateId: string | null;
|
|
438
690
|
userId: string;
|
|
439
691
|
createdVia: {
|
|
@@ -447,15 +699,152 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
447
699
|
delete: {};
|
|
448
700
|
copy: {};
|
|
449
701
|
head: {};
|
|
702
|
+
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
703
|
+
patch: {
|
|
704
|
+
"/invitations/:invitationId/status": import("@withtyped/server").PathGuard<"/:invitationId/status", unknown, {
|
|
705
|
+
status: OrganizationInvitationStatus.Accepted;
|
|
706
|
+
}, unknown>;
|
|
707
|
+
};
|
|
708
|
+
options: {};
|
|
709
|
+
get: {
|
|
710
|
+
"/invitations": import("@withtyped/server").PathGuard<"/", unknown, unknown, ({
|
|
711
|
+
id: string;
|
|
712
|
+
createdAt: number;
|
|
713
|
+
status: OrganizationInvitationStatus;
|
|
714
|
+
tenantId: string;
|
|
715
|
+
updatedAt: number;
|
|
716
|
+
inviterId: string | null;
|
|
717
|
+
invitee: string;
|
|
718
|
+
acceptedUserId: string | null;
|
|
719
|
+
organizationId: string;
|
|
720
|
+
expiresAt: number;
|
|
721
|
+
organizationRoles: OrganizationRoleEntity[];
|
|
722
|
+
} & {
|
|
723
|
+
tenantName: string;
|
|
724
|
+
tenantTag: TenantTag;
|
|
725
|
+
})[]>;
|
|
726
|
+
} & {
|
|
727
|
+
"/invitations/:invitationId": import("@withtyped/server").PathGuard<"/:invitationId", unknown, unknown, {
|
|
728
|
+
id: string;
|
|
729
|
+
createdAt: number;
|
|
730
|
+
status: OrganizationInvitationStatus;
|
|
731
|
+
tenantId: string;
|
|
732
|
+
updatedAt: number;
|
|
733
|
+
inviterId: string | null;
|
|
734
|
+
invitee: string;
|
|
735
|
+
acceptedUserId: string | null;
|
|
736
|
+
organizationId: string;
|
|
737
|
+
expiresAt: number;
|
|
738
|
+
organizationRoles: OrganizationRoleEntity[];
|
|
739
|
+
}>;
|
|
740
|
+
};
|
|
741
|
+
post: {};
|
|
742
|
+
put: {};
|
|
743
|
+
delete: {};
|
|
744
|
+
copy: {};
|
|
745
|
+
head: {};
|
|
746
|
+
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
747
|
+
patch: {};
|
|
748
|
+
options: {};
|
|
749
|
+
get: {};
|
|
750
|
+
post: {};
|
|
751
|
+
put: {};
|
|
752
|
+
delete: {
|
|
753
|
+
"/me": import("@withtyped/server").PathGuard<"/", unknown, unknown, unknown>;
|
|
754
|
+
};
|
|
755
|
+
copy: {};
|
|
756
|
+
head: {};
|
|
450
757
|
}, "/api">>, "/api">;
|
|
451
758
|
export declare const tenantAuthRouter: import("@withtyped/server").Router<RequestContext, import("@withtyped/server").WithBodyContext<import("@withtyped/server").BaseContext & {
|
|
452
759
|
request: {
|
|
760
|
+
id?: string | undefined;
|
|
453
761
|
method?: import("@withtyped/server").RequestMethod | undefined;
|
|
454
762
|
headers: import("http").IncomingHttpHeaders;
|
|
455
763
|
url: URL;
|
|
456
764
|
body?: unknown;
|
|
457
765
|
};
|
|
458
|
-
}>, import("@withtyped/server").MergeRoutes<import("@withtyped/server").BaseRoutes, import("@withtyped/server").RoutesWithPrefix<
|
|
766
|
+
}>, import("@withtyped/server").MergeRoutes<import("@withtyped/server").BaseRoutes, import("@withtyped/server").RoutesWithPrefix<{
|
|
767
|
+
patch: {
|
|
768
|
+
"/:tenantId/invitations/:invitationId/status": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId/status", unknown, {
|
|
769
|
+
status: OrganizationInvitationStatus.Revoked;
|
|
770
|
+
}, {
|
|
771
|
+
id: string;
|
|
772
|
+
createdAt: number;
|
|
773
|
+
status: OrganizationInvitationStatus;
|
|
774
|
+
tenantId: string;
|
|
775
|
+
updatedAt: number;
|
|
776
|
+
inviterId: string | null;
|
|
777
|
+
invitee: string;
|
|
778
|
+
acceptedUserId: string | null;
|
|
779
|
+
organizationId: string;
|
|
780
|
+
expiresAt: number;
|
|
781
|
+
organizationRoles: OrganizationRoleEntity[];
|
|
782
|
+
}>;
|
|
783
|
+
};
|
|
784
|
+
options: {};
|
|
785
|
+
get: {
|
|
786
|
+
"/:tenantId/members": import("@withtyped/server").PathGuard<"/:tenantId/members", unknown, unknown, {
|
|
787
|
+
id: string;
|
|
788
|
+
name: string | null;
|
|
789
|
+
username: string | null;
|
|
790
|
+
primaryEmail: string | null;
|
|
791
|
+
primaryPhone: string | null;
|
|
792
|
+
avatar: string | null;
|
|
793
|
+
organizationRoles: OrganizationRoleEntity[];
|
|
794
|
+
}[]>;
|
|
795
|
+
} & {
|
|
796
|
+
"/:tenantId/members/:userId/scopes": import("@withtyped/server").PathGuard<"/:tenantId/members/:userId/scopes", unknown, unknown, OrganizationScope[]>;
|
|
797
|
+
} & {
|
|
798
|
+
"/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, unknown, ({
|
|
799
|
+
id: string;
|
|
800
|
+
createdAt: number;
|
|
801
|
+
status: OrganizationInvitationStatus;
|
|
802
|
+
tenantId: string;
|
|
803
|
+
updatedAt: number;
|
|
804
|
+
inviterId: string | null;
|
|
805
|
+
invitee: string;
|
|
806
|
+
acceptedUserId: string | null;
|
|
807
|
+
organizationId: string;
|
|
808
|
+
expiresAt: number;
|
|
809
|
+
organizationRoles: OrganizationRoleEntity[];
|
|
810
|
+
} & {
|
|
811
|
+
inviterName?: string | undefined;
|
|
812
|
+
})[]>;
|
|
813
|
+
};
|
|
814
|
+
post: {
|
|
815
|
+
"/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, {
|
|
816
|
+
invitee: string;
|
|
817
|
+
roleName: TenantRole;
|
|
818
|
+
expiresAt?: number | undefined;
|
|
819
|
+
}, {
|
|
820
|
+
id: string;
|
|
821
|
+
createdAt: number;
|
|
822
|
+
status: OrganizationInvitationStatus;
|
|
823
|
+
tenantId: string;
|
|
824
|
+
updatedAt: number;
|
|
825
|
+
inviterId: string | null;
|
|
826
|
+
invitee: string;
|
|
827
|
+
acceptedUserId: string | null;
|
|
828
|
+
organizationId: string;
|
|
829
|
+
expiresAt: number;
|
|
830
|
+
organizationRoles: OrganizationRoleEntity[];
|
|
831
|
+
}>;
|
|
832
|
+
} & {
|
|
833
|
+
"/:tenantId/invitations/:invitationId/message": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId/message", unknown, unknown, unknown>;
|
|
834
|
+
};
|
|
835
|
+
put: {
|
|
836
|
+
"/:tenantId/members/:userId/roles": import("@withtyped/server").PathGuard<"/:tenantId/members/:userId/roles", unknown, {
|
|
837
|
+
roleName: TenantRole;
|
|
838
|
+
}, unknown>;
|
|
839
|
+
};
|
|
840
|
+
delete: {
|
|
841
|
+
"/:tenantId/members/:userId": import("@withtyped/server").PathGuard<"/:tenantId/members/:userId", unknown, unknown, unknown>;
|
|
842
|
+
} & {
|
|
843
|
+
"/:tenantId/invitations/:invitationId": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId", unknown, unknown, unknown>;
|
|
844
|
+
};
|
|
845
|
+
copy: {};
|
|
846
|
+
head: {};
|
|
847
|
+
}, "/api/tenants">>, "/api/tenants">;
|
|
459
848
|
|
|
460
849
|
export {
|
|
461
850
|
router as default,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@logto/cloud",
|
|
3
|
-
"version": "0.2.5-
|
|
3
|
+
"version": "0.2.5-50ff8fe",
|
|
4
4
|
"description": "Logto Cloud service.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"author": "Silverhand Inc. <contact@silverhand.io>",
|
|
@@ -16,22 +16,21 @@
|
|
|
16
16
|
"#src/*": "./build/*"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@silverhand/eslint-config": "
|
|
20
|
-
"@silverhand/
|
|
21
|
-
"@silverhand/ts-config": "5.0.0",
|
|
19
|
+
"@silverhand/eslint-config": "6.0.1",
|
|
20
|
+
"@silverhand/ts-config": "6.0.0",
|
|
22
21
|
"@types/accepts": "^1.3.5",
|
|
23
22
|
"@types/http-proxy": "^1.17.9",
|
|
24
|
-
"@types/jest": "^29.4.0",
|
|
25
23
|
"@types/mime-types": "^2.1.1",
|
|
26
24
|
"@types/node": "^20.0.0",
|
|
27
25
|
"@types/yargs": "^17.0.24",
|
|
28
26
|
"dts-bundle-generator": "^9.3.1",
|
|
29
|
-
"eslint": "^8.
|
|
30
|
-
"jest": "^29.5.0",
|
|
27
|
+
"eslint": "^8.57.0",
|
|
31
28
|
"lint-staged": "^15.0.0",
|
|
32
29
|
"nodemon": "^3.0.0",
|
|
33
30
|
"prettier": "^3.0.0",
|
|
34
|
-
"typescript": "^5.3.3"
|
|
31
|
+
"typescript": "^5.3.3",
|
|
32
|
+
"vite-tsconfig-paths": "^4.3.1",
|
|
33
|
+
"vitest": "^2.0.0"
|
|
35
34
|
},
|
|
36
35
|
"engines": {
|
|
37
36
|
"node": "^20.9.0"
|
|
@@ -50,22 +49,19 @@
|
|
|
50
49
|
"access": "public"
|
|
51
50
|
},
|
|
52
51
|
"dependencies": {
|
|
53
|
-
"@silverhand/essentials": "^2.9.
|
|
54
|
-
"@withtyped/server": "^0.13.
|
|
52
|
+
"@silverhand/essentials": "^2.9.1",
|
|
53
|
+
"@withtyped/server": "^0.13.6"
|
|
55
54
|
},
|
|
56
55
|
"scripts": {
|
|
57
56
|
"precommit": "lint-staged",
|
|
58
57
|
"build": "rm -rf build/ && tsc -p tsconfig.build.json && pnpm build:lib",
|
|
59
58
|
"//": "It is not used to build the service itself.",
|
|
60
59
|
"build:lib": "rm -rf lib/ && dts-bundle-generator src/routes/index.ts --project tsconfig.build.lib.json -o lib/routes/index.d.ts",
|
|
61
|
-
"build:test": "rm -rf build/ && tsc -p tsconfig.test.json --sourcemap",
|
|
62
60
|
"lint": "eslint --ext .ts src",
|
|
63
61
|
"lint:report": "pnpm lint --format json --output-file report.json",
|
|
64
62
|
"dev": "rm -rf build/ && nodemon",
|
|
65
63
|
"start": "NODE_ENV=production node .",
|
|
66
|
-
"test
|
|
67
|
-
"test": "pnpm build:test && pnpm test:only && pnpm build:lib && pnpm test:types",
|
|
68
|
-
"test:ci": "pnpm test:only --coverage --silent",
|
|
64
|
+
"test": "vitest && pnpm build:lib && pnpm test:types",
|
|
69
65
|
"test:types": "tsc -p tsconfig.test.types.json",
|
|
70
66
|
"cli": "node ./build/cli/index.js"
|
|
71
67
|
}
|