imagekitio 4.0.0 → 4.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +47 -0
  3. data/README.md +1 -1
  4. data/lib/imagekitio/client.rb +4 -0
  5. data/lib/imagekitio/helpers/helper.rb +4 -0
  6. data/lib/imagekitio/helpers/transformation_utils.rb +7 -0
  7. data/lib/imagekitio/internal/transport/base_client.rb +7 -1
  8. data/lib/imagekitio/internal/transport/pooled_net_requester.rb +17 -24
  9. data/lib/imagekitio/internal/type/base_model.rb +1 -0
  10. data/lib/imagekitio/internal/type/union.rb +20 -8
  11. data/lib/imagekitio/internal/util.rb +7 -2
  12. data/lib/imagekitio/models/base_overlay.rb +73 -3
  13. data/lib/imagekitio/models/beta/v2/file_upload_params.rb +2 -2
  14. data/lib/imagekitio/models/beta/v2/file_upload_response.rb +21 -1
  15. data/lib/imagekitio/models/extension_config.rb +674 -0
  16. data/lib/imagekitio/models/extensions.rb +559 -1
  17. data/lib/imagekitio/models/file_update_response.rb +21 -1
  18. data/lib/imagekitio/models/file_upload_params.rb +2 -2
  19. data/lib/imagekitio/models/file_upload_response.rb +21 -1
  20. data/lib/imagekitio/models/image_overlay.rb +12 -0
  21. data/lib/imagekitio/models/saved_extension.rb +62 -0
  22. data/lib/imagekitio/models/saved_extension_create_params.rb +42 -0
  23. data/lib/imagekitio/models/saved_extension_delete_params.rb +14 -0
  24. data/lib/imagekitio/models/saved_extension_get_params.rb +14 -0
  25. data/lib/imagekitio/models/saved_extension_list_params.rb +14 -0
  26. data/lib/imagekitio/models/saved_extension_list_response.rb +8 -0
  27. data/lib/imagekitio/models/saved_extension_update_params.rb +42 -0
  28. data/lib/imagekitio/models/solid_color_overlay_transformation.rb +24 -12
  29. data/lib/imagekitio/models/subtitle_overlay.rb +12 -0
  30. data/lib/imagekitio/models/subtitle_overlay_transformation.rb +4 -3
  31. data/lib/imagekitio/models/text_overlay.rb +6 -0
  32. data/lib/imagekitio/models/text_overlay_transformation.rb +35 -19
  33. data/lib/imagekitio/models/transformation.rb +62 -12
  34. data/lib/imagekitio/models/unsafe_unwrap_webhook_event.rb +2 -0
  35. data/lib/imagekitio/models/unwrap_webhook_event.rb +2 -0
  36. data/lib/imagekitio/models/update_file_request.rb +2 -2
  37. data/lib/imagekitio/models/upload_pre_transform_success_event.rb +21 -1
  38. data/lib/imagekitio/models/video_overlay.rb +12 -0
  39. data/lib/imagekitio/models.rb +14 -0
  40. data/lib/imagekitio/resources/beta/v2/files.rb +1 -1
  41. data/lib/imagekitio/resources/files/metadata.rb +1 -1
  42. data/lib/imagekitio/resources/files.rb +1 -1
  43. data/lib/imagekitio/resources/saved_extensions.rb +146 -0
  44. data/lib/imagekitio/version.rb +1 -1
  45. data/lib/imagekitio.rb +11 -1
  46. data/manifest.yaml +2 -0
  47. data/rbi/imagekitio/client.rbi +3 -0
  48. data/rbi/imagekitio/internal/transport/base_client.rbi +5 -0
  49. data/rbi/imagekitio/internal/transport/pooled_net_requester.rbi +6 -2
  50. data/rbi/imagekitio/internal/type/base_model.rbi +8 -4
  51. data/rbi/imagekitio/models/base_overlay.rbi +110 -1
  52. data/rbi/imagekitio/models/beta/v2/file_upload_params.rbi +8 -0
  53. data/rbi/imagekitio/models/beta/v2/file_upload_response.rbi +61 -0
  54. data/rbi/imagekitio/models/extension_config.rbi +1406 -0
  55. data/rbi/imagekitio/models/extensions.rbi +1162 -0
  56. data/rbi/imagekitio/models/file_update_response.rbi +61 -0
  57. data/rbi/imagekitio/models/file_upload_params.rbi +8 -0
  58. data/rbi/imagekitio/models/file_upload_response.rbi +61 -0
  59. data/rbi/imagekitio/models/image_overlay.rbi +18 -0
  60. data/rbi/imagekitio/models/saved_extension.rbi +114 -0
  61. data/rbi/imagekitio/models/saved_extension_create_params.rbi +85 -0
  62. data/rbi/imagekitio/models/saved_extension_delete_params.rbi +30 -0
  63. data/rbi/imagekitio/models/saved_extension_get_params.rbi +30 -0
  64. data/rbi/imagekitio/models/saved_extension_list_params.rbi +30 -0
  65. data/rbi/imagekitio/models/saved_extension_list_response.rbi +11 -0
  66. data/rbi/imagekitio/models/saved_extension_update_params.rbi +106 -0
  67. data/rbi/imagekitio/models/solid_color_overlay_transformation.rbi +33 -18
  68. data/rbi/imagekitio/models/subtitle_overlay.rbi +18 -0
  69. data/rbi/imagekitio/models/subtitle_overlay_transformation.rbi +6 -4
  70. data/rbi/imagekitio/models/text_overlay.rbi +9 -0
  71. data/rbi/imagekitio/models/text_overlay_transformation.rbi +47 -26
  72. data/rbi/imagekitio/models/transformation.rbi +99 -18
  73. data/rbi/imagekitio/models/update_file_request.rbi +8 -0
  74. data/rbi/imagekitio/models/upload_pre_transform_success_event.rbi +61 -0
  75. data/rbi/imagekitio/models/video_overlay.rbi +18 -0
  76. data/rbi/imagekitio/models.rbi +14 -0
  77. data/rbi/imagekitio/resources/beta/v2/files.rbi +2 -0
  78. data/rbi/imagekitio/resources/files.rbi +2 -0
  79. data/rbi/imagekitio/resources/saved_extensions.rbi +114 -0
  80. data/sig/imagekitio/client.rbs +2 -0
  81. data/sig/imagekitio/internal/transport/base_client.rbs +2 -0
  82. data/sig/imagekitio/internal/transport/pooled_net_requester.rbs +4 -1
  83. data/sig/imagekitio/models/base_overlay.rbs +22 -0
  84. data/sig/imagekitio/models/beta/v2/file_upload_response.rbs +21 -0
  85. data/sig/imagekitio/models/extension_config.rbs +606 -0
  86. data/sig/imagekitio/models/extensions.rbs +491 -0
  87. data/sig/imagekitio/models/file_update_response.rbs +21 -0
  88. data/sig/imagekitio/models/file_upload_response.rbs +21 -0
  89. data/sig/imagekitio/models/saved_extension.rbs +59 -0
  90. data/sig/imagekitio/models/saved_extension_create_params.rbs +36 -0
  91. data/sig/imagekitio/models/saved_extension_delete_params.rbs +15 -0
  92. data/sig/imagekitio/models/saved_extension_get_params.rbs +15 -0
  93. data/sig/imagekitio/models/saved_extension_list_params.rbs +15 -0
  94. data/sig/imagekitio/models/saved_extension_list_response.rbs +7 -0
  95. data/sig/imagekitio/models/saved_extension_update_params.rbs +44 -0
  96. data/sig/imagekitio/models/solid_color_overlay_transformation.rbs +1 -1
  97. data/sig/imagekitio/models/text_overlay_transformation.rbs +1 -1
  98. data/sig/imagekitio/models/transformation.rbs +15 -1
  99. data/sig/imagekitio/models/upload_pre_transform_success_event.rbs +21 -0
  100. data/sig/imagekitio/models.rbs +14 -0
  101. data/sig/imagekitio/resources/saved_extensions.rbs +33 -0
  102. metadata +43 -2
