@pairsystems/goodmem-client 1.0.4 → 1.0.6

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.
Files changed (41) hide show
  1. package/README.md +28 -12
  2. package/dist/api/AdministrationApi.js +158 -0
  3. package/dist/api/EmbeddersApi.js +6 -6
  4. package/dist/api/LLMsApi.js +2 -2
  5. package/dist/api/MemoriesApi.js +77 -18
  6. package/dist/api/RerankersApi.js +4 -4
  7. package/dist/api/SystemApi.js +39 -5
  8. package/dist/index.js +133 -0
  9. package/dist/model/ActiveLicenseMetadata.js +140 -0
  10. package/dist/model/AdminDrainRequest.js +105 -0
  11. package/dist/model/AdminDrainResponse.js +132 -0
  12. package/dist/model/AdminPurgeJobsRequest.js +117 -0
  13. package/dist/model/AdminPurgeJobsResponse.js +138 -0
  14. package/dist/model/AdminReloadLicenseResponse.js +115 -0
  15. package/dist/model/ApiKeyAuth.js +131 -0
  16. package/dist/model/BackgroundJobAttempt.js +242 -0
  17. package/dist/model/BackgroundJobSummary.js +215 -0
  18. package/dist/model/BatchMemoryResponse.js +132 -0
  19. package/dist/model/BatchMemoryResult.js +151 -0
  20. package/dist/model/BatchMemoryRetrievalRequest.js +9 -0
  21. package/dist/model/CreateApiKeyRequest.js +13 -0
  22. package/dist/model/CredentialKind.js +63 -0
  23. package/dist/model/EmbedderCreationRequest.js +25 -13
  24. package/dist/model/EndpointAuthentication.js +149 -0
  25. package/dist/model/ErrorDetail.js +125 -0
  26. package/dist/model/GcpAdcAuth.js +104 -0
  27. package/dist/model/LLMCreationRequest.js +24 -14
  28. package/dist/model/LLMUpdateRequest.js +7 -6
  29. package/dist/model/Memory.js +36 -0
  30. package/dist/model/MemoryCreationRequest.js +13 -0
  31. package/dist/model/PostProcessor.js +4 -4
  32. package/dist/model/ProcessingHistory.js +126 -0
  33. package/dist/model/ProviderType.js +15 -0
  34. package/dist/model/RerankerCreationRequest.js +20 -6
  35. package/dist/model/SecretReference.js +101 -0
  36. package/dist/model/SpaceCreationRequest.js +13 -0
  37. package/dist/model/SpaceKey.js +13 -0
  38. package/dist/model/SystemInfoResponse.js +192 -0
  39. package/dist/model/UpdateEmbedderRequest.js +7 -6
  40. package/dist/model/UpdateRerankerRequest.js +7 -6
  41. package/package.json +2 -1
