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.
Files changed (154) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +73 -0
  3. data/README.md +9 -2
  4. data/lib/imagekitio/client.rb +14 -0
  5. data/lib/imagekitio/helpers/helper.rb +6 -0
  6. data/lib/imagekitio/internal/transport/pooled_net_requester.rb +1 -1
  7. data/lib/imagekitio/internal/type/base_model.rb +5 -5
  8. data/lib/imagekitio/internal/util.rb +54 -8
  9. data/lib/imagekitio/models/accounts/origin_create_params.rb +1 -9
  10. data/lib/imagekitio/models/accounts/origin_delete_params.rb +13 -1
  11. data/lib/imagekitio/models/accounts/origin_get_params.rb +13 -1
  12. data/lib/imagekitio/models/accounts/origin_update_params.rb +10 -6
  13. data/lib/imagekitio/models/accounts/url_endpoint_delete_params.rb +14 -1
  14. data/lib/imagekitio/models/accounts/url_endpoint_get_params.rb +14 -1
  15. data/lib/imagekitio/models/accounts/url_endpoint_update_params.rb +14 -1
  16. data/lib/imagekitio/models/ai_tag.rb +39 -0
  17. data/lib/imagekitio/models/beta/v2/file_upload_response.rb +9 -270
  18. data/lib/imagekitio/models/cache/invalidation_get_params.rb +7 -1
  19. data/lib/imagekitio/models/custom_metadata.rb +8 -0
  20. data/lib/imagekitio/models/custom_metadata_field_delete_params.rb +7 -1
  21. data/lib/imagekitio/models/custom_metadata_field_update_params.rb +8 -1
  22. data/lib/imagekitio/models/embedded_metadata.rb +8 -0
  23. data/lib/imagekitio/models/extension_config.rb +10 -5
  24. data/lib/imagekitio/models/extensions.rb +10 -5
  25. data/lib/imagekitio/models/file.rb +11 -275
  26. data/lib/imagekitio/models/file_create_event.rb +34 -0
  27. data/lib/imagekitio/models/file_delete_event.rb +44 -0
  28. data/lib/imagekitio/models/file_delete_params.rb +7 -1
  29. data/lib/imagekitio/models/file_get_params.rb +7 -1
  30. data/lib/imagekitio/models/file_update_event.rb +34 -0
  31. data/lib/imagekitio/models/file_update_params.rb +5 -7
  32. data/lib/imagekitio/models/file_upload_response.rb +9 -267
  33. data/lib/imagekitio/models/file_version_create_event.rb +34 -0
  34. data/lib/imagekitio/models/file_version_delete_event.rb +52 -0
  35. data/lib/imagekitio/models/files/metadata_get_params.rb +7 -1
  36. data/lib/imagekitio/models/files/version_delete_params.rb +7 -1
  37. data/lib/imagekitio/models/files/version_get_params.rb +7 -1
  38. data/lib/imagekitio/models/files/version_list_params.rb +7 -1
  39. data/lib/imagekitio/models/files/version_restore_params.rb +7 -1
  40. data/lib/imagekitio/models/folders/job_get_params.rb +7 -1
  41. data/lib/imagekitio/models/overlay_position.rb +99 -5
  42. data/lib/imagekitio/models/saved_extension_delete_params.rb +7 -1
  43. data/lib/imagekitio/models/saved_extension_get_params.rb +7 -1
  44. data/lib/imagekitio/models/saved_extension_update_params.rb +8 -1
  45. data/lib/imagekitio/models/selected_fields_schema.rb +212 -0
  46. data/lib/imagekitio/models/unsafe_unwrap_webhook_event.rb +16 -1
  47. data/lib/imagekitio/models/unwrap_webhook_event.rb +16 -1
  48. data/lib/imagekitio/models/upload_pre_transform_success_event.rb +9 -285
  49. data/lib/imagekitio/models/version_info.rb +26 -0
  50. data/lib/imagekitio/models.rb +25 -0
  51. data/lib/imagekitio/resources/accounts/origins.rb +4 -14
  52. data/lib/imagekitio/resources/accounts/usage.rb +2 -1
  53. data/lib/imagekitio/resources/assets.rb +2 -1
  54. data/lib/imagekitio/resources/beta/v2/files.rb +5 -4
  55. data/lib/imagekitio/resources/custom_metadata_fields.rb +2 -1
  56. data/lib/imagekitio/resources/files/metadata.rb +2 -1
  57. data/lib/imagekitio/resources/files.rb +7 -11
  58. data/lib/imagekitio/resources/webhooks.rb +14 -3
  59. data/lib/imagekitio/version.rb +1 -1
  60. data/lib/imagekitio.rb +12 -1
  61. data/rbi/imagekitio/client.rbi +13 -0
  62. data/rbi/imagekitio/internal/util.rbi +29 -1
  63. data/rbi/imagekitio/models/accounts/origin_create_params.rbi +4 -51
  64. data/rbi/imagekitio/models/accounts/origin_delete_params.rbi +18 -5
  65. data/rbi/imagekitio/models/accounts/origin_get_params.rbi +18 -5
  66. data/rbi/imagekitio/models/accounts/origin_update_params.rbi +9 -43
  67. data/rbi/imagekitio/models/accounts/url_endpoint_delete_params.rbi +20 -5
  68. data/rbi/imagekitio/models/accounts/url_endpoint_get_params.rbi +20 -5
  69. data/rbi/imagekitio/models/accounts/url_endpoint_update_params.rbi +20 -5
  70. data/rbi/imagekitio/models/ai_tag.rbi +56 -0
  71. data/rbi/imagekitio/models/beta/v2/file_upload_response.rbi +11 -535
  72. data/rbi/imagekitio/models/cache/invalidation_get_params.rbi +11 -5
  73. data/rbi/imagekitio/models/custom_metadata.rbi +11 -0
  74. data/rbi/imagekitio/models/custom_metadata_field_delete_params.rbi +13 -5
  75. data/rbi/imagekitio/models/custom_metadata_field_update_params.rbi +6 -0
  76. data/rbi/imagekitio/models/embedded_metadata.rbi +11 -0
  77. data/rbi/imagekitio/models/extension_config.rbi +16 -6
  78. data/rbi/imagekitio/models/extensions.rbi +16 -6
  79. data/rbi/imagekitio/models/file.rbi +15 -475
  80. data/rbi/imagekitio/models/file_create_event.rbi +53 -0
  81. data/rbi/imagekitio/models/file_delete_event.rbi +80 -0
  82. data/rbi/imagekitio/models/file_delete_params.rbi +13 -5
  83. data/rbi/imagekitio/models/file_get_params.rbi +13 -5
  84. data/rbi/imagekitio/models/file_update_event.rbi +53 -0
  85. data/rbi/imagekitio/models/file_update_params.rbi +5 -28
  86. data/rbi/imagekitio/models/file_upload_response.rbi +11 -520
  87. data/rbi/imagekitio/models/file_version_create_event.rbi +56 -0
  88. data/rbi/imagekitio/models/file_version_delete_event.rbi +93 -0
  89. data/rbi/imagekitio/models/files/metadata_get_params.rbi +11 -5
  90. data/rbi/imagekitio/models/files/version_delete_params.rbi +10 -2
  91. data/rbi/imagekitio/models/files/version_get_params.rbi +10 -2
  92. data/rbi/imagekitio/models/files/version_list_params.rbi +11 -5
  93. data/rbi/imagekitio/models/files/version_restore_params.rbi +10 -2
  94. data/rbi/imagekitio/models/folders/job_get_params.rbi +11 -5
  95. data/rbi/imagekitio/models/overlay_position.rbi +165 -9
  96. data/rbi/imagekitio/models/saved_extension_delete_params.rbi +13 -5
  97. data/rbi/imagekitio/models/saved_extension_get_params.rbi +13 -5
  98. data/rbi/imagekitio/models/saved_extension_update_params.rbi +6 -0
  99. data/rbi/imagekitio/models/selected_fields_schema.rbi +364 -0
  100. data/rbi/imagekitio/models/unsafe_unwrap_webhook_event.rbi +6 -1
  101. data/rbi/imagekitio/models/unwrap_webhook_event.rbi +6 -1
  102. data/rbi/imagekitio/models/upload_pre_transform_success_event.rbi +11 -533
  103. data/rbi/imagekitio/models/version_info.rbi +40 -0
  104. data/rbi/imagekitio/models.rbi +34 -0
  105. data/rbi/imagekitio/resources/accounts/origins.rbi +22 -2
  106. data/rbi/imagekitio/resources/beta/v2/files.rbi +5 -4
  107. data/rbi/imagekitio/resources/files.rbi +10 -5
  108. data/rbi/imagekitio/resources/webhooks.rbi +22 -4
  109. data/sig/imagekitio/client.rbs +3 -0
  110. data/sig/imagekitio/internal/util.rbs +14 -0
  111. data/sig/imagekitio/models/accounts/origin_create_params.rbs +3 -16
  112. data/sig/imagekitio/models/accounts/origin_delete_params.rbs +11 -3
  113. data/sig/imagekitio/models/accounts/origin_get_params.rbs +11 -3
  114. data/sig/imagekitio/models/accounts/origin_update_params.rbs +4 -9
  115. data/sig/imagekitio/models/accounts/url_endpoint_delete_params.rbs +11 -3
  116. data/sig/imagekitio/models/accounts/url_endpoint_get_params.rbs +11 -3
  117. data/sig/imagekitio/models/accounts/url_endpoint_update_params.rbs +13 -3
  118. data/sig/imagekitio/models/ai_tag.rbs +27 -0
  119. data/sig/imagekitio/models/beta/v2/file_upload_response.rbs +30 -223
  120. data/sig/imagekitio/models/cache/invalidation_get_params.rbs +11 -3
  121. data/sig/imagekitio/models/custom_metadata.rbs +7 -0
  122. data/sig/imagekitio/models/custom_metadata_field_delete_params.rbs +11 -3
  123. data/sig/imagekitio/models/custom_metadata_field_update_params.rbs +5 -0
  124. data/sig/imagekitio/models/embedded_metadata.rbs +7 -0
  125. data/sig/imagekitio/models/file.rbs +29 -224
  126. data/sig/imagekitio/models/file_create_event.rbs +32 -0
  127. data/sig/imagekitio/models/file_delete_event.rbs +48 -0
  128. data/sig/imagekitio/models/file_delete_params.rbs +11 -3
  129. data/sig/imagekitio/models/file_get_params.rbs +12 -3
  130. data/sig/imagekitio/models/file_update_event.rbs +32 -0
  131. data/sig/imagekitio/models/file_update_params.rbs +4 -9
  132. data/sig/imagekitio/models/file_upload_response.rbs +29 -224
  133. data/sig/imagekitio/models/file_version_create_event.rbs +36 -0
  134. data/sig/imagekitio/models/file_version_delete_event.rbs +50 -0
  135. data/sig/imagekitio/models/files/metadata_get_params.rbs +11 -3
  136. data/sig/imagekitio/models/files/version_delete_params.rbs +6 -1
  137. data/sig/imagekitio/models/files/version_get_params.rbs +6 -1
  138. data/sig/imagekitio/models/files/version_list_params.rbs +11 -3
  139. data/sig/imagekitio/models/files/version_restore_params.rbs +6 -1
  140. data/sig/imagekitio/models/folders/job_get_params.rbs +11 -3
  141. data/sig/imagekitio/models/overlay_position.rbs +73 -3
  142. data/sig/imagekitio/models/saved_extension_delete_params.rbs +11 -3
  143. data/sig/imagekitio/models/saved_extension_get_params.rbs +11 -3
  144. data/sig/imagekitio/models/saved_extension_update_params.rbs +5 -0
  145. data/sig/imagekitio/models/selected_fields_schema.rbs +165 -0
  146. data/sig/imagekitio/models/unsafe_unwrap_webhook_event.rbs +5 -0
  147. data/sig/imagekitio/models/unwrap_webhook_event.rbs +5 -0
  148. data/sig/imagekitio/models/upload_pre_transform_success_event.rbs +29 -224
  149. data/sig/imagekitio/models/version_info.rbs +19 -0
  150. data/sig/imagekitio/models.rbs +22 -0
  151. data/sig/imagekitio/resources/accounts/origins.rbs +2 -2
  152. data/sig/imagekitio/resources/files.rbs +1 -1
  153. data/sig/imagekitio/resources/webhooks.rbs +15 -3
  154. metadata +46 -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::FileUploadResponse::AITag>, nil]
