@friggframework/core 1.1.4--canary.301.abb73c7.0 → 1.1.4--canary.301.ffb9dc2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -89,12 +89,9 @@ function setIntegrationRoutes(router, factory, getUserId) {
|
|
|
89
89
|
);
|
|
90
90
|
await integration.onCreate();
|
|
91
91
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
integration.record
|
|
92
|
+
res.status(201).json(
|
|
93
|
+
await IntegrationHelper.getFormattedIntegration(integration.record)
|
|
95
94
|
);
|
|
96
|
-
res.status(201);
|
|
97
|
-
res.json(response);
|
|
98
95
|
})
|
|
99
96
|
);
|
|
100
97
|
|
|
@@ -114,11 +111,9 @@ function setIntegrationRoutes(router, factory, getUserId) {
|
|
|
114
111
|
);
|
|
115
112
|
await integration.onUpdate(params);
|
|
116
113
|
|
|
117
|
-
|
|
118
|
-
integration.record
|
|
114
|
+
res.json(
|
|
115
|
+
await IntegrationHelper.getFormattedIntegration(integration.record)
|
|
119
116
|
);
|
|
120
|
-
|
|
121
|
-
res.json(response);
|
|
122
117
|
})
|
|
123
118
|
);
|
|
124
119
|
|
|
@@ -142,8 +137,7 @@ function setIntegrationRoutes(router, factory, getUserId) {
|
|
|
142
137
|
params.integrationId
|
|
143
138
|
);
|
|
144
139
|
|
|
145
|
-
res.status(201);
|
|
146
|
-
res.json({});
|
|
140
|
+
res.status(201).json({});
|
|
147
141
|
})
|
|
148
142
|
);
|
|
149
143
|
|
|
@@ -154,8 +148,7 @@ function setIntegrationRoutes(router, factory, getUserId) {
|
|
|
154
148
|
]);
|
|
155
149
|
const integration =
|
|
156
150
|
await integrationFactory.getInstanceFromIntegrationId(params);
|
|
157
|
-
|
|
158
|
-
res.json(results);
|
|
151
|
+
res.json(await integration.getConfigOptions());
|
|
159
152
|
})
|
|
160
153
|
);
|
|
161
154
|
|
|
@@ -166,10 +159,10 @@ function setIntegrationRoutes(router, factory, getUserId) {
|
|
|
166
159
|
]);
|
|
167
160
|
const integration =
|
|
168
161
|
await integrationFactory.getInstanceFromIntegrationId(params);
|
|
169
|
-
|
|
170
|
-
|
|
162
|
+
|
|
163
|
+
res.json(
|
|
164
|
+
await integration.refreshConfigOptions(req.body)
|
|
171
165
|
);
|
|
172
|
-
res.json(results);
|
|
173
166
|
})
|
|
174
167
|
);
|
|
175
168
|
|
|
@@ -181,11 +174,10 @@ function setIntegrationRoutes(router, factory, getUserId) {
|
|
|
181
174
|
]);
|
|
182
175
|
const integration =
|
|
183
176
|
await integrationFactory.getInstanceFromIntegrationId(params);
|
|
184
|
-
|
|
185
|
-
|
|
177
|
+
|
|
178
|
+
res.json(
|
|
179
|
+
await integration.getActionOptions(params.actionId)
|
|
186
180
|
);
|
|
187
|
-
// We could perhaps augment router with dynamic options? Haven't decided yet, but here may be the place
|
|
188
|
-
res.json(results);
|
|
189
181
|
})
|
|
190
182
|
);
|
|
191
183
|
|
|
@@ -197,12 +189,10 @@ function setIntegrationRoutes(router, factory, getUserId) {
|
|
|
197
189
|
]);
|
|
198
190
|
const integration =
|
|
199
191
|
await integrationFactory.getInstanceFromIntegrationId(params);
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
req.body
|
|
192
|
+
|
|
193
|
+
res.json(
|
|
194
|
+
await integration.refreshActionOptions(params.actionId, req.body)
|
|
203
195
|
);
|
|
204
|
-
// We could perhaps augment router with dynamic options? Haven't decided yet, but here may be the place
|
|
205
|
-
res.json(results);
|
|
206
196
|
})
|
|
207
197
|
);
|
|
208
198
|
|
|
@@ -214,14 +204,12 @@ function setIntegrationRoutes(router, factory, getUserId) {
|
|
|
214
204
|
]);
|
|
215
205
|
const integration =
|
|
216
206
|
await integrationFactory.getInstanceFromIntegrationId(params);
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
req.body
|
|
207
|
+
|
|
208
|
+
res.json(
|
|
209
|
+
await integration.notify(params.actionId, req.body)
|
|
220
210
|
);
|
|
221
|
-
// We could perhaps augment router with dynamic options? Haven't decided yet, but here may be the place
|
|
222
|
-
res.json(results);
|
|
223
211
|
})
|
|
224
|
-
)
|
|
212
|
+
);
|
|
225
213
|
|
|
226
214
|
router.route('/api/integrations/:integrationId').get(
|
|
227
215
|
catchAsyncError(async (req, res) => {
|
|
@@ -298,6 +286,7 @@ function setEntityRoutes(router, factory, getUserId) {
|
|
|
298
286
|
`Error: EntityManager of type ${params.entityType} requires a valid url`
|
|
299
287
|
);
|
|
300
288
|
}
|
|
289
|
+
|
|
301
290
|
res.json(await module.getAuthorizationRequirements());
|
|
302
291
|
})
|
|
303
292
|
);
|
|
@@ -308,15 +297,14 @@ function setEntityRoutes(router, factory, getUserId) {
|
|
|
308
297
|
'entityType',
|
|
309
298
|
'data',
|
|
310
299
|
]);
|
|
311
|
-
console.log('post authorize', params);
|
|
312
300
|
const module = await getModuleInstance(req, params.entityType);
|
|
313
|
-
console.log('post authorize module', module);
|
|
314
|
-
const results = await module.processAuthorizationCallback({
|
|
315
|
-
userId: getUserId(req),
|
|
316
|
-
data: params.data,
|
|
317
|
-
});
|
|
318
301
|
|
|
319
|
-
res.json(
|
|
302
|
+
res.json(
|
|
303
|
+
await module.processAuthorizationCallback({
|
|
304
|
+
userId: getUserId(req),
|
|
305
|
+
data: params.data,
|
|
306
|
+
})
|
|
307
|
+
);
|
|
320
308
|
})
|
|
321
309
|
);
|
|
322
310
|
|
|
@@ -382,6 +370,7 @@ function setEntityRoutes(router, factory, getUserId) {
|
|
|
382
370
|
if (!module) {
|
|
383
371
|
throw Boom.notFound();
|
|
384
372
|
}
|
|
373
|
+
|
|
385
374
|
res.json(module.entity);
|
|
386
375
|
})
|
|
387
376
|
);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@friggframework/core",
|
|
3
3
|
"prettier": "@friggframework/prettier-config",
|
|
4
|
-
"version": "1.1.4--canary.301.
|
|
4
|
+
"version": "1.1.4--canary.301.ffb9dc2.0",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@hapi/boom": "^10.0.1",
|
|
7
7
|
"aws-sdk": "^2.1200.0",
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
"node-fetch": "^2.6.7"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@friggframework/eslint-config": "1.1.4--canary.301.
|
|
19
|
-
"@friggframework/prettier-config": "1.1.4--canary.301.
|
|
20
|
-
"@friggframework/test": "1.1.4--canary.301.
|
|
18
|
+
"@friggframework/eslint-config": "1.1.4--canary.301.ffb9dc2.0",
|
|
19
|
+
"@friggframework/prettier-config": "1.1.4--canary.301.ffb9dc2.0",
|
|
20
|
+
"@friggframework/test": "1.1.4--canary.301.ffb9dc2.0",
|
|
21
21
|
"@types/lodash": "^4.14.191",
|
|
22
22
|
"@typescript-eslint/eslint-plugin": "^5.55.0",
|
|
23
23
|
"chai": "^4.3.6",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
},
|
|
50
50
|
"homepage": "https://github.com/friggframework/frigg#readme",
|
|
51
51
|
"description": "",
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "ffb9dc213cfb9e02635a17234c126a412f734039"
|
|
53
53
|
}
|