@getivy/node-sdk 1.7.1 → 2.1.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 +155 -558
- package/README.md +112 -42
- 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/bin/cli +53 -0
- package/bin/migration-config.json +6 -0
- package/client.d.mts +240 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +240 -0
- package/client.d.ts.map +1 -0
- package/client.js +521 -0
- package/client.js.map +1 -0
- package/client.mjs +517 -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/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 +1 -46
- package/error.d.ts.map +1 -1
- package/error.js +3 -110
- package/error.js.map +1 -1
- package/error.mjs +1 -96
- package/error.mjs.map +1 -1
- package/index.d.mts +6 -175
- package/index.d.mts.map +1 -0
- package/index.d.ts +5 -174
- package/index.d.ts.map +1 -1
- package/index.js +12 -166
- package/index.js.map +1 -1
- package/index.mjs +5 -139
- package/index.mjs.map +1 -1
- 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/{resources/data.mjs → internal/builtin-types.mjs} +2 -2
- 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/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/{src/resources/data.ts → internal/types.mjs} +2 -2
- 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 +86 -0
- package/internal/utils/log.js.map +1 -0
- package/internal/utils/log.mjs +80 -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 +5 -0
- package/internal/utils/query.d.mts.map +1 -0
- package/internal/utils/query.js +2 -3
- package/internal/utils/query.js.map +1 -1
- package/internal/utils/query.mjs +1 -1
- package/internal/utils/query.mjs.map +1 -1
- 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 +114 -64
- package/resource.d.mts +2 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +1 -5
- package/resource.d.ts.map +1 -1
- package/resource.js +3 -8
- package/resource.js.map +1 -1
- package/resource.mjs +1 -6
- package/resource.mjs.map +1 -1
- package/resources/balance.d.mts +44 -0
- package/resources/balance.d.mts.map +1 -0
- package/resources/balance.d.ts +4 -3
- package/resources/balance.d.ts.map +1 -1
- package/resources/balance.js +1 -1
- package/resources/balance.js.map +1 -1
- package/resources/balance.mjs +1 -1
- package/resources/balance.mjs.map +1 -1
- package/resources/banks.d.mts +251 -0
- package/resources/{data/session.d.ts.map → banks.d.mts.map} +1 -1
- package/resources/banks.d.ts +6 -5
- package/resources/banks.d.ts.map +1 -1
- package/resources/banks.js +1 -1
- package/resources/banks.js.map +1 -1
- package/resources/banks.mjs +1 -1
- package/resources/banks.mjs.map +1 -1
- package/resources/beneficiary-payouts.d.mts +64 -0
- package/resources/beneficiary-payouts.d.mts.map +1 -0
- package/resources/beneficiary-payouts.d.ts +4 -3
- package/resources/beneficiary-payouts.d.ts.map +1 -1
- package/resources/beneficiary-payouts.js +1 -1
- package/resources/beneficiary-payouts.js.map +1 -1
- package/resources/beneficiary-payouts.mjs +1 -1
- package/resources/beneficiary-payouts.mjs.map +1 -1
- package/resources/capabilities.d.mts +20 -0
- package/resources/capabilities.d.mts.map +1 -0
- package/resources/capabilities.d.ts +4 -3
- package/resources/capabilities.d.ts.map +1 -1
- package/resources/capabilities.js +1 -1
- package/resources/capabilities.js.map +1 -1
- package/resources/capabilities.mjs +1 -1
- package/resources/capabilities.mjs.map +1 -1
- package/resources/checkoutsession.d.mts +659 -0
- package/resources/checkoutsession.d.mts.map +1 -0
- package/resources/checkoutsession.d.ts +6 -5
- package/resources/checkoutsession.d.ts.map +1 -1
- package/resources/checkoutsession.js +1 -1
- package/resources/checkoutsession.js.map +1 -1
- package/resources/checkoutsession.mjs +1 -1
- package/resources/checkoutsession.mjs.map +1 -1
- package/resources/customers.d.mts +668 -0
- package/resources/customers.d.mts.map +1 -0
- package/resources/customers.d.ts +8 -7
- package/resources/customers.d.ts.map +1 -1
- package/resources/customers.js +1 -1
- package/resources/customers.js.map +1 -1
- package/resources/customers.mjs +1 -1
- package/resources/customers.mjs.map +1 -1
- package/resources/deposits.d.mts +192 -0
- package/resources/deposits.d.mts.map +1 -0
- package/resources/deposits.d.ts +4 -3
- package/resources/deposits.d.ts.map +1 -1
- package/resources/deposits.js +1 -1
- package/resources/deposits.js.map +1 -1
- package/resources/deposits.mjs +1 -1
- package/resources/deposits.mjs.map +1 -1
- package/resources/fx.d.mts +155 -0
- package/resources/fx.d.mts.map +1 -0
- package/resources/fx.d.ts +6 -5
- package/resources/fx.d.ts.map +1 -1
- package/resources/fx.js +1 -1
- package/resources/fx.js.map +1 -1
- package/resources/fx.mjs +1 -1
- package/resources/fx.mjs.map +1 -1
- package/resources/index.d.mts +17 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +0 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +0 -1
- package/resources/index.mjs.map +1 -1
- package/resources/orders.d.mts +1251 -0
- package/resources/orders.d.mts.map +1 -0
- package/resources/orders.d.ts +9 -8
- package/resources/orders.d.ts.map +1 -1
- package/resources/orders.js +1 -1
- package/resources/orders.js.map +1 -1
- package/resources/orders.mjs +1 -1
- package/resources/orders.mjs.map +1 -1
- package/resources/payee.d.mts +51 -0
- package/resources/payee.d.mts.map +1 -0
- package/resources/payee.d.ts +4 -3
- package/resources/payee.d.ts.map +1 -1
- package/resources/payee.js +1 -1
- package/resources/payee.js.map +1 -1
- package/resources/payee.mjs +1 -1
- package/resources/payee.mjs.map +1 -1
- package/resources/payouts.d.mts +459 -0
- package/resources/payouts.d.mts.map +1 -0
- package/resources/payouts.d.ts +6 -5
- package/resources/payouts.d.ts.map +1 -1
- package/resources/payouts.js +1 -1
- package/resources/payouts.js.map +1 -1
- package/resources/payouts.mjs +1 -1
- package/resources/payouts.mjs.map +1 -1
- package/resources/refunds.d.mts +97 -0
- package/resources/refunds.d.mts.map +1 -0
- package/resources/refunds.d.ts +5 -4
- package/resources/refunds.d.ts.map +1 -1
- package/resources/refunds.js +1 -1
- package/resources/refunds.js.map +1 -1
- package/resources/refunds.mjs +1 -1
- package/resources/refunds.mjs.map +1 -1
- package/resources/returns.d.mts +105 -0
- package/resources/returns.d.mts.map +1 -0
- package/resources/returns.d.ts +5 -4
- package/resources/returns.d.ts.map +1 -1
- package/resources/returns.js +1 -1
- package/resources/returns.js.map +1 -1
- package/resources/returns.mjs +1 -1
- package/resources/returns.mjs.map +1 -1
- package/resources/subaccounts.d.mts +60 -0
- package/resources/subaccounts.d.mts.map +1 -0
- package/resources/subaccounts.d.ts +5 -4
- package/resources/subaccounts.d.ts.map +1 -1
- package/resources/subaccounts.js +1 -1
- package/resources/subaccounts.js.map +1 -1
- package/resources/subaccounts.mjs +1 -1
- package/resources/subaccounts.mjs.map +1 -1
- package/resources/transactions.d.mts +203 -0
- package/resources/transactions.d.mts.map +1 -0
- package/resources/transactions.d.ts +9 -3
- package/resources/transactions.d.ts.map +1 -1
- package/resources/transactions.js +1 -1
- package/resources/transactions.js.map +1 -1
- package/resources/transactions.mjs +1 -1
- package/resources/transactions.mjs.map +1 -1
- package/resources/webhook/index.d.mts +3 -0
- package/resources/webhook/index.d.mts.map +1 -0
- package/resources/webhook/index.d.ts.map +1 -1
- package/resources/webhook/subscription.d.mts +156 -0
- package/resources/webhook/subscription.d.mts.map +1 -0
- package/resources/webhook/subscription.d.ts +11 -7
- package/resources/webhook/subscription.d.ts.map +1 -1
- package/resources/webhook/subscription.js +1 -1
- package/resources/webhook/subscription.js.map +1 -1
- package/resources/webhook/subscription.mjs +1 -1
- package/resources/webhook/subscription.mjs.map +1 -1
- package/resources/webhook/webhook.d.mts +29 -0
- package/resources/webhook/webhook.d.mts.map +1 -0
- package/resources/webhook/webhook.d.ts +4 -3
- package/resources/webhook/webhook.d.ts.map +1 -1
- package/resources/webhook/webhook.js +3 -25
- package/resources/webhook/webhook.js.map +1 -1
- package/resources/webhook/webhook.mjs +1 -1
- package/resources/webhook/webhook.mjs.map +1 -1
- package/resources/webhook.d.mts +2 -0
- package/resources/webhook.d.mts.map +1 -0
- package/resources/webhook.d.ts.map +1 -1
- package/resources/webhook.js +2 -15
- package/resources/webhook.js.map +1 -1
- package/resources.d.mts +2 -0
- package/resources.d.mts.map +1 -0
- package/resources.d.ts.map +1 -1
- package/resources.js +2 -15
- package/resources.js.map +1 -1
- package/src/api-promise.ts +2 -0
- package/src/client.ts +997 -0
- package/src/core/README.md +3 -0
- package/src/core/api-promise.ts +89 -0
- package/src/core/error.ts +130 -0
- package/src/core/resource.ts +11 -0
- package/src/core/uploads.ts +2 -0
- package/src/error.ts +2 -130
- package/src/index.ts +5 -450
- 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/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 +95 -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 +127 -0
- package/src/internal/utils/path.ts +88 -0
- package/src/internal/utils/query.ts +1 -1
- 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/resource.ts +2 -11
- package/src/resources/balance.ts +4 -6
- package/src/resources/banks.ts +6 -5
- package/src/resources/beneficiary-payouts.ts +4 -3
- package/src/resources/capabilities.ts +4 -6
- package/src/resources/checkoutsession.ts +9 -8
- package/src/resources/customers.ts +8 -10
- package/src/resources/deposits.ts +4 -6
- package/src/resources/fx.ts +6 -8
- package/src/resources/index.ts +0 -1
- package/src/resources/orders.ts +9 -5
- package/src/resources/payee.ts +4 -3
- package/src/resources/payouts.ts +6 -8
- package/src/resources/refunds.ts +5 -4
- package/src/resources/returns.ts +5 -7
- package/src/resources/subaccounts.ts +5 -7
- package/src/resources/transactions.ts +10 -3
- package/src/resources/webhook/subscription.ts +14 -22
- package/src/resources/webhook/webhook.ts +4 -6
- package/src/tsconfig.json +2 -2
- package/src/uploads.ts +2 -255
- package/src/version.ts +1 -1
- package/uploads.d.mts +2 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +1 -74
- package/uploads.d.ts.map +1 -1
- package/uploads.js +3 -168
- package/uploads.js.map +1 -1
- package/uploads.mjs +1 -157
- package/uploads.mjs.map +1 -1
- package/version.d.mts +2 -0
- package/version.d.mts.map +1 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/_shims/MultipartBody.d.ts +0 -9
- package/_shims/MultipartBody.d.ts.map +0 -1
- package/_shims/MultipartBody.js +0 -16
- package/_shims/MultipartBody.js.map +0 -1
- package/_shims/MultipartBody.mjs +0 -12
- package/_shims/MultipartBody.mjs.map +0 -1
- package/_shims/README.md +0 -46
- package/_shims/auto/runtime-bun.d.ts +0 -5
- package/_shims/auto/runtime-bun.d.ts.map +0 -1
- package/_shims/auto/runtime-bun.js +0 -21
- package/_shims/auto/runtime-bun.js.map +0 -1
- package/_shims/auto/runtime-bun.mjs +0 -2
- package/_shims/auto/runtime-bun.mjs.map +0 -1
- package/_shims/auto/runtime-node.d.ts +0 -5
- package/_shims/auto/runtime-node.d.ts.map +0 -1
- package/_shims/auto/runtime-node.js +0 -21
- package/_shims/auto/runtime-node.js.map +0 -1
- package/_shims/auto/runtime-node.mjs +0 -2
- package/_shims/auto/runtime-node.mjs.map +0 -1
- package/_shims/auto/runtime.d.ts +0 -5
- package/_shims/auto/runtime.d.ts.map +0 -1
- package/_shims/auto/runtime.js +0 -21
- package/_shims/auto/runtime.js.map +0 -1
- package/_shims/auto/runtime.mjs +0 -2
- package/_shims/auto/runtime.mjs.map +0 -1
- package/_shims/auto/types-node.d.ts +0 -5
- package/_shims/auto/types-node.d.ts.map +0 -1
- package/_shims/auto/types-node.js +0 -21
- package/_shims/auto/types-node.js.map +0 -1
- package/_shims/auto/types-node.mjs +0 -2
- package/_shims/auto/types-node.mjs.map +0 -1
- package/_shims/auto/types.d.ts +0 -101
- package/_shims/auto/types.js +0 -3
- package/_shims/auto/types.mjs +0 -3
- package/_shims/bun-runtime.d.ts +0 -6
- package/_shims/bun-runtime.d.ts.map +0 -1
- package/_shims/bun-runtime.js +0 -14
- package/_shims/bun-runtime.js.map +0 -1
- package/_shims/bun-runtime.mjs +0 -10
- package/_shims/bun-runtime.mjs.map +0 -1
- package/_shims/index.d.ts +0 -83
- package/_shims/index.js +0 -17
- package/_shims/index.mjs +0 -11
- package/_shims/manual-types.d.ts +0 -12
- package/_shims/manual-types.js +0 -3
- package/_shims/manual-types.mjs +0 -3
- package/_shims/node-runtime.d.ts +0 -3
- package/_shims/node-runtime.d.ts.map +0 -1
- package/_shims/node-runtime.js +0 -89
- package/_shims/node-runtime.js.map +0 -1
- package/_shims/node-runtime.mjs +0 -56
- package/_shims/node-runtime.mjs.map +0 -1
- package/_shims/node-types.d.ts +0 -42
- package/_shims/node-types.js +0 -3
- package/_shims/node-types.mjs +0 -3
- package/_shims/registry.d.ts +0 -37
- package/_shims/registry.d.ts.map +0 -1
- package/_shims/registry.js +0 -41
- package/_shims/registry.js.map +0 -1
- package/_shims/registry.mjs +0 -37
- package/_shims/registry.mjs.map +0 -1
- package/_shims/web-runtime.d.ts +0 -5
- package/_shims/web-runtime.d.ts.map +0 -1
- package/_shims/web-runtime.js +0 -78
- package/_shims/web-runtime.js.map +0 -1
- package/_shims/web-runtime.mjs +0 -71
- package/_shims/web-runtime.mjs.map +0 -1
- package/_shims/web-types.d.ts +0 -83
- package/_shims/web-types.js +0 -3
- package/_shims/web-types.mjs +0 -3
- package/core.d.ts +0 -255
- package/core.d.ts.map +0 -1
- package/core.js +0 -920
- package/core.js.map +0 -1
- package/core.mjs +0 -888
- package/core.mjs.map +0 -1
- package/resources/data/accounts.d.ts +0 -94
- package/resources/data/accounts.d.ts.map +0 -1
- package/resources/data/accounts.js +0 -15
- package/resources/data/accounts.js.map +0 -1
- package/resources/data/accounts.mjs +0 -11
- package/resources/data/accounts.mjs.map +0 -1
- package/resources/data/balances.d.ts +0 -48
- package/resources/data/balances.d.ts.map +0 -1
- package/resources/data/balances.js +0 -15
- package/resources/data/balances.js.map +0 -1
- package/resources/data/balances.mjs +0 -11
- package/resources/data/balances.mjs.map +0 -1
- package/resources/data/consent.d.ts +0 -80
- package/resources/data/consent.d.ts.map +0 -1
- package/resources/data/consent.js +0 -21
- package/resources/data/consent.js.map +0 -1
- package/resources/data/consent.mjs +0 -17
- package/resources/data/consent.mjs.map +0 -1
- package/resources/data/data.d.ts +0 -26
- package/resources/data/data.d.ts.map +0 -1
- package/resources/data/data.js +0 -55
- package/resources/data/data.js.map +0 -1
- package/resources/data/data.mjs +0 -28
- package/resources/data/data.mjs.map +0 -1
- package/resources/data/index.d.ts +0 -7
- package/resources/data/index.d.ts.map +0 -1
- package/resources/data/index.js +0 -17
- package/resources/data/index.js.map +0 -1
- package/resources/data/index.mjs +0 -8
- package/resources/data/index.mjs.map +0 -1
- package/resources/data/session.d.ts +0 -258
- package/resources/data/session.js +0 -21
- package/resources/data/session.js.map +0 -1
- package/resources/data/session.mjs +0 -17
- package/resources/data/session.mjs.map +0 -1
- package/resources/data/transactions.d.ts +0 -61
- package/resources/data/transactions.d.ts.map +0 -1
- package/resources/data/transactions.js +0 -16
- package/resources/data/transactions.js.map +0 -1
- package/resources/data/transactions.mjs +0 -12
- package/resources/data/transactions.mjs.map +0 -1
- package/resources/data.d.ts +0 -2
- package/resources/data.d.ts.map +0 -1
- package/resources/data.js +0 -19
- package/resources/data.js.map +0 -1
- package/resources/data.mjs.map +0 -1
- package/shims/node.d.ts +0 -30
- package/shims/node.d.ts.map +0 -1
- package/shims/node.js +0 -31
- package/shims/node.js.map +0 -1
- package/shims/node.mjs +0 -5
- package/shims/node.mjs.map +0 -1
- package/shims/web.d.ts +0 -26
- package/shims/web.d.ts.map +0 -1
- package/shims/web.js +0 -31
- package/shims/web.js.map +0 -1
- package/shims/web.mjs +0 -5
- package/shims/web.mjs.map +0 -1
- package/src/_shims/MultipartBody.ts +0 -9
- package/src/_shims/README.md +0 -46
- package/src/_shims/auto/runtime-bun.ts +0 -4
- package/src/_shims/auto/runtime-node.ts +0 -4
- package/src/_shims/auto/runtime.ts +0 -4
- package/src/_shims/auto/types-node.ts +0 -4
- package/src/_shims/auto/types.d.ts +0 -101
- package/src/_shims/auto/types.js +0 -3
- package/src/_shims/auto/types.mjs +0 -3
- package/src/_shims/bun-runtime.ts +0 -14
- package/src/_shims/index.d.ts +0 -83
- package/src/_shims/index.js +0 -17
- package/src/_shims/index.mjs +0 -11
- package/src/_shims/manual-types.d.ts +0 -12
- package/src/_shims/manual-types.js +0 -3
- package/src/_shims/manual-types.mjs +0 -3
- package/src/_shims/node-runtime.ts +0 -81
- package/src/_shims/node-types.d.ts +0 -42
- package/src/_shims/node-types.js +0 -3
- package/src/_shims/node-types.mjs +0 -3
- package/src/_shims/registry.ts +0 -67
- package/src/_shims/web-runtime.ts +0 -103
- package/src/_shims/web-types.d.ts +0 -83
- package/src/_shims/web-types.js +0 -3
- package/src/_shims/web-types.mjs +0 -3
- package/src/core.ts +0 -1231
- package/src/resources/data/accounts.ts +0 -127
- package/src/resources/data/balances.ts +0 -60
- package/src/resources/data/consent.ts +0 -110
- package/src/resources/data/data.ts +0 -75
- package/src/resources/data/index.ts +0 -20
- package/src/resources/data/session.ts +0 -1317
- package/src/resources/data/transactions.ts +0 -79
- package/src/shims/node.ts +0 -50
- package/src/shims/web.ts +0 -50
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { IvyError } from '../../core/error';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Percent-encode everything that isn't safe to have in a path without encoding safe chars.
|
|
5
|
+
*
|
|
6
|
+
* Taken from https://datatracker.ietf.org/doc/html/rfc3986#section-3.3:
|
|
7
|
+
* > unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
|
|
8
|
+
* > sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "="
|
|
9
|
+
* > pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
|
|
10
|
+
*/
|
|
11
|
+
export function encodeURIPath(str: string) {
|
|
12
|
+
return str.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g, encodeURIComponent);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const EMPTY = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.create(null));
|
|
16
|
+
|
|
17
|
+
export const createPathTagFunction = (pathEncoder = encodeURIPath) =>
|
|
18
|
+
function path(statics: readonly string[], ...params: readonly unknown[]): string {
|
|
19
|
+
// If there are no params, no processing is needed.
|
|
20
|
+
if (statics.length === 1) return statics[0]!;
|
|
21
|
+
|
|
22
|
+
let postPath = false;
|
|
23
|
+
const invalidSegments = [];
|
|
24
|
+
const path = statics.reduce((previousValue, currentValue, index) => {
|
|
25
|
+
if (/[?#]/.test(currentValue)) {
|
|
26
|
+
postPath = true;
|
|
27
|
+
}
|
|
28
|
+
const value = params[index];
|
|
29
|
+
let encoded = (postPath ? encodeURIComponent : pathEncoder)('' + value);
|
|
30
|
+
if (
|
|
31
|
+
index !== params.length &&
|
|
32
|
+
(value == null ||
|
|
33
|
+
(typeof value === 'object' &&
|
|
34
|
+
// handle values from other realms
|
|
35
|
+
value.toString ===
|
|
36
|
+
Object.getPrototypeOf(Object.getPrototypeOf((value as any).hasOwnProperty ?? EMPTY) ?? EMPTY)
|
|
37
|
+
?.toString))
|
|
38
|
+
) {
|
|
39
|
+
encoded = value + '';
|
|
40
|
+
invalidSegments.push({
|
|
41
|
+
start: previousValue.length + currentValue.length,
|
|
42
|
+
length: encoded.length,
|
|
43
|
+
error: `Value of type ${Object.prototype.toString
|
|
44
|
+
.call(value)
|
|
45
|
+
.slice(8, -1)} is not a valid path parameter`,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
return previousValue + currentValue + (index === params.length ? '' : encoded);
|
|
49
|
+
}, '');
|
|
50
|
+
|
|
51
|
+
const pathOnly = path.split(/[?#]/, 1)[0]!;
|
|
52
|
+
const invalidSegmentPattern = /(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi;
|
|
53
|
+
let match;
|
|
54
|
+
|
|
55
|
+
// Find all invalid segments
|
|
56
|
+
while ((match = invalidSegmentPattern.exec(pathOnly)) !== null) {
|
|
57
|
+
invalidSegments.push({
|
|
58
|
+
start: match.index,
|
|
59
|
+
length: match[0].length,
|
|
60
|
+
error: `Value "${match[0]}" can\'t be safely passed as a path parameter`,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
invalidSegments.sort((a, b) => a.start - b.start);
|
|
65
|
+
|
|
66
|
+
if (invalidSegments.length > 0) {
|
|
67
|
+
let lastEnd = 0;
|
|
68
|
+
const underline = invalidSegments.reduce((acc, segment) => {
|
|
69
|
+
const spaces = ' '.repeat(segment.start - lastEnd);
|
|
70
|
+
const arrows = '^'.repeat(segment.length);
|
|
71
|
+
lastEnd = segment.start + segment.length;
|
|
72
|
+
return acc + spaces + arrows;
|
|
73
|
+
}, '');
|
|
74
|
+
|
|
75
|
+
throw new IvyError(
|
|
76
|
+
`Path parameters result in path with invalid segments:\n${invalidSegments
|
|
77
|
+
.map((e) => e.error)
|
|
78
|
+
.join('\n')}\n${path}\n${underline}`,
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return path;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* URI-encodes path params and ensures no unsafe /./ or /../ path segments are introduced.
|
|
87
|
+
*/
|
|
88
|
+
export const path = /* @__PURE__ */ createPathTagFunction(encodeURIPath);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* https://stackoverflow.com/a/2117523
|
|
5
|
+
*/
|
|
6
|
+
export let uuid4 = function () {
|
|
7
|
+
const { crypto } = globalThis as any;
|
|
8
|
+
if (crypto?.randomUUID) {
|
|
9
|
+
uuid4 = crypto.randomUUID.bind(crypto);
|
|
10
|
+
return crypto.randomUUID();
|
|
11
|
+
}
|
|
12
|
+
const u8 = new Uint8Array(1);
|
|
13
|
+
const randomByte = crypto ? () => crypto.getRandomValues(u8)[0]! : () => (Math.random() * 0xff) & 0xff;
|
|
14
|
+
return '10000000-1000-4000-8000-100000000000'.replace(/[018]/g, (c) =>
|
|
15
|
+
(+c ^ (randomByte() & (15 >> (+c / 4)))).toString(16),
|
|
16
|
+
);
|
|
17
|
+
};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { IvyError } from '../../core/error';
|
|
4
|
+
|
|
5
|
+
// https://url.spec.whatwg.org/#url-scheme-string
|
|
6
|
+
const startsWithSchemeRegexp = /^[a-z][a-z0-9+.-]*:/i;
|
|
7
|
+
|
|
8
|
+
export const isAbsoluteURL = (url: string): boolean => {
|
|
9
|
+
return startsWithSchemeRegexp.test(url);
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export let isArray = (val: unknown): val is unknown[] => ((isArray = Array.isArray), isArray(val));
|
|
13
|
+
export let isReadonlyArray = isArray as (val: unknown) => val is readonly unknown[];
|
|
14
|
+
|
|
15
|
+
/** Returns an object if the given value isn't an object, otherwise returns as-is */
|
|
16
|
+
export function maybeObj(x: unknown): object {
|
|
17
|
+
if (typeof x !== 'object') {
|
|
18
|
+
return {};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return x ?? {};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// https://stackoverflow.com/a/34491287
|
|
25
|
+
export function isEmptyObj(obj: Object | null | undefined): boolean {
|
|
26
|
+
if (!obj) return true;
|
|
27
|
+
for (const _k in obj) return false;
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// https://eslint.org/docs/latest/rules/no-prototype-builtins
|
|
32
|
+
export function hasOwn<T extends object = object>(obj: T, key: PropertyKey): key is keyof T {
|
|
33
|
+
return Object.prototype.hasOwnProperty.call(obj, key);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function isObj(obj: unknown): obj is Record<string, unknown> {
|
|
37
|
+
return obj != null && typeof obj === 'object' && !Array.isArray(obj);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export const ensurePresent = <T>(value: T | null | undefined): T => {
|
|
41
|
+
if (value == null) {
|
|
42
|
+
throw new IvyError(`Expected a value to be given but received ${value} instead.`);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return value;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export const validatePositiveInteger = (name: string, n: unknown): number => {
|
|
49
|
+
if (typeof n !== 'number' || !Number.isInteger(n)) {
|
|
50
|
+
throw new IvyError(`${name} must be an integer`);
|
|
51
|
+
}
|
|
52
|
+
if (n < 0) {
|
|
53
|
+
throw new IvyError(`${name} must be a positive integer`);
|
|
54
|
+
}
|
|
55
|
+
return n;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export const coerceInteger = (value: unknown): number => {
|
|
59
|
+
if (typeof value === 'number') return Math.round(value);
|
|
60
|
+
if (typeof value === 'string') return parseInt(value, 10);
|
|
61
|
+
|
|
62
|
+
throw new IvyError(`Could not coerce ${value} (type: ${typeof value}) into a number`);
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export const coerceFloat = (value: unknown): number => {
|
|
66
|
+
if (typeof value === 'number') return value;
|
|
67
|
+
if (typeof value === 'string') return parseFloat(value);
|
|
68
|
+
|
|
69
|
+
throw new IvyError(`Could not coerce ${value} (type: ${typeof value}) into a number`);
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export const coerceBoolean = (value: unknown): boolean => {
|
|
73
|
+
if (typeof value === 'boolean') return value;
|
|
74
|
+
if (typeof value === 'string') return value === 'true';
|
|
75
|
+
return Boolean(value);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export const maybeCoerceInteger = (value: unknown): number | undefined => {
|
|
79
|
+
if (value == null) {
|
|
80
|
+
return undefined;
|
|
81
|
+
}
|
|
82
|
+
return coerceInteger(value);
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export const maybeCoerceFloat = (value: unknown): number | undefined => {
|
|
86
|
+
if (value == null) {
|
|
87
|
+
return undefined;
|
|
88
|
+
}
|
|
89
|
+
return coerceFloat(value);
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export const maybeCoerceBoolean = (value: unknown): boolean | undefined => {
|
|
93
|
+
if (value == null) {
|
|
94
|
+
return undefined;
|
|
95
|
+
}
|
|
96
|
+
return coerceBoolean(value);
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export const safeJSON = (text: string) => {
|
|
100
|
+
try {
|
|
101
|
+
return JSON.parse(text);
|
|
102
|
+
} catch (err) {
|
|
103
|
+
return undefined;
|
|
104
|
+
}
|
|
105
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export * from './utils/values';
|
|
4
|
+
export * from './utils/base64';
|
|
5
|
+
export * from './utils/env';
|
|
6
|
+
export * from './utils/log';
|
|
7
|
+
export * from './utils/uuid';
|
|
8
|
+
export * from './utils/sleep';
|
|
9
|
+
export * from './utils/query';
|
package/src/resource.ts
CHANGED
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import type { Ivy } from './index';
|
|
4
|
-
|
|
5
|
-
export abstract class APIResource {
|
|
6
|
-
protected _client: Ivy;
|
|
7
|
-
|
|
8
|
-
constructor(client: Ivy) {
|
|
9
|
-
this._client = client;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
1
|
+
/** @deprecated Import from ./core/resource instead */
|
|
2
|
+
export * from './core/resource';
|
package/src/resources/balance.ts
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from '../resource';
|
|
4
|
-
import
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
5
6
|
|
|
6
7
|
export class Balance extends APIResource {
|
|
7
8
|
/**
|
|
8
9
|
* Retrieve the balance of your Ivy account. The balance is the money currently
|
|
9
10
|
* available on your Ivy account. It is broken down by currency.
|
|
10
11
|
*/
|
|
11
|
-
retrieve(
|
|
12
|
-
body: BalanceRetrieveParams,
|
|
13
|
-
options?: Core.RequestOptions,
|
|
14
|
-
): Core.APIPromise<BalanceRetrieveResponse> {
|
|
12
|
+
retrieve(body: BalanceRetrieveParams, options?: RequestOptions): APIPromise<BalanceRetrieveResponse> {
|
|
15
13
|
return this._client.post('/api/service/balance/retrieve', { body, ...options });
|
|
16
14
|
}
|
|
17
15
|
}
|
package/src/resources/banks.ts
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from '../resource';
|
|
4
|
-
import
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
5
6
|
|
|
6
7
|
export class Banks extends APIResource {
|
|
7
8
|
/**
|
|
8
9
|
* Retrieve a bank object by its id. The id is a unique identifier of the bank
|
|
9
10
|
* within Ivy.
|
|
10
11
|
*/
|
|
11
|
-
retrieve(body: BankRetrieveParams, options?:
|
|
12
|
+
retrieve(body: BankRetrieveParams, options?: RequestOptions): APIPromise<BankRetrieveResponse> {
|
|
12
13
|
return this._client.post('/api/service/banks/details', { body, ...options });
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* Get a list of banks. You can filter by group, capability and market.
|
|
17
18
|
*/
|
|
18
|
-
list(body: BankListParams, options?:
|
|
19
|
+
list(body: BankListParams, options?: RequestOptions): APIPromise<BankListResponse> {
|
|
19
20
|
return this._client.post('/api/service/banks/list', { body, ...options });
|
|
20
21
|
}
|
|
21
22
|
|
|
@@ -24,7 +25,7 @@ export class Banks extends APIResource {
|
|
|
24
25
|
* is empty (""), a default list of banks is returned. On top, you can filter
|
|
25
26
|
* results by group, capability and market.
|
|
26
27
|
*/
|
|
27
|
-
search(body: BankSearchParams, options?:
|
|
28
|
+
search(body: BankSearchParams, options?: RequestOptions): APIPromise<BankSearchResponse> {
|
|
28
29
|
return this._client.post('/api/service/banks/search', { body, ...options });
|
|
29
30
|
}
|
|
30
31
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from '../resource';
|
|
4
|
-
import
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
5
6
|
|
|
6
7
|
export class BeneficiaryPayouts extends APIResource {
|
|
7
8
|
/**
|
|
@@ -9,7 +10,7 @@ export class BeneficiaryPayouts extends APIResource {
|
|
|
9
10
|
* bank account or wallet. If you want to handle payouts in a more dynamic and
|
|
10
11
|
* granular way, please use the POST /payout/create endpoint.
|
|
11
12
|
*/
|
|
12
|
-
create(options?:
|
|
13
|
+
create(options?: RequestOptions): APIPromise<BeneficiaryPayoutCreateResponse> {
|
|
13
14
|
return this._client.post('/api/service/beneficiary-payout/create', options);
|
|
14
15
|
}
|
|
15
16
|
}
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from '../resource';
|
|
4
|
-
import
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
5
6
|
|
|
6
7
|
export class Capabilities extends APIResource {
|
|
7
8
|
/**
|
|
8
9
|
* Retrieve the capabilities of your Ivy account. The capabilities are broken down
|
|
9
10
|
* by market and by product.
|
|
10
11
|
*/
|
|
11
|
-
retrieve(
|
|
12
|
-
body: CapabilityRetrieveParams,
|
|
13
|
-
options?: Core.RequestOptions,
|
|
14
|
-
): Core.APIPromise<CapabilityRetrieveResponse> {
|
|
12
|
+
retrieve(body: CapabilityRetrieveParams, options?: RequestOptions): APIPromise<CapabilityRetrieveResponse> {
|
|
15
13
|
return this._client.post('/api/service/merchant/capabilities/details', { body, ...options });
|
|
16
14
|
}
|
|
17
15
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from '../resource';
|
|
4
|
-
import
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
5
6
|
|
|
6
7
|
export class Checkoutsession extends APIResource {
|
|
7
8
|
/**
|
|
@@ -11,8 +12,8 @@ export class Checkoutsession extends APIResource {
|
|
|
11
12
|
*/
|
|
12
13
|
create(
|
|
13
14
|
body: CheckoutsessionCreateParams,
|
|
14
|
-
options?:
|
|
15
|
-
):
|
|
15
|
+
options?: RequestOptions,
|
|
16
|
+
): APIPromise<CheckoutsessionCreateResponse> {
|
|
16
17
|
return this._client.post('/api/service/checkout/session/create', { body, ...options });
|
|
17
18
|
}
|
|
18
19
|
|
|
@@ -21,8 +22,8 @@ export class Checkoutsession extends APIResource {
|
|
|
21
22
|
*/
|
|
22
23
|
retrieve(
|
|
23
24
|
body: CheckoutsessionRetrieveParams,
|
|
24
|
-
options?:
|
|
25
|
-
):
|
|
25
|
+
options?: RequestOptions,
|
|
26
|
+
): APIPromise<CheckoutsessionRetrieveResponse> {
|
|
26
27
|
return this._client.post('/api/service/checkout/session/details', { body, ...options });
|
|
27
28
|
}
|
|
28
29
|
|
|
@@ -32,8 +33,8 @@ export class Checkoutsession extends APIResource {
|
|
|
32
33
|
*/
|
|
33
34
|
expire(
|
|
34
35
|
body: CheckoutsessionExpireParams,
|
|
35
|
-
options?:
|
|
36
|
-
):
|
|
36
|
+
options?: RequestOptions,
|
|
37
|
+
): APIPromise<CheckoutsessionExpireResponse> {
|
|
37
38
|
return this._client.post('/api/service/checkout/session/expire', { body, ...options });
|
|
38
39
|
}
|
|
39
40
|
}
|
|
@@ -1,45 +1,43 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from '../resource';
|
|
4
|
-
import
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
5
6
|
|
|
6
7
|
export class Customers extends APIResource {
|
|
7
8
|
/**
|
|
8
9
|
* Create a new Customer representing your Customers. You can use the Customer to
|
|
9
10
|
* simplify the checkout process for returning journeys.
|
|
10
11
|
*/
|
|
11
|
-
create(body: CustomerCreateParams, options?:
|
|
12
|
+
create(body: CustomerCreateParams, options?: RequestOptions): APIPromise<CustomerCreateResponse> {
|
|
12
13
|
return this._client.post('/api/service/customer/create', { body, ...options });
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* Retrieve a Customer Object by its id.
|
|
17
18
|
*/
|
|
18
|
-
retrieve(
|
|
19
|
-
body: CustomerRetrieveParams,
|
|
20
|
-
options?: Core.RequestOptions,
|
|
21
|
-
): Core.APIPromise<CustomerRetrieveResponse> {
|
|
19
|
+
retrieve(body: CustomerRetrieveParams, options?: RequestOptions): APIPromise<CustomerRetrieveResponse> {
|
|
22
20
|
return this._client.post('/api/service/customer/retrieve', { body, ...options });
|
|
23
21
|
}
|
|
24
22
|
|
|
25
23
|
/**
|
|
26
24
|
* Update the Customer details
|
|
27
25
|
*/
|
|
28
|
-
update(body: CustomerUpdateParams, options?:
|
|
26
|
+
update(body: CustomerUpdateParams, options?: RequestOptions): APIPromise<CustomerUpdateResponse> {
|
|
29
27
|
return this._client.post('/api/service/customer/update', { body, ...options });
|
|
30
28
|
}
|
|
31
29
|
|
|
32
30
|
/**
|
|
33
31
|
* Delete a Customer by wiping personal data and marking the customer as deleted.
|
|
34
32
|
*/
|
|
35
|
-
delete(body: CustomerDeleteParams, options?:
|
|
33
|
+
delete(body: CustomerDeleteParams, options?: RequestOptions): APIPromise<CustomerDeleteResponse> {
|
|
36
34
|
return this._client.post('/api/service/customer/delete', { body, ...options });
|
|
37
35
|
}
|
|
38
36
|
|
|
39
37
|
/**
|
|
40
38
|
* Search for customers you have previously created using filters, e.g. by email.
|
|
41
39
|
*/
|
|
42
|
-
search(body: CustomerSearchParams, options?:
|
|
40
|
+
search(body: CustomerSearchParams, options?: RequestOptions): APIPromise<CustomerSearchResponse> {
|
|
43
41
|
return this._client.post('/api/service/customer/search', { body, ...options });
|
|
44
42
|
}
|
|
45
43
|
}
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from '../resource';
|
|
4
|
-
import
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
5
6
|
|
|
6
7
|
export class Deposits extends APIResource {
|
|
7
8
|
/**
|
|
8
9
|
* Retrieves a deposit by its ID.
|
|
9
10
|
*/
|
|
10
|
-
retrieve(
|
|
11
|
-
body: DepositRetrieveParams,
|
|
12
|
-
options?: Core.RequestOptions,
|
|
13
|
-
): Core.APIPromise<DepositRetrieveResponse> {
|
|
11
|
+
retrieve(body: DepositRetrieveParams, options?: RequestOptions): APIPromise<DepositRetrieveResponse> {
|
|
14
12
|
return this._client.post('/api/service/deposit/retrieve', { body, ...options });
|
|
15
13
|
}
|
|
16
14
|
}
|
package/src/resources/fx.ts
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from '../resource';
|
|
4
|
-
import
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
5
6
|
|
|
6
7
|
export class Fx extends APIResource {
|
|
7
8
|
/**
|
|
8
9
|
* Retrieve the details of a past fx transfer using the fxId.
|
|
9
10
|
*/
|
|
10
|
-
retrieve(body: FxRetrieveParams, options?:
|
|
11
|
+
retrieve(body: FxRetrieveParams, options?: RequestOptions): APIPromise<FxRetrieveResponse> {
|
|
11
12
|
return this._client.post('/api/service/fx/retrieve', { body, ...options });
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
/**
|
|
15
16
|
* Execute a standalone foreign exchange transaction.
|
|
16
17
|
*/
|
|
17
|
-
execute(body: FxExecuteParams, options?:
|
|
18
|
+
execute(body: FxExecuteParams, options?: RequestOptions): APIPromise<FxExecuteResponse> {
|
|
18
19
|
return this._client.post('/api/service/fx/execute', { body, ...options });
|
|
19
20
|
}
|
|
20
21
|
|
|
@@ -22,10 +23,7 @@ export class Fx extends APIResource {
|
|
|
22
23
|
* Retrieve the current exchange rate for a given currency pair. The rate is not
|
|
23
24
|
* guaranteed for any following transactions.
|
|
24
25
|
*/
|
|
25
|
-
retrieveRate(
|
|
26
|
-
body: FxRetrieveRateParams,
|
|
27
|
-
options?: Core.RequestOptions,
|
|
28
|
-
): Core.APIPromise<FxRetrieveRateResponse> {
|
|
26
|
+
retrieveRate(body: FxRetrieveRateParams, options?: RequestOptions): APIPromise<FxRetrieveRateResponse> {
|
|
29
27
|
return this._client.post('/api/service/fx/retrieve-rate', { body, ...options });
|
|
30
28
|
}
|
|
31
29
|
}
|
package/src/resources/index.ts
CHANGED
package/src/resources/orders.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from '../resource';
|
|
4
|
-
import
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
5
6
|
|
|
6
7
|
export class Orders extends APIResource {
|
|
7
8
|
/**
|
|
@@ -11,7 +12,7 @@ export class Orders extends APIResource {
|
|
|
11
12
|
* incoming payment. As soon as a payment with the same details arrives, Ivy will
|
|
12
13
|
* update the status of the order.
|
|
13
14
|
*/
|
|
14
|
-
create(body: OrderCreateParams, options?:
|
|
15
|
+
create(body: OrderCreateParams, options?: RequestOptions): APIPromise<OrderCreateResponse> {
|
|
15
16
|
return this._client.post('/api/service/order/create', { body, ...options });
|
|
16
17
|
}
|
|
17
18
|
|
|
@@ -20,14 +21,14 @@ export class Orders extends APIResource {
|
|
|
20
21
|
* internal Ivy order id or the `referenceId` you specified when creating a
|
|
21
22
|
* Checkout Session to the `id` field.
|
|
22
23
|
*/
|
|
23
|
-
retrieve(body: OrderRetrieveParams, options?:
|
|
24
|
+
retrieve(body: OrderRetrieveParams, options?: RequestOptions): APIPromise<OrderRetrieveResponse> {
|
|
24
25
|
return this._client.post('/api/service/order/details', { body, ...options });
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
/**
|
|
28
29
|
* Manually expire an order before its natural expiration time.
|
|
29
30
|
*/
|
|
30
|
-
expire(body: OrderExpireParams, options?:
|
|
31
|
+
expire(body: OrderExpireParams, options?: RequestOptions): APIPromise<OrderExpireResponse> {
|
|
31
32
|
return this._client.post('/api/service/order/expire', { body, ...options });
|
|
32
33
|
}
|
|
33
34
|
}
|
|
@@ -1170,6 +1171,7 @@ export namespace OrderCreateResponse {
|
|
|
1170
1171
|
| 'DISPUTE'
|
|
1171
1172
|
| 'PENDING_PAYMENT_ATTEMPTS_FOUND'
|
|
1172
1173
|
| 'AML_FREEZE'
|
|
1174
|
+
| 'AML_APPROVE'
|
|
1173
1175
|
| 'MANUAL_FREEZE'
|
|
1174
1176
|
| 'MANUAL_UNFREEZE'
|
|
1175
1177
|
| 'ORDER_MANUALLY_REOPENED'
|
|
@@ -2334,6 +2336,7 @@ export namespace OrderRetrieveResponse {
|
|
|
2334
2336
|
| 'DISPUTE'
|
|
2335
2337
|
| 'PENDING_PAYMENT_ATTEMPTS_FOUND'
|
|
2336
2338
|
| 'AML_FREEZE'
|
|
2339
|
+
| 'AML_APPROVE'
|
|
2337
2340
|
| 'MANUAL_FREEZE'
|
|
2338
2341
|
| 'MANUAL_UNFREEZE'
|
|
2339
2342
|
| 'ORDER_MANUALLY_REOPENED'
|
|
@@ -3498,6 +3501,7 @@ export namespace OrderExpireResponse {
|
|
|
3498
3501
|
| 'DISPUTE'
|
|
3499
3502
|
| 'PENDING_PAYMENT_ATTEMPTS_FOUND'
|
|
3500
3503
|
| 'AML_FREEZE'
|
|
3504
|
+
| 'AML_APPROVE'
|
|
3501
3505
|
| 'MANUAL_FREEZE'
|
|
3502
3506
|
| 'MANUAL_UNFREEZE'
|
|
3503
3507
|
| 'ORDER_MANUALLY_REOPENED'
|
package/src/resources/payee.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from '../resource';
|
|
4
|
-
import
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
5
6
|
|
|
6
7
|
export class Payee extends APIResource {
|
|
7
8
|
/**
|
|
@@ -22,7 +23,7 @@ export class Payee extends APIResource {
|
|
|
22
23
|
* - `not_available`: Verification not possible (e.g., bank unreachable, timeout,
|
|
23
24
|
* unsupported)
|
|
24
25
|
*/
|
|
25
|
-
verify(body: PayeeVerifyParams, options?:
|
|
26
|
+
verify(body: PayeeVerifyParams, options?: RequestOptions): APIPromise<PayeeVerifyResponse> {
|
|
26
27
|
return this._client.post('/api/service/payee/verify', { body, ...options });
|
|
27
28
|
}
|
|
28
29
|
}
|
package/src/resources/payouts.ts
CHANGED
|
@@ -1,30 +1,28 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from '../resource';
|
|
4
|
-
import
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
5
6
|
|
|
6
7
|
export class Payouts extends APIResource {
|
|
7
8
|
/**
|
|
8
9
|
* Create a payout for a merchant.
|
|
9
10
|
*/
|
|
10
|
-
create(body: PayoutCreateParams, options?:
|
|
11
|
+
create(body: PayoutCreateParams, options?: RequestOptions): APIPromise<Payout> {
|
|
11
12
|
return this._client.post('/api/service/payout/create', { body, ...options });
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
/**
|
|
15
16
|
* Retrieve a payout object by id.
|
|
16
17
|
*/
|
|
17
|
-
retrieve(
|
|
18
|
-
body: PayoutRetrieveParams,
|
|
19
|
-
options?: Core.RequestOptions,
|
|
20
|
-
): Core.APIPromise<PayoutRetrieveResponse> {
|
|
18
|
+
retrieve(body: PayoutRetrieveParams, options?: RequestOptions): APIPromise<PayoutRetrieveResponse> {
|
|
21
19
|
return this._client.post('/api/service/payout/retrieve', { body, ...options });
|
|
22
20
|
}
|
|
23
21
|
|
|
24
22
|
/**
|
|
25
23
|
* List payouts for a merchant.
|
|
26
24
|
*/
|
|
27
|
-
list(body: PayoutListParams, options?:
|
|
25
|
+
list(body: PayoutListParams, options?: RequestOptions): APIPromise<PayoutListResponse> {
|
|
28
26
|
return this._client.post('/api/service/payout/list', { body, ...options });
|
|
29
27
|
}
|
|
30
28
|
}
|