@logto/cloud 0.2.5-d434baa → 0.2.5-e14156b
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 +639 -86
- package/package.json +15 -19
package/lib/routes/index.d.ts
CHANGED
|
@@ -1,54 +1,133 @@
|
|
|
1
|
-
// Generated by dts-bundle-generator
|
|
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
|
};
|
|
12
|
-
declare enum TenantTag {
|
|
13
|
-
Development = "development",
|
|
14
|
-
Staging = "staging",
|
|
15
|
-
Production = "production"
|
|
16
|
-
}
|
|
17
14
|
declare enum VerificationCodeType {
|
|
18
15
|
SignIn = "SignIn",
|
|
19
16
|
Register = "Register",
|
|
20
17
|
ForgotPassword = "ForgotPassword",
|
|
21
|
-
/** @deprecated */
|
|
22
|
-
Continue = "Continue",
|
|
23
18
|
Generic = "Generic",
|
|
24
19
|
/** @deprecated Use `Generic` type template for sending test sms/email use case */
|
|
25
20
|
Test = "Test"
|
|
26
21
|
}
|
|
27
|
-
declare
|
|
22
|
+
declare enum TemplateType {
|
|
23
|
+
/** The template for sending verification code when user is signing in. */
|
|
24
|
+
SignIn = "SignIn",
|
|
25
|
+
/** The template for sending verification code when user is registering. */
|
|
26
|
+
Register = "Register",
|
|
27
|
+
/** The template for sending verification code when user is resetting password. */
|
|
28
|
+
ForgotPassword = "ForgotPassword",
|
|
29
|
+
/** The template for sending organization invitation. */
|
|
30
|
+
OrganizationInvitation = "OrganizationInvitation",
|
|
31
|
+
/** The template for generic usage. */
|
|
32
|
+
Generic = "Generic"
|
|
33
|
+
}
|
|
34
|
+
declare enum OrganizationInvitationStatus {
|
|
35
|
+
Pending = "Pending",
|
|
36
|
+
Accepted = "Accepted",
|
|
37
|
+
Expired = "Expired",
|
|
38
|
+
Revoked = "Revoked"
|
|
39
|
+
}
|
|
40
|
+
/** The scopes (permissions) defined by the organization template. */
|
|
41
|
+
export type OrganizationScope = {
|
|
42
|
+
tenantId: string;
|
|
43
|
+
/** The globally unique identifier of the organization scope. */
|
|
44
|
+
id: string;
|
|
45
|
+
/** The organization scope's name, unique within the organization template. */
|
|
46
|
+
name: string;
|
|
47
|
+
/** A brief description of the organization scope. */
|
|
48
|
+
description: string | null;
|
|
49
|
+
};
|
|
50
|
+
declare enum LogtoJwtTokenKeyType {
|
|
51
|
+
AccessToken = "access-token",
|
|
52
|
+
ClientCredentials = "client-credentials"
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* The simplified organization role entity that is returned in the `roles` field
|
|
56
|
+
* of the organization.
|
|
57
|
+
*/
|
|
58
|
+
export type OrganizationRoleEntity = {
|
|
59
|
+
id: string;
|
|
60
|
+
name: string;
|
|
61
|
+
};
|
|
62
|
+
declare enum TenantTag {
|
|
63
|
+
Development = "development",
|
|
64
|
+
Production = "production"
|
|
65
|
+
}
|
|
66
|
+
declare enum TenantRole {
|
|
67
|
+
/** Admin of the tenant, who has all permissions. */
|
|
68
|
+
Admin = "admin",
|
|
69
|
+
/** Collaborator of the tenant, who has permissions to operate the tenant data, but not the tenant settings. */
|
|
70
|
+
Collaborator = "collaborator"
|
|
71
|
+
}
|
|
72
|
+
declare enum LogtoSkuType {
|
|
73
|
+
Basic = "Basic",
|
|
74
|
+
AddOn = "AddOn"
|
|
75
|
+
}
|
|
76
|
+
declare const AffiliateProperties: import("@withtyped/server/lib/model/index.js").default<"affiliate_properties", {
|
|
28
77
|
createdAt: Date;
|
|
29
78
|
affiliateId: string;
|
|
30
79
|
type: "hostname" | "query";
|
|
31
80
|
value: string;
|
|
32
81
|
}, "createdAt", "createdAt">;
|
|
33
82
|
export type AffiliateProperty = InferModelType<typeof AffiliateProperties>;
|
|
34
|
-
declare const Affiliates: import("@withtyped/server/model").default<"affiliates", {
|
|
35
|
-
id: string;
|
|
36
|
-
createdAt: Date;
|
|
83
|
+
declare const Affiliates: import("@withtyped/server/lib/model/index.js").default<"affiliates", {
|
|
37
84
|
name: string;
|
|
38
|
-
|
|
85
|
+
createdAt: Date;
|
|
86
|
+
id: string;
|
|
87
|
+
}, "id" | "createdAt", "id" | "createdAt">;
|
|
39
88
|
export type Affiliate = InferModelType<typeof Affiliates>;
|
|
89
|
+
declare enum RegionName {
|
|
90
|
+
EU = "EU",
|
|
91
|
+
US = "US"
|
|
92
|
+
}
|
|
40
93
|
export type AffiliateData = Affiliate & {
|
|
41
94
|
properties: Array<Pick<AffiliateProperty, "type" | "value">>;
|
|
42
95
|
};
|
|
43
|
-
declare const router: import("@withtyped/server").Router<
|
|
44
|
-
|
|
96
|
+
declare const router: import("@withtyped/server").Router<RequestContext, WithAuthContext<Omit<import("@withtyped/server").BaseContext & {
|
|
97
|
+
request: {
|
|
98
|
+
id?: string | undefined;
|
|
99
|
+
method?: import("@withtyped/server").RequestMethod | undefined;
|
|
100
|
+
headers: import("http").IncomingHttpHeaders;
|
|
101
|
+
url: URL;
|
|
102
|
+
body?: unknown;
|
|
103
|
+
};
|
|
104
|
+
}, "request"> & {
|
|
105
|
+
request: Record<string, unknown> & {
|
|
106
|
+
id?: string | undefined;
|
|
107
|
+
method?: import("@withtyped/server").RequestMethod | undefined;
|
|
108
|
+
headers: import("http").IncomingHttpHeaders;
|
|
109
|
+
url: URL;
|
|
110
|
+
body?: unknown;
|
|
111
|
+
} & {
|
|
112
|
+
body?: Json | undefined;
|
|
113
|
+
bodyRaw?: Buffer | undefined;
|
|
114
|
+
};
|
|
115
|
+
}>, import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").BaseRoutes, import("@withtyped/server").RoutesWithPrefix<{
|
|
45
116
|
patch: {
|
|
46
117
|
"/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, {
|
|
47
118
|
name?: string | undefined;
|
|
48
|
-
tag?: TenantTag | undefined;
|
|
49
119
|
}, {
|
|
50
120
|
id: string;
|
|
51
121
|
name: string;
|
|
122
|
+
quota: {
|
|
123
|
+
mauLimit: number | null;
|
|
124
|
+
tokenLimit: number | null;
|
|
125
|
+
};
|
|
126
|
+
createdAt: Date;
|
|
127
|
+
usage: {
|
|
128
|
+
activeUsers: number;
|
|
129
|
+
tokenUsage: number;
|
|
130
|
+
};
|
|
52
131
|
indicator: string;
|
|
53
132
|
isSuspended: boolean;
|
|
54
133
|
planId: string;
|
|
@@ -57,16 +136,21 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
57
136
|
planId: string;
|
|
58
137
|
currentPeriodStart: Date;
|
|
59
138
|
currentPeriodEnd: Date;
|
|
139
|
+
id?: string | undefined;
|
|
140
|
+
upcomingInvoice?: {
|
|
141
|
+
subtotal: number;
|
|
142
|
+
subtotalExcludingTax: number | null;
|
|
143
|
+
total: number;
|
|
144
|
+
totalExcludingTax: number | null;
|
|
145
|
+
} | null | undefined;
|
|
146
|
+
isAddOnAvailable?: boolean | undefined;
|
|
60
147
|
};
|
|
148
|
+
regionName: RegionName;
|
|
61
149
|
tag: TenantTag;
|
|
62
|
-
usage: {
|
|
63
|
-
activeUsers: number;
|
|
64
|
-
cost: number;
|
|
65
|
-
};
|
|
66
150
|
openInvoices: {
|
|
67
151
|
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
68
|
-
createdAt: Date;
|
|
69
152
|
id: string;
|
|
153
|
+
createdAt: Date;
|
|
70
154
|
updatedAt: Date;
|
|
71
155
|
customerId: string | null;
|
|
72
156
|
billingReason: string | null;
|
|
@@ -80,10 +164,20 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
80
164
|
}[];
|
|
81
165
|
}>;
|
|
82
166
|
};
|
|
167
|
+
options: {};
|
|
83
168
|
get: {
|
|
84
169
|
"/tenants": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
|
|
85
170
|
id: string;
|
|
86
171
|
name: string;
|
|
172
|
+
quota: {
|
|
173
|
+
mauLimit: number | null;
|
|
174
|
+
tokenLimit: number | null;
|
|
175
|
+
};
|
|
176
|
+
createdAt: Date;
|
|
177
|
+
usage: {
|
|
178
|
+
activeUsers: number;
|
|
179
|
+
tokenUsage: number;
|
|
180
|
+
};
|
|
87
181
|
indicator: string;
|
|
88
182
|
isSuspended: boolean;
|
|
89
183
|
planId: string;
|
|
@@ -92,16 +186,21 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
92
186
|
planId: string;
|
|
93
187
|
currentPeriodStart: Date;
|
|
94
188
|
currentPeriodEnd: Date;
|
|
189
|
+
id?: string | undefined;
|
|
190
|
+
upcomingInvoice?: {
|
|
191
|
+
subtotal: number;
|
|
192
|
+
subtotalExcludingTax: number | null;
|
|
193
|
+
total: number;
|
|
194
|
+
totalExcludingTax: number | null;
|
|
195
|
+
} | null | undefined;
|
|
196
|
+
isAddOnAvailable?: boolean | undefined;
|
|
95
197
|
};
|
|
198
|
+
regionName: RegionName;
|
|
96
199
|
tag: TenantTag;
|
|
97
|
-
usage: {
|
|
98
|
-
activeUsers: number;
|
|
99
|
-
cost: number;
|
|
100
|
-
};
|
|
101
200
|
openInvoices: {
|
|
102
201
|
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
103
|
-
createdAt: Date;
|
|
104
202
|
id: string;
|
|
203
|
+
createdAt: Date;
|
|
105
204
|
updatedAt: Date;
|
|
106
205
|
customerId: string | null;
|
|
107
206
|
billingReason: string | null;
|
|
@@ -119,9 +218,19 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
119
218
|
"/tenants": import("@withtyped/server").PathGuard<"/", unknown, {
|
|
120
219
|
name?: string | undefined;
|
|
121
220
|
tag?: TenantTag | undefined;
|
|
221
|
+
regionName?: RegionName | undefined;
|
|
122
222
|
}, {
|
|
123
223
|
id: string;
|
|
124
224
|
name: string;
|
|
225
|
+
quota: {
|
|
226
|
+
mauLimit: number | null;
|
|
227
|
+
tokenLimit: number | null;
|
|
228
|
+
};
|
|
229
|
+
createdAt: Date;
|
|
230
|
+
usage: {
|
|
231
|
+
activeUsers: number;
|
|
232
|
+
tokenUsage: number;
|
|
233
|
+
};
|
|
125
234
|
indicator: string;
|
|
126
235
|
isSuspended: boolean;
|
|
127
236
|
planId: string;
|
|
@@ -130,16 +239,21 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
130
239
|
planId: string;
|
|
131
240
|
currentPeriodStart: Date;
|
|
132
241
|
currentPeriodEnd: Date;
|
|
242
|
+
id?: string | undefined;
|
|
243
|
+
upcomingInvoice?: {
|
|
244
|
+
subtotal: number;
|
|
245
|
+
subtotalExcludingTax: number | null;
|
|
246
|
+
total: number;
|
|
247
|
+
totalExcludingTax: number | null;
|
|
248
|
+
} | null | undefined;
|
|
249
|
+
isAddOnAvailable?: boolean | undefined;
|
|
133
250
|
};
|
|
251
|
+
regionName: RegionName;
|
|
134
252
|
tag: TenantTag;
|
|
135
|
-
usage: {
|
|
136
|
-
activeUsers: number;
|
|
137
|
-
cost: number;
|
|
138
|
-
};
|
|
139
253
|
openInvoices: {
|
|
140
254
|
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
141
|
-
createdAt: Date;
|
|
142
255
|
id: string;
|
|
256
|
+
createdAt: Date;
|
|
143
257
|
updatedAt: Date;
|
|
144
258
|
customerId: string | null;
|
|
145
259
|
billingReason: string | null;
|
|
@@ -154,20 +268,126 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
154
268
|
}>;
|
|
155
269
|
};
|
|
156
270
|
put: {};
|
|
157
|
-
head: {};
|
|
158
271
|
delete: {
|
|
159
272
|
"/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, unknown, unknown>;
|
|
160
273
|
};
|
|
161
274
|
copy: {};
|
|
275
|
+
head: {};
|
|
162
276
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
163
|
-
options: {};
|
|
164
277
|
patch: {};
|
|
278
|
+
options: {};
|
|
165
279
|
get: {
|
|
166
280
|
"/tenants/my/subscription": import("@withtyped/server").PathGuard<"/my/subscription", unknown, unknown, {
|
|
167
281
|
status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
|
|
168
282
|
planId: string;
|
|
169
283
|
currentPeriodStart: Date;
|
|
170
284
|
currentPeriodEnd: Date;
|
|
285
|
+
id?: string | undefined;
|
|
286
|
+
upcomingInvoice?: {
|
|
287
|
+
subtotal: number;
|
|
288
|
+
subtotalExcludingTax: number | null;
|
|
289
|
+
total: number;
|
|
290
|
+
totalExcludingTax: number | null;
|
|
291
|
+
} | null | undefined;
|
|
292
|
+
isAddOnAvailable?: boolean | undefined;
|
|
293
|
+
}>;
|
|
294
|
+
} & {
|
|
295
|
+
"/tenants/my/subscription/quota": import("@withtyped/server").PathGuard<"/my/subscription/quota", unknown, unknown, {
|
|
296
|
+
mauLimit: number | null;
|
|
297
|
+
tokenLimit: number | null;
|
|
298
|
+
applicationsLimit: number | null;
|
|
299
|
+
machineToMachineLimit: number | null;
|
|
300
|
+
resourcesLimit: number | null;
|
|
301
|
+
scopesPerResourceLimit: number | null;
|
|
302
|
+
socialConnectorsLimit: number | null;
|
|
303
|
+
machineToMachineRolesLimit: number | null;
|
|
304
|
+
scopesPerRoleLimit: number | null;
|
|
305
|
+
hooksLimit: number | null;
|
|
306
|
+
auditLogsRetentionDays: number | null;
|
|
307
|
+
mfaEnabled: boolean;
|
|
308
|
+
organizationsEnabled: boolean;
|
|
309
|
+
thirdPartyApplicationsLimit: number | null;
|
|
310
|
+
tenantMembersLimit: number | null;
|
|
311
|
+
customJwtEnabled: boolean;
|
|
312
|
+
subjectTokenEnabled: boolean;
|
|
313
|
+
bringYourUiEnabled: boolean;
|
|
314
|
+
userRolesLimit: number | null;
|
|
315
|
+
enterpriseSsoLimit: number | null;
|
|
316
|
+
}>;
|
|
317
|
+
} & {
|
|
318
|
+
"/tenants/my/subscription/usage": import("@withtyped/server").PathGuard<"/my/subscription/usage", unknown, unknown, {
|
|
319
|
+
applicationsLimit: number;
|
|
320
|
+
machineToMachineLimit: number;
|
|
321
|
+
resourcesLimit: number;
|
|
322
|
+
scopesPerResourceLimit: number;
|
|
323
|
+
socialConnectorsLimit: number;
|
|
324
|
+
machineToMachineRolesLimit: number;
|
|
325
|
+
scopesPerRoleLimit: number;
|
|
326
|
+
hooksLimit: number;
|
|
327
|
+
mfaEnabled: boolean;
|
|
328
|
+
organizationsEnabled: boolean;
|
|
329
|
+
thirdPartyApplicationsLimit: number;
|
|
330
|
+
tenantMembersLimit: number;
|
|
331
|
+
customJwtEnabled: boolean;
|
|
332
|
+
subjectTokenEnabled: boolean;
|
|
333
|
+
bringYourUiEnabled: boolean;
|
|
334
|
+
userRolesLimit: number;
|
|
335
|
+
enterpriseSsoLimit: number;
|
|
336
|
+
}>;
|
|
337
|
+
} & {
|
|
338
|
+
"/tenants/my/subscription/usage/:entityName/scopes": import("@withtyped/server").PathGuard<"/my/subscription/usage/:entityName/scopes", {
|
|
339
|
+
entityId?: string | undefined;
|
|
340
|
+
}, unknown, Record<string, number>>;
|
|
341
|
+
} & {
|
|
342
|
+
"/tenants/my/subscription-usage": import("@withtyped/server").PathGuard<"/my/subscription-usage", unknown, unknown, {
|
|
343
|
+
usage: {
|
|
344
|
+
applicationsLimit: number;
|
|
345
|
+
machineToMachineLimit: number;
|
|
346
|
+
resourcesLimit: number;
|
|
347
|
+
scopesPerResourceLimit: number;
|
|
348
|
+
socialConnectorsLimit: number;
|
|
349
|
+
machineToMachineRolesLimit: number;
|
|
350
|
+
scopesPerRoleLimit: number;
|
|
351
|
+
hooksLimit: number;
|
|
352
|
+
mfaEnabled: boolean;
|
|
353
|
+
organizationsEnabled: boolean;
|
|
354
|
+
thirdPartyApplicationsLimit: number;
|
|
355
|
+
tenantMembersLimit: number;
|
|
356
|
+
customJwtEnabled: boolean;
|
|
357
|
+
subjectTokenEnabled: boolean;
|
|
358
|
+
bringYourUiEnabled: boolean;
|
|
359
|
+
userRolesLimit: number;
|
|
360
|
+
enterpriseSsoLimit: number;
|
|
361
|
+
};
|
|
362
|
+
resources: Record<string, number>;
|
|
363
|
+
roles: Record<string, number>;
|
|
364
|
+
quota: {
|
|
365
|
+
mauLimit: number | null;
|
|
366
|
+
tokenLimit: number | null;
|
|
367
|
+
applicationsLimit: number | null;
|
|
368
|
+
machineToMachineLimit: number | null;
|
|
369
|
+
resourcesLimit: number | null;
|
|
370
|
+
scopesPerResourceLimit: number | null;
|
|
371
|
+
socialConnectorsLimit: number | null;
|
|
372
|
+
machineToMachineRolesLimit: number | null;
|
|
373
|
+
scopesPerRoleLimit: number | null;
|
|
374
|
+
hooksLimit: number | null;
|
|
375
|
+
auditLogsRetentionDays: number | null;
|
|
376
|
+
mfaEnabled: boolean;
|
|
377
|
+
organizationsEnabled: boolean;
|
|
378
|
+
thirdPartyApplicationsLimit: number | null;
|
|
379
|
+
tenantMembersLimit: number | null;
|
|
380
|
+
customJwtEnabled: boolean;
|
|
381
|
+
subjectTokenEnabled: boolean;
|
|
382
|
+
bringYourUiEnabled: boolean;
|
|
383
|
+
userRolesLimit: number | null;
|
|
384
|
+
enterpriseSsoLimit: number | null;
|
|
385
|
+
};
|
|
386
|
+
}>;
|
|
387
|
+
} & {
|
|
388
|
+
"/tenants/my/subscription/periodic-usage": import("@withtyped/server").PathGuard<"/my/subscription/periodic-usage", unknown, unknown, {
|
|
389
|
+
mauLimit: number;
|
|
390
|
+
tokenLimit: number;
|
|
171
391
|
}>;
|
|
172
392
|
} & {
|
|
173
393
|
"/tenants/:tenantId/subscription": import("@withtyped/server").PathGuard<"/:tenantId/subscription", unknown, unknown, {
|
|
@@ -175,13 +395,119 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
175
395
|
planId: string;
|
|
176
396
|
currentPeriodStart: Date;
|
|
177
397
|
currentPeriodEnd: Date;
|
|
398
|
+
id?: string | undefined;
|
|
399
|
+
upcomingInvoice?: {
|
|
400
|
+
subtotal: number;
|
|
401
|
+
subtotalExcludingTax: number | null;
|
|
402
|
+
total: number;
|
|
403
|
+
totalExcludingTax: number | null;
|
|
404
|
+
} | null | undefined;
|
|
405
|
+
isAddOnAvailable?: boolean | undefined;
|
|
406
|
+
}>;
|
|
407
|
+
} & {
|
|
408
|
+
"/tenants/:tenantId/subscription/quota": import("@withtyped/server").PathGuard<"/:tenantId/subscription/quota", unknown, unknown, {
|
|
409
|
+
mauLimit: number | null;
|
|
410
|
+
tokenLimit: number | null;
|
|
411
|
+
applicationsLimit: number | null;
|
|
412
|
+
machineToMachineLimit: number | null;
|
|
413
|
+
resourcesLimit: number | null;
|
|
414
|
+
scopesPerResourceLimit: number | null;
|
|
415
|
+
socialConnectorsLimit: number | null;
|
|
416
|
+
machineToMachineRolesLimit: number | null;
|
|
417
|
+
scopesPerRoleLimit: number | null;
|
|
418
|
+
hooksLimit: number | null;
|
|
419
|
+
auditLogsRetentionDays: number | null;
|
|
420
|
+
mfaEnabled: boolean;
|
|
421
|
+
organizationsEnabled: boolean;
|
|
422
|
+
thirdPartyApplicationsLimit: number | null;
|
|
423
|
+
tenantMembersLimit: number | null;
|
|
424
|
+
customJwtEnabled: boolean;
|
|
425
|
+
subjectTokenEnabled: boolean;
|
|
426
|
+
bringYourUiEnabled: boolean;
|
|
427
|
+
userRolesLimit: number | null;
|
|
428
|
+
enterpriseSsoLimit: number | null;
|
|
429
|
+
}>;
|
|
430
|
+
} & {
|
|
431
|
+
"/tenants/:tenantId/subscription/usage": import("@withtyped/server").PathGuard<"/:tenantId/subscription/usage", unknown, unknown, {
|
|
432
|
+
applicationsLimit: number;
|
|
433
|
+
machineToMachineLimit: number;
|
|
434
|
+
resourcesLimit: number;
|
|
435
|
+
scopesPerResourceLimit: number;
|
|
436
|
+
socialConnectorsLimit: number;
|
|
437
|
+
machineToMachineRolesLimit: number;
|
|
438
|
+
scopesPerRoleLimit: number;
|
|
439
|
+
hooksLimit: number;
|
|
440
|
+
mfaEnabled: boolean;
|
|
441
|
+
organizationsEnabled: boolean;
|
|
442
|
+
thirdPartyApplicationsLimit: number;
|
|
443
|
+
tenantMembersLimit: number;
|
|
444
|
+
customJwtEnabled: boolean;
|
|
445
|
+
subjectTokenEnabled: boolean;
|
|
446
|
+
bringYourUiEnabled: boolean;
|
|
447
|
+
userRolesLimit: number;
|
|
448
|
+
enterpriseSsoLimit: number;
|
|
449
|
+
}>;
|
|
450
|
+
} & {
|
|
451
|
+
"/tenants/:tenantId/subscription/usage/:entityName/scopes": import("@withtyped/server").PathGuard<"/:tenantId/subscription/usage/:entityName/scopes", {
|
|
452
|
+
entityId?: string | undefined;
|
|
453
|
+
}, unknown, Record<string, number>>;
|
|
454
|
+
} & {
|
|
455
|
+
"/tenants/:tenantId/subscription-usage": import("@withtyped/server").PathGuard<"/:tenantId/subscription-usage", unknown, unknown, {
|
|
456
|
+
usage: {
|
|
457
|
+
applicationsLimit: number;
|
|
458
|
+
machineToMachineLimit: number;
|
|
459
|
+
resourcesLimit: number;
|
|
460
|
+
scopesPerResourceLimit: number;
|
|
461
|
+
socialConnectorsLimit: number;
|
|
462
|
+
machineToMachineRolesLimit: number;
|
|
463
|
+
scopesPerRoleLimit: number;
|
|
464
|
+
hooksLimit: number;
|
|
465
|
+
mfaEnabled: boolean;
|
|
466
|
+
organizationsEnabled: boolean;
|
|
467
|
+
thirdPartyApplicationsLimit: number;
|
|
468
|
+
tenantMembersLimit: number;
|
|
469
|
+
customJwtEnabled: boolean;
|
|
470
|
+
subjectTokenEnabled: boolean;
|
|
471
|
+
bringYourUiEnabled: boolean;
|
|
472
|
+
userRolesLimit: number;
|
|
473
|
+
enterpriseSsoLimit: number;
|
|
474
|
+
};
|
|
475
|
+
resources: Record<string, number>;
|
|
476
|
+
roles: Record<string, number>;
|
|
477
|
+
quota: {
|
|
478
|
+
mauLimit: number | null;
|
|
479
|
+
tokenLimit: number | null;
|
|
480
|
+
applicationsLimit: number | null;
|
|
481
|
+
machineToMachineLimit: number | null;
|
|
482
|
+
resourcesLimit: number | null;
|
|
483
|
+
scopesPerResourceLimit: number | null;
|
|
484
|
+
socialConnectorsLimit: number | null;
|
|
485
|
+
machineToMachineRolesLimit: number | null;
|
|
486
|
+
scopesPerRoleLimit: number | null;
|
|
487
|
+
hooksLimit: number | null;
|
|
488
|
+
auditLogsRetentionDays: number | null;
|
|
489
|
+
mfaEnabled: boolean;
|
|
490
|
+
organizationsEnabled: boolean;
|
|
491
|
+
thirdPartyApplicationsLimit: number | null;
|
|
492
|
+
tenantMembersLimit: number | null;
|
|
493
|
+
customJwtEnabled: boolean;
|
|
494
|
+
subjectTokenEnabled: boolean;
|
|
495
|
+
bringYourUiEnabled: boolean;
|
|
496
|
+
userRolesLimit: number | null;
|
|
497
|
+
enterpriseSsoLimit: number | null;
|
|
498
|
+
};
|
|
499
|
+
}>;
|
|
500
|
+
} & {
|
|
501
|
+
"/tenants/:tenantId/subscription/periodic-usage": import("@withtyped/server").PathGuard<"/:tenantId/subscription/periodic-usage", unknown, unknown, {
|
|
502
|
+
mauLimit: number;
|
|
503
|
+
tokenLimit: number;
|
|
178
504
|
}>;
|
|
179
505
|
} & {
|
|
180
506
|
"/tenants/:tenantId/invoices": import("@withtyped/server").PathGuard<"/:tenantId/invoices", unknown, unknown, {
|
|
181
507
|
invoices: {
|
|
182
508
|
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
183
|
-
createdAt: Date;
|
|
184
509
|
id: string;
|
|
510
|
+
createdAt: Date;
|
|
185
511
|
updatedAt: Date;
|
|
186
512
|
customerId: string | null;
|
|
187
513
|
billingReason: string | null;
|
|
@@ -193,19 +519,21 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
193
519
|
hostedInvoiceUrl: string | null;
|
|
194
520
|
invoicePdf: string | null;
|
|
195
521
|
planName: string | null;
|
|
522
|
+
skuId?: string | null | undefined;
|
|
196
523
|
}[];
|
|
197
524
|
}>;
|
|
198
525
|
} & {
|
|
199
526
|
"/tenants/:tenantId/invoices/:invoiceId/hosted-invoice-url": import("@withtyped/server").PathGuard<"/:tenantId/invoices/:invoiceId/hosted-invoice-url", unknown, unknown, {
|
|
200
527
|
hostedInvoiceUrl: string;
|
|
201
528
|
}>;
|
|
202
|
-
} & {
|
|
203
|
-
"/tenants/:tenantId/usage": import("@withtyped/server").PathGuard<"/:tenantId/usage", unknown, unknown, {
|
|
204
|
-
activeUsers: number;
|
|
205
|
-
cost: number;
|
|
206
|
-
}>;
|
|
207
529
|
};
|
|
208
530
|
post: {
|
|
531
|
+
"/tenants/my/subscription/item-updates": import("@withtyped/server").PathGuard<"/my/subscription/item-updates", unknown, {
|
|
532
|
+
usageKey: "tokenLimit" | "machineToMachineLimit" | "resourcesLimit" | "enterpriseSsoLimit" | "hooksLimit" | "tenantMembersLimit" | "mfaEnabled" | "organizationsEnabled";
|
|
533
|
+
}, {
|
|
534
|
+
message: string;
|
|
535
|
+
}>;
|
|
536
|
+
} & {
|
|
209
537
|
"/tenants/:tenantId/stripe-customer-portal": import("@withtyped/server").PathGuard<"/:tenantId/stripe-customer-portal", unknown, {
|
|
210
538
|
callbackUrl?: string | undefined;
|
|
211
539
|
}, {
|
|
@@ -213,14 +541,14 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
213
541
|
}>;
|
|
214
542
|
};
|
|
215
543
|
put: {};
|
|
216
|
-
head: {};
|
|
217
544
|
delete: {
|
|
218
545
|
"/tenants/:tenantId/subscription": import("@withtyped/server").PathGuard<"/:tenantId/subscription", unknown, unknown, unknown>;
|
|
219
546
|
};
|
|
220
547
|
copy: {};
|
|
548
|
+
head: {};
|
|
221
549
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
222
|
-
options: {};
|
|
223
550
|
patch: {};
|
|
551
|
+
options: {};
|
|
224
552
|
get: {
|
|
225
553
|
"/services/mails/usage": import("@withtyped/server").PathGuard<"/mails/usage", {
|
|
226
554
|
from?: string | undefined;
|
|
@@ -231,12 +559,14 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
231
559
|
post: {
|
|
232
560
|
"/services/mails": import("@withtyped/server").PathGuard<"/mails", unknown, {
|
|
233
561
|
data: {
|
|
234
|
-
type: VerificationCodeType;
|
|
562
|
+
type: TemplateType | VerificationCodeType;
|
|
235
563
|
payload: {
|
|
564
|
+
code?: string | undefined;
|
|
565
|
+
link?: string | undefined;
|
|
566
|
+
} & Record<string, string> & {
|
|
236
567
|
senderName?: string | undefined;
|
|
237
568
|
companyInformation?: string | undefined;
|
|
238
569
|
appLogo?: string | undefined;
|
|
239
|
-
code: string;
|
|
240
570
|
};
|
|
241
571
|
to: string;
|
|
242
572
|
};
|
|
@@ -244,28 +574,59 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
244
574
|
} & {
|
|
245
575
|
"/services/send-sms": import("@withtyped/server").PathGuard<"/send-sms", unknown, {
|
|
246
576
|
data: {
|
|
247
|
-
type: VerificationCodeType;
|
|
577
|
+
type: TemplateType | VerificationCodeType;
|
|
248
578
|
to: string;
|
|
249
579
|
payload: {
|
|
250
|
-
code
|
|
251
|
-
|
|
580
|
+
code?: string | undefined;
|
|
581
|
+
link?: string | undefined;
|
|
582
|
+
} & Record<string, string>;
|
|
252
583
|
};
|
|
253
584
|
}, unknown>;
|
|
585
|
+
} & {
|
|
586
|
+
"/services/custom-jwt": import("@withtyped/server").PathGuard<"/custom-jwt", {
|
|
587
|
+
isTest?: string | undefined;
|
|
588
|
+
}, {
|
|
589
|
+
context: Record<string, Json>;
|
|
590
|
+
script: string;
|
|
591
|
+
tokenType: LogtoJwtTokenKeyType.AccessToken;
|
|
592
|
+
token: Record<string, Json>;
|
|
593
|
+
environmentVariables?: Record<string, string> | undefined;
|
|
594
|
+
} | {
|
|
595
|
+
script: string;
|
|
596
|
+
tokenType: LogtoJwtTokenKeyType.ClientCredentials;
|
|
597
|
+
token: Record<string, Json>;
|
|
598
|
+
environmentVariables?: Record<string, string> | undefined;
|
|
599
|
+
}, Record<string, unknown>>;
|
|
600
|
+
};
|
|
601
|
+
put: {
|
|
602
|
+
"/services/custom-jwt/worker": import("@withtyped/server").PathGuard<"/custom-jwt/worker", unknown, {
|
|
603
|
+
"jwt.accessToken"?: {
|
|
604
|
+
production?: string | undefined;
|
|
605
|
+
test?: string | undefined;
|
|
606
|
+
} | undefined;
|
|
607
|
+
"jwt.clientCredentials"?: {
|
|
608
|
+
production?: string | undefined;
|
|
609
|
+
test?: string | undefined;
|
|
610
|
+
} | undefined;
|
|
611
|
+
}, unknown>;
|
|
612
|
+
};
|
|
613
|
+
delete: {
|
|
614
|
+
"/services/custom-jwt/worker": import("@withtyped/server").PathGuard<"/custom-jwt/worker", unknown, unknown, unknown>;
|
|
254
615
|
};
|
|
255
|
-
put: {};
|
|
256
|
-
head: {};
|
|
257
|
-
delete: {};
|
|
258
616
|
copy: {};
|
|
617
|
+
head: {};
|
|
259
618
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
260
|
-
options: {};
|
|
261
619
|
patch: {};
|
|
620
|
+
options: {};
|
|
262
621
|
get: {
|
|
263
622
|
"/subscription-plans": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
|
|
264
|
-
createdAt: Date;
|
|
265
623
|
id: string;
|
|
624
|
+
createdAt: Date;
|
|
266
625
|
name: string;
|
|
626
|
+
updatedAt: Date;
|
|
267
627
|
quota: {
|
|
268
628
|
mauLimit: number | null;
|
|
629
|
+
tokenLimit: number | null;
|
|
269
630
|
applicationsLimit: number | null;
|
|
270
631
|
machineToMachineLimit: number | null;
|
|
271
632
|
resourcesLimit: number | null;
|
|
@@ -276,82 +637,117 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
276
637
|
socialConnectorsLimit: number | null;
|
|
277
638
|
standardConnectorsLimit: number | null;
|
|
278
639
|
rolesLimit: number | null;
|
|
640
|
+
machineToMachineRolesLimit: number | null;
|
|
279
641
|
scopesPerRoleLimit: number | null;
|
|
280
642
|
hooksLimit: number | null;
|
|
281
643
|
auditLogsRetentionDays: number | null;
|
|
282
644
|
mfaEnabled: boolean;
|
|
645
|
+
organizationsEnabled: boolean;
|
|
646
|
+
ssoEnabled: boolean;
|
|
647
|
+
thirdPartyApplicationsLimit: number | null;
|
|
648
|
+
tenantMembersLimit: number | null;
|
|
649
|
+
customJwtEnabled: boolean;
|
|
650
|
+
subjectTokenEnabled: boolean;
|
|
651
|
+
bringYourUiEnabled: boolean;
|
|
283
652
|
};
|
|
284
653
|
stripeProducts: {
|
|
285
|
-
description?: string | undefined;
|
|
286
654
|
type: "flat" | "tier1" | "tier2" | "tier3";
|
|
287
655
|
id: string;
|
|
288
656
|
name: string;
|
|
289
657
|
price: {
|
|
290
|
-
quantity?: 1 | undefined;
|
|
291
|
-
unitAmount?: number | null | undefined;
|
|
292
658
|
id: string;
|
|
293
659
|
unitAmountDecimal: string;
|
|
660
|
+
quantity?: 1 | undefined;
|
|
661
|
+
unitAmount?: number | null | undefined;
|
|
294
662
|
};
|
|
663
|
+
description?: string | undefined;
|
|
295
664
|
}[];
|
|
296
|
-
updatedAt: Date;
|
|
297
665
|
}[]>;
|
|
298
666
|
};
|
|
299
667
|
post: {};
|
|
300
668
|
put: {};
|
|
301
|
-
head: {};
|
|
302
669
|
delete: {};
|
|
303
670
|
copy: {};
|
|
671
|
+
head: {};
|
|
304
672
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
305
|
-
options: {};
|
|
306
673
|
patch: {};
|
|
674
|
+
options: {};
|
|
307
675
|
get: {
|
|
308
|
-
"/
|
|
676
|
+
"/skus": import("@withtyped/server").PathGuard<"/", {
|
|
677
|
+
type?: LogtoSkuType | undefined;
|
|
678
|
+
}, unknown, {
|
|
679
|
+
type: LogtoSkuType;
|
|
309
680
|
id: string;
|
|
310
|
-
name: string;
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
681
|
+
name: string | null;
|
|
682
|
+
quota: {
|
|
683
|
+
mauLimit?: number | null | undefined;
|
|
684
|
+
tokenLimit?: number | null | undefined;
|
|
685
|
+
applicationsLimit?: number | null | undefined;
|
|
686
|
+
machineToMachineLimit?: number | null | undefined;
|
|
687
|
+
resourcesLimit?: number | null | undefined;
|
|
688
|
+
scopesPerResourceLimit?: number | null | undefined;
|
|
689
|
+
socialConnectorsLimit?: number | null | undefined;
|
|
690
|
+
machineToMachineRolesLimit?: number | null | undefined;
|
|
691
|
+
scopesPerRoleLimit?: number | null | undefined;
|
|
692
|
+
hooksLimit?: number | null | undefined;
|
|
693
|
+
auditLogsRetentionDays?: number | null | undefined;
|
|
694
|
+
mfaEnabled?: boolean | undefined;
|
|
695
|
+
organizationsEnabled?: boolean | undefined;
|
|
696
|
+
thirdPartyApplicationsLimit?: number | null | undefined;
|
|
697
|
+
tenantMembersLimit?: number | null | undefined;
|
|
698
|
+
customJwtEnabled?: boolean | undefined;
|
|
699
|
+
subjectTokenEnabled?: boolean | undefined;
|
|
700
|
+
bringYourUiEnabled?: boolean | undefined;
|
|
701
|
+
userRolesLimit?: number | null | undefined;
|
|
702
|
+
enterpriseSsoLimit?: number | null | undefined;
|
|
703
|
+
};
|
|
704
|
+
createdAt: Date;
|
|
705
|
+
updatedAt: Date;
|
|
706
|
+
unitPrice: number | null;
|
|
707
|
+
}[]>;
|
|
315
708
|
};
|
|
316
709
|
post: {};
|
|
317
710
|
put: {};
|
|
318
|
-
head: {};
|
|
319
711
|
delete: {};
|
|
320
712
|
copy: {};
|
|
713
|
+
head: {};
|
|
321
714
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
322
|
-
options: {};
|
|
323
715
|
patch: {};
|
|
716
|
+
options: {};
|
|
324
717
|
get: {
|
|
325
718
|
"/checkout-session/:id": import("@withtyped/server").PathGuard<"/:id", unknown, unknown, {
|
|
326
|
-
status: "open" | "complete" | "expired";
|
|
327
|
-
createdAt: Date;
|
|
328
719
|
id: string;
|
|
720
|
+
createdAt: Date;
|
|
329
721
|
userId: string;
|
|
330
|
-
|
|
722
|
+
status: "open" | "complete" | "expired";
|
|
331
723
|
tenantId: string | null;
|
|
724
|
+
updatedAt: Date;
|
|
332
725
|
planId: string;
|
|
726
|
+
skuId: string | null;
|
|
333
727
|
}>;
|
|
334
728
|
};
|
|
335
729
|
post: {
|
|
336
730
|
"/checkout-session": import("@withtyped/server").PathGuard<"/", unknown, {
|
|
731
|
+
planId: string;
|
|
732
|
+
successCallbackUrl: string;
|
|
337
733
|
tenantId?: string | undefined;
|
|
338
|
-
|
|
734
|
+
skuId?: string | undefined;
|
|
339
735
|
tenantName?: string | undefined;
|
|
736
|
+
tenantTag?: TenantTag | undefined;
|
|
737
|
+
tenantRegionName?: RegionName | undefined;
|
|
340
738
|
cancelCallbackUrl?: string | undefined;
|
|
341
|
-
planId: string;
|
|
342
|
-
successCallbackUrl: string;
|
|
343
739
|
}, {
|
|
344
|
-
redirectUri?: string | null | undefined;
|
|
345
740
|
sessionId: string;
|
|
741
|
+
redirectUri?: string | null | undefined;
|
|
346
742
|
}>;
|
|
347
743
|
};
|
|
348
744
|
put: {};
|
|
349
|
-
head: {};
|
|
350
745
|
delete: {};
|
|
351
746
|
copy: {};
|
|
747
|
+
head: {};
|
|
352
748
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
353
|
-
options: {};
|
|
354
749
|
patch: {};
|
|
750
|
+
options: {};
|
|
355
751
|
get: {
|
|
356
752
|
"/affiliates": import("@withtyped/server").PathGuard<"/", unknown, unknown, AffiliateData[]>;
|
|
357
753
|
};
|
|
@@ -359,57 +755,214 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
359
755
|
"/affiliates": import("@withtyped/server").PathGuard<"/", unknown, {
|
|
360
756
|
name: string;
|
|
361
757
|
}, {
|
|
362
|
-
createdAt: Date;
|
|
363
758
|
id: string;
|
|
759
|
+
createdAt: Date;
|
|
364
760
|
name: string;
|
|
365
761
|
}>;
|
|
366
762
|
} & {
|
|
367
763
|
"/affiliates/:id/properties": import("@withtyped/server").PathGuard<"/:id/properties", unknown, {
|
|
368
|
-
value: string;
|
|
369
764
|
type: "hostname" | "query";
|
|
370
|
-
}, {
|
|
371
765
|
value: string;
|
|
372
|
-
|
|
766
|
+
}, {
|
|
373
767
|
createdAt: Date;
|
|
374
768
|
affiliateId: string;
|
|
769
|
+
type: "hostname" | "query";
|
|
770
|
+
value: string;
|
|
375
771
|
}>;
|
|
376
772
|
};
|
|
377
773
|
put: {};
|
|
378
|
-
head: {};
|
|
379
774
|
delete: {
|
|
380
775
|
"/affiliates/:id/properties": import("@withtyped/server").PathGuard<"/:id/properties", unknown, {
|
|
381
|
-
value: string;
|
|
382
776
|
type: "hostname" | "query";
|
|
777
|
+
value: string;
|
|
383
778
|
}, unknown>;
|
|
384
779
|
};
|
|
385
780
|
copy: {};
|
|
781
|
+
head: {};
|
|
386
782
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
387
|
-
options: {};
|
|
388
783
|
patch: {};
|
|
784
|
+
options: {};
|
|
389
785
|
get: {};
|
|
390
786
|
post: {
|
|
391
787
|
"/affiliate-logs": import("@withtyped/server").PathGuard<"/", unknown, {
|
|
392
|
-
hostname?: string | undefined;
|
|
393
|
-
query?: string | undefined;
|
|
394
788
|
createdAt: string;
|
|
395
789
|
userId: string;
|
|
790
|
+
hostname?: string | undefined;
|
|
791
|
+
query?: string | undefined;
|
|
396
792
|
}, {
|
|
397
|
-
createdAt: Date;
|
|
398
793
|
id: string;
|
|
794
|
+
createdAt: Date;
|
|
399
795
|
affiliateId: string | null;
|
|
400
796
|
userId: string;
|
|
401
797
|
createdVia: {
|
|
798
|
+
createdAt: string;
|
|
402
799
|
hostname?: string | undefined;
|
|
403
800
|
query?: string | undefined;
|
|
404
|
-
createdAt: string;
|
|
405
801
|
};
|
|
406
802
|
}>;
|
|
407
803
|
};
|
|
408
804
|
put: {};
|
|
805
|
+
delete: {};
|
|
806
|
+
copy: {};
|
|
409
807
|
head: {};
|
|
808
|
+
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
809
|
+
patch: {
|
|
810
|
+
"/invitations/:invitationId/status": import("@withtyped/server").PathGuard<"/:invitationId/status", unknown, {
|
|
811
|
+
status: OrganizationInvitationStatus.Accepted;
|
|
812
|
+
}, unknown>;
|
|
813
|
+
};
|
|
814
|
+
options: {};
|
|
815
|
+
get: {
|
|
816
|
+
"/invitations": import("@withtyped/server").PathGuard<"/", unknown, unknown, ({
|
|
817
|
+
id: string;
|
|
818
|
+
createdAt: number;
|
|
819
|
+
status: OrganizationInvitationStatus;
|
|
820
|
+
tenantId: string;
|
|
821
|
+
updatedAt: number;
|
|
822
|
+
inviterId: string | null;
|
|
823
|
+
invitee: string;
|
|
824
|
+
acceptedUserId: string | null;
|
|
825
|
+
organizationId: string;
|
|
826
|
+
expiresAt: number;
|
|
827
|
+
organizationRoles: OrganizationRoleEntity[];
|
|
828
|
+
} & {
|
|
829
|
+
tenantName: string;
|
|
830
|
+
tenantTag: TenantTag;
|
|
831
|
+
})[]>;
|
|
832
|
+
} & {
|
|
833
|
+
"/invitations/:invitationId": import("@withtyped/server").PathGuard<"/:invitationId", unknown, unknown, {
|
|
834
|
+
id: string;
|
|
835
|
+
createdAt: number;
|
|
836
|
+
status: OrganizationInvitationStatus;
|
|
837
|
+
tenantId: string;
|
|
838
|
+
updatedAt: number;
|
|
839
|
+
inviterId: string | null;
|
|
840
|
+
invitee: string;
|
|
841
|
+
acceptedUserId: string | null;
|
|
842
|
+
organizationId: string;
|
|
843
|
+
expiresAt: number;
|
|
844
|
+
organizationRoles: OrganizationRoleEntity[];
|
|
845
|
+
}>;
|
|
846
|
+
};
|
|
847
|
+
post: {};
|
|
848
|
+
put: {};
|
|
410
849
|
delete: {};
|
|
411
850
|
copy: {};
|
|
851
|
+
head: {};
|
|
852
|
+
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
853
|
+
patch: {};
|
|
854
|
+
options: {};
|
|
855
|
+
get: {};
|
|
856
|
+
post: {};
|
|
857
|
+
put: {};
|
|
858
|
+
delete: {
|
|
859
|
+
"/me": import("@withtyped/server").PathGuard<"/", unknown, unknown, unknown>;
|
|
860
|
+
};
|
|
861
|
+
copy: {};
|
|
862
|
+
head: {};
|
|
412
863
|
}, "/api">>, "/api">;
|
|
864
|
+
export declare const tenantAuthRouter: import("@withtyped/server").Router<RequestContext, import("@withtyped/server").WithBodyContext<import("@withtyped/server").BaseContext & {
|
|
865
|
+
request: {
|
|
866
|
+
id?: string | undefined;
|
|
867
|
+
method?: import("@withtyped/server").RequestMethod | undefined;
|
|
868
|
+
headers: import("http").IncomingHttpHeaders;
|
|
869
|
+
url: URL;
|
|
870
|
+
body?: unknown;
|
|
871
|
+
};
|
|
872
|
+
}>, import("@withtyped/server").MergeRoutes<import("@withtyped/server").BaseRoutes, import("@withtyped/server").RoutesWithPrefix<{
|
|
873
|
+
patch: {
|
|
874
|
+
"/:tenantId/invitations/:invitationId/status": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId/status", unknown, {
|
|
875
|
+
status: OrganizationInvitationStatus.Revoked;
|
|
876
|
+
}, {
|
|
877
|
+
id: string;
|
|
878
|
+
createdAt: number;
|
|
879
|
+
status: OrganizationInvitationStatus;
|
|
880
|
+
tenantId: string;
|
|
881
|
+
updatedAt: number;
|
|
882
|
+
inviterId: string | null;
|
|
883
|
+
invitee: string;
|
|
884
|
+
acceptedUserId: string | null;
|
|
885
|
+
organizationId: string;
|
|
886
|
+
expiresAt: number;
|
|
887
|
+
organizationRoles: OrganizationRoleEntity[];
|
|
888
|
+
}>;
|
|
889
|
+
};
|
|
890
|
+
options: {};
|
|
891
|
+
get: {
|
|
892
|
+
"/:tenantId/members": import("@withtyped/server").PathGuard<"/:tenantId/members", unknown, unknown, {
|
|
893
|
+
id: string;
|
|
894
|
+
name: string | null;
|
|
895
|
+
username: string | null;
|
|
896
|
+
primaryEmail: string | null;
|
|
897
|
+
primaryPhone: string | null;
|
|
898
|
+
avatar: string | null;
|
|
899
|
+
organizationRoles: OrganizationRoleEntity[];
|
|
900
|
+
}[]>;
|
|
901
|
+
} & {
|
|
902
|
+
"/:tenantId/members/:userId/scopes": import("@withtyped/server").PathGuard<"/:tenantId/members/:userId/scopes", unknown, unknown, OrganizationScope[]>;
|
|
903
|
+
} & {
|
|
904
|
+
"/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, unknown, ({
|
|
905
|
+
id: string;
|
|
906
|
+
createdAt: number;
|
|
907
|
+
status: OrganizationInvitationStatus;
|
|
908
|
+
tenantId: string;
|
|
909
|
+
updatedAt: number;
|
|
910
|
+
inviterId: string | null;
|
|
911
|
+
invitee: string;
|
|
912
|
+
acceptedUserId: string | null;
|
|
913
|
+
organizationId: string;
|
|
914
|
+
expiresAt: number;
|
|
915
|
+
organizationRoles: OrganizationRoleEntity[];
|
|
916
|
+
} & {
|
|
917
|
+
inviterName?: string | undefined;
|
|
918
|
+
})[]>;
|
|
919
|
+
};
|
|
920
|
+
post: {
|
|
921
|
+
"/:tenantId/invitations": import("@withtyped/server").PathGuard<"/:tenantId/invitations", unknown, {
|
|
922
|
+
invitee: string | string[];
|
|
923
|
+
roleName: TenantRole;
|
|
924
|
+
expiresAt?: number | undefined;
|
|
925
|
+
}, {
|
|
926
|
+
id: string;
|
|
927
|
+
createdAt: number;
|
|
928
|
+
status: OrganizationInvitationStatus;
|
|
929
|
+
tenantId: string;
|
|
930
|
+
updatedAt: number;
|
|
931
|
+
inviterId: string | null;
|
|
932
|
+
invitee: string;
|
|
933
|
+
acceptedUserId: string | null;
|
|
934
|
+
organizationId: string;
|
|
935
|
+
expiresAt: number;
|
|
936
|
+
organizationRoles: OrganizationRoleEntity[];
|
|
937
|
+
} | {
|
|
938
|
+
id: string;
|
|
939
|
+
createdAt: number;
|
|
940
|
+
status: OrganizationInvitationStatus;
|
|
941
|
+
tenantId: string;
|
|
942
|
+
updatedAt: number;
|
|
943
|
+
inviterId: string | null;
|
|
944
|
+
invitee: string;
|
|
945
|
+
acceptedUserId: string | null;
|
|
946
|
+
organizationId: string;
|
|
947
|
+
expiresAt: number;
|
|
948
|
+
organizationRoles: OrganizationRoleEntity[];
|
|
949
|
+
}[]>;
|
|
950
|
+
} & {
|
|
951
|
+
"/:tenantId/invitations/:invitationId/message": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId/message", unknown, unknown, unknown>;
|
|
952
|
+
};
|
|
953
|
+
put: {
|
|
954
|
+
"/:tenantId/members/:userId/roles": import("@withtyped/server").PathGuard<"/:tenantId/members/:userId/roles", unknown, {
|
|
955
|
+
roleName: TenantRole;
|
|
956
|
+
}, unknown>;
|
|
957
|
+
};
|
|
958
|
+
delete: {
|
|
959
|
+
"/:tenantId/members/:userId": import("@withtyped/server").PathGuard<"/:tenantId/members/:userId", unknown, unknown, unknown>;
|
|
960
|
+
} & {
|
|
961
|
+
"/:tenantId/invitations/:invitationId": import("@withtyped/server").PathGuard<"/:tenantId/invitations/:invitationId", unknown, unknown, unknown>;
|
|
962
|
+
};
|
|
963
|
+
copy: {};
|
|
964
|
+
head: {};
|
|
965
|
+
}, "/api/tenants">>, "/api/tenants">;
|
|
413
966
|
|
|
414
967
|
export {
|
|
415
968
|
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-e14156b",
|
|
4
4
|
"description": "Logto Cloud service.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"author": "Silverhand Inc. <contact@silverhand.io>",
|
|
@@ -16,25 +16,24 @@
|
|
|
16
16
|
"#src/*": "./build/*"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@silverhand/eslint-config": "
|
|
20
|
-
"@silverhand/
|
|
21
|
-
"@silverhand/ts-config": "4.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": "^
|
|
29
|
-
"eslint": "^8.
|
|
30
|
-
"
|
|
31
|
-
"lint-staged": "^14.0.0",
|
|
26
|
+
"dts-bundle-generator": "^9.3.1",
|
|
27
|
+
"eslint": "^8.57.0",
|
|
28
|
+
"lint-staged": "^15.0.0",
|
|
32
29
|
"nodemon": "^3.0.0",
|
|
33
30
|
"prettier": "^3.0.0",
|
|
34
|
-
"typescript": "^5.
|
|
31
|
+
"typescript": "^5.3.3",
|
|
32
|
+
"vite-tsconfig-paths": "^4.3.1",
|
|
33
|
+
"vitest": "^2.0.0"
|
|
35
34
|
},
|
|
36
35
|
"engines": {
|
|
37
|
-
"node": "^
|
|
36
|
+
"node": "^20.9.0"
|
|
38
37
|
},
|
|
39
38
|
"eslintConfig": {
|
|
40
39
|
"extends": "@silverhand",
|
|
@@ -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.1",
|
|
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
|
-
"build:lib": "rm -rf lib/ && dts-bundle-generator src/routes/index.ts --project tsconfig.build.json -o lib/routes/index.d.ts",
|
|
61
|
-
"build:test": "rm -rf build/ && tsc -p tsconfig.test.json --sourcemap",
|
|
59
|
+
"build:lib": "rm -rf lib/ && dts-bundle-generator src/routes/index.ts --project tsconfig.build.lib.json -o lib/routes/index.d.ts",
|
|
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
|
}
|