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.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +23 -2
  3. data/lib/fetch_hive/client.rb +30 -3
  4. data/lib/fetch_hive/generated/api/agent_chat_messages_api.rb +2 -2
  5. data/lib/fetch_hive/generated/api/agent_chats_api.rb +2 -2
  6. data/lib/fetch_hive/generated/api/agents_api.rb +3 -3
  7. data/lib/fetch_hive/generated/api/assets_api.rb +2 -2
  8. data/lib/fetch_hive/generated/api/hive_agents_api.rb +2 -2
  9. data/lib/fetch_hive/generated/api/knowledge_base_items_api.rb +2 -2
  10. data/lib/fetch_hive/generated/api/knowledge_bases_api.rb +2 -2
  11. data/lib/fetch_hive/generated/api/models_api.rb +2 -2
  12. data/lib/fetch_hive/generated/api/prompts_api.rb +2 -2
  13. data/lib/fetch_hive/generated/api/requests_api.rb +2 -2
  14. data/lib/fetch_hive/generated/api/search_services_api.rb +2 -2
  15. data/lib/fetch_hive/generated/api/tool_action_approvals_api.rb +244 -0
  16. data/lib/fetch_hive/generated/api/workflows_api.rb +2 -2
  17. data/lib/fetch_hive/generated/api_client.rb +2 -2
  18. data/lib/fetch_hive/generated/api_error.rb +2 -2
  19. data/lib/fetch_hive/generated/api_model_base.rb +2 -2
  20. data/lib/fetch_hive/generated/configuration.rb +2 -2
  21. data/lib/fetch_hive/generated/models/agent_attachment.rb +2 -2
  22. data/lib/fetch_hive/generated/models/agent_attachment_one_of.rb +2 -2
  23. data/lib/fetch_hive/generated/models/agent_delegation.rb +2 -2
  24. data/lib/fetch_hive/generated/models/agent_invoke_async_config.rb +2 -2
  25. data/lib/fetch_hive/generated/models/agent_message.rb +2 -2
  26. data/lib/fetch_hive/generated/models/asset_object.rb +2 -2
  27. data/lib/fetch_hive/generated/models/asset_object_transcription.rb +2 -2
  28. data/lib/fetch_hive/generated/models/async_config.rb +2 -2
  29. data/lib/fetch_hive/generated/models/delete_public_workspaces_agents200_response.rb +2 -2
  30. data/lib/fetch_hive/generated/models/delete_public_workspaces_agents_chats200_response.rb +2 -2
  31. data/lib/fetch_hive/generated/models/delete_public_workspaces_agents_chats404_response.rb +2 -2
  32. data/lib/fetch_hive/generated/models/delete_public_workspaces_knowledge_bases200_response.rb +2 -2
  33. data/lib/fetch_hive/generated/models/delete_public_workspaces_knowledge_bases_items200_response.rb +2 -2
  34. data/lib/fetch_hive/generated/models/denied_tool_call.rb +223 -0
  35. data/lib/fetch_hive/generated/models/error_response.rb +2 -2
  36. data/lib/fetch_hive/generated/models/generated_artifact.rb +2 -2
  37. data/lib/fetch_hive/generated/models/get_public_models200_response_inner.rb +2 -2
  38. data/lib/fetch_hive/generated/models/get_public_requests200_response.rb +2 -2
  39. data/lib/fetch_hive/generated/models/get_public_requests404_response.rb +2 -2
  40. data/lib/fetch_hive/generated/models/get_public_search_services_countries200_response.rb +2 -2
  41. data/lib/fetch_hive/generated/models/get_public_search_services_countries200_response_services_inner.rb +2 -2
  42. data/lib/fetch_hive/generated/models/get_public_search_services_countries200_response_services_inner_countries_inner.rb +2 -2
  43. data/lib/fetch_hive/generated/models/get_public_search_services_countries2404_response.rb +2 -2
  44. data/lib/fetch_hive/generated/models/get_public_workspaces_agents200_response.rb +2 -2
  45. data/lib/fetch_hive/generated/models/get_public_workspaces_agents2200_response.rb +2 -2
  46. data/lib/fetch_hive/generated/models/get_public_workspaces_agents_chats200_response.rb +2 -2
  47. data/lib/fetch_hive/generated/models/get_public_workspaces_agents_chats_messages200_response.rb +2 -2
  48. data/lib/fetch_hive/generated/models/get_public_workspaces_agents_chats_messages200_response_messages_inner.rb +2 -2
  49. data/lib/fetch_hive/generated/models/get_public_workspaces_agents_chats_messages422_response.rb +2 -2
  50. data/lib/fetch_hive/generated/models/get_public_workspaces_assets200_response.rb +2 -2
  51. data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases200_response.rb +2 -2
  52. data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases2200_response.rb +2 -2
  53. data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases2422_response.rb +2 -2
  54. data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases_items200_response.rb +2 -2
  55. data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases_items200_response_knowledge_base_items_inner.rb +2 -2
  56. data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases_items2200_response.rb +2 -2
  57. data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases_items2422_response.rb +2 -2
  58. data/lib/fetch_hive/generated/models/get_public_workspaces_tool_action_approvals200_response.rb +149 -0
  59. data/lib/fetch_hive/generated/models/get_public_workspaces_tool_action_approvals2200_response.rb +147 -0
  60. data/lib/fetch_hive/generated/models/hive_agent_async_config.rb +2 -2
  61. data/lib/fetch_hive/generated/models/hive_agent_sources.rb +2 -2
  62. data/lib/fetch_hive/generated/models/invoke_agent_request.rb +62 -6
  63. data/lib/fetch_hive/generated/models/invoke_agent_request_decided_tool_approvals_inner.rb +164 -0
  64. data/lib/fetch_hive/generated/models/invoke_agent_response.rb +116 -4
  65. data/lib/fetch_hive/generated/models/invoke_agent_response_auto_approved_tool_calls_inner.rb +190 -0
  66. data/lib/fetch_hive/generated/models/invoke_hive_agent_request.rb +2 -2
  67. data/lib/fetch_hive/generated/models/invoke_hive_agent_response.rb +2 -2
  68. data/lib/fetch_hive/generated/models/invoke_prompt_request.rb +2 -2
  69. data/lib/fetch_hive/generated/models/invoke_prompt_response.rb +2 -2
  70. data/lib/fetch_hive/generated/models/invoke_workflow_async_response.rb +2 -2
  71. data/lib/fetch_hive/generated/models/invoke_workflow_request.rb +50 -6
  72. data/lib/fetch_hive/generated/models/invoke_workflow_response.rb +2 -2
  73. data/lib/fetch_hive/generated/models/knowledge_base_object.rb +2 -2
  74. data/lib/fetch_hive/generated/models/list_thread_agent_delegations200_response.rb +2 -2
  75. data/lib/fetch_hive/generated/models/metadata_value.rb +2 -2
  76. data/lib/fetch_hive/generated/models/patch_public_workspaces_agents200_response.rb +2 -2
  77. data/lib/fetch_hive/generated/models/patch_public_workspaces_agents422_response.rb +173 -0
  78. data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_chats200_response.rb +2 -2
  79. data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_chats_clear_messages200_response.rb +2 -2
  80. data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_chats_request.rb +2 -2
  81. data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_chats_request_chat.rb +2 -2
  82. data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_request.rb +2 -2
  83. data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_request_agent.rb +28 -6
  84. data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases200_response.rb +2 -2
  85. data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases_items200_response.rb +2 -2
  86. data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases_items_request.rb +2 -2
  87. data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases_items_request_knowledge_base_item.rb +2 -2
  88. data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases_request.rb +2 -2
  89. data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases_request_knowledge_base.rb +2 -2
  90. data/lib/fetch_hive/generated/models/pending_delegation.rb +2 -2
  91. data/lib/fetch_hive/generated/models/pending_tool_approval.rb +247 -0
  92. data/lib/fetch_hive/generated/models/post_public_workspaces_agents200_response.rb +2 -2
  93. data/lib/fetch_hive/generated/models/post_public_workspaces_agents422_response.rb +2 -2
  94. data/lib/fetch_hive/generated/models/post_public_workspaces_agents_chats200_response.rb +2 -2
  95. data/lib/fetch_hive/generated/models/post_public_workspaces_agents_chats200_response_chat.rb +2 -2
  96. data/lib/fetch_hive/generated/models/post_public_workspaces_agents_chats422_response.rb +2 -2
  97. data/lib/fetch_hive/generated/models/post_public_workspaces_agents_chats_request.rb +2 -2
  98. data/lib/fetch_hive/generated/models/post_public_workspaces_agents_chats_request_chat.rb +2 -2
  99. data/lib/fetch_hive/generated/models/post_public_workspaces_agents_request.rb +2 -2
  100. data/lib/fetch_hive/generated/models/post_public_workspaces_agents_request_agent.rb +2 -2
  101. data/lib/fetch_hive/generated/models/post_public_workspaces_assets200_response.rb +2 -2
  102. data/lib/fetch_hive/generated/models/post_public_workspaces_assets422_response.rb +2 -2
  103. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases200_response.rb +2 -2
  104. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_items200_response.rb +2 -2
  105. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_items422_response.rb +2 -2
  106. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_items_regenerate200_response.rb +2 -2
  107. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_items_request.rb +2 -2
  108. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_items_request_knowledge_base_item.rb +2 -2
  109. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_request.rb +2 -2
  110. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_request_knowledge_base.rb +2 -2
  111. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_search200_response.rb +2 -2
  112. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_search422_response.rb +2 -2
  113. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_search_request.rb +2 -2
  114. data/lib/fetch_hive/generated/models/post_public_workspaces_tool_action_approvals_decide_request.rb +188 -0
  115. data/lib/fetch_hive/generated/models/sse_chunk.rb +126 -4
  116. data/lib/fetch_hive/generated/models/sse_chunk_auto_approved_tool_calls_inner.rb +156 -0
  117. data/lib/fetch_hive/generated/models/token_usage.rb +2 -2
  118. data/lib/fetch_hive/generated/models/tool_action_approval_object.rb +701 -0
  119. data/lib/fetch_hive/generated/models/tool_action_approval_object_approval_votes_inner.rb +156 -0
  120. data/lib/fetch_hive/generated/models/tool_action_approval_object_arguments_edited_by.rb +158 -0
  121. data/lib/fetch_hive/generated/models/tool_action_approval_object_batch_items_inner.rb +190 -0
  122. data/lib/fetch_hive/generated/models/tool_action_approval_object_capabilities.rb +157 -0
  123. data/lib/fetch_hive/generated/models/tool_action_approval_object_decided_by_user.rb +188 -0
  124. data/lib/fetch_hive/generated/models/tool_action_approval_object_requested_by.rb +179 -0
  125. data/lib/fetch_hive/generated/models/tool_invocation.rb +2 -2
  126. data/lib/fetch_hive/generated/version.rb +2 -2
  127. metadata +19 -2
