@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.
Files changed (253) hide show
  1. package/dist/Client.d.ts +20 -24
  2. package/dist/Client.js +26 -34
  3. package/dist/api/errors/BadRequestError.d.ts +1 -2
  4. package/dist/api/errors/ForbiddenError.d.ts +1 -2
  5. package/dist/api/errors/InternalServerError.d.ts +1 -2
  6. package/dist/api/errors/NotFoundError.d.ts +1 -2
  7. package/dist/api/errors/ServiceUnavailableError.d.ts +1 -2
  8. package/dist/api/errors/TooManyRequestsError.d.ts +9 -0
  9. package/dist/api/errors/TooManyRequestsError.js +42 -0
  10. package/dist/api/errors/UnauthorizedError.d.ts +1 -2
  11. package/dist/api/errors/index.d.ts +1 -0
  12. package/dist/api/errors/index.js +1 -0
  13. package/dist/api/resources/dashboard/client/Client.d.ts +136 -0
  14. package/dist/api/resources/{userMemory → dashboard}/client/Client.js +191 -138
  15. package/dist/api/resources/dashboard/client/requests/CreateUserDashboardUserCreateUserPostRequest.d.ts +12 -0
  16. package/dist/api/resources/dashboard/client/requests/ListSourcesDashboardSourcesGetRequest.d.ts +16 -0
  17. package/dist/api/resources/dashboard/client/requests/index.d.ts +2 -0
  18. package/dist/api/resources/embeddings/client/Client.d.ts +40 -27
  19. package/dist/api/resources/embeddings/client/Client.js +68 -44
  20. package/dist/api/resources/embeddings/client/requests/BodyFilterRawEmbeddingsEndpointEmbeddingsFilterRawEmbeddingsPost.d.ts +24 -0
  21. package/dist/api/resources/embeddings/client/requests/BodyInsertRawEmbeddingsEndpointEmbeddingsInsertRawEmbeddingsPost.d.ts +27 -0
  22. package/dist/api/resources/embeddings/client/requests/BodySearchRawEmbeddingsEndpointEmbeddingsSearchRawEmbeddingsPost.d.ts +25 -0
  23. package/dist/api/resources/embeddings/client/requests/EmbeddingsDeleteRequest.d.ts +6 -5
  24. package/dist/api/resources/embeddings/client/requests/index.d.ts +3 -3
  25. package/dist/api/resources/fetch/client/Client.d.ts +96 -7
  26. package/dist/api/resources/fetch/client/Client.js +288 -10
  27. package/dist/api/resources/{sources/client/requests/SourcesGetGraphRelationsByIdRequest.d.ts → fetch/client/requests/FetchGraphRelationsBySourceIdRequest.d.ts} +2 -3
  28. package/dist/api/resources/{sources/client/requests/SourcesGetAllRequest.d.ts → fetch/client/requests/FetchSourcesRequest.d.ts} +2 -3
  29. package/dist/api/resources/fetch/client/requests/ListSourcesByIdRequest.d.ts +18 -0
  30. package/dist/api/resources/{upload/client/requests/UploadUpdateTextRequest.d.ts → fetch/client/requests/SourceFetchRequest.d.ts} +9 -10
  31. package/dist/api/resources/fetch/client/requests/index.d.ts +4 -1
  32. package/dist/api/resources/index.d.ts +10 -13
  33. package/dist/api/resources/index.js +11 -14
  34. package/dist/api/resources/search/client/Client.d.ts +50 -26
  35. package/dist/api/resources/search/client/Client.js +65 -35
  36. package/dist/api/resources/search/client/requests/FullTextSearchRequest.d.ts +6 -4
  37. package/dist/api/resources/search/client/requests/{SearchRequest.d.ts → HybridSearchRequest.d.ts} +13 -9
  38. package/dist/api/resources/search/client/requests/QnASearchRequest.d.ts +39 -0
  39. package/dist/api/resources/search/client/requests/index.d.ts +2 -2
  40. package/dist/api/resources/sources/client/Client.d.ts +11 -61
  41. package/dist/api/resources/sources/client/Client.js +14 -191
  42. package/dist/api/resources/sources/client/requests/SourceDeleteRequest.d.ts +17 -0
  43. package/dist/api/resources/sources/client/requests/index.d.ts +1 -3
  44. package/dist/api/resources/tenant/client/Client.d.ts +54 -38
  45. package/dist/api/resources/tenant/client/Client.js +67 -114
  46. package/dist/api/resources/tenant/client/requests/TenantCreateRequest.d.ts +20 -0
  47. package/dist/api/resources/tenant/client/requests/TenantStatsRequest.d.ts +1 -4
  48. package/dist/api/resources/tenant/client/requests/index.d.ts +1 -2
  49. package/dist/api/resources/upload/client/Client.d.ts +54 -428
  50. package/dist/api/resources/upload/client/Client.js +97 -1417
  51. package/dist/api/resources/upload/client/requests/{UploadUploadMarkdownRequest.d.ts → BodyAddMemoryMemoriesAddMemoryPost.d.ts} +7 -7
  52. package/dist/api/resources/upload/client/requests/BodyUploadAppIngestionUploadAppPost.d.ts +31 -0
  53. package/dist/api/resources/upload/client/requests/BodyUploadDocumentIngestionUploadDocumentPost.d.ts +22 -0
  54. package/dist/api/resources/upload/client/requests/UploadDeleteMemoryRequest.d.ts +18 -0
  55. package/dist/api/resources/upload/client/requests/UploadVerifyProcessingRequest.d.ts +1 -2
  56. package/dist/api/resources/upload/client/requests/index.d.ts +4 -16
  57. package/dist/api/types/AddMemoryResponse.d.ts +17 -0
  58. package/dist/api/types/ApiKeyInfo.d.ts +17 -0
  59. package/dist/api/types/AppSourcesUploadData.d.ts +10 -4
  60. package/dist/api/types/CollectionStats.d.ts +9 -0
  61. package/dist/api/types/CustomPropertyDefinition.d.ts +38 -0
  62. package/dist/api/types/DashboardApisResponse.d.ts +12 -0
  63. package/dist/api/types/DashboardSourcesResponse.d.ts +12 -0
  64. package/dist/api/types/DashboardTenantsResponse.d.ts +12 -0
  65. package/dist/api/types/DeleteResult.d.ts +14 -0
  66. package/dist/api/types/DeleteUserMemoryResponse.d.ts +1 -1
  67. package/dist/api/types/Entity.d.ts +2 -2
  68. package/dist/api/types/FetchMode.d.ts +12 -0
  69. package/dist/api/types/FetchMode.js +11 -0
  70. package/dist/api/types/GraphContext.d.ts +12 -0
  71. package/dist/api/types/Infra.d.ts +8 -0
  72. package/dist/api/types/InsertResult.d.ts +16 -0
  73. package/dist/api/types/MemoryItem.d.ts +41 -0
  74. package/dist/api/types/MemoryResultItem.d.ts +19 -0
  75. package/dist/api/types/MilvusDataType.d.ts +21 -0
  76. package/dist/api/types/MilvusDataType.js +20 -0
  77. package/dist/api/types/PathTriplet.d.ts +1 -7
  78. package/dist/api/types/ProcessingStatus.d.ts +16 -2
  79. package/dist/api/types/ProcessingStatus.js +12 -0
  80. package/dist/api/types/QnASearchResponse.d.ts +20 -0
  81. package/dist/api/types/RawEmbeddingDocument.d.ts +15 -0
  82. package/dist/api/types/RawEmbeddingSearchResult.d.ts +19 -0
  83. package/dist/api/types/RawEmbeddingVector.d.ts +12 -0
  84. package/dist/api/types/RelationEvidence.d.ts +13 -4
  85. package/dist/api/types/RetrievalResult.d.ts +11 -0
  86. package/dist/api/types/ScoredPathResponse.d.ts +4 -11
  87. package/dist/api/types/SearchMode.d.ts +11 -0
  88. package/dist/api/types/SearchMode.js +10 -0
  89. package/dist/api/types/SourceDeleteResponse.d.ts +14 -0
  90. package/dist/api/types/SourceDeleteResultItem.d.ts +14 -0
  91. package/dist/api/types/SourceFetchResponse.d.ts +26 -0
  92. package/dist/api/types/{GraphRelationsResponse.d.ts → SourceGraphRelationsResponse.d.ts} +2 -2
  93. package/dist/api/types/SourceListResponse.d.ts +11 -0
  94. package/dist/api/types/SourceModel.d.ts +5 -1
  95. package/dist/api/types/SourceStatus.d.ts +10 -0
  96. package/dist/api/types/SourceStatus.js +12 -0
  97. package/dist/api/types/SourceUploadResponse.d.ts +14 -0
  98. package/dist/api/types/SourceUploadResultItem.d.ts +14 -0
  99. package/dist/api/types/SupportedLlmProviders.d.ts +11 -0
  100. package/dist/api/types/SupportedLlmProviders.js +13 -0
  101. package/dist/api/types/TenantCreateResponse.d.ts +14 -0
  102. package/dist/api/types/TenantInfo.d.ts +11 -0
  103. package/dist/api/types/TenantMetadataSchemaInfo.d.ts +14 -0
  104. package/dist/api/types/TenantStatsResponse.d.ts +14 -0
  105. package/dist/api/types/{TripleWithEvidence.d.ts → TripletWithEvidence.d.ts} +4 -1
  106. package/dist/api/types/UserAssistantPair.d.ts +3 -0
  107. package/dist/api/types/{SearchChunk.d.ts → VectorStoreChunk.d.ts} +3 -8
  108. package/dist/api/types/index.d.ts +36 -33
  109. package/dist/api/types/index.js +36 -33
  110. package/package.json +30 -33
  111. package/dist/api/resources/document/client/Client.d.ts +0 -59
  112. package/dist/api/resources/document/client/Client.js +0 -132
  113. package/dist/api/resources/document/client/index.d.ts +0 -1
  114. package/dist/api/resources/embeddings/client/requests/EmbeddingsCreateCollectionRequest.d.ts +0 -13
  115. package/dist/api/resources/embeddings/client/requests/EmbeddingsSearchRequest.d.ts +0 -18
  116. package/dist/api/resources/embeddings/client/requests/GetEmbeddingsBasedOnChunkIdsRequest.d.ts +0 -18
  117. package/dist/api/resources/fetch/client/requests/FetchContentRequest.d.ts +0 -18
  118. package/dist/api/resources/search/client/requests/QnARequest.d.ts +0 -47
  119. package/dist/api/resources/sources/client/requests/SourceBodyParams.d.ts +0 -18
  120. package/dist/api/resources/tenant/client/requests/TenantDeleteSubTenantRequest.d.ts +0 -14
  121. package/dist/api/resources/tenant/client/requests/TenantGetSubTenantIdsRequest.d.ts +0 -12
  122. package/dist/api/resources/upload/client/requests/BodyBatchUpdateUploadBatchUpdatePatch.d.ts +0 -37
  123. package/dist/api/resources/upload/client/requests/BodyBatchUploadUploadBatchUploadPost.d.ts +0 -37
  124. package/dist/api/resources/upload/client/requests/BodyUpdateFileUploadUpdateDocumentPatch.d.ts +0 -38
  125. package/dist/api/resources/upload/client/requests/BodyUploadFilesUploadUploadDocumentPost.d.ts +0 -37
  126. package/dist/api/resources/upload/client/requests/EmbeddingsUpdateRequest.d.ts +0 -18
  127. package/dist/api/resources/upload/client/requests/EmbeddingsUploadRequest.d.ts +0 -21
  128. package/dist/api/resources/upload/client/requests/UploadBatchScrapeWebpageRequest.d.ts +0 -22
  129. package/dist/api/resources/upload/client/requests/UploadBatchUploadMarkdownRequest.d.ts +0 -22
  130. package/dist/api/resources/upload/client/requests/UploadBatchUploadTextRequest.d.ts +0 -22
  131. package/dist/api/resources/upload/client/requests/UploadScrapeWebpageRequest.d.ts +0 -25
  132. package/dist/api/resources/upload/client/requests/UploadUpdateMarkdownRequest.d.ts +0 -24
  133. package/dist/api/resources/upload/client/requests/UploadUpdateWebpageRequest.d.ts +0 -25
  134. package/dist/api/resources/upload/client/requests/UploadUploadAppSourcesRequest.d.ts +0 -20
  135. package/dist/api/resources/upload/client/requests/UploadUploadTextRequest.d.ts +0 -21
  136. package/dist/api/resources/user/client/Client.d.ts +0 -60
  137. package/dist/api/resources/user/client/Client.js +0 -152
  138. package/dist/api/resources/user/client/requests/BodyCreateTenantUserCreateTenantPost.d.ts +0 -15
  139. package/dist/api/resources/user/client/requests/index.d.ts +0 -1
  140. package/dist/api/resources/user/client/requests/index.js +0 -2
  141. package/dist/api/resources/user/index.d.ts +0 -1
  142. package/dist/api/resources/user/index.js +0 -17
  143. package/dist/api/resources/userMemory/client/Client.d.ts +0 -150
  144. package/dist/api/resources/userMemory/client/index.d.ts +0 -2
  145. package/dist/api/resources/userMemory/client/index.js +0 -17
  146. package/dist/api/resources/userMemory/client/requests/AddUserMemoryRequest.d.ts +0 -27
  147. package/dist/api/resources/userMemory/client/requests/RetrieveUserMemoryRequest.d.ts +0 -24
  148. package/dist/api/resources/userMemory/client/requests/UserMemoryDeleteUserMemoryRequest.d.ts +0 -19
  149. package/dist/api/resources/userMemory/client/requests/UserMemoryListUserMemoriesRequest.d.ts +0 -16
  150. package/dist/api/resources/userMemory/client/requests/index.d.ts +0 -4
  151. package/dist/api/resources/userMemory/client/requests/index.js +0 -2
  152. package/dist/api/resources/userMemory/index.d.ts +0 -1
  153. package/dist/api/resources/userMemory/index.js +0 -17
  154. package/dist/api/types/AddUserMemoryResponse.d.ts +0 -16
  155. package/dist/api/types/BatchUploadData.d.ts +0 -11
  156. package/dist/api/types/BodyScrapeWebpageUploadScrapeWebpagePost.d.ts +0 -5
  157. package/dist/api/types/BodyUpdateScrapeJobUploadUpdateWebpagePatch.d.ts +0 -5
  158. package/dist/api/types/ChunkGraphRelationsResponse.d.ts +0 -13
  159. package/dist/api/types/DeleteMemoryRequest.d.ts +0 -11
  160. package/dist/api/types/DeleteSources.d.ts +0 -7
  161. package/dist/api/types/DeleteSubTenantData.d.ts +0 -15
  162. package/dist/api/types/EmbeddingsCreateCollectionData.d.ts +0 -13
  163. package/dist/api/types/EmbeddingsDeleteData.d.ts +0 -13
  164. package/dist/api/types/EmbeddingsGetData.d.ts +0 -13
  165. package/dist/api/types/EmbeddingsSearchData.d.ts +0 -13
  166. package/dist/api/types/ExtendedContext.d.ts +0 -5
  167. package/dist/api/types/FetchContentData.d.ts +0 -13
  168. package/dist/api/types/FileUploadResult.d.ts +0 -9
  169. package/dist/api/types/ListSourcesResponse.d.ts +0 -12
  170. package/dist/api/types/ListSourcesResponse.js +0 -5
  171. package/dist/api/types/ListUserMemoriesResponse.d.ts +0 -13
  172. package/dist/api/types/ListUserMemoriesResponse.js +0 -5
  173. package/dist/api/types/MarkdownUploadRequest.d.ts +0 -22
  174. package/dist/api/types/MarkdownUploadRequest.js +0 -5
  175. package/dist/api/types/RelatedChunk.d.ts +0 -9
  176. package/dist/api/types/RelatedChunk.js +0 -5
  177. package/dist/api/types/Relations.d.ts +0 -9
  178. package/dist/api/types/Relations.js +0 -5
  179. package/dist/api/types/RetrieveResponse.d.ts +0 -12
  180. package/dist/api/types/RetrieveResponse.js +0 -5
  181. package/dist/api/types/RetrieveUserMemoryResponse.d.ts +0 -15
  182. package/dist/api/types/RetrieveUserMemoryResponse.js +0 -5
  183. package/dist/api/types/ScoredTripletResponse.d.ts +0 -17
  184. package/dist/api/types/ScoredTripletResponse.js +0 -5
  185. package/dist/api/types/SearchChunk.js +0 -5
  186. package/dist/api/types/SingleUploadData.d.ts +0 -10
  187. package/dist/api/types/SingleUploadData.js +0 -5
  188. package/dist/api/types/Source.d.ts +0 -19
  189. package/dist/api/types/Source.js +0 -5
  190. package/dist/api/types/SubTenantIdsData.d.ts +0 -17
  191. package/dist/api/types/SubTenantIdsData.js +0 -5
  192. package/dist/api/types/TenantCreateData.d.ts +0 -13
  193. package/dist/api/types/TenantCreateData.js +0 -5
  194. package/dist/api/types/TenantStats.d.ts +0 -15
  195. package/dist/api/types/TenantStats.js +0 -5
  196. package/dist/api/types/TripleWithEvidence.js +0 -5
  197. package/dist/api/types/UserMemory.d.ts +0 -12
  198. package/dist/api/types/UserMemory.js +0 -5
  199. package/dist/api/types/WebpageScrapeRequest.d.ts +0 -9
  200. package/dist/api/types/WebpageScrapeRequest.js +0 -5
  201. /package/dist/api/resources/{user → dashboard}/client/index.d.ts +0 -0
  202. /package/dist/api/resources/{user → dashboard}/client/index.js +0 -0
  203. /package/dist/api/resources/{embeddings/client/requests/EmbeddingsCreateCollectionRequest.js → dashboard/client/requests/CreateUserDashboardUserCreateUserPostRequest.js} +0 -0
  204. /package/dist/api/resources/{embeddings/client/requests/EmbeddingsSearchRequest.js → dashboard/client/requests/ListSourcesDashboardSourcesGetRequest.js} +0 -0
  205. /package/dist/api/resources/{document/client → dashboard/client/requests}/index.js +0 -0
  206. /package/dist/api/resources/{document → dashboard}/index.d.ts +0 -0
  207. /package/dist/api/resources/{document → dashboard}/index.js +0 -0
  208. /package/dist/api/resources/embeddings/client/requests/{GetEmbeddingsBasedOnChunkIdsRequest.js → BodyFilterRawEmbeddingsEndpointEmbeddingsFilterRawEmbeddingsPost.js} +0 -0
  209. /package/dist/api/resources/{fetch/client/requests/FetchContentRequest.js → embeddings/client/requests/BodyInsertRawEmbeddingsEndpointEmbeddingsInsertRawEmbeddingsPost.js} +0 -0
  210. /package/dist/api/resources/{search/client/requests/QnARequest.js → embeddings/client/requests/BodySearchRawEmbeddingsEndpointEmbeddingsSearchRawEmbeddingsPost.js} +0 -0
  211. /package/dist/api/resources/{search/client/requests/SearchRequest.js → fetch/client/requests/FetchGraphRelationsBySourceIdRequest.js} +0 -0
  212. /package/dist/api/resources/{sources/client/requests/SourceBodyParams.js → fetch/client/requests/FetchSourcesRequest.js} +0 -0
  213. /package/dist/api/resources/{sources/client/requests/SourcesGetAllRequest.js → fetch/client/requests/ListSourcesByIdRequest.js} +0 -0
  214. /package/dist/api/resources/{sources/client/requests/SourcesGetGraphRelationsByIdRequest.js → fetch/client/requests/SourceFetchRequest.js} +0 -0
  215. /package/dist/api/resources/{tenant/client/requests/TenantDeleteSubTenantRequest.js → search/client/requests/HybridSearchRequest.js} +0 -0
  216. /package/dist/api/resources/{tenant/client/requests/TenantGetSubTenantIdsRequest.js → search/client/requests/QnASearchRequest.js} +0 -0
  217. /package/dist/api/resources/{upload/client/requests/BodyBatchUpdateUploadBatchUpdatePatch.js → sources/client/requests/SourceDeleteRequest.js} +0 -0
  218. /package/dist/api/resources/{upload/client/requests/BodyBatchUploadUploadBatchUploadPost.js → tenant/client/requests/TenantCreateRequest.js} +0 -0
  219. /package/dist/api/resources/upload/client/requests/{BodyUpdateFileUploadUpdateDocumentPatch.js → BodyAddMemoryMemoriesAddMemoryPost.js} +0 -0
  220. /package/dist/api/resources/upload/client/requests/{BodyUploadFilesUploadUploadDocumentPost.js → BodyUploadAppIngestionUploadAppPost.js} +0 -0
  221. /package/dist/api/resources/upload/client/requests/{EmbeddingsUpdateRequest.js → BodyUploadDocumentIngestionUploadDocumentPost.js} +0 -0
  222. /package/dist/api/resources/upload/client/requests/{EmbeddingsUploadRequest.js → UploadDeleteMemoryRequest.js} +0 -0
  223. /package/dist/api/{resources/upload/client/requests/UploadBatchScrapeWebpageRequest.js → types/AddMemoryResponse.js} +0 -0
  224. /package/dist/api/{resources/upload/client/requests/UploadBatchUploadMarkdownRequest.js → types/ApiKeyInfo.js} +0 -0
  225. /package/dist/api/{resources/upload/client/requests/UploadBatchUploadTextRequest.js → types/CollectionStats.js} +0 -0
  226. /package/dist/api/{resources/upload/client/requests/UploadScrapeWebpageRequest.js → types/CustomPropertyDefinition.js} +0 -0
  227. /package/dist/api/{resources/upload/client/requests/UploadUpdateMarkdownRequest.js → types/DashboardApisResponse.js} +0 -0
  228. /package/dist/api/{resources/upload/client/requests/UploadUpdateTextRequest.js → types/DashboardSourcesResponse.js} +0 -0
  229. /package/dist/api/{resources/upload/client/requests/UploadUpdateWebpageRequest.js → types/DashboardTenantsResponse.js} +0 -0
  230. /package/dist/api/{resources/upload/client/requests/UploadUploadAppSourcesRequest.js → types/DeleteResult.js} +0 -0
  231. /package/dist/api/{resources/upload/client/requests/UploadUploadMarkdownRequest.js → types/GraphContext.js} +0 -0
  232. /package/dist/api/{resources/upload/client/requests/UploadUploadTextRequest.js → types/Infra.js} +0 -0
  233. /package/dist/api/{resources/user/client/requests/BodyCreateTenantUserCreateTenantPost.js → types/InsertResult.js} +0 -0
  234. /package/dist/api/{resources/userMemory/client/requests/AddUserMemoryRequest.js → types/MemoryItem.js} +0 -0
  235. /package/dist/api/{resources/userMemory/client/requests/RetrieveUserMemoryRequest.js → types/MemoryResultItem.js} +0 -0
  236. /package/dist/api/{resources/userMemory/client/requests/UserMemoryDeleteUserMemoryRequest.js → types/QnASearchResponse.js} +0 -0
  237. /package/dist/api/{resources/userMemory/client/requests/UserMemoryListUserMemoriesRequest.js → types/RawEmbeddingDocument.js} +0 -0
  238. /package/dist/api/types/{AddUserMemoryResponse.js → RawEmbeddingSearchResult.js} +0 -0
  239. /package/dist/api/types/{BatchUploadData.js → RawEmbeddingVector.js} +0 -0
  240. /package/dist/api/types/{BodyScrapeWebpageUploadScrapeWebpagePost.js → RetrievalResult.js} +0 -0
  241. /package/dist/api/types/{BodyUpdateScrapeJobUploadUpdateWebpagePatch.js → SourceDeleteResponse.js} +0 -0
  242. /package/dist/api/types/{ChunkGraphRelationsResponse.js → SourceDeleteResultItem.js} +0 -0
  243. /package/dist/api/types/{DeleteMemoryRequest.js → SourceFetchResponse.js} +0 -0
  244. /package/dist/api/types/{DeleteSources.js → SourceGraphRelationsResponse.js} +0 -0
  245. /package/dist/api/types/{DeleteSubTenantData.js → SourceListResponse.js} +0 -0
  246. /package/dist/api/types/{EmbeddingsCreateCollectionData.js → SourceUploadResponse.js} +0 -0
  247. /package/dist/api/types/{EmbeddingsDeleteData.js → SourceUploadResultItem.js} +0 -0
  248. /package/dist/api/types/{EmbeddingsGetData.js → TenantCreateResponse.js} +0 -0
  249. /package/dist/api/types/{EmbeddingsSearchData.js → TenantInfo.js} +0 -0
  250. /package/dist/api/types/{ExtendedContext.js → TenantMetadataSchemaInfo.js} +0 -0
  251. /package/dist/api/types/{FetchContentData.js → TenantStatsResponse.js} +0 -0
  252. /package/dist/api/types/{FileUploadResult.js → TripletWithEvidence.js} +0 -0
  253. /package/dist/api/types/{GraphRelationsResponse.js → VectorStoreChunk.js} +0 -0