@@ -0,0 +1,104 @@
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
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
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 _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
11
+ 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
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
13
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
+ 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); } /**
15
+ *
16
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
17
+ *
18
+ * The version of the OpenAPI document:
19
+ *
20
+ *
21
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
22
+ * https://openapi-generator.tech
23
+ * Do not edit the class manually.
24
+ *
25
+ */
26
+ /**
27
+ * The GcpAdcAuth model module.
28
+ * @module model/GcpAdcAuth
29
+ * @version 1.0.0
30
+ */
31
+ var GcpAdcAuth = /*#__PURE__*/function () {
32
+ /**
33
+ * Constructs a new <code>GcpAdcAuth</code>.
34
+ * Configuration for Google Application Default Credentials (ADC).
35
+ * @alias module:model/GcpAdcAuth
36
+ */
37
+ function GcpAdcAuth() {
38
+ _classCallCheck(this, GcpAdcAuth);
39
+ GcpAdcAuth.initialize(this);
40
+ }
41
+
42
+ /**
43
+ * Initializes the fields of this object.
44
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
45
+ * Only for internal use.
46
+ */
47
+ return _createClass(GcpAdcAuth, null, [{
48
+ key: "initialize",
49
+ value: function initialize(obj) {}
50
+
51
+ /**
52
+ * Constructs a <code>GcpAdcAuth</code> from a plain JavaScript object, optionally creating a new instance.
53
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
54
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
55
+ * @param {module:model/GcpAdcAuth} obj Optional instance to populate.
56
+ * @return {module:model/GcpAdcAuth} The populated <code>GcpAdcAuth</code> instance.
57
+ */
58
+ }, {
59
+ key: "constructFromObject",
60
+ value: function constructFromObject(data, obj) {
61
+ if (data) {
62
+ obj = obj || new GcpAdcAuth();
63
+ if (data.hasOwnProperty('scopes')) {
64
+ obj['scopes'] = _ApiClient["default"].convertToType(data['scopes'], ['String']);
65
+ }
66
+ if (data.hasOwnProperty('quotaProjectId')) {
67
+ obj['quotaProjectId'] = _ApiClient["default"].convertToType(data['quotaProjectId'], 'String');
68
+ }
69
+ }
70
+ return obj;
71
+ }
72
+
73
+ /**
74
+ * Validates the JSON data with respect to <code>GcpAdcAuth</code>.
75
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
76
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>GcpAdcAuth</code>.
77
+ */
78
+ }, {
79
+ key: "validateJSON",
80
+ value: function validateJSON(data) {
81
+ // ensure the json data is an array
82
+ if (!Array.isArray(data['scopes'])) {
83
+ throw new Error("Expected the field `scopes` to be an array in the JSON data but got " + data['scopes']);
84
+ }
85
+ // ensure the json data is a string
86
+ if (data['quotaProjectId'] && !(typeof data['quotaProjectId'] === 'string' || data['quotaProjectId'] instanceof String)) {
87
+ throw new Error("Expected the field `quotaProjectId` to be a primitive type in the JSON string but got " + data['quotaProjectId']);
88
+ }
89
+ return true;
90
+ }
91
+ }]);
92
+ }();
93
+ /**
94
+ * Additional OAuth scopes. Empty list falls back to the default cloud-platform scope.
95
+ * @member {Array.<String>} scopes
96
+ */
97
+ GcpAdcAuth.prototype['scopes'] = undefined;
98
+
99
+ /**
100
+ * Optional quota project used for billing
101
+ * @member {String} quotaProjectId
102
+ */
103
+ GcpAdcAuth.prototype['quotaProjectId'] = undefined;
104
+ var _default = exports["default"] = GcpAdcAuth;
@@ -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 _EndpointAuthentication = _interopRequireDefault(require("./EndpointAuthentication"));
8
9
  var _LLMCapabilities = _interopRequireDefault(require("./LLMCapabilities"));
9
10
  var _LLMProviderType = _interopRequireDefault(require("./LLMProviderType"));
10
11
  var _LLMSamplingParams = _interopRequireDefault(require("./LLMSamplingParams"));