@@ -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.3.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.3.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.3.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.3.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.3.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.3.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.3.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,149 @@
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 'date'
14
+ require 'time'
15
+
16
+ module FetchHive::Generated
17
+ class GetPublicWorkspacesToolActionApprovals200Response < ApiModelBase
18
+ attr_accessor :approvals
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'approvals' => :'approvals'
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
+ :'approvals' => :'Array<ToolActionApprovalObject>'
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::GetPublicWorkspacesToolActionApprovals200Response` 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::GetPublicWorkspacesToolActionApprovals200Response`. 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?(:'approvals')
67
+ if (value = attributes[:'approvals']).is_a?(Array)
68
+ self.approvals = value
69
+ end
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
+ invalid_properties = Array.new
78
+ invalid_properties
79
+ end
80
+
81
+ # Check to see if the all the properties in the model are valid
82
+ # @return true if the model is valid
83
+ def valid?
84
+ warn '[DEPRECATED] the `valid?` method is obsolete'
85
+ true
86
+ end
87
+
88
+ # Checks equality by comparing each attribute.
89
+ # @param [Object] Object to be compared
90
+ def ==(o)
91
+ return true if self.equal?(o)
92
+ self.class == o.class &&
93
+ approvals == o.approvals
94
+ end
95
+
96
+ # @see the `==` method
97
+ # @param [Object] Object to be compared
98
+ def eql?(o)
99
+ self == o
100
+ end
101
+
102
+ # Calculates hash code according to all attributes.
103
+ # @return [Integer] Hash code
104
+ def hash
105
+ [approvals].hash
106
+ end
107
+
108
+ # Builds the object from hash
109
+ # @param [Hash] attributes Model attributes in the form of hash
110
+ # @return [Object] Returns the model itself
111
+ def self.build_from_hash(attributes)
112
+ return nil unless attributes.is_a?(Hash)
113
+ attributes = attributes.transform_keys(&:to_sym)
114
+ transformed_hash = {}
115
+ openapi_types.each_pair do |key, type|
116
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
117
+ transformed_hash["#{key}"] = nil
118
+ elsif type =~ /\AArray<(.*)>/i
119
+ # check to ensure the input is an array given that the attribute
120
+ # is documented as an array but the input is not
121
+ if attributes[attribute_map[key]].is_a?(Array)
122
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
123
+ end
124
+ elsif !attributes[attribute_map[key]].nil?
125
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
126
+ end
127
+ end
128
+ new(transformed_hash)
129
+ end
130
+
131
+ # Returns the object in the form of hash
132
+ # @return [Hash] Returns the object in the form of hash
133
+ def to_hash
134
+ hash = {}
135
+ self.class.attribute_map.each_pair do |attr, param|
136
+ value = self.send(attr)
137
+ if value.nil?
138
+ is_nullable = self.class.openapi_nullable.include?(attr)
139
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
140
+ end
141
+
142
+ hash[param] = _to_hash(value)
143
+ end
144
+ hash
145
+ end
146
+
147
+ end
148
+
149
+ end
@@ -0,0 +1,147 @@
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 'date'
14
+ require 'time'
15
+
16
+ module FetchHive::Generated
17
+ class GetPublicWorkspacesToolActionApprovals2200Response < ApiModelBase
18
+ attr_accessor :approval
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'approval' => :'approval'
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
+ :'approval' => :'ToolActionApprovalObject'
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::GetPublicWorkspacesToolActionApprovals2200Response` 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::GetPublicWorkspacesToolActionApprovals2200Response`. 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?(:'approval')
67
+ self.approval = attributes[:'approval']
68
+ end
69
+ end
70
+
71
+ # Show invalid properties with the reasons. Usually used together with valid?
72
+ # @return Array for valid properties with the reasons
73
+ def list_invalid_properties
74
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
75
+ invalid_properties = Array.new
76
+ invalid_properties
77
+ end
78
+
79
+ # Check to see if the all the properties in the model are valid
80
+ # @return true if the model is valid
81
+ def valid?
82
+ warn '[DEPRECATED] the `valid?` method is obsolete'
83
+ true
84
+ end
85
+
86
+ # Checks equality by comparing each attribute.
87
+ # @param [Object] Object to be compared
88
+ def ==(o)
89
+ return true if self.equal?(o)
90
+ self.class == o.class &&
91
+ approval == o.approval
92
+ end
93
+
94
+ # @see the `==` method
95
+ # @param [Object] Object to be compared
96
+ def eql?(o)
97
+ self == o
98
+ end
99
+
100
+ # Calculates hash code according to all attributes.
101
+ # @return [Integer] Hash code
102
+ def hash
103
+ [approval].hash
104
+ end
105
+
106
+ # Builds the object from hash
107
+ # @param [Hash] attributes Model attributes in the form of hash
108
+ # @return [Object] Returns the model itself
109
+ def self.build_from_hash(attributes)
110
+ return nil unless attributes.is_a?(Hash)
111
+ attributes = attributes.transform_keys(&:to_sym)
112
+ transformed_hash = {}
113
+ openapi_types.each_pair do |key, type|
114
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
115
+ transformed_hash["#{key}"] = nil
116
+ elsif type =~ /\AArray<(.*)>/i
117
+ # check to ensure the input is an array given that the attribute
118
+ # is documented as an array but the input is not
119
+ if attributes[attribute_map[key]].is_a?(Array)
120
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
121
+ end
122
+ elsif !attributes[attribute_map[key]].nil?
123
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
124
+ end
125
+ end
126
+ new(transformed_hash)
127
+ end
128
+
129
+ # Returns the object in the form of hash
130
+ # @return [Hash] Returns the object in the form of hash
131
+ def to_hash
132
+ hash = {}
133
+ self.class.attribute_map.each_pair do |attr, param|
134
+ value = self.send(attr)
135
+ if value.nil?
136
+ is_nullable = self.class.openapi_nullable.include?(attr)
137
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
138
+ end
139
+
140
+ hash[param] = _to_hash(value)
141
+ end
142
+ hash
143
+ end
144
+
145
+ end
146
+
147
+ 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.3.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.3.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.3.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
@@ -47,6 +47,34 @@ module FetchHive::Generated
47
47
 