10
+ # @return [Array<Imagekitio::Models::AITag>, nil]
11
11
  optional :ai_tags,
12
- -> { Imagekitio::Internal::Type::ArrayOf[Imagekitio::Models::FileUploadResponse::AITag] },
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::FileUploadResponse::SelectedFieldsSchema}, nil]
152
+ # @return [Hash{Symbol=>Imagekitio::Models::SelectedFieldsSchemaItem}, nil]
153
153
  optional :selected_fields_schema,
154
- -> { Imagekitio::Internal::Type::HashOf[Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema] },
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::FileUploadResponse::VersionInfo, nil]
187
- optional :version_info, -> { Imagekitio::Models::FileUploadResponse::VersionInfo }, api_name: :versionInfo
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::FileUploadResponse::AITag>, nil] An array of tags assigned to the uploaded file by auto tagging.
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::FileUploadResponse::SelectedFieldsSchema}] This field is included in the response only if the Path policy feature is availa
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::FileUploadResponse::VersionInfo] An object containing the file or file version's `id` (versionId) and `name`.
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
@@ -8,7 +8,13 @@ module Imagekitio
8
8
  extend Imagekitio::Internal::Type::RequestParameters::Converter
9
9
  include Imagekitio::Internal::Type::RequestParameters
10
10
 
