imagekitio 4.2.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 +73 -0
- data/README.md +9 -2
- 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/type/base_model.rb +5 -5
- data/lib/imagekitio/internal/util.rb +54 -8
- 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/ai_tag.rb +39 -0
- data/lib/imagekitio/models/beta/v2/file_upload_response.rb +9 -270
- data/lib/imagekitio/models/cache/invalidation_get_params.rb +7 -1
- data/lib/imagekitio/models/custom_metadata.rb +8 -0
- 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/embedded_metadata.rb +8 -0
- data/lib/imagekitio/models/extension_config.rb +10 -5
- data/lib/imagekitio/models/extensions.rb +10 -5
- 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_delete_params.rb +7 -1
- data/lib/imagekitio/models/file_get_params.rb +7 -1
- data/lib/imagekitio/models/file_update_event.rb +34 -0
- data/lib/imagekitio/models/file_update_params.rb +5 -7
- 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/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/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/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 +14 -3
- data/lib/imagekitio/version.rb +1 -1
- data/lib/imagekitio.rb +12 -1
- 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/ai_tag.rbi +56 -0
- data/rbi/imagekitio/models/beta/v2/file_upload_response.rbi +11 -535
- data/rbi/imagekitio/models/cache/invalidation_get_params.rbi +11 -5
- data/rbi/imagekitio/models/custom_metadata.rbi +11 -0
- 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/embedded_metadata.rbi +11 -0
- data/rbi/imagekitio/models/extension_config.rbi +16 -6
- data/rbi/imagekitio/models/extensions.rbi +16 -6
- 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_delete_params.rbi +13 -5
- data/rbi/imagekitio/models/file_get_params.rbi +13 -5
- data/rbi/imagekitio/models/file_update_event.rbi +53 -0
- data/rbi/imagekitio/models/file_update_params.rbi +5 -28
- 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/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/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/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 +22 -4
- 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/ai_tag.rbs +27 -0
- data/sig/imagekitio/models/beta/v2/file_upload_response.rbs +30 -223
- data/sig/imagekitio/models/cache/invalidation_get_params.rbs +11 -3
- data/sig/imagekitio/models/custom_metadata.rbs +7 -0
- 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/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_delete_params.rbs +11 -3
- data/sig/imagekitio/models/file_get_params.rbs +12 -3
- data/sig/imagekitio/models/file_update_event.rbs +32 -0
- data/sig/imagekitio/models/file_update_params.rbs +4 -9
- 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/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/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/accounts/origins.rbs +2 -2
- data/sig/imagekitio/resources/files.rbs +1 -1
- data/sig/imagekitio/resources/webhooks.rbs +15 -3
- metadata +46 -2
|
@@ -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
|
|
@@ -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
|
|