ragie_ruby_sdk 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +291 -0
- data/Rakefile +10 -0
- data/docs/AccessTokenCredentials.md +18 -0
- data/docs/AsyncDocumentMetadataUpdate.md +18 -0
- data/docs/AudioModalityData.md +20 -0
- data/docs/AuthenticatorConfluenceConnection.md +22 -0
- data/docs/AuthenticatorDropboxConnection.md +24 -0
- data/docs/AuthenticatorGmailConnection.md +24 -0
- data/docs/AuthenticatorGoogleDriveConnection.md +24 -0
- data/docs/AuthenticatorHubspotConnection.md +26 -0
- data/docs/AuthenticatorJiraConnection.md +20 -0
- data/docs/AuthenticatorList.md +20 -0
- data/docs/AuthenticatorNotionConnection.md +26 -0
- data/docs/AuthenticatorOnedriveConnection.md +24 -0
- data/docs/AuthenticatorSalesforceConnection.md +24 -0
- data/docs/AuthenticatorSharepointConnection.md +24 -0
- data/docs/AuthenticatorSlackConnection.md +24 -0
- data/docs/AuthenticatorsApi.md +293 -0
- data/docs/BackblazeCredentials.md +24 -0
- data/docs/BaseGetAuthenticator.md +22 -0
- data/docs/BetaApi.md +363 -0
- data/docs/Body.md +22 -0
- data/docs/BodyCreateDocument.md +28 -0
- data/docs/BodyUpdateDocumentFile.md +20 -0
- data/docs/BucketData.md +22 -0
- data/docs/ConfluenceData.md +24 -0
- data/docs/Connection.md +44 -0
- data/docs/Connection1.md +106 -0
- data/docs/Connection2.md +91 -0
- data/docs/ConnectionBase.md +22 -0
- data/docs/ConnectionLimitExceededWebhook.md +22 -0
- data/docs/ConnectionLimitExceededWebhookPayload.md +24 -0
- data/docs/ConnectionLimitParams.md +18 -0
- data/docs/ConnectionList.md +20 -0
- data/docs/ConnectionStats.md +20 -0
- data/docs/ConnectionSyncFinishedWebhook.md +22 -0
- data/docs/ConnectionSyncFinishedWebhookPayload.md +24 -0
- data/docs/ConnectionSyncProgressWebhook.md +22 -0
- data/docs/ConnectionSyncProgressWebhookPayload.md +42 -0
- data/docs/ConnectionSyncStartedWebhook.md +22 -0
- data/docs/ConnectionSyncStartedWebhookPayload.md +32 -0
- data/docs/ConnectionsApi.md +790 -0
- data/docs/ConnectorSource.md +15 -0
- data/docs/ConnectorSourceTypeInfo.md +24 -0
- data/docs/CreateAuthenticatorConnection.md +28 -0
- data/docs/CreateDocumentFromUrlParams.md +28 -0
- data/docs/CreateDocumentRawParams.md +26 -0
- data/docs/CreateGoogleAuthenticator.md +28 -0
- data/docs/CreateInstructionParams.md +30 -0
- data/docs/CreatePartitionParams.md +42 -0
- data/docs/Data.md +15 -0
- data/docs/DefaultApi.md +77 -0
- data/docs/DeleteConnectionPayload.md +18 -0
- data/docs/Document.md +36 -0
- data/docs/DocumentChunk.md +26 -0
- data/docs/DocumentChunkDetail.md +28 -0
- data/docs/DocumentChunkDetailModalityData.md +79 -0
- data/docs/DocumentChunkList.md +20 -0
- data/docs/DocumentDelete.md +18 -0
- data/docs/DocumentDeleteWebhook.md +22 -0
- data/docs/DocumentDeleteWebhookPayload.md +30 -0
- data/docs/DocumentFileUpdate.md +18 -0
- data/docs/DocumentGet.md +38 -0
- data/docs/DocumentList.md +20 -0
- data/docs/DocumentMetadataUpdate.md +18 -0
- data/docs/DocumentRawUpdate.md +18 -0
- data/docs/DocumentSummary.md +20 -0
- data/docs/DocumentUpdateWebhook.md +22 -0
- data/docs/DocumentUpdateWebhookPayload.md +34 -0
- data/docs/DocumentUrlUpdate.md +18 -0
- data/docs/DocumentWithContent.md +38 -0
- data/docs/DocumentsApi.md +1221 -0
- data/docs/EnterpriseApi.md +363 -0
- data/docs/EntitiesApi.md +436 -0
- data/docs/Entity.md +30 -0
- data/docs/EntityExtractedWebhook.md +22 -0
- data/docs/EntityExtractedWebhookPayload.md +34 -0
- data/docs/EntityList.md +20 -0
- data/docs/ErrorMessage.md +18 -0
- data/docs/FolderData.md +20 -0
- data/docs/FreshdeskCredentials.md +20 -0
- data/docs/FreshdeskData.md +20 -0
- data/docs/GmailData.md +18 -0
- data/docs/GoogleFolderData.md +22 -0
- data/docs/HTTPValidationError.md +18 -0
- data/docs/HubspotData.md +30 -0
- data/docs/Instruction.md +36 -0
- data/docs/IntercomCredentials.md +22 -0
- data/docs/IntercomData.md +28 -0
- data/docs/Link.md +20 -0
- data/docs/ListConnectorSourceTypeInfo.md +18 -0
- data/docs/MediaModeParam.md +22 -0
- data/docs/MediaType.md +15 -0
- data/docs/MetadataValue.md +15 -0
- data/docs/MetadataValue1.md +53 -0
- data/docs/Mode.md +22 -0
- data/docs/Mode1.md +22 -0
- data/docs/Mode2.md +49 -0
- data/docs/Mode2OneOf.md +22 -0
- data/docs/OAuthCredentials.md +26 -0
- data/docs/OAuthRefreshTokenCredentials.md +18 -0
- data/docs/OAuthUrlCreate.md +34 -0
- data/docs/OAuthUrlResponse.md +18 -0
- data/docs/OnedriveData.md +22 -0
- data/docs/Pagination.md +20 -0
- data/docs/Partition.md +24 -0
- data/docs/PartitionDetail.md +26 -0
- data/docs/PartitionLimitExceededWebhook.md +22 -0
- data/docs/PartitionLimitExceededWebhookPayload.md +20 -0
- data/docs/PartitionLimitParams.md +40 -0
- data/docs/PartitionLimitResetWebhook.md +22 -0
- data/docs/PartitionLimitResetWebhookPayload.md +18 -0
- data/docs/PartitionLimits.md +40 -0
- data/docs/PartitionList.md +20 -0
- data/docs/PartitionStats.md +42 -0
- data/docs/PartitionStrategy.md +22 -0
- data/docs/PartitionsApi.md +363 -0
- data/docs/PatchDocumentMetadataParams.md +20 -0
- data/docs/Payload.md +84 -0
- data/docs/PublicBackblazeConnection.md +22 -0
- data/docs/PublicCreateConnection.md +28 -0
- data/docs/PublicFreshdeskConnection.md +24 -0
- data/docs/PublicGCSConnection.md +22 -0
- data/docs/PublicIntercomConnection.md +22 -0
- data/docs/PublicS3CompatibleConnection.md +22 -0
- data/docs/PublicZendeskConnection.md +22 -0
- data/docs/ResponseOK.md +18 -0
- data/docs/ResponsePatchdocumentmetadata.md +20 -0
- data/docs/Retrieval.md +18 -0
- data/docs/RetrievalsApi.md +75 -0
- data/docs/RetrieveParams.md +30 -0
- data/docs/S3CompatibleCredentials.md +24 -0
- data/docs/ScoredChunk.md +34 -0
- data/docs/SetConnectionEnabledPayload.md +20 -0
- data/docs/SharepointData.md +20 -0
- data/docs/SharepointFileData.md +22 -0
- data/docs/SharepointSiteData.md +20 -0
- data/docs/SlackData.md +20 -0
- data/docs/Source.md +15 -0
- data/docs/Status.md +15 -0
- data/docs/UpdateDocumentFromUrlParams.md +20 -0
- data/docs/UpdateDocumentRawParams.md +18 -0
- data/docs/UpdateInstructionParams.md +18 -0
- data/docs/ValidationError.md +22 -0
- data/docs/ValidationErrorLocInner.md +15 -0
- data/docs/VideoModalityData.md +20 -0
- data/docs/WordTimestamp.md +24 -0
- data/docs/ZendeskCredentials.md +22 -0
- data/docs/ZendeskData.md +18 -0
- data/git_push.sh +57 -0
- data/lib/ragie_ruby_sdk/api/authenticators_api.rb +298 -0
- data/lib/ragie_ruby_sdk/api/beta_api.rb +366 -0
- data/lib/ragie_ruby_sdk/api/connections_api.rb +777 -0
- data/lib/ragie_ruby_sdk/api/default_api.rb +90 -0
- data/lib/ragie_ruby_sdk/api/documents_api.rb +1206 -0
- data/lib/ragie_ruby_sdk/api/enterprise_api.rb +366 -0
- data/lib/ragie_ruby_sdk/api/entities_api.rb +438 -0
- data/lib/ragie_ruby_sdk/api/partitions_api.rb +361 -0
- data/lib/ragie_ruby_sdk/api/retrievals_api.rb +88 -0
- data/lib/ragie_ruby_sdk/api_client.rb +393 -0
- data/lib/ragie_ruby_sdk/api_error.rb +58 -0
- data/lib/ragie_ruby_sdk/configuration.rb +308 -0
- data/lib/ragie_ruby_sdk/models/access_token_credentials.rb +237 -0
- data/lib/ragie_ruby_sdk/models/async_document_metadata_update.rb +237 -0
- data/lib/ragie_ruby_sdk/models/audio_modality_data.rb +267 -0
- data/lib/ragie_ruby_sdk/models/authenticator_confluence_connection.rb +315 -0
- data/lib/ragie_ruby_sdk/models/authenticator_dropbox_connection.rb +340 -0
- data/lib/ragie_ruby_sdk/models/authenticator_gmail_connection.rb +340 -0
- data/lib/ragie_ruby_sdk/models/authenticator_google_drive_connection.rb +342 -0
- data/lib/ragie_ruby_sdk/models/authenticator_hubspot_connection.rb +365 -0
- data/lib/ragie_ruby_sdk/models/authenticator_jira_connection.rb +287 -0
- data/lib/ragie_ruby_sdk/models/authenticator_list.rb +265 -0
- data/lib/ragie_ruby_sdk/models/authenticator_notion_connection.rb +366 -0
- data/lib/ragie_ruby_sdk/models/authenticator_onedrive_connection.rb +340 -0
- data/lib/ragie_ruby_sdk/models/authenticator_salesforce_connection.rb +341 -0
- data/lib/ragie_ruby_sdk/models/authenticator_sharepoint_connection.rb +340 -0
- data/lib/ragie_ruby_sdk/models/authenticator_slack_connection.rb +340 -0
- data/lib/ragie_ruby_sdk/models/backblaze_credentials.rb +315 -0
- data/lib/ragie_ruby_sdk/models/base_get_authenticator.rb +290 -0
- data/lib/ragie_ruby_sdk/models/body.rb +111 -0
- data/lib/ragie_ruby_sdk/models/body_create_document.rb +292 -0
- data/lib/ragie_ruby_sdk/models/body_update_document_file.rb +250 -0
- data/lib/ragie_ruby_sdk/models/bucket_data.rb +258 -0
- data/lib/ragie_ruby_sdk/models/confluence_data.rb +315 -0
- data/lib/ragie_ruby_sdk/models/connection.rb +521 -0
- data/lib/ragie_ruby_sdk/models/connection1.rb +73 -0
- data/lib/ragie_ruby_sdk/models/connection2.rb +63 -0
- data/lib/ragie_ruby_sdk/models/connection_base.rb +274 -0
- data/lib/ragie_ruby_sdk/models/connection_limit_exceeded_webhook.rb +313 -0
- data/lib/ragie_ruby_sdk/models/connection_limit_exceeded_webhook_payload.rb +327 -0
- data/lib/ragie_ruby_sdk/models/connection_limit_params.rb +236 -0
- data/lib/ragie_ruby_sdk/models/connection_list.rb +265 -0
- data/lib/ragie_ruby_sdk/models/connection_stats.rb +263 -0
- data/lib/ragie_ruby_sdk/models/connection_sync_finished_webhook.rb +313 -0
- data/lib/ragie_ruby_sdk/models/connection_sync_finished_webhook_payload.rb +317 -0
- data/lib/ragie_ruby_sdk/models/connection_sync_progress_webhook.rb +313 -0
- data/lib/ragie_ruby_sdk/models/connection_sync_progress_webhook_payload.rb +551 -0
- data/lib/ragie_ruby_sdk/models/connection_sync_started_webhook.rb +313 -0
- data/lib/ragie_ruby_sdk/models/connection_sync_started_webhook_payload.rb +421 -0
- data/lib/ragie_ruby_sdk/models/connector_source.rb +55 -0
- data/lib/ragie_ruby_sdk/models/connector_source_type_info.rb +337 -0
- data/lib/ragie_ruby_sdk/models/create_authenticator_connection.rb +307 -0
- data/lib/ragie_ruby_sdk/models/create_document_from_url_params.rb +306 -0
- data/lib/ragie_ruby_sdk/models/create_document_raw_params.rb +279 -0
- data/lib/ragie_ruby_sdk/models/create_google_authenticator.rb +360 -0
- data/lib/ragie_ruby_sdk/models/create_instruction_params.rb +373 -0
- data/lib/ragie_ruby_sdk/models/create_partition_params.rb +537 -0
- data/lib/ragie_ruby_sdk/models/data.rb +105 -0
- data/lib/ragie_ruby_sdk/models/delete_connection_payload.rb +237 -0
- data/lib/ragie_ruby_sdk/models/document.rb +425 -0
- data/lib/ragie_ruby_sdk/models/document_chunk.rb +313 -0
- data/lib/ragie_ruby_sdk/models/document_chunk_detail.rb +323 -0
- data/lib/ragie_ruby_sdk/models/document_chunk_detail_modality_data.rb +55 -0
- data/lib/ragie_ruby_sdk/models/document_chunk_list.rb +265 -0
- data/lib/ragie_ruby_sdk/models/document_delete.rb +237 -0
- data/lib/ragie_ruby_sdk/models/document_delete_webhook.rb +313 -0
- data/lib/ragie_ruby_sdk/models/document_delete_webhook_payload.rb +353 -0
- data/lib/ragie_ruby_sdk/models/document_file_update.rb +237 -0
- data/lib/ragie_ruby_sdk/models/document_get.rb +453 -0
- data/lib/ragie_ruby_sdk/models/document_list.rb +265 -0
- data/lib/ragie_ruby_sdk/models/document_metadata_update.rb +240 -0
- data/lib/ragie_ruby_sdk/models/document_raw_update.rb +237 -0
- data/lib/ragie_ruby_sdk/models/document_summary.rb +263 -0
- data/lib/ragie_ruby_sdk/models/document_update_webhook.rb +313 -0
- data/lib/ragie_ruby_sdk/models/document_update_webhook_payload.rb +391 -0
- data/lib/ragie_ruby_sdk/models/document_url_update.rb +237 -0
- data/lib/ragie_ruby_sdk/models/document_with_content.rb +451 -0
- data/lib/ragie_ruby_sdk/models/entity.rb +381 -0
- data/lib/ragie_ruby_sdk/models/entity_extracted_webhook.rb +313 -0
- data/lib/ragie_ruby_sdk/models/entity_extracted_webhook_payload.rb +421 -0
- data/lib/ragie_ruby_sdk/models/entity_list.rb +265 -0
- data/lib/ragie_ruby_sdk/models/error_message.rb +237 -0
- data/lib/ragie_ruby_sdk/models/folder_data.rb +263 -0
- data/lib/ragie_ruby_sdk/models/freshdesk_credentials.rb +263 -0
- data/lib/ragie_ruby_sdk/models/freshdesk_data.rb +263 -0
- data/lib/ragie_ruby_sdk/models/gmail_data.rb +221 -0
- data/lib/ragie_ruby_sdk/models/google_folder_data.rb +289 -0
- data/lib/ragie_ruby_sdk/models/http_validation_error.rb +222 -0
- data/lib/ragie_ruby_sdk/models/hubspot_data.rb +393 -0
- data/lib/ragie_ruby_sdk/models/instruction.rb +451 -0
- data/lib/ragie_ruby_sdk/models/intercom_credentials.rb +290 -0
- data/lib/ragie_ruby_sdk/models/intercom_data.rb +367 -0
- data/lib/ragie_ruby_sdk/models/link.rb +263 -0
- data/lib/ragie_ruby_sdk/models/list_connector_source_type_info.rb +239 -0
- data/lib/ragie_ruby_sdk/models/media_mode_param.rb +287 -0
- data/lib/ragie_ruby_sdk/models/media_type.rb +104 -0
- data/lib/ragie_ruby_sdk/models/metadata_value.rb +106 -0
- data/lib/ragie_ruby_sdk/models/metadata_value1.rb +107 -0
- data/lib/ragie_ruby_sdk/models/mode.rb +105 -0
- data/lib/ragie_ruby_sdk/models/mode1.rb +104 -0
- data/lib/ragie_ruby_sdk/models/mode2.rb +106 -0
- data/lib/ragie_ruby_sdk/models/mode2_one_of.rb +287 -0
- data/lib/ragie_ruby_sdk/models/o_auth_credentials.rb +350 -0
- data/lib/ragie_ruby_sdk/models/o_auth_refresh_token_credentials.rb +237 -0
- data/lib/ragie_ruby_sdk/models/o_auth_url_create.rb +370 -0
- data/lib/ragie_ruby_sdk/models/o_auth_url_response.rb +237 -0
- data/lib/ragie_ruby_sdk/models/onedrive_data.rb +289 -0
- data/lib/ragie_ruby_sdk/models/pagination.rb +247 -0
- data/lib/ragie_ruby_sdk/models/partition.rb +299 -0
- data/lib/ragie_ruby_sdk/models/partition_detail.rb +325 -0
- data/lib/ragie_ruby_sdk/models/partition_limit_exceeded_webhook.rb +313 -0
- data/lib/ragie_ruby_sdk/models/partition_limit_exceeded_webhook_payload.rb +287 -0
- data/lib/ragie_ruby_sdk/models/partition_limit_params.rb +511 -0
- data/lib/ragie_ruby_sdk/models/partition_limit_reset_webhook.rb +313 -0
- data/lib/ragie_ruby_sdk/models/partition_limit_reset_webhook_payload.rb +237 -0
- data/lib/ragie_ruby_sdk/models/partition_limits.rb +511 -0
- data/lib/ragie_ruby_sdk/models/partition_list.rb +265 -0
- data/lib/ragie_ruby_sdk/models/partition_stats.rb +562 -0
- data/lib/ragie_ruby_sdk/models/partition_strategy.rb +104 -0
- data/lib/ragie_ruby_sdk/models/patch_document_metadata_params.rb +252 -0
- data/lib/ragie_ruby_sdk/models/payload.rb +60 -0
- data/lib/ragie_ruby_sdk/models/public_backblaze_connection.rb +313 -0
- data/lib/ragie_ruby_sdk/models/public_create_connection.rb +307 -0
- data/lib/ragie_ruby_sdk/models/public_freshdesk_connection.rb +340 -0
- data/lib/ragie_ruby_sdk/models/public_gcs_connection.rb +315 -0
- data/lib/ragie_ruby_sdk/models/public_intercom_connection.rb +313 -0
- data/lib/ragie_ruby_sdk/models/public_s3_compatible_connection.rb +313 -0
- data/lib/ragie_ruby_sdk/models/public_zendesk_connection.rb +313 -0
- data/lib/ragie_ruby_sdk/models/response_ok.rb +222 -0
- data/lib/ragie_ruby_sdk/models/response_patchdocumentmetadata.rb +104 -0
- data/lib/ragie_ruby_sdk/models/retrieval.rb +239 -0
- data/lib/ragie_ruby_sdk/models/retrieve_params.rb +305 -0
- data/lib/ragie_ruby_sdk/models/s3_compatible_credentials.rb +299 -0
- data/lib/ragie_ruby_sdk/models/scored_chunk.rb +434 -0
- data/lib/ragie_ruby_sdk/models/set_connection_enabled_payload.rb +281 -0
- data/lib/ragie_ruby_sdk/models/sharepoint_data.rb +265 -0
- data/lib/ragie_ruby_sdk/models/sharepoint_file_data.rb +313 -0
- data/lib/ragie_ruby_sdk/models/sharepoint_site_data.rb +263 -0
- data/lib/ragie_ruby_sdk/models/slack_data.rb +263 -0
- data/lib/ragie_ruby_sdk/models/source.rb +105 -0
- data/lib/ragie_ruby_sdk/models/status.rb +103 -0
- data/lib/ragie_ruby_sdk/models/update_document_from_url_params.rb +247 -0
- data/lib/ragie_ruby_sdk/models/update_document_raw_params.rb +237 -0
- data/lib/ragie_ruby_sdk/models/update_instruction_params.rb +238 -0
- data/lib/ragie_ruby_sdk/models/validation_error.rb +291 -0
- data/lib/ragie_ruby_sdk/models/validation_error_loc_inner.rb +104 -0
- data/lib/ragie_ruby_sdk/models/video_modality_data.rb +267 -0
- data/lib/ragie_ruby_sdk/models/word_timestamp.rb +315 -0
- data/lib/ragie_ruby_sdk/models/zendesk_credentials.rb +289 -0
- data/lib/ragie_ruby_sdk/models/zendesk_data.rb +237 -0
- data/lib/ragie_ruby_sdk/version.rb +15 -0
- data/lib/ragie_ruby_sdk.rb +185 -0
- data/ragie_ruby_sdk.gemspec +39 -0
- data/spec/api/authenticators_api_spec.rb +85 -0
- data/spec/api/beta_api_spec.rb +97 -0
- data/spec/api/connections_api_spec.rb +173 -0
- data/spec/api/default_api_spec.rb +47 -0
- data/spec/api/documents_api_spec.rb +260 -0
- data/spec/api/enterprise_api_spec.rb +97 -0
- data/spec/api/entities_api_spec.rb +110 -0
- data/spec/api/partitions_api_spec.rb +97 -0
- data/spec/api/retrievals_api_spec.rb +46 -0
- data/spec/models/access_token_credentials_spec.rb +36 -0
- data/spec/models/async_document_metadata_update_spec.rb +36 -0
- data/spec/models/audio_modality_data_spec.rb +46 -0
- data/spec/models/authenticator_confluence_connection_spec.rb +52 -0
- data/spec/models/authenticator_dropbox_connection_spec.rb +58 -0
- data/spec/models/authenticator_gmail_connection_spec.rb +58 -0
- data/spec/models/authenticator_google_drive_connection_spec.rb +58 -0
- data/spec/models/authenticator_hubspot_connection_spec.rb +64 -0
- data/spec/models/authenticator_jira_connection_spec.rb +46 -0
- data/spec/models/authenticator_list_spec.rb +42 -0
- data/spec/models/authenticator_notion_connection_spec.rb +64 -0
- data/spec/models/authenticator_onedrive_connection_spec.rb +58 -0
- data/spec/models/authenticator_salesforce_connection_spec.rb +58 -0
- data/spec/models/authenticator_sharepoint_connection_spec.rb +58 -0
- data/spec/models/authenticator_slack_connection_spec.rb +58 -0
- data/spec/models/backblaze_credentials_spec.rb +54 -0
- data/spec/models/base_get_authenticator_spec.rb +48 -0
- data/spec/models/body_create_document_spec.rb +66 -0
- data/spec/models/body_spec.rb +21 -0
- data/spec/models/body_update_document_file_spec.rb +42 -0
- data/spec/models/bucket_data_spec.rb +48 -0
- data/spec/models/confluence_data_spec.rb +54 -0
- data/spec/models/connection1_spec.rb +44 -0
- data/spec/models/connection2_spec.rb +44 -0
- data/spec/models/connection_base_spec.rb +48 -0
- data/spec/models/connection_limit_exceeded_webhook_payload_spec.rb +58 -0
- data/spec/models/connection_limit_exceeded_webhook_spec.rb +52 -0
- data/spec/models/connection_limit_params_spec.rb +36 -0
- data/spec/models/connection_list_spec.rb +42 -0
- data/spec/models/connection_spec.rb +118 -0
- data/spec/models/connection_stats_spec.rb +42 -0
- data/spec/models/connection_sync_finished_webhook_payload_spec.rb +54 -0
- data/spec/models/connection_sync_finished_webhook_spec.rb +52 -0
- data/spec/models/connection_sync_progress_webhook_payload_spec.rb +108 -0
- data/spec/models/connection_sync_progress_webhook_spec.rb +52 -0
- data/spec/models/connection_sync_started_webhook_payload_spec.rb +78 -0
- data/spec/models/connection_sync_started_webhook_spec.rb +52 -0
- data/spec/models/connector_source_spec.rb +30 -0
- data/spec/models/connector_source_type_info_spec.rb +54 -0
- data/spec/models/create_authenticator_connection_spec.rb +66 -0
- data/spec/models/create_document_from_url_params_spec.rb +66 -0
- data/spec/models/create_document_raw_params_spec.rb +60 -0
- data/spec/models/create_google_authenticator_spec.rb +70 -0
- data/spec/models/create_instruction_params_spec.rb +76 -0
- data/spec/models/create_partition_params_spec.rb +108 -0
- data/spec/models/data_spec.rb +21 -0
- data/spec/models/delete_connection_payload_spec.rb +36 -0
- data/spec/models/document_chunk_detail_modality_data_spec.rb +44 -0
- data/spec/models/document_chunk_detail_spec.rb +66 -0
- data/spec/models/document_chunk_list_spec.rb +42 -0
- data/spec/models/document_chunk_spec.rb +60 -0
- data/spec/models/document_delete_spec.rb +36 -0
- data/spec/models/document_delete_webhook_payload_spec.rb +72 -0
- data/spec/models/document_delete_webhook_spec.rb +52 -0
- data/spec/models/document_file_update_spec.rb +36 -0
- data/spec/models/document_get_spec.rb +96 -0
- data/spec/models/document_list_spec.rb +42 -0
- data/spec/models/document_metadata_update_spec.rb +36 -0
- data/spec/models/document_raw_update_spec.rb +36 -0
- data/spec/models/document_spec.rb +90 -0
- data/spec/models/document_summary_spec.rb +42 -0
- data/spec/models/document_update_webhook_payload_spec.rb +84 -0
- data/spec/models/document_update_webhook_spec.rb +52 -0
- data/spec/models/document_url_update_spec.rb +36 -0
- data/spec/models/document_with_content_spec.rb +96 -0
- data/spec/models/entity_extracted_webhook_payload_spec.rb +84 -0
- data/spec/models/entity_extracted_webhook_spec.rb +52 -0
- data/spec/models/entity_list_spec.rb +42 -0
- data/spec/models/entity_spec.rb +72 -0
- data/spec/models/error_message_spec.rb +36 -0
- data/spec/models/folder_data_spec.rb +42 -0
- data/spec/models/freshdesk_credentials_spec.rb +42 -0
- data/spec/models/freshdesk_data_spec.rb +42 -0
- data/spec/models/gmail_data_spec.rb +36 -0
- data/spec/models/google_folder_data_spec.rb +48 -0
- data/spec/models/http_validation_error_spec.rb +36 -0
- data/spec/models/hubspot_data_spec.rb +72 -0
- data/spec/models/instruction_spec.rb +94 -0
- data/spec/models/intercom_credentials_spec.rb +48 -0
- data/spec/models/intercom_data_spec.rb +66 -0
- data/spec/models/link_spec.rb +42 -0
- data/spec/models/list_connector_source_type_info_spec.rb +36 -0
- data/spec/models/media_mode_param_spec.rb +56 -0
- data/spec/models/media_type_spec.rb +21 -0
- data/spec/models/metadata_value1_spec.rb +32 -0
- data/spec/models/metadata_value_spec.rb +21 -0
- data/spec/models/mode1_spec.rb +21 -0
- data/spec/models/mode2_one_of_spec.rb +56 -0
- data/spec/models/mode2_spec.rb +32 -0
- data/spec/models/mode_spec.rb +21 -0
- data/spec/models/o_auth_credentials_spec.rb +64 -0
- data/spec/models/o_auth_refresh_token_credentials_spec.rb +36 -0
- data/spec/models/o_auth_url_create_spec.rb +88 -0
- data/spec/models/o_auth_url_response_spec.rb +36 -0
- data/spec/models/onedrive_data_spec.rb +48 -0
- data/spec/models/pagination_spec.rb +42 -0
- data/spec/models/partition_detail_spec.rb +60 -0
- data/spec/models/partition_limit_exceeded_webhook_payload_spec.rb +46 -0
- data/spec/models/partition_limit_exceeded_webhook_spec.rb +52 -0
- data/spec/models/partition_limit_params_spec.rb +102 -0
- data/spec/models/partition_limit_reset_webhook_payload_spec.rb +36 -0
- data/spec/models/partition_limit_reset_webhook_spec.rb +52 -0
- data/spec/models/partition_limits_spec.rb +102 -0
- data/spec/models/partition_list_spec.rb +42 -0
- data/spec/models/partition_spec.rb +54 -0
- data/spec/models/partition_stats_spec.rb +108 -0
- data/spec/models/partition_strategy_spec.rb +21 -0
- data/spec/models/patch_document_metadata_params_spec.rb +42 -0
- data/spec/models/payload_spec.rb +44 -0
- data/spec/models/public_backblaze_connection_spec.rb +52 -0
- data/spec/models/public_create_connection_spec.rb +66 -0
- data/spec/models/public_freshdesk_connection_spec.rb +58 -0
- data/spec/models/public_gcs_connection_spec.rb +52 -0
- data/spec/models/public_intercom_connection_spec.rb +52 -0
- data/spec/models/public_s3_compatible_connection_spec.rb +52 -0
- data/spec/models/public_zendesk_connection_spec.rb +52 -0
- data/spec/models/response_ok_spec.rb +36 -0
- data/spec/models/response_patchdocumentmetadata_spec.rb +21 -0
- data/spec/models/retrieval_spec.rb +36 -0
- data/spec/models/retrieve_params_spec.rb +72 -0
- data/spec/models/s3_compatible_credentials_spec.rb +54 -0
- data/spec/models/scored_chunk_spec.rb +84 -0
- data/spec/models/set_connection_enabled_payload_spec.rb +46 -0
- data/spec/models/sharepoint_data_spec.rb +42 -0
- data/spec/models/sharepoint_file_data_spec.rb +52 -0
- data/spec/models/sharepoint_site_data_spec.rb +42 -0
- data/spec/models/slack_data_spec.rb +42 -0
- data/spec/models/source_spec.rb +21 -0
- data/spec/models/status_spec.rb +21 -0
- data/spec/models/update_document_from_url_params_spec.rb +42 -0
- data/spec/models/update_document_raw_params_spec.rb +36 -0
- data/spec/models/update_instruction_params_spec.rb +36 -0
- data/spec/models/validation_error_loc_inner_spec.rb +21 -0
- data/spec/models/validation_error_spec.rb +48 -0
- data/spec/models/video_modality_data_spec.rb +46 -0
- data/spec/models/word_timestamp_spec.rb +54 -0
- data/spec/models/zendesk_credentials_spec.rb +48 -0
- data/spec/models/zendesk_data_spec.rb +36 -0
- data/spec/spec_helper.rb +111 -0
- metadata +680 -0
|
@@ -0,0 +1,292 @@
|
|
|
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.14.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module RagieRubySdk
|
|
17
|
+
class BodyCreateDocument
|
|
18
|
+
# Partition strategy for the document. Different strategies exist for textual, audio and video file types and you can set the strategy you want for each file type, or just for textual types. For textual documents the options are `'hi_res'` or `'fast'`. When set to `'hi_res'`, images and tables will be extracted from the document. `'fast'` will only extract text. `'fast'` may be up to 20x faster than `'hi_res'`. `hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. Images will always be processed in `hi_res`. If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. For audio files, the options are true or false. True if you want to process audio, false otherwise. For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. `'audio_only'` will extract just the audio part of the video. `'video_only'` will similarly just extract the video part, ignoring audio. `'audio_video'` will extract both audio and video. To process all media types at the highest quality, use `'all'`. When you specify audio or video stategies, the format must be a JSON object. In this case, textual documents are denoted by the key \"static\". If you omit a key, that document type won't be processd. See examples below. Examples Textual documents only \"fast\" Video documents only { \"video\": \"audio_video\" } Specify multiple document types { \"static\": \"hi_res\", \"audio\": true, \"video\": \"video_only\" } Specify only textual or audio document types { \"static\": \"fast\", \"audio\": true } Highest quality processing for all media types \"all\"
|
|
19
|
+
attr_accessor :mode
|
|
20
|
+
|
|
21
|
+
# Metadata for the document. Keys must be strings. Values may be strings, numbers, booleans, or lists of strings. Numbers may be integers or floating point and will be converted to 64 bit floating point. 1000 total values are allowed. Each item in an array counts towards the total. The following keys are reserved for internal use: `document_id`, `document_type`, `document_source`, `document_name`, `document_uploaded_at`, `start_time`, `end_time`.
|
|
22
|
+
attr_accessor :metadata
|
|
23
|
+
|
|
24
|
+
# The binary file to upload, extract, and index for retrieval. The following file types are supported: Plain Text: `.eml` `.html` `.json` `.md` `.msg` `.rst` `.rtf` `.txt` `.xml` Images: `.png` `.webp` `.jpg` `.jpeg` `.tiff` `.bmp` `.heic` Documents: `.csv` `.doc` `.docx` `.epub` `.epub+zip` `.odt` `.pdf` `.ppt` `.pptx` `.tsv` `.xlsx` `.xls`.
|
|
25
|
+
attr_accessor :file
|
|
26
|
+
|
|
27
|
+
# An optional identifier for the document. A common value might be an id in an external system or the URL where the source file may be found.
|
|
28
|
+
attr_accessor :external_id
|
|
29
|
+
|
|
30
|
+
# An optional partition identifier. Documents can be scoped to a partition. Partitions must be lowercase alphanumeric and may only include the special characters `_` and `-`. A partition is created any time a document is created.
|
|
31
|
+
attr_accessor :partition
|
|
32
|
+
|
|
33
|
+
# An optional name for the document. If set, the document will have this name. Otherwise it will default to the file's name.
|
|
34
|
+
attr_accessor :name
|
|
35
|
+
|
|
36
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
37
|
+
def self.attribute_map
|
|
38
|
+
{
|
|
39
|
+
:'mode' => :'mode',
|
|
40
|
+
:'metadata' => :'metadata',
|
|
41
|
+
:'file' => :'file',
|
|
42
|
+
:'external_id' => :'external_id',
|
|
43
|
+
:'partition' => :'partition',
|
|
44
|
+
:'name' => :'name'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Returns attribute mapping this model knows about
|
|
49
|
+
def self.acceptable_attribute_map
|
|
50
|
+
attribute_map
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Returns all the JSON keys this model knows about
|
|
54
|
+
def self.acceptable_attributes
|
|
55
|
+
acceptable_attribute_map.values
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Attribute type mapping.
|
|
59
|
+
def self.openapi_types
|
|
60
|
+
{
|
|
61
|
+
:'mode' => :'String',
|
|
62
|
+
:'metadata' => :'String',
|
|
63
|
+
:'file' => :'File',
|
|
64
|
+
:'external_id' => :'String',
|
|
65
|
+
:'partition' => :'String',
|
|
66
|
+
:'name' => :'String'
|
|
67
|
+
}
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# List of attributes with nullable: true
|
|
71
|
+
def self.openapi_nullable
|
|
72
|
+
Set.new([
|
|
73
|
+
])
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Initializes the object
|
|
77
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
78
|
+
def initialize(attributes = {})
|
|
79
|
+
if (!attributes.is_a?(Hash))
|
|
80
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `RagieRubySdk::BodyCreateDocument` initialize method"
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
84
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
85
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
86
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
87
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `RagieRubySdk::BodyCreateDocument`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
88
|
+
end
|
|
89
|
+
h[k.to_sym] = v
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
if attributes.key?(:'mode')
|
|
93
|
+
self.mode = attributes[:'mode']
|
|
94
|
+
else
|
|
95
|
+
self.mode = 'fast'
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
if attributes.key?(:'metadata')
|
|
99
|
+
self.metadata = attributes[:'metadata']
|
|
100
|
+
else
|
|
101
|
+
self.metadata = '{}'
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if attributes.key?(:'file')
|
|
105
|
+
self.file = attributes[:'file']
|
|
106
|
+
else
|
|
107
|
+
self.file = nil
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if attributes.key?(:'external_id')
|
|
111
|
+
self.external_id = attributes[:'external_id']
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if attributes.key?(:'partition')
|
|
115
|
+
self.partition = attributes[:'partition']
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
if attributes.key?(:'name')
|
|
119
|
+
self.name = attributes[:'name']
|
|
120
|
+
end
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
124
|
+
# @return Array for valid properties with the reasons
|
|
125
|
+
def list_invalid_properties
|
|
126
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
127
|
+
invalid_properties = Array.new
|
|
128
|
+
if @file.nil?
|
|
129
|
+
invalid_properties.push('invalid value for "file", file cannot be nil.')
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
invalid_properties
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Check to see if the all the properties in the model are valid
|
|
136
|
+
# @return true if the model is valid
|
|
137
|
+
def valid?
|
|
138
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
139
|
+
return false if @file.nil?
|
|
140
|
+
true
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Custom attribute writer method with validation
|
|
144
|
+
# @param [Object] file Value to be assigned
|
|
145
|
+
def file=(file)
|
|
146
|
+
if file.nil?
|
|
147
|
+
fail ArgumentError, 'file cannot be nil'
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
@file = file
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Checks equality by comparing each attribute.
|
|
154
|
+
# @param [Object] Object to be compared
|
|
155
|
+
def ==(o)
|
|
156
|
+
return true if self.equal?(o)
|
|
157
|
+
self.class == o.class &&
|
|
158
|
+
mode == o.mode &&
|
|
159
|
+
metadata == o.metadata &&
|
|
160
|
+
file == o.file &&
|
|
161
|
+
external_id == o.external_id &&
|
|
162
|
+
partition == o.partition &&
|
|
163
|
+
name == o.name
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# @see the `==` method
|
|
167
|
+
# @param [Object] Object to be compared
|
|
168
|
+
def eql?(o)
|
|
169
|
+
self == o
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Calculates hash code according to all attributes.
|
|
173
|
+
# @return [Integer] Hash code
|
|
174
|
+
def hash
|
|
175
|
+
[mode, metadata, file, external_id, partition, name].hash
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Builds the object from hash
|
|
179
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
180
|
+
# @return [Object] Returns the model itself
|
|
181
|
+
def self.build_from_hash(attributes)
|
|
182
|
+
return nil unless attributes.is_a?(Hash)
|
|
183
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
184
|
+
transformed_hash = {}
|
|
185
|
+
openapi_types.each_pair do |key, type|
|
|
186
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
187
|
+
transformed_hash["#{key}"] = nil
|
|
188
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
189
|
+
# check to ensure the input is an array given that the attribute
|
|
190
|
+
# is documented as an array but the input is not
|
|
191
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
192
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
193
|
+
end
|
|
194
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
195
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
196
|
+
end
|
|
197
|
+
end
|
|
198
|
+
new(transformed_hash)
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Deserializes the data based on type
|
|
202
|
+
# @param string type Data type
|
|
203
|
+
# @param string value Value to be deserialized
|
|
204
|
+
# @return [Object] Deserialized data
|
|
205
|
+
def self._deserialize(type, value)
|
|
206
|
+
case type.to_sym
|
|
207
|
+
when :Time
|
|
208
|
+
Time.parse(value)
|
|
209
|
+
when :Date
|
|
210
|
+
Date.parse(value)
|
|
211
|
+
when :String
|
|
212
|
+
value.to_s
|
|
213
|
+
when :Integer
|
|
214
|
+
value.to_i
|
|
215
|
+
when :Float
|
|
216
|
+
value.to_f
|
|
217
|
+
when :Boolean
|
|
218
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
219
|
+
true
|
|
220
|
+
else
|
|
221
|
+
false
|
|
222
|
+
end
|
|
223
|
+
when :Object
|
|
224
|
+
# generic object (usually a Hash), return directly
|
|
225
|
+
value
|
|
226
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
227
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
228
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
229
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
230
|
+
k_type = Regexp.last_match[:k_type]
|
|
231
|
+
v_type = Regexp.last_match[:v_type]
|
|
232
|
+
{}.tap do |hash|
|
|
233
|
+
value.each do |k, v|
|
|
234
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
235
|
+
end
|
|
236
|
+
end
|
|
237
|
+
else # model
|
|
238
|
+
# models (e.g. Pet) or oneOf
|
|
239
|
+
klass = RagieRubySdk.const_get(type)
|
|
240
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
241
|
+
end
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
# Returns the string representation of the object
|
|
245
|
+
# @return [String] String presentation of the object
|
|
246
|
+
def to_s
|
|
247
|
+
to_hash.to_s
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
251
|
+
# @return [Hash] Returns the object in the form of hash
|
|
252
|
+
def to_body
|
|
253
|
+
to_hash
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
# Returns the object in the form of hash
|
|
257
|
+
# @return [Hash] Returns the object in the form of hash
|
|
258
|
+
def to_hash
|
|
259
|
+
hash = {}
|
|
260
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
261
|
+
value = self.send(attr)
|
|
262
|
+
if value.nil?
|
|
263
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
264
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
hash[param] = _to_hash(value)
|
|
268
|
+
end
|
|
269
|
+
hash
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
# Outputs non-array value in the form of hash
|
|
273
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
274
|
+
# @param [Object] value Any valid value
|
|
275
|
+
# @return [Hash] Returns the value in the form of hash
|
|
276
|
+
def _to_hash(value)
|
|
277
|
+
if value.is_a?(Array)
|
|
278
|
+
value.compact.map { |v| _to_hash(v) }
|
|
279
|
+
elsif value.is_a?(Hash)
|
|
280
|
+
{}.tap do |hash|
|
|
281
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
282
|
+
end
|
|
283
|
+
elsif value.respond_to? :to_hash
|
|
284
|
+
value.to_hash
|
|
285
|
+
else
|
|
286
|
+
value
|
|
287
|
+
end
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
end
|
|
@@ -0,0 +1,250 @@
|
|
|
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.14.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module RagieRubySdk
|
|
17
|
+
class BodyUpdateDocumentFile
|
|
18
|
+
# Partition strategy for the document. Different strategies exist for textual, audio and video file types and you can set the strategy you want for each file type, or just for textual types. For textual documents the options are `'hi_res'` or `'fast'`. When set to `'hi_res'`, images and tables will be extracted from the document. `'fast'` will only extract text. `'fast'` may be up to 20x faster than `'hi_res'`. `hi_res` is only applicable for Word documents, PDFs, Images, and PowerPoints. Images will always be processed in `hi_res`. If `hi_res` is set for an unsupported document type, it will be processed and billed in `fast` mode. For audio files, the options are true or false. True if you want to process audio, false otherwise. For video files, the options are `'audio_only'`, `'video_only'`, `'audio_video'`. `'audio_only'` will extract just the audio part of the video. `'video_only'` will similarly just extract the video part, ignoring audio. `'audio_video'` will extract both audio and video. To process all media types at the highest quality, use `'all'`. When you specify audio or video stategies, the format must be a JSON object. In this case, textual documents are denoted by the key \"static\". If you omit a key, that document type won't be processd. See examples below. Examples Textual documents only \"fast\" Video documents only { \"video\": \"audio_video\" } Specify multiple document types { \"static\": \"hi_res\", \"audio\": true, \"video\": \"video_only\" } Specify only textual or audio document types { \"static\": \"fast\", \"audio\": true } Highest quality processing for all media types \"all\"
|
|
19
|
+
attr_accessor :mode
|
|
20
|
+
|
|
21
|
+
# The binary file to upload, extract, and index for retrieval. The following file types are supported: Plain Text: `.eml` `.html` `.json` `.md` `.msg` `.rst` `.rtf` `.txt` `.xml` Images: `.png` `.webp` `.jpg` `.jpeg` `.tiff` `.bmp` `.heic` Documents: `.csv` `.doc` `.docx` `.epub` `.epub+zip` `.odt` `.pdf` `.ppt` `.pptx` `.tsv` `.xlsx` `.xls`.
|
|
22
|
+
attr_accessor :file
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'mode' => :'mode',
|
|
28
|
+
:'file' => :'file'
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns attribute mapping this model knows about
|
|
33
|
+
def self.acceptable_attribute_map
|
|
34
|
+
attribute_map
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Returns all the JSON keys this model knows about
|
|
38
|
+
def self.acceptable_attributes
|
|
39
|
+
acceptable_attribute_map.values
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Attribute type mapping.
|
|
43
|
+
def self.openapi_types
|
|
44
|
+
{
|
|
45
|
+
:'mode' => :'String',
|
|
46
|
+
:'file' => :'File'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# List of attributes with nullable: true
|
|
51
|
+
def self.openapi_nullable
|
|
52
|
+
Set.new([
|
|
53
|
+
])
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Initializes the object
|
|
57
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
58
|
+
def initialize(attributes = {})
|
|
59
|
+
if (!attributes.is_a?(Hash))
|
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `RagieRubySdk::BodyUpdateDocumentFile` initialize method"
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
64
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
66
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `RagieRubySdk::BodyUpdateDocumentFile`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
68
|
+
end
|
|
69
|
+
h[k.to_sym] = v
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if attributes.key?(:'mode')
|
|
73
|
+
self.mode = attributes[:'mode']
|
|
74
|
+
else
|
|
75
|
+
self.mode = 'fast'
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'file')
|
|
79
|
+
self.file = attributes[:'file']
|
|
80
|
+
else
|
|
81
|
+
self.file = nil
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
86
|
+
# @return Array for valid properties with the reasons
|
|
87
|
+
def list_invalid_properties
|
|
88
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
89
|
+
invalid_properties = Array.new
|
|
90
|
+
if @file.nil?
|
|
91
|
+
invalid_properties.push('invalid value for "file", file cannot be nil.')
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
invalid_properties
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Check to see if the all the properties in the model are valid
|
|
98
|
+
# @return true if the model is valid
|
|
99
|
+
def valid?
|
|
100
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
101
|
+
return false if @file.nil?
|
|
102
|
+
true
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Custom attribute writer method with validation
|
|
106
|
+
# @param [Object] file Value to be assigned
|
|
107
|
+
def file=(file)
|
|
108
|
+
if file.nil?
|
|
109
|
+
fail ArgumentError, 'file cannot be nil'
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
@file = file
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Checks equality by comparing each attribute.
|
|
116
|
+
# @param [Object] Object to be compared
|
|
117
|
+
def ==(o)
|
|
118
|
+
return true if self.equal?(o)
|
|
119
|
+
self.class == o.class &&
|
|
120
|
+
mode == o.mode &&
|
|
121
|
+
file == o.file
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# @see the `==` method
|
|
125
|
+
# @param [Object] Object to be compared
|
|
126
|
+
def eql?(o)
|
|
127
|
+
self == o
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Calculates hash code according to all attributes.
|
|
131
|
+
# @return [Integer] Hash code
|
|
132
|
+
def hash
|
|
133
|
+
[mode, file].hash
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Builds the object from hash
|
|
137
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
138
|
+
# @return [Object] Returns the model itself
|
|
139
|
+
def self.build_from_hash(attributes)
|
|
140
|
+
return nil unless attributes.is_a?(Hash)
|
|
141
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
142
|
+
transformed_hash = {}
|
|
143
|
+
openapi_types.each_pair do |key, type|
|
|
144
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
145
|
+
transformed_hash["#{key}"] = nil
|
|
146
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
147
|
+
# check to ensure the input is an array given that the attribute
|
|
148
|
+
# is documented as an array but the input is not
|
|
149
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
150
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
151
|
+
end
|
|
152
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
153
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
new(transformed_hash)
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Deserializes the data based on type
|
|
160
|
+
# @param string type Data type
|
|
161
|
+
# @param string value Value to be deserialized
|
|
162
|
+
# @return [Object] Deserialized data
|
|
163
|
+
def self._deserialize(type, value)
|
|
164
|
+
case type.to_sym
|
|
165
|
+
when :Time
|
|
166
|
+
Time.parse(value)
|
|
167
|
+
when :Date
|
|
168
|
+
Date.parse(value)
|
|
169
|
+
when :String
|
|
170
|
+
value.to_s
|
|
171
|
+
when :Integer
|
|
172
|
+
value.to_i
|
|
173
|
+
when :Float
|
|
174
|
+
value.to_f
|
|
175
|
+
when :Boolean
|
|
176
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
177
|
+
true
|
|
178
|
+
else
|
|
179
|
+
false
|
|
180
|
+
end
|
|
181
|
+
when :Object
|
|
182
|
+
# generic object (usually a Hash), return directly
|
|
183
|
+
value
|
|
184
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
185
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
186
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
187
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
188
|
+
k_type = Regexp.last_match[:k_type]
|
|
189
|
+
v_type = Regexp.last_match[:v_type]
|
|
190
|
+
{}.tap do |hash|
|
|
191
|
+
value.each do |k, v|
|
|
192
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
193
|
+
end
|
|
194
|
+
end
|
|
195
|
+
else # model
|
|
196
|
+
# models (e.g. Pet) or oneOf
|
|
197
|
+
klass = RagieRubySdk.const_get(type)
|
|
198
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
199
|
+
end
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Returns the string representation of the object
|
|
203
|
+
# @return [String] String presentation of the object
|
|
204
|
+
def to_s
|
|
205
|
+
to_hash.to_s
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
209
|
+
# @return [Hash] Returns the object in the form of hash
|
|
210
|
+
def to_body
|
|
211
|
+
to_hash
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# Returns the object in the form of hash
|
|
215
|
+
# @return [Hash] Returns the object in the form of hash
|
|
216
|
+
def to_hash
|
|
217
|
+
hash = {}
|
|
218
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
219
|
+
value = self.send(attr)
|
|
220
|
+
if value.nil?
|
|
221
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
222
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
hash[param] = _to_hash(value)
|
|
226
|
+
end
|
|
227
|
+
hash
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
# Outputs non-array value in the form of hash
|
|
231
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
232
|
+
# @param [Object] value Any valid value
|
|
233
|
+
# @return [Hash] Returns the value in the form of hash
|
|
234
|
+
def _to_hash(value)
|
|
235
|
+
if value.is_a?(Array)
|
|
236
|
+
value.compact.map { |v| _to_hash(v) }
|
|
237
|
+
elsif value.is_a?(Hash)
|
|
238
|
+
{}.tap do |hash|
|
|
239
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
240
|
+
end
|
|
241
|
+
elsif value.respond_to? :to_hash
|
|
242
|
+
value.to_hash
|
|
243
|
+
else
|
|
244
|
+
value
|
|
245
|
+
end
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
end
|