@@ -295,6 +295,13 @@ module Imagekitio
295
295
  enum: -> { Imagekitio::Models::FileUploadResponse::ExtensionStatus::AIAutoDescription },
296
296
  api_name: :"ai-auto-description"
297
297
 
298
+ # @!attribute ai_tasks
299
+ #
300
+ # @return [Symbol, Imagekitio::Models::FileUploadResponse::ExtensionStatus::AITasks, nil]
301
+ optional :ai_tasks,
302
+ enum: -> { Imagekitio::Models::FileUploadResponse::ExtensionStatus::AITasks },
303
+ api_name: :"ai-tasks"
304
+
298
305
  # @!attribute aws_auto_tagging
299
306
  #
300
307
  # @return [Symbol, Imagekitio::Models::FileUploadResponse::ExtensionStatus::AwsAutoTagging, nil]
@@ -316,7 +323,7 @@ module Imagekitio
316
323
  enum: -> { Imagekitio::Models::FileUploadResponse::ExtensionStatus::RemoveBg },
317
324
  api_name: :"remove-bg"
318
325
 
319
- # @!method initialize(ai_auto_description: nil, aws_auto_tagging: nil, google_auto_tagging: nil, remove_bg: nil)
326
+ # @!method initialize(ai_auto_description: nil, ai_tasks: nil, aws_auto_tagging: nil, google_auto_tagging: nil, remove_bg: nil)
320
327
  # Extension names with their processing status at the time of completion of the
