@usecortex_ai/node 0.3.2 → 0.3.4
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.
|
@@ -1480,12 +1480,15 @@ class Upload {
|
|
|
1480
1480
|
}
|
|
1481
1481
|
async __verifyProcessing(request, requestOptions) {
|
|
1482
1482
|
var _a, _b, _c;
|
|
1483
|
-
const { file_id: fileId, tenant_id: tenantId } = request;
|
|
1483
|
+
const { file_id: fileId, tenant_id: tenantId, sub_tenant_id: subTenantId } = request;
|
|
1484
1484
|
const _queryParams = {};
|
|
1485
1485
|
_queryParams["file_id"] = fileId;
|
|
1486
1486
|
if (tenantId != null) {
|
|
1487
1487
|
_queryParams["tenant_id"] = tenantId;
|
|
1488
1488
|
}
|
|
1489
|
+
if (subTenantId != null) {
|
|
1490
|
+
_queryParams["sub_tenant_id"] = subTenantId;
|
|
1491
|
+
}
|
|
1489
1492
|
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);
|
|
1490
1493
|
const _response = await core.fetcher({
|
|
1491
1494
|
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/verify_processing"),
|
|
@@ -13,4 +13,6 @@ export interface UploadVerifyProcessingRequest {
|
|
|
13
13
|
file_id: string;
|
|
14
14
|
/** Unique identifier for the tenant/organization */
|
|
15
15
|
tenant_id?: string;
|
|
16
|
+
/** Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used. */
|
|
17
|
+
sub_tenant_id?: string;
|
|
16
18
|
}
|
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
export interface ProcessingStatus {
|
|
5
5
|
/** Identifier for the file whose status is being retrieved */
|
|
6
6
|
file_id: string;
|
|
7
|
-
/** Current status of the file. Possible values are 'queued', 'processing', 'completed', '
|
|
7
|
+
/** Current status of the file. Possible values are 'queued', 'processing', 'completed', 'errored' */
|
|
8
8
|
indexing_status: string;
|
|
9
|
+
/** Error code for the file. You may share this code with us to help us diagnose and resolve the issue. */
|
|
10
|
+
error_code?: string;
|
|
9
11
|
success?: boolean;
|
|
10
12
|
/** Detailed status message about the processing operation */
|
|
11
13
|
message?: string;
|
package/package.json
CHANGED
|
@@ -1,32 +1,34 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
2
|
+
"name": "@usecortex_ai/node",
|
|
3
|
+
"version": "0.3.4",
|
|
4
|
+
"description": "The official TypeScript SDK for the Cortex AI platform.",
|
|
5
|
+
"author": "Nishkarsh Shrivastava <nishkarsh@usecortex.ai>",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"keywords": [
|
|
12
|
+
"cortex",
|
|
13
|
+
"cortex-ai",
|
|
14
|
+
"cortex-ai-sdk",
|
|
15
|
+
"cortex-ai-typescript-sdk",
|
|
16
|
+
"rag",
|
|
17
|
+
"gen-ai",
|
|
18
|
+
"memory",
|
|
19
|
+
"ai"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "tsc",
|
|
23
|
+
"prepublishOnly": "npm run build"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"form-data": "^4.0.0",
|
|
27
|
+
"node-fetch": "2.7.0"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@types/node": "^18.19.3",
|
|
31
|
+
"@types/node-fetch": "2.6.9",
|
|
32
|
+
"typescript": "5.3.3"
|
|
33
|
+
}
|
|
34
|
+
}
|