@visulima/storage 1.0.9 → 1.0.11

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.
Files changed (174) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/adapter/nuxt/module.d.ts +9 -8
  3. package/dist/ai/ai-sdk/index.d.ts +52 -59
  4. package/dist/ai/claude/index.d.ts +105 -119
  5. package/dist/ai/openai/index.d.ts +87 -99
  6. package/dist/ai/tanstack/index.d.ts +54 -61
  7. package/dist/handler/http/fetch/index.d.ts +202 -201
  8. package/dist/handler/http/fetch/index.js +1 -1
  9. package/dist/handler/http/hono/index.d.ts +60 -59
  10. package/dist/handler/http/hono/index.js +1 -1
  11. package/dist/handler/http/nextjs/index.d.ts +55 -54
  12. package/dist/handler/http/nextjs/index.js +1 -1
  13. package/dist/handler/http/node/index.d.ts +234 -246
  14. package/dist/handler/http/node/index.js +1 -1
  15. package/dist/handler/http/solid-start/index.d.ts +55 -54
  16. package/dist/handler/http/solid-start/index.js +1 -1
  17. package/dist/index.d.ts +71 -70
  18. package/dist/index.js +1 -1
  19. package/dist/packem_shared/{AbstractBaseStorage-CiPEMcuo.js → AbstractBaseStorage-CLsYmMZg.js} +1 -1
  20. package/dist/packem_shared/AwsLightStorage-DGSPFUqr.js +1 -0
  21. package/dist/packem_shared/AzureStorage-DvKk_hhz.js +1 -0
  22. package/dist/packem_shared/BoxMetaStorage-CJsyeQ63.js +1 -0
  23. package/dist/packem_shared/{BoxStorage-DbGqBLux.js → BoxStorage-CmM95wi2.js} +1 -1
  24. package/dist/packem_shared/BunS3MetaStorage-CJsyeQ63.js +1 -0
  25. package/dist/packem_shared/{BunS3Storage-DNvimm9e.js → BunS3Storage-B_roVJ29.js} +1 -1
  26. package/dist/packem_shared/BunnyMetaStorage-CJsyeQ63.js +1 -0
  27. package/dist/packem_shared/{BunnyStorage-C7d0opLL.js → BunnyStorage-eZ1QDVaY.js} +1 -1
  28. package/dist/packem_shared/CloudinaryMetaStorage-Bv_YCZ0Q.js +1 -0
  29. package/dist/packem_shared/{CloudinaryStorage-Dc3XA2lP.js → CloudinaryStorage-CpH2f0Fv.js} +1 -1
  30. package/dist/packem_shared/DiskStorage-DzjjqCzo.js +1 -0
  31. package/dist/packem_shared/{DiskStorageWithChecksum-vFCubS6K.js → DiskStorageWithChecksum-MZkDEyts.js} +1 -1
  32. package/dist/packem_shared/DropboxMetaStorage-CJsyeQ63.js +1 -0
  33. package/dist/packem_shared/{DropboxStorage-CY9Ggu3m.js → DropboxStorage-BB9NoWK2.js} +1 -1
  34. package/dist/packem_shared/{Files-CpIcMjP0.js → Files-DyMJ9FPN.js} +1 -1
  35. package/dist/packem_shared/FirebaseMetaStorage-Bv_YCZ0Q.js +1 -0
  36. package/dist/packem_shared/{FirebaseStorage-D6O9CJXN.js → FirebaseStorage-BgbxzYNC.js} +1 -1
  37. package/dist/packem_shared/FtpMetaStorage-CJsyeQ63.js +1 -0
  38. package/dist/packem_shared/{FtpStorage-DbEjbq8z.js → FtpStorage-CNqXDz7P.js} +1 -1
  39. package/dist/packem_shared/{GCSMetaStorage-DT8K6zdm.js → GCSMetaStorage-gEhWlpfS.js} +1 -1
  40. package/dist/packem_shared/{GCStorage-6BHkFlEs.js → GCStorage-CRd5vjok.js} +1 -1
  41. package/dist/packem_shared/GoogleDriveMetaStorage-B0gLF7Io.js +1 -0
  42. package/dist/packem_shared/{GoogleDriveStorage-Bklsz7Bh.js → GoogleDriveStorage-Du7uBhSm.js} +1 -1
  43. package/dist/packem_shared/{LocalMetaStorage-BhicZnNl.js → LocalMetaStorage-CcGfFG39.js} +1 -1
  44. package/dist/packem_shared/{MemoryStorage-9gbWd09l.js → MemoryStorage-ChKyI6OY.js} +1 -1
  45. package/dist/packem_shared/{Multipart-D0ok6BBy.js → Multipart-C35TR2qL.js} +1 -1
  46. package/dist/packem_shared/{Multipart-CQjYqU--.js → Multipart-V64Bg5dt.js} +1 -1
  47. package/dist/packem_shared/NetlifyBlobMetaStorage-Bv_YCZ0Q.js +1 -0
  48. package/dist/packem_shared/NetlifyBlobStorage-CZsr_0DF.js +1 -0
  49. package/dist/packem_shared/OneDriveMetaStorage-B0gLF7Io.js +1 -0
  50. package/dist/packem_shared/{OneDriveStorage-CP6MvGAa.js → OneDriveStorage-B8qFgMq1.js} +1 -1
  51. package/dist/packem_shared/PocketBaseMetaStorage-Cm3v8g1-.js +1 -0
  52. package/dist/packem_shared/{PocketBaseStorage-2qhbI2PW.js → PocketBaseStorage-D2vMN-oY.js} +1 -1
  53. package/dist/packem_shared/{Rest-CI_BiZPv.js → Rest-B7g1sgkq.js} +1 -1
  54. package/dist/packem_shared/{Rest-DvfN4-kf.js → Rest-BrEMYgxZ.js} +1 -1
  55. package/dist/packem_shared/{S3Storage-YGeNk3Tt.js → S3Storage-CTe_BMDl.js} +1 -1
  56. package/dist/packem_shared/SftpMetaStorage-CJsyeQ63.js +1 -0
  57. package/dist/packem_shared/{SftpStorage-2Hz396Xr.js → SftpStorage-BKeAzuej.js} +1 -1
  58. package/dist/packem_shared/SharePointMetaStorage-CJsyeQ63.js +1 -0
  59. package/dist/packem_shared/{SharePointStorage-CrX2Pk6C.js → SharePointStorage-Dtnt5-wk.js} +1 -1
  60. package/dist/packem_shared/SupabaseMetaStorage-B0gLF7Io.js +1 -0
  61. package/dist/packem_shared/{SupabaseStorage-Dc_DBX29.js → SupabaseStorage-CmGQjqXf.js} +1 -1
  62. package/dist/packem_shared/{Tus-BlBZykIL.js → Tus-CJBgnJrn.js} +1 -1
  63. package/dist/packem_shared/{Tus-BBVt2ky3.js → Tus-D9c7KDnl.js} +1 -1
  64. package/dist/packem_shared/UploadThingMetaStorage-Bv_YCZ0Q.js +1 -0
  65. package/dist/packem_shared/{UploadThingStorage-BChykYSe.js → UploadThingStorage-DZ4zNvDH.js} +1 -1
  66. package/dist/packem_shared/VercelBlobMetaStorage-CJsyeQ63.js +1 -0
  67. package/dist/packem_shared/{VercelBlobStorage-CsRyPfw3.js → VercelBlobStorage-DDNEofR3.js} +1 -1
  68. package/dist/packem_shared/{approval.d-CMAYH9GF.d.ts → approval.d-C-d-t94D.d.ts} +6 -6
  69. package/dist/packem_shared/{base-handler-core-D-9Ku1h-.js → base-handler-core-BJP9jHCE.js} +1 -1
  70. package/dist/packem_shared/{base-handler-fetch-CfkNakv8.js → base-handler-fetch-yrYrukwL.js} +1 -1
  71. package/dist/packem_shared/base-handler-node-C8P9rkaH.js +1 -0
  72. package/dist/packem_shared/{createRetryWrapper-CxgiV_hH.js → createRetryWrapper-DgmeHPNF.js} +1 -1
  73. package/dist/packem_shared/disk-storage-DqnnFQAQ.js +1 -0
  74. package/dist/packem_shared/disk-storage-with-checksum.d-Dgwyza8a.d.ts +146 -0
  75. package/dist/packem_shared/{executors.d-BZP2rWo3.d.ts → executors.d-B9dIy3NT.d.ts} +3 -2
  76. package/dist/packem_shared/files.d-CmSZi3M0.d.ts +655 -0
  77. package/dist/packem_shared/gcs-meta-storage-C9F78Sqq.js +1 -0
  78. package/dist/packem_shared/local-meta-storage-BELb1YwO.js +11 -0
  79. package/dist/packem_shared/{local-meta-storage.d-D9PBfkn6.d.ts → local-meta-storage.d-cRTXr1kb.d.ts} +7 -7
  80. package/dist/packem_shared/media-transformer.d-C8tn4J2Z.d.ts +331 -0
  81. package/dist/packem_shared/{memory-storage.d-4EU1cMt1.d.ts → memory-storage.d-BNZvDG1b.d.ts} +32 -40
  82. package/dist/packem_shared/path-C-OWflAo-_mqb5p5d.js +1 -0
  83. package/dist/packem_shared/{rest-base-e0reNDE_.js → rest-base-BQ_dhWyV.js} +1 -1
  84. package/dist/packem_shared/s3-base-storage-CX94H-Za.js +1 -0
  85. package/dist/packem_shared/{s3-base-storage.d-BQgP5B-t.d.ts → s3-base-storage.d-ks99NSs-.d.ts} +64 -70
  86. package/dist/packem_shared/storage-DR7qdwBN.js +1 -0
  87. package/dist/packem_shared/storage.d-DwdJrArF.d.ts +1186 -0
  88. package/dist/packem_shared/tus-base.d-BKBoJVy0.d.ts +103 -0
  89. package/dist/packem_shared/types.d-B1_xZIhu.d.ts +104 -0
  90. package/dist/packem_shared/{types.d-CrUWY4On.d.ts → types.d-BEUv414z.d.ts} +134 -134
  91. package/dist/packem_shared/{types.d-CggTCgXr.d.ts → types.d-D7Zlz5RE.d.ts} +3 -3
  92. package/dist/storage/aws/clients/index.d.ts +388 -388
  93. package/dist/storage/aws/index.d.ts +110 -113
  94. package/dist/storage/aws/index.js +1 -1
  95. package/dist/storage/aws-light/index.d.ts +64 -67
  96. package/dist/storage/aws-light/index.js +1 -1
  97. package/dist/storage/azure/index.d.ts +134 -139
  98. package/dist/storage/azure/index.js +1 -1
  99. package/dist/storage/box/index.d.ts +89 -92
  100. package/dist/storage/box/index.js +1 -1
  101. package/dist/storage/bun-s3/index.d.ts +71 -76
  102. package/dist/storage/bun-s3/index.js +1 -1
  103. package/dist/storage/bunny/index.d.ts +52 -55
  104. package/dist/storage/bunny/index.js +1 -1
  105. package/dist/storage/cloudinary/index.d.ts +54 -59
  106. package/dist/storage/cloudinary/index.js +1 -1
  107. package/dist/storage/dropbox/index.d.ts +59 -62
  108. package/dist/storage/dropbox/index.js +1 -1
  109. package/dist/storage/firebase/index.d.ts +74 -79
  110. package/dist/storage/firebase/index.js +1 -1
  111. package/dist/storage/ftp/index.d.ts +38 -43
  112. package/dist/storage/ftp/index.js +1 -1
  113. package/dist/storage/gcs/index.d.ts +90 -95
  114. package/dist/storage/gcs/index.js +1 -1
  115. package/dist/storage/google-drive/index.d.ts +69 -72
  116. package/dist/storage/google-drive/index.js +1 -1
  117. package/dist/storage/local/index.d.ts +4 -3
  118. package/dist/storage/local/index.js +1 -1
  119. package/dist/storage/memory/index.d.ts +3 -2
  120. package/dist/storage/memory/index.js +1 -1
  121. package/dist/storage/netlify-blob/index.d.ts +86 -93
  122. package/dist/storage/netlify-blob/index.js +1 -1
  123. package/dist/storage/onedrive/index.d.ts +44 -53
  124. package/dist/storage/onedrive/index.js +1 -1
  125. package/dist/storage/pocketbase/index.d.ts +67 -72
  126. package/dist/storage/pocketbase/index.js +1 -1
  127. package/dist/storage/sftp/index.d.ts +40 -45
  128. package/dist/storage/sftp/index.js +1 -1
  129. package/dist/storage/sharepoint/index.d.ts +96 -95
  130. package/dist/storage/sharepoint/index.js +1 -1
  131. package/dist/storage/supabase/index.d.ts +50 -55
  132. package/dist/storage/supabase/index.js +1 -1
  133. package/dist/storage/uploadthing/index.d.ts +34 -37
  134. package/dist/storage/uploadthing/index.js +1 -1
  135. package/dist/storage/vercel-blob/index.d.ts +110 -115
  136. package/dist/storage/vercel-blob/index.js +1 -1
  137. package/dist/transformer/audio-transformer.d.ts +97 -96
  138. package/dist/transformer/image-transformer.d.ts +423 -422
  139. package/dist/transformer/index.d.ts +35 -34
  140. package/dist/transformer/video-transformer.d.ts +112 -111
  141. package/package.json +2 -2
  142. package/dist/packem_shared/AwsLightStorage-BK-WPL0h.js +0 -1
  143. package/dist/packem_shared/AzureStorage-1UvDIQZd.js +0 -1
  144. package/dist/packem_shared/BoxMetaStorage-BSn6Qfnf.js +0 -1
  145. package/dist/packem_shared/BunS3MetaStorage-BSn6Qfnf.js +0 -1
  146. package/dist/packem_shared/BunnyMetaStorage-BSn6Qfnf.js +0 -1
  147. package/dist/packem_shared/CloudinaryMetaStorage-DPVnmNe5.js +0 -1
  148. package/dist/packem_shared/DiskStorage-CI07TVNu.js +0 -1
  149. package/dist/packem_shared/DropboxMetaStorage-BSn6Qfnf.js +0 -1
  150. package/dist/packem_shared/FirebaseMetaStorage-DPVnmNe5.js +0 -1
  151. package/dist/packem_shared/FtpMetaStorage-BSn6Qfnf.js +0 -1
  152. package/dist/packem_shared/GoogleDriveMetaStorage-Cbwa1CHV.js +0 -1
  153. package/dist/packem_shared/NetlifyBlobMetaStorage-DPVnmNe5.js +0 -1
  154. package/dist/packem_shared/NetlifyBlobStorage-CkpCCoN1.js +0 -1
  155. package/dist/packem_shared/OneDriveMetaStorage-Cbwa1CHV.js +0 -1
  156. package/dist/packem_shared/PocketBaseMetaStorage-DOTLwVE7.js +0 -1
  157. package/dist/packem_shared/SftpMetaStorage-BSn6Qfnf.js +0 -1
  158. package/dist/packem_shared/SharePointMetaStorage-BSn6Qfnf.js +0 -1
  159. package/dist/packem_shared/SupabaseMetaStorage-Cbwa1CHV.js +0 -1
  160. package/dist/packem_shared/UploadThingMetaStorage-DPVnmNe5.js +0 -1
  161. package/dist/packem_shared/VercelBlobMetaStorage-BSn6Qfnf.js +0 -1
  162. package/dist/packem_shared/base-handler-node-BF1v1qDa.js +0 -1
  163. package/dist/packem_shared/disk-storage-CsQcYW3s.js +0 -1
  164. package/dist/packem_shared/disk-storage-with-checksum.d-B-VGEsfl.d.ts +0 -156
  165. package/dist/packem_shared/files.d-CH0iLBNC.d.ts +0 -655
  166. package/dist/packem_shared/gcs-meta-storage-B7BnctnV.js +0 -1
  167. package/dist/packem_shared/local-meta-storage-iuJnu90B.js +0 -11
  168. package/dist/packem_shared/media-transformer.d-Quf4ai47.d.ts +0 -331
  169. package/dist/packem_shared/path-0oTTdkvl-DvWvbDbh.js +0 -1
  170. package/dist/packem_shared/s3-base-storage-BoTyhuzO.js +0 -1
  171. package/dist/packem_shared/storage-0j5nCAUp.js +0 -1
  172. package/dist/packem_shared/storage.d-CEM1upWM.d.ts +0 -1176
  173. package/dist/packem_shared/tus-base.d-DLzKE54M.d.ts +0 -106
  174. package/dist/packem_shared/types.d-Bon9GVVe.d.ts +0 -104
