@logto/cloud 0.2.5-d434baa → 0.2.5-faca9a9
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 +65 -46
- package/package.json +10 -10
package/lib/routes/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated by dts-bundle-generator
|
|
1
|
+
// Generated by dts-bundle-generator v9.0.0
|
|
2
2
|
|
|
3
3
|
import { RequestContext } from '@withtyped/server';
|
|
4
4
|
import { InferModelType } from '@withtyped/server/model';
|
|
@@ -9,29 +9,38 @@ export type WithAuthContext<Context = RequestContext> = Context & {
|
|
|
9
9
|
scopes: string[];
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
|
-
declare enum TenantTag {
|
|
13
|
-
Development = "development",
|
|
14
|
-
Staging = "staging",
|
|
15
|
-
Production = "production"
|
|
16
|
-
}
|
|
17
12
|
declare enum VerificationCodeType {
|
|
18
13
|
SignIn = "SignIn",
|
|
19
14
|
Register = "Register",
|
|
20
15
|
ForgotPassword = "ForgotPassword",
|
|
21
|
-
/** @deprecated */
|
|
22
|
-
Continue = "Continue",
|
|
23
16
|
Generic = "Generic",
|
|
24
17
|
/** @deprecated Use `Generic` type template for sending test sms/email use case */
|
|
25
18
|
Test = "Test"
|
|
26
19
|
}
|
|
27
|
-
declare
|
|
20
|
+
declare enum TemplateType {
|
|
21
|
+
/** The template for sending verification code when user is signing in. */
|
|
22
|
+
SignIn = "SignIn",
|
|
23
|
+
/** The template for sending verification code when user is registering. */
|
|
24
|
+
Register = "Register",
|
|
25
|
+
/** The template for sending verification code when user is resetting password. */
|
|
26
|
+
ForgotPassword = "ForgotPassword",
|
|
27
|
+
/** The template for sending organization invitation. */
|
|
28
|
+
OrganizationInvitation = "OrganizationInvitation",
|
|
29
|
+
/** The template for generic usage. */
|
|
30
|
+
Generic = "Generic"
|
|
31
|
+
}
|
|
32
|
+
declare enum TenantTag {
|
|
33
|
+
Development = "development",
|
|
34
|
+
Production = "production"
|
|
35
|
+
}
|
|
36
|
+
declare const AffiliateProperties: import("@withtyped/server/lib/model/index.js").default<"affiliate_properties", {
|
|
28
37
|
createdAt: Date;
|
|
29
38
|
affiliateId: string;
|
|
30
39
|
type: "hostname" | "query";
|
|
31
40
|
value: string;
|
|
32
41
|
}, "createdAt", "createdAt">;
|
|
33
42
|
export type AffiliateProperty = InferModelType<typeof AffiliateProperties>;
|
|
34
|
-
declare const Affiliates: import("@withtyped/server/model").default<"affiliates", {
|
|
43
|
+
declare const Affiliates: import("@withtyped/server/lib/model/index.js").default<"affiliates", {
|
|
35
44
|
id: string;
|
|
36
45
|
createdAt: Date;
|
|
37
46
|
name: string;
|
|
@@ -45,10 +54,14 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
45
54
|
patch: {
|
|
46
55
|
"/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, {
|
|
47
56
|
name?: string | undefined;
|
|
48
|
-
tag?: TenantTag | undefined;
|
|
49
57
|
}, {
|
|
50
58
|
id: string;
|
|
51
59
|
name: string;
|
|
60
|
+
usage: {
|
|
61
|
+
activeUsers: number;
|
|
62
|
+
cost: number;
|
|
63
|
+
tokenUsage: number;
|
|
64
|
+
};
|
|
52
65
|
indicator: string;
|
|
53
66
|
isSuspended: boolean;
|
|
54
67
|
planId: string;
|
|
@@ -59,10 +72,6 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
59
72
|
currentPeriodEnd: Date;
|
|
60
73
|
};
|
|
61
74
|
tag: TenantTag;
|
|
62
|
-
usage: {
|
|
63
|
-
activeUsers: number;
|
|
64
|
-
cost: number;
|
|
65
|
-
};
|
|
66
75
|
openInvoices: {
|
|
67
76
|
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
68
77
|
createdAt: Date;
|
|
@@ -84,6 +93,11 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
84
93
|
"/tenants": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
|
|
85
94
|
id: string;
|
|
86
95
|
name: string;
|
|
96
|
+
usage: {
|
|
97
|
+
activeUsers: number;
|
|
98
|
+
cost: number;
|
|
99
|
+
tokenUsage: number;
|
|
100
|
+
};
|
|
87
101
|
indicator: string;
|
|
88
102
|
isSuspended: boolean;
|
|
89
103
|
planId: string;
|
|
@@ -94,10 +108,6 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
94
108
|
currentPeriodEnd: Date;
|
|
95
109
|
};
|
|
96
110
|
tag: TenantTag;
|
|
97
|
-
usage: {
|
|
98
|
-
activeUsers: number;
|
|
99
|
-
cost: number;
|
|
100
|
-
};
|
|
101
111
|
openInvoices: {
|
|
102
112
|
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
103
113
|
createdAt: Date;
|
|
@@ -122,6 +132,11 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
122
132
|
}, {
|
|
123
133
|
id: string;
|
|
124
134
|
name: string;
|
|
135
|
+
usage: {
|
|
136
|
+
activeUsers: number;
|
|
137
|
+
cost: number;
|
|
138
|
+
tokenUsage: number;
|
|
139
|
+
};
|
|
125
140
|
indicator: string;
|
|
126
141
|
isSuspended: boolean;
|
|
127
142
|
planId: string;
|
|
@@ -132,10 +147,6 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
132
147
|
currentPeriodEnd: Date;
|
|
133
148
|
};
|
|
134
149
|
tag: TenantTag;
|
|
135
|
-
usage: {
|
|
136
|
-
activeUsers: number;
|
|
137
|
-
cost: number;
|
|
138
|
-
};
|
|
139
150
|
openInvoices: {
|
|
140
151
|
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
141
152
|
createdAt: Date;
|
|
@@ -154,11 +165,11 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
154
165
|
}>;
|
|
155
166
|
};
|
|
156
167
|
put: {};
|
|
157
|
-
head: {};
|
|
158
168
|
delete: {
|
|
159
169
|
"/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, unknown, unknown>;
|
|
160
170
|
};
|
|
161
171
|
copy: {};
|
|
172
|
+
head: {};
|
|
162
173
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
163
174
|
options: {};
|
|
164
175
|
patch: {};
|
|
@@ -203,6 +214,7 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
203
214
|
"/tenants/:tenantId/usage": import("@withtyped/server").PathGuard<"/:tenantId/usage", unknown, unknown, {
|
|
204
215
|
activeUsers: number;
|
|
205
216
|
cost: number;
|
|
217
|
+
tokenUsage: number;
|
|
206
218
|
}>;
|
|
207
219
|
};
|
|
208
220
|
post: {
|
|
@@ -213,11 +225,11 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
213
225
|
}>;
|
|
214
226
|
};
|
|
215
227
|
put: {};
|
|
216
|
-
head: {};
|
|
217
228
|
delete: {
|
|
218
229
|
"/tenants/:tenantId/subscription": import("@withtyped/server").PathGuard<"/:tenantId/subscription", unknown, unknown, unknown>;
|
|
219
230
|
};
|
|
220
231
|
copy: {};
|
|
232
|
+
head: {};
|
|
221
233
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
222
234
|
options: {};
|
|
223
235
|
patch: {};
|
|
@@ -231,12 +243,13 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
231
243
|
post: {
|
|
232
244
|
"/services/mails": import("@withtyped/server").PathGuard<"/mails", unknown, {
|
|
233
245
|
data: {
|
|
234
|
-
type: VerificationCodeType;
|
|
246
|
+
type: TemplateType | VerificationCodeType;
|
|
235
247
|
payload: {
|
|
248
|
+
code?: string | undefined;
|
|
249
|
+
link?: string | undefined;
|
|
236
250
|
senderName?: string | undefined;
|
|
237
251
|
companyInformation?: string | undefined;
|
|
238
252
|
appLogo?: string | undefined;
|
|
239
|
-
code: string;
|
|
240
253
|
};
|
|
241
254
|
to: string;
|
|
242
255
|
};
|
|
@@ -244,18 +257,19 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
244
257
|
} & {
|
|
245
258
|
"/services/send-sms": import("@withtyped/server").PathGuard<"/send-sms", unknown, {
|
|
246
259
|
data: {
|
|
247
|
-
type: VerificationCodeType;
|
|
260
|
+
type: TemplateType | VerificationCodeType;
|
|
248
261
|
to: string;
|
|
249
262
|
payload: {
|
|
250
|
-
code
|
|
263
|
+
code?: string | undefined;
|
|
264
|
+
link?: string | undefined;
|
|
251
265
|
};
|
|
252
266
|
};
|
|
253
267
|
}, unknown>;
|
|
254
268
|
};
|
|
255
269
|
put: {};
|
|
256
|
-
head: {};
|
|
257
270
|
delete: {};
|
|
258
271
|
copy: {};
|
|
272
|
+
head: {};
|
|
259
273
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
260
274
|
options: {};
|
|
261
275
|
patch: {};
|
|
@@ -266,6 +280,7 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
266
280
|
name: string;
|
|
267
281
|
quota: {
|
|
268
282
|
mauLimit: number | null;
|
|
283
|
+
tokenLimit: number | null;
|
|
269
284
|
applicationsLimit: number | null;
|
|
270
285
|
machineToMachineLimit: number | null;
|
|
271
286
|
resourcesLimit: number | null;
|
|
@@ -276,38 +291,42 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
276
291
|
socialConnectorsLimit: number | null;
|
|
277
292
|
standardConnectorsLimit: number | null;
|
|
278
293
|
rolesLimit: number | null;
|
|
294
|
+
machineToMachineRolesLimit: number | null;
|
|
279
295
|
scopesPerRoleLimit: number | null;
|
|
280
296
|
hooksLimit: number | null;
|
|
281
297
|
auditLogsRetentionDays: number | null;
|
|
282
298
|
mfaEnabled: boolean;
|
|
299
|
+
organizationsEnabled: boolean;
|
|
300
|
+
ssoEnabled: boolean;
|
|
301
|
+
thirdPartyApplicationsLimit: number | null;
|
|
283
302
|
};
|
|
284
303
|
stripeProducts: {
|
|
285
|
-
description?: string | undefined;
|
|
286
304
|
type: "flat" | "tier1" | "tier2" | "tier3";
|
|
287
305
|
id: string;
|
|
288
306
|
name: string;
|
|
289
307
|
price: {
|
|
290
|
-
quantity?: 1 | undefined;
|
|
291
|
-
unitAmount?: number | null | undefined;
|
|
292
308
|
id: string;
|
|
293
309
|
unitAmountDecimal: string;
|
|
310
|
+
quantity?: 1 | undefined;
|
|
311
|
+
unitAmount?: number | null | undefined;
|
|
294
312
|
};
|
|
313
|
+
description?: string | undefined;
|
|
295
314
|
}[];
|
|
296
315
|
updatedAt: Date;
|
|
297
316
|
}[]>;
|
|
298
317
|
};
|
|
299
318
|
post: {};
|
|
300
319
|
put: {};
|
|
301
|
-
head: {};
|
|
302
320
|
delete: {};
|
|
303
321
|
copy: {};
|
|
322
|
+
head: {};
|
|
304
323
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
305
324
|
options: {};
|
|
306
325
|
patch: {};
|
|
307
326
|
get: {
|
|
308
327
|
"/my/tenant": import("@withtyped/server").PathGuard<"/tenant", unknown, unknown, {
|
|
309
|
-
id: string;
|
|
310
328
|
name: string;
|
|
329
|
+
id: string;
|
|
311
330
|
indicator: string;
|
|
312
331
|
isSuspended: boolean;
|
|
313
332
|
tag: TenantTag;
|
|
@@ -315,9 +334,9 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
315
334
|
};
|
|
316
335
|
post: {};
|
|
317
336
|
put: {};
|
|
318
|
-
head: {};
|
|
319
337
|
delete: {};
|
|
320
338
|
copy: {};
|
|
339
|
+
head: {};
|
|
321
340
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
322
341
|
options: {};
|
|
323
342
|
patch: {};
|
|
@@ -334,21 +353,21 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
334
353
|
};
|
|
335
354
|
post: {
|
|
336
355
|
"/checkout-session": import("@withtyped/server").PathGuard<"/", unknown, {
|
|
356
|
+
planId: string;
|
|
357
|
+
successCallbackUrl: string;
|
|
337
358
|
tenantId?: string | undefined;
|
|
359
|
+
cancelCallbackUrl?: string | undefined;
|
|
338
360
|
tenantTag?: TenantTag | undefined;
|
|
339
361
|
tenantName?: string | undefined;
|
|
340
|
-
cancelCallbackUrl?: string | undefined;
|
|
341
|
-
planId: string;
|
|
342
|
-
successCallbackUrl: string;
|
|
343
362
|
}, {
|
|
344
|
-
redirectUri?: string | null | undefined;
|
|
345
363
|
sessionId: string;
|
|
364
|
+
redirectUri?: string | null | undefined;
|
|
346
365
|
}>;
|
|
347
366
|
};
|
|
348
367
|
put: {};
|
|
349
|
-
head: {};
|
|
350
368
|
delete: {};
|
|
351
369
|
copy: {};
|
|
370
|
+
head: {};
|
|
352
371
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
353
372
|
options: {};
|
|
354
373
|
patch: {};
|
|
@@ -375,7 +394,6 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
375
394
|
}>;
|
|
376
395
|
};
|
|
377
396
|
put: {};
|
|
378
|
-
head: {};
|
|
379
397
|
delete: {
|
|
380
398
|
"/affiliates/:id/properties": import("@withtyped/server").PathGuard<"/:id/properties", unknown, {
|
|
381
399
|
value: string;
|
|
@@ -383,32 +401,33 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
383
401
|
}, unknown>;
|
|
384
402
|
};
|
|
385
403
|
copy: {};
|
|
404
|
+
head: {};
|
|
386
405
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
387
406
|
options: {};
|
|
388
407
|
patch: {};
|
|
389
408
|
get: {};
|
|
390
409
|
post: {
|
|
391
410
|
"/affiliate-logs": import("@withtyped/server").PathGuard<"/", unknown, {
|
|
392
|
-
hostname?: string | undefined;
|
|
393
|
-
query?: string | undefined;
|
|
394
411
|
createdAt: string;
|
|
395
412
|
userId: string;
|
|
413
|
+
hostname?: string | undefined;
|
|
414
|
+
query?: string | undefined;
|
|
396
415
|
}, {
|
|
397
416
|
createdAt: Date;
|
|
398
417
|
id: string;
|
|
399
418
|
affiliateId: string | null;
|
|
400
419
|
userId: string;
|
|
401
420
|
createdVia: {
|
|
421
|
+
createdAt: string;
|
|
402
422
|
hostname?: string | undefined;
|
|
403
423
|
query?: string | undefined;
|
|
404
|
-
createdAt: string;
|
|
405
424
|
};
|
|
406
425
|
}>;
|
|
407
426
|
};
|
|
408
427
|
put: {};
|
|
409
|
-
head: {};
|
|
410
428
|
delete: {};
|
|
411
429
|
copy: {};
|
|
430
|
+
head: {};
|
|
412
431
|
}, "/api">>, "/api">;
|
|
413
432
|
|
|
414
433
|
export {
|
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-faca9a9",
|
|
4
4
|
"description": "Logto Cloud service.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"author": "Silverhand Inc. <contact@silverhand.io>",
|
|
@@ -16,25 +16,25 @@
|
|
|
16
16
|
"#src/*": "./build/*"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@silverhand/eslint-config": "
|
|
19
|
+
"@silverhand/eslint-config": "5.0.0",
|
|
20
20
|
"@silverhand/jest-config": "4.0.0",
|
|
21
|
-
"@silverhand/ts-config": "
|
|
21
|
+
"@silverhand/ts-config": "5.0.0",
|
|
22
22
|
"@types/accepts": "^1.3.5",
|
|
23
23
|
"@types/http-proxy": "^1.17.9",
|
|
24
24
|
"@types/jest": "^29.4.0",
|
|
25
25
|
"@types/mime-types": "^2.1.1",
|
|
26
|
-
"@types/node": "^
|
|
26
|
+
"@types/node": "^20.0.0",
|
|
27
27
|
"@types/yargs": "^17.0.24",
|
|
28
|
-
"dts-bundle-generator": "^
|
|
28
|
+
"dts-bundle-generator": "^9.0.0",
|
|
29
29
|
"eslint": "^8.44.0",
|
|
30
30
|
"jest": "^29.5.0",
|
|
31
|
-
"lint-staged": "^
|
|
31
|
+
"lint-staged": "^15.0.0",
|
|
32
32
|
"nodemon": "^3.0.0",
|
|
33
33
|
"prettier": "^3.0.0",
|
|
34
|
-
"typescript": "^5.
|
|
34
|
+
"typescript": "^5.3.3"
|
|
35
35
|
},
|
|
36
36
|
"engines": {
|
|
37
|
-
"node": "^
|
|
37
|
+
"node": "^20.9.0"
|
|
38
38
|
},
|
|
39
39
|
"eslintConfig": {
|
|
40
40
|
"extends": "@silverhand",
|
|
@@ -50,14 +50,14 @@
|
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@silverhand/essentials": "^2.8.
|
|
53
|
+
"@silverhand/essentials": "^2.8.8",
|
|
54
54
|
"@withtyped/server": "^0.12.7"
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
57
57
|
"precommit": "lint-staged",
|
|
58
58
|
"build": "rm -rf build/ && tsc -p tsconfig.build.json && pnpm build:lib",
|
|
59
59
|
"//": "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",
|
|
60
|
+
"build:lib": "rm -rf lib/ && dts-bundle-generator src/routes/index.ts --project tsconfig.build.lib.json -o lib/routes/index.d.ts",
|
|
61
61
|
"build:test": "rm -rf build/ && tsc -p tsconfig.test.json --sourcemap",
|
|
62
62
|
"lint": "eslint --ext .ts src",
|
|
63
63
|
"lint:report": "pnpm lint --format json --output-file report.json",
|