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,6 +2,7 @@
2
2
 
3
3
  require_relative "meta"
4
4
  require_relative "signature"
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::Signature]
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::Signature]
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::SignatureResponse]
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::Signature.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::Signature.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
@@ -9,39 +9,34 @@ require "json"
9
9
 
10
10
  module Ittybit
11
11
  class Task
12
- # @return [String] Unique identifier for the task.
12
+ # @return [String]
13
13
  attr_reader :id
14
- # @return [String] Object type, always 'task'.
14
+ # @return [String]
15
15
  attr_reader :object
16
- # @return [Ittybit::TASK_KIND] The type of operation the task performs.
16
+ # @return [Ittybit::TASK_KIND]
17
17
  attr_reader :kind
18
- # @return [Hash{String => Object}] The input source for the task (e.g., details of a file). Structure varies based
19
- # on the task kind and preceding steps.
18
+ # @return [Hash{String => Object}]
20
19
  attr_reader :input
21
- # @return [Hash{String => Object}] Configuration options specific to the task kind.
20
+ # @return [Hash{String => Object}]
22
21
  attr_reader :options
23
- # @return [Hash{String => Object}] The result generated by the task (e.g., details of an output file or
24
- # intelligence data). Structure varies.
22
+ # @return [Hash{String => Object}]
25
23
  attr_reader :output
26
- # @return [Ittybit::TaskStatus] Current status of the task.
24
+ # @return [Ittybit::TaskStatus]
27
25
  attr_reader :status
28
- # @return [Integer] Task progress percentage.
26
+ # @return [Integer]
29
27
  attr_reader :progress
30
- # @return [String] Error message if the task failed.
28
+ # @return [String]
31
29
  attr_reader :error
32
- # @return [String] ID of the entity that created the task (e.g., user ID, automation ID).
30
+ # @return [String]
33
31
  attr_reader :created_by
34
- # @return [DateTime] Timestamp when the task was created.
32
+ # @return [DateTime]
35
33
  attr_reader :created
36
- # @return [DateTime] Timestamp when the task was last updated.
34
+ # @return [DateTime]
37
35
  attr_reader :updated
38
- # @return [String] ID of the parent task if this is part of a workflow.
36
+ # @return [String]
39
37
  attr_reader :parent_id
40
- # @return [Array<Ittybit::Task>] Array of nested task objects representing the steps within this workflow task.
38
+ # @return [Array<Object>]
41
39
  attr_reader :workflow
42
- # @return [Array<Ittybit::Task>] Array representing subsequent tasks (e.g., in an automation). Structure may
43
- # vary.
44
- attr_reader :next_
45
40
  # @return [Ittybit::TaskResults]
46
41
  attr_reader :results
47
42
  # @return [OpenStruct] Additional properties unmapped to the current class definition
@@ -52,29 +47,25 @@ module Ittybit
52
47
 
53
48
  OMIT = Object.new
54
49
 
55
- # @param id [String] Unique identifier for the task.
56
- # @param object [String] Object type, always 'task'.
57
- # @param kind [Ittybit::TASK_KIND] The type of operation the task performs.
58
- # @param input [Hash{String => Object}] The input source for the task (e.g., details of a file). Structure varies based
59
- # on the task kind and preceding steps.
60
- # @param options [Hash{String => Object}] Configuration options specific to the task kind.
61
- # @param output [Hash{String => Object}] The result generated by the task (e.g., details of an output file or
62
- # intelligence data). Structure varies.
63
- # @param status [Ittybit::TaskStatus] Current status of the task.
64
- # @param progress [Integer] Task progress percentage.
65
- # @param error [String] Error message if the task failed.
66
- # @param created_by [String] ID of the entity that created the task (e.g., user ID, automation ID).
67
- # @param created [DateTime] Timestamp when the task was created.
68
- # @param updated [DateTime] Timestamp when the task was last updated.
69
- # @param parent_id [String] ID of the parent task if this is part of a workflow.
70
- # @param workflow [Array<Ittybit::Task>] Array of nested task objects representing the steps within this workflow task.
71
- # @param next_ [Array<Ittybit::Task>] Array representing subsequent tasks (e.g., in an automation). Structure may
72
- # vary.
50
+ # @param id [String]
51
+ # @param object [String]
52
+ # @param kind [Ittybit::TASK_KIND]
53
+ # @param input [Hash{String => Object}]
54
+ # @param options [Hash{String => Object}]
55
+ # @param output [Hash{String => Object}]
56
+ # @param status [Ittybit::TaskStatus]
57
+ # @param progress [Integer]
58
+ # @param error [String]
59
+ # @param created_by [String]
60
+ # @param created [DateTime]
61
+ # @param updated [DateTime]
62
+ # @param parent_id [String]
63
+ # @param workflow [Array<Object>]
73
64
  # @param results [Ittybit::TaskResults]
