@usecortex_ai/node 0.2.0 → 0.3.0
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/README.md +1 -44
- package/dist/Client.d.ts +14 -5
- package/dist/Client.js +68 -12
- package/dist/api/resources/document/client/Client.d.ts +5 -5
- package/dist/api/resources/document/client/Client.js +8 -4
- package/dist/api/resources/embeddings/client/Client.d.ts +9 -9
- package/dist/api/resources/embeddings/client/Client.js +16 -12
- package/dist/api/resources/embeddings/client/requests/EmbeddingsCreateCollectionRequest.d.ts +1 -1
- package/dist/api/resources/embeddings/client/requests/EmbeddingsDeleteRequest.d.ts +3 -3
- package/dist/api/resources/embeddings/client/requests/EmbeddingsSearchRequest.d.ts +2 -2
- package/dist/api/resources/embeddings/client/requests/GetEmbeddingsBasedOnChunkIdsRequest.d.ts +3 -3
- package/dist/api/resources/fetch/client/Client.d.ts +6 -6
- package/dist/api/resources/fetch/client/Client.js +9 -5
- package/dist/api/resources/fetch/client/requests/FetchContentRequest.d.ts +3 -8
- package/dist/api/resources/index.d.ts +1 -1
- package/dist/api/resources/index.js +2 -2
- package/dist/api/resources/search/client/Client.d.ts +11 -11
- package/dist/api/resources/search/client/Client.js +14 -10
- package/dist/api/resources/search/client/requests/FullTextSearchRequest.d.ts +3 -3
- package/dist/api/resources/search/client/requests/QnARequest.d.ts +3 -3
- package/dist/api/resources/search/client/requests/SearchRequest.d.ts +5 -3
- package/dist/api/resources/sources/client/Client.d.ts +8 -33
- package/dist/api/resources/sources/client/Client.js +12 -95
- package/dist/api/resources/sources/client/requests/SourceBodyParams.d.ts +6 -2
- package/dist/api/resources/sources/client/requests/index.d.ts +0 -1
- package/dist/api/resources/tenant/client/Client.d.ts +8 -7
- package/dist/api/resources/tenant/client/Client.js +11 -6
- package/dist/api/resources/tenant/client/requests/TenantDeleteSubTenantRequest.d.ts +2 -2
- package/dist/api/resources/tenant/client/requests/TenantGetSubTenantIdsRequest.d.ts +1 -1
- package/dist/api/resources/tenant/client/requests/TenantStatsRequest.d.ts +3 -2
- package/dist/api/resources/upload/client/Client.d.ts +47 -32
- package/dist/api/resources/upload/client/Client.js +56 -31
- package/dist/api/resources/upload/client/requests/BodyBatchUpdateUploadBatchUpdatePatch.d.ts +3 -2
- package/dist/api/resources/upload/client/requests/BodyBatchUploadUploadBatchUploadPost.d.ts +5 -2
- package/dist/api/resources/upload/client/requests/BodyUpdateFileUploadUpdateDocumentPatch.d.ts +4 -3
- package/dist/api/resources/upload/client/requests/BodyUploadFilesUploadUploadDocumentPost.d.ts +5 -2
- package/dist/api/resources/upload/client/requests/EmbeddingsUpdateRequest.d.ts +3 -2
- package/dist/api/resources/upload/client/requests/EmbeddingsUploadRequest.d.ts +4 -3
- package/dist/api/resources/upload/client/requests/UploadScrapeWebpageRequest.d.ts +5 -3
- package/dist/api/resources/upload/client/requests/UploadUpdateMarkdownRequest.d.ts +5 -4
- package/dist/api/resources/upload/client/requests/UploadUpdateTextRequest.d.ts +5 -4
- package/dist/api/resources/upload/client/requests/UploadUpdateWebpageRequest.d.ts +5 -4
- package/dist/api/resources/upload/client/requests/UploadUploadAppSourcesRequest.d.ts +3 -2
- package/dist/api/resources/upload/client/requests/UploadUploadMarkdownRequest.d.ts +4 -3
- package/dist/api/resources/upload/client/requests/UploadUploadTextRequest.d.ts +4 -3
- package/dist/api/resources/upload/client/requests/UploadVerifyProcessingRequest.d.ts +2 -1
- package/dist/api/resources/user/client/Client.d.ts +6 -4
- package/dist/api/resources/user/client/Client.js +13 -4
- package/dist/api/resources/user/client/requests/BodyCreateTenantUserCreateTenantPost.d.ts +4 -1
- package/dist/api/resources/userMemory/client/Client.d.ts +19 -13
- package/dist/api/resources/userMemory/client/Client.js +22 -12
- package/dist/api/resources/userMemory/client/requests/AddUserMemoryRequest.d.ts +4 -3
- package/dist/api/resources/userMemory/client/requests/GenerateUserMemoryRequest.d.ts +6 -5
- package/dist/api/resources/userMemory/client/requests/RetrieveUserMemoryRequest.d.ts +7 -3
- package/dist/api/resources/userMemory/client/requests/UserMemoryDeleteUserMemoryRequest.d.ts +4 -3
- package/dist/api/resources/userMemory/client/requests/UserMemoryListUserMemoriesRequest.d.ts +3 -2
- package/dist/api/types/DeleteMemoryRequest.d.ts +1 -1
- package/dist/api/types/MarkdownUploadRequest.d.ts +2 -0
- package/dist/api/types/SubTenantIdsData.d.ts +2 -0
- package/dist/api/types/TenantStats.d.ts +2 -2
- package/package.json +1 -1
|
@@ -5,14 +5,15 @@ import * as CortexAI from "../../../../index.js";
|
|
|
5
5
|
/**
|
|
6
6
|
* @example
|
|
7
7
|
* {
|
|
8
|
-
* tenant_id: "
|
|
8
|
+
* tenant_id: "tenant_1234",
|
|
9
|
+
* sub_tenant_id: "sub_tenant_4567",
|
|
9
10
|
* body: [{}]
|
|
10
11
|
* }
|
|
11
12
|
*/
|
|
12
13
|
export interface UploadUploadAppSourcesRequest {
|
|
13
14
|
/** Unique identifier for the tenant/organization */
|
|
14
15
|
tenant_id: string;
|
|
15
|
-
/** Optional sub-tenant identifier
|
|
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. */
|
|
16
17
|
sub_tenant_id?: string;
|
|
17
18
|
/** List of structured source objects containing app-generated data to be indexed */
|
|
18
19
|
body: CortexAI.SourceModel[];
|
|
@@ -5,16 +5,17 @@ import * as CortexAI from "../../../../index.js";
|
|
|
5
5
|
/**
|
|
6
6
|
* @example
|
|
7
7
|
* {
|
|
8
|
-
* tenant_id: "
|
|
8
|
+
* tenant_id: "tenant_1234",
|
|
9
|
+
* sub_tenant_id: "sub_tenant_4567",
|
|
9
10
|
* body: {
|
|
10
|
-
* content: "content"
|
|
11
|
+
* content: "<content>"
|
|
11
12
|
* }
|
|
12
13
|
* }
|
|
13
14
|
*/
|
|
14
15
|
export interface UploadUploadMarkdownRequest {
|
|
15
16
|
/** Unique identifier for the tenant/organization */
|
|
16
17
|
tenant_id: string;
|
|
17
|
-
/** Optional sub-tenant identifier
|
|
18
|
+
/** Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used. */
|
|
18
19
|
sub_tenant_id?: string;
|
|
19
20
|
body: CortexAI.MarkdownUploadRequest;
|
|
20
21
|
}
|
|
@@ -5,16 +5,17 @@ import * as CortexAI from "../../../../index.js";
|
|
|
5
5
|
/**
|
|
6
6
|
* @example
|
|
7
7
|
* {
|
|
8
|
-
* tenant_id: "
|
|
8
|
+
* tenant_id: "tenant_1234",
|
|
9
|
+
* sub_tenant_id: "sub_tenant_4567",
|
|
9
10
|
* body: {
|
|
10
|
-
* content: "content"
|
|
11
|
+
* content: "<content>"
|
|
11
12
|
* }
|
|
12
13
|
* }
|
|
13
14
|
*/
|
|
14
15
|
export interface UploadUploadTextRequest {
|
|
15
16
|
/** Unique identifier for the tenant/organization */
|
|
16
17
|
tenant_id: string;
|
|
17
|
-
/** Optional sub-tenant identifier
|
|
18
|
+
/** Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used. */
|
|
18
19
|
sub_tenant_id?: string;
|
|
19
20
|
body: CortexAI.MarkdownUploadRequest;
|
|
20
21
|
}
|
|
@@ -9,7 +9,7 @@ export declare namespace User {
|
|
|
9
9
|
environment?: core.Supplier<environments.CortexAIEnvironment | string>;
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
|
-
token
|
|
12
|
+
token?: core.Supplier<core.BearerToken | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
14
|
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
15
15
|
}
|
|
@@ -28,7 +28,7 @@ export declare namespace User {
|
|
|
28
28
|
}
|
|
29
29
|
export declare class User {
|
|
30
30
|
protected readonly _options: User.Options;
|
|
31
|
-
constructor(_options
|
|
31
|
+
constructor(_options?: User.Options);
|
|
32
32
|
/**
|
|
33
33
|
* Create a tenant for your account.
|
|
34
34
|
*
|
|
@@ -50,9 +50,11 @@ export declare class User {
|
|
|
50
50
|
* @throws {@link CortexAI.ServiceUnavailableError}
|
|
51
51
|
*
|
|
52
52
|
* @example
|
|
53
|
-
* await client.user.createTenant(
|
|
53
|
+
* await client.user.createTenant({
|
|
54
|
+
* note: "<str>"
|
|
55
|
+
* })
|
|
54
56
|
*/
|
|
55
57
|
createTenant(request?: CortexAI.BodyCreateTenantUserCreateTenantPost, requestOptions?: User.RequestOptions): core.HttpResponsePromise<CortexAI.TenantCreateData>;
|
|
56
58
|
private __createTenant;
|
|
57
|
-
protected _getAuthorizationHeader(): Promise<string>;
|
|
59
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
58
60
|
}
|
|
@@ -44,7 +44,7 @@ const CortexAI = __importStar(require("../../../index.js"));
|
|
|
44
44
|
const headers_js_1 = require("../../../../core/headers.js");
|
|
45
45
|
const errors = __importStar(require("../../../../errors/index.js"));
|
|
46
46
|
class User {
|
|
47
|
-
constructor(_options) {
|
|
47
|
+
constructor(_options = {}) {
|
|
48
48
|
this._options = _options;
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
@@ -68,18 +68,23 @@ class User {
|
|
|
68
68
|
* @throws {@link CortexAI.ServiceUnavailableError}
|
|
69
69
|
*
|
|
70
70
|
* @example
|
|
71
|
-
* await client.user.createTenant(
|
|
71
|
+
* await client.user.createTenant({
|
|
72
|
+
* note: "<str>"
|
|
73
|
+
* })
|
|
72
74
|
*/
|
|
73
75
|
createTenant(request = {}, requestOptions) {
|
|
74
76
|
return core.HttpResponsePromise.fromPromise(this.__createTenant(request, requestOptions));
|
|
75
77
|
}
|
|
76
78
|
async __createTenant(request = {}, requestOptions) {
|
|
77
79
|
var _a, _b, _c;
|
|
78
|
-
const { tenant_id: tenantId } = request, _body = __rest(request, ["tenant_id"]);
|
|
80
|
+
const { tenant_id: tenantId, note } = request, _body = __rest(request, ["tenant_id", "note"]);
|
|
79
81
|
const _queryParams = {};
|
|
80
82
|
if (tenantId != null) {
|
|
81
83
|
_queryParams["tenant_id"] = tenantId;
|
|
82
84
|
}
|
|
85
|
+
if (note != null) {
|
|
86
|
+
_queryParams["note"] = note;
|
|
87
|
+
}
|
|
83
88
|
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);
|
|
84
89
|
const _response = await core.fetcher({
|
|
85
90
|
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, "user/create_tenant"),
|
|
@@ -137,7 +142,11 @@ class User {
|
|
|
137
142
|
}
|
|
138
143
|
}
|
|
139
144
|
async _getAuthorizationHeader() {
|
|
140
|
-
|
|
145
|
+
const bearer = await core.Supplier.get(this._options.token);
|
|
146
|
+
if (bearer != null) {
|
|
147
|
+
return `Bearer ${bearer}`;
|
|
148
|
+
}
|
|
149
|
+
return undefined;
|
|
141
150
|
}
|
|
142
151
|
}
|
|
143
152
|
exports.User = User;
|
|
@@ -3,10 +3,13 @@
|
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
* @example
|
|
6
|
-
* {
|
|
6
|
+
* {
|
|
7
|
+
* note: "<str>"
|
|
8
|
+
* }
|
|
7
9
|
*/
|
|
8
10
|
export interface BodyCreateTenantUserCreateTenantPost {
|
|
9
11
|
/** Unique identifier for the tenant/organization */
|
|
10
12
|
tenant_id?: string;
|
|
13
|
+
note?: string;
|
|
11
14
|
tenant_metadata_schema?: Record<string, unknown>[];
|
|
12
15
|
}
|
|
@@ -9,7 +9,7 @@ export declare namespace UserMemory {
|
|
|
9
9
|
environment?: core.Supplier<environments.CortexAIEnvironment | string>;
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
|
-
token
|
|
12
|
+
token?: core.Supplier<core.BearerToken | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
14
|
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
15
15
|
}
|
|
@@ -28,7 +28,7 @@ export declare namespace UserMemory {
|
|
|
28
28
|
}
|
|
29
29
|
export declare class UserMemory {
|
|
30
30
|
protected readonly _options: UserMemory.Options;
|
|
31
|
-
constructor(_options
|
|
31
|
+
constructor(_options?: UserMemory.Options);
|
|
32
32
|
/**
|
|
33
33
|
* Retrieve all stored user memories for your tenant.
|
|
34
34
|
*
|
|
@@ -51,7 +51,8 @@ export declare class UserMemory {
|
|
|
51
51
|
*
|
|
52
52
|
* @example
|
|
53
53
|
* await client.userMemory.listUserMemories({
|
|
54
|
-
* tenant_id: "
|
|
54
|
+
* tenant_id: "tenant_1234",
|
|
55
|
+
* sub_tenant_id: "sub_tenant_4567"
|
|
55
56
|
* })
|
|
56
57
|
*/
|
|
57
58
|
listUserMemories(request: CortexAI.UserMemoryListUserMemoriesRequest, requestOptions?: UserMemory.RequestOptions): core.HttpResponsePromise<CortexAI.ListUserMemoriesResponse>;
|
|
@@ -78,8 +79,9 @@ export declare class UserMemory {
|
|
|
78
79
|
*
|
|
79
80
|
* @example
|
|
80
81
|
* await client.userMemory.deleteUserMemory({
|
|
81
|
-
* tenant_id: "
|
|
82
|
-
* memory_id: "
|
|
82
|
+
* tenant_id: "tenant_1234",
|
|
83
|
+
* memory_id: "memory_1234",
|
|
84
|
+
* sub_tenant_id: "sub_tenant_4567"
|
|
83
85
|
* })
|
|
84
86
|
*/
|
|
85
87
|
deleteUserMemory(request: CortexAI.UserMemoryDeleteUserMemoryRequest, requestOptions?: UserMemory.RequestOptions): core.HttpResponsePromise<CortexAI.DeleteUserMemoryResponse>;
|
|
@@ -107,8 +109,10 @@ export declare class UserMemory {
|
|
|
107
109
|
*
|
|
108
110
|
* @example
|
|
109
111
|
* await client.userMemory.retrieveUserMemory({
|
|
110
|
-
* tenant_id: "
|
|
111
|
-
*
|
|
112
|
+
* tenant_id: "tenant_1234",
|
|
113
|
+
* sub_tenant_id: "sub_tenant_4567",
|
|
114
|
+
* max_count: 5,
|
|
115
|
+
* query: "Which mode does user prefer"
|
|
112
116
|
* })
|
|
113
117
|
*/
|
|
114
118
|
retrieveUserMemory(request: CortexAI.RetrieveUserMemoryRequest, requestOptions?: UserMemory.RequestOptions): core.HttpResponsePromise<CortexAI.RetrieveUserMemoryResponse>;
|
|
@@ -136,9 +140,10 @@ export declare class UserMemory {
|
|
|
136
140
|
*
|
|
137
141
|
* @example
|
|
138
142
|
* await client.userMemory.generateUserMemory({
|
|
139
|
-
* tenant_id: "
|
|
140
|
-
*
|
|
141
|
-
*
|
|
143
|
+
* tenant_id: "tenant_1234",
|
|
144
|
+
* sub_tenant_id: "sub_tenant_4567",
|
|
145
|
+
* user_message: "I prefer detailed technical explanations and works in the Pacific timezone",
|
|
146
|
+
* user_name: "John Doe"
|
|
142
147
|
* })
|
|
143
148
|
*/
|
|
144
149
|
generateUserMemory(request: CortexAI.GenerateUserMemoryRequest, requestOptions?: UserMemory.RequestOptions): core.HttpResponsePromise<CortexAI.GenerateUserMemoryResponse>;
|
|
@@ -166,11 +171,12 @@ export declare class UserMemory {
|
|
|
166
171
|
*
|
|
167
172
|
* @example
|
|
168
173
|
* await client.userMemory.addUserMemory({
|
|
169
|
-
* tenant_id: "
|
|
170
|
-
*
|
|
174
|
+
* tenant_id: "tenant_1234",
|
|
175
|
+
* sub_tenant_id: "sub_tenant_4567",
|
|
176
|
+
* user_memory: "I prefer detailed technical explanations and works in the Pacific timezone"
|
|
171
177
|
* })
|
|
172
178
|
*/
|
|
173
179
|
addUserMemory(request: CortexAI.AddUserMemoryRequest, requestOptions?: UserMemory.RequestOptions): core.HttpResponsePromise<CortexAI.AddUserMemoryResponse>;
|
|
174
180
|
private __addUserMemory;
|
|
175
|
-
protected _getAuthorizationHeader(): Promise<string>;
|
|
181
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
176
182
|
}
|
|
@@ -44,7 +44,7 @@ const CortexAI = __importStar(require("../../../index.js"));
|
|
|
44
44
|
const headers_js_1 = require("../../../../core/headers.js");
|
|
45
45
|
const errors = __importStar(require("../../../../errors/index.js"));
|
|
46
46
|
class UserMemory {
|
|
47
|
-
constructor(_options) {
|
|
47
|
+
constructor(_options = {}) {
|
|
48
48
|
this._options = _options;
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
@@ -69,7 +69,8 @@ class UserMemory {
|
|
|
69
69
|
*
|
|
70
70
|
* @example
|
|
71
71
|
* await client.userMemory.listUserMemories({
|
|
72
|
-
* tenant_id: "
|
|
72
|
+
* tenant_id: "tenant_1234",
|
|
73
|
+
* sub_tenant_id: "sub_tenant_4567"
|
|
73
74
|
* })
|
|
74
75
|
*/
|
|
75
76
|
listUserMemories(request, requestOptions) {
|
|
@@ -158,8 +159,9 @@ class UserMemory {
|
|
|
158
159
|
*
|
|
159
160
|
* @example
|
|
160
161
|
* await client.userMemory.deleteUserMemory({
|
|
161
|
-
* tenant_id: "
|
|
162
|
-
* memory_id: "
|
|
162
|
+
* tenant_id: "tenant_1234",
|
|
163
|
+
* memory_id: "memory_1234",
|
|
164
|
+
* sub_tenant_id: "sub_tenant_4567"
|
|
163
165
|
* })
|
|
164
166
|
*/
|
|
165
167
|
deleteUserMemory(request, requestOptions) {
|
|
@@ -250,8 +252,10 @@ class UserMemory {
|
|
|
250
252
|
*
|
|
251
253
|
* @example
|
|
252
254
|
* await client.userMemory.retrieveUserMemory({
|
|
253
|
-
* tenant_id: "
|
|
254
|
-
*
|
|
255
|
+
* tenant_id: "tenant_1234",
|
|
256
|
+
* sub_tenant_id: "sub_tenant_4567",
|
|
257
|
+
* max_count: 5,
|
|
258
|
+
* query: "Which mode does user prefer"
|
|
255
259
|
* })
|
|
256
260
|
*/
|
|
257
261
|
retrieveUserMemory(request, requestOptions) {
|
|
@@ -347,9 +351,10 @@ class UserMemory {
|
|
|
347
351
|
*
|
|
348
352
|
* @example
|
|
349
353
|
* await client.userMemory.generateUserMemory({
|
|
350
|
-
* tenant_id: "
|
|
351
|
-
*
|
|
352
|
-
*
|
|
354
|
+
* tenant_id: "tenant_1234",
|
|
355
|
+
* sub_tenant_id: "sub_tenant_4567",
|
|
356
|
+
* user_message: "I prefer detailed technical explanations and works in the Pacific timezone",
|
|
357
|
+
* user_name: "John Doe"
|
|
353
358
|
* })
|
|
354
359
|
*/
|
|
355
360
|
generateUserMemory(request, requestOptions) {
|
|
@@ -442,8 +447,9 @@ class UserMemory {
|
|
|
442
447
|
*
|
|
443
448
|
* @example
|
|
444
449
|
* await client.userMemory.addUserMemory({
|
|
445
|
-
* tenant_id: "
|
|
446
|
-
*
|
|
450
|
+
* tenant_id: "tenant_1234",
|
|
451
|
+
* sub_tenant_id: "sub_tenant_4567",
|
|
452
|
+
* user_memory: "I prefer detailed technical explanations and works in the Pacific timezone"
|
|
447
453
|
* })
|
|
448
454
|
*/
|
|
449
455
|
addUserMemory(request, requestOptions) {
|
|
@@ -514,7 +520,11 @@ class UserMemory {
|
|
|
514
520
|
}
|
|
515
521
|
}
|
|
516
522
|
async _getAuthorizationHeader() {
|
|
517
|
-
|
|
523
|
+
const bearer = await core.Supplier.get(this._options.token);
|
|
524
|
+
if (bearer != null) {
|
|
525
|
+
return `Bearer ${bearer}`;
|
|
526
|
+
}
|
|
527
|
+
return undefined;
|
|
518
528
|
}
|
|
519
529
|
}
|
|
520
530
|
exports.UserMemory = UserMemory;
|
|
@@ -4,14 +4,15 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* @example
|
|
6
6
|
* {
|
|
7
|
-
* tenant_id: "
|
|
8
|
-
*
|
|
7
|
+
* tenant_id: "tenant_1234",
|
|
8
|
+
* sub_tenant_id: "sub_tenant_4567",
|
|
9
|
+
* user_memory: "I prefer detailed technical explanations and works in the Pacific timezone"
|
|
9
10
|
* }
|
|
10
11
|
*/
|
|
11
12
|
export interface AddUserMemoryRequest {
|
|
12
13
|
/** Unique identifier for the tenant/organization */
|
|
13
14
|
tenant_id: string;
|
|
14
|
-
/** Optional sub-tenant identifier
|
|
15
|
+
/** Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used. */
|
|
15
16
|
sub_tenant_id?: string;
|
|
16
17
|
/** The memory content to store for future reference */
|
|
17
18
|
user_memory: string;
|
|
@@ -4,18 +4,19 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* @example
|
|
6
6
|
* {
|
|
7
|
-
* tenant_id: "
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* tenant_id: "tenant_1234",
|
|
8
|
+
* sub_tenant_id: "sub_tenant_4567",
|
|
9
|
+
* user_message: "I prefer detailed technical explanations and works in the Pacific timezone",
|
|
10
|
+
* user_name: "John Doe"
|
|
10
11
|
* }
|
|
11
12
|
*/
|
|
12
13
|
export interface GenerateUserMemoryRequest {
|
|
13
14
|
/** Unique identifier for the tenant/organization */
|
|
14
15
|
tenant_id: string;
|
|
15
|
-
/** Optional sub-tenant identifier
|
|
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. */
|
|
16
17
|
sub_tenant_id?: string;
|
|
17
18
|
/** Your query or context for AI memory generation */
|
|
18
|
-
|
|
19
|
+
user_message: string;
|
|
19
20
|
/** Your name to personalize the generated memories */
|
|
20
21
|
user_name: string;
|
|
21
22
|
}
|
|
@@ -4,17 +4,21 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* @example
|
|
6
6
|
* {
|
|
7
|
-
* tenant_id: "
|
|
8
|
-
*
|
|
7
|
+
* tenant_id: "tenant_1234",
|
|
8
|
+
* sub_tenant_id: "sub_tenant_4567",
|
|
9
|
+
* max_count: 5,
|
|
10
|
+
* query: "Which mode does user prefer"
|
|
9
11
|
* }
|
|
10
12
|
*/
|
|
11
13
|
export interface RetrieveUserMemoryRequest {
|
|
12
14
|
/** Unique identifier for the tenant/organization */
|
|
13
15
|
tenant_id: string;
|
|
14
|
-
/** Optional sub-tenant identifier
|
|
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. */
|
|
15
17
|
sub_tenant_id?: string;
|
|
16
18
|
/** Maximum number of memories to return (default: 5) */
|
|
17
19
|
max_count?: number;
|
|
18
20
|
/** Search query to find relevant user memories */
|
|
19
21
|
query: string;
|
|
22
|
+
/** User's name to enhance personalisation */
|
|
23
|
+
user_name?: string;
|
|
20
24
|
}
|
package/dist/api/resources/userMemory/client/requests/UserMemoryDeleteUserMemoryRequest.d.ts
CHANGED
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* @example
|
|
6
6
|
* {
|
|
7
|
-
* tenant_id: "
|
|
8
|
-
* memory_id: "
|
|
7
|
+
* tenant_id: "tenant_1234",
|
|
8
|
+
* memory_id: "memory_1234",
|
|
9
|
+
* sub_tenant_id: "sub_tenant_4567"
|
|
9
10
|
* }
|
|
10
11
|
*/
|
|
11
12
|
export interface UserMemoryDeleteUserMemoryRequest {
|
|
@@ -13,6 +14,6 @@ export interface UserMemoryDeleteUserMemoryRequest {
|
|
|
13
14
|
tenant_id: string;
|
|
14
15
|
/** Unique identifier of the memory to delete */
|
|
15
16
|
memory_id: string;
|
|
16
|
-
/** Optional sub-tenant identifier
|
|
17
|
+
/** 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
18
|
sub_tenant_id?: string;
|
|
18
19
|
}
|
package/dist/api/resources/userMemory/client/requests/UserMemoryListUserMemoriesRequest.d.ts
CHANGED
|
@@ -4,12 +4,13 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* @example
|
|
6
6
|
* {
|
|
7
|
-
* tenant_id: "
|
|
7
|
+
* tenant_id: "tenant_1234",
|
|
8
|
+
* sub_tenant_id: "sub_tenant_4567"
|
|
8
9
|
* }
|
|
9
10
|
*/
|
|
10
11
|
export interface UserMemoryListUserMemoriesRequest {
|
|
11
12
|
/** Unique identifier for the tenant/organization */
|
|
12
13
|
tenant_id: string;
|
|
13
|
-
/** Optional sub-tenant identifier
|
|
14
|
+
/** Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used. */
|
|
14
15
|
sub_tenant_id?: string;
|
|
15
16
|
}
|
|
@@ -6,6 +6,6 @@ export interface DeleteMemoryRequest {
|
|
|
6
6
|
tenant_id: string;
|
|
7
7
|
/** List of source IDs to delete */
|
|
8
8
|
source_ids: string[];
|
|
9
|
-
/** Optional sub-tenant identifier
|
|
9
|
+
/** Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used. */
|
|
10
10
|
sub_tenant_id?: string;
|
|
11
11
|
}
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
export interface MarkdownUploadRequest {
|
|
5
5
|
/** The text or markdown content to upload */
|
|
6
6
|
content: string;
|
|
7
|
+
/** Optional file ID for the uploaded content. If not provided, will be generated automatically. */
|
|
8
|
+
file_id?: string;
|
|
7
9
|
/**
|
|
8
10
|
* JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
|
|
9
11
|
*
|
|
@@ -8,6 +8,8 @@ export interface SubTenantIdsData {
|
|
|
8
8
|
sub_tenant_ids: string[];
|
|
9
9
|
/** Total number of sub-tenants found */
|
|
10
10
|
count: number;
|
|
11
|
+
/** Schema configuration for the tenant collection */
|
|
12
|
+
tenant_schema?: Record<string, unknown>;
|
|
11
13
|
/** Indicates whether the sub-tenant retrieval was successful */
|
|
12
14
|
success?: boolean;
|
|
13
15
|
/** Response message describing the operation result */
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
export interface TenantStats {
|
|
5
5
|
/** Total number of objects stored for this tenant */
|
|
6
6
|
object_count: number;
|
|
7
|
-
/**
|
|
8
|
-
|
|
7
|
+
/** identifier for the tenant */
|
|
8
|
+
tenant_id: string;
|
|
9
9
|
/** Dimensions of the vector embeddings used for this tenant. Null when the tenant is empty. */
|
|
10
10
|
vector_dimension?: number;
|
|
11
11
|
/** Indicates whether the stats retrieval was successful */
|
package/package.json
CHANGED