Files
Paul NicolasandGitHub 04517d36e0 fix(connectors): fix webhook idempotency key and tests (#445)
* feat(workflows): handle webhook idempotency in a different way

* feat(adyen): add verify webhook and fix tests

* fix(atlar): ensure plugin functions are tested

* fix(bankingcircle): ensure plugin functions are tested

* feat(column): add verify webhook method and fix tests

* fix(currencycloud): ensure plugin functions are tested

* fix(generic): ensure plugin functions are tested

* feat(mangopay): add verify webhook method and fix tests

* fix(modulr): ensure plugin functions are tested

* fix(moneycorp): ensure plugin functions are tested

* fix(stripe): ensure plugin functions are tested

* feat(wise): add verify webhook method and fix tests

* fix dirty

* fix postgres idempotency key

* fix wrong go libs version

* fix coderabbitai

* webhooks failing verification should stop temporal workflow
2025-05-14 15:27:14 +00:00

42 lines
1.1 KiB
Go

package models
type PSPWebhookConfig struct {
Name string `json:"name"`
URLPath string `json:"urlPath"`
// Additional metadata
Metadata map[string]string `json:"metadata"`
}
type WebhookConfig struct {
Name string `json:"name"`
ConnectorID ConnectorID `json:"connectorID"`
URLPath string `json:"urlPath"`
// Additional metadata
Metadata map[string]string `json:"metadata"`
}
type BasicAuth struct {
Username string `json:"username"`
Password string `json:"password"`
}
type PSPWebhook struct {
BasicAuth *BasicAuth `json:"basicAuth"`
QueryValues map[string][]string `json:"queryValues"`
Headers map[string][]string `json:"headers"`
Body []byte `json:"payload"`
}
type Webhook struct {
ID string `json:"id"`
ConnectorID ConnectorID `json:"connectorID"`
IdempotencyKey *string `json:"idempotencyKey"`
BasicAuth *BasicAuth `json:"basicAuth"`
QueryValues map[string][]string `json:"queryValues"`
Headers map[string][]string `json:"headers"`
Body []byte `json:"payload"`
}