@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,811 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import * as FilesAPI from "./files/files.mjs";
|
|
3
|
+
export declare class Webhooks extends APIResource {
|
|
4
|
+
unsafeUnwrap(body: string): UnsafeUnwrapWebhookEvent;
|
|
5
|
+
unwrap(body: string, { headers, key }: {
|
|
6
|
+
headers: Record<string, string>;
|
|
7
|
+
key?: string;
|
|
8
|
+
}): UnwrapWebhookEvent;
|
|
9
|
+
}
|
|
10
|
+
export interface BaseWebhookEvent {
|
|
11
|
+
/**
|
|
12
|
+
* Unique identifier for the event.
|
|
13
|
+
*/
|
|
14
|
+
id: string;
|
|
15
|
+
/**
|
|
16
|
+
* The type of webhook event.
|
|
17
|
+
*/
|
|
18
|
+
type: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Triggered when a post-transformation fails. The original file remains available,
|
|
22
|
+
* but the requested transformation could not be generated.
|
|
23
|
+
*/
|
|
24
|
+
export interface UploadPostTransformErrorEvent extends BaseWebhookEvent {
|
|
25
|
+
/**
|
|
26
|
+
* Timestamp of when the event occurred in ISO8601 format.
|
|
27
|
+
*/
|
|
28
|
+
created_at: string;
|
|
29
|
+
data: UploadPostTransformErrorEvent.Data;
|
|
30
|
+
request: UploadPostTransformErrorEvent.Request;
|
|
31
|
+
type: 'upload.post-transform.error';
|
|
32
|
+
}
|
|
33
|
+
export declare namespace UploadPostTransformErrorEvent {
|
|
34
|
+
interface Data {
|
|
35
|
+
/**
|
|
36
|
+
* Unique identifier of the originally uploaded file.
|
|
37
|
+
*/
|
|
38
|
+
fileId: string;
|
|
39
|
+
/**
|
|
40
|
+
* Name of the file.
|
|
41
|
+
*/
|
|
42
|
+
name: string;
|
|
43
|
+
/**
|
|
44
|
+
* Path of the file.
|
|
45
|
+
*/
|
|
46
|
+
path: string;
|
|
47
|
+
transformation: Data.Transformation;
|
|
48
|
+
/**
|
|
49
|
+
* URL of the attempted post-transformation.
|
|
50
|
+
*/
|
|
51
|
+
url: string;
|
|
52
|
+
}
|
|
53
|
+
namespace Data {
|
|
54
|
+
interface Transformation {
|
|
55
|
+
error: Transformation.Error;
|
|
56
|
+
}
|
|
57
|
+
namespace Transformation {
|
|
58
|
+
interface Error {
|
|
59
|
+
/**
|
|
60
|
+
* Reason for the post-transformation failure.
|
|
61
|
+
*/
|
|
62
|
+
reason: string;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
interface Request {
|
|
67
|
+
transformation: Request.Transformation;
|
|
68
|
+
/**
|
|
69
|
+
* Unique identifier for the originating request.
|
|
70
|
+
*/
|
|
71
|
+
x_request_id: string;
|
|
72
|
+
}
|
|
73
|
+
namespace Request {
|
|
74
|
+
interface Transformation {
|
|
75
|
+
/**
|
|
76
|
+
* Type of the requested post-transformation.
|
|
77
|
+
*/
|
|
78
|
+
type: 'transformation' | 'abs' | 'gif-to-video' | 'thumbnail';
|
|
79
|
+
/**
|
|
80
|
+
* Only applicable if transformation type is 'abs'. Streaming protocol used.
|
|
81
|
+
*/
|
|
82
|
+
protocol?: 'hls' | 'dash';
|
|
83
|
+
/**
|
|
84
|
+
* Value for the requested transformation type.
|
|
85
|
+
*/
|
|
86
|
+
value?: string;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Triggered when a post-transformation completes successfully. The transformed
|
|
92
|
+
* version of the file is now ready and can be accessed via the provided URL. Note
|
|
93
|
+
* that each post-transformation generates a separate webhook event.
|
|
94
|
+
*/
|
|
95
|
+
export interface UploadPostTransformSuccessEvent extends BaseWebhookEvent {
|
|
96
|
+
/**
|
|
97
|
+
* Timestamp of when the event occurred in ISO8601 format.
|
|
98
|
+
*/
|
|
99
|
+
created_at: string;
|
|
100
|
+
data: UploadPostTransformSuccessEvent.Data;
|
|
101
|
+
request: UploadPostTransformSuccessEvent.Request;
|
|
102
|
+
type: 'upload.post-transform.success';
|
|
103
|
+
}
|
|
104
|
+
export declare namespace UploadPostTransformSuccessEvent {
|
|
105
|
+
interface Data {
|
|
106
|
+
/**
|
|
107
|
+
* Unique identifier of the originally uploaded file.
|
|
108
|
+
*/
|
|
109
|
+
fileId: string;
|
|
110
|
+
/**
|
|
111
|
+
* Name of the file.
|
|
112
|
+
*/
|
|
113
|
+
name: string;
|
|
114
|
+
/**
|
|
115
|
+
* URL of the generated post-transformation.
|
|
116
|
+
*/
|
|
117
|
+
url: string;
|
|
118
|
+
}
|
|
119
|
+
interface Request {
|
|
120
|
+
transformation: Request.Transformation;
|
|
121
|
+
/**
|
|
122
|
+
* Unique identifier for the originating request.
|
|
123
|
+
*/
|
|
124
|
+
x_request_id: string;
|
|
125
|
+
}
|
|
126
|
+
namespace Request {
|
|
127
|
+
interface Transformation {
|
|
128
|
+
/**
|
|
129
|
+
* Type of the requested post-transformation.
|
|
130
|
+
*/
|
|
131
|
+
type: 'transformation' | 'abs' | 'gif-to-video' | 'thumbnail';
|
|
132
|
+
/**
|
|
133
|
+
* Only applicable if transformation type is 'abs'. Streaming protocol used.
|
|
134
|
+
*/
|
|
135
|
+
protocol?: 'hls' | 'dash';
|
|
136
|
+
/**
|
|
137
|
+
* Value for the requested transformation type.
|
|
138
|
+
*/
|
|
139
|
+
value?: string;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Triggered when a pre-transformation fails. The file upload may have been
|
|
145
|
+
* accepted, but the requested transformation could not be applied.
|
|
146
|
+
*/
|
|
147
|
+
export interface UploadPreTransformErrorEvent extends BaseWebhookEvent {
|
|
148
|
+
/**
|
|
149
|
+
* Timestamp of when the event occurred in ISO8601 format.
|
|
150
|
+
*/
|
|
151
|
+
created_at: string;
|
|
152
|
+
data: UploadPreTransformErrorEvent.Data;
|
|
153
|
+
request: UploadPreTransformErrorEvent.Request;
|
|
154
|
+
type: 'upload.pre-transform.error';
|
|
155
|
+
}
|
|
156
|
+
export declare namespace UploadPreTransformErrorEvent {
|
|
157
|
+
interface Data {
|
|
158
|
+
/**
|
|
159
|
+
* Name of the file.
|
|
160
|
+
*/
|
|
161
|
+
name: string;
|
|
162
|
+
/**
|
|
163
|
+
* Path of the file.
|
|
164
|
+
*/
|
|
165
|
+
path: string;
|
|
166
|
+
transformation: Data.Transformation;
|
|
167
|
+
}
|
|
168
|
+
namespace Data {
|
|
169
|
+
interface Transformation {
|
|
170
|
+
error: Transformation.Error;
|
|
171
|
+
}
|
|
172
|
+
namespace Transformation {
|
|
173
|
+
interface Error {
|
|
174
|
+
/**
|
|
175
|
+
* Reason for the pre-transformation failure.
|
|
176
|
+
*/
|
|
177
|
+
reason: string;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
interface Request {
|
|
182
|
+
/**
|
|
183
|
+
* The requested pre-transformation string.
|
|
184
|
+
*/
|
|
185
|
+
transformation: string;
|
|
186
|
+
/**
|
|
187
|
+
* Unique identifier for the originating request.
|
|
188
|
+
*/
|
|
189
|
+
x_request_id: string;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Triggered when a pre-transformation completes successfully. The file has been
|
|
194
|
+
* processed with the requested transformation and is now available in the Media
|
|
195
|
+
* Library.
|
|
196
|
+
*/
|
|
197
|
+
export interface UploadPreTransformSuccessEvent extends BaseWebhookEvent {
|
|
198
|
+
/**
|
|
199
|
+
* Timestamp of when the event occurred in ISO8601 format.
|
|
200
|
+
*/
|
|
201
|
+
created_at: string;
|
|
202
|
+
/**
|
|
203
|
+
* Object containing details of a successful upload.
|
|
204
|
+
*/
|
|
205
|
+
data: UploadPreTransformSuccessEvent.Data;
|
|
206
|
+
request: UploadPreTransformSuccessEvent.Request;
|
|
207
|
+
type: 'upload.pre-transform.success';
|
|
208
|
+
}
|
|
209
|
+
export declare namespace UploadPreTransformSuccessEvent {
|
|
210
|
+
/**
|
|
211
|
+
* Object containing details of a successful upload.
|
|
212
|
+
*/
|
|
213
|
+
interface Data {
|
|
214
|
+
/**
|
|
215
|
+
* An array of tags assigned to the uploaded file by auto tagging.
|
|
216
|
+
*/
|
|
217
|
+
AITags?: Array<Data.AITag> | null;
|
|
218
|
+
/**
|
|
219
|
+
* The audio codec used in the video (only for video).
|
|
220
|
+
*/
|
|
221
|
+
audioCodec?: string;
|
|
222
|
+
/**
|
|
223
|
+
* The bit rate of the video in kbps (only for video).
|
|
224
|
+
*/
|
|
225
|
+
bitRate?: number;
|
|
226
|
+
/**
|
|
227
|
+
* Value of custom coordinates associated with the image in the format
|
|
228
|
+
* `x,y,width,height`. If `customCoordinates` are not defined, then it is `null`.
|
|
229
|
+
* Send `customCoordinates` in `responseFields` in API request to get the value of
|
|
230
|
+
* this field.
|
|
231
|
+
*/
|
|
232
|
+
customCoordinates?: string | null;
|
|
233
|
+
/**
|
|
234
|
+
* A key-value data associated with the asset. Use `responseField` in API request
|
|
235
|
+
* to get `customMetadata` in the upload API response. Before setting any custom
|
|
236
|
+
* metadata on an asset, you have to create the field using custom metadata fields
|
|
237
|
+
* API. Send `customMetadata` in `responseFields` in API request to get the value
|
|
238
|
+
* of this field.
|
|
239
|
+
*/
|
|
240
|
+
customMetadata?: {
|
|
241
|
+
[key: string]: unknown;
|
|
242
|
+
};
|
|
243
|
+
/**
|
|
244
|
+
* Optional text to describe the contents of the file. Can be set by the user or
|
|
245
|
+
* the ai-auto-description extension.
|
|
246
|
+
*/
|
|
247
|
+
description?: string;
|
|
248
|
+
/**
|
|
249
|
+
* The duration of the video in seconds (only for video).
|
|
250
|
+
*/
|
|
251
|
+
duration?: number;
|
|
252
|
+
/**
|
|
253
|
+
* Consolidated embedded metadata associated with the file. It includes exif, iptc,
|
|
254
|
+
* and xmp data. Send `embeddedMetadata` in `responseFields` in API request to get
|
|
255
|
+
* embeddedMetadata in the upload API response.
|
|
256
|
+
*/
|
|
257
|
+
embeddedMetadata?: {
|
|
258
|
+
[key: string]: unknown;
|
|
259
|
+
};
|
|
260
|
+
/**
|
|
261
|
+
* Extension names with their processing status at the time of completion of the
|
|
262
|
+
* request. It could have one of the following status values:
|
|
263
|
+
*
|
|
264
|
+
* `success`: The extension has been successfully applied. `failed`: The extension
|
|
265
|
+
* has failed and will not be retried. `pending`: The extension will finish
|
|
266
|
+
* processing in some time. On completion, the final status (success / failed) will
|
|
267
|
+
* be sent to the `webhookUrl` provided.
|
|
268
|
+
*
|
|
269
|
+
* If no extension was requested, then this parameter is not returned.
|
|
270
|
+
*/
|
|
271
|
+
extensionStatus?: Data.ExtensionStatus;
|
|
272
|
+
/**
|
|
273
|
+
* Unique fileId. Store this fileld in your database, as this will be used to
|
|
274
|
+
* perform update action on this file.
|
|
275
|
+
*/
|
|
276
|
+
fileId?: string;
|
|
277
|
+
/**
|
|
278
|
+
* The relative path of the file in the media library e.g.
|
|
279
|
+
* `/marketing-assets/new-banner.jpg`.
|
|
280
|
+
*/
|
|
281
|
+
filePath?: string;
|
|
282
|
+
/**
|
|
283
|
+
* Type of the uploaded file. Possible values are `image`, `non-image`.
|
|
284
|
+
*/
|
|
285
|
+
fileType?: string;
|
|
286
|
+
/**
|
|
287
|
+
* Height of the image in pixels (Only for images)
|
|
288
|
+
*/
|
|
289
|
+
height?: number;
|
|
290
|
+
/**
|
|
291
|
+
* Is the file marked as private. It can be either `true` or `false`. Send
|
|
292
|
+
* `isPrivateFile` in `responseFields` in API request to get the value of this
|
|
293
|
+
* field.
|
|
294
|
+
*/
|
|
295
|
+
isPrivateFile?: boolean;
|
|
296
|
+
/**
|
|
297
|
+
* Is the file published or in draft state. It can be either `true` or `false`.
|
|
298
|
+
* Send `isPublished` in `responseFields` in API request to get the value of this
|
|
299
|
+
* field.
|
|
300
|
+
*/
|
|
301
|
+
isPublished?: boolean;
|
|
302
|
+
/**
|
|
303
|
+
* Legacy metadata. Send `metadata` in `responseFields` in API request to get
|
|
304
|
+
* metadata in the upload API response.
|
|
305
|
+
*/
|
|
306
|
+
metadata?: FilesAPI.Metadata;
|
|
307
|
+
/**
|
|
308
|
+
* Name of the asset.
|
|
309
|
+
*/
|
|
310
|
+
name?: string;
|
|
311
|
+
/**
|
|
312
|
+
* Size of the image file in Bytes.
|
|
313
|
+
*/
|
|
314
|
+
size?: number;
|
|
315
|
+
/**
|
|
316
|
+
* The array of tags associated with the asset. If no tags are set, it will be
|
|
317
|
+
* `null`. Send `tags` in `responseFields` in API request to get the value of this
|
|
318
|
+
* field.
|
|
319
|
+
*/
|
|
320
|
+
tags?: Array<string> | null;
|
|
321
|
+
/**
|
|
322
|
+
* In the case of an image, a small thumbnail URL.
|
|
323
|
+
*/
|
|
324
|
+
thumbnailUrl?: string;
|
|
325
|
+
/**
|
|
326
|
+
* A publicly accessible URL of the file.
|
|
327
|
+
*/
|
|
328
|
+
url?: string;
|
|
329
|
+
/**
|
|
330
|
+
* An object containing the file or file version's `id` (versionId) and `name`.
|
|
331
|
+
*/
|
|
332
|
+
versionInfo?: Data.VersionInfo;
|
|
333
|
+
/**
|
|
334
|
+
* The video codec used in the video (only for video).
|
|
335
|
+
*/
|
|
336
|
+
videoCodec?: string;
|
|
337
|
+
/**
|
|
338
|
+
* Width of the image in pixels (Only for Images)
|
|
339
|
+
*/
|
|
340
|
+
width?: number;
|
|
341
|
+
}
|
|
342
|
+
namespace Data {
|
|
343
|
+
interface AITag {
|
|
344
|
+
/**
|
|
345
|
+
* Confidence score of the tag.
|
|
346
|
+
*/
|
|
347
|
+
confidence?: number;
|
|
348
|
+
/**
|
|
349
|
+
* Name of the tag.
|
|
350
|
+
*/
|
|
351
|
+
name?: string;
|
|
352
|
+
/**
|
|
353
|
+
* Array of `AITags` associated with the image. If no `AITags` are set, it will be
|
|
354
|
+
* null. These tags can be added using the `google-auto-tagging` or
|
|
355
|
+
* `aws-auto-tagging` extensions.
|
|
356
|
+
*/
|
|
357
|
+
source?: string;
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* Extension names with their processing status at the time of completion of the
|
|
361
|
+
* request. It could have one of the following status values:
|
|
362
|
+
*
|
|
363
|
+
* `success`: The extension has been successfully applied. `failed`: The extension
|
|
364
|
+
* has failed and will not be retried. `pending`: The extension will finish
|
|
365
|
+
* processing in some time. On completion, the final status (success / failed) will
|
|
366
|
+
* be sent to the `webhookUrl` provided.
|
|
367
|
+
*
|
|
368
|
+
* If no extension was requested, then this parameter is not returned.
|
|
369
|
+
*/
|
|
370
|
+
interface ExtensionStatus {
|
|
371
|
+
'ai-auto-description'?: 'success' | 'pending' | 'failed';
|
|
372
|
+
'aws-auto-tagging'?: 'success' | 'pending' | 'failed';
|
|
373
|
+
'google-auto-tagging'?: 'success' | 'pending' | 'failed';
|
|
374
|
+
'remove-bg'?: 'success' | 'pending' | 'failed';
|
|
375
|
+
}
|
|
376
|
+
/**
|
|
377
|
+
* An object containing the file or file version's `id` (versionId) and `name`.
|
|
378
|
+
*/
|
|
379
|
+
interface VersionInfo {
|
|
380
|
+
/**
|
|
381
|
+
* Unique identifier of the file version.
|
|
382
|
+
*/
|
|
383
|
+
id?: string;
|
|
384
|
+
/**
|
|
385
|
+
* Name of the file version.
|
|
386
|
+
*/
|
|
387
|
+
name?: string;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
interface Request {
|
|
391
|
+
/**
|
|
392
|
+
* The requested pre-transformation string.
|
|
393
|
+
*/
|
|
394
|
+
transformation: string;
|
|
395
|
+
/**
|
|
396
|
+
* Unique identifier for the originating request.
|
|
397
|
+
*/
|
|
398
|
+
x_request_id: string;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* Triggered when a new video transformation request is accepted for processing.
|
|
403
|
+
* This event confirms that ImageKit has received and queued your transformation
|
|
404
|
+
* request. Use this for debugging and tracking transformation lifecycle.
|
|
405
|
+
*/
|
|
406
|
+
export interface VideoTransformationAcceptedEvent extends BaseWebhookEvent {
|
|
407
|
+
/**
|
|
408
|
+
* Timestamp when the event was created in ISO8601 format.
|
|
409
|
+
*/
|
|
410
|
+
created_at: string;
|
|
411
|
+
data: VideoTransformationAcceptedEvent.Data;
|
|
412
|
+
/**
|
|
413
|
+
* Information about the original request that triggered the video transformation.
|
|
414
|
+
*/
|
|
415
|
+
request: VideoTransformationAcceptedEvent.Request;
|
|
416
|
+
type: 'video.transformation.accepted';
|
|
417
|
+
}
|
|
418
|
+
export declare namespace VideoTransformationAcceptedEvent {
|
|
419
|
+
interface Data {
|
|
420
|
+
/**
|
|
421
|
+
* Information about the source video asset being transformed.
|
|
422
|
+
*/
|
|
423
|
+
asset: Data.Asset;
|
|
424
|
+
/**
|
|
425
|
+
* Base information about a video transformation request.
|
|
426
|
+
*/
|
|
427
|
+
transformation: Data.Transformation;
|
|
428
|
+
}
|
|
429
|
+
namespace Data {
|
|
430
|
+
/**
|
|
431
|
+
* Information about the source video asset being transformed.
|
|
432
|
+
*/
|
|
433
|
+
interface Asset {
|
|
434
|
+
/**
|
|
435
|
+
* URL to download or access the source video file.
|
|
436
|
+
*/
|
|
437
|
+
url: string;
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* Base information about a video transformation request.
|
|
441
|
+
*/
|
|
442
|
+
interface Transformation {
|
|
443
|
+
/**
|
|
444
|
+
* Type of video transformation:
|
|
445
|
+
*
|
|
446
|
+
* - `video-transformation`: Standard video processing (resize, format conversion,
|
|
447
|
+
* etc.)
|
|
448
|
+
* - `gif-to-video`: Convert animated GIF to video format
|
|
449
|
+
* - `video-thumbnail`: Generate thumbnail image from video
|
|
450
|
+
*/
|
|
451
|
+
type: 'video-transformation' | 'gif-to-video' | 'video-thumbnail';
|
|
452
|
+
/**
|
|
453
|
+
* Configuration options for video transformations.
|
|
454
|
+
*/
|
|
455
|
+
options?: Transformation.Options;
|
|
456
|
+
}
|
|
457
|
+
namespace Transformation {
|
|
458
|
+
/**
|
|
459
|
+
* Configuration options for video transformations.
|
|
460
|
+
*/
|
|
461
|
+
interface Options {
|
|
462
|
+
/**
|
|
463
|
+
* Audio codec used for encoding (aac or opus).
|
|
464
|
+
*/
|
|
465
|
+
audio_codec?: 'aac' | 'opus';
|
|
466
|
+
/**
|
|
467
|
+
* Whether to automatically rotate the video based on metadata.
|
|
468
|
+
*/
|
|
469
|
+
auto_rotate?: boolean;
|
|
470
|
+
/**
|
|
471
|
+
* Output format for the transformed video or thumbnail.
|
|
472
|
+
*/
|
|
473
|
+
format?: 'mp4' | 'webm' | 'jpg' | 'png' | 'webp';
|
|
474
|
+
/**
|
|
475
|
+
* Quality setting for the output video.
|
|
476
|
+
*/
|
|
477
|
+
quality?: number;
|
|
478
|
+
/**
|
|
479
|
+
* Streaming protocol for adaptive bitrate streaming.
|
|
480
|
+
*/
|
|
481
|
+
stream_protocol?: 'HLS' | 'DASH';
|
|
482
|
+
/**
|
|
483
|
+
* Array of quality representations for adaptive bitrate streaming.
|
|
484
|
+
*/
|
|
485
|
+
variants?: Array<string>;
|
|
486
|
+
/**
|
|
487
|
+
* Video codec used for encoding (h264, vp9, or av1).
|
|
488
|
+
*/
|
|
489
|
+
video_codec?: 'h264' | 'vp9' | 'av1';
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
/**
|
|
494
|
+
* Information about the original request that triggered the video transformation.
|
|
495
|
+
*/
|
|
496
|
+
interface Request {
|
|
497
|
+
/**
|
|
498
|
+
* Full URL of the transformation request that was submitted.
|
|
499
|
+
*/
|
|
500
|
+
url: string;
|
|
501
|
+
/**
|
|
502
|
+
* Unique identifier for the originating transformation request.
|
|
503
|
+
*/
|
|
504
|
+
x_request_id: string;
|
|
505
|
+
/**
|
|
506
|
+
* User-Agent header from the original request that triggered the transformation.
|
|
507
|
+
*/
|
|
508
|
+
user_agent?: string;
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
/**
|
|
512
|
+
* Triggered when an error occurs during video encoding. Listen to this webhook to
|
|
513
|
+
* log error reasons and debug issues. Check your origin and URL endpoint settings
|
|
514
|
+
* if the reason is related to download failure. For other errors, contact ImageKit
|
|
515
|
+
* support.
|
|
516
|
+
*/
|
|
517
|
+
export interface VideoTransformationErrorEvent extends BaseWebhookEvent {
|
|
518
|
+
/**
|
|
519
|
+
* Timestamp when the event was created in ISO8601 format.
|
|
520
|
+
*/
|
|
521
|
+
created_at: string;
|
|
522
|
+
data: VideoTransformationErrorEvent.Data;
|
|
523
|
+
/**
|
|
524
|
+
* Information about the original request that triggered the video transformation.
|
|
525
|
+
*/
|
|
526
|
+
request: VideoTransformationErrorEvent.Request;
|
|
527
|
+
type: 'video.transformation.error';
|
|
528
|
+
}
|
|
529
|
+
export declare namespace VideoTransformationErrorEvent {
|
|
530
|
+
interface Data {
|
|
531
|
+
/**
|
|
532
|
+
* Information about the source video asset being transformed.
|
|
533
|
+
*/
|
|
534
|
+
asset: Data.Asset;
|
|
535
|
+
transformation: Data.Transformation;
|
|
536
|
+
}
|
|
537
|
+
namespace Data {
|
|
538
|
+
/**
|
|
539
|
+
* Information about the source video asset being transformed.
|
|
540
|
+
*/
|
|
541
|
+
interface Asset {
|
|
542
|
+
/**
|
|
543
|
+
* URL to download or access the source video file.
|
|
544
|
+
*/
|
|
545
|
+
url: string;
|
|
546
|
+
}
|
|
547
|
+
interface Transformation {
|
|
548
|
+
/**
|
|
549
|
+
* Type of video transformation:
|
|
550
|
+
*
|
|
551
|
+
* - `video-transformation`: Standard video processing (resize, format conversion,
|
|
552
|
+
* etc.)
|
|
553
|
+
* - `gif-to-video`: Convert animated GIF to video format
|
|
554
|
+
* - `video-thumbnail`: Generate thumbnail image from video
|
|
555
|
+
*/
|
|
556
|
+
type: 'video-transformation' | 'gif-to-video' | 'video-thumbnail';
|
|
557
|
+
/**
|
|
558
|
+
* Details about the transformation error.
|
|
559
|
+
*/
|
|
560
|
+
error?: Transformation.Error;
|
|
561
|
+
/**
|
|
562
|
+
* Configuration options for video transformations.
|
|
563
|
+
*/
|
|
564
|
+
options?: Transformation.Options;
|
|
565
|
+
}
|
|
566
|
+
namespace Transformation {
|
|
567
|
+
/**
|
|
568
|
+
* Details about the transformation error.
|
|
569
|
+
*/
|
|
570
|
+
interface Error {
|
|
571
|
+
/**
|
|
572
|
+
* Specific reason for the transformation failure:
|
|
573
|
+
*
|
|
574
|
+
* - `encoding_failed`: Error during video encoding process
|
|
575
|
+
* - `download_failed`: Could not download source video
|
|
576
|
+
* - `internal_server_error`: Unexpected server error
|
|
577
|
+
*/
|
|
578
|
+
reason: 'encoding_failed' | 'download_failed' | 'internal_server_error';
|
|
579
|
+
}
|
|
580
|
+
/**
|
|
581
|
+
* Configuration options for video transformations.
|
|
582
|
+
*/
|
|
583
|
+
interface Options {
|
|
584
|
+
/**
|
|
585
|
+
* Audio codec used for encoding (aac or opus).
|
|
586
|
+
*/
|
|
587
|
+
audio_codec?: 'aac' | 'opus';
|
|
588
|
+
/**
|
|
589
|
+
* Whether to automatically rotate the video based on metadata.
|
|
590
|
+
*/
|
|
591
|
+
auto_rotate?: boolean;
|
|
592
|
+
/**
|
|
593
|
+
* Output format for the transformed video or thumbnail.
|
|
594
|
+
*/
|
|
595
|
+
format?: 'mp4' | 'webm' | 'jpg' | 'png' | 'webp';
|
|
596
|
+
/**
|
|
597
|
+
* Quality setting for the output video.
|
|
598
|
+
*/
|
|
599
|
+
quality?: number;
|
|
600
|
+
/**
|
|
601
|
+
* Streaming protocol for adaptive bitrate streaming.
|
|
602
|
+
*/
|
|
603
|
+
stream_protocol?: 'HLS' | 'DASH';
|
|
604
|
+
/**
|
|
605
|
+
* Array of quality representations for adaptive bitrate streaming.
|
|
606
|
+
*/
|
|
607
|
+
variants?: Array<string>;
|
|
608
|
+
/**
|
|
609
|
+
* Video codec used for encoding (h264, vp9, or av1).
|
|
610
|
+
*/
|
|
611
|
+
video_codec?: 'h264' | 'vp9' | 'av1';
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
/**
|
|
616
|
+
* Information about the original request that triggered the video transformation.
|
|
617
|
+
*/
|
|
618
|
+
interface Request {
|
|
619
|
+
/**
|
|
620
|
+
* Full URL of the transformation request that was submitted.
|
|
621
|
+
*/
|
|
622
|
+
url: string;
|
|
623
|
+
/**
|
|
624
|
+
* Unique identifier for the originating transformation request.
|
|
625
|
+
*/
|
|
626
|
+
x_request_id: string;
|
|
627
|
+
/**
|
|
628
|
+
* User-Agent header from the original request that triggered the transformation.
|
|
629
|
+
*/
|
|
630
|
+
user_agent?: string;
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
/**
|
|
634
|
+
* Triggered when video encoding is finished and the transformed resource is ready
|
|
635
|
+
* to be served. This is the key event to listen for - update your database or CMS
|
|
636
|
+
* flags when you receive this so your application can start showing the
|
|
637
|
+
* transformed video to users.
|
|
638
|
+
*/
|
|
639
|
+
export interface VideoTransformationReadyEvent extends BaseWebhookEvent {
|
|
640
|
+
/**
|
|
641
|
+
* Timestamp when the event was created in ISO8601 format.
|
|
642
|
+
*/
|
|
643
|
+
created_at: string;
|
|
644
|
+
data: VideoTransformationReadyEvent.Data;
|
|
645
|
+
/**
|
|
646
|
+
* Information about the original request that triggered the video transformation.
|
|
647
|
+
*/
|
|
648
|
+
request: VideoTransformationReadyEvent.Request;
|
|
649
|
+
type: 'video.transformation.ready';
|
|
650
|
+
/**
|
|
651
|
+
* Performance metrics for the transformation process.
|
|
652
|
+
*/
|
|
653
|
+
timings?: VideoTransformationReadyEvent.Timings;
|
|
654
|
+
}
|
|
655
|
+
export declare namespace VideoTransformationReadyEvent {
|
|
656
|
+
interface Data {
|
|
657
|
+
/**
|
|
658
|
+
* Information about the source video asset being transformed.
|
|
659
|
+
*/
|
|
660
|
+
asset: Data.Asset;
|
|
661
|
+
transformation: Data.Transformation;
|
|
662
|
+
}
|
|
663
|
+
namespace Data {
|
|
664
|
+
/**
|
|
665
|
+
* Information about the source video asset being transformed.
|
|
666
|
+
*/
|
|
667
|
+
interface Asset {
|
|
668
|
+
/**
|
|
669
|
+
* URL to download or access the source video file.
|
|
670
|
+
*/
|
|
671
|
+
url: string;
|
|
672
|
+
}
|
|
673
|
+
interface Transformation {
|
|
674
|
+
/**
|
|
675
|
+
* Type of video transformation:
|
|
676
|
+
*
|
|
677
|
+
* - `video-transformation`: Standard video processing (resize, format conversion,
|
|
678
|
+
* etc.)
|
|
679
|
+
* - `gif-to-video`: Convert animated GIF to video format
|
|
680
|
+
* - `video-thumbnail`: Generate thumbnail image from video
|
|
681
|
+
*/
|
|
682
|
+
type: 'video-transformation' | 'gif-to-video' | 'video-thumbnail';
|
|
683
|
+
/**
|
|
684
|
+
* Configuration options for video transformations.
|
|
685
|
+
*/
|
|
686
|
+
options?: Transformation.Options;
|
|
687
|
+
/**
|
|
688
|
+
* Information about the transformed output video.
|
|
689
|
+
*/
|
|
690
|
+
output?: Transformation.Output;
|
|
691
|
+
}
|
|
692
|
+
namespace Transformation {
|
|
693
|
+
/**
|
|
694
|
+
* Configuration options for video transformations.
|
|
695
|
+
*/
|
|
696
|
+
interface Options {
|
|
697
|
+
/**
|
|
698
|
+
* Audio codec used for encoding (aac or opus).
|
|
699
|
+
*/
|
|
700
|
+
audio_codec?: 'aac' | 'opus';
|
|
701
|
+
/**
|
|
702
|
+
* Whether to automatically rotate the video based on metadata.
|
|
703
|
+
*/
|
|
704
|
+
auto_rotate?: boolean;
|
|
705
|
+
/**
|
|
706
|
+
* Output format for the transformed video or thumbnail.
|
|
707
|
+
*/
|
|
708
|
+
format?: 'mp4' | 'webm' | 'jpg' | 'png' | 'webp';
|
|
709
|
+
/**
|
|
710
|
+
* Quality setting for the output video.
|
|
711
|
+
*/
|
|
712
|
+
quality?: number;
|
|
713
|
+
/**
|
|
714
|
+
* Streaming protocol for adaptive bitrate streaming.
|
|
715
|
+
*/
|
|
716
|
+
stream_protocol?: 'HLS' | 'DASH';
|
|
717
|
+
/**
|
|
718
|
+
* Array of quality representations for adaptive bitrate streaming.
|
|
719
|
+
*/
|
|
720
|
+
variants?: Array<string>;
|
|
721
|
+
/**
|
|
722
|
+
* Video codec used for encoding (h264, vp9, or av1).
|
|
723
|
+
*/
|
|
724
|
+
video_codec?: 'h264' | 'vp9' | 'av1';
|
|
725
|
+
}
|
|
726
|
+
/**
|
|
727
|
+
* Information about the transformed output video.
|
|
728
|
+
*/
|
|
729
|
+
interface Output {
|
|
730
|
+
/**
|
|
731
|
+
* URL to access the transformed video.
|
|
732
|
+
*/
|
|
733
|
+
url: string;
|
|
734
|
+
/**
|
|
735
|
+
* Metadata of the output video file.
|
|
736
|
+
*/
|
|
737
|
+
video_metadata?: Output.VideoMetadata;
|
|
738
|
+
}
|
|
739
|
+
namespace Output {
|
|
740
|
+
/**
|
|
741
|
+
* Metadata of the output video file.
|
|
742
|
+
*/
|
|
743
|
+
interface VideoMetadata {
|
|
744
|
+
/**
|
|
745
|
+
* Bitrate of the output video in bits per second.
|
|
746
|
+
*/
|
|
747
|
+
bitrate: number;
|
|
748
|
+
/**
|
|
749
|
+
* Duration of the output video in seconds.
|
|
750
|
+
*/
|
|
751
|
+
duration: number;
|
|
752
|
+
/**
|
|
753
|
+
* Height of the output video in pixels.
|
|
754
|
+
*/
|
|
755
|
+
height: number;
|
|
756
|
+
/**
|
|
757
|
+
* Width of the output video in pixels.
|
|
758
|
+
*/
|
|
759
|
+
width: number;
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
/**
|
|
765
|
+
* Information about the original request that triggered the video transformation.
|
|
766
|
+
*/
|
|
767
|
+
interface Request {
|
|
768
|
+
/**
|
|
769
|
+
* Full URL of the transformation request that was submitted.
|
|
770
|
+
*/
|
|
771
|
+
url: string;
|
|
772
|
+
/**
|
|
773
|
+
* Unique identifier for the originating transformation request.
|
|
774
|
+
*/
|
|
775
|
+
x_request_id: string;
|
|
776
|
+
/**
|
|
777
|
+
* User-Agent header from the original request that triggered the transformation.
|
|
778
|
+
*/
|
|
779
|
+
user_agent?: string;
|
|
780
|
+
}
|
|
781
|
+
/**
|
|
782
|
+
* Performance metrics for the transformation process.
|
|
783
|
+
*/
|
|
784
|
+
interface Timings {
|
|
785
|
+
/**
|
|
786
|
+
* Time spent downloading the source video from your origin or media library, in
|
|
787
|
+
* milliseconds.
|
|
788
|
+
*/
|
|
789
|
+
download_duration?: number;
|
|
790
|
+
/**
|
|
791
|
+
* Time spent encoding the video, in milliseconds.
|
|
792
|
+
*/
|
|
793
|
+
encoding_duration?: number;
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
/**
|
|
797
|
+
* Triggered when a new video transformation request is accepted for processing.
|
|
798
|
+
* This event confirms that ImageKit has received and queued your transformation
|
|
799
|
+
* request. Use this for debugging and tracking transformation lifecycle.
|
|
800
|
+
*/
|
|
801
|
+
export type UnsafeUnwrapWebhookEvent = VideoTransformationAcceptedEvent | VideoTransformationReadyEvent | VideoTransformationErrorEvent | UploadPreTransformSuccessEvent | UploadPreTransformErrorEvent | UploadPostTransformSuccessEvent | UploadPostTransformErrorEvent;
|
|
802
|
+
/**
|
|
803
|
+
* Triggered when a new video transformation request is accepted for processing.
|
|
804
|
+
* This event confirms that ImageKit has received and queued your transformation
|
|
805
|
+
* request. Use this for debugging and tracking transformation lifecycle.
|
|
806
|
+
*/
|
|
807
|
+
export type UnwrapWebhookEvent = VideoTransformationAcceptedEvent | VideoTransformationReadyEvent | VideoTransformationErrorEvent | UploadPreTransformSuccessEvent | UploadPreTransformErrorEvent | UploadPostTransformSuccessEvent | UploadPostTransformErrorEvent;
|
|
808
|
+
export declare namespace Webhooks {
|
|
809
|
+
export { type BaseWebhookEvent as BaseWebhookEvent, type UploadPostTransformErrorEvent as UploadPostTransformErrorEvent, type UploadPostTransformSuccessEvent as UploadPostTransformSuccessEvent, type UploadPreTransformErrorEvent as UploadPreTransformErrorEvent, type UploadPreTransformSuccessEvent as UploadPreTransformSuccessEvent, type VideoTransformationAcceptedEvent as VideoTransformationAcceptedEvent, type VideoTransformationErrorEvent as VideoTransformationErrorEvent, type VideoTransformationReadyEvent as VideoTransformationReadyEvent, type UnsafeUnwrapWebhookEvent as UnsafeUnwrapWebhookEvent, type UnwrapWebhookEvent as UnwrapWebhookEvent, };
|
|
810
|
+
}
|
|
811
|
+
//# sourceMappingURL=webhooks.d.mts.map
|