74
65
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
75
66
  # @return [Ittybit::Task]
76
67
  def initialize(id:, object:, kind:, status:, created:, updated:, input: OMIT, options: OMIT, output: OMIT, progress: OMIT, error: OMIT,
77
- created_by: OMIT, parent_id: OMIT, workflow: OMIT, next_: OMIT, results: OMIT, additional_properties: nil)
68
+ created_by: OMIT, parent_id: OMIT, workflow: OMIT, results: OMIT, additional_properties: nil)
78
69
  @id = id
79
70
  @object = object
80
71
  @kind = kind
@@ -89,7 +80,6 @@ module Ittybit
89
80
  @updated = updated
90
81
  @parent_id = parent_id if parent_id != OMIT
91
82
  @workflow = workflow if workflow != OMIT
92
- @next_ = next_ if next_ != OMIT
93
83
  @results = results if results != OMIT
94
84
  @additional_properties = additional_properties
95
85
  @_field_set = {
@@ -107,7 +97,6 @@ module Ittybit
107
97
  "updated": updated,
108
98
  "parent_id": parent_id,
109
99
  "workflow": workflow,
110
- "next": next_,
111
100
  "results": results
112
101
  }.reject do |_k, v|
113
102
  v == OMIT
@@ -134,14 +123,7 @@ module Ittybit
134
123
  created = (DateTime.parse(parsed_json["created"]) unless parsed_json["created"].nil?)
135
124
  updated = (DateTime.parse(parsed_json["updated"]) unless parsed_json["updated"].nil?)
136
125
  parent_id = parsed_json["parent_id"]
137
- workflow = parsed_json["workflow"]&.map do |item|
138
- item = item.to_json
139
- Ittybit::Task.from_json(json_object: item)
140
- end
141
- next_ = parsed_json["next"]&.map do |item|
142
- item = item.to_json
143
- Ittybit::Task.from_json(json_object: item)
144
- end
126
+ workflow = parsed_json["workflow"]
145
127
  if parsed_json["results"].nil?
146
128
  results = nil
147
129
  else
@@ -163,7 +145,6 @@ module Ittybit
163
145
  updated: updated,
164
146
  parent_id: parent_id,
165
147
  workflow: workflow,
166
- next_: next_,
167
148
  results: results,
168
149
  additional_properties: struct
169
150
  )
@@ -197,7 +178,6 @@ module Ittybit
197
178
  obj.updated.is_a?(DateTime) != false || raise("Passed value for field obj.updated is not the expected type, validation failed.")
198
179
  obj.parent_id&.is_a?(String) != false || raise("Passed value for field obj.parent_id is not the expected type, validation failed.")
199
180
  obj.workflow&.is_a?(Array) != false || raise("Passed value for field obj.workflow is not the expected type, validation failed.")
200
- obj.next_&.is_a?(Array) != false || raise("Passed value for field obj.next_ is not the expected type, validation failed.")
201
181
  obj.results.nil? || Ittybit::TaskResults.validate_raw(obj: obj.results)
