@usecortex_ai/node 0.5.0 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (335) hide show
  1. package/LICENSE +23 -23
  2. package/README.md +182 -141
  3. package/dist/Client.d.ts +0 -2
  4. package/dist/Client.js +0 -2
  5. package/dist/api/errors/BadRequestError.d.ts +0 -0
  6. package/dist/api/errors/BadRequestError.js +0 -0
  7. package/dist/api/errors/ForbiddenError.d.ts +0 -0
  8. package/dist/api/errors/ForbiddenError.js +0 -0
  9. package/dist/api/errors/InternalServerError.d.ts +0 -0
  10. package/dist/api/errors/InternalServerError.js +0 -0
  11. package/dist/api/errors/NotFoundError.d.ts +0 -0
  12. package/dist/api/errors/NotFoundError.js +0 -0
  13. package/dist/api/errors/ServiceUnavailableError.d.ts +0 -0
  14. package/dist/api/errors/ServiceUnavailableError.js +0 -0
  15. package/dist/api/errors/TooManyRequestsError.d.ts +0 -0
  16. package/dist/api/errors/TooManyRequestsError.js +0 -0
  17. package/dist/api/errors/UnauthorizedError.d.ts +0 -0
  18. package/dist/api/errors/UnauthorizedError.js +0 -0
  19. package/dist/api/errors/UnprocessableEntityError.d.ts +0 -0
  20. package/dist/api/errors/UnprocessableEntityError.js +0 -0
  21. package/dist/api/errors/index.d.ts +0 -0
  22. package/dist/api/errors/index.js +0 -0
  23. package/dist/api/index.d.ts +1 -1
  24. package/dist/api/index.js +1 -1
  25. package/dist/api/resources/dashboard/client/Client.d.ts +2 -16
  26. package/dist/api/resources/dashboard/client/Client.js +2 -16
  27. package/dist/api/resources/dashboard/client/index.d.ts +0 -0
  28. package/dist/api/resources/dashboard/client/index.js +0 -0
  29. package/dist/api/resources/dashboard/client/requests/CreateUserDashboardUserCreateUserPostRequest.d.ts +0 -0
  30. package/dist/api/resources/dashboard/client/requests/CreateUserDashboardUserCreateUserPostRequest.js +0 -0
  31. package/dist/api/resources/dashboard/client/requests/ListSourcesDashboardSourcesGetRequest.d.ts +2 -2
  32. package/dist/api/resources/dashboard/client/requests/ListSourcesDashboardSourcesGetRequest.js +0 -0
  33. package/dist/api/resources/dashboard/client/requests/index.d.ts +0 -0
  34. package/dist/api/resources/dashboard/client/requests/index.js +0 -0
  35. package/dist/api/resources/dashboard/index.d.ts +0 -0
  36. package/dist/api/resources/dashboard/index.js +0 -0
  37. package/dist/api/resources/embeddings/client/Client.d.ts +20 -33
  38. package/dist/api/resources/embeddings/client/Client.js +28 -41
  39. package/dist/api/resources/embeddings/client/index.d.ts +0 -0
  40. package/dist/api/resources/embeddings/client/index.js +0 -0
  41. package/dist/api/resources/embeddings/client/requests/BodyFilterRawEmbeddingsEndpointEmbeddingsFilterRawEmbeddingsPost.d.ts +2 -2
  42. package/dist/api/resources/embeddings/client/requests/BodyFilterRawEmbeddingsEndpointEmbeddingsFilterRawEmbeddingsPost.js +0 -0
  43. package/dist/api/resources/embeddings/client/requests/BodyInsertRawEmbeddingsEndpointEmbeddingsInsertRawEmbeddingsPost.d.ts +15 -3
  44. package/dist/api/resources/embeddings/client/requests/BodyInsertRawEmbeddingsEndpointEmbeddingsInsertRawEmbeddingsPost.js +0 -0
  45. package/dist/api/resources/embeddings/client/requests/BodySearchRawEmbeddingsEndpointEmbeddingsSearchRawEmbeddingsPost.d.ts +2 -2
  46. package/dist/api/resources/embeddings/client/requests/BodySearchRawEmbeddingsEndpointEmbeddingsSearchRawEmbeddingsPost.js +0 -0
  47. package/dist/api/resources/embeddings/client/requests/EmbeddingsDeleteRequest.d.ts +1 -1
  48. package/dist/api/resources/embeddings/client/requests/EmbeddingsDeleteRequest.js +0 -0
  49. package/dist/api/resources/embeddings/client/requests/index.d.ts +0 -0
  50. package/dist/api/resources/embeddings/client/requests/index.js +0 -0
  51. package/dist/api/resources/embeddings/index.d.ts +0 -0
  52. package/dist/api/resources/embeddings/index.js +0 -0
  53. package/dist/api/resources/fetch/client/Client.d.ts +9 -60
  54. package/dist/api/resources/fetch/client/Client.js +16 -129
  55. package/dist/api/resources/fetch/client/index.d.ts +0 -0
  56. package/dist/api/resources/fetch/client/index.js +0 -0
  57. package/dist/api/resources/fetch/client/requests/FetchGraphRelationsBySourceIdRequest.d.ts +2 -1
  58. package/dist/api/resources/fetch/client/requests/FetchGraphRelationsBySourceIdRequest.js +0 -0
  59. package/dist/api/resources/fetch/client/requests/ListContentRequest.d.ts +20 -0
  60. package/dist/api/resources/fetch/client/requests/{FetchSourcesRequest.js → ListContentRequest.js} +0 -0
  61. package/dist/api/resources/fetch/client/requests/SourceFetchRequest.d.ts +2 -2
  62. package/dist/api/resources/fetch/client/requests/SourceFetchRequest.js +0 -0
  63. package/dist/api/resources/fetch/client/requests/index.d.ts +1 -2
  64. package/dist/api/resources/fetch/client/requests/index.js +0 -0
  65. package/dist/api/resources/fetch/index.d.ts +1 -0
  66. package/dist/api/resources/fetch/index.js +1 -0
  67. package/dist/api/resources/fetch/types/FetchListKnowledgeResponse.d.ts +5 -0
  68. package/dist/api/resources/fetch/{client/requests/ListSourcesByIdRequest.js → types/FetchListKnowledgeResponse.js} +0 -0
  69. package/dist/api/resources/fetch/types/index.d.ts +1 -0
  70. package/dist/api/resources/fetch/types/index.js +17 -0
  71. package/dist/api/resources/index.d.ts +2 -1
  72. package/dist/api/resources/index.js +3 -2
  73. package/dist/api/resources/search/client/Client.d.ts +6 -45
  74. package/dist/api/resources/search/client/Client.js +12 -51
  75. package/dist/api/resources/search/client/index.d.ts +0 -0
  76. package/dist/api/resources/search/client/index.js +0 -0
  77. package/dist/api/resources/search/client/requests/FullTextSearchRequest.d.ts +3 -3
  78. package/dist/api/resources/search/client/requests/FullTextSearchRequest.js +0 -0
  79. package/dist/api/resources/search/client/requests/HybridSearchRequest.d.ts +6 -8
  80. package/dist/api/resources/search/client/requests/HybridSearchRequest.js +0 -0
  81. package/dist/api/resources/search/client/requests/QnASearchRequest.d.ts +2 -2
  82. package/dist/api/resources/search/client/requests/QnASearchRequest.js +0 -0
  83. package/dist/api/resources/search/client/requests/index.d.ts +0 -0
  84. package/dist/api/resources/search/client/requests/index.js +0 -0
  85. package/dist/api/resources/search/index.d.ts +0 -0
  86. package/dist/api/resources/search/index.js +0 -0
  87. package/dist/api/resources/sources/client/Client.d.ts +2 -9
  88. package/dist/api/resources/sources/client/Client.js +4 -11
  89. package/dist/api/resources/sources/client/index.d.ts +0 -0
  90. package/dist/api/resources/sources/client/index.js +0 -0
  91. package/dist/api/resources/sources/client/requests/SourceDeleteRequest.d.ts +2 -2
  92. package/dist/api/resources/sources/client/requests/SourceDeleteRequest.js +0 -0
  93. package/dist/api/resources/sources/client/requests/index.d.ts +0 -0
  94. package/dist/api/resources/sources/client/requests/index.js +0 -0
  95. package/dist/api/resources/sources/index.d.ts +0 -0
  96. package/dist/api/resources/sources/index.js +0 -0
  97. package/dist/api/resources/tenant/client/Client.d.ts +2 -54
  98. package/dist/api/resources/tenant/client/Client.js +4 -56
  99. package/dist/api/resources/tenant/client/index.d.ts +0 -0
  100. package/dist/api/resources/tenant/client/index.js +0 -0
  101. package/dist/api/resources/tenant/client/requests/TenantCreateRequest.d.ts +1 -1
  102. package/dist/api/resources/tenant/client/requests/TenantCreateRequest.js +0 -0
  103. package/dist/api/resources/tenant/client/requests/TenantStatsRequest.d.ts +1 -1
  104. package/dist/api/resources/tenant/client/requests/TenantStatsRequest.js +0 -0
  105. package/dist/api/resources/tenant/client/requests/index.d.ts +0 -0
  106. package/dist/api/resources/tenant/client/requests/index.js +0 -0
  107. package/dist/api/resources/tenant/index.d.ts +0 -0
  108. package/dist/api/resources/tenant/index.js +0 -0
  109. package/dist/api/resources/upload/client/Client.d.ts +9 -73
  110. package/dist/api/resources/upload/client/Client.js +22 -140
  111. package/dist/api/resources/upload/client/index.d.ts +0 -0
  112. package/dist/api/resources/upload/client/index.js +0 -0
  113. package/dist/api/resources/upload/client/requests/BodyAddMemoryMemoriesAddMemoryPost.d.ts +1 -1
  114. package/dist/api/resources/upload/client/requests/BodyAddMemoryMemoriesAddMemoryPost.js +0 -0
  115. package/dist/api/resources/upload/client/requests/{BodyUploadDocumentIngestionUploadDocumentPost.d.ts → BodyUploadKnowledgeIngestionUploadKnowledgePost.d.ts} +7 -5
  116. package/dist/api/resources/upload/client/requests/{BodyUploadAppIngestionUploadAppPost.js → BodyUploadKnowledgeIngestionUploadKnowledgePost.js} +0 -0
  117. package/dist/api/resources/upload/client/requests/UploadDeleteMemoryRequest.d.ts +2 -2
  118. package/dist/api/resources/upload/client/requests/UploadDeleteMemoryRequest.js +0 -0
  119. package/dist/api/resources/upload/client/requests/UploadVerifyProcessingRequest.d.ts +2 -1
  120. package/dist/api/resources/upload/client/requests/UploadVerifyProcessingRequest.js +0 -0
  121. package/dist/api/resources/upload/client/requests/index.d.ts +1 -2
  122. package/dist/api/resources/upload/client/requests/index.js +0 -0
  123. package/dist/api/resources/upload/index.d.ts +0 -0
  124. package/dist/api/resources/upload/index.js +0 -0
  125. package/dist/api/types/ActualErrorResponse.d.ts +0 -0
  126. package/dist/api/types/ActualErrorResponse.js +0 -0
  127. package/dist/api/types/AddMemoryResponse.d.ts +0 -0
  128. package/dist/api/types/AddMemoryResponse.js +0 -0
  129. package/dist/api/types/ApiKeyInfo.d.ts +0 -0
  130. package/dist/api/types/ApiKeyInfo.js +0 -0
  131. package/dist/api/types/AttachmentModel.d.ts +0 -0
  132. package/dist/api/types/AttachmentModel.js +0 -0
  133. package/dist/api/types/Bm25OperatorType.d.ts +0 -0
  134. package/dist/api/types/Bm25OperatorType.js +0 -0
  135. package/dist/api/types/CollectionStats.d.ts +0 -0
  136. package/dist/api/types/CollectionStats.js +0 -0
  137. package/dist/api/types/ContentModel.d.ts +0 -0
  138. package/dist/api/types/ContentModel.js +0 -0
  139. package/dist/api/types/CustomPropertyDefinition.d.ts +0 -0
  140. package/dist/api/types/CustomPropertyDefinition.js +0 -0
  141. package/dist/api/types/DashboardApisResponse.d.ts +0 -0
  142. package/dist/api/types/DashboardApisResponse.js +0 -0
  143. package/dist/api/types/DashboardSourcesResponse.d.ts +0 -0
  144. package/dist/api/types/DashboardSourcesResponse.js +0 -0
  145. package/dist/api/types/DashboardTenantsResponse.d.ts +0 -0
  146. package/dist/api/types/DashboardTenantsResponse.js +0 -0
  147. package/dist/api/types/DeleteResult.d.ts +0 -0
  148. package/dist/api/types/DeleteResult.js +0 -0
  149. package/dist/api/types/DeleteUserMemoryResponse.d.ts +0 -0
  150. package/dist/api/types/DeleteUserMemoryResponse.js +0 -0
  151. package/dist/api/types/Entity.d.ts +0 -0
  152. package/dist/api/types/Entity.js +0 -0
  153. package/dist/api/types/ErrorResponse.d.ts +0 -0
  154. package/dist/api/types/ErrorResponse.js +0 -0
  155. package/dist/api/types/FetchMode.d.ts +0 -0
  156. package/dist/api/types/FetchMode.js +0 -0
  157. package/dist/api/types/ForcefulRelationsPayload.d.ts +0 -0
  158. package/dist/api/types/ForcefulRelationsPayload.js +0 -0
  159. package/dist/api/types/GraphContext.d.ts +0 -0
  160. package/dist/api/types/GraphContext.js +0 -0
  161. package/dist/api/types/HttpValidationError.d.ts +0 -0
  162. package/dist/api/types/HttpValidationError.js +0 -0
  163. package/dist/api/types/Infra.d.ts +0 -0
  164. package/dist/api/types/Infra.js +0 -0
  165. package/dist/api/types/InsertResult.d.ts +0 -0
  166. package/dist/api/types/InsertResult.js +0 -0
  167. package/dist/api/types/ListContentKind.d.ts +8 -0
  168. package/dist/api/types/ListContentKind.js +10 -0
  169. package/dist/api/types/ListUserMemoriesResponse.d.ts +13 -0
  170. package/dist/api/{resources/upload/client/requests/BodyUploadDocumentIngestionUploadDocumentPost.js → types/ListUserMemoriesResponse.js} +0 -0
  171. package/dist/api/types/MemoryItem.d.ts +0 -0
  172. package/dist/api/types/MemoryItem.js +0 -0
  173. package/dist/api/types/MemoryResultItem.d.ts +0 -0
  174. package/dist/api/types/MemoryResultItem.js +0 -0
  175. package/dist/api/types/MilvusDataType.d.ts +0 -0
  176. package/dist/api/types/MilvusDataType.js +0 -0
  177. package/dist/api/types/PathTriplet.d.ts +0 -0
  178. package/dist/api/types/PathTriplet.js +0 -0
  179. package/dist/api/types/ProcessingStatus.d.ts +0 -0
  180. package/dist/api/types/ProcessingStatus.js +0 -0
  181. package/dist/api/types/QnASearchResponse.d.ts +0 -0
  182. package/dist/api/types/QnASearchResponse.js +0 -0
  183. package/dist/api/types/RawEmbeddingDocument.d.ts +0 -0
  184. package/dist/api/types/RawEmbeddingDocument.js +0 -0
  185. package/dist/api/types/RawEmbeddingSearchResult.d.ts +0 -0
  186. package/dist/api/types/RawEmbeddingSearchResult.js +0 -0
  187. package/dist/api/types/RawEmbeddingVector.d.ts +0 -0
  188. package/dist/api/types/RawEmbeddingVector.js +0 -0
  189. package/dist/api/types/RelationEvidence.d.ts +0 -0
  190. package/dist/api/types/RelationEvidence.js +0 -0
  191. package/dist/api/types/RetrievalResult.d.ts +1 -1
  192. package/dist/api/types/RetrievalResult.js +0 -0
  193. package/dist/api/types/RetrieveMode.d.ts +2 -2
  194. package/dist/api/types/RetrieveMode.js +1 -1
  195. package/dist/api/types/ScoredPathResponse.d.ts +0 -0
  196. package/dist/api/types/ScoredPathResponse.js +0 -0
  197. package/dist/api/types/SearchMode.d.ts +0 -0
  198. package/dist/api/types/SearchMode.js +0 -0
  199. package/dist/api/types/SourceDeleteResponse.d.ts +0 -0
  200. package/dist/api/types/SourceDeleteResponse.js +0 -0
  201. package/dist/api/types/SourceDeleteResultItem.d.ts +0 -0
  202. package/dist/api/types/SourceDeleteResultItem.js +0 -0
  203. package/dist/api/types/SourceFetchResponse.d.ts +0 -0
  204. package/dist/api/types/SourceFetchResponse.js +0 -0
  205. package/dist/api/types/SourceGraphRelationsResponse.d.ts +0 -0
  206. package/dist/api/types/SourceGraphRelationsResponse.js +0 -0
  207. package/dist/api/types/SourceListResponse.d.ts +0 -0
  208. package/dist/api/types/SourceListResponse.js +0 -0
  209. package/dist/api/types/SourceModel.d.ts +0 -0
  210. package/dist/api/types/SourceModel.js +0 -0
  211. package/dist/api/types/SourceStatus.d.ts +0 -0
  212. package/dist/api/types/SourceStatus.js +0 -0
  213. package/dist/api/types/SourceUploadResponse.d.ts +0 -0
  214. package/dist/api/types/SourceUploadResponse.js +0 -0
  215. package/dist/api/types/SourceUploadResultItem.d.ts +0 -0
  216. package/dist/api/types/SourceUploadResultItem.js +0 -0
  217. package/dist/api/types/SupportedLlmProviders.d.ts +0 -0
  218. package/dist/api/types/SupportedLlmProviders.js +0 -0
  219. package/dist/api/types/TenantCreateResponse.d.ts +0 -0
  220. package/dist/api/types/TenantCreateResponse.js +0 -0
  221. package/dist/api/types/TenantInfo.d.ts +0 -0
  222. package/dist/api/types/TenantInfo.js +0 -0
  223. package/dist/api/types/TenantMetadataSchemaInfo.d.ts +0 -0
  224. package/dist/api/types/TenantMetadataSchemaInfo.js +0 -0
  225. package/dist/api/types/TenantStatsResponse.d.ts +0 -0
  226. package/dist/api/types/TenantStatsResponse.js +0 -0
  227. package/dist/api/types/TripletWithEvidence.d.ts +0 -0
  228. package/dist/api/types/TripletWithEvidence.js +0 -0
  229. package/dist/api/types/UserAssistantPair.d.ts +0 -0
  230. package/dist/api/types/UserAssistantPair.js +0 -0
  231. package/dist/api/types/UserMemory.d.ts +12 -0
  232. package/dist/api/types/{AppSourcesUploadData.js → UserMemory.js} +0 -0
  233. package/dist/api/types/ValidationError.d.ts +0 -0
  234. package/dist/api/types/ValidationError.js +0 -0
  235. package/dist/api/types/VectorStoreChunk.d.ts +0 -0
  236. package/dist/api/types/VectorStoreChunk.js +0 -0
  237. package/dist/api/types/index.d.ts +3 -1
  238. package/dist/api/types/index.js +3 -1
  239. package/dist/core/auth/AuthProvider.d.ts +0 -0
  240. package/dist/core/auth/AuthProvider.js +0 -0
  241. package/dist/core/auth/AuthRequest.d.ts +0 -0
  242. package/dist/core/auth/AuthRequest.js +0 -0
  243. package/dist/core/auth/BasicAuth.d.ts +0 -0
  244. package/dist/core/auth/BasicAuth.js +0 -0
  245. package/dist/core/auth/BearerToken.d.ts +0 -0
  246. package/dist/core/auth/BearerToken.js +0 -0
  247. package/dist/core/auth/index.d.ts +0 -0
  248. package/dist/core/auth/index.js +0 -0
  249. package/dist/core/base64.d.ts +0 -0
  250. package/dist/core/base64.js +0 -0
  251. package/dist/core/exports.d.ts +0 -0
  252. package/dist/core/exports.js +0 -0
  253. package/dist/core/fetcher/APIResponse.d.ts +0 -0
  254. package/dist/core/fetcher/APIResponse.js +0 -0
  255. package/dist/core/fetcher/BinaryResponse.d.ts +0 -0
  256. package/dist/core/fetcher/BinaryResponse.js +0 -0
  257. package/dist/core/fetcher/Fetcher.d.ts +0 -0
  258. package/dist/core/fetcher/Fetcher.js +0 -0
  259. package/dist/core/fetcher/Headers.d.ts +0 -0
  260. package/dist/core/fetcher/Headers.js +0 -0
  261. package/dist/core/fetcher/HttpResponsePromise.d.ts +0 -0
  262. package/dist/core/fetcher/HttpResponsePromise.js +0 -0
  263. package/dist/core/fetcher/RawResponse.d.ts +0 -0
  264. package/dist/core/fetcher/RawResponse.js +0 -0
  265. package/dist/core/fetcher/ResponseWithBody.d.ts +0 -0
  266. package/dist/core/fetcher/ResponseWithBody.js +0 -0
  267. package/dist/core/fetcher/Supplier.d.ts +0 -0
  268. package/dist/core/fetcher/Supplier.js +0 -0
  269. package/dist/core/fetcher/createRequestUrl.d.ts +0 -0
  270. package/dist/core/fetcher/createRequestUrl.js +0 -0
  271. package/dist/core/fetcher/getErrorResponseBody.d.ts +0 -0
  272. package/dist/core/fetcher/getErrorResponseBody.js +0 -0
  273. package/dist/core/fetcher/getFetchFn.d.ts +0 -0
  274. package/dist/core/fetcher/getFetchFn.js +0 -0
  275. package/dist/core/fetcher/getHeader.d.ts +0 -0
  276. package/dist/core/fetcher/getHeader.js +0 -0
  277. package/dist/core/fetcher/getRequestBody.d.ts +0 -0
  278. package/dist/core/fetcher/getRequestBody.js +0 -0
  279. package/dist/core/fetcher/getResponseBody.d.ts +0 -0
  280. package/dist/core/fetcher/getResponseBody.js +0 -0
  281. package/dist/core/fetcher/index.d.ts +0 -0
  282. package/dist/core/fetcher/index.js +0 -0
  283. package/dist/core/fetcher/makeRequest.d.ts +0 -0
  284. package/dist/core/fetcher/makeRequest.js +0 -0
  285. package/dist/core/fetcher/requestWithRetries.d.ts +0 -0
  286. package/dist/core/fetcher/requestWithRetries.js +0 -0
  287. package/dist/core/fetcher/signals.d.ts +0 -0
  288. package/dist/core/fetcher/signals.js +0 -0
  289. package/dist/core/file/exports.d.ts +0 -0
  290. package/dist/core/file/exports.js +0 -0
  291. package/dist/core/file/file.d.ts +0 -0
  292. package/dist/core/file/file.js +0 -0
  293. package/dist/core/file/index.d.ts +0 -0
  294. package/dist/core/file/index.js +0 -0
  295. package/dist/core/file/types.d.ts +0 -0
  296. package/dist/core/file/types.js +0 -0
  297. package/dist/core/form-data-utils/FormDataWrapper.d.ts +0 -0
  298. package/dist/core/form-data-utils/FormDataWrapper.js +0 -0
  299. package/dist/core/form-data-utils/encodeAsFormParameter.d.ts +0 -0
  300. package/dist/core/form-data-utils/encodeAsFormParameter.js +0 -0
  301. package/dist/core/form-data-utils/index.d.ts +0 -0
  302. package/dist/core/form-data-utils/index.js +0 -0
  303. package/dist/core/headers.d.ts +0 -0
  304. package/dist/core/headers.js +0 -0
  305. package/dist/core/index.d.ts +0 -0
  306. package/dist/core/index.js +0 -0
  307. package/dist/core/json.d.ts +0 -0
  308. package/dist/core/json.js +0 -0
  309. package/dist/core/runtime/index.d.ts +0 -0
  310. package/dist/core/runtime/index.js +0 -0
  311. package/dist/core/runtime/runtime.d.ts +0 -0
  312. package/dist/core/runtime/runtime.js +0 -0
  313. package/dist/core/url/index.d.ts +0 -0
  314. package/dist/core/url/index.js +0 -0
  315. package/dist/core/url/join.d.ts +0 -0
  316. package/dist/core/url/join.js +0 -0
  317. package/dist/core/url/qs.d.ts +0 -0
  318. package/dist/core/url/qs.js +0 -0
  319. package/dist/environments.d.ts +0 -0
  320. package/dist/environments.js +0 -0
  321. package/dist/errors/CortexAIError.d.ts +0 -0
  322. package/dist/errors/CortexAIError.js +0 -0
  323. package/dist/errors/CortexAITimeoutError.d.ts +0 -0
  324. package/dist/errors/CortexAITimeoutError.js +0 -0
  325. package/dist/errors/index.d.ts +0 -0
  326. package/dist/errors/index.js +0 -0
  327. package/dist/exports.d.ts +0 -0
  328. package/dist/exports.js +0 -0
  329. package/dist/index.d.ts +0 -0
  330. package/dist/index.js +0 -0
  331. package/package.json +34 -31
  332. package/dist/api/resources/fetch/client/requests/FetchSourcesRequest.d.ts +0 -15
  333. package/dist/api/resources/fetch/client/requests/ListSourcesByIdRequest.d.ts +0 -18
  334. package/dist/api/resources/upload/client/requests/BodyUploadAppIngestionUploadAppPost.d.ts +0 -31
  335. package/dist/api/types/AppSourcesUploadData.d.ts +0 -17
