imagekitio 3.1.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (483) hide show
  1. checksums.yaml +4 -4
  2. data/.ignore +2 -0
  3. data/CHANGELOG.md +116 -0
  4. data/README.md +534 -705
  5. data/SECURITY.md +27 -0
  6. data/lib/imagekitio/client.rb +122 -195
  7. data/lib/imagekitio/errors.rb +226 -2
  8. data/lib/imagekitio/file_part.rb +58 -0
  9. data/lib/imagekitio/helpers/crypto_utils.rb +25 -0
  10. data/lib/imagekitio/helpers/helper.rb +689 -0
  11. data/lib/imagekitio/helpers/transformation_utils.rb +164 -0
  12. data/lib/imagekitio/helpers/uuid_utils.rb +18 -0
  13. data/lib/imagekitio/internal/transport/base_client.rb +567 -0
  14. data/lib/imagekitio/internal/transport/pooled_net_requester.rb +217 -0
  15. data/lib/imagekitio/internal/type/array_of.rb +168 -0
  16. data/lib/imagekitio/internal/type/base_model.rb +530 -0
  17. data/lib/imagekitio/internal/type/base_page.rb +55 -0
  18. data/lib/imagekitio/internal/type/boolean.rb +77 -0
  19. data/lib/imagekitio/internal/type/converter.rb +327 -0
  20. data/lib/imagekitio/internal/type/enum.rb +156 -0
  21. data/lib/imagekitio/internal/type/file_input.rb +111 -0
  22. data/lib/imagekitio/internal/type/hash_of.rb +188 -0
  23. data/lib/imagekitio/internal/type/request_parameters.rb +42 -0
  24. data/lib/imagekitio/internal/type/union.rb +250 -0
  25. data/lib/imagekitio/internal/type/unknown.rb +81 -0
  26. data/lib/imagekitio/internal/util.rb +915 -0
  27. data/lib/imagekitio/internal.rb +20 -0
  28. data/lib/imagekitio/models/accounts/origin_create_params.rb +24 -0
  29. data/lib/imagekitio/models/accounts/origin_delete_params.rb +16 -0
  30. data/lib/imagekitio/models/accounts/origin_get_params.rb +16 -0
  31. data/lib/imagekitio/models/accounts/origin_list_params.rb +16 -0
  32. data/lib/imagekitio/models/accounts/origin_list_response.rb +11 -0
  33. data/lib/imagekitio/models/accounts/origin_request.rb +547 -0
  34. data/lib/imagekitio/models/accounts/origin_response.rb +568 -0
  35. data/lib/imagekitio/models/accounts/origin_update_params.rb +24 -0
  36. data/lib/imagekitio/models/accounts/url_endpoint_create_params.rb +16 -0
  37. data/lib/imagekitio/models/accounts/url_endpoint_delete_params.rb +16 -0
  38. data/lib/imagekitio/models/accounts/url_endpoint_get_params.rb +16 -0
  39. data/lib/imagekitio/models/accounts/url_endpoint_list_params.rb +16 -0
  40. data/lib/imagekitio/models/accounts/url_endpoint_list_response.rb +11 -0
  41. data/lib/imagekitio/models/accounts/url_endpoint_request.rb +110 -0
  42. data/lib/imagekitio/models/accounts/url_endpoint_response.rb +123 -0
  43. data/lib/imagekitio/models/accounts/url_endpoint_update_params.rb +16 -0
  44. data/lib/imagekitio/models/accounts/usage_get_params.rb +37 -0
  45. data/lib/imagekitio/models/accounts/usage_get_response.rb +51 -0
  46. data/lib/imagekitio/models/asset_list_params.rb +158 -0
  47. data/lib/imagekitio/models/asset_list_response.rb +24 -0
  48. data/lib/imagekitio/models/base_overlay.rb +21 -0
  49. data/lib/imagekitio/models/base_webhook_event.rb +24 -0
  50. data/lib/imagekitio/models/beta/v2/file_upload_params.rb +510 -0
  51. data/lib/imagekitio/models/beta/v2/file_upload_response.rb +618 -0
  52. data/lib/imagekitio/models/cache/invalidation_create_params.rb +27 -0
  53. data/lib/imagekitio/models/cache/invalidation_create_response.rb +23 -0
  54. data/lib/imagekitio/models/cache/invalidation_get_params.rb +16 -0
  55. data/lib/imagekitio/models/cache/invalidation_get_response.rb +35 -0
  56. data/lib/imagekitio/models/custom_metadata_field.rb +243 -0
  57. data/lib/imagekitio/models/custom_metadata_field_create_params.rb +238 -0
  58. data/lib/imagekitio/models/custom_metadata_field_delete_params.rb +14 -0
  59. data/lib/imagekitio/models/custom_metadata_field_delete_response.rb +10 -0
  60. data/lib/imagekitio/models/custom_metadata_field_list_params.rb +36 -0
  61. data/lib/imagekitio/models/custom_metadata_field_list_response.rb +9 -0
  62. data/lib/imagekitio/models/custom_metadata_field_update_params.rb +212 -0
  63. data/lib/imagekitio/models/extensions.rb +136 -0
  64. data/lib/imagekitio/models/file.rb +497 -0
  65. data/lib/imagekitio/models/file_copy_params.rb +43 -0
  66. data/lib/imagekitio/models/file_copy_response.rb +10 -0
  67. data/lib/imagekitio/models/file_delete_params.rb +14 -0
  68. data/lib/imagekitio/models/file_get_params.rb +14 -0
  69. data/lib/imagekitio/models/file_move_params.rb +33 -0
  70. data/lib/imagekitio/models/file_move_response.rb +10 -0
  71. data/lib/imagekitio/models/file_rename_params.rb +61 -0
  72. data/lib/imagekitio/models/file_rename_response.rb +21 -0
  73. data/lib/imagekitio/models/file_update_params.rb +22 -0
  74. data/lib/imagekitio/models/file_update_response.rb +104 -0
  75. data/lib/imagekitio/models/file_upload_params.rb +540 -0
  76. data/lib/imagekitio/models/file_upload_response.rb +611 -0
  77. data/lib/imagekitio/models/files/bulk_add_tags_params.rb +35 -0
  78. data/lib/imagekitio/models/files/bulk_add_tags_response.rb +24 -0
  79. data/lib/imagekitio/models/files/bulk_delete_params.rb +27 -0
  80. data/lib/imagekitio/models/files/bulk_delete_response.rb +24 -0
  81. data/lib/imagekitio/models/files/bulk_remove_ai_tags_params.rb +35 -0
  82. data/lib/imagekitio/models/files/bulk_remove_ai_tags_response.rb +24 -0
  83. data/lib/imagekitio/models/files/bulk_remove_tags_params.rb +35 -0
  84. data/lib/imagekitio/models/files/bulk_remove_tags_response.rb +24 -0
  85. data/lib/imagekitio/models/files/metadata_get_from_url_params.rb +28 -0
  86. data/lib/imagekitio/models/files/metadata_get_params.rb +16 -0
  87. data/lib/imagekitio/models/files/version_delete_params.rb +22 -0
  88. data/lib/imagekitio/models/files/version_delete_response.rb +12 -0
  89. data/lib/imagekitio/models/files/version_get_params.rb +22 -0
  90. data/lib/imagekitio/models/files/version_list_params.rb +16 -0
  91. data/lib/imagekitio/models/files/version_list_response.rb +10 -0
  92. data/lib/imagekitio/models/files/version_restore_params.rb +22 -0
  93. data/lib/imagekitio/models/folder.rb +76 -0
  94. data/lib/imagekitio/models/folder_copy_params.rb +44 -0
  95. data/lib/imagekitio/models/folder_copy_response.rb +23 -0
  96. data/lib/imagekitio/models/folder_create_params.rb +43 -0
  97. data/lib/imagekitio/models/folder_create_response.rb +10 -0
  98. data/lib/imagekitio/models/folder_delete_params.rb +25 -0
  99. data/lib/imagekitio/models/folder_delete_response.rb +10 -0
  100. data/lib/imagekitio/models/folder_move_params.rb +34 -0
  101. data/lib/imagekitio/models/folder_move_response.rb +23 -0
  102. data/lib/imagekitio/models/folder_rename_params.rb +59 -0
  103. data/lib/imagekitio/models/folder_rename_response.rb +23 -0
  104. data/lib/imagekitio/models/folders/job_get_params.rb +16 -0
  105. data/lib/imagekitio/models/folders/job_get_response.rb +74 -0
  106. data/lib/imagekitio/models/get_image_attributes_options.rb +68 -0
  107. data/lib/imagekitio/models/image_overlay.rb +66 -0
  108. data/lib/imagekitio/models/metadata.rb +483 -0
  109. data/lib/imagekitio/models/overlay.rb +28 -0
  110. data/lib/imagekitio/models/overlay_position.rb +101 -0
  111. data/lib/imagekitio/models/overlay_timing.rb +97 -0
  112. data/lib/imagekitio/models/responsive_image_attributes.rb +48 -0
  113. data/lib/imagekitio/models/solid_color_overlay.rb +42 -0
  114. data/lib/imagekitio/models/solid_color_overlay_transformation.rb +135 -0
  115. data/lib/imagekitio/models/src_options.rb +96 -0
  116. data/lib/imagekitio/models/streaming_resolution.rb +22 -0
  117. data/lib/imagekitio/models/subtitle_overlay.rb +64 -0
  118. data/lib/imagekitio/models/subtitle_overlay_transformation.rb +113 -0
  119. data/lib/imagekitio/models/text_overlay.rb +65 -0
  120. data/lib/imagekitio/models/text_overlay_transformation.rb +267 -0
  121. data/lib/imagekitio/models/transformation.rb +1100 -0
  122. data/lib/imagekitio/models/transformation_position.rb +19 -0
  123. data/lib/imagekitio/models/unsafe_unwrap_webhook_event.rb +36 -0
  124. data/lib/imagekitio/models/unwrap_webhook_event.rb +36 -0
  125. data/lib/imagekitio/models/update_file_request.rb +164 -0
  126. data/lib/imagekitio/models/upload_post_transform_error_event.rb +180 -0
  127. data/lib/imagekitio/models/upload_post_transform_success_event.rb +143 -0
  128. data/lib/imagekitio/models/upload_pre_transform_error_event.rb +108 -0
  129. data/lib/imagekitio/models/upload_pre_transform_success_event.rb +690 -0
  130. data/lib/imagekitio/models/video_overlay.rb +64 -0
  131. data/lib/imagekitio/models/video_transformation_accepted_event.rb +279 -0
  132. data/lib/imagekitio/models/video_transformation_error_event.rb +326 -0
  133. data/lib/imagekitio/models/video_transformation_ready_event.rb +379 -0
  134. data/lib/imagekitio/models/webhook_unsafe_unwrap_params.rb +14 -0
  135. data/lib/imagekitio/models/webhook_unwrap_params.rb +14 -0
  136. data/lib/imagekitio/models.rb +160 -0
  137. data/lib/imagekitio/request_options.rb +77 -0
  138. data/lib/imagekitio/resources/accounts/origins.rb +145 -0
  139. data/lib/imagekitio/resources/accounts/url_endpoints.rb +151 -0
  140. data/lib/imagekitio/resources/accounts/usage.rb +46 -0
  141. data/lib/imagekitio/resources/accounts.rb +26 -0
  142. data/lib/imagekitio/resources/assets.rb +54 -0
  143. data/lib/imagekitio/resources/beta/v2/files.rb +110 -0
  144. data/lib/imagekitio/resources/beta/v2.rb +20 -0
  145. data/lib/imagekitio/resources/beta.rb +18 -0
  146. data/lib/imagekitio/resources/cache/invalidation.rb +66 -0
  147. data/lib/imagekitio/resources/cache.rb +18 -0
  148. data/lib/imagekitio/resources/custom_metadata_fields.rb +133 -0
  149. data/lib/imagekitio/resources/files/bulk.rb +131 -0
  150. data/lib/imagekitio/resources/files/metadata.rb +69 -0
  151. data/lib/imagekitio/resources/files/versions.rb +132 -0
  152. data/lib/imagekitio/resources/files.rb +305 -0
  153. data/lib/imagekitio/resources/folders/job.rb +39 -0
  154. data/lib/imagekitio/resources/folders.rb +166 -0
  155. data/lib/imagekitio/resources/webhooks.rb +30 -0
  156. data/lib/imagekitio/version.rb +5 -0
  157. data/lib/imagekitio.rb +181 -13
  158. data/manifest.yaml +15 -0
  159. data/rbi/imagekitio/client.rbi +92 -0
  160. data/rbi/imagekitio/errors.rbi +205 -0
  161. data/rbi/imagekitio/file_part.rbi +37 -0
  162. data/rbi/imagekitio/helpers/helper.rbi +41 -0
  163. data/rbi/imagekitio/internal/transport/base_client.rbi +295 -0
  164. data/rbi/imagekitio/internal/transport/pooled_net_requester.rbi +80 -0
  165. data/rbi/imagekitio/internal/type/array_of.rbi +104 -0
  166. data/rbi/imagekitio/internal/type/base_model.rbi +304 -0
  167. data/rbi/imagekitio/internal/type/base_page.rbi +42 -0
  168. data/rbi/imagekitio/internal/type/boolean.rbi +58 -0
  169. data/rbi/imagekitio/internal/type/converter.rbi +216 -0
  170. data/rbi/imagekitio/internal/type/enum.rbi +82 -0
  171. data/rbi/imagekitio/internal/type/file_input.rbi +59 -0
  172. data/rbi/imagekitio/internal/type/hash_of.rbi +104 -0
  173. data/rbi/imagekitio/internal/type/request_parameters.rbi +29 -0
  174. data/rbi/imagekitio/internal/type/union.rbi +128 -0
  175. data/rbi/imagekitio/internal/type/unknown.rbi +58 -0
  176. data/rbi/imagekitio/internal/util.rbi +487 -0
  177. data/rbi/imagekitio/internal.rbi +18 -0
  178. data/rbi/imagekitio/models/accounts/origin_create_params.rbi +81 -0
  179. data/rbi/imagekitio/models/accounts/origin_delete_params.rbi +34 -0
  180. data/rbi/imagekitio/models/accounts/origin_get_params.rbi +34 -0
  181. data/rbi/imagekitio/models/accounts/origin_list_params.rbi +34 -0
  182. data/rbi/imagekitio/models/accounts/origin_list_response.rbi +15 -0
  183. data/rbi/imagekitio/models/accounts/origin_request.rbi +775 -0
  184. data/rbi/imagekitio/models/accounts/origin_response.rbi +718 -0
  185. data/rbi/imagekitio/models/accounts/origin_update_params.rbi +81 -0
  186. data/rbi/imagekitio/models/accounts/url_endpoint_create_params.rbi +34 -0
  187. data/rbi/imagekitio/models/accounts/url_endpoint_delete_params.rbi +34 -0
  188. data/rbi/imagekitio/models/accounts/url_endpoint_get_params.rbi +34 -0
  189. data/rbi/imagekitio/models/accounts/url_endpoint_list_params.rbi +34 -0
  190. data/rbi/imagekitio/models/accounts/url_endpoint_list_response.rbi +15 -0
  191. data/rbi/imagekitio/models/accounts/url_endpoint_request.rbi +218 -0
  192. data/rbi/imagekitio/models/accounts/url_endpoint_response.rbi +213 -0
  193. data/rbi/imagekitio/models/accounts/url_endpoint_update_params.rbi +34 -0
  194. data/rbi/imagekitio/models/accounts/usage_get_params.rbi +60 -0
  195. data/rbi/imagekitio/models/accounts/usage_get_response.rbi +89 -0
  196. data/rbi/imagekitio/models/asset_list_params.rbi +281 -0
  197. data/rbi/imagekitio/models/asset_list_response.rbi +28 -0
  198. data/rbi/imagekitio/models/base_overlay.rbi +44 -0
  199. data/rbi/imagekitio/models/base_webhook_event.rbi +33 -0
  200. data/rbi/imagekitio/models/beta/v2/file_upload_params.rbi +861 -0
  201. data/rbi/imagekitio/models/beta/v2/file_upload_response.rbi +1197 -0
  202. data/rbi/imagekitio/models/cache/invalidation_create_params.rbi +45 -0
  203. data/rbi/imagekitio/models/cache/invalidation_create_response.rbi +37 -0
  204. data/rbi/imagekitio/models/cache/invalidation_get_params.rbi +34 -0
  205. data/rbi/imagekitio/models/cache/invalidation_get_response.rbi +93 -0
  206. data/rbi/imagekitio/models/custom_metadata_field.rbi +422 -0
  207. data/rbi/imagekitio/models/custom_metadata_field_create_params.rbi +443 -0
  208. data/rbi/imagekitio/models/custom_metadata_field_delete_params.rbi +30 -0
  209. data/rbi/imagekitio/models/custom_metadata_field_delete_response.rbi +23 -0
  210. data/rbi/imagekitio/models/custom_metadata_field_list_params.rbi +66 -0
  211. data/rbi/imagekitio/models/custom_metadata_field_list_response.rbi +11 -0
  212. data/rbi/imagekitio/models/custom_metadata_field_update_params.rbi +376 -0
  213. data/rbi/imagekitio/models/extensions.rbi +274 -0
  214. data/rbi/imagekitio/models/file.rbi +789 -0
  215. data/rbi/imagekitio/models/file_copy_params.rbi +66 -0
  216. data/rbi/imagekitio/models/file_copy_response.rbi +23 -0
  217. data/rbi/imagekitio/models/file_delete_params.rbi +27 -0
  218. data/rbi/imagekitio/models/file_get_params.rbi +27 -0
  219. data/rbi/imagekitio/models/file_move_params.rbi +51 -0
  220. data/rbi/imagekitio/models/file_move_response.rbi +23 -0
  221. data/rbi/imagekitio/models/file_rename_params.rbi +102 -0
  222. data/rbi/imagekitio/models/file_rename_response.rbi +35 -0
  223. data/rbi/imagekitio/models/file_update_params.rbi +58 -0
  224. data/rbi/imagekitio/models/file_update_response.rbi +322 -0
  225. data/rbi/imagekitio/models/file_upload_params.rbi +897 -0
  226. data/rbi/imagekitio/models/file_upload_response.rbi +1176 -0
  227. data/rbi/imagekitio/models/files/bulk_add_tags_params.rbi +56 -0
  228. data/rbi/imagekitio/models/files/bulk_add_tags_response.rbi +41 -0
  229. data/rbi/imagekitio/models/files/bulk_delete_params.rbi +48 -0
  230. data/rbi/imagekitio/models/files/bulk_delete_response.rbi +41 -0
  231. data/rbi/imagekitio/models/files/bulk_remove_ai_tags_params.rbi +56 -0
  232. data/rbi/imagekitio/models/files/bulk_remove_ai_tags_response.rbi +41 -0
  233. data/rbi/imagekitio/models/files/bulk_remove_tags_params.rbi +56 -0
  234. data/rbi/imagekitio/models/files/bulk_remove_tags_response.rbi +41 -0
  235. data/rbi/imagekitio/models/files/metadata_get_from_url_params.rbi +47 -0
  236. data/rbi/imagekitio/models/files/metadata_get_params.rbi +34 -0
  237. data/rbi/imagekitio/models/files/version_delete_params.rbi +40 -0
  238. data/rbi/imagekitio/models/files/version_delete_response.rbi +25 -0
  239. data/rbi/imagekitio/models/files/version_get_params.rbi +40 -0
  240. data/rbi/imagekitio/models/files/version_list_params.rbi +34 -0
  241. data/rbi/imagekitio/models/files/version_list_response.rbi +13 -0
  242. data/rbi/imagekitio/models/files/version_restore_params.rbi +40 -0
  243. data/rbi/imagekitio/models/folder.rbi +121 -0
  244. data/rbi/imagekitio/models/folder_copy_params.rbi +68 -0
  245. data/rbi/imagekitio/models/folder_copy_response.rbi +33 -0
  246. data/rbi/imagekitio/models/folder_create_params.rbi +71 -0
  247. data/rbi/imagekitio/models/folder_create_response.rbi +23 -0
  248. data/rbi/imagekitio/models/folder_delete_params.rbi +40 -0
  249. data/rbi/imagekitio/models/folder_delete_response.rbi +23 -0
  250. data/rbi/imagekitio/models/folder_move_params.rbi +53 -0
  251. data/rbi/imagekitio/models/folder_move_response.rbi +33 -0
  252. data/rbi/imagekitio/models/folder_rename_params.rbi +98 -0
  253. data/rbi/imagekitio/models/folder_rename_response.rbi +33 -0
  254. data/rbi/imagekitio/models/folders/job_get_params.rbi +34 -0
  255. data/rbi/imagekitio/models/folders/job_get_response.rbi +173 -0
  256. data/rbi/imagekitio/models/get_image_attributes_options.rbi +121 -0
  257. data/rbi/imagekitio/models/image_overlay.rbi +109 -0
  258. data/rbi/imagekitio/models/metadata.rbi +813 -0
  259. data/rbi/imagekitio/models/overlay.rbi +28 -0
  260. data/rbi/imagekitio/models/overlay_position.rbi +148 -0
  261. data/rbi/imagekitio/models/overlay_timing.rbi +135 -0
  262. data/rbi/imagekitio/models/responsive_image_attributes.rbi +74 -0
  263. data/rbi/imagekitio/models/solid_color_overlay.rbi +79 -0
  264. data/rbi/imagekitio/models/solid_color_overlay_transformation.rbi +218 -0
  265. data/rbi/imagekitio/models/src_options.rbi +159 -0
  266. data/rbi/imagekitio/models/streaming_resolution.rbi +38 -0
  267. data/rbi/imagekitio/models/subtitle_overlay.rbi +114 -0
  268. data/rbi/imagekitio/models/subtitle_overlay_transformation.rbi +215 -0
  269. data/rbi/imagekitio/models/text_overlay.rbi +110 -0
  270. data/rbi/imagekitio/models/text_overlay_transformation.rbi +451 -0
  271. data/rbi/imagekitio/models/transformation.rbi +1646 -0
  272. data/rbi/imagekitio/models/transformation_position.rbi +28 -0
  273. data/rbi/imagekitio/models/unsafe_unwrap_webhook_event.rbi +33 -0
  274. data/rbi/imagekitio/models/unwrap_webhook_event.rbi +31 -0
  275. data/rbi/imagekitio/models/update_file_request.rbi +316 -0
  276. data/rbi/imagekitio/models/upload_post_transform_error_event.rbi +434 -0
  277. data/rbi/imagekitio/models/upload_post_transform_success_event.rbi +327 -0
  278. data/rbi/imagekitio/models/upload_pre_transform_error_event.rbi +244 -0
  279. data/rbi/imagekitio/models/upload_pre_transform_success_event.rbi +1300 -0
  280. data/rbi/imagekitio/models/video_overlay.rbi +105 -0
  281. data/rbi/imagekitio/models/video_transformation_accepted_event.rbi +659 -0
  282. data/rbi/imagekitio/models/video_transformation_error_event.rbi +772 -0
  283. data/rbi/imagekitio/models/video_transformation_ready_event.rbi +864 -0
  284. data/rbi/imagekitio/models/webhook_unsafe_unwrap_params.rbi +30 -0
  285. data/rbi/imagekitio/models/webhook_unwrap_params.rbi +27 -0
  286. data/rbi/imagekitio/models.rbi +135 -0
  287. data/rbi/imagekitio/request_options.rbi +59 -0
  288. data/rbi/imagekitio/resources/accounts/origins.rbi +91 -0
  289. data/rbi/imagekitio/resources/accounts/url_endpoints.rbi +129 -0
  290. data/rbi/imagekitio/resources/accounts/usage.rbi +36 -0
  291. data/rbi/imagekitio/resources/accounts.rbi +21 -0
  292. data/rbi/imagekitio/resources/assets.rbi +74 -0
  293. data/rbi/imagekitio/resources/beta/v2/files.rbi +193 -0
  294. data/rbi/imagekitio/resources/beta/v2.rbi +17 -0
  295. data/rbi/imagekitio/resources/beta.rbi +15 -0
  296. data/rbi/imagekitio/resources/cache/invalidation.rbi +44 -0
  297. data/rbi/imagekitio/resources/cache.rbi +15 -0
  298. data/rbi/imagekitio/resources/custom_metadata_fields.rbi +106 -0
  299. data/rbi/imagekitio/resources/files/bulk.rbi +88 -0
  300. data/rbi/imagekitio/resources/files/metadata.rbi +49 -0
  301. data/rbi/imagekitio/resources/files/versions.rbi +89 -0
  302. data/rbi/imagekitio/resources/files.rbi +364 -0
  303. data/rbi/imagekitio/resources/folders/job.rbi +29 -0
  304. data/rbi/imagekitio/resources/folders.rbi +146 -0
  305. data/rbi/imagekitio/resources/webhooks.rbi +50 -0
  306. data/rbi/imagekitio/version.rbi +5 -0
  307. data/sig/imagekitio/client.rbs +47 -0
  308. data/sig/imagekitio/errors.rbs +117 -0
  309. data/sig/imagekitio/file_part.rbs +21 -0
  310. data/sig/imagekitio/helpers/helper.rbs +24 -0
  311. data/sig/imagekitio/internal/transport/base_client.rbs +131 -0
  312. data/sig/imagekitio/internal/transport/pooled_net_requester.rbs +45 -0
  313. data/sig/imagekitio/internal/type/array_of.rbs +48 -0
  314. data/sig/imagekitio/internal/type/base_model.rbs +102 -0
  315. data/sig/imagekitio/internal/type/base_page.rbs +24 -0
  316. data/sig/imagekitio/internal/type/boolean.rbs +26 -0
  317. data/sig/imagekitio/internal/type/converter.rbs +79 -0
  318. data/sig/imagekitio/internal/type/enum.rbs +32 -0
  319. data/sig/imagekitio/internal/type/file_input.rbs +25 -0
  320. data/sig/imagekitio/internal/type/hash_of.rbs +48 -0
  321. data/sig/imagekitio/internal/type/request_parameters.rbs +19 -0
  322. data/sig/imagekitio/internal/type/union.rbs +52 -0
  323. data/sig/imagekitio/internal/type/unknown.rbs +26 -0
  324. data/sig/imagekitio/internal/util.rbs +185 -0
  325. data/sig/imagekitio/internal.rbs +9 -0
  326. data/sig/imagekitio/models/accounts/origin_create_params.rbs +30 -0
  327. data/sig/imagekitio/models/accounts/origin_delete_params.rbs +17 -0
  328. data/sig/imagekitio/models/accounts/origin_get_params.rbs +17 -0
  329. data/sig/imagekitio/models/accounts/origin_list_params.rbs +17 -0
  330. data/sig/imagekitio/models/accounts/origin_list_response.rbs +10 -0
  331. data/sig/imagekitio/models/accounts/origin_request.rbs +468 -0
  332. data/sig/imagekitio/models/accounts/origin_response.rbs +418 -0
  333. data/sig/imagekitio/models/accounts/origin_update_params.rbs +30 -0
  334. data/sig/imagekitio/models/accounts/url_endpoint_create_params.rbs +17 -0
  335. data/sig/imagekitio/models/accounts/url_endpoint_delete_params.rbs +17 -0
  336. data/sig/imagekitio/models/accounts/url_endpoint_get_params.rbs +17 -0
  337. data/sig/imagekitio/models/accounts/url_endpoint_list_params.rbs +17 -0
  338. data/sig/imagekitio/models/accounts/url_endpoint_list_response.rbs +10 -0
  339. data/sig/imagekitio/models/accounts/url_endpoint_request.rbs +97 -0
  340. data/sig/imagekitio/models/accounts/url_endpoint_response.rbs +96 -0
  341. data/sig/imagekitio/models/accounts/url_endpoint_update_params.rbs +17 -0
  342. data/sig/imagekitio/models/accounts/usage_get_params.rbs +30 -0
  343. data/sig/imagekitio/models/accounts/usage_get_response.rbs +52 -0
  344. data/sig/imagekitio/models/asset_list_params.rbs +138 -0
  345. data/sig/imagekitio/models/asset_list_response.rbs +16 -0
  346. data/sig/imagekitio/models/base_overlay.rbs +31 -0
  347. data/sig/imagekitio/models/base_webhook_event.rbs +15 -0
  348. data/sig/imagekitio/models/beta/v2/file_upload_params.rbs +310 -0
  349. data/sig/imagekitio/models/beta/v2/file_upload_response.rbs +487 -0
  350. data/sig/imagekitio/models/cache/invalidation_create_params.rbs +25 -0
  351. data/sig/imagekitio/models/cache/invalidation_create_response.rbs +17 -0
  352. data/sig/imagekitio/models/cache/invalidation_get_params.rbs +17 -0
  353. data/sig/imagekitio/models/cache/invalidation_get_response.rbs +35 -0
  354. data/sig/imagekitio/models/custom_metadata_field.rbs +178 -0
  355. data/sig/imagekitio/models/custom_metadata_field_create_params.rbs +179 -0
  356. data/sig/imagekitio/models/custom_metadata_field_delete_params.rbs +15 -0
  357. data/sig/imagekitio/models/custom_metadata_field_delete_response.rbs +11 -0
  358. data/sig/imagekitio/models/custom_metadata_field_list_params.rbs +32 -0
  359. data/sig/imagekitio/models/custom_metadata_field_list_response.rbs +8 -0
  360. data/sig/imagekitio/models/custom_metadata_field_update_params.rbs +152 -0
  361. data/sig/imagekitio/models/extensions.rbs +132 -0
  362. data/sig/imagekitio/models/file.rbs +384 -0
  363. data/sig/imagekitio/models/file_copy_params.rbs +38 -0
  364. data/sig/imagekitio/models/file_copy_response.rbs +11 -0
  365. data/sig/imagekitio/models/file_delete_params.rbs +15 -0
  366. data/sig/imagekitio/models/file_get_params.rbs +14 -0
  367. data/sig/imagekitio/models/file_move_params.rbs +28 -0
  368. data/sig/imagekitio/models/file_move_response.rbs +11 -0
  369. data/sig/imagekitio/models/file_rename_params.rbs +34 -0
  370. data/sig/imagekitio/models/file_rename_response.rbs +15 -0
  371. data/sig/imagekitio/models/file_update_params.rbs +28 -0
  372. data/sig/imagekitio/models/file_update_response.rbs +120 -0
  373. data/sig/imagekitio/models/file_upload_params.rbs +327 -0
  374. data/sig/imagekitio/models/file_upload_response.rbs +483 -0
  375. data/sig/imagekitio/models/files/bulk_add_tags_params.rbs +30 -0
  376. data/sig/imagekitio/models/files/bulk_add_tags_response.rbs +20 -0
  377. data/sig/imagekitio/models/files/bulk_delete_params.rbs +26 -0
  378. data/sig/imagekitio/models/files/bulk_delete_response.rbs +20 -0
  379. data/sig/imagekitio/models/files/bulk_remove_ai_tags_params.rbs +30 -0
  380. data/sig/imagekitio/models/files/bulk_remove_ai_tags_response.rbs +20 -0
  381. data/sig/imagekitio/models/files/bulk_remove_tags_params.rbs +30 -0
  382. data/sig/imagekitio/models/files/bulk_remove_tags_response.rbs +20 -0
  383. data/sig/imagekitio/models/files/metadata_get_from_url_params.rbs +25 -0
  384. data/sig/imagekitio/models/files/metadata_get_params.rbs +17 -0
  385. data/sig/imagekitio/models/files/version_delete_params.rbs +25 -0
  386. data/sig/imagekitio/models/files/version_delete_response.rbs +13 -0
  387. data/sig/imagekitio/models/files/version_get_params.rbs +25 -0
  388. data/sig/imagekitio/models/files/version_list_params.rbs +17 -0
  389. data/sig/imagekitio/models/files/version_list_response.rbs +9 -0
  390. data/sig/imagekitio/models/files/version_restore_params.rbs +25 -0
  391. data/sig/imagekitio/models/folder.rbs +69 -0
  392. data/sig/imagekitio/models/folder_copy_params.rbs +38 -0
  393. data/sig/imagekitio/models/folder_copy_response.rbs +13 -0
  394. data/sig/imagekitio/models/folder_create_params.rbs +28 -0
  395. data/sig/imagekitio/models/folder_create_response.rbs +11 -0
  396. data/sig/imagekitio/models/folder_delete_params.rbs +23 -0
  397. data/sig/imagekitio/models/folder_delete_response.rbs +11 -0
  398. data/sig/imagekitio/models/folder_move_params.rbs +28 -0
  399. data/sig/imagekitio/models/folder_move_response.rbs +13 -0
  400. data/sig/imagekitio/models/folder_rename_params.rbs +34 -0
  401. data/sig/imagekitio/models/folder_rename_response.rbs +13 -0
  402. data/sig/imagekitio/models/folders/job_get_params.rbs +17 -0
  403. data/sig/imagekitio/models/folders/job_get_response.rbs +72 -0
  404. data/sig/imagekitio/models/get_image_attributes_options.rbs +43 -0
  405. data/sig/imagekitio/models/image_overlay.rbs +59 -0
  406. data/sig/imagekitio/models/metadata.rbs +546 -0
  407. data/sig/imagekitio/models/overlay.rbs +16 -0
  408. data/sig/imagekitio/models/overlay_position.rbs +85 -0
  409. data/sig/imagekitio/models/overlay_timing.rbs +66 -0
  410. data/sig/imagekitio/models/responsive_image_attributes.rbs +36 -0
  411. data/sig/imagekitio/models/solid_color_overlay.rbs +38 -0
  412. data/sig/imagekitio/models/solid_color_overlay_transformation.rbs +97 -0
  413. data/sig/imagekitio/models/src_options.rbs +64 -0
  414. data/sig/imagekitio/models/streaming_resolution.rbs +20 -0
  415. data/sig/imagekitio/models/subtitle_overlay.rbs +59 -0
  416. data/sig/imagekitio/models/subtitle_overlay_transformation.rbs +78 -0
  417. data/sig/imagekitio/models/text_overlay.rbs +59 -0
  418. data/sig/imagekitio/models/text_overlay_transformation.rbs +195 -0
  419. data/sig/imagekitio/models/transformation.rbs +763 -0
  420. data/sig/imagekitio/models/transformation_position.rbs +14 -0
  421. data/sig/imagekitio/models/unsafe_unwrap_webhook_event.rbs +18 -0
  422. data/sig/imagekitio/models/unwrap_webhook_event.rbs +18 -0
  423. data/sig/imagekitio/models/update_file_request.rbs +122 -0
  424. data/sig/imagekitio/models/upload_post_transform_error_event.rbs +192 -0
  425. data/sig/imagekitio/models/upload_post_transform_success_event.rbs +142 -0
  426. data/sig/imagekitio/models/upload_pre_transform_error_event.rbs +115 -0
  427. data/sig/imagekitio/models/upload_pre_transform_success_event.rbs +541 -0
  428. data/sig/imagekitio/models/video_overlay.rbs +59 -0
  429. data/sig/imagekitio/models/video_transformation_accepted_event.rbs +261 -0
  430. data/sig/imagekitio/models/video_transformation_error_event.rbs +300 -0
  431. data/sig/imagekitio/models/video_transformation_ready_event.rbs +359 -0
  432. data/sig/imagekitio/models/webhook_unsafe_unwrap_params.rbs +15 -0
  433. data/sig/imagekitio/models/webhook_unwrap_params.rbs +15 -0
  434. data/sig/imagekitio/models.rbs +119 -0
  435. data/sig/imagekitio/request_options.rbs +36 -0
  436. data/sig/imagekitio/resources/accounts/origins.rbs +34 -0
  437. data/sig/imagekitio/resources/accounts/url_endpoints.rbs +40 -0
  438. data/sig/imagekitio/resources/accounts/usage.rbs +15 -0
  439. data/sig/imagekitio/resources/accounts.rbs +13 -0
  440. data/sig/imagekitio/resources/assets.rbs +18 -0
  441. data/sig/imagekitio/resources/beta/v2/files.rbs +35 -0
  442. data/sig/imagekitio/resources/beta/v2.rbs +11 -0
  443. data/sig/imagekitio/resources/beta.rbs +9 -0
  444. data/sig/imagekitio/resources/cache/invalidation.rbs +19 -0
  445. data/sig/imagekitio/resources/cache.rbs +9 -0
  446. data/sig/imagekitio/resources/custom_metadata_fields.rbs +32 -0
  447. data/sig/imagekitio/resources/files/bulk.rbs +32 -0
  448. data/sig/imagekitio/resources/files/metadata.rbs +19 -0
  449. data/sig/imagekitio/resources/files/versions.rbs +32 -0
  450. data/sig/imagekitio/resources/files.rbs +76 -0
  451. data/sig/imagekitio/resources/folders/job.rbs +14 -0
  452. data/sig/imagekitio/resources/folders.rbs +40 -0
  453. data/sig/imagekitio/resources/webhooks.rbs +27 -0
  454. data/sig/imagekitio/version.rbs +3 -0
  455. metadata +470 -136
  456. data/Rakefile +0 -27
  457. data/lib/active_storage/active_storage.rb +0 -7
  458. data/lib/active_storage/service/ik_file.rb +0 -115
  459. data/lib/active_storage/service/image_kit_io_service.rb +0 -188
  460. data/lib/carrierwave/carrierwave.rb +0 -83
  461. data/lib/carrierwave/storage/ik_file.rb +0 -51
  462. data/lib/carrierwave/storage/imagekit_store.rb +0 -68
  463. data/lib/carrierwave/support/uri_filename.rb +0 -12
  464. data/lib/imagekitio/api_service/bulk.rb +0 -58
  465. data/lib/imagekitio/api_service/custom_metadata_field.rb +0 -52
  466. data/lib/imagekitio/api_service/file.rb +0 -221
  467. data/lib/imagekitio/api_service/folder.rb +0 -49
  468. data/lib/imagekitio/base.rb +0 -12
  469. data/lib/imagekitio/configurable.rb +0 -43
  470. data/lib/imagekitio/constant.rb +0 -36
  471. data/lib/imagekitio/constants/default.rb +0 -22
  472. data/lib/imagekitio/constants/error.rb +0 -69
  473. data/lib/imagekitio/constants/file.rb +0 -11
  474. data/lib/imagekitio/constants/supported_transformation.rb +0 -39
  475. data/lib/imagekitio/constants/url.rb +0 -14
  476. data/lib/imagekitio/railtie.rb +0 -4
  477. data/lib/imagekitio/request.rb +0 -98
  478. data/lib/imagekitio/sdk/version.rb +0 -5
  479. data/lib/imagekitio/url.rb +0 -216
  480. data/lib/imagekitio/utils/calculation.rb +0 -45
  481. data/lib/imagekitio/utils/formatter.rb +0 -48
  482. data/lib/imagekitio/utils/option_validator.rb +0 -36
  483. data/lib/tasks/imagekitio/imagekitio_tasks.rake +0 -4
