fetch_hive 0.3.0 → 0.4.1
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/README.md +23 -2
- data/lib/fetch_hive/client.rb +30 -3
- data/lib/fetch_hive/generated/api/agent_chat_messages_api.rb +2 -2
- data/lib/fetch_hive/generated/api/agent_chats_api.rb +2 -2
- data/lib/fetch_hive/generated/api/agents_api.rb +3 -3
- data/lib/fetch_hive/generated/api/assets_api.rb +2 -2
- data/lib/fetch_hive/generated/api/hive_agents_api.rb +2 -2
- data/lib/fetch_hive/generated/api/knowledge_base_items_api.rb +2 -2
- data/lib/fetch_hive/generated/api/knowledge_bases_api.rb +2 -2
- data/lib/fetch_hive/generated/api/models_api.rb +2 -2
- data/lib/fetch_hive/generated/api/prompts_api.rb +2 -2
- data/lib/fetch_hive/generated/api/requests_api.rb +2 -2
- data/lib/fetch_hive/generated/api/search_services_api.rb +2 -2
- data/lib/fetch_hive/generated/api/tool_action_approvals_api.rb +244 -0
- data/lib/fetch_hive/generated/api/workflows_api.rb +2 -2
- data/lib/fetch_hive/generated/api_client.rb +2 -2
- data/lib/fetch_hive/generated/api_error.rb +2 -2
- data/lib/fetch_hive/generated/api_model_base.rb +2 -2
- data/lib/fetch_hive/generated/configuration.rb +2 -2
- data/lib/fetch_hive/generated/models/agent_attachment.rb +2 -2
- data/lib/fetch_hive/generated/models/agent_attachment_one_of.rb +2 -2
- data/lib/fetch_hive/generated/models/agent_delegation.rb +2 -2
- data/lib/fetch_hive/generated/models/agent_invoke_async_config.rb +2 -2
- data/lib/fetch_hive/generated/models/agent_message.rb +2 -2
- data/lib/fetch_hive/generated/models/asset_object.rb +2 -2
- data/lib/fetch_hive/generated/models/asset_object_transcription.rb +2 -2
- data/lib/fetch_hive/generated/models/async_config.rb +2 -2
- data/lib/fetch_hive/generated/models/delete_public_workspaces_agents200_response.rb +2 -2
- data/lib/fetch_hive/generated/models/delete_public_workspaces_agents_chats200_response.rb +2 -2
- data/lib/fetch_hive/generated/models/delete_public_workspaces_agents_chats404_response.rb +2 -2
- data/lib/fetch_hive/generated/models/delete_public_workspaces_knowledge_bases200_response.rb +2 -2
- data/lib/fetch_hive/generated/models/delete_public_workspaces_knowledge_bases_items200_response.rb +2 -2
- data/lib/fetch_hive/generated/models/denied_tool_call.rb +223 -0
- data/lib/fetch_hive/generated/models/error_response.rb +2 -2
- data/lib/fetch_hive/generated/models/generated_artifact.rb +2 -2
- data/lib/fetch_hive/generated/models/get_public_models200_response_inner.rb +2 -2
- data/lib/fetch_hive/generated/models/get_public_requests200_response.rb +2 -2
- data/lib/fetch_hive/generated/models/get_public_requests404_response.rb +2 -2
- data/lib/fetch_hive/generated/models/get_public_search_services_countries200_response.rb +2 -2
- data/lib/fetch_hive/generated/models/get_public_search_services_countries200_response_services_inner.rb +2 -2
- data/lib/fetch_hive/generated/models/get_public_search_services_countries200_response_services_inner_countries_inner.rb +2 -2
- data/lib/fetch_hive/generated/models/get_public_search_services_countries2404_response.rb +2 -2
- data/lib/fetch_hive/generated/models/get_public_workspaces_agents200_response.rb +2 -2
- data/lib/fetch_hive/generated/models/get_public_workspaces_agents2200_response.rb +2 -2
- data/lib/fetch_hive/generated/models/get_public_workspaces_agents_chats200_response.rb +2 -2
- data/lib/fetch_hive/generated/models/get_public_workspaces_agents_chats_messages200_response.rb +2 -2
- data/lib/fetch_hive/generated/models/get_public_workspaces_agents_chats_messages200_response_messages_inner.rb +2 -2
- data/lib/fetch_hive/generated/models/get_public_workspaces_agents_chats_messages422_response.rb +2 -2
- data/lib/fetch_hive/generated/models/get_public_workspaces_assets200_response.rb +2 -2
- data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases200_response.rb +2 -2
- data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases2200_response.rb +2 -2
- data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases2422_response.rb +2 -2
- data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases_items200_response.rb +2 -2
- data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases_items200_response_knowledge_base_items_inner.rb +2 -2
- data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases_items2200_response.rb +2 -2
- data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases_items2422_response.rb +2 -2
- data/lib/fetch_hive/generated/models/get_public_workspaces_tool_action_approvals200_response.rb +149 -0
- data/lib/fetch_hive/generated/models/get_public_workspaces_tool_action_approvals2200_response.rb +147 -0
- data/lib/fetch_hive/generated/models/hive_agent_async_config.rb +2 -2
- data/lib/fetch_hive/generated/models/hive_agent_sources.rb +2 -2
- data/lib/fetch_hive/generated/models/invoke_agent_request.rb +62 -6
- data/lib/fetch_hive/generated/models/invoke_agent_request_decided_tool_approvals_inner.rb +164 -0
- data/lib/fetch_hive/generated/models/invoke_agent_response.rb +116 -4
- data/lib/fetch_hive/generated/models/invoke_agent_response_auto_approved_tool_calls_inner.rb +190 -0
- data/lib/fetch_hive/generated/models/invoke_hive_agent_request.rb +2 -2
- data/lib/fetch_hive/generated/models/invoke_hive_agent_response.rb +2 -2
- data/lib/fetch_hive/generated/models/invoke_prompt_request.rb +2 -2
- data/lib/fetch_hive/generated/models/invoke_prompt_response.rb +2 -2
- data/lib/fetch_hive/generated/models/invoke_workflow_async_response.rb +2 -2
- data/lib/fetch_hive/generated/models/invoke_workflow_request.rb +50 -6
- data/lib/fetch_hive/generated/models/invoke_workflow_response.rb +2 -2
- data/lib/fetch_hive/generated/models/knowledge_base_object.rb +2 -2
- data/lib/fetch_hive/generated/models/list_thread_agent_delegations200_response.rb +2 -2
- data/lib/fetch_hive/generated/models/metadata_value.rb +2 -2
- data/lib/fetch_hive/generated/models/patch_public_workspaces_agents200_response.rb +2 -2
- data/lib/fetch_hive/generated/models/patch_public_workspaces_agents422_response.rb +173 -0
- data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_chats200_response.rb +2 -2
- data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_chats_clear_messages200_response.rb +2 -2
- data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_chats_request.rb +2 -2
- data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_chats_request_chat.rb +2 -2
- data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_request.rb +2 -2
- data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_request_agent.rb +28 -6
- data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases200_response.rb +2 -2
- data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases_items200_response.rb +2 -2
- data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases_items_request.rb +2 -2
- data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases_items_request_knowledge_base_item.rb +2 -2
- data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases_request.rb +2 -2
- data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases_request_knowledge_base.rb +2 -2
- data/lib/fetch_hive/generated/models/pending_delegation.rb +2 -2
- data/lib/fetch_hive/generated/models/pending_tool_approval.rb +247 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_agents200_response.rb +2 -2
- data/lib/fetch_hive/generated/models/post_public_workspaces_agents422_response.rb +2 -2
- data/lib/fetch_hive/generated/models/post_public_workspaces_agents_chats200_response.rb +2 -2
- data/lib/fetch_hive/generated/models/post_public_workspaces_agents_chats200_response_chat.rb +2 -2
- data/lib/fetch_hive/generated/models/post_public_workspaces_agents_chats422_response.rb +2 -2
- data/lib/fetch_hive/generated/models/post_public_workspaces_agents_chats_request.rb +2 -2
- data/lib/fetch_hive/generated/models/post_public_workspaces_agents_chats_request_chat.rb +2 -2
- data/lib/fetch_hive/generated/models/post_public_workspaces_agents_request.rb +2 -2
- data/lib/fetch_hive/generated/models/post_public_workspaces_agents_request_agent.rb +2 -2
- data/lib/fetch_hive/generated/models/post_public_workspaces_assets200_response.rb +2 -2
- data/lib/fetch_hive/generated/models/post_public_workspaces_assets422_response.rb +2 -2
- data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases200_response.rb +2 -2
- data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_items200_response.rb +2 -2
- data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_items422_response.rb +2 -2
- data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_items_regenerate200_response.rb +2 -2
- data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_items_request.rb +2 -2
- data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_items_request_knowledge_base_item.rb +2 -2
- data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_request.rb +2 -2
- data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_request_knowledge_base.rb +2 -2
- data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_search200_response.rb +2 -2
- data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_search422_response.rb +2 -2
- data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_search_request.rb +2 -2
- data/lib/fetch_hive/generated/models/post_public_workspaces_tool_action_approvals_decide_request.rb +188 -0
- data/lib/fetch_hive/generated/models/sse_chunk.rb +126 -4
- data/lib/fetch_hive/generated/models/sse_chunk_auto_approved_tool_calls_inner.rb +156 -0
- data/lib/fetch_hive/generated/models/token_usage.rb +2 -2
- data/lib/fetch_hive/generated/models/tool_action_approval_object.rb +701 -0
- data/lib/fetch_hive/generated/models/tool_action_approval_object_approval_votes_inner.rb +156 -0
- data/lib/fetch_hive/generated/models/tool_action_approval_object_arguments_edited_by.rb +158 -0
- data/lib/fetch_hive/generated/models/tool_action_approval_object_batch_items_inner.rb +190 -0
- data/lib/fetch_hive/generated/models/tool_action_approval_object_capabilities.rb +157 -0
- data/lib/fetch_hive/generated/models/tool_action_approval_object_decided_by_user.rb +188 -0
- data/lib/fetch_hive/generated/models/tool_action_approval_object_requested_by.rb +179 -0
- data/lib/fetch_hive/generated/models/tool_invocation.rb +2 -2
- data/lib/fetch_hive/generated/version.rb +2 -2
- metadata +19 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1f132de820a53548f26847ffc81193dcf49a29acfe66fbbbc30f6c767e3980af
|
|
4
|
+
data.tar.gz: 6e26b648028650ce77368431857d9ff9e3826b005222a80d13313e94a027cd82
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8e72b8e4eaa855eb30d3fe0a6723b8c9f52cf208cbb6e582d3faec9b4700a95e49e90d2c1f9e159009279eb31e3bea49cc448be5f6f3fbfa88c5a9a43b84d69b
|
|
7
|
+
data.tar.gz: ad666ed3e40b73e6165fc625d7f78de08a63ce7a69eb93765c8ec1a1979da7344e96363080c482e5fce410b6209bd88b4e5479737497dd21ba9cc6dc286e36df
|
data/README.md
CHANGED
|
@@ -9,7 +9,7 @@ Official Ruby SDK for [Fetch Hive](https://fetchhive.com) — invoke AI prompts,
|
|
|
9
9
|
Add to your `Gemfile`:
|
|
10
10
|
|
|
11
11
|
```ruby
|
|
12
|
-
gem "fetch_hive", "~> 0.
|
|
12
|
+
gem "fetch_hive", "~> 0.4.1"
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
Then run:
|
|
@@ -110,6 +110,27 @@ client.invoke_agent_stream(
|
|
|
110
110
|
end
|
|
111
111
|
```
|
|
112
112
|
|
|
113
|
+
## Tool approvals
|
|
114
|
+
|
|
115
|
+
`tool_approval` is optional on `invoke_agent`, `invoke_agent_stream`, and `invoke_workflow`. Omit it, or pass `"policy"`, to follow saved rules. `"auto_approve"` applies to this call only, and only when the API key is allowed to auto-approve actions.
|
|
116
|
+
|
|
117
|
+
When a response has `status` `"awaiting_approval"`, decide with the API key. The run resumes on the server. Do not send `decided_tool_approvals`.
|
|
118
|
+
|
|
119
|
+
```ruby
|
|
120
|
+
client.decide_tool_action_approval(workspace_id: "WORKSPACE_ID", id: "APPROVAL_ID", decision: "allow_once")
|
|
121
|
+
|
|
122
|
+
pending = client.list_tool_action_approvals(workspace_id: "WORKSPACE_ID", status: "pending")
|
|
123
|
+
one = client.get_tool_action_approval(workspace_id: "WORKSPACE_ID", id: "APPROVAL_ID")
|
|
124
|
+
|
|
125
|
+
reply = client.invoke_agent(
|
|
126
|
+
agent: "my-agent",
|
|
127
|
+
message: "Send the follow-up",
|
|
128
|
+
tool_approval: "auto_approve"
|
|
129
|
+
)
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
`decision` is `"allow_once"` or `"deny"`. `always_allow` is only available in the dashboard.
|
|
133
|
+
|
|
113
134
|
## Multimodal (image) inputs
|
|
114
135
|
|
|
115
136
|
```ruby
|
|
@@ -149,7 +170,7 @@ client = FetchHive::Client.new # picks up FETCH_HIVE_API_KEY automatically
|
|
|
149
170
|
|
|
150
171
|
## Version
|
|
151
172
|
|
|
152
|
-
0.
|
|
173
|
+
0.4.1
|
|
153
174
|
|
|
154
175
|
## License
|
|
155
176
|
|
data/lib/fetch_hive/client.rb
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require "faraday"
|
|
4
4
|
require "json"
|
|
5
|
+
require "uri"
|
|
5
6
|
require_relative "streaming"
|
|
6
7
|
|
|
7
8
|
module FetchHive
|
|
@@ -65,12 +66,13 @@ module FetchHive
|
|
|
65
66
|
# ── Workflow ────────────────────────────────────────────────────────────────
|
|
66
67
|
|
|
67
68
|
# Invoke a workflow deployment (sync or async).
|
|
68
|
-
def invoke_workflow(deployment:, variant: nil, inputs: nil, async_mode: false, callback_url: nil, user: nil, metadata: nil)
|
|
69
|
+
def invoke_workflow(deployment:, variant: nil, inputs: nil, async_mode: false, callback_url: nil, user: nil, metadata: nil, tool_approval: nil)
|
|
69
70
|
body = { deployment: deployment }
|
|
70
71
|
body[:variant] = variant if variant
|
|
71
72
|
body[:inputs] = inputs if inputs
|
|
72
73
|
body[:user] = user if user
|
|
73
74
|
body[:metadata] = metadata if metadata
|
|
75
|
+
body[:tool_approval] = tool_approval if tool_approval
|
|
74
76
|
if async_mode
|
|
75
77
|
body[:async] = { enabled: true }
|
|
76
78
|
body[:async][:callback_url] = callback_url if callback_url
|
|
@@ -81,7 +83,7 @@ module FetchHive
|
|
|
81
83
|
# ── Agent ───────────────────────────────────────────────────────────────────
|
|
82
84
|
|
|
83
85
|
# Send a message to an agent and return the full response hash.
|
|
84
|
-
def invoke_agent(agent:, message:, thread_id: nil, user: nil, metadata: nil, messages: nil, image_urls: nil, attachments: nil, known_artifact_refs: nil, artifact_refs: nil, async: nil)
|
|
86
|
+
def invoke_agent(agent:, message:, thread_id: nil, user: nil, metadata: nil, messages: nil, image_urls: nil, attachments: nil, known_artifact_refs: nil, artifact_refs: nil, async: nil, tool_approval: nil)
|
|
85
87
|
body = { agent: agent, message: message, streaming: false }
|
|
86
88
|
body[:thread_id] = thread_id if thread_id
|
|
87
89
|
body[:user] = user if user
|
|
@@ -90,13 +92,14 @@ module FetchHive
|
|
|
90
92
|
body[:attachments] = attachments || image_urls if attachments || image_urls
|
|
91
93
|
body[:known_artifact_refs] = known_artifact_refs if known_artifact_refs
|
|
92
94
|
body[:artifact_refs] = artifact_refs if artifact_refs
|
|
95
|
+
body[:tool_approval] = tool_approval if tool_approval
|
|
93
96
|
body[:async] = async if async
|
|
94
97
|
post("/agent/invoke", body)
|
|
95
98
|
end
|
|
96
99
|
|
|
97
100
|
# Send a message to an agent and stream SSE events.
|
|
98
101
|
# Yields each parsed event hash. Returns an Enumerator when no block given.
|
|
99
|
-
def invoke_agent_stream(agent:, message:, thread_id: nil, user: nil, metadata: nil, messages: nil, image_urls: nil, attachments: nil, known_artifact_refs: nil, artifact_refs: nil, &block)
|
|
102
|
+
def invoke_agent_stream(agent:, message:, thread_id: nil, user: nil, metadata: nil, messages: nil, image_urls: nil, attachments: nil, known_artifact_refs: nil, artifact_refs: nil, tool_approval: nil, &block)
|
|
100
103
|
body = { agent: agent, message: message, streaming: true }
|
|
101
104
|
body[:thread_id] = thread_id if thread_id
|
|
102
105
|
body[:user] = user if user
|
|
@@ -105,6 +108,7 @@ module FetchHive
|
|
|
105
108
|
body[:attachments] = attachments || image_urls if attachments || image_urls
|
|
106
109
|
body[:known_artifact_refs] = known_artifact_refs if known_artifact_refs
|
|
107
110
|
body[:artifact_refs] = artifact_refs if artifact_refs
|
|
111
|
+
body[:tool_approval] = tool_approval if tool_approval
|
|
108
112
|
post_stream("/agent/invoke", body, &block)
|
|
109
113
|
end
|
|
110
114
|
|
|
@@ -144,6 +148,29 @@ module FetchHive
|
|
|
144
148
|
request("GET", "/agent/threads/#{thread_id}/delegations")
|
|
145
149
|
end
|
|
146
150
|
|
|
151
|
+
# List tool-action approvals. The server defaults status to pending.
|
|
152
|
+
def list_tool_action_approvals(workspace_id:, status: nil, agent_id: nil, run_id: nil, request_id: nil, cursor: nil, limit: nil)
|
|
153
|
+
pairs = []
|
|
154
|
+
pairs << ["status", status] if status
|
|
155
|
+
pairs << ["agent_id", agent_id] if agent_id
|
|
156
|
+
pairs << ["run_id", run_id] if run_id
|
|
157
|
+
pairs << ["request_id", request_id] if request_id
|
|
158
|
+
pairs << ["cursor", cursor] if cursor
|
|
159
|
+
pairs << ["limit", limit] unless limit.nil?
|
|
160
|
+
path = "/public/workspaces/#{workspace_id}/tool_action_approvals"
|
|
161
|
+
path = "#{path}?#{URI.encode_www_form(pairs)}" unless pairs.empty?
|
|
162
|
+
request("GET", path)
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
def get_tool_action_approval(workspace_id:, id:)
|
|
166
|
+
request("GET", "/public/workspaces/#{workspace_id}/tool_action_approvals/#{id}")
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# decision is "allow_once" or "deny". An API-key run resumes on the server.
|
|
170
|
+
def decide_tool_action_approval(workspace_id:, id:, decision:)
|
|
171
|
+
post("/public/workspaces/#{workspace_id}/tool_action_approvals/#{id}/decide", { decision: decision })
|
|
172
|
+
end
|
|
173
|
+
|
|
147
174
|
def list_knowledge_bases(workspace_id:)
|
|
148
175
|
request("GET", "/public/workspaces/#{workspace_id}/knowledge_bases")
|
|
149
176
|
end
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Fetch Hive Public API
|
|
3
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`.
|
|
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> ``` ## Breaking Error responses use `error_code`. The previous field name `code` is not returned. ## 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.
|
|
6
|
+
The version of the OpenAPI document: 0.4.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Fetch Hive Public API
|
|
3
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`.
|
|
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> ``` ## Breaking Error responses use `error_code`. The previous field name `code` is not returned. ## 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.
|
|
6
|
+
The version of the OpenAPI document: 0.4.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Fetch Hive Public API
|
|
3
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`.
|
|
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> ``` ## Breaking Error responses use `error_code`. The previous field name `code` is not returned. ## 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.
|
|
6
|
+
The version of the OpenAPI document: 0.4.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -378,7 +378,7 @@ module FetchHive::Generated
|
|
|
378
378
|
# header parameters
|
|
379
379
|
header_params = opts[:header_params] || {}
|
|
380
380
|
# HTTP header 'Accept' (if needed)
|
|
381
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
381
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/event-stream']) unless header_params['Accept']
|
|
382
382
|
# HTTP header 'Content-Type'
|
|
383
383
|
content_type = @api_client.select_header_content_type(['application/json'])
|
|
384
384
|
if !content_type.nil?
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Fetch Hive Public API
|
|
3
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`.
|
|
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> ``` ## Breaking Error responses use `error_code`. The previous field name `code` is not returned. ## 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.
|
|
6
|
+
The version of the OpenAPI document: 0.4.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Fetch Hive Public API
|
|
3
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`.
|
|
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> ``` ## Breaking Error responses use `error_code`. The previous field name `code` is not returned. ## 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.
|
|
6
|
+
The version of the OpenAPI document: 0.4.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Fetch Hive Public API
|
|
3
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`.
|
|
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> ``` ## Breaking Error responses use `error_code`. The previous field name `code` is not returned. ## 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.
|
|
6
|
+
The version of the OpenAPI document: 0.4.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Fetch Hive Public API
|
|
3
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`.
|
|
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> ``` ## Breaking Error responses use `error_code`. The previous field name `code` is not returned. ## 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.
|
|
6
|
+
The version of the OpenAPI document: 0.4.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Fetch Hive Public API
|
|
3
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`.
|
|
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> ``` ## Breaking Error responses use `error_code`. The previous field name `code` is not returned. ## 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.
|
|
6
|
+
The version of the OpenAPI document: 0.4.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Fetch Hive Public API
|
|
3
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`.
|
|
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> ``` ## Breaking Error responses use `error_code`. The previous field name `code` is not returned. ## 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.
|
|
6
|
+
The version of the OpenAPI document: 0.4.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Fetch Hive Public API
|
|
3
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`.
|
|
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> ``` ## Breaking Error responses use `error_code`. The previous field name `code` is not returned. ## 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.
|
|
6
|
+
The version of the OpenAPI document: 0.4.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Fetch Hive Public API
|
|
3
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`.
|
|
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> ``` ## Breaking Error responses use `error_code`. The previous field name `code` is not returned. ## 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.
|
|
6
|
+
The version of the OpenAPI document: 0.4.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -0,0 +1,244 @@
|
|
|
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> ``` ## Breaking Error responses use `error_code`. The previous field name `code` is not returned. ## 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.4.1
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module FetchHive::Generated
|
|
16
|
+
class ToolActionApprovalsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# List tool action approvals
|
|
23
|
+
# @param workspace_id [String]
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @option opts [String] :status
|
|
26
|
+
# @option opts [String] :agent_id
|
|
27
|
+
# @option opts [String] :run_id
|
|
28
|
+
# @option opts [String] :request_id
|
|
29
|
+
# @option opts [String] :cursor
|
|
30
|
+
# @option opts [Integer] :limit
|
|
31
|
+
# @return [GetPublicWorkspacesToolActionApprovals200Response]
|
|
32
|
+
def get_public_workspaces_tool_action_approvals(workspace_id, opts = {})
|
|
33
|
+
data, _status_code, _headers = get_public_workspaces_tool_action_approvals_with_http_info(workspace_id, opts)
|
|
34
|
+
data
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# List tool action approvals
|
|
38
|
+
# @param workspace_id [String]
|
|
39
|
+
# @param [Hash] opts the optional parameters
|
|
40
|
+
# @option opts [String] :status
|
|
41
|
+
# @option opts [String] :agent_id
|
|
42
|
+
# @option opts [String] :run_id
|
|
43
|
+
# @option opts [String] :request_id
|
|
44
|
+
# @option opts [String] :cursor
|
|
45
|
+
# @option opts [Integer] :limit
|
|
46
|
+
# @return [Array<(GetPublicWorkspacesToolActionApprovals200Response, Integer, Hash)>] GetPublicWorkspacesToolActionApprovals200Response data, response status code and response headers
|
|
47
|
+
def get_public_workspaces_tool_action_approvals_with_http_info(workspace_id, opts = {})
|
|
48
|
+
if @api_client.config.debugging
|
|
49
|
+
@api_client.config.logger.debug 'Calling API: ToolActionApprovalsApi.get_public_workspaces_tool_action_approvals ...'
|
|
50
|
+
end
|
|
51
|
+
# verify the required parameter 'workspace_id' is set
|
|
52
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
53
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling ToolActionApprovalsApi.get_public_workspaces_tool_action_approvals"
|
|
54
|
+
end
|
|
55
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 50
|
|
56
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ToolActionApprovalsApi.get_public_workspaces_tool_action_approvals, must be smaller than or equal to 50.'
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# resource path
|
|
60
|
+
local_var_path = '/public/workspaces/{workspace_id}/tool_action_approvals'.sub('{workspace_id}', CGI.escape(workspace_id.to_s))
|
|
61
|
+
|
|
62
|
+
# query parameters
|
|
63
|
+
query_params = opts[:query_params] || {}
|
|
64
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
|
65
|
+
query_params[:'agent_id'] = opts[:'agent_id'] if !opts[:'agent_id'].nil?
|
|
66
|
+
query_params[:'run_id'] = opts[:'run_id'] if !opts[:'run_id'].nil?
|
|
67
|
+
query_params[:'request_id'] = opts[:'request_id'] if !opts[:'request_id'].nil?
|
|
68
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
69
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
70
|
+
|
|
71
|
+
# header parameters
|
|
72
|
+
header_params = opts[:header_params] || {}
|
|
73
|
+
# HTTP header 'Accept' (if needed)
|
|
74
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
75
|
+
|
|
76
|
+
# form parameters
|
|
77
|
+
form_params = opts[:form_params] || {}
|
|
78
|
+
|
|
79
|
+
# http body (model)
|
|
80
|
+
post_body = opts[:debug_body]
|
|
81
|
+
|
|
82
|
+
# return_type
|
|
83
|
+
return_type = opts[:debug_return_type] || 'GetPublicWorkspacesToolActionApprovals200Response'
|
|
84
|
+
|
|
85
|
+
# auth_names
|
|
86
|
+
auth_names = opts[:debug_auth_names] || ['bearer_auth']
|
|
87
|
+
|
|
88
|
+
new_options = opts.merge(
|
|
89
|
+
:operation => :"ToolActionApprovalsApi.get_public_workspaces_tool_action_approvals",
|
|
90
|
+
:header_params => header_params,
|
|
91
|
+
:query_params => query_params,
|
|
92
|
+
:form_params => form_params,
|
|
93
|
+
:body => post_body,
|
|
94
|
+
:auth_names => auth_names,
|
|
95
|
+
:return_type => return_type
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
99
|
+
if @api_client.config.debugging
|
|
100
|
+
@api_client.config.logger.debug "API called: ToolActionApprovalsApi#get_public_workspaces_tool_action_approvals\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
101
|
+
end
|
|
102
|
+
return data, status_code, headers
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Show a tool action approval
|
|
106
|
+
# @param workspace_id [String]
|
|
107
|
+
# @param id [String]
|
|
108
|
+
# @param [Hash] opts the optional parameters
|
|
109
|
+
# @return [GetPublicWorkspacesToolActionApprovals2200Response]
|
|
110
|
+
def get_public_workspaces_tool_action_approvals2(workspace_id, id, opts = {})
|
|
111
|
+
data, _status_code, _headers = get_public_workspaces_tool_action_approvals2_with_http_info(workspace_id, id, opts)
|
|
112
|
+
data
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Show a tool action approval
|
|
116
|
+
# @param workspace_id [String]
|
|
117
|
+
# @param id [String]
|
|
118
|
+
# @param [Hash] opts the optional parameters
|
|
119
|
+
# @return [Array<(GetPublicWorkspacesToolActionApprovals2200Response, Integer, Hash)>] GetPublicWorkspacesToolActionApprovals2200Response data, response status code and response headers
|
|
120
|
+
def get_public_workspaces_tool_action_approvals2_with_http_info(workspace_id, id, opts = {})
|
|
121
|
+
if @api_client.config.debugging
|
|
122
|
+
@api_client.config.logger.debug 'Calling API: ToolActionApprovalsApi.get_public_workspaces_tool_action_approvals2 ...'
|
|
123
|
+
end
|
|
124
|
+
# verify the required parameter 'workspace_id' is set
|
|
125
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
126
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling ToolActionApprovalsApi.get_public_workspaces_tool_action_approvals2"
|
|
127
|
+
end
|
|
128
|
+
# verify the required parameter 'id' is set
|
|
129
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
130
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ToolActionApprovalsApi.get_public_workspaces_tool_action_approvals2"
|
|
131
|
+
end
|
|
132
|
+
# resource path
|
|
133
|
+
local_var_path = '/public/workspaces/{workspace_id}/tool_action_approvals/{id}'.sub('{workspace_id}', CGI.escape(workspace_id.to_s)).sub('{id}', CGI.escape(id.to_s))
|
|
134
|
+
|
|
135
|
+
# query parameters
|
|
136
|
+
query_params = opts[:query_params] || {}
|
|
137
|
+
|
|
138
|
+
# header parameters
|
|
139
|
+
header_params = opts[:header_params] || {}
|
|
140
|
+
# HTTP header 'Accept' (if needed)
|
|
141
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
142
|
+
|
|
143
|
+
# form parameters
|
|
144
|
+
form_params = opts[:form_params] || {}
|
|
145
|
+
|
|
146
|
+
# http body (model)
|
|
147
|
+
post_body = opts[:debug_body]
|
|
148
|
+
|
|
149
|
+
# return_type
|
|
150
|
+
return_type = opts[:debug_return_type] || 'GetPublicWorkspacesToolActionApprovals2200Response'
|
|
151
|
+
|
|
152
|
+
# auth_names
|
|
153
|
+
auth_names = opts[:debug_auth_names] || ['bearer_auth']
|
|
154
|
+
|
|
155
|
+
new_options = opts.merge(
|
|
156
|
+
:operation => :"ToolActionApprovalsApi.get_public_workspaces_tool_action_approvals2",
|
|
157
|
+
:header_params => header_params,
|
|
158
|
+
:query_params => query_params,
|
|
159
|
+
:form_params => form_params,
|
|
160
|
+
:body => post_body,
|
|
161
|
+
:auth_names => auth_names,
|
|
162
|
+
:return_type => return_type
|
|
163
|
+
)
|
|
164
|
+
|
|
165
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
166
|
+
if @api_client.config.debugging
|
|
167
|
+
@api_client.config.logger.debug "API called: ToolActionApprovalsApi#get_public_workspaces_tool_action_approvals2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
168
|
+
end
|
|
169
|
+
return data, status_code, headers
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Decide a tool action approval
|
|
173
|
+
# @param workspace_id [String]
|
|
174
|
+
# @param id [String]
|
|
175
|
+
# @param [Hash] opts the optional parameters
|
|
176
|
+
# @option opts [PostPublicWorkspacesToolActionApprovalsDecideRequest] :post_public_workspaces_tool_action_approvals_decide_request
|
|
177
|
+
# @return [nil]
|
|
178
|
+
def post_public_workspaces_tool_action_approvals_decide(workspace_id, id, opts = {})
|
|
179
|
+
post_public_workspaces_tool_action_approvals_decide_with_http_info(workspace_id, id, opts)
|
|
180
|
+
nil
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Decide a tool action approval
|
|
184
|
+
# @param workspace_id [String]
|
|
185
|
+
# @param id [String]
|
|
186
|
+
# @param [Hash] opts the optional parameters
|
|
187
|
+
# @option opts [PostPublicWorkspacesToolActionApprovalsDecideRequest] :post_public_workspaces_tool_action_approvals_decide_request
|
|
188
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
189
|
+
def post_public_workspaces_tool_action_approvals_decide_with_http_info(workspace_id, id, opts = {})
|
|
190
|
+
if @api_client.config.debugging
|
|
191
|
+
@api_client.config.logger.debug 'Calling API: ToolActionApprovalsApi.post_public_workspaces_tool_action_approvals_decide ...'
|
|
192
|
+
end
|
|
193
|
+
# verify the required parameter 'workspace_id' is set
|
|
194
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
195
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling ToolActionApprovalsApi.post_public_workspaces_tool_action_approvals_decide"
|
|
196
|
+
end
|
|
197
|
+
# verify the required parameter 'id' is set
|
|
198
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
199
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ToolActionApprovalsApi.post_public_workspaces_tool_action_approvals_decide"
|
|
200
|
+
end
|
|
201
|
+
# resource path
|
|
202
|
+
local_var_path = '/public/workspaces/{workspace_id}/tool_action_approvals/{id}/decide'.sub('{workspace_id}', CGI.escape(workspace_id.to_s)).sub('{id}', CGI.escape(id.to_s))
|
|
203
|
+
|
|
204
|
+
# query parameters
|
|
205
|
+
query_params = opts[:query_params] || {}
|
|
206
|
+
|
|
207
|
+
# header parameters
|
|
208
|
+
header_params = opts[:header_params] || {}
|
|
209
|
+
# HTTP header 'Content-Type'
|
|
210
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
211
|
+
if !content_type.nil?
|
|
212
|
+
header_params['Content-Type'] = content_type
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# form parameters
|
|
216
|
+
form_params = opts[:form_params] || {}
|
|
217
|
+
|
|
218
|
+
# http body (model)
|
|
219
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'post_public_workspaces_tool_action_approvals_decide_request'])
|
|
220
|
+
|
|
221
|
+
# return_type
|
|
222
|
+
return_type = opts[:debug_return_type]
|
|
223
|
+
|
|
224
|
+
# auth_names
|
|
225
|
+
auth_names = opts[:debug_auth_names] || ['bearer_auth']
|
|
226
|
+
|
|
227
|
+
new_options = opts.merge(
|
|
228
|
+
:operation => :"ToolActionApprovalsApi.post_public_workspaces_tool_action_approvals_decide",
|
|
229
|
+
:header_params => header_params,
|
|
230
|
+
:query_params => query_params,
|
|
231
|
+
:form_params => form_params,
|
|
232
|
+
:body => post_body,
|
|
233
|
+
:auth_names => auth_names,
|
|
234
|
+
:return_type => return_type
|
|
235
|
+
)
|
|
236
|
+
|
|
237
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
238
|
+
if @api_client.config.debugging
|
|
239
|
+
@api_client.config.logger.debug "API called: ToolActionApprovalsApi#post_public_workspaces_tool_action_approvals_decide\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
240
|
+
end
|
|
241
|
+
return data, status_code, headers
|
|
242
|
+
end
|
|
243
|
+
end
|
|
244
|
+
end
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Fetch Hive Public API
|
|
3
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`.
|
|
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> ``` ## Breaking Error responses use `error_code`. The previous field name `code` is not returned. ## 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.
|
|
6
|
+
The version of the OpenAPI document: 0.4.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Fetch Hive Public API
|
|
3
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`.
|
|
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> ``` ## Breaking Error responses use `error_code`. The previous field name `code` is not returned. ## 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.
|
|
6
|
+
The version of the OpenAPI document: 0.4.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Fetch Hive Public API
|
|
3
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`.
|
|
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> ``` ## Breaking Error responses use `error_code`. The previous field name `code` is not returned. ## 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.
|
|
6
|
+
The version of the OpenAPI document: 0.4.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Fetch Hive Public API
|
|
3
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`.
|
|
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> ``` ## Breaking Error responses use `error_code`. The previous field name `code` is not returned. ## 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.
|
|
6
|
+
The version of the OpenAPI document: 0.4.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Fetch Hive Public API
|
|
3
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`.
|
|
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> ``` ## Breaking Error responses use `error_code`. The previous field name `code` is not returned. ## 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.
|
|
6
|
+
The version of the OpenAPI document: 0.4.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Fetch Hive Public API
|
|
3
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`.
|
|
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> ``` ## Breaking Error responses use `error_code`. The previous field name `code` is not returned. ## 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.
|
|
6
|
+
The version of the OpenAPI document: 0.4.1
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|