@usecortex_ai/node 0.1.0 → 0.1.1

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 (43) hide show
  1. package/dist/api/resources/search/client/Client.d.ts +2 -2
  2. package/dist/api/resources/upload/client/Client.d.ts +16 -14
  3. package/dist/api/resources/upload/client/Client.js +36 -16
  4. package/dist/api/resources/upload/client/requests/BodyBatchUpdateUploadBatchUpdatePatch.d.ts +1 -0
  5. package/dist/api/resources/upload/client/requests/BodyBatchUploadUploadBatchUploadPost.d.ts +1 -0
  6. package/dist/api/resources/upload/client/requests/BodyUpdateFileUploadUpdateDocumentPatch.d.ts +1 -0
  7. package/dist/api/resources/upload/client/requests/{UploadUpdateTextRequest.d.ts → BodyUpdateMarkdownUploadUpdateMarkdownPatch.d.ts} +4 -3
  8. package/dist/api/resources/upload/client/requests/{UploadUpdateMarkdownRequest.d.ts → BodyUpdateMarkdownUploadUpdateTextPatch.d.ts} +4 -3
  9. package/dist/api/resources/upload/client/requests/BodyUploadFilesUploadUploadDocumentPost.d.ts +1 -0
  10. package/dist/api/resources/upload/client/requests/{UploadUploadTextRequest.d.ts → BodyUploadMarkdownUploadUploadMarkdownPost.d.ts} +4 -3
  11. package/dist/api/resources/upload/client/requests/{UploadUploadMarkdownRequest.d.ts → BodyUploadMarkdownUploadUploadTextPost.d.ts} +4 -3
  12. package/dist/api/resources/upload/client/requests/UploadScrapeWebpageRequest.d.ts +4 -1
  13. package/dist/api/resources/upload/client/requests/UploadUpdateWebpageRequest.d.ts +4 -1
  14. package/dist/api/resources/upload/client/requests/index.d.ts +4 -4
  15. package/dist/api/types/AppSourcesUploadData.d.ts +1 -1
  16. package/dist/api/types/BatchUploadData.d.ts +1 -1
  17. package/dist/api/types/BodyScrapeWebpageUploadScrapeWebpagePost.d.ts +6 -0
  18. package/dist/api/types/BodyUpdateScrapeJobUploadUpdateWebpagePatch.d.ts +6 -0
  19. package/dist/api/types/EmbeddingsCreateCollectionData.d.ts +1 -1
  20. package/dist/api/types/EmbeddingsDeleteData.d.ts +1 -1
  21. package/dist/api/types/EmbeddingsGetData.d.ts +1 -1
  22. package/dist/api/types/EmbeddingsSearchData.d.ts +1 -1
  23. package/dist/api/types/ErrorResponse.d.ts +1 -1
  24. package/dist/api/types/ExtendedContext.d.ts +1 -1
  25. package/dist/api/types/FetchContentData.d.ts +1 -1
  26. package/dist/api/types/ListSourcesResponse.d.ts +1 -1
  27. package/dist/api/types/ProcessingStatus.d.ts +1 -1
  28. package/dist/api/types/Relations.d.ts +9 -0
  29. package/dist/api/types/Relations.js +5 -0
  30. package/dist/api/types/SingleUploadData.d.ts +1 -1
  31. package/dist/api/types/TenantCreateData.d.ts +1 -1
  32. package/dist/api/types/TenantStats.d.ts +1 -1
  33. package/dist/api/types/index.d.ts +3 -2
  34. package/dist/api/types/index.js +3 -2
  35. package/package.json +1 -1
  36. package/dist/api/types/FullTextSearchData.d.ts +0 -9
  37. package/dist/api/types/SearchData.d.ts +0 -9
  38. /package/dist/api/resources/upload/client/requests/{UploadUpdateMarkdownRequest.js → BodyUpdateMarkdownUploadUpdateMarkdownPatch.js} +0 -0
  39. /package/dist/api/resources/upload/client/requests/{UploadUpdateTextRequest.js → BodyUpdateMarkdownUploadUpdateTextPatch.js} +0 -0
  40. /package/dist/api/resources/upload/client/requests/{UploadUploadMarkdownRequest.js → BodyUploadMarkdownUploadUploadMarkdownPost.js} +0 -0
  41. /package/dist/api/resources/upload/client/requests/{UploadUploadTextRequest.js → BodyUploadMarkdownUploadUploadTextPost.js} +0 -0
  42. /package/dist/api/types/{FullTextSearchData.js → BodyScrapeWebpageUploadScrapeWebpagePost.js} +0 -0
  43. /package/dist/api/types/{SearchData.js → BodyUpdateScrapeJobUploadUpdateWebpagePatch.js} +0 -0
