@logto/cloud 0.2.5-1a68662 → 0.2.5-4d5e389
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.
- package/build/routes/index.d.ts +118 -24
- package/package.json +25 -6
package/build/routes/index.d.ts
CHANGED
|
@@ -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,78 @@ 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
|
-
},
|
|
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,
|
|
40
|
+
"/tenants": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
|
|
41
|
+
name: string;
|
|
42
|
+
id: string;
|
|
43
|
+
indicator: string;
|
|
44
|
+
tag: TenantTag;
|
|
45
|
+
}[]>;
|
|
46
|
+
} & {
|
|
47
|
+
"/tenants/my/subscription": import("@withtyped/server").PathGuard<"/my/subscription", unknown, unknown, {
|
|
48
|
+
id: string;
|
|
49
|
+
status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid";
|
|
50
|
+
createdAt: Date;
|
|
51
|
+
updatedAt: Date;
|
|
52
|
+
tenantId: string;
|
|
53
|
+
planId: string;
|
|
54
|
+
currentPeriodStart: Date;
|
|
55
|
+
currentPeriodEnd: Date;
|
|
56
|
+
customerId: string;
|
|
57
|
+
latestInvoiceId: string | null;
|
|
58
|
+
canceledAt: Date | null;
|
|
59
|
+
}>;
|
|
60
|
+
} & {
|
|
61
|
+
"/tenants/:tenantId/subscription": import("@withtyped/server").PathGuard<"/:tenantId/subscription", unknown, unknown, {
|
|
62
|
+
id: string;
|
|
63
|
+
status: "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid";
|
|
64
|
+
createdAt: Date;
|
|
65
|
+
updatedAt: Date;
|
|
66
|
+
tenantId: string;
|
|
67
|
+
planId: string;
|
|
68
|
+
currentPeriodStart: Date;
|
|
69
|
+
currentPeriodEnd: Date;
|
|
70
|
+
customerId: string;
|
|
71
|
+
latestInvoiceId: string | null;
|
|
72
|
+
canceledAt: Date | null;
|
|
73
|
+
}>;
|
|
74
|
+
} & {
|
|
75
|
+
"/tenants/:tenantId/usage": import("@withtyped/server").PathGuard<"/:tenantId/usage", unknown, unknown, {
|
|
76
|
+
activeUsers: number;
|
|
77
|
+
}>;
|
|
48
78
|
};
|
|
49
79
|
post: {
|
|
50
80
|
"/tenants": import("@withtyped/server").PathGuard<"/", unknown, {
|
|
51
81
|
name?: string | undefined;
|
|
52
82
|
tag?: TenantTag | undefined;
|
|
53
|
-
},
|
|
83
|
+
}, {
|
|
84
|
+
name: string;
|
|
85
|
+
id: string;
|
|
86
|
+
indicator: string;
|
|
87
|
+
tag: TenantTag;
|
|
88
|
+
}>;
|
|
54
89
|
};
|
|
55
90
|
put: {};
|
|
56
91
|
head: {};
|
|
57
92
|
delete: {
|
|
58
93
|
"/tenants/:tenantId": import("@withtyped/server").PathGuard<"/:tenantId", unknown, unknown, unknown>;
|
|
59
94
|
};
|
|
60
|
-
options: {};
|
|
61
95
|
copy: {};
|
|
62
96
|
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
97
|
+
options: {};
|
|
63
98
|
patch: {};
|
|
64
99
|
get: {
|
|
65
100
|
"/services/mails/usage": import("@withtyped/server").PathGuard<"/mails/usage", {
|
|
@@ -72,8 +107,8 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
72
107
|
type: VerificationCodeType;
|
|
73
108
|
to: string;
|
|
74
109
|
payload: {
|
|
75
|
-
|
|
76
|
-
|
|
110
|
+
senderName?: string | undefined;
|
|
111
|
+
companyInformation?: string | undefined;
|
|
77
112
|
appLogo?: string | undefined;
|
|
78
113
|
code: string;
|
|
79
114
|
};
|
|
@@ -85,8 +120,8 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
85
120
|
type: VerificationCodeType;
|
|
86
121
|
to: string;
|
|
87
122
|
payload: {
|
|
88
|
-
|
|
89
|
-
|
|
123
|
+
senderName?: string | undefined;
|
|
124
|
+
companyInformation?: string | undefined;
|
|
90
125
|
appLogo?: string | undefined;
|
|
91
126
|
code: string;
|
|
92
127
|
};
|
|
@@ -98,8 +133,8 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
98
133
|
type: VerificationCodeType;
|
|
99
134
|
to: string;
|
|
100
135
|
payload: {
|
|
101
|
-
|
|
102
|
-
|
|
136
|
+
senderName?: string | undefined;
|
|
137
|
+
companyInformation?: string | undefined;
|
|
103
138
|
appLogo?: string | undefined;
|
|
104
139
|
code: string;
|
|
105
140
|
};
|
|
@@ -109,7 +144,66 @@ declare const router: import("@withtyped/server").Router<WithAuthContext, import
|
|
|
109
144
|
put: {};
|
|
110
145
|
head: {};
|
|
111
146
|
delete: {};
|
|
147
|
+
copy: {};
|
|
148
|
+
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
112
149
|
options: {};
|
|
150
|
+
patch: {};
|
|
151
|
+
get: {
|
|
152
|
+
"/subscription-plans": import("@withtyped/server").PathGuard<"/", unknown, unknown, {
|
|
153
|
+
id: string;
|
|
154
|
+
name: string;
|
|
155
|
+
quota: {
|
|
156
|
+
mauLimit: number | null;
|
|
157
|
+
applicationsLimit: number;
|
|
158
|
+
machineToMachineLimit: number;
|
|
159
|
+
resourcesLimit: number;
|
|
160
|
+
scopesPerResourceLimit: number;
|
|
161
|
+
customDomainEnabled: boolean;
|
|
162
|
+
omniSignInEnabled: boolean;
|
|
163
|
+
builtInEmailConnectorEnabled: boolean;
|
|
164
|
+
socialConnectorsLimit: number | null;
|
|
165
|
+
standardConnectorsLimit: number;
|
|
166
|
+
rolesLimit: number;
|
|
167
|
+
scopesPerRoleLimit: number | null;
|
|
168
|
+
hooksLimit: number;
|
|
169
|
+
auditLogsRetentionDays: number;
|
|
170
|
+
};
|
|
171
|
+
stripeProducts: {
|
|
172
|
+
description?: string | undefined;
|
|
173
|
+
id: string;
|
|
174
|
+
name: string;
|
|
175
|
+
type: "flat" | "tier1" | "tier2" | "tier3";
|
|
176
|
+
price: {
|
|
177
|
+
quantity?: 1 | undefined;
|
|
178
|
+
unitAmount?: number | null | undefined;
|
|
179
|
+
id: string;
|
|
180
|
+
unitAmountDecimal: string;
|
|
181
|
+
};
|
|
182
|
+
}[];
|
|
183
|
+
createdAt: Date;
|
|
184
|
+
updatedAt: Date;
|
|
185
|
+
}[]>;
|
|
186
|
+
};
|
|
187
|
+
post: {};
|
|
188
|
+
put: {};
|
|
189
|
+
head: {};
|
|
190
|
+
delete: {};
|
|
191
|
+
copy: {};
|
|
192
|
+
}, "/api">>, import("@withtyped/server").RoutesWithPrefix<{
|
|
193
|
+
options: {};
|
|
194
|
+
patch: {};
|
|
195
|
+
get: {};
|
|
196
|
+
post: {
|
|
197
|
+
"/checkout-session": import("@withtyped/server").PathGuard<"/", unknown, {
|
|
198
|
+
tenantId?: string | undefined;
|
|
199
|
+
cancelCallbackUrl?: string | undefined;
|
|
200
|
+
planId: string;
|
|
201
|
+
successCallbackUrl: string;
|
|
202
|
+
}, unknown>;
|
|
203
|
+
};
|
|
204
|
+
put: {};
|
|
205
|
+
head: {};
|
|
206
|
+
delete: {};
|
|
113
207
|
copy: {};
|
|
114
208
|
}, "/api">>, "/api">;
|
|
115
209
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@logto/cloud",
|
|
3
|
-
"version": "0.2.5-
|
|
3
|
+
"version": "0.2.5-4d5e389",
|
|
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": "^
|
|
32
|
+
"nodemon": "^3.0.0",
|
|
32
33
|
"prettier": "^2.8.1",
|
|
33
34
|
"typescript": "^5.0.0"
|
|
34
35
|
},
|
|
@@ -36,14 +37,31 @@
|
|
|
36
37
|
"node": "^18.12.0"
|
|
37
38
|
},
|
|
38
39
|
"eslintConfig": {
|
|
39
|
-
"extends": "@silverhand"
|
|
40
|
+
"extends": "@silverhand",
|
|
41
|
+
"rules": {
|
|
42
|
+
"no-console": "error"
|
|
43
|
+
},
|
|
44
|
+
"overrides": [
|
|
45
|
+
{
|
|
46
|
+
"files": [
|
|
47
|
+
"src/cli/**/*"
|
|
48
|
+
],
|
|
49
|
+
"rules": {
|
|
50
|
+
"no-console": "off"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"ignorePatterns": [
|
|
55
|
+
"types.test.ts"
|
|
56
|
+
]
|
|
40
57
|
},
|
|
41
58
|
"prettier": "@silverhand/eslint-config/.prettierrc",
|
|
42
59
|
"publishConfig": {
|
|
43
60
|
"access": "public"
|
|
44
61
|
},
|
|
45
62
|
"dependencies": {
|
|
46
|
-
"@
|
|
63
|
+
"@silverhand/essentials": "^2.7.0",
|
|
64
|
+
"@withtyped/server": "^0.12.7"
|
|
47
65
|
},
|
|
48
66
|
"scripts": {
|
|
49
67
|
"precommit": "lint-staged",
|
|
@@ -56,8 +74,9 @@
|
|
|
56
74
|
"dev": "rm -rf build/ && nodemon",
|
|
57
75
|
"start": "NODE_ENV=production node .",
|
|
58
76
|
"test:only": "NODE_OPTIONS=\"--experimental-vm-modules --max_old_space_size=4096\" jest --logHeapUsage",
|
|
59
|
-
"test": "pnpm build:test && pnpm test:only",
|
|
77
|
+
"test": "pnpm build:test && pnpm test:only && pnpm build:lib && pnpm test:types",
|
|
60
78
|
"test:ci": "pnpm test:only --coverage --silent",
|
|
61
|
-
"test:types": "tsc -p tsconfig.test.types.json"
|
|
79
|
+
"test:types": "tsc -p tsconfig.test.types.json",
|
|
80
|
+
"cli": "node ./build/cli/index.js"
|
|
62
81
|
}
|
|
63
82
|
}
|