@logto/cloud 0.2.5-1a68662 → 0.2.5-4f1d80b

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.
@@ -1,7 +1,6 @@
1
1
  // Generated by dts-bundle-generator v8.0.1
2
2
 
3
3
  import { RequestContext } from '@withtyped/server';
4
- import { InferModelType } from '@withtyped/server/model';
5
4
 
6
5
  export type WithAuthContext<Context = RequestContext> = Context & {
7
6
  auth: {
@@ -14,18 +13,6 @@ declare enum TenantTag {
14
13
  Staging = "staging",
15
14
  Production = "production"
16
15
  }
17
- declare const Tenants: import("@withtyped/server/model").default<"tenants", {
18
- id: string;
19
- dbUser: string | null;
20
- dbUserPassword: string | null;
21
- name: string;
22
- tag: TenantTag;
23
- createdAt: Date;
24
- }, "name" | "createdAt" | "tag", "createdAt">;
25
- export type TenantModel = InferModelType<typeof Tenants>;
26
- export type TenantInfo = Pick<TenantModel, "id" | "name" | "tag"> & {
27
- indicator: string;
28
- };
29
16
  declare enum VerificationCodeType {
30
17
  SignIn = "SignIn",
31
18
  Register = "Register",
@@ -36,30 +23,121 @@ declare enum VerificationCodeType {
36
23
  /** @deprecated Use `Generic` type template for sending test sms/email use case */
37
24
  Test = "Test"
38
25
  }
39
- declare const router: import("@withtyped/server").Router<WithAuthContext, import("@withtyped/server").MergeRoutes<import("@withtyped/server").MergeRoutes<import("@withtyped/server").BaseRoutes, import("@withtyped/server").RoutesWithPrefix<{
26
+ 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").BaseRoutes, import("@withtyped/server").RoutesWithPrefix<{
27
+ options: {};
40
28
  patch: {
41
29
  "/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, {
42
30
  name?: string | undefined;
43
31
  tag?: TenantTag | undefined;
44
- }, TenantInfo>;
32
+ }, {
33
+ name: string;
34
+ id: string;
35
+ indicator: string;
36
+ tag: TenantTag;
37
+ }>;
45
38
  };
46
39
  get: {
47
- "/tenants": import("@withtyped/server").PathGuard<"/", unknown, unknown, TenantInfo[]>;
40
+ "/tenants": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
41
+ id: string;
42
+ name: string;
43
+ indicator: string;
44
+ tag: TenantTag;
45
+ subscriptionPlan: {
46
+ id: string;
47
+ name: string;
48
+ quota: {
49
+ mauLimit: number | null;
50
+ applicationsLimit: number;
51
+ machineToMachineLimit: number;
52
+ resourcesLimit: number;
53
+ scopesPerResourceLimit: number;
54
+ customDomainEnabled: boolean;
55
+ omniSignInEnabled: boolean;
56
+ builtInEmailConnectorEnabled: boolean;
57
+ socialConnectorsLimit: number | null;
58
+ standardConnectorsLimit: number;
59
+ rolesLimit: number;
60
+ scopesPerRoleLimit: number | null;
61
+ hooksLimit: number;
62
+ auditLogsRetentionDays: number;
63
+ };
64
+ stripeProducts: {
65
+ description?: string | undefined;
66
+ id: string;
67
+ name: string;
68
+ type: "flat" | "tier1" | "tier2" | "tier3";
69
+ price: {
70
+ quantity?: 1 | undefined;
71
+ unitAmount?: number | null | undefined;
72
+ id: string;
73
+ unitAmountDecimal: string;
74
+ };
75
+ }[];
76
+ createdAt: Date;
77
+ updatedAt: Date;
78
+ };
79
+ }[]>;
80
+ } & {
81
+ "/tenants/my": import("@withtyped/server").PathGuard<"/my", unknown, unknown, {
82
+ id: string;
83
+ name: string;
84
+ indicator: string;
85
+ tag: TenantTag;
86
+ subscriptionPlan: {
87
+ id: string;
88
+ name: string;
89
+ quota: {
90
+ mauLimit: number | null;
91
+ applicationsLimit: number;
92
+ machineToMachineLimit: number;
93
+ resourcesLimit: number;
94
+ scopesPerResourceLimit: number;
95
+ customDomainEnabled: boolean;
96
+ omniSignInEnabled: boolean;
97
+ builtInEmailConnectorEnabled: boolean;
98
+ socialConnectorsLimit: number | null;
99
+ standardConnectorsLimit: number;
100
+ rolesLimit: number;
101
+ scopesPerRoleLimit: number | null;
102
+ hooksLimit: number;
103
+ auditLogsRetentionDays: number;
104
+ };
105
+ stripeProducts: {
106
+ description?: string | undefined;
107
+ id: string;
108
+ name: string;
109
+ type: "flat" | "tier1" | "tier2" | "tier3";
110
+ price: {
111
+ quantity?: 1 | undefined;
112
+ unitAmount?: number | null | undefined;
113
+ id: string;
114
+ unitAmountDecimal: string;
115
+ };
116
+ }[];
117
+ createdAt: Date;
118
+ updatedAt: Date;
119
+ };
120
+ }>;
48
121
  };
49
122
  post: {
50
123
  "/tenants": import("@withtyped/server").PathGuard<"/", unknown, {
51
124
  name?: string | undefined;
52
125
  tag?: TenantTag | undefined;
53
- }, TenantInfo>;
126
+ }, {
127
+ name: string;
128
+ id: string;
129
+ indicator: string;
130
+ tag: TenantTag;
131
+ }>;
54
132
  };
