ittybit 0.7.5.2 → 0.8.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 (59) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ittybit/automations/client.rb +149 -87
  3. data/lib/ittybit/automations/types/update_automation_request_status.rb +10 -0
  4. data/lib/ittybit/automations/types/{automations_update_request_trigger_conditions_item.rb → update_automation_request_trigger.rb} +19 -21
  5. data/lib/ittybit/files/client.rb +67 -77
  6. data/lib/ittybit/media/client.rb +78 -34
  7. data/lib/ittybit/signatures/client.rb +20 -24
  8. data/lib/ittybit/signatures/types/signatures_create_request_method.rb +0 -3
  9. data/lib/ittybit/tasks/client.rb +45 -132
  10. data/lib/ittybit/types/automation.rb +19 -29
  11. data/lib/ittybit/types/automation_list_response.rb +15 -2
  12. data/lib/ittybit/types/automation_response.rb +15 -2
  13. data/lib/ittybit/types/automation_status.rb +1 -3
  14. data/lib/ittybit/types/automation_trigger.rb +11 -18
  15. data/lib/ittybit/types/{confirmation_response_data.rb → confirmation.rb} +11 -9
  16. data/lib/ittybit/types/confirmation_response.rb +20 -7
  17. data/lib/ittybit/types/file.rb +64 -68
  18. data/lib/ittybit/types/file_kind.rb +0 -1
  19. data/lib/ittybit/types/file_list_response.rb +15 -2
  20. data/lib/ittybit/types/file_object.rb +0 -1
  21. data/lib/ittybit/types/file_response.rb +15 -2
  22. data/lib/ittybit/types/file_status.rb +0 -1
  23. data/lib/ittybit/types/links.rb +4 -4
  24. data/lib/ittybit/types/links_list.rb +17 -32
  25. data/lib/ittybit/types/media.rb +34 -56
  26. data/lib/ittybit/types/media_kind.rb +0 -1
  27. data/lib/ittybit/types/media_list_response.rb +15 -2
  28. data/lib/ittybit/types/media_response.rb +15 -2
  29. data/lib/ittybit/types/media_source.rb +52 -53
  30. data/lib/ittybit/types/media_source_kind.rb +0 -1
  31. data/lib/ittybit/types/media_source_object.rb +0 -1
  32. data/lib/ittybit/types/media_source_orientation.rb +9 -0
  33. data/lib/ittybit/types/media_source_status.rb +0 -1
  34. data/lib/ittybit/types/meta_list.rb +40 -15
  35. data/lib/ittybit/types/meta_list_type.rb +8 -0
  36. data/lib/ittybit/types/signature.rb +14 -14
  37. data/lib/ittybit/types/signature_response.rb +15 -2
  38. data/lib/ittybit/types/task.rb +30 -50
  39. data/lib/ittybit/types/task_list_response.rb +15 -2
  40. data/lib/ittybit/types/task_response.rb +15 -2
  41. data/lib/ittybit/types/task_status.rb +0 -1
  42. data/lib/ittybit/types/task_summary.rb +20 -20
  43. data/lib/ittybit/types/task_summary_kind.rb +9 -13
  44. data/lib/ittybit/types/task_summary_status.rb +0 -1
  45. data/lib/ittybit/types/workflow_task_step.rb +22 -55
  46. data/lib/ittybit/types/workflow_task_step_kind.rb +8 -14
  47. data/lib/ittybit/types/{error_response.rb → workflow_task_step_next_item.rb} +21 -28
  48. data/lib/ittybit.rb +2 -2
  49. data/lib/requests.rb +8 -8
  50. data/lib/types_export.rb +6 -11
  51. metadata +8 -13
  52. data/lib/ittybit/automations/types/automations_update_request_trigger.rb +0 -75
  53. data/lib/ittybit/files/types/files_delete_response.rb +0 -89
  54. data/lib/ittybit/files/types/files_delete_response_data.rb +0 -60
  55. data/lib/ittybit/tasks/types/tasks_create_request_kind.rb +0 -22
  56. data/lib/ittybit/tasks/types/tasks_list_request_kind.rb +0 -26
  57. data/lib/ittybit/tasks/types/tasks_list_request_status.rb +0 -16
  58. data/lib/ittybit/types/automation_trigger_conditions_item.rb +0 -65
  59. data/lib/ittybit/types/media_urls.rb +0 -70
@@ -2,44 +2,39 @@
2
2
 
3
3
  require_relative "media_kind"
