imagekitio 4.1.2 → 4.3.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 (108) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +51 -0
  3. data/README.md +1 -1
  4. data/lib/imagekitio/client.rb +14 -0
  5. data/lib/imagekitio/helpers/helper.rb +6 -0
  6. data/lib/imagekitio/internal/transport/pooled_net_requester.rb +1 -1
  7. data/lib/imagekitio/internal/util.rb +51 -7
  8. data/lib/imagekitio/models/accounts/origin_create_params.rb +1 -9
  9. data/lib/imagekitio/models/accounts/origin_delete_params.rb +13 -1
  10. data/lib/imagekitio/models/accounts/origin_get_params.rb +13 -1
  11. data/lib/imagekitio/models/accounts/origin_update_params.rb +10 -6
  12. data/lib/imagekitio/models/accounts/url_endpoint_delete_params.rb +14 -1
  13. data/lib/imagekitio/models/accounts/url_endpoint_get_params.rb +14 -1
  14. data/lib/imagekitio/models/accounts/url_endpoint_update_params.rb +14 -1
  15. data/lib/imagekitio/models/cache/invalidation_get_params.rb +7 -1
  16. data/lib/imagekitio/models/custom_metadata_field_delete_params.rb +7 -1
  17. data/lib/imagekitio/models/custom_metadata_field_update_params.rb +8 -1
  18. data/lib/imagekitio/models/extension_config.rb +10 -5
  19. data/lib/imagekitio/models/extensions.rb +10 -5
  20. data/lib/imagekitio/models/file.rb +44 -1
  21. data/lib/imagekitio/models/file_delete_params.rb +7 -1
  22. data/lib/imagekitio/models/file_get_params.rb +7 -1
  23. data/lib/imagekitio/models/file_update_params.rb +5 -7
  24. data/lib/imagekitio/models/files/metadata_get_params.rb +7 -1
  25. data/lib/imagekitio/models/files/version_delete_params.rb +7 -1
  26. data/lib/imagekitio/models/files/version_get_params.rb +7 -1
  27. data/lib/imagekitio/models/files/version_list_params.rb +7 -1
  28. data/lib/imagekitio/models/files/version_restore_params.rb +7 -1
  29. data/lib/imagekitio/models/folder.rb +12 -1
  30. data/lib/imagekitio/models/folders/job_get_params.rb +7 -1
  31. data/lib/imagekitio/models/overlay_position.rb +99 -5
  32. data/lib/imagekitio/models/saved_extension_delete_params.rb +7 -1
  33. data/lib/imagekitio/models/saved_extension_get_params.rb +7 -1
  34. data/lib/imagekitio/models/saved_extension_update_params.rb +8 -1
  35. data/lib/imagekitio/resources/accounts/origins.rb +4 -14
  36. data/lib/imagekitio/resources/accounts/usage.rb +2 -1
  37. data/lib/imagekitio/resources/assets.rb +2 -1
  38. data/lib/imagekitio/resources/beta/v2/files.rb +5 -4
  39. data/lib/imagekitio/resources/custom_metadata_fields.rb +2 -1
  40. data/lib/imagekitio/resources/files/metadata.rb +2 -1
  41. data/lib/imagekitio/resources/files.rb +7 -11
  42. data/lib/imagekitio/resources/webhooks.rb +11 -1
  43. data/lib/imagekitio/version.rb +1 -1
  44. data/lib/imagekitio.rb +1 -0
  45. data/rbi/imagekitio/client.rbi +13 -0
  46. data/rbi/imagekitio/internal/util.rbi +29 -1
  47. data/rbi/imagekitio/models/accounts/origin_create_params.rbi +4 -51
  48. data/rbi/imagekitio/models/accounts/origin_delete_params.rbi +18 -5
  49. data/rbi/imagekitio/models/accounts/origin_get_params.rbi +18 -5
  50. data/rbi/imagekitio/models/accounts/origin_update_params.rbi +9 -43
  51. data/rbi/imagekitio/models/accounts/url_endpoint_delete_params.rbi +20 -5
  52. data/rbi/imagekitio/models/accounts/url_endpoint_get_params.rbi +20 -5
  53. data/rbi/imagekitio/models/accounts/url_endpoint_update_params.rbi +20 -5
  54. data/rbi/imagekitio/models/cache/invalidation_get_params.rbi +11 -5
  55. data/rbi/imagekitio/models/custom_metadata_field_delete_params.rbi +13 -5
  56. data/rbi/imagekitio/models/custom_metadata_field_update_params.rbi +6 -0
  57. data/rbi/imagekitio/models/extension_config.rbi +16 -6
  58. data/rbi/imagekitio/models/extensions.rbi +16 -6
  59. data/rbi/imagekitio/models/file.rbi +57 -0
  60. data/rbi/imagekitio/models/file_delete_params.rbi +13 -5
  61. data/rbi/imagekitio/models/file_get_params.rbi +13 -5
  62. data/rbi/imagekitio/models/file_update_params.rbi +5 -28
  63. data/rbi/imagekitio/models/files/metadata_get_params.rbi +11 -5
  64. data/rbi/imagekitio/models/files/version_delete_params.rbi +10 -2
  65. data/rbi/imagekitio/models/files/version_get_params.rbi +10 -2
  66. data/rbi/imagekitio/models/files/version_list_params.rbi +11 -5
  67. data/rbi/imagekitio/models/files/version_restore_params.rbi +10 -2
  68. data/rbi/imagekitio/models/folder.rbi +13 -0
  69. data/rbi/imagekitio/models/folders/job_get_params.rbi +11 -5
  70. data/rbi/imagekitio/models/overlay_position.rbi +165 -9
  71. data/rbi/imagekitio/models/saved_extension_delete_params.rbi +13 -5
  72. data/rbi/imagekitio/models/saved_extension_get_params.rbi +13 -5
  73. data/rbi/imagekitio/models/saved_extension_update_params.rbi +6 -0
  74. data/rbi/imagekitio/resources/accounts/origins.rbi +22 -2
  75. data/rbi/imagekitio/resources/beta/v2/files.rbi +5 -4
  76. data/rbi/imagekitio/resources/files.rbi +10 -5
  77. data/rbi/imagekitio/resources/webhooks.rbi +10 -2
  78. data/sig/imagekitio/client.rbs +3 -0
  79. data/sig/imagekitio/internal/util.rbs +14 -0
  80. data/sig/imagekitio/models/accounts/origin_create_params.rbs +3 -16
  81. data/sig/imagekitio/models/accounts/origin_delete_params.rbs +11 -3
  82. data/sig/imagekitio/models/accounts/origin_get_params.rbs +11 -3
  83. data/sig/imagekitio/models/accounts/origin_update_params.rbs +4 -9
  84. data/sig/imagekitio/models/accounts/url_endpoint_delete_params.rbs +11 -3
  85. data/sig/imagekitio/models/accounts/url_endpoint_get_params.rbs +11 -3
  86. data/sig/imagekitio/models/accounts/url_endpoint_update_params.rbs +13 -3
  87. data/sig/imagekitio/models/cache/invalidation_get_params.rbs +11 -3
  88. data/sig/imagekitio/models/custom_metadata_field_delete_params.rbs +11 -3
  89. data/sig/imagekitio/models/custom_metadata_field_update_params.rbs +5 -0
  90. data/sig/imagekitio/models/file.rbs +35 -0
  91. data/sig/imagekitio/models/file_delete_params.rbs +11 -3
  92. data/sig/imagekitio/models/file_get_params.rbs +12 -3
  93. data/sig/imagekitio/models/file_update_params.rbs +4 -9
  94. data/sig/imagekitio/models/files/metadata_get_params.rbs +11 -3
  95. data/sig/imagekitio/models/files/version_delete_params.rbs +6 -1
  96. data/sig/imagekitio/models/files/version_get_params.rbs +6 -1
  97. data/sig/imagekitio/models/files/version_list_params.rbs +11 -3
  98. data/sig/imagekitio/models/files/version_restore_params.rbs +6 -1
  99. data/sig/imagekitio/models/folder.rbs +7 -0
  100. data/sig/imagekitio/models/folders/job_get_params.rbs +11 -3
  101. data/sig/imagekitio/models/overlay_position.rbs +73 -3
  102. data/sig/imagekitio/models/saved_extension_delete_params.rbs +11 -3
  103. data/sig/imagekitio/models/saved_extension_get_params.rbs +11 -3
  104. data/sig/imagekitio/models/saved_extension_update_params.rbs +5 -0
  105. data/sig/imagekitio/resources/accounts/origins.rbs +2 -2
  106. data/sig/imagekitio/resources/files.rbs +1 -1
  107. data/sig/imagekitio/resources/webhooks.rbs +3 -1
  108. metadata +16 -2
