@webiny/webhooks 6.6.0-alpha.0 → 6.6.0-alpha.10
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/Webhooks.d.ts +6 -0
- package/Webhooks.js +11 -0
- package/Webhooks.js.map +1 -0
- package/admin/Extension.d.ts +1 -0
- package/admin/Extension.js +1 -0
- package/admin/WebhookRoutes.js +20 -4
- package/admin/WebhookRoutes.js.map +1 -1
- package/admin/presentation/WebhookDeliveriesPage/components/DeliveryBottomInfoBar.d.ts +2 -2
- package/admin/presentation/WebhookDeliveriesPage/components/DeliveryFilters.d.ts +2 -2
- package/admin/presentation/WebhookDeliveriesPage/components/DeliveryFilters.js +37 -24
- package/admin/presentation/WebhookDeliveriesPage/components/DeliveryFilters.js.map +1 -1
- package/admin/presentation/WebhookDeliveriesPage/components/DeliveryList.d.ts +2 -2
- package/admin/presentation/WebhookDeliveriesPage/components/WebhookDeliveriesPage.js +3 -3
- package/admin/presentation/WebhookDeliveriesPage/components/WebhookDeliveriesPage.js.map +1 -1
- package/admin/presentation/WebhookForm/components/SigningSecret.d.ts +2 -2
- package/admin/presentation/WebhookList/components/WebhookListContent.d.ts +2 -2
- package/api/features/DeleteWebhook/DeleteWebhookRepository.js +2 -1
- package/api/features/DeleteWebhook/DeleteWebhookRepository.js.map +1 -1
- package/api/features/ListWebhookDeliveries/ListWebhookDeliveriesRepository.js +7 -4
- package/api/features/ListWebhookDeliveries/ListWebhookDeliveriesRepository.js.map +1 -1
- package/api/features/ListWebhooks/ListWebhooksRepository.js +7 -4
- package/api/features/ListWebhooks/ListWebhooksRepository.js.map +1 -1
- package/api/features/SendWebhookTask/SendWebhookTask.d.ts +10 -5
- package/api/features/SendWebhookTask/SendWebhookTask.js +20 -11
- package/api/features/SendWebhookTask/SendWebhookTask.js.map +1 -1
- package/api/features/UpdateWebhook/UpdateWebhookRepository.js +3 -1
- package/api/features/UpdateWebhook/UpdateWebhookRepository.js.map +1 -1
- package/api/features/UpdateWebhookDelivery/UpdateWebhookDeliveryRepository.js +3 -1
- package/api/features/UpdateWebhookDelivery/UpdateWebhookDeliveryRepository.js.map +1 -1
- package/api/features/UpdateWebhookSettings/UpdateWebhookSettingsRepository.js +3 -1
- package/api/features/UpdateWebhookSettings/UpdateWebhookSettingsRepository.js.map +1 -1
- package/api/graphql/WebhookCrudSchema.d.ts +1 -0
- package/api/graphql/WebhookCrudSchema.js +4 -0
- package/api/graphql/WebhookCrudSchema.js.map +1 -1
- package/api/graphql/WebhookDeliverySchema.d.ts +1 -0
- package/api/graphql/WebhookDeliverySchema.js +4 -0
- package/api/graphql/WebhookDeliverySchema.js.map +1 -1
- package/api/graphql/WebhookEventSchema.d.ts +1 -0
- package/api/graphql/WebhookEventSchema.js +4 -0
- package/api/graphql/WebhookEventSchema.js.map +1 -1
- package/api/graphql/WebhookSettingsSchema.d.ts +1 -0
- package/api/graphql/WebhookSettingsSchema.js +4 -0
- package/api/graphql/WebhookSettingsSchema.js.map +1 -1
- package/api/graphql/WebhookTriggerSchema.d.ts +1 -0
- package/api/graphql/WebhookTriggerSchema.js +4 -0
- package/api/graphql/WebhookTriggerSchema.js.map +1 -1
- package/api/models/WebhookDeliveryModel.js +2 -1
- package/api/models/WebhookDeliveryModel.js.map +1 -1
- package/api/models/WebhookModel.js +2 -1
- package/api/models/WebhookModel.js.map +1 -1
- package/api/models/WebhookSettingsModel.js +2 -1
- package/api/models/WebhookSettingsModel.js.map +1 -1
- package/api/utils/isValidEndpointUrl.js +1 -1
- package/api/utils/isValidEndpointUrl.js.map +1 -1
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/package.json +28 -27
|
@@ -4,7 +4,8 @@ class WebhookSettingsModelFactory {
|
|
|
4
4
|
async execute(builder) {
|
|
5
5
|
const model = builder.private({
|
|
6
6
|
modelId: WEBHOOK_SETTINGS_MODEL_ID,
|
|
7
|
-
name: "Webhook Settings"
|
|
7
|
+
name: "Webhook Settings",
|
|
8
|
+
lifecycleEvents: false
|
|
8
9
|
}).tags([
|
|
9
10
|
"$publishing:false",
|
|
10
11
|
"$hidden:true"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api/models/WebhookSettingsModel.js","sources":["../../../src/api/models/WebhookSettingsModel.ts"],"sourcesContent":["import { ModelFactory } from \"@webiny/api-headless-cms/features/modelBuilder/index.js\";\nimport {\n WEBHOOK_SETTINGS_MODEL_ID,\n WEBHOOK_DELIVERY_MAX_RETENTION_DAYS\n} from \"~/api/domain/constants.js\";\n\nclass WebhookSettingsModelFactory implements ModelFactory.Interface {\n async execute(builder: ModelFactory.Builder) {\n const model = builder\n .private({\n modelId: WEBHOOK_SETTINGS_MODEL_ID,\n name: \"Webhook Settings\"\n })\n .tags([\"$publishing:false\", \"$hidden:true\"])\n .singleEntry();\n\n model.fields(fields => ({\n signingSecret: fields\n .text()\n .label(\"Signing Secret\")\n .encrypt()\n .description(\"Global signing secret used for all webhook deliveries.\"),\n deliveryRetentionDays: fields\n .number()\n .label(\"Delivery Retention (days)\")\n .gte(0, \"Must be 0 or greater.\")\n .lte(\n WEBHOOK_DELIVERY_MAX_RETENTION_DAYS,\n `Must be at most ${WEBHOOK_DELIVERY_MAX_RETENTION_DAYS}.`\n )\n .description(\n `How long to keep delivery logs. 0 = delete immediately. Max ${WEBHOOK_DELIVERY_MAX_RETENTION_DAYS} days.`\n )\n }));\n\n return [model];\n }\n}\n\nexport const WebhookSettingsModel = ModelFactory.createImplementation({\n implementation: WebhookSettingsModelFactory,\n dependencies: []\n});\n"],"names":["WebhookSettingsModelFactory","builder","model","WEBHOOK_SETTINGS_MODEL_ID","fields","WEBHOOK_DELIVERY_MAX_RETENTION_DAYS","WebhookSettingsModel","ModelFactory"],"mappings":";;AAMA,MAAMA;IACF,MAAM,QAAQC,OAA6B,EAAE;QACzC,MAAMC,QAAQD,QACT,OAAO,CAAC;YACL,SAASE;YACT,MAAM;
|
|
1
|
+
{"version":3,"file":"api/models/WebhookSettingsModel.js","sources":["../../../src/api/models/WebhookSettingsModel.ts"],"sourcesContent":["import { ModelFactory } from \"@webiny/api-headless-cms/features/modelBuilder/index.js\";\nimport {\n WEBHOOK_SETTINGS_MODEL_ID,\n WEBHOOK_DELIVERY_MAX_RETENTION_DAYS\n} from \"~/api/domain/constants.js\";\n\nclass WebhookSettingsModelFactory implements ModelFactory.Interface {\n async execute(builder: ModelFactory.Builder) {\n const model = builder\n .private({\n modelId: WEBHOOK_SETTINGS_MODEL_ID,\n name: \"Webhook Settings\",\n lifecycleEvents: false\n })\n .tags([\"$publishing:false\", \"$hidden:true\"])\n .singleEntry();\n\n model.fields(fields => ({\n signingSecret: fields\n .text()\n .label(\"Signing Secret\")\n .encrypt()\n .description(\"Global signing secret used for all webhook deliveries.\"),\n deliveryRetentionDays: fields\n .number()\n .label(\"Delivery Retention (days)\")\n .gte(0, \"Must be 0 or greater.\")\n .lte(\n WEBHOOK_DELIVERY_MAX_RETENTION_DAYS,\n `Must be at most ${WEBHOOK_DELIVERY_MAX_RETENTION_DAYS}.`\n )\n .description(\n `How long to keep delivery logs. 0 = delete immediately. Max ${WEBHOOK_DELIVERY_MAX_RETENTION_DAYS} days.`\n )\n }));\n\n return [model];\n }\n}\n\nexport const WebhookSettingsModel = ModelFactory.createImplementation({\n implementation: WebhookSettingsModelFactory,\n dependencies: []\n});\n"],"names":["WebhookSettingsModelFactory","builder","model","WEBHOOK_SETTINGS_MODEL_ID","fields","WEBHOOK_DELIVERY_MAX_RETENTION_DAYS","WebhookSettingsModel","ModelFactory"],"mappings":";;AAMA,MAAMA;IACF,MAAM,QAAQC,OAA6B,EAAE;QACzC,MAAMC,QAAQD,QACT,OAAO,CAAC;YACL,SAASE;YACT,MAAM;YACN,iBAAiB;QACrB,GACC,IAAI,CAAC;YAAC;YAAqB;SAAe,EAC1C,WAAW;QAEhBD,MAAM,MAAM,CAACE,CAAAA,SAAW;gBACpB,eAAeA,OACV,IAAI,GACJ,KAAK,CAAC,kBACN,OAAO,GACP,WAAW,CAAC;gBACjB,uBAAuBA,OAClB,MAAM,GACN,KAAK,CAAC,6BACN,GAAG,CAAC,GAAG,yBACP,GAAG,CACAC,qCACA,CAAC,gBAAgB,EAAEA,oCAAoC,CAAC,CAAC,EAE5D,WAAW,CACR,CAAC,4DAA4D,EAAEA,oCAAoC,MAAM,CAAC;YAEtH;QAEA,OAAO;YAACH;SAAM;IAClB;AACJ;AAEO,MAAMI,uBAAuBC,aAAa,oBAAoB,CAAC;IAClE,gBAAgBP;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -2,7 +2,7 @@ const isValidEndpointUrl = (url)=>{
|
|
|
2
2
|
try {
|
|
3
3
|
const parsed = new URL(url);
|
|
4
4
|
if ("https:" === parsed.protocol) return true;
|
|
5
|
-
if ("http:" === parsed.protocol && ("localhost" === parsed.hostname || "127.0.0.1" === parsed.hostname)) return true;
|
|
5
|
+
else if ("http:" === parsed.protocol && ("localhost" === parsed.hostname || "127.0.0.1" === parsed.hostname)) return true;
|
|
6
6
|
return false;
|
|
7
7
|
} catch {
|
|
8
8
|
return false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api/utils/isValidEndpointUrl.js","sources":["../../../src/api/utils/isValidEndpointUrl.ts"],"sourcesContent":["export const isValidEndpointUrl = (url: string): boolean => {\n try {\n const parsed = new URL(url);\n if (parsed.protocol === \"https:\") {\n return true;\n } else if (\n parsed.protocol === \"http:\" &&\n (parsed.hostname === \"localhost\" || parsed.hostname === \"127.0.0.1\")\n ) {\n return true;\n }\n return false;\n } catch {\n return false;\n }\n};\n"],"names":["isValidEndpointUrl","url","parsed","URL"],"mappings":"AAAO,MAAMA,qBAAqB,CAACC;IAC/B,IAAI;QACA,MAAMC,SAAS,IAAIC,IAAIF;QACvB,IAAIC,AAAoB,aAApBA,OAAO,QAAQ,EACf,OAAO;
|
|
1
|
+
{"version":3,"file":"api/utils/isValidEndpointUrl.js","sources":["../../../src/api/utils/isValidEndpointUrl.ts"],"sourcesContent":["export const isValidEndpointUrl = (url: string): boolean => {\n try {\n const parsed = new URL(url);\n if (parsed.protocol === \"https:\") {\n return true;\n } else if (\n parsed.protocol === \"http:\" &&\n (parsed.hostname === \"localhost\" || parsed.hostname === \"127.0.0.1\")\n ) {\n return true;\n }\n return false;\n } catch {\n return false;\n }\n};\n"],"names":["isValidEndpointUrl","url","parsed","URL"],"mappings":"AAAO,MAAMA,qBAAqB,CAACC;IAC/B,IAAI;QACA,MAAMC,SAAS,IAAIC,IAAIF;QACvB,IAAIC,AAAoB,aAApBA,OAAO,QAAQ,EACf,OAAO;aACJ,IACHA,AAAoB,YAApBA,OAAO,QAAQ,IACdA,CAAAA,AAAoB,gBAApBA,OAAO,QAAQ,IAAoBA,AAAoB,gBAApBA,OAAO,QAAQ,AAAe,GAElE,OAAO;QAEX,OAAO;IACX,EAAE,OAAM;QACJ,OAAO;IACX;AACJ"}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Webhooks } from "./Webhooks.js";
|
package/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Webhooks } from "./Webhooks.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/webhooks",
|
|
3
|
-
"version": "6.6.0-alpha.
|
|
3
|
+
"version": "6.6.0-alpha.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./index.js",
|
|
@@ -19,37 +19,38 @@
|
|
|
19
19
|
},
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@webiny/admin-ui": "6.6.0-alpha.
|
|
23
|
-
"@webiny/api-core": "6.6.0-alpha.
|
|
24
|
-
"@webiny/api-graphql": "6.6.0-alpha.
|
|
25
|
-
"@webiny/api-headless-cms": "6.6.0-alpha.
|
|
26
|
-
"@webiny/app": "6.6.0-alpha.
|
|
27
|
-
"@webiny/app-admin": "6.6.0-alpha.
|
|
28
|
-
"@webiny/background-tasks": "6.6.0-alpha.
|
|
29
|
-
"@webiny/feature": "6.6.0-alpha.
|
|
30
|
-
"@webiny/icons": "6.6.0-alpha.
|
|
31
|
-
"@webiny/
|
|
32
|
-
"@webiny/
|
|
22
|
+
"@webiny/admin-ui": "6.6.0-alpha.10",
|
|
23
|
+
"@webiny/api-core": "6.6.0-alpha.10",
|
|
24
|
+
"@webiny/api-graphql": "6.6.0-alpha.10",
|
|
25
|
+
"@webiny/api-headless-cms": "6.6.0-alpha.10",
|
|
26
|
+
"@webiny/app": "6.6.0-alpha.10",
|
|
27
|
+
"@webiny/app-admin": "6.6.0-alpha.10",
|
|
28
|
+
"@webiny/background-tasks": "6.6.0-alpha.10",
|
|
29
|
+
"@webiny/feature": "6.6.0-alpha.10",
|
|
30
|
+
"@webiny/icons": "6.6.0-alpha.10",
|
|
31
|
+
"@webiny/project": "6.6.0-alpha.10",
|
|
32
|
+
"@webiny/project-extensions": "6.6.0-alpha.10",
|
|
33
|
+
"@webiny/sdk": "6.6.0-alpha.10",
|
|
34
|
+
"@webiny/utils": "6.6.0-alpha.10",
|
|
33
35
|
"graphql": "16.14.2",
|
|
34
36
|
"lodash": "4.18.1",
|
|
35
|
-
"mobx": "
|
|
36
|
-
"mobx-react-lite": "
|
|
37
|
-
"react": "
|
|
38
|
-
"react-dom": "
|
|
39
|
-
"standardwebhooks": "1.
|
|
40
|
-
"zod": "4.
|
|
37
|
+
"mobx": "7.1.4",
|
|
38
|
+
"mobx-react-lite": "5.1.2",
|
|
39
|
+
"react": "19.3.1",
|
|
40
|
+
"react-dom": "19.3.1",
|
|
41
|
+
"standardwebhooks": "1.1.1",
|
|
42
|
+
"zod": "4.6.7"
|
|
41
43
|
},
|
|
42
44
|
"devDependencies": {
|
|
43
|
-
"@webiny/api": "6.6.0-alpha.
|
|
44
|
-
"@webiny/api-core-testing": "6.6.0-alpha.
|
|
45
|
-
"@webiny/build-tools": "6.6.0-alpha.
|
|
46
|
-
"@webiny/di": "
|
|
47
|
-
"@webiny/event-handler-core": "6.6.0-alpha.
|
|
48
|
-
"@webiny/handler": "6.6.0-alpha.
|
|
49
|
-
"@webiny/
|
|
50
|
-
"@webiny/wcp": "6.6.0-alpha.0",
|
|
45
|
+
"@webiny/api": "6.6.0-alpha.10",
|
|
46
|
+
"@webiny/api-core-testing": "6.6.0-alpha.10",
|
|
47
|
+
"@webiny/build-tools": "6.6.0-alpha.10",
|
|
48
|
+
"@webiny/di": "2.0.0",
|
|
49
|
+
"@webiny/event-handler-core": "6.6.0-alpha.10",
|
|
50
|
+
"@webiny/handler": "6.6.0-alpha.10",
|
|
51
|
+
"@webiny/wcp": "6.6.0-alpha.10",
|
|
51
52
|
"typescript": "7.0.2",
|
|
52
|
-
"vitest": "
|
|
53
|
+
"vitest": "5.0.5"
|
|
53
54
|
},
|
|
54
55
|
"publishConfig": {
|
|
55
56
|
"access": "public"
|