package/LICENSE CHANGED
@@ -1,24 +1,24 @@
1
- Copyright (c) 2024 Cortex AI
2
-
3
- All Rights Reserved.
4
-
5
- PROPRIETARY AND CONFIDENTIAL
6
-
7
- This software is the proprietary and confidential property of Cortex AI ("the Company").
8
- Permission is hereby granted to authorized users to install and use this software as part of the Cortex AI service, subject to the terms and conditions of the service agreement entered into with the Company.
9
-
10
- You may not, without the express written permission of the Company:
11
-
12
- Copy, modify, or create derivative works of the software.
13
-
14
- Distribute, sell, rent, lease, sublicense, or otherwise transfer the software to any third party.
15
-
16
- Reverse engineer, decompile, or disassemble the software, except and only to the extent that such activity is expressly permitted by applicable law notwithstanding this limitation.
17
-
18
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1
+ Copyright (c) 2024 Cortex AI
2
+
3
+ All Rights Reserved.
4
+
5
+ PROPRIETARY AND CONFIDENTIAL
6
+
7
+ This software is the proprietary and confidential property of Cortex AI ("the Company").
8
+ Permission is hereby granted to authorized users to install and use this software as part of the Cortex AI service, subject to the terms and conditions of the service agreement entered into with the Company.
9
+
10
+ You may not, without the express written permission of the Company:
11
+
12
+ Copy, modify, or create derivative works of the software.
13
+
14
+ Distribute, sell, rent, lease, sublicense, or otherwise transfer the software to any third party.
15
+
16
+ Reverse engineer, decompile, or disassemble the software, except and only to the extent that such activity is expressly permitted by applicable law notwithstanding this limitation.
17
+
18
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
24
  SOFTWARE.