@@ -13,6 +13,18 @@ module Imagekitio
13
13
  api_name: :AITags,
14
14
  nil?: true
15
15
 
16
+ # @!attribute audio_codec
17
+ # The audio codec used in the video (only for video/audio).
18
+ #
19
+ # @return [String, nil]
20
+ optional :audio_codec, String, api_name: :audioCodec
21
+
22
+ # @!attribute bit_rate
23
+ # The bit rate of the video in kbps (only for video).
24
+ #
25
+ # @return [Integer, nil]
26
+ optional :bit_rate, Integer, api_name: :bitRate
27
+
16
28
  # @!attribute created_at
17
29
  # Date and time when the file was uploaded. The date and time is in ISO8601
18
30
  # format.
@@ -41,6 +53,21 @@ module Imagekitio
41
53
  # @return [String, nil]
42
54
  optional :description, String
43
55
 
56
+ # @!attribute duration
57
+ # The duration of the video in seconds (only for video).
58
+ #
59
+ # @return [Integer, nil]
60
+ optional :duration, Integer
61
+
62
+ # @!attribute embedded_metadata
63
+ # Consolidated embedded metadata associated with the file. It includes exif, iptc,
64
+ # and xmp data.
65
+ #
66
+ # @return [Hash{Symbol=>Object}, nil]
67
+ optional :embedded_metadata,
68
+ Imagekitio::Internal::Type::HashOf[Imagekitio::Internal::Type::Unknown],
69
+ api_name: :embeddedMetadata
70
+
44
71
  # @!attribute file_id
