@logto/cloud 0.2.5-a3e852f → 0.2.5-c6ed487

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