imagekitio 4.3.0 → 4.4.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 +35 -0
- data/README.md +9 -2
- data/lib/imagekitio/internal/type/base_model.rb +5 -5
- data/lib/imagekitio/internal/util.rb +3 -1
- data/lib/imagekitio/models/ai_tag.rb +39 -0
- data/lib/imagekitio/models/beta/v2/file_upload_response.rb +9 -270
- data/lib/imagekitio/models/custom_metadata.rb +8 -0
- data/lib/imagekitio/models/embedded_metadata.rb +8 -0
- data/lib/imagekitio/models/file.rb +11 -275
- data/lib/imagekitio/models/file_create_event.rb +34 -0
- data/lib/imagekitio/models/file_delete_event.rb +44 -0
- data/lib/imagekitio/models/file_update_event.rb +34 -0
- data/lib/imagekitio/models/file_upload_response.rb +9 -267
- data/lib/imagekitio/models/file_version_create_event.rb +34 -0
- data/lib/imagekitio/models/file_version_delete_event.rb +52 -0
- data/lib/imagekitio/models/selected_fields_schema.rb +212 -0
- data/lib/imagekitio/models/unsafe_unwrap_webhook_event.rb +16 -1
- data/lib/imagekitio/models/unwrap_webhook_event.rb +16 -1
- data/lib/imagekitio/models/upload_pre_transform_success_event.rb +9 -285
- data/lib/imagekitio/models/version_info.rb +26 -0
- data/lib/imagekitio/models.rb +25 -0
- data/lib/imagekitio/resources/webhooks.rb +4 -3
- data/lib/imagekitio/version.rb +1 -1
- data/lib/imagekitio.rb +11 -1
- data/rbi/imagekitio/models/ai_tag.rbi +56 -0
- data/rbi/imagekitio/models/beta/v2/file_upload_response.rbi +11 -535
- data/rbi/imagekitio/models/custom_metadata.rbi +11 -0
- data/rbi/imagekitio/models/embedded_metadata.rbi +11 -0
- data/rbi/imagekitio/models/file.rbi +15 -475
- data/rbi/imagekitio/models/file_create_event.rbi +53 -0
- data/rbi/imagekitio/models/file_delete_event.rbi +80 -0
- data/rbi/imagekitio/models/file_update_event.rbi +53 -0
- data/rbi/imagekitio/models/file_upload_response.rbi +11 -520
- data/rbi/imagekitio/models/file_version_create_event.rbi +56 -0
- data/rbi/imagekitio/models/file_version_delete_event.rbi +93 -0
- data/rbi/imagekitio/models/selected_fields_schema.rbi +364 -0
- data/rbi/imagekitio/models/unsafe_unwrap_webhook_event.rbi +6 -1
- data/rbi/imagekitio/models/unwrap_webhook_event.rbi +6 -1
- data/rbi/imagekitio/models/upload_pre_transform_success_event.rbi +11 -533
- data/rbi/imagekitio/models/version_info.rbi +40 -0
- data/rbi/imagekitio/models.rbi +34 -0
- data/rbi/imagekitio/resources/webhooks.rbi +12 -2
- data/sig/imagekitio/models/ai_tag.rbs +27 -0
- data/sig/imagekitio/models/beta/v2/file_upload_response.rbs +30 -223
- data/sig/imagekitio/models/custom_metadata.rbs +7 -0
- data/sig/imagekitio/models/embedded_metadata.rbs +7 -0
- data/sig/imagekitio/models/file.rbs +29 -224
- data/sig/imagekitio/models/file_create_event.rbs +32 -0
- data/sig/imagekitio/models/file_delete_event.rbs +48 -0
- data/sig/imagekitio/models/file_update_event.rbs +32 -0
- data/sig/imagekitio/models/file_upload_response.rbs +29 -224
- data/sig/imagekitio/models/file_version_create_event.rbs +36 -0
- data/sig/imagekitio/models/file_version_delete_event.rbs +50 -0
- data/sig/imagekitio/models/selected_fields_schema.rbs +165 -0
- data/sig/imagekitio/models/unsafe_unwrap_webhook_event.rbs +5 -0
- data/sig/imagekitio/models/unwrap_webhook_event.rbs +5 -0
- data/sig/imagekitio/models/upload_pre_transform_success_event.rbs +29 -224
- data/sig/imagekitio/models/version_info.rbs +19 -0
- data/sig/imagekitio/models.rbs +22 -0
- data/sig/imagekitio/resources/webhooks.rbs +12 -2
- metadata +32 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3725549133c3a1b7f73bd482205a438cc0c60653bdbff20bc4d02d25d188440c
|
|
4
|
+
data.tar.gz: 9a50059b5bcb0935f83738fd0ec95b08aafe093c7d846054ff1c966986b309a9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a87112bc202a98142af8ebc384627d145b815dde075097e99600fbe1fbbdc0ff9fd4b2cae754eec07560e2c0d2a9a736a35f7ed46d338180e98d4602a39c115b
|
|
7
|
+
data.tar.gz: 911b6aaa8efdfc32910bd8458775598edee94f6279f739b4014b652dd0269c9a609d79e8bdd581b1296a9a698ef77a4c936e4c6f97c8c0f8a381cfee9c317728
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.4.0 (2026-04-13)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v4.3.0...v4.4.0](https://github.com/imagekit-developer/imagekit-ruby/compare/v4.3.0...v4.4.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** add missing types in ruby ([6a074df](https://github.com/imagekit-developer/imagekit-ruby/commit/6a074df0249e9ac9969c2bc4b8d12d9abbd1e233))
|
|
10
|
+
* **api:** dam related webhook events ([d2ffbf3](https://github.com/imagekit-developer/imagekit-ruby/commit/d2ffbf33cabaddffbb97d4c7bc7e54be100a3c67))
|
|
11
|
+
* **api:** fix spec indentation ([74e7a6a](https://github.com/imagekit-developer/imagekit-ruby/commit/74e7a6ae49a83d6faa29796443309f20633b430d))
|
|
12
|
+
* **api:** indentation fix ([fae3b74](https://github.com/imagekit-developer/imagekit-ruby/commit/fae3b74e0de1bdd3e5a29c6061f546aacfc423cb))
|
|
13
|
+
* **api:** merge with main to bring back missing parameters ([78377b5](https://github.com/imagekit-developer/imagekit-ruby/commit/78377b55c03f7818a5f2ae57d19464dfae58763a))
|
|
14
|
+
* **api:** update webhook event names and remove DAM prefix ([c621b14](https://github.com/imagekit-developer/imagekit-ruby/commit/c621b14ca3a92b3428bd3a41156539aba3668097))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **api:** extract shared schemas to prevent Go webhook union breaking changes ([0325862](https://github.com/imagekit-developer/imagekit-ruby/commit/032586298410662b5f45b9b4189cc23ef74c1e40))
|
|
20
|
+
* **api:** fix references of schema ([3d07367](https://github.com/imagekit-developer/imagekit-ruby/commit/3d073676557eaac1a3ce9447866936e707f45566))
|
|
21
|
+
* **api:** rename DamFile events to File for consistency ([5998787](https://github.com/imagekit-developer/imagekit-ruby/commit/5998787a6607eb936b51b46b92e24679ac2dd321))
|
|
22
|
+
* **docs:** remove redundant information about versioning in README ([a546963](https://github.com/imagekit-developer/imagekit-ruby/commit/a546963ec88a011e18426a2a9ad46893e8e45eec))
|
|
23
|
+
* **docs:** remove redundant sub-item for webhook signature verification in README ([03f4b45](https://github.com/imagekit-developer/imagekit-ruby/commit/03f4b4580157f6c5a81905b549801e9abb2f3c2c))
|
|
24
|
+
* **docs:** remove unnecessary password parameter from example ([77c9134](https://github.com/imagekit-developer/imagekit-ruby/commit/77c9134775b106ac5107579f3059390870ced790))
|
|
25
|
+
* multipart encoding for file arrays ([5f02f3a](https://github.com/imagekit-developer/imagekit-ruby/commit/5f02f3a700d92bdcba063ce82d64c82fc70d37f8))
|
|
26
|
+
* **webhooks:** encode webhook key in Base64 before verification ([db0b711](https://github.com/imagekit-developer/imagekit-ruby/commit/db0b711f50b3e992f36dd3f30ef74dac502a44a2))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Documentation
|
|
30
|
+
|
|
31
|
+
* add webhook verification section to README ([ceb1927](https://github.com/imagekit-developer/imagekit-ruby/commit/ceb1927213edf8467e8e584a4b43999f0cedcf20))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Refactors
|
|
35
|
+
|
|
36
|
+
* AITags to singular AITag schema with array items pattern ([01a4f00](https://github.com/imagekit-developer/imagekit-ruby/commit/01a4f00f0ce0b7f308f8f84351327c2a25a77408))
|
|
37
|
+
|
|
3
38
|
## 4.3.0 (2026-04-06)
|
|
4
39
|
|
|
5
40
|
Full Changelog: [v4.2.0...v4.3.0](https://github.com/imagekit-developer/imagekit-ruby/compare/v4.2.0...v4.3.0)
|
data/README.md
CHANGED
|
@@ -25,6 +25,7 @@ If you're using Ruby on Rails, the [ImageKit Rails gem](https://github.com/image
|
|
|
25
25
|
- [Helper Methods](#helper-methods)
|
|
26
26
|
- [Authentication parameters for client-side uploads](#authentication-parameters-for-client-side-uploads)
|
|
27
27
|
- [Responsive image attributes](#responsive-image-attributes)
|
|
28
|
+
- [Webhook verification](#webhook-verification)
|
|
28
29
|
- [Handling errors](#handling-errors)
|
|
29
30
|
- [Retries](#retries)
|
|
30
31
|
- [Timeouts](#timeouts)
|
|
@@ -45,7 +46,7 @@ To use this gem, install via Bundler by adding the following to your application
|
|
|
45
46
|
<!-- x-release-please-start-version -->
|
|
46
47
|
|
|
47
48
|
```ruby
|
|
48
|
-
gem "imagekitio", "~> 4.
|
|
49
|
+
gem "imagekitio", "~> 4.4.0"
|
|
49
50
|
```
|
|
50
51
|
|
|
51
52
|
<!-- x-release-please-end -->
|
|
@@ -525,6 +526,12 @@ attrs = image_kit.helper.get_responsive_image_attributes({
|
|
|
525
526
|
})
|
|
526
527
|
```
|
|
527
528
|
|
|
529
|
+
## Webhook verification
|
|
530
|
+
|
|
531
|
+
The ImageKit SDK provides utilities to verify webhook signatures for secure event handling. This ensures that webhook requests are actually coming from ImageKit and haven't been tampered with.
|
|
532
|
+
|
|
533
|
+
For detailed information about webhook setup, signature verification, and handling different webhook events, refer to the [ImageKit webhook documentation](https://imagekit.io/docs/webhooks#verify-webhook-signature).
|
|
534
|
+
|
|
528
535
|
### Handling errors
|
|
529
536
|
|
|
530
537
|
When the library is unable to connect to the API, or if the API returns a non-success status code (i.e., 4xx or 5xx response), a subclass of `Imagekitio::Errors::APIError` will be thrown:
|
|
@@ -731,7 +738,7 @@ image_kit.assets.list(
|
|
|
731
738
|
|
|
732
739
|
## Versioning
|
|
733
740
|
|
|
734
|
-
This package follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions.
|
|
741
|
+
This package follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions.
|
|
735
742
|
|
|
736
743
|
This package considers improvements to the (non-runtime) `*.rbi` and `*.rbs` type definitions to be non-breaking changes.
|
|
737
744
|
|
|
@@ -438,11 +438,11 @@ module Imagekitio
|
|
|
438
438
|
# @return [Hash{Symbol=>Object}]
|
|
439
439
|
#
|
|
440
440
|
# @example
|
|
441
|
-
# # `
|
|
442
|
-
#
|
|
443
|
-
#
|
|
444
|
-
#
|
|
445
|
-
#
|
|
441
|
+
# # `ai_tag` is a `Imagekitio::AITag`
|
|
442
|
+
# ai_tag => {
|
|
443
|
+
# confidence: confidence,
|
|
444
|
+
# name: name,
|
|
445
|
+
# source: source
|
|
446
446
|
# }
|
|
447
447
|
def deconstruct_keys(keys)
|
|
448
448
|
(keys || self.class.known_fields.keys)
|
|
@@ -610,6 +610,7 @@ module Imagekitio
|
|
|
610
610
|
#
|
|
611
611
|
# @return [Array(String, Enumerable<String>)]
|
|
612
612
|
private def encode_multipart_streaming(body)
|
|
613
|
+
# rubocop:disable Style/CaseEquality
|
|
613
614
|
# RFC 1521 Section 7.2.1 says we should have 70 char maximum for boundary length
|
|
614
615
|
boundary = SecureRandom.urlsafe_base64(46)
|
|
615
616
|
|
|
@@ -619,7 +620,7 @@ module Imagekitio
|
|
|
619
620
|
in Hash
|
|
620
621
|
body.each do |key, val|
|
|
621
622
|
case val
|
|
622
|
-
in Array if val.all? { primitive?(_1) }
|
|
623
|
+
in Array if val.all? { primitive?(_1) || Imagekitio::Internal::Type::FileInput === _1 }
|
|
623
624
|
val.each do |v|
|
|
624
625
|
write_multipart_chunk(y, boundary: boundary, key: key, val: v, closing: closing)
|
|
625
626
|
end
|
|
@@ -635,6 +636,7 @@ module Imagekitio
|
|
|
635
636
|
|
|
636
637
|
fused_io = fused_enum(strio) { closing.each(&:call) }
|
|
637
638
|
[boundary, fused_io]
|
|
639
|
+
# rubocop:enable Style/CaseEquality
|
|
638
640
|
end
|
|
639
641
|
|
|
640
642
|
# @api private
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Models
|
|
5
|
+
class AITag < Imagekitio::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute confidence
|
|
7
|
+
# Confidence score of the tag.
|
|
8
|
+
#
|
|
9
|
+
# @return [Float, nil]
|
|
10
|
+
optional :confidence, Float
|
|
11
|
+
|
|
12
|
+
# @!attribute name
|
|
13
|
+
# Name of the tag.
|
|
14
|
+
#
|
|
15
|
+
# @return [String, nil]
|
|
16
|
+
optional :name, String
|
|
17
|
+
|
|
18
|
+
# @!attribute source
|
|
19
|
+
# Source of the tag. Possible values are `google-auto-tagging` and
|
|
20
|
+
# `aws-auto-tagging`.
|
|
21
|
+
#
|
|
22
|
+
# @return [String, nil]
|
|
23
|
+
optional :source, String
|
|
24
|
+
|
|
25
|
+
# @!method initialize(confidence: nil, name: nil, source: nil)
|
|
26
|
+
# Some parameter documentations has been truncated, see
|
|
27
|
+
# {Imagekitio::Models::AITag} for more details.
|
|
28
|
+
#
|
|
29
|
+
# AI-generated tag associated with an image. These tags can be added using the
|
|
30
|
+
# `google-auto-tagging` or `aws-auto-tagging` extensions.
|
|
31
|
+
#
|
|
32
|
+
# @param confidence [Float] Confidence score of the tag.
|
|
33
|
+
#
|
|
34
|
+
# @param name [String] Name of the tag.
|
|
35
|
+
#
|
|
36
|
+
# @param source [String] Source of the tag. Possible values are `google-auto-tagging` and `aws-auto-taggi
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -9,9 +9,9 @@ module Imagekitio
|
|
|
9
9
|
# @!attribute ai_tags
|
|
10
10
|
# An array of tags assigned to the uploaded file by auto tagging.
|
|
11
11
|
#
|
|
12
|
-
# @return [Array<Imagekitio::Models::
|
|
12
|
+
# @return [Array<Imagekitio::Models::AITag>, nil]
|
|
13
13
|
optional :ai_tags,
|
|
14
|
-
-> { Imagekitio::Internal::Type::ArrayOf[Imagekitio::
|
|
14
|
+
-> { Imagekitio::Internal::Type::ArrayOf[Imagekitio::AITag] },
|
|
15
15
|
api_name: :AITags,
|
|
16
16
|
nil?: true
|
|
17
17
|
|
|
@@ -151,9 +151,9 @@ module Imagekitio
|
|
|
151
151
|
# Keys are the names of the custom metadata fields; the value object has details
|
|
152
152
|
# about the custom metadata schema.
|
|
153
153
|
#
|
|
154
|
-
# @return [Hash{Symbol=>Imagekitio::Models::
|
|
154
|
+
# @return [Hash{Symbol=>Imagekitio::Models::SelectedFieldsSchemaItem}, nil]
|
|
155
155
|
optional :selected_fields_schema,
|
|
156
|
-
-> { Imagekitio::Internal::Type::HashOf[Imagekitio::
|
|
156
|
+
-> { Imagekitio::Internal::Type::HashOf[Imagekitio::SelectedFieldsSchemaItem] },
|
|
157
157
|
api_name: :selectedFieldsSchema
|
|
158
158
|
|
|
159
159
|
# @!attribute size
|
|
@@ -185,10 +185,8 @@ module Imagekitio
|
|
|
185
185
|
# @!attribute version_info
|
|
186
186
|
# An object containing the file or file version's `id` (versionId) and `name`.
|
|
187
187
|
#
|
|
188
|
-
# @return [Imagekitio::Models::
|
|
189
|
-
optional :version_info,
|
|
190
|
-
-> { Imagekitio::Models::Beta::V2::FileUploadResponse::VersionInfo },
|
|
191
|
-
api_name: :versionInfo
|
|
188
|
+
# @return [Imagekitio::Models::VersionInfo, nil]
|
|
189
|
+
optional :version_info, -> { Imagekitio::VersionInfo }, api_name: :versionInfo
|
|
192
190
|
|
|
193
191
|
# @!attribute video_codec
|
|
194
192
|
# The video codec used in the video (only for video).
|
|
@@ -208,7 +206,7 @@ module Imagekitio
|
|
|
208
206
|
#
|
|
209
207
|
# Object containing details of a successful upload.
|
|
210
208
|
#
|
|
211
|
-
# @param ai_tags [Array<Imagekitio::Models::
|
|
209
|
+
# @param ai_tags [Array<Imagekitio::Models::AITag>, nil] An array of tags assigned to the uploaded file by auto tagging.
|
|
212
210
|
#
|
|
213
211
|
# @param audio_codec [String] The audio codec used in the video (only for video).
|
|
214
212
|
#
|
|
@@ -242,7 +240,7 @@ module Imagekitio
|
|
|
242
240
|
#
|
|
243
241
|
# @param name [String] Name of the asset.
|
|
244
242
|
#
|
|
245
|
-
# @param selected_fields_schema [Hash{Symbol=>Imagekitio::Models::
|
|
243
|
+
# @param selected_fields_schema [Hash{Symbol=>Imagekitio::Models::SelectedFieldsSchemaItem}] This field is included in the response only if the Path policy feature is availa
|
|
246
244
|
#
|
|
247
245
|
# @param size [Float] Size of the image file in Bytes.
|
|
248
246
|
#
|
|
@@ -252,44 +250,12 @@ module Imagekitio
|
|
|
252
250
|
#
|
|
253
251
|
# @param url [String] A publicly accessible URL of the file.
|
|
254
252
|
#
|
|
255
|
-
# @param version_info [Imagekitio::Models::
|
|
253
|
+
# @param version_info [Imagekitio::Models::VersionInfo] An object containing the file or file version's `id` (versionId) and `name`.
|
|
256
254
|
#
|
|
257
255
|
# @param video_codec [String] The video codec used in the video (only for video).
|
|
258
256
|
#
|
|
259
257
|
# @param width [Float] Width of the image in pixels (Only for Images)
|
|
260
258
|
|
|
261
|
-
class AITag < Imagekitio::Internal::Type::BaseModel
|
|
262
|
-
# @!attribute confidence
|
|
263
|
-
# Confidence score of the tag.
|
|
264
|
-
#
|
|
265
|
-
# @return [Float, nil]
|
|
266
|
-
optional :confidence, Float
|
|
267
|
-
|
|
268
|
-
# @!attribute name
|
|
269
|
-
# Name of the tag.
|
|
270
|
-
#
|
|
271
|
-
# @return [String, nil]
|
|
272
|
-
optional :name, String
|
|
273
|
-
|
|
274
|
-
# @!attribute source
|
|
275
|
-
# Array of `AITags` associated with the image. If no `AITags` are set, it will be
|
|
276
|
-
# null. These tags can be added using the `google-auto-tagging` or
|
|
277
|
-
# `aws-auto-tagging` extensions.
|
|
278
|
-
#
|
|
279
|
-
# @return [String, nil]
|
|
280
|
-
optional :source, String
|
|
281
|
-
|
|
282
|
-
# @!method initialize(confidence: nil, name: nil, source: nil)
|
|
283
|
-
# Some parameter documentations has been truncated, see
|
|
284
|
-
# {Imagekitio::Models::Beta::V2::FileUploadResponse::AITag} for more details.
|
|
285
|
-
#
|
|
286
|
-
# @param confidence [Float] Confidence score of the tag.
|
|
287
|
-
#
|
|
288
|
-
# @param name [String] Name of the tag.
|
|
289
|
-
#
|
|
290
|
-
# @param source [String] Array of `AITags` associated with the image. If no `AITags` are set, it will be
|
|
291
|
-
end
|
|
292
|
-
|
|
293
259
|
# @see Imagekitio::Models::Beta::V2::FileUploadResponse#extension_status
|
|
294
260
|
class ExtensionStatus < Imagekitio::Internal::Type::BaseModel
|
|
295
261
|
# @!attribute ai_auto_description
|
|
@@ -404,233 +370,6 @@ module Imagekitio
|
|
|
404
370
|
# @return [Array<Symbol>]
|
|
405
371
|
end
|
|
406
372
|
end
|
|
407
|
-
|
|
408
|
-
class SelectedFieldsSchema < Imagekitio::Internal::Type::BaseModel
|
|
409
|
-
# @!attribute type
|
|
410
|
-
# Type of the custom metadata field.
|
|
411
|
-
#
|
|
412
|
-
# @return [Symbol, Imagekitio::Models::Beta::V2::FileUploadResponse::SelectedFieldsSchema::Type]
|
|
413
|
-
required :type, enum: -> { Imagekitio::Models::Beta::V2::FileUploadResponse::SelectedFieldsSchema::Type }
|
|
414
|
-
|
|
415
|
-
# @!attribute default_value
|
|
416
|
-
# The default value for this custom metadata field. The value should match the
|
|
417
|
-
# `type` of custom metadata field.
|
|
418
|
-
#
|
|
419
|
-
# @return [String, Float, Boolean, Array<String, Float, Boolean>, nil]
|
|
420
|
-
optional :default_value,
|
|
421
|
-
union: -> { Imagekitio::Models::Beta::V2::FileUploadResponse::SelectedFieldsSchema::DefaultValue },
|
|
422
|
-
api_name: :defaultValue
|
|
423
|
-
|
|
424
|
-
# @!attribute is_value_required
|
|
425
|
-
# Specifies if the custom metadata field is required or not.
|
|
426
|
-
#
|
|
427
|
-
# @return [Boolean, nil]
|
|
428
|
-
optional :is_value_required, Imagekitio::Internal::Type::Boolean, api_name: :isValueRequired
|
|
429
|
-
|
|
430
|
-
# @!attribute max_length
|
|
431
|
-
# Maximum length of string. Only set if `type` is set to `Text` or `Textarea`.
|
|
432
|
-
#
|
|
433
|
-
# @return [Float, nil]
|
|
434
|
-
optional :max_length, Float, api_name: :maxLength
|
|
435
|
-
|
|
436
|
-
# @!attribute max_value
|
|
437
|
-
# Maximum value of the field. Only set if field type is `Date` or `Number`. For
|
|
438
|
-
# `Date` type field, the value will be in ISO8601 string format. For `Number` type
|
|
439
|
-
# field, it will be a numeric value.
|
|
440
|
-
#
|
|
441
|
-
# @return [String, Float, nil]
|
|
442
|
-
optional :max_value,
|
|
443
|
-
union: -> { Imagekitio::Models::Beta::V2::FileUploadResponse::SelectedFieldsSchema::MaxValue },
|
|
444
|
-
api_name: :maxValue
|
|
445
|
-
|
|
446
|
-
# @!attribute min_length
|
|
447
|
-
# Minimum length of string. Only set if `type` is set to `Text` or `Textarea`.
|
|
448
|
-
#
|
|
449
|
-
# @return [Float, nil]
|
|
450
|
-
optional :min_length, Float, api_name: :minLength
|
|
451
|
-
|
|
452
|
-
# @!attribute min_value
|
|
453
|
-
# Minimum value of the field. Only set if field type is `Date` or `Number`. For
|
|
454
|
-
# `Date` type field, the value will be in ISO8601 string format. For `Number` type
|
|
455
|
-
# field, it will be a numeric value.
|
|
456
|
-
#
|
|
457
|
-
# @return [String, Float, nil]
|
|
458
|
-
optional :min_value,
|
|
459
|
-
union: -> { Imagekitio::Models::Beta::V2::FileUploadResponse::SelectedFieldsSchema::MinValue },
|
|
460
|
-
api_name: :minValue
|
|
461
|
-
|
|
462
|
-
# @!attribute read_only
|
|
463
|
-
# Indicates whether the custom metadata field is read only. A read only field
|
|
464
|
-
# cannot be modified after being set. This field is configurable only via the
|
|
465
|
-
# **Path policy** feature.
|
|
466
|
-
#
|
|
467
|
-
# @return [Boolean, nil]
|
|
468
|
-
optional :read_only, Imagekitio::Internal::Type::Boolean, api_name: :readOnly
|
|
469
|
-
|
|
470
|
-
# @!attribute select_options
|
|
471
|
-
# An array of allowed values when field type is `SingleSelect` or `MultiSelect`.
|
|
472
|
-
#
|
|
473
|
-
# @return [Array<String, Float, Boolean>, nil]
|
|
474
|
-
optional :select_options,
|
|
475
|
-
-> { Imagekitio::Internal::Type::ArrayOf[union: Imagekitio::Models::Beta::V2::FileUploadResponse::SelectedFieldsSchema::SelectOption] },
|
|
476
|
-
api_name: :selectOptions
|
|
477
|
-
|
|
478
|
-
# @!attribute select_options_truncated
|
|
479
|
-
# Specifies if the selectOptions array is truncated. It is truncated when number
|
|
480
|
-
# of options are > 100.
|
|
481
|
-
#
|
|
482
|
-
# @return [Boolean, nil]
|
|
483
|
-
optional :select_options_truncated,
|
|
484
|
-
Imagekitio::Internal::Type::Boolean,
|
|
485
|
-
api_name: :selectOptionsTruncated
|
|
486
|
-
|
|
487
|
-
# @!method initialize(type:, default_value: nil, is_value_required: nil, max_length: nil, max_value: nil, min_length: nil, min_value: nil, read_only: nil, select_options: nil, select_options_truncated: nil)
|
|
488
|
-
# Some parameter documentations has been truncated, see
|
|
489
|
-
# {Imagekitio::Models::Beta::V2::FileUploadResponse::SelectedFieldsSchema} for
|
|
490
|
-
# more details.
|
|
491
|
-
#
|
|
492
|
-
# @param type [Symbol, Imagekitio::Models::Beta::V2::FileUploadResponse::SelectedFieldsSchema::Type] Type of the custom metadata field.
|
|
493
|
-
#
|
|
494
|
-
# @param default_value [String, Float, Boolean, Array<String, Float, Boolean>] The default value for this custom metadata field. The value should match the `ty
|
|
495
|
-
#
|
|
496
|
-
# @param is_value_required [Boolean] Specifies if the custom metadata field is required or not.
|
|
497
|
-
#
|
|
498
|
-
# @param max_length [Float] Maximum length of string. Only set if `type` is set to `Text` or `Textarea`.
|
|
499
|
-
#
|
|
500
|
-
# @param max_value [String, Float] Maximum value of the field. Only set if field type is `Date` or `Number`. For `D
|
|
501
|
-
#
|
|
502
|
-
# @param min_length [Float] Minimum length of string. Only set if `type` is set to `Text` or `Textarea`.
|
|
503
|
-
#
|
|
504
|
-
# @param min_value [String, Float] Minimum value of the field. Only set if field type is `Date` or `Number`. For `D
|
|
505
|
-
#
|
|
506
|
-
# @param read_only [Boolean] Indicates whether the custom metadata field is read only. A read only field cann
|
|
507
|
-
#
|
|
508
|
-
# @param select_options [Array<String, Float, Boolean>] An array of allowed values when field type is `SingleSelect` or `MultiSelect`.
|
|
509
|
-
#
|
|
510
|
-
# @param select_options_truncated [Boolean] Specifies if the selectOptions array is truncated. It is truncated when number o
|
|
511
|
-
|
|
512
|
-
# Type of the custom metadata field.
|
|
513
|
-
#
|
|
514
|
-
# @see Imagekitio::Models::Beta::V2::FileUploadResponse::SelectedFieldsSchema#type
|
|
515
|
-
module Type
|
|
516
|
-
extend Imagekitio::Internal::Type::Enum
|
|
517
|
-
|
|
518
|
-
TEXT = :Text
|
|
519
|
-
TEXTAREA = :Textarea
|
|
520
|
-
NUMBER = :Number
|
|
521
|
-
DATE = :Date
|
|
522
|
-
BOOLEAN = :Boolean
|
|
523
|
-
SINGLE_SELECT = :SingleSelect
|
|
524
|
-
MULTI_SELECT = :MultiSelect
|
|
525
|
-
|
|
526
|
-
# @!method self.values
|
|
527
|
-
# @return [Array<Symbol>]
|
|
528
|
-
end
|
|
529
|
-
|
|
530
|
-
# The default value for this custom metadata field. The value should match the
|
|
531
|
-
# `type` of custom metadata field.
|
|
532
|
-
#
|
|
533
|
-
# @see Imagekitio::Models::Beta::V2::FileUploadResponse::SelectedFieldsSchema#default_value
|
|
534
|
-
module DefaultValue
|
|
535
|
-
extend Imagekitio::Internal::Type::Union
|
|
536
|
-
|
|
537
|
-
variant String
|
|
538
|
-
|
|
539
|
-
variant Float
|
|
540
|
-
|
|
541
|
-
variant Imagekitio::Internal::Type::Boolean
|
|
542
|
-
|
|
543
|
-
# Default value should be of type array when custom metadata field type is set to `MultiSelect`.
|
|
544
|
-
variant -> { Imagekitio::Models::Beta::V2::FileUploadResponse::SelectedFieldsSchema::DefaultValue::MixedArray }
|
|
545
|
-
|
|
546
|
-
module Mixed
|
|
547
|
-
extend Imagekitio::Internal::Type::Union
|
|
548
|
-
|
|
549
|
-
variant String
|
|
550
|
-
|
|
551
|
-
variant Float
|
|
552
|
-
|
|
553
|
-
variant Imagekitio::Internal::Type::Boolean
|
|
554
|
-
|
|
555
|
-
# @!method self.variants
|
|
556
|
-
# @return [Array(String, Float, Boolean)]
|
|
557
|
-
end
|
|
558
|
-
|
|
559
|
-
# @!method self.variants
|
|
560
|
-
# @return [Array(String, Float, Boolean, Array<String, Float, Boolean>)]
|
|
561
|
-
|
|
562
|
-
# @type [Imagekitio::Internal::Type::Converter]
|
|
563
|
-
MixedArray =
|
|
564
|
-
Imagekitio::Internal::Type::ArrayOf[union: -> { Imagekitio::Models::Beta::V2::FileUploadResponse::SelectedFieldsSchema::DefaultValue::Mixed }]
|
|
565
|
-
end
|
|
566
|
-
|
|
567
|
-
# Maximum value of the field. Only set if field type is `Date` or `Number`. For
|
|
568
|
-
# `Date` type field, the value will be in ISO8601 string format. For `Number` type
|
|
569
|
-
# field, it will be a numeric value.
|
|
570
|
-
#
|
|
571
|
-
# @see Imagekitio::Models::Beta::V2::FileUploadResponse::SelectedFieldsSchema#max_value
|
|
572
|
-
module MaxValue
|
|
573
|
-
extend Imagekitio::Internal::Type::Union
|
|
574
|
-
|
|
575
|
-
variant String
|
|
576
|
-
|
|
577
|
-
variant Float
|
|
578
|
-
|
|
579
|
-
# @!method self.variants
|
|
580
|
-
# @return [Array(String, Float)]
|
|
581
|
-
end
|
|
582
|
-
|
|
583
|
-
# Minimum value of the field. Only set if field type is `Date` or `Number`. For
|
|
584
|
-
# `Date` type field, the value will be in ISO8601 string format. For `Number` type
|
|
585
|
-
# field, it will be a numeric value.
|
|
586
|
-
#
|
|
587
|
-
# @see Imagekitio::Models::Beta::V2::FileUploadResponse::SelectedFieldsSchema#min_value
|
|
588
|
-
module MinValue
|
|
589
|
-
extend Imagekitio::Internal::Type::Union
|
|
590
|
-
|
|
591
|
-
variant String
|
|
592
|
-
|
|
593
|
-
variant Float
|
|
594
|
-
|
|
595
|
-
# @!method self.variants
|
|
596
|
-
# @return [Array(String, Float)]
|
|
597
|
-
end
|
|
598
|
-
|
|
599
|
-
module SelectOption
|
|
600
|
-
extend Imagekitio::Internal::Type::Union
|
|
601
|
-
|
|
602
|
-
variant String
|
|
603
|
-
|
|
604
|
-
variant Float
|
|
605
|
-
|
|
606
|
-
variant Imagekitio::Internal::Type::Boolean
|
|
607
|
-
|
|
608
|
-
# @!method self.variants
|
|
609
|
-
# @return [Array(String, Float, Boolean)]
|
|
610
|
-
end
|
|
611
|
-
end
|
|
612
|
-
|
|
613
|
-
# @see Imagekitio::Models::Beta::V2::FileUploadResponse#version_info
|
|
614
|
-
class VersionInfo < Imagekitio::Internal::Type::BaseModel
|
|
615
|
-
# @!attribute id
|
|
616
|
-
# Unique identifier of the file version.
|
|
617
|
-
#
|
|
618
|
-
# @return [String, nil]
|
|
619
|
-
optional :id, String
|
|
620
|
-
|
|
621
|
-
# @!attribute name
|
|
622
|
-
# Name of the file version.
|
|
623
|
-
#
|
|
624
|
-
# @return [String, nil]
|
|
625
|
-
optional :name, String
|
|
626
|
-
|
|
627
|
-
# @!method initialize(id: nil, name: nil)
|
|
628
|
-
# An object containing the file or file version's `id` (versionId) and `name`.
|
|
629
|
-
#
|
|
630
|
-
# @param id [String] Unique identifier of the file version.
|
|
631
|
-
#
|
|
632
|
-
# @param name [String] Name of the file version.
|
|
633
|
-
end
|
|
634
373
|
end
|
|
635
374
|
end
|
|
636
375
|
end
|