@@ -44,12 +45,10 @@ var LLMCreationRequest = /*#__PURE__*/function () {
44
45
  * @param providerType {module:model/LLMProviderType}
45
46
  * @param endpointUrl {String} API endpoint URL
46
47
  * @param modelIdentifier {String} Model identifier
47
- * @param credentials {String} API credentials (empty allowed for local services)
48
- * @param capabilities {module:model/LLMCapabilities}
49
48
  */
50
- function LLMCreationRequest(displayName, providerType, endpointUrl, modelIdentifier, credentials, capabilities) {
49
+ function LLMCreationRequest(displayName, providerType, endpointUrl, modelIdentifier) {
51
50
  _classCallCheck(this, LLMCreationRequest);
52
- LLMCreationRequest.initialize(this, displayName, providerType, endpointUrl, modelIdentifier, credentials, capabilities);
51
+ LLMCreationRequest.initialize(this, displayName, providerType, endpointUrl, modelIdentifier);
53
52
  }
54
53
 
55
54
  /**
@@ -59,13 +58,11 @@ var LLMCreationRequest = /*#__PURE__*/function () {
59
58
  */
60
59
  return _createClass(LLMCreationRequest, null, [{
61
60
  key: "initialize",
62
- value: function initialize(obj, displayName, providerType, endpointUrl, modelIdentifier, credentials, capabilities) {
61
+ value: function initialize(obj, displayName, providerType, endpointUrl, modelIdentifier) {
63
62
  obj['displayName'] = displayName;
64
63
  obj['providerType'] = providerType;
65
64
  obj['endpointUrl'] = endpointUrl;
66
65
  obj['modelIdentifier'] = modelIdentifier;
67
- obj['credentials'] = credentials;
68
- obj['capabilities'] = capabilities;
69
66
  }
70
67
 
71
68
  /**
@@ -105,7 +102,7 @@ var LLMCreationRequest = /*#__PURE__*/function () {
105
102
  obj['supportedModalities'] = _ApiClient["default"].convertToType(data['supportedModalities'], [_Modality["default"]]);
106
103
  }
107
104
  if (data.hasOwnProperty('credentials')) {
108
- obj['credentials'] = _ApiClient["default"].convertToType(data['credentials'], 'String');
105
+ obj['credentials'] = _EndpointAuthentication["default"].constructFromObject(data['credentials']);
109
106
  }
110
107
  if (data.hasOwnProperty('labels')) {
111
108
  obj['labels'] = _ApiClient["default"].convertToType(data['labels'], {
@@ -135,6 +132,9 @@ var LLMCreationRequest = /*#__PURE__*/function () {
135
132
  if (data.hasOwnProperty('ownerId')) {
136
133
  obj['ownerId'] = _ApiClient["default"].convertToType(data['ownerId'], 'String');
137
134
  }
135
+ if (data.hasOwnProperty('llmId')) {
136
+ obj['llmId'] = _ApiClient["default"].convertToType(data['llmId'], 'String');
137
+ }
138
138
  }
139
139
  return obj;
140
140
  }
@@ -186,9 +186,10 @@ var LLMCreationRequest = /*#__PURE__*/function () {
186
186
  if (!Array.isArray(data['supportedModalities'])) {
187
187
  throw new Error("Expected the field `supportedModalities` to be an array in the JSON data but got " + data['supportedModalities']);
188
188
  }
189
- // ensure the json data is a string
190
- if (data['credentials'] && !(typeof data['credentials'] === 'string' || data['credentials'] instanceof String)) {
191
- throw new Error("Expected the field `credentials` to be a primitive type in the JSON string but got " + data['credentials']);
189
+ // validate the optional field `credentials`
190
+ if (data['credentials']) {
191
+ // data not null
192
+ _EndpointAuthentication["default"].validateJSON(data['credentials']);
192
193
  }
193
194
  // ensure the json data is a string
194
195
  if (data['version'] && !(typeof data['version'] === 'string' || data['version'] instanceof String)) {
@@ -212,11 +213,15 @@ var LLMCreationRequest = /*#__PURE__*/function () {
212
213
  if (data['ownerId'] && !(typeof data['ownerId'] === 'string' || data['ownerId'] instanceof String)) {
213
214
  throw new Error("Expected the field `ownerId` to be a primitive type in the JSON string but got " + data['ownerId']);
214
215
  }
216
+ // ensure the json data is a string
217
+ if (data['llmId'] && !(typeof data['llmId'] === 'string' || data['llmId'] instanceof String)) {
218
+ throw new Error("Expected the field `llmId` to be a primitive type in the JSON string but got " + data['llmId']);
219
+ }
215
220
  return true;
216
221
  }
217
222
  }]);
218
223
  }();
219
- LLMCreationRequest.RequiredProperties = ["displayName", "providerType", "endpointUrl", "modelIdentifier", "credentials", "capabilities"];
224
+ LLMCreationRequest.RequiredProperties = ["displayName", "providerType", "endpointUrl", "modelIdentifier"];
220
225
 
221
226
  /**
222
227
  * @member {Object} validate
@@ -265,8 +270,7 @@ LLMCreationRequest.prototype['modelIdentifier'] = undefined;
265
270
  LLMCreationRequest.prototype['supportedModalities'] = undefined;
266
271
 
267
272
  /**
268
- * API credentials (empty allowed for local services)
269
- * @member {String} credentials
273
+ * @member {module:model/EndpointAuthentication} credentials
270
274
  */
271
275
  LLMCreationRequest.prototype['credentials'] = undefined;
272
276
 
@@ -315,4 +319,10 @@ LLMCreationRequest.prototype['clientConfig'] = undefined;
315
319
  * @member {String} ownerId
316
320
  */
317
321
  LLMCreationRequest.prototype['ownerId'] = undefined;
322
+
323
+ /**
324
+ * Optional client-provided UUID for idempotent creation. If not provided, server generates a new UUID. Returns ALREADY_EXISTS if ID is already in use.
325
+ * @member {String} llmId
326
+ */
327
+ LLMCreationRequest.prototype['llmId'] = undefined;
318
328
  var _default = exports["default"] = LLMCreationRequest;
@@ -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 _EndpointAuthentication = _interopRequireDefault(require("./EndpointAuthentication"));
8
9
  var _LLMCapabilities = _interopRequireDefault(require("./LLMCapabilities"));
9
10
  var _LLMSamplingParams = _interopRequireDefault(require("./LLMSamplingParams"));
10
11
  var _Modality = _interopRequireDefault(require("./Modality"));
@@ -85,7 +86,7 @@ var LLMUpdateRequest = /*#__PURE__*/function () {
85
86
  obj['supportedModalities'] = _ApiClient["default"].convertToType(data['supportedModalities'], [_Modality["default"]]);
86
87
  }
87
88
  if (data.hasOwnProperty('credentials')) {
88
- obj['credentials'] = _ApiClient["default"].convertToType(data['credentials'], 'String');
89
+ obj['credentials'] = _EndpointAuthentication["default"].constructFromObject(data['credentials']);
89
90
  }
90
91
  if (data.hasOwnProperty('version')) {
91
92
  obj['version'] = _ApiClient["default"].convertToType(data['version'], 'String');
@@ -153,9 +154,10 @@ var LLMUpdateRequest = /*#__PURE__*/function () {
153
154
  if (!Array.isArray(data['supportedModalities'])) {
154
155
  throw new Error("Expected the field `supportedModalities` to be an array in the JSON data but got " + data['supportedModalities']);
155
156
  }
156
- // ensure the json data is a string
157
- if (data['credentials'] && !(typeof data['credentials'] === 'string' || data['credentials'] instanceof String)) {
158
- throw new Error("Expected the field `credentials` to be a primitive type in the JSON string but got " + data['credentials']);
157
+ // validate the optional field `credentials`
158
+ if (data['credentials']) {
159
+ // data not null
160
+ _EndpointAuthentication["default"].validateJSON(data['credentials']);
159
161
  }
160
162
  // ensure the json data is a string
161
163
  if (data['version'] && !(typeof data['version'] === 'string' || data['version'] instanceof String)) {
@@ -221,8 +223,7 @@ LLMUpdateRequest.prototype['modelIdentifier'] = undefined;
221
223
  LLMUpdateRequest.prototype['supportedModalities'] = undefined;
222
224
 
223
225
  /**
224
- * Update credentials (will be encrypted at rest)
225
- * @member {String} credentials
226
+ * @member {module:model/EndpointAuthentication} credentials
226
227
  */
227
228
  LLMUpdateRequest.prototype['credentials'] = undefined;
228
229
 
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
8
  var _ChunkingConfiguration = _interopRequireDefault(require("./ChunkingConfiguration"));
9
+ var _ProcessingHistory = _interopRequireDefault(require("./ProcessingHistory"));
9
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
11
  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
12
  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; } } }; }
@@ -90,6 +91,12 @@ var Memory = /*#__PURE__*/function () {
90
91
  if (data.hasOwnProperty('originalContent')) {
91
92
  obj['originalContent'] = _ApiClient["default"].convertToType(data['originalContent'], File);
92
93
  }
94
+ if (data.hasOwnProperty('originalContentLength')) {
95
+ obj['originalContentLength'] = _ApiClient["default"].convertToType(data['originalContentLength'], 'Number');
96
+ }
97
+ if (data.hasOwnProperty('originalContentSha256')) {
98
+ obj['originalContentSha256'] = _ApiClient["default"].convertToType(data['originalContentSha256'], 'String');
99
+ }
93
100
  if (data.hasOwnProperty('originalContentRef')) {
94
101
  obj['originalContentRef'] = _ApiClient["default"].convertToType(data['originalContentRef'], 'String');
95
102
  }
@@ -117,6 +124,9 @@ var Memory = /*#__PURE__*/function () {
117
124
  if (data.hasOwnProperty('chunkingConfig')) {
118
125
  obj['chunkingConfig'] = _ChunkingConfiguration["default"].constructFromObject(data['chunkingConfig']);
119
126
  }
127
+ if (data.hasOwnProperty('processingHistory')) {
128
+ obj['processingHistory'] = _ProcessingHistory["default"].constructFromObject(data['processingHistory']);
129
+ }
120
130
  }
121
131
  return obj;
122
132
  }
@@ -153,6 +163,10 @@ var Memory = /*#__PURE__*/function () {
153
163
  throw new Error("Expected the field `spaceId` to be a primitive type in the JSON string but got " + data['spaceId']);
154
164
  }
155
165
  // ensure the json data is a string
166
+ if (data['originalContentSha256'] && !(typeof data['originalContentSha256'] === 'string' || data['originalContentSha256'] instanceof String)) {
167
+ throw new Error("Expected the field `originalContentSha256` to be a primitive type in the JSON string but got " + data['originalContentSha256']);
168
+ }
169
+ // ensure the json data is a string
156
170
  if (data['originalContentRef'] && !(typeof data['originalContentRef'] === 'string' || data['originalContentRef'] instanceof String)) {
157
171
  throw new Error("Expected the field `originalContentRef` to be a primitive type in the JSON string but got " + data['originalContentRef']);
158
172
  }
@@ -177,6 +191,11 @@ var Memory = /*#__PURE__*/function () {
177
191
  // data not null
178
192
  _ChunkingConfiguration["default"].validateJSON(data['chunkingConfig']);
179
193
  }
194
+ // validate the optional field `processingHistory`
195
+ if (data['processingHistory']) {
196
+ // data not null
197
+ _ProcessingHistory["default"].validateJSON(data['processingHistory']);
198
+ }
180
199
  return true;
181
200
  }
182
201
  }]);
@@ -201,6 +220,18 @@ Memory.prototype['spaceId'] = undefined;
201
220
  */
202
221
  Memory.prototype['originalContent'] = undefined;
203
222
 
223
+ /**
224
+ * Size in bytes of the inline original content
225
+ * @member {Number} originalContentLength
226
+ */
227
+ Memory.prototype['originalContentLength'] = undefined;
228
+
229
+ /**
230
+ * SHA-256 digest of the inline original content, hex encoded
231
+ * @member {String} originalContentSha256
232
+ */
233
+ Memory.prototype['originalContentSha256'] = undefined;
234
+
204
235
  /**
205
236
  * Reference to external content location
206
237
  * @member {String} originalContentRef
@@ -253,4 +284,9 @@ Memory.prototype['updatedById'] = undefined;
253
284
  * @member {module:model/ChunkingConfiguration} chunkingConfig
254
285
  */
255
286
  Memory.prototype['chunkingConfig'] = undefined;
287
+
288
+ /**
289
+ * @member {module:model/ProcessingHistory} processingHistory
290
+ */
291
+ Memory.prototype['processingHistory'] = undefined;
256
292
  var _default = exports["default"] = Memory;
@@ -72,6 +72,9 @@ var MemoryCreationRequest = /*#__PURE__*/function () {
72
72
  if (data.hasOwnProperty('validate')) {
73
73
  obj['validate'] = _ApiClient["default"].convertToType(data['validate'], Object);
74
74
  }
75
+ if (data.hasOwnProperty('memoryId')) {
76
+ obj['memoryId'] = _ApiClient["default"].convertToType(data['memoryId'], 'String');
77
+ }
75
78
  if (data.hasOwnProperty('spaceId')) {
76
79
  obj['spaceId'] = _ApiClient["default"].convertToType(data['spaceId'], 'String');
77
80
  }
@@ -121,6 +124,10 @@ var MemoryCreationRequest = /*#__PURE__*/function () {
121
124
  } finally {
122
125
  _iterator.f();
123
126
  }
127
+ if (data['memoryId'] && !(typeof data['memoryId'] === 'string' || data['memoryId'] instanceof String)) {
128
+ throw new Error("Expected the field `memoryId` to be a primitive type in the JSON string but got " + data['memoryId']);
129
+ }
130
+ // ensure the json data is a string
124
131
  if (data['spaceId'] && !(typeof data['spaceId'] === 'string' || data['spaceId'] instanceof String)) {
125
132
  throw new Error("Expected the field `spaceId` to be a primitive type in the JSON string but got " + data['spaceId']);
126
133
  }
@@ -156,6 +163,12 @@ MemoryCreationRequest.RequiredProperties = ["spaceId", "contentType"];
156
163
  */
157
164
  MemoryCreationRequest.prototype['validate'] = undefined;
158
165
 
166
+ /**
167
+ * Optional client-provided UUID for the memory. If omitted, the server generates one. Returns ALREADY_EXISTS if the ID is already in use.
168
+ * @member {String} memoryId
169
+ */
170
+ MemoryCreationRequest.prototype['memoryId'] = undefined;
171
+
159
172
  /**
160
173
  * ID of the space where this memory will be stored
161
174
  * @member {String} spaceId
@@ -34,9 +34,9 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
34
34
  var PostProcessor = /*#__PURE__*/function () {
35
35
  /**
36
36
  * Constructs a new <code>PostProcessor</code>.
37
- * Post-processor configuration for transforming retrieval results.
37
+ * Post-processor configuration for transforming retrieval results. Custom processors are discovered from installed extensions and must be referenced by their fully qualified factory class name. See https://docs.goodmem.ai/docs/reference/post-processors/chat-post-processor/ for the built-in ChatPostProcessor configuration.
38
38
  * @alias module:model/PostProcessor
39
- * @param name {String} Name of the post-processor to apply.
39
+ * @param name {String} Fully qualified factory class name of the post-processor to apply.
40
40
  */
41
41
  function PostProcessor(name) {
42
42
  _classCallCheck(this, PostProcessor);
@@ -112,13 +112,13 @@ var PostProcessor = /*#__PURE__*/function () {
112
112
  PostProcessor.RequiredProperties = ["name"];
113
113
 
114
114
  /**
115
- * Name of the post-processor to apply.
115
+ * Fully qualified factory class name of the post-processor to apply.
116
116
  * @member {String} name
117
117
  */
118
118
  PostProcessor.prototype['name'] = undefined;
119
119
 
120
120
  /**
121
- * Configuration parameters for the post-processor.
121
+ * Configuration parameters for the post-processor. Fields depend on the selected processor; see the linked documentation for the built-in ChatPostProcessor schema.
122
122
  * @member {Object.<String, Object>} config
123
123
  */
124
124
  PostProcessor.prototype['config'] = undefined;
@@ -0,0 +1,126 @@
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 _BackgroundJobAttempt = _interopRequireDefault(require("./BackgroundJobAttempt"));
9
+ var _BackgroundJobSummary = _interopRequireDefault(require("./BackgroundJobSummary"));
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
+ 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); }
12
+ 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; } } }; }
13
+ 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; } }
14
+ 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; }
15
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
16
+ 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); } }
17
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
18
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
19
+ 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); } /**
20
+ *
21
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
22
+ *
23
+ * The version of the OpenAPI document:
24
+ *
25
+ *
26
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
27
+ * https://openapi-generator.tech
28
+ * Do not edit the class manually.
29
+ *
30
+ */
31
+ /**
32
+ * The ProcessingHistory model module.
33
+ * @module model/ProcessingHistory
34
+ * @version 1.0.0
35
+ */
36
+ var ProcessingHistory = /*#__PURE__*/function () {
37
+ /**
38
+ * Constructs a new <code>ProcessingHistory</code>.
39
+ * Background job execution history associated with a memory
40
+ * @alias module:model/ProcessingHistory
41
+ */
42
+ function ProcessingHistory() {
43
+ _classCallCheck(this, ProcessingHistory);
44
+ ProcessingHistory.initialize(this);
45
+ }
46
+
47
+ /**
48
+ * Initializes the fields of this object.
49
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
50
+ * Only for internal use.
51
+ */
52
+ return _createClass(ProcessingHistory, null, [{
53
+ key: "initialize",
54
+ value: function initialize(obj) {}
55
+
56
+ /**
57
+ * Constructs a <code>ProcessingHistory</code> from a plain JavaScript object, optionally creating a new instance.
58
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
59
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
60
+ * @param {module:model/ProcessingHistory} obj Optional instance to populate.
61
+ * @return {module:model/ProcessingHistory} The populated <code>ProcessingHistory</code> instance.
62
+ */
63
+ }, {
64
+ key: "constructFromObject",
65
+ value: function constructFromObject(data, obj) {
66
+ if (data) {
67
+ obj = obj || new ProcessingHistory();
68
+ if (data.hasOwnProperty('latestJob')) {
69
+ obj['latestJob'] = _BackgroundJobSummary["default"].constructFromObject(data['latestJob']);
70
+ }
71
+ if (data.hasOwnProperty('attempts')) {
72
+ obj['attempts'] = _ApiClient["default"].convertToType(data['attempts'], [_BackgroundJobAttempt["default"]]);
73
+ }
74
+ }
75
+ return obj;
76
+ }
77
+
78
+ /**
79
+ * Validates the JSON data with respect to <code>ProcessingHistory</code>.
80
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
81
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>ProcessingHistory</code>.
82
+ */
83
+ }, {
84
+ key: "validateJSON",
85
+ value: function validateJSON(data) {
86
+ // validate the optional field `latestJob`
87
+ if (data['latestJob']) {
88
+ // data not null
89
+ _BackgroundJobSummary["default"].validateJSON(data['latestJob']);
90
+ }
91
+ if (data['attempts']) {
92
+ // data not null
93
+ // ensure the json data is an array
94
+ if (!Array.isArray(data['attempts'])) {
95
+ throw new Error("Expected the field `attempts` to be an array in the JSON data but got " + data['attempts']);
96
+ }
97
+ // validate the optional field `attempts` (array)
98
+ var _iterator = _createForOfIteratorHelper(data['attempts']),
99
+ _step;
100
+ try {
101
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
102
+ var item = _step.value;
103
+ _BackgroundJobAttempt["default"].validateJSON(item);
104
+ }
105
+ } catch (err) {
106
+ _iterator.e(err);
107
+ } finally {
108
+ _iterator.f();
109
+ }
110
+ ;
111
+ }
112
+ return true;
113
+ }
114
+ }]);
115
+ }();
116
+ /**
117
+ * @member {module:model/BackgroundJobSummary} latestJob
118
+ */
119
+ ProcessingHistory.prototype['latestJob'] = undefined;
120
+
121
+ /**
122
+ * Attempt-level telemetry captured for the latest job
123
+ * @member {Array.<module:model/BackgroundJobAttempt>} attempts
124
+ */
125
+ ProcessingHistory.prototype['attempts'] = undefined;
126
+ var _default = exports["default"] = ProcessingHistory;
@@ -52,6 +52,21 @@ var ProviderType = exports["default"] = /*#__PURE__*/function () {
52
52
  * @const
53
53
  */
54
54
  _defineProperty(this, "LLAMA_CPP", "LLAMA_CPP");
55
+ /**
56
+ * value: "VOYAGE"
57
+ * @const
58
+ */
59
+ _defineProperty(this, "VOYAGE", "VOYAGE");
60
+ /**
61
+ * value: "COHERE"
62
+ * @const
63
+ */
64
+ _defineProperty(this, "COHERE", "COHERE");
65
+ /**
66
+ * value: "JINA"
67
+ * @const
68
+ */
69
+ _defineProperty(this, "JINA", "JINA");
55
70
  }
