@usecortex_ai/node 0.5.0 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +23 -23
- package/README.md +182 -141
- package/dist/Client.d.ts +0 -2
- package/dist/Client.js +0 -2
- package/dist/api/errors/BadRequestError.d.ts +0 -0
- package/dist/api/errors/BadRequestError.js +0 -0
- package/dist/api/errors/ForbiddenError.d.ts +0 -0
- package/dist/api/errors/ForbiddenError.js +0 -0
- package/dist/api/errors/InternalServerError.d.ts +0 -0
- package/dist/api/errors/InternalServerError.js +0 -0
- package/dist/api/errors/NotFoundError.d.ts +0 -0
- package/dist/api/errors/NotFoundError.js +0 -0
- package/dist/api/errors/ServiceUnavailableError.d.ts +0 -0
- package/dist/api/errors/ServiceUnavailableError.js +0 -0
- package/dist/api/errors/TooManyRequestsError.d.ts +0 -0
- package/dist/api/errors/TooManyRequestsError.js +0 -0
- package/dist/api/errors/UnauthorizedError.d.ts +0 -0
- package/dist/api/errors/UnauthorizedError.js +0 -0
- package/dist/api/errors/UnprocessableEntityError.d.ts +0 -0
- package/dist/api/errors/UnprocessableEntityError.js +0 -0
- package/dist/api/errors/index.d.ts +0 -0
- package/dist/api/errors/index.js +0 -0
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.js +1 -1
- package/dist/api/resources/dashboard/client/Client.d.ts +2 -16
- package/dist/api/resources/dashboard/client/Client.js +2 -16
- package/dist/api/resources/dashboard/client/index.d.ts +0 -0
- package/dist/api/resources/dashboard/client/index.js +0 -0
- package/dist/api/resources/dashboard/client/requests/CreateUserDashboardUserCreateUserPostRequest.d.ts +0 -0
- package/dist/api/resources/dashboard/client/requests/CreateUserDashboardUserCreateUserPostRequest.js +0 -0
- package/dist/api/resources/dashboard/client/requests/ListSourcesDashboardSourcesGetRequest.d.ts +2 -2
- package/dist/api/resources/dashboard/client/requests/ListSourcesDashboardSourcesGetRequest.js +0 -0
- package/dist/api/resources/dashboard/client/requests/index.d.ts +0 -0
- package/dist/api/resources/dashboard/client/requests/index.js +0 -0
- package/dist/api/resources/dashboard/index.d.ts +0 -0
- package/dist/api/resources/dashboard/index.js +0 -0
- package/dist/api/resources/embeddings/client/Client.d.ts +20 -33
- package/dist/api/resources/embeddings/client/Client.js +28 -41
- package/dist/api/resources/embeddings/client/index.d.ts +0 -0
- package/dist/api/resources/embeddings/client/index.js +0 -0
- package/dist/api/resources/embeddings/client/requests/BodyFilterRawEmbeddingsEndpointEmbeddingsFilterRawEmbeddingsPost.d.ts +2 -2
- package/dist/api/resources/embeddings/client/requests/BodyFilterRawEmbeddingsEndpointEmbeddingsFilterRawEmbeddingsPost.js +0 -0
- package/dist/api/resources/embeddings/client/requests/BodyInsertRawEmbeddingsEndpointEmbeddingsInsertRawEmbeddingsPost.d.ts +15 -3
- package/dist/api/resources/embeddings/client/requests/BodyInsertRawEmbeddingsEndpointEmbeddingsInsertRawEmbeddingsPost.js +0 -0
- package/dist/api/resources/embeddings/client/requests/BodySearchRawEmbeddingsEndpointEmbeddingsSearchRawEmbeddingsPost.d.ts +2 -2
- package/dist/api/resources/embeddings/client/requests/BodySearchRawEmbeddingsEndpointEmbeddingsSearchRawEmbeddingsPost.js +0 -0
- package/dist/api/resources/embeddings/client/requests/EmbeddingsDeleteRequest.d.ts +1 -1
- package/dist/api/resources/embeddings/client/requests/EmbeddingsDeleteRequest.js +0 -0
- package/dist/api/resources/embeddings/client/requests/index.d.ts +0 -0
- package/dist/api/resources/embeddings/client/requests/index.js +0 -0
- package/dist/api/resources/embeddings/index.d.ts +0 -0
- package/dist/api/resources/embeddings/index.js +0 -0
- package/dist/api/resources/fetch/client/Client.d.ts +9 -60
- package/dist/api/resources/fetch/client/Client.js +16 -129
- package/dist/api/resources/fetch/client/index.d.ts +0 -0
- package/dist/api/resources/fetch/client/index.js +0 -0
- package/dist/api/resources/fetch/client/requests/FetchGraphRelationsBySourceIdRequest.d.ts +2 -1
- package/dist/api/resources/fetch/client/requests/FetchGraphRelationsBySourceIdRequest.js +0 -0
- package/dist/api/resources/fetch/client/requests/ListContentRequest.d.ts +20 -0
- package/dist/api/resources/fetch/client/requests/{FetchSourcesRequest.js → ListContentRequest.js} +0 -0
- package/dist/api/resources/fetch/client/requests/SourceFetchRequest.d.ts +2 -2
- package/dist/api/resources/fetch/client/requests/SourceFetchRequest.js +0 -0
- package/dist/api/resources/fetch/client/requests/index.d.ts +1 -2
- package/dist/api/resources/fetch/client/requests/index.js +0 -0
- package/dist/api/resources/fetch/index.d.ts +1 -0
- package/dist/api/resources/fetch/index.js +1 -0
- package/dist/api/resources/fetch/types/FetchListKnowledgeResponse.d.ts +5 -0
- package/dist/api/resources/fetch/{client/requests/ListSourcesByIdRequest.js → types/FetchListKnowledgeResponse.js} +0 -0
- package/dist/api/resources/fetch/types/index.d.ts +1 -0
- package/dist/api/resources/fetch/types/index.js +17 -0
- package/dist/api/resources/index.d.ts +2 -1
- package/dist/api/resources/index.js +3 -2
- package/dist/api/resources/search/client/Client.d.ts +6 -45
- package/dist/api/resources/search/client/Client.js +12 -51
- package/dist/api/resources/search/client/index.d.ts +0 -0
- package/dist/api/resources/search/client/index.js +0 -0
- package/dist/api/resources/search/client/requests/FullTextSearchRequest.d.ts +3 -3
- package/dist/api/resources/search/client/requests/FullTextSearchRequest.js +0 -0
- package/dist/api/resources/search/client/requests/HybridSearchRequest.d.ts +6 -8
- package/dist/api/resources/search/client/requests/HybridSearchRequest.js +0 -0
- package/dist/api/resources/search/client/requests/QnASearchRequest.d.ts +2 -2
- package/dist/api/resources/search/client/requests/QnASearchRequest.js +0 -0
- package/dist/api/resources/search/client/requests/index.d.ts +0 -0
- package/dist/api/resources/search/client/requests/index.js +0 -0
- package/dist/api/resources/search/index.d.ts +0 -0
- package/dist/api/resources/search/index.js +0 -0
- package/dist/api/resources/sources/client/Client.d.ts +2 -9
- package/dist/api/resources/sources/client/Client.js +4 -11
- package/dist/api/resources/sources/client/index.d.ts +0 -0
- package/dist/api/resources/sources/client/index.js +0 -0
- package/dist/api/resources/sources/client/requests/SourceDeleteRequest.d.ts +2 -2
- package/dist/api/resources/sources/client/requests/SourceDeleteRequest.js +0 -0
- package/dist/api/resources/sources/client/requests/index.d.ts +0 -0
- package/dist/api/resources/sources/client/requests/index.js +0 -0
- package/dist/api/resources/sources/index.d.ts +0 -0
- package/dist/api/resources/sources/index.js +0 -0
- package/dist/api/resources/tenant/client/Client.d.ts +2 -54
- package/dist/api/resources/tenant/client/Client.js +4 -56
- package/dist/api/resources/tenant/client/index.d.ts +0 -0
- package/dist/api/resources/tenant/client/index.js +0 -0
- package/dist/api/resources/tenant/client/requests/TenantCreateRequest.d.ts +1 -1
- package/dist/api/resources/tenant/client/requests/TenantCreateRequest.js +0 -0
- package/dist/api/resources/tenant/client/requests/TenantStatsRequest.d.ts +1 -1
- package/dist/api/resources/tenant/client/requests/TenantStatsRequest.js +0 -0
- package/dist/api/resources/tenant/client/requests/index.d.ts +0 -0
- package/dist/api/resources/tenant/client/requests/index.js +0 -0
- package/dist/api/resources/tenant/index.d.ts +0 -0
- package/dist/api/resources/tenant/index.js +0 -0
- package/dist/api/resources/upload/client/Client.d.ts +9 -73
- package/dist/api/resources/upload/client/Client.js +22 -140
- package/dist/api/resources/upload/client/index.d.ts +0 -0
- package/dist/api/resources/upload/client/index.js +0 -0
- package/dist/api/resources/upload/client/requests/BodyAddMemoryMemoriesAddMemoryPost.d.ts +1 -1
- package/dist/api/resources/upload/client/requests/BodyAddMemoryMemoriesAddMemoryPost.js +0 -0
- package/dist/api/resources/upload/client/requests/{BodyUploadDocumentIngestionUploadDocumentPost.d.ts → BodyUploadKnowledgeIngestionUploadKnowledgePost.d.ts} +7 -5
- package/dist/api/resources/upload/client/requests/{BodyUploadAppIngestionUploadAppPost.js → BodyUploadKnowledgeIngestionUploadKnowledgePost.js} +0 -0
- package/dist/api/resources/upload/client/requests/UploadDeleteMemoryRequest.d.ts +2 -2
- package/dist/api/resources/upload/client/requests/UploadDeleteMemoryRequest.js +0 -0
- package/dist/api/resources/upload/client/requests/UploadVerifyProcessingRequest.d.ts +2 -1
- package/dist/api/resources/upload/client/requests/UploadVerifyProcessingRequest.js +0 -0
- package/dist/api/resources/upload/client/requests/index.d.ts +1 -2
- package/dist/api/resources/upload/client/requests/index.js +0 -0
- package/dist/api/resources/upload/index.d.ts +0 -0
- package/dist/api/resources/upload/index.js +0 -0
- package/dist/api/types/ActualErrorResponse.d.ts +0 -0
- package/dist/api/types/ActualErrorResponse.js +0 -0
- package/dist/api/types/AddMemoryResponse.d.ts +0 -0
- package/dist/api/types/AddMemoryResponse.js +0 -0
- package/dist/api/types/ApiKeyInfo.d.ts +0 -0
- package/dist/api/types/ApiKeyInfo.js +0 -0
- package/dist/api/types/AttachmentModel.d.ts +0 -0
- package/dist/api/types/AttachmentModel.js +0 -0
- package/dist/api/types/Bm25OperatorType.d.ts +0 -0
- package/dist/api/types/Bm25OperatorType.js +0 -0
- package/dist/api/types/CollectionStats.d.ts +0 -0
- package/dist/api/types/CollectionStats.js +0 -0
- package/dist/api/types/ContentModel.d.ts +0 -0
- package/dist/api/types/ContentModel.js +0 -0
- package/dist/api/types/CustomPropertyDefinition.d.ts +0 -0
- package/dist/api/types/CustomPropertyDefinition.js +0 -0
- package/dist/api/types/DashboardApisResponse.d.ts +0 -0
- package/dist/api/types/DashboardApisResponse.js +0 -0
- package/dist/api/types/DashboardSourcesResponse.d.ts +0 -0
- package/dist/api/types/DashboardSourcesResponse.js +0 -0
- package/dist/api/types/DashboardTenantsResponse.d.ts +0 -0
- package/dist/api/types/DashboardTenantsResponse.js +0 -0
- package/dist/api/types/DeleteResult.d.ts +0 -0
- package/dist/api/types/DeleteResult.js +0 -0
- package/dist/api/types/DeleteUserMemoryResponse.d.ts +0 -0
- package/dist/api/types/DeleteUserMemoryResponse.js +0 -0
- package/dist/api/types/Entity.d.ts +0 -0
- package/dist/api/types/Entity.js +0 -0
- package/dist/api/types/ErrorResponse.d.ts +0 -0
- package/dist/api/types/ErrorResponse.js +0 -0
- package/dist/api/types/FetchMode.d.ts +0 -0
- package/dist/api/types/FetchMode.js +0 -0
- package/dist/api/types/ForcefulRelationsPayload.d.ts +0 -0
- package/dist/api/types/ForcefulRelationsPayload.js +0 -0
- package/dist/api/types/GraphContext.d.ts +0 -0
- package/dist/api/types/GraphContext.js +0 -0
- package/dist/api/types/HttpValidationError.d.ts +0 -0
- package/dist/api/types/HttpValidationError.js +0 -0
- package/dist/api/types/Infra.d.ts +0 -0
- package/dist/api/types/Infra.js +0 -0
- package/dist/api/types/InsertResult.d.ts +0 -0
- package/dist/api/types/InsertResult.js +0 -0
- package/dist/api/types/ListContentKind.d.ts +8 -0
- package/dist/api/types/ListContentKind.js +10 -0
- package/dist/api/types/ListUserMemoriesResponse.d.ts +13 -0
- package/dist/api/{resources/upload/client/requests/BodyUploadDocumentIngestionUploadDocumentPost.js → types/ListUserMemoriesResponse.js} +0 -0
- package/dist/api/types/MemoryItem.d.ts +0 -0
- package/dist/api/types/MemoryItem.js +0 -0
- package/dist/api/types/MemoryResultItem.d.ts +0 -0
- package/dist/api/types/MemoryResultItem.js +0 -0
- package/dist/api/types/MilvusDataType.d.ts +0 -0
- package/dist/api/types/MilvusDataType.js +0 -0
- package/dist/api/types/PathTriplet.d.ts +0 -0
- package/dist/api/types/PathTriplet.js +0 -0
- package/dist/api/types/ProcessingStatus.d.ts +0 -0
- package/dist/api/types/ProcessingStatus.js +0 -0
- package/dist/api/types/QnASearchResponse.d.ts +0 -0
- package/dist/api/types/QnASearchResponse.js +0 -0
- package/dist/api/types/RawEmbeddingDocument.d.ts +0 -0
- package/dist/api/types/RawEmbeddingDocument.js +0 -0
- package/dist/api/types/RawEmbeddingSearchResult.d.ts +0 -0
- package/dist/api/types/RawEmbeddingSearchResult.js +0 -0
- package/dist/api/types/RawEmbeddingVector.d.ts +0 -0
- package/dist/api/types/RawEmbeddingVector.js +0 -0
- package/dist/api/types/RelationEvidence.d.ts +0 -0
- package/dist/api/types/RelationEvidence.js +0 -0
- package/dist/api/types/RetrievalResult.d.ts +1 -1
- package/dist/api/types/RetrievalResult.js +0 -0
- package/dist/api/types/RetrieveMode.d.ts +2 -2
- package/dist/api/types/RetrieveMode.js +1 -1
- package/dist/api/types/ScoredPathResponse.d.ts +0 -0
- package/dist/api/types/ScoredPathResponse.js +0 -0
- package/dist/api/types/SearchMode.d.ts +0 -0
- package/dist/api/types/SearchMode.js +0 -0
- package/dist/api/types/SourceDeleteResponse.d.ts +0 -0
- package/dist/api/types/SourceDeleteResponse.js +0 -0
- package/dist/api/types/SourceDeleteResultItem.d.ts +0 -0
- package/dist/api/types/SourceDeleteResultItem.js +0 -0
- package/dist/api/types/SourceFetchResponse.d.ts +0 -0
- package/dist/api/types/SourceFetchResponse.js +0 -0
- package/dist/api/types/SourceGraphRelationsResponse.d.ts +0 -0
- package/dist/api/types/SourceGraphRelationsResponse.js +0 -0
- package/dist/api/types/SourceListResponse.d.ts +0 -0
- package/dist/api/types/SourceListResponse.js +0 -0
- package/dist/api/types/SourceModel.d.ts +0 -0
- package/dist/api/types/SourceModel.js +0 -0
- package/dist/api/types/SourceStatus.d.ts +0 -0
- package/dist/api/types/SourceStatus.js +0 -0
- package/dist/api/types/SourceUploadResponse.d.ts +0 -0
- package/dist/api/types/SourceUploadResponse.js +0 -0
- package/dist/api/types/SourceUploadResultItem.d.ts +0 -0
- package/dist/api/types/SourceUploadResultItem.js +0 -0
- package/dist/api/types/SupportedLlmProviders.d.ts +0 -0
- package/dist/api/types/SupportedLlmProviders.js +0 -0
- package/dist/api/types/TenantCreateResponse.d.ts +0 -0
- package/dist/api/types/TenantCreateResponse.js +0 -0
- package/dist/api/types/TenantInfo.d.ts +0 -0
- package/dist/api/types/TenantInfo.js +0 -0
- package/dist/api/types/TenantMetadataSchemaInfo.d.ts +0 -0
- package/dist/api/types/TenantMetadataSchemaInfo.js +0 -0
- package/dist/api/types/TenantStatsResponse.d.ts +0 -0
- package/dist/api/types/TenantStatsResponse.js +0 -0
- package/dist/api/types/TripletWithEvidence.d.ts +0 -0
- package/dist/api/types/TripletWithEvidence.js +0 -0
- package/dist/api/types/UserAssistantPair.d.ts +0 -0
- package/dist/api/types/UserAssistantPair.js +0 -0
- package/dist/api/types/UserMemory.d.ts +12 -0
- package/dist/api/types/{AppSourcesUploadData.js → UserMemory.js} +0 -0
- package/dist/api/types/ValidationError.d.ts +0 -0
- package/dist/api/types/ValidationError.js +0 -0
- package/dist/api/types/VectorStoreChunk.d.ts +0 -0
- package/dist/api/types/VectorStoreChunk.js +0 -0
- package/dist/api/types/index.d.ts +3 -1
- package/dist/api/types/index.js +3 -1
- package/dist/core/auth/AuthProvider.d.ts +0 -0
- package/dist/core/auth/AuthProvider.js +0 -0
- package/dist/core/auth/AuthRequest.d.ts +0 -0
- package/dist/core/auth/AuthRequest.js +0 -0
- package/dist/core/auth/BasicAuth.d.ts +0 -0
- package/dist/core/auth/BasicAuth.js +0 -0
- package/dist/core/auth/BearerToken.d.ts +0 -0
- package/dist/core/auth/BearerToken.js +0 -0
- package/dist/core/auth/index.d.ts +0 -0
- package/dist/core/auth/index.js +0 -0
- package/dist/core/base64.d.ts +0 -0
- package/dist/core/base64.js +0 -0
- package/dist/core/exports.d.ts +0 -0
- package/dist/core/exports.js +0 -0
- package/dist/core/fetcher/APIResponse.d.ts +0 -0
- package/dist/core/fetcher/APIResponse.js +0 -0
- package/dist/core/fetcher/BinaryResponse.d.ts +0 -0
- package/dist/core/fetcher/BinaryResponse.js +0 -0
- package/dist/core/fetcher/Fetcher.d.ts +0 -0
- package/dist/core/fetcher/Fetcher.js +0 -0
- package/dist/core/fetcher/Headers.d.ts +0 -0
- package/dist/core/fetcher/Headers.js +0 -0
- package/dist/core/fetcher/HttpResponsePromise.d.ts +0 -0
- package/dist/core/fetcher/HttpResponsePromise.js +0 -0
- package/dist/core/fetcher/RawResponse.d.ts +0 -0
- package/dist/core/fetcher/RawResponse.js +0 -0
- package/dist/core/fetcher/ResponseWithBody.d.ts +0 -0
- package/dist/core/fetcher/ResponseWithBody.js +0 -0
- package/dist/core/fetcher/Supplier.d.ts +0 -0
- package/dist/core/fetcher/Supplier.js +0 -0
- package/dist/core/fetcher/createRequestUrl.d.ts +0 -0
- package/dist/core/fetcher/createRequestUrl.js +0 -0
- package/dist/core/fetcher/getErrorResponseBody.d.ts +0 -0
- package/dist/core/fetcher/getErrorResponseBody.js +0 -0
- package/dist/core/fetcher/getFetchFn.d.ts +0 -0
- package/dist/core/fetcher/getFetchFn.js +0 -0
- package/dist/core/fetcher/getHeader.d.ts +0 -0
- package/dist/core/fetcher/getHeader.js +0 -0
- package/dist/core/fetcher/getRequestBody.d.ts +0 -0
- package/dist/core/fetcher/getRequestBody.js +0 -0
- package/dist/core/fetcher/getResponseBody.d.ts +0 -0
- package/dist/core/fetcher/getResponseBody.js +0 -0
- package/dist/core/fetcher/index.d.ts +0 -0
- package/dist/core/fetcher/index.js +0 -0
- package/dist/core/fetcher/makeRequest.d.ts +0 -0
- package/dist/core/fetcher/makeRequest.js +0 -0
- package/dist/core/fetcher/requestWithRetries.d.ts +0 -0
- package/dist/core/fetcher/requestWithRetries.js +0 -0
- package/dist/core/fetcher/signals.d.ts +0 -0
- package/dist/core/fetcher/signals.js +0 -0
- package/dist/core/file/exports.d.ts +0 -0
- package/dist/core/file/exports.js +0 -0
- package/dist/core/file/file.d.ts +0 -0
- package/dist/core/file/file.js +0 -0
- package/dist/core/file/index.d.ts +0 -0
- package/dist/core/file/index.js +0 -0
- package/dist/core/file/types.d.ts +0 -0
- package/dist/core/file/types.js +0 -0
- package/dist/core/form-data-utils/FormDataWrapper.d.ts +0 -0
- package/dist/core/form-data-utils/FormDataWrapper.js +0 -0
- package/dist/core/form-data-utils/encodeAsFormParameter.d.ts +0 -0
- package/dist/core/form-data-utils/encodeAsFormParameter.js +0 -0
- package/dist/core/form-data-utils/index.d.ts +0 -0
- package/dist/core/form-data-utils/index.js +0 -0
- package/dist/core/headers.d.ts +0 -0
- package/dist/core/headers.js +0 -0
- package/dist/core/index.d.ts +0 -0
- package/dist/core/index.js +0 -0
- package/dist/core/json.d.ts +0 -0
- package/dist/core/json.js +0 -0
- package/dist/core/runtime/index.d.ts +0 -0
- package/dist/core/runtime/index.js +0 -0
- package/dist/core/runtime/runtime.d.ts +0 -0
- package/dist/core/runtime/runtime.js +0 -0
- package/dist/core/url/index.d.ts +0 -0
- package/dist/core/url/index.js +0 -0
- package/dist/core/url/join.d.ts +0 -0
- package/dist/core/url/join.js +0 -0
- package/dist/core/url/qs.d.ts +0 -0
- package/dist/core/url/qs.js +0 -0
- package/dist/environments.d.ts +0 -0
- package/dist/environments.js +0 -0
- package/dist/errors/CortexAIError.d.ts +0 -0
- package/dist/errors/CortexAIError.js +0 -0
- package/dist/errors/CortexAITimeoutError.d.ts +0 -0
- package/dist/errors/CortexAITimeoutError.js +0 -0
- package/dist/errors/index.d.ts +0 -0
- package/dist/errors/index.js +0 -0
- package/dist/exports.d.ts +0 -0
- package/dist/exports.js +0 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.js +0 -0
- package/package.json +34 -31
- package/dist/api/resources/fetch/client/requests/FetchSourcesRequest.d.ts +0 -15
- package/dist/api/resources/fetch/client/requests/ListSourcesByIdRequest.d.ts +0 -18
- package/dist/api/resources/upload/client/requests/BodyUploadAppIngestionUploadAppPost.d.ts +0 -31
- package/dist/api/types/AppSourcesUploadData.d.ts +0 -17
|
@@ -37,12 +37,7 @@ class Upload {
|
|
|
37
37
|
this._options = _options;
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
41
|
-
* Supports both single and batch uploads.
|
|
42
|
-
* For single file: send one file with the 'files' field.
|
|
43
|
-
* For batch: send multiple files with the 'files' field (FastAPI will parse as list).
|
|
44
|
-
*
|
|
45
|
-
* @param {CortexAI.BodyUploadDocumentIngestionUploadDocumentPost} request
|
|
40
|
+
* @param {CortexAI.BodyUploadKnowledgeIngestionUploadKnowledgePost} request
|
|
46
41
|
* @param {Upload.RequestOptions} requestOptions - Request-specific configuration.
|
|
47
42
|
*
|
|
48
43
|
* @throws {@link CortexAI.BadRequestError}
|
|
@@ -55,20 +50,16 @@ class Upload {
|
|
|
55
50
|
*
|
|
56
51
|
* @example
|
|
57
52
|
* import { createReadStream } from "fs";
|
|
58
|
-
* await client.upload.
|
|
59
|
-
* files: [fs.createReadStream("/path/to/your/file")],
|
|
53
|
+
* await client.upload.uploadKnowledge({
|
|
60
54
|
* tenant_id: "tenant_id"
|
|
61
55
|
* })
|
|
62
56
|
*/
|
|
63
|
-
|
|
64
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
57
|
+
uploadKnowledge(request, requestOptions) {
|
|
58
|
+
return core.HttpResponsePromise.fromPromise(this.__uploadKnowledge(request, requestOptions));
|
|
65
59
|
}
|
|
66
|
-
async
|
|
60
|
+
async __uploadKnowledge(request, requestOptions) {
|
|
67
61
|
var _a, _b, _c;
|
|
68
62
|
const _request = await core.newFormData();
|
|
69
|
-
for (const _file of request.files) {
|
|
70
|
-
await _request.appendFile("files", _file);
|
|
71
|
-
}
|
|
72
63
|
_request.append("tenant_id", request.tenant_id);
|
|
73
64
|
if (request.sub_tenant_id != null) {
|
|
74
65
|
_request.append("sub_tenant_id", request.sub_tenant_id);
|
|
@@ -76,13 +67,21 @@ class Upload {
|
|
|
76
67
|
if (request.upsert != null) {
|
|
77
68
|
_request.append("upsert", request.upsert.toString());
|
|
78
69
|
}
|
|
70
|
+
if (request.files != null) {
|
|
71
|
+
for (const _file of request.files) {
|
|
72
|
+
await _request.appendFile("files", _file);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
79
75
|
if (request.file_metadata != null) {
|
|
80
76
|
_request.append("file_metadata", request.file_metadata);
|
|
81
77
|
}
|
|
78
|
+
if (request.app_sources != null) {
|
|
79
|
+
_request.append("app_sources", request.app_sources);
|
|
80
|
+
}
|
|
82
81
|
const _maybeEncodedRequest = await _request.getRequest();
|
|
83
82
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({ Authorization: await this._getAuthorizationHeader() }, _maybeEncodedRequest.headers)), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
84
83
|
const _response = await core.fetcher({
|
|
85
|
-
url: core.url.join((_c = (_b = (await core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (await core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CortexAIEnvironment.CortexProd, "ingestion/
|
|
84
|
+
url: core.url.join((_c = (_b = (await core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (await core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CortexAIEnvironment.CortexProd, "ingestion/upload_knowledge"),
|
|
86
85
|
method: "POST",
|
|
87
86
|
headers: _headers,
|
|
88
87
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -128,7 +127,7 @@ class Upload {
|
|
|
128
127
|
rawResponse: _response.rawResponse,
|
|
129
128
|
});
|
|
130
129
|
case "timeout":
|
|
131
|
-
throw new errors.CortexAITimeoutError("Timeout exceeded when calling POST /ingestion/
|
|
130
|
+
throw new errors.CortexAITimeoutError("Timeout exceeded when calling POST /ingestion/upload_knowledge.");
|
|
132
131
|
case "unknown":
|
|
133
132
|
throw new errors.CortexAIError({
|
|
134
133
|
message: _response.error.errorMessage,
|
|
@@ -137,98 +136,6 @@ class Upload {
|
|
|
137
136
|
}
|
|
138
137
|
}
|
|
139
138
|
/**
|
|
140
|
-
* Upload structured sources generated by first-party or third-party apps.
|
|
141
|
-
* Supports both single and batch uploads.
|
|
142
|
-
*
|
|
143
|
-
* @param {CortexAI.BodyUploadAppIngestionUploadAppPost} request
|
|
144
|
-
* @param {Upload.RequestOptions} requestOptions - Request-specific configuration.
|
|
145
|
-
*
|
|
146
|
-
* @throws {@link CortexAI.BadRequestError}
|
|
147
|
-
* @throws {@link CortexAI.UnauthorizedError}
|
|
148
|
-
* @throws {@link CortexAI.ForbiddenError}
|
|
149
|
-
* @throws {@link CortexAI.NotFoundError}
|
|
150
|
-
* @throws {@link CortexAI.UnprocessableEntityError}
|
|
151
|
-
* @throws {@link CortexAI.InternalServerError}
|
|
152
|
-
* @throws {@link CortexAI.ServiceUnavailableError}
|
|
153
|
-
*
|
|
154
|
-
* @example
|
|
155
|
-
* await client.upload.uploadAppSources({
|
|
156
|
-
* app_sources: {
|
|
157
|
-
* id: "id",
|
|
158
|
-
* tenant_id: "tenant_id",
|
|
159
|
-
* sub_tenant_id: "sub_tenant_id"
|
|
160
|
-
* },
|
|
161
|
-
* tenant_id: "tenant_id"
|
|
162
|
-
* })
|
|
163
|
-
*/
|
|
164
|
-
uploadAppSources(request, requestOptions) {
|
|
165
|
-
return core.HttpResponsePromise.fromPromise(this.__uploadAppSources(request, requestOptions));
|
|
166
|
-
}
|
|
167
|
-
async __uploadAppSources(request, requestOptions) {
|
|
168
|
-
var _a, _b, _c;
|
|
169
|
-
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: await this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
170
|
-
const _response = await core.fetcher({
|
|
171
|
-
url: core.url.join((_c = (_b = (await core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (await core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CortexAIEnvironment.CortexProd, "ingestion/upload-app"),
|
|
172
|
-
method: "POST",
|
|
173
|
-
headers: _headers,
|
|
174
|
-
contentType: "application/json",
|
|
175
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
176
|
-
requestType: "json",
|
|
177
|
-
body: request,
|
|
178
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
179
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
180
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
181
|
-
});
|
|
182
|
-
if (_response.ok) {
|
|
183
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
184
|
-
}
|
|
185
|
-
if (_response.error.reason === "status-code") {
|
|
186
|
-
switch (_response.error.statusCode) {
|
|
187
|
-
case 400:
|
|
188
|
-
throw new CortexAI.BadRequestError(_response.error.body, _response.rawResponse);
|
|
189
|
-
case 401:
|
|
190
|
-
throw new CortexAI.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
191
|
-
case 403:
|
|
192
|
-
throw new CortexAI.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
193
|
-
case 404:
|
|
194
|
-
throw new CortexAI.NotFoundError(_response.error.body, _response.rawResponse);
|
|
195
|
-
case 422:
|
|
196
|
-
throw new CortexAI.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
197
|
-
case 500:
|
|
198
|
-
throw new CortexAI.InternalServerError(_response.error.body, _response.rawResponse);
|
|
199
|
-
case 503:
|
|
200
|
-
throw new CortexAI.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
201
|
-
default:
|
|
202
|
-
throw new errors.CortexAIError({
|
|
203
|
-
statusCode: _response.error.statusCode,
|
|
204
|
-
body: _response.error.body,
|
|
205
|
-
rawResponse: _response.rawResponse,
|
|
206
|
-
});
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
switch (_response.error.reason) {
|
|
210
|
-
case "non-json":
|
|
211
|
-
throw new errors.CortexAIError({
|
|
212
|
-
statusCode: _response.error.statusCode,
|
|
213
|
-
body: _response.error.rawBody,
|
|
214
|
-
rawResponse: _response.rawResponse,
|
|
215
|
-
});
|
|
216
|
-
case "timeout":
|
|
217
|
-
throw new errors.CortexAITimeoutError("Timeout exceeded when calling POST /ingestion/upload-app.");
|
|
218
|
-
case "unknown":
|
|
219
|
-
throw new errors.CortexAIError({
|
|
220
|
-
message: _response.error.errorMessage,
|
|
221
|
-
rawResponse: _response.rawResponse,
|
|
222
|
-
});
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
/**
|
|
226
|
-
* Check the current processing status of your uploaded content.
|
|
227
|
-
*
|
|
228
|
-
* This endpoint allows you to monitor the progress of documents, text, or other content you've uploaded. Simply provide the file ID to see whether processing is complete, still in progress, or if any errors occurred.
|
|
229
|
-
*
|
|
230
|
-
* Use this to determine when your content is ready for search and retrieval, or to troubleshoot any processing issues.
|
|
231
|
-
*
|
|
232
139
|
* @param {CortexAI.UploadVerifyProcessingRequest} request
|
|
233
140
|
* @param {Upload.RequestOptions} requestOptions - Request-specific configuration.
|
|
234
141
|
*
|
|
@@ -242,7 +149,8 @@ class Upload {
|
|
|
242
149
|
*
|
|
243
150
|
* @example
|
|
244
151
|
* await client.upload.verifyProcessing({
|
|
245
|
-
* file_id: "
|
|
152
|
+
* file_id: "<str>",
|
|
153
|
+
* tenant_id: "tenant_1234"
|
|
246
154
|
* })
|
|
247
155
|
*/
|
|
248
156
|
verifyProcessing(request, requestOptions) {
|
|
@@ -261,7 +169,7 @@ class Upload {
|
|
|
261
169
|
}
|
|
262
170
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: await this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
263
171
|
const _response = await core.fetcher({
|
|
264
|
-
url: core.url.join((_c = (_b = (await core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (await core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CortexAIEnvironment.CortexProd, "ingestion/
|
|
172
|
+
url: core.url.join((_c = (_b = (await core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (await core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CortexAIEnvironment.CortexProd, "ingestion/verify_processing"),
|
|
265
173
|
method: "POST",
|
|
266
174
|
headers: _headers,
|
|
267
175
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -304,7 +212,7 @@ class Upload {
|
|
|
304
212
|
rawResponse: _response.rawResponse,
|
|
305
213
|
});
|
|
306
214
|
case "timeout":
|
|
307
|
-
throw new errors.CortexAITimeoutError("Timeout exceeded when calling POST /ingestion/
|
|
215
|
+
throw new errors.CortexAITimeoutError("Timeout exceeded when calling POST /ingestion/verify_processing.");
|
|
308
216
|
case "unknown":
|
|
309
217
|
throw new errors.CortexAIError({
|
|
310
218
|
message: _response.error.errorMessage,
|
|
@@ -313,24 +221,6 @@ class Upload {
|
|
|
313
221
|
}
|
|
314
222
|
}
|
|
315
223
|
/**
|
|
316
|
-
* Add memories for indexing and retrieval.
|
|
317
|
-
*
|
|
318
|
-
* This API provides a unified entry point for ingesting various types of content:
|
|
319
|
-
*
|
|
320
|
-
* **Content Types Supported:**
|
|
321
|
-
* - Raw text content (`text` field)
|
|
322
|
-
* - Markdown formatted content (`text` + `is_markdown=true`)
|
|
323
|
-
* - User/assistant conversation pairs (`user_assistant_pairs` field)
|
|
324
|
-
*
|
|
325
|
-
* **Key Features:**
|
|
326
|
-
* - **Inference Mode (`infer=true`)**: When enabled, the system extracts additional
|
|
327
|
-
* insights and implicit information from your content. Useful for conversation
|
|
328
|
-
* analysis and knowledge extraction.
|
|
329
|
-
* - **Direct Mode (`infer=false`)**: Content is chunked and indexed as-is without
|
|
330
|
-
* additional processing.
|
|
331
|
-
*
|
|
332
|
-
* Use `/ingestion/verify-processing` endpoint to check the processing status.
|
|
333
|
-
*
|
|
334
224
|
* @param {CortexAI.BodyAddMemoryMemoriesAddMemoryPost} request
|
|
335
225
|
* @param {Upload.RequestOptions} requestOptions - Request-specific configuration.
|
|
336
226
|
*
|
|
@@ -345,7 +235,7 @@ class Upload {
|
|
|
345
235
|
* @example
|
|
346
236
|
* await client.upload.addMemory({
|
|
347
237
|
* memories: [{}],
|
|
348
|
-
* tenant_id: "
|
|
238
|
+
* tenant_id: "tenant_1234"
|
|
349
239
|
* })
|
|
350
240
|
*/
|
|
351
241
|
addMemory(request, requestOptions) {
|
|
@@ -410,14 +300,6 @@ class Upload {
|
|
|
410
300
|
}
|
|
411
301
|
}
|
|
412
302
|
/**
|
|
413
|
-
* Permanently remove a specific memory from storage.
|
|
414
|
-
*
|
|
415
|
-
* This API allows you to delete a memory by its unique identifier.
|
|
416
|
-
* Once deleted, the memory cannot be recovered, so use this operation carefully.
|
|
417
|
-
*
|
|
418
|
-
* The memory will be removed from your tenant's storage and will no longer
|
|
419
|
-
* appear in search results or memory listings.
|
|
420
|
-
*
|
|
421
303
|
* @param {CortexAI.UploadDeleteMemoryRequest} request
|
|
422
304
|
* @param {Upload.RequestOptions} requestOptions - Request-specific configuration.
|
|
423
305
|
*
|
|
@@ -431,8 +313,8 @@ class Upload {
|
|
|
431
313
|
*
|
|
432
314
|
* @example
|
|
433
315
|
* await client.upload.deleteMemory({
|
|
434
|
-
* tenant_id: "
|
|
435
|
-
* memory_id: "
|
|
316
|
+
* tenant_id: "tenant_1234",
|
|
317
|
+
* memory_id: "memory_1234"
|
|
436
318
|
* })
|
|
437
319
|
*/
|
|
438
320
|
deleteMemory(request, requestOptions) {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -5,18 +5,20 @@ import * as core from "../../../../../core/index.js";
|
|
|
5
5
|
/**
|
|
6
6
|
* @example
|
|
7
7
|
* {
|
|
8
|
-
* files: [fs.createReadStream("/path/to/your/file")],
|
|
9
8
|
* tenant_id: "tenant_id"
|
|
10
9
|
* }
|
|
11
10
|
*/
|
|
12
|
-
export interface
|
|
13
|
-
/** Files to be uploaded */
|
|
14
|
-
files: core.file.Uploadable.FileLike[];
|
|
11
|
+
export interface BodyUploadKnowledgeIngestionUploadKnowledgePost {
|
|
15
12
|
/** Unique identifier for the tenant/organization */
|
|
16
13
|
tenant_id: string;
|
|
17
14
|
/** Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used. */
|
|
18
15
|
sub_tenant_id?: string;
|
|
16
|
+
/** If true, update existing sources with the same id. */
|
|
19
17
|
upsert?: boolean;
|
|
20
|
-
/**
|
|
18
|
+
/** Files to upload (documents). Omit or leave empty when only sending app_sources. */
|
|
19
|
+
files?: core.file.Uploadable.FileLike[] | undefined;
|
|
20
|
+
/** JSON array of file metadata objects; length must match files when provided. */
|
|
21
21
|
file_metadata?: string;
|
|
22
|
+
/** JSON: single source object or array of app-generated sources to index. Omit when only uploading files. */
|
|
23
|
+
app_sources?: string;
|
|
22
24
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export { type
|
|
2
|
-
export { type BodyUploadAppIngestionUploadAppPost } from "./BodyUploadAppIngestionUploadAppPost.js";
|
|
1
|
+
export { type BodyUploadKnowledgeIngestionUploadKnowledgePost } from "./BodyUploadKnowledgeIngestionUploadKnowledgePost.js";
|
|
3
2
|
export { type UploadVerifyProcessingRequest } from "./UploadVerifyProcessingRequest.js";
|
|
4
3
|
export { type BodyAddMemoryMemoriesAddMemoryPost } from "./BodyAddMemoryMemoriesAddMemoryPost.js";
|
|
5
4
|
export { type UploadDeleteMemoryRequest } from "./UploadDeleteMemoryRequest.js";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/api/types/Entity.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/api/types/Infra.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ListContentKind = void 0;
|
|
7
|
+
exports.ListContentKind = {
|
|
8
|
+
Knowledge: "knowledge",
|
|
9
|
+
Memories: "memories",
|
|
10
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as CortexAI from "../index.js";
|
|
5
|
+
/**
|
|
6
|
+
* Response model for listing all user memories.
|
|
7
|
+
*/
|
|
8
|
+
export interface ListUserMemoriesResponse {
|
|
9
|
+
/** Indicates whether the memory listing operation was successful */
|
|
10
|
+
success?: boolean;
|
|
11
|
+
/** Array of all user memories associated with your tenant */
|
|
12
|
+
user_memories?: CortexAI.UserMemory[];
|
|
13
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -9,5 +9,5 @@ export interface RetrievalResult {
|
|
|
9
9
|
chunks?: CortexAI.VectorStoreChunk[];
|
|
10
10
|
graph_context?: CortexAI.GraphContext;
|
|
11
11
|
/** Map of chunk_uuid to VectorStoreChunk for extra context from forcefully related sources. Use chunk.extra_context_ids to look up chunks: extra_context[id] for id in chunk.extra_context_ids. */
|
|
12
|
-
|
|
12
|
+
additional_context?: Record<string, CortexAI.VectorStoreChunk>;
|
|
13
13
|
}
|
|
File without changes
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export type RetrieveMode = "fast" | "
|
|
4
|
+
export type RetrieveMode = "fast" | "thinking";
|
|
5
5
|
export declare const RetrieveMode: {
|
|
6
6
|
readonly Fast: "fast";
|
|
7
|
-
readonly
|
|
7
|
+
readonly Thinking: "thinking";
|
|
8
8
|
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|