@@ -1,576 +1,577 @@
1
1
  import { Readable } from 'node:stream';
2
- import { F as File, g as FileReturn, B as BaseStorage } from "../packem_shared/storage.d-CEM1upWM.js";
3
- import { I as ImageTransformerConfig, T as TransformResult, R as ResizeOptions, C as CropOptions, g as RotateOptions, h as ImageFormat, i as TransformOptions, S as SharpenOptions, j as BlurOptions, k as MedianOptions, l as CLAHEOptions, m as ConvolveOptions, n as ThresholdOptions, o as BooleanOptions, L as LinearOptions, p as RecombineOptions, q as ModulateOptions, r as TintOptions, G as GreyscaleOptions, s as ColourspaceOptions, E as ExtractChannelOptions, J as JoinChannelOptions, t as BandboolOptions, u as AffineOptions, D as DilateOptions, v as ErodeOptions, P as PipelineColourspaceOptions, w as ToColourspaceOptions, x as RemoveAlphaOptions, y as EnsureAlphaOptions, z as TransformationStep, B as BaseTransformer } from "../packem_shared/types.d-CrUWY4On.js";
2
+ import { F as File, g as FileReturn, B as BaseStorage } from "../packem_shared/storage.d-DwdJrArF.js";
3
+ import { I as ImageTransformerConfig, T as TransformResult, R as ResizeOptions, C as CropOptions, g as RotateOptions, h as ImageFormat, i as TransformOptions, S as SharpenOptions, j as BlurOptions, k as MedianOptions, l as CLAHEOptions, m as ConvolveOptions, n as ThresholdOptions, o as BooleanOptions, L as LinearOptions, p as RecombineOptions, q as ModulateOptions, r as TintOptions, G as GreyscaleOptions, s as ColourspaceOptions, E as ExtractChannelOptions, J as JoinChannelOptions, t as BandboolOptions, u as AffineOptions, D as DilateOptions, v as ErodeOptions, P as PipelineColourspaceOptions, w as ToColourspaceOptions, x as RemoveAlphaOptions, y as EnsureAlphaOptions, z as TransformationStep, B as BaseTransformer } from "../packem_shared/types.d-BEUv414z.js";
4
+ import 'node:timers';
4
5
  import 'node:crypto';