11
- # @!method initialize(request_options: {})
11
+ # @!attribute file_id
12
+ #
13
+ # @return [String]
14
+ required :file_id, String
15
+
16
+ # @!method initialize(file_id:, request_options: {})
17
+ # @param file_id [String]
12
18
  # @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
13
19
  end
14
20
  end
@@ -13,8 +13,14 @@ module Imagekitio
13
13
  # @return [String]
14
14
  required :file_id, String
15
15
 
16
- # @!method initialize(file_id:, request_options: {})
16
+ # @!attribute version_id
17
+ #
18
+ # @return [String]
19
+ required :version_id, String
20
+
21
+ # @!method initialize(file_id:, version_id:, request_options: {})
17
22
  # @param file_id [String]
23
+ # @param version_id [String]
18
24
  # @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
19
25
  end
20
26
  end
@@ -13,8 +13,14 @@ module Imagekitio
13
13
  # @return [String]
14
14
  required :file_id, String
15
15
 
16
- # @!method initialize(file_id:, request_options: {})
16
+ # @!attribute version_id
17
+ #
18
+ # @return [String]
19
+ required :version_id, String
20
+
21
+ # @!method initialize(file_id:, version_id:, request_options: {})
17
22
  # @param file_id [String]
23
+ # @param version_id [String]
18
24
  # @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