@@ -25,39 +25,24 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  __setModuleDefault(result, mod);
26
26
  return result;
27
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
28
  Object.defineProperty(exports, "__esModule", { value: true });
40
- exports.UserMemory = void 0;
29
+ exports.Dashboard = void 0;
41
30
  const environments = __importStar(require("../../../../environments.js"));
42
31
  const core = __importStar(require("../../../../core/index.js"));
43
32
  const CortexAI = __importStar(require("../../../index.js"));
44
33
  const headers_js_1 = require("../../../../core/headers.js");
45
34
  const errors = __importStar(require("../../../../errors/index.js"));
46
- class UserMemory {
35
+ class Dashboard {
47
36
  constructor(_options = {}) {
48
37
  this._options = _options;
49
38
  }
50
39
  /**
51
- * Retrieve all stored user memories for your tenant.
52
- *
53
- * This endpoint returns a comprehensive list of all user memories that have been stored,
54
- * whether they were added manually or generated through AI. User memories help personalize
55
- * your experience by storing context, preferences, and important information.
40
+ * List all API keys for dashboard view.
56
41
  *
57
- * You can optionally specify a sub-tenant to filter memories within that specific scope.
42
+ * Uses Firebase authentication to identify the user and returns API keys
43
+ * associated with that user.
58
44
  *
59
- * @param {CortexAI.UserMemoryListUserMemoriesRequest} request
60
- * @param {UserMemory.RequestOptions} requestOptions - Request-specific configuration.
45
+ * @param {Dashboard.RequestOptions} requestOptions - Request-specific configuration.
61
46
  *
62
47
  * @throws {@link CortexAI.BadRequestError}
63
48
  * @throws {@link CortexAI.UnauthorizedError}
@@ -68,28 +53,19 @@ class UserMemory {
68
53
  * @throws {@link CortexAI.ServiceUnavailableError}
69
54
  *
70
55
  * @example
71
- * await client.userMemory.listUserMemories({
72
- * tenant_id: "tenant_1234",
73
- * sub_tenant_id: "sub_tenant_4567"
74
- * })
56
+ * await client.dashboard.listApis()
75
57
  */
76
- listUserMemories(request, requestOptions) {
77
- return core.HttpResponsePromise.fromPromise(this.__listUserMemories(request, requestOptions));
58
+ listApis(requestOptions) {
59
+ return core.HttpResponsePromise.fromPromise(this.__listApis(requestOptions));
78
60
  }
79
- async __listUserMemories(request, requestOptions) {
61
+ async __listApis(requestOptions) {
80
62
  var _a, _b, _c;
81
- const { tenant_id: tenantId, sub_tenant_id: subTenantId } = request;
82
- const _queryParams = {};
83
- _queryParams["tenant_id"] = tenantId;
84
- if (subTenantId != null) {
85
- _queryParams["sub_tenant_id"] = subTenantId;
86
- }
87
63
  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);
88
64
  const _response = await core.fetcher({
89
- 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_memory/list_user_memories"),
65
+ 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, "dashboard/resources/list/api_keys"),
90
66
  method: "GET",
91
67
  headers: _headers,
92
- queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
68
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
93
69
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
94
70
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
95
71
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -129,7 +105,7 @@ class UserMemory {
129
105
  rawResponse: _response.rawResponse,
130
106
  });
131
107
  case "timeout":
132
- throw new errors.CortexAITimeoutError("Timeout exceeded when calling GET /user_memory/list_user_memories.");
108
+ throw new errors.CortexAITimeoutError("Timeout exceeded when calling GET /dashboard/resources/list/api_keys.");
133
109
  case "unknown":
134
110
  throw new errors.CortexAIError({
135
111
  message: _response.error.errorMessage,
@@ -138,16 +114,12 @@ class UserMemory {
138
114
  }
139
115
  }
140
116
  /**
141
- * Permanently remove a specific user memory from storage.
117
+ * List all sources for a tenant/sub-tenant combination.
142
118
  *
143
- * This endpoint allows you to delete a user memory by its unique identifier.
144
- * Once deleted, the memory cannot be recovered, so use this operation carefully.
119
+ * Uses the same logic as the existing get_sources function.
145
120
  *
146
- * The memory will be removed from your tenant's storage and will no longer
147
- * appear in search results or memory listings.
148
- *
149
- * @param {CortexAI.UserMemoryDeleteUserMemoryRequest} request
150
- * @param {UserMemory.RequestOptions} requestOptions - Request-specific configuration.
121
+ * @param {CortexAI.ListSourcesDashboardSourcesGetRequest} request
122
+ * @param {Dashboard.RequestOptions} requestOptions - Request-specific configuration.
151
123
  *
152
124
  * @throws {@link CortexAI.BadRequestError}
153
125
  * @throws {@link CortexAI.UnauthorizedError}
@@ -158,28 +130,24 @@ class UserMemory {
158
130
  * @throws {@link CortexAI.ServiceUnavailableError}
159
131
  *
160
132
  * @example
161
- * await client.userMemory.deleteUserMemory({
162
- * tenant_id: "tenant_1234",
163
- * memory_id: "memory_1234",
164
- * sub_tenant_id: "sub_tenant_4567"
133
+ * await client.dashboard.listSources({
134
+ * tenant_id: "tenant_id",
135
+ * sub_tenant_id: "sub_tenant_id"
165
136
  * })
166
137
  */
167
- deleteUserMemory(request, requestOptions) {
168
- return core.HttpResponsePromise.fromPromise(this.__deleteUserMemory(request, requestOptions));
138
+ listSources(request, requestOptions) {
139
+ return core.HttpResponsePromise.fromPromise(this.__listSources(request, requestOptions));
169
140
  }
170
- async __deleteUserMemory(request, requestOptions) {
141
+ async __listSources(request, requestOptions) {
171
142
  var _a, _b, _c;
172
- const { tenant_id: tenantId, memory_id: memoryId, sub_tenant_id: subTenantId } = request;
143
+ const { tenant_id: tenantId, sub_tenant_id: subTenantId } = request;
173
144
  const _queryParams = {};
174
145
  _queryParams["tenant_id"] = tenantId;
175
- _queryParams["memory_id"] = memoryId;
176
- if (subTenantId != null) {
177
- _queryParams["sub_tenant_id"] = subTenantId;
178
- }
146
+ _queryParams["sub_tenant_id"] = subTenantId;
179
147
  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);
180
148
  const _response = await core.fetcher({
181
- 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_memory/delete_user_memory"),
182
- method: "DELETE",
149
+ 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, "dashboard/sources"),
150
+ method: "GET",
183
151
  headers: _headers,
184
152
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
185
153
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -221,7 +189,7 @@ class UserMemory {
221
189
  rawResponse: _response.rawResponse,
222
190
  });
223
191
  case "timeout":
224
- throw new errors.CortexAITimeoutError("Timeout exceeded when calling DELETE /user_memory/delete_user_memory.");
192
+ throw new errors.CortexAITimeoutError("Timeout exceeded when calling GET /dashboard/sources.");
225
193
  case "unknown":
226
194
  throw new errors.CortexAIError({
227
195
  message: _response.error.errorMessage,
@@ -230,17 +198,12 @@ class UserMemory {
230
198
  }
231
199
  }
232
200
  /**
233
- * Find relevant user memories using semantic search and knowledge graph.
234
- *
235
- * This endpoint performs parallel searches:
236
- * 1. Semantic search in Weaviate across all stored user memories
237
- * 2. Entity-based search in the knowledge graph for memory entities
201
+ * List all tenants for dashboard view.
238
202
  *
239
- * Results from both sources are combined and ranked by relevance to provide
240
- * comprehensive memory retrieval.
203
+ * Uses Firebase authentication to identify the user and returns tenant
204
+ * mappings associated with that user's organization.
241
205
  *
242
- * @param {CortexAI.RetrieveUserMemoryRequest} request
243
- * @param {UserMemory.RequestOptions} requestOptions - Request-specific configuration.
206
+ * @param {Dashboard.RequestOptions} requestOptions - Request-specific configuration.
244
207
  *
245
208
  * @throws {@link CortexAI.BadRequestError}
246
209
  * @throws {@link CortexAI.UnauthorizedError}
@@ -251,36 +214,19 @@ class UserMemory {
251
214
  * @throws {@link CortexAI.ServiceUnavailableError}
252
215
  *
253
216
  * @example
254
- * await client.userMemory.retrieveUserMemory({
255
- * tenant_id: "tenant_1234",
256
- * sub_tenant_id: "sub_tenant_4567",
257
- * max_count: 5,
258
- * query: "Which mode does user prefer"
259
- * })
217
+ * await client.dashboard.listTenants()
260
218
  */
261
- retrieveUserMemory(request, requestOptions) {
262
- return core.HttpResponsePromise.fromPromise(this.__retrieveUserMemory(request, requestOptions));
219
+ listTenants(requestOptions) {
220
+ return core.HttpResponsePromise.fromPromise(this.__listTenants(requestOptions));
263
221
  }
264
- async __retrieveUserMemory(request, requestOptions) {
222
+ async __listTenants(requestOptions) {
265
223
  var _a, _b, _c;
266
- const { tenant_id: tenantId, sub_tenant_id: subTenantId, max_count: maxCount } = request, _body = __rest(request, ["tenant_id", "sub_tenant_id", "max_count"]);
267
- const _queryParams = {};
268
- _queryParams["tenant_id"] = tenantId;
269
- if (subTenantId != null) {
270
- _queryParams["sub_tenant_id"] = subTenantId;
271
- }
272
- if (maxCount != null) {
273
- _queryParams["max_count"] = maxCount.toString();
274
- }
275
224
  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);
276
225
  const _response = await core.fetcher({
277
- 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_memory/retrieve_user_memory"),
278
- method: "POST",
226
+ 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, "dashboard/resources/list/tenant_ids"),
227
+ method: "GET",
279
228
  headers: _headers,
280
- contentType: "application/json",
281
- queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
282
- requestType: "json",
283
- body: _body,
229
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
284
230
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
285
231
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
286
232
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -320,7 +266,7 @@ class UserMemory {
320
266
  rawResponse: _response.rawResponse,
321
267
  });
322
268
  case "timeout":
323
- throw new errors.CortexAITimeoutError("Timeout exceeded when calling POST /user_memory/retrieve_user_memory.");
269
+ throw new errors.CortexAITimeoutError("Timeout exceeded when calling GET /dashboard/resources/list/tenant_ids.");
324
270
  case "unknown":
325
271
  throw new errors.CortexAIError({
326
272
  message: _response.error.errorMessage,
@@ -329,52 +275,124 @@ class UserMemory {
329
275
  }
330
276
  }
331
277
  /**
332
- * Store new user memories for future reference.
333
- *
334
- * This endpoint allows you to add memories in two formats:
335
- * 1. Raw text string - A single text-based memory
336
- * 2. User/Assistant pairs array - Conversation pairs that will be chunked as a single memory
278
+ * @param {Dashboard.RequestOptions} requestOptions - Request-specific configuration.
337
279
  *
338
- * The stored memories will be chunked, indexed in both Weaviate and the knowledge graph,
339
- * and made available for semantic search and graph-based retrieval.
280
+ * @example
281
+ * await client.dashboard.isOrganizationAdmin()
282
+ */
283
+ isOrganizationAdmin(requestOptions) {
284
+ return core.HttpResponsePromise.fromPromise(this.__isOrganizationAdmin(requestOptions));
285
+ }
286
+ async __isOrganizationAdmin(requestOptions) {
287
+ var _a, _b, _c;
288
+ 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);
289
+ const _response = await core.fetcher({
290
+ 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, "dashboard/user/is_user_admin"),
291
+ method: "GET",
292
+ headers: _headers,
293
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
294
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
295
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
296
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
297
+ });
298
+ if (_response.ok) {
299
+ return { data: _response.body, rawResponse: _response.rawResponse };
300
+ }
301
+ if (_response.error.reason === "status-code") {
302
+ throw new errors.CortexAIError({
303
+ statusCode: _response.error.statusCode,
304
+ body: _response.error.body,
305
+ rawResponse: _response.rawResponse,
306
+ });
307
+ }
308
+ switch (_response.error.reason) {
309
+ case "non-json":
310
+ throw new errors.CortexAIError({
311
+ statusCode: _response.error.statusCode,
312
+ body: _response.error.rawBody,
313
+ rawResponse: _response.rawResponse,
314
+ });
315
+ case "timeout":
316
+ throw new errors.CortexAITimeoutError("Timeout exceeded when calling GET /dashboard/user/is_user_admin.");
317
+ case "unknown":
318
+ throw new errors.CortexAIError({
319
+ message: _response.error.errorMessage,
320
+ rawResponse: _response.rawResponse,
321
+ });
322
+ }
323
+ }
324
+ /**
325
+ * @param {Dashboard.RequestOptions} requestOptions - Request-specific configuration.
340
326
  *
341
- * @param {CortexAI.AddUserMemoryRequest} request
342
- * @param {UserMemory.RequestOptions} requestOptions - Request-specific configuration.
327
+ * @example
328
+ * await client.dashboard.userDetailsEp()
329
+ */
330
+ userDetailsEp(requestOptions) {
331
+ return core.HttpResponsePromise.fromPromise(this.__userDetailsEp(requestOptions));
332
+ }
333
+ async __userDetailsEp(requestOptions) {
334
+ var _a, _b, _c;
335
+ 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);
336
+ const _response = await core.fetcher({
337
+ 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, "dashboard/user/user_details"),
338
+ method: "GET",
339
+ headers: _headers,
340
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
341
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
342
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
343
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
344
+ });
345
+ if (_response.ok) {
346
+ return { data: _response.body, rawResponse: _response.rawResponse };
347
+ }
348
+ if (_response.error.reason === "status-code") {
349
+ throw new errors.CortexAIError({
350
+ statusCode: _response.error.statusCode,
351
+ body: _response.error.body,
352
+ rawResponse: _response.rawResponse,
353
+ });
354
+ }
355
+ switch (_response.error.reason) {
356
+ case "non-json":
357
+ throw new errors.CortexAIError({
358
+ statusCode: _response.error.statusCode,
359
+ body: _response.error.rawBody,
360
+ rawResponse: _response.rawResponse,
361
+ });
362
+ case "timeout":
363
+ throw new errors.CortexAITimeoutError("Timeout exceeded when calling GET /dashboard/user/user_details.");
364
+ case "unknown":
365
+ throw new errors.CortexAIError({
366
+ message: _response.error.errorMessage,
367
+ rawResponse: _response.rawResponse,
368
+ });
369
+ }
370
+ }
371
+ /**
372
+ * @param {CortexAI.CreateUserDashboardUserCreateUserPostRequest} request
373
+ * @param {Dashboard.RequestOptions} requestOptions - Request-specific configuration.
343
374
  *
344
- * @throws {@link CortexAI.BadRequestError}
345
- * @throws {@link CortexAI.UnauthorizedError}
346
- * @throws {@link CortexAI.ForbiddenError}
347
- * @throws {@link CortexAI.NotFoundError}
348
375
  * @throws {@link CortexAI.UnprocessableEntityError}
349
- * @throws {@link CortexAI.InternalServerError}
350
- * @throws {@link CortexAI.ServiceUnavailableError}
351
376
  *
352
377
  * @example
353
- * await client.userMemory.addUserMemory({
354
- * tenant_id: "tenant_1234",
355
- * sub_tenant_id: "sub_tenant_4567"
378
+ * await client.dashboard.createUser({
379
+ * full_name: "full_name"
356
380
  * })
357
381
  */
358
- addUserMemory(request, requestOptions) {
359
- return core.HttpResponsePromise.fromPromise(this.__addUserMemory(request, requestOptions));
382
+ createUser(request, requestOptions) {
383
+ return core.HttpResponsePromise.fromPromise(this.__createUser(request, requestOptions));
360
384
  }
361
- async __addUserMemory(request, requestOptions) {
385
+ async __createUser(request, requestOptions) {
362
386
  var _a, _b, _c;
363
- const { tenant_id: tenantId, sub_tenant_id: subTenantId } = request, _body = __rest(request, ["tenant_id", "sub_tenant_id"]);
387
+ const { full_name: fullName } = request;
364
388
  const _queryParams = {};
365
- _queryParams["tenant_id"] = tenantId;
366
- if (subTenantId != null) {
367
- _queryParams["sub_tenant_id"] = subTenantId;
368
- }
389
+ _queryParams["full_name"] = fullName;
369
390
  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);
370
391
  const _response = await core.fetcher({
371
- 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_memory/add_user_memory"),
392
+ 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, "dashboard/user/create_user"),
372
393
  method: "POST",
373
394
  headers: _headers,
374
- contentType: "application/json",
375
395
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
376
- requestType: "json",
377
- body: _body,
378
396
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
379
397
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
380
398
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -384,20 +402,8 @@ class UserMemory {
384
402
  }
385
403
  if (_response.error.reason === "status-code") {
386
404
  switch (_response.error.statusCode) {
387
- case 400:
388
- throw new CortexAI.BadRequestError(_response.error.body, _response.rawResponse);
389
- case 401:
390
- throw new CortexAI.UnauthorizedError(_response.error.body, _response.rawResponse);
391
- case 403:
392
- throw new CortexAI.ForbiddenError(_response.error.body, _response.rawResponse);
393
- case 404:
394
- throw new CortexAI.NotFoundError(_response.error.body, _response.rawResponse);
395
405
  case 422:
396
406
  throw new CortexAI.UnprocessableEntityError(_response.error.body, _response.rawResponse);
397
- case 500:
398
- throw new CortexAI.InternalServerError(_response.error.body, _response.rawResponse);
399
- case 503:
400
- throw new CortexAI.ServiceUnavailableError(_response.error.body, _response.rawResponse);
401
407
  default:
402
408
  throw new errors.CortexAIError({
403
409
  statusCode: _response.error.statusCode,
@@ -414,7 +420,54 @@ class UserMemory {
414
420
  rawResponse: _response.rawResponse,
415
421
  });
416
422
  case "timeout":
417
- throw new errors.CortexAITimeoutError("Timeout exceeded when calling POST /user_memory/add_user_memory.");
423
+ throw new errors.CortexAITimeoutError("Timeout exceeded when calling POST /dashboard/user/create_user.");
424
+ case "unknown":
425
+ throw new errors.CortexAIError({
426
+ message: _response.error.errorMessage,
427
+ rawResponse: _response.rawResponse,
428
+ });
429
+ }
430
+ }
431
+ /**
432
+ * @param {Dashboard.RequestOptions} requestOptions - Request-specific configuration.
433
+ *
434
+ * @example
435
+ * await client.dashboard.checkUserExists()
436
+ */
437
+ checkUserExists(requestOptions) {
438
+ return core.HttpResponsePromise.fromPromise(this.__checkUserExists(requestOptions));
439
+ }
440
+ async __checkUserExists(requestOptions) {
441
+ var _a, _b, _c;
442
+ 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);
443
+ const _response = await core.fetcher({
444
+ 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, "dashboard/user/check_user_exists"),
445
+ method: "GET",
446
+ headers: _headers,
447
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
448
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
449
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
450
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
451
+ });
452
+ if (_response.ok) {
453
+ return { data: _response.body, rawResponse: _response.rawResponse };
454
+ }
455
+ if (_response.error.reason === "status-code") {
456
+ throw new errors.CortexAIError({
457
+ statusCode: _response.error.statusCode,
458
+ body: _response.error.body,
459
+ rawResponse: _response.rawResponse,
460
+ });
461
+ }
462
+ switch (_response.error.reason) {
463
+ case "non-json":
464
+ throw new errors.CortexAIError({
465
+ statusCode: _response.error.statusCode,
466
+ body: _response.error.rawBody,
467
+ rawResponse: _response.rawResponse,
468
+ });
469
+ case "timeout":
470
+ throw new errors.CortexAITimeoutError("Timeout exceeded when calling GET /dashboard/user/check_user_exists.");
418
471
  case "unknown":
419
472
  throw new errors.CortexAIError({
420
473
  message: _response.error.errorMessage,
@@ -430,4 +483,4 @@ class UserMemory {
430
483
  return undefined;
431
484
  }
432
485
  }
433
- exports.UserMemory = UserMemory;
486
+ exports.Dashboard = Dashboard;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * full_name: "full_name"
8
+ * }
9
+ */
10
+ export interface CreateUserDashboardUserCreateUserPostRequest {
11
+ full_name: string;
12
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * tenant_id: "tenant_id",
8
+ * sub_tenant_id: "sub_tenant_id"
9
+ * }
10
+ */
11
+ export interface ListSourcesDashboardSourcesGetRequest {
12
+ /** Tenant ID */
13
+ tenant_id: string;
14
+ /** Sub-tenant ID */
15
+ sub_tenant_id: string;
16
+ }
@@ -0,0 +1,2 @@
1
+ export { type ListSourcesDashboardSourcesGetRequest } from "./ListSourcesDashboardSourcesGetRequest.js";
2
+ export { type CreateUserDashboardUserCreateUserPostRequest } from "./CreateUserDashboardUserCreateUserPostRequest.js";
@@ -30,11 +30,17 @@ export declare class Embeddings {
30
30
  protected readonly _options: Embeddings.Options;
31
31
  constructor(_options?: Embeddings.Options);
32
32
  /**
33
- * Delete embedding chunks by chunk ID.
33
+ * Upload pre-computed embeddings for advanced similarity search.
34
34
  *
35
- * Use this to remove specific chunks from your embeddings index when they are no longer valid or should not appear in results.
35
+ * This endpoint accepts vector embeddings that you’ve generated externally,
36
+ * allowing you to integrate with custom embedding models or existing vector databases.
37
+ * The embeddings represent chunks of your content as numerical vectors.
36
38
  *
37
- * @param {CortexAI.EmbeddingsDeleteRequest} request
39
+ * The system stores these embeddings and makes them available for semantic search and similarity matching.
40
+ * Use this when you want to leverage specialized embedding models or have existing vector representations.
41
+ * When upsert=True, existing embeddings with the same chunk_id will be updated.
42
+ *
43
+ * @param {CortexAI.BodyInsertRawEmbeddingsEndpointEmbeddingsInsertRawEmbeddingsPost} request
38
44
  * @param {Embeddings.RequestOptions} requestOptions - Request-specific configuration.
39
45
  *
40
46
  * @throws {@link CortexAI.BadRequestError}
@@ -46,23 +52,28 @@ export declare class Embeddings {
46
52
  * @throws {@link CortexAI.ServiceUnavailableError}
47
53
  *
48
54
  * @example
49
- * await client.embeddings.delete({
50
- * chunk_ids: ["CortexEmbeddings123_0", "CortexEmbeddings123_1"],
51
- * tenant_id: "tenant_1234"
55
+ * await client.embeddings.insert({
56
+ * tenant_id: "tenant_id",
57
+ * embeddings: [{
58
+ * source_id: "source_id",
59
+ * embeddings: [{
60
+ * chunk_id: "chunk_id",
61
+ * embedding: [1.1]
62
+ * }]
63
+ * }]
52
64
  * })
53
65
  */
54
- delete(request: CortexAI.EmbeddingsDeleteRequest, requestOptions?: Embeddings.RequestOptions): core.HttpResponsePromise<CortexAI.EmbeddingsDeleteData>;
55
- private __delete;
66
+ insert(request: CortexAI.BodyInsertRawEmbeddingsEndpointEmbeddingsInsertRawEmbeddingsPost, requestOptions?: Embeddings.RequestOptions): core.HttpResponsePromise<CortexAI.InsertResult>;
67
+ private __insert;
56
68
  /**
57
69
  * Find similar chunks using an embedding vector.
58
70
  *
59
71
  * Use this to retrieve the most similar chunk IDs to a single query embedding.
60
72
  *
61
- *
62
- * Expected outcome
73
+ * Expected outcome:
63
74
  * - You receive the closest chunk IDs with optional similarity scores.
64
75
  *
65
- * @param {CortexAI.EmbeddingsSearchRequest} request
76
+ * @param {CortexAI.BodySearchRawEmbeddingsEndpointEmbeddingsSearchRawEmbeddingsPost} request
66
77
  * @param {Embeddings.RequestOptions} requestOptions - Request-specific configuration.
67
78
  *
68
79
  * @throws {@link CortexAI.BadRequestError}
@@ -75,17 +86,18 @@ export declare class Embeddings {
75
86
  *
76
87
  * @example
77
88
  * await client.embeddings.search({
78
- * tenant_id: "tenant_1234"
89
+ * tenant_id: "tenant_id",
90
+ * sub_tenant_id: "sub_tenant_id",
91
+ * query_embedding: [1.1]
79
92
  * })
80
93
  */
81
- search(request: CortexAI.EmbeddingsSearchRequest, requestOptions?: Embeddings.RequestOptions): core.HttpResponsePromise<CortexAI.EmbeddingsSearchData>;
94
+ search(request: CortexAI.BodySearchRawEmbeddingsEndpointEmbeddingsSearchRawEmbeddingsPost, requestOptions?: Embeddings.RequestOptions): core.HttpResponsePromise<CortexAI.RawEmbeddingSearchResult[]>;
82
95
  private __search;
83
96
  /**
84
97
  * Retrieve embeddings for specific chunk IDs.
85
- *
86
98
  * Use this when you already know the chunk IDs and need their corresponding embeddings.
87
99
  *
88
- * @param {CortexAI.GetEmbeddingsBasedOnChunkIdsRequest} request
100
+ * @param {CortexAI.BodyFilterRawEmbeddingsEndpointEmbeddingsFilterRawEmbeddingsPost} request
89
101
  * @param {Embeddings.RequestOptions} requestOptions - Request-specific configuration.
90
102
  *
91
103
  * @throws {@link CortexAI.BadRequestError}
@@ -97,19 +109,20 @@ export declare class Embeddings {
97
109
  * @throws {@link CortexAI.ServiceUnavailableError}
98
110
  *
99
111
  * @example
100
- * await client.embeddings.getByChunkIds({
101
- * chunk_ids: ["CortexEmbeddings123_0", "CortexEmbeddings123_1"],
102
- * tenant_id: "tenant_1234"
112
+ * await client.embeddings.filter({
113
+ * tenant_id: "tenant_id",
114
+ * sub_tenant_id: "sub_tenant_id"
103
115
  * })
104
116
  */
105
- getByChunkIds(request: CortexAI.GetEmbeddingsBasedOnChunkIdsRequest, requestOptions?: Embeddings.RequestOptions): core.HttpResponsePromise<CortexAI.EmbeddingsGetData>;
106
- private __getByChunkIds;
117
+ filter(request: CortexAI.BodyFilterRawEmbeddingsEndpointEmbeddingsFilterRawEmbeddingsPost, requestOptions?: Embeddings.RequestOptions): core.HttpResponsePromise<CortexAI.RawEmbeddingSearchResult[]>;
118
+ private __filter;
107
119
  /**
108
- * Create an embeddings collection for a tenant.
120
+ * Delete embedding chunks by chunk ID.
109
121
  *
110
- * Use this to initialize storage so you can index and query embeddings for the tenant.
122
+ * Use this to remove specific chunks from your embeddings index when they are no longer
123
+ * valid or should not appear in results.
111
124
  *
112
- * @param {CortexAI.EmbeddingsCreateCollectionRequest} request
125
+ * @param {CortexAI.EmbeddingsDeleteRequest} request
113
126
  * @param {Embeddings.RequestOptions} requestOptions - Request-specific configuration.
114
127
  *
115
128
  * @throws {@link CortexAI.BadRequestError}
@@ -121,11 +134,11 @@ export declare class Embeddings {
121
134
  * @throws {@link CortexAI.ServiceUnavailableError}
122
135
  *
123
136
  * @example
124
- * await client.embeddings.createCollection({
125
- * tenant_id: "tenant_1234"
137
+ * await client.embeddings.delete({
138
+ * tenant_id: "tenant_id"
126
139
  * })
127
140
  */
128
- createCollection(request: CortexAI.EmbeddingsCreateCollectionRequest, requestOptions?: Embeddings.RequestOptions): core.HttpResponsePromise<CortexAI.EmbeddingsCreateCollectionData>;
129
- private __createCollection;
141
+ delete(request: CortexAI.EmbeddingsDeleteRequest, requestOptions?: Embeddings.RequestOptions): core.HttpResponsePromise<CortexAI.DeleteResult>;
142
+ private __delete;
130
143
  protected _getAuthorizationHeader(): Promise<string | undefined>;
131
144
  }