@runwayml/sdk 2.10.1 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/README.md +113 -48
- package/api-promise.d.mts +2 -0
- package/api-promise.d.mts.map +1 -0
- package/api-promise.d.ts +2 -0
- package/api-promise.d.ts.map +1 -0
- package/api-promise.js +6 -0
- package/api-promise.js.map +1 -0
- package/api-promise.mjs +2 -0
- package/api-promise.mjs.map +1 -0
- package/bin/cli +53 -0
- package/bin/migration-config.json +6 -0
- package/client.d.mts +207 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +207 -0
- package/client.d.ts.map +1 -0
- package/client.js +494 -0
- package/client.js.map +1 -0
- package/client.mjs +490 -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 +1 -46
- package/error.d.ts.map +1 -1
- package/error.js +3 -110
- package/error.js.map +1 -1
- package/error.mjs +1 -96
- package/error.mjs.map +1 -1
- package/index.d.mts +7 -138
- package/index.d.mts.map +1 -0
- package/index.d.ts +6 -137
- package/index.d.ts.map +1 -1
- package/index.js +12 -136
- package/index.js.map +1 -1
- package/index.mjs +6 -110
- package/index.mjs.map +1 -1
- package/internal/builtin-types.d.mts +73 -0
- package/internal/builtin-types.d.mts.map +1 -0
- package/internal/builtin-types.d.ts +73 -0
- package/internal/builtin-types.d.ts.map +1 -0
- package/internal/builtin-types.js +4 -0
- package/internal/builtin-types.js.map +1 -0
- package/internal/builtin-types.mjs +3 -0
- package/internal/builtin-types.mjs.map +1 -0
- package/internal/detect-platform.d.mts +15 -0
- package/internal/detect-platform.d.mts.map +1 -0
- package/internal/detect-platform.d.ts +15 -0
- package/internal/detect-platform.d.ts.map +1 -0
- package/internal/detect-platform.js +162 -0
- package/internal/detect-platform.js.map +1 -0
- package/internal/detect-platform.mjs +157 -0
- package/internal/detect-platform.mjs.map +1 -0
- package/internal/errors.d.mts +3 -0
- package/internal/errors.d.mts.map +1 -0
- package/internal/errors.d.ts +3 -0
- package/internal/errors.d.ts.map +1 -0
- package/internal/errors.js +41 -0
- package/internal/errors.js.map +1 -0
- package/internal/errors.mjs +36 -0
- package/internal/errors.mjs.map +1 -0
- package/internal/headers.d.mts +20 -0
- package/internal/headers.d.mts.map +1 -0
- package/internal/headers.d.ts +20 -0
- package/internal/headers.d.ts.map +1 -0
- package/internal/headers.js +79 -0
- package/internal/headers.js.map +1 -0
- package/internal/headers.mjs +74 -0
- package/internal/headers.mjs.map +1 -0
- package/internal/parse.d.mts +12 -0
- package/internal/parse.d.mts.map +1 -0
- package/internal/parse.d.ts +12 -0
- package/internal/parse.d.ts.map +1 -0
- package/internal/parse.js +35 -0
- package/internal/parse.js.map +1 -0
- package/internal/parse.mjs +32 -0
- package/internal/parse.mjs.map +1 -0
- package/internal/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/lib/polling.d.mts +48 -0
- package/lib/polling.d.mts.map +1 -0
- package/lib/polling.d.ts +4 -5
- package/lib/polling.d.ts.map +1 -1
- package/lib/polling.js +2 -2
- package/lib/polling.js.map +1 -1
- package/lib/polling.mjs.map +1 -1
- package/package.json +113 -64
- package/resource.d.mts +2 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +1 -5
- package/resource.d.ts.map +1 -1
- package/resource.js +3 -8
- package/resource.js.map +1 -1
- package/resource.mjs +1 -6
- package/resource.mjs.map +1 -1
- package/resources/character-performance.d.mts +106 -0
- package/resources/character-performance.d.mts.map +1 -0
- package/resources/character-performance.d.ts +3 -3
- package/resources/character-performance.d.ts.map +1 -1
- package/resources/character-performance.js +1 -1
- package/resources/character-performance.js.map +1 -1
- package/resources/character-performance.mjs +1 -1
- package/resources/character-performance.mjs.map +1 -1
- package/resources/image-to-video.d.mts +108 -0
- package/resources/image-to-video.d.mts.map +1 -0
- package/resources/image-to-video.d.ts +3 -3
- package/resources/image-to-video.d.ts.map +1 -1
- package/resources/image-to-video.js +1 -1
- package/resources/image-to-video.js.map +1 -1
- package/resources/image-to-video.mjs +1 -1
- package/resources/image-to-video.mjs.map +1 -1
- package/resources/index.d.mts +10 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/organization.d.mts +422 -0
- package/resources/organization.d.mts.map +1 -0
- package/resources/organization.d.ts +37 -7
- package/resources/organization.d.ts.map +1 -1
- package/resources/organization.js +6 -5
- package/resources/organization.js.map +1 -1
- package/resources/organization.mjs +6 -5
- package/resources/organization.mjs.map +1 -1
- package/resources/tasks.d.mts +69 -0
- package/resources/tasks.d.mts.map +1 -0
- package/resources/tasks.d.ts +5 -4
- package/resources/tasks.d.ts.map +1 -1
- package/resources/tasks.js +6 -4
- package/resources/tasks.js.map +1 -1
- package/resources/tasks.mjs +6 -4
- package/resources/tasks.mjs.map +1 -1
- package/resources/text-to-image.d.mts +112 -0
- package/resources/text-to-image.d.mts.map +1 -0
- package/resources/text-to-image.d.ts +4 -4
- package/resources/text-to-image.d.ts.map +1 -1
- package/resources/text-to-image.js +2 -2
- package/resources/text-to-image.js.map +1 -1
- package/resources/text-to-image.mjs +2 -2
- package/resources/text-to-image.mjs.map +1 -1
- package/resources/text-to-speech.d.mts +46 -0
- package/resources/text-to-speech.d.mts.map +1 -0
- package/resources/text-to-speech.d.ts +46 -0
- package/resources/text-to-speech.d.ts.map +1 -0
- package/resources/text-to-speech.js +16 -0
- package/resources/text-to-speech.js.map +1 -0
- package/resources/text-to-speech.mjs +12 -0
- package/resources/text-to-speech.mjs.map +1 -0
- package/resources/text-to-video.d.mts +44 -0
- package/resources/text-to-video.d.mts.map +1 -0
- package/resources/text-to-video.d.ts +3 -3
- package/resources/text-to-video.d.ts.map +1 -1
- package/resources/text-to-video.js +1 -1
- package/resources/text-to-video.js.map +1 -1
- package/resources/text-to-video.mjs +1 -1
- package/resources/text-to-video.mjs.map +1 -1
- package/resources/video-to-video.d.mts +78 -0
- package/resources/video-to-video.d.mts.map +1 -0
- package/resources/video-to-video.d.ts +3 -3
- package/resources/video-to-video.d.ts.map +1 -1
- package/resources/video-to-video.js +1 -1
- package/resources/video-to-video.js.map +1 -1
- package/resources/video-to-video.mjs +1 -1
- package/resources/video-to-video.mjs.map +1 -1
- package/resources/video-upscale.d.mts +32 -0
- package/resources/video-upscale.d.mts.map +1 -0
- package/resources/video-upscale.d.ts +3 -3
- package/resources/video-upscale.d.ts.map +1 -1
- package/resources/video-upscale.js +1 -1
- package/resources/video-upscale.js.map +1 -1
- package/resources/video-upscale.mjs +1 -1
- package/resources/video-upscale.mjs.map +1 -1
- package/resources.d.mts +2 -0
- package/resources.d.mts.map +1 -0
- package/resources.d.ts.map +1 -1
- package/resources.js +2 -15
- package/resources.js.map +1 -1
- package/src/api-promise.ts +2 -0
- package/src/client.ts +840 -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 -130
- package/src/index.ts +12 -279
- 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/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/polling.ts +5 -5
- package/src/resource.ts +2 -11
- package/src/resources/character-performance.ts +3 -3
- package/src/resources/image-to-video.ts +3 -3
- package/src/resources/index.ts +5 -0
- package/src/resources/organization.ts +44 -15
- package/src/resources/tasks.ts +10 -7
- package/src/resources/text-to-image.ts +4 -4
- package/src/resources/text-to-speech.ts +114 -0
- package/src/resources/text-to-video.ts +3 -3
- package/src/resources/video-to-video.ts +3 -3
- package/src/resources/video-upscale.ts +3 -3
- package/src/tsconfig.json +2 -2
- package/src/uploads.ts +2 -255
- package/src/version.ts +1 -1
- package/uploads.d.mts +2 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +1 -74
- package/uploads.d.ts.map +1 -1
- package/uploads.js +3 -168
- package/uploads.js.map +1 -1
- package/uploads.mjs +1 -157
- package/uploads.mjs.map +1 -1
- package/version.d.mts +2 -0
- package/version.d.mts.map +1 -0
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
- package/_shims/MultipartBody.d.ts +0 -9
- package/_shims/MultipartBody.d.ts.map +0 -1
- package/_shims/MultipartBody.js +0 -16
- package/_shims/MultipartBody.js.map +0 -1
- package/_shims/MultipartBody.mjs +0 -12
- package/_shims/MultipartBody.mjs.map +0 -1
- package/_shims/README.md +0 -46
- package/_shims/auto/runtime-bun.d.ts +0 -5
- package/_shims/auto/runtime-bun.d.ts.map +0 -1
- package/_shims/auto/runtime-bun.js +0 -21
- package/_shims/auto/runtime-bun.js.map +0 -1
- package/_shims/auto/runtime-bun.mjs +0 -2
- package/_shims/auto/runtime-bun.mjs.map +0 -1
- package/_shims/auto/runtime-node.d.ts +0 -5
- package/_shims/auto/runtime-node.d.ts.map +0 -1
- package/_shims/auto/runtime-node.js +0 -21
- package/_shims/auto/runtime-node.js.map +0 -1
- package/_shims/auto/runtime-node.mjs +0 -2
- package/_shims/auto/runtime-node.mjs.map +0 -1
- package/_shims/auto/runtime.d.ts +0 -5
- package/_shims/auto/runtime.d.ts.map +0 -1
- package/_shims/auto/runtime.js +0 -21
- package/_shims/auto/runtime.js.map +0 -1
- package/_shims/auto/runtime.mjs +0 -2
- package/_shims/auto/runtime.mjs.map +0 -1
- package/_shims/auto/types-node.d.ts +0 -5
- package/_shims/auto/types-node.d.ts.map +0 -1
- package/_shims/auto/types-node.js +0 -21
- package/_shims/auto/types-node.js.map +0 -1
- package/_shims/auto/types-node.mjs +0 -2
- package/_shims/auto/types-node.mjs.map +0 -1
- package/_shims/auto/types.d.ts +0 -101
- package/_shims/auto/types.js +0 -3
- package/_shims/auto/types.mjs +0 -3
- package/_shims/bun-runtime.d.ts +0 -6
- package/_shims/bun-runtime.d.ts.map +0 -1
- package/_shims/bun-runtime.js +0 -14
- package/_shims/bun-runtime.js.map +0 -1
- package/_shims/bun-runtime.mjs +0 -10
- package/_shims/bun-runtime.mjs.map +0 -1
- package/_shims/index.d.ts +0 -83
- package/_shims/index.js +0 -17
- package/_shims/index.mjs +0 -11
- package/_shims/manual-types.d.ts +0 -12
- package/_shims/manual-types.js +0 -3
- package/_shims/manual-types.mjs +0 -3
- package/_shims/node-runtime.d.ts +0 -3
- package/_shims/node-runtime.d.ts.map +0 -1
- package/_shims/node-runtime.js +0 -89
- package/_shims/node-runtime.js.map +0 -1
- package/_shims/node-runtime.mjs +0 -56
- package/_shims/node-runtime.mjs.map +0 -1
- package/_shims/node-types.d.ts +0 -42
- package/_shims/node-types.js +0 -3
- package/_shims/node-types.mjs +0 -3
- package/_shims/registry.d.ts +0 -37
- package/_shims/registry.d.ts.map +0 -1
- package/_shims/registry.js +0 -41
- package/_shims/registry.js.map +0 -1
- package/_shims/registry.mjs +0 -37
- package/_shims/registry.mjs.map +0 -1
- package/_shims/web-runtime.d.ts +0 -5
- package/_shims/web-runtime.d.ts.map +0 -1
- package/_shims/web-runtime.js +0 -78
- package/_shims/web-runtime.js.map +0 -1
- package/_shims/web-runtime.mjs +0 -71
- package/_shims/web-runtime.mjs.map +0 -1
- package/_shims/web-types.d.ts +0 -83
- package/_shims/web-types.js +0 -3
- package/_shims/web-types.mjs +0 -3
- package/core.d.ts +0 -255
- package/core.d.ts.map +0 -1
- package/core.js +0 -924
- package/core.js.map +0 -1
- package/core.mjs +0 -892
- package/core.mjs.map +0 -1
- package/shims/node.d.ts +0 -30
- package/shims/node.d.ts.map +0 -1
- package/shims/node.js +0 -31
- package/shims/node.js.map +0 -1
- package/shims/node.mjs +0 -5
- package/shims/node.mjs.map +0 -1
- package/shims/web.d.ts +0 -26
- package/shims/web.d.ts.map +0 -1
- package/shims/web.js +0 -31
- package/shims/web.js.map +0 -1
- package/shims/web.mjs +0 -5
- package/shims/web.mjs.map +0 -1
- package/src/_shims/MultipartBody.ts +0 -9
- package/src/_shims/README.md +0 -46
- package/src/_shims/auto/runtime-bun.ts +0 -4
- package/src/_shims/auto/runtime-node.ts +0 -4
- package/src/_shims/auto/runtime.ts +0 -4
- package/src/_shims/auto/types-node.ts +0 -4
- package/src/_shims/auto/types.d.ts +0 -101
- package/src/_shims/auto/types.js +0 -3
- package/src/_shims/auto/types.mjs +0 -3
- package/src/_shims/bun-runtime.ts +0 -14
- package/src/_shims/index.d.ts +0 -83
- package/src/_shims/index.js +0 -17
- package/src/_shims/index.mjs +0 -11
- package/src/_shims/manual-types.d.ts +0 -12
- package/src/_shims/manual-types.js +0 -3
- package/src/_shims/manual-types.mjs +0 -3
- package/src/_shims/node-runtime.ts +0 -81
- package/src/_shims/node-types.d.ts +0 -42
- package/src/_shims/node-types.js +0 -3
- package/src/_shims/node-types.mjs +0 -3
- package/src/_shims/registry.ts +0 -67
- package/src/_shims/web-runtime.ts +0 -103
- package/src/_shims/web-types.d.ts +0 -83
- package/src/_shims/web-types.js +0 -3
- package/src/_shims/web-types.mjs +0 -3
- package/src/core.ts +0 -1236
- package/src/shims/node.ts +0 -50
- package/src/shims/web.ts +0 -50
package/index.js
CHANGED
|
@@ -1,141 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(o, k2, desc);
|
|
10
|
-
}) : (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === undefined) k2 = k;
|
|
12
|
-
o[k2] = m[k];
|
|
13
|
-
}));
|
|
14
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
-
}) : function(o, v) {
|
|
17
|
-
o["default"] = v;
|
|
18
|
-
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
20
|
-
if (mod && mod.__esModule) return mod;
|
|
21
|
-
var result = {};
|
|
22
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
23
|
-
__setModuleDefault(result, mod);
|
|
24
|
-
return result;
|
|
25
|
-
};
|
|
26
|
-
var _RunwayML_instances, _a, _RunwayML_baseURLOverridden;
|
|
27
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.AbortError = exports.TaskTimedOutError = exports.TaskFailedError = exports.UnprocessableEntityError = exports.PermissionDeniedError = exports.InternalServerError = exports.AuthenticationError = exports.BadRequestError = exports.RateLimitError = exports.ConflictError = exports.NotFoundError = exports.APIUserAbortError = exports.APIConnectionTimeoutError = exports.APIConnectionError = exports.APIError = exports.RunwayMLError = exports.fileFromPath = exports.toFile = exports.RunwayML = void 0;
|
|
29
|
-
const Core = __importStar(require("./core.js"));
|
|
30
|
-
const Errors = __importStar(require("./error.js"));
|
|
31
|
-
const Uploads = __importStar(require("./uploads.js"));
|
|
32
|
-
const API = __importStar(require("./resources/index.js"));
|
|
33
|
-
const character_performance_1 = require("./resources/character-performance.js");
|
|
34
|
-
const image_to_video_1 = require("./resources/image-to-video.js");
|
|
35
|
-
const organization_1 = require("./resources/organization.js");
|
|
36
|
-
const tasks_1 = require("./resources/tasks.js");
|
|
37
|
-
const text_to_image_1 = require("./resources/text-to-image.js");
|
|
38
|
-
const text_to_video_1 = require("./resources/text-to-video.js");
|
|
39
|
-
const video_to_video_1 = require("./resources/video-to-video.js");
|
|
40
|
-
const video_upscale_1 = require("./resources/video-upscale.js");
|
|
41
|
-
/**
|
|
42
|
-
* API Client for interfacing with the RunwayML API.
|
|
43
|
-
*/
|
|
44
|
-
class RunwayML extends Core.APIClient {
|
|
45
|
-
/**
|
|
46
|
-
* API Client for interfacing with the RunwayML API.
|
|
47
|
-
*
|
|
48
|
-
* @param {string | undefined} [opts.apiKey=process.env['RUNWAYML_API_SECRET'] ?? undefined]
|
|
49
|
-
* @param {string | undefined} [opts.runwayVersion=2024-11-06]
|
|
50
|
-
* @param {string} [opts.baseURL=process.env['RUNWAYML_BASE_URL'] ?? https://api.dev.runwayml.com] - Override the default base URL for the API.
|
|
51
|
-
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
52
|
-
* @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
|
|
53
|
-
* @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
|
|
54
|
-
* @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request.
|
|
55
|
-
* @param {Core.Headers} opts.defaultHeaders - Default headers to include with every request to the API.
|
|
56
|
-
* @param {Core.DefaultQuery} opts.defaultQuery - Default query parameters to include with every request to the API.
|
|
57
|
-
*/
|
|
58
|
-
constructor({ baseURL = Core.readEnv('RUNWAYML_BASE_URL'), apiKey = Core.readEnv('RUNWAYML_API_SECRET'), runwayVersion = '2024-11-06', ...opts } = {}) {
|
|
59
|
-
if (apiKey === undefined) {
|
|
60
|
-
throw new Errors.RunwayMLError("The RUNWAYML_API_SECRET environment variable is missing or empty; either provide it, or instantiate the RunwayML client with an apiKey option, like new RunwayML({ apiKey: 'My API Key' }).");
|
|
61
|
-
}
|
|
62
|
-
const options = {
|
|
63
|
-
apiKey,
|
|
64
|
-
runwayVersion,
|
|
65
|
-
...opts,
|
|
66
|
-
baseURL: baseURL || `https://api.dev.runwayml.com`,
|
|
67
|
-
};
|
|
68
|
-
if (Core.isRunningInBrowser()) {
|
|
69
|
-
throw new Errors.RunwayMLError("It looks like you're running in a browser-like environment, which is disabled to protect your secret API credentials from attackers. If you have a strong business need for client-side use of this API, please open a GitHub issue with your use-case and security mitigations.");
|
|
70
|
-
}
|
|
71
|
-
super({
|
|
72
|
-
baseURL: options.baseURL,
|
|
73
|
-
baseURLOverridden: baseURL ? baseURL !== 'https://api.dev.runwayml.com' : false,
|
|
74
|
-
timeout: options.timeout ?? 60000 /* 1 minute */,
|
|
75
|
-
httpAgent: options.httpAgent,
|
|
76
|
-
maxRetries: options.maxRetries,
|
|
77
|
-
fetch: options.fetch,
|
|
78
|
-
});
|
|
79
|
-
_RunwayML_instances.add(this);
|
|
80
|
-
this.tasks = new API.Tasks(this);
|
|
81
|
-
this.imageToVideo = new API.ImageToVideo(this);
|
|
82
|
-
this.videoToVideo = new API.VideoToVideo(this);
|
|
83
|
-
this.textToVideo = new API.TextToVideo(this);
|
|
84
|
-
this.textToImage = new API.TextToImage(this);
|
|
85
|
-
this.videoUpscale = new API.VideoUpscale(this);
|
|
86
|
-
this.characterPerformance = new API.CharacterPerformance(this);
|
|
87
|
-
this.organization = new API.Organization(this);
|
|
88
|
-
this._options = options;
|
|
89
|
-
this.apiKey = apiKey;
|
|
90
|
-
this.runwayVersion = runwayVersion;
|
|
91
|
-
}
|
|
92
|
-
defaultQuery() {
|
|
93
|
-
return this._options.defaultQuery;
|
|
94
|
-
}
|
|
95
|
-
defaultHeaders(opts) {
|
|
96
|
-
return {
|
|
97
|
-
...super.defaultHeaders(opts),
|
|
98
|
-
'X-Runway-Version': this.runwayVersion,
|
|
99
|
-
...this._options.defaultHeaders,
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
authHeaders(opts) {
|
|
103
|
-
return { Authorization: `Bearer ${this.apiKey}` };
|
|
104
|
-
}
|
|
3
|
+
exports = module.exports = function (...args) {
|
|
4
|
+
return new exports.default(...args)
|
|
105
5
|
}
|
|
106
|
-
exports
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
RunwayML.DEFAULT_TIMEOUT = 60000; // 1 minute
|
|
112
|
-
RunwayML.RunwayMLError = Errors.RunwayMLError;
|
|
113
|
-
RunwayML.APIError = Errors.APIError;
|
|
114
|
-
RunwayML.APIConnectionError = Errors.APIConnectionError;
|
|
115
|
-
RunwayML.APIConnectionTimeoutError = Errors.APIConnectionTimeoutError;
|
|
116
|
-
RunwayML.APIUserAbortError = Errors.APIUserAbortError;
|
|
117
|
-
RunwayML.NotFoundError = Errors.NotFoundError;
|
|
118
|
-
RunwayML.ConflictError = Errors.ConflictError;
|
|
119
|
-
RunwayML.RateLimitError = Errors.RateLimitError;
|
|
120
|
-
RunwayML.BadRequestError = Errors.BadRequestError;
|
|
121
|
-
RunwayML.AuthenticationError = Errors.AuthenticationError;
|
|
122
|
-
RunwayML.InternalServerError = Errors.InternalServerError;
|
|
123
|
-
RunwayML.PermissionDeniedError = Errors.PermissionDeniedError;
|
|
124
|
-
RunwayML.UnprocessableEntityError = Errors.UnprocessableEntityError;
|
|
125
|
-
RunwayML.toFile = Uploads.toFile;
|
|
126
|
-
RunwayML.fileFromPath = Uploads.fileFromPath;
|
|
127
|
-
RunwayML.Tasks = tasks_1.Tasks;
|
|
128
|
-
RunwayML.ImageToVideo = image_to_video_1.ImageToVideo;
|
|
129
|
-
RunwayML.VideoToVideo = video_to_video_1.VideoToVideo;
|
|
130
|
-
RunwayML.TextToVideo = text_to_video_1.TextToVideo;
|
|
131
|
-
RunwayML.TextToImage = text_to_image_1.TextToImage;
|
|
132
|
-
RunwayML.VideoUpscale = video_upscale_1.VideoUpscale;
|
|
133
|
-
RunwayML.CharacterPerformance = character_performance_1.CharacterPerformance;
|
|
134
|
-
RunwayML.Organization = organization_1.Organization;
|
|
135
|
-
var uploads_1 = require("./uploads.js");
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.AbortError = exports.TaskTimedOutError = exports.TaskFailedError = exports.UnprocessableEntityError = exports.PermissionDeniedError = exports.InternalServerError = exports.AuthenticationError = exports.BadRequestError = exports.RateLimitError = exports.ConflictError = exports.NotFoundError = exports.APIUserAbortError = exports.APIConnectionTimeoutError = exports.APIConnectionError = exports.APIError = exports.RunwayMLError = exports.RunwayML = exports.APIPromise = exports.toFile = exports.default = void 0;
|
|
8
|
+
var client_1 = require("./client.js");
|
|
9
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return client_1.RunwayML; } });
|
|
10
|
+
var uploads_1 = require("./core/uploads.js");
|
|
136
11
|
Object.defineProperty(exports, "toFile", { enumerable: true, get: function () { return uploads_1.toFile; } });
|
|
137
|
-
|
|
138
|
-
|
|
12
|
+
var api_promise_1 = require("./core/api-promise.js");
|
|
13
|
+
Object.defineProperty(exports, "APIPromise", { enumerable: true, get: function () { return api_promise_1.APIPromise; } });
|
|
14
|
+
var client_2 = require("./client.js");
|
|
15
|
+
Object.defineProperty(exports, "RunwayML", { enumerable: true, get: function () { return client_2.RunwayML; } });
|
|
16
|
+
var error_1 = require("./core/error.js");
|
|
139
17
|
Object.defineProperty(exports, "RunwayMLError", { enumerable: true, get: function () { return error_1.RunwayMLError; } });
|
|
140
18
|
Object.defineProperty(exports, "APIError", { enumerable: true, get: function () { return error_1.APIError; } });
|
|
141
19
|
Object.defineProperty(exports, "APIConnectionError", { enumerable: true, get: function () { return error_1.APIConnectionError; } });
|
|
@@ -153,6 +31,4 @@ var polling_1 = require("./lib/polling.js");
|
|
|
153
31
|
Object.defineProperty(exports, "TaskFailedError", { enumerable: true, get: function () { return polling_1.TaskFailedError; } });
|
|
154
32
|
Object.defineProperty(exports, "TaskTimedOutError", { enumerable: true, get: function () { return polling_1.TaskTimedOutError; } });
|
|
155
33
|
Object.defineProperty(exports, "AbortError", { enumerable: true, get: function () { return polling_1.AbortError; } });
|
|
156
|
-
exports = module.exports = RunwayML;
|
|
157
|
-
exports.default = RunwayML;
|
|
158
34
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":";AAAA,sFAAsF
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sCAA+C;AAAtC,iGAAA,QAAQ,OAAW;AAE5B,6CAAyD;AAA/B,iGAAA,MAAM,OAAA;AAChC,qDAAgD;AAAvC,yGAAA,UAAU,OAAA;AACnB,sCAAwD;AAA/C,kGAAA,QAAQ,OAAA;AACjB,yCAcsB;AAbpB,sGAAA,aAAa,OAAA;AACb,iGAAA,QAAQ,OAAA;AACR,2GAAA,kBAAkB,OAAA;AAClB,kHAAA,yBAAyB,OAAA;AACzB,0GAAA,iBAAiB,OAAA;AACjB,sGAAA,aAAa,OAAA;AACb,sGAAA,aAAa,OAAA;AACb,uGAAA,cAAc,OAAA;AACd,wGAAA,eAAe,OAAA;AACf,4GAAA,mBAAmB,OAAA;AACnB,4GAAA,mBAAmB,OAAA;AACnB,8GAAA,qBAAqB,OAAA;AACrB,iHAAA,wBAAwB,OAAA;AAG1B,4CAMuB;AALrB,0GAAA,eAAe,OAAA;AACf,4GAAA,iBAAiB,OAAA;AAEjB,qGAAA,UAAU,OAAA"}
|
package/index.mjs
CHANGED
|
@@ -1,112 +1,8 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { ImageToVideo, } from "./resources/image-to-video.mjs";
|
|
9
|
-
import { Organization, } from "./resources/organization.mjs";
|
|
10
|
-
import { Tasks } from "./resources/tasks.mjs";
|
|
11
|
-
import { TextToImage } from "./resources/text-to-image.mjs";
|
|
12
|
-
import { TextToVideo } from "./resources/text-to-video.mjs";
|
|
13
|
-
import { VideoToVideo, } from "./resources/video-to-video.mjs";
|
|
14
|
-
import { VideoUpscale, } from "./resources/video-upscale.mjs";
|
|
15
|
-
/**
|
|
16
|
-
* API Client for interfacing with the RunwayML API.
|
|
17
|
-
*/
|
|
18
|
-
export class RunwayML extends Core.APIClient {
|
|
19
|
-
/**
|
|
20
|
-
* API Client for interfacing with the RunwayML API.
|
|
21
|
-
*
|
|
22
|
-
* @param {string | undefined} [opts.apiKey=process.env['RUNWAYML_API_SECRET'] ?? undefined]
|
|
23
|
-
* @param {string | undefined} [opts.runwayVersion=2024-11-06]
|
|
24
|
-
* @param {string} [opts.baseURL=process.env['RUNWAYML_BASE_URL'] ?? https://api.dev.runwayml.com] - Override the default base URL for the API.
|
|
25
|
-
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
26
|
-
* @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections.
|
|
27
|
-
* @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
|
|
28
|
-
* @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request.
|
|
29
|
-
* @param {Core.Headers} opts.defaultHeaders - Default headers to include with every request to the API.
|
|
30
|
-
* @param {Core.DefaultQuery} opts.defaultQuery - Default query parameters to include with every request to the API.
|
|
31
|
-
*/
|
|
32
|
-
constructor({ baseURL = Core.readEnv('RUNWAYML_BASE_URL'), apiKey = Core.readEnv('RUNWAYML_API_SECRET'), runwayVersion = '2024-11-06', ...opts } = {}) {
|
|
33
|
-
if (apiKey === undefined) {
|
|
34
|
-
throw new Errors.RunwayMLError("The RUNWAYML_API_SECRET environment variable is missing or empty; either provide it, or instantiate the RunwayML client with an apiKey option, like new RunwayML({ apiKey: 'My API Key' }).");
|
|
35
|
-
}
|
|
36
|
-
const options = {
|
|
37
|
-
apiKey,
|
|
38
|
-
runwayVersion,
|
|
39
|
-
...opts,
|
|
40
|
-
baseURL: baseURL || `https://api.dev.runwayml.com`,
|
|
41
|
-
};
|
|
42
|
-
if (Core.isRunningInBrowser()) {
|
|
43
|
-
throw new Errors.RunwayMLError("It looks like you're running in a browser-like environment, which is disabled to protect your secret API credentials from attackers. If you have a strong business need for client-side use of this API, please open a GitHub issue with your use-case and security mitigations.");
|
|
44
|
-
}
|
|
45
|
-
super({
|
|
46
|
-
baseURL: options.baseURL,
|
|
47
|
-
baseURLOverridden: baseURL ? baseURL !== 'https://api.dev.runwayml.com' : false,
|
|
48
|
-
timeout: options.timeout ?? 60000 /* 1 minute */,
|
|
49
|
-
httpAgent: options.httpAgent,
|
|
50
|
-
maxRetries: options.maxRetries,
|
|
51
|
-
fetch: options.fetch,
|
|
52
|
-
});
|
|
53
|
-
_RunwayML_instances.add(this);
|
|
54
|
-
this.tasks = new API.Tasks(this);
|
|
55
|
-
this.imageToVideo = new API.ImageToVideo(this);
|
|
56
|
-
this.videoToVideo = new API.VideoToVideo(this);
|
|
57
|
-
this.textToVideo = new API.TextToVideo(this);
|
|
58
|
-
this.textToImage = new API.TextToImage(this);
|
|
59
|
-
this.videoUpscale = new API.VideoUpscale(this);
|
|
60
|
-
this.characterPerformance = new API.CharacterPerformance(this);
|
|
61
|
-
this.organization = new API.Organization(this);
|
|
62
|
-
this._options = options;
|
|
63
|
-
this.apiKey = apiKey;
|
|
64
|
-
this.runwayVersion = runwayVersion;
|
|
65
|
-
}
|
|
66
|
-
defaultQuery() {
|
|
67
|
-
return this._options.defaultQuery;
|
|
68
|
-
}
|
|
69
|
-
defaultHeaders(opts) {
|
|
70
|
-
return {
|
|
71
|
-
...super.defaultHeaders(opts),
|
|
72
|
-
'X-Runway-Version': this.runwayVersion,
|
|
73
|
-
...this._options.defaultHeaders,
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
authHeaders(opts) {
|
|
77
|
-
return { Authorization: `Bearer ${this.apiKey}` };
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
_a = RunwayML, _RunwayML_instances = new WeakSet(), _RunwayML_baseURLOverridden = function _RunwayML_baseURLOverridden() {
|
|
81
|
-
return this.baseURL !== 'https://api.dev.runwayml.com';
|
|
82
|
-
};
|
|
83
|
-
RunwayML.RunwayML = _a;
|
|
84
|
-
RunwayML.DEFAULT_TIMEOUT = 60000; // 1 minute
|
|
85
|
-
RunwayML.RunwayMLError = Errors.RunwayMLError;
|
|
86
|
-
RunwayML.APIError = Errors.APIError;
|
|
87
|
-
RunwayML.APIConnectionError = Errors.APIConnectionError;
|
|
88
|
-
RunwayML.APIConnectionTimeoutError = Errors.APIConnectionTimeoutError;
|
|
89
|
-
RunwayML.APIUserAbortError = Errors.APIUserAbortError;
|
|
90
|
-
RunwayML.NotFoundError = Errors.NotFoundError;
|
|
91
|
-
RunwayML.ConflictError = Errors.ConflictError;
|
|
92
|
-
RunwayML.RateLimitError = Errors.RateLimitError;
|
|
93
|
-
RunwayML.BadRequestError = Errors.BadRequestError;
|
|
94
|
-
RunwayML.AuthenticationError = Errors.AuthenticationError;
|
|
95
|
-
RunwayML.InternalServerError = Errors.InternalServerError;
|
|
96
|
-
RunwayML.PermissionDeniedError = Errors.PermissionDeniedError;
|
|
97
|
-
RunwayML.UnprocessableEntityError = Errors.UnprocessableEntityError;
|
|
98
|
-
RunwayML.toFile = Uploads.toFile;
|
|
99
|
-
RunwayML.fileFromPath = Uploads.fileFromPath;
|
|
100
|
-
RunwayML.Tasks = Tasks;
|
|
101
|
-
RunwayML.ImageToVideo = ImageToVideo;
|
|
102
|
-
RunwayML.VideoToVideo = VideoToVideo;
|
|
103
|
-
RunwayML.TextToVideo = TextToVideo;
|
|
104
|
-
RunwayML.TextToImage = TextToImage;
|
|
105
|
-
RunwayML.VideoUpscale = VideoUpscale;
|
|
106
|
-
RunwayML.CharacterPerformance = CharacterPerformance;
|
|
107
|
-
RunwayML.Organization = Organization;
|
|
108
|
-
export { toFile, fileFromPath } from "./uploads.mjs";
|
|
109
|
-
export { RunwayMLError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError, } from "./error.mjs";
|
|
110
|
-
export { TaskFailedError, TaskTimedOutError, AbortError } from "./lib/polling.mjs";
|
|
111
|
-
export default RunwayML;
|
|
2
|
+
export { RunwayML as default } from "./client.mjs";
|
|
3
|
+
export { toFile } from "./core/uploads.mjs";
|
|
4
|
+
export { APIPromise } from "./core/api-promise.mjs";
|
|
5
|
+
export { RunwayML } from "./client.mjs";
|
|
6
|
+
export { RunwayMLError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError, } from "./core/error.mjs";
|
|
7
|
+
export { TaskFailedError, TaskTimedOutError, AbortError, } from "./lib/polling.mjs";
|
|
112
8
|
//# sourceMappingURL=index.mjs.map
|
package/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA,sFAAsF
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,QAAQ,IAAI,OAAO,EAAE;OAEvB,EAAmB,MAAM,EAAE;OAC3B,EAAE,UAAU,EAAE;OACd,EAAE,QAAQ,EAAsB;OAChC,EACL,aAAa,EACb,QAAQ,EACR,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,GACzB;OAEM,EACL,eAAe,EACf,iBAAiB,EAEjB,UAAU,GAEX"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export type Fetch = (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
|
|
2
|
+
/**
|
|
3
|
+
* An alias to the builtin `RequestInit` type so we can
|
|
4
|
+
* easily alias it in import statements if there are name clashes.
|
|
5
|
+
*
|
|
6
|
+
* https://developer.mozilla.org/docs/Web/API/RequestInit
|
|
7
|
+
*/
|
|
8
|
+
type _RequestInit = RequestInit;
|
|
9
|
+
/**
|
|
10
|
+
* An alias to the builtin `Response` type so we can
|
|
11
|
+
* easily alias it in import statements if there are name clashes.
|
|
12
|
+
*
|
|
13
|
+
* https://developer.mozilla.org/docs/Web/API/Response
|
|
14
|
+
*/
|
|
15
|
+
type _Response = Response;
|
|
16
|
+
/**
|
|
17
|
+
* The type for the first argument to `fetch`.
|
|
18
|
+
*
|
|
19
|
+
* https://developer.mozilla.org/docs/Web/API/Window/fetch#resource
|
|
20
|
+
*/
|
|
21
|
+
type _RequestInfo = Request | URL | string;
|
|
22
|
+
/**
|
|
23
|
+
* The type for constructing `RequestInit` Headers.
|
|
24
|
+
*
|
|
25
|
+
* https://developer.mozilla.org/docs/Web/API/RequestInit#setting_headers
|
|
26
|
+
*/
|
|
27
|
+
type _HeadersInit = RequestInit['headers'];
|
|
28
|
+
/**
|
|
29
|
+
* The type for constructing `RequestInit` body.
|
|
30
|
+
*
|
|
31
|
+
* https://developer.mozilla.org/docs/Web/API/RequestInit#body
|
|
32
|
+
*/
|
|
33
|
+
type _BodyInit = RequestInit['body'];
|
|
34
|
+
/**
|
|
35
|
+
* An alias to the builtin `Array<T>` type so we can
|
|
36
|
+
* easily alias it in import statements if there are name clashes.
|
|
37
|
+
*/
|
|
38
|
+
type _Array<T> = Array<T>;
|
|
39
|
+
/**
|
|
40
|
+
* An alias to the builtin `Record<K, T>` type so we can
|
|
41
|
+
* easily alias it in import statements if there are name clashes.
|
|
42
|
+
*/
|
|
43
|
+
type _Record<K extends keyof any, T> = Record<K, T>;
|
|
44
|
+
export type { _Array as Array, _BodyInit as BodyInit, _HeadersInit as HeadersInit, _Record as Record, _RequestInfo as RequestInfo, _RequestInit as RequestInit, _Response as Response, };
|
|
45
|
+
/**
|
|
46
|
+
* A copy of the builtin `EndingType` type as it isn't fully supported in certain
|
|
47
|
+
* environments and attempting to reference the global version will error.
|
|
48
|
+
*
|
|
49
|
+
* https://github.com/microsoft/TypeScript/blob/49ad1a3917a0ea57f5ff248159256e12bb1cb705/src/lib/dom.generated.d.ts#L27941
|
|
50
|
+
*/
|
|
51
|
+
type EndingType = 'native' | 'transparent';
|
|
52
|
+
/**
|
|
53
|
+
* A copy of the builtin `BlobPropertyBag` type as it isn't fully supported in certain
|
|
54
|
+
* environments and attempting to reference the global version will error.
|
|
55
|
+
*
|
|
56
|
+
* https://github.com/microsoft/TypeScript/blob/49ad1a3917a0ea57f5ff248159256e12bb1cb705/src/lib/dom.generated.d.ts#L154
|
|
57
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob#options
|
|
58
|
+
*/
|
|
59
|
+
export interface BlobPropertyBag {
|
|
60
|
+
endings?: EndingType;
|
|
61
|
+
type?: string;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* A copy of the builtin `FilePropertyBag` type as it isn't fully supported in certain
|
|
65
|
+
* environments and attempting to reference the global version will error.
|
|
66
|
+
*
|
|
67
|
+
* https://github.com/microsoft/TypeScript/blob/49ad1a3917a0ea57f5ff248159256e12bb1cb705/src/lib/dom.generated.d.ts#L503
|
|
68
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/File/File#options
|
|
69
|
+
*/
|
|
70
|
+
export interface FilePropertyBag extends BlobPropertyBag {
|
|
71
|
+
lastModified?: number;
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=builtin-types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builtin-types.d.mts","sourceRoot":"","sources":["../src/internal/builtin-types.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,KAAK,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,OAAO,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;AAE7F;;;;;GAKG;AACH,KAAK,YAAY,GAAG,WAAW,CAAC;AAEhC;;;;;GAKG;AACH,KAAK,SAAS,GAAG,QAAQ,CAAC;AAE1B;;;;GAIG;AACH,KAAK,YAAY,GAAG,OAAO,GAAG,GAAG,GAAG,MAAM,CAAC;AAE3C;;;;GAIG;AACH,KAAK,YAAY,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC;AAE3C;;;;GAIG;AACH,KAAK,SAAS,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;AAErC;;;GAGG;AACH,KAAK,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;AAE1B;;;GAGG;AACH,KAAK,OAAO,CAAC,CAAC,SAAS,MAAM,GAAG,EAAE,CAAC,IAAI,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAEpD,YAAY,EACV,MAAM,IAAI,KAAK,EACf,SAAS,IAAI,QAAQ,EACrB,YAAY,IAAI,WAAW,EAC3B,OAAO,IAAI,MAAM,EACjB,YAAY,IAAI,WAAW,EAC3B,YAAY,IAAI,WAAW,EAC3B,SAAS,IAAI,QAAQ,GACtB,CAAC;AAEF;;;;;GAKG;AACH,KAAK,UAAU,GAAG,QAAQ,GAAG,aAAa,CAAC;AAE3C;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;;GAMG;AACH,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export type Fetch = (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
|
|
2
|
+
/**
|
|
3
|
+
* An alias to the builtin `RequestInit` type so we can
|
|
4
|
+
* easily alias it in import statements if there are name clashes.
|
|
5
|
+
*
|
|
6
|
+
* https://developer.mozilla.org/docs/Web/API/RequestInit
|
|
7
|
+
*/
|
|
8
|
+
type _RequestInit = RequestInit;
|
|
9
|
+
/**
|
|
10
|
+
* An alias to the builtin `Response` type so we can
|
|
11
|
+
* easily alias it in import statements if there are name clashes.
|
|
12
|
+
*
|
|
13
|
+
* https://developer.mozilla.org/docs/Web/API/Response
|
|
14
|
+
*/
|
|
15
|
+
type _Response = Response;
|
|
16
|
+
/**
|
|
17
|
+
* The type for the first argument to `fetch`.
|
|
18
|
+
*
|
|
19
|
+
* https://developer.mozilla.org/docs/Web/API/Window/fetch#resource
|
|
20
|
+
*/
|
|
21
|
+
type _RequestInfo = Request | URL | string;
|
|
22
|
+
/**
|
|
23
|
+
* The type for constructing `RequestInit` Headers.
|
|
24
|
+
*
|
|
25
|
+
* https://developer.mozilla.org/docs/Web/API/RequestInit#setting_headers
|
|
26
|
+
*/
|
|
27
|
+
type _HeadersInit = RequestInit['headers'];
|
|
28
|
+
/**
|
|
29
|
+
* The type for constructing `RequestInit` body.
|
|
30
|
+
*
|
|
31
|
+
* https://developer.mozilla.org/docs/Web/API/RequestInit#body
|
|
32
|
+
*/
|
|
33
|
+
type _BodyInit = RequestInit['body'];
|
|
34
|
+
/**
|
|
35
|
+
* An alias to the builtin `Array<T>` type so we can
|
|
36
|
+
* easily alias it in import statements if there are name clashes.
|
|
37
|
+
*/
|
|
38
|
+
type _Array<T> = Array<T>;
|
|
39
|
+
/**
|
|
40
|
+
* An alias to the builtin `Record<K, T>` type so we can
|
|
41
|
+
* easily alias it in import statements if there are name clashes.
|
|
42
|
+
*/
|
|
43
|
+
type _Record<K extends keyof any, T> = Record<K, T>;
|
|
44
|
+
export type { _Array as Array, _BodyInit as BodyInit, _HeadersInit as HeadersInit, _Record as Record, _RequestInfo as RequestInfo, _RequestInit as RequestInit, _Response as Response, };
|
|
45
|
+
/**
|
|
46
|
+
* A copy of the builtin `EndingType` type as it isn't fully supported in certain
|
|
47
|
+
* environments and attempting to reference the global version will error.
|
|
48
|
+
*
|
|
49
|
+
* https://github.com/microsoft/TypeScript/blob/49ad1a3917a0ea57f5ff248159256e12bb1cb705/src/lib/dom.generated.d.ts#L27941
|
|
50
|
+
*/
|
|
51
|
+
type EndingType = 'native' | 'transparent';
|
|
52
|
+
/**
|
|
53
|
+
* A copy of the builtin `BlobPropertyBag` type as it isn't fully supported in certain
|
|
54
|
+
* environments and attempting to reference the global version will error.
|
|
55
|
+
*
|
|
56
|
+
* https://github.com/microsoft/TypeScript/blob/49ad1a3917a0ea57f5ff248159256e12bb1cb705/src/lib/dom.generated.d.ts#L154
|
|
57
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob#options
|
|
58
|
+
*/
|
|
59
|
+
export interface BlobPropertyBag {
|
|
60
|
+
endings?: EndingType;
|
|
61
|
+
type?: string;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* A copy of the builtin `FilePropertyBag` type as it isn't fully supported in certain
|
|
65
|
+
* environments and attempting to reference the global version will error.
|
|
66
|
+
*
|
|
67
|
+
* https://github.com/microsoft/TypeScript/blob/49ad1a3917a0ea57f5ff248159256e12bb1cb705/src/lib/dom.generated.d.ts#L503
|
|
68
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/File/File#options
|
|
69
|
+
*/
|
|
70
|
+
export interface FilePropertyBag extends BlobPropertyBag {
|
|
71
|
+
lastModified?: number;
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=builtin-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builtin-types.d.ts","sourceRoot":"","sources":["../src/internal/builtin-types.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,KAAK,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,OAAO,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;AAE7F;;;;;GAKG;AACH,KAAK,YAAY,GAAG,WAAW,CAAC;AAEhC;;;;;GAKG;AACH,KAAK,SAAS,GAAG,QAAQ,CAAC;AAE1B;;;;GAIG;AACH,KAAK,YAAY,GAAG,OAAO,GAAG,GAAG,GAAG,MAAM,CAAC;AAE3C;;;;GAIG;AACH,KAAK,YAAY,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC;AAE3C;;;;GAIG;AACH,KAAK,SAAS,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;AAErC;;;GAGG;AACH,KAAK,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;AAE1B;;;GAGG;AACH,KAAK,OAAO,CAAC,CAAC,SAAS,MAAM,GAAG,EAAE,CAAC,IAAI,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAEpD,YAAY,EACV,MAAM,IAAI,KAAK,EACf,SAAS,IAAI,QAAQ,EACrB,YAAY,IAAI,WAAW,EAC3B,OAAO,IAAI,MAAM,EACjB,YAAY,IAAI,WAAW,EAC3B,YAAY,IAAI,WAAW,EAC3B,SAAS,IAAI,QAAQ,GACtB,CAAC;AAEF;;;;;GAKG;AACH,KAAK,UAAU,GAAG,QAAQ,GAAG,aAAa,CAAC;AAE3C;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;;GAMG;AACH,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builtin-types.js","sourceRoot":"","sources":["../src/internal/builtin-types.ts"],"names":[],"mappings":";AAAA,sFAAsF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builtin-types.mjs","sourceRoot":"","sources":["../src/internal/builtin-types.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const isRunningInBrowser: () => boolean;
|
|
2
|
+
type Arch = 'x32' | 'x64' | 'arm' | 'arm64' | `other:${string}` | 'unknown';
|
|
3
|
+
type PlatformName = 'MacOS' | 'Linux' | 'Windows' | 'FreeBSD' | 'OpenBSD' | 'iOS' | 'Android' | `Other:${string}` | 'Unknown';
|
|
4
|
+
type Browser = 'ie' | 'edge' | 'chrome' | 'firefox' | 'safari';
|
|
5
|
+
type PlatformProperties = {
|
|
6
|
+
'X-Stainless-Lang': 'js';
|
|
7
|
+
'X-Stainless-Package-Version': string;
|
|
8
|
+
'X-Stainless-OS': PlatformName;
|
|
9
|
+
'X-Stainless-Arch': Arch;
|
|
10
|
+
'X-Stainless-Runtime': 'node' | 'deno' | 'edge' | `browser:${Browser}` | 'unknown';
|
|
11
|
+
'X-Stainless-Runtime-Version': string;
|
|
12
|
+
};
|
|
13
|
+
export declare const getPlatformHeaders: () => PlatformProperties;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=detect-platform.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detect-platform.d.mts","sourceRoot":"","sources":["../src/internal/detect-platform.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB,eAS9B,CAAC;AA0BF,KAAK,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,OAAO,GAAG,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;AAC5E,KAAK,YAAY,GACb,OAAO,GACP,OAAO,GACP,SAAS,GACT,SAAS,GACT,SAAS,GACT,KAAK,GACL,SAAS,GACT,SAAS,MAAM,EAAE,GACjB,SAAS,CAAC;AACd,KAAK,OAAO,GAAG,IAAI,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;AAC/D,KAAK,kBAAkB,GAAG;IACxB,kBAAkB,EAAE,IAAI,CAAC;IACzB,6BAA6B,EAAE,MAAM,CAAC;IACtC,gBAAgB,EAAE,YAAY,CAAC;IAC/B,kBAAkB,EAAE,IAAI,CAAC;IACzB,qBAAqB,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,OAAO,EAAE,GAAG,SAAS,CAAC;IACnF,6BAA6B,EAAE,MAAM,CAAC;CACvC,CAAC;AAuIF,eAAO,MAAM,kBAAkB,0BAE9B,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const isRunningInBrowser: () => boolean;
|
|
2
|
+
type Arch = 'x32' | 'x64' | 'arm' | 'arm64' | `other:${string}` | 'unknown';
|
|
3
|
+
type PlatformName = 'MacOS' | 'Linux' | 'Windows' | 'FreeBSD' | 'OpenBSD' | 'iOS' | 'Android' | `Other:${string}` | 'Unknown';
|
|
4
|
+
type Browser = 'ie' | 'edge' | 'chrome' | 'firefox' | 'safari';
|
|
5
|
+
type PlatformProperties = {
|
|
6
|
+
'X-Stainless-Lang': 'js';
|
|
7
|
+
'X-Stainless-Package-Version': string;
|
|
8
|
+
'X-Stainless-OS': PlatformName;
|
|
9
|
+
'X-Stainless-Arch': Arch;
|
|
10
|
+
'X-Stainless-Runtime': 'node' | 'deno' | 'edge' | `browser:${Browser}` | 'unknown';
|
|
11
|
+
'X-Stainless-Runtime-Version': string;
|
|
12
|
+
};
|
|
13
|
+
export declare const getPlatformHeaders: () => PlatformProperties;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=detect-platform.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detect-platform.d.ts","sourceRoot":"","sources":["../src/internal/detect-platform.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB,eAS9B,CAAC;AA0BF,KAAK,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,OAAO,GAAG,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;AAC5E,KAAK,YAAY,GACb,OAAO,GACP,OAAO,GACP,SAAS,GACT,SAAS,GACT,SAAS,GACT,KAAK,GACL,SAAS,GACT,SAAS,MAAM,EAAE,GACjB,SAAS,CAAC;AACd,KAAK,OAAO,GAAG,IAAI,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;AAC/D,KAAK,kBAAkB,GAAG;IACxB,kBAAkB,EAAE,IAAI,CAAC;IACzB,6BAA6B,EAAE,MAAM,CAAC;IACtC,gBAAgB,EAAE,YAAY,CAAC;IAC/B,kBAAkB,EAAE,IAAI,CAAC;IACzB,qBAAqB,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,OAAO,EAAE,GAAG,SAAS,CAAC;IACnF,6BAA6B,EAAE,MAAM,CAAC;CACvC,CAAC;AAuIF,eAAO,MAAM,kBAAkB,0BAE9B,CAAC"}
|