imagekitio 4.6.0 → 4.8.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 (32) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +19 -0
  3. data/README.md +1 -1
  4. data/lib/imagekitio/internal/transport/base_client.rb +4 -1
  5. data/lib/imagekitio/models/accounts/origin_request.rb +35 -10
  6. data/lib/imagekitio/models/accounts/origin_response.rb +20 -2
  7. data/lib/imagekitio/models/accounts/request_bandwidth_entry.rb +26 -0
  8. data/lib/imagekitio/models/accounts/usage_analytics_get_params.rb +39 -0
  9. data/lib/imagekitio/models/accounts/usage_analytics_response.rb +1044 -0
  10. data/lib/imagekitio/models/transformation.rb +1 -1
  11. data/lib/imagekitio/resources/accounts/usage.rb +6 -0
  12. data/lib/imagekitio/resources/accounts/usage_analytics.rb +55 -0
  13. data/lib/imagekitio/resources/accounts.rb +4 -0
  14. data/lib/imagekitio/version.rb +1 -1
  15. data/lib/imagekitio.rb +4 -0
  16. data/rbi/imagekitio/models/accounts/origin_request.rbi +36 -10
  17. data/rbi/imagekitio/models/accounts/origin_response.rbi +28 -2
  18. data/rbi/imagekitio/models/accounts/request_bandwidth_entry.rbi +44 -0
  19. data/rbi/imagekitio/models/accounts/usage_analytics_get_params.rbi +64 -0
  20. data/rbi/imagekitio/models/accounts/usage_analytics_response.rbi +2097 -0
  21. data/rbi/imagekitio/models/transformation.rbi +2 -2
  22. data/rbi/imagekitio/resources/accounts/usage.rbi +6 -0
  23. data/rbi/imagekitio/resources/accounts/usage_analytics.rbi +46 -0
  24. data/rbi/imagekitio/resources/accounts.rbi +3 -0
  25. data/sig/imagekitio/models/accounts/origin_request.rbs +18 -4
  26. data/sig/imagekitio/models/accounts/origin_response.rbs +18 -4
  27. data/sig/imagekitio/models/accounts/request_bandwidth_entry.rbs +18 -0
  28. data/sig/imagekitio/models/accounts/usage_analytics_get_params.rbs +30 -0
  29. data/sig/imagekitio/models/accounts/usage_analytics_response.rbs +785 -0
  30. data/sig/imagekitio/resources/accounts/usage_analytics.rbs +15 -0
  31. data/sig/imagekitio/resources/accounts.rbs +2 -0
  32. metadata +14 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fedc066efa6b23de05d5fbde2a58620df0367b19bc0fe3c4c4088c814341f371
4
- data.tar.gz: e63e496269f464dfea1b230ae3db7d4dbb31139b776fb5b98204aa7ed53b8afb
3
+ metadata.gz: 53589b5e387cc2e3919aaea2e515bc77f13f77d81cf9b244ba2b1749868acb8e
4
+ data.tar.gz: 2b8701182074f45b8e43235229cff8d2112dfc6063a307e97431110a7419a19b
5
5
  SHA512:
