fetch_hive 0.2.8 → 0.3.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 (110) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/lib/fetch_hive/client.rb +17 -2
  4. data/lib/fetch_hive/generated/api/agent_chat_messages_api.rb +1 -1
  5. data/lib/fetch_hive/generated/api/agent_chats_api.rb +1 -1
  6. data/lib/fetch_hive/generated/api/agents_api.rb +190 -1
  7. data/lib/fetch_hive/generated/api/assets_api.rb +1 -1
  8. data/lib/fetch_hive/generated/api/hive_agents_api.rb +1 -1
  9. data/lib/fetch_hive/generated/api/knowledge_base_items_api.rb +1 -1
  10. data/lib/fetch_hive/generated/api/knowledge_bases_api.rb +1 -1
  11. data/lib/fetch_hive/generated/api/models_api.rb +1 -1
  12. data/lib/fetch_hive/generated/api/prompts_api.rb +1 -1
  13. data/lib/fetch_hive/generated/api/requests_api.rb +1 -1
  14. data/lib/fetch_hive/generated/api/search_services_api.rb +1 -1
  15. data/lib/fetch_hive/generated/api/workflows_api.rb +1 -1
  16. data/lib/fetch_hive/generated/api_client.rb +1 -1
  17. data/lib/fetch_hive/generated/api_error.rb +1 -1
  18. data/lib/fetch_hive/generated/api_model_base.rb +1 -1
  19. data/lib/fetch_hive/generated/configuration.rb +1 -1
  20. data/lib/fetch_hive/generated/models/agent_attachment.rb +1 -1
  21. data/lib/fetch_hive/generated/models/agent_attachment_one_of.rb +1 -1
  22. data/lib/fetch_hive/generated/models/agent_delegation.rb +383 -0
  23. data/lib/fetch_hive/generated/models/agent_invoke_async_config.rb +159 -0
  24. data/lib/fetch_hive/generated/models/agent_message.rb +1 -1
  25. data/lib/fetch_hive/generated/models/asset_object.rb +1 -1
  26. data/lib/fetch_hive/generated/models/asset_object_transcription.rb +1 -1
  27. data/lib/fetch_hive/generated/models/async_config.rb +1 -1
  28. data/lib/fetch_hive/generated/models/delete_public_workspaces_agents200_response.rb +1 -1
  29. data/lib/fetch_hive/generated/models/delete_public_workspaces_agents_chats200_response.rb +1 -1
  30. data/lib/fetch_hive/generated/models/delete_public_workspaces_agents_chats404_response.rb +1 -1
  31. data/lib/fetch_hive/generated/models/delete_public_workspaces_knowledge_bases200_response.rb +1 -1
  32. data/lib/fetch_hive/generated/models/delete_public_workspaces_knowledge_bases_items200_response.rb +1 -1
  33. data/lib/fetch_hive/generated/models/error_response.rb +1 -1
  34. data/lib/fetch_hive/generated/models/generated_artifact.rb +1 -1
  35. data/lib/fetch_hive/generated/models/get_public_models200_response_inner.rb +1 -1
  36. data/lib/fetch_hive/generated/models/get_public_requests200_response.rb +1 -1
  37. data/lib/fetch_hive/generated/models/get_public_requests404_response.rb +1 -1
  38. data/lib/fetch_hive/generated/models/get_public_search_services_countries200_response.rb +1 -1
  39. data/lib/fetch_hive/generated/models/get_public_search_services_countries200_response_services_inner.rb +1 -1
  40. data/lib/fetch_hive/generated/models/get_public_search_services_countries200_response_services_inner_countries_inner.rb +1 -1
  41. data/lib/fetch_hive/generated/models/get_public_search_services_countries2404_response.rb +1 -1
  42. data/lib/fetch_hive/generated/models/get_public_workspaces_agents200_response.rb +1 -1
  43. data/lib/fetch_hive/generated/models/get_public_workspaces_agents2200_response.rb +1 -1
  44. data/lib/fetch_hive/generated/models/get_public_workspaces_agents_chats200_response.rb +1 -1
  45. data/lib/fetch_hive/generated/models/get_public_workspaces_agents_chats_messages200_response.rb +1 -1
  46. data/lib/fetch_hive/generated/models/get_public_workspaces_agents_chats_messages200_response_messages_inner.rb +1 -1
  47. data/lib/fetch_hive/generated/models/get_public_workspaces_agents_chats_messages422_response.rb +1 -1
  48. data/lib/fetch_hive/generated/models/get_public_workspaces_assets200_response.rb +1 -1
  49. data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases200_response.rb +1 -1
  50. data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases2200_response.rb +1 -1
  51. data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases2422_response.rb +1 -1
  52. data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases_items200_response.rb +1 -1
  53. data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases_items200_response_knowledge_base_items_inner.rb +1 -1
  54. data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases_items2200_response.rb +1 -1
  55. data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases_items2422_response.rb +1 -1
  56. data/lib/fetch_hive/generated/models/hive_agent_async_config.rb +1 -1
  57. data/lib/fetch_hive/generated/models/hive_agent_sources.rb +1 -1
  58. data/lib/fetch_hive/generated/models/invoke_agent_request.rb +14 -5
  59. data/lib/fetch_hive/generated/models/invoke_agent_response.rb +17 -5
  60. data/lib/fetch_hive/generated/models/invoke_hive_agent_request.rb +56 -2
  61. data/lib/fetch_hive/generated/models/invoke_hive_agent_response.rb +1 -1
  62. data/lib/fetch_hive/generated/models/invoke_prompt_request.rb +1 -1
  63. data/lib/fetch_hive/generated/models/invoke_prompt_response.rb +1 -1
  64. data/lib/fetch_hive/generated/models/invoke_workflow_async_response.rb +1 -1
  65. data/lib/fetch_hive/generated/models/invoke_workflow_request.rb +1 -1
  66. data/lib/fetch_hive/generated/models/invoke_workflow_response.rb +1 -1
  67. data/lib/fetch_hive/generated/models/knowledge_base_object.rb +1 -1
  68. data/lib/fetch_hive/generated/models/list_thread_agent_delegations200_response.rb +166 -0
  69. data/lib/fetch_hive/generated/models/metadata_value.rb +1 -1
  70. data/lib/fetch_hive/generated/models/patch_public_workspaces_agents200_response.rb +1 -1
  71. data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_chats200_response.rb +1 -1
  72. data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_chats_clear_messages200_response.rb +1 -1
  73. data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_chats_request.rb +1 -1
  74. data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_chats_request_chat.rb +1 -1
  75. data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_request.rb +1 -1
  76. data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_request_agent.rb +1 -1
  77. data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases200_response.rb +1 -1
  78. data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases_items200_response.rb +1 -1
  79. data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases_items_request.rb +1 -1
  80. data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases_items_request_knowledge_base_item.rb +1 -1
  81. data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases_request.rb +1 -1
  82. data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases_request_knowledge_base.rb +1 -1
  83. data/lib/fetch_hive/generated/models/pending_delegation.rb +234 -0
  84. data/lib/fetch_hive/generated/models/post_public_workspaces_agents200_response.rb +1 -1
  85. data/lib/fetch_hive/generated/models/post_public_workspaces_agents422_response.rb +1 -1
  86. data/lib/fetch_hive/generated/models/post_public_workspaces_agents_chats200_response.rb +1 -1
  87. data/lib/fetch_hive/generated/models/post_public_workspaces_agents_chats200_response_chat.rb +1 -1
  88. data/lib/fetch_hive/generated/models/post_public_workspaces_agents_chats422_response.rb +1 -1
  89. data/lib/fetch_hive/generated/models/post_public_workspaces_agents_chats_request.rb +1 -1
  90. data/lib/fetch_hive/generated/models/post_public_workspaces_agents_chats_request_chat.rb +1 -1
  91. data/lib/fetch_hive/generated/models/post_public_workspaces_agents_request.rb +1 -1
  92. data/lib/fetch_hive/generated/models/post_public_workspaces_agents_request_agent.rb +1 -1
  93. data/lib/fetch_hive/generated/models/post_public_workspaces_assets200_response.rb +1 -1
  94. data/lib/fetch_hive/generated/models/post_public_workspaces_assets422_response.rb +1 -1
  95. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases200_response.rb +1 -1
  96. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_items200_response.rb +1 -1
  97. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_items422_response.rb +1 -1
  98. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_items_regenerate200_response.rb +1 -1
  99. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_items_request.rb +1 -1
  100. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_items_request_knowledge_base_item.rb +1 -1
  101. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_request.rb +1 -1
  102. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_request_knowledge_base.rb +1 -1
  103. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_search200_response.rb +1 -1
  104. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_search422_response.rb +1 -1
  105. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_search_request.rb +1 -1
  106. data/lib/fetch_hive/generated/models/sse_chunk.rb +1 -1
  107. data/lib/fetch_hive/generated/models/token_usage.rb +1 -1
  108. data/lib/fetch_hive/generated/models/tool_invocation.rb +1 -1
  109. data/lib/fetch_hive/generated/version.rb +1 -1
  110. metadata +6 -2
