@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
package/README.md
CHANGED
|
@@ -1,157 +1,308 @@
|
|
|
1
|
-
|
|
2
|
-
<img src="./credal-dark-logo.svg" width="400" />
|
|
3
|
-
</div>
|
|
1
|
+
# Credal TypeScript Library
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
[](/?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Fcredal-ai%2Fcredal-typescript-sdk)
|
|
3
|
+
[](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2FCredal-ai%2Fcredal-typescript-sdk-v1)
|
|
8
4
|
[](https://www.npmjs.com/package/@credal/sdk)
|
|
9
5
|
|
|
10
|
-
The Credal TypeScript library provides convenient access to the Credal
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
The Credal TypeScript library provides convenient access to the Credal APIs from TypeScript.
|
|
7
|
+
|
|
8
|
+
## Table of Contents
|
|
9
|
+
|
|
10
|
+
- [Installation](#installation)
|
|
11
|
+
- [Reference](#reference)
|
|
12
|
+
- [Usage](#usage)
|
|
13
|
+
- [Request and Response Types](#request-and-response-types)
|
|
14
|
+
- [Exception Handling](#exception-handling)
|
|
15
|
+
- [Advanced](#advanced)
|
|
16
|
+
- [Subpackage Exports](#subpackage-exports)
|
|
17
|
+
- [Additional Headers](#additional-headers)
|
|
18
|
+
- [Additional Query String Parameters](#additional-query-string-parameters)
|
|
19
|
+
- [Retries](#retries)
|
|
20
|
+
- [Timeouts](#timeouts)
|
|
21
|
+
- [Aborting Requests](#aborting-requests)
|
|
22
|
+
- [Access Raw Response Data](#access-raw-response-data)
|
|
23
|
+
- [Logging](#logging)
|
|
24
|
+
- [Custom Fetch](#custom-fetch)
|
|
25
|
+
- [Custom Fetcher](#custom-fetcher)
|
|
26
|
+
- [Runtime Compatibility](#runtime-compatibility)
|
|
27
|
+
- [Contributing](#contributing)
|
|
28
|
+
|
|
29
|
+
## Installation
|
|
13
30
|
|
|
14
|
-
|
|
31
|
+
```sh
|
|
32
|
+
npm i -s @credal/sdk
|
|
33
|
+
```
|
|
15
34
|
|
|
16
35
|
## Reference
|
|
17
36
|
|
|
18
|
-
A full reference
|
|
37
|
+
A full reference for this library is available [here](https://github.com/Credal-ai/credal-typescript-sdk-v1/blob/HEAD/./reference.md).
|
|
19
38
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
```sh
|
|
23
|
-
npm install @credal/sdk
|
|
24
|
-
```
|
|
39
|
+
## Usage
|
|
25
40
|
|
|
26
|
-
|
|
41
|
+
Instantiate and use the client with the following:
|
|
27
42
|
|
|
28
43
|
```typescript
|
|
29
44
|
import { CredalClient } from "@credal/sdk";
|
|
30
45
|
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
46
|
+
const client = new CredalClient({ token: "YOUR_TOKEN" });
|
|
47
|
+
await client.agents.sendMessage({
|
|
48
|
+
agentId: "cc3fd192-ea62-11f0-99fd-03d6b2458fff",
|
|
49
|
+
conversation: {
|
|
50
|
+
type: "new"
|
|
51
|
+
},
|
|
52
|
+
message: "What documents do we have about Q4 planning?"
|
|
38
53
|
});
|
|
39
54
|
```
|
|
40
55
|
|
|
41
|
-
Docs for the API endpoints available through the SDK can be found [here](https://docs.credal.ai/getting-started/overview).
|
|
42
|
-
|
|
43
|
-
## Self Hosted
|
|
44
|
-
|
|
45
|
-
If you're on a self-hosted Credal instance, then you can customize the base url of the SDK.
|
|
46
|
-
|
|
47
|
-
```typescript
|
|
48
|
-
const credal = new CredalClient({
|
|
49
|
-
apiKey: process.env.CREDAL_API_KEY,
|
|
50
|
-
environment: "https://<custom-domain>/api",
|
|
51
|
-
});
|
|
52
|
-
```
|
|
53
|
-
|
|
54
56
|
## Request and Response Types
|
|
55
57
|
|
|
56
|
-
The SDK exports all request and response types as TypeScript interfaces. Simply
|
|
57
|
-
|
|
58
|
+
The SDK exports all request and response types as TypeScript interfaces. Simply import them with the
|
|
59
|
+
following namespace:
|
|
58
60
|
|
|
59
|
-
```
|
|
60
|
-
import { Credal } from "@credal/sdk";
|
|
61
|
+
```typescript
|
|
62
|
+
import { Credal } from "@credal/sdk";
|
|
61
63
|
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
+
const request: Credal.SendMessageAgentsRequest = {
|
|
65
|
+
...
|
|
64
66
|
};
|
|
65
67
|
```
|
|
66
68
|
|
|
67
69
|
## Exception Handling
|
|
68
70
|
|
|
69
|
-
When the API returns a non-success status code (4xx or 5xx response),
|
|
70
|
-
|
|
71
|
+
When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error
|
|
72
|
+
will be thrown.
|
|
71
73
|
|
|
72
|
-
```
|
|
74
|
+
```typescript
|
|
73
75
|
import { CredalError } from "@credal/sdk";
|
|
74
76
|
|
|
75
77
|
try {
|
|
76
|
-
|
|
78
|
+
await client.agents.sendMessage(...);
|
|
77
79
|
} catch (err) {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
if (err instanceof CredalError) {
|
|
81
|
+
console.log(err.statusCode);
|
|
82
|
+
console.log(err.message);
|
|
83
|
+
console.log(err.body);
|
|
84
|
+
console.log(err.rawResponse);
|
|
85
|
+
}
|
|
83
86
|
}
|
|
84
87
|
```
|
|
85
88
|
|
|
86
|
-
##
|
|
89
|
+
## Advanced
|
|
90
|
+
|
|
91
|
+
### Subpackage Exports
|
|
92
|
+
|
|
93
|
+
This SDK supports direct imports of subpackage clients, which allows JavaScript bundlers to tree-shake and include only the imported subpackage code. This results in much smaller bundle sizes.
|
|
94
|
+
|
|
95
|
+
```typescript
|
|
96
|
+
import { AgentsClient } from '@credal/sdk/agents';
|
|
97
|
+
|
|
98
|
+
const client = new AgentsClient({...});
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Additional Headers
|
|
87
102
|
|
|
88
|
-
|
|
89
|
-
retried as long as the request is deemed retriable and the number of retry attempts has not grown larger
|
|
90
|
-
than the configured retry limit (default: 2).
|
|
103
|
+
If you would like to send additional headers as part of the request, use the `headers` request option.
|
|
91
104
|
|
|
92
|
-
|
|
105
|
+
```typescript
|
|
106
|
+
import { CredalClient } from "@credal/sdk";
|
|
107
|
+
|
|
108
|
+
const client = new CredalClient({
|
|
109
|
+
...
|
|
110
|
+
headers: {
|
|
111
|
+
'X-Custom-Header': 'custom value'
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
const response = await client.agents.sendMessage(..., {
|
|
116
|
+
headers: {
|
|
117
|
+
'X-Custom-Header': 'custom value'
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Additional Query String Parameters
|
|
123
|
+
|
|
124
|
+
If you would like to send additional query string parameters as part of the request, use the `queryParams` request option.
|
|
125
|
+
|
|
126
|
+
```typescript
|
|
127
|
+
const response = await client.agents.sendMessage(..., {
|
|
128
|
+
queryParams: {
|
|
129
|
+
'customQueryParamKey': 'custom query param value'
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Retries
|
|
135
|
+
|
|
136
|
+
The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long
|
|
137
|
+
as the request is deemed retryable and the number of retry attempts has not grown larger than the configured
|
|
138
|
+
retry limit (default: 2).
|
|
139
|
+
|
|
140
|
+
A request is deemed retryable when any of the following HTTP status codes is returned:
|
|
93
141
|
|
|
94
142
|
- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout)
|
|
95
143
|
- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests)
|
|
96
144
|
- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors)
|
|
97
|
-
|
|
98
|
-
Use the `maxRetries` request option to configure this behavior.
|
|
99
145
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
146
|
+
Use the `maxRetries` request option to configure this behavior.
|
|
147
|
+
|
|
148
|
+
```typescript
|
|
149
|
+
const response = await client.agents.sendMessage(..., {
|
|
150
|
+
maxRetries: 0 // override maxRetries at the request level
|
|
103
151
|
});
|
|
104
152
|
```
|
|
105
153
|
|
|
106
|
-
|
|
154
|
+
### Timeouts
|
|
107
155
|
|
|
108
|
-
The SDK defaults to a 60 second
|
|
109
|
-
configure this behavior.
|
|
156
|
+
The SDK defaults to a 60 second timeout. Use the `timeoutInSeconds` option to configure this behavior.
|
|
110
157
|
|
|
111
|
-
```
|
|
112
|
-
const response = await
|
|
113
|
-
|
|
158
|
+
```typescript
|
|
159
|
+
const response = await client.agents.sendMessage(..., {
|
|
160
|
+
timeoutInSeconds: 30 // override timeout to 30s
|
|
114
161
|
});
|
|
115
162
|
```
|
|
116
163
|
|
|
117
|
-
|
|
164
|
+
### Aborting Requests
|
|
118
165
|
|
|
119
|
-
The SDK allows users to abort requests at any point by passing
|
|
120
|
-
in an abort signal.
|
|
166
|
+
The SDK allows users to abort requests at any point by passing in an abort signal.
|
|
121
167
|
|
|
122
|
-
```
|
|
168
|
+
```typescript
|
|
123
169
|
const controller = new AbortController();
|
|
124
|
-
const response = await
|
|
125
|
-
|
|
170
|
+
const response = await client.agents.sendMessage(..., {
|
|
171
|
+
abortSignal: controller.signal
|
|
126
172
|
});
|
|
127
173
|
controller.abort(); // aborts the request
|
|
128
174
|
```
|
|
129
175
|
|
|
130
|
-
|
|
176
|
+
### Access Raw Response Data
|
|
131
177
|
|
|
132
|
-
The SDK
|
|
133
|
-
|
|
178
|
+
The SDK provides access to raw response data, including headers, through the `.withRawResponse()` method.
|
|
179
|
+
The `.withRawResponse()` method returns a promise that results to an object with a `data` and a `rawResponse` property.
|
|
134
180
|
|
|
135
|
-
|
|
181
|
+
```typescript
|
|
182
|
+
const { data, rawResponse } = await client.agents.sendMessage(...).withRawResponse();
|
|
136
183
|
|
|
137
|
-
|
|
138
|
-
-
|
|
139
|
-
|
|
140
|
-
- Deno v1.25+
|
|
141
|
-
- Bun 1.0+
|
|
142
|
-
- React Native
|
|
184
|
+
console.log(data);
|
|
185
|
+
console.log(rawResponse.headers['X-My-Header']);
|
|
186
|
+
```
|
|
143
187
|
|
|
144
|
-
###
|
|
188
|
+
### Logging
|
|
145
189
|
|
|
146
|
-
The SDK
|
|
147
|
-
running in an unsupported environment, this provides a way for you to break the glass and
|
|
148
|
-
ensure the SDK works.
|
|
190
|
+
The SDK supports logging. You can configure the logger by passing in a `logging` object to the client options.
|
|
149
191
|
|
|
192
|
+
```typescript
|
|
193
|
+
import { CredalClient, logging } from "@credal/sdk";
|
|
194
|
+
|
|
195
|
+
const client = new CredalClient({
|
|
196
|
+
...
|
|
197
|
+
logging: {
|
|
198
|
+
level: logging.LogLevel.Debug, // defaults to logging.LogLevel.Info
|
|
199
|
+
logger: new logging.ConsoleLogger(), // defaults to ConsoleLogger
|
|
200
|
+
silent: false, // defaults to true, set to false to enable logging
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
```
|
|
204
|
+
The `logging` object can have the following properties:
|
|
205
|
+
- `level`: The log level to use. Defaults to `logging.LogLevel.Info`.
|
|
206
|
+
- `logger`: The logger to use. Defaults to a `logging.ConsoleLogger`.
|
|
207
|
+
- `silent`: Whether to silence the logger. Defaults to `true`.
|
|
208
|
+
|
|
209
|
+
The `level` property can be one of the following values:
|
|
210
|
+
- `logging.LogLevel.Debug`
|
|
211
|
+
- `logging.LogLevel.Info`
|
|
212
|
+
- `logging.LogLevel.Warn`
|
|
213
|
+
- `logging.LogLevel.Error`
|
|
214
|
+
|
|
215
|
+
To provide a custom logger, you can pass in an object that implements the `logging.ILogger` interface.
|
|
216
|
+
|
|
217
|
+
<details>
|
|
218
|
+
<summary>Custom logger examples</summary>
|
|
219
|
+
|
|
220
|
+
Here's an example using the popular `winston` logging library.
|
|
150
221
|
```ts
|
|
222
|
+
import winston from 'winston';
|
|
223
|
+
|
|
224
|
+
const winstonLogger = winston.createLogger({...});
|
|
225
|
+
|
|
226
|
+
const logger: logging.ILogger = {
|
|
227
|
+
debug: (msg, ...args) => winstonLogger.debug(msg, ...args),
|
|
228
|
+
info: (msg, ...args) => winstonLogger.info(msg, ...args),
|
|
229
|
+
warn: (msg, ...args) => winstonLogger.warn(msg, ...args),
|
|
230
|
+
error: (msg, ...args) => winstonLogger.error(msg, ...args),
|
|
231
|
+
};
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
Here's an example using the popular `pino` logging library.
|
|
235
|
+
|
|
236
|
+
```ts
|
|
237
|
+
import pino from 'pino';
|
|
238
|
+
|
|
239
|
+
const pinoLogger = pino({...});
|
|
240
|
+
|
|
241
|
+
const logger: logging.ILogger = {
|
|
242
|
+
debug: (msg, ...args) => pinoLogger.debug(args, msg),
|
|
243
|
+
info: (msg, ...args) => pinoLogger.info(args, msg),
|
|
244
|
+
warn: (msg, ...args) => pinoLogger.warn(args, msg),
|
|
245
|
+
error: (msg, ...args) => pinoLogger.error(args, msg),
|
|
246
|
+
};
|
|
247
|
+
```
|
|
248
|
+
</details>
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
### Custom Fetch
|
|
252
|
+
|
|
253
|
+
The SDK provides a low-level `fetch` method for making custom HTTP requests while still
|
|
254
|
+
benefiting from SDK-level configuration like authentication, retries, timeouts, and logging.
|
|
255
|
+
This is useful for calling API endpoints not yet supported in the SDK.
|
|
256
|
+
|
|
257
|
+
```typescript
|
|
258
|
+
const response = await client.fetch("/v1/custom/endpoint", {
|
|
259
|
+
method: "GET",
|
|
260
|
+
}, {
|
|
261
|
+
timeoutInSeconds: 30,
|
|
262
|
+
maxRetries: 3,
|
|
263
|
+
headers: {
|
|
264
|
+
"X-Custom-Header": "custom-value",
|
|
265
|
+
},
|
|
266
|
+
});
|
|
267
|
+
|
|
268
|
+
const data = await response.json();
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
### Custom Fetcher
|
|
272
|
+
|
|
273
|
+
The SDK provides a way for you to customize the underlying HTTP client / Fetch function. If you're running in an
|
|
274
|
+
unsupported environment, this provides a way for you to break glass and ensure the SDK works.
|
|
275
|
+
|
|
276
|
+
```typescript
|
|
151
277
|
import { CredalClient } from "@credal/sdk";
|
|
152
278
|
|
|
153
|
-
const
|
|
154
|
-
|
|
155
|
-
|
|
279
|
+
const client = new CredalClient({
|
|
280
|
+
...
|
|
281
|
+
fetcher: // provide your implementation here
|
|
156
282
|
});
|
|
157
283
|
```
|
|
284
|
+
|
|
285
|
+
### Runtime Compatibility
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
The SDK works in the following runtimes:
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
- Node.js 18+
|
|
293
|
+
- Vercel
|
|
294
|
+
- Cloudflare Workers
|
|
295
|
+
- Deno v1.25+
|
|
296
|
+
- Bun 1.0+
|
|
297
|
+
- React Native
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
## Contributing
|
|
301
|
+
|
|
302
|
+
While we value open-source contributions to this SDK, this library is generated programmatically.
|
|
303
|
+
Additions made directly to this library would have to be moved over to our generation code,
|
|
304
|
+
otherwise they would be overwritten upon the next generated release. Feel free to open a PR as
|
|
305
|
+
a proof of concept, but know that we will not be able to merge it as-is. We suggest opening
|
|
306
|
+
an issue first to discuss with us!
|
|
307
|
+
|
|
308
|
+
On the other hand, contributions to the README are always very welcome!
|
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
46
|
-
"X-Fern-SDK-Version": "0.
|
|
47
|
-
"User-Agent": "@credal/sdk/0.
|
|
46
|
+
"X-Fern-SDK-Version": "1.0.0",
|
|
47
|
+
"User-Agent": "@credal/sdk/1.0.0",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
package/dist/cjs/Client.d.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DocumentCatalogClient } from "./api/resources/documentCatalog/client/Client.js";
|
|
3
|
-
import { DocumentCollectionsClient } from "./api/resources/documentCollections/client/Client.js";
|
|
4
|
-
import { SearchClient } from "./api/resources/search/client/Client.js";
|
|
5
|
-
import { UsersClient } from "./api/resources/users/client/Client.js";
|
|
1
|
+
import { AgentsClient } from "./api/resources/agents/client/Client.js";
|
|
6
2
|
import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js";
|
|
7
3
|
import { type NormalizedClientOptionsWithAuth } from "./BaseClient.js";
|
|
4
|
+
import * as core from "./core/index.js";
|
|
8
5
|
export declare namespace CredalClient {
|
|
9
6
|
type Options = BaseClientOptions;
|
|
10
7
|
interface RequestOptions extends BaseRequestOptions {
|
|
@@ -12,15 +9,18 @@ export declare namespace CredalClient {
|
|
|
12
9
|
}
|
|
13
10
|
export declare class CredalClient {
|
|
14
11
|
protected readonly _options: NormalizedClientOptionsWithAuth<CredalClient.Options>;
|
|
15
|
-
protected
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
12
|
+
protected _agents: AgentsClient | undefined;
|
|
13
|
+
constructor(options: CredalClient.Options);
|
|
14
|
+
get agents(): AgentsClient;
|
|
15
|
+
/**
|
|
16
|
+
* Make a passthrough request using the SDK's configured auth, retry, logging, etc.
|
|
17
|
+
* This is useful for making requests to endpoints not yet supported in the SDK.
|
|
18
|
+
* The input can be a URL string, URL object, or Request object. Relative paths are resolved against the configured base URL.
|
|
19
|
+
*
|
|
20
|
+
* @param {Request | string | URL} input - The URL, path, or Request object.
|
|
21
|
+
* @param {RequestInit} init - Standard fetch RequestInit options.
|
|
22
|
+
* @param {core.PassthroughRequest.RequestOptions} requestOptions - Per-request overrides (timeout, retries, headers, abort signal).
|
|
23
|
+
* @returns {Promise<Response>} A standard Response object.
|
|
24
|
+
*/
|
|
25
|
+
fetch(input: Request | string | URL, init?: RequestInit, requestOptions?: core.PassthroughRequest.RequestOptions): Promise<Response>;
|
|
26
26
|
}
|
package/dist/cjs/Client.js
CHANGED
|
@@ -1,36 +1,83 @@
|
|
|
1
1
|
"use strict";
|
|
2
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
|
+
};
|
|
3
45
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
46
|
exports.CredalClient = void 0;
|
|
5
|
-
const Client_js_1 = require("./api/resources/
|
|
6
|
-
const Client_js_2 = require("./api/resources/documentCatalog/client/Client.js");
|
|
7
|
-
const Client_js_3 = require("./api/resources/documentCollections/client/Client.js");
|
|
8
|
-
const Client_js_4 = require("./api/resources/search/client/Client.js");
|
|
9
|
-
const Client_js_5 = require("./api/resources/users/client/Client.js");
|
|
47
|
+
const Client_js_1 = require("./api/resources/agents/client/Client.js");
|
|
10
48
|
const BaseClient_js_1 = require("./BaseClient.js");
|
|
49
|
+
const core = __importStar(require("./core/index.js"));
|
|
11
50
|
class CredalClient {
|
|
12
|
-
constructor(options
|
|
51
|
+
constructor(options) {
|
|
13
52
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
14
53
|
}
|
|
15
|
-
get
|
|
16
|
-
var _a;
|
|
17
|
-
return ((_a = this._copilots) !== null && _a !== void 0 ? _a : (this._copilots = new Client_js_1.CopilotsClient(this._options)));
|
|
18
|
-
}
|
|
19
|
-
get documentCatalog() {
|
|
20
|
-
var _a;
|
|
21
|
-
return ((_a = this._documentCatalog) !== null && _a !== void 0 ? _a : (this._documentCatalog = new Client_js_2.DocumentCatalogClient(this._options)));
|
|
22
|
-
}
|
|
23
|
-
get documentCollections() {
|
|
24
|
-
var _a;
|
|
25
|
-
return ((_a = this._documentCollections) !== null && _a !== void 0 ? _a : (this._documentCollections = new Client_js_3.DocumentCollectionsClient(this._options)));
|
|
26
|
-
}
|
|
27
|
-
get search() {
|
|
54
|
+
get agents() {
|
|
28
55
|
var _a;
|
|
29
|
-
return ((_a = this.
|
|
56
|
+
return ((_a = this._agents) !== null && _a !== void 0 ? _a : (this._agents = new Client_js_1.AgentsClient(this._options)));
|
|
30
57
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
58
|
+
/**
|
|
59
|
+
* Make a passthrough request using the SDK's configured auth, retry, logging, etc.
|
|
60
|
+
* This is useful for making requests to endpoints not yet supported in the SDK.
|
|
61
|
+
* The input can be a URL string, URL object, or Request object. Relative paths are resolved against the configured base URL.
|
|
62
|
+
*
|
|
63
|
+
* @param {Request | string | URL} input - The URL, path, or Request object.
|
|
64
|
+
* @param {RequestInit} init - Standard fetch RequestInit options.
|
|
65
|
+
* @param {core.PassthroughRequest.RequestOptions} requestOptions - Per-request overrides (timeout, retries, headers, abort signal).
|
|
66
|
+
* @returns {Promise<Response>} A standard Response object.
|
|
67
|
+
*/
|
|
68
|
+
fetch(input, init, requestOptions) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
var _a;
|
|
71
|
+
return core.makePassthroughRequest(input, init, {
|
|
72
|
+
baseUrl: (_a = this._options.baseUrl) !== null && _a !== void 0 ? _a : this._options.environment,
|
|
73
|
+
headers: this._options.headers,
|
|
74
|
+
timeoutInSeconds: this._options.timeoutInSeconds,
|
|
75
|
+
maxRetries: this._options.maxRetries,
|
|
76
|
+
fetch: this._options.fetch,
|
|
77
|
+
logging: this._options.logging,
|
|
78
|
+
getAuthHeaders: () => __awaiter(this, void 0, void 0, function* () { return (yield this._options.authProvider.getAuthRequest()).headers; }),
|
|
79
|
+
}, requestOptions);
|
|
80
|
+
});
|
|
34
81
|
}
|
|
35
82
|
}
|
|
36
83
|
exports.CredalClient = CredalClient;
|
|
@@ -0,0 +1,54 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.BadRequestError = void 0;
|
|
38
|
+
const errors = __importStar(require("../../errors/index.js"));
|
|
39
|
+
class BadRequestError extends errors.CredalError {
|
|
40
|
+
constructor(body, rawResponse) {
|
|
41
|
+
super({
|
|
42
|
+
message: "BadRequestError",
|
|
43
|
+
statusCode: 400,
|
|
44
|
+
body: body,
|
|
45
|
+
rawResponse: rawResponse,
|
|
46
|
+
});
|
|
47
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
48
|
+
if (Error.captureStackTrace) {
|
|
49
|
+
Error.captureStackTrace(this, this.constructor);
|
|
50
|
+
}
|
|
51
|
+
this.name = this.constructor.name;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.BadRequestError = BadRequestError;
|