55
133
  put: {};
56
134
  head: {};
57
135
  delete: {
58
136
  "/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, unknown, unknown>;
59
137
  };
60
- options: {};
61
138
  copy: {};
62
139
  }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
140
+ options: {};
63
141
  patch: {};
64
142
  get: {
65
143
  "/services/mails/usage": import("@withtyped/server").PathGuard<"/mails/usage", {
@@ -72,8 +150,8 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
72
150
  type: VerificationCodeType;
73
151
  to: string;
74
152
  payload: {
75
- fromName?: string | undefined;
76
- companyAddress?: string | undefined;
153
+ senderName?: string | undefined;
154
+ companyInformation?: string | undefined;
77
155
  appLogo?: string | undefined;
78
156
  code: string;
79
157
  };
@@ -85,8 +163,8 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
85
163
  type: VerificationCodeType;
86
164
  to: string;
87
165
  payload: {
88
- fromName?: string | undefined;
89
- companyAddress?: string | undefined;
166
+ senderName?: string | undefined;
167
+ companyInformation?: string | undefined;
90
168
  appLogo?: string | undefined;
91
169
  code: string;
92
170
  };
@@ -98,8 +176,8 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
98
176
  type: VerificationCodeType;
99
177
  to: string;
100
178
  payload: {
101
- fromName?: string | undefined;
102
- companyAddress?: string | undefined;
179
+ senderName?: string | undefined;
180
+ companyInformation?: string | undefined;
103
181
  appLogo?: string | undefined;
104
182
  code: string;
105
183
  };
@@ -109,7 +187,66 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
109
187
  put: {};
110
188
  head: {};
111
189
  delete: {};
190
+ copy: {};
191
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
112
192
  options: {};
193
+ patch: {};
194
+ get: {
195
+ "/subscription-plans": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
196
+ id: string;
197
+ name: string;
198
+ quota: {
199
+ mauLimit: number | null;
200
+ applicationsLimit: number;
201
+ machineToMachineLimit: number;
202
+ resourcesLimit: number;
203
+ scopesPerResourceLimit: number;
204
+ customDomainEnabled: boolean;
205
+ omniSignInEnabled: boolean;
206
+ builtInEmailConnectorEnabled: boolean;
207
+ socialConnectorsLimit: number | null;
208
+ standardConnectorsLimit: number;
209
+ rolesLimit: number;
210
+ scopesPerRoleLimit: number | null;
211
+ hooksLimit: number;
212
+ auditLogsRetentionDays: number;
213
+ };
214
+ stripeProducts: {
215
+ description?: string | undefined;
216
+ id: string;
217
+ name: string;
218
+ type: "flat" | "tier1" | "tier2" | "tier3";
219
+ price: {
220
+ quantity?: 1 | undefined;
221
+ unitAmount?: number | null | undefined;
222
+ id: string;
223
+ unitAmountDecimal: string;
224
+ };
225
+ }[];
226
+ createdAt: Date;
227
+ updatedAt: Date;
228
+ }[]>;
229
+ };
230
+ post: {};
231
+ put: {};
232
+ head: {};
233
+ delete: {};
234
+ copy: {};
235
+ }, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
236
+ options: {};
237
+ patch: {};
238
+ get: {};
239
+ post: {
240
+ "/checkout-session": import("@withtyped/server").PathGuard<"/", unknown, {
241
+ tenantId?: string | undefined;
242
+ cancelCallbackUrl?: string | undefined;
243
+ planId: string;
244
+ successCallbackUrl: string;
245
+ }, unknown>;
246
+ };
247
+ put: {};
248
+ head: {};
249
+ delete: {};
113
250
  copy: {};