45
72
  # Unique identifier of the asset.
46
73
  #
@@ -157,13 +184,19 @@ module Imagekitio
157
184
  # @return [Imagekitio::Models::File::VersionInfo, nil]
158
185
  optional :version_info, -> { Imagekitio::File::VersionInfo }, api_name: :versionInfo
159
186
 
187
+ # @!attribute video_codec
188
+ # The video codec used in the video (only for video).
189
+ #
190
+ # @return [String, nil]
191
+ optional :video_codec, String, api_name: :videoCodec
192
+
160
193
  # @!attribute width
161
194
  # Width of the file.
162
195
  #
163
196
  # @return [Float, nil]
164
197
  optional :width, Float
165
198
 
166
- # @!method initialize(ai_tags: nil, created_at: nil, custom_coordinates: nil, custom_metadata: nil, description: nil, file_id: nil, file_path: nil, file_type: nil, has_alpha: nil, height: nil, is_private_file: nil, is_published: nil, mime: nil, name: nil, selected_fields_schema: nil, size: nil, tags: nil, thumbnail: nil, type: nil, updated_at: nil, url: nil, version_info: nil, width: nil)
199
+ # @!method initialize(ai_tags: nil, audio_codec: nil, bit_rate: nil, created_at: nil, custom_coordinates: nil, custom_metadata: nil, description: nil, duration: nil, embedded_metadata: nil, file_id: nil, file_path: nil, file_type: nil, has_alpha: nil, height: nil, is_private_file: nil, is_published: nil, mime: nil, name: nil, selected_fields_schema: nil, size: nil, tags: nil, thumbnail: nil, type: nil, updated_at: nil, url: nil, version_info: nil, video_codec: nil, width: nil)
167
200
  # Some parameter documentations has been truncated, see {Imagekitio::Models::File}
168
201
  # for more details.
169
202
  #
@@ -171,6 +204,10 @@ module Imagekitio
171
204
  #
172
205
  # @param ai_tags [Array<Imagekitio::Models::File::AITag>, nil] An array of tags assigned to the file by auto tagging.
173
206
  #
207
+ # @param audio_codec [String] The audio codec used in the video (only for video/audio).
208
+ #
209
+ # @param bit_rate [Integer] The bit rate of the video in kbps (only for video).
210
+ #
174
211
  # @param created_at [Time] Date and time when the file was uploaded. The date and time is in ISO8601 format
175
212
  #
176
213
  # @param custom_coordinates [String, nil] An string with custom coordinates of the file.
@@ -179,6 +216,10 @@ module Imagekitio
179
216
  #
180
217
  # @param description [String] Optional text to describe the contents of the file. Can be set by the user or th
181
218
  #
219
+ # @param duration [Integer] The duration of the video in seconds (only for video).
220
+ #
221
+ # @param embedded_metadata [Hash{Symbol=>Object}] Consolidated embedded metadata associated with the file. It includes exif, iptc,
222
+ #
182
223
  # @param file_id [String] Unique identifier of the asset.
183
224
  #
184
225
  # @param file_path [String] Path of the file. This is the path you would use in the URL to access the file.
@@ -213,6 +254,8 @@ module Imagekitio
213
254
  #
214
255
  # @param version_info [Imagekitio::Models::File::VersionInfo] An object with details of the file version.
215
256
  #
257
+ # @param video_codec [String] The video codec used in the video (only for video).
258
+ #
216
259
  # @param width [Float] Width of the file.
217
260
 
218
261
  class AITag < Imagekitio::Internal::Type::BaseModel
@@ -7,7 +7,13 @@ module Imagekitio
7
7
  extend Imagekitio::Internal::Type::RequestParameters::Converter
8
8
  include Imagekitio::Internal::Type::RequestParameters
9
9
 
10
- # @!method initialize(request_options: {})
10
+ # @!attribute file_id
11
+ #
12
+ # @return [String]
13
+ required :file_id, String
14
+
15
+ # @!method initialize(file_id:, request_options: {})
16
+ # @param file_id [String]
11
17
  # @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
12
18
  end
13
19
  end
@@ -7,7 +7,13 @@ module Imagekitio
7
7
  extend Imagekitio::Internal::Type::RequestParameters::Converter
8
8
  include Imagekitio::Internal::Type::RequestParameters
9
9
 
10
- # @!method initialize(request_options: {})
10
+ # @!attribute file_id
11
+ #
12
+ # @return [String]
13
+ required :file_id, String
14
+
15
+ # @!method initialize(file_id:, request_options: {})
16
+ # @param file_id [String]
11
17
  # @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
12
18
  end
13
19
  end
@@ -7,15 +7,13 @@ module Imagekitio
7
7
  extend Imagekitio::Internal::Type::RequestParameters::Converter
8
8
  include Imagekitio::Internal::Type::RequestParameters
