@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.
- package/dist/api/resources/search/client/Client.d.ts +2 -2
- package/dist/api/resources/upload/client/Client.d.ts +16 -14
- package/dist/api/resources/upload/client/Client.js +36 -16
- package/dist/api/resources/upload/client/requests/BodyBatchUpdateUploadBatchUpdatePatch.d.ts +1 -0
- package/dist/api/resources/upload/client/requests/BodyBatchUploadUploadBatchUploadPost.d.ts +1 -0
- package/dist/api/resources/upload/client/requests/BodyUpdateFileUploadUpdateDocumentPatch.d.ts +1 -0
- package/dist/api/resources/upload/client/requests/{UploadUpdateTextRequest.d.ts → BodyUpdateMarkdownUploadUpdateMarkdownPatch.d.ts} +4 -3
- package/dist/api/resources/upload/client/requests/{UploadUpdateMarkdownRequest.d.ts → BodyUpdateMarkdownUploadUpdateTextPatch.d.ts} +4 -3
- package/dist/api/resources/upload/client/requests/BodyUploadFilesUploadUploadDocumentPost.d.ts +1 -0
- package/dist/api/resources/upload/client/requests/{UploadUploadTextRequest.d.ts → BodyUploadMarkdownUploadUploadMarkdownPost.d.ts} +4 -3
- package/dist/api/resources/upload/client/requests/{UploadUploadMarkdownRequest.d.ts → BodyUploadMarkdownUploadUploadTextPost.d.ts} +4 -3
- package/dist/api/resources/upload/client/requests/UploadScrapeWebpageRequest.d.ts +4 -1
- package/dist/api/resources/upload/client/requests/UploadUpdateWebpageRequest.d.ts +4 -1
- package/dist/api/resources/upload/client/requests/index.d.ts +4 -4
- package/dist/api/types/AppSourcesUploadData.d.ts +1 -1
- package/dist/api/types/BatchUploadData.d.ts +1 -1
- package/dist/api/types/BodyScrapeWebpageUploadScrapeWebpagePost.d.ts +6 -0
- package/dist/api/types/BodyUpdateScrapeJobUploadUpdateWebpagePatch.d.ts +6 -0
- package/dist/api/types/EmbeddingsCreateCollectionData.d.ts +1 -1
- package/dist/api/types/EmbeddingsDeleteData.d.ts +1 -1
- package/dist/api/types/EmbeddingsGetData.d.ts +1 -1
- package/dist/api/types/EmbeddingsSearchData.d.ts +1 -1
- package/dist/api/types/ErrorResponse.d.ts +1 -1
- package/dist/api/types/ExtendedContext.d.ts +1 -1
- package/dist/api/types/FetchContentData.d.ts +1 -1
- package/dist/api/types/ListSourcesResponse.d.ts +1 -1
- package/dist/api/types/ProcessingStatus.d.ts +1 -1
- package/dist/api/types/Relations.d.ts +9 -0
- package/dist/api/types/Relations.js +5 -0
- package/dist/api/types/SingleUploadData.d.ts +1 -1
- package/dist/api/types/TenantCreateData.d.ts +1 -1
- package/dist/api/types/TenantStats.d.ts +1 -1
- package/dist/api/types/index.d.ts +3 -2
- package/dist/api/types/index.js +3 -2
- package/package.json +1 -1
- package/dist/api/types/FullTextSearchData.d.ts +0 -9
- package/dist/api/types/SearchData.d.ts +0 -9
- /package/dist/api/resources/upload/client/requests/{UploadUpdateMarkdownRequest.js → BodyUpdateMarkdownUploadUpdateMarkdownPatch.js} +0 -0
- /package/dist/api/resources/upload/client/requests/{UploadUpdateTextRequest.js → BodyUpdateMarkdownUploadUpdateTextPatch.js} +0 -0
- /package/dist/api/resources/upload/client/requests/{UploadUploadMarkdownRequest.js → BodyUploadMarkdownUploadUploadMarkdownPost.js} +0 -0
- /package/dist/api/resources/upload/client/requests/{UploadUploadTextRequest.js → BodyUploadMarkdownUploadUploadTextPost.js} +0 -0
- /package/dist/api/types/{FullTextSearchData.js → BodyScrapeWebpageUploadScrapeWebpagePost.js} +0 -0
- /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.
|
|
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.
|
|
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.
|
|
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
|
-
*
|
|
155
|
+
* request: {
|
|
156
156
|
* content: "content"
|
|
157
157
|
* }
|
|
158
158
|
* })
|
|
159
159
|
*/
|
|
160
|
-
uploadMarkdown(request: CortexAI.
|
|
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.
|
|
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
|
-
*
|
|
180
|
+
* request: {
|
|
181
181
|
* content: "content"
|
|
182
182
|
* }
|
|
183
183
|
* })
|
|
184
184
|
*/
|
|
185
|
-
uploadText(request: CortexAI.
|
|
185
|
+
uploadText(request: CortexAI.BodyUploadMarkdownUploadUploadTextPost, requestOptions?: Upload.RequestOptions): core.HttpResponsePromise<CortexAI.SingleUploadData>;
|
|
186
186
|
private __uploadText;
|
|
187
187
|
/**
|
|
188
|
-
* @param {CortexAI.
|
|
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
|
-
*
|
|
203
|
+
* request: {
|
|
204
204
|
* content: "content"
|
|
205
205
|
* }
|
|
206
206
|
* })
|
|
207
207
|
*/
|
|
208
|
-
updateMarkdown(request: CortexAI.
|
|
208
|
+
updateMarkdown(request: CortexAI.BodyUpdateMarkdownUploadUpdateMarkdownPatch, requestOptions?: Upload.RequestOptions): core.HttpResponsePromise<CortexAI.SingleUploadData>;
|
|
209
209
|
private __updateMarkdown;
|
|
210
210
|
/**
|
|
211
|
-
* @param {CortexAI.
|
|
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
|
-
*
|
|
226
|
+
* request: {
|
|
227
227
|
* content: "content"
|
|
228
228
|
* }
|
|
229
229
|
* })
|
|
230
230
|
*/
|
|
231
|
-
updateText(request: CortexAI.
|
|
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.
|
|
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
|
-
*
|
|
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,
|
|
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.
|
|
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
|
-
*
|
|
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,
|
|
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.
|
|
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
|
-
*
|
|
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,
|
|
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.
|
|
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
|
-
*
|
|
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,
|
|
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,
|
|
@@ -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
|
-
*
|
|
10
|
+
* request: {
|
|
11
11
|
* content: "content"
|
|
12
12
|
* }
|
|
13
13
|
* }
|
|
14
14
|
*/
|
|
15
|
-
export interface
|
|
15
|
+
export interface BodyUpdateMarkdownUploadUpdateMarkdownPatch {
|
|
16
16
|
source_id: string;
|
|
17
17
|
tenant_id: string;
|
|
18
18
|
sub_tenant_id?: string;
|
|
19
|
-
|
|
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
|
-
*
|
|
10
|
+
* request: {
|
|
11
11
|
* content: "content"
|
|
12
12
|
* }
|
|
13
13
|
* }
|
|
14
14
|
*/
|
|
15
|
-
export interface
|
|
15
|
+
export interface BodyUpdateMarkdownUploadUpdateTextPatch {
|
|
16
16
|
source_id: string;
|
|
17
17
|
tenant_id: string;
|
|
18
18
|
sub_tenant_id?: string;
|
|
19
|
-
|
|
19
|
+
request: CortexAI.MarkdownUploadRequest;
|
|
20
|
+
relations?: CortexAI.Relations;
|
|
20
21
|
}
|
|
@@ -6,13 +6,14 @@ import * as CortexAI from "../../../../index.js";
|
|
|
6
6
|
* @example
|
|
7
7
|
* {
|
|
8
8
|
* tenant_id: "tenant_id",
|
|
9
|
-
*
|
|
9
|
+
* request: {
|
|
10
10
|
* content: "content"
|
|
11
11
|
* }
|
|
12
12
|
* }
|
|
13
13
|
*/
|
|
14
|
-
export interface
|
|
14
|
+
export interface BodyUploadMarkdownUploadUploadMarkdownPost {
|
|
15
15
|
tenant_id: string;
|
|
16
16
|
sub_tenant_id?: string;
|
|
17
|
-
|
|
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
|
-
*
|
|
9
|
+
* request: {
|
|
10
10
|
* content: "content"
|
|
11
11
|
* }
|
|
12
12
|
* }
|
|
13
13
|
*/
|
|
14
|
-
export interface
|
|
14
|
+
export interface BodyUploadMarkdownUploadUploadTextPost {
|
|
15
15
|
tenant_id: string;
|
|
16
16
|
sub_tenant_id?: string;
|
|
17
|
-
|
|
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
|
|
7
|
-
export { type
|
|
8
|
-
export { type
|
|
9
|
-
export { type
|
|
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";
|
|
@@ -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
|
+
}
|
|
@@ -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";
|
package/dist/api/types/index.js
CHANGED
|
@@ -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
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/api/types/{FullTextSearchData.js → BodyScrapeWebpageUploadScrapeWebpagePost.js}
RENAMED
|
File without changes
|
|
File without changes
|