ittybit 0.7.6 → 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.
- checksums.yaml +4 -4
- data/lib/ittybit/automations/client.rb +149 -95
- data/lib/ittybit/automations/types/update_automation_request_status.rb +10 -0
- data/lib/ittybit/automations/types/{automations_update_request_trigger_conditions_item.rb → update_automation_request_trigger.rb} +19 -21
- data/lib/ittybit/media/client.rb +2 -2
- data/lib/ittybit/tasks/client.rb +45 -132
- data/lib/ittybit/types/automation.rb +3 -3
- data/lib/ittybit/types/automation_status.rb +1 -2
- data/lib/ittybit/types/automation_trigger.rb +4 -6
- data/lib/ittybit/types/task_summary_kind.rb +4 -4
- data/lib/ittybit/types/workflow_task_step.rb +9 -74
- data/lib/ittybit/types/workflow_task_step_kind.rb +3 -5
- data/lib/ittybit/types/workflow_task_step_next_item.rb +67 -0
- data/lib/ittybit.rb +2 -2
- data/lib/requests.rb +8 -8
- data/lib/types_export.rb +3 -5
- metadata +5 -7
- data/lib/ittybit/automations/types/automations_update_request_trigger.rb +0 -75
- data/lib/ittybit/tasks/types/tasks_create_request_kind.rb +0 -22
- data/lib/ittybit/tasks/types/tasks_list_request_kind.rb +0 -26
- data/lib/ittybit/tasks/types/tasks_list_request_status.rb +0 -16
data/lib/requests.rb
CHANGED
@@ -21,7 +21,7 @@ module Ittybit
|
|
21
21
|
# @param max_retries [Long] The number of times to retry a failed request, defaults to 2.
|
22
22
|
# @param timeout_in_seconds [Long]
|
23
23
|
# @param token [String]
|
24
|
-
# @param version [
|
24
|
+
# @param version [Integer]
|
25
25
|
# @return [Ittybit::RequestClient]
|
26
26
|
def initialize(token:, base_url: nil, environment: Ittybit::Environment::DEFAULT, max_retries: nil,
|
27
27
|
timeout_in_seconds: nil, version: nil)
|
@@ -46,7 +46,7 @@ module Ittybit
|
|
46
46
|
|
47
47
|
# @return [Hash{String => String}]
|
48
48
|
def get_headers
|
49
|
-
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "ittybit", "X-Fern-SDK-Version": "0.
|
49
|
+
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "ittybit", "X-Fern-SDK-Version": "0.8.0" }
|
50
50
|
headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil?
|
51
51
|
headers
|
52
52
|
end
|
@@ -67,7 +67,7 @@ module Ittybit
|
|
67
67
|
# @param max_retries [Long] The number of times to retry a failed request, defaults to 2.
|
68
68
|
# @param timeout_in_seconds [Long]
|
69
69
|
# @param token [String]
|
70
|
-
# @param version [
|
70
|
+
# @param version [Integer]
|
71
71
|
# @return [Ittybit::AsyncRequestClient]
|
72
72
|
def initialize(token:, base_url: nil, environment: Ittybit::Environment::DEFAULT, max_retries: nil,
|
73
73
|
timeout_in_seconds: nil, version: nil)
|
@@ -93,7 +93,7 @@ module Ittybit
|
|
93
93
|
|
94
94
|
# @return [Hash{String => String}]
|
95
95
|
def get_headers
|
96
|
-
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "ittybit", "X-Fern-SDK-Version": "0.
|
96
|
+
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "ittybit", "X-Fern-SDK-Version": "0.8.0" }
|
97
97
|
headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil?
|
98
98
|
headers
|
99
99
|
end
|
@@ -106,7 +106,7 @@ module Ittybit
|
|
106
106
|
attr_reader :base_url
|
107
107
|
# @return [String]
|
108
108
|
attr_reader :token
|
109
|
-
# @return [
|
109
|
+
# @return [Integer]
|
110
110
|
attr_reader :version
|
111
111
|
# @return [Hash{String => Object}]
|
112
112
|
attr_reader :additional_headers
|
@@ -119,7 +119,7 @@ module Ittybit
|
|
119
119
|
|
120
120
|
# @param base_url [String]
|
121
121
|
# @param token [String]
|
122
|
-
# @param version [
|
122
|
+
# @param version [Integer]
|
123
123
|
# @param additional_headers [Hash{String => Object}]
|
124
124
|
# @param additional_query_parameters [Hash{String => Object}]
|
125
125
|
# @param additional_body_parameters [Hash{String => Object}]
|
@@ -144,7 +144,7 @@ module Ittybit
|
|
144
144
|
attr_reader :base_url
|
145
145
|
# @return [String]
|
146
146
|
attr_reader :token
|
147
|
-
# @return [
|
147
|
+
# @return [Integer]
|
148
148
|
attr_reader :version
|
149
149
|
# @return [Hash{String => Object}]
|
150
150
|
attr_reader :additional_headers
|
@@ -157,7 +157,7 @@ module Ittybit
|
|
157
157
|
|
158
158
|
# @param base_url [String]
|
159
159
|
# @param token [String]
|
160
|
-
# @param version [
|
160
|
+
# @param version [Integer]
|
161
161
|
# @param additional_headers [Hash{String => Object}]
|
162
162
|
# @param additional_query_parameters [Hash{String => Object}]
|
163
163
|
# @param additional_body_parameters [Hash{String => Object}]
|
data/lib/types_export.rb
CHANGED
@@ -1,10 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative "ittybit/automations/types/
|
4
|
-
require_relative "ittybit/automations/types/
|
5
|
-
require_relative "ittybit/tasks/types/tasks_list_request_status"
|
6
|
-
require_relative "ittybit/tasks/types/tasks_list_request_kind"
|
7
|
-
require_relative "ittybit/tasks/types/tasks_create_request_kind"
|
3
|
+
require_relative "ittybit/automations/types/update_automation_request_trigger"
|
4
|
+
require_relative "ittybit/automations/types/update_automation_request_status"
|
8
5
|
require_relative "ittybit/signatures/types/signatures_create_request_method"
|
9
6
|
require_relative "ittybit/types/meta"
|
10
7
|
require_relative "ittybit/types/meta_list_type"
|
@@ -16,6 +13,7 @@ require_relative "ittybit/types/automation_trigger"
|
|
16
13
|
require_relative "ittybit/types/automation_status"
|
17
14
|
require_relative "ittybit/types/automation"
|
18
15
|
require_relative "ittybit/types/workflow_task_step_kind"
|
16
|
+
require_relative "ittybit/types/workflow_task_step_next_item"
|
19
17
|
require_relative "ittybit/types/workflow_task_step"
|
20
18
|
require_relative "ittybit/types/file_object"
|
21
19
|
require_relative "ittybit/types/file_kind"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ittybit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-07-
|
11
|
+
date: 2025-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async-http-faraday
|
@@ -100,16 +100,13 @@ files:
|
|
100
100
|
- lib/gemconfig.rb
|
101
101
|
- lib/ittybit.rb
|
102
102
|
- lib/ittybit/automations/client.rb
|
103
|
-
- lib/ittybit/automations/types/
|
104
|
-
- lib/ittybit/automations/types/
|
103
|
+
- lib/ittybit/automations/types/update_automation_request_status.rb
|
104
|
+
- lib/ittybit/automations/types/update_automation_request_trigger.rb
|
105
105
|
- lib/ittybit/files/client.rb
|
106
106
|
- lib/ittybit/media/client.rb
|
107
107
|
- lib/ittybit/signatures/client.rb
|
108
108
|
- lib/ittybit/signatures/types/signatures_create_request_method.rb
|
109
109
|
- lib/ittybit/tasks/client.rb
|
110
|
-
- lib/ittybit/tasks/types/tasks_create_request_kind.rb
|
111
|
-
- lib/ittybit/tasks/types/tasks_list_request_kind.rb
|
112
|
-
- lib/ittybit/tasks/types/tasks_list_request_status.rb
|
113
110
|
- lib/ittybit/types/api_response_base.rb
|
114
111
|
- lib/ittybit/types/automation.rb
|
115
112
|
- lib/ittybit/types/automation_list_response.rb
|
@@ -152,6 +149,7 @@ files:
|
|
152
149
|
- lib/ittybit/types/task_summary_status.rb
|
153
150
|
- lib/ittybit/types/workflow_task_step.rb
|
154
151
|
- lib/ittybit/types/workflow_task_step_kind.rb
|
152
|
+
- lib/ittybit/types/workflow_task_step_next_item.rb
|
155
153
|
- lib/requests.rb
|
156
154
|
- lib/types_export.rb
|
157
155
|
homepage: https://github.com/ittybit/sdk-ruby
|
@@ -1,75 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative "automations_update_request_trigger_conditions_item"
|
4
|
-
require "ostruct"
|
5
|
-
require "json"
|
6
|
-
|
7
|
-
module Ittybit
|
8
|
-
class Automations
|
9
|
-
# Defines the trigger event and conditions. To clear/remove a trigger, provide
|
10
|
-
# null. To update, provide the new trigger object.
|
11
|
-
class AutomationsUpdateRequestTrigger
|
12
|
-
# @return [String] The event that triggers the automation
|
13
|
-
attr_reader :event
|
14
|
-
# @return [Array<Ittybit::Automations::AutomationsUpdateRequestTriggerConditionsItem>] Conditions that must be met for the trigger to activate.
|
15
|
-
attr_reader :conditions
|
16
|
-
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
17
|
-
attr_reader :additional_properties
|
18
|
-
# @return [Object]
|
19
|
-
attr_reader :_field_set
|
20
|
-
protected :_field_set
|
21
|
-
|
22
|
-
OMIT = Object.new
|
23
|
-
|
24
|
-
# @param event [String] The event that triggers the automation
|
25
|
-
# @param conditions [Array<Ittybit::Automations::AutomationsUpdateRequestTriggerConditionsItem>] Conditions that must be met for the trigger to activate.
|
26
|
-
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
27
|
-
# @return [Ittybit::Automations::AutomationsUpdateRequestTrigger]
|
28
|
-
def initialize(event: OMIT, conditions: OMIT, additional_properties: nil)
|
29
|
-
@event = event if event != OMIT
|
30
|
-
@conditions = conditions if conditions != OMIT
|
31
|
-
@additional_properties = additional_properties
|
32
|
-
@_field_set = { "event": event, "conditions": conditions }.reject do |_k, v|
|
33
|
-
v == OMIT
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
# Deserialize a JSON object to an instance of AutomationsUpdateRequestTrigger
|
38
|
-
#
|
39
|
-
# @param json_object [String]
|
40
|
-
# @return [Ittybit::Automations::AutomationsUpdateRequestTrigger]
|
41
|
-
def self.from_json(json_object:)
|
42
|
-
struct = JSON.parse(json_object, object_class: OpenStruct)
|
43
|
-
parsed_json = JSON.parse(json_object)
|
44
|
-
event = parsed_json["event"]
|
45
|
-
conditions = parsed_json["conditions"]&.map do |item|
|
46
|
-
item = item.to_json
|
47
|
-
Ittybit::Automations::AutomationsUpdateRequestTriggerConditionsItem.from_json(json_object: item)
|
48
|
-
end
|
49
|
-
new(
|
50
|
-
event: event,
|
51
|
-
conditions: conditions,
|
52
|
-
additional_properties: struct
|
53
|
-
)
|
54
|
-
end
|
55
|
-
|
56
|
-
# Serialize an instance of AutomationsUpdateRequestTrigger to a JSON object
|
57
|
-
#
|
58
|
-
# @return [String]
|
59
|
-
def to_json(*_args)
|
60
|
-
@_field_set&.to_json
|
61
|
-
end
|
62
|
-
|
63
|
-
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
64
|
-
# hash and check each fields type against the current object's property
|
65
|
-
# definitions.
|
66
|
-
#
|
67
|
-
# @param obj [Object]
|
68
|
-
# @return [Void]
|
69
|
-
def self.validate_raw(obj:)
|
70
|
-
obj.event&.is_a?(String) != false || raise("Passed value for field obj.event is not the expected type, validation failed.")
|
71
|
-
obj.conditions&.is_a?(Array) != false || raise("Passed value for field obj.conditions is not the expected type, validation failed.")
|
72
|
-
end
|
73
|
-
end
|
74
|
-
end
|
75
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Ittybit
|
4
|
-
class Tasks
|
5
|
-
# The type of task to create.
|
6
|
-
class TasksCreateRequestKind
|
7
|
-
INGEST = "ingest"
|
8
|
-
WORKFLOW = "workflow"
|
9
|
-
SPEECH = "speech"
|
10
|
-
VIDEO = "video"
|
11
|
-
IMAGE = "image"
|
12
|
-
AUDIO = "audio"
|
13
|
-
SUMMARY = "summary"
|
14
|
-
DESCRIBE = "describe"
|
15
|
-
CHAPTERS = "chapters"
|
16
|
-
OUTLINE = "outline"
|
17
|
-
SUBTITLES = "subtitles"
|
18
|
-
NSFW = "nsfw"
|
19
|
-
THUMBNAILS = "thumbnails"
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
@@ -1,26 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Ittybit
|
4
|
-
class Tasks
|
5
|
-
class TasksListRequestKind
|
6
|
-
INGEST = "ingest"
|
7
|
-
WORKFLOW = "workflow"
|
8
|
-
SPEECH = "speech"
|
9
|
-
OUTLINE = "outline"
|
10
|
-
CHAPTERS = "chapters"
|
11
|
-
SUBTITLES = "subtitles"
|
12
|
-
THUMBNAILS = "thumbnails"
|
13
|
-
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"
|
22
|
-
PROMPT = "prompt"
|
23
|
-
TAGS = "tags"
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Ittybit
|
4
|
-
class Tasks
|
5
|
-
class TasksListRequestStatus
|
6
|
-
PENDING = "pending"
|
7
|
-
WAITING = "waiting"
|
8
|
-
PROCESSING = "processing"
|
9
|
-
READY = "ready"
|
10
|
-
COMPLETED = "completed"
|
11
|
-
FAILED = "failed"
|
12
|
-
ERROR = "error"
|
13
|
-
CANCELLED = "cancelled"
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|