48
48
  attr_accessor :async
49
49
 
50
+ # `policy` follows workspace rules and any saved auto-approve switch. Omit the field for the same behavior. `auto_approve` applies to this call only, and only when the API key is allowed to auto-approve actions. Any other value is `400 invalid_tool_approval`. A key without the permission, a signed-in token, or a webhook is `403 tool_approval_override_not_permitted` before preflight or billing. Destructive actions still ask. Deny rules still block the action. Sub-agents inherit this value. Workflows the agent starts do not.
51
+ attr_accessor :tool_approval
52
+
53
+ # Approval ids from an earlier `awaiting_approval` response. An API key call resumes on the server after the decision. Do not send this field to re-invoke that thread. A first-party streaming client sends `{ \"approval_id\": \"<uuid>\" }` on its next invoke. Only `approval_id` is read.
54
+ attr_accessor :decided_tool_approvals
55
+
56
+ class EnumAttributeValidator
57
+ attr_reader :datatype
58
+ attr_reader :allowable_values
59
+
60
+ def initialize(datatype, allowable_values)
61
+ @allowable_values = allowable_values.map do |value|
62
+ case datatype.to_s
63
+ when /Integer/i
64
+ value.to_i
65
+ when /Float/i
66
+ value.to_f
67
+ else
68
+ value
69
+ end
70
+ end
71
+ end
72
+
73
+ def valid?(value)
74
+ !value || allowable_values.include?(value)
75
+ end
76
+ end
77
+
50
78
  # Attribute mapping from ruby-style variable name to JSON key.
