@credal/sdk 0.1.17 → 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 +3 -3
- package/dist/cjs/auth/BearerAuthProvider.js +7 -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/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/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 +3 -3
- package/dist/esm/auth/BearerAuthProvider.mjs +7 -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/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/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 -439
- 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 -402
- 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,18 +0,0 @@
|
|
|
1
|
-
import type * as Credal from "../../../index.js";
|
|
2
|
-
export type SendMessageResponse =
|
|
3
|
-
/**
|
|
4
|
-
* Returned when there is a reply
|
|
5
|
-
* fetched from the agent. */
|
|
6
|
-
Credal.SendMessageResponse.AiResponseResult
|
|
7
|
-
/**
|
|
8
|
-
* Returned when Credal detects possible
|
|
9
|
-
* infosec violations and blocks the message. */
|
|
10
|
-
| Credal.SendMessageResponse.BlockedResult;
|
|
11
|
-
export declare namespace SendMessageResponse {
|
|
12
|
-
interface AiResponseResult extends Credal.MessageReply {
|
|
13
|
-
type: "ai_response_result";
|
|
14
|
-
}
|
|
15
|
-
interface BlockedResult extends Credal.MessageBlocked {
|
|
16
|
-
type: "blocked_result";
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type * as Credal from "../../../index.js";
|
|
2
|
-
export type StreamingChunk = Credal.StreamingChunk.Initial | Credal.StreamingChunk.DataChunk | Credal.StreamingChunk.EndOfMessage | Credal.StreamingChunk.FinalChunk | Credal.StreamingChunk.Blocked | Credal.StreamingChunk.ErrorChunk;
|
|
3
|
-
export declare namespace StreamingChunk {
|
|
4
|
-
interface Initial extends Credal.InitialChunk {
|
|
5
|
-
event: "initial";
|
|
6
|
-
}
|
|
7
|
-
interface DataChunk extends Credal.DataChunk {
|
|
8
|
-
event: "data_chunk";
|
|
9
|
-
}
|
|
10
|
-
interface EndOfMessage extends Credal.EndOfMessageChunk {
|
|
11
|
-
event: "end_of_message";
|
|
12
|
-
}
|
|
13
|
-
interface FinalChunk extends Credal.FinalChunk {
|
|
14
|
-
event: "final_chunk";
|
|
15
|
-
}
|
|
16
|
-
interface Blocked extends Credal.BlockedChunk {
|
|
17
|
-
event: "blocked";
|
|
18
|
-
}
|
|
19
|
-
interface ErrorChunk extends Credal.ErrorChunk {
|
|
20
|
-
event: "error_chunk";
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export * from "./AiEndpointConfiguration.js";
|
|
2
|
-
export * from "./BlockedChunk.js";
|
|
3
|
-
export * from "./BooleanFieldSchema.js";
|
|
4
|
-
export * from "./CollectionFilteredData.js";
|
|
5
|
-
export * from "./Configuration.js";
|
|
6
|
-
export * from "./CreateConversationResponse.js";
|
|
7
|
-
export * from "./CreateCopilotResponse.js";
|
|
8
|
-
export * from "./DataChunk.js";
|
|
9
|
-
export * from "./DataFilter.js";
|
|
10
|
-
export * from "./DatetimeFieldSchema.js";
|
|
11
|
-
export * from "./DeleteCopilotResponse.js";
|
|
12
|
-
export * from "./EndOfMessageChunk.js";
|
|
13
|
-
export * from "./ErrorChunk.js";
|
|
14
|
-
export * from "./ErrorChunkData.js";
|
|
15
|
-
export * from "./ExportCopilotsResponse.js";
|
|
16
|
-
export * from "./ExportedCopilot.js";
|
|
17
|
-
export * from "./FeedbackEnum.js";
|
|
18
|
-
export * from "./Filter.js";
|
|
19
|
-
export * from "./FinalChunk.js";
|
|
20
|
-
export * from "./InitialChunk.js";
|
|
21
|
-
export * from "./InputVariable.js";
|
|
22
|
-
export * from "./InsertedAuditLog.js";
|
|
23
|
-
export * from "./MessageBlocked.js";
|
|
24
|
-
export * from "./MessageFeedback.js";
|
|
25
|
-
export * from "./MessageReply.js";
|
|
26
|
-
export * from "./NumberFieldSchema.js";
|
|
27
|
-
export * from "./ReferencedSource.js";
|
|
28
|
-
export * from "./ResponseChunk.js";
|
|
29
|
-
export * from "./SendAgentMessageResponse.js";
|
|
30
|
-
export * from "./SendMessageResponse.js";
|
|
31
|
-
export * from "./StreamingChunk.js";
|
|
32
|
-
export * from "./StringFieldSchema.js";
|
|
33
|
-
export * from "./WebSearchResult.js";
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./AiEndpointConfiguration.js"), exports);
|
|
18
|
-
__exportStar(require("./BlockedChunk.js"), exports);
|
|
19
|
-
__exportStar(require("./BooleanFieldSchema.js"), exports);
|
|
20
|
-
__exportStar(require("./CollectionFilteredData.js"), exports);
|
|
21
|
-
__exportStar(require("./Configuration.js"), exports);
|
|
22
|
-
__exportStar(require("./CreateConversationResponse.js"), exports);
|
|
23
|
-
__exportStar(require("./CreateCopilotResponse.js"), exports);
|
|
24
|
-
__exportStar(require("./DataChunk.js"), exports);
|
|
25
|
-
__exportStar(require("./DataFilter.js"), exports);
|
|
26
|
-
__exportStar(require("./DatetimeFieldSchema.js"), exports);
|
|
27
|
-
__exportStar(require("./DeleteCopilotResponse.js"), exports);
|
|
28
|
-
__exportStar(require("./EndOfMessageChunk.js"), exports);
|
|
29
|
-
__exportStar(require("./ErrorChunk.js"), exports);
|
|
30
|
-
__exportStar(require("./ErrorChunkData.js"), exports);
|
|
31
|
-
__exportStar(require("./ExportCopilotsResponse.js"), exports);
|
|
32
|
-
__exportStar(require("./ExportedCopilot.js"), exports);
|
|
33
|
-
__exportStar(require("./FeedbackEnum.js"), exports);
|
|
34
|
-
__exportStar(require("./Filter.js"), exports);
|
|
35
|
-
__exportStar(require("./FinalChunk.js"), exports);
|
|
36
|
-
__exportStar(require("./InitialChunk.js"), exports);
|
|
37
|
-
__exportStar(require("./InputVariable.js"), exports);
|
|
38
|
-
__exportStar(require("./InsertedAuditLog.js"), exports);
|
|
39
|
-
__exportStar(require("./MessageBlocked.js"), exports);
|
|
40
|
-
__exportStar(require("./MessageFeedback.js"), exports);
|
|
41
|
-
__exportStar(require("./MessageReply.js"), exports);
|
|
42
|
-
__exportStar(require("./NumberFieldSchema.js"), exports);
|
|
43
|
-
__exportStar(require("./ReferencedSource.js"), exports);
|
|
44
|
-
__exportStar(require("./ResponseChunk.js"), exports);
|
|
45
|
-
__exportStar(require("./SendAgentMessageResponse.js"), exports);
|
|
46
|
-
__exportStar(require("./SendMessageResponse.js"), exports);
|
|
47
|
-
__exportStar(require("./StreamingChunk.js"), exports);
|
|
48
|
-
__exportStar(require("./StringFieldSchema.js"), exports);
|
|
49
|
-
__exportStar(require("./WebSearchResult.js"), exports);
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
|
|
2
|
-
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
|
|
3
|
-
import * as core from "../../../../core/index.js";
|
|
4
|
-
import type * as Credal from "../../../index.js";
|
|
5
|
-
export declare namespace DocumentCatalogClient {
|
|
6
|
-
type Options = BaseClientOptions;
|
|
7
|
-
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
export declare class DocumentCatalogClient {
|
|
11
|
-
protected readonly _options: NormalizedClientOptionsWithAuth<DocumentCatalogClient.Options>;
|
|
12
|
-
constructor(options?: DocumentCatalogClient.Options);
|
|
13
|
-
/**
|
|
14
|
-
* @param {Credal.UploadDocumentContentsRequest} request
|
|
15
|
-
* @param {DocumentCatalogClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* await client.documentCatalog.uploadDocumentContents({
|
|
19
|
-
* documentName: "My Document",
|
|
20
|
-
* documentContents: "Lorem ipsum...",
|
|
21
|
-
* documentExternalId: "73eead26-d124-4940-b329-5f068a0a8db9",
|
|
22
|
-
* allowedUsersEmailAddresses: ["jack@credal.ai", "ravin@credal.ai"],
|
|
23
|
-
* uploadAsUserEmail: "jack@credal.ai"
|
|
24
|
-
* })
|
|
25
|
-
*/
|
|
26
|
-
uploadDocumentContents(request: Credal.UploadDocumentContentsRequest, requestOptions?: DocumentCatalogClient.RequestOptions): core.HttpResponsePromise<Credal.UploadDocumentResponse>;
|
|
27
|
-
private __uploadDocumentContents;
|
|
28
|
-
/**
|
|
29
|
-
* Upload a file (PDF, Word, Excel, CSV, PowerPoint) to Credal. Unlike uploadDocumentContents which requires pre-parsed text, this endpoint accepts actual file uploads and automatically parses them using Credal's parsing service.
|
|
30
|
-
*
|
|
31
|
-
* @param {Credal.UploadFileRequest} request
|
|
32
|
-
* @param {DocumentCatalogClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
33
|
-
*/
|
|
34
|
-
uploadFile(request: Credal.UploadFileRequest, requestOptions?: DocumentCatalogClient.RequestOptions): core.HttpResponsePromise<Credal.UploadDocumentResponse>;
|
|
35
|
-
private __uploadFile;
|
|
36
|
-
/**
|
|
37
|
-
* Sync a document from a source URL. Does not support recursive web search. Reach out to a Credal representative for access.
|
|
38
|
-
*
|
|
39
|
-
* @param {Credal.SyncSourceByUrlRequest} request
|
|
40
|
-
* @param {DocumentCatalogClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
41
|
-
*
|
|
42
|
-
* @example
|
|
43
|
-
* await client.documentCatalog.syncSourceByUrl({
|
|
44
|
-
* sourceUrl: "https://drive.google.com/file/d/123456/view",
|
|
45
|
-
* uploadAsUserEmail: "ria@credal.ai"
|
|
46
|
-
* })
|
|
47
|
-
*/
|
|
48
|
-
syncSourceByUrl(request: Credal.SyncSourceByUrlRequest, requestOptions?: DocumentCatalogClient.RequestOptions): core.HttpResponsePromise<Credal.SyncSourceByUrlResponse>;
|
|
49
|
-
private __syncSourceByUrl;
|
|
50
|
-
/**
|
|
51
|
-
* Bulk patch metadata for documents, synced natively by Credal or manual API uploads
|
|
52
|
-
*
|
|
53
|
-
* @param {Credal.DocumentMetadataPatchRequest} request
|
|
54
|
-
* @param {DocumentCatalogClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
55
|
-
*
|
|
56
|
-
* @example
|
|
57
|
-
* await client.documentCatalog.metadata({
|
|
58
|
-
* sources: [{
|
|
59
|
-
* metadata: {
|
|
60
|
-
* "Department": "HR",
|
|
61
|
-
* "Country": "United States"
|
|
62
|
-
* },
|
|
63
|
-
* resourceIdentifier: {
|
|
64
|
-
* type: "external-resource-id",
|
|
65
|
-
* externalResourceId: "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
|
|
66
|
-
* resourceType: "GOOGLE_DRIVE_ITEM"
|
|
67
|
-
* }
|
|
68
|
-
* }, {
|
|
69
|
-
* metadata: {
|
|
70
|
-
* "Department": "Sales",
|
|
71
|
-
* "Vertical": "Healthcare"
|
|
72
|
-
* },
|
|
73
|
-
* resourceIdentifier: {
|
|
74
|
-
* type: "external-resource-id",
|
|
75
|
-
* externalResourceId: "123456",
|
|
76
|
-
* resourceType: "ZENDESK_TICKET"
|
|
77
|
-
* }
|
|
78
|
-
* }],
|
|
79
|
-
* uploadAsUserEmail: "ben@credal.ai"
|
|
80
|
-
* })
|
|
81
|
-
*/
|
|
82
|
-
metadata(request: Credal.DocumentMetadataPatchRequest, requestOptions?: DocumentCatalogClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
83
|
-
private __metadata;
|
|
84
|
-
}
|
|
@@ -1,293 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
-
if (k2 === undefined) k2 = k;
|
|
5
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(o, k2, desc);
|
|
10
|
-
}) : (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === undefined) k2 = k;
|
|
12
|
-
o[k2] = m[k];
|
|
13
|
-
}));
|
|
14
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
-
}) : function(o, v) {
|
|
17
|
-
o["default"] = v;
|
|
18
|
-
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
-
var ownKeys = function(o) {
|
|
21
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
-
var ar = [];
|
|
23
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
-
return ar;
|
|
25
|
-
};
|
|
26
|
-
return ownKeys(o);
|
|
27
|
-
};
|
|
28
|
-
return function (mod) {
|
|
29
|
-
if (mod && mod.__esModule) return mod;
|
|
30
|
-
var result = {};
|
|
31
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
-
__setModuleDefault(result, mod);
|
|
33
|
-
return result;
|
|
34
|
-
};
|
|
35
|
-
})();
|
|
36
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
40
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
41
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
-
});
|
|
44
|
-
};
|
|
45
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
-
exports.DocumentCatalogClient = void 0;
|
|
47
|
-
const BaseClient_js_1 = require("../../../../BaseClient.js");
|
|
48
|
-
const headers_js_1 = require("../../../../core/headers.js");
|
|
49
|
-
const core = __importStar(require("../../../../core/index.js"));
|
|
50
|
-
const environments = __importStar(require("../../../../environments.js"));
|
|
51
|
-
const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
|
|
52
|
-
const errors = __importStar(require("../../../../errors/index.js"));
|
|
53
|
-
class DocumentCatalogClient {
|
|
54
|
-
constructor(options = {}) {
|
|
55
|
-
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* @param {Credal.UploadDocumentContentsRequest} request
|
|
59
|
-
* @param {DocumentCatalogClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
60
|
-
*
|
|
61
|
-
* @example
|
|
62
|
-
* await client.documentCatalog.uploadDocumentContents({
|
|
63
|
-
* documentName: "My Document",
|
|
64
|
-
* documentContents: "Lorem ipsum...",
|
|
65
|
-
* documentExternalId: "73eead26-d124-4940-b329-5f068a0a8db9",
|
|
66
|
-
* allowedUsersEmailAddresses: ["jack@credal.ai", "ravin@credal.ai"],
|
|
67
|
-
* uploadAsUserEmail: "jack@credal.ai"
|
|
68
|
-
* })
|
|
69
|
-
*/
|
|
70
|
-
uploadDocumentContents(request, requestOptions) {
|
|
71
|
-
return core.HttpResponsePromise.fromPromise(this.__uploadDocumentContents(request, requestOptions));
|
|
72
|
-
}
|
|
73
|
-
__uploadDocumentContents(request, requestOptions) {
|
|
74
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
76
|
-
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
77
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
78
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
79
|
-
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/catalog/uploadDocumentContents"),
|
|
80
|
-
method: "POST",
|
|
81
|
-
headers: _headers,
|
|
82
|
-
contentType: "application/json",
|
|
83
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
84
|
-
requestType: "json",
|
|
85
|
-
body: request,
|
|
86
|
-
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,
|
|
87
|
-
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,
|
|
88
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
89
|
-
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
90
|
-
logging: this._options.logging,
|
|
91
|
-
});
|
|
92
|
-
if (_response.ok) {
|
|
93
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
94
|
-
}
|
|
95
|
-
if (_response.error.reason === "status-code") {
|
|
96
|
-
throw new errors.CredalError({
|
|
97
|
-
statusCode: _response.error.statusCode,
|
|
98
|
-
body: _response.error.body,
|
|
99
|
-
rawResponse: _response.rawResponse,
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v0/catalog/uploadDocumentContents");
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Upload a file (PDF, Word, Excel, CSV, PowerPoint) to Credal. Unlike uploadDocumentContents which requires pre-parsed text, this endpoint accepts actual file uploads and automatically parses them using Credal's parsing service.
|
|
107
|
-
*
|
|
108
|
-
* @param {Credal.UploadFileRequest} request
|
|
109
|
-
* @param {DocumentCatalogClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
110
|
-
*/
|
|
111
|
-
uploadFile(request, requestOptions) {
|
|
112
|
-
return core.HttpResponsePromise.fromPromise(this.__uploadFile(request, requestOptions));
|
|
113
|
-
}
|
|
114
|
-
__uploadFile(request, requestOptions) {
|
|
115
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
116
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
117
|
-
const _body = yield core.newFormData();
|
|
118
|
-
yield _body.appendFile("file", request.file);
|
|
119
|
-
if (request.documentName != null) {
|
|
120
|
-
_body.append("documentName", request.documentName);
|
|
121
|
-
}
|
|
122
|
-
_body.append("uploadAsUserEmail", request.uploadAsUserEmail);
|
|
123
|
-
_body.append("documentExternalId", request.documentExternalId);
|
|
124
|
-
if (request.allowedUsersEmailAddresses != null) {
|
|
125
|
-
_body.append("allowedUsersEmailAddresses", request.allowedUsersEmailAddresses);
|
|
126
|
-
}
|
|
127
|
-
if (request.documentExternalUrl != null) {
|
|
128
|
-
_body.append("documentExternalUrl", request.documentExternalUrl);
|
|
129
|
-
}
|
|
130
|
-
if (request.customMetadata != null) {
|
|
131
|
-
_body.append("customMetadata", request.customMetadata);
|
|
132
|
-
}
|
|
133
|
-
if (request.collectionId != null) {
|
|
134
|
-
_body.append("collectionId", request.collectionId);
|
|
135
|
-
}
|
|
136
|
-
if (request.forceUpdate != null) {
|
|
137
|
-
_body.append("forceUpdate", request.forceUpdate);
|
|
138
|
-
}
|
|
139
|
-
if (request.internalPublic != null) {
|
|
140
|
-
_body.append("internalPublic", request.internalPublic);
|
|
141
|
-
}
|
|
142
|
-
if (request.sourceSystemUpdated != null) {
|
|
143
|
-
_body.append("sourceSystemUpdated", request.sourceSystemUpdated);
|
|
144
|
-
}
|
|
145
|
-
if (request.awaitVectorStoreSync != null) {
|
|
146
|
-
_body.append("awaitVectorStoreSync", request.awaitVectorStoreSync);
|
|
147
|
-
}
|
|
148
|
-
const _maybeEncodedRequest = yield _body.getRequest();
|
|
149
|
-
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
150
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, _maybeEncodedRequest.headers)), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
151
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
152
|
-
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/catalog/uploadFile"),
|
|
153
|
-
method: "POST",
|
|
154
|
-
headers: _headers,
|
|
155
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
156
|
-
requestType: "file",
|
|
157
|
-
duplex: _maybeEncodedRequest.duplex,
|
|
158
|
-
body: _maybeEncodedRequest.body,
|
|
159
|
-
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,
|
|
160
|
-
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,
|
|
161
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
162
|
-
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
163
|
-
logging: this._options.logging,
|
|
164
|
-
});
|
|
165
|
-
if (_response.ok) {
|
|
166
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
167
|
-
}
|
|
168
|
-
if (_response.error.reason === "status-code") {
|
|
169
|
-
throw new errors.CredalError({
|
|
170
|
-
statusCode: _response.error.statusCode,
|
|
171
|
-
body: _response.error.body,
|
|
172
|
-
rawResponse: _response.rawResponse,
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v0/catalog/uploadFile");
|
|
176
|
-
});
|
|
177
|
-
}
|
|
178
|
-
/**
|
|
179
|
-
* Sync a document from a source URL. Does not support recursive web search. Reach out to a Credal representative for access.
|
|
180
|
-
*
|
|
181
|
-
* @param {Credal.SyncSourceByUrlRequest} request
|
|
182
|
-
* @param {DocumentCatalogClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
183
|
-
*
|
|
184
|
-
* @example
|
|
185
|
-
* await client.documentCatalog.syncSourceByUrl({
|
|
186
|
-
* sourceUrl: "https://drive.google.com/file/d/123456/view",
|
|
187
|
-
* uploadAsUserEmail: "ria@credal.ai"
|
|
188
|
-
* })
|
|
189
|
-
*/
|
|
190
|
-
syncSourceByUrl(request, requestOptions) {
|
|
191
|
-
return core.HttpResponsePromise.fromPromise(this.__syncSourceByUrl(request, requestOptions));
|
|
192
|
-
}
|
|
193
|
-
__syncSourceByUrl(request, requestOptions) {
|
|
194
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
195
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
196
|
-
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
197
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
198
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
199
|
-
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/catalog/syncSourceByUrl"),
|
|
200
|
-
method: "POST",
|
|
201
|
-
headers: _headers,
|
|
202
|
-
contentType: "application/json",
|
|
203
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
204
|
-
requestType: "json",
|
|
205
|
-
body: request,
|
|
206
|
-
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,
|
|
207
|
-
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,
|
|
208
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
209
|
-
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
210
|
-
logging: this._options.logging,
|
|
211
|
-
});
|
|
212
|
-
if (_response.ok) {
|
|
213
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
214
|
-
}
|
|
215
|
-
if (_response.error.reason === "status-code") {
|
|
216
|
-
throw new errors.CredalError({
|
|
217
|
-
statusCode: _response.error.statusCode,
|
|
218
|
-
body: _response.error.body,
|
|
219
|
-
rawResponse: _response.rawResponse,
|
|
220
|
-
});
|
|
221
|
-
}
|
|
222
|
-
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v0/catalog/syncSourceByUrl");
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
/**
|
|
226
|
-
* Bulk patch metadata for documents, synced natively by Credal or manual API uploads
|
|
227
|
-
*
|
|
228
|
-
* @param {Credal.DocumentMetadataPatchRequest} request
|
|
229
|
-
* @param {DocumentCatalogClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
230
|
-
*
|
|
231
|
-
* @example
|
|
232
|
-
* await client.documentCatalog.metadata({
|
|
233
|
-
* sources: [{
|
|
234
|
-
* metadata: {
|
|
235
|
-
* "Department": "HR",
|
|
236
|
-
* "Country": "United States"
|
|
237
|
-
* },
|
|
238
|
-
* resourceIdentifier: {
|
|
239
|
-
* type: "external-resource-id",
|
|
240
|
-
* externalResourceId: "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
|
|
241
|
-
* resourceType: "GOOGLE_DRIVE_ITEM"
|
|
242
|
-
* }
|
|
243
|
-
* }, {
|
|
244
|
-
* metadata: {
|
|
245
|
-
* "Department": "Sales",
|
|
246
|
-
* "Vertical": "Healthcare"
|
|
247
|
-
* },
|
|
248
|
-
* resourceIdentifier: {
|
|
249
|
-
* type: "external-resource-id",
|
|
250
|
-
* externalResourceId: "123456",
|
|
251
|
-
* resourceType: "ZENDESK_TICKET"
|
|
252
|
-
* }
|
|
253
|
-
* }],
|
|
254
|
-
* uploadAsUserEmail: "ben@credal.ai"
|
|
255
|
-
* })
|
|
256
|
-
*/
|
|
257
|
-
metadata(request, requestOptions) {
|
|
258
|
-
return core.HttpResponsePromise.fromPromise(this.__metadata(request, requestOptions));
|
|
259
|
-
}
|
|
260
|
-
__metadata(request, requestOptions) {
|
|
261
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
262
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
263
|
-
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
264
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
265
|
-
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
266
|
-
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/catalog/metadata"),
|
|
267
|
-
method: "PATCH",
|
|
268
|
-
headers: _headers,
|
|
269
|
-
contentType: "application/json",
|
|
270
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
271
|
-
requestType: "json",
|
|
272
|
-
body: request,
|
|
273
|
-
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,
|
|
274
|
-
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,
|
|
275
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
276
|
-
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
277
|
-
logging: this._options.logging,
|
|
278
|
-
});
|
|
279
|
-
if (_response.ok) {
|
|
280
|
-
return { data: undefined, rawResponse: _response.rawResponse };
|
|
281
|
-
}
|
|
282
|
-
if (_response.error.reason === "status-code") {
|
|
283
|
-
throw new errors.CredalError({
|
|
284
|
-
statusCode: _response.error.statusCode,
|
|
285
|
-
body: _response.error.body,
|
|
286
|
-
rawResponse: _response.rawResponse,
|
|
287
|
-
});
|
|
288
|
-
}
|
|
289
|
-
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/v0/catalog/metadata");
|
|
290
|
-
});
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
exports.DocumentCatalogClient = DocumentCatalogClient;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./requests/index.js";
|
package/dist/cjs/api/resources/documentCatalog/client/requests/UploadDocumentContentsRequest.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type * as Credal from "../../../../index.js";
|
|
2
|
-
/**
|
|
3
|
-
* @example
|
|
4
|
-
* {
|
|
5
|
-
* documentName: "My Document",
|
|
6
|
-
* documentContents: "Lorem ipsum...",
|
|
7
|
-
* documentExternalId: "73eead26-d124-4940-b329-5f068a0a8db9",
|
|
8
|
-
* allowedUsersEmailAddresses: ["jack@credal.ai", "ravin@credal.ai"],
|
|
9
|
-
* uploadAsUserEmail: "jack@credal.ai"
|
|
10
|
-
* }
|
|
11
|
-
*/
|
|
12
|
-
export interface UploadDocumentContentsRequest {
|
|
13
|
-
/** The name of the document you want to upload. */
|
|
14
|
-
documentName: string;
|
|
15
|
-
/** The full LLM-formatted text contents of the document you want to upload. */
|
|
16
|
-
documentContents: string;
|
|
17
|
-
/** Users allowed to access the document. Unlike Credal's out of the box connectors which reconcile various permissions models from 3rd party software, for custom uploads the caller is responsible for specifying who can access the document and currently flattening groups if applicable. Documents can also be marked as internal public. */
|
|
18
|
-
allowedUsersEmailAddresses: string[];
|
|
19
|
-
/** [Legacy] The user on behalf of whom the document should be uploaded. In most cases, this can simply be the email of the developer making the API call. This field will be removed in the future in favor of purely specifying permissions via allowedUsersEmailAddresses. */
|
|
20
|
-
uploadAsUserEmail: string;
|
|
21
|
-
/** The external ID of the document. This is typically the ID as it exists in its original external system. Uploads to the same external ID will update the document in Credal. */
|
|
22
|
-
documentExternalId: string;
|
|
23
|
-
/** The external URL of the document you want to upload. If provided Credal will link to this URL. */
|
|
24
|
-
documentExternalUrl?: string;
|
|
25
|
-
/** Optional JSON representing any custom metadata for this document */
|
|
26
|
-
customMetadata?: Record<string, Credal.CustomMetadataValue>;
|
|
27
|
-
/** If specified, the document will also be added to the provided document collection. This operation is eventually consistent, meaning the document does not immediately start appearing in searches of that collection due to an asynchronous embedding process. To achieve strong consistency use the `awaitVectorStoreSync` parameter. */
|
|
28
|
-
collectionId?: string;
|
|
29
|
-
/** If specified, document contents will be re-uploaded and re-embedded even if the document already exists in Credal */
|
|
30
|
-
forceUpdate?: boolean;
|
|
31
|
-
/** If specified, document will be accessible to everyone within the organization of the uploader */
|
|
32
|
-
internalPublic?: boolean;
|
|
33
|
-
/** Document uploads are eventually consistent by default. If specified `true` the API will wait for the vector store to be updated before returning. This is useful if you want to ensure that the document is immediately searchable after this call returns. */
|
|
34
|
-
awaitVectorStoreSync?: boolean;
|
|
35
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type * as core from "../../../../../core/index.js";
|
|
2
|
-
export interface UploadFileRequest {
|
|
3
|
-
/** The file to upload. Supported formats: PDF (.pdf), Word (.docx), Excel (.xlsx, .xls), PowerPoint (.pptx, .ppt), CSV (.csv), and text files. */
|
|
4
|
-
file: core.file.Uploadable;
|
|
5
|
-
/** The name of the document you want to upload. If not provided, the original filename will be used. */
|
|
6
|
-
documentName?: string;
|
|
7
|
-
/** [Legacy] The user on behalf of whom the document should be uploaded. In most cases, this can simply be the email of the developer making the API call. This field will be removed in the future in favor of purely specifying permissions via allowedUsersEmailAddresses. */
|
|
8
|
-
uploadAsUserEmail: string;
|
|
9
|
-
/** The external ID of the document. This is typically the ID as it exists in its original external system. Uploads to the same external ID will update the document in Credal. */
|
|
10
|
-
documentExternalId: string;
|
|
11
|
-
/** Users allowed to access the document. Can be provided as a JSON array string (e.g., ["user1@example.com","user2@example.com"]) or comma-separated list (e.g., "user1@example.com,user2@example.com"). Unlike Credal's out of the box connectors which reconcile various permissions models from 3rd party software, for custom uploads the caller is responsible for specifying who can access the document and currently flattening groups if applicable. Documents can also be marked as internal public. */
|
|
12
|
-
allowedUsersEmailAddresses?: string;
|
|
13
|
-
/** The external URL of the document you want to upload. If provided Credal will link to this URL. */
|
|
14
|
-
documentExternalUrl?: string;
|
|
15
|
-
/** Optional JSON string representing any custom metadata for this document (e.g., '{"key1":"value1","key2":"value2"}'). */
|
|
16
|
-
customMetadata?: string;
|
|
17
|
-
/** If specified, the document will also be added to the provided document collection. This operation is eventually consistent, meaning the document does not immediately start appearing in searches of that collection due to an asynchronous embedding process. To achieve strong consistency use the `awaitVectorStoreSync` parameter. */
|
|
18
|
-
collectionId?: string;
|
|
19
|
-
/** If set to "true", document contents will be re-uploaded and re-embedded even if the document already exists in Credal. */
|
|
20
|
-
forceUpdate?: string;
|
|
21
|
-
/** If set to "true", document will be accessible to everyone within the organization of the uploader. */
|
|
22
|
-
internalPublic?: string;
|
|
23
|
-
/** ISO 8601 date string indicating when the document was last updated in the source system (e.g., "2025-11-03T21:15:00Z"). */
|
|
24
|
-
sourceSystemUpdated?: string;
|
|
25
|
-
/** Document uploads are eventually consistent by default. If set to "true" the API will wait for the vector store to be updated before returning. This is useful if you want to ensure that the document is immediately searchable after this call returns. */
|
|
26
|
-
awaitVectorStoreSync?: string;
|
|
27
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type * as Credal from "../../../index.js";
|
|
2
|
-
export interface DocumentMetadataPatch {
|
|
3
|
-
/** The identifier for the resource you want to patch */
|
|
4
|
-
resourceIdentifier: Credal.ResourceIdentifier;
|
|
5
|
-
/** Key-value object of metadata for document. Keys will be merged with any existing values but can also be set to `null` to effectively remove */
|
|
6
|
-
metadata: Record<string, unknown>;
|
|
7
|
-
}
|