321
328
  # request. It could have one of the following status values:
322
329
  #
@@ -328,6 +335,7 @@ module Imagekitio
328
335
  # If no extension was requested, then this parameter is not returned.
329
336
  #
330
337
  # @param ai_auto_description [Symbol, Imagekitio::Models::FileUploadResponse::ExtensionStatus::AIAutoDescription]
338
+ # @param ai_tasks [Symbol, Imagekitio::Models::FileUploadResponse::ExtensionStatus::AITasks]
331
339
  # @param aws_auto_tagging [Symbol, Imagekitio::Models::FileUploadResponse::ExtensionStatus::AwsAutoTagging]
332
340
  # @param google_auto_tagging [Symbol, Imagekitio::Models::FileUploadResponse::ExtensionStatus::GoogleAutoTagging]
333
341
  # @param remove_bg [Symbol, Imagekitio::Models::FileUploadResponse::ExtensionStatus::RemoveBg]
@@ -344,6 +352,18 @@ module Imagekitio
344
352
  # @return [Array<Symbol>]
345
353
  end
346
354
 
355
+ # @see Imagekitio::Models::FileUploadResponse::ExtensionStatus#ai_tasks
356
+ module AITasks
357
+ extend Imagekitio::Internal::Type::Enum
358
+
359
+ SUCCESS = :success
360
+ PENDING = :pending
361
+ FAILED = :failed
362
+
363
+ # @!method self.values
364
+ # @return [Array<Symbol>]
365
+ end
366
+
347
367
  # @see Imagekitio::Models::FileUploadResponse::ExtensionStatus#aws_auto_tagging
348
368
  module AwsAutoTagging
349
369
  extend Imagekitio::Internal::Type::Enum
@@ -21,6 +21,12 @@ module Imagekitio
21
21
  # parameter to `base64`. To always use plain text (`i-{input}`), set it to
22
22
  # `plain`.
23
23
  #
24
+ # Regardless of the encoding method:
25
+ #
26
+ # - Leading and trailing slashes are removed.
27
+ # - Remaining slashes within the path are replaced with `@@` when using plain
28
+ # text.
29
+ #
24
30
  # @return [Symbol, Imagekitio::Models::ImageOverlay::Encoding, nil]
25
31
  optional :encoding, enum: -> { Imagekitio::ImageOverlay::Encoding }
26
32
 
@@ -51,6 +57,12 @@ module Imagekitio
51
57
  # format automatically. To always use base64 encoding (`ie-{base64}`), set this
52
58
  # parameter to `base64`. To always use plain text (`i-{input}`), set it to
53
59
  # `plain`.
60
+ #
61
+ # Regardless of the encoding method:
62
+ #
63
+ # - Leading and trailing slashes are removed.
64
+ # - Remaining slashes within the path are replaced with `@@` when using plain
65
+ # text.
54
66
  module Encoding
55
67
  extend Imagekitio::Internal::Type::Enum
56
68
 