9
9
 
10
- # @!attribute update_file_request
11
- # Schema for update file update request.
10
+ # @!attribute file_id
12
11
  #
13
- # @return [Imagekitio::Models::UpdateFileRequest::UpdateFileDetails, Imagekitio::Models::UpdateFileRequest::ChangePublicationStatus]
14
- required :update_file_request, union: -> { Imagekitio::UpdateFileRequest }
12
+ # @return [String]
13
+ required :file_id, String
15
14
 
16
- # @!method initialize(update_file_request:, request_options: {})
17
- # @param update_file_request [Imagekitio::Models::UpdateFileRequest::UpdateFileDetails, Imagekitio::Models::UpdateFileRequest::ChangePublicationStatus] Schema for update file update request.
18
- #
15
+ # @!method initialize(file_id:, request_options: {})
16
+ # @param file_id [String]
19
17
  # @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
20
18
  end
21
19
  end
@@ -8,7 +8,13 @@ module Imagekitio
8
8
  extend Imagekitio::Internal::Type::RequestParameters::Converter
9
9
  include Imagekitio::Internal::Type::RequestParameters
10
10
 
11
- # @!method initialize(request_options: {})
11
+ # @!attribute file_id
12
+ #
13
+ # @return [String]
14
+ required :file_id, String
15
+
16
+ # @!method initialize(file_id:, request_options: {})
17
+ # @param file_id [String]
12
18
  # @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
13
19
  end
14
20
  end
@@ -13,8 +13,14 @@ module Imagekitio
13
13
  # @return [String]
14
14
  required :file_id, String
15
15
 
16
- # @!method initialize(file_id:, request_options: {})
16
+ # @!attribute version_id
17
+ #
18
+ # @return [String]
19
+ required :version_id, String
20
+
21
+ # @!method initialize(file_id:, version_id:, request_options: {})
17
22
  # @param file_id [String]
23
+ # @param version_id [String]
18
24
  # @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
19
25
  end
20
26
  end
@@ -13,8 +13,14 @@ module Imagekitio
13
13
  # @return [String]
14
14
  required :file_id, String
15
15
 
16
- # @!method initialize(file_id:, request_options: {})
16
+ # @!attribute version_id
17
+ #
18
+ # @return [String]
19
+ required :version_id, String
20
+
21
+ # @!method initialize(file_id:, version_id:, request_options: {})
17
22
  # @param file_id [String]
23
+ # @param version_id [String]
18
24
  # @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
19
25
  end
20
26
  end
@@ -8,7 +8,13 @@ module Imagekitio
8
8
  extend Imagekitio::Internal::Type::RequestParameters::Converter
9
9
  include Imagekitio::Internal::Type::RequestParameters
10
10
 
11
- # @!method initialize(request_options: {})
11
+ # @!attribute file_id
12
+ #
13
+ # @return [String]
14
+ required :file_id, String
15
+
16
+ # @!method initialize(file_id:, request_options: {})
17
+ # @param file_id [String]
12
18
  # @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
13
19
  end
14
20
  end
@@ -13,8 +13,14 @@ module Imagekitio
13
13
  # @return [String]
14
14
  required :file_id, String
15
15
 
16
- # @!method initialize(file_id:, request_options: {})
16
+ # @!attribute version_id
17
+ #
18
+ # @return [String]
19
+ required :version_id, String
20
+
21
+ # @!method initialize(file_id:, version_id:, request_options: {})
17
22
  # @param file_id [String]
23
+ # @param version_id [String]
18
24
  # @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
19
25
  end
20
26
  end
@@ -10,6 +10,15 @@ module Imagekitio
10
10
  # @return [Time, nil]
11
11
  optional :created_at, Time, api_name: :createdAt
12
12
 
13
+ # @!attribute custom_metadata
14
+ # An object with custom metadata for the folder. Returns empty object if no custom
15
+ # metadata is set.
16
+ #
17
+ # @return [Hash{Symbol=>Object}, nil]
18
+ optional :custom_metadata,
19
+ Imagekitio::Internal::Type::HashOf[Imagekitio::Internal::Type::Unknown],
20
+ api_name: :customMetadata
21
+
13
22
  # @!attribute folder_id
14
23
  # Unique identifier of the asset.
15
24
  #
@@ -44,12 +53,14 @@ module Imagekitio
44
53
  # @return [Time, nil]
45
54
  optional :updated_at, Time, api_name: :updatedAt
46
55
 
47
- # @!method initialize(created_at: nil, folder_id: nil, folder_path: nil, name: nil, type: nil, updated_at: nil)
56
+ # @!method initialize(created_at: nil, custom_metadata: nil, folder_id: nil, folder_path: nil, name: nil, type: nil, updated_at: nil)
48
57
  # Some parameter documentations has been truncated, see
49
58
  # {Imagekitio::Models::Folder} for more details.
50
59
  #
51
60
  # @param created_at [Time] Date and time when the folder was created. The date and time is in ISO8601 forma
52
61
  #
