algolia 3.40.0 → 3.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/ISSUE_TEMPLATE/Bug_report.yml +1 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +4 -4
- data/lib/algolia/api/agent_studio_client.rb +2364 -0
- data/lib/algolia/models/agent-studio/advanced_syntax_features.rb +34 -0
- data/lib/algolia/models/agent-studio/agent_completion_algolia_params.rb +221 -0
- data/lib/algolia/models/agent-studio/agent_completion_request.rb +247 -0
- data/lib/algolia/models/agent-studio/agent_config_create.rb +288 -0
- data/lib/algolia/models/agent-studio/agent_config_update.rb +294 -0
- data/lib/algolia/models/agent-studio/agent_status.rb +34 -0
- data/lib/algolia/models/agent-studio/agent_test_configuration.rb +271 -0
- data/lib/algolia/models/agent-studio/agent_with_version_response.rb +370 -0
- data/lib/algolia/models/agent-studio/algolia_display_results_tool_config.rb +254 -0
- data/lib/algolia/models/agent-studio/algolia_recommend_tool_config_input.rb +242 -0
- data/lib/algolia/models/agent-studio/algolia_recommend_tool_index_config.rb +228 -0
- data/lib/algolia/models/agent-studio/algolia_search_tool_config.rb +232 -0
- data/lib/algolia/models/agent-studio/algolia_search_tool_index_config.rb +249 -0
- data/lib/algolia/models/agent-studio/allowed_domain_bulk_delete.rb +212 -0
- data/lib/algolia/models/agent-studio/allowed_domain_bulk_insert.rb +212 -0
- data/lib/algolia/models/agent-studio/allowed_domain_create.rb +210 -0
- data/lib/algolia/models/agent-studio/allowed_domain_list_response.rb +211 -0
- data/lib/algolia/models/agent-studio/allowed_domain_response.rb +264 -0
- data/lib/algolia/models/agent-studio/alternatives_as_exact.rb +36 -0
- data/lib/algolia/models/agent-studio/anthropic_provider_input.rb +220 -0
- data/lib/algolia/models/agent-studio/application_config_patch.rb +209 -0
- data/lib/algolia/models/agent-studio/application_config_response.rb +208 -0
- data/lib/algolia/models/agent-studio/around_precision_union.rb +108 -0
- data/lib/algolia/models/agent-studio/around_radius_union.rb +108 -0
- data/lib/algolia/models/agent-studio/assistant_message_v4.rb +252 -0
- data/lib/algolia/models/agent-studio/assistant_message_v5.rb +228 -0
- data/lib/algolia/models/agent-studio/assistant_part_v4.rb +110 -0
- data/lib/algolia/models/agent-studio/assistant_part_v5.rb +110 -0
- data/lib/algolia/models/agent-studio/azure_open_ai_provider_input.rb +243 -0
- data/lib/algolia/models/agent-studio/base_provider_input.rb +209 -0
- data/lib/algolia/models/agent-studio/client_side_tool_config.rb +241 -0
- data/lib/algolia/models/agent-studio/client_tools_args_schema.rb +228 -0
- data/lib/algolia/models/agent-studio/compatibility_mode.rb +34 -0
- data/lib/algolia/models/agent-studio/conversation_base_response.rb +355 -0
- data/lib/algolia/models/agent-studio/conversation_full_response.rb +369 -0
- data/lib/algolia/models/agent-studio/conversation_metadata.rb +209 -0
- data/lib/algolia/models/agent-studio/distinct_union.rb +108 -0
- data/lib/algolia/models/agent-studio/episode.rb +243 -0
- data/lib/algolia/models/agent-studio/error_base.rb +207 -0
- data/lib/algolia/models/agent-studio/exact_on_single_word_query.rb +35 -0
- data/lib/algolia/models/agent-studio/facet_filters_union.rb +108 -0
- data/lib/algolia/models/agent-studio/facets.rb +208 -0
- data/lib/algolia/models/agent-studio/facets_param.rb +220 -0
- data/lib/algolia/models/agent-studio/facets_union.rb +108 -0
- data/lib/algolia/models/agent-studio/feedback_creation_request.rb +251 -0
- data/lib/algolia/models/agent-studio/feedback_response.rb +297 -0
- data/lib/algolia/models/agent-studio/ignore_plurals_union.rb +108 -0
- data/lib/algolia/models/agent-studio/index_search_parameters.rb +267 -0
- data/lib/algolia/models/agent-studio/inside_bounding_box_union.rb +108 -0
- data/lib/algolia/models/agent-studio/inside_polygon_union.rb +108 -0
- data/lib/algolia/models/agent-studio/location_item_union.rb +108 -0
- data/lib/algolia/models/agent-studio/mcp_server_tool_config.rb +276 -0
- data/lib/algolia/models/agent-studio/mcp_tool_config.rb +218 -0
- data/lib/algolia/models/agent-studio/memory_record.rb +368 -0
- data/lib/algolia/models/agent-studio/memory_type.rb +34 -0
- data/lib/algolia/models/agent-studio/message_part.rb +132 -0
- data/lib/algolia/models/agent-studio/message_response.rb +309 -0
- data/lib/algolia/models/agent-studio/message_role.rb +34 -0
- data/lib/algolia/models/agent-studio/message_v4.rb +117 -0
- data/lib/algolia/models/agent-studio/message_v5.rb +117 -0
- data/lib/algolia/models/agent-studio/messages_union.rb +108 -0
- data/lib/algolia/models/agent-studio/number_param.rb +230 -0
- data/lib/algolia/models/agent-studio/number_param_constraint.rb +219 -0
- data/lib/algolia/models/agent-studio/numeric_filters_union.rb +108 -0
- data/lib/algolia/models/agent-studio/open_ai_compatible_provider_input.rb +232 -0
- data/lib/algolia/models/agent-studio/open_ai_provider_input.rb +220 -0
- data/lib/algolia/models/agent-studio/optional_filters_union.rb +108 -0
- data/lib/algolia/models/agent-studio/optional_words_union.rb +108 -0
- data/lib/algolia/models/agent-studio/paginated_agents_response.rb +221 -0
- data/lib/algolia/models/agent-studio/paginated_conversations_response.rb +221 -0
- data/lib/algolia/models/agent-studio/paginated_provider_authentications_response.rb +221 -0
- data/lib/algolia/models/agent-studio/paginated_secret_keys_response.rb +221 -0
- data/lib/algolia/models/agent-studio/pagination_metadata.rb +241 -0
- data/lib/algolia/models/agent-studio/provider_authentication_create.rb +230 -0
- data/lib/algolia/models/agent-studio/provider_authentication_patch.rb +218 -0
- data/lib/algolia/models/agent-studio/provider_authentication_response.rb +274 -0
- data/lib/algolia/models/agent-studio/provider_input.rb +111 -0
- data/lib/algolia/models/agent-studio/provider_input_nullable.rb +111 -0
- data/lib/algolia/models/agent-studio/provider_name.rb +38 -0
- data/lib/algolia/models/agent-studio/query_type.rb +35 -0
- data/lib/algolia/models/agent-studio/re_ranking_apply_filter_union.rb +108 -0
- data/lib/algolia/models/agent-studio/reasoning_part.rb +219 -0
- data/lib/algolia/models/agent-studio/reasoning_part_v4.rb +217 -0
- data/lib/algolia/models/agent-studio/reasoning_part_v5.rb +217 -0
- data/lib/algolia/models/agent-studio/remove_stop_words_union.rb +108 -0
- data/lib/algolia/models/agent-studio/remove_words_if_no_results.rb +36 -0
- data/lib/algolia/models/agent-studio/search_parameters.rb +950 -0
- data/lib/algolia/models/agent-studio/search_parameters_overrides.rb +286 -0
- data/lib/algolia/models/agent-studio/secret_key_create.rb +222 -0
- data/lib/algolia/models/agent-studio/secret_key_patch.rb +223 -0
- data/lib/algolia/models/agent-studio/secret_key_response.rb +287 -0
- data/lib/algolia/models/agent-studio/start_part.rb +208 -0
- data/lib/algolia/models/agent-studio/start_step_part.rb +208 -0
- data/lib/algolia/models/agent-studio/step_start_part_v4.rb +206 -0
- data/lib/algolia/models/agent-studio/step_start_part_v5.rb +206 -0
- data/lib/algolia/models/agent-studio/string_array_param.rb +242 -0
- data/lib/algolia/models/agent-studio/string_array_param_constraint.rb +211 -0
- data/lib/algolia/models/agent-studio/supported_language.rb +169 -0
- data/lib/algolia/models/agent-studio/tag_filters_union.rb +108 -0
- data/lib/algolia/models/agent-studio/text_param.rb +220 -0
- data/lib/algolia/models/agent-studio/text_part.rb +216 -0
- data/lib/algolia/models/agent-studio/text_part_v4.rb +217 -0
- data/lib/algolia/models/agent-studio/text_part_v5.rb +217 -0
- data/lib/algolia/models/agent-studio/tool_approval_request_part.rb +285 -0
- data/lib/algolia/models/agent-studio/tool_call_part.rb +265 -0
- data/lib/algolia/models/agent-studio/tool_config.rb +108 -0
- data/lib/algolia/models/agent-studio/tool_config_input.rb +129 -0
- data/lib/algolia/models/agent-studio/tool_invocation_part_v4.rb +217 -0
- data/lib/algolia/models/agent-studio/tool_invocation_v4.rb +309 -0
- data/lib/algolia/models/agent-studio/tool_part_v5.rb +309 -0
- data/lib/algolia/models/agent-studio/tool_result_output.rb +221 -0
- data/lib/algolia/models/agent-studio/tool_result_output_type.rb +37 -0
- data/lib/algolia/models/agent-studio/tool_result_part.rb +254 -0
- data/lib/algolia/models/agent-studio/tool_state.rb +36 -0
- data/lib/algolia/models/agent-studio/typo_tolerance_enum.rb +36 -0
- data/lib/algolia/models/agent-studio/typo_tolerance_union.rb +108 -0
- data/lib/algolia/models/agent-studio/unknown_tool_config.rb +220 -0
- data/lib/algolia/models/agent-studio/user_data_response.rb +223 -0
- data/lib/algolia/models/agent-studio/user_message_metadata_v5.rb +209 -0
- data/lib/algolia/models/agent-studio/user_message_v4.rb +250 -0
- data/lib/algolia/models/agent-studio/user_message_v5.rb +237 -0
- data/lib/algolia/models/agent-studio/validation_error.rb +252 -0
- data/lib/algolia/models/agent-studio/vote_enum.rb +34 -0
- data/lib/algolia/version.rb +1 -1
- metadata +125 -1
|
@@ -0,0 +1,2364 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
4
|
+
|
|
5
|
+
require "openssl"
|
|
6
|
+
require "base64"
|
|
7
|
+
|
|
8
|
+
module Algolia
|
|
9
|
+
class AgentStudioClient
|
|
10
|
+
attr_accessor :api_client
|
|
11
|
+
|
|
12
|
+
def initialize(config = nil)
|
|
13
|
+
raise "`config` is missing." if config.nil?
|
|
14
|
+
raise "`app_id` is missing." if config.app_id.nil? || config.app_id == ""
|
|
15
|
+
raise "`api_key` is missing." if config.api_key.nil? || config.api_key == ""
|
|
16
|
+
|
|
17
|
+
if config.connect_timeout.nil?
|
|
18
|
+
config.connect_timeout = 25000
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
if config.read_timeout.nil?
|
|
22
|
+
config.read_timeout = 25000
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
if config.write_timeout.nil?
|
|
26
|
+
config.write_timeout = 25000
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
@api_client = Algolia::ApiClient.new(config)
|
|
30
|
+
warn(
|
|
31
|
+
"[algolia] Agent Studio API is in beta and subject to breaking changes. See https://www.algolia.com/doc/rest-api/agent-studio"
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def self.create(app_id, api_key, opts = {})
|
|
36
|
+
hosts = []
|
|
37
|
+
hosts << Transport::StatefulHost.new("#{app_id}-dsn.algolia.net", accept: CallType::READ)
|
|
38
|
+
hosts << Transport::StatefulHost.new("#{app_id}.algolia.net", accept: CallType::WRITE)
|
|
39
|
+
|
|
40
|
+
hosts += 1
|
|
41
|
+
.upto(3)
|
|
42
|
+
.map do |i|
|
|
43
|
+
Transport::StatefulHost.new("#{app_id}-#{i}.algolianet.com", accept: CallType::READ | CallType::WRITE)
|
|
44
|
+
end
|
|
45
|
+
.shuffle
|
|
46
|
+
|
|
47
|
+
config = Algolia::Configuration.new(app_id, api_key, hosts, "AgentStudio", opts)
|
|
48
|
+
new(config)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def self.create_with_config(config)
|
|
52
|
+
new(config)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Helper method to switch the API key used to authenticate the requests.
|
|
56
|
+
#
|
|
57
|
+
# @param api_key [String] the new API key to use.
|
|
58
|
+
# @return [void]
|
|
59
|
+
def set_client_api_key(api_key)
|
|
60
|
+
@api_client.set_client_api_key(api_key)
|
|
61
|
+
|
|
62
|
+
self
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
def add_user_agent_segment(segment, version = nil)
|
|
66
|
+
@api_client.config.add_user_agent_segment(segment, version)
|
|
67
|
+
|
|
68
|
+
self
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Add multiple allowed domain patterns. Duplicates are skipped.
|
|
72
|
+
#
|
|
73
|
+
# Required API Key ACLs:
|
|
74
|
+
# - editSettings
|
|
75
|
+
# @param agent_id [String] The agentId. (required)
|
|
76
|
+
# @param allowed_domain_bulk_insert [AllowedDomainBulkInsert] (required)
|
|
77
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
78
|
+
# @return [Http::Response] the response
|
|
79
|
+
def bulk_create_allowed_domains_with_http_info(agent_id, allowed_domain_bulk_insert, request_options = {})
|
|
80
|
+
# verify the required parameter 'agent_id' is set
|
|
81
|
+
if @api_client.config.client_side_validation && agent_id.nil?
|
|
82
|
+
raise ArgumentError, "Parameter `agent_id` is required when calling `bulk_create_allowed_domains`."
|
|
83
|
+
end
|
|
84
|
+
# verify the required parameter 'agent_id' is not empty
|
|
85
|
+
if @api_client.config.client_side_validation && agent_id.empty?
|
|
86
|
+
raise ArgumentError, "Parameter `agent_id` is required when calling `bulk_create_allowed_domains`."
|
|
87
|
+
end
|
|
88
|
+
# verify the required parameter 'allowed_domain_bulk_insert' is set
|
|
89
|
+
if @api_client.config.client_side_validation && allowed_domain_bulk_insert.nil?
|
|
90
|
+
raise(
|
|
91
|
+
ArgumentError,
|
|
92
|
+
"Parameter `allowed_domain_bulk_insert` is required when calling `bulk_create_allowed_domains`."
|
|
93
|
+
)
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
path = "/agent-studio/1/agents/{agentId}/allowed-domains/bulk".sub(
|
|
97
|
+
"{" + "agentId" + "}",
|
|
98
|
+
Transport.encode_uri(agent_id.to_s)
|
|
99
|
+
)
|
|
100
|
+
query_params = {}
|
|
101
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
102
|
+
header_params = {}
|
|
103
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
104
|
+
|
|
105
|
+
post_body = request_options[:debug_body] || @api_client.object_to_http_body(allowed_domain_bulk_insert)
|
|
106
|
+
|
|
107
|
+
new_options = request_options.merge(
|
|
108
|
+
:operation => :"AgentStudioClient.bulk_create_allowed_domains",
|
|
109
|
+
:header_params => header_params,
|
|
110
|
+
:query_params => query_params,
|
|
111
|
+
:body => post_body,
|
|
112
|
+
:use_read_transporter => false
|
|
113
|
+
)
|
|
114
|
+
|
|
115
|
+
@api_client.call_api(:POST, path, new_options)
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Add multiple allowed domain patterns. Duplicates are skipped.
|
|
119
|
+
#
|
|
120
|
+
# Required API Key ACLs:
|
|
121
|
+
# - editSettings
|
|
122
|
+
# @param agent_id [String] The agentId. (required)
|
|
123
|
+
# @param allowed_domain_bulk_insert [AllowedDomainBulkInsert] (required)
|
|
124
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
125
|
+
# @return [AllowedDomainListResponse]
|
|
126
|
+
def bulk_create_allowed_domains(agent_id, allowed_domain_bulk_insert, request_options = {})
|
|
127
|
+
response = bulk_create_allowed_domains_with_http_info(agent_id, allowed_domain_bulk_insert, request_options)
|
|
128
|
+
@api_client.deserialize(
|
|
129
|
+
response.body,
|
|
130
|
+
request_options[:debug_return_type] || "AgentStudio::AllowedDomainListResponse"
|
|
131
|
+
)
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Delete allowed domains by id list.
|
|
135
|
+
#
|
|
136
|
+
# Required API Key ACLs:
|
|
137
|
+
# - editSettings
|
|
138
|
+
# @param agent_id [String] The agentId. (required)
|
|
139
|
+
# @param allowed_domain_bulk_delete [AllowedDomainBulkDelete] (required)
|
|
140
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
141
|
+
# @return [Http::Response] the response
|
|
142
|
+
def bulk_delete_allowed_domains_with_http_info(agent_id, allowed_domain_bulk_delete, request_options = {})
|
|
143
|
+
# verify the required parameter 'agent_id' is set
|
|
144
|
+
if @api_client.config.client_side_validation && agent_id.nil?
|
|
145
|
+
raise ArgumentError, "Parameter `agent_id` is required when calling `bulk_delete_allowed_domains`."
|
|
146
|
+
end
|
|
147
|
+
# verify the required parameter 'agent_id' is not empty
|
|
148
|
+
if @api_client.config.client_side_validation && agent_id.empty?
|
|
149
|
+
raise ArgumentError, "Parameter `agent_id` is required when calling `bulk_delete_allowed_domains`."
|
|
150
|
+
end
|
|
151
|
+
# verify the required parameter 'allowed_domain_bulk_delete' is set
|
|
152
|
+
if @api_client.config.client_side_validation && allowed_domain_bulk_delete.nil?
|
|
153
|
+
raise(
|
|
154
|
+
ArgumentError,
|
|
155
|
+
"Parameter `allowed_domain_bulk_delete` is required when calling `bulk_delete_allowed_domains`."
|
|
156
|
+
)
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
path = "/agent-studio/1/agents/{agentId}/allowed-domains/bulk".sub(
|
|
160
|
+
"{" + "agentId" + "}",
|
|
161
|
+
Transport.encode_uri(agent_id.to_s)
|
|
162
|
+
)
|
|
163
|
+
query_params = {}
|
|
164
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
165
|
+
header_params = {}
|
|
166
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
167
|
+
|
|
168
|
+
post_body = request_options[:debug_body] || @api_client.object_to_http_body(allowed_domain_bulk_delete)
|
|
169
|
+
|
|
170
|
+
new_options = request_options.merge(
|
|
171
|
+
:operation => :"AgentStudioClient.bulk_delete_allowed_domains",
|
|
172
|
+
:header_params => header_params,
|
|
173
|
+
:query_params => query_params,
|
|
174
|
+
:body => post_body,
|
|
175
|
+
:use_read_transporter => false
|
|
176
|
+
)
|
|
177
|
+
|
|
178
|
+
@api_client.call_api(:DELETE, path, new_options)
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# Delete allowed domains by id list.
|
|
182
|
+
#
|
|
183
|
+
# Required API Key ACLs:
|
|
184
|
+
# - editSettings
|
|
185
|
+
# @param agent_id [String] The agentId. (required)
|
|
186
|
+
# @param allowed_domain_bulk_delete [AllowedDomainBulkDelete] (required)
|
|
187
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
188
|
+
# @return [nil]
|
|
189
|
+
def bulk_delete_allowed_domains(agent_id, allowed_domain_bulk_delete, request_options = {})
|
|
190
|
+
bulk_delete_allowed_domains_with_http_info(agent_id, allowed_domain_bulk_delete, request_options)
|
|
191
|
+
nil
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Create a new agent.
|
|
195
|
+
#
|
|
196
|
+
# Required API Key ACLs:
|
|
197
|
+
# - editSettings
|
|
198
|
+
# @param agent_config_create [AgentConfigCreate] (required)
|
|
199
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
200
|
+
# @return [Http::Response] the response
|
|
201
|
+
def create_agent_with_http_info(agent_config_create, request_options = {})
|
|
202
|
+
# verify the required parameter 'agent_config_create' is set
|
|
203
|
+
if @api_client.config.client_side_validation && agent_config_create.nil?
|
|
204
|
+
raise ArgumentError, "Parameter `agent_config_create` is required when calling `create_agent`."
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
path = "/agent-studio/1/agents"
|
|
208
|
+
query_params = {}
|
|
209
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
210
|
+
header_params = {}
|
|
211
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
212
|
+
|
|
213
|
+
post_body = request_options[:debug_body] || @api_client.object_to_http_body(agent_config_create)
|
|
214
|
+
|
|
215
|
+
new_options = request_options.merge(
|
|
216
|
+
:operation => :"AgentStudioClient.create_agent",
|
|
217
|
+
:header_params => header_params,
|
|
218
|
+
:query_params => query_params,
|
|
219
|
+
:body => post_body,
|
|
220
|
+
:use_read_transporter => false
|
|
221
|
+
)
|
|
222
|
+
|
|
223
|
+
@api_client.call_api(:POST, path, new_options)
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
# Create a new agent.
|
|
227
|
+
#
|
|
228
|
+
# Required API Key ACLs:
|
|
229
|
+
# - editSettings
|
|
230
|
+
# @param agent_config_create [AgentConfigCreate] (required)
|
|
231
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
232
|
+
# @return [AgentWithVersionResponse]
|
|
233
|
+
def create_agent(agent_config_create, request_options = {})
|
|
234
|
+
response = create_agent_with_http_info(agent_config_create, request_options)
|
|
235
|
+
@api_client.deserialize(
|
|
236
|
+
response.body,
|
|
237
|
+
request_options[:debug_return_type] || "AgentStudio::AgentWithVersionResponse"
|
|
238
|
+
)
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
# Add a single allowed domain pattern (e.g. https://app.example.com or *.example.com).
|
|
242
|
+
#
|
|
243
|
+
# Required API Key ACLs:
|
|
244
|
+
# - editSettings
|
|
245
|
+
# @param agent_id [String] The agentId. (required)
|
|
246
|
+
# @param allowed_domain_create [AllowedDomainCreate] (required)
|
|
247
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
248
|
+
# @return [Http::Response] the response
|
|
249
|
+
def create_agent_allowed_domain_with_http_info(agent_id, allowed_domain_create, request_options = {})
|
|
250
|
+
# verify the required parameter 'agent_id' is set
|
|
251
|
+
if @api_client.config.client_side_validation && agent_id.nil?
|
|
252
|
+
raise ArgumentError, "Parameter `agent_id` is required when calling `create_agent_allowed_domain`."
|
|
253
|
+
end
|
|
254
|
+
# verify the required parameter 'agent_id' is not empty
|
|
255
|
+
if @api_client.config.client_side_validation && agent_id.empty?
|
|
256
|
+
raise ArgumentError, "Parameter `agent_id` is required when calling `create_agent_allowed_domain`."
|
|
257
|
+
end
|
|
258
|
+
# verify the required parameter 'allowed_domain_create' is set
|
|
259
|
+
if @api_client.config.client_side_validation && allowed_domain_create.nil?
|
|
260
|
+
raise ArgumentError, "Parameter `allowed_domain_create` is required when calling `create_agent_allowed_domain`."
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
path = "/agent-studio/1/agents/{agentId}/allowed-domains".sub(
|
|
264
|
+
"{" + "agentId" + "}",
|
|
265
|
+
Transport.encode_uri(agent_id.to_s)
|
|
266
|
+
)
|
|
267
|
+
query_params = {}
|
|
268
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
269
|
+
header_params = {}
|
|
270
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
271
|
+
|
|
272
|
+
post_body = request_options[:debug_body] || @api_client.object_to_http_body(allowed_domain_create)
|
|
273
|
+
|
|
274
|
+
new_options = request_options.merge(
|
|
275
|
+
:operation => :"AgentStudioClient.create_agent_allowed_domain",
|
|
276
|
+
:header_params => header_params,
|
|
277
|
+
:query_params => query_params,
|
|
278
|
+
:body => post_body,
|
|
279
|
+
:use_read_transporter => false
|
|
280
|
+
)
|
|
281
|
+
|
|
282
|
+
@api_client.call_api(:POST, path, new_options)
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
# Add a single allowed domain pattern (e.g. https://app.example.com or *.example.com).
|
|
286
|
+
#
|
|
287
|
+
# Required API Key ACLs:
|
|
288
|
+
# - editSettings
|
|
289
|
+
# @param agent_id [String] The agentId. (required)
|
|
290
|
+
# @param allowed_domain_create [AllowedDomainCreate] (required)
|
|
291
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
292
|
+
# @return [AllowedDomainResponse]
|
|
293
|
+
def create_agent_allowed_domain(agent_id, allowed_domain_create, request_options = {})
|
|
294
|
+
response = create_agent_allowed_domain_with_http_info(agent_id, allowed_domain_create, request_options)
|
|
295
|
+
@api_client.deserialize(
|
|
296
|
+
response.body,
|
|
297
|
+
request_options[:debug_return_type] || "AgentStudio::AllowedDomainResponse"
|
|
298
|
+
)
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
# Create a completion for the specified agent. This endpoint handles two types of requests: 1. Normal completion request: User message -> Agent response 2. Tool approval response: User approval -> Execute tool -> Agent response Tool Approval Flow (for MCP tools with requiresApproval: true): - Request 1: User sends message -> Agent requests tool call -> Return approval request - Request 2: User approves -> Execute tool -> Agent continues with result.
|
|
302
|
+
#
|
|
303
|
+
# Required API Key ACLs:
|
|
304
|
+
# - search
|
|
305
|
+
# @param agent_id [String] The agentId. (required)
|
|
306
|
+
# @param compatibility_mode [CompatibilityMode] Compatibility mode for the completion API. (required)
|
|
307
|
+
# @param agent_completion_request [AgentCompletionRequest] (required)
|
|
308
|
+
# @param stream [Boolean] Whether to stream the response or not. (default to true)
|
|
309
|
+
# @param cache [Boolean] Use cached responses if available. (default to true)
|
|
310
|
+
# @param memory [Boolean] Set to false to disable memory (enabled by default).
|
|
311
|
+
# @param analytics [Boolean] Set to false to skip analytics for this completion (default: true). Disables Agent Studio BigQuery analytics, Algolia search analytics, click analytics, and query-suggestions training. Useful for offline-eval workflows. (default to true)
|
|
312
|
+
# @param x_algolia_secure_user_token [String] The X-Algolia-Secure-User-Token.
|
|
313
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
314
|
+
# @return [Http::Response] the response
|
|
315
|
+
def create_agent_completion_with_http_info(
|
|
316
|
+
agent_id,
|
|
317
|
+
compatibility_mode,
|
|
318
|
+
agent_completion_request,
|
|
319
|
+
stream = nil,
|
|
320
|
+
cache = nil,
|
|
321
|
+
memory = nil,
|
|
322
|
+
analytics = nil,
|
|
323
|
+
x_algolia_secure_user_token = nil,
|
|
324
|
+
request_options = {}
|
|
325
|
+
)
|
|
326
|
+
# verify the required parameter 'agent_id' is set
|
|
327
|
+
if @api_client.config.client_side_validation && agent_id.nil?
|
|
328
|
+
raise ArgumentError, "Parameter `agent_id` is required when calling `create_agent_completion`."
|
|
329
|
+
end
|
|
330
|
+
# verify the required parameter 'agent_id' is not empty
|
|
331
|
+
if @api_client.config.client_side_validation && agent_id.empty?
|
|
332
|
+
raise ArgumentError, "Parameter `agent_id` is required when calling `create_agent_completion`."
|
|
333
|
+
end
|
|
334
|
+
# verify the required parameter 'compatibility_mode' is set
|
|
335
|
+
if @api_client.config.client_side_validation && compatibility_mode.nil?
|
|
336
|
+
raise ArgumentError, "Parameter `compatibility_mode` is required when calling `create_agent_completion`."
|
|
337
|
+
end
|
|
338
|
+
# verify the required parameter 'agent_completion_request' is set
|
|
339
|
+
if @api_client.config.client_side_validation && agent_completion_request.nil?
|
|
340
|
+
raise ArgumentError, "Parameter `agent_completion_request` is required when calling `create_agent_completion`."
|
|
341
|
+
end
|
|
342
|
+
|
|
343
|
+
path = "/agent-studio/1/agents/{agentId}/completions".sub(
|
|
344
|
+
"{" + "agentId" + "}",
|
|
345
|
+
Transport.encode_uri(agent_id.to_s)
|
|
346
|
+
)
|
|
347
|
+
query_params = {}
|
|
348
|
+
query_params[:compatibilityMode] = compatibility_mode
|
|
349
|
+
query_params[:stream] = stream unless stream.nil?
|
|
350
|
+
query_params[:cache] = cache unless cache.nil?
|
|
351
|
+
query_params[:memory] = memory unless memory.nil?
|
|
352
|
+
query_params[:analytics] = analytics unless analytics.nil?
|
|
353
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
354
|
+
header_params = {}
|
|
355
|
+
unless x_algolia_secure_user_token.nil?
|
|
356
|
+
header_params[:"X-Algolia-Secure-User-Token"] = x_algolia_secure_user_token
|
|
357
|
+
end
|
|
358
|
+
|
|
359
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
360
|
+
|
|
361
|
+
post_body = request_options[:debug_body] || @api_client.object_to_http_body(agent_completion_request)
|
|
362
|
+
|
|
363
|
+
new_options = request_options.merge(
|
|
364
|
+
:operation => :"AgentStudioClient.create_agent_completion",
|
|
365
|
+
:header_params => header_params,
|
|
366
|
+
:query_params => query_params,
|
|
367
|
+
:body => post_body,
|
|
368
|
+
:use_read_transporter => false
|
|
369
|
+
)
|
|
370
|
+
|
|
371
|
+
@api_client.call_api(:POST, path, new_options)
|
|
372
|
+
end
|
|
373
|
+
|
|
374
|
+
# Create a completion for the specified agent. This endpoint handles two types of requests: 1. Normal completion request: User message -> Agent response 2. Tool approval response: User approval -> Execute tool -> Agent response Tool Approval Flow (for MCP tools with requiresApproval: true): - Request 1: User sends message -> Agent requests tool call -> Return approval request - Request 2: User approves -> Execute tool -> Agent continues with result.
|
|
375
|
+
#
|
|
376
|
+
# Required API Key ACLs:
|
|
377
|
+
# - search
|
|
378
|
+
# @param agent_id [String] The agentId. (required)
|
|
379
|
+
# @param compatibility_mode [CompatibilityMode] Compatibility mode for the completion API. (required)
|
|
380
|
+
# @param agent_completion_request [AgentCompletionRequest] (required)
|
|
381
|
+
# @param stream [Boolean] Whether to stream the response or not. (default to true)
|
|
382
|
+
# @param cache [Boolean] Use cached responses if available. (default to true)
|
|
383
|
+
# @param memory [Boolean] Set to false to disable memory (enabled by default).
|
|
384
|
+
# @param analytics [Boolean] Set to false to skip analytics for this completion (default: true). Disables Agent Studio BigQuery analytics, Algolia search analytics, click analytics, and query-suggestions training. Useful for offline-eval workflows. (default to true)
|
|
385
|
+
# @param x_algolia_secure_user_token [String] The X-Algolia-Secure-User-Token.
|
|
386
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
387
|
+
# @return [Hash<String, Object>]
|
|
388
|
+
def create_agent_completion(
|
|
389
|
+
agent_id,
|
|
390
|
+
compatibility_mode,
|
|
391
|
+
agent_completion_request,
|
|
392
|
+
stream = nil,
|
|
393
|
+
cache = nil,
|
|
394
|
+
memory = nil,
|
|
395
|
+
analytics = nil,
|
|
396
|
+
x_algolia_secure_user_token = nil,
|
|
397
|
+
request_options = {}
|
|
398
|
+
)
|
|
399
|
+
response = create_agent_completion_with_http_info(
|
|
400
|
+
agent_id,
|
|
401
|
+
compatibility_mode,
|
|
402
|
+
agent_completion_request,
|
|
403
|
+
stream,
|
|
404
|
+
cache,
|
|
405
|
+
memory,
|
|
406
|
+
analytics,
|
|
407
|
+
x_algolia_secure_user_token,
|
|
408
|
+
request_options
|
|
409
|
+
)
|
|
410
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || "Hash<String, Object>")
|
|
411
|
+
end
|
|
412
|
+
|
|
413
|
+
# Create new feedback entry.
|
|
414
|
+
#
|
|
415
|
+
# Required API Key ACLs:
|
|
416
|
+
# - search
|
|
417
|
+
# @param feedback_creation_request [FeedbackCreationRequest] (required)
|
|
418
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
419
|
+
# @return [Http::Response] the response
|
|
420
|
+
def create_feedback_with_http_info(feedback_creation_request, request_options = {})
|
|
421
|
+
# verify the required parameter 'feedback_creation_request' is set
|
|
422
|
+
if @api_client.config.client_side_validation && feedback_creation_request.nil?
|
|
423
|
+
raise ArgumentError, "Parameter `feedback_creation_request` is required when calling `create_feedback`."
|
|
424
|
+
end
|
|
425
|
+
|
|
426
|
+
path = "/agent-studio/1/feedback"
|
|
427
|
+
query_params = {}
|
|
428
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
429
|
+
header_params = {}
|
|
430
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
431
|
+
|
|
432
|
+
post_body = request_options[:debug_body] || @api_client.object_to_http_body(feedback_creation_request)
|
|
433
|
+
|
|
434
|
+
new_options = request_options.merge(
|
|
435
|
+
:operation => :"AgentStudioClient.create_feedback",
|
|
436
|
+
:header_params => header_params,
|
|
437
|
+
:query_params => query_params,
|
|
438
|
+
:body => post_body,
|
|
439
|
+
:use_read_transporter => false
|
|
440
|
+
)
|
|
441
|
+
|
|
442
|
+
@api_client.call_api(:POST, path, new_options)
|
|
443
|
+
end
|
|
444
|
+
|
|
445
|
+
# Create new feedback entry.
|
|
446
|
+
#
|
|
447
|
+
# Required API Key ACLs:
|
|
448
|
+
# - search
|
|
449
|
+
# @param feedback_creation_request [FeedbackCreationRequest] (required)
|
|
450
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
451
|
+
# @return [FeedbackResponse]
|
|
452
|
+
def create_feedback(feedback_creation_request, request_options = {})
|
|
453
|
+
response = create_feedback_with_http_info(feedback_creation_request, request_options)
|
|
454
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || "AgentStudio::FeedbackResponse")
|
|
455
|
+
end
|
|
456
|
+
|
|
457
|
+
# Create Provider.
|
|
458
|
+
#
|
|
459
|
+
# Required API Key ACLs:
|
|
460
|
+
# - editSettings
|
|
461
|
+
# @param provider_authentication_create [ProviderAuthenticationCreate] (required)
|
|
462
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
463
|
+
# @return [Http::Response] the response
|
|
464
|
+
def create_provider_with_http_info(provider_authentication_create, request_options = {})
|
|
465
|
+
# verify the required parameter 'provider_authentication_create' is set
|
|
466
|
+
if @api_client.config.client_side_validation && provider_authentication_create.nil?
|
|
467
|
+
raise ArgumentError, "Parameter `provider_authentication_create` is required when calling `create_provider`."
|
|
468
|
+
end
|
|
469
|
+
|
|
470
|
+
path = "/agent-studio/1/providers"
|
|
471
|
+
query_params = {}
|
|
472
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
473
|
+
header_params = {}
|
|
474
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
475
|
+
|
|
476
|
+
post_body = request_options[:debug_body] || @api_client.object_to_http_body(provider_authentication_create)
|
|
477
|
+
|
|
478
|
+
new_options = request_options.merge(
|
|
479
|
+
:operation => :"AgentStudioClient.create_provider",
|
|
480
|
+
:header_params => header_params,
|
|
481
|
+
:query_params => query_params,
|
|
482
|
+
:body => post_body,
|
|
483
|
+
:use_read_transporter => false
|
|
484
|
+
)
|
|
485
|
+
|
|
486
|
+
@api_client.call_api(:POST, path, new_options)
|
|
487
|
+
end
|
|
488
|
+
|
|
489
|
+
# Create Provider.
|
|
490
|
+
#
|
|
491
|
+
# Required API Key ACLs:
|
|
492
|
+
# - editSettings
|
|
493
|
+
# @param provider_authentication_create [ProviderAuthenticationCreate] (required)
|
|
494
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
495
|
+
# @return [ProviderAuthenticationResponse]
|
|
496
|
+
def create_provider(provider_authentication_create, request_options = {})
|
|
497
|
+
response = create_provider_with_http_info(provider_authentication_create, request_options)
|
|
498
|
+
@api_client.deserialize(
|
|
499
|
+
response.body,
|
|
500
|
+
request_options[:debug_return_type] || "AgentStudio::ProviderAuthenticationResponse"
|
|
501
|
+
)
|
|
502
|
+
end
|
|
503
|
+
|
|
504
|
+
# Create Secret Key.
|
|
505
|
+
#
|
|
506
|
+
# Required API Key ACLs:
|
|
507
|
+
# - admin
|
|
508
|
+
# @param secret_key_create [SecretKeyCreate] (required)
|
|
509
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
510
|
+
# @return [Http::Response] the response
|
|
511
|
+
def create_secret_key_with_http_info(secret_key_create, request_options = {})
|
|
512
|
+
# verify the required parameter 'secret_key_create' is set
|
|
513
|
+
if @api_client.config.client_side_validation && secret_key_create.nil?
|
|
514
|
+
raise ArgumentError, "Parameter `secret_key_create` is required when calling `create_secret_key`."
|
|
515
|
+
end
|
|
516
|
+
|
|
517
|
+
path = "/agent-studio/1/secret-keys"
|
|
518
|
+
query_params = {}
|
|
519
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
520
|
+
header_params = {}
|
|
521
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
522
|
+
|
|
523
|
+
post_body = request_options[:debug_body] || @api_client.object_to_http_body(secret_key_create)
|
|
524
|
+
|
|
525
|
+
new_options = request_options.merge(
|
|
526
|
+
:operation => :"AgentStudioClient.create_secret_key",
|
|
527
|
+
:header_params => header_params,
|
|
528
|
+
:query_params => query_params,
|
|
529
|
+
:body => post_body,
|
|
530
|
+
:use_read_transporter => false
|
|
531
|
+
)
|
|
532
|
+
|
|
533
|
+
@api_client.call_api(:POST, path, new_options)
|
|
534
|
+
end
|
|
535
|
+
|
|
536
|
+
# Create Secret Key.
|
|
537
|
+
#
|
|
538
|
+
# Required API Key ACLs:
|
|
539
|
+
# - admin
|
|
540
|
+
# @param secret_key_create [SecretKeyCreate] (required)
|
|
541
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
542
|
+
# @return [SecretKeyResponse]
|
|
543
|
+
def create_secret_key(secret_key_create, request_options = {})
|
|
544
|
+
response = create_secret_key_with_http_info(secret_key_create, request_options)
|
|
545
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || "AgentStudio::SecretKeyResponse")
|
|
546
|
+
end
|
|
547
|
+
|
|
548
|
+
# This method lets you send requests to the Algolia REST API.
|
|
549
|
+
|
|
550
|
+
# @param path [String] Path of the endpoint, for example `1/newFeature`. (required)
|
|
551
|
+
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
|
|
552
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
553
|
+
# @return [Http::Response] the response
|
|
554
|
+
def custom_delete_with_http_info(path, parameters = nil, request_options = {})
|
|
555
|
+
# verify the required parameter 'path' is set
|
|
556
|
+
if @api_client.config.client_side_validation && path.nil?
|
|
557
|
+
raise ArgumentError, "Parameter `path` is required when calling `custom_delete`."
|
|
558
|
+
end
|
|
559
|
+
# verify the required parameter 'path' is not empty
|
|
560
|
+
if @api_client.config.client_side_validation && path.empty?
|
|
561
|
+
raise ArgumentError, "Parameter `path` is required when calling `custom_delete`."
|
|
562
|
+
end
|
|
563
|
+
|
|
564
|
+
path = "/agent-studio/{path}".sub("{" + "path" + "}", path.to_s)
|
|
565
|
+
query_params = {}
|
|
566
|
+
query_params = query_params.merge(parameters) unless parameters.nil?
|
|
567
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
568
|
+
header_params = {}
|
|
569
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
570
|
+
|
|
571
|
+
post_body = request_options[:debug_body]
|
|
572
|
+
|
|
573
|
+
new_options = request_options.merge(
|
|
574
|
+
:operation => :"AgentStudioClient.custom_delete",
|
|
575
|
+
:header_params => header_params,
|
|
576
|
+
:query_params => query_params,
|
|
577
|
+
:body => post_body,
|
|
578
|
+
:use_read_transporter => false
|
|
579
|
+
)
|
|
580
|
+
|
|
581
|
+
@api_client.call_api(:DELETE, path, new_options)
|
|
582
|
+
end
|
|
583
|
+
|
|
584
|
+
# This method lets you send requests to the Algolia REST API.
|
|
585
|
+
|
|
586
|
+
# @param path [String] Path of the endpoint, for example `1/newFeature`. (required)
|
|
587
|
+
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
|
|
588
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
589
|
+
# @return [Object]
|
|
590
|
+
def custom_delete(path, parameters = nil, request_options = {})
|
|
591
|
+
response = custom_delete_with_http_info(path, parameters, request_options)
|
|
592
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || "Object")
|
|
593
|
+
end
|
|
594
|
+
|
|
595
|
+
# This method lets you send requests to the Algolia REST API.
|
|
596
|
+
|
|
597
|
+
# @param path [String] Path of the endpoint, for example `1/newFeature`. (required)
|
|
598
|
+
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
|
|
599
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
600
|
+
# @return [Http::Response] the response
|
|
601
|
+
def custom_get_with_http_info(path, parameters = nil, request_options = {})
|
|
602
|
+
# verify the required parameter 'path' is set
|
|
603
|
+
if @api_client.config.client_side_validation && path.nil?
|
|
604
|
+
raise ArgumentError, "Parameter `path` is required when calling `custom_get`."
|
|
605
|
+
end
|
|
606
|
+
# verify the required parameter 'path' is not empty
|
|
607
|
+
if @api_client.config.client_side_validation && path.empty?
|
|
608
|
+
raise ArgumentError, "Parameter `path` is required when calling `custom_get`."
|
|
609
|
+
end
|
|
610
|
+
|
|
611
|
+
path = "/agent-studio/{path}".sub("{" + "path" + "}", path.to_s)
|
|
612
|
+
query_params = {}
|
|
613
|
+
query_params = query_params.merge(parameters) unless parameters.nil?
|
|
614
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
615
|
+
header_params = {}
|
|
616
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
617
|
+
|
|
618
|
+
post_body = request_options[:debug_body]
|
|
619
|
+
|
|
620
|
+
new_options = request_options.merge(
|
|
621
|
+
:operation => :"AgentStudioClient.custom_get",
|
|
622
|
+
:header_params => header_params,
|
|
623
|
+
:query_params => query_params,
|
|
624
|
+
:body => post_body,
|
|
625
|
+
:use_read_transporter => false
|
|
626
|
+
)
|
|
627
|
+
|
|
628
|
+
@api_client.call_api(:GET, path, new_options)
|
|
629
|
+
end
|
|
630
|
+
|
|
631
|
+
# This method lets you send requests to the Algolia REST API.
|
|
632
|
+
|
|
633
|
+
# @param path [String] Path of the endpoint, for example `1/newFeature`. (required)
|
|
634
|
+
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
|
|
635
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
636
|
+
# @return [Object]
|
|
637
|
+
def custom_get(path, parameters = nil, request_options = {})
|
|
638
|
+
response = custom_get_with_http_info(path, parameters, request_options)
|
|
639
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || "Object")
|
|
640
|
+
end
|
|
641
|
+
|
|
642
|
+
# This method lets you send requests to the Algolia REST API.
|
|
643
|
+
|
|
644
|
+
# @param path [String] Path of the endpoint, for example `1/newFeature`. (required)
|
|
645
|
+
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
|
|
646
|
+
# @param body [Object] Parameters to send with the custom request.
|
|
647
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
648
|
+
# @return [Http::Response] the response
|
|
649
|
+
def custom_post_with_http_info(path, parameters = nil, body = nil, request_options = {})
|
|
650
|
+
# verify the required parameter 'path' is set
|
|
651
|
+
if @api_client.config.client_side_validation && path.nil?
|
|
652
|
+
raise ArgumentError, "Parameter `path` is required when calling `custom_post`."
|
|
653
|
+
end
|
|
654
|
+
# verify the required parameter 'path' is not empty
|
|
655
|
+
if @api_client.config.client_side_validation && path.empty?
|
|
656
|
+
raise ArgumentError, "Parameter `path` is required when calling `custom_post`."
|
|
657
|
+
end
|
|
658
|
+
|
|
659
|
+
path = "/agent-studio/{path}".sub("{" + "path" + "}", path.to_s)
|
|
660
|
+
query_params = {}
|
|
661
|
+
query_params = query_params.merge(parameters) unless parameters.nil?
|
|
662
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
663
|
+
header_params = {}
|
|
664
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
665
|
+
|
|
666
|
+
post_body = request_options[:debug_body] || @api_client.object_to_http_body(body)
|
|
667
|
+
|
|
668
|
+
new_options = request_options.merge(
|
|
669
|
+
:operation => :"AgentStudioClient.custom_post",
|
|
670
|
+
:header_params => header_params,
|
|
671
|
+
:query_params => query_params,
|
|
672
|
+
:body => post_body,
|
|
673
|
+
:use_read_transporter => false
|
|
674
|
+
)
|
|
675
|
+
|
|
676
|
+
@api_client.call_api(:POST, path, new_options)
|
|
677
|
+
end
|
|
678
|
+
|
|
679
|
+
# This method lets you send requests to the Algolia REST API.
|
|
680
|
+
|
|
681
|
+
# @param path [String] Path of the endpoint, for example `1/newFeature`. (required)
|
|
682
|
+
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
|
|
683
|
+
# @param body [Object] Parameters to send with the custom request.
|
|
684
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
685
|
+
# @return [Object]
|
|
686
|
+
def custom_post(path, parameters = nil, body = nil, request_options = {})
|
|
687
|
+
response = custom_post_with_http_info(path, parameters, body, request_options)
|
|
688
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || "Object")
|
|
689
|
+
end
|
|
690
|
+
|
|
691
|
+
# This method lets you send requests to the Algolia REST API.
|
|
692
|
+
|
|
693
|
+
# @param path [String] Path of the endpoint, for example `1/newFeature`. (required)
|
|
694
|
+
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
|
|
695
|
+
# @param body [Object] Parameters to send with the custom request.
|
|
696
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
697
|
+
# @return [Http::Response] the response
|
|
698
|
+
def custom_put_with_http_info(path, parameters = nil, body = nil, request_options = {})
|
|
699
|
+
# verify the required parameter 'path' is set
|
|
700
|
+
if @api_client.config.client_side_validation && path.nil?
|
|
701
|
+
raise ArgumentError, "Parameter `path` is required when calling `custom_put`."
|
|
702
|
+
end
|
|
703
|
+
# verify the required parameter 'path' is not empty
|
|
704
|
+
if @api_client.config.client_side_validation && path.empty?
|
|
705
|
+
raise ArgumentError, "Parameter `path` is required when calling `custom_put`."
|
|
706
|
+
end
|
|
707
|
+
|
|
708
|
+
path = "/agent-studio/{path}".sub("{" + "path" + "}", path.to_s)
|
|
709
|
+
query_params = {}
|
|
710
|
+
query_params = query_params.merge(parameters) unless parameters.nil?
|
|
711
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
712
|
+
header_params = {}
|
|
713
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
714
|
+
|
|
715
|
+
post_body = request_options[:debug_body] || @api_client.object_to_http_body(body)
|
|
716
|
+
|
|
717
|
+
new_options = request_options.merge(
|
|
718
|
+
:operation => :"AgentStudioClient.custom_put",
|
|
719
|
+
:header_params => header_params,
|
|
720
|
+
:query_params => query_params,
|
|
721
|
+
:body => post_body,
|
|
722
|
+
:use_read_transporter => false
|
|
723
|
+
)
|
|
724
|
+
|
|
725
|
+
@api_client.call_api(:PUT, path, new_options)
|
|
726
|
+
end
|
|
727
|
+
|
|
728
|
+
# This method lets you send requests to the Algolia REST API.
|
|
729
|
+
|
|
730
|
+
# @param path [String] Path of the endpoint, for example `1/newFeature`. (required)
|
|
731
|
+
# @param parameters [Hash<String, Object>] Query parameters to apply to the current query.
|
|
732
|
+
# @param body [Object] Parameters to send with the custom request.
|
|
733
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
734
|
+
# @return [Object]
|
|
735
|
+
def custom_put(path, parameters = nil, body = nil, request_options = {})
|
|
736
|
+
response = custom_put_with_http_info(path, parameters, body, request_options)
|
|
737
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || "Object")
|
|
738
|
+
end
|
|
739
|
+
|
|
740
|
+
# Delete the specified agent.
|
|
741
|
+
#
|
|
742
|
+
# Required API Key ACLs:
|
|
743
|
+
# - editSettings
|
|
744
|
+
# @param agent_id [String] The agentId. (required)
|
|
745
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
746
|
+
# @return [Http::Response] the response
|
|
747
|
+
def delete_agent_with_http_info(agent_id, request_options = {})
|
|
748
|
+
# verify the required parameter 'agent_id' is set
|
|
749
|
+
if @api_client.config.client_side_validation && agent_id.nil?
|
|
750
|
+
raise ArgumentError, "Parameter `agent_id` is required when calling `delete_agent`."
|
|
751
|
+
end
|
|
752
|
+
# verify the required parameter 'agent_id' is not empty
|
|
753
|
+
if @api_client.config.client_side_validation && agent_id.empty?
|
|
754
|
+
raise ArgumentError, "Parameter `agent_id` is required when calling `delete_agent`."
|
|
755
|
+
end
|
|
756
|
+
|
|
757
|
+
path = "/agent-studio/1/agents/{agentId}".sub("{" + "agentId" + "}", Transport.encode_uri(agent_id.to_s))
|
|
758
|
+
query_params = {}
|
|
759
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
760
|
+
header_params = {}
|
|
761
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
762
|
+
|
|
763
|
+
post_body = request_options[:debug_body]
|
|
764
|
+
|
|
765
|
+
new_options = request_options.merge(
|
|
766
|
+
:operation => :"AgentStudioClient.delete_agent",
|
|
767
|
+
:header_params => header_params,
|
|
768
|
+
:query_params => query_params,
|
|
769
|
+
:body => post_body,
|
|
770
|
+
:use_read_transporter => false
|
|
771
|
+
)
|
|
772
|
+
|
|
773
|
+
@api_client.call_api(:DELETE, path, new_options)
|
|
774
|
+
end
|
|
775
|
+
|
|
776
|
+
# Delete the specified agent.
|
|
777
|
+
#
|
|
778
|
+
# Required API Key ACLs:
|
|
779
|
+
# - editSettings
|
|
780
|
+
# @param agent_id [String] The agentId. (required)
|
|
781
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
782
|
+
# @return [nil]
|
|
783
|
+
def delete_agent(agent_id, request_options = {})
|
|
784
|
+
delete_agent_with_http_info(agent_id, request_options)
|
|
785
|
+
nil
|
|
786
|
+
end
|
|
787
|
+
|
|
788
|
+
# Deletes the conversations matching the given filers.
|
|
789
|
+
#
|
|
790
|
+
# Required API Key ACLs:
|
|
791
|
+
# - logs
|
|
792
|
+
# @param agent_id [String] The agentId. (required)
|
|
793
|
+
# @param start_date [String] Filter conversations created after this date (format: YYYY-MM-DD).
|
|
794
|
+
# @param end_date [String] Filter conversations created before this date (format: YYYY-MM-DD).
|
|
795
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
796
|
+
# @return [Http::Response] the response
|
|
797
|
+
def delete_agent_conversations_with_http_info(agent_id, start_date = nil, end_date = nil, request_options = {})
|
|
798
|
+
# verify the required parameter 'agent_id' is set
|
|
799
|
+
if @api_client.config.client_side_validation && agent_id.nil?
|
|
800
|
+
raise ArgumentError, "Parameter `agent_id` is required when calling `delete_agent_conversations`."
|
|
801
|
+
end
|
|
802
|
+
# verify the required parameter 'agent_id' is not empty
|
|
803
|
+
if @api_client.config.client_side_validation && agent_id.empty?
|
|
804
|
+
raise ArgumentError, "Parameter `agent_id` is required when calling `delete_agent_conversations`."
|
|
805
|
+
end
|
|
806
|
+
|
|
807
|
+
path = "/agent-studio/1/agents/{agentId}/conversations".sub(
|
|
808
|
+
"{" + "agentId" + "}",
|
|
809
|
+
Transport.encode_uri(agent_id.to_s)
|
|
810
|
+
)
|
|
811
|
+
query_params = {}
|
|
812
|
+
query_params[:startDate] = start_date unless start_date.nil?
|
|
813
|
+
query_params[:endDate] = end_date unless end_date.nil?
|
|
814
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
815
|
+
header_params = {}
|
|
816
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
817
|
+
|
|
818
|
+
post_body = request_options[:debug_body]
|
|
819
|
+
|
|
820
|
+
new_options = request_options.merge(
|
|
821
|
+
:operation => :"AgentStudioClient.delete_agent_conversations",
|
|
822
|
+
:header_params => header_params,
|
|
823
|
+
:query_params => query_params,
|
|
824
|
+
:body => post_body,
|
|
825
|
+
:use_read_transporter => false
|
|
826
|
+
)
|
|
827
|
+
|
|
828
|
+
@api_client.call_api(:DELETE, path, new_options)
|
|
829
|
+
end
|
|
830
|
+
|
|
831
|
+
# Deletes the conversations matching the given filers.
|
|
832
|
+
#
|
|
833
|
+
# Required API Key ACLs:
|
|
834
|
+
# - logs
|
|
835
|
+
# @param agent_id [String] The agentId. (required)
|
|
836
|
+
# @param start_date [String] Filter conversations created after this date (format: YYYY-MM-DD).
|
|
837
|
+
# @param end_date [String] Filter conversations created before this date (format: YYYY-MM-DD).
|
|
838
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
839
|
+
# @return [nil]
|
|
840
|
+
def delete_agent_conversations(agent_id, start_date = nil, end_date = nil, request_options = {})
|
|
841
|
+
delete_agent_conversations_with_http_info(agent_id, start_date, end_date, request_options)
|
|
842
|
+
nil
|
|
843
|
+
end
|
|
844
|
+
|
|
845
|
+
# Remove an allowed domain by id.
|
|
846
|
+
#
|
|
847
|
+
# Required API Key ACLs:
|
|
848
|
+
# - editSettings
|
|
849
|
+
# @param domain_id [String] The domainId. (required)
|
|
850
|
+
# @param agent_id [String] The agentId. (required)
|
|
851
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
852
|
+
# @return [Http::Response] the response
|
|
853
|
+
def delete_allowed_domain_with_http_info(domain_id, agent_id, request_options = {})
|
|
854
|
+
# verify the required parameter 'domain_id' is set
|
|
855
|
+
if @api_client.config.client_side_validation && domain_id.nil?
|
|
856
|
+
raise ArgumentError, "Parameter `domain_id` is required when calling `delete_allowed_domain`."
|
|
857
|
+
end
|
|
858
|
+
# verify the required parameter 'domain_id' is not empty
|
|
859
|
+
if @api_client.config.client_side_validation && domain_id.empty?
|
|
860
|
+
raise ArgumentError, "Parameter `domain_id` is required when calling `delete_allowed_domain`."
|
|
861
|
+
end
|
|
862
|
+
# verify the required parameter 'agent_id' is set
|
|
863
|
+
if @api_client.config.client_side_validation && agent_id.nil?
|
|
864
|
+
raise ArgumentError, "Parameter `agent_id` is required when calling `delete_allowed_domain`."
|
|
865
|
+
end
|
|
866
|
+
# verify the required parameter 'agent_id' is not empty
|
|
867
|
+
if @api_client.config.client_side_validation && agent_id.empty?
|
|
868
|
+
raise ArgumentError, "Parameter `agent_id` is required when calling `delete_allowed_domain`."
|
|
869
|
+
end
|
|
870
|
+
|
|
871
|
+
path = "/agent-studio/1/agents/{agentId}/allowed-domains/{domainId}"
|
|
872
|
+
.sub("{" + "domainId" + "}", Transport.encode_uri(domain_id.to_s))
|
|
873
|
+
.sub("{" + "agentId" + "}", Transport.encode_uri(agent_id.to_s))
|
|
874
|
+
query_params = {}
|
|
875
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
876
|
+
header_params = {}
|
|
877
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
878
|
+
|
|
879
|
+
post_body = request_options[:debug_body]
|
|
880
|
+
|
|
881
|
+
new_options = request_options.merge(
|
|
882
|
+
:operation => :"AgentStudioClient.delete_allowed_domain",
|
|
883
|
+
:header_params => header_params,
|
|
884
|
+
:query_params => query_params,
|
|
885
|
+
:body => post_body,
|
|
886
|
+
:use_read_transporter => false
|
|
887
|
+
)
|
|
888
|
+
|
|
889
|
+
@api_client.call_api(:DELETE, path, new_options)
|
|
890
|
+
end
|
|
891
|
+
|
|
892
|
+
# Remove an allowed domain by id.
|
|
893
|
+
#
|
|
894
|
+
# Required API Key ACLs:
|
|
895
|
+
# - editSettings
|
|
896
|
+
# @param domain_id [String] The domainId. (required)
|
|
897
|
+
# @param agent_id [String] The agentId. (required)
|
|
898
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
899
|
+
# @return [nil]
|
|
900
|
+
def delete_allowed_domain(domain_id, agent_id, request_options = {})
|
|
901
|
+
delete_allowed_domain_with_http_info(domain_id, agent_id, request_options)
|
|
902
|
+
nil
|
|
903
|
+
end
|
|
904
|
+
|
|
905
|
+
# Deletes the conversation with the given ID.
|
|
906
|
+
#
|
|
907
|
+
# Required API Key ACLs:
|
|
908
|
+
# - logs
|
|
909
|
+
# @param conversation_id [String] The conversationId. (required)
|
|
910
|
+
# @param agent_id [String] The agentId. (required)
|
|
911
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
912
|
+
# @return [Http::Response] the response
|
|
913
|
+
def delete_conversation_with_http_info(conversation_id, agent_id, request_options = {})
|
|
914
|
+
# verify the required parameter 'conversation_id' is set
|
|
915
|
+
if @api_client.config.client_side_validation && conversation_id.nil?
|
|
916
|
+
raise ArgumentError, "Parameter `conversation_id` is required when calling `delete_conversation`."
|
|
917
|
+
end
|
|
918
|
+
# verify the required parameter 'conversation_id' is not empty
|
|
919
|
+
if @api_client.config.client_side_validation && conversation_id.empty?
|
|
920
|
+
raise ArgumentError, "Parameter `conversation_id` is required when calling `delete_conversation`."
|
|
921
|
+
end
|
|
922
|
+
# verify the required parameter 'agent_id' is set
|
|
923
|
+
if @api_client.config.client_side_validation && agent_id.nil?
|
|
924
|
+
raise ArgumentError, "Parameter `agent_id` is required when calling `delete_conversation`."
|
|
925
|
+
end
|
|
926
|
+
# verify the required parameter 'agent_id' is not empty
|
|
927
|
+
if @api_client.config.client_side_validation && agent_id.empty?
|
|
928
|
+
raise ArgumentError, "Parameter `agent_id` is required when calling `delete_conversation`."
|
|
929
|
+
end
|
|
930
|
+
|
|
931
|
+
path = "/agent-studio/1/agents/{agentId}/conversations/{conversationId}"
|
|
932
|
+
.sub("{" + "conversationId" + "}", Transport.encode_uri(conversation_id.to_s))
|
|
933
|
+
.sub("{" + "agentId" + "}", Transport.encode_uri(agent_id.to_s))
|
|
934
|
+
query_params = {}
|
|
935
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
936
|
+
header_params = {}
|
|
937
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
938
|
+
|
|
939
|
+
post_body = request_options[:debug_body]
|
|
940
|
+
|
|
941
|
+
new_options = request_options.merge(
|
|
942
|
+
:operation => :"AgentStudioClient.delete_conversation",
|
|
943
|
+
:header_params => header_params,
|
|
944
|
+
:query_params => query_params,
|
|
945
|
+
:body => post_body,
|
|
946
|
+
:use_read_transporter => false
|
|
947
|
+
)
|
|
948
|
+
|
|
949
|
+
@api_client.call_api(:DELETE, path, new_options)
|
|
950
|
+
end
|
|
951
|
+
|
|
952
|
+
# Deletes the conversation with the given ID.
|
|
953
|
+
#
|
|
954
|
+
# Required API Key ACLs:
|
|
955
|
+
# - logs
|
|
956
|
+
# @param conversation_id [String] The conversationId. (required)
|
|
957
|
+
# @param agent_id [String] The agentId. (required)
|
|
958
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
959
|
+
# @return [nil]
|
|
960
|
+
def delete_conversation(conversation_id, agent_id, request_options = {})
|
|
961
|
+
delete_conversation_with_http_info(conversation_id, agent_id, request_options)
|
|
962
|
+
nil
|
|
963
|
+
end
|
|
964
|
+
|
|
965
|
+
# Delete Provider.
|
|
966
|
+
#
|
|
967
|
+
# Required API Key ACLs:
|
|
968
|
+
# - editSettings
|
|
969
|
+
# @param provider_id [String] The providerId. (required)
|
|
970
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
971
|
+
# @return [Http::Response] the response
|
|
972
|
+
def delete_provider_with_http_info(provider_id, request_options = {})
|
|
973
|
+
# verify the required parameter 'provider_id' is set
|
|
974
|
+
if @api_client.config.client_side_validation && provider_id.nil?
|
|
975
|
+
raise ArgumentError, "Parameter `provider_id` is required when calling `delete_provider`."
|
|
976
|
+
end
|
|
977
|
+
# verify the required parameter 'provider_id' is not empty
|
|
978
|
+
if @api_client.config.client_side_validation && provider_id.empty?
|
|
979
|
+
raise ArgumentError, "Parameter `provider_id` is required when calling `delete_provider`."
|
|
980
|
+
end
|
|
981
|
+
|
|
982
|
+
path = "/agent-studio/1/providers/{providerId}".sub(
|
|
983
|
+
"{" + "providerId" + "}",
|
|
984
|
+
Transport.encode_uri(provider_id.to_s)
|
|
985
|
+
)
|
|
986
|
+
query_params = {}
|
|
987
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
988
|
+
header_params = {}
|
|
989
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
990
|
+
|
|
991
|
+
post_body = request_options[:debug_body]
|
|
992
|
+
|
|
993
|
+
new_options = request_options.merge(
|
|
994
|
+
:operation => :"AgentStudioClient.delete_provider",
|
|
995
|
+
:header_params => header_params,
|
|
996
|
+
:query_params => query_params,
|
|
997
|
+
:body => post_body,
|
|
998
|
+
:use_read_transporter => false
|
|
999
|
+
)
|
|
1000
|
+
|
|
1001
|
+
@api_client.call_api(:DELETE, path, new_options)
|
|
1002
|
+
end
|
|
1003
|
+
|
|
1004
|
+
# Delete Provider.
|
|
1005
|
+
#
|
|
1006
|
+
# Required API Key ACLs:
|
|
1007
|
+
# - editSettings
|
|
1008
|
+
# @param provider_id [String] The providerId. (required)
|
|
1009
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
1010
|
+
# @return [nil]
|
|
1011
|
+
def delete_provider(provider_id, request_options = {})
|
|
1012
|
+
delete_provider_with_http_info(provider_id, request_options)
|
|
1013
|
+
nil
|
|
1014
|
+
end
|
|
1015
|
+
|
|
1016
|
+
# Delete Secret Key.
|
|
1017
|
+
#
|
|
1018
|
+
# Required API Key ACLs:
|
|
1019
|
+
# - admin
|
|
1020
|
+
# @param secret_key_id [String] The secretKeyId. (required)
|
|
1021
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
1022
|
+
# @return [Http::Response] the response
|
|
1023
|
+
def delete_secret_key_with_http_info(secret_key_id, request_options = {})
|
|
1024
|
+
# verify the required parameter 'secret_key_id' is set
|
|
1025
|
+
if @api_client.config.client_side_validation && secret_key_id.nil?
|
|
1026
|
+
raise ArgumentError, "Parameter `secret_key_id` is required when calling `delete_secret_key`."
|
|
1027
|
+
end
|
|
1028
|
+
# verify the required parameter 'secret_key_id' is not empty
|
|
1029
|
+
if @api_client.config.client_side_validation && secret_key_id.empty?
|
|
1030
|
+
raise ArgumentError, "Parameter `secret_key_id` is required when calling `delete_secret_key`."
|
|
1031
|
+
end
|
|
1032
|
+
|
|
1033
|
+
path = "/agent-studio/1/secret-keys/{secretKeyId}".sub(
|
|
1034
|
+
"{" + "secretKeyId" + "}",
|
|
1035
|
+
Transport.encode_uri(secret_key_id.to_s)
|
|
1036
|
+
)
|
|
1037
|
+
query_params = {}
|
|
1038
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
1039
|
+
header_params = {}
|
|
1040
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
1041
|
+
|
|
1042
|
+
post_body = request_options[:debug_body]
|
|
1043
|
+
|
|
1044
|
+
new_options = request_options.merge(
|
|
1045
|
+
:operation => :"AgentStudioClient.delete_secret_key",
|
|
1046
|
+
:header_params => header_params,
|
|
1047
|
+
:query_params => query_params,
|
|
1048
|
+
:body => post_body,
|
|
1049
|
+
:use_read_transporter => false
|
|
1050
|
+
)
|
|
1051
|
+
|
|
1052
|
+
@api_client.call_api(:DELETE, path, new_options)
|
|
1053
|
+
end
|
|
1054
|
+
|
|
1055
|
+
# Delete Secret Key.
|
|
1056
|
+
#
|
|
1057
|
+
# Required API Key ACLs:
|
|
1058
|
+
# - admin
|
|
1059
|
+
# @param secret_key_id [String] The secretKeyId. (required)
|
|
1060
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
1061
|
+
# @return [nil]
|
|
1062
|
+
def delete_secret_key(secret_key_id, request_options = {})
|
|
1063
|
+
delete_secret_key_with_http_info(secret_key_id, request_options)
|
|
1064
|
+
nil
|
|
1065
|
+
end
|
|
1066
|
+
|
|
1067
|
+
# Permanently deletes all messages for the given user token. Does not delete conversations.
|
|
1068
|
+
#
|
|
1069
|
+
# Required API Key ACLs:
|
|
1070
|
+
# - logs
|
|
1071
|
+
# @param user_token [String] The userToken. (required)
|
|
1072
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
1073
|
+
# @return [Http::Response] the response
|
|
1074
|
+
def delete_user_data_with_http_info(user_token, request_options = {})
|
|
1075
|
+
# verify the required parameter 'user_token' is set
|
|
1076
|
+
if @api_client.config.client_side_validation && user_token.nil?
|
|
1077
|
+
raise ArgumentError, "Parameter `user_token` is required when calling `delete_user_data`."
|
|
1078
|
+
end
|
|
1079
|
+
# verify the required parameter 'user_token' is not empty
|
|
1080
|
+
if @api_client.config.client_side_validation && user_token.empty?
|
|
1081
|
+
raise ArgumentError, "Parameter `user_token` is required when calling `delete_user_data`."
|
|
1082
|
+
end
|
|
1083
|
+
|
|
1084
|
+
path = "/agent-studio/1/user-data/{userToken}".sub("{" + "userToken" + "}", Transport.encode_uri(user_token.to_s))
|
|
1085
|
+
query_params = {}
|
|
1086
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
1087
|
+
header_params = {}
|
|
1088
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
1089
|
+
|
|
1090
|
+
post_body = request_options[:debug_body]
|
|
1091
|
+
|
|
1092
|
+
new_options = request_options.merge(
|
|
1093
|
+
:operation => :"AgentStudioClient.delete_user_data",
|
|
1094
|
+
:header_params => header_params,
|
|
1095
|
+
:query_params => query_params,
|
|
1096
|
+
:body => post_body,
|
|
1097
|
+
:use_read_transporter => false
|
|
1098
|
+
)
|
|
1099
|
+
|
|
1100
|
+
@api_client.call_api(:DELETE, path, new_options)
|
|
1101
|
+
end
|
|
1102
|
+
|
|
1103
|
+
# Permanently deletes all messages for the given user token. Does not delete conversations.
|
|
1104
|
+
#
|
|
1105
|
+
# Required API Key ACLs:
|
|
1106
|
+
# - logs
|
|
1107
|
+
# @param user_token [String] The userToken. (required)
|
|
1108
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
1109
|
+
# @return [nil]
|
|
1110
|
+
def delete_user_data(user_token, request_options = {})
|
|
1111
|
+
delete_user_data_with_http_info(user_token, request_options)
|
|
1112
|
+
nil
|
|
1113
|
+
end
|
|
1114
|
+
|
|
1115
|
+
# Exports all conversations based on the passed filters.
|
|
1116
|
+
#
|
|
1117
|
+
# Required API Key ACLs:
|
|
1118
|
+
# - logs
|
|
1119
|
+
# @param agent_id [String] The agentId. (required)
|
|
1120
|
+
# @param start_date [String] Filter conversations created after this date (format: YYYY-MM-DD).
|
|
1121
|
+
# @param end_date [String] Filter conversations created before this date (format: YYYY-MM-DD).
|
|
1122
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
1123
|
+
# @return [Http::Response] the response
|
|
1124
|
+
def export_conversations_with_http_info(agent_id, start_date = nil, end_date = nil, request_options = {})
|
|
1125
|
+
# verify the required parameter 'agent_id' is set
|
|
1126
|
+
if @api_client.config.client_side_validation && agent_id.nil?
|
|
1127
|
+
raise ArgumentError, "Parameter `agent_id` is required when calling `export_conversations`."
|
|
1128
|
+
end
|
|
1129
|
+
# verify the required parameter 'agent_id' is not empty
|
|
1130
|
+
if @api_client.config.client_side_validation && agent_id.empty?
|
|
1131
|
+
raise ArgumentError, "Parameter `agent_id` is required when calling `export_conversations`."
|
|
1132
|
+
end
|
|
1133
|
+
|
|
1134
|
+
path = "/agent-studio/1/agents/{agentId}/conversations/export".sub(
|
|
1135
|
+
"{" + "agentId" + "}",
|
|
1136
|
+
Transport.encode_uri(agent_id.to_s)
|
|
1137
|
+
)
|
|
1138
|
+
query_params = {}
|
|
1139
|
+
query_params[:startDate] = start_date unless start_date.nil?
|
|
1140
|
+
query_params[:endDate] = end_date unless end_date.nil?
|
|
1141
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
1142
|
+
header_params = {}
|
|
1143
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
1144
|
+
|
|
1145
|
+
post_body = request_options[:debug_body]
|
|
1146
|
+
|
|
1147
|
+
new_options = request_options.merge(
|
|
1148
|
+
:operation => :"AgentStudioClient.export_conversations",
|
|
1149
|
+
:header_params => header_params,
|
|
1150
|
+
:query_params => query_params,
|
|
1151
|
+
:body => post_body,
|
|
1152
|
+
:use_read_transporter => false
|
|
1153
|
+
)
|
|
1154
|
+
|
|
1155
|
+
@api_client.call_api(:GET, path, new_options)
|
|
1156
|
+
end
|
|
1157
|
+
|
|
1158
|
+
# Exports all conversations based on the passed filters.
|
|
1159
|
+
#
|
|
1160
|
+
# Required API Key ACLs:
|
|
1161
|
+
# - logs
|
|
1162
|
+
# @param agent_id [String] The agentId. (required)
|
|
1163
|
+
# @param start_date [String] Filter conversations created after this date (format: YYYY-MM-DD).
|
|
1164
|
+
# @param end_date [String] Filter conversations created before this date (format: YYYY-MM-DD).
|
|
1165
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
1166
|
+
# @return [Array<ConversationFullResponse>]
|
|
1167
|
+
def export_conversations(agent_id, start_date = nil, end_date = nil, request_options = {})
|
|
1168
|
+
response = export_conversations_with_http_info(agent_id, start_date, end_date, request_options)
|
|
1169
|
+
@api_client.deserialize(
|
|
1170
|
+
response.body,
|
|
1171
|
+
request_options[:debug_return_type] || "Array<AgentStudio::ConversationFullResponse>"
|
|
1172
|
+
)
|
|
1173
|
+
end
|
|
1174
|
+
|
|
1175
|
+
# Retrieve details of the specified agent.
|
|
1176
|
+
#
|
|
1177
|
+
# Required API Key ACLs:
|
|
1178
|
+
# - settings
|
|
1179
|
+
# @param agent_id [String] The agentId. (required)
|
|
1180
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
1181
|
+
# @return [Http::Response] the response
|
|
1182
|
+
def get_agent_with_http_info(agent_id, request_options = {})
|
|
1183
|
+
# verify the required parameter 'agent_id' is set
|
|
1184
|
+
if @api_client.config.client_side_validation && agent_id.nil?
|
|
1185
|
+
raise ArgumentError, "Parameter `agent_id` is required when calling `get_agent`."
|
|
1186
|
+
end
|
|
1187
|
+
# verify the required parameter 'agent_id' is not empty
|
|
1188
|
+
if @api_client.config.client_side_validation && agent_id.empty?
|
|
1189
|
+
raise ArgumentError, "Parameter `agent_id` is required when calling `get_agent`."
|
|
1190
|
+
end
|
|
1191
|
+
|
|
1192
|
+
path = "/agent-studio/1/agents/{agentId}".sub("{" + "agentId" + "}", Transport.encode_uri(agent_id.to_s))
|
|
1193
|
+
query_params = {}
|
|
1194
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
1195
|
+
header_params = {}
|
|
1196
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
1197
|
+
|
|
1198
|
+
post_body = request_options[:debug_body]
|
|
1199
|
+
|
|
1200
|
+
new_options = request_options.merge(
|
|
1201
|
+
:operation => :"AgentStudioClient.get_agent",
|
|
1202
|
+
:header_params => header_params,
|
|
1203
|
+
:query_params => query_params,
|
|
1204
|
+
:body => post_body,
|
|
1205
|
+
:use_read_transporter => false
|
|
1206
|
+
)
|
|
1207
|
+
|
|
1208
|
+
@api_client.call_api(:GET, path, new_options)
|
|
1209
|
+
end
|
|
1210
|
+
|
|
1211
|
+
# Retrieve details of the specified agent.
|
|
1212
|
+
#
|
|
1213
|
+
# Required API Key ACLs:
|
|
1214
|
+
# - settings
|
|
1215
|
+
# @param agent_id [String] The agentId. (required)
|
|
1216
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
1217
|
+
# @return [AgentWithVersionResponse]
|
|
1218
|
+
def get_agent(agent_id, request_options = {})
|
|
1219
|
+
response = get_agent_with_http_info(agent_id, request_options)
|
|
1220
|
+
@api_client.deserialize(
|
|
1221
|
+
response.body,
|
|
1222
|
+
request_options[:debug_return_type] || "AgentStudio::AgentWithVersionResponse"
|
|
1223
|
+
)
|
|
1224
|
+
end
|
|
1225
|
+
|
|
1226
|
+
# Get a single allowed domain by id.
|
|
1227
|
+
#
|
|
1228
|
+
# Required API Key ACLs:
|
|
1229
|
+
# - settings
|
|
1230
|
+
# @param domain_id [String] The domainId. (required)
|
|
1231
|
+
# @param agent_id [String] The agentId. (required)
|
|
1232
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
1233
|
+
# @return [Http::Response] the response
|
|
1234
|
+
def get_allowed_domain_with_http_info(domain_id, agent_id, request_options = {})
|
|
1235
|
+
# verify the required parameter 'domain_id' is set
|
|
1236
|
+
if @api_client.config.client_side_validation && domain_id.nil?
|
|
1237
|
+
raise ArgumentError, "Parameter `domain_id` is required when calling `get_allowed_domain`."
|
|
1238
|
+
end
|
|
1239
|
+
# verify the required parameter 'domain_id' is not empty
|
|
1240
|
+
if @api_client.config.client_side_validation && domain_id.empty?
|
|
1241
|
+
raise ArgumentError, "Parameter `domain_id` is required when calling `get_allowed_domain`."
|
|
1242
|
+
end
|
|
1243
|
+
# verify the required parameter 'agent_id' is set
|
|
1244
|
+
if @api_client.config.client_side_validation && agent_id.nil?
|
|
1245
|
+
raise ArgumentError, "Parameter `agent_id` is required when calling `get_allowed_domain`."
|
|
1246
|
+
end
|
|
1247
|
+
# verify the required parameter 'agent_id' is not empty
|
|
1248
|
+
if @api_client.config.client_side_validation && agent_id.empty?
|
|
1249
|
+
raise ArgumentError, "Parameter `agent_id` is required when calling `get_allowed_domain`."
|
|
1250
|
+
end
|
|
1251
|
+
|
|
1252
|
+
path = "/agent-studio/1/agents/{agentId}/allowed-domains/{domainId}"
|
|
1253
|
+
.sub("{" + "domainId" + "}", Transport.encode_uri(domain_id.to_s))
|
|
1254
|
+
.sub("{" + "agentId" + "}", Transport.encode_uri(agent_id.to_s))
|
|
1255
|
+
query_params = {}
|
|
1256
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
1257
|
+
header_params = {}
|
|
1258
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
1259
|
+
|
|
1260
|
+
post_body = request_options[:debug_body]
|
|
1261
|
+
|
|
1262
|
+
new_options = request_options.merge(
|
|
1263
|
+
:operation => :"AgentStudioClient.get_allowed_domain",
|
|
1264
|
+
:header_params => header_params,
|
|
1265
|
+
:query_params => query_params,
|
|
1266
|
+
:body => post_body,
|
|
1267
|
+
:use_read_transporter => false
|
|
1268
|
+
)
|
|
1269
|
+
|
|
1270
|
+
@api_client.call_api(:GET, path, new_options)
|
|
1271
|
+
end
|
|
1272
|
+
|
|
1273
|
+
# Get a single allowed domain by id.
|
|
1274
|
+
#
|
|
1275
|
+
# Required API Key ACLs:
|
|
1276
|
+
# - settings
|
|
1277
|
+
# @param domain_id [String] The domainId. (required)
|
|
1278
|
+
# @param agent_id [String] The agentId. (required)
|
|
1279
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
1280
|
+
# @return [AllowedDomainResponse]
|
|
1281
|
+
def get_allowed_domain(domain_id, agent_id, request_options = {})
|
|
1282
|
+
response = get_allowed_domain_with_http_info(domain_id, agent_id, request_options)
|
|
1283
|
+
@api_client.deserialize(
|
|
1284
|
+
response.body,
|
|
1285
|
+
request_options[:debug_return_type] || "AgentStudio::AllowedDomainResponse"
|
|
1286
|
+
)
|
|
1287
|
+
end
|
|
1288
|
+
|
|
1289
|
+
# Get Configuration.
|
|
1290
|
+
#
|
|
1291
|
+
# Required API Key ACLs:
|
|
1292
|
+
# - logs
|
|
1293
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
1294
|
+
# @return [Http::Response] the response
|
|
1295
|
+
def get_configuration_with_http_info(request_options = {})
|
|
1296
|
+
path = "/agent-studio/1/configuration"
|
|
1297
|
+
query_params = {}
|
|
1298
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
1299
|
+
header_params = {}
|
|
1300
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
1301
|
+
|
|
1302
|
+
post_body = request_options[:debug_body]
|
|
1303
|
+
|
|
1304
|
+
new_options = request_options.merge(
|
|
1305
|
+
:operation => :"AgentStudioClient.get_configuration",
|
|
1306
|
+
:header_params => header_params,
|
|
1307
|
+
:query_params => query_params,
|
|
1308
|
+
:body => post_body,
|
|
1309
|
+
:use_read_transporter => false
|
|
1310
|
+
)
|
|
1311
|
+
|
|
1312
|
+
@api_client.call_api(:GET, path, new_options)
|
|
1313
|
+
end
|
|
1314
|
+
|
|
1315
|
+
# Get Configuration.
|
|
1316
|
+
#
|
|
1317
|
+
# Required API Key ACLs:
|
|
1318
|
+
# - logs
|
|
1319
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
1320
|
+
# @return [ApplicationConfigResponse]
|
|
1321
|
+
def get_configuration(request_options = {})
|
|
1322
|
+
response = get_configuration_with_http_info(request_options)
|
|
1323
|
+
@api_client.deserialize(
|
|
1324
|
+
response.body,
|
|
1325
|
+
request_options[:debug_return_type] || "AgentStudio::ApplicationConfigResponse"
|
|
1326
|
+
)
|
|
1327
|
+
end
|
|
1328
|
+
|
|
1329
|
+
# Retrieves the conversation and its messages for the given ID.
|
|
1330
|
+
#
|
|
1331
|
+
# Required API Key ACLs:
|
|
1332
|
+
# - logs
|
|
1333
|
+
# @param conversation_id [String] The conversationId. (required)
|
|
1334
|
+
# @param agent_id [String] The agentId. (required)
|
|
1335
|
+
# @param include_feedback [Boolean] Include feedback for the conversation. (default to false)
|
|
1336
|
+
# @param x_algolia_secure_user_token [String] The X-Algolia-Secure-User-Token.
|
|
1337
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
1338
|
+
# @return [Http::Response] the response
|
|
1339
|
+
def get_conversation_with_http_info(
|
|
1340
|
+
conversation_id,
|
|
1341
|
+
agent_id,
|
|
1342
|
+
include_feedback = nil,
|
|
1343
|
+
x_algolia_secure_user_token = nil,
|
|
1344
|
+
request_options = {}
|
|
1345
|
+
)
|
|
1346
|
+
# verify the required parameter 'conversation_id' is set
|
|
1347
|
+
if @api_client.config.client_side_validation && conversation_id.nil?
|
|
1348
|
+
raise ArgumentError, "Parameter `conversation_id` is required when calling `get_conversation`."
|
|
1349
|
+
end
|
|
1350
|
+
# verify the required parameter 'conversation_id' is not empty
|
|
1351
|
+
if @api_client.config.client_side_validation && conversation_id.empty?
|
|
1352
|
+
raise ArgumentError, "Parameter `conversation_id` is required when calling `get_conversation`."
|
|
1353
|
+
end
|
|
1354
|
+
# verify the required parameter 'agent_id' is set
|
|
1355
|
+
if @api_client.config.client_side_validation && agent_id.nil?
|
|
1356
|
+
raise ArgumentError, "Parameter `agent_id` is required when calling `get_conversation`."
|
|
1357
|
+
end
|
|
1358
|
+
# verify the required parameter 'agent_id' is not empty
|
|
1359
|
+
if @api_client.config.client_side_validation && agent_id.empty?
|
|
1360
|
+
raise ArgumentError, "Parameter `agent_id` is required when calling `get_conversation`."
|
|
1361
|
+
end
|
|
1362
|
+
|
|
1363
|
+
path = "/agent-studio/1/agents/{agentId}/conversations/{conversationId}"
|
|
1364
|
+
.sub("{" + "conversationId" + "}", Transport.encode_uri(conversation_id.to_s))
|
|
1365
|
+
.sub("{" + "agentId" + "}", Transport.encode_uri(agent_id.to_s))
|
|
1366
|
+
query_params = {}
|
|
1367
|
+
query_params[:includeFeedback] = include_feedback unless include_feedback.nil?
|
|
1368
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
1369
|
+
header_params = {}
|
|
1370
|
+
unless x_algolia_secure_user_token.nil?
|
|
1371
|
+
header_params[:"X-Algolia-Secure-User-Token"] = x_algolia_secure_user_token
|
|
1372
|
+
end
|
|
1373
|
+
|
|
1374
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
1375
|
+
|
|
1376
|
+
post_body = request_options[:debug_body]
|
|
1377
|
+
|
|
1378
|
+
new_options = request_options.merge(
|
|
1379
|
+
:operation => :"AgentStudioClient.get_conversation",
|
|
1380
|
+
:header_params => header_params,
|
|
1381
|
+
:query_params => query_params,
|
|
1382
|
+
:body => post_body,
|
|
1383
|
+
:use_read_transporter => false
|
|
1384
|
+
)
|
|
1385
|
+
|
|
1386
|
+
@api_client.call_api(:GET, path, new_options)
|
|
1387
|
+
end
|
|
1388
|
+
|
|
1389
|
+
# Retrieves the conversation and its messages for the given ID.
|
|
1390
|
+
#
|
|
1391
|
+
# Required API Key ACLs:
|
|
1392
|
+
# - logs
|
|
1393
|
+
# @param conversation_id [String] The conversationId. (required)
|
|
1394
|
+
# @param agent_id [String] The agentId. (required)
|
|
1395
|
+
# @param include_feedback [Boolean] Include feedback for the conversation. (default to false)
|
|
1396
|
+
# @param x_algolia_secure_user_token [String] The X-Algolia-Secure-User-Token.
|
|
1397
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
1398
|
+
# @return [ConversationFullResponse]
|
|
1399
|
+
def get_conversation(
|
|
1400
|
+
conversation_id,
|
|
1401
|
+
agent_id,
|
|
1402
|
+
include_feedback = nil,
|
|
1403
|
+
x_algolia_secure_user_token = nil,
|
|
1404
|
+
request_options = {}
|
|
1405
|
+
)
|
|
1406
|
+
response = get_conversation_with_http_info(
|
|
1407
|
+
conversation_id,
|
|
1408
|
+
agent_id,
|
|
1409
|
+
include_feedback,
|
|
1410
|
+
x_algolia_secure_user_token,
|
|
1411
|
+
request_options
|
|
1412
|
+
)
|
|
1413
|
+
@api_client.deserialize(
|
|
1414
|
+
response.body,
|
|
1415
|
+
request_options[:debug_return_type] || "AgentStudio::ConversationFullResponse"
|
|
1416
|
+
)
|
|
1417
|
+
end
|
|
1418
|
+
|
|
1419
|
+
# Get Provider.
|
|
1420
|
+
#
|
|
1421
|
+
# Required API Key ACLs:
|
|
1422
|
+
# - settings
|
|
1423
|
+
# @param provider_id [String] The providerId. (required)
|
|
1424
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
1425
|
+
# @return [Http::Response] the response
|
|
1426
|
+
def get_provider_with_http_info(provider_id, request_options = {})
|
|
1427
|
+
# verify the required parameter 'provider_id' is set
|
|
1428
|
+
if @api_client.config.client_side_validation && provider_id.nil?
|
|
1429
|
+
raise ArgumentError, "Parameter `provider_id` is required when calling `get_provider`."
|
|
1430
|
+
end
|
|
1431
|
+
# verify the required parameter 'provider_id' is not empty
|
|
1432
|
+
if @api_client.config.client_side_validation && provider_id.empty?
|
|
1433
|
+
raise ArgumentError, "Parameter `provider_id` is required when calling `get_provider`."
|
|
1434
|
+
end
|
|
1435
|
+
|
|
1436
|
+
path = "/agent-studio/1/providers/{providerId}".sub(
|
|
1437
|
+
"{" + "providerId" + "}",
|
|
1438
|
+
Transport.encode_uri(provider_id.to_s)
|
|
1439
|
+
)
|
|
1440
|
+
query_params = {}
|
|
1441
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
1442
|
+
header_params = {}
|
|
1443
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
1444
|
+
|
|
1445
|
+
post_body = request_options[:debug_body]
|
|
1446
|
+
|
|
1447
|
+
new_options = request_options.merge(
|
|
1448
|
+
:operation => :"AgentStudioClient.get_provider",
|
|
1449
|
+
:header_params => header_params,
|
|
1450
|
+
:query_params => query_params,
|
|
1451
|
+
:body => post_body,
|
|
1452
|
+
:use_read_transporter => false
|
|
1453
|
+
)
|
|
1454
|
+
|
|
1455
|
+
@api_client.call_api(:GET, path, new_options)
|
|
1456
|
+
end
|
|
1457
|
+
|
|
1458
|
+
# Get Provider.
|
|
1459
|
+
#
|
|
1460
|
+
# Required API Key ACLs:
|
|
1461
|
+
# - settings
|
|
1462
|
+
# @param provider_id [String] The providerId. (required)
|
|
1463
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
1464
|
+
# @return [ProviderAuthenticationResponse]
|
|
1465
|
+
def get_provider(provider_id, request_options = {})
|
|
1466
|
+
response = get_provider_with_http_info(provider_id, request_options)
|
|
1467
|
+
@api_client.deserialize(
|
|
1468
|
+
response.body,
|
|
1469
|
+
request_options[:debug_return_type] || "AgentStudio::ProviderAuthenticationResponse"
|
|
1470
|
+
)
|
|
1471
|
+
end
|
|
1472
|
+
|
|
1473
|
+
# Get Secret Key.
|
|
1474
|
+
#
|
|
1475
|
+
# Required API Key ACLs:
|
|
1476
|
+
# - settings
|
|
1477
|
+
# @param secret_key_id [String] The secretKeyId. (required)
|
|
1478
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
1479
|
+
# @return [Http::Response] the response
|
|
1480
|
+
def get_secret_key_with_http_info(secret_key_id, request_options = {})
|
|
1481
|
+
# verify the required parameter 'secret_key_id' is set
|
|
1482
|
+
if @api_client.config.client_side_validation && secret_key_id.nil?
|
|
1483
|
+
raise ArgumentError, "Parameter `secret_key_id` is required when calling `get_secret_key`."
|
|
1484
|
+
end
|
|
1485
|
+
# verify the required parameter 'secret_key_id' is not empty
|
|
1486
|
+
if @api_client.config.client_side_validation && secret_key_id.empty?
|
|
1487
|
+
raise ArgumentError, "Parameter `secret_key_id` is required when calling `get_secret_key`."
|
|
1488
|
+
end
|
|
1489
|
+
|
|
1490
|
+
path = "/agent-studio/1/secret-keys/{secretKeyId}".sub(
|
|
1491
|
+
"{" + "secretKeyId" + "}",
|
|
1492
|
+
Transport.encode_uri(secret_key_id.to_s)
|
|
1493
|
+
)
|
|
1494
|
+
query_params = {}
|
|
1495
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
1496
|
+
header_params = {}
|
|
1497
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
1498
|
+
|
|
1499
|
+
post_body = request_options[:debug_body]
|
|
1500
|
+
|
|
1501
|
+
new_options = request_options.merge(
|
|
1502
|
+
:operation => :"AgentStudioClient.get_secret_key",
|
|
1503
|
+
:header_params => header_params,
|
|
1504
|
+
:query_params => query_params,
|
|
1505
|
+
:body => post_body,
|
|
1506
|
+
:use_read_transporter => false
|
|
1507
|
+
)
|
|
1508
|
+
|
|
1509
|
+
@api_client.call_api(:GET, path, new_options)
|
|
1510
|
+
end
|
|
1511
|
+
|
|
1512
|
+
# Get Secret Key.
|
|
1513
|
+
#
|
|
1514
|
+
# Required API Key ACLs:
|
|
1515
|
+
# - settings
|
|
1516
|
+
# @param secret_key_id [String] The secretKeyId. (required)
|
|
1517
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
1518
|
+
# @return [SecretKeyResponse]
|
|
1519
|
+
def get_secret_key(secret_key_id, request_options = {})
|
|
1520
|
+
response = get_secret_key_with_http_info(secret_key_id, request_options)
|
|
1521
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || "AgentStudio::SecretKeyResponse")
|
|
1522
|
+
end
|
|
1523
|
+
|
|
1524
|
+
# Retrieves all memories, conversations and their messages for the given user token.
|
|
1525
|
+
#
|
|
1526
|
+
# Required API Key ACLs:
|
|
1527
|
+
# - logs
|
|
1528
|
+
# @param user_token [String] The userToken. (required)
|
|
1529
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
1530
|
+
# @return [Http::Response] the response
|
|
1531
|
+
def get_user_data_with_http_info(user_token, request_options = {})
|
|
1532
|
+
# verify the required parameter 'user_token' is set
|
|
1533
|
+
if @api_client.config.client_side_validation && user_token.nil?
|
|
1534
|
+
raise ArgumentError, "Parameter `user_token` is required when calling `get_user_data`."
|
|
1535
|
+
end
|
|
1536
|
+
# verify the required parameter 'user_token' is not empty
|
|
1537
|
+
if @api_client.config.client_side_validation && user_token.empty?
|
|
1538
|
+
raise ArgumentError, "Parameter `user_token` is required when calling `get_user_data`."
|
|
1539
|
+
end
|
|
1540
|
+
|
|
1541
|
+
path = "/agent-studio/1/user-data/{userToken}".sub("{" + "userToken" + "}", Transport.encode_uri(user_token.to_s))
|
|
1542
|
+
query_params = {}
|
|
1543
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
1544
|
+
header_params = {}
|
|
1545
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
1546
|
+
|
|
1547
|
+
post_body = request_options[:debug_body]
|
|
1548
|
+
|
|
1549
|
+
new_options = request_options.merge(
|
|
1550
|
+
:operation => :"AgentStudioClient.get_user_data",
|
|
1551
|
+
:header_params => header_params,
|
|
1552
|
+
:query_params => query_params,
|
|
1553
|
+
:body => post_body,
|
|
1554
|
+
:use_read_transporter => false
|
|
1555
|
+
)
|
|
1556
|
+
|
|
1557
|
+
@api_client.call_api(:GET, path, new_options)
|
|
1558
|
+
end
|
|
1559
|
+
|
|
1560
|
+
# Retrieves all memories, conversations and their messages for the given user token.
|
|
1561
|
+
#
|
|
1562
|
+
# Required API Key ACLs:
|
|
1563
|
+
# - logs
|
|
1564
|
+
# @param user_token [String] The userToken. (required)
|
|
1565
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
1566
|
+
# @return [UserDataResponse]
|
|
1567
|
+
def get_user_data(user_token, request_options = {})
|
|
1568
|
+
response = get_user_data_with_http_info(user_token, request_options)
|
|
1569
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || "AgentStudio::UserDataResponse")
|
|
1570
|
+
end
|
|
1571
|
+
|
|
1572
|
+
# Invalidate cached completions for this agent. Filter with `before` (exclusive).
|
|
1573
|
+
#
|
|
1574
|
+
# Required API Key ACLs:
|
|
1575
|
+
# - editSettings
|
|
1576
|
+
# @param agent_id [String] The agentId. (required)
|
|
1577
|
+
# @param before [String] Delete entries strictly before this date (exclusive, YYYY-MM-DD).
|
|
1578
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
1579
|
+
# @return [Http::Response] the response
|
|
1580
|
+
def invalidate_agent_cache_with_http_info(agent_id, before = nil, request_options = {})
|
|
1581
|
+
# verify the required parameter 'agent_id' is set
|
|
1582
|
+
if @api_client.config.client_side_validation && agent_id.nil?
|
|
1583
|
+
raise ArgumentError, "Parameter `agent_id` is required when calling `invalidate_agent_cache`."
|
|
1584
|
+
end
|
|
1585
|
+
# verify the required parameter 'agent_id' is not empty
|
|
1586
|
+
if @api_client.config.client_side_validation && agent_id.empty?
|
|
1587
|
+
raise ArgumentError, "Parameter `agent_id` is required when calling `invalidate_agent_cache`."
|
|
1588
|
+
end
|
|
1589
|
+
|
|
1590
|
+
path = "/agent-studio/1/agents/{agentId}/cache".sub("{" + "agentId" + "}", Transport.encode_uri(agent_id.to_s))
|
|
1591
|
+
query_params = {}
|
|
1592
|
+
query_params[:before] = before unless before.nil?
|
|
1593
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
1594
|
+
header_params = {}
|
|
1595
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
1596
|
+
|
|
1597
|
+
post_body = request_options[:debug_body]
|
|
1598
|
+
|
|
1599
|
+
new_options = request_options.merge(
|
|
1600
|
+
:operation => :"AgentStudioClient.invalidate_agent_cache",
|
|
1601
|
+
:header_params => header_params,
|
|
1602
|
+
:query_params => query_params,
|
|
1603
|
+
:body => post_body,
|
|
1604
|
+
:use_read_transporter => false
|
|
1605
|
+
)
|
|
1606
|
+
|
|
1607
|
+
@api_client.call_api(:DELETE, path, new_options)
|
|
1608
|
+
end
|
|
1609
|
+
|
|
1610
|
+
# Invalidate cached completions for this agent. Filter with `before` (exclusive).
|
|
1611
|
+
#
|
|
1612
|
+
# Required API Key ACLs:
|
|
1613
|
+
# - editSettings
|
|
1614
|
+
# @param agent_id [String] The agentId. (required)
|
|
1615
|
+
# @param before [String] Delete entries strictly before this date (exclusive, YYYY-MM-DD).
|
|
1616
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
1617
|
+
# @return [nil]
|
|
1618
|
+
def invalidate_agent_cache(agent_id, before = nil, request_options = {})
|
|
1619
|
+
invalidate_agent_cache_with_http_info(agent_id, before, request_options)
|
|
1620
|
+
nil
|
|
1621
|
+
end
|
|
1622
|
+
|
|
1623
|
+
# List all allowed domain patterns for this agent.
|
|
1624
|
+
#
|
|
1625
|
+
# Required API Key ACLs:
|
|
1626
|
+
# - settings
|
|
1627
|
+
# @param agent_id [String] The agentId. (required)
|
|
1628
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
1629
|
+
# @return [Http::Response] the response
|
|
1630
|
+
def list_agent_allowed_domains_with_http_info(agent_id, request_options = {})
|
|
1631
|
+
# verify the required parameter 'agent_id' is set
|
|
1632
|
+
if @api_client.config.client_side_validation && agent_id.nil?
|
|
1633
|
+
raise ArgumentError, "Parameter `agent_id` is required when calling `list_agent_allowed_domains`."
|
|
1634
|
+
end
|
|
1635
|
+
# verify the required parameter 'agent_id' is not empty
|
|
1636
|
+
if @api_client.config.client_side_validation && agent_id.empty?
|
|
1637
|
+
raise ArgumentError, "Parameter `agent_id` is required when calling `list_agent_allowed_domains`."
|
|
1638
|
+
end
|
|
1639
|
+
|
|
1640
|
+
path = "/agent-studio/1/agents/{agentId}/allowed-domains".sub(
|
|
1641
|
+
"{" + "agentId" + "}",
|
|
1642
|
+
Transport.encode_uri(agent_id.to_s)
|
|
1643
|
+
)
|
|
1644
|
+
query_params = {}
|
|
1645
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
1646
|
+
header_params = {}
|
|
1647
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
1648
|
+
|
|
1649
|
+
post_body = request_options[:debug_body]
|
|
1650
|
+
|
|
1651
|
+
new_options = request_options.merge(
|
|
1652
|
+
:operation => :"AgentStudioClient.list_agent_allowed_domains",
|
|
1653
|
+
:header_params => header_params,
|
|
1654
|
+
:query_params => query_params,
|
|
1655
|
+
:body => post_body,
|
|
1656
|
+
:use_read_transporter => false
|
|
1657
|
+
)
|
|
1658
|
+
|
|
1659
|
+
@api_client.call_api(:GET, path, new_options)
|
|
1660
|
+
end
|
|
1661
|
+
|
|
1662
|
+
# List all allowed domain patterns for this agent.
|
|
1663
|
+
#
|
|
1664
|
+
# Required API Key ACLs:
|
|
1665
|
+
# - settings
|
|
1666
|
+
# @param agent_id [String] The agentId. (required)
|
|
1667
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
1668
|
+
# @return [AllowedDomainListResponse]
|
|
1669
|
+
def list_agent_allowed_domains(agent_id, request_options = {})
|
|
1670
|
+
response = list_agent_allowed_domains_with_http_info(agent_id, request_options)
|
|
1671
|
+
@api_client.deserialize(
|
|
1672
|
+
response.body,
|
|
1673
|
+
request_options[:debug_return_type] || "AgentStudio::AllowedDomainListResponse"
|
|
1674
|
+
)
|
|
1675
|
+
end
|
|
1676
|
+
|
|
1677
|
+
# Retrieves the conversations for the given agent ID.
|
|
1678
|
+
#
|
|
1679
|
+
# Required API Key ACLs:
|
|
1680
|
+
# - logs
|
|
1681
|
+
# @param agent_id [String] The agentId. (required)
|
|
1682
|
+
# @param start_date [String] Filter conversations created after this date (format: YYYY-MM-DD).
|
|
1683
|
+
# @param end_date [String] Filter conversations created before this date (format: YYYY-MM-DD).
|
|
1684
|
+
# @param include_feedback [Boolean] Include feedback per conversation.
|
|
1685
|
+
# @param feedback_vote [Integer] Filter by feedback value (requires includeFeedback=true).
|
|
1686
|
+
# @param page [Integer] Page number. (default to 1)
|
|
1687
|
+
# @param limit [Integer] Items per page. (default to 20)
|
|
1688
|
+
# @param x_algolia_secure_user_token [String] The X-Algolia-Secure-User-Token.
|
|
1689
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
1690
|
+
# @return [Http::Response] the response
|
|
1691
|
+
def list_agent_conversations_with_http_info(
|
|
1692
|
+
agent_id,
|
|
1693
|
+
start_date = nil,
|
|
1694
|
+
end_date = nil,
|
|
1695
|
+
include_feedback = nil,
|
|
1696
|
+
feedback_vote = nil,
|
|
1697
|
+
page = nil,
|
|
1698
|
+
limit = nil,
|
|
1699
|
+
x_algolia_secure_user_token = nil,
|
|
1700
|
+
request_options = {}
|
|
1701
|
+
)
|
|
1702
|
+
# verify the required parameter 'agent_id' is set
|
|
1703
|
+
if @api_client.config.client_side_validation && agent_id.nil?
|
|
1704
|
+
raise ArgumentError, "Parameter `agent_id` is required when calling `list_agent_conversations`."
|
|
1705
|
+
end
|
|
1706
|
+
# verify the required parameter 'agent_id' is not empty
|
|
1707
|
+
if @api_client.config.client_side_validation && agent_id.empty?
|
|
1708
|
+
raise ArgumentError, "Parameter `agent_id` is required when calling `list_agent_conversations`."
|
|
1709
|
+
end
|
|
1710
|
+
|
|
1711
|
+
path = "/agent-studio/1/agents/{agentId}/conversations".sub(
|
|
1712
|
+
"{" + "agentId" + "}",
|
|
1713
|
+
Transport.encode_uri(agent_id.to_s)
|
|
1714
|
+
)
|
|
1715
|
+
query_params = {}
|
|
1716
|
+
query_params[:startDate] = start_date unless start_date.nil?
|
|
1717
|
+
query_params[:endDate] = end_date unless end_date.nil?
|
|
1718
|
+
query_params[:includeFeedback] = include_feedback unless include_feedback.nil?
|
|
1719
|
+
query_params[:feedbackVote] = feedback_vote unless feedback_vote.nil?
|
|
1720
|
+
query_params[:page] = page unless page.nil?
|
|
1721
|
+
query_params[:limit] = limit unless limit.nil?
|
|
1722
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
1723
|
+
header_params = {}
|
|
1724
|
+
unless x_algolia_secure_user_token.nil?
|
|
1725
|
+
header_params[:"X-Algolia-Secure-User-Token"] = x_algolia_secure_user_token
|
|
1726
|
+
end
|
|
1727
|
+
|
|
1728
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
1729
|
+
|
|
1730
|
+
post_body = request_options[:debug_body]
|
|
1731
|
+
|
|
1732
|
+
new_options = request_options.merge(
|
|
1733
|
+
:operation => :"AgentStudioClient.list_agent_conversations",
|
|
1734
|
+
:header_params => header_params,
|
|
1735
|
+
:query_params => query_params,
|
|
1736
|
+
:body => post_body,
|
|
1737
|
+
:use_read_transporter => false
|
|
1738
|
+
)
|
|
1739
|
+
|
|
1740
|
+
@api_client.call_api(:GET, path, new_options)
|
|
1741
|
+
end
|
|
1742
|
+
|
|
1743
|
+
# Retrieves the conversations for the given agent ID.
|
|
1744
|
+
#
|
|
1745
|
+
# Required API Key ACLs:
|
|
1746
|
+
# - logs
|
|
1747
|
+
# @param agent_id [String] The agentId. (required)
|
|
1748
|
+
# @param start_date [String] Filter conversations created after this date (format: YYYY-MM-DD).
|
|
1749
|
+
# @param end_date [String] Filter conversations created before this date (format: YYYY-MM-DD).
|
|
1750
|
+
# @param include_feedback [Boolean] Include feedback per conversation.
|
|
1751
|
+
# @param feedback_vote [Integer] Filter by feedback value (requires includeFeedback=true).
|
|
1752
|
+
# @param page [Integer] Page number. (default to 1)
|
|
1753
|
+
# @param limit [Integer] Items per page. (default to 20)
|
|
1754
|
+
# @param x_algolia_secure_user_token [String] The X-Algolia-Secure-User-Token.
|
|
1755
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
1756
|
+
# @return [PaginatedConversationsResponse]
|
|
1757
|
+
def list_agent_conversations(
|
|
1758
|
+
agent_id,
|
|
1759
|
+
start_date = nil,
|
|
1760
|
+
end_date = nil,
|
|
1761
|
+
include_feedback = nil,
|
|
1762
|
+
feedback_vote = nil,
|
|
1763
|
+
page = nil,
|
|
1764
|
+
limit = nil,
|
|
1765
|
+
x_algolia_secure_user_token = nil,
|
|
1766
|
+
request_options = {}
|
|
1767
|
+
)
|
|
1768
|
+
response = list_agent_conversations_with_http_info(
|
|
1769
|
+
agent_id,
|
|
1770
|
+
start_date,
|
|
1771
|
+
end_date,
|
|
1772
|
+
include_feedback,
|
|
1773
|
+
feedback_vote,
|
|
1774
|
+
page,
|
|
1775
|
+
limit,
|
|
1776
|
+
x_algolia_secure_user_token,
|
|
1777
|
+
request_options
|
|
1778
|
+
)
|
|
1779
|
+
@api_client.deserialize(
|
|
1780
|
+
response.body,
|
|
1781
|
+
request_options[:debug_return_type] || "AgentStudio::PaginatedConversationsResponse"
|
|
1782
|
+
)
|
|
1783
|
+
end
|
|
1784
|
+
|
|
1785
|
+
# List all agents with pagination and filtering.
|
|
1786
|
+
#
|
|
1787
|
+
# Required API Key ACLs:
|
|
1788
|
+
# - settings
|
|
1789
|
+
# @param page [Integer] Page number. (default to 1)
|
|
1790
|
+
# @param limit [Integer] Items per page. (default to 10)
|
|
1791
|
+
# @param provider_id [String] Filter by provider id.
|
|
1792
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
1793
|
+
# @return [Http::Response] the response
|
|
1794
|
+
def list_agents_with_http_info(page = nil, limit = nil, provider_id = nil, request_options = {})
|
|
1795
|
+
path = "/agent-studio/1/agents"
|
|
1796
|
+
query_params = {}
|
|
1797
|
+
query_params[:page] = page unless page.nil?
|
|
1798
|
+
query_params[:limit] = limit unless limit.nil?
|
|
1799
|
+
query_params[:providerId] = provider_id unless provider_id.nil?
|
|
1800
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
1801
|
+
header_params = {}
|
|
1802
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
1803
|
+
|
|
1804
|
+
post_body = request_options[:debug_body]
|
|
1805
|
+
|
|
1806
|
+
new_options = request_options.merge(
|
|
1807
|
+
:operation => :"AgentStudioClient.list_agents",
|
|
1808
|
+
:header_params => header_params,
|
|
1809
|
+
:query_params => query_params,
|
|
1810
|
+
:body => post_body,
|
|
1811
|
+
:use_read_transporter => false
|
|
1812
|
+
)
|
|
1813
|
+
|
|
1814
|
+
@api_client.call_api(:GET, path, new_options)
|
|
1815
|
+
end
|
|
1816
|
+
|
|
1817
|
+
# List all agents with pagination and filtering.
|
|
1818
|
+
#
|
|
1819
|
+
# Required API Key ACLs:
|
|
1820
|
+
# - settings
|
|
1821
|
+
# @param page [Integer] Page number. (default to 1)
|
|
1822
|
+
# @param limit [Integer] Items per page. (default to 10)
|
|
1823
|
+
# @param provider_id [String] Filter by provider id.
|
|
1824
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
1825
|
+
# @return [PaginatedAgentsResponse]
|
|
1826
|
+
def list_agents(page = nil, limit = nil, provider_id = nil, request_options = {})
|
|
1827
|
+
response = list_agents_with_http_info(page, limit, provider_id, request_options)
|
|
1828
|
+
@api_client.deserialize(
|
|
1829
|
+
response.body,
|
|
1830
|
+
request_options[:debug_return_type] || "AgentStudio::PaginatedAgentsResponse"
|
|
1831
|
+
)
|
|
1832
|
+
end
|
|
1833
|
+
|
|
1834
|
+
# Get Provider Models.
|
|
1835
|
+
#
|
|
1836
|
+
# Required API Key ACLs:
|
|
1837
|
+
# - settings
|
|
1838
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
1839
|
+
# @return [Http::Response] the response
|
|
1840
|
+
def list_models_with_http_info(request_options = {})
|
|
1841
|
+
path = "/agent-studio/1/providers/models"
|
|
1842
|
+
query_params = {}
|
|
1843
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
1844
|
+
header_params = {}
|
|
1845
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
1846
|
+
|
|
1847
|
+
post_body = request_options[:debug_body]
|
|
1848
|
+
|
|
1849
|
+
new_options = request_options.merge(
|
|
1850
|
+
:operation => :"AgentStudioClient.list_models",
|
|
1851
|
+
:header_params => header_params,
|
|
1852
|
+
:query_params => query_params,
|
|
1853
|
+
:body => post_body,
|
|
1854
|
+
:use_read_transporter => false
|
|
1855
|
+
)
|
|
1856
|
+
|
|
1857
|
+
@api_client.call_api(:GET, path, new_options)
|
|
1858
|
+
end
|
|
1859
|
+
|
|
1860
|
+
# Get Provider Models.
|
|
1861
|
+
#
|
|
1862
|
+
# Required API Key ACLs:
|
|
1863
|
+
# - settings
|
|
1864
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
1865
|
+
# @return [Hash<String, Array<String>>]
|
|
1866
|
+
def list_models(request_options = {})
|
|
1867
|
+
response = list_models_with_http_info(request_options)
|
|
1868
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || "Hash<String, Array<String>>")
|
|
1869
|
+
end
|
|
1870
|
+
|
|
1871
|
+
# Get available models for a specific provider.
|
|
1872
|
+
#
|
|
1873
|
+
# Required API Key ACLs:
|
|
1874
|
+
# - settings
|
|
1875
|
+
# @param provider_id [String] The providerId. (required)
|
|
1876
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
1877
|
+
# @return [Http::Response] the response
|
|
1878
|
+
def list_provider_models_with_http_info(provider_id, request_options = {})
|
|
1879
|
+
# verify the required parameter 'provider_id' is set
|
|
1880
|
+
if @api_client.config.client_side_validation && provider_id.nil?
|
|
1881
|
+
raise ArgumentError, "Parameter `provider_id` is required when calling `list_provider_models`."
|
|
1882
|
+
end
|
|
1883
|
+
# verify the required parameter 'provider_id' is not empty
|
|
1884
|
+
if @api_client.config.client_side_validation && provider_id.empty?
|
|
1885
|
+
raise ArgumentError, "Parameter `provider_id` is required when calling `list_provider_models`."
|
|
1886
|
+
end
|
|
1887
|
+
|
|
1888
|
+
path = "/agent-studio/1/providers/{providerId}/models".sub(
|
|
1889
|
+
"{" + "providerId" + "}",
|
|
1890
|
+
Transport.encode_uri(provider_id.to_s)
|
|
1891
|
+
)
|
|
1892
|
+
query_params = {}
|
|
1893
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
1894
|
+
header_params = {}
|
|
1895
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
1896
|
+
|
|
1897
|
+
post_body = request_options[:debug_body]
|
|
1898
|
+
|
|
1899
|
+
new_options = request_options.merge(
|
|
1900
|
+
:operation => :"AgentStudioClient.list_provider_models",
|
|
1901
|
+
:header_params => header_params,
|
|
1902
|
+
:query_params => query_params,
|
|
1903
|
+
:body => post_body,
|
|
1904
|
+
:use_read_transporter => false
|
|
1905
|
+
)
|
|
1906
|
+
|
|
1907
|
+
@api_client.call_api(:GET, path, new_options)
|
|
1908
|
+
end
|
|
1909
|
+
|
|
1910
|
+
# Get available models for a specific provider.
|
|
1911
|
+
#
|
|
1912
|
+
# Required API Key ACLs:
|
|
1913
|
+
# - settings
|
|
1914
|
+
# @param provider_id [String] The providerId. (required)
|
|
1915
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
1916
|
+
# @return [Array<String>]
|
|
1917
|
+
def list_provider_models(provider_id, request_options = {})
|
|
1918
|
+
response = list_provider_models_with_http_info(provider_id, request_options)
|
|
1919
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || "Array<AgentStudio::>")
|
|
1920
|
+
end
|
|
1921
|
+
|
|
1922
|
+
# List Providers.
|
|
1923
|
+
#
|
|
1924
|
+
# Required API Key ACLs:
|
|
1925
|
+
# - settings
|
|
1926
|
+
# @param page [Integer] Page number. (default to 1)
|
|
1927
|
+
# @param limit [Integer] Items per page. (default to 10)
|
|
1928
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
1929
|
+
# @return [Http::Response] the response
|
|
1930
|
+
def list_providers_with_http_info(page = nil, limit = nil, request_options = {})
|
|
1931
|
+
path = "/agent-studio/1/providers"
|
|
1932
|
+
query_params = {}
|
|
1933
|
+
query_params[:page] = page unless page.nil?
|
|
1934
|
+
query_params[:limit] = limit unless limit.nil?
|
|
1935
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
1936
|
+
header_params = {}
|
|
1937
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
1938
|
+
|
|
1939
|
+
post_body = request_options[:debug_body]
|
|
1940
|
+
|
|
1941
|
+
new_options = request_options.merge(
|
|
1942
|
+
:operation => :"AgentStudioClient.list_providers",
|
|
1943
|
+
:header_params => header_params,
|
|
1944
|
+
:query_params => query_params,
|
|
1945
|
+
:body => post_body,
|
|
1946
|
+
:use_read_transporter => false
|
|
1947
|
+
)
|
|
1948
|
+
|
|
1949
|
+
@api_client.call_api(:GET, path, new_options)
|
|
1950
|
+
end
|
|
1951
|
+
|
|
1952
|
+
# List Providers.
|
|
1953
|
+
#
|
|
1954
|
+
# Required API Key ACLs:
|
|
1955
|
+
# - settings
|
|
1956
|
+
# @param page [Integer] Page number. (default to 1)
|
|
1957
|
+
# @param limit [Integer] Items per page. (default to 10)
|
|
1958
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
1959
|
+
# @return [PaginatedProviderAuthenticationsResponse]
|
|
1960
|
+
def list_providers(page = nil, limit = nil, request_options = {})
|
|
1961
|
+
response = list_providers_with_http_info(page, limit, request_options)
|
|
1962
|
+
@api_client.deserialize(
|
|
1963
|
+
response.body,
|
|
1964
|
+
request_options[:debug_return_type] || "AgentStudio::PaginatedProviderAuthenticationsResponse"
|
|
1965
|
+
)
|
|
1966
|
+
end
|
|
1967
|
+
|
|
1968
|
+
# List Secret Keys.
|
|
1969
|
+
#
|
|
1970
|
+
# Required API Key ACLs:
|
|
1971
|
+
# - settings
|
|
1972
|
+
# @param page [Integer] Page number. (default to 1)
|
|
1973
|
+
# @param limit [Integer] Items per page. (default to 10)
|
|
1974
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
1975
|
+
# @return [Http::Response] the response
|
|
1976
|
+
def list_secret_keys_with_http_info(page = nil, limit = nil, request_options = {})
|
|
1977
|
+
path = "/agent-studio/1/secret-keys"
|
|
1978
|
+
query_params = {}
|
|
1979
|
+
query_params[:page] = page unless page.nil?
|
|
1980
|
+
query_params[:limit] = limit unless limit.nil?
|
|
1981
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
1982
|
+
header_params = {}
|
|
1983
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
1984
|
+
|
|
1985
|
+
post_body = request_options[:debug_body]
|
|
1986
|
+
|
|
1987
|
+
new_options = request_options.merge(
|
|
1988
|
+
:operation => :"AgentStudioClient.list_secret_keys",
|
|
1989
|
+
:header_params => header_params,
|
|
1990
|
+
:query_params => query_params,
|
|
1991
|
+
:body => post_body,
|
|
1992
|
+
:use_read_transporter => false
|
|
1993
|
+
)
|
|
1994
|
+
|
|
1995
|
+
@api_client.call_api(:GET, path, new_options)
|
|
1996
|
+
end
|
|
1997
|
+
|
|
1998
|
+
# List Secret Keys.
|
|
1999
|
+
#
|
|
2000
|
+
# Required API Key ACLs:
|
|
2001
|
+
# - settings
|
|
2002
|
+
# @param page [Integer] Page number. (default to 1)
|
|
2003
|
+
# @param limit [Integer] Items per page. (default to 10)
|
|
2004
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
2005
|
+
# @return [PaginatedSecretKeysResponse]
|
|
2006
|
+
def list_secret_keys(page = nil, limit = nil, request_options = {})
|
|
2007
|
+
response = list_secret_keys_with_http_info(page, limit, request_options)
|
|
2008
|
+
@api_client.deserialize(
|
|
2009
|
+
response.body,
|
|
2010
|
+
request_options[:debug_return_type] || "AgentStudio::PaginatedSecretKeysResponse"
|
|
2011
|
+
)
|
|
2012
|
+
end
|
|
2013
|
+
|
|
2014
|
+
# Publish the specified agent.
|
|
2015
|
+
#
|
|
2016
|
+
# Required API Key ACLs:
|
|
2017
|
+
# - editSettings
|
|
2018
|
+
# @param agent_id [String] The agentId. (required)
|
|
2019
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
2020
|
+
# @return [Http::Response] the response
|
|
2021
|
+
def publish_agent_with_http_info(agent_id, request_options = {})
|
|
2022
|
+
# verify the required parameter 'agent_id' is set
|
|
2023
|
+
if @api_client.config.client_side_validation && agent_id.nil?
|
|
2024
|
+
raise ArgumentError, "Parameter `agent_id` is required when calling `publish_agent`."
|
|
2025
|
+
end
|
|
2026
|
+
# verify the required parameter 'agent_id' is not empty
|
|
2027
|
+
if @api_client.config.client_side_validation && agent_id.empty?
|
|
2028
|
+
raise ArgumentError, "Parameter `agent_id` is required when calling `publish_agent`."
|
|
2029
|
+
end
|
|
2030
|
+
|
|
2031
|
+
path = "/agent-studio/1/agents/{agentId}/publish".sub("{" + "agentId" + "}", Transport.encode_uri(agent_id.to_s))
|
|
2032
|
+
query_params = {}
|
|
2033
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
2034
|
+
header_params = {}
|
|
2035
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
2036
|
+
|
|
2037
|
+
post_body = request_options[:debug_body]
|
|
2038
|
+
|
|
2039
|
+
new_options = request_options.merge(
|
|
2040
|
+
:operation => :"AgentStudioClient.publish_agent",
|
|
2041
|
+
:header_params => header_params,
|
|
2042
|
+
:query_params => query_params,
|
|
2043
|
+
:body => post_body,
|
|
2044
|
+
:use_read_transporter => false
|
|
2045
|
+
)
|
|
2046
|
+
|
|
2047
|
+
@api_client.call_api(:POST, path, new_options)
|
|
2048
|
+
end
|
|
2049
|
+
|
|
2050
|
+
# Publish the specified agent.
|
|
2051
|
+
#
|
|
2052
|
+
# Required API Key ACLs:
|
|
2053
|
+
# - editSettings
|
|
2054
|
+
# @param agent_id [String] The agentId. (required)
|
|
2055
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
2056
|
+
# @return [AgentWithVersionResponse]
|
|
2057
|
+
def publish_agent(agent_id, request_options = {})
|
|
2058
|
+
response = publish_agent_with_http_info(agent_id, request_options)
|
|
2059
|
+
@api_client.deserialize(
|
|
2060
|
+
response.body,
|
|
2061
|
+
request_options[:debug_return_type] || "AgentStudio::AgentWithVersionResponse"
|
|
2062
|
+
)
|
|
2063
|
+
end
|
|
2064
|
+
|
|
2065
|
+
# Unpublish the specified agent.
|
|
2066
|
+
#
|
|
2067
|
+
# Required API Key ACLs:
|
|
2068
|
+
# - editSettings
|
|
2069
|
+
# @param agent_id [String] The agentId. (required)
|
|
2070
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
2071
|
+
# @return [Http::Response] the response
|
|
2072
|
+
def unpublish_agent_with_http_info(agent_id, request_options = {})
|
|
2073
|
+
# verify the required parameter 'agent_id' is set
|
|
2074
|
+
if @api_client.config.client_side_validation && agent_id.nil?
|
|
2075
|
+
raise ArgumentError, "Parameter `agent_id` is required when calling `unpublish_agent`."
|
|
2076
|
+
end
|
|
2077
|
+
# verify the required parameter 'agent_id' is not empty
|
|
2078
|
+
if @api_client.config.client_side_validation && agent_id.empty?
|
|
2079
|
+
raise ArgumentError, "Parameter `agent_id` is required when calling `unpublish_agent`."
|
|
2080
|
+
end
|
|
2081
|
+
|
|
2082
|
+
path = "/agent-studio/1/agents/{agentId}/unpublish".sub(
|
|
2083
|
+
"{" + "agentId" + "}",
|
|
2084
|
+
Transport.encode_uri(agent_id.to_s)
|
|
2085
|
+
)
|
|
2086
|
+
query_params = {}
|
|
2087
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
2088
|
+
header_params = {}
|
|
2089
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
2090
|
+
|
|
2091
|
+
post_body = request_options[:debug_body]
|
|
2092
|
+
|
|
2093
|
+
new_options = request_options.merge(
|
|
2094
|
+
:operation => :"AgentStudioClient.unpublish_agent",
|
|
2095
|
+
:header_params => header_params,
|
|
2096
|
+
:query_params => query_params,
|
|
2097
|
+
:body => post_body,
|
|
2098
|
+
:use_read_transporter => false
|
|
2099
|
+
)
|
|
2100
|
+
|
|
2101
|
+
@api_client.call_api(:POST, path, new_options)
|
|
2102
|
+
end
|
|
2103
|
+
|
|
2104
|
+
# Unpublish the specified agent.
|
|
2105
|
+
#
|
|
2106
|
+
# Required API Key ACLs:
|
|
2107
|
+
# - editSettings
|
|
2108
|
+
# @param agent_id [String] The agentId. (required)
|
|
2109
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
2110
|
+
# @return [AgentWithVersionResponse]
|
|
2111
|
+
def unpublish_agent(agent_id, request_options = {})
|
|
2112
|
+
response = unpublish_agent_with_http_info(agent_id, request_options)
|
|
2113
|
+
@api_client.deserialize(
|
|
2114
|
+
response.body,
|
|
2115
|
+
request_options[:debug_return_type] || "AgentStudio::AgentWithVersionResponse"
|
|
2116
|
+
)
|
|
2117
|
+
end
|
|
2118
|
+
|
|
2119
|
+
# Update the specified agent.
|
|
2120
|
+
#
|
|
2121
|
+
# Required API Key ACLs:
|
|
2122
|
+
# - editSettings
|
|
2123
|
+
# @param agent_id [String] The agentId. (required)
|
|
2124
|
+
# @param agent_config_update [AgentConfigUpdate] (required)
|
|
2125
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
2126
|
+
# @return [Http::Response] the response
|
|
2127
|
+
def update_agent_with_http_info(agent_id, agent_config_update, request_options = {})
|
|
2128
|
+
# verify the required parameter 'agent_id' is set
|
|
2129
|
+
if @api_client.config.client_side_validation && agent_id.nil?
|
|
2130
|
+
raise ArgumentError, "Parameter `agent_id` is required when calling `update_agent`."
|
|
2131
|
+
end
|
|
2132
|
+
# verify the required parameter 'agent_id' is not empty
|
|
2133
|
+
if @api_client.config.client_side_validation && agent_id.empty?
|
|
2134
|
+
raise ArgumentError, "Parameter `agent_id` is required when calling `update_agent`."
|
|
2135
|
+
end
|
|
2136
|
+
# verify the required parameter 'agent_config_update' is set
|
|
2137
|
+
if @api_client.config.client_side_validation && agent_config_update.nil?
|
|
2138
|
+
raise ArgumentError, "Parameter `agent_config_update` is required when calling `update_agent`."
|
|
2139
|
+
end
|
|
2140
|
+
|
|
2141
|
+
path = "/agent-studio/1/agents/{agentId}".sub("{" + "agentId" + "}", Transport.encode_uri(agent_id.to_s))
|
|
2142
|
+
query_params = {}
|
|
2143
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
2144
|
+
header_params = {}
|
|
2145
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
2146
|
+
|
|
2147
|
+
post_body = request_options[:debug_body] || @api_client.object_to_http_body(agent_config_update)
|
|
2148
|
+
|
|
2149
|
+
new_options = request_options.merge(
|
|
2150
|
+
:operation => :"AgentStudioClient.update_agent",
|
|
2151
|
+
:header_params => header_params,
|
|
2152
|
+
:query_params => query_params,
|
|
2153
|
+
:body => post_body,
|
|
2154
|
+
:use_read_transporter => false
|
|
2155
|
+
)
|
|
2156
|
+
|
|
2157
|
+
@api_client.call_api(:PATCH, path, new_options)
|
|
2158
|
+
end
|
|
2159
|
+
|
|
2160
|
+
# Update the specified agent.
|
|
2161
|
+
#
|
|
2162
|
+
# Required API Key ACLs:
|
|
2163
|
+
# - editSettings
|
|
2164
|
+
# @param agent_id [String] The agentId. (required)
|
|
2165
|
+
# @param agent_config_update [AgentConfigUpdate] (required)
|
|
2166
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
2167
|
+
# @return [AgentWithVersionResponse]
|
|
2168
|
+
def update_agent(agent_id, agent_config_update, request_options = {})
|
|
2169
|
+
response = update_agent_with_http_info(agent_id, agent_config_update, request_options)
|
|
2170
|
+
@api_client.deserialize(
|
|
2171
|
+
response.body,
|
|
2172
|
+
request_options[:debug_return_type] || "AgentStudio::AgentWithVersionResponse"
|
|
2173
|
+
)
|
|
2174
|
+
end
|
|
2175
|
+
|
|
2176
|
+
# Patch Configuration.
|
|
2177
|
+
#
|
|
2178
|
+
# Required API Key ACLs:
|
|
2179
|
+
# - logs
|
|
2180
|
+
# @param application_config_patch [ApplicationConfigPatch] (required)
|
|
2181
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
2182
|
+
# @return [Http::Response] the response
|
|
2183
|
+
def update_configuration_with_http_info(application_config_patch, request_options = {})
|
|
2184
|
+
# verify the required parameter 'application_config_patch' is set
|
|
2185
|
+
if @api_client.config.client_side_validation && application_config_patch.nil?
|
|
2186
|
+
raise ArgumentError, "Parameter `application_config_patch` is required when calling `update_configuration`."
|
|
2187
|
+
end
|
|
2188
|
+
|
|
2189
|
+
path = "/agent-studio/1/configuration"
|
|
2190
|
+
query_params = {}
|
|
2191
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
2192
|
+
header_params = {}
|
|
2193
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
2194
|
+
|
|
2195
|
+
post_body = request_options[:debug_body] || @api_client.object_to_http_body(application_config_patch)
|
|
2196
|
+
|
|
2197
|
+
new_options = request_options.merge(
|
|
2198
|
+
:operation => :"AgentStudioClient.update_configuration",
|
|
2199
|
+
:header_params => header_params,
|
|
2200
|
+
:query_params => query_params,
|
|
2201
|
+
:body => post_body,
|
|
2202
|
+
:use_read_transporter => false
|
|
2203
|
+
)
|
|
2204
|
+
|
|
2205
|
+
@api_client.call_api(:PATCH, path, new_options)
|
|
2206
|
+
end
|
|
2207
|
+
|
|
2208
|
+
# Patch Configuration.
|
|
2209
|
+
#
|
|
2210
|
+
# Required API Key ACLs:
|
|
2211
|
+
# - logs
|
|
2212
|
+
# @param application_config_patch [ApplicationConfigPatch] (required)
|
|
2213
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
2214
|
+
# @return [ApplicationConfigResponse]
|
|
2215
|
+
def update_configuration(application_config_patch, request_options = {})
|
|
2216
|
+
response = update_configuration_with_http_info(application_config_patch, request_options)
|
|
2217
|
+
@api_client.deserialize(
|
|
2218
|
+
response.body,
|
|
2219
|
+
request_options[:debug_return_type] || "AgentStudio::ApplicationConfigResponse"
|
|
2220
|
+
)
|
|
2221
|
+
end
|
|
2222
|
+
|
|
2223
|
+
# Update Provider.
|
|
2224
|
+
#
|
|
2225
|
+
# Required API Key ACLs:
|
|
2226
|
+
# - editSettings
|
|
2227
|
+
# @param provider_id [String] The providerId. (required)
|
|
2228
|
+
# @param provider_authentication_patch [ProviderAuthenticationPatch] (required)
|
|
2229
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
2230
|
+
# @return [Http::Response] the response
|
|
2231
|
+
def update_provider_with_http_info(provider_id, provider_authentication_patch, request_options = {})
|
|
2232
|
+
# verify the required parameter 'provider_id' is set
|
|
2233
|
+
if @api_client.config.client_side_validation && provider_id.nil?
|
|
2234
|
+
raise ArgumentError, "Parameter `provider_id` is required when calling `update_provider`."
|
|
2235
|
+
end
|
|
2236
|
+
# verify the required parameter 'provider_id' is not empty
|
|
2237
|
+
if @api_client.config.client_side_validation && provider_id.empty?
|
|
2238
|
+
raise ArgumentError, "Parameter `provider_id` is required when calling `update_provider`."
|
|
2239
|
+
end
|
|
2240
|
+
# verify the required parameter 'provider_authentication_patch' is set
|
|
2241
|
+
if @api_client.config.client_side_validation && provider_authentication_patch.nil?
|
|
2242
|
+
raise ArgumentError, "Parameter `provider_authentication_patch` is required when calling `update_provider`."
|
|
2243
|
+
end
|
|
2244
|
+
|
|
2245
|
+
path = "/agent-studio/1/providers/{providerId}".sub(
|
|
2246
|
+
"{" + "providerId" + "}",
|
|
2247
|
+
Transport.encode_uri(provider_id.to_s)
|
|
2248
|
+
)
|
|
2249
|
+
query_params = {}
|
|
2250
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
2251
|
+
header_params = {}
|
|
2252
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
2253
|
+
|
|
2254
|
+
post_body = request_options[:debug_body] || @api_client.object_to_http_body(provider_authentication_patch)
|
|
2255
|
+
|
|
2256
|
+
new_options = request_options.merge(
|
|
2257
|
+
:operation => :"AgentStudioClient.update_provider",
|
|
2258
|
+
:header_params => header_params,
|
|
2259
|
+
:query_params => query_params,
|
|
2260
|
+
:body => post_body,
|
|
2261
|
+
:use_read_transporter => false
|
|
2262
|
+
)
|
|
2263
|
+
|
|
2264
|
+
@api_client.call_api(:PATCH, path, new_options)
|
|
2265
|
+
end
|
|
2266
|
+
|
|
2267
|
+
# Update Provider.
|
|
2268
|
+
#
|
|
2269
|
+
# Required API Key ACLs:
|
|
2270
|
+
# - editSettings
|
|
2271
|
+
# @param provider_id [String] The providerId. (required)
|
|
2272
|
+
# @param provider_authentication_patch [ProviderAuthenticationPatch] (required)
|
|
2273
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
2274
|
+
# @return [ProviderAuthenticationResponse]
|
|
2275
|
+
def update_provider(provider_id, provider_authentication_patch, request_options = {})
|
|
2276
|
+
response = update_provider_with_http_info(provider_id, provider_authentication_patch, request_options)
|
|
2277
|
+
@api_client.deserialize(
|
|
2278
|
+
response.body,
|
|
2279
|
+
request_options[:debug_return_type] || "AgentStudio::ProviderAuthenticationResponse"
|
|
2280
|
+
)
|
|
2281
|
+
end
|
|
2282
|
+
|
|
2283
|
+
# Patch Secret Key.
|
|
2284
|
+
#
|
|
2285
|
+
# Required API Key ACLs:
|
|
2286
|
+
# - admin
|
|
2287
|
+
# @param secret_key_id [String] The secretKeyId. (required)
|
|
2288
|
+
# @param secret_key_patch [SecretKeyPatch] (required)
|
|
2289
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
2290
|
+
# @return [Http::Response] the response
|
|
2291
|
+
def update_secret_key_with_http_info(secret_key_id, secret_key_patch, request_options = {})
|
|
2292
|
+
# verify the required parameter 'secret_key_id' is set
|
|
2293
|
+
if @api_client.config.client_side_validation && secret_key_id.nil?
|
|
2294
|
+
raise ArgumentError, "Parameter `secret_key_id` is required when calling `update_secret_key`."
|
|
2295
|
+
end
|
|
2296
|
+
# verify the required parameter 'secret_key_id' is not empty
|
|
2297
|
+
if @api_client.config.client_side_validation && secret_key_id.empty?
|
|
2298
|
+
raise ArgumentError, "Parameter `secret_key_id` is required when calling `update_secret_key`."
|
|
2299
|
+
end
|
|
2300
|
+
# verify the required parameter 'secret_key_patch' is set
|
|
2301
|
+
if @api_client.config.client_side_validation && secret_key_patch.nil?
|
|
2302
|
+
raise ArgumentError, "Parameter `secret_key_patch` is required when calling `update_secret_key`."
|
|
2303
|
+
end
|
|
2304
|
+
|
|
2305
|
+
path = "/agent-studio/1/secret-keys/{secretKeyId}".sub(
|
|
2306
|
+
"{" + "secretKeyId" + "}",
|
|
2307
|
+
Transport.encode_uri(secret_key_id.to_s)
|
|
2308
|
+
)
|
|
2309
|
+
query_params = {}
|
|
2310
|
+
query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
|
|
2311
|
+
header_params = {}
|
|
2312
|
+
header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
|
|
2313
|
+
|
|
2314
|
+
post_body = request_options[:debug_body] || @api_client.object_to_http_body(secret_key_patch)
|
|
2315
|
+
|
|
2316
|
+
new_options = request_options.merge(
|
|
2317
|
+
:operation => :"AgentStudioClient.update_secret_key",
|
|
2318
|
+
:header_params => header_params,
|
|
2319
|
+
:query_params => query_params,
|
|
2320
|
+
:body => post_body,
|
|
2321
|
+
:use_read_transporter => false
|
|
2322
|
+
)
|
|
2323
|
+
|
|
2324
|
+
@api_client.call_api(:PATCH, path, new_options)
|
|
2325
|
+
end
|
|
2326
|
+
|
|
2327
|
+
# Patch Secret Key.
|
|
2328
|
+
#
|
|
2329
|
+
# Required API Key ACLs:
|
|
2330
|
+
# - admin
|
|
2331
|
+
# @param secret_key_id [String] The secretKeyId. (required)
|
|
2332
|
+
# @param secret_key_patch [SecretKeyPatch] (required)
|
|
2333
|
+
# @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
|
|
2334
|
+
# @return [SecretKeyResponse]
|
|
2335
|
+
def update_secret_key(secret_key_id, secret_key_patch, request_options = {})
|
|
2336
|
+
response = update_secret_key_with_http_info(secret_key_id, secret_key_patch, request_options)
|
|
2337
|
+
@api_client.deserialize(response.body, request_options[:debug_return_type] || "AgentStudio::SecretKeyResponse")
|
|
2338
|
+
end
|
|
2339
|
+
|
|
2340
|
+
# Helper: Forges a secured user token (JWT) for Agent Studio authenticated requests.
|
|
2341
|
+
#
|
|
2342
|
+
# @param secret_key [String] The secret key to sign the token with.
|
|
2343
|
+
# @param secret_key_id [String] The key ID to include in the JWT header (kid).
|
|
2344
|
+
# @param user_id [String] The user identifier to include as the subject (sub) claim.
|
|
2345
|
+
# @param expires_in [Integer] The token expiration in seconds from now. Defaults to 86400 (24 hours).
|
|
2346
|
+
# @return [String] The signed JWT token.
|
|
2347
|
+
def forge_secured_user_token(secret_key, secret_key_id, user_id, expires_in = 86400)
|
|
2348
|
+
header = Base64.urlsafe_encode64(
|
|
2349
|
+
"{\"alg\":\"HS256\",\"typ\":\"JWT\",\"kid\":\"" + secret_key_id + "\"}",
|
|
2350
|
+
padding: false
|
|
2351
|
+
)
|
|
2352
|
+
payload = Base64.urlsafe_encode64(
|
|
2353
|
+
"{\"sub\":\"" + user_id + "\",\"exp\":" + (Time.now.to_i + expires_in).to_s + "}",
|
|
2354
|
+
padding: false
|
|
2355
|
+
)
|
|
2356
|
+
signature = Base64.urlsafe_encode64(
|
|
2357
|
+
OpenSSL::HMAC.digest("SHA256", secret_key, header + "." + payload),
|
|
2358
|
+
padding: false
|
|
2359
|
+
)
|
|
2360
|
+
|
|
2361
|
+
header + "." + payload + "." + signature
|
|
2362
|
+
end
|
|
2363
|
+
end
|
|
2364
|
+
end
|