51
79
  def self.attribute_map
52
80
  {
@@ -60,7 +88,9 @@ module FetchHive::Generated
60
88
  :'attachments' => :'attachments',
61
89
  :'known_artifact_refs' => :'known_artifact_refs',
62
90
  :'artifact_refs' => :'artifact_refs',
63
- :'async' => :'async'
91
+ :'async' => :'async',
92
+ :'tool_approval' => :'tool_approval',
93
+ :'decided_tool_approvals' => :'decided_tool_approvals'
64
94
  }
65
95
  end
66
96
 
@@ -87,7 +117,9 @@ module FetchHive::Generated
87
117
  :'attachments' => :'Array<AgentAttachment>',
88
118
  :'known_artifact_refs' => :'Array<String>',
89
119
  :'artifact_refs' => :'Array<String>',
90
- :'async' => :'AgentInvokeAsyncConfig'
120
+ :'async' => :'AgentInvokeAsyncConfig',
121
+ :'tool_approval' => :'String',
122
+ :'decided_tool_approvals' => :'Array<InvokeAgentRequestDecidedToolApprovalsInner>'
91
123
  }
92
124
  end
93
125
 
@@ -174,6 +206,16 @@ module FetchHive::Generated
174
206
  if attributes.key?(:'async')
175
207
  self.async = attributes[:'async']
