@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 @@
|
|
|
1
|
+
{"version":3,"file":"companies.d.mts","sourceRoot":"","sources":["../../src/resources/companies/companies.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,KAAK,aAAa;OAClB,EACL,gBAAgB,EAChB,uCAAuC,EACvC,0CAA0C,EAC1C,UAAU,EACX;OACM,KAAK,UAAU;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,SAAU,SAAQ,WAAW;IACxC,UAAU,EAAE,aAAa,CAAC,UAAU,CAA8C;IAElF;;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,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,4BAA4B,IAAI,4BAA4B,GAClE,CAAC;IAEF,OAAO,EACL,UAAU,IAAI,UAAU,EACxB,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,uCAAuC,IAAI,uCAAuC,EACvF,KAAK,0CAA0C,IAAI,0CAA0C,GAC9F,CAAC;CACH"}
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import * as UserAPI from "../applications/user.js";
|
|
3
|
+
import * as SignaturesAPI from "./signatures.js";
|
|
4
|
+
import { IssuingSignature, SignatureRetrievePaymentSignatureParams, SignatureRetrieveWithdrawalSignatureParams, Signatures } from "./signatures.js";
|
|
5
|
+
import * as CompanyAPI from "../applications/company/company.js";
|
|
6
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
7
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
8
|
+
export declare class Companies extends APIResource {
|
|
9
|
+
signatures: SignaturesAPI.Signatures;
|
|
10
|
+
/**
|
|
11
|
+
* Retrieve detailed information about a specific company using its unique ID
|
|
12
|
+
*/
|
|
13
|
+
retrieve(companyID: string, options?: RequestOptions): APIPromise<CompanyAPI.IssuingCompany>;
|
|
14
|
+
/**
|
|
15
|
+
* Update the details of an existing company such as its name and address
|
|
16
|
+
*/
|
|
17
|
+
update(companyID: string, body?: CompanyUpdateParams | null | undefined, options?: RequestOptions): APIPromise<CompanyAPI.IssuingCompany>;
|
|
18
|
+
/**
|
|
19
|
+
* Retrieves a list of all companies registered in the system
|
|
20
|
+
*/
|
|
21
|
+
list(query?: CompanyListParams | null | undefined, options?: RequestOptions): APIPromise<CompanyListResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* Initiate a custom fee charge for a company.
|
|
24
|
+
*/
|
|
25
|
+
charge(companyID: string, body: CompanyChargeParams, options?: RequestOptions): APIPromise<IssuingChargeCreateResponse>;
|
|
26
|
+
/**
|
|
27
|
+
* Creates a new user within a specific company. The user must provide details such
|
|
28
|
+
* as their name, birthdate, and contact information.
|
|
29
|
+
*/
|
|
30
|
+
createUser(companyID: string, body: CompanyCreateUserParams, options?: RequestOptions): APIPromise<UserAPI.IssuingUser>;
|
|
31
|
+
/**
|
|
32
|
+
* Initiate a payment for a specific company by providing the payment amount and
|
|
33
|
+
* wallet address.
|
|
34
|
+
*/
|
|
35
|
+
initiatePayment(companyID: string, body: CompanyInitiatePaymentParams, options?: RequestOptions): APIPromise<CompanyInitiatePaymentResponse>;
|
|
36
|
+
/**
|
|
37
|
+
* Retrieve the current credit balances of a company, including credit limits,
|
|
38
|
+
* pending charges, and the amount due.
|
|
39
|
+
*/
|
|
40
|
+
retrieveBalances(companyID: string, options?: RequestOptions): APIPromise<CompanyRetrieveBalancesResponse>;
|
|
41
|
+
/**
|
|
42
|
+
* Retrieve the smart contract details associated with a company
|
|
43
|
+
*/
|
|
44
|
+
retrieveContracts(companyID: string, options?: RequestOptions): APIPromise<CompanyRetrieveContractsResponse>;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Represents the body of a request to create a charge, including the amount and a
|
|
48
|
+
* description of the charge.
|
|
49
|
+
*/
|
|
50
|
+
export interface IssuingChargeCreateBody {
|
|
51
|
+
/**
|
|
52
|
+
* The amount of the charge, in cents
|
|
53
|
+
*/
|
|
54
|
+
amount: number;
|
|
55
|
+
/**
|
|
56
|
+
* The description of the charge
|
|
57
|
+
*/
|
|
58
|
+
description: string;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Represents the response body returned after a charge is created, including the
|
|
62
|
+
* charge ID, creation timestamp, and charge details.
|
|
63
|
+
*/
|
|
64
|
+
export interface IssuingChargeCreateResponse {
|
|
65
|
+
/**
|
|
66
|
+
* The identifier of the charge
|
|
67
|
+
*/
|
|
68
|
+
id: string;
|
|
69
|
+
/**
|
|
70
|
+
* The date and time when the charge was created
|
|
71
|
+
*/
|
|
72
|
+
createdAt: string;
|
|
73
|
+
/**
|
|
74
|
+
* The amount of the charge, in cents
|
|
75
|
+
*/
|
|
76
|
+
amount?: number;
|
|
77
|
+
/**
|
|
78
|
+
* The description of the charge
|
|
79
|
+
*/
|
|
80
|
+
description?: string;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Represents an issuing contract with details about its deployment and token
|
|
84
|
+
* handling.
|
|
85
|
+
*/
|
|
86
|
+
export interface IssuingContract {
|
|
87
|
+
/**
|
|
88
|
+
* The contract's unique identifier
|
|
89
|
+
*/
|
|
90
|
+
id: string;
|
|
91
|
+
/**
|
|
92
|
+
* The chain ID (base-10 number) that the smart contract is deployed on
|
|
93
|
+
*/
|
|
94
|
+
chainId: number;
|
|
95
|
+
/**
|
|
96
|
+
* Version of the contract
|
|
97
|
+
*/
|
|
98
|
+
contractVersion: number;
|
|
99
|
+
/**
|
|
100
|
+
* The address of the contract's controller
|
|
101
|
+
*/
|
|
102
|
+
controllerAddress: string;
|
|
103
|
+
/**
|
|
104
|
+
* The proxy address of the contract
|
|
105
|
+
*/
|
|
106
|
+
proxyAddress: string;
|
|
107
|
+
/**
|
|
108
|
+
* Tokens that the contract accepts for transactions
|
|
109
|
+
*/
|
|
110
|
+
tokens: Array<IssuingContract.Token>;
|
|
111
|
+
/**
|
|
112
|
+
* The address where funds should be deposited
|
|
113
|
+
*/
|
|
114
|
+
depositAddress?: string;
|
|
115
|
+
}
|
|
116
|
+
export declare namespace IssuingContract {
|
|
117
|
+
interface Token {
|
|
118
|
+
/**
|
|
119
|
+
* The address of the token contract
|
|
120
|
+
*/
|
|
121
|
+
address: string;
|
|
122
|
+
/**
|
|
123
|
+
* The advance rate for the token
|
|
124
|
+
*/
|
|
125
|
+
advanceRate?: number;
|
|
126
|
+
/**
|
|
127
|
+
* The balance of the token
|
|
128
|
+
*/
|
|
129
|
+
balance?: string;
|
|
130
|
+
/**
|
|
131
|
+
* The exchange rate for the token
|
|
132
|
+
*/
|
|
133
|
+
exchangeRate?: number;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
export type CompanyListResponse = Array<CompanyAPI.IssuingCompany>;
|
|
137
|
+
export interface CompanyInitiatePaymentResponse {
|
|
138
|
+
/**
|
|
139
|
+
* The address to send the payment to
|
|
140
|
+
*/
|
|
141
|
+
address: string;
|
|
142
|
+
}
|
|
143
|
+
export interface CompanyRetrieveBalancesResponse {
|
|
144
|
+
/**
|
|
145
|
+
* Balance due of the company, in cents
|
|
146
|
+
*/
|
|
147
|
+
balanceDue: number;
|
|
148
|
+
/**
|
|
149
|
+
* Credit limit of the company, in cents
|
|
150
|
+
*/
|
|
151
|
+
creditLimit: number;
|
|
152
|
+
/**
|
|
153
|
+
* Pending charges of the company, in cents
|
|
154
|
+
*/
|
|
155
|
+
pendingCharges: number;
|
|
156
|
+
/**
|
|
157
|
+
* Posted charges of the company, in cents
|
|
158
|
+
*/
|
|
159
|
+
postedCharges: number;
|
|
160
|
+
/**
|
|
161
|
+
* The amount of money the company can spend, in cents
|
|
162
|
+
*/
|
|
163
|
+
spendingPower: number;
|
|
164
|
+
}
|
|
165
|
+
export type CompanyRetrieveContractsResponse = Array<IssuingContract>;
|
|
166
|
+
export interface CompanyUpdateParams {
|
|
167
|
+
/**
|
|
168
|
+
* The company's physical address
|
|
169
|
+
*/
|
|
170
|
+
address?: CompanyAPI.PhysicalAddress;
|
|
171
|
+
/**
|
|
172
|
+
* The company's name on the Rain platform
|
|
173
|
+
*/
|
|
174
|
+
name?: string;
|
|
175
|
+
}
|
|
176
|
+
export interface CompanyListParams {
|
|
177
|
+
/**
|
|
178
|
+
* The ID of the resource after which to start fetching
|
|
179
|
+
*/
|
|
180
|
+
cursor?: string;
|
|
181
|
+
/**
|
|
182
|
+
* The number of resources to fetch
|
|
183
|
+
*/
|
|
184
|
+
limit?: number;
|
|
185
|
+
}
|
|
186
|
+
export interface CompanyChargeParams {
|
|
187
|
+
/**
|
|
188
|
+
* The amount of the charge, in cents
|
|
189
|
+
*/
|
|
190
|
+
amount: number;
|
|
191
|
+
/**
|
|
192
|
+
* The description of the charge
|
|
193
|
+
*/
|
|
194
|
+
description: string;
|
|
195
|
+
}
|
|
196
|
+
export interface CompanyCreateUserParams {
|
|
197
|
+
/**
|
|
198
|
+
* The user's email address
|
|
199
|
+
*/
|
|
200
|
+
email: string;
|
|
201
|
+
/**
|
|
202
|
+
* The user's first name
|
|
203
|
+
*/
|
|
204
|
+
firstName: string;
|
|
205
|
+
/**
|
|
206
|
+
* Indicates whether the user has accepted the terms of service
|
|
207
|
+
*/
|
|
208
|
+
isTermsOfServiceAccepted: boolean;
|
|
209
|
+
/**
|
|
210
|
+
* The user's last name
|
|
211
|
+
*/
|
|
212
|
+
lastName: string;
|
|
213
|
+
/**
|
|
214
|
+
* The user's address
|
|
215
|
+
*/
|
|
216
|
+
address?: CompanyAPI.PhysicalAddress;
|
|
217
|
+
/**
|
|
218
|
+
* The user's birth date
|
|
219
|
+
*/
|
|
220
|
+
birthDate?: string;
|
|
221
|
+
/**
|
|
222
|
+
* The user's phone country code
|
|
223
|
+
*/
|
|
224
|
+
phoneCountryCode?: string;
|
|
225
|
+
/**
|
|
226
|
+
* The user's phone number
|
|
227
|
+
*/
|
|
228
|
+
phoneNumber?: string;
|
|
229
|
+
/**
|
|
230
|
+
* The user's wallet address
|
|
231
|
+
*/
|
|
232
|
+
walletAddress?: string;
|
|
233
|
+
}
|
|
234
|
+
export interface CompanyInitiatePaymentParams {
|
|
235
|
+
/**
|
|
236
|
+
* The amount of the payment, in cents
|
|
237
|
+
*/
|
|
238
|
+
amount: number;
|
|
239
|
+
/**
|
|
240
|
+
* The wallet address the payment is being sent from
|
|
241
|
+
*/
|
|
242
|
+
walletAddress: string;
|
|
243
|
+
/**
|
|
244
|
+
* The chain ID (base-10 number) that the payment transaction is on
|
|
245
|
+
*/
|
|
246
|
+
chainId?: number;
|
|
247
|
+
}
|
|
248
|
+
export declare namespace Companies {
|
|
249
|
+
export { type IssuingChargeCreateBody as IssuingChargeCreateBody, type IssuingChargeCreateResponse as IssuingChargeCreateResponse, type IssuingContract as IssuingContract, type CompanyListResponse as CompanyListResponse, type CompanyInitiatePaymentResponse as CompanyInitiatePaymentResponse, type CompanyRetrieveBalancesResponse as CompanyRetrieveBalancesResponse, type CompanyRetrieveContractsResponse as CompanyRetrieveContractsResponse, type CompanyUpdateParams as CompanyUpdateParams, type CompanyListParams as CompanyListParams, type CompanyChargeParams as CompanyChargeParams, type CompanyCreateUserParams as CompanyCreateUserParams, type CompanyInitiatePaymentParams as CompanyInitiatePaymentParams, };
|
|
250
|
+
export { Signatures as Signatures, type IssuingSignature as IssuingSignature, type SignatureRetrievePaymentSignatureParams as SignatureRetrievePaymentSignatureParams, type SignatureRetrieveWithdrawalSignatureParams as SignatureRetrieveWithdrawalSignatureParams, };
|
|
251
|
+
}
|
|
252
|
+
//# sourceMappingURL=companies.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"companies.d.ts","sourceRoot":"","sources":["../../src/resources/companies/companies.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,OAAO;OACZ,KAAK,aAAa;OAClB,EACL,gBAAgB,EAChB,uCAAuC,EACvC,0CAA0C,EAC1C,UAAU,EACX;OACM,KAAK,UAAU;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,SAAU,SAAQ,WAAW;IACxC,UAAU,EAAE,aAAa,CAAC,UAAU,CAA8C;IAElF;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,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EACrE,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,4BAA4B,IAAI,4BAA4B,GAClE,CAAC;IAEF,OAAO,EACL,UAAU,IAAI,UAAU,EACxB,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,uCAAuC,IAAI,uCAAuC,EACvF,KAAK,0CAA0C,IAAI,0CAA0C,GAC9F,CAAC;CACH"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Companies = void 0;
|
|
5
|
+
const tslib_1 = require("../../internal/tslib.js");
|
|
6
|
+
const resource_1 = require("../../core/resource.js");
|
|
7
|
+
const SignaturesAPI = tslib_1.__importStar(require("./signatures.js"));
|
|
8
|
+
const signatures_1 = require("./signatures.js");
|
|
9
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
10
|
+
class Companies extends resource_1.APIResource {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
this.signatures = new SignaturesAPI.Signatures(this._client);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Retrieve detailed information about a specific company using its unique ID
|
|
17
|
+
*/
|
|
18
|
+
retrieve(companyID, options) {
|
|
19
|
+
return this._client.get((0, path_1.path) `/companies/${companyID}`, options);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Update the details of an existing company such as its name and address
|
|
23
|
+
*/
|
|
24
|
+
update(companyID, body = {}, options) {
|
|
25
|
+
return this._client.patch((0, path_1.path) `/companies/${companyID}`, { body, ...options });
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Retrieves a list of all companies registered in the system
|
|
29
|
+
*/
|
|
30
|
+
list(query = {}, options) {
|
|
31
|
+
return this._client.get('/companies', { query, ...options });
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Initiate a custom fee charge for a company.
|
|
35
|
+
*/
|
|
36
|
+
charge(companyID, body, options) {
|
|
37
|
+
return this._client.post((0, path_1.path) `/companies/${companyID}/charges`, { body, ...options });
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Creates a new user within a specific company. The user must provide details such
|
|
41
|
+
* as their name, birthdate, and contact information.
|
|
42
|
+
*/
|
|
43
|
+
createUser(companyID, body, options) {
|
|
44
|
+
return this._client.post((0, path_1.path) `/companies/${companyID}/users`, { body, ...options });
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Initiate a payment for a specific company by providing the payment amount and
|
|
48
|
+
* wallet address.
|
|
49
|
+
*/
|
|
50
|
+
initiatePayment(companyID, body, options) {
|
|
51
|
+
return this._client.post((0, path_1.path) `/companies/${companyID}/payments`, { body, ...options });
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Retrieve the current credit balances of a company, including credit limits,
|
|
55
|
+
* pending charges, and the amount due.
|
|
56
|
+
*/
|
|
57
|
+
retrieveBalances(companyID, options) {
|
|
58
|
+
return this._client.get((0, path_1.path) `/companies/${companyID}/balances`, options);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Retrieve the smart contract details associated with a company
|
|
62
|
+
*/
|
|
63
|
+
retrieveContracts(companyID, options) {
|
|
64
|
+
return this._client.get((0, path_1.path) `/companies/${companyID}/contracts`, options);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
exports.Companies = Companies;
|
|
68
|
+
Companies.Signatures = signatures_1.Signatures;
|
|
69
|
+
//# sourceMappingURL=companies.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"companies.js","s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,CAAC,CAAC;IACtF,CAAC;IAED;;;OAGG;IACH,eAAe,CACb,SAAiB,EACjB,IAAkC,EAClC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,cAAc,SAAS,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzF,CAAC;IAED;;;OAGG;IACH,gBAAgB,CAAC,SAAiB,EAAE,OAAwB;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,cAAc,SAAS,WAAW,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;IAED;;OAEG;IACH,iBAAiB,CACf,SAAiB,EACjB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,cAAc,SAAS,YAAY,EAAE,OAAO,CAAC,CAAC;IAC5E,CAAC;CACF;AAnFD,8BAmFC;AAuPD,SAAS,CAAC,UAAU,GAAG,uBAAU,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import * as SignaturesAPI from "./signatures.mjs";
|
|
4
|
+
import { Signatures, } from "./signatures.mjs";
|
|
5
|
+
import { path } from "../../internal/utils/path.mjs";
|
|
6
|
+
export class Companies extends APIResource {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.signatures = new SignaturesAPI.Signatures(this._client);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Retrieve detailed information about a specific company using its unique ID
|
|
13
|
+
*/
|
|
14
|
+
retrieve(companyID, options) {
|
|
15
|
+
return this._client.get(path `/companies/${companyID}`, options);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Update the details of an existing company such as its name and address
|
|
19
|
+
*/
|
|
20
|
+
update(companyID, body = {}, options) {
|
|
21
|
+
return this._client.patch(path `/companies/${companyID}`, { body, ...options });
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Retrieves a list of all companies registered in the system
|
|
25
|
+
*/
|
|
26
|
+
list(query = {}, options) {
|
|
27
|
+
return this._client.get('/companies', { query, ...options });
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Initiate a custom fee charge for a company.
|
|
31
|
+
*/
|
|
32
|
+
charge(companyID, body, options) {
|
|
33
|
+
return this._client.post(path `/companies/${companyID}/charges`, { body, ...options });
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Creates a new user within a specific company. The user must provide details such
|
|
37
|
+
* as their name, birthdate, and contact information.
|
|
38
|
+
*/
|
|
39
|
+
createUser(companyID, body, options) {
|
|
40
|
+
return this._client.post(path `/companies/${companyID}/users`, { body, ...options });
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Initiate a payment for a specific company by providing the payment amount and
|
|
44
|
+
* wallet address.
|
|
45
|
+
*/
|
|
46
|
+
initiatePayment(companyID, body, options) {
|
|
47
|
+
return this._client.post(path `/companies/${companyID}/payments`, { body, ...options });
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Retrieve the current credit balances of a company, including credit limits,
|
|
51
|
+
* pending charges, and the amount due.
|
|
52
|
+
*/
|
|
53
|
+
retrieveBalances(companyID, options) {
|
|
54
|
+
return this._client.get(path `/companies/${companyID}/balances`, options);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Retrieve the smart contract details associated with a company
|
|
58
|
+
*/
|
|
59
|
+
retrieveContracts(companyID, options) {
|
|
60
|
+
return this._client.get(path `/companies/${companyID}/contracts`, options);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
Companies.Signatures = Signatures;
|
|
64
|
+
//# sourceMappingURL=companies.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"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AAG,OAAO,EAAE,CAAC,CAAC;IACtF,CAAC;IAED;;;OAGG;IACH,eAAe,CACb,SAAiB,EACjB,IAAkC,EAClC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,cAAc,SAAS,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzF,CAAC;IAED;;;OAGG;IACH,gBAAgB,CAAC,SAAiB,EAAE,OAAwB;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,cAAc,SAAS,WAAW,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;IAED;;OAEG;IACH,iBAAiB,CACf,SAAiB,EACjB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,cAAc,SAAS,YAAY,EAAE,OAAO,CAAC,CAAC;IAC5E,CAAC;CACF;AAuPD,SAAS,CAAC,UAAU,GAAG,UAAU,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { Companies, type IssuingChargeCreateBody, type IssuingChargeCreateResponse, type IssuingContract, type CompanyListResponse, type CompanyInitiatePaymentResponse, type CompanyRetrieveBalancesResponse, type CompanyRetrieveContractsResponse, type CompanyUpdateParams, type CompanyListParams, type CompanyChargeParams, type CompanyCreateUserParams, type CompanyInitiatePaymentParams, } from "./companies.mjs";
|
|
2
|
+
export { Signatures, type IssuingSignature, type SignatureRetrievePaymentSignatureParams, type SignatureRetrieveWithdrawalSignatureParams, } from "./signatures.mjs";
|
|
3
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/companies/index.ts"],"names":[],"mappings":"OAEO,EACL,SAAS,EACT,KAAK,uBAAuB,EAC5B,KAAK,2BAA2B,EAChC,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,8BAA8B,EACnC,KAAK,+BAA+B,EACpC,KAAK,gCAAgC,EACrC,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,4BAA4B,GAClC;OACM,EACL,UAAU,EACV,KAAK,gBAAgB,EACrB,KAAK,uCAAuC,EAC5C,KAAK,0CAA0C,GAChD"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { Companies, type IssuingChargeCreateBody, type IssuingChargeCreateResponse, type IssuingContract, type CompanyListResponse, type CompanyInitiatePaymentResponse, type CompanyRetrieveBalancesResponse, type CompanyRetrieveContractsResponse, type CompanyUpdateParams, type CompanyListParams, type CompanyChargeParams, type CompanyCreateUserParams, type CompanyInitiatePaymentParams, } from "./companies.js";
|
|
2
|
+
export { Signatures, type IssuingSignature, type SignatureRetrievePaymentSignatureParams, type SignatureRetrieveWithdrawalSignatureParams, } from "./signatures.js";
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/companies/index.ts"],"names":[],"mappings":"OAEO,EACL,SAAS,EACT,KAAK,uBAAuB,EAC5B,KAAK,2BAA2B,EAChC,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,8BAA8B,EACnC,KAAK,+BAA+B,EACpC,KAAK,gCAAgC,EACrC,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,4BAA4B,GAClC;OACM,EACL,UAAU,EACV,KAAK,gBAAgB,EACrB,KAAK,uCAAuC,EAC5C,KAAK,0CAA0C,GAChD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Signatures = exports.Companies = void 0;
|
|
5
|
+
var companies_1 = require("./companies.js");
|
|
6
|
+
Object.defineProperty(exports, "Companies", { enumerable: true, get: function () { return companies_1.Companies; } });
|
|
7
|
+
var signatures_1 = require("./signatures.js");
|
|
8
|
+
Object.defineProperty(exports, "Signatures", { enumerable: true, get: function () { return signatures_1.Signatures; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/companies/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,4CAcqB;AAbnB,sGAAA,SAAS,OAAA;AAcX,8CAKsB;AAJpB,wGAAA,UAAU,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/companies/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,SAAS,GAaV;OACM,EACL,UAAU,GAIX"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
4
|
+
export declare class Signatures extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Retrieve the payment signature for a company, which is required for completing
|
|
7
|
+
* payment transactions.
|
|
8
|
+
*/
|
|
9
|
+
retrievePaymentSignature(companyID: string, query: SignatureRetrievePaymentSignatureParams, options?: RequestOptions): APIPromise<IssuingSignature>;
|
|
10
|
+
/**
|
|
11
|
+
* Retrieve the withdrawal signature for a company, which is required for
|
|
12
|
+
* processing withdrawal requests.
|
|
13
|
+
*/
|
|
14
|
+
retrieveWithdrawalSignature(companyID: string, query: SignatureRetrieveWithdrawalSignatureParams, options?: RequestOptions): APIPromise<IssuingSignature>;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Indicates the signature is pending and provides the time after which a retry is
|
|
18
|
+
* possible.
|
|
19
|
+
*/
|
|
20
|
+
export type IssuingSignature = IssuingSignature.IfSignatureIsPending | IssuingSignature.IfSignatureIsReady;
|
|
21
|
+
export declare namespace IssuingSignature {
|
|
22
|
+
/**
|
|
23
|
+
* Indicates the signature is pending and provides the time after which a retry is
|
|
24
|
+
* possible.
|
|
25
|
+
*/
|
|
26
|
+
interface IfSignatureIsPending {
|
|
27
|
+
/**
|
|
28
|
+
* The number of seconds after which the signature can be retried
|
|
29
|
+
*/
|
|
30
|
+
retryAfter: number;
|
|
31
|
+
/**
|
|
32
|
+
* The status of the signature
|
|
33
|
+
*/
|
|
34
|
+
status: 'pending';
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Indicates that the signature is ready and includes the signature data and
|
|
38
|
+
* expiration time.
|
|
39
|
+
*/
|
|
40
|
+
interface IfSignatureIsReady {
|
|
41
|
+
signature: IfSignatureIsReady.Signature;
|
|
42
|
+
/**
|
|
43
|
+
* The status of the signature
|
|
44
|
+
*/
|
|
45
|
+
status: 'ready';
|
|
46
|
+
/**
|
|
47
|
+
* The time at which the signature will expire
|
|
48
|
+
*/
|
|
49
|
+
expiresAt?: string;
|
|
50
|
+
}
|
|
51
|
+
namespace IfSignatureIsReady {
|
|
52
|
+
interface Signature {
|
|
53
|
+
/**
|
|
54
|
+
* The actual signature data
|
|
55
|
+
*/
|
|
56
|
+
data: string;
|
|
57
|
+
/**
|
|
58
|
+
* The salt used to generate the signature
|
|
59
|
+
*/
|
|
60
|
+
salt: string;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
export interface SignatureRetrievePaymentSignatureParams {
|
|
65
|
+
/**
|
|
66
|
+
* The address of the token that the payment should be made in (as a hex string for
|
|
67
|
+
* EVM or base58 string for Solana)
|
|
68
|
+
*/
|
|
69
|
+
token: string;
|
|
70
|
+
/**
|
|
71
|
+
* The address of the admin making the payment, as a hex string for EVM or base58
|
|
72
|
+
* string for Solana
|
|
73
|
+
*/
|
|
74
|
+
adminAddress: string;
|
|
75
|
+
/**
|
|
76
|
+
* The amount of tokens that are being paid
|
|
77
|
+
*/
|
|
78
|
+
amount: string;
|
|
79
|
+
/**
|
|
80
|
+
* The chain ID (base-10 number) that the smart contract is deployed on
|
|
81
|
+
*/
|
|
82
|
+
chainId?: number;
|
|
83
|
+
/**
|
|
84
|
+
* Indicates whether the amount is in the asset's native units. If false, the
|
|
85
|
+
* amount is expressed in cents.
|
|
86
|
+
*/
|
|
87
|
+
isAmountNative?: boolean;
|
|
88
|
+
}
|
|
89
|
+
export interface SignatureRetrieveWithdrawalSignatureParams {
|
|
90
|
+
/**
|
|
91
|
+
* The address of the token that the withdrawal should be made in, as a hex string
|
|
92
|
+
* for EVM or base58 string for Solana
|
|
93
|
+
*/
|
|
94
|
+
token: string;
|
|
95
|
+
/**
|
|
96
|
+
* The address of the admin making the payment, as a hex string for EVM or base58
|
|
97
|
+
* string for Solana
|
|
98
|
+
*/
|
|
99
|
+
adminAddress: string;
|
|
100
|
+
/**
|
|
101
|
+
* The amount of tokens being withdrawn
|
|
102
|
+
*/
|
|
103
|
+
amount: string;
|
|
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
|
+
* The chain ID (base-10 number) that the smart contract is deployed on
|
|
111
|
+
*/
|
|
112
|
+
chainId?: number;
|
|
113
|
+
/**
|
|
114
|
+
* Indicates whether the amount is in the asset's native units. If false, the
|
|
115
|
+
* amount is expressed in cents.
|
|
116
|
+
*/
|
|
117
|
+
isAmountNative?: boolean;
|
|
118
|
+
}
|
|
119
|
+
export declare namespace Signatures {
|
|
120
|
+
export { type IssuingSignature as IssuingSignature, type SignatureRetrievePaymentSignatureParams as SignatureRetrievePaymentSignatureParams, type SignatureRetrieveWithdrawalSignatureParams as SignatureRetrieveWithdrawalSignatureParams, };
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=signatures.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signatures.d.mts","sourceRoot":"","sources":["../../src/resources/companies/signatures.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,UAAW,SAAQ,WAAW;IACzC;;;OAGG;IACH,wBAAwB,CACtB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,uCAAuC,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,gBAAgB,CAAC;IAI/B;;;OAGG;IACH,2BAA2B,CACzB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,0CAA0C,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,gBAAgB,CAAC;CAGhC;AAED;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,CAAC,oBAAoB,GAAG,gBAAgB,CAAC,kBAAkB,CAAC;AAE3G,yBAAiB,gBAAgB,CAAC;IAChC;;;OAGG;IACH,UAAiB,oBAAoB;QACnC;;WAEG;QACH,UAAU,EAAE,MAAM,CAAC;QAEnB;;WAEG;QACH,MAAM,EAAE,SAAS,CAAC;KACnB;IAED;;;OAGG;IACH,UAAiB,kBAAkB;QACjC,SAAS,EAAE,kBAAkB,CAAC,SAAS,CAAC;QAExC;;WAEG;QACH,MAAM,EAAE,OAAO,CAAC;QAEhB;;WAEG;QACH,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB;IAED,UAAiB,kBAAkB,CAAC;QAClC,UAAiB,SAAS;YACxB;;eAEG;YACH,IAAI,EAAE,MAAM,CAAC;YAEb;;eAEG;YACH,IAAI,EAAE,MAAM,CAAC;SACd;KACF;CACF;AAED,MAAM,WAAW,uCAAuC;IACtD;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd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