@usecortex_ai/node 0.1.1 → 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/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/SourcesGetSubTenantIdsRequest.js +5 -0
- package/dist/api/resources/sources/client/requests/index.d.ts +1 -0
- package/dist/api/resources/upload/client/Client.d.ts +13 -16
- package/dist/api/resources/upload/client/Client.js +13 -16
- package/dist/api/resources/upload/client/requests/EmbeddingsUpdateRequest.d.ts +2 -6
- package/dist/api/resources/upload/client/requests/UploadUpdateMarkdownRequest.d.ts +20 -0
- package/dist/api/resources/upload/client/requests/UploadUpdateMarkdownRequest.js +5 -0
- package/dist/api/resources/upload/client/requests/UploadUpdateTextRequest.d.ts +20 -0
- package/dist/api/resources/upload/client/requests/UploadUpdateTextRequest.js +5 -0
- package/dist/api/resources/upload/client/requests/UploadUploadMarkdownRequest.d.ts +18 -0
- package/dist/api/resources/upload/client/requests/UploadUploadMarkdownRequest.js +5 -0
- package/dist/api/resources/upload/client/requests/UploadUploadTextRequest.d.ts +18 -0
- package/dist/api/resources/upload/client/requests/UploadUploadTextRequest.js +5 -0
- 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/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/FetchContentData.d.ts +2 -2
- package/dist/api/types/ListSourcesResponse.d.ts +1 -1
- 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 +0 -2
- package/dist/api/types/SearchChunk.d.ts +5 -4
- package/dist/api/types/SingleUploadData.d.ts +1 -1
- 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 +1 -0
- package/dist/api/types/index.js +1 -0
- package/package.json +1 -1
|
@@ -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
|
}
|
|
@@ -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) {
|
|
@@ -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.UploadUploadMarkdownRequest} 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
|
+
* body: {
|
|
156
156
|
* content: "content"
|
|
157
157
|
* }
|
|
158
158
|
* })
|
|
159
159
|
*/
|
|
160
|
-
uploadMarkdown(request: CortexAI.
|
|
160
|
+
uploadMarkdown(request: CortexAI.UploadUploadMarkdownRequest, 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.UploadUploadTextRequest} 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
|
+
* body: {
|
|
181
181
|
* content: "content"
|
|
182
182
|
* }
|
|
183
183
|
* })
|
|
184
184
|
*/
|
|
185
|
-
uploadText(request: CortexAI.
|
|
185
|
+
uploadText(request: CortexAI.UploadUploadTextRequest, requestOptions?: Upload.RequestOptions): core.HttpResponsePromise<CortexAI.SingleUploadData>;
|
|
186
186
|
private __uploadText;
|
|
187
187
|
/**
|
|
188
|
-
* @param {CortexAI.
|
|
188
|
+
* @param {CortexAI.UploadUpdateMarkdownRequest} 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
|
+
* body: {
|
|
204
204
|
* content: "content"
|
|
205
205
|
* }
|
|
206
206
|
* })
|
|
207
207
|
*/
|
|
208
|
-
updateMarkdown(request: CortexAI.
|
|
208
|
+
updateMarkdown(request: CortexAI.UploadUpdateMarkdownRequest, requestOptions?: Upload.RequestOptions): core.HttpResponsePromise<CortexAI.SingleUploadData>;
|
|
209
209
|
private __updateMarkdown;
|
|
210
210
|
/**
|
|
211
|
-
* @param {CortexAI.
|
|
211
|
+
* @param {CortexAI.UploadUpdateTextRequest} 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
|
+
* body: {
|
|
227
227
|
* content: "content"
|
|
228
228
|
* }
|
|
229
229
|
* })
|
|
230
230
|
*/
|
|
231
|
-
updateText(request: CortexAI.
|
|
231
|
+
updateText(request: CortexAI.UploadUpdateTextRequest, requestOptions?: Upload.RequestOptions): core.HttpResponsePromise<CortexAI.SingleUploadData>;
|
|
232
232
|
private __updateText;
|
|
233
233
|
/**
|
|
234
234
|
* @param {CortexAI.EmbeddingsUploadRequest} request
|
|
@@ -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>;
|
|
@@ -535,7 +535,7 @@ class Upload {
|
|
|
535
535
|
* Upload markdown content. If request.document_metadata contains a 'file_id' key (non-empty), it will be used as the file ID;
|
|
536
536
|
* otherwise, a new file_id will be generated for that file. This allows file-specific IDs to be set directly in the metadata.
|
|
537
537
|
*
|
|
538
|
-
* @param {CortexAI.
|
|
538
|
+
* @param {CortexAI.UploadUploadMarkdownRequest} request
|
|
539
539
|
* @param {Upload.RequestOptions} requestOptions - Request-specific configuration.
|
|
540
540
|
*
|
|
541
541
|
* @throws {@link CortexAI.BadRequestError}
|
|
@@ -549,7 +549,7 @@ class Upload {
|
|
|
549
549
|
* @example
|
|
550
550
|
* await client.upload.uploadMarkdown({
|
|
551
551
|
* tenant_id: "tenant_id",
|
|
552
|
-
*
|
|
552
|
+
* body: {
|
|
553
553
|
* content: "content"
|
|
554
554
|
* }
|
|
555
555
|
* })
|
|
@@ -559,7 +559,7 @@ class Upload {
|
|
|
559
559
|
}
|
|
560
560
|
async __uploadMarkdown(request, requestOptions) {
|
|
561
561
|
var _a, _b, _c;
|
|
562
|
-
const { tenant_id: tenantId, sub_tenant_id: subTenantId
|
|
562
|
+
const { tenant_id: tenantId, sub_tenant_id: subTenantId, body: _body } = request;
|
|
563
563
|
const _queryParams = {};
|
|
564
564
|
_queryParams["tenant_id"] = tenantId;
|
|
565
565
|
if (subTenantId != null) {
|
|
@@ -625,7 +625,7 @@ class Upload {
|
|
|
625
625
|
* Upload markdown content. If request.document_metadata contains a 'file_id' key (non-empty), it will be used as the file ID;
|
|
626
626
|
* otherwise, a new file_id will be generated for that file. This allows file-specific IDs to be set directly in the metadata.
|
|
627
627
|
*
|
|
628
|
-
* @param {CortexAI.
|
|
628
|
+
* @param {CortexAI.UploadUploadTextRequest} request
|
|
629
629
|
* @param {Upload.RequestOptions} requestOptions - Request-specific configuration.
|
|
630
630
|
*
|
|
631
631
|
* @throws {@link CortexAI.BadRequestError}
|
|
@@ -639,7 +639,7 @@ class Upload {
|
|
|
639
639
|
* @example
|
|
640
640
|
* await client.upload.uploadText({
|
|
641
641
|
* tenant_id: "tenant_id",
|
|
642
|
-
*
|
|
642
|
+
* body: {
|
|
643
643
|
* content: "content"
|
|
644
644
|
* }
|
|
645
645
|
* })
|
|
@@ -649,7 +649,7 @@ class Upload {
|
|
|
649
649
|
}
|
|
650
650
|
async __uploadText(request, requestOptions) {
|
|
651
651
|
var _a, _b, _c;
|
|
652
|
-
const { tenant_id: tenantId, sub_tenant_id: subTenantId
|
|
652
|
+
const { tenant_id: tenantId, sub_tenant_id: subTenantId, body: _body } = request;
|
|
653
653
|
const _queryParams = {};
|
|
654
654
|
_queryParams["tenant_id"] = tenantId;
|
|
655
655
|
if (subTenantId != null) {
|
|
@@ -712,7 +712,7 @@ class Upload {
|
|
|
712
712
|
}
|
|
713
713
|
}
|
|
714
714
|
/**
|
|
715
|
-
* @param {CortexAI.
|
|
715
|
+
* @param {CortexAI.UploadUpdateMarkdownRequest} request
|
|
716
716
|
* @param {Upload.RequestOptions} requestOptions - Request-specific configuration.
|
|
717
717
|
*
|
|
718
718
|
* @throws {@link CortexAI.BadRequestError}
|
|
@@ -727,7 +727,7 @@ class Upload {
|
|
|
727
727
|
* await client.upload.updateMarkdown({
|
|
728
728
|
* source_id: "source_id",
|
|
729
729
|
* tenant_id: "tenant_id",
|
|
730
|
-
*
|
|
730
|
+
* body: {
|
|
731
731
|
* content: "content"
|
|
732
732
|
* }
|
|
733
733
|
* })
|
|
@@ -737,7 +737,7 @@ class Upload {
|
|
|
737
737
|
}
|
|
738
738
|
async __updateMarkdown(request, requestOptions) {
|
|
739
739
|
var _a, _b, _c;
|
|
740
|
-
const { source_id: sourceId, tenant_id: tenantId, sub_tenant_id: subTenantId
|
|
740
|
+
const { source_id: sourceId, tenant_id: tenantId, sub_tenant_id: subTenantId, body: _body } = request;
|
|
741
741
|
const _queryParams = {};
|
|
742
742
|
_queryParams["source_id"] = sourceId;
|
|
743
743
|
_queryParams["tenant_id"] = tenantId;
|
|
@@ -801,7 +801,7 @@ class Upload {
|
|
|
801
801
|
}
|
|
802
802
|
}
|
|
803
803
|
/**
|
|
804
|
-
* @param {CortexAI.
|
|
804
|
+
* @param {CortexAI.UploadUpdateTextRequest} request
|
|
805
805
|
* @param {Upload.RequestOptions} requestOptions - Request-specific configuration.
|
|
806
806
|
*
|
|
807
807
|
* @throws {@link CortexAI.BadRequestError}
|
|
@@ -816,7 +816,7 @@ class Upload {
|
|
|
816
816
|
* await client.upload.updateText({
|
|
817
817
|
* source_id: "source_id",
|
|
818
818
|
* tenant_id: "tenant_id",
|
|
819
|
-
*
|
|
819
|
+
* body: {
|
|
820
820
|
* content: "content"
|
|
821
821
|
* }
|
|
822
822
|
* })
|
|
@@ -826,7 +826,7 @@ class Upload {
|
|
|
826
826
|
}
|
|
827
827
|
async __updateText(request, requestOptions) {
|
|
828
828
|
var _a, _b, _c;
|
|
829
|
-
const { source_id: sourceId, tenant_id: tenantId, sub_tenant_id: subTenantId
|
|
829
|
+
const { source_id: sourceId, tenant_id: tenantId, sub_tenant_id: subTenantId, body: _body } = request;
|
|
830
830
|
const _queryParams = {};
|
|
831
831
|
_queryParams["source_id"] = sourceId;
|
|
832
832
|
_queryParams["tenant_id"] = tenantId;
|
|
@@ -988,10 +988,7 @@ class Upload {
|
|
|
988
988
|
*
|
|
989
989
|
* @example
|
|
990
990
|
* await client.upload.updateEmbeddings({
|
|
991
|
-
* tenant_id: "tenant_id"
|
|
992
|
-
* embeddings: {
|
|
993
|
-
* "key": [1.1]
|
|
994
|
-
* }
|
|
991
|
+
* tenant_id: "tenant_id"
|
|
995
992
|
* })
|
|
996
993
|
*/
|
|
997
994
|
updateEmbeddings(request, requestOptions) {
|
|
@@ -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
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
* body: {
|
|
11
|
+
* content: "content"
|
|
12
|
+
* }
|
|
13
|
+
* }
|
|
14
|
+
*/
|
|
15
|
+
export interface UploadUpdateMarkdownRequest {
|
|
16
|
+
source_id: string;
|
|
17
|
+
tenant_id: string;
|
|
18
|
+
sub_tenant_id?: string;
|
|
19
|
+
body: CortexAI.MarkdownUploadRequest;
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
* body: {
|
|
11
|
+
* content: "content"
|
|
12
|
+
* }
|
|
13
|
+
* }
|
|
14
|
+
*/
|
|
15
|
+
export interface UploadUpdateTextRequest {
|
|
16
|
+
source_id: string;
|
|
17
|
+
tenant_id: string;
|
|
18
|
+
sub_tenant_id?: string;
|
|
19
|
+
body: CortexAI.MarkdownUploadRequest;
|
|
20
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
* body: {
|
|
10
|
+
* content: "content"
|
|
11
|
+
* }
|
|
12
|
+
* }
|
|
13
|
+
*/
|
|
14
|
+
export interface UploadUploadMarkdownRequest {
|
|
15
|
+
tenant_id: string;
|
|
16
|
+
sub_tenant_id?: string;
|
|
17
|
+
body: CortexAI.MarkdownUploadRequest;
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
* body: {
|
|
10
|
+
* content: "content"
|
|
11
|
+
* }
|
|
12
|
+
* }
|
|
13
|
+
*/
|
|
14
|
+
export interface UploadUploadTextRequest {
|
|
15
|
+
tenant_id: string;
|
|
16
|
+
sub_tenant_id?: string;
|
|
17
|
+
body: CortexAI.MarkdownUploadRequest;
|
|
18
|
+
}
|
|
@@ -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 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";
|
|
10
10
|
export { type EmbeddingsUploadRequest } from "./EmbeddingsUploadRequest.js";
|
|
11
11
|
export { type EmbeddingsUpdateRequest } from "./EmbeddingsUpdateRequest.js";
|
|
12
12
|
export { type UploadScrapeWebpageRequest } from "./UploadScrapeWebpageRequest.js";
|
|
@@ -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
|
}
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
export interface Relations {
|
|
5
|
-
/** List of cortex source IDs for relations */
|
|
6
5
|
cortex_source_ids?: string[];
|
|
7
|
-
/** Additional metadata for relations */
|
|
8
6
|
auto_discovery?: Record<string, unknown>;
|
|
9
7
|
}
|
|
@@ -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
|
}
|
|
@@ -26,6 +26,7 @@ export * from "./SingleUploadData.js";
|
|
|
26
26
|
export * from "./Source.js";
|
|
27
27
|
export * from "./SourceContent.js";
|
|
28
28
|
export * from "./SourceModel.js";
|
|
29
|
+
export * from "./SubTenantIdsData.js";
|
|
29
30
|
export * from "./TenantCreateData.js";
|
|
30
31
|
export * from "./TenantStats.js";
|
|
31
32
|
export * from "./ValidationError.js";
|
package/dist/api/types/index.js
CHANGED
|
@@ -42,6 +42,7 @@ __exportStar(require("./SingleUploadData.js"), exports);
|
|
|
42
42
|
__exportStar(require("./Source.js"), exports);
|
|
43
43
|
__exportStar(require("./SourceContent.js"), exports);
|
|
44
44
|
__exportStar(require("./SourceModel.js"), exports);
|
|
45
|
+
__exportStar(require("./SubTenantIdsData.js"), exports);
|
|
45
46
|
__exportStar(require("./TenantCreateData.js"), exports);
|
|
46
47
|
__exportStar(require("./TenantStats.js"), exports);
|
|
47
48
|
__exportStar(require("./ValidationError.js"), exports);
|
package/package.json
CHANGED