oci-generativeaiagent 2.95.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.
- package/LICENSE.txt +89 -0
- package/NOTICE.txt +1 -0
- package/README.md +22 -0
- package/THIRD_PARTY_LICENSES.txt +576 -0
- package/index.d.ts +34 -0
- package/index.js +57 -0
- package/index.js.map +1 -0
- package/lib/client.d.ts +504 -0
- package/lib/client.js +2486 -0
- package/lib/client.js.map +1 -0
- package/lib/generativeaiagent-waiter.d.ts +80 -0
- package/lib/generativeaiagent-waiter.js +136 -0
- package/lib/generativeaiagent-waiter.js.map +1 -0
- package/lib/model/action-type.d.ts +44 -0
- package/lib/model/action-type.js +55 -0
- package/lib/model/action-type.js.map +1 -0
- package/lib/model/agent-collection.d.ts +41 -0
- package/lib/model/agent-collection.js +73 -0
- package/lib/model/agent-collection.js.map +1 -0
- package/lib/model/agent-endpoint-collection.d.ts +41 -0
- package/lib/model/agent-endpoint-collection.js +73 -0
- package/lib/model/agent-endpoint-collection.js.map +1 -0
- package/lib/model/agent-endpoint-summary.d.ts +128 -0
- package/lib/model/agent-endpoint-summary.js +75 -0
- package/lib/model/agent-endpoint-summary.js.map +1 -0
- package/lib/model/agent-endpoint.d.ts +143 -0
- package/lib/model/agent-endpoint.js +89 -0
- package/lib/model/agent-endpoint.js.map +1 -0
- package/lib/model/agent-summary.d.ts +117 -0
- package/lib/model/agent-summary.js +41 -0
- package/lib/model/agent-summary.js.map +1 -0
- package/lib/model/agent.d.ts +132 -0
- package/lib/model/agent.js +55 -0
- package/lib/model/agent.js.map +1 -0
- package/lib/model/basic-auth-secret.d.ts +43 -0
- package/lib/model/basic-auth-secret.js +64 -0
- package/lib/model/basic-auth-secret.js.map +1 -0
- package/lib/model/change-agent-compartment-details.d.ts +41 -0
- package/lib/model/change-agent-compartment-details.js +41 -0
- package/lib/model/change-agent-compartment-details.js.map +1 -0
- package/lib/model/change-agent-endpoint-compartment-details.d.ts +41 -0
- package/lib/model/change-agent-endpoint-compartment-details.js +41 -0
- package/lib/model/change-agent-endpoint-compartment-details.js.map +1 -0
- package/lib/model/change-knowledge-base-compartment-details.d.ts +41 -0
- package/lib/model/change-knowledge-base-compartment-details.js +41 -0
- package/lib/model/change-knowledge-base-compartment-details.js.map +1 -0
- package/lib/model/content-moderation-config.d.ts +41 -0
- package/lib/model/content-moderation-config.js +41 -0
- package/lib/model/content-moderation-config.js.map +1 -0
- package/lib/model/create-agent-details.d.ts +79 -0
- package/lib/model/create-agent-details.js +41 -0
- package/lib/model/create-agent-details.js.map +1 -0
- package/lib/model/create-agent-endpoint-details.d.ts +90 -0
- package/lib/model/create-agent-endpoint-details.js +75 -0
- package/lib/model/create-agent-endpoint-details.js.map +1 -0
- package/lib/model/create-data-ingestion-job-details.d.ts +75 -0
- package/lib/model/create-data-ingestion-job-details.js +41 -0
- package/lib/model/create-data-ingestion-job-details.js.map +1 -0
- package/lib/model/create-data-source-details.d.ts +77 -0
- package/lib/model/create-data-source-details.js +69 -0
- package/lib/model/create-data-source-details.js.map +1 -0
- package/lib/model/create-knowledge-base-details.d.ts +73 -0
- package/lib/model/create-knowledge-base-details.js +67 -0
- package/lib/model/create-knowledge-base-details.js.map +1 -0
- package/lib/model/data-ingestion-job-collection.d.ts +41 -0
- package/lib/model/data-ingestion-job-collection.js +73 -0
- package/lib/model/data-ingestion-job-collection.js.map +1 -0
- package/lib/model/data-ingestion-job-statistics.d.ts +48 -0
- package/lib/model/data-ingestion-job-statistics.js +41 -0
- package/lib/model/data-ingestion-job-statistics.js.map +1 -0
- package/lib/model/data-ingestion-job-summary.d.ts +113 -0
- package/lib/model/data-ingestion-job-summary.js +41 -0
- package/lib/model/data-ingestion-job-summary.js.map +1 -0
- package/lib/model/data-ingestion-job.d.ts +131 -0
- package/lib/model/data-ingestion-job.js +84 -0
- package/lib/model/data-ingestion-job.js.map +1 -0
- package/lib/model/data-source-collection.d.ts +41 -0
- package/lib/model/data-source-collection.js +73 -0
- package/lib/model/data-source-collection.js.map +1 -0
- package/lib/model/data-source-config.d.ts +37 -0
- package/lib/model/data-source-config.js +80 -0
- package/lib/model/data-source-config.js.map +1 -0
- package/lib/model/data-source-summary.d.ts +113 -0
- package/lib/model/data-source-summary.js +41 -0
- package/lib/model/data-source-summary.js.map +1 -0
- package/lib/model/data-source.d.ts +131 -0
- package/lib/model/data-source.js +84 -0
- package/lib/model/data-source.js.map +1 -0
- package/lib/model/database-connection.d.ts +37 -0
- package/lib/model/database-connection.js +80 -0
- package/lib/model/database-connection.js.map +1 -0
- package/lib/model/database-function.d.ts +41 -0
- package/lib/model/database-function.js +41 -0
- package/lib/model/database-function.js.map +1 -0
- package/lib/model/database-tool-connection.d.ts +43 -0
- package/lib/model/database-tool-connection.js +66 -0
- package/lib/model/database-tool-connection.js.map +1 -0
- package/lib/model/default-index-config.d.ts +43 -0
- package/lib/model/default-index-config.js +64 -0
- package/lib/model/default-index-config.js.map +1 -0
- package/lib/model/idcs-secret.d.ts +55 -0
- package/lib/model/idcs-secret.js +62 -0
- package/lib/model/idcs-secret.js.map +1 -0
- package/lib/model/index-config.d.ts +37 -0
- package/lib/model/index-config.js +88 -0
- package/lib/model/index-config.js.map +1 -0
- package/lib/model/index-schema.d.ts +52 -0
- package/lib/model/index-schema.js +41 -0
- package/lib/model/index-schema.js.map +1 -0
- package/lib/model/index.d.ts +140 -0
- package/lib/model/index.js +164 -0
- package/lib/model/index.js.map +1 -0
- package/lib/model/knowledge-base-collection.d.ts +41 -0
- package/lib/model/knowledge-base-collection.js +73 -0
- package/lib/model/knowledge-base-collection.js.map +1 -0
- package/lib/model/knowledge-base-summary.d.ts +109 -0
- package/lib/model/knowledge-base-summary.js +41 -0
- package/lib/model/knowledge-base-summary.js.map +1 -0
- package/lib/model/knowledge-base.d.ts +127 -0
- package/lib/model/knowledge-base.js +82 -0
- package/lib/model/knowledge-base.js.map +1 -0
- package/lib/model/model-index.d.ts +42 -0
- package/lib/model/model-index.js +65 -0
- package/lib/model/model-index.js.map +1 -0
- package/lib/model/object-storage-prefix.d.ts +48 -0
- package/lib/model/object-storage-prefix.js +41 -0
- package/lib/model/object-storage-prefix.js.map +1 -0
- package/lib/model/oci-database-config.d.ts +44 -0
- package/lib/model/oci-database-config.js +82 -0
- package/lib/model/oci-database-config.js.map +1 -0
- package/lib/model/oci-object-storage-data-source-config.d.ts +43 -0
- package/lib/model/oci-object-storage-data-source-config.js +78 -0
- package/lib/model/oci-object-storage-data-source-config.js.map +1 -0
- package/lib/model/oci-open-search-index-config.d.ts +48 -0
- package/lib/model/oci-open-search-index-config.js +82 -0
- package/lib/model/oci-open-search-index-config.js.map +1 -0
- package/lib/model/operation-status.d.ts +46 -0
- package/lib/model/operation-status.js +57 -0
- package/lib/model/operation-status.js.map +1 -0
- package/lib/model/operation-type.d.ts +55 -0
- package/lib/model/operation-type.js +66 -0
- package/lib/model/operation-type.js.map +1 -0
- package/lib/model/secret-detail.d.ts +37 -0
- package/lib/model/secret-detail.js +84 -0
- package/lib/model/secret-detail.js.map +1 -0
- package/lib/model/session-config.d.ts +40 -0
- package/lib/model/session-config.js +41 -0
- package/lib/model/session-config.js.map +1 -0
- package/lib/model/sort-order.d.ts +45 -0
- package/lib/model/sort-order.js +56 -0
- package/lib/model/sort-order.js.map +1 -0
- package/lib/model/update-agent-details.d.ts +74 -0
- package/lib/model/update-agent-details.js +41 -0
- package/lib/model/update-agent-details.js.map +1 -0
- package/lib/model/update-agent-endpoint-details.d.ts +77 -0
- package/lib/model/update-agent-endpoint-details.js +75 -0
- package/lib/model/update-agent-endpoint-details.js.map +1 -0
- package/lib/model/update-data-source-details.d.ts +68 -0
- package/lib/model/update-data-source-details.js +69 -0
- package/lib/model/update-data-source-details.js.map +1 -0
- package/lib/model/update-knowledge-base-details.d.ts +68 -0
- package/lib/model/update-knowledge-base-details.js +67 -0
- package/lib/model/update-knowledge-base-details.js.map +1 -0
- package/lib/model/work-request-error-collection.d.ts +41 -0
- package/lib/model/work-request-error-collection.js +73 -0
- package/lib/model/work-request-error-collection.js.map +1 -0
- package/lib/model/work-request-error.d.ts +52 -0
- package/lib/model/work-request-error.js +41 -0
- package/lib/model/work-request-error.js.map +1 -0
- package/lib/model/work-request-log-entry-collection.d.ts +41 -0
- package/lib/model/work-request-log-entry-collection.js +73 -0
- package/lib/model/work-request-log-entry-collection.js.map +1 -0
- package/lib/model/work-request-log-entry.d.ts +46 -0
- package/lib/model/work-request-log-entry.js +41 -0
- package/lib/model/work-request-log-entry.js.map +1 -0
- package/lib/model/work-request-resource-metadata-key.d.ts +39 -0
- package/lib/model/work-request-resource-metadata-key.js +50 -0
- package/lib/model/work-request-resource-metadata-key.js.map +1 -0
- package/lib/model/work-request-resource.d.ts +63 -0
- package/lib/model/work-request-resource.js +41 -0
- package/lib/model/work-request-resource.js.map +1 -0
- package/lib/model/work-request-summary-collection.d.ts +41 -0
- package/lib/model/work-request-summary-collection.js +73 -0
- package/lib/model/work-request-summary-collection.js.map +1 -0
- package/lib/model/work-request-summary.d.ts +88 -0
- package/lib/model/work-request-summary.js +73 -0
- package/lib/model/work-request-summary.js.map +1 -0
- package/lib/model/work-request.d.ts +90 -0
- package/lib/model/work-request.js +73 -0
- package/lib/model/work-request.js.map +1 -0
- package/lib/request/cancel-work-request-request.d.ts +38 -0
- package/lib/request/cancel-work-request-request.js +15 -0
- package/lib/request/cancel-work-request-request.js.map +1 -0
- package/lib/request/change-agent-compartment-request.d.ts +52 -0
- package/lib/request/change-agent-compartment-request.js +15 -0
- package/lib/request/change-agent-compartment-request.js.map +1 -0
- package/lib/request/change-agent-endpoint-compartment-request.d.ts +52 -0
- package/lib/request/change-agent-endpoint-compartment-request.js +15 -0
- package/lib/request/change-agent-endpoint-compartment-request.js.map +1 -0
- package/lib/request/change-knowledge-base-compartment-request.d.ts +52 -0
- package/lib/request/change-knowledge-base-compartment-request.js +15 -0
- package/lib/request/change-knowledge-base-compartment-request.js.map +1 -0
- package/lib/request/create-agent-endpoint-request.d.ts +40 -0
- package/lib/request/create-agent-endpoint-request.js +15 -0
- package/lib/request/create-agent-endpoint-request.js.map +1 -0
- package/lib/request/create-agent-request.d.ts +40 -0
- package/lib/request/create-agent-request.js +15 -0
- package/lib/request/create-agent-request.js.map +1 -0
- package/lib/request/create-data-ingestion-job-request.d.ts +40 -0
- package/lib/request/create-data-ingestion-job-request.js +15 -0
- package/lib/request/create-data-ingestion-job-request.js.map +1 -0
- package/lib/request/create-data-source-request.d.ts +40 -0
- package/lib/request/create-data-source-request.js +15 -0
- package/lib/request/create-data-source-request.js.map +1 -0
- package/lib/request/create-knowledge-base-request.d.ts +40 -0
- package/lib/request/create-knowledge-base-request.js +15 -0
- package/lib/request/create-knowledge-base-request.js.map +1 -0
- package/lib/request/delete-agent-endpoint-request.d.ts +38 -0
- package/lib/request/delete-agent-endpoint-request.js +15 -0
- package/lib/request/delete-agent-endpoint-request.js.map +1 -0
- package/lib/request/delete-agent-request.d.ts +38 -0
- package/lib/request/delete-agent-request.js +15 -0
- package/lib/request/delete-agent-request.js.map +1 -0
- package/lib/request/delete-data-ingestion-job-request.d.ts +38 -0
- package/lib/request/delete-data-ingestion-job-request.js +15 -0
- package/lib/request/delete-data-ingestion-job-request.js.map +1 -0
- package/lib/request/delete-data-source-request.d.ts +38 -0
- package/lib/request/delete-data-source-request.js +15 -0
- package/lib/request/delete-data-source-request.js.map +1 -0
- package/lib/request/delete-knowledge-base-request.d.ts +38 -0
- package/lib/request/delete-knowledge-base-request.js +15 -0
- package/lib/request/delete-knowledge-base-request.js.map +1 -0
- package/lib/request/get-agent-endpoint-request.d.ts +30 -0
- package/lib/request/get-agent-endpoint-request.js +15 -0
- package/lib/request/get-agent-endpoint-request.js.map +1 -0
- package/lib/request/get-agent-request.d.ts +30 -0
- package/lib/request/get-agent-request.js +15 -0
- package/lib/request/get-agent-request.js.map +1 -0
- package/lib/request/get-data-ingestion-job-log-content-request.d.ts +30 -0
- package/lib/request/get-data-ingestion-job-log-content-request.js +15 -0
- package/lib/request/get-data-ingestion-job-log-content-request.js.map +1 -0
- package/lib/request/get-data-ingestion-job-request.d.ts +30 -0
- package/lib/request/get-data-ingestion-job-request.js +15 -0
- package/lib/request/get-data-ingestion-job-request.js.map +1 -0
- package/lib/request/get-data-source-request.d.ts +30 -0
- package/lib/request/get-data-source-request.js +15 -0
- package/lib/request/get-data-source-request.js.map +1 -0
- package/lib/request/get-knowledge-base-request.d.ts +30 -0
- package/lib/request/get-knowledge-base-request.js +15 -0
- package/lib/request/get-knowledge-base-request.js.map +1 -0
- package/lib/request/get-work-request-request.d.ts +30 -0
- package/lib/request/get-work-request-request.js +15 -0
- package/lib/request/get-work-request-request.js.map +1 -0
- package/lib/request/index.d.ts +90 -0
- package/lib/request/index.js +63 -0
- package/lib/request/index.js.map +1 -0
- package/lib/request/list-agent-endpoints-request.d.ts +75 -0
- package/lib/request/list-agent-endpoints-request.js +24 -0
- package/lib/request/list-agent-endpoints-request.js.map +1 -0
- package/lib/request/list-agents-request.d.ts +71 -0
- package/lib/request/list-agents-request.js +24 -0
- package/lib/request/list-agents-request.js.map +1 -0
- package/lib/request/list-data-ingestion-jobs-request.d.ts +75 -0
- package/lib/request/list-data-ingestion-jobs-request.js +24 -0
- package/lib/request/list-data-ingestion-jobs-request.js.map +1 -0
- package/lib/request/list-data-sources-request.d.ts +75 -0
- package/lib/request/list-data-sources-request.js +24 -0
- package/lib/request/list-data-sources-request.js.map +1 -0
- package/lib/request/list-knowledge-bases-request.d.ts +71 -0
- package/lib/request/list-knowledge-bases-request.js +24 -0
- package/lib/request/list-knowledge-bases-request.js.map +1 -0
- package/lib/request/list-work-request-errors-request.d.ts +59 -0
- package/lib/request/list-work-request-errors-request.js +23 -0
- package/lib/request/list-work-request-errors-request.js.map +1 -0
- package/lib/request/list-work-request-logs-request.d.ts +59 -0
- package/lib/request/list-work-request-logs-request.js +23 -0
- package/lib/request/list-work-request-logs-request.js.map +1 -0
- package/lib/request/list-work-requests-request.d.ts +71 -0
- package/lib/request/list-work-requests-request.js +23 -0
- package/lib/request/list-work-requests-request.js.map +1 -0
- package/lib/request/update-agent-endpoint-request.d.ts +43 -0
- package/lib/request/update-agent-endpoint-request.js +15 -0
- package/lib/request/update-agent-endpoint-request.js.map +1 -0
- package/lib/request/update-agent-request.d.ts +43 -0
- package/lib/request/update-agent-request.js +15 -0
- package/lib/request/update-agent-request.js.map +1 -0
- package/lib/request/update-data-source-request.d.ts +43 -0
- package/lib/request/update-data-source-request.js +15 -0
- package/lib/request/update-data-source-request.js.map +1 -0
- package/lib/request/update-knowledge-base-request.d.ts +43 -0
- package/lib/request/update-knowledge-base-request.js +15 -0
- package/lib/request/update-knowledge-base-request.js.map +1 -0
- package/lib/response/cancel-work-request-response.d.ts +20 -0
- package/lib/response/cancel-work-request-response.js +15 -0
- package/lib/response/cancel-work-request-response.js.map +1 -0
- package/lib/response/change-agent-compartment-response.d.ts +26 -0
- package/lib/response/change-agent-compartment-response.js +15 -0
- package/lib/response/change-agent-compartment-response.js.map +1 -0
- package/lib/response/change-agent-endpoint-compartment-response.d.ts +26 -0
- package/lib/response/change-agent-endpoint-compartment-response.js +15 -0
- package/lib/response/change-agent-endpoint-compartment-response.js.map +1 -0
- package/lib/response/change-knowledge-base-compartment-response.d.ts +26 -0
- package/lib/response/change-knowledge-base-compartment-response.js +15 -0
- package/lib/response/change-knowledge-base-compartment-response.js.map +1 -0
- package/lib/response/create-agent-endpoint-response.d.ts +44 -0
- package/lib/response/create-agent-endpoint-response.js +15 -0
- package/lib/response/create-agent-endpoint-response.js.map +1 -0
- package/lib/response/create-agent-response.d.ts +44 -0
- package/lib/response/create-agent-response.js +15 -0
- package/lib/response/create-agent-response.js.map +1 -0
- package/lib/response/create-data-ingestion-job-response.d.ts +44 -0
- package/lib/response/create-data-ingestion-job-response.js +15 -0
- package/lib/response/create-data-ingestion-job-response.js.map +1 -0
- package/lib/response/create-data-source-response.d.ts +44 -0
- package/lib/response/create-data-source-response.js +15 -0
- package/lib/response/create-data-source-response.js.map +1 -0
- package/lib/response/create-knowledge-base-response.d.ts +44 -0
- package/lib/response/create-knowledge-base-response.js +15 -0
- package/lib/response/create-knowledge-base-response.js.map +1 -0
- package/lib/response/delete-agent-endpoint-response.d.ts +26 -0
- package/lib/response/delete-agent-endpoint-response.js +15 -0
- package/lib/response/delete-agent-endpoint-response.js.map +1 -0
- package/lib/response/delete-agent-response.d.ts +26 -0
- package/lib/response/delete-agent-response.js +15 -0
- package/lib/response/delete-agent-response.js.map +1 -0
- package/lib/response/delete-data-ingestion-job-response.d.ts +26 -0
- package/lib/response/delete-data-ingestion-job-response.js +15 -0
- package/lib/response/delete-data-ingestion-job-response.js.map +1 -0
- package/lib/response/delete-data-source-response.d.ts +26 -0
- package/lib/response/delete-data-source-response.js +15 -0
- package/lib/response/delete-data-source-response.js.map +1 -0
- package/lib/response/delete-knowledge-base-response.d.ts +26 -0
- package/lib/response/delete-knowledge-base-response.js +15 -0
- package/lib/response/delete-knowledge-base-response.js.map +1 -0
- package/lib/response/get-agent-endpoint-response.d.ts +30 -0
- package/lib/response/get-agent-endpoint-response.js +15 -0
- package/lib/response/get-agent-endpoint-response.js.map +1 -0
- package/lib/response/get-agent-response.d.ts +30 -0
- package/lib/response/get-agent-response.js +15 -0
- package/lib/response/get-agent-response.js.map +1 -0
- package/lib/response/get-data-ingestion-job-log-content-response.d.ts +24 -0
- package/lib/response/get-data-ingestion-job-log-content-response.js +15 -0
- package/lib/response/get-data-ingestion-job-log-content-response.js.map +1 -0
- package/lib/response/get-data-ingestion-job-response.d.ts +30 -0
- package/lib/response/get-data-ingestion-job-response.js +15 -0
- package/lib/response/get-data-ingestion-job-response.js.map +1 -0
- package/lib/response/get-data-source-response.d.ts +30 -0
- package/lib/response/get-data-source-response.js +15 -0
- package/lib/response/get-data-source-response.js.map +1 -0
- package/lib/response/get-knowledge-base-response.d.ts +30 -0
- package/lib/response/get-knowledge-base-response.js +15 -0
- package/lib/response/get-knowledge-base-response.js.map +1 -0
- package/lib/response/get-work-request-response.d.ts +34 -0
- package/lib/response/get-work-request-response.js +15 -0
- package/lib/response/get-work-request-response.js.map +1 -0
- package/lib/response/index.d.ts +90 -0
- package/lib/response/index.js +27 -0
- package/lib/response/index.js.map +1 -0
- package/lib/response/list-agent-endpoints-response.d.ts +31 -0
- package/lib/response/list-agent-endpoints-response.js +15 -0
- package/lib/response/list-agent-endpoints-response.js.map +1 -0
- package/lib/response/list-agents-response.d.ts +31 -0
- package/lib/response/list-agents-response.js +15 -0
- package/lib/response/list-agents-response.js.map +1 -0
- package/lib/response/list-data-ingestion-jobs-response.d.ts +31 -0
- package/lib/response/list-data-ingestion-jobs-response.js +15 -0
- package/lib/response/list-data-ingestion-jobs-response.js.map +1 -0
- package/lib/response/list-data-sources-response.d.ts +31 -0
- package/lib/response/list-data-sources-response.js +15 -0
- package/lib/response/list-data-sources-response.js.map +1 -0
- package/lib/response/list-knowledge-bases-response.d.ts +31 -0
- package/lib/response/list-knowledge-bases-response.js +15 -0
- package/lib/response/list-knowledge-bases-response.js.map +1 -0
- package/lib/response/list-work-request-errors-response.d.ts +31 -0
- package/lib/response/list-work-request-errors-response.js +15 -0
- package/lib/response/list-work-request-errors-response.js.map +1 -0
- package/lib/response/list-work-request-logs-response.d.ts +31 -0
- package/lib/response/list-work-request-logs-response.js +15 -0
- package/lib/response/list-work-request-logs-response.js.map +1 -0
- package/lib/response/list-work-requests-response.d.ts +31 -0
- package/lib/response/list-work-requests-response.js +15 -0
- package/lib/response/list-work-requests-response.js.map +1 -0
- package/lib/response/update-agent-endpoint-response.d.ts +26 -0
- package/lib/response/update-agent-endpoint-response.js +15 -0
- package/lib/response/update-agent-endpoint-response.js.map +1 -0
- package/lib/response/update-agent-response.d.ts +26 -0
- package/lib/response/update-agent-response.js +15 -0
- package/lib/response/update-agent-response.js.map +1 -0
- package/lib/response/update-data-source-response.d.ts +26 -0
- package/lib/response/update-data-source-response.js +15 -0
- package/lib/response/update-data-source-response.js.map +1 -0
- package/lib/response/update-knowledge-base-response.d.ts +26 -0
- package/lib/response/update-knowledge-base-response.js +15 -0
- package/lib/response/update-knowledge-base-response.js.map +1 -0
- package/package.json +29 -0
package/lib/client.js
ADDED
|
@@ -0,0 +1,2486 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Generative AI Agents Management API
|
|
4
|
+
* **Generative AI Agents API**
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient.
|
|
8
|
+
|
|
9
|
+
OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API.
|
|
10
|
+
|
|
11
|
+
Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests.
|
|
12
|
+
|
|
13
|
+
For creating and managing client chat sessions see the [Generative AI Agents Client API](#/EN/generative-ai-agents-client/latest/).
|
|
14
|
+
|
|
15
|
+
To learn more about the service, see the [Generative AI Agents documentation](/iaas/Content/generative-ai-agents/home.htm).
|
|
16
|
+
|
|
17
|
+
* OpenAPI spec version: 20240531
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
* NOTE: This class is auto generated by OracleSDKGenerator.
|
|
21
|
+
* Do not edit the class manually.
|
|
22
|
+
*
|
|
23
|
+
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
|
|
24
|
+
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
|
|
25
|
+
*/
|
|
26
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
27
|
+
if (k2 === undefined) k2 = k;
|
|
28
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
29
|
+
}) : (function(o, m, k, k2) {
|
|
30
|
+
if (k2 === undefined) k2 = k;
|
|
31
|
+
o[k2] = m[k];
|
|
32
|
+
}));
|
|
33
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
34
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
35
|
+
}) : function(o, v) {
|
|
36
|
+
o["default"] = v;
|
|
37
|
+
});
|
|
38
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
39
|
+
if (mod && mod.__esModule) return mod;
|
|
40
|
+
var result = {};
|
|
41
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
42
|
+
__setModuleDefault(result, mod);
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
46
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
47
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
48
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
49
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
50
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
51
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55
|
+
exports.GenerativeAiAgentClient = exports.GenerativeAiAgentApiKeys = void 0;
|
|
56
|
+
const common = require("oci-common");
|
|
57
|
+
const model = __importStar(require("./model"));
|
|
58
|
+
const generativeaiagent_waiter_1 = require("./generativeaiagent-waiter");
|
|
59
|
+
const oci_common_1 = require("oci-common");
|
|
60
|
+
const Breaker = require("opossum");
|
|
61
|
+
// ===============================================
|
|
62
|
+
// This file is autogenerated - Please do not edit
|
|
63
|
+
// ===============================================
|
|
64
|
+
var GenerativeAiAgentApiKeys;
|
|
65
|
+
(function (GenerativeAiAgentApiKeys) {
|
|
66
|
+
})(GenerativeAiAgentApiKeys = exports.GenerativeAiAgentApiKeys || (exports.GenerativeAiAgentApiKeys = {}));
|
|
67
|
+
/**
|
|
68
|
+
* This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.
|
|
69
|
+
*/
|
|
70
|
+
class GenerativeAiAgentClient {
|
|
71
|
+
constructor(params, clientConfiguration) {
|
|
72
|
+
this["_realmSpecificEndpointTemplateEnabled"] = undefined;
|
|
73
|
+
this["_endpoint"] = "";
|
|
74
|
+
this["_defaultHeaders"] = {};
|
|
75
|
+
this._circuitBreaker = null;
|
|
76
|
+
this._httpOptions = undefined;
|
|
77
|
+
this._bodyDuplexMode = undefined;
|
|
78
|
+
this.targetService = "GenerativeAiAgent";
|
|
79
|
+
this._regionId = "";
|
|
80
|
+
this._lastSetRegionOrRegionId = "";
|
|
81
|
+
const requestSigner = params.authenticationDetailsProvider
|
|
82
|
+
? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
|
|
83
|
+
: null;
|
|
84
|
+
if (clientConfiguration) {
|
|
85
|
+
this._clientConfiguration = clientConfiguration;
|
|
86
|
+
this._circuitBreaker = clientConfiguration.circuitBreaker
|
|
87
|
+
? clientConfiguration.circuitBreaker.circuit
|
|
88
|
+
: null;
|
|
89
|
+
this._httpOptions = clientConfiguration.httpOptions
|
|
90
|
+
? clientConfiguration.httpOptions
|
|
91
|
+
: undefined;
|
|
92
|
+
this._bodyDuplexMode = clientConfiguration.bodyDuplexMode
|
|
93
|
+
? clientConfiguration.bodyDuplexMode
|
|
94
|
+
: undefined;
|
|
95
|
+
}
|
|
96
|
+
if (!oci_common_1.developerToolConfiguration.isServiceEnabled("generativeaiagent")) {
|
|
97
|
+
let errmsg = "The developerToolConfiguration configuration disabled this service, this behavior is controlled by developerToolConfiguration.ociEnabledServiceSet variable. Please check if your local developer_tool_configuration file has configured the service you're targeting or contact the cloud provider on the availability of this service : ";
|
|
98
|
+
throw errmsg.concat("generativeaiagent");
|
|
99
|
+
}
|
|
100
|
+
// if circuit breaker is not created, check if circuit breaker system is enabled to use default circuit breaker
|
|
101
|
+
const specCircuitBreakerEnabled = true;
|
|
102
|
+
if (!this._circuitBreaker &&
|
|
103
|
+
common.utils.isCircuitBreakerSystemEnabled(clientConfiguration) &&
|
|
104
|
+
(specCircuitBreakerEnabled || common.CircuitBreaker.DefaultCircuitBreakerOverriden)) {
|
|
105
|
+
this._circuitBreaker = new common.CircuitBreaker().circuit;
|
|
106
|
+
}
|
|
107
|
+
this._httpClient =
|
|
108
|
+
params.httpClient ||
|
|
109
|
+
new common.FetchHttpClient(requestSigner, this._circuitBreaker, this._httpOptions, this._bodyDuplexMode);
|
|
110
|
+
if (params.authenticationDetailsProvider &&
|
|
111
|
+
common.isRegionProvider(params.authenticationDetailsProvider)) {
|
|
112
|
+
const provider = params.authenticationDetailsProvider;
|
|
113
|
+
if (provider.getRegion()) {
|
|
114
|
+
this.region = provider.getRegion();
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Get the endpoint that is being used to call (ex, https://www.example.com).
|
|
120
|
+
*/
|
|
121
|
+
get endpoint() {
|
|
122
|
+
return this._endpoint;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Sets the endpoint to call (ex, https://www.example.com).
|
|
126
|
+
* @param endpoint The endpoint of the service.
|
|
127
|
+
*/
|
|
128
|
+
set endpoint(endpoint) {
|
|
129
|
+
this._endpoint = endpoint;
|
|
130
|
+
this._endpoint = this._endpoint + "/20240531";
|
|
131
|
+
if (this.logger)
|
|
132
|
+
this.logger.info(`GenerativeAiAgentClient endpoint set to ${this._endpoint}`);
|
|
133
|
+
}
|
|
134
|
+
get logger() {
|
|
135
|
+
return common.LOG.logger;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Determines whether realm specific endpoint should be used or not.
|
|
139
|
+
* Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false"
|
|
140
|
+
* @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template
|
|
141
|
+
*/
|
|
142
|
+
set useRealmSpecificEndpointTemplate(realmSpecificEndpointTemplateEnabled) {
|
|
143
|
+
this._realmSpecificEndpointTemplateEnabled = realmSpecificEndpointTemplateEnabled;
|
|
144
|
+
if (this.logger)
|
|
145
|
+
this.logger.info(`realmSpecificEndpointTemplateEnabled set to ${this._realmSpecificEndpointTemplateEnabled}`);
|
|
146
|
+
if (this._lastSetRegionOrRegionId === common.Region.REGION_STRING) {
|
|
147
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(GenerativeAiAgentClient.serviceEndpointTemplate, this._region, GenerativeAiAgentClient.endpointServiceName);
|
|
148
|
+
}
|
|
149
|
+
else if (this._lastSetRegionOrRegionId === common.Region.REGION_ID_STRING) {
|
|
150
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(GenerativeAiAgentClient.serviceEndpointTemplate, this._regionId, GenerativeAiAgentClient.endpointServiceName);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Sets the region to call (ex, Region.US_PHOENIX_1).
|
|
155
|
+
* Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
|
|
156
|
+
* @param region The region of the service.
|
|
157
|
+
*/
|
|
158
|
+
set region(region) {
|
|
159
|
+
this._region = region;
|
|
160
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(GenerativeAiAgentClient.serviceEndpointTemplate, region, GenerativeAiAgentClient.endpointServiceName);
|
|
161
|
+
this._lastSetRegionOrRegionId = common.Region.REGION_STRING;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Sets the regionId to call (ex, 'us-phoenix-1').
|
|
165
|
+
*
|
|
166
|
+
* Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}.
|
|
167
|
+
* If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
|
|
168
|
+
* and then call {@link #endpoint(String) endpoint}.
|
|
169
|
+
* @param regionId The public region ID.
|
|
170
|
+
*/
|
|
171
|
+
set regionId(regionId) {
|
|
172
|
+
this._regionId = regionId;
|
|
173
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(GenerativeAiAgentClient.serviceEndpointTemplate, regionId, GenerativeAiAgentClient.endpointServiceName);
|
|
174
|
+
this._lastSetRegionOrRegionId = common.Region.REGION_ID_STRING;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Creates a new GenerativeAiAgentWaiter for resources for this service.
|
|
178
|
+
*
|
|
179
|
+
* @param config The waiter configuration for termination and delay strategy
|
|
180
|
+
* @return The service waiters.
|
|
181
|
+
*/
|
|
182
|
+
createWaiters(config) {
|
|
183
|
+
this._waiters = new generativeaiagent_waiter_1.GenerativeAiAgentWaiter(this, config);
|
|
184
|
+
return this._waiters;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Gets the waiters available for resources for this service.
|
|
188
|
+
*
|
|
189
|
+
* @return The service waiters.
|
|
190
|
+
*/
|
|
191
|
+
getWaiters() {
|
|
192
|
+
if (this._waiters) {
|
|
193
|
+
return this._waiters;
|
|
194
|
+
}
|
|
195
|
+
throw Error("Waiters do not exist. Please create waiters.");
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Shutdown the circuit breaker used by the client when it is no longer needed
|
|
199
|
+
*/
|
|
200
|
+
shutdownCircuitBreaker() {
|
|
201
|
+
if (this._circuitBreaker) {
|
|
202
|
+
this._circuitBreaker.shutdown();
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Close the client once it is no longer needed
|
|
207
|
+
*/
|
|
208
|
+
close() {
|
|
209
|
+
this.shutdownCircuitBreaker();
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* **CancelWorkRequest**
|
|
213
|
+
* <p>
|
|
214
|
+
Cancels a work request.
|
|
215
|
+
*
|
|
216
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
217
|
+
* @param CancelWorkRequestRequest
|
|
218
|
+
* @return CancelWorkRequestResponse
|
|
219
|
+
* @throws OciError when an error occurs
|
|
220
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/generativeaiagent/CancelWorkRequest.ts.html |here} to see how to use CancelWorkRequest API.
|
|
221
|
+
*/
|
|
222
|
+
cancelWorkRequest(cancelWorkRequestRequest) {
|
|
223
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
224
|
+
if (this.logger)
|
|
225
|
+
this.logger.debug("Calling operation GenerativeAiAgentClient#cancelWorkRequest.");
|
|
226
|
+
const operationName = "cancelWorkRequest";
|
|
227
|
+
const apiReferenceLink = "";
|
|
228
|
+
const pathParams = {
|
|
229
|
+
"{workRequestId}": cancelWorkRequestRequest.workRequestId
|
|
230
|
+
};
|
|
231
|
+
const queryParams = {};
|
|
232
|
+
let headerParams = {
|
|
233
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
234
|
+
"if-match": cancelWorkRequestRequest.ifMatch,
|
|
235
|
+
"opc-request-id": cancelWorkRequestRequest.opcRequestId
|
|
236
|
+
};
|
|
237
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
238
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, cancelWorkRequestRequest.retryConfiguration, specRetryConfiguration);
|
|
239
|
+
if (this.logger)
|
|
240
|
+
retrier.logger = this.logger;
|
|
241
|
+
const request = yield oci_common_1.composeRequest({
|
|
242
|
+
baseEndpoint: this._endpoint,
|
|
243
|
+
defaultHeaders: this._defaultHeaders,
|
|
244
|
+
path: "/workRequests/{workRequestId}",
|
|
245
|
+
method: "DELETE",
|
|
246
|
+
pathParams: pathParams,
|
|
247
|
+
headerParams: headerParams,
|
|
248
|
+
queryParams: queryParams
|
|
249
|
+
});
|
|
250
|
+
try {
|
|
251
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
252
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
253
|
+
responseObject: {},
|
|
254
|
+
responseHeaders: [
|
|
255
|
+
{
|
|
256
|
+
value: response.headers.get("opc-request-id"),
|
|
257
|
+
key: "opcRequestId",
|
|
258
|
+
dataType: "string"
|
|
259
|
+
}
|
|
260
|
+
]
|
|
261
|
+
});
|
|
262
|
+
return sdkResponse;
|
|
263
|
+
}
|
|
264
|
+
catch (err) {
|
|
265
|
+
throw err;
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* **ChangeAgentCompartment**
|
|
271
|
+
* <p>
|
|
272
|
+
Moves an agent into a different compartment within the same tenancy. For information about moving resources between
|
|
273
|
+
* compartments, see [Moving Resources to a Different Compartment](https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).
|
|
274
|
+
*
|
|
275
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
276
|
+
* @param ChangeAgentCompartmentRequest
|
|
277
|
+
* @return ChangeAgentCompartmentResponse
|
|
278
|
+
* @throws OciError when an error occurs
|
|
279
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/generativeaiagent/ChangeAgentCompartment.ts.html |here} to see how to use ChangeAgentCompartment API.
|
|
280
|
+
*/
|
|
281
|
+
changeAgentCompartment(changeAgentCompartmentRequest) {
|
|
282
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
283
|
+
if (this.logger)
|
|
284
|
+
this.logger.debug("Calling operation GenerativeAiAgentClient#changeAgentCompartment.");
|
|
285
|
+
const operationName = "changeAgentCompartment";
|
|
286
|
+
const apiReferenceLink = "";
|
|
287
|
+
const pathParams = {
|
|
288
|
+
"{agentId}": changeAgentCompartmentRequest.agentId
|
|
289
|
+
};
|
|
290
|
+
const queryParams = {};
|
|
291
|
+
let headerParams = {
|
|
292
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
293
|
+
"if-match": changeAgentCompartmentRequest.ifMatch,
|
|
294
|
+
"opc-request-id": changeAgentCompartmentRequest.opcRequestId,
|
|
295
|
+
"opc-retry-token": changeAgentCompartmentRequest.opcRetryToken
|
|
296
|
+
};
|
|
297
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
298
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, changeAgentCompartmentRequest.retryConfiguration, specRetryConfiguration);
|
|
299
|
+
if (this.logger)
|
|
300
|
+
retrier.logger = this.logger;
|
|
301
|
+
const request = yield oci_common_1.composeRequest({
|
|
302
|
+
baseEndpoint: this._endpoint,
|
|
303
|
+
defaultHeaders: this._defaultHeaders,
|
|
304
|
+
path: "/agents/{agentId}/actions/changeCompartment",
|
|
305
|
+
method: "POST",
|
|
306
|
+
bodyContent: common.ObjectSerializer.serialize(changeAgentCompartmentRequest.changeAgentCompartmentDetails, "ChangeAgentCompartmentDetails", model.ChangeAgentCompartmentDetails.getJsonObj),
|
|
307
|
+
pathParams: pathParams,
|
|
308
|
+
headerParams: headerParams,
|
|
309
|
+
queryParams: queryParams
|
|
310
|
+
});
|
|
311
|
+
try {
|
|
312
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
313
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
314
|
+
responseObject: {},
|
|
315
|
+
responseHeaders: [
|
|
316
|
+
{
|
|
317
|
+
value: response.headers.get("opc-work-request-id"),
|
|
318
|
+
key: "opcWorkRequestId",
|
|
319
|
+
dataType: "string"
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
value: response.headers.get("opc-request-id"),
|
|
323
|
+
key: "opcRequestId",
|
|
324
|
+
dataType: "string"
|
|
325
|
+
}
|
|
326
|
+
]
|
|
327
|
+
});
|
|
328
|
+
return sdkResponse;
|
|
329
|
+
}
|
|
330
|
+
catch (err) {
|
|
331
|
+
throw err;
|
|
332
|
+
}
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* **ChangeAgentEndpointCompartment**
|
|
337
|
+
* <p>
|
|
338
|
+
Moves an endpoint into a different compartment within the same tenancy. For information about moving resources between
|
|
339
|
+
* compartments, see [Moving Resources to a Different Compartment](https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).
|
|
340
|
+
*
|
|
341
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
342
|
+
* @param ChangeAgentEndpointCompartmentRequest
|
|
343
|
+
* @return ChangeAgentEndpointCompartmentResponse
|
|
344
|
+
* @throws OciError when an error occurs
|
|
345
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/generativeaiagent/ChangeAgentEndpointCompartment.ts.html |here} to see how to use ChangeAgentEndpointCompartment API.
|
|
346
|
+
*/
|
|
347
|
+
changeAgentEndpointCompartment(changeAgentEndpointCompartmentRequest) {
|
|
348
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
349
|
+
if (this.logger)
|
|
350
|
+
this.logger.debug("Calling operation GenerativeAiAgentClient#changeAgentEndpointCompartment.");
|
|
351
|
+
const operationName = "changeAgentEndpointCompartment";
|
|
352
|
+
const apiReferenceLink = "";
|
|
353
|
+
const pathParams = {
|
|
354
|
+
"{agentEndpointId}": changeAgentEndpointCompartmentRequest.agentEndpointId
|
|
355
|
+
};
|
|
356
|
+
const queryParams = {};
|
|
357
|
+
let headerParams = {
|
|
358
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
359
|
+
"if-match": changeAgentEndpointCompartmentRequest.ifMatch,
|
|
360
|
+
"opc-request-id": changeAgentEndpointCompartmentRequest.opcRequestId,
|
|
361
|
+
"opc-retry-token": changeAgentEndpointCompartmentRequest.opcRetryToken
|
|
362
|
+
};
|
|
363
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
364
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, changeAgentEndpointCompartmentRequest.retryConfiguration, specRetryConfiguration);
|
|
365
|
+
if (this.logger)
|
|
366
|
+
retrier.logger = this.logger;
|
|
367
|
+
const request = yield oci_common_1.composeRequest({
|
|
368
|
+
baseEndpoint: this._endpoint,
|
|
369
|
+
defaultHeaders: this._defaultHeaders,
|
|
370
|
+
path: "/agentEndpoints/{agentEndpointId}/actions/changeCompartment",
|
|
371
|
+
method: "POST",
|
|
372
|
+
bodyContent: common.ObjectSerializer.serialize(changeAgentEndpointCompartmentRequest.changeAgentEndpointCompartmentDetails, "ChangeAgentEndpointCompartmentDetails", model.ChangeAgentEndpointCompartmentDetails.getJsonObj),
|
|
373
|
+
pathParams: pathParams,
|
|
374
|
+
headerParams: headerParams,
|
|
375
|
+
queryParams: queryParams
|
|
376
|
+
});
|
|
377
|
+
try {
|
|
378
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
379
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
380
|
+
responseObject: {},
|
|
381
|
+
responseHeaders: [
|
|
382
|
+
{
|
|
383
|
+
value: response.headers.get("opc-work-request-id"),
|
|
384
|
+
key: "opcWorkRequestId",
|
|
385
|
+
dataType: "string"
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
value: response.headers.get("opc-request-id"),
|
|
389
|
+
key: "opcRequestId",
|
|
390
|
+
dataType: "string"
|
|
391
|
+
}
|
|
392
|
+
]
|
|
393
|
+
});
|
|
394
|
+
return sdkResponse;
|
|
395
|
+
}
|
|
396
|
+
catch (err) {
|
|
397
|
+
throw err;
|
|
398
|
+
}
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* **ChangeKnowledgeBaseCompartment**
|
|
403
|
+
* <p>
|
|
404
|
+
Moves a knowledge base into a different compartment within the same tenancy. For information about moving resources between
|
|
405
|
+
* compartments, see [Moving Resources to a Different Compartment](https://docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).
|
|
406
|
+
*
|
|
407
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
408
|
+
* @param ChangeKnowledgeBaseCompartmentRequest
|
|
409
|
+
* @return ChangeKnowledgeBaseCompartmentResponse
|
|
410
|
+
* @throws OciError when an error occurs
|
|
411
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/generativeaiagent/ChangeKnowledgeBaseCompartment.ts.html |here} to see how to use ChangeKnowledgeBaseCompartment API.
|
|
412
|
+
*/
|
|
413
|
+
changeKnowledgeBaseCompartment(changeKnowledgeBaseCompartmentRequest) {
|
|
414
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
415
|
+
if (this.logger)
|
|
416
|
+
this.logger.debug("Calling operation GenerativeAiAgentClient#changeKnowledgeBaseCompartment.");
|
|
417
|
+
const operationName = "changeKnowledgeBaseCompartment";
|
|
418
|
+
const apiReferenceLink = "";
|
|
419
|
+
const pathParams = {
|
|
420
|
+
"{knowledgeBaseId}": changeKnowledgeBaseCompartmentRequest.knowledgeBaseId
|
|
421
|
+
};
|
|
422
|
+
const queryParams = {};
|
|
423
|
+
let headerParams = {
|
|
424
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
425
|
+
"if-match": changeKnowledgeBaseCompartmentRequest.ifMatch,
|
|
426
|
+
"opc-request-id": changeKnowledgeBaseCompartmentRequest.opcRequestId,
|
|
427
|
+
"opc-retry-token": changeKnowledgeBaseCompartmentRequest.opcRetryToken
|
|
428
|
+
};
|
|
429
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
430
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, changeKnowledgeBaseCompartmentRequest.retryConfiguration, specRetryConfiguration);
|
|
431
|
+
if (this.logger)
|
|
432
|
+
retrier.logger = this.logger;
|
|
433
|
+
const request = yield oci_common_1.composeRequest({
|
|
434
|
+
baseEndpoint: this._endpoint,
|
|
435
|
+
defaultHeaders: this._defaultHeaders,
|
|
436
|
+
path: "/knowledgeBases/{knowledgeBaseId}/actions/changeCompartment",
|
|
437
|
+
method: "POST",
|
|
438
|
+
bodyContent: common.ObjectSerializer.serialize(changeKnowledgeBaseCompartmentRequest.changeKnowledgeBaseCompartmentDetails, "ChangeKnowledgeBaseCompartmentDetails", model.ChangeKnowledgeBaseCompartmentDetails.getJsonObj),
|
|
439
|
+
pathParams: pathParams,
|
|
440
|
+
headerParams: headerParams,
|
|
441
|
+
queryParams: queryParams
|
|
442
|
+
});
|
|
443
|
+
try {
|
|
444
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
445
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
446
|
+
responseObject: {},
|
|
447
|
+
responseHeaders: [
|
|
448
|
+
{
|
|
449
|
+
value: response.headers.get("opc-work-request-id"),
|
|
450
|
+
key: "opcWorkRequestId",
|
|
451
|
+
dataType: "string"
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
value: response.headers.get("opc-request-id"),
|
|
455
|
+
key: "opcRequestId",
|
|
456
|
+
dataType: "string"
|
|
457
|
+
}
|
|
458
|
+
]
|
|
459
|
+
});
|
|
460
|
+
return sdkResponse;
|
|
461
|
+
}
|
|
462
|
+
catch (err) {
|
|
463
|
+
throw err;
|
|
464
|
+
}
|
|
465
|
+
});
|
|
466
|
+
}
|
|
467
|
+
/**
|
|
468
|
+
* **CreateAgent**
|
|
469
|
+
* <p>
|
|
470
|
+
Creates an agent.
|
|
471
|
+
*
|
|
472
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
473
|
+
* @param CreateAgentRequest
|
|
474
|
+
* @return CreateAgentResponse
|
|
475
|
+
* @throws OciError when an error occurs
|
|
476
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/generativeaiagent/CreateAgent.ts.html |here} to see how to use CreateAgent API.
|
|
477
|
+
*/
|
|
478
|
+
createAgent(createAgentRequest) {
|
|
479
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
480
|
+
if (this.logger)
|
|
481
|
+
this.logger.debug("Calling operation GenerativeAiAgentClient#createAgent.");
|
|
482
|
+
const operationName = "createAgent";
|
|
483
|
+
const apiReferenceLink = "";
|
|
484
|
+
const pathParams = {};
|
|
485
|
+
const queryParams = {};
|
|
486
|
+
let headerParams = {
|
|
487
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
488
|
+
"opc-retry-token": createAgentRequest.opcRetryToken,
|
|
489
|
+
"opc-request-id": createAgentRequest.opcRequestId
|
|
490
|
+
};
|
|
491
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
492
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createAgentRequest.retryConfiguration, specRetryConfiguration);
|
|
493
|
+
if (this.logger)
|
|
494
|
+
retrier.logger = this.logger;
|
|
495
|
+
const request = yield oci_common_1.composeRequest({
|
|
496
|
+
baseEndpoint: this._endpoint,
|
|
497
|
+
defaultHeaders: this._defaultHeaders,
|
|
498
|
+
path: "/agents",
|
|
499
|
+
method: "POST",
|
|
500
|
+
bodyContent: common.ObjectSerializer.serialize(createAgentRequest.createAgentDetails, "CreateAgentDetails", model.CreateAgentDetails.getJsonObj),
|
|
501
|
+
pathParams: pathParams,
|
|
502
|
+
headerParams: headerParams,
|
|
503
|
+
queryParams: queryParams
|
|
504
|
+
});
|
|
505
|
+
try {
|
|
506
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
507
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
508
|
+
responseObject: {},
|
|
509
|
+
body: yield response.json(),
|
|
510
|
+
bodyKey: "agent",
|
|
511
|
+
bodyModel: model.Agent,
|
|
512
|
+
type: "model.Agent",
|
|
513
|
+
responseHeaders: [
|
|
514
|
+
{
|
|
515
|
+
value: response.headers.get("location"),
|
|
516
|
+
key: "location",
|
|
517
|
+
dataType: "string"
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
value: response.headers.get("content-location"),
|
|
521
|
+
key: "contentLocation",
|
|
522
|
+
dataType: "string"
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
value: response.headers.get("etag"),
|
|
526
|
+
key: "etag",
|
|
527
|
+
dataType: "string"
|
|
528
|
+
},
|
|
529
|
+
{
|
|
530
|
+
value: response.headers.get("opc-work-request-id"),
|
|
531
|
+
key: "opcWorkRequestId",
|
|
532
|
+
dataType: "string"
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
value: response.headers.get("opc-request-id"),
|
|
536
|
+
key: "opcRequestId",
|
|
537
|
+
dataType: "string"
|
|
538
|
+
}
|
|
539
|
+
]
|
|
540
|
+
});
|
|
541
|
+
return sdkResponse;
|
|
542
|
+
}
|
|
543
|
+
catch (err) {
|
|
544
|
+
throw err;
|
|
545
|
+
}
|
|
546
|
+
});
|
|
547
|
+
}
|
|
548
|
+
/**
|
|
549
|
+
* **CreateAgentEndpoint**
|
|
550
|
+
* <p>
|
|
551
|
+
Creates an endpoint.
|
|
552
|
+
*
|
|
553
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
554
|
+
* @param CreateAgentEndpointRequest
|
|
555
|
+
* @return CreateAgentEndpointResponse
|
|
556
|
+
* @throws OciError when an error occurs
|
|
557
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/generativeaiagent/CreateAgentEndpoint.ts.html |here} to see how to use CreateAgentEndpoint API.
|
|
558
|
+
*/
|
|
559
|
+
createAgentEndpoint(createAgentEndpointRequest) {
|
|
560
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
561
|
+
if (this.logger)
|
|
562
|
+
this.logger.debug("Calling operation GenerativeAiAgentClient#createAgentEndpoint.");
|
|
563
|
+
const operationName = "createAgentEndpoint";
|
|
564
|
+
const apiReferenceLink = "";
|
|
565
|
+
const pathParams = {};
|
|
566
|
+
const queryParams = {};
|
|
567
|
+
let headerParams = {
|
|
568
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
569
|
+
"opc-retry-token": createAgentEndpointRequest.opcRetryToken,
|
|
570
|
+
"opc-request-id": createAgentEndpointRequest.opcRequestId
|
|
571
|
+
};
|
|
572
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
573
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createAgentEndpointRequest.retryConfiguration, specRetryConfiguration);
|
|
574
|
+
if (this.logger)
|
|
575
|
+
retrier.logger = this.logger;
|
|
576
|
+
const request = yield oci_common_1.composeRequest({
|
|
577
|
+
baseEndpoint: this._endpoint,
|
|
578
|
+
defaultHeaders: this._defaultHeaders,
|
|
579
|
+
path: "/agentEndpoints",
|
|
580
|
+
method: "POST",
|
|
581
|
+
bodyContent: common.ObjectSerializer.serialize(createAgentEndpointRequest.createAgentEndpointDetails, "CreateAgentEndpointDetails", model.CreateAgentEndpointDetails.getJsonObj),
|
|
582
|
+
pathParams: pathParams,
|
|
583
|
+
headerParams: headerParams,
|
|
584
|
+
queryParams: queryParams
|
|
585
|
+
});
|
|
586
|
+
try {
|
|
587
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
588
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
589
|
+
responseObject: {},
|
|
590
|
+
body: yield response.json(),
|
|
591
|
+
bodyKey: "agentEndpoint",
|
|
592
|
+
bodyModel: model.AgentEndpoint,
|
|
593
|
+
type: "model.AgentEndpoint",
|
|
594
|
+
responseHeaders: [
|
|
595
|
+
{
|
|
596
|
+
value: response.headers.get("location"),
|
|
597
|
+
key: "location",
|
|
598
|
+
dataType: "string"
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
value: response.headers.get("content-location"),
|
|
602
|
+
key: "contentLocation",
|
|
603
|
+
dataType: "string"
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
value: response.headers.get("etag"),
|
|
607
|
+
key: "etag",
|
|
608
|
+
dataType: "string"
|
|
609
|
+
},
|
|
610
|
+
{
|
|
611
|
+
value: response.headers.get("opc-work-request-id"),
|
|
612
|
+
key: "opcWorkRequestId",
|
|
613
|
+
dataType: "string"
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
value: response.headers.get("opc-request-id"),
|
|
617
|
+
key: "opcRequestId",
|
|
618
|
+
dataType: "string"
|
|
619
|
+
}
|
|
620
|
+
]
|
|
621
|
+
});
|
|
622
|
+
return sdkResponse;
|
|
623
|
+
}
|
|
624
|
+
catch (err) {
|
|
625
|
+
throw err;
|
|
626
|
+
}
|
|
627
|
+
});
|
|
628
|
+
}
|
|
629
|
+
/**
|
|
630
|
+
* **CreateDataIngestionJob**
|
|
631
|
+
* <p>
|
|
632
|
+
Creates a data ingestion job.
|
|
633
|
+
*
|
|
634
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
635
|
+
* @param CreateDataIngestionJobRequest
|
|
636
|
+
* @return CreateDataIngestionJobResponse
|
|
637
|
+
* @throws OciError when an error occurs
|
|
638
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/generativeaiagent/CreateDataIngestionJob.ts.html |here} to see how to use CreateDataIngestionJob API.
|
|
639
|
+
*/
|
|
640
|
+
createDataIngestionJob(createDataIngestionJobRequest) {
|
|
641
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
642
|
+
if (this.logger)
|
|
643
|
+
this.logger.debug("Calling operation GenerativeAiAgentClient#createDataIngestionJob.");
|
|
644
|
+
const operationName = "createDataIngestionJob";
|
|
645
|
+
const apiReferenceLink = "";
|
|
646
|
+
const pathParams = {};
|
|
647
|
+
const queryParams = {};
|
|
648
|
+
let headerParams = {
|
|
649
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
650
|
+
"opc-retry-token": createDataIngestionJobRequest.opcRetryToken,
|
|
651
|
+
"opc-request-id": createDataIngestionJobRequest.opcRequestId
|
|
652
|
+
};
|
|
653
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
654
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createDataIngestionJobRequest.retryConfiguration, specRetryConfiguration);
|
|
655
|
+
if (this.logger)
|
|
656
|
+
retrier.logger = this.logger;
|
|
657
|
+
const request = yield oci_common_1.composeRequest({
|
|
658
|
+
baseEndpoint: this._endpoint,
|
|
659
|
+
defaultHeaders: this._defaultHeaders,
|
|
660
|
+
path: "/dataIngestionJobs",
|
|
661
|
+
method: "POST",
|
|
662
|
+
bodyContent: common.ObjectSerializer.serialize(createDataIngestionJobRequest.createDataIngestionJobDetails, "CreateDataIngestionJobDetails", model.CreateDataIngestionJobDetails.getJsonObj),
|
|
663
|
+
pathParams: pathParams,
|
|
664
|
+
headerParams: headerParams,
|
|
665
|
+
queryParams: queryParams
|
|
666
|
+
});
|
|
667
|
+
try {
|
|
668
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
669
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
670
|
+
responseObject: {},
|
|
671
|
+
body: yield response.json(),
|
|
672
|
+
bodyKey: "dataIngestionJob",
|
|
673
|
+
bodyModel: model.DataIngestionJob,
|
|
674
|
+
type: "model.DataIngestionJob",
|
|
675
|
+
responseHeaders: [
|
|
676
|
+
{
|
|
677
|
+
value: response.headers.get("location"),
|
|
678
|
+
key: "location",
|
|
679
|
+
dataType: "string"
|
|
680
|
+
},
|
|
681
|
+
{
|
|
682
|
+
value: response.headers.get("content-location"),
|
|
683
|
+
key: "contentLocation",
|
|
684
|
+
dataType: "string"
|
|
685
|
+
},
|
|
686
|
+
{
|
|
687
|
+
value: response.headers.get("etag"),
|
|
688
|
+
key: "etag",
|
|
689
|
+
dataType: "string"
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
value: response.headers.get("opc-work-request-id"),
|
|
693
|
+
key: "opcWorkRequestId",
|
|
694
|
+
dataType: "string"
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
value: response.headers.get("opc-request-id"),
|
|
698
|
+
key: "opcRequestId",
|
|
699
|
+
dataType: "string"
|
|
700
|
+
}
|
|
701
|
+
]
|
|
702
|
+
});
|
|
703
|
+
return sdkResponse;
|
|
704
|
+
}
|
|
705
|
+
catch (err) {
|
|
706
|
+
throw err;
|
|
707
|
+
}
|
|
708
|
+
});
|
|
709
|
+
}
|
|
710
|
+
/**
|
|
711
|
+
* **CreateDataSource**
|
|
712
|
+
* <p>
|
|
713
|
+
Creates a data source.
|
|
714
|
+
*
|
|
715
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
716
|
+
* @param CreateDataSourceRequest
|
|
717
|
+
* @return CreateDataSourceResponse
|
|
718
|
+
* @throws OciError when an error occurs
|
|
719
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/generativeaiagent/CreateDataSource.ts.html |here} to see how to use CreateDataSource API.
|
|
720
|
+
*/
|
|
721
|
+
createDataSource(createDataSourceRequest) {
|
|
722
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
723
|
+
if (this.logger)
|
|
724
|
+
this.logger.debug("Calling operation GenerativeAiAgentClient#createDataSource.");
|
|
725
|
+
const operationName = "createDataSource";
|
|
726
|
+
const apiReferenceLink = "";
|
|
727
|
+
const pathParams = {};
|
|
728
|
+
const queryParams = {};
|
|
729
|
+
let headerParams = {
|
|
730
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
731
|
+
"opc-retry-token": createDataSourceRequest.opcRetryToken,
|
|
732
|
+
"opc-request-id": createDataSourceRequest.opcRequestId
|
|
733
|
+
};
|
|
734
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
735
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createDataSourceRequest.retryConfiguration, specRetryConfiguration);
|
|
736
|
+
if (this.logger)
|
|
737
|
+
retrier.logger = this.logger;
|
|
738
|
+
const request = yield oci_common_1.composeRequest({
|
|
739
|
+
baseEndpoint: this._endpoint,
|
|
740
|
+
defaultHeaders: this._defaultHeaders,
|
|
741
|
+
path: "/dataSources",
|
|
742
|
+
method: "POST",
|
|
743
|
+
bodyContent: common.ObjectSerializer.serialize(createDataSourceRequest.createDataSourceDetails, "CreateDataSourceDetails", model.CreateDataSourceDetails.getJsonObj),
|
|
744
|
+
pathParams: pathParams,
|
|
745
|
+
headerParams: headerParams,
|
|
746
|
+
queryParams: queryParams
|
|
747
|
+
});
|
|
748
|
+
try {
|
|
749
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
750
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
751
|
+
responseObject: {},
|
|
752
|
+
body: yield response.json(),
|
|
753
|
+
bodyKey: "dataSource",
|
|
754
|
+
bodyModel: model.DataSource,
|
|
755
|
+
type: "model.DataSource",
|
|
756
|
+
responseHeaders: [
|
|
757
|
+
{
|
|
758
|
+
value: response.headers.get("location"),
|
|
759
|
+
key: "location",
|
|
760
|
+
dataType: "string"
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
value: response.headers.get("content-location"),
|
|
764
|
+
key: "contentLocation",
|
|
765
|
+
dataType: "string"
|
|
766
|
+
},
|
|
767
|
+
{
|
|
768
|
+
value: response.headers.get("etag"),
|
|
769
|
+
key: "etag",
|
|
770
|
+
dataType: "string"
|
|
771
|
+
},
|
|
772
|
+
{
|
|
773
|
+
value: response.headers.get("opc-work-request-id"),
|
|
774
|
+
key: "opcWorkRequestId",
|
|
775
|
+
dataType: "string"
|
|
776
|
+
},
|
|
777
|
+
{
|
|
778
|
+
value: response.headers.get("opc-request-id"),
|
|
779
|
+
key: "opcRequestId",
|
|
780
|
+
dataType: "string"
|
|
781
|
+
}
|
|
782
|
+
]
|
|
783
|
+
});
|
|
784
|
+
return sdkResponse;
|
|
785
|
+
}
|
|
786
|
+
catch (err) {
|
|
787
|
+
throw err;
|
|
788
|
+
}
|
|
789
|
+
});
|
|
790
|
+
}
|
|
791
|
+
/**
|
|
792
|
+
* **CreateKnowledgeBase**
|
|
793
|
+
* <p>
|
|
794
|
+
Creates a knowledge base.
|
|
795
|
+
*
|
|
796
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
797
|
+
* @param CreateKnowledgeBaseRequest
|
|
798
|
+
* @return CreateKnowledgeBaseResponse
|
|
799
|
+
* @throws OciError when an error occurs
|
|
800
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/generativeaiagent/CreateKnowledgeBase.ts.html |here} to see how to use CreateKnowledgeBase API.
|
|
801
|
+
*/
|
|
802
|
+
createKnowledgeBase(createKnowledgeBaseRequest) {
|
|
803
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
804
|
+
if (this.logger)
|
|
805
|
+
this.logger.debug("Calling operation GenerativeAiAgentClient#createKnowledgeBase.");
|
|
806
|
+
const operationName = "createKnowledgeBase";
|
|
807
|
+
const apiReferenceLink = "";
|
|
808
|
+
const pathParams = {};
|
|
809
|
+
const queryParams = {};
|
|
810
|
+
let headerParams = {
|
|
811
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
812
|
+
"opc-retry-token": createKnowledgeBaseRequest.opcRetryToken,
|
|
813
|
+
"opc-request-id": createKnowledgeBaseRequest.opcRequestId
|
|
814
|
+
};
|
|
815
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
816
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createKnowledgeBaseRequest.retryConfiguration, specRetryConfiguration);
|
|
817
|
+
if (this.logger)
|
|
818
|
+
retrier.logger = this.logger;
|
|
819
|
+
const request = yield oci_common_1.composeRequest({
|
|
820
|
+
baseEndpoint: this._endpoint,
|
|
821
|
+
defaultHeaders: this._defaultHeaders,
|
|
822
|
+
path: "/knowledgeBases",
|
|
823
|
+
method: "POST",
|
|
824
|
+
bodyContent: common.ObjectSerializer.serialize(createKnowledgeBaseRequest.createKnowledgeBaseDetails, "CreateKnowledgeBaseDetails", model.CreateKnowledgeBaseDetails.getJsonObj),
|
|
825
|
+
pathParams: pathParams,
|
|
826
|
+
headerParams: headerParams,
|
|
827
|
+
queryParams: queryParams
|
|
828
|
+
});
|
|
829
|
+
try {
|
|
830
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
831
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
832
|
+
responseObject: {},
|
|
833
|
+
body: yield response.json(),
|
|
834
|
+
bodyKey: "knowledgeBase",
|
|
835
|
+
bodyModel: model.KnowledgeBase,
|
|
836
|
+
type: "model.KnowledgeBase",
|
|
837
|
+
responseHeaders: [
|
|
838
|
+
{
|
|
839
|
+
value: response.headers.get("location"),
|
|
840
|
+
key: "location",
|
|
841
|
+
dataType: "string"
|
|
842
|
+
},
|
|
843
|
+
{
|
|
844
|
+
value: response.headers.get("content-location"),
|
|
845
|
+
key: "contentLocation",
|
|
846
|
+
dataType: "string"
|
|
847
|
+
},
|
|
848
|
+
{
|
|
849
|
+
value: response.headers.get("etag"),
|
|
850
|
+
key: "etag",
|
|
851
|
+
dataType: "string"
|
|
852
|
+
},
|
|
853
|
+
{
|
|
854
|
+
value: response.headers.get("opc-work-request-id"),
|
|
855
|
+
key: "opcWorkRequestId",
|
|
856
|
+
dataType: "string"
|
|
857
|
+
},
|
|
858
|
+
{
|
|
859
|
+
value: response.headers.get("opc-request-id"),
|
|
860
|
+
key: "opcRequestId",
|
|
861
|
+
dataType: "string"
|
|
862
|
+
}
|
|
863
|
+
]
|
|
864
|
+
});
|
|
865
|
+
return sdkResponse;
|
|
866
|
+
}
|
|
867
|
+
catch (err) {
|
|
868
|
+
throw err;
|
|
869
|
+
}
|
|
870
|
+
});
|
|
871
|
+
}
|
|
872
|
+
/**
|
|
873
|
+
* **DeleteAgent**
|
|
874
|
+
* <p>
|
|
875
|
+
Deletes an agent.
|
|
876
|
+
*
|
|
877
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
878
|
+
* @param DeleteAgentRequest
|
|
879
|
+
* @return DeleteAgentResponse
|
|
880
|
+
* @throws OciError when an error occurs
|
|
881
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/generativeaiagent/DeleteAgent.ts.html |here} to see how to use DeleteAgent API.
|
|
882
|
+
*/
|
|
883
|
+
deleteAgent(deleteAgentRequest) {
|
|
884
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
885
|
+
if (this.logger)
|
|
886
|
+
this.logger.debug("Calling operation GenerativeAiAgentClient#deleteAgent.");
|
|
887
|
+
const operationName = "deleteAgent";
|
|
888
|
+
const apiReferenceLink = "";
|
|
889
|
+
const pathParams = {
|
|
890
|
+
"{agentId}": deleteAgentRequest.agentId
|
|
891
|
+
};
|
|
892
|
+
const queryParams = {};
|
|
893
|
+
let headerParams = {
|
|
894
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
895
|
+
"if-match": deleteAgentRequest.ifMatch,
|
|
896
|
+
"opc-request-id": deleteAgentRequest.opcRequestId
|
|
897
|
+
};
|
|
898
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
899
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteAgentRequest.retryConfiguration, specRetryConfiguration);
|
|
900
|
+
if (this.logger)
|
|
901
|
+
retrier.logger = this.logger;
|
|
902
|
+
const request = yield oci_common_1.composeRequest({
|
|
903
|
+
baseEndpoint: this._endpoint,
|
|
904
|
+
defaultHeaders: this._defaultHeaders,
|
|
905
|
+
path: "/agents/{agentId}",
|
|
906
|
+
method: "DELETE",
|
|
907
|
+
pathParams: pathParams,
|
|
908
|
+
headerParams: headerParams,
|
|
909
|
+
queryParams: queryParams
|
|
910
|
+
});
|
|
911
|
+
try {
|
|
912
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
913
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
914
|
+
responseObject: {},
|
|
915
|
+
responseHeaders: [
|
|
916
|
+
{
|
|
917
|
+
value: response.headers.get("opc-work-request-id"),
|
|
918
|
+
key: "opcWorkRequestId",
|
|
919
|
+
dataType: "string"
|
|
920
|
+
},
|
|
921
|
+
{
|
|
922
|
+
value: response.headers.get("opc-request-id"),
|
|
923
|
+
key: "opcRequestId",
|
|
924
|
+
dataType: "string"
|
|
925
|
+
}
|
|
926
|
+
]
|
|
927
|
+
});
|
|
928
|
+
return sdkResponse;
|
|
929
|
+
}
|
|
930
|
+
catch (err) {
|
|
931
|
+
throw err;
|
|
932
|
+
}
|
|
933
|
+
});
|
|
934
|
+
}
|
|
935
|
+
/**
|
|
936
|
+
* **DeleteAgentEndpoint**
|
|
937
|
+
* <p>
|
|
938
|
+
Deletes an endpoint.
|
|
939
|
+
*
|
|
940
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
941
|
+
* @param DeleteAgentEndpointRequest
|
|
942
|
+
* @return DeleteAgentEndpointResponse
|
|
943
|
+
* @throws OciError when an error occurs
|
|
944
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/generativeaiagent/DeleteAgentEndpoint.ts.html |here} to see how to use DeleteAgentEndpoint API.
|
|
945
|
+
*/
|
|
946
|
+
deleteAgentEndpoint(deleteAgentEndpointRequest) {
|
|
947
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
948
|
+
if (this.logger)
|
|
949
|
+
this.logger.debug("Calling operation GenerativeAiAgentClient#deleteAgentEndpoint.");
|
|
950
|
+
const operationName = "deleteAgentEndpoint";
|
|
951
|
+
const apiReferenceLink = "";
|
|
952
|
+
const pathParams = {
|
|
953
|
+
"{agentEndpointId}": deleteAgentEndpointRequest.agentEndpointId
|
|
954
|
+
};
|
|
955
|
+
const queryParams = {};
|
|
956
|
+
let headerParams = {
|
|
957
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
958
|
+
"if-match": deleteAgentEndpointRequest.ifMatch,
|
|
959
|
+
"opc-request-id": deleteAgentEndpointRequest.opcRequestId
|
|
960
|
+
};
|
|
961
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
962
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteAgentEndpointRequest.retryConfiguration, specRetryConfiguration);
|
|
963
|
+
if (this.logger)
|
|
964
|
+
retrier.logger = this.logger;
|
|
965
|
+
const request = yield oci_common_1.composeRequest({
|
|
966
|
+
baseEndpoint: this._endpoint,
|
|
967
|
+
defaultHeaders: this._defaultHeaders,
|
|
968
|
+
path: "/agentEndpoints/{agentEndpointId}",
|
|
969
|
+
method: "DELETE",
|
|
970
|
+
pathParams: pathParams,
|
|
971
|
+
headerParams: headerParams,
|
|
972
|
+
queryParams: queryParams
|
|
973
|
+
});
|
|
974
|
+
try {
|
|
975
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
976
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
977
|
+
responseObject: {},
|
|
978
|
+
responseHeaders: [
|
|
979
|
+
{
|
|
980
|
+
value: response.headers.get("opc-work-request-id"),
|
|
981
|
+
key: "opcWorkRequestId",
|
|
982
|
+
dataType: "string"
|
|
983
|
+
},
|
|
984
|
+
{
|
|
985
|
+
value: response.headers.get("opc-request-id"),
|
|
986
|
+
key: "opcRequestId",
|
|
987
|
+
dataType: "string"
|
|
988
|
+
}
|
|
989
|
+
]
|
|
990
|
+
});
|
|
991
|
+
return sdkResponse;
|
|
992
|
+
}
|
|
993
|
+
catch (err) {
|
|
994
|
+
throw err;
|
|
995
|
+
}
|
|
996
|
+
});
|
|
997
|
+
}
|
|
998
|
+
/**
|
|
999
|
+
* **DeleteDataIngestionJob**
|
|
1000
|
+
* <p>
|
|
1001
|
+
Deletes a data ingestion job.
|
|
1002
|
+
*
|
|
1003
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1004
|
+
* @param DeleteDataIngestionJobRequest
|
|
1005
|
+
* @return DeleteDataIngestionJobResponse
|
|
1006
|
+
* @throws OciError when an error occurs
|
|
1007
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/generativeaiagent/DeleteDataIngestionJob.ts.html |here} to see how to use DeleteDataIngestionJob API.
|
|
1008
|
+
*/
|
|
1009
|
+
deleteDataIngestionJob(deleteDataIngestionJobRequest) {
|
|
1010
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1011
|
+
if (this.logger)
|
|
1012
|
+
this.logger.debug("Calling operation GenerativeAiAgentClient#deleteDataIngestionJob.");
|
|
1013
|
+
const operationName = "deleteDataIngestionJob";
|
|
1014
|
+
const apiReferenceLink = "";
|
|
1015
|
+
const pathParams = {
|
|
1016
|
+
"{dataIngestionJobId}": deleteDataIngestionJobRequest.dataIngestionJobId
|
|
1017
|
+
};
|
|
1018
|
+
const queryParams = {};
|
|
1019
|
+
let headerParams = {
|
|
1020
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1021
|
+
"if-match": deleteDataIngestionJobRequest.ifMatch,
|
|
1022
|
+
"opc-request-id": deleteDataIngestionJobRequest.opcRequestId
|
|
1023
|
+
};
|
|
1024
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1025
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteDataIngestionJobRequest.retryConfiguration, specRetryConfiguration);
|
|
1026
|
+
if (this.logger)
|
|
1027
|
+
retrier.logger = this.logger;
|
|
1028
|
+
const request = yield oci_common_1.composeRequest({
|
|
1029
|
+
baseEndpoint: this._endpoint,
|
|
1030
|
+
defaultHeaders: this._defaultHeaders,
|
|
1031
|
+
path: "/dataIngestionJobs/{dataIngestionJobId}",
|
|
1032
|
+
method: "DELETE",
|
|
1033
|
+
pathParams: pathParams,
|
|
1034
|
+
headerParams: headerParams,
|
|
1035
|
+
queryParams: queryParams
|
|
1036
|
+
});
|
|
1037
|
+
try {
|
|
1038
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1039
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1040
|
+
responseObject: {},
|
|
1041
|
+
responseHeaders: [
|
|
1042
|
+
{
|
|
1043
|
+
value: response.headers.get("opc-work-request-id"),
|
|
1044
|
+
key: "opcWorkRequestId",
|
|
1045
|
+
dataType: "string"
|
|
1046
|
+
},
|
|
1047
|
+
{
|
|
1048
|
+
value: response.headers.get("opc-request-id"),
|
|
1049
|
+
key: "opcRequestId",
|
|
1050
|
+
dataType: "string"
|
|
1051
|
+
}
|
|
1052
|
+
]
|
|
1053
|
+
});
|
|
1054
|
+
return sdkResponse;
|
|
1055
|
+
}
|
|
1056
|
+
catch (err) {
|
|
1057
|
+
throw err;
|
|
1058
|
+
}
|
|
1059
|
+
});
|
|
1060
|
+
}
|
|
1061
|
+
/**
|
|
1062
|
+
* **DeleteDataSource**
|
|
1063
|
+
* <p>
|
|
1064
|
+
Deletes a data source.
|
|
1065
|
+
*
|
|
1066
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1067
|
+
* @param DeleteDataSourceRequest
|
|
1068
|
+
* @return DeleteDataSourceResponse
|
|
1069
|
+
* @throws OciError when an error occurs
|
|
1070
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/generativeaiagent/DeleteDataSource.ts.html |here} to see how to use DeleteDataSource API.
|
|
1071
|
+
*/
|
|
1072
|
+
deleteDataSource(deleteDataSourceRequest) {
|
|
1073
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1074
|
+
if (this.logger)
|
|
1075
|
+
this.logger.debug("Calling operation GenerativeAiAgentClient#deleteDataSource.");
|
|
1076
|
+
const operationName = "deleteDataSource";
|
|
1077
|
+
const apiReferenceLink = "";
|
|
1078
|
+
const pathParams = {
|
|
1079
|
+
"{dataSourceId}": deleteDataSourceRequest.dataSourceId
|
|
1080
|
+
};
|
|
1081
|
+
const queryParams = {};
|
|
1082
|
+
let headerParams = {
|
|
1083
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1084
|
+
"if-match": deleteDataSourceRequest.ifMatch,
|
|
1085
|
+
"opc-request-id": deleteDataSourceRequest.opcRequestId
|
|
1086
|
+
};
|
|
1087
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1088
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteDataSourceRequest.retryConfiguration, specRetryConfiguration);
|
|
1089
|
+
if (this.logger)
|
|
1090
|
+
retrier.logger = this.logger;
|
|
1091
|
+
const request = yield oci_common_1.composeRequest({
|
|
1092
|
+
baseEndpoint: this._endpoint,
|
|
1093
|
+
defaultHeaders: this._defaultHeaders,
|
|
1094
|
+
path: "/dataSources/{dataSourceId}",
|
|
1095
|
+
method: "DELETE",
|
|
1096
|
+
pathParams: pathParams,
|
|
1097
|
+
headerParams: headerParams,
|
|
1098
|
+
queryParams: queryParams
|
|
1099
|
+
});
|
|
1100
|
+
try {
|
|
1101
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1102
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1103
|
+
responseObject: {},
|
|
1104
|
+
responseHeaders: [
|
|
1105
|
+
{
|
|
1106
|
+
value: response.headers.get("opc-work-request-id"),
|
|
1107
|
+
key: "opcWorkRequestId",
|
|
1108
|
+
dataType: "string"
|
|
1109
|
+
},
|
|
1110
|
+
{
|
|
1111
|
+
value: response.headers.get("opc-request-id"),
|
|
1112
|
+
key: "opcRequestId",
|
|
1113
|
+
dataType: "string"
|
|
1114
|
+
}
|
|
1115
|
+
]
|
|
1116
|
+
});
|
|
1117
|
+
return sdkResponse;
|
|
1118
|
+
}
|
|
1119
|
+
catch (err) {
|
|
1120
|
+
throw err;
|
|
1121
|
+
}
|
|
1122
|
+
});
|
|
1123
|
+
}
|
|
1124
|
+
/**
|
|
1125
|
+
* **DeleteKnowledgeBase**
|
|
1126
|
+
* <p>
|
|
1127
|
+
Deletes a knowledge base.
|
|
1128
|
+
*
|
|
1129
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1130
|
+
* @param DeleteKnowledgeBaseRequest
|
|
1131
|
+
* @return DeleteKnowledgeBaseResponse
|
|
1132
|
+
* @throws OciError when an error occurs
|
|
1133
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/generativeaiagent/DeleteKnowledgeBase.ts.html |here} to see how to use DeleteKnowledgeBase API.
|
|
1134
|
+
*/
|
|
1135
|
+
deleteKnowledgeBase(deleteKnowledgeBaseRequest) {
|
|
1136
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1137
|
+
if (this.logger)
|
|
1138
|
+
this.logger.debug("Calling operation GenerativeAiAgentClient#deleteKnowledgeBase.");
|
|
1139
|
+
const operationName = "deleteKnowledgeBase";
|
|
1140
|
+
const apiReferenceLink = "";
|
|
1141
|
+
const pathParams = {
|
|
1142
|
+
"{knowledgeBaseId}": deleteKnowledgeBaseRequest.knowledgeBaseId
|
|
1143
|
+
};
|
|
1144
|
+
const queryParams = {};
|
|
1145
|
+
let headerParams = {
|
|
1146
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1147
|
+
"if-match": deleteKnowledgeBaseRequest.ifMatch,
|
|
1148
|
+
"opc-request-id": deleteKnowledgeBaseRequest.opcRequestId
|
|
1149
|
+
};
|
|
1150
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1151
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteKnowledgeBaseRequest.retryConfiguration, specRetryConfiguration);
|
|
1152
|
+
if (this.logger)
|
|
1153
|
+
retrier.logger = this.logger;
|
|
1154
|
+
const request = yield oci_common_1.composeRequest({
|
|
1155
|
+
baseEndpoint: this._endpoint,
|
|
1156
|
+
defaultHeaders: this._defaultHeaders,
|
|
1157
|
+
path: "/knowledgeBases/{knowledgeBaseId}",
|
|
1158
|
+
method: "DELETE",
|
|
1159
|
+
pathParams: pathParams,
|
|
1160
|
+
headerParams: headerParams,
|
|
1161
|
+
queryParams: queryParams
|
|
1162
|
+
});
|
|
1163
|
+
try {
|
|
1164
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1165
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1166
|
+
responseObject: {},
|
|
1167
|
+
responseHeaders: [
|
|
1168
|
+
{
|
|
1169
|
+
value: response.headers.get("opc-work-request-id"),
|
|
1170
|
+
key: "opcWorkRequestId",
|
|
1171
|
+
dataType: "string"
|
|
1172
|
+
},
|
|
1173
|
+
{
|
|
1174
|
+
value: response.headers.get("opc-request-id"),
|
|
1175
|
+
key: "opcRequestId",
|
|
1176
|
+
dataType: "string"
|
|
1177
|
+
}
|
|
1178
|
+
]
|
|
1179
|
+
});
|
|
1180
|
+
return sdkResponse;
|
|
1181
|
+
}
|
|
1182
|
+
catch (err) {
|
|
1183
|
+
throw err;
|
|
1184
|
+
}
|
|
1185
|
+
});
|
|
1186
|
+
}
|
|
1187
|
+
/**
|
|
1188
|
+
* **GetAgent**
|
|
1189
|
+
* <p>
|
|
1190
|
+
Gets information about an agent.
|
|
1191
|
+
*
|
|
1192
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1193
|
+
* @param GetAgentRequest
|
|
1194
|
+
* @return GetAgentResponse
|
|
1195
|
+
* @throws OciError when an error occurs
|
|
1196
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/generativeaiagent/GetAgent.ts.html |here} to see how to use GetAgent API.
|
|
1197
|
+
*/
|
|
1198
|
+
getAgent(getAgentRequest) {
|
|
1199
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1200
|
+
if (this.logger)
|
|
1201
|
+
this.logger.debug("Calling operation GenerativeAiAgentClient#getAgent.");
|
|
1202
|
+
const operationName = "getAgent";
|
|
1203
|
+
const apiReferenceLink = "";
|
|
1204
|
+
const pathParams = {
|
|
1205
|
+
"{agentId}": getAgentRequest.agentId
|
|
1206
|
+
};
|
|
1207
|
+
const queryParams = {};
|
|
1208
|
+
let headerParams = {
|
|
1209
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1210
|
+
"opc-request-id": getAgentRequest.opcRequestId
|
|
1211
|
+
};
|
|
1212
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1213
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getAgentRequest.retryConfiguration, specRetryConfiguration);
|
|
1214
|
+
if (this.logger)
|
|
1215
|
+
retrier.logger = this.logger;
|
|
1216
|
+
const request = yield oci_common_1.composeRequest({
|
|
1217
|
+
baseEndpoint: this._endpoint,
|
|
1218
|
+
defaultHeaders: this._defaultHeaders,
|
|
1219
|
+
path: "/agents/{agentId}",
|
|
1220
|
+
method: "GET",
|
|
1221
|
+
pathParams: pathParams,
|
|
1222
|
+
headerParams: headerParams,
|
|
1223
|
+
queryParams: queryParams
|
|
1224
|
+
});
|
|
1225
|
+
try {
|
|
1226
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1227
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1228
|
+
responseObject: {},
|
|
1229
|
+
body: yield response.json(),
|
|
1230
|
+
bodyKey: "agent",
|
|
1231
|
+
bodyModel: model.Agent,
|
|
1232
|
+
type: "model.Agent",
|
|
1233
|
+
responseHeaders: [
|
|
1234
|
+
{
|
|
1235
|
+
value: response.headers.get("etag"),
|
|
1236
|
+
key: "etag",
|
|
1237
|
+
dataType: "string"
|
|
1238
|
+
},
|
|
1239
|
+
{
|
|
1240
|
+
value: response.headers.get("opc-request-id"),
|
|
1241
|
+
key: "opcRequestId",
|
|
1242
|
+
dataType: "string"
|
|
1243
|
+
}
|
|
1244
|
+
]
|
|
1245
|
+
});
|
|
1246
|
+
return sdkResponse;
|
|
1247
|
+
}
|
|
1248
|
+
catch (err) {
|
|
1249
|
+
throw err;
|
|
1250
|
+
}
|
|
1251
|
+
});
|
|
1252
|
+
}
|
|
1253
|
+
/**
|
|
1254
|
+
* **GetAgentEndpoint**
|
|
1255
|
+
* <p>
|
|
1256
|
+
Gets information about an endpoint.
|
|
1257
|
+
*
|
|
1258
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1259
|
+
* @param GetAgentEndpointRequest
|
|
1260
|
+
* @return GetAgentEndpointResponse
|
|
1261
|
+
* @throws OciError when an error occurs
|
|
1262
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/generativeaiagent/GetAgentEndpoint.ts.html |here} to see how to use GetAgentEndpoint API.
|
|
1263
|
+
*/
|
|
1264
|
+
getAgentEndpoint(getAgentEndpointRequest) {
|
|
1265
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1266
|
+
if (this.logger)
|
|
1267
|
+
this.logger.debug("Calling operation GenerativeAiAgentClient#getAgentEndpoint.");
|
|
1268
|
+
const operationName = "getAgentEndpoint";
|
|
1269
|
+
const apiReferenceLink = "";
|
|
1270
|
+
const pathParams = {
|
|
1271
|
+
"{agentEndpointId}": getAgentEndpointRequest.agentEndpointId
|
|
1272
|
+
};
|
|
1273
|
+
const queryParams = {};
|
|
1274
|
+
let headerParams = {
|
|
1275
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1276
|
+
"opc-request-id": getAgentEndpointRequest.opcRequestId
|
|
1277
|
+
};
|
|
1278
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1279
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getAgentEndpointRequest.retryConfiguration, specRetryConfiguration);
|
|
1280
|
+
if (this.logger)
|
|
1281
|
+
retrier.logger = this.logger;
|
|
1282
|
+
const request = yield oci_common_1.composeRequest({
|
|
1283
|
+
baseEndpoint: this._endpoint,
|
|
1284
|
+
defaultHeaders: this._defaultHeaders,
|
|
1285
|
+
path: "/agentEndpoints/{agentEndpointId}",
|
|
1286
|
+
method: "GET",
|
|
1287
|
+
pathParams: pathParams,
|
|
1288
|
+
headerParams: headerParams,
|
|
1289
|
+
queryParams: queryParams
|
|
1290
|
+
});
|
|
1291
|
+
try {
|
|
1292
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1293
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1294
|
+
responseObject: {},
|
|
1295
|
+
body: yield response.json(),
|
|
1296
|
+
bodyKey: "agentEndpoint",
|
|
1297
|
+
bodyModel: model.AgentEndpoint,
|
|
1298
|
+
type: "model.AgentEndpoint",
|
|
1299
|
+
responseHeaders: [
|
|
1300
|
+
{
|
|
1301
|
+
value: response.headers.get("etag"),
|
|
1302
|
+
key: "etag",
|
|
1303
|
+
dataType: "string"
|
|
1304
|
+
},
|
|
1305
|
+
{
|
|
1306
|
+
value: response.headers.get("opc-request-id"),
|
|
1307
|
+
key: "opcRequestId",
|
|
1308
|
+
dataType: "string"
|
|
1309
|
+
}
|
|
1310
|
+
]
|
|
1311
|
+
});
|
|
1312
|
+
return sdkResponse;
|
|
1313
|
+
}
|
|
1314
|
+
catch (err) {
|
|
1315
|
+
throw err;
|
|
1316
|
+
}
|
|
1317
|
+
});
|
|
1318
|
+
}
|
|
1319
|
+
/**
|
|
1320
|
+
* **GetDataIngestionJob**
|
|
1321
|
+
* <p>
|
|
1322
|
+
Gets information about a data ingestion job.
|
|
1323
|
+
*
|
|
1324
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1325
|
+
* @param GetDataIngestionJobRequest
|
|
1326
|
+
* @return GetDataIngestionJobResponse
|
|
1327
|
+
* @throws OciError when an error occurs
|
|
1328
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/generativeaiagent/GetDataIngestionJob.ts.html |here} to see how to use GetDataIngestionJob API.
|
|
1329
|
+
*/
|
|
1330
|
+
getDataIngestionJob(getDataIngestionJobRequest) {
|
|
1331
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1332
|
+
if (this.logger)
|
|
1333
|
+
this.logger.debug("Calling operation GenerativeAiAgentClient#getDataIngestionJob.");
|
|
1334
|
+
const operationName = "getDataIngestionJob";
|
|
1335
|
+
const apiReferenceLink = "";
|
|
1336
|
+
const pathParams = {
|
|
1337
|
+
"{dataIngestionJobId}": getDataIngestionJobRequest.dataIngestionJobId
|
|
1338
|
+
};
|
|
1339
|
+
const queryParams = {};
|
|
1340
|
+
let headerParams = {
|
|
1341
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1342
|
+
"opc-request-id": getDataIngestionJobRequest.opcRequestId
|
|
1343
|
+
};
|
|
1344
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1345
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getDataIngestionJobRequest.retryConfiguration, specRetryConfiguration);
|
|
1346
|
+
if (this.logger)
|
|
1347
|
+
retrier.logger = this.logger;
|
|
1348
|
+
const request = yield oci_common_1.composeRequest({
|
|
1349
|
+
baseEndpoint: this._endpoint,
|
|
1350
|
+
defaultHeaders: this._defaultHeaders,
|
|
1351
|
+
path: "/dataIngestionJobs/{dataIngestionJobId}",
|
|
1352
|
+
method: "GET",
|
|
1353
|
+
pathParams: pathParams,
|
|
1354
|
+
headerParams: headerParams,
|
|
1355
|
+
queryParams: queryParams
|
|
1356
|
+
});
|
|
1357
|
+
try {
|
|
1358
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1359
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1360
|
+
responseObject: {},
|
|
1361
|
+
body: yield response.json(),
|
|
1362
|
+
bodyKey: "dataIngestionJob",
|
|
1363
|
+
bodyModel: model.DataIngestionJob,
|
|
1364
|
+
type: "model.DataIngestionJob",
|
|
1365
|
+
responseHeaders: [
|
|
1366
|
+
{
|
|
1367
|
+
value: response.headers.get("etag"),
|
|
1368
|
+
key: "etag",
|
|
1369
|
+
dataType: "string"
|
|
1370
|
+
},
|
|
1371
|
+
{
|
|
1372
|
+
value: response.headers.get("opc-request-id"),
|
|
1373
|
+
key: "opcRequestId",
|
|
1374
|
+
dataType: "string"
|
|
1375
|
+
}
|
|
1376
|
+
]
|
|
1377
|
+
});
|
|
1378
|
+
return sdkResponse;
|
|
1379
|
+
}
|
|
1380
|
+
catch (err) {
|
|
1381
|
+
throw err;
|
|
1382
|
+
}
|
|
1383
|
+
});
|
|
1384
|
+
}
|
|
1385
|
+
/**
|
|
1386
|
+
* **GetDataIngestionJobLogContent**
|
|
1387
|
+
* <p>
|
|
1388
|
+
Returns the raw log file for the specified data ingestion job in text format.
|
|
1389
|
+
*
|
|
1390
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1391
|
+
* @param GetDataIngestionJobLogContentRequest
|
|
1392
|
+
* @return GetDataIngestionJobLogContentResponse
|
|
1393
|
+
* @throws OciError when an error occurs
|
|
1394
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/generativeaiagent/GetDataIngestionJobLogContent.ts.html |here} to see how to use GetDataIngestionJobLogContent API.
|
|
1395
|
+
*/
|
|
1396
|
+
getDataIngestionJobLogContent(getDataIngestionJobLogContentRequest) {
|
|
1397
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1398
|
+
if (this.logger)
|
|
1399
|
+
this.logger.debug("Calling operation GenerativeAiAgentClient#getDataIngestionJobLogContent.");
|
|
1400
|
+
const operationName = "getDataIngestionJobLogContent";
|
|
1401
|
+
const apiReferenceLink = "";
|
|
1402
|
+
const pathParams = {
|
|
1403
|
+
"{dataIngestionJobId}": getDataIngestionJobLogContentRequest.dataIngestionJobId
|
|
1404
|
+
};
|
|
1405
|
+
const queryParams = {};
|
|
1406
|
+
let headerParams = {
|
|
1407
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1408
|
+
"opc-request-id": getDataIngestionJobLogContentRequest.opcRequestId
|
|
1409
|
+
};
|
|
1410
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1411
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getDataIngestionJobLogContentRequest.retryConfiguration, specRetryConfiguration);
|
|
1412
|
+
if (this.logger)
|
|
1413
|
+
retrier.logger = this.logger;
|
|
1414
|
+
const request = yield oci_common_1.composeRequest({
|
|
1415
|
+
baseEndpoint: this._endpoint,
|
|
1416
|
+
defaultHeaders: this._defaultHeaders,
|
|
1417
|
+
path: "/dataIngestionJobs/{dataIngestionJobId}/logs/content",
|
|
1418
|
+
method: "GET",
|
|
1419
|
+
pathParams: pathParams,
|
|
1420
|
+
headerParams: headerParams,
|
|
1421
|
+
queryParams: queryParams
|
|
1422
|
+
});
|
|
1423
|
+
try {
|
|
1424
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1425
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1426
|
+
responseObject: {},
|
|
1427
|
+
body: response.body,
|
|
1428
|
+
bodyKey: "value",
|
|
1429
|
+
bodyModel: "string",
|
|
1430
|
+
responseHeaders: [
|
|
1431
|
+
{
|
|
1432
|
+
value: response.headers.get("opc-request-id"),
|
|
1433
|
+
key: "opcRequestId",
|
|
1434
|
+
dataType: "string"
|
|
1435
|
+
}
|
|
1436
|
+
]
|
|
1437
|
+
});
|
|
1438
|
+
return sdkResponse;
|
|
1439
|
+
}
|
|
1440
|
+
catch (err) {
|
|
1441
|
+
throw err;
|
|
1442
|
+
}
|
|
1443
|
+
});
|
|
1444
|
+
}
|
|
1445
|
+
/**
|
|
1446
|
+
* **GetDataSource**
|
|
1447
|
+
* <p>
|
|
1448
|
+
Gets information about a data source.
|
|
1449
|
+
*
|
|
1450
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1451
|
+
* @param GetDataSourceRequest
|
|
1452
|
+
* @return GetDataSourceResponse
|
|
1453
|
+
* @throws OciError when an error occurs
|
|
1454
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/generativeaiagent/GetDataSource.ts.html |here} to see how to use GetDataSource API.
|
|
1455
|
+
*/
|
|
1456
|
+
getDataSource(getDataSourceRequest) {
|
|
1457
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1458
|
+
if (this.logger)
|
|
1459
|
+
this.logger.debug("Calling operation GenerativeAiAgentClient#getDataSource.");
|
|
1460
|
+
const operationName = "getDataSource";
|
|
1461
|
+
const apiReferenceLink = "";
|
|
1462
|
+
const pathParams = {
|
|
1463
|
+
"{dataSourceId}": getDataSourceRequest.dataSourceId
|
|
1464
|
+
};
|
|
1465
|
+
const queryParams = {};
|
|
1466
|
+
let headerParams = {
|
|
1467
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1468
|
+
"opc-request-id": getDataSourceRequest.opcRequestId
|
|
1469
|
+
};
|
|
1470
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1471
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getDataSourceRequest.retryConfiguration, specRetryConfiguration);
|
|
1472
|
+
if (this.logger)
|
|
1473
|
+
retrier.logger = this.logger;
|
|
1474
|
+
const request = yield oci_common_1.composeRequest({
|
|
1475
|
+
baseEndpoint: this._endpoint,
|
|
1476
|
+
defaultHeaders: this._defaultHeaders,
|
|
1477
|
+
path: "/dataSources/{dataSourceId}",
|
|
1478
|
+
method: "GET",
|
|
1479
|
+
pathParams: pathParams,
|
|
1480
|
+
headerParams: headerParams,
|
|
1481
|
+
queryParams: queryParams
|
|
1482
|
+
});
|
|
1483
|
+
try {
|
|
1484
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1485
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1486
|
+
responseObject: {},
|
|
1487
|
+
body: yield response.json(),
|
|
1488
|
+
bodyKey: "dataSource",
|
|
1489
|
+
bodyModel: model.DataSource,
|
|
1490
|
+
type: "model.DataSource",
|
|
1491
|
+
responseHeaders: [
|
|
1492
|
+
{
|
|
1493
|
+
value: response.headers.get("etag"),
|
|
1494
|
+
key: "etag",
|
|
1495
|
+
dataType: "string"
|
|
1496
|
+
},
|
|
1497
|
+
{
|
|
1498
|
+
value: response.headers.get("opc-request-id"),
|
|
1499
|
+
key: "opcRequestId",
|
|
1500
|
+
dataType: "string"
|
|
1501
|
+
}
|
|
1502
|
+
]
|
|
1503
|
+
});
|
|
1504
|
+
return sdkResponse;
|
|
1505
|
+
}
|
|
1506
|
+
catch (err) {
|
|
1507
|
+
throw err;
|
|
1508
|
+
}
|
|
1509
|
+
});
|
|
1510
|
+
}
|
|
1511
|
+
/**
|
|
1512
|
+
* **GetKnowledgeBase**
|
|
1513
|
+
* <p>
|
|
1514
|
+
Gets information about a knowledge base.
|
|
1515
|
+
*
|
|
1516
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1517
|
+
* @param GetKnowledgeBaseRequest
|
|
1518
|
+
* @return GetKnowledgeBaseResponse
|
|
1519
|
+
* @throws OciError when an error occurs
|
|
1520
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/generativeaiagent/GetKnowledgeBase.ts.html |here} to see how to use GetKnowledgeBase API.
|
|
1521
|
+
*/
|
|
1522
|
+
getKnowledgeBase(getKnowledgeBaseRequest) {
|
|
1523
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1524
|
+
if (this.logger)
|
|
1525
|
+
this.logger.debug("Calling operation GenerativeAiAgentClient#getKnowledgeBase.");
|
|
1526
|
+
const operationName = "getKnowledgeBase";
|
|
1527
|
+
const apiReferenceLink = "";
|
|
1528
|
+
const pathParams = {
|
|
1529
|
+
"{knowledgeBaseId}": getKnowledgeBaseRequest.knowledgeBaseId
|
|
1530
|
+
};
|
|
1531
|
+
const queryParams = {};
|
|
1532
|
+
let headerParams = {
|
|
1533
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1534
|
+
"opc-request-id": getKnowledgeBaseRequest.opcRequestId
|
|
1535
|
+
};
|
|
1536
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1537
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getKnowledgeBaseRequest.retryConfiguration, specRetryConfiguration);
|
|
1538
|
+
if (this.logger)
|
|
1539
|
+
retrier.logger = this.logger;
|
|
1540
|
+
const request = yield oci_common_1.composeRequest({
|
|
1541
|
+
baseEndpoint: this._endpoint,
|
|
1542
|
+
defaultHeaders: this._defaultHeaders,
|
|
1543
|
+
path: "/knowledgeBases/{knowledgeBaseId}",
|
|
1544
|
+
method: "GET",
|
|
1545
|
+
pathParams: pathParams,
|
|
1546
|
+
headerParams: headerParams,
|
|
1547
|
+
queryParams: queryParams
|
|
1548
|
+
});
|
|
1549
|
+
try {
|
|
1550
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1551
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1552
|
+
responseObject: {},
|
|
1553
|
+
body: yield response.json(),
|
|
1554
|
+
bodyKey: "knowledgeBase",
|
|
1555
|
+
bodyModel: model.KnowledgeBase,
|
|
1556
|
+
type: "model.KnowledgeBase",
|
|
1557
|
+
responseHeaders: [
|
|
1558
|
+
{
|
|
1559
|
+
value: response.headers.get("etag"),
|
|
1560
|
+
key: "etag",
|
|
1561
|
+
dataType: "string"
|
|
1562
|
+
},
|
|
1563
|
+
{
|
|
1564
|
+
value: response.headers.get("opc-request-id"),
|
|
1565
|
+
key: "opcRequestId",
|
|
1566
|
+
dataType: "string"
|
|
1567
|
+
}
|
|
1568
|
+
]
|
|
1569
|
+
});
|
|
1570
|
+
return sdkResponse;
|
|
1571
|
+
}
|
|
1572
|
+
catch (err) {
|
|
1573
|
+
throw err;
|
|
1574
|
+
}
|
|
1575
|
+
});
|
|
1576
|
+
}
|
|
1577
|
+
/**
|
|
1578
|
+
* **GetWorkRequest**
|
|
1579
|
+
* <p>
|
|
1580
|
+
Gets the details of a work request.
|
|
1581
|
+
*
|
|
1582
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1583
|
+
* @param GetWorkRequestRequest
|
|
1584
|
+
* @return GetWorkRequestResponse
|
|
1585
|
+
* @throws OciError when an error occurs
|
|
1586
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/generativeaiagent/GetWorkRequest.ts.html |here} to see how to use GetWorkRequest API.
|
|
1587
|
+
*/
|
|
1588
|
+
getWorkRequest(getWorkRequestRequest) {
|
|
1589
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1590
|
+
if (this.logger)
|
|
1591
|
+
this.logger.debug("Calling operation GenerativeAiAgentClient#getWorkRequest.");
|
|
1592
|
+
const operationName = "getWorkRequest";
|
|
1593
|
+
const apiReferenceLink = "";
|
|
1594
|
+
const pathParams = {
|
|
1595
|
+
"{workRequestId}": getWorkRequestRequest.workRequestId
|
|
1596
|
+
};
|
|
1597
|
+
const queryParams = {};
|
|
1598
|
+
let headerParams = {
|
|
1599
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1600
|
+
"opc-request-id": getWorkRequestRequest.opcRequestId
|
|
1601
|
+
};
|
|
1602
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1603
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getWorkRequestRequest.retryConfiguration, specRetryConfiguration);
|
|
1604
|
+
if (this.logger)
|
|
1605
|
+
retrier.logger = this.logger;
|
|
1606
|
+
const request = yield oci_common_1.composeRequest({
|
|
1607
|
+
baseEndpoint: this._endpoint,
|
|
1608
|
+
defaultHeaders: this._defaultHeaders,
|
|
1609
|
+
path: "/workRequests/{workRequestId}",
|
|
1610
|
+
method: "GET",
|
|
1611
|
+
pathParams: pathParams,
|
|
1612
|
+
headerParams: headerParams,
|
|
1613
|
+
queryParams: queryParams
|
|
1614
|
+
});
|
|
1615
|
+
try {
|
|
1616
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1617
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1618
|
+
responseObject: {},
|
|
1619
|
+
body: yield response.json(),
|
|
1620
|
+
bodyKey: "workRequest",
|
|
1621
|
+
bodyModel: model.WorkRequest,
|
|
1622
|
+
type: "model.WorkRequest",
|
|
1623
|
+
responseHeaders: [
|
|
1624
|
+
{
|
|
1625
|
+
value: response.headers.get("etag"),
|
|
1626
|
+
key: "etag",
|
|
1627
|
+
dataType: "string"
|
|
1628
|
+
},
|
|
1629
|
+
{
|
|
1630
|
+
value: response.headers.get("opc-request-id"),
|
|
1631
|
+
key: "opcRequestId",
|
|
1632
|
+
dataType: "string"
|
|
1633
|
+
},
|
|
1634
|
+
{
|
|
1635
|
+
value: response.headers.get("retry-after"),
|
|
1636
|
+
key: "retryAfter",
|
|
1637
|
+
dataType: "number"
|
|
1638
|
+
}
|
|
1639
|
+
]
|
|
1640
|
+
});
|
|
1641
|
+
return sdkResponse;
|
|
1642
|
+
}
|
|
1643
|
+
catch (err) {
|
|
1644
|
+
throw err;
|
|
1645
|
+
}
|
|
1646
|
+
});
|
|
1647
|
+
}
|
|
1648
|
+
/**
|
|
1649
|
+
* **ListAgentEndpoints**
|
|
1650
|
+
* <p>
|
|
1651
|
+
Gets a list of endpoints.
|
|
1652
|
+
*
|
|
1653
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1654
|
+
* @param ListAgentEndpointsRequest
|
|
1655
|
+
* @return ListAgentEndpointsResponse
|
|
1656
|
+
* @throws OciError when an error occurs
|
|
1657
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/generativeaiagent/ListAgentEndpoints.ts.html |here} to see how to use ListAgentEndpoints API.
|
|
1658
|
+
*/
|
|
1659
|
+
listAgentEndpoints(listAgentEndpointsRequest) {
|
|
1660
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1661
|
+
if (this.logger)
|
|
1662
|
+
this.logger.debug("Calling operation GenerativeAiAgentClient#listAgentEndpoints.");
|
|
1663
|
+
const operationName = "listAgentEndpoints";
|
|
1664
|
+
const apiReferenceLink = "";
|
|
1665
|
+
const pathParams = {};
|
|
1666
|
+
const queryParams = {
|
|
1667
|
+
"compartmentId": listAgentEndpointsRequest.compartmentId,
|
|
1668
|
+
"agentId": listAgentEndpointsRequest.agentId,
|
|
1669
|
+
"lifecycleState": listAgentEndpointsRequest.lifecycleState,
|
|
1670
|
+
"displayName": listAgentEndpointsRequest.displayName,
|
|
1671
|
+
"limit": listAgentEndpointsRequest.limit,
|
|
1672
|
+
"page": listAgentEndpointsRequest.page,
|
|
1673
|
+
"sortOrder": listAgentEndpointsRequest.sortOrder,
|
|
1674
|
+
"sortBy": listAgentEndpointsRequest.sortBy
|
|
1675
|
+
};
|
|
1676
|
+
let headerParams = {
|
|
1677
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1678
|
+
"opc-request-id": listAgentEndpointsRequest.opcRequestId
|
|
1679
|
+
};
|
|
1680
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1681
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listAgentEndpointsRequest.retryConfiguration, specRetryConfiguration);
|
|
1682
|
+
if (this.logger)
|
|
1683
|
+
retrier.logger = this.logger;
|
|
1684
|
+
const request = yield oci_common_1.composeRequest({
|
|
1685
|
+
baseEndpoint: this._endpoint,
|
|
1686
|
+
defaultHeaders: this._defaultHeaders,
|
|
1687
|
+
path: "/agentEndpoints",
|
|
1688
|
+
method: "GET",
|
|
1689
|
+
pathParams: pathParams,
|
|
1690
|
+
headerParams: headerParams,
|
|
1691
|
+
queryParams: queryParams
|
|
1692
|
+
});
|
|
1693
|
+
try {
|
|
1694
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1695
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1696
|
+
responseObject: {},
|
|
1697
|
+
body: yield response.json(),
|
|
1698
|
+
bodyKey: "agentEndpointCollection",
|
|
1699
|
+
bodyModel: model.AgentEndpointCollection,
|
|
1700
|
+
type: "model.AgentEndpointCollection",
|
|
1701
|
+
responseHeaders: [
|
|
1702
|
+
{
|
|
1703
|
+
value: response.headers.get("opc-request-id"),
|
|
1704
|
+
key: "opcRequestId",
|
|
1705
|
+
dataType: "string"
|
|
1706
|
+
},
|
|
1707
|
+
{
|
|
1708
|
+
value: response.headers.get("opc-next-page"),
|
|
1709
|
+
key: "opcNextPage",
|
|
1710
|
+
dataType: "string"
|
|
1711
|
+
}
|
|
1712
|
+
]
|
|
1713
|
+
});
|
|
1714
|
+
return sdkResponse;
|
|
1715
|
+
}
|
|
1716
|
+
catch (err) {
|
|
1717
|
+
throw err;
|
|
1718
|
+
}
|
|
1719
|
+
});
|
|
1720
|
+
}
|
|
1721
|
+
/**
|
|
1722
|
+
* **ListAgents**
|
|
1723
|
+
* <p>
|
|
1724
|
+
Gets a list of agents.
|
|
1725
|
+
*
|
|
1726
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1727
|
+
* @param ListAgentsRequest
|
|
1728
|
+
* @return ListAgentsResponse
|
|
1729
|
+
* @throws OciError when an error occurs
|
|
1730
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/generativeaiagent/ListAgents.ts.html |here} to see how to use ListAgents API.
|
|
1731
|
+
*/
|
|
1732
|
+
listAgents(listAgentsRequest) {
|
|
1733
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1734
|
+
if (this.logger)
|
|
1735
|
+
this.logger.debug("Calling operation GenerativeAiAgentClient#listAgents.");
|
|
1736
|
+
const operationName = "listAgents";
|
|
1737
|
+
const apiReferenceLink = "";
|
|
1738
|
+
const pathParams = {};
|
|
1739
|
+
const queryParams = {
|
|
1740
|
+
"compartmentId": listAgentsRequest.compartmentId,
|
|
1741
|
+
"lifecycleState": listAgentsRequest.lifecycleState,
|
|
1742
|
+
"displayName": listAgentsRequest.displayName,
|
|
1743
|
+
"limit": listAgentsRequest.limit,
|
|
1744
|
+
"page": listAgentsRequest.page,
|
|
1745
|
+
"sortOrder": listAgentsRequest.sortOrder,
|
|
1746
|
+
"sortBy": listAgentsRequest.sortBy
|
|
1747
|
+
};
|
|
1748
|
+
let headerParams = {
|
|
1749
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1750
|
+
"opc-request-id": listAgentsRequest.opcRequestId
|
|
1751
|
+
};
|
|
1752
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1753
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listAgentsRequest.retryConfiguration, specRetryConfiguration);
|
|
1754
|
+
if (this.logger)
|
|
1755
|
+
retrier.logger = this.logger;
|
|
1756
|
+
const request = yield oci_common_1.composeRequest({
|
|
1757
|
+
baseEndpoint: this._endpoint,
|
|
1758
|
+
defaultHeaders: this._defaultHeaders,
|
|
1759
|
+
path: "/agents",
|
|
1760
|
+
method: "GET",
|
|
1761
|
+
pathParams: pathParams,
|
|
1762
|
+
headerParams: headerParams,
|
|
1763
|
+
queryParams: queryParams
|
|
1764
|
+
});
|
|
1765
|
+
try {
|
|
1766
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1767
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1768
|
+
responseObject: {},
|
|
1769
|
+
body: yield response.json(),
|
|
1770
|
+
bodyKey: "agentCollection",
|
|
1771
|
+
bodyModel: model.AgentCollection,
|
|
1772
|
+
type: "model.AgentCollection",
|
|
1773
|
+
responseHeaders: [
|
|
1774
|
+
{
|
|
1775
|
+
value: response.headers.get("opc-request-id"),
|
|
1776
|
+
key: "opcRequestId",
|
|
1777
|
+
dataType: "string"
|
|
1778
|
+
},
|
|
1779
|
+
{
|
|
1780
|
+
value: response.headers.get("opc-next-page"),
|
|
1781
|
+
key: "opcNextPage",
|
|
1782
|
+
dataType: "string"
|
|
1783
|
+
}
|
|
1784
|
+
]
|
|
1785
|
+
});
|
|
1786
|
+
return sdkResponse;
|
|
1787
|
+
}
|
|
1788
|
+
catch (err) {
|
|
1789
|
+
throw err;
|
|
1790
|
+
}
|
|
1791
|
+
});
|
|
1792
|
+
}
|
|
1793
|
+
/**
|
|
1794
|
+
* **ListDataIngestionJobs**
|
|
1795
|
+
* <p>
|
|
1796
|
+
Gets a list of data ingestion jobs.
|
|
1797
|
+
*
|
|
1798
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1799
|
+
* @param ListDataIngestionJobsRequest
|
|
1800
|
+
* @return ListDataIngestionJobsResponse
|
|
1801
|
+
* @throws OciError when an error occurs
|
|
1802
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/generativeaiagent/ListDataIngestionJobs.ts.html |here} to see how to use ListDataIngestionJobs API.
|
|
1803
|
+
*/
|
|
1804
|
+
listDataIngestionJobs(listDataIngestionJobsRequest) {
|
|
1805
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1806
|
+
if (this.logger)
|
|
1807
|
+
this.logger.debug("Calling operation GenerativeAiAgentClient#listDataIngestionJobs.");
|
|
1808
|
+
const operationName = "listDataIngestionJobs";
|
|
1809
|
+
const apiReferenceLink = "";
|
|
1810
|
+
const pathParams = {};
|
|
1811
|
+
const queryParams = {
|
|
1812
|
+
"compartmentId": listDataIngestionJobsRequest.compartmentId,
|
|
1813
|
+
"dataSourceId": listDataIngestionJobsRequest.dataSourceId,
|
|
1814
|
+
"lifecycleState": listDataIngestionJobsRequest.lifecycleState,
|
|
1815
|
+
"displayName": listDataIngestionJobsRequest.displayName,
|
|
1816
|
+
"limit": listDataIngestionJobsRequest.limit,
|
|
1817
|
+
"page": listDataIngestionJobsRequest.page,
|
|
1818
|
+
"sortOrder": listDataIngestionJobsRequest.sortOrder,
|
|
1819
|
+
"sortBy": listDataIngestionJobsRequest.sortBy
|
|
1820
|
+
};
|
|
1821
|
+
let headerParams = {
|
|
1822
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1823
|
+
"opc-request-id": listDataIngestionJobsRequest.opcRequestId
|
|
1824
|
+
};
|
|
1825
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1826
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listDataIngestionJobsRequest.retryConfiguration, specRetryConfiguration);
|
|
1827
|
+
if (this.logger)
|
|
1828
|
+
retrier.logger = this.logger;
|
|
1829
|
+
const request = yield oci_common_1.composeRequest({
|
|
1830
|
+
baseEndpoint: this._endpoint,
|
|
1831
|
+
defaultHeaders: this._defaultHeaders,
|
|
1832
|
+
path: "/dataIngestionJobs",
|
|
1833
|
+
method: "GET",
|
|
1834
|
+
pathParams: pathParams,
|
|
1835
|
+
headerParams: headerParams,
|
|
1836
|
+
queryParams: queryParams
|
|
1837
|
+
});
|
|
1838
|
+
try {
|
|
1839
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1840
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1841
|
+
responseObject: {},
|
|
1842
|
+
body: yield response.json(),
|
|
1843
|
+
bodyKey: "dataIngestionJobCollection",
|
|
1844
|
+
bodyModel: model.DataIngestionJobCollection,
|
|
1845
|
+
type: "model.DataIngestionJobCollection",
|
|
1846
|
+
responseHeaders: [
|
|
1847
|
+
{
|
|
1848
|
+
value: response.headers.get("opc-request-id"),
|
|
1849
|
+
key: "opcRequestId",
|
|
1850
|
+
dataType: "string"
|
|
1851
|
+
},
|
|
1852
|
+
{
|
|
1853
|
+
value: response.headers.get("opc-next-page"),
|
|
1854
|
+
key: "opcNextPage",
|
|
1855
|
+
dataType: "string"
|
|
1856
|
+
}
|
|
1857
|
+
]
|
|
1858
|
+
});
|
|
1859
|
+
return sdkResponse;
|
|
1860
|
+
}
|
|
1861
|
+
catch (err) {
|
|
1862
|
+
throw err;
|
|
1863
|
+
}
|
|
1864
|
+
});
|
|
1865
|
+
}
|
|
1866
|
+
/**
|
|
1867
|
+
* **ListDataSources**
|
|
1868
|
+
* <p>
|
|
1869
|
+
Gets a list of data sources.
|
|
1870
|
+
*
|
|
1871
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1872
|
+
* @param ListDataSourcesRequest
|
|
1873
|
+
* @return ListDataSourcesResponse
|
|
1874
|
+
* @throws OciError when an error occurs
|
|
1875
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/generativeaiagent/ListDataSources.ts.html |here} to see how to use ListDataSources API.
|
|
1876
|
+
*/
|
|
1877
|
+
listDataSources(listDataSourcesRequest) {
|
|
1878
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1879
|
+
if (this.logger)
|
|
1880
|
+
this.logger.debug("Calling operation GenerativeAiAgentClient#listDataSources.");
|
|
1881
|
+
const operationName = "listDataSources";
|
|
1882
|
+
const apiReferenceLink = "";
|
|
1883
|
+
const pathParams = {};
|
|
1884
|
+
const queryParams = {
|
|
1885
|
+
"compartmentId": listDataSourcesRequest.compartmentId,
|
|
1886
|
+
"knowledgeBaseId": listDataSourcesRequest.knowledgeBaseId,
|
|
1887
|
+
"lifecycleState": listDataSourcesRequest.lifecycleState,
|
|
1888
|
+
"displayName": listDataSourcesRequest.displayName,
|
|
1889
|
+
"limit": listDataSourcesRequest.limit,
|
|
1890
|
+
"page": listDataSourcesRequest.page,
|
|
1891
|
+
"sortOrder": listDataSourcesRequest.sortOrder,
|
|
1892
|
+
"sortBy": listDataSourcesRequest.sortBy
|
|
1893
|
+
};
|
|
1894
|
+
let headerParams = {
|
|
1895
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1896
|
+
"opc-request-id": listDataSourcesRequest.opcRequestId
|
|
1897
|
+
};
|
|
1898
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1899
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listDataSourcesRequest.retryConfiguration, specRetryConfiguration);
|
|
1900
|
+
if (this.logger)
|
|
1901
|
+
retrier.logger = this.logger;
|
|
1902
|
+
const request = yield oci_common_1.composeRequest({
|
|
1903
|
+
baseEndpoint: this._endpoint,
|
|
1904
|
+
defaultHeaders: this._defaultHeaders,
|
|
1905
|
+
path: "/dataSources",
|
|
1906
|
+
method: "GET",
|
|
1907
|
+
pathParams: pathParams,
|
|
1908
|
+
headerParams: headerParams,
|
|
1909
|
+
queryParams: queryParams
|
|
1910
|
+
});
|
|
1911
|
+
try {
|
|
1912
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1913
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1914
|
+
responseObject: {},
|
|
1915
|
+
body: yield response.json(),
|
|
1916
|
+
bodyKey: "dataSourceCollection",
|
|
1917
|
+
bodyModel: model.DataSourceCollection,
|
|
1918
|
+
type: "model.DataSourceCollection",
|
|
1919
|
+
responseHeaders: [
|
|
1920
|
+
{
|
|
1921
|
+
value: response.headers.get("opc-request-id"),
|
|
1922
|
+
key: "opcRequestId",
|
|
1923
|
+
dataType: "string"
|
|
1924
|
+
},
|
|
1925
|
+
{
|
|
1926
|
+
value: response.headers.get("opc-next-page"),
|
|
1927
|
+
key: "opcNextPage",
|
|
1928
|
+
dataType: "string"
|
|
1929
|
+
}
|
|
1930
|
+
]
|
|
1931
|
+
});
|
|
1932
|
+
return sdkResponse;
|
|
1933
|
+
}
|
|
1934
|
+
catch (err) {
|
|
1935
|
+
throw err;
|
|
1936
|
+
}
|
|
1937
|
+
});
|
|
1938
|
+
}
|
|
1939
|
+
/**
|
|
1940
|
+
* **ListKnowledgeBases**
|
|
1941
|
+
* <p>
|
|
1942
|
+
Gets a list of knowledge bases.
|
|
1943
|
+
*
|
|
1944
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1945
|
+
* @param ListKnowledgeBasesRequest
|
|
1946
|
+
* @return ListKnowledgeBasesResponse
|
|
1947
|
+
* @throws OciError when an error occurs
|
|
1948
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/generativeaiagent/ListKnowledgeBases.ts.html |here} to see how to use ListKnowledgeBases API.
|
|
1949
|
+
*/
|
|
1950
|
+
listKnowledgeBases(listKnowledgeBasesRequest) {
|
|
1951
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1952
|
+
if (this.logger)
|
|
1953
|
+
this.logger.debug("Calling operation GenerativeAiAgentClient#listKnowledgeBases.");
|
|
1954
|
+
const operationName = "listKnowledgeBases";
|
|
1955
|
+
const apiReferenceLink = "";
|
|
1956
|
+
const pathParams = {};
|
|
1957
|
+
const queryParams = {
|
|
1958
|
+
"compartmentId": listKnowledgeBasesRequest.compartmentId,
|
|
1959
|
+
"lifecycleState": listKnowledgeBasesRequest.lifecycleState,
|
|
1960
|
+
"displayName": listKnowledgeBasesRequest.displayName,
|
|
1961
|
+
"limit": listKnowledgeBasesRequest.limit,
|
|
1962
|
+
"page": listKnowledgeBasesRequest.page,
|
|
1963
|
+
"sortOrder": listKnowledgeBasesRequest.sortOrder,
|
|
1964
|
+
"sortBy": listKnowledgeBasesRequest.sortBy
|
|
1965
|
+
};
|
|
1966
|
+
let headerParams = {
|
|
1967
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1968
|
+
"opc-request-id": listKnowledgeBasesRequest.opcRequestId
|
|
1969
|
+
};
|
|
1970
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1971
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listKnowledgeBasesRequest.retryConfiguration, specRetryConfiguration);
|
|
1972
|
+
if (this.logger)
|
|
1973
|
+
retrier.logger = this.logger;
|
|
1974
|
+
const request = yield oci_common_1.composeRequest({
|
|
1975
|
+
baseEndpoint: this._endpoint,
|
|
1976
|
+
defaultHeaders: this._defaultHeaders,
|
|
1977
|
+
path: "/knowledgeBases",
|
|
1978
|
+
method: "GET",
|
|
1979
|
+
pathParams: pathParams,
|
|
1980
|
+
headerParams: headerParams,
|
|
1981
|
+
queryParams: queryParams
|
|
1982
|
+
});
|
|
1983
|
+
try {
|
|
1984
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1985
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1986
|
+
responseObject: {},
|
|
1987
|
+
body: yield response.json(),
|
|
1988
|
+
bodyKey: "knowledgeBaseCollection",
|
|
1989
|
+
bodyModel: model.KnowledgeBaseCollection,
|
|
1990
|
+
type: "model.KnowledgeBaseCollection",
|
|
1991
|
+
responseHeaders: [
|
|
1992
|
+
{
|
|
1993
|
+
value: response.headers.get("opc-request-id"),
|
|
1994
|
+
key: "opcRequestId",
|
|
1995
|
+
dataType: "string"
|
|
1996
|
+
},
|
|
1997
|
+
{
|
|
1998
|
+
value: response.headers.get("opc-next-page"),
|
|
1999
|
+
key: "opcNextPage",
|
|
2000
|
+
dataType: "string"
|
|
2001
|
+
}
|
|
2002
|
+
]
|
|
2003
|
+
});
|
|
2004
|
+
return sdkResponse;
|
|
2005
|
+
}
|
|
2006
|
+
catch (err) {
|
|
2007
|
+
throw err;
|
|
2008
|
+
}
|
|
2009
|
+
});
|
|
2010
|
+
}
|
|
2011
|
+
/**
|
|
2012
|
+
* **ListWorkRequestErrors**
|
|
2013
|
+
* <p>
|
|
2014
|
+
Lists the errors for a work request.
|
|
2015
|
+
*
|
|
2016
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
2017
|
+
* @param ListWorkRequestErrorsRequest
|
|
2018
|
+
* @return ListWorkRequestErrorsResponse
|
|
2019
|
+
* @throws OciError when an error occurs
|
|
2020
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/generativeaiagent/ListWorkRequestErrors.ts.html |here} to see how to use ListWorkRequestErrors API.
|
|
2021
|
+
*/
|
|
2022
|
+
listWorkRequestErrors(listWorkRequestErrorsRequest) {
|
|
2023
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2024
|
+
if (this.logger)
|
|
2025
|
+
this.logger.debug("Calling operation GenerativeAiAgentClient#listWorkRequestErrors.");
|
|
2026
|
+
const operationName = "listWorkRequestErrors";
|
|
2027
|
+
const apiReferenceLink = "";
|
|
2028
|
+
const pathParams = {
|
|
2029
|
+
"{workRequestId}": listWorkRequestErrorsRequest.workRequestId
|
|
2030
|
+
};
|
|
2031
|
+
const queryParams = {
|
|
2032
|
+
"page": listWorkRequestErrorsRequest.page,
|
|
2033
|
+
"limit": listWorkRequestErrorsRequest.limit,
|
|
2034
|
+
"sortBy": listWorkRequestErrorsRequest.sortBy,
|
|
2035
|
+
"sortOrder": listWorkRequestErrorsRequest.sortOrder
|
|
2036
|
+
};
|
|
2037
|
+
let headerParams = {
|
|
2038
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
2039
|
+
"opc-request-id": listWorkRequestErrorsRequest.opcRequestId
|
|
2040
|
+
};
|
|
2041
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
2042
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listWorkRequestErrorsRequest.retryConfiguration, specRetryConfiguration);
|
|
2043
|
+
if (this.logger)
|
|
2044
|
+
retrier.logger = this.logger;
|
|
2045
|
+
const request = yield oci_common_1.composeRequest({
|
|
2046
|
+
baseEndpoint: this._endpoint,
|
|
2047
|
+
defaultHeaders: this._defaultHeaders,
|
|
2048
|
+
path: "/workRequests/{workRequestId}/errors",
|
|
2049
|
+
method: "GET",
|
|
2050
|
+
pathParams: pathParams,
|
|
2051
|
+
headerParams: headerParams,
|
|
2052
|
+
queryParams: queryParams
|
|
2053
|
+
});
|
|
2054
|
+
try {
|
|
2055
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
2056
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
2057
|
+
responseObject: {},
|
|
2058
|
+
body: yield response.json(),
|
|
2059
|
+
bodyKey: "workRequestErrorCollection",
|
|
2060
|
+
bodyModel: model.WorkRequestErrorCollection,
|
|
2061
|
+
type: "model.WorkRequestErrorCollection",
|
|
2062
|
+
responseHeaders: [
|
|
2063
|
+
{
|
|
2064
|
+
value: response.headers.get("opc-next-page"),
|
|
2065
|
+
key: "opcNextPage",
|
|
2066
|
+
dataType: "string"
|
|
2067
|
+
},
|
|
2068
|
+
{
|
|
2069
|
+
value: response.headers.get("opc-request-id"),
|
|
2070
|
+
key: "opcRequestId",
|
|
2071
|
+
dataType: "string"
|
|
2072
|
+
}
|
|
2073
|
+
]
|
|
2074
|
+
});
|
|
2075
|
+
return sdkResponse;
|
|
2076
|
+
}
|
|
2077
|
+
catch (err) {
|
|
2078
|
+
throw err;
|
|
2079
|
+
}
|
|
2080
|
+
});
|
|
2081
|
+
}
|
|
2082
|
+
/**
|
|
2083
|
+
* **ListWorkRequestLogs**
|
|
2084
|
+
* <p>
|
|
2085
|
+
Lists the logs for a work request.
|
|
2086
|
+
*
|
|
2087
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
2088
|
+
* @param ListWorkRequestLogsRequest
|
|
2089
|
+
* @return ListWorkRequestLogsResponse
|
|
2090
|
+
* @throws OciError when an error occurs
|
|
2091
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/generativeaiagent/ListWorkRequestLogs.ts.html |here} to see how to use ListWorkRequestLogs API.
|
|
2092
|
+
*/
|
|
2093
|
+
listWorkRequestLogs(listWorkRequestLogsRequest) {
|
|
2094
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2095
|
+
if (this.logger)
|
|
2096
|
+
this.logger.debug("Calling operation GenerativeAiAgentClient#listWorkRequestLogs.");
|
|
2097
|
+
const operationName = "listWorkRequestLogs";
|
|
2098
|
+
const apiReferenceLink = "";
|
|
2099
|
+
const pathParams = {
|
|
2100
|
+
"{workRequestId}": listWorkRequestLogsRequest.workRequestId
|
|
2101
|
+
};
|
|
2102
|
+
const queryParams = {
|
|
2103
|
+
"page": listWorkRequestLogsRequest.page,
|
|
2104
|
+
"limit": listWorkRequestLogsRequest.limit,
|
|
2105
|
+
"sortBy": listWorkRequestLogsRequest.sortBy,
|
|
2106
|
+
"sortOrder": listWorkRequestLogsRequest.sortOrder
|
|
2107
|
+
};
|
|
2108
|
+
let headerParams = {
|
|
2109
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
2110
|
+
"opc-request-id": listWorkRequestLogsRequest.opcRequestId
|
|
2111
|
+
};
|
|
2112
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
2113
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listWorkRequestLogsRequest.retryConfiguration, specRetryConfiguration);
|
|
2114
|
+
if (this.logger)
|
|
2115
|
+
retrier.logger = this.logger;
|
|
2116
|
+
const request = yield oci_common_1.composeRequest({
|
|
2117
|
+
baseEndpoint: this._endpoint,
|
|
2118
|
+
defaultHeaders: this._defaultHeaders,
|
|
2119
|
+
path: "/workRequests/{workRequestId}/logs",
|
|
2120
|
+
method: "GET",
|
|
2121
|
+
pathParams: pathParams,
|
|
2122
|
+
headerParams: headerParams,
|
|
2123
|
+
queryParams: queryParams
|
|
2124
|
+
});
|
|
2125
|
+
try {
|
|
2126
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
2127
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
2128
|
+
responseObject: {},
|
|
2129
|
+
body: yield response.json(),
|
|
2130
|
+
bodyKey: "workRequestLogEntryCollection",
|
|
2131
|
+
bodyModel: model.WorkRequestLogEntryCollection,
|
|
2132
|
+
type: "model.WorkRequestLogEntryCollection",
|
|
2133
|
+
responseHeaders: [
|
|
2134
|
+
{
|
|
2135
|
+
value: response.headers.get("opc-next-page"),
|
|
2136
|
+
key: "opcNextPage",
|
|
2137
|
+
dataType: "string"
|
|
2138
|
+
},
|
|
2139
|
+
{
|
|
2140
|
+
value: response.headers.get("opc-request-id"),
|
|
2141
|
+
key: "opcRequestId",
|
|
2142
|
+
dataType: "string"
|
|
2143
|
+
}
|
|
2144
|
+
]
|
|
2145
|
+
});
|
|
2146
|
+
return sdkResponse;
|
|
2147
|
+
}
|
|
2148
|
+
catch (err) {
|
|
2149
|
+
throw err;
|
|
2150
|
+
}
|
|
2151
|
+
});
|
|
2152
|
+
}
|
|
2153
|
+
/**
|
|
2154
|
+
* **ListWorkRequests**
|
|
2155
|
+
* <p>
|
|
2156
|
+
Lists the work requests in a compartment.
|
|
2157
|
+
*
|
|
2158
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
2159
|
+
* @param ListWorkRequestsRequest
|
|
2160
|
+
* @return ListWorkRequestsResponse
|
|
2161
|
+
* @throws OciError when an error occurs
|
|
2162
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/generativeaiagent/ListWorkRequests.ts.html |here} to see how to use ListWorkRequests API.
|
|
2163
|
+
*/
|
|
2164
|
+
listWorkRequests(listWorkRequestsRequest) {
|
|
2165
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2166
|
+
if (this.logger)
|
|
2167
|
+
this.logger.debug("Calling operation GenerativeAiAgentClient#listWorkRequests.");
|
|
2168
|
+
const operationName = "listWorkRequests";
|
|
2169
|
+
const apiReferenceLink = "";
|
|
2170
|
+
const pathParams = {};
|
|
2171
|
+
const queryParams = {
|
|
2172
|
+
"compartmentId": listWorkRequestsRequest.compartmentId,
|
|
2173
|
+
"workRequestId": listWorkRequestsRequest.workRequestId,
|
|
2174
|
+
"status": listWorkRequestsRequest.status,
|
|
2175
|
+
"resourceId": listWorkRequestsRequest.resourceId,
|
|
2176
|
+
"page": listWorkRequestsRequest.page,
|
|
2177
|
+
"limit": listWorkRequestsRequest.limit,
|
|
2178
|
+
"sortOrder": listWorkRequestsRequest.sortOrder,
|
|
2179
|
+
"sortBy": listWorkRequestsRequest.sortBy
|
|
2180
|
+
};
|
|
2181
|
+
let headerParams = {
|
|
2182
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
2183
|
+
"opc-request-id": listWorkRequestsRequest.opcRequestId
|
|
2184
|
+
};
|
|
2185
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
2186
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listWorkRequestsRequest.retryConfiguration, specRetryConfiguration);
|
|
2187
|
+
if (this.logger)
|
|
2188
|
+
retrier.logger = this.logger;
|
|
2189
|
+
const request = yield oci_common_1.composeRequest({
|
|
2190
|
+
baseEndpoint: this._endpoint,
|
|
2191
|
+
defaultHeaders: this._defaultHeaders,
|
|
2192
|
+
path: "/workRequests",
|
|
2193
|
+
method: "GET",
|
|
2194
|
+
pathParams: pathParams,
|
|
2195
|
+
headerParams: headerParams,
|
|
2196
|
+
queryParams: queryParams
|
|
2197
|
+
});
|
|
2198
|
+
try {
|
|
2199
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
2200
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
2201
|
+
responseObject: {},
|
|
2202
|
+
body: yield response.json(),
|
|
2203
|
+
bodyKey: "workRequestSummaryCollection",
|
|
2204
|
+
bodyModel: model.WorkRequestSummaryCollection,
|
|
2205
|
+
type: "model.WorkRequestSummaryCollection",
|
|
2206
|
+
responseHeaders: [
|
|
2207
|
+
{
|
|
2208
|
+
value: response.headers.get("opc-request-id"),
|
|
2209
|
+
key: "opcRequestId",
|
|
2210
|
+
dataType: "string"
|
|
2211
|
+
},
|
|
2212
|
+
{
|
|
2213
|
+
value: response.headers.get("opc-next-page"),
|
|
2214
|
+
key: "opcNextPage",
|
|
2215
|
+
dataType: "string"
|
|
2216
|
+
}
|
|
2217
|
+
]
|
|
2218
|
+
});
|
|
2219
|
+
return sdkResponse;
|
|
2220
|
+
}
|
|
2221
|
+
catch (err) {
|
|
2222
|
+
throw err;
|
|
2223
|
+
}
|
|
2224
|
+
});
|
|
2225
|
+
}
|
|
2226
|
+
/**
|
|
2227
|
+
* **UpdateAgent**
|
|
2228
|
+
* <p>
|
|
2229
|
+
Updates an agent.
|
|
2230
|
+
*
|
|
2231
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
2232
|
+
* @param UpdateAgentRequest
|
|
2233
|
+
* @return UpdateAgentResponse
|
|
2234
|
+
* @throws OciError when an error occurs
|
|
2235
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/generativeaiagent/UpdateAgent.ts.html |here} to see how to use UpdateAgent API.
|
|
2236
|
+
*/
|
|
2237
|
+
updateAgent(updateAgentRequest) {
|
|
2238
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2239
|
+
if (this.logger)
|
|
2240
|
+
this.logger.debug("Calling operation GenerativeAiAgentClient#updateAgent.");
|
|
2241
|
+
const operationName = "updateAgent";
|
|
2242
|
+
const apiReferenceLink = "";
|
|
2243
|
+
const pathParams = {
|
|
2244
|
+
"{agentId}": updateAgentRequest.agentId
|
|
2245
|
+
};
|
|
2246
|
+
const queryParams = {};
|
|
2247
|
+
let headerParams = {
|
|
2248
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
2249
|
+
"if-match": updateAgentRequest.ifMatch,
|
|
2250
|
+
"opc-request-id": updateAgentRequest.opcRequestId
|
|
2251
|
+
};
|
|
2252
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
2253
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateAgentRequest.retryConfiguration, specRetryConfiguration);
|
|
2254
|
+
if (this.logger)
|
|
2255
|
+
retrier.logger = this.logger;
|
|
2256
|
+
const request = yield oci_common_1.composeRequest({
|
|
2257
|
+
baseEndpoint: this._endpoint,
|
|
2258
|
+
defaultHeaders: this._defaultHeaders,
|
|
2259
|
+
path: "/agents/{agentId}",
|
|
2260
|
+
method: "PUT",
|
|
2261
|
+
bodyContent: common.ObjectSerializer.serialize(updateAgentRequest.updateAgentDetails, "UpdateAgentDetails", model.UpdateAgentDetails.getJsonObj),
|
|
2262
|
+
pathParams: pathParams,
|
|
2263
|
+
headerParams: headerParams,
|
|
2264
|
+
queryParams: queryParams
|
|
2265
|
+
});
|
|
2266
|
+
try {
|
|
2267
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
2268
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
2269
|
+
responseObject: {},
|
|
2270
|
+
responseHeaders: [
|
|
2271
|
+
{
|
|
2272
|
+
value: response.headers.get("opc-work-request-id"),
|
|
2273
|
+
key: "opcWorkRequestId",
|
|
2274
|
+
dataType: "string"
|
|
2275
|
+
},
|
|
2276
|
+
{
|
|
2277
|
+
value: response.headers.get("opc-request-id"),
|
|
2278
|
+
key: "opcRequestId",
|
|
2279
|
+
dataType: "string"
|
|
2280
|
+
}
|
|
2281
|
+
]
|
|
2282
|
+
});
|
|
2283
|
+
return sdkResponse;
|
|
2284
|
+
}
|
|
2285
|
+
catch (err) {
|
|
2286
|
+
throw err;
|
|
2287
|
+
}
|
|
2288
|
+
});
|
|
2289
|
+
}
|
|
2290
|
+
/**
|
|
2291
|
+
* **UpdateAgentEndpoint**
|
|
2292
|
+
* <p>
|
|
2293
|
+
Updates an endpoint.
|
|
2294
|
+
*
|
|
2295
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
2296
|
+
* @param UpdateAgentEndpointRequest
|
|
2297
|
+
* @return UpdateAgentEndpointResponse
|
|
2298
|
+
* @throws OciError when an error occurs
|
|
2299
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/generativeaiagent/UpdateAgentEndpoint.ts.html |here} to see how to use UpdateAgentEndpoint API.
|
|
2300
|
+
*/
|
|
2301
|
+
updateAgentEndpoint(updateAgentEndpointRequest) {
|
|
2302
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2303
|
+
if (this.logger)
|
|
2304
|
+
this.logger.debug("Calling operation GenerativeAiAgentClient#updateAgentEndpoint.");
|
|
2305
|
+
const operationName = "updateAgentEndpoint";
|
|
2306
|
+
const apiReferenceLink = "";
|
|
2307
|
+
const pathParams = {
|
|
2308
|
+
"{agentEndpointId}": updateAgentEndpointRequest.agentEndpointId
|
|
2309
|
+
};
|
|
2310
|
+
const queryParams = {};
|
|
2311
|
+
let headerParams = {
|
|
2312
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
2313
|
+
"if-match": updateAgentEndpointRequest.ifMatch,
|
|
2314
|
+
"opc-request-id": updateAgentEndpointRequest.opcRequestId
|
|
2315
|
+
};
|
|
2316
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
2317
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateAgentEndpointRequest.retryConfiguration, specRetryConfiguration);
|
|
2318
|
+
if (this.logger)
|
|
2319
|
+
retrier.logger = this.logger;
|
|
2320
|
+
const request = yield oci_common_1.composeRequest({
|
|
2321
|
+
baseEndpoint: this._endpoint,
|
|
2322
|
+
defaultHeaders: this._defaultHeaders,
|
|
2323
|
+
path: "/agentEndpoints/{agentEndpointId}",
|
|
2324
|
+
method: "PUT",
|
|
2325
|
+
bodyContent: common.ObjectSerializer.serialize(updateAgentEndpointRequest.updateAgentEndpointDetails, "UpdateAgentEndpointDetails", model.UpdateAgentEndpointDetails.getJsonObj),
|
|
2326
|
+
pathParams: pathParams,
|
|
2327
|
+
headerParams: headerParams,
|
|
2328
|
+
queryParams: queryParams
|
|
2329
|
+
});
|
|
2330
|
+
try {
|
|
2331
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
2332
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
2333
|
+
responseObject: {},
|
|
2334
|
+
responseHeaders: [
|
|
2335
|
+
{
|
|
2336
|
+
value: response.headers.get("opc-work-request-id"),
|
|
2337
|
+
key: "opcWorkRequestId",
|
|
2338
|
+
dataType: "string"
|
|
2339
|
+
},
|
|
2340
|
+
{
|
|
2341
|
+
value: response.headers.get("opc-request-id"),
|
|
2342
|
+
key: "opcRequestId",
|
|
2343
|
+
dataType: "string"
|
|
2344
|
+
}
|
|
2345
|
+
]
|
|
2346
|
+
});
|
|
2347
|
+
return sdkResponse;
|
|
2348
|
+
}
|
|
2349
|
+
catch (err) {
|
|
2350
|
+
throw err;
|
|
2351
|
+
}
|
|
2352
|
+
});
|
|
2353
|
+
}
|
|
2354
|
+
/**
|
|
2355
|
+
* **UpdateDataSource**
|
|
2356
|
+
* <p>
|
|
2357
|
+
Updates a data source.
|
|
2358
|
+
*
|
|
2359
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
2360
|
+
* @param UpdateDataSourceRequest
|
|
2361
|
+
* @return UpdateDataSourceResponse
|
|
2362
|
+
* @throws OciError when an error occurs
|
|
2363
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/generativeaiagent/UpdateDataSource.ts.html |here} to see how to use UpdateDataSource API.
|
|
2364
|
+
*/
|
|
2365
|
+
updateDataSource(updateDataSourceRequest) {
|
|
2366
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2367
|
+
if (this.logger)
|
|
2368
|
+
this.logger.debug("Calling operation GenerativeAiAgentClient#updateDataSource.");
|
|
2369
|
+
const operationName = "updateDataSource";
|
|
2370
|
+
const apiReferenceLink = "";
|
|
2371
|
+
const pathParams = {
|
|
2372
|
+
"{dataSourceId}": updateDataSourceRequest.dataSourceId
|
|
2373
|
+
};
|
|
2374
|
+
const queryParams = {};
|
|
2375
|
+
let headerParams = {
|
|
2376
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
2377
|
+
"if-match": updateDataSourceRequest.ifMatch,
|
|
2378
|
+
"opc-request-id": updateDataSourceRequest.opcRequestId
|
|
2379
|
+
};
|
|
2380
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
2381
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateDataSourceRequest.retryConfiguration, specRetryConfiguration);
|
|
2382
|
+
if (this.logger)
|
|
2383
|
+
retrier.logger = this.logger;
|
|
2384
|
+
const request = yield oci_common_1.composeRequest({
|
|
2385
|
+
baseEndpoint: this._endpoint,
|
|
2386
|
+
defaultHeaders: this._defaultHeaders,
|
|
2387
|
+
path: "/dataSources/{dataSourceId}",
|
|
2388
|
+
method: "PUT",
|
|
2389
|
+
bodyContent: common.ObjectSerializer.serialize(updateDataSourceRequest.updateDataSourceDetails, "UpdateDataSourceDetails", model.UpdateDataSourceDetails.getJsonObj),
|
|
2390
|
+
pathParams: pathParams,
|
|
2391
|
+
headerParams: headerParams,
|
|
2392
|
+
queryParams: queryParams
|
|
2393
|
+
});
|
|
2394
|
+
try {
|
|
2395
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
2396
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
2397
|
+
responseObject: {},
|
|
2398
|
+
responseHeaders: [
|
|
2399
|
+
{
|
|
2400
|
+
value: response.headers.get("opc-work-request-id"),
|
|
2401
|
+
key: "opcWorkRequestId",
|
|
2402
|
+
dataType: "string"
|
|
2403
|
+
},
|
|
2404
|
+
{
|
|
2405
|
+
value: response.headers.get("opc-request-id"),
|
|
2406
|
+
key: "opcRequestId",
|
|
2407
|
+
dataType: "string"
|
|
2408
|
+
}
|
|
2409
|
+
]
|
|
2410
|
+
});
|
|
2411
|
+
return sdkResponse;
|
|
2412
|
+
}
|
|
2413
|
+
catch (err) {
|
|
2414
|
+
throw err;
|
|
2415
|
+
}
|
|
2416
|
+
});
|
|
2417
|
+
}
|
|
2418
|
+
/**
|
|
2419
|
+
* **UpdateKnowledgeBase**
|
|
2420
|
+
* <p>
|
|
2421
|
+
Updates a knowledge base.
|
|
2422
|
+
*
|
|
2423
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
2424
|
+
* @param UpdateKnowledgeBaseRequest
|
|
2425
|
+
* @return UpdateKnowledgeBaseResponse
|
|
2426
|
+
* @throws OciError when an error occurs
|
|
2427
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/generativeaiagent/UpdateKnowledgeBase.ts.html |here} to see how to use UpdateKnowledgeBase API.
|
|
2428
|
+
*/
|
|
2429
|
+
updateKnowledgeBase(updateKnowledgeBaseRequest) {
|
|
2430
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2431
|
+
if (this.logger)
|
|
2432
|
+
this.logger.debug("Calling operation GenerativeAiAgentClient#updateKnowledgeBase.");
|
|
2433
|
+
const operationName = "updateKnowledgeBase";
|
|
2434
|
+
const apiReferenceLink = "";
|
|
2435
|
+
const pathParams = {
|
|
2436
|
+
"{knowledgeBaseId}": updateKnowledgeBaseRequest.knowledgeBaseId
|
|
2437
|
+
};
|
|
2438
|
+
const queryParams = {};
|
|
2439
|
+
let headerParams = {
|
|
2440
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
2441
|
+
"if-match": updateKnowledgeBaseRequest.ifMatch,
|
|
2442
|
+
"opc-request-id": updateKnowledgeBaseRequest.opcRequestId
|
|
2443
|
+
};
|
|
2444
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
2445
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateKnowledgeBaseRequest.retryConfiguration, specRetryConfiguration);
|
|
2446
|
+
if (this.logger)
|
|
2447
|
+
retrier.logger = this.logger;
|
|
2448
|
+
const request = yield oci_common_1.composeRequest({
|
|
2449
|
+
baseEndpoint: this._endpoint,
|
|
2450
|
+
defaultHeaders: this._defaultHeaders,
|
|
2451
|
+
path: "/knowledgeBases/{knowledgeBaseId}",
|
|
2452
|
+
method: "PUT",
|
|
2453
|
+
bodyContent: common.ObjectSerializer.serialize(updateKnowledgeBaseRequest.updateKnowledgeBaseDetails, "UpdateKnowledgeBaseDetails", model.UpdateKnowledgeBaseDetails.getJsonObj),
|
|
2454
|
+
pathParams: pathParams,
|
|
2455
|
+
headerParams: headerParams,
|
|
2456
|
+
queryParams: queryParams
|
|
2457
|
+
});
|
|
2458
|
+
try {
|
|
2459
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
2460
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
2461
|
+
responseObject: {},
|
|
2462
|
+
responseHeaders: [
|
|
2463
|
+
{
|
|
2464
|
+
value: response.headers.get("opc-work-request-id"),
|
|
2465
|
+
key: "opcWorkRequestId",
|
|
2466
|
+
dataType: "string"
|
|
2467
|
+
},
|
|
2468
|
+
{
|
|
2469
|
+
value: response.headers.get("opc-request-id"),
|
|
2470
|
+
key: "opcRequestId",
|
|
2471
|
+
dataType: "string"
|
|
2472
|
+
}
|
|
2473
|
+
]
|
|
2474
|
+
});
|
|
2475
|
+
return sdkResponse;
|
|
2476
|
+
}
|
|
2477
|
+
catch (err) {
|
|
2478
|
+
throw err;
|
|
2479
|
+
}
|
|
2480
|
+
});
|
|
2481
|
+
}
|
|
2482
|
+
}
|
|
2483
|
+
exports.GenerativeAiAgentClient = GenerativeAiAgentClient;
|
|
2484
|
+
GenerativeAiAgentClient.serviceEndpointTemplate = "https://agent.generativeai.{region}.oci.{secondLevelDomain}";
|
|
2485
|
+
GenerativeAiAgentClient.endpointServiceName = "";
|
|
2486
|
+
//# sourceMappingURL=client.js.map
|