@logto/cloud 0.2.5-70aa370 → 0.2.5-71b7fea

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").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,10 +85,84 @@ 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
+ };
118
+ post: {
119
+ "/tenants": import("@withtyped/server").PathGuard<"/", unknown, {
120
+ name?: string | undefined;
121
+ tag?: TenantTag | undefined;
122
+ }, {
123
+ id: string;
124
+ name: string;
125
+ indicator: string;
126
+ isSuspended: boolean;
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
+ };
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
+ }[];
154
+ }>;
155
+ };
156
+ put: {};
157
+ head: {};
158
+ delete: {
159
+ "/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, unknown, unknown>;
160
+ };
161
+ copy: {};
162
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
163
+ options: {};
164
+ patch: {};
165
+ get: {
66
166
  "/tenants/my/subscription": import("@withtyped/server").PathGuard<"/my/subscription", unknown, unknown, {
67
167
  status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
68
168
  planId: string;
@@ -102,20 +202,9 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
102
202
  }>;
103
203
  };
104
204
  post: {
105
- "/tenants": import("@withtyped/server").PathGuard<"/", unknown, {
106
- name?: string | undefined;
107
- tag?: TenantTag | undefined;
108
- }, {
109
- id: string;
110
- name: string;
111
- indicator: string;
112
- planId: string;
113
- tag: TenantTag;
114
- }>;
115
- } & {
116
205
  "/tenants/:tenantId/stripe-customer-portal": import("@withtyped/server").PathGuard<"/:tenantId/stripe-customer-portal", unknown, {
117
206
  callbackUrl?: string | undefined;
118
- } | undefined, {
207
+ }, {
119
208
  redirectUri: string;
120
209
  }>;
121
210
  };
@@ -123,8 +212,6 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
123
212
  head: {};
124
213
  delete: {
125
214
  "/tenants/:tenantId/subscription": import("@withtyped/server").PathGuard<"/:tenantId/subscription", unknown, unknown, unknown>;
126
- } & {
127
- "/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, unknown, unknown>;
128
215
  };
129
216
  copy: {};
130
217
  }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
@@ -138,19 +225,6 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
138
225
  }>;
139
226
  };
140
227
  post: {
141
- "/services/send-email": import("@withtyped/server").PathGuard<"/send-email", unknown, {
142
- data: {
143
- type: VerificationCodeType;
144
- to: string;
145
- payload: {
146
- senderName?: string | undefined;
147
- companyInformation?: string | undefined;
148
- appLogo?: string | undefined;
149
- code: string;
150
- };
151
- };
152
- }, unknown>;
153
- } & {
154
228
  "/services/mails": import("@withtyped/server").PathGuard<"/mails", unknown, {
155
229
  data: {
156
230
  type: VerificationCodeType;
@@ -191,19 +265,19 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
191
265
  name: string;
192
266
  quota: {
193
267
  mauLimit: number | null;
194
- applicationsLimit: number;
195
- machineToMachineLimit: number;
196
- resourcesLimit: number;
197
- scopesPerResourceLimit: number;
268
+ applicationsLimit: number | null;
269
+ machineToMachineLimit: number | null;
270
+ resourcesLimit: number | null;
271
+ scopesPerResourceLimit: number | null;
198
272
  customDomainEnabled: boolean;
199
273
  omniSignInEnabled: boolean;
200
274
  builtInEmailConnectorEnabled: boolean;
201
275
  socialConnectorsLimit: number | null;
202
- standardConnectorsLimit: number;
203
- rolesLimit: number;
276
+ standardConnectorsLimit: number | null;
277
+ rolesLimit: number | null;
204
278
  scopesPerRoleLimit: number | null;
205
- hooksLimit: number;
206
- auditLogsRetentionDays: number;
279
+ hooksLimit: number | null;
280
+ auditLogsRetentionDays: number | null;
207
281
  };
208
282
  stripeProducts: {
209
283
  description?: string | undefined;
@@ -225,6 +299,23 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
225
299
  head: {};
226
300
  delete: {};
227
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
+ name: string;
308
+ id: string;
309
+ indicator: string;
310
+ isSuspended: boolean;
311
+ tag: TenantTag;
312
+ }>;
313
+ };
314
+ post: {};
315
+ put: {};
316
+ head: {};
317
+ delete: {};
318
+ copy: {};
228
319
  }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
229
320
  options: {};
230
321
  patch: {};
package/package.json CHANGED
@@ -1,24 +1,24 @@
1
1
  {
2
2
  "name": "@logto/cloud",
3
- "version": "0.2.5-70aa370",
3
+ "version": "0.2.5-71b7fea",
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",