@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
package/dist/esm/Client.mjs
CHANGED
|
@@ -1,32 +1,46 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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 { AgentsClient } from "./api/resources/agents/client/Client.mjs";
|
|
7
12
|
import { normalizeClientOptionsWithAuth } from "./BaseClient.mjs";
|
|
13
|
+
import * as core from "./core/index.mjs";
|
|
8
14
|
export class CredalClient {
|
|
9
|
-
constructor(options
|
|
15
|
+
constructor(options) {
|
|
10
16
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
11
17
|
}
|
|
12
|
-
get
|
|
18
|
+
get agents() {
|
|
13
19
|
var _a;
|
|
14
|
-
return ((_a = this.
|
|
20
|
+
return ((_a = this._agents) !== null && _a !== void 0 ? _a : (this._agents = new AgentsClient(this._options)));
|
|
15
21
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Make a passthrough request using the SDK's configured auth, retry, logging, etc.
|
|
24
|
+
* This is useful for making requests to endpoints not yet supported in the SDK.
|
|
25
|
+
* The input can be a URL string, URL object, or Request object. Relative paths are resolved against the configured base URL.
|
|
26
|
+
*
|
|
27
|
+
* @param {Request | string | URL} input - The URL, path, or Request object.
|
|
28
|
+
* @param {RequestInit} init - Standard fetch RequestInit options.
|
|
29
|
+
* @param {core.PassthroughRequest.RequestOptions} requestOptions - Per-request overrides (timeout, retries, headers, abort signal).
|
|
30
|
+
* @returns {Promise<Response>} A standard Response object.
|
|
31
|
+
*/
|
|
32
|
+
fetch(input, init, requestOptions) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
var _a;
|
|
35
|
+
return core.makePassthroughRequest(input, init, {
|
|
36
|
+
baseUrl: (_a = this._options.baseUrl) !== null && _a !== void 0 ? _a : this._options.environment,
|
|
37
|
+
headers: this._options.headers,
|
|
38
|
+
timeoutInSeconds: this._options.timeoutInSeconds,
|
|
39
|
+
maxRetries: this._options.maxRetries,
|
|
40
|
+
fetch: this._options.fetch,
|
|
41
|
+
logging: this._options.logging,
|
|
42
|
+
getAuthHeaders: () => __awaiter(this, void 0, void 0, function* () { return (yield this._options.authProvider.getAuthRequest()).headers; }),
|
|
43
|
+
}, requestOptions);
|
|
44
|
+
});
|
|
31
45
|
}
|
|
32
46
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
import * as errors from "../../errors/index.mjs";
|
|
3
|
+
export class BadRequestError extends errors.CredalError {
|
|
4
|
+
constructor(body, rawResponse) {
|
|
5
|
+
super({
|
|
6
|
+
message: "BadRequestError",
|
|
7
|
+
statusCode: 400,
|
|
8
|
+
body: body,
|
|
9
|
+
rawResponse: rawResponse,
|
|
10
|
+
});
|
|
11
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
12
|
+
if (Error.captureStackTrace) {
|
|
13
|
+
Error.captureStackTrace(this, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
this.name = this.constructor.name;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
import * as errors from "../../errors/index.mjs";
|
|
3
|
+
export class ForbiddenError extends errors.CredalError {
|
|
4
|
+
constructor(body, rawResponse) {
|
|
5
|
+
super({
|
|
6
|
+
message: "ForbiddenError",
|
|
7
|
+
statusCode: 403,
|
|
8
|
+
body: body,
|
|
9
|
+
rawResponse: rawResponse,
|
|
10
|
+
});
|
|
11
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
12
|
+
if (Error.captureStackTrace) {
|
|
13
|
+
Error.captureStackTrace(this, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
this.name = this.constructor.name;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
import * as errors from "../../errors/index.mjs";
|
|
3
|
+
export class InternalServerError extends errors.CredalError {
|
|
4
|
+
constructor(body, rawResponse) {
|
|
5
|
+
super({
|
|
6
|
+
message: "InternalServerError",
|
|
7
|
+
statusCode: 500,
|
|
8
|
+
body: body,
|
|
9
|
+
rawResponse: rawResponse,
|
|
10
|
+
});
|
|
11
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
12
|
+
if (Error.captureStackTrace) {
|
|
13
|
+
Error.captureStackTrace(this, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
this.name = this.constructor.name;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
import * as errors from "../../errors/index.mjs";
|
|
3
|
+
export class NotFoundError extends errors.CredalError {
|
|
4
|
+
constructor(body, rawResponse) {
|
|
5
|
+
super({
|
|
6
|
+
message: "NotFoundError",
|
|
7
|
+
statusCode: 404,
|
|
8
|
+
body: body,
|
|
9
|
+
rawResponse: rawResponse,
|
|
10
|
+
});
|
|
11
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
12
|
+
if (Error.captureStackTrace) {
|
|
13
|
+
Error.captureStackTrace(this, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
this.name = this.constructor.name;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
import * as errors from "../../errors/index.mjs";
|
|
3
|
+
export class UnauthorizedError extends errors.CredalError {
|
|
4
|
+
constructor(body, rawResponse) {
|
|
5
|
+
super({
|
|
6
|
+
message: "UnauthorizedError",
|
|
7
|
+
statusCode: 401,
|
|
8
|
+
body: body,
|
|
9
|
+
rawResponse: rawResponse,
|
|
10
|
+
});
|
|
11
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
12
|
+
if (Error.captureStackTrace) {
|
|
13
|
+
Error.captureStackTrace(this, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
this.name = this.constructor.name;
|
|
16
|
+
}
|
|
17
|
+
}
|
package/dist/esm/api/index.d.mts
CHANGED
package/dist/esm/api/index.mjs
CHANGED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
3
|
+
import * as core from "../../../../core/index.mjs";
|
|
4
|
+
import * as Credal from "../../../index.mjs";
|
|
5
|
+
export declare namespace AgentsClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class AgentsClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<AgentsClient.Options>;
|
|
12
|
+
constructor(options: AgentsClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* @param {Credal.SendMessageAgentsRequest} request
|
|
15
|
+
* @param {AgentsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
16
|
+
*
|
|
17
|
+
* @throws {@link Credal.BadRequestError}
|
|
18
|
+
* @throws {@link Credal.UnauthorizedError}
|
|
19
|
+
* @throws {@link Credal.ForbiddenError}
|
|
20
|
+
* @throws {@link Credal.InternalServerError}
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* await client.agents.sendMessage({
|
|
24
|
+
* agentId: "cc3fd192-ea62-11f0-99fd-03d6b2458fff",
|
|
25
|
+
* conversation: {
|
|
26
|
+
* type: "new"
|
|
27
|
+
* },
|
|
28
|
+
* message: "What documents do we have about Q4 planning?"
|
|
29
|
+
* })
|
|
30
|
+
*/
|
|
31
|
+
sendMessage(request: Credal.SendMessageAgentsRequest, requestOptions?: AgentsClient.RequestOptions): core.HttpResponsePromise<Credal.SendMessageAgentsResponse>;
|
|
32
|
+
private __sendMessage;
|
|
33
|
+
/**
|
|
34
|
+
* @param {Credal.FetchResponseAgentsRequest} request
|
|
35
|
+
* @param {AgentsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
36
|
+
*
|
|
37
|
+
* @throws {@link Credal.BadRequestError}
|
|
38
|
+
* @throws {@link Credal.UnauthorizedError}
|
|
39
|
+
* @throws {@link Credal.ForbiddenError}
|
|
40
|
+
* @throws {@link Credal.NotFoundError}
|
|
41
|
+
* @throws {@link Credal.InternalServerError}
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* await client.agents.fetchResponse({
|
|
45
|
+
* jobId: "jobId"
|
|
46
|
+
* })
|
|
47
|
+
*/
|
|
48
|
+
fetchResponse(request: Credal.FetchResponseAgentsRequest, requestOptions?: AgentsClient.RequestOptions): core.HttpResponsePromise<Credal.FetchResponseAgentsResponse>;
|
|
49
|
+
private __fetchResponse;
|
|
50
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
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
|
+
import * as Credal from "../../../index.mjs";
|
|
18
|
+
export class AgentsClient {
|
|
19
|
+
constructor(options) {
|
|
20
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* @param {Credal.SendMessageAgentsRequest} request
|
|
24
|
+
* @param {AgentsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
25
|
+
*
|
|
26
|
+
* @throws {@link Credal.BadRequestError}
|
|
27
|
+
* @throws {@link Credal.UnauthorizedError}
|
|
28
|
+
* @throws {@link Credal.ForbiddenError}
|
|
29
|
+
* @throws {@link Credal.InternalServerError}
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* await client.agents.sendMessage({
|
|
33
|
+
* agentId: "cc3fd192-ea62-11f0-99fd-03d6b2458fff",
|
|
34
|
+
* conversation: {
|
|
35
|
+
* type: "new"
|
|
36
|
+
* },
|
|
37
|
+
* message: "What documents do we have about Q4 planning?"
|
|
38
|
+
* })
|
|
39
|
+
*/
|
|
40
|
+
sendMessage(request, requestOptions) {
|
|
41
|
+
return core.HttpResponsePromise.fromPromise(this.__sendMessage(request, requestOptions));
|
|
42
|
+
}
|
|
43
|
+
__sendMessage(request, requestOptions) {
|
|
44
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
46
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
47
|
+
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);
|
|
48
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
49
|
+
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.Default, "agents/sendMessage"),
|
|
50
|
+
method: "POST",
|
|
51
|
+
headers: _headers,
|
|
52
|
+
contentType: "application/json",
|
|
53
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
54
|
+
requestType: "json",
|
|
55
|
+
body: request,
|
|
56
|
+
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,
|
|
57
|
+
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,
|
|
58
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
59
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
60
|
+
logging: this._options.logging,
|
|
61
|
+
});
|
|
62
|
+
if (_response.ok) {
|
|
63
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
64
|
+
}
|
|
65
|
+
if (_response.error.reason === "status-code") {
|
|
66
|
+
switch (_response.error.statusCode) {
|
|
67
|
+
case 400:
|
|
68
|
+
throw new Credal.BadRequestError(_response.error.body, _response.rawResponse);
|
|
69
|
+
case 401:
|
|
70
|
+
throw new Credal.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
71
|
+
case 403:
|
|
72
|
+
throw new Credal.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
73
|
+
case 500:
|
|
74
|
+
throw new Credal.InternalServerError(_response.error.body, _response.rawResponse);
|
|
75
|
+
default:
|
|
76
|
+
throw new errors.CredalError({
|
|
77
|
+
statusCode: _response.error.statusCode,
|
|
78
|
+
body: _response.error.body,
|
|
79
|
+
rawResponse: _response.rawResponse,
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/agents/sendMessage");
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* @param {Credal.FetchResponseAgentsRequest} request
|
|
88
|
+
* @param {AgentsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
89
|
+
*
|
|
90
|
+
* @throws {@link Credal.BadRequestError}
|
|
91
|
+
* @throws {@link Credal.UnauthorizedError}
|
|
92
|
+
* @throws {@link Credal.ForbiddenError}
|
|
93
|
+
* @throws {@link Credal.NotFoundError}
|
|
94
|
+
* @throws {@link Credal.InternalServerError}
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* await client.agents.fetchResponse({
|
|
98
|
+
* jobId: "jobId"
|
|
99
|
+
* })
|
|
100
|
+
*/
|
|
101
|
+
fetchResponse(request, requestOptions) {
|
|
102
|
+
return core.HttpResponsePromise.fromPromise(this.__fetchResponse(request, requestOptions));
|
|
103
|
+
}
|
|
104
|
+
__fetchResponse(request, requestOptions) {
|
|
105
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
106
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
107
|
+
const { jobId } = request;
|
|
108
|
+
const _queryParams = {
|
|
109
|
+
jobId,
|
|
110
|
+
};
|
|
111
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
112
|
+
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);
|
|
113
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
114
|
+
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.Default, "agents/fetchAgentResponse"),
|
|
115
|
+
method: "GET",
|
|
116
|
+
headers: _headers,
|
|
117
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
118
|
+
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,
|
|
119
|
+
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,
|
|
120
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
121
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
122
|
+
logging: this._options.logging,
|
|
123
|
+
});
|
|
124
|
+
if (_response.ok) {
|
|
125
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
126
|
+
}
|
|
127
|
+
if (_response.error.reason === "status-code") {
|
|
128
|
+
switch (_response.error.statusCode) {
|
|
129
|
+
case 400:
|
|
130
|
+
throw new Credal.BadRequestError(_response.error.body, _response.rawResponse);
|
|
131
|
+
case 401:
|
|
132
|
+
throw new Credal.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
133
|
+
case 403:
|
|
134
|
+
throw new Credal.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
135
|
+
case 404:
|
|
136
|
+
throw new Credal.NotFoundError(_response.error.body, _response.rawResponse);
|
|
137
|
+
case 500:
|
|
138
|
+
throw new Credal.InternalServerError(_response.error.body, _response.rawResponse);
|
|
139
|
+
default:
|
|
140
|
+
throw new errors.CredalError({
|
|
141
|
+
statusCode: _response.error.statusCode,
|
|
142
|
+
body: _response.error.body,
|
|
143
|
+
rawResponse: _response.rawResponse,
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/agents/fetchAgentResponse");
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type * as Credal from "../../../../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* agentId: "cc3fd192-ea62-11f0-99fd-03d6b2458fff",
|
|
6
|
+
* conversation: {
|
|
7
|
+
* type: "new"
|
|
8
|
+
* },
|
|
9
|
+
* message: "What documents do we have about Q4 planning?"
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
12
|
+
export interface SendMessageAgentsRequest {
|
|
13
|
+
agentId: string;
|
|
14
|
+
conversation: Credal.SendMessageAgentsRequestConversation;
|
|
15
|
+
message: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type * as Credal from "../../../index.mjs";
|
|
2
|
+
export type FetchResponseAgentsResponse = Credal.FetchResponseAgentsResponse.Running | Credal.FetchResponseAgentsResponse.Completed | Credal.FetchResponseAgentsResponse.Failed;
|
|
3
|
+
export declare namespace FetchResponseAgentsResponse {
|
|
4
|
+
interface Running {
|
|
5
|
+
status: "RUNNING";
|
|
6
|
+
}
|
|
7
|
+
interface Completed {
|
|
8
|
+
status: "COMPLETED";
|
|
9
|
+
result: FetchResponseAgentsResponseCompleted.Result;
|
|
10
|
+
}
|
|
11
|
+
namespace FetchResponseAgentsResponseCompleted {
|
|
12
|
+
interface Result {
|
|
13
|
+
agentResponseText: string;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
interface Failed {
|
|
17
|
+
status: "FAILED";
|
|
18
|
+
errorMessage: string;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type * as Credal from "../../../index.mjs";
|
|
2
|
+
export type SendMessageAgentsRequestConversation = Credal.SendMessageAgentsRequestConversation.New | Credal.SendMessageAgentsRequestConversation.Existing;
|
|
3
|
+
export declare namespace SendMessageAgentsRequestConversation {
|
|
4
|
+
interface New {
|
|
5
|
+
type: "new";
|
|
6
|
+
dataInputVariableSelections?: (Record<string, string[] | null> | null) | undefined;
|
|
7
|
+
}
|
|
8
|
+
interface Existing {
|
|
9
|
+
type: "existing";
|
|
10
|
+
conversationId: string;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
export *
|
|
2
|
-
export * from "./
|
|
3
|
-
export * from "./
|
|
4
|
-
export * as copilots from "./copilots/index.mjs";
|
|
5
|
-
export * from "./copilots/types/index.mjs";
|
|
6
|
-
export * from "./documentCatalog/client/requests/index.mjs";
|
|
7
|
-
export * as documentCatalog from "./documentCatalog/index.mjs";
|
|
8
|
-
export * from "./documentCatalog/types/index.mjs";
|
|
9
|
-
export * from "./documentCollections/client/requests/index.mjs";
|
|
10
|
-
export * as documentCollections from "./documentCollections/index.mjs";
|
|
11
|
-
export * from "./documentCollections/types/index.mjs";
|
|
12
|
-
export * from "./search/client/requests/index.mjs";
|
|
13
|
-
export * as search from "./search/index.mjs";
|
|
14
|
-
export * from "./search/types/index.mjs";
|
|
15
|
-
export * as users from "./users/index.mjs";
|
|
16
|
-
export * from "./users/types/index.mjs";
|
|
1
|
+
export * from "./agents/client/requests/index.mjs";
|
|
2
|
+
export * as agents from "./agents/index.mjs";
|
|
3
|
+
export * from "./agents/types/index.mjs";
|
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
export *
|
|
2
|
-
export * from "./
|
|
3
|
-
export * from "./
|
|
4
|
-
export * as copilots from "./copilots/index.mjs";
|
|
5
|
-
export * from "./copilots/types/index.mjs";
|
|
6
|
-
export * from "./documentCatalog/client/requests/index.mjs";
|
|
7
|
-
export * as documentCatalog from "./documentCatalog/index.mjs";
|
|
8
|
-
export * from "./documentCatalog/types/index.mjs";
|
|
9
|
-
export * from "./documentCollections/client/requests/index.mjs";
|
|
10
|
-
export * as documentCollections from "./documentCollections/index.mjs";
|
|
11
|
-
export * from "./documentCollections/types/index.mjs";
|
|
12
|
-
export * from "./search/client/requests/index.mjs";
|
|
13
|
-
export * as search from "./search/index.mjs";
|
|
14
|
-
export * from "./search/types/index.mjs";
|
|
15
|
-
export * as users from "./users/index.mjs";
|
|
16
|
-
export * from "./users/types/index.mjs";
|
|
1
|
+
export * from "./agents/client/requests/index.mjs";
|
|
2
|
+
export * as agents from "./agents/index.mjs";
|
|
3
|
+
export * from "./agents/types/index.mjs";
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import * as core from "../core/index.mjs";
|
|
2
|
-
|
|
3
|
-
interface AuthOptions {
|
|
4
|
-
apiKey?: core.Supplier<core.BearerToken> | undefined;
|
|
5
|
-
}
|
|
6
|
-
interface Options extends AuthOptions {
|
|
7
|
-
}
|
|
8
|
-
}
|
|
2
|
+
declare const TOKEN_PARAM: "token";
|
|
9
3
|
export declare class BearerAuthProvider implements core.AuthProvider {
|
|
10
|
-
private readonly
|
|
4
|
+
private readonly options;
|
|
11
5
|
constructor(options: BearerAuthProvider.Options);
|
|
12
|
-
static canCreate(options: BearerAuthProvider.Options): boolean;
|
|
13
|
-
getAuthRequest(
|
|
6
|
+
static canCreate(options: Partial<BearerAuthProvider.Options>): boolean;
|
|
7
|
+
getAuthRequest({ endpointMetadata, }?: {
|
|
14
8
|
endpointMetadata?: core.EndpointMetadata;
|
|
15
9
|
}): Promise<core.AuthRequest>;
|
|
16
10
|
}
|
|
11
|
+
export declare namespace BearerAuthProvider {
|
|
12
|
+
const AUTH_SCHEME: "BearerAuth";
|
|
13
|
+
const AUTH_CONFIG_ERROR_MESSAGE: string;
|
|
14
|
+
type Options = AuthOptions;
|
|
15
|
+
type AuthOptions = {
|
|
16
|
+
[TOKEN_PARAM]: core.Supplier<core.BearerToken>;
|
|
17
|
+
};
|
|
18
|
+
function createInstance(options: Options): core.AuthProvider;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -10,26 +10,33 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
import * as core from "../core/index.mjs";
|
|
12
12
|
import * as errors from "../errors/index.mjs";
|
|
13
|
+
const TOKEN_PARAM = "token";
|
|
13
14
|
export class BearerAuthProvider {
|
|
14
15
|
constructor(options) {
|
|
15
|
-
this.
|
|
16
|
+
this.options = options;
|
|
16
17
|
}
|
|
17
18
|
static canCreate(options) {
|
|
18
|
-
|
|
19
|
-
return options.apiKey != null || ((_a = process.env) === null || _a === void 0 ? void 0 : _a.CREDAL_API_KEY) != null;
|
|
19
|
+
return (options === null || options === void 0 ? void 0 : options[TOKEN_PARAM]) != null;
|
|
20
20
|
}
|
|
21
|
-
getAuthRequest(
|
|
22
|
-
return __awaiter(this,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
if (apiKey == null) {
|
|
21
|
+
getAuthRequest() {
|
|
22
|
+
return __awaiter(this, arguments, void 0, function* ({ endpointMetadata, } = {}) {
|
|
23
|
+
const token = yield core.Supplier.get(this.options[TOKEN_PARAM]);
|
|
24
|
+
if (token == null) {
|
|
26
25
|
throw new errors.CredalError({
|
|
27
|
-
message:
|
|
26
|
+
message: BearerAuthProvider.AUTH_CONFIG_ERROR_MESSAGE,
|
|
28
27
|
});
|
|
29
28
|
}
|
|
30
29
|
return {
|
|
31
|
-
headers: { Authorization: `Bearer ${
|
|
30
|
+
headers: { Authorization: `Bearer ${token}` },
|
|
32
31
|
};
|
|
33
32
|
});
|
|
34
33
|
}
|
|
35
34
|
}
|
|
35
|
+
(function (BearerAuthProvider) {
|
|
36
|
+
BearerAuthProvider.AUTH_SCHEME = "BearerAuth";
|
|
37
|
+
BearerAuthProvider.AUTH_CONFIG_ERROR_MESSAGE = `Please provide '${TOKEN_PARAM}' when initializing the client`;
|
|
38
|
+
function createInstance(options) {
|
|
39
|
+
return new BearerAuthProvider(options);
|
|
40
|
+
}
|
|
41
|
+
BearerAuthProvider.createInstance = createInstance;
|
|
42
|
+
})(BearerAuthProvider || (BearerAuthProvider = {}));
|