56
71
  return _createClass(ProviderType, null, [{
57
72
  key: "constructFromObject",
@@ -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 _EndpointAuthentication = _interopRequireDefault(require("./EndpointAuthentication"));
8
9
  var _Modality = _interopRequireDefault(require("./Modality"));
9
10
  var _ProviderType = _interopRequireDefault(require("./ProviderType"));
10
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
@@ -99,7 +100,7 @@ var RerankerCreationRequest = /*#__PURE__*/function () {
99
100
  obj['supportedModalities'] = _ApiClient["default"].convertToType(data['supportedModalities'], [_Modality["default"]]);
100
101
  }
101
102
  if (data.hasOwnProperty('credentials')) {
102
- obj['credentials'] = _ApiClient["default"].convertToType(data['credentials'], 'String');
103
+ obj['credentials'] = _EndpointAuthentication["default"].constructFromObject(data['credentials']);
103
104
  }
104
105
  if (data.hasOwnProperty('labels')) {
105
106
  obj['labels'] = _ApiClient["default"].convertToType(data['labels'], {
@@ -115,6 +116,9 @@ var RerankerCreationRequest = /*#__PURE__*/function () {
115
116
  if (data.hasOwnProperty('ownerId')) {
116
117
  obj['ownerId'] = _ApiClient["default"].convertToType(data['ownerId'], 'String');
117
118
  }
119
+ if (data.hasOwnProperty('rerankerId')) {
120
+ obj['rerankerId'] = _ApiClient["default"].convertToType(data['rerankerId'], 'String');
121
+ }
118
122
  }
119
123
  return obj;
120
124
  }
@@ -166,9 +170,10 @@ var RerankerCreationRequest = /*#__PURE__*/function () {
166
170
  if (!Array.isArray(data['supportedModalities'])) {
167
171
  throw new Error("Expected the field `supportedModalities` to be an array in the JSON data but got " + data['supportedModalities']);
168
172
  }
169
- // ensure the json data is a string
170
- if (data['credentials'] && !(typeof data['credentials'] === 'string' || data['credentials'] instanceof String)) {
171
- throw new Error("Expected the field `credentials` to be a primitive type in the JSON string but got " + data['credentials']);
173
+ // validate the optional field `credentials`
174
+ if (data['credentials']) {
175
+ // data not null
176
+ _EndpointAuthentication["default"].validateJSON(data['credentials']);
172
177
  }
173
178
  // ensure the json data is a string
174
179
  if (data['version'] && !(typeof data['version'] === 'string' || data['version'] instanceof String)) {
@@ -182,6 +187,10 @@ var RerankerCreationRequest = /*#__PURE__*/function () {
182
187
  if (data['ownerId'] && !(typeof data['ownerId'] === 'string' || data['ownerId'] instanceof String)) {
183
188
  throw new Error("Expected the field `ownerId` to be a primitive type in the JSON string but got " + data['ownerId']);
184
189
  }
190
+ // ensure the json data is a string
191
+ if (data['rerankerId'] && !(typeof data['rerankerId'] === 'string' || data['rerankerId'] instanceof String)) {
192
+ throw new Error("Expected the field `rerankerId` to be a primitive type in the JSON string but got " + data['rerankerId']);
193
+ }
185
194
  return true;
186
195
  }
187
196
  }]);
@@ -235,8 +244,7 @@ RerankerCreationRequest.prototype['modelIdentifier'] = undefined;
235
244
  RerankerCreationRequest.prototype['supportedModalities'] = undefined;
236
245
 
237
246
  /**
238
- * API credentials (optional for local services)
239
- * @member {String} credentials
247
+ * @member {module:model/EndpointAuthentication} credentials
240
248
  */
241
249
  RerankerCreationRequest.prototype['credentials'] = undefined;
242
250
 
@@ -263,4 +271,10 @@ RerankerCreationRequest.prototype['monitoringEndpoint'] = undefined;
263
271
  * @member {String} ownerId
264
272
  */
265
273
  RerankerCreationRequest.prototype['ownerId'] = undefined;
274
+
275
+ /**
276
+ * Optional client-provided UUID for idempotent creation. If not provided, server generates a new UUID. Returns ALREADY_EXISTS if ID is already in use.
277
+ * @member {String} rerankerId
278
+ */
279
+ RerankerCreationRequest.prototype['rerankerId'] = undefined;
266
280
  var _default = exports["default"] = RerankerCreationRequest;