@logto/cloud 0.2.5-8065345 → 0.2.5-93f5b5e

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.
@@ -40,7 +40,7 @@ export type Affiliate = InferModelType<typeof Affiliates>;
40
40
  export type AffiliateData = Affiliate & {
41
41
  properties: Array<Pick<AffiliateProperty, "type" | "value">>;
42
42
  };
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<{
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").MergeRoutes<import("@withtyped/server").BaseRoutes, import("@withtyped/server").RoutesWithPrefix<{
44
44
  options: {};
45
45
  patch: {
46
46
  "/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, {
@@ -50,8 +50,34 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
50
50
  id: string;
51
51
  name: string;
52
52
  indicator: string;
53
+ isSuspended: boolean;
53
54
  planId: string;
55
+ subscription: {
56
+ status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
57
+ planId: string;
58
+ currentPeriodStart: Date;
59
+ currentPeriodEnd: Date;
60
+ };
54
61
  tag: TenantTag;
62
+ usage: {
63
+ activeUsers: number;
64
+ cost: number;
65
+ };
66
+ openInvoices: {
67
+ status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
68
+ createdAt: Date;
69
+ id: string;
70
+ updatedAt: Date;
71
+ customerId: string | null;
72
+ billingReason: string | null;
73
+ periodStart: Date;
74
+ periodEnd: Date;
75
+ amountDue: number;
76
+ amountPaid: number;
77
+ subscriptionId: string | null;
78
+ hostedInvoiceUrl: string | null;
79
+ invoicePdf: string | null;
80
+ }[];
55
81
  }>;
56
82
  };
57
83
  get: {
@@ -59,8 +85,34 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
59
85
  id: string;
60
86
  name: string;
61
87
  indicator: string;
88
+ isSuspended: boolean;
62
89
  planId: string;
90
+ subscription: {
91
+ status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
92
+ planId: string;
93
+ currentPeriodStart: Date;
94
+ currentPeriodEnd: Date;
95
+ };
63
96
  tag: TenantTag;
97
+ usage: {
98
+ activeUsers: number;
99
+ cost: number;
100
+ };
101
+ openInvoices: {
102
+ status: "void" | "open" | "draft" | "paid" | "uncollectible" | null;
103
+ createdAt: Date;
104
+ id: string;
105
+ updatedAt: Date;
106
+ customerId: string | null;
107
+ billingReason: string | null;
108
+ periodStart: Date;
109
+ periodEnd: Date;
110
+ amountDue: number;
111
+ amountPaid: number;
112
+ subscriptionId: string | null;
113
+ hostedInvoiceUrl: string | null;
114
+ invoicePdf: string | null;
115
+ }[];
64
116
  }[]>;
65
117
  };
66
118
  post: {
@@ -71,8 +123,34 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
71
123
  id: string;
72
124
  name: string;
73
125
  indicator: string;
126
+ isSuspended: boolean;
74
127
  planId: string;
128
+ subscription: {
129
+ status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
130
+ planId: string;
131
+ currentPeriodStart: Date;
132
+ currentPeriodEnd: Date;
133
+ };
75
134
  tag: TenantTag;
135
+ usage: {
136
+ activeUsers: number;
137
+ cost: number;
138
+ };
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
+ }[];
76
154
  }>;
77
155
  };
78
156
  put: {};
@@ -117,6 +195,8 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
117
195
  planName: string | null;
118
196
  }[];
119
197
  }>;
198
+ } & {
199
+ "/tenants/:tenantId/invoices/:invoiceId/hosted-invoice-url": import("@withtyped/server").PathGuard<"/:tenantId/invoices/:invoiceId/hosted-invoice-url", unknown, unknown, string>;
120
200
  } & {
121
201
  "/tenants/:tenantId/usage": import("@withtyped/server").PathGuard<"/:tenantId/usage", unknown, unknown, {
122
202
  activeUsers: number;
@@ -147,29 +227,16 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
147
227
  }>;
148
228
  };
