@logto/cloud 0.2.5-31703ea → 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,22 +23,112 @@ 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 _default: import("@withtyped/server").Router<WithAuthContext, import("@withtyped/server").MergeRoutes<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<{
40
27
  options: {};
41
28
  patch: {
42
29
  "/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, {
43
30
  name?: string | undefined;
44
31
  tag?: TenantTag | undefined;
45
- }, TenantInfo>;
32
+ }, {
33
+ name: string;
34
+ id: string;
35
+ indicator: string;
36
+ tag: TenantTag;
37
+ }>;
46
38
  };
47
39
  get: {
48
- "/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
+ }>;
49
121
  };
50
122
  post: {
51
123
  "/tenants": import("@withtyped/server").PathGuard<"/", unknown, {
52
124
  name?: string | undefined;
53
125
  tag?: TenantTag | undefined;
54
- }, TenantInfo>;
126
+ }, {
127
+ name: string;
128
+ id: string;
129
+ indicator: string;
130
+ tag: TenantTag;
131
+ }>;
55
132
  };
56
133
  put: {};
57
134
  head: {};
@@ -73,8 +150,8 @@ declare const _default: import("@withtyped/server").Router<WithAuthContext, impo
73
150
  type: VerificationCodeType;
74
151
  to: string;
75
152
  payload: {
76
- fromName?: string | undefined;
77
- companyAddress?: string | undefined;
153
+ senderName?: string | undefined;
154
+ companyInformation?: string | undefined;
78
155
  appLogo?: string | undefined;
79
156
  code: string;
80
157
  };
@@ -86,8 +163,8 @@ declare const _default: import("@withtyped/server").Router<WithAuthContext, impo
86
163
  type: VerificationCodeType;
87
164
  to: string;
88
165
  payload: {
89
- fromName?: string | undefined;
90
- companyAddress?: string | undefined;
166
+ senderName?: string | undefined;
167
+ companyInformation?: string | undefined;
91
168
  appLogo?: string | undefined;
92
169
  code: string;
93
170
  };
@@ -99,8 +176,8 @@ declare const _default: import("@withtyped/server").Router<WithAuthContext, impo
99
176
  type: VerificationCodeType;
100
177
  to: string;
101
178
  payload: {
102
- fromName?: string | undefined;
103
- companyAddress?: string | undefined;
179
+ senderName?: string | undefined;
180
+ companyInformation?: string | undefined;
104
181
  appLogo?: string | undefined;
105
182
  code: string;
106
183
  };
@@ -118,20 +195,7 @@ declare const _default: import("@withtyped/server").Router<WithAuthContext, impo
118
195
  "/subscription-plans": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
119
196
  id: string;
120
197
  name: string;
121
- products: {
122
- description?: string | undefined;
123
- type: "flat" | "tier1" | "tier2" | "tier3";
124
- id: string;
125
- name: string;
126
- price: {
127
- quantity?: 1 | undefined;
128
- unitAmount?: number | null | undefined;
129
- id: string;
130
- unitAmountDecimal: string;
131
- };
132
- }[];
133
198
  quota: {
134
- tenantLimit: number | null;
135
199
  mauLimit: number | null;
136
200
  applicationsLimit: number;
137
201
  machineToMachineLimit: number;
@@ -147,6 +211,18 @@ declare const _default: import("@withtyped/server").Router<WithAuthContext, impo
147
211
  hooksLimit: number;
148
212
  auditLogsRetentionDays: number;
149
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
+ }[];
150
226
  createdAt: Date;
151
227
  updatedAt: Date;
152
228
  }[]>;
@@ -156,10 +232,26 @@ declare const _default: import("@withtyped/server").Router<WithAuthContext, impo
156
232
  head: {};
157
233
  delete: {};
158
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: {};
250
+ copy: {};
159
251
  }, "/api">>, "/api">;
160
252
 
161
253
  export {
162
- _default as default,
254
+ router as default,
163
255
  };
164
256
 
165
257
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logto/cloud",
3
- "version": "0.2.5-31703ea",
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
  }