@@ -0,0 +1,62 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Imagekitio
4
+ module Models
5
+ class SavedExtension < Imagekitio::Internal::Type::BaseModel
6
+ # @!attribute id
7
+ # Unique identifier of the saved extension.
8
+ #
9
+ # @return [String, nil]
10
+ optional :id, String
11
+
12
+ # @!attribute config
13
+ # Configuration object for an extension (base extensions only, not saved extension
14
+ # references).
15
+ #
16
+ # @return [Imagekitio::Models::ExtensionConfig::RemoveBg, Imagekitio::Models::ExtensionConfig::AIAutoDescription, Imagekitio::Models::ExtensionConfig::AITasks, Imagekitio::Models::ExtensionConfig::AutoTaggingExtension, nil]
17
+ optional :config, union: -> { Imagekitio::ExtensionConfig }
18
+
19
+ # @!attribute created_at
20
+ # Timestamp when the saved extension was created.
21
+ #
22
+ # @return [Time, nil]
23
+ optional :created_at, Time, api_name: :createdAt
24
+
25
+ # @!attribute description
26
+ # Description of the saved extension.
27
+ #
28
+ # @return [String, nil]
29
+ optional :description, String
30
+
31
+ # @!attribute name
32
+ # Name of the saved extension.
33
+ #
34
+ # @return [String, nil]
35
+ optional :name, String
36
+
37
+ # @!attribute updated_at
38
+ # Timestamp when the saved extension was last updated.
39
+ #
40
+ # @return [Time, nil]
41
+ optional :updated_at, Time, api_name: :updatedAt
42
+
43
+ # @!method initialize(id: nil, config: nil, created_at: nil, description: nil, name: nil, updated_at: nil)
44
+ # Some parameter documentations has been truncated, see
45
+ # {Imagekitio::Models::SavedExtension} for more details.
46
+ #
47
+ # Saved extension object containing extension configuration.
48
+ #
49
+ # @param id [String] Unique identifier of the saved extension.
50
+ #
51
+ # @param config [Imagekitio::Models::ExtensionConfig::RemoveBg, Imagekitio::Models::ExtensionConfig::AIAutoDescription, Imagekitio::Models::ExtensionConfig::AITasks, Imagekitio::Models::ExtensionConfig::AutoTaggingExtension] Configuration object for an extension (base extensions only, not saved extension
52
+ #
53
+ # @param created_at [Time] Timestamp when the saved extension was created.
54
+ #
55
+ # @param description [String] Description of the saved extension.
56
+ #
57
+ # @param name [String] Name of the saved extension.
58
+ #
59
+ # @param updated_at [Time] Timestamp when the saved extension was last updated.
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Imagekitio
4
+ module Models
5
+ # @see Imagekitio::Resources::SavedExtensions#create
6
+ class SavedExtensionCreateParams < Imagekitio::Internal::Type::BaseModel
7
+ extend Imagekitio::Internal::Type::RequestParameters::Converter
8
+ include Imagekitio::Internal::Type::RequestParameters
9
+
10
+ # @!attribute config
11
+ # Configuration object for an extension (base extensions only, not saved extension
12
+ # references).
13
+ #
14
+ # @return [Imagekitio::Models::ExtensionConfig::RemoveBg, Imagekitio::Models::ExtensionConfig::AIAutoDescription, Imagekitio::Models::ExtensionConfig::AITasks, Imagekitio::Models::ExtensionConfig::AutoTaggingExtension]
15
+ required :config, union: -> { Imagekitio::ExtensionConfig }
16
+
17
+ # @!attribute description
18
+ # Description of what the saved extension does.
19
+ #
20
+ # @return [String]
21
+ required :description, String
22
+
23
+ # @!attribute name
24
+ # Name of the saved extension.
25
+ #
26
+ # @return [String]
27
+ required :name, String
28
+
29
+ # @!method initialize(config:, description:, name:, request_options: {})
30
+ # Some parameter documentations has been truncated, see
31
+ # {Imagekitio::Models::SavedExtensionCreateParams} for more details.
32
+ #
33
+ # @param config [Imagekitio::Models::ExtensionConfig::RemoveBg, Imagekitio::Models::ExtensionConfig::AIAutoDescription, Imagekitio::Models::ExtensionConfig::AITasks, Imagekitio::Models::ExtensionConfig::AutoTaggingExtension] Configuration object for an extension (base extensions only, not saved extension
34
+ #
35
+ # @param description [String] Description of what the saved extension does.
36
+ #
37
+ # @param name [String] Name of the saved extension.
38
+ #
39
+ # @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Imagekitio
4
+ module Models
5
+ # @see Imagekitio::Resources::SavedExtensions#delete
6
+ class SavedExtensionDeleteParams < Imagekitio::Internal::Type::BaseModel
7
+ extend Imagekitio::Internal::Type::RequestParameters::Converter
8
+ include Imagekitio::Internal::Type::RequestParameters
9
+
10
+ # @!method initialize(request_options: {})
11
+ # @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Imagekitio
4
+ module Models
5
+ # @see Imagekitio::Resources::SavedExtensions#get
6
+ class SavedExtensionGetParams < Imagekitio::Internal::Type::BaseModel
7
+ extend Imagekitio::Internal::Type::RequestParameters::Converter
8
+ include Imagekitio::Internal::Type::RequestParameters
9
+
10
+ # @!method initialize(request_options: {})
11
+ # @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Imagekitio
4
+ module Models
5
+ # @see Imagekitio::Resources::SavedExtensions#list
6
+ class SavedExtensionListParams < Imagekitio::Internal::Type::BaseModel
7
+ extend Imagekitio::Internal::Type::RequestParameters::Converter
8
+ include Imagekitio::Internal::Type::RequestParameters
9
+
10
+ # @!method initialize(request_options: {})
11
+ # @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Imagekitio
4
+ module Models
5
+ # @type [Imagekitio::Internal::Type::Converter]
6
+ SavedExtensionListResponse = Imagekitio::Internal::Type::ArrayOf[-> { Imagekitio::SavedExtension }]
7
+ end
8
+ end
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Imagekitio
4
+ module Models
5
+ # @see Imagekitio::Resources::SavedExtensions#update
6
+ class SavedExtensionUpdateParams < Imagekitio::Internal::Type::BaseModel
7
+ extend Imagekitio::Internal::Type::RequestParameters::Converter
8
+ include Imagekitio::Internal::Type::RequestParameters
9
+
10
+ # @!attribute config
11
+ # Configuration object for an extension (base extensions only, not saved extension
12
+ # references).
13
+ #
14
+ # @return [Imagekitio::Models::ExtensionConfig::RemoveBg, Imagekitio::Models::ExtensionConfig::AIAutoDescription, Imagekitio::Models::ExtensionConfig::AITasks, Imagekitio::Models::ExtensionConfig::AutoTaggingExtension, nil]
15
+ optional :config, union: -> { Imagekitio::ExtensionConfig }
16
+
17
+ # @!attribute description
18
+ # Updated description of the saved extension.
19
+ #
20
+ # @return [String, nil]
21
+ optional :description, String
22
+
23
+ # @!attribute name
24
+ # Updated name of the saved extension.
25
+ #
26
+ # @return [String, nil]
27
+ optional :name, String
28
+
29
+ # @!method initialize(config: nil, description: nil, name: nil, request_options: {})
30
+ # Some parameter documentations has been truncated, see
31
+ # {Imagekitio::Models::SavedExtensionUpdateParams} for more details.
32
+ #
33
+ # @param config [Imagekitio::Models::ExtensionConfig::RemoveBg, Imagekitio::Models::ExtensionConfig::AIAutoDescription, Imagekitio::Models::ExtensionConfig::AITasks, Imagekitio::Models::ExtensionConfig::AutoTaggingExtension] Configuration object for an extension (base extensions only, not saved extension
34
+ #
35
+ # @param description [String] Updated description of the saved extension.
36
+ #
37
+ # @param name [String] Updated name of the saved extension.
38
+ #
39
+ # @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
40
+ end
41
+ end
42
+ end
@@ -4,8 +4,8 @@ module Imagekitio
4
4
  module Models
