@flink-app/s3-plugin 0.3.11 → 0.3.12

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 (144) hide show
  1. package/.flink/generated-schemas.json +311 -0
  2. package/.flink/generatedHandlers.ts +7 -0
  3. package/.flink/generatedRepos.ts +5 -0
  4. package/.flink/schemas/schemas.json +5 -0
  5. package/.flink/schemas/schemas.ts +1 -0
  6. package/.flink/start.ts +4 -0
  7. package/dist/.flink/generatedHandlers.d.ts +1 -0
  8. package/dist/.flink/generatedHandlers.js +7 -0
  9. package/dist/.flink/generatedRepos.d.ts +1 -0
  10. package/dist/.flink/generatedRepos.js +7 -0
  11. package/dist/.flink/schemas/schemas.d.ts +0 -0
  12. package/dist/.flink/schemas/schemas.js +2 -0
  13. package/dist/.flink/schemas/schemas.json +5 -0
  14. package/dist/.flink/start.d.ts +3 -0
  15. package/dist/.flink/start.js +6 -0
  16. package/dist/src/Ctx.d.ts +19 -0
  17. package/dist/src/Ctx.js +2 -0
  18. package/dist/src/handlers/HandlebarsTemplateHandler.d.ts +5 -0
  19. package/dist/src/handlers/HandlebarsTemplateHandler.js +63 -0
  20. package/dist/src/handlers/Management/Get.d.ts +7 -0
  21. package/dist/src/handlers/Management/Get.js +53 -0
  22. package/dist/src/handlers/Management/GetManagement.d.ts +8 -0
  23. package/dist/src/handlers/Management/GetManagement.js +53 -0
  24. package/dist/src/handlers/User/DeleteByUserid.d.ts +9 -0
  25. package/dist/src/handlers/User/DeleteByUserid.js +70 -0
  26. package/dist/src/handlers/User/GetByUserid.d.ts +9 -0
  27. package/dist/src/handlers/User/GetByUserid.js +71 -0
  28. package/dist/src/handlers/User/GetList.d.ts +9 -0
  29. package/dist/src/handlers/User/GetList.js +64 -0
  30. package/dist/src/handlers/User/GetMe.d.ts +8 -0
  31. package/dist/src/handlers/User/GetMe.js +81 -0
  32. package/dist/src/handlers/User/Post.d.ts +10 -0
  33. package/dist/src/handlers/User/Post.js +87 -0
  34. package/dist/src/handlers/User/PostLogin.d.ts +10 -0
  35. package/dist/src/handlers/User/PostLogin.js +86 -0
  36. package/dist/src/handlers/User/PutByUserid.d.ts +9 -0
  37. package/dist/src/handlers/User/PutByUserid.js +97 -0
  38. package/dist/src/index.d.ts +4 -0
  39. package/dist/src/index.js +380 -0
  40. package/dist/src/lib/customer.d.ts +6 -0
  41. package/dist/src/lib/customer.js +121 -0
  42. package/dist/src/lib/payment.d.ts +6 -0
  43. package/dist/src/lib/payment.js +113 -0
  44. package/dist/src/managementApiContext.d.ts +7 -0
  45. package/dist/src/managementApiContext.js +2 -0
  46. package/dist/src/models/ManagementApi.d.ts +28 -0
  47. package/dist/src/models/ManagementApi.js +8 -0
  48. package/dist/src/repos/ConnectSessionRepo.d.ts +5 -0
  49. package/dist/src/repos/ConnectSessionRepo.js +26 -0
  50. package/dist/src/repos/ManagementUserRepo.d.ts +5 -0
  51. package/dist/src/repos/ManagementUserRepo.js +26 -0
  52. package/dist/src/reposx/ConnectSessionRepo.d.ts +5 -0
  53. package/dist/src/reposx/ConnectSessionRepo.js +26 -0
  54. package/dist/src/schemas/ConnectSession.d.ts +4 -0
  55. package/dist/src/schemas/ConnectSession.js +2 -0
  56. package/dist/src/schemas/Management/GetReq.d.ts +2 -0
  57. package/dist/src/schemas/Management/GetReq.js +2 -0
  58. package/dist/src/schemas/Management/GetRes.d.ts +3 -0
  59. package/dist/src/schemas/Management/GetRes.js +2 -0
  60. package/dist/src/schemas/ManagementUser.d.ts +6 -0
  61. package/dist/src/schemas/ManagementUser.js +2 -0
  62. package/dist/src/schemas/ManagementUserViewModel.d.ts +4 -0
  63. package/dist/src/schemas/ManagementUserViewModel.js +19 -0
  64. package/dist/src/schemas/ModuleList.d.ts +18 -0
  65. package/dist/src/schemas/ModuleList.js +2 -0
  66. package/dist/src/schemas/User/DeleteByUseridReq.d.ts +2 -0
  67. package/dist/src/schemas/User/DeleteByUseridReq.js +2 -0
  68. package/dist/src/schemas/User/DeleteByUseridRes.d.ts +2 -0
  69. package/dist/src/schemas/User/DeleteByUseridRes.js +2 -0
  70. package/dist/src/schemas/User/GetByUseridReq.d.ts +2 -0
  71. package/dist/src/schemas/User/GetByUseridReq.js +2 -0
  72. package/dist/src/schemas/User/GetByUseridRes.d.ts +3 -0
  73. package/dist/src/schemas/User/GetByUseridRes.js +2 -0
  74. package/dist/src/schemas/User/GetListReq.d.ts +2 -0
  75. package/dist/src/schemas/User/GetListReq.js +2 -0
  76. package/dist/src/schemas/User/GetListRes.d.ts +4 -0
  77. package/dist/src/schemas/User/GetListRes.js +2 -0
  78. package/dist/src/schemas/User/GetMeReq.d.ts +2 -0
  79. package/dist/src/schemas/User/GetMeReq.js +2 -0
  80. package/dist/src/schemas/User/GetMeRes.d.ts +3 -0
  81. package/dist/src/schemas/User/GetMeRes.js +2 -0
  82. package/dist/src/schemas/User/PostLoginReq.d.ts +4 -0
  83. package/dist/src/schemas/User/PostLoginReq.js +2 -0
  84. package/dist/src/schemas/User/PostLoginRes.d.ts +5 -0
  85. package/dist/src/schemas/User/PostLoginRes.js +2 -0
  86. package/dist/src/schemas/User/PostReq.d.ts +3 -0
  87. package/dist/src/schemas/User/PostReq.js +2 -0
  88. package/dist/src/schemas/User/PostRes.d.ts +3 -0
  89. package/dist/src/schemas/User/PostRes.js +2 -0
  90. package/dist/src/schemas/User/PutByUseridReq.d.ts +3 -0
  91. package/dist/src/schemas/User/PutByUseridReq.js +2 -0
  92. package/dist/src/schemas/User/PutByUseridRes.d.ts +3 -0
  93. package/dist/src/schemas/User/PutByUseridRes.js +2 -0
  94. package/dist/src/schemas/createStripeCustomerOptions.d.ts +11 -0
  95. package/dist/src/schemas/createStripeCustomerOptions.js +2 -0
  96. package/dist/src/schemas/customer/connectToStripeConnectOptions.d.ts +3 -0
  97. package/dist/src/schemas/customer/connectToStripeConnectOptions.js +2 -0
  98. package/dist/src/schemas/customer/hasPaymentMethodOptions.d.ts +3 -0
  99. package/dist/src/schemas/customer/hasPaymentMethodOptions.js +2 -0
  100. package/dist/src/schemas/customer/setupCardOptions.d.ts +3 -0
  101. package/dist/src/schemas/customer/setupCardOptions.js +2 -0
  102. package/dist/src/schemas/customer/setupCardResponse.d.ts +4 -0
  103. package/dist/src/schemas/customer/setupCardResponse.js +2 -0
  104. package/dist/src/schemas/customer/setupCardTokenOptions.d.ts +4 -0
  105. package/dist/src/schemas/customer/setupCardTokenOptions.js +2 -0
  106. package/dist/src/schemas/payment/capturePaymentOptions.d.ts +4 -0
  107. package/dist/src/schemas/payment/capturePaymentOptions.js +2 -0
  108. package/dist/src/schemas/payment/confirmPaymentOptions.d.ts +4 -0
  109. package/dist/src/schemas/payment/confirmPaymentOptions.js +2 -0
  110. package/dist/src/schemas/payment/confirmPaymentResponse.d.ts +7 -0
  111. package/dist/src/schemas/payment/confirmPaymentResponse.js +2 -0
  112. package/dist/src/schemas/payment/confirmPaymentTokenOptions.d.ts +4 -0
  113. package/dist/src/schemas/payment/confirmPaymentTokenOptions.js +2 -0
  114. package/dist/src/schemas/payment/createPaymentResponse.d.ts +5 -0
  115. package/dist/src/schemas/payment/createPaymentResponse.js +2 -0
  116. package/dist/src/schemas/stripeAPIToken.d.ts +4 -0
  117. package/dist/src/schemas/stripeAPIToken.js +2 -0
  118. package/dist/src/schemas/stripePluginOptions.d.ts +31 -0
  119. package/dist/src/schemas/stripePluginOptions.js +2 -0
  120. package/dist/src/stripeAPI.d.ts +32 -0
  121. package/dist/src/stripeAPI.js +163 -0
  122. package/dist/src/stripePlguinContext.d.ts +5 -0
  123. package/dist/src/stripePlguinContext.js +2 -0
  124. package/dist/src/stripePluginContext.d.ts +6 -0
  125. package/dist/src/stripePluginContext.js +2 -0
  126. package/dist/src/templates/connect-done.d.ts +1 -0
  127. package/dist/src/templates/connect-done.js +4 -0
  128. package/dist/src/templates/error.d.ts +1 -0
  129. package/dist/src/templates/error.js +4 -0
  130. package/dist/src/templates/master.d.ts +1 -0
  131. package/dist/src/templates/master.js +4 -0
  132. package/dist/src/templates/pay-enter-card.d.ts +1 -0
  133. package/dist/src/templates/pay-enter-card.js +4 -0
  134. package/dist/src/templates/pay-select-card.d.ts +1 -0
  135. package/dist/src/templates/pay-select-card.js +4 -0
  136. package/dist/src/templates/setup-card.d.ts +1 -0
  137. package/dist/src/templates/setup-card.js +4 -0
  138. package/dist/src/templates/setup-done.d.ts +1 -0
  139. package/dist/src/templates/setup-done.js +4 -0
  140. package/dist/src/templates/style.d.ts +1 -0
  141. package/dist/src/templates/style.js +4 -0
  142. package/dist/src/utils/bcrypt.d.ts +2 -0
  143. package/dist/src/utils/bcrypt.js +28 -0
  144. package/package.json +3 -3
