linkque-cli-v2 1.6.18 → 1.6.20
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/dataTransformWorker.js +17 -3
- package/dev/worker.js +11 -37
- package/linkquejs.js +884 -813
- package/package.json +1 -1
- package/vendor/linkque-agent-appwrite-integrate/data-transform/dataTransformWorker.js +17 -3
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{anthropic-messages-GSYNBLMR.js → anthropic-messages-TBZKK7UX.js} +2 -2
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-L5WNKJ4W.js → chunk-22EQ6RXO.js} +253 -3078
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-M6E4Y5HY.js → chunk-5MR5ICJ4.js} +1916 -2642
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/chunk-EAODRPW4.js +518 -0
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-KRE5FADB.js → chunk-JMBJJF7P.js} +11 -37
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-3BH2PDL3.js → chunk-WHXLLQZR.js} +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{google-generative-ai-YD5ZGNXC.js → google-generative-ai-KD7MXONK.js} +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{google-vertex-M34UDW4J.js → google-vertex-TREYA472.js} +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{mistral-conversations-EIVAJAMW.js → mistral-conversations-5EI6JQBZ.js} +4 -4
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{otel-LQR5KPZ3.js → otel-RUUFBBFE.js} +266 -578
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/runtime/handler/chat.js +1562 -1888
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/runtime/handler/clientCapability.js +3 -2
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/runtime/protocol.js +3 -2
- package/worker.js +3544 -4996
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{azure-openai-responses-NPKMM3LF.js → azure-openai-responses-IYC43YOB.js} +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-KDHBKVSL.js → chunk-FCD4O3BT.js} +3 -3
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{openai-codex-responses-GEFKSNVN.js → openai-codex-responses-HYLTKNTN.js} +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{openai-completions-TAACO6T5.js → openai-completions-CS3OYESP.js} +3 -3
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{openai-responses-4DDTXIGI.js → openai-responses-IYAGUHY7.js} +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{pi-messages-7JN3W3BC.js → pi-messages-XGBW55RS.js} +3 -3
package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-L5WNKJ4W.js → chunk-22EQ6RXO.js}
RENAMED
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
RuntimeConfigProvider,
|
|
24
24
|
getRunEmbeddedQuery,
|
|
25
25
|
isDebugLoggingEnabled
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-5MR5ICJ4.js";
|
|
27
27
|
import {
|
|
28
28
|
__commonJS,
|
|
29
29
|
__require,
|
|
@@ -7378,6 +7378,24 @@ var AUTHORIZATION_CHECKPOINT_COLUMNS = [
|
|
|
7378
7378
|
}
|
|
7379
7379
|
];
|
|
7380
7380
|
|
|
7381
|
+
// ../linkque-agent-appwrite-integrate/dist/esm/runtime/externalActionSchema.js
|
|
7382
|
+
var definitions = [
|
|
7383
|
+
["state", 16],
|
|
7384
|
+
["digest", 64],
|
|
7385
|
+
["runId", 256],
|
|
7386
|
+
["threadId", 256],
|
|
7387
|
+
["messageId", 256],
|
|
7388
|
+
["createdAt", 64]
|
|
7389
|
+
];
|
|
7390
|
+
var EXTERNAL_ACTION_COLUMNS = definitions.map(([key, size]) => ({
|
|
7391
|
+
key,
|
|
7392
|
+
size,
|
|
7393
|
+
type: "varchar",
|
|
7394
|
+
required: true,
|
|
7395
|
+
array: false,
|
|
7396
|
+
default: null
|
|
7397
|
+
}));
|
|
7398
|
+
|
|
7381
7399
|
// ../linkque-agent-appwrite-integrate/dist/esm/runtime/appbaseRuntimeConfigProvider.js
|
|
7382
7400
|
var LINKQUE_ENDPOINT_PRE = "https://linkquegw-pre.alipay.com";
|
|
7383
7401
|
var APPBASE_RUNTIME_CONFIG_DEFAULTS = Object.freeze({
|
|
@@ -11035,3042 +11053,161 @@ var Databases = class {
|
|
|
11035
11053
|
const apiPath = "/databases/{databaseId}/collections/{collectionId}/documents/{documentId}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{documentId}", documentId);
|
|
11036
11054
|
const payload = {};
|
|
11037
11055
|
if (typeof data !== "undefined") {
|
|
11038
|
-
payload["data"] = data;
|
|
11039
|
-
}
|
|
11040
|
-
if (typeof permissions !== "undefined") {
|
|
11041
|
-
payload["permissions"] = permissions;
|
|
11042
|
-
}
|
|
11043
|
-
if (typeof transactionId !== "undefined") {
|
|
11044
|
-
payload["transactionId"] = transactionId;
|
|
11045
|
-
}
|
|
11046
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11047
|
-
const apiHeaders = {
|
|
11048
|
-
"content-type": "application/json"
|
|
11049
|
-
};
|
|
11050
|
-
return this.client.call(
|
|
11051
|
-
"put",
|
|
11052
|
-
uri,
|
|
11053
|
-
apiHeaders,
|
|
11054
|
-
payload
|
|
11055
|
-
);
|
|
11056
|
-
}
|
|
11057
|
-
updateDocument(paramsOrFirst, ...rest) {
|
|
11058
|
-
let params;
|
|
11059
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
11060
|
-
params = paramsOrFirst || {};
|
|
11061
|
-
} else {
|
|
11062
|
-
params = {
|
|
11063
|
-
databaseId: paramsOrFirst,
|
|
11064
|
-
collectionId: rest[0],
|
|
11065
|
-
documentId: rest[1],
|
|
11066
|
-
data: rest[2],
|
|
11067
|
-
permissions: rest[3],
|
|
11068
|
-
transactionId: rest[4]
|
|
11069
|
-
};
|
|
11070
|
-
}
|
|
11071
|
-
const databaseId = params.databaseId;
|
|
11072
|
-
const collectionId = params.collectionId;
|
|
11073
|
-
const documentId = params.documentId;
|
|
11074
|
-
const data = params.data;
|
|
11075
|
-
const permissions = params.permissions;
|
|
11076
|
-
const transactionId = params.transactionId;
|
|
11077
|
-
if (typeof databaseId === "undefined") {
|
|
11078
|
-
throw new AppBaseException('Missing required parameter: "databaseId"');
|
|
11079
|
-
}
|
|
11080
|
-
if (typeof collectionId === "undefined") {
|
|
11081
|
-
throw new AppBaseException('Missing required parameter: "collectionId"');
|
|
11082
|
-
}
|
|
11083
|
-
if (typeof documentId === "undefined") {
|
|
11084
|
-
throw new AppBaseException('Missing required parameter: "documentId"');
|
|
11085
|
-
}
|
|
11086
|
-
const apiPath = "/databases/{databaseId}/collections/{collectionId}/documents/{documentId}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{documentId}", documentId);
|
|
11087
|
-
const payload = {};
|
|
11088
|
-
if (typeof data !== "undefined") {
|
|
11089
|
-
payload["data"] = data;
|
|
11090
|
-
}
|
|
11091
|
-
if (typeof permissions !== "undefined") {
|
|
11092
|
-
payload["permissions"] = permissions;
|
|
11093
|
-
}
|
|
11094
|
-
if (typeof transactionId !== "undefined") {
|
|
11095
|
-
payload["transactionId"] = transactionId;
|
|
11096
|
-
}
|
|
11097
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11098
|
-
const apiHeaders = {
|
|
11099
|
-
"content-type": "application/json"
|
|
11100
|
-
};
|
|
11101
|
-
return this.client.call(
|
|
11102
|
-
"patch",
|
|
11103
|
-
uri,
|
|
11104
|
-
apiHeaders,
|
|
11105
|
-
payload
|
|
11106
|
-
);
|
|
11107
|
-
}
|
|
11108
|
-
deleteDocument(paramsOrFirst, ...rest) {
|
|
11109
|
-
let params;
|
|
11110
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
11111
|
-
params = paramsOrFirst || {};
|
|
11112
|
-
} else {
|
|
11113
|
-
params = {
|
|
11114
|
-
databaseId: paramsOrFirst,
|
|
11115
|
-
collectionId: rest[0],
|
|
11116
|
-
documentId: rest[1],
|
|
11117
|
-
transactionId: rest[2]
|
|
11118
|
-
};
|
|
11119
|
-
}
|
|
11120
|
-
const databaseId = params.databaseId;
|
|
11121
|
-
const collectionId = params.collectionId;
|
|
11122
|
-
const documentId = params.documentId;
|
|
11123
|
-
const transactionId = params.transactionId;
|
|
11124
|
-
if (typeof databaseId === "undefined") {
|
|
11125
|
-
throw new AppBaseException('Missing required parameter: "databaseId"');
|
|
11126
|
-
}
|
|
11127
|
-
if (typeof collectionId === "undefined") {
|
|
11128
|
-
throw new AppBaseException('Missing required parameter: "collectionId"');
|
|
11129
|
-
}
|
|
11130
|
-
if (typeof documentId === "undefined") {
|
|
11131
|
-
throw new AppBaseException('Missing required parameter: "documentId"');
|
|
11132
|
-
}
|
|
11133
|
-
const apiPath = "/databases/{databaseId}/collections/{collectionId}/documents/{documentId}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{documentId}", documentId);
|
|
11134
|
-
const payload = {};
|
|
11135
|
-
if (typeof transactionId !== "undefined") {
|
|
11136
|
-
payload["transactionId"] = transactionId;
|
|
11137
|
-
}
|
|
11138
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11139
|
-
const apiHeaders = {
|
|
11140
|
-
"content-type": "application/json"
|
|
11141
|
-
};
|
|
11142
|
-
return this.client.call(
|
|
11143
|
-
"delete",
|
|
11144
|
-
uri,
|
|
11145
|
-
apiHeaders,
|
|
11146
|
-
payload
|
|
11147
|
-
);
|
|
11148
|
-
}
|
|
11149
|
-
decrementDocumentAttribute(paramsOrFirst, ...rest) {
|
|
11150
|
-
let params;
|
|
11151
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
11152
|
-
params = paramsOrFirst || {};
|
|
11153
|
-
} else {
|
|
11154
|
-
params = {
|
|
11155
|
-
databaseId: paramsOrFirst,
|
|
11156
|
-
collectionId: rest[0],
|
|
11157
|
-
documentId: rest[1],
|
|
11158
|
-
attribute: rest[2],
|
|
11159
|
-
value: rest[3],
|
|
11160
|
-
min: rest[4],
|
|
11161
|
-
transactionId: rest[5]
|
|
11162
|
-
};
|
|
11163
|
-
}
|
|
11164
|
-
const databaseId = params.databaseId;
|
|
11165
|
-
const collectionId = params.collectionId;
|
|
11166
|
-
const documentId = params.documentId;
|
|
11167
|
-
const attribute = params.attribute;
|
|
11168
|
-
const value = params.value;
|
|
11169
|
-
const min = params.min;
|
|
11170
|
-
const transactionId = params.transactionId;
|
|
11171
|
-
if (typeof databaseId === "undefined") {
|
|
11172
|
-
throw new AppBaseException('Missing required parameter: "databaseId"');
|
|
11173
|
-
}
|
|
11174
|
-
if (typeof collectionId === "undefined") {
|
|
11175
|
-
throw new AppBaseException('Missing required parameter: "collectionId"');
|
|
11176
|
-
}
|
|
11177
|
-
if (typeof documentId === "undefined") {
|
|
11178
|
-
throw new AppBaseException('Missing required parameter: "documentId"');
|
|
11179
|
-
}
|
|
11180
|
-
if (typeof attribute === "undefined") {
|
|
11181
|
-
throw new AppBaseException('Missing required parameter: "attribute"');
|
|
11182
|
-
}
|
|
11183
|
-
const apiPath = "/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/decrement".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{documentId}", documentId).replace("{attribute}", attribute);
|
|
11184
|
-
const payload = {};
|
|
11185
|
-
if (typeof value !== "undefined") {
|
|
11186
|
-
payload["value"] = value;
|
|
11187
|
-
}
|
|
11188
|
-
if (typeof min !== "undefined") {
|
|
11189
|
-
payload["min"] = min;
|
|
11190
|
-
}
|
|
11191
|
-
if (typeof transactionId !== "undefined") {
|
|
11192
|
-
payload["transactionId"] = transactionId;
|
|
11193
|
-
}
|
|
11194
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11195
|
-
const apiHeaders = {
|
|
11196
|
-
"content-type": "application/json"
|
|
11197
|
-
};
|
|
11198
|
-
return this.client.call(
|
|
11199
|
-
"patch",
|
|
11200
|
-
uri,
|
|
11201
|
-
apiHeaders,
|
|
11202
|
-
payload
|
|
11203
|
-
);
|
|
11204
|
-
}
|
|
11205
|
-
incrementDocumentAttribute(paramsOrFirst, ...rest) {
|
|
11206
|
-
let params;
|
|
11207
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
11208
|
-
params = paramsOrFirst || {};
|
|
11209
|
-
} else {
|
|
11210
|
-
params = {
|
|
11211
|
-
databaseId: paramsOrFirst,
|
|
11212
|
-
collectionId: rest[0],
|
|
11213
|
-
documentId: rest[1],
|
|
11214
|
-
attribute: rest[2],
|
|
11215
|
-
value: rest[3],
|
|
11216
|
-
max: rest[4],
|
|
11217
|
-
transactionId: rest[5]
|
|
11218
|
-
};
|
|
11219
|
-
}
|
|
11220
|
-
const databaseId = params.databaseId;
|
|
11221
|
-
const collectionId = params.collectionId;
|
|
11222
|
-
const documentId = params.documentId;
|
|
11223
|
-
const attribute = params.attribute;
|
|
11224
|
-
const value = params.value;
|
|
11225
|
-
const max = params.max;
|
|
11226
|
-
const transactionId = params.transactionId;
|
|
11227
|
-
if (typeof databaseId === "undefined") {
|
|
11228
|
-
throw new AppBaseException('Missing required parameter: "databaseId"');
|
|
11229
|
-
}
|
|
11230
|
-
if (typeof collectionId === "undefined") {
|
|
11231
|
-
throw new AppBaseException('Missing required parameter: "collectionId"');
|
|
11232
|
-
}
|
|
11233
|
-
if (typeof documentId === "undefined") {
|
|
11234
|
-
throw new AppBaseException('Missing required parameter: "documentId"');
|
|
11235
|
-
}
|
|
11236
|
-
if (typeof attribute === "undefined") {
|
|
11237
|
-
throw new AppBaseException('Missing required parameter: "attribute"');
|
|
11238
|
-
}
|
|
11239
|
-
const apiPath = "/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/increment".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{documentId}", documentId).replace("{attribute}", attribute);
|
|
11240
|
-
const payload = {};
|
|
11241
|
-
if (typeof value !== "undefined") {
|
|
11242
|
-
payload["value"] = value;
|
|
11243
|
-
}
|
|
11244
|
-
if (typeof max !== "undefined") {
|
|
11245
|
-
payload["max"] = max;
|
|
11246
|
-
}
|
|
11247
|
-
if (typeof transactionId !== "undefined") {
|
|
11248
|
-
payload["transactionId"] = transactionId;
|
|
11249
|
-
}
|
|
11250
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11251
|
-
const apiHeaders = {
|
|
11252
|
-
"content-type": "application/json"
|
|
11253
|
-
};
|
|
11254
|
-
return this.client.call(
|
|
11255
|
-
"patch",
|
|
11256
|
-
uri,
|
|
11257
|
-
apiHeaders,
|
|
11258
|
-
payload
|
|
11259
|
-
);
|
|
11260
|
-
}
|
|
11261
|
-
listIndexes(paramsOrFirst, ...rest) {
|
|
11262
|
-
let params;
|
|
11263
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
11264
|
-
params = paramsOrFirst || {};
|
|
11265
|
-
} else {
|
|
11266
|
-
params = {
|
|
11267
|
-
databaseId: paramsOrFirst,
|
|
11268
|
-
collectionId: rest[0],
|
|
11269
|
-
queries: rest[1],
|
|
11270
|
-
total: rest[2]
|
|
11271
|
-
};
|
|
11272
|
-
}
|
|
11273
|
-
const databaseId = params.databaseId;
|
|
11274
|
-
const collectionId = params.collectionId;
|
|
11275
|
-
const queries = params.queries;
|
|
11276
|
-
const total = params.total;
|
|
11277
|
-
if (typeof databaseId === "undefined") {
|
|
11278
|
-
throw new AppBaseException('Missing required parameter: "databaseId"');
|
|
11279
|
-
}
|
|
11280
|
-
if (typeof collectionId === "undefined") {
|
|
11281
|
-
throw new AppBaseException('Missing required parameter: "collectionId"');
|
|
11282
|
-
}
|
|
11283
|
-
const apiPath = "/databases/{databaseId}/collections/{collectionId}/indexes".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
|
|
11284
|
-
const payload = {};
|
|
11285
|
-
if (typeof queries !== "undefined") {
|
|
11286
|
-
payload["queries"] = queries;
|
|
11287
|
-
}
|
|
11288
|
-
if (typeof total !== "undefined") {
|
|
11289
|
-
payload["total"] = total;
|
|
11290
|
-
}
|
|
11291
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11292
|
-
const apiHeaders = {};
|
|
11293
|
-
return this.client.call(
|
|
11294
|
-
"get",
|
|
11295
|
-
uri,
|
|
11296
|
-
apiHeaders,
|
|
11297
|
-
payload
|
|
11298
|
-
);
|
|
11299
|
-
}
|
|
11300
|
-
createIndex(paramsOrFirst, ...rest) {
|
|
11301
|
-
let params;
|
|
11302
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
11303
|
-
params = paramsOrFirst || {};
|
|
11304
|
-
} else {
|
|
11305
|
-
params = {
|
|
11306
|
-
databaseId: paramsOrFirst,
|
|
11307
|
-
collectionId: rest[0],
|
|
11308
|
-
key: rest[1],
|
|
11309
|
-
type: rest[2],
|
|
11310
|
-
attributes: rest[3],
|
|
11311
|
-
orders: rest[4],
|
|
11312
|
-
lengths: rest[5]
|
|
11313
|
-
};
|
|
11314
|
-
}
|
|
11315
|
-
const databaseId = params.databaseId;
|
|
11316
|
-
const collectionId = params.collectionId;
|
|
11317
|
-
const key = params.key;
|
|
11318
|
-
const type = params.type;
|
|
11319
|
-
const attributes = params.attributes;
|
|
11320
|
-
const orders = params.orders;
|
|
11321
|
-
const lengths = params.lengths;
|
|
11322
|
-
if (typeof databaseId === "undefined") {
|
|
11323
|
-
throw new AppBaseException('Missing required parameter: "databaseId"');
|
|
11324
|
-
}
|
|
11325
|
-
if (typeof collectionId === "undefined") {
|
|
11326
|
-
throw new AppBaseException('Missing required parameter: "collectionId"');
|
|
11327
|
-
}
|
|
11328
|
-
if (typeof key === "undefined") {
|
|
11329
|
-
throw new AppBaseException('Missing required parameter: "key"');
|
|
11330
|
-
}
|
|
11331
|
-
if (typeof type === "undefined") {
|
|
11332
|
-
throw new AppBaseException('Missing required parameter: "type"');
|
|
11333
|
-
}
|
|
11334
|
-
if (typeof attributes === "undefined") {
|
|
11335
|
-
throw new AppBaseException('Missing required parameter: "attributes"');
|
|
11336
|
-
}
|
|
11337
|
-
const apiPath = "/databases/{databaseId}/collections/{collectionId}/indexes".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
|
|
11338
|
-
const payload = {};
|
|
11339
|
-
if (typeof key !== "undefined") {
|
|
11340
|
-
payload["key"] = key;
|
|
11341
|
-
}
|
|
11342
|
-
if (typeof type !== "undefined") {
|
|
11343
|
-
payload["type"] = type;
|
|
11344
|
-
}
|
|
11345
|
-
if (typeof attributes !== "undefined") {
|
|
11346
|
-
payload["attributes"] = attributes;
|
|
11347
|
-
}
|
|
11348
|
-
if (typeof orders !== "undefined") {
|
|
11349
|
-
payload["orders"] = orders;
|
|
11350
|
-
}
|
|
11351
|
-
if (typeof lengths !== "undefined") {
|
|
11352
|
-
payload["lengths"] = lengths;
|
|
11353
|
-
}
|
|
11354
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11355
|
-
const apiHeaders = {
|
|
11356
|
-
"content-type": "application/json"
|
|
11357
|
-
};
|
|
11358
|
-
return this.client.call(
|
|
11359
|
-
"post",
|
|
11360
|
-
uri,
|
|
11361
|
-
apiHeaders,
|
|
11362
|
-
payload
|
|
11363
|
-
);
|
|
11364
|
-
}
|
|
11365
|
-
getIndex(paramsOrFirst, ...rest) {
|
|
11366
|
-
let params;
|
|
11367
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
11368
|
-
params = paramsOrFirst || {};
|
|
11369
|
-
} else {
|
|
11370
|
-
params = {
|
|
11371
|
-
databaseId: paramsOrFirst,
|
|
11372
|
-
collectionId: rest[0],
|
|
11373
|
-
key: rest[1]
|
|
11374
|
-
};
|
|
11375
|
-
}
|
|
11376
|
-
const databaseId = params.databaseId;
|
|
11377
|
-
const collectionId = params.collectionId;
|
|
11378
|
-
const key = params.key;
|
|
11379
|
-
if (typeof databaseId === "undefined") {
|
|
11380
|
-
throw new AppBaseException('Missing required parameter: "databaseId"');
|
|
11381
|
-
}
|
|
11382
|
-
if (typeof collectionId === "undefined") {
|
|
11383
|
-
throw new AppBaseException('Missing required parameter: "collectionId"');
|
|
11384
|
-
}
|
|
11385
|
-
if (typeof key === "undefined") {
|
|
11386
|
-
throw new AppBaseException('Missing required parameter: "key"');
|
|
11387
|
-
}
|
|
11388
|
-
const apiPath = "/databases/{databaseId}/collections/{collectionId}/indexes/{key}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{key}", key);
|
|
11389
|
-
const payload = {};
|
|
11390
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11391
|
-
const apiHeaders = {};
|
|
11392
|
-
return this.client.call(
|
|
11393
|
-
"get",
|
|
11394
|
-
uri,
|
|
11395
|
-
apiHeaders,
|
|
11396
|
-
payload
|
|
11397
|
-
);
|
|
11398
|
-
}
|
|
11399
|
-
deleteIndex(paramsOrFirst, ...rest) {
|
|
11400
|
-
let params;
|
|
11401
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
11402
|
-
params = paramsOrFirst || {};
|
|
11403
|
-
} else {
|
|
11404
|
-
params = {
|
|
11405
|
-
databaseId: paramsOrFirst,
|
|
11406
|
-
collectionId: rest[0],
|
|
11407
|
-
key: rest[1]
|
|
11408
|
-
};
|
|
11409
|
-
}
|
|
11410
|
-
const databaseId = params.databaseId;
|
|
11411
|
-
const collectionId = params.collectionId;
|
|
11412
|
-
const key = params.key;
|
|
11413
|
-
if (typeof databaseId === "undefined") {
|
|
11414
|
-
throw new AppBaseException('Missing required parameter: "databaseId"');
|
|
11415
|
-
}
|
|
11416
|
-
if (typeof collectionId === "undefined") {
|
|
11417
|
-
throw new AppBaseException('Missing required parameter: "collectionId"');
|
|
11418
|
-
}
|
|
11419
|
-
if (typeof key === "undefined") {
|
|
11420
|
-
throw new AppBaseException('Missing required parameter: "key"');
|
|
11421
|
-
}
|
|
11422
|
-
const apiPath = "/databases/{databaseId}/collections/{collectionId}/indexes/{key}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{key}", key);
|
|
11423
|
-
const payload = {};
|
|
11424
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11425
|
-
const apiHeaders = {
|
|
11426
|
-
"content-type": "application/json"
|
|
11427
|
-
};
|
|
11428
|
-
return this.client.call(
|
|
11429
|
-
"delete",
|
|
11430
|
-
uri,
|
|
11431
|
-
apiHeaders,
|
|
11432
|
-
payload
|
|
11433
|
-
);
|
|
11434
|
-
}
|
|
11435
|
-
};
|
|
11436
|
-
|
|
11437
|
-
// ../../node_modules/@alipay/appbase-node-sdk/dist/services/memory.mjs
|
|
11438
|
-
var Memory = class {
|
|
11439
|
-
constructor(client) {
|
|
11440
|
-
this.client = client;
|
|
11441
|
-
}
|
|
11442
|
-
listAudits(paramsOrFirst, ...rest) {
|
|
11443
|
-
let params;
|
|
11444
|
-
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
11445
|
-
params = paramsOrFirst || {};
|
|
11446
|
-
} else {
|
|
11447
|
-
params = {
|
|
11448
|
-
jobId: paramsOrFirst,
|
|
11449
|
-
query: rest[0],
|
|
11450
|
-
operation: rest[1],
|
|
11451
|
-
outcome: rest[2],
|
|
11452
|
-
limit: rest[3],
|
|
11453
|
-
cursor: rest[4]
|
|
11454
|
-
};
|
|
11455
|
-
}
|
|
11456
|
-
const jobId = params.jobId;
|
|
11457
|
-
const query = params.query;
|
|
11458
|
-
const operation = params.operation;
|
|
11459
|
-
const outcome = params.outcome;
|
|
11460
|
-
const limit = params.limit;
|
|
11461
|
-
const cursor = params.cursor;
|
|
11462
|
-
const apiPath = "/memory/audits";
|
|
11463
|
-
const payload = {};
|
|
11464
|
-
if (typeof jobId !== "undefined") {
|
|
11465
|
-
payload["jobId"] = jobId;
|
|
11466
|
-
}
|
|
11467
|
-
if (typeof query !== "undefined") {
|
|
11468
|
-
payload["query"] = query;
|
|
11469
|
-
}
|
|
11470
|
-
if (typeof operation !== "undefined") {
|
|
11471
|
-
payload["operation"] = operation;
|
|
11472
|
-
}
|
|
11473
|
-
if (typeof outcome !== "undefined") {
|
|
11474
|
-
payload["outcome"] = outcome;
|
|
11475
|
-
}
|
|
11476
|
-
if (typeof limit !== "undefined") {
|
|
11477
|
-
payload["limit"] = limit;
|
|
11478
|
-
}
|
|
11479
|
-
if (typeof cursor !== "undefined") {
|
|
11480
|
-
payload["cursor"] = cursor;
|
|
11481
|
-
}
|
|
11482
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11483
|
-
const apiHeaders = {};
|
|
11484
|
-
return this.client.call(
|
|
11485
|
-
"get",
|
|
11486
|
-
uri,
|
|
11487
|
-
apiHeaders,
|
|
11488
|
-
payload
|
|
11489
|
-
);
|
|
11490
|
-
}
|
|
11491
|
-
getJob(paramsOrFirst) {
|
|
11492
|
-
let params;
|
|
11493
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
11494
|
-
params = paramsOrFirst || {};
|
|
11495
|
-
} else {
|
|
11496
|
-
params = {
|
|
11497
|
-
jobId: paramsOrFirst
|
|
11498
|
-
};
|
|
11499
|
-
}
|
|
11500
|
-
const jobId = params.jobId;
|
|
11501
|
-
if (typeof jobId === "undefined") {
|
|
11502
|
-
throw new AppBaseException('Missing required parameter: "jobId"');
|
|
11503
|
-
}
|
|
11504
|
-
const apiPath = "/memory/jobs/{jobId}".replace("{jobId}", jobId);
|
|
11505
|
-
const payload = {};
|
|
11506
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11507
|
-
const apiHeaders = {};
|
|
11508
|
-
return this.client.call(
|
|
11509
|
-
"get",
|
|
11510
|
-
uri,
|
|
11511
|
-
apiHeaders,
|
|
11512
|
-
payload
|
|
11513
|
-
);
|
|
11514
|
-
}
|
|
11515
|
-
list(paramsOrFirst, ...rest) {
|
|
11516
|
-
let params;
|
|
11517
|
-
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
11518
|
-
params = paramsOrFirst || {};
|
|
11519
|
-
} else {
|
|
11520
|
-
params = {
|
|
11521
|
-
cursor: paramsOrFirst,
|
|
11522
|
-
limit: rest[0],
|
|
11523
|
-
filter: rest[1],
|
|
11524
|
-
queries: rest[2],
|
|
11525
|
-
userId: rest[3],
|
|
11526
|
-
accessMode: rest[4]
|
|
11527
|
-
};
|
|
11528
|
-
}
|
|
11529
|
-
const cursor = params.cursor;
|
|
11530
|
-
const limit = params.limit;
|
|
11531
|
-
const filter = params.filter;
|
|
11532
|
-
const queries = params.queries;
|
|
11533
|
-
const userId = params.userId;
|
|
11534
|
-
const accessMode = params.accessMode;
|
|
11535
|
-
const apiPath = "/memory/memories";
|
|
11536
|
-
const payload = {};
|
|
11537
|
-
if (typeof cursor !== "undefined") {
|
|
11538
|
-
payload["cursor"] = cursor;
|
|
11539
|
-
}
|
|
11540
|
-
if (typeof limit !== "undefined") {
|
|
11541
|
-
payload["limit"] = limit;
|
|
11542
|
-
}
|
|
11543
|
-
if (typeof filter !== "undefined") {
|
|
11544
|
-
payload["filter"] = filter;
|
|
11545
|
-
}
|
|
11546
|
-
if (typeof queries !== "undefined") {
|
|
11547
|
-
payload["queries"] = queries;
|
|
11548
|
-
}
|
|
11549
|
-
if (typeof userId !== "undefined") {
|
|
11550
|
-
payload["userId"] = userId;
|
|
11551
|
-
}
|
|
11552
|
-
if (typeof accessMode !== "undefined") {
|
|
11553
|
-
payload["accessMode"] = accessMode;
|
|
11554
|
-
}
|
|
11555
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11556
|
-
const apiHeaders = {};
|
|
11557
|
-
return this.client.call(
|
|
11558
|
-
"get",
|
|
11559
|
-
uri,
|
|
11560
|
-
apiHeaders,
|
|
11561
|
-
payload
|
|
11562
|
-
);
|
|
11563
|
-
}
|
|
11564
|
-
create(paramsOrFirst, ...rest) {
|
|
11565
|
-
let params;
|
|
11566
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
11567
|
-
params = paramsOrFirst || {};
|
|
11568
|
-
} else {
|
|
11569
|
-
params = {
|
|
11570
|
-
userId: paramsOrFirst,
|
|
11571
|
-
scope: rest[0],
|
|
11572
|
-
memoryType: rest[1],
|
|
11573
|
-
recordKind: rest[2],
|
|
11574
|
-
content: rest[3],
|
|
11575
|
-
messages: rest[4],
|
|
11576
|
-
agentId: rest[5],
|
|
11577
|
-
runId: rest[6],
|
|
11578
|
-
sensitivity: rest[7],
|
|
11579
|
-
handlingPolicy: rest[8],
|
|
11580
|
-
metadata: rest[9],
|
|
11581
|
-
infer: rest[10],
|
|
11582
|
-
reRemember: rest[11],
|
|
11583
|
-
async: rest[12]
|
|
11584
|
-
};
|
|
11585
|
-
}
|
|
11586
|
-
const userId = params.userId;
|
|
11587
|
-
const scope = params.scope;
|
|
11588
|
-
const memoryType = params.memoryType;
|
|
11589
|
-
const recordKind = params.recordKind;
|
|
11590
|
-
const content = params.content;
|
|
11591
|
-
const messages = params.messages;
|
|
11592
|
-
const agentId = params.agentId;
|
|
11593
|
-
const runId = params.runId;
|
|
11594
|
-
const sensitivity = params.sensitivity;
|
|
11595
|
-
const handlingPolicy = params.handlingPolicy;
|
|
11596
|
-
const metadata = params.metadata;
|
|
11597
|
-
const infer = params.infer;
|
|
11598
|
-
const reRemember = params.reRemember;
|
|
11599
|
-
const async = params.async;
|
|
11600
|
-
if (typeof userId === "undefined") {
|
|
11601
|
-
throw new AppBaseException('Missing required parameter: "userId"');
|
|
11602
|
-
}
|
|
11603
|
-
if (typeof scope === "undefined") {
|
|
11604
|
-
throw new AppBaseException('Missing required parameter: "scope"');
|
|
11605
|
-
}
|
|
11606
|
-
if (typeof memoryType === "undefined") {
|
|
11607
|
-
throw new AppBaseException('Missing required parameter: "memoryType"');
|
|
11608
|
-
}
|
|
11609
|
-
if (typeof recordKind === "undefined") {
|
|
11610
|
-
throw new AppBaseException('Missing required parameter: "recordKind"');
|
|
11611
|
-
}
|
|
11612
|
-
const apiPath = "/memory/memories";
|
|
11613
|
-
const payload = {};
|
|
11614
|
-
if (typeof content !== "undefined") {
|
|
11615
|
-
payload["content"] = content;
|
|
11616
|
-
}
|
|
11617
|
-
if (typeof messages !== "undefined") {
|
|
11618
|
-
payload["messages"] = messages;
|
|
11619
|
-
}
|
|
11620
|
-
if (typeof userId !== "undefined") {
|
|
11621
|
-
payload["userId"] = userId;
|
|
11622
|
-
}
|
|
11623
|
-
if (typeof agentId !== "undefined") {
|
|
11624
|
-
payload["agentId"] = agentId;
|
|
11625
|
-
}
|
|
11626
|
-
if (typeof runId !== "undefined") {
|
|
11627
|
-
payload["runId"] = runId;
|
|
11628
|
-
}
|
|
11629
|
-
if (typeof scope !== "undefined") {
|
|
11630
|
-
payload["scope"] = scope;
|
|
11631
|
-
}
|
|
11632
|
-
if (typeof sensitivity !== "undefined") {
|
|
11633
|
-
payload["sensitivity"] = sensitivity;
|
|
11634
|
-
}
|
|
11635
|
-
if (typeof handlingPolicy !== "undefined") {
|
|
11636
|
-
payload["handlingPolicy"] = handlingPolicy;
|
|
11637
|
-
}
|
|
11638
|
-
if (typeof memoryType !== "undefined") {
|
|
11639
|
-
payload["memoryType"] = memoryType;
|
|
11640
|
-
}
|
|
11641
|
-
if (typeof recordKind !== "undefined") {
|
|
11642
|
-
payload["recordKind"] = recordKind;
|
|
11643
|
-
}
|
|
11644
|
-
if (typeof metadata !== "undefined") {
|
|
11645
|
-
payload["metadata"] = metadata;
|
|
11646
|
-
}
|
|
11647
|
-
if (typeof infer !== "undefined") {
|
|
11648
|
-
payload["infer"] = infer;
|
|
11649
|
-
}
|
|
11650
|
-
if (typeof reRemember !== "undefined") {
|
|
11651
|
-
payload["reRemember"] = reRemember;
|
|
11652
|
-
}
|
|
11653
|
-
if (typeof async !== "undefined") {
|
|
11654
|
-
payload["async"] = async;
|
|
11655
|
-
}
|
|
11656
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11657
|
-
const apiHeaders = {
|
|
11658
|
-
"content-type": "application/json"
|
|
11659
|
-
};
|
|
11660
|
-
return this.client.call(
|
|
11661
|
-
"post",
|
|
11662
|
-
uri,
|
|
11663
|
-
apiHeaders,
|
|
11664
|
-
payload
|
|
11665
|
-
);
|
|
11666
|
-
}
|
|
11667
|
-
deleteMany(paramsOrFirst, ...rest) {
|
|
11668
|
-
let params;
|
|
11669
|
-
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
11670
|
-
params = paramsOrFirst || {};
|
|
11671
|
-
} else {
|
|
11672
|
-
params = {
|
|
11673
|
-
userId: paramsOrFirst,
|
|
11674
|
-
limit: rest[0],
|
|
11675
|
-
reason: rest[1],
|
|
11676
|
-
source: rest[2]
|
|
11677
|
-
};
|
|
11678
|
-
}
|
|
11679
|
-
const userId = params.userId;
|
|
11680
|
-
const limit = params.limit;
|
|
11681
|
-
const reason = params.reason;
|
|
11682
|
-
const source = params.source;
|
|
11683
|
-
const apiPath = "/memory/memories";
|
|
11684
|
-
const payload = {};
|
|
11685
|
-
if (typeof userId !== "undefined") {
|
|
11686
|
-
payload["userId"] = userId;
|
|
11687
|
-
}
|
|
11688
|
-
if (typeof limit !== "undefined") {
|
|
11689
|
-
payload["limit"] = limit;
|
|
11690
|
-
}
|
|
11691
|
-
if (typeof reason !== "undefined") {
|
|
11692
|
-
payload["reason"] = reason;
|
|
11693
|
-
}
|
|
11694
|
-
if (typeof source !== "undefined") {
|
|
11695
|
-
payload["source"] = source;
|
|
11696
|
-
}
|
|
11697
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11698
|
-
const apiHeaders = {
|
|
11699
|
-
"content-type": "application/json"
|
|
11700
|
-
};
|
|
11701
|
-
return this.client.call(
|
|
11702
|
-
"delete",
|
|
11703
|
-
uri,
|
|
11704
|
-
apiHeaders,
|
|
11705
|
-
payload
|
|
11706
|
-
);
|
|
11707
|
-
}
|
|
11708
|
-
createBatch(paramsOrFirst) {
|
|
11709
|
-
let params;
|
|
11710
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst) && "items" in paramsOrFirst) {
|
|
11711
|
-
params = paramsOrFirst || {};
|
|
11712
|
-
} else {
|
|
11713
|
-
params = {
|
|
11714
|
-
items: paramsOrFirst
|
|
11715
|
-
};
|
|
11716
|
-
}
|
|
11717
|
-
const items = params.items;
|
|
11718
|
-
if (typeof items === "undefined") {
|
|
11719
|
-
throw new AppBaseException('Missing required parameter: "items"');
|
|
11720
|
-
}
|
|
11721
|
-
const apiPath = "/memory/memories/batch";
|
|
11722
|
-
const payload = {};
|
|
11723
|
-
if (typeof items !== "undefined") {
|
|
11724
|
-
payload["items"] = items;
|
|
11725
|
-
}
|
|
11726
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11727
|
-
const apiHeaders = {
|
|
11728
|
-
"content-type": "application/json"
|
|
11729
|
-
};
|
|
11730
|
-
return this.client.call(
|
|
11731
|
-
"post",
|
|
11732
|
-
uri,
|
|
11733
|
-
apiHeaders,
|
|
11734
|
-
payload
|
|
11735
|
-
);
|
|
11736
|
-
}
|
|
11737
|
-
listContexts(paramsOrFirst, ...rest) {
|
|
11738
|
-
let params;
|
|
11739
|
-
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst) && ("scope" in paramsOrFirst || "userId" in paramsOrFirst || "agentId" in paramsOrFirst || "sessionId" in paramsOrFirst || "runId" in paramsOrFirst || "memorySubStoreId" in paramsOrFirst || "status" in paramsOrFirst || "kind" in paramsOrFirst || "cursor" in paramsOrFirst || "limit" in paramsOrFirst)) {
|
|
11740
|
-
params = paramsOrFirst || {};
|
|
11741
|
-
} else {
|
|
11742
|
-
params = {
|
|
11743
|
-
scope: paramsOrFirst,
|
|
11744
|
-
userId: rest[0],
|
|
11745
|
-
agentId: rest[1],
|
|
11746
|
-
sessionId: rest[2],
|
|
11747
|
-
runId: rest[3],
|
|
11748
|
-
memorySubStoreId: rest[4],
|
|
11749
|
-
status: rest[5],
|
|
11750
|
-
kind: rest[6],
|
|
11751
|
-
cursor: rest[7],
|
|
11752
|
-
limit: rest[8]
|
|
11753
|
-
};
|
|
11754
|
-
}
|
|
11755
|
-
const scope = params.scope;
|
|
11756
|
-
const userId = params.userId;
|
|
11757
|
-
const agentId = params.agentId;
|
|
11758
|
-
const sessionId = params.sessionId;
|
|
11759
|
-
const runId = params.runId;
|
|
11760
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
11761
|
-
const status = params.status;
|
|
11762
|
-
const kind = params.kind;
|
|
11763
|
-
const cursor = params.cursor;
|
|
11764
|
-
const limit = params.limit;
|
|
11765
|
-
const apiPath = "/memory/memories/contexts";
|
|
11766
|
-
const payload = {};
|
|
11767
|
-
if (typeof scope !== "undefined") {
|
|
11768
|
-
payload["scope"] = scope;
|
|
11769
|
-
}
|
|
11770
|
-
if (typeof userId !== "undefined") {
|
|
11771
|
-
payload["userId"] = userId;
|
|
11772
|
-
}
|
|
11773
|
-
if (typeof agentId !== "undefined") {
|
|
11774
|
-
payload["agentId"] = agentId;
|
|
11775
|
-
}
|
|
11776
|
-
if (typeof sessionId !== "undefined") {
|
|
11777
|
-
payload["sessionId"] = sessionId;
|
|
11778
|
-
}
|
|
11779
|
-
if (typeof runId !== "undefined") {
|
|
11780
|
-
payload["runId"] = runId;
|
|
11781
|
-
}
|
|
11782
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
11783
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
11784
|
-
}
|
|
11785
|
-
if (typeof status !== "undefined") {
|
|
11786
|
-
payload["status"] = status;
|
|
11787
|
-
}
|
|
11788
|
-
if (typeof kind !== "undefined") {
|
|
11789
|
-
payload["kind"] = kind;
|
|
11790
|
-
}
|
|
11791
|
-
if (typeof cursor !== "undefined") {
|
|
11792
|
-
payload["cursor"] = cursor;
|
|
11793
|
-
}
|
|
11794
|
-
if (typeof limit !== "undefined") {
|
|
11795
|
-
payload["limit"] = limit;
|
|
11796
|
-
}
|
|
11797
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11798
|
-
const apiHeaders = {};
|
|
11799
|
-
return this.client.call(
|
|
11800
|
-
"get",
|
|
11801
|
-
uri,
|
|
11802
|
-
apiHeaders,
|
|
11803
|
-
payload
|
|
11804
|
-
);
|
|
11805
|
-
}
|
|
11806
|
-
createContextRun(paramsOrFirst, ...rest) {
|
|
11807
|
-
let params;
|
|
11808
|
-
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst) && ("scope" in paramsOrFirst || "userId" in paramsOrFirst || "agentId" in paramsOrFirst || "sessionId" in paramsOrFirst || "runId" in paramsOrFirst || "memorySubStoreId" in paramsOrFirst)) {
|
|
11809
|
-
params = paramsOrFirst || {};
|
|
11810
|
-
} else {
|
|
11811
|
-
params = {
|
|
11812
|
-
scope: paramsOrFirst,
|
|
11813
|
-
userId: rest[0],
|
|
11814
|
-
agentId: rest[1],
|
|
11815
|
-
sessionId: rest[2],
|
|
11816
|
-
runId: rest[3],
|
|
11817
|
-
memorySubStoreId: rest[4]
|
|
11818
|
-
};
|
|
11819
|
-
}
|
|
11820
|
-
const scope = params.scope;
|
|
11821
|
-
const userId = params.userId;
|
|
11822
|
-
const agentId = params.agentId;
|
|
11823
|
-
const sessionId = params.sessionId;
|
|
11824
|
-
const runId = params.runId;
|
|
11825
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
11826
|
-
const apiPath = "/memory/memories/contexts/runs";
|
|
11827
|
-
const payload = {};
|
|
11828
|
-
if (typeof scope !== "undefined") {
|
|
11829
|
-
payload["scope"] = scope;
|
|
11830
|
-
}
|
|
11831
|
-
if (typeof userId !== "undefined") {
|
|
11832
|
-
payload["userId"] = userId;
|
|
11833
|
-
}
|
|
11834
|
-
if (typeof agentId !== "undefined") {
|
|
11835
|
-
payload["agentId"] = agentId;
|
|
11836
|
-
}
|
|
11837
|
-
if (typeof sessionId !== "undefined") {
|
|
11838
|
-
payload["sessionId"] = sessionId;
|
|
11839
|
-
}
|
|
11840
|
-
if (typeof runId !== "undefined") {
|
|
11841
|
-
payload["runId"] = runId;
|
|
11842
|
-
}
|
|
11843
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
11844
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
11845
|
-
}
|
|
11846
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11847
|
-
const apiHeaders = {
|
|
11848
|
-
"content-type": "application/json"
|
|
11849
|
-
};
|
|
11850
|
-
return this.client.call(
|
|
11851
|
-
"post",
|
|
11852
|
-
uri,
|
|
11853
|
-
apiHeaders,
|
|
11854
|
-
payload
|
|
11855
|
-
);
|
|
11856
|
-
}
|
|
11857
|
-
getContextStatus(paramsOrFirst, ...rest) {
|
|
11858
|
-
let params;
|
|
11859
|
-
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst) && ("scope" in paramsOrFirst || "userId" in paramsOrFirst || "agentId" in paramsOrFirst || "sessionId" in paramsOrFirst || "runId" in paramsOrFirst || "memorySubStoreId" in paramsOrFirst)) {
|
|
11860
|
-
params = paramsOrFirst || {};
|
|
11861
|
-
} else {
|
|
11862
|
-
params = {
|
|
11863
|
-
scope: paramsOrFirst,
|
|
11864
|
-
userId: rest[0],
|
|
11865
|
-
agentId: rest[1],
|
|
11866
|
-
sessionId: rest[2],
|
|
11867
|
-
runId: rest[3],
|
|
11868
|
-
memorySubStoreId: rest[4]
|
|
11869
|
-
};
|
|
11870
|
-
}
|
|
11871
|
-
const scope = params.scope;
|
|
11872
|
-
const userId = params.userId;
|
|
11873
|
-
const agentId = params.agentId;
|
|
11874
|
-
const sessionId = params.sessionId;
|
|
11875
|
-
const runId = params.runId;
|
|
11876
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
11877
|
-
const apiPath = "/memory/memories/contexts/status";
|
|
11878
|
-
const payload = {};
|
|
11879
|
-
if (typeof scope !== "undefined") {
|
|
11880
|
-
payload["scope"] = scope;
|
|
11881
|
-
}
|
|
11882
|
-
if (typeof userId !== "undefined") {
|
|
11883
|
-
payload["userId"] = userId;
|
|
11884
|
-
}
|
|
11885
|
-
if (typeof agentId !== "undefined") {
|
|
11886
|
-
payload["agentId"] = agentId;
|
|
11887
|
-
}
|
|
11888
|
-
if (typeof sessionId !== "undefined") {
|
|
11889
|
-
payload["sessionId"] = sessionId;
|
|
11890
|
-
}
|
|
11891
|
-
if (typeof runId !== "undefined") {
|
|
11892
|
-
payload["runId"] = runId;
|
|
11893
|
-
}
|
|
11894
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
11895
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
11896
|
-
}
|
|
11897
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11898
|
-
const apiHeaders = {};
|
|
11899
|
-
return this.client.call(
|
|
11900
|
-
"get",
|
|
11901
|
-
uri,
|
|
11902
|
-
apiHeaders,
|
|
11903
|
-
payload
|
|
11904
|
-
);
|
|
11905
|
-
}
|
|
11906
|
-
getContext(paramsOrFirst, ...rest) {
|
|
11907
|
-
let params;
|
|
11908
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
11909
|
-
params = paramsOrFirst || {};
|
|
11910
|
-
} else {
|
|
11911
|
-
params = {
|
|
11912
|
-
contextId: paramsOrFirst,
|
|
11913
|
-
scope: rest[0],
|
|
11914
|
-
userId: rest[1],
|
|
11915
|
-
agentId: rest[2],
|
|
11916
|
-
sessionId: rest[3],
|
|
11917
|
-
runId: rest[4],
|
|
11918
|
-
memorySubStoreId: rest[5]
|
|
11919
|
-
};
|
|
11920
|
-
}
|
|
11921
|
-
const contextId = params.contextId;
|
|
11922
|
-
const scope = params.scope;
|
|
11923
|
-
const userId = params.userId;
|
|
11924
|
-
const agentId = params.agentId;
|
|
11925
|
-
const sessionId = params.sessionId;
|
|
11926
|
-
const runId = params.runId;
|
|
11927
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
11928
|
-
if (typeof contextId === "undefined") {
|
|
11929
|
-
throw new AppBaseException('Missing required parameter: "contextId"');
|
|
11930
|
-
}
|
|
11931
|
-
const apiPath = "/memory/memories/contexts/{contextId}".replace("{contextId}", contextId);
|
|
11932
|
-
const payload = {};
|
|
11933
|
-
if (typeof scope !== "undefined") {
|
|
11934
|
-
payload["scope"] = scope;
|
|
11935
|
-
}
|
|
11936
|
-
if (typeof userId !== "undefined") {
|
|
11937
|
-
payload["userId"] = userId;
|
|
11938
|
-
}
|
|
11939
|
-
if (typeof agentId !== "undefined") {
|
|
11940
|
-
payload["agentId"] = agentId;
|
|
11941
|
-
}
|
|
11942
|
-
if (typeof sessionId !== "undefined") {
|
|
11943
|
-
payload["sessionId"] = sessionId;
|
|
11944
|
-
}
|
|
11945
|
-
if (typeof runId !== "undefined") {
|
|
11946
|
-
payload["runId"] = runId;
|
|
11947
|
-
}
|
|
11948
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
11949
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
11950
|
-
}
|
|
11951
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11952
|
-
const apiHeaders = {};
|
|
11953
|
-
return this.client.call(
|
|
11954
|
-
"get",
|
|
11955
|
-
uri,
|
|
11956
|
-
apiHeaders,
|
|
11957
|
-
payload
|
|
11958
|
-
);
|
|
11959
|
-
}
|
|
11960
|
-
confirmContext(paramsOrFirst, ...rest) {
|
|
11961
|
-
let params;
|
|
11962
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
11963
|
-
params = paramsOrFirst || {};
|
|
11964
|
-
} else {
|
|
11965
|
-
params = {
|
|
11966
|
-
contextId: paramsOrFirst,
|
|
11967
|
-
expectedVersion: rest[0],
|
|
11968
|
-
reason: rest[1],
|
|
11969
|
-
scope: rest[2],
|
|
11970
|
-
userId: rest[3],
|
|
11971
|
-
agentId: rest[4],
|
|
11972
|
-
sessionId: rest[5],
|
|
11973
|
-
runId: rest[6],
|
|
11974
|
-
memorySubStoreId: rest[7]
|
|
11975
|
-
};
|
|
11976
|
-
}
|
|
11977
|
-
const contextId = params.contextId;
|
|
11978
|
-
const expectedVersion = params.expectedVersion;
|
|
11979
|
-
const reason = params.reason;
|
|
11980
|
-
const scope = params.scope;
|
|
11981
|
-
const userId = params.userId;
|
|
11982
|
-
const agentId = params.agentId;
|
|
11983
|
-
const sessionId = params.sessionId;
|
|
11984
|
-
const runId = params.runId;
|
|
11985
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
11986
|
-
if (typeof contextId === "undefined") {
|
|
11987
|
-
throw new AppBaseException('Missing required parameter: "contextId"');
|
|
11988
|
-
}
|
|
11989
|
-
if (typeof expectedVersion === "undefined") {
|
|
11990
|
-
throw new AppBaseException('Missing required parameter: "expectedVersion"');
|
|
11991
|
-
}
|
|
11992
|
-
if (typeof reason === "undefined") {
|
|
11993
|
-
throw new AppBaseException('Missing required parameter: "reason"');
|
|
11994
|
-
}
|
|
11995
|
-
const apiPath = "/memory/memories/contexts/{contextId}/confirm".replace("{contextId}", contextId);
|
|
11996
|
-
const payload = {};
|
|
11997
|
-
if (typeof scope !== "undefined") {
|
|
11998
|
-
payload["scope"] = scope;
|
|
11999
|
-
}
|
|
12000
|
-
if (typeof userId !== "undefined") {
|
|
12001
|
-
payload["userId"] = userId;
|
|
12002
|
-
}
|
|
12003
|
-
if (typeof agentId !== "undefined") {
|
|
12004
|
-
payload["agentId"] = agentId;
|
|
12005
|
-
}
|
|
12006
|
-
if (typeof sessionId !== "undefined") {
|
|
12007
|
-
payload["sessionId"] = sessionId;
|
|
12008
|
-
}
|
|
12009
|
-
if (typeof runId !== "undefined") {
|
|
12010
|
-
payload["runId"] = runId;
|
|
12011
|
-
}
|
|
12012
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
12013
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
12014
|
-
}
|
|
12015
|
-
if (typeof expectedVersion !== "undefined") {
|
|
12016
|
-
payload["expectedVersion"] = expectedVersion;
|
|
12017
|
-
}
|
|
12018
|
-
if (typeof reason !== "undefined") {
|
|
12019
|
-
payload["reason"] = reason;
|
|
12020
|
-
}
|
|
12021
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12022
|
-
const apiHeaders = {
|
|
12023
|
-
"content-type": "application/json"
|
|
12024
|
-
};
|
|
12025
|
-
return this.client.call(
|
|
12026
|
-
"post",
|
|
12027
|
-
uri,
|
|
12028
|
-
apiHeaders,
|
|
12029
|
-
payload
|
|
12030
|
-
);
|
|
12031
|
-
}
|
|
12032
|
-
rebuildContext(paramsOrFirst, ...rest) {
|
|
12033
|
-
let params;
|
|
12034
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
12035
|
-
params = paramsOrFirst || {};
|
|
12036
|
-
} else {
|
|
12037
|
-
params = {
|
|
12038
|
-
contextId: paramsOrFirst,
|
|
12039
|
-
reason: rest[0],
|
|
12040
|
-
scope: rest[1],
|
|
12041
|
-
userId: rest[2],
|
|
12042
|
-
agentId: rest[3],
|
|
12043
|
-
sessionId: rest[4],
|
|
12044
|
-
runId: rest[5],
|
|
12045
|
-
memorySubStoreId: rest[6]
|
|
12046
|
-
};
|
|
12047
|
-
}
|
|
12048
|
-
const contextId = params.contextId;
|
|
12049
|
-
const reason = params.reason;
|
|
12050
|
-
const scope = params.scope;
|
|
12051
|
-
const userId = params.userId;
|
|
12052
|
-
const agentId = params.agentId;
|
|
12053
|
-
const sessionId = params.sessionId;
|
|
12054
|
-
const runId = params.runId;
|
|
12055
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
12056
|
-
if (typeof contextId === "undefined") {
|
|
12057
|
-
throw new AppBaseException('Missing required parameter: "contextId"');
|
|
12058
|
-
}
|
|
12059
|
-
if (typeof reason === "undefined") {
|
|
12060
|
-
throw new AppBaseException('Missing required parameter: "reason"');
|
|
12061
|
-
}
|
|
12062
|
-
const apiPath = "/memory/memories/contexts/{contextId}/rebuild".replace("{contextId}", contextId);
|
|
12063
|
-
const payload = {};
|
|
12064
|
-
if (typeof scope !== "undefined") {
|
|
12065
|
-
payload["scope"] = scope;
|
|
12066
|
-
}
|
|
12067
|
-
if (typeof userId !== "undefined") {
|
|
12068
|
-
payload["userId"] = userId;
|
|
12069
|
-
}
|
|
12070
|
-
if (typeof agentId !== "undefined") {
|
|
12071
|
-
payload["agentId"] = agentId;
|
|
12072
|
-
}
|
|
12073
|
-
if (typeof sessionId !== "undefined") {
|
|
12074
|
-
payload["sessionId"] = sessionId;
|
|
12075
|
-
}
|
|
12076
|
-
if (typeof runId !== "undefined") {
|
|
12077
|
-
payload["runId"] = runId;
|
|
12078
|
-
}
|
|
12079
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
12080
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
12081
|
-
}
|
|
12082
|
-
if (typeof reason !== "undefined") {
|
|
12083
|
-
payload["reason"] = reason;
|
|
12084
|
-
}
|
|
12085
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12086
|
-
const apiHeaders = {
|
|
12087
|
-
"content-type": "application/json"
|
|
12088
|
-
};
|
|
12089
|
-
return this.client.call(
|
|
12090
|
-
"post",
|
|
12091
|
-
uri,
|
|
12092
|
-
apiHeaders,
|
|
12093
|
-
payload
|
|
12094
|
-
);
|
|
12095
|
-
}
|
|
12096
|
-
rollbackContext(paramsOrFirst, ...rest) {
|
|
12097
|
-
let params;
|
|
12098
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
12099
|
-
params = paramsOrFirst || {};
|
|
12100
|
-
} else {
|
|
12101
|
-
params = {
|
|
12102
|
-
contextId: paramsOrFirst,
|
|
12103
|
-
expectedVersion: rest[0],
|
|
12104
|
-
targetRevision: rest[1],
|
|
12105
|
-
reason: rest[2],
|
|
12106
|
-
scope: rest[3],
|
|
12107
|
-
userId: rest[4],
|
|
12108
|
-
agentId: rest[5],
|
|
12109
|
-
sessionId: rest[6],
|
|
12110
|
-
runId: rest[7],
|
|
12111
|
-
memorySubStoreId: rest[8]
|
|
12112
|
-
};
|
|
12113
|
-
}
|
|
12114
|
-
const contextId = params.contextId;
|
|
12115
|
-
const expectedVersion = params.expectedVersion;
|
|
12116
|
-
const targetRevision = params.targetRevision;
|
|
12117
|
-
const reason = params.reason;
|
|
12118
|
-
const scope = params.scope;
|
|
12119
|
-
const userId = params.userId;
|
|
12120
|
-
const agentId = params.agentId;
|
|
12121
|
-
const sessionId = params.sessionId;
|
|
12122
|
-
const runId = params.runId;
|
|
12123
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
12124
|
-
if (typeof contextId === "undefined") {
|
|
12125
|
-
throw new AppBaseException('Missing required parameter: "contextId"');
|
|
12126
|
-
}
|
|
12127
|
-
if (typeof expectedVersion === "undefined") {
|
|
12128
|
-
throw new AppBaseException('Missing required parameter: "expectedVersion"');
|
|
12129
|
-
}
|
|
12130
|
-
if (typeof targetRevision === "undefined") {
|
|
12131
|
-
throw new AppBaseException('Missing required parameter: "targetRevision"');
|
|
12132
|
-
}
|
|
12133
|
-
if (typeof reason === "undefined") {
|
|
12134
|
-
throw new AppBaseException('Missing required parameter: "reason"');
|
|
12135
|
-
}
|
|
12136
|
-
const apiPath = "/memory/memories/contexts/{contextId}/rollback".replace("{contextId}", contextId);
|
|
12137
|
-
const payload = {};
|
|
12138
|
-
if (typeof scope !== "undefined") {
|
|
12139
|
-
payload["scope"] = scope;
|
|
12140
|
-
}
|
|
12141
|
-
if (typeof userId !== "undefined") {
|
|
12142
|
-
payload["userId"] = userId;
|
|
12143
|
-
}
|
|
12144
|
-
if (typeof agentId !== "undefined") {
|
|
12145
|
-
payload["agentId"] = agentId;
|
|
12146
|
-
}
|
|
12147
|
-
if (typeof sessionId !== "undefined") {
|
|
12148
|
-
payload["sessionId"] = sessionId;
|
|
12149
|
-
}
|
|
12150
|
-
if (typeof runId !== "undefined") {
|
|
12151
|
-
payload["runId"] = runId;
|
|
12152
|
-
}
|
|
12153
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
12154
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
12155
|
-
}
|
|
12156
|
-
if (typeof expectedVersion !== "undefined") {
|
|
12157
|
-
payload["expectedVersion"] = expectedVersion;
|
|
12158
|
-
}
|
|
12159
|
-
if (typeof targetRevision !== "undefined") {
|
|
12160
|
-
payload["targetRevision"] = targetRevision;
|
|
12161
|
-
}
|
|
12162
|
-
if (typeof reason !== "undefined") {
|
|
12163
|
-
payload["reason"] = reason;
|
|
12164
|
-
}
|
|
12165
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12166
|
-
const apiHeaders = {
|
|
12167
|
-
"content-type": "application/json"
|
|
12168
|
-
};
|
|
12169
|
-
return this.client.call(
|
|
12170
|
-
"post",
|
|
12171
|
-
uri,
|
|
12172
|
-
apiHeaders,
|
|
12173
|
-
payload
|
|
12174
|
-
);
|
|
12175
|
-
}
|
|
12176
|
-
listDistillations(paramsOrFirst, ...rest) {
|
|
12177
|
-
let params;
|
|
12178
|
-
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst) && ("scope" in paramsOrFirst || "userId" in paramsOrFirst || "agentId" in paramsOrFirst || "sessionId" in paramsOrFirst || "runId" in paramsOrFirst || "memorySubStoreId" in paramsOrFirst || "status" in paramsOrFirst || "cursor" in paramsOrFirst || "limit" in paramsOrFirst)) {
|
|
12179
|
-
params = paramsOrFirst || {};
|
|
12180
|
-
} else {
|
|
12181
|
-
params = {
|
|
12182
|
-
scope: paramsOrFirst,
|
|
12183
|
-
userId: rest[0],
|
|
12184
|
-
agentId: rest[1],
|
|
12185
|
-
sessionId: rest[2],
|
|
12186
|
-
runId: rest[3],
|
|
12187
|
-
memorySubStoreId: rest[4],
|
|
12188
|
-
status: rest[5],
|
|
12189
|
-
cursor: rest[6],
|
|
12190
|
-
limit: rest[7]
|
|
12191
|
-
};
|
|
12192
|
-
}
|
|
12193
|
-
const scope = params.scope;
|
|
12194
|
-
const userId = params.userId;
|
|
12195
|
-
const agentId = params.agentId;
|
|
12196
|
-
const sessionId = params.sessionId;
|
|
12197
|
-
const runId = params.runId;
|
|
12198
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
12199
|
-
const status = params.status;
|
|
12200
|
-
const cursor = params.cursor;
|
|
12201
|
-
const limit = params.limit;
|
|
12202
|
-
const apiPath = "/memory/memories/distillations";
|
|
12203
|
-
const payload = {};
|
|
12204
|
-
if (typeof scope !== "undefined") {
|
|
12205
|
-
payload["scope"] = scope;
|
|
12206
|
-
}
|
|
12207
|
-
if (typeof userId !== "undefined") {
|
|
12208
|
-
payload["userId"] = userId;
|
|
12209
|
-
}
|
|
12210
|
-
if (typeof agentId !== "undefined") {
|
|
12211
|
-
payload["agentId"] = agentId;
|
|
12212
|
-
}
|
|
12213
|
-
if (typeof sessionId !== "undefined") {
|
|
12214
|
-
payload["sessionId"] = sessionId;
|
|
12215
|
-
}
|
|
12216
|
-
if (typeof runId !== "undefined") {
|
|
12217
|
-
payload["runId"] = runId;
|
|
12218
|
-
}
|
|
12219
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
12220
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
12221
|
-
}
|
|
12222
|
-
if (typeof status !== "undefined") {
|
|
12223
|
-
payload["status"] = status;
|
|
12224
|
-
}
|
|
12225
|
-
if (typeof cursor !== "undefined") {
|
|
12226
|
-
payload["cursor"] = cursor;
|
|
12227
|
-
}
|
|
12228
|
-
if (typeof limit !== "undefined") {
|
|
12229
|
-
payload["limit"] = limit;
|
|
12230
|
-
}
|
|
12231
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12232
|
-
const apiHeaders = {};
|
|
12233
|
-
return this.client.call(
|
|
12234
|
-
"get",
|
|
12235
|
-
uri,
|
|
12236
|
-
apiHeaders,
|
|
12237
|
-
payload
|
|
12238
|
-
);
|
|
12239
|
-
}
|
|
12240
|
-
submitDistillation(paramsOrFirst, ...rest) {
|
|
12241
|
-
let params;
|
|
12242
|
-
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst) && ("scope" in paramsOrFirst || "userId" in paramsOrFirst || "agentId" in paramsOrFirst || "sessionId" in paramsOrFirst || "runId" in paramsOrFirst || "memorySubStoreId" in paramsOrFirst || "sourceId" in paramsOrFirst || "sourceType" in paramsOrFirst || "messages" in paramsOrFirst || "toolEvents" in paramsOrFirst || "mode" in paramsOrFirst || "idempotencyKey" in paramsOrFirst)) {
|
|
12243
|
-
params = paramsOrFirst || {};
|
|
12244
|
-
} else {
|
|
12245
|
-
params = {
|
|
12246
|
-
scope: paramsOrFirst,
|
|
12247
|
-
userId: rest[0],
|
|
12248
|
-
agentId: rest[1],
|
|
12249
|
-
sessionId: rest[2],
|
|
12250
|
-
runId: rest[3],
|
|
12251
|
-
memorySubStoreId: rest[4],
|
|
12252
|
-
sourceId: rest[5],
|
|
12253
|
-
sourceType: rest[6],
|
|
12254
|
-
messages: rest[7],
|
|
12255
|
-
toolEvents: rest[8],
|
|
12256
|
-
mode: rest[9],
|
|
12257
|
-
idempotencyKey: rest[10]
|
|
12258
|
-
};
|
|
12259
|
-
}
|
|
12260
|
-
const scope = params.scope;
|
|
12261
|
-
const userId = params.userId;
|
|
12262
|
-
const agentId = params.agentId;
|
|
12263
|
-
const sessionId = params.sessionId;
|
|
12264
|
-
const runId = params.runId;
|
|
12265
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
12266
|
-
const sourceId = params.sourceId;
|
|
12267
|
-
const sourceType = params.sourceType;
|
|
12268
|
-
const messages = params.messages;
|
|
12269
|
-
const toolEvents = params.toolEvents;
|
|
12270
|
-
const mode = params.mode;
|
|
12271
|
-
const idempotencyKey = params.idempotencyKey;
|
|
12272
|
-
const apiPath = "/memory/memories/distillations";
|
|
12273
|
-
const payload = {};
|
|
12274
|
-
if (typeof scope !== "undefined") {
|
|
12275
|
-
payload["scope"] = scope;
|
|
12276
|
-
}
|
|
12277
|
-
if (typeof userId !== "undefined") {
|
|
12278
|
-
payload["userId"] = userId;
|
|
12279
|
-
}
|
|
12280
|
-
if (typeof agentId !== "undefined") {
|
|
12281
|
-
payload["agentId"] = agentId;
|
|
12282
|
-
}
|
|
12283
|
-
if (typeof sessionId !== "undefined") {
|
|
12284
|
-
payload["sessionId"] = sessionId;
|
|
12285
|
-
}
|
|
12286
|
-
if (typeof runId !== "undefined") {
|
|
12287
|
-
payload["runId"] = runId;
|
|
12288
|
-
}
|
|
12289
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
12290
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
12291
|
-
}
|
|
12292
|
-
if (typeof sourceId !== "undefined") {
|
|
12293
|
-
payload["sourceId"] = sourceId;
|
|
12294
|
-
}
|
|
12295
|
-
if (typeof sourceType !== "undefined") {
|
|
12296
|
-
payload["sourceType"] = sourceType;
|
|
12297
|
-
}
|
|
12298
|
-
if (typeof messages !== "undefined") {
|
|
12299
|
-
payload["messages"] = messages;
|
|
12300
|
-
}
|
|
12301
|
-
if (typeof toolEvents !== "undefined") {
|
|
12302
|
-
payload["toolEvents"] = toolEvents;
|
|
12303
|
-
}
|
|
12304
|
-
if (typeof mode !== "undefined") {
|
|
12305
|
-
payload["mode"] = mode;
|
|
12306
|
-
}
|
|
12307
|
-
if (typeof idempotencyKey !== "undefined") {
|
|
12308
|
-
payload["idempotencyKey"] = idempotencyKey;
|
|
12309
|
-
}
|
|
12310
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12311
|
-
const apiHeaders = {
|
|
12312
|
-
"content-type": "application/json"
|
|
12313
|
-
};
|
|
12314
|
-
return this.client.call(
|
|
12315
|
-
"post",
|
|
12316
|
-
uri,
|
|
12317
|
-
apiHeaders,
|
|
12318
|
-
payload
|
|
12319
|
-
);
|
|
12320
|
-
}
|
|
12321
|
-
getDistillation(paramsOrFirst, ...rest) {
|
|
12322
|
-
let params;
|
|
12323
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
12324
|
-
params = paramsOrFirst || {};
|
|
12325
|
-
} else {
|
|
12326
|
-
params = {
|
|
12327
|
-
distillationId: paramsOrFirst,
|
|
12328
|
-
scope: rest[0],
|
|
12329
|
-
userId: rest[1],
|
|
12330
|
-
agentId: rest[2],
|
|
12331
|
-
sessionId: rest[3],
|
|
12332
|
-
runId: rest[4],
|
|
12333
|
-
memorySubStoreId: rest[5]
|
|
12334
|
-
};
|
|
12335
|
-
}
|
|
12336
|
-
const distillationId = params.distillationId;
|
|
12337
|
-
const scope = params.scope;
|
|
12338
|
-
const userId = params.userId;
|
|
12339
|
-
const agentId = params.agentId;
|
|
12340
|
-
const sessionId = params.sessionId;
|
|
12341
|
-
const runId = params.runId;
|
|
12342
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
12343
|
-
if (typeof distillationId === "undefined") {
|
|
12344
|
-
throw new AppBaseException('Missing required parameter: "distillationId"');
|
|
12345
|
-
}
|
|
12346
|
-
const apiPath = "/memory/memories/distillations/{distillationId}".replace("{distillationId}", distillationId);
|
|
12347
|
-
const payload = {};
|
|
12348
|
-
if (typeof scope !== "undefined") {
|
|
12349
|
-
payload["scope"] = scope;
|
|
12350
|
-
}
|
|
12351
|
-
if (typeof userId !== "undefined") {
|
|
12352
|
-
payload["userId"] = userId;
|
|
12353
|
-
}
|
|
12354
|
-
if (typeof agentId !== "undefined") {
|
|
12355
|
-
payload["agentId"] = agentId;
|
|
12356
|
-
}
|
|
12357
|
-
if (typeof sessionId !== "undefined") {
|
|
12358
|
-
payload["sessionId"] = sessionId;
|
|
12359
|
-
}
|
|
12360
|
-
if (typeof runId !== "undefined") {
|
|
12361
|
-
payload["runId"] = runId;
|
|
12362
|
-
}
|
|
12363
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
12364
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
12365
|
-
}
|
|
12366
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12367
|
-
const apiHeaders = {};
|
|
12368
|
-
return this.client.call(
|
|
12369
|
-
"get",
|
|
12370
|
-
uri,
|
|
12371
|
-
apiHeaders,
|
|
12372
|
-
payload
|
|
12373
|
-
);
|
|
12374
|
-
}
|
|
12375
|
-
replayDistillation(paramsOrFirst, ...rest) {
|
|
12376
|
-
let params;
|
|
12377
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
12378
|
-
params = paramsOrFirst || {};
|
|
12379
|
-
} else {
|
|
12380
|
-
params = {
|
|
12381
|
-
distillationId: paramsOrFirst,
|
|
12382
|
-
scope: rest[0],
|
|
12383
|
-
userId: rest[1],
|
|
12384
|
-
agentId: rest[2],
|
|
12385
|
-
sessionId: rest[3],
|
|
12386
|
-
runId: rest[4],
|
|
12387
|
-
memorySubStoreId: rest[5]
|
|
12388
|
-
};
|
|
12389
|
-
}
|
|
12390
|
-
const distillationId = params.distillationId;
|
|
12391
|
-
const scope = params.scope;
|
|
12392
|
-
const userId = params.userId;
|
|
12393
|
-
const agentId = params.agentId;
|
|
12394
|
-
const sessionId = params.sessionId;
|
|
12395
|
-
const runId = params.runId;
|
|
12396
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
12397
|
-
if (typeof distillationId === "undefined") {
|
|
12398
|
-
throw new AppBaseException('Missing required parameter: "distillationId"');
|
|
12399
|
-
}
|
|
12400
|
-
const apiPath = "/memory/memories/distillations/{distillationId}/replay".replace("{distillationId}", distillationId);
|
|
12401
|
-
const payload = {};
|
|
12402
|
-
if (typeof scope !== "undefined") {
|
|
12403
|
-
payload["scope"] = scope;
|
|
12404
|
-
}
|
|
12405
|
-
if (typeof userId !== "undefined") {
|
|
12406
|
-
payload["userId"] = userId;
|
|
12407
|
-
}
|
|
12408
|
-
if (typeof agentId !== "undefined") {
|
|
12409
|
-
payload["agentId"] = agentId;
|
|
12410
|
-
}
|
|
12411
|
-
if (typeof sessionId !== "undefined") {
|
|
12412
|
-
payload["sessionId"] = sessionId;
|
|
12413
|
-
}
|
|
12414
|
-
if (typeof runId !== "undefined") {
|
|
12415
|
-
payload["runId"] = runId;
|
|
12416
|
-
}
|
|
12417
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
12418
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
12419
|
-
}
|
|
12420
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12421
|
-
const apiHeaders = {
|
|
12422
|
-
"content-type": "application/json"
|
|
12423
|
-
};
|
|
12424
|
-
return this.client.call(
|
|
12425
|
-
"post",
|
|
12426
|
-
uri,
|
|
12427
|
-
apiHeaders,
|
|
12428
|
-
payload
|
|
12429
|
-
);
|
|
12430
|
-
}
|
|
12431
|
-
listExperiences(paramsOrFirst, ...rest) {
|
|
12432
|
-
let params;
|
|
12433
|
-
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst) && ("scope" in paramsOrFirst || "userId" in paramsOrFirst || "agentId" in paramsOrFirst || "sessionId" in paramsOrFirst || "runId" in paramsOrFirst || "memorySubStoreId" in paramsOrFirst || "cursor" in paramsOrFirst || "limit" in paramsOrFirst)) {
|
|
12434
|
-
params = paramsOrFirst || {};
|
|
12435
|
-
} else {
|
|
12436
|
-
params = {
|
|
12437
|
-
scope: paramsOrFirst,
|
|
12438
|
-
userId: rest[0],
|
|
12439
|
-
agentId: rest[1],
|
|
12440
|
-
sessionId: rest[2],
|
|
12441
|
-
runId: rest[3],
|
|
12442
|
-
memorySubStoreId: rest[4],
|
|
12443
|
-
cursor: rest[5],
|
|
12444
|
-
limit: rest[6]
|
|
12445
|
-
};
|
|
12446
|
-
}
|
|
12447
|
-
const scope = params.scope;
|
|
12448
|
-
const userId = params.userId;
|
|
12449
|
-
const agentId = params.agentId;
|
|
12450
|
-
const sessionId = params.sessionId;
|
|
12451
|
-
const runId = params.runId;
|
|
12452
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
12453
|
-
const cursor = params.cursor;
|
|
12454
|
-
const limit = params.limit;
|
|
12455
|
-
const apiPath = "/memory/memories/experiences";
|
|
12456
|
-
const payload = {};
|
|
12457
|
-
if (typeof scope !== "undefined") {
|
|
12458
|
-
payload["scope"] = scope;
|
|
12459
|
-
}
|
|
12460
|
-
if (typeof userId !== "undefined") {
|
|
12461
|
-
payload["userId"] = userId;
|
|
12462
|
-
}
|
|
12463
|
-
if (typeof agentId !== "undefined") {
|
|
12464
|
-
payload["agentId"] = agentId;
|
|
12465
|
-
}
|
|
12466
|
-
if (typeof sessionId !== "undefined") {
|
|
12467
|
-
payload["sessionId"] = sessionId;
|
|
12468
|
-
}
|
|
12469
|
-
if (typeof runId !== "undefined") {
|
|
12470
|
-
payload["runId"] = runId;
|
|
12471
|
-
}
|
|
12472
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
12473
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
12474
|
-
}
|
|
12475
|
-
if (typeof cursor !== "undefined") {
|
|
12476
|
-
payload["cursor"] = cursor;
|
|
12477
|
-
}
|
|
12478
|
-
if (typeof limit !== "undefined") {
|
|
12479
|
-
payload["limit"] = limit;
|
|
12480
|
-
}
|
|
12481
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12482
|
-
const apiHeaders = {};
|
|
12483
|
-
return this.client.call(
|
|
12484
|
-
"get",
|
|
12485
|
-
uri,
|
|
12486
|
-
apiHeaders,
|
|
12487
|
-
payload
|
|
12488
|
-
);
|
|
12489
|
-
}
|
|
12490
|
-
searchExperiences(paramsOrFirst, ...rest) {
|
|
12491
|
-
let params;
|
|
12492
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
12493
|
-
params = paramsOrFirst || {};
|
|
12494
|
-
} else {
|
|
12495
|
-
params = {
|
|
12496
|
-
query: paramsOrFirst,
|
|
12497
|
-
scope: rest[0],
|
|
12498
|
-
userId: rest[1],
|
|
12499
|
-
agentId: rest[2],
|
|
12500
|
-
sessionId: rest[3],
|
|
12501
|
-
runId: rest[4],
|
|
12502
|
-
memorySubStoreId: rest[5],
|
|
12503
|
-
cursor: rest[6],
|
|
12504
|
-
limit: rest[7],
|
|
12505
|
-
retrieval: rest[8]
|
|
12506
|
-
};
|
|
12507
|
-
}
|
|
12508
|
-
const query = params.query;
|
|
12509
|
-
const scope = params.scope;
|
|
12510
|
-
const userId = params.userId;
|
|
12511
|
-
const agentId = params.agentId;
|
|
12512
|
-
const sessionId = params.sessionId;
|
|
12513
|
-
const runId = params.runId;
|
|
12514
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
12515
|
-
const cursor = params.cursor;
|
|
12516
|
-
const limit = params.limit;
|
|
12517
|
-
const retrieval = params.retrieval;
|
|
12518
|
-
if (typeof query === "undefined") {
|
|
12519
|
-
throw new AppBaseException('Missing required parameter: "query"');
|
|
12520
|
-
}
|
|
12521
|
-
const apiPath = "/memory/memories/experiences/search";
|
|
12522
|
-
const payload = {};
|
|
12523
|
-
if (typeof scope !== "undefined") {
|
|
12524
|
-
payload["scope"] = scope;
|
|
12525
|
-
}
|
|
12526
|
-
if (typeof userId !== "undefined") {
|
|
12527
|
-
payload["userId"] = userId;
|
|
12528
|
-
}
|
|
12529
|
-
if (typeof agentId !== "undefined") {
|
|
12530
|
-
payload["agentId"] = agentId;
|
|
12531
|
-
}
|
|
12532
|
-
if (typeof sessionId !== "undefined") {
|
|
12533
|
-
payload["sessionId"] = sessionId;
|
|
12534
|
-
}
|
|
12535
|
-
if (typeof runId !== "undefined") {
|
|
12536
|
-
payload["runId"] = runId;
|
|
12537
|
-
}
|
|
12538
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
12539
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
12540
|
-
}
|
|
12541
|
-
if (typeof query !== "undefined") {
|
|
12542
|
-
payload["query"] = query;
|
|
12543
|
-
}
|
|
12544
|
-
if (typeof cursor !== "undefined") {
|
|
12545
|
-
payload["cursor"] = cursor;
|
|
12546
|
-
}
|
|
12547
|
-
if (typeof limit !== "undefined") {
|
|
12548
|
-
payload["limit"] = limit;
|
|
12549
|
-
}
|
|
12550
|
-
if (typeof retrieval !== "undefined") {
|
|
12551
|
-
payload["retrieval"] = retrieval;
|
|
12552
|
-
}
|
|
12553
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12554
|
-
const apiHeaders = {
|
|
12555
|
-
"content-type": "application/json"
|
|
12556
|
-
};
|
|
12557
|
-
return this.client.call(
|
|
12558
|
-
"post",
|
|
12559
|
-
uri,
|
|
12560
|
-
apiHeaders,
|
|
12561
|
-
payload
|
|
12562
|
-
);
|
|
12563
|
-
}
|
|
12564
|
-
getExperience(paramsOrFirst, ...rest) {
|
|
12565
|
-
let params;
|
|
12566
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
12567
|
-
params = paramsOrFirst || {};
|
|
12568
|
-
} else {
|
|
12569
|
-
params = {
|
|
12570
|
-
knowledgeId: paramsOrFirst,
|
|
12571
|
-
scope: rest[0],
|
|
12572
|
-
userId: rest[1],
|
|
12573
|
-
agentId: rest[2],
|
|
12574
|
-
sessionId: rest[3],
|
|
12575
|
-
runId: rest[4],
|
|
12576
|
-
memorySubStoreId: rest[5]
|
|
12577
|
-
};
|
|
12578
|
-
}
|
|
12579
|
-
const knowledgeId = params.knowledgeId;
|
|
12580
|
-
const scope = params.scope;
|
|
12581
|
-
const userId = params.userId;
|
|
12582
|
-
const agentId = params.agentId;
|
|
12583
|
-
const sessionId = params.sessionId;
|
|
12584
|
-
const runId = params.runId;
|
|
12585
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
12586
|
-
if (typeof knowledgeId === "undefined") {
|
|
12587
|
-
throw new AppBaseException('Missing required parameter: "knowledgeId"');
|
|
12588
|
-
}
|
|
12589
|
-
const apiPath = "/memory/memories/experiences/{knowledgeId}".replace("{knowledgeId}", knowledgeId);
|
|
12590
|
-
const payload = {};
|
|
12591
|
-
if (typeof scope !== "undefined") {
|
|
12592
|
-
payload["scope"] = scope;
|
|
12593
|
-
}
|
|
12594
|
-
if (typeof userId !== "undefined") {
|
|
12595
|
-
payload["userId"] = userId;
|
|
12596
|
-
}
|
|
12597
|
-
if (typeof agentId !== "undefined") {
|
|
12598
|
-
payload["agentId"] = agentId;
|
|
12599
|
-
}
|
|
12600
|
-
if (typeof sessionId !== "undefined") {
|
|
12601
|
-
payload["sessionId"] = sessionId;
|
|
12602
|
-
}
|
|
12603
|
-
if (typeof runId !== "undefined") {
|
|
12604
|
-
payload["runId"] = runId;
|
|
12605
|
-
}
|
|
12606
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
12607
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
12608
|
-
}
|
|
12609
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12610
|
-
const apiHeaders = {};
|
|
12611
|
-
return this.client.call(
|
|
12612
|
-
"get",
|
|
12613
|
-
uri,
|
|
12614
|
-
apiHeaders,
|
|
12615
|
-
payload
|
|
12616
|
-
);
|
|
12617
|
-
}
|
|
12618
|
-
listExperienceSources(paramsOrFirst, ...rest) {
|
|
12619
|
-
let params;
|
|
12620
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
12621
|
-
params = paramsOrFirst || {};
|
|
12622
|
-
} else {
|
|
12623
|
-
params = {
|
|
12624
|
-
knowledgeId: paramsOrFirst,
|
|
12625
|
-
scope: rest[0],
|
|
12626
|
-
userId: rest[1],
|
|
12627
|
-
agentId: rest[2],
|
|
12628
|
-
sessionId: rest[3],
|
|
12629
|
-
runId: rest[4],
|
|
12630
|
-
memorySubStoreId: rest[5],
|
|
12631
|
-
cursor: rest[6],
|
|
12632
|
-
limit: rest[7]
|
|
12633
|
-
};
|
|
12634
|
-
}
|
|
12635
|
-
const knowledgeId = params.knowledgeId;
|
|
12636
|
-
const scope = params.scope;
|
|
12637
|
-
const userId = params.userId;
|
|
12638
|
-
const agentId = params.agentId;
|
|
12639
|
-
const sessionId = params.sessionId;
|
|
12640
|
-
const runId = params.runId;
|
|
12641
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
12642
|
-
const cursor = params.cursor;
|
|
12643
|
-
const limit = params.limit;
|
|
12644
|
-
if (typeof knowledgeId === "undefined") {
|
|
12645
|
-
throw new AppBaseException('Missing required parameter: "knowledgeId"');
|
|
12646
|
-
}
|
|
12647
|
-
const apiPath = "/memory/memories/experiences/{knowledgeId}/sources".replace("{knowledgeId}", knowledgeId);
|
|
12648
|
-
const payload = {};
|
|
12649
|
-
if (typeof scope !== "undefined") {
|
|
12650
|
-
payload["scope"] = scope;
|
|
12651
|
-
}
|
|
12652
|
-
if (typeof userId !== "undefined") {
|
|
12653
|
-
payload["userId"] = userId;
|
|
12654
|
-
}
|
|
12655
|
-
if (typeof agentId !== "undefined") {
|
|
12656
|
-
payload["agentId"] = agentId;
|
|
12657
|
-
}
|
|
12658
|
-
if (typeof sessionId !== "undefined") {
|
|
12659
|
-
payload["sessionId"] = sessionId;
|
|
12660
|
-
}
|
|
12661
|
-
if (typeof runId !== "undefined") {
|
|
12662
|
-
payload["runId"] = runId;
|
|
12663
|
-
}
|
|
12664
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
12665
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
12666
|
-
}
|
|
12667
|
-
if (typeof cursor !== "undefined") {
|
|
12668
|
-
payload["cursor"] = cursor;
|
|
12669
|
-
}
|
|
12670
|
-
if (typeof limit !== "undefined") {
|
|
12671
|
-
payload["limit"] = limit;
|
|
12672
|
-
}
|
|
12673
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12674
|
-
const apiHeaders = {};
|
|
12675
|
-
return this.client.call(
|
|
12676
|
-
"get",
|
|
12677
|
-
uri,
|
|
12678
|
-
apiHeaders,
|
|
12679
|
-
payload
|
|
12680
|
-
);
|
|
12681
|
-
}
|
|
12682
|
-
getExport(paramsOrFirst, ...rest) {
|
|
12683
|
-
let params;
|
|
12684
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
12685
|
-
params = paramsOrFirst || {};
|
|
12686
|
-
} else {
|
|
12687
|
-
params = {
|
|
12688
|
-
userId: paramsOrFirst,
|
|
12689
|
-
format: rest[0],
|
|
12690
|
-
mode: rest[1],
|
|
12691
|
-
includeForgotten: rest[2],
|
|
12692
|
-
includeVectors: rest[3],
|
|
12693
|
-
includeRawSources: rest[4]
|
|
12694
|
-
};
|
|
12695
|
-
}
|
|
12696
|
-
const userId = params.userId;
|
|
12697
|
-
const format = params.format;
|
|
12698
|
-
const mode = params.mode;
|
|
12699
|
-
const includeForgotten = params.includeForgotten;
|
|
12700
|
-
const includeVectors = params.includeVectors;
|
|
12701
|
-
const includeRawSources = params.includeRawSources;
|
|
12702
|
-
if (typeof userId === "undefined") {
|
|
12703
|
-
throw new AppBaseException('Missing required parameter: "userId"');
|
|
12704
|
-
}
|
|
12705
|
-
const apiPath = "/memory/memories/export";
|
|
12706
|
-
const payload = {};
|
|
12707
|
-
if (typeof userId !== "undefined") {
|
|
12708
|
-
payload["userId"] = userId;
|
|
12709
|
-
}
|
|
12710
|
-
if (typeof format !== "undefined") {
|
|
12711
|
-
payload["format"] = format;
|
|
12712
|
-
}
|
|
12713
|
-
if (typeof mode !== "undefined") {
|
|
12714
|
-
payload["mode"] = mode;
|
|
12715
|
-
}
|
|
12716
|
-
if (typeof includeForgotten !== "undefined") {
|
|
12717
|
-
payload["includeForgotten"] = includeForgotten;
|
|
12718
|
-
}
|
|
12719
|
-
if (typeof includeVectors !== "undefined") {
|
|
12720
|
-
payload["includeVectors"] = includeVectors;
|
|
12721
|
-
}
|
|
12722
|
-
if (typeof includeRawSources !== "undefined") {
|
|
12723
|
-
payload["includeRawSources"] = includeRawSources;
|
|
12724
|
-
}
|
|
12725
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12726
|
-
const apiHeaders = {};
|
|
12727
|
-
return this.client.call(
|
|
12728
|
-
"get",
|
|
12729
|
-
uri,
|
|
12730
|
-
apiHeaders,
|
|
12731
|
-
payload
|
|
12732
|
-
);
|
|
12733
|
-
}
|
|
12734
|
-
createExport(paramsOrFirst, ...rest) {
|
|
12735
|
-
let params;
|
|
12736
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
12737
|
-
params = paramsOrFirst || {};
|
|
12738
|
-
} else {
|
|
12739
|
-
params = {
|
|
12740
|
-
userId: paramsOrFirst,
|
|
12741
|
-
format: rest[0],
|
|
12742
|
-
includeForgotten: rest[1],
|
|
12743
|
-
includeVectors: rest[2],
|
|
12744
|
-
includeRawSources: rest[3],
|
|
12745
|
-
mode: rest[4]
|
|
12746
|
-
};
|
|
12747
|
-
}
|
|
12748
|
-
const userId = params.userId;
|
|
12749
|
-
const format = params.format;
|
|
12750
|
-
const includeForgotten = params.includeForgotten;
|
|
12751
|
-
const includeVectors = params.includeVectors;
|
|
12752
|
-
const includeRawSources = params.includeRawSources;
|
|
12753
|
-
const mode = params.mode;
|
|
12754
|
-
if (typeof userId === "undefined") {
|
|
12755
|
-
throw new AppBaseException('Missing required parameter: "userId"');
|
|
12756
|
-
}
|
|
12757
|
-
const apiPath = "/memory/memories/exports";
|
|
12758
|
-
const payload = {};
|
|
12759
|
-
if (typeof userId !== "undefined") {
|
|
12760
|
-
payload["userId"] = userId;
|
|
12761
|
-
}
|
|
12762
|
-
if (typeof format !== "undefined") {
|
|
12763
|
-
payload["format"] = format;
|
|
12764
|
-
}
|
|
12765
|
-
if (typeof includeForgotten !== "undefined") {
|
|
12766
|
-
payload["includeForgotten"] = includeForgotten;
|
|
12767
|
-
}
|
|
12768
|
-
if (typeof includeVectors !== "undefined") {
|
|
12769
|
-
payload["includeVectors"] = includeVectors;
|
|
12770
|
-
}
|
|
12771
|
-
if (typeof includeRawSources !== "undefined") {
|
|
12772
|
-
payload["includeRawSources"] = includeRawSources;
|
|
12773
|
-
}
|
|
12774
|
-
if (typeof mode !== "undefined") {
|
|
12775
|
-
payload["mode"] = mode;
|
|
12776
|
-
}
|
|
12777
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12778
|
-
const apiHeaders = {
|
|
12779
|
-
"content-type": "application/json"
|
|
12780
|
-
};
|
|
12781
|
-
return this.client.call(
|
|
12782
|
-
"post",
|
|
12783
|
-
uri,
|
|
12784
|
-
apiHeaders,
|
|
12785
|
-
payload
|
|
12786
|
-
);
|
|
12787
|
-
}
|
|
12788
|
-
getExportJob(paramsOrFirst) {
|
|
12789
|
-
let params;
|
|
12790
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
12791
|
-
params = paramsOrFirst || {};
|
|
12792
|
-
} else {
|
|
12793
|
-
params = {
|
|
12794
|
-
exportId: paramsOrFirst
|
|
12795
|
-
};
|
|
12796
|
-
}
|
|
12797
|
-
const exportId = params.exportId;
|
|
12798
|
-
if (typeof exportId === "undefined") {
|
|
12799
|
-
throw new AppBaseException('Missing required parameter: "exportId"');
|
|
12800
|
-
}
|
|
12801
|
-
const apiPath = "/memory/memories/exports/{exportId}".replace("{exportId}", exportId);
|
|
12802
|
-
const payload = {};
|
|
12803
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12804
|
-
const apiHeaders = {};
|
|
12805
|
-
return this.client.call(
|
|
12806
|
-
"get",
|
|
12807
|
-
uri,
|
|
12808
|
-
apiHeaders,
|
|
12809
|
-
payload
|
|
12810
|
-
);
|
|
12811
|
-
}
|
|
12812
|
-
createKnowledgeFeedback(paramsOrFirst, ...rest) {
|
|
12813
|
-
let params;
|
|
12814
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
12815
|
-
params = paramsOrFirst || {};
|
|
12816
|
-
} else {
|
|
12817
|
-
params = {
|
|
12818
|
-
injectionId: paramsOrFirst,
|
|
12819
|
-
knowledgeId: rest[0],
|
|
12820
|
-
revision: rest[1],
|
|
12821
|
-
feedbackType: rest[2],
|
|
12822
|
-
scope: rest[3],
|
|
12823
|
-
userId: rest[4],
|
|
12824
|
-
agentId: rest[5],
|
|
12825
|
-
sessionId: rest[6],
|
|
12826
|
-
runId: rest[7],
|
|
12827
|
-
memorySubStoreId: rest[8],
|
|
12828
|
-
reasonCode: rest[9],
|
|
12829
|
-
idempotencyKey: rest[10]
|
|
12830
|
-
};
|
|
12831
|
-
}
|
|
12832
|
-
const injectionId = params.injectionId;
|
|
12833
|
-
const knowledgeId = params.knowledgeId;
|
|
12834
|
-
const revision = params.revision;
|
|
12835
|
-
const feedbackType = params.feedbackType;
|
|
12836
|
-
const scope = params.scope;
|
|
12837
|
-
const userId = params.userId;
|
|
12838
|
-
const agentId = params.agentId;
|
|
12839
|
-
const sessionId = params.sessionId;
|
|
12840
|
-
const runId = params.runId;
|
|
12841
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
12842
|
-
const reasonCode = params.reasonCode;
|
|
12843
|
-
const idempotencyKey = params.idempotencyKey;
|
|
12844
|
-
if (typeof injectionId === "undefined") {
|
|
12845
|
-
throw new AppBaseException('Missing required parameter: "injectionId"');
|
|
12846
|
-
}
|
|
12847
|
-
if (typeof knowledgeId === "undefined") {
|
|
12848
|
-
throw new AppBaseException('Missing required parameter: "knowledgeId"');
|
|
12849
|
-
}
|
|
12850
|
-
if (typeof revision === "undefined") {
|
|
12851
|
-
throw new AppBaseException('Missing required parameter: "revision"');
|
|
12852
|
-
}
|
|
12853
|
-
if (typeof feedbackType === "undefined") {
|
|
12854
|
-
throw new AppBaseException('Missing required parameter: "feedbackType"');
|
|
12855
|
-
}
|
|
12856
|
-
const apiPath = "/memory/memories/feedback";
|
|
12857
|
-
const payload = {};
|
|
12858
|
-
if (typeof scope !== "undefined") {
|
|
12859
|
-
payload["scope"] = scope;
|
|
12860
|
-
}
|
|
12861
|
-
if (typeof userId !== "undefined") {
|
|
12862
|
-
payload["userId"] = userId;
|
|
12863
|
-
}
|
|
12864
|
-
if (typeof agentId !== "undefined") {
|
|
12865
|
-
payload["agentId"] = agentId;
|
|
12866
|
-
}
|
|
12867
|
-
if (typeof sessionId !== "undefined") {
|
|
12868
|
-
payload["sessionId"] = sessionId;
|
|
12869
|
-
}
|
|
12870
|
-
if (typeof runId !== "undefined") {
|
|
12871
|
-
payload["runId"] = runId;
|
|
12872
|
-
}
|
|
12873
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
12874
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
12875
|
-
}
|
|
12876
|
-
if (typeof injectionId !== "undefined") {
|
|
12877
|
-
payload["injectionId"] = injectionId;
|
|
12878
|
-
}
|
|
12879
|
-
if (typeof knowledgeId !== "undefined") {
|
|
12880
|
-
payload["knowledgeId"] = knowledgeId;
|
|
12881
|
-
}
|
|
12882
|
-
if (typeof revision !== "undefined") {
|
|
12883
|
-
payload["revision"] = revision;
|
|
12884
|
-
}
|
|
12885
|
-
if (typeof feedbackType !== "undefined") {
|
|
12886
|
-
payload["feedbackType"] = feedbackType;
|
|
12887
|
-
}
|
|
12888
|
-
if (typeof reasonCode !== "undefined") {
|
|
12889
|
-
payload["reasonCode"] = reasonCode;
|
|
12890
|
-
}
|
|
12891
|
-
if (typeof idempotencyKey !== "undefined") {
|
|
12892
|
-
payload["idempotencyKey"] = idempotencyKey;
|
|
12893
|
-
}
|
|
12894
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12895
|
-
const apiHeaders = {
|
|
12896
|
-
"content-type": "application/json"
|
|
12897
|
-
};
|
|
12898
|
-
return this.client.call(
|
|
12899
|
-
"post",
|
|
12900
|
-
uri,
|
|
12901
|
-
apiHeaders,
|
|
12902
|
-
payload
|
|
12903
|
-
);
|
|
12904
|
-
}
|
|
12905
|
-
createImport(paramsOrFirst, ...rest) {
|
|
12906
|
-
let params;
|
|
12907
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
12908
|
-
params = paramsOrFirst || {};
|
|
12909
|
-
} else {
|
|
12910
|
-
params = {
|
|
12911
|
-
userId: paramsOrFirst,
|
|
12912
|
-
format: rest[0],
|
|
12913
|
-
data: rest[1],
|
|
12914
|
-
records: rest[2],
|
|
12915
|
-
dryRun: rest[3]
|
|
12916
|
-
};
|
|
12917
|
-
}
|
|
12918
|
-
const userId = params.userId;
|
|
12919
|
-
const format = params.format;
|
|
12920
|
-
const data = params.data;
|
|
12921
|
-
const records = params.records;
|
|
12922
|
-
const dryRun = params.dryRun;
|
|
12923
|
-
if (typeof userId === "undefined") {
|
|
12924
|
-
throw new AppBaseException('Missing required parameter: "userId"');
|
|
12925
|
-
}
|
|
12926
|
-
const apiPath = "/memory/memories/imports";
|
|
12927
|
-
const payload = {};
|
|
12928
|
-
if (typeof userId !== "undefined") {
|
|
12929
|
-
payload["userId"] = userId;
|
|
12930
|
-
}
|
|
12931
|
-
if (typeof format !== "undefined") {
|
|
12932
|
-
payload["format"] = format;
|
|
12933
|
-
}
|
|
12934
|
-
if (typeof data !== "undefined") {
|
|
12935
|
-
payload["data"] = data;
|
|
12936
|
-
}
|
|
12937
|
-
if (typeof records !== "undefined") {
|
|
12938
|
-
payload["records"] = records;
|
|
12939
|
-
}
|
|
12940
|
-
if (typeof dryRun !== "undefined") {
|
|
12941
|
-
payload["dryRun"] = dryRun;
|
|
12942
|
-
}
|
|
12943
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12944
|
-
const apiHeaders = {
|
|
12945
|
-
"content-type": "application/json"
|
|
12946
|
-
};
|
|
12947
|
-
return this.client.call(
|
|
12948
|
-
"post",
|
|
12949
|
-
uri,
|
|
12950
|
-
apiHeaders,
|
|
12951
|
-
payload
|
|
12952
|
-
);
|
|
12953
|
-
}
|
|
12954
|
-
getImport(paramsOrFirst) {
|
|
12955
|
-
let params;
|
|
12956
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
12957
|
-
params = paramsOrFirst || {};
|
|
12958
|
-
} else {
|
|
12959
|
-
params = {
|
|
12960
|
-
importId: paramsOrFirst
|
|
12961
|
-
};
|
|
12962
|
-
}
|
|
12963
|
-
const importId = params.importId;
|
|
12964
|
-
if (typeof importId === "undefined") {
|
|
12965
|
-
throw new AppBaseException('Missing required parameter: "importId"');
|
|
12966
|
-
}
|
|
12967
|
-
const apiPath = "/memory/memories/imports/{importId}".replace("{importId}", importId);
|
|
12968
|
-
const payload = {};
|
|
12969
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12970
|
-
const apiHeaders = {};
|
|
12971
|
-
return this.client.call(
|
|
12972
|
-
"get",
|
|
12973
|
-
uri,
|
|
12974
|
-
apiHeaders,
|
|
12975
|
-
payload
|
|
12976
|
-
);
|
|
12977
|
-
}
|
|
12978
|
-
updateKnowledge(paramsOrFirst, ...rest) {
|
|
12979
|
-
let params;
|
|
12980
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
12981
|
-
params = paramsOrFirst || {};
|
|
12982
|
-
} else {
|
|
12983
|
-
params = {
|
|
12984
|
-
knowledgeId: paramsOrFirst,
|
|
12985
|
-
expectedVersion: rest[0],
|
|
12986
|
-
scope: rest[1],
|
|
12987
|
-
userId: rest[2],
|
|
12988
|
-
agentId: rest[3],
|
|
12989
|
-
sessionId: rest[4],
|
|
12990
|
-
runId: rest[5],
|
|
12991
|
-
memorySubStoreId: rest[6],
|
|
12992
|
-
status: rest[7],
|
|
12993
|
-
validationStatus: rest[8]
|
|
12994
|
-
};
|
|
12995
|
-
}
|
|
12996
|
-
const knowledgeId = params.knowledgeId;
|
|
12997
|
-
const expectedVersion = params.expectedVersion;
|
|
12998
|
-
const scope = params.scope;
|
|
12999
|
-
const userId = params.userId;
|
|
13000
|
-
const agentId = params.agentId;
|
|
13001
|
-
const sessionId = params.sessionId;
|
|
13002
|
-
const runId = params.runId;
|
|
13003
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
13004
|
-
const status = params.status;
|
|
13005
|
-
const validationStatus = params.validationStatus;
|
|
13006
|
-
if (typeof knowledgeId === "undefined") {
|
|
13007
|
-
throw new AppBaseException('Missing required parameter: "knowledgeId"');
|
|
13008
|
-
}
|
|
13009
|
-
if (typeof expectedVersion === "undefined") {
|
|
13010
|
-
throw new AppBaseException('Missing required parameter: "expectedVersion"');
|
|
13011
|
-
}
|
|
13012
|
-
const apiPath = "/memory/memories/knowledge/{knowledgeId}".replace("{knowledgeId}", knowledgeId);
|
|
13013
|
-
const payload = {};
|
|
13014
|
-
if (typeof scope !== "undefined") {
|
|
13015
|
-
payload["scope"] = scope;
|
|
13016
|
-
}
|
|
13017
|
-
if (typeof userId !== "undefined") {
|
|
13018
|
-
payload["userId"] = userId;
|
|
13019
|
-
}
|
|
13020
|
-
if (typeof agentId !== "undefined") {
|
|
13021
|
-
payload["agentId"] = agentId;
|
|
13022
|
-
}
|
|
13023
|
-
if (typeof sessionId !== "undefined") {
|
|
13024
|
-
payload["sessionId"] = sessionId;
|
|
13025
|
-
}
|
|
13026
|
-
if (typeof runId !== "undefined") {
|
|
13027
|
-
payload["runId"] = runId;
|
|
13028
|
-
}
|
|
13029
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
13030
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
13031
|
-
}
|
|
13032
|
-
if (typeof expectedVersion !== "undefined") {
|
|
13033
|
-
payload["expectedVersion"] = expectedVersion;
|
|
13034
|
-
}
|
|
13035
|
-
if (typeof status !== "undefined") {
|
|
13036
|
-
payload["status"] = status;
|
|
13037
|
-
}
|
|
13038
|
-
if (typeof validationStatus !== "undefined") {
|
|
13039
|
-
payload["validationStatus"] = validationStatus;
|
|
13040
|
-
}
|
|
13041
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
13042
|
-
const apiHeaders = {
|
|
13043
|
-
"content-type": "application/json"
|
|
13044
|
-
};
|
|
13045
|
-
return this.client.call(
|
|
13046
|
-
"patch",
|
|
13047
|
-
uri,
|
|
13048
|
-
apiHeaders,
|
|
13049
|
-
payload
|
|
13050
|
-
);
|
|
13051
|
-
}
|
|
13052
|
-
forgetKnowledge(paramsOrFirst, ...rest) {
|
|
13053
|
-
let params;
|
|
13054
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
13055
|
-
params = paramsOrFirst || {};
|
|
13056
|
-
} else {
|
|
13057
|
-
params = {
|
|
13058
|
-
knowledgeId: paramsOrFirst,
|
|
13059
|
-
expectedVersion: rest[0],
|
|
13060
|
-
scope: rest[1],
|
|
13061
|
-
userId: rest[2],
|
|
13062
|
-
agentId: rest[3],
|
|
13063
|
-
sessionId: rest[4],
|
|
13064
|
-
runId: rest[5],
|
|
13065
|
-
memorySubStoreId: rest[6],
|
|
13066
|
-
reason: rest[7],
|
|
13067
|
-
source: rest[8]
|
|
13068
|
-
};
|
|
13069
|
-
}
|
|
13070
|
-
const knowledgeId = params.knowledgeId;
|
|
13071
|
-
const expectedVersion = params.expectedVersion;
|
|
13072
|
-
const scope = params.scope;
|
|
13073
|
-
const userId = params.userId;
|
|
13074
|
-
const agentId = params.agentId;
|
|
13075
|
-
const sessionId = params.sessionId;
|
|
13076
|
-
const runId = params.runId;
|
|
13077
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
13078
|
-
const reason = params.reason;
|
|
13079
|
-
const source = params.source;
|
|
13080
|
-
if (typeof knowledgeId === "undefined") {
|
|
13081
|
-
throw new AppBaseException('Missing required parameter: "knowledgeId"');
|
|
13082
|
-
}
|
|
13083
|
-
if (typeof expectedVersion === "undefined") {
|
|
13084
|
-
throw new AppBaseException('Missing required parameter: "expectedVersion"');
|
|
13085
|
-
}
|
|
13086
|
-
const apiPath = "/memory/memories/knowledge/{knowledgeId}".replace("{knowledgeId}", knowledgeId);
|
|
13087
|
-
const payload = {};
|
|
13088
|
-
if (typeof scope !== "undefined") {
|
|
13089
|
-
payload["scope"] = scope;
|
|
13090
|
-
}
|
|
13091
|
-
if (typeof userId !== "undefined") {
|
|
13092
|
-
payload["userId"] = userId;
|
|
13093
|
-
}
|
|
13094
|
-
if (typeof agentId !== "undefined") {
|
|
13095
|
-
payload["agentId"] = agentId;
|
|
13096
|
-
}
|
|
13097
|
-
if (typeof sessionId !== "undefined") {
|
|
13098
|
-
payload["sessionId"] = sessionId;
|
|
13099
|
-
}
|
|
13100
|
-
if (typeof runId !== "undefined") {
|
|
13101
|
-
payload["runId"] = runId;
|
|
13102
|
-
}
|
|
13103
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
13104
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
13105
|
-
}
|
|
13106
|
-
if (typeof expectedVersion !== "undefined") {
|
|
13107
|
-
payload["expectedVersion"] = expectedVersion;
|
|
13108
|
-
}
|
|
13109
|
-
if (typeof reason !== "undefined") {
|
|
13110
|
-
payload["reason"] = reason;
|
|
13111
|
-
}
|
|
13112
|
-
if (typeof source !== "undefined") {
|
|
13113
|
-
payload["source"] = source;
|
|
13114
|
-
}
|
|
13115
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
13116
|
-
const apiHeaders = {
|
|
13117
|
-
"content-type": "application/json"
|
|
13118
|
-
};
|
|
13119
|
-
return this.client.call(
|
|
13120
|
-
"delete",
|
|
13121
|
-
uri,
|
|
13122
|
-
apiHeaders,
|
|
13123
|
-
payload
|
|
13124
|
-
);
|
|
13125
|
-
}
|
|
13126
|
-
createKnowledgeObservation(paramsOrFirst, ...rest) {
|
|
13127
|
-
let params;
|
|
13128
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
13129
|
-
params = paramsOrFirst || {};
|
|
13130
|
-
} else {
|
|
13131
|
-
params = {
|
|
13132
|
-
knowledgeId: paramsOrFirst,
|
|
13133
|
-
revision: rest[0],
|
|
13134
|
-
outcome: rest[1],
|
|
13135
|
-
evidence: rest[2],
|
|
13136
|
-
scope: rest[3],
|
|
13137
|
-
userId: rest[4],
|
|
13138
|
-
agentId: rest[5],
|
|
13139
|
-
sessionId: rest[6],
|
|
13140
|
-
runId: rest[7],
|
|
13141
|
-
memorySubStoreId: rest[8],
|
|
13142
|
-
sourceId: rest[9],
|
|
13143
|
-
injectionId: rest[10],
|
|
13144
|
-
verificationSource: rest[11],
|
|
13145
|
-
toolName: rest[12],
|
|
13146
|
-
toolVersion: rest[13],
|
|
13147
|
-
toolSchemaVersion: rest[14],
|
|
13148
|
-
errorFingerprint: rest[15],
|
|
13149
|
-
weight: rest[16],
|
|
13150
|
-
observedAt: rest[17],
|
|
13151
|
-
idempotencyKey: rest[18]
|
|
13152
|
-
};
|
|
13153
|
-
}
|
|
13154
|
-
const knowledgeId = params.knowledgeId;
|
|
13155
|
-
const revision = params.revision;
|
|
13156
|
-
const outcome = params.outcome;
|
|
13157
|
-
const evidence = params.evidence;
|
|
13158
|
-
const scope = params.scope;
|
|
13159
|
-
const userId = params.userId;
|
|
13160
|
-
const agentId = params.agentId;
|
|
13161
|
-
const sessionId = params.sessionId;
|
|
13162
|
-
const runId = params.runId;
|
|
13163
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
13164
|
-
const sourceId = params.sourceId;
|
|
13165
|
-
const injectionId = params.injectionId;
|
|
13166
|
-
const verificationSource = params.verificationSource;
|
|
13167
|
-
const toolName = params.toolName;
|
|
13168
|
-
const toolVersion = params.toolVersion;
|
|
13169
|
-
const toolSchemaVersion = params.toolSchemaVersion;
|
|
13170
|
-
const errorFingerprint = params.errorFingerprint;
|
|
13171
|
-
const weight = params.weight;
|
|
13172
|
-
const observedAt = params.observedAt;
|
|
13173
|
-
const idempotencyKey = params.idempotencyKey;
|
|
13174
|
-
if (typeof knowledgeId === "undefined") {
|
|
13175
|
-
throw new AppBaseException('Missing required parameter: "knowledgeId"');
|
|
13176
|
-
}
|
|
13177
|
-
if (typeof revision === "undefined") {
|
|
13178
|
-
throw new AppBaseException('Missing required parameter: "revision"');
|
|
13179
|
-
}
|
|
13180
|
-
if (typeof outcome === "undefined") {
|
|
13181
|
-
throw new AppBaseException('Missing required parameter: "outcome"');
|
|
13182
|
-
}
|
|
13183
|
-
if (typeof evidence === "undefined") {
|
|
13184
|
-
throw new AppBaseException('Missing required parameter: "evidence"');
|
|
13185
|
-
}
|
|
13186
|
-
const apiPath = "/memory/memories/observations";
|
|
13187
|
-
const payload = {};
|
|
13188
|
-
if (typeof scope !== "undefined") {
|
|
13189
|
-
payload["scope"] = scope;
|
|
13190
|
-
}
|
|
13191
|
-
if (typeof userId !== "undefined") {
|
|
13192
|
-
payload["userId"] = userId;
|
|
13193
|
-
}
|
|
13194
|
-
if (typeof agentId !== "undefined") {
|
|
13195
|
-
payload["agentId"] = agentId;
|
|
13196
|
-
}
|
|
13197
|
-
if (typeof sessionId !== "undefined") {
|
|
13198
|
-
payload["sessionId"] = sessionId;
|
|
13199
|
-
}
|
|
13200
|
-
if (typeof runId !== "undefined") {
|
|
13201
|
-
payload["runId"] = runId;
|
|
13202
|
-
}
|
|
13203
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
13204
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
13205
|
-
}
|
|
13206
|
-
if (typeof knowledgeId !== "undefined") {
|
|
13207
|
-
payload["knowledgeId"] = knowledgeId;
|
|
13208
|
-
}
|
|
13209
|
-
if (typeof revision !== "undefined") {
|
|
13210
|
-
payload["revision"] = revision;
|
|
13211
|
-
}
|
|
13212
|
-
if (typeof sourceId !== "undefined") {
|
|
13213
|
-
payload["sourceId"] = sourceId;
|
|
13214
|
-
}
|
|
13215
|
-
if (typeof injectionId !== "undefined") {
|
|
13216
|
-
payload["injectionId"] = injectionId;
|
|
13217
|
-
}
|
|
13218
|
-
if (typeof outcome !== "undefined") {
|
|
13219
|
-
payload["outcome"] = outcome;
|
|
13220
|
-
}
|
|
13221
|
-
if (typeof verificationSource !== "undefined") {
|
|
13222
|
-
payload["verificationSource"] = verificationSource;
|
|
13223
|
-
}
|
|
13224
|
-
if (typeof toolName !== "undefined") {
|
|
13225
|
-
payload["toolName"] = toolName;
|
|
13226
|
-
}
|
|
13227
|
-
if (typeof toolVersion !== "undefined") {
|
|
13228
|
-
payload["toolVersion"] = toolVersion;
|
|
13229
|
-
}
|
|
13230
|
-
if (typeof toolSchemaVersion !== "undefined") {
|
|
13231
|
-
payload["toolSchemaVersion"] = toolSchemaVersion;
|
|
13232
|
-
}
|
|
13233
|
-
if (typeof errorFingerprint !== "undefined") {
|
|
13234
|
-
payload["errorFingerprint"] = errorFingerprint;
|
|
13235
|
-
}
|
|
13236
|
-
if (typeof evidence !== "undefined") {
|
|
13237
|
-
payload["evidence"] = evidence;
|
|
13238
|
-
}
|
|
13239
|
-
if (typeof weight !== "undefined") {
|
|
13240
|
-
payload["weight"] = weight;
|
|
13241
|
-
}
|
|
13242
|
-
if (typeof observedAt !== "undefined") {
|
|
13243
|
-
payload["observedAt"] = observedAt;
|
|
13244
|
-
}
|
|
13245
|
-
if (typeof idempotencyKey !== "undefined") {
|
|
13246
|
-
payload["idempotencyKey"] = idempotencyKey;
|
|
13247
|
-
}
|
|
13248
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
13249
|
-
const apiHeaders = {
|
|
13250
|
-
"content-type": "application/json"
|
|
13251
|
-
};
|
|
13252
|
-
return this.client.call(
|
|
13253
|
-
"post",
|
|
13254
|
-
uri,
|
|
13255
|
-
apiHeaders,
|
|
13256
|
-
payload
|
|
13257
|
-
);
|
|
13258
|
-
}
|
|
13259
|
-
createProjectionRebuild(paramsOrFirst, ...rest) {
|
|
13260
|
-
let params;
|
|
13261
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst) && ("routes" in paramsOrFirst || "cursor" in paramsOrFirst || "limit" in paramsOrFirst || "dryRun" in paramsOrFirst)) {
|
|
13262
|
-
params = paramsOrFirst || {};
|
|
13263
|
-
} else {
|
|
13264
|
-
params = {
|
|
13265
|
-
routes: paramsOrFirst,
|
|
13266
|
-
cursor: rest[0],
|
|
13267
|
-
limit: rest[1],
|
|
13268
|
-
dryRun: rest[2]
|
|
13269
|
-
};
|
|
13270
|
-
}
|
|
13271
|
-
const routes = params.routes;
|
|
13272
|
-
const cursor = params.cursor;
|
|
13273
|
-
const limit = params.limit;
|
|
13274
|
-
const dryRun = params.dryRun;
|
|
13275
|
-
if (typeof routes === "undefined") {
|
|
13276
|
-
throw new AppBaseException('Missing required parameter: "routes"');
|
|
13277
|
-
}
|
|
13278
|
-
const apiPath = "/memory/memories/projections/rebuild";
|
|
13279
|
-
const payload = {};
|
|
13280
|
-
if (typeof routes !== "undefined") {
|
|
13281
|
-
payload["routes"] = routes;
|
|
13282
|
-
}
|
|
13283
|
-
if (typeof cursor !== "undefined") {
|
|
13284
|
-
payload["cursor"] = cursor;
|
|
13285
|
-
}
|
|
13286
|
-
if (typeof limit !== "undefined") {
|
|
13287
|
-
payload["limit"] = limit;
|
|
13288
|
-
}
|
|
13289
|
-
if (typeof dryRun !== "undefined") {
|
|
13290
|
-
payload["dryRun"] = dryRun;
|
|
13291
|
-
}
|
|
13292
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
13293
|
-
const apiHeaders = {
|
|
13294
|
-
"content-type": "application/json"
|
|
13295
|
-
};
|
|
13296
|
-
return this.client.call(
|
|
13297
|
-
"post",
|
|
13298
|
-
uri,
|
|
13299
|
-
apiHeaders,
|
|
13300
|
-
payload
|
|
13301
|
-
);
|
|
13302
|
-
}
|
|
13303
|
-
/**
|
|
13304
|
-
* Get project memory projection recovery verification.
|
|
13305
|
-
*
|
|
13306
|
-
* @throws {AppBaseException}
|
|
13307
|
-
* @returns {Promise<{}>}
|
|
13308
|
-
*/
|
|
13309
|
-
getProjectionVerification() {
|
|
13310
|
-
const apiPath = "/memory/memories/projections/verification";
|
|
13311
|
-
const payload = {};
|
|
13312
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
13313
|
-
const apiHeaders = {};
|
|
13314
|
-
return this.client.call(
|
|
13315
|
-
"get",
|
|
13316
|
-
uri,
|
|
13317
|
-
apiHeaders,
|
|
13318
|
-
payload
|
|
13319
|
-
);
|
|
13320
|
-
}
|
|
13321
|
-
/**
|
|
13322
|
-
* Get a memory quality report.
|
|
13323
|
-
*
|
|
13324
|
-
* @throws {AppBaseException}
|
|
13325
|
-
* @returns {Promise<{}>}
|
|
13326
|
-
*/
|
|
13327
|
-
getQuality() {
|
|
13328
|
-
const apiPath = "/memory/memories/quality";
|
|
13329
|
-
const payload = {};
|
|
13330
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
13331
|
-
const apiHeaders = {};
|
|
13332
|
-
return this.client.call(
|
|
13333
|
-
"get",
|
|
13334
|
-
uri,
|
|
13335
|
-
apiHeaders,
|
|
13336
|
-
payload
|
|
13337
|
-
);
|
|
13338
|
-
}
|
|
13339
|
-
recallKnowledge(paramsOrFirst, ...rest) {
|
|
13340
|
-
let params;
|
|
13341
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
13342
|
-
params = paramsOrFirst || {};
|
|
13343
|
-
} else {
|
|
13344
|
-
params = {
|
|
13345
|
-
query: paramsOrFirst,
|
|
13346
|
-
scope: rest[0],
|
|
13347
|
-
userId: rest[1],
|
|
13348
|
-
agentId: rest[2],
|
|
13349
|
-
sessionId: rest[3],
|
|
13350
|
-
runId: rest[4],
|
|
13351
|
-
memorySubStoreId: rest[5],
|
|
13352
|
-
kinds: rest[6],
|
|
13353
|
-
limit: rest[7],
|
|
13354
|
-
tokenBudget: rest[8],
|
|
13355
|
-
retrieval: rest[9],
|
|
13356
|
-
accessMode: rest[10]
|
|
13357
|
-
};
|
|
13358
|
-
}
|
|
13359
|
-
const query = params.query;
|
|
13360
|
-
const scope = params.scope;
|
|
13361
|
-
const userId = params.userId;
|
|
13362
|
-
const agentId = params.agentId;
|
|
13363
|
-
const sessionId = params.sessionId;
|
|
13364
|
-
const runId = params.runId;
|
|
13365
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
13366
|
-
const kinds = params.kinds;
|
|
13367
|
-
const limit = params.limit;
|
|
13368
|
-
const tokenBudget = params.tokenBudget;
|
|
13369
|
-
const retrieval = params.retrieval;
|
|
13370
|
-
const accessMode = params.accessMode;
|
|
13371
|
-
if (typeof query === "undefined") {
|
|
13372
|
-
throw new AppBaseException('Missing required parameter: "query"');
|
|
13373
|
-
}
|
|
13374
|
-
const apiPath = "/memory/memories/recall";
|
|
13375
|
-
const payload = {};
|
|
13376
|
-
if (typeof scope !== "undefined") {
|
|
13377
|
-
payload["scope"] = scope;
|
|
13378
|
-
}
|
|
13379
|
-
if (typeof userId !== "undefined") {
|
|
13380
|
-
payload["userId"] = userId;
|
|
13381
|
-
}
|
|
13382
|
-
if (typeof agentId !== "undefined") {
|
|
13383
|
-
payload["agentId"] = agentId;
|
|
13384
|
-
}
|
|
13385
|
-
if (typeof sessionId !== "undefined") {
|
|
13386
|
-
payload["sessionId"] = sessionId;
|
|
13387
|
-
}
|
|
13388
|
-
if (typeof runId !== "undefined") {
|
|
13389
|
-
payload["runId"] = runId;
|
|
13390
|
-
}
|
|
13391
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
13392
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
13393
|
-
}
|
|
13394
|
-
if (typeof query !== "undefined") {
|
|
13395
|
-
payload["query"] = query;
|
|
13396
|
-
}
|
|
13397
|
-
if (typeof kinds !== "undefined") {
|
|
13398
|
-
payload["kinds"] = kinds;
|
|
13399
|
-
}
|
|
13400
|
-
if (typeof limit !== "undefined") {
|
|
13401
|
-
payload["limit"] = limit;
|
|
13402
|
-
}
|
|
13403
|
-
if (typeof tokenBudget !== "undefined") {
|
|
13404
|
-
payload["tokenBudget"] = tokenBudget;
|
|
13405
|
-
}
|
|
13406
|
-
if (typeof retrieval !== "undefined") {
|
|
13407
|
-
payload["retrieval"] = retrieval;
|
|
13408
|
-
}
|
|
13409
|
-
if (typeof accessMode !== "undefined") {
|
|
13410
|
-
payload["accessMode"] = accessMode;
|
|
13411
|
-
}
|
|
13412
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
13413
|
-
const apiHeaders = {
|
|
13414
|
-
"content-type": "application/json"
|
|
13415
|
-
};
|
|
13416
|
-
return this.client.call(
|
|
13417
|
-
"post",
|
|
13418
|
-
uri,
|
|
13419
|
-
apiHeaders,
|
|
13420
|
-
payload
|
|
13421
|
-
);
|
|
13422
|
-
}
|
|
13423
|
-
search(paramsOrFirst, ...rest) {
|
|
13424
|
-
let params;
|
|
13425
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
13426
|
-
params = paramsOrFirst || {};
|
|
13427
|
-
} else {
|
|
13428
|
-
params = {
|
|
13429
|
-
query: paramsOrFirst,
|
|
13430
|
-
searchMode: rest[0],
|
|
13431
|
-
retrieval: rest[1],
|
|
13432
|
-
userId: rest[2],
|
|
13433
|
-
agentId: rest[3],
|
|
13434
|
-
runId: rest[4],
|
|
13435
|
-
scope: rest[5],
|
|
13436
|
-
memoryType: rest[6],
|
|
13437
|
-
recordKind: rest[7],
|
|
13438
|
-
filter: rest[8],
|
|
13439
|
-
limit: rest[9],
|
|
13440
|
-
cursor: rest[10],
|
|
13441
|
-
sort: rest[11],
|
|
13442
|
-
memorySubStoreId: rest[12],
|
|
13443
|
-
sessionId: rest[13],
|
|
13444
|
-
groupId: rest[14],
|
|
13445
|
-
accessMode: rest[15]
|
|
13446
|
-
};
|
|
13447
|
-
}
|
|
13448
|
-
const query = params.query;
|
|
13449
|
-
const searchMode = params.searchMode;
|
|
13450
|
-
const retrieval = params.retrieval;
|
|
13451
|
-
const userId = params.userId;
|
|
13452
|
-
const agentId = params.agentId;
|
|
13453
|
-
const runId = params.runId;
|
|
13454
|
-
const scope = params.scope;
|
|
13455
|
-
const memoryType = params.memoryType;
|
|
13456
|
-
const recordKind = params.recordKind;
|
|
13457
|
-
const filter = params.filter;
|
|
13458
|
-
const limit = params.limit;
|
|
13459
|
-
const cursor = params.cursor;
|
|
13460
|
-
const sort = params.sort;
|
|
13461
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
13462
|
-
const sessionId = params.sessionId;
|
|
13463
|
-
const groupId = params.groupId;
|
|
13464
|
-
const accessMode = params.accessMode;
|
|
13465
|
-
if (typeof query === "undefined") {
|
|
13466
|
-
throw new AppBaseException('Missing required parameter: "query"');
|
|
13467
|
-
}
|
|
13468
|
-
const apiPath = "/memory/memories/search";
|
|
13469
|
-
const payload = {};
|
|
13470
|
-
if (typeof query !== "undefined") {
|
|
13471
|
-
payload["query"] = query;
|
|
13472
|
-
}
|
|
13473
|
-
if (typeof searchMode !== "undefined") {
|
|
13474
|
-
payload["searchMode"] = searchMode;
|
|
13475
|
-
}
|
|
13476
|
-
if (typeof retrieval !== "undefined") {
|
|
13477
|
-
payload["retrieval"] = retrieval;
|
|
13478
|
-
}
|
|
13479
|
-
if (typeof userId !== "undefined") {
|
|
13480
|
-
payload["userId"] = userId;
|
|
13481
|
-
}
|
|
13482
|
-
if (typeof agentId !== "undefined") {
|
|
13483
|
-
payload["agentId"] = agentId;
|
|
13484
|
-
}
|
|
13485
|
-
if (typeof runId !== "undefined") {
|
|
13486
|
-
payload["runId"] = runId;
|
|
13487
|
-
}
|
|
13488
|
-
if (typeof scope !== "undefined") {
|
|
13489
|
-
payload["scope"] = scope;
|
|
13490
|
-
}
|
|
13491
|
-
if (typeof memoryType !== "undefined") {
|
|
13492
|
-
payload["memoryType"] = memoryType;
|
|
13493
|
-
}
|
|
13494
|
-
if (typeof recordKind !== "undefined") {
|
|
13495
|
-
payload["recordKind"] = recordKind;
|
|
13496
|
-
}
|
|
13497
|
-
if (typeof filter !== "undefined") {
|
|
13498
|
-
payload["filter"] = filter;
|
|
13499
|
-
}
|
|
13500
|
-
if (typeof limit !== "undefined") {
|
|
13501
|
-
payload["limit"] = limit;
|
|
13502
|
-
}
|
|
13503
|
-
if (typeof cursor !== "undefined") {
|
|
13504
|
-
payload["cursor"] = cursor;
|
|
13505
|
-
}
|
|
13506
|
-
if (typeof sort !== "undefined") {
|
|
13507
|
-
payload["sort"] = sort;
|
|
13508
|
-
}
|
|
13509
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
13510
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
13511
|
-
}
|
|
13512
|
-
if (typeof sessionId !== "undefined") {
|
|
13513
|
-
payload["sessionId"] = sessionId;
|
|
13514
|
-
}
|
|
13515
|
-
if (typeof groupId !== "undefined") {
|
|
13516
|
-
payload["groupId"] = groupId;
|
|
13517
|
-
}
|
|
13518
|
-
if (typeof accessMode !== "undefined") {
|
|
13519
|
-
payload["accessMode"] = accessMode;
|
|
13520
|
-
}
|
|
13521
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
13522
|
-
const apiHeaders = {
|
|
13523
|
-
"content-type": "application/json"
|
|
13524
|
-
};
|
|
13525
|
-
return this.client.call(
|
|
13526
|
-
"post",
|
|
13527
|
-
uri,
|
|
13528
|
-
apiHeaders,
|
|
13529
|
-
payload
|
|
13530
|
-
);
|
|
13531
|
-
}
|
|
13532
|
-
/**
|
|
13533
|
-
* Get memory session aggregates.
|
|
13534
|
-
*
|
|
13535
|
-
* @throws {AppBaseException}
|
|
13536
|
-
* @returns {Promise<{}>}
|
|
13537
|
-
*/
|
|
13538
|
-
getSessions() {
|
|
13539
|
-
const apiPath = "/memory/memories/sessions";
|
|
13540
|
-
const payload = {};
|
|
13541
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
13542
|
-
const apiHeaders = {};
|
|
13543
|
-
return this.client.call(
|
|
13544
|
-
"get",
|
|
13545
|
-
uri,
|
|
13546
|
-
apiHeaders,
|
|
13547
|
-
payload
|
|
13548
|
-
);
|
|
13549
|
-
}
|
|
13550
|
-
listSkills(paramsOrFirst, ...rest) {
|
|
13551
|
-
let params;
|
|
13552
|
-
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst) && ("scope" in paramsOrFirst || "userId" in paramsOrFirst || "agentId" in paramsOrFirst || "sessionId" in paramsOrFirst || "runId" in paramsOrFirst || "memorySubStoreId" in paramsOrFirst || "cursor" in paramsOrFirst || "limit" in paramsOrFirst)) {
|
|
13553
|
-
params = paramsOrFirst || {};
|
|
13554
|
-
} else {
|
|
13555
|
-
params = {
|
|
13556
|
-
scope: paramsOrFirst,
|
|
13557
|
-
userId: rest[0],
|
|
13558
|
-
agentId: rest[1],
|
|
13559
|
-
sessionId: rest[2],
|
|
13560
|
-
runId: rest[3],
|
|
13561
|
-
memorySubStoreId: rest[4],
|
|
13562
|
-
cursor: rest[5],
|
|
13563
|
-
limit: rest[6]
|
|
13564
|
-
};
|
|
13565
|
-
}
|
|
13566
|
-
const scope = params.scope;
|
|
13567
|
-
const userId = params.userId;
|
|
13568
|
-
const agentId = params.agentId;
|
|
13569
|
-
const sessionId = params.sessionId;
|
|
13570
|
-
const runId = params.runId;
|
|
13571
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
13572
|
-
const cursor = params.cursor;
|
|
13573
|
-
const limit = params.limit;
|
|
13574
|
-
const apiPath = "/memory/memories/skills";
|
|
13575
|
-
const payload = {};
|
|
13576
|
-
if (typeof scope !== "undefined") {
|
|
13577
|
-
payload["scope"] = scope;
|
|
13578
|
-
}
|
|
13579
|
-
if (typeof userId !== "undefined") {
|
|
13580
|
-
payload["userId"] = userId;
|
|
13581
|
-
}
|
|
13582
|
-
if (typeof agentId !== "undefined") {
|
|
13583
|
-
payload["agentId"] = agentId;
|
|
13584
|
-
}
|
|
13585
|
-
if (typeof sessionId !== "undefined") {
|
|
13586
|
-
payload["sessionId"] = sessionId;
|
|
13587
|
-
}
|
|
13588
|
-
if (typeof runId !== "undefined") {
|
|
13589
|
-
payload["runId"] = runId;
|
|
13590
|
-
}
|
|
13591
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
13592
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
13593
|
-
}
|
|
13594
|
-
if (typeof cursor !== "undefined") {
|
|
13595
|
-
payload["cursor"] = cursor;
|
|
13596
|
-
}
|
|
13597
|
-
if (typeof limit !== "undefined") {
|
|
13598
|
-
payload["limit"] = limit;
|
|
13599
|
-
}
|
|
13600
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
13601
|
-
const apiHeaders = {};
|
|
13602
|
-
return this.client.call(
|
|
13603
|
-
"get",
|
|
13604
|
-
uri,
|
|
13605
|
-
apiHeaders,
|
|
13606
|
-
payload
|
|
13607
|
-
);
|
|
13608
|
-
}
|
|
13609
|
-
searchSkills(paramsOrFirst, ...rest) {
|
|
13610
|
-
let params;
|
|
13611
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
13612
|
-
params = paramsOrFirst || {};
|
|
13613
|
-
} else {
|
|
13614
|
-
params = {
|
|
13615
|
-
query: paramsOrFirst,
|
|
13616
|
-
scope: rest[0],
|
|
13617
|
-
userId: rest[1],
|
|
13618
|
-
agentId: rest[2],
|
|
13619
|
-
sessionId: rest[3],
|
|
13620
|
-
runId: rest[4],
|
|
13621
|
-
memorySubStoreId: rest[5],
|
|
13622
|
-
cursor: rest[6],
|
|
13623
|
-
limit: rest[7],
|
|
13624
|
-
retrieval: rest[8]
|
|
13625
|
-
};
|
|
13626
|
-
}
|
|
13627
|
-
const query = params.query;
|
|
13628
|
-
const scope = params.scope;
|
|
13629
|
-
const userId = params.userId;
|
|
13630
|
-
const agentId = params.agentId;
|
|
13631
|
-
const sessionId = params.sessionId;
|
|
13632
|
-
const runId = params.runId;
|
|
13633
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
13634
|
-
const cursor = params.cursor;
|
|
13635
|
-
const limit = params.limit;
|
|
13636
|
-
const retrieval = params.retrieval;
|
|
13637
|
-
if (typeof query === "undefined") {
|
|
13638
|
-
throw new AppBaseException('Missing required parameter: "query"');
|
|
13639
|
-
}
|
|
13640
|
-
const apiPath = "/memory/memories/skills/search";
|
|
13641
|
-
const payload = {};
|
|
13642
|
-
if (typeof scope !== "undefined") {
|
|
13643
|
-
payload["scope"] = scope;
|
|
13644
|
-
}
|
|
13645
|
-
if (typeof userId !== "undefined") {
|
|
13646
|
-
payload["userId"] = userId;
|
|
13647
|
-
}
|
|
13648
|
-
if (typeof agentId !== "undefined") {
|
|
13649
|
-
payload["agentId"] = agentId;
|
|
13650
|
-
}
|
|
13651
|
-
if (typeof sessionId !== "undefined") {
|
|
13652
|
-
payload["sessionId"] = sessionId;
|
|
13653
|
-
}
|
|
13654
|
-
if (typeof runId !== "undefined") {
|
|
13655
|
-
payload["runId"] = runId;
|
|
13656
|
-
}
|
|
13657
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
13658
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
13659
|
-
}
|
|
13660
|
-
if (typeof query !== "undefined") {
|
|
13661
|
-
payload["query"] = query;
|
|
13662
|
-
}
|
|
13663
|
-
if (typeof cursor !== "undefined") {
|
|
13664
|
-
payload["cursor"] = cursor;
|
|
13665
|
-
}
|
|
13666
|
-
if (typeof limit !== "undefined") {
|
|
13667
|
-
payload["limit"] = limit;
|
|
13668
|
-
}
|
|
13669
|
-
if (typeof retrieval !== "undefined") {
|
|
13670
|
-
payload["retrieval"] = retrieval;
|
|
13671
|
-
}
|
|
13672
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
13673
|
-
const apiHeaders = {
|
|
13674
|
-
"content-type": "application/json"
|
|
13675
|
-
};
|
|
13676
|
-
return this.client.call(
|
|
13677
|
-
"post",
|
|
13678
|
-
uri,
|
|
13679
|
-
apiHeaders,
|
|
13680
|
-
payload
|
|
13681
|
-
);
|
|
13682
|
-
}
|
|
13683
|
-
getSkill(paramsOrFirst, ...rest) {
|
|
13684
|
-
let params;
|
|
13685
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
13686
|
-
params = paramsOrFirst || {};
|
|
13687
|
-
} else {
|
|
13688
|
-
params = {
|
|
13689
|
-
knowledgeId: paramsOrFirst,
|
|
13690
|
-
scope: rest[0],
|
|
13691
|
-
userId: rest[1],
|
|
13692
|
-
agentId: rest[2],
|
|
13693
|
-
sessionId: rest[3],
|
|
13694
|
-
runId: rest[4],
|
|
13695
|
-
memorySubStoreId: rest[5]
|
|
13696
|
-
};
|
|
13697
|
-
}
|
|
13698
|
-
const knowledgeId = params.knowledgeId;
|
|
13699
|
-
const scope = params.scope;
|
|
13700
|
-
const userId = params.userId;
|
|
13701
|
-
const agentId = params.agentId;
|
|
13702
|
-
const sessionId = params.sessionId;
|
|
13703
|
-
const runId = params.runId;
|
|
13704
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
13705
|
-
if (typeof knowledgeId === "undefined") {
|
|
13706
|
-
throw new AppBaseException('Missing required parameter: "knowledgeId"');
|
|
13707
|
-
}
|
|
13708
|
-
const apiPath = "/memory/memories/skills/{knowledgeId}".replace("{knowledgeId}", knowledgeId);
|
|
13709
|
-
const payload = {};
|
|
13710
|
-
if (typeof scope !== "undefined") {
|
|
13711
|
-
payload["scope"] = scope;
|
|
13712
|
-
}
|
|
13713
|
-
if (typeof userId !== "undefined") {
|
|
13714
|
-
payload["userId"] = userId;
|
|
13715
|
-
}
|
|
13716
|
-
if (typeof agentId !== "undefined") {
|
|
13717
|
-
payload["agentId"] = agentId;
|
|
13718
|
-
}
|
|
13719
|
-
if (typeof sessionId !== "undefined") {
|
|
13720
|
-
payload["sessionId"] = sessionId;
|
|
13721
|
-
}
|
|
13722
|
-
if (typeof runId !== "undefined") {
|
|
13723
|
-
payload["runId"] = runId;
|
|
13724
|
-
}
|
|
13725
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
13726
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
13727
|
-
}
|
|
13728
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
13729
|
-
const apiHeaders = {};
|
|
13730
|
-
return this.client.call(
|
|
13731
|
-
"get",
|
|
13732
|
-
uri,
|
|
13733
|
-
apiHeaders,
|
|
13734
|
-
payload
|
|
13735
|
-
);
|
|
13736
|
-
}
|
|
13737
|
-
listSkillSources(paramsOrFirst, ...rest) {
|
|
13738
|
-
let params;
|
|
13739
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
13740
|
-
params = paramsOrFirst || {};
|
|
13741
|
-
} else {
|
|
13742
|
-
params = {
|
|
13743
|
-
knowledgeId: paramsOrFirst,
|
|
13744
|
-
scope: rest[0],
|
|
13745
|
-
userId: rest[1],
|
|
13746
|
-
agentId: rest[2],
|
|
13747
|
-
sessionId: rest[3],
|
|
13748
|
-
runId: rest[4],
|
|
13749
|
-
memorySubStoreId: rest[5],
|
|
13750
|
-
cursor: rest[6],
|
|
13751
|
-
limit: rest[7]
|
|
13752
|
-
};
|
|
13753
|
-
}
|
|
13754
|
-
const knowledgeId = params.knowledgeId;
|
|
13755
|
-
const scope = params.scope;
|
|
13756
|
-
const userId = params.userId;
|
|
13757
|
-
const agentId = params.agentId;
|
|
13758
|
-
const sessionId = params.sessionId;
|
|
13759
|
-
const runId = params.runId;
|
|
13760
|
-
const memorySubStoreId = params.memorySubStoreId;
|
|
13761
|
-
const cursor = params.cursor;
|
|
13762
|
-
const limit = params.limit;
|
|
13763
|
-
if (typeof knowledgeId === "undefined") {
|
|
13764
|
-
throw new AppBaseException('Missing required parameter: "knowledgeId"');
|
|
13765
|
-
}
|
|
13766
|
-
const apiPath = "/memory/memories/skills/{knowledgeId}/sources".replace("{knowledgeId}", knowledgeId);
|
|
13767
|
-
const payload = {};
|
|
13768
|
-
if (typeof scope !== "undefined") {
|
|
13769
|
-
payload["scope"] = scope;
|
|
13770
|
-
}
|
|
13771
|
-
if (typeof userId !== "undefined") {
|
|
13772
|
-
payload["userId"] = userId;
|
|
13773
|
-
}
|
|
13774
|
-
if (typeof agentId !== "undefined") {
|
|
13775
|
-
payload["agentId"] = agentId;
|
|
13776
|
-
}
|
|
13777
|
-
if (typeof sessionId !== "undefined") {
|
|
13778
|
-
payload["sessionId"] = sessionId;
|
|
13779
|
-
}
|
|
13780
|
-
if (typeof runId !== "undefined") {
|
|
13781
|
-
payload["runId"] = runId;
|
|
13782
|
-
}
|
|
13783
|
-
if (typeof memorySubStoreId !== "undefined") {
|
|
13784
|
-
payload["memorySubStoreId"] = memorySubStoreId;
|
|
13785
|
-
}
|
|
13786
|
-
if (typeof cursor !== "undefined") {
|
|
13787
|
-
payload["cursor"] = cursor;
|
|
13788
|
-
}
|
|
13789
|
-
if (typeof limit !== "undefined") {
|
|
13790
|
-
payload["limit"] = limit;
|
|
13791
|
-
}
|
|
13792
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
13793
|
-
const apiHeaders = {};
|
|
13794
|
-
return this.client.call(
|
|
13795
|
-
"get",
|
|
13796
|
-
uri,
|
|
13797
|
-
apiHeaders,
|
|
13798
|
-
payload
|
|
13799
|
-
);
|
|
13800
|
-
}
|
|
13801
|
-
/**
|
|
13802
|
-
* Get memory statistics visible to the current caller.
|
|
13803
|
-
*
|
|
13804
|
-
* @throws {AppBaseException}
|
|
13805
|
-
* @returns {Promise<{}>}
|
|
13806
|
-
*/
|
|
13807
|
-
getStats() {
|
|
13808
|
-
const apiPath = "/memory/memories/stats";
|
|
13809
|
-
const payload = {};
|
|
13810
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
13811
|
-
const apiHeaders = {};
|
|
13812
|
-
return this.client.call(
|
|
13813
|
-
"get",
|
|
13814
|
-
uri,
|
|
13815
|
-
apiHeaders,
|
|
13816
|
-
payload
|
|
13817
|
-
);
|
|
13818
|
-
}
|
|
13819
|
-
/**
|
|
13820
|
-
* Get a memory activity timeline.
|
|
13821
|
-
*
|
|
13822
|
-
* @throws {AppBaseException}
|
|
13823
|
-
* @returns {Promise<{}>}
|
|
13824
|
-
*/
|
|
13825
|
-
getTimeline() {
|
|
13826
|
-
const apiPath = "/memory/memories/timeline";
|
|
13827
|
-
const payload = {};
|
|
13828
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
13829
|
-
const apiHeaders = {};
|
|
13830
|
-
return this.client.call(
|
|
13831
|
-
"get",
|
|
13832
|
-
uri,
|
|
13833
|
-
apiHeaders,
|
|
13834
|
-
payload
|
|
13835
|
-
);
|
|
13836
|
-
}
|
|
13837
|
-
getProfile(paramsOrFirst, ...rest) {
|
|
13838
|
-
let params;
|
|
13839
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
13840
|
-
params = paramsOrFirst || {};
|
|
13841
|
-
} else {
|
|
13842
|
-
params = {
|
|
13843
|
-
userId: paramsOrFirst,
|
|
13844
|
-
profileType: rest[0]
|
|
13845
|
-
};
|
|
13846
|
-
}
|
|
13847
|
-
const userId = params.userId;
|
|
13848
|
-
const profileType = params.profileType;
|
|
13849
|
-
if (typeof userId === "undefined") {
|
|
13850
|
-
throw new AppBaseException('Missing required parameter: "userId"');
|
|
13851
|
-
}
|
|
13852
|
-
const apiPath = "/memory/memories/users/{userId}/profile".replace("{userId}", userId);
|
|
13853
|
-
const payload = {};
|
|
13854
|
-
if (typeof profileType !== "undefined") {
|
|
13855
|
-
payload["profileType"] = profileType;
|
|
13856
|
-
}
|
|
13857
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
13858
|
-
const apiHeaders = {};
|
|
13859
|
-
return this.client.call(
|
|
13860
|
-
"get",
|
|
13861
|
-
uri,
|
|
13862
|
-
apiHeaders,
|
|
13863
|
-
payload
|
|
13864
|
-
);
|
|
13865
|
-
}
|
|
13866
|
-
deleteProfile(paramsOrFirst, ...rest) {
|
|
13867
|
-
let params;
|
|
13868
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
13869
|
-
params = paramsOrFirst || {};
|
|
13870
|
-
} else {
|
|
13871
|
-
params = {
|
|
13872
|
-
userId: paramsOrFirst,
|
|
13873
|
-
profileType: rest[0],
|
|
13874
|
-
reason: rest[1],
|
|
13875
|
-
source: rest[2]
|
|
13876
|
-
};
|
|
13877
|
-
}
|
|
13878
|
-
const userId = params.userId;
|
|
13879
|
-
const profileType = params.profileType;
|
|
13880
|
-
const reason = params.reason;
|
|
13881
|
-
const source = params.source;
|
|
13882
|
-
if (typeof userId === "undefined") {
|
|
13883
|
-
throw new AppBaseException('Missing required parameter: "userId"');
|
|
13884
|
-
}
|
|
13885
|
-
const apiPath = "/memory/memories/users/{userId}/profile".replace("{userId}", userId);
|
|
13886
|
-
const payload = {};
|
|
13887
|
-
if (typeof profileType !== "undefined") {
|
|
13888
|
-
payload["profileType"] = profileType;
|
|
13889
|
-
}
|
|
13890
|
-
if (typeof reason !== "undefined") {
|
|
13891
|
-
payload["reason"] = reason;
|
|
13892
|
-
}
|
|
13893
|
-
if (typeof source !== "undefined") {
|
|
13894
|
-
payload["source"] = source;
|
|
13895
|
-
}
|
|
13896
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
13897
|
-
const apiHeaders = {
|
|
13898
|
-
"content-type": "application/json"
|
|
13899
|
-
};
|
|
13900
|
-
return this.client.call(
|
|
13901
|
-
"delete",
|
|
13902
|
-
uri,
|
|
13903
|
-
apiHeaders,
|
|
13904
|
-
payload
|
|
13905
|
-
);
|
|
13906
|
-
}
|
|
13907
|
-
createProfileExtraction(paramsOrFirst, ...rest) {
|
|
13908
|
-
let params;
|
|
13909
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
13910
|
-
params = paramsOrFirst || {};
|
|
13911
|
-
} else {
|
|
13912
|
-
params = {
|
|
13913
|
-
userId: paramsOrFirst,
|
|
13914
|
-
profileType: rest[0],
|
|
13915
|
-
messages: rest[1],
|
|
13916
|
-
sourceMemoryIds: rest[2],
|
|
13917
|
-
mode: rest[3]
|
|
13918
|
-
};
|
|
13919
|
-
}
|
|
13920
|
-
const userId = params.userId;
|
|
13921
|
-
const profileType = params.profileType;
|
|
13922
|
-
const messages = params.messages;
|
|
13923
|
-
const sourceMemoryIds = params.sourceMemoryIds;
|
|
13924
|
-
const mode = params.mode;
|
|
13925
|
-
if (typeof userId === "undefined") {
|
|
13926
|
-
throw new AppBaseException('Missing required parameter: "userId"');
|
|
13927
|
-
}
|
|
13928
|
-
const apiPath = "/memory/memories/users/{userId}/profile/extractions".replace("{userId}", userId);
|
|
13929
|
-
const payload = {};
|
|
13930
|
-
if (typeof profileType !== "undefined") {
|
|
13931
|
-
payload["profileType"] = profileType;
|
|
13932
|
-
}
|
|
13933
|
-
if (typeof messages !== "undefined") {
|
|
13934
|
-
payload["messages"] = messages;
|
|
13935
|
-
}
|
|
13936
|
-
if (typeof sourceMemoryIds !== "undefined") {
|
|
13937
|
-
payload["sourceMemoryIds"] = sourceMemoryIds;
|
|
13938
|
-
}
|
|
13939
|
-
if (typeof mode !== "undefined") {
|
|
13940
|
-
payload["mode"] = mode;
|
|
13941
|
-
}
|
|
13942
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
13943
|
-
const apiHeaders = {
|
|
13944
|
-
"content-type": "application/json"
|
|
13945
|
-
};
|
|
13946
|
-
return this.client.call(
|
|
13947
|
-
"post",
|
|
13948
|
-
uri,
|
|
13949
|
-
apiHeaders,
|
|
13950
|
-
payload
|
|
13951
|
-
);
|
|
13952
|
-
}
|
|
13953
|
-
createProfileRebuild(paramsOrFirst, ...rest) {
|
|
13954
|
-
let params;
|
|
13955
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
13956
|
-
params = paramsOrFirst || {};
|
|
13957
|
-
} else {
|
|
13958
|
-
params = {
|
|
13959
|
-
userId: paramsOrFirst,
|
|
13960
|
-
profileType: rest[0]
|
|
13961
|
-
};
|
|
11056
|
+
payload["data"] = data;
|
|
13962
11057
|
}
|
|
13963
|
-
|
|
13964
|
-
|
|
13965
|
-
if (typeof userId === "undefined") {
|
|
13966
|
-
throw new AppBaseException('Missing required parameter: "userId"');
|
|
11058
|
+
if (typeof permissions !== "undefined") {
|
|
11059
|
+
payload["permissions"] = permissions;
|
|
13967
11060
|
}
|
|
13968
|
-
|
|
13969
|
-
|
|
13970
|
-
if (typeof profileType !== "undefined") {
|
|
13971
|
-
payload["profileType"] = profileType;
|
|
11061
|
+
if (typeof transactionId !== "undefined") {
|
|
11062
|
+
payload["transactionId"] = transactionId;
|
|
13972
11063
|
}
|
|
13973
11064
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
13974
11065
|
const apiHeaders = {
|
|
13975
11066
|
"content-type": "application/json"
|
|
13976
11067
|
};
|
|
13977
11068
|
return this.client.call(
|
|
13978
|
-
"
|
|
11069
|
+
"put",
|
|
13979
11070
|
uri,
|
|
13980
11071
|
apiHeaders,
|
|
13981
11072
|
payload
|
|
13982
11073
|
);
|
|
13983
11074
|
}
|
|
13984
|
-
|
|
11075
|
+
updateDocument(paramsOrFirst, ...rest) {
|
|
13985
11076
|
let params;
|
|
13986
11077
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
13987
11078
|
params = paramsOrFirst || {};
|
|
13988
11079
|
} else {
|
|
13989
11080
|
params = {
|
|
13990
|
-
|
|
13991
|
-
|
|
11081
|
+
databaseId: paramsOrFirst,
|
|
11082
|
+
collectionId: rest[0],
|
|
11083
|
+
documentId: rest[1],
|
|
11084
|
+
data: rest[2],
|
|
11085
|
+
permissions: rest[3],
|
|
11086
|
+
transactionId: rest[4]
|
|
13992
11087
|
};
|
|
13993
11088
|
}
|
|
13994
|
-
const
|
|
13995
|
-
const
|
|
13996
|
-
|
|
13997
|
-
|
|
11089
|
+
const databaseId = params.databaseId;
|
|
11090
|
+
const collectionId = params.collectionId;
|
|
11091
|
+
const documentId = params.documentId;
|
|
11092
|
+
const data = params.data;
|
|
11093
|
+
const permissions = params.permissions;
|
|
11094
|
+
const transactionId = params.transactionId;
|
|
11095
|
+
if (typeof databaseId === "undefined") {
|
|
11096
|
+
throw new AppBaseException('Missing required parameter: "databaseId"');
|
|
11097
|
+
}
|
|
11098
|
+
if (typeof collectionId === "undefined") {
|
|
11099
|
+
throw new AppBaseException('Missing required parameter: "collectionId"');
|
|
11100
|
+
}
|
|
11101
|
+
if (typeof documentId === "undefined") {
|
|
11102
|
+
throw new AppBaseException('Missing required parameter: "documentId"');
|
|
13998
11103
|
}
|
|
13999
|
-
const apiPath = "/
|
|
11104
|
+
const apiPath = "/databases/{databaseId}/collections/{collectionId}/documents/{documentId}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{documentId}", documentId);
|
|
14000
11105
|
const payload = {};
|
|
14001
|
-
if (typeof
|
|
14002
|
-
payload["
|
|
11106
|
+
if (typeof data !== "undefined") {
|
|
11107
|
+
payload["data"] = data;
|
|
11108
|
+
}
|
|
11109
|
+
if (typeof permissions !== "undefined") {
|
|
11110
|
+
payload["permissions"] = permissions;
|
|
11111
|
+
}
|
|
11112
|
+
if (typeof transactionId !== "undefined") {
|
|
11113
|
+
payload["transactionId"] = transactionId;
|
|
14003
11114
|
}
|
|
14004
11115
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
14005
|
-
const apiHeaders = {
|
|
11116
|
+
const apiHeaders = {
|
|
11117
|
+
"content-type": "application/json"
|
|
11118
|
+
};
|
|
14006
11119
|
return this.client.call(
|
|
14007
|
-
"
|
|
11120
|
+
"patch",
|
|
14008
11121
|
uri,
|
|
14009
11122
|
apiHeaders,
|
|
14010
11123
|
payload
|
|
14011
11124
|
);
|
|
14012
11125
|
}
|
|
14013
|
-
|
|
11126
|
+
deleteDocument(paramsOrFirst, ...rest) {
|
|
14014
11127
|
let params;
|
|
14015
11128
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
14016
11129
|
params = paramsOrFirst || {};
|
|
14017
11130
|
} else {
|
|
14018
11131
|
params = {
|
|
14019
|
-
|
|
11132
|
+
databaseId: paramsOrFirst,
|
|
11133
|
+
collectionId: rest[0],
|
|
11134
|
+
documentId: rest[1],
|
|
11135
|
+
transactionId: rest[2]
|
|
14020
11136
|
};
|
|
14021
11137
|
}
|
|
14022
|
-
const
|
|
14023
|
-
|
|
14024
|
-
|
|
11138
|
+
const databaseId = params.databaseId;
|
|
11139
|
+
const collectionId = params.collectionId;
|
|
11140
|
+
const documentId = params.documentId;
|
|
11141
|
+
const transactionId = params.transactionId;
|
|
11142
|
+
if (typeof databaseId === "undefined") {
|
|
11143
|
+
throw new AppBaseException('Missing required parameter: "databaseId"');
|
|
11144
|
+
}
|
|
11145
|
+
if (typeof collectionId === "undefined") {
|
|
11146
|
+
throw new AppBaseException('Missing required parameter: "collectionId"');
|
|
11147
|
+
}
|
|
11148
|
+
if (typeof documentId === "undefined") {
|
|
11149
|
+
throw new AppBaseException('Missing required parameter: "documentId"');
|
|
14025
11150
|
}
|
|
14026
|
-
const apiPath = "/
|
|
11151
|
+
const apiPath = "/databases/{databaseId}/collections/{collectionId}/documents/{documentId}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{documentId}", documentId);
|
|
14027
11152
|
const payload = {};
|
|
11153
|
+
if (typeof transactionId !== "undefined") {
|
|
11154
|
+
payload["transactionId"] = transactionId;
|
|
11155
|
+
}
|
|
14028
11156
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
14029
|
-
const apiHeaders = {
|
|
11157
|
+
const apiHeaders = {
|
|
11158
|
+
"content-type": "application/json"
|
|
11159
|
+
};
|
|
14030
11160
|
return this.client.call(
|
|
14031
|
-
"
|
|
11161
|
+
"delete",
|
|
14032
11162
|
uri,
|
|
14033
11163
|
apiHeaders,
|
|
14034
11164
|
payload
|
|
14035
11165
|
);
|
|
14036
11166
|
}
|
|
14037
|
-
|
|
11167
|
+
decrementDocumentAttribute(paramsOrFirst, ...rest) {
|
|
14038
11168
|
let params;
|
|
14039
11169
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
14040
11170
|
params = paramsOrFirst || {};
|
|
14041
11171
|
} else {
|
|
14042
11172
|
params = {
|
|
14043
|
-
|
|
14044
|
-
|
|
14045
|
-
|
|
14046
|
-
|
|
14047
|
-
|
|
11173
|
+
databaseId: paramsOrFirst,
|
|
11174
|
+
collectionId: rest[0],
|
|
11175
|
+
documentId: rest[1],
|
|
11176
|
+
attribute: rest[2],
|
|
11177
|
+
value: rest[3],
|
|
11178
|
+
min: rest[4],
|
|
11179
|
+
transactionId: rest[5]
|
|
14048
11180
|
};
|
|
14049
11181
|
}
|
|
14050
|
-
const
|
|
14051
|
-
const
|
|
14052
|
-
const
|
|
14053
|
-
const
|
|
14054
|
-
const
|
|
14055
|
-
|
|
14056
|
-
|
|
11182
|
+
const databaseId = params.databaseId;
|
|
11183
|
+
const collectionId = params.collectionId;
|
|
11184
|
+
const documentId = params.documentId;
|
|
11185
|
+
const attribute = params.attribute;
|
|
11186
|
+
const value = params.value;
|
|
11187
|
+
const min = params.min;
|
|
11188
|
+
const transactionId = params.transactionId;
|
|
11189
|
+
if (typeof databaseId === "undefined") {
|
|
11190
|
+
throw new AppBaseException('Missing required parameter: "databaseId"');
|
|
11191
|
+
}
|
|
11192
|
+
if (typeof collectionId === "undefined") {
|
|
11193
|
+
throw new AppBaseException('Missing required parameter: "collectionId"');
|
|
14057
11194
|
}
|
|
14058
|
-
if (typeof
|
|
14059
|
-
throw new AppBaseException('Missing required parameter: "
|
|
11195
|
+
if (typeof documentId === "undefined") {
|
|
11196
|
+
throw new AppBaseException('Missing required parameter: "documentId"');
|
|
14060
11197
|
}
|
|
14061
|
-
|
|
14062
|
-
|
|
14063
|
-
if (typeof version !== "undefined") {
|
|
14064
|
-
payload["version"] = version;
|
|
11198
|
+
if (typeof attribute === "undefined") {
|
|
11199
|
+
throw new AppBaseException('Missing required parameter: "attribute"');
|
|
14065
11200
|
}
|
|
14066
|
-
|
|
14067
|
-
|
|
11201
|
+
const apiPath = "/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/decrement".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{documentId}", documentId).replace("{attribute}", attribute);
|
|
11202
|
+
const payload = {};
|
|
11203
|
+
if (typeof value !== "undefined") {
|
|
11204
|
+
payload["value"] = value;
|
|
14068
11205
|
}
|
|
14069
|
-
if (typeof
|
|
14070
|
-
payload["
|
|
11206
|
+
if (typeof min !== "undefined") {
|
|
11207
|
+
payload["min"] = min;
|
|
14071
11208
|
}
|
|
14072
|
-
if (typeof
|
|
14073
|
-
payload["
|
|
11209
|
+
if (typeof transactionId !== "undefined") {
|
|
11210
|
+
payload["transactionId"] = transactionId;
|
|
14074
11211
|
}
|
|
14075
11212
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
14076
11213
|
const apiHeaders = {
|
|
@@ -14083,57 +11220,92 @@ var Memory = class {
|
|
|
14083
11220
|
payload
|
|
14084
11221
|
);
|
|
14085
11222
|
}
|
|
14086
|
-
|
|
11223
|
+
incrementDocumentAttribute(paramsOrFirst, ...rest) {
|
|
14087
11224
|
let params;
|
|
14088
11225
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
14089
11226
|
params = paramsOrFirst || {};
|
|
14090
11227
|
} else {
|
|
14091
11228
|
params = {
|
|
14092
|
-
|
|
14093
|
-
|
|
14094
|
-
|
|
11229
|
+
databaseId: paramsOrFirst,
|
|
11230
|
+
collectionId: rest[0],
|
|
11231
|
+
documentId: rest[1],
|
|
11232
|
+
attribute: rest[2],
|
|
11233
|
+
value: rest[3],
|
|
11234
|
+
max: rest[4],
|
|
11235
|
+
transactionId: rest[5]
|
|
14095
11236
|
};
|
|
14096
11237
|
}
|
|
14097
|
-
const
|
|
14098
|
-
const
|
|
14099
|
-
const
|
|
14100
|
-
|
|
14101
|
-
|
|
11238
|
+
const databaseId = params.databaseId;
|
|
11239
|
+
const collectionId = params.collectionId;
|
|
11240
|
+
const documentId = params.documentId;
|
|
11241
|
+
const attribute = params.attribute;
|
|
11242
|
+
const value = params.value;
|
|
11243
|
+
const max = params.max;
|
|
11244
|
+
const transactionId = params.transactionId;
|
|
11245
|
+
if (typeof databaseId === "undefined") {
|
|
11246
|
+
throw new AppBaseException('Missing required parameter: "databaseId"');
|
|
11247
|
+
}
|
|
11248
|
+
if (typeof collectionId === "undefined") {
|
|
11249
|
+
throw new AppBaseException('Missing required parameter: "collectionId"');
|
|
11250
|
+
}
|
|
11251
|
+
if (typeof documentId === "undefined") {
|
|
11252
|
+
throw new AppBaseException('Missing required parameter: "documentId"');
|
|
11253
|
+
}
|
|
11254
|
+
if (typeof attribute === "undefined") {
|
|
11255
|
+
throw new AppBaseException('Missing required parameter: "attribute"');
|
|
14102
11256
|
}
|
|
14103
|
-
const apiPath = "/
|
|
11257
|
+
const apiPath = "/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/increment".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{documentId}", documentId).replace("{attribute}", attribute);
|
|
14104
11258
|
const payload = {};
|
|
14105
|
-
if (typeof
|
|
14106
|
-
payload["
|
|
11259
|
+
if (typeof value !== "undefined") {
|
|
11260
|
+
payload["value"] = value;
|
|
11261
|
+
}
|
|
11262
|
+
if (typeof max !== "undefined") {
|
|
11263
|
+
payload["max"] = max;
|
|
14107
11264
|
}
|
|
14108
|
-
if (typeof
|
|
14109
|
-
payload["
|
|
11265
|
+
if (typeof transactionId !== "undefined") {
|
|
11266
|
+
payload["transactionId"] = transactionId;
|
|
14110
11267
|
}
|
|
14111
11268
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
14112
11269
|
const apiHeaders = {
|
|
14113
11270
|
"content-type": "application/json"
|
|
14114
11271
|
};
|
|
14115
11272
|
return this.client.call(
|
|
14116
|
-
"
|
|
11273
|
+
"patch",
|
|
14117
11274
|
uri,
|
|
14118
11275
|
apiHeaders,
|
|
14119
11276
|
payload
|
|
14120
11277
|
);
|
|
14121
11278
|
}
|
|
14122
|
-
|
|
11279
|
+
listIndexes(paramsOrFirst, ...rest) {
|
|
14123
11280
|
let params;
|
|
14124
11281
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
14125
11282
|
params = paramsOrFirst || {};
|
|
14126
11283
|
} else {
|
|
14127
11284
|
params = {
|
|
14128
|
-
|
|
11285
|
+
databaseId: paramsOrFirst,
|
|
11286
|
+
collectionId: rest[0],
|
|
11287
|
+
queries: rest[1],
|
|
11288
|
+
total: rest[2]
|
|
14129
11289
|
};
|
|
14130
11290
|
}
|
|
14131
|
-
const
|
|
14132
|
-
|
|
14133
|
-
|
|
11291
|
+
const databaseId = params.databaseId;
|
|
11292
|
+
const collectionId = params.collectionId;
|
|
11293
|
+
const queries = params.queries;
|
|
11294
|
+
const total = params.total;
|
|
11295
|
+
if (typeof databaseId === "undefined") {
|
|
11296
|
+
throw new AppBaseException('Missing required parameter: "databaseId"');
|
|
11297
|
+
}
|
|
11298
|
+
if (typeof collectionId === "undefined") {
|
|
11299
|
+
throw new AppBaseException('Missing required parameter: "collectionId"');
|
|
14134
11300
|
}
|
|
14135
|
-
const apiPath = "/
|
|
11301
|
+
const apiPath = "/databases/{databaseId}/collections/{collectionId}/indexes".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
|
|
14136
11302
|
const payload = {};
|
|
11303
|
+
if (typeof queries !== "undefined") {
|
|
11304
|
+
payload["queries"] = queries;
|
|
11305
|
+
}
|
|
11306
|
+
if (typeof total !== "undefined") {
|
|
11307
|
+
payload["total"] = total;
|
|
11308
|
+
}
|
|
14137
11309
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
14138
11310
|
const apiHeaders = {};
|
|
14139
11311
|
return this.client.call(
|
|
@@ -14143,41 +11315,59 @@ var Memory = class {
|
|
|
14143
11315
|
payload
|
|
14144
11316
|
);
|
|
14145
11317
|
}
|
|
14146
|
-
|
|
11318
|
+
createIndex(paramsOrFirst, ...rest) {
|
|
14147
11319
|
let params;
|
|
14148
11320
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
14149
11321
|
params = paramsOrFirst || {};
|
|
14150
11322
|
} else {
|
|
14151
11323
|
params = {
|
|
14152
|
-
|
|
14153
|
-
|
|
14154
|
-
|
|
14155
|
-
|
|
11324
|
+
databaseId: paramsOrFirst,
|
|
11325
|
+
collectionId: rest[0],
|
|
11326
|
+
key: rest[1],
|
|
11327
|
+
type: rest[2],
|
|
11328
|
+
attributes: rest[3],
|
|
11329
|
+
orders: rest[4],
|
|
11330
|
+
lengths: rest[5]
|
|
14156
11331
|
};
|
|
14157
11332
|
}
|
|
14158
|
-
const
|
|
14159
|
-
const
|
|
14160
|
-
const
|
|
14161
|
-
const
|
|
14162
|
-
|
|
14163
|
-
|
|
11333
|
+
const databaseId = params.databaseId;
|
|
11334
|
+
const collectionId = params.collectionId;
|
|
11335
|
+
const key = params.key;
|
|
11336
|
+
const type = params.type;
|
|
11337
|
+
const attributes = params.attributes;
|
|
11338
|
+
const orders = params.orders;
|
|
11339
|
+
const lengths = params.lengths;
|
|
11340
|
+
if (typeof databaseId === "undefined") {
|
|
11341
|
+
throw new AppBaseException('Missing required parameter: "databaseId"');
|
|
11342
|
+
}
|
|
11343
|
+
if (typeof collectionId === "undefined") {
|
|
11344
|
+
throw new AppBaseException('Missing required parameter: "collectionId"');
|
|
11345
|
+
}
|
|
11346
|
+
if (typeof key === "undefined") {
|
|
11347
|
+
throw new AppBaseException('Missing required parameter: "key"');
|
|
14164
11348
|
}
|
|
14165
|
-
if (typeof
|
|
14166
|
-
throw new AppBaseException('Missing required parameter: "
|
|
11349
|
+
if (typeof type === "undefined") {
|
|
11350
|
+
throw new AppBaseException('Missing required parameter: "type"');
|
|
14167
11351
|
}
|
|
14168
|
-
if (typeof
|
|
14169
|
-
throw new AppBaseException('Missing required parameter: "
|
|
11352
|
+
if (typeof attributes === "undefined") {
|
|
11353
|
+
throw new AppBaseException('Missing required parameter: "attributes"');
|
|
14170
11354
|
}
|
|
14171
|
-
const apiPath = "/
|
|
11355
|
+
const apiPath = "/databases/{databaseId}/collections/{collectionId}/indexes".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
|
|
14172
11356
|
const payload = {};
|
|
14173
|
-
if (typeof
|
|
14174
|
-
payload["
|
|
11357
|
+
if (typeof key !== "undefined") {
|
|
11358
|
+
payload["key"] = key;
|
|
11359
|
+
}
|
|
11360
|
+
if (typeof type !== "undefined") {
|
|
11361
|
+
payload["type"] = type;
|
|
14175
11362
|
}
|
|
14176
|
-
if (typeof
|
|
14177
|
-
payload["
|
|
11363
|
+
if (typeof attributes !== "undefined") {
|
|
11364
|
+
payload["attributes"] = attributes;
|
|
11365
|
+
}
|
|
11366
|
+
if (typeof orders !== "undefined") {
|
|
11367
|
+
payload["orders"] = orders;
|
|
14178
11368
|
}
|
|
14179
|
-
if (typeof
|
|
14180
|
-
payload["
|
|
11369
|
+
if (typeof lengths !== "undefined") {
|
|
11370
|
+
payload["lengths"] = lengths;
|
|
14181
11371
|
}
|
|
14182
11372
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
14183
11373
|
const apiHeaders = {
|
|
@@ -14190,66 +11380,71 @@ var Memory = class {
|
|
|
14190
11380
|
payload
|
|
14191
11381
|
);
|
|
14192
11382
|
}
|
|
14193
|
-
|
|
11383
|
+
getIndex(paramsOrFirst, ...rest) {
|
|
14194
11384
|
let params;
|
|
14195
11385
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
14196
11386
|
params = paramsOrFirst || {};
|
|
14197
11387
|
} else {
|
|
14198
11388
|
params = {
|
|
14199
|
-
|
|
14200
|
-
|
|
11389
|
+
databaseId: paramsOrFirst,
|
|
11390
|
+
collectionId: rest[0],
|
|
11391
|
+
key: rest[1]
|
|
14201
11392
|
};
|
|
14202
11393
|
}
|
|
14203
|
-
const
|
|
14204
|
-
const
|
|
14205
|
-
|
|
14206
|
-
|
|
11394
|
+
const databaseId = params.databaseId;
|
|
11395
|
+
const collectionId = params.collectionId;
|
|
11396
|
+
const key = params.key;
|
|
11397
|
+
if (typeof databaseId === "undefined") {
|
|
11398
|
+
throw new AppBaseException('Missing required parameter: "databaseId"');
|
|
11399
|
+
}
|
|
11400
|
+
if (typeof collectionId === "undefined") {
|
|
11401
|
+
throw new AppBaseException('Missing required parameter: "collectionId"');
|
|
14207
11402
|
}
|
|
14208
|
-
if (typeof
|
|
14209
|
-
throw new AppBaseException('Missing required parameter: "
|
|
11403
|
+
if (typeof key === "undefined") {
|
|
11404
|
+
throw new AppBaseException('Missing required parameter: "key"');
|
|
14210
11405
|
}
|
|
14211
|
-
const apiPath = "/
|
|
11406
|
+
const apiPath = "/databases/{databaseId}/collections/{collectionId}/indexes/{key}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{key}", key);
|
|
14212
11407
|
const payload = {};
|
|
14213
11408
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
14214
|
-
const apiHeaders = {
|
|
14215
|
-
"content-type": "application/json"
|
|
14216
|
-
};
|
|
11409
|
+
const apiHeaders = {};
|
|
14217
11410
|
return this.client.call(
|
|
14218
|
-
"
|
|
11411
|
+
"get",
|
|
14219
11412
|
uri,
|
|
14220
11413
|
apiHeaders,
|
|
14221
11414
|
payload
|
|
14222
11415
|
);
|
|
14223
11416
|
}
|
|
14224
|
-
|
|
11417
|
+
deleteIndex(paramsOrFirst, ...rest) {
|
|
14225
11418
|
let params;
|
|
14226
11419
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
14227
11420
|
params = paramsOrFirst || {};
|
|
14228
11421
|
} else {
|
|
14229
11422
|
params = {
|
|
14230
|
-
|
|
14231
|
-
|
|
14232
|
-
|
|
11423
|
+
databaseId: paramsOrFirst,
|
|
11424
|
+
collectionId: rest[0],
|
|
11425
|
+
key: rest[1]
|
|
14233
11426
|
};
|
|
14234
11427
|
}
|
|
14235
|
-
const
|
|
14236
|
-
const
|
|
14237
|
-
const
|
|
14238
|
-
if (typeof
|
|
14239
|
-
throw new AppBaseException('Missing required parameter: "
|
|
11428
|
+
const databaseId = params.databaseId;
|
|
11429
|
+
const collectionId = params.collectionId;
|
|
11430
|
+
const key = params.key;
|
|
11431
|
+
if (typeof databaseId === "undefined") {
|
|
11432
|
+
throw new AppBaseException('Missing required parameter: "databaseId"');
|
|
14240
11433
|
}
|
|
14241
|
-
|
|
14242
|
-
|
|
14243
|
-
if (typeof cursor !== "undefined") {
|
|
14244
|
-
payload["cursor"] = cursor;
|
|
11434
|
+
if (typeof collectionId === "undefined") {
|
|
11435
|
+
throw new AppBaseException('Missing required parameter: "collectionId"');
|
|
14245
11436
|
}
|
|
14246
|
-
if (typeof
|
|
14247
|
-
|
|
11437
|
+
if (typeof key === "undefined") {
|
|
11438
|
+
throw new AppBaseException('Missing required parameter: "key"');
|
|
14248
11439
|
}
|
|
11440
|
+
const apiPath = "/databases/{databaseId}/collections/{collectionId}/indexes/{key}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{key}", key);
|
|
11441
|
+
const payload = {};
|
|
14249
11442
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
14250
|
-
const apiHeaders = {
|
|
11443
|
+
const apiHeaders = {
|
|
11444
|
+
"content-type": "application/json"
|
|
11445
|
+
};
|
|
14251
11446
|
return this.client.call(
|
|
14252
|
-
"
|
|
11447
|
+
"delete",
|
|
14253
11448
|
uri,
|
|
14254
11449
|
apiHeaders,
|
|
14255
11450
|
payload
|
|
@@ -18078,24 +15273,6 @@ _Operator.dateAddDays = (days) => new _Operator("dateAddDays", [days]).toString(
|
|
|
18078
15273
|
_Operator.dateSubDays = (days) => new _Operator("dateSubDays", [days]).toString();
|
|
18079
15274
|
_Operator.dateSetNow = () => new _Operator("dateSetNow", []).toString();
|
|
18080
15275
|
|
|
18081
|
-
// ../../node_modules/@alipay/appbase-node-sdk/dist/enums/memory-scope.mjs
|
|
18082
|
-
var MemoryScope = /* @__PURE__ */ ((MemoryScope2) => {
|
|
18083
|
-
MemoryScope2["Private"] = "private";
|
|
18084
|
-
MemoryScope2["StrictPrivate"] = "strict_private";
|
|
18085
|
-
MemoryScope2["User"] = "user";
|
|
18086
|
-
MemoryScope2["Group"] = "group";
|
|
18087
|
-
MemoryScope2["Project"] = "project";
|
|
18088
|
-
return MemoryScope2;
|
|
18089
|
-
})(MemoryScope || {});
|
|
18090
|
-
|
|
18091
|
-
// ../../node_modules/@alipay/appbase-node-sdk/dist/enums/memory-record-kind.mjs
|
|
18092
|
-
var MemoryRecordKind = /* @__PURE__ */ ((MemoryRecordKind2) => {
|
|
18093
|
-
MemoryRecordKind2["Conversation"] = "conversation";
|
|
18094
|
-
MemoryRecordKind2["Fact"] = "fact";
|
|
18095
|
-
MemoryRecordKind2["Action"] = "action";
|
|
18096
|
-
return MemoryRecordKind2;
|
|
18097
|
-
})(MemoryRecordKind || {});
|
|
18098
|
-
|
|
18099
15276
|
// ../linkque-agent-appwrite-integrate/dist/esm/runtime/runStorage.js
|
|
18100
15277
|
var ENDPOINT_SOURCES = [
|
|
18101
15278
|
"APPWRITE_FUNCTION_API_ENDPOINT",
|
|
@@ -18808,20 +15985,18 @@ function nonEmpty(value) {
|
|
|
18808
15985
|
}
|
|
18809
15986
|
|
|
18810
15987
|
export {
|
|
18811
|
-
Query,
|
|
18812
|
-
Memory,
|
|
18813
|
-
TablesDB,
|
|
18814
|
-
MemoryScope,
|
|
18815
|
-
MemoryRecordKind,
|
|
18816
15988
|
AUTHORIZATION_CHECKPOINT_TABLE,
|
|
15989
|
+
EXTERNAL_ACTION_COLUMNS,
|
|
18817
15990
|
LINKQUE_ENDPOINT_PRE,
|
|
18818
15991
|
APPBASE_RUNTIME_CONFIG_DEFAULTS,
|
|
18819
15992
|
AppbaseRuntimeConfigProvider,
|
|
18820
|
-
|
|
18821
|
-
|
|
15993
|
+
Query,
|
|
15994
|
+
TablesDB,
|
|
18822
15995
|
withIsoTimestamp,
|
|
18823
15996
|
isDebugLogLevel,
|
|
18824
15997
|
describeRuntimeEnv,
|
|
15998
|
+
resolveRunStorage,
|
|
15999
|
+
createAppBaseClient,
|
|
18825
16000
|
LinkqueGatewayAuthError,
|
|
18826
16001
|
LinkqueGatewayAuthUnconfiguredError,
|
|
18827
16002
|
resolveLinkqueGatewayRequestAuth,
|