@logto/cloud 0.2.5-821690c → 0.2.5-91ab76c
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 +489 -35
- package/package.json +7 -7
package/lib/routes/index.d.ts
CHANGED
|
@@ -69,6 +69,23 @@ declare enum TenantRole {
|
|
|
69
69
|
/** Collaborator of the tenant, who has permissions to operate the tenant data, but not the tenant settings. */
|
|
70
70
|
Collaborator = "collaborator"
|
|
71
71
|
}
|
|
72
|
+
declare const availableReportableUsageKeys: readonly [
|
|
73
|
+
"tokenLimit",
|
|
74
|
+
"machineToMachineLimit",
|
|
75
|
+
"resourcesLimit",
|
|
76
|
+
"enterpriseSsoLimit",
|
|
77
|
+
"hooksLimit",
|
|
78
|
+
"tenantMembersLimit",
|
|
79
|
+
"mfaEnabled",
|
|
80
|
+
"organizationsEnabled",
|
|
81
|
+
"organizationsLimit"
|
|
82
|
+
];
|
|
83
|
+
export type ReportableUsageKey = (typeof availableReportableUsageKeys)[number];
|
|
84
|
+
export type RealtimeReportableUsageKey = Exclude<ReportableUsageKey, "tokenLimit">;
|
|
85
|
+
declare enum LogtoSkuType {
|
|
86
|
+
Basic = "Basic",
|
|
87
|
+
AddOn = "AddOn"
|
|
88
|
+
}
|
|
72
89
|
declare const AffiliateProperties: import("@withtyped/server/lib/model/index.js").default<"affiliate_properties", {
|
|
73
90
|
createdAt: Date;
|
|
74
91
|
affiliateId: string;
|
|
@@ -82,11 +99,16 @@ declare const Affiliates: import("@withtyped/server/lib/model/index.js").default
|
|
|
82
99
|
id: string;
|
|
83
100
|
}, "id" | "createdAt", "id" | "createdAt">;
|
|
84
101
|
export type Affiliate = InferModelType<typeof Affiliates>;
|
|
102
|
+
declare enum RegionName {
|
|
103
|
+
EU = "EU",
|
|
104
|
+
US = "US"
|
|
105
|
+
}
|
|
85
106
|
export type AffiliateData = Affiliate & {
|
|
86
107
|
properties: Array<Pick<AffiliateProperty, "type" | "value">>;
|
|
87
108
|
};
|
|
88
109
|
declare const router: import("@withtyped/server").Router<RequestContext, WithAuthContext<Omit<import("@withtyped/server").BaseContext & {
|
|
89
110
|
request: {
|
|
111
|
+
id?: string | undefined;
|
|
90
112
|
method?: import("@withtyped/server").RequestMethod | undefined;
|
|
91
113
|
headers: import("http").IncomingHttpHeaders;
|
|
92
114
|
url: URL;
|
|
@@ -94,6 +116,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
94
116
|
};
|
|
95
117
|
}, "request"> & {
|
|
96
118
|
request: Record<string, unknown> & {
|
|
119
|
+
id?: string | undefined;
|
|
97
120
|
method?: import("@withtyped/server").RequestMethod | undefined;
|
|
98
121
|
headers: import("http").IncomingHttpHeaders;
|
|
99
122
|
url: URL;
|
|
@@ -102,16 +125,20 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
102
125
|
body?: Json | undefined;
|
|
103
126
|
bodyRaw?: Buffer | undefined;
|
|
104
127
|
};
|
|
105
|
-
}>, 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<{
|
|
128
|
+
}>, 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<{
|
|
106
129
|
patch: {
|
|
107
130
|
"/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, {
|
|
108
131
|
name?: string | undefined;
|
|
109
132
|
}, {
|
|
110
133
|
id: string;
|
|
111
134
|
name: string;
|
|
135
|
+
quota: {
|
|
136
|
+
mauLimit: number | null;
|
|
137
|
+
tokenLimit: number | null;
|
|
138
|
+
};
|
|
139
|
+
createdAt: Date;
|
|
112
140
|
usage: {
|
|
113
141
|
activeUsers: number;
|
|
114
|
-
cost: number;
|
|
115
142
|
tokenUsage: number;
|
|
116
143
|
};
|
|
117
144
|
indicator: string;
|
|
@@ -122,7 +149,18 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
122
149
|
planId: string;
|
|
123
150
|
currentPeriodStart: Date;
|
|
124
151
|
currentPeriodEnd: Date;
|
|
152
|
+
isEnterprisePlan: boolean;
|
|
153
|
+
id?: string | undefined;
|
|
154
|
+
upcomingInvoice?: {
|
|
155
|
+
subtotal: number;
|
|
156
|
+
subtotalExcludingTax: number | null;
|
|
157
|
+
total: number;
|
|
158
|
+
totalExcludingTax: number | null;
|
|
159
|
+
} | null | undefined;
|
|
160
|
+
isAddOnAvailable?: boolean | undefined;
|
|
125
161
|
};
|
|
162
|
+
regionName: RegionName;
|
|
163
|
+
tag: TenantTag;
|
|
126
164
|
openInvoices: {
|
|
127
165
|
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
128
166
|
id: string;
|
|
@@ -138,7 +176,6 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
138
176
|
hostedInvoiceUrl: string | null;
|
|
139
177
|
invoicePdf: string | null;
|
|
140
178
|
}[];
|
|
141
|
-
tag: TenantTag;
|
|
142
179
|
}>;
|
|
143
180
|
};
|
|
144
181
|
options: {};
|
|
@@ -146,9 +183,13 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
146
183
|
"/tenants": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
|
|
147
184
|
id: string;
|
|
148
185
|
name: string;
|
|
186
|
+
quota: {
|
|
187
|
+
mauLimit: number | null;
|
|
188
|
+
tokenLimit: number | null;
|
|
189
|
+
};
|
|
190
|
+
createdAt: Date;
|
|
149
191
|
usage: {
|
|
150
192
|
activeUsers: number;
|
|
151
|
-
cost: number;
|
|
152
193
|
tokenUsage: number;
|
|
153
194
|
};
|
|
154
195
|
indicator: string;
|
|
@@ -159,7 +200,18 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
159
200
|
planId: string;
|
|
160
201
|
currentPeriodStart: Date;
|
|
161
202
|
currentPeriodEnd: Date;
|
|
203
|
+
isEnterprisePlan: boolean;
|
|
204
|
+
id?: string | undefined;
|
|
205
|
+
upcomingInvoice?: {
|
|
206
|
+
subtotal: number;
|
|
207
|
+
subtotalExcludingTax: number | null;
|
|
208
|
+
total: number;
|
|
209
|
+
totalExcludingTax: number | null;
|
|
210
|
+
} | null | undefined;
|
|
211
|
+
isAddOnAvailable?: boolean | undefined;
|
|
162
212
|
};
|
|
213
|
+
regionName: RegionName;
|
|
214
|
+
tag: TenantTag;
|
|
163
215
|
openInvoices: {
|
|
164
216
|
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
165
217
|
id: string;
|
|
@@ -175,19 +227,23 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
175
227
|
hostedInvoiceUrl: string | null;
|
|
176
228
|
invoicePdf: string | null;
|
|
177
229
|
}[];
|
|
178
|
-
tag: TenantTag;
|
|
179
230
|
}[]>;
|
|
180
231
|
};
|
|
181
232
|
post: {
|
|
182
233
|
"/tenants": import("@withtyped/server").PathGuard<"/", unknown, {
|
|
183
234
|
name?: string | undefined;
|
|
184
235
|
tag?: TenantTag | undefined;
|
|
236
|
+
regionName?: RegionName | undefined;
|
|
185
237
|
}, {
|
|
186
238
|
id: string;
|
|
187
239
|
name: string;
|
|
240
|
+
quota: {
|
|
241
|
+
mauLimit: number | null;
|
|
242
|
+
tokenLimit: number | null;
|
|
243
|
+
};
|
|
244
|
+
createdAt: Date;
|
|
188
245
|
usage: {
|
|
189
246
|
activeUsers: number;
|
|
190
|
-
cost: number;
|
|
191
247
|
tokenUsage: number;
|
|
192
248
|
};
|
|
193
249
|
indicator: string;
|
|
@@ -198,7 +254,18 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
198
254
|
planId: string;
|
|
199
255
|
currentPeriodStart: Date;
|
|
200
256
|
currentPeriodEnd: Date;
|
|
257
|
+
isEnterprisePlan: boolean;
|
|
258
|
+
id?: string | undefined;
|
|
259
|
+
upcomingInvoice?: {
|
|
260
|
+
subtotal: number;
|
|
261
|
+
subtotalExcludingTax: number | null;
|
|
262
|
+
total: number;
|
|
263
|
+
totalExcludingTax: number | null;
|
|
264
|
+
} | null | undefined;
|
|
265
|
+
isAddOnAvailable?: boolean | undefined;
|
|
201
266
|
};
|
|
267
|
+
regionName: RegionName;
|
|
268
|
+
tag: TenantTag;
|
|
202
269
|
openInvoices: {
|
|
203
270
|
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
204
271
|
id: string;
|
|
@@ -214,7 +281,6 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
214
281
|
hostedInvoiceUrl: string | null;
|
|
215
282
|
invoicePdf: string | null;
|
|
216
283
|
}[];
|
|
217
|
-
tag: TenantTag;
|
|
218
284
|
}>;
|
|
219
285
|
};
|
|
220
286
|
put: {};
|
|
@@ -232,6 +298,117 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
232
298
|
planId: string;
|
|
233
299
|
currentPeriodStart: Date;
|
|
234
300
|
currentPeriodEnd: Date;
|
|
301
|
+
isEnterprisePlan: boolean;
|
|
302
|
+
id?: string | undefined;
|
|
303
|
+
upcomingInvoice?: {
|
|
304
|
+
subtotal: number;
|
|
305
|
+
subtotalExcludingTax: number | null;
|
|
306
|
+
total: number;
|
|
307
|
+
totalExcludingTax: number | null;
|
|
308
|
+
} | null | undefined;
|
|
309
|
+
isAddOnAvailable?: boolean | undefined;
|
|
310
|
+
}>;
|
|
311
|
+
} & {
|
|
312
|
+
"/tenants/my/subscription/quota": import("@withtyped/server").PathGuard<"/my/subscription/quota", unknown, unknown, {
|
|
313
|
+
mauLimit: number | null;
|
|
314
|
+
tokenLimit: number | null;
|
|
315
|
+
applicationsLimit: number | null;
|
|
316
|
+
machineToMachineLimit: number | null;
|
|
317
|
+
resourcesLimit: number | null;
|
|
318
|
+
scopesPerResourceLimit: number | null;
|
|
319
|
+
socialConnectorsLimit: number | null;
|
|
320
|
+
machineToMachineRolesLimit: number | null;
|
|
321
|
+
scopesPerRoleLimit: number | null;
|
|
322
|
+
hooksLimit: number | null;
|
|
323
|
+
auditLogsRetentionDays: number | null;
|
|
324
|
+
mfaEnabled: boolean;
|
|
325
|
+
organizationsEnabled: boolean;
|
|
326
|
+
thirdPartyApplicationsLimit: number | null;
|
|
327
|
+
tenantMembersLimit: number | null;
|
|
328
|
+
customJwtEnabled: boolean;
|
|
329
|
+
subjectTokenEnabled: boolean;
|
|
330
|
+
bringYourUiEnabled: boolean;
|
|
331
|
+
userRolesLimit: number | null;
|
|
332
|
+
enterpriseSsoLimit: number | null;
|
|
333
|
+
organizationsLimit: number | null;
|
|
334
|
+
}>;
|
|
335
|
+
} & {
|
|
336
|
+
"/tenants/my/subscription/usage": import("@withtyped/server").PathGuard<"/my/subscription/usage", unknown, unknown, {
|
|
337
|
+
applicationsLimit: number;
|
|
338
|
+
machineToMachineLimit: number;
|
|
339
|
+
resourcesLimit: number;
|
|
340
|
+
scopesPerResourceLimit: number;
|
|
341
|
+
socialConnectorsLimit: number;
|
|
342
|
+
machineToMachineRolesLimit: number;
|
|
343
|
+
scopesPerRoleLimit: number;
|
|
344
|
+
hooksLimit: number;
|
|
345
|
+
mfaEnabled: boolean;
|
|
346
|
+
organizationsEnabled: boolean;
|
|
347
|
+
thirdPartyApplicationsLimit: number;
|
|
348
|
+
tenantMembersLimit: number;
|
|
349
|
+
customJwtEnabled: boolean;
|
|
350
|
+
subjectTokenEnabled: boolean;
|
|
351
|
+
bringYourUiEnabled: boolean;
|
|
352
|
+
userRolesLimit: number;
|
|
353
|
+
enterpriseSsoLimit: number;
|
|
354
|
+
organizationsLimit: number;
|
|
355
|
+
}>;
|
|
356
|
+
} & {
|
|
357
|
+
"/tenants/my/subscription/usage/:entityName/scopes": import("@withtyped/server").PathGuard<"/my/subscription/usage/:entityName/scopes", {
|
|
358
|
+
entityId?: string | undefined;
|
|
359
|
+
}, unknown, Record<string, number>>;
|
|
360
|
+
} & {
|
|
361
|
+
"/tenants/my/subscription-usage": import("@withtyped/server").PathGuard<"/my/subscription-usage", unknown, unknown, {
|
|
362
|
+
usage: {
|
|
363
|
+
applicationsLimit: number;
|
|
364
|
+
machineToMachineLimit: number;
|
|
365
|
+
resourcesLimit: number;
|
|
366
|
+
scopesPerResourceLimit: number;
|
|
367
|
+
socialConnectorsLimit: number;
|
|
368
|
+
machineToMachineRolesLimit: number;
|
|
369
|
+
scopesPerRoleLimit: number;
|
|
370
|
+
hooksLimit: number;
|
|
371
|
+
mfaEnabled: boolean;
|
|
372
|
+
organizationsEnabled: boolean;
|
|
373
|
+
thirdPartyApplicationsLimit: number;
|
|
374
|
+
tenantMembersLimit: number;
|
|
375
|
+
customJwtEnabled: boolean;
|
|
376
|
+
subjectTokenEnabled: boolean;
|
|
377
|
+
bringYourUiEnabled: boolean;
|
|
378
|
+
userRolesLimit: number;
|
|
379
|
+
enterpriseSsoLimit: number;
|
|
380
|
+
organizationsLimit: number;
|
|
381
|
+
};
|
|
382
|
+
resources: Record<string, number>;
|
|
383
|
+
roles: Record<string, number>;
|
|
384
|
+
quota: {
|
|
385
|
+
mauLimit: number | null;
|
|
386
|
+
tokenLimit: number | null;
|
|
387
|
+
applicationsLimit: number | null;
|
|
388
|
+
machineToMachineLimit: number | null;
|
|
389
|
+
resourcesLimit: number | null;
|
|
390
|
+
scopesPerResourceLimit: number | null;
|
|
391
|
+
socialConnectorsLimit: number | null;
|
|
392
|
+
machineToMachineRolesLimit: number | null;
|
|
393
|
+
scopesPerRoleLimit: number | null;
|
|
394
|
+
hooksLimit: number | null;
|
|
395
|
+
auditLogsRetentionDays: number | null;
|
|
396
|
+
mfaEnabled: boolean;
|
|
397
|
+
organizationsEnabled: boolean;
|
|
398
|
+
thirdPartyApplicationsLimit: number | null;
|
|
399
|
+
tenantMembersLimit: number | null;
|
|
400
|
+
customJwtEnabled: boolean;
|
|
401
|
+
subjectTokenEnabled: boolean;
|
|
402
|
+
bringYourUiEnabled: boolean;
|
|
403
|
+
userRolesLimit: number | null;
|
|
404
|
+
enterpriseSsoLimit: number | null;
|
|
405
|
+
organizationsLimit: number | null;
|
|
406
|
+
};
|
|
407
|
+
}>;
|
|
408
|
+
} & {
|
|
409
|
+
"/tenants/my/subscription/periodic-usage": import("@withtyped/server").PathGuard<"/my/subscription/periodic-usage", unknown, unknown, {
|
|
410
|
+
mauLimit: number;
|
|
411
|
+
tokenLimit: number;
|
|
235
412
|
}>;
|
|
236
413
|
} & {
|
|
237
414
|
"/tenants/:tenantId/subscription": import("@withtyped/server").PathGuard<"/:tenantId/subscription", unknown, unknown, {
|
|
@@ -239,6 +416,117 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
239
416
|
planId: string;
|
|
240
417
|
currentPeriodStart: Date;
|
|
241
418
|
currentPeriodEnd: Date;
|
|
419
|
+
isEnterprisePlan: boolean;
|
|
420
|
+
id?: string | undefined;
|
|
421
|
+
upcomingInvoice?: {
|
|
422
|
+
subtotal: number;
|
|
423
|
+
subtotalExcludingTax: number | null;
|
|
424
|
+
total: number;
|
|
425
|
+
totalExcludingTax: number | null;
|
|
426
|
+
} | null | undefined;
|
|
427
|
+
isAddOnAvailable?: boolean | undefined;
|
|
428
|
+
}>;
|
|
429
|
+
} & {
|
|
430
|
+
"/tenants/:tenantId/subscription/quota": import("@withtyped/server").PathGuard<"/:tenantId/subscription/quota", unknown, unknown, {
|
|
431
|
+
mauLimit: number | null;
|
|
432
|
+
tokenLimit: number | null;
|
|
433
|
+
applicationsLimit: number | null;
|
|
434
|
+
machineToMachineLimit: number | null;
|
|
435
|
+
resourcesLimit: number | null;
|
|
436
|
+
scopesPerResourceLimit: number | null;
|
|
437
|
+
socialConnectorsLimit: number | null;
|
|
438
|
+
machineToMachineRolesLimit: number | null;
|
|
439
|
+
scopesPerRoleLimit: number | null;
|
|
440
|
+
hooksLimit: number | null;
|
|
441
|
+
auditLogsRetentionDays: number | null;
|
|
442
|
+
mfaEnabled: boolean;
|
|
443
|
+
organizationsEnabled: boolean;
|
|
444
|
+
thirdPartyApplicationsLimit: number | null;
|
|
445
|
+
tenantMembersLimit: number | null;
|
|
446
|
+
customJwtEnabled: boolean;
|
|
447
|
+
subjectTokenEnabled: boolean;
|
|
448
|
+
bringYourUiEnabled: boolean;
|
|
449
|
+
userRolesLimit: number | null;
|
|
450
|
+
enterpriseSsoLimit: number | null;
|
|
451
|
+
organizationsLimit: number | null;
|
|
452
|
+
}>;
|
|
453
|
+
} & {
|
|
454
|
+
"/tenants/:tenantId/subscription/usage": import("@withtyped/server").PathGuard<"/:tenantId/subscription/usage", unknown, unknown, {
|
|
455
|
+
applicationsLimit: number;
|
|
456
|
+
machineToMachineLimit: number;
|
|
457
|
+
resourcesLimit: number;
|
|
458
|
+
scopesPerResourceLimit: number;
|
|
459
|
+
socialConnectorsLimit: number;
|
|
460
|
+
machineToMachineRolesLimit: number;
|
|
461
|
+
scopesPerRoleLimit: number;
|
|
462
|
+
hooksLimit: number;
|
|
463
|
+
mfaEnabled: boolean;
|
|
464
|
+
organizationsEnabled: boolean;
|
|
465
|
+
thirdPartyApplicationsLimit: number;
|
|
466
|
+
tenantMembersLimit: number;
|
|
467
|
+
customJwtEnabled: boolean;
|
|
468
|
+
subjectTokenEnabled: boolean;
|
|
469
|
+
bringYourUiEnabled: boolean;
|
|
470
|
+
userRolesLimit: number;
|
|
471
|
+
enterpriseSsoLimit: number;
|
|
472
|
+
organizationsLimit: number;
|
|
473
|
+
}>;
|
|
474
|
+
} & {
|
|
475
|
+
"/tenants/:tenantId/subscription/usage/:entityName/scopes": import("@withtyped/server").PathGuard<"/:tenantId/subscription/usage/:entityName/scopes", {
|
|
476
|
+
entityId?: string | undefined;
|
|
477
|
+
}, unknown, Record<string, number>>;
|
|
478
|
+
} & {
|
|
479
|
+
"/tenants/:tenantId/subscription-usage": import("@withtyped/server").PathGuard<"/:tenantId/subscription-usage", unknown, unknown, {
|
|
480
|
+
usage: {
|
|
481
|
+
applicationsLimit: number;
|
|
482
|
+
machineToMachineLimit: number;
|
|
483
|
+
resourcesLimit: number;
|
|
484
|
+
scopesPerResourceLimit: number;
|
|
485
|
+
socialConnectorsLimit: number;
|
|
486
|
+
machineToMachineRolesLimit: number;
|
|
487
|
+
scopesPerRoleLimit: number;
|
|
488
|
+
hooksLimit: number;
|
|
489
|
+
mfaEnabled: boolean;
|
|
490
|
+
organizationsEnabled: boolean;
|
|
491
|
+
thirdPartyApplicationsLimit: number;
|
|
492
|
+
tenantMembersLimit: number;
|
|
493
|
+
customJwtEnabled: boolean;
|
|
494
|
+
subjectTokenEnabled: boolean;
|
|
495
|
+
bringYourUiEnabled: boolean;
|
|
496
|
+
userRolesLimit: number;
|
|
497
|
+
enterpriseSsoLimit: number;
|
|
498
|
+
organizationsLimit: number;
|
|
499
|
+
};
|
|
500
|
+
resources: Record<string, number>;
|
|
501
|
+
roles: Record<string, number>;
|
|
502
|
+
quota: {
|
|
503
|
+
mauLimit: number | null;
|
|
504
|
+
tokenLimit: number | null;
|
|
505
|
+
applicationsLimit: number | null;
|
|
506
|
+
machineToMachineLimit: number | null;
|
|
507
|
+
resourcesLimit: number | null;
|
|
508
|
+
scopesPerResourceLimit: number | null;
|
|
509
|
+
socialConnectorsLimit: number | null;
|
|
510
|
+
machineToMachineRolesLimit: number | null;
|
|
511
|
+
scopesPerRoleLimit: number | null;
|
|
512
|
+
hooksLimit: number | null;
|
|
513
|
+
auditLogsRetentionDays: number | null;
|
|
514
|
+
mfaEnabled: boolean;
|
|
515
|
+
organizationsEnabled: boolean;
|
|
516
|
+
thirdPartyApplicationsLimit: number | null;
|
|
517
|
+
tenantMembersLimit: number | null;
|
|
518
|
+
customJwtEnabled: boolean;
|
|
519
|
+
subjectTokenEnabled: boolean;
|
|
520
|
+
bringYourUiEnabled: boolean;
|
|
521
|
+
userRolesLimit: number | null;
|
|
522
|
+
enterpriseSsoLimit: number | null;
|
|
523
|
+
organizationsLimit: number | null;
|
|
524
|
+
};
|
|
525
|
+
}>;
|
|
526
|
+
} & {
|
|
527
|
+
"/tenants/:tenantId/subscription/periodic-usage": import("@withtyped/server").PathGuard<"/:tenantId/subscription/periodic-usage", unknown, unknown, {
|
|
528
|
+
mauLimit: number;
|
|
529
|
+
tokenLimit: number;
|
|
242
530
|
}>;
|
|
243
531
|
} & {
|
|
244
532
|
"/tenants/:tenantId/invoices": import("@withtyped/server").PathGuard<"/:tenantId/invoices", unknown, unknown, {
|
|
@@ -257,20 +545,21 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
257
545
|
hostedInvoiceUrl: string | null;
|
|
258
546
|
invoicePdf: string | null;
|
|
259
547
|
planName: string | null;
|
|
548
|
+
skuId?: string | null | undefined;
|
|
260
549
|
}[];
|
|
261
550
|
}>;
|
|
262
551
|
} & {
|
|
263
552
|
"/tenants/:tenantId/invoices/:invoiceId/hosted-invoice-url": import("@withtyped/server").PathGuard<"/:tenantId/invoices/:invoiceId/hosted-invoice-url", unknown, unknown, {
|
|
264
553
|
hostedInvoiceUrl: string;
|
|
265
554
|
}>;
|
|
266
|
-
} & {
|
|
267
|
-
"/tenants/:tenantId/usage": import("@withtyped/server").PathGuard<"/:tenantId/usage", unknown, unknown, {
|
|
268
|
-
activeUsers: number;
|
|
269
|
-
cost: number;
|
|
270
|
-
tokenUsage: number;
|
|
271
|
-
}>;
|
|
272
555
|
};
|
|
273
556
|
post: {
|
|
557
|
+
"/tenants/my/subscription/item-updates": import("@withtyped/server").PathGuard<"/my/subscription/item-updates", unknown, {
|
|
558
|
+
usageKey: RealtimeReportableUsageKey;
|
|
559
|
+
}, {
|
|
560
|
+
message: string;
|
|
561
|
+
}>;
|
|
562
|
+
} & {
|
|
274
563
|
"/tenants/:tenantId/stripe-customer-portal": import("@withtyped/server").PathGuard<"/:tenantId/stripe-customer-portal", unknown, {
|
|
275
564
|
callbackUrl?: string | undefined;
|
|
276
565
|
}, {
|
|
@@ -320,11 +609,13 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
320
609
|
};
|
|
321
610
|
}, unknown>;
|
|
322
611
|
} & {
|
|
323
|
-
"/services/custom-jwt": import("@withtyped/server").PathGuard<"/custom-jwt",
|
|
612
|
+
"/services/custom-jwt": import("@withtyped/server").PathGuard<"/custom-jwt", {
|
|
613
|
+
isTest?: string | undefined;
|
|
614
|
+
}, {
|
|
615
|
+
context: Record<string, Json>;
|
|
324
616
|
script: string;
|
|
325
617
|
tokenType: LogtoJwtTokenKeyType.AccessToken;
|
|
326
618
|
token: Record<string, Json>;
|
|
327
|
-
context: Record<string, Json>;
|
|
328
619
|
environmentVariables?: Record<string, string> | undefined;
|
|
329
620
|
} | {
|
|
330
621
|
script: string;
|
|
@@ -335,13 +626,13 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
335
626
|
};
|
|
336
627
|
put: {
|
|
337
628
|
"/services/custom-jwt/worker": import("@withtyped/server").PathGuard<"/custom-jwt/worker", unknown, {
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
629
|
+
"jwt.accessToken"?: {
|
|
630
|
+
production?: string | undefined;
|
|
631
|
+
test?: string | undefined;
|
|
341
632
|
} | undefined;
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
633
|
+
"jwt.clientCredentials"?: {
|
|
634
|
+
production?: string | undefined;
|
|
635
|
+
test?: string | undefined;
|
|
345
636
|
} | undefined;
|
|
346
637
|
}, unknown>;
|
|
347
638
|
};
|
|
@@ -359,6 +650,32 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
359
650
|
createdAt: Date;
|
|
360
651
|
name: string;
|
|
361
652
|
updatedAt: Date;
|
|
653
|
+
quota: {
|
|
654
|
+
mauLimit: number | null;
|
|
655
|
+
tokenLimit: number | null;
|
|
656
|
+
applicationsLimit: number | null;
|
|
657
|
+
machineToMachineLimit: number | null;
|
|
658
|
+
resourcesLimit: number | null;
|
|
659
|
+
scopesPerResourceLimit: number | null;
|
|
660
|
+
customDomainEnabled: boolean;
|
|
661
|
+
omniSignInEnabled: boolean;
|
|
662
|
+
builtInEmailConnectorEnabled: boolean;
|
|
663
|
+
socialConnectorsLimit: number | null;
|
|
664
|
+
standardConnectorsLimit: number | null;
|
|
665
|
+
rolesLimit: number | null;
|
|
666
|
+
machineToMachineRolesLimit: number | null;
|
|
667
|
+
scopesPerRoleLimit: number | null;
|
|
668
|
+
hooksLimit: number | null;
|
|
669
|
+
auditLogsRetentionDays: number | null;
|
|
670
|
+
mfaEnabled: boolean;
|
|
671
|
+
organizationsEnabled: boolean;
|
|
672
|
+
ssoEnabled: boolean;
|
|
673
|
+
thirdPartyApplicationsLimit: number | null;
|
|
674
|
+
tenantMembersLimit: number | null;
|
|
675
|
+
customJwtEnabled: boolean;
|
|
676
|
+
subjectTokenEnabled: boolean;
|
|
677
|
+
bringYourUiEnabled: boolean;
|
|
678
|
+
};
|
|
362
679
|
stripeProducts: {
|
|
363
680
|
type: "flat" | "tier1" | "tier2" | "tier3";
|
|
364
681
|
id: string;
|
|
@@ -371,6 +688,79 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
371
688
|
};
|
|
372
689
|
description?: string | undefined;
|
|
373
690
|
}[];
|
|
691
|
+
}[]>;
|
|
692
|
+
};
|
|
693
|
+
post: {};
|
|
694
|
+
put: {};
|
|
695
|
+
delete: {};
|
|
696
|
+
copy: {};
|
|
697
|
+
head: {};
|
|
698
|
+
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
699
|
+
patch: {};
|
|
700
|
+
options: {};
|
|
701
|
+
get: {
|
|
702
|
+
"/skus": import("@withtyped/server").PathGuard<"/", {
|
|
703
|
+
type?: LogtoSkuType | undefined;
|
|
704
|
+
}, unknown, {
|
|
705
|
+
type: LogtoSkuType;
|
|
706
|
+
id: string;
|
|
707
|
+
name: string | null;
|
|
708
|
+
quota: {
|
|
709
|
+
mauLimit?: number | null | undefined;
|
|
710
|
+
tokenLimit?: number | null | undefined;
|
|
711
|
+
applicationsLimit?: number | null | undefined;
|
|
712
|
+
machineToMachineLimit?: number | null | undefined;
|
|
713
|
+
resourcesLimit?: number | null | undefined;
|
|
714
|
+
scopesPerResourceLimit?: number | null | undefined;
|
|
715
|
+
socialConnectorsLimit?: number | null | undefined;
|
|
716
|
+
machineToMachineRolesLimit?: number | null | undefined;
|
|
717
|
+
scopesPerRoleLimit?: number | null | undefined;
|
|
718
|
+
hooksLimit?: number | null | undefined;
|
|
719
|
+
auditLogsRetentionDays?: number | null | undefined;
|
|
720
|
+
mfaEnabled?: boolean | undefined;
|
|
721
|
+
organizationsEnabled?: boolean | undefined;
|
|
722
|
+
thirdPartyApplicationsLimit?: number | null | undefined;
|
|
723
|
+
tenantMembersLimit?: number | null | undefined;
|
|
724
|
+
customJwtEnabled?: boolean | undefined;
|
|
725
|
+
subjectTokenEnabled?: boolean | undefined;
|
|
726
|
+
bringYourUiEnabled?: boolean | undefined;
|
|
727
|
+
userRolesLimit?: number | null | undefined;
|
|
728
|
+
enterpriseSsoLimit?: number | null | undefined;
|
|
729
|
+
organizationsLimit?: number | null | undefined;
|
|
730
|
+
};
|
|
731
|
+
createdAt: Date;
|
|
732
|
+
updatedAt: Date;
|
|
733
|
+
unitPrice: number | null;
|
|
734
|
+
}[]>;
|
|
735
|
+
};
|
|
736
|
+
post: {
|
|
737
|
+
"/skus": import("@withtyped/server").PathGuard<"/", unknown, {
|
|
738
|
+
type: LogtoSkuType.AddOn;
|
|
739
|
+
quota: {
|
|
740
|
+
tokenLimit?: number | null | undefined;
|
|
741
|
+
machineToMachineLimit?: number | null | undefined;
|
|
742
|
+
resourcesLimit?: number | null | undefined;
|
|
743
|
+
enterpriseSsoLimit?: number | null | undefined;
|
|
744
|
+
hooksLimit?: number | null | undefined;
|
|
745
|
+
tenantMembersLimit?: number | null | undefined;
|
|
746
|
+
mfaEnabled?: boolean | undefined;
|
|
747
|
+
organizationsEnabled?: boolean | undefined;
|
|
748
|
+
organizationsLimit?: number | null | undefined;
|
|
749
|
+
mauLimit?: number | null | undefined;
|
|
750
|
+
applicationsLimit?: number | null | undefined;
|
|
751
|
+
scopesPerResourceLimit?: number | null | undefined;
|
|
752
|
+
socialConnectorsLimit?: number | null | undefined;
|
|
753
|
+
machineToMachineRolesLimit?: number | null | undefined;
|
|
754
|
+
scopesPerRoleLimit?: number | null | undefined;
|
|
755
|
+
auditLogsRetentionDays?: number | null | undefined;
|
|
756
|
+
thirdPartyApplicationsLimit?: number | null | undefined;
|
|
757
|
+
customJwtEnabled?: boolean | undefined;
|
|
758
|
+
subjectTokenEnabled?: boolean | undefined;
|
|
759
|
+
bringYourUiEnabled?: boolean | undefined;
|
|
760
|
+
userRolesLimit?: number | null | undefined;
|
|
761
|
+
};
|
|
762
|
+
} | {
|
|
763
|
+
type: LogtoSkuType.Basic;
|
|
374
764
|
quota: {
|
|
375
765
|
mauLimit: number | null;
|
|
376
766
|
tokenLimit: number | null;
|
|
@@ -378,28 +768,65 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
378
768
|
machineToMachineLimit: number | null;
|
|
379
769
|
resourcesLimit: number | null;
|
|
380
770
|
scopesPerResourceLimit: number | null;
|
|
381
|
-
customDomainEnabled: boolean;
|
|
382
|
-
omniSignInEnabled: boolean;
|
|
383
|
-
builtInEmailConnectorEnabled: boolean;
|
|
384
771
|
socialConnectorsLimit: number | null;
|
|
385
|
-
standardConnectorsLimit: number | null;
|
|
386
|
-
rolesLimit: number | null;
|
|
387
772
|
machineToMachineRolesLimit: number | null;
|
|
388
773
|
scopesPerRoleLimit: number | null;
|
|
389
774
|
hooksLimit: number | null;
|
|
390
775
|
auditLogsRetentionDays: number | null;
|
|
391
776
|
mfaEnabled: boolean;
|
|
392
777
|
organizationsEnabled: boolean;
|
|
393
|
-
ssoEnabled: boolean;
|
|
394
778
|
thirdPartyApplicationsLimit: number | null;
|
|
395
779
|
tenantMembersLimit: number | null;
|
|
396
780
|
customJwtEnabled: boolean;
|
|
781
|
+
subjectTokenEnabled: boolean;
|
|
782
|
+
bringYourUiEnabled: boolean;
|
|
783
|
+
userRolesLimit: number | null;
|
|
784
|
+
enterpriseSsoLimit: number | null;
|
|
785
|
+
organizationsLimit: number | null;
|
|
397
786
|
};
|
|
398
|
-
}
|
|
787
|
+
}, {
|
|
788
|
+
id: string;
|
|
789
|
+
createdAt: Date;
|
|
790
|
+
type: LogtoSkuType;
|
|
791
|
+
updatedAt: Date;
|
|
792
|
+
quota: {
|
|
793
|
+
mauLimit?: number | null | undefined;
|
|
794
|
+
tokenLimit?: number | null | undefined;
|
|
795
|
+
applicationsLimit?: number | null | undefined;
|
|
796
|
+
machineToMachineLimit?: number | null | undefined;
|
|
797
|
+
resourcesLimit?: number | null | undefined;
|
|
798
|
+
scopesPerResourceLimit?: number | null | undefined;
|
|
799
|
+
socialConnectorsLimit?: number | null | undefined;
|
|
800
|
+
machineToMachineRolesLimit?: number | null | undefined;
|
|
801
|
+
scopesPerRoleLimit?: number | null | undefined;
|
|
802
|
+
hooksLimit?: number | null | undefined;
|
|
803
|
+
auditLogsRetentionDays?: number | null | undefined;
|
|
804
|
+
mfaEnabled?: boolean | undefined;
|
|
805
|
+
organizationsEnabled?: boolean | undefined;
|
|
806
|
+
thirdPartyApplicationsLimit?: number | null | undefined;
|
|
807
|
+
tenantMembersLimit?: number | null | undefined;
|
|
808
|
+
customJwtEnabled?: boolean | undefined;
|
|
809
|
+
subjectTokenEnabled?: boolean | undefined;
|
|
810
|
+
bringYourUiEnabled?: boolean | undefined;
|
|
811
|
+
userRolesLimit?: number | null | undefined;
|
|
812
|
+
enterpriseSsoLimit?: number | null | undefined;
|
|
813
|
+
organizationsLimit?: number | null | undefined;
|
|
814
|
+
};
|
|
815
|
+
}>;
|
|
816
|
+
} & {
|
|
817
|
+
"/skus/:skuId/products": import("@withtyped/server").PathGuard<"/:skuId/products", {
|
|
818
|
+
isOneTime?: string | undefined;
|
|
819
|
+
}, {
|
|
820
|
+
name: string;
|
|
821
|
+
unitPrice: number;
|
|
822
|
+
}, {
|
|
823
|
+
productId: string;
|
|
824
|
+
}>;
|
|
399
825
|
};
|
|
400
|
-
post: {};
|
|
401
826
|
put: {};
|
|
402
|
-
delete: {
|
|
827
|
+
delete: {
|
|
828
|
+
"/skus/:skuId": import("@withtyped/server").PathGuard<"/:skuId", unknown, unknown, unknown>;
|
|
829
|
+
};
|
|
403
830
|
copy: {};
|
|
404
831
|
head: {};
|
|
405
832
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
@@ -414,6 +841,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
414
841
|
tenantId: string | null;
|
|
415
842
|
updatedAt: Date;
|
|
416
843
|
planId: string;
|
|
844
|
+
skuId: string | null;
|
|
417
845
|
}>;
|
|
418
846
|
};
|
|
419
847
|
post: {
|
|
@@ -421,9 +849,11 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
421
849
|
planId: string;
|
|
422
850
|
successCallbackUrl: string;
|
|
423
851
|
tenantId?: string | undefined;
|
|
424
|
-
|
|
425
|
-
tenantTag?: TenantTag | undefined;
|
|
852
|
+
skuId?: string | undefined;
|
|
426
853
|
tenantName?: string | undefined;
|
|
854
|
+
tenantTag?: TenantTag | undefined;
|
|
855
|
+
tenantRegionName?: RegionName | undefined;
|
|
856
|
+
cancelCallbackUrl?: string | undefined;
|
|
427
857
|
}, {
|
|
428
858
|
sessionId: string;
|
|
429
859
|
redirectUri?: string | null | undefined;
|
|
@@ -514,8 +944,8 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
514
944
|
expiresAt: number;
|
|
515
945
|
organizationRoles: OrganizationRoleEntity[];
|
|
516
946
|
} & {
|
|
517
|
-
tenantTag: TenantTag;
|
|
518
947
|
tenantName: string;
|
|
948
|
+
tenantTag: TenantTag;
|
|
519
949
|
})[]>;
|
|
520
950
|
} & {
|
|
521
951
|
"/invitations/:invitationId": import("@withtyped/server").PathGuard<"/:invitationId", unknown, unknown, {
|
|
@@ -537,9 +967,21 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
537
967
|
delete: {};
|
|
538
968
|
copy: {};
|
|
539
969
|
head: {};
|
|
970
|
+
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
971
|
+
patch: {};
|
|
972
|
+
options: {};
|
|
973
|
+
get: {};
|
|
974
|
+
post: {};
|
|
975
|
+
put: {};
|
|
976
|
+
delete: {
|
|
977
|
+
"/me": import("@withtyped/server").PathGuard<"/", unknown, unknown, unknown>;
|
|
978
|
+
};
|
|
979
|
+
copy: {};
|
|
980
|
+
head: {};
|
|
540
981
|
}, "/api">>, "/api">;
|
|
541
982
|
export declare const tenantAuthRouter: import("@withtyped/server").Router<RequestContext, import("@withtyped/server").WithBodyContext<import("@withtyped/server").BaseContext & {
|
|
542
983
|
request: {
|
|
984
|
+
id?: string | undefined;
|
|
543
985
|
method?: import("@withtyped/server").RequestMethod | undefined;
|
|
544
986
|
headers: import("http").IncomingHttpHeaders;
|
|
545
987
|
url: URL;
|
|
@@ -595,7 +1037,7 @@ export declare const tenantAuthRouter: import("@withtyped/server").Router<Reques
|
|
|
595
1037
|
};
|
|
596
1038
|
post: {
|
|
597
1039
|
"/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, {
|
|
598
|
-
invitee: string;
|
|
1040
|
+
invitee: string | string[];
|
|
599
1041
|
roleName: TenantRole;
|
|
600
1042
|
expiresAt?: number | undefined;
|
|
601
1043
|
}, {
|
|
@@ -610,7 +1052,19 @@ export declare const tenantAuthRouter: import("@withtyped/server").Router<Reques
|
|
|
610
1052
|
organizationId: string;
|
|
611
1053
|
expiresAt: number;
|
|
612
1054
|
organizationRoles: OrganizationRoleEntity[];
|
|
613
|
-
}
|
|
1055
|
+
} | {
|
|
1056
|
+
id: string;
|
|
1057
|
+
createdAt: number;
|
|
1058
|
+
status: OrganizationInvitationStatus;
|
|
1059
|
+
tenantId: string;
|
|
1060
|
+
updatedAt: number;
|
|
1061
|
+
inviterId: string | null;
|
|
1062
|
+
invitee: string;
|
|
1063
|
+
acceptedUserId: string | null;
|
|
1064
|
+
organizationId: string;
|
|
1065
|
+
expiresAt: number;
|
|
1066
|
+
organizationRoles: OrganizationRoleEntity[];
|
|
1067
|
+
}[]>;
|
|
614
1068
|
} & {
|
|
615
1069
|
"/:tenantId/invitations/:invitationId/message": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId/message", unknown, unknown, unknown>;
|
|
616
1070
|
};
|
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-91ab76c",
|
|
4
4
|
"description": "Logto Cloud service.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"author": "Silverhand Inc. <contact@silverhand.io>",
|
|
@@ -16,21 +16,21 @@
|
|
|
16
16
|
"#src/*": "./build/*"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@silverhand/eslint-config": "
|
|
20
|
-
"@silverhand/ts-config": "
|
|
19
|
+
"@silverhand/eslint-config": "6.0.1",
|
|
20
|
+
"@silverhand/ts-config": "6.0.0",
|
|
21
21
|
"@types/accepts": "^1.3.5",
|
|
22
22
|
"@types/http-proxy": "^1.17.9",
|
|
23
23
|
"@types/mime-types": "^2.1.1",
|
|
24
24
|
"@types/node": "^20.0.0",
|
|
25
25
|
"@types/yargs": "^17.0.24",
|
|
26
26
|
"dts-bundle-generator": "^9.3.1",
|
|
27
|
-
"eslint": "^8.
|
|
27
|
+
"eslint": "^8.57.0",
|
|
28
28
|
"lint-staged": "^15.0.0",
|
|
29
29
|
"nodemon": "^3.0.0",
|
|
30
30
|
"prettier": "^3.0.0",
|
|
31
31
|
"typescript": "^5.3.3",
|
|
32
32
|
"vite-tsconfig-paths": "^4.3.1",
|
|
33
|
-
"vitest": "^
|
|
33
|
+
"vitest": "^2.0.0"
|
|
34
34
|
},
|
|
35
35
|
"engines": {
|
|
36
36
|
"node": "^20.9.0"
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"access": "public"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@silverhand/essentials": "^2.9.
|
|
53
|
-
"@withtyped/server": "^0.
|
|
52
|
+
"@silverhand/essentials": "^2.9.1",
|
|
53
|
+
"@withtyped/server": "^0.14.0"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
56
56
|
"precommit": "lint-staged",
|