@imagekit/nodejs 7.0.1
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 +102 -0
- package/LICENSE +201 -0
- package/README.md +633 -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 +238 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +238 -0
- package/client.d.ts.map +1 -0
- package/client.js +506 -0
- package/client.js.map +1 -0
- package/client.mjs +502 -0
- package/client.mjs.map +1 -0
- package/core/api-promise.d.mts +46 -0
- package/core/api-promise.d.mts.map +1 -0
- package/core/api-promise.d.ts +46 -0
- package/core/api-promise.d.ts.map +1 -0
- package/core/api-promise.js +74 -0
- package/core/api-promise.js.map +1 -0
- package/core/api-promise.mjs +70 -0
- package/core/api-promise.mjs.map +1 -0
- package/core/error.d.mts +46 -0
- package/core/error.d.mts.map +1 -0
- package/core/error.d.ts +46 -0
- package/core/error.d.ts.map +1 -0
- package/core/error.js +113 -0
- package/core/error.js.map +1 -0
- package/core/error.mjs +97 -0
- package/core/error.mjs.map +1 -0
- package/core/resource.d.mts +6 -0
- package/core/resource.d.mts.map +1 -0
- package/core/resource.d.ts +6 -0
- package/core/resource.d.ts.map +1 -0
- package/core/resource.js +11 -0
- package/core/resource.js.map +1 -0
- package/core/resource.mjs +7 -0
- package/core/resource.mjs.map +1 -0
- package/core/uploads.d.mts +3 -0
- package/core/uploads.d.mts.map +1 -0
- package/core/uploads.d.ts +3 -0
- package/core/uploads.d.ts.map +1 -0
- package/core/uploads.js +6 -0
- package/core/uploads.js.map +1 -0
- package/core/uploads.mjs +2 -0
- package/core/uploads.mjs.map +1 -0
- package/error.d.mts +2 -0
- package/error.d.mts.map +1 -0
- package/error.d.ts +2 -0
- package/error.d.ts.map +1 -0
- package/error.js +6 -0
- package/error.js.map +1 -0
- package/error.mjs +2 -0
- package/error.mjs.map +1 -0
- package/index.d.mts +6 -0
- package/index.d.mts.map +1 -0
- package/index.d.ts +6 -0
- package/index.d.ts.map +1 -0
- package/index.js +30 -0
- package/index.js.map +1 -0
- package/index.mjs +7 -0
- package/index.mjs.map +1 -0
- package/internal/builtin-types.d.mts +73 -0
- package/internal/builtin-types.d.mts.map +1 -0
- package/internal/builtin-types.d.ts +73 -0
- package/internal/builtin-types.d.ts.map +1 -0
- package/internal/builtin-types.js +4 -0
- package/internal/builtin-types.js.map +1 -0
- package/internal/builtin-types.mjs +3 -0
- package/internal/builtin-types.mjs.map +1 -0
- package/internal/detect-platform.d.mts +15 -0
- package/internal/detect-platform.d.mts.map +1 -0
- package/internal/detect-platform.d.ts +15 -0
- package/internal/detect-platform.d.ts.map +1 -0
- package/internal/detect-platform.js +162 -0
- package/internal/detect-platform.js.map +1 -0
- package/internal/detect-platform.mjs +157 -0
- package/internal/detect-platform.mjs.map +1 -0
- package/internal/errors.d.mts +3 -0
- package/internal/errors.d.mts.map +1 -0
- package/internal/errors.d.ts +3 -0
- package/internal/errors.d.ts.map +1 -0
- package/internal/errors.js +41 -0
- package/internal/errors.js.map +1 -0
- package/internal/errors.mjs +36 -0
- package/internal/errors.mjs.map +1 -0
- package/internal/headers.d.mts +20 -0
- package/internal/headers.d.mts.map +1 -0
- package/internal/headers.d.ts +20 -0
- package/internal/headers.d.ts.map +1 -0
- package/internal/headers.js +79 -0
- package/internal/headers.js.map +1 -0
- package/internal/headers.mjs +74 -0
- package/internal/headers.mjs.map +1 -0
- package/internal/parse.d.mts +12 -0
- package/internal/parse.d.mts.map +1 -0
- package/internal/parse.d.ts +12 -0
- package/internal/parse.d.ts.map +1 -0
- package/internal/parse.js +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/crypto-utils.d.mts +16 -0
- package/lib/crypto-utils.d.mts.map +1 -0
- package/lib/crypto-utils.d.ts +16 -0
- package/lib/crypto-utils.d.ts.map +1 -0
- package/lib/crypto-utils.js +35 -0
- package/lib/crypto-utils.js.map +1 -0
- package/lib/crypto-utils.mjs +32 -0
- package/lib/crypto-utils.mjs.map +1 -0
- package/lib/serialization-utils.d.mts +11 -0
- package/lib/serialization-utils.d.mts.map +1 -0
- package/lib/serialization-utils.d.ts +11 -0
- package/lib/serialization-utils.d.ts.map +1 -0
- package/lib/serialization-utils.js +45 -0
- package/lib/serialization-utils.js.map +1 -0
- package/lib/serialization-utils.mjs +42 -0
- package/lib/serialization-utils.mjs.map +1 -0
- package/lib/transformation-utils.d.mts +18 -0
- package/lib/transformation-utils.d.mts.map +1 -0
- package/lib/transformation-utils.d.ts +18 -0
- package/lib/transformation-utils.d.ts.map +1 -0
- package/lib/transformation-utils.js +110 -0
- package/lib/transformation-utils.js.map +1 -0
- package/lib/transformation-utils.mjs +106 -0
- package/lib/transformation-utils.mjs.map +1 -0
- package/package.json +150 -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/accounts/accounts.d.mts +18 -0
- package/resources/accounts/accounts.d.mts.map +1 -0
- package/resources/accounts/accounts.d.ts +18 -0
- package/resources/accounts/accounts.d.ts.map +1 -0
- package/resources/accounts/accounts.js +25 -0
- package/resources/accounts/accounts.js.map +1 -0
- package/resources/accounts/accounts.mjs +20 -0
- package/resources/accounts/accounts.mjs.map +1 -0
- package/resources/accounts/index.d.mts +5 -0
- package/resources/accounts/index.d.mts.map +1 -0
- package/resources/accounts/index.d.ts +5 -0
- package/resources/accounts/index.d.ts.map +1 -0
- package/resources/accounts/index.js +13 -0
- package/resources/accounts/index.js.map +1 -0
- package/resources/accounts/index.mjs +6 -0
- package/resources/accounts/index.mjs.map +1 -0
- package/resources/accounts/origins.d.mts +945 -0
- package/resources/accounts/origins.d.mts.map +1 -0
- package/resources/accounts/origins.d.ts +945 -0
- package/resources/accounts/origins.d.ts.map +1 -0
- package/resources/accounts/origins.js +95 -0
- package/resources/accounts/origins.js.map +1 -0
- package/resources/accounts/origins.mjs +91 -0
- package/resources/accounts/origins.mjs.map +1 -0
- package/resources/accounts/url-endpoints.d.mts +226 -0
- package/resources/accounts/url-endpoints.d.mts.map +1 -0
- package/resources/accounts/url-endpoints.d.ts +226 -0
- package/resources/accounts/url-endpoints.d.ts.map +1 -0
- package/resources/accounts/url-endpoints.js +84 -0
- package/resources/accounts/url-endpoints.js.map +1 -0
- package/resources/accounts/url-endpoints.mjs +80 -0
- package/resources/accounts/url-endpoints.mjs.map +1 -0
- package/resources/accounts/usage.d.mts +58 -0
- package/resources/accounts/usage.d.mts.map +1 -0
- package/resources/accounts/usage.d.ts +58 -0
- package/resources/accounts/usage.d.ts.map +1 -0
- package/resources/accounts/usage.js +26 -0
- package/resources/accounts/usage.js.map +1 -0
- package/resources/accounts/usage.mjs +22 -0
- package/resources/accounts/usage.mjs.map +1 -0
- package/resources/accounts.d.mts +2 -0
- package/resources/accounts.d.mts.map +1 -0
- package/resources/accounts.d.ts +2 -0
- package/resources/accounts.d.ts.map +1 -0
- package/resources/accounts.js +6 -0
- package/resources/accounts.js.map +1 -0
- package/resources/accounts.mjs +3 -0
- package/resources/accounts.mjs.map +1 -0
- package/resources/assets.d.mts +75 -0
- package/resources/assets.d.mts.map +1 -0
- package/resources/assets.d.ts +75 -0
- package/resources/assets.d.ts.map +1 -0
- package/resources/assets.js +18 -0
- package/resources/assets.js.map +1 -0
- package/resources/assets.mjs +14 -0
- package/resources/assets.mjs.map +1 -0
- package/resources/beta/beta.d.mts +10 -0
- package/resources/beta/beta.d.mts.map +1 -0
- package/resources/beta/beta.d.ts +10 -0
- package/resources/beta/beta.d.ts.map +1 -0
- package/resources/beta/beta.js +17 -0
- package/resources/beta/beta.js.map +1 -0
- package/resources/beta/beta.mjs +12 -0
- package/resources/beta/beta.mjs.map +1 -0
- package/resources/beta/index.d.mts +3 -0
- package/resources/beta/index.d.mts.map +1 -0
- package/resources/beta/index.d.ts +3 -0
- package/resources/beta/index.d.ts.map +1 -0
- package/resources/beta/index.js +9 -0
- package/resources/beta/index.js.map +1 -0
- package/resources/beta/index.mjs +4 -0
- package/resources/beta/index.mjs.map +1 -0
- package/resources/beta/v2/files.d.mts +460 -0
- package/resources/beta/v2/files.d.mts.map +1 -0
- package/resources/beta/v2/files.d.ts +460 -0
- package/resources/beta/v2/files.d.ts.map +1 -0
- package/resources/beta/v2/files.js +52 -0
- package/resources/beta/v2/files.js.map +1 -0
- package/resources/beta/v2/files.mjs +48 -0
- package/resources/beta/v2/files.mjs.map +1 -0
- package/resources/beta/v2/index.d.mts +3 -0
- package/resources/beta/v2/index.d.mts.map +1 -0
- package/resources/beta/v2/index.d.ts +3 -0
- package/resources/beta/v2/index.d.ts.map +1 -0
- package/resources/beta/v2/index.js +9 -0
- package/resources/beta/v2/index.js.map +1 -0
- package/resources/beta/v2/index.mjs +4 -0
- package/resources/beta/v2/index.mjs.map +1 -0
- package/resources/beta/v2/v2.d.mts +10 -0
- package/resources/beta/v2/v2.d.mts.map +1 -0
- package/resources/beta/v2/v2.d.ts +10 -0
- package/resources/beta/v2/v2.d.ts.map +1 -0
- package/resources/beta/v2/v2.js +17 -0
- package/resources/beta/v2/v2.js.map +1 -0
- package/resources/beta/v2/v2.mjs +12 -0
- package/resources/beta/v2/v2.mjs.map +1 -0
- package/resources/beta/v2.d.mts +2 -0
- package/resources/beta/v2.d.mts.map +1 -0
- package/resources/beta/v2.d.ts +2 -0
- package/resources/beta/v2.d.ts.map +1 -0
- package/resources/beta/v2.js +6 -0
- package/resources/beta/v2.js.map +1 -0
- package/resources/beta/v2.mjs +3 -0
- package/resources/beta/v2.mjs.map +1 -0
- package/resources/beta.d.mts +2 -0
- package/resources/beta.d.mts.map +1 -0
- package/resources/beta.d.ts +2 -0
- package/resources/beta.d.ts.map +1 -0
- package/resources/beta.js +6 -0
- package/resources/beta.js.map +1 -0
- package/resources/beta.mjs +3 -0
- package/resources/beta.mjs.map +1 -0
- package/resources/cache/cache.d.mts +10 -0
- package/resources/cache/cache.d.mts.map +1 -0
- package/resources/cache/cache.d.ts +10 -0
- package/resources/cache/cache.d.ts.map +1 -0
- package/resources/cache/cache.js +17 -0
- package/resources/cache/cache.js.map +1 -0
- package/resources/cache/cache.mjs +12 -0
- package/resources/cache/cache.mjs.map +1 -0
- package/resources/cache/index.d.mts +3 -0
- package/resources/cache/index.d.mts.map +1 -0
- package/resources/cache/index.d.ts +3 -0
- package/resources/cache/index.d.ts.map +1 -0
- package/resources/cache/index.js +9 -0
- package/resources/cache/index.js.map +1 -0
- package/resources/cache/index.mjs +4 -0
- package/resources/cache/index.mjs.map +1 -0
- package/resources/cache/invalidation.d.mts +54 -0
- package/resources/cache/invalidation.d.mts.map +1 -0
- package/resources/cache/invalidation.d.ts +54 -0
- package/resources/cache/invalidation.d.ts.map +1 -0
- package/resources/cache/invalidation.js +40 -0
- package/resources/cache/invalidation.js.map +1 -0
- package/resources/cache/invalidation.mjs +36 -0
- package/resources/cache/invalidation.mjs.map +1 -0
- package/resources/cache.d.mts +2 -0
- package/resources/cache.d.mts.map +1 -0
- package/resources/cache.d.ts +2 -0
- package/resources/cache.d.ts.map +1 -0
- package/resources/cache.js +6 -0
- package/resources/cache.js.map +1 -0
- package/resources/cache.mjs +3 -0
- package/resources/cache.mjs.map +1 -0
- package/resources/custom-metadata-fields.d.mts +274 -0
- package/resources/custom-metadata-fields.d.mts.map +1 -0
- package/resources/custom-metadata-fields.d.ts +274 -0
- package/resources/custom-metadata-fields.d.ts.map +1 -0
- package/resources/custom-metadata-fields.js +79 -0
- package/resources/custom-metadata-fields.js.map +1 -0
- package/resources/custom-metadata-fields.mjs +75 -0
- package/resources/custom-metadata-fields.mjs.map +1 -0
- package/resources/files/bulk.d.mts +137 -0
- package/resources/files/bulk.d.mts.map +1 -0
- package/resources/files/bulk.d.ts +137 -0
- package/resources/files/bulk.d.ts.map +1 -0
- package/resources/files/bulk.js +85 -0
- package/resources/files/bulk.js.map +1 -0
- package/resources/files/bulk.mjs +81 -0
- package/resources/files/bulk.mjs.map +1 -0
- package/resources/files/files.d.mts +1133 -0
- package/resources/files/files.d.mts.map +1 -0
- package/resources/files/files.d.ts +1133 -0
- package/resources/files/files.d.ts.map +1 -0
- package/resources/files/files.js +164 -0
- package/resources/files/files.js.map +1 -0
- package/resources/files/files.mjs +159 -0
- package/resources/files/files.mjs.map +1 -0
- package/resources/files/index.d.mts +5 -0
- package/resources/files/index.d.mts.map +1 -0
- package/resources/files/index.d.ts +5 -0
- package/resources/files/index.d.ts.map +1 -0
- package/resources/files/index.js +11 -0
- package/resources/files/index.js.map +1 -0
- package/resources/files/index.mjs +5 -0
- package/resources/files/index.mjs.map +1 -0
- package/resources/files/metadata.d.mts +42 -0
- package/resources/files/metadata.d.mts.map +1 -0
- package/resources/files/metadata.d.ts +42 -0
- package/resources/files/metadata.d.ts.map +1 -0
- package/resources/files/metadata.js +39 -0
- package/resources/files/metadata.js.map +1 -0
- package/resources/files/metadata.mjs +35 -0
- package/resources/files/metadata.mjs.map +1 -0
- package/resources/files/versions.d.mts +81 -0
- package/resources/files/versions.d.mts.map +1 -0
- package/resources/files/versions.d.ts +81 -0
- package/resources/files/versions.d.ts.map +1 -0
- package/resources/files/versions.js +68 -0
- package/resources/files/versions.js.map +1 -0
- package/resources/files/versions.mjs +64 -0
- package/resources/files/versions.mjs.map +1 -0
- package/resources/files.d.mts +2 -0
- package/resources/files.d.mts.map +1 -0
- package/resources/files.d.ts +2 -0
- package/resources/files.d.ts.map +1 -0
- package/resources/files.js +6 -0
- package/resources/files.js.map +1 -0
- package/resources/files.mjs +3 -0
- package/resources/files.mjs.map +1 -0
- package/resources/folders/folders.d.mts +203 -0
- package/resources/folders/folders.d.mts.map +1 -0
- package/resources/folders/folders.d.ts +203 -0
- package/resources/folders/folders.d.ts.map +1 -0
- package/resources/folders/folders.js +97 -0
- package/resources/folders/folders.js.map +1 -0
- package/resources/folders/folders.mjs +92 -0
- package/resources/folders/folders.mjs.map +1 -0
- package/resources/folders/index.d.mts +3 -0
- package/resources/folders/index.d.mts.map +1 -0
- package/resources/folders/index.d.ts +3 -0
- package/resources/folders/index.d.ts.map +1 -0
- package/resources/folders/index.js +9 -0
- package/resources/folders/index.js.map +1 -0
- package/resources/folders/index.mjs +4 -0
- package/resources/folders/index.mjs.map +1 -0
- package/resources/folders/job.d.mts +37 -0
- package/resources/folders/job.d.mts.map +1 -0
- package/resources/folders/job.d.ts +37 -0
- package/resources/folders/job.d.ts.map +1 -0
- package/resources/folders/job.js +21 -0
- package/resources/folders/job.js.map +1 -0
- package/resources/folders/job.mjs +17 -0
- package/resources/folders/job.mjs.map +1 -0
- package/resources/folders.d.mts +2 -0
- package/resources/folders.d.mts.map +1 -0
- package/resources/folders.d.ts +2 -0
- package/resources/folders.d.ts.map +1 -0
- package/resources/folders.js +6 -0
- package/resources/folders.js.map +1 -0
- package/resources/folders.mjs +3 -0
- package/resources/folders.mjs.map +1 -0
- package/resources/helper.d.mts +42 -0
- package/resources/helper.d.mts.map +1 -0
- package/resources/helper.d.ts +42 -0
- package/resources/helper.d.ts.map +1 -0
- package/resources/helper.js +402 -0
- package/resources/helper.js.map +1 -0
- package/resources/helper.mjs +397 -0
- package/resources/helper.mjs.map +1 -0
- package/resources/index.d.mts +11 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +11 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +25 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +12 -0
- package/resources/index.mjs.map +1 -0
- package/resources/shared.d.mts +817 -0
- package/resources/shared.d.mts.map +1 -0
- package/resources/shared.d.ts +817 -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/webhooks.d.mts +811 -0
- package/resources/webhooks.d.mts.map +1 -0
- package/resources/webhooks.d.ts +811 -0
- package/resources/webhooks.d.ts.map +1 -0
- package/resources/webhooks.js +24 -0
- package/resources/webhooks.js.map +1 -0
- package/resources/webhooks.mjs +20 -0
- package/resources/webhooks.mjs.map +1 -0
- package/resources.d.mts +2 -0
- package/resources.d.mts.map +1 -0
- package/resources.d.ts +2 -0
- package/resources.d.ts.map +1 -0
- package/resources.js +5 -0
- package/resources.js.map +1 -0
- package/resources.mjs +2 -0
- package/resources.mjs.map +1 -0
- package/src/api-promise.ts +2 -0
- package/src/client.ts +929 -0
- package/src/core/README.md +3 -0
- package/src/core/api-promise.ts +92 -0
- package/src/core/error.ts +130 -0
- package/src/core/resource.ts +11 -0
- package/src/core/uploads.ts +2 -0
- package/src/error.ts +2 -0
- package/src/index.ts +22 -0
- package/src/internal/README.md +3 -0
- package/src/internal/builtin-types.ts +93 -0
- package/src/internal/detect-platform.ts +196 -0
- package/src/internal/errors.ts +33 -0
- package/src/internal/headers.ts +97 -0
- package/src/internal/parse.ts +50 -0
- package/src/internal/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/lib/crypto-utils.ts +37 -0
- package/src/lib/serialization-utils.ts +42 -0
- package/src/lib/transformation-utils.ts +117 -0
- package/src/resource.ts +2 -0
- package/src/resources/accounts/accounts.ts +55 -0
- package/src/resources/accounts/index.ts +20 -0
- package/src/resources/accounts/origins.ts +1250 -0
- package/src/resources/accounts/url-endpoints.ts +298 -0
- package/src/resources/accounts/usage.ts +70 -0
- package/src/resources/accounts.ts +3 -0
- package/src/resources/assets.ts +105 -0
- package/src/resources/beta/beta.ts +15 -0
- package/src/resources/beta/index.ts +4 -0
- package/src/resources/beta/v2/files.ts +546 -0
- package/src/resources/beta/v2/index.ts +4 -0
- package/src/resources/beta/v2/v2.ts +19 -0
- package/src/resources/beta/v2.ts +3 -0
- package/src/resources/beta.ts +3 -0
- package/src/resources/cache/cache.ts +25 -0
- package/src/resources/cache/index.ts +9 -0
- package/src/resources/cache/invalidation.ts +70 -0
- package/src/resources/cache.ts +3 -0
- package/src/resources/custom-metadata-fields.ts +337 -0
- package/src/resources/files/bulk.ts +171 -0
- package/src/resources/files/files.ts +1430 -0
- package/src/resources/files/index.ts +39 -0
- package/src/resources/files/metadata.ts +52 -0
- package/src/resources/files/versions.ts +117 -0
- package/src/resources/files.ts +3 -0
- package/src/resources/folders/folders.ts +249 -0
- package/src/resources/folders/index.ts +16 -0
- package/src/resources/folders/job.ts +47 -0
- package/src/resources/folders.ts +3 -0
- package/src/resources/helper.ts +462 -0
- package/src/resources/index.ts +60 -0
- package/src/resources/shared.ts +952 -0
- package/src/resources/webhooks.ts +999 -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,952 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export interface BaseOverlay {
|
|
4
|
+
position?: OverlayPosition;
|
|
5
|
+
|
|
6
|
+
timing?: OverlayTiming;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Array of extensions to be applied to the asset. Each extension can be configured
|
|
11
|
+
* with specific parameters based on the extension type.
|
|
12
|
+
*/
|
|
13
|
+
export type Extensions = Array<
|
|
14
|
+
Extensions.RemoveBg | Extensions.AutoTaggingExtension | Extensions.AIAutoDescription
|
|
15
|
+
>;
|
|
16
|
+
|
|
17
|
+
export namespace Extensions {
|
|
18
|
+
export interface RemoveBg {
|
|
19
|
+
/**
|
|
20
|
+
* Specifies the background removal extension.
|
|
21
|
+
*/
|
|
22
|
+
name: 'remove-bg';
|
|
23
|
+
|
|
24
|
+
options?: RemoveBg.Options;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export namespace RemoveBg {
|
|
28
|
+
export interface Options {
|
|
29
|
+
/**
|
|
30
|
+
* Whether to add an artificial shadow to the result. Default is false. Note:
|
|
31
|
+
* Adding shadows is currently only supported for car photos.
|
|
32
|
+
*/
|
|
33
|
+
add_shadow?: boolean;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Specifies a solid color background using hex code (e.g., "81d4fa", "fff") or
|
|
37
|
+
* color name (e.g., "green"). If this parameter is set, `bg_image_url` must be
|
|
38
|
+
* empty.
|
|
39
|
+
*/
|
|
40
|
+
bg_color?: string;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Sets a background image from a URL. If this parameter is set, `bg_color` must be
|
|
44
|
+
* empty.
|
|
45
|
+
*/
|
|
46
|
+
bg_image_url?: string;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Allows semi-transparent regions in the result. Default is true. Note:
|
|
50
|
+
* Semitransparency is currently only supported for car windows.
|
|
51
|
+
*/
|
|
52
|
+
semitransparency?: boolean;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface AutoTaggingExtension {
|
|
57
|
+
/**
|
|
58
|
+
* Maximum number of tags to attach to the asset.
|
|
59
|
+
*/
|
|
60
|
+
maxTags: number;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Minimum confidence level for tags to be considered valid.
|
|
64
|
+
*/
|
|
65
|
+
minConfidence: number;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Specifies the auto-tagging extension used.
|
|
69
|
+
*/
|
|
70
|
+
name: 'google-auto-tagging' | 'aws-auto-tagging';
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface AIAutoDescription {
|
|
74
|
+
/**
|
|
75
|
+
* Specifies the auto description extension.
|
|
76
|
+
*/
|
|
77
|
+
name: 'ai-auto-description';
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface ImageOverlay extends BaseOverlay {
|
|
82
|
+
/**
|
|
83
|
+
* Specifies the relative path to the image used as an overlay.
|
|
84
|
+
*/
|
|
85
|
+
input: string;
|
|
86
|
+
|
|
87
|
+
type: 'image';
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* The input path can be included in the layer as either `i-{input}` or
|
|
91
|
+
* `ie-{base64_encoded_input}`. By default, the SDK determines the appropriate
|
|
92
|
+
* format automatically. To always use base64 encoding (`ie-{base64}`), set this
|
|
93
|
+
* parameter to `base64`. To always use plain text (`i-{input}`), set it to
|
|
94
|
+
* `plain`.
|
|
95
|
+
*/
|
|
96
|
+
encoding?: 'auto' | 'plain' | 'base64';
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Array of transformations to be applied to the overlay image. Supported
|
|
100
|
+
* transformations depends on the base/parent asset. See overlays on
|
|
101
|
+
* [Images](https://imagekit.io/docs/add-overlays-on-images#list-of-supported-image-transformations-in-image-layers)
|
|
102
|
+
* and
|
|
103
|
+
* [Videos](https://imagekit.io/docs/add-overlays-on-videos#list-of-transformations-supported-on-image-overlay).
|
|
104
|
+
*/
|
|
105
|
+
transformation?: Array<Transformation>;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Specifies an overlay to be applied on the parent image or video. ImageKit
|
|
110
|
+
* supports overlays including images, text, videos, subtitles, and solid colors.
|
|
111
|
+
* See
|
|
112
|
+
* [Overlay using layers](https://imagekit.io/docs/transformations#overlay-using-layers).
|
|
113
|
+
*/
|
|
114
|
+
export type Overlay = TextOverlay | ImageOverlay | VideoOverlay | SubtitleOverlay | SolidColorOverlay;
|
|
115
|
+
|
|
116
|
+
export interface OverlayPosition {
|
|
117
|
+
/**
|
|
118
|
+
* Specifies the position of the overlay relative to the parent image or video.
|
|
119
|
+
* Maps to `lfo` in the URL.
|
|
120
|
+
*/
|
|
121
|
+
focus?:
|
|
122
|
+
| 'center'
|
|
123
|
+
| 'top'
|
|
124
|
+
| 'left'
|
|
125
|
+
| 'bottom'
|
|
126
|
+
| 'right'
|
|
127
|
+
| 'top_left'
|
|
128
|
+
| 'top_right'
|
|
129
|
+
| 'bottom_left'
|
|
130
|
+
| 'bottom_right';
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Specifies the x-coordinate of the top-left corner of the base asset where the
|
|
134
|
+
* overlay's top-left corner will be positioned. It also accepts arithmetic
|
|
135
|
+
* expressions such as `bw_mul_0.4` or `bw_sub_cw`. Maps to `lx` in the URL. Learn
|
|
136
|
+
* about
|
|
137
|
+
* [Arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations).
|
|
138
|
+
*/
|
|
139
|
+
x?: number | string;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Specifies the y-coordinate of the top-left corner of the base asset where the
|
|
143
|
+
* overlay's top-left corner will be positioned. It also accepts arithmetic
|
|
144
|
+
* expressions such as `bh_mul_0.4` or `bh_sub_ch`. Maps to `ly` in the URL. Learn
|
|
145
|
+
* about
|
|
146
|
+
* [Arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations).
|
|
147
|
+
*/
|
|
148
|
+
y?: number | string;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export interface OverlayTiming {
|
|
152
|
+
/**
|
|
153
|
+
* Specifies the duration (in seconds) during which the overlay should appear on
|
|
154
|
+
* the base video. Accepts a positive number up to two decimal places (e.g., `20`
|
|
155
|
+
* or `20.50`) and arithmetic expressions such as `bdu_mul_0.4` or `bdu_sub_idu`.
|
|
156
|
+
* Applies only if the base asset is a video. Maps to `ldu` in the URL.
|
|
157
|
+
*/
|
|
158
|
+
duration?: number | string;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Specifies the end time (in seconds) for when the overlay should disappear from
|
|
162
|
+
* the base video. If both end and duration are provided, duration is ignored.
|
|
163
|
+
* Accepts a positive number up to two decimal places (e.g., `20` or `20.50`) and
|
|
164
|
+
* arithmetic expressions such as `bdu_mul_0.4` or `bdu_sub_idu`. Applies only if
|
|
165
|
+
* the base asset is a video. Maps to `leo` in the URL.
|
|
166
|
+
*/
|
|
167
|
+
end?: number | string;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Specifies the start time (in seconds) for when the overlay should appear on the
|
|
171
|
+
* base video. Accepts a positive number up to two decimal places (e.g., `20` or
|
|
172
|
+
* `20.50`) and arithmetic expressions such as `bdu_mul_0.4` or `bdu_sub_idu`.
|
|
173
|
+
* Applies only if the base asset is a video. Maps to `lso` in the URL.
|
|
174
|
+
*/
|
|
175
|
+
start?: number | string;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export interface SolidColorOverlay extends BaseOverlay {
|
|
179
|
+
/**
|
|
180
|
+
* Specifies the color of the block using an RGB hex code (e.g., `FF0000`), an RGBA
|
|
181
|
+
* code (e.g., `FFAABB50`), or a color name (e.g., `red`). If an 8-character value
|
|
182
|
+
* is provided, the last two characters represent the opacity level (from `00` for
|
|
183
|
+
* 0.00 to `99` for 0.99).
|
|
184
|
+
*/
|
|
185
|
+
color: string;
|
|
186
|
+
|
|
187
|
+
type: 'solidColor';
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Control width and height of the solid color overlay. Supported transformations
|
|
191
|
+
* depend on the base/parent asset. See overlays on
|
|
192
|
+
* [Images](https://imagekit.io/docs/add-overlays-on-images#apply-transformation-on-solid-color-overlay)
|
|
193
|
+
* and
|
|
194
|
+
* [Videos](https://imagekit.io/docs/add-overlays-on-videos#apply-transformations-on-solid-color-block-overlay).
|
|
195
|
+
*/
|
|
196
|
+
transformation?: Array<SolidColorOverlayTransformation>;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export interface SolidColorOverlayTransformation {
|
|
200
|
+
/**
|
|
201
|
+
* Specifies the transparency level of the solid color overlay. Accepts integers
|
|
202
|
+
* from `1` to `9`.
|
|
203
|
+
*/
|
|
204
|
+
alpha?: number;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Specifies the background color of the solid color overlay. Accepts an RGB hex
|
|
208
|
+
* code (e.g., `FF0000`), an RGBA code (e.g., `FFAABB50`), or a color name.
|
|
209
|
+
*/
|
|
210
|
+
background?: string;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Creates a linear gradient with two colors. Pass `true` for a default gradient,
|
|
214
|
+
* or provide a string for a custom gradient. Only works if the base asset is an
|
|
215
|
+
* image. See
|
|
216
|
+
* [gradient](https://imagekit.io/docs/effects-and-enhancements#gradient---e-gradient).
|
|
217
|
+
*/
|
|
218
|
+
gradient?: true | string;
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Controls the height of the solid color overlay. Accepts a numeric value or an
|
|
222
|
+
* arithmetic expression. Learn about
|
|
223
|
+
* [arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations).
|
|
224
|
+
*/
|
|
225
|
+
height?: number | string;
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Specifies the corner radius of the solid color overlay. Set to `max` for
|
|
229
|
+
* circular or oval shape. See
|
|
230
|
+
* [radius](https://imagekit.io/docs/effects-and-enhancements#radius---r).
|
|
231
|
+
*/
|
|
232
|
+
radius?: number | 'max';
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Controls the width of the solid color overlay. Accepts a numeric value or an
|
|
236
|
+
* arithmetic expression (e.g., `bw_mul_0.2` or `bh_div_2`). Learn about
|
|
237
|
+
* [arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations).
|
|
238
|
+
*/
|
|
239
|
+
width?: number | string;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Options for generating ImageKit URLs with transformations. See the
|
|
244
|
+
* [Transformations guide](https://imagekit.io/docs/transformations).
|
|
245
|
+
*/
|
|
246
|
+
export interface SrcOptions {
|
|
247
|
+
/**
|
|
248
|
+
* Accepts a relative or absolute path of the resource. If a relative path is
|
|
249
|
+
* provided, it is appended to the `urlEndpoint`. If an absolute path is provided,
|
|
250
|
+
* `urlEndpoint` is ignored.
|
|
251
|
+
*/
|
|
252
|
+
src: string;
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Get your urlEndpoint from the
|
|
256
|
+
* [ImageKit dashboard](https://imagekit.io/dashboard/url-endpoints).
|
|
257
|
+
*/
|
|
258
|
+
urlEndpoint: string;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* When you want the signed URL to expire, specified in seconds. If `expiresIn` is
|
|
262
|
+
* anything above 0, the URL will always be signed even if `signed` is set to
|
|
263
|
+
* false. If not specified and `signed` is `true`, the signed URL will not expire
|
|
264
|
+
* (valid indefinitely).
|
|
265
|
+
*
|
|
266
|
+
* Example: Setting `expiresIn: 3600` will make the URL expire 1 hour from
|
|
267
|
+
* generation time. After the expiry time, the signed URL will no longer be valid
|
|
268
|
+
* and ImageKit will return a 401 Unauthorized status code.
|
|
269
|
+
*
|
|
270
|
+
* [Learn more](https://imagekit.io/docs/media-delivery-basic-security#how-to-generate-signed-urls).
|
|
271
|
+
*/
|
|
272
|
+
expiresIn?: number;
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* These are additional query parameters that you want to add to the final URL.
|
|
276
|
+
* They can be any query parameters and not necessarily related to ImageKit. This
|
|
277
|
+
* is especially useful if you want to add a versioning parameter to your URLs.
|
|
278
|
+
*/
|
|
279
|
+
queryParameters?: { [key: string]: string };
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Whether to sign the URL or not. Set this to `true` if you want to generate a
|
|
283
|
+
* signed URL. If `signed` is `true` and `expiresIn` is not specified, the signed
|
|
284
|
+
* URL will not expire (valid indefinitely). Note: If `expiresIn` is set to any
|
|
285
|
+
* value above 0, the URL will always be signed regardless of this setting.
|
|
286
|
+
* [Learn more](https://imagekit.io/docs/media-delivery-basic-security#how-to-generate-signed-urls).
|
|
287
|
+
*/
|
|
288
|
+
signed?: boolean;
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* An array of objects specifying the transformations to be applied in the URL. If
|
|
292
|
+
* more than one transformation is specified, they are applied in the order they
|
|
293
|
+
* are specified as chained transformations. See
|
|
294
|
+
* [Chained transformations](https://imagekit.io/docs/transformations#chained-transformations).
|
|
295
|
+
*/
|
|
296
|
+
transformation?: Array<Transformation>;
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* By default, the transformation string is added as a query parameter in the URL,
|
|
300
|
+
* e.g., `?tr=w-100,h-100`. If you want to add the transformation string in the
|
|
301
|
+
* path of the URL, set this to `path`. Learn more in the
|
|
302
|
+
* [Transformations guide](https://imagekit.io/docs/transformations).
|
|
303
|
+
*/
|
|
304
|
+
transformationPosition?: TransformationPosition;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Available streaming resolutions for
|
|
309
|
+
* [adaptive bitrate streaming](https://imagekit.io/docs/adaptive-bitrate-streaming)
|
|
310
|
+
*/
|
|
311
|
+
export type StreamingResolution = '240' | '360' | '480' | '720' | '1080' | '1440' | '2160';
|
|
312
|
+
|
|
313
|
+
export interface SubtitleOverlay extends BaseOverlay {
|
|
314
|
+
/**
|
|
315
|
+
* Specifies the relative path to the subtitle file used as an overlay.
|
|
316
|
+
*/
|
|
317
|
+
input: string;
|
|
318
|
+
|
|
319
|
+
type: 'subtitle';
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* The input path can be included in the layer as either `i-{input}` or
|
|
323
|
+
* `ie-{base64_encoded_input}`. By default, the SDK determines the appropriate
|
|
324
|
+
* format automatically. To always use base64 encoding (`ie-{base64}`), set this
|
|
325
|
+
* parameter to `base64`. To always use plain text (`i-{input}`), set it to
|
|
326
|
+
* `plain`.
|
|
327
|
+
*/
|
|
328
|
+
encoding?: 'auto' | 'plain' | 'base64';
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Control styling of the subtitle. See
|
|
332
|
+
* [Styling subtitles](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer).
|
|
333
|
+
*/
|
|
334
|
+
transformation?: Array<SubtitleOverlayTransformation>;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* Subtitle styling options.
|
|
339
|
+
* [Learn more](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer)
|
|
340
|
+
* from the docs.
|
|
341
|
+
*/
|
|
342
|
+
export interface SubtitleOverlayTransformation {
|
|
343
|
+
/**
|
|
344
|
+
* Specifies the subtitle background color using a standard color name, an RGB
|
|
345
|
+
* color code (e.g., FF0000), or an RGBA color code (e.g., FFAABB50).
|
|
346
|
+
*
|
|
347
|
+
* [Subtitle styling options](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer)
|
|
348
|
+
*/
|
|
349
|
+
background?: string;
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* Sets the font color of the subtitle text using a standard color name, an RGB
|
|
353
|
+
* color code (e.g., FF0000), or an RGBA color code (e.g., FFAABB50).
|
|
354
|
+
*
|
|
355
|
+
* [Subtitle styling options](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer)
|
|
356
|
+
*/
|
|
357
|
+
color?: string;
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* Font family for subtitles. Refer to the
|
|
361
|
+
* [supported fonts](https://imagekit.io/docs/add-overlays-on-images#supported-text-font-list).
|
|
362
|
+
*/
|
|
363
|
+
fontFamily?: string;
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* Sets the font outline of the subtitle text. Requires the outline width (an
|
|
367
|
+
* integer) and the outline color (as an RGB color code, RGBA color code, or
|
|
368
|
+
* standard web color name) separated by an underscore. Example: `fol-2_blue`
|
|
369
|
+
* (outline width of 2px and outline color blue), `fol-2_A1CCDD` (outline width of
|
|
370
|
+
* 2px and outline color `#A1CCDD`) and `fol-2_A1CCDD50` (outline width of 2px and
|
|
371
|
+
* outline color `#A1CCDD` at 50% opacity).
|
|
372
|
+
*
|
|
373
|
+
* [Subtitle styling options](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer)
|
|
374
|
+
*/
|
|
375
|
+
fontOutline?: string;
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* Sets the font shadow for the subtitle text. Requires the shadow color (as an RGB
|
|
379
|
+
* color code, RGBA color code, or standard web color name) and shadow indent (an
|
|
380
|
+
* integer) separated by an underscore. Example: `fsh-blue_2` (shadow color blue,
|
|
381
|
+
* indent of 2px), `fsh-A1CCDD_3` (shadow color `#A1CCDD`, indent of 3px),
|
|
382
|
+
* `fsh-A1CCDD50_3` (shadow color `#A1CCDD` at 50% opacity, indent of 3px).
|
|
383
|
+
*
|
|
384
|
+
* [Subtitle styling options](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer)
|
|
385
|
+
*/
|
|
386
|
+
fontShadow?: string;
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* Sets the font size of subtitle text.
|
|
390
|
+
*
|
|
391
|
+
* [Subtitle styling options](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer)
|
|
392
|
+
*/
|
|
393
|
+
fontSize?: number;
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* Sets the typography style of the subtitle text. Supports values are `b` for
|
|
397
|
+
* bold, `i` for italics, and `b_i` for bold with italics.
|
|
398
|
+
*
|
|
399
|
+
* [Subtitle styling options](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer)
|
|
400
|
+
*/
|
|
401
|
+
typography?: 'b' | 'i' | 'b_i';
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
export interface TextOverlay extends BaseOverlay {
|
|
405
|
+
/**
|
|
406
|
+
* Specifies the text to be displayed in the overlay. The SDK automatically handles
|
|
407
|
+
* special characters and encoding.
|
|
408
|
+
*/
|
|
409
|
+
text: string;
|
|
410
|
+
|
|
411
|
+
type: 'text';
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* Text can be included in the layer as either `i-{input}` (plain text) or
|
|
415
|
+
* `ie-{base64_encoded_input}` (base64). By default, the SDK selects the
|
|
416
|
+
* appropriate format based on the input text. To always use base64
|
|
417
|
+
* (`ie-{base64}`), set this parameter to `base64`. To always use plain text
|
|
418
|
+
* (`i-{input}`), set it to `plain`.
|
|
419
|
+
*/
|
|
420
|
+
encoding?: 'auto' | 'plain' | 'base64';
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* Control styling of the text overlay. See
|
|
424
|
+
* [Text overlays](https://imagekit.io/docs/add-overlays-on-images#text-overlay).
|
|
425
|
+
*/
|
|
426
|
+
transformation?: Array<TextOverlayTransformation>;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
export interface TextOverlayTransformation {
|
|
430
|
+
/**
|
|
431
|
+
* Specifies the transparency level of the text overlay. Accepts integers from `1`
|
|
432
|
+
* to `9`.
|
|
433
|
+
*/
|
|
434
|
+
alpha?: number;
|
|
435
|
+
|
|
436
|
+
/**
|
|
437
|
+
* Specifies the background color of the text overlay. Accepts an RGB hex code, an
|
|
438
|
+
* RGBA code, or a color name.
|
|
439
|
+
*/
|
|
440
|
+
background?: string;
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* Flip the text overlay horizontally, vertically, or both.
|
|
444
|
+
*/
|
|
445
|
+
flip?: 'h' | 'v' | 'h_v' | 'v_h';
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* Specifies the font color of the overlaid text. Accepts an RGB hex code (e.g.,
|
|
449
|
+
* `FF0000`), an RGBA code (e.g., `FFAABB50`), or a color name.
|
|
450
|
+
*/
|
|
451
|
+
fontColor?: string;
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* Specifies the font family of the overlaid text. Choose from the supported fonts
|
|
455
|
+
* list or use a custom font. See
|
|
456
|
+
* [Supported fonts](https://imagekit.io/docs/add-overlays-on-images#supported-text-font-list)
|
|
457
|
+
* and
|
|
458
|
+
* [Custom font](https://imagekit.io/docs/add-overlays-on-images#change-font-family-in-text-overlay).
|
|
459
|
+
*/
|
|
460
|
+
fontFamily?: string;
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* Specifies the font size of the overlaid text. Accepts a numeric value or an
|
|
464
|
+
* arithmetic expression.
|
|
465
|
+
*/
|
|
466
|
+
fontSize?: number | string;
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* Specifies the inner alignment of the text when width is more than the text
|
|
470
|
+
* length.
|
|
471
|
+
*/
|
|
472
|
+
innerAlignment?: 'left' | 'right' | 'center';
|
|
473
|
+
|
|
474
|
+
/**
|
|
475
|
+
* Specifies the line height of the text overlay. Accepts integer values
|
|
476
|
+
* representing line height in points. It can also accept
|
|
477
|
+
* [arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations)
|
|
478
|
+
* such as `bw_mul_0.2`, or `bh_div_20`.
|
|
479
|
+
*/
|
|
480
|
+
lineHeight?: number | string;
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* Specifies the padding around the overlaid text. Can be provided as a single
|
|
484
|
+
* positive integer or multiple values separated by underscores (following CSS
|
|
485
|
+
* shorthand order). Arithmetic expressions are also accepted.
|
|
486
|
+
*/
|
|
487
|
+
padding?: number | string;
|
|
488
|
+
|
|
489
|
+
/**
|
|
490
|
+
* Specifies the corner radius of the text overlay. Set to `max` to achieve a
|
|
491
|
+
* circular or oval shape.
|
|
492
|
+
*/
|
|
493
|
+
radius?: number | 'max';
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* Specifies the rotation angle of the text overlay. Accepts a numeric value for
|
|
497
|
+
* clockwise rotation or a string prefixed with "N" for counter-clockwise rotation.
|
|
498
|
+
*/
|
|
499
|
+
rotation?: number | string;
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* Specifies the typography style of the text. Supported values:
|
|
503
|
+
*
|
|
504
|
+
* - Single styles: `b` (bold), `i` (italic), `strikethrough`.
|
|
505
|
+
* - Combinations: Any combination separated by underscores, e.g., `b_i`,
|
|
506
|
+
* `b_i_strikethrough`.
|
|
507
|
+
*/
|
|
508
|
+
typography?: string;
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* Specifies the maximum width (in pixels) of the overlaid text. The text wraps
|
|
512
|
+
* automatically, and arithmetic expressions (e.g., `bw_mul_0.2` or `bh_div_2`) are
|
|
513
|
+
* supported. Useful when used in conjunction with the `background`. Learn about
|
|
514
|
+
* [Arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations).
|
|
515
|
+
*/
|
|
516
|
+
width?: number | string;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* The SDK provides easy-to-use names for transformations. These names are
|
|
521
|
+
* converted to the corresponding transformation string before being added to the
|
|
522
|
+
* URL. SDKs are updated regularly to support new transformations. If you want to
|
|
523
|
+
* use a transformation that is not supported by the SDK, You can use the `raw`
|
|
524
|
+
* parameter to pass the transformation string directly. See the
|
|
525
|
+
* [Transformations documentation](https://imagekit.io/docs/transformations).
|
|
526
|
+
*/
|
|
527
|
+
export interface Transformation {
|
|
528
|
+
/**
|
|
529
|
+
* Uses AI to change the background. Provide a text prompt or a base64-encoded
|
|
530
|
+
* prompt, e.g., `prompt-snow road` or `prompte-[urlencoded_base64_encoded_text]`.
|
|
531
|
+
* Not supported inside overlay. See
|
|
532
|
+
* [AI Change Background](https://imagekit.io/docs/ai-transformations#change-background-e-changebg).
|
|
533
|
+
*/
|
|
534
|
+
aiChangeBackground?: string;
|
|
535
|
+
|
|
536
|
+
/**
|
|
537
|
+
* Adds an AI-based drop shadow around a foreground object on a transparent or
|
|
538
|
+
* removed background. Optionally, control the direction, elevation, and saturation
|
|
539
|
+
* of the light source (e.g., `az-45` to change light direction). Pass `true` for
|
|
540
|
+
* the default drop shadow, or provide a string for a custom drop shadow. Supported
|
|
541
|
+
* inside overlay. See
|
|
542
|
+
* [AI Drop Shadow](https://imagekit.io/docs/ai-transformations#ai-drop-shadow-e-dropshadow).
|
|
543
|
+
*/
|
|
544
|
+
aiDropShadow?: true | string;
|
|
545
|
+
|
|
546
|
+
/**
|
|
547
|
+
* Uses AI to edit images based on a text prompt. Provide a text prompt or a
|
|
548
|
+
* base64-encoded prompt, e.g., `prompt-snow road` or
|
|
549
|
+
* `prompte-[urlencoded_base64_encoded_text]`. Not supported inside overlay.
|
|
550
|
+
* See [AI Edit](https://imagekit.io/docs/ai-transformations#edit-image-e-edit).
|
|
551
|
+
*/
|
|
552
|
+
aiEdit?: string;
|
|
553
|
+
|
|
554
|
+
/**
|
|
555
|
+
* Applies ImageKit's in-house background removal. Supported inside overlay. See
|
|
556
|
+
* [AI Background Removal](https://imagekit.io/docs/ai-transformations#imagekit-background-removal-e-bgremove).
|
|
557
|
+
*/
|
|
558
|
+
aiRemoveBackground?: true;
|
|
559
|
+
|
|
560
|
+
/**
|
|
561
|
+
* Uses third-party background removal. Note: It is recommended to use
|
|
562
|
+
* aiRemoveBackground, ImageKit's in-house solution, which is more cost-effective.
|
|
563
|
+
* Supported inside overlay. See
|
|
564
|
+
* [External Background Removal](https://imagekit.io/docs/ai-transformations#background-removal-e-removedotbg).
|
|
565
|
+
*/
|
|
566
|
+
aiRemoveBackgroundExternal?: true;
|
|
567
|
+
|
|
568
|
+
/**
|
|
569
|
+
* Performs AI-based retouching to improve faces or product shots. Not supported
|
|
570
|
+
* inside overlay. See
|
|
571
|
+
* [AI Retouch](https://imagekit.io/docs/ai-transformations#retouch-e-retouch).
|
|
572
|
+
*/
|
|
573
|
+
aiRetouch?: true;
|
|
574
|
+
|
|
575
|
+
/**
|
|
576
|
+
* Upscales images beyond their original dimensions using AI. Not supported inside
|
|
577
|
+
* overlay. See
|
|
578
|
+
* [AI Upscale](https://imagekit.io/docs/ai-transformations#upscale-e-upscale).
|
|
579
|
+
*/
|
|
580
|
+
aiUpscale?: true;
|
|
581
|
+
|
|
582
|
+
/**
|
|
583
|
+
* Generates a variation of an image using AI. This produces a new image with
|
|
584
|
+
* slight variations from the original, such as changes in color, texture, and
|
|
585
|
+
* other visual elements, while preserving the structure and essence of the
|
|
586
|
+
* original image. Not supported inside overlay. See
|
|
587
|
+
* [AI Generate Variations](https://imagekit.io/docs/ai-transformations#generate-variations-of-an-image-e-genvar).
|
|
588
|
+
*/
|
|
589
|
+
aiVariation?: true;
|
|
590
|
+
|
|
591
|
+
/**
|
|
592
|
+
* Specifies the aspect ratio for the output, e.g., "ar-4-3". Typically used with
|
|
593
|
+
* either width or height (but not both). For example: aspectRatio = `4:3`, `4_3`,
|
|
594
|
+
* or an expression like `iar_div_2`. See
|
|
595
|
+
* [Image resize and crop – Aspect ratio](https://imagekit.io/docs/image-resize-and-crop#aspect-ratio---ar).
|
|
596
|
+
*/
|
|
597
|
+
aspectRatio?: number | string;
|
|
598
|
+
|
|
599
|
+
/**
|
|
600
|
+
* Specifies the audio codec, e.g., `aac`, `opus`, or `none`. See
|
|
601
|
+
* [Audio codec](https://imagekit.io/docs/video-optimization#audio-codec---ac).
|
|
602
|
+
*/
|
|
603
|
+
audioCodec?: 'aac' | 'opus' | 'none';
|
|
604
|
+
|
|
605
|
+
/**
|
|
606
|
+
* Specifies the background to be used in conjunction with certain cropping
|
|
607
|
+
* strategies when resizing an image.
|
|
608
|
+
*
|
|
609
|
+
* - A solid color: e.g., `red`, `F3F3F3`, `AAFF0010`. See
|
|
610
|
+
* [Solid color background](https://imagekit.io/docs/effects-and-enhancements#solid-color-background).
|
|
611
|
+
* - A blurred background: e.g., `blurred`, `blurred_25_N15`, etc. See
|
|
612
|
+
* [Blurred background](https://imagekit.io/docs/effects-and-enhancements#blurred-background).
|
|
613
|
+
* - Expand the image boundaries using generative fill: `genfill`. Not supported
|
|
614
|
+
* inside overlay. Optionally, control the background scene by passing a text
|
|
615
|
+
* prompt: `genfill[:-prompt-${text}]` or
|
|
616
|
+
* `genfill[:-prompte-${urlencoded_base64_encoded_text}]`. See
|
|
617
|
+
* [Generative fill background](https://imagekit.io/docs/ai-transformations#generative-fill-bg-genfill).
|
|
618
|
+
*/
|
|
619
|
+
background?: string;
|
|
620
|
+
|
|
621
|
+
/**
|
|
622
|
+
* Specifies the Gaussian blur level. Accepts an integer value between 1 and 100,
|
|
623
|
+
* or an expression like `bl-10`. See
|
|
624
|
+
* [Blur](https://imagekit.io/docs/effects-and-enhancements#blur---bl).
|
|
625
|
+
*/
|
|
626
|
+
blur?: number;
|
|
627
|
+
|
|
628
|
+
/**
|
|
629
|
+
* Adds a border to the output media. Accepts a string in the format
|
|
630
|
+
* `<border-width>_<hex-code>` (e.g., `5_FFF000` for a 5px yellow border), or an
|
|
631
|
+
* expression like `ih_div_20_FF00FF`. See
|
|
632
|
+
* [Border](https://imagekit.io/docs/effects-and-enhancements#border---b).
|
|
633
|
+
*/
|
|
634
|
+
border?: string;
|
|
635
|
+
|
|
636
|
+
/**
|
|
637
|
+
* Indicates whether the output image should retain the original color profile. See
|
|
638
|
+
* [Color profile](https://imagekit.io/docs/image-optimization#color-profile---cp).
|
|
639
|
+
*/
|
|
640
|
+
colorProfile?: boolean;
|
|
641
|
+
|
|
642
|
+
/**
|
|
643
|
+
* Automatically enhances the contrast of an image (contrast stretch). See
|
|
644
|
+
* [Contrast Stretch](https://imagekit.io/docs/effects-and-enhancements#contrast-stretch---e-contrast).
|
|
645
|
+
*/
|
|
646
|
+
contrastStretch?: true;
|
|
647
|
+
|
|
648
|
+
/**
|
|
649
|
+
* Crop modes for image resizing. See
|
|
650
|
+
* [Crop modes & focus](https://imagekit.io/docs/image-resize-and-crop#crop-crop-modes--focus).
|
|
651
|
+
*/
|
|
652
|
+
crop?: 'force' | 'at_max' | 'at_max_enlarge' | 'at_least' | 'maintain_ratio';
|
|
653
|
+
|
|
654
|
+
/**
|
|
655
|
+
* Additional crop modes for image resizing. See
|
|
656
|
+
* [Crop modes & focus](https://imagekit.io/docs/image-resize-and-crop#crop-crop-modes--focus).
|
|
657
|
+
*/
|
|
658
|
+
cropMode?: 'pad_resize' | 'extract' | 'pad_extract';
|
|
659
|
+
|
|
660
|
+
/**
|
|
661
|
+
* Specifies a fallback image if the resource is not found, e.g., a URL or file
|
|
662
|
+
* path. See
|
|
663
|
+
* [Default image](https://imagekit.io/docs/image-transformation#default-image---di).
|
|
664
|
+
*/
|
|
665
|
+
defaultImage?: string;
|
|
666
|
+
|
|
667
|
+
/**
|
|
668
|
+
* Accepts values between 0.1 and 5, or `auto` for automatic device pixel ratio
|
|
669
|
+
* (DPR) calculation. See
|
|
670
|
+
* [DPR](https://imagekit.io/docs/image-resize-and-crop#dpr---dpr).
|
|
671
|
+
*/
|
|
672
|
+
dpr?: number;
|
|
673
|
+
|
|
674
|
+
/**
|
|
675
|
+
* Specifies the duration (in seconds) for trimming videos, e.g., `5` or `10.5`.
|
|
676
|
+
* Typically used with startOffset to indicate the length from the start offset.
|
|
677
|
+
* Arithmetic expressions are supported. See
|
|
678
|
+
* [Trim videos – Duration](https://imagekit.io/docs/trim-videos#duration---du).
|
|
679
|
+
*/
|
|
680
|
+
duration?: number | string;
|
|
681
|
+
|
|
682
|
+
/**
|
|
683
|
+
* Specifies the end offset (in seconds) for trimming videos, e.g., `5` or `10.5`.
|
|
684
|
+
* Typically used with startOffset to define a time window. Arithmetic expressions
|
|
685
|
+
* are supported. See
|
|
686
|
+
* [Trim videos – End offset](https://imagekit.io/docs/trim-videos#end-offset---eo).
|
|
687
|
+
*/
|
|
688
|
+
endOffset?: number | string;
|
|
689
|
+
|
|
690
|
+
/**
|
|
691
|
+
* Flips or mirrors an image either horizontally, vertically, or both. Acceptable
|
|
692
|
+
* values: `h` (horizontal), `v` (vertical), `h_v` (horizontal and vertical), or
|
|
693
|
+
* `v_h`. See [Flip](https://imagekit.io/docs/effects-and-enhancements#flip---fl).
|
|
694
|
+
*/
|
|
695
|
+
flip?: 'h' | 'v' | 'h_v' | 'v_h';
|
|
696
|
+
|
|
697
|
+
/**
|
|
698
|
+
* Refines padding and cropping behavior for pad resize, maintain ratio, and
|
|
699
|
+
* extract crop modes. Supports manual positions and coordinate-based focus. With
|
|
700
|
+
* AI-based cropping, you can automatically keep key subjects in frame—such as
|
|
701
|
+
* faces or detected objects (e.g., `fo-face`, `fo-person`, `fo-car`)— while
|
|
702
|
+
* resizing.
|
|
703
|
+
*
|
|
704
|
+
* - See [Focus](https://imagekit.io/docs/image-resize-and-crop#focus---fo).
|
|
705
|
+
* - [Object aware cropping](https://imagekit.io/docs/image-resize-and-crop#object-aware-cropping---fo-object-name)
|
|
706
|
+
*/
|
|
707
|
+
focus?: string;
|
|
708
|
+
|
|
709
|
+
/**
|
|
710
|
+
* Specifies the output format for images or videos, e.g., `jpg`, `png`, `webp`,
|
|
711
|
+
* `mp4`, or `auto`. You can also pass `orig` for images to return the original
|
|
712
|
+
* format. ImageKit automatically delivers images and videos in the optimal format
|
|
713
|
+
* based on device support unless overridden by the dashboard settings or the
|
|
714
|
+
* format parameter. See
|
|
715
|
+
* [Image format](https://imagekit.io/docs/image-optimization#format---f) and
|
|
716
|
+
* [Video format](https://imagekit.io/docs/video-optimization#format---f).
|
|
717
|
+
*/
|
|
718
|
+
format?: 'auto' | 'webp' | 'jpg' | 'jpeg' | 'png' | 'gif' | 'svg' | 'mp4' | 'webm' | 'avif' | 'orig';
|
|
719
|
+
|
|
720
|
+
/**
|
|
721
|
+
* Creates a linear gradient with two colors. Pass `true` for a default gradient,
|
|
722
|
+
* or provide a string for a custom gradient. See
|
|
723
|
+
* [Gradient](https://imagekit.io/docs/effects-and-enhancements#gradient---e-gradient).
|
|
724
|
+
*/
|
|
725
|
+
gradient?: true | string;
|
|
726
|
+
|
|
727
|
+
/**
|
|
728
|
+
* Enables a grayscale effect for images. See
|
|
729
|
+
* [Grayscale](https://imagekit.io/docs/effects-and-enhancements#grayscale---e-grayscale).
|
|
730
|
+
*/
|
|
731
|
+
grayscale?: true;
|
|
732
|
+
|
|
733
|
+
/**
|
|
734
|
+
* Specifies the height of the output. If a value between 0 and 1 is provided, it
|
|
735
|
+
* is treated as a percentage (e.g., `0.5` represents 50% of the original height).
|
|
736
|
+
* You can also supply arithmetic expressions (e.g., `ih_mul_0.5`). Height
|
|
737
|
+
* transformation –
|
|
738
|
+
* [Images](https://imagekit.io/docs/image-resize-and-crop#height---h) ·
|
|
739
|
+
* [Videos](https://imagekit.io/docs/video-resize-and-crop#height---h)
|
|
740
|
+
*/
|
|
741
|
+
height?: number | string;
|
|
742
|
+
|
|
743
|
+
/**
|
|
744
|
+
* Specifies whether the output image (in JPEG or PNG) should be compressed
|
|
745
|
+
* losslessly. See
|
|
746
|
+
* [Lossless compression](https://imagekit.io/docs/image-optimization#lossless-webp-and-png---lo).
|
|
747
|
+
*/
|
|
748
|
+
lossless?: boolean;
|
|
749
|
+
|
|
750
|
+
/**
|
|
751
|
+
* By default, ImageKit removes all metadata during automatic image compression.
|
|
752
|
+
* Set this to true to preserve metadata. See
|
|
753
|
+
* [Image metadata](https://imagekit.io/docs/image-optimization#image-metadata---md).
|
|
754
|
+
*/
|
|
755
|
+
metadata?: boolean;
|
|
756
|
+
|
|
757
|
+
/**
|
|
758
|
+
* Named transformation reference. See
|
|
759
|
+
* [Named transformations](https://imagekit.io/docs/transformations#named-transformations).
|
|
760
|
+
*/
|
|
761
|
+
named?: string;
|
|
762
|
+
|
|
763
|
+
/**
|
|
764
|
+
* Specifies the opacity level of the output image. See
|
|
765
|
+
* [Opacity](https://imagekit.io/docs/effects-and-enhancements#opacity---o).
|
|
766
|
+
*/
|
|
767
|
+
opacity?: number;
|
|
768
|
+
|
|
769
|
+
/**
|
|
770
|
+
* If set to true, serves the original file without applying any transformations.
|
|
771
|
+
* See
|
|
772
|
+
* [Deliver original file as-is](https://imagekit.io/docs/core-delivery-features#deliver-original-file-as-is---orig-true).
|
|
773
|
+
*/
|
|
774
|
+
original?: boolean;
|
|
775
|
+
|
|
776
|
+
/**
|
|
777
|
+
* Specifies an overlay to be applied on the parent image or video. ImageKit
|
|
778
|
+
* supports overlays including images, text, videos, subtitles, and solid colors.
|
|
779
|
+
* See
|
|
780
|
+
* [Overlay using layers](https://imagekit.io/docs/transformations#overlay-using-layers).
|
|
781
|
+
*/
|
|
782
|
+
overlay?: Overlay;
|
|
783
|
+
|
|
784
|
+
/**
|
|
785
|
+
* Extracts a specific page or frame from multi-page or layered files (PDF, PSD,
|
|
786
|
+
* AI). For example, specify by number (e.g., `2`), a range (e.g., `3-4` for the
|
|
787
|
+
* 2nd and 3rd layers), or by name (e.g., `name-layer-4` for a PSD layer). See
|
|
788
|
+
* [Thumbnail extraction](https://imagekit.io/docs/vector-and-animated-images#get-thumbnail-from-psd-pdf-ai-eps-and-animated-files).
|
|
789
|
+
*/
|
|
790
|
+
page?: number | string;
|
|
791
|
+
|
|
792
|
+
/**
|
|
793
|
+
* Specifies whether the output JPEG image should be rendered progressively.
|
|
794
|
+
* Progressive loading begins with a low-quality, pixelated version of the full
|
|
795
|
+
* image, which gradually improves to provide a faster perceived load time. See
|
|
796
|
+
* [Progressive images](https://imagekit.io/docs/image-optimization#progressive-image---pr).
|
|
797
|
+
*/
|
|
798
|
+
progressive?: boolean;
|
|
799
|
+
|
|
800
|
+
/**
|
|
801
|
+
* Specifies the quality of the output image for lossy formats such as JPEG, WebP,
|
|
802
|
+
* and AVIF. A higher quality value results in a larger file size with better
|
|
803
|
+
* quality, while a lower value produces a smaller file size with reduced quality.
|
|
804
|
+
* See [Quality](https://imagekit.io/docs/image-optimization#quality---q).
|
|
805
|
+
*/
|
|
806
|
+
quality?: number;
|
|
807
|
+
|
|
808
|
+
/**
|
|
809
|
+
* Specifies the corner radius for rounded corners (e.g., 20) or `max` for circular
|
|
810
|
+
* or oval shape. See
|
|
811
|
+
* [Radius](https://imagekit.io/docs/effects-and-enhancements#radius---r).
|
|
812
|
+
*/
|
|
813
|
+
radius?: number | 'max';
|
|
814
|
+
|
|
815
|
+
/**
|
|
816
|
+
* Pass any transformation not directly supported by the SDK. This transformation
|
|
817
|
+
* string is appended to the URL as provided.
|
|
818
|
+
*/
|
|
819
|
+
raw?: string;
|
|
820
|
+
|
|
821
|
+
/**
|
|
822
|
+
* Specifies the rotation angle in degrees. Positive values rotate the image
|
|
823
|
+
* clockwise; you can also use, for example, `N40` for counterclockwise rotation or
|
|
824
|
+
* `auto` to use the orientation specified in the image's EXIF data. For videos,
|
|
825
|
+
* only the following values are supported: 0, 90, 180, 270, or 360. See
|
|
826
|
+
* [Rotate](https://imagekit.io/docs/effects-and-enhancements#rotate---rt).
|
|
827
|
+
*/
|
|
828
|
+
rotation?: number | string;
|
|
829
|
+
|
|
830
|
+
/**
|
|
831
|
+
* Adds a shadow beneath solid objects in an image with a transparent background.
|
|
832
|
+
* For AI-based drop shadows, refer to aiDropShadow. Pass `true` for a default
|
|
833
|
+
* shadow, or provide a string for a custom shadow. See
|
|
834
|
+
* [Shadow](https://imagekit.io/docs/effects-and-enhancements#shadow---e-shadow).
|
|
835
|
+
*/
|
|
836
|
+
shadow?: true | string;
|
|
837
|
+
|
|
838
|
+
/**
|
|
839
|
+
* Sharpens the input image, highlighting edges and finer details. Pass `true` for
|
|
840
|
+
* default sharpening, or provide a numeric value for custom sharpening. See
|
|
841
|
+
* [Sharpen](https://imagekit.io/docs/effects-and-enhancements#sharpen---e-sharpen).
|
|
842
|
+
*/
|
|
843
|
+
sharpen?: true | number;
|
|
844
|
+
|
|
845
|
+
/**
|
|
846
|
+
* Specifies the start offset (in seconds) for trimming videos, e.g., `5` or
|
|
847
|
+
* `10.5`. Arithmetic expressions are also supported. See
|
|
848
|
+
* [Trim videos – Start offset](https://imagekit.io/docs/trim-videos#start-offset---so).
|
|
849
|
+
*/
|
|
850
|
+
startOffset?: number | string;
|
|
851
|
+
|
|
852
|
+
/**
|
|
853
|
+
* An array of resolutions for adaptive bitrate streaming, e.g., [`240`, `360`,
|
|
854
|
+
* `480`, `720`, `1080`]. See
|
|
855
|
+
* [Adaptive Bitrate Streaming](https://imagekit.io/docs/adaptive-bitrate-streaming).
|
|
856
|
+
*/
|
|
857
|
+
streamingResolutions?: Array<StreamingResolution>;
|
|
858
|
+
|
|
859
|
+
/**
|
|
860
|
+
* Useful for images with a solid or nearly solid background and a central object.
|
|
861
|
+
* This parameter trims the background, leaving only the central object in the
|
|
862
|
+
* output image. See
|
|
863
|
+
* [Trim edges](https://imagekit.io/docs/effects-and-enhancements#trim-edges---t).
|
|
864
|
+
*/
|
|
865
|
+
trim?: true | number;
|
|
866
|
+
|
|
867
|
+
/**
|
|
868
|
+
* Applies Unsharp Masking (USM), an image sharpening technique. Pass `true` for a
|
|
869
|
+
* default unsharp mask, or provide a string for a custom unsharp mask. See
|
|
870
|
+
* [Unsharp Mask](https://imagekit.io/docs/effects-and-enhancements#unsharp-mask---e-usm).
|
|
871
|
+
*/
|
|
872
|
+
unsharpMask?: true | string;
|
|
873
|
+
|
|
874
|
+
/**
|
|
875
|
+
* Specifies the video codec, e.g., `h264`, `vp9`, `av1`, or `none`. See
|
|
876
|
+
* [Video codec](https://imagekit.io/docs/video-optimization#video-codec---vc).
|
|
877
|
+
*/
|
|
878
|
+
videoCodec?: 'h264' | 'vp9' | 'av1' | 'none';
|
|
879
|
+
|
|
880
|
+
/**
|
|
881
|
+
* Specifies the width of the output. If a value between 0 and 1 is provided, it is
|
|
882
|
+
* treated as a percentage (e.g., `0.4` represents 40% of the original width). You
|
|
883
|
+
* can also supply arithmetic expressions (e.g., `iw_div_2`). Width transformation
|
|
884
|
+
* – [Images](https://imagekit.io/docs/image-resize-and-crop#width---w) ·
|
|
885
|
+
* [Videos](https://imagekit.io/docs/video-resize-and-crop#width---w)
|
|
886
|
+
*/
|
|
887
|
+
width?: number | string;
|
|
888
|
+
|
|
889
|
+
/**
|
|
890
|
+
* Focus using cropped image coordinates - X coordinate. See
|
|
891
|
+
* [Focus using cropped coordinates](https://imagekit.io/docs/image-resize-and-crop#example---focus-using-cropped-image-coordinates).
|
|
892
|
+
*/
|
|
893
|
+
x?: number | string;
|
|
894
|
+
|
|
895
|
+
/**
|
|
896
|
+
* Focus using cropped image coordinates - X center coordinate. See
|
|
897
|
+
* [Focus using cropped coordinates](https://imagekit.io/docs/image-resize-and-crop#example---focus-using-cropped-image-coordinates).
|
|
898
|
+
*/
|
|
899
|
+
xCenter?: number | string;
|
|
900
|
+
|
|
901
|
+
/**
|
|
902
|
+
* Focus using cropped image coordinates - Y coordinate. See
|
|
903
|
+
* [Focus using cropped coordinates](https://imagekit.io/docs/image-resize-and-crop#example---focus-using-cropped-image-coordinates).
|
|
904
|
+
*/
|
|
905
|
+
y?: number | string;
|
|
906
|
+
|
|
907
|
+
/**
|
|
908
|
+
* Focus using cropped image coordinates - Y center coordinate. See
|
|
909
|
+
* [Focus using cropped coordinates](https://imagekit.io/docs/image-resize-and-crop#example---focus-using-cropped-image-coordinates).
|
|
910
|
+
*/
|
|
911
|
+
yCenter?: number | string;
|
|
912
|
+
|
|
913
|
+
/**
|
|
914
|
+
* Accepts a numeric value that determines how much to zoom in or out of the
|
|
915
|
+
* cropped area. It should be used in conjunction with fo-face or fo-<object_name>.
|
|
916
|
+
* See [Zoom](https://imagekit.io/docs/image-resize-and-crop#zoom---z).
|
|
917
|
+
*/
|
|
918
|
+
zoom?: number;
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
/**
|
|
922
|
+
* By default, the transformation string is added as a query parameter in the URL,
|
|
923
|
+
* e.g., `?tr=w-100,h-100`. If you want to add the transformation string in the
|
|
924
|
+
* path of the URL, set this to `path`. Learn more in the
|
|
925
|
+
* [Transformations guide](https://imagekit.io/docs/transformations).
|
|
926
|
+
*/
|
|
927
|
+
export type TransformationPosition = 'path' | 'query';
|
|
928
|
+
|
|
929
|
+
export interface VideoOverlay extends BaseOverlay {
|
|
930
|
+
/**
|
|
931
|
+
* Specifies the relative path to the video used as an overlay.
|
|
932
|
+
*/
|
|
933
|
+
input: string;
|
|
934
|
+
|
|
935
|
+
type: 'video';
|
|
936
|
+
|
|
937
|
+
/**
|
|
938
|
+
* The input path can be included in the layer as either `i-{input}` or
|
|
939
|
+
* `ie-{base64_encoded_input}`. By default, the SDK determines the appropriate
|
|
940
|
+
* format automatically. To always use base64 encoding (`ie-{base64}`), set this
|
|
941
|
+
* parameter to `base64`. To always use plain text (`i-{input}`), set it to
|
|
942
|
+
* `plain`.
|
|
943
|
+
*/
|
|
944
|
+
encoding?: 'auto' | 'plain' | 'base64';
|
|
945
|
+
|
|
946
|
+
/**
|
|
947
|
+
* Array of transformation to be applied to the overlay video. Except
|
|
948
|
+
* `streamingResolutions`, all other video transformations are supported. See
|
|
949
|
+
* [Video transformations](https://imagekit.io/docs/video-transformation).
|
|
950
|
+
*/
|
|
951
|
+
transformation?: Array<Transformation>;
|
|
952
|
+
}
|