62
+ # @param custom_metadata [Hash{Symbol=>Object}] An object with custom metadata for the folder. Returns empty object if no custom
63
+ #
53
64
  # @param folder_id [String] Unique identifier of the asset.
54
65
  #
55
66
  # @param folder_path [String] Path of the folder. This is the path you would use in the URL to access the fold
@@ -8,7 +8,13 @@ module Imagekitio
8
8
  extend Imagekitio::Internal::Type::RequestParameters::Converter
9
9
  include Imagekitio::Internal::Type::RequestParameters
10
10
 
11
- # @!method initialize(request_options: {})
11
+ # @!attribute job_id
12
+ #
13
+ # @return [String]
14
+ required :job_id, String
15
+
16
+ # @!method initialize(job_id:, request_options: {})
17
+ # @param job_id [String]
12
18
  # @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
13
19
  end
14
20
  end
@@ -3,9 +3,18 @@
3
3
  module Imagekitio
4
4
  module Models
5
5
  class OverlayPosition < Imagekitio::Internal::Type::BaseModel
6
+ # @!attribute anchor_point
7
+ # Sets the anchor point on the base asset from which the overlay offset is
8
+ # calculated. The default value is `top_left`. Maps to `lap` in the URL. Can only
9
+ # be used with one or more of `x`, `y`, `xCenter`, or `yCenter`.
10
+ #
11
+ # @return [Symbol, Imagekitio::Models::OverlayPosition::AnchorPoint, nil]
12
+ optional :anchor_point, enum: -> { Imagekitio::OverlayPosition::AnchorPoint }, api_name: :anchorPoint
13
+
6
14
  # @!attribute focus
7
- # Specifies the position of the overlay relative to the parent image or video.
8
- # Maps to `lfo` in the URL.
15
+ # Specifies the position of the overlay relative to the parent image or video. If
16
+ # one or more of `x`, `y`, `xCenter`, or `yCenter` parameters are specified, this
17
+ # parameter is ignored. Maps to `lfo` in the URL.
9
18
  #
10
19
  # @return [Symbol, Imagekitio::Models::OverlayPosition::Focus, nil]
11
20
  optional :focus, enum: -> { Imagekitio::OverlayPosition::Focus }
@@ -20,6 +29,16 @@ module Imagekitio
20
29
  # @return [Float, String, nil]
21
30
  optional :x, union: -> { Imagekitio::OverlayPosition::X }
22
31
 
32
+ # @!attribute x_center
33
+ # Specifies the x-coordinate on the base asset where the overlay's center will be
34
+ # positioned. It also accepts arithmetic expressions such as `bw_mul_0.4` or
35
+ # `bw_sub_cw`. Maps to `lxc` in the URL. Cannot be used together with `x`, but can
36
+ # be used with `y`. Learn about
37
+ # [Arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations).
38
+ #
39
+ # @return [Float, String, nil]
40
+ optional :x_center, union: -> { Imagekitio::OverlayPosition::XCenter }, api_name: :xCenter
41
+
23
42
  # @!attribute y_
24
43
  # Specifies the y-coordinate of the top-left corner of the base asset where the
25
44
  # overlay's top-left corner will be positioned. It also accepts arithmetic
@@ -30,18 +49,57 @@ module Imagekitio
30
49
  # @return [Float, String, nil]
31
50
  optional :y_, union: -> { Imagekitio::OverlayPosition::Y }, api_name: :y
32
51
 
33
- # @!method initialize(focus: nil, x: nil, y_: nil)
52
+ # @!attribute y_center
53
+ # Specifies the y-coordinate on the base asset where the overlay's center will be
54
+ # positioned. It also accepts arithmetic expressions such as `bh_mul_0.4` or
55
+ # `bh_sub_ch`. Maps to `lyc` in the URL. Cannot be used together with `y`, but can
56
+ # be used with `x`. Learn about
57
+ # [Arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations).
58
+ #
59
+ # @return [Float, String, nil]
60
+ optional :y_center, union: -> { Imagekitio::OverlayPosition::YCenter }, api_name: :yCenter
61
+
62
+ # @!method initialize(anchor_point: nil, focus: nil, x: nil, x_center: nil, y_: nil, y_center: nil)
34
63
  # Some parameter documentations has been truncated, see
35
64
  # {Imagekitio::Models::OverlayPosition} for more details.
36
65
  #
66
+ # @param anchor_point [Symbol, Imagekitio::Models::OverlayPosition::AnchorPoint] Sets the anchor point on the base asset from which the overlay offset is calcula
67
+ #
37
68
  # @param focus [Symbol, Imagekitio::Models::OverlayPosition::Focus] Specifies the position of the overlay relative to the parent image or video.
38
69
  #
39
70
  # @param x [Float, String] Specifies the x-coordinate of the top-left corner of the base asset where the ov
40
71
  #
72
+ # @param x_center [Float, String] Specifies the x-coordinate on the base asset where the overlay's center will be
73
+ #
41
74
  # @param y_ [Float, String] Specifies the y-coordinate of the top-left corner of the base asset where the ov
