@usecortex_ai/node 0.3.6 → 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 +1 -7
- 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 +13 -4
- package/dist/api/types/RetrievalResult.d.ts +11 -0
- package/dist/api/types/ScoredPathResponse.d.ts +4 -11
- 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} +4 -1
- package/dist/api/types/UserAssistantPair.d.ts +3 -0
- package/dist/api/types/{SearchChunk.d.ts → VectorStoreChunk.d.ts} +3 -8
- package/dist/api/types/index.d.ts +36 -33
- package/dist/api/types/index.js +36 -33
- 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/ChunkGraphRelationsResponse.d.ts +0 -13
- 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 -5
- 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/ListSourcesResponse.js +0 -5
- package/dist/api/types/ListUserMemoriesResponse.d.ts +0 -13
- package/dist/api/types/ListUserMemoriesResponse.js +0 -5
- package/dist/api/types/MarkdownUploadRequest.d.ts +0 -22
- package/dist/api/types/MarkdownUploadRequest.js +0 -5
- 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/ScoredTripletResponse.d.ts +0 -17
- package/dist/api/types/ScoredTripletResponse.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/QnASearchResponse.js} +0 -0
- /package/dist/api/{resources/userMemory/client/requests/UserMemoryListUserMemoriesRequest.js → types/RawEmbeddingDocument.js} +0 -0
- /package/dist/api/types/{AddUserMemoryResponse.js → RawEmbeddingSearchResult.js} +0 -0
- /package/dist/api/types/{BatchUploadData.js → RawEmbeddingVector.js} +0 -0
- /package/dist/api/types/{BodyScrapeWebpageUploadScrapeWebpagePost.js → RetrievalResult.js} +0 -0
- /package/dist/api/types/{BodyUpdateScrapeJobUploadUpdateWebpagePatch.js → SourceDeleteResponse.js} +0 -0
- /package/dist/api/types/{ChunkGraphRelationsResponse.js → SourceDeleteResultItem.js} +0 -0
- /package/dist/api/types/{DeleteMemoryRequest.js → SourceFetchResponse.js} +0 -0
- /package/dist/api/types/{DeleteSources.js → SourceGraphRelationsResponse.js} +0 -0
- /package/dist/api/types/{DeleteSubTenantData.js → SourceListResponse.js} +0 -0
- /package/dist/api/types/{EmbeddingsCreateCollectionData.js → SourceUploadResponse.js} +0 -0
- /package/dist/api/types/{EmbeddingsDeleteData.js → SourceUploadResultItem.js} +0 -0
- /package/dist/api/types/{EmbeddingsGetData.js → TenantCreateResponse.js} +0 -0
- /package/dist/api/types/{EmbeddingsSearchData.js → TenantInfo.js} +0 -0
- /package/dist/api/types/{ExtendedContext.js → TenantMetadataSchemaInfo.js} +0 -0
- /package/dist/api/types/{FetchContentData.js → TenantStatsResponse.js} +0 -0
- /package/dist/api/types/{FileUploadResult.js → TripletWithEvidence.js} +0 -0
- /package/dist/api/types/{GraphRelationsResponse.js → VectorStoreChunk.js} +0 -0
|
@@ -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
|
-
}
|
|
@@ -1,20 +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
|
-
* }
|
|
12
|
-
*/
|
|
13
|
-
export interface UploadUploadAppSourcesRequest {
|
|
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
|
-
/** List of structured source objects containing app-generated data to be indexed */
|
|
19
|
-
body: CortexAI.SourceModel[];
|
|
20
|
-
}
|
|
@@ -1,21 +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 UploadUploadTextRequest {
|
|
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
|
-
body: CortexAI.MarkdownUploadRequest;
|
|
21
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as environments from "../../../../environments.js";
|
|
5
|
-
import * as core from "../../../../core/index.js";
|
|
6
|
-
import * as CortexAI from "../../../index.js";
|
|
7
|
-
export declare namespace User {
|
|
8
|
-
interface Options {
|
|
9
|
-
environment?: core.Supplier<environments.CortexAIEnvironment | string>;
|
|
10
|
-
/** Specify a custom URL to connect the client to. */
|
|
11
|
-
baseUrl?: core.Supplier<string>;
|
|
12
|
-
token?: core.Supplier<core.BearerToken | undefined>;
|
|
13
|
-
/** Additional headers to include in requests. */
|
|
14
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
15
|
-
}
|
|
16
|
-
interface RequestOptions {
|
|
17
|
-
/** The maximum time to wait for a response in seconds. */
|
|
18
|
-
timeoutInSeconds?: number;
|
|
19
|
-
/** The number of times to retry the request. Defaults to 2. */
|
|
20
|
-
maxRetries?: number;
|
|
21
|
-
/** A hook to abort the request. */
|
|
22
|
-
abortSignal?: AbortSignal;
|
|
23
|
-
/** Additional query string parameters to include in the request. */
|
|
24
|
-
queryParams?: Record<string, unknown>;
|
|
25
|
-
/** Additional headers to include in the request. */
|
|
26
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
export declare class User {
|
|
30
|
-
protected readonly _options: User.Options;
|
|
31
|
-
constructor(_options?: User.Options);
|
|
32
|
-
/**
|
|
33
|
-
* Create a tenant for your account.
|
|
34
|
-
*
|
|
35
|
-
* Use this endpoint to initialize a tenant space you can use for ingestion, embeddings, and search. Optionally include a metadata schema to enforce consistent attributes across documents.
|
|
36
|
-
*
|
|
37
|
-
* Expected outcome
|
|
38
|
-
* - A tenant is created and returned with its identifier.
|
|
39
|
-
* - If the tenant already exists, you receive a success message with the existing identifier.
|
|
40
|
-
*
|
|
41
|
-
* @param {CortexAI.BodyCreateTenantUserCreateTenantPost} request
|
|
42
|
-
* @param {User.RequestOptions} requestOptions - Request-specific configuration.
|
|
43
|
-
*
|
|
44
|
-
* @throws {@link CortexAI.BadRequestError}
|
|
45
|
-
* @throws {@link CortexAI.UnauthorizedError}
|
|
46
|
-
* @throws {@link CortexAI.ForbiddenError}
|
|
47
|
-
* @throws {@link CortexAI.NotFoundError}
|
|
48
|
-
* @throws {@link CortexAI.UnprocessableEntityError}
|
|
49
|
-
* @throws {@link CortexAI.InternalServerError}
|
|
50
|
-
* @throws {@link CortexAI.ServiceUnavailableError}
|
|
51
|
-
*
|
|
52
|
-
* @example
|
|
53
|
-
* await client.user.createTenant({
|
|
54
|
-
* note: "<str>"
|
|
55
|
-
* })
|
|
56
|
-
*/
|
|
57
|
-
createTenant(request?: CortexAI.BodyCreateTenantUserCreateTenantPost, requestOptions?: User.RequestOptions): core.HttpResponsePromise<CortexAI.TenantCreateData>;
|
|
58
|
-
private __createTenant;
|
|
59
|
-
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
60
|
-
}
|
|
@@ -1,152 +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
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
29
|
-
var t = {};
|
|
30
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
31
|
-
t[p] = s[p];
|
|
32
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
33
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
34
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
35
|
-
t[p[i]] = s[p[i]];
|
|
36
|
-
}
|
|
37
|
-
return t;
|
|
38
|
-
};
|
|
39
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
exports.User = void 0;
|
|
41
|
-
const environments = __importStar(require("../../../../environments.js"));
|
|
42
|
-
const core = __importStar(require("../../../../core/index.js"));
|
|
43
|
-
const CortexAI = __importStar(require("../../../index.js"));
|
|
44
|
-
const headers_js_1 = require("../../../../core/headers.js");
|
|
45
|
-
const errors = __importStar(require("../../../../errors/index.js"));
|
|
46
|
-
class User {
|
|
47
|
-
constructor(_options = {}) {
|
|
48
|
-
this._options = _options;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Create a tenant for your account.
|
|
52
|
-
*
|
|
53
|
-
* Use this endpoint to initialize a tenant space you can use for ingestion, embeddings, and search. Optionally include a metadata schema to enforce consistent attributes across documents.
|
|
54
|
-
*
|
|
55
|
-
* Expected outcome
|
|
56
|
-
* - A tenant is created and returned with its identifier.
|
|
57
|
-
* - If the tenant already exists, you receive a success message with the existing identifier.
|
|
58
|
-
*
|
|
59
|
-
* @param {CortexAI.BodyCreateTenantUserCreateTenantPost} request
|
|
60
|
-
* @param {User.RequestOptions} requestOptions - Request-specific configuration.
|
|
61
|
-
*
|
|
62
|
-
* @throws {@link CortexAI.BadRequestError}
|
|
63
|
-
* @throws {@link CortexAI.UnauthorizedError}
|
|
64
|
-
* @throws {@link CortexAI.ForbiddenError}
|
|
65
|
-
* @throws {@link CortexAI.NotFoundError}
|
|
66
|
-
* @throws {@link CortexAI.UnprocessableEntityError}
|
|
67
|
-
* @throws {@link CortexAI.InternalServerError}
|
|
68
|
-
* @throws {@link CortexAI.ServiceUnavailableError}
|
|
69
|
-
*
|
|
70
|
-
* @example
|
|
71
|
-
* await client.user.createTenant({
|
|
72
|
-
* note: "<str>"
|
|
73
|
-
* })
|
|
74
|
-
*/
|
|
75
|
-
createTenant(request = {}, requestOptions) {
|
|
76
|
-
return core.HttpResponsePromise.fromPromise(this.__createTenant(request, requestOptions));
|
|
77
|
-
}
|
|
78
|
-
async __createTenant(request = {}, requestOptions) {
|
|
79
|
-
var _a, _b, _c;
|
|
80
|
-
const { tenant_id: tenantId, note } = request, _body = __rest(request, ["tenant_id", "note"]);
|
|
81
|
-
const _queryParams = {};
|
|
82
|
-
if (tenantId != null) {
|
|
83
|
-
_queryParams["tenant_id"] = tenantId;
|
|
84
|
-
}
|
|
85
|
-
if (note != null) {
|
|
86
|
-
_queryParams["note"] = note;
|
|
87
|
-
}
|
|
88
|
-
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);
|
|
89
|
-
const _response = await core.fetcher({
|
|
90
|
-
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, "user/create_tenant"),
|
|
91
|
-
method: "POST",
|
|
92
|
-
headers: _headers,
|
|
93
|
-
contentType: "application/json",
|
|
94
|
-
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
95
|
-
requestType: "json",
|
|
96
|
-
body: _body,
|
|
97
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
98
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
99
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
100
|
-
});
|
|
101
|
-
if (_response.ok) {
|
|
102
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
103
|
-
}
|
|
104
|
-
if (_response.error.reason === "status-code") {
|
|
105
|
-
switch (_response.error.statusCode) {
|
|
106
|
-
case 400:
|
|
107
|
-
throw new CortexAI.BadRequestError(_response.error.body, _response.rawResponse);
|
|
108
|
-
case 401:
|
|
109
|
-
throw new CortexAI.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
110
|
-
case 403:
|
|
111
|
-
throw new CortexAI.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
112
|
-
case 404:
|
|
113
|
-
throw new CortexAI.NotFoundError(_response.error.body, _response.rawResponse);
|
|
114
|
-
case 422:
|
|
115
|
-
throw new CortexAI.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
116
|
-
case 500:
|
|
117
|
-
throw new CortexAI.InternalServerError(_response.error.body, _response.rawResponse);
|
|
118
|
-
case 503:
|
|
119
|
-
throw new CortexAI.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
120
|
-
default:
|
|
121
|
-
throw new errors.CortexAIError({
|
|
122
|
-
statusCode: _response.error.statusCode,
|
|
123
|
-
body: _response.error.body,
|
|
124
|
-
rawResponse: _response.rawResponse,
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
switch (_response.error.reason) {
|
|
129
|
-
case "non-json":
|
|
130
|
-
throw new errors.CortexAIError({
|
|
131
|
-
statusCode: _response.error.statusCode,
|
|
132
|
-
body: _response.error.rawBody,
|
|
133
|
-
rawResponse: _response.rawResponse,
|
|
134
|
-
});
|
|
135
|
-
case "timeout":
|
|
136
|
-
throw new errors.CortexAITimeoutError("Timeout exceeded when calling POST /user/create_tenant.");
|
|
137
|
-
case "unknown":
|
|
138
|
-
throw new errors.CortexAIError({
|
|
139
|
-
message: _response.error.errorMessage,
|
|
140
|
-
rawResponse: _response.rawResponse,
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
async _getAuthorizationHeader() {
|
|
145
|
-
const bearer = await core.Supplier.get(this._options.token);
|
|
146
|
-
if (bearer != null) {
|
|
147
|
-
return `Bearer ${bearer}`;
|
|
148
|
-
}
|
|
149
|
-
return undefined;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
exports.User = User;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* @example
|
|
6
|
-
* {
|
|
7
|
-
* note: "<str>"
|
|
8
|
-
* }
|
|
9
|
-
*/
|
|
10
|
-
export interface BodyCreateTenantUserCreateTenantPost {
|
|
11
|
-
/** Unique identifier for the tenant/organization */
|
|
12
|
-
tenant_id?: string;
|
|
13
|
-
note?: string;
|
|
14
|
-
tenant_metadata_schema?: Record<string, unknown>[];
|
|
15
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { type BodyCreateTenantUserCreateTenantPost } from "./BodyCreateTenantUserCreateTenantPost.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./client/index.js";
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./client/index.js"), exports);
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as environments from "../../../../environments.js";
|
|
5
|
-
import * as core from "../../../../core/index.js";
|
|
6
|
-
import * as CortexAI from "../../../index.js";
|
|
7
|
-
export declare namespace UserMemory {
|
|
8
|
-
interface Options {
|
|
9
|
-
environment?: core.Supplier<environments.CortexAIEnvironment | string>;
|
|
10
|
-
/** Specify a custom URL to connect the client to. */
|
|
11
|
-
baseUrl?: core.Supplier<string>;
|
|
12
|
-
token?: core.Supplier<core.BearerToken | undefined>;
|
|
13
|
-
/** Additional headers to include in requests. */
|
|
14
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
15
|
-
}
|
|
16
|
-
interface RequestOptions {
|
|
17
|
-
/** The maximum time to wait for a response in seconds. */
|
|
18
|
-
timeoutInSeconds?: number;
|
|
19
|
-
/** The number of times to retry the request. Defaults to 2. */
|
|
20
|
-
maxRetries?: number;
|
|
21
|
-
/** A hook to abort the request. */
|
|
22
|
-
abortSignal?: AbortSignal;
|
|
23
|
-
/** Additional query string parameters to include in the request. */
|
|
24
|
-
queryParams?: Record<string, unknown>;
|
|
25
|
-
/** Additional headers to include in the request. */
|
|
26
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
export declare class UserMemory {
|
|
30
|
-
protected readonly _options: UserMemory.Options;
|
|
31
|
-
constructor(_options?: UserMemory.Options);
|
|
32
|
-
/**
|
|
33
|
-
* Retrieve all stored user memories for your tenant.
|
|
34
|
-
*
|
|
35
|
-
* This endpoint returns a comprehensive list of all user memories that have been stored,
|
|
36
|
-
* whether they were added manually or generated through AI. User memories help personalize
|
|
37
|
-
* your experience by storing context, preferences, and important information.
|
|
38
|
-
*
|
|
39
|
-
* You can optionally specify a sub-tenant to filter memories within that specific scope.
|
|
40
|
-
*
|
|
41
|
-
* @param {CortexAI.UserMemoryListUserMemoriesRequest} request
|
|
42
|
-
* @param {UserMemory.RequestOptions} requestOptions - Request-specific configuration.
|
|
43
|
-
*
|
|
44
|
-
* @throws {@link CortexAI.BadRequestError}
|
|
45
|
-
* @throws {@link CortexAI.UnauthorizedError}
|
|
46
|
-
* @throws {@link CortexAI.ForbiddenError}
|
|
47
|
-
* @throws {@link CortexAI.NotFoundError}
|
|
48
|
-
* @throws {@link CortexAI.UnprocessableEntityError}
|
|
49
|
-
* @throws {@link CortexAI.InternalServerError}
|
|
50
|
-
* @throws {@link CortexAI.ServiceUnavailableError}
|
|
51
|
-
*
|
|
52
|
-
* @example
|
|
53
|
-
* await client.userMemory.listUserMemories({
|
|
54
|
-
* tenant_id: "tenant_1234",
|
|
55
|
-
* sub_tenant_id: "sub_tenant_4567"
|
|
56
|
-
* })
|
|
57
|
-
*/
|
|
58
|
-
listUserMemories(request: CortexAI.UserMemoryListUserMemoriesRequest, requestOptions?: UserMemory.RequestOptions): core.HttpResponsePromise<CortexAI.ListUserMemoriesResponse>;
|
|
59
|
-
private __listUserMemories;
|
|
60
|
-
/**
|
|
61
|
-
* Permanently remove a specific user memory from storage.
|
|
62
|
-
*
|
|
63
|
-
* This endpoint allows you to delete a user memory by its unique identifier.
|
|
64
|
-
* Once deleted, the memory cannot be recovered, so use this operation carefully.
|
|
65
|
-
*
|
|
66
|
-
* The memory will be removed from your tenant's storage and will no longer
|
|
67
|
-
* appear in search results or memory listings.
|
|
68
|
-
*
|
|
69
|
-
* @param {CortexAI.UserMemoryDeleteUserMemoryRequest} request
|
|
70
|
-
* @param {UserMemory.RequestOptions} requestOptions - Request-specific configuration.
|
|
71
|
-
*
|
|
72
|
-
* @throws {@link CortexAI.BadRequestError}
|
|
73
|
-
* @throws {@link CortexAI.UnauthorizedError}
|
|
74
|
-
* @throws {@link CortexAI.ForbiddenError}
|
|
75
|
-
* @throws {@link CortexAI.NotFoundError}
|
|
76
|
-
* @throws {@link CortexAI.UnprocessableEntityError}
|
|
77
|
-
* @throws {@link CortexAI.InternalServerError}
|
|
78
|
-
* @throws {@link CortexAI.ServiceUnavailableError}
|
|
79
|
-
*
|
|
80
|
-
* @example
|
|
81
|
-
* await client.userMemory.deleteUserMemory({
|
|
82
|
-
* tenant_id: "tenant_1234",
|
|
83
|
-
* memory_id: "memory_1234",
|
|
84
|
-
* sub_tenant_id: "sub_tenant_4567"
|
|
85
|
-
* })
|
|
86
|
-
*/
|
|
87
|
-
deleteUserMemory(request: CortexAI.UserMemoryDeleteUserMemoryRequest, requestOptions?: UserMemory.RequestOptions): core.HttpResponsePromise<CortexAI.DeleteUserMemoryResponse>;
|
|
88
|
-
private __deleteUserMemory;
|
|
89
|
-
/**
|
|
90
|
-
* Find relevant user memories using semantic search and knowledge graph.
|
|
91
|
-
*
|
|
92
|
-
* This endpoint performs parallel searches:
|
|
93
|
-
* 1. Semantic search in Weaviate across all stored user memories
|
|
94
|
-
* 2. Entity-based search in the knowledge graph for memory entities
|
|
95
|
-
*
|
|
96
|
-
* Results from both sources are combined and ranked by relevance to provide
|
|
97
|
-
* comprehensive memory retrieval.
|
|
98
|
-
*
|
|
99
|
-
* @param {CortexAI.RetrieveUserMemoryRequest} request
|
|
100
|
-
* @param {UserMemory.RequestOptions} requestOptions - Request-specific configuration.
|
|
101
|
-
*
|
|
102
|
-
* @throws {@link CortexAI.BadRequestError}
|
|
103
|
-
* @throws {@link CortexAI.UnauthorizedError}
|
|
104
|
-
* @throws {@link CortexAI.ForbiddenError}
|
|
105
|
-
* @throws {@link CortexAI.NotFoundError}
|
|
106
|
-
* @throws {@link CortexAI.UnprocessableEntityError}
|
|
107
|
-
* @throws {@link CortexAI.InternalServerError}
|
|
108
|
-
* @throws {@link CortexAI.ServiceUnavailableError}
|
|
109
|
-
*
|
|
110
|
-
* @example
|
|
111
|
-
* await client.userMemory.retrieveUserMemory({
|
|
112
|
-
* tenant_id: "tenant_1234",
|
|
113
|
-
* sub_tenant_id: "sub_tenant_4567",
|
|
114
|
-
* max_count: 5,
|
|
115
|
-
* query: "Which mode does user prefer"
|
|
116
|
-
* })
|
|
117
|
-
*/
|
|
118
|
-
retrieveUserMemory(request: CortexAI.RetrieveUserMemoryRequest, requestOptions?: UserMemory.RequestOptions): core.HttpResponsePromise<CortexAI.RetrieveUserMemoryResponse>;
|
|
119
|
-
private __retrieveUserMemory;
|
|
120
|
-
/**
|
|
121
|
-
* Store new user memories for future reference.
|
|
122
|
-
*
|
|
123
|
-
* This endpoint allows you to add memories in two formats:
|
|
124
|
-
* 1. Raw text string - A single text-based memory
|
|
125
|
-
* 2. User/Assistant pairs array - Conversation pairs that will be chunked as a single memory
|
|
126
|
-
*
|
|
127
|
-
* The stored memories will be chunked, indexed in both Weaviate and the knowledge graph,
|
|
128
|
-
* and made available for semantic search and graph-based retrieval.
|
|
129
|
-
*
|
|
130
|
-
* @param {CortexAI.AddUserMemoryRequest} request
|
|
131
|
-
* @param {UserMemory.RequestOptions} requestOptions - Request-specific configuration.
|
|
132
|
-
*
|
|
133
|
-
* @throws {@link CortexAI.BadRequestError}
|
|
134
|
-
* @throws {@link CortexAI.UnauthorizedError}
|
|
135
|
-
* @throws {@link CortexAI.ForbiddenError}
|
|
136
|
-
* @throws {@link CortexAI.NotFoundError}
|
|
137
|
-
* @throws {@link CortexAI.UnprocessableEntityError}
|
|
138
|
-
* @throws {@link CortexAI.InternalServerError}
|
|
139
|
-
* @throws {@link CortexAI.ServiceUnavailableError}
|
|
140
|
-
*
|
|
141
|
-
* @example
|
|
142
|
-
* await client.userMemory.addUserMemory({
|
|
143
|
-
* tenant_id: "tenant_1234",
|
|
144
|
-
* sub_tenant_id: "sub_tenant_4567"
|
|
145
|
-
* })
|
|
146
|
-
*/
|
|
147
|
-
addUserMemory(request: CortexAI.AddUserMemoryRequest, requestOptions?: UserMemory.RequestOptions): core.HttpResponsePromise<CortexAI.AddUserMemoryResponse>;
|
|
148
|
-
private __addUserMemory;
|
|
149
|
-
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
150
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./requests/index.js"), exports);
|
|
@@ -1,27 +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
|
-
* }
|
|
11
|
-
*/
|
|
12
|
-
export interface AddUserMemoryRequest {
|
|
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
|
-
/** Single raw text memory to store. If both raw_text and user_assistant_pairs are provided, raw_text will be used. */
|
|
18
|
-
raw_text?: string;
|
|
19
|
-
/** Array of user/assistant conversation pairs to store as a single memory */
|
|
20
|
-
user_assistant_pairs?: CortexAI.UserAssistantPair[];
|
|
21
|
-
/** Expiry time in seconds for the memory (optional) */
|
|
22
|
-
expiry_time?: number;
|
|
23
|
-
/** If true, process and compress chunks into inferred representations before indexing (default: False) */
|
|
24
|
-
infer?: boolean;
|
|
25
|
-
/** Custom instructions to guide cortex */
|
|
26
|
-
custom_instructions?: string;
|
|
27
|
-
}
|
|
@@ -1,24 +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
|
-
* max_count: 5,
|
|
10
|
-
* query: "Which mode does user prefer"
|
|
11
|
-
* }
|
|
12
|
-
*/
|
|
13
|
-
export interface RetrieveUserMemoryRequest {
|
|
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
|
-
/** Maximum number of memories to return (default: 5) */
|
|
19
|
-
max_count?: number;
|
|
20
|
-
/** Search query to find relevant user memories */
|
|
21
|
-
query: string;
|
|
22
|
-
/** User's name to enhance personalisation */
|
|
23
|
-
user_name?: string;
|
|
24
|
-
}
|
package/dist/api/resources/userMemory/client/requests/UserMemoryDeleteUserMemoryRequest.d.ts
DELETED
|
@@ -1,19 +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
|
-
* memory_id: "memory_1234",
|
|
9
|
-
* sub_tenant_id: "sub_tenant_4567"
|
|
10
|
-
* }
|
|
11
|
-
*/
|
|
12
|
-
export interface UserMemoryDeleteUserMemoryRequest {
|
|
13
|
-
/** Unique identifier for the tenant/organization */
|
|
14
|
-
tenant_id: string;
|
|
15
|
-
/** Unique identifier of the memory to delete */
|
|
16
|
-
memory_id: string;
|
|
17
|
-
/** 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
|
-
sub_tenant_id?: string;
|
|
19
|
-
}
|
package/dist/api/resources/userMemory/client/requests/UserMemoryListUserMemoriesRequest.d.ts
DELETED
|
@@ -1,16 +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 UserMemoryListUserMemoriesRequest {
|
|
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
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { type UserMemoryListUserMemoriesRequest } from "./UserMemoryListUserMemoriesRequest.js";
|
|
2
|
-
export { type UserMemoryDeleteUserMemoryRequest } from "./UserMemoryDeleteUserMemoryRequest.js";
|
|
3
|
-
export { type RetrieveUserMemoryRequest } from "./RetrieveUserMemoryRequest.js";
|
|
4
|
-
export { type AddUserMemoryRequest } from "./AddUserMemoryRequest.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./client/index.js";
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./client/index.js"), exports);
|