@logto/cloud 0.2.5-cda36a9 → 0.2.5-d28a065

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