moyan-api 1.2.2 → 1.3.0
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/dist/src/creator.d.ts +2 -0
- package/dist/src/main.d.ts +22 -0
- package/dist/src/main.js +88 -0
- package/dist/src/main.js.map +1 -0
- package/dist/src/template/api.d.ts +18 -0
- package/dist/src/template/api.js +134 -0
- package/dist/src/template/api.js.map +1 -0
- package/dist/src/template/schemas.d.ts +13 -0
- package/dist/src/template/schemas.js +97 -0
- package/dist/src/template/schemas.js.map +1 -0
- package/dist/test/apis/sys/index.d.ts +370 -0
- package/dist/test/apis/sys/index.js +455 -0
- package/dist/test/apis/sys/index.js.map +1 -0
- package/dist/test/apis/sys/schemas.d.ts +263 -0
- package/dist/test/apis/sys/schemas.js +3 -0
- package/dist/test/apis/sys/schemas.js.map +1 -0
- package/dist/test.d.ts +1 -0
- package/dist/test.js +13 -0
- package/dist/test.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
export type ObjectId = string;
|
|
2
|
+
export type int = number | string;
|
|
3
|
+
export type integer = number | string;
|
|
4
|
+
export type float = number | string;
|
|
5
|
+
export type tinyint = number | string;
|
|
6
|
+
export type char = string;
|
|
7
|
+
export type varchar = string;
|
|
8
|
+
export type json = {
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
} | Array<{
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
}>;
|
|
13
|
+
export type datetime = Date | string;
|
|
14
|
+
export type date = Date | string;
|
|
15
|
+
export type array = Array<any>;
|
|
16
|
+
export type text = string;
|
|
17
|
+
export type decimal = number | string;
|
|
18
|
+
export type LoginDto = {
|
|
19
|
+
username: string;
|
|
20
|
+
password: string;
|
|
21
|
+
};
|
|
22
|
+
export type UserSummaryDto = {
|
|
23
|
+
username: string;
|
|
24
|
+
nickname: string;
|
|
25
|
+
avatar: string;
|
|
26
|
+
};
|
|
27
|
+
export type LoginResponseDto = {
|
|
28
|
+
accessToken: string;
|
|
29
|
+
refreshToken: string;
|
|
30
|
+
tokenType: string;
|
|
31
|
+
expiresIn: number;
|
|
32
|
+
user: UserSummaryDto;
|
|
33
|
+
};
|
|
34
|
+
export type UserInfoDto = {
|
|
35
|
+
id: string;
|
|
36
|
+
username: string;
|
|
37
|
+
nickname: string;
|
|
38
|
+
avatar: string;
|
|
39
|
+
roles: Array<string>;
|
|
40
|
+
};
|
|
41
|
+
export type CreateUserDto = {
|
|
42
|
+
username: string;
|
|
43
|
+
password: string;
|
|
44
|
+
nickname?: string;
|
|
45
|
+
phone?: string;
|
|
46
|
+
email?: string;
|
|
47
|
+
avatar?: string;
|
|
48
|
+
gender?: number;
|
|
49
|
+
roleIds?: Array<string>;
|
|
50
|
+
};
|
|
51
|
+
export type UserResponseDto = {
|
|
52
|
+
id: string;
|
|
53
|
+
username: string;
|
|
54
|
+
nickname: string;
|
|
55
|
+
phone: string;
|
|
56
|
+
email: string;
|
|
57
|
+
avatar: string;
|
|
58
|
+
gender: number;
|
|
59
|
+
userStatus: number;
|
|
60
|
+
isDeveloper: boolean;
|
|
61
|
+
createdAt: string;
|
|
62
|
+
updateAt: string;
|
|
63
|
+
};
|
|
64
|
+
export type UpdateUserDto = {
|
|
65
|
+
nickname?: string;
|
|
66
|
+
phone?: string;
|
|
67
|
+
email?: string;
|
|
68
|
+
avatar?: string;
|
|
69
|
+
gender?: number;
|
|
70
|
+
roleIds?: Array<string>;
|
|
71
|
+
};
|
|
72
|
+
export type CreateRoleDto = {
|
|
73
|
+
roleName: string;
|
|
74
|
+
roleCode: string;
|
|
75
|
+
roleDesc?: string;
|
|
76
|
+
appTypeId?: string;
|
|
77
|
+
appId?: string;
|
|
78
|
+
sortOrder?: number;
|
|
79
|
+
isBuiltin?: number;
|
|
80
|
+
};
|
|
81
|
+
export type RoleResponseDto = {
|
|
82
|
+
id: string;
|
|
83
|
+
roleName: string;
|
|
84
|
+
roleCode: string;
|
|
85
|
+
roleDesc: string;
|
|
86
|
+
appTypeId: string;
|
|
87
|
+
appId: string;
|
|
88
|
+
isBuiltin: number;
|
|
89
|
+
isOwner: number;
|
|
90
|
+
roleStatus: number;
|
|
91
|
+
sortOrder: number;
|
|
92
|
+
createdAt: string;
|
|
93
|
+
updateAt: string;
|
|
94
|
+
};
|
|
95
|
+
export type UpdateRoleDto = {
|
|
96
|
+
roleName?: string;
|
|
97
|
+
roleDesc?: string;
|
|
98
|
+
sortOrder?: number;
|
|
99
|
+
roleStatus?: number;
|
|
100
|
+
};
|
|
101
|
+
export type PermissionItemDto = {
|
|
102
|
+
permissionId: string;
|
|
103
|
+
permissionValue: integer;
|
|
104
|
+
};
|
|
105
|
+
export type AssignPermissionsDto = {
|
|
106
|
+
permissions: Array<PermissionItemDto>;
|
|
107
|
+
};
|
|
108
|
+
export type CreatePermissionDto = {
|
|
109
|
+
permName: string;
|
|
110
|
+
permCode: string;
|
|
111
|
+
permDesc?: string;
|
|
112
|
+
permissionType: string;
|
|
113
|
+
nodeType?: string;
|
|
114
|
+
parentId?: string;
|
|
115
|
+
routePath?: string;
|
|
116
|
+
externalUrl?: string;
|
|
117
|
+
iconName?: string;
|
|
118
|
+
sortOrder?: number;
|
|
119
|
+
isVisible?: number;
|
|
120
|
+
isCache?: number;
|
|
121
|
+
showMode: string;
|
|
122
|
+
permStatus?: number;
|
|
123
|
+
permissionValue?: integer;
|
|
124
|
+
};
|
|
125
|
+
export type PermissionResponseDto = {
|
|
126
|
+
id: string;
|
|
127
|
+
permName: string;
|
|
128
|
+
permCode: string;
|
|
129
|
+
permDesc: string;
|
|
130
|
+
permissionType: string;
|
|
131
|
+
nodeType: string;
|
|
132
|
+
parentId: string;
|
|
133
|
+
routePath: string;
|
|
134
|
+
externalUrl: string;
|
|
135
|
+
iconName: string;
|
|
136
|
+
sortOrder: number;
|
|
137
|
+
isVisible: number;
|
|
138
|
+
isCache: number;
|
|
139
|
+
showMode: string;
|
|
140
|
+
permStatus: number;
|
|
141
|
+
permissionValue: integer;
|
|
142
|
+
createdAt: string;
|
|
143
|
+
updateAt: string;
|
|
144
|
+
};
|
|
145
|
+
export type UpdatePermissionDto = {
|
|
146
|
+
permName?: string;
|
|
147
|
+
permCode?: string;
|
|
148
|
+
permDesc?: string;
|
|
149
|
+
nodeType?: string;
|
|
150
|
+
routePath?: string;
|
|
151
|
+
externalUrl?: string;
|
|
152
|
+
iconName?: string;
|
|
153
|
+
sortOrder?: number;
|
|
154
|
+
isVisible?: number;
|
|
155
|
+
isCache?: number;
|
|
156
|
+
showMode?: string;
|
|
157
|
+
permStatus?: number;
|
|
158
|
+
permissionValue?: integer;
|
|
159
|
+
};
|
|
160
|
+
export type CreateAppTypeDto = {
|
|
161
|
+
typeName: string;
|
|
162
|
+
typeCode: string;
|
|
163
|
+
typeDesc?: string;
|
|
164
|
+
icon?: string;
|
|
165
|
+
multiAppEnabled: number;
|
|
166
|
+
typeStatus: number;
|
|
167
|
+
sortOrder: number;
|
|
168
|
+
};
|
|
169
|
+
export type AppTypeResponseDto = {
|
|
170
|
+
id: string;
|
|
171
|
+
typeName: string;
|
|
172
|
+
typeCode: string;
|
|
173
|
+
typeDesc: string;
|
|
174
|
+
icon: string;
|
|
175
|
+
multiAppEnabled: number;
|
|
176
|
+
typeStatus: number;
|
|
177
|
+
sortOrder: number;
|
|
178
|
+
createdAt: string;
|
|
179
|
+
updateAt: string;
|
|
180
|
+
};
|
|
181
|
+
export type UpdateAppTypeDto = {
|
|
182
|
+
typeName?: string;
|
|
183
|
+
typeCode?: string;
|
|
184
|
+
typeDesc?: string;
|
|
185
|
+
icon?: string;
|
|
186
|
+
multiAppEnabled?: number;
|
|
187
|
+
typeStatus?: number;
|
|
188
|
+
sortOrder?: number;
|
|
189
|
+
};
|
|
190
|
+
export type CreateAppDto = {
|
|
191
|
+
appTypeId: string;
|
|
192
|
+
appName: string;
|
|
193
|
+
appCode: string;
|
|
194
|
+
ownerId: string;
|
|
195
|
+
appDesc?: string;
|
|
196
|
+
icon?: string;
|
|
197
|
+
sortOrder: number;
|
|
198
|
+
};
|
|
199
|
+
export type AppDetailResponseDto = {
|
|
200
|
+
id: string;
|
|
201
|
+
appTypeId: string;
|
|
202
|
+
appName: string;
|
|
203
|
+
appCode: string;
|
|
204
|
+
appDesc: string;
|
|
205
|
+
ownerId: string;
|
|
206
|
+
icon: string;
|
|
207
|
+
appStatus: number;
|
|
208
|
+
sortOrder: number;
|
|
209
|
+
createdAt: string;
|
|
210
|
+
updateAt: string;
|
|
211
|
+
appType: object;
|
|
212
|
+
owner: object;
|
|
213
|
+
};
|
|
214
|
+
export type UpdateAppDto = {
|
|
215
|
+
appCode?: string;
|
|
216
|
+
appName?: string;
|
|
217
|
+
appDesc?: string;
|
|
218
|
+
icon?: string;
|
|
219
|
+
ownerId?: string;
|
|
220
|
+
appStatus?: number;
|
|
221
|
+
sortOrder?: number;
|
|
222
|
+
};
|
|
223
|
+
export type AddMemberDto = {
|
|
224
|
+
userId: string;
|
|
225
|
+
};
|
|
226
|
+
export type RoleInfoDto = {
|
|
227
|
+
roleId: string;
|
|
228
|
+
roleName: string;
|
|
229
|
+
roleCode: string;
|
|
230
|
+
isBuiltin: number;
|
|
231
|
+
};
|
|
232
|
+
export type MemberResponseDto = {
|
|
233
|
+
id: string;
|
|
234
|
+
appId: string;
|
|
235
|
+
userId: string;
|
|
236
|
+
createdAt: string;
|
|
237
|
+
user: UserInfoDto;
|
|
238
|
+
roles: Array<RoleInfoDto>;
|
|
239
|
+
};
|
|
240
|
+
export type UpdateMemberRolesDto = {
|
|
241
|
+
roleIds: Array<array>;
|
|
242
|
+
};
|
|
243
|
+
export type AvailableRoleDto = {
|
|
244
|
+
id: string;
|
|
245
|
+
roleName: string;
|
|
246
|
+
roleCode: string;
|
|
247
|
+
isBuiltin: number;
|
|
248
|
+
isOwner: number;
|
|
249
|
+
};
|
|
250
|
+
export type AuditLogResponseDto = {
|
|
251
|
+
id: string;
|
|
252
|
+
module: string;
|
|
253
|
+
event: string;
|
|
254
|
+
operatorId: string;
|
|
255
|
+
operatorName: string;
|
|
256
|
+
targetId: string;
|
|
257
|
+
targetType: string;
|
|
258
|
+
description: string;
|
|
259
|
+
snapshot?: object;
|
|
260
|
+
ip: string;
|
|
261
|
+
userAgent?: string;
|
|
262
|
+
createAt: string;
|
|
263
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../../test/apis/sys/schemas.ts"],"names":[],"mappings":""}
|
package/dist/test.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/test.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const main_1 = require("src/main");
|
|
4
|
+
const program_1 = require("src/program");
|
|
5
|
+
const create = async () => {
|
|
6
|
+
await new main_1.ApisdkCreator(new program_1.Program({
|
|
7
|
+
jsonurl: 'http://localhost:3000/api-docs-json',
|
|
8
|
+
output: './test/apis',
|
|
9
|
+
dirname: 'sys'
|
|
10
|
+
})).create();
|
|
11
|
+
};
|
|
12
|
+
create();
|
|
13
|
+
//# sourceMappingURL=test.js.map
|
package/dist/test.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test.js","sourceRoot":"","sources":["../test.ts"],"names":[],"mappings":";;AAAA,mCAAwC;AACxC,yCAAqC;AAGrC,MAAM,MAAM,GAAG,KAAK,IAAI,EAAE;IACtB,MAAM,IAAI,oBAAa,CAAC,IAAI,iBAAO,CAC/B;QACI,OAAO,EAAE,qCAAqC;QAC9C,MAAM,EAAE,aAAa;QACrB,OAAO,EAAE,KAAK;KACjB,CACJ,CAAC,CAAC,MAAM,EAAE,CAAA;AACf,CAAC,CAAA;AAED,MAAM,EAAE,CAAA"}
|