@@ -0,0 +1,166 @@
1
+ =begin
2
+ #Fetch Hive Public API
3
+
4
+ #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
+
6
+ The version of the OpenAPI document: 0.3.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module FetchHive::Generated
17
+ class ListThreadAgentDelegations200Response < ApiModelBase
18
+ attr_accessor :delegations
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'delegations' => :'delegations'
24
+ }
25
+ end
26
+
27
+ # Returns attribute mapping this model knows about
28
+ def self.acceptable_attribute_map
29
+ attribute_map
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ acceptable_attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'delegations' => :'Array<AgentDelegation>'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FetchHive::Generated::ListThreadAgentDelegations200Response` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ acceptable_attribute_map = self.class.acceptable_attribute_map
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!acceptable_attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FetchHive::Generated::ListThreadAgentDelegations200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'delegations')
67
+ if (value = attributes[:'delegations']).is_a?(Array)
68
+ self.delegations = value
69
+ end
70
+ else
71
+ self.delegations = nil
72
+ end
73
+ end
74
+
75
+ # Show invalid properties with the reasons. Usually used together with valid?
76
+ # @return Array for valid properties with the reasons
77
+ def list_invalid_properties
78
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
79
+ invalid_properties = Array.new
80
+ if @delegations.nil?
81
+ invalid_properties.push('invalid value for "delegations", delegations cannot be nil.')
82
+ end
83
+
84
+ invalid_properties
85
+ end
86
+
87
+ # Check to see if the all the properties in the model are valid
88
+ # @return true if the model is valid
89
+ def valid?
90
+ warn '[DEPRECATED] the `valid?` method is obsolete'
91
+ return false if @delegations.nil?
92
+ true
93
+ end
94
+
95
+ # Custom attribute writer method with validation
96
+ # @param [Object] delegations Value to be assigned
97
+ def delegations=(delegations)
98
+ if delegations.nil?
99
+ fail ArgumentError, 'delegations cannot be nil'
100
+ end
101
+
102
+ @delegations = delegations
103
+ end
104
+
105
+ # Checks equality by comparing each attribute.
106
+ # @param [Object] Object to be compared
107
+ def ==(o)
108
+ return true if self.equal?(o)
109
+ self.class == o.class &&
110
+ delegations == o.delegations
111
+ end
112
+
113
+ # @see the `==` method
114
+ # @param [Object] Object to be compared
115
+ def eql?(o)
116
+ self == o
117
+ end
118
+
119
+ # Calculates hash code according to all attributes.
120
+ # @return [Integer] Hash code
121
+ def hash
122
+ [delegations].hash
123
+ end
124
+
125
+ # Builds the object from hash
126
+ # @param [Hash] attributes Model attributes in the form of hash
127
+ # @return [Object] Returns the model itself
128
+ def self.build_from_hash(attributes)
129
+ return nil unless attributes.is_a?(Hash)
130
+ attributes = attributes.transform_keys(&:to_sym)
131
+ transformed_hash = {}
132
+ openapi_types.each_pair do |key, type|
133
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
134
+ transformed_hash["#{key}"] = nil
135
+ elsif type =~ /\AArray<(.*)>/i
136
+ # check to ensure the input is an array given that the attribute
137
+ # is documented as an array but the input is not
138
+ if attributes[attribute_map[key]].is_a?(Array)
139
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
140
+ end
141
+ elsif !attributes[attribute_map[key]].nil?
142
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
143
+ end
144
+ end
145
+ new(transformed_hash)
146
+ end
147
+
148
+ # Returns the object in the form of hash
149
+ # @return [Hash] Returns the object in the form of hash
150
+ def to_hash
151
+ hash = {}
152
+ self.class.attribute_map.each_pair do |attr, param|
153
+ value = self.send(attr)
154
+ if value.nil?
155
+ is_nullable = self.class.openapi_nullable.include?(attr)
156
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
157
+ end
158
+
159
+ hash[param] = _to_hash(value)
160
+ end
161
+ hash
162
+ end
163
+
164
+ end
165
+
166
+ end
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.3.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.3.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.3.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.3.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.3.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.3.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.3.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.3.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.3.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.3.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.3.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.3.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.3.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.3.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -0,0 +1,234 @@
1
+ =begin
2
+ #Fetch Hive Public API
3
+
4
+ #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
+
6
+ The version of the OpenAPI document: 0.3.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module FetchHive::Generated
17
+ class PendingDelegation < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :kind
21
+
22
+ attr_accessor :target
23
+
24
+ attr_accessor :expected_by
25
+
26
+ class EnumAttributeValidator
27
+ attr_reader :datatype
28
+ attr_reader :allowable_values
29
+
30
+ def initialize(datatype, allowable_values)
31
+ @allowable_values = allowable_values.map do |value|
32
+ case datatype.to_s
33
+ when /Integer/i
34
+ value.to_i
35
+ when /Float/i
36
+ value.to_f
37
+ else
38
+ value
39
+ end
40
+ end
41
+ end
42
+
43
+ def valid?(value)
44
+ !value || allowable_values.include?(value)
45
+ end
46
+ end
47
+
48
+ # Attribute mapping from ruby-style variable name to JSON key.
49
+ def self.attribute_map
50
+ {
51
+ :'id' => :'id',
52
+ :'kind' => :'kind',
53
+ :'target' => :'target',
54
+ :'expected_by' => :'expected_by'
55
+ }
56
+ end
57
+
58
+ # Returns attribute mapping this model knows about
59
+ def self.acceptable_attribute_map
60
+ attribute_map
61
+ end
62
+
63
+ # Returns all the JSON keys this model knows about
64
+ def self.acceptable_attributes
65
+ acceptable_attribute_map.values
66
+ end
67
+
68
+ # Attribute type mapping.
69
+ def self.openapi_types
70
+ {
71
+ :'id' => :'String',
72
+ :'kind' => :'String',
73
+ :'target' => :'Hash<String, Object>',
74
+ :'expected_by' => :'Time'
75
+ }
76
+ end
77
+
78
+ # List of attributes with nullable: true
79
+ def self.openapi_nullable
80
+ Set.new([
81
+ ])
82
+ end
83
+
84
+ # Initializes the object
85
+ # @param [Hash] attributes Model attributes in the form of hash
86
+ def initialize(attributes = {})
87
+ if (!attributes.is_a?(Hash))
88
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FetchHive::Generated::PendingDelegation` initialize method"
89
+ end
90
+
91
+ # check to see if the attribute exists and convert string to symbol for hash key
92
+ acceptable_attribute_map = self.class.acceptable_attribute_map
93
+ attributes = attributes.each_with_object({}) { |(k, v), h|
94
+ if (!acceptable_attribute_map.key?(k.to_sym))
95
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FetchHive::Generated::PendingDelegation`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
96
+ end
97
+ h[k.to_sym] = v
98
+ }
99
+
100
+ if attributes.key?(:'id')
101
+ self.id = attributes[:'id']
102
+ else
103
+ self.id = nil
104
+ end
105
+
106
+ if attributes.key?(:'kind')
107
+ self.kind = attributes[:'kind']
108
+ else
109
+ self.kind = nil
110
+ end
111
+
112
+ if attributes.key?(:'target')
113
+ if (value = attributes[:'target']).is_a?(Hash)
114
+ self.target = value
115
+ end
116
+ end
117
+
118
+ if attributes.key?(:'expected_by')
119
+ self.expected_by = attributes[:'expected_by']
120
+ end
121
+ end
122
+
123
+ # Show invalid properties with the reasons. Usually used together with valid?
124
+ # @return Array for valid properties with the reasons
125
+ def list_invalid_properties
126
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
127
+ invalid_properties = Array.new
128
+ if @id.nil?
129
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
130
+ end
131
+
132
+ if @kind.nil?
133
+ invalid_properties.push('invalid value for "kind", kind cannot be nil.')
134
+ end
135
+
136
+ invalid_properties
137
+ end
138
+
139
+ # Check to see if the all the properties in the model are valid
140
+ # @return true if the model is valid
141
+ def valid?
142
+ warn '[DEPRECATED] the `valid?` method is obsolete'
143
+ return false if @id.nil?
144
+ return false if @kind.nil?
145
+ kind_validator = EnumAttributeValidator.new('String', ["workflow"])
146
+ return false unless kind_validator.valid?(@kind)
147
+ true
148
+ end
149
+
150
+ # Custom attribute writer method with validation
151
+ # @param [Object] id Value to be assigned
152
+ def id=(id)
153
+ if id.nil?
154
+ fail ArgumentError, 'id cannot be nil'
155
+ end
156
+
157
+ @id = id
158
+ end
159
+
160
+ # Custom attribute writer method checking allowed values (enum).
161
+ # @param [Object] kind Object to be assigned
162
+ def kind=(kind)
163
+ validator = EnumAttributeValidator.new('String', ["workflow"])
164
+ unless validator.valid?(kind)
165
+ fail ArgumentError, "invalid value for \"kind\", must be one of #{validator.allowable_values}."
166
+ end
167
+ @kind = kind
168
+ end
169
+
170
+ # Checks equality by comparing each attribute.
171
+ # @param [Object] Object to be compared
172
+ def ==(o)
173
+ return true if self.equal?(o)
174
+ self.class == o.class &&
175
+ id == o.id &&
176
+ kind == o.kind &&
177
+ target == o.target &&
178
+ expected_by == o.expected_by
179
+ end
180
+
181
+ # @see the `==` method
182
+ # @param [Object] Object to be compared
183
+ def eql?(o)
184
+ self == o
185
+ end
186
+
187
+ # Calculates hash code according to all attributes.
188
+ # @return [Integer] Hash code
189
+ def hash
190
+ [id, kind, target, expected_by].hash
191
+ end
192
+
193
+ # Builds the object from hash
194
+ # @param [Hash] attributes Model attributes in the form of hash
195
+ # @return [Object] Returns the model itself
196
+ def self.build_from_hash(attributes)
197
+ return nil unless attributes.is_a?(Hash)
198
+ attributes = attributes.transform_keys(&:to_sym)
199
+ transformed_hash = {}
200
+ openapi_types.each_pair do |key, type|
201
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
202
+ transformed_hash["#{key}"] = nil
203
+ elsif type =~ /\AArray<(.*)>/i
204
+ # check to ensure the input is an array given that the attribute
205
+ # is documented as an array but the input is not
206
+ if attributes[attribute_map[key]].is_a?(Array)
207
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
208
+ end
209
+ elsif !attributes[attribute_map[key]].nil?
210
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
211
+ end
212
+ end
213
+ new(transformed_hash)
214
+ end
215
+
216
+ # Returns the object in the form of hash
217
+ # @return [Hash] Returns the object in the form of hash
218
+ def to_hash
219
+ hash = {}
220
+ self.class.attribute_map.each_pair do |attr, param|
221
+ value = self.send(attr)
222
+ if value.nil?
223
+ is_nullable = self.class.openapi_nullable.include?(attr)
224
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
225
+ end
226
+
227
+ hash[param] = _to_hash(value)
228
+ end
229
+ hash
230
+ end
231
+
232
+ end
233
+
234
+ end
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.3.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.3.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.3.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.3.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.3.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.3.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.3.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.3.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.3.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.8
6
+ The version of the OpenAPI document: 0.3.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0