@logto/cloud 0.2.5-a7eedce → 0.2.5-b98b019
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 +456 -53
- package/package.json +5 -5
package/lib/routes/index.d.ts
CHANGED
|
@@ -16,6 +16,8 @@ declare enum VerificationCodeType {
|
|
|
16
16
|
Register = "Register",
|
|
17
17
|
ForgotPassword = "ForgotPassword",
|
|
18
18
|
Generic = "Generic",
|
|
19
|
+
UserPermissionValidation = "UserPermissionValidation",
|
|
20
|
+
BindNewIdentifier = "BindNewIdentifier",
|
|
19
21
|
/** @deprecated Use `Generic` type template for sending test sms/email use case */
|
|
20
22
|
Test = "Test"
|
|
21
23
|
}
|
|
@@ -29,7 +31,11 @@ declare enum TemplateType {
|
|
|
29
31
|
/** The template for sending organization invitation. */
|
|
30
32
|
OrganizationInvitation = "OrganizationInvitation",
|
|
31
33
|
/** The template for generic usage. */
|
|
32
|
-
Generic = "Generic"
|
|
34
|
+
Generic = "Generic",
|
|
35
|
+
/** The template for validating user permission for sensitive operations. */
|
|
36
|
+
UserPermissionValidation = "UserPermissionValidation",
|
|
37
|
+
/** The template for binding a new identifier to an existing account. */
|
|
38
|
+
BindNewIdentifier = "BindNewIdentifier"
|
|
33
39
|
}
|
|
34
40
|
declare enum OrganizationInvitationStatus {
|
|
35
41
|
Pending = "Pending",
|
|
@@ -69,6 +75,23 @@ declare enum TenantRole {
|
|
|
69
75
|
/** Collaborator of the tenant, who has permissions to operate the tenant data, but not the tenant settings. */
|
|
70
76
|
Collaborator = "collaborator"
|
|
71
77
|
}
|
|
78
|
+
declare const availableReportableUsageKeys: readonly [
|
|
79
|
+
"tokenLimit",
|
|
80
|
+
"machineToMachineLimit",
|
|
81
|
+
"resourcesLimit",
|
|
82
|
+
"enterpriseSsoLimit",
|
|
83
|
+
"hooksLimit",
|
|
84
|
+
"tenantMembersLimit",
|
|
85
|
+
"mfaEnabled",
|
|
86
|
+
"organizationsEnabled",
|
|
87
|
+
"organizationsLimit"
|
|
88
|
+
];
|
|
89
|
+
export type ReportableUsageKey = (typeof availableReportableUsageKeys)[number];
|
|
90
|
+
export type RealtimeReportableUsageKey = Exclude<ReportableUsageKey, "tokenLimit">;
|
|
91
|
+
declare enum LogtoSkuType {
|
|
92
|
+
Basic = "Basic",
|
|
93
|
+
AddOn = "AddOn"
|
|
94
|
+
}
|
|
72
95
|
declare const AffiliateProperties: import("@withtyped/server/lib/model/index.js").default<"affiliate_properties", {
|
|
73
96
|
createdAt: Date;
|
|
74
97
|
affiliateId: string;
|
|
@@ -84,7 +107,8 @@ declare const Affiliates: import("@withtyped/server/lib/model/index.js").default
|
|
|
84
107
|
export type Affiliate = InferModelType<typeof Affiliates>;
|
|
85
108
|
declare enum RegionName {
|
|
86
109
|
EU = "EU",
|
|
87
|
-
US = "US"
|
|
110
|
+
US = "US",
|
|
111
|
+
AU = "AU"
|
|
88
112
|
}
|
|
89
113
|
export type AffiliateData = Affiliate & {
|
|
90
114
|
properties: Array<Pick<AffiliateProperty, "type" | "value">>;
|
|
@@ -108,7 +132,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
108
132
|
body?: Json | undefined;
|
|
109
133
|
bodyRaw?: Buffer | undefined;
|
|
110
134
|
};
|
|
111
|
-
}>, 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<{
|
|
135
|
+
}>, 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<{
|
|
112
136
|
patch: {
|
|
113
137
|
"/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, {
|
|
114
138
|
name?: string | undefined;
|
|
@@ -116,9 +140,12 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
116
140
|
id: string;
|
|
117
141
|
name: string;
|
|
118
142
|
createdAt: Date;
|
|
143
|
+
quota: {
|
|
144
|
+
mauLimit: number | null;
|
|
145
|
+
tokenLimit: number | null;
|
|
146
|
+
};
|
|
119
147
|
usage: {
|
|
120
148
|
activeUsers: number;
|
|
121
|
-
cost: number;
|
|
122
149
|
tokenUsage: number;
|
|
123
150
|
};
|
|
124
151
|
indicator: string;
|
|
@@ -129,13 +156,21 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
129
156
|
planId: string;
|
|
130
157
|
currentPeriodStart: Date;
|
|
131
158
|
currentPeriodEnd: Date;
|
|
159
|
+
isEnterprisePlan: boolean;
|
|
160
|
+
id?: string | undefined;
|
|
161
|
+
upcomingInvoice?: {
|
|
162
|
+
subtotal: number;
|
|
163
|
+
subtotalExcludingTax: number | null;
|
|
164
|
+
total: number;
|
|
165
|
+
totalExcludingTax: number | null;
|
|
166
|
+
} | null | undefined;
|
|
132
167
|
};
|
|
133
168
|
regionName: RegionName;
|
|
134
169
|
tag: TenantTag;
|
|
135
170
|
openInvoices: {
|
|
136
|
-
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
137
171
|
id: string;
|
|
138
172
|
createdAt: Date;
|
|
173
|
+
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
139
174
|
updatedAt: Date;
|
|
140
175
|
customerId: string | null;
|
|
141
176
|
billingReason: string | null;
|
|
@@ -143,6 +178,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
143
178
|
periodEnd: Date;
|
|
144
179
|
amountDue: number;
|
|
145
180
|
amountPaid: number;
|
|
181
|
+
basicSkuId: string | null;
|
|
146
182
|
subscriptionId: string | null;
|
|
147
183
|
hostedInvoiceUrl: string | null;
|
|
148
184
|
invoicePdf: string | null;
|
|
@@ -155,9 +191,12 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
155
191
|
id: string;
|
|
156
192
|
name: string;
|
|
157
193
|
createdAt: Date;
|
|
194
|
+
quota: {
|
|
195
|
+
mauLimit: number | null;
|
|
196
|
+
tokenLimit: number | null;
|
|
197
|
+
};
|
|
158
198
|
usage: {
|
|
159
199
|
activeUsers: number;
|
|
160
|
-
cost: number;
|
|
161
200
|
tokenUsage: number;
|
|
162
201
|
};
|
|
163
202
|
indicator: string;
|
|
@@ -168,13 +207,21 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
168
207
|
planId: string;
|
|
169
208
|
currentPeriodStart: Date;
|
|
170
209
|
currentPeriodEnd: Date;
|
|
210
|
+
isEnterprisePlan: boolean;
|
|
211
|
+
id?: string | undefined;
|
|
212
|
+
upcomingInvoice?: {
|
|
213
|
+
subtotal: number;
|
|
214
|
+
subtotalExcludingTax: number | null;
|
|
215
|
+
total: number;
|
|
216
|
+
totalExcludingTax: number | null;
|
|
217
|
+
} | null | undefined;
|
|
171
218
|
};
|
|
172
219
|
regionName: RegionName;
|
|
173
220
|
tag: TenantTag;
|
|
174
221
|
openInvoices: {
|
|
175
|
-
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
176
222
|
id: string;
|
|
177
223
|
createdAt: Date;
|
|
224
|
+
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
178
225
|
updatedAt: Date;
|
|
179
226
|
customerId: string | null;
|
|
180
227
|
billingReason: string | null;
|
|
@@ -182,6 +229,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
182
229
|
periodEnd: Date;
|
|
183
230
|
amountDue: number;
|
|
184
231
|
amountPaid: number;
|
|
232
|
+
basicSkuId: string | null;
|
|
185
233
|
subscriptionId: string | null;
|
|
186
234
|
hostedInvoiceUrl: string | null;
|
|
187
235
|
invoicePdf: string | null;
|
|
@@ -197,9 +245,12 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
197
245
|
id: string;
|
|
198
246
|
name: string;
|
|
199
247
|
createdAt: Date;
|
|
248
|
+
quota: {
|
|
249
|
+
mauLimit: number | null;
|
|
250
|
+
tokenLimit: number | null;
|
|
251
|
+
};
|
|
200
252
|
usage: {
|
|
201
253
|
activeUsers: number;
|
|
202
|
-
cost: number;
|
|
203
254
|
tokenUsage: number;
|
|
204
255
|
};
|
|
205
256
|
indicator: string;
|
|
@@ -210,13 +261,21 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
210
261
|
planId: string;
|
|
211
262
|
currentPeriodStart: Date;
|
|
212
263
|
currentPeriodEnd: Date;
|
|
264
|
+
isEnterprisePlan: boolean;
|
|
265
|
+
id?: string | undefined;
|
|
266
|
+
upcomingInvoice?: {
|
|
267
|
+
subtotal: number;
|
|
268
|
+
subtotalExcludingTax: number | null;
|
|
269
|
+
total: number;
|
|
270
|
+
totalExcludingTax: number | null;
|
|
271
|
+
} | null | undefined;
|
|
213
272
|
};
|
|
214
273
|
regionName: RegionName;
|
|
215
274
|
tag: TenantTag;
|
|
216
275
|
openInvoices: {
|
|
217
|
-
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
218
276
|
id: string;
|
|
219
277
|
createdAt: Date;
|
|
278
|
+
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
220
279
|
updatedAt: Date;
|
|
221
280
|
customerId: string | null;
|
|
222
281
|
billingReason: string | null;
|
|
@@ -224,6 +283,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
224
283
|
periodEnd: Date;
|
|
225
284
|
amountDue: number;
|
|
226
285
|
amountPaid: number;
|
|
286
|
+
basicSkuId: string | null;
|
|
227
287
|
subscriptionId: string | null;
|
|
228
288
|
hostedInvoiceUrl: string | null;
|
|
229
289
|
invoicePdf: string | null;
|
|
@@ -242,23 +302,231 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
242
302
|
get: {
|
|
243
303
|
"/tenants/my/subscription": import("@withtyped/server").PathGuard<"/my/subscription", unknown, unknown, {
|
|
244
304
|
status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
|
|
305
|
+
quota: {
|
|
306
|
+
auditLogsRetentionDays: number | null;
|
|
307
|
+
mauLimit: number | null;
|
|
308
|
+
applicationsLimit: number | null;
|
|
309
|
+
thirdPartyApplicationsLimit: number | null;
|
|
310
|
+
scopesPerResourceLimit: number | null;
|
|
311
|
+
socialConnectorsLimit: number | null;
|
|
312
|
+
userRolesLimit: number | null;
|
|
313
|
+
machineToMachineRolesLimit: number | null;
|
|
314
|
+
scopesPerRoleLimit: number | null;
|
|
315
|
+
hooksLimit: number | null;
|
|
316
|
+
customJwtEnabled: boolean;
|
|
317
|
+
subjectTokenEnabled: boolean;
|
|
318
|
+
bringYourUiEnabled: boolean;
|
|
319
|
+
tokenLimit: number | null;
|
|
320
|
+
machineToMachineLimit: number | null;
|
|
321
|
+
resourcesLimit: number | null;
|
|
322
|
+
enterpriseSsoLimit: number | null;
|
|
323
|
+
tenantMembersLimit: number | null;
|
|
324
|
+
mfaEnabled: boolean;
|
|
325
|
+
organizationsEnabled: boolean;
|
|
326
|
+
organizationsLimit: number | null;
|
|
327
|
+
idpInitiatedSsoEnabled: boolean;
|
|
328
|
+
};
|
|
245
329
|
planId: string;
|
|
246
330
|
currentPeriodStart: Date;
|
|
247
331
|
currentPeriodEnd: Date;
|
|
332
|
+
isEnterprisePlan: boolean;
|
|
333
|
+
id?: string | undefined;
|
|
334
|
+
upcomingInvoice?: {
|
|
335
|
+
subtotal: number;
|
|
336
|
+
subtotalExcludingTax: number | null;
|
|
337
|
+
total: number;
|
|
338
|
+
totalExcludingTax: number | null;
|
|
339
|
+
} | null | undefined;
|
|
248
340
|
}>;
|
|
249
341
|
} & {
|
|
342
|
+
"/tenants/my/subscription-usage": import("@withtyped/server").PathGuard<"/my/subscription-usage", unknown, unknown, {
|
|
343
|
+
usage: {
|
|
344
|
+
applicationsLimit: number;
|
|
345
|
+
thirdPartyApplicationsLimit: number;
|
|
346
|
+
scopesPerResourceLimit: number;
|
|
347
|
+
socialConnectorsLimit: number;
|
|
348
|
+
userRolesLimit: number;
|
|
349
|
+
machineToMachineRolesLimit: number;
|
|
350
|
+
scopesPerRoleLimit: number;
|
|
351
|
+
hooksLimit: number;
|
|
352
|
+
customJwtEnabled: boolean;
|
|
353
|
+
subjectTokenEnabled: boolean;
|
|
354
|
+
bringYourUiEnabled: boolean;
|
|
355
|
+
machineToMachineLimit: number;
|
|
356
|
+
resourcesLimit: number;
|
|
357
|
+
enterpriseSsoLimit: number;
|
|
358
|
+
tenantMembersLimit: number;
|
|
359
|
+
mfaEnabled: boolean;
|
|
360
|
+
organizationsEnabled: boolean;
|
|
361
|
+
organizationsLimit: number;
|
|
362
|
+
idpInitiatedSsoEnabled: boolean;
|
|
363
|
+
};
|
|
364
|
+
resources: Record<string, number>;
|
|
365
|
+
roles: Record<string, number>;
|
|
366
|
+
quota: {
|
|
367
|
+
auditLogsRetentionDays: number | null;
|
|
368
|
+
mauLimit: number | null;
|
|
369
|
+
applicationsLimit: number | null;
|
|
370
|
+
thirdPartyApplicationsLimit: number | null;
|
|
371
|
+
scopesPerResourceLimit: number | null;
|
|
372
|
+
socialConnectorsLimit: number | null;
|
|
373
|
+
userRolesLimit: number | null;
|
|
374
|
+
machineToMachineRolesLimit: number | null;
|
|
375
|
+
scopesPerRoleLimit: number | null;
|
|
376
|
+
hooksLimit: number | null;
|
|
377
|
+
customJwtEnabled: boolean;
|
|
378
|
+
subjectTokenEnabled: boolean;
|
|
379
|
+
bringYourUiEnabled: boolean;
|
|
380
|
+
tokenLimit: number | null;
|
|
381
|
+
machineToMachineLimit: number | null;
|
|
382
|
+
resourcesLimit: number | null;
|
|
383
|
+
enterpriseSsoLimit: number | null;
|
|
384
|
+
tenantMembersLimit: number | null;
|
|
385
|
+
mfaEnabled: boolean;
|
|
386
|
+
organizationsEnabled: boolean;
|
|
387
|
+
organizationsLimit: number | null;
|
|
388
|
+
idpInitiatedSsoEnabled: boolean;
|
|
389
|
+
};
|
|
390
|
+
basicQuota: {
|
|
391
|
+
auditLogsRetentionDays: number | null;
|
|
392
|
+
mauLimit: number | null;
|
|
393
|
+
applicationsLimit: number | null;
|
|
394
|
+
thirdPartyApplicationsLimit: number | null;
|
|
395
|
+
scopesPerResourceLimit: number | null;
|
|
396
|
+
socialConnectorsLimit: number | null;
|
|
397
|
+
userRolesLimit: number | null;
|
|
398
|
+
machineToMachineRolesLimit: number | null;
|
|
399
|
+
scopesPerRoleLimit: number | null;
|
|
400
|
+
hooksLimit: number | null;
|
|
401
|
+
customJwtEnabled: boolean;
|
|
402
|
+
subjectTokenEnabled: boolean;
|
|
403
|
+
bringYourUiEnabled: boolean;
|
|
404
|
+
tokenLimit: number | null;
|
|
405
|
+
machineToMachineLimit: number | null;
|
|
406
|
+
resourcesLimit: number | null;
|
|
407
|
+
enterpriseSsoLimit: number | null;
|
|
408
|
+
tenantMembersLimit: number | null;
|
|
409
|
+
mfaEnabled: boolean;
|
|
410
|
+
organizationsEnabled: boolean;
|
|
411
|
+
organizationsLimit: number | null;
|
|
412
|
+
idpInitiatedSsoEnabled: boolean;
|
|
413
|
+
};
|
|
414
|
+
}>;
|
|
415
|
+
};
|
|
416
|
+
post: {
|
|
417
|
+
"/tenants/my/subscription/item-updates": import("@withtyped/server").PathGuard<"/my/subscription/item-updates", unknown, {
|
|
418
|
+
usageKey: RealtimeReportableUsageKey;
|
|
419
|
+
}, {
|
|
420
|
+
message: string;
|
|
421
|
+
}>;
|
|
422
|
+
};
|
|
423
|
+
put: {};
|
|
424
|
+
delete: {};
|
|
425
|
+
copy: {};
|
|
426
|
+
head: {};
|
|
427
|
+
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
428
|
+
patch: {};
|
|
429
|
+
options: {};
|
|
430
|
+
get: {
|
|
250
431
|
"/tenants/:tenantId/subscription": import("@withtyped/server").PathGuard<"/:tenantId/subscription", unknown, unknown, {
|
|
251
432
|
status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
|
|
252
433
|
planId: string;
|
|
253
434
|
currentPeriodStart: Date;
|
|
254
435
|
currentPeriodEnd: Date;
|
|
436
|
+
isEnterprisePlan: boolean;
|
|
437
|
+
id?: string | undefined;
|
|
438
|
+
upcomingInvoice?: {
|
|
439
|
+
subtotal: number;
|
|
440
|
+
subtotalExcludingTax: number | null;
|
|
441
|
+
total: number;
|
|
442
|
+
totalExcludingTax: number | null;
|
|
443
|
+
} | null | undefined;
|
|
444
|
+
}>;
|
|
445
|
+
} & {
|
|
446
|
+
"/tenants/:tenantId/subscription-usage": import("@withtyped/server").PathGuard<"/:tenantId/subscription-usage", unknown, unknown, {
|
|
447
|
+
usage: {
|
|
448
|
+
applicationsLimit: number;
|
|
449
|
+
thirdPartyApplicationsLimit: number;
|
|
450
|
+
scopesPerResourceLimit: number;
|
|
451
|
+
socialConnectorsLimit: number;
|
|
452
|
+
userRolesLimit: number;
|
|
453
|
+
machineToMachineRolesLimit: number;
|
|
454
|
+
scopesPerRoleLimit: number;
|
|
455
|
+
hooksLimit: number;
|
|
456
|
+
customJwtEnabled: boolean;
|
|
457
|
+
subjectTokenEnabled: boolean;
|
|
458
|
+
bringYourUiEnabled: boolean;
|
|
459
|
+
machineToMachineLimit: number;
|
|
460
|
+
resourcesLimit: number;
|
|
461
|
+
enterpriseSsoLimit: number;
|
|
462
|
+
tenantMembersLimit: number;
|
|
463
|
+
mfaEnabled: boolean;
|
|
464
|
+
organizationsEnabled: boolean;
|
|
465
|
+
organizationsLimit: number;
|
|
466
|
+
idpInitiatedSsoEnabled: boolean;
|
|
467
|
+
};
|
|
468
|
+
resources: Record<string, number>;
|
|
469
|
+
roles: Record<string, number>;
|
|
470
|
+
quota: {
|
|
471
|
+
auditLogsRetentionDays: number | null;
|
|
472
|
+
mauLimit: number | null;
|
|
473
|
+
applicationsLimit: number | null;
|
|
474
|
+
thirdPartyApplicationsLimit: number | null;
|
|
475
|
+
scopesPerResourceLimit: number | null;
|
|
476
|
+
socialConnectorsLimit: number | null;
|
|
477
|
+
userRolesLimit: number | null;
|
|
478
|
+
machineToMachineRolesLimit: number | null;
|
|
479
|
+
scopesPerRoleLimit: number | null;
|
|
480
|
+
hooksLimit: number | null;
|
|
481
|
+
customJwtEnabled: boolean;
|
|
482
|
+
subjectTokenEnabled: boolean;
|
|
483
|
+
bringYourUiEnabled: boolean;
|
|
484
|
+
tokenLimit: number | null;
|
|
485
|
+
machineToMachineLimit: number | null;
|
|
486
|
+
resourcesLimit: number | null;
|
|
487
|
+
enterpriseSsoLimit: number | null;
|
|
488
|
+
tenantMembersLimit: number | null;
|
|
489
|
+
mfaEnabled: boolean;
|
|
490
|
+
organizationsEnabled: boolean;
|
|
491
|
+
organizationsLimit: number | null;
|
|
492
|
+
idpInitiatedSsoEnabled: boolean;
|
|
493
|
+
};
|
|
494
|
+
basicQuota: {
|
|
495
|
+
auditLogsRetentionDays: number | null;
|
|
496
|
+
mauLimit: number | null;
|
|
497
|
+
applicationsLimit: number | null;
|
|
498
|
+
thirdPartyApplicationsLimit: number | null;
|
|
499
|
+
scopesPerResourceLimit: number | null;
|
|
500
|
+
socialConnectorsLimit: number | null;
|
|
501
|
+
userRolesLimit: number | null;
|
|
502
|
+
machineToMachineRolesLimit: number | null;
|
|
503
|
+
scopesPerRoleLimit: number | null;
|
|
504
|
+
hooksLimit: number | null;
|
|
505
|
+
customJwtEnabled: boolean;
|
|
506
|
+
subjectTokenEnabled: boolean;
|
|
507
|
+
bringYourUiEnabled: boolean;
|
|
508
|
+
tokenLimit: number | null;
|
|
509
|
+
machineToMachineLimit: number | null;
|
|
510
|
+
resourcesLimit: number | null;
|
|
511
|
+
enterpriseSsoLimit: number | null;
|
|
512
|
+
tenantMembersLimit: number | null;
|
|
513
|
+
mfaEnabled: boolean;
|
|
514
|
+
organizationsEnabled: boolean;
|
|
515
|
+
organizationsLimit: number | null;
|
|
516
|
+
idpInitiatedSsoEnabled: boolean;
|
|
517
|
+
};
|
|
518
|
+
}>;
|
|
519
|
+
} & {
|
|
520
|
+
"/tenants/:tenantId/subscription/periodic-usage": import("@withtyped/server").PathGuard<"/:tenantId/subscription/periodic-usage", unknown, unknown, {
|
|
521
|
+
mauLimit: number;
|
|
522
|
+
tokenLimit: number;
|
|
255
523
|
}>;
|
|
256
524
|
} & {
|
|
257
525
|
"/tenants/:tenantId/invoices": import("@withtyped/server").PathGuard<"/:tenantId/invoices", unknown, unknown, {
|
|
258
526
|
invoices: {
|
|
259
|
-
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
260
527
|
id: string;
|
|
261
528
|
createdAt: Date;
|
|
529
|
+
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
262
530
|
updatedAt: Date;
|
|
263
531
|
customerId: string | null;
|
|
264
532
|
billingReason: string | null;
|
|
@@ -266,22 +534,55 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
266
534
|
periodEnd: Date;
|
|
267
535
|
amountDue: number;
|
|
268
536
|
amountPaid: number;
|
|
537
|
+
basicSkuId: string | null;
|
|
269
538
|
subscriptionId: string | null;
|
|
270
539
|
hostedInvoiceUrl: string | null;
|
|
271
540
|
invoicePdf: string | null;
|
|
272
541
|
planName: string | null;
|
|
542
|
+
skuId?: string | null | undefined;
|
|
273
543
|
}[];
|
|
274
544
|
}>;
|
|
545
|
+
} & {
|
|
546
|
+
"/tenants/:tenantId/available-skus": import("@withtyped/server").PathGuard<"/:tenantId/available-skus", {
|
|
547
|
+
type?: LogtoSkuType | undefined;
|
|
548
|
+
}, unknown, {
|
|
549
|
+
id: string;
|
|
550
|
+
name: string | null;
|
|
551
|
+
createdAt: Date;
|
|
552
|
+
defaultPriceId: string | null;
|
|
553
|
+
unitPrice: number | null;
|
|
554
|
+
type: LogtoSkuType;
|
|
555
|
+
quota: {
|
|
556
|
+
auditLogsRetentionDays?: number | null | undefined;
|
|
557
|
+
mauLimit?: number | null | undefined;
|
|
558
|
+
applicationsLimit?: number | null | undefined;
|
|
559
|
+
thirdPartyApplicationsLimit?: number | null | undefined;
|
|
560
|
+
scopesPerResourceLimit?: number | null | undefined;
|
|
561
|
+
socialConnectorsLimit?: number | null | undefined;
|
|
562
|
+
userRolesLimit?: number | null | undefined;
|
|
563
|
+
machineToMachineRolesLimit?: number | null | undefined;
|
|
564
|
+
scopesPerRoleLimit?: number | null | undefined;
|
|
565
|
+
hooksLimit?: number | null | undefined;
|
|
566
|
+
customJwtEnabled?: boolean | undefined;
|
|
567
|
+
subjectTokenEnabled?: boolean | undefined;
|
|
568
|
+
bringYourUiEnabled?: boolean | undefined;
|
|
569
|
+
tokenLimit?: number | null | undefined;
|
|
570
|
+
machineToMachineLimit?: number | null | undefined;
|
|
571
|
+
resourcesLimit?: number | null | undefined;
|
|
572
|
+
enterpriseSsoLimit?: number | null | undefined;
|
|
573
|
+
tenantMembersLimit?: number | null | undefined;
|
|
574
|
+
mfaEnabled?: boolean | undefined;
|
|
575
|
+
organizationsEnabled?: boolean | undefined;
|
|
576
|
+
organizationsLimit?: number | null | undefined;
|
|
577
|
+
idpInitiatedSsoEnabled?: boolean | undefined;
|
|
578
|
+
};
|
|
579
|
+
updatedAt: Date;
|
|
580
|
+
productId: string | null;
|
|
581
|
+
}[]>;
|
|
275
582
|
} & {
|
|
276
583
|
"/tenants/:tenantId/invoices/:invoiceId/hosted-invoice-url": import("@withtyped/server").PathGuard<"/:tenantId/invoices/:invoiceId/hosted-invoice-url", unknown, unknown, {
|
|
277
584
|
hostedInvoiceUrl: string;
|
|
278
585
|
}>;
|
|
279
|
-
} & {
|
|
280
|
-
"/tenants/:tenantId/usage": import("@withtyped/server").PathGuard<"/:tenantId/usage", unknown, unknown, {
|
|
281
|
-
activeUsers: number;
|
|
282
|
-
cost: number;
|
|
283
|
-
tokenUsage: number;
|
|
284
|
-
}>;
|
|
285
586
|
};
|
|
286
587
|
post: {
|
|
287
588
|
"/tenants/:tenantId/stripe-customer-portal": import("@withtyped/server").PathGuard<"/:tenantId/stripe-customer-portal", unknown, {
|
|
@@ -336,10 +637,10 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
336
637
|
"/services/custom-jwt": import("@withtyped/server").PathGuard<"/custom-jwt", {
|
|
337
638
|
isTest?: string | undefined;
|
|
338
639
|
}, {
|
|
640
|
+
context: Record<string, Json>;
|
|
339
641
|
script: string;
|
|
340
642
|
tokenType: LogtoJwtTokenKeyType.AccessToken;
|
|
341
643
|
token: Record<string, Json>;
|
|
342
|
-
context: Record<string, Json>;
|
|
343
644
|
environmentVariables?: Record<string, string> | undefined;
|
|
344
645
|
} | {
|
|
345
646
|
script: string;
|
|
@@ -369,52 +670,140 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
369
670
|
patch: {};
|
|
370
671
|
options: {};
|
|
371
672
|
get: {
|
|
372
|
-
"/
|
|
673
|
+
"/skus": import("@withtyped/server").PathGuard<"/", {
|
|
674
|
+
type?: LogtoSkuType | undefined;
|
|
675
|
+
}, unknown, {
|
|
373
676
|
id: string;
|
|
677
|
+
name: string | null;
|
|
374
678
|
createdAt: Date;
|
|
375
|
-
|
|
679
|
+
defaultPriceId: string | null;
|
|
680
|
+
unitPrice: number | null;
|
|
681
|
+
type: LogtoSkuType;
|
|
682
|
+
quota: {
|
|
683
|
+
auditLogsRetentionDays?: number | null | undefined;
|
|
684
|
+
mauLimit?: number | null | undefined;
|
|
685
|
+
applicationsLimit?: number | null | undefined;
|
|
686
|
+
thirdPartyApplicationsLimit?: number | null | undefined;
|
|
687
|
+
scopesPerResourceLimit?: number | null | undefined;
|
|
688
|
+
socialConnectorsLimit?: number | null | undefined;
|
|
689
|
+
userRolesLimit?: number | null | undefined;
|
|
690
|
+
machineToMachineRolesLimit?: number | null | undefined;
|
|
691
|
+
scopesPerRoleLimit?: number | null | undefined;
|
|
692
|
+
hooksLimit?: number | null | undefined;
|
|
693
|
+
customJwtEnabled?: boolean | undefined;
|
|
694
|
+
subjectTokenEnabled?: boolean | undefined;
|
|
695
|
+
bringYourUiEnabled?: boolean | undefined;
|
|
696
|
+
tokenLimit?: number | null | undefined;
|
|
697
|
+
machineToMachineLimit?: number | null | undefined;
|
|
698
|
+
resourcesLimit?: number | null | undefined;
|
|
699
|
+
enterpriseSsoLimit?: number | null | undefined;
|
|
700
|
+
tenantMembersLimit?: number | null | undefined;
|
|
701
|
+
mfaEnabled?: boolean | undefined;
|
|
702
|
+
organizationsEnabled?: boolean | undefined;
|
|
703
|
+
organizationsLimit?: number | null | undefined;
|
|
704
|
+
idpInitiatedSsoEnabled?: boolean | undefined;
|
|
705
|
+
};
|
|
376
706
|
updatedAt: Date;
|
|
707
|
+
productId: string | null;
|
|
708
|
+
}[]>;
|
|
709
|
+
};
|
|
710
|
+
post: {
|
|
711
|
+
"/skus": import("@withtyped/server").PathGuard<"/", unknown, {
|
|
712
|
+
type: LogtoSkuType.AddOn;
|
|
713
|
+
quota: {
|
|
714
|
+
tokenLimit?: number | null | undefined;
|
|
715
|
+
machineToMachineLimit?: number | null | undefined;
|
|
716
|
+
resourcesLimit?: number | null | undefined;
|
|
717
|
+
enterpriseSsoLimit?: number | null | undefined;
|
|
718
|
+
hooksLimit?: number | null | undefined;
|
|
719
|
+
tenantMembersLimit?: number | null | undefined;
|
|
720
|
+
mfaEnabled?: boolean | undefined;
|
|
721
|
+
organizationsEnabled?: boolean | undefined;
|
|
722
|
+
organizationsLimit?: number | null | undefined;
|
|
723
|
+
auditLogsRetentionDays?: number | null | undefined;
|
|
724
|
+
mauLimit?: number | null | undefined;
|
|
725
|
+
applicationsLimit?: number | null | undefined;
|
|
726
|
+
thirdPartyApplicationsLimit?: number | null | undefined;
|
|
727
|
+
scopesPerResourceLimit?: number | null | undefined;
|
|
728
|
+
socialConnectorsLimit?: number | null | undefined;
|
|
729
|
+
userRolesLimit?: number | null | undefined;
|
|
730
|
+
machineToMachineRolesLimit?: number | null | undefined;
|
|
731
|
+
scopesPerRoleLimit?: number | null | undefined;
|
|
732
|
+
customJwtEnabled?: boolean | undefined;
|
|
733
|
+
subjectTokenEnabled?: boolean | undefined;
|
|
734
|
+
bringYourUiEnabled?: boolean | undefined;
|
|
735
|
+
idpInitiatedSsoEnabled?: boolean | undefined;
|
|
736
|
+
};
|
|
737
|
+
} | {
|
|
738
|
+
type: LogtoSkuType.Basic;
|
|
377
739
|
quota: {
|
|
740
|
+
auditLogsRetentionDays: number | null;
|
|
378
741
|
mauLimit: number | null;
|
|
379
|
-
tokenLimit: number | null;
|
|
380
742
|
applicationsLimit: number | null;
|
|
381
|
-
|
|
382
|
-
resourcesLimit: number | null;
|
|
743
|
+
thirdPartyApplicationsLimit: number | null;
|
|
383
744
|
scopesPerResourceLimit: number | null;
|
|
384
|
-
customDomainEnabled: boolean;
|
|
385
|
-
omniSignInEnabled: boolean;
|
|
386
|
-
builtInEmailConnectorEnabled: boolean;
|
|
387
745
|
socialConnectorsLimit: number | null;
|
|
388
|
-
|
|
389
|
-
rolesLimit: number | null;
|
|
746
|
+
userRolesLimit: number | null;
|
|
390
747
|
machineToMachineRolesLimit: number | null;
|
|
391
748
|
scopesPerRoleLimit: number | null;
|
|
392
749
|
hooksLimit: number | null;
|
|
393
|
-
|
|
750
|
+
customJwtEnabled: boolean;
|
|
751
|
+
subjectTokenEnabled: boolean;
|
|
752
|
+
bringYourUiEnabled: boolean;
|
|
753
|
+
tokenLimit: number | null;
|
|
754
|
+
machineToMachineLimit: number | null;
|
|
755
|
+
resourcesLimit: number | null;
|
|
756
|
+
enterpriseSsoLimit: number | null;
|
|
757
|
+
tenantMembersLimit: number | null;
|
|
394
758
|
mfaEnabled: boolean;
|
|
395
759
|
organizationsEnabled: boolean;
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
tenantMembersLimit: number | null;
|
|
399
|
-
customJwtEnabled: boolean;
|
|
760
|
+
organizationsLimit: number | null;
|
|
761
|
+
idpInitiatedSsoEnabled: boolean;
|
|
400
762
|
};
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
763
|
+
}, {
|
|
764
|
+
id: string;
|
|
765
|
+
createdAt: Date;
|
|
766
|
+
type: LogtoSkuType;
|
|
767
|
+
updatedAt: Date;
|
|
768
|
+
quota: {
|
|
769
|
+
auditLogsRetentionDays?: number | null | undefined;
|
|
770
|
+
mauLimit?: number | null | undefined;
|
|
771
|
+
applicationsLimit?: number | null | undefined;
|
|
772
|
+
thirdPartyApplicationsLimit?: number | null | undefined;
|
|
773
|
+
scopesPerResourceLimit?: number | null | undefined;
|
|
774
|
+
socialConnectorsLimit?: number | null | undefined;
|
|
775
|
+
userRolesLimit?: number | null | undefined;
|
|
776
|
+
machineToMachineRolesLimit?: number | null | undefined;
|
|
777
|
+
scopesPerRoleLimit?: number | null | undefined;
|
|
778
|
+
hooksLimit?: number | null | undefined;
|
|
779
|
+
customJwtEnabled?: boolean | undefined;
|
|
780
|
+
subjectTokenEnabled?: boolean | undefined;
|
|
781
|
+
bringYourUiEnabled?: boolean | undefined;
|
|
782
|
+
tokenLimit?: number | null | undefined;
|
|
783
|
+
machineToMachineLimit?: number | null | undefined;
|
|
784
|
+
resourcesLimit?: number | null | undefined;
|
|
785
|
+
enterpriseSsoLimit?: number | null | undefined;
|
|
786
|
+
tenantMembersLimit?: number | null | undefined;
|
|
787
|
+
mfaEnabled?: boolean | undefined;
|
|
788
|
+
organizationsEnabled?: boolean | undefined;
|
|
789
|
+
organizationsLimit?: number | null | undefined;
|
|
790
|
+
idpInitiatedSsoEnabled?: boolean | undefined;
|
|
791
|
+
};
|
|
792
|
+
}>;
|
|
793
|
+
} & {
|
|
794
|
+
"/skus/:skuId/products": import("@withtyped/server").PathGuard<"/:skuId/products", {
|
|
795
|
+
isOneTime?: string | undefined;
|
|
796
|
+
}, {
|
|
797
|
+
name: string;
|
|
798
|
+
unitPrice: number;
|
|
799
|
+
}, {
|
|
800
|
+
productId: string;
|
|
801
|
+
}>;
|
|
414
802
|
};
|
|
415
|
-
post: {};
|
|
416
803
|
put: {};
|
|
417
|
-
delete: {
|
|
804
|
+
delete: {
|
|
805
|
+
"/skus/:skuId": import("@withtyped/server").PathGuard<"/:skuId", unknown, unknown, unknown>;
|
|
806
|
+
};
|
|
418
807
|
copy: {};
|
|
419
808
|
head: {};
|
|
420
809
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
@@ -428,18 +817,20 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
428
817
|
status: "open" | "complete" | "expired";
|
|
429
818
|
tenantId: string | null;
|
|
430
819
|
updatedAt: Date;
|
|
431
|
-
|
|
820
|
+
skuId: string | null;
|
|
821
|
+
planId: string | null;
|
|
432
822
|
}>;
|
|
433
823
|
};
|
|
434
824
|
post: {
|
|
435
825
|
"/checkout-session": import("@withtyped/server").PathGuard<"/", unknown, {
|
|
436
|
-
planId: string;
|
|
437
826
|
successCallbackUrl: string;
|
|
438
827
|
tenantId?: string | undefined;
|
|
439
|
-
|
|
440
|
-
|
|
828
|
+
skuId?: string | undefined;
|
|
829
|
+
planId?: string | undefined;
|
|
441
830
|
tenantName?: string | undefined;
|
|
831
|
+
tenantTag?: TenantTag | undefined;
|
|
442
832
|
tenantRegionName?: RegionName | undefined;
|
|
833
|
+
cancelCallbackUrl?: string | undefined;
|
|
443
834
|
}, {
|
|
444
835
|
sessionId: string;
|
|
445
836
|
redirectUri?: string | null | undefined;
|
|
@@ -623,7 +1014,7 @@ export declare const tenantAuthRouter: import("@withtyped/server").Router<Reques
|
|
|
623
1014
|
};
|
|
624
1015
|
post: {
|
|
625
1016
|
"/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, {
|
|
626
|
-
invitee: string;
|
|
1017
|
+
invitee: string | string[];
|
|
627
1018
|
roleName: TenantRole;
|
|
628
1019
|
expiresAt?: number | undefined;
|
|
629
1020
|
}, {
|
|
@@ -638,7 +1029,19 @@ export declare const tenantAuthRouter: import("@withtyped/server").Router<Reques
|
|
|
638
1029
|
organizationId: string;
|
|
639
1030
|
expiresAt: number;
|
|
640
1031
|
organizationRoles: OrganizationRoleEntity[];
|
|
641
|
-
}
|
|
1032
|
+
} | {
|
|
1033
|
+
id: string;
|
|
1034
|
+
createdAt: number;
|
|
1035
|
+
status: OrganizationInvitationStatus;
|
|
1036
|
+
tenantId: string;
|
|
1037
|
+
updatedAt: number;
|
|
1038
|
+
inviterId: string | null;
|
|
1039
|
+
invitee: string;
|
|
1040
|
+
acceptedUserId: string | null;
|
|
1041
|
+
organizationId: string;
|
|
1042
|
+
expiresAt: number;
|
|
1043
|
+
organizationRoles: OrganizationRoleEntity[];
|
|
1044
|
+
}[]>;
|
|
642
1045
|
} & {
|
|
643
1046
|
"/:tenantId/invitations/:invitationId/message": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId/message", unknown, unknown, unknown>;
|
|
644
1047
|
};
|
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-b98b019",
|
|
4
4
|
"description": "Logto Cloud service.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"author": "Silverhand Inc. <contact@silverhand.io>",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"nodemon": "^3.0.0",
|
|
30
30
|
"prettier": "^3.0.0",
|
|
31
31
|
"typescript": "^5.3.3",
|
|
32
|
-
"vite-tsconfig-paths": "^
|
|
33
|
-
"vitest": "^
|
|
32
|
+
"vite-tsconfig-paths": "^5.0.0",
|
|
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.2",
|
|
53
|
+
"@withtyped/server": "^0.14.0"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
56
56
|
"precommit": "lint-staged",
|