6
- metadata.gz: 86ce4087b4dc5d08936d4b0909b76cd134196ed0afb410c7dbdf101ea03acf7b6f6eff8857acd6738265a3eff8738b42dcd07e0971f63da0ee6252eb21edfb09
7
- data.tar.gz: 785de1bdd7be3bcd73991b87789539b7cce8e1a45088cb477cef9c5d4dd57c0d3e1193f5f9e540cae9df28350ede54327a226a9f36356f2861da358ac64b984e
6
+ metadata.gz: bc8f6b4f36557e0419313bdb688c243736a3139e9e1095300d0af2f8c2af339858881d51c67b92d41b1b2493d031cdbed69c116fd6a992ba8bacb54ab5f1bdfb
7
+ data.tar.gz: b4033a82d0f7960904b513ccd4f01cb662698b0abbba368727889a3aee987438c6f78768efe30b577e35f3f249b4d4cde55bad1c3c27b1418030471f719463ac
data/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.8.0](https://github.com/imagekit-developer/imagekit-ruby/compare/v4.7.0...v4.8.0) (2026-07-14)
4
+
5
+
6
+ ### Features
7
+
8
+ * **api:** add usage analytics breakdown endpoint ([82b2909](https://github.com/imagekit-developer/imagekit-ruby/commit/82b29099bc232601ad99dd3b304be8edf59e2179))
9
+
10
+ ## [4.7.0](https://github.com/imagekit-developer/imagekit-ruby/compare/v4.6.0...v4.7.0) (2026-06-18)
11
+
12
+
13
+ ### Features
14
+
15
+ * **origins:** add useIAMRole for IAM role authentication ([c38cc1b](https://github.com/imagekit-developer/imagekit-ruby/commit/c38cc1bea8028c2c10ae543e027dc71a63170222))
16
+
17
+
18
+ ### Documentation
19
+
20
+ * update default value in description for intensity in colorize transformation ([7b128c5](https://github.com/imagekit-developer/imagekit-ruby/commit/7b128c59d1da7435e6137ebad7a60251e941defa))
21
+
3
22
  ## [4.6.0](https://github.com/imagekit-developer/imagekit-ruby/compare/v4.5.1...v4.6.0) (2026-06-03)
4
23
 
5
24
 
data/README.md CHANGED
@@ -46,7 +46,7 @@ To use this gem, install via Bundler by adding the following to your application
46
46
  <!-- x-release-please-start-version -->
47
47
 
48
48
  ```ruby
49
- gem "imagekitio", "~> 4.6.0"
49
+ gem "imagekitio", "~> 4.8.0"
50
50
  ```
51
51
 
52
52
  <!-- x-release-please-end -->
@@ -306,7 +306,10 @@ module Imagekitio
306
306
  Imagekitio::Internal::Util.deep_merge(*[req[:body], opts[:extra_body]].compact)
307
307
  end
308
308
 
309
- headers.delete("content-type") if body.nil?
309
+ # Generated methods always pass `req[:body]` for operations that define a
310
+ # request body, so only elide the content-type header when the operation
311
+ # has no body at all, not when an optional body param was omitted.
312
+ headers.delete("content-type") if body.nil? && !req.key?(:body)
310
313
 
311
314
  url = Imagekitio::Internal::Util.join_parsed_uri(
312
315
  @base_url_components,
@@ -27,7 +27,7 @@ module Imagekitio
27
27
 
28
28
  class S3 < Imagekitio::Internal::Type::BaseModel
29
29
  # @!attribute access_key
30
- # Access key for the bucket.
30
+ # Access key for the bucket. When `useIAMRole` is `true`, send an empty string.
31
31
  #
32
32
  # @return [String]
33
33
  required :access_key, String, api_name: :accessKey
@@ -45,7 +45,7 @@ module Imagekitio
45
45
  required :name, String
46
46
 
47
47
  # @!attribute secret_key
48
- # Secret key for the bucket.
48
+ # Secret key for the bucket. When `useIAMRole` is `true`, send an empty string.
49
49
  #
50
50
  # @return [String]
51
51
  required :secret_key, String, api_name: :secretKey
@@ -75,14 +75,24 @@ module Imagekitio
75
75
  # @return [String, nil]
76
76
  optional :prefix, String
77
77
 
78
- # @!method initialize(access_key:, bucket:, name:, secret_key:, base_url_for_canonical_header: nil, include_canonical_header: nil, prefix: nil, type: :S3)
79
- # @param access_key [String] Access key for the bucket.
78
+ # @!attribute use_iam_role
79
+ # Use IAM role for authentication instead of access/secret keys. When set to
80
+ # `true`, send an empty string for both `accessKey` and `secretKey`.
81
+ #
82
+ # @return [Boolean, nil]
83
+ optional :use_iam_role, Imagekitio::Internal::Type::Boolean, api_name: :useIAMRole
84
+
85
+ # @!method initialize(access_key:, bucket:, name:, secret_key:, base_url_for_canonical_header: nil, include_canonical_header: nil, prefix: nil, use_iam_role: nil, type: :S3)
86
+ # Some parameter documentations has been truncated, see
87
+ # {Imagekitio::Models::Accounts::OriginRequest::S3} for more details.
88
+ #
89
+ # @param access_key [String] Access key for the bucket. When `useIAMRole` is `true`, send an empty string.
80
90
  #
81
91
  # @param bucket [String] S3 bucket name.
82
92
  #
83
93
  # @param name [String] Display name of the origin.
84
94
  #
85
- # @param secret_key [String] Secret key for the bucket.
95
+ # @param secret_key [String] Secret key for the bucket. When `useIAMRole` is `true`, send an empty string.
86
96
  #
87
97
  # @param base_url_for_canonical_header [String] URL used in the Canonical header (if enabled).
88
98
  #
@@ -90,6 +100,8 @@ module Imagekitio
90
100
  #
91
101
  # @param prefix [String] Path prefix inside the bucket.
92
102
  #
103
+ # @param use_iam_role [Boolean] Use IAM role for authentication instead of access/secret keys. When set to `true
104
+ #
93
105
  # @param type [Symbol, :S3]
94
106
  end
95
107
 
@@ -179,7 +191,7 @@ module Imagekitio
179
191
 
180
192
  class CloudinaryBackup < Imagekitio::Internal::Type::BaseModel
181
193
  # @!attribute access_key
182
- # Access key for the bucket.
194
+ # Access key for the bucket. When `useIAMRole` is `true`, send an empty string.
183
195
  #
184
196
  # @return [String]
185
197
  required :access_key, String, api_name: :accessKey
@@ -197,7 +209,7 @@ module Imagekitio
197
209
  required :name, String
198
210
 
199
211
  # @!attribute secret_key
200
- # Secret key for the bucket.
212
+ # Secret key for the bucket. When `useIAMRole` is `true`, send an empty string.
201
213
  #
202
214
  # @return [String]
203
215
  required :secret_key, String, api_name: :secretKey
@@ -227,14 +239,25 @@ module Imagekitio
227
239
  # @return [String, nil]
228
240
  optional :prefix, String
229
241
 
230
- # @!method initialize(access_key:, bucket:, name:, secret_key:, base_url_for_canonical_header: nil, include_canonical_header: nil, prefix: nil, type: :CLOUDINARY_BACKUP)
231
- # @param access_key [String] Access key for the bucket.
242
+ # @!attribute use_iam_role
243
+ # Use IAM role for authentication instead of access/secret keys. When set to
244
+ # `true`, send an empty string for both `accessKey` and `secretKey`.
245
+ #
246
+ # @return [Boolean, nil]
247
+ optional :use_iam_role, Imagekitio::Internal::Type::Boolean, api_name: :useIAMRole
248
+
249
+ # @!method initialize(access_key:, bucket:, name:, secret_key:, base_url_for_canonical_header: nil, include_canonical_header: nil, prefix: nil, use_iam_role: nil, type: :CLOUDINARY_BACKUP)
250
+ # Some parameter documentations has been truncated, see
251
+ # {Imagekitio::Models::Accounts::OriginRequest::CloudinaryBackup} for more
252
+ # details.
253
+ #
254
+ # @param access_key [String] Access key for the bucket. When `useIAMRole` is `true`, send an empty string.
232
255
  #
233
256
  # @param bucket [String] S3 bucket name.
234
257
  #
235
258
  # @param name [String] Display name of the origin.
236
259
  #
237
- # @param secret_key [String] Secret key for the bucket.
260
+ # @param secret_key [String] Secret key for the bucket. When `useIAMRole` is `true`, send an empty string.
238
261
  #
239
262
  # @param base_url_for_canonical_header [String] URL used in the Canonical header (if enabled).
240
263
  #
@@ -242,6 +265,8 @@ module Imagekitio
242
265
  #
243
266
  # @param prefix [String] Path prefix inside the bucket.
244
267
  #
268
+ # @param use_iam_role [Boolean] Use IAM role for authentication instead of access/secret keys. When set to `true
269
+ #
245
270
  # @param type [Symbol, :CLOUDINARY_BACKUP]
246
271
  end
247
272
 
@@ -65,6 +65,13 @@ module Imagekitio
65
65
  # @return [String, nil]
66
66
  optional :base_url_for_canonical_header, String, api_name: :baseUrlForCanonicalHeader
67
67
 
68
+ # @!attribute use_iam_role
69
+ # Whether the origin authenticates using an IAM role instead of access/secret
70
+ # keys.
71
+ #
72
+ # @return [Boolean, nil]
73
+ optional :use_iam_role, Imagekitio::Internal::Type::Boolean, api_name: :useIAMRole
74
+
68
75
  response_only do
69
76
  # @!attribute id
70
77
  # Unique identifier for the origin. This is generated by ImageKit when you create
@@ -74,7 +81,7 @@ module Imagekitio
74
81
  required :id, String
75
82
  end
76
83
 
77
- # @!method initialize(id:, bucket:, include_canonical_header:, name:, prefix:, base_url_for_canonical_header: nil, type: :S3)
84
+ # @!method initialize(id:, bucket:, include_canonical_header:, name:, prefix:, base_url_for_canonical_header: nil, use_iam_role: nil, type: :S3)
78
85
  # Some parameter documentations has been truncated, see
79
86
  # {Imagekitio::Models::Accounts::OriginResponse::S3} for more details.
80
87
  #
@@ -90,6 +97,8 @@ module Imagekitio
90
97
  #
91
98
  # @param base_url_for_canonical_header [String] URL used in the Canonical header (if enabled).
92
99
  #
100
+ # @param use_iam_role [Boolean] Whether the origin authenticates using an IAM role instead of access/secret keys
101
+ #
93
102
  # @param type [Symbol, :S3]
94
103
  end
95
104
 
@@ -213,6 +222,13 @@ module Imagekitio
213
222
  # @return [String, nil]
214
223
  optional :base_url_for_canonical_header, String, api_name: :baseUrlForCanonicalHeader
215
224
 
225
+ # @!attribute use_iam_role
226
+ # Whether the origin authenticates using an IAM role instead of access/secret
227
+ # keys.
228
+ #
229
+ # @return [Boolean, nil]
230
+ optional :use_iam_role, Imagekitio::Internal::Type::Boolean, api_name: :useIAMRole
231
+
216
232
  response_only do
217
233
  # @!attribute id
218
234
  # Unique identifier for the origin. This is generated by ImageKit when you create
@@ -222,7 +238,7 @@ module Imagekitio
222
238
  required :id, String
223
239
  end
224
240
 
225
- # @!method initialize(id:, bucket:, include_canonical_header:, name:, prefix:, base_url_for_canonical_header: nil, type: :CLOUDINARY_BACKUP)
241
+ # @!method initialize(id:, bucket:, include_canonical_header:, name:, prefix:, base_url_for_canonical_header: nil, use_iam_role: nil, type: :CLOUDINARY_BACKUP)
226
242
  # Some parameter documentations has been truncated, see
227
243
  # {Imagekitio::Models::Accounts::OriginResponse::CloudinaryBackup} for more
228
244
  # details.
@@ -239,6 +255,8 @@ module Imagekitio
239
255
  #
240
256
  # @param base_url_for_canonical_header [String] URL used in the Canonical header (if enabled).
241
257
  #
258
+ # @param use_iam_role [Boolean] Whether the origin authenticates using an IAM role instead of access/secret keys
259
+ #
242
260
  # @param type [Symbol, :CLOUDINARY_BACKUP]
243
261
  end
244
262
 
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Imagekitio
4
+ module Models
5
+ module Accounts
6
+ class RequestBandwidthEntry < Imagekitio::Internal::Type::BaseModel
7
+ # @!attribute bandwidth_bytes
8
+ # Total bandwidth used in bytes.
9
+ #
10
+ # @return [Float]
11
+ required :bandwidth_bytes, Float, api_name: :bandwidthBytes
12
+
13
+ # @!attribute request_count
14
+ # Number of requests.
15
+ #
16
+ # @return [Float]
17
+ required :request_count, Float, api_name: :requestCount
18
+
19
+ # @!method initialize(bandwidth_bytes:, request_count:)
20
+ # @param bandwidth_bytes [Float] Total bandwidth used in bytes.
21
+ #
22
+ # @param request_count [Float] Number of requests.
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Imagekitio
4
+ module Models
5
+ module Accounts
6
+ # @see Imagekitio::Resources::Accounts::UsageAnalytics#get
7
+ class UsageAnalyticsGetParams < Imagekitio::Internal::Type::BaseModel
8
+ extend Imagekitio::Internal::Type::RequestParameters::Converter
9
+ include Imagekitio::Internal::Type::RequestParameters
10
+
11
+ # @!attribute end_date
12
+ # Specify an `endDate` in `YYYY-MM-DD` format, interpreted as a UTC calendar day.
13
+ # It should be after the `startDate`. The difference between `startDate` and
14
+ # `endDate` should be less than 90 days.
15
+ #
16
+ # @return [Date]
17
+ required :end_date, Date
18
+
19
+ # @!attribute start_date
20
+ # Specify a `startDate` in `YYYY-MM-DD` format, interpreted as a UTC calendar day.
21
+ # It should be before the `endDate`. The difference between `startDate` and
22
+ # `endDate` should be less than 90 days.
23
+ #
24
+ # @return [Date]
25
+ required :start_date, Date
26
+
27
+ # @!method initialize(end_date:, start_date:, request_options: {})
28
+ # Some parameter documentations has been truncated, see
29
+ # {Imagekitio::Models::Accounts::UsageAnalyticsGetParams} for more details.
30
+ #
31
+ # @param end_date [Date] Specify an `endDate` in `YYYY-MM-DD` format, interpreted as a UTC calendar day.
32
+ #
33
+ # @param start_date [Date] Specify a `startDate` in `YYYY-MM-DD` format, interpreted as a UTC calendar day.
34
+ #
35
+ # @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
36
+ end
37
+ end
38
+ end
39
+ end