conductor-node 12.42.0 → 13.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +41 -0
- package/README.md +111 -41
- package/api-promise.d.mts +2 -0
- package/api-promise.d.mts.map +1 -0
- package/api-promise.d.ts +2 -0
- package/api-promise.d.ts.map +1 -0
- package/api-promise.js +6 -0
- package/api-promise.js.map +1 -0
- package/api-promise.mjs +2 -0
- package/api-promise.mjs.map +1 -0
- package/bin/cli +46 -0
- package/bin/migration-config.json +44 -0
- package/client.d.mts +189 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +189 -0
- package/client.d.ts.map +1 -0
- package/client.js +462 -0
- package/client.js.map +1 -0
- package/client.mjs +458 -0
- package/client.mjs.map +1 -0
- package/core/api-promise.d.mts +46 -0
- package/core/api-promise.d.mts.map +1 -0
- package/core/api-promise.d.ts +46 -0
- package/core/api-promise.d.ts.map +1 -0
- package/core/api-promise.js +74 -0
- package/core/api-promise.js.map +1 -0
- package/core/api-promise.mjs +70 -0
- package/core/api-promise.mjs.map +1 -0
- package/core/error.d.mts +46 -0
- package/core/error.d.mts.map +1 -0
- package/core/error.d.ts +46 -0
- package/core/error.d.ts.map +1 -0
- package/core/error.js +113 -0
- package/core/error.js.map +1 -0
- package/core/error.mjs +97 -0
- package/core/error.mjs.map +1 -0
- package/core/pagination.d.mts +54 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +54 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +101 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +95 -0
- package/core/pagination.mjs.map +1 -0
- package/core/resource.d.mts +6 -0
- package/core/resource.d.mts.map +1 -0
- package/core/resource.d.ts +6 -0
- package/core/resource.d.ts.map +1 -0
- package/core/resource.js +11 -0
- package/core/resource.js.map +1 -0
- package/core/resource.mjs +7 -0
- package/core/resource.mjs.map +1 -0
- package/core/uploads.d.mts +3 -0
- package/core/uploads.d.mts.map +1 -0
- package/core/uploads.d.ts +3 -0
- package/core/uploads.d.ts.map +1 -0
- package/core/uploads.js +6 -0
- package/core/uploads.js.map +1 -0
- package/core/uploads.mjs +2 -0
- package/core/uploads.mjs.map +1 -0
- package/error.d.mts +2 -0
- package/error.d.mts.map +1 -0
- package/error.d.ts +1 -46
- package/error.d.ts.map +1 -1
- package/error.js +3 -110
- package/error.js.map +1 -1
- package/error.mjs +1 -96
- package/error.mjs.map +1 -1
- package/index.d.mts +7 -124
- package/index.d.mts.map +1 -0
- package/index.d.ts +6 -123
- package/index.d.ts.map +1 -1
- package/index.js +14 -119
- package/index.js.map +1 -1
- package/index.mjs +6 -92
- package/index.mjs.map +1 -1
- package/internal/builtin-types.d.mts +73 -0
- package/internal/builtin-types.d.mts.map +1 -0
- package/internal/builtin-types.d.ts +73 -0
- package/internal/builtin-types.d.ts.map +1 -0
- package/internal/builtin-types.js +4 -0
- package/internal/builtin-types.js.map +1 -0
- package/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 +35 -0
- package/internal/parse.js.map +1 -0
- package/internal/parse.mjs +32 -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 +1 -0
- package/internal/qs/formats.d.ts.map +1 -1
- package/internal/qs/formats.js +4 -2
- package/internal/qs/formats.js.map +1 -1
- package/internal/qs/formats.mjs +2 -1
- package/internal/qs/formats.mjs.map +1 -1
- package/internal/qs/index.d.mts +10 -0
- package/internal/qs/index.d.mts.map +1 -0
- package/internal/qs/index.d.ts.map +1 -1
- package/internal/qs/stringify.d.mts +3 -0
- package/internal/qs/stringify.d.mts.map +1 -0
- package/internal/qs/stringify.d.ts.map +1 -1
- package/internal/qs/stringify.js +16 -19
- package/internal/qs/stringify.js.map +1 -1
- package/internal/qs/stringify.mjs +17 -19
- package/internal/qs/stringify.mjs.map +1 -1
- package/internal/qs/types.d.mts +57 -0
- package/internal/qs/types.d.mts.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 +1 -0
- package/internal/qs/utils.d.ts.map +1 -1
- package/internal/qs/utils.js +22 -21
- package/internal/qs/utils.js.map +1 -1
- package/internal/qs/utils.mjs +12 -12
- package/internal/qs/utils.mjs.map +1 -1
- 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 +85 -0
- package/internal/utils/log.js.map +1 -0
- package/internal/utils/log.mjs +79 -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 +113 -64
- package/pagination.d.mts +2 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +1 -17
- package/pagination.d.ts.map +1 -1
- package/pagination.js +3 -37
- package/pagination.js.map +1 -1
- package/pagination.mjs +1 -35
- package/pagination.mjs.map +1 -1
- package/resource.d.mts +2 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +1 -5
- package/resource.d.ts.map +1 -1
- package/resource.js +3 -8
- package/resource.js.map +1 -1
- package/resource.mjs +1 -6
- package/resource.mjs.map +1 -1
- package/resources/auth-sessions.d.mts +84 -0
- package/resources/auth-sessions.d.mts.map +1 -0
- package/resources/auth-sessions.d.ts +4 -3
- package/resources/auth-sessions.d.ts.map +1 -1
- package/resources/auth-sessions.js +1 -1
- package/resources/auth-sessions.js.map +1 -1
- package/resources/auth-sessions.mjs +1 -1
- package/resources/auth-sessions.mjs.map +1 -1
- package/resources/end-users.d.mts +195 -0
- package/resources/end-users.d.mts.map +1 -0
- package/resources/end-users.d.ts +24 -12
- package/resources/end-users.d.ts.map +1 -1
- package/resources/end-users.js +14 -7
- package/resources/end-users.js.map +1 -1
- package/resources/end-users.mjs +14 -7
- package/resources/end-users.mjs.map +1 -1
- package/resources/index.d.mts +4 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/qbd/account-tax-lines.d.mts +56 -0
- package/resources/qbd/account-tax-lines.d.mts.map +1 -0
- package/resources/qbd/account-tax-lines.d.ts +5 -5
- package/resources/qbd/account-tax-lines.d.ts.map +1 -1
- package/resources/qbd/account-tax-lines.js +3 -2
- package/resources/qbd/account-tax-lines.js.map +1 -1
- package/resources/qbd/account-tax-lines.mjs +3 -2
- package/resources/qbd/account-tax-lines.mjs.map +1 -1
- package/resources/qbd/accounts.d.mts +645 -0
- package/resources/qbd/accounts.d.mts.map +1 -0
- package/resources/qbd/accounts.d.ts +11 -14
- package/resources/qbd/accounts.d.ts.map +1 -1
- package/resources/qbd/accounts.js +9 -7
- package/resources/qbd/accounts.js.map +1 -1
- package/resources/qbd/accounts.mjs +9 -7
- package/resources/qbd/accounts.mjs.map +1 -1
- package/resources/qbd/bill-check-payments.d.mts +918 -0
- package/resources/qbd/bill-check-payments.d.mts.map +1 -0
- package/resources/qbd/bill-check-payments.d.ts +16 -21
- package/resources/qbd/bill-check-payments.d.ts.map +1 -1
- package/resources/qbd/bill-check-payments.js +14 -16
- package/resources/qbd/bill-check-payments.js.map +1 -1
- package/resources/qbd/bill-check-payments.mjs +13 -14
- package/resources/qbd/bill-check-payments.mjs.map +1 -1
- package/resources/qbd/bill-credit-card-payments.d.mts +714 -0
- package/resources/qbd/bill-credit-card-payments.d.mts.map +1 -0
- package/resources/qbd/bill-credit-card-payments.d.ts +14 -18
- package/resources/qbd/bill-credit-card-payments.d.ts.map +1 -1
- package/resources/qbd/bill-credit-card-payments.js +15 -13
- package/resources/qbd/bill-credit-card-payments.js.map +1 -1
- package/resources/qbd/bill-credit-card-payments.mjs +14 -11
- package/resources/qbd/bill-credit-card-payments.mjs.map +1 -1
- package/resources/qbd/bills.d.mts +2644 -0
- package/resources/qbd/bills.d.mts.map +1 -0
- package/resources/qbd/bills.d.ts +24 -22
- package/resources/qbd/bills.d.ts.map +1 -1
- package/resources/qbd/bills.js +14 -16
- package/resources/qbd/bills.js.map +1 -1
- package/resources/qbd/bills.mjs +13 -14
- package/resources/qbd/bills.mjs.map +1 -1
- package/resources/qbd/build-assemblies.d.mts +698 -0
- package/resources/qbd/build-assemblies.d.mts.map +1 -0
- package/resources/qbd/build-assemblies.d.ts +16 -21
- package/resources/qbd/build-assemblies.d.ts.map +1 -1
- package/resources/qbd/build-assemblies.js +14 -16
- package/resources/qbd/build-assemblies.js.map +1 -1
- package/resources/qbd/build-assemblies.mjs +13 -14
- package/resources/qbd/build-assemblies.mjs.map +1 -1
- package/resources/qbd/checks.d.mts +2607 -0
- package/resources/qbd/checks.d.mts.map +1 -0
- package/resources/qbd/checks.d.ts +16 -21
- package/resources/qbd/checks.d.ts.map +1 -1
- package/resources/qbd/checks.js +14 -16
- package/resources/qbd/checks.js.map +1 -1
- package/resources/qbd/checks.mjs +13 -14
- package/resources/qbd/checks.mjs.map +1 -1
- package/resources/qbd/classes.d.mts +344 -0
- package/resources/qbd/classes.d.mts.map +1 -0
- package/resources/qbd/classes.d.ts +11 -14
- package/resources/qbd/classes.d.ts.map +1 -1
- package/resources/qbd/classes.js +9 -7
- package/resources/qbd/classes.js.map +1 -1
- package/resources/qbd/classes.mjs +9 -7
- package/resources/qbd/classes.mjs.map +1 -1
- package/resources/qbd/company.d.mts +361 -0
- package/resources/qbd/company.d.mts.map +1 -0
- package/resources/qbd/company.d.ts +5 -5
- package/resources/qbd/company.d.ts.map +1 -1
- package/resources/qbd/company.js +3 -2
- package/resources/qbd/company.js.map +1 -1
- package/resources/qbd/company.mjs +3 -2
- package/resources/qbd/company.mjs.map +1 -1
- package/resources/qbd/credit-card-charges.d.mts +2316 -0
- package/resources/qbd/credit-card-charges.d.mts.map +1 -0
- package/resources/qbd/credit-card-charges.d.ts +16 -21
- package/resources/qbd/credit-card-charges.d.ts.map +1 -1
- package/resources/qbd/credit-card-charges.js +14 -16
- package/resources/qbd/credit-card-charges.js.map +1 -1
- package/resources/qbd/credit-card-charges.mjs +13 -14
- package/resources/qbd/credit-card-charges.mjs.map +1 -1
- package/resources/qbd/credit-card-credits.d.mts +2311 -0
- package/resources/qbd/credit-card-credits.d.mts.map +1 -0
- package/resources/qbd/credit-card-credits.d.ts +16 -21
- package/resources/qbd/credit-card-credits.d.ts.map +1 -1
- package/resources/qbd/credit-card-credits.js +14 -16
- package/resources/qbd/credit-card-credits.js.map +1 -1
- package/resources/qbd/credit-card-credits.mjs +13 -14
- package/resources/qbd/credit-card-credits.mjs.map +1 -1
- package/resources/qbd/credit-card-refunds.d.mts +1012 -0
- package/resources/qbd/credit-card-refunds.d.mts.map +1 -0
- package/resources/qbd/credit-card-refunds.d.ts +14 -18
- package/resources/qbd/credit-card-refunds.d.ts.map +1 -1
- package/resources/qbd/credit-card-refunds.js +12 -14
- package/resources/qbd/credit-card-refunds.js.map +1 -1
- package/resources/qbd/credit-card-refunds.mjs +11 -12
- package/resources/qbd/credit-card-refunds.mjs.map +1 -1
- package/resources/qbd/credit-memos.d.mts +2718 -0
- package/resources/qbd/credit-memos.d.mts.map +1 -0
- package/resources/qbd/credit-memos.d.ts +16 -21
- package/resources/qbd/credit-memos.d.ts.map +1 -1
- package/resources/qbd/credit-memos.js +14 -16
- package/resources/qbd/credit-memos.js.map +1 -1
- package/resources/qbd/credit-memos.mjs +13 -14
- package/resources/qbd/credit-memos.mjs.map +1 -1
- package/resources/qbd/currencies.d.mts +439 -0
- package/resources/qbd/currencies.d.mts.map +1 -0
- package/resources/qbd/currencies.d.ts +11 -14
- package/resources/qbd/currencies.d.ts.map +1 -1
- package/resources/qbd/currencies.js +9 -7
- package/resources/qbd/currencies.js.map +1 -1
- package/resources/qbd/currencies.mjs +9 -7
- package/resources/qbd/currencies.mjs.map +1 -1
- package/resources/qbd/customer-types.d.mts +300 -0
- package/resources/qbd/customer-types.d.mts.map +1 -0
- package/resources/qbd/customer-types.d.ts +9 -11
- package/resources/qbd/customer-types.d.ts.map +1 -1
- package/resources/qbd/customer-types.js +7 -5
- package/resources/qbd/customer-types.js.map +1 -1
- package/resources/qbd/customer-types.mjs +7 -5
- package/resources/qbd/customer-types.mjs.map +1 -1
- package/resources/qbd/customers.d.mts +2163 -0
- package/resources/qbd/customers.d.mts.map +1 -0
- package/resources/qbd/customers.d.ts +14 -18
- package/resources/qbd/customers.d.ts.map +1 -1
- package/resources/qbd/customers.js +12 -14
- package/resources/qbd/customers.js.map +1 -1
- package/resources/qbd/customers.mjs +11 -12
- package/resources/qbd/customers.mjs.map +1 -1
- package/resources/qbd/date-driven-terms.d.mts +295 -0
- package/resources/qbd/date-driven-terms.d.mts.map +1 -0
- package/resources/qbd/date-driven-terms.d.ts +9 -11
- package/resources/qbd/date-driven-terms.d.ts.map +1 -1
- package/resources/qbd/date-driven-terms.js +7 -5
- package/resources/qbd/date-driven-terms.js.map +1 -1
- package/resources/qbd/date-driven-terms.mjs +7 -5
- package/resources/qbd/date-driven-terms.mjs.map +1 -1
- package/resources/qbd/deleted-list-objects.d.mts +105 -0
- package/resources/qbd/deleted-list-objects.d.mts.map +1 -0
- package/resources/qbd/deleted-list-objects.d.ts +5 -5
- package/resources/qbd/deleted-list-objects.d.ts.map +1 -1
- package/resources/qbd/deleted-list-objects.js +3 -2
- package/resources/qbd/deleted-list-objects.js.map +1 -1
- package/resources/qbd/deleted-list-objects.mjs +3 -2
- package/resources/qbd/deleted-list-objects.mjs.map +1 -1
- package/resources/qbd/deleted-transactions.d.mts +111 -0
- package/resources/qbd/deleted-transactions.d.mts.map +1 -0
- package/resources/qbd/deleted-transactions.d.ts +5 -5
- package/resources/qbd/deleted-transactions.d.ts.map +1 -1
- package/resources/qbd/deleted-transactions.js +3 -2
- package/resources/qbd/deleted-transactions.js.map +1 -1
- package/resources/qbd/deleted-transactions.mjs +3 -2
- package/resources/qbd/deleted-transactions.mjs.map +1 -1
- package/resources/qbd/discount-items.d.mts +642 -0
- package/resources/qbd/discount-items.d.mts.map +1 -0
- package/resources/qbd/discount-items.d.ts +14 -18
- package/resources/qbd/discount-items.d.ts.map +1 -1
- package/resources/qbd/discount-items.js +12 -14
- package/resources/qbd/discount-items.js.map +1 -1
- package/resources/qbd/discount-items.mjs +11 -12
- package/resources/qbd/discount-items.mjs.map +1 -1
- package/resources/qbd/employees.d.mts +1811 -0
- package/resources/qbd/employees.d.mts.map +1 -0
- package/resources/qbd/employees.d.ts +11 -14
- package/resources/qbd/employees.d.ts.map +1 -1
- package/resources/qbd/employees.js +9 -7
- package/resources/qbd/employees.js.map +1 -1
- package/resources/qbd/employees.mjs +9 -7
- package/resources/qbd/employees.mjs.map +1 -1
- package/resources/qbd/estimates.d.mts +2584 -0
- package/resources/qbd/estimates.d.mts.map +1 -0
- package/resources/qbd/estimates.d.ts +16 -21
- package/resources/qbd/estimates.d.ts.map +1 -1
- package/resources/qbd/estimates.js +14 -16
- package/resources/qbd/estimates.js.map +1 -1
- package/resources/qbd/estimates.mjs +13 -14
- package/resources/qbd/estimates.mjs.map +1 -1
- package/resources/qbd/index.d.mts +57 -0
- package/resources/qbd/index.d.mts.map +1 -0
- package/resources/qbd/index.d.ts +34 -34
- package/resources/qbd/index.d.ts.map +1 -1
- package/resources/qbd/index.js +2 -36
- package/resources/qbd/index.js.map +1 -1
- package/resources/qbd/index.mjs +34 -34
- package/resources/qbd/index.mjs.map +1 -1
- package/resources/qbd/inventory-adjustments.d.mts +893 -0
- package/resources/qbd/inventory-adjustments.d.mts.map +1 -0
- package/resources/qbd/inventory-adjustments.d.ts +13 -17
- package/resources/qbd/inventory-adjustments.d.ts.map +1 -1
- package/resources/qbd/inventory-adjustments.js +11 -9
- package/resources/qbd/inventory-adjustments.js.map +1 -1
- package/resources/qbd/inventory-adjustments.mjs +11 -9
- package/resources/qbd/inventory-adjustments.mjs.map +1 -1
- package/resources/qbd/inventory-assembly-items.d.mts +988 -0
- package/resources/qbd/inventory-assembly-items.d.mts.map +1 -0
- package/resources/qbd/inventory-assembly-items.d.ts +14 -18
- package/resources/qbd/inventory-assembly-items.d.ts.map +1 -1
- package/resources/qbd/inventory-assembly-items.js +15 -13
- package/resources/qbd/inventory-assembly-items.js.map +1 -1
- package/resources/qbd/inventory-assembly-items.mjs +14 -11
- package/resources/qbd/inventory-assembly-items.mjs.map +1 -1
- package/resources/qbd/inventory-items.d.mts +898 -0
- package/resources/qbd/inventory-items.d.mts.map +1 -0
- package/resources/qbd/inventory-items.d.ts +14 -18
- package/resources/qbd/inventory-items.d.ts.map +1 -1
- package/resources/qbd/inventory-items.js +12 -14
- package/resources/qbd/inventory-items.js.map +1 -1
- package/resources/qbd/inventory-items.mjs +11 -12
- package/resources/qbd/inventory-items.mjs.map +1 -1
- package/resources/qbd/inventory-sites.d.mts +537 -0
- package/resources/qbd/inventory-sites.d.mts.map +1 -0
- package/resources/qbd/inventory-sites.d.ts +11 -14
- package/resources/qbd/inventory-sites.d.ts.map +1 -1
- package/resources/qbd/inventory-sites.js +9 -7
- package/resources/qbd/inventory-sites.js.map +1 -1
- package/resources/qbd/inventory-sites.mjs +9 -7
- package/resources/qbd/inventory-sites.mjs.map +1 -1
- package/resources/qbd/invoices.d.mts +2942 -0
- package/resources/qbd/invoices.d.mts.map +1 -0
- package/resources/qbd/invoices.d.ts +16 -21
- package/resources/qbd/invoices.d.ts.map +1 -1
- package/resources/qbd/invoices.js +14 -16
- package/resources/qbd/invoices.js.map +1 -1
- package/resources/qbd/invoices.mjs +13 -14
- package/resources/qbd/invoices.mjs.map +1 -1
- package/resources/qbd/item-groups.d.mts +548 -0
- package/resources/qbd/item-groups.d.mts.map +1 -0
- package/resources/qbd/item-groups.d.ts +14 -18
- package/resources/qbd/item-groups.d.ts.map +1 -1
- package/resources/qbd/item-groups.js +12 -14
- package/resources/qbd/item-groups.js.map +1 -1
- package/resources/qbd/item-groups.mjs +11 -12
- package/resources/qbd/item-groups.mjs.map +1 -1
- package/resources/qbd/item-receipts.d.mts +2416 -0
- package/resources/qbd/item-receipts.d.mts.map +1 -0
- package/resources/qbd/item-receipts.d.ts +16 -21
- package/resources/qbd/item-receipts.d.ts.map +1 -1
- package/resources/qbd/item-receipts.js +14 -16
- package/resources/qbd/item-receipts.js.map +1 -1
- package/resources/qbd/item-receipts.mjs +13 -14
- package/resources/qbd/item-receipts.mjs.map +1 -1
- package/resources/qbd/item-sites.d.mts +244 -0
- package/resources/qbd/item-sites.d.mts.map +1 -0
- package/resources/qbd/item-sites.d.ts +10 -12
- package/resources/qbd/item-sites.d.ts.map +1 -1
- package/resources/qbd/item-sites.js +9 -11
- package/resources/qbd/item-sites.js.map +1 -1
- package/resources/qbd/item-sites.mjs +8 -9
- package/resources/qbd/item-sites.mjs.map +1 -1
- package/resources/qbd/journal-entries.d.mts +937 -0
- package/resources/qbd/journal-entries.d.mts.map +1 -0
- package/resources/qbd/journal-entries.d.ts +16 -21
- package/resources/qbd/journal-entries.d.ts.map +1 -1
- package/resources/qbd/journal-entries.js +14 -16
- package/resources/qbd/journal-entries.js.map +1 -1
- package/resources/qbd/journal-entries.mjs +13 -14
- package/resources/qbd/journal-entries.mjs.map +1 -1
- package/resources/qbd/non-inventory-items.d.mts +1016 -0
- package/resources/qbd/non-inventory-items.d.mts.map +1 -0
- package/resources/qbd/non-inventory-items.d.ts +14 -18
- package/resources/qbd/non-inventory-items.d.ts.map +1 -1
- package/resources/qbd/non-inventory-items.js +12 -14
- package/resources/qbd/non-inventory-items.js.map +1 -1
- package/resources/qbd/non-inventory-items.mjs +11 -12
- package/resources/qbd/non-inventory-items.mjs.map +1 -1
- package/resources/qbd/other-charge-items.d.mts +948 -0
- package/resources/qbd/other-charge-items.d.mts.map +1 -0
- package/resources/qbd/other-charge-items.d.ts +14 -18
- package/resources/qbd/other-charge-items.d.ts.map +1 -1
- package/resources/qbd/other-charge-items.js +12 -14
- package/resources/qbd/other-charge-items.js.map +1 -1
- package/resources/qbd/other-charge-items.mjs +11 -12
- package/resources/qbd/other-charge-items.mjs.map +1 -1
- package/resources/qbd/other-names.d.mts +711 -0
- package/resources/qbd/other-names.d.mts.map +1 -0
- package/resources/qbd/other-names.d.ts +11 -14
- package/resources/qbd/other-names.d.ts.map +1 -1
- package/resources/qbd/other-names.js +9 -7
- package/resources/qbd/other-names.js.map +1 -1
- package/resources/qbd/other-names.mjs +9 -7
- package/resources/qbd/other-names.mjs.map +1 -1
- package/resources/qbd/payment-methods.d.mts +258 -0
- package/resources/qbd/payment-methods.d.mts.map +1 -0
- package/resources/qbd/payment-methods.d.ts +9 -11
- package/resources/qbd/payment-methods.d.ts.map +1 -1
- package/resources/qbd/payment-methods.js +7 -5
- package/resources/qbd/payment-methods.js.map +1 -1
- package/resources/qbd/payment-methods.mjs +7 -5
- package/resources/qbd/payment-methods.mjs.map +1 -1
- package/resources/qbd/payroll-wage-items.d.mts +267 -0
- package/resources/qbd/payroll-wage-items.d.mts.map +1 -0
- package/resources/qbd/payroll-wage-items.d.ts +12 -15
- package/resources/qbd/payroll-wage-items.d.ts.map +1 -1
- package/resources/qbd/payroll-wage-items.js +10 -12
- package/resources/qbd/payroll-wage-items.js.map +1 -1
- package/resources/qbd/payroll-wage-items.mjs +9 -10
- package/resources/qbd/payroll-wage-items.mjs.map +1 -1
- package/resources/qbd/preferences.d.mts +599 -0
- package/resources/qbd/preferences.d.mts.map +1 -0
- package/resources/qbd/preferences.d.ts +5 -5
- package/resources/qbd/preferences.d.ts.map +1 -1
- package/resources/qbd/preferences.js +3 -2
- package/resources/qbd/preferences.js.map +1 -1
- package/resources/qbd/preferences.mjs +3 -2
- package/resources/qbd/preferences.mjs.map +1 -1
- package/resources/qbd/price-levels.d.mts +509 -0
- package/resources/qbd/price-levels.d.mts.map +1 -0
- package/resources/qbd/price-levels.d.ts +11 -14
- package/resources/qbd/price-levels.d.ts.map +1 -1
- package/resources/qbd/price-levels.js +9 -7
- package/resources/qbd/price-levels.js.map +1 -1
- package/resources/qbd/price-levels.mjs +9 -7
- package/resources/qbd/price-levels.mjs.map +1 -1
- package/resources/qbd/purchase-orders.d.mts +2632 -0
- package/resources/qbd/purchase-orders.d.mts.map +1 -0
- package/resources/qbd/purchase-orders.d.ts +16 -21
- package/resources/qbd/purchase-orders.d.ts.map +1 -1
- package/resources/qbd/purchase-orders.js +14 -16
- package/resources/qbd/purchase-orders.js.map +1 -1
- package/resources/qbd/purchase-orders.mjs +13 -14
- package/resources/qbd/purchase-orders.mjs.map +1 -1
- package/resources/qbd/qbd.d.mts +261 -0
- package/resources/qbd/qbd.d.mts.map +1 -0
- package/resources/qbd/qbd.d.ts +39 -39
- package/resources/qbd/qbd.d.ts.map +1 -1
- package/resources/qbd/qbd.js +59 -114
- package/resources/qbd/qbd.js.map +1 -1
- package/resources/qbd/qbd.mjs +37 -70
- package/resources/qbd/qbd.mjs.map +1 -1
- package/resources/qbd/receive-payments.d.mts +1358 -0
- package/resources/qbd/receive-payments.d.mts.map +1 -0
- package/resources/qbd/receive-payments.d.ts +16 -21
- package/resources/qbd/receive-payments.d.ts.map +1 -1
- package/resources/qbd/receive-payments.js +14 -16
- package/resources/qbd/receive-payments.js.map +1 -1
- package/resources/qbd/receive-payments.mjs +13 -14
- package/resources/qbd/receive-payments.mjs.map +1 -1
- package/resources/qbd/sales-orders.d.mts +2705 -0
- package/resources/qbd/sales-orders.d.mts.map +1 -0
- package/resources/qbd/sales-orders.d.ts +16 -21
- package/resources/qbd/sales-orders.d.ts.map +1 -1
- package/resources/qbd/sales-orders.js +14 -16
- package/resources/qbd/sales-orders.js.map +1 -1
- package/resources/qbd/sales-orders.mjs +13 -14
- package/resources/qbd/sales-orders.mjs.map +1 -1
- package/resources/qbd/sales-receipts.d.mts +3454 -0
- package/resources/qbd/sales-receipts.d.mts.map +1 -0
- package/resources/qbd/sales-receipts.d.ts +16 -21
- package/resources/qbd/sales-receipts.d.ts.map +1 -1
- package/resources/qbd/sales-receipts.js +14 -16
- package/resources/qbd/sales-receipts.js.map +1 -1
- package/resources/qbd/sales-receipts.mjs +13 -14
- package/resources/qbd/sales-receipts.mjs.map +1 -1
- package/resources/qbd/sales-representatives.d.mts +317 -0
- package/resources/qbd/sales-representatives.d.mts.map +1 -0
- package/resources/qbd/sales-representatives.d.ts +11 -14
- package/resources/qbd/sales-representatives.d.ts.map +1 -1
- package/resources/qbd/sales-representatives.js +9 -7
- package/resources/qbd/sales-representatives.js.map +1 -1
- package/resources/qbd/sales-representatives.mjs +9 -7
- package/resources/qbd/sales-representatives.mjs.map +1 -1
- package/resources/qbd/sales-tax-codes.d.mts +369 -0
- package/resources/qbd/sales-tax-codes.d.mts.map +1 -0
- package/resources/qbd/sales-tax-codes.d.ts +11 -14
- package/resources/qbd/sales-tax-codes.d.ts.map +1 -1
- package/resources/qbd/sales-tax-codes.js +9 -7
- package/resources/qbd/sales-tax-codes.js.map +1 -1
- package/resources/qbd/sales-tax-codes.mjs +9 -7
- package/resources/qbd/sales-tax-codes.mjs.map +1 -1
- package/resources/qbd/sales-tax-items.d.mts +518 -0
- package/resources/qbd/sales-tax-items.d.mts.map +1 -0
- package/resources/qbd/sales-tax-items.d.ts +14 -18
- package/resources/qbd/sales-tax-items.d.ts.map +1 -1
- package/resources/qbd/sales-tax-items.js +12 -14
- package/resources/qbd/sales-tax-items.js.map +1 -1
- package/resources/qbd/sales-tax-items.mjs +11 -12
- package/resources/qbd/sales-tax-items.mjs.map +1 -1
- package/resources/qbd/service-items.d.mts +987 -0
- package/resources/qbd/service-items.d.mts.map +1 -0
- package/resources/qbd/service-items.d.ts +14 -18
- package/resources/qbd/service-items.d.ts.map +1 -1
- package/resources/qbd/service-items.js +12 -14
- package/resources/qbd/service-items.js.map +1 -1
- package/resources/qbd/service-items.mjs +11 -12
- package/resources/qbd/service-items.mjs.map +1 -1
- package/resources/qbd/standard-terms.d.mts +273 -0
- package/resources/qbd/standard-terms.d.mts.map +1 -0
- package/resources/qbd/standard-terms.d.ts +9 -11
- package/resources/qbd/standard-terms.d.ts.map +1 -1
- package/resources/qbd/standard-terms.js +7 -5
- package/resources/qbd/standard-terms.js.map +1 -1
- package/resources/qbd/standard-terms.mjs +7 -5
- package/resources/qbd/standard-terms.mjs.map +1 -1
- package/resources/qbd/subtotal-items.d.mts +383 -0
- package/resources/qbd/subtotal-items.d.mts.map +1 -0
- package/resources/qbd/subtotal-items.d.ts +14 -18
- package/resources/qbd/subtotal-items.d.ts.map +1 -1
- package/resources/qbd/subtotal-items.js +12 -14
- package/resources/qbd/subtotal-items.js.map +1 -1
- package/resources/qbd/subtotal-items.mjs +11 -12
- package/resources/qbd/subtotal-items.mjs.map +1 -1
- package/resources/qbd/templates.d.mts +107 -0
- package/resources/qbd/templates.d.mts.map +1 -0
- package/resources/qbd/templates.d.ts +5 -5
- package/resources/qbd/templates.d.ts.map +1 -1
- package/resources/qbd/templates.js +3 -2
- package/resources/qbd/templates.js.map +1 -1
- package/resources/qbd/templates.mjs +3 -2
- package/resources/qbd/templates.mjs.map +1 -1
- package/resources/qbd/time-tracking-activities.d.mts +560 -0
- package/resources/qbd/time-tracking-activities.d.mts.map +1 -0
- package/resources/qbd/time-tracking-activities.d.ts +16 -21
- package/resources/qbd/time-tracking-activities.d.ts.map +1 -1
- package/resources/qbd/time-tracking-activities.js +17 -15
- package/resources/qbd/time-tracking-activities.js.map +1 -1
- package/resources/qbd/time-tracking-activities.mjs +16 -13
- package/resources/qbd/time-tracking-activities.mjs.map +1 -1
- package/resources/qbd/transactions.d.mts +356 -0
- package/resources/qbd/transactions.d.mts.map +1 -0
- package/resources/qbd/transactions.d.ts +10 -12
- package/resources/qbd/transactions.d.ts.map +1 -1
- package/resources/qbd/transactions.js +9 -11
- package/resources/qbd/transactions.js.map +1 -1
- package/resources/qbd/transactions.mjs +8 -9
- package/resources/qbd/transactions.mjs.map +1 -1
- package/resources/qbd/transfers.d.mts +331 -0
- package/resources/qbd/transfers.d.mts.map +1 -0
- package/resources/qbd/transfers.d.ts +14 -18
- package/resources/qbd/transfers.d.ts.map +1 -1
- package/resources/qbd/transfers.js +12 -14
- package/resources/qbd/transfers.js.map +1 -1
- package/resources/qbd/transfers.mjs +11 -12
- package/resources/qbd/transfers.mjs.map +1 -1
- package/resources/qbd/unit-of-measure-sets.d.mts +443 -0
- package/resources/qbd/unit-of-measure-sets.d.mts.map +1 -0
- package/resources/qbd/unit-of-measure-sets.d.ts +9 -11
- package/resources/qbd/unit-of-measure-sets.d.ts.map +1 -1
- package/resources/qbd/unit-of-measure-sets.js +7 -5
- package/resources/qbd/unit-of-measure-sets.js.map +1 -1
- package/resources/qbd/unit-of-measure-sets.mjs +7 -5
- package/resources/qbd/unit-of-measure-sets.mjs.map +1 -1
- package/resources/qbd/vendor-credits.d.mts +2387 -0
- package/resources/qbd/vendor-credits.d.mts.map +1 -0
- package/resources/qbd/vendor-credits.d.ts +27 -24
- package/resources/qbd/vendor-credits.d.ts.map +1 -1
- package/resources/qbd/vendor-credits.js +14 -16
- package/resources/qbd/vendor-credits.js.map +1 -1
- package/resources/qbd/vendor-credits.mjs +13 -14
- package/resources/qbd/vendor-credits.mjs.map +1 -1
- package/resources/qbd/vendors.d.mts +1734 -0
- package/resources/qbd/vendors.d.mts.map +1 -0
- package/resources/qbd/vendors.d.ts +14 -18
- package/resources/qbd/vendors.d.ts.map +1 -1
- package/resources/qbd/vendors.js +12 -14
- package/resources/qbd/vendors.js.map +1 -1
- package/resources/qbd/vendors.mjs +11 -12
- package/resources/qbd/vendors.mjs.map +1 -1
- package/resources/qbd.d.mts +2 -0
- package/resources/qbd.d.mts.map +1 -0
- package/resources/qbd.d.ts.map +1 -1
- package/resources/qbd.js +2 -15
- package/resources/qbd.js.map +1 -1
- package/resources.d.mts +2 -0
- package/resources.d.mts.map +1 -0
- package/resources.d.ts.map +1 -1
- package/resources.js +2 -15
- package/resources.js.map +1 -1
- package/src/api-promise.ts +2 -0
- package/src/client.ts +769 -0
- package/src/core/README.md +3 -0
- package/src/core/api-promise.ts +92 -0
- package/src/core/error.ts +130 -0
- package/src/core/pagination.ts +157 -0
- package/src/core/resource.ts +11 -0
- package/src/core/uploads.ts +2 -0
- package/src/error.ts +2 -130
- package/src/index.ts +6 -223
- 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 +50 -0
- package/src/internal/qs/formats.ts +3 -2
- package/src/internal/qs/index.ts +3 -3
- package/src/internal/qs/stringify.ts +18 -21
- package/src/internal/qs/utils.ts +16 -16
- 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 +126 -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/pagination.ts +2 -60
- package/src/resource.ts +2 -11
- package/src/resources/auth-sessions.ts +4 -3
- package/src/resources/end-users.ts +33 -16
- package/src/resources/index.ts +3 -3
- package/src/resources/qbd/account-tax-lines.ts +7 -9
- package/src/resources/qbd/accounts.ts +19 -24
- package/src/resources/qbd/bill-check-payments.ts +31 -38
- package/src/resources/qbd/bill-credit-card-payments.ts +31 -30
- package/src/resources/qbd/bills.ts +35 -36
- package/src/resources/qbd/build-assemblies.ts +30 -38
- package/src/resources/qbd/checks.ts +27 -35
- package/src/resources/qbd/classes.ts +19 -20
- package/src/resources/qbd/company.ts +7 -6
- package/src/resources/qbd/credit-card-charges.ts +31 -38
- package/src/resources/qbd/credit-card-credits.ts +31 -38
- package/src/resources/qbd/credit-card-refunds.ts +26 -32
- package/src/resources/qbd/credit-memos.ts +29 -41
- package/src/resources/qbd/currencies.ts +19 -24
- package/src/resources/qbd/customer-types.ts +16 -19
- package/src/resources/qbd/customers.ts +23 -33
- package/src/resources/qbd/date-driven-terms.ts +16 -19
- package/src/resources/qbd/deleted-list-objects.ts +8 -7
- package/src/resources/qbd/deleted-transactions.ts +8 -7
- package/src/resources/qbd/discount-items.ts +25 -32
- package/src/resources/qbd/employees.ts +19 -24
- package/src/resources/qbd/estimates.ts +28 -39
- package/src/resources/qbd/index.ts +90 -90
- package/src/resources/qbd/inventory-adjustments.ts +27 -32
- package/src/resources/qbd/inventory-assembly-items.ts +31 -30
- package/src/resources/qbd/inventory-items.ts +25 -32
- package/src/resources/qbd/inventory-sites.ts +20 -28
- package/src/resources/qbd/invoices.ts +28 -39
- package/src/resources/qbd/item-groups.ts +23 -37
- package/src/resources/qbd/item-receipts.ts +29 -41
- package/src/resources/qbd/item-sites.ts +16 -24
- package/src/resources/qbd/journal-entries.ts +30 -38
- package/src/resources/qbd/non-inventory-items.ts +26 -32
- package/src/resources/qbd/other-charge-items.ts +26 -32
- package/src/resources/qbd/other-names.ts +19 -28
- package/src/resources/qbd/payment-methods.ts +16 -19
- package/src/resources/qbd/payroll-wage-items.ts +21 -26
- package/src/resources/qbd/preferences.ts +7 -6
- package/src/resources/qbd/price-levels.ts +19 -28
- package/src/resources/qbd/purchase-orders.ts +30 -38
- package/src/resources/qbd/qbd.ts +151 -187
- package/src/resources/qbd/receive-payments.ts +31 -35
- package/src/resources/qbd/sales-orders.ts +29 -41
- package/src/resources/qbd/sales-receipts.ts +30 -38
- package/src/resources/qbd/sales-representatives.ts +22 -26
- package/src/resources/qbd/sales-tax-codes.ts +20 -28
- package/src/resources/qbd/sales-tax-items.ts +25 -32
- package/src/resources/qbd/service-items.ts +24 -35
- package/src/resources/qbd/standard-terms.ts +16 -19
- package/src/resources/qbd/subtotal-items.ts +25 -32
- package/src/resources/qbd/templates.ts +7 -6
- package/src/resources/qbd/time-tracking-activities.ts +36 -36
- package/src/resources/qbd/transactions.ts +17 -22
- package/src/resources/qbd/transfers.ts +23 -33
- package/src/resources/qbd/unit-of-measure-sets.ts +17 -20
- package/src/resources/qbd/vendor-credits.ts +41 -41
- package/src/resources/qbd/vendors.ts +23 -26
- package/src/resources/qbd.ts +1 -1
- package/src/resources.ts +1 -1
- package/src/tsconfig.json +2 -2
- package/src/uploads.ts +2 -255
- package/src/version.ts +1 -1
- package/uploads.d.mts +2 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +1 -74
- package/uploads.d.ts.map +1 -1
- package/uploads.js +3 -168
- package/uploads.js.map +1 -1
- package/uploads.mjs +1 -157
- package/uploads.mjs.map +1 -1
- package/version.d.mts +2 -0
- package/version.d.mts.map +1 -0
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
- package/_shims/MultipartBody.d.ts +0 -9
- package/_shims/MultipartBody.d.ts.map +0 -1
- package/_shims/MultipartBody.js +0 -16
- package/_shims/MultipartBody.js.map +0 -1
- package/_shims/MultipartBody.mjs +0 -12
- package/_shims/MultipartBody.mjs.map +0 -1
- package/_shims/README.md +0 -46
- package/_shims/auto/runtime-bun.d.ts +0 -5
- package/_shims/auto/runtime-bun.d.ts.map +0 -1
- package/_shims/auto/runtime-bun.js +0 -21
- package/_shims/auto/runtime-bun.js.map +0 -1
- package/_shims/auto/runtime-bun.mjs +0 -2
- package/_shims/auto/runtime-bun.mjs.map +0 -1
- package/_shims/auto/runtime-node.d.ts +0 -5
- package/_shims/auto/runtime-node.d.ts.map +0 -1
- package/_shims/auto/runtime-node.js +0 -21
- package/_shims/auto/runtime-node.js.map +0 -1
- package/_shims/auto/runtime-node.mjs +0 -2
- package/_shims/auto/runtime-node.mjs.map +0 -1
- package/_shims/auto/runtime.d.ts +0 -5
- package/_shims/auto/runtime.d.ts.map +0 -1
- package/_shims/auto/runtime.js +0 -21
- package/_shims/auto/runtime.js.map +0 -1
- package/_shims/auto/runtime.mjs +0 -2
- package/_shims/auto/runtime.mjs.map +0 -1
- package/_shims/auto/types-node.d.ts +0 -5
- package/_shims/auto/types-node.d.ts.map +0 -1
- package/_shims/auto/types-node.js +0 -21
- package/_shims/auto/types-node.js.map +0 -1
- package/_shims/auto/types-node.mjs +0 -2
- package/_shims/auto/types-node.mjs.map +0 -1
- package/_shims/auto/types.d.ts +0 -101
- package/_shims/auto/types.js +0 -3
- package/_shims/auto/types.mjs +0 -3
- package/_shims/bun-runtime.d.ts +0 -6
- package/_shims/bun-runtime.d.ts.map +0 -1
- package/_shims/bun-runtime.js +0 -14
- package/_shims/bun-runtime.js.map +0 -1
- package/_shims/bun-runtime.mjs +0 -10
- package/_shims/bun-runtime.mjs.map +0 -1
- package/_shims/index.d.ts +0 -83
- package/_shims/index.js +0 -17
- package/_shims/index.mjs +0 -11
- package/_shims/manual-types.d.ts +0 -12
- package/_shims/manual-types.js +0 -3
- package/_shims/manual-types.mjs +0 -3
- package/_shims/node-runtime.d.ts +0 -3
- package/_shims/node-runtime.d.ts.map +0 -1
- package/_shims/node-runtime.js +0 -89
- package/_shims/node-runtime.js.map +0 -1
- package/_shims/node-runtime.mjs +0 -56
- package/_shims/node-runtime.mjs.map +0 -1
- package/_shims/node-types.d.ts +0 -42
- package/_shims/node-types.js +0 -3
- package/_shims/node-types.mjs +0 -3
- package/_shims/registry.d.ts +0 -37
- package/_shims/registry.d.ts.map +0 -1
- package/_shims/registry.js +0 -41
- package/_shims/registry.js.map +0 -1
- package/_shims/registry.mjs +0 -37
- package/_shims/registry.mjs.map +0 -1
- package/_shims/web-runtime.d.ts +0 -5
- package/_shims/web-runtime.d.ts.map +0 -1
- package/_shims/web-runtime.js +0 -78
- package/_shims/web-runtime.js.map +0 -1
- package/_shims/web-runtime.mjs +0 -71
- package/_shims/web-runtime.mjs.map +0 -1
- package/_shims/web-types.d.ts +0 -83
- package/_shims/web-types.js +0 -3
- package/_shims/web-types.mjs +0 -3
- package/core.d.ts +0 -255
- package/core.d.ts.map +0 -1
- package/core.js +0 -924
- package/core.js.map +0 -1
- package/core.mjs +0 -892
- package/core.mjs.map +0 -1
- package/shims/node.d.ts +0 -30
- package/shims/node.d.ts.map +0 -1
- package/shims/node.js +0 -31
- package/shims/node.js.map +0 -1
- package/shims/node.mjs +0 -5
- package/shims/node.mjs.map +0 -1
- package/shims/web.d.ts +0 -26
- package/shims/web.d.ts.map +0 -1
- package/shims/web.js +0 -31
- package/shims/web.js.map +0 -1
- package/shims/web.mjs +0 -5
- package/shims/web.mjs.map +0 -1
- package/src/_shims/MultipartBody.ts +0 -9
- package/src/_shims/README.md +0 -46
- package/src/_shims/auto/runtime-bun.ts +0 -4
- package/src/_shims/auto/runtime-node.ts +0 -4
- package/src/_shims/auto/runtime.ts +0 -4
- package/src/_shims/auto/types-node.ts +0 -4
- package/src/_shims/auto/types.d.ts +0 -101
- package/src/_shims/auto/types.js +0 -3
- package/src/_shims/auto/types.mjs +0 -3
- package/src/_shims/bun-runtime.ts +0 -14
- package/src/_shims/index.d.ts +0 -83
- package/src/_shims/index.js +0 -17
- package/src/_shims/index.mjs +0 -11
- package/src/_shims/manual-types.d.ts +0 -12
- package/src/_shims/manual-types.js +0 -3
- package/src/_shims/manual-types.mjs +0 -3
- package/src/_shims/node-runtime.ts +0 -81
- package/src/_shims/node-types.d.ts +0 -42
- package/src/_shims/node-types.js +0 -3
- package/src/_shims/node-types.mjs +0 -3
- package/src/_shims/registry.ts +0 -67
- package/src/_shims/web-runtime.ts +0 -103
- package/src/_shims/web-types.d.ts +0 -83
- package/src/_shims/web-types.js +0 -3
- package/src/_shims/web-types.mjs +0 -3
- package/src/core.ts +0 -1236
- package/src/shims/node.ts +0 -50
- package/src/shims/web.ts +0 -50
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export type Fetch = (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
|
|
2
|
+
/**
|
|
3
|
+
* An alias to the builtin `RequestInit` type so we can
|
|
4
|
+
* easily alias it in import statements if there are name clashes.
|
|
5
|
+
*
|
|
6
|
+
* https://developer.mozilla.org/docs/Web/API/RequestInit
|
|
7
|
+
*/
|
|
8
|
+
type _RequestInit = RequestInit;
|
|
9
|
+
/**
|
|
10
|
+
* An alias to the builtin `Response` type so we can
|
|
11
|
+
* easily alias it in import statements if there are name clashes.
|
|
12
|
+
*
|
|
13
|
+
* https://developer.mozilla.org/docs/Web/API/Response
|
|
14
|
+
*/
|
|
15
|
+
type _Response = Response;
|
|
16
|
+
/**
|
|
17
|
+
* The type for the first argument to `fetch`.
|
|
18
|
+
*
|
|
19
|
+
* https://developer.mozilla.org/docs/Web/API/Window/fetch#resource
|
|
20
|
+
*/
|
|
21
|
+
type _RequestInfo = Request | URL | string;
|
|
22
|
+
/**
|
|
23
|
+
* The type for constructing `RequestInit` Headers.
|
|
24
|
+
*
|
|
25
|
+
* https://developer.mozilla.org/docs/Web/API/RequestInit#setting_headers
|
|
26
|
+
*/
|
|
27
|
+
type _HeadersInit = RequestInit['headers'];
|
|
28
|
+
/**
|
|
29
|
+
* The type for constructing `RequestInit` body.
|
|
30
|
+
*
|
|
31
|
+
* https://developer.mozilla.org/docs/Web/API/RequestInit#body
|
|
32
|
+
*/
|
|
33
|
+
type _BodyInit = RequestInit['body'];
|
|
34
|
+
/**
|
|
35
|
+
* An alias to the builtin `Array<T>` type so we can
|
|
36
|
+
* easily alias it in import statements if there are name clashes.
|
|
37
|
+
*/
|
|
38
|
+
type _Array<T> = Array<T>;
|
|
39
|
+
/**
|
|
40
|
+
* An alias to the builtin `Record<K, T>` type so we can
|
|
41
|
+
* easily alias it in import statements if there are name clashes.
|
|
42
|
+
*/
|
|
43
|
+
type _Record<K extends keyof any, T> = Record<K, T>;
|
|
44
|
+
export type { _Array as Array, _BodyInit as BodyInit, _HeadersInit as HeadersInit, _Record as Record, _RequestInfo as RequestInfo, _RequestInit as RequestInit, _Response as Response, };
|
|
45
|
+
/**
|
|
46
|
+
* A copy of the builtin `EndingType` type as it isn't fully supported in certain
|
|
47
|
+
* environments and attempting to reference the global version will error.
|
|
48
|
+
*
|
|
49
|
+
* https://github.com/microsoft/TypeScript/blob/49ad1a3917a0ea57f5ff248159256e12bb1cb705/src/lib/dom.generated.d.ts#L27941
|
|
50
|
+
*/
|
|
51
|
+
type EndingType = 'native' | 'transparent';
|
|
52
|
+
/**
|
|
53
|
+
* A copy of the builtin `BlobPropertyBag` type as it isn't fully supported in certain
|
|
54
|
+
* environments and attempting to reference the global version will error.
|
|
55
|
+
*
|
|
56
|
+
* https://github.com/microsoft/TypeScript/blob/49ad1a3917a0ea57f5ff248159256e12bb1cb705/src/lib/dom.generated.d.ts#L154
|
|
57
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob#options
|
|
58
|
+
*/
|
|
59
|
+
export interface BlobPropertyBag {
|
|
60
|
+
endings?: EndingType;
|
|
61
|
+
type?: string;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* A copy of the builtin `FilePropertyBag` type as it isn't fully supported in certain
|
|
65
|
+
* environments and attempting to reference the global version will error.
|
|
66
|
+
*
|
|
67
|
+
* https://github.com/microsoft/TypeScript/blob/49ad1a3917a0ea57f5ff248159256e12bb1cb705/src/lib/dom.generated.d.ts#L503
|
|
68
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/File/File#options
|
|
69
|
+
*/
|
|
70
|
+
export interface FilePropertyBag extends BlobPropertyBag {
|
|
71
|
+
lastModified?: number;
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=builtin-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builtin-types.d.ts","sourceRoot":"","sources":["../src/internal/builtin-types.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,KAAK,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,OAAO,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;AAE7F;;;;;GAKG;AACH,KAAK,YAAY,GAAG,WAAW,CAAC;AAEhC;;;;;GAKG;AACH,KAAK,SAAS,GAAG,QAAQ,CAAC;AAE1B;;;;GAIG;AACH,KAAK,YAAY,GAAG,OAAO,GAAG,GAAG,GAAG,MAAM,CAAC;AAE3C;;;;GAIG;AACH,KAAK,YAAY,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC;AAE3C;;;;GAIG;AACH,KAAK,SAAS,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;AAErC;;;GAGG;AACH,KAAK,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;AAE1B;;;GAGG;AACH,KAAK,OAAO,CAAC,CAAC,SAAS,MAAM,GAAG,EAAE,CAAC,IAAI,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAEpD,YAAY,EACV,MAAM,IAAI,KAAK,EACf,SAAS,IAAI,QAAQ,EACrB,YAAY,IAAI,WAAW,EAC3B,OAAO,IAAI,MAAM,EACjB,YAAY,IAAI,WAAW,EAC3B,YAAY,IAAI,WAAW,EAC3B,SAAS,IAAI,QAAQ,GACtB,CAAC;AAEF;;;;;GAKG;AACH,KAAK,UAAU,GAAG,QAAQ,GAAG,aAAa,CAAC;AAE3C;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;;GAMG;AACH,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builtin-types.js","sourceRoot":"","sources":["../src/internal/builtin-types.ts"],"names":[],"mappings":";AAAA,sFAAsF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builtin-types.mjs","sourceRoot":"","sources":["../src/internal/builtin-types.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const isRunningInBrowser: () => boolean;
|
|
2
|
+
type Arch = 'x32' | 'x64' | 'arm' | 'arm64' | `other:${string}` | 'unknown';
|
|
3
|
+
type PlatformName = 'MacOS' | 'Linux' | 'Windows' | 'FreeBSD' | 'OpenBSD' | 'iOS' | 'Android' | `Other:${string}` | 'Unknown';
|
|
4
|
+
type Browser = 'ie' | 'edge' | 'chrome' | 'firefox' | 'safari';
|
|
5
|
+
type PlatformProperties = {
|
|
6
|
+
'X-Stainless-Lang': 'js';
|
|
7
|
+
'X-Stainless-Package-Version': string;
|
|
8
|
+
'X-Stainless-OS': PlatformName;
|
|
9
|
+
'X-Stainless-Arch': Arch;
|
|
10
|
+
'X-Stainless-Runtime': 'node' | 'deno' | 'edge' | `browser:${Browser}` | 'unknown';
|
|
11
|
+
'X-Stainless-Runtime-Version': string;
|
|
12
|
+
};
|
|
13
|
+
export declare const getPlatformHeaders: () => PlatformProperties;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=detect-platform.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detect-platform.d.mts","sourceRoot":"","sources":["../src/internal/detect-platform.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB,eAS9B,CAAC;AA0BF,KAAK,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,OAAO,GAAG,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;AAC5E,KAAK,YAAY,GACb,OAAO,GACP,OAAO,GACP,SAAS,GACT,SAAS,GACT,SAAS,GACT,KAAK,GACL,SAAS,GACT,SAAS,MAAM,EAAE,GACjB,SAAS,CAAC;AACd,KAAK,OAAO,GAAG,IAAI,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;AAC/D,KAAK,kBAAkB,GAAG;IACxB,kBAAkB,EAAE,IAAI,CAAC;IACzB,6BAA6B,EAAE,MAAM,CAAC;IACtC,gBAAgB,EAAE,YAAY,CAAC;IAC/B,kBAAkB,EAAE,IAAI,CAAC;IACzB,qBAAqB,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,OAAO,EAAE,GAAG,SAAS,CAAC;IACnF,6BAA6B,EAAE,MAAM,CAAC;CACvC,CAAC;AAuIF,eAAO,MAAM,kBAAkB,0BAE9B,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const isRunningInBrowser: () => boolean;
|
|
2
|
+
type Arch = 'x32' | 'x64' | 'arm' | 'arm64' | `other:${string}` | 'unknown';
|
|
3
|
+
type PlatformName = 'MacOS' | 'Linux' | 'Windows' | 'FreeBSD' | 'OpenBSD' | 'iOS' | 'Android' | `Other:${string}` | 'Unknown';
|
|
4
|
+
type Browser = 'ie' | 'edge' | 'chrome' | 'firefox' | 'safari';
|
|
5
|
+
type PlatformProperties = {
|
|
6
|
+
'X-Stainless-Lang': 'js';
|
|
7
|
+
'X-Stainless-Package-Version': string;
|
|
8
|
+
'X-Stainless-OS': PlatformName;
|
|
9
|
+
'X-Stainless-Arch': Arch;
|
|
10
|
+
'X-Stainless-Runtime': 'node' | 'deno' | 'edge' | `browser:${Browser}` | 'unknown';
|
|
11
|
+
'X-Stainless-Runtime-Version': string;
|
|
12
|
+
};
|
|
13
|
+
export declare const getPlatformHeaders: () => PlatformProperties;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=detect-platform.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detect-platform.d.ts","sourceRoot":"","sources":["../src/internal/detect-platform.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB,eAS9B,CAAC;AA0BF,KAAK,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,OAAO,GAAG,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;AAC5E,KAAK,YAAY,GACb,OAAO,GACP,OAAO,GACP,SAAS,GACT,SAAS,GACT,SAAS,GACT,KAAK,GACL,SAAS,GACT,SAAS,MAAM,EAAE,GACjB,SAAS,CAAC;AACd,KAAK,OAAO,GAAG,IAAI,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;AAC/D,KAAK,kBAAkB,GAAG;IACxB,kBAAkB,EAAE,IAAI,CAAC;IACzB,6BAA6B,EAAE,MAAM,CAAC;IACtC,gBAAgB,EAAE,YAAY,CAAC;IAC/B,kBAAkB,EAAE,IAAI,CAAC;IACzB,qBAAqB,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,OAAO,EAAE,GAAG,SAAS,CAAC;IACnF,6BAA6B,EAAE,MAAM,CAAC;CACvC,CAAC;AAuIF,eAAO,MAAM,kBAAkB,0BAE9B,CAAC"}
|
|
@@ -0,0 +1,162 @@
|
|
|
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.getPlatformHeaders = exports.isRunningInBrowser = void 0;
|
|
5
|
+
const version_1 = require("../version.js");
|
|
6
|
+
const isRunningInBrowser = () => {
|
|
7
|
+
return (
|
|
8
|
+
// @ts-ignore
|
|
9
|
+
typeof window !== 'undefined' &&
|
|
10
|
+
// @ts-ignore
|
|
11
|
+
typeof window.document !== 'undefined' &&
|
|
12
|
+
// @ts-ignore
|
|
13
|
+
typeof navigator !== 'undefined');
|
|
14
|
+
};
|
|
15
|
+
exports.isRunningInBrowser = isRunningInBrowser;
|
|
16
|
+
/**
|
|
17
|
+
* Note this does not detect 'browser'; for that, use getBrowserInfo().
|
|
18
|
+
*/
|
|
19
|
+
function getDetectedPlatform() {
|
|
20
|
+
if (typeof Deno !== 'undefined' && Deno.build != null) {
|
|
21
|
+
return 'deno';
|
|
22
|
+
}
|
|
23
|
+
if (typeof EdgeRuntime !== 'undefined') {
|
|
24
|
+
return 'edge';
|
|
25
|
+
}
|
|
26
|
+
if (Object.prototype.toString.call(typeof globalThis.process !== 'undefined' ? globalThis.process : 0) === '[object process]') {
|
|
27
|
+
return 'node';
|
|
28
|
+
}
|
|
29
|
+
return 'unknown';
|
|
30
|
+
}
|
|
31
|
+
const getPlatformProperties = () => {
|
|
32
|
+
const detectedPlatform = getDetectedPlatform();
|
|
33
|
+
if (detectedPlatform === 'deno') {
|
|
34
|
+
return {
|
|
35
|
+
'X-Stainless-Lang': 'js',
|
|
36
|
+
'X-Stainless-Package-Version': version_1.VERSION,
|
|
37
|
+
'X-Stainless-OS': normalizePlatform(Deno.build.os),
|
|
38
|
+
'X-Stainless-Arch': normalizeArch(Deno.build.arch),
|
|
39
|
+
'X-Stainless-Runtime': 'deno',
|
|
40
|
+
'X-Stainless-Runtime-Version': typeof Deno.version === 'string' ? Deno.version : Deno.version?.deno ?? 'unknown',
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
if (typeof EdgeRuntime !== 'undefined') {
|
|
44
|
+
return {
|
|
45
|
+
'X-Stainless-Lang': 'js',
|
|
46
|
+
'X-Stainless-Package-Version': version_1.VERSION,
|
|
47
|
+
'X-Stainless-OS': 'Unknown',
|
|
48
|
+
'X-Stainless-Arch': `other:${EdgeRuntime}`,
|
|
49
|
+
'X-Stainless-Runtime': 'edge',
|
|
50
|
+
'X-Stainless-Runtime-Version': globalThis.process.version,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
// Check if Node.js
|
|
54
|
+
if (detectedPlatform === 'node') {
|
|
55
|
+
return {
|
|
56
|
+
'X-Stainless-Lang': 'js',
|
|
57
|
+
'X-Stainless-Package-Version': version_1.VERSION,
|
|
58
|
+
'X-Stainless-OS': normalizePlatform(globalThis.process.platform ?? 'unknown'),
|
|
59
|
+
'X-Stainless-Arch': normalizeArch(globalThis.process.arch ?? 'unknown'),
|
|
60
|
+
'X-Stainless-Runtime': 'node',
|
|
61
|
+
'X-Stainless-Runtime-Version': globalThis.process.version ?? 'unknown',
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
const browserInfo = getBrowserInfo();
|
|
65
|
+
if (browserInfo) {
|
|
66
|
+
return {
|
|
67
|
+
'X-Stainless-Lang': 'js',
|
|
68
|
+
'X-Stainless-Package-Version': version_1.VERSION,
|
|
69
|
+
'X-Stainless-OS': 'Unknown',
|
|
70
|
+
'X-Stainless-Arch': 'unknown',
|
|
71
|
+
'X-Stainless-Runtime': `browser:${browserInfo.browser}`,
|
|
72
|
+
'X-Stainless-Runtime-Version': browserInfo.version,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
// TODO add support for Cloudflare workers, etc.
|
|
76
|
+
return {
|
|
77
|
+
'X-Stainless-Lang': 'js',
|
|
78
|
+
'X-Stainless-Package-Version': version_1.VERSION,
|
|
79
|
+
'X-Stainless-OS': 'Unknown',
|
|
80
|
+
'X-Stainless-Arch': 'unknown',
|
|
81
|
+
'X-Stainless-Runtime': 'unknown',
|
|
82
|
+
'X-Stainless-Runtime-Version': 'unknown',
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
// Note: modified from https://github.com/JS-DevTools/host-environment/blob/b1ab79ecde37db5d6e163c050e54fe7d287d7c92/src/isomorphic.browser.ts
|
|
86
|
+
function getBrowserInfo() {
|
|
87
|
+
if (typeof navigator === 'undefined' || !navigator) {
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
// NOTE: The order matters here!
|
|
91
|
+
const browserPatterns = [
|
|
92
|
+
{ key: 'edge', pattern: /Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
93
|
+
{ key: 'ie', pattern: /MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
94
|
+
{ key: 'ie', pattern: /Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
95
|
+
{ key: 'chrome', pattern: /Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
96
|
+
{ key: 'firefox', pattern: /Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
97
|
+
{ key: 'safari', pattern: /(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/ },
|
|
98
|
+
];
|
|
99
|
+
// Find the FIRST matching browser
|
|
100
|
+
for (const { key, pattern } of browserPatterns) {
|
|
101
|
+
const match = pattern.exec(navigator.userAgent);
|
|
102
|
+
if (match) {
|
|
103
|
+
const major = match[1] || 0;
|
|
104
|
+
const minor = match[2] || 0;
|
|
105
|
+
const patch = match[3] || 0;
|
|
106
|
+
return { browser: key, version: `${major}.${minor}.${patch}` };
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
const normalizeArch = (arch) => {
|
|
112
|
+
// Node docs:
|
|
113
|
+
// - https://nodejs.org/api/process.html#processarch
|
|
114
|
+
// Deno docs:
|
|
115
|
+
// - https://doc.deno.land/deno/stable/~/Deno.build
|
|
116
|
+
if (arch === 'x32')
|
|
117
|
+
return 'x32';
|
|
118
|
+
if (arch === 'x86_64' || arch === 'x64')
|
|
119
|
+
return 'x64';
|
|
120
|
+
if (arch === 'arm')
|
|
121
|
+
return 'arm';
|
|
122
|
+
if (arch === 'aarch64' || arch === 'arm64')
|
|
123
|
+
return 'arm64';
|
|
124
|
+
if (arch)
|
|
125
|
+
return `other:${arch}`;
|
|
126
|
+
return 'unknown';
|
|
127
|
+
};
|
|
128
|
+
const normalizePlatform = (platform) => {
|
|
129
|
+
// Node platforms:
|
|
130
|
+
// - https://nodejs.org/api/process.html#processplatform
|
|
131
|
+
// Deno platforms:
|
|
132
|
+
// - https://doc.deno.land/deno/stable/~/Deno.build
|
|
133
|
+
// - https://github.com/denoland/deno/issues/14799
|
|
134
|
+
platform = platform.toLowerCase();
|
|
135
|
+
// NOTE: this iOS check is untested and may not work
|
|
136
|
+
// Node does not work natively on IOS, there is a fork at
|
|
137
|
+
// https://github.com/nodejs-mobile/nodejs-mobile
|
|
138
|
+
// however it is unknown at the time of writing how to detect if it is running
|
|
139
|
+
if (platform.includes('ios'))
|
|
140
|
+
return 'iOS';
|
|
141
|
+
if (platform === 'android')
|
|
142
|
+
return 'Android';
|
|
143
|
+
if (platform === 'darwin')
|
|
144
|
+
return 'MacOS';
|
|
145
|
+
if (platform === 'win32')
|
|
146
|
+
return 'Windows';
|
|
147
|
+
if (platform === 'freebsd')
|
|
148
|
+
return 'FreeBSD';
|
|
149
|
+
if (platform === 'openbsd')
|
|
150
|
+
return 'OpenBSD';
|
|
151
|
+
if (platform === 'linux')
|
|
152
|
+
return 'Linux';
|
|
153
|
+
if (platform)
|
|
154
|
+
return `Other:${platform}`;
|
|
155
|
+
return 'Unknown';
|
|
156
|
+
};
|
|
157
|
+
let _platformHeaders;
|
|
158
|
+
const getPlatformHeaders = () => {
|
|
159
|
+
return (_platformHeaders ?? (_platformHeaders = getPlatformProperties()));
|
|
160
|
+
};
|
|
161
|
+
exports.getPlatformHeaders = getPlatformHeaders;
|
|
162
|
+
//# sourceMappingURL=detect-platform.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detect-platform.js","sourceRoot":"","sources":["../src/internal/detect-platform.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,2CAAqC;AAE9B,MAAM,kBAAkB,GAAG,GAAG,EAAE;IACrC,OAAO;IACL,aAAa;IACb,OAAO,MAAM,KAAK,WAAW;QAC7B,aAAa;QACb,OAAO,MAAM,CAAC,QAAQ,KAAK,WAAW;QACtC,aAAa;QACb,OAAO,SAAS,KAAK,WAAW,CACjC,CAAC;AACJ,CAAC,CAAC;AATW,QAAA,kBAAkB,sBAS7B;AAIF;;GAEG;AACH,SAAS,mBAAmB;IAC1B,IAAI,OAAO,IAAI,KAAK,WAAW,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,EAAE,CAAC;QACtD,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,IAAI,OAAO,WAAW,KAAK,WAAW,EAAE,CAAC;QACvC,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,IACE,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAC5B,OAAQ,UAAkB,CAAC,OAAO,KAAK,WAAW,CAAC,CAAC,CAAE,UAAkB,CAAC,OAAO,CA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EAA8E;IAC9E,IAAI,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAC3C,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC7C,IAAI,QAAQ,KAAK,QAAQ;QAAE,OAAO,OAAO,CAAC;IAC1C,IAAI,QAAQ,KAAK,OAAO;QAAE,OAAO,SAAS,CAAC;IAC3C,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC7C,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC7C,IAAI,QAAQ,KAAK,OAAO;QAAE,OAAO,OAAO,CAAC;IACzC,IAAI,QAAQ;QAAE,OAAO,SAAS,QAAQ,EAAE,CAAC;IACzC,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF,IAAI,gBAAoC,CAAC;AAClC,MAAM,kBAAkB,GAAG,GAAG,EAAE;IACrC,OAAO,CAAC,gBAAgB,KAAhB,gBAAgB,GAAK,qBAAqB,EAAE,EAAC,CAAC;AACxD,CAAC,CAAC;AAFW,QAAA,kBAAkB,sBAE7B"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { VERSION } from "../version.mjs";
|
|
3
|
+
export const isRunningInBrowser = () => {
|
|
4
|
+
return (
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
typeof window !== 'undefined' &&
|
|
7
|
+
// @ts-ignore
|
|
8
|
+
typeof window.document !== 'undefined' &&
|
|
9
|
+
// @ts-ignore
|
|
10
|
+
typeof navigator !== 'undefined');
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Note this does not detect 'browser'; for that, use getBrowserInfo().
|
|
14
|
+
*/
|
|
15
|
+
function getDetectedPlatform() {
|
|
16
|
+
if (typeof Deno !== 'undefined' && Deno.build != null) {
|
|
17
|
+
return 'deno';
|
|
18
|
+
}
|
|
19
|
+
if (typeof EdgeRuntime !== 'undefined') {
|
|
20
|
+
return 'edge';
|
|
21
|
+
}
|
|
22
|
+
if (Object.prototype.toString.call(typeof globalThis.process !== 'undefined' ? globalThis.process : 0) === '[object process]') {
|
|
23
|
+
return 'node';
|
|
24
|
+
}
|
|
25
|
+
return 'unknown';
|
|
26
|
+
}
|
|
27
|
+
const getPlatformProperties = () => {
|
|
28
|
+
const detectedPlatform = getDetectedPlatform();
|
|
29
|
+
if (detectedPlatform === 'deno') {
|
|
30
|
+
return {
|
|
31
|
+
'X-Stainless-Lang': 'js',
|
|
32
|
+
'X-Stainless-Package-Version': VERSION,
|
|
33
|
+
'X-Stainless-OS': normalizePlatform(Deno.build.os),
|
|
34
|
+
'X-Stainless-Arch': normalizeArch(Deno.build.arch),
|
|
35
|
+
'X-Stainless-Runtime': 'deno',
|
|
36
|
+
'X-Stainless-Runtime-Version': typeof Deno.version === 'string' ? Deno.version : Deno.version?.deno ?? 'unknown',
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
if (typeof EdgeRuntime !== 'undefined') {
|
|
40
|
+
return {
|
|
41
|
+
'X-Stainless-Lang': 'js',
|
|
42
|
+
'X-Stainless-Package-Version': VERSION,
|
|
43
|
+
'X-Stainless-OS': 'Unknown',
|
|
44
|
+
'X-Stainless-Arch': `other:${EdgeRuntime}`,
|
|
45
|
+
'X-Stainless-Runtime': 'edge',
|
|
46
|
+
'X-Stainless-Runtime-Version': globalThis.process.version,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
// Check if Node.js
|
|
50
|
+
if (detectedPlatform === 'node') {
|
|
51
|
+
return {
|
|
52
|
+
'X-Stainless-Lang': 'js',
|
|
53
|
+
'X-Stainless-Package-Version': VERSION,
|
|
54
|
+
'X-Stainless-OS': normalizePlatform(globalThis.process.platform ?? 'unknown'),
|
|
55
|
+
'X-Stainless-Arch': normalizeArch(globalThis.process.arch ?? 'unknown'),
|
|
56
|
+
'X-Stainless-Runtime': 'node',
|
|
57
|
+
'X-Stainless-Runtime-Version': globalThis.process.version ?? 'unknown',
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
const browserInfo = getBrowserInfo();
|
|
61
|
+
if (browserInfo) {
|
|
62
|
+
return {
|
|
63
|
+
'X-Stainless-Lang': 'js',
|
|
64
|
+
'X-Stainless-Package-Version': VERSION,
|
|
65
|
+
'X-Stainless-OS': 'Unknown',
|
|
66
|
+
'X-Stainless-Arch': 'unknown',
|
|
67
|
+
'X-Stainless-Runtime': `browser:${browserInfo.browser}`,
|
|
68
|
+
'X-Stainless-Runtime-Version': browserInfo.version,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
// TODO add support for Cloudflare workers, etc.
|
|
72
|
+
return {
|
|
73
|
+
'X-Stainless-Lang': 'js',
|
|
74
|
+
'X-Stainless-Package-Version': VERSION,
|
|
75
|
+
'X-Stainless-OS': 'Unknown',
|
|
76
|
+
'X-Stainless-Arch': 'unknown',
|
|
77
|
+
'X-Stainless-Runtime': 'unknown',
|
|
78
|
+
'X-Stainless-Runtime-Version': 'unknown',
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
// Note: modified from https://github.com/JS-DevTools/host-environment/blob/b1ab79ecde37db5d6e163c050e54fe7d287d7c92/src/isomorphic.browser.ts
|
|
82
|
+
function getBrowserInfo() {
|
|
83
|
+
if (typeof navigator === 'undefined' || !navigator) {
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
// NOTE: The order matters here!
|
|
87
|
+
const browserPatterns = [
|
|
88
|
+
{ key: 'edge', pattern: /Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
89
|
+
{ key: 'ie', pattern: /MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
90
|
+
{ key: 'ie', pattern: /Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
91
|
+
{ key: 'chrome', pattern: /Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
92
|
+
{ key: 'firefox', pattern: /Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
93
|
+
{ key: 'safari', pattern: /(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/ },
|
|
94
|
+
];
|
|
95
|
+
// Find the FIRST matching browser
|
|
96
|
+
for (const { key, pattern } of browserPatterns) {
|
|
97
|
+
const match = pattern.exec(navigator.userAgent);
|
|
98
|
+
if (match) {
|
|
99
|
+
const major = match[1] || 0;
|
|
100
|
+
const minor = match[2] || 0;
|
|
101
|
+
const patch = match[3] || 0;
|
|
102
|
+
return { browser: key, version: `${major}.${minor}.${patch}` };
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return null;
|
|
106
|
+
}
|
|
107
|
+
const normalizeArch = (arch) => {
|
|
108
|
+
// Node docs:
|
|
109
|
+
// - https://nodejs.org/api/process.html#processarch
|
|
110
|
+
// Deno docs:
|
|
111
|
+
// - https://doc.deno.land/deno/stable/~/Deno.build
|
|
112
|
+
if (arch === 'x32')
|
|
113
|
+
return 'x32';
|
|
114
|
+
if (arch === 'x86_64' || arch === 'x64')
|
|
115
|
+
return 'x64';
|
|
116
|
+
if (arch === 'arm')
|
|
117
|
+
return 'arm';
|
|
118
|
+
if (arch === 'aarch64' || arch === 'arm64')
|
|
119
|
+
return 'arm64';
|
|
120
|
+
if (arch)
|
|
121
|
+
return `other:${arch}`;
|
|
122
|
+
return 'unknown';
|
|
123
|
+
};
|
|
124
|
+
const normalizePlatform = (platform) => {
|
|
125
|
+
// Node platforms:
|
|
126
|
+
// - https://nodejs.org/api/process.html#processplatform
|
|
127
|
+
// Deno platforms:
|
|
128
|
+
// - https://doc.deno.land/deno/stable/~/Deno.build
|
|
129
|
+
// - https://github.com/denoland/deno/issues/14799
|
|
130
|
+
platform = platform.toLowerCase();
|
|
131
|
+
// NOTE: this iOS check is untested and may not work
|
|
132
|
+
// Node does not work natively on IOS, there is a fork at
|
|
133
|
+
// https://github.com/nodejs-mobile/nodejs-mobile
|
|
134
|
+
// however it is unknown at the time of writing how to detect if it is running
|
|
135
|
+
if (platform.includes('ios'))
|
|
136
|
+
return 'iOS';
|
|
137
|
+
if (platform === 'android')
|
|
138
|
+
return 'Android';
|
|
139
|
+
if (platform === 'darwin')
|
|
140
|
+
return 'MacOS';
|
|
141
|
+
if (platform === 'win32')
|
|
142
|
+
return 'Windows';
|
|
143
|
+
if (platform === 'freebsd')
|
|
144
|
+
return 'FreeBSD';
|
|
145
|
+
if (platform === 'openbsd')
|
|
146
|
+
return 'OpenBSD';
|
|
147
|
+
if (platform === 'linux')
|
|
148
|
+
return 'Linux';
|
|
149
|
+
if (platform)
|
|
150
|
+
return `Other:${platform}`;
|
|
151
|
+
return 'Unknown';
|
|
152
|
+
};
|
|
153
|
+
let _platformHeaders;
|
|
154
|
+
export const getPlatformHeaders = () => {
|
|
155
|
+
return (_platformHeaders ?? (_platformHeaders = getPlatformProperties()));
|
|
156
|
+
};
|
|
157
|
+
//# sourceMappingURL=detect-platform.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detect-platform.mjs","sourceRoot":"","sources":["../src/internal/detect-platform.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,OAAO,EAAE;AAElB,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,EAAE;IACrC,OAAO;IACL,aAAa;IACb,OAAO,MAAM,KAAK,WAAW;QAC7B,aAAa;QACb,OAAO,MAAM,CAAC,QAAQ,KAAK,WAAW;QACtC,aAAa;QACb,OAAO,SAAS,KAAK,WAAW,CACjC,CAAC;AACJ,CAAC,CAAC;AAIF;;GAEG;AACH,SAAS,mBAAmB;IAC1B,IAAI,OAAO,IAAI,KAAK,WAAW,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,EAAE,CAAC;QACtD,OAAO,MAAM,CAAC;IAChB,CAAC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,iBAAiB,GAAG,CAAC,QAAgB,EAAgB,EAAE;IAC3D,kBAAkB;IAClB,wDAAwD;IACxD,kBAAkB;IAClB,mDAAmD;IACnD,kDAAkD;IAElD,QAAQ,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;IAElC,oDAAoD;IACpD,yDAAyD;IACzD,iDAAiD;IACjD,8EAA8E;IAC9E,IAAI,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAC3C,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC7C,IAAI,QAAQ,KAAK,QAAQ;QAAE,OAAO,OAAO,CAAC;IAC1C,IAAI,QAAQ,KAAK,OAAO;QAAE,OAAO,SAAS,CAAC;IAC3C,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC7C,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC7C,IAAI,QAAQ,KAAK,OAAO;QAAE,OAAO,OAAO,CAAC;IACzC,IAAI,QAAQ;QAAE,OAAO,SAAS,QAAQ,EAAE,CAAC;IACzC,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF,IAAI,gBAAoC,CAAC;AACzC,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,EAAE;IACrC,OAAO,CAAC,gBAAgB,KAAhB,gBAAgB,GAAK,qBAAqB,EAAE,EAAC,CAAC;AACxD,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.mts","sourceRoot":"","sources":["../src/internal/errors.ts"],"names":[],"mappings":"AAEA,wBAAgB,YAAY,CAAC,GAAG,EAAE,OAAO,WASxC;AAED,eAAO,MAAM,WAAW,GAAI,KAAK,GAAG,KAAG,KAmBtC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/internal/errors.ts"],"names":[],"mappings":"AAEA,wBAAgB,YAAY,CAAC,GAAG,EAAE,OAAO,WASxC;AAED,eAAO,MAAM,WAAW,GAAI,KAAK,GAAG,KAAG,KAmBtC,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
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.castToError = void 0;
|
|
5
|
+
exports.isAbortError = isAbortError;
|
|
6
|
+
function isAbortError(err) {
|
|
7
|
+
return (typeof err === 'object' &&
|
|
8
|
+
err !== null &&
|
|
9
|
+
// Spec-compliant fetch implementations
|
|
10
|
+
(('name' in err && err.name === 'AbortError') ||
|
|
11
|
+
// Expo fetch
|
|
12
|
+
('message' in err && String(err.message).includes('FetchRequestCanceledException'))));
|
|
13
|
+
}
|
|
14
|
+
const castToError = (err) => {
|
|
15
|
+
if (err instanceof Error)
|
|
16
|
+
return err;
|
|
17
|
+
if (typeof err === 'object' && err !== null) {
|
|
18
|
+
try {
|
|
19
|
+
if (Object.prototype.toString.call(err) === '[object Error]') {
|
|
20
|
+
// @ts-ignore - not all envs have native support for cause yet
|
|
21
|
+
const error = new Error(err.message, err.cause ? { cause: err.cause } : {});
|
|
22
|
+
if (err.stack)
|
|
23
|
+
error.stack = err.stack;
|
|
24
|
+
// @ts-ignore - not all envs have native support for cause yet
|
|
25
|
+
if (err.cause && !error.cause)
|
|
26
|
+
error.cause = err.cause;
|
|
27
|
+
if (err.name)
|
|
28
|
+
error.name = err.name;
|
|
29
|
+
return error;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
catch { }
|
|
33
|
+
try {
|
|
34
|
+
return new Error(JSON.stringify(err));
|
|
35
|
+
}
|
|
36
|
+
catch { }
|
|
37
|
+
}
|
|
38
|
+
return new Error(err);
|
|
39
|
+
};
|
|
40
|
+
exports.castToError = castToError;
|
|
41
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -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I,GAAG,GAAG,CAAC,IAAI,CAAC;gBACpC,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC;QAAC,MAAM,CAAC,CAAA,CAAC;QACV,IAAI,CAAC;YACH,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACxC,CAAC;QAAC,MAAM,CAAC,CAAA,CAAC;IACZ,CAAC;IACD,OAAO,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC;AACxB,CAAC,CAAC;AAnBW,QAAA,WAAW,eAmBtB"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
export function isAbortError(err) {
|
|
3
|
+
return (typeof err === 'object' &&
|
|
4
|
+
err !== null &&
|
|
5
|
+
// Spec-compliant fetch implementations
|
|
6
|
+
(('name' in err && err.name === 'AbortError') ||
|
|
7
|
+
// Expo fetch
|
|
8
|
+
('message' in err && String(err.message).includes('FetchRequestCanceledException'))));
|
|
9
|
+
}
|
|
10
|
+
export const castToError = (err) => {
|
|
11
|
+
if (err instanceof Error)
|
|
12
|
+
return err;
|
|
13
|
+
if (typeof err === 'object' && err !== null) {
|
|
14
|
+
try {
|
|
15
|
+
if (Object.prototype.toString.call(err) === '[object Error]') {
|
|
16
|
+
// @ts-ignore - not all envs have native support for cause yet
|
|
17
|
+
const error = new Error(err.message, err.cause ? { cause: err.cause } : {});
|
|
18
|
+
if (err.stack)
|
|
19
|
+
error.stack = err.stack;
|
|
20
|
+
// @ts-ignore - not all envs have native support for cause yet
|
|
21
|
+
if (err.cause && !error.cause)
|
|
22
|
+
error.cause = err.cause;
|
|
23
|
+
if (err.name)
|
|
24
|
+
error.name = err.name;
|
|
25
|
+
return error;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
catch { }
|
|
29
|
+
try {
|
|
30
|
+
return new Error(JSON.stringify(err));
|
|
31
|
+
}
|
|
32
|
+
catch { }
|
|
33
|
+
}
|
|
34
|
+
return new Error(err);
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=errors.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.mjs","sourceRoot":"","sources":["../src/internal/errors.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,MAAM,UAAU,YAAY,CAAC,GAAY;IACvC,OAAO,CACL,OAAO,GAAG,KAAK,QAAQ;QACvB,GAAG,KAAK,IAAI;QACZ,uCAAuC;QACvC,CAAC,CAAC,MAAM,IAAI,GAAG,IAAK,GAAW,CAAC,IAAI,KAAK,YAAY,CAAC;YACpD,aAAa;YACb,CAAC,SAAS,IAAI,GAAG,IAAI,MAAM,CAAE,GAAW,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,+BAA+B,CAAC,CAAC,CAAC,CAChG,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,GAAQ,EAAS,EAAE;IAC7C,IAAI,GAAG,YAAY,KAAK;QAAE,OAAO,GAAG,CAAC;IACrC,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,EAAE,CAAC;QAC5C,IAAI,CAAC;YACH,IAAI,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,gBAAgB,EAAE,CAAC;gBAC7D,8DAA8D;gBAC9D,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;gBAC5E,IAAI,GAAG,CAAC,KAAK;oBAAE,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;gBACvC,8DAA8D;gBAC9D,IAAI,GAAG,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,KAAK;oBAAE,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;gBACvD,IAAI,GAAG,CAAC,IAAI;oBAAE,KAAK,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;gBACpC,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC;QAAC,MAAM,CAAC,CAAA,CAAC;QACV,IAAI,CAAC;YACH,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACxC,CAAC;QAAC,MAAM,CAAC,CAAA,CAAC;IACZ,CAAC;IACD,OAAO,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC;AACxB,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type HeaderValue = string | undefined | null;
|
|
2
|
+
export type HeadersLike = Headers | readonly HeaderValue[][] | Record<string, HeaderValue | readonly HeaderValue[]> | undefined | null | NullableHeaders;
|
|
3
|
+
declare const brand_privateNullableHeaders: unique symbol;
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
* Users can pass explicit nulls to unset default headers. When we parse them
|
|
7
|
+
* into a standard headers type we need to preserve that information.
|
|
8
|
+
*/
|
|
9
|
+
export type NullableHeaders = {
|
|
10
|
+
/** Brand check, prevent users from creating a NullableHeaders. */
|
|
11
|
+
[brand_privateNullableHeaders]: true;
|
|
12
|
+
/** Parsed headers. */
|
|
13
|
+
values: Headers;
|
|
14
|
+
/** Set of lowercase header names explicitly set to null. */
|
|
15
|
+
nulls: Set<string>;
|
|
16
|
+
};
|
|
17
|
+
export declare const buildHeaders: (newHeaders: HeadersLike[]) => NullableHeaders;
|
|
18
|
+
export declare const isEmptyHeaders: (headers: HeadersLike) => boolean;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=headers.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"headers.d.mts","sourceRoot":"","sources":["../src/internal/headers.ts"],"names":[],"mappings":"AAIA,KAAK,WAAW,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;AAC7C,MAAM,MAAM,WAAW,GACnB,OAAO,GACP,SAAS,WAAW,EAAE,EAAE,GACxB,MAAM,CAAC,MAAM,EAAE,WAAW,GAAG,SAAS,WAAW,EAAE,CAAC,GACpD,SAAS,GACT,IAAI,GACJ,eAAe,CAAC;AAEpB,QAAA,MAAM,4BAA4B,eAAyD,CAAC;AAE5F;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,kEAAkE;IAClE,CAAC,4BAA4B,CAAC,EAAE,IAAI,CAAC;IACrC,sBAAsB;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,4DAA4D;IAC5D,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CACpB,CAAC;AA2CF,eAAO,MAAM,YAAY,GAAI,YAAY,WAAW,EAAE,KAAG,eAqBxD,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,SAAS,WAAW,YAGlD,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type HeaderValue = string | undefined | null;
|
|
2
|
+
export type HeadersLike = Headers | readonly HeaderValue[][] | Record<string, HeaderValue | readonly HeaderValue[]> | undefined | null | NullableHeaders;
|
|
3
|
+
declare const brand_privateNullableHeaders: unique symbol;
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
* Users can pass explicit nulls to unset default headers. When we parse them
|
|
7
|
+
* into a standard headers type we need to preserve that information.
|
|
8
|
+
*/
|
|
9
|
+
export type NullableHeaders = {
|
|
10
|
+
/** Brand check, prevent users from creating a NullableHeaders. */
|
|
11
|
+
[brand_privateNullableHeaders]: true;
|
|
12
|
+
/** Parsed headers. */
|
|
13
|
+
values: Headers;
|
|
14
|
+
/** Set of lowercase header names explicitly set to null. */
|
|
15
|
+
nulls: Set<string>;
|
|
16
|
+
};
|
|
17
|
+
export declare const buildHeaders: (newHeaders: HeadersLike[]) => NullableHeaders;
|
|
18
|
+
export declare const isEmptyHeaders: (headers: HeadersLike) => boolean;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=headers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"headers.d.ts","sourceRoot":"","sources":["../src/internal/headers.ts"],"names":[],"mappings":"AAIA,KAAK,WAAW,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;AAC7C,MAAM,MAAM,WAAW,GACnB,OAAO,GACP,SAAS,WAAW,EAAE,EAAE,GACxB,MAAM,CAAC,MAAM,EAAE,WAAW,GAAG,SAAS,WAAW,EAAE,CAAC,GACpD,SAAS,GACT,IAAI,GACJ,eAAe,CAAC;AAEpB,QAAA,MAAM,4BAA4B,eAAyD,CAAC;AAE5F;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,kEAAkE;IAClE,CAAC,4BAA4B,CAAC,EAAE,IAAI,CAAC;IACrC,sBAAsB;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,4DAA4D;IAC5D,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CACpB,CAAC;AA2CF,eAAO,MAAM,YAAY,GAAI,YAAY,WAAW,EAAE,KAAG,eAqBxD,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,SAAS,WAAW,YAGlD,CAAC"}
|