spotted-ts 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +47 -0
- package/LICENSE +201 -0
- package/README.md +354 -0
- package/api-promise.d.mts +2 -0
- package/api-promise.d.mts.map +1 -0
- package/api-promise.d.ts +2 -0
- package/api-promise.d.ts.map +1 -0
- package/api-promise.js +6 -0
- package/api-promise.js.map +1 -0
- package/api-promise.mjs +2 -0
- package/api-promise.mjs.map +1 -0
- package/client.d.mts +261 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +261 -0
- package/client.d.ts.map +1 -0
- package/client.js +553 -0
- package/client.js.map +1 -0
- package/client.mjs +549 -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 +50 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +50 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +104 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +98 -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 +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 +7 -0
- package/index.d.mts.map +1 -0
- package/index.d.ts +7 -0
- package/index.d.ts.map +1 -0
- package/index.js +32 -0
- package/index.js.map +1 -0
- package/index.mjs +8 -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 +148 -0
- package/pagination.d.mts +2 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +2 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +6 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +2 -0
- package/pagination.mjs.map +1 -0
- package/resource.d.mts +2 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +2 -0
- package/resource.d.ts.map +1 -0
- package/resource.js +6 -0
- package/resource.js.map +1 -0
- package/resource.mjs +2 -0
- package/resource.mjs.map +1 -0
- package/resources/albums.d.mts +333 -0
- package/resources/albums.d.mts.map +1 -0
- package/resources/albums.d.ts +333 -0
- package/resources/albums.d.ts.map +1 -0
- package/resources/albums.js +34 -0
- package/resources/albums.js.map +1 -0
- package/resources/albums.mjs +30 -0
- package/resources/albums.mjs.map +1 -0
- package/resources/artists.d.mts +166 -0
- package/resources/artists.d.mts.map +1 -0
- package/resources/artists.d.ts +166 -0
- package/resources/artists.d.ts.map +1 -0
- package/resources/artists.js +48 -0
- package/resources/artists.js.map +1 -0
- package/resources/artists.mjs +44 -0
- package/resources/artists.mjs.map +1 -0
- package/resources/audio-analysis.d.mts +365 -0
- package/resources/audio-analysis.d.mts.map +1 -0
- package/resources/audio-analysis.d.ts +365 -0
- package/resources/audio-analysis.d.ts.map +1 -0
- package/resources/audio-analysis.js +20 -0
- package/resources/audio-analysis.js.map +1 -0
- package/resources/audio-analysis.mjs +16 -0
- package/resources/audio-analysis.mjs.map +1 -0
- package/resources/audio-features.d.mts +253 -0
- package/resources/audio-features.d.mts.map +1 -0
- package/resources/audio-features.d.ts +253 -0
- package/resources/audio-features.d.ts.map +1 -0
- package/resources/audio-features.js +27 -0
- package/resources/audio-features.js.map +1 -0
- package/resources/audio-features.mjs +23 -0
- package/resources/audio-features.mjs.map +1 -0
- package/resources/audiobooks.d.mts +259 -0
- package/resources/audiobooks.d.mts.map +1 -0
- package/resources/audiobooks.d.ts +259 -0
- package/resources/audiobooks.d.ts.map +1 -0
- package/resources/audiobooks.js +37 -0
- package/resources/audiobooks.js.map +1 -0
- package/resources/audiobooks.mjs +33 -0
- package/resources/audiobooks.mjs.map +1 -0
- package/resources/browse/browse.d.mts +165 -0
- package/resources/browse/browse.d.mts.map +1 -0
- package/resources/browse/browse.d.ts +165 -0
- package/resources/browse/browse.d.ts.map +1 -0
- package/resources/browse/browse.js +33 -0
- package/resources/browse/browse.js.map +1 -0
- package/resources/browse/browse.mjs +28 -0
- package/resources/browse/browse.mjs.map +1 -0
- package/resources/browse/categories.d.mts +151 -0
- package/resources/browse/categories.d.mts.map +1 -0
- package/resources/browse/categories.d.ts +151 -0
- package/resources/browse/categories.d.ts.map +1 -0
- package/resources/browse/categories.js +32 -0
- package/resources/browse/categories.js.map +1 -0
- package/resources/browse/categories.mjs +28 -0
- package/resources/browse/categories.mjs.map +1 -0
- package/resources/browse/index.d.mts +3 -0
- package/resources/browse/index.d.mts.map +1 -0
- package/resources/browse/index.d.ts +3 -0
- package/resources/browse/index.d.ts.map +1 -0
- package/resources/browse/index.js +9 -0
- package/resources/browse/index.js.map +1 -0
- package/resources/browse/index.mjs +4 -0
- package/resources/browse/index.mjs.map +1 -0
- package/resources/browse.d.mts +2 -0
- package/resources/browse.d.mts.map +1 -0
- package/resources/browse.d.ts +2 -0
- package/resources/browse.d.ts.map +1 -0
- package/resources/browse.js +6 -0
- package/resources/browse.js.map +1 -0
- package/resources/browse.mjs +3 -0
- package/resources/browse.mjs.map +1 -0
- package/resources/chapters.d.mts +251 -0
- package/resources/chapters.d.mts.map +1 -0
- package/resources/chapters.d.ts +251 -0
- package/resources/chapters.d.ts.map +1 -0
- package/resources/chapters.js +26 -0
- package/resources/chapters.js.map +1 -0
- package/resources/chapters.mjs +22 -0
- package/resources/chapters.mjs.map +1 -0
- package/resources/episodes.d.mts +56 -0
- package/resources/episodes.d.mts.map +1 -0
- package/resources/episodes.d.ts +56 -0
- package/resources/episodes.d.ts.map +1 -0
- package/resources/episodes.js +23 -0
- package/resources/episodes.js.map +1 -0
- package/resources/episodes.mjs +19 -0
- package/resources/episodes.mjs.map +1 -0
- package/resources/index.d.mts +18 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +18 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +39 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +19 -0
- package/resources/index.mjs.map +1 -0
- package/resources/markets.d.mts +16 -0
- package/resources/markets.d.mts.map +1 -0
- package/resources/markets.d.ts +16 -0
- package/resources/markets.d.ts.map +1 -0
- package/resources/markets.js +15 -0
- package/resources/markets.js.map +1 -0
- package/resources/markets.mjs +11 -0
- package/resources/markets.mjs.map +1 -0
- package/resources/me/albums.d.mts +250 -0
- package/resources/me/albums.d.mts.map +1 -0
- package/resources/me/albums.d.ts +250 -0
- package/resources/me/albums.d.ts.map +1 -0
- package/resources/me/albums.js +70 -0
- package/resources/me/albums.js.map +1 -0
- package/resources/me/albums.mjs +66 -0
- package/resources/me/albums.mjs.map +1 -0
- package/resources/me/audiobooks.d.mts +153 -0
- package/resources/me/audiobooks.d.mts.map +1 -0
- package/resources/me/audiobooks.d.ts +153 -0
- package/resources/me/audiobooks.d.ts.map +1 -0
- package/resources/me/audiobooks.js +79 -0
- package/resources/me/audiobooks.js.map +1 -0
- package/resources/me/audiobooks.mjs +75 -0
- package/resources/me/audiobooks.mjs.map +1 -0
- package/resources/me/episodes.d.mts +132 -0
- package/resources/me/episodes.d.mts.map +1 -0
- package/resources/me/episodes.d.ts +132 -0
- package/resources/me/episodes.d.ts.map +1 -0
- package/resources/me/episodes.js +81 -0
- package/resources/me/episodes.js.map +1 -0
- package/resources/me/episodes.mjs +77 -0
- package/resources/me/episodes.mjs.map +1 -0
- package/resources/me/following.d.mts +147 -0
- package/resources/me/following.d.mts.map +1 -0
- package/resources/me/following.d.ts +147 -0
- package/resources/me/following.d.ts.map +1 -0
- package/resources/me/following.js +70 -0
- package/resources/me/following.js.map +1 -0
- package/resources/me/following.mjs +66 -0
- package/resources/me/following.mjs.map +1 -0
- package/resources/me/index.d.mts +11 -0
- package/resources/me/index.d.mts.map +1 -0
- package/resources/me/index.d.ts +11 -0
- package/resources/me/index.d.ts.map +1 -0
- package/resources/me/index.js +25 -0
- package/resources/me/index.js.map +1 -0
- package/resources/me/index.mjs +12 -0
- package/resources/me/index.mjs.map +1 -0
- package/resources/me/me.d.mts +143 -0
- package/resources/me/me.d.mts.map +1 -0
- package/resources/me/me.d.ts +143 -0
- package/resources/me/me.d.ts.map +1 -0
- package/resources/me/me.js +61 -0
- package/resources/me/me.js.map +1 -0
- package/resources/me/me.mjs +56 -0
- package/resources/me/me.mjs.map +1 -0
- package/resources/me/player/index.d.mts +3 -0
- package/resources/me/player/index.d.mts.map +1 -0
- package/resources/me/player/index.d.ts +3 -0
- package/resources/me/player/index.d.ts.map +1 -0
- package/resources/me/player/index.js +9 -0
- package/resources/me/player/index.js.map +1 -0
- package/resources/me/player/index.mjs +4 -0
- package/resources/me/player/index.mjs.map +1 -0
- package/resources/me/player/player.d.mts +595 -0
- package/resources/me/player/player.d.mts.map +1 -0
- package/resources/me/player/player.d.ts +595 -0
- package/resources/me/player/player.d.ts.map +1 -0
- package/resources/me/player/player.js +236 -0
- package/resources/me/player/player.js.map +1 -0
- package/resources/me/player/player.mjs +231 -0
- package/resources/me/player/player.mjs.map +1 -0
- package/resources/me/player/queue.d.mts +53 -0
- package/resources/me/player/queue.d.mts.map +1 -0
- package/resources/me/player/queue.d.ts +53 -0
- package/resources/me/player/queue.d.ts.map +1 -0
- package/resources/me/player/queue.js +41 -0
- package/resources/me/player/queue.js.map +1 -0
- package/resources/me/player/queue.mjs +37 -0
- package/resources/me/player/queue.mjs.map +1 -0
- package/resources/me/player.d.mts +2 -0
- package/resources/me/player.d.mts.map +1 -0
- package/resources/me/player.d.ts +2 -0
- package/resources/me/player.d.ts.map +1 -0
- package/resources/me/player.js +6 -0
- package/resources/me/player.js.map +1 -0
- package/resources/me/player.mjs +3 -0
- package/resources/me/player.mjs.map +1 -0
- package/resources/me/playlists.d.mts +35 -0
- package/resources/me/playlists.d.mts.map +1 -0
- package/resources/me/playlists.d.ts +35 -0
- package/resources/me/playlists.d.ts.map +1 -0
- package/resources/me/playlists.js +27 -0
- package/resources/me/playlists.js.map +1 -0
- package/resources/me/playlists.mjs +23 -0
- package/resources/me/playlists.mjs.map +1 -0
- package/resources/me/shows.d.mts +109 -0
- package/resources/me/shows.d.mts.map +1 -0
- package/resources/me/shows.d.ts +109 -0
- package/resources/me/shows.d.ts.map +1 -0
- package/resources/me/shows.js +70 -0
- package/resources/me/shows.js.map +1 -0
- package/resources/me/shows.mjs +66 -0
- package/resources/me/shows.mjs.map +1 -0
- package/resources/me/top.d.mts +72 -0
- package/resources/me/top.d.mts.map +1 -0
- package/resources/me/top.d.ts +72 -0
- package/resources/me/top.d.ts.map +1 -0
- package/resources/me/top.js +44 -0
- package/resources/me/top.js.map +1 -0
- package/resources/me/top.mjs +40 -0
- package/resources/me/top.mjs.map +1 -0
- package/resources/me/tracks.d.mts +151 -0
- package/resources/me/tracks.d.mts.map +1 -0
- package/resources/me/tracks.d.ts +151 -0
- package/resources/me/tracks.d.ts.map +1 -0
- package/resources/me/tracks.js +70 -0
- package/resources/me/tracks.js.map +1 -0
- package/resources/me/tracks.mjs +66 -0
- package/resources/me/tracks.mjs.map +1 -0
- package/resources/me.d.mts +2 -0
- package/resources/me.d.mts.map +1 -0
- package/resources/me.d.ts +2 -0
- package/resources/me.d.ts.map +1 -0
- package/resources/me.js +6 -0
- package/resources/me.js.map +1 -0
- package/resources/me.mjs +3 -0
- package/resources/me.mjs.map +1 -0
- package/resources/playlists/followers.d.mts +61 -0
- package/resources/playlists/followers.d.mts.map +1 -0
- package/resources/playlists/followers.d.ts +61 -0
- package/resources/playlists/followers.d.ts.map +1 -0
- package/resources/playlists/followers.js +57 -0
- package/resources/playlists/followers.js.map +1 -0
- package/resources/playlists/followers.mjs +53 -0
- package/resources/playlists/followers.mjs.map +1 -0
- package/resources/playlists/images.d.mts +42 -0
- package/resources/playlists/images.d.mts.map +1 -0
- package/resources/playlists/images.d.ts +42 -0
- package/resources/playlists/images.d.ts.map +1 -0
- package/resources/playlists/images.js +45 -0
- package/resources/playlists/images.js.map +1 -0
- package/resources/playlists/images.mjs +41 -0
- package/resources/playlists/images.mjs.map +1 -0
- package/resources/playlists/index.d.mts +5 -0
- package/resources/playlists/index.d.mts.map +1 -0
- package/resources/playlists/index.d.ts +5 -0
- package/resources/playlists/index.d.ts.map +1 -0
- package/resources/playlists/index.js +13 -0
- package/resources/playlists/index.js.map +1 -0
- package/resources/playlists/index.mjs +6 -0
- package/resources/playlists/index.mjs.map +1 -0
- package/resources/playlists/playlists.d.mts +215 -0
- package/resources/playlists/playlists.d.mts.map +1 -0
- package/resources/playlists/playlists.d.ts +215 -0
- package/resources/playlists/playlists.d.ts.map +1 -0
- package/resources/playlists/playlists.js +56 -0
- package/resources/playlists/playlists.js.map +1 -0
- package/resources/playlists/playlists.mjs +51 -0
- package/resources/playlists/playlists.mjs.map +1 -0
- package/resources/playlists/tracks.d.mts +197 -0
- package/resources/playlists/tracks.d.mts.map +1 -0
- package/resources/playlists/tracks.d.ts +197 -0
- package/resources/playlists/tracks.d.ts.map +1 -0
- package/resources/playlists/tracks.js +75 -0
- package/resources/playlists/tracks.js.map +1 -0
- package/resources/playlists/tracks.mjs +71 -0
- package/resources/playlists/tracks.mjs.map +1 -0
- package/resources/playlists.d.mts +2 -0
- package/resources/playlists.d.mts.map +1 -0
- package/resources/playlists.d.ts +2 -0
- package/resources/playlists.d.ts.map +1 -0
- package/resources/playlists.js +6 -0
- package/resources/playlists.js.map +1 -0
- package/resources/playlists.mjs +3 -0
- package/resources/playlists.mjs.map +1 -0
- package/resources/recommendations.d.mts +420 -0
- package/resources/recommendations.d.mts.map +1 -0
- package/resources/recommendations.d.ts +420 -0
- package/resources/recommendations.d.ts.map +1 -0
- package/resources/recommendations.js +32 -0
- package/resources/recommendations.js.map +1 -0
- package/resources/recommendations.mjs +28 -0
- package/resources/recommendations.mjs.map +1 -0
- package/resources/search.d.mts +309 -0
- package/resources/search.d.mts.map +1 -0
- package/resources/search.d.ts +309 -0
- package/resources/search.d.ts.map +1 -0
- package/resources/search.js +17 -0
- package/resources/search.js.map +1 -0
- package/resources/search.mjs +13 -0
- package/resources/search.mjs.map +1 -0
- package/resources/shared.d.mts +1010 -0
- package/resources/shared.d.mts.map +1 -0
- package/resources/shared.d.ts +1010 -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/shows.d.mts +125 -0
- package/resources/shows.d.mts.map +1 -0
- package/resources/shows.d.ts +125 -0
- package/resources/shows.d.ts.map +1 -0
- package/resources/shows.js +31 -0
- package/resources/shows.js.map +1 -0
- package/resources/shows.mjs +27 -0
- package/resources/shows.mjs.map +1 -0
- package/resources/tracks.d.mts +56 -0
- package/resources/tracks.d.mts.map +1 -0
- package/resources/tracks.d.ts +56 -0
- package/resources/tracks.d.ts.map +1 -0
- package/resources/tracks.js +23 -0
- package/resources/tracks.js.map +1 -0
- package/resources/tracks.mjs +19 -0
- package/resources/tracks.mjs.map +1 -0
- package/resources/users/index.d.mts +3 -0
- package/resources/users/index.d.mts.map +1 -0
- package/resources/users/index.d.ts +3 -0
- package/resources/users/index.d.ts.map +1 -0
- package/resources/users/index.js +9 -0
- package/resources/users/index.js.map +1 -0
- package/resources/users/index.mjs +4 -0
- package/resources/users/index.mjs.map +1 -0
- package/resources/users/playlists.d.mts +194 -0
- package/resources/users/playlists.d.mts.map +1 -0
- package/resources/users/playlists.d.ts +194 -0
- package/resources/users/playlists.d.ts.map +1 -0
- package/resources/users/playlists.js +43 -0
- package/resources/users/playlists.js.map +1 -0
- package/resources/users/playlists.mjs +39 -0
- package/resources/users/playlists.mjs.map +1 -0
- package/resources/users/users.d.mts +61 -0
- package/resources/users/users.d.mts.map +1 -0
- package/resources/users/users.d.ts +61 -0
- package/resources/users/users.d.ts.map +1 -0
- package/resources/users/users.js +31 -0
- package/resources/users/users.js.map +1 -0
- package/resources/users/users.mjs +26 -0
- package/resources/users/users.mjs.map +1 -0
- package/resources/users.d.mts +2 -0
- package/resources/users.d.mts.map +1 -0
- package/resources/users.d.ts +2 -0
- package/resources/users.d.ts.map +1 -0
- package/resources/users.js +6 -0
- package/resources/users.js.map +1 -0
- package/resources/users.mjs +3 -0
- package/resources/users.mjs.map +1 -0
- package/resources.d.mts +2 -0
- package/resources.d.mts.map +1 -0
- package/resources.d.ts +2 -0
- package/resources.d.ts.map +1 -0
- package/resources.js +5 -0
- package/resources.js.map +1 -0
- package/resources.mjs +2 -0
- package/resources.mjs.map +1 -0
- package/src/api-promise.ts +2 -0
- package/src/client.ts +1070 -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 +155 -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 +23 -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/pagination.ts +2 -0
- package/src/resource.ts +2 -0
- package/src/resources/albums.ts +427 -0
- package/src/resources/artists.ts +229 -0
- package/src/resources/audio-analysis.ts +438 -0
- package/src/resources/audio-features.ts +304 -0
- package/src/resources/audiobooks.ts +334 -0
- package/src/resources/browse/browse.ts +233 -0
- package/src/resources/browse/categories.ts +205 -0
- package/src/resources/browse/index.ts +18 -0
- package/src/resources/browse.ts +3 -0
- package/src/resources/chapters.ts +315 -0
- package/src/resources/episodes.ts +77 -0
- package/src/resources/index.ts +84 -0
- package/src/resources/markets.ts +22 -0
- package/src/resources/me/albums.ts +323 -0
- package/src/resources/me/audiobooks.ts +209 -0
- package/src/resources/me/episodes.ts +178 -0
- package/src/resources/me/following.ts +199 -0
- package/src/resources/me/index.ts +86 -0
- package/src/resources/me/me.ts +334 -0
- package/src/resources/me/player/index.ts +25 -0
- package/src/resources/me/player/player.ts +807 -0
- package/src/resources/me/player/queue.ts +71 -0
- package/src/resources/me/player.ts +3 -0
- package/src/resources/me/playlists.ts +49 -0
- package/src/resources/me/shows.ts +152 -0
- package/src/resources/me/top.ts +102 -0
- package/src/resources/me/tracks.ts +200 -0
- package/src/resources/me.ts +3 -0
- package/src/resources/playlists/followers.ts +97 -0
- package/src/resources/playlists/images.ts +59 -0
- package/src/resources/playlists/index.ts +25 -0
- package/src/resources/playlists/playlists.ts +306 -0
- package/src/resources/playlists/tracks.ts +261 -0
- package/src/resources/playlists.ts +3 -0
- package/src/resources/recommendations.ts +493 -0
- package/src/resources/search.ts +386 -0
- package/src/resources/shared.ts +1217 -0
- package/src/resources/shows.ts +171 -0
- package/src/resources/tracks.ts +77 -0
- package/src/resources/users/index.ts +9 -0
- package/src/resources/users/playlists.ts +249 -0
- package/src/resources/users/users.ts +84 -0
- package/src/resources/users.ts +3 -0
- package/src/resources.ts +1 -0
- package/src/tsconfig.json +11 -0
- package/src/uploads.ts +2 -0
- package/src/version.ts +1 -0
- package/uploads.d.mts +2 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +2 -0
- package/uploads.d.ts.map +1 -0
- package/uploads.js +6 -0
- package/uploads.js.map +1 -0
- package/uploads.mjs +2 -0
- package/uploads.mjs.map +1 -0
- package/version.d.mts +2 -0
- package/version.d.mts.map +1 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +5 -0
- package/version.js.map +1 -0
- package/version.mjs +2 -0
- package/version.mjs.map +1 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.__setModuleDefault = exports.__createBinding = void 0;
|
|
4
|
+
exports.__classPrivateFieldSet = __classPrivateFieldSet;
|
|
5
|
+
exports.__classPrivateFieldGet = __classPrivateFieldGet;
|
|
6
|
+
exports.__importStar = __importStar;
|
|
7
|
+
exports.__exportStar = __exportStar;
|
|
8
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
9
|
+
if (kind === "m")
|
|
10
|
+
throw new TypeError("Private method is not writable");
|
|
11
|
+
if (kind === "a" && !f)
|
|
12
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
13
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
14
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
15
|
+
return kind === "a" ? f.call(receiver, value) : f ? (f.value = value) : state.set(receiver, value), value;
|
|
16
|
+
}
|
|
17
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
18
|
+
if (kind === "a" && !f)
|
|
19
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
20
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
21
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
22
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
23
|
+
}
|
|
24
|
+
var __createBinding = Object.create
|
|
25
|
+
? function (o, m, k, k2) {
|
|
26
|
+
if (k2 === void 0)
|
|
27
|
+
k2 = k;
|
|
28
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
29
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
30
|
+
desc = {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return m[k];
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
Object.defineProperty(o, k2, desc);
|
|
38
|
+
}
|
|
39
|
+
: function (o, m, k, k2) {
|
|
40
|
+
if (k2 === void 0)
|
|
41
|
+
k2 = k;
|
|
42
|
+
o[k2] = m[k];
|
|
43
|
+
};
|
|
44
|
+
exports.__createBinding = __createBinding;
|
|
45
|
+
var __setModuleDefault = Object.create
|
|
46
|
+
? function (o, v) {
|
|
47
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
48
|
+
}
|
|
49
|
+
: function (o, v) {
|
|
50
|
+
o["default"] = v;
|
|
51
|
+
};
|
|
52
|
+
exports.__setModuleDefault = __setModuleDefault;
|
|
53
|
+
var ownKeys = function (o) {
|
|
54
|
+
ownKeys =
|
|
55
|
+
Object.getOwnPropertyNames ||
|
|
56
|
+
function (o2) {
|
|
57
|
+
var ar = [];
|
|
58
|
+
for (var k in o2)
|
|
59
|
+
if (Object.prototype.hasOwnProperty.call(o2, k))
|
|
60
|
+
ar[ar.length] = k;
|
|
61
|
+
return ar;
|
|
62
|
+
};
|
|
63
|
+
return ownKeys(o);
|
|
64
|
+
};
|
|
65
|
+
function __importStar(mod) {
|
|
66
|
+
if (mod && mod.__esModule)
|
|
67
|
+
return mod;
|
|
68
|
+
var result = {};
|
|
69
|
+
if (mod != null) {
|
|
70
|
+
for (var k = ownKeys(mod), i = 0; i < k.length; i++)
|
|
71
|
+
if (k[i] !== "default")
|
|
72
|
+
__createBinding(result, mod, k[i]);
|
|
73
|
+
}
|
|
74
|
+
__setModuleDefault(result, mod);
|
|
75
|
+
return result;
|
|
76
|
+
}
|
|
77
|
+
function __exportStar(m, o) {
|
|
78
|
+
for (var p in m)
|
|
79
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
80
|
+
__createBinding(o, m, p);
|
|
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,CA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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' | 'signal', never>>;
|
|
68
|
+
export {};
|
|
69
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","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,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@@
|
|
|
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 { Spotted } 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: Spotted | Fetch) => Promise<RequestOptions>;
|
|
36
|
+
type MultipartFormRequestOptions = Omit<RequestOptions, 'body'> & {
|
|
37
|
+
body: unknown;
|
|
38
|
+
};
|
|
39
|
+
export declare const multipartFormRequestOptions: (opts: MultipartFormRequestOptions, fetch: Spotted | Fetch) => Promise<RequestOptions>;
|
|
40
|
+
export declare const createForm: <T = Record<string, unknown>>(body: T | undefined, fetch: Spotted | 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":[],"mappings":"OAAO,EAAE,KAAK,cAAc,EAAE;OACvB,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE;OAC/B,KAAK,EAAE,OAAO,EAAE;AAGvB,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,CAGN;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,GAAG,GAAG,MAAM,GAAG,SAAS,CActD;AAED,eAAO,MAAM,eAAe,GAAI,OAAO,GAAG,KAAG,KAAK,IAAI,aAAa,CAAC,GAAG,CAC0B,CAAC;AAElG;;;GAGG;AACH,eAAO,MAAM,gCAAgC,GAC3C,MAAM,cAAc,EACpB,OAAO,OAAO,GAAG,KAAK,KACrB,OAAO,CAAC,cAAc,CAIxB,CAAC;AAEF,KAAK,2BAA2B,GAAG,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,GAAG;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;AAEpF,eAAO,MAAM,2BAA2B,GACtC,MAAM,2BAA2B,EACjC,OAAO,OAAO,GAAG,KAAK,KACrB,OAAO,CAAC,cAAc,CAExB,CAAC;AAkCF,eAAO,MAAM,UAAU,GAAU,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC1D,MAAM,CAAC,GAAG,SAAS,EACnB,OAAO,OAAO,GAAG,KAAK,KACrB,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 { Spotted } 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: Spotted | Fetch) => Promise<RequestOptions>;
|
|
36
|
+
type MultipartFormRequestOptions = Omit<RequestOptions, 'body'> & {
|
|
37
|
+
body: unknown;
|
|
38
|
+
};
|
|
39
|
+
export declare const multipartFormRequestOptions: (opts: MultipartFormRequestOptions, fetch: Spotted | Fetch) => Promise<RequestOptions>;
|
|
40
|
+
export declare const createForm: <T = Record<string, unknown>>(body: T | undefined, fetch: Spotted | 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,OAAO,EAAE;AAGvB,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;K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ptions = exports.maybeMultipartFormRequestOptions = exports.isAsyncIterable = exports.checkFileSupport = void 0;
|
|
4
|
+
exports.makeFile = makeFile;
|
|
5
|
+
exports.getName = getName;
|
|
6
|
+
const shims_1 = require("./shims.js");
|
|
7
|
+
const checkFileSupport = () => {
|
|
8
|
+
if (typeof File === 'undefined') {
|
|
9
|
+
const { process } = globalThis;
|
|
10
|
+
const isOldNode = typeof process?.versions?.node === 'string' && parseInt(process.versions.node.split('.')) < 20;
|
|
11
|
+
throw new Error('`File` is not defined as a global, which is required for file uploads.' +
|
|
12
|
+
(isOldNode ?
|
|
13
|
+
" Update to Node 20 LTS or newer, or set `globalThis.File` to `import('node:buffer').File`."
|
|
14
|
+
: ''));
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
exports.checkFileSupport = checkFileSupport;
|
|
18
|
+
/**
|
|
19
|
+
* Construct a `File` instance. This is used to ensure a helpful error is thrown
|
|
20
|
+
* for environments that don't define a global `File` yet.
|
|
21
|
+
*/
|
|
22
|
+
function makeFile(fileBits, fileName, options) {
|
|
23
|
+
(0, exports.checkFileSupport)();
|
|
24
|
+
return new File(fileBits, fileName ?? 'unknown_file', options);
|
|
25
|
+
}
|
|
26
|
+
function getName(value) {
|
|
27
|
+
return (((typeof value === 'object' &&
|
|
28
|
+
value !== null &&
|
|
29
|
+
(('name' in value && value.name && String(value.name)) ||
|
|
30
|
+
('url' in value && value.url && String(value.url)) ||
|
|
31
|
+
('filename' in value && value.filename && String(value.filename)) ||
|
|
32
|
+
('path' in value && value.path && String(value.path)))) ||
|
|
33
|
+
'')
|
|
34
|
+
.split(/[\\/]/)
|
|
35
|
+
.pop() || undefined);
|
|
36
|
+
}
|
|
37
|
+
const isAsyncIterable = (value) => value != null && typeof value === 'object' && typeof value[Symbol.asyncIterator] === 'function';
|
|
38
|
+
exports.isAsyncIterable = isAsyncIterable;
|
|
39
|
+
/**
|
|
40
|
+
* Returns a multipart/form-data request if any part of the given request body contains a File / Blob value.
|
|
41
|
+
* Otherwise returns the request as is.
|
|
42
|
+
*/
|
|
43
|
+
const maybeMultipartFormRequestOptions = async (opts, fetch) => {
|
|
44
|
+
if (!hasUploadableValue(opts.body))
|
|
45
|
+
return opts;
|
|
46
|
+
return { ...opts, body: await (0, exports.createForm)(opts.body, fetch) };
|
|
47
|
+
};
|
|
48
|
+
exports.maybeMultipartFormRequestOptions = maybeMultipartFormRequestOptions;
|
|
49
|
+
const multipartFormRequestOptions = async (opts, fetch) => {
|
|
50
|
+
return { ...opts, body: await (0, exports.createForm)(opts.body, fetch) };
|
|
51
|
+
};
|
|
52
|
+
exports.multipartFormRequestOptions = multipartFormRequestOptions;
|
|
53
|
+
const supportsFormDataMap = /* @__PURE__ */ new WeakMap();
|
|
54
|
+
/**
|
|
55
|
+
* node-fetch doesn't support the global FormData object in recent node versions. Instead of sending
|
|
56
|
+
* properly-encoded form data, it just stringifies the object, resulting in a request body of "[object FormData]".
|
|
57
|
+
* This function detects if the fetch function provided supports the global FormData object to avoid
|
|
58
|
+
* confusing error messages later on.
|
|
59
|
+
*/
|
|
60
|
+
function supportsFormData(fetchObject) {
|
|
61
|
+
const fetch = typeof fetchObject === 'function' ? fetchObject : fetchObject.fetch;
|
|
62
|
+
const cached = supportsFormDataMap.get(fetch);
|
|
63
|
+
if (cached)
|
|
64
|
+
return cached;
|
|
65
|
+
const promise = (async () => {
|
|
66
|
+
try {
|
|
67
|
+
const FetchResponse = ('Response' in fetch ?
|
|
68
|
+
fetch.Response
|
|
69
|
+
: (await fetch('data:,')).constructor);
|
|
70
|
+
const data = new FormData();
|
|
71
|
+
if (data.toString() === (await new FetchResponse(data).text())) {
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
return true;
|
|
75
|
+
}
|
|
76
|
+
catch {
|
|
77
|
+
// avoid false negatives
|
|
78
|
+
return true;
|
|
79
|
+
}
|
|
80
|
+
})();
|
|
81
|
+
supportsFormDataMap.set(fetch, promise);
|
|
82
|
+
return promise;
|
|
83
|
+
}
|
|
84
|
+
const createForm = async (body, fetch) => {
|
|
85
|
+
if (!(await supportsFormData(fetch))) {
|
|
86
|
+
throw new TypeError('The provided fetch function does not support file uploads with the current global FormData class.');
|
|
87
|
+
}
|
|
88
|
+
const form = new FormData();
|
|
89
|
+
await Promise.all(Object.entries(body || {}).map(([key, value]) => addFormValue(form, key, value)));
|
|
90
|
+
return form;
|
|
91
|
+
};
|
|
92
|
+
exports.createForm = createForm;
|
|
93
|
+
// We check for Blob not File because Bun.File doesn't inherit from File,
|
|
94
|
+
// but they both inherit from Blob and have a `name` property at runtime.
|
|
95
|
+
const isNamedBlob = (value) => value instanceof Blob && 'name' in value;
|
|
96
|
+
const isUploadable = (value) => typeof value === 'object' &&
|
|
97
|
+
value !== null &&
|
|
98
|
+
(value instanceof Response || (0, exports.isAsyncIterable)(value) || isNamedBlob(value));
|
|
99
|
+
const hasUploadableValue = (value) => {
|
|
100
|
+
if (isUploadable(value))
|
|
101
|
+
return true;
|
|
102
|
+
if (Array.isArray(value))
|
|
103
|
+
return value.some(hasUploadableValue);
|
|
104
|
+
if (value && typeof value === 'object') {
|
|
105
|
+
for (const k in value) {
|
|
106
|
+
if (hasUploadableValue(value[k]))
|
|
107
|
+
return true;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return false;
|
|
111
|
+
};
|
|
112
|
+
const addFormValue = async (form, key, value) => {
|
|
113
|
+
if (value === undefined)
|
|
114
|
+
return;
|
|
115
|
+
if (value == null) {
|
|
116
|
+
throw new TypeError(`Received null for "${key}"; to pass null in FormData, you must use the string 'null'`);
|
|
117
|
+
}
|
|
118
|
+
// TODO: make nested formats configurable
|
|
119
|
+
if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
|
|
120
|
+
form.append(key, String(value));
|
|
121
|
+
}
|
|
122
|
+
else if (value instanceof Response) {
|
|
123
|
+
form.append(key, makeFile([await value.blob()], getName(value)));
|
|
124
|
+
}
|
|
125
|
+
else if ((0, exports.isAsyncIterable)(value)) {
|
|
126
|
+
form.append(key, makeFile([await new Response((0, shims_1.ReadableStreamFrom)(value)).blob()], getName(value)));
|
|
127
|
+
}
|
|
128
|
+
else if (isNamedBlob(value)) {
|
|
129
|
+
form.append(key, value, getName(value));
|
|
130
|
+
}
|
|
131
|
+
else if (Array.isArray(value)) {
|
|
132
|
+
await Promise.all(value.map((entry) => addFormValue(form, key + '[]', entry)));
|
|
133
|
+
}
|
|
134
|
+
else if (typeof value === 'object') {
|
|
135
|
+
await Promise.all(Object.entries(value).map(([name, prop]) => addFormValue(form, `${key}[${name}]`, prop)));
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
throw new TypeError(`Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got ${value} instead`);
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
//# sourceMappingURL=uploads.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uploads.js","sourceRoot":"","sources":["../src/internal/uploads.ts"],"names":[],"mappings":";;;AA0CA,4BAOC;AAED,0BAcC;AA9DD,sCAA6C;AAUtC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACnC,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE,CAAC;QAChC,MAAM,EAAE,OAAO,EAAE,GAAG,UAAiB,CAAC;QACtC,MAAM,SAAS,GACb,OAAO,OAAO,EAAE,QAAQ,EAAE,IAAI,KAAK,QAAQ,IAAI,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;QACjG,MAAM,IAAI,KAAK,CACb,wEAAwE;YACtE,CAAC,SAAS,CAAC,CAAC;gBACV,4FAA4F;gBAC9F,CAAC,CAAC,EAAE,CAAC,CACR,CAAC;IACJ,CAAC;AACH,CAAC,CAAC;AAZW,QAAA,gBAAgB,oBAY3B;AAaF;;;GAGG;AACH,SAAgB,QAAQ,CACtB,QAAoB,EACpB,QAA4B,E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