@logto/cloud 0.2.5-81f06ea → 0.2.5-8a3dff0
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 +668 -121
- package/package.json +10 -10
package/lib/routes/index.d.ts
CHANGED
|
@@ -3,22 +3,6 @@
|
|
|
3
3
|
import { Json, JsonObject, RequestContext } from '@withtyped/server';
|
|
4
4
|
import { InferModelType } from '@withtyped/server/model';
|
|
5
5
|
|
|
6
|
-
export type WithAuthContext<Context = RequestContext> = Context & {
|
|
7
|
-
auth: {
|
|
8
|
-
/** The ID of the authenticated subject (`sub`). */
|
|
9
|
-
id: string;
|
|
10
|
-
/** The scopes that the subject has (`scope`). */
|
|
11
|
-
scopes: string[];
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
declare enum VerificationCodeType {
|
|
15
|
-
SignIn = "SignIn",
|
|
16
|
-
Register = "Register",
|
|
17
|
-
ForgotPassword = "ForgotPassword",
|
|
18
|
-
Generic = "Generic",
|
|
19
|
-
/** @deprecated Use `Generic` type template for sending test sms/email use case */
|
|
20
|
-
Test = "Test"
|
|
21
|
-
}
|
|
22
6
|
declare enum TemplateType {
|
|
23
7
|
/** The template for sending verification code when user is signing in. */
|
|
24
8
|
SignIn = "SignIn",
|
|
@@ -29,7 +13,11 @@ declare enum TemplateType {
|
|
|
29
13
|
/** The template for sending organization invitation. */
|
|
30
14
|
OrganizationInvitation = "OrganizationInvitation",
|
|
31
15
|
/** The template for generic usage. */
|
|
32
|
-
Generic = "Generic"
|
|
16
|
+
Generic = "Generic",
|
|
17
|
+
/** The template for validating user permission for sensitive operations. */
|
|
18
|
+
UserPermissionValidation = "UserPermissionValidation",
|
|
19
|
+
/** The template for binding a new identifier to an existing account. */
|
|
20
|
+
BindNewIdentifier = "BindNewIdentifier"
|
|
33
21
|
}
|
|
34
22
|
declare enum OrganizationInvitationStatus {
|
|
35
23
|
Pending = "Pending",
|
|
@@ -37,6 +25,20 @@ declare enum OrganizationInvitationStatus {
|
|
|
37
25
|
Expired = "Expired",
|
|
38
26
|
Revoked = "Revoked"
|
|
39
27
|
}
|
|
28
|
+
/** The scopes (permissions) defined by the organization template. */
|
|
29
|
+
export type OrganizationScope = {
|
|
30
|
+
tenantId: string;
|
|
31
|
+
/** The globally unique identifier of the organization scope. */
|
|
32
|
+
id: string;
|
|
33
|
+
/** The organization scope's name, unique within the organization template. */
|
|
34
|
+
name: string;
|
|
35
|
+
/** A brief description of the organization scope. */
|
|
36
|
+
description: string | null;
|
|
37
|
+
};
|
|
38
|
+
declare enum LogtoJwtTokenKeyType {
|
|
39
|
+
AccessToken = "access-token",
|
|
40
|
+
ClientCredentials = "client-credentials"
|
|
41
|
+
}
|
|
40
42
|
/**
|
|
41
43
|
* The simplified organization role entity that is returned in the `roles` field
|
|
42
44
|
* of the organization.
|
|
@@ -52,8 +54,30 @@ declare enum TenantTag {
|
|
|
52
54
|
declare enum TenantRole {
|
|
53
55
|
/** Admin of the tenant, who has all permissions. */
|
|
54
56
|
Admin = "admin",
|
|
55
|
-
/**
|
|
56
|
-
|
|
57
|
+
/** Collaborator of the tenant, who has permissions to operate the tenant data, but not the tenant settings. */
|
|
58
|
+
Collaborator = "collaborator"
|
|
59
|
+
}
|
|
60
|
+
declare const availableReportableUsageKeys: readonly [
|
|
61
|
+
"tokenLimit",
|
|
62
|
+
"machineToMachineLimit",
|
|
63
|
+
"resourcesLimit",
|
|
64
|
+
"enterpriseSsoLimit",
|
|
65
|
+
"hooksLimit",
|
|
66
|
+
"tenantMembersLimit",
|
|
67
|
+
"mfaEnabled",
|
|
68
|
+
"organizationsEnabled",
|
|
69
|
+
"organizationsLimit",
|
|
70
|
+
"securityFeaturesEnabled",
|
|
71
|
+
"userRolesLimit",
|
|
72
|
+
"machineToMachineRolesLimit",
|
|
73
|
+
"thirdPartyApplicationsLimit",
|
|
74
|
+
"samlApplicationsLimit"
|
|
75
|
+
];
|
|
76
|
+
export type ReportableUsageKey = (typeof availableReportableUsageKeys)[number];
|
|
77
|
+
export type RealtimeReportableUsageKey = Exclude<ReportableUsageKey, "tokenLimit">;
|
|
78
|
+
declare enum LogtoSkuType {
|
|
79
|
+
Basic = "Basic",
|
|
80
|
+
AddOn = "AddOn"
|
|
57
81
|
}
|
|
58
82
|
declare const AffiliateProperties: import("@withtyped/server/lib/model/index.js").default<"affiliate_properties", {
|
|
59
83
|
createdAt: Date;
|
|
@@ -68,11 +92,28 @@ declare const Affiliates: import("@withtyped/server/lib/model/index.js").default
|
|
|
68
92
|
id: string;
|
|
69
93
|
}, "id" | "createdAt", "id" | "createdAt">;
|
|
70
94
|
export type Affiliate = InferModelType<typeof Affiliates>;
|
|
95
|
+
declare const publicRegionNames: readonly [
|
|
96
|
+
"EU",
|
|
97
|
+
"US",
|
|
98
|
+
"AU",
|
|
99
|
+
"JP"
|
|
100
|
+
];
|
|
101
|
+
/** The type of region names for the public cloud. */
|
|
102
|
+
export type PublicRegionName = (typeof publicRegionNames)[number];
|
|
103
|
+
export type WithAuthContext<Context = RequestContext> = Context & {
|
|
104
|
+
auth: {
|
|
105
|
+
/** The ID of the authenticated subject (`sub`). */
|
|
106
|
+
id: string;
|
|
107
|
+
/** The scopes that the subject has (`scope`). */
|
|
108
|
+
scopes: string[];
|
|
109
|
+
};
|
|
110
|
+
};
|
|
71
111
|
export type AffiliateData = Affiliate & {
|
|
72
112
|
properties: Array<Pick<AffiliateProperty, "type" | "value">>;
|
|
73
113
|
};
|
|
74
114
|
declare const router: import("@withtyped/server").Router<RequestContext, WithAuthContext<Omit<import("@withtyped/server").BaseContext & {
|
|
75
115
|
request: {
|
|
116
|
+
id?: string | undefined;
|
|
76
117
|
method?: import("@withtyped/server").RequestMethod | undefined;
|
|
77
118
|
headers: import("http").IncomingHttpHeaders;
|
|
78
119
|
url: URL;
|
|
@@ -80,6 +121,7 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
80
121
|
};
|
|
81
122
|
}, "request"> & {
|
|
82
123
|
request: Record<string, unknown> & {
|
|
124
|
+
id?: string | undefined;
|
|
83
125
|
method?: import("@withtyped/server").RequestMethod | undefined;
|
|
84
126
|
headers: import("http").IncomingHttpHeaders;
|
|
85
127
|
url: URL;
|
|
@@ -88,16 +130,20 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
88
130
|
body?: Json | undefined;
|
|
89
131
|
bodyRaw?: Buffer | undefined;
|
|
90
132
|
};
|
|
91
|
-
}>, 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<{
|
|
133
|
+
}>, 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<{
|
|
92
134
|
patch: {
|
|
93
135
|
"/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, {
|
|
94
136
|
name?: string | undefined;
|
|
95
137
|
}, {
|
|
96
138
|
id: string;
|
|
97
139
|
name: string;
|
|
140
|
+
createdAt: Date;
|
|
141
|
+
quota: {
|
|
142
|
+
mauLimit: number | null;
|
|
143
|
+
tokenLimit: number | null;
|
|
144
|
+
};
|
|
98
145
|
usage: {
|
|
99
146
|
activeUsers: number;
|
|
100
|
-
cost: number;
|
|
101
147
|
tokenUsage: number;
|
|
102
148
|
};
|
|
103
149
|
indicator: string;
|
|
@@ -108,11 +154,21 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
108
154
|
planId: string;
|
|
109
155
|
currentPeriodStart: Date;
|
|
110
156
|
currentPeriodEnd: Date;
|
|
157
|
+
isEnterprisePlan: boolean;
|
|
158
|
+
id?: string | undefined;
|
|
159
|
+
upcomingInvoice?: {
|
|
160
|
+
subtotal: number;
|
|
161
|
+
subtotalExcludingTax: number | null;
|
|
162
|
+
total: number;
|
|
163
|
+
totalExcludingTax: number | null;
|
|
164
|
+
} | null | undefined;
|
|
111
165
|
};
|
|
166
|
+
regionName: string;
|
|
167
|
+
tag: TenantTag;
|
|
112
168
|
openInvoices: {
|
|
113
|
-
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
114
169
|
id: string;
|
|
115
170
|
createdAt: Date;
|
|
171
|
+
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
116
172
|
updatedAt: Date;
|
|
117
173
|
customerId: string | null;
|
|
118
174
|
billingReason: string | null;
|
|
@@ -120,11 +176,11 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
120
176
|
periodEnd: Date;
|
|
121
177
|
amountDue: number;
|
|
122
178
|
amountPaid: number;
|
|
179
|
+
basicSkuId: string | null;
|
|
123
180
|
subscriptionId: string | null;
|
|
124
181
|
hostedInvoiceUrl: string | null;
|
|
125
182
|
invoicePdf: string | null;
|
|
126
183
|
}[];
|
|
127
|
-
tag: TenantTag;
|
|
128
184
|
}>;
|
|
129
185
|
};
|
|
130
186
|
options: {};
|
|
@@ -132,9 +188,13 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
132
188
|
"/tenants": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
|
|
133
189
|
id: string;
|
|
134
190
|
name: string;
|
|
191
|
+
createdAt: Date;
|
|
192
|
+
quota: {
|
|
193
|
+
mauLimit: number | null;
|
|
194
|
+
tokenLimit: number | null;
|
|
195
|
+
};
|
|
135
196
|
usage: {
|
|
136
197
|
activeUsers: number;
|
|
137
|
-
cost: number;
|
|
138
198
|
tokenUsage: number;
|
|
139
199
|
};
|
|
140
200
|
indicator: string;
|
|
@@ -145,11 +205,21 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
145
205
|
planId: string;
|
|
146
206
|
currentPeriodStart: Date;
|
|
147
207
|
currentPeriodEnd: Date;
|
|
208
|
+
isEnterprisePlan: boolean;
|
|
209
|
+
id?: string | undefined;
|
|
210
|
+
upcomingInvoice?: {
|
|
211
|
+
subtotal: number;
|
|
212
|
+
subtotalExcludingTax: number | null;
|
|
213
|
+
total: number;
|
|
214
|
+
totalExcludingTax: number | null;
|
|
215
|
+
} | null | undefined;
|
|
148
216
|
};
|
|
217
|
+
regionName: string;
|
|
218
|
+
tag: TenantTag;
|
|
149
219
|
openInvoices: {
|
|
150
|
-
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
151
220
|
id: string;
|
|
152
221
|
createdAt: Date;
|
|
222
|
+
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
153
223
|
updatedAt: Date;
|
|
154
224
|
customerId: string | null;
|
|
155
225
|
billingReason: string | null;
|
|
@@ -157,23 +227,29 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
157
227
|
periodEnd: Date;
|
|
158
228
|
amountDue: number;
|
|
159
229
|
amountPaid: number;
|
|
230
|
+
basicSkuId: string | null;
|
|
160
231
|
subscriptionId: string | null;
|
|
161
232
|
hostedInvoiceUrl: string | null;
|
|
162
233
|
invoicePdf: string | null;
|
|
163
234
|
}[];
|
|
164
|
-
tag: TenantTag;
|
|
165
235
|
}[]>;
|
|
166
236
|
};
|
|
167
237
|
post: {
|
|
168
238
|
"/tenants": import("@withtyped/server").PathGuard<"/", unknown, {
|
|
239
|
+
id?: string | undefined;
|
|
169
240
|
name?: string | undefined;
|
|
170
241
|
tag?: TenantTag | undefined;
|
|
242
|
+
regionName?: string | undefined;
|
|
171
243
|
}, {
|
|
172
244
|
id: string;
|
|
173
245
|
name: string;
|
|
246
|
+
createdAt: Date;
|
|
247
|
+
quota: {
|
|
248
|
+
mauLimit: number | null;
|
|
249
|
+
tokenLimit: number | null;
|
|
250
|
+
};
|
|
174
251
|
usage: {
|
|
175
252
|
activeUsers: number;
|
|
176
|
-
cost: number;
|
|
177
253
|
tokenUsage: number;
|
|
178
254
|
};
|
|
179
255
|
indicator: string;
|
|
@@ -184,11 +260,21 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
184
260
|
planId: string;
|
|
185
261
|
currentPeriodStart: Date;
|
|
186
262
|
currentPeriodEnd: Date;
|
|
263
|
+
isEnterprisePlan: boolean;
|
|
264
|
+
id?: string | undefined;
|
|
265
|
+
upcomingInvoice?: {
|
|
266
|
+
subtotal: number;
|
|
267
|
+
subtotalExcludingTax: number | null;
|
|
268
|
+
total: number;
|
|
269
|
+
totalExcludingTax: number | null;
|
|
270
|
+
} | null | undefined;
|
|
187
271
|
};
|
|
272
|
+
regionName: string;
|
|
273
|
+
tag: TenantTag;
|
|
188
274
|
openInvoices: {
|
|
189
|
-
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
190
275
|
id: string;
|
|
191
276
|
createdAt: Date;
|
|
277
|
+
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
192
278
|
updatedAt: Date;
|
|
193
279
|
customerId: string | null;
|
|
194
280
|
billingReason: string | null;
|
|
@@ -196,11 +282,11 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
196
282
|
periodEnd: Date;
|
|
197
283
|
amountDue: number;
|
|
198
284
|
amountPaid: number;
|
|
285
|
+
basicSkuId: string | null;
|
|
199
286
|
subscriptionId: string | null;
|
|
200
287
|
hostedInvoiceUrl: string | null;
|
|
201
288
|
invoicePdf: string | null;
|
|
202
289
|
}[];
|
|
203
|
-
tag: TenantTag;
|
|
204
290
|
}>;
|
|
205
291
|
};
|
|
206
292
|
put: {};
|
|
@@ -215,23 +301,291 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
215
301
|
get: {
|
|
216
302
|
"/tenants/my/subscription": import("@withtyped/server").PathGuard<"/my/subscription", unknown, unknown, {
|
|
217
303
|
status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
|
|
304
|
+
quota: {
|
|
305
|
+
auditLogsRetentionDays: number | null;
|
|
306
|
+
mauLimit: number | null;
|
|
307
|
+
applicationsLimit: number | null;
|
|
308
|
+
thirdPartyApplicationsLimit: number | null;
|
|
309
|
+
scopesPerResourceLimit: number | null;
|
|
310
|
+
socialConnectorsLimit: number | null;
|
|
311
|
+
userRolesLimit: number | null;
|
|
312
|
+
machineToMachineRolesLimit: number | null;
|
|
313
|
+
scopesPerRoleLimit: number | null;
|
|
314
|
+
hooksLimit: number | null;
|
|
315
|
+
customJwtEnabled: boolean;
|
|
316
|
+
subjectTokenEnabled: boolean;
|
|
317
|
+
bringYourUiEnabled: boolean;
|
|
318
|
+
collectUserProfileEnabled: 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
|
+
securityFeaturesEnabled: boolean;
|
|
328
|
+
idpInitiatedSsoEnabled: boolean;
|
|
329
|
+
samlApplicationsLimit: number | null;
|
|
330
|
+
};
|
|
218
331
|
planId: string;
|
|
219
332
|
currentPeriodStart: Date;
|
|
220
333
|
currentPeriodEnd: Date;
|
|
334
|
+
isEnterprisePlan: boolean;
|
|
335
|
+
id?: string | undefined;
|
|
336
|
+
upcomingInvoice?: {
|
|
337
|
+
subtotal: number;
|
|
338
|
+
subtotalExcludingTax: number | null;
|
|
339
|
+
total: number;
|
|
340
|
+
totalExcludingTax: number | null;
|
|
341
|
+
} | null | undefined;
|
|
221
342
|
}>;
|
|
222
343
|
} & {
|
|
344
|
+
"/tenants/my/subscription-usage": import("@withtyped/server").PathGuard<"/my/subscription-usage", unknown, unknown, {
|
|
345
|
+
usage: {
|
|
346
|
+
applicationsLimit: number;
|
|
347
|
+
thirdPartyApplicationsLimit: number;
|
|
348
|
+
scopesPerResourceLimit: number;
|
|
349
|
+
socialConnectorsLimit: number;
|
|
350
|
+
userRolesLimit: number;
|
|
351
|
+
machineToMachineRolesLimit: number;
|
|
352
|
+
scopesPerRoleLimit: number;
|
|
353
|
+
hooksLimit: number;
|
|
354
|
+
customJwtEnabled: boolean;
|
|
355
|
+
subjectTokenEnabled: boolean;
|
|
356
|
+
bringYourUiEnabled: boolean;
|
|
357
|
+
collectUserProfileEnabled: boolean;
|
|
358
|
+
machineToMachineLimit: number;
|
|
359
|
+
resourcesLimit: number;
|
|
360
|
+
enterpriseSsoLimit: number;
|
|
361
|
+
tenantMembersLimit: number;
|
|
362
|
+
mfaEnabled: boolean;
|
|
363
|
+
organizationsEnabled: boolean;
|
|
364
|
+
organizationsLimit: number;
|
|
365
|
+
securityFeaturesEnabled: boolean;
|
|
366
|
+
idpInitiatedSsoEnabled: boolean;
|
|
367
|
+
samlApplicationsLimit: number;
|
|
368
|
+
};
|
|
369
|
+
resources: Record<string, number>;
|
|
370
|
+
roles: Record<string, number>;
|
|
371
|
+
quota: {
|
|
372
|
+
auditLogsRetentionDays: number | null;
|
|
373
|
+
mauLimit: number | null;
|
|
374
|
+
applicationsLimit: number | null;
|
|
375
|
+
thirdPartyApplicationsLimit: number | null;
|
|
376
|
+
scopesPerResourceLimit: number | null;
|
|
377
|
+
socialConnectorsLimit: number | null;
|
|
378
|
+
userRolesLimit: number | null;
|
|
379
|
+
machineToMachineRolesLimit: number | null;
|
|
380
|
+
scopesPerRoleLimit: number | null;
|
|
381
|
+
hooksLimit: number | null;
|
|
382
|
+
customJwtEnabled: boolean;
|
|
383
|
+
subjectTokenEnabled: boolean;
|
|
384
|
+
bringYourUiEnabled: boolean;
|
|
385
|
+
collectUserProfileEnabled: boolean;
|
|
386
|
+
tokenLimit: number | null;
|
|
387
|
+
machineToMachineLimit: number | null;
|
|
388
|
+
resourcesLimit: number | null;
|
|
389
|
+
enterpriseSsoLimit: number | null;
|
|
390
|
+
tenantMembersLimit: number | null;
|
|
391
|
+
mfaEnabled: boolean;
|
|
392
|
+
organizationsEnabled: boolean;
|
|
393
|
+
organizationsLimit: number | null;
|
|
394
|
+
securityFeaturesEnabled: boolean;
|
|
395
|
+
idpInitiatedSsoEnabled: boolean;
|
|
396
|
+
samlApplicationsLimit: number | null;
|
|
397
|
+
};
|
|
398
|
+
basicQuota: {
|
|
399
|
+
auditLogsRetentionDays: number | null;
|
|
400
|
+
mauLimit: number | null;
|
|
401
|
+
applicationsLimit: number | null;
|
|
402
|
+
thirdPartyApplicationsLimit: number | null;
|
|
403
|
+
scopesPerResourceLimit: number | null;
|
|
404
|
+
socialConnectorsLimit: number | null;
|
|
405
|
+
userRolesLimit: number | null;
|
|
406
|
+
machineToMachineRolesLimit: number | null;
|
|
407
|
+
scopesPerRoleLimit: number | null;
|
|
408
|
+
hooksLimit: number | null;
|
|
409
|
+
customJwtEnabled: boolean;
|
|
410
|
+
subjectTokenEnabled: boolean;
|
|
411
|
+
bringYourUiEnabled: boolean;
|
|
412
|
+
collectUserProfileEnabled: boolean;
|
|
413
|
+
tokenLimit: number | null;
|
|
414
|
+
machineToMachineLimit: number | null;
|
|
415
|
+
resourcesLimit: number | null;
|
|
416
|
+
enterpriseSsoLimit: number | null;
|
|
417
|
+
tenantMembersLimit: number | null;
|
|
418
|
+
mfaEnabled: boolean;
|
|
419
|
+
organizationsEnabled: boolean;
|
|
420
|
+
organizationsLimit: number | null;
|
|
421
|
+
securityFeaturesEnabled: boolean;
|
|
422
|
+
idpInitiatedSsoEnabled: boolean;
|
|
423
|
+
samlApplicationsLimit: number | null;
|
|
424
|
+
};
|
|
425
|
+
}>;
|
|
426
|
+
};
|
|
427
|
+
post: {
|
|
428
|
+
"/tenants/my/subscription/item-updates": import("@withtyped/server").PathGuard<"/my/subscription/item-updates", unknown, {
|
|
429
|
+
usageKey: RealtimeReportableUsageKey;
|
|
430
|
+
}, {
|
|
431
|
+
message: string;
|
|
432
|
+
}>;
|
|
433
|
+
};
|
|
434
|
+
put: {};
|
|
435
|
+
delete: {};
|
|
436
|
+
copy: {};
|
|
437
|
+
head: {};
|
|
438
|
+
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
439
|
+
patch: {};
|
|
440
|
+
options: {};
|
|
441
|
+
get: {
|
|
223
442
|
"/tenants/:tenantId/subscription": import("@withtyped/server").PathGuard<"/:tenantId/subscription", unknown, unknown, {
|
|
224
443
|
status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
|
|
225
444
|
planId: string;
|
|
226
445
|
currentPeriodStart: Date;
|
|
227
446
|
currentPeriodEnd: Date;
|
|
447
|
+
isEnterprisePlan: boolean;
|
|
448
|
+
id?: string | undefined;
|
|
449
|
+
upcomingInvoice?: {
|
|
450
|
+
subtotal: number;
|
|
451
|
+
subtotalExcludingTax: number | null;
|
|
452
|
+
total: number;
|
|
453
|
+
totalExcludingTax: number | null;
|
|
454
|
+
} | null | undefined;
|
|
455
|
+
}>;
|
|
456
|
+
} & {
|
|
457
|
+
"/tenants/:tenantId/subscription-usage": import("@withtyped/server").PathGuard<"/:tenantId/subscription-usage", unknown, unknown, {
|
|
458
|
+
usage: {
|
|
459
|
+
applicationsLimit: number;
|
|
460
|
+
thirdPartyApplicationsLimit: number;
|
|
461
|
+
scopesPerResourceLimit: number;
|
|
462
|
+
socialConnectorsLimit: number;
|
|
463
|
+
userRolesLimit: number;
|
|
464
|
+
machineToMachineRolesLimit: number;
|
|
465
|
+
scopesPerRoleLimit: number;
|
|
466
|
+
hooksLimit: number;
|
|
467
|
+
customJwtEnabled: boolean;
|
|
468
|
+
subjectTokenEnabled: boolean;
|
|
469
|
+
bringYourUiEnabled: boolean;
|
|
470
|
+
collectUserProfileEnabled: boolean;
|
|
471
|
+
machineToMachineLimit: number;
|
|
472
|
+
resourcesLimit: number;
|
|
473
|
+
enterpriseSsoLimit: number;
|
|
474
|
+
tenantMembersLimit: number;
|
|
475
|
+
mfaEnabled: boolean;
|
|
476
|
+
organizationsEnabled: boolean;
|
|
477
|
+
organizationsLimit: number;
|
|
478
|
+
securityFeaturesEnabled: boolean;
|
|
479
|
+
idpInitiatedSsoEnabled: boolean;
|
|
480
|
+
samlApplicationsLimit: number;
|
|
481
|
+
};
|
|
482
|
+
resources: Record<string, number>;
|
|
483
|
+
roles: Record<string, number>;
|
|
484
|
+
quota: {
|
|
485
|
+
auditLogsRetentionDays: number | null;
|
|
486
|
+
mauLimit: number | null;
|
|
487
|
+
applicationsLimit: number | null;
|
|
488
|
+
thirdPartyApplicationsLimit: number | null;
|
|
489
|
+
scopesPerResourceLimit: number | null;
|
|
490
|
+
socialConnectorsLimit: number | null;
|
|
491
|
+
userRolesLimit: number | null;
|
|
492
|
+
machineToMachineRolesLimit: number | null;
|
|
493
|
+
scopesPerRoleLimit: number | null;
|
|
494
|
+
hooksLimit: number | null;
|
|
495
|
+
customJwtEnabled: boolean;
|
|
496
|
+
subjectTokenEnabled: boolean;
|
|
497
|
+
bringYourUiEnabled: boolean;
|
|
498
|
+
collectUserProfileEnabled: boolean;
|
|
499
|
+
tokenLimit: number | null;
|
|
500
|
+
machineToMachineLimit: number | null;
|
|
501
|
+
resourcesLimit: number | null;
|
|
502
|
+
enterpriseSsoLimit: number | null;
|
|
503
|
+
tenantMembersLimit: number | null;
|
|
504
|
+
mfaEnabled: boolean;
|
|
505
|
+
organizationsEnabled: boolean;
|
|
506
|
+
organizationsLimit: number | null;
|
|
507
|
+
securityFeaturesEnabled: boolean;
|
|
508
|
+
idpInitiatedSsoEnabled: boolean;
|
|
509
|
+
samlApplicationsLimit: number | null;
|
|
510
|
+
};
|
|
511
|
+
basicQuota: {
|
|
512
|
+
auditLogsRetentionDays: number | null;
|
|
513
|
+
mauLimit: number | null;
|
|
514
|
+
applicationsLimit: number | null;
|
|
515
|
+
thirdPartyApplicationsLimit: number | null;
|
|
516
|
+
scopesPerResourceLimit: number | null;
|
|
517
|
+
socialConnectorsLimit: number | null;
|
|
518
|
+
userRolesLimit: number | null;
|
|
519
|
+
machineToMachineRolesLimit: number | null;
|
|
520
|
+
scopesPerRoleLimit: number | null;
|
|
521
|
+
hooksLimit: number | null;
|
|
522
|
+
customJwtEnabled: boolean;
|
|
523
|
+
subjectTokenEnabled: boolean;
|
|
524
|
+
bringYourUiEnabled: boolean;
|
|
525
|
+
collectUserProfileEnabled: boolean;
|
|
526
|
+
tokenLimit: number | null;
|
|
527
|
+
machineToMachineLimit: number | null;
|
|
528
|
+
resourcesLimit: number | null;
|
|
529
|
+
enterpriseSsoLimit: number | null;
|
|
530
|
+
tenantMembersLimit: number | null;
|
|
531
|
+
mfaEnabled: boolean;
|
|
532
|
+
organizationsEnabled: boolean;
|
|
533
|
+
organizationsLimit: number | null;
|
|
534
|
+
securityFeaturesEnabled: boolean;
|
|
535
|
+
idpInitiatedSsoEnabled: boolean;
|
|
536
|
+
samlApplicationsLimit: number | null;
|
|
537
|
+
};
|
|
538
|
+
}>;
|
|
539
|
+
} & {
|
|
540
|
+
"/tenants/:tenantId/subscription/periodic-usage": import("@withtyped/server").PathGuard<"/:tenantId/subscription/periodic-usage", unknown, unknown, {
|
|
541
|
+
mauLimit: number;
|
|
542
|
+
tokenLimit: number;
|
|
228
543
|
}>;
|
|
544
|
+
} & {
|
|
545
|
+
"/tenants/:tenantId/subscription/add-on-skus": import("@withtyped/server").PathGuard<"/:tenantId/subscription/add-on-skus", unknown, unknown, Partial<Record<"tokenLimit" | "machineToMachineLimit" | "resourcesLimit" | "enterpriseSsoLimit" | "hooksLimit" | "tenantMembersLimit" | "mfaEnabled" | "organizationsEnabled" | "organizationsLimit" | "securityFeaturesEnabled" | "userRolesLimit" | "machineToMachineRolesLimit" | "thirdPartyApplicationsLimit" | "samlApplicationsLimit", {
|
|
546
|
+
id: string;
|
|
547
|
+
name: string | null;
|
|
548
|
+
createdAt: Date;
|
|
549
|
+
defaultPriceId: string | null;
|
|
550
|
+
unitPrice: number | null;
|
|
551
|
+
type: LogtoSkuType;
|
|
552
|
+
quota: {
|
|
553
|
+
auditLogsRetentionDays?: number | null | undefined;
|
|
554
|
+
mauLimit?: number | null | undefined;
|
|
555
|
+
applicationsLimit?: number | null | undefined;
|
|
556
|
+
thirdPartyApplicationsLimit?: number | null | undefined;
|
|
557
|
+
scopesPerResourceLimit?: number | null | undefined;
|
|
558
|
+
socialConnectorsLimit?: number | null | undefined;
|
|
559
|
+
userRolesLimit?: number | null | undefined;
|
|
560
|
+
machineToMachineRolesLimit?: number | null | undefined;
|
|
561
|
+
scopesPerRoleLimit?: number | null | undefined;
|
|
562
|
+
hooksLimit?: number | null | undefined;
|
|
563
|
+
customJwtEnabled?: boolean | undefined;
|
|
564
|
+
subjectTokenEnabled?: boolean | undefined;
|
|
565
|
+
bringYourUiEnabled?: boolean | undefined;
|
|
566
|
+
collectUserProfileEnabled?: boolean | undefined;
|
|
567
|
+
tokenLimit?: number | null | undefined;
|
|
568
|
+
machineToMachineLimit?: number | null | undefined;
|
|
569
|
+
resourcesLimit?: number | null | undefined;
|
|
570
|
+
enterpriseSsoLimit?: number | null | undefined;
|
|
571
|
+
tenantMembersLimit?: number | null | undefined;
|
|
572
|
+
mfaEnabled?: boolean | undefined;
|
|
573
|
+
organizationsEnabled?: boolean | undefined;
|
|
574
|
+
organizationsLimit?: number | null | undefined;
|
|
575
|
+
securityFeaturesEnabled?: boolean | undefined;
|
|
576
|
+
idpInitiatedSsoEnabled?: boolean | undefined;
|
|
577
|
+
samlApplicationsLimit?: number | null | undefined;
|
|
578
|
+
};
|
|
579
|
+
isDefault: boolean;
|
|
580
|
+
updatedAt: Date;
|
|
581
|
+
productId: string | null;
|
|
582
|
+
}>>>;
|
|
229
583
|
} & {
|
|
230
584
|
"/tenants/:tenantId/invoices": import("@withtyped/server").PathGuard<"/:tenantId/invoices", unknown, unknown, {
|
|
231
585
|
invoices: {
|
|
232
|
-
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
233
586
|
id: string;
|
|
234
587
|
createdAt: Date;
|
|
588
|
+
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
235
589
|
updatedAt: Date;
|
|
236
590
|
customerId: string | null;
|
|
237
591
|
billingReason: string | null;
|
|
@@ -239,22 +593,59 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
239
593
|
periodEnd: Date;
|
|
240
594
|
amountDue: number;
|
|
241
595
|
amountPaid: number;
|
|
596
|
+
basicSkuId: string | null;
|
|
242
597
|
subscriptionId: string | null;
|
|
243
598
|
hostedInvoiceUrl: string | null;
|
|
244
599
|
invoicePdf: string | null;
|
|
245
600
|
planName: string | null;
|
|
601
|
+
skuId?: string | null | undefined;
|
|
246
602
|
}[];
|
|
247
603
|
}>;
|
|
604
|
+
} & {
|
|
605
|
+
"/tenants/:tenantId/available-skus": import("@withtyped/server").PathGuard<"/:tenantId/available-skus", {
|
|
606
|
+
type?: LogtoSkuType | undefined;
|
|
607
|
+
}, unknown, {
|
|
608
|
+
id: string;
|
|
609
|
+
name: string | null;
|
|
610
|
+
createdAt: Date;
|
|
611
|
+
defaultPriceId: string | null;
|
|
612
|
+
unitPrice: number | null;
|
|
613
|
+
type: LogtoSkuType;
|
|
614
|
+
quota: {
|
|
615
|
+
auditLogsRetentionDays?: number | null | undefined;
|
|
616
|
+
mauLimit?: number | null | undefined;
|
|
617
|
+
applicationsLimit?: number | null | undefined;
|
|
618
|
+
thirdPartyApplicationsLimit?: number | null | undefined;
|
|
619
|
+
scopesPerResourceLimit?: number | null | undefined;
|
|
620
|
+
socialConnectorsLimit?: number | null | undefined;
|
|
621
|
+
userRolesLimit?: number | null | undefined;
|
|
622
|
+
machineToMachineRolesLimit?: number | null | undefined;
|
|
623
|
+
scopesPerRoleLimit?: number | null | undefined;
|
|
624
|
+
hooksLimit?: number | null | undefined;
|
|
625
|
+
customJwtEnabled?: boolean | undefined;
|
|
626
|
+
subjectTokenEnabled?: boolean | undefined;
|
|
627
|
+
bringYourUiEnabled?: boolean | undefined;
|
|
628
|
+
collectUserProfileEnabled?: boolean | undefined;
|
|
629
|
+
tokenLimit?: number | null | undefined;
|
|
630
|
+
machineToMachineLimit?: number | null | undefined;
|
|
631
|
+
resourcesLimit?: number | null | undefined;
|
|
632
|
+
enterpriseSsoLimit?: number | null | undefined;
|
|
633
|
+
tenantMembersLimit?: number | null | undefined;
|
|
634
|
+
mfaEnabled?: boolean | undefined;
|
|
635
|
+
organizationsEnabled?: boolean | undefined;
|
|
636
|
+
organizationsLimit?: number | null | undefined;
|
|
637
|
+
securityFeaturesEnabled?: boolean | undefined;
|
|
638
|
+
idpInitiatedSsoEnabled?: boolean | undefined;
|
|
639
|
+
samlApplicationsLimit?: number | null | undefined;
|
|
640
|
+
};
|
|
641
|
+
isDefault: boolean;
|
|
642
|
+
updatedAt: Date;
|
|
643
|
+
productId: string | null;
|
|
644
|
+
}[]>;
|
|
248
645
|
} & {
|
|
249
646
|
"/tenants/:tenantId/invoices/:invoiceId/hosted-invoice-url": import("@withtyped/server").PathGuard<"/:tenantId/invoices/:invoiceId/hosted-invoice-url", unknown, unknown, {
|
|
250
647
|
hostedInvoiceUrl: string;
|
|
251
648
|
}>;
|
|
252
|
-
} & {
|
|
253
|
-
"/tenants/:tenantId/usage": import("@withtyped/server").PathGuard<"/:tenantId/usage", unknown, unknown, {
|
|
254
|
-
activeUsers: number;
|
|
255
|
-
cost: number;
|
|
256
|
-
tokenUsage: number;
|
|
257
|
-
}>;
|
|
258
649
|
};
|
|
259
650
|
post: {
|
|
260
651
|
"/tenants/:tenantId/stripe-customer-portal": import("@withtyped/server").PathGuard<"/:tenantId/stripe-customer-portal", unknown, {
|
|
@@ -282,11 +673,14 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
282
673
|
post: {
|
|
283
674
|
"/services/mails": import("@withtyped/server").PathGuard<"/mails", unknown, {
|
|
284
675
|
data: {
|
|
285
|
-
type: TemplateType
|
|
676
|
+
type: TemplateType;
|
|
286
677
|
payload: {
|
|
287
|
-
code?: string | undefined;
|
|
288
678
|
link?: string | undefined;
|
|
289
|
-
|
|
679
|
+
code?: string | undefined;
|
|
680
|
+
locale?: string | undefined;
|
|
681
|
+
} & {
|
|
682
|
+
[k: string]: unknown;
|
|
683
|
+
} & {
|
|
290
684
|
senderName?: string | undefined;
|
|
291
685
|
companyInformation?: string | undefined;
|
|
292
686
|
appLogo?: string | undefined;
|
|
@@ -297,74 +691,226 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
297
691
|
} & {
|
|
298
692
|
"/services/send-sms": import("@withtyped/server").PathGuard<"/send-sms", unknown, {
|
|
299
693
|
data: {
|
|
300
|
-
type: TemplateType
|
|
694
|
+
type: TemplateType;
|
|
301
695
|
to: string;
|
|
302
696
|
payload: {
|
|
303
697
|
code?: string | undefined;
|
|
304
698
|
link?: string | undefined;
|
|
305
|
-
|
|
699
|
+
locale?: string | undefined;
|
|
700
|
+
} & {
|
|
701
|
+
[k: string]: unknown;
|
|
702
|
+
};
|
|
306
703
|
};
|
|
307
704
|
}, unknown>;
|
|
308
705
|
} & {
|
|
309
|
-
"/services/custom-jwt": import("@withtyped/server").PathGuard<"/custom-jwt",
|
|
706
|
+
"/services/custom-jwt": import("@withtyped/server").PathGuard<"/custom-jwt", {
|
|
707
|
+
isTest?: string | undefined;
|
|
708
|
+
}, {
|
|
709
|
+
token: Record<string, Json>;
|
|
710
|
+
context: Record<string, Json>;
|
|
711
|
+
tokenType: LogtoJwtTokenKeyType.AccessToken;
|
|
310
712
|
script: string;
|
|
713
|
+
environmentVariables?: Record<string, string> | undefined;
|
|
714
|
+
} | {
|
|
311
715
|
token: Record<string, Json>;
|
|
312
|
-
|
|
313
|
-
|
|
716
|
+
tokenType: LogtoJwtTokenKeyType.ClientCredentials;
|
|
717
|
+
script: string;
|
|
718
|
+
environmentVariables?: Record<string, string> | undefined;
|
|
314
719
|
}, Record<string, unknown>>;
|
|
315
720
|
};
|
|
316
|
-
put: {
|
|
317
|
-
|
|
721
|
+
put: {
|
|
722
|
+
"/services/custom-jwt/worker": import("@withtyped/server").PathGuard<"/custom-jwt/worker", unknown, {
|
|
723
|
+
"jwt.accessToken"?: {
|
|
724
|
+
production?: string | undefined;
|
|
725
|
+
test?: string | undefined;
|
|
726
|
+
} | undefined;
|
|
727
|
+
"jwt.clientCredentials"?: {
|
|
728
|
+
production?: string | undefined;
|
|
729
|
+
test?: string | undefined;
|
|
730
|
+
} | undefined;
|
|
731
|
+
}, unknown>;
|
|
732
|
+
};
|
|
733
|
+
delete: {
|
|
734
|
+
"/services/custom-jwt/worker": import("@withtyped/server").PathGuard<"/custom-jwt/worker", unknown, unknown, unknown>;
|
|
735
|
+
};
|
|
318
736
|
copy: {};
|
|
319
737
|
head: {};
|
|
320
738
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
321
739
|
patch: {};
|
|
322
740
|
options: {};
|
|
323
741
|
get: {
|
|
324
|
-
"/
|
|
742
|
+
"/skus": import("@withtyped/server").PathGuard<"/", {
|
|
743
|
+
type?: LogtoSkuType | undefined;
|
|
744
|
+
}, unknown, {
|
|
325
745
|
id: string;
|
|
746
|
+
name: string | null;
|
|
326
747
|
createdAt: Date;
|
|
327
|
-
|
|
748
|
+
defaultPriceId: string | null;
|
|
749
|
+
unitPrice: number | null;
|
|
750
|
+
type: LogtoSkuType;
|
|
751
|
+
quota: {
|
|
752
|
+
auditLogsRetentionDays?: number | null | undefined;
|
|
753
|
+
mauLimit?: number | null | undefined;
|
|
754
|
+
applicationsLimit?: number | null | undefined;
|
|
755
|
+
thirdPartyApplicationsLimit?: number | null | undefined;
|
|
756
|
+
scopesPerResourceLimit?: number | null | undefined;
|
|
757
|
+
socialConnectorsLimit?: number | null | undefined;
|
|
758
|
+
userRolesLimit?: number | null | undefined;
|
|
759
|
+
machineToMachineRolesLimit?: number | null | undefined;
|
|
760
|
+
scopesPerRoleLimit?: number | null | undefined;
|
|
761
|
+
hooksLimit?: number | null | undefined;
|
|
762
|
+
customJwtEnabled?: boolean | undefined;
|
|
763
|
+
subjectTokenEnabled?: boolean | undefined;
|
|
764
|
+
bringYourUiEnabled?: boolean | undefined;
|
|
765
|
+
collectUserProfileEnabled?: boolean | undefined;
|
|
766
|
+
tokenLimit?: number | null | undefined;
|
|
767
|
+
machineToMachineLimit?: number | null | undefined;
|
|
768
|
+
resourcesLimit?: number | null | undefined;
|
|
769
|
+
enterpriseSsoLimit?: number | null | undefined;
|
|
770
|
+
tenantMembersLimit?: number | null | undefined;
|
|
771
|
+
mfaEnabled?: boolean | undefined;
|
|
772
|
+
organizationsEnabled?: boolean | undefined;
|
|
773
|
+
organizationsLimit?: number | null | undefined;
|
|
774
|
+
securityFeaturesEnabled?: boolean | undefined;
|
|
775
|
+
idpInitiatedSsoEnabled?: boolean | undefined;
|
|
776
|
+
samlApplicationsLimit?: number | null | undefined;
|
|
777
|
+
};
|
|
778
|
+
isDefault: boolean;
|
|
328
779
|
updatedAt: Date;
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
780
|
+
productId: string | null;
|
|
781
|
+
}[]>;
|
|
782
|
+
};
|
|
783
|
+
post: {
|
|
784
|
+
"/skus": import("@withtyped/server").PathGuard<"/", unknown, {
|
|
785
|
+
type: LogtoSkuType.AddOn;
|
|
786
|
+
quota: {
|
|
787
|
+
tokenLimit?: number | null | undefined;
|
|
788
|
+
machineToMachineLimit?: number | null | undefined;
|
|
789
|
+
resourcesLimit?: number | null | undefined;
|
|
790
|
+
enterpriseSsoLimit?: number | null | undefined;
|
|
791
|
+
hooksLimit?: number | null | undefined;
|
|
792
|
+
tenantMembersLimit?: number | null | undefined;
|
|
793
|
+
mfaEnabled?: boolean | undefined;
|
|
794
|
+
organizationsEnabled?: boolean | undefined;
|
|
795
|
+
organizationsLimit?: number | null | undefined;
|
|
796
|
+
securityFeaturesEnabled?: boolean | undefined;
|
|
797
|
+
userRolesLimit?: number | null | undefined;
|
|
798
|
+
machineToMachineRolesLimit?: number | null | undefined;
|
|
799
|
+
thirdPartyApplicationsLimit?: number | null | undefined;
|
|
800
|
+
samlApplicationsLimit?: number | null | undefined;
|
|
801
|
+
auditLogsRetentionDays?: number | null | undefined;
|
|
802
|
+
mauLimit?: number | null | undefined;
|
|
803
|
+
applicationsLimit?: number | null | undefined;
|
|
804
|
+
scopesPerResourceLimit?: number | null | undefined;
|
|
805
|
+
socialConnectorsLimit?: number | null | undefined;
|
|
806
|
+
scopesPerRoleLimit?: number | null | undefined;
|
|
807
|
+
customJwtEnabled?: boolean | undefined;
|
|
808
|
+
subjectTokenEnabled?: boolean | undefined;
|
|
809
|
+
bringYourUiEnabled?: boolean | undefined;
|
|
810
|
+
collectUserProfileEnabled?: boolean | undefined;
|
|
811
|
+
idpInitiatedSsoEnabled?: boolean | undefined;
|
|
812
|
+
};
|
|
813
|
+
isDefault?: boolean | undefined;
|
|
814
|
+
} | {
|
|
815
|
+
type: LogtoSkuType.Basic;
|
|
341
816
|
quota: {
|
|
817
|
+
auditLogsRetentionDays: number | null;
|
|
342
818
|
mauLimit: number | null;
|
|
343
|
-
tokenLimit: number | null;
|
|
344
819
|
applicationsLimit: number | null;
|
|
345
|
-
|
|
346
|
-
resourcesLimit: number | null;
|
|
820
|
+
thirdPartyApplicationsLimit: number | null;
|
|
347
821
|
scopesPerResourceLimit: number | null;
|
|
348
|
-
customDomainEnabled: boolean;
|
|
349
|
-
omniSignInEnabled: boolean;
|
|
350
|
-
builtInEmailConnectorEnabled: boolean;
|
|
351
822
|
socialConnectorsLimit: number | null;
|
|
352
|
-
|
|
353
|
-
rolesLimit: number | null;
|
|
823
|
+
userRolesLimit: number | null;
|
|
354
824
|
machineToMachineRolesLimit: number | null;
|
|
355
825
|
scopesPerRoleLimit: number | null;
|
|
356
826
|
hooksLimit: number | null;
|
|
357
|
-
|
|
827
|
+
customJwtEnabled: boolean;
|
|
828
|
+
subjectTokenEnabled: boolean;
|
|
829
|
+
bringYourUiEnabled: boolean;
|
|
830
|
+
collectUserProfileEnabled: boolean;
|
|
831
|
+
tokenLimit: number | null;
|
|
832
|
+
machineToMachineLimit: number | null;
|
|
833
|
+
resourcesLimit: number | null;
|
|
834
|
+
enterpriseSsoLimit: number | null;
|
|
835
|
+
tenantMembersLimit: number | null;
|
|
358
836
|
mfaEnabled: boolean;
|
|
359
837
|
organizationsEnabled: boolean;
|
|
360
|
-
|
|
361
|
-
|
|
838
|
+
organizationsLimit: number | null;
|
|
839
|
+
securityFeaturesEnabled: boolean;
|
|
840
|
+
idpInitiatedSsoEnabled: boolean;
|
|
841
|
+
samlApplicationsLimit: number | null;
|
|
362
842
|
};
|
|
363
|
-
|
|
843
|
+
addOnRelations: {
|
|
844
|
+
tokenLimit?: string | undefined;
|
|
845
|
+
machineToMachineLimit?: string | undefined;
|
|
846
|
+
resourcesLimit?: string | undefined;
|
|
847
|
+
enterpriseSsoLimit?: string | undefined;
|
|
848
|
+
tenantMembersLimit?: string | undefined;
|
|
849
|
+
mfaEnabled?: string | undefined;
|
|
850
|
+
organizationsLimit?: string | undefined;
|
|
851
|
+
securityFeaturesEnabled?: string | undefined;
|
|
852
|
+
};
|
|
853
|
+
isDefault?: boolean | undefined;
|
|
854
|
+
}, {
|
|
855
|
+
id: string;
|
|
856
|
+
createdAt: Date;
|
|
857
|
+
type: LogtoSkuType;
|
|
858
|
+
isDefault: boolean;
|
|
859
|
+
updatedAt: Date;
|
|
860
|
+
quota: {
|
|
861
|
+
auditLogsRetentionDays?: number | null | undefined;
|
|
862
|
+
mauLimit?: number | null | undefined;
|
|
863
|
+
applicationsLimit?: number | null | undefined;
|
|
864
|
+
thirdPartyApplicationsLimit?: number | null | undefined;
|
|
865
|
+
scopesPerResourceLimit?: number | null | undefined;
|
|
866
|
+
socialConnectorsLimit?: number | null | undefined;
|
|
867
|
+
userRolesLimit?: number | null | undefined;
|
|
868
|
+
machineToMachineRolesLimit?: number | null | undefined;
|
|
869
|
+
scopesPerRoleLimit?: number | null | undefined;
|
|
870
|
+
hooksLimit?: number | null | undefined;
|
|
871
|
+
customJwtEnabled?: boolean | undefined;
|
|
872
|
+
subjectTokenEnabled?: boolean | undefined;
|
|
873
|
+
bringYourUiEnabled?: boolean | undefined;
|
|
874
|
+
collectUserProfileEnabled?: boolean | undefined;
|
|
875
|
+
tokenLimit?: number | null | undefined;
|
|
876
|
+
machineToMachineLimit?: number | null | undefined;
|
|
877
|
+
resourcesLimit?: number | null | undefined;
|
|
878
|
+
enterpriseSsoLimit?: number | null | undefined;
|
|
879
|
+
tenantMembersLimit?: number | null | undefined;
|
|
880
|
+
mfaEnabled?: boolean | undefined;
|
|
881
|
+
organizationsEnabled?: boolean | undefined;
|
|
882
|
+
organizationsLimit?: number | null | undefined;
|
|
883
|
+
securityFeaturesEnabled?: boolean | undefined;
|
|
884
|
+
idpInitiatedSsoEnabled?: boolean | undefined;
|
|
885
|
+
samlApplicationsLimit?: number | null | undefined;
|
|
886
|
+
};
|
|
887
|
+
}>;
|
|
888
|
+
} & {
|
|
889
|
+
"/skus/:skuId/products": import("@withtyped/server").PathGuard<"/:skuId/products", {
|
|
890
|
+
isOneTime?: string | undefined;
|
|
891
|
+
}, {
|
|
892
|
+
name: string;
|
|
893
|
+
unitPrice: number;
|
|
894
|
+
}, {
|
|
895
|
+
productId: string;
|
|
896
|
+
}>;
|
|
897
|
+
} & {
|
|
898
|
+
"/skus/basic-sku-usage-add-on-relations": import("@withtyped/server").PathGuard<"/basic-sku-usage-add-on-relations", unknown, {
|
|
899
|
+
basicSkuId: string;
|
|
900
|
+
usageKey: "tokenLimit" | "machineToMachineLimit" | "resourcesLimit" | "enterpriseSsoLimit" | "hooksLimit" | "tenantMembersLimit" | "mfaEnabled" | "organizationsEnabled" | "organizationsLimit" | "securityFeaturesEnabled" | "userRolesLimit" | "machineToMachineRolesLimit" | "thirdPartyApplicationsLimit" | "samlApplicationsLimit";
|
|
901
|
+
addOnSkuId: string;
|
|
902
|
+
}, {
|
|
903
|
+
basicSkuId: string;
|
|
904
|
+
usageKey: "tokenLimit" | "machineToMachineLimit" | "resourcesLimit" | "enterpriseSsoLimit" | "hooksLimit" | "tenantMembersLimit" | "mfaEnabled" | "organizationsEnabled" | "organizationsLimit" | "securityFeaturesEnabled" | "userRolesLimit" | "machineToMachineRolesLimit" | "thirdPartyApplicationsLimit" | "samlApplicationsLimit";
|
|
905
|
+
addOnSkuId: string;
|
|
906
|
+
}>;
|
|
364
907
|
};
|
|
365
|
-
post: {};
|
|
366
908
|
put: {};
|
|
367
|
-
delete: {
|
|
909
|
+
delete: {
|
|
910
|
+
"/skus/:skuId": import("@withtyped/server").PathGuard<"/:skuId", unknown, unknown, unknown>;
|
|
911
|
+
} & {
|
|
912
|
+
"/skus/basic-sku-usage-add-on-relations/:basicSkuId/:usageKey": import("@withtyped/server").PathGuard<"/basic-sku-usage-add-on-relations/:basicSkuId/:usageKey", unknown, unknown, unknown>;
|
|
913
|
+
};
|
|
368
914
|
copy: {};
|
|
369
915
|
head: {};
|
|
370
916
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
@@ -378,17 +924,19 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
378
924
|
status: "open" | "complete" | "expired";
|
|
379
925
|
tenantId: string | null;
|
|
380
926
|
updatedAt: Date;
|
|
381
|
-
|
|
927
|
+
skuId: string | null;
|
|
928
|
+
planId: string | null;
|
|
382
929
|
}>;
|
|
383
930
|
};
|
|
384
931
|
post: {
|
|
385
932
|
"/checkout-session": import("@withtyped/server").PathGuard<"/", unknown, {
|
|
386
|
-
planId: string;
|
|
387
933
|
successCallbackUrl: string;
|
|
388
934
|
tenantId?: string | undefined;
|
|
389
|
-
|
|
390
|
-
tenantTag?: TenantTag | undefined;
|
|
935
|
+
skuId?: string | undefined;
|
|
391
936
|
tenantName?: string | undefined;
|
|
937
|
+
tenantTag?: TenantTag | undefined;
|
|
938
|
+
tenantRegionName?: string | undefined;
|
|
939
|
+
cancelCallbackUrl?: string | undefined;
|
|
392
940
|
}, {
|
|
393
941
|
sessionId: string;
|
|
394
942
|
redirectUri?: string | null | undefined;
|
|
@@ -472,15 +1020,15 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
472
1020
|
status: OrganizationInvitationStatus;
|
|
473
1021
|
tenantId: string;
|
|
474
1022
|
updatedAt: number;
|
|
475
|
-
organizationId: string;
|
|
476
1023
|
inviterId: string | null;
|
|
477
1024
|
invitee: string;
|
|
478
|
-
expiresAt: number;
|
|
479
1025
|
acceptedUserId: string | null;
|
|
1026
|
+
organizationId: string;
|
|
1027
|
+
expiresAt: number;
|
|
480
1028
|
organizationRoles: OrganizationRoleEntity[];
|
|
481
1029
|
} & {
|
|
482
|
-
tenantTag: TenantTag;
|
|
483
1030
|
tenantName: string;
|
|
1031
|
+
tenantTag: TenantTag;
|
|
484
1032
|
})[]>;
|
|
485
1033
|
} & {
|
|
486
1034
|
"/invitations/:invitationId": import("@withtyped/server").PathGuard<"/:invitationId", unknown, unknown, {
|
|
@@ -489,11 +1037,11 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
489
1037
|
status: OrganizationInvitationStatus;
|
|
490
1038
|
tenantId: string;
|
|
491
1039
|
updatedAt: number;
|
|
492
|
-
organizationId: string;
|
|
493
1040
|
inviterId: string | null;
|
|
494
1041
|
invitee: string;
|
|
495
|
-
expiresAt: number;
|
|
496
1042
|
acceptedUserId: string | null;
|
|
1043
|
+
organizationId: string;
|
|
1044
|
+
expiresAt: number;
|
|
497
1045
|
organizationRoles: OrganizationRoleEntity[];
|
|
498
1046
|
}>;
|
|
499
1047
|
};
|
|
@@ -502,9 +1050,21 @@ declare const router: import("@withtyped/server").Router<RequestContext, WithAut
|
|
|
502
1050
|
delete: {};
|
|
503
1051
|
copy: {};
|
|
504
1052
|
head: {};
|
|
1053
|
+
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
1054
|
+
patch: {};
|
|
1055
|
+
options: {};
|
|
1056
|
+
get: {};
|
|
1057
|
+
post: {};
|
|
1058
|
+
put: {};
|
|
1059
|
+
delete: {
|
|
1060
|
+
"/me": import("@withtyped/server").PathGuard<"/", unknown, unknown, unknown>;
|
|
1061
|
+
};
|
|
1062
|
+
copy: {};
|
|
1063
|
+
head: {};
|
|
505
1064
|
}, "/api">>, "/api">;
|
|
506
1065
|
export declare const tenantAuthRouter: import("@withtyped/server").Router<RequestContext, import("@withtyped/server").WithBodyContext<import("@withtyped/server").BaseContext & {
|
|
507
1066
|
request: {
|
|
1067
|
+
id?: string | undefined;
|
|
508
1068
|
method?: import("@withtyped/server").RequestMethod | undefined;
|
|
509
1069
|
headers: import("http").IncomingHttpHeaders;
|
|
510
1070
|
url: URL;
|
|
@@ -520,11 +1080,11 @@ export declare const tenantAuthRouter: import("@withtyped/server").Router<Reques
|
|
|
520
1080
|
status: OrganizationInvitationStatus;
|
|
521
1081
|
tenantId: string;
|
|
522
1082
|
updatedAt: number;
|
|
523
|
-
organizationId: string;
|
|
524
1083
|
inviterId: string | null;
|
|
525
1084
|
invitee: string;
|
|
526
|
-
expiresAt: number;
|
|
527
1085
|
acceptedUserId: string | null;
|
|
1086
|
+
organizationId: string;
|
|
1087
|
+
expiresAt: number;
|
|
528
1088
|
organizationRoles: OrganizationRoleEntity[];
|
|
529
1089
|
}>;
|
|
530
1090
|
};
|
|
@@ -540,23 +1100,27 @@ export declare const tenantAuthRouter: import("@withtyped/server").Router<Reques
|
|
|
540
1100
|
organizationRoles: OrganizationRoleEntity[];
|
|
541
1101
|
}[]>;
|
|
542
1102
|
} & {
|
|
543
|
-
"/:tenantId/
|
|
1103
|
+
"/:tenantId/members/:userId/scopes": import("@withtyped/server").PathGuard<"/:tenantId/members/:userId/scopes", unknown, unknown, OrganizationScope[]>;
|
|
1104
|
+
} & {
|
|
1105
|
+
"/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, unknown, ({
|
|
544
1106
|
id: string;
|
|
545
1107
|
createdAt: number;
|
|
546
1108
|
status: OrganizationInvitationStatus;
|
|
547
1109
|
tenantId: string;
|
|
548
1110
|
updatedAt: number;
|
|
549
|
-
organizationId: string;
|
|
550
1111
|
inviterId: string | null;
|
|
551
1112
|
invitee: string;
|
|
552
|
-
expiresAt: number;
|
|
553
1113
|
acceptedUserId: string | null;
|
|
1114
|
+
organizationId: string;
|
|
1115
|
+
expiresAt: number;
|
|
554
1116
|
organizationRoles: OrganizationRoleEntity[];
|
|
555
|
-
}
|
|
1117
|
+
} & {
|
|
1118
|
+
inviterName?: string | undefined;
|
|
1119
|
+
})[]>;
|
|
556
1120
|
};
|
|
557
1121
|
post: {
|
|
558
1122
|
"/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, {
|
|
559
|
-
invitee: string;
|
|
1123
|
+
invitee: string | string[];
|
|
560
1124
|
roleName: TenantRole;
|
|
561
1125
|
expiresAt?: number | undefined;
|
|
562
1126
|
}, {
|
|
@@ -565,13 +1129,25 @@ export declare const tenantAuthRouter: import("@withtyped/server").Router<Reques
|
|
|
565
1129
|
status: OrganizationInvitationStatus;
|
|
566
1130
|
tenantId: string;
|
|
567
1131
|
updatedAt: number;
|
|
568
|
-
organizationId: string;
|
|
569
1132
|
inviterId: string | null;
|
|
570
1133
|
invitee: string;
|
|
1134
|
+
acceptedUserId: string | null;
|
|
1135
|
+
organizationId: string;
|
|
571
1136
|
expiresAt: number;
|
|
1137
|
+
organizationRoles: OrganizationRoleEntity[];
|
|
1138
|
+
} | {
|
|
1139
|
+
id: string;
|
|
1140
|
+
createdAt: number;
|
|
1141
|
+
status: OrganizationInvitationStatus;
|
|
1142
|
+
tenantId: string;
|
|
1143
|
+
updatedAt: number;
|
|
1144
|
+
inviterId: string | null;
|
|
1145
|
+
invitee: string;
|
|
572
1146
|
acceptedUserId: string | null;
|
|
1147
|
+
organizationId: string;
|
|
1148
|
+
expiresAt: number;
|
|
573
1149
|
organizationRoles: OrganizationRoleEntity[];
|
|
574
|
-
}>;
|
|
1150
|
+
}[]>;
|
|
575
1151
|
} & {
|
|
576
1152
|
"/:tenantId/invitations/:invitationId/message": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId/message", unknown, unknown, unknown>;
|
|
577
1153
|
};
|
|
@@ -588,35 +1164,6 @@ export declare const tenantAuthRouter: import("@withtyped/server").Router<Reques
|
|
|
588
1164
|
copy: {};
|
|
589
1165
|
head: {};
|
|
590
1166
|
}, "/api/tenants">>, "/api/tenants">;
|
|
591
|
-
export declare const functionsRouter: import("@withtyped/server").Router<RequestContext, WithAuthContext<Omit<import("@withtyped/server").BaseContext & {
|
|
592
|
-
request: {
|
|
593
|
-
method?: import("@withtyped/server").RequestMethod | undefined;
|
|
594
|
-
headers: import("http").IncomingHttpHeaders;
|
|
595
|
-
url: URL;
|
|
596
|
-
body?: unknown;
|
|
597
|
-
};
|
|
598
|
-
}, "request"> & {
|
|
599
|
-
request: Record<string, unknown> & {
|
|
600
|
-
method?: import("@withtyped/server").RequestMethod | undefined;
|
|
601
|
-
headers: import("http").IncomingHttpHeaders;
|
|
602
|
-
url: URL;
|
|
603
|
-
body?: unknown;
|
|
604
|
-
} & {
|
|
605
|
-
body?: Json | undefined;
|
|
606
|
-
bodyRaw?: Buffer | undefined;
|
|
607
|
-
};
|
|
608
|
-
}>, import("@withtyped/server").MergeRoutes<import("@withtyped/server").BaseRoutes, import("@withtyped/server").RoutesWithPrefix<{
|
|
609
|
-
patch: {};
|
|
610
|
-
options: {};
|
|
611
|
-
get: {};
|
|
612
|
-
post: {
|
|
613
|
-
"/database-alteration": import("@withtyped/server").PathGuard<"/database-alteration", unknown, Json, unknown>;
|
|
614
|
-
};
|
|
615
|
-
put: {};
|
|
616
|
-
delete: {};
|
|
617
|
-
copy: {};
|
|
618
|
-
head: {};
|
|
619
|
-
}, "/functions">>, "/functions">;
|
|
620
1167
|
|
|
621
1168
|
export {
|
|
622
1169
|
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-8a3dff0",
|
|
4
4
|
"description": "Logto Cloud service.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"author": "Silverhand Inc. <contact@silverhand.io>",
|
|
@@ -16,24 +16,24 @@
|
|
|
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
|
-
"@types/node": "^
|
|
24
|
+
"@types/node": "^22.14.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
|
-
"vite-tsconfig-paths": "^
|
|
33
|
-
"vitest": "^1.
|
|
32
|
+
"vite-tsconfig-paths": "^5.0.0",
|
|
33
|
+
"vitest": "^3.1.1"
|
|
34
34
|
},
|
|
35
35
|
"engines": {
|
|
36
|
-
"node": "^
|
|
36
|
+
"node": "^22.14.0"
|
|
37
37
|
},
|
|
38
38
|
"eslintConfig": {
|
|
39
39
|
"extends": "@silverhand",
|
|
@@ -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",
|