4
4
  require_relative "media_source"
5
- require_relative "media_urls"
6
5
  require "date"
7
6
  require "ostruct"
8
7
  require "json"
9
8
 
10
9
  module Ittybit
11
10
  class Media
12
- # @return [String] Unique identifier for the media item.
11
+ # @return [String]
13
12
  attr_reader :id
14
- # @return [String] Object type, always 'media'.
13
+ # @return [String]
15
14
  attr_reader :object
16
- # @return [Ittybit::MediaKind] The primary kind of the media, derived from the original file.
15
+ # @return [Ittybit::MediaKind]
17
16
  attr_reader :kind
18
- # @return [String] Title of the media item.
17
+ # @return [String]
19
18
  attr_reader :title
20
- # @return [String] Alternative text for the media item.
19
+ # @return [String]
21
20
  attr_reader :alt
22
- # @return [Integer] Width of the primary source in pixels.
21
+ # @return [Integer]
23
22
  attr_reader :width
24
- # @return [Integer] Height of the primary source in pixels.
23
+ # @return [Integer]
25
24
  attr_reader :height
26
- # @return [Float] Duration of the primary source in seconds.
25
+ # @return [Float]
27
26
  attr_reader :duration
28
- # @return [Array<Ittybit::MediaSource>] Array of source files associated with this media item.
27
+ # @return [Array<Ittybit::MediaSource>]
29
28
  attr_reader :files
30
- # @return [Ittybit::MediaUrls] URLs for the media item.
29
+ # @return [Hash{String => Object}]
31
30
  attr_reader :urls
32
- # @return [String] URL of the poster image (video kinds only).
33
- attr_reader :poster
34
- # @return [String] Base64 encoded placeholder image (video/image only).
35
- attr_reader :placeholder
36
- # @return [String] Dominant background color hex code (video/image only).
31
+ # @return [String]
37
32
  attr_reader :background
38
- # @return [Hash{String => Object}] User-defined key-value metadata for the media item.
33
+ # @return [Hash{String => Object}]
39
34
  attr_reader :metadata
40
- # @return [DateTime] Timestamp when the media record was created.
35
+ # @return [DateTime]
41
36
  attr_reader :created
42
- # @return [DateTime] Timestamp when the media item was last updated.
37
+ # @return [DateTime]
43
38
  attr_reader :updated
44
39
  # @return [OpenStruct] Additional properties unmapped to the current class definition
45
40
  attr_reader :additional_properties
@@ -49,29 +44,27 @@ module Ittybit
49
44
 
50
45
  OMIT = Object.new
51
46
 
52
- # @param id [String] Unique identifier for the media item.
53
- # @param object [String] Object type, always 'media'.
54
- # @param kind [Ittybit::MediaKind] The primary kind of the media, derived from the original file.
55
- # @param title [String] Title of the media item.
56
- # @param alt [String] Alternative text for the media item.
57
- # @param width [Integer] Width of the primary source in pixels.
58
- # @param height [Integer] Height of the primary source in pixels.
59
- # @param duration [Float] Duration of the primary source in seconds.
60
- # @param files [Array<Ittybit::MediaSource>] Array of source files associated with this media item.
61
- # @param urls [Ittybit::MediaUrls] URLs for the media item.
62
- # @param poster [String] URL of the poster image (video kinds only).
63
- # @param placeholder [String] Base64 encoded placeholder image (video/image only).
64
- # @param background [String] Dominant background color hex code (video/image only).
65
- # @param metadata [Hash{String => Object}] User-defined key-value metadata for the media item.
66
- # @param created [DateTime] Timestamp when the media record was created.
67
- # @param updated [DateTime] Timestamp when the media item was last updated.
47
+ # @param id [String]
48
+ # @param object [String]
49
+ # @param kind [Ittybit::MediaKind]
50
+ # @param title [String]
51
+ # @param alt [String]
52
+ # @param width [Integer]
53
+ # @param height [Integer]
54
+ # @param duration [Float]
55
+ # @param files [Array<Ittybit::MediaSource>]
56
+ # @param urls [Hash{String => Object}]
57
+ # @param background [String]
58
+ # @param metadata [Hash{String => Object}]
59
+ # @param created [DateTime]
60
+ # @param updated [DateTime]
68
61
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
69
62
  # @return [Ittybit::Media]