202
182
  end
203
183
  end
@@ -2,6 +2,7 @@
2
2
 
3
3
  require_relative "meta_list"
4
4
  require_relative "task"
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::Task>]
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::Task>]
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::TaskListResponse]
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::Task.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 "task"
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::Task]
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::Task]
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::TaskResponse]
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::Task.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::Task.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
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ittybit
4
- # Current status of the task.
5
4
  class TaskStatus
6
5
  PENDING = "pending"
7
6
  WAITING = "waiting"
@@ -8,25 +8,25 @@ require "json"
8
8
 
9
9
  module Ittybit
10
10
  class TaskSummary
11
- # @return [String] Unique identifier for the task.
11
+ # @return [String]
12
12
  attr_reader :id
13
- # @return [String] Object type, always 'task'.
13
+ # @return [String]
14
14
  attr_reader :object
15
- # @return [Ittybit::TaskSummaryKind] The type of operation the task performs.
15
+ # @return [Ittybit::TaskSummaryKind]
16
16
  attr_reader :kind
17
- # @return [Ittybit::TaskSummaryStatus] Current status of the task.
17
+ # @return [Ittybit::TaskSummaryStatus]
18
18
  attr_reader :status
19
- # @return [Integer] Task progress percentage.
19
+ # @return [Integer]
20
20
  attr_reader :progress
21
- # @return [String] Error message if the task failed.
21
+ # @return [String]
22
22
  attr_reader :error
23
- # @return [String] ID of the entity that created the task (e.g., user ID, automation ID).
23
+ # @return [String]
24
24
  attr_reader :created_by
25
- # @return [DateTime] Timestamp when the task was created.
25
+ # @return [DateTime]
26
26
  attr_reader :created
27
- # @return [DateTime] Timestamp when the task was last updated.
27
+ # @return [DateTime]
28
28
  attr_reader :updated
29
- # @return [String] ID of the parent task if this is part of a workflow.
29
+ # @return [String]
30
30
  attr_reader :parent_id
31
31
  # @return [OpenStruct] Additional properties unmapped to the current class definition
32
32
  attr_reader :additional_properties
@@ -36,16 +36,16 @@ module Ittybit
36
36
 
37
37
  OMIT = Object.new
38
38
 
39
- # @param id [String] Unique identifier for the task.
40
- # @param object [String] Object type, always 'task'.
41
- # @param kind [Ittybit::TaskSummaryKind] The type of operation the task performs.
42
- # @param status [Ittybit::TaskSummaryStatus] Current status of the task.
43
- # @param progress [Integer] Task progress percentage.
44
- # @param error [String] Error message if the task failed.
45
- # @param created_by [String] ID of the entity that created the task (e.g., user ID, automation ID).
46
- # @param created [DateTime] Timestamp when the task was created.
47
- # @param updated [DateTime] Timestamp when the task was last updated.
48
- # @param parent_id [String] ID of the parent task if this is part of a workflow.
39
+ # @param id [String]
40
+ # @param object [String]
41
+ # @param kind [Ittybit::TaskSummaryKind]
42
+ # @param status [Ittybit::TaskSummaryStatus]
43
+ # @param progress [Integer]
44
+ # @param error [String]
45
+ # @param created_by [String]
46
+ # @param created [DateTime]
47
+ # @param updated [DateTime]
48
+ # @param parent_id [String]
49
49
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
50
50
  # @return [Ittybit::TaskSummary]
