@credal/sdk 0.1.16 → 1.0.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/README.md +242 -91
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +16 -16
- package/dist/cjs/Client.js +70 -23
- package/dist/cjs/api/errors/BadRequestError.d.ts +5 -0
- package/dist/cjs/api/errors/BadRequestError.js +54 -0
- package/dist/cjs/api/errors/ForbiddenError.d.ts +5 -0
- package/dist/cjs/api/errors/ForbiddenError.js +54 -0
- package/dist/cjs/api/errors/InternalServerError.d.ts +5 -0
- package/dist/cjs/api/errors/InternalServerError.js +54 -0
- package/dist/cjs/api/errors/NotFoundError.d.ts +5 -0
- package/dist/cjs/api/errors/NotFoundError.js +54 -0
- package/dist/cjs/api/errors/UnauthorizedError.d.ts +5 -0
- package/dist/cjs/api/errors/UnauthorizedError.js +54 -0
- package/dist/cjs/api/errors/index.d.ts +5 -0
- package/dist/cjs/api/{resources/documentCatalog/client → errors}/index.js +5 -1
- package/dist/cjs/api/index.d.ts +1 -0
- package/dist/cjs/api/index.js +1 -0
- package/dist/cjs/api/resources/agents/client/Client.d.ts +50 -0
- package/dist/cjs/api/resources/agents/client/Client.js +187 -0
- package/dist/cjs/api/resources/agents/client/requests/FetchResponseAgentsRequest.d.ts +9 -0
- package/dist/cjs/api/resources/agents/client/requests/SendMessageAgentsRequest.d.ts +16 -0
- package/dist/cjs/api/resources/agents/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/agents/exports.d.ts +2 -0
- package/dist/cjs/api/resources/{documentCatalog/index.js → agents/exports.js} +4 -1
- package/dist/cjs/api/resources/agents/types/FetchResponseAgentsResponse.d.ts +20 -0
- package/dist/cjs/api/resources/agents/types/SendMessageAgentsRequestConversation.d.ts +12 -0
- package/dist/cjs/api/resources/agents/types/SendMessageAgentsResponse.d.ts +3 -0
- package/dist/cjs/api/resources/agents/types/index.d.ts +3 -0
- package/dist/cjs/api/resources/{common → agents/types}/index.js +3 -1
- package/dist/cjs/api/resources/index.d.ts +3 -16
- package/dist/cjs/api/resources/index.js +7 -20
- package/dist/cjs/auth/BearerAuthProvider.d.ts +14 -10
- package/dist/cjs/auth/BearerAuthProvider.js +17 -10
- package/dist/cjs/core/exports.d.ts +0 -1
- package/dist/cjs/core/exports.js +0 -1
- package/dist/cjs/core/fetcher/BinaryResponse.d.ts +1 -1
- package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +2 -2
- package/dist/cjs/core/fetcher/Fetcher.d.ts +1 -2
- package/dist/cjs/core/fetcher/Fetcher.js +8 -2
- package/dist/cjs/core/fetcher/index.d.ts +2 -0
- package/dist/cjs/core/fetcher/index.js +3 -1
- package/dist/cjs/core/fetcher/makePassthroughRequest.d.ts +49 -0
- package/dist/cjs/core/fetcher/makePassthroughRequest.js +135 -0
- package/dist/cjs/core/fetcher/makeRequest.d.ts +6 -1
- package/dist/cjs/core/fetcher/makeRequest.js +30 -9
- package/dist/cjs/core/headers.d.ts +2 -2
- package/dist/cjs/core/index.d.ts +0 -3
- package/dist/cjs/core/index.js +1 -4
- package/dist/cjs/core/runtime/runtime.js +8 -7
- package/dist/cjs/environments.d.ts +2 -2
- package/dist/cjs/environments.js +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/Client.d.mts +16 -16
- package/dist/esm/Client.mjs +37 -23
- package/dist/esm/api/errors/BadRequestError.d.mts +5 -0
- package/dist/esm/api/errors/BadRequestError.mjs +17 -0
- package/dist/esm/api/errors/ForbiddenError.d.mts +5 -0
- package/dist/esm/api/errors/ForbiddenError.mjs +17 -0
- package/dist/esm/api/errors/InternalServerError.d.mts +5 -0
- package/dist/esm/api/errors/InternalServerError.mjs +17 -0
- package/dist/esm/api/errors/NotFoundError.d.mts +5 -0
- package/dist/esm/api/errors/NotFoundError.mjs +17 -0
- package/dist/esm/api/errors/UnauthorizedError.d.mts +5 -0
- package/dist/esm/api/errors/UnauthorizedError.mjs +17 -0
- package/dist/esm/api/errors/index.d.mts +5 -0
- package/dist/esm/api/errors/index.mjs +5 -0
- package/dist/esm/api/index.d.mts +1 -0
- package/dist/esm/api/index.mjs +1 -0
- package/dist/esm/api/resources/agents/client/Client.d.mts +50 -0
- package/dist/esm/api/resources/agents/client/Client.mjs +150 -0
- package/dist/esm/api/resources/agents/client/requests/FetchResponseAgentsRequest.d.mts +9 -0
- package/dist/esm/api/resources/agents/client/requests/SendMessageAgentsRequest.d.mts +16 -0
- package/dist/esm/api/resources/agents/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/agents/exports.d.mts +2 -0
- package/dist/esm/api/resources/agents/exports.mjs +3 -0
- package/dist/esm/api/resources/agents/types/FetchResponseAgentsResponse.d.mts +20 -0
- package/dist/esm/api/resources/agents/types/SendMessageAgentsRequestConversation.d.mts +12 -0
- package/dist/esm/api/resources/agents/types/SendMessageAgentsResponse.d.mts +3 -0
- package/dist/esm/api/resources/agents/types/index.d.mts +3 -0
- package/dist/esm/api/resources/agents/types/index.mjs +3 -0
- package/dist/esm/api/resources/index.d.mts +3 -16
- package/dist/esm/api/resources/index.mjs +3 -16
- package/dist/esm/auth/BearerAuthProvider.d.mts +14 -10
- package/dist/esm/auth/BearerAuthProvider.mjs +17 -10
- package/dist/esm/core/exports.d.mts +0 -1
- package/dist/esm/core/exports.mjs +0 -1
- package/dist/esm/core/fetcher/BinaryResponse.d.mts +1 -1
- package/dist/esm/core/fetcher/EndpointSupplier.d.mts +2 -2
- package/dist/esm/core/fetcher/Fetcher.d.mts +1 -2
- package/dist/esm/core/fetcher/Fetcher.mjs +8 -2
- package/dist/esm/core/fetcher/index.d.mts +2 -0
- package/dist/esm/core/fetcher/index.mjs +1 -0
- package/dist/esm/core/fetcher/makePassthroughRequest.d.mts +49 -0
- package/dist/esm/core/fetcher/makePassthroughRequest.mjs +132 -0
- package/dist/esm/core/fetcher/makeRequest.d.mts +6 -1
- package/dist/esm/core/fetcher/makeRequest.mjs +28 -9
- package/dist/esm/core/headers.d.mts +2 -2
- package/dist/esm/core/index.d.mts +0 -3
- package/dist/esm/core/index.mjs +0 -3
- package/dist/esm/core/runtime/runtime.mjs +8 -7
- package/dist/esm/environments.d.mts +2 -2
- package/dist/esm/environments.mjs +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +16 -5
- package/reference.md +15 -1444
- package/dist/cjs/api/resources/common/index.d.ts +0 -1
- package/dist/cjs/api/resources/common/types/Collaborator.d.ts +0 -5
- package/dist/cjs/api/resources/common/types/CustomMetadataValue.d.ts +0 -1
- package/dist/cjs/api/resources/common/types/ExternalResourceId.d.ts +0 -5
- package/dist/cjs/api/resources/common/types/Operator.d.ts +0 -10
- package/dist/cjs/api/resources/common/types/Operator.js +0 -13
- package/dist/cjs/api/resources/common/types/ResourceIdentifier.d.ts +0 -10
- package/dist/cjs/api/resources/common/types/ResourceType.d.ts +0 -22
- package/dist/cjs/api/resources/common/types/ResourceType.js +0 -25
- package/dist/cjs/api/resources/common/types/Role.d.ts +0 -5
- package/dist/cjs/api/resources/common/types/Role.js +0 -8
- package/dist/cjs/api/resources/common/types/Url.d.ts +0 -3
- package/dist/cjs/api/resources/common/types/index.d.ts +0 -8
- package/dist/cjs/api/resources/common/types/index.js +0 -24
- package/dist/cjs/api/resources/copilots/client/Client.d.ts +0 -169
- package/dist/cjs/api/resources/copilots/client/Client.js +0 -556
- package/dist/cjs/api/resources/copilots/client/requests/AddCollectionToCopilotRequest.d.ts +0 -13
- package/dist/cjs/api/resources/copilots/client/requests/AddCollectionToCopilotRequest.js +0 -3
- package/dist/cjs/api/resources/copilots/client/requests/CreateConversationRequest.d.ts +0 -13
- package/dist/cjs/api/resources/copilots/client/requests/CreateConversationRequest.js +0 -3
- package/dist/cjs/api/resources/copilots/client/requests/CreateCopilotRequest.d.ts +0 -20
- package/dist/cjs/api/resources/copilots/client/requests/CreateCopilotRequest.js +0 -3
- package/dist/cjs/api/resources/copilots/client/requests/DeleteCopilotRequest.d.ts +0 -10
- package/dist/cjs/api/resources/copilots/client/requests/DeleteCopilotRequest.js +0 -3
- package/dist/cjs/api/resources/copilots/client/requests/ExportCopilotsRequest.d.ts +0 -21
- package/dist/cjs/api/resources/copilots/client/requests/ExportCopilotsRequest.js +0 -3
- package/dist/cjs/api/resources/copilots/client/requests/ProvideMessageFeedbackRequest.d.ts +0 -24
- package/dist/cjs/api/resources/copilots/client/requests/ProvideMessageFeedbackRequest.js +0 -3
- package/dist/cjs/api/resources/copilots/client/requests/RemoveCollectionFromCopilotRequest.d.ts +0 -13
- package/dist/cjs/api/resources/copilots/client/requests/RemoveCollectionFromCopilotRequest.js +0 -3
- package/dist/cjs/api/resources/copilots/client/requests/SendMessageRequest.d.ts +0 -28
- package/dist/cjs/api/resources/copilots/client/requests/SendMessageRequest.js +0 -3
- package/dist/cjs/api/resources/copilots/client/requests/StreamMessageRequest.d.ts +0 -56
- package/dist/cjs/api/resources/copilots/client/requests/StreamMessageRequest.js +0 -3
- package/dist/cjs/api/resources/copilots/client/requests/UpdateConfigurationRequest.d.ts +0 -21
- package/dist/cjs/api/resources/copilots/client/requests/UpdateConfigurationRequest.js +0 -3
- package/dist/cjs/api/resources/copilots/client/requests/index.d.ts +0 -10
- package/dist/cjs/api/resources/copilots/types/AiEndpointConfiguration.d.ts +0 -4
- package/dist/cjs/api/resources/copilots/types/AiEndpointConfiguration.js +0 -3
- package/dist/cjs/api/resources/copilots/types/BlockedChunk.d.ts +0 -5
- package/dist/cjs/api/resources/copilots/types/BlockedChunk.js +0 -3
- package/dist/cjs/api/resources/copilots/types/BooleanFieldSchema.d.ts +0 -5
- package/dist/cjs/api/resources/copilots/types/BooleanFieldSchema.js +0 -3
- package/dist/cjs/api/resources/copilots/types/CollectionFilteredData.d.ts +0 -6
- package/dist/cjs/api/resources/copilots/types/CollectionFilteredData.js +0 -3
- package/dist/cjs/api/resources/copilots/types/Configuration.d.ts +0 -7
- package/dist/cjs/api/resources/copilots/types/Configuration.js +0 -3
- package/dist/cjs/api/resources/copilots/types/CreateConversationResponse.d.ts +0 -3
- package/dist/cjs/api/resources/copilots/types/CreateConversationResponse.js +0 -3
- package/dist/cjs/api/resources/copilots/types/CreateCopilotResponse.d.ts +0 -3
- package/dist/cjs/api/resources/copilots/types/CreateCopilotResponse.js +0 -3
- package/dist/cjs/api/resources/copilots/types/DataChunk.d.ts +0 -3
- package/dist/cjs/api/resources/copilots/types/DataChunk.js +0 -3
- package/dist/cjs/api/resources/copilots/types/DataFilter.d.ts +0 -6
- package/dist/cjs/api/resources/copilots/types/DataFilter.js +0 -3
- package/dist/cjs/api/resources/copilots/types/DatetimeFieldSchema.d.ts +0 -6
- package/dist/cjs/api/resources/copilots/types/DatetimeFieldSchema.js +0 -3
- package/dist/cjs/api/resources/copilots/types/DeleteCopilotResponse.d.ts +0 -3
- package/dist/cjs/api/resources/copilots/types/DeleteCopilotResponse.js +0 -3
- package/dist/cjs/api/resources/copilots/types/EndOfMessageChunk.d.ts +0 -1
- package/dist/cjs/api/resources/copilots/types/EndOfMessageChunk.js +0 -3
- package/dist/cjs/api/resources/copilots/types/ErrorChunk.d.ts +0 -4
- package/dist/cjs/api/resources/copilots/types/ErrorChunk.js +0 -3
- package/dist/cjs/api/resources/copilots/types/ErrorChunkData.d.ts +0 -3
- package/dist/cjs/api/resources/copilots/types/ErrorChunkData.js +0 -3
- package/dist/cjs/api/resources/copilots/types/ExportCopilotsResponse.d.ts +0 -9
- package/dist/cjs/api/resources/copilots/types/ExportCopilotsResponse.js +0 -3
- package/dist/cjs/api/resources/copilots/types/ExportedCopilot.d.ts +0 -24
- package/dist/cjs/api/resources/copilots/types/ExportedCopilot.js +0 -3
- package/dist/cjs/api/resources/copilots/types/FeedbackEnum.d.ts +0 -5
- package/dist/cjs/api/resources/copilots/types/FeedbackEnum.js +0 -8
- package/dist/cjs/api/resources/copilots/types/Filter.d.ts +0 -16
- package/dist/cjs/api/resources/copilots/types/Filter.js +0 -3
- package/dist/cjs/api/resources/copilots/types/FinalChunk.d.ts +0 -4
- package/dist/cjs/api/resources/copilots/types/FinalChunk.js +0 -3
- package/dist/cjs/api/resources/copilots/types/InitialChunk.d.ts +0 -7
- package/dist/cjs/api/resources/copilots/types/InitialChunk.js +0 -3
- package/dist/cjs/api/resources/copilots/types/InputVariable.d.ts +0 -4
- package/dist/cjs/api/resources/copilots/types/InputVariable.js +0 -3
- package/dist/cjs/api/resources/copilots/types/InsertedAuditLog.d.ts +0 -3
- package/dist/cjs/api/resources/copilots/types/InsertedAuditLog.js +0 -3
- package/dist/cjs/api/resources/copilots/types/MessageBlocked.d.ts +0 -7
- package/dist/cjs/api/resources/copilots/types/MessageBlocked.js +0 -3
- package/dist/cjs/api/resources/copilots/types/MessageFeedback.d.ts +0 -6
- package/dist/cjs/api/resources/copilots/types/MessageFeedback.js +0 -3
- package/dist/cjs/api/resources/copilots/types/MessageReply.d.ts +0 -11
- package/dist/cjs/api/resources/copilots/types/MessageReply.js +0 -3
- package/dist/cjs/api/resources/copilots/types/NumberFieldSchema.d.ts +0 -6
- package/dist/cjs/api/resources/copilots/types/NumberFieldSchema.js +0 -3
- package/dist/cjs/api/resources/copilots/types/ReferencedSource.d.ts +0 -7
- package/dist/cjs/api/resources/copilots/types/ReferencedSource.js +0 -3
- package/dist/cjs/api/resources/copilots/types/ResponseChunk.d.ts +0 -5
- package/dist/cjs/api/resources/copilots/types/ResponseChunk.js +0 -3
- package/dist/cjs/api/resources/copilots/types/SendAgentMessageResponse.d.ts +0 -4
- package/dist/cjs/api/resources/copilots/types/SendAgentMessageResponse.js +0 -3
- package/dist/cjs/api/resources/copilots/types/SendMessageResponse.d.ts +0 -18
- package/dist/cjs/api/resources/copilots/types/SendMessageResponse.js +0 -3
- package/dist/cjs/api/resources/copilots/types/StreamingChunk.d.ts +0 -22
- package/dist/cjs/api/resources/copilots/types/StreamingChunk.js +0 -3
- package/dist/cjs/api/resources/copilots/types/StringFieldSchema.d.ts +0 -6
- package/dist/cjs/api/resources/copilots/types/StringFieldSchema.js +0 -3
- package/dist/cjs/api/resources/copilots/types/WebSearchResult.d.ts +0 -5
- package/dist/cjs/api/resources/copilots/types/WebSearchResult.js +0 -3
- package/dist/cjs/api/resources/copilots/types/index.d.ts +0 -33
- package/dist/cjs/api/resources/copilots/types/index.js +0 -49
- package/dist/cjs/api/resources/documentCatalog/client/Client.d.ts +0 -84
- package/dist/cjs/api/resources/documentCatalog/client/Client.js +0 -293
- package/dist/cjs/api/resources/documentCatalog/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/documentCatalog/client/requests/UploadDocumentContentsRequest.d.ts +0 -35
- package/dist/cjs/api/resources/documentCatalog/client/requests/UploadDocumentContentsRequest.js +0 -3
- package/dist/cjs/api/resources/documentCatalog/client/requests/UploadFileRequest.d.ts +0 -27
- package/dist/cjs/api/resources/documentCatalog/client/requests/UploadFileRequest.js +0 -3
- package/dist/cjs/api/resources/documentCatalog/client/requests/index.d.ts +0 -2
- package/dist/cjs/api/resources/documentCatalog/client/requests/index.js +0 -2
- package/dist/cjs/api/resources/documentCatalog/index.d.ts +0 -2
- package/dist/cjs/api/resources/documentCatalog/types/DocumentMetadataPatch.d.ts +0 -7
- package/dist/cjs/api/resources/documentCatalog/types/DocumentMetadataPatch.js +0 -3
- package/dist/cjs/api/resources/documentCatalog/types/DocumentMetadataPatchRequest.d.ts +0 -5
- package/dist/cjs/api/resources/documentCatalog/types/DocumentMetadataPatchRequest.js +0 -3
- package/dist/cjs/api/resources/documentCatalog/types/SyncSourceByUrlRequest.d.ts +0 -4
- package/dist/cjs/api/resources/documentCatalog/types/SyncSourceByUrlRequest.js +0 -3
- package/dist/cjs/api/resources/documentCatalog/types/SyncSourceByUrlResponse.d.ts +0 -3
- package/dist/cjs/api/resources/documentCatalog/types/SyncSourceByUrlResponse.js +0 -3
- package/dist/cjs/api/resources/documentCatalog/types/UploadDocumentResponse.d.ts +0 -3
- package/dist/cjs/api/resources/documentCatalog/types/UploadDocumentResponse.js +0 -3
- package/dist/cjs/api/resources/documentCatalog/types/index.d.ts +0 -5
- package/dist/cjs/api/resources/documentCatalog/types/index.js +0 -21
- package/dist/cjs/api/resources/documentCollections/client/Client.d.ts +0 -159
- package/dist/cjs/api/resources/documentCollections/client/Client.js +0 -438
- package/dist/cjs/api/resources/documentCollections/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/documentCollections/client/index.js +0 -17
- package/dist/cjs/api/resources/documentCollections/client/requests/AddDocumentsToCollectionRequest.d.ts +0 -22
- package/dist/cjs/api/resources/documentCollections/client/requests/AddDocumentsToCollectionRequest.js +0 -3
- package/dist/cjs/api/resources/documentCollections/client/requests/CreateCollectionRequest.d.ts +0 -20
- package/dist/cjs/api/resources/documentCollections/client/requests/CreateCollectionRequest.js +0 -3
- package/dist/cjs/api/resources/documentCollections/client/requests/CreateMongoCollectionSyncRequest.d.ts +0 -28
- package/dist/cjs/api/resources/documentCollections/client/requests/CreateMongoCollectionSyncRequest.js +0 -3
- package/dist/cjs/api/resources/documentCollections/client/requests/DeleteCollectionRequest.d.ts +0 -9
- package/dist/cjs/api/resources/documentCollections/client/requests/DeleteCollectionRequest.js +0 -3
- package/dist/cjs/api/resources/documentCollections/client/requests/ListDocumentsInCollectionRequest.d.ts +0 -10
- package/dist/cjs/api/resources/documentCollections/client/requests/ListDocumentsInCollectionRequest.js +0 -3
- package/dist/cjs/api/resources/documentCollections/client/requests/RemoveDocumentsFromCollectionRequest.d.ts +0 -22
- package/dist/cjs/api/resources/documentCollections/client/requests/RemoveDocumentsFromCollectionRequest.js +0 -3
- package/dist/cjs/api/resources/documentCollections/client/requests/UpdateMongoCollectionSyncRequest.d.ts +0 -28
- package/dist/cjs/api/resources/documentCollections/client/requests/UpdateMongoCollectionSyncRequest.js +0 -3
- package/dist/cjs/api/resources/documentCollections/client/requests/index.d.ts +0 -7
- package/dist/cjs/api/resources/documentCollections/client/requests/index.js +0 -2
- package/dist/cjs/api/resources/documentCollections/index.d.ts +0 -2
- package/dist/cjs/api/resources/documentCollections/index.js +0 -18
- package/dist/cjs/api/resources/documentCollections/types/CreateCollectionResponse.d.ts +0 -3
- package/dist/cjs/api/resources/documentCollections/types/CreateCollectionResponse.js +0 -3
- package/dist/cjs/api/resources/documentCollections/types/DeleteCollectionResponse.d.ts +0 -3
- package/dist/cjs/api/resources/documentCollections/types/DeleteCollectionResponse.js +0 -3
- package/dist/cjs/api/resources/documentCollections/types/ListDocumentsInCollectionResponse.d.ts +0 -4
- package/dist/cjs/api/resources/documentCollections/types/ListDocumentsInCollectionResponse.js +0 -3
- package/dist/cjs/api/resources/documentCollections/types/MongoCollectionSyncConfig.d.ts +0 -7
- package/dist/cjs/api/resources/documentCollections/types/MongoCollectionSyncConfig.js +0 -3
- package/dist/cjs/api/resources/documentCollections/types/MongoCollectionSyncResponse.d.ts +0 -5
- package/dist/cjs/api/resources/documentCollections/types/MongoCollectionSyncResponse.js +0 -3
- package/dist/cjs/api/resources/documentCollections/types/MongoSourceFieldsConfig.d.ts +0 -6
- package/dist/cjs/api/resources/documentCollections/types/MongoSourceFieldsConfig.js +0 -3
- package/dist/cjs/api/resources/documentCollections/types/index.d.ts +0 -6
- package/dist/cjs/api/resources/documentCollections/types/index.js +0 -22
- package/dist/cjs/api/resources/search/client/Client.d.ts +0 -41
- package/dist/cjs/api/resources/search/client/Client.js +0 -122
- package/dist/cjs/api/resources/search/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/search/client/index.js +0 -17
- package/dist/cjs/api/resources/search/client/requests/SearchDocumentCollectionRequest.d.ts +0 -33
- package/dist/cjs/api/resources/search/client/requests/SearchDocumentCollectionRequest.js +0 -3
- package/dist/cjs/api/resources/search/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/search/client/requests/index.js +0 -2
- package/dist/cjs/api/resources/search/index.d.ts +0 -2
- package/dist/cjs/api/resources/search/index.js +0 -18
- package/dist/cjs/api/resources/search/types/DocumentCollectionSearchOptions.d.ts +0 -17
- package/dist/cjs/api/resources/search/types/DocumentCollectionSearchOptions.js +0 -3
- package/dist/cjs/api/resources/search/types/DocumentCollectionSearchResult.d.ts +0 -10
- package/dist/cjs/api/resources/search/types/DocumentCollectionSearchResult.js +0 -3
- package/dist/cjs/api/resources/search/types/SearchDocumentCollectionResponse.d.ts +0 -7
- package/dist/cjs/api/resources/search/types/SearchDocumentCollectionResponse.js +0 -3
- package/dist/cjs/api/resources/search/types/SearchResultChunk.d.ts +0 -7
- package/dist/cjs/api/resources/search/types/SearchResultChunk.js +0 -3
- package/dist/cjs/api/resources/search/types/SingleFieldFilter.d.ts +0 -6
- package/dist/cjs/api/resources/search/types/SingleFieldFilter.js +0 -3
- package/dist/cjs/api/resources/search/types/index.d.ts +0 -5
- package/dist/cjs/api/resources/search/types/index.js +0 -21
- package/dist/cjs/api/resources/users/client/Client.d.ts +0 -36
- package/dist/cjs/api/resources/users/client/Client.js +0 -114
- package/dist/cjs/api/resources/users/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/users/client/index.js +0 -2
- package/dist/cjs/api/resources/users/index.d.ts +0 -2
- package/dist/cjs/api/resources/users/index.js +0 -18
- package/dist/cjs/api/resources/users/types/UserMetadataPatch.d.ts +0 -5
- package/dist/cjs/api/resources/users/types/UserMetadataPatch.js +0 -3
- package/dist/cjs/api/resources/users/types/index.d.ts +0 -1
- package/dist/cjs/api/resources/users/types/index.js +0 -17
- package/dist/cjs/core/file/exports.d.ts +0 -1
- package/dist/cjs/core/file/exports.js +0 -2
- package/dist/cjs/core/file/file.d.ts +0 -10
- package/dist/cjs/core/file/file.js +0 -221
- package/dist/cjs/core/file/index.d.ts +0 -2
- package/dist/cjs/core/file/index.js +0 -18
- package/dist/cjs/core/file/types.d.ts +0 -66
- package/dist/cjs/core/file/types.js +0 -2
- package/dist/cjs/core/form-data-utils/FormDataWrapper.d.ts +0 -15
- package/dist/cjs/core/form-data-utils/FormDataWrapper.js +0 -185
- package/dist/cjs/core/form-data-utils/encodeAsFormParameter.d.ts +0 -1
- package/dist/cjs/core/form-data-utils/encodeAsFormParameter.js +0 -12
- package/dist/cjs/core/form-data-utils/index.d.ts +0 -2
- package/dist/cjs/core/form-data-utils/index.js +0 -20
- package/dist/cjs/core/stream/Stream.d.ts +0 -47
- package/dist/cjs/core/stream/Stream.js +0 -172
- package/dist/cjs/core/stream/index.d.ts +0 -1
- package/dist/cjs/core/stream/index.js +0 -5
- package/dist/esm/api/resources/common/index.d.mts +0 -1
- package/dist/esm/api/resources/common/index.mjs +0 -1
- package/dist/esm/api/resources/common/types/Collaborator.d.mts +0 -5
- package/dist/esm/api/resources/common/types/CustomMetadataValue.d.mts +0 -1
- package/dist/esm/api/resources/common/types/ExternalResourceId.d.mts +0 -5
- package/dist/esm/api/resources/common/types/Operator.d.mts +0 -10
- package/dist/esm/api/resources/common/types/Operator.mjs +0 -10
- package/dist/esm/api/resources/common/types/ResourceIdentifier.d.mts +0 -10
- package/dist/esm/api/resources/common/types/ResourceType.d.mts +0 -22
- package/dist/esm/api/resources/common/types/ResourceType.mjs +0 -22
- package/dist/esm/api/resources/common/types/Role.d.mts +0 -5
- package/dist/esm/api/resources/common/types/Role.mjs +0 -5
- package/dist/esm/api/resources/common/types/Url.d.mts +0 -3
- package/dist/esm/api/resources/common/types/index.d.mts +0 -8
- package/dist/esm/api/resources/common/types/index.mjs +0 -8
- package/dist/esm/api/resources/copilots/client/Client.d.mts +0 -169
- package/dist/esm/api/resources/copilots/client/Client.mjs +0 -519
- package/dist/esm/api/resources/copilots/client/requests/AddCollectionToCopilotRequest.d.mts +0 -13
- package/dist/esm/api/resources/copilots/client/requests/AddCollectionToCopilotRequest.mjs +0 -2
- package/dist/esm/api/resources/copilots/client/requests/CreateConversationRequest.d.mts +0 -13
- package/dist/esm/api/resources/copilots/client/requests/CreateConversationRequest.mjs +0 -2
- package/dist/esm/api/resources/copilots/client/requests/CreateCopilotRequest.d.mts +0 -20
- package/dist/esm/api/resources/copilots/client/requests/CreateCopilotRequest.mjs +0 -2
- package/dist/esm/api/resources/copilots/client/requests/DeleteCopilotRequest.d.mts +0 -10
- package/dist/esm/api/resources/copilots/client/requests/DeleteCopilotRequest.mjs +0 -2
- package/dist/esm/api/resources/copilots/client/requests/ExportCopilotsRequest.d.mts +0 -21
- package/dist/esm/api/resources/copilots/client/requests/ExportCopilotsRequest.mjs +0 -2
- package/dist/esm/api/resources/copilots/client/requests/ProvideMessageFeedbackRequest.d.mts +0 -24
- package/dist/esm/api/resources/copilots/client/requests/ProvideMessageFeedbackRequest.mjs +0 -2
- package/dist/esm/api/resources/copilots/client/requests/RemoveCollectionFromCopilotRequest.d.mts +0 -13
- package/dist/esm/api/resources/copilots/client/requests/RemoveCollectionFromCopilotRequest.mjs +0 -2
- package/dist/esm/api/resources/copilots/client/requests/SendMessageRequest.d.mts +0 -28
- package/dist/esm/api/resources/copilots/client/requests/SendMessageRequest.mjs +0 -2
- package/dist/esm/api/resources/copilots/client/requests/StreamMessageRequest.d.mts +0 -56
- package/dist/esm/api/resources/copilots/client/requests/StreamMessageRequest.mjs +0 -2
- package/dist/esm/api/resources/copilots/client/requests/UpdateConfigurationRequest.d.mts +0 -21
- package/dist/esm/api/resources/copilots/client/requests/UpdateConfigurationRequest.mjs +0 -2
- package/dist/esm/api/resources/copilots/client/requests/index.d.mts +0 -10
- package/dist/esm/api/resources/copilots/types/AiEndpointConfiguration.d.mts +0 -4
- package/dist/esm/api/resources/copilots/types/AiEndpointConfiguration.mjs +0 -2
- package/dist/esm/api/resources/copilots/types/BlockedChunk.d.mts +0 -5
- package/dist/esm/api/resources/copilots/types/BlockedChunk.mjs +0 -2
- package/dist/esm/api/resources/copilots/types/BooleanFieldSchema.d.mts +0 -5
- package/dist/esm/api/resources/copilots/types/BooleanFieldSchema.mjs +0 -2
- package/dist/esm/api/resources/copilots/types/CollectionFilteredData.d.mts +0 -6
- package/dist/esm/api/resources/copilots/types/CollectionFilteredData.mjs +0 -2
- package/dist/esm/api/resources/copilots/types/Configuration.d.mts +0 -7
- package/dist/esm/api/resources/copilots/types/Configuration.mjs +0 -2
- package/dist/esm/api/resources/copilots/types/CreateConversationResponse.d.mts +0 -3
- package/dist/esm/api/resources/copilots/types/CreateConversationResponse.mjs +0 -2
- package/dist/esm/api/resources/copilots/types/CreateCopilotResponse.d.mts +0 -3
- package/dist/esm/api/resources/copilots/types/CreateCopilotResponse.mjs +0 -2
- package/dist/esm/api/resources/copilots/types/DataChunk.d.mts +0 -3
- package/dist/esm/api/resources/copilots/types/DataChunk.mjs +0 -2
- package/dist/esm/api/resources/copilots/types/DataFilter.d.mts +0 -6
- package/dist/esm/api/resources/copilots/types/DataFilter.mjs +0 -2
- package/dist/esm/api/resources/copilots/types/DatetimeFieldSchema.d.mts +0 -6
- package/dist/esm/api/resources/copilots/types/DatetimeFieldSchema.mjs +0 -2
- package/dist/esm/api/resources/copilots/types/DeleteCopilotResponse.d.mts +0 -3
- package/dist/esm/api/resources/copilots/types/DeleteCopilotResponse.mjs +0 -2
- package/dist/esm/api/resources/copilots/types/EndOfMessageChunk.d.mts +0 -1
- package/dist/esm/api/resources/copilots/types/EndOfMessageChunk.mjs +0 -2
- package/dist/esm/api/resources/copilots/types/ErrorChunk.d.mts +0 -4
- package/dist/esm/api/resources/copilots/types/ErrorChunk.mjs +0 -2
- package/dist/esm/api/resources/copilots/types/ErrorChunkData.d.mts +0 -3
- package/dist/esm/api/resources/copilots/types/ErrorChunkData.mjs +0 -2
- package/dist/esm/api/resources/copilots/types/ExportCopilotsResponse.d.mts +0 -9
- package/dist/esm/api/resources/copilots/types/ExportCopilotsResponse.mjs +0 -2
- package/dist/esm/api/resources/copilots/types/ExportedCopilot.d.mts +0 -24
- package/dist/esm/api/resources/copilots/types/ExportedCopilot.mjs +0 -2
- package/dist/esm/api/resources/copilots/types/FeedbackEnum.d.mts +0 -5
- package/dist/esm/api/resources/copilots/types/FeedbackEnum.mjs +0 -5
- package/dist/esm/api/resources/copilots/types/Filter.d.mts +0 -16
- package/dist/esm/api/resources/copilots/types/Filter.mjs +0 -2
- package/dist/esm/api/resources/copilots/types/FinalChunk.d.mts +0 -4
- package/dist/esm/api/resources/copilots/types/FinalChunk.mjs +0 -2
- package/dist/esm/api/resources/copilots/types/InitialChunk.d.mts +0 -7
- package/dist/esm/api/resources/copilots/types/InitialChunk.mjs +0 -2
- package/dist/esm/api/resources/copilots/types/InputVariable.d.mts +0 -4
- package/dist/esm/api/resources/copilots/types/InputVariable.mjs +0 -2
- package/dist/esm/api/resources/copilots/types/InsertedAuditLog.d.mts +0 -3
- package/dist/esm/api/resources/copilots/types/InsertedAuditLog.mjs +0 -2
- package/dist/esm/api/resources/copilots/types/MessageBlocked.d.mts +0 -7
- package/dist/esm/api/resources/copilots/types/MessageBlocked.mjs +0 -2
- package/dist/esm/api/resources/copilots/types/MessageFeedback.d.mts +0 -6
- package/dist/esm/api/resources/copilots/types/MessageFeedback.mjs +0 -2
- package/dist/esm/api/resources/copilots/types/MessageReply.d.mts +0 -11
- package/dist/esm/api/resources/copilots/types/MessageReply.mjs +0 -2
- package/dist/esm/api/resources/copilots/types/NumberFieldSchema.d.mts +0 -6
- package/dist/esm/api/resources/copilots/types/NumberFieldSchema.mjs +0 -2
- package/dist/esm/api/resources/copilots/types/ReferencedSource.d.mts +0 -7
- package/dist/esm/api/resources/copilots/types/ReferencedSource.mjs +0 -2
- package/dist/esm/api/resources/copilots/types/ResponseChunk.d.mts +0 -5
- package/dist/esm/api/resources/copilots/types/ResponseChunk.mjs +0 -2
- package/dist/esm/api/resources/copilots/types/SendAgentMessageResponse.d.mts +0 -4
- package/dist/esm/api/resources/copilots/types/SendAgentMessageResponse.mjs +0 -2
- package/dist/esm/api/resources/copilots/types/SendMessageResponse.d.mts +0 -18
- package/dist/esm/api/resources/copilots/types/SendMessageResponse.mjs +0 -2
- package/dist/esm/api/resources/copilots/types/StreamingChunk.d.mts +0 -22
- package/dist/esm/api/resources/copilots/types/StreamingChunk.mjs +0 -2
- package/dist/esm/api/resources/copilots/types/StringFieldSchema.d.mts +0 -6
- package/dist/esm/api/resources/copilots/types/StringFieldSchema.mjs +0 -2
- package/dist/esm/api/resources/copilots/types/WebSearchResult.d.mts +0 -5
- package/dist/esm/api/resources/copilots/types/WebSearchResult.mjs +0 -2
- package/dist/esm/api/resources/copilots/types/index.d.mts +0 -33
- package/dist/esm/api/resources/copilots/types/index.mjs +0 -33
- package/dist/esm/api/resources/documentCatalog/client/Client.d.mts +0 -84
- package/dist/esm/api/resources/documentCatalog/client/Client.mjs +0 -256
- package/dist/esm/api/resources/documentCatalog/client/index.d.mts +0 -1
- package/dist/esm/api/resources/documentCatalog/client/index.mjs +0 -1
- package/dist/esm/api/resources/documentCatalog/client/requests/UploadDocumentContentsRequest.d.mts +0 -35
- package/dist/esm/api/resources/documentCatalog/client/requests/UploadDocumentContentsRequest.mjs +0 -2
- package/dist/esm/api/resources/documentCatalog/client/requests/UploadFileRequest.d.mts +0 -27
- package/dist/esm/api/resources/documentCatalog/client/requests/UploadFileRequest.mjs +0 -2
- package/dist/esm/api/resources/documentCatalog/client/requests/index.d.mts +0 -2
- package/dist/esm/api/resources/documentCatalog/client/requests/index.mjs +0 -1
- package/dist/esm/api/resources/documentCatalog/index.d.mts +0 -2
- package/dist/esm/api/resources/documentCatalog/index.mjs +0 -2
- package/dist/esm/api/resources/documentCatalog/types/DocumentMetadataPatch.d.mts +0 -7
- package/dist/esm/api/resources/documentCatalog/types/DocumentMetadataPatch.mjs +0 -2
- package/dist/esm/api/resources/documentCatalog/types/DocumentMetadataPatchRequest.d.mts +0 -5
- package/dist/esm/api/resources/documentCatalog/types/DocumentMetadataPatchRequest.mjs +0 -2
- package/dist/esm/api/resources/documentCatalog/types/SyncSourceByUrlRequest.d.mts +0 -4
- package/dist/esm/api/resources/documentCatalog/types/SyncSourceByUrlRequest.mjs +0 -2
- package/dist/esm/api/resources/documentCatalog/types/SyncSourceByUrlResponse.d.mts +0 -3
- package/dist/esm/api/resources/documentCatalog/types/SyncSourceByUrlResponse.mjs +0 -2
- package/dist/esm/api/resources/documentCatalog/types/UploadDocumentResponse.d.mts +0 -3
- package/dist/esm/api/resources/documentCatalog/types/UploadDocumentResponse.mjs +0 -2
- package/dist/esm/api/resources/documentCatalog/types/index.d.mts +0 -5
- package/dist/esm/api/resources/documentCatalog/types/index.mjs +0 -5
- package/dist/esm/api/resources/documentCollections/client/Client.d.mts +0 -159
- package/dist/esm/api/resources/documentCollections/client/Client.mjs +0 -401
- package/dist/esm/api/resources/documentCollections/client/index.d.mts +0 -1
- package/dist/esm/api/resources/documentCollections/client/index.mjs +0 -1
- package/dist/esm/api/resources/documentCollections/client/requests/AddDocumentsToCollectionRequest.d.mts +0 -22
- package/dist/esm/api/resources/documentCollections/client/requests/AddDocumentsToCollectionRequest.mjs +0 -2
- package/dist/esm/api/resources/documentCollections/client/requests/CreateCollectionRequest.d.mts +0 -20
- package/dist/esm/api/resources/documentCollections/client/requests/CreateCollectionRequest.mjs +0 -2
- package/dist/esm/api/resources/documentCollections/client/requests/CreateMongoCollectionSyncRequest.d.mts +0 -28
- package/dist/esm/api/resources/documentCollections/client/requests/CreateMongoCollectionSyncRequest.mjs +0 -2
- package/dist/esm/api/resources/documentCollections/client/requests/DeleteCollectionRequest.d.mts +0 -9
- package/dist/esm/api/resources/documentCollections/client/requests/DeleteCollectionRequest.mjs +0 -2
- package/dist/esm/api/resources/documentCollections/client/requests/ListDocumentsInCollectionRequest.d.mts +0 -10
- package/dist/esm/api/resources/documentCollections/client/requests/ListDocumentsInCollectionRequest.mjs +0 -2
- package/dist/esm/api/resources/documentCollections/client/requests/RemoveDocumentsFromCollectionRequest.d.mts +0 -22
- package/dist/esm/api/resources/documentCollections/client/requests/RemoveDocumentsFromCollectionRequest.mjs +0 -2
- package/dist/esm/api/resources/documentCollections/client/requests/UpdateMongoCollectionSyncRequest.d.mts +0 -28
- package/dist/esm/api/resources/documentCollections/client/requests/UpdateMongoCollectionSyncRequest.mjs +0 -2
- package/dist/esm/api/resources/documentCollections/client/requests/index.d.mts +0 -7
- package/dist/esm/api/resources/documentCollections/client/requests/index.mjs +0 -1
- package/dist/esm/api/resources/documentCollections/index.d.mts +0 -2
- package/dist/esm/api/resources/documentCollections/index.mjs +0 -2
- package/dist/esm/api/resources/documentCollections/types/CreateCollectionResponse.d.mts +0 -3
- package/dist/esm/api/resources/documentCollections/types/CreateCollectionResponse.mjs +0 -2
- package/dist/esm/api/resources/documentCollections/types/DeleteCollectionResponse.d.mts +0 -3
- package/dist/esm/api/resources/documentCollections/types/DeleteCollectionResponse.mjs +0 -2
- package/dist/esm/api/resources/documentCollections/types/ListDocumentsInCollectionResponse.d.mts +0 -4
- package/dist/esm/api/resources/documentCollections/types/ListDocumentsInCollectionResponse.mjs +0 -2
- package/dist/esm/api/resources/documentCollections/types/MongoCollectionSyncConfig.d.mts +0 -7
- package/dist/esm/api/resources/documentCollections/types/MongoCollectionSyncConfig.mjs +0 -2
- package/dist/esm/api/resources/documentCollections/types/MongoCollectionSyncResponse.d.mts +0 -5
- package/dist/esm/api/resources/documentCollections/types/MongoCollectionSyncResponse.mjs +0 -2
- package/dist/esm/api/resources/documentCollections/types/MongoSourceFieldsConfig.d.mts +0 -6
- package/dist/esm/api/resources/documentCollections/types/MongoSourceFieldsConfig.mjs +0 -2
- package/dist/esm/api/resources/documentCollections/types/index.d.mts +0 -6
- package/dist/esm/api/resources/documentCollections/types/index.mjs +0 -6
- package/dist/esm/api/resources/search/client/Client.d.mts +0 -41
- package/dist/esm/api/resources/search/client/Client.mjs +0 -85
- package/dist/esm/api/resources/search/client/index.d.mts +0 -1
- package/dist/esm/api/resources/search/client/index.mjs +0 -1
- package/dist/esm/api/resources/search/client/requests/SearchDocumentCollectionRequest.d.mts +0 -33
- package/dist/esm/api/resources/search/client/requests/SearchDocumentCollectionRequest.mjs +0 -2
- package/dist/esm/api/resources/search/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/search/client/requests/index.mjs +0 -1
- package/dist/esm/api/resources/search/index.d.mts +0 -2
- package/dist/esm/api/resources/search/index.mjs +0 -2
- package/dist/esm/api/resources/search/types/DocumentCollectionSearchOptions.d.mts +0 -17
- package/dist/esm/api/resources/search/types/DocumentCollectionSearchOptions.mjs +0 -2
- package/dist/esm/api/resources/search/types/DocumentCollectionSearchResult.d.mts +0 -10
- package/dist/esm/api/resources/search/types/DocumentCollectionSearchResult.mjs +0 -2
- package/dist/esm/api/resources/search/types/SearchDocumentCollectionResponse.d.mts +0 -7
- package/dist/esm/api/resources/search/types/SearchDocumentCollectionResponse.mjs +0 -2
- package/dist/esm/api/resources/search/types/SearchResultChunk.d.mts +0 -7
- package/dist/esm/api/resources/search/types/SearchResultChunk.mjs +0 -2
- package/dist/esm/api/resources/search/types/SingleFieldFilter.d.mts +0 -6
- package/dist/esm/api/resources/search/types/SingleFieldFilter.mjs +0 -2
- package/dist/esm/api/resources/search/types/index.d.mts +0 -5
- package/dist/esm/api/resources/search/types/index.mjs +0 -5
- package/dist/esm/api/resources/users/client/Client.d.mts +0 -36
- package/dist/esm/api/resources/users/client/Client.mjs +0 -77
- package/dist/esm/api/resources/users/client/index.d.mts +0 -1
- package/dist/esm/api/resources/users/client/index.mjs +0 -1
- package/dist/esm/api/resources/users/index.d.mts +0 -2
- package/dist/esm/api/resources/users/index.mjs +0 -2
- package/dist/esm/api/resources/users/types/UserMetadataPatch.d.mts +0 -5
- package/dist/esm/api/resources/users/types/UserMetadataPatch.mjs +0 -2
- package/dist/esm/api/resources/users/types/index.d.mts +0 -1
- package/dist/esm/api/resources/users/types/index.mjs +0 -1
- package/dist/esm/core/file/exports.d.mts +0 -1
- package/dist/esm/core/file/exports.mjs +0 -1
- package/dist/esm/core/file/file.d.mts +0 -10
- package/dist/esm/core/file/file.mjs +0 -184
- package/dist/esm/core/file/index.d.mts +0 -2
- package/dist/esm/core/file/index.mjs +0 -2
- package/dist/esm/core/file/types.d.mts +0 -66
- package/dist/esm/core/file/types.mjs +0 -1
- package/dist/esm/core/form-data-utils/FormDataWrapper.d.mts +0 -15
- package/dist/esm/core/form-data-utils/FormDataWrapper.mjs +0 -147
- package/dist/esm/core/form-data-utils/encodeAsFormParameter.d.mts +0 -1
- package/dist/esm/core/form-data-utils/encodeAsFormParameter.mjs +0 -9
- package/dist/esm/core/form-data-utils/index.d.mts +0 -2
- package/dist/esm/core/form-data-utils/index.mjs +0 -2
- package/dist/esm/core/stream/Stream.d.mts +0 -47
- package/dist/esm/core/stream/Stream.mjs +0 -167
- package/dist/esm/core/stream/index.d.mts +0 -1
- package/dist/esm/core/stream/index.mjs +0 -1
- /package/dist/cjs/api/resources/{copilots → agents}/client/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{copilots → agents}/client/index.js +0 -0
- /package/dist/cjs/api/resources/{common/types/Collaborator.js → agents/client/requests/FetchResponseAgentsRequest.js} +0 -0
- /package/dist/cjs/api/resources/{common/types/CustomMetadataValue.js → agents/client/requests/SendMessageAgentsRequest.js} +0 -0
- /package/dist/cjs/api/resources/{copilots → agents}/client/requests/index.js +0 -0
- /package/dist/cjs/api/resources/{copilots → agents}/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{copilots → agents}/index.js +0 -0
- /package/dist/cjs/api/resources/{common/types/ExternalResourceId.js → agents/types/FetchResponseAgentsResponse.js} +0 -0
- /package/dist/cjs/api/resources/{common/types/ResourceIdentifier.js → agents/types/SendMessageAgentsRequestConversation.js} +0 -0
- /package/dist/cjs/api/resources/{common/types/Url.js → agents/types/SendMessageAgentsResponse.js} +0 -0
- /package/dist/esm/api/resources/{copilots → agents}/client/index.d.mts +0 -0
- /package/dist/esm/api/resources/{copilots → agents}/client/index.mjs +0 -0
- /package/dist/esm/api/resources/{common/types/Collaborator.mjs → agents/client/requests/FetchResponseAgentsRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{common/types/CustomMetadataValue.mjs → agents/client/requests/SendMessageAgentsRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{copilots → agents}/client/requests/index.mjs +0 -0
- /package/dist/esm/api/resources/{copilots → agents}/index.d.mts +0 -0
- /package/dist/esm/api/resources/{copilots → agents}/index.mjs +0 -0
- /package/dist/esm/api/resources/{common/types/ExternalResourceId.mjs → agents/types/FetchResponseAgentsResponse.mjs} +0 -0
- /package/dist/esm/api/resources/{common/types/ResourceIdentifier.mjs → agents/types/SendMessageAgentsRequestConversation.mjs} +0 -0
- /package/dist/esm/api/resources/{common/types/Url.mjs → agents/types/SendMessageAgentsResponse.mjs} +0 -0
|
@@ -1,519 +0,0 @@
|
|
|
1
|
-
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
12
|
-
import { mergeHeaders } from "../../../../core/headers.mjs";
|
|
13
|
-
import * as core from "../../../../core/index.mjs";
|
|
14
|
-
import * as environments from "../../../../environments.mjs";
|
|
15
|
-
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
|
|
16
|
-
import * as errors from "../../../../errors/index.mjs";
|
|
17
|
-
export class CopilotsClient {
|
|
18
|
-
constructor(options = {}) {
|
|
19
|
-
this._options = normalizeClientOptionsWithAuth(options);
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Create a new agent. The API key used will be added to the agent for future Requests
|
|
23
|
-
*
|
|
24
|
-
* @param {Credal.CreateCopilotRequest} request
|
|
25
|
-
* @param {CopilotsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* await client.copilots.createCopilot({
|
|
29
|
-
* name: "Customer Agent",
|
|
30
|
-
* description: "This agent is used to answer customer requests based on internal documentation.",
|
|
31
|
-
* collaborators: [{
|
|
32
|
-
* email: "test@gmail.com",
|
|
33
|
-
* role: "editor"
|
|
34
|
-
* }]
|
|
35
|
-
* })
|
|
36
|
-
*/
|
|
37
|
-
createCopilot(request, requestOptions) {
|
|
38
|
-
return core.HttpResponsePromise.fromPromise(this.__createCopilot(request, requestOptions));
|
|
39
|
-
}
|
|
40
|
-
__createCopilot(request, requestOptions) {
|
|
41
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
43
|
-
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
44
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
45
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
46
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/copilots/createCopilot"),
|
|
47
|
-
method: "POST",
|
|
48
|
-
headers: _headers,
|
|
49
|
-
contentType: "application/json",
|
|
50
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
51
|
-
requestType: "json",
|
|
52
|
-
body: request,
|
|
53
|
-
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
54
|
-
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
55
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
56
|
-
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
57
|
-
logging: this._options.logging,
|
|
58
|
-
});
|
|
59
|
-
if (_response.ok) {
|
|
60
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
61
|
-
}
|
|
62
|
-
if (_response.error.reason === "status-code") {
|
|
63
|
-
throw new errors.CredalError({
|
|
64
|
-
statusCode: _response.error.statusCode,
|
|
65
|
-
body: _response.error.body,
|
|
66
|
-
rawResponse: _response.rawResponse,
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/copilots/createCopilot");
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* OPTIONAL. Create a new conversation with the Agent. The conversation ID can be used in the `sendMessage` endpoint. The `sendMessage` endpoint automatically creates new conversations upon first request, but calling this endpoint can simplify certain use cases where it is helpful for the application to have the conversation ID before the first message is sent.
|
|
74
|
-
*
|
|
75
|
-
* @param {Credal.CreateConversationRequest} request
|
|
76
|
-
* @param {CopilotsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
77
|
-
*
|
|
78
|
-
* @example
|
|
79
|
-
* await client.copilots.createConversation({
|
|
80
|
-
* agentId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
|
|
81
|
-
* userEmail: "ravin@credal.ai"
|
|
82
|
-
* })
|
|
83
|
-
*/
|
|
84
|
-
createConversation(request, requestOptions) {
|
|
85
|
-
return core.HttpResponsePromise.fromPromise(this.__createConversation(request, requestOptions));
|
|
86
|
-
}
|
|
87
|
-
__createConversation(request, requestOptions) {
|
|
88
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
89
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
90
|
-
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
91
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
92
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
93
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/copilots/createConversation"),
|
|
94
|
-
method: "POST",
|
|
95
|
-
headers: _headers,
|
|
96
|
-
contentType: "application/json",
|
|
97
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
98
|
-
requestType: "json",
|
|
99
|
-
body: request,
|
|
100
|
-
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
101
|
-
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
102
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
103
|
-
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
104
|
-
logging: this._options.logging,
|
|
105
|
-
});
|
|
106
|
-
if (_response.ok) {
|
|
107
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
108
|
-
}
|
|
109
|
-
if (_response.error.reason === "status-code") {
|
|
110
|
-
throw new errors.CredalError({
|
|
111
|
-
statusCode: _response.error.statusCode,
|
|
112
|
-
body: _response.error.body,
|
|
113
|
-
rawResponse: _response.rawResponse,
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/copilots/createConversation");
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* @param {Credal.ProvideMessageFeedbackRequest} request
|
|
121
|
-
* @param {CopilotsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
122
|
-
*
|
|
123
|
-
* @example
|
|
124
|
-
* await client.copilots.provideMessageFeedback({
|
|
125
|
-
* userEmail: "ravin@credal.ai",
|
|
126
|
-
* messageId: "dd721cd8-4bf2-4b94-9869-258df3dab9dc",
|
|
127
|
-
* agentId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
|
|
128
|
-
* messageFeedback: {
|
|
129
|
-
* feedback: "NEGATIVE",
|
|
130
|
-
* suggestedAnswer: "Yes, Credal is SOC 2 compliant.",
|
|
131
|
-
* descriptiveFeedback: "The response should be extremely clear and concise."
|
|
132
|
-
* }
|
|
133
|
-
* })
|
|
134
|
-
*/
|
|
135
|
-
provideMessageFeedback(request, requestOptions) {
|
|
136
|
-
return core.HttpResponsePromise.fromPromise(this.__provideMessageFeedback(request, requestOptions));
|
|
137
|
-
}
|
|
138
|
-
__provideMessageFeedback(request, requestOptions) {
|
|
139
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
140
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
141
|
-
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
142
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
143
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
144
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/copilots/provideMessageFeedback"),
|
|
145
|
-
method: "POST",
|
|
146
|
-
headers: _headers,
|
|
147
|
-
contentType: "application/json",
|
|
148
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
149
|
-
requestType: "json",
|
|
150
|
-
body: request,
|
|
151
|
-
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
152
|
-
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
153
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
154
|
-
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
155
|
-
logging: this._options.logging,
|
|
156
|
-
});
|
|
157
|
-
if (_response.ok) {
|
|
158
|
-
return { data: undefined, rawResponse: _response.rawResponse };
|
|
159
|
-
}
|
|
160
|
-
if (_response.error.reason === "status-code") {
|
|
161
|
-
throw new errors.CredalError({
|
|
162
|
-
statusCode: _response.error.statusCode,
|
|
163
|
-
body: _response.error.body,
|
|
164
|
-
rawResponse: _response.rawResponse,
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/copilots/provideMessageFeedback");
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* @param {Credal.SendMessageRequest} request
|
|
172
|
-
* @param {CopilotsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
173
|
-
*
|
|
174
|
-
* @example
|
|
175
|
-
* await client.copilots.sendMessage({
|
|
176
|
-
* agentId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
|
|
177
|
-
* message: "Is Credal SOC 2 compliant?",
|
|
178
|
-
* userEmail: "ravin@credal.ai",
|
|
179
|
-
* inputVariables: [{
|
|
180
|
-
* name: "input1",
|
|
181
|
-
* ids: ["82e4b12a-6990-45d4-8ebd-85c00e030c24"]
|
|
182
|
-
* }, {
|
|
183
|
-
* name: "input2",
|
|
184
|
-
* ids: ["82e4b12a-6990-45d4-8ebd-85c00e030c25", "82e4b12a-6990-45d4-8ebd-85c00e030c26"]
|
|
185
|
-
* }]
|
|
186
|
-
* })
|
|
187
|
-
*/
|
|
188
|
-
sendMessage(request, requestOptions) {
|
|
189
|
-
return core.HttpResponsePromise.fromPromise(this.__sendMessage(request, requestOptions));
|
|
190
|
-
}
|
|
191
|
-
__sendMessage(request, requestOptions) {
|
|
192
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
193
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
194
|
-
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
195
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
196
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
197
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/copilots/sendMessage"),
|
|
198
|
-
method: "POST",
|
|
199
|
-
headers: _headers,
|
|
200
|
-
contentType: "application/json",
|
|
201
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
202
|
-
requestType: "json",
|
|
203
|
-
body: request,
|
|
204
|
-
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
205
|
-
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
206
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
207
|
-
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
208
|
-
logging: this._options.logging,
|
|
209
|
-
});
|
|
210
|
-
if (_response.ok) {
|
|
211
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
212
|
-
}
|
|
213
|
-
if (_response.error.reason === "status-code") {
|
|
214
|
-
throw new errors.CredalError({
|
|
215
|
-
statusCode: _response.error.statusCode,
|
|
216
|
-
body: _response.error.body,
|
|
217
|
-
rawResponse: _response.rawResponse,
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/copilots/sendMessage");
|
|
221
|
-
});
|
|
222
|
-
}
|
|
223
|
-
/**
|
|
224
|
-
* This endpoint allows you to send a message to a specific agent and get the response back as a streamed set of Server-Sent Events.
|
|
225
|
-
*/
|
|
226
|
-
streamMessage(request, requestOptions) {
|
|
227
|
-
return core.HttpResponsePromise.fromPromise(this.__streamMessage(request, requestOptions));
|
|
228
|
-
}
|
|
229
|
-
__streamMessage(request, requestOptions) {
|
|
230
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
231
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
232
|
-
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
233
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
234
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
235
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/copilots/streamMessage"),
|
|
236
|
-
method: "POST",
|
|
237
|
-
headers: _headers,
|
|
238
|
-
contentType: "application/json",
|
|
239
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
240
|
-
requestType: "json",
|
|
241
|
-
body: request,
|
|
242
|
-
responseType: "sse",
|
|
243
|
-
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
244
|
-
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
245
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
246
|
-
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
247
|
-
logging: this._options.logging,
|
|
248
|
-
});
|
|
249
|
-
if (_response.ok) {
|
|
250
|
-
return {
|
|
251
|
-
data: new core.Stream({
|
|
252
|
-
stream: _response.body,
|
|
253
|
-
parse: (data) => data,
|
|
254
|
-
signal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
255
|
-
eventShape: {
|
|
256
|
-
type: "sse",
|
|
257
|
-
streamTerminator: "[DONE]",
|
|
258
|
-
},
|
|
259
|
-
}),
|
|
260
|
-
rawResponse: _response.rawResponse,
|
|
261
|
-
};
|
|
262
|
-
}
|
|
263
|
-
if (_response.error.reason === "status-code") {
|
|
264
|
-
throw new errors.CredalError({
|
|
265
|
-
statusCode: _response.error.statusCode,
|
|
266
|
-
body: _response.error.body,
|
|
267
|
-
rawResponse: _response.rawResponse,
|
|
268
|
-
});
|
|
269
|
-
}
|
|
270
|
-
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/copilots/streamMessage");
|
|
271
|
-
});
|
|
272
|
-
}
|
|
273
|
-
/**
|
|
274
|
-
* Link a collection with a agent. The API Key used must be added to both the collection and the agent beforehand.
|
|
275
|
-
*
|
|
276
|
-
* @param {Credal.AddCollectionToCopilotRequest} request
|
|
277
|
-
* @param {CopilotsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
278
|
-
*
|
|
279
|
-
* @example
|
|
280
|
-
* await client.copilots.addCollectionToCopilot({
|
|
281
|
-
* copilotId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
|
|
282
|
-
* collectionId: "def1055f-83c5-43d6-b558-f7a38e7b299e"
|
|
283
|
-
* })
|
|
284
|
-
*/
|
|
285
|
-
addCollectionToCopilot(request, requestOptions) {
|
|
286
|
-
return core.HttpResponsePromise.fromPromise(this.__addCollectionToCopilot(request, requestOptions));
|
|
287
|
-
}
|
|
288
|
-
__addCollectionToCopilot(request, requestOptions) {
|
|
289
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
290
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
291
|
-
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
292
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
293
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
294
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/copilots/addCollectionToCopilot"),
|
|
295
|
-
method: "POST",
|
|
296
|
-
headers: _headers,
|
|
297
|
-
contentType: "application/json",
|
|
298
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
299
|
-
requestType: "json",
|
|
300
|
-
body: request,
|
|
301
|
-
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
302
|
-
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
303
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
304
|
-
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
305
|
-
logging: this._options.logging,
|
|
306
|
-
});
|
|
307
|
-
if (_response.ok) {
|
|
308
|
-
return { data: undefined, rawResponse: _response.rawResponse };
|
|
309
|
-
}
|
|
310
|
-
if (_response.error.reason === "status-code") {
|
|
311
|
-
throw new errors.CredalError({
|
|
312
|
-
statusCode: _response.error.statusCode,
|
|
313
|
-
body: _response.error.body,
|
|
314
|
-
rawResponse: _response.rawResponse,
|
|
315
|
-
});
|
|
316
|
-
}
|
|
317
|
-
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/copilots/addCollectionToCopilot");
|
|
318
|
-
});
|
|
319
|
-
}
|
|
320
|
-
/**
|
|
321
|
-
* Unlink a collection with a agent. The API Key used must be added to both the collection and the agent beforehand.
|
|
322
|
-
*
|
|
323
|
-
* @param {Credal.RemoveCollectionFromCopilotRequest} request
|
|
324
|
-
* @param {CopilotsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
325
|
-
*
|
|
326
|
-
* @example
|
|
327
|
-
* await client.copilots.removeCollectionFromCopilot({
|
|
328
|
-
* copilotId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
|
|
329
|
-
* collectionId: "def1055f-83c5-43d6-b558-f7a38e7b299e"
|
|
330
|
-
* })
|
|
331
|
-
*/
|
|
332
|
-
removeCollectionFromCopilot(request, requestOptions) {
|
|
333
|
-
return core.HttpResponsePromise.fromPromise(this.__removeCollectionFromCopilot(request, requestOptions));
|
|
334
|
-
}
|
|
335
|
-
__removeCollectionFromCopilot(request, requestOptions) {
|
|
336
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
337
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
338
|
-
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
339
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
340
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
341
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/copilots/removeCollectionFromCopilot"),
|
|
342
|
-
method: "POST",
|
|
343
|
-
headers: _headers,
|
|
344
|
-
contentType: "application/json",
|
|
345
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
346
|
-
requestType: "json",
|
|
347
|
-
body: request,
|
|
348
|
-
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
349
|
-
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
350
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
351
|
-
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
352
|
-
logging: this._options.logging,
|
|
353
|
-
});
|
|
354
|
-
if (_response.ok) {
|
|
355
|
-
return { data: undefined, rawResponse: _response.rawResponse };
|
|
356
|
-
}
|
|
357
|
-
if (_response.error.reason === "status-code") {
|
|
358
|
-
throw new errors.CredalError({
|
|
359
|
-
statusCode: _response.error.statusCode,
|
|
360
|
-
body: _response.error.body,
|
|
361
|
-
rawResponse: _response.rawResponse,
|
|
362
|
-
});
|
|
363
|
-
}
|
|
364
|
-
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/copilots/removeCollectionFromCopilot");
|
|
365
|
-
});
|
|
366
|
-
}
|
|
367
|
-
/**
|
|
368
|
-
* Update the configuration for a agent
|
|
369
|
-
*
|
|
370
|
-
* @param {Credal.UpdateConfigurationRequest} request
|
|
371
|
-
* @param {CopilotsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
372
|
-
*
|
|
373
|
-
* @example
|
|
374
|
-
* await client.copilots.updateConfiguration({
|
|
375
|
-
* copilotId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
|
|
376
|
-
* configuration: {
|
|
377
|
-
* name: "Customer Agent",
|
|
378
|
-
* description: "This agent is used to answer customer requests based on internal documentation.",
|
|
379
|
-
* prompt: "You are a polite, helpful assistant used to answer customer requests.",
|
|
380
|
-
* aiEndpointConfiguration: {
|
|
381
|
-
* baseUrl: "https://api.openai.com/v1/",
|
|
382
|
-
* apiKey: "<YOUR_API_KEY_HERE>"
|
|
383
|
-
* }
|
|
384
|
-
* }
|
|
385
|
-
* })
|
|
386
|
-
*/
|
|
387
|
-
updateConfiguration(request, requestOptions) {
|
|
388
|
-
return core.HttpResponsePromise.fromPromise(this.__updateConfiguration(request, requestOptions));
|
|
389
|
-
}
|
|
390
|
-
__updateConfiguration(request, requestOptions) {
|
|
391
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
392
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
393
|
-
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
394
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
395
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
396
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/copilots/updateConfiguration"),
|
|
397
|
-
method: "POST",
|
|
398
|
-
headers: _headers,
|
|
399
|
-
contentType: "application/json",
|
|
400
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
401
|
-
requestType: "json",
|
|
402
|
-
body: request,
|
|
403
|
-
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
404
|
-
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
405
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
406
|
-
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
407
|
-
logging: this._options.logging,
|
|
408
|
-
});
|
|
409
|
-
if (_response.ok) {
|
|
410
|
-
return { data: undefined, rawResponse: _response.rawResponse };
|
|
411
|
-
}
|
|
412
|
-
if (_response.error.reason === "status-code") {
|
|
413
|
-
throw new errors.CredalError({
|
|
414
|
-
statusCode: _response.error.statusCode,
|
|
415
|
-
body: _response.error.body,
|
|
416
|
-
rawResponse: _response.rawResponse,
|
|
417
|
-
});
|
|
418
|
-
}
|
|
419
|
-
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/copilots/updateConfiguration");
|
|
420
|
-
});
|
|
421
|
-
}
|
|
422
|
-
/**
|
|
423
|
-
* @param {Credal.DeleteCopilotRequest} request
|
|
424
|
-
* @param {CopilotsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
425
|
-
*
|
|
426
|
-
* @example
|
|
427
|
-
* await client.copilots.deleteCopilot({
|
|
428
|
-
* id: "ac20e6ba-0bae-11ef-b25a-efca73df4c3a"
|
|
429
|
-
* })
|
|
430
|
-
*/
|
|
431
|
-
deleteCopilot(request, requestOptions) {
|
|
432
|
-
return core.HttpResponsePromise.fromPromise(this.__deleteCopilot(request, requestOptions));
|
|
433
|
-
}
|
|
434
|
-
__deleteCopilot(request, requestOptions) {
|
|
435
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
436
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
437
|
-
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
438
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
439
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
440
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/copilots/deleteCopilot"),
|
|
441
|
-
method: "DELETE",
|
|
442
|
-
headers: _headers,
|
|
443
|
-
contentType: "application/json",
|
|
444
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
445
|
-
requestType: "json",
|
|
446
|
-
body: request,
|
|
447
|
-
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
448
|
-
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
449
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
450
|
-
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
451
|
-
logging: this._options.logging,
|
|
452
|
-
});
|
|
453
|
-
if (_response.ok) {
|
|
454
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
455
|
-
}
|
|
456
|
-
if (_response.error.reason === "status-code") {
|
|
457
|
-
throw new errors.CredalError({
|
|
458
|
-
statusCode: _response.error.statusCode,
|
|
459
|
-
body: _response.error.body,
|
|
460
|
-
rawResponse: _response.rawResponse,
|
|
461
|
-
});
|
|
462
|
-
}
|
|
463
|
-
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/v0/copilots/deleteCopilot");
|
|
464
|
-
});
|
|
465
|
-
}
|
|
466
|
-
/**
|
|
467
|
-
* Export copilot configurations for backup or migration purposes.
|
|
468
|
-
*
|
|
469
|
-
* **IMPORTANT**: This endpoint requires:
|
|
470
|
-
* - Admin privileges
|
|
471
|
-
* - The 'ai-usage-analytics-log.export' scope on the API key
|
|
472
|
-
*
|
|
473
|
-
* Returns all deployed copilots with their full configuration including model settings, tools, and deployment details. Optional date filters can be applied to narrow down results.
|
|
474
|
-
*
|
|
475
|
-
* @param {Credal.ExportCopilotsRequest} request
|
|
476
|
-
* @param {CopilotsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
477
|
-
*
|
|
478
|
-
* @example
|
|
479
|
-
* await client.copilots.export({
|
|
480
|
-
* agentCreatedFrom: "2024-01-01T00:00:00Z",
|
|
481
|
-
* agentCreatedTo: "2024-12-31T23:59:59Z"
|
|
482
|
-
* })
|
|
483
|
-
*/
|
|
484
|
-
export(request = {}, requestOptions) {
|
|
485
|
-
return core.HttpResponsePromise.fromPromise(this.__export(request, requestOptions));
|
|
486
|
-
}
|
|
487
|
-
__export() {
|
|
488
|
-
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
489
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
490
|
-
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
491
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
492
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
493
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/copilots/export"),
|
|
494
|
-
method: "POST",
|
|
495
|
-
headers: _headers,
|
|
496
|
-
contentType: "application/json",
|
|
497
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
498
|
-
requestType: "json",
|
|
499
|
-
body: request,
|
|
500
|
-
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
501
|
-
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
502
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
503
|
-
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
504
|
-
logging: this._options.logging,
|
|
505
|
-
});
|
|
506
|
-
if (_response.ok) {
|
|
507
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
508
|
-
}
|
|
509
|
-
if (_response.error.reason === "status-code") {
|
|
510
|
-
throw new errors.CredalError({
|
|
511
|
-
statusCode: _response.error.statusCode,
|
|
512
|
-
body: _response.error.body,
|
|
513
|
-
rawResponse: _response.rawResponse,
|
|
514
|
-
});
|
|
515
|
-
}
|
|
516
|
-
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/copilots/export");
|
|
517
|
-
});
|
|
518
|
-
}
|
|
519
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @example
|
|
3
|
-
* {
|
|
4
|
-
* copilotId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
|
|
5
|
-
* collectionId: "def1055f-83c5-43d6-b558-f7a38e7b299e"
|
|
6
|
-
* }
|
|
7
|
-
*/
|
|
8
|
-
export interface AddCollectionToCopilotRequest {
|
|
9
|
-
/** Credal-generated Agent ID to add the collection to. */
|
|
10
|
-
copilotId: string;
|
|
11
|
-
/** Credal-generated collection ID to add. */
|
|
12
|
-
collectionId: string;
|
|
13
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @example
|
|
3
|
-
* {
|
|
4
|
-
* agentId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
|
|
5
|
-
* userEmail: "ravin@credal.ai"
|
|
6
|
-
* }
|
|
7
|
-
*/
|
|
8
|
-
export interface CreateConversationRequest {
|
|
9
|
-
/** Credal-generated Agent ID to specify which agent to route the request to. */
|
|
10
|
-
agentId: string;
|
|
11
|
-
/** End-user for the conversation. */
|
|
12
|
-
userEmail: string;
|
|
13
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type * as Credal from "../../../../index.mjs";
|
|
2
|
-
/**
|
|
3
|
-
* @example
|
|
4
|
-
* {
|
|
5
|
-
* name: "Customer Agent",
|
|
6
|
-
* description: "This agent is used to answer customer requests based on internal documentation.",
|
|
7
|
-
* collaborators: [{
|
|
8
|
-
* email: "test@gmail.com",
|
|
9
|
-
* role: "editor"
|
|
10
|
-
* }]
|
|
11
|
-
* }
|
|
12
|
-
*/
|
|
13
|
-
export interface CreateCopilotRequest {
|
|
14
|
-
/** A descriptive name for the agent. */
|
|
15
|
-
name: string;
|
|
16
|
-
/** An in depth name for the agent's function. Useful for routing requests to the right agent. */
|
|
17
|
-
description: string;
|
|
18
|
-
/** A list of collaborator emails and roles that will have access to the agent. */
|
|
19
|
-
collaborators: Credal.Collaborator[];
|
|
20
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @example
|
|
3
|
-
* {
|
|
4
|
-
* agentCreatedFrom: "2024-01-01T00:00:00Z",
|
|
5
|
-
* agentCreatedTo: "2024-12-31T23:59:59Z"
|
|
6
|
-
* }
|
|
7
|
-
*/
|
|
8
|
-
export interface ExportCopilotsRequest {
|
|
9
|
-
/** Filter copilots created on or after this datetime (ISO 8601 format). */
|
|
10
|
-
agentCreatedFrom?: string;
|
|
11
|
-
/** Filter copilots created before or on this datetime (ISO 8601 format). */
|
|
12
|
-
agentCreatedTo?: string;
|
|
13
|
-
/** Filter copilot versions created on or after this datetime (ISO 8601 format). */
|
|
14
|
-
versionCreatedFrom?: string;
|
|
15
|
-
/** Filter copilot versions created before or on this datetime (ISO 8601 format). */
|
|
16
|
-
versionCreatedTo?: string;
|
|
17
|
-
/** Maximum number of copilots to return. Must be a positive integer with a maximum value of 1000. Defaults to 100. */
|
|
18
|
-
limit?: number;
|
|
19
|
-
/** Cursor for pagination. Use the cursor returned in the previous response to fetch the next page of results. If not provided, returns the first page. */
|
|
20
|
-
cursor?: string;
|
|
21
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type * as Credal from "../../../../index.mjs";
|
|
2
|
-
/**
|
|
3
|
-
* @example
|
|
4
|
-
* {
|
|
5
|
-
* userEmail: "ravin@credal.ai",
|
|
6
|
-
* messageId: "dd721cd8-4bf2-4b94-9869-258df3dab9dc",
|
|
7
|
-
* agentId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
|
|
8
|
-
* messageFeedback: {
|
|
9
|
-
* feedback: "NEGATIVE",
|
|
10
|
-
* suggestedAnswer: "Yes, Credal is SOC 2 compliant.",
|
|
11
|
-
* descriptiveFeedback: "The response should be extremely clear and concise."
|
|
12
|
-
* }
|
|
13
|
-
* }
|
|
14
|
-
*/
|
|
15
|
-
export interface ProvideMessageFeedbackRequest {
|
|
16
|
-
/** Credal-generated Agent ID to specify which agent to route the request to. */
|
|
17
|
-
agentId: string;
|
|
18
|
-
/** The user profile you want to use when providing feedback. */
|
|
19
|
-
userEmail: string;
|
|
20
|
-
/** The message ID for which feedback is being provided. */
|
|
21
|
-
messageId: string;
|
|
22
|
-
/** The feedback provided by the user. */
|
|
23
|
-
messageFeedback: Credal.MessageFeedback;
|
|
24
|
-
}
|