75
+ #
76
+ # @param y_center [Float, String] Specifies the y-coordinate on the base asset where the overlay's center will be
77
+
78
+ # Sets the anchor point on the base asset from which the overlay offset is
79
+ # calculated. The default value is `top_left`. Maps to `lap` in the URL. Can only
80
+ # be used with one or more of `x`, `y`, `xCenter`, or `yCenter`.
81
+ #
82
+ # @see Imagekitio::Models::OverlayPosition#anchor_point
83
+ module AnchorPoint
84
+ extend Imagekitio::Internal::Type::Enum
85
+
86
+ TOP = :top
87
+ LEFT = :left
88
+ RIGHT = :right
89
+ BOTTOM = :bottom
90
+ TOP_LEFT = :top_left
91
+ TOP_RIGHT = :top_right
92
+ BOTTOM_LEFT = :bottom_left
93
+ BOTTOM_RIGHT = :bottom_right
94
+ CENTER = :center
95
+
96
+ # @!method self.values
97
+ # @return [Array<Symbol>]
98
+ end
42
99
 
43
- # Specifies the position of the overlay relative to the parent image or video.
44
- # Maps to `lfo` in the URL.
100
+ # Specifies the position of the overlay relative to the parent image or video. If
101
+ # one or more of `x`, `y`, `xCenter`, or `yCenter` parameters are specified, this
102
+ # parameter is ignored. Maps to `lfo` in the URL.
45
103
  #
46
104
  # @see Imagekitio::Models::OverlayPosition#focus
47
105
  module Focus
@@ -79,6 +137,24 @@ module Imagekitio
79
137
  # @return [Array(Float, String)]
80
138
  end
81
139
 
140
+ # Specifies the x-coordinate on the base asset where the overlay's center will be
141
+ # positioned. It also accepts arithmetic expressions such as `bw_mul_0.4` or
142
+ # `bw_sub_cw`. Maps to `lxc` in the URL. Cannot be used together with `x`, but can
143
+ # be used with `y`. Learn about
144
+ # [Arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations).
145
+ #
146
+ # @see Imagekitio::Models::OverlayPosition#x_center
147
+ module XCenter
148
+ extend Imagekitio::Internal::Type::Union
149
+
150
+ variant Float
151
+
152
+ variant String
153
+
154
+ # @!method self.variants
155
+ # @return [Array(Float, String)]
156
+ end
157
+
82
158
  # Specifies the y-coordinate of the top-left corner of the base asset where the
83
159
  # overlay's top-left corner will be positioned. It also accepts arithmetic
84
160
  # expressions such as `bh_mul_0.4` or `bh_sub_ch`. Maps to `ly` in the URL. Learn
@@ -96,6 +172,24 @@ module Imagekitio
96
172
  # @!method self.variants
97
173
  # @return [Array(Float, String)]
98
174
  end
175
+
176
+ # Specifies the y-coordinate on the base asset where the overlay's center will be
177
+ # positioned. It also accepts arithmetic expressions such as `bh_mul_0.4` or
178
+ # `bh_sub_ch`. Maps to `lyc` in the URL. Cannot be used together with `y`, but can
179
+ # be used with `x`. Learn about
180
+ # [Arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations).
181
+ #
182
+ # @see Imagekitio::Models::OverlayPosition#y_center
183
+ module YCenter
184
+ extend Imagekitio::Internal::Type::Union
185
+
186
+ variant Float
187
+
188
+ variant String
189
+
190
+ # @!method self.variants
191
+ # @return [Array(Float, String)]
192
+ end
99
193
  end
100
194
  end
101
195
  end
@@ -7,7 +7,13 @@ module Imagekitio
7
7
  extend Imagekitio::Internal::Type::RequestParameters::Converter
8
8
  include Imagekitio::Internal::Type::RequestParameters
9
9
 
10
- # @!method initialize(request_options: {})
10
+ # @!attribute id
11
+ #
12
+ # @return [String]
13
+ required :id, String
14
+
15
+ # @!method initialize(id:, request_options: {})
16
+ # @param id [String]
11
17
  # @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
12
18
  end
13
19
  end
@@ -7,7 +7,13 @@ module Imagekitio
7
7
  extend Imagekitio::Internal::Type::RequestParameters::Converter
8
8
  include Imagekitio::Internal::Type::RequestParameters
9
9
 
10
- # @!method initialize(request_options: {})
10
+ # @!attribute id
11
+ #
12
+ # @return [String]
13
+ required :id, String
14
+
15
+ # @!method initialize(id:, request_options: {})
16
+ # @param id [String]
11
17
  # @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
12
18
  end
13
19
  end
@@ -7,6 +7,11 @@ module Imagekitio
7
7
  extend Imagekitio::Internal::Type::RequestParameters::Converter
8
8
  include Imagekitio::Internal::Type::RequestParameters
9
9
 
10
+ # @!attribute id
11
+ #
12
+ # @return [String]
13
+ required :id, String
14
+
10
15
  # @!attribute config
11
16
  # Configuration object for an extension (base extensions only, not saved extension
12
17
  # references).