5
5
  class SolidColorOverlayTransformation < Imagekitio::Internal::Type::BaseModel
6
6
  # @!attribute alpha
7
- # Specifies the transparency level of the solid color overlay. Accepts integers
8
- # from `1` to `9`.
7
+ # Specifies the transparency level of the overlaid solid color layer. Supports
8
+ # integers from `1` to `9`.
9
9
  #
10
10
  # @return [Float, nil]
11
11
  optional :alpha, Float
@@ -35,11 +35,16 @@ module Imagekitio
35
35
  optional :height, union: -> { Imagekitio::SolidColorOverlayTransformation::Height }
36
36
 
37
37
  # @!attribute radius
38
- # Specifies the corner radius of the solid color overlay. Set to `max` for
39
- # circular or oval shape. See
40
- # [radius](https://imagekit.io/docs/effects-and-enhancements#radius---r).
38
+ # Specifies the corner radius of the solid color overlay.
41
39
  #
42
- # @return [Float, Symbol, :max, nil]
40
+ # - Single value (positive integer): Applied to all corners (e.g., `20`).
41
+ # - `max`: Creates a circular or oval shape.
42
+ # - Per-corner array: Provide four underscore-separated values representing
43
+ # top-left, top-right, bottom-right, and bottom-left corners respectively (e.g.,
44
+ # `10_20_30_40`). See
45
+ # [Radius](https://imagekit.io/docs/effects-and-enhancements#radius---r).
46
+ #
47
+ # @return [Float, Symbol, :max, String, nil]
43
48
  optional :radius, union: -> { Imagekitio::SolidColorOverlayTransformation::Radius }
