@logto/cloud 0.2.5-c6ed487 → 0.2.5-c98a257
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 +789 -93
- package/package.json +12 -16
package/lib/routes/index.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
// Generated by dts-bundle-generator v9.
|
|
1
|
+
// Generated by dts-bundle-generator v9.3.1
|
|
2
2
|
|
|
3
|
-
import { RequestContext } from '@withtyped/server';
|
|
3
|
+
import { Json, JsonObject, RequestContext } from '@withtyped/server';
|
|
4
4
|
import { InferModelType } from '@withtyped/server/model';
|
|
5
5
|
|
|
6
6
|
export type WithAuthContext<Context = RequestContext> = Context & {
|
|
7
7
|
auth: {
|
|
8
|
+
/** The ID of the authenticated subject (`sub`). */
|
|
8
9
|
id: string;
|
|
10
|
+
/** The scopes that the subject has (`scope`). */
|
|
9
11
|
scopes: string[];
|
|
10
12
|
};
|
|
11
13
|
};
|
|
@@ -14,13 +16,82 @@ declare enum VerificationCodeType {
|
|
|
14
16
|
Register = "Register",
|
|
15
17
|
ForgotPassword = "ForgotPassword",
|
|
16
18
|
Generic = "Generic",
|
|
19
|
+
UserPermissionValidation = "UserPermissionValidation",
|
|
20
|
+
BindNewIdentifier = "BindNewIdentifier",
|
|
17
21
|
/** @deprecated Use `Generic` type template for sending test sms/email use case */
|
|
18
22
|
Test = "Test"
|
|
19
23
|
}
|
|
24
|
+
declare enum TemplateType {
|
|
25
|
+
/** The template for sending verification code when user is signing in. */
|
|
26
|
+
SignIn = "SignIn",
|
|
27
|
+
/** The template for sending verification code when user is registering. */
|
|
28
|
+
Register = "Register",
|
|
29
|
+
/** The template for sending verification code when user is resetting password. */
|
|
30
|
+
ForgotPassword = "ForgotPassword",
|
|
31
|
+
/** The template for sending organization invitation. */
|
|
32
|
+
OrganizationInvitation = "OrganizationInvitation",
|
|
33
|
+
/** The template for generic usage. */
|
|
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"
|
|
39
|
+
}
|
|
40
|
+
declare enum OrganizationInvitationStatus {
|
|
41
|
+
Pending = "Pending",
|
|
42
|
+
Accepted = "Accepted",
|
|
43
|
+
Expired = "Expired",
|
|
44
|
+
Revoked = "Revoked"
|
|
45
|
+
}
|
|
46
|
+
/** The scopes (permissions) defined by the organization template. */
|
|
47
|
+
export type OrganizationScope = {
|
|
48
|
+
tenantId: string;
|
|
49
|
+
/** The globally unique identifier of the organization scope. */
|
|
50
|
+
id: string;
|
|
51
|
+
/** The organization scope's name, unique within the organization template. */
|
|
52
|
+
name: string;
|
|
53
|
+
/** A brief description of the organization scope. */
|
|
54
|
+
description: string | null;
|
|
55
|
+
};
|
|
56
|
+
declare enum LogtoJwtTokenKeyType {
|
|
57
|
+
AccessToken = "access-token",
|
|
58
|
+
ClientCredentials = "client-credentials"
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* The simplified organization role entity that is returned in the `roles` field
|
|
62
|
+
* of the organization.
|
|
63
|
+
*/
|
|
64
|
+
export type OrganizationRoleEntity = {
|
|
65
|
+
id: string;
|
|
66
|
+
name: string;
|
|
67
|
+
};
|
|
20
68
|
declare enum TenantTag {
|
|
21
69
|
Development = "development",
|
|
22
70
|
Production = "production"
|
|
23
71
|
}
|
|
72
|
+
declare enum TenantRole {
|
|
73
|
+
/** Admin of the tenant, who has all permissions. */
|
|
74
|
+
Admin = "admin",
|
|
75
|
+
/** Collaborator of the tenant, who has permissions to operate the tenant data, but not the tenant settings. */
|
|
76
|
+
Collaborator = "collaborator"
|
|
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
|
+
}
|
|
24
95
|
declare const AffiliateProperties: import("@withtyped/server/lib/model/index.js").default<"affiliate_properties", {
|
|
25
96
|
createdAt: Date;
|
|
26
97
|
affiliateId: string;
|
|
@@ -29,25 +100,52 @@ declare const AffiliateProperties: import("@withtyped/server/lib/model/index.js"
|
|
|
29
100
|
}, "createdAt", "createdAt">;
|
|
30
101
|
export type AffiliateProperty = InferModelType<typeof AffiliateProperties>;
|
|
31
102
|
declare const Affiliates: import("@withtyped/server/lib/model/index.js").default<"affiliates", {
|
|
32
|
-
id: string;
|
|
33
|
-
createdAt: Date;
|
|
34
103
|
name: string;
|
|
35
|
-
|
|
104
|
+
createdAt: Date;
|
|
105
|
+
id: string;
|
|
106
|
+
}, "id" | "createdAt", "id" | "createdAt">;
|
|
36
107
|
export type Affiliate = InferModelType<typeof Affiliates>;
|
|
108
|
+
declare enum RegionName {
|
|
109
|
+
EU = "EU",
|
|
110
|
+
US = "US",
|
|
111
|
+
AU = "AU"
|
|
112
|
+
}
|
|
37
113
|
export type AffiliateData = Affiliate & {
|
|
38
114
|
properties: Array<Pick<AffiliateProperty, "type" | "value">>;
|
|
39
115
|
};
|
|
40
|
-
declare const router: import("@withtyped/server").Router<
|
|
41
|
-
|
|
116
|
+
declare const router: import("@withtyped/server").Router<RequestContext, WithAuthContext<Omit<import("@withtyped/server").BaseContext & {
|
|
117
|
+
request: {
|
|
118
|
+
id?: string | undefined;
|
|
119
|
+
method?: import("@withtyped/server").RequestMethod | undefined;
|
|
120
|
+
headers: import("http").IncomingHttpHeaders;
|
|
121
|
+
url: URL;
|
|
122
|
+
body?: unknown;
|
|
123
|
+
};
|
|
124
|
+
}, "request"> & {
|
|
125
|
+
request: Record<string, unknown> & {
|
|
126
|
+
id?: string | undefined;
|
|
127
|
+
method?: import("@withtyped/server").RequestMethod | undefined;
|
|
128
|
+
headers: import("http").IncomingHttpHeaders;
|
|
129
|
+
url: URL;
|
|
130
|
+
body?: unknown;
|
|
131
|
+
} & {
|
|
132
|
+
body?: Json | undefined;
|
|
133
|
+
bodyRaw?: Buffer | undefined;
|
|
134
|
+
};
|
|
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<{
|
|
42
136
|
patch: {
|
|
43
137
|
"/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, {
|
|
44
138
|
name?: string | undefined;
|
|
45
139
|
}, {
|
|
46
140
|
id: string;
|
|
47
141
|
name: string;
|
|
142
|
+
createdAt: Date;
|
|
143
|
+
quota: {
|
|
144
|
+
mauLimit: number | null;
|
|
145
|
+
tokenLimit: number | null;
|
|
146
|
+
};
|
|
48
147
|
usage: {
|
|
49
148
|
activeUsers: number;
|
|
50
|
-
cost: number;
|
|
51
149
|
tokenUsage: number;
|
|
52
150
|
};
|
|
53
151
|
indicator: string;
|
|
@@ -58,12 +156,21 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
58
156
|
planId: string;
|
|
59
157
|
currentPeriodStart: Date;
|
|
60
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;
|
|
61
167
|
};
|
|
168
|
+
regionName: RegionName;
|
|
62
169
|
tag: TenantTag;
|
|
63
170
|
openInvoices: {
|
|
64
|
-
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
65
|
-
createdAt: Date;
|
|
66
171
|
id: string;
|
|
172
|
+
createdAt: Date;
|
|
173
|
+
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
67
174
|
updatedAt: Date;
|
|
68
175
|
customerId: string | null;
|
|
69
176
|
billingReason: string | null;
|
|
@@ -71,19 +178,25 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
71
178
|
periodEnd: Date;
|
|
72
179
|
amountDue: number;
|
|
73
180
|
amountPaid: number;
|
|
181
|
+
basicSkuId: string | null;
|
|
74
182
|
subscriptionId: string | null;
|
|
75
183
|
hostedInvoiceUrl: string | null;
|
|
76
184
|
invoicePdf: string | null;
|
|
77
185
|
}[];
|
|
78
186
|
}>;
|
|
79
187
|
};
|
|
188
|
+
options: {};
|
|
80
189
|
get: {
|
|
81
190
|
"/tenants": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
|
|
82
191
|
id: string;
|
|
83
192
|
name: string;
|
|
193
|
+
createdAt: Date;
|
|
194
|
+
quota: {
|
|
195
|
+
mauLimit: number | null;
|
|
196
|
+
tokenLimit: number | null;
|
|
197
|
+
};
|
|
84
198
|
usage: {
|
|
85
199
|
activeUsers: number;
|
|
86
|
-
cost: number;
|
|
87
200
|
tokenUsage: number;
|
|
88
201
|
};
|
|
89
202
|
indicator: string;
|
|
@@ -94,12 +207,21 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
94
207
|
planId: string;
|
|
95
208
|
currentPeriodStart: Date;
|
|
96
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;
|
|
97
218
|
};
|
|
219
|
+
regionName: RegionName;
|
|
98
220
|
tag: TenantTag;
|
|
99
221
|
openInvoices: {
|
|
100
|
-
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
101
|
-
createdAt: Date;
|
|
102
222
|
id: string;
|
|
223
|
+
createdAt: Date;
|
|
224
|
+
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
103
225
|
updatedAt: Date;
|
|
104
226
|
customerId: string | null;
|
|
105
227
|
billingReason: string | null;
|
|
@@ -107,6 +229,7 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
107
229
|
periodEnd: Date;
|
|
108
230
|
amountDue: number;
|
|
109
231
|
amountPaid: number;
|
|
232
|
+
basicSkuId: string | null;
|
|
110
233
|
subscriptionId: string | null;
|
|
111
234
|
hostedInvoiceUrl: string | null;
|
|
112
235
|
invoicePdf: string | null;
|
|
@@ -117,12 +240,17 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
117
240
|
"/tenants": import("@withtyped/server").PathGuard<"/", unknown, {
|
|
118
241
|
name?: string | undefined;
|
|
119
242
|
tag?: TenantTag | undefined;
|
|
243
|
+
regionName?: RegionName | undefined;
|
|
120
244
|
}, {
|
|
121
245
|
id: string;
|
|
122
246
|
name: string;
|
|
247
|
+
createdAt: Date;
|
|
248
|
+
quota: {
|
|
249
|
+
mauLimit: number | null;
|
|
250
|
+
tokenLimit: number | null;
|
|
251
|
+
};
|
|
123
252
|
usage: {
|
|
124
253
|
activeUsers: number;
|
|
125
|
-
cost: number;
|
|
126
254
|
tokenUsage: number;
|
|
127
255
|
};
|
|
128
256
|
indicator: string;
|
|
@@ -133,12 +261,21 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
133
261
|
planId: string;
|
|
134
262
|
currentPeriodStart: Date;
|
|
135
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;
|
|
136
272
|
};
|
|
273
|
+
regionName: RegionName;
|
|
137
274
|
tag: TenantTag;
|
|
138
275
|
openInvoices: {
|
|
139
|
-
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
140
|
-
createdAt: Date;
|
|
141
276
|
id: string;
|
|
277
|
+
createdAt: Date;
|
|
278
|
+
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
142
279
|
updatedAt: Date;
|
|
143
280
|
customerId: string | null;
|
|
144
281
|
billingReason: string | null;
|
|
@@ -146,6 +283,7 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
146
283
|
periodEnd: Date;
|
|
147
284
|
amountDue: number;
|
|
148
285
|
amountPaid: number;
|
|
286
|
+
basicSkuId: string | null;
|
|
149
287
|
subscriptionId: string | null;
|
|
150
288
|
hostedInvoiceUrl: string | null;
|
|
151
289
|
invoicePdf: string | null;
|
|
@@ -159,28 +297,281 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
159
297
|
copy: {};
|
|
160
298
|
head: {};
|
|
161
299
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
162
|
-
options: {};
|
|
163
300
|
patch: {};
|
|
301
|
+
options: {};
|
|
164
302
|
get: {
|
|
165
303
|
"/tenants/my/subscription": import("@withtyped/server").PathGuard<"/my/subscription", unknown, unknown, {
|
|
166
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
|
+
samlApplicationsLimit: number | null;
|
|
329
|
+
};
|
|
167
330
|
planId: string;
|
|
168
331
|
currentPeriodStart: Date;
|
|
169
332
|
currentPeriodEnd: Date;
|
|
333
|
+
isEnterprisePlan: boolean;
|
|
334
|
+
id?: string | undefined;
|
|
335
|
+
upcomingInvoice?: {
|
|
336
|
+
subtotal: number;
|
|
337
|
+
subtotalExcludingTax: number | null;
|
|
338
|
+
total: number;
|
|
339
|
+
totalExcludingTax: number | null;
|
|
340
|
+
} | null | undefined;
|
|
170
341
|
}>;
|
|
171
342
|
} & {
|
|
343
|
+
"/tenants/my/subscription-usage": import("@withtyped/server").PathGuard<"/my/subscription-usage", unknown, unknown, {
|
|
344
|
+
usage: {
|
|
345
|
+
applicationsLimit: number;
|
|
346
|
+
thirdPartyApplicationsLimit: number;
|
|
347
|
+
scopesPerResourceLimit: number;
|
|
348
|
+
socialConnectorsLimit: number;
|
|
349
|
+
userRolesLimit: number;
|
|
350
|
+
machineToMachineRolesLimit: number;
|
|
351
|
+
scopesPerRoleLimit: number;
|
|
352
|
+
hooksLimit: number;
|
|
353
|
+
customJwtEnabled: boolean;
|
|
354
|
+
subjectTokenEnabled: boolean;
|
|
355
|
+
bringYourUiEnabled: boolean;
|
|
356
|
+
machineToMachineLimit: number;
|
|
357
|
+
resourcesLimit: number;
|
|
358
|
+
enterpriseSsoLimit: number;
|
|
359
|
+
tenantMembersLimit: number;
|
|
360
|
+
mfaEnabled: boolean;
|
|
361
|
+
organizationsEnabled: boolean;
|
|
362
|
+
organizationsLimit: number;
|
|
363
|
+
idpInitiatedSsoEnabled: boolean;
|
|
364
|
+
samlApplicationsLimit: number;
|
|
365
|
+
};
|
|
366
|
+
resources: Record<string, number>;
|
|
367
|
+
roles: Record<string, number>;
|
|
368
|
+
quota: {
|
|
369
|
+
auditLogsRetentionDays: number | null;
|
|
370
|
+
mauLimit: number | null;
|
|
371
|
+
applicationsLimit: number | null;
|
|
372
|
+
thirdPartyApplicationsLimit: number | null;
|
|
373
|
+
scopesPerResourceLimit: number | null;
|
|
374
|
+
socialConnectorsLimit: number | null;
|
|
375
|
+
userRolesLimit: number | null;
|
|
376
|
+
machineToMachineRolesLimit: number | null;
|
|
377
|
+
scopesPerRoleLimit: number | null;
|
|
378
|
+
hooksLimit: number | null;
|
|
379
|
+
customJwtEnabled: boolean;
|
|
380
|
+
subjectTokenEnabled: boolean;
|
|
381
|
+
bringYourUiEnabled: boolean;
|
|
382
|
+
tokenLimit: number | null;
|
|
383
|
+
machineToMachineLimit: number | null;
|
|
384
|
+
resourcesLimit: number | null;
|
|
385
|
+
enterpriseSsoLimit: number | null;
|
|
386
|
+
tenantMembersLimit: number | null;
|
|
387
|
+
mfaEnabled: boolean;
|
|
388
|
+
organizationsEnabled: boolean;
|
|
389
|
+
organizationsLimit: number | null;
|
|
390
|
+
idpInitiatedSsoEnabled: boolean;
|
|
391
|
+
samlApplicationsLimit: number | null;
|
|
392
|
+
};
|
|
393
|
+
basicQuota: {
|
|
394
|
+
auditLogsRetentionDays: number | null;
|
|
395
|
+
mauLimit: number | null;
|
|
396
|
+
applicationsLimit: number | null;
|
|
397
|
+
thirdPartyApplicationsLimit: number | null;
|
|
398
|
+
scopesPerResourceLimit: number | null;
|
|
399
|
+
socialConnectorsLimit: number | null;
|
|
400
|
+
userRolesLimit: number | null;
|
|
401
|
+
machineToMachineRolesLimit: number | null;
|
|
402
|
+
scopesPerRoleLimit: number | null;
|
|
403
|
+
hooksLimit: number | null;
|
|
404
|
+
customJwtEnabled: boolean;
|
|
405
|
+
subjectTokenEnabled: boolean;
|
|
406
|
+
bringYourUiEnabled: boolean;
|
|
407
|
+
tokenLimit: number | null;
|
|
408
|
+
machineToMachineLimit: number | null;
|
|
409
|
+
resourcesLimit: number | null;
|
|
410
|
+
enterpriseSsoLimit: number | null;
|
|
411
|
+
tenantMembersLimit: number | null;
|
|
412
|
+
mfaEnabled: boolean;
|
|
413
|
+
organizationsEnabled: boolean;
|
|
414
|
+
organizationsLimit: number | null;
|
|
415
|
+
idpInitiatedSsoEnabled: boolean;
|
|
416
|
+
samlApplicationsLimit: number | null;
|
|
417
|
+
};
|
|
418
|
+
}>;
|
|
419
|
+
};
|
|
420
|
+
post: {
|
|
421
|
+
"/tenants/my/subscription/item-updates": import("@withtyped/server").PathGuard<"/my/subscription/item-updates", unknown, {
|
|
422
|
+
usageKey: RealtimeReportableUsageKey;
|
|
423
|
+
}, {
|
|
424
|
+
message: string;
|
|
425
|
+
}>;
|
|
426
|
+
};
|
|
427
|
+
put: {};
|
|
428
|
+
delete: {};
|
|
429
|
+
copy: {};
|
|
430
|
+
head: {};
|
|
431
|
+
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
432
|
+
patch: {};
|
|
433
|
+
options: {};
|
|
434
|
+
get: {
|
|
172
435
|
"/tenants/:tenantId/subscription": import("@withtyped/server").PathGuard<"/:tenantId/subscription", unknown, unknown, {
|
|
173
436
|
status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
|
|
174
437
|
planId: string;
|
|
175
438
|
currentPeriodStart: Date;
|
|
176
439
|
currentPeriodEnd: Date;
|
|
440
|
+
isEnterprisePlan: boolean;
|
|
441
|
+
id?: string | undefined;
|
|
442
|
+
upcomingInvoice?: {
|
|
443
|
+
subtotal: number;
|
|
444
|
+
subtotalExcludingTax: number | null;
|
|
445
|
+
total: number;
|
|
446
|
+
totalExcludingTax: number | null;
|
|
447
|
+
} | null | undefined;
|
|
448
|
+
}>;
|
|
449
|
+
} & {
|
|
450
|
+
"/tenants/:tenantId/subscription-usage": import("@withtyped/server").PathGuard<"/:tenantId/subscription-usage", unknown, unknown, {
|
|
451
|
+
usage: {
|
|
452
|
+
applicationsLimit: number;
|
|
453
|
+
thirdPartyApplicationsLimit: number;
|
|
454
|
+
scopesPerResourceLimit: number;
|
|
455
|
+
socialConnectorsLimit: number;
|
|
456
|
+
userRolesLimit: number;
|
|
457
|
+
machineToMachineRolesLimit: number;
|
|
458
|
+
scopesPerRoleLimit: number;
|
|
459
|
+
hooksLimit: number;
|
|
460
|
+
customJwtEnabled: boolean;
|
|
461
|
+
subjectTokenEnabled: boolean;
|
|
462
|
+
bringYourUiEnabled: boolean;
|
|
463
|
+
machineToMachineLimit: number;
|
|
464
|
+
resourcesLimit: number;
|
|
465
|
+
enterpriseSsoLimit: number;
|
|
466
|
+
tenantMembersLimit: number;
|
|
467
|
+
mfaEnabled: boolean;
|
|
468
|
+
organizationsEnabled: boolean;
|
|
469
|
+
organizationsLimit: number;
|
|
470
|
+
idpInitiatedSsoEnabled: boolean;
|
|
471
|
+
samlApplicationsLimit: number;
|
|
472
|
+
};
|
|
473
|
+
resources: Record<string, number>;
|
|
474
|
+
roles: Record<string, number>;
|
|
475
|
+
quota: {
|
|
476
|
+
auditLogsRetentionDays: number | null;
|
|
477
|
+
mauLimit: number | null;
|
|
478
|
+
applicationsLimit: number | null;
|
|
479
|
+
thirdPartyApplicationsLimit: number | null;
|
|
480
|
+
scopesPerResourceLimit: number | null;
|
|
481
|
+
socialConnectorsLimit: number | null;
|
|
482
|
+
userRolesLimit: number | null;
|
|
483
|
+
machineToMachineRolesLimit: number | null;
|
|
484
|
+
scopesPerRoleLimit: number | null;
|
|
485
|
+
hooksLimit: number | null;
|
|
486
|
+
customJwtEnabled: boolean;
|
|
487
|
+
subjectTokenEnabled: boolean;
|
|
488
|
+
bringYourUiEnabled: boolean;
|
|
489
|
+
tokenLimit: number | null;
|
|
490
|
+
machineToMachineLimit: number | null;
|
|
491
|
+
resourcesLimit: number | null;
|
|
492
|
+
enterpriseSsoLimit: number | null;
|
|
493
|
+
tenantMembersLimit: number | null;
|
|
494
|
+
mfaEnabled: boolean;
|
|
495
|
+
organizationsEnabled: boolean;
|
|
496
|
+
organizationsLimit: number | null;
|
|
497
|
+
idpInitiatedSsoEnabled: boolean;
|
|
498
|
+
samlApplicationsLimit: number | null;
|
|
499
|
+
};
|
|
500
|
+
basicQuota: {
|
|
501
|
+
auditLogsRetentionDays: number | null;
|
|
502
|
+
mauLimit: number | null;
|
|
503
|
+
applicationsLimit: number | null;
|
|
504
|
+
thirdPartyApplicationsLimit: number | null;
|
|
505
|
+
scopesPerResourceLimit: number | null;
|
|
506
|
+
socialConnectorsLimit: number | null;
|
|
507
|
+
userRolesLimit: number | null;
|
|
508
|
+
machineToMachineRolesLimit: number | null;
|
|
509
|
+
scopesPerRoleLimit: number | null;
|
|
510
|
+
hooksLimit: number | null;
|
|
511
|
+
customJwtEnabled: boolean;
|
|
512
|
+
subjectTokenEnabled: boolean;
|
|
513
|
+
bringYourUiEnabled: boolean;
|
|
514
|
+
tokenLimit: number | null;
|
|
515
|
+
machineToMachineLimit: number | null;
|
|
516
|
+
resourcesLimit: number | null;
|
|
517
|
+
enterpriseSsoLimit: number | null;
|
|
518
|
+
tenantMembersLimit: number | null;
|
|
519
|
+
mfaEnabled: boolean;
|
|
520
|
+
organizationsEnabled: boolean;
|
|
521
|
+
organizationsLimit: number | null;
|
|
522
|
+
idpInitiatedSsoEnabled: boolean;
|
|
523
|
+
samlApplicationsLimit: 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;
|
|
530
|
+
}>;
|
|
531
|
+
} & {
|
|
532
|
+
"/tenants/:tenantId/subscription/add-on-skus": import("@withtyped/server").PathGuard<"/:tenantId/subscription/add-on-skus", unknown, unknown, {
|
|
533
|
+
tokenLimit?: {
|
|
534
|
+
id: string;
|
|
535
|
+
name: string | null;
|
|
536
|
+
createdAt: Date;
|
|
537
|
+
defaultPriceId: string | null;
|
|
538
|
+
unitPrice: number | null;
|
|
539
|
+
type: LogtoSkuType;
|
|
540
|
+
quota: {
|
|
541
|
+
auditLogsRetentionDays?: number | null | undefined;
|
|
542
|
+
mauLimit?: number | null | undefined;
|
|
543
|
+
applicationsLimit?: number | null | undefined;
|
|
544
|
+
thirdPartyApplicationsLimit?: number | null | undefined;
|
|
545
|
+
scopesPerResourceLimit?: number | null | undefined;
|
|
546
|
+
socialConnectorsLimit?: number | null | undefined;
|
|
547
|
+
userRolesLimit?: number | null | undefined;
|
|
548
|
+
machineToMachineRolesLimit?: number | null | undefined;
|
|
549
|
+
scopesPerRoleLimit?: number | null | undefined;
|
|
550
|
+
hooksLimit?: number | null | undefined;
|
|
551
|
+
customJwtEnabled?: boolean | undefined;
|
|
552
|
+
subjectTokenEnabled?: boolean | undefined;
|
|
553
|
+
bringYourUiEnabled?: boolean | undefined;
|
|
554
|
+
tokenLimit?: number | null | undefined;
|
|
555
|
+
machineToMachineLimit?: number | null | undefined;
|
|
556
|
+
resourcesLimit?: number | null | undefined;
|
|
557
|
+
enterpriseSsoLimit?: number | null | undefined;
|
|
558
|
+
tenantMembersLimit?: number | null | undefined;
|
|
559
|
+
mfaEnabled?: boolean | undefined;
|
|
560
|
+
organizationsEnabled?: boolean | undefined;
|
|
561
|
+
organizationsLimit?: number | null | undefined;
|
|
562
|
+
idpInitiatedSsoEnabled?: boolean | undefined;
|
|
563
|
+
samlApplicationsLimit?: number | null | undefined;
|
|
564
|
+
};
|
|
565
|
+
updatedAt: Date;
|
|
566
|
+
productId: string | null;
|
|
567
|
+
} | undefined;
|
|
177
568
|
}>;
|
|
178
569
|
} & {
|
|
179
570
|
"/tenants/:tenantId/invoices": import("@withtyped/server").PathGuard<"/:tenantId/invoices", unknown, unknown, {
|
|
180
571
|
invoices: {
|
|
181
|
-
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
182
|
-
createdAt: Date;
|
|
183
572
|
id: string;
|
|
573
|
+
createdAt: Date;
|
|
574
|
+
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
184
575
|
updatedAt: Date;
|
|
185
576
|
customerId: string | null;
|
|
186
577
|
billingReason: string | null;
|
|
@@ -188,22 +579,56 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
188
579
|
periodEnd: Date;
|
|
189
580
|
amountDue: number;
|
|
190
581
|
amountPaid: number;
|
|
582
|
+
basicSkuId: string | null;
|
|
191
583
|
subscriptionId: string | null;
|
|
192
584
|
hostedInvoiceUrl: string | null;
|
|
193
585
|
invoicePdf: string | null;
|
|
194
586
|
planName: string | null;
|
|
587
|
+
skuId?: string | null | undefined;
|
|
195
588
|
}[];
|
|
196
589
|
}>;
|
|
590
|
+
} & {
|
|
591
|
+
"/tenants/:tenantId/available-skus": import("@withtyped/server").PathGuard<"/:tenantId/available-skus", {
|
|
592
|
+
type?: LogtoSkuType | undefined;
|
|
593
|
+
}, unknown, {
|
|
594
|
+
id: string;
|
|
595
|
+
name: string | null;
|
|
596
|
+
createdAt: Date;
|
|
597
|
+
defaultPriceId: string | null;
|
|
598
|
+
unitPrice: number | null;
|
|
599
|
+
type: LogtoSkuType;
|
|
600
|
+
quota: {
|
|
601
|
+
auditLogsRetentionDays?: number | null | undefined;
|
|
602
|
+
mauLimit?: number | null | undefined;
|
|
603
|
+
applicationsLimit?: number | null | undefined;
|
|
604
|
+
thirdPartyApplicationsLimit?: number | null | undefined;
|
|
605
|
+
scopesPerResourceLimit?: number | null | undefined;
|
|
606
|
+
socialConnectorsLimit?: number | null | undefined;
|
|
607
|
+
userRolesLimit?: number | null | undefined;
|
|
608
|
+
machineToMachineRolesLimit?: number | null | undefined;
|
|
609
|
+
scopesPerRoleLimit?: number | null | undefined;
|
|
610
|
+
hooksLimit?: number | null | undefined;
|
|
611
|
+
customJwtEnabled?: boolean | undefined;
|
|
612
|
+
subjectTokenEnabled?: boolean | undefined;
|
|
613
|
+
bringYourUiEnabled?: boolean | undefined;
|
|
614
|
+
tokenLimit?: number | null | undefined;
|
|
615
|
+
machineToMachineLimit?: number | null | undefined;
|
|
616
|
+
resourcesLimit?: number | null | undefined;
|
|
617
|
+
enterpriseSsoLimit?: number | null | undefined;
|
|
618
|
+
tenantMembersLimit?: number | null | undefined;
|
|
619
|
+
mfaEnabled?: boolean | undefined;
|
|
620
|
+
organizationsEnabled?: boolean | undefined;
|
|
621
|
+
organizationsLimit?: number | null | undefined;
|
|
622
|
+
idpInitiatedSsoEnabled?: boolean | undefined;
|
|
623
|
+
samlApplicationsLimit?: number | null | undefined;
|
|
624
|
+
};
|
|
625
|
+
updatedAt: Date;
|
|
626
|
+
productId: string | null;
|
|
627
|
+
}[]>;
|
|
197
628
|
} & {
|
|
198
629
|
"/tenants/:tenantId/invoices/:invoiceId/hosted-invoice-url": import("@withtyped/server").PathGuard<"/:tenantId/invoices/:invoiceId/hosted-invoice-url", unknown, unknown, {
|
|
199
630
|
hostedInvoiceUrl: string;
|
|
200
631
|
}>;
|
|
201
|
-
} & {
|
|
202
|
-
"/tenants/:tenantId/usage": import("@withtyped/server").PathGuard<"/:tenantId/usage", unknown, unknown, {
|
|
203
|
-
activeUsers: number;
|
|
204
|
-
cost: number;
|
|
205
|
-
tokenUsage: number;
|
|
206
|
-
}>;
|
|
207
632
|
};
|
|
208
633
|
post: {
|
|
209
634
|
"/tenants/:tenantId/stripe-customer-portal": import("@withtyped/server").PathGuard<"/:tenantId/stripe-customer-portal", unknown, {
|
|
@@ -219,8 +644,8 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
219
644
|
copy: {};
|
|
220
645
|
head: {};
|
|
221
646
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
222
|
-
options: {};
|
|
223
647
|
patch: {};
|
|
648
|
+
options: {};
|
|
224
649
|
get: {
|
|
225
650
|
"/services/mails/usage": import("@withtyped/server").PathGuard<"/mails/usage", {
|
|
226
651
|
from?: string | undefined;
|
|
@@ -231,9 +656,11 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
231
656
|
post: {
|
|
232
657
|
"/services/mails": import("@withtyped/server").PathGuard<"/mails", unknown, {
|
|
233
658
|
data: {
|
|
234
|
-
type: VerificationCodeType;
|
|
659
|
+
type: TemplateType | VerificationCodeType;
|
|
235
660
|
payload: {
|
|
236
|
-
code
|
|
661
|
+
code?: string | undefined;
|
|
662
|
+
link?: string | undefined;
|
|
663
|
+
} & Record<string, string> & {
|
|
237
664
|
senderName?: string | undefined;
|
|
238
665
|
companyInformation?: string | undefined;
|
|
239
666
|
appLogo?: string | undefined;
|
|
@@ -244,106 +671,218 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
244
671
|
} & {
|
|
245
672
|
"/services/send-sms": import("@withtyped/server").PathGuard<"/send-sms", unknown, {
|
|
246
673
|
data: {
|
|
247
|
-
type: VerificationCodeType;
|
|
674
|
+
type: TemplateType | VerificationCodeType;
|
|
248
675
|
to: string;
|
|
249
676
|
payload: {
|
|
250
|
-
code
|
|
251
|
-
|
|
677
|
+
code?: string | undefined;
|
|
678
|
+
link?: string | undefined;
|
|
679
|
+
} & Record<string, string>;
|
|
252
680
|
};
|
|
253
681
|
}, unknown>;
|
|
682
|
+
} & {
|
|
683
|
+
"/services/custom-jwt": import("@withtyped/server").PathGuard<"/custom-jwt", {
|
|
684
|
+
isTest?: string | undefined;
|
|
685
|
+
}, {
|
|
686
|
+
context: Record<string, Json>;
|
|
687
|
+
script: string;
|
|
688
|
+
tokenType: LogtoJwtTokenKeyType.AccessToken;
|
|
689
|
+
token: Record<string, Json>;
|
|
690
|
+
environmentVariables?: Record<string, string> | undefined;
|
|
691
|
+
} | {
|
|
692
|
+
script: string;
|
|
693
|
+
tokenType: LogtoJwtTokenKeyType.ClientCredentials;
|
|
694
|
+
token: Record<string, Json>;
|
|
695
|
+
environmentVariables?: Record<string, string> | undefined;
|
|
696
|
+
}, Record<string, unknown>>;
|
|
697
|
+
};
|
|
698
|
+
put: {
|
|
699
|
+
"/services/custom-jwt/worker": import("@withtyped/server").PathGuard<"/custom-jwt/worker", unknown, {
|
|
700
|
+
"jwt.accessToken"?: {
|
|
701
|
+
production?: string | undefined;
|
|
702
|
+
test?: string | undefined;
|
|
703
|
+
} | undefined;
|
|
704
|
+
"jwt.clientCredentials"?: {
|
|
705
|
+
production?: string | undefined;
|
|
706
|
+
test?: string | undefined;
|
|
707
|
+
} | undefined;
|
|
708
|
+
}, unknown>;
|
|
709
|
+
};
|
|
710
|
+
delete: {
|
|
711
|
+
"/services/custom-jwt/worker": import("@withtyped/server").PathGuard<"/custom-jwt/worker", unknown, unknown, unknown>;
|
|
254
712
|
};
|
|
255
|
-
put: {};
|
|
256
|
-
delete: {};
|
|
257
713
|
copy: {};
|
|
258
714
|
head: {};
|
|
259
715
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
260
|
-
options: {};
|
|
261
716
|
patch: {};
|
|
717
|
+
options: {};
|
|
262
718
|
get: {
|
|
263
|
-
"/
|
|
264
|
-
|
|
719
|
+
"/skus": import("@withtyped/server").PathGuard<"/", {
|
|
720
|
+
type?: LogtoSkuType | undefined;
|
|
721
|
+
}, unknown, {
|
|
265
722
|
id: string;
|
|
266
|
-
name: string;
|
|
723
|
+
name: string | null;
|
|
724
|
+
createdAt: Date;
|
|
725
|
+
defaultPriceId: string | null;
|
|
726
|
+
unitPrice: number | null;
|
|
727
|
+
type: LogtoSkuType;
|
|
728
|
+
quota: {
|
|
729
|
+
auditLogsRetentionDays?: number | null | undefined;
|
|
730
|
+
mauLimit?: number | null | undefined;
|
|
731
|
+
applicationsLimit?: number | null | undefined;
|
|
732
|
+
thirdPartyApplicationsLimit?: number | null | undefined;
|
|
733
|
+
scopesPerResourceLimit?: number | null | undefined;
|
|
734
|
+
socialConnectorsLimit?: number | null | undefined;
|
|
735
|
+
userRolesLimit?: number | null | undefined;
|
|
736
|
+
machineToMachineRolesLimit?: number | null | undefined;
|
|
737
|
+
scopesPerRoleLimit?: number | null | undefined;
|
|
738
|
+
hooksLimit?: number | null | undefined;
|
|
739
|
+
customJwtEnabled?: boolean | undefined;
|
|
740
|
+
subjectTokenEnabled?: boolean | undefined;
|
|
741
|
+
bringYourUiEnabled?: boolean | undefined;
|
|
742
|
+
tokenLimit?: number | null | undefined;
|
|
743
|
+
machineToMachineLimit?: number | null | undefined;
|
|
744
|
+
resourcesLimit?: number | null | undefined;
|
|
745
|
+
enterpriseSsoLimit?: number | null | undefined;
|
|
746
|
+
tenantMembersLimit?: number | null | undefined;
|
|
747
|
+
mfaEnabled?: boolean | undefined;
|
|
748
|
+
organizationsEnabled?: boolean | undefined;
|
|
749
|
+
organizationsLimit?: number | null | undefined;
|
|
750
|
+
idpInitiatedSsoEnabled?: boolean | undefined;
|
|
751
|
+
samlApplicationsLimit?: number | null | undefined;
|
|
752
|
+
};
|
|
753
|
+
updatedAt: Date;
|
|
754
|
+
productId: string | null;
|
|
755
|
+
}[]>;
|
|
756
|
+
};
|
|
757
|
+
post: {
|
|
758
|
+
"/skus": import("@withtyped/server").PathGuard<"/", unknown, {
|
|
759
|
+
type: LogtoSkuType.AddOn;
|
|
760
|
+
quota: {
|
|
761
|
+
tokenLimit?: number | null | undefined;
|
|
762
|
+
machineToMachineLimit?: number | null | undefined;
|
|
763
|
+
resourcesLimit?: number | null | undefined;
|
|
764
|
+
enterpriseSsoLimit?: number | null | undefined;
|
|
765
|
+
hooksLimit?: number | null | undefined;
|
|
766
|
+
tenantMembersLimit?: number | null | undefined;
|
|
767
|
+
mfaEnabled?: boolean | undefined;
|
|
768
|
+
organizationsEnabled?: boolean | undefined;
|
|
769
|
+
organizationsLimit?: number | null | undefined;
|
|
770
|
+
auditLogsRetentionDays?: number | null | undefined;
|
|
771
|
+
mauLimit?: number | null | undefined;
|
|
772
|
+
applicationsLimit?: number | null | undefined;
|
|
773
|
+
thirdPartyApplicationsLimit?: number | null | undefined;
|
|
774
|
+
scopesPerResourceLimit?: number | null | undefined;
|
|
775
|
+
socialConnectorsLimit?: number | null | undefined;
|
|
776
|
+
userRolesLimit?: number | null | undefined;
|
|
777
|
+
machineToMachineRolesLimit?: number | null | undefined;
|
|
778
|
+
scopesPerRoleLimit?: number | null | undefined;
|
|
779
|
+
customJwtEnabled?: boolean | undefined;
|
|
780
|
+
subjectTokenEnabled?: boolean | undefined;
|
|
781
|
+
bringYourUiEnabled?: boolean | undefined;
|
|
782
|
+
idpInitiatedSsoEnabled?: boolean | undefined;
|
|
783
|
+
samlApplicationsLimit?: number | null | undefined;
|
|
784
|
+
};
|
|
785
|
+
} | {
|
|
786
|
+
type: LogtoSkuType.Basic;
|
|
267
787
|
quota: {
|
|
788
|
+
auditLogsRetentionDays: number | null;
|
|
268
789
|
mauLimit: number | null;
|
|
269
|
-
tokenLimit: number | null;
|
|
270
790
|
applicationsLimit: number | null;
|
|
271
|
-
|
|
272
|
-
resourcesLimit: number | null;
|
|
791
|
+
thirdPartyApplicationsLimit: number | null;
|
|
273
792
|
scopesPerResourceLimit: number | null;
|
|
274
|
-
customDomainEnabled: boolean;
|
|
275
|
-
omniSignInEnabled: boolean;
|
|
276
|
-
builtInEmailConnectorEnabled: boolean;
|
|
277
793
|
socialConnectorsLimit: number | null;
|
|
278
|
-
|
|
279
|
-
rolesLimit: number | null;
|
|
794
|
+
userRolesLimit: number | null;
|
|
280
795
|
machineToMachineRolesLimit: number | null;
|
|
281
796
|
scopesPerRoleLimit: number | null;
|
|
282
797
|
hooksLimit: number | null;
|
|
283
|
-
|
|
798
|
+
customJwtEnabled: boolean;
|
|
799
|
+
subjectTokenEnabled: boolean;
|
|
800
|
+
bringYourUiEnabled: boolean;
|
|
801
|
+
tokenLimit: number | null;
|
|
802
|
+
machineToMachineLimit: number | null;
|
|
803
|
+
resourcesLimit: number | null;
|
|
804
|
+
enterpriseSsoLimit: number | null;
|
|
805
|
+
tenantMembersLimit: number | null;
|
|
284
806
|
mfaEnabled: boolean;
|
|
285
807
|
organizationsEnabled: boolean;
|
|
286
|
-
|
|
808
|
+
organizationsLimit: number | null;
|
|
809
|
+
idpInitiatedSsoEnabled: boolean;
|
|
810
|
+
samlApplicationsLimit: number | null;
|
|
287
811
|
};
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
quantity?: 1 | undefined;
|
|
296
|
-
unitAmount?: number | null | undefined;
|
|
297
|
-
};
|
|
298
|
-
description?: string | undefined;
|
|
299
|
-
}[];
|
|
812
|
+
addOnRelations: {
|
|
813
|
+
tokenLimit: string;
|
|
814
|
+
};
|
|
815
|
+
}, {
|
|
816
|
+
id: string;
|
|
817
|
+
createdAt: Date;
|
|
818
|
+
type: LogtoSkuType;
|
|
300
819
|
updatedAt: Date;
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
820
|
+
quota: {
|
|
821
|
+
auditLogsRetentionDays?: number | null | undefined;
|
|
822
|
+
mauLimit?: number | null | undefined;
|
|
823
|
+
applicationsLimit?: number | null | undefined;
|
|
824
|
+
thirdPartyApplicationsLimit?: number | null | undefined;
|
|
825
|
+
scopesPerResourceLimit?: number | null | undefined;
|
|
826
|
+
socialConnectorsLimit?: number | null | undefined;
|
|
827
|
+
userRolesLimit?: number | null | undefined;
|
|
828
|
+
machineToMachineRolesLimit?: number | null | undefined;
|
|
829
|
+
scopesPerRoleLimit?: number | null | undefined;
|
|
830
|
+
hooksLimit?: number | null | undefined;
|
|
831
|
+
customJwtEnabled?: boolean | undefined;
|
|
832
|
+
subjectTokenEnabled?: boolean | undefined;
|
|
833
|
+
bringYourUiEnabled?: boolean | undefined;
|
|
834
|
+
tokenLimit?: number | null | undefined;
|
|
835
|
+
machineToMachineLimit?: number | null | undefined;
|
|
836
|
+
resourcesLimit?: number | null | undefined;
|
|
837
|
+
enterpriseSsoLimit?: number | null | undefined;
|
|
838
|
+
tenantMembersLimit?: number | null | undefined;
|
|
839
|
+
mfaEnabled?: boolean | undefined;
|
|
840
|
+
organizationsEnabled?: boolean | undefined;
|
|
841
|
+
organizationsLimit?: number | null | undefined;
|
|
842
|
+
idpInitiatedSsoEnabled?: boolean | undefined;
|
|
843
|
+
samlApplicationsLimit?: number | null | undefined;
|
|
844
|
+
};
|
|
845
|
+
}>;
|
|
846
|
+
} & {
|
|
847
|
+
"/skus/:skuId/products": import("@withtyped/server").PathGuard<"/:skuId/products", {
|
|
848
|
+
isOneTime?: string | undefined;
|
|
849
|
+
}, {
|
|
313
850
|
name: string;
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
tag: TenantTag;
|
|
851
|
+
unitPrice: number;
|
|
852
|
+
}, {
|
|
853
|
+
productId: string;
|
|
318
854
|
}>;
|
|
319
855
|
};
|
|
320
|
-
post: {};
|
|
321
856
|
put: {};
|
|
322
|
-
delete: {
|
|
857
|
+
delete: {
|
|
858
|
+
"/skus/:skuId": import("@withtyped/server").PathGuard<"/:skuId", unknown, unknown, unknown>;
|
|
859
|
+
};
|
|
323
860
|
copy: {};
|
|
324
861
|
head: {};
|
|
325
862
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
326
|
-
options: {};
|
|
327
863
|
patch: {};
|
|
864
|
+
options: {};
|
|
328
865
|
get: {
|
|
329
866
|
"/checkout-session/:id": import("@withtyped/server").PathGuard<"/:id", unknown, unknown, {
|
|
330
|
-
status: "open" | "complete" | "expired";
|
|
331
|
-
createdAt: Date;
|
|
332
867
|
id: string;
|
|
868
|
+
createdAt: Date;
|
|
333
869
|
userId: string;
|
|
334
|
-
|
|
870
|
+
status: "open" | "complete" | "expired";
|
|
335
871
|
tenantId: string | null;
|
|
336
|
-
|
|
872
|
+
updatedAt: Date;
|
|
873
|
+
skuId: string | null;
|
|
874
|
+
planId: string | null;
|
|
337
875
|
}>;
|
|
338
876
|
};
|
|
339
877
|
post: {
|
|
340
878
|
"/checkout-session": import("@withtyped/server").PathGuard<"/", unknown, {
|
|
341
|
-
planId: string;
|
|
342
879
|
successCallbackUrl: string;
|
|
343
880
|
tenantId?: string | undefined;
|
|
344
|
-
|
|
345
|
-
tenantTag?: TenantTag | undefined;
|
|
881
|
+
skuId?: string | undefined;
|
|
346
882
|
tenantName?: string | undefined;
|
|
883
|
+
tenantTag?: TenantTag | undefined;
|
|
884
|
+
tenantRegionName?: RegionName | undefined;
|
|
885
|
+
cancelCallbackUrl?: string | undefined;
|
|
347
886
|
}, {
|
|
348
887
|
sessionId: string;
|
|
349
888
|
redirectUri?: string | null | undefined;
|
|
@@ -354,8 +893,8 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
354
893
|
copy: {};
|
|
355
894
|
head: {};
|
|
356
895
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
357
|
-
options: {};
|
|
358
896
|
patch: {};
|
|
897
|
+
options: {};
|
|
359
898
|
get: {
|
|
360
899
|
"/affiliates": import("@withtyped/server").PathGuard<"/", unknown, unknown, AffiliateData[]>;
|
|
361
900
|
};
|
|
@@ -363,33 +902,33 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
363
902
|
"/affiliates": import("@withtyped/server").PathGuard<"/", unknown, {
|
|
364
903
|
name: string;
|
|
365
904
|
}, {
|
|
366
|
-
createdAt: Date;
|
|
367
905
|
id: string;
|
|
906
|
+
createdAt: Date;
|
|
368
907
|
name: string;
|
|
369
908
|
}>;
|
|
370
909
|
} & {
|
|
371
910
|
"/affiliates/:id/properties": import("@withtyped/server").PathGuard<"/:id/properties", unknown, {
|
|
372
|
-
value: string;
|
|
373
911
|
type: "hostname" | "query";
|
|
374
|
-
}, {
|
|
375
912
|
value: string;
|
|
376
|
-
|
|
913
|
+
}, {
|
|
377
914
|
createdAt: Date;
|
|
378
915
|
affiliateId: string;
|
|
916
|
+
type: "hostname" | "query";
|
|
917
|
+
value: string;
|
|
379
918
|
}>;
|
|
380
919
|
};
|
|
381
920
|
put: {};
|
|
382
921
|
delete: {
|
|
383
922
|
"/affiliates/:id/properties": import("@withtyped/server").PathGuard<"/:id/properties", unknown, {
|
|
384
|
-
value: string;
|
|
385
923
|
type: "hostname" | "query";
|
|
924
|
+
value: string;
|
|
386
925
|
}, unknown>;
|
|
387
926
|
};
|
|
388
927
|
copy: {};
|
|
389
928
|
head: {};
|
|
390
929
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
391
|
-
options: {};
|
|
392
930
|
patch: {};
|
|
931
|
+
options: {};
|
|
393
932
|
get: {};
|
|
394
933
|
post: {
|
|
395
934
|
"/affiliate-logs": import("@withtyped/server").PathGuard<"/", unknown, {
|
|
@@ -398,8 +937,8 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
398
937
|
hostname?: string | undefined;
|
|
399
938
|
query?: string | undefined;
|
|
400
939
|
}, {
|
|
401
|
-
createdAt: Date;
|
|
402
940
|
id: string;
|
|
941
|
+
createdAt: Date;
|
|
403
942
|
affiliateId: string | null;
|
|
404
943
|
userId: string;
|
|
405
944
|
createdVia: {
|
|
@@ -413,7 +952,164 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
413
952
|
delete: {};
|
|
414
953
|
copy: {};
|
|
415
954
|
head: {};
|
|
955
|
+
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
956
|
+
patch: {
|
|
957
|
+
"/invitations/:invitationId/status": import("@withtyped/server").PathGuard<"/:invitationId/status", unknown, {
|
|
958
|
+
status: OrganizationInvitationStatus.Accepted;
|
|
959
|
+
}, unknown>;
|
|
960
|
+
};
|
|
961
|
+
options: {};
|
|
962
|
+
get: {
|
|
963
|
+
"/invitations": import("@withtyped/server").PathGuard<"/", unknown, unknown, ({
|
|
964
|
+
id: string;
|
|
965
|
+
createdAt: number;
|
|
966
|
+
status: OrganizationInvitationStatus;
|
|
967
|
+
tenantId: string;
|
|
968
|
+
updatedAt: number;
|
|
969
|
+
inviterId: string | null;
|
|
970
|
+
invitee: string;
|
|
971
|
+
acceptedUserId: string | null;
|
|
972
|
+
organizationId: string;
|
|
973
|
+
expiresAt: number;
|
|
974
|
+
organizationRoles: OrganizationRoleEntity[];
|
|
975
|
+
} & {
|
|
976
|
+
tenantName: string;
|
|
977
|
+
tenantTag: TenantTag;
|
|
978
|
+
})[]>;
|
|
979
|
+
} & {
|
|
980
|
+
"/invitations/:invitationId": import("@withtyped/server").PathGuard<"/:invitationId", unknown, unknown, {
|
|
981
|
+
id: string;
|
|
982
|
+
createdAt: number;
|
|
983
|
+
status: OrganizationInvitationStatus;
|
|
984
|
+
tenantId: string;
|
|
985
|
+
updatedAt: number;
|
|
986
|
+
inviterId: string | null;
|
|
987
|
+
invitee: string;
|
|
988
|
+
acceptedUserId: string | null;
|
|
989
|
+
organizationId: string;
|
|
990
|
+
expiresAt: number;
|
|
991
|
+
organizationRoles: OrganizationRoleEntity[];
|
|
992
|
+
}>;
|
|
993
|
+
};
|
|
994
|
+
post: {};
|
|
995
|
+
put: {};
|
|
996
|
+
delete: {};
|
|
997
|
+
copy: {};
|
|
998
|
+
head: {};
|
|
999
|
+
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
1000
|
+
patch: {};
|
|
1001
|
+
options: {};
|
|
1002
|
+
get: {};
|
|
1003
|
+
post: {};
|
|
1004
|
+
put: {};
|
|
1005
|
+
delete: {
|
|
1006
|
+
"/me": import("@withtyped/server").PathGuard<"/", unknown, unknown, unknown>;
|
|
1007
|
+
};
|
|
1008
|
+
copy: {};
|
|
1009
|
+
head: {};
|
|
416
1010
|
}, "/api">>, "/api">;
|
|
1011
|
+
export declare const tenantAuthRouter: import("@withtyped/server").Router<RequestContext, import("@withtyped/server").WithBodyContext<import("@withtyped/server").BaseContext & {
|
|
1012
|
+
request: {
|
|
1013
|
+
id?: string | undefined;
|
|
1014
|
+
method?: import("@withtyped/server").RequestMethod | undefined;
|
|
1015
|
+
headers: import("http").IncomingHttpHeaders;
|
|
1016
|
+
url: URL;
|
|
1017
|
+
body?: unknown;
|
|
1018
|
+
};
|
|
1019
|
+
}>, import("@withtyped/server").MergeRoutes<import("@withtyped/server").BaseRoutes, import("@withtyped/server").RoutesWithPrefix<{
|
|
1020
|
+
patch: {
|
|
1021
|
+
"/:tenantId/invitations/:invitationId/status": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId/status", unknown, {
|
|
1022
|
+
status: OrganizationInvitationStatus.Revoked;
|
|
1023
|
+
}, {
|
|
1024
|
+
id: string;
|
|
1025
|
+
createdAt: number;
|
|
1026
|
+
status: OrganizationInvitationStatus;
|
|
1027
|
+
tenantId: string;
|
|
1028
|
+
updatedAt: number;
|
|
1029
|
+
inviterId: string | null;
|
|
1030
|
+
invitee: string;
|
|
1031
|
+
acceptedUserId: string | null;
|
|
1032
|
+
organizationId: string;
|
|
1033
|
+
expiresAt: number;
|
|
1034
|
+
organizationRoles: OrganizationRoleEntity[];
|
|
1035
|
+
}>;
|
|
1036
|
+
};
|
|
1037
|
+
options: {};
|
|
1038
|
+
get: {
|
|
1039
|
+
"/:tenantId/members": import("@withtyped/server").PathGuard<"/:tenantId/members", unknown, unknown, {
|
|
1040
|
+
id: string;
|
|
1041
|
+
name: string | null;
|
|
1042
|
+
username: string | null;
|
|
1043
|
+
primaryEmail: string | null;
|
|
1044
|
+
primaryPhone: string | null;
|
|
1045
|
+
avatar: string | null;
|
|
1046
|
+
organizationRoles: OrganizationRoleEntity[];
|
|
1047
|
+
}[]>;
|
|
1048
|
+
} & {
|
|
1049
|
+
"/:tenantId/members/:userId/scopes": import("@withtyped/server").PathGuard<"/:tenantId/members/:userId/scopes", unknown, unknown, OrganizationScope[]>;
|
|
1050
|
+
} & {
|
|
1051
|
+
"/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, unknown, ({
|
|
1052
|
+
id: string;
|
|
1053
|
+
createdAt: number;
|
|
1054
|
+
status: OrganizationInvitationStatus;
|
|
1055
|
+
tenantId: string;
|
|
1056
|
+
updatedAt: number;
|
|
1057
|
+
inviterId: string | null;
|
|
1058
|
+
invitee: string;
|
|
1059
|
+
acceptedUserId: string | null;
|
|
1060
|
+
organizationId: string;
|
|
1061
|
+
expiresAt: number;
|
|
1062
|
+
organizationRoles: OrganizationRoleEntity[];
|
|
1063
|
+
} & {
|
|
1064
|
+
inviterName?: string | undefined;
|
|
1065
|
+
})[]>;
|
|
1066
|
+
};
|
|
1067
|
+
post: {
|
|
1068
|
+
"/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, {
|
|
1069
|
+
invitee: string | string[];
|
|
1070
|
+
roleName: TenantRole;
|
|
1071
|
+
expiresAt?: number | undefined;
|
|
1072
|
+
}, {
|
|
1073
|
+
id: string;
|
|
1074
|
+
createdAt: number;
|
|
1075
|
+
status: OrganizationInvitationStatus;
|
|
1076
|
+
tenantId: string;
|
|
1077
|
+
updatedAt: number;
|
|
1078
|
+
inviterId: string | null;
|
|
1079
|
+
invitee: string;
|
|
1080
|
+
acceptedUserId: string | null;
|
|
1081
|
+
organizationId: string;
|
|
1082
|
+
expiresAt: number;
|
|
1083
|
+
organizationRoles: OrganizationRoleEntity[];
|
|
1084
|
+
} | {
|
|
1085
|
+
id: string;
|
|
1086
|
+
createdAt: number;
|
|
1087
|
+
status: OrganizationInvitationStatus;
|
|
1088
|
+
tenantId: string;
|
|
1089
|
+
updatedAt: number;
|
|
1090
|
+
inviterId: string | null;
|
|
1091
|
+
invitee: string;
|
|
1092
|
+
acceptedUserId: string | null;
|
|
1093
|
+
organizationId: string;
|
|
1094
|
+
expiresAt: number;
|
|
1095
|
+
organizationRoles: OrganizationRoleEntity[];
|
|
1096
|
+
}[]>;
|
|
1097
|
+
} & {
|
|
1098
|
+
"/:tenantId/invitations/:invitationId/message": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId/message", unknown, unknown, unknown>;
|
|
1099
|
+
};
|
|
1100
|
+
put: {
|
|
1101
|
+
"/:tenantId/members/:userId/roles": import("@withtyped/server").PathGuard<"/:tenantId/members/:userId/roles", unknown, {
|
|
1102
|
+
roleName: TenantRole;
|
|
1103
|
+
}, unknown>;
|
|
1104
|
+
};
|
|
1105
|
+
delete: {
|
|
1106
|
+
"/:tenantId/members/:userId": import("@withtyped/server").PathGuard<"/:tenantId/members/:userId", unknown, unknown, unknown>;
|
|
1107
|
+
} & {
|
|
1108
|
+
"/:tenantId/invitations/:invitationId": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId", unknown, unknown, unknown>;
|
|
1109
|
+
};
|
|
1110
|
+
copy: {};
|
|
1111
|
+
head: {};
|
|
1112
|
+
}, "/api/tenants">>, "/api/tenants">;
|
|
417
1113
|
|
|
418
1114
|
export {
|
|
419
1115
|
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-c98a257",
|
|
4
4
|
"description": "Logto Cloud service.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"author": "Silverhand Inc. <contact@silverhand.io>",
|
|
@@ -16,22 +16,21 @@
|
|
|
16
16
|
"#src/*": "./build/*"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@silverhand/eslint-config": "
|
|
20
|
-
"@silverhand/
|
|
21
|
-
"@silverhand/ts-config": "5.0.0",
|
|
19
|
+
"@silverhand/eslint-config": "6.0.1",
|
|
20
|
+
"@silverhand/ts-config": "6.0.0",
|
|
22
21
|
"@types/accepts": "^1.3.5",
|
|
23
22
|
"@types/http-proxy": "^1.17.9",
|
|
24
|
-
"@types/jest": "^29.4.0",
|
|
25
23
|
"@types/mime-types": "^2.1.1",
|
|
26
|
-
"@types/node": "^
|
|
24
|
+
"@types/node": "^20.0.0",
|
|
27
25
|
"@types/yargs": "^17.0.24",
|
|
28
|
-
"dts-bundle-generator": "^9.
|
|
29
|
-
"eslint": "^8.
|
|
30
|
-
"jest": "^29.5.0",
|
|
26
|
+
"dts-bundle-generator": "^9.3.1",
|
|
27
|
+
"eslint": "^8.57.0",
|
|
31
28
|
"lint-staged": "^15.0.0",
|
|
32
29
|
"nodemon": "^3.0.0",
|
|
33
30
|
"prettier": "^3.0.0",
|
|
34
|
-
"typescript": "^5.3.3"
|
|
31
|
+
"typescript": "^5.3.3",
|
|
32
|
+
"vite-tsconfig-paths": "^5.0.0",
|
|
33
|
+
"vitest": "^2.1.8"
|
|
35
34
|
},
|
|
36
35
|
"engines": {
|
|
37
36
|
"node": "^20.9.0"
|
|
@@ -50,22 +49,19 @@
|
|
|
50
49
|
"access": "public"
|
|
51
50
|
},
|
|
52
51
|
"dependencies": {
|
|
53
|
-
"@silverhand/essentials": "^2.
|
|
54
|
-
"@withtyped/server": "^0.
|
|
52
|
+
"@silverhand/essentials": "^2.9.2",
|
|
53
|
+
"@withtyped/server": "^0.14.0"
|
|
55
54
|
},
|
|
56
55
|
"scripts": {
|
|
57
56
|
"precommit": "lint-staged",
|
|
58
57
|
"build": "rm -rf build/ && tsc -p tsconfig.build.json && pnpm build:lib",
|
|
59
58
|
"//": "It is not used to build the service itself.",
|
|
60
59
|
"build:lib": "rm -rf lib/ && dts-bundle-generator src/routes/index.ts --project tsconfig.build.lib.json -o lib/routes/index.d.ts",
|
|
61
|
-
"build:test": "rm -rf build/ && tsc -p tsconfig.test.json --sourcemap",
|
|
62
60
|
"lint": "eslint --ext .ts src",
|
|
63
61
|
"lint:report": "pnpm lint --format json --output-file report.json",
|
|
64
62
|
"dev": "rm -rf build/ && nodemon",
|
|
65
63
|
"start": "NODE_ENV=production node .",
|
|
66
|
-
"test
|
|
67
|
-
"test": "pnpm build:test && pnpm test:only && pnpm build:lib && pnpm test:types",
|
|
68
|
-
"test:ci": "pnpm test:only --coverage --silent",
|
|
64
|
+
"test": "vitest && pnpm build:lib && pnpm test:types",
|
|
69
65
|
"test:types": "tsc -p tsconfig.test.types.json",
|
|
70
66
|
"cli": "node ./build/cli/index.js"
|
|
71
67
|
}
|