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
|
@@ -7,9 +7,9 @@ module Imagekitio
|
|
|
7
7
|
# @!attribute ai_tags
|
|
8
8
|
# An array of tags assigned to the uploaded file by auto tagging.
|
|
9
9
|
#
|
|
10
|
-
# @return [Array<Imagekitio::Models::
|
|
10
|
+
# @return [Array<Imagekitio::Models::AITag>, nil]
|
|
11
11
|
optional :ai_tags,
|
|
12
|
-
-> { Imagekitio::Internal::Type::ArrayOf[Imagekitio::
|
|
12
|
+
-> { Imagekitio::Internal::Type::ArrayOf[Imagekitio::AITag] },
|
|
13
13
|
api_name: :AITags,
|
|
14
14
|
nil?: true
|
|
15
15
|
|
|
@@ -149,9 +149,9 @@ module Imagekitio
|
|
|
149
149
|
# Keys are the names of the custom metadata fields; the value object has details
|
|
150
150
|
# about the custom metadata schema.
|
|
151
151
|
#
|
|
152
|
-
# @return [Hash{Symbol=>Imagekitio::Models::
|
|
152
|
+
# @return [Hash{Symbol=>Imagekitio::Models::SelectedFieldsSchemaItem}, nil]
|
|
153
153
|
optional :selected_fields_schema,
|
|
154
|
-
-> { Imagekitio::Internal::Type::HashOf[Imagekitio::
|
|
154
|
+
-> { Imagekitio::Internal::Type::HashOf[Imagekitio::SelectedFieldsSchemaItem] },
|
|
155
155
|
api_name: :selectedFieldsSchema
|
|
156
156
|
|
|
157
157
|
# @!attribute size
|
|
@@ -183,8 +183,8 @@ module Imagekitio
|
|
|
183
183
|
# @!attribute version_info
|
|
184
184
|
# An object containing the file or file version's `id` (versionId) and `name`.
|
|
185
185
|
#
|
|
186
|
-
# @return [Imagekitio::Models::
|
|
187
|
-
optional :version_info, -> { Imagekitio::
|
|
186
|
+
# @return [Imagekitio::Models::VersionInfo, nil]
|
|
187
|
+
optional :version_info, -> { Imagekitio::VersionInfo }, api_name: :versionInfo
|
|
188
188
|
|
|
189
189
|
# @!attribute video_codec
|
|
190
190
|
# The video codec used in the video (only for video).
|
|
@@ -204,7 +204,7 @@ module Imagekitio
|
|
|
204
204
|
#
|
|
205
205
|
# Object containing details of a successful upload.
|
|
206
206
|
#
|
|
207
|
-
# @param ai_tags [Array<Imagekitio::Models::
|
|
207
|
+
# @param ai_tags [Array<Imagekitio::Models::AITag>, nil] An array of tags assigned to the uploaded file by auto tagging.
|
|
208
208
|
#
|
|
209
209
|
# @param audio_codec [String] The audio codec used in the video (only for video).
|
|
210
210
|
#
|
|
@@ -238,7 +238,7 @@ module Imagekitio
|
|
|
238
238
|
#
|
|
239
239
|
# @param name [String] Name of the asset.
|
|
240
240
|
#
|
|
241
|
-
# @param selected_fields_schema [Hash{Symbol=>Imagekitio::Models::
|
|
241
|
+
# @param selected_fields_schema [Hash{Symbol=>Imagekitio::Models::SelectedFieldsSchemaItem}] This field is included in the response only if the Path policy feature is availa
|
|
242
242
|
#
|
|
243
243
|
# @param size [Float] Size of the image file in Bytes.
|
|
244
244
|
#
|
|
@@ -248,44 +248,12 @@ module Imagekitio
|
|
|
248
248
|
#
|
|
249
249
|
# @param url [String] A publicly accessible URL of the file.
|
|
250
250
|
#
|
|
251
|
-
# @param version_info [Imagekitio::Models::
|
|
251
|
+
# @param version_info [Imagekitio::Models::VersionInfo] An object containing the file or file version's `id` (versionId) and `name`.
|
|
252
252
|
#
|
|
253
253
|
# @param video_codec [String] The video codec used in the video (only for video).
|
|
254
254
|
#
|
|
255
255
|
# @param width [Float] Width of the image in pixels (Only for Images)
|
|
256
256
|
|
|
257
|
-
class AITag < Imagekitio::Internal::Type::BaseModel
|
|
258
|
-
# @!attribute confidence
|
|
259
|
-
# Confidence score of the tag.
|
|
260
|
-
#
|
|
261
|
-
# @return [Float, nil]
|
|
262
|
-
optional :confidence, Float
|
|
263
|
-
|
|
264
|
-
# @!attribute name
|
|
265
|
-
# Name of the tag.
|
|
266
|
-
#
|
|
267
|
-
# @return [String, nil]
|
|
268
|
-
optional :name, String
|
|
269
|
-
|
|
270
|
-
# @!attribute source
|
|
271
|
-
# Array of `AITags` associated with the image. If no `AITags` are set, it will be
|
|
272
|
-
# null. These tags can be added using the `google-auto-tagging` or
|
|
273
|
-
# `aws-auto-tagging` extensions.
|
|
274
|
-
#
|
|
275
|
-
# @return [String, nil]
|
|
276
|
-
optional :source, String
|
|
277
|
-
|
|
278
|
-
# @!method initialize(confidence: nil, name: nil, source: nil)
|
|
279
|
-
# Some parameter documentations has been truncated, see
|
|
280
|
-
# {Imagekitio::Models::FileUploadResponse::AITag} for more details.
|
|
281
|
-
#
|
|
282
|
-
# @param confidence [Float] Confidence score of the tag.
|
|
283
|
-
#
|
|
284
|
-
# @param name [String] Name of the tag.
|
|
285
|
-
#
|
|
286
|
-
# @param source [String] Array of `AITags` associated with the image. If no `AITags` are set, it will be
|
|
287
|
-
end
|
|
288
|
-
|
|
289
257
|
# @see Imagekitio::Models::FileUploadResponse#extension_status
|
|
290
258
|
class ExtensionStatus < Imagekitio::Internal::Type::BaseModel
|
|
291
259
|
# @!attribute ai_auto_description
|
|
@@ -400,232 +368,6 @@ module Imagekitio
|
|
|
400
368
|
# @return [Array<Symbol>]
|
|
401
369
|
end
|
|
402
370
|
end
|
|
403
|
-
|
|
404
|
-
class SelectedFieldsSchema < Imagekitio::Internal::Type::BaseModel
|
|
405
|
-
# @!attribute type
|
|
406
|
-
# Type of the custom metadata field.
|
|
407
|
-
#
|
|
408
|
-
# @return [Symbol, Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::Type]
|
|
409
|
-
required :type, enum: -> { Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::Type }
|
|
410
|
-
|
|
411
|
-
# @!attribute default_value
|
|
412
|
-
# The default value for this custom metadata field. The value should match the
|
|
413
|
-
# `type` of custom metadata field.
|
|
414
|
-
#
|
|
415
|
-
# @return [String, Float, Boolean, Array<String, Float, Boolean>, nil]
|
|
416
|
-
optional :default_value,
|
|
417
|
-
union: -> { Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::DefaultValue },
|
|
418
|
-
api_name: :defaultValue
|
|
419
|
-
|
|
420
|
-
# @!attribute is_value_required
|
|
421
|
-
# Specifies if the custom metadata field is required or not.
|
|
422
|
-
#
|
|
423
|
-
# @return [Boolean, nil]
|
|
424
|
-
optional :is_value_required, Imagekitio::Internal::Type::Boolean, api_name: :isValueRequired
|
|
425
|
-
|
|
426
|
-
# @!attribute max_length
|
|
427
|
-
# Maximum length of string. Only set if `type` is set to `Text` or `Textarea`.
|
|
428
|
-
#
|
|
429
|
-
# @return [Float, nil]
|
|
430
|
-
optional :max_length, Float, api_name: :maxLength
|
|
431
|
-
|
|
432
|
-
# @!attribute max_value
|
|
433
|
-
# Maximum value of the field. Only set if field type is `Date` or `Number`. For
|
|
434
|
-
# `Date` type field, the value will be in ISO8601 string format. For `Number` type
|
|
435
|
-
# field, it will be a numeric value.
|
|
436
|
-
#
|
|
437
|
-
# @return [String, Float, nil]
|
|
438
|
-
optional :max_value,
|
|
439
|
-
union: -> { Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::MaxValue },
|
|
440
|
-
api_name: :maxValue
|
|
441
|
-
|
|
442
|
-
# @!attribute min_length
|
|
443
|
-
# Minimum length of string. Only set if `type` is set to `Text` or `Textarea`.
|
|
444
|
-
#
|
|
445
|
-
# @return [Float, nil]
|
|
446
|
-
optional :min_length, Float, api_name: :minLength
|
|
447
|
-
|
|
448
|
-
# @!attribute min_value
|
|
449
|
-
# Minimum value of the field. Only set if field type is `Date` or `Number`. For
|
|
450
|
-
# `Date` type field, the value will be in ISO8601 string format. For `Number` type
|
|
451
|
-
# field, it will be a numeric value.
|
|
452
|
-
#
|
|
453
|
-
# @return [String, Float, nil]
|
|
454
|
-
optional :min_value,
|
|
455
|
-
union: -> { Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::MinValue },
|
|
456
|
-
api_name: :minValue
|
|
457
|
-
|
|
458
|
-
# @!attribute read_only
|
|
459
|
-
# Indicates whether the custom metadata field is read only. A read only field
|
|
460
|
-
# cannot be modified after being set. This field is configurable only via the
|
|
461
|
-
# **Path policy** feature.
|
|
462
|
-
#
|
|
463
|
-
# @return [Boolean, nil]
|
|
464
|
-
optional :read_only, Imagekitio::Internal::Type::Boolean, api_name: :readOnly
|
|
465
|
-
|
|
466
|
-
# @!attribute select_options
|
|
467
|
-
# An array of allowed values when field type is `SingleSelect` or `MultiSelect`.
|
|
468
|
-
#
|
|
469
|
-
# @return [Array<String, Float, Boolean>, nil]
|
|
470
|
-
optional :select_options,
|
|
471
|
-
-> { Imagekitio::Internal::Type::ArrayOf[union: Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::SelectOption] },
|
|
472
|
-
api_name: :selectOptions
|
|
473
|
-
|
|
474
|
-
# @!attribute select_options_truncated
|
|
475
|
-
# Specifies if the selectOptions array is truncated. It is truncated when number
|
|
476
|
-
# of options are > 100.
|
|
477
|
-
#
|
|
478
|
-
# @return [Boolean, nil]
|
|
479
|
-
optional :select_options_truncated,
|
|
480
|
-
Imagekitio::Internal::Type::Boolean,
|
|
481
|
-
api_name: :selectOptionsTruncated
|
|
482
|
-
|
|
483
|
-
# @!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)
|
|
484
|
-
# Some parameter documentations has been truncated, see
|
|
485
|
-
# {Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema} for more details.
|
|
486
|
-
#
|
|
487
|
-
# @param type [Symbol, Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::Type] Type of the custom metadata field.
|
|
488
|
-
#
|
|
489
|
-
# @param default_value [String, Float, Boolean, Array<String, Float, Boolean>] The default value for this custom metadata field. The value should match the `ty
|
|
490
|
-
#
|
|
491
|
-
# @param is_value_required [Boolean] Specifies if the custom metadata field is required or not.
|
|
492
|
-
#
|
|
493
|
-
# @param max_length [Float] Maximum length of string. Only set if `type` is set to `Text` or `Textarea`.
|
|
494
|
-
#
|
|
495
|
-
# @param max_value [String, Float] Maximum value of the field. Only set if field type is `Date` or `Number`. For `D
|
|
496
|
-
#
|
|
497
|
-
# @param min_length [Float] Minimum length of string. Only set if `type` is set to `Text` or `Textarea`.
|
|
498
|
-
#
|
|
499
|
-
# @param min_value [String, Float] Minimum value of the field. Only set if field type is `Date` or `Number`. For `D
|
|
500
|
-
#
|
|
501
|
-
# @param read_only [Boolean] Indicates whether the custom metadata field is read only. A read only field cann
|
|
502
|
-
#
|
|
503
|
-
# @param select_options [Array<String, Float, Boolean>] An array of allowed values when field type is `SingleSelect` or `MultiSelect`.
|
|
504
|
-
#
|
|
505
|
-
# @param select_options_truncated [Boolean] Specifies if the selectOptions array is truncated. It is truncated when number o
|
|
506
|
-
|
|
507
|
-
# Type of the custom metadata field.
|
|
508
|
-
#
|
|
509
|
-
# @see Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema#type
|
|
510
|
-
module Type
|
|
511
|
-
extend Imagekitio::Internal::Type::Enum
|
|
512
|
-
|
|
513
|
-
TEXT = :Text
|
|
514
|
-
TEXTAREA = :Textarea
|
|
515
|
-
NUMBER = :Number
|
|
516
|
-
DATE = :Date
|
|
517
|
-
BOOLEAN = :Boolean
|
|
518
|
-
SINGLE_SELECT = :SingleSelect
|
|
519
|
-
MULTI_SELECT = :MultiSelect
|
|
520
|
-
|
|
521
|
-
# @!method self.values
|
|
522
|
-
# @return [Array<Symbol>]
|
|
523
|
-
end
|
|
524
|
-
|
|
525
|
-
# The default value for this custom metadata field. The value should match the
|
|
526
|
-
# `type` of custom metadata field.
|
|
527
|
-
#
|
|
528
|
-
# @see Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema#default_value
|
|
529
|
-
module DefaultValue
|
|
530
|
-
extend Imagekitio::Internal::Type::Union
|
|
531
|
-
|
|
532
|
-
variant String
|
|
533
|
-
|
|
534
|
-
variant Float
|
|
535
|
-
|
|
536
|
-
variant Imagekitio::Internal::Type::Boolean
|
|
537
|
-
|
|
538
|
-
# Default value should be of type array when custom metadata field type is set to `MultiSelect`.
|
|
539
|
-
variant -> { Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::DefaultValue::MixedArray }
|
|
540
|
-
|
|
541
|
-
module Mixed
|
|
542
|
-
extend Imagekitio::Internal::Type::Union
|
|
543
|
-
|
|
544
|
-
variant String
|
|
545
|
-
|
|
546
|
-
variant Float
|
|
547
|
-
|
|
548
|
-
variant Imagekitio::Internal::Type::Boolean
|
|
549
|
-
|
|
550
|
-
# @!method self.variants
|
|
551
|
-
# @return [Array(String, Float, Boolean)]
|
|
552
|
-
end
|
|
553
|
-
|
|
554
|
-
# @!method self.variants
|
|
555
|
-
# @return [Array(String, Float, Boolean, Array<String, Float, Boolean>)]
|
|
556
|
-
|
|
557
|
-
# @type [Imagekitio::Internal::Type::Converter]
|
|
558
|
-
MixedArray =
|
|
559
|
-
Imagekitio::Internal::Type::ArrayOf[union: -> { Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::DefaultValue::Mixed }]
|
|
560
|
-
end
|
|
561
|
-
|
|
562
|
-
# Maximum value of the field. Only set if field type is `Date` or `Number`. For
|
|
563
|
-
# `Date` type field, the value will be in ISO8601 string format. For `Number` type
|
|
564
|
-
# field, it will be a numeric value.
|
|
565
|
-
#
|
|
566
|
-
# @see Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema#max_value
|
|
567
|
-
module MaxValue
|
|
568
|
-
extend Imagekitio::Internal::Type::Union
|
|
569
|
-
|
|
570
|
-
variant String
|
|
571
|
-
|
|
572
|
-
variant Float
|
|
573
|
-
|
|
574
|
-
# @!method self.variants
|
|
575
|
-
# @return [Array(String, Float)]
|
|
576
|
-
end
|
|
577
|
-
|
|
578
|
-
# Minimum value of the field. Only set if field type is `Date` or `Number`. For
|
|
579
|
-
# `Date` type field, the value will be in ISO8601 string format. For `Number` type
|
|
580
|
-
# field, it will be a numeric value.
|
|
581
|
-
#
|
|
582
|
-
# @see Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema#min_value
|
|
583
|
-
module MinValue
|
|
584
|
-
extend Imagekitio::Internal::Type::Union
|
|
585
|
-
|
|
586
|
-
variant String
|
|
587
|
-
|
|
588
|
-
variant Float
|
|
589
|
-
|
|
590
|
-
# @!method self.variants
|
|
591
|
-
# @return [Array(String, Float)]
|
|
592
|
-
end
|
|
593
|
-
|
|
594
|
-
module SelectOption
|
|
595
|
-
extend Imagekitio::Internal::Type::Union
|
|
596
|
-
|
|
597
|
-
variant String
|
|
598
|
-
|
|
599
|
-
variant Float
|
|
600
|
-
|
|
601
|
-
variant Imagekitio::Internal::Type::Boolean
|
|
602
|
-
|
|
603
|
-
# @!method self.variants
|
|
604
|
-
# @return [Array(String, Float, Boolean)]
|
|
605
|
-
end
|
|
606
|
-
end
|
|
607
|
-
|
|
608
|
-
# @see Imagekitio::Models::FileUploadResponse#version_info
|
|
609
|
-
class VersionInfo < Imagekitio::Internal::Type::BaseModel
|
|
610
|
-
# @!attribute id
|
|
611
|
-
# Unique identifier of the file version.
|
|
612
|
-
#
|
|
613
|
-
# @return [String, nil]
|
|
614
|
-
optional :id, String
|
|
615
|
-
|
|
616
|
-
# @!attribute name
|
|
617
|
-
# Name of the file version.
|
|
618
|
-
#
|
|
619
|
-
# @return [String, nil]
|
|
620
|
-
optional :name, String
|
|
621
|
-
|
|
622
|
-
# @!method initialize(id: nil, name: nil)
|
|
623
|
-
# An object containing the file or file version's `id` (versionId) and `name`.
|
|
624
|
-
#
|
|
625
|
-
# @param id [String] Unique identifier of the file version.
|
|
626
|
-
#
|
|
627
|
-
# @param name [String] Name of the file version.
|
|
628
|
-
end
|
|
629
371
|
end
|
|
630
372
|
end
|
|
631
373
|
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Models
|
|
5
|
+
class FileVersionCreateEvent < Imagekitio::Models::BaseWebhookEvent
|
|
6
|
+
# @!attribute created_at
|
|
7
|
+
# Timestamp of when the event occurred in ISO8601 format.
|
|
8
|
+
#
|
|
9
|
+
# @return [Time]
|
|
10
|
+
required :created_at, Time
|
|
11
|
+
|
|
12
|
+
# @!attribute data
|
|
13
|
+
# Object containing details of a file or file version.
|
|
14
|
+
#
|
|
15
|
+
# @return [Imagekitio::Models::File]
|
|
16
|
+
required :data, -> { Imagekitio::File }
|
|
17
|
+
|
|
18
|
+
# @!attribute type
|
|
19
|
+
# Type of the webhook event.
|
|
20
|
+
#
|
|
21
|
+
# @return [Symbol, :"file-version.created"]
|
|
22
|
+
required :type, const: :"file-version.created"
|
|
23
|
+
|
|
24
|
+
# @!method initialize(created_at:, data:, type: :"file-version.created")
|
|
25
|
+
# Triggered when a file version is created.
|
|
26
|
+
#
|
|
27
|
+
# @param created_at [Time] Timestamp of when the event occurred in ISO8601 format.
|
|
28
|
+
#
|
|
29
|
+
# @param data [Imagekitio::Models::File] Object containing details of a file or file version.
|
|
30
|
+
#
|
|
31
|
+
# @param type [Symbol, :"file-version.created"] Type of the webhook event.
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Models
|
|
5
|
+
class FileVersionDeleteEvent < Imagekitio::Models::BaseWebhookEvent
|
|
6
|
+
# @!attribute created_at
|
|
7
|
+
# Timestamp of when the event occurred in ISO8601 format.
|
|
8
|
+
#
|
|
9
|
+
# @return [Time]
|
|
10
|
+
required :created_at, Time
|
|
11
|
+
|
|
12
|
+
# @!attribute data
|
|
13
|
+
#
|
|
14
|
+
# @return [Imagekitio::Models::FileVersionDeleteEvent::Data]
|
|
15
|
+
required :data, -> { Imagekitio::FileVersionDeleteEvent::Data }
|
|
16
|
+
|
|
17
|
+
# @!attribute type
|
|
18
|
+
# Type of the webhook event.
|
|
19
|
+
#
|
|
20
|
+
# @return [Symbol, :"file-version.deleted"]
|
|
21
|
+
required :type, const: :"file-version.deleted"
|
|
22
|
+
|
|
23
|
+
# @!method initialize(created_at:, data:, type: :"file-version.deleted")
|
|
24
|
+
# Triggered when a file version is deleted.
|
|
25
|
+
#
|
|
26
|
+
# @param created_at [Time] Timestamp of when the event occurred in ISO8601 format.
|
|
27
|
+
#
|
|
28
|
+
# @param data [Imagekitio::Models::FileVersionDeleteEvent::Data]
|
|
29
|
+
#
|
|
30
|
+
# @param type [Symbol, :"file-version.deleted"] Type of the webhook event.
|
|
31
|
+
|
|
32
|
+
class Data < Imagekitio::Internal::Type::BaseModel
|
|
33
|
+
# @!attribute file_id
|
|
34
|
+
# The unique `fileId` of the deleted file.
|
|
35
|
+
#
|
|
36
|
+
# @return [String]
|
|
37
|
+
required :file_id, String, api_name: :fileId
|
|
38
|
+
|
|
39
|
+
# @!attribute version_id
|
|
40
|
+
# The unique `versionId` of the deleted file version.
|
|
41
|
+
#
|
|
42
|
+
# @return [String]
|
|
43
|
+
required :version_id, String, api_name: :versionId
|
|
44
|
+
|
|
45
|
+
# @!method initialize(file_id:, version_id:)
|
|
46
|
+
# @param file_id [String] The unique `fileId` of the deleted file.
|
|
47
|
+
#
|
|
48
|
+
# @param version_id [String] The unique `versionId` of the deleted file version.
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Models
|
|
5
|
+
class SelectedFieldsSchemaItem < Imagekitio::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute type
|
|
7
|
+
# Type of the custom metadata field.
|
|
8
|
+
#
|
|
9
|
+
# @return [Symbol, Imagekitio::Models::SelectedFieldsSchemaItem::Type]
|
|
10
|
+
required :type, enum: -> { Imagekitio::SelectedFieldsSchemaItem::Type }
|
|
11
|
+
|
|
12
|
+
# @!attribute default_value
|
|
13
|
+
# The default value for this custom metadata field. The value should match the
|
|
14
|
+
# `type` of custom metadata field.
|
|
15
|
+
#
|
|
16
|
+
# @return [String, Float, Boolean, Array<String, Float, Boolean>, nil]
|
|
17
|
+
optional :default_value,
|
|
18
|
+
union: -> { Imagekitio::SelectedFieldsSchemaItem::DefaultValue },
|
|
19
|
+
api_name: :defaultValue
|
|
20
|
+
|
|
21
|
+
# @!attribute is_value_required
|
|
22
|
+
# Specifies if the custom metadata field is required or not.
|
|
23
|
+
#
|
|
24
|
+
# @return [Boolean, nil]
|
|
25
|
+
optional :is_value_required, Imagekitio::Internal::Type::Boolean, api_name: :isValueRequired
|
|
26
|
+
|
|
27
|
+
# @!attribute max_length
|
|
28
|
+
# Maximum length of string. Only set if `type` is set to `Text` or `Textarea`.
|
|
29
|
+
#
|
|
30
|
+
# @return [Float, nil]
|
|
31
|
+
optional :max_length, Float, api_name: :maxLength
|
|
32
|
+
|
|
33
|
+
# @!attribute max_value
|
|
34
|
+
# Maximum value of the field. Only set if field type is `Date` or `Number`. For
|
|
35
|
+
# `Date` type field, the value will be in ISO8601 string format. For `Number` type
|
|
36
|
+
# field, it will be a numeric value.
|
|
37
|
+
#
|
|
38
|
+
# @return [String, Float, nil]
|
|
39
|
+
optional :max_value, union: -> { Imagekitio::SelectedFieldsSchemaItem::MaxValue }, api_name: :maxValue
|
|
40
|
+
|
|
41
|
+
# @!attribute min_length
|
|
42
|
+
# Minimum length of string. Only set if `type` is set to `Text` or `Textarea`.
|
|
43
|
+
#
|
|
44
|
+
# @return [Float, nil]
|
|
45
|
+
optional :min_length, Float, api_name: :minLength
|
|
46
|
+
|
|
47
|
+
# @!attribute min_value
|
|
48
|
+
# Minimum value of the field. Only set if field type is `Date` or `Number`. For
|
|
49
|
+
# `Date` type field, the value will be in ISO8601 string format. For `Number` type
|
|
50
|
+
# field, it will be a numeric value.
|
|
51
|
+
#
|
|
52
|
+
# @return [String, Float, nil]
|
|
53
|
+
optional :min_value, union: -> { Imagekitio::SelectedFieldsSchemaItem::MinValue }, api_name: :minValue
|
|
54
|
+
|
|
55
|
+
# @!attribute read_only
|
|
56
|
+
# Indicates whether the custom metadata field is read only. A read only field
|
|
57
|
+
# cannot be modified after being set. This field is configurable only via the
|
|
58
|
+
# **Path policy** feature.
|
|
59
|
+
#
|
|
60
|
+
# @return [Boolean, nil]
|
|
61
|
+
optional :read_only, Imagekitio::Internal::Type::Boolean, api_name: :readOnly
|
|
62
|
+
|
|
63
|
+
# @!attribute select_options
|
|
64
|
+
# An array of allowed values when field type is `SingleSelect` or `MultiSelect`.
|
|
65
|
+
#
|
|
66
|
+
# @return [Array<String, Float, Boolean>, nil]
|
|
67
|
+
optional :select_options,
|
|
68
|
+
-> {
|
|
69
|
+
Imagekitio::Internal::Type::ArrayOf[union: Imagekitio::SelectedFieldsSchemaItem::SelectOption]
|
|
70
|
+
},
|
|
71
|
+
api_name: :selectOptions
|
|
72
|
+
|
|
73
|
+
# @!attribute select_options_truncated
|
|
74
|
+
# Specifies if the selectOptions array is truncated. It is truncated when number
|
|
75
|
+
# of options are > 100.
|
|
76
|
+
#
|
|
77
|
+
# @return [Boolean, nil]
|
|
78
|
+
optional :select_options_truncated,
|
|
79
|
+
Imagekitio::Internal::Type::Boolean,
|
|
80
|
+
api_name: :selectOptionsTruncated
|
|
81
|
+
|
|
82
|
+
# @!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)
|
|
83
|
+
# Some parameter documentations has been truncated, see
|
|
84
|
+
# {Imagekitio::Models::SelectedFieldsSchemaItem} for more details.
|
|
85
|
+
#
|
|
86
|
+
# @param type [Symbol, Imagekitio::Models::SelectedFieldsSchemaItem::Type] Type of the custom metadata field.
|
|
87
|
+
#
|
|
88
|
+
# @param default_value [String, Float, Boolean, Array<String, Float, Boolean>] The default value for this custom metadata field. The value should match the `ty
|
|
89
|
+
#
|
|
90
|
+
# @param is_value_required [Boolean] Specifies if the custom metadata field is required or not.
|
|
91
|
+
#
|
|
92
|
+
# @param max_length [Float] Maximum length of string. Only set if `type` is set to `Text` or `Textarea`.
|
|
93
|
+
#
|
|
94
|
+
# @param max_value [String, Float] Maximum value of the field. Only set if field type is `Date` or `Number`. For `D
|
|
95
|
+
#
|
|
96
|
+
# @param min_length [Float] Minimum length of string. Only set if `type` is set to `Text` or `Textarea`.
|
|
97
|
+
#
|
|
98
|
+
# @param min_value [String, Float] Minimum value of the field. Only set if field type is `Date` or `Number`. For `D
|
|
99
|
+
#
|
|
100
|
+
# @param read_only [Boolean] Indicates whether the custom metadata field is read only. A read only field cann
|
|
101
|
+
#
|
|
102
|
+
# @param select_options [Array<String, Float, Boolean>] An array of allowed values when field type is `SingleSelect` or `MultiSelect`.
|
|
103
|
+
#
|
|
104
|
+
# @param select_options_truncated [Boolean] Specifies if the selectOptions array is truncated. It is truncated when number o
|
|
105
|
+
|
|
106
|
+
# Type of the custom metadata field.
|
|
107
|
+
#
|
|
108
|
+
# @see Imagekitio::Models::SelectedFieldsSchemaItem#type
|
|
109
|
+
module Type
|
|
110
|
+
extend Imagekitio::Internal::Type::Enum
|
|
111
|
+
|
|
112
|
+
TEXT = :Text
|
|
113
|
+
TEXTAREA = :Textarea
|
|
114
|
+
NUMBER = :Number
|
|
115
|
+
DATE = :Date
|
|
116
|
+
BOOLEAN = :Boolean
|
|
117
|
+
SINGLE_SELECT = :SingleSelect
|
|
118
|
+
MULTI_SELECT = :MultiSelect
|
|
119
|
+
|
|
120
|
+
# @!method self.values
|
|
121
|
+
# @return [Array<Symbol>]
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# The default value for this custom metadata field. The value should match the
|
|
125
|
+
# `type` of custom metadata field.
|
|
126
|
+
#
|
|
127
|
+
# @see Imagekitio::Models::SelectedFieldsSchemaItem#default_value
|
|
128
|
+
module DefaultValue
|
|
129
|
+
extend Imagekitio::Internal::Type::Union
|
|
130
|
+
|
|
131
|
+
variant String
|
|
132
|
+
|
|
133
|
+
variant Float
|
|
134
|
+
|
|
135
|
+
variant Imagekitio::Internal::Type::Boolean
|
|
136
|
+
|
|
137
|
+
# Default value should be of type array when custom metadata field type is set to `MultiSelect`.
|
|
138
|
+
variant -> { Imagekitio::Models::SelectedFieldsSchemaItem::DefaultValue::MixedArray }
|
|
139
|
+
|
|
140
|
+
module Mixed
|
|
141
|
+
extend Imagekitio::Internal::Type::Union
|
|
142
|
+
|
|
143
|
+
variant String
|
|
144
|
+
|
|
145
|
+
variant Float
|
|
146
|
+
|
|
147
|
+
variant Imagekitio::Internal::Type::Boolean
|
|
148
|
+
|
|
149
|
+
# @!method self.variants
|
|
150
|
+
# @return [Array(String, Float, Boolean)]
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# @!method self.variants
|
|
154
|
+
# @return [Array(String, Float, Boolean, Array<String, Float, Boolean>)]
|
|
155
|
+
|
|
156
|
+
# @type [Imagekitio::Internal::Type::Converter]
|
|
157
|
+
MixedArray =
|
|
158
|
+
Imagekitio::Internal::Type::ArrayOf[union: -> {
|
|
159
|
+
Imagekitio::SelectedFieldsSchemaItem::DefaultValue::Mixed
|
|
160
|
+
}]
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Maximum value of the field. Only set if field type is `Date` or `Number`. For
|
|
164
|
+
# `Date` type field, the value will be in ISO8601 string format. For `Number` type
|
|
165
|
+
# field, it will be a numeric value.
|
|
166
|
+
#
|
|
167
|
+
# @see Imagekitio::Models::SelectedFieldsSchemaItem#max_value
|
|
168
|
+
module MaxValue
|
|
169
|
+
extend Imagekitio::Internal::Type::Union
|
|
170
|
+
|
|
171
|
+
variant String
|
|
172
|
+
|
|
173
|
+
variant Float
|
|
174
|
+
|
|
175
|
+
# @!method self.variants
|
|
176
|
+
# @return [Array(String, Float)]
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Minimum value of the field. Only set if field type is `Date` or `Number`. For
|
|
180
|
+
# `Date` type field, the value will be in ISO8601 string format. For `Number` type
|
|
181
|
+
# field, it will be a numeric value.
|
|
182
|
+
#
|
|
183
|
+
# @see Imagekitio::Models::SelectedFieldsSchemaItem#min_value
|
|
184
|
+
module MinValue
|
|
185
|
+
extend Imagekitio::Internal::Type::Union
|
|
186
|
+
|
|
187
|
+
variant String
|
|
188
|
+
|
|
189
|
+
variant Float
|
|
190
|
+
|
|
191
|
+
# @!method self.variants
|
|
192
|
+
# @return [Array(String, Float)]
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
module SelectOption
|
|
196
|
+
extend Imagekitio::Internal::Type::Union
|
|
197
|
+
|
|
198
|
+
variant String
|
|
199
|
+
|
|
200
|
+
variant Float
|
|
201
|
+
|
|
202
|
+
variant Imagekitio::Internal::Type::Boolean
|
|
203
|
+
|
|
204
|
+
# @!method self.variants
|
|
205
|
+
# @return [Array(String, Float, Boolean)]
|
|
206
|
+
end
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# @type [Imagekitio::Internal::Type::Converter]
|
|
210
|
+
SelectedFieldsSchema = Imagekitio::Internal::Type::HashOf[-> { Imagekitio::SelectedFieldsSchemaItem }]
|
|
211
|
+
end
|
|
212
|
+
end
|
|
@@ -31,8 +31,23 @@ module Imagekitio
|
|
|
31
31
|
# Triggered when a post-transformation fails. The original file remains available, but the requested transformation could not be generated.
|
|
32
32
|
variant -> { Imagekitio::UploadPostTransformErrorEvent }
|
|
33
33
|
|
|
34
|
+
# Triggered when a file is created.
|
|
35
|
+
variant -> { Imagekitio::FileCreateEvent }
|
|
36
|
+
|
|
37
|
+
# Triggered when a file is updated.
|
|
38
|
+
variant -> { Imagekitio::FileUpdateEvent }
|
|
39
|
+
|
|
40
|
+
# Triggered when a file is deleted.
|
|
41
|
+
variant -> { Imagekitio::FileDeleteEvent }
|
|
42
|
+
|
|
43
|
+
# Triggered when a file version is created.
|
|
44
|
+
variant -> { Imagekitio::FileVersionCreateEvent }
|
|
45
|
+
|
|
46
|
+
# Triggered when a file version is deleted.
|
|
47
|
+
variant -> { Imagekitio::FileVersionDeleteEvent }
|
|
48
|
+
|
|
34
49
|
# @!method self.variants
|
|
35
|
-
# @return [Array(Imagekitio::Models::VideoTransformationAcceptedEvent, Imagekitio::Models::VideoTransformationReadyEvent, Imagekitio::Models::VideoTransformationErrorEvent, Imagekitio::Models::UploadPreTransformSuccessEvent, Imagekitio::Models::UploadPreTransformErrorEvent, Imagekitio::Models::UploadPostTransformSuccessEvent, Imagekitio::Models::UploadPostTransformErrorEvent)]
|
|
50
|
+
# @return [Array(Imagekitio::Models::VideoTransformationAcceptedEvent, Imagekitio::Models::VideoTransformationReadyEvent, Imagekitio::Models::VideoTransformationErrorEvent, Imagekitio::Models::UploadPreTransformSuccessEvent, Imagekitio::Models::UploadPreTransformErrorEvent, Imagekitio::Models::UploadPostTransformSuccessEvent, Imagekitio::Models::UploadPostTransformErrorEvent, Imagekitio::Models::FileCreateEvent, Imagekitio::Models::FileUpdateEvent, Imagekitio::Models::FileDeleteEvent, Imagekitio::Models::FileVersionCreateEvent, Imagekitio::Models::FileVersionDeleteEvent)]
|
|
36
51
|
end
|
|
37
52
|
end
|
|
38
53
|
end
|
|
@@ -31,8 +31,23 @@ module Imagekitio
|
|
|
31
31
|
# Triggered when a post-transformation fails. The original file remains available, but the requested transformation could not be generated.
|
|
32
32
|
variant -> { Imagekitio::UploadPostTransformErrorEvent }
|
|
33
33
|
|
|
34
|
+
# Triggered when a file is created.
|
|
35
|
+
variant -> { Imagekitio::FileCreateEvent }
|
|
36
|
+
|
|
37
|
+
# Triggered when a file is updated.
|
|
38
|
+
variant -> { Imagekitio::FileUpdateEvent }
|
|
39
|
+
|
|
40
|
+
# Triggered when a file is deleted.
|
|
41
|
+
variant -> { Imagekitio::FileDeleteEvent }
|
|
42
|
+
|
|
43
|
+
# Triggered when a file version is created.
|
|
44
|
+
variant -> { Imagekitio::FileVersionCreateEvent }
|
|
45
|
+
|
|
46
|
+
# Triggered when a file version is deleted.
|
|
47
|
+
variant -> { Imagekitio::FileVersionDeleteEvent }
|
|
48
|
+
|
|
34
49
|
# @!method self.variants
|
|
35
|
-
# @return [Array(Imagekitio::Models::VideoTransformationAcceptedEvent, Imagekitio::Models::VideoTransformationReadyEvent, Imagekitio::Models::VideoTransformationErrorEvent, Imagekitio::Models::UploadPreTransformSuccessEvent, Imagekitio::Models::UploadPreTransformErrorEvent, Imagekitio::Models::UploadPostTransformSuccessEvent, Imagekitio::Models::UploadPostTransformErrorEvent)]
|
|
50
|
+
# @return [Array(Imagekitio::Models::VideoTransformationAcceptedEvent, Imagekitio::Models::VideoTransformationReadyEvent, Imagekitio::Models::VideoTransformationErrorEvent, Imagekitio::Models::UploadPreTransformSuccessEvent, Imagekitio::Models::UploadPreTransformErrorEvent, Imagekitio::Models::UploadPostTransformSuccessEvent, Imagekitio::Models::UploadPostTransformErrorEvent, Imagekitio::Models::FileCreateEvent, Imagekitio::Models::FileUpdateEvent, Imagekitio::Models::FileDeleteEvent, Imagekitio::Models::FileVersionCreateEvent, Imagekitio::Models::FileVersionDeleteEvent)]
|
|
36
51
|
end
|
|
37
52
|
end
|
|
38
53
|
end
|