44
49
 
45
50
  # @!attribute width
@@ -54,7 +59,7 @@ module Imagekitio
54
59
  # Some parameter documentations has been truncated, see
55
60
  # {Imagekitio::Models::SolidColorOverlayTransformation} for more details.
56
61
  #
57
- # @param alpha [Float] Specifies the transparency level of the solid color overlay. Accepts integers fr
62
+ # @param alpha [Float] Specifies the transparency level of the overlaid solid color layer. Supports int
58
63
  #
59
64
  # @param background [String] Specifies the background color of the solid color overlay. Accepts an RGB hex co
60
65
  #
@@ -62,7 +67,7 @@ module Imagekitio
62
67
  #
63
68
  # @param height [Float, String] Controls the height of the solid color overlay. Accepts a numeric value or an ar
64
69
  #
65
- # @param radius [Float, Symbol, :max] Specifies the corner radius of the solid color overlay. Set to `max` for circula
70
+ # @param radius [Float, Symbol, :max, String] Specifies the corner radius of the solid color overlay.
66
71
  #
67
72
  # @param width [Float, String] Controls the width of the solid color overlay. Accepts a numeric value or an ari
68
73
 
@@ -99,9 +104,14 @@ module Imagekitio
99
104
  # @return [Array(Float, String)]
100
105
  end
101
106
 
102
- # Specifies the corner radius of the solid color overlay. Set to `max` for
103
- # circular or oval shape. See
104
- # [radius](https://imagekit.io/docs/effects-and-enhancements#radius---r).
107
+ # Specifies the corner radius of the solid color overlay.
108
+ #
109
+ # - Single value (positive integer): Applied to all corners (e.g., `20`).
110
+ # - `max`: Creates a circular or oval shape.
111
+ # - Per-corner array: Provide four underscore-separated values representing
112
+ # top-left, top-right, bottom-right, and bottom-left corners respectively (e.g.,
113
+ # `10_20_30_40`). See
114
+ # [Radius](https://imagekit.io/docs/effects-and-enhancements#radius---r).
105
115
  #
106
116
  # @see Imagekitio::Models::SolidColorOverlayTransformation#radius
107
117
  module Radius
@@ -111,8 +121,10 @@ module Imagekitio
111
121
 
112
122
  variant const: :max
113
123
 
124
+ variant String
125
+
114
126
  # @!method self.variants
115
- # @return [Array(Float, Symbol, :max)]
127
+ # @return [Array(Float, Symbol, :max, String)]
116
128
  end
117
129
 
118
130
  # Controls the width of the solid color overlay. Accepts a numeric value or an
@@ -21,6 +21,12 @@ module Imagekitio
21
21
  # parameter to `base64`. To always use plain text (`i-{input}`), set it to
22
22
  # `plain`.
23
23
  #
24
+ # Regardless of the encoding method:
25
+ #
26
+ # - Leading and trailing slashes are removed.
27
+ # - Remaining slashes within the path are replaced with `@@` when using plain
28
+ # text.
29
+ #
24
30
  # @return [Symbol, Imagekitio::Models::SubtitleOverlay::Encoding, nil]
25
31
  optional :encoding, enum: -> { Imagekitio::SubtitleOverlay::Encoding }
26
32
 
@@ -49,6 +55,12 @@ module Imagekitio
49
55
  # format automatically. To always use base64 encoding (`ie-{base64}`), set this
50
56
  # parameter to `base64`. To always use plain text (`i-{input}`), set it to
51
57
  # `plain`.
58
+ #
59
+ # Regardless of the encoding method:
60
+ #
61
+ # - Leading and trailing slashes are removed.
62
+ # - Remaining slashes within the path are replaced with `@@` when using plain
63
+ # text.
52
64
  module Encoding
53
65
  extend Imagekitio::Internal::Type::Enum