19
25
  end
20
26
  end
@@ -8,7 +8,13 @@ module Imagekitio
8
8
  extend Imagekitio::Internal::Type::RequestParameters::Converter
9
9
  include Imagekitio::Internal::Type::RequestParameters
10
10
 
11
- # @!method initialize(request_options: {})
11
+ # @!attribute file_id
12
+ #
13
+ # @return [String]
14
+ required :file_id, String
15
+
16
+ # @!method initialize(file_id:, request_options: {})
17
+ # @param file_id [String]
12
18
  # @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
13
19
  end
14
20
  end
@@ -13,8 +13,14 @@ module Imagekitio
13
13
  # @return [String]
14
14
  required :file_id, String
15
15
 
16
- # @!method initialize(file_id:, request_options: {})
16
+ # @!attribute version_id
17
+ #
18
+ # @return [String]
19
+ required :version_id, String
20
+
21
+ # @!method initialize(file_id:, version_id:, request_options: {})
17
22
  # @param file_id [String]
23
+ # @param version_id [String]
18
24
  # @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
19
25
  end
20
26
  end
@@ -8,7 +8,13 @@ module Imagekitio
8
8
  extend Imagekitio::Internal::Type::RequestParameters::Converter
9
9
  include Imagekitio::Internal::Type::RequestParameters
