@logto/cloud 0.2.5-8065345 → 0.2.5-9257c0d
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/{build → lib}/routes/index.d.ts +133 -51
- package/package.json +12 -12
|
@@ -9,21 +9,19 @@ 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
|
}
|
|
20
|
+
declare enum TenantTag {
|
|
21
|
+
Development = "development",
|
|
22
|
+
Staging = "staging",
|
|
23
|
+
Production = "production"
|
|
24
|
+
}
|
|
27
25
|
declare const AffiliateProperties: import("@withtyped/server/model").default<"affiliate_properties", {
|
|
28
26
|
createdAt: Date;
|
|
29
27
|
affiliateId: string;
|
|
@@ -40,18 +38,43 @@ export type Affiliate = InferModelType<typeof Affiliates>;
|
|
|
40
38
|
export type AffiliateData = Affiliate & {
|
|
41
39
|
properties: Array<Pick<AffiliateProperty, "type" | "value">>;
|
|
42
40
|
};
|
|
43
|
-
declare const router: import("@withtyped/server").Router<WithAuthContext, 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<{
|
|
41
|
+
declare const router: import("@withtyped/server").Router<WithAuthContext, 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<{
|
|
44
42
|
options: {};
|
|
45
43
|
patch: {
|
|
46
44
|
"/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, {
|
|
47
45
|
name?: string | undefined;
|
|
48
|
-
tag?: TenantTag | undefined;
|
|
49
46
|
}, {
|
|
50
47
|
id: string;
|
|
51
48
|
name: string;
|
|
52
49
|
indicator: string;
|
|
50
|
+
isSuspended: boolean;
|
|
53
51
|
planId: string;
|
|
52
|
+
subscription: {
|
|
53
|
+
status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
|
|
54
|
+
planId: string;
|
|
55
|
+
currentPeriodStart: Date;
|
|
56
|
+
currentPeriodEnd: Date;
|
|
57
|
+
};
|
|
54
58
|
tag: TenantTag;
|
|
59
|
+
usage: {
|
|
60
|
+
activeUsers: number;
|
|
61
|
+
cost: number;
|
|
62
|
+
};
|
|
63
|
+
openInvoices: {
|
|
64
|
+
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
65
|
+
createdAt: Date;
|
|
66
|
+
id: string;
|
|
67
|
+
updatedAt: Date;
|
|
68
|
+
customerId: string | null;
|
|
69
|
+
billingReason: string | null;
|
|
70
|
+
periodStart: Date;
|
|
71
|
+
periodEnd: Date;
|
|
72
|
+
amountDue: number;
|
|
73
|
+
amountPaid: number;
|
|
74
|
+
subscriptionId: string | null;
|
|
75
|
+
hostedInvoiceUrl: string | null;
|
|
76
|
+
invoicePdf: string | null;
|
|
77
|
+
}[];
|
|
55
78
|
}>;
|
|
56
79
|
};
|
|
57
80
|
get: {
|
|
@@ -59,8 +82,34 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
59
82
|
id: string;
|
|
60
83
|
name: string;
|
|
61
84
|
indicator: string;
|
|
85
|
+
isSuspended: boolean;
|
|
62
86
|
planId: string;
|
|
87
|
+
subscription: {
|
|
88
|
+
status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
|
|
89
|
+
planId: string;
|
|
90
|
+
currentPeriodStart: Date;
|
|
91
|
+
currentPeriodEnd: Date;
|
|
92
|
+
};
|
|
63
93
|
tag: TenantTag;
|
|
94
|
+
usage: {
|
|
95
|
+
activeUsers: number;
|
|
96
|
+
cost: number;
|
|
97
|
+
};
|
|
98
|
+
openInvoices: {
|
|
99
|
+
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
100
|
+
createdAt: Date;
|
|
101
|
+
id: string;
|
|
102
|
+
updatedAt: Date;
|
|
103
|
+
customerId: string | null;
|
|
104
|
+
billingReason: string | null;
|
|
105
|
+
periodStart: Date;
|
|
106
|
+
periodEnd: Date;
|
|
107
|
+
amountDue: number;
|
|
108
|
+
amountPaid: number;
|
|
109
|
+
subscriptionId: string | null;
|
|
110
|
+
hostedInvoiceUrl: string | null;
|
|
111
|
+
invoicePdf: string | null;
|
|
112
|
+
}[];
|
|
64
113
|
}[]>;
|
|
65
114
|
};
|
|
66
115
|
post: {
|
|
@@ -71,16 +120,42 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
71
120
|
id: string;
|
|
72
121
|
name: string;
|
|
73
122
|
indicator: string;
|
|
123
|
+
isSuspended: boolean;
|
|
74
124
|
planId: string;
|
|
125
|
+
subscription: {
|
|
126
|
+
status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
|
|
127
|
+
planId: string;
|
|
128
|
+
currentPeriodStart: Date;
|
|
129
|
+
currentPeriodEnd: Date;
|
|
130
|
+
};
|
|
75
131
|
tag: TenantTag;
|
|
132
|
+
usage: {
|
|
133
|
+
activeUsers: number;
|
|
134
|
+
cost: number;
|
|
135
|
+
};
|
|
136
|
+
openInvoices: {
|
|
137
|
+
status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
|
|
138
|
+
createdAt: Date;
|
|
139
|
+
id: string;
|
|
140
|
+
updatedAt: Date;
|
|
141
|
+
customerId: string | null;
|
|
142
|
+
billingReason: string | null;
|
|
143
|
+
periodStart: Date;
|
|
144
|
+
periodEnd: Date;
|
|
145
|
+
amountDue: number;
|
|
146
|
+
amountPaid: number;
|
|
147
|
+
subscriptionId: string | null;
|
|
148
|
+
hostedInvoiceUrl: string | null;
|
|
149
|
+
invoicePdf: string | null;
|
|
150
|
+
}[];
|
|
76
151
|
}>;
|
|
77
152
|
};
|
|
78
153
|
put: {};
|
|
79
|
-
head: {};
|
|
80
154
|
delete: {
|
|
81
155
|
"/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, unknown, unknown>;
|
|
82
156
|
};
|
|
83
157
|
copy: {};
|
|
158
|
+
head: {};
|
|
84
159
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
85
160
|
options: {};
|
|
86
161
|
patch: {};
|
|
@@ -117,6 +192,10 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
117
192
|
planName: string | null;
|
|
118
193
|
}[];
|
|
119
194
|
}>;
|
|
195
|
+
} & {
|
|
196
|
+
"/tenants/:tenantId/invoices/:invoiceId/hosted-invoice-url": import("@withtyped/server").PathGuard<"/:tenantId/invoices/:invoiceId/hosted-invoice-url", unknown, unknown, {
|
|
197
|
+
hostedInvoiceUrl: string;
|
|
198
|
+
}>;
|
|
120
199
|
} & {
|
|
121
200
|
"/tenants/:tenantId/usage": import("@withtyped/server").PathGuard<"/:tenantId/usage", unknown, unknown, {
|
|
122
201
|
activeUsers: number;
|
|
@@ -131,11 +210,11 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
131
210
|
}>;
|
|
132
211
|
};
|
|
133
212
|
put: {};
|
|
134
|
-
head: {};
|
|
135
213
|
delete: {
|
|
136
214
|
"/tenants/:tenantId/subscription": import("@withtyped/server").PathGuard<"/:tenantId/subscription", unknown, unknown, unknown>;
|
|
137
215
|
};
|
|
138
216
|
copy: {};
|
|
217
|
+
head: {};
|
|
139
218
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
140
219
|
options: {};
|
|
141
220
|
patch: {};
|
|
@@ -147,29 +226,16 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
147
226
|
}>;
|
|
148
227
|
};
|
|
149
228
|
post: {
|
|
150
|
-
"/services/send-email": import("@withtyped/server").PathGuard<"/send-email", unknown, {
|
|
151
|
-
data: {
|
|
152
|
-
type: VerificationCodeType;
|
|
153
|
-
to: string;
|
|
154
|
-
payload: {
|
|
155
|
-
senderName?: string | undefined;
|
|
156
|
-
companyInformation?: string | undefined;
|
|
157
|
-
appLogo?: string | undefined;
|
|
158
|
-
code: string;
|
|
159
|
-
};
|
|
160
|
-
};
|
|
161
|
-
}, unknown>;
|
|
162
|
-
} & {
|
|
163
229
|
"/services/mails": import("@withtyped/server").PathGuard<"/mails", unknown, {
|
|
164
230
|
data: {
|
|
165
231
|
type: VerificationCodeType;
|
|
166
|
-
to: string;
|
|
167
232
|
payload: {
|
|
233
|
+
code: string;
|
|
168
234
|
senderName?: string | undefined;
|
|
169
235
|
companyInformation?: string | undefined;
|
|
170
236
|
appLogo?: string | undefined;
|
|
171
|
-
code: string;
|
|
172
237
|
};
|
|
238
|
+
to: string;
|
|
173
239
|
};
|
|
174
240
|
}, unknown>;
|
|
175
241
|
} & {
|
|
@@ -178,18 +244,15 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
178
244
|
type: VerificationCodeType;
|
|
179
245
|
to: string;
|
|
180
246
|
payload: {
|
|
181
|
-
senderName?: string | undefined;
|
|
182
|
-
companyInformation?: string | undefined;
|
|
183
|
-
appLogo?: string | undefined;
|
|
184
247
|
code: string;
|
|
185
248
|
};
|
|
186
249
|
};
|
|
187
250
|
}, unknown>;
|
|
188
251
|
};
|
|
189
252
|
put: {};
|
|
190
|
-
head: {};
|
|
191
253
|
delete: {};
|
|
192
254
|
copy: {};
|
|
255
|
+
head: {};
|
|
193
256
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
194
257
|
options: {};
|
|
195
258
|
patch: {};
|
|
@@ -200,40 +263,59 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
200
263
|
name: string;
|
|
201
264
|
quota: {
|
|
202
265
|
mauLimit: number | null;
|
|
203
|
-
applicationsLimit: number;
|
|
204
|
-
machineToMachineLimit: number;
|
|
205
|
-
resourcesLimit: number;
|
|
206
|
-
scopesPerResourceLimit: number;
|
|
266
|
+
applicationsLimit: number | null;
|
|
267
|
+
machineToMachineLimit: number | null;
|
|
268
|
+
resourcesLimit: number | null;
|
|
269
|
+
scopesPerResourceLimit: number | null;
|
|
207
270
|
customDomainEnabled: boolean;
|
|
208
271
|
omniSignInEnabled: boolean;
|
|
209
272
|
builtInEmailConnectorEnabled: boolean;
|
|
210
273
|
socialConnectorsLimit: number | null;
|
|
211
|
-
standardConnectorsLimit: number;
|
|
212
|
-
rolesLimit: number;
|
|
274
|
+
standardConnectorsLimit: number | null;
|
|
275
|
+
rolesLimit: number | null;
|
|
213
276
|
scopesPerRoleLimit: number | null;
|
|
214
|
-
hooksLimit: number;
|
|
215
|
-
auditLogsRetentionDays: number;
|
|
277
|
+
hooksLimit: number | null;
|
|
278
|
+
auditLogsRetentionDays: number | null;
|
|
279
|
+
mfaEnabled: boolean;
|
|
280
|
+
organizationsEnabled: boolean;
|
|
216
281
|
};
|
|
217
282
|
stripeProducts: {
|
|
218
|
-
description?: string | undefined;
|
|
219
283
|
type: "flat" | "tier1" | "tier2" | "tier3";
|
|
220
284
|
id: string;
|
|
221
285
|
name: string;
|
|
222
286
|
price: {
|
|
223
|
-
quantity?: 1 | undefined;
|
|
224
|
-
unitAmount?: number | null | undefined;
|
|
225
287
|
id: string;
|
|
226
288
|
unitAmountDecimal: string;
|
|
289
|
+
quantity?: 1 | undefined;
|
|
290
|
+
unitAmount?: number | null | undefined;
|
|
227
291
|
};
|
|
292
|
+
description?: string | undefined;
|
|
228
293
|
}[];
|
|
229
294
|
updatedAt: Date;
|
|
230
295
|
}[]>;
|
|
231
296
|
};
|
|
232
297
|
post: {};
|
|
233
298
|
put: {};
|
|
299
|
+
delete: {};
|
|
300
|
+
copy: {};
|
|
234
301
|
head: {};
|
|
302
|
+
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
303
|
+
options: {};
|
|
304
|
+
patch: {};
|
|
305
|
+
get: {
|
|
306
|
+
"/my/tenant": import("@withtyped/server").PathGuard<"/tenant", unknown, unknown, {
|
|
307
|
+
name: string;
|
|
308
|
+
id: string;
|
|
309
|
+
indicator: string;
|
|
310
|
+
isSuspended: boolean;
|
|
311
|
+
tag: TenantTag;
|
|
312
|
+
}>;
|
|
313
|
+
};
|
|
314
|
+
post: {};
|
|
315
|
+
put: {};
|
|
235
316
|
delete: {};
|
|
236
317
|
copy: {};
|
|
318
|
+
head: {};
|
|
237
319
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
238
320
|
options: {};
|
|
239
321
|
patch: {};
|
|
@@ -250,21 +332,21 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
250
332
|
};
|
|
251
333
|
post: {
|
|
252
334
|
"/checkout-session": import("@withtyped/server").PathGuard<"/", unknown, {
|
|
335
|
+
planId: string;
|
|
336
|
+
successCallbackUrl: string;
|
|
253
337
|
tenantId?: string | undefined;
|
|
338
|
+
cancelCallbackUrl?: string | undefined;
|
|
254
339
|
tenantTag?: TenantTag | undefined;
|
|
255
340
|
tenantName?: string | undefined;
|
|
256
|
-
cancelCallbackUrl?: string | undefined;
|
|
257
|
-
planId: string;
|
|
258
|
-
successCallbackUrl: string;
|
|
259
341
|
}, {
|
|
260
|
-
redirectUri?: string | null | undefined;
|
|
261
342
|
sessionId: string;
|
|
343
|
+
redirectUri?: string | null | undefined;
|
|
262
344
|
}>;
|
|
263
345
|
};
|
|
264
346
|
put: {};
|
|
265
|
-
head: {};
|
|
266
347
|
delete: {};
|
|
267
348
|
copy: {};
|
|
349
|
+
head: {};
|
|
268
350
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
269
351
|
options: {};
|
|
270
352
|
patch: {};
|
|
@@ -291,7 +373,6 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
291
373
|
}>;
|
|
292
374
|
};
|
|
293
375
|
put: {};
|
|
294
|
-
head: {};
|
|
295
376
|
delete: {
|
|
296
377
|
"/affiliates/:id/properties": import("@withtyped/server").PathGuard<"/:id/properties", unknown, {
|
|
297
378
|
value: string;
|
|
@@ -299,32 +380,33 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
299
380
|
}, unknown>;
|
|
300
381
|
};
|
|
301
382
|
copy: {};
|
|
383
|
+
head: {};
|
|
302
384
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
303
385
|
options: {};
|
|
304
386
|
patch: {};
|
|
305
387
|
get: {};
|
|
306
388
|
post: {
|
|
307
389
|
"/affiliate-logs": import("@withtyped/server").PathGuard<"/", unknown, {
|
|
308
|
-
hostname?: string | undefined;
|
|
309
|
-
query?: string | undefined;
|
|
310
390
|
createdAt: string;
|
|
311
391
|
userId: string;
|
|
392
|
+
hostname?: string | undefined;
|
|
393
|
+
query?: string | undefined;
|
|
312
394
|
}, {
|
|
313
395
|
createdAt: Date;
|
|
314
396
|
id: string;
|
|
315
397
|
affiliateId: string | null;
|
|
316
398
|
userId: string;
|
|
317
399
|
createdVia: {
|
|
400
|
+
createdAt: string;
|
|
318
401
|
hostname?: string | undefined;
|
|
319
402
|
query?: string | undefined;
|
|
320
|
-
createdAt: string;
|
|
321
403
|
};
|
|
322
404
|
}>;
|
|
323
405
|
};
|
|
324
406
|
put: {};
|
|
325
|
-
head: {};
|
|
326
407
|
delete: {};
|
|
327
408
|
copy: {};
|
|
409
|
+
head: {};
|
|
328
410
|
}, "/api">>, "/api">;
|
|
329
411
|
|
|
330
412
|
export {
|
package/package.json
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@logto/cloud",
|
|
3
|
-
"version": "0.2.5-
|
|
3
|
+
"version": "0.2.5-9257c0d",
|
|
4
4
|
"description": "Logto Cloud service.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"author": "Silverhand Inc. <contact@silverhand.io>",
|
|
7
7
|
"license": "Elastic-2.0",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"files": [
|
|
10
|
-
"
|
|
10
|
+
"lib"
|
|
11
11
|
],
|
|
12
12
|
"exports": {
|
|
13
|
-
"./routes": "./
|
|
13
|
+
"./routes": "./lib/routes/index.js"
|
|
14
14
|
},
|
|
15
15
|
"imports": {
|
|
16
16
|
"#src/*": "./build/*"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@silverhand/eslint-config": "
|
|
20
|
-
"@silverhand/jest-config": "
|
|
21
|
-
"@silverhand/ts-config": "
|
|
19
|
+
"@silverhand/eslint-config": "4.0.1",
|
|
20
|
+
"@silverhand/jest-config": "4.0.0",
|
|
21
|
+
"@silverhand/ts-config": "4.0.0",
|
|
22
22
|
"@types/accepts": "^1.3.5",
|
|
23
23
|
"@types/http-proxy": "^1.17.9",
|
|
24
24
|
"@types/jest": "^29.4.0",
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
"@types/node": "^18.11.18",
|
|
27
27
|
"@types/yargs": "^17.0.24",
|
|
28
28
|
"dts-bundle-generator": "^8.0.1",
|
|
29
|
-
"eslint": "^8.
|
|
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
|
-
"prettier": "^
|
|
33
|
+
"prettier": "^3.0.0",
|
|
34
34
|
"typescript": "^5.0.0"
|
|
35
35
|
},
|
|
36
36
|
"engines": {
|
|
@@ -50,14 +50,14 @@
|
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@silverhand/essentials": "^2.
|
|
53
|
+
"@silverhand/essentials": "^2.8.5",
|
|
54
54
|
"@withtyped/server": "^0.12.7"
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
57
57
|
"precommit": "lint-staged",
|
|
58
|
-
"build": "rm -rf build/ && tsc -p tsconfig.build.json",
|
|
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
|
|
60
|
+
"build:lib": "rm -rf lib/ && dts-bundle-generator src/routes/index.ts --project tsconfig.build.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",
|