54
66
 
@@ -22,8 +22,9 @@ module Imagekitio
22
22
  optional :color, String
23
23
 
24
24
  # @!attribute font_family
25
- # Font family for subtitles. Refer to the
26
- # [supported fonts](https://imagekit.io/docs/add-overlays-on-images#supported-text-font-list).
25
+ # Sets the font family of subtitle text. Refer to the
26
+ # [supported fonts documented](https://imagekit.io/docs/add-overlays-on-images#supported-text-font-list)
27
+ # in the ImageKit transformations guide.
27
28
  #
28
29
  # @return [String, nil]
29
30
  optional :font_family, String, api_name: :fontFamily
@@ -82,7 +83,7 @@ module Imagekitio
82
83
  #
83
84
  # @param color [String] Sets the font color of the subtitle text using a standard color name, an RGB col
84
85
  #
85
- # @param font_family [String] Font family for subtitles. Refer to the [supported fonts](https://imagekit.io/do
86
+ # @param font_family [String] Sets the font family of subtitle text.
86
87
  #
87
88
  # @param font_outline [String] Sets the font outline of the subtitle text.
88
89
  #
@@ -22,6 +22,9 @@ module Imagekitio
22
22
  # (`ie-{base64}`), set this parameter to `base64`. To always use plain text
23
23
  # (`i-{input}`), set it to `plain`.
24
24
  #
25
+ # Regardless of the encoding method, the input text is always percent-encoded to
26
+ # ensure it is URL-safe.
27
+ #
25
28
  # @return [Symbol, Imagekitio::Models::TextOverlay::Encoding, nil]
26
29
  optional :encoding, enum: -> { Imagekitio::TextOverlay::Encoding }
27
30
 
@@ -50,6 +53,9 @@ module Imagekitio
50
53
  # appropriate format based on the input text. To always use base64
51
54
  # (`ie-{base64}`), set this parameter to `base64`. To always use plain text
52
55
  # (`i-{input}`), set it to `plain`.
56
+ #
57
+ # Regardless of the encoding method, the input text is always percent-encoded to
58
+ # ensure it is URL-safe.
53
59
  module Encoding
54
60
  extend Imagekitio::Internal::Type::Enum
55
61
 
@@ -18,7 +18,9 @@ module Imagekitio
18
18
  optional :background, String
19
19
 
20
20
  # @!attribute flip
21
- # Flip the text overlay horizontally, vertically, or both.
21
+ # Flip/mirror the text horizontally, vertically, or in both directions. Acceptable
22
+ # values: `h` (horizontal), `v` (vertical), `h_v` (horizontal and vertical), or
23
+ # `v_h`.
22
24
  #
23
25
  # @return [Symbol, Imagekitio::Models::TextOverlayTransformation::Flip, nil]
24
26
  optional :flip, enum: -> { Imagekitio::TextOverlayTransformation::Flip }
@@ -57,10 +59,9 @@ module Imagekitio
57
59
  api_name: :innerAlignment
58
60
 
59
61
  # @!attribute line_height
60
- # Specifies the line height of the text overlay. Accepts integer values
61
- # representing line height in points. It can also accept
62
- # [arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations)
63
- # such as `bw_mul_0.2`, or `bh_div_20`.
62
+ # Specifies the line height for multi-line text overlays. It will come into effect
63
+ # only if the text wraps over multiple lines. Accepts either an integer value or
64
+ # an arithmetic expression.
64
65
  #
65
66
  # @return [Float, String, nil]
66
67
  optional :line_height,
@@ -76,10 +77,16 @@ module Imagekitio
76
77
  optional :padding, union: -> { Imagekitio::TextOverlayTransformation::Padding }
77
78
 
78
79
  # @!attribute radius
79
- # Specifies the corner radius of the text overlay. Set to `max` to achieve a
80
- # circular or oval shape.
80
+ # Specifies the corner radius:
81
81
  #
82
- # @return [Float, Symbol, :max, nil]
82
+ # - Single value (positive integer): Applied to all corners (e.g., `20`).
83
+ # - `max`: Creates a circular or oval shape.
84
+ # - Per-corner array: Provide four underscore-separated values representing
85
+ # top-left, top-right, bottom-right, and bottom-left corners respectively (e.g.,
86
+ # `10_20_30_40`). See
87
+ # [Radius](https://imagekit.io/docs/effects-and-enhancements#radius---r).
88
+ #
89
+ # @return [Float, Symbol, :max, String, nil]
83
90
  optional :radius, union: -> { Imagekitio::TextOverlayTransformation::Radius }
