@flink-app/management-api-plugin 0.11.0 → 0.11.4
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/.flink/generatedHandlers.ts +1 -1
- package/.flink/generatedJobs.ts +1 -1
- package/.flink/generatedRepos.ts +1 -1
- package/.flink/schemas/schemas.ts +1 -1
- package/.flink/start.ts +1 -1
- package/dist/.flink/generated-schemas.json +270 -0
- package/dist/.flink/generatedHandlers.js +1 -1
- package/dist/.flink/generatedJobs.js +1 -1
- package/dist/.flink/generatedRepos.js +1 -1
- package/dist/.flink/schemas.json +722 -0
- package/dist/.flink/start.js +1 -1
- package/dist/src/handlers/Management/Get.d.ts +7 -0
- package/dist/src/handlers/Management/Get.js +53 -0
- package/dist/src/schemas/ManagementApi.d.ts +25 -0
- package/dist/src/schemas/ManagementApi.js +8 -0
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated
|
|
1
|
+
// Generated Thu Dec 12 2024 18:09:01 GMT+0100 (Central European Standard Time)
|
|
2
2
|
import { autoRegisteredHandlers, HttpMethod } from "@flink-app/flink";
|
|
3
3
|
import * as GetManagement_0 from "../src/handlers/Management/GetManagement";
|
|
4
4
|
import * as DeleteByUserid_0 from "../src/handlers/User/DeleteByUserid";
|
package/.flink/generatedJobs.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated
|
|
1
|
+
// Generated Thu Dec 12 2024 18:09:01 GMT+0100 (Central European Standard Time)
|
|
2
2
|
import { autoRegisteredJobs } from "@flink-app/flink";
|
|
3
3
|
export const jobs = [];
|
|
4
4
|
autoRegisteredJobs.push(...jobs);
|
package/.flink/generatedRepos.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated
|
|
1
|
+
// Generated Thu Dec 12 2024 18:09:01 GMT+0100 (Central European Standard Time)
|
|
2
2
|
import { autoRegisteredRepos } from "@flink-app/flink";
|
|
3
3
|
import ManagementUserRepo from "../src/repos/ManagementUserRepo";
|
|
4
4
|
|
|
@@ -15,7 +15,7 @@ import { PostUserLoginRes } from "../../src/schemas/User/PostLoginRes";
|
|
|
15
15
|
import { PutUserByUseridReq } from "../../src/schemas/User/PutByUseridReq";
|
|
16
16
|
import { PutUserByUseridRes } from "../../src/schemas/User/PutByUseridRes";
|
|
17
17
|
|
|
18
|
-
// Generated
|
|
18
|
+
// Generated Thu Dec 12 2024 18:09:01 GMT+0100 (Central European Standard Time)
|
|
19
19
|
export interface GetManagement_9_ReqSchema extends GetManagementReq {}
|
|
20
20
|
|
|
21
21
|
export interface GetManagement_9_ResSchema extends GetManagementRes {}
|
package/.flink/start.ts
CHANGED
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$ref": "#/definitions/Schemas",
|
|
4
|
+
"definitions": {
|
|
5
|
+
"ManagementUser": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"_id": {
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"username": {
|
|
12
|
+
"type": "string"
|
|
13
|
+
},
|
|
14
|
+
"password": {
|
|
15
|
+
"type": "string"
|
|
16
|
+
},
|
|
17
|
+
"salt": {
|
|
18
|
+
"type": "string"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"required": [
|
|
22
|
+
"_id",
|
|
23
|
+
"username",
|
|
24
|
+
"password",
|
|
25
|
+
"salt"
|
|
26
|
+
],
|
|
27
|
+
"additionalProperties": false
|
|
28
|
+
},
|
|
29
|
+
"ManagementUserViewModel": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"additionalProperties": false,
|
|
32
|
+
"properties": {
|
|
33
|
+
"_id": {
|
|
34
|
+
"type": "string"
|
|
35
|
+
},
|
|
36
|
+
"username": {
|
|
37
|
+
"type": "string"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"required": [
|
|
41
|
+
"_id",
|
|
42
|
+
"username"
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
"ModuleList": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"properties": {
|
|
48
|
+
"modules": {
|
|
49
|
+
"type": "array",
|
|
50
|
+
"items": {
|
|
51
|
+
"$ref": "#/definitions/Module"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"required": [
|
|
56
|
+
"modules"
|
|
57
|
+
],
|
|
58
|
+
"additionalProperties": false
|
|
59
|
+
},
|
|
60
|
+
"Module": {
|
|
61
|
+
"type": "object",
|
|
62
|
+
"properties": {
|
|
63
|
+
"id": {
|
|
64
|
+
"type": "string"
|
|
65
|
+
},
|
|
66
|
+
"type": {
|
|
67
|
+
"type": "string"
|
|
68
|
+
},
|
|
69
|
+
"features": {
|
|
70
|
+
"type": "array",
|
|
71
|
+
"items": {
|
|
72
|
+
"type": "string"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"title": {
|
|
76
|
+
"type": "string"
|
|
77
|
+
},
|
|
78
|
+
"ui": {
|
|
79
|
+
"type": "string"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"required": [
|
|
83
|
+
"id",
|
|
84
|
+
"type",
|
|
85
|
+
"features",
|
|
86
|
+
"title",
|
|
87
|
+
"ui"
|
|
88
|
+
],
|
|
89
|
+
"additionalProperties": false
|
|
90
|
+
},
|
|
91
|
+
"GetManagementReq": {
|
|
92
|
+
"type": "object",
|
|
93
|
+
"additionalProperties": false
|
|
94
|
+
},
|
|
95
|
+
"GetManagementRes": {
|
|
96
|
+
"type": "object",
|
|
97
|
+
"additionalProperties": false,
|
|
98
|
+
"properties": {
|
|
99
|
+
"modules": {
|
|
100
|
+
"type": "array",
|
|
101
|
+
"items": {
|
|
102
|
+
"$ref": "#/definitions/Module"
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"required": [
|
|
107
|
+
"modules"
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
"DeleteUserByUseridReq": {
|
|
111
|
+
"type": "object",
|
|
112
|
+
"additionalProperties": false
|
|
113
|
+
},
|
|
114
|
+
"DeleteUserByUseridRes": {
|
|
115
|
+
"type": "object",
|
|
116
|
+
"additionalProperties": false
|
|
117
|
+
},
|
|
118
|
+
"GetUserByUseridReq": {
|
|
119
|
+
"type": "object",
|
|
120
|
+
"additionalProperties": false
|
|
121
|
+
},
|
|
122
|
+
"GetUserByUseridRes": {
|
|
123
|
+
"type": "object",
|
|
124
|
+
"additionalProperties": false,
|
|
125
|
+
"properties": {
|
|
126
|
+
"_id": {
|
|
127
|
+
"type": "string"
|
|
128
|
+
},
|
|
129
|
+
"username": {
|
|
130
|
+
"type": "string"
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"required": [
|
|
134
|
+
"_id",
|
|
135
|
+
"username"
|
|
136
|
+
]
|
|
137
|
+
},
|
|
138
|
+
"GetUserListReq": {
|
|
139
|
+
"type": "object",
|
|
140
|
+
"additionalProperties": false
|
|
141
|
+
},
|
|
142
|
+
"GetUserListRes": {
|
|
143
|
+
"type": "object",
|
|
144
|
+
"properties": {
|
|
145
|
+
"users": {
|
|
146
|
+
"type": "array",
|
|
147
|
+
"items": {
|
|
148
|
+
"$ref": "#/definitions/ManagementUserViewModel"
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"required": [
|
|
153
|
+
"users"
|
|
154
|
+
],
|
|
155
|
+
"additionalProperties": false
|
|
156
|
+
},
|
|
157
|
+
"GetUserMeReq": {
|
|
158
|
+
"type": "object",
|
|
159
|
+
"additionalProperties": false
|
|
160
|
+
},
|
|
161
|
+
"GetUserMeRes": {
|
|
162
|
+
"type": "object",
|
|
163
|
+
"additionalProperties": false,
|
|
164
|
+
"properties": {
|
|
165
|
+
"user": {
|
|
166
|
+
"$ref": "#/definitions/ManagementUserViewModel"
|
|
167
|
+
},
|
|
168
|
+
"token": {
|
|
169
|
+
"type": "string"
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
"required": [
|
|
173
|
+
"token",
|
|
174
|
+
"user"
|
|
175
|
+
]
|
|
176
|
+
},
|
|
177
|
+
"PostUserLoginReq": {
|
|
178
|
+
"type": "object",
|
|
179
|
+
"properties": {
|
|
180
|
+
"username": {
|
|
181
|
+
"type": "string"
|
|
182
|
+
},
|
|
183
|
+
"password": {
|
|
184
|
+
"type": "string"
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"required": [
|
|
188
|
+
"username",
|
|
189
|
+
"password"
|
|
190
|
+
],
|
|
191
|
+
"additionalProperties": false
|
|
192
|
+
},
|
|
193
|
+
"PostUserLoginRes": {
|
|
194
|
+
"type": "object",
|
|
195
|
+
"properties": {
|
|
196
|
+
"user": {
|
|
197
|
+
"$ref": "#/definitions/ManagementUserViewModel"
|
|
198
|
+
},
|
|
199
|
+
"token": {
|
|
200
|
+
"type": "string"
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
"required": [
|
|
204
|
+
"user",
|
|
205
|
+
"token"
|
|
206
|
+
],
|
|
207
|
+
"additionalProperties": false
|
|
208
|
+
},
|
|
209
|
+
"PostUserReq": {
|
|
210
|
+
"type": "object",
|
|
211
|
+
"additionalProperties": false,
|
|
212
|
+
"properties": {
|
|
213
|
+
"username": {
|
|
214
|
+
"type": "string"
|
|
215
|
+
},
|
|
216
|
+
"password": {
|
|
217
|
+
"type": "string"
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
"required": [
|
|
221
|
+
"password",
|
|
222
|
+
"username"
|
|
223
|
+
]
|
|
224
|
+
},
|
|
225
|
+
"PostUserRes": {
|
|
226
|
+
"type": "object",
|
|
227
|
+
"additionalProperties": false,
|
|
228
|
+
"properties": {
|
|
229
|
+
"_id": {
|
|
230
|
+
"type": "string"
|
|
231
|
+
},
|
|
232
|
+
"username": {
|
|
233
|
+
"type": "string"
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
"required": [
|
|
237
|
+
"_id",
|
|
238
|
+
"username"
|
|
239
|
+
]
|
|
240
|
+
},
|
|
241
|
+
"PutUserByUseridReq": {
|
|
242
|
+
"type": "object",
|
|
243
|
+
"additionalProperties": false,
|
|
244
|
+
"properties": {
|
|
245
|
+
"username": {
|
|
246
|
+
"type": "string"
|
|
247
|
+
},
|
|
248
|
+
"password": {
|
|
249
|
+
"type": "string"
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
"PutUserByUseridRes": {
|
|
254
|
+
"type": "object",
|
|
255
|
+
"additionalProperties": false,
|
|
256
|
+
"properties": {
|
|
257
|
+
"_id": {
|
|
258
|
+
"type": "string"
|
|
259
|
+
},
|
|
260
|
+
"username": {
|
|
261
|
+
"type": "string"
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
"required": [
|
|
265
|
+
"_id",
|
|
266
|
+
"username"
|
|
267
|
+
]
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
@@ -20,7 +20,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
20
20
|
};
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
22
|
exports.handlers = void 0;
|
|
23
|
-
// Generated
|
|
23
|
+
// Generated Thu Dec 12 2024 18:09:01 GMT+0100 (Central European Standard Time)
|
|
24
24
|
var flink_1 = require("@flink-app/flink");
|
|
25
25
|
var DeleteByUserid_0 = __importStar(require("../src/handlers/User/DeleteByUserid"));
|
|
26
26
|
var GetByUserid_1 = __importStar(require("../src/handlers/User/GetByUserid"));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.jobs = void 0;
|
|
4
|
-
// Generated
|
|
4
|
+
// Generated Thu Dec 12 2024 18:09:01 GMT+0100 (Central European Standard Time)
|
|
5
5
|
var flink_1 = require("@flink-app/flink");
|
|
6
6
|
exports.jobs = [];
|
|
7
7
|
flink_1.autoRegisteredJobs.push.apply(flink_1.autoRegisteredJobs, exports.jobs);
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.repos = void 0;
|
|
7
|
-
// Generated
|
|
7
|
+
// Generated Thu Dec 12 2024 18:09:01 GMT+0100 (Central European Standard Time)
|
|
8
8
|
var flink_1 = require("@flink-app/flink");
|
|
9
9
|
var ManagementUserRepo_1 = __importDefault(require("../src/repos/ManagementUserRepo"));
|
|
10
10
|
exports.repos = [{ collectionName: "managementuser", repoInstanceName: "managementUserRepo", Repo: ManagementUserRepo_1.default }];
|
|
@@ -0,0 +1,722 @@
|
|
|
1
|
+
{
|
|
2
|
+
"GetManagementReq": {
|
|
3
|
+
"type": "object",
|
|
4
|
+
"additionalProperties": false
|
|
5
|
+
},
|
|
6
|
+
"Module": {
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"isPreloading": {
|
|
10
|
+
"description": "`true` if the module is running during the Node.js preload",
|
|
11
|
+
"type": "boolean"
|
|
12
|
+
},
|
|
13
|
+
"exports": {},
|
|
14
|
+
"require": {
|
|
15
|
+
"$ref": "#/definitions/NodeJS.Require"
|
|
16
|
+
},
|
|
17
|
+
"id": {
|
|
18
|
+
"type": "string"
|
|
19
|
+
},
|
|
20
|
+
"filename": {
|
|
21
|
+
"type": "string"
|
|
22
|
+
},
|
|
23
|
+
"loaded": {
|
|
24
|
+
"type": "boolean"
|
|
25
|
+
},
|
|
26
|
+
"parent": {
|
|
27
|
+
"$ref": "#/definitions/NodeJS.Module"
|
|
28
|
+
},
|
|
29
|
+
"children": {
|
|
30
|
+
"type": "array",
|
|
31
|
+
"items": {
|
|
32
|
+
"$ref": "#/definitions/NodeJS.Module"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"path": {
|
|
36
|
+
"type": "string"
|
|
37
|
+
},
|
|
38
|
+
"paths": {
|
|
39
|
+
"type": "array",
|
|
40
|
+
"items": {
|
|
41
|
+
"type": "string"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"additionalProperties": false,
|
|
46
|
+
"required": [
|
|
47
|
+
"children",
|
|
48
|
+
"exports",
|
|
49
|
+
"filename",
|
|
50
|
+
"id",
|
|
51
|
+
"isPreloading",
|
|
52
|
+
"loaded",
|
|
53
|
+
"parent",
|
|
54
|
+
"path",
|
|
55
|
+
"paths",
|
|
56
|
+
"require"
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
"ManagementApiEndpoint": {
|
|
60
|
+
"type": "object",
|
|
61
|
+
"properties": {
|
|
62
|
+
"config": {
|
|
63
|
+
"type": "object",
|
|
64
|
+
"properties": {
|
|
65
|
+
"schema": {
|
|
66
|
+
"type": "object",
|
|
67
|
+
"properties": {
|
|
68
|
+
"reqSchema": {
|
|
69
|
+
"$ref": "#/definitions/Definition"
|
|
70
|
+
},
|
|
71
|
+
"resSchema": {
|
|
72
|
+
"$ref": "#/definitions/Definition"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"additionalProperties": false
|
|
76
|
+
},
|
|
77
|
+
"routeProps": {
|
|
78
|
+
"description": "Route props to control routing.\n\nEach handler needs to declare RouteProps which\ninstructs express web server how to route traffic.",
|
|
79
|
+
"type": "object",
|
|
80
|
+
"properties": {
|
|
81
|
+
"method": {
|
|
82
|
+
"description": "HTTP method which this handlers responds to.\n\nWill if not set attempt to extract HTTP method based\non handler file name prefix, for example `GetFoo.ts` will assume\nHTTP method `GET`.",
|
|
83
|
+
"enum": [
|
|
84
|
+
"delete",
|
|
85
|
+
"get",
|
|
86
|
+
"post",
|
|
87
|
+
"put"
|
|
88
|
+
],
|
|
89
|
+
"type": "string"
|
|
90
|
+
},
|
|
91
|
+
"path": {
|
|
92
|
+
"description": "Route path including any path params.\nExample: `/user/:id`",
|
|
93
|
+
"type": "string"
|
|
94
|
+
},
|
|
95
|
+
"mockApi": {
|
|
96
|
+
"description": "Generates mock response based on handlers response schema.\n\nWill be ignored if handler does not have any response schema defined.\n\nThis should only be used during development 💥",
|
|
97
|
+
"type": "boolean"
|
|
98
|
+
},
|
|
99
|
+
"permissions": {
|
|
100
|
+
"description": "Set permissions needed to access route if route requires authentication.",
|
|
101
|
+
"anyOf": [
|
|
102
|
+
{
|
|
103
|
+
"type": "array",
|
|
104
|
+
"items": {
|
|
105
|
+
"type": "string"
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"type": "string"
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
"docs": {
|
|
114
|
+
"description": "Optional documentation of endpoint. Can be used for example in API docs.\nSupports markdown strings.",
|
|
115
|
+
"type": "string"
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"additionalProperties": false,
|
|
119
|
+
"required": [
|
|
120
|
+
"path"
|
|
121
|
+
]
|
|
122
|
+
},
|
|
123
|
+
"origin": {
|
|
124
|
+
"description": "I.e. filename or plugin name that describes where handler origins from",
|
|
125
|
+
"type": "string"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"additionalProperties": false,
|
|
129
|
+
"required": [
|
|
130
|
+
"routeProps"
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
"handlerFn": {
|
|
134
|
+
"description": "Http handler function that handlers implements in order to\nhandle HTTP requests and return a JSON response.",
|
|
135
|
+
"type": "object",
|
|
136
|
+
"additionalProperties": false
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"additionalProperties": false,
|
|
140
|
+
"required": [
|
|
141
|
+
"config",
|
|
142
|
+
"handlerFn"
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
"ManagementApiType": {
|
|
146
|
+
"enum": [
|
|
147
|
+
"MANAGEMENT_USER",
|
|
148
|
+
"USER"
|
|
149
|
+
],
|
|
150
|
+
"type": "string"
|
|
151
|
+
},
|
|
152
|
+
"ManagementApiModule": {
|
|
153
|
+
"type": "object",
|
|
154
|
+
"properties": {
|
|
155
|
+
"id": {
|
|
156
|
+
"type": "string"
|
|
157
|
+
},
|
|
158
|
+
"type": {
|
|
159
|
+
"enum": [
|
|
160
|
+
"MANAGEMENT_USER",
|
|
161
|
+
"USER"
|
|
162
|
+
],
|
|
163
|
+
"type": "string"
|
|
164
|
+
},
|
|
165
|
+
"endpoints": {
|
|
166
|
+
"type": "array",
|
|
167
|
+
"items": {
|
|
168
|
+
"type": "object",
|
|
169
|
+
"properties": {
|
|
170
|
+
"config": {
|
|
171
|
+
"type": "object",
|
|
172
|
+
"properties": {
|
|
173
|
+
"schema": {
|
|
174
|
+
"type": "object",
|
|
175
|
+
"properties": {
|
|
176
|
+
"reqSchema": {
|
|
177
|
+
"$ref": "#/definitions/Definition"
|
|
178
|
+
},
|
|
179
|
+
"resSchema": {
|
|
180
|
+
"$ref": "#/definitions/Definition"
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"additionalProperties": false
|
|
184
|
+
},
|
|
185
|
+
"routeProps": {
|
|
186
|
+
"description": "Route props to control routing.\n\nEach handler needs to declare RouteProps which\ninstructs express web server how to route traffic.",
|
|
187
|
+
"type": "object",
|
|
188
|
+
"properties": {
|
|
189
|
+
"method": {
|
|
190
|
+
"description": "HTTP method which this handlers responds to.\n\nWill if not set attempt to extract HTTP method based\non handler file name prefix, for example `GetFoo.ts` will assume\nHTTP method `GET`.",
|
|
191
|
+
"enum": [
|
|
192
|
+
"delete",
|
|
193
|
+
"get",
|
|
194
|
+
"post",
|
|
195
|
+
"put"
|
|
196
|
+
],
|
|
197
|
+
"type": "string"
|
|
198
|
+
},
|
|
199
|
+
"path": {
|
|
200
|
+
"description": "Route path including any path params.\nExample: `/user/:id`",
|
|
201
|
+
"type": "string"
|
|
202
|
+
},
|
|
203
|
+
"mockApi": {
|
|
204
|
+
"description": "Generates mock response based on handlers response schema.\n\nWill be ignored if handler does not have any response schema defined.\n\nThis should only be used during development 💥",
|
|
205
|
+
"type": "boolean"
|
|
206
|
+
},
|
|
207
|
+
"permissions": {
|
|
208
|
+
"description": "Set permissions needed to access route if route requires authentication.",
|
|
209
|
+
"anyOf": [
|
|
210
|
+
{
|
|
211
|
+
"type": "array",
|
|
212
|
+
"items": {
|
|
213
|
+
"type": "string"
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"type": "string"
|
|
218
|
+
}
|
|
219
|
+
]
|
|
220
|
+
},
|
|
221
|
+
"docs": {
|
|
222
|
+
"description": "Optional documentation of endpoint. Can be used for example in API docs.\nSupports markdown strings.",
|
|
223
|
+
"type": "string"
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
"additionalProperties": false,
|
|
227
|
+
"required": [
|
|
228
|
+
"path"
|
|
229
|
+
]
|
|
230
|
+
},
|
|
231
|
+
"origin": {
|
|
232
|
+
"description": "I.e. filename or plugin name that describes where handler origins from",
|
|
233
|
+
"type": "string"
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
"additionalProperties": false,
|
|
237
|
+
"required": [
|
|
238
|
+
"routeProps"
|
|
239
|
+
]
|
|
240
|
+
},
|
|
241
|
+
"handlerFn": {
|
|
242
|
+
"description": "Http handler function that handlers implements in order to\nhandle HTTP requests and return a JSON response.",
|
|
243
|
+
"type": "object",
|
|
244
|
+
"additionalProperties": false
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
"additionalProperties": false,
|
|
248
|
+
"required": [
|
|
249
|
+
"config",
|
|
250
|
+
"handlerFn"
|
|
251
|
+
]
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
"ui": {
|
|
255
|
+
"type": "object",
|
|
256
|
+
"additionalProperties": false
|
|
257
|
+
},
|
|
258
|
+
"uiSettings": {
|
|
259
|
+
"type": "object",
|
|
260
|
+
"properties": {
|
|
261
|
+
"title": {
|
|
262
|
+
"type": "string"
|
|
263
|
+
},
|
|
264
|
+
"icon": {
|
|
265
|
+
"type": "string"
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
"additionalProperties": false,
|
|
269
|
+
"required": [
|
|
270
|
+
"icon",
|
|
271
|
+
"title"
|
|
272
|
+
]
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
"additionalProperties": false,
|
|
276
|
+
"required": [
|
|
277
|
+
"endpoints",
|
|
278
|
+
"id",
|
|
279
|
+
"type",
|
|
280
|
+
"ui"
|
|
281
|
+
]
|
|
282
|
+
},
|
|
283
|
+
"ManagementApiOptions": {
|
|
284
|
+
"type": "object",
|
|
285
|
+
"properties": {
|
|
286
|
+
"token": {
|
|
287
|
+
"type": "string"
|
|
288
|
+
},
|
|
289
|
+
"baseUrl": {
|
|
290
|
+
"type": "string"
|
|
291
|
+
},
|
|
292
|
+
"jwtSecret": {
|
|
293
|
+
"type": "string"
|
|
294
|
+
},
|
|
295
|
+
"modules": {
|
|
296
|
+
"type": "array",
|
|
297
|
+
"items": {
|
|
298
|
+
"type": "object",
|
|
299
|
+
"properties": {
|
|
300
|
+
"id": {
|
|
301
|
+
"type": "string"
|
|
302
|
+
},
|
|
303
|
+
"type": {
|
|
304
|
+
"enum": [
|
|
305
|
+
"MANAGEMENT_USER",
|
|
306
|
+
"USER"
|
|
307
|
+
],
|
|
308
|
+
"type": "string"
|
|
309
|
+
},
|
|
310
|
+
"endpoints": {
|
|
311
|
+
"type": "array",
|
|
312
|
+
"items": {
|
|
313
|
+
"type": "object",
|
|
314
|
+
"properties": {
|
|
315
|
+
"config": {
|
|
316
|
+
"type": "object",
|
|
317
|
+
"properties": {
|
|
318
|
+
"schema": {
|
|
319
|
+
"type": "object",
|
|
320
|
+
"properties": {
|
|
321
|
+
"reqSchema": {
|
|
322
|
+
"$ref": "#/definitions/Definition"
|
|
323
|
+
},
|
|
324
|
+
"resSchema": {
|
|
325
|
+
"$ref": "#/definitions/Definition"
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
"additionalProperties": false
|
|
329
|
+
},
|
|
330
|
+
"routeProps": {
|
|
331
|
+
"description": "Route props to control routing.\n\nEach handler needs to declare RouteProps which\ninstructs express web server how to route traffic.",
|
|
332
|
+
"type": "object",
|
|
333
|
+
"properties": {
|
|
334
|
+
"method": {
|
|
335
|
+
"description": "HTTP method which this handlers responds to.\n\nWill if not set attempt to extract HTTP method based\non handler file name prefix, for example `GetFoo.ts` will assume\nHTTP method `GET`.",
|
|
336
|
+
"enum": [
|
|
337
|
+
"delete",
|
|
338
|
+
"get",
|
|
339
|
+
"post",
|
|
340
|
+
"put"
|
|
341
|
+
],
|
|
342
|
+
"type": "string"
|
|
343
|
+
},
|
|
344
|
+
"path": {
|
|
345
|
+
"description": "Route path including any path params.\nExample: `/user/:id`",
|
|
346
|
+
"type": "string"
|
|
347
|
+
},
|
|
348
|
+
"mockApi": {
|
|
349
|
+
"description": "Generates mock response based on handlers response schema.\n\nWill be ignored if handler does not have any response schema defined.\n\nThis should only be used during development 💥",
|
|
350
|
+
"type": "boolean"
|
|
351
|
+
},
|
|
352
|
+
"permissions": {
|
|
353
|
+
"description": "Set permissions needed to access route if route requires authentication.",
|
|
354
|
+
"anyOf": [
|
|
355
|
+
{
|
|
356
|
+
"type": "array",
|
|
357
|
+
"items": {
|
|
358
|
+
"type": "string"
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
"type": "string"
|
|
363
|
+
}
|
|
364
|
+
]
|
|
365
|
+
},
|
|
366
|
+
"docs": {
|
|
367
|
+
"description": "Optional documentation of endpoint. Can be used for example in API docs.\nSupports markdown strings.",
|
|
368
|
+
"type": "string"
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
"additionalProperties": false,
|
|
372
|
+
"required": [
|
|
373
|
+
"path"
|
|
374
|
+
]
|
|
375
|
+
},
|
|
376
|
+
"origin": {
|
|
377
|
+
"description": "I.e. filename or plugin name that describes where handler origins from",
|
|
378
|
+
"type": "string"
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
"additionalProperties": false,
|
|
382
|
+
"required": [
|
|
383
|
+
"routeProps"
|
|
384
|
+
]
|
|
385
|
+
},
|
|
386
|
+
"handlerFn": {
|
|
387
|
+
"description": "Http handler function that handlers implements in order to\nhandle HTTP requests and return a JSON response.",
|
|
388
|
+
"type": "object",
|
|
389
|
+
"additionalProperties": false
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
"additionalProperties": false,
|
|
393
|
+
"required": [
|
|
394
|
+
"config",
|
|
395
|
+
"handlerFn"
|
|
396
|
+
]
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
"ui": {
|
|
400
|
+
"type": "object",
|
|
401
|
+
"additionalProperties": false
|
|
402
|
+
},
|
|
403
|
+
"uiSettings": {
|
|
404
|
+
"type": "object",
|
|
405
|
+
"properties": {
|
|
406
|
+
"title": {
|
|
407
|
+
"type": "string"
|
|
408
|
+
},
|
|
409
|
+
"icon": {
|
|
410
|
+
"type": "string"
|
|
411
|
+
}
|
|
412
|
+
},
|
|
413
|
+
"additionalProperties": false,
|
|
414
|
+
"required": [
|
|
415
|
+
"icon",
|
|
416
|
+
"title"
|
|
417
|
+
]
|
|
418
|
+
}
|
|
419
|
+
},
|
|
420
|
+
"additionalProperties": false,
|
|
421
|
+
"required": [
|
|
422
|
+
"endpoints",
|
|
423
|
+
"id",
|
|
424
|
+
"type",
|
|
425
|
+
"ui"
|
|
426
|
+
]
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
},
|
|
430
|
+
"additionalProperties": false,
|
|
431
|
+
"required": [
|
|
432
|
+
"jwtSecret",
|
|
433
|
+
"modules",
|
|
434
|
+
"token"
|
|
435
|
+
]
|
|
436
|
+
},
|
|
437
|
+
"ModuleList": {
|
|
438
|
+
"type": "object",
|
|
439
|
+
"properties": {
|
|
440
|
+
"modules": {
|
|
441
|
+
"type": "array",
|
|
442
|
+
"items": {
|
|
443
|
+
"type": "object",
|
|
444
|
+
"properties": {
|
|
445
|
+
"id": {
|
|
446
|
+
"type": "string"
|
|
447
|
+
},
|
|
448
|
+
"type": {
|
|
449
|
+
"type": "string"
|
|
450
|
+
},
|
|
451
|
+
"icon": {
|
|
452
|
+
"type": "string"
|
|
453
|
+
},
|
|
454
|
+
"title": {
|
|
455
|
+
"type": "string"
|
|
456
|
+
},
|
|
457
|
+
"ui": {
|
|
458
|
+
"type": "string"
|
|
459
|
+
}
|
|
460
|
+
},
|
|
461
|
+
"additionalProperties": false,
|
|
462
|
+
"required": [
|
|
463
|
+
"icon",
|
|
464
|
+
"id",
|
|
465
|
+
"title",
|
|
466
|
+
"type",
|
|
467
|
+
"ui"
|
|
468
|
+
]
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
},
|
|
472
|
+
"additionalProperties": false,
|
|
473
|
+
"required": [
|
|
474
|
+
"modules"
|
|
475
|
+
]
|
|
476
|
+
},
|
|
477
|
+
"GetManagementRes": {
|
|
478
|
+
"type": "object",
|
|
479
|
+
"properties": {
|
|
480
|
+
"modules": {
|
|
481
|
+
"type": "array",
|
|
482
|
+
"items": {
|
|
483
|
+
"type": "object",
|
|
484
|
+
"properties": {
|
|
485
|
+
"id": {
|
|
486
|
+
"type": "string"
|
|
487
|
+
},
|
|
488
|
+
"type": {
|
|
489
|
+
"type": "string"
|
|
490
|
+
},
|
|
491
|
+
"icon": {
|
|
492
|
+
"type": "string"
|
|
493
|
+
},
|
|
494
|
+
"title": {
|
|
495
|
+
"type": "string"
|
|
496
|
+
},
|
|
497
|
+
"ui": {
|
|
498
|
+
"type": "string"
|
|
499
|
+
}
|
|
500
|
+
},
|
|
501
|
+
"additionalProperties": false,
|
|
502
|
+
"required": [
|
|
503
|
+
"icon",
|
|
504
|
+
"id",
|
|
505
|
+
"title",
|
|
506
|
+
"type",
|
|
507
|
+
"ui"
|
|
508
|
+
]
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
},
|
|
512
|
+
"additionalProperties": false,
|
|
513
|
+
"required": [
|
|
514
|
+
"modules"
|
|
515
|
+
]
|
|
516
|
+
},
|
|
517
|
+
"ManagementUser": {
|
|
518
|
+
"type": "object",
|
|
519
|
+
"properties": {
|
|
520
|
+
"_id": {
|
|
521
|
+
"type": "string"
|
|
522
|
+
},
|
|
523
|
+
"username": {
|
|
524
|
+
"type": "string"
|
|
525
|
+
},
|
|
526
|
+
"password": {
|
|
527
|
+
"type": "string"
|
|
528
|
+
},
|
|
529
|
+
"salt": {
|
|
530
|
+
"type": "string"
|
|
531
|
+
}
|
|
532
|
+
},
|
|
533
|
+
"additionalProperties": false,
|
|
534
|
+
"required": [
|
|
535
|
+
"_id",
|
|
536
|
+
"password",
|
|
537
|
+
"salt",
|
|
538
|
+
"username"
|
|
539
|
+
]
|
|
540
|
+
},
|
|
541
|
+
"ManagementUserViewModel": {
|
|
542
|
+
"type": "object",
|
|
543
|
+
"properties": {
|
|
544
|
+
"_id": {
|
|
545
|
+
"type": "string"
|
|
546
|
+
},
|
|
547
|
+
"username": {
|
|
548
|
+
"type": "string"
|
|
549
|
+
}
|
|
550
|
+
},
|
|
551
|
+
"additionalProperties": false,
|
|
552
|
+
"required": [
|
|
553
|
+
"_id",
|
|
554
|
+
"username"
|
|
555
|
+
]
|
|
556
|
+
},
|
|
557
|
+
"DeleteUserByUseridReq": {
|
|
558
|
+
"type": "object",
|
|
559
|
+
"additionalProperties": false
|
|
560
|
+
},
|
|
561
|
+
"DeleteUserByUseridRes": {
|
|
562
|
+
"type": "object",
|
|
563
|
+
"additionalProperties": false
|
|
564
|
+
},
|
|
565
|
+
"GetUserByUseridReq": {
|
|
566
|
+
"type": "object",
|
|
567
|
+
"additionalProperties": false
|
|
568
|
+
},
|
|
569
|
+
"GetUserByUseridRes": {
|
|
570
|
+
"type": "object",
|
|
571
|
+
"properties": {
|
|
572
|
+
"_id": {
|
|
573
|
+
"type": "string"
|
|
574
|
+
},
|
|
575
|
+
"username": {
|
|
576
|
+
"type": "string"
|
|
577
|
+
}
|
|
578
|
+
},
|
|
579
|
+
"additionalProperties": false,
|
|
580
|
+
"required": [
|
|
581
|
+
"_id",
|
|
582
|
+
"username"
|
|
583
|
+
]
|
|
584
|
+
},
|
|
585
|
+
"GetUserListReq": {
|
|
586
|
+
"type": "object",
|
|
587
|
+
"additionalProperties": false
|
|
588
|
+
},
|
|
589
|
+
"GetUserListRes": {
|
|
590
|
+
"type": "object",
|
|
591
|
+
"properties": {
|
|
592
|
+
"users": {
|
|
593
|
+
"type": "array",
|
|
594
|
+
"items": {
|
|
595
|
+
"type": "object",
|
|
596
|
+
"properties": {
|
|
597
|
+
"_id": {
|
|
598
|
+
"type": "string"
|
|
599
|
+
},
|
|
600
|
+
"username": {
|
|
601
|
+
"type": "string"
|
|
602
|
+
}
|
|
603
|
+
},
|
|
604
|
+
"additionalProperties": false,
|
|
605
|
+
"required": [
|
|
606
|
+
"_id",
|
|
607
|
+
"username"
|
|
608
|
+
]
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
},
|
|
612
|
+
"additionalProperties": false,
|
|
613
|
+
"required": [
|
|
614
|
+
"users"
|
|
615
|
+
]
|
|
616
|
+
},
|
|
617
|
+
"PostUserLoginReq": {
|
|
618
|
+
"type": "object",
|
|
619
|
+
"properties": {
|
|
620
|
+
"username": {
|
|
621
|
+
"type": "string"
|
|
622
|
+
},
|
|
623
|
+
"password": {
|
|
624
|
+
"type": "string"
|
|
625
|
+
}
|
|
626
|
+
},
|
|
627
|
+
"additionalProperties": false,
|
|
628
|
+
"required": [
|
|
629
|
+
"password",
|
|
630
|
+
"username"
|
|
631
|
+
]
|
|
632
|
+
},
|
|
633
|
+
"PostUserLoginRes": {
|
|
634
|
+
"type": "object",
|
|
635
|
+
"properties": {
|
|
636
|
+
"user": {
|
|
637
|
+
"type": "object",
|
|
638
|
+
"properties": {
|
|
639
|
+
"_id": {
|
|
640
|
+
"type": "string"
|
|
641
|
+
},
|
|
642
|
+
"username": {
|
|
643
|
+
"type": "string"
|
|
644
|
+
}
|
|
645
|
+
},
|
|
646
|
+
"additionalProperties": false,
|
|
647
|
+
"required": [
|
|
648
|
+
"_id",
|
|
649
|
+
"username"
|
|
650
|
+
]
|
|
651
|
+
},
|
|
652
|
+
"token": {
|
|
653
|
+
"type": "string"
|
|
654
|
+
}
|
|
655
|
+
},
|
|
656
|
+
"additionalProperties": false,
|
|
657
|
+
"required": [
|
|
658
|
+
"token",
|
|
659
|
+
"user"
|
|
660
|
+
]
|
|
661
|
+
},
|
|
662
|
+
"PostUserReq": {
|
|
663
|
+
"type": "object",
|
|
664
|
+
"properties": {
|
|
665
|
+
"password": {
|
|
666
|
+
"type": "string"
|
|
667
|
+
},
|
|
668
|
+
"username": {
|
|
669
|
+
"type": "string"
|
|
670
|
+
}
|
|
671
|
+
},
|
|
672
|
+
"additionalProperties": false,
|
|
673
|
+
"required": [
|
|
674
|
+
"password",
|
|
675
|
+
"username"
|
|
676
|
+
]
|
|
677
|
+
},
|
|
678
|
+
"PostUserRes": {
|
|
679
|
+
"type": "object",
|
|
680
|
+
"properties": {
|
|
681
|
+
"_id": {
|
|
682
|
+
"type": "string"
|
|
683
|
+
},
|
|
684
|
+
"username": {
|
|
685
|
+
"type": "string"
|
|
686
|
+
}
|
|
687
|
+
},
|
|
688
|
+
"additionalProperties": false,
|
|
689
|
+
"required": [
|
|
690
|
+
"_id",
|
|
691
|
+
"username"
|
|
692
|
+
]
|
|
693
|
+
},
|
|
694
|
+
"PutUserByUseridReq": {
|
|
695
|
+
"type": "object",
|
|
696
|
+
"properties": {
|
|
697
|
+
"password": {
|
|
698
|
+
"type": "string"
|
|
699
|
+
},
|
|
700
|
+
"username": {
|
|
701
|
+
"type": "string"
|
|
702
|
+
}
|
|
703
|
+
},
|
|
704
|
+
"additionalProperties": false
|
|
705
|
+
},
|
|
706
|
+
"PutUserByUseridRes": {
|
|
707
|
+
"type": "object",
|
|
708
|
+
"properties": {
|
|
709
|
+
"_id": {
|
|
710
|
+
"type": "string"
|
|
711
|
+
},
|
|
712
|
+
"username": {
|
|
713
|
+
"type": "string"
|
|
714
|
+
}
|
|
715
|
+
},
|
|
716
|
+
"additionalProperties": false,
|
|
717
|
+
"required": [
|
|
718
|
+
"_id",
|
|
719
|
+
"username"
|
|
720
|
+
]
|
|
721
|
+
}
|
|
722
|
+
}
|
package/dist/.flink/start.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
// Generated
|
|
3
|
+
// Generated Thu Dec 12 2024 18:09:01 GMT+0100 (Central European Standard Time)
|
|
4
4
|
require("./generatedHandlers");
|
|
5
5
|
require("./generatedRepos");
|
|
6
6
|
require("./generatedJobs");
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { GetHandler } from "@flink-app/flink";
|
|
2
|
+
import { Ctx } from "../../Ctx";
|
|
3
|
+
import { GetManagementRes } from "../../schemas/Management/GetRes";
|
|
4
|
+
declare const GetManagement: GetHandler<Ctx, GetManagementRes>;
|
|
5
|
+
export default GetManagement;
|
|
6
|
+
export declare const __assumedHttpMethod = "get", __file = "Get.ts";
|
|
7
|
+
export declare const __schemas: any;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.__schemas = exports.__file = exports.__assumedHttpMethod = void 0;
|
|
40
|
+
var GetManagement = function (_a) {
|
|
41
|
+
var ctx = _a.ctx, req = _a.req;
|
|
42
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
43
|
+
return __generator(this, function (_b) {
|
|
44
|
+
return [2 /*return*/, {
|
|
45
|
+
data: ctx.plugins.managementApi.moduleList,
|
|
46
|
+
status: 200,
|
|
47
|
+
}];
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
exports.default = GetManagement;
|
|
52
|
+
exports.__assumedHttpMethod = "get", exports.__file = "Get.ts";
|
|
53
|
+
exports.__schemas = { reqSchema: undefined, resSchema: { "type": "object", "additionalProperties": false, "properties": { "modules": { "type": "array", "items": { "$ref": "#/definitions/Module" } } }, "required": ["modules"] } };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Handler, HandlerConfigWithMethod } from "@flink-app/flink";
|
|
2
|
+
export interface ManagementApiEndpoint {
|
|
3
|
+
config: HandlerConfigWithMethod;
|
|
4
|
+
handlerFn: Handler<any>;
|
|
5
|
+
}
|
|
6
|
+
export declare enum ManagementApiType {
|
|
7
|
+
user = "USER",
|
|
8
|
+
managementUser = "MANAGEMENT_USER"
|
|
9
|
+
}
|
|
10
|
+
export interface ManagementApiModule {
|
|
11
|
+
id: string;
|
|
12
|
+
type: ManagementApiType;
|
|
13
|
+
endpoints: ManagementApiEndpoint[];
|
|
14
|
+
ui: Boolean;
|
|
15
|
+
uiSettings?: {
|
|
16
|
+
title: string;
|
|
17
|
+
icon: string;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export interface ManagementApiOptions {
|
|
21
|
+
token: string;
|
|
22
|
+
baseUrl?: string;
|
|
23
|
+
jwtSecret: string;
|
|
24
|
+
modules: ManagementApiModule[];
|
|
25
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ManagementApiType = void 0;
|
|
4
|
+
var ManagementApiType;
|
|
5
|
+
(function (ManagementApiType) {
|
|
6
|
+
ManagementApiType["user"] = "USER";
|
|
7
|
+
ManagementApiType["managementUser"] = "MANAGEMENT_USER";
|
|
8
|
+
})(ManagementApiType = exports.ManagementApiType || (exports.ManagementApiType = {}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flink-app/management-api-plugin",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.4",
|
|
4
4
|
"description": "Flink plugin that makes it possible to expose management api:s for other plugins",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\"",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"jsonwebtoken": "^8.5.1"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@flink-app/flink": "^0.11.
|
|
26
|
+
"@flink-app/flink": "^0.11.4",
|
|
27
27
|
"@types/bcrypt": "^5.0.0",
|
|
28
28
|
"@types/express": "4.17.11",
|
|
29
29
|
"@types/express-fileupload": "^1.1.7",
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"ts-node": "^9.1.1",
|
|
33
33
|
"typescript": "^4.2.4"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "5f36b236f3059fbd77cb01b363d60e3061bdf714"
|
|
36
36
|
}
|