@@ -26,10 +31,12 @@ module Imagekitio
26
31
  # @return [String, nil]
27
32
  optional :name, String
28
33
 
29
- # @!method initialize(config: nil, description: nil, name: nil, request_options: {})
34
+ # @!method initialize(id:, config: nil, description: nil, name: nil, request_options: {})
30
35
  # Some parameter documentations has been truncated, see
31
36
  # {Imagekitio::Models::SavedExtensionUpdateParams} for more details.
32
37
  #
38
+ # @param id [String]
39
+ #
33
40
  # @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
41
  #
35
42
  # @param description [String] Updated description of the saved extension.
@@ -9,7 +9,7 @@ module Imagekitio
9
9
  #
10
10
  # @overload create(origin_request:, request_options: {})
11
11
  #
12
- # @param origin_request [Imagekitio::Accounts::OriginRequest] Schema for origin request resources.
12
+ # @param origin_request [Imagekitio::Models::Accounts::OriginRequest::S3, Imagekitio::Models::Accounts::OriginRequest::S3Compatible, Imagekitio::Models::Accounts::OriginRequest::CloudinaryBackup, Imagekitio::Models::Accounts::OriginRequest::WebFolder, Imagekitio::Models::Accounts::OriginRequest::WebProxy, Imagekitio::Models::Accounts::OriginRequest::Gcs, Imagekitio::Models::Accounts::OriginRequest::AzureBlob, Imagekitio::Models::Accounts::OriginRequest::AkeneoPim] Schema for origin request resources.
13
13
  #
14
14
  # @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}, nil]
15
15
  #
@@ -18,15 +18,10 @@ module Imagekitio
18
18
  # @see Imagekitio::Models::Accounts::OriginCreateParams
19
19
  def create(params)
20
20
  parsed, options = Imagekitio::Accounts::OriginCreateParams.dump_request(params)
21
- case parsed
22
- in {origin_request: Hash => union, **rest}
23
- parsed = {**rest, **union}
24
- else
25
- end
26
21
  @client.request(
27
22
  method: :post,
28
23
  path: "v1/accounts/origins",
29
- body: parsed,
24
+ body: parsed[:origin_request],
30
25
  model: Imagekitio::Accounts::OriginResponse,
31
26
  options: options
32
27
  )
@@ -42,7 +37,7 @@ module Imagekitio
42
37
  #
43
38
  # @param id [String] Unique identifier for the origin. This is generated by ImageKit when you create
44
39
  #
45
- # @param origin_request [Imagekitio::Accounts::OriginRequest] Schema for origin request resources.
40
+ # @param origin_request [Imagekitio::Models::Accounts::OriginRequest::S3, Imagekitio::Models::Accounts::OriginRequest::S3Compatible, Imagekitio::Models::Accounts::OriginRequest::CloudinaryBackup, Imagekitio::Models::Accounts::OriginRequest::WebFolder, Imagekitio::Models::Accounts::OriginRequest::WebProxy, Imagekitio::Models::Accounts::OriginRequest::Gcs, Imagekitio::Models::Accounts::OriginRequest::AzureBlob, Imagekitio::Models::Accounts::OriginRequest::AkeneoPim] Schema for origin request resources.
46
41
  #
47
42
  # @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}, nil]
48
43
  #
@@ -51,15 +46,10 @@ module Imagekitio
51
46
  # @see Imagekitio::Models::Accounts::OriginUpdateParams
52
47
  def update(id, params)
53
48
  parsed, options = Imagekitio::Accounts::OriginUpdateParams.dump_request(params)
54
- case parsed
55
- in {origin_request: Hash => union, **rest}
56
- parsed = {**rest, **union}
57
- else
58
- end
59
49
  @client.request(
60
50
  method: :put,
61
51
  path: ["v1/accounts/origins/%1$s", id],
62
- body: parsed,
52
+ body: parsed[:origin_request],
63
53
  model: Imagekitio::Accounts::OriginResponse,
64
54
  options: options
65
55
  )
@@ -25,10 +25,11 @@ module Imagekitio
25
25
  # @see Imagekitio::Models::Accounts::UsageGetParams
26
26
  def get(params)
27
27
  parsed, options = Imagekitio::Accounts::UsageGetParams.dump_request(params)
28
+ query = Imagekitio::Internal::Util.encode_query_params(parsed)
28
29
  @client.request(
29
30
  method: :get,
30
31
  path: "v1/accounts/usage",
31
- query: parsed.transform_keys(end_date: "endDate", start_date: "startDate"),
32
+ query: query.transform_keys(end_date: "endDate", start_date: "startDate"),
32
33
  model: Imagekitio::Models::Accounts::UsageGetResponse,
33
34
  options: options
34
35
  )
@@ -34,10 +34,11 @@ module Imagekitio
34
34
  # @see Imagekitio::Models::AssetListParams
35
35
  def list(params = {})
36
36
  parsed, options = Imagekitio::AssetListParams.dump_request(params)
