ragie_ruby_sdk 1.0.21 → 1.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +6 -8
- data/docs/BetaApi.md +0 -140
- data/docs/Partition.md +4 -0
- data/docs/PartitionDetail.md +4 -0
- data/docs/PartitionsApi.md +64 -132
- data/docs/UpdatePartitionParams.md +22 -0
- data/lib/ragie_ruby_sdk/api/beta_api.rb +0 -126
- data/lib/ragie_ruby_sdk/api/partitions_api.rb +74 -126
- data/lib/ragie_ruby_sdk/api_model_base.rb +88 -0
- data/lib/ragie_ruby_sdk/models/access_token_credentials.rb +1 -74
- data/lib/ragie_ruby_sdk/models/agent_hopps_models_models_usage.rb +1 -74
- data/lib/ragie_ruby_sdk/models/answer.rb +1 -74
- data/lib/ragie_ruby_sdk/models/answer_step.rb +1 -74
- data/lib/ragie_ruby_sdk/models/async_document_metadata_update.rb +1 -74
- data/lib/ragie_ruby_sdk/models/audio_modality_data.rb +1 -74
- data/lib/ragie_ruby_sdk/models/authenticator_confluence_connection.rb +1 -74
- data/lib/ragie_ruby_sdk/models/authenticator_dropbox_connection.rb +1 -74
- data/lib/ragie_ruby_sdk/models/authenticator_gmail_connection.rb +1 -74
- data/lib/ragie_ruby_sdk/models/authenticator_google_drive_connection.rb +1 -74
- data/lib/ragie_ruby_sdk/models/authenticator_hubspot_connection.rb +1 -74
- data/lib/ragie_ruby_sdk/models/authenticator_jira_connection.rb +1 -74
- data/lib/ragie_ruby_sdk/models/authenticator_list.rb +1 -74
- data/lib/ragie_ruby_sdk/models/authenticator_notion_connection.rb +1 -74
- data/lib/ragie_ruby_sdk/models/authenticator_onedrive_connection.rb +1 -74
- data/lib/ragie_ruby_sdk/models/authenticator_salesforce_connection.rb +1 -74
- data/lib/ragie_ruby_sdk/models/authenticator_sharepoint_connection.rb +1 -74
- data/lib/ragie_ruby_sdk/models/authenticator_slack_connection.rb +1 -74
- data/lib/ragie_ruby_sdk/models/backblaze_credentials.rb +1 -74
- data/lib/ragie_ruby_sdk/models/base_get_authenticator.rb +1 -74
- data/lib/ragie_ruby_sdk/models/body_create_document.rb +1 -74
- data/lib/ragie_ruby_sdk/models/body_update_document_file.rb +1 -74
- data/lib/ragie_ruby_sdk/models/bucket_data.rb +1 -74
- data/lib/ragie_ruby_sdk/models/code_interpreter_evidence.rb +1 -74
- data/lib/ragie_ruby_sdk/models/code_interpreter_output.rb +1 -74
- data/lib/ragie_ruby_sdk/models/code_interpreter_output_logs.rb +1 -74
- data/lib/ragie_ruby_sdk/models/code_step.rb +1 -74
- data/lib/ragie_ruby_sdk/models/confluence_data.rb +1 -74
- data/lib/ragie_ruby_sdk/models/connection.rb +1 -74
- data/lib/ragie_ruby_sdk/models/connection_base.rb +1 -74
- data/lib/ragie_ruby_sdk/models/connection_limit_exceeded_webhook.rb +1 -74
- data/lib/ragie_ruby_sdk/models/connection_limit_exceeded_webhook_payload.rb +1 -74
- data/lib/ragie_ruby_sdk/models/connection_limit_params.rb +1 -74
- data/lib/ragie_ruby_sdk/models/connection_list.rb +1 -74
- data/lib/ragie_ruby_sdk/models/connection_stats.rb +1 -74
- data/lib/ragie_ruby_sdk/models/connection_sync_finished_webhook.rb +1 -74
- data/lib/ragie_ruby_sdk/models/connection_sync_finished_webhook_payload.rb +1 -74
- data/lib/ragie_ruby_sdk/models/connection_sync_progress_webhook.rb +1 -74
- data/lib/ragie_ruby_sdk/models/connection_sync_progress_webhook_payload.rb +1 -74
- data/lib/ragie_ruby_sdk/models/connection_sync_started_webhook.rb +1 -74
- data/lib/ragie_ruby_sdk/models/connection_sync_started_webhook_payload.rb +1 -74
- data/lib/ragie_ruby_sdk/models/connector_source_type_info.rb +1 -74
- data/lib/ragie_ruby_sdk/models/create_authenticator_connection.rb +1 -74
- data/lib/ragie_ruby_sdk/models/create_document_from_url_params.rb +1 -74
- data/lib/ragie_ruby_sdk/models/create_document_raw_params.rb +1 -74
- data/lib/ragie_ruby_sdk/models/create_google_authenticator.rb +1 -74
- data/lib/ragie_ruby_sdk/models/create_instruction_params.rb +1 -74
- data/lib/ragie_ruby_sdk/models/create_partition_params.rb +1 -74
- data/lib/ragie_ruby_sdk/models/delete_connection_payload.rb +1 -74
- data/lib/ragie_ruby_sdk/models/document.rb +1 -74
- data/lib/ragie_ruby_sdk/models/document_chunk.rb +1 -74
- data/lib/ragie_ruby_sdk/models/document_chunk_detail.rb +1 -74
- data/lib/ragie_ruby_sdk/models/document_chunk_list.rb +1 -74
- data/lib/ragie_ruby_sdk/models/document_delete.rb +1 -74
- data/lib/ragie_ruby_sdk/models/document_delete_webhook.rb +1 -74
- data/lib/ragie_ruby_sdk/models/document_delete_webhook_payload.rb +1 -74
- data/lib/ragie_ruby_sdk/models/document_file_update.rb +1 -74
- data/lib/ragie_ruby_sdk/models/document_get.rb +1 -74
- data/lib/ragie_ruby_sdk/models/document_list.rb +1 -74
- data/lib/ragie_ruby_sdk/models/document_metadata_update.rb +1 -74
- data/lib/ragie_ruby_sdk/models/document_raw_update.rb +1 -74
- data/lib/ragie_ruby_sdk/models/document_summary.rb +1 -74
- data/lib/ragie_ruby_sdk/models/document_update_webhook.rb +1 -74
- data/lib/ragie_ruby_sdk/models/document_update_webhook_payload.rb +1 -74
- data/lib/ragie_ruby_sdk/models/document_url_update.rb +1 -74
- data/lib/ragie_ruby_sdk/models/document_with_content.rb +1 -74
- data/lib/ragie_ruby_sdk/models/entity.rb +1 -74
- data/lib/ragie_ruby_sdk/models/entity_extracted_webhook.rb +1 -74
- data/lib/ragie_ruby_sdk/models/entity_extracted_webhook_payload.rb +1 -74
- data/lib/ragie_ruby_sdk/models/entity_list.rb +1 -74
- data/lib/ragie_ruby_sdk/models/error_message.rb +1 -74
- data/lib/ragie_ruby_sdk/models/evaluated_answer_step.rb +1 -74
- data/lib/ragie_ruby_sdk/models/failed_step.rb +1 -74
- data/lib/ragie_ruby_sdk/models/file_search_output.rb +1 -74
- data/lib/ragie_ruby_sdk/models/file_search_result.rb +1 -74
- data/lib/ragie_ruby_sdk/models/final_answer.rb +1 -74
- data/lib/ragie_ruby_sdk/models/folder_data.rb +1 -74
- data/lib/ragie_ruby_sdk/models/freshdesk_credentials.rb +1 -74
- data/lib/ragie_ruby_sdk/models/freshdesk_data.rb +1 -74
- data/lib/ragie_ruby_sdk/models/gmail_data.rb +1 -74
- data/lib/ragie_ruby_sdk/models/google_folder_data.rb +1 -74
- data/lib/ragie_ruby_sdk/models/http_validation_error.rb +1 -74
- data/lib/ragie_ruby_sdk/models/hubspot_data.rb +1 -74
- data/lib/ragie_ruby_sdk/models/input_token_details.rb +1 -74
- data/lib/ragie_ruby_sdk/models/instruction.rb +1 -74
- data/lib/ragie_ruby_sdk/models/intercom_credentials.rb +1 -74
- data/lib/ragie_ruby_sdk/models/intercom_data.rb +1 -74
- data/lib/ragie_ruby_sdk/models/link.rb +1 -74
- data/lib/ragie_ruby_sdk/models/list_connector_source_type_info.rb +1 -74
- data/lib/ragie_ruby_sdk/models/media_mode_param.rb +1 -74
- data/lib/ragie_ruby_sdk/models/mode2_one_of.rb +1 -74
- data/lib/ragie_ruby_sdk/models/model_usage.rb +1 -74
- data/lib/ragie_ruby_sdk/models/o_auth_credentials.rb +1 -74
- data/lib/ragie_ruby_sdk/models/o_auth_refresh_token_credentials.rb +1 -74
- data/lib/ragie_ruby_sdk/models/o_auth_url_create.rb +1 -74
- data/lib/ragie_ruby_sdk/models/o_auth_url_response.rb +1 -74
- data/lib/ragie_ruby_sdk/models/onedrive_data.rb +1 -74
- data/lib/ragie_ruby_sdk/models/output_token_details.rb +1 -74
- data/lib/ragie_ruby_sdk/models/pagination.rb +1 -74
- data/lib/ragie_ruby_sdk/models/partition.rb +42 -75
- data/lib/ragie_ruby_sdk/models/partition_detail.rb +42 -75
- data/lib/ragie_ruby_sdk/models/partition_limit_exceeded_webhook.rb +1 -74
- data/lib/ragie_ruby_sdk/models/partition_limit_exceeded_webhook_payload.rb +1 -74
- data/lib/ragie_ruby_sdk/models/partition_limit_params.rb +1 -74
- data/lib/ragie_ruby_sdk/models/partition_limit_reset_webhook.rb +1 -74
- data/lib/ragie_ruby_sdk/models/partition_limit_reset_webhook_payload.rb +1 -74
- data/lib/ragie_ruby_sdk/models/partition_limits.rb +1 -74
- data/lib/ragie_ruby_sdk/models/partition_list.rb +1 -74
- data/lib/ragie_ruby_sdk/models/partition_stats.rb +1 -74
- data/lib/ragie_ruby_sdk/models/patch_document_metadata_params.rb +1 -74
- data/lib/ragie_ruby_sdk/models/plan_step.rb +1 -74
- data/lib/ragie_ruby_sdk/models/public_backblaze_connection.rb +1 -74
- data/lib/ragie_ruby_sdk/models/public_create_connection.rb +1 -74
- data/lib/ragie_ruby_sdk/models/public_freshdesk_connection.rb +1 -74
- data/lib/ragie_ruby_sdk/models/public_gcs_connection.rb +1 -74
- data/lib/ragie_ruby_sdk/models/public_intercom_connection.rb +1 -74
- data/lib/ragie_ruby_sdk/models/public_s3_compatible_connection.rb +1 -74
- data/lib/ragie_ruby_sdk/models/public_zendesk_connection.rb +1 -74
- data/lib/ragie_ruby_sdk/models/query_details.rb +1 -74
- data/lib/ragie_ruby_sdk/models/ragie_api_schema_response_usage.rb +1 -74
- data/lib/ragie_ruby_sdk/models/ragie_evidence.rb +1 -74
- data/lib/ragie_ruby_sdk/models/reasoning.rb +1 -74
- data/lib/ragie_ruby_sdk/models/reasoning_output.rb +1 -74
- data/lib/ragie_ruby_sdk/models/reasoning_summary.rb +1 -74
- data/lib/ragie_ruby_sdk/models/reasoning_text.rb +1 -74
- data/lib/ragie_ruby_sdk/models/request.rb +1 -74
- data/lib/ragie_ruby_sdk/models/response.rb +1 -74
- data/lib/ragie_ruby_sdk/models/response_content.rb +1 -74
- data/lib/ragie_ruby_sdk/models/response_ok.rb +1 -74
- data/lib/ragie_ruby_sdk/models/response_output_message.rb +1 -74
- data/lib/ragie_ruby_sdk/models/retrieval.rb +1 -74
- data/lib/ragie_ruby_sdk/models/retrieve_params.rb +1 -74
- data/lib/ragie_ruby_sdk/models/s3_compatible_credentials.rb +1 -74
- data/lib/ragie_ruby_sdk/models/scored_chunk.rb +1 -74
- data/lib/ragie_ruby_sdk/models/search.rb +1 -74
- data/lib/ragie_ruby_sdk/models/search_result_link.rb +1 -74
- data/lib/ragie_ruby_sdk/models/search_step.rb +1 -74
- data/lib/ragie_ruby_sdk/models/search_step_with_query_details.rb +1 -74
- data/lib/ragie_ruby_sdk/models/set_connection_enabled_payload.rb +1 -74
- data/lib/ragie_ruby_sdk/models/sharepoint_data.rb +1 -74
- data/lib/ragie_ruby_sdk/models/sharepoint_file_data.rb +1 -74
- data/lib/ragie_ruby_sdk/models/sharepoint_site_data.rb +1 -74
- data/lib/ragie_ruby_sdk/models/slack_data.rb +1 -74
- data/lib/ragie_ruby_sdk/models/surrender_step.rb +1 -74
- data/lib/ragie_ruby_sdk/models/tool.rb +1 -74
- data/lib/ragie_ruby_sdk/models/update_document_from_url_params.rb +1 -74
- data/lib/ragie_ruby_sdk/models/update_document_raw_params.rb +1 -74
- data/lib/ragie_ruby_sdk/models/update_instruction_params.rb +1 -74
- data/lib/ragie_ruby_sdk/models/update_partition_params.rb +170 -0
- data/lib/ragie_ruby_sdk/models/validation_error.rb +1 -74
- data/lib/ragie_ruby_sdk/models/video_modality_data.rb +1 -74
- data/lib/ragie_ruby_sdk/models/word_timestamp.rb +1 -74
- data/lib/ragie_ruby_sdk/models/zendesk_credentials.rb +1 -74
- data/lib/ragie_ruby_sdk/models/zendesk_data.rb +1 -74
- data/lib/ragie_ruby_sdk/version.rb +1 -1
- data/lib/ragie_ruby_sdk.rb +2 -0
- data/spec/api/beta_api_spec.rb +0 -24
- data/spec/api/partitions_api_spec.rb +13 -24
- data/spec/models/partition_detail_spec.rb +12 -0
- data/spec/models/partition_spec.rb +12 -0
- data/spec/models/update_partition_params_spec.rb +48 -0
- metadata +6 -1
|
@@ -292,132 +292,6 @@ module RagieRubySdk
|
|
|
292
292
|
return data, status_code, headers
|
|
293
293
|
end
|
|
294
294
|
|
|
295
|
-
# Disable Mcp
|
|
296
|
-
# Disables context-aware descriptions for a partition. This will stop automatically generating descriptions for the partition.
|
|
297
|
-
# @param partition_id [String]
|
|
298
|
-
# @param [Hash] opts the optional parameters
|
|
299
|
-
# @return [Object]
|
|
300
|
-
def disable_mcp_partitions_partition_id_mcp_delete(partition_id, opts = {})
|
|
301
|
-
data, _status_code, _headers = disable_mcp_partitions_partition_id_mcp_delete_with_http_info(partition_id, opts)
|
|
302
|
-
data
|
|
303
|
-
end
|
|
304
|
-
|
|
305
|
-
# Disable Mcp
|
|
306
|
-
# Disables context-aware descriptions for a partition. This will stop automatically generating descriptions for the partition.
|
|
307
|
-
# @param partition_id [String]
|
|
308
|
-
# @param [Hash] opts the optional parameters
|
|
309
|
-
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
310
|
-
def disable_mcp_partitions_partition_id_mcp_delete_with_http_info(partition_id, opts = {})
|
|
311
|
-
if @api_client.config.debugging
|
|
312
|
-
@api_client.config.logger.debug 'Calling API: BetaApi.disable_mcp_partitions_partition_id_mcp_delete ...'
|
|
313
|
-
end
|
|
314
|
-
# verify the required parameter 'partition_id' is set
|
|
315
|
-
if @api_client.config.client_side_validation && partition_id.nil?
|
|
316
|
-
fail ArgumentError, "Missing the required parameter 'partition_id' when calling BetaApi.disable_mcp_partitions_partition_id_mcp_delete"
|
|
317
|
-
end
|
|
318
|
-
# resource path
|
|
319
|
-
local_var_path = '/partitions/{partition_id}/mcp'.sub('{' + 'partition_id' + '}', CGI.escape(partition_id.to_s))
|
|
320
|
-
|
|
321
|
-
# query parameters
|
|
322
|
-
query_params = opts[:query_params] || {}
|
|
323
|
-
|
|
324
|
-
# header parameters
|
|
325
|
-
header_params = opts[:header_params] || {}
|
|
326
|
-
# HTTP header 'Accept' (if needed)
|
|
327
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
328
|
-
|
|
329
|
-
# form parameters
|
|
330
|
-
form_params = opts[:form_params] || {}
|
|
331
|
-
|
|
332
|
-
# http body (model)
|
|
333
|
-
post_body = opts[:debug_body]
|
|
334
|
-
|
|
335
|
-
# return_type
|
|
336
|
-
return_type = opts[:debug_return_type] || 'Object'
|
|
337
|
-
|
|
338
|
-
# auth_names
|
|
339
|
-
auth_names = opts[:debug_auth_names] || ['auth']
|
|
340
|
-
|
|
341
|
-
new_options = opts.merge(
|
|
342
|
-
:operation => :"BetaApi.disable_mcp_partitions_partition_id_mcp_delete",
|
|
343
|
-
:header_params => header_params,
|
|
344
|
-
:query_params => query_params,
|
|
345
|
-
:form_params => form_params,
|
|
346
|
-
:body => post_body,
|
|
347
|
-
:auth_names => auth_names,
|
|
348
|
-
:return_type => return_type
|
|
349
|
-
)
|
|
350
|
-
|
|
351
|
-
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
352
|
-
if @api_client.config.debugging
|
|
353
|
-
@api_client.config.logger.debug "API called: BetaApi#disable_mcp_partitions_partition_id_mcp_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
354
|
-
end
|
|
355
|
-
return data, status_code, headers
|
|
356
|
-
end
|
|
357
|
-
|
|
358
|
-
# Enable Mcp
|
|
359
|
-
# Enables context-aware descriptions for a partition. This will allow the automatically generate a desccription for based on the documents in the partition.
|
|
360
|
-
# @param partition_id [String]
|
|
361
|
-
# @param [Hash] opts the optional parameters
|
|
362
|
-
# @return [Object]
|
|
363
|
-
def enable_mcp_partitions_partition_id_mcp_post(partition_id, opts = {})
|
|
364
|
-
data, _status_code, _headers = enable_mcp_partitions_partition_id_mcp_post_with_http_info(partition_id, opts)
|
|
365
|
-
data
|
|
366
|
-
end
|
|
367
|
-
|
|
368
|
-
# Enable Mcp
|
|
369
|
-
# Enables context-aware descriptions for a partition. This will allow the automatically generate a desccription for based on the documents in the partition.
|
|
370
|
-
# @param partition_id [String]
|
|
371
|
-
# @param [Hash] opts the optional parameters
|
|
372
|
-
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
373
|
-
def enable_mcp_partitions_partition_id_mcp_post_with_http_info(partition_id, opts = {})
|
|
374
|
-
if @api_client.config.debugging
|
|
375
|
-
@api_client.config.logger.debug 'Calling API: BetaApi.enable_mcp_partitions_partition_id_mcp_post ...'
|
|
376
|
-
end
|
|
377
|
-
# verify the required parameter 'partition_id' is set
|
|
378
|
-
if @api_client.config.client_side_validation && partition_id.nil?
|
|
379
|
-
fail ArgumentError, "Missing the required parameter 'partition_id' when calling BetaApi.enable_mcp_partitions_partition_id_mcp_post"
|
|
380
|
-
end
|
|
381
|
-
# resource path
|
|
382
|
-
local_var_path = '/partitions/{partition_id}/mcp'.sub('{' + 'partition_id' + '}', CGI.escape(partition_id.to_s))
|
|
383
|
-
|
|
384
|
-
# query parameters
|
|
385
|
-
query_params = opts[:query_params] || {}
|
|
386
|
-
|
|
387
|
-
# header parameters
|
|
388
|
-
header_params = opts[:header_params] || {}
|
|
389
|
-
# HTTP header 'Accept' (if needed)
|
|
390
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
391
|
-
|
|
392
|
-
# form parameters
|
|
393
|
-
form_params = opts[:form_params] || {}
|
|
394
|
-
|
|
395
|
-
# http body (model)
|
|
396
|
-
post_body = opts[:debug_body]
|
|
397
|
-
|
|
398
|
-
# return_type
|
|
399
|
-
return_type = opts[:debug_return_type] || 'Object'
|
|
400
|
-
|
|
401
|
-
# auth_names
|
|
402
|
-
auth_names = opts[:debug_auth_names] || ['auth']
|
|
403
|
-
|
|
404
|
-
new_options = opts.merge(
|
|
405
|
-
:operation => :"BetaApi.enable_mcp_partitions_partition_id_mcp_post",
|
|
406
|
-
:header_params => header_params,
|
|
407
|
-
:query_params => query_params,
|
|
408
|
-
:form_params => form_params,
|
|
409
|
-
:body => post_body,
|
|
410
|
-
:auth_names => auth_names,
|
|
411
|
-
:return_type => return_type
|
|
412
|
-
)
|
|
413
|
-
|
|
414
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
415
|
-
if @api_client.config.debugging
|
|
416
|
-
@api_client.config.logger.debug "API called: BetaApi#enable_mcp_partitions_partition_id_mcp_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
417
|
-
end
|
|
418
|
-
return data, status_code, headers
|
|
419
|
-
end
|
|
420
|
-
|
|
421
295
|
# List Authenticators
|
|
422
296
|
# List all authenticators sorted by created_at in descending order. Results are paginated with a max limit of 100. When more authenticators are available, a `cursor` will be provided. Use the `cursor` parameter to retrieve the subsequent page.
|
|
423
297
|
# @param [Hash] opts the optional parameters
|
|
@@ -150,132 +150,6 @@ module RagieRubySdk
|
|
|
150
150
|
return data, status_code, headers
|
|
151
151
|
end
|
|
152
152
|
|
|
153
|
-
# Disable Mcp
|
|
154
|
-
# Disables context-aware descriptions for a partition. This will stop automatically generating descriptions for the partition.
|
|
155
|
-
# @param partition_id [String]
|
|
156
|
-
# @param [Hash] opts the optional parameters
|
|
157
|
-
# @return [Object]
|
|
158
|
-
def disable_mcp_partitions_partition_id_mcp_delete(partition_id, opts = {})
|
|
159
|
-
data, _status_code, _headers = disable_mcp_partitions_partition_id_mcp_delete_with_http_info(partition_id, opts)
|
|
160
|
-
data
|
|
161
|
-
end
|
|
162
|
-
|
|
163
|
-
# Disable Mcp
|
|
164
|
-
# Disables context-aware descriptions for a partition. This will stop automatically generating descriptions for the partition.
|
|
165
|
-
# @param partition_id [String]
|
|
166
|
-
# @param [Hash] opts the optional parameters
|
|
167
|
-
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
168
|
-
def disable_mcp_partitions_partition_id_mcp_delete_with_http_info(partition_id, opts = {})
|
|
169
|
-
if @api_client.config.debugging
|
|
170
|
-
@api_client.config.logger.debug 'Calling API: PartitionsApi.disable_mcp_partitions_partition_id_mcp_delete ...'
|
|
171
|
-
end
|
|
172
|
-
# verify the required parameter 'partition_id' is set
|
|
173
|
-
if @api_client.config.client_side_validation && partition_id.nil?
|
|
174
|
-
fail ArgumentError, "Missing the required parameter 'partition_id' when calling PartitionsApi.disable_mcp_partitions_partition_id_mcp_delete"
|
|
175
|
-
end
|
|
176
|
-
# resource path
|
|
177
|
-
local_var_path = '/partitions/{partition_id}/mcp'.sub('{' + 'partition_id' + '}', CGI.escape(partition_id.to_s))
|
|
178
|
-
|
|
179
|
-
# query parameters
|
|
180
|
-
query_params = opts[:query_params] || {}
|
|
181
|
-
|
|
182
|
-
# header parameters
|
|
183
|
-
header_params = opts[:header_params] || {}
|
|
184
|
-
# HTTP header 'Accept' (if needed)
|
|
185
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
186
|
-
|
|
187
|
-
# form parameters
|
|
188
|
-
form_params = opts[:form_params] || {}
|
|
189
|
-
|
|
190
|
-
# http body (model)
|
|
191
|
-
post_body = opts[:debug_body]
|
|
192
|
-
|
|
193
|
-
# return_type
|
|
194
|
-
return_type = opts[:debug_return_type] || 'Object'
|
|
195
|
-
|
|
196
|
-
# auth_names
|
|
197
|
-
auth_names = opts[:debug_auth_names] || ['auth']
|
|
198
|
-
|
|
199
|
-
new_options = opts.merge(
|
|
200
|
-
:operation => :"PartitionsApi.disable_mcp_partitions_partition_id_mcp_delete",
|
|
201
|
-
:header_params => header_params,
|
|
202
|
-
:query_params => query_params,
|
|
203
|
-
:form_params => form_params,
|
|
204
|
-
:body => post_body,
|
|
205
|
-
:auth_names => auth_names,
|
|
206
|
-
:return_type => return_type
|
|
207
|
-
)
|
|
208
|
-
|
|
209
|
-
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
210
|
-
if @api_client.config.debugging
|
|
211
|
-
@api_client.config.logger.debug "API called: PartitionsApi#disable_mcp_partitions_partition_id_mcp_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
212
|
-
end
|
|
213
|
-
return data, status_code, headers
|
|
214
|
-
end
|
|
215
|
-
|
|
216
|
-
# Enable Mcp
|
|
217
|
-
# Enables context-aware descriptions for a partition. This will allow the automatically generate a desccription for based on the documents in the partition.
|
|
218
|
-
# @param partition_id [String]
|
|
219
|
-
# @param [Hash] opts the optional parameters
|
|
220
|
-
# @return [Object]
|
|
221
|
-
def enable_mcp_partitions_partition_id_mcp_post(partition_id, opts = {})
|
|
222
|
-
data, _status_code, _headers = enable_mcp_partitions_partition_id_mcp_post_with_http_info(partition_id, opts)
|
|
223
|
-
data
|
|
224
|
-
end
|
|
225
|
-
|
|
226
|
-
# Enable Mcp
|
|
227
|
-
# Enables context-aware descriptions for a partition. This will allow the automatically generate a desccription for based on the documents in the partition.
|
|
228
|
-
# @param partition_id [String]
|
|
229
|
-
# @param [Hash] opts the optional parameters
|
|
230
|
-
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
231
|
-
def enable_mcp_partitions_partition_id_mcp_post_with_http_info(partition_id, opts = {})
|
|
232
|
-
if @api_client.config.debugging
|
|
233
|
-
@api_client.config.logger.debug 'Calling API: PartitionsApi.enable_mcp_partitions_partition_id_mcp_post ...'
|
|
234
|
-
end
|
|
235
|
-
# verify the required parameter 'partition_id' is set
|
|
236
|
-
if @api_client.config.client_side_validation && partition_id.nil?
|
|
237
|
-
fail ArgumentError, "Missing the required parameter 'partition_id' when calling PartitionsApi.enable_mcp_partitions_partition_id_mcp_post"
|
|
238
|
-
end
|
|
239
|
-
# resource path
|
|
240
|
-
local_var_path = '/partitions/{partition_id}/mcp'.sub('{' + 'partition_id' + '}', CGI.escape(partition_id.to_s))
|
|
241
|
-
|
|
242
|
-
# query parameters
|
|
243
|
-
query_params = opts[:query_params] || {}
|
|
244
|
-
|
|
245
|
-
# header parameters
|
|
246
|
-
header_params = opts[:header_params] || {}
|
|
247
|
-
# HTTP header 'Accept' (if needed)
|
|
248
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
249
|
-
|
|
250
|
-
# form parameters
|
|
251
|
-
form_params = opts[:form_params] || {}
|
|
252
|
-
|
|
253
|
-
# http body (model)
|
|
254
|
-
post_body = opts[:debug_body]
|
|
255
|
-
|
|
256
|
-
# return_type
|
|
257
|
-
return_type = opts[:debug_return_type] || 'Object'
|
|
258
|
-
|
|
259
|
-
# auth_names
|
|
260
|
-
auth_names = opts[:debug_auth_names] || ['auth']
|
|
261
|
-
|
|
262
|
-
new_options = opts.merge(
|
|
263
|
-
:operation => :"PartitionsApi.enable_mcp_partitions_partition_id_mcp_post",
|
|
264
|
-
:header_params => header_params,
|
|
265
|
-
:query_params => query_params,
|
|
266
|
-
:form_params => form_params,
|
|
267
|
-
:body => post_body,
|
|
268
|
-
:auth_names => auth_names,
|
|
269
|
-
:return_type => return_type
|
|
270
|
-
)
|
|
271
|
-
|
|
272
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
273
|
-
if @api_client.config.debugging
|
|
274
|
-
@api_client.config.logger.debug "API called: PartitionsApi#enable_mcp_partitions_partition_id_mcp_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
275
|
-
end
|
|
276
|
-
return data, status_code, headers
|
|
277
|
-
end
|
|
278
|
-
|
|
279
153
|
# Get Partition
|
|
280
154
|
# Get a partition by its ID. Includes usage information such as the number of documents and pages hosted and processed. The partition's limits are also included.
|
|
281
155
|
# @param partition_id [String]
|
|
@@ -483,5 +357,79 @@ module RagieRubySdk
|
|
|
483
357
|
end
|
|
484
358
|
return data, status_code, headers
|
|
485
359
|
end
|
|
360
|
+
|
|
361
|
+
# Update Partition
|
|
362
|
+
# Updates a partition. This includes the partition's description and metadata schema.
|
|
363
|
+
# @param partition_id [String]
|
|
364
|
+
# @param update_partition_params [UpdatePartitionParams]
|
|
365
|
+
# @param [Hash] opts the optional parameters
|
|
366
|
+
# @return [PartitionDetail]
|
|
367
|
+
def update_partition_partitions_partition_id_patch(partition_id, update_partition_params, opts = {})
|
|
368
|
+
data, _status_code, _headers = update_partition_partitions_partition_id_patch_with_http_info(partition_id, update_partition_params, opts)
|
|
369
|
+
data
|
|
370
|
+
end
|
|
371
|
+
|
|
372
|
+
# Update Partition
|
|
373
|
+
# Updates a partition. This includes the partition's description and metadata schema.
|
|
374
|
+
# @param partition_id [String]
|
|
375
|
+
# @param update_partition_params [UpdatePartitionParams]
|
|
376
|
+
# @param [Hash] opts the optional parameters
|
|
377
|
+
# @return [Array<(PartitionDetail, Integer, Hash)>] PartitionDetail data, response status code and response headers
|
|
378
|
+
def update_partition_partitions_partition_id_patch_with_http_info(partition_id, update_partition_params, opts = {})
|
|
379
|
+
if @api_client.config.debugging
|
|
380
|
+
@api_client.config.logger.debug 'Calling API: PartitionsApi.update_partition_partitions_partition_id_patch ...'
|
|
381
|
+
end
|
|
382
|
+
# verify the required parameter 'partition_id' is set
|
|
383
|
+
if @api_client.config.client_side_validation && partition_id.nil?
|
|
384
|
+
fail ArgumentError, "Missing the required parameter 'partition_id' when calling PartitionsApi.update_partition_partitions_partition_id_patch"
|
|
385
|
+
end
|
|
386
|
+
# verify the required parameter 'update_partition_params' is set
|
|
387
|
+
if @api_client.config.client_side_validation && update_partition_params.nil?
|
|
388
|
+
fail ArgumentError, "Missing the required parameter 'update_partition_params' when calling PartitionsApi.update_partition_partitions_partition_id_patch"
|
|
389
|
+
end
|
|
390
|
+
# resource path
|
|
391
|
+
local_var_path = '/partitions/{partition_id}'.sub('{' + 'partition_id' + '}', CGI.escape(partition_id.to_s))
|
|
392
|
+
|
|
393
|
+
# query parameters
|
|
394
|
+
query_params = opts[:query_params] || {}
|
|
395
|
+
|
|
396
|
+
# header parameters
|
|
397
|
+
header_params = opts[:header_params] || {}
|
|
398
|
+
# HTTP header 'Accept' (if needed)
|
|
399
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
400
|
+
# HTTP header 'Content-Type'
|
|
401
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
402
|
+
if !content_type.nil?
|
|
403
|
+
header_params['Content-Type'] = content_type
|
|
404
|
+
end
|
|
405
|
+
|
|
406
|
+
# form parameters
|
|
407
|
+
form_params = opts[:form_params] || {}
|
|
408
|
+
|
|
409
|
+
# http body (model)
|
|
410
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_partition_params)
|
|
411
|
+
|
|
412
|
+
# return_type
|
|
413
|
+
return_type = opts[:debug_return_type] || 'PartitionDetail'
|
|
414
|
+
|
|
415
|
+
# auth_names
|
|
416
|
+
auth_names = opts[:debug_auth_names] || ['auth']
|
|
417
|
+
|
|
418
|
+
new_options = opts.merge(
|
|
419
|
+
:operation => :"PartitionsApi.update_partition_partitions_partition_id_patch",
|
|
420
|
+
:header_params => header_params,
|
|
421
|
+
:query_params => query_params,
|
|
422
|
+
:form_params => form_params,
|
|
423
|
+
:body => post_body,
|
|
424
|
+
:auth_names => auth_names,
|
|
425
|
+
:return_type => return_type
|
|
426
|
+
)
|
|
427
|
+
|
|
428
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
429
|
+
if @api_client.config.debugging
|
|
430
|
+
@api_client.config.logger.debug "API called: PartitionsApi#update_partition_partitions_partition_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
431
|
+
end
|
|
432
|
+
return data, status_code, headers
|
|
433
|
+
end
|
|
486
434
|
end
|
|
487
435
|
end
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Ragie API
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.17.0-SNAPSHOT
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
module RagieRubySdk
|
|
14
|
+
class ApiModelBase
|
|
15
|
+
# Deserializes the data based on type
|
|
16
|
+
# @param string type Data type
|
|
17
|
+
# @param string value Value to be deserialized
|
|
18
|
+
# @return [Object] Deserialized data
|
|
19
|
+
def self._deserialize(type, value)
|
|
20
|
+
case type.to_sym
|
|
21
|
+
when :Time
|
|
22
|
+
Time.parse(value)
|
|
23
|
+
when :Date
|
|
24
|
+
Date.parse(value)
|
|
25
|
+
when :String
|
|
26
|
+
value.to_s
|
|
27
|
+
when :Integer
|
|
28
|
+
value.to_i
|
|
29
|
+
when :Float
|
|
30
|
+
value.to_f
|
|
31
|
+
when :Boolean
|
|
32
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
33
|
+
true
|
|
34
|
+
else
|
|
35
|
+
false
|
|
36
|
+
end
|
|
37
|
+
when :Object
|
|
38
|
+
# generic object (usually a Hash), return directly
|
|
39
|
+
value
|
|
40
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
41
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
42
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
43
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
44
|
+
k_type = Regexp.last_match[:k_type]
|
|
45
|
+
v_type = Regexp.last_match[:v_type]
|
|
46
|
+
{}.tap do |hash|
|
|
47
|
+
value.each do |k, v|
|
|
48
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
else # model
|
|
52
|
+
# models (e.g. Pet) or oneOf
|
|
53
|
+
klass = RagieRubySdk.const_get(type)
|
|
54
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Returns the string representation of the object
|
|
59
|
+
# @return [String] String presentation of the object
|
|
60
|
+
def to_s
|
|
61
|
+
to_hash.to_s
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
65
|
+
# @return [Hash] Returns the object in the form of hash
|
|
66
|
+
def to_body
|
|
67
|
+
to_hash
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Outputs non-array value in the form of hash
|
|
71
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
72
|
+
# @param [Object] value Any valid value
|
|
73
|
+
# @return [Hash] Returns the value in the form of hash
|
|
74
|
+
def _to_hash(value)
|
|
75
|
+
if value.is_a?(Array)
|
|
76
|
+
value.compact.map { |v| _to_hash(v) }
|
|
77
|
+
elsif value.is_a?(Hash)
|
|
78
|
+
{}.tap do |hash|
|
|
79
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
80
|
+
end
|
|
81
|
+
elsif value.respond_to? :to_hash
|
|
82
|
+
value.to_hash
|
|
83
|
+
else
|
|
84
|
+
value
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module RagieRubySdk
|
|
17
|
-
class AccessTokenCredentials
|
|
17
|
+
class AccessTokenCredentials < ApiModelBase
|
|
18
18
|
attr_accessor :access_token
|
|
19
19
|
|
|
20
20
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -143,61 +143,6 @@ module RagieRubySdk
|
|
|
143
143
|
new(transformed_hash)
|
|
144
144
|
end
|
|
145
145
|
|
|
146
|
-
# Deserializes the data based on type
|
|
147
|
-
# @param string type Data type
|
|
148
|
-
# @param string value Value to be deserialized
|
|
149
|
-
# @return [Object] Deserialized data
|
|
150
|
-
def self._deserialize(type, value)
|
|
151
|
-
case type.to_sym
|
|
152
|
-
when :Time
|
|
153
|
-
Time.parse(value)
|
|
154
|
-
when :Date
|
|
155
|
-
Date.parse(value)
|
|
156
|
-
when :String
|
|
157
|
-
value.to_s
|
|
158
|
-
when :Integer
|
|
159
|
-
value.to_i
|
|
160
|
-
when :Float
|
|
161
|
-
value.to_f
|
|
162
|
-
when :Boolean
|
|
163
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
164
|
-
true
|
|
165
|
-
else
|
|
166
|
-
false
|
|
167
|
-
end
|
|
168
|
-
when :Object
|
|
169
|
-
# generic object (usually a Hash), return directly
|
|
170
|
-
value
|
|
171
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
172
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
173
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
174
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
175
|
-
k_type = Regexp.last_match[:k_type]
|
|
176
|
-
v_type = Regexp.last_match[:v_type]
|
|
177
|
-
{}.tap do |hash|
|
|
178
|
-
value.each do |k, v|
|
|
179
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
180
|
-
end
|
|
181
|
-
end
|
|
182
|
-
else # model
|
|
183
|
-
# models (e.g. Pet) or oneOf
|
|
184
|
-
klass = RagieRubySdk.const_get(type)
|
|
185
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
186
|
-
end
|
|
187
|
-
end
|
|
188
|
-
|
|
189
|
-
# Returns the string representation of the object
|
|
190
|
-
# @return [String] String presentation of the object
|
|
191
|
-
def to_s
|
|
192
|
-
to_hash.to_s
|
|
193
|
-
end
|
|
194
|
-
|
|
195
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
196
|
-
# @return [Hash] Returns the object in the form of hash
|
|
197
|
-
def to_body
|
|
198
|
-
to_hash
|
|
199
|
-
end
|
|
200
|
-
|
|
201
146
|
# Returns the object in the form of hash
|
|
202
147
|
# @return [Hash] Returns the object in the form of hash
|
|
203
148
|
def to_hash
|
|
@@ -214,24 +159,6 @@ module RagieRubySdk
|
|
|
214
159
|
hash
|
|
215
160
|
end
|
|
216
161
|
|
|
217
|
-
# Outputs non-array value in the form of hash
|
|
218
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
219
|
-
# @param [Object] value Any valid value
|
|
220
|
-
# @return [Hash] Returns the value in the form of hash
|
|
221
|
-
def _to_hash(value)
|
|
222
|
-
if value.is_a?(Array)
|
|
223
|
-
value.compact.map { |v| _to_hash(v) }
|
|
224
|
-
elsif value.is_a?(Hash)
|
|
225
|
-
{}.tap do |hash|
|
|
226
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
227
|
-
end
|
|
228
|
-
elsif value.respond_to? :to_hash
|
|
229
|
-
value.to_hash
|
|
230
|
-
else
|
|
231
|
-
value
|
|
232
|
-
end
|
|
233
|
-
end
|
|
234
|
-
|
|
235
162
|
end
|
|
236
163
|
|
|
237
164
|
end
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module RagieRubySdk
|
|
17
|
-
class AgentHoppsModelsModelsUsage
|
|
17
|
+
class AgentHoppsModelsModelsUsage < ApiModelBase
|
|
18
18
|
attr_accessor :models
|
|
19
19
|
|
|
20
20
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -128,61 +128,6 @@ module RagieRubySdk
|
|
|
128
128
|
new(transformed_hash)
|
|
129
129
|
end
|
|
130
130
|
|
|
131
|
-
# Deserializes the data based on type
|
|
132
|
-
# @param string type Data type
|
|
133
|
-
# @param string value Value to be deserialized
|
|
134
|
-
# @return [Object] Deserialized data
|
|
135
|
-
def self._deserialize(type, value)
|
|
136
|
-
case type.to_sym
|
|
137
|
-
when :Time
|
|
138
|
-
Time.parse(value)
|
|
139
|
-
when :Date
|
|
140
|
-
Date.parse(value)
|
|
141
|
-
when :String
|
|
142
|
-
value.to_s
|
|
143
|
-
when :Integer
|
|
144
|
-
value.to_i
|
|
145
|
-
when :Float
|
|
146
|
-
value.to_f
|
|
147
|
-
when :Boolean
|
|
148
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
149
|
-
true
|
|
150
|
-
else
|
|
151
|
-
false
|
|
152
|
-
end
|
|
153
|
-
when :Object
|
|
154
|
-
# generic object (usually a Hash), return directly
|
|
155
|
-
value
|
|
156
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
157
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
158
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
159
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
160
|
-
k_type = Regexp.last_match[:k_type]
|
|
161
|
-
v_type = Regexp.last_match[:v_type]
|
|
162
|
-
{}.tap do |hash|
|
|
163
|
-
value.each do |k, v|
|
|
164
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
165
|
-
end
|
|
166
|
-
end
|
|
167
|
-
else # model
|
|
168
|
-
# models (e.g. Pet) or oneOf
|
|
169
|
-
klass = RagieRubySdk.const_get(type)
|
|
170
|
-
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
171
|
-
end
|
|
172
|
-
end
|
|
173
|
-
|
|
174
|
-
# Returns the string representation of the object
|
|
175
|
-
# @return [String] String presentation of the object
|
|
176
|
-
def to_s
|
|
177
|
-
to_hash.to_s
|
|
178
|
-
end
|
|
179
|
-
|
|
180
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
181
|
-
# @return [Hash] Returns the object in the form of hash
|
|
182
|
-
def to_body
|
|
183
|
-
to_hash
|
|
184
|
-
end
|
|
185
|
-
|
|
186
131
|
# Returns the object in the form of hash
|
|
187
132
|
# @return [Hash] Returns the object in the form of hash
|
|
188
133
|
def to_hash
|
|
@@ -199,24 +144,6 @@ module RagieRubySdk
|
|
|
199
144
|
hash
|
|
200
145
|
end
|
|
201
146
|
|
|
202
|
-
# Outputs non-array value in the form of hash
|
|
203
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
204
|
-
# @param [Object] value Any valid value
|
|
205
|
-
# @return [Hash] Returns the value in the form of hash
|
|
206
|
-
def _to_hash(value)
|
|
207
|
-
if value.is_a?(Array)
|
|
208
|
-
value.compact.map { |v| _to_hash(v) }
|
|
209
|
-
elsif value.is_a?(Hash)
|
|
210
|
-
{}.tap do |hash|
|
|
211
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
212
|
-
end
|
|
213
|
-
elsif value.respond_to? :to_hash
|
|
214
|
-
value.to_hash
|
|
215
|
-
else
|
|
216
|
-
value
|
|
217
|
-
end
|
|
218
|
-
end
|
|
219
|
-
|
|
220
147
|
end
|
|
221
148
|
|
|
222
149
|
end
|