@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
@@ -37,12 +37,7 @@ class Upload {
37
37
  this._options = _options;
38
38
  }
39
39
  /**
40
- * Upload one or more documents for ingestion.
41
- * Supports both single and batch uploads.
42
- * For single file: send one file with the 'files' field.
43
- * For batch: send multiple files with the 'files' field (FastAPI will parse as list).
44
- *
45
- * @param {CortexAI.BodyUploadDocumentIngestionUploadDocumentPost} request
40
+ * @param {CortexAI.BodyUploadKnowledgeIngestionUploadKnowledgePost} request
46
41
  * @param {Upload.RequestOptions} requestOptions - Request-specific configuration.
47
42
  *
48
43
  * @throws {@link CortexAI.BadRequestError}
@@ -55,20 +50,16 @@ class Upload {
55
50
  *
56
51
  * @example
57
52
  * import { createReadStream } from "fs";
58
- * await client.upload.uploadDocument({
59
- * files: [fs.createReadStream("/path/to/your/file")],
53
+ * await client.upload.uploadKnowledge({
60
54
  * tenant_id: "tenant_id"
61
55
  * })
62
56
  */
63
- uploadDocument(request, requestOptions) {
64
- return core.HttpResponsePromise.fromPromise(this.__uploadDocument(request, requestOptions));
57
+ uploadKnowledge(request, requestOptions) {
58
+ return core.HttpResponsePromise.fromPromise(this.__uploadKnowledge(request, requestOptions));
65
59
  }
66
- async __uploadDocument(request, requestOptions) {
60
+ async __uploadKnowledge(request, requestOptions) {
67
61
  var _a, _b, _c;
68
62
  const _request = await core.newFormData();
69
- for (const _file of request.files) {
70
- await _request.appendFile("files", _file);
71
- }
72
63
  _request.append("tenant_id", request.tenant_id);
73
64
  if (request.sub_tenant_id != null) {
74
65
  _request.append("sub_tenant_id", request.sub_tenant_id);
@@ -76,13 +67,21 @@ class Upload {
76
67
  if (request.upsert != null) {
77
68
  _request.append("upsert", request.upsert.toString());
78
69
  }
70
+ if (request.files != null) {
71
+ for (const _file of request.files) {
72
+ await _request.appendFile("files", _file);
73
+ }
74
+ }
79
75
  if (request.file_metadata != null) {
80
76
  _request.append("file_metadata", request.file_metadata);
81
77
  }
78
+ if (request.app_sources != null) {
79
+ _request.append("app_sources", request.app_sources);
80
+ }
82
81
  const _maybeEncodedRequest = await _request.getRequest();
83
82
  let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({ Authorization: await this._getAuthorizationHeader() }, _maybeEncodedRequest.headers)), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
84
83
  const _response = await core.fetcher({
85
- 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, "ingestion/upload-document"),
84
+ 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, "ingestion/upload_knowledge"),
86
85
  method: "POST",
87
86
  headers: _headers,
88
87
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -128,7 +127,7 @@ class Upload {
128
127
  rawResponse: _response.rawResponse,
129
128
  });
130
129
  case "timeout":
131
- throw new errors.CortexAITimeoutError("Timeout exceeded when calling POST /ingestion/upload-document.");
130
+ throw new errors.CortexAITimeoutError("Timeout exceeded when calling POST /ingestion/upload_knowledge.");
132
131
  case "unknown":
133
132
  throw new errors.CortexAIError({
134
133
  message: _response.error.errorMessage,
@@ -137,98 +136,6 @@ class Upload {
137
136
  }
138
137
  }
139
138
  /**
140
- * Upload structured sources generated by first-party or third-party apps.
141
- * Supports both single and batch uploads.
142
- *
143
- * @param {CortexAI.BodyUploadAppIngestionUploadAppPost} request
144
- * @param {Upload.RequestOptions} requestOptions - Request-specific configuration.
145
- *
146
- * @throws {@link CortexAI.BadRequestError}
147
- * @throws {@link CortexAI.UnauthorizedError}
148
- * @throws {@link CortexAI.ForbiddenError}
149
- * @throws {@link CortexAI.NotFoundError}
150
- * @throws {@link CortexAI.UnprocessableEntityError}
151
- * @throws {@link CortexAI.InternalServerError}
152
- * @throws {@link CortexAI.ServiceUnavailableError}
153
- *
154
- * @example
155
- * await client.upload.uploadAppSources({
156
- * app_sources: {
157
- * id: "id",
158
- * tenant_id: "tenant_id",
159
- * sub_tenant_id: "sub_tenant_id"
160
- * },
161
- * tenant_id: "tenant_id"
162
- * })
163
- */
164
- uploadAppSources(request, requestOptions) {
165
- return core.HttpResponsePromise.fromPromise(this.__uploadAppSources(request, requestOptions));
166
- }
167
- async __uploadAppSources(request, requestOptions) {
168
- var _a, _b, _c;
169
- 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);
170
- const _response = await core.fetcher({
171
- 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, "ingestion/upload-app"),
172
- method: "POST",
173
- headers: _headers,
174
- contentType: "application/json",
175
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
176
- requestType: "json",
177
- body: request,
178
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
179
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
180
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
181
- });
182
- if (_response.ok) {
183
- return { data: _response.body, rawResponse: _response.rawResponse };
184
- }
185
- if (_response.error.reason === "status-code") {
186
- switch (_response.error.statusCode) {
187
- case 400:
188
- throw new CortexAI.BadRequestError(_response.error.body, _response.rawResponse);
189
- case 401:
190
- throw new CortexAI.UnauthorizedError(_response.error.body, _response.rawResponse);
191
- case 403:
192
- throw new CortexAI.ForbiddenError(_response.error.body, _response.rawResponse);
193
- case 404:
194
- throw new CortexAI.NotFoundError(_response.error.body, _response.rawResponse);
195
- case 422:
196
- throw new CortexAI.UnprocessableEntityError(_response.error.body, _response.rawResponse);
197
- case 500:
198
- throw new CortexAI.InternalServerError(_response.error.body, _response.rawResponse);
199
- case 503:
200
- throw new CortexAI.ServiceUnavailableError(_response.error.body, _response.rawResponse);
201
- default:
202
- throw new errors.CortexAIError({
203
- statusCode: _response.error.statusCode,
204
- body: _response.error.body,
205
- rawResponse: _response.rawResponse,
206
- });
207
- }
208
- }
209
- switch (_response.error.reason) {
210
- case "non-json":
211
- throw new errors.CortexAIError({
212
- statusCode: _response.error.statusCode,
213
- body: _response.error.rawBody,
214
- rawResponse: _response.rawResponse,
215
- });
216
- case "timeout":
217
- throw new errors.CortexAITimeoutError("Timeout exceeded when calling POST /ingestion/upload-app.");
218
- case "unknown":
219
- throw new errors.CortexAIError({
220
- message: _response.error.errorMessage,
221
- rawResponse: _response.rawResponse,
222
- });
223
- }
224
- }
225
- /**
226
- * Check the current processing status of your uploaded content.
227
- *
228
- * This endpoint allows you to monitor the progress of documents, text, or other content you've uploaded. Simply provide the file ID to see whether processing is complete, still in progress, or if any errors occurred.
229
- *
230
- * Use this to determine when your content is ready for search and retrieval, or to troubleshoot any processing issues.
231
- *
232
139
  * @param {CortexAI.UploadVerifyProcessingRequest} request
233
140
  * @param {Upload.RequestOptions} requestOptions - Request-specific configuration.
234
141
  *
@@ -242,7 +149,8 @@ class Upload {
242
149
  *
243
150
  * @example
244
151
  * await client.upload.verifyProcessing({
245
- * file_id: "file_id"
152
+ * file_id: "<str>",
153
+ * tenant_id: "tenant_1234"
246
154
  * })
247
155
  */
248
156
  verifyProcessing(request, requestOptions) {
@@ -261,7 +169,7 @@ class Upload {
261
169
  }
262
170
  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);
263
171
  const _response = await core.fetcher({
264
- 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, "ingestion/verify-processing"),
172
+ 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, "ingestion/verify_processing"),
265
173
  method: "POST",
266
174
  headers: _headers,
267
175
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -304,7 +212,7 @@ class Upload {
304
212
  rawResponse: _response.rawResponse,
305
213
  });
306
214
  case "timeout":
307
- throw new errors.CortexAITimeoutError("Timeout exceeded when calling POST /ingestion/verify-processing.");
215
+ throw new errors.CortexAITimeoutError("Timeout exceeded when calling POST /ingestion/verify_processing.");
308
216
  case "unknown":
309
217
  throw new errors.CortexAIError({
310
218
  message: _response.error.errorMessage,
@@ -313,24 +221,6 @@ class Upload {
313
221
  }
314
222
  }
315
223
  /**
316
- * Add memories for indexing and retrieval.
317
- *
318
- * This API provides a unified entry point for ingesting various types of content:
319
- *
320
- * **Content Types Supported:**
321
- * - Raw text content (`text` field)
322
- * - Markdown formatted content (`text` + `is_markdown=true`)
323
- * - User/assistant conversation pairs (`user_assistant_pairs` field)
324
- *
325
- * **Key Features:**
326
- * - **Inference Mode (`infer=true`)**: When enabled, the system extracts additional
327
- * insights and implicit information from your content. Useful for conversation
328
- * analysis and knowledge extraction.
329
- * - **Direct Mode (`infer=false`)**: Content is chunked and indexed as-is without
330
- * additional processing.
331
- *
332
- * Use `/ingestion/verify-processing` endpoint to check the processing status.
333
- *
334
224
  * @param {CortexAI.BodyAddMemoryMemoriesAddMemoryPost} request
335
225
  * @param {Upload.RequestOptions} requestOptions - Request-specific configuration.
336
226
  *
@@ -345,7 +235,7 @@ class Upload {
345
235
  * @example
346
236
  * await client.upload.addMemory({
347
237
  * memories: [{}],
348
- * tenant_id: "tenant_id"
238
+ * tenant_id: "tenant_1234"
349
239
  * })
350
240
  */
351
241
  addMemory(request, requestOptions) {
@@ -410,14 +300,6 @@ class Upload {
410
300
  }
411
301
  }
412
302
  /**
413
- * Permanently remove a specific memory from storage.
414
- *
415
- * This API allows you to delete a memory by its unique identifier.
416
- * Once deleted, the memory cannot be recovered, so use this operation carefully.
417
- *
418
- * The memory will be removed from your tenant's storage and will no longer
419
- * appear in search results or memory listings.
420
- *
421
303
  * @param {CortexAI.UploadDeleteMemoryRequest} request
422
304
  * @param {Upload.RequestOptions} requestOptions - Request-specific configuration.
423
305
  *
@@ -431,8 +313,8 @@ class Upload {
431
313
  *
432
314
  * @example
433
315
  * await client.upload.deleteMemory({
434
- * tenant_id: "tenant_id",
435
- * memory_id: "memory_id"
316
+ * tenant_id: "tenant_1234",
317
+ * memory_id: "memory_1234"
436
318
  * })
437
319
  */
438
320
  deleteMemory(request, requestOptions) {
File without changes
File without changes
@@ -6,7 +6,7 @@ import * as CortexAI from "../../../../index.js";
6
6
  * @example
7
7
  * {
8
8
  * memories: [{}],
9
- * tenant_id: "tenant_id"
9
+ * tenant_id: "tenant_1234"
10
10
  * }
11
11
  */
12
12
  export interface BodyAddMemoryMemoriesAddMemoryPost {
@@ -5,18 +5,20 @@ import * as core from "../../../../../core/index.js";
5
5
  /**
6
6
  * @example
7
7
  * {
8
- * files: [fs.createReadStream("/path/to/your/file")],
9
8
  * tenant_id: "tenant_id"
10
9
  * }
11
10
  */
12
- export interface BodyUploadDocumentIngestionUploadDocumentPost {
13
- /** Files to be uploaded */
14
- files: core.file.Uploadable.FileLike[];
11
+ export interface BodyUploadKnowledgeIngestionUploadKnowledgePost {
15
12
  /** Unique identifier for the tenant/organization */
16
13
  tenant_id: string;
17
14
  /** Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used. */
18
15
  sub_tenant_id?: string;
16
+ /** If true, update existing sources with the same id. */
19
17
  upsert?: boolean;
20
- /** JSON Array of file metadata objects */
18
+ /** Files to upload (documents). Omit or leave empty when only sending app_sources. */
19
+ files?: core.file.Uploadable.FileLike[] | undefined;
20
+ /** JSON array of file metadata objects; length must match files when provided. */
21
21
  file_metadata?: string;
22
+ /** JSON: single source object or array of app-generated sources to index. Omit when only uploading files. */
23
+ app_sources?: string;
22
24
  }
@@ -4,8 +4,8 @@
4
4
  /**
5
5
  * @example
6
6
  * {
7
- * tenant_id: "tenant_id",
8
- * memory_id: "memory_id"
7
+ * tenant_id: "tenant_1234",
8
+ * memory_id: "memory_1234"
9
9
  * }
10
10
  */
11
11
  export interface UploadDeleteMemoryRequest {
@@ -4,7 +4,8 @@
4
4
  /**
5
5
  * @example
6
6
  * {
7
- * file_id: "file_id"
7
+ * file_id: "<str>",
8
+ * tenant_id: "tenant_1234"
8
9
  * }
9
10
  */
10
11
  export interface UploadVerifyProcessingRequest {
@@ -1,5 +1,4 @@
1
- export { type BodyUploadDocumentIngestionUploadDocumentPost } from "./BodyUploadDocumentIngestionUploadDocumentPost.js";
2
- export { type BodyUploadAppIngestionUploadAppPost } from "./BodyUploadAppIngestionUploadAppPost.js";
1
+ export { type BodyUploadKnowledgeIngestionUploadKnowledgePost } from "./BodyUploadKnowledgeIngestionUploadKnowledgePost.js";
3
2
  export { type UploadVerifyProcessingRequest } from "./UploadVerifyProcessingRequest.js";
4
3
  export { type BodyAddMemoryMemoriesAddMemoryPost } from "./BodyAddMemoryMemoriesAddMemoryPost.js";
5
4
  export { type UploadDeleteMemoryRequest } from "./UploadDeleteMemoryRequest.js";
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
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
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export type ListContentKind = "knowledge" | "memories";
5
+ export declare const ListContentKind: {
6
+ readonly Knowledge: "knowledge";
7
+ readonly Memories: "memories";
8
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ListContentKind = void 0;
7
+ exports.ListContentKind = {
8
+ Knowledge: "knowledge",
9
+ Memories: "memories",
10
+ };
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as CortexAI from "../index.js";
5
+ /**
6
+ * Response model for listing all user memories.
7
+ */
8
+ export interface ListUserMemoriesResponse {
9
+ /** Indicates whether the memory listing operation was successful */
10
+ success?: boolean;
11
+ /** Array of all user memories associated with your tenant */
12
+ user_memories?: CortexAI.UserMemory[];
13
+ }
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
@@ -9,5 +9,5 @@ export interface RetrievalResult {
9
9
  chunks?: CortexAI.VectorStoreChunk[];
10
10
  graph_context?: CortexAI.GraphContext;
11
11
  /** Map of chunk_uuid to VectorStoreChunk for extra context from forcefully related sources. Use chunk.extra_context_ids to look up chunks: extra_context[id] for id in chunk.extra_context_ids. */
12
- extra_context?: Record<string, CortexAI.VectorStoreChunk>;
12
+ additional_context?: Record<string, CortexAI.VectorStoreChunk>;
13
13
  }
File without changes
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type RetrieveMode = "fast" | "accurate";
4
+ export type RetrieveMode = "fast" | "thinking";
5
5
  export declare const RetrieveMode: {
6
6
  readonly Fast: "fast";
7
- readonly Accurate: "accurate";
7
+ readonly Thinking: "thinking";
8
8
  };
@@ -6,5 +6,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.RetrieveMode = void 0;
7
7
  exports.RetrieveMode = {
8
8
  Fast: "fast",
9
- Accurate: "accurate",
9
+ Thinking: "thinking",
10
10
  };
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