@@ -0,0 +1,311 @@
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
+ }
@@ -0,0 +1,7 @@
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
+
@@ -0,0 +1,5 @@
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
+
@@ -0,0 +1,5 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$ref": "#/definitions/Schemas",
4
+ "definitions": {}
5
+ }
@@ -0,0 +1 @@
1
+ // Generated Wed Mar 02 2022 13:43:22 GMT+0100 (Central European Standard Time)
@@ -0,0 +1,4 @@
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";
@@ -0,0 +1 @@
1
+ export declare const handlers: never[];
@@ -0,0 +1,7 @@
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);
@@ -0,0 +1 @@
1
+ export declare const repos: never[];
@@ -0,0 +1,7 @@
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
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ // Generated Wed Mar 02 2022 13:43:22 GMT+0100 (Central European Standard Time)
@@ -0,0 +1,5 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$ref": "#/definitions/Schemas",
4
+ "definitions": {}
5
+ }
@@ -0,0 +1,3 @@
1
+ import "./generatedHandlers";
2
+ import "./generatedRepos";
3
+ import "../src/index";
@@ -0,0 +1,6 @@
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");
@@ -0,0 +1,19 @@
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
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
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[];
@@ -0,0 +1,63 @@
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 = [];
@@ -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,8 @@
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;
@@ -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.__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"] } };
@@ -0,0 +1,9 @@
1
+ import { Handler, RouteProps } from "@flink-app/flink";
2
+ import { Ctx } from "../../Ctx";
3
+ import { DeleteUserByUseridReq } from "../../schemas/User/DeleteByUseridReq";
4
+ import { DeleteUserByUseridRes } from "../../schemas/User/DeleteByUseridRes";
5
+ export declare const Route: RouteProps;
6
+ declare const DeleteUserByUserid: Handler<Ctx, DeleteUserByUseridReq, DeleteUserByUseridRes>;
7
+ export default DeleteUserByUserid;
8
+ export declare const __assumedHttpMethod = "delete", __file = "DeleteByUserid.ts", __query: never[], __params: never[];
9
+ export declare const __schemas: any;