149
229
  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
230
  "/services/mails": import("@withtyped/server").PathGuard<"/mails", unknown, {
164
231
  data: {
165
232
  type: VerificationCodeType;
166
- to: string;
167
233
  payload: {
168
234
  senderName?: string | undefined;
169
235
  companyInformation?: string | undefined;
170
236
  appLogo?: string | undefined;
171
237
  code: string;
172
238
  };
239
+ to: string;
173
240
  };
174
241
  }, unknown>;
175
242
  } & {
@@ -178,9 +245,6 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
178
245
  type: VerificationCodeType;
179
246
  to: string;
180
247
  payload: {
181
- senderName?: string | undefined;
182
- companyInformation?: string | undefined;
183
- appLogo?: string | undefined;
184
248
  code: string;
185
249
  };
186
250
  };
@@ -200,19 +264,20 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
200
264
  name: string;
201
265
  quota: {
202
266
  mauLimit: number | null;
203
- applicationsLimit: number;
204
- machineToMachineLimit: number;
205
- resourcesLimit: number;
206
- scopesPerResourceLimit: number;
267
+ applicationsLimit: number | null;
268
+ machineToMachineLimit: number | null;
269
+ resourcesLimit: number | null;
270
+ scopesPerResourceLimit: number | null;
207
271
  customDomainEnabled: boolean;
208
272
  omniSignInEnabled: boolean;
209
273
  builtInEmailConnectorEnabled: boolean;
210
274
  socialConnectorsLimit: number | null;
211
- standardConnectorsLimit: number;
212
- rolesLimit: number;
275
+ standardConnectorsLimit: number | null;
276
+ rolesLimit: number | null;
213
277
  scopesPerRoleLimit: number | null;
214
- hooksLimit: number;
215
- auditLogsRetentionDays: number;
278
+ hooksLimit: number | null;
279
+ auditLogsRetentionDays: number | null;
280
+ mfaEnabled: boolean;
216
281
  };
217
282
  stripeProducts: {
218
283
  description?: string | undefined;
@@ -234,6 +299,23 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
234
299
  head: {};
235
300
  delete: {};
236
301
  copy: {};
302
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
303
+ options: {};
304
+ patch: {};
305
+ get: {
306
+ "/my/tenant": import("@withtyped/server").PathGuard<"/tenant", unknown, unknown, {
307
+ id: string;
308
+ name: string;
309
+ indicator: string;
310
+ isSuspended: boolean;
311
+ tag: TenantTag;
312
+ }>;
313
+ };
314
+ post: {};
315
+ put: {};
316
+ head: {};
317
+ delete: {};
318
+ copy: {};
237
319
  }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
238
320
  options: {};
239
321
  patch: {};
package/package.json CHANGED
@@ -1,24 +1,24 @@
1
1
  {
2
2
  "name": "@logto/cloud",
3
- "version": "0.2.5-8065345",
3
+ "version": "0.2.5-93f5b5e",
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
- "build"
10
+ "lib"
11
11
  ],
12
12
  "exports": {
13
- "./routes": "./build/routes/index.js"
13
+ "./routes": "./lib/routes/index.js"
14
14
  },
15
15
  "imports": {
16
16
  "#src/*": "./build/*"
17
17
  },
18
18
  "devDependencies": {
19
- "@silverhand/eslint-config": "3.0.1",
20
- "@silverhand/jest-config": "3.0.0",
21
- "@silverhand/ts-config": "3.0.0",
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.21.0",
29
+ "eslint": "^8.44.0",
30
30
  "jest": "^29.5.0",
31
- "lint-staged": "^13.0.0",
31
+ "lint-staged": "^14.0.0",
32
32
  "nodemon": "^3.0.0",
33
- "prettier": "^2.8.1",
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.7.0",
53
+ "@silverhand/essentials": "^2.8.4",
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 build/ && dts-bundle-generator src/routes/index.ts --project tsconfig.build.json -o build/routes/index.d.ts",
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",