84
91
 
85
92
  # @!attribute rotation
@@ -116,7 +123,7 @@ module Imagekitio
116
123
  #
117
124
  # @param background [String] Specifies the background color of the text overlay.
118
125
  #
119
- # @param flip [Symbol, Imagekitio::Models::TextOverlayTransformation::Flip] Flip the text overlay horizontally, vertically, or both.
126
+ # @param flip [Symbol, Imagekitio::Models::TextOverlayTransformation::Flip] Flip/mirror the text horizontally, vertically, or in both directions.
120
127
  #
121
128
  # @param font_color [String] Specifies the font color of the overlaid text. Accepts an RGB hex code (e.g., `F
122
129
  #
@@ -126,11 +133,11 @@ module Imagekitio
126
133
  #
127
134
  # @param inner_alignment [Symbol, Imagekitio::Models::TextOverlayTransformation::InnerAlignment] Specifies the inner alignment of the text when width is more than the text lengt
128
135
  #
129
- # @param line_height [Float, String] Specifies the line height of the text overlay.
136
+ # @param line_height [Float, String] Specifies the line height for multi-line text overlays. It will come into effect
130
137
  #
131
138
  # @param padding [Float, String] Specifies the padding around the overlaid text.
132
139
  #
133
- # @param radius [Float, Symbol, :max] Specifies the corner radius of the text overlay.
140
+ # @param radius [Float, Symbol, :max, String] Specifies the corner radius:
134
141
  #
135
142
  # @param rotation [Float, String] Specifies the rotation angle of the text overlay.
136
143
  #
@@ -138,7 +145,9 @@ module Imagekitio
138
145
  #
139
146
  # @param width [Float, String] Specifies the maximum width (in pixels) of the overlaid text. The text wraps aut
140
147
 
141
- # Flip the text overlay horizontally, vertically, or both.
148
+ # Flip/mirror the text horizontally, vertically, or in both directions. Acceptable
149
+ # values: `h` (horizontal), `v` (vertical), `h_v` (horizontal and vertical), or
150
+ # `v_h`.
142
151
  #
143
152
  # @see Imagekitio::Models::TextOverlayTransformation#flip
144
153
  module Flip
@@ -183,10 +192,9 @@ module Imagekitio
183
192
  # @return [Array<Symbol>]
184
193
  end
185
194
 
186
- # Specifies the line height of the text overlay. Accepts integer values
187
- # representing line height in points. It can also accept
188
- # [arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations)
189
- # such as `bw_mul_0.2`, or `bh_div_20`.
195
+ # Specifies the line height for multi-line text overlays. It will come into effect
196
+ # only if the text wraps over multiple lines. Accepts either an integer value or
197
+ # an arithmetic expression.
190
198
  #
191
199
  # @see Imagekitio::Models::TextOverlayTransformation#line_height
192
200
  module LineHeight
@@ -216,8 +224,14 @@ module Imagekitio
216
224
  # @return [Array(Float, String)]
217
225
  end
218
226
 
219
- # Specifies the corner radius of the text overlay. Set to `max` to achieve a
220
- # circular or oval shape.
227
+ # Specifies the corner radius:
228
+ #
229
+ # - Single value (positive integer): Applied to all corners (e.g., `20`).
230
+ # - `max`: Creates a circular or oval shape.
231
+ # - Per-corner array: Provide four underscore-separated values representing
232
+ # top-left, top-right, bottom-right, and bottom-left corners respectively (e.g.,
233
+ # `10_20_30_40`). See
234
+ # [Radius](https://imagekit.io/docs/effects-and-enhancements#radius---r).
221
235
  #
222
236
  # @see Imagekitio::Models::TextOverlayTransformation#radius
223
237
  module Radius
@@ -227,8 +241,10 @@ module Imagekitio
227
241
 
228
242
  variant const: :max
229
243
 
244
+ variant String
245
+
230
246
  # @!method self.variants
231
- # @return [Array(Float, Symbol, :max)]
247
+ # @return [Array(Float, Symbol, :max, String)]
232
248
  end
233
249
 
234
250
  # Specifies the rotation angle of the text overlay. Accepts a numeric value for