37
+ query = Imagekitio::Internal::Util.encode_query_params(parsed)
37
38
  @client.request(
38
39
  method: :get,
39
40
  path: "v1/files",
40
- query: parsed.transform_keys(file_type: "fileType", search_query: "searchQuery"),
41
+ query: query.transform_keys(file_type: "fileType", search_query: "searchQuery"),
41
42
  model: Imagekitio::Internal::Type::ArrayOf[union: Imagekitio::Models::AssetListResponseItem],
42
43
  options: options
43
44
  )
@@ -19,10 +19,11 @@ module Imagekitio
19
19
  # about how to implement secure client-side file upload.
20
20
  #
21
21
  # **File size limit** \
22
- # On the free plan, the maximum upload file sizes are 20MB for images, audio, and raw
23
- # files, and 100MB for videos. On the paid plan, these limits increase to 40MB for
24
- # images, audio, and raw files, and 2GB for videos. These limits can be further increased
25
- # with higher-tier plans.
22
+ # On the free plan, the maximum upload file sizes are 25MB for images, audio, and raw
23
+ # files, and 100MB for videos. On the Lite paid plan, these limits increase to 40MB
24
+ # for images, audio, and raw files and 300MB for videos, whereas on the Pro paid plan,
25
+ # these limits increase to 50MB for images, audio, and raw files and 2GB for videos.
26
+ # These limits can be further increased with enterprise plans.
26
27
  #
27
28
  # **Version limit** \
28
29
  # A file can have a maximum of 100 versions.
@@ -89,10 +89,11 @@ module Imagekitio
89
89
  # @see Imagekitio::Models::CustomMetadataFieldListParams
90
90
  def list(params = {})
91
91
  parsed, options = Imagekitio::CustomMetadataFieldListParams.dump_request(params)
92
+ query = Imagekitio::Internal::Util.encode_query_params(parsed)
92
93
  @client.request(
93
94
  method: :get,
94
95
  path: "v1/customMetadataFields",
95
- query: parsed.transform_keys(folder_path: "folderPath", include_deleted: "includeDeleted"),
96
+ query: query.transform_keys(folder_path: "folderPath", include_deleted: "includeDeleted"),
96
97
  model: Imagekitio::Internal::Type::ArrayOf[Imagekitio::CustomMetadataField],
97
98
  options: options
98
99
  )
@@ -48,10 +48,11 @@ module Imagekitio
48
48
  # @see Imagekitio::Models::Files::MetadataGetFromURLParams
49
49
  def get_from_url(params)
50
50
  parsed, options = Imagekitio::Files::MetadataGetFromURLParams.dump_request(params)
51
+ query = Imagekitio::Internal::Util.encode_query_params(parsed)
51
52
  @client.request(
52
53
  method: :get,
53
54
  path: "v1/metadata",
54
- query: parsed,
55
+ query: query,
55
56
  model: Imagekitio::Metadata,
56
57
  options: options
57
58
  )
@@ -23,7 +23,7 @@ module Imagekitio
23
23
  #
24
24
  # @param file_id [String] The unique `fileId` of the uploaded file. `fileId` is returned in list and searc
25
25
  #
26
- # @param update_file_request [Imagekitio::UpdateFileRequest] Schema for update file update request.
26
+ # @param update_file_request [Imagekitio::Models::UpdateFileRequest::UpdateFileDetails, Imagekitio::Models::UpdateFileRequest::ChangePublicationStatus] Schema for update file update request.
27
27
  #
28
28
  # @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}, nil]
29
29
  #
@@ -32,15 +32,10 @@ module Imagekitio
32
32
  # @see Imagekitio::Models::FileUpdateParams
33
33
  def update(file_id, params)
34
34
  parsed, options = Imagekitio::FileUpdateParams.dump_request(params)
35
- case parsed
36
- in {update_file_request: Hash => union, **rest}
37
- parsed = {**rest, **union}
38
- else
39
- end
40
35
  @client.request(
41
36
  method: :patch,
42
37
  path: ["v1/files/%1$s/details", file_id],
43
- body: parsed,
38
+ body: parsed[:update_file_request],
44
39
  model: Imagekitio::Models::FileUpdateResponse,
45
40
  options: options
46
41
  )
@@ -207,10 +202,11 @@ module Imagekitio
207
202
  # by verifying the entire payload using JWT.
208
203
  #
209
204
  # **File size limit** \
210
- # On the free plan, the maximum upload file sizes are 20MB for images, audio, and raw
211
- # files and 100MB for videos. On the paid plan, these limits increase to 40MB for images,
212
- # audio, and raw files and 2GB for videos. These limits can be further increased with
213
- # higher-tier plans.
205
+ # On the free plan, the maximum upload file sizes are 25MB for images, audio, and raw
206
+ # files and 100MB for videos. On the Lite paid plan, these limits increase to 40MB
207
+ # for images, audio, and raw files and 300MB for videos, whereas on the Pro paid plan,
208
+ # these limits increase to 50MB for images, audio, and raw files and 2GB for videos.
209
+ # These limits can be further increased with enterprise plans.
214
210
  #
215
211
  # **Version limit** \
216
212
  # A file can have a maximum of 100 versions.