@pairsystems/goodmem-client 1.0.10 → 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.
Files changed (84) hide show
  1. package/README.md +24 -4
  2. package/dist/api/EmbeddersApi.js +25 -10
  3. package/dist/api/LLMsApi.js +25 -10
  4. package/dist/api/MemoriesApi.js +186 -61
  5. package/dist/api/RerankersApi.js +25 -10
  6. package/dist/api/SpacesApi.js +31 -16
  7. package/dist/index.js +133 -7
  8. package/dist/model/ActiveLicenseMetadata.js +5 -1
  9. package/dist/model/AdminDrainRequest.js +3 -0
  10. package/dist/model/AdminDrainResponse.js +33 -2
  11. package/dist/model/AdminPurgeJobsRequest.js +4 -0
  12. package/dist/model/AdminPurgeJobsResponse.js +8 -4
  13. package/dist/model/AdminReloadLicenseResponse.js +4 -1
  14. package/dist/model/ApiKeyAuth.js +7 -3
  15. package/dist/model/ApiKeyResponse.js +67 -5
  16. package/dist/model/BackgroundJobSummary.js +35 -2
  17. package/dist/model/BatchDeleteMemorySelectorRequest.js +2 -1
  18. package/dist/model/BatchMemoryResult.js +4 -2
  19. package/dist/model/ChunkReference.js +3 -2
  20. package/dist/model/ChunkingConfiguration.js +109 -47
  21. package/dist/model/ChunkingConfigurationOneOf.js +109 -0
  22. package/dist/model/ChunkingConfigurationOneOf1.js +109 -0
  23. package/dist/model/ChunkingConfigurationOneOf2.js +109 -0
  24. package/dist/model/ContextItem.js +91 -73
  25. package/dist/model/ContextItemOneOf.js +109 -0
  26. package/dist/model/ContextItemOneOf1.js +109 -0
  27. package/dist/model/CreateApiKeyResponse.js +2 -1
  28. package/dist/model/CreateLLMResponse.js +3 -2
  29. package/dist/model/EmbedderCreationRequest.js +8 -5
  30. package/dist/model/EmbedderResponse.js +16 -11
  31. package/dist/model/EndpointAuthentication.js +7 -4
  32. package/dist/model/HnswOptions.js +2 -1
  33. package/dist/model/JsonBatchMemoryCreationRequest.js +132 -0
  34. package/dist/model/JsonMemoryCreationContentRequirement.js +151 -0
  35. package/dist/model/JsonMemoryCreationContentRequirementOneOf.js +109 -0
  36. package/dist/model/JsonMemoryCreationContentRequirementOneOf1.js +109 -0
  37. package/dist/model/JsonMemoryCreationRequest.js +289 -0
  38. package/dist/model/LLMCreationRequest.js +12 -6
  39. package/dist/model/LLMResponse.js +18 -12
  40. package/dist/model/LLMUpdateRequest.js +6 -3
  41. package/dist/model/LLMUpdateRequestNot.js +118 -0
  42. package/dist/model/ListApiKeysResponse.js +29 -9
  43. package/dist/model/ListMemoryPageImagesResponse.js +145 -0
  44. package/dist/model/ListSpacesResponse.js +29 -9
  45. package/dist/model/Memory.js +106 -10
  46. package/dist/model/MemoryChunkResponse.js +30 -2
  47. package/dist/model/MemoryCreationRequest.js +15 -3
  48. package/dist/model/MemoryPageImage.js +225 -0
  49. package/dist/model/OcrCell.js +5 -3
  50. package/dist/model/OcrDocumentRequest.js +2 -1
  51. package/dist/model/OcrDocumentResponse.js +6 -4
  52. package/dist/model/OcrPage.js +9 -6
  53. package/dist/model/OcrPageResult.js +4 -2
  54. package/dist/model/PingEndpointInfo.js +3 -2
  55. package/dist/model/PingEvent.js +108 -50
  56. package/dist/model/PingEventOneOf.js +109 -0
  57. package/dist/model/PingEventOneOf1.js +109 -0
  58. package/dist/model/PingEventOneOf2.js +109 -0
  59. package/dist/model/PingOnceRequest.js +4 -2
  60. package/dist/model/PingResult.js +6 -4
  61. package/dist/model/PingStreamRequest.js +7 -3
  62. package/dist/model/PingSummary.js +3 -2
  63. package/dist/model/ProcessingHistory.js +2 -1
  64. package/dist/model/RecursiveChunkingConfiguration.js +6 -4
  65. package/dist/model/RerankerCreationRequest.js +5 -3
  66. package/dist/model/RerankerResponse.js +13 -9
  67. package/dist/model/ResultSetBoundary.js +20 -2
  68. package/dist/model/RetrieveMemoryEvent.js +10 -5
  69. package/dist/model/RetrieveMemoryRequest.js +12 -6
  70. package/dist/model/RetrievedItem.js +91 -42
  71. package/dist/model/RetrievedItemOneOf.js +109 -0
  72. package/dist/model/RetrievedItemOneOf1.js +109 -0
  73. package/dist/model/SecretReference.js +27 -4
  74. package/dist/model/SentenceChunkingConfiguration.js +3 -2
  75. package/dist/model/SortOrder.js +63 -0
  76. package/dist/model/Space.js +8 -5
  77. package/dist/model/SpaceCreationRequest.js +13 -8
  78. package/dist/model/SpaceEmbedderConfig.js +3 -1
  79. package/dist/model/SystemInfoResponse.js +13 -4
  80. package/dist/model/UpdateApiKeyRequest.js +19 -9
  81. package/dist/model/UpdateEmbedderRequest.js +2 -9
  82. package/dist/model/UpdateRerankerRequest.js +2 -9
  83. package/dist/model/UpdateSpaceRequest.js +0 -22
  84. package/package.json +1 -1