70
- def initialize(id:, object:, kind:, files:, urls:, created:, updated:, title: OMIT, alt: OMIT, width: OMIT,
71
- height: OMIT, duration: OMIT, poster: OMIT, placeholder: OMIT, background: OMIT, metadata: OMIT, additional_properties: nil)
63
+ def initialize(id:, object:, files:, urls:, created:, updated:, kind: OMIT, title: OMIT, alt: OMIT, width: OMIT,
64
+ height: OMIT, duration: OMIT, background: OMIT, metadata: OMIT, additional_properties: nil)
72
65
  @id = id
73
66
  @object = object
74
- @kind = kind
67
+ @kind = kind if kind != OMIT
75
68
  @title = title if title != OMIT
76
69
  @alt = alt if alt != OMIT
77
70
  @width = width if width != OMIT
@@ -79,8 +72,6 @@ module Ittybit
79
72
  @duration = duration if duration != OMIT
80
73
  @files = files
81
74
  @urls = urls
82
- @poster = poster if poster != OMIT
83
- @placeholder = placeholder if placeholder != OMIT
84
75
  @background = background if background != OMIT
85
76
  @metadata = metadata if metadata != OMIT
86
77
  @created = created
@@ -97,8 +88,6 @@ module Ittybit
97
88
  "duration": duration,
98
89
  "files": files,
99
90
  "urls": urls,
100
- "poster": poster,
101
- "placeholder": placeholder,
102
91
  "background": background,
103
92
  "metadata": metadata,
104
93
  "created": created,
@@ -127,14 +116,7 @@ module Ittybit
127
116
  item = item.to_json
128
117
  Ittybit::MediaSource.from_json(json_object: item)
129
118
  end
130
- if parsed_json["urls"].nil?
131
- urls = nil
132
- else
133
- urls = parsed_json["urls"].to_json
134
- urls = Ittybit::MediaUrls.from_json(json_object: urls)
135
- end
136
- poster = parsed_json["poster"]
137
- placeholder = parsed_json["placeholder"]
119
+ urls = parsed_json["urls"]
138
120
  background = parsed_json["background"]
139
121
  metadata = parsed_json["metadata"]
140
122
  created = (DateTime.parse(parsed_json["created"]) unless parsed_json["created"].nil?)
@@ -150,8 +132,6 @@ module Ittybit
150
132
  duration: duration,
151
133
  files: files,
152
134
  urls: urls,
153
- poster: poster,
154
- placeholder: placeholder,
155
135
  background: background,
156
136
  metadata: metadata,
157
137
  created: created,
@@ -176,16 +156,14 @@ module Ittybit
176
156
  def self.validate_raw(obj:)
177
157
  obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
178
158
  obj.object.is_a?(String) != false || raise("Passed value for field obj.object is not the expected type, validation failed.")
179
- obj.kind.is_a?(Ittybit::MediaKind) != false || raise("Passed value for field obj.kind is not the expected type, validation failed.")
159
+ obj.kind&.is_a?(Ittybit::MediaKind) != false || raise("Passed value for field obj.kind is not the expected type, validation failed.")
180
160
  obj.title&.is_a?(String) != false || raise("Passed value for field obj.title is not the expected type, validation failed.")
181
161
  obj.alt&.is_a?(String) != false || raise("Passed value for field obj.alt is not the expected type, validation failed.")
182
162
  obj.width&.is_a?(Integer) != false || raise("Passed value for field obj.width is not the expected type, validation failed.")
183
163
  obj.height&.is_a?(Integer) != false || raise("Passed value for field obj.height is not the expected type, validation failed.")
184
164
  obj.duration&.is_a?(Float) != false || raise("Passed value for field obj.duration is not the expected type, validation failed.")
185
165
  obj.files.is_a?(Array) != false || raise("Passed value for field obj.files is not the expected type, validation failed.")
186
- Ittybit::MediaUrls.validate_raw(obj: obj.urls)
187
- obj.poster&.is_a?(String) != false || raise("Passed value for field obj.poster is not the expected type, validation failed.")
188
- obj.placeholder&.is_a?(String) != false || raise("Passed value for field obj.placeholder is not the expected type, validation failed.")
166
+ obj.urls.is_a?(Hash) != false || raise("Passed value for field obj.urls is not the expected type, validation failed.")
189
167
  obj.background&.is_a?(String) != false || raise("Passed value for field obj.background is not the expected type, validation failed.")
190
168
  obj.metadata&.is_a?(Hash) != false || raise("Passed value for field obj.metadata is not the expected type, validation failed.")