@@ -0,0 +1,1100 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Imagekitio
4
+ module Models
5
+ class Transformation < Imagekitio::Internal::Type::BaseModel
6
+ # @!attribute ai_change_background
7
+ # Uses AI to change the background. Provide a text prompt or a base64-encoded
8
+ # prompt, e.g., `prompt-snow road` or `prompte-[urlencoded_base64_encoded_text]`.
9
+ # Not supported inside overlay. See
10
+ # [AI Change Background](https://imagekit.io/docs/ai-transformations#change-background-e-changebg).
11
+ #
12
+ # @return [String, nil]
13
+ optional :ai_change_background, String, api_name: :aiChangeBackground
14
+
15
+ # @!attribute ai_drop_shadow
16
+ # Adds an AI-based drop shadow around a foreground object on a transparent or
17
+ # removed background. Optionally, control the direction, elevation, and saturation
18
+ # of the light source (e.g., `az-45` to change light direction). Pass `true` for
19
+ # the default drop shadow, or provide a string for a custom drop shadow. Supported
20
+ # inside overlay. See
21
+ # [AI Drop Shadow](https://imagekit.io/docs/ai-transformations#ai-drop-shadow-e-dropshadow).
22
+ #
23
+ # @return [Boolean, true, String, nil]
24
+ optional :ai_drop_shadow,
25
+ union: -> {
26
+ Imagekitio::Transformation::AIDropShadow
27
+ },
28
+ api_name: :aiDropShadow
29
+
30
+ # @!attribute ai_edit
31
+ # Uses AI to edit images based on a text prompt. Provide a text prompt or a
32
+ # base64-encoded prompt, e.g., `prompt-snow road` or
33
+ # `prompte-[urlencoded_base64_encoded_text]`. Not supported inside overlay.
34
+ # See [AI Edit](https://imagekit.io/docs/ai-transformations#edit-image-e-edit).
35
+ #
36
+ # @return [String, nil]
37
+ optional :ai_edit, String, api_name: :aiEdit
38
+
39
+ # @!attribute ai_remove_background
40
+ # Applies ImageKit's in-house background removal. Supported inside overlay. See
41
+ # [AI Background Removal](https://imagekit.io/docs/ai-transformations#imagekit-background-removal-e-bgremove).
42
+ #
43
+ # @return [Boolean, Imagekitio::Models::Transformation::AIRemoveBackground, nil]
44
+ optional :ai_remove_background,
45
+ enum: -> { Imagekitio::Transformation::AIRemoveBackground },
46
+ api_name: :aiRemoveBackground
47
+
48
+ # @!attribute ai_remove_background_external
49
+ # Uses third-party background removal. Note: It is recommended to use
50
+ # aiRemoveBackground, ImageKit's in-house solution, which is more cost-effective.
51
+ # Supported inside overlay. See
52
+ # [External Background Removal](https://imagekit.io/docs/ai-transformations#background-removal-e-removedotbg).
53
+ #
54
+ # @return [Boolean, Imagekitio::Models::Transformation::AIRemoveBackgroundExternal, nil]
55
+ optional :ai_remove_background_external,
56
+ enum: -> { Imagekitio::Transformation::AIRemoveBackgroundExternal },
57
+ api_name: :aiRemoveBackgroundExternal
58
+
59
+ # @!attribute ai_retouch
60
+ # Performs AI-based retouching to improve faces or product shots. Not supported
61
+ # inside overlay. See
62
+ # [AI Retouch](https://imagekit.io/docs/ai-transformations#retouch-e-retouch).
63
+ #
64
+ # @return [Boolean, Imagekitio::Models::Transformation::AIRetouch, nil]
65
+ optional :ai_retouch, enum: -> { Imagekitio::Transformation::AIRetouch }, api_name: :aiRetouch
66
+
67
+ # @!attribute ai_upscale
68
+ # Upscales images beyond their original dimensions using AI. Not supported inside
69
+ # overlay. See
70
+ # [AI Upscale](https://imagekit.io/docs/ai-transformations#upscale-e-upscale).
71
+ #
72
+ # @return [Boolean, Imagekitio::Models::Transformation::AIUpscale, nil]
73
+ optional :ai_upscale, enum: -> { Imagekitio::Transformation::AIUpscale }, api_name: :aiUpscale
74
+
75
+ # @!attribute ai_variation
76
+ # Generates a variation of an image using AI. This produces a new image with
77
+ # slight variations from the original, such as changes in color, texture, and
78
+ # other visual elements, while preserving the structure and essence of the
79
+ # original image. Not supported inside overlay. See
80
+ # [AI Generate Variations](https://imagekit.io/docs/ai-transformations#generate-variations-of-an-image-e-genvar).
81
+ #
82
+ # @return [Boolean, Imagekitio::Models::Transformation::AIVariation, nil]
83
+ optional :ai_variation, enum: -> { Imagekitio::Transformation::AIVariation }, api_name: :aiVariation
84
+
85
+ # @!attribute aspect_ratio
86
+ # Specifies the aspect ratio for the output, e.g., "ar-4-3". Typically used with
87
+ # either width or height (but not both). For example: aspectRatio = `4:3`, `4_3`,
88
+ # or an expression like `iar_div_2`. See
89
+ # [Image resize and crop – Aspect ratio](https://imagekit.io/docs/image-resize-and-crop#aspect-ratio---ar).
90
+ #
91
+ # @return [Float, String, nil]
92
+ optional :aspect_ratio, union: -> { Imagekitio::Transformation::AspectRatio }, api_name: :aspectRatio
93
+
94
+ # @!attribute audio_codec
95
+ # Specifies the audio codec, e.g., `aac`, `opus`, or `none`. See
96
+ # [Audio codec](https://imagekit.io/docs/video-optimization#audio-codec---ac).
97
+ #
98
+ # @return [Symbol, Imagekitio::Models::Transformation::AudioCodec, nil]
99
+ optional :audio_codec, enum: -> { Imagekitio::Transformation::AudioCodec }, api_name: :audioCodec
100
+
101
+ # @!attribute background
102
+ # Specifies the background to be used in conjunction with certain cropping
103
+ # strategies when resizing an image.
104
+ #
105
+ # - A solid color: e.g., `red`, `F3F3F3`, `AAFF0010`. See
106
+ # [Solid color background](https://imagekit.io/docs/effects-and-enhancements#solid-color-background).
107
+ # - A blurred background: e.g., `blurred`, `blurred_25_N15`, etc. See
108
+ # [Blurred background](https://imagekit.io/docs/effects-and-enhancements#blurred-background).
109
+ # - Expand the image boundaries using generative fill: `genfill`. Not supported
110
+ # inside overlay. Optionally, control the background scene by passing a text
111
+ # prompt: `genfill[:-prompt-${text}]` or
112
+ # `genfill[:-prompte-${urlencoded_base64_encoded_text}]`. See
113
+ # [Generative fill background](https://imagekit.io/docs/ai-transformations#generative-fill-bg-genfill).
114
+ #
115
+ # @return [String, nil]
116
+ optional :background, String
117
+
118
+ # @!attribute blur
119
+ # Specifies the Gaussian blur level. Accepts an integer value between 1 and 100,
120
+ # or an expression like `bl-10`. See
121
+ # [Blur](https://imagekit.io/docs/effects-and-enhancements#blur---bl).
122
+ #
123
+ # @return [Float, nil]
124
+ optional :blur, Float
125
+
126
+ # @!attribute border
127
+ # Adds a border to the output media. Accepts a string in the format
128
+ # `<border-width>_<hex-code>` (e.g., `5_FFF000` for a 5px yellow border), or an
129
+ # expression like `ih_div_20_FF00FF`. See
130
+ # [Border](https://imagekit.io/docs/effects-and-enhancements#border---b).
131
+ #
132
+ # @return [String, nil]
133
+ optional :border, String
134
+
135
+ # @!attribute color_profile
136
+ # Indicates whether the output image should retain the original color profile. See
137
+ # [Color profile](https://imagekit.io/docs/image-optimization#color-profile---cp).
138
+ #
139
+ # @return [Boolean, nil]
140
+ optional :color_profile, Imagekitio::Internal::Type::Boolean, api_name: :colorProfile
141
+
142
+ # @!attribute contrast_stretch
143
+ # Automatically enhances the contrast of an image (contrast stretch). See
144
+ # [Contrast Stretch](https://imagekit.io/docs/effects-and-enhancements#contrast-stretch---e-contrast).
145
+ #
146
+ # @return [Boolean, Imagekitio::Models::Transformation::ContrastStretch, nil]
147
+ optional :contrast_stretch,
148
+ enum: -> { Imagekitio::Transformation::ContrastStretch },
149
+ api_name: :contrastStretch
150
+
151
+ # @!attribute crop
152
+ # Crop modes for image resizing. See
153
+ # [Crop modes & focus](https://imagekit.io/docs/image-resize-and-crop#crop-crop-modes--focus).
154
+ #
155
+ # @return [Symbol, Imagekitio::Models::Transformation::Crop, nil]
156
+ optional :crop, enum: -> { Imagekitio::Transformation::Crop }
157
+
158
+ # @!attribute crop_mode
159
+ # Additional crop modes for image resizing. See
160
+ # [Crop modes & focus](https://imagekit.io/docs/image-resize-and-crop#crop-crop-modes--focus).
161
+ #
162
+ # @return [Symbol, Imagekitio::Models::Transformation::CropMode, nil]
163
+ optional :crop_mode, enum: -> { Imagekitio::Transformation::CropMode }, api_name: :cropMode
164
+
165
+ # @!attribute default_image
166
+ # Specifies a fallback image if the resource is not found, e.g., a URL or file
167
+ # path. See
168
+ # [Default image](https://imagekit.io/docs/image-transformation#default-image---di).
169
+ #
170
+ # @return [String, nil]
171
+ optional :default_image, String, api_name: :defaultImage
172
+
173
+ # @!attribute dpr
174
+ # Accepts values between 0.1 and 5, or `auto` for automatic device pixel ratio
175
+ # (DPR) calculation. See
176
+ # [DPR](https://imagekit.io/docs/image-resize-and-crop#dpr---dpr).
177
+ #
178
+ # @return [Float, nil]
179
+ optional :dpr, Float
180
+
181
+ # @!attribute duration
182
+ # Specifies the duration (in seconds) for trimming videos, e.g., `5` or `10.5`.
183
+ # Typically used with startOffset to indicate the length from the start offset.
184
+ # Arithmetic expressions are supported. See
185
+ # [Trim videos – Duration](https://imagekit.io/docs/trim-videos#duration---du).
186
+ #
187
+ # @return [Float, String, nil]
188
+ optional :duration, union: -> { Imagekitio::Transformation::Duration }
189
+
190
+ # @!attribute end_offset
191
+ # Specifies the end offset (in seconds) for trimming videos, e.g., `5` or `10.5`.
192
+ # Typically used with startOffset to define a time window. Arithmetic expressions
193
+ # are supported. See
194
+ # [Trim videos – End offset](https://imagekit.io/docs/trim-videos#end-offset---eo).
195
+ #
196
+ # @return [Float, String, nil]
197
+ optional :end_offset, union: -> { Imagekitio::Transformation::EndOffset }, api_name: :endOffset
198
+
199
+ # @!attribute flip
200
+ # Flips or mirrors an image either horizontally, vertically, or both. Acceptable
201
+ # values: `h` (horizontal), `v` (vertical), `h_v` (horizontal and vertical), or
202
+ # `v_h`. See [Flip](https://imagekit.io/docs/effects-and-enhancements#flip---fl).
203
+ #
204
+ # @return [Symbol, Imagekitio::Models::Transformation::Flip, nil]
205
+ optional :flip, enum: -> { Imagekitio::Transformation::Flip }
206
+
207
+ # @!attribute focus
208
+ # Refines padding and cropping behavior for pad resize, maintain ratio, and
209
+ # extract crop modes. Supports manual positions and coordinate-based focus. With
210
+ # AI-based cropping, you can automatically keep key subjects in frame—such as
211
+ # faces or detected objects (e.g., `fo-face`, `fo-person`, `fo-car`)— while
212
+ # resizing.
213
+ #
214
+ # - See [Focus](https://imagekit.io/docs/image-resize-and-crop#focus---fo).
215
+ # - [Object aware cropping](https://imagekit.io/docs/image-resize-and-crop#object-aware-cropping---fo-object-name)
216
+ #
217
+ # @return [String, nil]
218
+ optional :focus, String
219
+
220
+ # @!attribute format_
221
+ # Specifies the output format for images or videos, e.g., `jpg`, `png`, `webp`,
222
+ # `mp4`, or `auto`. You can also pass `orig` for images to return the original
223
+ # format. ImageKit automatically delivers images and videos in the optimal format
224
+ # based on device support unless overridden by the dashboard settings or the
225
+ # format parameter. See
226
+ # [Image format](https://imagekit.io/docs/image-optimization#format---f) and
227
+ # [Video format](https://imagekit.io/docs/video-optimization#format---f).
228
+ #
229
+ # @return [Symbol, Imagekitio::Models::Transformation::Format, nil]
230
+ optional :format_, enum: -> { Imagekitio::Transformation::Format }, api_name: :format
231
+
232
+ # @!attribute gradient
233
+ # Creates a linear gradient with two colors. Pass `true` for a default gradient,
234
+ # or provide a string for a custom gradient. See
235
+ # [Gradient](https://imagekit.io/docs/effects-and-enhancements#gradient---e-gradient).
236
+ #
237
+ # @return [Boolean, true, String, nil]
238
+ optional :gradient, union: -> { Imagekitio::Transformation::Gradient }
239
+
240
+ # @!attribute grayscale
241
+ # Enables a grayscale effect for images. See
242
+ # [Grayscale](https://imagekit.io/docs/effects-and-enhancements#grayscale---e-grayscale).
243
+ #
244
+ # @return [Boolean, Imagekitio::Models::Transformation::Grayscale, nil]
245
+ optional :grayscale, enum: -> { Imagekitio::Transformation::Grayscale }
246
+
247
+ # @!attribute height
248
+ # Specifies the height of the output. If a value between 0 and 1 is provided, it
249
+ # is treated as a percentage (e.g., `0.5` represents 50% of the original height).
250
+ # You can also supply arithmetic expressions (e.g., `ih_mul_0.5`). Height
251
+ # transformation –
252
+ # [Images](https://imagekit.io/docs/image-resize-and-crop#height---h) ·
253
+ # [Videos](https://imagekit.io/docs/video-resize-and-crop#height---h)
254
+ #
255
+ # @return [Float, String, nil]
256
+ optional :height, union: -> { Imagekitio::Transformation::Height }
257
+
258
+ # @!attribute lossless
259
+ # Specifies whether the output image (in JPEG or PNG) should be compressed
260
+ # losslessly. See
261
+ # [Lossless compression](https://imagekit.io/docs/image-optimization#lossless-webp-and-png---lo).
262
+ #
263
+ # @return [Boolean, nil]
264
+ optional :lossless, Imagekitio::Internal::Type::Boolean
265
+
266
+ # @!attribute metadata
267
+ # By default, ImageKit removes all metadata during automatic image compression.
268
+ # Set this to true to preserve metadata. See
269
+ # [Image metadata](https://imagekit.io/docs/image-optimization#image-metadata---md).
270
+ #
271
+ # @return [Boolean, nil]
272
+ optional :metadata, Imagekitio::Internal::Type::Boolean
273
+
274
+ # @!attribute named
275
+ # Named transformation reference. See
276
+ # [Named transformations](https://imagekit.io/docs/transformations#named-transformations).
277
+ #
278
+ # @return [String, nil]
279
+ optional :named, String
280
+
281
+ # @!attribute opacity
282
+ # Specifies the opacity level of the output image. See
283
+ # [Opacity](https://imagekit.io/docs/effects-and-enhancements#opacity---o).
284
+ #
285
+ # @return [Float, nil]
286
+ optional :opacity, Float
287
+
288
+ # @!attribute original
289
+ # If set to true, serves the original file without applying any transformations.
290
+ # See
291
+ # [Deliver original file as-is](https://imagekit.io/docs/core-delivery-features#deliver-original-file-as-is---orig-true).
292
+ #
293
+ # @return [Boolean, nil]
294
+ optional :original, Imagekitio::Internal::Type::Boolean
295
+
296
+ # @!attribute overlay
297
+ # Specifies an overlay to be applied on the parent image or video. ImageKit
298
+ # supports overlays including images, text, videos, subtitles, and solid colors.
299
+ # See
300
+ # [Overlay using layers](https://imagekit.io/docs/transformations#overlay-using-layers).
301
+ #
302
+ # @return [Imagekitio::Models::Overlay, nil]
303
+ optional :overlay, union: -> { Imagekitio::Overlay }
304
+
305
+ # @!attribute page
306
+ # Extracts a specific page or frame from multi-page or layered files (PDF, PSD,
307
+ # AI). For example, specify by number (e.g., `2`), a range (e.g., `3-4` for the
308
+ # 2nd and 3rd layers), or by name (e.g., `name-layer-4` for a PSD layer). See
309
+ # [Thumbnail extraction](https://imagekit.io/docs/vector-and-animated-images#get-thumbnail-from-psd-pdf-ai-eps-and-animated-files).
310
+ #
311
+ # @return [Float, String, nil]
312
+ optional :page, union: -> { Imagekitio::Transformation::Page }
313
+
314
+ # @!attribute progressive
315
+ # Specifies whether the output JPEG image should be rendered progressively.
316
+ # Progressive loading begins with a low-quality, pixelated version of the full
317
+ # image, which gradually improves to provide a faster perceived load time. See
318
+ # [Progressive images](https://imagekit.io/docs/image-optimization#progressive-image---pr).
319
+ #
320
+ # @return [Boolean, nil]
321
+ optional :progressive, Imagekitio::Internal::Type::Boolean
322
+
323
+ # @!attribute quality
324
+ # Specifies the quality of the output image for lossy formats such as JPEG, WebP,
325
+ # and AVIF. A higher quality value results in a larger file size with better
326
+ # quality, while a lower value produces a smaller file size with reduced quality.
327
+ # See [Quality](https://imagekit.io/docs/image-optimization#quality---q).
328
+ #
329
+ # @return [Float, nil]
330
+ optional :quality, Float
331
+
332
+ # @!attribute radius
333
+ # Specifies the corner radius for rounded corners (e.g., 20) or `max` for circular
334
+ # or oval shape. See
335
+ # [Radius](https://imagekit.io/docs/effects-and-enhancements#radius---r).
336
+ #
337
+ # @return [Float, Symbol, :max, nil]
338
+ optional :radius, union: -> { Imagekitio::Transformation::Radius }
339
+
340
+ # @!attribute raw
341
+ # Pass any transformation not directly supported by the SDK. This transformation
342
+ # string is appended to the URL as provided.
343
+ #
344
+ # @return [String, nil]
345
+ optional :raw, String
346
+
347
+ # @!attribute rotation
348
+ # Specifies the rotation angle in degrees. Positive values rotate the image
349
+ # clockwise; you can also use, for example, `N40` for counterclockwise rotation or
350
+ # `auto` to use the orientation specified in the image's EXIF data. For videos,
351
+ # only the following values are supported: 0, 90, 180, 270, or 360. See
352
+ # [Rotate](https://imagekit.io/docs/effects-and-enhancements#rotate---rt).
353
+ #
354
+ # @return [Float, String, nil]
355
+ optional :rotation, union: -> { Imagekitio::Transformation::Rotation }
356
+
357
+ # @!attribute shadow
358
+ # Adds a shadow beneath solid objects in an image with a transparent background.
359
+ # For AI-based drop shadows, refer to aiDropShadow. Pass `true` for a default
360
+ # shadow, or provide a string for a custom shadow. See
361
+ # [Shadow](https://imagekit.io/docs/effects-and-enhancements#shadow---e-shadow).
362
+ #
363
+ # @return [Boolean, true, String, nil]
364
+ optional :shadow, union: -> { Imagekitio::Transformation::Shadow }
365
+
366
+ # @!attribute sharpen
367
+ # Sharpens the input image, highlighting edges and finer details. Pass `true` for
368
+ # default sharpening, or provide a numeric value for custom sharpening. See
369
+ # [Sharpen](https://imagekit.io/docs/effects-and-enhancements#sharpen---e-sharpen).
370
+ #
371
+ # @return [Boolean, true, Float, nil]
372
+ optional :sharpen, union: -> { Imagekitio::Transformation::Sharpen }
373
+
374
+ # @!attribute start_offset
375
+ # Specifies the start offset (in seconds) for trimming videos, e.g., `5` or
376
+ # `10.5`. Arithmetic expressions are also supported. See
377
+ # [Trim videos – Start offset](https://imagekit.io/docs/trim-videos#start-offset---so).
378
+ #
379
+ # @return [Float, String, nil]
380
+ optional :start_offset, union: -> { Imagekitio::Transformation::StartOffset }, api_name: :startOffset
381
+
382
+ # @!attribute streaming_resolutions
383
+ # An array of resolutions for adaptive bitrate streaming, e.g., [`240`, `360`,
384
+ # `480`, `720`, `1080`]. See
385
+ # [Adaptive Bitrate Streaming](https://imagekit.io/docs/adaptive-bitrate-streaming).
386
+ #
387
+ # @return [Array<Symbol, Imagekitio::Models::StreamingResolution>, nil]
388
+ optional :streaming_resolutions,
389
+ -> { Imagekitio::Internal::Type::ArrayOf[enum: Imagekitio::StreamingResolution] },
390
+ api_name: :streamingResolutions
391
+
392
+ # @!attribute trim
393
+ # Useful for images with a solid or nearly solid background and a central object.
394
+ # This parameter trims the background, leaving only the central object in the
395
+ # output image. See
396
+ # [Trim edges](https://imagekit.io/docs/effects-and-enhancements#trim-edges---t).
397
+ #
398
+ # @return [Boolean, true, Float, nil]
399
+ optional :trim, union: -> { Imagekitio::Transformation::Trim }
400
+
401
+ # @!attribute unsharp_mask
402
+ # Applies Unsharp Masking (USM), an image sharpening technique. Pass `true` for a
403
+ # default unsharp mask, or provide a string for a custom unsharp mask. See
404
+ # [Unsharp Mask](https://imagekit.io/docs/effects-and-enhancements#unsharp-mask---e-usm).
405
+ #
406
+ # @return [Boolean, true, String, nil]
407
+ optional :unsharp_mask, union: -> { Imagekitio::Transformation::UnsharpMask }, api_name: :unsharpMask
408
+
409
+ # @!attribute video_codec
410
+ # Specifies the video codec, e.g., `h264`, `vp9`, `av1`, or `none`. See
411
+ # [Video codec](https://imagekit.io/docs/video-optimization#video-codec---vc).
412
+ #
413
+ # @return [Symbol, Imagekitio::Models::Transformation::VideoCodec, nil]
414
+ optional :video_codec, enum: -> { Imagekitio::Transformation::VideoCodec }, api_name: :videoCodec
415
+
416
+ # @!attribute width
417
+ # Specifies the width of the output. If a value between 0 and 1 is provided, it is
418
+ # treated as a percentage (e.g., `0.4` represents 40% of the original width). You
419
+ # can also supply arithmetic expressions (e.g., `iw_div_2`). Width transformation
420
+ # – [Images](https://imagekit.io/docs/image-resize-and-crop#width---w) ·
421
+ # [Videos](https://imagekit.io/docs/video-resize-and-crop#width---w)
422
+ #
423
+ # @return [Float, String, nil]
424
+ optional :width, union: -> { Imagekitio::Transformation::Width }
425
+
426
+ # @!attribute x
427
+ # Focus using cropped image coordinates - X coordinate. See
428
+ # [Focus using cropped coordinates](https://imagekit.io/docs/image-resize-and-crop#example---focus-using-cropped-image-coordinates).
429
+ #
430
+ # @return [Float, String, nil]
431
+ optional :x, union: -> { Imagekitio::Transformation::X }
432
+
433
+ # @!attribute x_center
434
+ # Focus using cropped image coordinates - X center coordinate. See
435
+ # [Focus using cropped coordinates](https://imagekit.io/docs/image-resize-and-crop#example---focus-using-cropped-image-coordinates).
436
+ #
437
+ # @return [Float, String, nil]
438
+ optional :x_center, union: -> { Imagekitio::Transformation::XCenter }, api_name: :xCenter
439
+
440
+ # @!attribute y_
441
+ # Focus using cropped image coordinates - Y coordinate. See
442
+ # [Focus using cropped coordinates](https://imagekit.io/docs/image-resize-and-crop#example---focus-using-cropped-image-coordinates).
443
+ #
444
+ # @return [Float, String, nil]
445
+ optional :y_, union: -> { Imagekitio::Transformation::Y }, api_name: :y
446
+
447
+ # @!attribute y_center
448
+ # Focus using cropped image coordinates - Y center coordinate. See
449
+ # [Focus using cropped coordinates](https://imagekit.io/docs/image-resize-and-crop#example---focus-using-cropped-image-coordinates).
450
+ #
451
+ # @return [Float, String, nil]
452
+ optional :y_center, union: -> { Imagekitio::Transformation::YCenter }, api_name: :yCenter
453
+
454
+ # @!attribute zoom
455
+ # Accepts a numeric value that determines how much to zoom in or out of the
456
+ # cropped area. It should be used in conjunction with fo-face or fo-<object_name>.
457
+ # See [Zoom](https://imagekit.io/docs/image-resize-and-crop#zoom---z).
458
+ #
459
+ # @return [Float, nil]
460
+ optional :zoom, Float
461
+
462
+ # @!method initialize(ai_change_background: nil, ai_drop_shadow: nil, ai_edit: nil, ai_remove_background: nil, ai_remove_background_external: nil, ai_retouch: nil, ai_upscale: nil, ai_variation: nil, aspect_ratio: nil, audio_codec: nil, background: nil, blur: nil, border: nil, color_profile: nil, contrast_stretch: nil, crop: nil, crop_mode: nil, default_image: nil, dpr: nil, duration: nil, end_offset: nil, flip: nil, focus: nil, format_: nil, gradient: nil, grayscale: nil, height: nil, lossless: nil, metadata: nil, named: nil, opacity: nil, original: nil, overlay: nil, page: nil, progressive: nil, quality: nil, radius: nil, raw: nil, rotation: nil, shadow: nil, sharpen: nil, start_offset: nil, streaming_resolutions: nil, trim: nil, unsharp_mask: nil, video_codec: nil, width: nil, x: nil, x_center: nil, y_: nil, y_center: nil, zoom: nil)
463
+ # Some parameter documentations has been truncated, see
464
+ # {Imagekitio::Models::Transformation} for more details.
465
+ #
466
+ # The SDK provides easy-to-use names for transformations. These names are
467
+ # converted to the corresponding transformation string before being added to the
468
+ # URL. SDKs are updated regularly to support new transformations. If you want to
469
+ # use a transformation that is not supported by the SDK, You can use the `raw`
470
+ # parameter to pass the transformation string directly. See the
471
+ # [Transformations documentation](https://imagekit.io/docs/transformations).
472
+ #
473
+ # @param ai_change_background [String] Uses AI to change the background. Provide a text prompt or a base64-encoded prom
474
+ #
475
+ # @param ai_drop_shadow [Boolean, true, String] Adds an AI-based drop shadow around a foreground object on a transparent or remo
476
+ #
477
+ # @param ai_edit [String] Uses AI to edit images based on a text prompt. Provide a text prompt or a base64
478
+ #
479
+ # @param ai_remove_background [Boolean, Imagekitio::Models::Transformation::AIRemoveBackground] Applies ImageKit's in-house background removal.
480
+ #
481
+ # @param ai_remove_background_external [Boolean, Imagekitio::Models::Transformation::AIRemoveBackgroundExternal] Uses third-party background removal.
482
+ #
483
+ # @param ai_retouch [Boolean, Imagekitio::Models::Transformation::AIRetouch] Performs AI-based retouching to improve faces or product shots. Not supported in
484
+ #
485
+ # @param ai_upscale [Boolean, Imagekitio::Models::Transformation::AIUpscale] Upscales images beyond their original dimensions using AI. Not supported inside
486
+ #
487
+ # @param ai_variation [Boolean, Imagekitio::Models::Transformation::AIVariation] Generates a variation of an image using AI. This produces a new image with sligh
488
+ #
489
+ # @param aspect_ratio [Float, String] Specifies the aspect ratio for the output, e.g., "ar-4-3". Typically used with e
490
+ #
491
+ # @param audio_codec [Symbol, Imagekitio::Models::Transformation::AudioCodec] Specifies the audio codec, e.g., `aac`, `opus`, or `none`. See [Audio codec](htt
492
+ #
493
+ # @param background [String] Specifies the background to be used in conjunction with certain cropping strateg
494
+ #
495
+ # @param blur [Float] Specifies the Gaussian blur level. Accepts an integer value between 1 and 100, o
496
+ #
497
+ # @param border [String] Adds a border to the output media. Accepts a string in the format `<border-width
498
+ #
499
+ # @param color_profile [Boolean] Indicates whether the output image should retain the original color profile.
500
+ #
501
+ # @param contrast_stretch [Boolean, Imagekitio::Models::Transformation::ContrastStretch] Automatically enhances the contrast of an image (contrast stretch).
502
+ #
503
+ # @param crop [Symbol, Imagekitio::Models::Transformation::Crop] Crop modes for image resizing. See [Crop modes & focus](https://imagekit.io/docs
504
+ #
505
+ # @param crop_mode [Symbol, Imagekitio::Models::Transformation::CropMode] Additional crop modes for image resizing. See [Crop modes & focus](https://image
506
+ #
507
+ # @param default_image [String] Specifies a fallback image if the resource is not found, e.g., a URL or file pat
508
+ #
509
+ # @param dpr [Float] Accepts values between 0.1 and 5, or `auto` for automatic device pixel ratio (DP
510
+ #
511
+ # @param duration [Float, String] Specifies the duration (in seconds) for trimming videos, e.g., `5` or `10.5`.
512
+ #
513
+ # @param end_offset [Float, String] Specifies the end offset (in seconds) for trimming videos, e.g., `5` or `10.5`.
514
+ #
515
+ # @param flip [Symbol, Imagekitio::Models::Transformation::Flip] Flips or mirrors an image either horizontally, vertically, or both.
516
+ #
517
+ # @param focus [String] Refines padding and cropping behavior for pad resize, maintain ratio, and extrac
518
+ #
519
+ # @param format_ [Symbol, Imagekitio::Models::Transformation::Format] Specifies the output format for images or videos, e.g., `jpg`, `png`, `webp`, `m
520
+ #
521
+ # @param gradient [Boolean, true, String] Creates a linear gradient with two colors. Pass `true` for a default gradient, o
522
+ #
523
+ # @param grayscale [Boolean, Imagekitio::Models::Transformation::Grayscale] Enables a grayscale effect for images. See [Grayscale](https://imagekit.io/docs/
524
+ #
525
+ # @param height [Float, String] Specifies the height of the output. If a value between 0 and 1 is provided, it i
526
+ #
527
+ # @param lossless [Boolean] Specifies whether the output image (in JPEG or PNG) should be compressed lossles
528
+ #
529
+ # @param metadata [Boolean] By default, ImageKit removes all metadata during automatic image compression.
530
+ #
531
+ # @param named [String] Named transformation reference. See [Named transformations](https://imagekit.io/
532
+ #
533
+ # @param opacity [Float] Specifies the opacity level of the output image. See [Opacity](https://imagekit.
534
+ #
535
+ # @param original [Boolean] If set to true, serves the original file without applying any transformations.
536
+ #
537
+ # @param overlay [Imagekitio::Models::Overlay] Specifies an overlay to be applied on the parent image or video.
538
+ #
539
+ # @param page [Float, String] Extracts a specific page or frame from multi-page or layered files (PDF, PSD, AI
540
+ #
541
+ # @param progressive [Boolean] Specifies whether the output JPEG image should be rendered progressively. Progre
542
+ #
543
+ # @param quality [Float] Specifies the quality of the output image for lossy formats such as JPEG, WebP,
544
+ #
545
+ # @param radius [Float, Symbol, :max] Specifies the corner radius for rounded corners (e.g., 20) or `max` for circular
546
+ #
547
+ # @param raw [String] Pass any transformation not directly supported by the SDK.
548
+ #
549
+ # @param rotation [Float, String] Specifies the rotation angle in degrees. Positive values rotate the image clockw
550
+ #
551
+ # @param shadow [Boolean, true, String] Adds a shadow beneath solid objects in an image with a transparent background.
552
+ #
553
+ # @param sharpen [Boolean, true, Float] Sharpens the input image, highlighting edges and finer details.
554
+ #
555
+ # @param start_offset [Float, String] Specifies the start offset (in seconds) for trimming videos, e.g., `5` or `10.5`
556
+ #
557
+ # @param streaming_resolutions [Array<Symbol, Imagekitio::Models::StreamingResolution>] An array of resolutions for adaptive bitrate streaming, e.g., [`240`, `360`, `48
558
+ #
559
+ # @param trim [Boolean, true, Float] Useful for images with a solid or nearly solid background and a central object.
560
+ #
561
+ # @param unsharp_mask [Boolean, true, String] Applies Unsharp Masking (USM), an image sharpening technique.
562
+ #
563
+ # @param video_codec [Symbol, Imagekitio::Models::Transformation::VideoCodec] Specifies the video codec, e.g., `h264`, `vp9`, `av1`, or `none`. See [Video cod
564
+ #
565
+ # @param width [Float, String] Specifies the width of the output. If a value between 0 and 1 is provided, it is
566
+ #
567
+ # @param x [Float, String] Focus using cropped image coordinates - X coordinate. See [Focus using cropped c
568
+ #
569
+ # @param x_center [Float, String] Focus using cropped image coordinates - X center coordinate. See [Focus using cr
570
+ #
571
+ # @param y_ [Float, String] Focus using cropped image coordinates - Y coordinate. See [Focus using cropped c
572
+ #
573
+ # @param y_center [Float, String] Focus using cropped image coordinates - Y center coordinate. See [Focus using cr
574
+ #
575
+ # @param zoom [Float] Accepts a numeric value that determines how much to zoom in or out of the croppe
576
+
577
+ # Adds an AI-based drop shadow around a foreground object on a transparent or
578
+ # removed background. Optionally, control the direction, elevation, and saturation
579
+ # of the light source (e.g., `az-45` to change light direction). Pass `true` for
580
+ # the default drop shadow, or provide a string for a custom drop shadow. Supported
581
+ # inside overlay. See
582
+ # [AI Drop Shadow](https://imagekit.io/docs/ai-transformations#ai-drop-shadow-e-dropshadow).
583
+ #
584
+ # @see Imagekitio::Models::Transformation#ai_drop_shadow
585
+ module AIDropShadow
586
+ extend Imagekitio::Internal::Type::Union
587
+
588
+ variant const: true
589
+
590
+ variant String
591
+
592
+ # @!method self.variants
593
+ # @return [Array(Boolean, true, String)]
594
+ end
595
+
596
+ # Applies ImageKit's in-house background removal. Supported inside overlay. See
597
+ # [AI Background Removal](https://imagekit.io/docs/ai-transformations#imagekit-background-removal-e-bgremove).
598
+ #
599
+ # @see Imagekitio::Models::Transformation#ai_remove_background
600
+ module AIRemoveBackground
601
+ extend Imagekitio::Internal::Type::Enum
602
+
603
+ TRUE = true
604
+
605
+ # @!method self.values
606
+ # @return [Array<Boolean>]
607
+ end
608
+
609
+ # Uses third-party background removal. Note: It is recommended to use
610
+ # aiRemoveBackground, ImageKit's in-house solution, which is more cost-effective.
611
+ # Supported inside overlay. See
612
+ # [External Background Removal](https://imagekit.io/docs/ai-transformations#background-removal-e-removedotbg).
613
+ #
614
+ # @see Imagekitio::Models::Transformation#ai_remove_background_external
615
+ module AIRemoveBackgroundExternal
616
+ extend Imagekitio::Internal::Type::Enum
617
+
618
+ TRUE = true
619
+
620
+ # @!method self.values
621
+ # @return [Array<Boolean>]
622
+ end
623
+
624
+ # Performs AI-based retouching to improve faces or product shots. Not supported
625
+ # inside overlay. See
626
+ # [AI Retouch](https://imagekit.io/docs/ai-transformations#retouch-e-retouch).
627
+ #
628
+ # @see Imagekitio::Models::Transformation#ai_retouch
629
+ module AIRetouch
630
+ extend Imagekitio::Internal::Type::Enum
631
+
632
+ TRUE = true
633
+
634
+ # @!method self.values
635
+ # @return [Array<Boolean>]
636
+ end
637
+
638
+ # Upscales images beyond their original dimensions using AI. Not supported inside
639
+ # overlay. See
640
+ # [AI Upscale](https://imagekit.io/docs/ai-transformations#upscale-e-upscale).
641
+ #
642
+ # @see Imagekitio::Models::Transformation#ai_upscale
643
+ module AIUpscale
644
+ extend Imagekitio::Internal::Type::Enum
645
+
646
+ TRUE = true
647
+
648
+ # @!method self.values
649
+ # @return [Array<Boolean>]
650
+ end
651
+
652
+ # Generates a variation of an image using AI. This produces a new image with
653
+ # slight variations from the original, such as changes in color, texture, and
654
+ # other visual elements, while preserving the structure and essence of the
655
+ # original image. Not supported inside overlay. See
656
+ # [AI Generate Variations](https://imagekit.io/docs/ai-transformations#generate-variations-of-an-image-e-genvar).
657
+ #
658
+ # @see Imagekitio::Models::Transformation#ai_variation
659
+ module AIVariation
660
+ extend Imagekitio::Internal::Type::Enum
661
+
662
+ TRUE = true
663
+
664
+ # @!method self.values
665
+ # @return [Array<Boolean>]
666
+ end
667
+
668
+ # Specifies the aspect ratio for the output, e.g., "ar-4-3". Typically used with
669
+ # either width or height (but not both). For example: aspectRatio = `4:3`, `4_3`,
670
+ # or an expression like `iar_div_2`. See
671
+ # [Image resize and crop – Aspect ratio](https://imagekit.io/docs/image-resize-and-crop#aspect-ratio---ar).
672
+ #
673
+ # @see Imagekitio::Models::Transformation#aspect_ratio
674
+ module AspectRatio
675
+ extend Imagekitio::Internal::Type::Union
676
+
677
+ variant Float
678
+
679
+ variant String
680
+
681
+ # @!method self.variants
682
+ # @return [Array(Float, String)]
683
+ end
684
+
685
+ # Specifies the audio codec, e.g., `aac`, `opus`, or `none`. See
686
+ # [Audio codec](https://imagekit.io/docs/video-optimization#audio-codec---ac).
687
+ #
688
+ # @see Imagekitio::Models::Transformation#audio_codec
689
+ module AudioCodec
690
+ extend Imagekitio::Internal::Type::Enum
691
+
692
+ AAC = :aac
693
+ OPUS = :opus
694
+ NONE = :none
695
+
696
+ # @!method self.values
697
+ # @return [Array<Symbol>]
698
+ end
699
+
700
+ # Automatically enhances the contrast of an image (contrast stretch). See
701
+ # [Contrast Stretch](https://imagekit.io/docs/effects-and-enhancements#contrast-stretch---e-contrast).
702
+ #
703
+ # @see Imagekitio::Models::Transformation#contrast_stretch
704
+ module ContrastStretch
705
+ extend Imagekitio::Internal::Type::Enum
706
+
707
+ TRUE = true
708
+
709
+ # @!method self.values
710
+ # @return [Array<Boolean>]
711
+ end
712
+
713
+ # Crop modes for image resizing. See
714
+ # [Crop modes & focus](https://imagekit.io/docs/image-resize-and-crop#crop-crop-modes--focus).
715
+ #
716
+ # @see Imagekitio::Models::Transformation#crop
717
+ module Crop
718
+ extend Imagekitio::Internal::Type::Enum
719
+
720
+ FORCE = :force
721
+ AT_MAX = :at_max
722
+ AT_MAX_ENLARGE = :at_max_enlarge
723
+ AT_LEAST = :at_least
724
+ MAINTAIN_RATIO = :maintain_ratio
725
+
726
+ # @!method self.values
727
+ # @return [Array<Symbol>]
728
+ end
729
+
730
+ # Additional crop modes for image resizing. See
731
+ # [Crop modes & focus](https://imagekit.io/docs/image-resize-and-crop#crop-crop-modes--focus).
732
+ #
733
+ # @see Imagekitio::Models::Transformation#crop_mode
734
+ module CropMode
735
+ extend Imagekitio::Internal::Type::Enum
736
+
737
+ PAD_RESIZE = :pad_resize
738
+ EXTRACT = :extract
739
+ PAD_EXTRACT = :pad_extract
740
+
741
+ # @!method self.values
742
+ # @return [Array<Symbol>]
743
+ end
744
+
745
+ # Specifies the duration (in seconds) for trimming videos, e.g., `5` or `10.5`.
746
+ # Typically used with startOffset to indicate the length from the start offset.
747
+ # Arithmetic expressions are supported. See
748
+ # [Trim videos – Duration](https://imagekit.io/docs/trim-videos#duration---du).
749
+ #
750
+ # @see Imagekitio::Models::Transformation#duration
751
+ module Duration
752
+ extend Imagekitio::Internal::Type::Union
753
+
754
+ variant Float
755
+
756
+ variant String
757
+
758
+ # @!method self.variants
759
+ # @return [Array(Float, String)]
760
+ end
761
+
762
+ # Specifies the end offset (in seconds) for trimming videos, e.g., `5` or `10.5`.
763
+ # Typically used with startOffset to define a time window. Arithmetic expressions
764
+ # are supported. See
765
+ # [Trim videos – End offset](https://imagekit.io/docs/trim-videos#end-offset---eo).
766
+ #
767
+ # @see Imagekitio::Models::Transformation#end_offset
768
+ module EndOffset
769
+ extend Imagekitio::Internal::Type::Union
770
+
771
+ variant Float
772
+
773
+ variant String
774
+
775
+ # @!method self.variants
776
+ # @return [Array(Float, String)]
777
+ end
778
+
779
+ # Flips or mirrors an image either horizontally, vertically, or both. Acceptable
780
+ # values: `h` (horizontal), `v` (vertical), `h_v` (horizontal and vertical), or
781
+ # `v_h`. See [Flip](https://imagekit.io/docs/effects-and-enhancements#flip---fl).
782
+ #
783
+ # @see Imagekitio::Models::Transformation#flip
784
+ module Flip
785
+ extend Imagekitio::Internal::Type::Enum
786
+
787
+ H = :h
788
+ V = :v
789
+ H_V = :h_v
790
+ V_H = :v_h
791
+
792
+ # @!method self.values
793
+ # @return [Array<Symbol>]
794
+ end
795
+
796
+ # Specifies the output format for images or videos, e.g., `jpg`, `png`, `webp`,
797
+ # `mp4`, or `auto`. You can also pass `orig` for images to return the original
798
+ # format. ImageKit automatically delivers images and videos in the optimal format
799
+ # based on device support unless overridden by the dashboard settings or the
800
+ # format parameter. See
801
+ # [Image format](https://imagekit.io/docs/image-optimization#format---f) and
802
+ # [Video format](https://imagekit.io/docs/video-optimization#format---f).
803
+ #
804
+ # @see Imagekitio::Models::Transformation#format_
805
+ module Format
806
+ extend Imagekitio::Internal::Type::Enum
807
+
808
+ AUTO = :auto
809
+ WEBP = :webp
810
+ JPG = :jpg
811
+ JPEG = :jpeg
812
+ PNG = :png
813
+ GIF = :gif
814
+ SVG = :svg
815
+ MP4 = :mp4
816
+ WEBM = :webm
817
+ AVIF = :avif
818
+ ORIG = :orig
819
+
820
+ # @!method self.values
821
+ # @return [Array<Symbol>]
822
+ end
823
+
824
+ # Creates a linear gradient with two colors. Pass `true` for a default gradient,
825
+ # or provide a string for a custom gradient. See
826
+ # [Gradient](https://imagekit.io/docs/effects-and-enhancements#gradient---e-gradient).
827
+ #
828
+ # @see Imagekitio::Models::Transformation#gradient
829
+ module Gradient
830
+ extend Imagekitio::Internal::Type::Union
831
+
832
+ variant const: true
833
+
834
+ variant String
835
+
836
+ # @!method self.variants
837
+ # @return [Array(Boolean, true, String)]
838
+ end
839
+
840
+ # Enables a grayscale effect for images. See
841
+ # [Grayscale](https://imagekit.io/docs/effects-and-enhancements#grayscale---e-grayscale).
842
+ #
843
+ # @see Imagekitio::Models::Transformation#grayscale
844
+ module Grayscale
845
+ extend Imagekitio::Internal::Type::Enum
846
+
847
+ TRUE = true
848
+
849
+ # @!method self.values
850
+ # @return [Array<Boolean>]
851
+ end
852
+
853
+ # Specifies the height of the output. If a value between 0 and 1 is provided, it
854
+ # is treated as a percentage (e.g., `0.5` represents 50% of the original height).
855
+ # You can also supply arithmetic expressions (e.g., `ih_mul_0.5`). Height
856
+ # transformation –
857
+ # [Images](https://imagekit.io/docs/image-resize-and-crop#height---h) ·
858
+ # [Videos](https://imagekit.io/docs/video-resize-and-crop#height---h)
859
+ #
860
+ # @see Imagekitio::Models::Transformation#height
861
+ module Height
862
+ extend Imagekitio::Internal::Type::Union
863
+
864
+ variant Float
865
+
866
+ variant String
867
+
868
+ # @!method self.variants
869
+ # @return [Array(Float, String)]
870
+ end
871
+
872
+ # Extracts a specific page or frame from multi-page or layered files (PDF, PSD,
873
+ # AI). For example, specify by number (e.g., `2`), a range (e.g., `3-4` for the
874
+ # 2nd and 3rd layers), or by name (e.g., `name-layer-4` for a PSD layer). See
875
+ # [Thumbnail extraction](https://imagekit.io/docs/vector-and-animated-images#get-thumbnail-from-psd-pdf-ai-eps-and-animated-files).
876
+ #
877
+ # @see Imagekitio::Models::Transformation#page
878
+ module Page
879
+ extend Imagekitio::Internal::Type::Union
880
+
881
+ variant Float
882
+
883
+ variant String
884
+
885
+ # @!method self.variants
886
+ # @return [Array(Float, String)]
887
+ end
888
+
889
+ # Specifies the corner radius for rounded corners (e.g., 20) or `max` for circular
890
+ # or oval shape. See
891
+ # [Radius](https://imagekit.io/docs/effects-and-enhancements#radius---r).
892
+ #
893
+ # @see Imagekitio::Models::Transformation#radius
894
+ module Radius
895
+ extend Imagekitio::Internal::Type::Union
896
+
897
+ variant Float
898
+
899
+ variant const: :max
900
+
901
+ # @!method self.variants
902
+ # @return [Array(Float, Symbol, :max)]
903
+ end
904
+
905
+ # Specifies the rotation angle in degrees. Positive values rotate the image
906
+ # clockwise; you can also use, for example, `N40` for counterclockwise rotation or
907
+ # `auto` to use the orientation specified in the image's EXIF data. For videos,
908
+ # only the following values are supported: 0, 90, 180, 270, or 360. See
909
+ # [Rotate](https://imagekit.io/docs/effects-and-enhancements#rotate---rt).
910
+ #
911
+ # @see Imagekitio::Models::Transformation#rotation
912
+ module Rotation
913
+ extend Imagekitio::Internal::Type::Union
914
+
915
+ variant Float
916
+
917
+ variant String
918
+
919
+ # @!method self.variants
920
+ # @return [Array(Float, String)]
921
+ end
922
+
923
+ # Adds a shadow beneath solid objects in an image with a transparent background.
924
+ # For AI-based drop shadows, refer to aiDropShadow. Pass `true` for a default
925
+ # shadow, or provide a string for a custom shadow. See
926
+ # [Shadow](https://imagekit.io/docs/effects-and-enhancements#shadow---e-shadow).
927
+ #
928
+ # @see Imagekitio::Models::Transformation#shadow
929
+ module Shadow
930
+ extend Imagekitio::Internal::Type::Union
931
+
932
+ variant const: true
933
+
934
+ variant String
935
+
936
+ # @!method self.variants
937
+ # @return [Array(Boolean, true, String)]
938
+ end
939
+
940
+ # Sharpens the input image, highlighting edges and finer details. Pass `true` for
941
+ # default sharpening, or provide a numeric value for custom sharpening. See
942
+ # [Sharpen](https://imagekit.io/docs/effects-and-enhancements#sharpen---e-sharpen).
943
+ #
944
+ # @see Imagekitio::Models::Transformation#sharpen
945
+ module Sharpen
946
+ extend Imagekitio::Internal::Type::Union
947
+
948
+ variant const: true
949
+
950
+ variant Float
951
+
952
+ # @!method self.variants
953
+ # @return [Array(Boolean, true, Float)]
954
+ end
955
+
956
+ # Specifies the start offset (in seconds) for trimming videos, e.g., `5` or
957
+ # `10.5`. Arithmetic expressions are also supported. See
958
+ # [Trim videos – Start offset](https://imagekit.io/docs/trim-videos#start-offset---so).
959
+ #
960
+ # @see Imagekitio::Models::Transformation#start_offset
961
+ module StartOffset
962
+ extend Imagekitio::Internal::Type::Union
963
+
964
+ variant Float
965
+
966
+ variant String
967
+
968
+ # @!method self.variants
969
+ # @return [Array(Float, String)]
970
+ end
971
+
972
+ # Useful for images with a solid or nearly solid background and a central object.
973
+ # This parameter trims the background, leaving only the central object in the
974
+ # output image. See
975
+ # [Trim edges](https://imagekit.io/docs/effects-and-enhancements#trim-edges---t).
976
+ #
977
+ # @see Imagekitio::Models::Transformation#trim
978
+ module Trim
979
+ extend Imagekitio::Internal::Type::Union
980
+
981
+ variant const: true
982
+
983
+ variant Float
984
+
985
+ # @!method self.variants
986
+ # @return [Array(Boolean, true, Float)]
987
+ end
988
+
989
+ # Applies Unsharp Masking (USM), an image sharpening technique. Pass `true` for a
990
+ # default unsharp mask, or provide a string for a custom unsharp mask. See
991
+ # [Unsharp Mask](https://imagekit.io/docs/effects-and-enhancements#unsharp-mask---e-usm).
992
+ #
993
+ # @see Imagekitio::Models::Transformation#unsharp_mask
994
+ module UnsharpMask
995
+ extend Imagekitio::Internal::Type::Union
996
+
997
+ variant const: true
998
+
999
+ variant String
1000
+
1001
+ # @!method self.variants
1002
+ # @return [Array(Boolean, true, String)]
1003
+ end
1004
+
1005
+ # Specifies the video codec, e.g., `h264`, `vp9`, `av1`, or `none`. See
1006
+ # [Video codec](https://imagekit.io/docs/video-optimization#video-codec---vc).
1007
+ #
1008
+ # @see Imagekitio::Models::Transformation#video_codec
1009
+ module VideoCodec
1010
+ extend Imagekitio::Internal::Type::Enum
1011
+
1012
+ H264 = :h264
1013
+ VP9 = :vp9
1014
+ AV1 = :av1
1015
+ NONE = :none
1016
+
1017
+ # @!method self.values
1018
+ # @return [Array<Symbol>]
1019
+ end
1020
+
1021
+ # Specifies the width of the output. If a value between 0 and 1 is provided, it is
1022
+ # treated as a percentage (e.g., `0.4` represents 40% of the original width). You
1023
+ # can also supply arithmetic expressions (e.g., `iw_div_2`). Width transformation
1024
+ # – [Images](https://imagekit.io/docs/image-resize-and-crop#width---w) ·
1025
+ # [Videos](https://imagekit.io/docs/video-resize-and-crop#width---w)
1026
+ #
1027
+ # @see Imagekitio::Models::Transformation#width
1028
+ module Width
1029
+ extend Imagekitio::Internal::Type::Union
1030
+
1031
+ variant Float
1032
+
1033
+ variant String
1034
+
1035
+ # @!method self.variants
1036
+ # @return [Array(Float, String)]
1037
+ end
1038
+
1039
+ # Focus using cropped image coordinates - X coordinate. See
1040
+ # [Focus using cropped coordinates](https://imagekit.io/docs/image-resize-and-crop#example---focus-using-cropped-image-coordinates).
1041
+ #
1042
+ # @see Imagekitio::Models::Transformation#x
1043
+ module X
1044
+ extend Imagekitio::Internal::Type::Union
1045
+
1046
+ variant Float
1047
+
1048
+ variant String
1049
+
1050
+ # @!method self.variants
1051
+ # @return [Array(Float, String)]
1052
+ end
1053
+
1054
+ # Focus using cropped image coordinates - X center coordinate. See
1055
+ # [Focus using cropped coordinates](https://imagekit.io/docs/image-resize-and-crop#example---focus-using-cropped-image-coordinates).
1056
+ #
1057
+ # @see Imagekitio::Models::Transformation#x_center
1058
+ module XCenter
1059
+ extend Imagekitio::Internal::Type::Union
1060
+
1061
+ variant Float
1062
+
1063
+ variant String
1064
+
1065
+ # @!method self.variants
1066
+ # @return [Array(Float, String)]
1067
+ end
1068
+
1069
+ # Focus using cropped image coordinates - Y coordinate. See
1070
+ # [Focus using cropped coordinates](https://imagekit.io/docs/image-resize-and-crop#example---focus-using-cropped-image-coordinates).
1071
+ #
1072
+ # @see Imagekitio::Models::Transformation#y_
1073
+ module Y
1074
+ extend Imagekitio::Internal::Type::Union
1075
+
1076
+ variant Float
1077
+
1078
+ variant String
1079
+
1080
+ # @!method self.variants
1081
+ # @return [Array(Float, String)]
1082
+ end
1083
+
1084
+ # Focus using cropped image coordinates - Y center coordinate. See
1085
+ # [Focus using cropped coordinates](https://imagekit.io/docs/image-resize-and-crop#example---focus-using-cropped-image-coordinates).
1086
+ #
1087
+ # @see Imagekitio::Models::Transformation#y_center
1088
+ module YCenter
1089
+ extend Imagekitio::Internal::Type::Union
1090
+
1091
+ variant Float
1092
+
1093
+ variant String
1094
+
1095
+ # @!method self.variants
1096
+ # @return [Array(Float, String)]
1097
+ end
1098
+ end
1099
+ end
1100
+ end