@augustusbank/typescript-sdk 0.11.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/CHANGELOG.md +136 -0
- package/LICENSE +201 -0
- package/README.md +394 -0
- package/api-promise.d.mts +2 -0
- package/api-promise.d.mts.map +1 -0
- package/api-promise.d.ts +2 -0
- package/api-promise.d.ts.map +1 -0
- package/api-promise.js +6 -0
- package/api-promise.js.map +1 -0
- package/api-promise.mjs +2 -0
- package/api-promise.mjs.map +1 -0
- package/client.d.mts +249 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +249 -0
- package/client.d.ts.map +1 -0
- package/client.js +542 -0
- package/client.js.map +1 -0
- package/client.mjs +538 -0
- package/client.mjs.map +1 -0
- package/core/api-promise.d.mts +46 -0
- package/core/api-promise.d.mts.map +1 -0
- package/core/api-promise.d.ts +46 -0
- package/core/api-promise.d.ts.map +1 -0
- package/core/api-promise.js +74 -0
- package/core/api-promise.js.map +1 -0
- package/core/api-promise.mjs +70 -0
- package/core/api-promise.mjs.map +1 -0
- package/core/error.d.mts +46 -0
- package/core/error.d.mts.map +1 -0
- package/core/error.d.ts +46 -0
- package/core/error.d.ts.map +1 -0
- package/core/error.js +113 -0
- package/core/error.js.map +1 -0
- package/core/error.mjs +97 -0
- package/core/error.mjs.map +1 -0
- package/core/pagination.d.mts +54 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +54 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +101 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +95 -0
- package/core/pagination.mjs.map +1 -0
- package/core/resource.d.mts +6 -0
- package/core/resource.d.mts.map +1 -0
- package/core/resource.d.ts +6 -0
- package/core/resource.d.ts.map +1 -0
- package/core/resource.js +11 -0
- package/core/resource.js.map +1 -0
- package/core/resource.mjs +7 -0
- package/core/resource.mjs.map +1 -0
- package/core/uploads.d.mts +3 -0
- package/core/uploads.d.mts.map +1 -0
- package/core/uploads.d.ts +3 -0
- package/core/uploads.d.ts.map +1 -0
- package/core/uploads.js +6 -0
- package/core/uploads.js.map +1 -0
- package/core/uploads.mjs +2 -0
- package/core/uploads.mjs.map +1 -0
- package/error.d.mts +2 -0
- package/error.d.mts.map +1 -0
- package/error.d.ts +2 -0
- package/error.d.ts.map +1 -0
- package/error.js +6 -0
- package/error.js.map +1 -0
- package/error.mjs +2 -0
- package/error.mjs.map +1 -0
- package/index.d.mts +7 -0
- package/index.d.mts.map +1 -0
- package/index.d.ts +7 -0
- package/index.d.ts.map +1 -0
- package/index.js +32 -0
- package/index.js.map +1 -0
- package/index.mjs +8 -0
- package/index.mjs.map +1 -0
- package/internal/builtin-types.d.mts +73 -0
- package/internal/builtin-types.d.mts.map +1 -0
- package/internal/builtin-types.d.ts +73 -0
- package/internal/builtin-types.d.ts.map +1 -0
- package/internal/builtin-types.js +4 -0
- package/internal/builtin-types.js.map +1 -0
- package/internal/builtin-types.mjs +3 -0
- package/internal/builtin-types.mjs.map +1 -0
- package/internal/detect-platform.d.mts +15 -0
- package/internal/detect-platform.d.mts.map +1 -0
- package/internal/detect-platform.d.ts +15 -0
- package/internal/detect-platform.d.ts.map +1 -0
- package/internal/detect-platform.js +162 -0
- package/internal/detect-platform.js.map +1 -0
- package/internal/detect-platform.mjs +157 -0
- package/internal/detect-platform.mjs.map +1 -0
- package/internal/errors.d.mts +3 -0
- package/internal/errors.d.mts.map +1 -0
- package/internal/errors.d.ts +3 -0
- package/internal/errors.d.ts.map +1 -0
- package/internal/errors.js +41 -0
- package/internal/errors.js.map +1 -0
- package/internal/errors.mjs +36 -0
- package/internal/errors.mjs.map +1 -0
- package/internal/headers.d.mts +20 -0
- package/internal/headers.d.mts.map +1 -0
- package/internal/headers.d.ts +20 -0
- package/internal/headers.d.ts.map +1 -0
- package/internal/headers.js +79 -0
- package/internal/headers.js.map +1 -0
- package/internal/headers.mjs +74 -0
- package/internal/headers.mjs.map +1 -0
- package/internal/parse.d.mts +12 -0
- package/internal/parse.d.mts.map +1 -0
- package/internal/parse.d.ts +12 -0
- package/internal/parse.d.ts.map +1 -0
- package/internal/parse.js +40 -0
- package/internal/parse.js.map +1 -0
- package/internal/parse.mjs +37 -0
- package/internal/parse.mjs.map +1 -0
- package/internal/qs/formats.d.mts +7 -0
- package/internal/qs/formats.d.mts.map +1 -0
- package/internal/qs/formats.d.ts +7 -0
- package/internal/qs/formats.d.ts.map +1 -0
- package/internal/qs/formats.js +13 -0
- package/internal/qs/formats.js.map +1 -0
- package/internal/qs/formats.mjs +9 -0
- package/internal/qs/formats.mjs.map +1 -0
- package/internal/qs/index.d.mts +10 -0
- package/internal/qs/index.d.mts.map +1 -0
- package/internal/qs/index.d.ts +10 -0
- package/internal/qs/index.d.ts.map +1 -0
- package/internal/qs/index.js +14 -0
- package/internal/qs/index.js.map +1 -0
- package/internal/qs/index.mjs +10 -0
- package/internal/qs/index.mjs.map +1 -0
- package/internal/qs/stringify.d.mts +3 -0
- package/internal/qs/stringify.d.mts.map +1 -0
- package/internal/qs/stringify.d.ts +3 -0
- package/internal/qs/stringify.d.ts.map +1 -0
- package/internal/qs/stringify.js +277 -0
- package/internal/qs/stringify.js.map +1 -0
- package/internal/qs/stringify.mjs +274 -0
- package/internal/qs/stringify.mjs.map +1 -0
- package/internal/qs/types.d.mts +57 -0
- package/internal/qs/types.d.mts.map +1 -0
- package/internal/qs/types.d.ts +57 -0
- package/internal/qs/types.d.ts.map +1 -0
- package/internal/qs/types.js +3 -0
- package/internal/qs/types.js.map +1 -0
- package/internal/qs/types.mjs +2 -0
- package/internal/qs/types.mjs.map +1 -0
- package/internal/qs/utils.d.mts +15 -0
- package/internal/qs/utils.d.mts.map +1 -0
- package/internal/qs/utils.d.ts +15 -0
- package/internal/qs/utils.d.ts.map +1 -0
- package/internal/qs/utils.js +230 -0
- package/internal/qs/utils.js.map +1 -0
- package/internal/qs/utils.mjs +217 -0
- package/internal/qs/utils.mjs.map +1 -0
- package/internal/request-options.d.mts +75 -0
- package/internal/request-options.d.mts.map +1 -0
- package/internal/request-options.d.ts +75 -0
- package/internal/request-options.d.ts.map +1 -0
- package/internal/request-options.js +14 -0
- package/internal/request-options.js.map +1 -0
- package/internal/request-options.mjs +10 -0
- package/internal/request-options.mjs.map +1 -0
- package/internal/shim-types.d.mts +17 -0
- package/internal/shim-types.d.mts.map +1 -0
- package/internal/shim-types.d.ts +17 -0
- package/internal/shim-types.d.ts.map +1 -0
- package/internal/shim-types.js +4 -0
- package/internal/shim-types.js.map +1 -0
- package/internal/shim-types.mjs +3 -0
- package/internal/shim-types.mjs.map +1 -0
- package/internal/shims.d.mts +20 -0
- package/internal/shims.d.mts.map +1 -0
- package/internal/shims.d.ts +20 -0
- package/internal/shims.d.ts.map +1 -0
- package/internal/shims.js +92 -0
- package/internal/shims.js.map +1 -0
- package/internal/shims.mjs +85 -0
- package/internal/shims.mjs.map +1 -0
- package/internal/to-file.d.mts +45 -0
- package/internal/to-file.d.mts.map +1 -0
- package/internal/to-file.d.ts +45 -0
- package/internal/to-file.d.ts.map +1 -0
- package/internal/to-file.js +91 -0
- package/internal/to-file.js.map +1 -0
- package/internal/to-file.mjs +88 -0
- package/internal/to-file.mjs.map +1 -0
- package/internal/tslib.js +81 -0
- package/internal/tslib.mjs +17 -0
- package/internal/types.d.mts +69 -0
- package/internal/types.d.mts.map +1 -0
- package/internal/types.d.ts +69 -0
- package/internal/types.d.ts.map +1 -0
- package/internal/types.js +4 -0
- package/internal/types.js.map +1 -0
- package/internal/types.mjs +3 -0
- package/internal/types.mjs.map +1 -0
- package/internal/uploads.d.mts +42 -0
- package/internal/uploads.d.mts.map +1 -0
- package/internal/uploads.d.ts +42 -0
- package/internal/uploads.d.ts.map +1 -0
- package/internal/uploads.js +141 -0
- package/internal/uploads.js.map +1 -0
- package/internal/uploads.mjs +131 -0
- package/internal/uploads.mjs.map +1 -0
- package/internal/utils/base64.d.mts +3 -0
- package/internal/utils/base64.d.mts.map +1 -0
- package/internal/utils/base64.d.ts +3 -0
- package/internal/utils/base64.d.ts.map +1 -0
- package/internal/utils/base64.js +38 -0
- package/internal/utils/base64.js.map +1 -0
- package/internal/utils/base64.mjs +33 -0
- package/internal/utils/base64.mjs.map +1 -0
- package/internal/utils/bytes.d.mts +4 -0
- package/internal/utils/bytes.d.mts.map +1 -0
- package/internal/utils/bytes.d.ts +4 -0
- package/internal/utils/bytes.d.ts.map +1 -0
- package/internal/utils/bytes.js +31 -0
- package/internal/utils/bytes.js.map +1 -0
- package/internal/utils/bytes.mjs +26 -0
- package/internal/utils/bytes.mjs.map +1 -0
- package/internal/utils/env.d.mts +9 -0
- package/internal/utils/env.d.mts.map +1 -0
- package/internal/utils/env.d.ts +9 -0
- package/internal/utils/env.d.ts.map +1 -0
- package/internal/utils/env.js +22 -0
- package/internal/utils/env.js.map +1 -0
- package/internal/utils/env.mjs +18 -0
- package/internal/utils/env.mjs.map +1 -0
- package/internal/utils/log.d.mts +37 -0
- package/internal/utils/log.d.mts.map +1 -0
- package/internal/utils/log.d.ts +37 -0
- package/internal/utils/log.d.ts.map +1 -0
- package/internal/utils/log.js +87 -0
- package/internal/utils/log.js.map +1 -0
- package/internal/utils/log.mjs +81 -0
- package/internal/utils/log.mjs.map +1 -0
- package/internal/utils/path.d.mts +15 -0
- package/internal/utils/path.d.mts.map +1 -0
- package/internal/utils/path.d.ts +15 -0
- package/internal/utils/path.d.ts.map +1 -0
- package/internal/utils/path.js +79 -0
- package/internal/utils/path.js.map +1 -0
- package/internal/utils/path.mjs +74 -0
- package/internal/utils/path.mjs.map +1 -0
- package/internal/utils/query.d.mts +2 -0
- package/internal/utils/query.d.mts.map +1 -0
- package/internal/utils/query.d.ts +2 -0
- package/internal/utils/query.d.ts.map +1 -0
- package/internal/utils/query.js +10 -0
- package/internal/utils/query.js.map +1 -0
- package/internal/utils/query.mjs +6 -0
- package/internal/utils/query.mjs.map +1 -0
- package/internal/utils/sleep.d.mts +2 -0
- package/internal/utils/sleep.d.mts.map +1 -0
- package/internal/utils/sleep.d.ts +2 -0
- package/internal/utils/sleep.d.ts.map +1 -0
- package/internal/utils/sleep.js +7 -0
- package/internal/utils/sleep.js.map +1 -0
- package/internal/utils/sleep.mjs +3 -0
- package/internal/utils/sleep.mjs.map +1 -0
- package/internal/utils/uuid.d.mts +5 -0
- package/internal/utils/uuid.d.mts.map +1 -0
- package/internal/utils/uuid.d.ts +5 -0
- package/internal/utils/uuid.d.ts.map +1 -0
- package/internal/utils/uuid.js +19 -0
- package/internal/utils/uuid.js.map +1 -0
- package/internal/utils/uuid.mjs +15 -0
- package/internal/utils/uuid.mjs.map +1 -0
- package/internal/utils/values.d.mts +18 -0
- package/internal/utils/values.d.mts.map +1 -0
- package/internal/utils/values.d.ts +18 -0
- package/internal/utils/values.d.ts.map +1 -0
- package/internal/utils/values.js +112 -0
- package/internal/utils/values.js.map +1 -0
- package/internal/utils/values.mjs +94 -0
- package/internal/utils/values.mjs.map +1 -0
- package/internal/utils.d.mts +8 -0
- package/internal/utils.d.mts.map +1 -0
- package/internal/utils.d.ts +8 -0
- package/internal/utils.d.ts.map +1 -0
- package/internal/utils.js +12 -0
- package/internal/utils.js.map +1 -0
- package/internal/utils.mjs +9 -0
- package/internal/utils.mjs.map +1 -0
- package/package.json +161 -0
- package/pagination.d.mts +2 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +2 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +6 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +2 -0
- package/pagination.mjs.map +1 -0
- package/resource.d.mts +2 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +2 -0
- package/resource.d.ts.map +1 -0
- package/resource.js +6 -0
- package/resource.js.map +1 -0
- package/resource.mjs +2 -0
- package/resource.mjs.map +1 -0
- package/resources/account-programs.d.mts +112 -0
- package/resources/account-programs.d.mts.map +1 -0
- package/resources/account-programs.d.ts +112 -0
- package/resources/account-programs.d.ts.map +1 -0
- package/resources/account-programs.js +33 -0
- package/resources/account-programs.js.map +1 -0
- package/resources/account-programs.mjs +29 -0
- package/resources/account-programs.mjs.map +1 -0
- package/resources/accounts.d.mts +850 -0
- package/resources/accounts.d.mts.map +1 -0
- package/resources/accounts.d.ts +850 -0
- package/resources/accounts.d.ts.map +1 -0
- package/resources/accounts.js +53 -0
- package/resources/accounts.js.map +1 -0
- package/resources/accounts.mjs +49 -0
- package/resources/accounts.mjs.map +1 -0
- package/resources/api-keys.d.mts +58 -0
- package/resources/api-keys.d.mts.map +1 -0
- package/resources/api-keys.d.ts +58 -0
- package/resources/api-keys.d.ts.map +1 -0
- package/resources/api-keys.js +17 -0
- package/resources/api-keys.js.map +1 -0
- package/resources/api-keys.mjs +13 -0
- package/resources/api-keys.mjs.map +1 -0
- package/resources/api-versions.d.mts +47 -0
- package/resources/api-versions.d.mts.map +1 -0
- package/resources/api-versions.d.ts +47 -0
- package/resources/api-versions.d.ts.map +1 -0
- package/resources/api-versions.js +17 -0
- package/resources/api-versions.js.map +1 -0
- package/resources/api-versions.mjs +13 -0
- package/resources/api-versions.mjs.map +1 -0
- package/resources/conversions.d.mts +270 -0
- package/resources/conversions.d.mts.map +1 -0
- package/resources/conversions.d.ts +270 -0
- package/resources/conversions.d.ts.map +1 -0
- package/resources/conversions.js +32 -0
- package/resources/conversions.js.map +1 -0
- package/resources/conversions.mjs +28 -0
- package/resources/conversions.mjs.map +1 -0
- package/resources/deposits.d.mts +252 -0
- package/resources/deposits.d.mts.map +1 -0
- package/resources/deposits.d.ts +252 -0
- package/resources/deposits.d.ts.map +1 -0
- package/resources/deposits.js +23 -0
- package/resources/deposits.js.map +1 -0
- package/resources/deposits.mjs +19 -0
- package/resources/deposits.mjs.map +1 -0
- package/resources/events.d.mts +101 -0
- package/resources/events.d.mts.map +1 -0
- package/resources/events.d.ts +101 -0
- package/resources/events.d.ts.map +1 -0
- package/resources/events.js +24 -0
- package/resources/events.js.map +1 -0
- package/resources/events.mjs +20 -0
- package/resources/events.mjs.map +1 -0
- package/resources/index.d.mts +15 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +15 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +33 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +16 -0
- package/resources/index.mjs.map +1 -0
- package/resources/payouts.d.mts +550 -0
- package/resources/payouts.d.mts.map +1 -0
- package/resources/payouts.d.ts +550 -0
- package/resources/payouts.d.ts.map +1 -0
- package/resources/payouts.js +29 -0
- package/resources/payouts.js.map +1 -0
- package/resources/payouts.mjs +25 -0
- package/resources/payouts.mjs.map +1 -0
- package/resources/quotes/index.d.mts +3 -0
- package/resources/quotes/index.d.mts.map +1 -0
- package/resources/quotes/index.d.ts +3 -0
- package/resources/quotes/index.d.ts.map +1 -0
- package/resources/quotes/index.js +9 -0
- package/resources/quotes/index.js.map +1 -0
- package/resources/quotes/index.mjs +4 -0
- package/resources/quotes/index.mjs.map +1 -0
- package/resources/quotes/indicative.d.mts +76 -0
- package/resources/quotes/indicative.d.mts.map +1 -0
- package/resources/quotes/indicative.d.ts +76 -0
- package/resources/quotes/indicative.d.ts.map +1 -0
- package/resources/quotes/indicative.js +15 -0
- package/resources/quotes/indicative.js.map +1 -0
- package/resources/quotes/indicative.mjs +11 -0
- package/resources/quotes/indicative.mjs.map +1 -0
- package/resources/quotes/quotes.d.mts +71 -0
- package/resources/quotes/quotes.d.mts.map +1 -0
- package/resources/quotes/quotes.d.ts +71 -0
- package/resources/quotes/quotes.d.ts.map +1 -0
- package/resources/quotes/quotes.js +24 -0
- package/resources/quotes/quotes.js.map +1 -0
- package/resources/quotes/quotes.mjs +19 -0
- package/resources/quotes/quotes.mjs.map +1 -0
- package/resources/quotes.d.mts +2 -0
- package/resources/quotes.d.mts.map +1 -0
- package/resources/quotes.d.ts +2 -0
- package/resources/quotes.d.ts.map +1 -0
- package/resources/quotes.js +6 -0
- package/resources/quotes.js.map +1 -0
- package/resources/quotes.mjs +3 -0
- package/resources/quotes.mjs.map +1 -0
- package/resources/returns.d.mts +70 -0
- package/resources/returns.d.mts.map +1 -0
- package/resources/returns.d.ts +70 -0
- package/resources/returns.d.ts.map +1 -0
- package/resources/returns.js +16 -0
- package/resources/returns.js.map +1 -0
- package/resources/returns.mjs +12 -0
- package/resources/returns.mjs.map +1 -0
- package/resources/scopes.d.mts +49 -0
- package/resources/scopes.d.mts.map +1 -0
- package/resources/scopes.d.ts +49 -0
- package/resources/scopes.d.ts.map +1 -0
- package/resources/scopes.js +17 -0
- package/resources/scopes.js.map +1 -0
- package/resources/scopes.mjs +13 -0
- package/resources/scopes.mjs.map +1 -0
- package/resources/webhook-deliveries.d.mts +203 -0
- package/resources/webhook-deliveries.d.mts.map +1 -0
- package/resources/webhook-deliveries.d.ts +203 -0
- package/resources/webhook-deliveries.d.ts.map +1 -0
- package/resources/webhook-deliveries.js +33 -0
- package/resources/webhook-deliveries.js.map +1 -0
- package/resources/webhook-deliveries.mjs +29 -0
- package/resources/webhook-deliveries.mjs.map +1 -0
- package/resources/webhook-subscriptions.d.mts +221 -0
- package/resources/webhook-subscriptions.d.mts.map +1 -0
- package/resources/webhook-subscriptions.d.ts +221 -0
- package/resources/webhook-subscriptions.d.ts.map +1 -0
- package/resources/webhook-subscriptions.js +54 -0
- package/resources/webhook-subscriptions.js.map +1 -0
- package/resources/webhook-subscriptions.mjs +50 -0
- package/resources/webhook-subscriptions.mjs.map +1 -0
- package/resources/webhooks.d.mts +1489 -0
- package/resources/webhooks.d.mts.map +1 -0
- package/resources/webhooks.d.ts +1489 -0
- package/resources/webhooks.d.ts.map +1 -0
- package/resources/webhooks.js +20 -0
- package/resources/webhooks.js.map +1 -0
- package/resources/webhooks.mjs +16 -0
- package/resources/webhooks.mjs.map +1 -0
- package/resources.d.mts +2 -0
- package/resources.d.mts.map +1 -0
- package/resources.d.ts +2 -0
- package/resources.d.ts.map +1 -0
- package/resources.js +5 -0
- package/resources.js.map +1 -0
- package/resources.mjs +2 -0
- package/resources.mjs.map +1 -0
- package/src/api-promise.ts +2 -0
- package/src/client.ts +1047 -0
- package/src/core/README.md +3 -0
- package/src/core/api-promise.ts +92 -0
- package/src/core/error.ts +130 -0
- package/src/core/pagination.ts +157 -0
- package/src/core/resource.ts +11 -0
- package/src/core/uploads.ts +2 -0
- package/src/error.ts +2 -0
- package/src/index.ts +23 -0
- package/src/internal/README.md +3 -0
- package/src/internal/builtin-types.ts +93 -0
- package/src/internal/detect-platform.ts +196 -0
- package/src/internal/errors.ts +33 -0
- package/src/internal/headers.ts +97 -0
- package/src/internal/parse.ts +56 -0
- package/src/internal/qs/LICENSE.md +13 -0
- package/src/internal/qs/README.md +3 -0
- package/src/internal/qs/formats.ts +10 -0
- package/src/internal/qs/index.ts +13 -0
- package/src/internal/qs/stringify.ts +385 -0
- package/src/internal/qs/types.ts +71 -0
- package/src/internal/qs/utils.ts +265 -0
- package/src/internal/request-options.ts +91 -0
- package/src/internal/shim-types.ts +26 -0
- package/src/internal/shims.ts +107 -0
- package/src/internal/to-file.ts +154 -0
- package/src/internal/types.ts +93 -0
- package/src/internal/uploads.ts +187 -0
- package/src/internal/utils/base64.ts +40 -0
- package/src/internal/utils/bytes.ts +32 -0
- package/src/internal/utils/env.ts +18 -0
- package/src/internal/utils/log.ts +128 -0
- package/src/internal/utils/path.ts +88 -0
- package/src/internal/utils/query.ts +7 -0
- package/src/internal/utils/sleep.ts +3 -0
- package/src/internal/utils/uuid.ts +17 -0
- package/src/internal/utils/values.ts +105 -0
- package/src/internal/utils.ts +9 -0
- package/src/lib/.keep +4 -0
- package/src/pagination.ts +2 -0
- package/src/resource.ts +2 -0
- package/src/resources/account-programs.ts +156 -0
- package/src/resources/accounts.ts +1603 -0
- package/src/resources/api-keys.ts +89 -0
- package/src/resources/api-versions.ts +61 -0
- package/src/resources/conversions.ts +340 -0
- package/src/resources/deposits.ts +364 -0
- package/src/resources/events.ts +170 -0
- package/src/resources/index.ts +99 -0
- package/src/resources/payouts.ts +735 -0
- package/src/resources/quotes/index.ts +4 -0
- package/src/resources/quotes/indicative.ts +100 -0
- package/src/resources/quotes/quotes.ts +108 -0
- package/src/resources/quotes.ts +3 -0
- package/src/resources/returns.ts +102 -0
- package/src/resources/scopes.ts +80 -0
- package/src/resources/webhook-deliveries.ts +267 -0
- package/src/resources/webhook-subscriptions.ts +411 -0
- package/src/resources/webhooks.ts +1953 -0
- package/src/resources.ts +1 -0
- package/src/tsconfig.json +11 -0
- package/src/uploads.ts +2 -0
- package/src/version.ts +1 -0
- package/uploads.d.mts +2 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +2 -0
- package/uploads.d.ts.map +1 -0
- package/uploads.js +6 -0
- package/uploads.js.map +1 -0
- package/uploads.mjs +2 -0
- package/uploads.mjs.map +1 -0
- package/version.d.mts +2 -0
- package/version.d.mts.map +1 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +5 -0
- package/version.js.map +1 -0
- package/version.mjs +2 -0
- package/version.mjs.map +1 -0
|
@@ -0,0 +1,1953 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { Webhook } from 'standardwebhooks';
|
|
5
|
+
|
|
6
|
+
export class Webhooks extends APIResource {
|
|
7
|
+
unwrap(
|
|
8
|
+
body: string,
|
|
9
|
+
{ headers, key }: { headers: Record<string, string>; key?: string },
|
|
10
|
+
): UnwrapWebhookEvent {
|
|
11
|
+
if (headers !== undefined) {
|
|
12
|
+
const keyStr: string | null = key === undefined ? this._client.webhookKey : key;
|
|
13
|
+
if (keyStr === null) throw new Error('Webhook key must not be null in order to unwrap');
|
|
14
|
+
const wh = new Webhook(keyStr);
|
|
15
|
+
wh.verify(body, headers);
|
|
16
|
+
}
|
|
17
|
+
return JSON.parse(body) as UnwrapWebhookEvent;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface PayoutCreatedWebhookEvent {
|
|
22
|
+
/**
|
|
23
|
+
* Unique identifier for the event. Stable across retries.
|
|
24
|
+
*/
|
|
25
|
+
id: string;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* API version the payload was rendered at. Stable across retries and redeliveries.
|
|
29
|
+
*/
|
|
30
|
+
api_version: string;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* ISO 8601 UTC timestamp when the event was created.
|
|
34
|
+
*/
|
|
35
|
+
date: string;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Full resource snapshot at the time of the event.
|
|
39
|
+
*/
|
|
40
|
+
payload: PayoutCreatedWebhookEvent.Payload;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Event type in resource.action format.
|
|
44
|
+
*/
|
|
45
|
+
type: 'payout.created';
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export namespace PayoutCreatedWebhookEvent {
|
|
49
|
+
/**
|
|
50
|
+
* Full resource snapshot at the time of the event.
|
|
51
|
+
*/
|
|
52
|
+
export interface Payload {
|
|
53
|
+
/**
|
|
54
|
+
* Unique identifier of the payout.
|
|
55
|
+
*/
|
|
56
|
+
id: string;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Amount as a string decimal (e.g. "100.50").
|
|
60
|
+
*/
|
|
61
|
+
amount: string;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* ISO 8601 UTC timestamp when the payout was created.
|
|
65
|
+
*/
|
|
66
|
+
created_at: string;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Currency code (ISO 4217 currency code or crypto currency code).
|
|
70
|
+
*/
|
|
71
|
+
currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Bank account or crypto wallet the payout was sent to.
|
|
75
|
+
*/
|
|
76
|
+
destination: Payload.UnionMember0 | Payload.UnionMember1 | Payload.UnionMember2 | Payload.UnionMember3;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Failure details when status is failed, otherwise null.
|
|
80
|
+
*/
|
|
81
|
+
failure: Payload.Failure | null;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Key-value pairs stored with the payout.
|
|
85
|
+
*/
|
|
86
|
+
metadata: { [key: string]: string };
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Payment reference.
|
|
90
|
+
*/
|
|
91
|
+
reference: string;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* ID of the account that was debited.
|
|
95
|
+
*/
|
|
96
|
+
source_account_id: string;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Current status of the payout.
|
|
100
|
+
*/
|
|
101
|
+
status: 'pending' | 'paid' | 'failed' | 'returned';
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Resource type discriminator.
|
|
105
|
+
*/
|
|
106
|
+
type: 'payout';
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* ISO 8601 UTC timestamp when the payout was last updated.
|
|
110
|
+
*/
|
|
111
|
+
updated_at: string;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export namespace Payload {
|
|
115
|
+
export interface UnionMember0 {
|
|
116
|
+
/**
|
|
117
|
+
* Name of the account holder.
|
|
118
|
+
*/
|
|
119
|
+
account_holder_name: string;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Bank Identifier Code, or null if not provided.
|
|
123
|
+
*/
|
|
124
|
+
bic: string | null;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* International Bank Account Number.
|
|
128
|
+
*/
|
|
129
|
+
iban: string;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Discriminator for IBAN financial address.
|
|
133
|
+
*/
|
|
134
|
+
type: 'iban';
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export interface UnionMember1 {
|
|
138
|
+
/**
|
|
139
|
+
* Name of the account holder.
|
|
140
|
+
*/
|
|
141
|
+
account_holder_name: string;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* UK account number (8 digits).
|
|
145
|
+
*/
|
|
146
|
+
account_number: string;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* UK sort code (6 digits).
|
|
150
|
+
*/
|
|
151
|
+
sort_code: string;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Discriminator for UK sort code financial address.
|
|
155
|
+
*/
|
|
156
|
+
type: 'sort_code';
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export interface UnionMember2 {
|
|
160
|
+
/**
|
|
161
|
+
* Name of the account holder.
|
|
162
|
+
*/
|
|
163
|
+
account_holder_name: string;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Bank account number.
|
|
167
|
+
*/
|
|
168
|
+
account_number: string;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* ABA routing number (9 digits).
|
|
172
|
+
*/
|
|
173
|
+
routing_number: string;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Discriminator for ABA wire financial address.
|
|
177
|
+
*/
|
|
178
|
+
type: 'aba';
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export interface UnionMember3 {
|
|
182
|
+
/**
|
|
183
|
+
* Wallet address on the specified blockchain.
|
|
184
|
+
*/
|
|
185
|
+
address: string;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Blockchain network for the crypto wallet.
|
|
189
|
+
*/
|
|
190
|
+
blockchain: 'ethereum' | 'solana' | 'polygon';
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Discriminator for crypto wallet financial address.
|
|
194
|
+
*/
|
|
195
|
+
type: 'crypto_wallet';
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Failure details when status is failed, otherwise null.
|
|
200
|
+
*/
|
|
201
|
+
export interface Failure {
|
|
202
|
+
/**
|
|
203
|
+
* Failure code.
|
|
204
|
+
*/
|
|
205
|
+
code:
|
|
206
|
+
| 'account_closed'
|
|
207
|
+
| 'account_blocked'
|
|
208
|
+
| 'insufficient_funds'
|
|
209
|
+
| 'invalid_account_format'
|
|
210
|
+
| 'invalid_instruction'
|
|
211
|
+
| 'invalid_amount'
|
|
212
|
+
| 'invalid_time'
|
|
213
|
+
| 'duplicate_transaction'
|
|
214
|
+
| 'payee_verification_failed'
|
|
215
|
+
| 'system_error'
|
|
216
|
+
| 'provider_system_error'
|
|
217
|
+
| 'rejected_by_correspondent_bank'
|
|
218
|
+
| 'blocked_by_review'
|
|
219
|
+
| 'unknown';
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Human-readable description of the failure.
|
|
223
|
+
*/
|
|
224
|
+
message: string;
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Whether the payout can be retried.
|
|
228
|
+
*/
|
|
229
|
+
retry: boolean;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export interface PayoutInitiatedWebhookEvent {
|
|
235
|
+
/**
|
|
236
|
+
* Unique identifier for the event. Stable across retries.
|
|
237
|
+
*/
|
|
238
|
+
id: string;
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* API version the payload was rendered at. Stable across retries and redeliveries.
|
|
242
|
+
*/
|
|
243
|
+
api_version: string;
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* ISO 8601 UTC timestamp when the event was created.
|
|
247
|
+
*/
|
|
248
|
+
date: string;
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Full resource snapshot at the time of the event.
|
|
252
|
+
*/
|
|
253
|
+
payload: PayoutInitiatedWebhookEvent.Payload;
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Event type in resource.action format.
|
|
257
|
+
*/
|
|
258
|
+
type: 'payout.initiated';
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export namespace PayoutInitiatedWebhookEvent {
|
|
262
|
+
/**
|
|
263
|
+
* Full resource snapshot at the time of the event.
|
|
264
|
+
*/
|
|
265
|
+
export interface Payload {
|
|
266
|
+
/**
|
|
267
|
+
* Unique identifier of the payout.
|
|
268
|
+
*/
|
|
269
|
+
id: string;
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Amount as a string decimal (e.g. "100.50").
|
|
273
|
+
*/
|
|
274
|
+
amount: string;
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* ISO 8601 UTC timestamp when the payout was created.
|
|
278
|
+
*/
|
|
279
|
+
created_at: string;
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Currency code (ISO 4217 currency code or crypto currency code).
|
|
283
|
+
*/
|
|
284
|
+
currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Bank account or crypto wallet the payout was sent to.
|
|
288
|
+
*/
|
|
289
|
+
destination: Payload.UnionMember0 | Payload.UnionMember1 | Payload.UnionMember2 | Payload.UnionMember3;
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Failure details when status is failed, otherwise null.
|
|
293
|
+
*/
|
|
294
|
+
failure: Payload.Failure | null;
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Key-value pairs stored with the payout.
|
|
298
|
+
*/
|
|
299
|
+
metadata: { [key: string]: string };
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Payment reference.
|
|
303
|
+
*/
|
|
304
|
+
reference: string;
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* ID of the account that was debited.
|
|
308
|
+
*/
|
|
309
|
+
source_account_id: string;
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Current status of the payout.
|
|
313
|
+
*/
|
|
314
|
+
status: 'pending' | 'paid' | 'failed' | 'returned';
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Resource type discriminator.
|
|
318
|
+
*/
|
|
319
|
+
type: 'payout';
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* ISO 8601 UTC timestamp when the payout was last updated.
|
|
323
|
+
*/
|
|
324
|
+
updated_at: string;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
export namespace Payload {
|
|
328
|
+
export interface UnionMember0 {
|
|
329
|
+
/**
|
|
330
|
+
* Name of the account holder.
|
|
331
|
+
*/
|
|
332
|
+
account_holder_name: string;
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* Bank Identifier Code, or null if not provided.
|
|
336
|
+
*/
|
|
337
|
+
bic: string | null;
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* International Bank Account Number.
|
|
341
|
+
*/
|
|
342
|
+
iban: string;
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* Discriminator for IBAN financial address.
|
|
346
|
+
*/
|
|
347
|
+
type: 'iban';
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
export interface UnionMember1 {
|
|
351
|
+
/**
|
|
352
|
+
* Name of the account holder.
|
|
353
|
+
*/
|
|
354
|
+
account_holder_name: string;
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* UK account number (8 digits).
|
|
358
|
+
*/
|
|
359
|
+
account_number: string;
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* UK sort code (6 digits).
|
|
363
|
+
*/
|
|
364
|
+
sort_code: string;
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* Discriminator for UK sort code financial address.
|
|
368
|
+
*/
|
|
369
|
+
type: 'sort_code';
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
export interface UnionMember2 {
|
|
373
|
+
/**
|
|
374
|
+
* Name of the account holder.
|
|
375
|
+
*/
|
|
376
|
+
account_holder_name: string;
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* Bank account number.
|
|
380
|
+
*/
|
|
381
|
+
account_number: string;
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* ABA routing number (9 digits).
|
|
385
|
+
*/
|
|
386
|
+
routing_number: string;
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* Discriminator for ABA wire financial address.
|
|
390
|
+
*/
|
|
391
|
+
type: 'aba';
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
export interface UnionMember3 {
|
|
395
|
+
/**
|
|
396
|
+
* Wallet address on the specified blockchain.
|
|
397
|
+
*/
|
|
398
|
+
address: string;
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* Blockchain network for the crypto wallet.
|
|
402
|
+
*/
|
|
403
|
+
blockchain: 'ethereum' | 'solana' | 'polygon';
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* Discriminator for crypto wallet financial address.
|
|
407
|
+
*/
|
|
408
|
+
type: 'crypto_wallet';
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Failure details when status is failed, otherwise null.
|
|
413
|
+
*/
|
|
414
|
+
export interface Failure {
|
|
415
|
+
/**
|
|
416
|
+
* Failure code.
|
|
417
|
+
*/
|
|
418
|
+
code:
|
|
419
|
+
| 'account_closed'
|
|
420
|
+
| 'account_blocked'
|
|
421
|
+
| 'insufficient_funds'
|
|
422
|
+
| 'invalid_account_format'
|
|
423
|
+
| 'invalid_instruction'
|
|
424
|
+
| 'invalid_amount'
|
|
425
|
+
| 'invalid_time'
|
|
426
|
+
| 'duplicate_transaction'
|
|
427
|
+
| 'payee_verification_failed'
|
|
428
|
+
| 'system_error'
|
|
429
|
+
| 'provider_system_error'
|
|
430
|
+
| 'rejected_by_correspondent_bank'
|
|
431
|
+
| 'blocked_by_review'
|
|
432
|
+
| 'unknown';
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* Human-readable description of the failure.
|
|
436
|
+
*/
|
|
437
|
+
message: string;
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* Whether the payout can be retried.
|
|
441
|
+
*/
|
|
442
|
+
retry: boolean;
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
export interface PayoutPaidWebhookEvent {
|
|
448
|
+
/**
|
|
449
|
+
* Unique identifier for the event. Stable across retries.
|
|
450
|
+
*/
|
|
451
|
+
id: string;
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* API version the payload was rendered at. Stable across retries and redeliveries.
|
|
455
|
+
*/
|
|
456
|
+
api_version: string;
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* ISO 8601 UTC timestamp when the event was created.
|
|
460
|
+
*/
|
|
461
|
+
date: string;
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* Full resource snapshot at the time of the event.
|
|
465
|
+
*/
|
|
466
|
+
payload: PayoutPaidWebhookEvent.Payload;
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* Event type in resource.action format.
|
|
470
|
+
*/
|
|
471
|
+
type: 'payout.paid';
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
export namespace PayoutPaidWebhookEvent {
|
|
475
|
+
/**
|
|
476
|
+
* Full resource snapshot at the time of the event.
|
|
477
|
+
*/
|
|
478
|
+
export interface Payload {
|
|
479
|
+
/**
|
|
480
|
+
* Unique identifier of the payout.
|
|
481
|
+
*/
|
|
482
|
+
id: string;
|
|
483
|
+
|
|
484
|
+
/**
|
|
485
|
+
* Amount as a string decimal (e.g. "100.50").
|
|
486
|
+
*/
|
|
487
|
+
amount: string;
|
|
488
|
+
|
|
489
|
+
/**
|
|
490
|
+
* ISO 8601 UTC timestamp when the payout was created.
|
|
491
|
+
*/
|
|
492
|
+
created_at: string;
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* Currency code (ISO 4217 currency code or crypto currency code).
|
|
496
|
+
*/
|
|
497
|
+
currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* Bank account or crypto wallet the payout was sent to.
|
|
501
|
+
*/
|
|
502
|
+
destination: Payload.UnionMember0 | Payload.UnionMember1 | Payload.UnionMember2 | Payload.UnionMember3;
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* Failure details when status is failed, otherwise null.
|
|
506
|
+
*/
|
|
507
|
+
failure: Payload.Failure | null;
|
|
508
|
+
|
|
509
|
+
/**
|
|
510
|
+
* Key-value pairs stored with the payout.
|
|
511
|
+
*/
|
|
512
|
+
metadata: { [key: string]: string };
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* Payment reference.
|
|
516
|
+
*/
|
|
517
|
+
reference: string;
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* ID of the account that was debited.
|
|
521
|
+
*/
|
|
522
|
+
source_account_id: string;
|
|
523
|
+
|
|
524
|
+
/**
|
|
525
|
+
* Current status of the payout.
|
|
526
|
+
*/
|
|
527
|
+
status: 'pending' | 'paid' | 'failed' | 'returned';
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* Resource type discriminator.
|
|
531
|
+
*/
|
|
532
|
+
type: 'payout';
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* ISO 8601 UTC timestamp when the payout was last updated.
|
|
536
|
+
*/
|
|
537
|
+
updated_at: string;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
export namespace Payload {
|
|
541
|
+
export interface UnionMember0 {
|
|
542
|
+
/**
|
|
543
|
+
* Name of the account holder.
|
|
544
|
+
*/
|
|
545
|
+
account_holder_name: string;
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* Bank Identifier Code, or null if not provided.
|
|
549
|
+
*/
|
|
550
|
+
bic: string | null;
|
|
551
|
+
|
|
552
|
+
/**
|
|
553
|
+
* International Bank Account Number.
|
|
554
|
+
*/
|
|
555
|
+
iban: string;
|
|
556
|
+
|
|
557
|
+
/**
|
|
558
|
+
* Discriminator for IBAN financial address.
|
|
559
|
+
*/
|
|
560
|
+
type: 'iban';
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
export interface UnionMember1 {
|
|
564
|
+
/**
|
|
565
|
+
* Name of the account holder.
|
|
566
|
+
*/
|
|
567
|
+
account_holder_name: string;
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* UK account number (8 digits).
|
|
571
|
+
*/
|
|
572
|
+
account_number: string;
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
* UK sort code (6 digits).
|
|
576
|
+
*/
|
|
577
|
+
sort_code: string;
|
|
578
|
+
|
|
579
|
+
/**
|
|
580
|
+
* Discriminator for UK sort code financial address.
|
|
581
|
+
*/
|
|
582
|
+
type: 'sort_code';
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
export interface UnionMember2 {
|
|
586
|
+
/**
|
|
587
|
+
* Name of the account holder.
|
|
588
|
+
*/
|
|
589
|
+
account_holder_name: string;
|
|
590
|
+
|
|
591
|
+
/**
|
|
592
|
+
* Bank account number.
|
|
593
|
+
*/
|
|
594
|
+
account_number: string;
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* ABA routing number (9 digits).
|
|
598
|
+
*/
|
|
599
|
+
routing_number: string;
|
|
600
|
+
|
|
601
|
+
/**
|
|
602
|
+
* Discriminator for ABA wire financial address.
|
|
603
|
+
*/
|
|
604
|
+
type: 'aba';
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
export interface UnionMember3 {
|
|
608
|
+
/**
|
|
609
|
+
* Wallet address on the specified blockchain.
|
|
610
|
+
*/
|
|
611
|
+
address: string;
|
|
612
|
+
|
|
613
|
+
/**
|
|
614
|
+
* Blockchain network for the crypto wallet.
|
|
615
|
+
*/
|
|
616
|
+
blockchain: 'ethereum' | 'solana' | 'polygon';
|
|
617
|
+
|
|
618
|
+
/**
|
|
619
|
+
* Discriminator for crypto wallet financial address.
|
|
620
|
+
*/
|
|
621
|
+
type: 'crypto_wallet';
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
/**
|
|
625
|
+
* Failure details when status is failed, otherwise null.
|
|
626
|
+
*/
|
|
627
|
+
export interface Failure {
|
|
628
|
+
/**
|
|
629
|
+
* Failure code.
|
|
630
|
+
*/
|
|
631
|
+
code:
|
|
632
|
+
| 'account_closed'
|
|
633
|
+
| 'account_blocked'
|
|
634
|
+
| 'insufficient_funds'
|
|
635
|
+
| 'invalid_account_format'
|
|
636
|
+
| 'invalid_instruction'
|
|
637
|
+
| 'invalid_amount'
|
|
638
|
+
| 'invalid_time'
|
|
639
|
+
| 'duplicate_transaction'
|
|
640
|
+
| 'payee_verification_failed'
|
|
641
|
+
| 'system_error'
|
|
642
|
+
| 'provider_system_error'
|
|
643
|
+
| 'rejected_by_correspondent_bank'
|
|
644
|
+
| 'blocked_by_review'
|
|
645
|
+
| 'unknown';
|
|
646
|
+
|
|
647
|
+
/**
|
|
648
|
+
* Human-readable description of the failure.
|
|
649
|
+
*/
|
|
650
|
+
message: string;
|
|
651
|
+
|
|
652
|
+
/**
|
|
653
|
+
* Whether the payout can be retried.
|
|
654
|
+
*/
|
|
655
|
+
retry: boolean;
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
export interface PayoutFailedWebhookEvent {
|
|
661
|
+
/**
|
|
662
|
+
* Unique identifier for the event. Stable across retries.
|
|
663
|
+
*/
|
|
664
|
+
id: string;
|
|
665
|
+
|
|
666
|
+
/**
|
|
667
|
+
* API version the payload was rendered at. Stable across retries and redeliveries.
|
|
668
|
+
*/
|
|
669
|
+
api_version: string;
|
|
670
|
+
|
|
671
|
+
/**
|
|
672
|
+
* ISO 8601 UTC timestamp when the event was created.
|
|
673
|
+
*/
|
|
674
|
+
date: string;
|
|
675
|
+
|
|
676
|
+
/**
|
|
677
|
+
* Full resource snapshot at the time of the event.
|
|
678
|
+
*/
|
|
679
|
+
payload: PayoutFailedWebhookEvent.Payload;
|
|
680
|
+
|
|
681
|
+
/**
|
|
682
|
+
* Event type in resource.action format.
|
|
683
|
+
*/
|
|
684
|
+
type: 'payout.failed';
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
export namespace PayoutFailedWebhookEvent {
|
|
688
|
+
/**
|
|
689
|
+
* Full resource snapshot at the time of the event.
|
|
690
|
+
*/
|
|
691
|
+
export interface Payload {
|
|
692
|
+
/**
|
|
693
|
+
* Unique identifier of the payout.
|
|
694
|
+
*/
|
|
695
|
+
id: string;
|
|
696
|
+
|
|
697
|
+
/**
|
|
698
|
+
* Amount as a string decimal (e.g. "100.50").
|
|
699
|
+
*/
|
|
700
|
+
amount: string;
|
|
701
|
+
|
|
702
|
+
/**
|
|
703
|
+
* ISO 8601 UTC timestamp when the payout was created.
|
|
704
|
+
*/
|
|
705
|
+
created_at: string;
|
|
706
|
+
|
|
707
|
+
/**
|
|
708
|
+
* Currency code (ISO 4217 currency code or crypto currency code).
|
|
709
|
+
*/
|
|
710
|
+
currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
|
|
711
|
+
|
|
712
|
+
/**
|
|
713
|
+
* Bank account or crypto wallet the payout was sent to.
|
|
714
|
+
*/
|
|
715
|
+
destination: Payload.UnionMember0 | Payload.UnionMember1 | Payload.UnionMember2 | Payload.UnionMember3;
|
|
716
|
+
|
|
717
|
+
/**
|
|
718
|
+
* Failure details when status is failed, otherwise null.
|
|
719
|
+
*/
|
|
720
|
+
failure: Payload.Failure | null;
|
|
721
|
+
|
|
722
|
+
/**
|
|
723
|
+
* Key-value pairs stored with the payout.
|
|
724
|
+
*/
|
|
725
|
+
metadata: { [key: string]: string };
|
|
726
|
+
|
|
727
|
+
/**
|
|
728
|
+
* Payment reference.
|
|
729
|
+
*/
|
|
730
|
+
reference: string;
|
|
731
|
+
|
|
732
|
+
/**
|
|
733
|
+
* ID of the account that was debited.
|
|
734
|
+
*/
|
|
735
|
+
source_account_id: string;
|
|
736
|
+
|
|
737
|
+
/**
|
|
738
|
+
* Current status of the payout.
|
|
739
|
+
*/
|
|
740
|
+
status: 'pending' | 'paid' | 'failed' | 'returned';
|
|
741
|
+
|
|
742
|
+
/**
|
|
743
|
+
* Resource type discriminator.
|
|
744
|
+
*/
|
|
745
|
+
type: 'payout';
|
|
746
|
+
|
|
747
|
+
/**
|
|
748
|
+
* ISO 8601 UTC timestamp when the payout was last updated.
|
|
749
|
+
*/
|
|
750
|
+
updated_at: string;
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
export namespace Payload {
|
|
754
|
+
export interface UnionMember0 {
|
|
755
|
+
/**
|
|
756
|
+
* Name of the account holder.
|
|
757
|
+
*/
|
|
758
|
+
account_holder_name: string;
|
|
759
|
+
|
|
760
|
+
/**
|
|
761
|
+
* Bank Identifier Code, or null if not provided.
|
|
762
|
+
*/
|
|
763
|
+
bic: string | null;
|
|
764
|
+
|
|
765
|
+
/**
|
|
766
|
+
* International Bank Account Number.
|
|
767
|
+
*/
|
|
768
|
+
iban: string;
|
|
769
|
+
|
|
770
|
+
/**
|
|
771
|
+
* Discriminator for IBAN financial address.
|
|
772
|
+
*/
|
|
773
|
+
type: 'iban';
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
export interface UnionMember1 {
|
|
777
|
+
/**
|
|
778
|
+
* Name of the account holder.
|
|
779
|
+
*/
|
|
780
|
+
account_holder_name: string;
|
|
781
|
+
|
|
782
|
+
/**
|
|
783
|
+
* UK account number (8 digits).
|
|
784
|
+
*/
|
|
785
|
+
account_number: string;
|
|
786
|
+
|
|
787
|
+
/**
|
|
788
|
+
* UK sort code (6 digits).
|
|
789
|
+
*/
|
|
790
|
+
sort_code: string;
|
|
791
|
+
|
|
792
|
+
/**
|
|
793
|
+
* Discriminator for UK sort code financial address.
|
|
794
|
+
*/
|
|
795
|
+
type: 'sort_code';
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
export interface UnionMember2 {
|
|
799
|
+
/**
|
|
800
|
+
* Name of the account holder.
|
|
801
|
+
*/
|
|
802
|
+
account_holder_name: string;
|
|
803
|
+
|
|
804
|
+
/**
|
|
805
|
+
* Bank account number.
|
|
806
|
+
*/
|
|
807
|
+
account_number: string;
|
|
808
|
+
|
|
809
|
+
/**
|
|
810
|
+
* ABA routing number (9 digits).
|
|
811
|
+
*/
|
|
812
|
+
routing_number: string;
|
|
813
|
+
|
|
814
|
+
/**
|
|
815
|
+
* Discriminator for ABA wire financial address.
|
|
816
|
+
*/
|
|
817
|
+
type: 'aba';
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
export interface UnionMember3 {
|
|
821
|
+
/**
|
|
822
|
+
* Wallet address on the specified blockchain.
|
|
823
|
+
*/
|
|
824
|
+
address: string;
|
|
825
|
+
|
|
826
|
+
/**
|
|
827
|
+
* Blockchain network for the crypto wallet.
|
|
828
|
+
*/
|
|
829
|
+
blockchain: 'ethereum' | 'solana' | 'polygon';
|
|
830
|
+
|
|
831
|
+
/**
|
|
832
|
+
* Discriminator for crypto wallet financial address.
|
|
833
|
+
*/
|
|
834
|
+
type: 'crypto_wallet';
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
/**
|
|
838
|
+
* Failure details when status is failed, otherwise null.
|
|
839
|
+
*/
|
|
840
|
+
export interface Failure {
|
|
841
|
+
/**
|
|
842
|
+
* Failure code.
|
|
843
|
+
*/
|
|
844
|
+
code:
|
|
845
|
+
| 'account_closed'
|
|
846
|
+
| 'account_blocked'
|
|
847
|
+
| 'insufficient_funds'
|
|
848
|
+
| 'invalid_account_format'
|
|
849
|
+
| 'invalid_instruction'
|
|
850
|
+
| 'invalid_amount'
|
|
851
|
+
| 'invalid_time'
|
|
852
|
+
| 'duplicate_transaction'
|
|
853
|
+
| 'payee_verification_failed'
|
|
854
|
+
| 'system_error'
|
|
855
|
+
| 'provider_system_error'
|
|
856
|
+
| 'rejected_by_correspondent_bank'
|
|
857
|
+
| 'blocked_by_review'
|
|
858
|
+
| 'unknown';
|
|
859
|
+
|
|
860
|
+
/**
|
|
861
|
+
* Human-readable description of the failure.
|
|
862
|
+
*/
|
|
863
|
+
message: string;
|
|
864
|
+
|
|
865
|
+
/**
|
|
866
|
+
* Whether the payout can be retried.
|
|
867
|
+
*/
|
|
868
|
+
retry: boolean;
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
export interface ReturnInitiatedWebhookEvent {
|
|
874
|
+
/**
|
|
875
|
+
* Unique identifier for the event. Stable across retries.
|
|
876
|
+
*/
|
|
877
|
+
id: string;
|
|
878
|
+
|
|
879
|
+
/**
|
|
880
|
+
* API version the payload was rendered at. Stable across retries and redeliveries.
|
|
881
|
+
*/
|
|
882
|
+
api_version: string;
|
|
883
|
+
|
|
884
|
+
/**
|
|
885
|
+
* ISO 8601 UTC timestamp when the event was created.
|
|
886
|
+
*/
|
|
887
|
+
date: string;
|
|
888
|
+
|
|
889
|
+
/**
|
|
890
|
+
* Full resource snapshot at the time of the event.
|
|
891
|
+
*/
|
|
892
|
+
payload: ReturnInitiatedWebhookEvent.Payload;
|
|
893
|
+
|
|
894
|
+
/**
|
|
895
|
+
* Event type in resource.action format.
|
|
896
|
+
*/
|
|
897
|
+
type: 'return.initiated';
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
export namespace ReturnInitiatedWebhookEvent {
|
|
901
|
+
/**
|
|
902
|
+
* Full resource snapshot at the time of the event.
|
|
903
|
+
*/
|
|
904
|
+
export interface Payload {
|
|
905
|
+
/**
|
|
906
|
+
* Unique identifier of the return.
|
|
907
|
+
*/
|
|
908
|
+
id: string;
|
|
909
|
+
|
|
910
|
+
/**
|
|
911
|
+
* Amount as a string decimal (e.g. "100.50").
|
|
912
|
+
*/
|
|
913
|
+
amount: string;
|
|
914
|
+
|
|
915
|
+
/**
|
|
916
|
+
* ISO 8601 UTC timestamp when the return was created.
|
|
917
|
+
*/
|
|
918
|
+
created_at: string;
|
|
919
|
+
|
|
920
|
+
/**
|
|
921
|
+
* Currency code (ISO 4217 currency code or crypto currency code).
|
|
922
|
+
*/
|
|
923
|
+
currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
|
|
924
|
+
|
|
925
|
+
/**
|
|
926
|
+
* ID of the parent deposit.
|
|
927
|
+
*/
|
|
928
|
+
deposit_id: string;
|
|
929
|
+
|
|
930
|
+
/**
|
|
931
|
+
* Failure details when status is failed, otherwise null.
|
|
932
|
+
*/
|
|
933
|
+
failure: Payload.Failure | null;
|
|
934
|
+
|
|
935
|
+
/**
|
|
936
|
+
* Current status of the return.
|
|
937
|
+
*/
|
|
938
|
+
status: 'pending' | 'paid' | 'failed' | 'returned';
|
|
939
|
+
|
|
940
|
+
/**
|
|
941
|
+
* Type of the resource.
|
|
942
|
+
*/
|
|
943
|
+
type: 'return';
|
|
944
|
+
|
|
945
|
+
/**
|
|
946
|
+
* ISO 8601 UTC timestamp when the return was last updated.
|
|
947
|
+
*/
|
|
948
|
+
updated_at: string;
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
export namespace Payload {
|
|
952
|
+
/**
|
|
953
|
+
* Failure details when status is failed, otherwise null.
|
|
954
|
+
*/
|
|
955
|
+
export interface Failure {
|
|
956
|
+
/**
|
|
957
|
+
* Failure code.
|
|
958
|
+
*/
|
|
959
|
+
code:
|
|
960
|
+
| 'account_closed'
|
|
961
|
+
| 'account_blocked'
|
|
962
|
+
| 'insufficient_funds'
|
|
963
|
+
| 'invalid_account_format'
|
|
964
|
+
| 'invalid_instruction'
|
|
965
|
+
| 'invalid_amount'
|
|
966
|
+
| 'invalid_time'
|
|
967
|
+
| 'duplicate_transaction'
|
|
968
|
+
| 'payee_verification_failed'
|
|
969
|
+
| 'system_error'
|
|
970
|
+
| 'provider_system_error'
|
|
971
|
+
| 'rejected_by_correspondent_bank'
|
|
972
|
+
| 'blocked_by_review'
|
|
973
|
+
| 'unknown';
|
|
974
|
+
|
|
975
|
+
/**
|
|
976
|
+
* Human-readable description of the failure.
|
|
977
|
+
*/
|
|
978
|
+
message: string;
|
|
979
|
+
|
|
980
|
+
/**
|
|
981
|
+
* Whether the return can be retried.
|
|
982
|
+
*/
|
|
983
|
+
retry: boolean;
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
export interface ReturnPaidWebhookEvent {
|
|
989
|
+
/**
|
|
990
|
+
* Unique identifier for the event. Stable across retries.
|
|
991
|
+
*/
|
|
992
|
+
id: string;
|
|
993
|
+
|
|
994
|
+
/**
|
|
995
|
+
* API version the payload was rendered at. Stable across retries and redeliveries.
|
|
996
|
+
*/
|
|
997
|
+
api_version: string;
|
|
998
|
+
|
|
999
|
+
/**
|
|
1000
|
+
* ISO 8601 UTC timestamp when the event was created.
|
|
1001
|
+
*/
|
|
1002
|
+
date: string;
|
|
1003
|
+
|
|
1004
|
+
/**
|
|
1005
|
+
* Full resource snapshot at the time of the event.
|
|
1006
|
+
*/
|
|
1007
|
+
payload: ReturnPaidWebhookEvent.Payload;
|
|
1008
|
+
|
|
1009
|
+
/**
|
|
1010
|
+
* Event type in resource.action format.
|
|
1011
|
+
*/
|
|
1012
|
+
type: 'return.paid';
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
export namespace ReturnPaidWebhookEvent {
|
|
1016
|
+
/**
|
|
1017
|
+
* Full resource snapshot at the time of the event.
|
|
1018
|
+
*/
|
|
1019
|
+
export interface Payload {
|
|
1020
|
+
/**
|
|
1021
|
+
* Unique identifier of the return.
|
|
1022
|
+
*/
|
|
1023
|
+
id: string;
|
|
1024
|
+
|
|
1025
|
+
/**
|
|
1026
|
+
* Amount as a string decimal (e.g. "100.50").
|
|
1027
|
+
*/
|
|
1028
|
+
amount: string;
|
|
1029
|
+
|
|
1030
|
+
/**
|
|
1031
|
+
* ISO 8601 UTC timestamp when the return was created.
|
|
1032
|
+
*/
|
|
1033
|
+
created_at: string;
|
|
1034
|
+
|
|
1035
|
+
/**
|
|
1036
|
+
* Currency code (ISO 4217 currency code or crypto currency code).
|
|
1037
|
+
*/
|
|
1038
|
+
currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
|
|
1039
|
+
|
|
1040
|
+
/**
|
|
1041
|
+
* ID of the parent deposit.
|
|
1042
|
+
*/
|
|
1043
|
+
deposit_id: string;
|
|
1044
|
+
|
|
1045
|
+
/**
|
|
1046
|
+
* Failure details when status is failed, otherwise null.
|
|
1047
|
+
*/
|
|
1048
|
+
failure: Payload.Failure | null;
|
|
1049
|
+
|
|
1050
|
+
/**
|
|
1051
|
+
* Current status of the return.
|
|
1052
|
+
*/
|
|
1053
|
+
status: 'pending' | 'paid' | 'failed' | 'returned';
|
|
1054
|
+
|
|
1055
|
+
/**
|
|
1056
|
+
* Type of the resource.
|
|
1057
|
+
*/
|
|
1058
|
+
type: 'return';
|
|
1059
|
+
|
|
1060
|
+
/**
|
|
1061
|
+
* ISO 8601 UTC timestamp when the return was last updated.
|
|
1062
|
+
*/
|
|
1063
|
+
updated_at: string;
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
export namespace Payload {
|
|
1067
|
+
/**
|
|
1068
|
+
* Failure details when status is failed, otherwise null.
|
|
1069
|
+
*/
|
|
1070
|
+
export interface Failure {
|
|
1071
|
+
/**
|
|
1072
|
+
* Failure code.
|
|
1073
|
+
*/
|
|
1074
|
+
code:
|
|
1075
|
+
| 'account_closed'
|
|
1076
|
+
| 'account_blocked'
|
|
1077
|
+
| 'insufficient_funds'
|
|
1078
|
+
| 'invalid_account_format'
|
|
1079
|
+
| 'invalid_instruction'
|
|
1080
|
+
| 'invalid_amount'
|
|
1081
|
+
| 'invalid_time'
|
|
1082
|
+
| 'duplicate_transaction'
|
|
1083
|
+
| 'payee_verification_failed'
|
|
1084
|
+
| 'system_error'
|
|
1085
|
+
| 'provider_system_error'
|
|
1086
|
+
| 'rejected_by_correspondent_bank'
|
|
1087
|
+
| 'blocked_by_review'
|
|
1088
|
+
| 'unknown';
|
|
1089
|
+
|
|
1090
|
+
/**
|
|
1091
|
+
* Human-readable description of the failure.
|
|
1092
|
+
*/
|
|
1093
|
+
message: string;
|
|
1094
|
+
|
|
1095
|
+
/**
|
|
1096
|
+
* Whether the return can be retried.
|
|
1097
|
+
*/
|
|
1098
|
+
retry: boolean;
|
|
1099
|
+
}
|
|
1100
|
+
}
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
export interface ReturnFailedWebhookEvent {
|
|
1104
|
+
/**
|
|
1105
|
+
* Unique identifier for the event. Stable across retries.
|
|
1106
|
+
*/
|
|
1107
|
+
id: string;
|
|
1108
|
+
|
|
1109
|
+
/**
|
|
1110
|
+
* API version the payload was rendered at. Stable across retries and redeliveries.
|
|
1111
|
+
*/
|
|
1112
|
+
api_version: string;
|
|
1113
|
+
|
|
1114
|
+
/**
|
|
1115
|
+
* ISO 8601 UTC timestamp when the event was created.
|
|
1116
|
+
*/
|
|
1117
|
+
date: string;
|
|
1118
|
+
|
|
1119
|
+
/**
|
|
1120
|
+
* Full resource snapshot at the time of the event.
|
|
1121
|
+
*/
|
|
1122
|
+
payload: ReturnFailedWebhookEvent.Payload;
|
|
1123
|
+
|
|
1124
|
+
/**
|
|
1125
|
+
* Event type in resource.action format.
|
|
1126
|
+
*/
|
|
1127
|
+
type: 'return.failed';
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1130
|
+
export namespace ReturnFailedWebhookEvent {
|
|
1131
|
+
/**
|
|
1132
|
+
* Full resource snapshot at the time of the event.
|
|
1133
|
+
*/
|
|
1134
|
+
export interface Payload {
|
|
1135
|
+
/**
|
|
1136
|
+
* Unique identifier of the return.
|
|
1137
|
+
*/
|
|
1138
|
+
id: string;
|
|
1139
|
+
|
|
1140
|
+
/**
|
|
1141
|
+
* Amount as a string decimal (e.g. "100.50").
|
|
1142
|
+
*/
|
|
1143
|
+
amount: string;
|
|
1144
|
+
|
|
1145
|
+
/**
|
|
1146
|
+
* ISO 8601 UTC timestamp when the return was created.
|
|
1147
|
+
*/
|
|
1148
|
+
created_at: string;
|
|
1149
|
+
|
|
1150
|
+
/**
|
|
1151
|
+
* Currency code (ISO 4217 currency code or crypto currency code).
|
|
1152
|
+
*/
|
|
1153
|
+
currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
|
|
1154
|
+
|
|
1155
|
+
/**
|
|
1156
|
+
* ID of the parent deposit.
|
|
1157
|
+
*/
|
|
1158
|
+
deposit_id: string;
|
|
1159
|
+
|
|
1160
|
+
/**
|
|
1161
|
+
* Failure details when status is failed, otherwise null.
|
|
1162
|
+
*/
|
|
1163
|
+
failure: Payload.Failure | null;
|
|
1164
|
+
|
|
1165
|
+
/**
|
|
1166
|
+
* Current status of the return.
|
|
1167
|
+
*/
|
|
1168
|
+
status: 'pending' | 'paid' | 'failed' | 'returned';
|
|
1169
|
+
|
|
1170
|
+
/**
|
|
1171
|
+
* Type of the resource.
|
|
1172
|
+
*/
|
|
1173
|
+
type: 'return';
|
|
1174
|
+
|
|
1175
|
+
/**
|
|
1176
|
+
* ISO 8601 UTC timestamp when the return was last updated.
|
|
1177
|
+
*/
|
|
1178
|
+
updated_at: string;
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
export namespace Payload {
|
|
1182
|
+
/**
|
|
1183
|
+
* Failure details when status is failed, otherwise null.
|
|
1184
|
+
*/
|
|
1185
|
+
export interface Failure {
|
|
1186
|
+
/**
|
|
1187
|
+
* Failure code.
|
|
1188
|
+
*/
|
|
1189
|
+
code:
|
|
1190
|
+
| 'account_closed'
|
|
1191
|
+
| 'account_blocked'
|
|
1192
|
+
| 'insufficient_funds'
|
|
1193
|
+
| 'invalid_account_format'
|
|
1194
|
+
| 'invalid_instruction'
|
|
1195
|
+
| 'invalid_amount'
|
|
1196
|
+
| 'invalid_time'
|
|
1197
|
+
| 'duplicate_transaction'
|
|
1198
|
+
| 'payee_verification_failed'
|
|
1199
|
+
| 'system_error'
|
|
1200
|
+
| 'provider_system_error'
|
|
1201
|
+
| 'rejected_by_correspondent_bank'
|
|
1202
|
+
| 'blocked_by_review'
|
|
1203
|
+
| 'unknown';
|
|
1204
|
+
|
|
1205
|
+
/**
|
|
1206
|
+
* Human-readable description of the failure.
|
|
1207
|
+
*/
|
|
1208
|
+
message: string;
|
|
1209
|
+
|
|
1210
|
+
/**
|
|
1211
|
+
* Whether the return can be retried.
|
|
1212
|
+
*/
|
|
1213
|
+
retry: boolean;
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
|
|
1218
|
+
export interface ReturnReturnedWebhookEvent {
|
|
1219
|
+
/**
|
|
1220
|
+
* Unique identifier for the event. Stable across retries.
|
|
1221
|
+
*/
|
|
1222
|
+
id: string;
|
|
1223
|
+
|
|
1224
|
+
/**
|
|
1225
|
+
* API version the payload was rendered at. Stable across retries and redeliveries.
|
|
1226
|
+
*/
|
|
1227
|
+
api_version: string;
|
|
1228
|
+
|
|
1229
|
+
/**
|
|
1230
|
+
* ISO 8601 UTC timestamp when the event was created.
|
|
1231
|
+
*/
|
|
1232
|
+
date: string;
|
|
1233
|
+
|
|
1234
|
+
/**
|
|
1235
|
+
* Full resource snapshot at the time of the event.
|
|
1236
|
+
*/
|
|
1237
|
+
payload: ReturnReturnedWebhookEvent.Payload;
|
|
1238
|
+
|
|
1239
|
+
/**
|
|
1240
|
+
* Event type in resource.action format.
|
|
1241
|
+
*/
|
|
1242
|
+
type: 'return.returned';
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
export namespace ReturnReturnedWebhookEvent {
|
|
1246
|
+
/**
|
|
1247
|
+
* Full resource snapshot at the time of the event.
|
|
1248
|
+
*/
|
|
1249
|
+
export interface Payload {
|
|
1250
|
+
/**
|
|
1251
|
+
* Unique identifier of the return.
|
|
1252
|
+
*/
|
|
1253
|
+
id: string;
|
|
1254
|
+
|
|
1255
|
+
/**
|
|
1256
|
+
* Amount as a string decimal (e.g. "100.50").
|
|
1257
|
+
*/
|
|
1258
|
+
amount: string;
|
|
1259
|
+
|
|
1260
|
+
/**
|
|
1261
|
+
* ISO 8601 UTC timestamp when the return was created.
|
|
1262
|
+
*/
|
|
1263
|
+
created_at: string;
|
|
1264
|
+
|
|
1265
|
+
/**
|
|
1266
|
+
* Currency code (ISO 4217 currency code or crypto currency code).
|
|
1267
|
+
*/
|
|
1268
|
+
currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
|
|
1269
|
+
|
|
1270
|
+
/**
|
|
1271
|
+
* ID of the parent deposit.
|
|
1272
|
+
*/
|
|
1273
|
+
deposit_id: string;
|
|
1274
|
+
|
|
1275
|
+
/**
|
|
1276
|
+
* Failure details when status is failed, otherwise null.
|
|
1277
|
+
*/
|
|
1278
|
+
failure: Payload.Failure | null;
|
|
1279
|
+
|
|
1280
|
+
/**
|
|
1281
|
+
* Current status of the return.
|
|
1282
|
+
*/
|
|
1283
|
+
status: 'pending' | 'paid' | 'failed' | 'returned';
|
|
1284
|
+
|
|
1285
|
+
/**
|
|
1286
|
+
* Type of the resource.
|
|
1287
|
+
*/
|
|
1288
|
+
type: 'return';
|
|
1289
|
+
|
|
1290
|
+
/**
|
|
1291
|
+
* ISO 8601 UTC timestamp when the return was last updated.
|
|
1292
|
+
*/
|
|
1293
|
+
updated_at: string;
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
export namespace Payload {
|
|
1297
|
+
/**
|
|
1298
|
+
* Failure details when status is failed, otherwise null.
|
|
1299
|
+
*/
|
|
1300
|
+
export interface Failure {
|
|
1301
|
+
/**
|
|
1302
|
+
* Failure code.
|
|
1303
|
+
*/
|
|
1304
|
+
code:
|
|
1305
|
+
| 'account_closed'
|
|
1306
|
+
| 'account_blocked'
|
|
1307
|
+
| 'insufficient_funds'
|
|
1308
|
+
| 'invalid_account_format'
|
|
1309
|
+
| 'invalid_instruction'
|
|
1310
|
+
| 'invalid_amount'
|
|
1311
|
+
| 'invalid_time'
|
|
1312
|
+
| 'duplicate_transaction'
|
|
1313
|
+
| 'payee_verification_failed'
|
|
1314
|
+
| 'system_error'
|
|
1315
|
+
| 'provider_system_error'
|
|
1316
|
+
| 'rejected_by_correspondent_bank'
|
|
1317
|
+
| 'blocked_by_review'
|
|
1318
|
+
| 'unknown';
|
|
1319
|
+
|
|
1320
|
+
/**
|
|
1321
|
+
* Human-readable description of the failure.
|
|
1322
|
+
*/
|
|
1323
|
+
message: string;
|
|
1324
|
+
|
|
1325
|
+
/**
|
|
1326
|
+
* Whether the return can be retried.
|
|
1327
|
+
*/
|
|
1328
|
+
retry: boolean;
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
export interface DepositReceivedWebhookEvent {
|
|
1334
|
+
/**
|
|
1335
|
+
* Unique identifier for the event. Stable across retries.
|
|
1336
|
+
*/
|
|
1337
|
+
id: string;
|
|
1338
|
+
|
|
1339
|
+
/**
|
|
1340
|
+
* API version the payload was rendered at. Stable across retries and redeliveries.
|
|
1341
|
+
*/
|
|
1342
|
+
api_version: string;
|
|
1343
|
+
|
|
1344
|
+
/**
|
|
1345
|
+
* ISO 8601 UTC timestamp when the event was created.
|
|
1346
|
+
*/
|
|
1347
|
+
date: string;
|
|
1348
|
+
|
|
1349
|
+
/**
|
|
1350
|
+
* Full resource snapshot at the time of the event.
|
|
1351
|
+
*/
|
|
1352
|
+
payload: DepositReceivedWebhookEvent.Payload;
|
|
1353
|
+
|
|
1354
|
+
/**
|
|
1355
|
+
* Event type in resource.action format.
|
|
1356
|
+
*/
|
|
1357
|
+
type: 'deposit.received';
|
|
1358
|
+
}
|
|
1359
|
+
|
|
1360
|
+
export namespace DepositReceivedWebhookEvent {
|
|
1361
|
+
/**
|
|
1362
|
+
* Full resource snapshot at the time of the event.
|
|
1363
|
+
*/
|
|
1364
|
+
export interface Payload {
|
|
1365
|
+
/**
|
|
1366
|
+
* Unique identifier of the deposit.
|
|
1367
|
+
*/
|
|
1368
|
+
id: string;
|
|
1369
|
+
|
|
1370
|
+
/**
|
|
1371
|
+
* Amount as a string decimal (e.g. "100.50").
|
|
1372
|
+
*/
|
|
1373
|
+
amount: string;
|
|
1374
|
+
|
|
1375
|
+
/**
|
|
1376
|
+
* Reference visible on the bank statement, or null when not applicable.
|
|
1377
|
+
*/
|
|
1378
|
+
bank_statement_reference: string | null;
|
|
1379
|
+
|
|
1380
|
+
/**
|
|
1381
|
+
* ISO 8601 UTC timestamp when the deposit was created.
|
|
1382
|
+
*/
|
|
1383
|
+
created_at: string;
|
|
1384
|
+
|
|
1385
|
+
/**
|
|
1386
|
+
* Supported fiat or crypto currency code for the deposit amount.
|
|
1387
|
+
*/
|
|
1388
|
+
currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
|
|
1389
|
+
|
|
1390
|
+
/**
|
|
1391
|
+
* ID of the merchant account that received the deposit.
|
|
1392
|
+
*/
|
|
1393
|
+
destination_account_id: string;
|
|
1394
|
+
|
|
1395
|
+
/**
|
|
1396
|
+
* Payment rail or blockchain used for the deposit.
|
|
1397
|
+
*/
|
|
1398
|
+
rail:
|
|
1399
|
+
| 'sepa_instant'
|
|
1400
|
+
| 'faster_payments'
|
|
1401
|
+
| 'sepa'
|
|
1402
|
+
| 'elixir'
|
|
1403
|
+
| 'express_elixir'
|
|
1404
|
+
| 'sek_account_to_account'
|
|
1405
|
+
| 'sumclearing'
|
|
1406
|
+
| 'straksclearing'
|
|
1407
|
+
| 'swift'
|
|
1408
|
+
| 'internal'
|
|
1409
|
+
| 'target'
|
|
1410
|
+
| 'eth'
|
|
1411
|
+
| 'eth_sepolia'
|
|
1412
|
+
| 'sol'
|
|
1413
|
+
| 'sol_devnet'
|
|
1414
|
+
| 'matic'
|
|
1415
|
+
| 'matic_amoy'
|
|
1416
|
+
| null;
|
|
1417
|
+
|
|
1418
|
+
/**
|
|
1419
|
+
* Array of deposit return IDs associated with this deposit.
|
|
1420
|
+
*/
|
|
1421
|
+
returns: Array<string>;
|
|
1422
|
+
|
|
1423
|
+
/**
|
|
1424
|
+
* Counterparty bank account or crypto wallet that sent the funds.
|
|
1425
|
+
*/
|
|
1426
|
+
source: Payload.UnionMember0 | Payload.UnionMember1 | Payload.UnionMember2;
|
|
1427
|
+
|
|
1428
|
+
/**
|
|
1429
|
+
* Current status of the deposit.
|
|
1430
|
+
*/
|
|
1431
|
+
status: 'received' | 'rejected' | 'in_return' | 'returned' | 'return_failed' | 'return_returned';
|
|
1432
|
+
|
|
1433
|
+
/**
|
|
1434
|
+
* Transaction hash for crypto deposits, or null when not known.
|
|
1435
|
+
*/
|
|
1436
|
+
tx_hash: string | null;
|
|
1437
|
+
|
|
1438
|
+
/**
|
|
1439
|
+
* Resource type discriminator.
|
|
1440
|
+
*/
|
|
1441
|
+
type: 'deposit';
|
|
1442
|
+
|
|
1443
|
+
/**
|
|
1444
|
+
* ISO 8601 UTC timestamp when the deposit was last updated.
|
|
1445
|
+
*/
|
|
1446
|
+
updated_at: string;
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1449
|
+
export namespace Payload {
|
|
1450
|
+
export interface UnionMember0 {
|
|
1451
|
+
/**
|
|
1452
|
+
* Name of the account holder.
|
|
1453
|
+
*/
|
|
1454
|
+
account_holder_name: string;
|
|
1455
|
+
|
|
1456
|
+
/**
|
|
1457
|
+
* Bank Identifier Code, or null if not provided.
|
|
1458
|
+
*/
|
|
1459
|
+
bic: string | null;
|
|
1460
|
+
|
|
1461
|
+
/**
|
|
1462
|
+
* International Bank Account Number.
|
|
1463
|
+
*/
|
|
1464
|
+
iban: string;
|
|
1465
|
+
|
|
1466
|
+
/**
|
|
1467
|
+
* Discriminator for IBAN source.
|
|
1468
|
+
*/
|
|
1469
|
+
type: 'iban';
|
|
1470
|
+
}
|
|
1471
|
+
|
|
1472
|
+
export interface UnionMember1 {
|
|
1473
|
+
/**
|
|
1474
|
+
* Name of the account holder.
|
|
1475
|
+
*/
|
|
1476
|
+
account_holder_name: string;
|
|
1477
|
+
|
|
1478
|
+
/**
|
|
1479
|
+
* UK account number (8 digits).
|
|
1480
|
+
*/
|
|
1481
|
+
account_number: string;
|
|
1482
|
+
|
|
1483
|
+
/**
|
|
1484
|
+
* UK sort code (6 digits).
|
|
1485
|
+
*/
|
|
1486
|
+
sort_code: string;
|
|
1487
|
+
|
|
1488
|
+
/**
|
|
1489
|
+
* Discriminator for UK sort code source.
|
|
1490
|
+
*/
|
|
1491
|
+
type: 'sort_code';
|
|
1492
|
+
}
|
|
1493
|
+
|
|
1494
|
+
export interface UnionMember2 {
|
|
1495
|
+
/**
|
|
1496
|
+
* Wallet address on the specified blockchain.
|
|
1497
|
+
*/
|
|
1498
|
+
address: string;
|
|
1499
|
+
|
|
1500
|
+
/**
|
|
1501
|
+
* Blockchain network for the crypto wallet.
|
|
1502
|
+
*/
|
|
1503
|
+
blockchain: 'ethereum' | 'solana' | 'polygon';
|
|
1504
|
+
|
|
1505
|
+
/**
|
|
1506
|
+
* Discriminator for crypto wallet source.
|
|
1507
|
+
*/
|
|
1508
|
+
type: 'crypto_wallet';
|
|
1509
|
+
}
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1513
|
+
export interface ConversionCreatedWebhookEvent {
|
|
1514
|
+
/**
|
|
1515
|
+
* Unique identifier for the event. Stable across retries.
|
|
1516
|
+
*/
|
|
1517
|
+
id: string;
|
|
1518
|
+
|
|
1519
|
+
/**
|
|
1520
|
+
* API version the payload was rendered at. Stable across retries and redeliveries.
|
|
1521
|
+
*/
|
|
1522
|
+
api_version: string;
|
|
1523
|
+
|
|
1524
|
+
/**
|
|
1525
|
+
* ISO 8601 UTC timestamp when the event was created.
|
|
1526
|
+
*/
|
|
1527
|
+
date: string;
|
|
1528
|
+
|
|
1529
|
+
/**
|
|
1530
|
+
* Full resource snapshot at the time of the event.
|
|
1531
|
+
*/
|
|
1532
|
+
payload: ConversionCreatedWebhookEvent.Payload;
|
|
1533
|
+
|
|
1534
|
+
/**
|
|
1535
|
+
* Event type in resource.action format.
|
|
1536
|
+
*/
|
|
1537
|
+
type: 'conversion.created';
|
|
1538
|
+
}
|
|
1539
|
+
|
|
1540
|
+
export namespace ConversionCreatedWebhookEvent {
|
|
1541
|
+
/**
|
|
1542
|
+
* Full resource snapshot at the time of the event.
|
|
1543
|
+
*/
|
|
1544
|
+
export interface Payload {
|
|
1545
|
+
/**
|
|
1546
|
+
* Unique identifier of the conversion.
|
|
1547
|
+
*/
|
|
1548
|
+
id: string;
|
|
1549
|
+
|
|
1550
|
+
/**
|
|
1551
|
+
* ISO 8601 UTC timestamp when the conversion completed, or null.
|
|
1552
|
+
*/
|
|
1553
|
+
completed_at: string | null;
|
|
1554
|
+
|
|
1555
|
+
/**
|
|
1556
|
+
* ISO 8601 UTC timestamp when the conversion was created.
|
|
1557
|
+
*/
|
|
1558
|
+
created_at: string;
|
|
1559
|
+
|
|
1560
|
+
/**
|
|
1561
|
+
* Failure details when status is failed, otherwise null.
|
|
1562
|
+
*/
|
|
1563
|
+
failure: Payload.Failure | null;
|
|
1564
|
+
|
|
1565
|
+
/**
|
|
1566
|
+
* Key-value pairs stored with the conversion.
|
|
1567
|
+
*/
|
|
1568
|
+
metadata: { [key: string]: string };
|
|
1569
|
+
|
|
1570
|
+
/**
|
|
1571
|
+
* ID of the associated quote, or null.
|
|
1572
|
+
*/
|
|
1573
|
+
quote_id: string | null;
|
|
1574
|
+
|
|
1575
|
+
/**
|
|
1576
|
+
* ID of the source account, or null.
|
|
1577
|
+
*/
|
|
1578
|
+
source_account_id: string | null;
|
|
1579
|
+
|
|
1580
|
+
/**
|
|
1581
|
+
* Source amount as a string decimal.
|
|
1582
|
+
*/
|
|
1583
|
+
source_amount: string;
|
|
1584
|
+
|
|
1585
|
+
/**
|
|
1586
|
+
* Source currency code.
|
|
1587
|
+
*/
|
|
1588
|
+
source_currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
|
|
1589
|
+
|
|
1590
|
+
/**
|
|
1591
|
+
* Current status of the conversion.
|
|
1592
|
+
*/
|
|
1593
|
+
status: 'pending' | 'completed' | 'failed';
|
|
1594
|
+
|
|
1595
|
+
/**
|
|
1596
|
+
* ID of the target account, or null.
|
|
1597
|
+
*/
|
|
1598
|
+
target_account_id: string | null;
|
|
1599
|
+
|
|
1600
|
+
/**
|
|
1601
|
+
* Target currency code.
|
|
1602
|
+
*/
|
|
1603
|
+
target_currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
|
|
1604
|
+
|
|
1605
|
+
/**
|
|
1606
|
+
* Resource type discriminator.
|
|
1607
|
+
*/
|
|
1608
|
+
type: 'conversion';
|
|
1609
|
+
|
|
1610
|
+
/**
|
|
1611
|
+
* ISO 8601 UTC timestamp when the conversion was last updated.
|
|
1612
|
+
*/
|
|
1613
|
+
updated_at: string;
|
|
1614
|
+
}
|
|
1615
|
+
|
|
1616
|
+
export namespace Payload {
|
|
1617
|
+
/**
|
|
1618
|
+
* Failure details when status is failed, otherwise null.
|
|
1619
|
+
*/
|
|
1620
|
+
export interface Failure {
|
|
1621
|
+
/**
|
|
1622
|
+
* Human-readable description of the failure.
|
|
1623
|
+
*/
|
|
1624
|
+
message: string;
|
|
1625
|
+
}
|
|
1626
|
+
}
|
|
1627
|
+
}
|
|
1628
|
+
|
|
1629
|
+
export interface ConversionCompletedWebhookEvent {
|
|
1630
|
+
/**
|
|
1631
|
+
* Unique identifier for the event. Stable across retries.
|
|
1632
|
+
*/
|
|
1633
|
+
id: string;
|
|
1634
|
+
|
|
1635
|
+
/**
|
|
1636
|
+
* API version the payload was rendered at. Stable across retries and redeliveries.
|
|
1637
|
+
*/
|
|
1638
|
+
api_version: string;
|
|
1639
|
+
|
|
1640
|
+
/**
|
|
1641
|
+
* ISO 8601 UTC timestamp when the event was created.
|
|
1642
|
+
*/
|
|
1643
|
+
date: string;
|
|
1644
|
+
|
|
1645
|
+
/**
|
|
1646
|
+
* Full resource snapshot at the time of the event.
|
|
1647
|
+
*/
|
|
1648
|
+
payload: ConversionCompletedWebhookEvent.Payload;
|
|
1649
|
+
|
|
1650
|
+
/**
|
|
1651
|
+
* Event type in resource.action format.
|
|
1652
|
+
*/
|
|
1653
|
+
type: 'conversion.completed';
|
|
1654
|
+
}
|
|
1655
|
+
|
|
1656
|
+
export namespace ConversionCompletedWebhookEvent {
|
|
1657
|
+
/**
|
|
1658
|
+
* Full resource snapshot at the time of the event.
|
|
1659
|
+
*/
|
|
1660
|
+
export interface Payload {
|
|
1661
|
+
/**
|
|
1662
|
+
* Unique identifier of the conversion.
|
|
1663
|
+
*/
|
|
1664
|
+
id: string;
|
|
1665
|
+
|
|
1666
|
+
/**
|
|
1667
|
+
* ISO 8601 UTC timestamp when the conversion completed, or null.
|
|
1668
|
+
*/
|
|
1669
|
+
completed_at: string | null;
|
|
1670
|
+
|
|
1671
|
+
/**
|
|
1672
|
+
* ISO 8601 UTC timestamp when the conversion was created.
|
|
1673
|
+
*/
|
|
1674
|
+
created_at: string;
|
|
1675
|
+
|
|
1676
|
+
/**
|
|
1677
|
+
* Failure details when status is failed, otherwise null.
|
|
1678
|
+
*/
|
|
1679
|
+
failure: Payload.Failure | null;
|
|
1680
|
+
|
|
1681
|
+
/**
|
|
1682
|
+
* Key-value pairs stored with the conversion.
|
|
1683
|
+
*/
|
|
1684
|
+
metadata: { [key: string]: string };
|
|
1685
|
+
|
|
1686
|
+
/**
|
|
1687
|
+
* ID of the associated quote, or null.
|
|
1688
|
+
*/
|
|
1689
|
+
quote_id: string | null;
|
|
1690
|
+
|
|
1691
|
+
/**
|
|
1692
|
+
* ID of the source account, or null.
|
|
1693
|
+
*/
|
|
1694
|
+
source_account_id: string | null;
|
|
1695
|
+
|
|
1696
|
+
/**
|
|
1697
|
+
* Source amount as a string decimal.
|
|
1698
|
+
*/
|
|
1699
|
+
source_amount: string;
|
|
1700
|
+
|
|
1701
|
+
/**
|
|
1702
|
+
* Source currency code.
|
|
1703
|
+
*/
|
|
1704
|
+
source_currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
|
|
1705
|
+
|
|
1706
|
+
/**
|
|
1707
|
+
* Current status of the conversion.
|
|
1708
|
+
*/
|
|
1709
|
+
status: 'pending' | 'completed' | 'failed';
|
|
1710
|
+
|
|
1711
|
+
/**
|
|
1712
|
+
* ID of the target account, or null.
|
|
1713
|
+
*/
|
|
1714
|
+
target_account_id: string | null;
|
|
1715
|
+
|
|
1716
|
+
/**
|
|
1717
|
+
* Target currency code.
|
|
1718
|
+
*/
|
|
1719
|
+
target_currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
|
|
1720
|
+
|
|
1721
|
+
/**
|
|
1722
|
+
* Resource type discriminator.
|
|
1723
|
+
*/
|
|
1724
|
+
type: 'conversion';
|
|
1725
|
+
|
|
1726
|
+
/**
|
|
1727
|
+
* ISO 8601 UTC timestamp when the conversion was last updated.
|
|
1728
|
+
*/
|
|
1729
|
+
updated_at: string;
|
|
1730
|
+
}
|
|
1731
|
+
|
|
1732
|
+
export namespace Payload {
|
|
1733
|
+
/**
|
|
1734
|
+
* Failure details when status is failed, otherwise null.
|
|
1735
|
+
*/
|
|
1736
|
+
export interface Failure {
|
|
1737
|
+
/**
|
|
1738
|
+
* Human-readable description of the failure.
|
|
1739
|
+
*/
|
|
1740
|
+
message: string;
|
|
1741
|
+
}
|
|
1742
|
+
}
|
|
1743
|
+
}
|
|
1744
|
+
|
|
1745
|
+
export interface ConversionFailedWebhookEvent {
|
|
1746
|
+
/**
|
|
1747
|
+
* Unique identifier for the event. Stable across retries.
|
|
1748
|
+
*/
|
|
1749
|
+
id: string;
|
|
1750
|
+
|
|
1751
|
+
/**
|
|
1752
|
+
* API version the payload was rendered at. Stable across retries and redeliveries.
|
|
1753
|
+
*/
|
|
1754
|
+
api_version: string;
|
|
1755
|
+
|
|
1756
|
+
/**
|
|
1757
|
+
* ISO 8601 UTC timestamp when the event was created.
|
|
1758
|
+
*/
|
|
1759
|
+
date: string;
|
|
1760
|
+
|
|
1761
|
+
/**
|
|
1762
|
+
* Full resource snapshot at the time of the event.
|
|
1763
|
+
*/
|
|
1764
|
+
payload: ConversionFailedWebhookEvent.Payload;
|
|
1765
|
+
|
|
1766
|
+
/**
|
|
1767
|
+
* Event type in resource.action format.
|
|
1768
|
+
*/
|
|
1769
|
+
type: 'conversion.failed';
|
|
1770
|
+
}
|
|
1771
|
+
|
|
1772
|
+
export namespace ConversionFailedWebhookEvent {
|
|
1773
|
+
/**
|
|
1774
|
+
* Full resource snapshot at the time of the event.
|
|
1775
|
+
*/
|
|
1776
|
+
export interface Payload {
|
|
1777
|
+
/**
|
|
1778
|
+
* Unique identifier of the conversion.
|
|
1779
|
+
*/
|
|
1780
|
+
id: string;
|
|
1781
|
+
|
|
1782
|
+
/**
|
|
1783
|
+
* ISO 8601 UTC timestamp when the conversion completed, or null.
|
|
1784
|
+
*/
|
|
1785
|
+
completed_at: string | null;
|
|
1786
|
+
|
|
1787
|
+
/**
|
|
1788
|
+
* ISO 8601 UTC timestamp when the conversion was created.
|
|
1789
|
+
*/
|
|
1790
|
+
created_at: string;
|
|
1791
|
+
|
|
1792
|
+
/**
|
|
1793
|
+
* Failure details when status is failed, otherwise null.
|
|
1794
|
+
*/
|
|
1795
|
+
failure: Payload.Failure | null;
|
|
1796
|
+
|
|
1797
|
+
/**
|
|
1798
|
+
* Key-value pairs stored with the conversion.
|
|
1799
|
+
*/
|
|
1800
|
+
metadata: { [key: string]: string };
|
|
1801
|
+
|
|
1802
|
+
/**
|
|
1803
|
+
* ID of the associated quote, or null.
|
|
1804
|
+
*/
|
|
1805
|
+
quote_id: string | null;
|
|
1806
|
+
|
|
1807
|
+
/**
|
|
1808
|
+
* ID of the source account, or null.
|
|
1809
|
+
*/
|
|
1810
|
+
source_account_id: string | null;
|
|
1811
|
+
|
|
1812
|
+
/**
|
|
1813
|
+
* Source amount as a string decimal.
|
|
1814
|
+
*/
|
|
1815
|
+
source_amount: string;
|
|
1816
|
+
|
|
1817
|
+
/**
|
|
1818
|
+
* Source currency code.
|
|
1819
|
+
*/
|
|
1820
|
+
source_currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
|
|
1821
|
+
|
|
1822
|
+
/**
|
|
1823
|
+
* Current status of the conversion.
|
|
1824
|
+
*/
|
|
1825
|
+
status: 'pending' | 'completed' | 'failed';
|
|
1826
|
+
|
|
1827
|
+
/**
|
|
1828
|
+
* ID of the target account, or null.
|
|
1829
|
+
*/
|
|
1830
|
+
target_account_id: string | null;
|
|
1831
|
+
|
|
1832
|
+
/**
|
|
1833
|
+
* Target currency code.
|
|
1834
|
+
*/
|
|
1835
|
+
target_currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
|
|
1836
|
+
|
|
1837
|
+
/**
|
|
1838
|
+
* Resource type discriminator.
|
|
1839
|
+
*/
|
|
1840
|
+
type: 'conversion';
|
|
1841
|
+
|
|
1842
|
+
/**
|
|
1843
|
+
* ISO 8601 UTC timestamp when the conversion was last updated.
|
|
1844
|
+
*/
|
|
1845
|
+
updated_at: string;
|
|
1846
|
+
}
|
|
1847
|
+
|
|
1848
|
+
export namespace Payload {
|
|
1849
|
+
/**
|
|
1850
|
+
* Failure details when status is failed, otherwise null.
|
|
1851
|
+
*/
|
|
1852
|
+
export interface Failure {
|
|
1853
|
+
/**
|
|
1854
|
+
* Human-readable description of the failure.
|
|
1855
|
+
*/
|
|
1856
|
+
message: string;
|
|
1857
|
+
}
|
|
1858
|
+
}
|
|
1859
|
+
}
|
|
1860
|
+
|
|
1861
|
+
export interface PingTestWebhookEvent {
|
|
1862
|
+
/**
|
|
1863
|
+
* Unique identifier for the event. Stable across retries.
|
|
1864
|
+
*/
|
|
1865
|
+
id: string;
|
|
1866
|
+
|
|
1867
|
+
/**
|
|
1868
|
+
* API version the payload was rendered at. Stable across retries and redeliveries.
|
|
1869
|
+
*/
|
|
1870
|
+
api_version: string;
|
|
1871
|
+
|
|
1872
|
+
/**
|
|
1873
|
+
* ISO 8601 UTC timestamp when the event was created.
|
|
1874
|
+
*/
|
|
1875
|
+
date: string;
|
|
1876
|
+
|
|
1877
|
+
/**
|
|
1878
|
+
* Full resource snapshot at the time of the event.
|
|
1879
|
+
*/
|
|
1880
|
+
payload: PingTestWebhookEvent.Payload;
|
|
1881
|
+
|
|
1882
|
+
/**
|
|
1883
|
+
* Event type in resource.action format.
|
|
1884
|
+
*/
|
|
1885
|
+
type: 'ping.test';
|
|
1886
|
+
}
|
|
1887
|
+
|
|
1888
|
+
export namespace PingTestWebhookEvent {
|
|
1889
|
+
/**
|
|
1890
|
+
* Full resource snapshot at the time of the event.
|
|
1891
|
+
*/
|
|
1892
|
+
export interface Payload {
|
|
1893
|
+
/**
|
|
1894
|
+
* Unique identifier of the ping event.
|
|
1895
|
+
*/
|
|
1896
|
+
id: string;
|
|
1897
|
+
|
|
1898
|
+
/**
|
|
1899
|
+
* ISO 8601 UTC timestamp when the ping was dispatched.
|
|
1900
|
+
*/
|
|
1901
|
+
dispatched_at: string;
|
|
1902
|
+
|
|
1903
|
+
/**
|
|
1904
|
+
* Identifier of the merchant the ping was dispatched for.
|
|
1905
|
+
*/
|
|
1906
|
+
merchant_id: string;
|
|
1907
|
+
|
|
1908
|
+
/**
|
|
1909
|
+
* Human-readable notice that this event was generated by the test endpoint and
|
|
1910
|
+
* does not reflect any real business activity.
|
|
1911
|
+
*/
|
|
1912
|
+
message: string;
|
|
1913
|
+
|
|
1914
|
+
/**
|
|
1915
|
+
* Resource type discriminator.
|
|
1916
|
+
*/
|
|
1917
|
+
type: 'ping';
|
|
1918
|
+
}
|
|
1919
|
+
}
|
|
1920
|
+
|
|
1921
|
+
export type UnwrapWebhookEvent =
|
|
1922
|
+
| PayoutCreatedWebhookEvent
|
|
1923
|
+
| PayoutInitiatedWebhookEvent
|
|
1924
|
+
| PayoutPaidWebhookEvent
|
|
1925
|
+
| PayoutFailedWebhookEvent
|
|
1926
|
+
| ReturnInitiatedWebhookEvent
|
|
1927
|
+
| ReturnPaidWebhookEvent
|
|
1928
|
+
| ReturnFailedWebhookEvent
|
|
1929
|
+
| ReturnReturnedWebhookEvent
|
|
1930
|
+
| DepositReceivedWebhookEvent
|
|
1931
|
+
| ConversionCreatedWebhookEvent
|
|
1932
|
+
| ConversionCompletedWebhookEvent
|
|
1933
|
+
| ConversionFailedWebhookEvent
|
|
1934
|
+
| PingTestWebhookEvent;
|
|
1935
|
+
|
|
1936
|
+
export declare namespace Webhooks {
|
|
1937
|
+
export {
|
|
1938
|
+
type PayoutCreatedWebhookEvent as PayoutCreatedWebhookEvent,
|
|
1939
|
+
type PayoutInitiatedWebhookEvent as PayoutInitiatedWebhookEvent,
|
|
1940
|
+
type PayoutPaidWebhookEvent as PayoutPaidWebhookEvent,
|
|
1941
|
+
type PayoutFailedWebhookEvent as PayoutFailedWebhookEvent,
|
|
1942
|
+
type ReturnInitiatedWebhookEvent as ReturnInitiatedWebhookEvent,
|
|
1943
|
+
type ReturnPaidWebhookEvent as ReturnPaidWebhookEvent,
|
|
1944
|
+
type ReturnFailedWebhookEvent as ReturnFailedWebhookEvent,
|
|
1945
|
+
type ReturnReturnedWebhookEvent as ReturnReturnedWebhookEvent,
|
|
1946
|
+
type DepositReceivedWebhookEvent as DepositReceivedWebhookEvent,
|
|
1947
|
+
type ConversionCreatedWebhookEvent as ConversionCreatedWebhookEvent,
|
|
1948
|
+
type ConversionCompletedWebhookEvent as ConversionCompletedWebhookEvent,
|
|
1949
|
+
type ConversionFailedWebhookEvent as ConversionFailedWebhookEvent,
|
|
1950
|
+
type PingTestWebhookEvent as PingTestWebhookEvent,
|
|
1951
|
+
type UnwrapWebhookEvent as UnwrapWebhookEvent,
|
|
1952
|
+
};
|
|
1953
|
+
}
|