191
169
  obj.created.is_a?(DateTime) != false || raise("Passed value for field obj.created is not the expected type, validation failed.")
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ittybit
4
- # The primary kind of the media, derived from the original file.
5
4
  class MediaKind
6
5
  VIDEO = "video"
7
6
  IMAGE = "image"
@@ -2,6 +2,7 @@
2
2
 
3
3
  require_relative "meta_list"
4
4
  require_relative "media"
5
+ require_relative "error"
5
6
  require_relative "links_list"
6
7
  require "ostruct"
7
8
  require "json"
@@ -12,6 +13,8 @@ module Ittybit
12
13
  attr_reader :meta
13
14
  # @return [Array<Ittybit::Media>]
14
15
  attr_reader :data
16
+ # @return [Ittybit::Error]
17
+ attr_reader :error
15
18
  # @return [Ittybit::LinksList]
16
19
  attr_reader :links
17
20
  # @return [OpenStruct] Additional properties unmapped to the current class definition
@@ -24,15 +27,17 @@ module Ittybit
24
27
 
25
28
  # @param meta [Ittybit::MetaList]
26
29
  # @param data [Array<Ittybit::Media>]
30
+ # @param error [Ittybit::Error]
27
31
  # @param links [Ittybit::LinksList]
28
32
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
29
33
  # @return [Ittybit::MediaListResponse]
30
- def initialize(meta: OMIT, data: OMIT, links: OMIT, additional_properties: nil)
34
+ def initialize(meta: OMIT, data: OMIT, error: OMIT, links: OMIT, additional_properties: nil)
31
35
  @meta = meta if meta != OMIT
32
36
  @data = data if data != OMIT
37
+ @error = error if error != OMIT
33
38
  @links = links if links != OMIT
34
39
  @additional_properties = additional_properties
35
- @_field_set = { "meta": meta, "data": data, "links": links }.reject do |_k, v|
40
+ @_field_set = { "meta": meta, "data": data, "error": error, "links": links }.reject do |_k, v|
36
41
  v == OMIT
37
42
  end
38
43
  end
@@ -54,6 +59,12 @@ module Ittybit
54
59
  item = item.to_json
55
60
  Ittybit::Media.from_json(json_object: item)
56
61
  end
62
+ if parsed_json["error"].nil?
63
+ error = nil
64
+ else
65
+ error = parsed_json["error"].to_json
66
+ error = Ittybit::Error.from_json(json_object: error)
67
+ end
57
68
  if parsed_json["links"].nil?
58
69
  links = nil
59
70
  else
@@ -63,6 +74,7 @@ module Ittybit
63
74
  new(
64
75
  meta: meta,
65
76
  data: data,
77
+ error: error,
66
78
  links: links,
67
79
  additional_properties: struct
68
80
  )
@@ -84,6 +96,7 @@ module Ittybit
84
96
  def self.validate_raw(obj:)
85
97
  obj.meta.nil? || Ittybit::MetaList.validate_raw(obj: obj.meta)
86
98
  obj.data&.is_a?(Array) != false || raise("Passed value for field obj.data is not the expected type, validation failed.")
99
+ obj.error.nil? || Ittybit::Error.validate_raw(obj: obj.error)
87
100
  obj.links.nil? || Ittybit::LinksList.validate_raw(obj: obj.links)
88
101
  end
89
102
  end
@@ -2,6 +2,7 @@
2
2
 
3
3
  require_relative "meta"
4
4
  require_relative "media"
5
+ require_relative "error"
5
6
  require_relative "links"
6
7
  require "ostruct"
7
8
  require "json"
@@ -12,6 +13,8 @@ module Ittybit
12
13
  attr_reader :meta
13
14
  # @return [Ittybit::Media]
14
15
  attr_reader :data
16
+ # @return [Ittybit::Error]
17
+ attr_reader :error
15
18
  # @return [Ittybit::Links]
16
19
  attr_reader :links
17
20
  # @return [OpenStruct] Additional properties unmapped to the current class definition
@@ -24,15 +27,17 @@ module Ittybit
24
27
 
25
28
  # @param meta [Ittybit::META]
26
29
  # @param data [Ittybit::Media]
30
+ # @param error [Ittybit::Error]
27
31
  # @param links [Ittybit::Links]
28
32
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
29
33
  # @return [Ittybit::MediaResponse]
30
- def initialize(meta: OMIT, data: OMIT, links: OMIT, additional_properties: nil)
34
+ def initialize(meta: OMIT, data: OMIT, error: OMIT, links: OMIT, additional_properties: nil)
31
35
  @meta = meta if meta != OMIT
