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.
- checksums.yaml +4 -4
- data/lib/ittybit/automations/client.rb +149 -87
- 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/files/client.rb +67 -77
- data/lib/ittybit/media/client.rb +78 -34
- data/lib/ittybit/signatures/client.rb +20 -24
- data/lib/ittybit/signatures/types/signatures_create_request_method.rb +0 -3
- data/lib/ittybit/tasks/client.rb +45 -132
- data/lib/ittybit/types/automation.rb +19 -29
- data/lib/ittybit/types/automation_list_response.rb +15 -2
- data/lib/ittybit/types/automation_response.rb +15 -2
- data/lib/ittybit/types/automation_status.rb +1 -3
- data/lib/ittybit/types/automation_trigger.rb +11 -18
- data/lib/ittybit/types/{confirmation_response_data.rb → confirmation.rb} +11 -9
- data/lib/ittybit/types/confirmation_response.rb +20 -7
- data/lib/ittybit/types/file.rb +64 -68
- data/lib/ittybit/types/file_kind.rb +0 -1
- data/lib/ittybit/types/file_list_response.rb +15 -2
- data/lib/ittybit/types/file_object.rb +0 -1
- data/lib/ittybit/types/file_response.rb +15 -2
- data/lib/ittybit/types/file_status.rb +0 -1
- data/lib/ittybit/types/links.rb +4 -4
- data/lib/ittybit/types/links_list.rb +17 -32
- data/lib/ittybit/types/media.rb +34 -56
- data/lib/ittybit/types/media_kind.rb +0 -1
- data/lib/ittybit/types/media_list_response.rb +15 -2
- data/lib/ittybit/types/media_response.rb +15 -2
- data/lib/ittybit/types/media_source.rb +52 -53
- data/lib/ittybit/types/media_source_kind.rb +0 -1
- data/lib/ittybit/types/media_source_object.rb +0 -1
- data/lib/ittybit/types/media_source_orientation.rb +9 -0
- data/lib/ittybit/types/media_source_status.rb +0 -1
- data/lib/ittybit/types/meta_list.rb +40 -15
- data/lib/ittybit/types/meta_list_type.rb +8 -0
- data/lib/ittybit/types/signature.rb +14 -14
- data/lib/ittybit/types/signature_response.rb +15 -2
- data/lib/ittybit/types/task.rb +30 -50
- data/lib/ittybit/types/task_list_response.rb +15 -2
- data/lib/ittybit/types/task_response.rb +15 -2
- data/lib/ittybit/types/task_status.rb +0 -1
- data/lib/ittybit/types/task_summary.rb +20 -20
- data/lib/ittybit/types/task_summary_kind.rb +9 -13
- data/lib/ittybit/types/task_summary_status.rb +0 -1
- data/lib/ittybit/types/workflow_task_step.rb +22 -55
- data/lib/ittybit/types/workflow_task_step_kind.rb +8 -14
- data/lib/ittybit/types/{error_response.rb → workflow_task_step_next_item.rb} +21 -28
- data/lib/ittybit.rb +2 -2
- data/lib/requests.rb +8 -8
- data/lib/types_export.rb +6 -11
- metadata +8 -13
- data/lib/ittybit/automations/types/automations_update_request_trigger.rb +0 -75
- data/lib/ittybit/files/types/files_delete_response.rb +0 -89
- data/lib/ittybit/files/types/files_delete_response_data.rb +0 -60
- 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/ittybit/types/automation_trigger_conditions_item.rb +0 -65
- data/lib/ittybit/types/media_urls.rb +0 -70
@@ -1,16 +1,14 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative "meta"
|
4
|
-
require_relative "error"
|
5
3
|
require "ostruct"
|
6
4
|
require "json"
|
7
5
|
|
8
6
|
module Ittybit
|
9
|
-
class
|
10
|
-
# @return [
|
11
|
-
attr_reader :
|
12
|
-
# @return [
|
13
|
-
attr_reader :
|
7
|
+
class WorkflowTaskStepNextItem
|
8
|
+
# @return [String]
|
9
|
+
attr_reader :kind
|
10
|
+
# @return [String]
|
11
|
+
attr_reader :ref
|
14
12
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
15
13
|
attr_reader :additional_properties
|
16
14
|
# @return [Object]
|
@@ -19,41 +17,36 @@ module Ittybit
|
|
19
17
|
|
20
18
|
OMIT = Object.new
|
21
19
|
|
22
|
-
# @param
|
23
|
-
# @param
|
20
|
+
# @param kind [String]
|
21
|
+
# @param ref [String]
|
24
22
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
25
|
-
# @return [Ittybit::
|
26
|
-
def initialize(
|
27
|
-
@
|
28
|
-
@
|
23
|
+
# @return [Ittybit::WorkflowTaskStepNextItem]
|
24
|
+
def initialize(kind: OMIT, ref: OMIT, additional_properties: nil)
|
25
|
+
@kind = kind if kind != OMIT
|
26
|
+
@ref = ref if ref != OMIT
|
29
27
|
@additional_properties = additional_properties
|
30
|
-
@_field_set = { "
|
28
|
+
@_field_set = { "kind": kind, "ref": ref }.reject do |_k, v|
|
31
29
|
v == OMIT
|
32
30
|
end
|
33
31
|
end
|
34
32
|
|
35
|
-
# Deserialize a JSON object to an instance of
|
33
|
+
# Deserialize a JSON object to an instance of WorkflowTaskStepNextItem
|
36
34
|
#
|
37
35
|
# @param json_object [String]
|
38
|
-
# @return [Ittybit::
|
36
|
+
# @return [Ittybit::WorkflowTaskStepNextItem]
|
39
37
|
def self.from_json(json_object:)
|
40
38
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
41
39
|
parsed_json = JSON.parse(json_object)
|
42
|
-
|
43
|
-
|
44
|
-
error = nil
|
45
|
-
else
|
46
|
-
error = parsed_json["error"].to_json
|
47
|
-
error = Ittybit::Error.from_json(json_object: error)
|
48
|
-
end
|
40
|
+
kind = parsed_json["kind"]
|
41
|
+
ref = parsed_json["ref"]
|
49
42
|
new(
|
50
|
-
|
51
|
-
|
43
|
+
kind: kind,
|
44
|
+
ref: ref,
|
52
45
|
additional_properties: struct
|
53
46
|
)
|
54
47
|
end
|
55
48
|
|
56
|
-
# Serialize an instance of
|
49
|
+
# Serialize an instance of WorkflowTaskStepNextItem to a JSON object
|
57
50
|
#
|
58
51
|
# @return [String]
|
59
52
|
def to_json(*_args)
|
@@ -67,8 +60,8 @@ module Ittybit
|
|
67
60
|
# @param obj [Object]
|
68
61
|
# @return [Void]
|
69
62
|
def self.validate_raw(obj:)
|
70
|
-
obj.
|
71
|
-
obj.
|
63
|
+
obj.kind&.is_a?(String) != false || raise("Passed value for field obj.kind is not the expected type, validation failed.")
|
64
|
+
obj.ref&.is_a?(String) != false || raise("Passed value for field obj.ref is not the expected type, validation failed.")
|
72
65
|
end
|
73
66
|
end
|
74
67
|
end
|
data/lib/ittybit.rb
CHANGED
@@ -27,7 +27,7 @@ module Ittybit
|
|
27
27
|
# @param max_retries [Long] The number of times to retry a failed request, defaults to 2.
|
28
28
|
# @param timeout_in_seconds [Long]
|
29
29
|
# @param token [String]
|
30
|
-
# @param version [
|
30
|
+
# @param version [Integer]
|
31
31
|
# @return [Ittybit::Client]
|
32
32
|
def initialize(token:, base_url: nil, environment: Ittybit::Environment::DEFAULT, max_retries: nil,
|
33
33
|
timeout_in_seconds: nil, version: nil)
|
@@ -64,7 +64,7 @@ module Ittybit
|
|
64
64
|
# @param max_retries [Long] The number of times to retry a failed request, defaults to 2.
|
65
65
|
# @param timeout_in_seconds [Long]
|
66
66
|
# @param token [String]
|
67
|
-
# @param version [
|
67
|
+
# @param version [Integer]
|
68
68
|
# @return [Ittybit::AsyncClient]
|
69
69
|
def initialize(token:, base_url: nil, environment: Ittybit::Environment::DEFAULT, max_retries: nil,
|
70
70
|
timeout_in_seconds: nil, version: nil)
|
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,23 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative "ittybit/automations/types/
|
4
|
-
require_relative "ittybit/automations/types/
|
5
|
-
require_relative "ittybit/files/types/files_delete_response_data"
|
6
|
-
require_relative "ittybit/files/types/files_delete_response"
|
7
|
-
require_relative "ittybit/tasks/types/tasks_list_request_status"
|
8
|
-
require_relative "ittybit/tasks/types/tasks_list_request_kind"
|
9
|
-
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"
|
10
5
|
require_relative "ittybit/signatures/types/signatures_create_request_method"
|
11
6
|
require_relative "ittybit/types/meta"
|
7
|
+
require_relative "ittybit/types/meta_list_type"
|
12
8
|
require_relative "ittybit/types/meta_list"
|
13
9
|
require_relative "ittybit/types/links"
|
14
10
|
require_relative "ittybit/types/links_list"
|
15
11
|
require_relative "ittybit/types/error"
|
16
|
-
require_relative "ittybit/types/automation_trigger_conditions_item"
|
17
12
|
require_relative "ittybit/types/automation_trigger"
|
18
13
|
require_relative "ittybit/types/automation_status"
|
19
14
|
require_relative "ittybit/types/automation"
|
20
15
|
require_relative "ittybit/types/workflow_task_step_kind"
|
16
|
+
require_relative "ittybit/types/workflow_task_step_next_item"
|
21
17
|
require_relative "ittybit/types/workflow_task_step"
|
22
18
|
require_relative "ittybit/types/file_object"
|
23
19
|
require_relative "ittybit/types/file_kind"
|
@@ -25,10 +21,10 @@ require_relative "ittybit/types/file_status"
|
|
25
21
|
require_relative "ittybit/types/file"
|
26
22
|
require_relative "ittybit/types/media_source_object"
|
27
23
|
require_relative "ittybit/types/media_source_kind"
|
24
|
+
require_relative "ittybit/types/media_source_orientation"
|
28
25
|
require_relative "ittybit/types/media_source_status"
|
29
26
|
require_relative "ittybit/types/media_source"
|
30
27
|
require_relative "ittybit/types/media_kind"
|
31
|
-
require_relative "ittybit/types/media_urls"
|
32
28
|
require_relative "ittybit/types/media"
|
33
29
|
require_relative "ittybit/types/task_kind"
|
34
30
|
require_relative "ittybit/types/task_status"
|
@@ -38,6 +34,7 @@ require_relative "ittybit/types/task_summary_kind"
|
|
38
34
|
require_relative "ittybit/types/task_summary_status"
|
39
35
|
require_relative "ittybit/types/task_summary"
|
40
36
|
require_relative "ittybit/types/signature"
|
37
|
+
require_relative "ittybit/types/confirmation"
|
41
38
|
require_relative "ittybit/types/task_response"
|
42
39
|
require_relative "ittybit/types/automation_response"
|
43
40
|
require_relative "ittybit/types/automation_list_response"
|
@@ -47,7 +44,5 @@ require_relative "ittybit/types/media_response"
|
|
47
44
|
require_relative "ittybit/types/media_list_response"
|
48
45
|
require_relative "ittybit/types/task_list_response"
|
49
46
|
require_relative "ittybit/types/signature_response"
|
50
|
-
require_relative "ittybit/types/confirmation_response_data"
|
51
47
|
require_relative "ittybit/types/confirmation_response"
|
52
|
-
require_relative "ittybit/types/error_response"
|
53
48
|
require_relative "ittybit/types/api_response_base"
|
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-
|
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,29 +100,22 @@ 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
|
-
- lib/ittybit/files/types/files_delete_response.rb
|
107
|
-
- lib/ittybit/files/types/files_delete_response_data.rb
|
108
106
|
- lib/ittybit/media/client.rb
|
109
107
|
- lib/ittybit/signatures/client.rb
|
110
108
|
- lib/ittybit/signatures/types/signatures_create_request_method.rb
|
111
109
|
- lib/ittybit/tasks/client.rb
|
112
|
-
- lib/ittybit/tasks/types/tasks_create_request_kind.rb
|
113
|
-
- lib/ittybit/tasks/types/tasks_list_request_kind.rb
|
114
|
-
- lib/ittybit/tasks/types/tasks_list_request_status.rb
|
115
110
|
- lib/ittybit/types/api_response_base.rb
|
116
111
|
- lib/ittybit/types/automation.rb
|
117
112
|
- lib/ittybit/types/automation_list_response.rb
|
118
113
|
- lib/ittybit/types/automation_response.rb
|
119
114
|
- lib/ittybit/types/automation_status.rb
|
120
115
|
- lib/ittybit/types/automation_trigger.rb
|
121
|
-
- lib/ittybit/types/
|
116
|
+
- lib/ittybit/types/confirmation.rb
|
122
117
|
- lib/ittybit/types/confirmation_response.rb
|
123
|
-
- lib/ittybit/types/confirmation_response_data.rb
|
124
118
|
- lib/ittybit/types/error.rb
|
125
|
-
- lib/ittybit/types/error_response.rb
|
126
119
|
- lib/ittybit/types/file.rb
|
127
120
|
- lib/ittybit/types/file_kind.rb
|
128
121
|
- lib/ittybit/types/file_list_response.rb
|
@@ -138,10 +131,11 @@ files:
|
|
138
131
|
- lib/ittybit/types/media_source.rb
|
139
132
|
- lib/ittybit/types/media_source_kind.rb
|
140
133
|
- lib/ittybit/types/media_source_object.rb
|
134
|
+
- lib/ittybit/types/media_source_orientation.rb
|
141
135
|
- lib/ittybit/types/media_source_status.rb
|
142
|
-
- lib/ittybit/types/media_urls.rb
|
143
136
|
- lib/ittybit/types/meta.rb
|
144
137
|
- lib/ittybit/types/meta_list.rb
|
138
|
+
- lib/ittybit/types/meta_list_type.rb
|
145
139
|
- lib/ittybit/types/signature.rb
|
146
140
|
- lib/ittybit/types/signature_response.rb
|
147
141
|
- lib/ittybit/types/task.rb
|
@@ -155,6 +149,7 @@ files:
|
|
155
149
|
- lib/ittybit/types/task_summary_status.rb
|
156
150
|
- lib/ittybit/types/workflow_task_step.rb
|
157
151
|
- lib/ittybit/types/workflow_task_step_kind.rb
|
152
|
+
- lib/ittybit/types/workflow_task_step_next_item.rb
|
158
153
|
- lib/requests.rb
|
159
154
|
- lib/types_export.rb
|
160
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,89 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative "files_delete_response_data"
|
4
|
-
require_relative "../../types/meta"
|
5
|
-
require_relative "../../types/links"
|
6
|
-
require "ostruct"
|
7
|
-
require "json"
|
8
|
-
|
9
|
-
module Ittybit
|
10
|
-
class Files
|
11
|
-
class FilesDeleteResponse
|
12
|
-
# @return [Ittybit::Files::FilesDeleteResponseData] Contains a confirmation message
|
13
|
-
attr_reader :data
|
14
|
-
# @return [Ittybit::META]
|
15
|
-
attr_reader :meta
|
16
|
-
# @return [Ittybit::Links]
|
17
|
-
attr_reader :links
|
18
|
-
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
19
|
-
attr_reader :additional_properties
|
20
|
-
# @return [Object]
|
21
|
-
attr_reader :_field_set
|
22
|
-
protected :_field_set
|
23
|
-
|
24
|
-
OMIT = Object.new
|
25
|
-
|
26
|
-
# @param data [Ittybit::Files::FilesDeleteResponseData] Contains a confirmation message
|
27
|
-
# @param meta [Ittybit::META]
|
28
|
-
# @param links [Ittybit::Links]
|
29
|
-
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
30
|
-
# @return [Ittybit::Files::FilesDeleteResponse]
|
31
|
-
def initialize(data: OMIT, meta: OMIT, links: OMIT, additional_properties: nil)
|
32
|
-
@data = data if data != OMIT
|
33
|
-
@meta = meta if meta != OMIT
|
34
|
-
@links = links if links != OMIT
|
35
|
-
@additional_properties = additional_properties
|
36
|
-
@_field_set = { "data": data, "meta": meta, "links": links }.reject do |_k, v|
|
37
|
-
v == OMIT
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
# Deserialize a JSON object to an instance of FilesDeleteResponse
|
42
|
-
#
|
43
|
-
# @param json_object [String]
|
44
|
-
# @return [Ittybit::Files::FilesDeleteResponse]
|
45
|
-
def self.from_json(json_object:)
|
46
|
-
struct = JSON.parse(json_object, object_class: OpenStruct)
|
47
|
-
parsed_json = JSON.parse(json_object)
|
48
|
-
if parsed_json["data"].nil?
|
49
|
-
data = nil
|
50
|
-
else
|
51
|
-
data = parsed_json["data"].to_json
|
52
|
-
data = Ittybit::Files::FilesDeleteResponseData.from_json(json_object: data)
|
53
|
-
end
|
54
|
-
meta = parsed_json["meta"]
|
55
|
-
if parsed_json["links"].nil?
|
56
|
-
links = nil
|
57
|
-
else
|
58
|
-
links = parsed_json["links"].to_json
|
59
|
-
links = Ittybit::Links.from_json(json_object: links)
|
60
|
-
end
|
61
|
-
new(
|
62
|
-
data: data,
|
63
|
-
meta: meta,
|
64
|
-
links: links,
|
65
|
-
additional_properties: struct
|
66
|
-
)
|
67
|
-
end
|
68
|
-
|
69
|
-
# Serialize an instance of FilesDeleteResponse to a JSON object
|
70
|
-
#
|
71
|
-
# @return [String]
|
72
|
-
def to_json(*_args)
|
73
|
-
@_field_set&.to_json
|
74
|
-
end
|
75
|
-
|
76
|
-
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
77
|
-
# hash and check each fields type against the current object's property
|
78
|
-
# definitions.
|
79
|
-
#
|
80
|
-
# @param obj [Object]
|
81
|
-
# @return [Void]
|
82
|
-
def self.validate_raw(obj:)
|
83
|
-
obj.data.nil? || Ittybit::Files::FilesDeleteResponseData.validate_raw(obj: obj.data)
|
84
|
-
obj.meta&.is_a?(Object) != false || raise("Passed value for field obj.meta is not the expected type, validation failed.")
|
85
|
-
obj.links.nil? || Ittybit::Links.validate_raw(obj: obj.links)
|
86
|
-
end
|
87
|
-
end
|
88
|
-
end
|
89
|
-
end
|
@@ -1,60 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "ostruct"
|
4
|
-
require "json"
|
5
|
-
|
6
|
-
module Ittybit
|
7
|
-
class Files
|
8
|
-
# Contains a confirmation message
|
9
|
-
class FilesDeleteResponseData
|
10
|
-
# @return [String] Confirmation message
|
11
|
-
attr_reader :message
|
12
|
-
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
13
|
-
attr_reader :additional_properties
|
14
|
-
# @return [Object]
|
15
|
-
attr_reader :_field_set
|
16
|
-
protected :_field_set
|
17
|
-
|
18
|
-
OMIT = Object.new
|
19
|
-
|
20
|
-
# @param message [String] Confirmation message
|
21
|
-
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
22
|
-
# @return [Ittybit::Files::FilesDeleteResponseData]
|
23
|
-
def initialize(message: OMIT, additional_properties: nil)
|
24
|
-
@message = message if message != OMIT
|
25
|
-
@additional_properties = additional_properties
|
26
|
-
@_field_set = { "message": message }.reject do |_k, v|
|
27
|
-
v == OMIT
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
# Deserialize a JSON object to an instance of FilesDeleteResponseData
|
32
|
-
#
|
33
|
-
# @param json_object [String]
|
34
|
-
# @return [Ittybit::Files::FilesDeleteResponseData]
|
35
|
-
def self.from_json(json_object:)
|
36
|
-
struct = JSON.parse(json_object, object_class: OpenStruct)
|
37
|
-
parsed_json = JSON.parse(json_object)
|
38
|
-
message = parsed_json["message"]
|
39
|
-
new(message: message, additional_properties: struct)
|
40
|
-
end
|
41
|
-
|
42
|
-
# Serialize an instance of FilesDeleteResponseData to a JSON object
|
43
|
-
#
|
44
|
-
# @return [String]
|
45
|
-
def to_json(*_args)
|
46
|
-
@_field_set&.to_json
|
47
|
-
end
|
48
|
-
|
49
|
-
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
50
|
-
# hash and check each fields type against the current object's property
|
51
|
-
# definitions.
|
52
|
-
#
|
53
|
-
# @param obj [Object]
|
54
|
-
# @return [Void]
|
55
|
-
def self.validate_raw(obj:)
|
56
|
-
obj.message&.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
60
|
-
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
|
@@ -1,65 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "ostruct"
|
4
|
-
require "json"
|
5
|
-
|
6
|
-
module Ittybit
|
7
|
-
class AutomationTriggerConditionsItem
|
8
|
-
# @return [String] The property to check (e.g., file.type, file.size)
|
9
|
-
attr_reader :prop
|
10
|
-
# @return [String] The value the property must match
|
11
|
-
attr_reader :value
|
12
|
-
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
13
|
-
attr_reader :additional_properties
|
14
|
-
# @return [Object]
|
15
|
-
attr_reader :_field_set
|
16
|
-
protected :_field_set
|
17
|
-
|
18
|
-
OMIT = Object.new
|
19
|
-
|
20
|
-
# @param prop [String] The property to check (e.g., file.type, file.size)
|
21
|
-
# @param value [String] The value the property must match
|
22
|
-
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
23
|
-
# @return [Ittybit::AutomationTriggerConditionsItem]
|
24
|
-
def initialize(prop:, value:, additional_properties: nil)
|
25
|
-
@prop = prop
|
26
|
-
@value = value
|
27
|
-
@additional_properties = additional_properties
|
28
|
-
@_field_set = { "prop": prop, "value": value }
|
29
|
-
end
|
30
|
-
|
31
|
-
# Deserialize a JSON object to an instance of AutomationTriggerConditionsItem
|
32
|
-
#
|
33
|
-
# @param json_object [String]
|
34
|
-
# @return [Ittybit::AutomationTriggerConditionsItem]
|
35
|
-
def self.from_json(json_object:)
|
36
|
-
struct = JSON.parse(json_object, object_class: OpenStruct)
|
37
|
-
parsed_json = JSON.parse(json_object)
|
38
|
-
prop = parsed_json["prop"]
|
39
|
-
value = parsed_json["value"]
|
40
|
-
new(
|
41
|
-
prop: prop,
|
42
|
-
value: value,
|
43
|
-
additional_properties: struct
|
44
|
-
)
|
45
|
-
end
|
46
|
-
|
47
|
-
# Serialize an instance of AutomationTriggerConditionsItem to a JSON object
|
48
|
-
#
|
49
|
-
# @return [String]
|
50
|
-
def to_json(*_args)
|
51
|
-
@_field_set&.to_json
|
52
|
-
end
|
53
|
-
|
54
|
-
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
55
|
-
# hash and check each fields type against the current object's property
|
56
|
-
# definitions.
|
57
|
-
#
|
58
|
-
# @param obj [Object]
|
59
|
-
# @return [Void]
|
60
|
-
def self.validate_raw(obj:)
|
61
|
-
obj.prop.is_a?(String) != false || raise("Passed value for field obj.prop is not the expected type, validation failed.")
|
62
|
-
obj.value.is_a?(String) != false || raise("Passed value for field obj.value is not the expected type, validation failed.")
|
63
|
-
end
|
64
|
-
end
|
65
|
-
end
|