114
251
  }, "/api">>, "/api">;
115
252
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logto/cloud",
3
- "version": "0.2.5-1a68662",
3
+ "version": "0.2.5-4f1d80b",
4
4
  "description": "Logto Cloud service.",
5
5
  "main": "build/index.js",
6
6
  "author": "Silverhand Inc. <contact@silverhand.io>",
@@ -24,11 +24,12 @@
24
24
  "@types/jest": "^29.4.0",
25
25
  "@types/mime-types": "^2.1.1",
26
26
  "@types/node": "^18.11.18",
27
+ "@types/yargs": "^17.0.24",
27
28
  "dts-bundle-generator": "^8.0.1",
28
29
  "eslint": "^8.21.0",
29
30
  "jest": "^29.5.0",
30
31
  "lint-staged": "^13.0.0",
31
- "nodemon": "^2.0.19",
32
+ "nodemon": "^3.0.0",
32
33
  "prettier": "^2.8.1",
33
34
  "typescript": "^5.0.0"
34
35
  },
@@ -36,14 +37,18 @@
36
37
  "node": "^18.12.0"
37
38
  },
38
39
  "eslintConfig": {
39
- "extends": "@silverhand"
40
+ "extends": "@silverhand",
41
+ "ignorePatterns": [
42
+ "types.test.ts"
43
+ ]
40
44
  },
41
45
  "prettier": "@silverhand/eslint-config/.prettierrc",
42
46
  "publishConfig": {
43
47
  "access": "public"
44
48
  },
45
49
  "dependencies": {
46
- "@withtyped/server": "^0.12.0"
50
+ "@silverhand/essentials": "^2.7.0",
51
+ "@withtyped/server": "^0.12.7"
47
52
  },
48
53
  "scripts": {
49
54
  "precommit": "lint-staged",
@@ -56,8 +61,9 @@
56
61
  "dev": "rm -rf build/ && nodemon",
57
62
  "start": "NODE_ENV=production node .",
58
63
  "test:only": "NODE_OPTIONS=\"--experimental-vm-modules --max_old_space_size=4096\" jest --logHeapUsage",
59
- "test": "pnpm build:test && pnpm test:only",
64
+ "test": "pnpm build:test && pnpm test:only && pnpm build:lib && pnpm test:types",
60
65
  "test:ci": "pnpm test:only --coverage --silent",
61
- "test:types": "tsc -p tsconfig.test.types.json"
66
+ "test:types": "tsc -p tsconfig.test.types.json",
67
+ "cli": "node ./build/cli/index.js"
62
68
  }
63
69
  }