imagekitio 4.2.0 → 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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +38 -0
- data/README.md +1 -1
- data/lib/imagekitio/client.rb +14 -0
- data/lib/imagekitio/helpers/helper.rb +6 -0
- data/lib/imagekitio/internal/transport/pooled_net_requester.rb +1 -1
- data/lib/imagekitio/internal/util.rb +51 -7
- data/lib/imagekitio/models/accounts/origin_create_params.rb +1 -9
- data/lib/imagekitio/models/accounts/origin_delete_params.rb +13 -1
- data/lib/imagekitio/models/accounts/origin_get_params.rb +13 -1
- data/lib/imagekitio/models/accounts/origin_update_params.rb +10 -6
- data/lib/imagekitio/models/accounts/url_endpoint_delete_params.rb +14 -1
- data/lib/imagekitio/models/accounts/url_endpoint_get_params.rb +14 -1
- data/lib/imagekitio/models/accounts/url_endpoint_update_params.rb +14 -1
- data/lib/imagekitio/models/cache/invalidation_get_params.rb +7 -1
- data/lib/imagekitio/models/custom_metadata_field_delete_params.rb +7 -1
- data/lib/imagekitio/models/custom_metadata_field_update_params.rb +8 -1
- data/lib/imagekitio/models/extension_config.rb +10 -5
- data/lib/imagekitio/models/extensions.rb +10 -5
- data/lib/imagekitio/models/file_delete_params.rb +7 -1
- data/lib/imagekitio/models/file_get_params.rb +7 -1
- data/lib/imagekitio/models/file_update_params.rb +5 -7
- data/lib/imagekitio/models/files/metadata_get_params.rb +7 -1
- data/lib/imagekitio/models/files/version_delete_params.rb +7 -1
- data/lib/imagekitio/models/files/version_get_params.rb +7 -1
- data/lib/imagekitio/models/files/version_list_params.rb +7 -1
- data/lib/imagekitio/models/files/version_restore_params.rb +7 -1
- data/lib/imagekitio/models/folders/job_get_params.rb +7 -1
- data/lib/imagekitio/models/overlay_position.rb +99 -5
- data/lib/imagekitio/models/saved_extension_delete_params.rb +7 -1
- data/lib/imagekitio/models/saved_extension_get_params.rb +7 -1
- data/lib/imagekitio/models/saved_extension_update_params.rb +8 -1
- data/lib/imagekitio/resources/accounts/origins.rb +4 -14
- data/lib/imagekitio/resources/accounts/usage.rb +2 -1
- data/lib/imagekitio/resources/assets.rb +2 -1
- data/lib/imagekitio/resources/beta/v2/files.rb +5 -4
- data/lib/imagekitio/resources/custom_metadata_fields.rb +2 -1
- data/lib/imagekitio/resources/files/metadata.rb +2 -1
- data/lib/imagekitio/resources/files.rb +7 -11
- data/lib/imagekitio/resources/webhooks.rb +11 -1
- data/lib/imagekitio/version.rb +1 -1
- data/lib/imagekitio.rb +1 -0
- data/rbi/imagekitio/client.rbi +13 -0
- data/rbi/imagekitio/internal/util.rbi +29 -1
- data/rbi/imagekitio/models/accounts/origin_create_params.rbi +4 -51
- data/rbi/imagekitio/models/accounts/origin_delete_params.rbi +18 -5
- data/rbi/imagekitio/models/accounts/origin_get_params.rbi +18 -5
- data/rbi/imagekitio/models/accounts/origin_update_params.rbi +9 -43
- data/rbi/imagekitio/models/accounts/url_endpoint_delete_params.rbi +20 -5
- data/rbi/imagekitio/models/accounts/url_endpoint_get_params.rbi +20 -5
- data/rbi/imagekitio/models/accounts/url_endpoint_update_params.rbi +20 -5
- data/rbi/imagekitio/models/cache/invalidation_get_params.rbi +11 -5
- data/rbi/imagekitio/models/custom_metadata_field_delete_params.rbi +13 -5
- data/rbi/imagekitio/models/custom_metadata_field_update_params.rbi +6 -0
- data/rbi/imagekitio/models/extension_config.rbi +16 -6
- data/rbi/imagekitio/models/extensions.rbi +16 -6
- data/rbi/imagekitio/models/file_delete_params.rbi +13 -5
- data/rbi/imagekitio/models/file_get_params.rbi +13 -5
- data/rbi/imagekitio/models/file_update_params.rbi +5 -28
- data/rbi/imagekitio/models/files/metadata_get_params.rbi +11 -5
- data/rbi/imagekitio/models/files/version_delete_params.rbi +10 -2
- data/rbi/imagekitio/models/files/version_get_params.rbi +10 -2
- data/rbi/imagekitio/models/files/version_list_params.rbi +11 -5
- data/rbi/imagekitio/models/files/version_restore_params.rbi +10 -2
- data/rbi/imagekitio/models/folders/job_get_params.rbi +11 -5
- data/rbi/imagekitio/models/overlay_position.rbi +165 -9
- data/rbi/imagekitio/models/saved_extension_delete_params.rbi +13 -5
- data/rbi/imagekitio/models/saved_extension_get_params.rbi +13 -5
- data/rbi/imagekitio/models/saved_extension_update_params.rbi +6 -0
- data/rbi/imagekitio/resources/accounts/origins.rbi +22 -2
- data/rbi/imagekitio/resources/beta/v2/files.rbi +5 -4
- data/rbi/imagekitio/resources/files.rbi +10 -5
- data/rbi/imagekitio/resources/webhooks.rbi +10 -2
- data/sig/imagekitio/client.rbs +3 -0
- data/sig/imagekitio/internal/util.rbs +14 -0
- data/sig/imagekitio/models/accounts/origin_create_params.rbs +3 -16
- data/sig/imagekitio/models/accounts/origin_delete_params.rbs +11 -3
- data/sig/imagekitio/models/accounts/origin_get_params.rbs +11 -3
- data/sig/imagekitio/models/accounts/origin_update_params.rbs +4 -9
- data/sig/imagekitio/models/accounts/url_endpoint_delete_params.rbs +11 -3
- data/sig/imagekitio/models/accounts/url_endpoint_get_params.rbs +11 -3
- data/sig/imagekitio/models/accounts/url_endpoint_update_params.rbs +13 -3
- data/sig/imagekitio/models/cache/invalidation_get_params.rbs +11 -3
- data/sig/imagekitio/models/custom_metadata_field_delete_params.rbs +11 -3
- data/sig/imagekitio/models/custom_metadata_field_update_params.rbs +5 -0
- data/sig/imagekitio/models/file_delete_params.rbs +11 -3
- data/sig/imagekitio/models/file_get_params.rbs +12 -3
- data/sig/imagekitio/models/file_update_params.rbs +4 -9
- data/sig/imagekitio/models/files/metadata_get_params.rbs +11 -3
- data/sig/imagekitio/models/files/version_delete_params.rbs +6 -1
- data/sig/imagekitio/models/files/version_get_params.rbs +6 -1
- data/sig/imagekitio/models/files/version_list_params.rbs +11 -3
- data/sig/imagekitio/models/files/version_restore_params.rbs +6 -1
- data/sig/imagekitio/models/folders/job_get_params.rbs +11 -3
- data/sig/imagekitio/models/overlay_position.rbs +73 -3
- data/sig/imagekitio/models/saved_extension_delete_params.rbs +11 -3
- data/sig/imagekitio/models/saved_extension_get_params.rbs +11 -3
- data/sig/imagekitio/models/saved_extension_update_params.rbs +5 -0
- data/sig/imagekitio/resources/accounts/origins.rbs +2 -2
- data/sig/imagekitio/resources/files.rbs +1 -1
- data/sig/imagekitio/resources/webhooks.rbs +3 -1
- metadata +16 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3281ae61effcaaded900c340f50f3d969c218f51db36e3a1bbf1ecf0698e4859
|
|
4
|
+
data.tar.gz: 8c6a57f45cacfa242f22efe0f7ef59fa74a433c273301545d9f2d1741fc9d3ee
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6b36fc91ac87e5f585f47de86eefbeb123890728fbf6fa983c388e9b3bbfa9976e09c1515a616dba95a937ca2646575a5b253855f28e52999c44f872eee97cbb
|
|
7
|
+
data.tar.gz: b406ae855b093a5c2d09168e750182fda97b8281ed59295f6245cdc82eda65df2a21f0db07f94affdb272edb16875ff949121eacb159ff1efdd4a2c40440690f
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.3.0 (2026-04-06)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v4.2.0...v4.3.0](https://github.com/imagekit-developer/imagekit-ruby/compare/v4.2.0...v4.3.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** add support for x_center, y_center, and anchor_point in overlay positioning ([dcbcf76](https://github.com/imagekit-developer/imagekit-ruby/commit/dcbcf7610f2a484689f5c83a8779ab3dd4c5b092))
|
|
10
|
+
* **api:** dpr type update ([650aa0f](https://github.com/imagekit-developer/imagekit-ruby/commit/650aa0f905b4a586c036ae2f019bd7cfb7775d40))
|
|
11
|
+
* **api:** Introduce lxc, lyc, lap parameters in overlays. ([5a87ef0](https://github.com/imagekit-developer/imagekit-ruby/commit/5a87ef064bc9c14d1d62bbd338b64d7718888460))
|
|
12
|
+
* **api:** revert dpr breaking change ([525e6a8](https://github.com/imagekit-developer/imagekit-ruby/commit/525e6a8a59f0f4a17ab17468aebc4b8ccdce182c))
|
|
13
|
+
* **client:** add webhook support ([2a65217](https://github.com/imagekit-developer/imagekit-ruby/commit/2a65217314672d643372aafed4c83adf19c0566f))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* align path encoding with RFC 3986 section 3.3 ([88f5590](https://github.com/imagekit-developer/imagekit-ruby/commit/88f5590fc3bb8b7766d4698892aff762f80d3629))
|
|
19
|
+
* **client:** add types for path params, and update structure of unions nested in params ([dd1e1ec](https://github.com/imagekit-developer/imagekit-ruby/commit/dd1e1ec791f563877bc2262b0aea91f4df9b2ced))
|
|
20
|
+
* **client:** always add content-length to post body, even when empty ([e156b70](https://github.com/imagekit-developer/imagekit-ruby/commit/e156b70c82c9b38de49307218fb3f687f651aa5b))
|
|
21
|
+
* **client:** loosen json header parsing ([9fc1fc6](https://github.com/imagekit-developer/imagekit-ruby/commit/9fc1fc60c60173f92f1f99fabe38f9ec826d940d))
|
|
22
|
+
* **client:** serialize query parameters properly ([bbfc6e0](https://github.com/imagekit-developer/imagekit-ruby/commit/bbfc6e0d80da5661600a888e8c915d336919fe36))
|
|
23
|
+
* **internal:** correct multipart form field name encoding ([f3c20a9](https://github.com/imagekit-developer/imagekit-ruby/commit/f3c20a9740682cb96e90eecfd617f204cd28a491))
|
|
24
|
+
* properly mock time in ruby ci tests ([8f0a0a9](https://github.com/imagekit-developer/imagekit-ruby/commit/8f0a0a93ebc66d8d56d5e47950607f8d67f37514))
|
|
25
|
+
* variable name typo ([1d32dc3](https://github.com/imagekit-developer/imagekit-ruby/commit/1d32dc3ec09c80961cc58ecfd40b2449957a2ac9))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Chores
|
|
29
|
+
|
|
30
|
+
* **ci:** add build step ([c213724](https://github.com/imagekit-developer/imagekit-ruby/commit/c213724d793c735b09c784a5a285cf394f79d528))
|
|
31
|
+
* **ci:** skip lint on metadata-only changes ([62e401f](https://github.com/imagekit-developer/imagekit-ruby/commit/62e401f6fc35fa3bc0e16593bab8e4a477536d4f))
|
|
32
|
+
* **ci:** skip uploading artifacts on stainless-internal branches ([fbc0465](https://github.com/imagekit-developer/imagekit-ruby/commit/fbc0465b3c2fc05da7a61fe74fab19189be90305))
|
|
33
|
+
* **ci:** support opting out of skipping builds on metadata-only commits ([af71b49](https://github.com/imagekit-developer/imagekit-ruby/commit/af71b4919ea7eb3bf704ed6a83eaa9301b5201f9))
|
|
34
|
+
* **docs:** remove www prefix ([a4b9610](https://github.com/imagekit-developer/imagekit-ruby/commit/a4b961058ac8967dcfef109421dbca9ee3eedf0b))
|
|
35
|
+
* **internal:** remove mock server code ([c8aa3b8](https://github.com/imagekit-developer/imagekit-ruby/commit/c8aa3b8c2320102d8e29941f78f1f1ade06cab00))
|
|
36
|
+
* **internal:** tweak CI branches ([125e8b4](https://github.com/imagekit-developer/imagekit-ruby/commit/125e8b4b0f3676378a863bacfc3cc93bf7b3f6ee))
|
|
37
|
+
* **internal:** update gitignore ([741331c](https://github.com/imagekit-developer/imagekit-ruby/commit/741331c210a1af49f43ff77f593293e42882c15b))
|
|
38
|
+
* update mock server docs ([1e5ed9e](https://github.com/imagekit-developer/imagekit-ruby/commit/1e5ed9ea31388b76995c292fc22f9ed773ad6f40))
|
|
39
|
+
* update placeholder string ([cff7f1b](https://github.com/imagekit-developer/imagekit-ruby/commit/cff7f1b4cf7a249e7dd6f426c992472238a8c6e1))
|
|
40
|
+
|
|
3
41
|
## 4.2.0 (2026-02-02)
|
|
4
42
|
|
|
5
43
|
Full Changelog: [v4.1.2...v4.2.0](https://github.com/imagekit-developer/imagekit-ruby/compare/v4.1.2...v4.2.0)
|
data/README.md
CHANGED
data/lib/imagekitio/client.rb
CHANGED
|
@@ -25,6 +25,13 @@ module Imagekitio
|
|
|
25
25
|
# @return [String, nil]
|
|
26
26
|
attr_reader :password
|
|
27
27
|
|
|
28
|
+
# Your ImageKit webhook secret for verifying webhook signatures (starts with
|
|
29
|
+
# `whsec_`). You can find this in the
|
|
30
|
+
# [ImageKit dashboard](https://imagekit.io/dashboard/developer/webhooks). Only
|
|
31
|
+
# required if you're using webhooks.
|
|
32
|
+
# @return [String, nil]
|
|
33
|
+
attr_reader :webhook_secret
|
|
34
|
+
|
|
28
35
|
# @return [Imagekitio::Resources::CustomMetadataFields]
|
|
29
36
|
attr_reader :custom_metadata_fields
|
|
30
37
|
|
|
@@ -80,6 +87,11 @@ module Imagekitio
|
|
|
80
87
|
# dummy value. You can ignore this field. Defaults to
|
|
81
88
|
# `ENV["OPTIONAL_IMAGEKIT_IGNORES_THIS"]`
|
|
82
89
|
#
|
|
90
|
+
# @param webhook_secret [String, nil] Your ImageKit webhook secret for verifying webhook signatures (starts with
|
|
91
|
+
# `whsec_`). You can find this in the
|
|
92
|
+
# [ImageKit dashboard](https://imagekit.io/dashboard/developer/webhooks). Only
|
|
93
|
+
# required if you're using webhooks. Defaults to `ENV["IMAGEKIT_WEBHOOK_SECRET"]`
|
|
94
|
+
#
|
|
83
95
|
# @param base_url [String, nil] Override the default base URL for the API, e.g.,
|
|
84
96
|
# `"https://api.example.com/v2/"`. Defaults to `ENV["IMAGE_KIT_BASE_URL"]`
|
|
85
97
|
#
|
|
@@ -93,6 +105,7 @@ module Imagekitio
|
|
|
93
105
|
def initialize(
|
|
94
106
|
private_key: ENV["IMAGEKIT_PRIVATE_KEY"],
|
|
95
107
|
password: ENV.fetch("OPTIONAL_IMAGEKIT_IGNORES_THIS", "do_not_set"),
|
|
108
|
+
webhook_secret: ENV["IMAGEKIT_WEBHOOK_SECRET"],
|
|
96
109
|
base_url: ENV["IMAGE_KIT_BASE_URL"],
|
|
97
110
|
max_retries: self.class::DEFAULT_MAX_RETRIES,
|
|
98
111
|
timeout: self.class::DEFAULT_TIMEOUT_IN_SECONDS,
|
|
@@ -109,6 +122,7 @@ module Imagekitio
|
|
|
109
122
|
|
|
110
123
|
@private_key = private_key.to_s
|
|
111
124
|
@password = password.to_s
|
|
125
|
+
@webhook_secret = webhook_secret&.to_s
|
|
112
126
|
|
|
113
127
|
super(
|
|
114
128
|
base_url: base_url,
|
|
@@ -635,11 +635,17 @@ module Imagekitio
|
|
|
635
635
|
if position
|
|
636
636
|
x = safe_get(position, :x)
|
|
637
637
|
y = safe_get(position, :y_)
|
|
638
|
+
x_center = safe_get(position, :x_center)
|
|
639
|
+
y_center = safe_get(position, :y_center)
|
|
638
640
|
focus = safe_get(position, :focus)
|
|
641
|
+
anchor_point = safe_get(position, :anchor_point)
|
|
639
642
|
|
|
640
643
|
parts << "lx-#{x}" if x
|
|
641
644
|
parts << "ly-#{y}" if y
|
|
645
|
+
parts << "lxc-#{x_center}" if x_center
|
|
646
|
+
parts << "lyc-#{y_center}" if y_center
|
|
642
647
|
parts << "lfo-#{focus}" if focus
|
|
648
|
+
parts << "lap-#{anchor_point}" if anchor_point
|
|
643
649
|
end
|
|
644
650
|
|
|
645
651
|
# Add timing properties
|
|
@@ -75,7 +75,7 @@ module Imagekitio
|
|
|
75
75
|
|
|
76
76
|
case body
|
|
77
77
|
in nil
|
|
78
|
-
|
|
78
|
+
req["content-length"] ||= 0 unless req["transfer-encoding"]
|
|
79
79
|
in String
|
|
80
80
|
req["content-length"] ||= body.bytesize.to_s unless req["transfer-encoding"]
|
|
81
81
|
req.body_stream = Imagekitio::Internal::Util::ReadIOAdapter.new(body, &blk)
|
|
@@ -157,7 +157,7 @@ module Imagekitio
|
|
|
157
157
|
in Hash | nil => coerced
|
|
158
158
|
coerced
|
|
159
159
|
else
|
|
160
|
-
message = "Expected a #{Hash} or #{Imagekitio::Internal::Type::BaseModel}, got #{
|
|
160
|
+
message = "Expected a #{Hash} or #{Imagekitio::Internal::Type::BaseModel}, got #{input.inspect}"
|
|
161
161
|
raise ArgumentError.new(message)
|
|
162
162
|
end
|
|
163
163
|
end
|
|
@@ -237,6 +237,11 @@ module Imagekitio
|
|
|
237
237
|
end
|
|
238
238
|
end
|
|
239
239
|
|
|
240
|
+
# @type [Regexp]
|
|
241
|
+
#
|
|
242
|
+
# https://www.rfc-editor.org/rfc/rfc3986.html#section-3.3
|
|
243
|
+
RFC_3986_NOT_PCHARS = /[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/
|
|
244
|
+
|
|
240
245
|
class << self
|
|
241
246
|
# @api private
|
|
242
247
|
#
|
|
@@ -247,6 +252,15 @@ module Imagekitio
|
|
|
247
252
|
"#{uri.scheme}://#{uri.host}#{":#{uri.port}" unless uri.port == uri.default_port}"
|
|
248
253
|
end
|
|
249
254
|
|
|
255
|
+
# @api private
|
|
256
|
+
#
|
|
257
|
+
# @param path [String, Integer]
|
|
258
|
+
#
|
|
259
|
+
# @return [String]
|
|
260
|
+
def encode_path(path)
|
|
261
|
+
path.to_s.gsub(Imagekitio::Internal::Util::RFC_3986_NOT_PCHARS) { ERB::Util.url_encode(_1) }
|
|
262
|
+
end
|
|
263
|
+
|
|
250
264
|
# @api private
|
|
251
265
|
#
|
|
252
266
|
# @param path [String, Array<String>]
|
|
@@ -259,7 +273,7 @@ module Imagekitio
|
|
|
259
273
|
in []
|
|
260
274
|
""
|
|
261
275
|
in [String => p, *interpolations]
|
|
262
|
-
encoded = interpolations.map {
|
|
276
|
+
encoded = interpolations.map { encode_path(_1) }
|
|
263
277
|
format(p, *encoded)
|
|
264
278
|
end
|
|
265
279
|
end
|
|
@@ -485,11 +499,42 @@ module Imagekitio
|
|
|
485
499
|
end
|
|
486
500
|
|
|
487
501
|
# @type [Regexp]
|
|
488
|
-
JSON_CONTENT = %r{^application/(?:
|
|
502
|
+
JSON_CONTENT = %r{^application/(?:[a-zA-Z0-9.-]+\+)?json(?!l)}
|
|
489
503
|
# @type [Regexp]
|
|
490
504
|
JSONL_CONTENT = %r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)}
|
|
491
505
|
|
|
492
506
|
class << self
|
|
507
|
+
# @api private
|
|
508
|
+
#
|
|
509
|
+
# @param query [Hash{Symbol=>Object}]
|
|
510
|
+
#
|
|
511
|
+
# @return [Hash{Symbol=>Object}]
|
|
512
|
+
def encode_query_params(query)
|
|
513
|
+
out = {}
|
|
514
|
+
query.each { write_query_param_element!(out, _1, _2) }
|
|
515
|
+
out
|
|
516
|
+
end
|
|
517
|
+
|
|
518
|
+
# @api private
|
|
519
|
+
#
|
|
520
|
+
# @param collection [Hash{Symbol=>Object}]
|
|
521
|
+
# @param key [String]
|
|
522
|
+
# @param element [Object]
|
|
523
|
+
#
|
|
524
|
+
# @return [nil]
|
|
525
|
+
private def write_query_param_element!(collection, key, element)
|
|
526
|
+
case element
|
|
527
|
+
in Hash
|
|
528
|
+
element.each do |name, value|
|
|
529
|
+
write_query_param_element!(collection, "#{key}[#{name}]", value)
|
|
530
|
+
end
|
|
531
|
+
in Array
|
|
532
|
+
collection[key] = element.map(&:to_s).join(",")
|
|
533
|
+
else
|
|
534
|
+
collection[key] = element.to_s
|
|
535
|
+
end
|
|
536
|
+
end
|
|
537
|
+
|
|
493
538
|
# @api private
|
|
494
539
|
#
|
|
495
540
|
# @param y [Enumerator::Yielder]
|
|
@@ -540,16 +585,15 @@ module Imagekitio
|
|
|
540
585
|
y << "Content-Disposition: form-data"
|
|
541
586
|
|
|
542
587
|
unless key.nil?
|
|
543
|
-
|
|
544
|
-
y << "; name=\"#{name}\""
|
|
588
|
+
y << "; name=\"#{key}\""
|
|
545
589
|
end
|
|
546
590
|
|
|
547
591
|
case val
|
|
548
592
|
in Imagekitio::FilePart unless val.filename.nil?
|
|
549
|
-
filename =
|
|
593
|
+
filename = encode_path(val.filename)
|
|
550
594
|
y << "; filename=\"#{filename}\""
|
|
551
595
|
in Pathname | IO
|
|
552
|
-
filename =
|
|
596
|
+
filename = encode_path(::File.basename(val.to_path))
|
|
553
597
|
y << "; filename=\"#{filename}\""
|
|
554
598
|
else
|
|
555
599
|
end
|
|
@@ -8,15 +8,7 @@ module Imagekitio
|
|
|
8
8
|
extend Imagekitio::Internal::Type::RequestParameters::Converter
|
|
9
9
|
include Imagekitio::Internal::Type::RequestParameters
|
|
10
10
|
|
|
11
|
-
# @!
|
|
12
|
-
# Schema for origin request resources.
|
|
13
|
-
#
|
|
14
|
-
# @return [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]
|
|
15
|
-
required :origin_request, union: -> { Imagekitio::Accounts::OriginRequest }
|
|
16
|
-
|
|
17
|
-
# @!method initialize(origin_request:, request_options: {})
|
|
18
|
-
# @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.
|
|
19
|
-
#
|
|
11
|
+
# @!method initialize(request_options: {})
|
|
20
12
|
# @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
|
|
21
13
|
end
|
|
22
14
|
end
|
|
@@ -8,7 +8,19 @@ module Imagekitio
|
|
|
8
8
|
extend Imagekitio::Internal::Type::RequestParameters::Converter
|
|
9
9
|
include Imagekitio::Internal::Type::RequestParameters
|
|
10
10
|
|
|
11
|
-
# @!
|
|
11
|
+
# @!attribute id
|
|
12
|
+
# Unique identifier for the origin. This is generated by ImageKit when you create
|
|
13
|
+
# a new origin.
|
|
14
|
+
#
|
|
15
|
+
# @return [String]
|
|
16
|
+
required :id, String
|
|
17
|
+
|
|
18
|
+
# @!method initialize(id:, request_options: {})
|
|
19
|
+
# Some parameter documentations has been truncated, see
|
|
20
|
+
# {Imagekitio::Models::Accounts::OriginDeleteParams} for more details.
|
|
21
|
+
#
|
|
22
|
+
# @param id [String] Unique identifier for the origin. This is generated by ImageKit when you create
|
|
23
|
+
#
|
|
12
24
|
# @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
|
|
13
25
|
end
|
|
14
26
|
end
|
|
@@ -8,7 +8,19 @@ module Imagekitio
|
|
|
8
8
|
extend Imagekitio::Internal::Type::RequestParameters::Converter
|
|
9
9
|
include Imagekitio::Internal::Type::RequestParameters
|
|
10
10
|
|
|
11
|
-
# @!
|
|
11
|
+
# @!attribute id
|
|
12
|
+
# Unique identifier for the origin. This is generated by ImageKit when you create
|
|
13
|
+
# a new origin.
|
|
14
|
+
#
|
|
15
|
+
# @return [String]
|
|
16
|
+
required :id, String
|
|
17
|
+
|
|
18
|
+
# @!method initialize(id:, request_options: {})
|
|
19
|
+
# Some parameter documentations has been truncated, see
|
|
20
|
+
# {Imagekitio::Models::Accounts::OriginGetParams} for more details.
|
|
21
|
+
#
|
|
22
|
+
# @param id [String] Unique identifier for the origin. This is generated by ImageKit when you create
|
|
23
|
+
#
|
|
12
24
|
# @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
|
|
13
25
|
end
|
|
14
26
|
end
|
|
@@ -8,14 +8,18 @@ module Imagekitio
|
|
|
8
8
|
extend Imagekitio::Internal::Type::RequestParameters::Converter
|
|
9
9
|
include Imagekitio::Internal::Type::RequestParameters
|
|
10
10
|
|
|
11
|
-
# @!attribute
|
|
12
|
-
#
|
|
11
|
+
# @!attribute id
|
|
12
|
+
# Unique identifier for the origin. This is generated by ImageKit when you create
|
|
13
|
+
# a new origin.
|
|
13
14
|
#
|
|
14
|
-
# @return [
|
|
15
|
-
required :
|
|
15
|
+
# @return [String]
|
|
16
|
+
required :id, String
|
|
16
17
|
|
|
17
|
-
# @!method initialize(
|
|
18
|
-
#
|
|
18
|
+
# @!method initialize(id:, request_options: {})
|
|
19
|
+
# Some parameter documentations has been truncated, see
|
|
20
|
+
# {Imagekitio::Models::Accounts::OriginUpdateParams} for more details.
|
|
21
|
+
#
|
|
22
|
+
# @param id [String] Unique identifier for the origin. This is generated by ImageKit when you create
|
|
19
23
|
#
|
|
20
24
|
# @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
|
|
21
25
|
end
|
|
@@ -8,7 +8,20 @@ module Imagekitio
|
|
|
8
8
|
extend Imagekitio::Internal::Type::RequestParameters::Converter
|
|
9
9
|
include Imagekitio::Internal::Type::RequestParameters
|
|
10
10
|
|
|
11
|
-
# @!
|
|
11
|
+
# @!attribute id
|
|
12
|
+
# Unique identifier for the URL-endpoint. This is generated by ImageKit when you
|
|
13
|
+
# create a new URL-endpoint. For the default URL-endpoint, this is always
|
|
14
|
+
# `default`.
|
|
15
|
+
#
|
|
16
|
+
# @return [String]
|
|
17
|
+
required :id, String
|
|
18
|
+
|
|
19
|
+
# @!method initialize(id:, request_options: {})
|
|
20
|
+
# Some parameter documentations has been truncated, see
|
|
21
|
+
# {Imagekitio::Models::Accounts::URLEndpointDeleteParams} for more details.
|
|
22
|
+
#
|
|
23
|
+
# @param id [String] Unique identifier for the URL-endpoint. This is generated by ImageKit when you c
|
|
24
|
+
#
|
|
12
25
|
# @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
|
|
13
26
|
end
|
|
14
27
|
end
|
|
@@ -8,7 +8,20 @@ module Imagekitio
|
|
|
8
8
|
extend Imagekitio::Internal::Type::RequestParameters::Converter
|
|
9
9
|
include Imagekitio::Internal::Type::RequestParameters
|
|
10
10
|
|
|
11
|
-
# @!
|
|
11
|
+
# @!attribute id
|
|
12
|
+
# Unique identifier for the URL-endpoint. This is generated by ImageKit when you
|
|
13
|
+
# create a new URL-endpoint. For the default URL-endpoint, this is always
|
|
14
|
+
# `default`.
|
|
15
|
+
#
|
|
16
|
+
# @return [String]
|
|
17
|
+
required :id, String
|
|
18
|
+
|
|
19
|
+
# @!method initialize(id:, request_options: {})
|
|
20
|
+
# Some parameter documentations has been truncated, see
|
|
21
|
+
# {Imagekitio::Models::Accounts::URLEndpointGetParams} for more details.
|
|
22
|
+
#
|
|
23
|
+
# @param id [String] Unique identifier for the URL-endpoint. This is generated by ImageKit when you c
|
|
24
|
+
#
|
|
12
25
|
# @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
|
|
13
26
|
end
|
|
14
27
|
end
|
|
@@ -8,7 +8,20 @@ module Imagekitio
|
|
|
8
8
|
extend Imagekitio::Internal::Type::RequestParameters::Converter
|
|
9
9
|
include Imagekitio::Internal::Type::RequestParameters
|
|
10
10
|
|
|
11
|
-
# @!
|
|
11
|
+
# @!attribute id
|
|
12
|
+
# Unique identifier for the URL-endpoint. This is generated by ImageKit when you
|
|
13
|
+
# create a new URL-endpoint. For the default URL-endpoint, this is always
|
|
14
|
+
# `default`.
|
|
15
|
+
#
|
|
16
|
+
# @return [String]
|
|
17
|
+
required :id, String
|
|
18
|
+
|
|
19
|
+
# @!method initialize(id:, request_options: {})
|
|
20
|
+
# Some parameter documentations has been truncated, see
|
|
21
|
+
# {Imagekitio::Models::Accounts::URLEndpointUpdateParams} for more details.
|
|
22
|
+
#
|
|
23
|
+
# @param id [String] Unique identifier for the URL-endpoint. This is generated by ImageKit when you c
|
|
24
|
+
#
|
|
12
25
|
# @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
|
|
13
26
|
end
|
|
14
27
|
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
|
-
# @!
|
|
11
|
+
# @!attribute request_id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :request_id, String
|
|
15
|
+
|
|
16
|
+
# @!method initialize(request_id:, request_options: {})
|
|
17
|
+
# @param request_id [String]
|
|
12
18
|
# @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
|
|
13
19
|
end
|
|
14
20
|
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
|
-
# @!
|
|
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 label
|
|
11
16
|
# Human readable name of the custom metadata field. This should be unique across
|
|
12
17
|
# all non deleted custom metadata fields. This name is displayed as form field
|
|
@@ -25,10 +30,12 @@ module Imagekitio
|
|
|
25
30
|
# @return [Imagekitio::Models::CustomMetadataFieldUpdateParams::Schema, nil]
|
|
26
31
|
optional :schema, -> { Imagekitio::CustomMetadataFieldUpdateParams::Schema }
|
|
27
32
|
|
|
28
|
-
# @!method initialize(label: nil, schema: nil, request_options: {})
|
|
33
|
+
# @!method initialize(id:, label: nil, schema: nil, request_options: {})
|
|
29
34
|
# Some parameter documentations has been truncated, see
|
|
30
35
|
# {Imagekitio::Models::CustomMetadataFieldUpdateParams} for more details.
|
|
31
36
|
#
|
|
37
|
+
# @param id [String]
|
|
38
|
+
#
|
|
32
39
|
# @param label [String] Human readable name of the custom metadata field. This should be unique across a
|
|
33
40
|
#
|
|
34
41
|
# @param schema [Imagekitio::Models::CustomMetadataFieldUpdateParams::Schema] An object that describes the rules for the custom metadata key. This parameter i
|
|
@@ -186,8 +186,10 @@ module Imagekitio
|
|
|
186
186
|
optional :min_selections, Integer
|
|
187
187
|
|
|
188
188
|
# @!attribute vocabulary
|
|
189
|
-
# Array of possible tag values.
|
|
190
|
-
# characters
|
|
189
|
+
# Array of possible tag values. The combined length of all strings must not exceed
|
|
190
|
+
# 500 characters, and values cannot include the `%` character. When providing
|
|
191
|
+
# large vocabularies (more than 30 items), the AI may not follow the list
|
|
192
|
+
# strictly.
|
|
191
193
|
#
|
|
192
194
|
# @return [Array<String>, nil]
|
|
193
195
|
optional :vocabulary, Imagekitio::Internal::Type::ArrayOf[String]
|
|
@@ -203,7 +205,7 @@ module Imagekitio
|
|
|
203
205
|
#
|
|
204
206
|
# @param min_selections [Integer] Minimum number of tags to select from the vocabulary.
|
|
205
207
|
#
|
|
206
|
-
# @param vocabulary [Array<String>] Array of possible tag values.
|
|
208
|
+
# @param vocabulary [Array<String>] Array of possible tag values. The combined length of all strings must not exceed
|
|
207
209
|
#
|
|
208
210
|
# @param type [Symbol, :select_tags] Task type that analyzes the image and adds matching tags from a vocabulary.
|
|
209
211
|
end
|
|
@@ -241,7 +243,10 @@ module Imagekitio
|
|
|
241
243
|
optional :min_selections, Integer
|
|
242
244
|
|
|
243
245
|
# @!attribute vocabulary
|
|
244
|
-
#
|
|
246
|
+
# An array of possible values matching the custom metadata field type. If not
|
|
247
|
+
# provided for SingleSelect or MultiSelect field types, all values from the custom
|
|
248
|
+
# metadata field definition will be used. When providing large vocabularies (above
|
|
249
|
+
# 30 items), the AI may not strictly adhere to the list.
|
|
245
250
|
#
|
|
246
251
|
# @return [Array<String, Float, Boolean>, nil]
|
|
247
252
|
optional :vocabulary,
|
|
@@ -260,7 +265,7 @@ module Imagekitio
|
|
|
260
265
|
#
|
|
261
266
|
# @param min_selections [Integer] Minimum number of values to select from the vocabulary.
|
|
262
267
|
#
|
|
263
|
-
# @param vocabulary [Array<String, Float, Boolean>]
|
|
268
|
+
# @param vocabulary [Array<String, Float, Boolean>] An array of possible values matching the custom metadata field type. If not prov
|
|
264
269
|
#
|
|
265
270
|
# @param type [Symbol, :select_metadata] Task type that analyzes the image and sets a custom metadata field value from a
|
|
266
271
|
|
|
@@ -186,8 +186,10 @@ module Imagekitio
|
|
|
186
186
|
optional :min_selections, Integer
|
|
187
187
|
|
|
188
188
|
# @!attribute vocabulary
|
|
189
|
-
# Array of possible tag values.
|
|
190
|
-
# characters
|
|
189
|
+
# Array of possible tag values. The combined length of all strings must not exceed
|
|
190
|
+
# 500 characters, and values cannot include the `%` character. When providing
|
|
191
|
+
# large vocabularies (more than 30 items), the AI may not follow the list
|
|
192
|
+
# strictly.
|
|
191
193
|
#
|
|
192
194
|
# @return [Array<String>, nil]
|
|
193
195
|
optional :vocabulary, Imagekitio::Internal::Type::ArrayOf[String]
|
|
@@ -202,7 +204,7 @@ module Imagekitio
|
|
|
202
204
|
#
|
|
203
205
|
# @param min_selections [Integer] Minimum number of tags to select from the vocabulary.
|
|
204
206
|
#
|
|
205
|
-
# @param vocabulary [Array<String>] Array of possible tag values.
|
|
207
|
+
# @param vocabulary [Array<String>] Array of possible tag values. The combined length of all strings must not exceed
|
|
206
208
|
#
|
|
207
209
|
# @param type [Symbol, :select_tags] Task type that analyzes the image and adds matching tags from a vocabulary.
|
|
208
210
|
end
|
|
@@ -240,7 +242,10 @@ module Imagekitio
|
|
|
240
242
|
optional :min_selections, Integer
|
|
241
243
|
|
|
242
244
|
# @!attribute vocabulary
|
|
243
|
-
#
|
|
245
|
+
# An array of possible values matching the custom metadata field type. If not
|
|
246
|
+
# provided for SingleSelect or MultiSelect field types, all values from the custom
|
|
247
|
+
# metadata field definition will be used. When providing large vocabularies (above
|
|
248
|
+
# 30 items), the AI may not strictly adhere to the list.
|
|
244
249
|
#
|
|
245
250
|
# @return [Array<String, Float, Boolean>, nil]
|
|
246
251
|
optional :vocabulary,
|
|
@@ -259,7 +264,7 @@ module Imagekitio
|
|
|
259
264
|
#
|
|
260
265
|
# @param min_selections [Integer] Minimum number of values to select from the vocabulary.
|
|
261
266
|
#
|
|
262
|
-
# @param vocabulary [Array<String, Float, Boolean>]
|
|
267
|
+
# @param vocabulary [Array<String, Float, Boolean>] An array of possible values matching the custom metadata field type. If not prov
|
|
263
268
|
#
|
|
264
269
|
# @param type [Symbol, :select_metadata] Task type that analyzes the image and sets a custom metadata field value from a
|
|
265
270
|
|
|
@@ -7,7 +7,13 @@ module Imagekitio
|
|
|
7
7
|
extend Imagekitio::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Imagekitio::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
-
# @!
|
|
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
|
-
# @!
|
|
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
|
|
11
|
-
# Schema for update file update request.
|
|
10
|
+
# @!attribute file_id
|
|
12
11
|
#
|
|
13
|
-
# @return [
|
|
14
|
-
required :
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :file_id, String
|
|
15
14
|
|
|
16
|
-
# @!method initialize(
|
|
17
|
-
# @param
|
|
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
|
-
# @!
|
|
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
|
-
# @!
|
|
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
|