@usecortex_ai/node 0.1.0 → 0.1.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.
- package/dist/api/resources/embeddings/client/Client.d.ts +0 -1
- package/dist/api/resources/embeddings/client/Client.js +0 -1
- package/dist/api/resources/embeddings/client/requests/EmbeddingsSearchRequest.d.ts +1 -3
- package/dist/api/resources/search/client/Client.d.ts +2 -2
- package/dist/api/resources/sources/client/Client.d.ts +32 -0
- package/dist/api/resources/sources/client/Client.js +91 -0
- package/dist/api/resources/sources/client/requests/SourcesGetSubTenantIdsRequest.d.ts +12 -0
- package/dist/api/resources/sources/client/requests/index.d.ts +1 -0
- package/dist/api/resources/upload/client/Client.d.ts +5 -6
- package/dist/api/resources/upload/client/Client.js +25 -8
- 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/BodyUpdateMarkdownUploadUpdateMarkdownPatch.d.ts +21 -0
- package/dist/api/resources/upload/client/requests/BodyUpdateMarkdownUploadUpdateTextPatch.d.ts +21 -0
- package/dist/api/resources/upload/client/requests/BodyUpdateMarkdownUploadUpdateTextPatch.js +5 -0
- package/dist/api/resources/upload/client/requests/BodyUploadFilesUploadUploadDocumentPost.d.ts +1 -0
- package/dist/api/resources/upload/client/requests/BodyUploadMarkdownUploadUploadMarkdownPost.d.ts +19 -0
- package/dist/api/resources/upload/client/requests/BodyUploadMarkdownUploadUploadMarkdownPost.js +5 -0
- package/dist/api/resources/upload/client/requests/BodyUploadMarkdownUploadUploadTextPost.d.ts +19 -0
- package/dist/api/resources/upload/client/requests/BodyUploadMarkdownUploadUploadTextPost.js +5 -0
- package/dist/api/resources/upload/client/requests/EmbeddingsUpdateRequest.d.ts +2 -6
- 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/types/AppSourcesUploadData.d.ts +2 -2
- package/dist/api/types/BatchUploadData.d.ts +2 -2
- package/dist/api/types/BodyScrapeWebpageUploadScrapeWebpagePost.d.ts +6 -0
- package/dist/api/types/BodyScrapeWebpageUploadScrapeWebpagePost.js +5 -0
- package/dist/api/types/BodyUpdateScrapeJobUploadUpdateWebpagePatch.d.ts +6 -0
- package/dist/api/types/BodyUpdateScrapeJobUploadUpdateWebpagePatch.js +5 -0
- package/dist/api/types/EmbeddingsCreateCollectionData.d.ts +2 -2
- package/dist/api/types/EmbeddingsDeleteData.d.ts +2 -2
- package/dist/api/types/EmbeddingsGetData.d.ts +2 -2
- package/dist/api/types/EmbeddingsSearchData.d.ts +2 -2
- 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 +2 -2
- package/dist/api/types/ListSourcesResponse.d.ts +2 -2
- package/dist/api/types/MarkdownUploadRequest.d.ts +2 -0
- package/dist/api/types/ProcessingStatus.d.ts +2 -2
- package/dist/api/types/Relations.d.ts +7 -0
- package/dist/api/types/Relations.js +5 -0
- package/dist/api/types/SearchChunk.d.ts +5 -4
- package/dist/api/types/SingleUploadData.d.ts +2 -2
- package/dist/api/types/Source.d.ts +4 -3
- package/dist/api/types/SourceContent.d.ts +2 -2
- package/dist/api/types/SourceModel.d.ts +2 -0
- package/dist/api/types/SubTenantIdsData.d.ts +10 -0
- package/dist/api/types/SubTenantIdsData.js +5 -0
- package/dist/api/types/TenantCreateData.d.ts +2 -2
- package/dist/api/types/TenantStats.d.ts +3 -3
- package/dist/api/types/index.d.ts +4 -2
- package/dist/api/types/index.js +4 -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/{types/FullTextSearchData.js → resources/sources/client/requests/SourcesGetSubTenantIdsRequest.js} +0 -0
- /package/dist/api/{types/SearchData.js → resources/upload/client/requests/BodyUpdateMarkdownUploadUpdateMarkdownPatch.js} +0 -0
|
@@ -4,14 +4,12 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* @example
|
|
6
6
|
* {
|
|
7
|
-
* embeddings: [1.1],
|
|
8
7
|
* tenant_id: "tenant_id"
|
|
9
8
|
* }
|
|
10
9
|
*/
|
|
11
10
|
export interface EmbeddingsSearchRequest {
|
|
12
|
-
/** Single embedding vector for search */
|
|
13
|
-
embeddings: number[];
|
|
14
11
|
tenant_id: string;
|
|
12
|
+
embeddings?: number[];
|
|
15
13
|
sub_tenant_id?: string;
|
|
16
14
|
max_chunks?: number;
|
|
17
15
|
}
|
|
@@ -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
|
}
|
|
@@ -68,5 +68,37 @@ export declare class Sources {
|
|
|
68
68
|
*/
|
|
69
69
|
getByIds(request: CortexAI.SourceBodyParams, requestOptions?: Sources.RequestOptions): core.HttpResponsePromise<CortexAI.ListSourcesResponse>;
|
|
70
70
|
private __getByIds;
|
|
71
|
+
/**
|
|
72
|
+
* Get all sub-tenant IDs (tenant IDs) contained within a specific Weaviate collection.
|
|
73
|
+
* Fetches the tenant IDs directly from Weaviate using default cluster credentials.
|
|
74
|
+
*
|
|
75
|
+
* Args:
|
|
76
|
+
* tenant_id: The tenant ID to fetch sub-tenant IDs for
|
|
77
|
+
* api_details: Authentication dependency
|
|
78
|
+
*
|
|
79
|
+
* Returns:
|
|
80
|
+
* SubTenantIdsData: Contains collection_name, sub_tenant_ids list, count, and success message
|
|
81
|
+
*
|
|
82
|
+
* Example:
|
|
83
|
+
* GET /list/sub_tenant_ids?tenant_id=my_tenant_123
|
|
84
|
+
*
|
|
85
|
+
* @param {CortexAI.SourcesGetSubTenantIdsRequest} request
|
|
86
|
+
* @param {Sources.RequestOptions} requestOptions - Request-specific configuration.
|
|
87
|
+
*
|
|
88
|
+
* @throws {@link CortexAI.BadRequestError}
|
|
89
|
+
* @throws {@link CortexAI.UnauthorizedError}
|
|
90
|
+
* @throws {@link CortexAI.ForbiddenError}
|
|
91
|
+
* @throws {@link CortexAI.NotFoundError}
|
|
92
|
+
* @throws {@link CortexAI.UnprocessableEntityError}
|
|
93
|
+
* @throws {@link CortexAI.InternalServerError}
|
|
94
|
+
* @throws {@link CortexAI.ServiceUnavailableError}
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* await client.sources.getSubTenantIds({
|
|
98
|
+
* tenant_id: "tenant_id"
|
|
99
|
+
* })
|
|
100
|
+
*/
|
|
101
|
+
getSubTenantIds(request: CortexAI.SourcesGetSubTenantIdsRequest, requestOptions?: Sources.RequestOptions): core.HttpResponsePromise<CortexAI.SubTenantIdsData>;
|
|
102
|
+
private __getSubTenantIds;
|
|
71
103
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
72
104
|
}
|
|
@@ -196,6 +196,97 @@ class Sources {
|
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
|
+
/**
|
|
200
|
+
* Get all sub-tenant IDs (tenant IDs) contained within a specific Weaviate collection.
|
|
201
|
+
* Fetches the tenant IDs directly from Weaviate using default cluster credentials.
|
|
202
|
+
*
|
|
203
|
+
* Args:
|
|
204
|
+
* tenant_id: The tenant ID to fetch sub-tenant IDs for
|
|
205
|
+
* api_details: Authentication dependency
|
|
206
|
+
*
|
|
207
|
+
* Returns:
|
|
208
|
+
* SubTenantIdsData: Contains collection_name, sub_tenant_ids list, count, and success message
|
|
209
|
+
*
|
|
210
|
+
* Example:
|
|
211
|
+
* GET /list/sub_tenant_ids?tenant_id=my_tenant_123
|
|
212
|
+
*
|
|
213
|
+
* @param {CortexAI.SourcesGetSubTenantIdsRequest} request
|
|
214
|
+
* @param {Sources.RequestOptions} requestOptions - Request-specific configuration.
|
|
215
|
+
*
|
|
216
|
+
* @throws {@link CortexAI.BadRequestError}
|
|
217
|
+
* @throws {@link CortexAI.UnauthorizedError}
|
|
218
|
+
* @throws {@link CortexAI.ForbiddenError}
|
|
219
|
+
* @throws {@link CortexAI.NotFoundError}
|
|
220
|
+
* @throws {@link CortexAI.UnprocessableEntityError}
|
|
221
|
+
* @throws {@link CortexAI.InternalServerError}
|
|
222
|
+
* @throws {@link CortexAI.ServiceUnavailableError}
|
|
223
|
+
*
|
|
224
|
+
* @example
|
|
225
|
+
* await client.sources.getSubTenantIds({
|
|
226
|
+
* tenant_id: "tenant_id"
|
|
227
|
+
* })
|
|
228
|
+
*/
|
|
229
|
+
getSubTenantIds(request, requestOptions) {
|
|
230
|
+
return core.HttpResponsePromise.fromPromise(this.__getSubTenantIds(request, requestOptions));
|
|
231
|
+
}
|
|
232
|
+
async __getSubTenantIds(request, requestOptions) {
|
|
233
|
+
var _a, _b, _c;
|
|
234
|
+
const { tenant_id: tenantId } = request;
|
|
235
|
+
const _queryParams = {};
|
|
236
|
+
_queryParams["tenant_id"] = tenantId;
|
|
237
|
+
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);
|
|
238
|
+
const _response = await core.fetcher({
|
|
239
|
+
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, "list/sub_tenant_ids"),
|
|
240
|
+
method: "GET",
|
|
241
|
+
headers: _headers,
|
|
242
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
243
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
244
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
245
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
246
|
+
});
|
|
247
|
+
if (_response.ok) {
|
|
248
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
249
|
+
}
|
|
250
|
+
if (_response.error.reason === "status-code") {
|
|
251
|
+
switch (_response.error.statusCode) {
|
|
252
|
+
case 400:
|
|
253
|
+
throw new CortexAI.BadRequestError(_response.error.body, _response.rawResponse);
|
|
254
|
+
case 401:
|
|
255
|
+
throw new CortexAI.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
256
|
+
case 403:
|
|
257
|
+
throw new CortexAI.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
258
|
+
case 404:
|
|
259
|
+
throw new CortexAI.NotFoundError(_response.error.body, _response.rawResponse);
|
|
260
|
+
case 422:
|
|
261
|
+
throw new CortexAI.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
262
|
+
case 500:
|
|
263
|
+
throw new CortexAI.InternalServerError(_response.error.body, _response.rawResponse);
|
|
264
|
+
case 503:
|
|
265
|
+
throw new CortexAI.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
266
|
+
default:
|
|
267
|
+
throw new errors.CortexAIError({
|
|
268
|
+
statusCode: _response.error.statusCode,
|
|
269
|
+
body: _response.error.body,
|
|
270
|
+
rawResponse: _response.rawResponse,
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
switch (_response.error.reason) {
|
|
275
|
+
case "non-json":
|
|
276
|
+
throw new errors.CortexAIError({
|
|
277
|
+
statusCode: _response.error.statusCode,
|
|
278
|
+
body: _response.error.rawBody,
|
|
279
|
+
rawResponse: _response.rawResponse,
|
|
280
|
+
});
|
|
281
|
+
case "timeout":
|
|
282
|
+
throw new errors.CortexAITimeoutError("Timeout exceeded when calling GET /list/sub_tenant_ids.");
|
|
283
|
+
case "unknown":
|
|
284
|
+
throw new errors.CortexAIError({
|
|
285
|
+
message: _response.error.errorMessage,
|
|
286
|
+
rawResponse: _response.rawResponse,
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
}
|
|
199
290
|
async _getAuthorizationHeader() {
|
|
200
291
|
const bearer = await core.Supplier.get(this._options.token);
|
|
201
292
|
if (bearer != null) {
|
|
@@ -264,10 +264,7 @@ export declare class Upload {
|
|
|
264
264
|
*
|
|
265
265
|
* @example
|
|
266
266
|
* await client.upload.updateEmbeddings({
|
|
267
|
-
* tenant_id: "tenant_id"
|
|
268
|
-
* embeddings: {
|
|
269
|
-
* "key": [1.1]
|
|
270
|
-
* }
|
|
267
|
+
* tenant_id: "tenant_id"
|
|
271
268
|
* })
|
|
272
269
|
*/
|
|
273
270
|
updateEmbeddings(request: CortexAI.EmbeddingsUpdateRequest, requestOptions?: Upload.RequestOptions): core.HttpResponsePromise<CortexAI.SingleUploadData>;
|
|
@@ -287,7 +284,8 @@ export declare class Upload {
|
|
|
287
284
|
* @example
|
|
288
285
|
* await client.upload.scrapeWebpage({
|
|
289
286
|
* web_url: "web_url",
|
|
290
|
-
* tenant_id: "tenant_id"
|
|
287
|
+
* tenant_id: "tenant_id",
|
|
288
|
+
* body: {}
|
|
291
289
|
* })
|
|
292
290
|
*/
|
|
293
291
|
scrapeWebpage(request: CortexAI.UploadScrapeWebpageRequest, requestOptions?: Upload.RequestOptions): core.HttpResponsePromise<CortexAI.SingleUploadData>;
|
|
@@ -308,7 +306,8 @@ export declare class Upload {
|
|
|
308
306
|
* await client.upload.updateWebpage({
|
|
309
307
|
* web_url: "web_url",
|
|
310
308
|
* source_id: "source_id",
|
|
311
|
-
* tenant_id: "tenant_id"
|
|
309
|
+
* tenant_id: "tenant_id",
|
|
310
|
+
* body: {}
|
|
312
311
|
* })
|
|
313
312
|
*/
|
|
314
313
|
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({
|
|
@@ -976,10 +988,7 @@ class Upload {
|
|
|
976
988
|
*
|
|
977
989
|
* @example
|
|
978
990
|
* await client.upload.updateEmbeddings({
|
|
979
|
-
* tenant_id: "tenant_id"
|
|
980
|
-
* embeddings: {
|
|
981
|
-
* "key": [1.1]
|
|
982
|
-
* }
|
|
991
|
+
* tenant_id: "tenant_id"
|
|
983
992
|
* })
|
|
984
993
|
*/
|
|
985
994
|
updateEmbeddings(request, requestOptions) {
|
|
@@ -1064,7 +1073,8 @@ class Upload {
|
|
|
1064
1073
|
* @example
|
|
1065
1074
|
* await client.upload.scrapeWebpage({
|
|
1066
1075
|
* web_url: "web_url",
|
|
1067
|
-
* tenant_id: "tenant_id"
|
|
1076
|
+
* tenant_id: "tenant_id",
|
|
1077
|
+
* body: {}
|
|
1068
1078
|
* })
|
|
1069
1079
|
*/
|
|
1070
1080
|
scrapeWebpage(request, requestOptions) {
|
|
@@ -1072,7 +1082,7 @@ class Upload {
|
|
|
1072
1082
|
}
|
|
1073
1083
|
async __scrapeWebpage(request, requestOptions) {
|
|
1074
1084
|
var _a, _b, _c;
|
|
1075
|
-
const { web_url: webUrl, tenant_id: tenantId, sub_tenant_id: subTenantId, file_id: fileId } = request;
|
|
1085
|
+
const { web_url: webUrl, tenant_id: tenantId, sub_tenant_id: subTenantId, file_id: fileId, body: _body, } = request;
|
|
1076
1086
|
const _queryParams = {};
|
|
1077
1087
|
_queryParams["web_url"] = webUrl;
|
|
1078
1088
|
_queryParams["tenant_id"] = tenantId;
|
|
@@ -1087,7 +1097,10 @@ class Upload {
|
|
|
1087
1097
|
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
1098
|
method: "POST",
|
|
1089
1099
|
headers: _headers,
|
|
1100
|
+
contentType: "application/x-www-form-urlencoded",
|
|
1090
1101
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
1102
|
+
requestType: "json",
|
|
1103
|
+
body: _body,
|
|
1091
1104
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
1092
1105
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
1093
1106
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -1151,7 +1164,8 @@ class Upload {
|
|
|
1151
1164
|
* await client.upload.updateWebpage({
|
|
1152
1165
|
* web_url: "web_url",
|
|
1153
1166
|
* source_id: "source_id",
|
|
1154
|
-
* tenant_id: "tenant_id"
|
|
1167
|
+
* tenant_id: "tenant_id",
|
|
1168
|
+
* body: {}
|
|
1155
1169
|
* })
|
|
1156
1170
|
*/
|
|
1157
1171
|
updateWebpage(request, requestOptions) {
|
|
@@ -1159,7 +1173,7 @@ class Upload {
|
|
|
1159
1173
|
}
|
|
1160
1174
|
async __updateWebpage(request, requestOptions) {
|
|
1161
1175
|
var _a, _b, _c;
|
|
1162
|
-
const { web_url: webUrl, source_id: sourceId, tenant_id: tenantId, sub_tenant_id: subTenantId } = request;
|
|
1176
|
+
const { web_url: webUrl, source_id: sourceId, tenant_id: tenantId, sub_tenant_id: subTenantId, body: _body, } = request;
|
|
1163
1177
|
const _queryParams = {};
|
|
1164
1178
|
_queryParams["web_url"] = webUrl;
|
|
1165
1179
|
_queryParams["source_id"] = sourceId;
|
|
@@ -1172,7 +1186,10 @@ class Upload {
|
|
|
1172
1186
|
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
1187
|
method: "PATCH",
|
|
1174
1188
|
headers: _headers,
|
|
1189
|
+
contentType: "application/x-www-form-urlencoded",
|
|
1175
1190
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
1191
|
+
requestType: "json",
|
|
1192
|
+
body: _body,
|
|
1176
1193
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
1177
1194
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
1178
1195
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
package/dist/api/resources/upload/client/requests/BodyUpdateMarkdownUploadUpdateMarkdownPatch.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as CortexAI from "../../../../index.js";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* source_id: "source_id",
|
|
9
|
+
* tenant_id: "tenant_id",
|
|
10
|
+
* request: {
|
|
11
|
+
* content: "content"
|
|
12
|
+
* }
|
|
13
|
+
* }
|
|
14
|
+
*/
|
|
15
|
+
export interface BodyUpdateMarkdownUploadUpdateMarkdownPatch {
|
|
16
|
+
source_id: string;
|
|
17
|
+
tenant_id: string;
|
|
18
|
+
sub_tenant_id?: string;
|
|
19
|
+
request: CortexAI.MarkdownUploadRequest;
|
|
20
|
+
relations?: CortexAI.Relations;
|
|
21
|
+
}
|
package/dist/api/resources/upload/client/requests/BodyUpdateMarkdownUploadUpdateTextPatch.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as CortexAI from "../../../../index.js";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* source_id: "source_id",
|
|
9
|
+
* tenant_id: "tenant_id",
|
|
10
|
+
* request: {
|
|
11
|
+
* content: "content"
|
|
12
|
+
* }
|
|
13
|
+
* }
|
|
14
|
+
*/
|
|
15
|
+
export interface BodyUpdateMarkdownUploadUpdateTextPatch {
|
|
16
|
+
source_id: string;
|
|
17
|
+
tenant_id: string;
|
|
18
|
+
sub_tenant_id?: string;
|
|
19
|
+
request: CortexAI.MarkdownUploadRequest;
|
|
20
|
+
relations?: CortexAI.Relations;
|
|
21
|
+
}
|
package/dist/api/resources/upload/client/requests/BodyUploadMarkdownUploadUploadMarkdownPost.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as CortexAI from "../../../../index.js";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* tenant_id: "tenant_id",
|
|
9
|
+
* request: {
|
|
10
|
+
* content: "content"
|
|
11
|
+
* }
|
|
12
|
+
* }
|
|
13
|
+
*/
|
|
14
|
+
export interface BodyUploadMarkdownUploadUploadMarkdownPost {
|
|
15
|
+
tenant_id: string;
|
|
16
|
+
sub_tenant_id?: string;
|
|
17
|
+
request: CortexAI.MarkdownUploadRequest;
|
|
18
|
+
relations?: CortexAI.Relations;
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as CortexAI from "../../../../index.js";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* tenant_id: "tenant_id",
|
|
9
|
+
* request: {
|
|
10
|
+
* content: "content"
|
|
11
|
+
* }
|
|
12
|
+
* }
|
|
13
|
+
*/
|
|
14
|
+
export interface BodyUploadMarkdownUploadUploadTextPost {
|
|
15
|
+
tenant_id: string;
|
|
16
|
+
sub_tenant_id?: string;
|
|
17
|
+
request: CortexAI.MarkdownUploadRequest;
|
|
18
|
+
relations?: CortexAI.Relations;
|
|
19
|
+
}
|
|
@@ -4,15 +4,11 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* @example
|
|
6
6
|
* {
|
|
7
|
-
* tenant_id: "tenant_id"
|
|
8
|
-
* embeddings: {
|
|
9
|
-
* "key": [1.1]
|
|
10
|
-
* }
|
|
7
|
+
* tenant_id: "tenant_id"
|
|
11
8
|
* }
|
|
12
9
|
*/
|
|
13
10
|
export interface EmbeddingsUpdateRequest {
|
|
14
11
|
tenant_id: string;
|
|
15
12
|
sub_tenant_id?: string;
|
|
16
|
-
|
|
17
|
-
embeddings: Record<string, number[]>;
|
|
13
|
+
embeddings?: Record<string, number[]>;
|
|
18
14
|
}
|
|
@@ -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
|
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
export interface EmbeddingsGetData {
|
|
5
|
-
success?: boolean;
|
|
6
|
-
message: string;
|
|
7
5
|
embeddings: Record<string, number[]>;
|
|
8
6
|
not_found_chunk_ids: string[];
|
|
7
|
+
success?: boolean;
|
|
8
|
+
message?: string;
|
|
9
9
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
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
|
export interface MarkdownUploadRequest {
|
|
5
6
|
content: string;
|
|
6
7
|
tenant_metadata?: Record<string, unknown>;
|
|
7
8
|
document_metadata?: Record<string, unknown>;
|
|
9
|
+
relations?: CortexAI.Relations;
|
|
8
10
|
}
|
|
@@ -6,16 +6,17 @@ export interface SearchChunk {
|
|
|
6
6
|
chunk_uuid: string;
|
|
7
7
|
source_id: string;
|
|
8
8
|
chunk_content: string;
|
|
9
|
-
source_collection?: string[];
|
|
10
|
-
layout?: string;
|
|
11
|
-
source_url?: string;
|
|
12
|
-
version: string;
|
|
13
9
|
source_type?: string;
|
|
14
10
|
source_upload_time?: string;
|
|
15
11
|
source_title?: string;
|
|
16
12
|
source_last_updated_time?: string;
|
|
13
|
+
source_collection?: string[];
|
|
14
|
+
layout?: string;
|
|
15
|
+
source_url?: string;
|
|
16
|
+
version?: string;
|
|
17
17
|
relevancy_score?: number;
|
|
18
18
|
cortex_metadata?: Record<string, unknown>;
|
|
19
19
|
document_metadata?: Record<string, unknown>;
|
|
20
|
+
tenant_metadata?: Record<string, unknown>;
|
|
20
21
|
extra_context?: CortexAI.ExtendedContext;
|
|
21
22
|
}
|
|
@@ -3,17 +3,18 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as CortexAI from "../index.js";
|
|
5
5
|
export interface Source {
|
|
6
|
-
collections?: string[];
|
|
7
6
|
id: string;
|
|
8
7
|
title: string;
|
|
9
8
|
type: string;
|
|
9
|
+
timestamp: string;
|
|
10
|
+
content: CortexAI.SourceContent;
|
|
11
|
+
collections?: string[];
|
|
10
12
|
description?: string;
|
|
11
13
|
note?: string;
|
|
12
14
|
url?: string;
|
|
13
|
-
timestamp: string;
|
|
14
|
-
content: CortexAI.SourceContent;
|
|
15
15
|
cortex_metadata?: Record<string, unknown>;
|
|
16
16
|
document_metadata?: Record<string, unknown>;
|
|
17
|
+
tenant_metadata?: Record<string, unknown>;
|
|
17
18
|
meta?: Record<string, unknown>;
|
|
18
19
|
attachments?: unknown[];
|
|
19
20
|
}
|
|
@@ -13,6 +13,8 @@ export interface SourceModel {
|
|
|
13
13
|
timestamp?: string;
|
|
14
14
|
content?: CortexAI.ContentModel;
|
|
15
15
|
cortex_metadata?: Record<string, unknown>;
|
|
16
|
+
tenant_metadata?: Record<string, unknown>;
|
|
17
|
+
document_metadata?: Record<string, unknown>;
|
|
16
18
|
meta?: Record<string, unknown>;
|
|
17
19
|
attachments?: CortexAI.AttachmentModel[];
|
|
18
20
|
}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
export interface TenantStats {
|
|
5
|
-
success?: boolean;
|
|
6
|
-
message: string;
|
|
7
5
|
object_count: number;
|
|
8
|
-
vector_dimension?: number;
|
|
9
6
|
tenant_name: string;
|
|
7
|
+
vector_dimension?: number;
|
|
8
|
+
success?: boolean;
|
|
9
|
+
message?: string;
|
|
10
10
|
}
|
|
@@ -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,18 +15,18 @@ 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";
|
|
27
28
|
export * from "./SourceModel.js";
|
|
29
|
+
export * from "./SubTenantIdsData.js";
|
|
28
30
|
export * from "./TenantCreateData.js";
|
|
29
31
|
export * from "./TenantStats.js";
|
|
30
32
|
export * from "./ValidationError.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,18 +31,18 @@ __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);
|
|
43
44
|
__exportStar(require("./SourceModel.js"), exports);
|
|
45
|
+
__exportStar(require("./SubTenantIdsData.js"), exports);
|
|
44
46
|
__exportStar(require("./TenantCreateData.js"), exports);
|
|
45
47
|
__exportStar(require("./TenantStats.js"), exports);
|
|
46
48
|
__exportStar(require("./ValidationError.js"), exports);
|
package/package.json
CHANGED
|
File without changes
|