@usecortex_ai/node 0.3.5 → 0.4.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/dist/Client.d.ts +20 -24
- package/dist/Client.js +26 -34
- package/dist/api/errors/BadRequestError.d.ts +1 -2
- package/dist/api/errors/ForbiddenError.d.ts +1 -2
- package/dist/api/errors/InternalServerError.d.ts +1 -2
- package/dist/api/errors/NotFoundError.d.ts +1 -2
- package/dist/api/errors/ServiceUnavailableError.d.ts +1 -2
- package/dist/api/errors/TooManyRequestsError.d.ts +9 -0
- package/dist/api/errors/TooManyRequestsError.js +42 -0
- package/dist/api/errors/UnauthorizedError.d.ts +1 -2
- package/dist/api/errors/index.d.ts +1 -0
- package/dist/api/errors/index.js +1 -0
- package/dist/api/resources/dashboard/client/Client.d.ts +136 -0
- package/dist/api/resources/{userMemory → dashboard}/client/Client.js +191 -138
- package/dist/api/resources/dashboard/client/requests/CreateUserDashboardUserCreateUserPostRequest.d.ts +12 -0
- package/dist/api/resources/dashboard/client/requests/ListSourcesDashboardSourcesGetRequest.d.ts +16 -0
- package/dist/api/resources/dashboard/client/requests/index.d.ts +2 -0
- package/dist/api/resources/embeddings/client/Client.d.ts +40 -27
- package/dist/api/resources/embeddings/client/Client.js +68 -44
- package/dist/api/resources/embeddings/client/requests/BodyFilterRawEmbeddingsEndpointEmbeddingsFilterRawEmbeddingsPost.d.ts +24 -0
- package/dist/api/resources/embeddings/client/requests/BodyInsertRawEmbeddingsEndpointEmbeddingsInsertRawEmbeddingsPost.d.ts +27 -0
- package/dist/api/resources/embeddings/client/requests/BodySearchRawEmbeddingsEndpointEmbeddingsSearchRawEmbeddingsPost.d.ts +25 -0
- package/dist/api/resources/embeddings/client/requests/EmbeddingsDeleteRequest.d.ts +6 -5
- package/dist/api/resources/embeddings/client/requests/index.d.ts +3 -3
- package/dist/api/resources/fetch/client/Client.d.ts +96 -7
- package/dist/api/resources/fetch/client/Client.js +288 -10
- package/dist/api/resources/{sources/client/requests/SourcesGetGraphRelationsByIdRequest.d.ts → fetch/client/requests/FetchGraphRelationsBySourceIdRequest.d.ts} +2 -3
- package/dist/api/resources/{sources/client/requests/SourcesGetAllRequest.d.ts → fetch/client/requests/FetchSourcesRequest.d.ts} +2 -3
- package/dist/api/resources/fetch/client/requests/ListSourcesByIdRequest.d.ts +18 -0
- package/dist/api/resources/{upload/client/requests/UploadUpdateTextRequest.d.ts → fetch/client/requests/SourceFetchRequest.d.ts} +9 -10
- package/dist/api/resources/fetch/client/requests/index.d.ts +4 -1
- package/dist/api/resources/index.d.ts +10 -13
- package/dist/api/resources/index.js +11 -14
- package/dist/api/resources/search/client/Client.d.ts +50 -26
- package/dist/api/resources/search/client/Client.js +65 -35
- package/dist/api/resources/search/client/requests/FullTextSearchRequest.d.ts +6 -4
- package/dist/api/resources/search/client/requests/{SearchRequest.d.ts → HybridSearchRequest.d.ts} +13 -9
- package/dist/api/resources/search/client/requests/QnASearchRequest.d.ts +39 -0
- package/dist/api/resources/search/client/requests/index.d.ts +2 -2
- package/dist/api/resources/sources/client/Client.d.ts +11 -61
- package/dist/api/resources/sources/client/Client.js +14 -191
- package/dist/api/resources/sources/client/requests/SourceDeleteRequest.d.ts +17 -0
- package/dist/api/resources/sources/client/requests/index.d.ts +1 -3
- package/dist/api/resources/tenant/client/Client.d.ts +54 -38
- package/dist/api/resources/tenant/client/Client.js +67 -114
- package/dist/api/resources/tenant/client/requests/TenantCreateRequest.d.ts +20 -0
- package/dist/api/resources/tenant/client/requests/TenantStatsRequest.d.ts +1 -4
- package/dist/api/resources/tenant/client/requests/index.d.ts +1 -2
- package/dist/api/resources/upload/client/Client.d.ts +54 -428
- package/dist/api/resources/upload/client/Client.js +97 -1417
- package/dist/api/resources/upload/client/requests/{UploadUploadMarkdownRequest.d.ts → BodyAddMemoryMemoriesAddMemoryPost.d.ts} +7 -7
- package/dist/api/resources/upload/client/requests/BodyUploadAppIngestionUploadAppPost.d.ts +31 -0
- package/dist/api/resources/upload/client/requests/BodyUploadDocumentIngestionUploadDocumentPost.d.ts +22 -0
- package/dist/api/resources/upload/client/requests/UploadDeleteMemoryRequest.d.ts +18 -0
- package/dist/api/resources/upload/client/requests/UploadVerifyProcessingRequest.d.ts +1 -2
- package/dist/api/resources/upload/client/requests/index.d.ts +4 -16
- package/dist/api/types/AddMemoryResponse.d.ts +17 -0
- package/dist/api/types/ApiKeyInfo.d.ts +17 -0
- package/dist/api/types/AppSourcesUploadData.d.ts +10 -4
- package/dist/api/types/CollectionStats.d.ts +9 -0
- package/dist/api/types/CustomPropertyDefinition.d.ts +38 -0
- package/dist/api/types/DashboardApisResponse.d.ts +12 -0
- package/dist/api/types/DashboardSourcesResponse.d.ts +12 -0
- package/dist/api/types/DashboardTenantsResponse.d.ts +12 -0
- package/dist/api/types/DeleteResult.d.ts +14 -0
- package/dist/api/types/DeleteUserMemoryResponse.d.ts +1 -1
- package/dist/api/types/Entity.d.ts +2 -2
- package/dist/api/types/FetchMode.d.ts +12 -0
- package/dist/api/types/FetchMode.js +11 -0
- package/dist/api/types/GraphContext.d.ts +12 -0
- package/dist/api/types/Infra.d.ts +8 -0
- package/dist/api/types/InsertResult.d.ts +16 -0
- package/dist/api/types/MemoryItem.d.ts +41 -0
- package/dist/api/types/MemoryResultItem.d.ts +19 -0
- package/dist/api/types/MilvusDataType.d.ts +21 -0
- package/dist/api/types/MilvusDataType.js +20 -0
- package/dist/api/types/PathTriplet.d.ts +9 -0
- package/dist/api/types/ProcessingStatus.d.ts +16 -2
- package/dist/api/types/ProcessingStatus.js +12 -0
- package/dist/api/types/QnASearchResponse.d.ts +20 -0
- package/dist/api/types/RawEmbeddingDocument.d.ts +15 -0
- package/dist/api/types/RawEmbeddingSearchResult.d.ts +19 -0
- package/dist/api/types/RawEmbeddingVector.d.ts +12 -0
- package/dist/api/types/RelationEvidence.d.ts +8 -0
- package/dist/api/types/RetrievalResult.d.ts +11 -0
- package/dist/api/types/ScoredPathResponse.d.ts +11 -0
- package/dist/api/types/SearchMode.d.ts +11 -0
- package/dist/api/types/SearchMode.js +10 -0
- package/dist/api/types/SourceDeleteResponse.d.ts +14 -0
- package/dist/api/types/SourceDeleteResultItem.d.ts +14 -0
- package/dist/api/types/SourceFetchResponse.d.ts +26 -0
- package/dist/api/types/{GraphRelationsResponse.d.ts → SourceGraphRelationsResponse.d.ts} +2 -2
- package/dist/api/types/SourceListResponse.d.ts +11 -0
- package/dist/api/types/SourceModel.d.ts +5 -1
- package/dist/api/types/SourceStatus.d.ts +10 -0
- package/dist/api/types/SourceStatus.js +12 -0
- package/dist/api/types/SourceUploadResponse.d.ts +14 -0
- package/dist/api/types/SourceUploadResultItem.d.ts +14 -0
- package/dist/api/types/SupportedLlmProviders.d.ts +11 -0
- package/dist/api/types/SupportedLlmProviders.js +13 -0
- package/dist/api/types/TenantCreateResponse.d.ts +14 -0
- package/dist/api/types/TenantInfo.d.ts +11 -0
- package/dist/api/types/TenantMetadataSchemaInfo.d.ts +14 -0
- package/dist/api/types/TenantStatsResponse.d.ts +14 -0
- package/dist/api/types/{TripleWithEvidence.d.ts → TripletWithEvidence.d.ts} +1 -1
- package/dist/api/types/UserAssistantPair.d.ts +3 -0
- package/dist/api/types/{SearchChunk.d.ts → VectorStoreChunk.d.ts} +3 -6
- package/dist/api/types/index.d.ts +38 -31
- package/dist/api/types/index.js +38 -31
- package/package.json +30 -33
- package/dist/api/resources/document/client/Client.d.ts +0 -59
- package/dist/api/resources/document/client/Client.js +0 -132
- package/dist/api/resources/document/client/index.d.ts +0 -1
- package/dist/api/resources/embeddings/client/requests/EmbeddingsCreateCollectionRequest.d.ts +0 -13
- package/dist/api/resources/embeddings/client/requests/EmbeddingsSearchRequest.d.ts +0 -18
- package/dist/api/resources/embeddings/client/requests/GetEmbeddingsBasedOnChunkIdsRequest.d.ts +0 -18
- package/dist/api/resources/fetch/client/requests/FetchContentRequest.d.ts +0 -18
- package/dist/api/resources/search/client/requests/QnARequest.d.ts +0 -47
- package/dist/api/resources/sources/client/requests/SourceBodyParams.d.ts +0 -18
- package/dist/api/resources/tenant/client/requests/TenantDeleteSubTenantRequest.d.ts +0 -14
- package/dist/api/resources/tenant/client/requests/TenantGetSubTenantIdsRequest.d.ts +0 -12
- package/dist/api/resources/upload/client/requests/BodyBatchUpdateUploadBatchUpdatePatch.d.ts +0 -37
- package/dist/api/resources/upload/client/requests/BodyBatchUploadUploadBatchUploadPost.d.ts +0 -37
- package/dist/api/resources/upload/client/requests/BodyUpdateFileUploadUpdateDocumentPatch.d.ts +0 -38
- package/dist/api/resources/upload/client/requests/BodyUploadFilesUploadUploadDocumentPost.d.ts +0 -37
- package/dist/api/resources/upload/client/requests/EmbeddingsUpdateRequest.d.ts +0 -18
- package/dist/api/resources/upload/client/requests/EmbeddingsUploadRequest.d.ts +0 -21
- package/dist/api/resources/upload/client/requests/UploadBatchScrapeWebpageRequest.d.ts +0 -22
- package/dist/api/resources/upload/client/requests/UploadBatchUploadMarkdownRequest.d.ts +0 -22
- package/dist/api/resources/upload/client/requests/UploadBatchUploadTextRequest.d.ts +0 -22
- package/dist/api/resources/upload/client/requests/UploadScrapeWebpageRequest.d.ts +0 -25
- package/dist/api/resources/upload/client/requests/UploadUpdateMarkdownRequest.d.ts +0 -24
- package/dist/api/resources/upload/client/requests/UploadUpdateWebpageRequest.d.ts +0 -25
- package/dist/api/resources/upload/client/requests/UploadUploadAppSourcesRequest.d.ts +0 -20
- package/dist/api/resources/upload/client/requests/UploadUploadTextRequest.d.ts +0 -21
- package/dist/api/resources/user/client/Client.d.ts +0 -60
- package/dist/api/resources/user/client/Client.js +0 -152
- package/dist/api/resources/user/client/requests/BodyCreateTenantUserCreateTenantPost.d.ts +0 -15
- package/dist/api/resources/user/client/requests/index.d.ts +0 -1
- package/dist/api/resources/user/client/requests/index.js +0 -2
- package/dist/api/resources/user/index.d.ts +0 -1
- package/dist/api/resources/user/index.js +0 -17
- package/dist/api/resources/userMemory/client/Client.d.ts +0 -150
- package/dist/api/resources/userMemory/client/index.d.ts +0 -2
- package/dist/api/resources/userMemory/client/index.js +0 -17
- package/dist/api/resources/userMemory/client/requests/AddUserMemoryRequest.d.ts +0 -27
- package/dist/api/resources/userMemory/client/requests/RetrieveUserMemoryRequest.d.ts +0 -24
- package/dist/api/resources/userMemory/client/requests/UserMemoryDeleteUserMemoryRequest.d.ts +0 -19
- package/dist/api/resources/userMemory/client/requests/UserMemoryListUserMemoriesRequest.d.ts +0 -16
- package/dist/api/resources/userMemory/client/requests/index.d.ts +0 -4
- package/dist/api/resources/userMemory/client/requests/index.js +0 -2
- package/dist/api/resources/userMemory/index.d.ts +0 -1
- package/dist/api/resources/userMemory/index.js +0 -17
- package/dist/api/types/AddUserMemoryResponse.d.ts +0 -16
- package/dist/api/types/BatchUploadData.d.ts +0 -11
- package/dist/api/types/BodyScrapeWebpageUploadScrapeWebpagePost.d.ts +0 -5
- package/dist/api/types/BodyUpdateScrapeJobUploadUpdateWebpagePatch.d.ts +0 -5
- package/dist/api/types/DeleteMemoryRequest.d.ts +0 -11
- package/dist/api/types/DeleteSources.d.ts +0 -7
- package/dist/api/types/DeleteSubTenantData.d.ts +0 -15
- package/dist/api/types/EmbeddingsCreateCollectionData.d.ts +0 -13
- package/dist/api/types/EmbeddingsDeleteData.d.ts +0 -13
- package/dist/api/types/EmbeddingsGetData.d.ts +0 -13
- package/dist/api/types/EmbeddingsSearchData.d.ts +0 -13
- package/dist/api/types/ExtendedContext.d.ts +0 -8
- package/dist/api/types/FetchContentData.d.ts +0 -13
- package/dist/api/types/FileUploadResult.d.ts +0 -9
- package/dist/api/types/ListSourcesResponse.d.ts +0 -12
- package/dist/api/types/ListUserMemoriesResponse.d.ts +0 -13
- package/dist/api/types/MarkdownUploadRequest.d.ts +0 -22
- package/dist/api/types/RelatedChunk.d.ts +0 -9
- package/dist/api/types/RelatedChunk.js +0 -5
- package/dist/api/types/Relations.d.ts +0 -9
- package/dist/api/types/Relations.js +0 -5
- package/dist/api/types/RetrieveResponse.d.ts +0 -12
- package/dist/api/types/RetrieveResponse.js +0 -5
- package/dist/api/types/RetrieveUserMemoryResponse.d.ts +0 -15
- package/dist/api/types/RetrieveUserMemoryResponse.js +0 -5
- package/dist/api/types/SearchChunk.js +0 -5
- package/dist/api/types/SingleUploadData.d.ts +0 -10
- package/dist/api/types/SingleUploadData.js +0 -5
- package/dist/api/types/Source.d.ts +0 -19
- package/dist/api/types/Source.js +0 -5
- package/dist/api/types/SubTenantIdsData.d.ts +0 -17
- package/dist/api/types/SubTenantIdsData.js +0 -5
- package/dist/api/types/TenantCreateData.d.ts +0 -13
- package/dist/api/types/TenantCreateData.js +0 -5
- package/dist/api/types/TenantStats.d.ts +0 -15
- package/dist/api/types/TenantStats.js +0 -5
- package/dist/api/types/TripleWithEvidence.js +0 -5
- package/dist/api/types/UserMemory.d.ts +0 -12
- package/dist/api/types/UserMemory.js +0 -5
- package/dist/api/types/WebpageScrapeRequest.d.ts +0 -9
- package/dist/api/types/WebpageScrapeRequest.js +0 -5
- /package/dist/api/resources/{user → dashboard}/client/index.d.ts +0 -0
- /package/dist/api/resources/{user → dashboard}/client/index.js +0 -0
- /package/dist/api/resources/{embeddings/client/requests/EmbeddingsCreateCollectionRequest.js → dashboard/client/requests/CreateUserDashboardUserCreateUserPostRequest.js} +0 -0
- /package/dist/api/resources/{embeddings/client/requests/EmbeddingsSearchRequest.js → dashboard/client/requests/ListSourcesDashboardSourcesGetRequest.js} +0 -0
- /package/dist/api/resources/{document/client → dashboard/client/requests}/index.js +0 -0
- /package/dist/api/resources/{document → dashboard}/index.d.ts +0 -0
- /package/dist/api/resources/{document → dashboard}/index.js +0 -0
- /package/dist/api/resources/embeddings/client/requests/{GetEmbeddingsBasedOnChunkIdsRequest.js → BodyFilterRawEmbeddingsEndpointEmbeddingsFilterRawEmbeddingsPost.js} +0 -0
- /package/dist/api/resources/{fetch/client/requests/FetchContentRequest.js → embeddings/client/requests/BodyInsertRawEmbeddingsEndpointEmbeddingsInsertRawEmbeddingsPost.js} +0 -0
- /package/dist/api/resources/{search/client/requests/QnARequest.js → embeddings/client/requests/BodySearchRawEmbeddingsEndpointEmbeddingsSearchRawEmbeddingsPost.js} +0 -0
- /package/dist/api/resources/{search/client/requests/SearchRequest.js → fetch/client/requests/FetchGraphRelationsBySourceIdRequest.js} +0 -0
- /package/dist/api/resources/{sources/client/requests/SourceBodyParams.js → fetch/client/requests/FetchSourcesRequest.js} +0 -0
- /package/dist/api/resources/{sources/client/requests/SourcesGetAllRequest.js → fetch/client/requests/ListSourcesByIdRequest.js} +0 -0
- /package/dist/api/resources/{sources/client/requests/SourcesGetGraphRelationsByIdRequest.js → fetch/client/requests/SourceFetchRequest.js} +0 -0
- /package/dist/api/resources/{tenant/client/requests/TenantDeleteSubTenantRequest.js → search/client/requests/HybridSearchRequest.js} +0 -0
- /package/dist/api/resources/{tenant/client/requests/TenantGetSubTenantIdsRequest.js → search/client/requests/QnASearchRequest.js} +0 -0
- /package/dist/api/resources/{upload/client/requests/BodyBatchUpdateUploadBatchUpdatePatch.js → sources/client/requests/SourceDeleteRequest.js} +0 -0
- /package/dist/api/resources/{upload/client/requests/BodyBatchUploadUploadBatchUploadPost.js → tenant/client/requests/TenantCreateRequest.js} +0 -0
- /package/dist/api/resources/upload/client/requests/{BodyUpdateFileUploadUpdateDocumentPatch.js → BodyAddMemoryMemoriesAddMemoryPost.js} +0 -0
- /package/dist/api/resources/upload/client/requests/{BodyUploadFilesUploadUploadDocumentPost.js → BodyUploadAppIngestionUploadAppPost.js} +0 -0
- /package/dist/api/resources/upload/client/requests/{EmbeddingsUpdateRequest.js → BodyUploadDocumentIngestionUploadDocumentPost.js} +0 -0
- /package/dist/api/resources/upload/client/requests/{EmbeddingsUploadRequest.js → UploadDeleteMemoryRequest.js} +0 -0
- /package/dist/api/{resources/upload/client/requests/UploadBatchScrapeWebpageRequest.js → types/AddMemoryResponse.js} +0 -0
- /package/dist/api/{resources/upload/client/requests/UploadBatchUploadMarkdownRequest.js → types/ApiKeyInfo.js} +0 -0
- /package/dist/api/{resources/upload/client/requests/UploadBatchUploadTextRequest.js → types/CollectionStats.js} +0 -0
- /package/dist/api/{resources/upload/client/requests/UploadScrapeWebpageRequest.js → types/CustomPropertyDefinition.js} +0 -0
- /package/dist/api/{resources/upload/client/requests/UploadUpdateMarkdownRequest.js → types/DashboardApisResponse.js} +0 -0
- /package/dist/api/{resources/upload/client/requests/UploadUpdateTextRequest.js → types/DashboardSourcesResponse.js} +0 -0
- /package/dist/api/{resources/upload/client/requests/UploadUpdateWebpageRequest.js → types/DashboardTenantsResponse.js} +0 -0
- /package/dist/api/{resources/upload/client/requests/UploadUploadAppSourcesRequest.js → types/DeleteResult.js} +0 -0
- /package/dist/api/{resources/upload/client/requests/UploadUploadMarkdownRequest.js → types/GraphContext.js} +0 -0
- /package/dist/api/{resources/upload/client/requests/UploadUploadTextRequest.js → types/Infra.js} +0 -0
- /package/dist/api/{resources/user/client/requests/BodyCreateTenantUserCreateTenantPost.js → types/InsertResult.js} +0 -0
- /package/dist/api/{resources/userMemory/client/requests/AddUserMemoryRequest.js → types/MemoryItem.js} +0 -0
- /package/dist/api/{resources/userMemory/client/requests/RetrieveUserMemoryRequest.js → types/MemoryResultItem.js} +0 -0
- /package/dist/api/{resources/userMemory/client/requests/UserMemoryDeleteUserMemoryRequest.js → types/PathTriplet.js} +0 -0
- /package/dist/api/{resources/userMemory/client/requests/UserMemoryListUserMemoriesRequest.js → types/QnASearchResponse.js} +0 -0
- /package/dist/api/types/{AddUserMemoryResponse.js → RawEmbeddingDocument.js} +0 -0
- /package/dist/api/types/{BatchUploadData.js → RawEmbeddingSearchResult.js} +0 -0
- /package/dist/api/types/{BodyScrapeWebpageUploadScrapeWebpagePost.js → RawEmbeddingVector.js} +0 -0
- /package/dist/api/types/{BodyUpdateScrapeJobUploadUpdateWebpagePatch.js → RetrievalResult.js} +0 -0
- /package/dist/api/types/{DeleteMemoryRequest.js → ScoredPathResponse.js} +0 -0
- /package/dist/api/types/{DeleteSources.js → SourceDeleteResponse.js} +0 -0
- /package/dist/api/types/{DeleteSubTenantData.js → SourceDeleteResultItem.js} +0 -0
- /package/dist/api/types/{EmbeddingsCreateCollectionData.js → SourceFetchResponse.js} +0 -0
- /package/dist/api/types/{EmbeddingsDeleteData.js → SourceGraphRelationsResponse.js} +0 -0
- /package/dist/api/types/{EmbeddingsGetData.js → SourceListResponse.js} +0 -0
- /package/dist/api/types/{EmbeddingsSearchData.js → SourceUploadResponse.js} +0 -0
- /package/dist/api/types/{ExtendedContext.js → SourceUploadResultItem.js} +0 -0
- /package/dist/api/types/{FetchContentData.js → TenantCreateResponse.js} +0 -0
- /package/dist/api/types/{FileUploadResult.js → TenantInfo.js} +0 -0
- /package/dist/api/types/{GraphRelationsResponse.js → TenantMetadataSchemaInfo.js} +0 -0
- /package/dist/api/types/{ListSourcesResponse.js → TenantStatsResponse.js} +0 -0
- /package/dist/api/types/{ListUserMemoriesResponse.js → TripletWithEvidence.js} +0 -0
- /package/dist/api/types/{MarkdownUploadRequest.js → VectorStoreChunk.js} +0 -0
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
-
if (mod && mod.__esModule) return mod;
|
|
23
|
-
var result = {};
|
|
24
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
-
__setModuleDefault(result, mod);
|
|
26
|
-
return result;
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.Document = void 0;
|
|
30
|
-
const environments = __importStar(require("../../../../environments.js"));
|
|
31
|
-
const core = __importStar(require("../../../../core/index.js"));
|
|
32
|
-
const CortexAI = __importStar(require("../../../index.js"));
|
|
33
|
-
const headers_js_1 = require("../../../../core/headers.js");
|
|
34
|
-
const errors = __importStar(require("../../../../errors/index.js"));
|
|
35
|
-
class Document {
|
|
36
|
-
constructor(_options = {}) {
|
|
37
|
-
this._options = _options;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Remove documents and content from your knowledge base.
|
|
41
|
-
*
|
|
42
|
-
* This endpoint permanently deletes the specified sources from your knowledge base. Once deleted, the content will no longer be available for search or retrieval.
|
|
43
|
-
*
|
|
44
|
-
* Use this carefully as the action cannot be undone. The system will confirm successful deletion of each source ID you specify.
|
|
45
|
-
*
|
|
46
|
-
* @param {CortexAI.DeleteMemoryRequest} request
|
|
47
|
-
* @param {Document.RequestOptions} requestOptions - Request-specific configuration.
|
|
48
|
-
*
|
|
49
|
-
* @throws {@link CortexAI.BadRequestError}
|
|
50
|
-
* @throws {@link CortexAI.UnauthorizedError}
|
|
51
|
-
* @throws {@link CortexAI.ForbiddenError}
|
|
52
|
-
* @throws {@link CortexAI.NotFoundError}
|
|
53
|
-
* @throws {@link CortexAI.UnprocessableEntityError}
|
|
54
|
-
* @throws {@link CortexAI.InternalServerError}
|
|
55
|
-
* @throws {@link CortexAI.ServiceUnavailableError}
|
|
56
|
-
*
|
|
57
|
-
* @example
|
|
58
|
-
* await client.document.delete({
|
|
59
|
-
* tenant_id: "tenant_1234",
|
|
60
|
-
* source_ids: ["CortexDoc1234", "CortexDoc4567"]
|
|
61
|
-
* })
|
|
62
|
-
*/
|
|
63
|
-
delete(request, requestOptions) {
|
|
64
|
-
return core.HttpResponsePromise.fromPromise(this.__delete(request, requestOptions));
|
|
65
|
-
}
|
|
66
|
-
async __delete(request, requestOptions) {
|
|
67
|
-
var _a, _b, _c;
|
|
68
|
-
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);
|
|
69
|
-
const _response = await core.fetcher({
|
|
70
|
-
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, "document/delete"),
|
|
71
|
-
method: "DELETE",
|
|
72
|
-
headers: _headers,
|
|
73
|
-
contentType: "application/json",
|
|
74
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
75
|
-
requestType: "json",
|
|
76
|
-
body: request,
|
|
77
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
78
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
79
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
80
|
-
});
|
|
81
|
-
if (_response.ok) {
|
|
82
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
83
|
-
}
|
|
84
|
-
if (_response.error.reason === "status-code") {
|
|
85
|
-
switch (_response.error.statusCode) {
|
|
86
|
-
case 400:
|
|
87
|
-
throw new CortexAI.BadRequestError(_response.error.body, _response.rawResponse);
|
|
88
|
-
case 401:
|
|
89
|
-
throw new CortexAI.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
90
|
-
case 403:
|
|
91
|
-
throw new CortexAI.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
92
|
-
case 404:
|
|
93
|
-
throw new CortexAI.NotFoundError(_response.error.body, _response.rawResponse);
|
|
94
|
-
case 422:
|
|
95
|
-
throw new CortexAI.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
96
|
-
case 500:
|
|
97
|
-
throw new CortexAI.InternalServerError(_response.error.body, _response.rawResponse);
|
|
98
|
-
case 503:
|
|
99
|
-
throw new CortexAI.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
100
|
-
default:
|
|
101
|
-
throw new errors.CortexAIError({
|
|
102
|
-
statusCode: _response.error.statusCode,
|
|
103
|
-
body: _response.error.body,
|
|
104
|
-
rawResponse: _response.rawResponse,
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
switch (_response.error.reason) {
|
|
109
|
-
case "non-json":
|
|
110
|
-
throw new errors.CortexAIError({
|
|
111
|
-
statusCode: _response.error.statusCode,
|
|
112
|
-
body: _response.error.rawBody,
|
|
113
|
-
rawResponse: _response.rawResponse,
|
|
114
|
-
});
|
|
115
|
-
case "timeout":
|
|
116
|
-
throw new errors.CortexAITimeoutError("Timeout exceeded when calling DELETE /document/delete.");
|
|
117
|
-
case "unknown":
|
|
118
|
-
throw new errors.CortexAIError({
|
|
119
|
-
message: _response.error.errorMessage,
|
|
120
|
-
rawResponse: _response.rawResponse,
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
async _getAuthorizationHeader() {
|
|
125
|
-
const bearer = await core.Supplier.get(this._options.token);
|
|
126
|
-
if (bearer != null) {
|
|
127
|
-
return `Bearer ${bearer}`;
|
|
128
|
-
}
|
|
129
|
-
return undefined;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
exports.Document = Document;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/api/resources/embeddings/client/requests/EmbeddingsCreateCollectionRequest.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* @example
|
|
6
|
-
* {
|
|
7
|
-
* tenant_id: "tenant_1234"
|
|
8
|
-
* }
|
|
9
|
-
*/
|
|
10
|
-
export interface EmbeddingsCreateCollectionRequest {
|
|
11
|
-
/** Unique identifier for the tenant/organization */
|
|
12
|
-
tenant_id: string;
|
|
13
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* @example
|
|
6
|
-
* {
|
|
7
|
-
* tenant_id: "tenant_1234"
|
|
8
|
-
* }
|
|
9
|
-
*/
|
|
10
|
-
export interface EmbeddingsSearchRequest {
|
|
11
|
-
/** Unique identifier for the tenant/organization */
|
|
12
|
-
tenant_id: string;
|
|
13
|
-
/** The embedding vector for search */
|
|
14
|
-
embeddings?: number[];
|
|
15
|
-
/** Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used. */
|
|
16
|
-
sub_tenant_id?: string;
|
|
17
|
-
max_chunks?: number;
|
|
18
|
-
}
|
package/dist/api/resources/embeddings/client/requests/GetEmbeddingsBasedOnChunkIdsRequest.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* @example
|
|
6
|
-
* {
|
|
7
|
-
* chunk_ids: ["CortexEmbeddings123_0", "CortexEmbeddings123_1"],
|
|
8
|
-
* tenant_id: "tenant_1234"
|
|
9
|
-
* }
|
|
10
|
-
*/
|
|
11
|
-
export interface GetEmbeddingsBasedOnChunkIdsRequest {
|
|
12
|
-
/** The chunk IDs of the source you want to get embeddings for */
|
|
13
|
-
chunk_ids: string[];
|
|
14
|
-
/** Unique identifier for the tenant/organization */
|
|
15
|
-
tenant_id: string;
|
|
16
|
-
/** Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used. */
|
|
17
|
-
sub_tenant_id?: string;
|
|
18
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* @example
|
|
6
|
-
* {
|
|
7
|
-
* file_id: "CortexDoc1234",
|
|
8
|
-
* file_type: "<file_type>",
|
|
9
|
-
* tenant_id: "tenant_1234"
|
|
10
|
-
* }
|
|
11
|
-
*/
|
|
12
|
-
export interface FetchContentRequest {
|
|
13
|
-
file_id: string;
|
|
14
|
-
file_type: string;
|
|
15
|
-
tenant_id: string;
|
|
16
|
-
return_content?: boolean;
|
|
17
|
-
sub_tenant_id?: string;
|
|
18
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* @example
|
|
6
|
-
* {
|
|
7
|
-
* question: "What is Cortex AI",
|
|
8
|
-
* session_id: "chat_session_1234",
|
|
9
|
-
* tenant_id: "tenant_1234"
|
|
10
|
-
* }
|
|
11
|
-
*/
|
|
12
|
-
export interface QnARequest {
|
|
13
|
-
/** The question to be answered */
|
|
14
|
-
question: string;
|
|
15
|
-
/** Unique identifier for the conversation session. Keep it same when the current question refers to a previous answer or question */
|
|
16
|
-
session_id: string;
|
|
17
|
-
/** Identifier for the tenant/organization */
|
|
18
|
-
tenant_id: string;
|
|
19
|
-
/** List of context strings to provide additional information */
|
|
20
|
-
context_list?: string[];
|
|
21
|
-
/** List of search modes to use for finding relevant information */
|
|
22
|
-
search_modes?: string[];
|
|
23
|
-
/** Identifier for sub-tenant within the tenant */
|
|
24
|
-
sub_tenant_id?: string;
|
|
25
|
-
/** Whether to return text chunks in the response along with final LLM generated answer */
|
|
26
|
-
highlight_chunks?: boolean;
|
|
27
|
-
/** Whether to stream the response */
|
|
28
|
-
stream?: boolean;
|
|
29
|
-
/** Closer to 0.0 means a exact keyword search will be performed, closer to 1.0 means semantics of the search will be considered. In most cases, you wont have to toggle it yourself. */
|
|
30
|
-
search_alpha?: number;
|
|
31
|
-
/** Bias towards more recent information (0.0 to 1.0) */
|
|
32
|
-
recency_bias?: number;
|
|
33
|
-
/** Whether to use AI for generating responses */
|
|
34
|
-
ai_generation?: boolean;
|
|
35
|
-
/** Number of top results to return */
|
|
36
|
-
top_n?: number;
|
|
37
|
-
/** Name of the user making the request. This helps LLM to know the user's name if semantics around the username are involved in query. Its generally a good practice to include it possible. */
|
|
38
|
-
user_name?: string;
|
|
39
|
-
/** Custom instructions for the AI response to add to our proprietary prompt. This can be used to provide additional context or instructions for the LLM to follow so that the answers are tailored towards your application style */
|
|
40
|
-
user_instructions?: string;
|
|
41
|
-
/** Enable advanced multi-step reasoning for complex queries. When enabled, the AI will automatically break down complex questions into multiple research steps to provide more comprehensive and accurate answers. */
|
|
42
|
-
multi_step_reasoning?: boolean;
|
|
43
|
-
/** Enable intelligent agent routing to automatically select the most suitable AI agent for your specific query type. Different agents are optimized for various use cases like social media, code, conversations, general knowledge, etc. */
|
|
44
|
-
auto_agent_routing?: boolean;
|
|
45
|
-
/** Additional metadata for the request */
|
|
46
|
-
metadata?: Record<string, unknown>;
|
|
47
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* @example
|
|
6
|
-
* {
|
|
7
|
-
* tenant_id: "tenant_1234",
|
|
8
|
-
* source_ids: ["CortexDoc1234", "CortexDoc4567"]
|
|
9
|
-
* }
|
|
10
|
-
*/
|
|
11
|
-
export interface SourceBodyParams {
|
|
12
|
-
/** Unique identifier for the tenant/organization */
|
|
13
|
-
tenant_id: string;
|
|
14
|
-
/** List of source IDs to fetch */
|
|
15
|
-
source_ids: string[];
|
|
16
|
-
/** Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used. */
|
|
17
|
-
sub_tenant_id?: string;
|
|
18
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* @example
|
|
6
|
-
* {
|
|
7
|
-
* tenant_id: "tenant_1234",
|
|
8
|
-
* sub_tenant_id: "sub_tenant_4567"
|
|
9
|
-
* }
|
|
10
|
-
*/
|
|
11
|
-
export interface TenantDeleteSubTenantRequest {
|
|
12
|
-
tenant_id: string;
|
|
13
|
-
sub_tenant_id: string;
|
|
14
|
-
}
|
package/dist/api/resources/upload/client/requests/BodyBatchUpdateUploadBatchUpdatePatch.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as core from "../../../../../core/index.js";
|
|
5
|
-
/**
|
|
6
|
-
* @example
|
|
7
|
-
* {
|
|
8
|
-
* files: [fs.createReadStream("/path/to/your/file")],
|
|
9
|
-
* tenant_id: "tenant_1234",
|
|
10
|
-
* sub_tenant_id: "sub_tenant_4567"
|
|
11
|
-
* }
|
|
12
|
-
*/
|
|
13
|
-
export interface BodyBatchUpdateUploadBatchUpdatePatch {
|
|
14
|
-
/** Unique identifier for the tenant/organization */
|
|
15
|
-
tenant_id: string;
|
|
16
|
-
/** Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used. */
|
|
17
|
-
sub_tenant_id?: string;
|
|
18
|
-
/** The document file to upload (e.g., PDF, DOCX, TXT) */
|
|
19
|
-
files: core.file.Uploadable.FileLike[];
|
|
20
|
-
/** List of source IDs corresponding to the files being updated */
|
|
21
|
-
source_ids?: string[];
|
|
22
|
-
/**
|
|
23
|
-
* JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
|
|
24
|
-
*
|
|
25
|
-
* Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
|
|
26
|
-
*
|
|
27
|
-
*/
|
|
28
|
-
tenant_metadata?: string;
|
|
29
|
-
/**
|
|
30
|
-
* JSON string containing document-specific metadata (e.g., title, author, file_id). If file_id is not provided, the system will generate an ID automatically.
|
|
31
|
-
*
|
|
32
|
-
* Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*/
|
|
36
|
-
document_metadata?: string;
|
|
37
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as core from "../../../../../core/index.js";
|
|
5
|
-
/**
|
|
6
|
-
* @example
|
|
7
|
-
* {
|
|
8
|
-
* files: [fs.createReadStream("/path/to/your/file")],
|
|
9
|
-
* tenant_id: "tenant_1234",
|
|
10
|
-
* sub_tenant_id: "sub_tenant_4567"
|
|
11
|
-
* }
|
|
12
|
-
*/
|
|
13
|
-
export interface BodyBatchUploadUploadBatchUploadPost {
|
|
14
|
-
/** Unique identifier for the tenant/organization */
|
|
15
|
-
tenant_id: string;
|
|
16
|
-
/** Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used. */
|
|
17
|
-
sub_tenant_id?: string;
|
|
18
|
-
/** The document file to upload (e.g., PDF, DOCX, TXT) */
|
|
19
|
-
files: core.file.Uploadable.FileLike[];
|
|
20
|
-
/** Optional JSON string array of file IDs for the uploaded content. If not provided or empty, will be generated automatically. */
|
|
21
|
-
file_ids?: string;
|
|
22
|
-
/**
|
|
23
|
-
* JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
|
|
24
|
-
*
|
|
25
|
-
* Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
|
|
26
|
-
*
|
|
27
|
-
*/
|
|
28
|
-
tenant_metadata?: string;
|
|
29
|
-
/**
|
|
30
|
-
* JSON string containing document-specific metadata (e.g., title, author, file_id). If file_id is not provided, the system will generate an ID automatically.
|
|
31
|
-
*
|
|
32
|
-
* Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*/
|
|
36
|
-
document_metadata?: string;
|
|
37
|
-
}
|
package/dist/api/resources/upload/client/requests/BodyUpdateFileUploadUpdateDocumentPatch.d.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as core from "../../../../../core/index.js";
|
|
5
|
-
/**
|
|
6
|
-
* @example
|
|
7
|
-
* {
|
|
8
|
-
* file: fs.createReadStream("/path/to/your/file"),
|
|
9
|
-
* source_id: "CortexDoc1234",
|
|
10
|
-
* tenant_id: "tenant_1234",
|
|
11
|
-
* sub_tenant_id: "sub_tenant_4567"
|
|
12
|
-
* }
|
|
13
|
-
*/
|
|
14
|
-
export interface BodyUpdateFileUploadUpdateDocumentPatch {
|
|
15
|
-
/** The source ID of the document to update */
|
|
16
|
-
source_id: string;
|
|
17
|
-
/** Unique identifier for the tenant/organization */
|
|
18
|
-
tenant_id: string;
|
|
19
|
-
/** Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used. */
|
|
20
|
-
sub_tenant_id?: string;
|
|
21
|
-
/** The document file to upload (e.g., PDF, DOCX, TXT) */
|
|
22
|
-
file: core.file.Uploadable.FileLike;
|
|
23
|
-
/**
|
|
24
|
-
* JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
|
|
25
|
-
*
|
|
26
|
-
* Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
|
|
27
|
-
*
|
|
28
|
-
*/
|
|
29
|
-
tenant_metadata?: string;
|
|
30
|
-
/**
|
|
31
|
-
* JSON string containing document-specific metadata (e.g., title, author, file_id). If file_id is not provided, the system will generate an ID automatically.
|
|
32
|
-
*
|
|
33
|
-
* Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*/
|
|
37
|
-
document_metadata?: string;
|
|
38
|
-
}
|
package/dist/api/resources/upload/client/requests/BodyUploadFilesUploadUploadDocumentPost.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as core from "../../../../../core/index.js";
|
|
5
|
-
/**
|
|
6
|
-
* @example
|
|
7
|
-
* {
|
|
8
|
-
* file: fs.createReadStream("/path/to/your/file"),
|
|
9
|
-
* tenant_id: "tenant_1234",
|
|
10
|
-
* sub_tenant_id: "sub_tenant_4567"
|
|
11
|
-
* }
|
|
12
|
-
*/
|
|
13
|
-
export interface BodyUploadFilesUploadUploadDocumentPost {
|
|
14
|
-
/** Unique identifier for the tenant/organization */
|
|
15
|
-
tenant_id: string;
|
|
16
|
-
/** Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used. */
|
|
17
|
-
sub_tenant_id?: string;
|
|
18
|
-
/** The document file to upload (e.g., PDF, DOCX, TXT) */
|
|
19
|
-
file: core.file.Uploadable.FileLike;
|
|
20
|
-
/** Optional file ID for the uploaded content. If not provided, will be generated automatically. */
|
|
21
|
-
file_id?: string;
|
|
22
|
-
/**
|
|
23
|
-
* JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
|
|
24
|
-
*
|
|
25
|
-
* Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
|
|
26
|
-
*
|
|
27
|
-
*/
|
|
28
|
-
tenant_metadata?: string;
|
|
29
|
-
/**
|
|
30
|
-
* JSON string containing document-specific metadata (e.g., title, author, file_id). If file_id is not provided, the system will generate an ID automatically.
|
|
31
|
-
*
|
|
32
|
-
* Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*/
|
|
36
|
-
document_metadata?: string;
|
|
37
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* @example
|
|
6
|
-
* {
|
|
7
|
-
* tenant_id: "tenant_1234",
|
|
8
|
-
* sub_tenant_id: "sub_tenant_4567"
|
|
9
|
-
* }
|
|
10
|
-
*/
|
|
11
|
-
export interface EmbeddingsUpdateRequest {
|
|
12
|
-
/** Unique identifier for the tenant/organization */
|
|
13
|
-
tenant_id: string;
|
|
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. */
|
|
15
|
-
sub_tenant_id?: string;
|
|
16
|
-
/** The embeddings of source you want to index */
|
|
17
|
-
embeddings?: Record<string, number[]>;
|
|
18
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* @example
|
|
6
|
-
* {
|
|
7
|
-
* tenant_id: "tenant_1234",
|
|
8
|
-
* sub_tenant_id: "sub_tenant_4567",
|
|
9
|
-
* embeddings: [[0.123413, 0.655367, 0.987654, 0.123456, 0.789012], [0.123413, 0.655367, 0.987654, 0.123456, 0.789012]]
|
|
10
|
-
* }
|
|
11
|
-
*/
|
|
12
|
-
export interface EmbeddingsUploadRequest {
|
|
13
|
-
/** Unique identifier for the tenant/organization */
|
|
14
|
-
tenant_id: string;
|
|
15
|
-
/** Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used. */
|
|
16
|
-
sub_tenant_id?: string;
|
|
17
|
-
/** The embeddings of source you want to index */
|
|
18
|
-
embeddings: number[][];
|
|
19
|
-
/** The Source ID of the target source you want to index */
|
|
20
|
-
file_id?: string;
|
|
21
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as CortexAI from "../../../../index.js";
|
|
5
|
-
/**
|
|
6
|
-
* @example
|
|
7
|
-
* {
|
|
8
|
-
* tenant_id: "tenant_1234",
|
|
9
|
-
* sub_tenant_id: "sub_tenant_4567",
|
|
10
|
-
* body: [{
|
|
11
|
-
* web_url: "https://www.usecortex.ai/"
|
|
12
|
-
* }]
|
|
13
|
-
* }
|
|
14
|
-
*/
|
|
15
|
-
export interface UploadBatchScrapeWebpageRequest {
|
|
16
|
-
/** Unique identifier for the tenant/organization */
|
|
17
|
-
tenant_id: string;
|
|
18
|
-
/** Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used. */
|
|
19
|
-
sub_tenant_id?: string;
|
|
20
|
-
/** List of webpages to scrape and index */
|
|
21
|
-
body: CortexAI.WebpageScrapeRequest[];
|
|
22
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as CortexAI from "../../../../index.js";
|
|
5
|
-
/**
|
|
6
|
-
* @example
|
|
7
|
-
* {
|
|
8
|
-
* tenant_id: "tenant_1234",
|
|
9
|
-
* sub_tenant_id: "sub_tenant_4567",
|
|
10
|
-
* body: [{
|
|
11
|
-
* content: "<content>"
|
|
12
|
-
* }]
|
|
13
|
-
* }
|
|
14
|
-
*/
|
|
15
|
-
export interface UploadBatchUploadMarkdownRequest {
|
|
16
|
-
/** Unique identifier for the tenant/organization */
|
|
17
|
-
tenant_id: string;
|
|
18
|
-
/** Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used. */
|
|
19
|
-
sub_tenant_id?: string;
|
|
20
|
-
/** List of markdown/text content to upload */
|
|
21
|
-
body: CortexAI.MarkdownUploadRequest[];
|
|
22
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as CortexAI from "../../../../index.js";
|
|
5
|
-
/**
|
|
6
|
-
* @example
|
|
7
|
-
* {
|
|
8
|
-
* tenant_id: "tenant_1234",
|
|
9
|
-
* sub_tenant_id: "sub_tenant_4567",
|
|
10
|
-
* body: [{
|
|
11
|
-
* content: "<content>"
|
|
12
|
-
* }]
|
|
13
|
-
* }
|
|
14
|
-
*/
|
|
15
|
-
export interface UploadBatchUploadTextRequest {
|
|
16
|
-
/** Unique identifier for the tenant/organization */
|
|
17
|
-
tenant_id: string;
|
|
18
|
-
/** Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used. */
|
|
19
|
-
sub_tenant_id?: string;
|
|
20
|
-
/** List of markdown/text content to upload */
|
|
21
|
-
body: CortexAI.MarkdownUploadRequest[];
|
|
22
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as CortexAI from "../../../../index.js";
|
|
5
|
-
/**
|
|
6
|
-
* @example
|
|
7
|
-
* {
|
|
8
|
-
* web_url: "https://www.usecortex.ai/",
|
|
9
|
-
* tenant_id: "tenant_1234",
|
|
10
|
-
* sub_tenant_id: "sub_tenant_4567",
|
|
11
|
-
* file_id: "CortexDoc1234",
|
|
12
|
-
* body: {}
|
|
13
|
-
* }
|
|
14
|
-
*/
|
|
15
|
-
export interface UploadScrapeWebpageRequest {
|
|
16
|
-
/** The URL of the webpage to scrape and index */
|
|
17
|
-
web_url: string;
|
|
18
|
-
/** Unique identifier for the tenant/organization */
|
|
19
|
-
tenant_id: string;
|
|
20
|
-
/** Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used. */
|
|
21
|
-
sub_tenant_id?: string;
|
|
22
|
-
/** Optional custom file ID for the scraped content. If not provided, a unique ID will be generated */
|
|
23
|
-
file_id?: string;
|
|
24
|
-
body: CortexAI.BodyScrapeWebpageUploadScrapeWebpagePost;
|
|
25
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as CortexAI from "../../../../index.js";
|
|
5
|
-
/**
|
|
6
|
-
* @example
|
|
7
|
-
* {
|
|
8
|
-
* source_id: "CortexDoc1234",
|
|
9
|
-
* tenant_id: "tenant_1234",
|
|
10
|
-
* sub_tenant_id: "sub_tenant_4567",
|
|
11
|
-
* body: {
|
|
12
|
-
* content: "<content>"
|
|
13
|
-
* }
|
|
14
|
-
* }
|
|
15
|
-
*/
|
|
16
|
-
export interface UploadUpdateMarkdownRequest {
|
|
17
|
-
/** The source ID of the document to update */
|
|
18
|
-
source_id: string;
|
|
19
|
-
/** Unique identifier for the tenant/organization */
|
|
20
|
-
tenant_id: string;
|
|
21
|
-
/** Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used. */
|
|
22
|
-
sub_tenant_id?: string;
|
|
23
|
-
body: CortexAI.MarkdownUploadRequest;
|
|
24
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as CortexAI from "../../../../index.js";
|
|
5
|
-
/**
|
|
6
|
-
* @example
|
|
7
|
-
* {
|
|
8
|
-
* web_url: "https://www.usecortex.ai/",
|
|
9
|
-
* source_id: "CortexDoc1234",
|
|
10
|
-
* tenant_id: "tenant_1234",
|
|
11
|
-
* sub_tenant_id: "sub_tenant_4567",
|
|
12
|
-
* body: {}
|
|
13
|
-
* }
|
|
14
|
-
*/
|
|
15
|
-
export interface UploadUpdateWebpageRequest {
|
|
16
|
-
/** The URL of the webpage to re-scrape */
|
|
17
|
-
web_url: string;
|
|
18
|
-
/** The file ID of the existing web scraping job to update */
|
|
19
|
-
source_id: string;
|
|
20
|
-
/** Unique identifier for the tenant/organization */
|
|
21
|
-
tenant_id: string;
|
|
22
|
-
/** Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used. */
|
|
23
|
-
sub_tenant_id?: string;
|
|
24
|
-
body: CortexAI.BodyUpdateScrapeJobUploadUpdateWebpagePatch;
|
|
25
|
-
}
|