@flink-app/s3-plugin 0.3.5 → 0.3.7

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.
Files changed (145) hide show
  1. package/LICENSE +21 -0
  2. package/package.json +3 -3
  3. package/.flink/generated-schemas.json +0 -311
  4. package/.flink/generatedHandlers.ts +0 -7
  5. package/.flink/generatedRepos.ts +0 -5
  6. package/.flink/schemas/schemas.json +0 -5
  7. package/.flink/schemas/schemas.ts +0 -1
  8. package/.flink/start.ts +0 -4
  9. package/dist/.flink/generatedHandlers.d.ts +0 -1
  10. package/dist/.flink/generatedHandlers.js +0 -7
  11. package/dist/.flink/generatedRepos.d.ts +0 -1
  12. package/dist/.flink/generatedRepos.js +0 -7
  13. package/dist/.flink/schemas/schemas.d.ts +0 -0
  14. package/dist/.flink/schemas/schemas.js +0 -2
  15. package/dist/.flink/schemas/schemas.json +0 -5
  16. package/dist/.flink/start.d.ts +0 -3
  17. package/dist/.flink/start.js +0 -6
  18. package/dist/src/Ctx.d.ts +0 -19
  19. package/dist/src/Ctx.js +0 -2
  20. package/dist/src/handlers/HandlebarsTemplateHandler.d.ts +0 -5
  21. package/dist/src/handlers/HandlebarsTemplateHandler.js +0 -63
  22. package/dist/src/handlers/Management/Get.d.ts +0 -7
  23. package/dist/src/handlers/Management/Get.js +0 -53
  24. package/dist/src/handlers/Management/GetManagement.d.ts +0 -8
  25. package/dist/src/handlers/Management/GetManagement.js +0 -53
  26. package/dist/src/handlers/User/DeleteByUserid.d.ts +0 -9
  27. package/dist/src/handlers/User/DeleteByUserid.js +0 -70
  28. package/dist/src/handlers/User/GetByUserid.d.ts +0 -9
  29. package/dist/src/handlers/User/GetByUserid.js +0 -71
  30. package/dist/src/handlers/User/GetList.d.ts +0 -9
  31. package/dist/src/handlers/User/GetList.js +0 -64
  32. package/dist/src/handlers/User/GetMe.d.ts +0 -8
  33. package/dist/src/handlers/User/GetMe.js +0 -81
  34. package/dist/src/handlers/User/Post.d.ts +0 -10
  35. package/dist/src/handlers/User/Post.js +0 -87
  36. package/dist/src/handlers/User/PostLogin.d.ts +0 -10
  37. package/dist/src/handlers/User/PostLogin.js +0 -86
  38. package/dist/src/handlers/User/PutByUserid.d.ts +0 -9
  39. package/dist/src/handlers/User/PutByUserid.js +0 -97
  40. package/dist/src/index.d.ts +0 -4
  41. package/dist/src/index.js +0 -380
  42. package/dist/src/lib/customer.d.ts +0 -6
  43. package/dist/src/lib/customer.js +0 -121
  44. package/dist/src/lib/payment.d.ts +0 -6
  45. package/dist/src/lib/payment.js +0 -113
  46. package/dist/src/managementApiContext.d.ts +0 -7
  47. package/dist/src/managementApiContext.js +0 -2
  48. package/dist/src/models/ManagementApi.d.ts +0 -28
  49. package/dist/src/models/ManagementApi.js +0 -8
  50. package/dist/src/repos/ConnectSessionRepo.d.ts +0 -5
  51. package/dist/src/repos/ConnectSessionRepo.js +0 -26
  52. package/dist/src/repos/ManagementUserRepo.d.ts +0 -5
  53. package/dist/src/repos/ManagementUserRepo.js +0 -26
  54. package/dist/src/reposx/ConnectSessionRepo.d.ts +0 -5
  55. package/dist/src/reposx/ConnectSessionRepo.js +0 -26
  56. package/dist/src/schemas/ConnectSession.d.ts +0 -4
  57. package/dist/src/schemas/ConnectSession.js +0 -2
  58. package/dist/src/schemas/Management/GetReq.d.ts +0 -2
  59. package/dist/src/schemas/Management/GetReq.js +0 -2
  60. package/dist/src/schemas/Management/GetRes.d.ts +0 -3
  61. package/dist/src/schemas/Management/GetRes.js +0 -2
  62. package/dist/src/schemas/ManagementUser.d.ts +0 -6
  63. package/dist/src/schemas/ManagementUser.js +0 -2
  64. package/dist/src/schemas/ManagementUserViewModel.d.ts +0 -4
  65. package/dist/src/schemas/ManagementUserViewModel.js +0 -19
  66. package/dist/src/schemas/ModuleList.d.ts +0 -18
  67. package/dist/src/schemas/ModuleList.js +0 -2
  68. package/dist/src/schemas/User/DeleteByUseridReq.d.ts +0 -2
  69. package/dist/src/schemas/User/DeleteByUseridReq.js +0 -2
  70. package/dist/src/schemas/User/DeleteByUseridRes.d.ts +0 -2
  71. package/dist/src/schemas/User/DeleteByUseridRes.js +0 -2
  72. package/dist/src/schemas/User/GetByUseridReq.d.ts +0 -2
  73. package/dist/src/schemas/User/GetByUseridReq.js +0 -2
  74. package/dist/src/schemas/User/GetByUseridRes.d.ts +0 -3
  75. package/dist/src/schemas/User/GetByUseridRes.js +0 -2
  76. package/dist/src/schemas/User/GetListReq.d.ts +0 -2
  77. package/dist/src/schemas/User/GetListReq.js +0 -2
  78. package/dist/src/schemas/User/GetListRes.d.ts +0 -4
  79. package/dist/src/schemas/User/GetListRes.js +0 -2
  80. package/dist/src/schemas/User/GetMeReq.d.ts +0 -2
  81. package/dist/src/schemas/User/GetMeReq.js +0 -2
  82. package/dist/src/schemas/User/GetMeRes.d.ts +0 -3
  83. package/dist/src/schemas/User/GetMeRes.js +0 -2
  84. package/dist/src/schemas/User/PostLoginReq.d.ts +0 -4
  85. package/dist/src/schemas/User/PostLoginReq.js +0 -2
  86. package/dist/src/schemas/User/PostLoginRes.d.ts +0 -5
  87. package/dist/src/schemas/User/PostLoginRes.js +0 -2
  88. package/dist/src/schemas/User/PostReq.d.ts +0 -3
  89. package/dist/src/schemas/User/PostReq.js +0 -2
  90. package/dist/src/schemas/User/PostRes.d.ts +0 -3
  91. package/dist/src/schemas/User/PostRes.js +0 -2
  92. package/dist/src/schemas/User/PutByUseridReq.d.ts +0 -3
  93. package/dist/src/schemas/User/PutByUseridReq.js +0 -2
  94. package/dist/src/schemas/User/PutByUseridRes.d.ts +0 -3
  95. package/dist/src/schemas/User/PutByUseridRes.js +0 -2
  96. package/dist/src/schemas/createStripeCustomerOptions.d.ts +0 -11
  97. package/dist/src/schemas/createStripeCustomerOptions.js +0 -2
  98. package/dist/src/schemas/customer/connectToStripeConnectOptions.d.ts +0 -3
  99. package/dist/src/schemas/customer/connectToStripeConnectOptions.js +0 -2
  100. package/dist/src/schemas/customer/hasPaymentMethodOptions.d.ts +0 -3
  101. package/dist/src/schemas/customer/hasPaymentMethodOptions.js +0 -2
  102. package/dist/src/schemas/customer/setupCardOptions.d.ts +0 -3
  103. package/dist/src/schemas/customer/setupCardOptions.js +0 -2
  104. package/dist/src/schemas/customer/setupCardResponse.d.ts +0 -4
  105. package/dist/src/schemas/customer/setupCardResponse.js +0 -2
  106. package/dist/src/schemas/customer/setupCardTokenOptions.d.ts +0 -4
  107. package/dist/src/schemas/customer/setupCardTokenOptions.js +0 -2
  108. package/dist/src/schemas/payment/capturePaymentOptions.d.ts +0 -4
  109. package/dist/src/schemas/payment/capturePaymentOptions.js +0 -2
  110. package/dist/src/schemas/payment/confirmPaymentOptions.d.ts +0 -4
  111. package/dist/src/schemas/payment/confirmPaymentOptions.js +0 -2
  112. package/dist/src/schemas/payment/confirmPaymentResponse.d.ts +0 -7
  113. package/dist/src/schemas/payment/confirmPaymentResponse.js +0 -2
  114. package/dist/src/schemas/payment/confirmPaymentTokenOptions.d.ts +0 -4
  115. package/dist/src/schemas/payment/confirmPaymentTokenOptions.js +0 -2
  116. package/dist/src/schemas/payment/createPaymentResponse.d.ts +0 -5
  117. package/dist/src/schemas/payment/createPaymentResponse.js +0 -2
  118. package/dist/src/schemas/stripeAPIToken.d.ts +0 -4
  119. package/dist/src/schemas/stripeAPIToken.js +0 -2
  120. package/dist/src/schemas/stripePluginOptions.d.ts +0 -31
  121. package/dist/src/schemas/stripePluginOptions.js +0 -2
  122. package/dist/src/stripeAPI.d.ts +0 -32
  123. package/dist/src/stripeAPI.js +0 -163
  124. package/dist/src/stripePlguinContext.d.ts +0 -5
  125. package/dist/src/stripePlguinContext.js +0 -2
  126. package/dist/src/stripePluginContext.d.ts +0 -6
  127. package/dist/src/stripePluginContext.js +0 -2
  128. package/dist/src/templates/connect-done.d.ts +0 -1
  129. package/dist/src/templates/connect-done.js +0 -4
  130. package/dist/src/templates/error.d.ts +0 -1
  131. package/dist/src/templates/error.js +0 -4
  132. package/dist/src/templates/master.d.ts +0 -1
  133. package/dist/src/templates/master.js +0 -4
  134. package/dist/src/templates/pay-enter-card.d.ts +0 -1
  135. package/dist/src/templates/pay-enter-card.js +0 -4
  136. package/dist/src/templates/pay-select-card.d.ts +0 -1
  137. package/dist/src/templates/pay-select-card.js +0 -4
  138. package/dist/src/templates/setup-card.d.ts +0 -1
  139. package/dist/src/templates/setup-card.js +0 -4
  140. package/dist/src/templates/setup-done.d.ts +0 -1
  141. package/dist/src/templates/setup-done.js +0 -4
  142. package/dist/src/templates/style.d.ts +0 -1
  143. package/dist/src/templates/style.js +0 -4
  144. package/dist/src/utils/bcrypt.d.ts +0 -2
  145. package/dist/src/utils/bcrypt.js +0 -28
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License
2
+
3
+ Copyright (c) Frost Experience AB https://www.frost.se
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flink-app/s3-plugin",
3
- "version": "0.3.5",
3
+ "version": "0.3.7",
4
4
  "description": "Flink plugin to work with s3",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\"",
