n8n-nodes-resend 2.5.2 → 2.6.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.
- package/README.md +36 -186
- package/dist/_virtual/_rolldown/runtime.js +13 -0
- package/dist/credentials/ResendApi.credentials.d.ts +15 -9
- package/dist/credentials/ResendApi.credentials.js +31 -37
- package/dist/credentials/ResendOAuth2Api.credentials.d.ts +15 -0
- package/dist/credentials/ResendOAuth2Api.credentials.js +27 -0
- package/dist/credentials/ResendWebhookSigningSecretApi.credentials.d.ts +10 -7
- package/dist/credentials/ResendWebhookSigningSecretApi.credentials.js +20 -23
- package/dist/credentials/resend-icon-black.svg +3 -0
- package/dist/credentials/resend-icon-white.svg +3 -0
- package/dist/nodes/Resend/Resend.node.d.ts +60 -57
- package/dist/nodes/Resend/Resend.node.js +196 -205
- package/dist/nodes/Resend/Resend.node.json +12 -12
- package/dist/nodes/Resend/ResendTrigger.node.d.ts +7 -4
- package/dist/nodes/Resend/ResendTrigger.node.js +180 -174
- package/dist/nodes/Resend/actions/account/disconnect.operation.d.ts +8 -0
- package/dist/nodes/Resend/actions/account/disconnect.operation.js +49 -0
- package/dist/nodes/Resend/actions/account/execute.d.ts +4 -0
- package/dist/nodes/Resend/actions/account/execute.js +7 -0
- package/dist/nodes/Resend/actions/account/index.d.ts +8 -0
- package/dist/nodes/Resend/actions/account/index.js +42 -0
- package/dist/nodes/Resend/actions/broadcast/create.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/broadcast/create.operation.js +146 -159
- package/dist/nodes/Resend/actions/broadcast/delete.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/broadcast/delete.operation.js +35 -26
- package/dist/nodes/Resend/actions/broadcast/execute.d.ts +4 -1
- package/dist/nodes/Resend/actions/broadcast/execute.js +18 -51
- package/dist/nodes/Resend/actions/broadcast/get.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/broadcast/get.operation.js +35 -26
- package/dist/nodes/Resend/actions/broadcast/index.d.ts +13 -11
- package/dist/nodes/Resend/actions/broadcast/index.js +120 -110
- package/dist/nodes/Resend/actions/broadcast/list.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/broadcast/list.operation.js +20 -9
- package/dist/nodes/Resend/actions/broadcast/send.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/broadcast/send.operation.js +56 -54
- package/dist/nodes/Resend/actions/broadcast/update.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/broadcast/update.operation.js +123 -133
- package/dist/nodes/Resend/actions/contact/addToSegment.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/contact/addToSegment.operation.js +47 -41
- package/dist/nodes/Resend/actions/contact/create.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/contact/create.operation.js +167 -192
- package/dist/nodes/Resend/actions/contact/delete.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/contact/delete.operation.js +35 -26
- package/dist/nodes/Resend/actions/contact/execute.d.ts +4 -1
- package/dist/nodes/Resend/actions/contact/execute.js +26 -59
- package/dist/nodes/Resend/actions/contact/get.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/contact/get.operation.js +35 -26
- package/dist/nodes/Resend/actions/contact/getTopics.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/contact/getTopics.operation.js +67 -67
- package/dist/nodes/Resend/actions/contact/index.d.ts +17 -15
- package/dist/nodes/Resend/actions/contact/index.js +180 -146
- package/dist/nodes/Resend/actions/contact/list.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/contact/list.operation.js +60 -59
- package/dist/nodes/Resend/actions/contact/listSegments.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/contact/listSegments.operation.js +67 -67
- package/dist/nodes/Resend/actions/contact/removeFromSegment.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/contact/removeFromSegment.operation.js +47 -41
- package/dist/nodes/Resend/actions/contact/update.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/contact/update.operation.js +140 -151
- package/dist/nodes/Resend/actions/contact/updateTopics.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/contact/updateTopics.operation.js +80 -89
- package/dist/nodes/Resend/actions/contactProperty/create.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/contactProperty/create.operation.js +74 -63
- package/dist/nodes/Resend/actions/contactProperty/delete.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/contactProperty/delete.operation.js +35 -26
- package/dist/nodes/Resend/actions/contactProperty/execute.d.ts +4 -1
- package/dist/nodes/Resend/actions/contactProperty/execute.js +16 -49
- package/dist/nodes/Resend/actions/contactProperty/get.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/contactProperty/get.operation.js +35 -26
- package/dist/nodes/Resend/actions/contactProperty/index.d.ts +12 -10
- package/dist/nodes/Resend/actions/contactProperty/index.js +105 -101
- package/dist/nodes/Resend/actions/contactProperty/list.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/contactProperty/list.operation.js +20 -9
- package/dist/nodes/Resend/actions/contactProperty/update.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/contactProperty/update.operation.js +56 -53
- package/dist/nodes/Resend/actions/domain/claim.operation.d.ts +8 -0
- package/dist/nodes/Resend/actions/domain/claim.operation.js +124 -0
- package/dist/nodes/Resend/actions/domain/create.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/domain/create.operation.js +173 -159
- package/dist/nodes/Resend/actions/domain/createTrackingDomain.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/domain/createTrackingDomain.operation.js +60 -54
- package/dist/nodes/Resend/actions/domain/delete.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/domain/delete.operation.js +35 -26
- package/dist/nodes/Resend/actions/domain/deleteTrackingDomain.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/domain/deleteTrackingDomain.operation.js +60 -53
- package/dist/nodes/Resend/actions/domain/execute.d.ts +4 -1
- package/dist/nodes/Resend/actions/domain/execute.js +34 -61
- package/dist/nodes/Resend/actions/domain/get.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/domain/get.operation.js +35 -26
- package/dist/nodes/Resend/actions/domain/getClaim.operation.d.ts +8 -0
- package/dist/nodes/Resend/actions/domain/getClaim.operation.js +37 -0
- package/dist/nodes/Resend/actions/domain/getTrackingDomain.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/domain/getTrackingDomain.operation.js +60 -53
- package/dist/nodes/Resend/actions/domain/index.d.ts +21 -16
- package/dist/nodes/Resend/actions/domain/index.js +241 -156
- package/dist/nodes/Resend/actions/domain/list.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/domain/list.operation.js +20 -9
- package/dist/nodes/Resend/actions/domain/listTrackingDomains.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/domain/listTrackingDomains.operation.js +50 -46
- package/dist/nodes/Resend/actions/domain/update.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/domain/update.operation.js +80 -77
- package/dist/nodes/Resend/actions/domain/verify.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/domain/verify.operation.js +35 -26
- package/dist/nodes/Resend/actions/domain/verifyClaim.operation.d.ts +8 -0
- package/dist/nodes/Resend/actions/domain/verifyClaim.operation.js +46 -0
- package/dist/nodes/Resend/actions/domain/verifyTrackingDomain.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/domain/verifyTrackingDomain.operation.js +60 -53
- package/dist/nodes/Resend/actions/email/cancel.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/email/cancel.operation.js +35 -26
- package/dist/nodes/Resend/actions/email/execute.d.ts +4 -1
- package/dist/nodes/Resend/actions/email/execute.js +25 -58
- package/dist/nodes/Resend/actions/email/getAttachment.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/email/getAttachment.operation.js +48 -42
- package/dist/nodes/Resend/actions/email/index.d.ts +16 -14
- package/dist/nodes/Resend/actions/email/index.js +166 -138
- package/dist/nodes/Resend/actions/email/list.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/email/list.operation.js +42 -40
- package/dist/nodes/Resend/actions/email/listAttachments.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/email/listAttachments.operation.js +67 -67
- package/dist/nodes/Resend/actions/email/retrieve.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/email/retrieve.operation.js +35 -26
- package/dist/nodes/Resend/actions/email/send.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/email/send.operation.js +494 -602
- package/dist/nodes/Resend/actions/email/sendAndWait.operation.d.ts +8 -5
- package/dist/nodes/Resend/actions/email/sendAndWait.operation.js +45 -35
- package/dist/nodes/Resend/actions/email/sendBatch.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/email/sendBatch.operation.js +347 -402
- package/dist/nodes/Resend/actions/email/update.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/email/update.operation.js +49 -45
- package/dist/nodes/Resend/actions/event/create.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/event/create.operation.js +60 -57
- package/dist/nodes/Resend/actions/event/delete.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/event/delete.operation.js +44 -39
- package/dist/nodes/Resend/actions/event/execute.d.ts +4 -1
- package/dist/nodes/Resend/actions/event/execute.js +18 -51
- package/dist/nodes/Resend/actions/event/get.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/event/get.operation.js +44 -39
- package/dist/nodes/Resend/actions/event/index.d.ts +13 -11
- package/dist/nodes/Resend/actions/event/index.js +120 -110
- package/dist/nodes/Resend/actions/event/list.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/event/list.operation.js +29 -23
- package/dist/nodes/Resend/actions/event/send.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/event/send.operation.js +110 -114
- package/dist/nodes/Resend/actions/event/update.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/event/update.operation.js +63 -62
- package/dist/nodes/Resend/actions/log/execute.d.ts +4 -1
- package/dist/nodes/Resend/actions/log/execute.js +8 -41
- package/dist/nodes/Resend/actions/log/index.d.ts +9 -7
- package/dist/nodes/Resend/actions/log/index.js +57 -74
- package/dist/nodes/Resend/actions/log/list.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/log/list.operation.js +42 -40
- package/dist/nodes/Resend/actions/log/retrieve.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/log/retrieve.operation.js +35 -26
- package/dist/nodes/Resend/actions/receivingEmail/execute.d.ts +4 -1
- package/dist/nodes/Resend/actions/receivingEmail/execute.js +14 -47
- package/dist/nodes/Resend/actions/receivingEmail/get.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/receivingEmail/get.operation.js +35 -26
- package/dist/nodes/Resend/actions/receivingEmail/getAttachment.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/receivingEmail/getAttachment.operation.js +48 -42
- package/dist/nodes/Resend/actions/receivingEmail/index.d.ts +11 -9
- package/dist/nodes/Resend/actions/receivingEmail/index.js +90 -92
- package/dist/nodes/Resend/actions/receivingEmail/list.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/receivingEmail/list.operation.js +20 -9
- package/dist/nodes/Resend/actions/receivingEmail/listAttachments.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/receivingEmail/listAttachments.operation.js +67 -67
- package/dist/nodes/Resend/actions/router.d.ts +5 -2
- package/dist/nodes/Resend/actions/router.js +58 -97
- package/dist/nodes/Resend/actions/segment/create.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/segment/create.operation.js +51 -51
- package/dist/nodes/Resend/actions/segment/delete.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/segment/delete.operation.js +35 -26
- package/dist/nodes/Resend/actions/segment/execute.d.ts +4 -1
- package/dist/nodes/Resend/actions/segment/execute.js +17 -47
- package/dist/nodes/Resend/actions/segment/get.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/segment/get.operation.js +35 -26
- package/dist/nodes/Resend/actions/segment/index.d.ts +12 -10
- package/dist/nodes/Resend/actions/segment/index.js +105 -101
- package/dist/nodes/Resend/actions/segment/list.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/segment/list.operation.js +20 -9
- package/dist/nodes/Resend/actions/segment/listContacts.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/segment/listContacts.operation.js +58 -55
- package/dist/nodes/Resend/actions/template/create.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/template/create.operation.js +144 -145
- package/dist/nodes/Resend/actions/template/delete.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/template/delete.operation.js +35 -26
- package/dist/nodes/Resend/actions/template/duplicate.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/template/duplicate.operation.js +35 -26
- package/dist/nodes/Resend/actions/template/execute.d.ts +4 -1
- package/dist/nodes/Resend/actions/template/execute.js +20 -53
- package/dist/nodes/Resend/actions/template/get.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/template/get.operation.js +35 -26
- package/dist/nodes/Resend/actions/template/index.d.ts +14 -12
- package/dist/nodes/Resend/actions/template/index.js +135 -119
- package/dist/nodes/Resend/actions/template/list.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/template/list.operation.js +20 -9
- package/dist/nodes/Resend/actions/template/publish.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/template/publish.operation.js +35 -26
- package/dist/nodes/Resend/actions/template/update.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/template/update.operation.js +164 -161
- package/dist/nodes/Resend/actions/topic/create.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/topic/create.operation.js +94 -88
- package/dist/nodes/Resend/actions/topic/delete.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/topic/delete.operation.js +35 -26
- package/dist/nodes/Resend/actions/topic/execute.d.ts +4 -1
- package/dist/nodes/Resend/actions/topic/execute.js +16 -49
- package/dist/nodes/Resend/actions/topic/get.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/topic/get.operation.js +35 -26
- package/dist/nodes/Resend/actions/topic/index.d.ts +12 -10
- package/dist/nodes/Resend/actions/topic/index.js +105 -101
- package/dist/nodes/Resend/actions/topic/list.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/topic/list.operation.js +20 -9
- package/dist/nodes/Resend/actions/topic/update.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/topic/update.operation.js +80 -77
- package/dist/nodes/Resend/actions/webhook/create.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/webhook/create.operation.js +54 -48
- package/dist/nodes/Resend/actions/webhook/delete.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/webhook/delete.operation.js +35 -26
- package/dist/nodes/Resend/actions/webhook/execute.d.ts +4 -1
- package/dist/nodes/Resend/actions/webhook/execute.js +16 -49
- package/dist/nodes/Resend/actions/webhook/get.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/webhook/get.operation.js +35 -26
- package/dist/nodes/Resend/actions/webhook/index.d.ts +13 -11
- package/dist/nodes/Resend/actions/webhook/index.js +176 -119
- package/dist/nodes/Resend/actions/webhook/list.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/webhook/list.operation.js +20 -9
- package/dist/nodes/Resend/actions/webhook/update.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/webhook/update.operation.js +80 -73
- package/dist/nodes/Resend/actions/workflow/create.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/workflow/create.operation.js +104 -103
- package/dist/nodes/Resend/actions/workflow/delete.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/workflow/delete.operation.js +44 -39
- package/dist/nodes/Resend/actions/workflow/execute.d.ts +4 -1
- package/dist/nodes/Resend/actions/workflow/execute.js +24 -57
- package/dist/nodes/Resend/actions/workflow/get.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/workflow/get.operation.js +44 -39
- package/dist/nodes/Resend/actions/workflow/getRun.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/workflow/getRun.operation.js +60 -54
- package/dist/nodes/Resend/actions/workflow/getRunStep.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/workflow/getRunStep.operation.js +74 -70
- package/dist/nodes/Resend/actions/workflow/index.d.ts +16 -14
- package/dist/nodes/Resend/actions/workflow/index.js +165 -137
- package/dist/nodes/Resend/actions/workflow/list.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/workflow/list.operation.js +29 -23
- package/dist/nodes/Resend/actions/workflow/listRunSteps.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/workflow/listRunSteps.operation.js +66 -62
- package/dist/nodes/Resend/actions/workflow/listRuns.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/workflow/listRuns.operation.js +50 -47
- package/dist/nodes/Resend/actions/workflow/update.operation.d.ts +8 -3
- package/dist/nodes/Resend/actions/workflow/update.operation.js +66 -58
- package/dist/nodes/Resend/methods/index.d.ts +26 -23
- package/dist/nodes/Resend/methods/index.js +227 -253
- package/dist/nodes/Resend/transport/index.d.ts +28 -26
- package/dist/nodes/Resend/transport/index.js +243 -321
- package/dist/nodes/Resend/utils/dynamicFields.d.ts +36 -33
- package/dist/nodes/Resend/utils/dynamicFields.js +118 -59
- package/dist/nodes/Resend/utils/sendAndWait/descriptions.d.ts +7 -4
- package/dist/nodes/Resend/utils/sendAndWait/descriptions.js +97 -111
- package/dist/nodes/Resend/utils/sendAndWait/email-templates.d.ts +10 -7
- package/dist/nodes/Resend/utils/sendAndWait/email-templates.js +20 -20
- package/dist/nodes/Resend/utils/sendAndWait/index.d.ts +5 -4
- package/dist/nodes/Resend/utils/sendAndWait/index.js +20 -23
- package/dist/nodes/Resend/utils/sendAndWait/interfaces.d.ts +31 -28
- package/dist/nodes/Resend/utils/sendAndWait/interfaces.js +0 -3
- package/dist/nodes/Resend/utils/sendAndWait/utils.d.ts +38 -35
- package/dist/nodes/Resend/utils/sendAndWait/utils.js +360 -468
- package/package.json +70 -71
- package/dist/credentials/ResendApi.credentials.js.map +0 -1
- package/dist/credentials/ResendWebhookSigningSecretApi.credentials.js.map +0 -1
- package/dist/nodes/Resend/Resend.node.js.map +0 -1
- package/dist/nodes/Resend/ResendTrigger.node.js.map +0 -1
- package/dist/nodes/Resend/actions/broadcast/create.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/broadcast/delete.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/broadcast/execute.js.map +0 -1
- package/dist/nodes/Resend/actions/broadcast/get.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/broadcast/index.js.map +0 -1
- package/dist/nodes/Resend/actions/broadcast/list.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/broadcast/send.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/broadcast/update.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/contact/addToSegment.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/contact/create.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/contact/delete.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/contact/execute.js.map +0 -1
- package/dist/nodes/Resend/actions/contact/get.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/contact/getTopics.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/contact/index.js.map +0 -1
- package/dist/nodes/Resend/actions/contact/list.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/contact/listSegments.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/contact/removeFromSegment.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/contact/update.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/contact/updateTopics.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/contactProperty/create.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/contactProperty/delete.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/contactProperty/execute.js.map +0 -1
- package/dist/nodes/Resend/actions/contactProperty/get.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/contactProperty/index.js.map +0 -1
- package/dist/nodes/Resend/actions/contactProperty/list.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/contactProperty/update.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/domain/create.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/domain/createTrackingDomain.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/domain/delete.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/domain/deleteTrackingDomain.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/domain/execute.js.map +0 -1
- package/dist/nodes/Resend/actions/domain/get.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/domain/getTrackingDomain.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/domain/index.js.map +0 -1
- package/dist/nodes/Resend/actions/domain/list.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/domain/listTrackingDomains.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/domain/update.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/domain/verify.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/domain/verifyTrackingDomain.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/email/cancel.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/email/execute.js.map +0 -1
- package/dist/nodes/Resend/actions/email/getAttachment.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/email/index.js.map +0 -1
- package/dist/nodes/Resend/actions/email/list.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/email/listAttachments.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/email/retrieve.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/email/send.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/email/sendAndWait.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/email/sendBatch.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/email/update.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/event/create.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/event/delete.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/event/execute.js.map +0 -1
- package/dist/nodes/Resend/actions/event/get.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/event/index.js.map +0 -1
- package/dist/nodes/Resend/actions/event/list.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/event/send.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/event/update.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/log/execute.js.map +0 -1
- package/dist/nodes/Resend/actions/log/index.js.map +0 -1
- package/dist/nodes/Resend/actions/log/list.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/log/retrieve.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/receivingEmail/execute.js.map +0 -1
- package/dist/nodes/Resend/actions/receivingEmail/get.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/receivingEmail/getAttachment.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/receivingEmail/index.js.map +0 -1
- package/dist/nodes/Resend/actions/receivingEmail/list.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/receivingEmail/listAttachments.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/router.js.map +0 -1
- package/dist/nodes/Resend/actions/segment/create.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/segment/delete.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/segment/execute.js.map +0 -1
- package/dist/nodes/Resend/actions/segment/get.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/segment/index.js.map +0 -1
- package/dist/nodes/Resend/actions/segment/list.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/segment/listContacts.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/template/create.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/template/delete.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/template/duplicate.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/template/execute.js.map +0 -1
- package/dist/nodes/Resend/actions/template/get.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/template/index.js.map +0 -1
- package/dist/nodes/Resend/actions/template/list.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/template/publish.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/template/update.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/topic/create.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/topic/delete.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/topic/execute.js.map +0 -1
- package/dist/nodes/Resend/actions/topic/get.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/topic/index.js.map +0 -1
- package/dist/nodes/Resend/actions/topic/list.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/topic/update.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/webhook/create.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/webhook/delete.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/webhook/execute.js.map +0 -1
- package/dist/nodes/Resend/actions/webhook/get.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/webhook/index.js.map +0 -1
- package/dist/nodes/Resend/actions/webhook/list.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/webhook/update.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/workflow/create.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/workflow/delete.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/workflow/execute.js.map +0 -1
- package/dist/nodes/Resend/actions/workflow/get.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/workflow/getRun.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/workflow/getRunStep.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/workflow/index.js.map +0 -1
- package/dist/nodes/Resend/actions/workflow/list.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/workflow/listRunSteps.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/workflow/listRuns.operation.js.map +0 -1
- package/dist/nodes/Resend/actions/workflow/update.operation.js.map +0 -1
- package/dist/nodes/Resend/methods/index.js.map +0 -1
- package/dist/nodes/Resend/transport/index.js.map +0 -1
- package/dist/nodes/Resend/utils/dynamicFields.js.map +0 -1
- package/dist/nodes/Resend/utils/sendAndWait/descriptions.js.map +0 -1
- package/dist/nodes/Resend/utils/sendAndWait/email-templates.js.map +0 -1
- package/dist/nodes/Resend/utils/sendAndWait/index.js.map +0 -1
- package/dist/nodes/Resend/utils/sendAndWait/interfaces.js.map +0 -1
- package/dist/nodes/Resend/utils/sendAndWait/utils.js.map +0 -1
- package/dist/package.json +0 -72
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -1,181 +1,187 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
const WEBHOOK_TOLERANCE_MS = 5 * 60 * 1000;
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
let n8n_workflow = require("n8n-workflow");
|
|
3
|
+
let node_crypto = require("node:crypto");
|
|
4
|
+
//#region nodes/Resend/ResendTrigger.node.ts
|
|
5
|
+
const WEBHOOK_TOLERANCE_MS = 300 * 1e3;
|
|
7
6
|
function getHeaderValue(headers, name) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
const exactMatch = headers[name];
|
|
8
|
+
const titleCaseMatch = headers[name.split("-").map((w) => w.charAt(0).toUpperCase() + w.slice(1)).join("-")];
|
|
9
|
+
const raw = exactMatch !== null && exactMatch !== void 0 ? exactMatch : titleCaseMatch;
|
|
10
|
+
return (Array.isArray(raw) ? raw[0] : raw) || "";
|
|
12
11
|
}
|
|
13
12
|
function parseSvixTimestamp(timestamp) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
return numeric > 1e12 ? numeric : numeric * 1000;
|
|
13
|
+
const numeric = Number(timestamp);
|
|
14
|
+
if (!Number.isFinite(numeric)) return null;
|
|
15
|
+
return numeric > 0xe8d4a51000 ? numeric : numeric * 1e3;
|
|
19
16
|
}
|
|
20
17
|
async function verifySvixSignature(payload, svixId, svixTimestamp, svixSignature, webhookSigningSecret, node) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
if (signatureBytes.length === expectedBytes.length &&
|
|
38
|
-
(0, crypto_1.timingSafeEqual)(signatureBytes, expectedBytes)) {
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
throw new n8n_workflow_1.NodeOperationError(node, 'Invalid webhook signature');
|
|
44
|
-
}
|
|
45
|
-
class ResendTrigger {
|
|
46
|
-
constructor() {
|
|
47
|
-
this.description = {
|
|
48
|
-
displayName: 'Resend Trigger',
|
|
49
|
-
name: 'resendTrigger',
|
|
50
|
-
icon: {
|
|
51
|
-
light: 'file:resend-icon-black.svg',
|
|
52
|
-
dark: 'file:resend-icon-white.svg',
|
|
53
|
-
},
|
|
54
|
-
group: ['trigger'],
|
|
55
|
-
version: 1,
|
|
56
|
-
description: 'Triggers workflows when Resend email events occur, such as email sent, delivered, opened, clicked, bounced, or complained. Includes secure webhook signature verification.',
|
|
57
|
-
subtitle: '={{(() => { const events = $parameter["events"] ?? []; const actionLabels = { created: "create", deleted: "delete", updated: "update", sent: "send", opened: "open", clicked: "click", bounced: "bounce", complained: "complain", delivered: "deliver", delivery_delayed: "delay", failed: "fail", received: "receive", scheduled: "schedule", suppressed: "suppress" }; return events.map((event) => { const [resource, action] = event.split("."); if (!resource || !action) { return event; } const actionLabel = actionLabels[action] ?? action.replace(/_/g, " "); return actionLabel + ": " + resource; }).join(", "); })() }}',
|
|
58
|
-
defaults: {
|
|
59
|
-
name: 'Resend Trigger',
|
|
60
|
-
},
|
|
61
|
-
credentials: [
|
|
62
|
-
{
|
|
63
|
-
name: 'resendWebhookSigningSecretApi',
|
|
64
|
-
required: true,
|
|
65
|
-
},
|
|
66
|
-
],
|
|
67
|
-
triggerPanel: {
|
|
68
|
-
header: 'Copy the webhook URL below and paste it into your Resend dashboard webhook configuration.',
|
|
69
|
-
executionsHelp: {
|
|
70
|
-
inactive: 'Webhooks have two modes: test and production.<br><br><b>Use test mode while you build your workflow</b>. Click the "Listen for test event" button, then paste the test URL into your Resend webhook configuration. The webhook executions will show up in the editor.<br><br><b>Use production mode to run your workflow automatically</b>. Activate the workflow, then paste the production URL into your Resend webhook configuration. These executions will show up in the executions list, but not in the editor.',
|
|
71
|
-
active: 'Webhooks have two modes: test and production.<br><br><b>Use test mode while you build your workflow</b>. Click the "Listen for test event" button, then paste the test URL into your Resend webhook configuration. The webhook executions will show up in the editor.<br><br><b>Use production mode to run your workflow automatically</b>. Since the workflow is activated, you can paste the production URL into your Resend webhook configuration. These executions will show up in the executions list, but not in the editor.',
|
|
72
|
-
},
|
|
73
|
-
activationHint: "Once you've finished building your workflow, activate it to use the production webhook URL in your Resend dashboard.",
|
|
74
|
-
},
|
|
75
|
-
inputs: [],
|
|
76
|
-
outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
77
|
-
webhooks: [
|
|
78
|
-
{
|
|
79
|
-
name: 'default',
|
|
80
|
-
httpMethod: 'POST',
|
|
81
|
-
responseMode: 'onReceived',
|
|
82
|
-
path: '={{$parameter["path"]}}',
|
|
83
|
-
isFullPath: true,
|
|
84
|
-
},
|
|
85
|
-
],
|
|
86
|
-
properties: [
|
|
87
|
-
{
|
|
88
|
-
displayName: 'Path',
|
|
89
|
-
name: 'path',
|
|
90
|
-
type: 'string',
|
|
91
|
-
default: 'resend',
|
|
92
|
-
placeholder: 'resend',
|
|
93
|
-
required: true,
|
|
94
|
-
description: 'The path for the webhook URL. This will completely replace the UUID segment in the webhook URL. For example, if you set this to "test1", your webhook URL will be https://your-n8n-domain/webhook-test/test1',
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
displayName: 'Events',
|
|
98
|
-
name: 'events',
|
|
99
|
-
type: 'multiOptions',
|
|
100
|
-
required: true,
|
|
101
|
-
default: ['email.sent'],
|
|
102
|
-
options: [
|
|
103
|
-
{ name: 'Contact Created', value: 'contact.created' },
|
|
104
|
-
{ name: 'Contact Deleted', value: 'contact.deleted' },
|
|
105
|
-
{ name: 'Contact Updated', value: 'contact.updated' },
|
|
106
|
-
{ name: 'Domain Created', value: 'domain.created' },
|
|
107
|
-
{ name: 'Domain Deleted', value: 'domain.deleted' },
|
|
108
|
-
{ name: 'Domain Updated', value: 'domain.updated' },
|
|
109
|
-
{ name: 'Email Bounced', value: 'email.bounced' },
|
|
110
|
-
{ name: 'Email Clicked', value: 'email.clicked' },
|
|
111
|
-
{ name: 'Email Complained', value: 'email.complained' },
|
|
112
|
-
{ name: 'Email Delivered', value: 'email.delivered' },
|
|
113
|
-
{ name: 'Email Delivery Delayed', value: 'email.delivery_delayed' },
|
|
114
|
-
{ name: 'Email Failed', value: 'email.failed' },
|
|
115
|
-
{ name: 'Email Opened', value: 'email.opened' },
|
|
116
|
-
{ name: 'Email Received', value: 'email.received' },
|
|
117
|
-
{ name: 'Email Scheduled', value: 'email.scheduled' },
|
|
118
|
-
{ name: 'Email Sent', value: 'email.sent' },
|
|
119
|
-
{ name: 'Email Suppressed', value: 'email.suppressed' },
|
|
120
|
-
],
|
|
121
|
-
description: 'Select the Resend event types to listen for',
|
|
122
|
-
},
|
|
123
|
-
],
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
async webhook() {
|
|
127
|
-
var _a;
|
|
128
|
-
const bodyData = this.getBodyData();
|
|
129
|
-
const headers = this.getHeaderData();
|
|
130
|
-
const request = this.getRequestObject();
|
|
131
|
-
const subscribedEvents = this.getNodeParameter('events');
|
|
132
|
-
const credentials = await this.getCredentials('resendWebhookSigningSecretApi');
|
|
133
|
-
const webhookSigningSecret = credentials.webhookSigningSecret;
|
|
134
|
-
if (webhookSigningSecret && webhookSigningSecret.trim() !== '') {
|
|
135
|
-
try {
|
|
136
|
-
const rawBody = (_a = request.rawBody) !== null && _a !== void 0 ? _a : request.body;
|
|
137
|
-
const payload = typeof rawBody === 'string'
|
|
138
|
-
? rawBody
|
|
139
|
-
: Buffer.isBuffer(rawBody)
|
|
140
|
-
? rawBody.toString('utf8')
|
|
141
|
-
: JSON.stringify(bodyData !== null && bodyData !== void 0 ? bodyData : {});
|
|
142
|
-
const svixId = getHeaderValue(headers, 'svix-id');
|
|
143
|
-
const svixTimestamp = getHeaderValue(headers, 'svix-timestamp');
|
|
144
|
-
const svixSignature = getHeaderValue(headers, 'svix-signature');
|
|
145
|
-
if (!svixId || !svixTimestamp || !svixSignature) {
|
|
146
|
-
const res = this.getResponseObject();
|
|
147
|
-
res.status(401).json({ error: 'Missing Svix signature headers' });
|
|
148
|
-
return {
|
|
149
|
-
noWebhookResponse: true,
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
await verifySvixSignature(payload, svixId, svixTimestamp, svixSignature, webhookSigningSecret, this.getNode());
|
|
153
|
-
}
|
|
154
|
-
catch (error) {
|
|
155
|
-
const res = this.getResponseObject();
|
|
156
|
-
res.status(401).json({ error: 'Invalid webhook signature' });
|
|
157
|
-
return {
|
|
158
|
-
noWebhookResponse: true,
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
if (!bodyData || typeof bodyData !== 'object' || !('type' in bodyData)) {
|
|
163
|
-
return {
|
|
164
|
-
noWebhookResponse: true,
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
|
-
const eventType = bodyData.type;
|
|
168
|
-
if (subscribedEvents.includes(eventType)) {
|
|
169
|
-
return {
|
|
170
|
-
workflowData: [this.helpers.returnJsonArray([bodyData])],
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
else {
|
|
174
|
-
return {
|
|
175
|
-
noWebhookResponse: true,
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
}
|
|
18
|
+
const timestampMs = parseSvixTimestamp(svixTimestamp);
|
|
19
|
+
if (!timestampMs || Math.abs(Date.now() - timestampMs) > WEBHOOK_TOLERANCE_MS) throw new n8n_workflow.NodeOperationError(node, "Webhook signature timestamp is outside the allowed tolerance");
|
|
20
|
+
const secret = webhookSigningSecret.replace(/^whsec_/, "");
|
|
21
|
+
const secretBytes = Buffer.from(secret, "base64");
|
|
22
|
+
const signedPayload = `${svixId}.${svixTimestamp}.${payload}`;
|
|
23
|
+
const expectedSignature = (0, node_crypto.createHmac)("sha256", secretBytes).update(signedPayload).digest("base64");
|
|
24
|
+
const expectedBytes = Buffer.from(expectedSignature, "base64");
|
|
25
|
+
const signatures = svixSignature.split(" ");
|
|
26
|
+
for (const sig of signatures) {
|
|
27
|
+
const [version, signature] = sig.split(",");
|
|
28
|
+
if (version === "v1") {
|
|
29
|
+
const signatureBytes = Buffer.from(signature, "base64");
|
|
30
|
+
if (signatureBytes.length === expectedBytes.length && (0, node_crypto.timingSafeEqual)(signatureBytes, expectedBytes)) return;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
throw new n8n_workflow.NodeOperationError(node, "Invalid webhook signature");
|
|
179
34
|
}
|
|
35
|
+
var ResendTrigger = class {
|
|
36
|
+
constructor() {
|
|
37
|
+
this.description = {
|
|
38
|
+
displayName: "Resend Trigger",
|
|
39
|
+
name: "resendTrigger",
|
|
40
|
+
icon: {
|
|
41
|
+
light: "file:resend-icon-black.svg",
|
|
42
|
+
dark: "file:resend-icon-white.svg"
|
|
43
|
+
},
|
|
44
|
+
group: ["trigger"],
|
|
45
|
+
version: 1,
|
|
46
|
+
description: "Triggers workflows when Resend email events occur, such as email sent, delivered, opened, clicked, bounced, or complained. Includes secure webhook signature verification.",
|
|
47
|
+
subtitle: "={{(() => { const events = $parameter[\"events\"] ?? []; const actionLabels = { created: \"create\", deleted: \"delete\", updated: \"update\", sent: \"send\", opened: \"open\", clicked: \"click\", bounced: \"bounce\", complained: \"complain\", delivered: \"deliver\", delivery_delayed: \"delay\", failed: \"fail\", received: \"receive\", scheduled: \"schedule\", suppressed: \"suppress\" }; return events.map((event) => { const [resource, action] = event.split(\".\"); if (!resource || !action) { return event; } const actionLabel = actionLabels[action] ?? action.replace(/_/g, \" \"); return actionLabel + \": \" + resource; }).join(\", \"); })() }}",
|
|
48
|
+
defaults: { name: "Resend Trigger" },
|
|
49
|
+
credentials: [{
|
|
50
|
+
name: "resendWebhookSigningSecretApi",
|
|
51
|
+
required: true
|
|
52
|
+
}],
|
|
53
|
+
triggerPanel: {
|
|
54
|
+
header: "Copy the webhook URL below and paste it into your Resend dashboard webhook configuration.",
|
|
55
|
+
executionsHelp: {
|
|
56
|
+
inactive: "Webhooks have two modes: test and production.<br><br><b>Use test mode while you build your workflow</b>. Click the \"Listen for test event\" button, then paste the test URL into your Resend webhook configuration. The webhook executions will show up in the editor.<br><br><b>Use production mode to run your workflow automatically</b>. Activate the workflow, then paste the production URL into your Resend webhook configuration. These executions will show up in the executions list, but not in the editor.",
|
|
57
|
+
active: "Webhooks have two modes: test and production.<br><br><b>Use test mode while you build your workflow</b>. Click the \"Listen for test event\" button, then paste the test URL into your Resend webhook configuration. The webhook executions will show up in the editor.<br><br><b>Use production mode to run your workflow automatically</b>. Since the workflow is activated, you can paste the production URL into your Resend webhook configuration. These executions will show up in the executions list, but not in the editor."
|
|
58
|
+
},
|
|
59
|
+
activationHint: "Once you've finished building your workflow, activate it to use the production webhook URL in your Resend dashboard."
|
|
60
|
+
},
|
|
61
|
+
inputs: [],
|
|
62
|
+
outputs: [n8n_workflow.NodeConnectionTypes.Main],
|
|
63
|
+
webhooks: [{
|
|
64
|
+
name: "default",
|
|
65
|
+
httpMethod: "POST",
|
|
66
|
+
responseMode: "onReceived",
|
|
67
|
+
path: "={{$parameter[\"path\"]}}",
|
|
68
|
+
isFullPath: true
|
|
69
|
+
}],
|
|
70
|
+
properties: [{
|
|
71
|
+
displayName: "Path",
|
|
72
|
+
name: "path",
|
|
73
|
+
type: "string",
|
|
74
|
+
default: "resend",
|
|
75
|
+
placeholder: "resend",
|
|
76
|
+
required: true,
|
|
77
|
+
description: "The path for the webhook URL. This will completely replace the UUID segment in the webhook URL. For example, if you set this to \"test1\", your webhook URL will be https://your-n8n-domain/webhook-test/test1"
|
|
78
|
+
}, {
|
|
79
|
+
displayName: "Events",
|
|
80
|
+
name: "events",
|
|
81
|
+
type: "multiOptions",
|
|
82
|
+
required: true,
|
|
83
|
+
default: ["email.sent"],
|
|
84
|
+
options: [
|
|
85
|
+
{
|
|
86
|
+
name: "Contact Created",
|
|
87
|
+
value: "contact.created"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: "Contact Deleted",
|
|
91
|
+
value: "contact.deleted"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
name: "Contact Updated",
|
|
95
|
+
value: "contact.updated"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
name: "Domain Created",
|
|
99
|
+
value: "domain.created"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: "Domain Deleted",
|
|
103
|
+
value: "domain.deleted"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
name: "Domain Updated",
|
|
107
|
+
value: "domain.updated"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
name: "Email Bounced",
|
|
111
|
+
value: "email.bounced"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
name: "Email Clicked",
|
|
115
|
+
value: "email.clicked"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
name: "Email Complained",
|
|
119
|
+
value: "email.complained"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
name: "Email Delivered",
|
|
123
|
+
value: "email.delivered"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
name: "Email Delivery Delayed",
|
|
127
|
+
value: "email.delivery_delayed"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: "Email Failed",
|
|
131
|
+
value: "email.failed"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
name: "Email Opened",
|
|
135
|
+
value: "email.opened"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
name: "Email Received",
|
|
139
|
+
value: "email.received"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
name: "Email Scheduled",
|
|
143
|
+
value: "email.scheduled"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
name: "Email Sent",
|
|
147
|
+
value: "email.sent"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
name: "Email Suppressed",
|
|
151
|
+
value: "email.suppressed"
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
description: "Select the Resend event types to listen for"
|
|
155
|
+
}]
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
async webhook() {
|
|
159
|
+
const bodyData = this.getBodyData();
|
|
160
|
+
const headers = this.getHeaderData();
|
|
161
|
+
const request = this.getRequestObject();
|
|
162
|
+
const subscribedEvents = this.getNodeParameter("events");
|
|
163
|
+
const webhookSigningSecret = (await this.getCredentials("resendWebhookSigningSecretApi")).webhookSigningSecret;
|
|
164
|
+
if (webhookSigningSecret && webhookSigningSecret.trim() !== "") try {
|
|
165
|
+
var _rawBody;
|
|
166
|
+
const rawBody = (_rawBody = request.rawBody) !== null && _rawBody !== void 0 ? _rawBody : request.body;
|
|
167
|
+
const payload = typeof rawBody === "string" ? rawBody : Buffer.isBuffer(rawBody) ? rawBody.toString("utf8") : JSON.stringify(bodyData !== null && bodyData !== void 0 ? bodyData : {});
|
|
168
|
+
const svixId = getHeaderValue(headers, "svix-id");
|
|
169
|
+
const svixTimestamp = getHeaderValue(headers, "svix-timestamp");
|
|
170
|
+
const svixSignature = getHeaderValue(headers, "svix-signature");
|
|
171
|
+
if (!svixId || !svixTimestamp || !svixSignature) {
|
|
172
|
+
this.getResponseObject().status(401).json({ error: "Missing Svix signature headers" });
|
|
173
|
+
return { noWebhookResponse: true };
|
|
174
|
+
}
|
|
175
|
+
await verifySvixSignature(payload, svixId, svixTimestamp, svixSignature, webhookSigningSecret, this.getNode());
|
|
176
|
+
} catch (_error) {
|
|
177
|
+
this.getResponseObject().status(401).json({ error: "Invalid webhook signature" });
|
|
178
|
+
return { noWebhookResponse: true };
|
|
179
|
+
}
|
|
180
|
+
if (!bodyData || typeof bodyData !== "object" || !("type" in bodyData)) return { noWebhookResponse: true };
|
|
181
|
+
const eventType = bodyData.type;
|
|
182
|
+
if (subscribedEvents.includes(eventType)) return { workflowData: [this.helpers.returnJsonArray([bodyData])] };
|
|
183
|
+
return { noWebhookResponse: true };
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
//#endregion
|
|
180
187
|
exports.ResendTrigger = ResendTrigger;
|
|
181
|
-
//# sourceMappingURL=ResendTrigger.node.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IExecuteFunctions, INodeExecutionData, INodeProperties } from "n8n-workflow";
|
|
2
|
+
declare namespace disconnect_operation_d_exports {
|
|
3
|
+
export { description, execute };
|
|
4
|
+
}
|
|
5
|
+
declare const description: INodeProperties[];
|
|
6
|
+
declare function execute(this: IExecuteFunctions, index: number): Promise<INodeExecutionData[]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { description, disconnect_operation_d_exports, execute };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_runtime = require("../../../../_virtual/_rolldown/runtime.js");
|
|
3
|
+
const require_nodes_Resend_transport_index = require("../../transport/index.js");
|
|
4
|
+
let n8n_workflow = require("n8n-workflow");
|
|
5
|
+
//#region nodes/Resend/actions/account/disconnect.operation.ts
|
|
6
|
+
var disconnect_operation_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
7
|
+
description: () => description,
|
|
8
|
+
execute: () => execute
|
|
9
|
+
});
|
|
10
|
+
const description = [];
|
|
11
|
+
async function execute(index) {
|
|
12
|
+
var _credentials$oauthTok;
|
|
13
|
+
if (this.getNodeParameter("authentication", index, "apiKey") !== "oAuth2") throw new n8n_workflow.NodeOperationError(this.getNode(), "Disconnect is only available when the credential's Authentication is set to OAuth2.", { itemIndex: index });
|
|
14
|
+
const credentials = await this.getCredentials("resendOAuth2Api");
|
|
15
|
+
const clientId = credentials.clientId;
|
|
16
|
+
const refreshToken = (_credentials$oauthTok = credentials.oauthTokenData) === null || _credentials$oauthTok === void 0 ? void 0 : _credentials$oauthTok.refresh_token;
|
|
17
|
+
if (!clientId || !refreshToken) throw new n8n_workflow.NodeOperationError(this.getNode(), "No active Resend OAuth connection was found to disconnect. Connect the credential first.", { itemIndex: index });
|
|
18
|
+
try {
|
|
19
|
+
await this.helpers.httpRequest({
|
|
20
|
+
method: "POST",
|
|
21
|
+
url: "https://api.resend.com/oauth/revoke",
|
|
22
|
+
headers: {
|
|
23
|
+
"Content-Type": "application/json",
|
|
24
|
+
"User-Agent": "n8n-nodes-resend"
|
|
25
|
+
},
|
|
26
|
+
body: {
|
|
27
|
+
client_id: clientId,
|
|
28
|
+
token: refreshToken,
|
|
29
|
+
token_type_hint: "refresh_token"
|
|
30
|
+
},
|
|
31
|
+
json: true
|
|
32
|
+
});
|
|
33
|
+
} catch (error) {
|
|
34
|
+
require_nodes_Resend_transport_index.handleResendApiError(this.getNode(), error, index);
|
|
35
|
+
}
|
|
36
|
+
return [{
|
|
37
|
+
json: { disconnected: true },
|
|
38
|
+
pairedItem: { item: index }
|
|
39
|
+
}];
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
exports.description = description;
|
|
43
|
+
Object.defineProperty(exports, "disconnect_operation_exports", {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function() {
|
|
46
|
+
return disconnect_operation_exports;
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
exports.execute = execute;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_nodes_Resend_transport_index = require("../../transport/index.js");
|
|
3
|
+
const require_nodes_Resend_actions_account_disconnect_operation = require("./disconnect.operation.js");
|
|
4
|
+
//#region nodes/Resend/actions/account/execute.ts
|
|
5
|
+
const execute = require_nodes_Resend_transport_index.createOperationRouter({ disconnect: require_nodes_Resend_actions_account_disconnect_operation.disconnect_operation_exports });
|
|
6
|
+
//#endregion
|
|
7
|
+
exports.execute = execute;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { disconnect_operation_d_exports } from "./disconnect.operation.js";
|
|
2
|
+
import { execute } from "./execute.js";
|
|
3
|
+
import { INodeProperties } from "n8n-workflow";
|
|
4
|
+
//#region nodes/Resend/actions/account/index.d.ts
|
|
5
|
+
declare const operations: INodeProperties[];
|
|
6
|
+
declare const descriptions: INodeProperties[];
|
|
7
|
+
//#endregion
|
|
8
|
+
export { descriptions, disconnect_operation_d_exports as disconnect, execute, operations };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_runtime = require("../../../../_virtual/_rolldown/runtime.js");
|
|
3
|
+
const require_nodes_Resend_actions_account_disconnect_operation = require("./disconnect.operation.js");
|
|
4
|
+
const require_nodes_Resend_actions_account_execute = require("./execute.js");
|
|
5
|
+
//#region nodes/Resend/actions/account/index.ts
|
|
6
|
+
var account_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
7
|
+
descriptions: () => descriptions,
|
|
8
|
+
disconnect: () => require_nodes_Resend_actions_account_disconnect_operation.disconnect_operation_exports,
|
|
9
|
+
execute: () => require_nodes_Resend_actions_account_execute.execute,
|
|
10
|
+
operations: () => operations
|
|
11
|
+
});
|
|
12
|
+
const operations = [{
|
|
13
|
+
displayName: "Operation",
|
|
14
|
+
name: "operation",
|
|
15
|
+
type: "options",
|
|
16
|
+
noDataExpression: true,
|
|
17
|
+
displayOptions: { show: { resource: ["account"] } },
|
|
18
|
+
options: [{
|
|
19
|
+
name: "Disconnect",
|
|
20
|
+
value: "disconnect",
|
|
21
|
+
description: "Revoke the connected Resend OAuth2 grant, ending the connection to your Resend account",
|
|
22
|
+
action: "Disconnect the Resend account"
|
|
23
|
+
}],
|
|
24
|
+
default: "disconnect"
|
|
25
|
+
}];
|
|
26
|
+
const descriptions = [...operations, ...require_nodes_Resend_actions_account_disconnect_operation.description];
|
|
27
|
+
//#endregion
|
|
28
|
+
Object.defineProperty(exports, "account_exports", {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
get: function() {
|
|
31
|
+
return account_exports;
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
exports.descriptions = descriptions;
|
|
35
|
+
Object.defineProperty(exports, "disconnect", {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
get: function() {
|
|
38
|
+
return require_nodes_Resend_actions_account_disconnect_operation.disconnect_operation_exports;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
exports.execute = require_nodes_Resend_actions_account_execute.execute;
|
|
42
|
+
exports.operations = operations;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export
|
|
1
|
+
import { IExecuteFunctions, INodeExecutionData, INodeProperties } from "n8n-workflow";
|
|
2
|
+
declare namespace create_operation_d_exports {
|
|
3
|
+
export { description, execute };
|
|
4
|
+
}
|
|
5
|
+
declare const description: INodeProperties[];
|
|
6
|
+
declare function execute(this: IExecuteFunctions, index: number): Promise<INodeExecutionData[]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { create_operation_d_exports, description, execute };
|