51
51
  def initialize(id:, object:, kind:, status:, created:, updated:, progress: OMIT, error: OMIT, created_by: OMIT,
@@ -1,25 +1,21 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ittybit
4
- # The type of operation the task performs.
5
4
  class TaskSummaryKind
6
5
  INGEST = "ingest"
7
- WORKFLOW = "workflow"
8
- SPEECH = "speech"
9
- OUTLINE = "outline"
6
+ VIDEO = "video"
7
+ IMAGE = "image"
8
+ AUDIO = "audio"
10
9
  CHAPTERS = "chapters"
11
10
  SUBTITLES = "subtitles"
12
11
  THUMBNAILS = "thumbnails"
13
12
  NSFW = "nsfw"
14
- SUMMARY = "summary"
15
- DESCRIBE = "describe"
16
- VIDEO = "video"
17
- IMAGE = "image"
18
- AUDIO = "audio"
19
- HTTP = "http"
20
- CONDITIONS = "conditions"
21
- STORE = "store"
13
+ SPEECH = "speech"
14
+ DESCRIPTION = "description"
15
+ OUTLINE = "outline"
22
16
  PROMPT = "prompt"
23
- TAGS = "tags"
17
+ WORKFLOW = "workflow"
18
+ CONDITIONS = "conditions"
19
+ HTTP = "http"
24
20
  end
25
21
  end
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ittybit
4
- # Current status of the task.
5
4
  class TaskSummaryStatus
6
5
  PENDING = "pending"
7
6
  WAITING = "waiting"
@@ -1,25 +1,18 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "workflow_task_step_kind"
4
+ require_relative "workflow_task_step_next_item"
4
5
  require "ostruct"
5
6
  require "json"
6
7
 
7
8
  module Ittybit
8
9
  class WorkflowTaskStep
9
- # @return [Ittybit::WorkflowTaskStepKind] The type of operation the task performs.
10
+ # @return [Ittybit::WorkflowTaskStepKind]
10
11
  attr_reader :kind
11
- # @return [String] Optional label for the output of this step.
12
- attr_reader :label
13
- # @return [String] Output format (e.g., mp4, jpg)
14
- attr_reader :format
15
- # @return [Integer] Output width
16
- attr_reader :width
17
- # @return [Integer] Output height
18
- attr_reader :height
19
- # @return [String] Resize mode
20
- attr_reader :resize
21
- # @return [Integer] Quality setting
22
- attr_reader :quality
12
+ # @return [String]
13
+ attr_reader :ref
14
+ # @return [Array<Ittybit::WorkflowTaskStepNextItem>]
15
+ attr_reader :next_
23
16
  # @return [OpenStruct] Additional properties unmapped to the current class definition
24
17
  attr_reader :additional_properties
25
18
  # @return [Object]
@@ -28,34 +21,17 @@ module Ittybit
28
21
 
29
22
  OMIT = Object.new
30
23
 
31
- # @param kind [Ittybit::WorkflowTaskStepKind] The type of operation the task performs.
32
- # @param label [String] Optional label for the output of this step.
33
- # @param format [String] Output format (e.g., mp4, jpg)
34
- # @param width [Integer] Output width
35
- # @param height [Integer] Output height
36
- # @param resize [String] Resize mode
37
- # @param quality [Integer] Quality setting
24
+ # @param kind [Ittybit::WorkflowTaskStepKind]
25
+ # @param ref [String]
26
+ # @param next_ [Array<Ittybit::WorkflowTaskStepNextItem>]
38
27
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
39
28
  # @return [Ittybit::WorkflowTaskStep]
40
- def initialize(kind:, label: OMIT, format: OMIT, width: OMIT, height: OMIT, resize: OMIT, quality: OMIT,
41
- additional_properties: nil)
29
+ def initialize(kind:, ref: OMIT, next_: OMIT, additional_properties: nil)
42
30
  @kind = kind
43
- @label = label if label != OMIT
44
- @format = format if format != OMIT
45
- @width = width if width != OMIT
46
- @height = height if height != OMIT
47
- @resize = resize if resize != OMIT
48
- @quality = quality if quality != OMIT
31
+ @ref = ref if ref != OMIT
32
+ @next_ = next_ if next_ != OMIT
49
33
  @additional_properties = additional_properties
50
- @_field_set = {
51
- "kind": kind,
52
- "label": label,
53
- "format": format,
54
- "width": width,
55
- "height": height,
56
- "resize": resize,
57
- "quality": quality
58
- }.reject do |_k, v|
34
+ @_field_set = { "kind": kind, "ref": ref, "next": next_ }.reject do |_k, v|
59
35
  v == OMIT
60
36
  end
61
37
  end
@@ -68,20 +44,15 @@ module Ittybit
68
44
  struct = JSON.parse(json_object, object_class: OpenStruct)
69
45
  parsed_json = JSON.parse(json_object)
70
46
  kind = parsed_json["kind"]
71
- label = parsed_json["label"]
72
- format = parsed_json["format"]
73
- width = parsed_json["width"]
74
- height = parsed_json["height"]
75
- resize = parsed_json["resize"]
76
- quality = parsed_json["quality"]
47
+ ref = parsed_json["ref"]
48
+ next_ = parsed_json["next"]&.map do |item|
49
+ item = item.to_json
50
+ Ittybit::WorkflowTaskStepNextItem.from_json(json_object: item)
51
+ end
77
52
  new(
78
53
  kind: kind,
79
- label: label,
80
- format: format,
81
- width: width,
82
- height: height,
83
- resize: resize,
84
- quality: quality,
54
+ ref: ref,
55
+ next_: next_,
85
56
  additional_properties: struct
86
57
  )
87
58
  end
@@ -101,12 +72,8 @@ module Ittybit
101
72
  # @return [Void]
102
73
  def self.validate_raw(obj:)
103
74
  obj.kind.is_a?(Ittybit::WorkflowTaskStepKind) != false || raise("Passed value for field obj.kind is not the expected type, validation failed.")
104
- obj.label&.is_a?(String) != false || raise("Passed value for field obj.label is not the expected type, validation failed.")
105
- obj.format&.is_a?(String) != false || raise("Passed value for field obj.format is not the expected type, validation failed.")
106
- obj.width&.is_a?(Integer) != false || raise("Passed value for field obj.width is not the expected type, validation failed.")
107
- obj.height&.is_a?(Integer) != false || raise("Passed value for field obj.height is not the expected type, validation failed.")
108
- obj.resize&.is_a?(String) != false || raise("Passed value for field obj.resize is not the expected type, validation failed.")
109
- obj.quality&.is_a?(Integer) != false || raise("Passed value for field obj.quality is not the expected type, validation failed.")
75
+ obj.ref&.is_a?(String) != false || raise("Passed value for field obj.ref is not the expected type, validation failed.")
76
+ obj.next_&.is_a?(Array) != false || raise("Passed value for field obj.next_ is not the expected type, validation failed.")
110
77
  end
111
78
  end
112
79
  end
@@ -1,25 +1,19 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ittybit
4
- # The type of operation the task performs.
5
4
  class WorkflowTaskStepKind
6
- INGEST = "ingest"
7
- WORKFLOW = "workflow"
8
- SPEECH = "speech"
9
- OUTLINE = "outline"
5
+ VIDEO = "video"
6
+ IMAGE = "image"
7
+ AUDIO = "audio"
10
8
  CHAPTERS = "chapters"
11
9
  SUBTITLES = "subtitles"
12
10
  THUMBNAILS = "thumbnails"
13
11
  NSFW = "nsfw"
14
- SUMMARY = "summary"
15
- DESCRIBE = "describe"
16
- VIDEO = "video"
17
- IMAGE = "image"
18
- AUDIO = "audio"
19
- HTTP = "http"
20
- CONDITIONS = "conditions"
21
- STORE = "store"
12
+ SPEECH = "speech"
13
+ DESCRIPTION = "description"
14
+ OUTLINE = "outline"
22
15
  PROMPT = "prompt"
23
- TAGS = "tags"
16
+ CONDITIONS = "conditions"
17
+ HTTP = "http"
24
18
  end
25
19
  end