32
36
  @data = data if data != OMIT
37
+ @error = error if error != OMIT
33
38
  @links = links if links != OMIT
34
39
  @additional_properties = additional_properties
35
- @_field_set = { "meta": meta, "data": data, "links": links }.reject do |_k, v|
40
+ @_field_set = { "meta": meta, "data": data, "error": error, "links": links }.reject do |_k, v|
36
41
  v == OMIT
37
42
  end
38
43
  end
@@ -51,6 +56,12 @@ module Ittybit
51
56
  data = parsed_json["data"].to_json
52
57
  data = Ittybit::Media.from_json(json_object: data)
53
58
  end
59
+ if parsed_json["error"].nil?
60
+ error = nil
61
+ else
62
+ error = parsed_json["error"].to_json
63
+ error = Ittybit::Error.from_json(json_object: error)
64
+ end
54
65
  if parsed_json["links"].nil?
55
66
  links = nil
56
67
  else
@@ -60,6 +71,7 @@ module Ittybit
60
71
  new(
61
72
  meta: meta,
62
73
  data: data,
74
+ error: error,
63
75
  links: links,
64
76
  additional_properties: struct
65
77
  )
@@ -81,6 +93,7 @@ module Ittybit
81
93
  def self.validate_raw(obj:)
82
94
  obj.meta&.is_a?(Object) != false || raise("Passed value for field obj.meta is not the expected type, validation failed.")
83
95
  obj.data.nil? || Ittybit::Media.validate_raw(obj: obj.data)
96
+ obj.error.nil? || Ittybit::Error.validate_raw(obj: obj.error)
84
97
  obj.links.nil? || Ittybit::Links.validate_raw(obj: obj.links)
85
98
  end
86
99
  end
@@ -2,6 +2,7 @@
2
2
 
3
3
  require_relative "media_source_object"
4
4
  require_relative "media_source_kind"
5
+ require_relative "media_source_orientation"
5
6
  require "date"
6
7
  require_relative "media_source_status"
7
8
  require "ostruct"
@@ -9,56 +10,55 @@ require "json"
9
10
 
10
11
  module Ittybit
11
12
  class MediaSource
12
- # @return [String] Unique identifier for the file.
13
+ # @return [String]
13
14
  attr_reader :id
14
- # @return [Ittybit::MediaSourceObject] Object type
15
+ # @return [Ittybit::MediaSourceObject]
15
16
  attr_reader :object
16
- # @return [Ittybit::MediaSourceKind] The general type of media.
17
+ # @return [Ittybit::MediaSourceKind]
17
18
  attr_reader :kind
18
- # @return [String] MIME type.
19
+ # @return [String]
19
20
  attr_reader :type
20
- # @return [String] Codec of the file.
21
+ # @return [String]
21
22
  attr_reader :codec
22
- # @return [String] Container of the file.
23
+ # @return [String]
23
24
  attr_reader :container
24
- # @return [Integer] Width in pixels (for image/video).
25
+ # @return [Integer]
25
26
  attr_reader :width
26
- # @return [Integer] Height in pixels (for image/video).
27
+ # @return [Integer]
27
28
  attr_reader :height
28
- # @return [String] Orientation of the file.
29
+ # @return [Ittybit::MediaSourceOrientation]
29
30
  attr_reader :orientation
30
- # @return [Float] Rotation value for image files with embedded EXIF data.
31
+ # @return [Float]
31
32
  attr_reader :rotation
32
- # @return [Boolean] Indicates if the file has alpha channel.
33
+ # @return [Boolean]
33
34
  attr_reader :transparency
34
- # @return [Integer] Number of frames in the file.
35
+ # @return [Integer]
35
36
  attr_reader :frames
36
- # @return [Float] Duration in seconds (for audio/video).
37
+ # @return [Float]
37
38
  attr_reader :duration
38
- # @return [Float] Frames per second (for video).
39
+ # @return [Float]
39
40
  attr_reader :fps
40
- # @return [Integer] File size in bytes.
41
+ # @return [Integer]
41
42
  attr_reader :filesize
42
- # @return [Integer] Bitrate for audio/video files.
43
+ # @return [Integer]
43
44
  attr_reader :bitrate
44
- # @return [String] Optional reference value. If set, the file URL will be included in the parent
45
- # media `urls` object.
45
+ # @return [String]
46
46
  attr_reader :ref
