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
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Models
|
|
5
|
+
class FileUpdateEvent < Imagekitio::Models::BaseWebhookEvent
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Imagekitio::FileUpdateEvent, Imagekitio::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# Timestamp of when the event occurred in ISO8601 format.
|
|
12
|
+
sig { returns(Time) }
|
|
13
|
+
attr_accessor :created_at
|
|
14
|
+
|
|
15
|
+
# Object containing details of a file or file version.
|
|
16
|
+
sig { returns(Imagekitio::File) }
|
|
17
|
+
attr_reader :data
|
|
18
|
+
|
|
19
|
+
sig { params(data: Imagekitio::File::OrHash).void }
|
|
20
|
+
attr_writer :data
|
|
21
|
+
|
|
22
|
+
# Type of the webhook event.
|
|
23
|
+
sig { returns(Symbol) }
|
|
24
|
+
attr_accessor :type
|
|
25
|
+
|
|
26
|
+
# Triggered when a file is updated.
|
|
27
|
+
sig do
|
|
28
|
+
params(
|
|
29
|
+
created_at: Time,
|
|
30
|
+
data: Imagekitio::File::OrHash,
|
|
31
|
+
type: Symbol
|
|
32
|
+
).returns(T.attached_class)
|
|
33
|
+
end
|
|
34
|
+
def self.new(
|
|
35
|
+
# Timestamp of when the event occurred in ISO8601 format.
|
|
36
|
+
created_at:,
|
|
37
|
+
# Object containing details of a file or file version.
|
|
38
|
+
data:,
|
|
39
|
+
# Type of the webhook event.
|
|
40
|
+
type: :"file.updated"
|
|
41
|
+
)
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
sig do
|
|
45
|
+
override.returns(
|
|
46
|
+
{ created_at: Time, data: Imagekitio::File, type: Symbol }
|
|
47
|
+
)
|
|
48
|
+
end
|
|
49
|
+
def to_hash
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
@@ -12,11 +12,7 @@ module Imagekitio
|
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
# An array of tags assigned to the uploaded file by auto tagging.
|
|
15
|
-
sig
|
|
16
|
-
returns(
|
|
17
|
-
T.nilable(T::Array[Imagekitio::Models::FileUploadResponse::AITag])
|
|
18
|
-
)
|
|
19
|
-
end
|
|
15
|
+
sig { returns(T.nilable(T::Array[Imagekitio::AITag])) }
|
|
20
16
|
attr_accessor :ai_tags
|
|
21
17
|
|
|
22
18
|
# The audio codec used in the video (only for video).
|
|
@@ -171,12 +167,7 @@ module Imagekitio
|
|
|
171
167
|
# about the custom metadata schema.
|
|
172
168
|
sig do
|
|
173
169
|
returns(
|
|
174
|
-
T.nilable(
|
|
175
|
-
T::Hash[
|
|
176
|
-
Symbol,
|
|
177
|
-
Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema
|
|
178
|
-
]
|
|
179
|
-
)
|
|
170
|
+
T.nilable(T::Hash[Symbol, Imagekitio::SelectedFieldsSchemaItem])
|
|
180
171
|
)
|
|
181
172
|
end
|
|
182
173
|
attr_reader :selected_fields_schema
|
|
@@ -184,10 +175,7 @@ module Imagekitio
|
|
|
184
175
|
sig do
|
|
185
176
|
params(
|
|
186
177
|
selected_fields_schema:
|
|
187
|
-
T::Hash[
|
|
188
|
-
Symbol,
|
|
189
|
-
Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::OrHash
|
|
190
|
-
]
|
|
178
|
+
T::Hash[Symbol, Imagekitio::SelectedFieldsSchemaItem::OrHash]
|
|
191
179
|
).void
|
|
192
180
|
end
|
|
193
181
|
attr_writer :selected_fields_schema
|
|
@@ -220,17 +208,10 @@ module Imagekitio
|
|
|
220
208
|
attr_writer :url
|
|
221
209
|
|
|
222
210
|
# An object containing the file or file version's `id` (versionId) and `name`.
|
|
223
|
-
sig
|
|
224
|
-
returns(T.nilable(Imagekitio::Models::FileUploadResponse::VersionInfo))
|
|
225
|
-
end
|
|
211
|
+
sig { returns(T.nilable(Imagekitio::VersionInfo)) }
|
|
226
212
|
attr_reader :version_info
|
|
227
213
|
|
|
228
|
-
sig
|
|
229
|
-
params(
|
|
230
|
-
version_info:
|
|
231
|
-
Imagekitio::Models::FileUploadResponse::VersionInfo::OrHash
|
|
232
|
-
).void
|
|
233
|
-
end
|
|
214
|
+
sig { params(version_info: Imagekitio::VersionInfo::OrHash).void }
|
|
234
215
|
attr_writer :version_info
|
|
235
216
|
|
|
236
217
|
# The video codec used in the video (only for video).
|
|
@@ -250,10 +231,7 @@ module Imagekitio
|
|
|
250
231
|
# Object containing details of a successful upload.
|
|
251
232
|
sig do
|
|
252
233
|
params(
|
|
253
|
-
ai_tags:
|
|
254
|
-
T.nilable(
|
|
255
|
-
T::Array[Imagekitio::Models::FileUploadResponse::AITag::OrHash]
|
|
256
|
-
),
|
|
234
|
+
ai_tags: T.nilable(T::Array[Imagekitio::AITag::OrHash]),
|
|
257
235
|
audio_codec: String,
|
|
258
236
|
bit_rate: Integer,
|
|
259
237
|
custom_coordinates: T.nilable(String),
|
|
@@ -272,16 +250,12 @@ module Imagekitio
|
|
|
272
250
|
metadata: Imagekitio::Metadata::OrHash,
|
|
273
251
|
name: String,
|
|
274
252
|
selected_fields_schema:
|
|
275
|
-
T::Hash[
|
|
276
|
-
Symbol,
|
|
277
|
-
Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::OrHash
|
|
278
|
-
],
|
|
253
|
+
T::Hash[Symbol, Imagekitio::SelectedFieldsSchemaItem::OrHash],
|
|
279
254
|
size: Float,
|
|
280
255
|
tags: T.nilable(T::Array[String]),
|
|
281
256
|
thumbnail_url: String,
|
|
282
257
|
url: String,
|
|
283
|
-
version_info:
|
|
284
|
-
Imagekitio::Models::FileUploadResponse::VersionInfo::OrHash,
|
|
258
|
+
version_info: Imagekitio::VersionInfo::OrHash,
|
|
285
259
|
video_codec: String,
|
|
286
260
|
width: Float
|
|
287
261
|
).returns(T.attached_class)
|
|
@@ -376,10 +350,7 @@ module Imagekitio
|
|
|
376
350
|
sig do
|
|
377
351
|
override.returns(
|
|
378
352
|
{
|
|
379
|
-
ai_tags:
|
|
380
|
-
T.nilable(
|
|
381
|
-
T::Array[Imagekitio::Models::FileUploadResponse::AITag]
|
|
382
|
-
),
|
|
353
|
+
ai_tags: T.nilable(T::Array[Imagekitio::AITag]),
|
|
383
354
|
audio_codec: String,
|
|
384
355
|
bit_rate: Integer,
|
|
385
356
|
custom_coordinates: T.nilable(String),
|
|
@@ -398,15 +369,12 @@ module Imagekitio
|
|
|
398
369
|
metadata: Imagekitio::Metadata,
|
|
399
370
|
name: String,
|
|
400
371
|
selected_fields_schema:
|
|
401
|
-
T::Hash[
|
|
402
|
-
Symbol,
|
|
403
|
-
Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema
|
|
404
|
-
],
|
|
372
|
+
T::Hash[Symbol, Imagekitio::SelectedFieldsSchemaItem],
|
|
405
373
|
size: Float,
|
|
406
374
|
tags: T.nilable(T::Array[String]),
|
|
407
375
|
thumbnail_url: String,
|
|
408
376
|
url: String,
|
|
409
|
-
version_info: Imagekitio::
|
|
377
|
+
version_info: Imagekitio::VersionInfo,
|
|
410
378
|
video_codec: String,
|
|
411
379
|
width: Float
|
|
412
380
|
}
|
|
@@ -415,62 +383,6 @@ module Imagekitio
|
|
|
415
383
|
def to_hash
|
|
416
384
|
end
|
|
417
385
|
|
|
418
|
-
class AITag < Imagekitio::Internal::Type::BaseModel
|
|
419
|
-
OrHash =
|
|
420
|
-
T.type_alias do
|
|
421
|
-
T.any(
|
|
422
|
-
Imagekitio::Models::FileUploadResponse::AITag,
|
|
423
|
-
Imagekitio::Internal::AnyHash
|
|
424
|
-
)
|
|
425
|
-
end
|
|
426
|
-
|
|
427
|
-
# Confidence score of the tag.
|
|
428
|
-
sig { returns(T.nilable(Float)) }
|
|
429
|
-
attr_reader :confidence
|
|
430
|
-
|
|
431
|
-
sig { params(confidence: Float).void }
|
|
432
|
-
attr_writer :confidence
|
|
433
|
-
|
|
434
|
-
# Name of the tag.
|
|
435
|
-
sig { returns(T.nilable(String)) }
|
|
436
|
-
attr_reader :name
|
|
437
|
-
|
|
438
|
-
sig { params(name: String).void }
|
|
439
|
-
attr_writer :name
|
|
440
|
-
|
|
441
|
-
# Array of `AITags` associated with the image. If no `AITags` are set, it will be
|
|
442
|
-
# null. These tags can be added using the `google-auto-tagging` or
|
|
443
|
-
# `aws-auto-tagging` extensions.
|
|
444
|
-
sig { returns(T.nilable(String)) }
|
|
445
|
-
attr_reader :source
|
|
446
|
-
|
|
447
|
-
sig { params(source: String).void }
|
|
448
|
-
attr_writer :source
|
|
449
|
-
|
|
450
|
-
sig do
|
|
451
|
-
params(confidence: Float, name: String, source: String).returns(
|
|
452
|
-
T.attached_class
|
|
453
|
-
)
|
|
454
|
-
end
|
|
455
|
-
def self.new(
|
|
456
|
-
# Confidence score of the tag.
|
|
457
|
-
confidence: nil,
|
|
458
|
-
# Name of the tag.
|
|
459
|
-
name: nil,
|
|
460
|
-
# Array of `AITags` associated with the image. If no `AITags` are set, it will be
|
|
461
|
-
# null. These tags can be added using the `google-auto-tagging` or
|
|
462
|
-
# `aws-auto-tagging` extensions.
|
|
463
|
-
source: nil
|
|
464
|
-
)
|
|
465
|
-
end
|
|
466
|
-
|
|
467
|
-
sig do
|
|
468
|
-
override.returns({ confidence: Float, name: String, source: String })
|
|
469
|
-
end
|
|
470
|
-
def to_hash
|
|
471
|
-
end
|
|
472
|
-
end
|
|
473
|
-
|
|
474
386
|
class ExtensionStatus < Imagekitio::Internal::Type::BaseModel
|
|
475
387
|
OrHash =
|
|
476
388
|
T.type_alias do
|
|
@@ -811,427 +723,6 @@ module Imagekitio
|
|
|
811
723
|
end
|
|
812
724
|
end
|
|
813
725
|
end
|
|
814
|
-
|
|
815
|
-
class SelectedFieldsSchema < Imagekitio::Internal::Type::BaseModel
|
|
816
|
-
OrHash =
|
|
817
|
-
T.type_alias do
|
|
818
|
-
T.any(
|
|
819
|
-
Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema,
|
|
820
|
-
Imagekitio::Internal::AnyHash
|
|
821
|
-
)
|
|
822
|
-
end
|
|
823
|
-
|
|
824
|
-
# Type of the custom metadata field.
|
|
825
|
-
sig do
|
|
826
|
-
returns(
|
|
827
|
-
Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::Type::TaggedSymbol
|
|
828
|
-
)
|
|
829
|
-
end
|
|
830
|
-
attr_accessor :type
|
|
831
|
-
|
|
832
|
-
# The default value for this custom metadata field. The value should match the
|
|
833
|
-
# `type` of custom metadata field.
|
|
834
|
-
sig do
|
|
835
|
-
returns(
|
|
836
|
-
T.nilable(
|
|
837
|
-
Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::DefaultValue::Variants
|
|
838
|
-
)
|
|
839
|
-
)
|
|
840
|
-
end
|
|
841
|
-
attr_reader :default_value
|
|
842
|
-
|
|
843
|
-
sig do
|
|
844
|
-
params(
|
|
845
|
-
default_value:
|
|
846
|
-
Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::DefaultValue::Variants
|
|
847
|
-
).void
|
|
848
|
-
end
|
|
849
|
-
attr_writer :default_value
|
|
850
|
-
|
|
851
|
-
# Specifies if the custom metadata field is required or not.
|
|
852
|
-
sig { returns(T.nilable(T::Boolean)) }
|
|
853
|
-
attr_reader :is_value_required
|
|
854
|
-
|
|
855
|
-
sig { params(is_value_required: T::Boolean).void }
|
|
856
|
-
attr_writer :is_value_required
|
|
857
|
-
|
|
858
|
-
# Maximum length of string. Only set if `type` is set to `Text` or `Textarea`.
|
|
859
|
-
sig { returns(T.nilable(Float)) }
|
|
860
|
-
attr_reader :max_length
|
|
861
|
-
|
|
862
|
-
sig { params(max_length: Float).void }
|
|
863
|
-
attr_writer :max_length
|
|
864
|
-
|
|
865
|
-
# Maximum value of the field. Only set if field type is `Date` or `Number`. For
|
|
866
|
-
# `Date` type field, the value will be in ISO8601 string format. For `Number` type
|
|
867
|
-
# field, it will be a numeric value.
|
|
868
|
-
sig do
|
|
869
|
-
returns(
|
|
870
|
-
T.nilable(
|
|
871
|
-
Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::MaxValue::Variants
|
|
872
|
-
)
|
|
873
|
-
)
|
|
874
|
-
end
|
|
875
|
-
attr_reader :max_value
|
|
876
|
-
|
|
877
|
-
sig do
|
|
878
|
-
params(
|
|
879
|
-
max_value:
|
|
880
|
-
Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::MaxValue::Variants
|
|
881
|
-
).void
|
|
882
|
-
end
|
|
883
|
-
attr_writer :max_value
|
|
884
|
-
|
|
885
|
-
# Minimum length of string. Only set if `type` is set to `Text` or `Textarea`.
|
|
886
|
-
sig { returns(T.nilable(Float)) }
|
|
887
|
-
attr_reader :min_length
|
|
888
|
-
|
|
889
|
-
sig { params(min_length: Float).void }
|
|
890
|
-
attr_writer :min_length
|
|
891
|
-
|
|
892
|
-
# Minimum value of the field. Only set if field type is `Date` or `Number`. For
|
|
893
|
-
# `Date` type field, the value will be in ISO8601 string format. For `Number` type
|
|
894
|
-
# field, it will be a numeric value.
|
|
895
|
-
sig do
|
|
896
|
-
returns(
|
|
897
|
-
T.nilable(
|
|
898
|
-
Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::MinValue::Variants
|
|
899
|
-
)
|
|
900
|
-
)
|
|
901
|
-
end
|
|
902
|
-
attr_reader :min_value
|
|
903
|
-
|
|
904
|
-
sig do
|
|
905
|
-
params(
|
|
906
|
-
min_value:
|
|
907
|
-
Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::MinValue::Variants
|
|
908
|
-
).void
|
|
909
|
-
end
|
|
910
|
-
attr_writer :min_value
|
|
911
|
-
|
|
912
|
-
# Indicates whether the custom metadata field is read only. A read only field
|
|
913
|
-
# cannot be modified after being set. This field is configurable only via the
|
|
914
|
-
# **Path policy** feature.
|
|
915
|
-
sig { returns(T.nilable(T::Boolean)) }
|
|
916
|
-
attr_reader :read_only
|
|
917
|
-
|
|
918
|
-
sig { params(read_only: T::Boolean).void }
|
|
919
|
-
attr_writer :read_only
|
|
920
|
-
|
|
921
|
-
# An array of allowed values when field type is `SingleSelect` or `MultiSelect`.
|
|
922
|
-
sig do
|
|
923
|
-
returns(
|
|
924
|
-
T.nilable(
|
|
925
|
-
T::Array[
|
|
926
|
-
Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::SelectOption::Variants
|
|
927
|
-
]
|
|
928
|
-
)
|
|
929
|
-
)
|
|
930
|
-
end
|
|
931
|
-
attr_reader :select_options
|
|
932
|
-
|
|
933
|
-
sig do
|
|
934
|
-
params(
|
|
935
|
-
select_options:
|
|
936
|
-
T::Array[
|
|
937
|
-
Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::SelectOption::Variants
|
|
938
|
-
]
|
|
939
|
-
).void
|
|
940
|
-
end
|
|
941
|
-
attr_writer :select_options
|
|
942
|
-
|
|
943
|
-
# Specifies if the selectOptions array is truncated. It is truncated when number
|
|
944
|
-
# of options are > 100.
|
|
945
|
-
sig { returns(T.nilable(T::Boolean)) }
|
|
946
|
-
attr_reader :select_options_truncated
|
|
947
|
-
|
|
948
|
-
sig { params(select_options_truncated: T::Boolean).void }
|
|
949
|
-
attr_writer :select_options_truncated
|
|
950
|
-
|
|
951
|
-
sig do
|
|
952
|
-
params(
|
|
953
|
-
type:
|
|
954
|
-
Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::Type::OrSymbol,
|
|
955
|
-
default_value:
|
|
956
|
-
Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::DefaultValue::Variants,
|
|
957
|
-
is_value_required: T::Boolean,
|
|
958
|
-
max_length: Float,
|
|
959
|
-
max_value:
|
|
960
|
-
Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::MaxValue::Variants,
|
|
961
|
-
min_length: Float,
|
|
962
|
-
min_value:
|
|
963
|
-
Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::MinValue::Variants,
|
|
964
|
-
read_only: T::Boolean,
|
|
965
|
-
select_options:
|
|
966
|
-
T::Array[
|
|
967
|
-
Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::SelectOption::Variants
|
|
968
|
-
],
|
|
969
|
-
select_options_truncated: T::Boolean
|
|
970
|
-
).returns(T.attached_class)
|
|
971
|
-
end
|
|
972
|
-
def self.new(
|
|
973
|
-
# Type of the custom metadata field.
|
|
974
|
-
type:,
|
|
975
|
-
# The default value for this custom metadata field. The value should match the
|
|
976
|
-
# `type` of custom metadata field.
|
|
977
|
-
default_value: nil,
|
|
978
|
-
# Specifies if the custom metadata field is required or not.
|
|
979
|
-
is_value_required: nil,
|
|
980
|
-
# Maximum length of string. Only set if `type` is set to `Text` or `Textarea`.
|
|
981
|
-
max_length: nil,
|
|
982
|
-
# Maximum value of the field. Only set if field type is `Date` or `Number`. For
|
|
983
|
-
# `Date` type field, the value will be in ISO8601 string format. For `Number` type
|
|
984
|
-
# field, it will be a numeric value.
|
|
985
|
-
max_value: nil,
|
|
986
|
-
# Minimum length of string. Only set if `type` is set to `Text` or `Textarea`.
|
|
987
|
-
min_length: nil,
|
|
988
|
-
# Minimum value of the field. Only set if field type is `Date` or `Number`. For
|
|
989
|
-
# `Date` type field, the value will be in ISO8601 string format. For `Number` type
|
|
990
|
-
# field, it will be a numeric value.
|
|
991
|
-
min_value: nil,
|
|
992
|
-
# Indicates whether the custom metadata field is read only. A read only field
|
|
993
|
-
# cannot be modified after being set. This field is configurable only via the
|
|
994
|
-
# **Path policy** feature.
|
|
995
|
-
read_only: nil,
|
|
996
|
-
# An array of allowed values when field type is `SingleSelect` or `MultiSelect`.
|
|
997
|
-
select_options: nil,
|
|
998
|
-
# Specifies if the selectOptions array is truncated. It is truncated when number
|
|
999
|
-
# of options are > 100.
|
|
1000
|
-
select_options_truncated: nil
|
|
1001
|
-
)
|
|
1002
|
-
end
|
|
1003
|
-
|
|
1004
|
-
sig do
|
|
1005
|
-
override.returns(
|
|
1006
|
-
{
|
|
1007
|
-
type:
|
|
1008
|
-
Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::Type::TaggedSymbol,
|
|
1009
|
-
default_value:
|
|
1010
|
-
Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::DefaultValue::Variants,
|
|
1011
|
-
is_value_required: T::Boolean,
|
|
1012
|
-
max_length: Float,
|
|
1013
|
-
max_value:
|
|
1014
|
-
Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::MaxValue::Variants,
|
|
1015
|
-
min_length: Float,
|
|
1016
|
-
min_value:
|
|
1017
|
-
Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::MinValue::Variants,
|
|
1018
|
-
read_only: T::Boolean,
|
|
1019
|
-
select_options:
|
|
1020
|
-
T::Array[
|
|
1021
|
-
Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::SelectOption::Variants
|
|
1022
|
-
],
|
|
1023
|
-
select_options_truncated: T::Boolean
|
|
1024
|
-
}
|
|
1025
|
-
)
|
|
1026
|
-
end
|
|
1027
|
-
def to_hash
|
|
1028
|
-
end
|
|
1029
|
-
|
|
1030
|
-
# Type of the custom metadata field.
|
|
1031
|
-
module Type
|
|
1032
|
-
extend Imagekitio::Internal::Type::Enum
|
|
1033
|
-
|
|
1034
|
-
TaggedSymbol =
|
|
1035
|
-
T.type_alias do
|
|
1036
|
-
T.all(
|
|
1037
|
-
Symbol,
|
|
1038
|
-
Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::Type
|
|
1039
|
-
)
|
|
1040
|
-
end
|
|
1041
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1042
|
-
|
|
1043
|
-
TEXT =
|
|
1044
|
-
T.let(
|
|
1045
|
-
:Text,
|
|
1046
|
-
Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::Type::TaggedSymbol
|
|
1047
|
-
)
|
|
1048
|
-
TEXTAREA =
|
|
1049
|
-
T.let(
|
|
1050
|
-
:Textarea,
|
|
1051
|
-
Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::Type::TaggedSymbol
|
|
1052
|
-
)
|
|
1053
|
-
NUMBER =
|
|
1054
|
-
T.let(
|
|
1055
|
-
:Number,
|
|
1056
|
-
Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::Type::TaggedSymbol
|
|
1057
|
-
)
|
|
1058
|
-
DATE =
|
|
1059
|
-
T.let(
|
|
1060
|
-
:Date,
|
|
1061
|
-
Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::Type::TaggedSymbol
|
|
1062
|
-
)
|
|
1063
|
-
BOOLEAN =
|
|
1064
|
-
T.let(
|
|
1065
|
-
:Boolean,
|
|
1066
|
-
Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::Type::TaggedSymbol
|
|
1067
|
-
)
|
|
1068
|
-
SINGLE_SELECT =
|
|
1069
|
-
T.let(
|
|
1070
|
-
:SingleSelect,
|
|
1071
|
-
Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::Type::TaggedSymbol
|
|
1072
|
-
)
|
|
1073
|
-
MULTI_SELECT =
|
|
1074
|
-
T.let(
|
|
1075
|
-
:MultiSelect,
|
|
1076
|
-
Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::Type::TaggedSymbol
|
|
1077
|
-
)
|
|
1078
|
-
|
|
1079
|
-
sig do
|
|
1080
|
-
override.returns(
|
|
1081
|
-
T::Array[
|
|
1082
|
-
Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::Type::TaggedSymbol
|
|
1083
|
-
]
|
|
1084
|
-
)
|
|
1085
|
-
end
|
|
1086
|
-
def self.values
|
|
1087
|
-
end
|
|
1088
|
-
end
|
|
1089
|
-
|
|
1090
|
-
# The default value for this custom metadata field. The value should match the
|
|
1091
|
-
# `type` of custom metadata field.
|
|
1092
|
-
module DefaultValue
|
|
1093
|
-
extend Imagekitio::Internal::Type::Union
|
|
1094
|
-
|
|
1095
|
-
Variants =
|
|
1096
|
-
T.type_alias do
|
|
1097
|
-
T.any(
|
|
1098
|
-
String,
|
|
1099
|
-
Float,
|
|
1100
|
-
T::Boolean,
|
|
1101
|
-
T::Array[
|
|
1102
|
-
Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::DefaultValue::Mixed::Variants
|
|
1103
|
-
]
|
|
1104
|
-
)
|
|
1105
|
-
end
|
|
1106
|
-
|
|
1107
|
-
module Mixed
|
|
1108
|
-
extend Imagekitio::Internal::Type::Union
|
|
1109
|
-
|
|
1110
|
-
Variants = T.type_alias { T.any(String, Float, T::Boolean) }
|
|
1111
|
-
|
|
1112
|
-
sig do
|
|
1113
|
-
override.returns(
|
|
1114
|
-
T::Array[
|
|
1115
|
-
Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::DefaultValue::Mixed::Variants
|
|
1116
|
-
]
|
|
1117
|
-
)
|
|
1118
|
-
end
|
|
1119
|
-
def self.variants
|
|
1120
|
-
end
|
|
1121
|
-
end
|
|
1122
|
-
|
|
1123
|
-
sig do
|
|
1124
|
-
override.returns(
|
|
1125
|
-
T::Array[
|
|
1126
|
-
Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::DefaultValue::Variants
|
|
1127
|
-
]
|
|
1128
|
-
)
|
|
1129
|
-
end
|
|
1130
|
-
def self.variants
|
|
1131
|
-
end
|
|
1132
|
-
|
|
1133
|
-
MixedArray =
|
|
1134
|
-
T.let(
|
|
1135
|
-
Imagekitio::Internal::Type::ArrayOf[
|
|
1136
|
-
union:
|
|
1137
|
-
Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::DefaultValue::Mixed
|
|
1138
|
-
],
|
|
1139
|
-
Imagekitio::Internal::Type::Converter
|
|
1140
|
-
)
|
|
1141
|
-
end
|
|
1142
|
-
|
|
1143
|
-
# Maximum value of the field. Only set if field type is `Date` or `Number`. For
|
|
1144
|
-
# `Date` type field, the value will be in ISO8601 string format. For `Number` type
|
|
1145
|
-
# field, it will be a numeric value.
|
|
1146
|
-
module MaxValue
|
|
1147
|
-
extend Imagekitio::Internal::Type::Union
|
|
1148
|
-
|
|
1149
|
-
Variants = T.type_alias { T.any(String, Float) }
|
|
1150
|
-
|
|
1151
|
-
sig do
|
|
1152
|
-
override.returns(
|
|
1153
|
-
T::Array[
|
|
1154
|
-
Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::MaxValue::Variants
|
|
1155
|
-
]
|
|
1156
|
-
)
|
|
1157
|
-
end
|
|
1158
|
-
def self.variants
|
|
1159
|
-
end
|
|
1160
|
-
end
|
|
1161
|
-
|
|
1162
|
-
# Minimum value of the field. Only set if field type is `Date` or `Number`. For
|
|
1163
|
-
# `Date` type field, the value will be in ISO8601 string format. For `Number` type
|
|
1164
|
-
# field, it will be a numeric value.
|
|
1165
|
-
module MinValue
|
|
1166
|
-
extend Imagekitio::Internal::Type::Union
|
|
1167
|
-
|
|
1168
|
-
Variants = T.type_alias { T.any(String, Float) }
|
|
1169
|
-
|
|
1170
|
-
sig do
|
|
1171
|
-
override.returns(
|
|
1172
|
-
T::Array[
|
|
1173
|
-
Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::MinValue::Variants
|
|
1174
|
-
]
|
|
1175
|
-
)
|
|
1176
|
-
end
|
|
1177
|
-
def self.variants
|
|
1178
|
-
end
|
|
1179
|
-
end
|
|
1180
|
-
|
|
1181
|
-
module SelectOption
|
|
1182
|
-
extend Imagekitio::Internal::Type::Union
|
|
1183
|
-
|
|
1184
|
-
Variants = T.type_alias { T.any(String, Float, T::Boolean) }
|
|
1185
|
-
|
|
1186
|
-
sig do
|
|
1187
|
-
override.returns(
|
|
1188
|
-
T::Array[
|
|
1189
|
-
Imagekitio::Models::FileUploadResponse::SelectedFieldsSchema::SelectOption::Variants
|
|
1190
|
-
]
|
|
1191
|
-
)
|
|
1192
|
-
end
|
|
1193
|
-
def self.variants
|
|
1194
|
-
end
|
|
1195
|
-
end
|
|
1196
|
-
end
|
|
1197
|
-
|
|
1198
|
-
class VersionInfo < Imagekitio::Internal::Type::BaseModel
|
|
1199
|
-
OrHash =
|
|
1200
|
-
T.type_alias do
|
|
1201
|
-
T.any(
|
|
1202
|
-
Imagekitio::Models::FileUploadResponse::VersionInfo,
|
|
1203
|
-
Imagekitio::Internal::AnyHash
|
|
1204
|
-
)
|
|
1205
|
-
end
|
|
1206
|
-
|
|
1207
|
-
# Unique identifier of the file version.
|
|
1208
|
-
sig { returns(T.nilable(String)) }
|
|
1209
|
-
attr_reader :id
|
|
1210
|
-
|
|
1211
|
-
sig { params(id: String).void }
|
|
1212
|
-
attr_writer :id
|
|
1213
|
-
|
|
1214
|
-
# Name of the file version.
|
|
1215
|
-
sig { returns(T.nilable(String)) }
|
|
1216
|
-
attr_reader :name
|
|
1217
|
-
|
|
1218
|
-
sig { params(name: String).void }
|
|
1219
|
-
attr_writer :name
|
|
1220
|
-
|
|
1221
|
-
# An object containing the file or file version's `id` (versionId) and `name`.
|
|
1222
|
-
sig { params(id: String, name: String).returns(T.attached_class) }
|
|
1223
|
-
def self.new(
|
|
1224
|
-
# Unique identifier of the file version.
|
|
1225
|
-
id: nil,
|
|
1226
|
-
# Name of the file version.
|
|
1227
|
-
name: nil
|
|
1228
|
-
)
|
|
1229
|
-
end
|
|
1230
|
-
|
|
1231
|
-
sig { override.returns({ id: String, name: String }) }
|
|
1232
|
-
def to_hash
|
|
1233
|
-
end
|
|
1234
|
-
end
|
|
1235
726
|
end
|
|
1236
727
|
end
|
|
1237
728
|
end
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Imagekitio
|
|
4
|
+
module Models
|
|
5
|
+
class FileVersionCreateEvent < Imagekitio::Models::BaseWebhookEvent
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
Imagekitio::FileVersionCreateEvent,
|
|
10
|
+
Imagekitio::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Timestamp of when the event occurred in ISO8601 format.
|
|
15
|
+
sig { returns(Time) }
|
|
16
|
+
attr_accessor :created_at
|
|
17
|
+
|
|
18
|
+
# Object containing details of a file or file version.
|
|
19
|
+
sig { returns(Imagekitio::File) }
|
|
20
|
+
attr_reader :data
|
|
21
|
+
|
|
22
|
+
sig { params(data: Imagekitio::File::OrHash).void }
|
|
23
|
+
attr_writer :data
|
|
24
|
+
|
|
25
|
+
# Type of the webhook event.
|
|
26
|
+
sig { returns(Symbol) }
|
|
27
|
+
attr_accessor :type
|
|
28
|
+
|
|
29
|
+
# Triggered when a file version is created.
|
|
30
|
+
sig do
|
|
31
|
+
params(
|
|
32
|
+
created_at: Time,
|
|
33
|
+
data: Imagekitio::File::OrHash,
|
|
34
|
+
type: Symbol
|
|
35
|
+
).returns(T.attached_class)
|
|
36
|
+
end
|
|
37
|
+
def self.new(
|
|
38
|
+
# Timestamp of when the event occurred in ISO8601 format.
|
|
39
|
+
created_at:,
|
|
40
|
+
# Object containing details of a file or file version.
|
|
41
|
+
data:,
|
|
42
|
+
# Type of the webhook event.
|
|
43
|
+
type: :"file-version.created"
|
|
44
|
+
)
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
sig do
|
|
48
|
+
override.returns(
|
|
49
|
+
{ created_at: Time, data: Imagekitio::File, type: Symbol }
|
|
50
|
+
)
|
|
51
|
+
end
|
|
52
|
+
def to_hash
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|