@pairsystems/goodmem-client 1.0.9 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -5
- package/dist/api/EmbeddersApi.js +27 -12
- package/dist/api/LLMsApi.js +25 -10
- package/dist/api/MemoriesApi.js +197 -69
- package/dist/api/RerankersApi.js +25 -10
- package/dist/api/SpacesApi.js +31 -16
- package/dist/index.js +157 -3
- package/dist/model/ActiveLicenseMetadata.js +5 -1
- package/dist/model/AdminDrainRequest.js +3 -0
- package/dist/model/AdminDrainResponse.js +33 -2
- package/dist/model/AdminPurgeJobsRequest.js +4 -0
- package/dist/model/AdminPurgeJobsResponse.js +8 -4
- package/dist/model/AdminReloadLicenseResponse.js +4 -1
- package/dist/model/ApiKeyAuth.js +7 -3
- package/dist/model/ApiKeyResponse.js +67 -5
- package/dist/model/BackgroundJobSummary.js +35 -2
- package/dist/model/BatchDeleteMemorySelectorRequest.js +106 -0
- package/dist/model/BatchMemoryDeletionRequest.js +33 -15
- package/dist/model/BatchMemoryResult.js +4 -2
- package/dist/model/ChunkReference.js +3 -2
- package/dist/model/ChunkingConfiguration.js +109 -47
- package/dist/model/ChunkingConfigurationOneOf.js +109 -0
- package/dist/model/ChunkingConfigurationOneOf1.js +109 -0
- package/dist/model/ChunkingConfigurationOneOf2.js +109 -0
- package/dist/model/ContextItem.js +91 -73
- package/dist/model/ContextItemOneOf.js +109 -0
- package/dist/model/ContextItemOneOf1.js +109 -0
- package/dist/model/CreateApiKeyResponse.js +2 -1
- package/dist/model/CreateLLMResponse.js +3 -2
- package/dist/model/EmbedderCreationRequest.js +8 -5
- package/dist/model/EmbedderResponse.js +16 -11
- package/dist/model/EndpointAuthentication.js +7 -4
- package/dist/model/FilteredDeleteMemorySelectorRequest.js +140 -0
- package/dist/model/HnswIterativeScan.js +68 -0
- package/dist/model/HnswOptions.js +115 -0
- package/dist/model/JsonBatchMemoryCreationRequest.js +132 -0
- package/dist/model/JsonMemoryCreationContentRequirement.js +151 -0
- package/dist/model/JsonMemoryCreationContentRequirementOneOf.js +109 -0
- package/dist/model/JsonMemoryCreationContentRequirementOneOf1.js +109 -0
- package/dist/model/JsonMemoryCreationRequest.js +289 -0
- package/dist/model/LLMCreationRequest.js +12 -6
- package/dist/model/LLMResponse.js +18 -12
- package/dist/model/LLMUpdateRequest.js +6 -3
- package/dist/model/LLMUpdateRequestNot.js +118 -0
- package/dist/model/ListApiKeysResponse.js +29 -9
- package/dist/model/ListMemoryPageImagesResponse.js +145 -0
- package/dist/model/ListSpacesResponse.js +29 -9
- package/dist/model/Memory.js +106 -10
- package/dist/model/MemoryChunkResponse.js +39 -2
- package/dist/model/MemoryCreationRequest.js +15 -3
- package/dist/model/MemoryPageImage.js +225 -0
- package/dist/model/OcrCell.js +5 -3
- package/dist/model/OcrDocumentRequest.js +2 -1
- package/dist/model/OcrDocumentResponse.js +6 -4
- package/dist/model/OcrPage.js +9 -6
- package/dist/model/OcrPageResult.js +4 -2
- package/dist/model/PingEndpointInfo.js +3 -2
- package/dist/model/PingEvent.js +108 -50
- package/dist/model/PingEventOneOf.js +109 -0
- package/dist/model/PingEventOneOf1.js +109 -0
- package/dist/model/PingEventOneOf2.js +109 -0
- package/dist/model/PingOnceRequest.js +4 -2
- package/dist/model/PingResult.js +6 -4
- package/dist/model/PingStreamRequest.js +7 -3
- package/dist/model/PingSummary.js +3 -2
- package/dist/model/ProcessingHistory.js +2 -1
- package/dist/model/RecursiveChunkingConfiguration.js +6 -4
- package/dist/model/RerankerCreationRequest.js +5 -3
- package/dist/model/RerankerResponse.js +13 -9
- package/dist/model/ResultSetBoundary.js +20 -2
- package/dist/model/RetrieveMemoryEvent.js +10 -5
- package/dist/model/RetrieveMemoryRequest.js +25 -5
- package/dist/model/RetrievedItem.js +91 -42
- package/dist/model/RetrievedItemOneOf.js +109 -0
- package/dist/model/RetrievedItemOneOf1.js +109 -0
- package/dist/model/SecretReference.js +27 -4
- package/dist/model/SentenceChunkingConfiguration.js +3 -2
- package/dist/model/SortOrder.js +63 -0
- package/dist/model/Space.js +8 -5
- package/dist/model/SpaceCreationRequest.js +13 -8
- package/dist/model/SpaceEmbedderConfig.js +3 -1
- package/dist/model/SystemInfoResponse.js +13 -4
- package/dist/model/UpdateApiKeyRequest.js +19 -9
- package/dist/model/UpdateEmbedderRequest.js +2 -9
- package/dist/model/UpdateRerankerRequest.js +2 -9
- package/dist/model/UpdateSpaceRequest.js +0 -22
- package/package.json +1 -1
package/dist/model/ApiKeyAuth.js
CHANGED
|
@@ -47,7 +47,9 @@ var ApiKeyAuth = /*#__PURE__*/function () {
|
|
|
47
47
|
*/
|
|
48
48
|
return _createClass(ApiKeyAuth, null, [{
|
|
49
49
|
key: "initialize",
|
|
50
|
-
value: function initialize(obj) {
|
|
50
|
+
value: function initialize(obj) {
|
|
51
|
+
obj['headerName'] = 'Authorization';
|
|
52
|
+
}
|
|
51
53
|
|
|
52
54
|
/**
|
|
53
55
|
* Constructs a <code>ApiKeyAuth</code> from a plain JavaScript object, optionally creating a new instance.
|
|
@@ -65,7 +67,7 @@ var ApiKeyAuth = /*#__PURE__*/function () {
|
|
|
65
67
|
obj['inlineSecret'] = _ApiClient["default"].convertToType(data['inlineSecret'], 'String');
|
|
66
68
|
}
|
|
67
69
|
if (data.hasOwnProperty('secretRef')) {
|
|
68
|
-
obj['secretRef'] =
|
|
70
|
+
obj['secretRef'] = _ApiClient["default"].convertToType(data['secretRef'], _SecretReference["default"]);
|
|
69
71
|
}
|
|
70
72
|
if (data.hasOwnProperty('headerName')) {
|
|
71
73
|
obj['headerName'] = _ApiClient["default"].convertToType(data['headerName'], 'String');
|
|
@@ -113,6 +115,7 @@ var ApiKeyAuth = /*#__PURE__*/function () {
|
|
|
113
115
|
ApiKeyAuth.prototype['inlineSecret'] = undefined;
|
|
114
116
|
|
|
115
117
|
/**
|
|
118
|
+
* Reference to an external secret manager entry (mutually exclusive with inlineSecret)
|
|
116
119
|
* @member {module:model/SecretReference} secretRef
|
|
117
120
|
*/
|
|
118
121
|
ApiKeyAuth.prototype['secretRef'] = undefined;
|
|
@@ -120,8 +123,9 @@ ApiKeyAuth.prototype['secretRef'] = undefined;
|
|
|
120
123
|
/**
|
|
121
124
|
* Desired HTTP header to carry the credential (defaults to Authorization)
|
|
122
125
|
* @member {String} headerName
|
|
126
|
+
* @default 'Authorization'
|
|
123
127
|
*/
|
|
124
|
-
ApiKeyAuth.prototype['headerName'] =
|
|
128
|
+
ApiKeyAuth.prototype['headerName'] = 'Authorization';
|
|
125
129
|
|
|
126
130
|
/**
|
|
127
131
|
* Optional prefix prepended to the secret (e.g., \"Bearer \")
|
|
@@ -7,6 +7,9 @@ exports["default"] = void 0;
|
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
8
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
9
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
11
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
12
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
10
13
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
11
14
|
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
12
15
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
@@ -33,10 +36,19 @@ var ApiKeyResponse = /*#__PURE__*/function () {
|
|
|
33
36
|
* Constructs a new <code>ApiKeyResponse</code>.
|
|
34
37
|
* API key metadata without sensitive information.
|
|
35
38
|
* @alias module:model/ApiKeyResponse
|
|
39
|
+
* @param apiKeyId {String} Unique identifier for the API key.
|
|
40
|
+
* @param userId {String} ID of the user that owns this API key.
|
|
41
|
+
* @param keyPrefix {String} First few characters of the key for display/identification purposes.
|
|
42
|
+
* @param status {module:model/ApiKeyResponse.StatusEnum} Current status of the API key: ACTIVE, INACTIVE, or STATUS_UNSPECIFIED.
|
|
43
|
+
* @param labels {Object.<String, String>} User-defined labels for organization and filtering.
|
|
44
|
+
* @param createdAt {Number} When the API key was created, in milliseconds since epoch.
|
|
45
|
+
* @param updatedAt {Number} When the API key was last updated, in milliseconds since epoch.
|
|
46
|
+
* @param createdById {String} ID of the user that created this API key.
|
|
47
|
+
* @param updatedById {String} ID of the user that last updated this API key.
|
|
36
48
|
*/
|
|
37
|
-
function ApiKeyResponse() {
|
|
49
|
+
function ApiKeyResponse(apiKeyId, userId, keyPrefix, status, labels, createdAt, updatedAt, createdById, updatedById) {
|
|
38
50
|
_classCallCheck(this, ApiKeyResponse);
|
|
39
|
-
ApiKeyResponse.initialize(this);
|
|
51
|
+
ApiKeyResponse.initialize(this, apiKeyId, userId, keyPrefix, status, labels, createdAt, updatedAt, createdById, updatedById);
|
|
40
52
|
}
|
|
41
53
|
|
|
42
54
|
/**
|
|
@@ -46,7 +58,17 @@ var ApiKeyResponse = /*#__PURE__*/function () {
|
|
|
46
58
|
*/
|
|
47
59
|
return _createClass(ApiKeyResponse, null, [{
|
|
48
60
|
key: "initialize",
|
|
49
|
-
value: function initialize(obj) {
|
|
61
|
+
value: function initialize(obj, apiKeyId, userId, keyPrefix, status, labels, createdAt, updatedAt, createdById, updatedById) {
|
|
62
|
+
obj['apiKeyId'] = apiKeyId;
|
|
63
|
+
obj['userId'] = userId;
|
|
64
|
+
obj['keyPrefix'] = keyPrefix;
|
|
65
|
+
obj['status'] = status;
|
|
66
|
+
obj['labels'] = labels;
|
|
67
|
+
obj['createdAt'] = createdAt;
|
|
68
|
+
obj['updatedAt'] = updatedAt;
|
|
69
|
+
obj['createdById'] = createdById;
|
|
70
|
+
obj['updatedById'] = updatedById;
|
|
71
|
+
}
|
|
50
72
|
|
|
51
73
|
/**
|
|
52
74
|
* Constructs a <code>ApiKeyResponse</code> from a plain JavaScript object, optionally creating a new instance.
|
|
@@ -107,7 +129,22 @@ var ApiKeyResponse = /*#__PURE__*/function () {
|
|
|
107
129
|
}, {
|
|
108
130
|
key: "validateJSON",
|
|
109
131
|
value: function validateJSON(data) {
|
|
110
|
-
//
|
|
132
|
+
// check to make sure all required properties are present in the JSON string
|
|
133
|
+
var _iterator = _createForOfIteratorHelper(ApiKeyResponse.RequiredProperties),
|
|
134
|
+
_step;
|
|
135
|
+
try {
|
|
136
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
137
|
+
var property = _step.value;
|
|
138
|
+
if (!data.hasOwnProperty(property)) {
|
|
139
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
// ensure the json data is a string
|
|
143
|
+
} catch (err) {
|
|
144
|
+
_iterator.e(err);
|
|
145
|
+
} finally {
|
|
146
|
+
_iterator.f();
|
|
147
|
+
}
|
|
111
148
|
if (data['apiKeyId'] && !(typeof data['apiKeyId'] === 'string' || data['apiKeyId'] instanceof String)) {
|
|
112
149
|
throw new Error("Expected the field `apiKeyId` to be a primitive type in the JSON string but got " + data['apiKeyId']);
|
|
113
150
|
}
|
|
@@ -135,6 +172,8 @@ var ApiKeyResponse = /*#__PURE__*/function () {
|
|
|
135
172
|
}
|
|
136
173
|
}]);
|
|
137
174
|
}();
|
|
175
|
+
ApiKeyResponse.RequiredProperties = ["apiKeyId", "userId", "keyPrefix", "status", "labels", "createdAt", "updatedAt", "createdById", "updatedById"];
|
|
176
|
+
|
|
138
177
|
/**
|
|
139
178
|
* Unique identifier for the API key.
|
|
140
179
|
* @member {String} apiKeyId
|
|
@@ -155,7 +194,7 @@ ApiKeyResponse.prototype['keyPrefix'] = undefined;
|
|
|
155
194
|
|
|
156
195
|
/**
|
|
157
196
|
* Current status of the API key: ACTIVE, INACTIVE, or STATUS_UNSPECIFIED.
|
|
158
|
-
* @member {
|
|
197
|
+
* @member {module:model/ApiKeyResponse.StatusEnum} status
|
|
159
198
|
*/
|
|
160
199
|
ApiKeyResponse.prototype['status'] = undefined;
|
|
161
200
|
|
|
@@ -200,4 +239,27 @@ ApiKeyResponse.prototype['createdById'] = undefined;
|
|
|
200
239
|
* @member {String} updatedById
|
|
201
240
|
*/
|
|
202
241
|
ApiKeyResponse.prototype['updatedById'] = undefined;
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Allowed values for the <code>status</code> property.
|
|
245
|
+
* @enum {String}
|
|
246
|
+
* @readonly
|
|
247
|
+
*/
|
|
248
|
+
ApiKeyResponse['StatusEnum'] = {
|
|
249
|
+
/**
|
|
250
|
+
* value: "STATUS_UNSPECIFIED"
|
|
251
|
+
* @const
|
|
252
|
+
*/
|
|
253
|
+
"STATUS_UNSPECIFIED": "STATUS_UNSPECIFIED",
|
|
254
|
+
/**
|
|
255
|
+
* value: "ACTIVE"
|
|
256
|
+
* @const
|
|
257
|
+
*/
|
|
258
|
+
"ACTIVE": "ACTIVE",
|
|
259
|
+
/**
|
|
260
|
+
* value: "INACTIVE"
|
|
261
|
+
* @const
|
|
262
|
+
*/
|
|
263
|
+
"INACTIVE": "INACTIVE"
|
|
264
|
+
};
|
|
203
265
|
var _default = exports["default"] = ApiKeyResponse;
|
|
@@ -38,7 +38,7 @@ var BackgroundJobSummary = /*#__PURE__*/function () {
|
|
|
38
38
|
* @alias module:model/BackgroundJobSummary
|
|
39
39
|
* @param jobId {Number} Database identifier of the background job
|
|
40
40
|
* @param jobType {String} Logical job type dispatched by the background job framework
|
|
41
|
-
* @param status {
|
|
41
|
+
* @param status {module:model/BackgroundJobSummary.StatusEnum} Current status of the background job
|
|
42
42
|
* @param attempts {Number} Number of attempts started so far
|
|
43
43
|
* @param maxAttempts {Number} Maximum number of attempts allowed for this job
|
|
44
44
|
*/
|
|
@@ -167,7 +167,7 @@ BackgroundJobSummary.prototype['jobType'] = undefined;
|
|
|
167
167
|
|
|
168
168
|
/**
|
|
169
169
|
* Current status of the background job
|
|
170
|
-
* @member {
|
|
170
|
+
* @member {module:model/BackgroundJobSummary.StatusEnum} status
|
|
171
171
|
*/
|
|
172
172
|
BackgroundJobSummary.prototype['status'] = undefined;
|
|
173
173
|
|
|
@@ -212,4 +212,37 @@ BackgroundJobSummary.prototype['lastError'] = undefined;
|
|
|
212
212
|
* @member {Number} updatedAt
|
|
213
213
|
*/
|
|
214
214
|
BackgroundJobSummary.prototype['updatedAt'] = undefined;
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Allowed values for the <code>status</code> property.
|
|
218
|
+
* @enum {String}
|
|
219
|
+
* @readonly
|
|
220
|
+
*/
|
|
221
|
+
BackgroundJobSummary['StatusEnum'] = {
|
|
222
|
+
/**
|
|
223
|
+
* value: "BACKGROUND_JOB_PENDING"
|
|
224
|
+
* @const
|
|
225
|
+
*/
|
|
226
|
+
"BACKGROUND_JOB_PENDING": "BACKGROUND_JOB_PENDING",
|
|
227
|
+
/**
|
|
228
|
+
* value: "BACKGROUND_JOB_RUNNING"
|
|
229
|
+
* @const
|
|
230
|
+
*/
|
|
231
|
+
"BACKGROUND_JOB_RUNNING": "BACKGROUND_JOB_RUNNING",
|
|
232
|
+
/**
|
|
233
|
+
* value: "BACKGROUND_JOB_SUCCEEDED"
|
|
234
|
+
* @const
|
|
235
|
+
*/
|
|
236
|
+
"BACKGROUND_JOB_SUCCEEDED": "BACKGROUND_JOB_SUCCEEDED",
|
|
237
|
+
/**
|
|
238
|
+
* value: "BACKGROUND_JOB_FAILED"
|
|
239
|
+
* @const
|
|
240
|
+
*/
|
|
241
|
+
"BACKGROUND_JOB_FAILED": "BACKGROUND_JOB_FAILED",
|
|
242
|
+
/**
|
|
243
|
+
* value: "BACKGROUND_JOB_CANCELED"
|
|
244
|
+
* @const
|
|
245
|
+
*/
|
|
246
|
+
"BACKGROUND_JOB_CANCELED": "BACKGROUND_JOB_CANCELED"
|
|
247
|
+
};
|
|
215
248
|
var _default = exports["default"] = BackgroundJobSummary;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _FilteredDeleteMemorySelectorRequest = _interopRequireDefault(require("./FilteredDeleteMemorySelectorRequest"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
11
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
12
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
13
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
16
|
+
*
|
|
17
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
18
|
+
*
|
|
19
|
+
* The version of the OpenAPI document:
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
23
|
+
* https://openapi-generator.tech
|
|
24
|
+
* Do not edit the class manually.
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* The BatchDeleteMemorySelectorRequest model module.
|
|
29
|
+
* @module model/BatchDeleteMemorySelectorRequest
|
|
30
|
+
* @version 1.0.0
|
|
31
|
+
*/
|
|
32
|
+
var BatchDeleteMemorySelectorRequest = /*#__PURE__*/function () {
|
|
33
|
+
/**
|
|
34
|
+
* Constructs a new <code>BatchDeleteMemorySelectorRequest</code>.
|
|
35
|
+
* A single delete selector: either memoryId or filterSelector
|
|
36
|
+
* @alias module:model/BatchDeleteMemorySelectorRequest
|
|
37
|
+
*/
|
|
38
|
+
function BatchDeleteMemorySelectorRequest() {
|
|
39
|
+
_classCallCheck(this, BatchDeleteMemorySelectorRequest);
|
|
40
|
+
BatchDeleteMemorySelectorRequest.initialize(this);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Initializes the fields of this object.
|
|
45
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
46
|
+
* Only for internal use.
|
|
47
|
+
*/
|
|
48
|
+
return _createClass(BatchDeleteMemorySelectorRequest, null, [{
|
|
49
|
+
key: "initialize",
|
|
50
|
+
value: function initialize(obj) {}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Constructs a <code>BatchDeleteMemorySelectorRequest</code> from a plain JavaScript object, optionally creating a new instance.
|
|
54
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
55
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
56
|
+
* @param {module:model/BatchDeleteMemorySelectorRequest} obj Optional instance to populate.
|
|
57
|
+
* @return {module:model/BatchDeleteMemorySelectorRequest} The populated <code>BatchDeleteMemorySelectorRequest</code> instance.
|
|
58
|
+
*/
|
|
59
|
+
}, {
|
|
60
|
+
key: "constructFromObject",
|
|
61
|
+
value: function constructFromObject(data, obj) {
|
|
62
|
+
if (data) {
|
|
63
|
+
obj = obj || new BatchDeleteMemorySelectorRequest();
|
|
64
|
+
if (data.hasOwnProperty('memoryId')) {
|
|
65
|
+
obj['memoryId'] = _ApiClient["default"].convertToType(data['memoryId'], 'String');
|
|
66
|
+
}
|
|
67
|
+
if (data.hasOwnProperty('filterSelector')) {
|
|
68
|
+
obj['filterSelector'] = _ApiClient["default"].convertToType(data['filterSelector'], _FilteredDeleteMemorySelectorRequest["default"]);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return obj;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Validates the JSON data with respect to <code>BatchDeleteMemorySelectorRequest</code>.
|
|
76
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
77
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>BatchDeleteMemorySelectorRequest</code>.
|
|
78
|
+
*/
|
|
79
|
+
}, {
|
|
80
|
+
key: "validateJSON",
|
|
81
|
+
value: function validateJSON(data) {
|
|
82
|
+
// ensure the json data is a string
|
|
83
|
+
if (data['memoryId'] && !(typeof data['memoryId'] === 'string' || data['memoryId'] instanceof String)) {
|
|
84
|
+
throw new Error("Expected the field `memoryId` to be a primitive type in the JSON string but got " + data['memoryId']);
|
|
85
|
+
}
|
|
86
|
+
// validate the optional field `filterSelector`
|
|
87
|
+
if (data['filterSelector']) {
|
|
88
|
+
// data not null
|
|
89
|
+
_FilteredDeleteMemorySelectorRequest["default"].validateJSON(data['filterSelector']);
|
|
90
|
+
}
|
|
91
|
+
return true;
|
|
92
|
+
}
|
|
93
|
+
}]);
|
|
94
|
+
}();
|
|
95
|
+
/**
|
|
96
|
+
* Deletes one specific memory by UUID
|
|
97
|
+
* @member {String} memoryId
|
|
98
|
+
*/
|
|
99
|
+
BatchDeleteMemorySelectorRequest.prototype['memoryId'] = undefined;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Deletes a filtered set of memories within a specific space
|
|
103
|
+
* @member {module:model/FilteredDeleteMemorySelectorRequest} filterSelector
|
|
104
|
+
*/
|
|
105
|
+
BatchDeleteMemorySelectorRequest.prototype['filterSelector'] = undefined;
|
|
106
|
+
var _default = exports["default"] = BatchDeleteMemorySelectorRequest;
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _BatchDeleteMemorySelectorRequest = _interopRequireDefault(require("./BatchDeleteMemorySelectorRequest"));
|
|
8
9
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
10
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
11
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
@@ -34,13 +35,13 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
34
35
|
var BatchMemoryDeletionRequest = /*#__PURE__*/function () {
|
|
35
36
|
/**
|
|
36
37
|
* Constructs a new <code>BatchMemoryDeletionRequest</code>.
|
|
37
|
-
* Request body for deleting
|
|
38
|
+
* Request body for deleting memories using ID and/or filtered selectors
|
|
38
39
|
* @alias module:model/BatchMemoryDeletionRequest
|
|
39
|
-
* @param
|
|
40
|
+
* @param requests {Array.<module:model/BatchDeleteMemorySelectorRequest>} Array of delete selectors
|
|
40
41
|
*/
|
|
41
|
-
function BatchMemoryDeletionRequest(
|
|
42
|
+
function BatchMemoryDeletionRequest(requests) {
|
|
42
43
|
_classCallCheck(this, BatchMemoryDeletionRequest);
|
|
43
|
-
BatchMemoryDeletionRequest.initialize(this,
|
|
44
|
+
BatchMemoryDeletionRequest.initialize(this, requests);
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
/**
|
|
@@ -50,8 +51,8 @@ var BatchMemoryDeletionRequest = /*#__PURE__*/function () {
|
|
|
50
51
|
*/
|
|
51
52
|
return _createClass(BatchMemoryDeletionRequest, null, [{
|
|
52
53
|
key: "initialize",
|
|
53
|
-
value: function initialize(obj,
|
|
54
|
-
obj['
|
|
54
|
+
value: function initialize(obj, requests) {
|
|
55
|
+
obj['requests'] = requests;
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
/**
|
|
@@ -66,8 +67,8 @@ var BatchMemoryDeletionRequest = /*#__PURE__*/function () {
|
|
|
66
67
|
value: function constructFromObject(data, obj) {
|
|
67
68
|
if (data) {
|
|
68
69
|
obj = obj || new BatchMemoryDeletionRequest();
|
|
69
|
-
if (data.hasOwnProperty('
|
|
70
|
-
obj['
|
|
70
|
+
if (data.hasOwnProperty('requests')) {
|
|
71
|
+
obj['requests'] = _ApiClient["default"].convertToType(data['requests'], [_BatchDeleteMemorySelectorRequest["default"]]);
|
|
71
72
|
}
|
|
72
73
|
}
|
|
73
74
|
return obj;
|
|
@@ -91,24 +92,41 @@ var BatchMemoryDeletionRequest = /*#__PURE__*/function () {
|
|
|
91
92
|
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
92
93
|
}
|
|
93
94
|
}
|
|
94
|
-
// ensure the json data is an array
|
|
95
95
|
} catch (err) {
|
|
96
96
|
_iterator.e(err);
|
|
97
97
|
} finally {
|
|
98
98
|
_iterator.f();
|
|
99
99
|
}
|
|
100
|
-
if (
|
|
101
|
-
|
|
100
|
+
if (data['requests']) {
|
|
101
|
+
// data not null
|
|
102
|
+
// ensure the json data is an array
|
|
103
|
+
if (!Array.isArray(data['requests'])) {
|
|
104
|
+
throw new Error("Expected the field `requests` to be an array in the JSON data but got " + data['requests']);
|
|
105
|
+
}
|
|
106
|
+
// validate the optional field `requests` (array)
|
|
107
|
+
var _iterator2 = _createForOfIteratorHelper(data['requests']),
|
|
108
|
+
_step2;
|
|
109
|
+
try {
|
|
110
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
111
|
+
var item = _step2.value;
|
|
112
|
+
_BatchDeleteMemorySelectorRequest["default"].validateJSON(item);
|
|
113
|
+
}
|
|
114
|
+
} catch (err) {
|
|
115
|
+
_iterator2.e(err);
|
|
116
|
+
} finally {
|
|
117
|
+
_iterator2.f();
|
|
118
|
+
}
|
|
119
|
+
;
|
|
102
120
|
}
|
|
103
121
|
return true;
|
|
104
122
|
}
|
|
105
123
|
}]);
|
|
106
124
|
}();
|
|
107
|
-
BatchMemoryDeletionRequest.RequiredProperties = ["
|
|
125
|
+
BatchMemoryDeletionRequest.RequiredProperties = ["requests"];
|
|
108
126
|
|
|
109
127
|
/**
|
|
110
|
-
* Array of
|
|
111
|
-
* @member {Array.<
|
|
128
|
+
* Array of delete selectors
|
|
129
|
+
* @member {Array.<module:model/BatchDeleteMemorySelectorRequest>} requests
|
|
112
130
|
*/
|
|
113
|
-
BatchMemoryDeletionRequest.prototype['
|
|
131
|
+
BatchMemoryDeletionRequest.prototype['requests'] = undefined;
|
|
114
132
|
var _default = exports["default"] = BatchMemoryDeletionRequest;
|
|
@@ -75,10 +75,10 @@ var BatchMemoryResult = /*#__PURE__*/function () {
|
|
|
75
75
|
obj['memoryId'] = _ApiClient["default"].convertToType(data['memoryId'], 'String');
|
|
76
76
|
}
|
|
77
77
|
if (data.hasOwnProperty('memory')) {
|
|
78
|
-
obj['memory'] =
|
|
78
|
+
obj['memory'] = _ApiClient["default"].convertToType(data['memory'], _Memory["default"]);
|
|
79
79
|
}
|
|
80
80
|
if (data.hasOwnProperty('error')) {
|
|
81
|
-
obj['error'] =
|
|
81
|
+
obj['error'] = _ApiClient["default"].convertToType(data['error'], _ErrorDetail["default"]);
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
return obj;
|
|
@@ -140,11 +140,13 @@ BatchMemoryResult.prototype['success'] = undefined;
|
|
|
140
140
|
BatchMemoryResult.prototype['memoryId'] = undefined;
|
|
141
141
|
|
|
142
142
|
/**
|
|
143
|
+
* Created or retrieved memory (present when the operation returns a memory on success)
|
|
143
144
|
* @member {module:model/Memory} memory
|
|
144
145
|
*/
|
|
145
146
|
BatchMemoryResult.prototype['memory'] = undefined;
|
|
146
147
|
|
|
147
148
|
/**
|
|
149
|
+
* Error details when success is false
|
|
148
150
|
* @member {module:model/ErrorDetail} error
|
|
149
151
|
*/
|
|
150
152
|
BatchMemoryResult.prototype['error'] = undefined;
|
|
@@ -38,7 +38,7 @@ var ChunkReference = /*#__PURE__*/function () {
|
|
|
38
38
|
* Reference to a memory chunk with pointer to its parent memory
|
|
39
39
|
* @alias module:model/ChunkReference
|
|
40
40
|
* @param resultSetId {String} Result set ID that produced this chunk
|
|
41
|
-
* @param chunk {module:model/MemoryChunkResponse}
|
|
41
|
+
* @param chunk {module:model/MemoryChunkResponse} The memory chunk data
|
|
42
42
|
* @param memoryIndex {Number} Index of the chunk's memory in the client's memories array
|
|
43
43
|
* @param relevanceScore {Number} Relevance score for this chunk (0.0 to 1.0)
|
|
44
44
|
*/
|
|
@@ -77,7 +77,7 @@ var ChunkReference = /*#__PURE__*/function () {
|
|
|
77
77
|
obj['resultSetId'] = _ApiClient["default"].convertToType(data['resultSetId'], 'String');
|
|
78
78
|
}
|
|
79
79
|
if (data.hasOwnProperty('chunk')) {
|
|
80
|
-
obj['chunk'] =
|
|
80
|
+
obj['chunk'] = _ApiClient["default"].convertToType(data['chunk'], _MemoryChunkResponse["default"]);
|
|
81
81
|
}
|
|
82
82
|
if (data.hasOwnProperty('memoryIndex')) {
|
|
83
83
|
obj['memoryIndex'] = _ApiClient["default"].convertToType(data['memoryIndex'], 'Number');
|
|
@@ -134,6 +134,7 @@ ChunkReference.RequiredProperties = ["resultSetId", "chunk", "memoryIndex", "rel
|
|
|
134
134
|
ChunkReference.prototype['resultSetId'] = undefined;
|
|
135
135
|
|
|
136
136
|
/**
|
|
137
|
+
* The memory chunk data
|
|
137
138
|
* @member {module:model/MemoryChunkResponse} chunk
|
|
138
139
|
*/
|
|
139
140
|
ChunkReference.prototype['chunk'] = undefined;
|