@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,221 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
+
import { CursorPage, type CursorPageParams, PagePromise } from "../core/pagination.mjs";
|
|
4
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
5
|
+
export declare class WebhookSubscriptions extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Creates a new webhook subscription.
|
|
8
|
+
*/
|
|
9
|
+
create(body: WebhookSubscriptionCreateParams, options?: RequestOptions): APIPromise<WebhookSubscriptionCreateResponse>;
|
|
10
|
+
/**
|
|
11
|
+
* Retrieves a webhook subscription by ID.
|
|
12
|
+
*/
|
|
13
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<WebhookSubscriptionRetrieveResponse>;
|
|
14
|
+
/**
|
|
15
|
+
* Updates the URL and/or subscribed events.
|
|
16
|
+
*/
|
|
17
|
+
update(id: string, body: WebhookSubscriptionUpdateParams, options?: RequestOptions): APIPromise<WebhookSubscriptionUpdateResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* Lists webhook subscriptions for the merchant with cursor-based pagination.
|
|
20
|
+
*/
|
|
21
|
+
list(query?: WebhookSubscriptionListParams | null | undefined, options?: RequestOptions): PagePromise<WebhookSubscriptionListResponsesCursorPage, WebhookSubscriptionListResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* Permanently deletes a webhook subscription. This cannot be undone.
|
|
24
|
+
*/
|
|
25
|
+
delete(id: string, options?: RequestOptions): APIPromise<WebhookSubscriptionDeleteResponse>;
|
|
26
|
+
/**
|
|
27
|
+
* Dispatches a signed `ping.test` event to this subscription's URL through the
|
|
28
|
+
* same pipeline as real events. Useful for verifying your receiver's reachability
|
|
29
|
+
* and signature verification in any environment without creating a real business
|
|
30
|
+
* event. Test-event failures do not affect the subscription's health counters or
|
|
31
|
+
* trigger failure-notification emails.
|
|
32
|
+
*/
|
|
33
|
+
sendTestEvent(id: string, options?: RequestOptions): APIPromise<WebhookSubscriptionSendTestEventResponse>;
|
|
34
|
+
}
|
|
35
|
+
export type WebhookSubscriptionListResponsesCursorPage = CursorPage<WebhookSubscriptionListResponse>;
|
|
36
|
+
export interface WebhookSubscriptionCreateResponse {
|
|
37
|
+
/**
|
|
38
|
+
* Unique identifier of the webhook subscription.
|
|
39
|
+
*/
|
|
40
|
+
id: string;
|
|
41
|
+
/**
|
|
42
|
+
* ISO 8601 UTC timestamp when the subscription was created.
|
|
43
|
+
*/
|
|
44
|
+
created_at: string;
|
|
45
|
+
/**
|
|
46
|
+
* Event types this subscription receives.
|
|
47
|
+
*/
|
|
48
|
+
events: Array<'payout.created' | 'payout.initiated' | 'payout.paid' | 'payout.failed' | 'return.initiated' | 'return.paid' | 'return.failed' | 'return.returned' | 'deposit.received' | 'conversion.created' | 'conversion.completed' | 'conversion.failed'>;
|
|
49
|
+
/**
|
|
50
|
+
* Resource type discriminator.
|
|
51
|
+
*/
|
|
52
|
+
type: 'webhook_subscription';
|
|
53
|
+
/**
|
|
54
|
+
* ISO 8601 UTC timestamp when the subscription was last updated.
|
|
55
|
+
*/
|
|
56
|
+
updated_at: string;
|
|
57
|
+
/**
|
|
58
|
+
* The HTTPS URL where webhook events are delivered.
|
|
59
|
+
*/
|
|
60
|
+
url: string;
|
|
61
|
+
}
|
|
62
|
+
export interface WebhookSubscriptionRetrieveResponse {
|
|
63
|
+
/**
|
|
64
|
+
* Unique identifier of the webhook subscription.
|
|
65
|
+
*/
|
|
66
|
+
id: string;
|
|
67
|
+
/**
|
|
68
|
+
* ISO 8601 UTC timestamp when the subscription was created.
|
|
69
|
+
*/
|
|
70
|
+
created_at: string;
|
|
71
|
+
/**
|
|
72
|
+
* Event types this subscription receives.
|
|
73
|
+
*/
|
|
74
|
+
events: Array<'payout.created' | 'payout.initiated' | 'payout.paid' | 'payout.failed' | 'return.initiated' | 'return.paid' | 'return.failed' | 'return.returned' | 'deposit.received' | 'conversion.created' | 'conversion.completed' | 'conversion.failed'>;
|
|
75
|
+
/**
|
|
76
|
+
* Resource type discriminator.
|
|
77
|
+
*/
|
|
78
|
+
type: 'webhook_subscription';
|
|
79
|
+
/**
|
|
80
|
+
* ISO 8601 UTC timestamp when the subscription was last updated.
|
|
81
|
+
*/
|
|
82
|
+
updated_at: string;
|
|
83
|
+
/**
|
|
84
|
+
* The HTTPS URL where webhook events are delivered.
|
|
85
|
+
*/
|
|
86
|
+
url: string;
|
|
87
|
+
}
|
|
88
|
+
export interface WebhookSubscriptionUpdateResponse {
|
|
89
|
+
/**
|
|
90
|
+
* Unique identifier of the webhook subscription.
|
|
91
|
+
*/
|
|
92
|
+
id: string;
|
|
93
|
+
/**
|
|
94
|
+
* ISO 8601 UTC timestamp when the subscription was created.
|
|
95
|
+
*/
|
|
96
|
+
created_at: string;
|
|
97
|
+
/**
|
|
98
|
+
* Event types this subscription receives.
|
|
99
|
+
*/
|
|
100
|
+
events: Array<'payout.created' | 'payout.initiated' | 'payout.paid' | 'payout.failed' | 'return.initiated' | 'return.paid' | 'return.failed' | 'return.returned' | 'deposit.received' | 'conversion.created' | 'conversion.completed' | 'conversion.failed'>;
|
|
101
|
+
/**
|
|
102
|
+
* Resource type discriminator.
|
|
103
|
+
*/
|
|
104
|
+
type: 'webhook_subscription';
|
|
105
|
+
/**
|
|
106
|
+
* ISO 8601 UTC timestamp when the subscription was last updated.
|
|
107
|
+
*/
|
|
108
|
+
updated_at: string;
|
|
109
|
+
/**
|
|
110
|
+
* The HTTPS URL where webhook events are delivered.
|
|
111
|
+
*/
|
|
112
|
+
url: string;
|
|
113
|
+
}
|
|
114
|
+
export interface WebhookSubscriptionListResponse {
|
|
115
|
+
/**
|
|
116
|
+
* Unique identifier of the webhook subscription.
|
|
117
|
+
*/
|
|
118
|
+
id: string;
|
|
119
|
+
/**
|
|
120
|
+
* ISO 8601 UTC timestamp when the subscription was created.
|
|
121
|
+
*/
|
|
122
|
+
created_at: string;
|
|
123
|
+
/**
|
|
124
|
+
* Event types this subscription receives.
|
|
125
|
+
*/
|
|
126
|
+
events: Array<'payout.created' | 'payout.initiated' | 'payout.paid' | 'payout.failed' | 'return.initiated' | 'return.paid' | 'return.failed' | 'return.returned' | 'deposit.received' | 'conversion.created' | 'conversion.completed' | 'conversion.failed'>;
|
|
127
|
+
/**
|
|
128
|
+
* Resource type discriminator.
|
|
129
|
+
*/
|
|
130
|
+
type: 'webhook_subscription';
|
|
131
|
+
/**
|
|
132
|
+
* ISO 8601 UTC timestamp when the subscription was last updated.
|
|
133
|
+
*/
|
|
134
|
+
updated_at: string;
|
|
135
|
+
/**
|
|
136
|
+
* The HTTPS URL where webhook events are delivered.
|
|
137
|
+
*/
|
|
138
|
+
url: string;
|
|
139
|
+
}
|
|
140
|
+
export interface WebhookSubscriptionDeleteResponse {
|
|
141
|
+
/**
|
|
142
|
+
* Unique identifier of the webhook subscription.
|
|
143
|
+
*/
|
|
144
|
+
id: string;
|
|
145
|
+
/**
|
|
146
|
+
* ISO 8601 UTC timestamp when the subscription was created.
|
|
147
|
+
*/
|
|
148
|
+
created_at: string;
|
|
149
|
+
/**
|
|
150
|
+
* Event types this subscription receives.
|
|
151
|
+
*/
|
|
152
|
+
events: Array<'payout.created' | 'payout.initiated' | 'payout.paid' | 'payout.failed' | 'return.initiated' | 'return.paid' | 'return.failed' | 'return.returned' | 'deposit.received' | 'conversion.created' | 'conversion.completed' | 'conversion.failed'>;
|
|
153
|
+
/**
|
|
154
|
+
* Resource type discriminator.
|
|
155
|
+
*/
|
|
156
|
+
type: 'webhook_subscription';
|
|
157
|
+
/**
|
|
158
|
+
* ISO 8601 UTC timestamp when the subscription was last updated.
|
|
159
|
+
*/
|
|
160
|
+
updated_at: string;
|
|
161
|
+
/**
|
|
162
|
+
* The HTTPS URL where webhook events are delivered.
|
|
163
|
+
*/
|
|
164
|
+
url: string;
|
|
165
|
+
}
|
|
166
|
+
export interface WebhookSubscriptionSendTestEventResponse {
|
|
167
|
+
/**
|
|
168
|
+
* Unique identifier of the event. Matches the envelope `id` delivered in the
|
|
169
|
+
* webhook payload and is stable across subscription fan-out and retries.
|
|
170
|
+
*/
|
|
171
|
+
id: string;
|
|
172
|
+
/**
|
|
173
|
+
* API version the event payload was rendered at. Stable across retries and
|
|
174
|
+
* redeliveries, and mirrored in the webhook envelope `api_version` field.
|
|
175
|
+
*/
|
|
176
|
+
api_version: string;
|
|
177
|
+
/**
|
|
178
|
+
* ISO 8601 UTC timestamp when the event was created.
|
|
179
|
+
*/
|
|
180
|
+
created_at: string;
|
|
181
|
+
/**
|
|
182
|
+
* Event payload. Shape matches the resource schema for `event_type`.
|
|
183
|
+
*/
|
|
184
|
+
data: {
|
|
185
|
+
[key: string]: unknown;
|
|
186
|
+
};
|
|
187
|
+
/**
|
|
188
|
+
* Event type.
|
|
189
|
+
*/
|
|
190
|
+
event_type: 'payout.created' | 'payout.initiated' | 'payout.paid' | 'payout.failed' | 'return.initiated' | 'return.paid' | 'return.failed' | 'return.returned' | 'deposit.received' | 'conversion.created' | 'conversion.completed' | 'conversion.failed' | 'ping.test';
|
|
191
|
+
/**
|
|
192
|
+
* Resource type discriminator.
|
|
193
|
+
*/
|
|
194
|
+
type: 'event';
|
|
195
|
+
}
|
|
196
|
+
export interface WebhookSubscriptionCreateParams {
|
|
197
|
+
/**
|
|
198
|
+
* Event types to subscribe to. Use ["*"] for all events.
|
|
199
|
+
*/
|
|
200
|
+
events: Array<'payout.created' | 'payout.initiated' | 'payout.paid' | 'payout.failed' | 'return.initiated' | 'return.paid' | 'return.failed' | 'return.returned' | 'deposit.received' | 'conversion.created' | 'conversion.completed' | 'conversion.failed' | '*'>;
|
|
201
|
+
/**
|
|
202
|
+
* The HTTPS URL where webhook events will be delivered.
|
|
203
|
+
*/
|
|
204
|
+
url: string;
|
|
205
|
+
}
|
|
206
|
+
export interface WebhookSubscriptionUpdateParams {
|
|
207
|
+
/**
|
|
208
|
+
* Event types to subscribe to. Use ["*"] for all events.
|
|
209
|
+
*/
|
|
210
|
+
events?: Array<'payout.created' | 'payout.initiated' | 'payout.paid' | 'payout.failed' | 'return.initiated' | 'return.paid' | 'return.failed' | 'return.returned' | 'deposit.received' | 'conversion.created' | 'conversion.completed' | 'conversion.failed' | '*'>;
|
|
211
|
+
/**
|
|
212
|
+
* The HTTPS URL where webhook events will be delivered.
|
|
213
|
+
*/
|
|
214
|
+
url?: string;
|
|
215
|
+
}
|
|
216
|
+
export interface WebhookSubscriptionListParams extends CursorPageParams {
|
|
217
|
+
}
|
|
218
|
+
export declare namespace WebhookSubscriptions {
|
|
219
|
+
export { type WebhookSubscriptionCreateResponse as WebhookSubscriptionCreateResponse, type WebhookSubscriptionRetrieveResponse as WebhookSubscriptionRetrieveResponse, type WebhookSubscriptionUpdateResponse as WebhookSubscriptionUpdateResponse, type WebhookSubscriptionListResponse as WebhookSubscriptionListResponse, type WebhookSubscriptionDeleteResponse as WebhookSubscriptionDeleteResponse, type WebhookSubscriptionSendTestEventResponse as WebhookSubscriptionSendTestEventResponse, type WebhookSubscriptionListResponsesCursorPage as WebhookSubscriptionListResponsesCursorPage, type WebhookSubscriptionCreateParams as WebhookSubscriptionCreateParams, type WebhookSubscriptionUpdateParams as WebhookSubscriptionUpdateParams, type WebhookSubscriptionListParams as WebhookSubscriptionListParams, };
|
|
220
|
+
}
|
|
221
|
+
//# sourceMappingURL=webhook-subscriptions.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhook-subscriptions.d.mts","sourceRoot":"","sources":["../src/resources/webhook-subscriptions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAClD,EAAE,cAAc,EAAE;AAGzB,qBAAa,oBAAqB,SAAQ,WAAW;IACnD;;OAEG;IACH,MAAM,CACJ,IAAI,EAAE,+BAA+B,EACrC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,iCAAiC,CAAC;IAIhD;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,mCAAmC,CAAC;IAI/F;;OAEG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,+BAA+B,EACrC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,iCAAiC,CAAC;IAIhD;;OAEG;IACH,IAAI,CACF,KAAK,GAAE,6BAA6B,GAAG,IAAI,GAAG,SAAc,EAC5D,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,0CAA0C,EAAE,+BAA+B,CAAC;IAO3F;;OAEG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,iCAAiC,CAAC;IAI3F;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,wCAAwC,CAAC;CA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CAAiC,EAC3E,KAAK,wCAAwC,IAAI,wCAAwC,EACzF,KAAK,0CAA0C,IAAI,0CAA0C,EAC7F,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,6BAA6B,IAAI,6BAA6B,GACpE,CAAC;CACH"}
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
+
import { CursorPage, type CursorPageParams, PagePromise } from "../core/pagination.js";
|
|
4
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
5
|
+
export declare class WebhookSubscriptions extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Creates a new webhook subscription.
|
|
8
|
+
*/
|
|
9
|
+
create(body: WebhookSubscriptionCreateParams, options?: RequestOptions): APIPromise<WebhookSubscriptionCreateResponse>;
|
|
10
|
+
/**
|
|
11
|
+
* Retrieves a webhook subscription by ID.
|
|
12
|
+
*/
|
|
13
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<WebhookSubscriptionRetrieveResponse>;
|
|
14
|
+
/**
|
|
15
|
+
* Updates the URL and/or subscribed events.
|
|
16
|
+
*/
|
|
17
|
+
update(id: string, body: WebhookSubscriptionUpdateParams, options?: RequestOptions): APIPromise<WebhookSubscriptionUpdateResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* Lists webhook subscriptions for the merchant with cursor-based pagination.
|
|
20
|
+
*/
|
|
21
|
+
list(query?: WebhookSubscriptionListParams | null | undefined, options?: RequestOptions): PagePromise<WebhookSubscriptionListResponsesCursorPage, WebhookSubscriptionListResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* Permanently deletes a webhook subscription. This cannot be undone.
|
|
24
|
+
*/
|
|
25
|
+
delete(id: string, options?: RequestOptions): APIPromise<WebhookSubscriptionDeleteResponse>;
|
|
26
|
+
/**
|
|
27
|
+
* Dispatches a signed `ping.test` event to this subscription's URL through the
|
|
28
|
+
* same pipeline as real events. Useful for verifying your receiver's reachability
|
|
29
|
+
* and signature verification in any environment without creating a real business
|
|
30
|
+
* event. Test-event failures do not affect the subscription's health counters or
|
|
31
|
+
* trigger failure-notification emails.
|
|
32
|
+
*/
|
|
33
|
+
sendTestEvent(id: string, options?: RequestOptions): APIPromise<WebhookSubscriptionSendTestEventResponse>;
|
|
34
|
+
}
|
|
35
|
+
export type WebhookSubscriptionListResponsesCursorPage = CursorPage<WebhookSubscriptionListResponse>;
|
|
36
|
+
export interface WebhookSubscriptionCreateResponse {
|
|
37
|
+
/**
|
|
38
|
+
* Unique identifier of the webhook subscription.
|
|
39
|
+
*/
|
|
40
|
+
id: string;
|
|
41
|
+
/**
|
|
42
|
+
* ISO 8601 UTC timestamp when the subscription was created.
|
|
43
|
+
*/
|
|
44
|
+
created_at: string;
|
|
45
|
+
/**
|
|
46
|
+
* Event types this subscription receives.
|
|
47
|
+
*/
|
|
48
|
+
events: Array<'payout.created' | 'payout.initiated' | 'payout.paid' | 'payout.failed' | 'return.initiated' | 'return.paid' | 'return.failed' | 'return.returned' | 'deposit.received' | 'conversion.created' | 'conversion.completed' | 'conversion.failed'>;
|
|
49
|
+
/**
|
|
50
|
+
* Resource type discriminator.
|
|
51
|
+
*/
|
|
52
|
+
type: 'webhook_subscription';
|
|
53
|
+
/**
|
|
54
|
+
* ISO 8601 UTC timestamp when the subscription was last updated.
|
|
55
|
+
*/
|
|
56
|
+
updated_at: string;
|
|
57
|
+
/**
|
|
58
|
+
* The HTTPS URL where webhook events are delivered.
|
|
59
|
+
*/
|
|
60
|
+
url: string;
|
|
61
|
+
}
|
|
62
|
+
export interface WebhookSubscriptionRetrieveResponse {
|
|
63
|
+
/**
|
|
64
|
+
* Unique identifier of the webhook subscription.
|
|
65
|
+
*/
|
|
66
|
+
id: string;
|
|
67
|
+
/**
|
|
68
|
+
* ISO 8601 UTC timestamp when the subscription was created.
|
|
69
|
+
*/
|
|
70
|
+
created_at: string;
|
|
71
|
+
/**
|
|
72
|
+
* Event types this subscription receives.
|
|
73
|
+
*/
|
|
74
|
+
events: Array<'payout.created' | 'payout.initiated' | 'payout.paid' | 'payout.failed' | 'return.initiated' | 'return.paid' | 'return.failed' | 'return.returned' | 'deposit.received' | 'conversion.created' | 'conversion.completed' | 'conversion.failed'>;
|
|
75
|
+
/**
|
|
76
|
+
* Resource type discriminator.
|
|
77
|
+
*/
|
|
78
|
+
type: 'webhook_subscription';
|
|
79
|
+
/**
|
|
80
|
+
* ISO 8601 UTC timestamp when the subscription was last updated.
|
|
81
|
+
*/
|
|
82
|
+
updated_at: string;
|
|
83
|
+
/**
|
|
84
|
+
* The HTTPS URL where webhook events are delivered.
|
|
85
|
+
*/
|
|
86
|
+
url: string;
|
|
87
|
+
}
|
|
88
|
+
export interface WebhookSubscriptionUpdateResponse {
|
|
89
|
+
/**
|
|
90
|
+
* Unique identifier of the webhook subscription.
|
|
91
|
+
*/
|
|
92
|
+
id: string;
|
|
93
|
+
/**
|
|
94
|
+
* ISO 8601 UTC timestamp when the subscription was created.
|
|
95
|
+
*/
|
|
96
|
+
created_at: string;
|
|
97
|
+
/**
|
|
98
|
+
* Event types this subscription receives.
|
|
99
|
+
*/
|
|
100
|
+
events: Array<'payout.created' | 'payout.initiated' | 'payout.paid' | 'payout.failed' | 'return.initiated' | 'return.paid' | 'return.failed' | 'return.returned' | 'deposit.received' | 'conversion.created' | 'conversion.completed' | 'conversion.failed'>;
|
|
101
|
+
/**
|
|
102
|
+
* Resource type discriminator.
|
|
103
|
+
*/
|
|
104
|
+
type: 'webhook_subscription';
|
|
105
|
+
/**
|
|
106
|
+
* ISO 8601 UTC timestamp when the subscription was last updated.
|
|
107
|
+
*/
|
|
108
|
+
updated_at: string;
|
|
109
|
+
/**
|
|
110
|
+
* The HTTPS URL where webhook events are delivered.
|
|
111
|
+
*/
|
|
112
|
+
url: string;
|
|
113
|
+
}
|
|
114
|
+
export interface WebhookSubscriptionListResponse {
|
|
115
|
+
/**
|
|
116
|
+
* Unique identifier of the webhook subscription.
|
|
117
|
+
*/
|
|
118
|
+
id: string;
|
|
119
|
+
/**
|
|
120
|
+
* ISO 8601 UTC timestamp when the subscription was created.
|
|
121
|
+
*/
|
|
122
|
+
created_at: string;
|
|
123
|
+
/**
|
|
124
|
+
* Event types this subscription receives.
|
|
125
|
+
*/
|
|
126
|
+
events: Array<'payout.created' | 'payout.initiated' | 'payout.paid' | 'payout.failed' | 'return.initiated' | 'return.paid' | 'return.failed' | 'return.returned' | 'deposit.received' | 'conversion.created' | 'conversion.completed' | 'conversion.failed'>;
|
|
127
|
+
/**
|
|
128
|
+
* Resource type discriminator.
|
|
129
|
+
*/
|
|
130
|
+
type: 'webhook_subscription';
|
|
131
|
+
/**
|
|
132
|
+
* ISO 8601 UTC timestamp when the subscription was last updated.
|
|
133
|
+
*/
|
|
134
|
+
updated_at: string;
|
|
135
|
+
/**
|
|
136
|
+
* The HTTPS URL where webhook events are delivered.
|
|
137
|
+
*/
|
|
138
|
+
url: string;
|
|
139
|
+
}
|
|
140
|
+
export interface WebhookSubscriptionDeleteResponse {
|
|
141
|
+
/**
|
|
142
|
+
* Unique identifier of the webhook subscription.
|
|
143
|
+
*/
|
|
144
|
+
id: string;
|
|
145
|
+
/**
|
|
146
|
+
* ISO 8601 UTC timestamp when the subscription was created.
|
|
147
|
+
*/
|
|
148
|
+
created_at: string;
|
|
149
|
+
/**
|
|
150
|
+
* Event types this subscription receives.
|
|
151
|
+
*/
|
|
152
|
+
events: Array<'payout.created' | 'payout.initiated' | 'payout.paid' | 'payout.failed' | 'return.initiated' | 'return.paid' | 'return.failed' | 'return.returned' | 'deposit.received' | 'conversion.created' | 'conversion.completed' | 'conversion.failed'>;
|
|
153
|
+
/**
|
|
154
|
+
* Resource type discriminator.
|
|
155
|
+
*/
|
|
156
|
+
type: 'webhook_subscription';
|
|
157
|
+
/**
|
|
158
|
+
* ISO 8601 UTC timestamp when the subscription was last updated.
|
|
159
|
+
*/
|
|
160
|
+
updated_at: string;
|
|
161
|
+
/**
|
|
162
|
+
* The HTTPS URL where webhook events are delivered.
|
|
163
|
+
*/
|
|
164
|
+
url: string;
|
|
165
|
+
}
|
|
166
|
+
export interface WebhookSubscriptionSendTestEventResponse {
|
|
167
|
+
/**
|
|
168
|
+
* Unique identifier of the event. Matches the envelope `id` delivered in the
|
|
169
|
+
* webhook payload and is stable across subscription fan-out and retries.
|
|
170
|
+
*/
|
|
171
|
+
id: string;
|
|
172
|
+
/**
|
|
173
|
+
* API version the event payload was rendered at. Stable across retries and
|
|
174
|
+
* redeliveries, and mirrored in the webhook envelope `api_version` field.
|
|
175
|
+
*/
|
|
176
|
+
api_version: string;
|
|
177
|
+
/**
|
|
178
|
+
* ISO 8601 UTC timestamp when the event was created.
|
|
179
|
+
*/
|
|
180
|
+
created_at: string;
|
|
181
|
+
/**
|
|
182
|
+
* Event payload. Shape matches the resource schema for `event_type`.
|
|
183
|
+
*/
|
|
184
|
+
data: {
|
|
185
|
+
[key: string]: unknown;
|
|
186
|
+
};
|
|
187
|
+
/**
|
|
188
|
+
* Event type.
|
|
189
|
+
*/
|
|
190
|
+
event_type: 'payout.created' | 'payout.initiated' | 'payout.paid' | 'payout.failed' | 'return.initiated' | 'return.paid' | 'return.failed' | 'return.returned' | 'deposit.received' | 'conversion.created' | 'conversion.completed' | 'conversion.failed' | 'ping.test';
|
|
191
|
+
/**
|
|
192
|
+
* Resource type discriminator.
|
|
193
|
+
*/
|
|
194
|
+
type: 'event';
|
|
195
|
+
}
|
|
196
|
+
export interface WebhookSubscriptionCreateParams {
|
|
197
|
+
/**
|
|
198
|
+
* Event types to subscribe to. Use ["*"] for all events.
|
|
199
|
+
*/
|
|
200
|
+
events: Array<'payout.created' | 'payout.initiated' | 'payout.paid' | 'payout.failed' | 'return.initiated' | 'return.paid' | 'return.failed' | 'return.returned' | 'deposit.received' | 'conversion.created' | 'conversion.completed' | 'conversion.failed' | '*'>;
|
|
201
|
+
/**
|
|
202
|
+
* The HTTPS URL where webhook events will be delivered.
|
|
203
|
+
*/
|
|
204
|
+
url: string;
|
|
205
|
+
}
|
|
206
|
+
export interface WebhookSubscriptionUpdateParams {
|
|
207
|
+
/**
|
|
208
|
+
* Event types to subscribe to. Use ["*"] for all events.
|
|
209
|
+
*/
|
|
210
|
+
events?: Array<'payout.created' | 'payout.initiated' | 'payout.paid' | 'payout.failed' | 'return.initiated' | 'return.paid' | 'return.failed' | 'return.returned' | 'deposit.received' | 'conversion.created' | 'conversion.completed' | 'conversion.failed' | '*'>;
|
|
211
|
+
/**
|
|
212
|
+
* The HTTPS URL where webhook events will be delivered.
|
|
213
|
+
*/
|
|
214
|
+
url?: string;
|
|
215
|
+
}
|
|
216
|
+
export interface WebhookSubscriptionListParams extends CursorPageParams {
|
|
217
|
+
}
|
|
218
|
+
export declare namespace WebhookSubscriptions {
|
|
219
|
+
export { type WebhookSubscriptionCreateResponse as WebhookSubscriptionCreateResponse, type WebhookSubscriptionRetrieveResponse as WebhookSubscriptionRetrieveResponse, type WebhookSubscriptionUpdateResponse as WebhookSubscriptionUpdateResponse, type WebhookSubscriptionListResponse as WebhookSubscriptionListResponse, type WebhookSubscriptionDeleteResponse as WebhookSubscriptionDeleteResponse, type WebhookSubscriptionSendTestEventResponse as WebhookSubscriptionSendTestEventResponse, type WebhookSubscriptionListResponsesCursorPage as WebhookSubscriptionListResponsesCursorPage, type WebhookSubscriptionCreateParams as WebhookSubscriptionCreateParams, type WebhookSubscriptionUpdateParams as WebhookSubscriptionUpdateParams, type WebhookSubscriptionListParams as WebhookSubscriptionListParams, };
|
|
220
|
+
}
|
|
221
|
+
//# sourceMappingURL=webhook-subscriptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhook-subscriptions.d.ts","sourceRoot":"","sources":["../src/resources/webhook-subscriptions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAg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IACH,MAAM,EAAE,KAAK,CACT,gBAAgB,GAChB,kBAAkB,GAClB,aAAa,GACb,eAAe,GACf,kBAAkB,GAClB,aAAa,GACb,eAAe,GACf,iBAAiB,GACjB,kBAAkB,GAClB,oBAAoB,GACpB,sBAAsB,GACtB,mBAAmB,GACnB,GAAG,CACN,CAAC;IAEF;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,+BAA+B;IAC9C;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CACV,gBAAgB,GAChB,kBAAkB,GAClB,aAAa,GACb,eAAe,GACf,kBAAkB,GAClB,aAAa,GACb,eAAe,GACf,iBAAiB,GACjB,kBAAkB,GAClB,oBAAoB,GACpB,sBAAsB,GACtB,mBAAmB,GACnB,GAAG,CACN,CAAC;IAEF;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,6BAA8B,SAAQ,gBAAgB;CAAG;AAE1E,MAAM,CAAC,OAAO,WAAW,oBAAoB,CAAC;IAC5C,OAAO,EACL,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,mCAAmC,IAAI,mCAAmC,EAC/E,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,wCAAwC,IAAI,wCAAwC,EACzF,KAAK,0CAA0C,IAAI,0CAA0C,EAC7F,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,6BAA6B,IAAI,6BAA6B,GACpE,CAAC;CACH"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.WebhookSubscriptions = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const pagination_1 = require("../core/pagination.js");
|
|
7
|
+
const path_1 = require("../internal/utils/path.js");
|
|
8
|
+
class WebhookSubscriptions extends resource_1.APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Creates a new webhook subscription.
|
|
11
|
+
*/
|
|
12
|
+
create(body, options) {
|
|
13
|
+
return this._client.post('/v1/webhook_subscriptions', { body, ...options });
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Retrieves a webhook subscription by ID.
|
|
17
|
+
*/
|
|
18
|
+
retrieve(id, options) {
|
|
19
|
+
return this._client.get((0, path_1.path) `/v1/webhook_subscriptions/${id}`, options);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Updates the URL and/or subscribed events.
|
|
23
|
+
*/
|
|
24
|
+
update(id, body, options) {
|
|
25
|
+
return this._client.post((0, path_1.path) `/v1/webhook_subscriptions/${id}`, { body, ...options });
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Lists webhook subscriptions for the merchant with cursor-based pagination.
|
|
29
|
+
*/
|
|
30
|
+
list(query = {}, options) {
|
|
31
|
+
return this._client.getAPIList('/v1/webhook_subscriptions', (pagination_1.CursorPage), {
|
|
32
|
+
query,
|
|
33
|
+
...options,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Permanently deletes a webhook subscription. This cannot be undone.
|
|
38
|
+
*/
|
|
39
|
+
delete(id, options) {
|
|
40
|
+
return this._client.delete((0, path_1.path) `/v1/webhook_subscriptions/${id}`, options);
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Dispatches a signed `ping.test` event to this subscription's URL through the
|
|
44
|
+
* same pipeline as real events. Useful for verifying your receiver's reachability
|
|
45
|
+
* and signature verification in any environment without creating a real business
|
|
46
|
+
* event. Test-event failures do not affect the subscription's health counters or
|
|
47
|
+
* trigger failure-notification emails.
|
|
48
|
+
*/
|
|
49
|
+
sendTestEvent(id, options) {
|
|
50
|
+
return this._client.post((0, path_1.path) `/v1/webhook_subscriptions/${id}/send_test_event`, options);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.WebhookSubscriptions = WebhookSubscriptions;
|
|
54
|
+
//# sourceMappingURL=webhook-subscriptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhook-subscriptions.js","sourceRoot":"","sources":["../src/resources/webhook-subscriptions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,sDAAoF;AAEpF,oDAA8C;AAE9C,MAAa,oBAAqB,SAAQ,sBAAW;IACnD;;OAEG;IACH,MAAM,CACJ,IAAqC,EACrC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,2BAA2B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9E,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,6BAA6B,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1E,CAAC;IAED;;OAEG;IACH,MAAM,CACJ,EAAU,EACV,IAAqC,EACrC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,6BAA6B,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxF,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAA0D,EAAE,EAC5D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,2BAA2B,EAAE,CAAA,uBAA2C,CAAA,EAAE;YACvG,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,6BAA6B,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7E,CAAC;IAED;;;;;;OAMG;IACH,aAAa,CAAC,EAAU,EAAE,OAAwB;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,6BAA6B,EAAE,kBAAkB,EAAE,OAAO,CAAC,CAAC;IAC3F,CAAC;CACF;AA3DD,oDA2DC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { CursorPage } from "../core/pagination.mjs";
|
|
4
|
+
import { path } from "../internal/utils/path.mjs";
|
|
5
|
+
export class WebhookSubscriptions extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Creates a new webhook subscription.
|
|
8
|
+
*/
|
|
9
|
+
create(body, options) {
|
|
10
|
+
return this._client.post('/v1/webhook_subscriptions', { body, ...options });
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Retrieves a webhook subscription by ID.
|
|
14
|
+
*/
|
|
15
|
+
retrieve(id, options) {
|
|
16
|
+
return this._client.get(path `/v1/webhook_subscriptions/${id}`, options);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Updates the URL and/or subscribed events.
|
|
20
|
+
*/
|
|
21
|
+
update(id, body, options) {
|
|
22
|
+
return this._client.post(path `/v1/webhook_subscriptions/${id}`, { body, ...options });
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Lists webhook subscriptions for the merchant with cursor-based pagination.
|
|
26
|
+
*/
|
|
27
|
+
list(query = {}, options) {
|
|
28
|
+
return this._client.getAPIList('/v1/webhook_subscriptions', (CursorPage), {
|
|
29
|
+
query,
|
|
30
|
+
...options,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Permanently deletes a webhook subscription. This cannot be undone.
|
|
35
|
+
*/
|
|
36
|
+
delete(id, options) {
|
|
37
|
+
return this._client.delete(path `/v1/webhook_subscriptions/${id}`, options);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Dispatches a signed `ping.test` event to this subscription's URL through the
|
|
41
|
+
* same pipeline as real events. Useful for verifying your receiver's reachability
|
|
42
|
+
* and signature verification in any environment without creating a real business
|
|
43
|
+
* event. Test-event failures do not affect the subscription's health counters or
|
|
44
|
+
* trigger failure-notification emails.
|
|
45
|
+
*/
|
|
46
|
+
sendTestEvent(id, options) {
|
|
47
|
+
return this._client.post(path `/v1/webhook_subscriptions/${id}/send_test_event`, options);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=webhook-subscriptions.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhook-subscriptions.mjs","sourceRoot":"","sources":["../src/resources/webhook-subscriptions.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,UAAU,EAAsC;OAElD,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,oBAAqB,SAAQ,WAAW;IACnD;;OAEG;IACH,MAAM,CACJ,IAAqC,EACrC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,2BAA2B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9E,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,6BAA6B,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1E,CAAC;IAED;;OAEG;IACH,MAAM,CACJ,EAAU,EACV,IAAqC,EACrC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,6BAA6B,EAA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