@@ -0,0 +1,109 @@
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 _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; }
13
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
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); } }
15
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
16
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
+ 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); } /**
18
+ *
19
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
20
+ *
21
+ * The version of the OpenAPI document:
22
+ *
23
+ *
24
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
25
+ * https://openapi-generator.tech
26
+ * Do not edit the class manually.
27
+ *
28
+ */
29
+ /**
30
+ * The JsonMemoryCreationContentRequirementOneOf1 model module.
31
+ * @module model/JsonMemoryCreationContentRequirementOneOf1
32
+ * @version 1.0.0
33
+ */
34
+ var JsonMemoryCreationContentRequirementOneOf1 = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>JsonMemoryCreationContentRequirementOneOf1</code>.
37
+ * @alias module:model/JsonMemoryCreationContentRequirementOneOf1
38
+ * @param originalContentB64 {Object}
39
+ */
40
+ function JsonMemoryCreationContentRequirementOneOf1(originalContentB64) {
41
+ _classCallCheck(this, JsonMemoryCreationContentRequirementOneOf1);
42
+ JsonMemoryCreationContentRequirementOneOf1.initialize(this, originalContentB64);
43
+ }
44
+
45
+ /**
46
+ * Initializes the fields of this object.
47
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
48
+ * Only for internal use.
49
+ */
50
+ return _createClass(JsonMemoryCreationContentRequirementOneOf1, null, [{
51
+ key: "initialize",
52
+ value: function initialize(obj, originalContentB64) {
53
+ obj['originalContentB64'] = originalContentB64;
54
+ }
55
+
56
+ /**
57
+ * Constructs a <code>JsonMemoryCreationContentRequirementOneOf1</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/JsonMemoryCreationContentRequirementOneOf1} obj Optional instance to populate.
61
+ * @return {module:model/JsonMemoryCreationContentRequirementOneOf1} The populated <code>JsonMemoryCreationContentRequirementOneOf1</code> instance.
62
+ */
63
+ }, {
64
+ key: "constructFromObject",
65
+ value: function constructFromObject(data, obj) {
66
+ if (data) {
67
+ obj = obj || new JsonMemoryCreationContentRequirementOneOf1();
68
+ if (data.hasOwnProperty('originalContentB64')) {
69
+ obj['originalContentB64'] = _ApiClient["default"].convertToType(data['originalContentB64'], Object);
70
+ }
71
+ }
72
+ return obj;
73
+ }
74
+
75
+ /**
76
+ * Validates the JSON data with respect to <code>JsonMemoryCreationContentRequirementOneOf1</code>.
77
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
78
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>JsonMemoryCreationContentRequirementOneOf1</code>.
79
+ */
80
+ }, {
81
+ key: "validateJSON",
82
+ value: function validateJSON(data) {
83
+ // check to make sure all required properties are present in the JSON string
84
+ var _iterator = _createForOfIteratorHelper(JsonMemoryCreationContentRequirementOneOf1.RequiredProperties),
85
+ _step;
86
+ try {
87
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
88
+ var property = _step.value;
89
+ // null-value check for oneOf discrimination (see build.sh)
90
+ if (!data.hasOwnProperty(property) || data[property] === null || data[property] === undefined) {
91
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
92
+ }
93
+ }
94
+ } catch (err) {
95
+ _iterator.e(err);
96
+ } finally {
97
+ _iterator.f();
98
+ }
99
+ return true;
100
+ }
101
+ }]);
102
+ }();
103
+ JsonMemoryCreationContentRequirementOneOf1.RequiredProperties = ["originalContentB64"];
104
+
105
+ /**
106
+ * @member {Object} originalContentB64
107
+ */
108
+ JsonMemoryCreationContentRequirementOneOf1.prototype['originalContentB64'] = undefined;
109
+ var _default = exports["default"] = JsonMemoryCreationContentRequirementOneOf1;
@@ -0,0 +1,289 @@
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 _ChunkingConfiguration = _interopRequireDefault(require("./ChunkingConfiguration"));
9
+ var _JsonMemoryCreationContentRequirement = _interopRequireDefault(require("./JsonMemoryCreationContentRequirement"));
10
+ var _MemoryCreationRequest = _interopRequireDefault(require("./MemoryCreationRequest"));
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
12
+ 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); }
13
+ 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; } } }; }
14
+ 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; } }
15
+ 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; }
16
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
17
+ 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); } }
18
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
19
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
20
+ 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); } /**
21
+ *
22
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
23
+ *
24
+ * The version of the OpenAPI document:
25
+ *
26
+ *
27
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
28
+ * https://openapi-generator.tech
29
+ * Do not edit the class manually.
30
+ *
31
+ */
32
+ /**
33
+ * The JsonMemoryCreationRequest model module.
34
+ * @module model/JsonMemoryCreationRequest
35
+ * @version 1.0.0
36
+ */
37
+ var JsonMemoryCreationRequest = /*#__PURE__*/function () {
38
+ /**
39
+ * Constructs a new <code>JsonMemoryCreationRequest</code>.
40
+ * @alias module:model/JsonMemoryCreationRequest
41
+ * @implements module:model/MemoryCreationRequest
42
+ * @implements module:model/JsonMemoryCreationContentRequirement
43
+ * @param spaceId {String} ID of the space where this memory will be stored
44
+ * @param originalContent {Object}
45
+ * @param originalContentB64 {Object}
46
+ * @param contentType {String} MIME type of the content
47
+ */
48
+ function JsonMemoryCreationRequest(spaceId, originalContent, originalContentB64, contentType) {
49
+ _classCallCheck(this, JsonMemoryCreationRequest);
50
+ JsonMemoryCreationRequest.initialize(this, spaceId, originalContent, originalContentB64, contentType);
51
+ }
52
+
53
+ /**
54
+ * Initializes the fields of this object.
55
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
56
+ * Only for internal use.
57
+ */
58
+ return _createClass(JsonMemoryCreationRequest, null, [{
59
+ key: "initialize",
60
+ value: function initialize(obj, spaceId, originalContent, originalContentB64, contentType) {
61
+ obj['spaceId'] = spaceId;
62
+ obj['originalContent'] = originalContent;
63
+ obj['originalContentB64'] = originalContentB64;
64
+ obj['contentType'] = contentType;
65
+ }
66
+
67
+ /**
68
+ * Constructs a <code>JsonMemoryCreationRequest</code> from a plain JavaScript object, optionally creating a new instance.
69
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
70
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
71
+ * @param {module:model/JsonMemoryCreationRequest} obj Optional instance to populate.
72
+ * @return {module:model/JsonMemoryCreationRequest} The populated <code>JsonMemoryCreationRequest</code> instance.
73
+ */
74
+ }, {
75
+ key: "constructFromObject",
76
+ value: function constructFromObject(data, obj) {
77
+ if (data) {
78
+ obj = obj || new JsonMemoryCreationRequest();
79
+ _MemoryCreationRequest["default"].constructFromObject(data, obj);
80
+ _JsonMemoryCreationContentRequirement["default"].constructFromObject(data, obj);
81
+ if (data.hasOwnProperty('memoryId')) {
82
+ obj['memoryId'] = _ApiClient["default"].convertToType(data['memoryId'], 'String');
83
+ }
84
+ if (data.hasOwnProperty('spaceId')) {
85
+ obj['spaceId'] = _ApiClient["default"].convertToType(data['spaceId'], 'String');
86
+ }
87
+ if (data.hasOwnProperty('originalContent')) {
88
+ obj['originalContent'] = _ApiClient["default"].convertToType(data['originalContent'], Object);
89
+ }
90
+ if (data.hasOwnProperty('originalContentB64')) {
91
+ obj['originalContentB64'] = _ApiClient["default"].convertToType(data['originalContentB64'], Object);
92
+ }
93
+ if (data.hasOwnProperty('originalContentRef')) {
94
+ obj['originalContentRef'] = _ApiClient["default"].convertToType(data['originalContentRef'], 'String');
95
+ }
96
+ if (data.hasOwnProperty('contentType')) {
97
+ obj['contentType'] = _ApiClient["default"].convertToType(data['contentType'], 'String');
98
+ }
99
+ if (data.hasOwnProperty('metadata')) {
100
+ obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'], {
101
+ 'String': Object
102
+ });
103
+ }
104
+ if (data.hasOwnProperty('chunkingConfig')) {
105
+ obj['chunkingConfig'] = _ApiClient["default"].convertToType(data['chunkingConfig'], _ChunkingConfiguration["default"]);
106
+ }
107
+ if (data.hasOwnProperty('extractPageImages')) {
108
+ obj['extractPageImages'] = _ApiClient["default"].convertToType(data['extractPageImages'], 'Boolean');
109
+ }
110
+ if (data.hasOwnProperty('fileField')) {
111
+ obj['fileField'] = _ApiClient["default"].convertToType(data['fileField'], 'String');
112
+ }
113
+ }
114
+ return obj;
115
+ }
116
+
117
+ /**
118
+ * Validates the JSON data with respect to <code>JsonMemoryCreationRequest</code>.
119
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
120
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>JsonMemoryCreationRequest</code>.
121
+ */
122
+ }, {
123
+ key: "validateJSON",
124
+ value: function validateJSON(data) {
125
+ // check to make sure all required properties are present in the JSON string
126
+ var _iterator = _createForOfIteratorHelper(JsonMemoryCreationRequest.RequiredProperties),
127
+ _step;
128
+ try {
129
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
130
+ var property = _step.value;
131
+ if (!data.hasOwnProperty(property)) {
132
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
133
+ }
134
+ }
135
+ // ensure the json data is a string
136
+ } catch (err) {
137
+ _iterator.e(err);
138
+ } finally {
139
+ _iterator.f();
140
+ }
141
+ if (data['memoryId'] && !(typeof data['memoryId'] === 'string' || data['memoryId'] instanceof String)) {
142
+ throw new Error("Expected the field `memoryId` to be a primitive type in the JSON string but got " + data['memoryId']);
143
+ }
144
+ // ensure the json data is a string
145
+ if (data['spaceId'] && !(typeof data['spaceId'] === 'string' || data['spaceId'] instanceof String)) {
146
+ throw new Error("Expected the field `spaceId` to be a primitive type in the JSON string but got " + data['spaceId']);
147
+ }
148
+ // ensure the json data is a string
149
+ if (data['originalContentRef'] && !(typeof data['originalContentRef'] === 'string' || data['originalContentRef'] instanceof String)) {
150
+ throw new Error("Expected the field `originalContentRef` to be a primitive type in the JSON string but got " + data['originalContentRef']);
151
+ }
152
+ // ensure the json data is a string
153
+ if (data['contentType'] && !(typeof data['contentType'] === 'string' || data['contentType'] instanceof String)) {
154
+ throw new Error("Expected the field `contentType` to be a primitive type in the JSON string but got " + data['contentType']);
155
+ }
156
+ // validate the optional field `chunkingConfig`
157
+ if (data['chunkingConfig']) {
158
+ // data not null
159
+ _ChunkingConfiguration["default"].validateJSON(data['chunkingConfig']);
160
+ }
161
+ // ensure the json data is a string
162
+ if (data['fileField'] && !(typeof data['fileField'] === 'string' || data['fileField'] instanceof String)) {
163
+ throw new Error("Expected the field `fileField` to be a primitive type in the JSON string but got " + data['fileField']);
164
+ }
165
+ return true;
166
+ }
167
+ }]);
168
+ }();
169
+ JsonMemoryCreationRequest.RequiredProperties = ["spaceId", "contentType"];
170
+
171
+ /**
172
+ * Optional client-provided UUID for the memory. If omitted, the server generates one. Returns ALREADY_EXISTS if the ID is already in use.
173
+ * @member {String} memoryId
174
+ */
175
+ JsonMemoryCreationRequest.prototype['memoryId'] = undefined;
176
+
177
+ /**
178
+ * ID of the space where this memory will be stored
179
+ * @member {String} spaceId
180
+ */
181
+ JsonMemoryCreationRequest.prototype['spaceId'] = undefined;
182
+
183
+ /**
184
+ * @member {Object} originalContent
185
+ */
186
+ JsonMemoryCreationRequest.prototype['originalContent'] = undefined;
187
+
188
+ /**
189
+ * @member {Object} originalContentB64
190
+ */
191
+ JsonMemoryCreationRequest.prototype['originalContentB64'] = undefined;
192
+
193
+ /**
194
+ * Reference to external content location
195
+ * @member {String} originalContentRef
196
+ */
197
+ JsonMemoryCreationRequest.prototype['originalContentRef'] = undefined;
198
+
199
+ /**
200
+ * MIME type of the content
201
+ * @member {String} contentType
202
+ */
203
+ JsonMemoryCreationRequest.prototype['contentType'] = undefined;
204
+
205
+ /**
206
+ * Additional metadata for the memory
207
+ * @member {Object.<String, Object>} metadata
208
+ */
209
+ JsonMemoryCreationRequest.prototype['metadata'] = undefined;
210
+
211
+ /**
212
+ * Chunking strategy for this memory (if not provided, uses space default)
213
+ * @member {module:model/ChunkingConfiguration} chunkingConfig
214
+ */
215
+ JsonMemoryCreationRequest.prototype['chunkingConfig'] = undefined;
216
+
217
+ /**
218
+ * Optional hint to extract page images for eligible document types (for example, PDFs)
219
+ * @member {Boolean} extractPageImages
220
+ */
221
+ JsonMemoryCreationRequest.prototype['extractPageImages'] = undefined;
222
+
223
+ /**
224
+ * Optional multipart file field name to bind binary content; required when multiple files are uploaded in a batch multipart request.
225
+ * @member {String} fileField
226
+ */
227
+ JsonMemoryCreationRequest.prototype['fileField'] = undefined;
228
+
229
+ // Implement MemoryCreationRequest interface:
230
+ /**
231
+ * Optional client-provided UUID for the memory. If omitted, the server generates one. Returns ALREADY_EXISTS if the ID is already in use.
232
+ * @member {String} memoryId
233
+ */
234
+ _MemoryCreationRequest["default"].prototype['memoryId'] = undefined;
235
+ /**
236
+ * ID of the space where this memory will be stored
237
+ * @member {String} spaceId
238
+ */
239
+ _MemoryCreationRequest["default"].prototype['spaceId'] = undefined;
240
+ /**
241
+ * Original content as plain text (use either this or originalContentB64)
242
+ * @member {String} originalContent
243
+ */
244
+ _MemoryCreationRequest["default"].prototype['originalContent'] = undefined;
245
+ /**
246
+ * Original content as base64-encoded binary data (use either this or originalContent)
247
+ * @member {String} originalContentB64
248
+ */
249
+ _MemoryCreationRequest["default"].prototype['originalContentB64'] = undefined;
250
+ /**
251
+ * Reference to external content location
252
+ * @member {String} originalContentRef
253
+ */
254
+ _MemoryCreationRequest["default"].prototype['originalContentRef'] = undefined;
255
+ /**
256
+ * MIME type of the content
257
+ * @member {String} contentType
258
+ */
259
+ _MemoryCreationRequest["default"].prototype['contentType'] = undefined;
260
+ /**
261
+ * Additional metadata for the memory
262
+ * @member {Object.<String, Object>} metadata
263
+ */
264
+ _MemoryCreationRequest["default"].prototype['metadata'] = undefined;
265
+ /**
266
+ * Chunking strategy for this memory (if not provided, uses space default)
267
+ * @member {module:model/ChunkingConfiguration} chunkingConfig
268
+ */
269
+ _MemoryCreationRequest["default"].prototype['chunkingConfig'] = undefined;
270
+ /**
271
+ * Optional hint to extract page images for eligible document types (for example, PDFs)
272
+ * @member {Boolean} extractPageImages
273
+ */
274
+ _MemoryCreationRequest["default"].prototype['extractPageImages'] = undefined;
275
+ /**
276
+ * Optional multipart file field name to bind binary content; required when multiple files are uploaded in a batch multipart request.
277
+ * @member {String} fileField
278
+ */
279
+ _MemoryCreationRequest["default"].prototype['fileField'] = undefined;
280
+ // Implement JsonMemoryCreationContentRequirement interface:
281
+ /**
282
+ * @member {Object} originalContent
283
+ */
284
+ _JsonMemoryCreationContentRequirement["default"].prototype['originalContent'] = undefined;
285
+ /**
286
+ * @member {Object} originalContentB64
287
+ */
288
+ _JsonMemoryCreationContentRequirement["default"].prototype['originalContentB64'] = undefined;
289
+ var _default = exports["default"] = JsonMemoryCreationRequest;
@@ -42,7 +42,7 @@ var LLMCreationRequest = /*#__PURE__*/function () {
42
42
  * Request body for creating a new LLM. An LLM represents a configuration for text generation services.
43
43
  * @alias module:model/LLMCreationRequest
44
44
  * @param displayName {String} User-facing name of the LLM
45
- * @param providerType {module:model/LLMProviderType}
45
+ * @param providerType {module:model/LLMProviderType} Type of LLM provider
46
46
  * @param endpointUrl {String} API endpoint base URL (OpenAI-compatible base, typically ends with /v1)
47
47
  * @param modelIdentifier {String} Model identifier
48
48
  */
@@ -62,6 +62,7 @@ var LLMCreationRequest = /*#__PURE__*/function () {
62
62
  obj['displayName'] = displayName;
63
63
  obj['providerType'] = providerType;
64
64
  obj['endpointUrl'] = endpointUrl;
65
+ obj['apiPath'] = '/chat/completions';
65
66
  obj['modelIdentifier'] = modelIdentifier;
66
67
  }
67
68
 
@@ -84,7 +85,7 @@ var LLMCreationRequest = /*#__PURE__*/function () {
84
85
  obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
85
86
  }
86
87
  if (data.hasOwnProperty('providerType')) {
87
- obj['providerType'] = _LLMProviderType["default"].constructFromObject(data['providerType']);
88
+ obj['providerType'] = _ApiClient["default"].convertToType(data['providerType'], _LLMProviderType["default"]);
88
89
  }
89
90
  if (data.hasOwnProperty('endpointUrl')) {
90
91
  obj['endpointUrl'] = _ApiClient["default"].convertToType(data['endpointUrl'], 'String');
@@ -99,7 +100,7 @@ var LLMCreationRequest = /*#__PURE__*/function () {
99
100
  obj['supportedModalities'] = _ApiClient["default"].convertToType(data['supportedModalities'], [_Modality["default"]]);
100
101
  }
101
102
  if (data.hasOwnProperty('credentials')) {
102
- obj['credentials'] = _EndpointAuthentication["default"].constructFromObject(data['credentials']);
103
+ obj['credentials'] = _ApiClient["default"].convertToType(data['credentials'], _EndpointAuthentication["default"]);
103
104
  }
104
105
  if (data.hasOwnProperty('labels')) {
105
106
  obj['labels'] = _ApiClient["default"].convertToType(data['labels'], {
@@ -113,10 +114,10 @@ var LLMCreationRequest = /*#__PURE__*/function () {
113
114
  obj['monitoringEndpoint'] = _ApiClient["default"].convertToType(data['monitoringEndpoint'], 'String');
114
115
  }
115
116
  if (data.hasOwnProperty('capabilities')) {
116
- obj['capabilities'] = _LLMCapabilities["default"].constructFromObject(data['capabilities']);
117
+ obj['capabilities'] = _ApiClient["default"].convertToType(data['capabilities'], _LLMCapabilities["default"]);
117
118
  }
118
119
  if (data.hasOwnProperty('defaultSamplingParams')) {
119
- obj['defaultSamplingParams'] = _LLMSamplingParams["default"].constructFromObject(data['defaultSamplingParams']);
120
+ obj['defaultSamplingParams'] = _ApiClient["default"].convertToType(data['defaultSamplingParams'], _LLMSamplingParams["default"]);
120
121
  }
121
122
  if (data.hasOwnProperty('maxContextLength')) {
122
123
  obj['maxContextLength'] = _ApiClient["default"].convertToType(data['maxContextLength'], 'Number');
@@ -233,6 +234,7 @@ LLMCreationRequest.prototype['displayName'] = undefined;
233
234
  LLMCreationRequest.prototype['description'] = undefined;
234
235
 
235
236
  /**
237
+ * Type of LLM provider
236
238
  * @member {module:model/LLMProviderType} providerType
237
239
  */
238
240
  LLMCreationRequest.prototype['providerType'] = undefined;
@@ -246,8 +248,9 @@ LLMCreationRequest.prototype['endpointUrl'] = undefined;
246
248
  /**
247
249
  * API path for chat/completions request (defaults to /chat/completions if not provided)
248
250
  * @member {String} apiPath
251
+ * @default '/chat/completions'
249
252
  */
250
- LLMCreationRequest.prototype['apiPath'] = undefined;
253
+ LLMCreationRequest.prototype['apiPath'] = '/chat/completions';
251
254
 
252
255
  /**
253
256
  * Model identifier
@@ -262,6 +265,7 @@ LLMCreationRequest.prototype['modelIdentifier'] = undefined;
262
265
  LLMCreationRequest.prototype['supportedModalities'] = undefined;
263
266
 
264
267
  /**
268
+ * Structured credential payload describing how to authenticate with the provider. Omit for deployments that do not require credentials.
265
269
  * @member {module:model/EndpointAuthentication} credentials
266
270
  */
267
271
  LLMCreationRequest.prototype['credentials'] = undefined;
@@ -285,11 +289,13 @@ LLMCreationRequest.prototype['version'] = undefined;
285
289
  LLMCreationRequest.prototype['monitoringEndpoint'] = undefined;
286
290
 
287
291
  /**
292
+ * LLM capabilities defining supported features and modes. Optional - server infers capabilities from model identifier if not provided.
288
293
  * @member {module:model/LLMCapabilities} capabilities
289
294
  */
290
295
  LLMCreationRequest.prototype['capabilities'] = undefined;
291
296
 
292
297
  /**
298
+ * Default sampling parameters for generation requests
293
299
  * @member {module:model/LLMSamplingParams} defaultSamplingParams
294
300
  */
295
301
  LLMCreationRequest.prototype['defaultSamplingParams'] = undefined;
@@ -43,20 +43,21 @@ var LLMResponse = /*#__PURE__*/function () {
43
43
  * @alias module:model/LLMResponse
44
44
  * @param llmId {String} Unique identifier of the LLM
45
45
  * @param displayName {String} User-facing name of the LLM
46
- * @param providerType {module:model/LLMProviderType}
46
+ * @param providerType {module:model/LLMProviderType} Type of LLM provider
47
47
  * @param endpointUrl {String} API endpoint base URL
48
- * @param apiPath {String} API path for chat/completions request
49
48
  * @param modelIdentifier {String} Model identifier
50
- * @param capabilities {module:model/LLMCapabilities}
49
+ * @param supportedModalities {Array.<module:model/Modality>} Supported content modalities
50
+ * @param labels {Object.<String, String>} User-defined labels for categorization
51
+ * @param capabilities {module:model/LLMCapabilities} LLM capabilities defining supported features and modes
51
52
  * @param ownerId {String} Owner ID of the LLM
52
53
  * @param createdAt {Number} Creation timestamp (milliseconds since epoch)
53
54
  * @param updatedAt {Number} Last update timestamp (milliseconds since epoch)
54
55
  * @param createdById {String} ID of the user who created the LLM
55
56
  * @param updatedById {String} ID of the user who last updated the LLM
56
57
  */
57
- function LLMResponse(llmId, displayName, providerType, endpointUrl, apiPath, modelIdentifier, capabilities, ownerId, createdAt, updatedAt, createdById, updatedById) {
58
+ function LLMResponse(llmId, displayName, providerType, endpointUrl, modelIdentifier, supportedModalities, labels, capabilities, ownerId, createdAt, updatedAt, createdById, updatedById) {
58
59
  _classCallCheck(this, LLMResponse);
59
- LLMResponse.initialize(this, llmId, displayName, providerType, endpointUrl, apiPath, modelIdentifier, capabilities, ownerId, createdAt, updatedAt, createdById, updatedById);
60
+ LLMResponse.initialize(this, llmId, displayName, providerType, endpointUrl, modelIdentifier, supportedModalities, labels, capabilities, ownerId, createdAt, updatedAt, createdById, updatedById);
60
61
  }
61
62
 
62
63
  /**
@@ -66,13 +67,14 @@ var LLMResponse = /*#__PURE__*/function () {
66
67
  */
67
68
  return _createClass(LLMResponse, null, [{
68
69
  key: "initialize",
69
- value: function initialize(obj, llmId, displayName, providerType, endpointUrl, apiPath, modelIdentifier, capabilities, ownerId, createdAt, updatedAt, createdById, updatedById) {
70
+ value: function initialize(obj, llmId, displayName, providerType, endpointUrl, modelIdentifier, supportedModalities, labels, capabilities, ownerId, createdAt, updatedAt, createdById, updatedById) {
70
71
  obj['llmId'] = llmId;
71
72
  obj['displayName'] = displayName;
72
73
  obj['providerType'] = providerType;
73
74
  obj['endpointUrl'] = endpointUrl;
74
- obj['apiPath'] = apiPath;
75
75
  obj['modelIdentifier'] = modelIdentifier;
76
+ obj['supportedModalities'] = supportedModalities;
77
+ obj['labels'] = labels;
76
78
  obj['capabilities'] = capabilities;
77
79
  obj['ownerId'] = ownerId;
78
80
  obj['createdAt'] = createdAt;
@@ -103,7 +105,7 @@ var LLMResponse = /*#__PURE__*/function () {
103
105
  obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
104
106
  }
105
107
  if (data.hasOwnProperty('providerType')) {
106
- obj['providerType'] = _LLMProviderType["default"].constructFromObject(data['providerType']);
108
+ obj['providerType'] = _ApiClient["default"].convertToType(data['providerType'], _LLMProviderType["default"]);
107
109
  }
108
110
  if (data.hasOwnProperty('endpointUrl')) {
109
111
  obj['endpointUrl'] = _ApiClient["default"].convertToType(data['endpointUrl'], 'String');
@@ -118,7 +120,7 @@ var LLMResponse = /*#__PURE__*/function () {
118
120
  obj['supportedModalities'] = _ApiClient["default"].convertToType(data['supportedModalities'], [_Modality["default"]]);
119
121
  }
120
122
  if (data.hasOwnProperty('credentials')) {
121
- obj['credentials'] = _EndpointAuthentication["default"].constructFromObject(data['credentials']);
123
+ obj['credentials'] = _ApiClient["default"].convertToType(data['credentials'], _EndpointAuthentication["default"]);
122
124
  }
123
125
  if (data.hasOwnProperty('labels')) {
124
126
  obj['labels'] = _ApiClient["default"].convertToType(data['labels'], {
@@ -132,10 +134,10 @@ var LLMResponse = /*#__PURE__*/function () {
132
134
  obj['monitoringEndpoint'] = _ApiClient["default"].convertToType(data['monitoringEndpoint'], 'String');
133
135
  }
134
136
  if (data.hasOwnProperty('capabilities')) {
135
- obj['capabilities'] = _LLMCapabilities["default"].constructFromObject(data['capabilities']);
137
+ obj['capabilities'] = _ApiClient["default"].convertToType(data['capabilities'], _LLMCapabilities["default"]);
136
138
  }
137
139
  if (data.hasOwnProperty('defaultSamplingParams')) {
138
- obj['defaultSamplingParams'] = _LLMSamplingParams["default"].constructFromObject(data['defaultSamplingParams']);
140
+ obj['defaultSamplingParams'] = _ApiClient["default"].convertToType(data['defaultSamplingParams'], _LLMSamplingParams["default"]);
139
141
  }
140
142
  if (data.hasOwnProperty('maxContextLength')) {
141
143
  obj['maxContextLength'] = _ApiClient["default"].convertToType(data['maxContextLength'], 'Number');
@@ -254,7 +256,7 @@ var LLMResponse = /*#__PURE__*/function () {
254
256
  }
255
257
  }]);
256
258
  }();
257
- LLMResponse.RequiredProperties = ["llmId", "displayName", "providerType", "endpointUrl", "apiPath", "modelIdentifier", "capabilities", "ownerId", "createdAt", "updatedAt", "createdById", "updatedById"];
259
+ LLMResponse.RequiredProperties = ["llmId", "displayName", "providerType", "endpointUrl", "modelIdentifier", "supportedModalities", "labels", "capabilities", "ownerId", "createdAt", "updatedAt", "createdById", "updatedById"];
258
260
 
259
261
  /**
260
262
  * Unique identifier of the LLM
@@ -275,6 +277,7 @@ LLMResponse.prototype['displayName'] = undefined;
275
277
  LLMResponse.prototype['description'] = undefined;
276
278
 
277
279
  /**
280
+ * Type of LLM provider
278
281
  * @member {module:model/LLMProviderType} providerType
279
282
  */
280
283
  LLMResponse.prototype['providerType'] = undefined;
@@ -304,6 +307,7 @@ LLMResponse.prototype['modelIdentifier'] = undefined;
304
307
  LLMResponse.prototype['supportedModalities'] = undefined;
305
308
 
306
309
  /**
310
+ * Structured credential payload used for upstream authentication
307
311
  * @member {module:model/EndpointAuthentication} credentials
308
312
  */
309
313
  LLMResponse.prototype['credentials'] = undefined;
@@ -327,11 +331,13 @@ LLMResponse.prototype['version'] = undefined;
327
331
  LLMResponse.prototype['monitoringEndpoint'] = undefined;
328
332
 
329
333
  /**
334
+ * LLM capabilities defining supported features and modes
330
335
  * @member {module:model/LLMCapabilities} capabilities
331
336
  */
332
337
  LLMResponse.prototype['capabilities'] = undefined;
333
338
 
334
339
  /**
340
+ * Default sampling parameters for generation requests
335
341
  * @member {module:model/LLMSamplingParams} defaultSamplingParams
336
342
  */
337
343
  LLMResponse.prototype['defaultSamplingParams'] = undefined;
@@ -83,7 +83,7 @@ var LLMUpdateRequest = /*#__PURE__*/function () {
83
83
  obj['supportedModalities'] = _ApiClient["default"].convertToType(data['supportedModalities'], [_Modality["default"]]);
84
84
  }
85
85
  if (data.hasOwnProperty('credentials')) {
86
- obj['credentials'] = _EndpointAuthentication["default"].constructFromObject(data['credentials']);
86
+ obj['credentials'] = _ApiClient["default"].convertToType(data['credentials'], _EndpointAuthentication["default"]);
87
87
  }
88
88
  if (data.hasOwnProperty('version')) {
89
89
  obj['version'] = _ApiClient["default"].convertToType(data['version'], 'String');
@@ -92,10 +92,10 @@ var LLMUpdateRequest = /*#__PURE__*/function () {
92
92
  obj['monitoringEndpoint'] = _ApiClient["default"].convertToType(data['monitoringEndpoint'], 'String');
93
93
  }
94
94
  if (data.hasOwnProperty('capabilities')) {
95
- obj['capabilities'] = _LLMCapabilities["default"].constructFromObject(data['capabilities']);
95
+ obj['capabilities'] = _ApiClient["default"].convertToType(data['capabilities'], _LLMCapabilities["default"]);
96
96
  }
97
97
  if (data.hasOwnProperty('defaultSamplingParams')) {
98
- obj['defaultSamplingParams'] = _LLMSamplingParams["default"].constructFromObject(data['defaultSamplingParams']);
98
+ obj['defaultSamplingParams'] = _ApiClient["default"].convertToType(data['defaultSamplingParams'], _LLMSamplingParams["default"]);
99
99
  }
100
100
  if (data.hasOwnProperty('maxContextLength')) {
101
101
  obj['maxContextLength'] = _ApiClient["default"].convertToType(data['maxContextLength'], 'Number');
@@ -215,6 +215,7 @@ LLMUpdateRequest.prototype['modelIdentifier'] = undefined;
215
215
  LLMUpdateRequest.prototype['supportedModalities'] = undefined;
216
216
 
217
217
  /**
218
+ * Update credentials
218
219
  * @member {module:model/EndpointAuthentication} credentials
219
220
  */
220
221
  LLMUpdateRequest.prototype['credentials'] = undefined;
@@ -232,11 +233,13 @@ LLMUpdateRequest.prototype['version'] = undefined;
232
233
  LLMUpdateRequest.prototype['monitoringEndpoint'] = undefined;
233
234
 
234
235
  /**
236
+ * Update LLM capabilities (replaces entire capability set; clients MUST send all flags)
235
237
  * @member {module:model/LLMCapabilities} capabilities
236
238
  */
237
239
  LLMUpdateRequest.prototype['capabilities'] = undefined;
238
240
 
239
241
  /**
242
+ * Update default sampling parameters
240
243
  * @member {module:model/LLMSamplingParams} defaultSamplingParams
241
244
  */
242
245
  LLMUpdateRequest.prototype['defaultSamplingParams'] = undefined;