@@ -22,7 +22,7 @@
22
22
  "node-color-log": "^5.3.1"
23
23
  },
24
24
  "devDependencies": {
25
- "@flink-app/flink": "^0.3.0",
25
+ "@flink-app/flink": "^0.3.7",
26
26
  "@types/express": "4.17.13",
27
27
  "@types/express-fileupload": "^1.2.2",
28
28
  "@types/node": "^15.6.2",
@@ -30,5 +30,5 @@
30
30
  "ts-node": "^9.1.1",
31
31
  "typescript": "^4.2.4"
32
32
  },
33
- "gitHead": "4842a9ec23adee7e70e98f63adb9ff3629a76c2a"
33
+ "gitHead": "e61be35839aa8d459dc07613d9bfa919570361f2"
34
34
  }
@@ -1,311 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$ref": "#/definitions/Schemas",
4
- "definitions": {
5
- "ConnectSession": {
6
- "type": "object",
7
- "properties": {
8
- "id": {
9
- "type": "string"
10
- },
11
- "userId": {
12
- "type": "string"
13
- }
14
- },
15
- "required": [
16
- "id",
17
- "userId"
18
- ],
19
- "additionalProperties": false
20
- },
21
- "createStripeCustomerOptions": {
22
- "type": "object",
23
- "properties": {
24
- "userId": {
25
- "type": "string"
26
- },
27
- "description": {
28
- "type": "string"
29
- },
30
- "email": {
31
- "type": "string"
32
- },
33
- "metaData": {
34
- "$ref": "#/definitions/createStripeCustomerMetaData"
35
- },
36
- "name": {
37
- "type": "string"
38
- },
39
- "phone": {
40
- "type": "string"
41
- }
42
- },
43
- "required": [
44
- "userId"
45
- ],
46
- "additionalProperties": false
47
- },
48
- "createStripeCustomerMetaData": {
49
- "type": "object",
50
- "additionalProperties": {
51
- "type": "string"
52
- }
53
- },
54
- "stripePluginOptions": {
55
- "type": "object",
56
- "properties": {
57
- "baseUrl": {
58
- "type": "string"
59
- },
60
- "stripeSecreteKey": {
61
- "type": "string"
62
- },
63
- "stripePublishableKey": {
64
- "type": "string"
65
- },
66
- "JTW_TOKEN": {
67
- "type": "string"
68
- },
69
- "logo": {
70
- "type": "string"
71
- },
72
- "redirectUrl": {
73
- "type": "string"
74
- },
75
- "stripeConnectClientID": {
76
- "type": "string"
77
- },
78
- "phrases": {
79
- "type": "object",
80
- "properties": {
81
- "setupDescription": {
82
- "type": "string"
83
- },
84
- "setupButtonText": {
85
- "type": "string"
86
- },
87
- "setupDoneMessage": {
88
- "type": "string"
89
- },
90
- "paymentSelectCardPayButtonText": {
91
- "type": "string"
92
- },
93
- "paymentSelectCardChangeCardButtonText": {
94
- "type": "string"
95
- },
96
- "paymentDoneMessage": {
97
- "type": "string"
98
- },
99
- "paymentEnterCardPayButtonText": {
100
- "type": "string"
101
- },
102
- "connectDoneMessage": {
103
- "type": "string"
104
- }
105
- },
106
- "required": [
107
- "setupDoneMessage",
108
- "connectDoneMessage"
109
- ],
110
- "additionalProperties": false
111
- },
112
- "templates": {
113
- "type": "object",
114
- "properties": {
115
- "master": {
116
- "type": "string"
117
- },
118
- "style": {
119
- "type": "string"
120
- },
121
- "setupCard": {
122
- "type": "string"
123
- },
124
- "setupDone": {
125
- "type": "string"
126
- },
127
- "error": {
128
- "type": "string"
129
- },
130
- "paySelectCard": {
131
- "type": "string"
132
- },
133
- "payEnterCard": {
134
- "type": "string"
135
- },
136
- "connectDone": {
137
- "type": "string"
138
- }
139
- },
140
- "additionalProperties": false
141
- }
142
- },
143
- "required": [
144
- "stripeSecreteKey",
145
- "stripePublishableKey",
146
- "JTW_TOKEN"
147
- ],
148
- "additionalProperties": false
149
- },
150
- "connectToStripeConnectOptions": {
151
- "type": "object",
152
- "properties": {
153
- "userId": {
154
- "type": "string"
155
- }
156
- },
157
- "required": [
158
- "userId"
159
- ],
160
- "additionalProperties": false
161
- },
162
- "hasPaymentMethodOptions": {
163
- "type": "object",
164
- "properties": {
165
- "stripeCustomerId": {
166
- "type": "string"
167
- }
168
- },
169
- "required": [
170
- "stripeCustomerId"
171
- ],
172
- "additionalProperties": false
173
- },
174
- "setupCardOptions": {
175
- "type": "object",
176
- "properties": {
177
- "stripeCustomerId": {
178
- "type": "string"
179
- }
180
- },
181
- "required": [
182
- "stripeCustomerId"
183
- ],
184
- "additionalProperties": false
185
- },
186
- "setupCardResponse": {
187
- "type": "object",
188
- "properties": {
189
- "token": {
190
- "type": "string"
191
- },
192
- "redirectUrl": {
193
- "type": "string"
194
- }
195
- },
196
- "required": [
197
- "token",
198
- "redirectUrl"
199
- ],
200
- "additionalProperties": false
201
- },
202
- "setupCardTokenOptions": {
203
- "type": "object",
204
- "properties": {
205
- "stripeCustomerId": {
206
- "type": "string"
207
- },
208
- "client_secret": {
209
- "type": "string"
210
- }
211
- },
212
- "required": [
213
- "client_secret",
214
- "stripeCustomerId"
215
- ],
216
- "additionalProperties": false
217
- },
218
- "capturePaymentOptions": {
219
- "type": "object",
220
- "properties": {
221
- "paymentIntentId": {
222
- "type": "string"
223
- },
224
- "amount": {
225
- "type": "number"
226
- }
227
- },
228
- "required": [
229
- "paymentIntentId",
230
- "amount"
231
- ],
232
- "additionalProperties": false
233
- },
234
- "confirmPaymentOptions": {
235
- "type": "object",
236
- "properties": {
237
- "paymentIntentId": {
238
- "type": "string"
239
- },
240
- "background": {
241
- "type": "boolean"
242
- }
243
- },
244
- "required": [
245
- "paymentIntentId"
246
- ],
247
- "additionalProperties": false
248
- },
249
- "confirmPaymentResponse": {
250
- "type": "object",
251
- "properties": {
252
- "paymentIntentId": {
253
- "type": "string"
254
- },
255
- "confirmed": {
256
- "type": "boolean"
257
- },
258
- "captured": {
259
- "type": "boolean"
260
- },
261
- "token": {
262
- "type": "string"
263
- },
264
- "redirectUrl": {
265
- "type": "string"
266
- }
267
- },
268
- "required": [
269
- "paymentIntentId",
270
- "confirmed",
271
- "captured"
272
- ],
273
- "additionalProperties": false
274
- },
275
- "confirmPaymentTokenOptions": {
276
- "type": "object",
277
- "properties": {
278
- "paymentIntentId": {
279
- "type": "string"
280
- },
281
- "client_secret": {
282
- "type": "string"
283
- }
284
- },
285
- "required": [
286
- "paymentIntentId",
287
- "client_secret"
288
- ],
289
- "additionalProperties": false
290
- },
291
- "createPaymentResponse": {
292
- "type": "object",
293
- "properties": {
294
- "paymentIntentId": {
295
- "type": "string"
296
- },
297
- "token": {
298
- "type": "string"
299
- },
300
- "paymentUrl": {
301
- "type": "string"
302
- }
303
- },
304
- "required": [
305
- "paymentIntentId",
306
- "token"
307
- ],
308
- "additionalProperties": false
309
- }
310
- }
311
- }
@@ -1,7 +0,0 @@
1
- // Generated Wed Mar 02 2022 13:43:22 GMT+0100 (Central European Standard Time)
2
- import { autoRegisteredHandlers, HttpMethod } from "@flink-app/flink";
3
- import * as HandlebarsTemplateHandler_0 from "../src/handlers/HandlebarsTemplateHandler";
4
-
5
- export const handlers = [];
6
- autoRegisteredHandlers.push(...handlers);
7
-
@@ -1,5 +0,0 @@
1
- // Generated Wed Mar 02 2022 13:43:22 GMT+0100 (Central European Standard Time)
2
- import { autoRegisteredRepos } from "@flink-app/flink";
3
- export const repos = [];
4
- autoRegisteredRepos.push(...repos);
5
-
@@ -1,5 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$ref": "#/definitions/Schemas",
4
- "definitions": {}
5
- }
@@ -1 +0,0 @@
1
- // Generated Wed Mar 02 2022 13:43:22 GMT+0100 (Central European Standard Time)
package/.flink/start.ts DELETED
@@ -1,4 +0,0 @@
1
- // Generated Wed Mar 02 2022 13:43:22 GMT+0100 (Central European Standard Time)
2
- import "./generatedHandlers";
3
- import "./generatedRepos";
4
- import "../src/index";
@@ -1 +0,0 @@
1
- export declare const handlers: never[];
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.handlers = void 0;
4
- // Generated Wed Mar 02 2022 13:43:22 GMT+0100 (Central European Standard Time)
5
- var flink_1 = require("@flink-app/flink");
6
- exports.handlers = [];
7
- flink_1.autoRegisteredHandlers.push.apply(flink_1.autoRegisteredHandlers, exports.handlers);
@@ -1 +0,0 @@
1
- export declare const repos: never[];
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.repos = void 0;
4
- // Generated Wed Mar 02 2022 13:43:22 GMT+0100 (Central European Standard Time)
5
- var flink_1 = require("@flink-app/flink");
6
- exports.repos = [];
7
- flink_1.autoRegisteredRepos.push.apply(flink_1.autoRegisteredRepos, exports.repos);
File without changes
@@ -1,2 +0,0 @@
1
- "use strict";
2
- // Generated Wed Mar 02 2022 13:43:22 GMT+0100 (Central European Standard Time)
@@ -1,5 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$ref": "#/definitions/Schemas",
4
- "definitions": {}
5
- }
@@ -1,3 +0,0 @@
1
- import "./generatedHandlers";
2
- import "./generatedRepos";
3
- import "../src/index";
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- // Generated Wed Mar 02 2022 13:43:22 GMT+0100 (Central European Standard Time)
4
- require("./generatedHandlers");
5
- require("./generatedRepos");
6
- require("../src/index");
package/dist/src/Ctx.d.ts DELETED
@@ -1,19 +0,0 @@
1
- import { FlinkContext } from "@flink-app/flink";
2
- import ConnectSessionRepo from "./reposx/ConnectSessionRepo";
3
- import { StripeAPI } from "./stripeAPI";
4
- export interface Ctx extends FlinkContext {
5
- repos: {
6
- connectSessionRepo: ConnectSessionRepo;
7
- };
8
- stripeAPI: StripeAPI;
9
- templates: {
10
- master: string;
11
- style: string;
12
- setupCard: string;
13
- error: string;
14
- setupDone: string;
15
- paySelectCard: string;
16
- payEnterCard: string;
17
- connectDone: string;
18
- };
19
- }
package/dist/src/Ctx.js DELETED
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +0,0 @@
1
- import { ExpressResponse } from "@flink-app/flink";
2
- export declare function HandlebarsTemplateHandler(masterTemplate: string, styleTemplate: string, template: string, pageContext: {
3
- [key: string]: any;
4
- }, res: ExpressResponse): Promise<void>;
5
- export declare const __assumedHttpMethod = "", __file = "HandlebarsTemplateHandler.ts", __query: never[], __params: never[];
@@ -1,63 +0,0 @@
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
- var __importDefault = (this && this.__importDefault) || function (mod) {
39
- return (mod && mod.__esModule) ? mod : { "default": mod };
40
- };
41
- Object.defineProperty(exports, "__esModule", { value: true });
42
- exports.__params = exports.__query = exports.__file = exports.__assumedHttpMethod = exports.HandlebarsTemplateHandler = void 0;
43
- var flink_1 = require("@flink-app/flink");
44
- var handlebars_1 = __importDefault(require("handlebars"));
45
- function HandlebarsTemplateHandler(masterTemplate, styleTemplate, template, pageContext, res) {
46
- return __awaiter(this, void 0, void 0, function () {
47
- var master, page;
48
- return __generator(this, function (_a) {
49
- try {
50
- master = handlebars_1.default.compile(masterTemplate.replace("{{{body}}}", "###BODY###").replace("{{{style}}}", "###STYLE###"))(pageContext);
51
- page = handlebars_1.default.compile(template)(pageContext);
52
- res.send(master.replace("###BODY###", page).replace("###STYLE###", styleTemplate));
53
- }
54
- catch (ex) {
55
- flink_1.log.error(ex);
56
- res.send("Template rendering error");
57
- }
58
- return [2 /*return*/];
59
- });
60
- });
61
- }
62
- exports.HandlebarsTemplateHandler = HandlebarsTemplateHandler;
63
- exports.__assumedHttpMethod = "", exports.__file = "HandlebarsTemplateHandler.ts", exports.__query = [], exports.__params = [];
@@ -1,7 +0,0 @@
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;
@@ -1,53 +0,0 @@
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"] } };
@@ -1,8 +0,0 @@
1
- import { Handler } from "@flink-app/flink";
2
- import { Ctx } from "../../Ctx";
3
- import { GetManagementReq } from "../../schemas/Management/GetReq";
4
- import { GetManagementRes } from "../../schemas/Management/GetRes";
5
- declare const GetManagement: Handler<Ctx, GetManagementReq, GetManagementRes>;
6
- export default GetManagement;
7
- export declare const __assumedHttpMethod = "get", __file = "GetManagement.ts", __query: never[], __params: never[];
8
- export declare const __schemas: any;
@@ -1,53 +0,0 @@
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.__params = exports.__query = 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 = "GetManagement.ts", exports.__query = [], exports.__params = [];
53
- exports.__schemas = { reqSchema: { "type": "object", "additionalProperties": false, "properties": {} }, resSchema: { "type": "object", "additionalProperties": false, "properties": { "modules": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" }, "features": { "type": "array", "items": { "type": "string" } }, "title": { "type": "string" }, "ui": { "type": "string" }, "data": { "type": "object" }, "endpoints": { "type": "array", "items": { "type": "object", "properties": { "method": { "type": "string" }, "url": { "type": "string" } }, "required": ["method", "url"], "additionalProperties": false } } }, "required": ["id", "type", "features", "title", "ui", "data", "endpoints"], "additionalProperties": false } } }, "required": ["modules"] } };