@usecortex_ai/node 0.4.0 → 0.5.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 (327) hide show
  1. package/LICENSE +23 -23
  2. package/README.md +141 -141
  3. package/dist/Client.d.ts +0 -0
  4. package/dist/Client.js +0 -0
  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 +0 -0
  24. package/dist/api/index.js +0 -0
  25. package/dist/api/resources/dashboard/client/Client.d.ts +0 -0
  26. package/dist/api/resources/dashboard/client/Client.js +0 -0
  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 +0 -0
  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 +0 -0
  38. package/dist/api/resources/embeddings/client/Client.js +0 -0
  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 +0 -0
  42. package/dist/api/resources/embeddings/client/requests/BodyFilterRawEmbeddingsEndpointEmbeddingsFilterRawEmbeddingsPost.js +0 -0
  43. package/dist/api/resources/embeddings/client/requests/BodyInsertRawEmbeddingsEndpointEmbeddingsInsertRawEmbeddingsPost.d.ts +0 -0
  44. package/dist/api/resources/embeddings/client/requests/BodyInsertRawEmbeddingsEndpointEmbeddingsInsertRawEmbeddingsPost.js +0 -0
  45. package/dist/api/resources/embeddings/client/requests/BodySearchRawEmbeddingsEndpointEmbeddingsSearchRawEmbeddingsPost.d.ts +0 -0
  46. package/dist/api/resources/embeddings/client/requests/BodySearchRawEmbeddingsEndpointEmbeddingsSearchRawEmbeddingsPost.js +0 -0
  47. package/dist/api/resources/embeddings/client/requests/EmbeddingsDeleteRequest.d.ts +0 -0
  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 +0 -0
  54. package/dist/api/resources/fetch/client/Client.js +0 -0
  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 +0 -0
  58. package/dist/api/resources/fetch/client/requests/FetchGraphRelationsBySourceIdRequest.js +0 -0
  59. package/dist/api/resources/fetch/client/requests/FetchSourcesRequest.d.ts +0 -0
  60. package/dist/api/resources/fetch/client/requests/FetchSourcesRequest.js +0 -0
  61. package/dist/api/resources/fetch/client/requests/ListSourcesByIdRequest.d.ts +0 -0
  62. package/dist/api/resources/fetch/client/requests/ListSourcesByIdRequest.js +0 -0
  63. package/dist/api/resources/fetch/client/requests/SourceFetchRequest.d.ts +0 -0
  64. package/dist/api/resources/fetch/client/requests/SourceFetchRequest.js +0 -0
  65. package/dist/api/resources/fetch/client/requests/index.d.ts +0 -0
  66. package/dist/api/resources/fetch/client/requests/index.js +0 -0
  67. package/dist/api/resources/fetch/index.d.ts +0 -0
  68. package/dist/api/resources/fetch/index.js +0 -0
  69. package/dist/api/resources/index.d.ts +0 -0
  70. package/dist/api/resources/index.js +0 -0
  71. package/dist/api/resources/search/client/Client.d.ts +5 -0
  72. package/dist/api/resources/search/client/Client.js +5 -0
  73. package/dist/api/resources/search/client/index.d.ts +0 -0
  74. package/dist/api/resources/search/client/index.js +0 -0
  75. package/dist/api/resources/search/client/requests/FullTextSearchRequest.d.ts +0 -0
  76. package/dist/api/resources/search/client/requests/FullTextSearchRequest.js +0 -0
  77. package/dist/api/resources/search/client/requests/HybridSearchRequest.d.ts +2 -0
  78. package/dist/api/resources/search/client/requests/HybridSearchRequest.js +0 -0
  79. package/dist/api/resources/search/client/requests/QnASearchRequest.d.ts +0 -0
  80. package/dist/api/resources/search/client/requests/QnASearchRequest.js +0 -0
  81. package/dist/api/resources/search/client/requests/index.d.ts +0 -0
  82. package/dist/api/resources/search/client/requests/index.js +0 -0
  83. package/dist/api/resources/search/index.d.ts +0 -0
  84. package/dist/api/resources/search/index.js +0 -0
  85. package/dist/api/resources/sources/client/Client.d.ts +0 -0
  86. package/dist/api/resources/sources/client/Client.js +0 -0
  87. package/dist/api/resources/sources/client/index.d.ts +0 -0
  88. package/dist/api/resources/sources/client/index.js +0 -0
  89. package/dist/api/resources/sources/client/requests/SourceDeleteRequest.d.ts +0 -0
  90. package/dist/api/resources/sources/client/requests/SourceDeleteRequest.js +0 -0
  91. package/dist/api/resources/sources/client/requests/index.d.ts +0 -0
  92. package/dist/api/resources/sources/client/requests/index.js +0 -0
  93. package/dist/api/resources/sources/index.d.ts +0 -0
  94. package/dist/api/resources/sources/index.js +0 -0
  95. package/dist/api/resources/tenant/client/Client.d.ts +0 -0
  96. package/dist/api/resources/tenant/client/Client.js +0 -0
  97. package/dist/api/resources/tenant/client/index.d.ts +0 -0
  98. package/dist/api/resources/tenant/client/index.js +0 -0
  99. package/dist/api/resources/tenant/client/requests/TenantCreateRequest.d.ts +0 -0
  100. package/dist/api/resources/tenant/client/requests/TenantCreateRequest.js +0 -0
  101. package/dist/api/resources/tenant/client/requests/TenantStatsRequest.d.ts +0 -0
  102. package/dist/api/resources/tenant/client/requests/TenantStatsRequest.js +0 -0
  103. package/dist/api/resources/tenant/client/requests/index.d.ts +0 -0
  104. package/dist/api/resources/tenant/client/requests/index.js +0 -0
  105. package/dist/api/resources/tenant/index.d.ts +0 -0
  106. package/dist/api/resources/tenant/index.js +0 -0
  107. package/dist/api/resources/upload/client/Client.d.ts +0 -0
  108. package/dist/api/resources/upload/client/Client.js +0 -0
  109. package/dist/api/resources/upload/client/index.d.ts +0 -0
  110. package/dist/api/resources/upload/client/index.js +0 -0
  111. package/dist/api/resources/upload/client/requests/BodyAddMemoryMemoriesAddMemoryPost.d.ts +0 -0
  112. package/dist/api/resources/upload/client/requests/BodyAddMemoryMemoriesAddMemoryPost.js +0 -0
  113. package/dist/api/resources/upload/client/requests/BodyUploadAppIngestionUploadAppPost.d.ts +0 -0
  114. package/dist/api/resources/upload/client/requests/BodyUploadAppIngestionUploadAppPost.js +0 -0
  115. package/dist/api/resources/upload/client/requests/BodyUploadDocumentIngestionUploadDocumentPost.d.ts +0 -0
  116. package/dist/api/resources/upload/client/requests/BodyUploadDocumentIngestionUploadDocumentPost.js +0 -0
  117. package/dist/api/resources/upload/client/requests/UploadDeleteMemoryRequest.d.ts +0 -0
  118. package/dist/api/resources/upload/client/requests/UploadDeleteMemoryRequest.js +0 -0
  119. package/dist/api/resources/upload/client/requests/UploadVerifyProcessingRequest.d.ts +0 -0
  120. package/dist/api/resources/upload/client/requests/UploadVerifyProcessingRequest.js +0 -0
  121. package/dist/api/resources/upload/client/requests/index.d.ts +0 -0
  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/AppSourcesUploadData.d.ts +0 -0
  132. package/dist/api/types/AppSourcesUploadData.js +0 -0
  133. package/dist/api/types/AttachmentModel.d.ts +0 -0
  134. package/dist/api/types/AttachmentModel.js +0 -0
  135. package/dist/api/types/Bm25OperatorType.d.ts +0 -0
  136. package/dist/api/types/Bm25OperatorType.js +0 -0
  137. package/dist/api/types/CollectionStats.d.ts +0 -0
  138. package/dist/api/types/CollectionStats.js +0 -0
  139. package/dist/api/types/ContentModel.d.ts +0 -0
  140. package/dist/api/types/ContentModel.js +0 -0
  141. package/dist/api/types/CustomPropertyDefinition.d.ts +0 -0
  142. package/dist/api/types/CustomPropertyDefinition.js +0 -0
  143. package/dist/api/types/DashboardApisResponse.d.ts +0 -0
  144. package/dist/api/types/DashboardApisResponse.js +0 -0
  145. package/dist/api/types/DashboardSourcesResponse.d.ts +0 -0
  146. package/dist/api/types/DashboardSourcesResponse.js +0 -0
  147. package/dist/api/types/DashboardTenantsResponse.d.ts +0 -0
  148. package/dist/api/types/DashboardTenantsResponse.js +0 -0
  149. package/dist/api/types/DeleteResult.d.ts +0 -0
  150. package/dist/api/types/DeleteResult.js +0 -0
  151. package/dist/api/types/DeleteUserMemoryResponse.d.ts +0 -0
  152. package/dist/api/types/DeleteUserMemoryResponse.js +0 -0
  153. package/dist/api/types/Entity.d.ts +0 -0
  154. package/dist/api/types/Entity.js +0 -0
  155. package/dist/api/types/ErrorResponse.d.ts +0 -0
  156. package/dist/api/types/ErrorResponse.js +0 -0
  157. package/dist/api/types/FetchMode.d.ts +0 -0
  158. package/dist/api/types/FetchMode.js +0 -0
  159. package/dist/api/types/ForcefulRelationsPayload.d.ts +9 -0
  160. package/dist/api/types/ForcefulRelationsPayload.js +5 -0
  161. package/dist/api/types/GraphContext.d.ts +0 -0
  162. package/dist/api/types/GraphContext.js +0 -0
  163. package/dist/api/types/HttpValidationError.d.ts +0 -0
  164. package/dist/api/types/HttpValidationError.js +0 -0
  165. package/dist/api/types/Infra.d.ts +0 -0
  166. package/dist/api/types/Infra.js +0 -0
  167. package/dist/api/types/InsertResult.d.ts +0 -0
  168. package/dist/api/types/InsertResult.js +0 -0
  169. package/dist/api/types/MemoryItem.d.ts +3 -1
  170. package/dist/api/types/MemoryItem.js +0 -0
  171. package/dist/api/types/MemoryResultItem.d.ts +0 -0
  172. package/dist/api/types/MemoryResultItem.js +0 -0
  173. package/dist/api/types/MilvusDataType.d.ts +0 -0
  174. package/dist/api/types/MilvusDataType.js +0 -0
  175. package/dist/api/types/PathTriplet.d.ts +0 -0
  176. package/dist/api/types/PathTriplet.js +0 -0
  177. package/dist/api/types/ProcessingStatus.d.ts +0 -0
  178. package/dist/api/types/ProcessingStatus.js +0 -0
  179. package/dist/api/types/QnASearchResponse.d.ts +0 -0
  180. package/dist/api/types/QnASearchResponse.js +0 -0
  181. package/dist/api/types/RawEmbeddingDocument.d.ts +0 -0
  182. package/dist/api/types/RawEmbeddingDocument.js +0 -0
  183. package/dist/api/types/RawEmbeddingSearchResult.d.ts +0 -0
  184. package/dist/api/types/RawEmbeddingSearchResult.js +0 -0
  185. package/dist/api/types/RawEmbeddingVector.d.ts +0 -0
  186. package/dist/api/types/RawEmbeddingVector.js +0 -0
  187. package/dist/api/types/RelationEvidence.d.ts +0 -0
  188. package/dist/api/types/RelationEvidence.js +0 -0
  189. package/dist/api/types/RetrievalResult.d.ts +2 -0
  190. package/dist/api/types/RetrievalResult.js +0 -0
  191. package/dist/api/types/RetrieveMode.d.ts +0 -0
  192. package/dist/api/types/RetrieveMode.js +0 -0
  193. package/dist/api/types/ScoredPathResponse.d.ts +0 -0
  194. package/dist/api/types/ScoredPathResponse.js +0 -0
  195. package/dist/api/types/SearchMode.d.ts +0 -0
  196. package/dist/api/types/SearchMode.js +0 -0
  197. package/dist/api/types/SourceDeleteResponse.d.ts +0 -0
  198. package/dist/api/types/SourceDeleteResponse.js +0 -0
  199. package/dist/api/types/SourceDeleteResultItem.d.ts +0 -0
  200. package/dist/api/types/SourceDeleteResultItem.js +0 -0
  201. package/dist/api/types/SourceFetchResponse.d.ts +0 -0
  202. package/dist/api/types/SourceFetchResponse.js +0 -0
  203. package/dist/api/types/SourceGraphRelationsResponse.d.ts +0 -0
  204. package/dist/api/types/SourceGraphRelationsResponse.js +0 -0
  205. package/dist/api/types/SourceListResponse.d.ts +0 -0
  206. package/dist/api/types/SourceListResponse.js +0 -0
  207. package/dist/api/types/SourceModel.d.ts +0 -0
  208. package/dist/api/types/SourceModel.js +0 -0
  209. package/dist/api/types/SourceStatus.d.ts +0 -0
  210. package/dist/api/types/SourceStatus.js +0 -0
  211. package/dist/api/types/SourceUploadResponse.d.ts +0 -0
  212. package/dist/api/types/SourceUploadResponse.js +0 -0
  213. package/dist/api/types/SourceUploadResultItem.d.ts +0 -0
  214. package/dist/api/types/SourceUploadResultItem.js +0 -0
  215. package/dist/api/types/SupportedLlmProviders.d.ts +0 -0
  216. package/dist/api/types/SupportedLlmProviders.js +0 -0
  217. package/dist/api/types/TenantCreateResponse.d.ts +0 -0
  218. package/dist/api/types/TenantCreateResponse.js +0 -0
  219. package/dist/api/types/TenantInfo.d.ts +0 -0
  220. package/dist/api/types/TenantInfo.js +0 -0
  221. package/dist/api/types/TenantMetadataSchemaInfo.d.ts +0 -0
  222. package/dist/api/types/TenantMetadataSchemaInfo.js +0 -0
  223. package/dist/api/types/TenantStatsResponse.d.ts +0 -0
  224. package/dist/api/types/TenantStatsResponse.js +0 -0
  225. package/dist/api/types/TripletWithEvidence.d.ts +0 -0
  226. package/dist/api/types/TripletWithEvidence.js +0 -0
  227. package/dist/api/types/UserAssistantPair.d.ts +0 -0
  228. package/dist/api/types/UserAssistantPair.js +0 -0
  229. package/dist/api/types/ValidationError.d.ts +0 -0
  230. package/dist/api/types/ValidationError.js +0 -0
  231. package/dist/api/types/VectorStoreChunk.d.ts +2 -0
  232. package/dist/api/types/VectorStoreChunk.js +0 -0
  233. package/dist/api/types/index.d.ts +1 -0
  234. package/dist/api/types/index.js +1 -0
  235. package/dist/core/auth/AuthProvider.d.ts +0 -0
  236. package/dist/core/auth/AuthProvider.js +0 -0
  237. package/dist/core/auth/AuthRequest.d.ts +0 -0
  238. package/dist/core/auth/AuthRequest.js +0 -0
  239. package/dist/core/auth/BasicAuth.d.ts +0 -0
  240. package/dist/core/auth/BasicAuth.js +0 -0
  241. package/dist/core/auth/BearerToken.d.ts +0 -0
  242. package/dist/core/auth/BearerToken.js +0 -0
  243. package/dist/core/auth/index.d.ts +0 -0
  244. package/dist/core/auth/index.js +0 -0
  245. package/dist/core/base64.d.ts +0 -0
  246. package/dist/core/base64.js +0 -0
  247. package/dist/core/exports.d.ts +0 -0
  248. package/dist/core/exports.js +0 -0
  249. package/dist/core/fetcher/APIResponse.d.ts +0 -0
  250. package/dist/core/fetcher/APIResponse.js +0 -0
  251. package/dist/core/fetcher/BinaryResponse.d.ts +0 -0
  252. package/dist/core/fetcher/BinaryResponse.js +0 -0
  253. package/dist/core/fetcher/Fetcher.d.ts +0 -0
  254. package/dist/core/fetcher/Fetcher.js +0 -0
  255. package/dist/core/fetcher/Headers.d.ts +0 -0
  256. package/dist/core/fetcher/Headers.js +0 -0
  257. package/dist/core/fetcher/HttpResponsePromise.d.ts +0 -0
  258. package/dist/core/fetcher/HttpResponsePromise.js +0 -0
  259. package/dist/core/fetcher/RawResponse.d.ts +0 -0
  260. package/dist/core/fetcher/RawResponse.js +0 -0
  261. package/dist/core/fetcher/ResponseWithBody.d.ts +0 -0
  262. package/dist/core/fetcher/ResponseWithBody.js +0 -0
  263. package/dist/core/fetcher/Supplier.d.ts +0 -0
  264. package/dist/core/fetcher/Supplier.js +0 -0
  265. package/dist/core/fetcher/createRequestUrl.d.ts +0 -0
  266. package/dist/core/fetcher/createRequestUrl.js +0 -0
  267. package/dist/core/fetcher/getErrorResponseBody.d.ts +0 -0
  268. package/dist/core/fetcher/getErrorResponseBody.js +0 -0
  269. package/dist/core/fetcher/getFetchFn.d.ts +0 -0
  270. package/dist/core/fetcher/getFetchFn.js +0 -0
  271. package/dist/core/fetcher/getHeader.d.ts +0 -0
  272. package/dist/core/fetcher/getHeader.js +0 -0
  273. package/dist/core/fetcher/getRequestBody.d.ts +0 -0
  274. package/dist/core/fetcher/getRequestBody.js +0 -0
  275. package/dist/core/fetcher/getResponseBody.d.ts +0 -0
  276. package/dist/core/fetcher/getResponseBody.js +0 -0
  277. package/dist/core/fetcher/index.d.ts +0 -0
  278. package/dist/core/fetcher/index.js +0 -0
  279. package/dist/core/fetcher/makeRequest.d.ts +0 -0
  280. package/dist/core/fetcher/makeRequest.js +0 -0
  281. package/dist/core/fetcher/requestWithRetries.d.ts +0 -0
  282. package/dist/core/fetcher/requestWithRetries.js +0 -0
  283. package/dist/core/fetcher/signals.d.ts +0 -0
  284. package/dist/core/fetcher/signals.js +0 -0
  285. package/dist/core/file/exports.d.ts +0 -0
  286. package/dist/core/file/exports.js +0 -0
  287. package/dist/core/file/file.d.ts +0 -0
  288. package/dist/core/file/file.js +0 -0
  289. package/dist/core/file/index.d.ts +0 -0
  290. package/dist/core/file/index.js +0 -0
  291. package/dist/core/file/types.d.ts +0 -0
  292. package/dist/core/file/types.js +0 -0
  293. package/dist/core/form-data-utils/FormDataWrapper.d.ts +0 -0
  294. package/dist/core/form-data-utils/FormDataWrapper.js +0 -0
  295. package/dist/core/form-data-utils/encodeAsFormParameter.d.ts +0 -0
  296. package/dist/core/form-data-utils/encodeAsFormParameter.js +0 -0
  297. package/dist/core/form-data-utils/index.d.ts +0 -0
  298. package/dist/core/form-data-utils/index.js +0 -0
  299. package/dist/core/headers.d.ts +0 -0
  300. package/dist/core/headers.js +0 -0
  301. package/dist/core/index.d.ts +0 -0
  302. package/dist/core/index.js +0 -0
  303. package/dist/core/json.d.ts +0 -0
  304. package/dist/core/json.js +0 -0
  305. package/dist/core/runtime/index.d.ts +0 -0
  306. package/dist/core/runtime/index.js +0 -0
  307. package/dist/core/runtime/runtime.d.ts +0 -0
  308. package/dist/core/runtime/runtime.js +0 -0
  309. package/dist/core/url/index.d.ts +0 -0
  310. package/dist/core/url/index.js +0 -0
  311. package/dist/core/url/join.d.ts +0 -0
  312. package/dist/core/url/join.js +0 -0
  313. package/dist/core/url/qs.d.ts +0 -0
  314. package/dist/core/url/qs.js +0 -0
  315. package/dist/environments.d.ts +0 -0
  316. package/dist/environments.js +0 -0
  317. package/dist/errors/CortexAIError.d.ts +0 -0
  318. package/dist/errors/CortexAIError.js +0 -0
  319. package/dist/errors/CortexAITimeoutError.d.ts +0 -0
  320. package/dist/errors/CortexAITimeoutError.js +0 -0
  321. package/dist/errors/index.d.ts +0 -0
  322. package/dist/errors/index.js +0 -0
  323. package/dist/exports.d.ts +0 -0
  324. package/dist/exports.js +0 -0
  325. package/dist/index.d.ts +0 -0
  326. package/dist/index.js +0 -0
  327. package/package.json +30 -30
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,141 @@
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.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).
package/dist/Client.d.ts CHANGED
File without changes
package/dist/Client.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/dist/api/index.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
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
@@ -43,6 +43,11 @@ export declare class Search {
43
43
  * - "fast" (default): Single query, faster response
44
44
  * - "accurate": Multi-query generation with reranking, higher quality
45
45
  *
46
+ * Use `filters` to narrow results by metadata:
47
+ * - Provide key-value pairs matching fields defined in your tenant_metadata_schema
48
+ * - Example: `{"category": "engineering", "priority": "high"}`
49
+ * - Filters are validated against your tenant schema for type safety
50
+ *
46
51
  * @param {CortexAI.HybridSearchRequest} request
47
52
  * @param {Search.RequestOptions} requestOptions - Request-specific configuration.
48
53
  *
@@ -50,6 +50,11 @@ class Search {
50
50
  * - "fast" (default): Single query, faster response
51
51
  * - "accurate": Multi-query generation with reranking, higher quality
52
52
  *
53
+ * Use `filters` to narrow results by metadata:
54
+ * - Provide key-value pairs matching fields defined in your tenant_metadata_schema
55
+ * - Example: `{"category": "engineering", "priority": "high"}`
56
+ * - Filters are validated against your tenant schema for type safety
57
+ *
53
58
  * @param {CortexAI.HybridSearchRequest} request
54
59
  * @param {Search.RequestOptions} requestOptions - Request-specific configuration.
55
60
  *
File without changes
File without changes
@@ -34,6 +34,8 @@ export interface HybridSearchRequest {
34
34
  extra_context?: string;
35
35
  /** What to search: 'sources' for documents or 'memories' for user memories */
36
36
  search_mode?: CortexAI.SearchMode;
37
+ /** Optional key-value pairs to filter search results by tenant metadata fields. Keys must match fields defined in tenant_metadata_schema during tenant creation. Supports exact match filtering on indexed metadata fields. Example: {'category': 'engineering', 'priority': 'high'} */
38
+ filters?: Record<string, unknown>;
37
39
  }
38
40
  export declare namespace HybridSearchRequest {
39
41
  /**
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