@surgeapi/node 0.25.6 → 0.26.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 +11 -0
- package/LICENSE +201 -21
- package/README.md +318 -115
- 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 +208 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +208 -0
- package/client.d.ts.map +1 -0
- package/client.js +476 -0
- package/client.js.map +1 -0
- package/client.mjs +472 -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 -4
- package/index.d.ts.map +1 -0
- package/index.js +28 -42
- 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 +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 +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 +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 +139 -44
- 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/accounts.d.mts +526 -0
- package/resources/accounts.d.mts.map +1 -0
- package/resources/accounts.d.ts +526 -0
- package/resources/accounts.d.ts.map +1 -0
- package/resources/accounts.js +49 -0
- package/resources/accounts.js.map +1 -0
- package/resources/accounts.mjs +45 -0
- package/resources/accounts.mjs.map +1 -0
- package/resources/blasts.d.mts +110 -0
- package/resources/blasts.d.mts.map +1 -0
- package/resources/blasts.d.ts +110 -0
- package/resources/blasts.d.ts.map +1 -0
- package/resources/blasts.js +23 -0
- package/resources/blasts.js.map +1 -0
- package/resources/blasts.mjs +19 -0
- package/resources/blasts.mjs.map +1 -0
- package/resources/campaigns.d.mts +346 -0
- package/resources/campaigns.d.mts.map +1 -0
- package/resources/campaigns.d.ts +346 -0
- package/resources/campaigns.d.ts.map +1 -0
- package/resources/campaigns.js +41 -0
- package/resources/campaigns.js.map +1 -0
- package/resources/campaigns.mjs +37 -0
- package/resources/campaigns.mjs.map +1 -0
- package/resources/contacts.d.mts +151 -0
- package/resources/contacts.d.mts.map +1 -0
- package/resources/contacts.d.ts +151 -0
- package/resources/contacts.d.ts.map +1 -0
- package/resources/contacts.js +52 -0
- package/resources/contacts.js.map +1 -0
- package/resources/contacts.mjs +48 -0
- package/resources/contacts.mjs.map +1 -0
- package/resources/index.d.mts +11 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +11 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +25 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +12 -0
- package/resources/index.mjs.map +1 -0
- package/resources/messages.d.mts +263 -0
- package/resources/messages.d.mts.map +1 -0
- package/resources/messages.d.ts +263 -0
- package/resources/messages.d.ts.map +1 -0
- package/resources/messages.js +52 -0
- package/resources/messages.js.map +1 -0
- package/resources/messages.mjs +48 -0
- package/resources/messages.mjs.map +1 -0
- package/resources/phone-numbers.d.mts +90 -0
- package/resources/phone-numbers.d.mts.map +1 -0
- package/resources/phone-numbers.d.ts +90 -0
- package/resources/phone-numbers.d.ts.map +1 -0
- package/resources/phone-numbers.js +24 -0
- package/resources/phone-numbers.js.map +1 -0
- package/resources/phone-numbers.mjs +20 -0
- package/resources/phone-numbers.mjs.map +1 -0
- package/resources/shared.d.mts +20 -0
- package/resources/shared.d.mts.map +1 -0
- package/resources/shared.d.ts +20 -0
- package/resources/shared.d.ts.map +1 -0
- package/resources/shared.js +4 -0
- package/resources/shared.js.map +1 -0
- package/resources/shared.mjs +3 -0
- package/resources/shared.mjs.map +1 -0
- package/resources/users.d.mts +170 -0
- package/resources/users.d.mts.map +1 -0
- package/resources/users.d.ts +170 -0
- package/resources/users.d.ts.map +1 -0
- package/resources/users.js +65 -0
- package/resources/users.js.map +1 -0
- package/resources/users.mjs +61 -0
- package/resources/users.mjs.map +1 -0
- package/resources/verifications.d.mts +96 -0
- package/resources/verifications.d.mts.map +1 -0
- package/resources/verifications.d.ts +96 -0
- package/resources/verifications.d.ts.map +1 -0
- package/resources/verifications.js +37 -0
- package/resources/verifications.js.map +1 -0
- package/resources/verifications.mjs +33 -0
- package/resources/verifications.mjs.map +1 -0
- package/resources/webhooks.d.mts +484 -0
- package/resources/webhooks.d.mts.map +1 -0
- package/resources/webhooks.d.ts +484 -0
- package/resources/webhooks.d.ts.map +1 -0
- package/resources/webhooks.js +20 -0
- package/resources/webhooks.js.map +1 -0
- package/resources/webhooks.mjs +16 -0
- package/resources/webhooks.mjs.map +1 -0
- package/resources.d.mts +2 -0
- package/resources.d.mts.map +1 -0
- package/resources.d.ts +2 -0
- package/resources.d.ts.map +1 -0
- package/resources.js +5 -0
- package/resources.js.map +1 -0
- package/resources.mjs +2 -0
- package/resources.mjs.map +1 -0
- package/src/api-promise.ts +2 -0
- package/src/client.ts +874 -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 +50 -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 +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/lib/.keep +4 -0
- package/src/resource.ts +2 -0
- package/src/resources/accounts.ts +778 -0
- package/src/resources/blasts.ts +140 -0
- package/src/resources/campaigns.ts +417 -0
- package/src/resources/contacts.ts +181 -0
- package/src/resources/index.ts +60 -0
- package/src/resources/messages.ts +314 -0
- package/src/resources/phone-numbers.ts +111 -0
- package/src/resources/shared.ts +21 -0
- package/src/resources/users.ts +209 -0
- package/src/resources/verifications.ts +121 -0
- package/src/resources/webhooks.ts +605 -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 -1
- package/version.d.ts.map +1 -0
- package/version.js +3 -2
- package/version.js.map +1 -0
- package/version.mjs +2 -0
- package/version.mjs.map +1 -0
- package/Client.d.ts +0 -49
- package/Client.js +0 -47
- package/api/errors/ConflictError.d.ts +0 -9
- package/api/errors/ConflictError.js +0 -52
- package/api/errors/UnprocessableEntityError.d.ts +0 -9
- package/api/errors/UnprocessableEntityError.js +0 -52
- package/api/errors/index.d.ts +0 -2
- package/api/errors/index.js +0 -18
- package/api/index.d.ts +0 -3
- package/api/index.js +0 -19
- package/api/resources/accounts/client/Client.d.ts +0 -59
- package/api/resources/accounts/client/Client.js +0 -179
- package/api/resources/accounts/client/index.d.ts +0 -1
- package/api/resources/accounts/client/index.js +0 -17
- package/api/resources/accounts/client/requests/CreateAccountRequest.d.ts +0 -16
- package/api/resources/accounts/client/requests/CreateAccountRequest.js +0 -5
- package/api/resources/accounts/client/requests/UpdateAccountRequest.d.ts +0 -16
- package/api/resources/accounts/client/requests/UpdateAccountRequest.js +0 -5
- package/api/resources/accounts/client/requests/index.d.ts +0 -2
- package/api/resources/accounts/client/requests/index.js +0 -2
- package/api/resources/accounts/index.d.ts +0 -1
- package/api/resources/accounts/index.js +0 -17
- package/api/resources/blasts/client/Client.d.ts +0 -51
- package/api/resources/blasts/client/Client.js +0 -129
- package/api/resources/blasts/client/index.d.ts +0 -1
- package/api/resources/blasts/client/index.js +0 -17
- package/api/resources/blasts/client/requests/BlastRequest.d.ts +0 -30
- package/api/resources/blasts/client/requests/BlastRequest.js +0 -5
- package/api/resources/blasts/client/requests/index.d.ts +0 -1
- package/api/resources/blasts/client/requests/index.js +0 -2
- package/api/resources/blasts/index.d.ts +0 -1
- package/api/resources/blasts/index.js +0 -17
- package/api/resources/contacts/client/Client.d.ts +0 -81
- package/api/resources/contacts/client/Client.js +0 -242
- package/api/resources/contacts/client/index.d.ts +0 -1
- package/api/resources/contacts/client/index.js +0 -2
- package/api/resources/contacts/index.d.ts +0 -1
- package/api/resources/contacts/index.js +0 -17
- package/api/resources/index.d.ts +0 -14
- package/api/resources/index.js +0 -53
- package/api/resources/messages/client/Client.d.ts +0 -54
- package/api/resources/messages/client/Client.js +0 -132
- package/api/resources/messages/client/index.d.ts +0 -1
- package/api/resources/messages/client/index.js +0 -17
- package/api/resources/messages/client/requests/MessageRequest.d.ts +0 -28
- package/api/resources/messages/client/requests/MessageRequest.js +0 -5
- package/api/resources/messages/client/requests/index.d.ts +0 -1
- package/api/resources/messages/client/requests/index.js +0 -2
- package/api/resources/messages/index.d.ts +0 -1
- package/api/resources/messages/index.js +0 -17
- package/api/resources/phoneNumbers/client/Client.d.ts +0 -45
- package/api/resources/phoneNumbers/client/Client.js +0 -123
- package/api/resources/phoneNumbers/client/index.d.ts +0 -1
- package/api/resources/phoneNumbers/client/index.js +0 -17
- package/api/resources/phoneNumbers/client/requests/CreatePhoneNumberRequest.d.ts +0 -17
- package/api/resources/phoneNumbers/client/requests/CreatePhoneNumberRequest.js +0 -5
- package/api/resources/phoneNumbers/client/requests/index.d.ts +0 -1
- package/api/resources/phoneNumbers/client/requests/index.js +0 -2
- package/api/resources/phoneNumbers/index.d.ts +0 -2
- package/api/resources/phoneNumbers/index.js +0 -18
- package/api/resources/phoneNumbers/types/CreatePhoneNumberRequestType.d.ts +0 -11
- package/api/resources/phoneNumbers/types/CreatePhoneNumberRequestType.js +0 -10
- package/api/resources/phoneNumbers/types/index.d.ts +0 -1
- package/api/resources/phoneNumbers/types/index.js +0 -17
- package/api/resources/users/client/Client.d.ts +0 -61
- package/api/resources/users/client/Client.js +0 -180
- package/api/resources/users/client/index.d.ts +0 -1
- package/api/resources/users/client/index.js +0 -17
- package/api/resources/users/client/requests/UserRequest.d.ts +0 -25
- package/api/resources/users/client/requests/UserRequest.js +0 -5
- package/api/resources/users/client/requests/index.d.ts +0 -1
- package/api/resources/users/client/requests/index.js +0 -2
- package/api/resources/users/index.d.ts +0 -1
- package/api/resources/users/index.js +0 -17
- package/api/resources/verifications/client/Client.d.ts +0 -60
- package/api/resources/verifications/client/Client.js +0 -188
- package/api/resources/verifications/client/index.d.ts +0 -1
- package/api/resources/verifications/client/index.js +0 -17
- package/api/resources/verifications/client/requests/VerificationCheckRequest.d.ts +0 -13
- package/api/resources/verifications/client/requests/VerificationCheckRequest.js +0 -5
- package/api/resources/verifications/client/requests/VerificationRequest.d.ts +0 -13
- package/api/resources/verifications/client/requests/VerificationRequest.js +0 -5
- package/api/resources/verifications/client/requests/index.d.ts +0 -2
- package/api/resources/verifications/client/requests/index.js +0 -2
- package/api/resources/verifications/index.d.ts +0 -1
- package/api/resources/verifications/index.js +0 -17
- package/api/types/AccountResponse.d.ts +0 -14
- package/api/types/AccountResponse.js +0 -5
- package/api/types/AttachmentParams.d.ts +0 -10
- package/api/types/AttachmentParams.js +0 -5
- package/api/types/AttachmentResponse.d.ts +0 -14
- package/api/types/AttachmentResponse.js +0 -5
- package/api/types/BlastResponse.d.ts +0 -18
- package/api/types/BlastResponse.js +0 -5
- package/api/types/BlastResponseAttachmentsItem.d.ts +0 -7
- package/api/types/BlastResponseAttachmentsItem.js +0 -5
- package/api/types/Contact.d.ts +0 -16
- package/api/types/Contact.js +0 -5
- package/api/types/ContactRequest.d.ts +0 -18
- package/api/types/ContactRequest.js +0 -5
- package/api/types/ContactResponse.d.ts +0 -20
- package/api/types/ContactResponse.js +0 -5
- package/api/types/Conversation.d.ts +0 -13
- package/api/types/Conversation.js +0 -5
- package/api/types/ConversationPhoneNumber.d.ts +0 -15
- package/api/types/ConversationPhoneNumber.js +0 -5
- package/api/types/ConversationPhoneNumberType.d.ts +0 -13
- package/api/types/ConversationPhoneNumberType.js +0 -12
- package/api/types/MessageConversationContactParams.d.ts +0 -14
- package/api/types/MessageConversationContactParams.js +0 -5
- package/api/types/MessageConversationParams.d.ts +0 -12
- package/api/types/MessageConversationParams.js +0 -5
- package/api/types/MessageResponse.d.ts +0 -15
- package/api/types/MessageResponse.js +0 -5
- package/api/types/PhoneNumber.d.ts +0 -15
- package/api/types/PhoneNumber.js +0 -5
- package/api/types/PhoneNumberType.d.ts +0 -11
- package/api/types/PhoneNumberType.js +0 -10
- package/api/types/UserResponse.d.ts +0 -18
- package/api/types/UserResponse.js +0 -5
- package/api/types/Verification.d.ts +0 -17
- package/api/types/Verification.js +0 -5
- package/api/types/VerificationCheckAlreadyVerifiedResponse.d.ts +0 -12
- package/api/types/VerificationCheckAlreadyVerifiedResponse.js +0 -5
- package/api/types/VerificationCheckAlreadyVerifiedResponseResult.d.ts +0 -14
- package/api/types/VerificationCheckAlreadyVerifiedResponseResult.js +0 -13
- package/api/types/VerificationCheckIncorrectResponse.d.ts +0 -12
- package/api/types/VerificationCheckIncorrectResponse.js +0 -5
- package/api/types/VerificationCheckIncorrectResponseResult.d.ts +0 -12
- package/api/types/VerificationCheckIncorrectResponseResult.js +0 -11
- package/api/types/VerificationCheckOkResponse.d.ts +0 -21
- package/api/types/VerificationCheckOkResponse.js +0 -5
- package/api/types/VerificationCheckOkResponseResult.d.ts +0 -21
- package/api/types/VerificationCheckOkResponseResult.js +0 -13
- package/api/types/VerificationStatus.d.ts +0 -13
- package/api/types/VerificationStatus.js +0 -12
- package/api/types/index.d.ts +0 -25
- package/api/types/index.js +0 -41
- package/core/auth/BasicAuth.d.ts +0 -8
- package/core/auth/BasicAuth.js +0 -26
- package/core/auth/BearerToken.d.ts +0 -5
- package/core/auth/BearerToken.js +0 -15
- package/core/auth/index.d.ts +0 -2
- package/core/auth/index.js +0 -7
- package/core/fetcher/APIResponse.d.ts +0 -20
- package/core/fetcher/APIResponse.js +0 -2
- package/core/fetcher/Fetcher.d.ts +0 -39
- package/core/fetcher/Fetcher.js +0 -107
- package/core/fetcher/Headers.d.ts +0 -2
- package/core/fetcher/Headers.js +0 -84
- package/core/fetcher/HttpResponsePromise.d.ts +0 -58
- package/core/fetcher/HttpResponsePromise.js +0 -103
- package/core/fetcher/RawResponse.d.ts +0 -29
- package/core/fetcher/RawResponse.js +0 -44
- package/core/fetcher/Supplier.d.ts +0 -4
- package/core/fetcher/Supplier.js +0 -22
- package/core/fetcher/createRequestUrl.d.ts +0 -1
- package/core/fetcher/createRequestUrl.js +0 -12
- package/core/fetcher/getFetchFn.d.ts +0 -4
- package/core/fetcher/getFetchFn.js +0 -68
- package/core/fetcher/getHeader.d.ts +0 -1
- package/core/fetcher/getHeader.js +0 -11
- package/core/fetcher/getRequestBody.d.ts +0 -7
- package/core/fetcher/getRequestBody.js +0 -23
- package/core/fetcher/getResponseBody.d.ts +0 -1
- package/core/fetcher/getResponseBody.js +0 -54
- package/core/fetcher/index.d.ts +0 -8
- package/core/fetcher/index.js +0 -15
- package/core/fetcher/makeRequest.d.ts +0 -1
- package/core/fetcher/makeRequest.js +0 -42
- package/core/fetcher/requestWithRetries.d.ts +0 -1
- package/core/fetcher/requestWithRetries.js +0 -40
- package/core/fetcher/signals.d.ts +0 -11
- package/core/fetcher/signals.js +0 -36
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +0 -30
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +0 -247
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -21
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +0 -126
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +0 -31
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +0 -229
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +0 -18
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +0 -59
- package/core/index.d.ts +0 -3
- package/core/index.js +0 -19
- package/core/json.d.ts +0 -15
- package/core/json.js +0 -24
- package/core/runtime/index.d.ts +0 -1
- package/core/runtime/index.js +0 -5
- package/core/runtime/runtime.d.ts +0 -9
- package/core/runtime/runtime.js +0 -103
- package/dist/Client.d.ts +0 -49
- package/dist/Client.js +0 -47
- package/dist/api/errors/ConflictError.d.ts +0 -9
- package/dist/api/errors/ConflictError.js +0 -52
- package/dist/api/errors/UnprocessableEntityError.d.ts +0 -9
- package/dist/api/errors/UnprocessableEntityError.js +0 -52
- package/dist/api/errors/index.d.ts +0 -2
- package/dist/api/errors/index.js +0 -18
- package/dist/api/index.d.ts +0 -3
- package/dist/api/index.js +0 -19
- package/dist/api/resources/accounts/client/Client.d.ts +0 -59
- package/dist/api/resources/accounts/client/Client.js +0 -179
- package/dist/api/resources/accounts/client/index.d.ts +0 -1
- package/dist/api/resources/accounts/client/index.js +0 -17
- package/dist/api/resources/accounts/client/requests/CreateAccountRequest.d.ts +0 -16
- package/dist/api/resources/accounts/client/requests/CreateAccountRequest.js +0 -5
- package/dist/api/resources/accounts/client/requests/UpdateAccountRequest.d.ts +0 -16
- package/dist/api/resources/accounts/client/requests/UpdateAccountRequest.js +0 -5
- package/dist/api/resources/accounts/client/requests/index.d.ts +0 -2
- package/dist/api/resources/accounts/client/requests/index.js +0 -2
- package/dist/api/resources/accounts/index.d.ts +0 -1
- package/dist/api/resources/accounts/index.js +0 -17
- package/dist/api/resources/blasts/client/Client.d.ts +0 -51
- package/dist/api/resources/blasts/client/Client.js +0 -129
- package/dist/api/resources/blasts/client/index.d.ts +0 -1
- package/dist/api/resources/blasts/client/index.js +0 -17
- package/dist/api/resources/blasts/client/requests/BlastRequest.d.ts +0 -30
- package/dist/api/resources/blasts/client/requests/BlastRequest.js +0 -5
- package/dist/api/resources/blasts/client/requests/index.d.ts +0 -1
- package/dist/api/resources/blasts/client/requests/index.js +0 -2
- package/dist/api/resources/blasts/index.d.ts +0 -1
- package/dist/api/resources/blasts/index.js +0 -17
- package/dist/api/resources/contacts/client/Client.d.ts +0 -81
- package/dist/api/resources/contacts/client/Client.js +0 -242
- package/dist/api/resources/contacts/client/index.d.ts +0 -1
- package/dist/api/resources/contacts/client/index.js +0 -2
- package/dist/api/resources/contacts/index.d.ts +0 -1
- package/dist/api/resources/contacts/index.js +0 -17
- package/dist/api/resources/index.d.ts +0 -14
- package/dist/api/resources/index.js +0 -53
- package/dist/api/resources/messages/client/Client.d.ts +0 -54
- package/dist/api/resources/messages/client/Client.js +0 -132
- package/dist/api/resources/messages/client/index.d.ts +0 -1
- package/dist/api/resources/messages/client/index.js +0 -17
- package/dist/api/resources/messages/client/requests/MessageRequest.d.ts +0 -28
- package/dist/api/resources/messages/client/requests/MessageRequest.js +0 -5
- package/dist/api/resources/messages/client/requests/index.d.ts +0 -1
- package/dist/api/resources/messages/client/requests/index.js +0 -2
- package/dist/api/resources/messages/index.d.ts +0 -1
- package/dist/api/resources/messages/index.js +0 -17
- package/dist/api/resources/phoneNumbers/client/Client.d.ts +0 -45
- package/dist/api/resources/phoneNumbers/client/Client.js +0 -123
- package/dist/api/resources/phoneNumbers/client/index.d.ts +0 -1
- package/dist/api/resources/phoneNumbers/client/index.js +0 -17
- package/dist/api/resources/phoneNumbers/client/requests/CreatePhoneNumberRequest.d.ts +0 -17
- package/dist/api/resources/phoneNumbers/client/requests/CreatePhoneNumberRequest.js +0 -5
- package/dist/api/resources/phoneNumbers/client/requests/index.d.ts +0 -1
- package/dist/api/resources/phoneNumbers/client/requests/index.js +0 -2
- package/dist/api/resources/phoneNumbers/index.d.ts +0 -2
- package/dist/api/resources/phoneNumbers/index.js +0 -18
- package/dist/api/resources/phoneNumbers/types/CreatePhoneNumberRequestType.d.ts +0 -11
- package/dist/api/resources/phoneNumbers/types/CreatePhoneNumberRequestType.js +0 -10
- package/dist/api/resources/phoneNumbers/types/index.d.ts +0 -1
- package/dist/api/resources/phoneNumbers/types/index.js +0 -17
- package/dist/api/resources/users/client/Client.d.ts +0 -61
- package/dist/api/resources/users/client/Client.js +0 -180
- package/dist/api/resources/users/client/index.d.ts +0 -1
- package/dist/api/resources/users/client/index.js +0 -17
- package/dist/api/resources/users/client/requests/UserRequest.d.ts +0 -25
- package/dist/api/resources/users/client/requests/UserRequest.js +0 -5
- package/dist/api/resources/users/client/requests/index.d.ts +0 -1
- package/dist/api/resources/users/client/requests/index.js +0 -2
- package/dist/api/resources/users/index.d.ts +0 -1
- package/dist/api/resources/users/index.js +0 -17
- package/dist/api/resources/verifications/client/Client.d.ts +0 -60
- package/dist/api/resources/verifications/client/Client.js +0 -188
- package/dist/api/resources/verifications/client/index.d.ts +0 -1
- package/dist/api/resources/verifications/client/index.js +0 -17
- package/dist/api/resources/verifications/client/requests/VerificationCheckRequest.d.ts +0 -13
- package/dist/api/resources/verifications/client/requests/VerificationCheckRequest.js +0 -5
- package/dist/api/resources/verifications/client/requests/VerificationRequest.d.ts +0 -13
- package/dist/api/resources/verifications/client/requests/VerificationRequest.js +0 -5
- package/dist/api/resources/verifications/client/requests/index.d.ts +0 -2
- package/dist/api/resources/verifications/client/requests/index.js +0 -2
- package/dist/api/resources/verifications/index.d.ts +0 -1
- package/dist/api/resources/verifications/index.js +0 -17
- package/dist/api/types/AccountResponse.d.ts +0 -14
- package/dist/api/types/AccountResponse.js +0 -5
- package/dist/api/types/AttachmentParams.d.ts +0 -10
- package/dist/api/types/AttachmentParams.js +0 -5
- package/dist/api/types/AttachmentResponse.d.ts +0 -14
- package/dist/api/types/AttachmentResponse.js +0 -5
- package/dist/api/types/BlastResponse.d.ts +0 -18
- package/dist/api/types/BlastResponse.js +0 -5
- package/dist/api/types/BlastResponseAttachmentsItem.d.ts +0 -7
- package/dist/api/types/BlastResponseAttachmentsItem.js +0 -5
- package/dist/api/types/Contact.d.ts +0 -16
- package/dist/api/types/Contact.js +0 -5
- package/dist/api/types/ContactRequest.d.ts +0 -18
- package/dist/api/types/ContactRequest.js +0 -5
- package/dist/api/types/ContactResponse.d.ts +0 -20
- package/dist/api/types/ContactResponse.js +0 -5
- package/dist/api/types/Conversation.d.ts +0 -13
- package/dist/api/types/Conversation.js +0 -5
- package/dist/api/types/ConversationPhoneNumber.d.ts +0 -15
- package/dist/api/types/ConversationPhoneNumber.js +0 -5
- package/dist/api/types/ConversationPhoneNumberType.d.ts +0 -13
- package/dist/api/types/ConversationPhoneNumberType.js +0 -12
- package/dist/api/types/MessageConversationContactParams.d.ts +0 -14
- package/dist/api/types/MessageConversationContactParams.js +0 -5
- package/dist/api/types/MessageConversationParams.d.ts +0 -12
- package/dist/api/types/MessageConversationParams.js +0 -5
- package/dist/api/types/MessageResponse.d.ts +0 -15
- package/dist/api/types/MessageResponse.js +0 -5
- package/dist/api/types/PhoneNumber.d.ts +0 -15
- package/dist/api/types/PhoneNumber.js +0 -5
- package/dist/api/types/PhoneNumberType.d.ts +0 -11
- package/dist/api/types/PhoneNumberType.js +0 -10
- package/dist/api/types/UserResponse.d.ts +0 -18
- package/dist/api/types/UserResponse.js +0 -5
- package/dist/api/types/Verification.d.ts +0 -17
- package/dist/api/types/Verification.js +0 -5
- package/dist/api/types/VerificationCheckAlreadyVerifiedResponse.d.ts +0 -12
- package/dist/api/types/VerificationCheckAlreadyVerifiedResponse.js +0 -5
- package/dist/api/types/VerificationCheckAlreadyVerifiedResponseResult.d.ts +0 -14
- package/dist/api/types/VerificationCheckAlreadyVerifiedResponseResult.js +0 -13
- package/dist/api/types/VerificationCheckIncorrectResponse.d.ts +0 -12
- package/dist/api/types/VerificationCheckIncorrectResponse.js +0 -5
- package/dist/api/types/VerificationCheckIncorrectResponseResult.d.ts +0 -12
- package/dist/api/types/VerificationCheckIncorrectResponseResult.js +0 -11
- package/dist/api/types/VerificationCheckOkResponse.d.ts +0 -21
- package/dist/api/types/VerificationCheckOkResponse.js +0 -5
- package/dist/api/types/VerificationCheckOkResponseResult.d.ts +0 -21
- package/dist/api/types/VerificationCheckOkResponseResult.js +0 -13
- package/dist/api/types/VerificationStatus.d.ts +0 -13
- package/dist/api/types/VerificationStatus.js +0 -12
- package/dist/api/types/index.d.ts +0 -25
- package/dist/api/types/index.js +0 -41
- package/dist/core/auth/BasicAuth.d.ts +0 -8
- package/dist/core/auth/BasicAuth.js +0 -26
- package/dist/core/auth/BearerToken.d.ts +0 -5
- package/dist/core/auth/BearerToken.js +0 -15
- package/dist/core/auth/index.d.ts +0 -2
- package/dist/core/auth/index.js +0 -7
- package/dist/core/fetcher/APIResponse.d.ts +0 -20
- package/dist/core/fetcher/APIResponse.js +0 -2
- package/dist/core/fetcher/Fetcher.d.ts +0 -39
- package/dist/core/fetcher/Fetcher.js +0 -107
- package/dist/core/fetcher/Headers.d.ts +0 -2
- package/dist/core/fetcher/Headers.js +0 -84
- package/dist/core/fetcher/HttpResponsePromise.d.ts +0 -58
- package/dist/core/fetcher/HttpResponsePromise.js +0 -103
- package/dist/core/fetcher/RawResponse.d.ts +0 -29
- package/dist/core/fetcher/RawResponse.js +0 -44
- package/dist/core/fetcher/Supplier.d.ts +0 -4
- package/dist/core/fetcher/Supplier.js +0 -22
- package/dist/core/fetcher/createRequestUrl.d.ts +0 -1
- package/dist/core/fetcher/createRequestUrl.js +0 -12
- package/dist/core/fetcher/getFetchFn.d.ts +0 -4
- package/dist/core/fetcher/getFetchFn.js +0 -68
- package/dist/core/fetcher/getHeader.d.ts +0 -1
- package/dist/core/fetcher/getHeader.js +0 -11
- package/dist/core/fetcher/getRequestBody.d.ts +0 -7
- package/dist/core/fetcher/getRequestBody.js +0 -23
- package/dist/core/fetcher/getResponseBody.d.ts +0 -1
- package/dist/core/fetcher/getResponseBody.js +0 -54
- package/dist/core/fetcher/index.d.ts +0 -8
- package/dist/core/fetcher/index.js +0 -15
- package/dist/core/fetcher/makeRequest.d.ts +0 -1
- package/dist/core/fetcher/makeRequest.js +0 -42
- package/dist/core/fetcher/requestWithRetries.d.ts +0 -1
- package/dist/core/fetcher/requestWithRetries.js +0 -40
- package/dist/core/fetcher/signals.d.ts +0 -11
- package/dist/core/fetcher/signals.js +0 -36
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +0 -30
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +0 -247
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -21
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +0 -126
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +0 -31
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +0 -229
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +0 -18
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +0 -59
- package/dist/core/index.d.ts +0 -3
- package/dist/core/index.js +0 -19
- package/dist/core/json.d.ts +0 -15
- package/dist/core/json.js +0 -24
- package/dist/core/runtime/index.d.ts +0 -1
- package/dist/core/runtime/index.js +0 -5
- package/dist/core/runtime/runtime.d.ts +0 -9
- package/dist/core/runtime/runtime.js +0 -103
- package/dist/environments.d.ts +0 -7
- package/dist/environments.js +0 -9
- package/dist/errors/SurgeError.d.ts +0 -15
- package/dist/errors/SurgeError.js +0 -30
- package/dist/errors/SurgeTimeoutError.d.ts +0 -6
- package/dist/errors/SurgeTimeoutError.js +0 -13
- package/dist/errors/index.d.ts +0 -2
- package/dist/errors/index.js +0 -7
- package/dist/index.d.ts +0 -4
- package/dist/index.js +0 -44
- package/dist/version.d.ts +0 -1
- package/dist/version.js +0 -4
- package/environments.d.ts +0 -7
- package/environments.js +0 -9
- package/errors/SurgeError.d.ts +0 -15
- package/errors/SurgeError.js +0 -30
- package/errors/SurgeTimeoutError.d.ts +0 -6
- package/errors/SurgeTimeoutError.js +0 -13
- package/errors/index.d.ts +0 -2
- package/errors/index.js +0 -7
- package/jest.config.mjs +0 -8
- package/reference.md +0 -897
- package/scripts/rename-to-esm-files.js +0 -115
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toFile = toFile;
|
|
4
|
+
const uploads_1 = require("./uploads.js");
|
|
5
|
+
const uploads_2 = require("./uploads.js");
|
|
6
|
+
/**
|
|
7
|
+
* This check adds the arrayBuffer() method type because it is available and used at runtime
|
|
8
|
+
*/
|
|
9
|
+
const isBlobLike = (value) => value != null &&
|
|
10
|
+
typeof value === 'object' &&
|
|
11
|
+
typeof value.size === 'number' &&
|
|
12
|
+
typeof value.type === 'string' &&
|
|
13
|
+
typeof value.text === 'function' &&
|
|
14
|
+
typeof value.slice === 'function' &&
|
|
15
|
+
typeof value.arrayBuffer === 'function';
|
|
16
|
+
/**
|
|
17
|
+
* This check adds the arrayBuffer() method type because it is available and used at runtime
|
|
18
|
+
*/
|
|
19
|
+
const isFileLike = (value) => value != null &&
|
|
20
|
+
typeof value === 'object' &&
|
|
21
|
+
typeof value.name === 'string' &&
|
|
22
|
+
typeof value.lastModified === 'number' &&
|
|
23
|
+
isBlobLike(value);
|
|
24
|
+
const isResponseLike = (value) => value != null &&
|
|
25
|
+
typeof value === 'object' &&
|
|
26
|
+
typeof value.url === 'string' &&
|
|
27
|
+
typeof value.blob === 'function';
|
|
28
|
+
/**
|
|
29
|
+
* Helper for creating a {@link File} to pass to an SDK upload method from a variety of different data formats
|
|
30
|
+
* @param value the raw content of the file. Can be an {@link Uploadable}, {@link BlobLikePart}, or {@link AsyncIterable} of {@link BlobLikePart}s
|
|
31
|
+
* @param {string=} name the name of the file. If omitted, toFile will try to determine a file name from bits if possible
|
|
32
|
+
* @param {Object=} options additional properties
|
|
33
|
+
* @param {string=} options.type the MIME type of the content
|
|
34
|
+
* @param {number=} options.lastModified the last modified timestamp
|
|
35
|
+
* @returns a {@link File} with the given properties
|
|
36
|
+
*/
|
|
37
|
+
async function toFile(value, name, options) {
|
|
38
|
+
(0, uploads_2.checkFileSupport)();
|
|
39
|
+
// If it's a promise, resolve it.
|
|
40
|
+
value = await value;
|
|
41
|
+
// If we've been given a `File` we don't need to do anything
|
|
42
|
+
if (isFileLike(value)) {
|
|
43
|
+
if (value instanceof File) {
|
|
44
|
+
return value;
|
|
45
|
+
}
|
|
46
|
+
return (0, uploads_1.makeFile)([await value.arrayBuffer()], value.name);
|
|
47
|
+
}
|
|
48
|
+
if (isResponseLike(value)) {
|
|
49
|
+
const blob = await value.blob();
|
|
50
|
+
name || (name = new URL(value.url).pathname.split(/[\\/]/).pop());
|
|
51
|
+
return (0, uploads_1.makeFile)(await getBytes(blob), name, options);
|
|
52
|
+
}
|
|
53
|
+
const parts = await getBytes(value);
|
|
54
|
+
name || (name = (0, uploads_1.getName)(value));
|
|
55
|
+
if (!options?.type) {
|
|
56
|
+
const type = parts.find((part) => typeof part === 'object' && 'type' in part && part.type);
|
|
57
|
+
if (typeof type === 'string') {
|
|
58
|
+
options = { ...options, type };
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return (0, uploads_1.makeFile)(parts, name, options);
|
|
62
|
+
}
|
|
63
|
+
async function getBytes(value) {
|
|
64
|
+
let parts = [];
|
|
65
|
+
if (typeof value === 'string' ||
|
|
66
|
+
ArrayBuffer.isView(value) || // includes Uint8Array, Buffer, etc.
|
|
67
|
+
value instanceof ArrayBuffer) {
|
|
68
|
+
parts.push(value);
|
|
69
|
+
}
|
|
70
|
+
else if (isBlobLike(value)) {
|
|
71
|
+
parts.push(value instanceof Blob ? value : await value.arrayBuffer());
|
|
72
|
+
}
|
|
73
|
+
else if ((0, uploads_1.isAsyncIterable)(value) // includes Readable, ReadableStream, etc.
|
|
74
|
+
) {
|
|
75
|
+
for await (const chunk of value) {
|
|
76
|
+
parts.push(...(await getBytes(chunk))); // TODO, consider validating?
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
const constructor = value?.constructor?.name;
|
|
81
|
+
throw new Error(`Unexpected data type: ${typeof value}${constructor ? `; constructor: ${constructor}` : ''}${propsForError(value)}`);
|
|
82
|
+
}
|
|
83
|
+
return parts;
|
|
84
|
+
}
|
|
85
|
+
function propsForError(value) {
|
|
86
|
+
if (typeof value !== 'object' || value === null)
|
|
87
|
+
return '';
|
|
88
|
+
const props = Object.getOwnPropertyNames(value);
|
|
89
|
+
return `; props: [${props.map((p) => `"${p}"`).join(', ')}]`;
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=to-file.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"to-file.js","sourceRoot":"","sources":["../src/internal/to-file.ts"],"names":[],"mappings":";;AAkFA,wBAqCC;AAvHD,0CAAyE;AAEzE,0CAA6C;AAmB7C;;GAEG;AACH,MAAM,UAAU,GAAG,CAAC,KAAU,EAA+D,EAAE,CAC7F,KAAK,IAAI,IAAI;IACb,OAAO,KAAK,KAAK,QAAQ;IACzB,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ;IAC9B,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ;IAC9B,OAAO,KAAK,CAAC,IAAI,KAAK,UAAU;IAChC,OAAO,KAAK,CAAC,KAAK,KAAK,UAAU;IACjC,OAAO,KAAK,CAAC,WAAW,KAAK,UAAU,CAAC;AAY1C;;GAEG;AACH,MAAM,UAAU,GAAG,CAAC,KAAU,EAA+D,EAAE,CAC7F,KAAK,IAAI,IAAI;IACb,OAAO,KAAK,KAAK,QAAQ;IACzB,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ;IAC9B,OAAO,KAAK,CA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W,CAAC,CAAC,CAAC,kBAAkB,WAAW,EAAE,CAAC,CAAC,CAAC,EAClD,GAAG,aAAa,CAAC,KAAK,CAAC,EAAE,CAC1B,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,aAAa,CAAC,KAAc;IACnC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,EAAE,CAAC;IAC3D,MAAM,KAAK,GAAG,MAAM,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;IAChD,OAAO,aAAa,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;AAC/D,CAAC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { getName, makeFile, isAsyncIterable } from "./uploads.mjs";
|
|
2
|
+
import { checkFileSupport } from "./uploads.mjs";
|
|
3
|
+
/**
|
|
4
|
+
* This check adds the arrayBuffer() method type because it is available and used at runtime
|
|
5
|
+
*/
|
|
6
|
+
const isBlobLike = (value) => value != null &&
|
|
7
|
+
typeof value === 'object' &&
|
|
8
|
+
typeof value.size === 'number' &&
|
|
9
|
+
typeof value.type === 'string' &&
|
|
10
|
+
typeof value.text === 'function' &&
|
|
11
|
+
typeof value.slice === 'function' &&
|
|
12
|
+
typeof value.arrayBuffer === 'function';
|
|
13
|
+
/**
|
|
14
|
+
* This check adds the arrayBuffer() method type because it is available and used at runtime
|
|
15
|
+
*/
|
|
16
|
+
const isFileLike = (value) => value != null &&
|
|
17
|
+
typeof value === 'object' &&
|
|
18
|
+
typeof value.name === 'string' &&
|
|
19
|
+
typeof value.lastModified === 'number' &&
|
|
20
|
+
isBlobLike(value);
|
|
21
|
+
const isResponseLike = (value) => value != null &&
|
|
22
|
+
typeof value === 'object' &&
|
|
23
|
+
typeof value.url === 'string' &&
|
|
24
|
+
typeof value.blob === 'function';
|
|
25
|
+
/**
|
|
26
|
+
* Helper for creating a {@link File} to pass to an SDK upload method from a variety of different data formats
|
|
27
|
+
* @param value the raw content of the file. Can be an {@link Uploadable}, {@link BlobLikePart}, or {@link AsyncIterable} of {@link BlobLikePart}s
|
|
28
|
+
* @param {string=} name the name of the file. If omitted, toFile will try to determine a file name from bits if possible
|
|
29
|
+
* @param {Object=} options additional properties
|
|
30
|
+
* @param {string=} options.type the MIME type of the content
|
|
31
|
+
* @param {number=} options.lastModified the last modified timestamp
|
|
32
|
+
* @returns a {@link File} with the given properties
|
|
33
|
+
*/
|
|
34
|
+
export async function toFile(value, name, options) {
|
|
35
|
+
checkFileSupport();
|
|
36
|
+
// If it's a promise, resolve it.
|
|
37
|
+
value = await value;
|
|
38
|
+
// If we've been given a `File` we don't need to do anything
|
|
39
|
+
if (isFileLike(value)) {
|
|
40
|
+
if (value instanceof File) {
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
43
|
+
return makeFile([await value.arrayBuffer()], value.name);
|
|
44
|
+
}
|
|
45
|
+
if (isResponseLike(value)) {
|
|
46
|
+
const blob = await value.blob();
|
|
47
|
+
name || (name = new URL(value.url).pathname.split(/[\\/]/).pop());
|
|
48
|
+
return makeFile(await getBytes(blob), name, options);
|
|
49
|
+
}
|
|
50
|
+
const parts = await getBytes(value);
|
|
51
|
+
name || (name = getName(value));
|
|
52
|
+
if (!options?.type) {
|
|
53
|
+
const type = parts.find((part) => typeof part === 'object' && 'type' in part && part.type);
|
|
54
|
+
if (typeof type === 'string') {
|
|
55
|
+
options = { ...options, type };
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return makeFile(parts, name, options);
|
|
59
|
+
}
|
|
60
|
+
async function getBytes(value) {
|
|
61
|
+
let parts = [];
|
|
62
|
+
if (typeof value === 'string' ||
|
|
63
|
+
ArrayBuffer.isView(value) || // includes Uint8Array, Buffer, etc.
|
|
64
|
+
value instanceof ArrayBuffer) {
|
|
65
|
+
parts.push(value);
|
|
66
|
+
}
|
|
67
|
+
else if (isBlobLike(value)) {
|
|
68
|
+
parts.push(value instanceof Blob ? value : await value.arrayBuffer());
|
|
69
|
+
}
|
|
70
|
+
else if (isAsyncIterable(value) // includes Readable, ReadableStream, etc.
|
|
71
|
+
) {
|
|
72
|
+
for await (const chunk of value) {
|
|
73
|
+
parts.push(...(await getBytes(chunk))); // TODO, consider validating?
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
const constructor = value?.constructor?.name;
|
|
78
|
+
throw new Error(`Unexpected data type: ${typeof value}${constructor ? `; constructor: ${constructor}` : ''}${propsForError(value)}`);
|
|
79
|
+
}
|
|
80
|
+
return parts;
|
|
81
|
+
}
|
|
82
|
+
function propsForError(value) {
|
|
83
|
+
if (typeof value !== 'object' || value === null)
|
|
84
|
+
return '';
|
|
85
|
+
const props = Object.getOwnPropertyNames(value);
|
|
86
|
+
return `; props: [${props.map((p) => `"${p}"`).join(', ')}]`;
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=to-file.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"to-file.mjs","sourceRoot":"","sources":["../src/internal/to-file.ts"],"names":[],"mappings":"OAAO,EAAY,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE;OAEhD,EAAE,gBAAgB,EAAE;AAmB3B;;GAEG;AACH,MAAM,UAAU,GAAG,CAAC,KAAU,EAA+D,EAAE,CAC7F,KAAK,IAAI,IAAI;IACb,OAAO,KAAK,KAAK,QAAQ;IACzB,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ;IAC9B,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ;IAC9B,OAAO,KAAK,CAAC,IAAI,KAAK,UAAU;IAChC,OAAO,KAAK,CAAC,KAAK,KAAK,UAAU;IACjC,OAAO,KAAK,CAAC,WAAW,KAAK,UAAU,CAAC;AAY1C;;GAEG;AACH,MAAM,UAAU,GAAG,CAAC,KAAU,EAA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AG,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC;QAC7C,MAAM,IAAI,KAAK,CACb,yBAAyB,OAAO,KAAK,GACnC,WAAW,CAAC,CAAC,CAAC,kBAAkB,WAAW,EAAE,CAAC,CAAC,CAAC,EAClD,GAAG,aAAa,CAAC,KAAK,CAAC,EAAE,CAC1B,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,aAAa,CAAC,KAAc;IACnC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,EAAE,CAAC;IAC3D,MAAM,KAAK,GAAG,MAAM,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;IAChD,OAAO,aAAa,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;AAC/D,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.__setModuleDefault = exports.__createBinding = void 0;
|
|
4
|
+
exports.__exportStar = __exportStar;
|
|
5
|
+
exports.__classPrivateFieldSet = __classPrivateFieldSet;
|
|
6
|
+
exports.__classPrivateFieldGet = __classPrivateFieldGet;
|
|
7
|
+
exports.__importStar = __importStar;
|
|
8
|
+
var __createBinding = Object.create
|
|
9
|
+
? function (o, m, k, k2) {
|
|
10
|
+
if (k2 === void 0)
|
|
11
|
+
k2 = k;
|
|
12
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
13
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
14
|
+
desc = {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () {
|
|
17
|
+
return m[k];
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
Object.defineProperty(o, k2, desc);
|
|
22
|
+
}
|
|
23
|
+
: function (o, m, k, k2) {
|
|
24
|
+
if (k2 === void 0)
|
|
25
|
+
k2 = k;
|
|
26
|
+
o[k2] = m[k];
|
|
27
|
+
};
|
|
28
|
+
exports.__createBinding = __createBinding;
|
|
29
|
+
function __exportStar(m, o) {
|
|
30
|
+
for (var p in m)
|
|
31
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
32
|
+
__createBinding(o, m, p);
|
|
33
|
+
}
|
|
34
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
35
|
+
if (kind === "m")
|
|
36
|
+
throw new TypeError("Private method is not writable");
|
|
37
|
+
if (kind === "a" && !f)
|
|
38
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
39
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
40
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
41
|
+
return kind === "a" ? f.call(receiver, value) : f ? (f.value = value) : state.set(receiver, value), value;
|
|
42
|
+
}
|
|
43
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
44
|
+
if (kind === "a" && !f)
|
|
45
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
46
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
47
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
48
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
49
|
+
}
|
|
50
|
+
var __setModuleDefault = Object.create
|
|
51
|
+
? function (o, v) {
|
|
52
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
53
|
+
}
|
|
54
|
+
: function (o, v) {
|
|
55
|
+
o["default"] = v;
|
|
56
|
+
};
|
|
57
|
+
exports.__setModuleDefault = __setModuleDefault;
|
|
58
|
+
var ownKeys = function (o) {
|
|
59
|
+
ownKeys =
|
|
60
|
+
Object.getOwnPropertyNames ||
|
|
61
|
+
function (o2) {
|
|
62
|
+
var ar = [];
|
|
63
|
+
for (var k in o2)
|
|
64
|
+
if (Object.prototype.hasOwnProperty.call(o2, k))
|
|
65
|
+
ar[ar.length] = k;
|
|
66
|
+
return ar;
|
|
67
|
+
};
|
|
68
|
+
return ownKeys(o);
|
|
69
|
+
};
|
|
70
|
+
function __importStar(mod) {
|
|
71
|
+
if (mod && mod.__esModule)
|
|
72
|
+
return mod;
|
|
73
|
+
var result = {};
|
|
74
|
+
if (mod != null) {
|
|
75
|
+
for (var k = ownKeys(mod), i = 0; i < k.length; i++)
|
|
76
|
+
if (k[i] !== "default")
|
|
77
|
+
__createBinding(result, mod, k[i]);
|
|
78
|
+
}
|
|
79
|
+
__setModuleDefault(result, mod);
|
|
80
|
+
return result;
|
|
81
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
2
|
+
if (kind === "m")
|
|
3
|
+
throw new TypeError("Private method is not writable");
|
|
4
|
+
if (kind === "a" && !f)
|
|
5
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
6
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
7
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
8
|
+
return kind === "a" ? f.call(receiver, value) : f ? (f.value = value) : state.set(receiver, value), value;
|
|
9
|
+
}
|
|
10
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
11
|
+
if (kind === "a" && !f)
|
|
12
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
13
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
14
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
15
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
16
|
+
}
|
|
17
|
+
export { __classPrivateFieldSet, __classPrivateFieldGet };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
export type PromiseOrValue<T> = T | Promise<T>;
|
|
2
|
+
export type HTTPMethod = 'get' | 'post' | 'put' | 'patch' | 'delete';
|
|
3
|
+
export type KeysEnum<T> = {
|
|
4
|
+
[P in keyof Required<T>]: true;
|
|
5
|
+
};
|
|
6
|
+
export type FinalizedRequestInit = RequestInit & {
|
|
7
|
+
headers: Headers;
|
|
8
|
+
};
|
|
9
|
+
type NotAny<T> = [0] extends [1 & T] ? never : T;
|
|
10
|
+
/**
|
|
11
|
+
* Some environments overload the global fetch function, and Parameters<T> only gets the last signature.
|
|
12
|
+
*/
|
|
13
|
+
type OverloadedParameters<T> = T extends ({
|
|
14
|
+
(...args: infer A): unknown;
|
|
15
|
+
(...args: infer B): unknown;
|
|
16
|
+
(...args: infer C): unknown;
|
|
17
|
+
(...args: infer D): unknown;
|
|
18
|
+
}) ? A | B | C | D : T extends ({
|
|
19
|
+
(...args: infer A): unknown;
|
|
20
|
+
(...args: infer B): unknown;
|
|
21
|
+
(...args: infer C): unknown;
|
|
22
|
+
}) ? A | B | C : T extends ({
|
|
23
|
+
(...args: infer A): unknown;
|
|
24
|
+
(...args: infer B): unknown;
|
|
25
|
+
}) ? A | B : T extends (...args: infer A) => unknown ? A : never;
|
|
26
|
+
/**
|
|
27
|
+
* These imports attempt to get types from a parent package's dependencies.
|
|
28
|
+
* Unresolved bare specifiers can trigger [automatic type acquisition][1] in some projects, which
|
|
29
|
+
* would cause typescript to show types not present at runtime. To avoid this, we import
|
|
30
|
+
* directly from parent node_modules folders.
|
|
31
|
+
*
|
|
32
|
+
* We need to check multiple levels because we don't know what directory structure we'll be in.
|
|
33
|
+
* For example, pnpm generates directories like this:
|
|
34
|
+
* ```
|
|
35
|
+
* node_modules
|
|
36
|
+
* ├── .pnpm
|
|
37
|
+
* │ └── pkg@1.0.0
|
|
38
|
+
* │ └── node_modules
|
|
39
|
+
* │ └── pkg
|
|
40
|
+
* │ └── internal
|
|
41
|
+
* │ └── types.d.ts
|
|
42
|
+
* ├── pkg -> .pnpm/pkg@1.0.0/node_modules/pkg
|
|
43
|
+
* └── undici
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* [1]: https://www.typescriptlang.org/tsconfig/#typeAcquisition
|
|
47
|
+
*/
|
|
48
|
+
/** @ts-ignore For users with \@types/node */
|
|
49
|
+
type UndiciTypesRequestInit = NotAny<import('../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/undici-types/index.d.ts').RequestInit>;
|
|
50
|
+
/** @ts-ignore For users with undici */
|
|
51
|
+
type UndiciRequestInit = NotAny<import('../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/undici/index.d.ts').RequestInit>;
|
|
52
|
+
/** @ts-ignore For users with \@types/bun */
|
|
53
|
+
type BunRequestInit = globalThis.FetchRequestInit;
|
|
54
|
+
/** @ts-ignore For users with node-fetch@2 */
|
|
55
|
+
type NodeFetch2RequestInit = NotAny<import('../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit>;
|
|
56
|
+
/** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */
|
|
57
|
+
type NodeFetch3RequestInit = NotAny<import('../node_modules/node-fetch').RequestInit> | NotAny<import('../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/node-fetch').RequestInit>;
|
|
58
|
+
/** @ts-ignore For users who use Deno */
|
|
59
|
+
type FetchRequestInit = NonNullable<OverloadedParameters<typeof fetch>[1]>;
|
|
60
|
+
type RequestInits = NotAny<UndiciTypesRequestInit> | NotAny<UndiciRequestInit> | NotAny<BunRequestInit> | NotAny<NodeFetch2RequestInit> | NotAny<NodeFetch3RequestInit> | NotAny<RequestInit> | NotAny<FetchRequestInit>;
|
|
61
|
+
/**
|
|
62
|
+
* This type contains `RequestInit` options that may be available on the current runtime,
|
|
63
|
+
* including per-platform extensions like `dispatcher`, `agent`, `client`, etc.
|
|
64
|
+
*/
|
|
65
|
+
export type MergedRequestInit = RequestInits &
|
|
66
|
+
/** We don't include these in the types as they'll be overridden for every request. */
|
|
67
|
+
Partial<Record<'body' | 'headers' | 'method' | 'signal', never>>;
|
|
68
|
+
export {};
|
|
69
|
+
//# sourceMappingURL=types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../src/internal/types.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AAC/C,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAC;AAErE,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI;CAAE,CAAC;AAE7D,MAAM,MAAM,oBAAoB,GAAG,WAAW,GAAG;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC;AAEtE,KAAK,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC;AAEjD;;GAEG;AACH,KAAK,oBAAoB,CAAC,CAAC,IACzB,CAAC,SAAS,CACR;IACE,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC;IAC5B,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC;IAC5B,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC;IAC5B,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC;CAC7B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,MAAM,CAAC,OAAO,kCAAkC,EAAE,WAAW,CAAC,GAAG,MAAM,CAAC,OAAO,qCAAqC,EAAE,WAAW,CAAC,GAAG,MAAM,CAAC,OAAO,wCAAwC,EAAE,WAAW,CAAC,GAAG,MAAM,CAAC,OAAO,2CAA2C,EAAE,WAAW,CAAC,GAAG,MAAM,CAAC,OAAO,8CAA8C,EAAE,WAAW,CAAC,GAAG,MAAM,CAAC,OAAO,iDAAiD,EAAE,WAAW,CAAC,GAAG,MAAM,CAAC,OAAO,oDAAoD,EAAE,WAAW,CAAC,GAAG,MAAM,CAAC,OAAO,uDAAuD,EAAE,WAAW,CAAC,CAAC;AACjvB,wCAAwC;AACxC,KAAK,gBAAgB,GAAG,WAAW,CAAC,oBAAoB,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAG3E,KAAK,YAAY,GACb,MAAM,CAAC,sBAAsB,CAAC,GAC9B,MAAM,CAAC,iBAAiB,CAAC,GACzB,MAAM,CAAC,cAAc,CAAC,GACtB,MAAM,CAAC,qBAAqB,CAAC,GAC7B,MAAM,CAAC,qBAAqB,CAAC,GAC7B,MAAM,CAAC,WAAW,CAAC,GACnB,MAAM,CAAC,gBAAgB,CAAC,CAAC;AAE7B;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,YAAY;AAC1C,sFAAsF;AACtF,OAAO,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
export type PromiseOrValue<T> = T | Promise<T>;
|
|
2
|
+
export type HTTPMethod = 'get' | 'post' | 'put' | 'patch' | 'delete';
|
|
3
|
+
export type KeysEnum<T> = {
|
|
4
|
+
[P in keyof Required<T>]: true;
|
|
5
|
+
};
|
|
6
|
+
export type FinalizedRequestInit = RequestInit & {
|
|
7
|
+
headers: Headers;
|
|
8
|
+
};
|
|
9
|
+
type NotAny<T> = [0] extends [1 & T] ? never : T;
|
|
10
|
+
/**
|
|
11
|
+
* Some environments overload the global fetch function, and Parameters<T> only gets the last signature.
|
|
12
|
+
*/
|
|
13
|
+
type OverloadedParameters<T> = T extends ({
|
|
14
|
+
(...args: infer A): unknown;
|
|
15
|
+
(...args: infer B): unknown;
|
|
16
|
+
(...args: infer C): unknown;
|
|
17
|
+
(...args: infer D): unknown;
|
|
18
|
+
}) ? A | B | C | D : T extends ({
|
|
19
|
+
(...args: infer A): unknown;
|
|
20
|
+
(...args: infer B): unknown;
|
|
21
|
+
(...args: infer C): unknown;
|
|
22
|
+
}) ? A | B | C : T extends ({
|
|
23
|
+
(...args: infer A): unknown;
|
|
24
|
+
(...args: infer B): unknown;
|
|
25
|
+
}) ? A | B : T extends (...args: infer A) => unknown ? A : never;
|
|
26
|
+
/**
|
|
27
|
+
* These imports attempt to get types from a parent package's dependencies.
|
|
28
|
+
* Unresolved bare specifiers can trigger [automatic type acquisition][1] in some projects, which
|
|
29
|
+
* would cause typescript to show types not present at runtime. To avoid this, we import
|
|
30
|
+
* directly from parent node_modules folders.
|
|
31
|
+
*
|
|
32
|
+
* We need to check multiple levels because we don't know what directory structure we'll be in.
|
|
33
|
+
* For example, pnpm generates directories like this:
|
|
34
|
+
* ```
|
|
35
|
+
* node_modules
|
|
36
|
+
* ├── .pnpm
|
|
37
|
+
* │ └── pkg@1.0.0
|
|
38
|
+
* │ └── node_modules
|
|
39
|
+
* │ └── pkg
|
|
40
|
+
* │ └── internal
|
|
41
|
+
* │ └── types.d.ts
|
|
42
|
+
* ├── pkg -> .pnpm/pkg@1.0.0/node_modules/pkg
|
|
43
|
+
* └── undici
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* [1]: https://www.typescriptlang.org/tsconfig/#typeAcquisition
|
|
47
|
+
*/
|
|
48
|
+
/** @ts-ignore For users with \@types/node */
|
|
49
|
+
type UndiciTypesRequestInit = NotAny<import('../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/undici-types/index.d.ts').RequestInit>;
|
|
50
|
+
/** @ts-ignore For users with undici */
|
|
51
|
+
type UndiciRequestInit = NotAny<import('../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/undici/index.d.ts').RequestInit>;
|
|
52
|
+
/** @ts-ignore For users with \@types/bun */
|
|
53
|
+
type BunRequestInit = globalThis.FetchRequestInit;
|
|
54
|
+
/** @ts-ignore For users with node-fetch@2 */
|
|
55
|
+
type NodeFetch2RequestInit = NotAny<import('../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit>;
|
|
56
|
+
/** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */
|
|
57
|
+
type NodeFetch3RequestInit = NotAny<import('../node_modules/node-fetch').RequestInit> | NotAny<import('../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/node-fetch').RequestInit>;
|
|
58
|
+
/** @ts-ignore For users who use Deno */
|
|
59
|
+
type FetchRequestInit = NonNullable<OverloadedParameters<typeof fetch>[1]>;
|
|
60
|
+
type RequestInits = NotAny<UndiciTypesRequestInit> | NotAny<UndiciRequestInit> | NotAny<BunRequestInit> | NotAny<NodeFetch2RequestInit> | NotAny<NodeFetch3RequestInit> | NotAny<RequestInit> | NotAny<FetchRequestInit>;
|
|
61
|
+
/**
|
|
62
|
+
* This type contains `RequestInit` options that may be available on the current runtime,
|
|
63
|
+
* including per-platform extensions like `dispatcher`, `agent`, `client`, etc.
|
|
64
|
+
*/
|
|
65
|
+
export type MergedRequestInit = RequestInits &
|
|
66
|
+
/** We don't include these in the types as they'll be overridden for every request. */
|
|
67
|
+
Partial<Record<'body' | 'headers' | 'method' |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,GAAG,MAAM,CAAC,OAAO,iDAAiD,EAAE,WAAW,CAAC,GAAG,MAAM,CAAC,OAAO,oDAAoD,EAAE,WAAW,CAAC,GAAG,MAAM,CAAC,OAAO,uDAAuD,EAAE,WAAW,CAAC,CAAC;AACjvB,wCAAwC;AACxC,KAAK,gBAAgB,GAAG,WAAW,CAAC,oBAAoB,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAG3E,KAAK,YAAY,GACb,MAAM,CAAC,sBAAsB,CAAC,GAC9B,MAAM,CAAC,iBAAiB,CAAC,GACzB,MAAM,CAAC,cAAc,CAAC,GACtB,MAAM,CAAC,qBAAqB,CAAC,GAC7B,MAAM,CAAC,qBAAqB,CAAC,GAC7B,MAAM,CAAC,WAAW,CAAC,GACnB,MAAM,CAAC,gBAAgB,CAAC,CAAC;AAE7B;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,YAAY;AAC1C,sFAAsF;AACtF,OAAO,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/internal/types.ts"],"names":[],"mappings":";AAAA,sFAAsF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.mjs","sourceRoot":"","sources":["../src/internal/types.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type RequestOptions } from "./request-options.mjs";
|
|
2
|
+
import type { FilePropertyBag, Fetch } from "./builtin-types.mjs";
|
|
3
|
+
import type { Surge } from "../client.mjs";
|
|
4
|
+
export type BlobPart = string | ArrayBuffer | ArrayBufferView | Blob | DataView;
|
|
5
|
+
type FsReadStream = AsyncIterable<Uint8Array> & {
|
|
6
|
+
path: string | {
|
|
7
|
+
toString(): string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
interface BunFile extends Blob {
|
|
11
|
+
readonly name?: string | undefined;
|
|
12
|
+
}
|
|
13
|
+
export declare const checkFileSupport: () => void;
|
|
14
|
+
/**
|
|
15
|
+
* Typically, this is a native "File" class.
|
|
16
|
+
*
|
|
17
|
+
* We provide the {@link toFile} utility to convert a variety of objects
|
|
18
|
+
* into the File class.
|
|
19
|
+
*
|
|
20
|
+
* For convenience, you can also pass a fetch Response, or in Node,
|
|
21
|
+
* the result of fs.createReadStream().
|
|
22
|
+
*/
|
|
23
|
+
export type Uploadable = File | Response | FsReadStream | BunFile;
|
|
24
|
+
/**
|
|
25
|
+
* Construct a `File` instance. This is used to ensure a helpful error is thrown
|
|
26
|
+
* for environments that don't define a global `File` yet.
|
|
27
|
+
*/
|
|
28
|
+
export declare function makeFile(fileBits: BlobPart[], fileName: string | undefined, options?: FilePropertyBag): File;
|
|
29
|
+
export declare function getName(value: any): string | undefined;
|
|
30
|
+
export declare const isAsyncIterable: (value: any) => value is AsyncIterable<any>;
|
|
31
|
+
/**
|
|
32
|
+
* Returns a multipart/form-data request if any part of the given request body contains a File / Blob value.
|
|
33
|
+
* Otherwise returns the request as is.
|
|
34
|
+
*/
|
|
35
|
+
export declare const maybeMultipartFormRequestOptions: (opts: RequestOptions, fetch: Surge | Fetch) => Promise<RequestOptions>;
|
|
36
|
+
type MultipartFormRequestOptions = Omit<RequestOptions, 'body'> & {
|
|
37
|
+
body: unknown;
|
|
38
|
+
};
|
|
39
|
+
export declare const multipartFormRequestOptions: (opts: MultipartFormRequestOptions, fetch: Surge | Fetch) => Promise<RequestOptions>;
|
|
40
|
+
export declare const createForm: <T = Record<string, unknown>>(body: T | undefined, fetch: Surge | Fetch) => Promise<FormData>;
|
|
41
|
+
export {};
|
|
42
|
+
//# sourceMappingURL=uploads.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uploads.d.mts","sourceRoot":"","sources":["../src/internal/uploads.ts"],"names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AAC,cAAc,CAExB,CAAC;AAkCF,eAAO,MAAM,UAAU,GAAU,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC1D,MAAM,CAAC,GAAG,SAAS,EACnB,OAAO,KAAK,GAAG,KAAK,KACnB,OAAO,CAAC,QAAQ,CASlB,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type RequestOptions } from "./request-options.js";
|
|
2
|
+
import type { FilePropertyBag, Fetch } from "./builtin-types.js";
|
|
3
|
+
import type { Surge } from "../client.js";
|
|
4
|
+
export type BlobPart = string | ArrayBuffer | ArrayBufferView | Blob | DataView;
|
|
5
|
+
type FsReadStream = AsyncIterable<Uint8Array> & {
|
|
6
|
+
path: string | {
|
|
7
|
+
toString(): string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
interface BunFile extends Blob {
|
|
11
|
+
readonly name?: string | undefined;
|
|
12
|
+
}
|
|
13
|
+
export declare const checkFileSupport: () => void;
|
|
14
|
+
/**
|
|
15
|
+
* Typically, this is a native "File" class.
|
|
16
|
+
*
|
|
17
|
+
* We provide the {@link toFile} utility to convert a variety of objects
|
|
18
|
+
* into the File class.
|
|
19
|
+
*
|
|
20
|
+
* For convenience, you can also pass a fetch Response, or in Node,
|
|
21
|
+
* the result of fs.createReadStream().
|
|
22
|
+
*/
|
|
23
|
+
export type Uploadable = File | Response | FsReadStream | BunFile;
|
|
24
|
+
/**
|
|
25
|
+
* Construct a `File` instance. This is used to ensure a helpful error is thrown
|
|
26
|
+
* for environments that don't define a global `File` yet.
|
|
27
|
+
*/
|
|
28
|
+
export declare function makeFile(fileBits: BlobPart[], fileName: string | undefined, options?: FilePropertyBag): File;
|
|
29
|
+
export declare function getName(value: any): string | undefined;
|
|
30
|
+
export declare const isAsyncIterable: (value: any) => value is AsyncIterable<any>;
|
|
31
|
+
/**
|
|
32
|
+
* Returns a multipart/form-data request if any part of the given request body contains a File / Blob value.
|
|
33
|
+
* Otherwise returns the request as is.
|
|
34
|
+
*/
|
|
35
|
+
export declare const maybeMultipartFormRequestOptions: (opts: RequestOptions, fetch: Surge | Fetch) => Promise<RequestOptions>;
|
|
36
|
+
type MultipartFormRequestOptions = Omit<RequestOptions, 'body'> & {
|
|
37
|
+
body: unknown;
|
|
38
|
+
};
|
|
39
|
+
export declare const multipartFormRequestOptions: (opts: MultipartFormRequestOptions, fetch: Surge | Fetch) => Promise<RequestOptions>;
|
|
40
|
+
export declare const createForm: <T = Record<string, unknown>>(body: T | undefined, fetch: Surge | Fetch) => Promise<FormData>;
|
|
41
|
+
export {};
|
|
42
|
+
//# sourceMappingURL=uploads.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uploads.d.ts","sourceRoot":"","sources":["../src/internal/uploads.ts"],"names":[],"mappings":"OAAO,EAAE,KAAK,cAAc,EAAE;OACvB,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE;OAC/B,KAAK,EAAE,KAAK,EAAE;AAGrB,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,WAAW,GAAG,eAAe,GAAG,IAAI,GAAG,QAAQ,CAAC;AAChF,KAAK,YAAY,GAAG,aAAa,CAAC,UAAU,CAAC,GAAG;IAAE,IAAI,EAAE,MAAM,GAAG;QAAE,QAAQ,IAAI,MAAM,CAAA;KAAE,CAAA;CAAE,CAAC;AAG1F,UAAU,OAAQ,SAAQ,IAAI;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC;AAED,eAAO,MAAM,gBAAgB,YAY5B,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,QAAQ,GAAG,YAAY,GAAG,OAAO,CAAC;AAElE;;;GAGG;AACH,wBAAgB,QAAQ,CACtB,QAAQ,EAAE,QAAQ,EAAE,EACpB,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,OAAO,CAAC,EAAE,eAAe,GACxB,IAAI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