@@ -88,7 +88,7 @@ export declare class Search {
88
88
  * tenant_id: "tenant_id"
89
89
  * })
90
90
  */
91
- retrieve(request: CortexAI.SearchRequest, requestOptions?: Search.RequestOptions): core.HttpResponsePromise<CortexAI.SearchData>;
91
+ retrieve(request: CortexAI.SearchRequest, requestOptions?: Search.RequestOptions): core.HttpResponsePromise<CortexAI.SearchChunk[]>;
92
92
  private __retrieve;
93
93
  /**
94
94
  * Full text search endpoint for Cortex customers.
@@ -127,7 +127,7 @@ export declare class Search {
127
127
  * tenant_id: "tenant_id"
128
128
  * })
129
129
  */
130
- fullTextSearch(request: CortexAI.FullTextSearchRequest, requestOptions?: Search.RequestOptions): core.HttpResponsePromise<CortexAI.FullTextSearchData>;
130
+ fullTextSearch(request: CortexAI.FullTextSearchRequest, requestOptions?: Search.RequestOptions): core.HttpResponsePromise<CortexAI.SearchChunk[]>;
131
131
  private __fullTextSearch;
132
132
  protected _getAuthorizationHeader(): Promise<string | undefined>;
133
133
  }
@@ -138,7 +138,7 @@ export declare class Upload {
138
138
  * Upload markdown content. If request.document_metadata contains a 'file_id' key (non-empty), it will be used as the file ID;
139
139
  * otherwise, a new file_id will be generated for that file. This allows file-specific IDs to be set directly in the metadata.
140
140
  *
141
- * @param {CortexAI.UploadUploadMarkdownRequest} request
141
+ * @param {CortexAI.BodyUploadMarkdownUploadUploadMarkdownPost} request
142
142
  * @param {Upload.RequestOptions} requestOptions - Request-specific configuration.
143
143
  *
144
144
  * @throws {@link CortexAI.BadRequestError}
@@ -152,18 +152,18 @@ export declare class Upload {
152
152
  * @example
153
153
  * await client.upload.uploadMarkdown({
154
154
  * tenant_id: "tenant_id",
155
- * body: {
155
+ * request: {
156
156
  * content: "content"
157
157
  * }
158
158
  * })
159
159
  */
160
- uploadMarkdown(request: CortexAI.UploadUploadMarkdownRequest, requestOptions?: Upload.RequestOptions): core.HttpResponsePromise<CortexAI.SingleUploadData>;
160
+ uploadMarkdown(request: CortexAI.BodyUploadMarkdownUploadUploadMarkdownPost, requestOptions?: Upload.RequestOptions): core.HttpResponsePromise<CortexAI.SingleUploadData>;
161
161
  private __uploadMarkdown;
162
162
  /**
163
163
  * Upload markdown content. If request.document_metadata contains a 'file_id' key (non-empty), it will be used as the file ID;
164
164
  * otherwise, a new file_id will be generated for that file. This allows file-specific IDs to be set directly in the metadata.
165
165
  *
166
- * @param {CortexAI.UploadUploadTextRequest} request
166
+ * @param {CortexAI.BodyUploadMarkdownUploadUploadTextPost} request
167
167
  * @param {Upload.RequestOptions} requestOptions - Request-specific configuration.
168
168
  *
169
169
  * @throws {@link CortexAI.BadRequestError}
@@ -177,15 +177,15 @@ export declare class Upload {
177
177
  * @example
178
178
  * await client.upload.uploadText({
179
179
  * tenant_id: "tenant_id",
180
- * body: {
180
+ * request: {
181
181
  * content: "content"
182
182
  * }
183
183
  * })
184
184
  */
185
- uploadText(request: CortexAI.UploadUploadTextRequest, requestOptions?: Upload.RequestOptions): core.HttpResponsePromise<CortexAI.SingleUploadData>;
185
+ uploadText(request: CortexAI.BodyUploadMarkdownUploadUploadTextPost, requestOptions?: Upload.RequestOptions): core.HttpResponsePromise<CortexAI.SingleUploadData>;
186
186
  private __uploadText;
187
187
  /**
188
- * @param {CortexAI.UploadUpdateMarkdownRequest} request
188
+ * @param {CortexAI.BodyUpdateMarkdownUploadUpdateMarkdownPatch} request
189
189
  * @param {Upload.RequestOptions} requestOptions - Request-specific configuration.
190
190
  *
191
191
  * @throws {@link CortexAI.BadRequestError}
@@ -200,15 +200,15 @@ export declare class Upload {
200
200
  * await client.upload.updateMarkdown({
201
201
  * source_id: "source_id",
202
202
  * tenant_id: "tenant_id",
203
- * body: {
203
+ * request: {
204
204
  * content: "content"
205
205
  * }
206
206
  * })
207
207
  */
208
- updateMarkdown(request: CortexAI.UploadUpdateMarkdownRequest, requestOptions?: Upload.RequestOptions): core.HttpResponsePromise<CortexAI.SingleUploadData>;
208
+ updateMarkdown(request: CortexAI.BodyUpdateMarkdownUploadUpdateMarkdownPatch, requestOptions?: Upload.RequestOptions): core.HttpResponsePromise<CortexAI.SingleUploadData>;
209
209
  private __updateMarkdown;
210
210
  /**
211
- * @param {CortexAI.UploadUpdateTextRequest} request
211
+ * @param {CortexAI.BodyUpdateMarkdownUploadUpdateTextPatch} request
212
212
  * @param {Upload.RequestOptions} requestOptions - Request-specific configuration.
213
213
  *
214
214
  * @throws {@link CortexAI.BadRequestError}
@@ -223,12 +223,12 @@ export declare class Upload {
223
223
  * await client.upload.updateText({
224
224
  * source_id: "source_id",
225
225
  * tenant_id: "tenant_id",
226
- * body: {
226
+ * request: {
227
227
  * content: "content"
228
228
  * }
229
229
  * })
230
230
  */
231
- updateText(request: CortexAI.UploadUpdateTextRequest, requestOptions?: Upload.RequestOptions): core.HttpResponsePromise<CortexAI.SingleUploadData>;
231
+ updateText(request: CortexAI.BodyUpdateMarkdownUploadUpdateTextPatch, requestOptions?: Upload.RequestOptions): core.HttpResponsePromise<CortexAI.SingleUploadData>;
232
232
  private __updateText;
233
233
  /**
234
234
  * @param {CortexAI.EmbeddingsUploadRequest} request
@@ -287,7 +287,8 @@ export declare class Upload {
287
287
  * @example
288
288
  * await client.upload.scrapeWebpage({
289
289
  * web_url: "web_url",
290
- * tenant_id: "tenant_id"
290
+ * tenant_id: "tenant_id",
291
+ * body: {}
291
292
  * })
292
293
  */
293
294
  scrapeWebpage(request: CortexAI.UploadScrapeWebpageRequest, requestOptions?: Upload.RequestOptions): core.HttpResponsePromise<CortexAI.SingleUploadData>;
@@ -308,7 +309,8 @@ export declare class Upload {
308
309
  * await client.upload.updateWebpage({
309
310
  * web_url: "web_url",
310
311
  * source_id: "source_id",
311
- * tenant_id: "tenant_id"
312
+ * tenant_id: "tenant_id",
313
+ * body: {}
312
314
  * })
313
315
  */
314
316
  updateWebpage(request: CortexAI.UploadUpdateWebpageRequest, requestOptions?: Upload.RequestOptions): core.HttpResponsePromise<CortexAI.SingleUploadData>;
@@ -86,6 +86,9 @@ class Upload {
86
86
  if (request.document_metadata != null) {
87
87
  _request.append("document_metadata", request.document_metadata);
88
88
  }
89
+ if (request.relations != null) {
90
+ _request.append("relations", request.relations);
91
+ }
89
92
  const _maybeEncodedRequest = await _request.getRequest();
90
93
  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);
91
94
  const _response = await core.fetcher({
@@ -187,6 +190,9 @@ class Upload {
187
190
  if (request.document_metadata != null) {
188
191
  _request.append("document_metadata", request.document_metadata);
189
192
  }
193
+ if (request.relations != null) {
194
+ _request.append("relations", request.relations);
195
+ }
190
196
  const _maybeEncodedRequest = await _request.getRequest();
191
197
  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);
192
198
  const _response = await core.fetcher({
@@ -281,6 +287,9 @@ class Upload {
281
287
  if (request.document_metadata != null) {
282
288
  _request.append("document_metadata", request.document_metadata);
283
289
  }
290
+ if (request.relations != null) {
291
+ _request.append("relations", request.relations);
292
+ }
284
293
  const _maybeEncodedRequest = await _request.getRequest();
285
294
  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);
286
295
  const _response = await core.fetcher({
@@ -377,6 +386,9 @@ class Upload {
377
386
  if (request.document_metadata != null) {
378
387
  _request.append("document_metadata", request.document_metadata);
379
388
  }
389
+ if (request.relations != null) {
390
+ _request.append("relations", request.relations);
391
+ }
380
392
  const _maybeEncodedRequest = await _request.getRequest();
381
393
  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);
382
394
  const _response = await core.fetcher({
@@ -523,7 +535,7 @@ class Upload {
523
535
  * Upload markdown content. If request.document_metadata contains a 'file_id' key (non-empty), it will be used as the file ID;
524
536
  * otherwise, a new file_id will be generated for that file. This allows file-specific IDs to be set directly in the metadata.
525
537
  *
526
- * @param {CortexAI.UploadUploadMarkdownRequest} request
538
+ * @param {CortexAI.BodyUploadMarkdownUploadUploadMarkdownPost} request
527
539
  * @param {Upload.RequestOptions} requestOptions - Request-specific configuration.
528
540
  *
529
541
  * @throws {@link CortexAI.BadRequestError}
@@ -537,7 +549,7 @@ class Upload {
537
549
  * @example
538
550
  * await client.upload.uploadMarkdown({
539
551
  * tenant_id: "tenant_id",
540
- * body: {
552
+ * request: {
541
553
  * content: "content"
542
554
  * }
543
555
  * })
@@ -547,7 +559,7 @@ class Upload {
547
559
  }
548
560
  async __uploadMarkdown(request, requestOptions) {
549
561
  var _a, _b, _c;
550
- const { tenant_id: tenantId, sub_tenant_id: subTenantId, body: _body } = request;
562
+ const { tenant_id: tenantId, sub_tenant_id: subTenantId } = request, _body = __rest(request, ["tenant_id", "sub_tenant_id"]);
551
563
  const _queryParams = {};
552
564
  _queryParams["tenant_id"] = tenantId;
553
565
  if (subTenantId != null) {
@@ -613,7 +625,7 @@ class Upload {
613
625
  * Upload markdown content. If request.document_metadata contains a 'file_id' key (non-empty), it will be used as the file ID;
614
626
  * otherwise, a new file_id will be generated for that file. This allows file-specific IDs to be set directly in the metadata.
615
627
  *
616
- * @param {CortexAI.UploadUploadTextRequest} request
628
+ * @param {CortexAI.BodyUploadMarkdownUploadUploadTextPost} request
617
629
  * @param {Upload.RequestOptions} requestOptions - Request-specific configuration.
618
630
  *
619
631
  * @throws {@link CortexAI.BadRequestError}
@@ -627,7 +639,7 @@ class Upload {
627
639
  * @example
628
640
  * await client.upload.uploadText({
629
641
  * tenant_id: "tenant_id",
630
- * body: {
642
+ * request: {
631
643
  * content: "content"
632
644
  * }
633
645
  * })
@@ -637,7 +649,7 @@ class Upload {
637
649
  }
638
650
  async __uploadText(request, requestOptions) {
639
651
  var _a, _b, _c;
640
- const { tenant_id: tenantId, sub_tenant_id: subTenantId, body: _body } = request;
652
+ const { tenant_id: tenantId, sub_tenant_id: subTenantId } = request, _body = __rest(request, ["tenant_id", "sub_tenant_id"]);
641
653
  const _queryParams = {};
642
654
  _queryParams["tenant_id"] = tenantId;
643
655
  if (subTenantId != null) {
@@ -700,7 +712,7 @@ class Upload {
700
712
  }
701
713
  }
702
714
  /**
703
- * @param {CortexAI.UploadUpdateMarkdownRequest} request
715
+ * @param {CortexAI.BodyUpdateMarkdownUploadUpdateMarkdownPatch} request
704
716
  * @param {Upload.RequestOptions} requestOptions - Request-specific configuration.
705
717
  *
706
718
  * @throws {@link CortexAI.BadRequestError}
@@ -715,7 +727,7 @@ class Upload {
715
727
  * await client.upload.updateMarkdown({
716
728
  * source_id: "source_id",
717
729
  * tenant_id: "tenant_id",
718
- * body: {
730
+ * request: {
719
731
  * content: "content"
720
732
  * }
721
733
  * })
@@ -725,7 +737,7 @@ class Upload {
725
737
  }
726
738
  async __updateMarkdown(request, requestOptions) {
727
739
  var _a, _b, _c;
728
- const { source_id: sourceId, tenant_id: tenantId, sub_tenant_id: subTenantId, body: _body } = request;
740
+ const { source_id: sourceId, tenant_id: tenantId, sub_tenant_id: subTenantId } = request, _body = __rest(request, ["source_id", "tenant_id", "sub_tenant_id"]);
729
741
  const _queryParams = {};
730
742
  _queryParams["source_id"] = sourceId;
731
743
  _queryParams["tenant_id"] = tenantId;
@@ -789,7 +801,7 @@ class Upload {
789
801
  }
790
802
  }
791
803
  /**
792
- * @param {CortexAI.UploadUpdateTextRequest} request
804
+ * @param {CortexAI.BodyUpdateMarkdownUploadUpdateTextPatch} request
793
805
  * @param {Upload.RequestOptions} requestOptions - Request-specific configuration.
794
806
  *
795
807
  * @throws {@link CortexAI.BadRequestError}
@@ -804,7 +816,7 @@ class Upload {
804
816
  * await client.upload.updateText({
805
817
  * source_id: "source_id",
806
818
  * tenant_id: "tenant_id",
807
- * body: {
819
+ * request: {
808
820
  * content: "content"
809
821
  * }
810
822
  * })
@@ -814,7 +826,7 @@ class Upload {
814
826
  }
815
827
  async __updateText(request, requestOptions) {
816
828
  var _a, _b, _c;
817
- const { source_id: sourceId, tenant_id: tenantId, sub_tenant_id: subTenantId, body: _body } = request;
829
+ const { source_id: sourceId, tenant_id: tenantId, sub_tenant_id: subTenantId } = request, _body = __rest(request, ["source_id", "tenant_id", "sub_tenant_id"]);
818
830
  const _queryParams = {};
819
831
  _queryParams["source_id"] = sourceId;
820
832
  _queryParams["tenant_id"] = tenantId;
@@ -1064,7 +1076,8 @@ class Upload {
1064
1076
  * @example
1065
1077
  * await client.upload.scrapeWebpage({
1066
1078
  * web_url: "web_url",
1067
- * tenant_id: "tenant_id"
1079
+ * tenant_id: "tenant_id",
1080
+ * body: {}
1068
1081
  * })
1069
1082
  */
1070
1083
  scrapeWebpage(request, requestOptions) {
@@ -1072,7 +1085,7 @@ class Upload {
1072
1085
  }
1073
1086
  async __scrapeWebpage(request, requestOptions) {
1074
1087
  var _a, _b, _c;
1075
- const { web_url: webUrl, tenant_id: tenantId, sub_tenant_id: subTenantId, file_id: fileId } = request;
1088
+ const { web_url: webUrl, tenant_id: tenantId, sub_tenant_id: subTenantId, file_id: fileId, body: _body, } = request;
1076
1089
  const _queryParams = {};
1077
1090
  _queryParams["web_url"] = webUrl;
1078
1091
  _queryParams["tenant_id"] = tenantId;
@@ -1087,7 +1100,10 @@ class Upload {
1087
1100
  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, "upload/scrape_webpage"),
1088
1101
  method: "POST",
1089
1102
  headers: _headers,
1103
+ contentType: "application/x-www-form-urlencoded",
1090
1104
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
1105
+ requestType: "json",
1106
+ body: _body,
1091
1107
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1092
1108
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1093
1109
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -1151,7 +1167,8 @@ class Upload {
1151
1167
  * await client.upload.updateWebpage({
1152
1168
  * web_url: "web_url",
1153
1169
  * source_id: "source_id",
1154
- * tenant_id: "tenant_id"
1170
+ * tenant_id: "tenant_id",
1171
+ * body: {}
1155
1172
  * })
1156
1173
  */
1157
1174
  updateWebpage(request, requestOptions) {
@@ -1159,7 +1176,7 @@ class Upload {
1159
1176
  }
1160
1177
  async __updateWebpage(request, requestOptions) {
1161
1178
  var _a, _b, _c;
1162
- const { web_url: webUrl, source_id: sourceId, tenant_id: tenantId, sub_tenant_id: subTenantId } = request;
1179
+ const { web_url: webUrl, source_id: sourceId, tenant_id: tenantId, sub_tenant_id: subTenantId, body: _body, } = request;
1163
1180
  const _queryParams = {};
1164
1181
  _queryParams["web_url"] = webUrl;
1165
1182
  _queryParams["source_id"] = sourceId;
@@ -1172,7 +1189,10 @@ class Upload {
1172
1189
  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, "upload/update_webpage"),
1173
1190
  method: "PATCH",
1174
1191
  headers: _headers,
1192
+ contentType: "application/x-www-form-urlencoded",
1175
1193
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
1194
+ requestType: "json",
1195
+ body: _body,
1176
1196
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1177
1197
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1178
1198
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -16,4 +16,5 @@ export interface BodyBatchUpdateUploadBatchUpdatePatch {
16
16
  source_ids?: string[];
17
17
  tenant_metadata?: string;
18
18
  document_metadata?: string;
19
+ relations?: string;
19
20
  }
@@ -15,4 +15,5 @@ export interface BodyBatchUploadUploadBatchUploadPost {
15
15
  files: core.file.Uploadable.FileLike[];
16
16
  tenant_metadata?: string;
17
17
  document_metadata?: string;
18
+ relations?: string;
18
19
  }
@@ -17,4 +17,5 @@ export interface BodyUpdateFileUploadUpdateDocumentPatch {
17
17
  file: core.file.Uploadable.FileLike;
18
18
  tenant_metadata?: string;
19
19
  document_metadata?: string;
20
+ relations?: string;
20
21
  }
@@ -7,14 +7,15 @@ import * as CortexAI from "../../../../index.js";
7
7
  * {
8
8
  * source_id: "source_id",
9
9
  * tenant_id: "tenant_id",
10
- * body: {
10
+ * request: {
11
11
  * content: "content"
12
12
  * }
13
13
  * }
14
14
  */
15
- export interface UploadUpdateTextRequest {
15
+ export interface BodyUpdateMarkdownUploadUpdateMarkdownPatch {
16
16
  source_id: string;
17
17
  tenant_id: string;
18
18
  sub_tenant_id?: string;
19
- body: CortexAI.MarkdownUploadRequest;
19
+ request: CortexAI.MarkdownUploadRequest;
20
+ relations?: CortexAI.Relations;
20
21
  }
@@ -7,14 +7,15 @@ import * as CortexAI from "../../../../index.js";
7
7
  * {
8
8
  * source_id: "source_id",
9
9
  * tenant_id: "tenant_id",
10
- * body: {
10
+ * request: {
11
11
  * content: "content"
12
12
  * }
13
13
  * }
14
14
  */
15
- export interface UploadUpdateMarkdownRequest {
15
+ export interface BodyUpdateMarkdownUploadUpdateTextPatch {
16
16
  source_id: string;
17
17
  tenant_id: string;
18
18
  sub_tenant_id?: string;
19
- body: CortexAI.MarkdownUploadRequest;
19
+ request: CortexAI.MarkdownUploadRequest;
20
+ relations?: CortexAI.Relations;
20
21
  }
@@ -15,4 +15,5 @@ export interface BodyUploadFilesUploadUploadDocumentPost {
15
15
  file: core.file.Uploadable.FileLike;
16
16
  tenant_metadata?: string;
17
17
  document_metadata?: string;
18
+ relations?: string;
18
19
  }
@@ -6,13 +6,14 @@ import * as CortexAI from "../../../../index.js";
6
6
  * @example
7
7
  * {
8
8
  * tenant_id: "tenant_id",
9
- * body: {
9
+ * request: {
10
10
  * content: "content"
11
11
  * }
12
12
  * }
13
13
  */
14
- export interface UploadUploadTextRequest {
14
+ export interface BodyUploadMarkdownUploadUploadMarkdownPost {
15
15
  tenant_id: string;
16
16
  sub_tenant_id?: string;
17
- body: CortexAI.MarkdownUploadRequest;
17
+ request: CortexAI.MarkdownUploadRequest;
18
+ relations?: CortexAI.Relations;
18
19
  }
@@ -6,13 +6,14 @@ import * as CortexAI from "../../../../index.js";
6
6
  * @example
7
7
  * {
8
8
  * tenant_id: "tenant_id",
9
- * body: {
9
+ * request: {
10
10
  * content: "content"
11
11
  * }
12
12
  * }
13
13
  */
14
- export interface UploadUploadMarkdownRequest {
14
+ export interface BodyUploadMarkdownUploadUploadTextPost {
15
15
  tenant_id: string;
16
16
  sub_tenant_id?: string;
17
- body: CortexAI.MarkdownUploadRequest;
17
+ request: CortexAI.MarkdownUploadRequest;
18
+ relations?: CortexAI.Relations;
18
19
  }
@@ -1,11 +1,13 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ import * as CortexAI from "../../../../index.js";
4
5
  /**
5
6
  * @example
6
7
  * {
7
8
  * web_url: "web_url",
8
- * tenant_id: "tenant_id"
9
+ * tenant_id: "tenant_id",
10
+ * body: {}
9
11
  * }
10
12
  */
11
13
  export interface UploadScrapeWebpageRequest {
@@ -13,4 +15,5 @@ export interface UploadScrapeWebpageRequest {
13
15
  tenant_id: string;
14
16
  sub_tenant_id?: string;
15
17
  file_id?: string;
18
+ body: CortexAI.BodyScrapeWebpageUploadScrapeWebpagePost;
16
19
  }
@@ -1,12 +1,14 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ import * as CortexAI from "../../../../index.js";
4
5
  /**
5
6
  * @example
6
7
  * {
7
8
  * web_url: "web_url",
8
9
  * source_id: "source_id",
9
- * tenant_id: "tenant_id"
10
+ * tenant_id: "tenant_id",
11
+ * body: {}
10
12
  * }
11
13
  */
12
14
  export interface UploadUpdateWebpageRequest {
@@ -14,4 +16,5 @@ export interface UploadUpdateWebpageRequest {
14
16
  source_id: string;
15
17
  tenant_id: string;
16
18
  sub_tenant_id?: string;
19
+ body: CortexAI.BodyUpdateScrapeJobUploadUpdateWebpagePatch;
17
20
  }
@@ -3,10 +3,10 @@ export { type BodyBatchUpdateUploadBatchUpdatePatch } from "./BodyBatchUpdateUpl
3
3
  export { type BodyUploadFilesUploadUploadDocumentPost } from "./BodyUploadFilesUploadUploadDocumentPost.js";
4
4
  export { type BodyUpdateFileUploadUpdateDocumentPatch } from "./BodyUpdateFileUploadUpdateDocumentPatch.js";
5
5
  export { type UploadUploadAppSourcesRequest } from "./UploadUploadAppSourcesRequest.js";
6
- export { type UploadUploadMarkdownRequest } from "./UploadUploadMarkdownRequest.js";
7
- export { type UploadUploadTextRequest } from "./UploadUploadTextRequest.js";
8
- export { type UploadUpdateMarkdownRequest } from "./UploadUpdateMarkdownRequest.js";
9
- export { type UploadUpdateTextRequest } from "./UploadUpdateTextRequest.js";
6
+ export { type BodyUploadMarkdownUploadUploadMarkdownPost } from "./BodyUploadMarkdownUploadUploadMarkdownPost.js";
7
+ export { type BodyUploadMarkdownUploadUploadTextPost } from "./BodyUploadMarkdownUploadUploadTextPost.js";
8
+ export { type BodyUpdateMarkdownUploadUpdateMarkdownPatch } from "./BodyUpdateMarkdownUploadUpdateMarkdownPatch.js";
9
+ export { type BodyUpdateMarkdownUploadUpdateTextPatch } from "./BodyUpdateMarkdownUploadUpdateTextPatch.js";
10
10
  export { type EmbeddingsUploadRequest } from "./EmbeddingsUploadRequest.js";
11
11
  export { type EmbeddingsUpdateRequest } from "./EmbeddingsUpdateRequest.js";
12
12
  export { type UploadScrapeWebpageRequest } from "./UploadScrapeWebpageRequest.js";
@@ -4,6 +4,6 @@
4
4
  import * as CortexAI from "../index.js";
5
5
  export interface AppSourcesUploadData {
6
6
  success?: boolean;
7
- message: string;
7
+ message?: string;
8
8
  uploaded: CortexAI.FileUploadResult[];
9
9
  }
@@ -4,6 +4,6 @@
4
4
  import * as CortexAI from "../index.js";
5
5
  export interface BatchUploadData {
6
6
  success?: boolean;
7
- message: string;
7
+ message?: string;
8
8
  uploaded: CortexAI.FileUploadResult[];
9
9
  }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface BodyScrapeWebpageUploadScrapeWebpagePost {
5
+ relations?: string;
6
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface BodyUpdateScrapeJobUploadUpdateWebpagePatch {
5
+ relations?: string;
6
+ }
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export interface EmbeddingsCreateCollectionData {
5
5
  success?: boolean;
6
- message: string;
6
+ message?: string;
7
7
  tenant_id: string;
8
8
  sub_tenant_id: string;
9
9
  }
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export interface EmbeddingsDeleteData {
5
5
  success?: boolean;
6
- message: string;
6
+ message?: string;
7
7
  total_deleted: number;
8
8
  status: Record<string, boolean>;
9
9
  }
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export interface EmbeddingsGetData {
5
5
  success?: boolean;
6
- message: string;
6
+ message?: string;
7
7
  embeddings: Record<string, number[]>;
8
8
  not_found_chunk_ids: string[];
9
9
  }
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export interface EmbeddingsSearchData {
5
5
  success?: boolean;
6
- message: string;
6
+ message?: string;
7
7
  chunk_ids: string[];
8
8
  scores: number[];
9
9
  }
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export interface ErrorResponse {
5
5
  success?: boolean;
6
- message: string;
6
+ message?: string;
7
7
  error_code?: string;
8
8
  data?: Record<string, unknown>;
9
9
  }
@@ -3,5 +3,5 @@
3
3
  */
4
4
  import * as CortexAI from "../index.js";
5
5
  export interface ExtendedContext {
6
- related_chunks?: CortexAI.RelatedChunk[];
6
+ relations?: CortexAI.RelatedChunk[];
7
7
  }
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export interface FetchContentData {
5
5
  success?: boolean;
6
- message: string;
6
+ message?: string;
7
7
  file_id: string;
8
8
  url: string;
9
9
  file_content?: string;
@@ -4,6 +4,6 @@
4
4
  import * as CortexAI from "../index.js";
5
5
  export interface ListSourcesResponse {
6
6
  success?: boolean;
7
- message: string;
7
+ message?: string;
8
8
  sources: (CortexAI.Source | undefined)[];
9
9
  }
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export interface ProcessingStatus {
5
5
  success?: boolean;
6
- message: string;
6
+ message?: string;
7
7
  file_id: string;
8
8
  indexing_status: string;
9
9
  }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface Relations {
5
+ /** List of cortex source IDs for relations */
6
+ cortex_source_ids?: string[];
7
+ /** Additional metadata for relations */
8
+ auto_discovery?: Record<string, unknown>;
9
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export interface SingleUploadData {
5
5
  success?: boolean;
6
- message: string;
6
+ message?: string;
7
7
  file_id: string;
8
8
  }
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export interface TenantCreateData {
5
5
  success?: boolean;
6
- message: string;
6
+ message?: string;
7
7
  status: string;
8
8
  tenant_id: string;
9
9
  }
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export interface TenantStats {
5
5
  success?: boolean;
6
- message: string;
6
+ message?: string;
7
7
  object_count: number;
8
8
  vector_dimension?: number;
9
9
  tenant_name: string;
@@ -3,6 +3,8 @@ export * from "./AppSourcesUploadData.js";
3
3
  export * from "./AttachmentModel.js";
4
4
  export * from "./Bm25OperatorType.js";
5
5
  export * from "./BatchUploadData.js";
6
+ export * from "./BodyScrapeWebpageUploadScrapeWebpagePost.js";
7
+ export * from "./BodyUpdateScrapeJobUploadUpdateWebpagePatch.js";
6
8
  export * from "./ContentModel.js";
7
9
  export * from "./DeleteMemoryRequest.js";
8
10
  export * from "./EmbeddingsCreateCollectionData.js";
@@ -13,14 +15,13 @@ export * from "./ErrorResponse.js";
13
15
  export * from "./ExtendedContext.js";
14
16
  export * from "./FetchContentData.js";
15
17
  export * from "./FileUploadResult.js";
16
- export * from "./FullTextSearchData.js";
17
18
  export * from "./HttpValidationError.js";
18
19
  export * from "./ListSourcesResponse.js";
19
20
  export * from "./MarkdownUploadRequest.js";
20
21
  export * from "./ProcessingStatus.js";
21
22
  export * from "./RelatedChunk.js";
23
+ export * from "./Relations.js";
22
24
  export * from "./SearchChunk.js";
23
- export * from "./SearchData.js";
24
25
  export * from "./SingleUploadData.js";
25
26
  export * from "./Source.js";
26
27
  export * from "./SourceContent.js";
@@ -19,6 +19,8 @@ __exportStar(require("./AppSourcesUploadData.js"), exports);
19
19
  __exportStar(require("./AttachmentModel.js"), exports);
20
20
  __exportStar(require("./Bm25OperatorType.js"), exports);
21
21
  __exportStar(require("./BatchUploadData.js"), exports);
22
+ __exportStar(require("./BodyScrapeWebpageUploadScrapeWebpagePost.js"), exports);
23
+ __exportStar(require("./BodyUpdateScrapeJobUploadUpdateWebpagePatch.js"), exports);
22
24
  __exportStar(require("./ContentModel.js"), exports);
23
25
  __exportStar(require("./DeleteMemoryRequest.js"), exports);
24
26
  __exportStar(require("./EmbeddingsCreateCollectionData.js"), exports);
@@ -29,14 +31,13 @@ __exportStar(require("./ErrorResponse.js"), exports);
29
31
  __exportStar(require("./ExtendedContext.js"), exports);
30
32
  __exportStar(require("./FetchContentData.js"), exports);
31
33
  __exportStar(require("./FileUploadResult.js"), exports);
32
- __exportStar(require("./FullTextSearchData.js"), exports);
33
34
  __exportStar(require("./HttpValidationError.js"), exports);
34
35
  __exportStar(require("./ListSourcesResponse.js"), exports);
35
36
  __exportStar(require("./MarkdownUploadRequest.js"), exports);
36
37
  __exportStar(require("./ProcessingStatus.js"), exports);
37
38
  __exportStar(require("./RelatedChunk.js"), exports);
39
+ __exportStar(require("./Relations.js"), exports);
38
40
  __exportStar(require("./SearchChunk.js"), exports);
39
- __exportStar(require("./SearchData.js"), exports);
40
41
  __exportStar(require("./SingleUploadData.js"), exports);
41
42
  __exportStar(require("./Source.js"), exports);
42
43
  __exportStar(require("./SourceContent.js"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usecortex_ai/node",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "The official TypeScript SDK for the Cortex AI platform.",
5
5
  "author": "Nishkarsh Shrivastava <nishkarsh@usecortex.ai>",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -1,9 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as CortexAI from "../index.js";
5
- export interface FullTextSearchData {
6
- success?: boolean;
7
- message: string;
8
- chunks: CortexAI.SearchChunk[];
9
- }
@@ -1,9 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as CortexAI from "../index.js";
5
- export interface SearchData {
6
- success?: boolean;
7
- message: string;
8
- chunks: CortexAI.SearchChunk[];
9
- }