47
- # @return [String] The folder path where the file is stored.
47
+ # @return [String]
48
48
  attr_reader :folder
49
- # @return [String] The name of the file.
49
+ # @return [String]
50
50
  attr_reader :filename
51
- # @return [String] Publicly accessible URL for the file.
51
+ # @return [String]
52
52
  attr_reader :url
53
- # @return [Hash{String => Object}] User-defined key-value metadata.
53
+ # @return [Hash{String => Object}]
54
54
  attr_reader :metadata
55
- # @return [Boolean] Indicates this is the original file rather than a variant.
55
+ # @return [Boolean]
56
56
  attr_reader :original
57
- # @return [DateTime] Timestamp when the file record was created.
57
+ # @return [DateTime]
58
58
  attr_reader :created
59
- # @return [DateTime] Timestamp when the file record was last updated.
59
+ # @return [DateTime]
60
60
  attr_reader :updated
61
- # @return [Ittybit::MediaSourceStatus] Processing status of the file.
61
+ # @return [Ittybit::MediaSourceStatus]
62
62
  attr_reader :status
63
63
  # @return [OpenStruct] Additional properties unmapped to the current class definition
64
64
  attr_reader :additional_properties
@@ -68,32 +68,31 @@ module Ittybit
68
68
 
69
69
  OMIT = Object.new
70
70
 
71
- # @param id [String] Unique identifier for the file.
72
- # @param object [Ittybit::MediaSourceObject] Object type
73
- # @param kind [Ittybit::MediaSourceKind] The general type of media.
74
- # @param type [String] MIME type.
75
- # @param codec [String] Codec of the file.
76
- # @param container [String] Container of the file.
77
- # @param width [Integer] Width in pixels (for image/video).
78
- # @param height [Integer] Height in pixels (for image/video).
79
- # @param orientation [String] Orientation of the file.
80
- # @param rotation [Float] Rotation value for image files with embedded EXIF data.
81
- # @param transparency [Boolean] Indicates if the file has alpha channel.
82
- # @param frames [Integer] Number of frames in the file.
83
- # @param duration [Float] Duration in seconds (for audio/video).
84
- # @param fps [Float] Frames per second (for video).
85
- # @param filesize [Integer] File size in bytes.
86
- # @param bitrate [Integer] Bitrate for audio/video files.
87
- # @param ref [String] Optional reference value. If set, the file URL will be included in the parent
88
- # media `urls` object.
89
- # @param folder [String] The folder path where the file is stored.
90
- # @param filename [String] The name of the file.
91
- # @param url [String] Publicly accessible URL for the file.
92
- # @param metadata [Hash{String => Object}] User-defined key-value metadata.
93
- # @param original [Boolean] Indicates this is the original file rather than a variant.
94
- # @param created [DateTime] Timestamp when the file record was created.
95
- # @param updated [DateTime] Timestamp when the file record was last updated.
96
- # @param status [Ittybit::MediaSourceStatus] Processing status of the file.
71
+ # @param id [String]
72
+ # @param object [Ittybit::MediaSourceObject]
73
+ # @param kind [Ittybit::MediaSourceKind]
74
+ # @param type [String]
75
+ # @param codec [String]
76
+ # @param container [String]
77
+ # @param width [Integer]
78
+ # @param height [Integer]
79
+ # @param orientation [Ittybit::MediaSourceOrientation]
80
+ # @param rotation [Float]
81
+ # @param transparency [Boolean]
82
+ # @param frames [Integer]
83
+ # @param duration [Float]
84
+ # @param fps [Float]
85
+ # @param filesize [Integer]
86
+ # @param bitrate [Integer]
87
+ # @param ref [String]
88
+ # @param folder [String]
89
+ # @param filename [String]
90
+ # @param url [String]
91
+ # @param metadata [Hash{String => Object}]
92
+ # @param original [Boolean]
93
+ # @param created [DateTime]
94
+ # @param updated [DateTime]
95
+ # @param status [Ittybit::MediaSourceStatus]
97
96
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
98
97
  # @return [Ittybit::MediaSource]