10
10
 
11
- # @!method initialize(request_options: {})
11
+ # @!attribute job_id
12
+ #
13
+ # @return [String]
14
+ required :job_id, String
15
+
16
+ # @!method initialize(job_id:, request_options: {})
17
+ # @param job_id [String]
12
18
  # @param request_options [Imagekitio::RequestOptions, Hash{Symbol=>Object}]
13
19
  end
14
20
  end
@@ -3,9 +3,18 @@
3
3
  module Imagekitio
4
4
  module Models
5
5
  class OverlayPosition < Imagekitio::Internal::Type::BaseModel
6
+ # @!attribute anchor_point
7
+ # Sets the anchor point on the base asset from which the overlay offset is
8
+ # calculated. The default value is `top_left`. Maps to `lap` in the URL. Can only
9
+ # be used with one or more of `x`, `y`, `xCenter`, or `yCenter`.
10
+ #
11
+ # @return [Symbol, Imagekitio::Models::OverlayPosition::AnchorPoint, nil]
12
+ optional :anchor_point, enum: -> { Imagekitio::OverlayPosition::AnchorPoint }, api_name: :anchorPoint
13
+
6
14
  # @!attribute focus
7
- # Specifies the position of the overlay relative to the parent image or video.
8
- # Maps to `lfo` in the URL.
15
+ # Specifies the position of the overlay relative to the parent image or video. If
16
+ # one or more of `x`, `y`, `xCenter`, or `yCenter` parameters are specified, this
17
+ # parameter is ignored. Maps to `lfo` in the URL.
9
18
  #
10
19
  # @return [Symbol, Imagekitio::Models::OverlayPosition::Focus, nil]
11
20
  optional :focus, enum: -> { Imagekitio::OverlayPosition::Focus }
@@ -20,6 +29,16 @@ module Imagekitio
20
29
  # @return [Float, String, nil]
21
30
  optional :x, union: -> { Imagekitio::OverlayPosition::X }
22
31
 
32
+ # @!attribute x_center
33
+ # Specifies the x-coordinate on the base asset where the overlay's center will be
34
+ # positioned. It also accepts arithmetic expressions such as `bw_mul_0.4` or
35
+ # `bw_sub_cw`. Maps to `lxc` in the URL. Cannot be used together with `x`, but can
36
+ # be used with `y`. Learn about
37
+ # [Arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations).
38
+ #
39
+ # @return [Float, String, nil]
40
+ optional :x_center, union: -> { Imagekitio::OverlayPosition::XCenter }, api_name: :xCenter
41
+
23
42
  # @!attribute y_
24
43
  # Specifies the y-coordinate of the top-left corner of the base asset where the
25
44
  # overlay's top-left corner will be positioned. It also accepts arithmetic
@@ -30,18 +49,57 @@ module Imagekitio
30
49
  # @return [Float, String, nil]
31
50
  optional :y_, union: -> { Imagekitio::OverlayPosition::Y }, api_name: :y
32
51
 
33
- # @!method initialize(focus: nil, x: nil, y_: nil)
52
+ # @!attribute y_center
53
+ # Specifies the y-coordinate on the base asset where the overlay's center will be
54
+ # positioned. It also accepts arithmetic expressions such as `bh_mul_0.4` or
55
+ # `bh_sub_ch`. Maps to `lyc` in the URL. Cannot be used together with `y`, but can
56
+ # be used with `x`. Learn about
57
+ # [Arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations).
58
+ #
59
+ # @return [Float, String, nil]
60
+ optional :y_center, union: -> { Imagekitio::OverlayPosition::YCenter }, api_name: :yCenter
61
+
62
+ # @!method initialize(anchor_point: nil, focus: nil, x: nil, x_center: nil, y_: nil, y_center: nil)
34
63
  # Some parameter documentations has been truncated, see
35
64
  # {Imagekitio::Models::OverlayPosition} for more details.
36
65
  #
66
+ # @param anchor_point [Symbol, Imagekitio::Models::OverlayPosition::AnchorPoint] Sets the anchor point on the base asset from which the overlay offset is calcula
67
+ #
37
68
  # @param focus [Symbol, Imagekitio::Models::OverlayPosition::Focus] Specifies the position of the overlay relative to the parent image or video.
