@friggframework/core 2.0.0--canary.590.0836cf9.0 → 2.0.0--canary.590.ffb7d1b.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.
|
@@ -434,6 +434,19 @@ class IntegrationBase {
|
|
|
434
434
|
// Default: no-op, integrations override this
|
|
435
435
|
}
|
|
436
436
|
|
|
437
|
+
/**
|
|
438
|
+
* Queue a webhook for asynchronous worker dispatch.
|
|
439
|
+
*
|
|
440
|
+
* The dispatch event defaults to `ON_WEBHOOK` for backward compatibility
|
|
441
|
+
* with the `Definition.webhooks: true` path. Extensions (and any caller
|
|
442
|
+
* that needs the worker to invoke a specific bound handler) can override
|
|
443
|
+
* by passing `event` in the payload — it's stripped from the payload and
|
|
444
|
+
* used as the SQS message's dispatch event.
|
|
445
|
+
*
|
|
446
|
+
* @param {Object} data - Webhook payload. May include `event` to override
|
|
447
|
+
* the default `ON_WEBHOOK` dispatch event. All other fields are passed
|
|
448
|
+
* through to the worker as the `data` field of the SQS message.
|
|
449
|
+
*/
|
|
437
450
|
async queueWebhook(data) {
|
|
438
451
|
const { QueuerUtil } = require('../queues');
|
|
439
452
|
|
|
@@ -446,10 +459,12 @@ class IntegrationBase {
|
|
|
446
459
|
throw new Error(`Queue URL not found for ${queueName}`);
|
|
447
460
|
}
|
|
448
461
|
|
|
462
|
+
const { event: dispatchEvent, ...payload } = data || {};
|
|
463
|
+
|
|
449
464
|
return QueuerUtil.send(
|
|
450
465
|
{
|
|
451
|
-
event: 'ON_WEBHOOK',
|
|
452
|
-
data,
|
|
466
|
+
event: dispatchEvent || 'ON_WEBHOOK',
|
|
467
|
+
data: payload,
|
|
453
468
|
},
|
|
454
469
|
queueUrl
|
|
455
470
|
);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@friggframework/core",
|
|
3
3
|
"prettier": "@friggframework/prettier-config",
|
|
4
|
-
"version": "2.0.0--canary.590.
|
|
4
|
+
"version": "2.0.0--canary.590.ffb7d1b.0",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@aws-sdk/client-apigatewaymanagementapi": "^3.588.0",
|
|
7
7
|
"@aws-sdk/client-kms": "^3.588.0",
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@friggframework/eslint-config": "2.0.0--canary.590.
|
|
42
|
-
"@friggframework/prettier-config": "2.0.0--canary.590.
|
|
43
|
-
"@friggframework/test": "2.0.0--canary.590.
|
|
41
|
+
"@friggframework/eslint-config": "2.0.0--canary.590.ffb7d1b.0",
|
|
42
|
+
"@friggframework/prettier-config": "2.0.0--canary.590.ffb7d1b.0",
|
|
43
|
+
"@friggframework/test": "2.0.0--canary.590.ffb7d1b.0",
|
|
44
44
|
"@prisma/client": "^6.17.0",
|
|
45
45
|
"@types/lodash": "4.17.15",
|
|
46
46
|
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"publishConfig": {
|
|
81
81
|
"access": "public"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "ffb7d1bc294080aa9e9a3611dd30e21a4b800542"
|
|
84
84
|
}
|