package/README.md CHANGED
@@ -1,141 +1,182 @@
1
- # Cortex AI TypeScript SDK
2
-
3
- The official TypeScript SDK for the Cortex AI platform. Build powerful, context-aware AI applications in your Node.js or TypeScript projects.
4
-
5
- **Cortex** is your plug-and-play memory infrastructure. It powers intelligent, context-aware retrieval for any AI app or agent. Whether you’re building a customer support bot, research copilot, or internal knowledge assistant - Cortex handles all!
6
-
7
- [Learn more about the SDK from our docs](https://docs.usecortex.ai/)
8
-
9
- ## Core features
10
-
11
- * **Dynamic retrieval and querying** that always retrieve the most relevant context
12
- * **Built-in long-term memory** that evolves with every user interaction
13
- * **Personalization hooks** for user preferences, intent, and history
14
- * **Developer-first SDK** with the most flexible APIs and fine-grained controls
15
-
16
- ## Getting started
17
-
18
- ### Installation
19
-
20
- ```
21
- npm i @usecortex_ai/node
22
- # or
23
- yarn add @usecortex_ai/node
24
- # or
25
- pnpm add @usecortex_ai/node
26
- ```
27
-
28
- ### Client setup
29
-
30
- ```ts
31
- import { CortexAIClient } from "@usecortex_ai/node";
32
-
33
- const client = new CortexAIClient({
34
- token: process.env.CORTEX_API_KEY,
35
- });
36
- ```
37
-
38
- ### Create a Tenant
39
-
40
- You can consider a `tenant` as a single database that can have internal isolated collections called `sub-tenants`. [Know more about the concept of tenant here](https://docs.usecortex.ai/essentials/multi-tenant)
41
-
42
- ```ts
43
- async function createTenant() {
44
- const tenantCreationResponse = await client.user.createTenant({
45
- tenant_id: "my-company"
46
- });
47
- return tenantCreationResponse;
48
- }
49
- ```
50
-
51
- ### Index Your Data
52
-
53
- When you index your data, you make it ready for retrieval from Cortex using natural language.
54
-
55
- ```ts
56
- // Upload text content
57
- async function uploadText() {
58
- const res = await client.upload.uploadText({
59
- tenant_id: "my-company",
60
- sub_tenant_id: "engineering",
61
- body: {
62
- content: "Our API rate limits are 1000 requests per minute for premium accounts.",
63
- file_id: "api-docs-rate-limits",
64
- tenant_metadata: { sub_tenant_id: "engineering" }
65
- }
66
- });
67
- return res;
68
- }
69
-
70
- // Upload a document file
71
- async function uploadFile() {
72
- const uploadResult = await client.upload.uploadDocument({
73
- file: fs.readFileSync("company-handbook.pdf"),
74
- tenant_id: "my-company",
75
- sub_tenant_id: "hr",
76
- file_id: "doc_q1_summary"
77
- });
78
- return uploadResult;
79
- }
80
- ```
81
-
82
- > **For a more detailed explanation** of document upload, including supported file formats, processing pipeline, metadata handling, and advanced configuration options, refer to the [Upload Document endpoint documentation](https://docs.usecortex.ai/api-reference/endpoint/upload-document).
83
-
84
- ### Search and retrieval
85
-
86
- ```ts
87
- // Semantic search with retrieval
88
- const results = await client.search.retrieve({
89
- query: "What are the API rate limits?",
90
- tenant_id: "my-company",
91
- sub_tenant_id: "engineering",
92
- max_chunks: 10
93
- });
94
-
95
- // List all sources
96
- const allSources = await client.sources.getAll({
97
- tenant_id: "my-company",
98
- sub_tenant_id: "engineering"
99
- });
100
-
101
- // Get specific sources by ID
102
- const specificSources = await client.sources.getByIds({
103
- tenant_id: "my-company",
104
- sub_tenant_id: "engineering",
105
- source_ids: ["api-docs-rate-limits", "company-handbook"]
106
- });
107
- ```
108
-
109
- > **For a more detailed explanation** of search and retrieval, including query parameters, scoring mechanisms, result structure, and advanced search features, refer to the [Search endpoint documentation](https://docs.usecortex.ai/api-reference/endpoint/search).
110
-
111
- ## SDK Method Structure & Type Safety
112
-
113
- Our SDKs follow a predictable pattern that mirrors the API structure while providing full type safety.
114
-
115
- > **Method Mapping** : `client.<group>.<functionName>` mirrors `api.usecortex.ai/<group>/<function_name>`
116
- >
117
- > For example: `client.upload.uploadText()` corresponds to `POST /upload/upload_text`
118
-
119
- The SDKs provide exact type parity with the API specification:
120
-
121
- - **Request Parameters** : Every field documented in the API reference (required, optional, types, validation rules) is reflected in the SDK method signatures
122
- - **Response Objects** : Return types match the exact JSON schema documented for each endpoint
123
- - **Error Types** : Exception structures mirror the error response formats from the API
124
- - **Nested Objects** : Complex nested parameters and responses maintain their full structure and typing
125
-
126
- > This means you can rely on your IDE’s autocomplete and type checking. If a parameter is optional in the API docs, it’s optional in the SDK. If a response contains a specific field, your IDE will know about it. Our SDKs are built in such a way that your IDE will automatically provide **autocompletion, type-checking, inline documentation with examples, and compile time validation** for each and every method.
127
- >
128
- > Just hit **Cmd+Space/Ctrl+Space!**
129
-
130
- ## Links
131
-
132
- - **Homepage:** [usecortex.ai](https://www.usecortex.ai/)
133
- - **Documentation:** [docs.usecortex.ai](https://docs.usecortex.ai/)
134
-
135
- ## Our docs
136
-
137
- Please refer to our [API reference](https://docs.usecortex.ai/api-reference/introduction) for detailed explanations of every API endpoint, parameter options, and advanced use cases.
138
-
139
- ## Support
140
-
141
- If you have any questions or need help, please reach out to our support team at [founders@usecortex.ai](mailto:founders@usecortex.ai).
1
+ # Cortex AI TypeScript SDK
2
+
3
+ The official TypeScript SDK for the Cortex AI platform. Build powerful, context-aware AI applications in your Node.js or TypeScript projects.
4
+
5
+ **Cortex** is your plug-and-play memory infrastructure. It powers intelligent, context-aware retrieval for any AI app or agent. Whether you’re building a customer support bot, research copilot, or internal knowledge assistant - Cortex handles all!
6
+
7
+ [Learn more about the SDK from our docs](https://docs.usecortex.ai/)
8
+
9
+ ## Core features
10
+
11
+ * **Dynamic retrieval and querying** that always retrieve the most relevant context
12
+ * **Built-in long-term memory** that evolves with every user interaction
13
+ * **Personalization hooks** for user preferences, intent, and history
14
+ * **Developer-first SDK** with the most flexible APIs and fine-grained controls
15
+
16
+ ## Getting started
17
+
18
+ ### Installation
19
+
20
+ ```
21
+ npm i @usecortex_ai/node
22
+ # or
23
+ yarn add @usecortex_ai/node
24
+ # or
25
+ pnpm add @usecortex_ai/node
26
+ ```
27
+
28
+ ### Client setup
29
+
30
+ ```ts
31
+ import { CortexAIClient } from "@usecortex_ai/node";
32
+
33
+ const client = new CortexAIClient({
34
+ token: process.env.CORTEX_API_KEY,
35
+ });
36
+ ```
37
+
38
+ ### Create a Tenant
39
+
40
+ You can consider a `tenant` as a single database that can have internal isolated collections called `sub-tenants`. [Know more about the concept of tenant here](https://docs.usecortex.ai/essentials/multi-tenant)
41
+
42
+ ```ts
43
+ async function createTenant() {
44
+ const tenantCreationResponse = await client.tenant.create({
45
+ tenant_id: "my-company"
46
+ });
47
+ return tenantCreationResponse;
48
+ }
49
+ ```
50
+
51
+ ### Index Your Data
52
+
53
+ When you index your data, you make it ready for retrieval from Cortex using natural language.
54
+
55
+ ```ts
56
+ // Add to your knowledge base
57
+ import fs from 'fs';
58
+
59
+ const uploadResult = await client.upload.knowledge({
60
+ files: [
61
+ fs.readFileSync("a.pdf"),
62
+ fs.readFileSync("b.pdf")
63
+ ],
64
+ tenant_id: "tenant_123",
65
+ file_metadata: [
66
+ {
67
+ id: "doc_a",
68
+ tenant_metadata: { dept: "sales" },
69
+ document_metadata: { author: "Alice" },
70
+ relations: false
71
+ },
72
+ {
73
+ id: "doc_b",
74
+ tenant_metadata: { dept: "marketing" },
75
+ document_metadata: { author: "Bob" },
76
+ relations: true
77
+ }
78
+ ]
79
+ });
80
+
81
+ // Index user memories
82
+ const result = await client.userMemory.add({
83
+ memories: [
84
+ {
85
+ text: "User prefers detailed explanations and dark mode",
86
+ infer: true,
87
+ user_name: "John"
88
+ }
89
+ ],
90
+ tenant_id: "tenant-01",
91
+ sub_tenant_id: "",
92
+ upsert: true
93
+ });
94
+
95
+ // Markdown content
96
+ const markdownResult = await client.userMemory.add({
97
+ memories: [
98
+ {
99
+ text: "# Meeting Notes\n\n## Key Points\n- Budget approved\n- Launch date: Q2",
100
+ is_markdown: true,
101
+ infer: false,
102
+ title: "Meeting Notes"
103
+ }
104
+ ],
105
+ tenant_id: "tenant-01",
106
+ sub_tenant_id: "",
107
+ upsert: true
108
+ });
109
+
110
+ // User-assistant pairs with inference
111
+ const conversationResult = await client.userMemory.add({
112
+ memories: [
113
+ {
114
+ user_assistant_pairs: [
115
+ { user: "What are my preferences?", assistant: "You prefer dark mode and detailed explanations." },
116
+ { user: "How do I like my reports?", assistant: "You prefer weekly summary reports with charts." }
117
+ ],
118
+ infer: true,
119
+ user_name: "John",
120
+ custom_instructions: "Extract user preferences"
121
+ }
122
+ ],
123
+ tenant_id: "tenant-01",
124
+ sub_tenant_id: "",
125
+ upsert: true
126
+ });
127
+ ```
128
+
129
+ > **For a more detailed explanation** of document upload, including supported file formats, processing pipeline, metadata handling, and advanced configuration options, refer to the [Ingest Knowledge](https://docs.usecortex.ai/api-reference/endpoint/add-knowledge-memories).
130
+
131
+ ### Search
132
+
133
+ ```ts
134
+ // Search across memories/knowledge base
135
+ const results = await client.recall.fullRecall({
136
+ query: "Which mode does user prefer",
137
+ tenantId: "tenant_1234",
138
+ subTenantId: "sub_tenant_4567",
139
+ alpha: 0.8,
140
+ recencyBias: 0
141
+ });;
142
+
143
+ // List all the data (memories + knowledge base)
144
+ const allSources = await client.data.listData({
145
+ tenant_id: "tenant_1234",
146
+ sub_tenant_id: "sub_tenant_4567"
147
+ });
148
+ ```
149
+
150
+ > **For a more detailed explanation** of search and retrieval, including query parameters, scoring mechanisms, result structure, and advanced search features, refer to the [Recall endpoint documentation](https://docs.usecortex.ai/api-reference/endpoint/smart).
151
+
152
+ ## SDK Method Structure & Type Safety
153
+
154
+ Our SDKs follow a predictable pattern that mirrors the API structure while providing full type safety.
155
+
156
+ > **Method Mapping** : `client.<group>.<functionName>` mirrors `api.usecortex.ai/<group>/<function_name>`
157
+ >
158
+ > For example: `client.upload.uploadText()` corresponds to `POST /upload/upload_text`
159
+
160
+ The SDKs provide exact type parity with the API specification:
161
+
162
+ - **Request Parameters** : Every field documented in the API reference (required, optional, types, validation rules) is reflected in the SDK method signatures
163
+ - **Response Objects** : Return types match the exact JSON schema documented for each endpoint
164
+ - **Error Types** : Exception structures mirror the error response formats from the API
165
+ - **Nested Objects** : Complex nested parameters and responses maintain their full structure and typing
166
+
167
+ > This means you can rely on your IDE’s autocomplete and type checking. If a parameter is optional in the API docs, it’s optional in the SDK. If a response contains a specific field, your IDE will know about it. Our SDKs are built in such a way that your IDE will automatically provide **autocompletion, type-checking, inline documentation with examples, and compile time validation** for each and every method.
168
+ >
169
+ > Just hit **Cmd+Space/Ctrl+Space!**
170
+
171
+ ## Links
172
+
173
+ - **Homepage:** [usecortex.ai](https://www.usecortex.ai/)
174
+ - **Documentation:** [docs.usecortex.ai](https://docs.usecortex.ai/)
175
+
176
+ ## Our docs
177
+
178
+ Please refer to our [API reference](https://docs.usecortex.ai/api-reference/introduction) for detailed explanations of every API endpoint, parameter options, and advanced use cases.
179
+
180
+ ## Support
181
+
182
+ If you have any questions or need help, please reach out to our support team at [founders@usecortex.ai](mailto:founders@usecortex.ai).
package/dist/Client.d.ts CHANGED
@@ -50,8 +50,6 @@ export declare class CortexAIClient {
50
50
  get search(): Search;
51
51
  get dashboard(): Dashboard;
52
52
  /**
53
- * Endpoint that serves Prometheus metrics.
54
- *
55
53
  * @param {CortexAIClient.RequestOptions} requestOptions - Request-specific configuration.
56
54
  *
57
55
  * @example
package/dist/Client.js CHANGED
@@ -75,8 +75,6 @@ class CortexAIClient {
75
75
  return ((_a = this._dashboard) !== null && _a !== void 0 ? _a : (this._dashboard = new Client_js_7.Dashboard(this._options)));
76
76
  }
77
77
  /**
78
- * Endpoint that serves Prometheus metrics.
79
- *
80
78
  * @param {CortexAIClient.RequestOptions} requestOptions - Request-specific configuration.
81
79
  *
82
80
  * @example
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,3 +1,3 @@
1
+ export * from "./resources/index.js";
1
2
  export * from "./types/index.js";
2
3
  export * from "./errors/index.js";
3
- export * from "./resources/index.js";
package/dist/api/index.js CHANGED
@@ -14,6 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./resources/index.js"), exports);
17
18
  __exportStar(require("./types/index.js"), exports);
18
19
  __exportStar(require("./errors/index.js"), exports);
19
- __exportStar(require("./resources/index.js"), exports);
@@ -30,11 +30,6 @@ export declare class Dashboard {
30
30
  protected readonly _options: Dashboard.Options;
31
31
  constructor(_options?: Dashboard.Options);
32
32
  /**
33
- * List all API keys for dashboard view.
34
- *
35
- * Uses Firebase authentication to identify the user and returns API keys
36
- * associated with that user.
37
- *
38
33
  * @param {Dashboard.RequestOptions} requestOptions - Request-specific configuration.
39
34
  *
40
35
  * @throws {@link CortexAI.BadRequestError}
@@ -51,10 +46,6 @@ export declare class Dashboard {
51
46
  listApis(requestOptions?: Dashboard.RequestOptions): core.HttpResponsePromise<CortexAI.DashboardApisResponse>;
52
47
  private __listApis;
53
48
  /**
54
- * List all sources for a tenant/sub-tenant combination.
55
- *
56
- * Uses the same logic as the existing get_sources function.
57
- *
58
49
  * @param {CortexAI.ListSourcesDashboardSourcesGetRequest} request
59
50
  * @param {Dashboard.RequestOptions} requestOptions - Request-specific configuration.
60
51
  *
@@ -68,18 +59,13 @@ export declare class Dashboard {
68
59
  *
69
60
  * @example
70
61
  * await client.dashboard.listSources({
71
- * tenant_id: "tenant_id",
72
- * sub_tenant_id: "sub_tenant_id"
62
+ * tenant_id: "tenant_1234",
63
+ * sub_tenant_id: "sub_tenant_4567"
73
64
  * })
74
65
  */
75
66
  listSources(request: CortexAI.ListSourcesDashboardSourcesGetRequest, requestOptions?: Dashboard.RequestOptions): core.HttpResponsePromise<CortexAI.DashboardSourcesResponse>;
76
67
  private __listSources;
77
68
  /**
78
- * List all tenants for dashboard view.
79
- *
80
- * Uses Firebase authentication to identify the user and returns tenant
81
- * mappings associated with that user's organization.
82
- *
83
69
  * @param {Dashboard.RequestOptions} requestOptions - Request-specific configuration.
84
70
  *
85
71
  * @throws {@link CortexAI.BadRequestError}
@@ -37,11 +37,6 @@ class Dashboard {
37
37
  this._options = _options;
38
38
  }
39
39
  /**
40
- * List all API keys for dashboard view.
41
- *
42
- * Uses Firebase authentication to identify the user and returns API keys
43
- * associated with that user.
44
- *
45
40
  * @param {Dashboard.RequestOptions} requestOptions - Request-specific configuration.
46
41
  *
47
42
  * @throws {@link CortexAI.BadRequestError}
@@ -114,10 +109,6 @@ class Dashboard {
114
109
  }
115
110
  }
116
111
  /**
117
- * List all sources for a tenant/sub-tenant combination.
118
- *
119
- * Uses the same logic as the existing get_sources function.
120
- *
121
112
  * @param {CortexAI.ListSourcesDashboardSourcesGetRequest} request
122
113
  * @param {Dashboard.RequestOptions} requestOptions - Request-specific configuration.
123
114
  *
@@ -131,8 +122,8 @@ class Dashboard {
131
122
  *
132
123
  * @example
133
124
  * await client.dashboard.listSources({
134
- * tenant_id: "tenant_id",
135
- * sub_tenant_id: "sub_tenant_id"
125
+ * tenant_id: "tenant_1234",
126
+ * sub_tenant_id: "sub_tenant_4567"
136
127
  * })
137
128
  */
138
129
  listSources(request, requestOptions) {
@@ -198,11 +189,6 @@ class Dashboard {
198
189
  }
199
190
  }
200
191
  /**
201
- * List all tenants for dashboard view.
202
- *
203
- * Uses Firebase authentication to identify the user and returns tenant
204
- * mappings associated with that user's organization.
205
- *
206
192
  * @param {Dashboard.RequestOptions} requestOptions - Request-specific configuration.
207
193
  *
208
194
  * @throws {@link CortexAI.BadRequestError}
File without changes
File without changes
@@ -4,8 +4,8 @@
4
4
  /**
5
5
  * @example
6
6
  * {
7
- * tenant_id: "tenant_id",
8
- * sub_tenant_id: "sub_tenant_id"
7
+ * tenant_id: "tenant_1234",
8
+ * sub_tenant_id: "sub_tenant_4567"
9
9
  * }
10
10
  */
11
11
  export interface ListSourcesDashboardSourcesGetRequest {
File without changes
File without changes