@rainapi/rain-sdk 0.1.0-alpha.3
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 +71 -0
- package/LICENSE +201 -0
- package/README.md +412 -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 +222 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +222 -0
- package/client.d.ts.map +1 -0
- package/client.js +501 -0
- package/client.js.map +1 -0
- package/client.mjs +497 -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 +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 +6 -0
- package/index.d.mts.map +1 -0
- package/index.d.ts +6 -0
- package/index.d.ts.map +1 -0
- package/index.js +30 -0
- package/index.js.map +1 -0
- package/index.mjs +7 -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 +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/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 +7 -0
- package/internal/utils.d.mts.map +1 -0
- package/internal/utils.d.ts +7 -0
- package/internal/utils.d.ts.map +1 -0
- package/internal/utils.js +11 -0
- package/internal/utils.js.map +1 -0
- package/internal/utils.mjs +8 -0
- package/internal/utils.mjs.map +1 -0
- package/package.json +138 -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/applications/applications.d.mts +14 -0
- package/resources/applications/applications.d.mts.map +1 -0
- package/resources/applications/applications.d.ts +14 -0
- package/resources/applications/applications.d.ts.map +1 -0
- package/resources/applications/applications.js +21 -0
- package/resources/applications/applications.js.map +1 -0
- package/resources/applications/applications.mjs +16 -0
- package/resources/applications/applications.mjs.map +1 -0
- package/resources/applications/company/company.d.mts +584 -0
- package/resources/applications/company/company.d.mts.map +1 -0
- package/resources/applications/company/company.d.ts +584 -0
- package/resources/applications/company/company.d.ts.map +1 -0
- package/resources/applications/company/company.js +138 -0
- package/resources/applications/company/company.js.map +1 -0
- package/resources/applications/company/company.mjs +133 -0
- package/resources/applications/company/company.mjs.map +1 -0
- package/resources/applications/company/index.d.mts +3 -0
- package/resources/applications/company/index.d.mts.map +1 -0
- package/resources/applications/company/index.d.ts +3 -0
- package/resources/applications/company/index.d.ts.map +1 -0
- package/resources/applications/company/index.js +9 -0
- package/resources/applications/company/index.js.map +1 -0
- package/resources/applications/company/index.mjs +4 -0
- package/resources/applications/company/index.mjs.map +1 -0
- package/resources/applications/company/ubo/document.d.mts +50 -0
- package/resources/applications/company/ubo/document.d.mts.map +1 -0
- package/resources/applications/company/ubo/document.d.ts +50 -0
- package/resources/applications/company/ubo/document.d.ts.map +1 -0
- package/resources/applications/company/ubo/document.js +32 -0
- package/resources/applications/company/ubo/document.js.map +1 -0
- package/resources/applications/company/ubo/document.mjs +28 -0
- package/resources/applications/company/ubo/document.mjs.map +1 -0
- package/resources/applications/company/ubo/index.d.mts +3 -0
- package/resources/applications/company/ubo/index.d.mts.map +1 -0
- package/resources/applications/company/ubo/index.d.ts +3 -0
- package/resources/applications/company/ubo/index.d.ts.map +1 -0
- package/resources/applications/company/ubo/index.js +9 -0
- package/resources/applications/company/ubo/index.js.map +1 -0
- package/resources/applications/company/ubo/index.mjs +4 -0
- package/resources/applications/company/ubo/index.mjs.map +1 -0
- package/resources/applications/company/ubo/ubo.d.mts +96 -0
- package/resources/applications/company/ubo/ubo.d.mts.map +1 -0
- package/resources/applications/company/ubo/ubo.d.ts +96 -0
- package/resources/applications/company/ubo/ubo.d.ts.map +1 -0
- package/resources/applications/company/ubo/ubo.js +48 -0
- package/resources/applications/company/ubo/ubo.js.map +1 -0
- package/resources/applications/company/ubo/ubo.mjs +43 -0
- package/resources/applications/company/ubo/ubo.mjs.map +1 -0
- package/resources/applications/company/ubo.d.mts +2 -0
- package/resources/applications/company/ubo.d.mts.map +1 -0
- package/resources/applications/company/ubo.d.ts +2 -0
- package/resources/applications/company/ubo.d.ts.map +1 -0
- package/resources/applications/company/ubo.js +6 -0
- package/resources/applications/company/ubo.js.map +1 -0
- package/resources/applications/company/ubo.mjs +3 -0
- package/resources/applications/company/ubo.mjs.map +1 -0
- package/resources/applications/company.d.mts +2 -0
- package/resources/applications/company.d.mts.map +1 -0
- package/resources/applications/company.d.ts +2 -0
- package/resources/applications/company.d.ts.map +1 -0
- package/resources/applications/company.js +6 -0
- package/resources/applications/company.js.map +1 -0
- package/resources/applications/company.mjs +3 -0
- package/resources/applications/company.mjs.map +1 -0
- package/resources/applications/index.d.mts +4 -0
- package/resources/applications/index.d.mts.map +1 -0
- package/resources/applications/index.d.ts +4 -0
- package/resources/applications/index.d.ts.map +1 -0
- package/resources/applications/index.js +11 -0
- package/resources/applications/index.js.map +1 -0
- package/resources/applications/index.mjs +5 -0
- package/resources/applications/index.mjs.map +1 -0
- package/resources/applications/user.d.mts +507 -0
- package/resources/applications/user.d.mts.map +1 -0
- package/resources/applications/user.d.ts +507 -0
- package/resources/applications/user.d.ts.map +1 -0
- package/resources/applications/user.js +103 -0
- package/resources/applications/user.js.map +1 -0
- package/resources/applications/user.mjs +99 -0
- package/resources/applications/user.mjs.map +1 -0
- package/resources/applications.d.mts +2 -0
- package/resources/applications.d.mts.map +1 -0
- package/resources/applications.d.ts +2 -0
- package/resources/applications.d.ts.map +1 -0
- package/resources/applications.js +6 -0
- package/resources/applications.js.map +1 -0
- package/resources/applications.mjs +3 -0
- package/resources/applications.mjs.map +1 -0
- package/resources/balances.d.mts +37 -0
- package/resources/balances.d.mts.map +1 -0
- package/resources/balances.d.ts +37 -0
- package/resources/balances.d.ts.map +1 -0
- package/resources/balances.js +17 -0
- package/resources/balances.js.map +1 -0
- package/resources/balances.mjs +13 -0
- package/resources/balances.mjs.map +1 -0
- package/resources/cards/cards.d.mts +188 -0
- package/resources/cards/cards.d.mts.map +1 -0
- package/resources/cards/cards.d.ts +188 -0
- package/resources/cards/cards.d.ts.map +1 -0
- package/resources/cards/cards.js +50 -0
- package/resources/cards/cards.js.map +1 -0
- package/resources/cards/cards.mjs +45 -0
- package/resources/cards/cards.mjs.map +1 -0
- package/resources/cards/index.d.mts +3 -0
- package/resources/cards/index.d.mts.map +1 -0
- package/resources/cards/index.d.ts +3 -0
- package/resources/cards/index.d.ts.map +1 -0
- package/resources/cards/index.js +9 -0
- package/resources/cards/index.js.map +1 -0
- package/resources/cards/index.mjs +4 -0
- package/resources/cards/index.mjs.map +1 -0
- package/resources/cards/pin.d.mts +73 -0
- package/resources/cards/pin.d.mts.map +1 -0
- package/resources/cards/pin.d.ts +73 -0
- package/resources/cards/pin.d.ts.map +1 -0
- package/resources/cards/pin.js +32 -0
- package/resources/cards/pin.js.map +1 -0
- package/resources/cards/pin.mjs +28 -0
- package/resources/cards/pin.mjs.map +1 -0
- package/resources/cards.d.mts +2 -0
- package/resources/cards.d.mts.map +1 -0
- package/resources/cards.d.ts +2 -0
- package/resources/cards.d.ts.map +1 -0
- package/resources/cards.js +6 -0
- package/resources/cards.js.map +1 -0
- package/resources/cards.mjs +3 -0
- package/resources/cards.mjs.map +1 -0
- package/resources/companies/companies.d.mts +252 -0
- package/resources/companies/companies.d.mts.map +1 -0
- package/resources/companies/companies.d.ts +252 -0
- package/resources/companies/companies.d.ts.map +1 -0
- package/resources/companies/companies.js +69 -0
- package/resources/companies/companies.js.map +1 -0
- package/resources/companies/companies.mjs +64 -0
- package/resources/companies/companies.mjs.map +1 -0
- package/resources/companies/index.d.mts +3 -0
- package/resources/companies/index.d.mts.map +1 -0
- package/resources/companies/index.d.ts +3 -0
- package/resources/companies/index.d.ts.map +1 -0
- package/resources/companies/index.js +9 -0
- package/resources/companies/index.js.map +1 -0
- package/resources/companies/index.mjs +4 -0
- package/resources/companies/index.mjs.map +1 -0
- package/resources/companies/signatures.d.mts +122 -0
- package/resources/companies/signatures.d.mts.map +1 -0
- package/resources/companies/signatures.d.ts +122 -0
- package/resources/companies/signatures.d.ts.map +1 -0
- package/resources/companies/signatures.js +24 -0
- package/resources/companies/signatures.js.map +1 -0
- package/resources/companies/signatures.mjs +20 -0
- package/resources/companies/signatures.mjs.map +1 -0
- package/resources/companies.d.mts +2 -0
- package/resources/companies.d.mts.map +1 -0
- package/resources/companies.d.ts +2 -0
- package/resources/companies.d.ts.map +1 -0
- package/resources/companies.js +6 -0
- package/resources/companies.js.map +1 -0
- package/resources/companies.mjs +3 -0
- package/resources/companies.mjs.map +1 -0
- package/resources/contracts.d.mts +15 -0
- package/resources/contracts.d.mts.map +1 -0
- package/resources/contracts.d.ts +15 -0
- package/resources/contracts.d.ts.map +1 -0
- package/resources/contracts.js +15 -0
- package/resources/contracts.js.map +1 -0
- package/resources/contracts.mjs +11 -0
- package/resources/contracts.mjs.map +1 -0
- package/resources/disputes/disputes.d.mts +88 -0
- package/resources/disputes/disputes.d.mts.map +1 -0
- package/resources/disputes/disputes.d.ts +88 -0
- package/resources/disputes/disputes.d.ts.map +1 -0
- package/resources/disputes/disputes.js +42 -0
- package/resources/disputes/disputes.js.map +1 -0
- package/resources/disputes/disputes.mjs +37 -0
- package/resources/disputes/disputes.mjs.map +1 -0
- package/resources/disputes/evidence.d.mts +32 -0
- package/resources/disputes/evidence.d.mts.map +1 -0
- package/resources/disputes/evidence.d.ts +32 -0
- package/resources/disputes/evidence.d.ts.map +1 -0
- package/resources/disputes/evidence.js +28 -0
- package/resources/disputes/evidence.js.map +1 -0
- package/resources/disputes/evidence.mjs +24 -0
- package/resources/disputes/evidence.mjs.map +1 -0
- package/resources/disputes/index.d.mts +3 -0
- package/resources/disputes/index.d.mts.map +1 -0
- package/resources/disputes/index.d.ts +3 -0
- package/resources/disputes/index.d.ts.map +1 -0
- package/resources/disputes/index.js +9 -0
- package/resources/disputes/index.js.map +1 -0
- package/resources/disputes/index.mjs +4 -0
- package/resources/disputes/index.mjs.map +1 -0
- package/resources/disputes.d.mts +2 -0
- package/resources/disputes.d.mts.map +1 -0
- package/resources/disputes.d.ts +2 -0
- package/resources/disputes.d.ts.map +1 -0
- package/resources/disputes.js +6 -0
- package/resources/disputes.js.map +1 -0
- package/resources/disputes.mjs +3 -0
- package/resources/disputes.mjs.map +1 -0
- package/resources/index.d.mts +12 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +12 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +27 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +13 -0
- package/resources/index.mjs.map +1 -0
- package/resources/keys.d.mts +51 -0
- package/resources/keys.d.mts.map +1 -0
- package/resources/keys.d.ts +51 -0
- package/resources/keys.d.ts.map +1 -0
- package/resources/keys.js +28 -0
- package/resources/keys.js.map +1 -0
- package/resources/keys.mjs +24 -0
- package/resources/keys.mjs.map +1 -0
- package/resources/payments.d.mts +35 -0
- package/resources/payments.d.mts.map +1 -0
- package/resources/payments.d.ts +35 -0
- package/resources/payments.d.ts.map +1 -0
- package/resources/payments.js +17 -0
- package/resources/payments.js.map +1 -0
- package/resources/payments.mjs +13 -0
- package/resources/payments.mjs.map +1 -0
- package/resources/signatures.d.mts +65 -0
- package/resources/signatures.d.mts.map +1 -0
- package/resources/signatures.d.ts +65 -0
- package/resources/signatures.d.ts.map +1 -0
- package/resources/signatures.js +23 -0
- package/resources/signatures.js.map +1 -0
- package/resources/signatures.mjs +19 -0
- package/resources/signatures.mjs.map +1 -0
- package/resources/transactions/index.d.mts +3 -0
- package/resources/transactions/index.d.mts.map +1 -0
- package/resources/transactions/index.d.ts +3 -0
- package/resources/transactions/index.d.ts.map +1 -0
- package/resources/transactions/index.js +9 -0
- package/resources/transactions/index.js.map +1 -0
- package/resources/transactions/index.mjs +4 -0
- package/resources/transactions/index.mjs.map +1 -0
- package/resources/transactions/receipt.d.mts +26 -0
- package/resources/transactions/receipt.d.mts.map +1 -0
- package/resources/transactions/receipt.d.ts +26 -0
- package/resources/transactions/receipt.d.ts.map +1 -0
- package/resources/transactions/receipt.js +30 -0
- package/resources/transactions/receipt.js.map +1 -0
- package/resources/transactions/receipt.mjs +26 -0
- package/resources/transactions/receipt.mjs.map +1 -0
- package/resources/transactions/transactions.d.mts +401 -0
- package/resources/transactions/transactions.d.mts.map +1 -0
- package/resources/transactions/transactions.d.ts +401 -0
- package/resources/transactions/transactions.d.ts.map +1 -0
- package/resources/transactions/transactions.js +52 -0
- package/resources/transactions/transactions.js.map +1 -0
- package/resources/transactions/transactions.mjs +47 -0
- package/resources/transactions/transactions.mjs.map +1 -0
- package/resources/transactions.d.mts +2 -0
- package/resources/transactions.d.mts.map +1 -0
- package/resources/transactions.d.ts +2 -0
- package/resources/transactions.d.ts.map +1 -0
- package/resources/transactions.js +6 -0
- package/resources/transactions.js.map +1 -0
- package/resources/transactions.mjs +3 -0
- package/resources/transactions.mjs.map +1 -0
- package/resources/users/index.d.mts +3 -0
- package/resources/users/index.d.mts.map +1 -0
- package/resources/users/index.d.ts +3 -0
- package/resources/users/index.d.ts.map +1 -0
- package/resources/users/index.js +9 -0
- package/resources/users/index.js.map +1 -0
- package/resources/users/index.mjs +4 -0
- package/resources/users/index.mjs.map +1 -0
- package/resources/users/signatures.d.mts +92 -0
- package/resources/users/signatures.d.mts.map +1 -0
- package/resources/users/signatures.d.ts +92 -0
- package/resources/users/signatures.d.ts.map +1 -0
- package/resources/users/signatures.js +51 -0
- package/resources/users/signatures.js.map +1 -0
- package/resources/users/signatures.mjs +47 -0
- package/resources/users/signatures.mjs.map +1 -0
- package/resources/users/users.d.mts +349 -0
- package/resources/users/users.d.mts.map +1 -0
- package/resources/users/users.d.ts +349 -0
- package/resources/users/users.d.ts.map +1 -0
- package/resources/users/users.js +174 -0
- package/resources/users/users.js.map +1 -0
- package/resources/users/users.mjs +169 -0
- package/resources/users/users.mjs.map +1 -0
- package/resources/users.d.mts +2 -0
- package/resources/users.d.mts.map +1 -0
- package/resources/users.d.ts +2 -0
- package/resources/users.d.ts.map +1 -0
- package/resources/users.js +6 -0
- package/resources/users.js.map +1 -0
- package/resources/users.mjs +3 -0
- package/resources/users.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 +914 -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/resource.ts +11 -0
- package/src/core/uploads.ts +2 -0
- package/src/error.ts +2 -0
- package/src/index.ts +22 -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 +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/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 +8 -0
- package/src/lib/.keep +4 -0
- package/src/resource.ts +2 -0
- package/src/resources/applications/applications.ts +61 -0
- package/src/resources/applications/company/company.ts +750 -0
- package/src/resources/applications/company/index.ts +15 -0
- package/src/resources/applications/company/ubo/document.ts +89 -0
- package/src/resources/applications/company/ubo/index.ts +4 -0
- package/src/resources/applications/company/ubo/ubo.ts +158 -0
- package/src/resources/applications/company/ubo.ts +3 -0
- package/src/resources/applications/company.ts +3 -0
- package/src/resources/applications/index.ts +25 -0
- package/src/resources/applications/user.ts +666 -0
- package/src/resources/applications.ts +3 -0
- package/src/resources/balances.ts +47 -0
- package/src/resources/cards/cards.ts +274 -0
- package/src/resources/cards/index.ts +14 -0
- package/src/resources/cards/pin.ts +108 -0
- package/src/resources/cards.ts +3 -0
- package/src/resources/companies/companies.ts +371 -0
- package/src/resources/companies/index.ts +23 -0
- package/src/resources/companies/signatures.ts +162 -0
- package/src/resources/companies.ts +3 -0
- package/src/resources/contracts.ts +21 -0
- package/src/resources/disputes/disputes.ts +135 -0
- package/src/resources/disputes/evidence.ts +56 -0
- package/src/resources/disputes/index.ts +10 -0
- package/src/resources/disputes.ts +3 -0
- package/src/resources/index.ts +66 -0
- package/src/resources/keys.ts +70 -0
- package/src/resources/payments.ts +47 -0
- package/src/resources/signatures.ts +91 -0
- package/src/resources/transactions/index.ts +11 -0
- package/src/resources/transactions/receipt.ts +48 -0
- package/src/resources/transactions/transactions.ts +522 -0
- package/src/resources/transactions.ts +3 -0
- package/src/resources/users/index.ts +20 -0
- package/src/resources/users/signatures.ts +121 -0
- package/src/resources/users/users.ts +471 -0
- package/src/resources/users.ts +3 -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,522 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as DisputesAPI from '../disputes/disputes';
|
|
5
|
+
import * as ReceiptAPI from './receipt';
|
|
6
|
+
import { Receipt, ReceiptUploadParams } from './receipt';
|
|
7
|
+
import { APIPromise } from '../../core/api-promise';
|
|
8
|
+
import { buildHeaders } from '../../internal/headers';
|
|
9
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
10
|
+
import { path } from '../../internal/utils/path';
|
|
11
|
+
|
|
12
|
+
export class Transactions extends APIResource {
|
|
13
|
+
receipt: ReceiptAPI.Receipt = new ReceiptAPI.Receipt(this._client);
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* This endpoint retrieves a transaction by its unique ID. The transaction
|
|
17
|
+
* information returned includes details such as the transaction type, amount, and
|
|
18
|
+
* status.
|
|
19
|
+
*/
|
|
20
|
+
retrieve(transactionID: string, options?: RequestOptions): APIPromise<IssuingTransaction> {
|
|
21
|
+
return this._client.get(path`/transactions/${transactionID}`, options);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* This endpoint allows updating a specific transaction by its ID. You can modify
|
|
26
|
+
* the transaction's memo or other editable fields.
|
|
27
|
+
*/
|
|
28
|
+
update(
|
|
29
|
+
transactionID: string,
|
|
30
|
+
body: TransactionUpdateParams | null | undefined = {},
|
|
31
|
+
options?: RequestOptions,
|
|
32
|
+
): APIPromise<void> {
|
|
33
|
+
return this._client.patch(path`/transactions/${transactionID}`, {
|
|
34
|
+
body,
|
|
35
|
+
...options,
|
|
36
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* This endpoint retrieves all transactions associated with corporate cards, users,
|
|
42
|
+
* or specific cards.
|
|
43
|
+
*/
|
|
44
|
+
list(
|
|
45
|
+
query: TransactionListParams | null | undefined = {},
|
|
46
|
+
options?: RequestOptions,
|
|
47
|
+
): APIPromise<TransactionListResponse> {
|
|
48
|
+
return this._client.get('/transactions', { query, ...options });
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* This endpoint allows the creation of a dispute for a specific transaction. The
|
|
53
|
+
* dispute can include textual evidence to support the claim.
|
|
54
|
+
*/
|
|
55
|
+
createDispute(
|
|
56
|
+
transactionID: string,
|
|
57
|
+
body: TransactionCreateDisputeParams | null | undefined = {},
|
|
58
|
+
options?: RequestOptions,
|
|
59
|
+
): APIPromise<DisputesAPI.IssuingDispute> {
|
|
60
|
+
return this._client.post(path`/transactions/${transactionID}/disputes`, { body, ...options });
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Represents a transaction of type 'spend'. This includes details such as the
|
|
66
|
+
* transaction amount, merchant, and the associated user.
|
|
67
|
+
*/
|
|
68
|
+
export type IssuingTransaction =
|
|
69
|
+
| IssuingTransaction.SpendTransaction
|
|
70
|
+
| IssuingTransaction.CollateralTransaction
|
|
71
|
+
| IssuingTransaction.PaymentTransaction
|
|
72
|
+
| IssuingTransaction.FeeTransaction;
|
|
73
|
+
|
|
74
|
+
export namespace IssuingTransaction {
|
|
75
|
+
/**
|
|
76
|
+
* Represents a transaction of type 'spend'. This includes details such as the
|
|
77
|
+
* transaction amount, merchant, and the associated user.
|
|
78
|
+
*/
|
|
79
|
+
export interface SpendTransaction {
|
|
80
|
+
/**
|
|
81
|
+
* The unique identifier of the transaction
|
|
82
|
+
*/
|
|
83
|
+
id: string;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Details specific to a spend transaction, including merchant, amount, and user
|
|
87
|
+
* information.
|
|
88
|
+
*/
|
|
89
|
+
spend: SpendTransaction.Spend;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* The type of transaction
|
|
93
|
+
*/
|
|
94
|
+
type: 'spend';
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export namespace SpendTransaction {
|
|
98
|
+
/**
|
|
99
|
+
* Details specific to a spend transaction, including merchant, amount, and user
|
|
100
|
+
* information.
|
|
101
|
+
*/
|
|
102
|
+
export interface Spend {
|
|
103
|
+
/**
|
|
104
|
+
* The amount of the transaction, in cents
|
|
105
|
+
*/
|
|
106
|
+
amount: number;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* The time at which the transaction was authorized
|
|
110
|
+
*/
|
|
111
|
+
authorizedAt: string;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* The unique identifier of the card used for the transaction
|
|
115
|
+
*/
|
|
116
|
+
cardId: string;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* The type of card used for the transaction
|
|
120
|
+
*/
|
|
121
|
+
cardType: 'physical' | 'virtual';
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* The currency of the transaction
|
|
125
|
+
*/
|
|
126
|
+
currency: string;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* The category of the merchant (e.g., electronics, food)
|
|
130
|
+
*/
|
|
131
|
+
merchantCategory: string;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* The merchant's category code
|
|
135
|
+
*/
|
|
136
|
+
merchantCategoryCode: string;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* The name of the merchant where the transaction took place
|
|
140
|
+
*/
|
|
141
|
+
merchantName: string;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Indicates whether a receipt was generated for the transaction
|
|
145
|
+
*/
|
|
146
|
+
receipt: boolean;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* The status of the transaction
|
|
150
|
+
*/
|
|
151
|
+
status: 'pending' | 'reversed' | 'declined' | 'completed';
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* The email address of the user who made the transaction
|
|
155
|
+
*/
|
|
156
|
+
userEmail: string;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* The first name of the user who made the transaction
|
|
160
|
+
*/
|
|
161
|
+
userFirstName: string;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* The identifier of the user who made the transaction
|
|
165
|
+
*/
|
|
166
|
+
userId: string;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* The last name of the user who made the transaction
|
|
170
|
+
*/
|
|
171
|
+
userLastName: string;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* The method used for authorization of the transaction
|
|
175
|
+
*/
|
|
176
|
+
authorizationMethod?: string;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* The authorized amount of the transaction, in cents
|
|
180
|
+
*/
|
|
181
|
+
authorizedAmount?: number;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* The identifier of the company under which the transaction was made
|
|
185
|
+
*/
|
|
186
|
+
companyId?: string;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* The reason why the transaction was declined
|
|
190
|
+
*/
|
|
191
|
+
declinedReason?: string;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* An enriched category of the merchant, providing further details
|
|
195
|
+
*/
|
|
196
|
+
enrichedMerchantCategory?: string;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* The enriched icon of the merchant
|
|
200
|
+
*/
|
|
201
|
+
enrichedMerchantIcon?: string;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* An enriched name of the merchant, possibly with additional information
|
|
205
|
+
*/
|
|
206
|
+
enrichedMerchantName?: string;
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* The amount of the transaction in local currency, in cents
|
|
210
|
+
*/
|
|
211
|
+
localAmount?: number;
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* The local currency of the transaction
|
|
215
|
+
*/
|
|
216
|
+
localCurrency?: string;
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* A memo or note associated with the transaction
|
|
220
|
+
*/
|
|
221
|
+
memo?: string;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* The time at which the transaction was posted
|
|
225
|
+
*/
|
|
226
|
+
postedAt?: string;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Represents a collateral transaction, where a user provides collateral for a
|
|
232
|
+
* transaction.
|
|
233
|
+
*/
|
|
234
|
+
export interface CollateralTransaction {
|
|
235
|
+
/**
|
|
236
|
+
* The unique identifier of the transaction
|
|
237
|
+
*/
|
|
238
|
+
id: string;
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Details of the collateral transaction, including amount, currency, and
|
|
242
|
+
* transaction details.
|
|
243
|
+
*/
|
|
244
|
+
collateral: CollateralTransaction.Collateral;
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* The type of transaction, in this case, a collateral transaction
|
|
248
|
+
*/
|
|
249
|
+
type: 'collateral';
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
export namespace CollateralTransaction {
|
|
253
|
+
/**
|
|
254
|
+
* Details of the collateral transaction, including amount, currency, and
|
|
255
|
+
* transaction details.
|
|
256
|
+
*/
|
|
257
|
+
export interface Collateral {
|
|
258
|
+
/**
|
|
259
|
+
* The amount of the collateral transaction, in cents
|
|
260
|
+
*/
|
|
261
|
+
amount: number;
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* The chain ID (base-10 number) that the collateral transaction is on
|
|
265
|
+
*/
|
|
266
|
+
chainId: number;
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* The currency of the collateral transaction
|
|
270
|
+
*/
|
|
271
|
+
currency: string;
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* The hash of the collateral transaction
|
|
275
|
+
*/
|
|
276
|
+
transactionHash: string;
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* The wallet address the collateral was added from
|
|
280
|
+
*/
|
|
281
|
+
walletAddress: string;
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* The identifier of the company under which the collateral transaction was made
|
|
285
|
+
*/
|
|
286
|
+
companyId?: string;
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* A memo or note associated with the collateral transaction
|
|
290
|
+
*/
|
|
291
|
+
memo?: string;
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* The time at which the collateral transaction was posted
|
|
295
|
+
*/
|
|
296
|
+
postedAt?: string;
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* The identifier of the user who provided the collateral
|
|
300
|
+
*/
|
|
301
|
+
userId?: string;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* Represents a payment transaction, where a payment is made for a particular
|
|
307
|
+
* service or product.
|
|
308
|
+
*/
|
|
309
|
+
export interface PaymentTransaction {
|
|
310
|
+
/**
|
|
311
|
+
* The unique identifier of the payment transaction
|
|
312
|
+
*/
|
|
313
|
+
id: string;
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Details of the payment transaction, including amount, currency, and status.
|
|
317
|
+
*/
|
|
318
|
+
payment: PaymentTransaction.Payment;
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* The type of transaction
|
|
322
|
+
*/
|
|
323
|
+
type: 'payment';
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
export namespace PaymentTransaction {
|
|
327
|
+
/**
|
|
328
|
+
* Details of the payment transaction, including amount, currency, and status.
|
|
329
|
+
*/
|
|
330
|
+
export interface Payment {
|
|
331
|
+
/**
|
|
332
|
+
* The amount of the transaction, in cents
|
|
333
|
+
*/
|
|
334
|
+
amount: number;
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* The currency of the transaction
|
|
338
|
+
*/
|
|
339
|
+
currency: string;
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* The status of the transaction
|
|
343
|
+
*/
|
|
344
|
+
status: 'pending' | 'completed';
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* The chain ID (base-10 number) that the payment transaction is on
|
|
348
|
+
*/
|
|
349
|
+
chainId?: number;
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* The identifier of the company under which the payment transaction was made
|
|
353
|
+
*/
|
|
354
|
+
companyId?: string;
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* The memo or note associated with the transaction
|
|
358
|
+
*/
|
|
359
|
+
memo?: string;
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* The time at which the payment transaction was posted
|
|
363
|
+
*/
|
|
364
|
+
postedAt?: string;
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* The hash of the payment transaction
|
|
368
|
+
*/
|
|
369
|
+
transactionHash?: string;
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* The identifier of the user who made the payment
|
|
373
|
+
*/
|
|
374
|
+
userId?: string;
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* The wallet address from which the payment was made
|
|
378
|
+
*/
|
|
379
|
+
walletAddress?: string;
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* Represents a fee transaction, where a fee is charged for a service or product.
|
|
385
|
+
*/
|
|
386
|
+
export interface FeeTransaction {
|
|
387
|
+
/**
|
|
388
|
+
* The identifier of the fee transaction
|
|
389
|
+
*/
|
|
390
|
+
id: string;
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* Details of the fee transaction, including amount, description, and status.
|
|
394
|
+
*/
|
|
395
|
+
fee: FeeTransaction.Fee;
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* The type of transaction, in this case, a fee transaction
|
|
399
|
+
*/
|
|
400
|
+
type: 'fee';
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
export namespace FeeTransaction {
|
|
404
|
+
/**
|
|
405
|
+
* Details of the fee transaction, including amount, description, and status.
|
|
406
|
+
*/
|
|
407
|
+
export interface Fee {
|
|
408
|
+
/**
|
|
409
|
+
* The amount of the fee, in cents
|
|
410
|
+
*/
|
|
411
|
+
amount: number;
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* The identifier of the company to which the fee was charged
|
|
415
|
+
*/
|
|
416
|
+
companyId?: string;
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* The description of the fee
|
|
420
|
+
*/
|
|
421
|
+
description?: string;
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* The time at which the fee was posted
|
|
425
|
+
*/
|
|
426
|
+
postedAt?: string;
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* The identifier of the user to whom the fee was charged
|
|
430
|
+
*/
|
|
431
|
+
userId?: string;
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
export type TransactionListResponse = Array<IssuingTransaction>;
|
|
437
|
+
|
|
438
|
+
export interface TransactionUpdateParams {
|
|
439
|
+
/**
|
|
440
|
+
* A memo or note to attach to the transaction, providing additional information or
|
|
441
|
+
* context
|
|
442
|
+
*/
|
|
443
|
+
memo?: string;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
export interface TransactionListParams {
|
|
447
|
+
/**
|
|
448
|
+
* Filter transactions authorized after a specific date
|
|
449
|
+
*/
|
|
450
|
+
authorizedAfter?: string;
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* Filter transactions authorized before a specific date
|
|
454
|
+
*/
|
|
455
|
+
authorizedBefore?: string;
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* The ID of the card to get transactions for
|
|
459
|
+
*/
|
|
460
|
+
cardId?: string;
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* For corporate cards, the identifier of the company to get transactions for
|
|
464
|
+
*/
|
|
465
|
+
companyId?: string;
|
|
466
|
+
|
|
467
|
+
/**
|
|
468
|
+
* The ID of the resource after which to start fetching
|
|
469
|
+
*/
|
|
470
|
+
cursor?: string;
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* The number of resources to fetch
|
|
474
|
+
*/
|
|
475
|
+
limit?: number;
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* Filter transactions posted after a specific date
|
|
479
|
+
*/
|
|
480
|
+
postedAfter?: string;
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* Filter transactions posted before a specific date
|
|
484
|
+
*/
|
|
485
|
+
postedBefore?: string;
|
|
486
|
+
|
|
487
|
+
/**
|
|
488
|
+
* The hash of the transaction to retrieve
|
|
489
|
+
*/
|
|
490
|
+
transactionHash?: string;
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* The type of transactions to retrieve
|
|
494
|
+
*/
|
|
495
|
+
type?: Array<'spend' | 'collateral' | 'payment' | 'fee'>;
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* The ID of the user to get transactions for
|
|
499
|
+
*/
|
|
500
|
+
userId?: string;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
export interface TransactionCreateDisputeParams {
|
|
504
|
+
/**
|
|
505
|
+
* The textual evidence that supports the dispute
|
|
506
|
+
*/
|
|
507
|
+
textEvidence?: string;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
Transactions.Receipt = Receipt;
|
|
511
|
+
|
|
512
|
+
export declare namespace Transactions {
|
|
513
|
+
export {
|
|
514
|
+
type IssuingTransaction as IssuingTransaction,
|
|
515
|
+
type TransactionListResponse as TransactionListResponse,
|
|
516
|
+
type TransactionUpdateParams as TransactionUpdateParams,
|
|
517
|
+
type TransactionListParams as TransactionListParams,
|
|
518
|
+
type TransactionCreateDisputeParams as TransactionCreateDisputeParams,
|
|
519
|
+
};
|
|
520
|
+
|
|
521
|
+
export { Receipt as Receipt, type ReceiptUploadParams as ReceiptUploadParams };
|
|
522
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
Signatures,
|
|
5
|
+
type SignatureRetrievePaymentSignatureParams,
|
|
6
|
+
type SignatureRetrieveWithdrawalSignatureParams,
|
|
7
|
+
} from './signatures';
|
|
8
|
+
export {
|
|
9
|
+
Users,
|
|
10
|
+
type UserListResponse,
|
|
11
|
+
type UserInitiatePaymentResponse,
|
|
12
|
+
type UserRetrieveBalancesResponse,
|
|
13
|
+
type UserRetrieveContractsResponse,
|
|
14
|
+
type UserCreateParams,
|
|
15
|
+
type UserUpdateParams,
|
|
16
|
+
type UserListParams,
|
|
17
|
+
type UserCreateCardParams,
|
|
18
|
+
type UserCreateChargeParams,
|
|
19
|
+
type UserInitiatePaymentParams,
|
|
20
|
+
} from './users';
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as SignaturesAPI from '../companies/signatures';
|
|
5
|
+
import { APIPromise } from '../../core/api-promise';
|
|
6
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
7
|
+
import { path } from '../../internal/utils/path';
|
|
8
|
+
|
|
9
|
+
export class Signatures extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* This endpoint retrieves the payment signature for a specific user. The signature
|
|
12
|
+
* is used to authorize a payment transaction for the user.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const issuingSignature =
|
|
17
|
+
* await client.users.signatures.retrievePaymentSignature(
|
|
18
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
19
|
+
* {
|
|
20
|
+
* token: 'token',
|
|
21
|
+
* adminAddress: 'adminAddress',
|
|
22
|
+
* amount: 'amount',
|
|
23
|
+
* },
|
|
24
|
+
* );
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
retrievePaymentSignature(
|
|
28
|
+
userID: string,
|
|
29
|
+
query: SignatureRetrievePaymentSignatureParams,
|
|
30
|
+
options?: RequestOptions,
|
|
31
|
+
): APIPromise<SignaturesAPI.IssuingSignature> {
|
|
32
|
+
return this._client.get(path`/users/${userID}/signatures/payments`, { query, ...options });
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* This endpoint retrieves the withdrawal signature for a specific user. The
|
|
37
|
+
* signature is required to authorize a withdrawal transaction for the user.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* const issuingSignature =
|
|
42
|
+
* await client.users.signatures.retrieveWithdrawalSignature(
|
|
43
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
44
|
+
* {
|
|
45
|
+
* token: 'token',
|
|
46
|
+
* adminAddress: 'adminAddress',
|
|
47
|
+
* amount: 'amount',
|
|
48
|
+
* recipientAddress: 'recipientAddress',
|
|
49
|
+
* },
|
|
50
|
+
* );
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
retrieveWithdrawalSignature(
|
|
54
|
+
userID: string,
|
|
55
|
+
query: SignatureRetrieveWithdrawalSignatureParams,
|
|
56
|
+
options?: RequestOptions,
|
|
57
|
+
): APIPromise<SignaturesAPI.IssuingSignature> {
|
|
58
|
+
return this._client.get(path`/users/${userID}/signatures/withdrawals`, { query, ...options });
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface SignatureRetrievePaymentSignatureParams {
|
|
63
|
+
/**
|
|
64
|
+
* The address of the token that the payment should be made in, as a hex string for
|
|
65
|
+
* EVM or base58 string for Solana
|
|
66
|
+
*/
|
|
67
|
+
token: string;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* The address of the admin making the payment, as a hex string for EVM or base58
|
|
71
|
+
* string for Solana
|
|
72
|
+
*/
|
|
73
|
+
adminAddress: string;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* The amount of token that is being paid
|
|
77
|
+
*/
|
|
78
|
+
amount: string;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* The chain ID (base-10 number) that the smart contract is deployed on
|
|
82
|
+
*/
|
|
83
|
+
chainId?: number;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export interface SignatureRetrieveWithdrawalSignatureParams {
|
|
87
|
+
/**
|
|
88
|
+
* The address of the token that the withdrawal should be made in, as a hex string
|
|
89
|
+
* for EVM or base58 string for Solana
|
|
90
|
+
*/
|
|
91
|
+
token: string;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* The address of the admin making the payment, as a hex string for EVM or base58
|
|
95
|
+
* string for Solana
|
|
96
|
+
*/
|
|
97
|
+
adminAddress: string;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* The amount of token that is being withdrawn
|
|
101
|
+
*/
|
|
102
|
+
amount: string;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* The address the withdrawal should be sent to, as a hex string for EVM or base58
|
|
106
|
+
* string for Solana
|
|
107
|
+
*/
|
|
108
|
+
recipientAddress: string;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* The chain ID (base-10 number) that the smart contract is deployed on
|
|
112
|
+
*/
|
|
113
|
+
chainId?: number;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export declare namespace Signatures {
|
|
117
|
+
export {
|
|
118
|
+
type SignatureRetrievePaymentSignatureParams as SignatureRetrievePaymentSignatureParams,
|
|
119
|
+
type SignatureRetrieveWithdrawalSignatureParams as SignatureRetrieveWithdrawalSignatureParams,
|
|
120
|
+
};
|
|
121
|
+
}
|