99
98
  def initialize(id:, object:, kind:, type:, filesize:, url:, created:, updated:, status:, codec: OMIT, container: OMIT, width: OMIT, height: OMIT,
@@ -239,7 +238,7 @@ module Ittybit
239
238
  obj.container&.is_a?(String) != false || raise("Passed value for field obj.container is not the expected type, validation failed.")
240
239
  obj.width&.is_a?(Integer) != false || raise("Passed value for field obj.width is not the expected type, validation failed.")
241
240
  obj.height&.is_a?(Integer) != false || raise("Passed value for field obj.height is not the expected type, validation failed.")
242
- obj.orientation&.is_a?(String) != false || raise("Passed value for field obj.orientation is not the expected type, validation failed.")
241
+ obj.orientation&.is_a?(Ittybit::MediaSourceOrientation) != false || raise("Passed value for field obj.orientation is not the expected type, validation failed.")
243
242
  obj.rotation&.is_a?(Float) != false || raise("Passed value for field obj.rotation is not the expected type, validation failed.")
244
243
  obj.transparency&.is_a?(Boolean) != false || raise("Passed value for field obj.transparency is not the expected type, validation failed.")
245
244
  obj.frames&.is_a?(Integer) != false || raise("Passed value for field obj.frames is not the expected type, validation failed.")
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ittybit
4
- # The general type of media.
5
4
  class MediaSourceKind
6
5
  VIDEO = "video"
7
6
  IMAGE = "image"
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ittybit
4
- # Object type
5
4
  class MediaSourceObject
6
5
  SOURCE = "source"
7
6
  TRACK = "track"
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Ittybit
4
+ class MediaSourceOrientation
5
+ LANDSCAPE = "landscape"
6
+ PORTRAIT = "portrait"
7
+ SQUARE = "square"
8
+ end
9
+ end
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ittybit
4
- # Processing status of the file.
5
4
  class MediaSourceStatus
6
5
  WAITING = "waiting"
7
6
  PROCESSING = "processing"
@@ -1,21 +1,28 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require_relative "meta_list_type"
3
4
  require "ostruct"
4
5
  require "json"
5
6
 
6
7
  module Ittybit
7
8
  class MetaList
8
- # @return [String] Request ID
9
+ # @return [String]
9
10
  attr_reader :request_id
10
- # @return [String] Type of the primary data value in the response
11
+ # @return [String]
12
+ attr_reader :org_id
13
+ # @return [String]
14
+ attr_reader :project_id
15
+ # @return [String]
16
+ attr_reader :version
17
+ # @return [Ittybit::MetaListType]
11
18
  attr_reader :type
12
- # @return [Integer] Number of items per page.
19
+ # @return [Integer]
13
20
  attr_reader :limit
14
- # @return [Integer] Total number of items matching the query.
21
+ # @return [Integer]
15
22
  attr_reader :total
16
- # @return [Integer] Current page number.
23
+ # @return [Integer]
17
24
  attr_reader :page
18
- # @return [Integer] Total number of pages.
25
+ # @return [Integer]
19
26
  attr_reader :pages
20
27
  # @return [OpenStruct] Additional properties unmapped to the current class definition
21
28
  attr_reader :additional_properties
@@ -25,17 +32,23 @@ module Ittybit
25
32
 
26
33
  OMIT = Object.new
27
34
 
28
- # @param request_id [String] Request ID
29
- # @param type [String] Type of the primary data value in the response
30
- # @param limit [Integer] Number of items per page.
31
- # @param total [Integer] Total number of items matching the query.
32
- # @param page [Integer] Current page number.
33
- # @param pages [Integer] Total number of pages.
35
+ # @param request_id [String]
36
+ # @param org_id [String]
37
+ # @param project_id [String]
38
+ # @param version [String]
39
+ # @param type [Ittybit::MetaListType]
40
+ # @param limit [Integer]
41
+ # @param total [Integer]
42
+ # @param page [Integer]
43
+ # @param pages [Integer]
34
44
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
35
45
  # @return [Ittybit::MetaList]
36
- def initialize(request_id: OMIT, type: OMIT, limit: OMIT, total: OMIT, page: OMIT, pages: OMIT,
37
- additional_properties: nil)
46
+ def initialize(request_id: OMIT, org_id: OMIT, project_id: OMIT, version: OMIT, type: OMIT, limit: OMIT,
47
+ total: OMIT, page: OMIT, pages: OMIT, additional_properties: nil)
38
48
  @request_id = request_id if request_id != OMIT
49
+ @org_id = org_id if org_id != OMIT
50
+ @project_id = project_id if project_id != OMIT
51
+ @version = version if version != OMIT
39
52
  @type = type if type != OMIT
40
53
  @limit = limit if limit != OMIT
41
54
  @total = total if total != OMIT
@@ -44,6 +57,9 @@ module Ittybit
44
57
  @additional_properties = additional_properties
45
58
  @_field_set = {
46
59
  "request_id": request_id,
60
+ "org_id": org_id,
61
+ "project_id": project_id,
62
+ "version": version,
47
63
  "type": type,
48
64
  "limit": limit,
49
65
  "total": total,
@@ -62,6 +78,9 @@ module Ittybit
62
78
  struct = JSON.parse(json_object, object_class: OpenStruct)
63
79
  parsed_json = JSON.parse(json_object)
64
80
  request_id = parsed_json["request_id"]
81
+ org_id = parsed_json["org_id"]
82
+ project_id = parsed_json["project_id"]
83
+ version = parsed_json["version"]
65
84
  type = parsed_json["type"]
66
85
  limit = parsed_json["limit"]
67
86
  total = parsed_json["total"]
@@ -69,6 +88,9 @@ module Ittybit
69
88
  pages = parsed_json["pages"]
70
89
  new(
71
90
  request_id: request_id,
91
+ org_id: org_id,
92
+ project_id: project_id,
93
+ version: version,
72
94
  type: type,
73
95
  limit: limit,
74
96
  total: total,
@@ -93,7 +115,10 @@ module Ittybit
93
115
  # @return [Void]
94
116
  def self.validate_raw(obj:)
95
117
  obj.request_id&.is_a?(String) != false || raise("Passed value for field obj.request_id is not the expected type, validation failed.")
96
- obj.type&.is_a?(String) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
118
+ obj.org_id&.is_a?(String) != false || raise("Passed value for field obj.org_id is not the expected type, validation failed.")
119
+ obj.project_id&.is_a?(String) != false || raise("Passed value for field obj.project_id is not the expected type, validation failed.")
120
+ obj.version&.is_a?(String) != false || raise("Passed value for field obj.version is not the expected type, validation failed.")
121
+ obj.type&.is_a?(Ittybit::MetaListType) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
97
122
  obj.limit&.is_a?(Integer) != false || raise("Passed value for field obj.limit is not the expected type, validation failed.")
98
123
  obj.total&.is_a?(Integer) != false || raise("Passed value for field obj.total is not the expected type, validation failed.")
99
124
  obj.page&.is_a?(Integer) != false || raise("Passed value for field obj.page is not the expected type, validation failed.")
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Ittybit
4
+ class MetaListType
5
+ OBJECT = "object"
6
+ LIST = "list"
7
+ end
8
+ end
@@ -5,19 +5,19 @@ require "json"
5
5
 
6
6
  module Ittybit
7
7
  class Signature
8
- # @return [String] Domain of the signed URL
8
+ # @return [String]
9
9
  attr_reader :domain
10
- # @return [String] Filename of the signed file
10
+ # @return [String]
11
11
  attr_reader :filename
12
- # @return [String] Folder of the signed file
12
+ # @return [String]
13
13
  attr_reader :folder
14
- # @return [Integer] Expiry timestamp of the signed URL
14
+ # @return [Integer]
15
15
  attr_reader :expiry
16
- # @return [String] HTTP method for the signed URL
16
+ # @return [String]
17
17
  attr_reader :method
18
- # @return [String] Generated signature for the signed URL
18
+ # @return [String]
19
19
  attr_reader :signature
20
- # @return [String] Generated signed URL
20
+ # @return [String]
21
21
  attr_reader :url
22
22
  # @return [OpenStruct] Additional properties unmapped to the current class definition
23
23
  attr_reader :additional_properties
@@ -27,13 +27,13 @@ module Ittybit
27
27
 
28
28
  OMIT = Object.new
29
29
 
30
- # @param domain [String] Domain of the signed URL
31
- # @param filename [String] Filename of the signed file
32
- # @param folder [String] Folder of the signed file
33
- # @param expiry [Integer] Expiry timestamp of the signed URL
34
- # @param method [String] HTTP method for the signed URL
35
- # @param signature [String] Generated signature for the signed URL
36
- # @param url [String] Generated signed URL
30
+ # @param domain [String]
31
+ # @param filename [String]
32
+ # @param folder [String]
33
+ # @param expiry [Integer]
34
+ # @param method [String]
35
+ # @param signature [String]
36
+ # @param url [String]
37
37
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
38
38
  # @return [Ittybit::Signature]
39
39
  def initialize(domain:, filename:, expiry:, method:, signature:, url:, folder: OMIT, additional_properties: nil)