176
208
  end
209
+
210
+ if attributes.key?(:'tool_approval')
211
+ self.tool_approval = attributes[:'tool_approval']
212
+ end
213
+
214
+ if attributes.key?(:'decided_tool_approvals')
215
+ if (value = attributes[:'decided_tool_approvals']).is_a?(Array)
216
+ self.decided_tool_approvals = value
217
+ end
218
+ end
177
219
  end
178
220
 
179
221
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -213,6 +255,8 @@ module FetchHive::Generated
213
255
  return false if !@attachments.nil? && @attachments.length > 5
214
256
  return false if !@known_artifact_refs.nil? && @known_artifact_refs.length > 50
215
257
  return false if !@artifact_refs.nil? && @artifact_refs.length > 5
258
+ tool_approval_validator = EnumAttributeValidator.new('String', ["policy", "auto_approve"])
259
+ return false unless tool_approval_validator.valid?(@tool_approval)
216
260
  true
217
261
  end
218
262
 
@@ -278,6 +322,16 @@ module FetchHive::Generated
278
322
  @artifact_refs = artifact_refs
279
323
  end
280
324
 
325
+ # Custom attribute writer method checking allowed values (enum).
326
+ # @param [Object] tool_approval Object to be assigned
327
+ def tool_approval=(tool_approval)
328
+ validator = EnumAttributeValidator.new('String', ["policy", "auto_approve"])
329
+ unless validator.valid?(tool_approval)
330
+ fail ArgumentError, "invalid value for \"tool_approval\", must be one of #{validator.allowable_values}."
331
+ end
332
+ @tool_approval = tool_approval
333
+ end
334
+
281
335
  # Checks equality by comparing each attribute.
282
336
  # @param [Object] Object to be compared
283
337
  def ==(o)
@@ -293,7 +347,9 @@ module FetchHive::Generated
293
347
  attachments == o.attachments &&
294
348
  known_artifact_refs == o.known_artifact_refs &&
295
349
  artifact_refs == o.artifact_refs &&
296
- async == o.async
350
+ async == o.async &&
351
+ tool_approval == o.tool_approval &&
352
+ decided_tool_approvals == o.decided_tool_approvals
297
353
  end
298
354
 
299
355
  # @see the `==` method
@@ -305,7 +361,7 @@ module FetchHive::Generated
305
361
  # Calculates hash code according to all attributes.
306
362
  # @return [Integer] Hash code
307
363
  def hash
308
- [message, agent, thread_id, streaming, user, metadata, messages, attachments, known_artifact_refs, artifact_refs, async].hash
364
+ [message, agent, thread_id, streaming, user, metadata, messages, attachments, known_artifact_refs, artifact_refs, async, tool_approval, decided_tool_approvals].hash
309
365
  end
310
366
 
311
367
  # Builds the object from hash