38
69
  #
39
70
  # @param x [Float, String] Specifies the x-coordinate of the top-left corner of the base asset where the ov
40
71
  #
72
+ # @param x_center [Float, String] Specifies the x-coordinate on the base asset where the overlay's center will be
73
+ #
41
74
  # @param y_ [Float, String] Specifies the y-coordinate of the top-left corner of the base asset where the ov
75
+ #
76
+ # @param y_center [Float, String] Specifies the y-coordinate on the base asset where the overlay's center will be
77
+
78
+ # Sets the anchor point on the base asset from which the overlay offset is
79
+ # calculated. The default value is `top_left`. Maps to `lap` in the URL. Can only
80
+ # be used with one or more of `x`, `y`, `xCenter`, or `yCenter`.
81
+ #
82
+ # @see Imagekitio::Models::OverlayPosition#anchor_point
83
+ module AnchorPoint
84
+ extend Imagekitio::Internal::Type::Enum
85
+
86
+ TOP = :top
87
+ LEFT = :left
88
+ RIGHT = :right
89
+ BOTTOM = :bottom
90
+ TOP_LEFT = :top_left
91
+ TOP_RIGHT = :top_right
92
+ BOTTOM_LEFT = :bottom_left
93
+ BOTTOM_RIGHT = :bottom_right
94
+ CENTER = :center
95
+
96
+ # @!method self.values
97
+ # @return [Array<Symbol>]
98
+ end
42
99
 
43
- # Specifies the position of the overlay relative to the parent image or video.
44
- # Maps to `lfo` in the URL.
100
+ # Specifies the position of the overlay relative to the parent image or video. If
101
+ # one or more of `x`, `y`, `xCenter`, or `yCenter` parameters are specified, this
102
+ # parameter is ignored. Maps to `lfo` in the URL.
45
103
  #
46
104
  # @see Imagekitio::Models::OverlayPosition#focus
47
105
  module Focus
@@ -79,6 +137,24 @@ module Imagekitio
79
137
  # @return [Array(Float, String)]
80
138
  end
81
139
 
140
+ # Specifies the x-coordinate on the base asset where the overlay's center will be
141
+ # positioned. It also accepts arithmetic expressions such as `bw_mul_0.4` or
142
+ # `bw_sub_cw`. Maps to `lxc` in the URL. Cannot be used together with `x`, but can
143
+ # be used with `y`. Learn about
144
+ # [Arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations).
145
+ #
146
+ # @see Imagekitio::Models::OverlayPosition#x_center
147
+ module XCenter
148
+ extend Imagekitio::Internal::Type::Union
149
+
150
+ variant Float
151
+
152
+ variant String
153
+
154
+ # @!method self.variants
155
+ # @return [Array(Float, String)]
156
+ end
157
+
82
158
  # Specifies the y-coordinate of the top-left corner of the base asset where the
83
159
  # overlay's top-left corner will be positioned. It also accepts arithmetic
84
160
  # expressions such as `bh_mul_0.4` or `bh_sub_ch`. Maps to `ly` in the URL. Learn
@@ -96,6 +172,24 @@ module Imagekitio
96
172
  # @!method self.variants
97
173
  # @return [Array(Float, String)]
98
174
  end
175
+
176
+ # Specifies the y-coordinate on the base asset where the overlay's center will be
177
+ # positioned. It also accepts arithmetic expressions such as `bh_mul_0.4` or
178
+ # `bh_sub_ch`. Maps to `lyc` in the URL. Cannot be used together with `y`, but can
179
+ # be used with `x`. Learn about
180
+ # [Arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations).
181
+ #
182
+ # @see Imagekitio::Models::OverlayPosition#y_center
183
+ module YCenter
184
+ extend Imagekitio::Internal::Type::Union
185
+
186
+ variant Float
187
+
188
+ variant String
189
+
190
+ # @!method self.variants
191
+ # @return [Array(Float, String)]
192
+ end
99
193
  end
100
194
  end
101
195
  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
- # @!method initialize(request_options: {})
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