5
6
  import 'node:http';
6
7
  import 'lru-cache';
7
8
  /**
8
- * Image transformer that uses storage backends to retrieve and transform images.
9
- * @template TFile The file type used by this transformer.
10
- * @template TFileReturn The return type for file retrieval operations.
11
- *
12
- * Supports URL-based transformations with query parameters for on-demand image processing.
13
- * @example
14
- * ```ts
15
- * const transformer = new ImageTransformer(storage, {
16
- * maxImageSize: 10 * 1024 * 1024, // 10MB
17
- * cache: new Map()
18
- * });
19
- *
20
- * // Programmatic usage - resize an image
21
- * const result = await transformer.resize('image-id', {
22
- * width: 800,
23
- * height: 600,
24
- * fit: 'cover'
25
- * });
26
- *
27
- * // URL-based transformations
28
- * // GET /files/image-id?width=300&height=200&fit=cover&quality=80
29
- * // GET /files/image-id?width=800&quality=90&lossless=true
30
- * ```
31
- *
32
- * ## Supported Query Parameters
33
- *
34
- * - `width`: Width in pixels (Number)
35
- * - `height`: Height in pixels (Number)
36
- * - `fit`: Resize fit mode - cover/contain/fill/inside/outside
37
- * - `position`: Position for cover/contain fits - center/top/right/bottom/left etc.
38
- * - `quality`: Quality for JPEG/WebP (0-100)
39
- * - `lossless`: Use lossless compression for WebP (Boolean)
40
- * - `effort`: CPU effort for AVIF (0-10, higher = slower but better)
41
- * - `alphaQuality`: Quality of alpha layer for WebP (0-100)
42
- * - `loop`: GIF animation iterations, 0 for infinite (Number)
43
- * - `delay`: GIF delay between frames in milliseconds (Number)
44
- */
9
+ * Image transformer that uses storage backends to retrieve and transform images.
10
+ * @template TFile The file type used by this transformer.
11
+ * @template TFileReturn The return type for file retrieval operations.
12
+ *
13
+ * Supports URL-based transformations with query parameters for on-demand image processing.
14
+ * @example
15
+ * ```ts
16
+ * const transformer = new ImageTransformer(storage, {
17
+ * maxImageSize: 10 * 1024 * 1024, // 10MB
18
+ * cache: new Map()
19
+ * });
20
+ *
21
+ * // Programmatic usage - resize an image
22
+ * const result = await transformer.resize('image-id', {
23
+ * width: 800,
24
+ * height: 600,
25
+ * fit: 'cover'
26
+ * });
27
+ *
28
+ * // URL-based transformations
29
+ * // GET /files/image-id?width=300&height=200&fit=cover&quality=80
30
+ * // GET /files/image-id?width=800&quality=90&lossless=true
31
+ * ```
32
+ *
33
+ * ## Supported Query Parameters
34
+ *
35
+ * - `width`: Width in pixels (Number)
36
+ * - `height`: Height in pixels (Number)
37
+ * - `fit`: Resize fit mode - cover/contain/fill/inside/outside
38
+ * - `position`: Position for cover/contain fits - center/top/right/bottom/left etc.
39
+ * - `quality`: Quality for JPEG/WebP (0-100)
40
+ * - `lossless`: Use lossless compression for WebP (Boolean)
41
+ * - `effort`: CPU effort for AVIF (0-10, higher = slower but better)
42
+ * - `alphaQuality`: Quality of alpha layer for WebP (0-100)
43
+ * - `loop`: GIF animation iterations, 0 for infinite (Number)
44
+ * - `delay`: GIF delay between frames in milliseconds (Number)
45
+ */
45
46
  declare class ImageTransformer<TFile extends File = File, TFileReturn extends FileReturn = FileReturn> extends BaseTransformer<ImageTransformerConfig, TransformResult<TFileReturn>, TFile, TFileReturn> {
46
47
  /**
47
- * Creates a new ImageTransformer instance.
48
- * @param storage The storage backend for retrieving and storing image files.
49
- * @param config Configuration options for image transformation including cache settings and size limits.
50
- */
48
+ * Creates a new ImageTransformer instance.
49
+ * @param storage The storage backend for retrieving and storing image files.
50
+ * @param config Configuration options for image transformation including cache settings and size limits.
51
+ */
51
52
  constructor(storage: BaseStorage<TFile, TFileReturn>, config?: ImageTransformerConfig);
52
53
  /**
53
- * Returns a sharp() invocation that applies the transformer's configured decompression-bomb defenses.
54
- */
54
+ * Returns a sharp() invocation that applies the transformer's configured decompression-bomb defenses.
55
+ */
55
56
  private openImage;
56
57
  /**
57
- * Resizes an image to specified dimensions with optional fit mode.
58
- * @param fileId Unique identifier of the image file to resize.
59
- * @param options Resize options including width, height, and fit mode.
60
- * @returns Promise resolving to transformed image result.
61
- */
58
+ * Resizes an image to specified dimensions with optional fit mode.
59
+ * @param fileId Unique identifier of the image file to resize.
60
+ * @param options Resize options including width, height, and fit mode.
61
+ * @returns Promise resolving to transformed image result.
62
+ */
62
63
  resize(fileId: string, options: ResizeOptions): Promise<TransformResult<TFileReturn>>;
63
64
  /**
64
- * Crops an image to the specified region.
65
- * @param fileId Unique identifier of the image file to crop.
66
- * @param options Crop options including region coordinates.
67
- * @returns Promise resolving to transformed image result.
68
- */
65
+ * Crops an image to the specified region.
66
+ * @param fileId Unique identifier of the image file to crop.
67
+ * @param options Crop options including region coordinates.
68
+ * @returns Promise resolving to transformed image result.
69
+ */
69
70
  crop(fileId: string, options: CropOptions): Promise<TransformResult<TFileReturn>>;
70
71
  /**
71
- * Rotates an image by the specified angle.
72
- * @param fileId Unique identifier of the image file to rotate.
73
- * @param options Rotate options including angle.
74
- * @returns Promise resolving to transformed image result.
75
- */
72
+ * Rotates an image by the specified angle.
73
+ * @param fileId Unique identifier of the image file to rotate.
74
+ * @param options Rotate options including angle.
75
+ * @returns Promise resolving to transformed image result.
76
+ */
76
77
  rotate(fileId: string, options: RotateOptions): Promise<TransformResult<TFileReturn>>;
77
78
  /**
78
- * Converts an image to the specified format.
79
- * @param fileId Unique identifier of the image file to convert.
80
- * @param format Target image format (e.g., "jpeg", "png", "webp").
81
- * @param options Additional transform options.
82
- * @returns Promise resolving to transformed image result.
83
- */
79
+ * Converts an image to the specified format.
80
+ * @param fileId Unique identifier of the image file to convert.
81
+ * @param format Target image format (e.g., "jpeg", "png", "webp").
82
+ * @param options Additional transform options.
83
+ * @returns Promise resolving to transformed image result.
84
+ */
84
85
  convertFormat(fileId: string, format: ImageFormat, options?: TransformOptions): Promise<TransformResult<TFileReturn>>;
85
86
  /**
86
- * Applies sharpening filter to an image.
87
- * @param fileId Unique identifier of the image file to sharpen.
88
- * @param options Sharpen options including sigma and flat/jagged threshold.
89
- * @returns Promise resolving to transformed image result.
90
- */
87
+ * Applies sharpening filter to an image.
88
+ * @param fileId Unique identifier of the image file to sharpen.
89
+ * @param options Sharpen options including sigma and flat/jagged threshold.
90
+ * @returns Promise resolving to transformed image result.
91
+ */
91
92
  sharpen(fileId: string, options?: SharpenOptions): Promise<TransformResult<TFileReturn>>;
92
93
  /**
93
- * Applies blurring filter to an image.
94
- * @param fileId Unique identifier of the image file to blur.
95
- * @param options Blur options including sigma.
96
- * @returns Promise resolving to transformed image result.
97
- */
94
+ * Applies blurring filter to an image.
95
+ * @param fileId Unique identifier of the image file to blur.
96
+ * @param options Blur options including sigma.
97
+ * @returns Promise resolving to transformed image result.
98
+ */
98
99
  blur(fileId: string, options?: BlurOptions): Promise<TransformResult<TFileReturn>>;
99
100
  /**
100
- * Applies median filter to an image for noise reduction.
101
- * @param fileId Unique identifier of the image file to process.
102
- * @param options Median filter options including radius.
103
- * @returns Promise resolving to transformed image result.
104
- */
101
+ * Applies median filter to an image for noise reduction.
102
+ * @param fileId Unique identifier of the image file to process.
103
+ * @param options Median filter options including radius.
104
+ * @returns Promise resolving to transformed image result.
105
+ */
105
106
  median(fileId: string, options?: MedianOptions): Promise<TransformResult<TFileReturn>>;
106
107
  /**
107
- * Applies CLAHE (Contrast Limited Adaptive Histogram Equalization) to an image.
108
- * @param fileId Unique identifier of the image file to process.
109
- * @param options CLAHE options including width, height, and maxSlope.
110
- * @returns Promise resolving to transformed image result.
111
- */
108
+ * Applies CLAHE (Contrast Limited Adaptive Histogram Equalization) to an image.
109
+ * @param fileId Unique identifier of the image file to process.
110
+ * @param options CLAHE options including width, height, and maxSlope.
111
+ * @returns Promise resolving to transformed image result.
112
+ */
112
113
  clahe(fileId: string, options?: CLAHEOptions): Promise<TransformResult<TFileReturn>>;
113
114
  /**
114
- * Applies convolution kernel to an image.
115
- * @param fileId Unique identifier of the image file to process.
116
- * @param options Convolve options including kernel matrix.
117
- * @returns Promise resolving to transformed image result.
118
- */
115
+ * Applies convolution kernel to an image.
116
+ * @param fileId Unique identifier of the image file to process.
117
+ * @param options Convolve options including kernel matrix.
118
+ * @returns Promise resolving to transformed image result.
119
+ */
119
120
  convolve(fileId: string, options: ConvolveOptions): Promise<TransformResult<TFileReturn>>;
120
121
  /**
121
- * Applies thresholding to an image to create a binary image.
122
- * @param fileId Unique identifier of the image file to process.
123
- * @param options Threshold options including threshold value.
124
- * @returns Promise resolving to transformed image result.
125
- */
122
+ * Applies thresholding to an image to create a binary image.
123
+ * @param fileId Unique identifier of the image file to process.
124
+ * @param options Threshold options including threshold value.
125
+ * @returns Promise resolving to transformed image result.
126
+ */
126
127
  threshold(fileId: string, options?: ThresholdOptions): Promise<TransformResult<TFileReturn>>;
127
128
  /**
128
- * Applies boolean operation to an image.
129
- * @param fileId Unique identifier of the image file to process.
130
- * @param options Boolean operation options including operator and operand.
131
- * @returns Promise resolving to transformed image result.
132
- */
129
+ * Applies boolean operation to an image.
130
+ * @param fileId Unique identifier of the image file to process.
131
+ * @param options Boolean operation options including operator and operand.
132
+ * @returns Promise resolving to transformed image result.
133
+ */
133
134
  boolean(fileId: string, options: BooleanOptions): Promise<TransformResult<TFileReturn>>;
134
135
  /**
135
- * Applies linear transformation to an image.
136
- * @param fileId Unique identifier of the image file to process.
137
- * @param options Linear transformation options including a and b coefficients.
138
- * @returns Promise resolving to transformed image result.
139
- */
136
+ * Applies linear transformation to an image.
137
+ * @param fileId Unique identifier of the image file to process.
138
+ * @param options Linear transformation options including a and b coefficients.
139
+ * @returns Promise resolving to transformed image result.
140
+ */
140
141
  linear(fileId: string, options: LinearOptions): Promise<TransformResult<TFileReturn>>;
141
142
  /**
142
- * Applies recombine transformation to an image using a matrix.
143
- * @param fileId Unique identifier of the image file to process.
144
- * @param options Recombine options including matrix coefficients.
145
- * @returns Promise resolving to transformed image result.
146
- */
143
+ * Applies recombine transformation to an image using a matrix.
144
+ * @param fileId Unique identifier of the image file to process.
145
+ * @param options Recombine options including matrix coefficients.
146
+ * @returns Promise resolving to transformed image result.
147
+ */
147
148
  recombine(fileId: string, options: RecombineOptions): Promise<TransformResult<TFileReturn>>;
148
149
  /**
149
- * Applies modulation (brightness, saturation, hue) to an image.
150
- * @param fileId Unique identifier of the image file to process.
151
- * @param options Modulate options including brightness, saturation, and hue.
152
- * @returns Promise resolving to transformed image result.
153
- */
150
+ * Applies modulation (brightness, saturation, hue) to an image.
151
+ * @param fileId Unique identifier of the image file to process.
152
+ * @param options Modulate options including brightness, saturation, and hue.
153
+ * @returns Promise resolving to transformed image result.
154
+ */
154
155
  modulate(fileId: string, options: ModulateOptions): Promise<TransformResult<TFileReturn>>;
155
156
  /**
156
- * Applies tinting to an image.
157
- * @param fileId Unique identifier of the image file to process.
158
- * @param options Tint options including RGB color values.
159
- * @returns Promise resolving to transformed image result.
160
- */
157
+ * Applies tinting to an image.
158
+ * @param fileId Unique identifier of the image file to process.
159
+ * @param options Tint options including RGB color values.
160
+ * @returns Promise resolving to transformed image result.
161
+ */
161
162
  tint(fileId: string, options: TintOptions): Promise<TransformResult<TFileReturn>>;
162
163
  /**
163
- * Converts an image to greyscale.
164
- * @param fileId Unique identifier of the image file to convert.
165
- * @param options Greyscale conversion options.
166
- * @returns Promise resolving to transformed image result.
167
- */
164
+ * Converts an image to greyscale.
165
+ * @param fileId Unique identifier of the image file to convert.
166
+ * @param options Greyscale conversion options.
167
+ * @returns Promise resolving to transformed image result.
168
+ */
168
169
  greyscale(fileId: string, options?: GreyscaleOptions): Promise<TransformResult<TFileReturn>>;
169
170
  /**
170
- * Converts an image to a different colourspace.
171
- * @param fileId Unique identifier of the image file to convert.
172
- * @param options Colourspace conversion options including target colourspace.
173
- * @returns Promise resolving to transformed image result.
174
- */
171
+ * Converts an image to a different colourspace.
172
+ * @param fileId Unique identifier of the image file to convert.
173
+ * @param options Colourspace conversion options including target colourspace.
174
+ * @returns Promise resolving to transformed image result.
175
+ */
175
176
  colourspace(fileId: string, options: ColourspaceOptions): Promise<TransformResult<TFileReturn>>;
176
177
  /**
177
- * Extracts a specific channel from an image.
178
- * @param fileId Unique identifier of the image file to process.
179
- * @param options Extract channel options including channel index.
180
- * @returns Promise resolving to transformed image result.
181
- */
178
+ * Extracts a specific channel from an image.
179
+ * @param fileId Unique identifier of the image file to process.
180
+ * @param options Extract channel options including channel index.
181
+ * @returns Promise resolving to transformed image result.
182
+ */
182
183
  extractChannel(fileId: string, options: ExtractChannelOptions): Promise<TransformResult<TFileReturn>>;
183
184
  /**
184
- * Joins channels to an image.
185
- * @param fileId Unique identifier of the image file to process.
186
- * @param options Join channel options including channel sources.
187
- * @returns Promise resolving to transformed image result.
188
- */
185
+ * Joins channels to an image.
186
+ * @param fileId Unique identifier of the image file to process.
187
+ * @param options Join channel options including channel sources.
188
+ * @returns Promise resolving to transformed image result.
189
+ */
189
190
  joinChannel(fileId: string, options: JoinChannelOptions): Promise<TransformResult<TFileReturn>>;
190
191
  /**
191
- * Applies band boolean operation to an image.
192
- * @param fileId Unique identifier of the image file to process.
193
- * @param options Band boolean options including operator.
194
- * @returns Promise resolving to transformed image result.
195
- */
192
+ * Applies band boolean operation to an image.
193
+ * @param fileId Unique identifier of the image file to process.
194
+ * @param options Band boolean options including operator.
195
+ * @returns Promise resolving to transformed image result.
196
+ */
196
197
  bandbool(fileId: string, options: BandboolOptions): Promise<TransformResult<TFileReturn>>;
197
198
  /**
198
- * Auto-orients an image based on EXIF orientation data.
199
- * @param fileId Unique identifier of the image file to orient.
200
- * @param options Additional transform options.
201
- * @returns Promise resolving to transformed image result.
202
- */
199
+ * Auto-orients an image based on EXIF orientation data.
200
+ * @param fileId Unique identifier of the image file to orient.
201
+ * @param options Additional transform options.
202
+ * @returns Promise resolving to transformed image result.
203
+ */
203
204
  autoOrient(fileId: string, options?: TransformOptions): Promise<TransformResult<TFileReturn>>;
204
205
  /**
205
- * Flips an image vertically.
206
- * @param fileId Unique identifier of the image file to flip.
207
- * @param options Additional transform options.
208
- * @returns Promise resolving to transformed image result.
209
- */
206
+ * Flips an image vertically.
207
+ * @param fileId Unique identifier of the image file to flip.
208
+ * @param options Additional transform options.
209
+ * @returns Promise resolving to transformed image result.
210
+ */
210
211
  flip(fileId: string, options?: TransformOptions): Promise<TransformResult<TFileReturn>>;
211
212
  /**
212
- * Flops an image horizontally.
213
- * @param fileId Unique identifier of the image file to flop.
214
- * @param options Additional transform options.
215
- * @returns Promise resolving to transformed image result.
216
- */
213
+ * Flops an image horizontally.
214
+ * @param fileId Unique identifier of the image file to flop.
215
+ * @param options Additional transform options.
216
+ * @returns Promise resolving to transformed image result.
217
+ */
217
218
  flop(fileId: string, options?: TransformOptions): Promise<TransformResult<TFileReturn>>;
218
219
  /**
219
- * Flattens an image alpha channel onto a background color.
220
- * @param fileId Unique identifier of the image file to flatten.
221
- * @param options Additional transform options.
222
- * @returns Promise resolving to transformed image result.
223
- */
220
+ * Flattens an image alpha channel onto a background color.
221
+ * @param fileId Unique identifier of the image file to flatten.
222
+ * @param options Additional transform options.
223
+ * @returns Promise resolving to transformed image result.
224
+ */
224
225
  flatten(fileId: string, options?: TransformOptions): Promise<TransformResult<TFileReturn>>;
225
226
  /**
226
- * Unflattens an image alpha channel.
227
- * @param fileId Unique identifier of the image file to unflatten.
228
- * @param options Additional transform options.
229
- * @returns Promise resolving to transformed image result.
230
- */
227
+ * Unflattens an image alpha channel.
228
+ * @param fileId Unique identifier of the image file to unflatten.
229
+ * @param options Additional transform options.
230
+ * @returns Promise resolving to transformed image result.
231
+ */
231
232
  unflatten(fileId: string, options?: TransformOptions): Promise<TransformResult<TFileReturn>>;
232
233
  /**
233
- * Applies gamma correction to an image.
234
- * @param fileId Unique identifier of the image file to process.
235
- * @param options Additional transform options.
236
- * @returns Promise resolving to transformed image result.
237
- */
234
+ * Applies gamma correction to an image.
235
+ * @param fileId Unique identifier of the image file to process.
236
+ * @param options Additional transform options.
237
+ * @returns Promise resolving to transformed image result.
238
+ */
238
239
  gamma(fileId: string, options?: TransformOptions): Promise<TransformResult<TFileReturn>>;
239
240
  /**
240
- * Negates (inverts) an image.
241
- * @param fileId Unique identifier of the image file to negate.
242
- * @param options Additional transform options.
243
- * @returns Promise resolving to transformed image result.
244
- */
241
+ * Negates (inverts) an image.
242
+ * @param fileId Unique identifier of the image file to negate.
243
+ * @param options Additional transform options.
244
+ * @returns Promise resolving to transformed image result.
245
+ */
245
246
  negate(fileId: string, options?: TransformOptions): Promise<TransformResult<TFileReturn>>;
246
247
  /**
247
- * Normalises an image by enhancing contrast.
248
- * @param fileId Unique identifier of the image file to normalise.
249
- * @param options Additional transform options.
250
- * @returns Promise resolving to transformed image result.
251
- */
248
+ * Normalises an image by enhancing contrast.
249
+ * @param fileId Unique identifier of the image file to normalise.
250
+ * @param options Additional transform options.
251
+ * @returns Promise resolving to transformed image result.
252
+ */
252
253
  normalise(fileId: string, options?: TransformOptions): Promise<TransformResult<TFileReturn>>;
253
254
  /**
254
- * Applies affine transformation to an image.
255
- * @param fileId Unique identifier of the image file to transform.
256
- * @param options Affine transformation options including matrix.
257
- * @returns Promise resolving to transformed image result.
258
- */
255
+ * Applies affine transformation to an image.
256
+ * @param fileId Unique identifier of the image file to transform.
257
+ * @param options Affine transformation options including matrix.
258
+ * @returns Promise resolving to transformed image result.
259
+ */
259
260
  affine(fileId: string, options: AffineOptions): Promise<TransformResult<TFileReturn>>;
260
261
  /**
261
- * Applies dilation (morphological operation) to an image.
262
- * @param fileId Unique identifier of the image file to process.
263
- * @param options Dilate options including iterations.
264
- * @returns Promise resolving to transformed image result.
265
- */
262
+ * Applies dilation (morphological operation) to an image.
263
+ * @param fileId Unique identifier of the image file to process.
264
+ * @param options Dilate options including iterations.
265
+ * @returns Promise resolving to transformed image result.
266
+ */
266
267
  dilate(fileId: string, options?: DilateOptions): Promise<TransformResult<TFileReturn>>;
267
268
  /**
268
- * Applies erosion (morphological operation) to an image.
269
- * @param fileId Unique identifier of the image file to process.
270
- * @param options Erode options including iterations.
271
- * @returns Promise resolving to transformed image result.
272
- */
269
+ * Applies erosion (morphological operation) to an image.
270
+ * @param fileId Unique identifier of the image file to process.
271
+ * @param options Erode options including iterations.
272
+ * @returns Promise resolving to transformed image result.
273
+ */
273
274
  erode(fileId: string, options?: ErodeOptions): Promise<TransformResult<TFileReturn>>;
274
275
  /**
275
- * Sets pipeline colourspace for an image.
276
- * @param fileId Unique identifier of the image file to process.
277
- * @param options Pipeline colourspace options including colourspace.
278
- * @returns Promise resolving to transformed image result.
279
- */
276
+ * Sets pipeline colourspace for an image.
277
+ * @param fileId Unique identifier of the image file to process.
278
+ * @param options Pipeline colourspace options including colourspace.
279
+ * @returns Promise resolving to transformed image result.
280
+ */
280
281
  pipelineColourspace(fileId: string, options: PipelineColourspaceOptions): Promise<TransformResult<TFileReturn>>;
281
282
  /**
282
- * Converts colourspace of an image.
283
- * @param fileId Unique identifier of the image file to convert.
284
- * @param options ToColourspace options including target colourspace.
285
- * @returns Promise resolving to transformed image result.
286
- */
283
+ * Converts colourspace of an image.
284
+ * @param fileId Unique identifier of the image file to convert.
285
+ * @param options ToColourspace options including target colourspace.
286
+ * @returns Promise resolving to transformed image result.
287
+ */
287
288
  toColourspace(fileId: string, options: ToColourspaceOptions): Promise<TransformResult<TFileReturn>>;
288
289
  /**
289
- * Removes alpha channel from an image.
290
- * @param fileId Unique identifier of the image file to process.
291
- * @param options RemoveAlpha transformation options.
292
- * @returns Promise resolving to transformed image result.
293
- */
290
+ * Removes alpha channel from an image.
291
+ * @param fileId Unique identifier of the image file to process.
292
+ * @param options RemoveAlpha transformation options.
293
+ * @returns Promise resolving to transformed image result.
294
+ */
294
295
  removeAlpha(fileId: string, options?: RemoveAlphaOptions): Promise<TransformResult<TFileReturn>>;
295
296
  /**
296
- * Ensures alpha channel exists in an image.
297
- * @param fileId Unique identifier of the image file to process.
298
- * @param options EnsureAlpha transformation options.
299
- * @returns Promise resolving to transformed image result.
300
- */
297
+ * Ensures alpha channel exists in an image.
298
+ * @param fileId Unique identifier of the image file to process.
299
+ * @param options EnsureAlpha transformation options.
300
+ * @returns Promise resolving to transformed image result.
301
+ */
301
302
  ensureAlpha(fileId: string, options?: EnsureAlphaOptions): Promise<TransformResult<TFileReturn>>;
302
303
  /**
303
- * Applies a custom transformation pipeline to an image.
304
- * @param fileId Unique identifier of the image file to transform.
305
- * @param steps Array of transformation steps to apply in sequence.
306
- * @returns Promise resolving to transformed image result.
307
- */
304
+ * Applies a custom transformation pipeline to an image.
305
+ * @param fileId Unique identifier of the image file to transform.
306
+ * @param steps Array of transformation steps to apply in sequence.
307
+ * @returns Promise resolving to transformed image result.
308
+ */
308
309
  transform(fileId: string, steps: TransformationStep[]): Promise<TransformResult<TFileReturn>>;
309
310
  /**
310
- * Streams transform of a file (for large files, falls back to regular transform).
311
- * @param fileId Unique identifier of the image file to transform.
312
- * @param steps Array of transformation steps to apply in sequence.
313
- * @returns Promise resolving to stream with headers and size information.
314
- */
311
+ * Streams transform of a file (for large files, falls back to regular transform).
312
+ * @param fileId Unique identifier of the image file to transform.
313
+ * @param steps Array of transformation steps to apply in sequence.
314
+ * @returns Promise resolving to stream with headers and size information.
315
+ */
315
316
  override transformStream(fileId: string, steps: TransformationStep[]): Promise<{
316
317
  headers?: Record<string, string>;
317
318
  size?: number;
318
319
  stream: Readable;
319
320
  }>;
320
321
  /**
321
- * Applies multiple transformations in sequence using Sharp.
322
- * @param buffer The original image buffer.
323
- * @param steps Array of transformation steps to apply.
324
- * @returns Promise resolving to transformed image buffer.
325
- * @private
326
- */
322
+ * Applies multiple transformations in sequence using Sharp.
323
+ * @param buffer The original image buffer.
324
+ * @param steps Array of transformation steps to apply.
325
+ * @returns Promise resolving to transformed image buffer.
326
+ * @private
327
+ */
327
328
  private applyTransformations;
328
329
  /**
329
- * Applies resize transformation using Sharp.
330
- * @param sharpInstance The Sharp instance to modify.
331
- * @param options Resize transformation options.
332
- * @returns Modified Sharp instance with resize applied.
333
- * @private
334
- */
330
+ * Applies resize transformation using Sharp.
331
+ * @param sharpInstance The Sharp instance to modify.
332
+ * @param options Resize transformation options.
333
+ * @returns Modified Sharp instance with resize applied.
334
+ * @private
335
+ */
335
336
  private applyResize;
336
337
  /**
337
- * Applies crop transformation using Sharp.
338
- * @param sharpInstance The Sharp instance to modify.
339
- * @param options Crop transformation options.
340
- * @returns Modified Sharp instance with crop applied.
341
- * @private
342
- */
338
+ * Applies crop transformation using Sharp.
339
+ * @param sharpInstance The Sharp instance to modify.
340
+ * @param options Crop transformation options.
341
+ * @returns Modified Sharp instance with crop applied.
342
+ * @private
343
+ */
343
344
  private applyCrop;
344
345
  /**
345
- * Applies rotate transformation using Sharp.
346
- * @param sharpInstance The Sharp instance to modify.
347
- * @param options Rotate transformation options.
348
- * @returns Modified Sharp instance with rotation applied.
349
- * @private
350
- */
346
+ * Applies rotate transformation using Sharp.
347
+ * @param sharpInstance The Sharp instance to modify.
348
+ * @param options Rotate transformation options.
349
+ * @returns Modified Sharp instance with rotation applied.
350
+ * @private
351
+ */
351
352
  private applyRotate;
352
353
  /**
353
- * Applies sharpen transformation using Sharp.
354
- * @param sharpInstance The Sharp instance to modify.
355
- * @param options Sharpen transformation options.
356
- * @returns Modified Sharp instance with sharpening applied.
357
- * @private
358
- */
354
+ * Applies sharpen transformation using Sharp.
355
+ * @param sharpInstance The Sharp instance to modify.
356
+ * @param options Sharpen transformation options.
357
+ * @returns Modified Sharp instance with sharpening applied.
358
+ * @private
359
+ */
359
360
  private applySharpen;
360
361
  /**
361
- * Applies blur transformation using Sharp.
362
- * @param sharpInstance The Sharp instance to modify.
363
- * @param options Blur transformation options.
364
- * @returns Modified Sharp instance with blurring applied.
365
- * @private
366
- */
362
+ * Applies blur transformation using Sharp.
363
+ * @param sharpInstance The Sharp instance to modify.
364
+ * @param options Blur transformation options.
365
+ * @returns Modified Sharp instance with blurring applied.
366
+ * @private
367
+ */
367
368
  private applyBlur;
368
369
  /**
369
- * Applies median filter using Sharp.
370
- * @param sharpInstance The Sharp instance to modify.
371
- * @param options Median transformation options.
372
- * @returns Modified Sharp instance with median filter applied.
373
- * @private
374
- */
370
+ * Applies median filter using Sharp.
371
+ * @param sharpInstance The Sharp instance to modify.
372
+ * @param options Median transformation options.
373
+ * @returns Modified Sharp instance with median filter applied.
374
+ * @private
375
+ */
375
376
  private applyMedian;
376
377
  /**
377
- * Applies CLAHE (Contrast Limited Adaptive Histogram Equalization) using Sharp.
378
- * @param sharpInstance The Sharp instance to modify.
379
- * @param options CLAHE transformation options.
380
- * @returns Modified Sharp instance with CLAHE applied.
381
- * @private
382
- */
378
+ * Applies CLAHE (Contrast Limited Adaptive Histogram Equalization) using Sharp.
379
+ * @param sharpInstance The Sharp instance to modify.
380
+ * @param options CLAHE transformation options.
381
+ * @returns Modified Sharp instance with CLAHE applied.
382
+ * @private
383
+ */
383
384
  private applyCLAHE;
384
385
  /**
385
- * Applies convolution using Sharp.
386
- * @param sharpInstance The Sharp instance to modify.
387
- * @param options Convolution transformation options.
388
- * @returns Modified Sharp instance with convolution applied.
389
- * @private
390
- */
386
+ * Applies convolution using Sharp.
387
+ * @param sharpInstance The Sharp instance to modify.
388
+ * @param options Convolution transformation options.
389
+ * @returns Modified Sharp instance with convolution applied.
390
+ * @private
391
+ */
391
392
  private applyConvolve;
392
393
  /**
393
- * Applies threshold using Sharp.
394
- * @param sharpInstance The Sharp instance to modify.
395
- * @param options Threshold transformation options.
396
- * @returns Modified Sharp instance with thresholding applied.
397
- * @private
398
- */
394
+ * Applies threshold using Sharp.
395
+ * @param sharpInstance The Sharp instance to modify.
396
+ * @param options Threshold transformation options.
397
+ * @returns Modified Sharp instance with thresholding applied.
398
+ * @private
399
+ */
399
400
  private applyThreshold;
400
401
  /**
401
- * Applies boolean operation using Sharp.
402
- * @param sharpInstance The Sharp instance to modify.
403
- * @param options Boolean operation options.
404
- * @returns Modified Sharp instance with boolean operation applied.
405
- * @private
406
- */
402
+ * Applies boolean operation using Sharp.
403
+ * @param sharpInstance The Sharp instance to modify.
404
+ * @param options Boolean operation options.
405
+ * @returns Modified Sharp instance with boolean operation applied.
406
+ * @private
407
+ */
407
408
  private applyBoolean;
408
409
  /**
409
- * Applies linear transformation using Sharp.
410
- * @param sharpInstance The Sharp instance to modify.
411
- * @param options Linear transformation options.
412
- * @returns Modified Sharp instance with linear transformation applied.
413
- * @private
414
- */
410
+ * Applies linear transformation using Sharp.
411
+ * @param sharpInstance The Sharp instance to modify.
412
+ * @param options Linear transformation options.
413
+ * @returns Modified Sharp instance with linear transformation applied.
414
+ * @private
415
+ */
415
416
  private applyLinear;
416
417
  /**
417
- * Applies recombine transformation using Sharp.
418
- * @param sharpInstance The Sharp instance to modify.
419
- * @param options Recombine transformation options.
420
- * @returns Modified Sharp instance with recombine applied.
421
- * @private
422
- */
418
+ * Applies recombine transformation using Sharp.
419
+ * @param sharpInstance The Sharp instance to modify.
420
+ * @param options Recombine transformation options.
421
+ * @returns Modified Sharp instance with recombine applied.
422
+ * @private
423
+ */
423
424
  private applyRecombine;
424
425
  /**
425
- * Applies modulate transformation using Sharp.
426
- * @param sharpInstance The Sharp instance to modify.
427
- * @param options Modulate transformation options.
428
- * @returns Modified Sharp instance with modulation applied.
429
- * @private
430
- */
426
+ * Applies modulate transformation using Sharp.
427
+ * @param sharpInstance The Sharp instance to modify.
428
+ * @param options Modulate transformation options.
429
+ * @returns Modified Sharp instance with modulation applied.
430
+ * @private
431
+ */
431
432
  private applyModulate;
432
433
  /**
433
- * Applies tint using Sharp.
434
- * @param sharpInstance The Sharp instance to modify.
435
- * @param options Tint transformation options.
436
- * @returns Modified Sharp instance with tinting applied.
437
- * @private
438
- */
434
+ * Applies tint using Sharp.
435
+ * @param sharpInstance The Sharp instance to modify.
436
+ * @param options Tint transformation options.
437
+ * @returns Modified Sharp instance with tinting applied.
438
+ * @private
439
+ */
439
440
  private applyTint;
440
441
  /**
441
- * Applies greyscale conversion using Sharp.
442
- * @param sharpInstance The Sharp instance to modify.
443
- * @param options Greyscale transformation options.
444
- * @returns Modified Sharp instance converted to greyscale.
445
- * @private
446
- */
442
+ * Applies greyscale conversion using Sharp.
443
+ * @param sharpInstance The Sharp instance to modify.
444
+ * @param options Greyscale transformation options.
445
+ * @returns Modified Sharp instance converted to greyscale.
446
+ * @private
447
+ */
447
448
  private applyGreyscale;
448
449
  /**
449
- * Applies colourspace conversion using Sharp.
450
- * @param sharpInstance The Sharp instance to modify.
451
- * @param options Colourspace transformation options.
452
- * @returns Modified Sharp instance with colourspace conversion.
453
- * @private
454
- */
450
+ * Applies colourspace conversion using Sharp.
451
+ * @param sharpInstance The Sharp instance to modify.
452
+ * @param options Colourspace transformation options.
453
+ * @returns Modified Sharp instance with colourspace conversion.
454
+ * @private
455
+ */
455
456
  private applyColourspace;
456
457
  /**
457
- * Extracts channel using Sharp.
458
- * @param sharpInstance The Sharp instance to modify.
459
- * @param options Channel extraction options including channel index.
460
- * @returns Modified Sharp instance with channel extracted.
461
- * @private
462
- */
458
+ * Extracts channel using Sharp.
459
+ * @param sharpInstance The Sharp instance to modify.
460
+ * @param options Channel extraction options including channel index.
461
+ * @returns Modified Sharp instance with channel extracted.
462
+ * @private
463
+ */
463
464
  private applyExtractChannel;
464
465
  /**
465
- * Joins channels using Sharp.
466
- * @param sharpInstance The Sharp instance to modify.
467
- * @param options Channel joining options including image sources.
468
- * @returns Modified Sharp instance with channels joined.
469
- * @private
470
- */
466
+ * Joins channels using Sharp.
467
+ * @param sharpInstance The Sharp instance to modify.
468
+ * @param options Channel joining options including image sources.
469
+ * @returns Modified Sharp instance with channels joined.
470
+ * @private
471
+ */
471
472
  private applyJoinChannel;
472
473
  /**
473
- * Applies band boolean operation using Sharp.
474
- * @param sharpInstance The Sharp instance to modify.
475
- * @param options Band boolean options including operator.
476
- * @returns Modified Sharp instance with band boolean operation applied.
477
- * @private
478
- */
474
+ * Applies band boolean operation using Sharp.
475
+ * @param sharpInstance The Sharp instance to modify.
476
+ * @param options Band boolean options including operator.
477
+ * @returns Modified Sharp instance with band boolean operation applied.
478
+ * @private
479
+ */
479
480
  private applyBandbool;
480
481
  /**
481
- * Applies affine transformation using Sharp.
482
- * @param sharpInstance The Sharp instance to modify.
483
- * @param options Affine transformation options including matrix.
484
- * @returns Modified Sharp instance with affine transformation applied.
485
- * @private
486
- */
482
+ * Applies affine transformation using Sharp.
483
+ * @param sharpInstance The Sharp instance to modify.
484
+ * @param options Affine transformation options including matrix.
485
+ * @returns Modified Sharp instance with affine transformation applied.
486
+ * @private
487
+ */
487
488
  private applyAffine;
488
489
  /**
489
- * Applies dilation using Sharp.
490
- * @param sharpInstance The Sharp instance to modify.
491
- * @param options Dilate options including kernel size.
492
- * @returns Modified Sharp instance with dilation applied.
493
- * @private
494
- */
490
+ * Applies dilation using Sharp.
491
+ * @param sharpInstance The Sharp instance to modify.
492
+ * @param options Dilate options including kernel size.
493
+ * @returns Modified Sharp instance with dilation applied.
494
+ * @private
495
+ */
495
496
  private applyDilate;
496
497
  /**
497
- * Applies erosion using Sharp.
498
- * @param sharpInstance The Sharp instance to modify.
499
- * @param options Erode options including kernel size.
500
- * @returns Modified Sharp instance with erosion applied.
501
- * @private
502
- */
498
+ * Applies erosion using Sharp.
499
+ * @param sharpInstance The Sharp instance to modify.
500
+ * @param options Erode options including kernel size.
501
+ * @returns Modified Sharp instance with erosion applied.
502
+ * @private
503
+ */
503
504
  private applyErode;
504
505
  /**
505
- * Applies pipeline colourspace using Sharp.
506
- * @param sharpInstance The Sharp instance to modify.
507
- * @param options Pipeline colourspace options including target colourspace.
508
- * @returns Modified Sharp instance with pipeline colourspace applied.
509
- * @private
510
- */
506
+ * Applies pipeline colourspace using Sharp.
507
+ * @param sharpInstance The Sharp instance to modify.
508
+ * @param options Pipeline colourspace options including target colourspace.
509
+ * @returns Modified Sharp instance with pipeline colourspace applied.
510
+ * @private
511
+ */
511
512
  private applyPipelineColourspace;
512
513
  /**
513
- * Applies to colourspace conversion using Sharp.
514
- * @param sharpInstance The Sharp instance to modify.
515
- * @param options To colourspace options including target colourspace.
516
- * @returns Modified Sharp instance with colourspace conversion applied.
517
- * @private
518
- */
514
+ * Applies to colourspace conversion using Sharp.
515
+ * @param sharpInstance The Sharp instance to modify.
516
+ * @param options To colourspace options including target colourspace.
517
+ * @returns Modified Sharp instance with colourspace conversion applied.
518
+ * @private
519
+ */
519
520
  private applyToColourspace;
520
521
  /**
521
- * Applies remove alpha using Sharp.
522
- * @param sharpInstance The Sharp instance to modify.
523
- * @param options Remove alpha transformation options.
524
- * @returns Modified Sharp instance with alpha channel removed.
525
- * @private
526
- */
522
+ * Applies remove alpha using Sharp.
523
+ * @param sharpInstance The Sharp instance to modify.
524
+ * @param options Remove alpha transformation options.
525
+ * @returns Modified Sharp instance with alpha channel removed.
526
+ * @private
527
+ */
527
528
  private applyRemoveAlpha;
528
529
  /**
529
- * Applies ensure alpha using Sharp.
530
- * @param sharpInstance The Sharp instance to modify.
531
- * @param options Ensure alpha transformation options.
532
- * @returns Modified Sharp instance with alpha channel ensured.
533
- * @private
534
- */
530
+ * Applies ensure alpha using Sharp.
531
+ * @param sharpInstance The Sharp instance to modify.
532
+ * @param options Ensure alpha transformation options.
533
+ * @returns Modified Sharp instance with alpha channel ensured.
534
+ * @private
535
+ */
535
536
  private applyEnsureAlpha;
536
537
  /**
537
- * Applies format and quality transformation using Sharp.
538
- * @param sharpInstance The Sharp instance to modify.
539
- * @param options Format and quality transformation options.
540
- * @returns Modified Sharp instance with format and quality settings applied.
541
- * @private
542
- */
538
+ * Applies format and quality transformation using Sharp.
539
+ * @param sharpInstance The Sharp instance to modify.
540
+ * @param options Format and quality transformation options.
541
+ * @returns Modified Sharp instance with format and quality settings applied.
542
+ * @private
543
+ */
543
544
  private applyFormatAndQuality;
544
545
  /**
545
- * Gets format-specific options for Sharp.
546
- * @param options Transform options containing format-specific settings.
547
- * @returns Record of format options for Sharp processing.
548
- * @private
549
- */
546
+ * Gets format-specific options for Sharp.
547
+ * @param options Transform options containing format-specific settings.
548
+ * @returns Record of format options for Sharp processing.
549
+ * @private
550
+ */
550
551
  private getFormatOptions;
551
552
  /**
552
- * Validates that the file is a supported image.
553
- * @param file The file to validate.
554
- * @returns Promise that resolves if validation passes.
555
- * @throws Error if file size exceeds limits, wrong content type, unsupported format, or invalid image.
556
- * @private
557
- */
553
+ * Validates that the file is a supported image.
554
+ * @param file The file to validate.
555
+ * @returns Promise that resolves if validation passes.
556
+ * @throws Error if file size exceeds limits, wrong content type, unsupported format, or invalid image.
557
+ * @private
558
+ */
558
559
  private validateImage;
559
560
  /**
560
- * Creates transformation result with metadata.
561
- * @param buffer The transformed image buffer.
562
- * @param originalFile The original file information.
563
- * @returns Image transformation result with metadata.
564
- * @private
565
- */
561
+ * Creates transformation result with metadata.
562
+ * @param buffer The transformed image buffer.
563
+ * @param originalFile The original file information.
564
+ * @returns Image transformation result with metadata.
565
+ * @private
566
+ */
566
567
  private createTransformResult;
567
568
  /**
568
- * Generates cache key for transformation.
569
- * @param fileId The file identifier.
570
- * @param steps Array of transformation steps.
571
- * @returns Unique cache key string.
572
- * @private
573
- */
569
+ * Generates cache key for transformation.
570
+ * @param fileId The file identifier.
571
+ * @param steps Array of transformation steps.
572
+ * @returns Unique cache key string.
573
+ * @private
574
+ */
574
575
  private generateCacheKey;
575
576
  }
576
577
  export { ImageTransformer as default };