@pairsystems/goodmem-client 1.0.6 → 1.0.7

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 (44) hide show
  1. package/README.md +28 -2
  2. package/dist/api/EmbeddersApi.js +8 -8
  3. package/dist/api/LLMsApi.js +8 -8
  4. package/dist/api/MemoriesApi.js +36 -34
  5. package/dist/api/OCRApi.js +85 -0
  6. package/dist/api/PingApi.js +133 -0
  7. package/dist/api/RerankersApi.js +8 -8
  8. package/dist/api/SpacesApi.js +14 -14
  9. package/dist/index.js +175 -0
  10. package/dist/model/BatchMemoryCreationRequest.js +0 -8
  11. package/dist/model/BatchMemoryDeletionRequest.js +0 -8
  12. package/dist/model/BatchMemoryRetrievalRequest.js +0 -8
  13. package/dist/model/BoundingBox.js +143 -0
  14. package/dist/model/DocumentTimings.js +154 -0
  15. package/dist/model/EmbedderCreationRequest.js +0 -8
  16. package/dist/model/ImageInfo.js +132 -0
  17. package/dist/model/LLMCreationRequest.js +3 -11
  18. package/dist/model/LLMResponse.js +2 -2
  19. package/dist/model/LLMUpdateRequest.js +1 -9
  20. package/dist/model/MemoryCreationRequest.js +13 -8
  21. package/dist/model/OcrCategory.js +118 -0
  22. package/dist/model/OcrCell.js +154 -0
  23. package/dist/model/OcrDocumentRequest.js +159 -0
  24. package/dist/model/OcrDocumentResponse.js +170 -0
  25. package/dist/model/OcrInputFormat.js +78 -0
  26. package/dist/model/OcrLayout.js +132 -0
  27. package/dist/model/OcrPage.js +173 -0
  28. package/dist/model/OcrPageResult.js +138 -0
  29. package/dist/model/PageTimings.js +143 -0
  30. package/dist/model/PingEndpointInfo.js +170 -0
  31. package/dist/model/PingEvent.js +120 -0
  32. package/dist/model/PingNotice.js +140 -0
  33. package/dist/model/PingOnceRequest.js +163 -0
  34. package/dist/model/PingPayloadType.js +68 -0
  35. package/dist/model/PingResult.js +221 -0
  36. package/dist/model/PingStreamRequest.js +210 -0
  37. package/dist/model/PingSummary.js +269 -0
  38. package/dist/model/PingTargetType.js +68 -0
  39. package/dist/model/PingTiming.js +143 -0
  40. package/dist/model/RerankerCreationRequest.js +1 -9
  41. package/dist/model/RpcStatus.js +123 -0
  42. package/dist/model/SpaceCreationRequest.js +7 -5
  43. package/dist/model/SpaceEmbedderConfig.js +5 -7
  44. package/package.json +1 -1
@@ -0,0 +1,143 @@
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 BoundingBox model module.
31
+ * @module model/BoundingBox
32
+ * @version 1.0.0
33
+ */
34
+ var BoundingBox = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>BoundingBox</code>.
37
+ * Bounding box coordinates in page space.
38
+ * @alias module:model/BoundingBox
39
+ * @param x1 {Number} Left coordinate
40
+ * @param y1 {Number} Top coordinate
41
+ * @param x2 {Number} Right coordinate
42
+ * @param y2 {Number} Bottom coordinate
43
+ */
44
+ function BoundingBox(x1, y1, x2, y2) {
45
+ _classCallCheck(this, BoundingBox);
46
+ BoundingBox.initialize(this, x1, y1, x2, y2);
47
+ }
48
+
49
+ /**
50
+ * Initializes the fields of this object.
51
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
52
+ * Only for internal use.
53
+ */
54
+ return _createClass(BoundingBox, null, [{
55
+ key: "initialize",
56
+ value: function initialize(obj, x1, y1, x2, y2) {
57
+ obj['x1'] = x1;
58
+ obj['y1'] = y1;
59
+ obj['x2'] = x2;
60
+ obj['y2'] = y2;
61
+ }
62
+
63
+ /**
64
+ * Constructs a <code>BoundingBox</code> from a plain JavaScript object, optionally creating a new instance.
65
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
66
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
67
+ * @param {module:model/BoundingBox} obj Optional instance to populate.
68
+ * @return {module:model/BoundingBox} The populated <code>BoundingBox</code> instance.
69
+ */
70
+ }, {
71
+ key: "constructFromObject",
72
+ value: function constructFromObject(data, obj) {
73
+ if (data) {
74
+ obj = obj || new BoundingBox();
75
+ if (data.hasOwnProperty('x1')) {
76
+ obj['x1'] = _ApiClient["default"].convertToType(data['x1'], 'Number');
77
+ }
78
+ if (data.hasOwnProperty('y1')) {
79
+ obj['y1'] = _ApiClient["default"].convertToType(data['y1'], 'Number');
80
+ }
81
+ if (data.hasOwnProperty('x2')) {
82
+ obj['x2'] = _ApiClient["default"].convertToType(data['x2'], 'Number');
83
+ }
84
+ if (data.hasOwnProperty('y2')) {
85
+ obj['y2'] = _ApiClient["default"].convertToType(data['y2'], 'Number');
86
+ }
87
+ }
88
+ return obj;
89
+ }
90
+
91
+ /**
92
+ * Validates the JSON data with respect to <code>BoundingBox</code>.
93
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
94
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>BoundingBox</code>.
95
+ */
96
+ }, {
97
+ key: "validateJSON",
98
+ value: function validateJSON(data) {
99
+ // check to make sure all required properties are present in the JSON string
100
+ var _iterator = _createForOfIteratorHelper(BoundingBox.RequiredProperties),
101
+ _step;
102
+ try {
103
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
104
+ var property = _step.value;
105
+ if (!data.hasOwnProperty(property)) {
106
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
107
+ }
108
+ }
109
+ } catch (err) {
110
+ _iterator.e(err);
111
+ } finally {
112
+ _iterator.f();
113
+ }
114
+ return true;
115
+ }
116
+ }]);
117
+ }();
118
+ BoundingBox.RequiredProperties = ["x1", "y1", "x2", "y2"];
119
+
120
+ /**
121
+ * Left coordinate
122
+ * @member {Number} x1
123
+ */
124
+ BoundingBox.prototype['x1'] = undefined;
125
+
126
+ /**
127
+ * Top coordinate
128
+ * @member {Number} y1
129
+ */
130
+ BoundingBox.prototype['y1'] = undefined;
131
+
132
+ /**
133
+ * Right coordinate
134
+ * @member {Number} x2
135
+ */
136
+ BoundingBox.prototype['x2'] = undefined;
137
+
138
+ /**
139
+ * Bottom coordinate
140
+ * @member {Number} y2
141
+ */
142
+ BoundingBox.prototype['y2'] = undefined;
143
+ var _default = exports["default"] = BoundingBox;
@@ -0,0 +1,154 @@
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 DocumentTimings model module.
31
+ * @module model/DocumentTimings
32
+ * @version 1.0.0
33
+ */
34
+ var DocumentTimings = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>DocumentTimings</code>.
37
+ * Aggregate timing statistics for an OCR request.
38
+ * @alias module:model/DocumentTimings
39
+ * @param wallTimeMs {Number} End-to-end request time (ms)
40
+ * @param sumQueueWaitMs {Number} Sum of per-page queue wait times (ms)
41
+ * @param sumRenderMs {Number} Sum of per-page render times (ms)
42
+ * @param sumOcrMs {Number} Sum of per-page OCR times (ms)
43
+ * @param sumPageTotalMs {Number} Sum of per-page total times (ms)
44
+ */
45
+ function DocumentTimings(wallTimeMs, sumQueueWaitMs, sumRenderMs, sumOcrMs, sumPageTotalMs) {
46
+ _classCallCheck(this, DocumentTimings);
47
+ DocumentTimings.initialize(this, wallTimeMs, sumQueueWaitMs, sumRenderMs, sumOcrMs, sumPageTotalMs);
48
+ }
49
+
50
+ /**
51
+ * Initializes the fields of this object.
52
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
53
+ * Only for internal use.
54
+ */
55
+ return _createClass(DocumentTimings, null, [{
56
+ key: "initialize",
57
+ value: function initialize(obj, wallTimeMs, sumQueueWaitMs, sumRenderMs, sumOcrMs, sumPageTotalMs) {
58
+ obj['wallTimeMs'] = wallTimeMs;
59
+ obj['sumQueueWaitMs'] = sumQueueWaitMs;
60
+ obj['sumRenderMs'] = sumRenderMs;
61
+ obj['sumOcrMs'] = sumOcrMs;
62
+ obj['sumPageTotalMs'] = sumPageTotalMs;
63
+ }
64
+
65
+ /**
66
+ * Constructs a <code>DocumentTimings</code> from a plain JavaScript object, optionally creating a new instance.
67
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
68
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
69
+ * @param {module:model/DocumentTimings} obj Optional instance to populate.
70
+ * @return {module:model/DocumentTimings} The populated <code>DocumentTimings</code> instance.
71
+ */
72
+ }, {
73
+ key: "constructFromObject",
74
+ value: function constructFromObject(data, obj) {
75
+ if (data) {
76
+ obj = obj || new DocumentTimings();
77
+ if (data.hasOwnProperty('wallTimeMs')) {
78
+ obj['wallTimeMs'] = _ApiClient["default"].convertToType(data['wallTimeMs'], 'Number');
79
+ }
80
+ if (data.hasOwnProperty('sumQueueWaitMs')) {
81
+ obj['sumQueueWaitMs'] = _ApiClient["default"].convertToType(data['sumQueueWaitMs'], 'Number');
82
+ }
83
+ if (data.hasOwnProperty('sumRenderMs')) {
84
+ obj['sumRenderMs'] = _ApiClient["default"].convertToType(data['sumRenderMs'], 'Number');
85
+ }
86
+ if (data.hasOwnProperty('sumOcrMs')) {
87
+ obj['sumOcrMs'] = _ApiClient["default"].convertToType(data['sumOcrMs'], 'Number');
88
+ }
89
+ if (data.hasOwnProperty('sumPageTotalMs')) {
90
+ obj['sumPageTotalMs'] = _ApiClient["default"].convertToType(data['sumPageTotalMs'], 'Number');
91
+ }
92
+ }
93
+ return obj;
94
+ }
95
+
96
+ /**
97
+ * Validates the JSON data with respect to <code>DocumentTimings</code>.
98
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
99
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>DocumentTimings</code>.
100
+ */
101
+ }, {
102
+ key: "validateJSON",
103
+ value: function validateJSON(data) {
104
+ // check to make sure all required properties are present in the JSON string
105
+ var _iterator = _createForOfIteratorHelper(DocumentTimings.RequiredProperties),
106
+ _step;
107
+ try {
108
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
109
+ var property = _step.value;
110
+ if (!data.hasOwnProperty(property)) {
111
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
112
+ }
113
+ }
114
+ } catch (err) {
115
+ _iterator.e(err);
116
+ } finally {
117
+ _iterator.f();
118
+ }
119
+ return true;
120
+ }
121
+ }]);
122
+ }();
123
+ DocumentTimings.RequiredProperties = ["wallTimeMs", "sumQueueWaitMs", "sumRenderMs", "sumOcrMs", "sumPageTotalMs"];
124
+
125
+ /**
126
+ * End-to-end request time (ms)
127
+ * @member {Number} wallTimeMs
128
+ */
129
+ DocumentTimings.prototype['wallTimeMs'] = undefined;
130
+
131
+ /**
132
+ * Sum of per-page queue wait times (ms)
133
+ * @member {Number} sumQueueWaitMs
134
+ */
135
+ DocumentTimings.prototype['sumQueueWaitMs'] = undefined;
136
+
137
+ /**
138
+ * Sum of per-page render times (ms)
139
+ * @member {Number} sumRenderMs
140
+ */
141
+ DocumentTimings.prototype['sumRenderMs'] = undefined;
142
+
143
+ /**
144
+ * Sum of per-page OCR times (ms)
145
+ * @member {Number} sumOcrMs
146
+ */
147
+ DocumentTimings.prototype['sumOcrMs'] = undefined;
148
+
149
+ /**
150
+ * Sum of per-page total times (ms)
151
+ * @member {Number} sumPageTotalMs
152
+ */
153
+ DocumentTimings.prototype['sumPageTotalMs'] = undefined;
154
+ var _default = exports["default"] = DocumentTimings;
@@ -80,9 +80,6 @@ var EmbedderCreationRequest = /*#__PURE__*/function () {
80
80
  value: function constructFromObject(data, obj) {
81
81
  if (data) {
82
82
  obj = obj || new EmbedderCreationRequest();
83
- if (data.hasOwnProperty('validate')) {
84
- obj['validate'] = _ApiClient["default"].convertToType(data['validate'], Object);
85
- }
86
83
  if (data.hasOwnProperty('displayName')) {
87
84
  obj['displayName'] = _ApiClient["default"].convertToType(data['displayName'], 'String');
88
85
  }
@@ -211,11 +208,6 @@ var EmbedderCreationRequest = /*#__PURE__*/function () {
211
208
  }();
212
209
  EmbedderCreationRequest.RequiredProperties = ["displayName", "providerType", "endpointUrl", "modelIdentifier", "dimensionality", "distributionType"];
213
210
 
214
- /**
215
- * @member {Object} validate
216
- */
217
- EmbedderCreationRequest.prototype['validate'] = undefined;
218
-
219
211
  /**
220
212
  * User-facing name of the embedder
221
213
  * @member {String} displayName
@@ -0,0 +1,132 @@
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 ImageInfo model module.
31
+ * @module model/ImageInfo
32
+ * @version 1.0.0
33
+ */
34
+ var ImageInfo = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>ImageInfo</code>.
37
+ * Rendered image metadata for an OCR page.
38
+ * @alias module:model/ImageInfo
39
+ * @param widthPx {Number} Rendered image width in pixels
40
+ * @param heightPx {Number} Rendered image height in pixels
41
+ * @param dpi {Number} Rendering DPI
42
+ */
43
+ function ImageInfo(widthPx, heightPx, dpi) {
44
+ _classCallCheck(this, ImageInfo);
45
+ ImageInfo.initialize(this, widthPx, heightPx, dpi);
46
+ }
47
+
48
+ /**
49
+ * Initializes the fields of this object.
50
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
51
+ * Only for internal use.
52
+ */
53
+ return _createClass(ImageInfo, null, [{
54
+ key: "initialize",
55
+ value: function initialize(obj, widthPx, heightPx, dpi) {
56
+ obj['widthPx'] = widthPx;
57
+ obj['heightPx'] = heightPx;
58
+ obj['dpi'] = dpi;
59
+ }
60
+
61
+ /**
62
+ * Constructs a <code>ImageInfo</code> from a plain JavaScript object, optionally creating a new instance.
63
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
64
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
65
+ * @param {module:model/ImageInfo} obj Optional instance to populate.
66
+ * @return {module:model/ImageInfo} The populated <code>ImageInfo</code> instance.
67
+ */
68
+ }, {
69
+ key: "constructFromObject",
70
+ value: function constructFromObject(data, obj) {
71
+ if (data) {
72
+ obj = obj || new ImageInfo();
73
+ if (data.hasOwnProperty('widthPx')) {
74
+ obj['widthPx'] = _ApiClient["default"].convertToType(data['widthPx'], 'Number');
75
+ }
76
+ if (data.hasOwnProperty('heightPx')) {
77
+ obj['heightPx'] = _ApiClient["default"].convertToType(data['heightPx'], 'Number');
78
+ }
79
+ if (data.hasOwnProperty('dpi')) {
80
+ obj['dpi'] = _ApiClient["default"].convertToType(data['dpi'], 'Number');
81
+ }
82
+ }
83
+ return obj;
84
+ }
85
+
86
+ /**
87
+ * Validates the JSON data with respect to <code>ImageInfo</code>.
88
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
89
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>ImageInfo</code>.
90
+ */
91
+ }, {
92
+ key: "validateJSON",
93
+ value: function validateJSON(data) {
94
+ // check to make sure all required properties are present in the JSON string
95
+ var _iterator = _createForOfIteratorHelper(ImageInfo.RequiredProperties),
96
+ _step;
97
+ try {
98
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
99
+ var property = _step.value;
100
+ if (!data.hasOwnProperty(property)) {
101
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
102
+ }
103
+ }
104
+ } catch (err) {
105
+ _iterator.e(err);
106
+ } finally {
107
+ _iterator.f();
108
+ }
109
+ return true;
110
+ }
111
+ }]);
112
+ }();
113
+ ImageInfo.RequiredProperties = ["widthPx", "heightPx", "dpi"];
114
+
115
+ /**
116
+ * Rendered image width in pixels
117
+ * @member {Number} widthPx
118
+ */
119
+ ImageInfo.prototype['widthPx'] = undefined;
120
+
121
+ /**
122
+ * Rendered image height in pixels
123
+ * @member {Number} heightPx
124
+ */
125
+ ImageInfo.prototype['heightPx'] = undefined;
126
+
127
+ /**
128
+ * Rendering DPI
129
+ * @member {Number} dpi
130
+ */
131
+ ImageInfo.prototype['dpi'] = undefined;
132
+ var _default = exports["default"] = ImageInfo;
@@ -43,7 +43,7 @@ var LLMCreationRequest = /*#__PURE__*/function () {
43
43
  * @alias module:model/LLMCreationRequest
44
44
  * @param displayName {String} User-facing name of the LLM
45
45
  * @param providerType {module:model/LLMProviderType}
46
- * @param endpointUrl {String} API endpoint URL
46
+ * @param endpointUrl {String} API endpoint base URL (OpenAI-compatible base, typically ends with /v1)
47
47
  * @param modelIdentifier {String} Model identifier
48
48
  */
49
49
  function LLMCreationRequest(displayName, providerType, endpointUrl, modelIdentifier) {
@@ -77,9 +77,6 @@ var LLMCreationRequest = /*#__PURE__*/function () {
77
77
  value: function constructFromObject(data, obj) {
78
78
  if (data) {
79
79
  obj = obj || new LLMCreationRequest();
80
- if (data.hasOwnProperty('validate')) {
81
- obj['validate'] = _ApiClient["default"].convertToType(data['validate'], Object);
82
- }
83
80
  if (data.hasOwnProperty('displayName')) {
84
81
  obj['displayName'] = _ApiClient["default"].convertToType(data['displayName'], 'String');
85
82
  }
@@ -223,11 +220,6 @@ var LLMCreationRequest = /*#__PURE__*/function () {
223
220
  }();
224
221
  LLMCreationRequest.RequiredProperties = ["displayName", "providerType", "endpointUrl", "modelIdentifier"];
225
222
 
226
- /**
227
- * @member {Object} validate
228
- */
229
- LLMCreationRequest.prototype['validate'] = undefined;
230
-
231
223
  /**
232
224
  * User-facing name of the LLM
233
225
  * @member {String} displayName
@@ -246,13 +238,13 @@ LLMCreationRequest.prototype['description'] = undefined;
246
238
  LLMCreationRequest.prototype['providerType'] = undefined;
247
239
 
248
240
  /**
249
- * API endpoint URL
241
+ * API endpoint base URL (OpenAI-compatible base, typically ends with /v1)
250
242
  * @member {String} endpointUrl
251
243
  */
252
244
  LLMCreationRequest.prototype['endpointUrl'] = undefined;
253
245
 
254
246
  /**
255
- * API path for chat/completions request (defaults to /v1/chat/completions if not provided)
247
+ * API path for chat/completions request (defaults to /chat/completions if not provided)
256
248
  * @member {String} apiPath
257
249
  */
258
250
  LLMCreationRequest.prototype['apiPath'] = undefined;
@@ -43,7 +43,7 @@ var LLMResponse = /*#__PURE__*/function () {
43
43
  * @param llmId {String} Unique identifier of the LLM
44
44
  * @param displayName {String} User-facing name of the LLM
45
45
  * @param providerType {module:model/LLMProviderType}
46
- * @param endpointUrl {String} API endpoint URL
46
+ * @param endpointUrl {String} API endpoint base URL
47
47
  * @param apiPath {String} API path for chat/completions request
48
48
  * @param modelIdentifier {String} Model identifier
49
49
  * @param capabilities {module:model/LLMCapabilities}
@@ -271,7 +271,7 @@ LLMResponse.prototype['description'] = undefined;
271
271
  LLMResponse.prototype['providerType'] = undefined;
272
272
 
273
273
  /**
274
- * API endpoint URL
274
+ * API endpoint base URL
275
275
  * @member {String} endpointUrl
276
276
  */
277
277
  LLMResponse.prototype['endpointUrl'] = undefined;
@@ -64,9 +64,6 @@ var LLMUpdateRequest = /*#__PURE__*/function () {
64
64
  value: function constructFromObject(data, obj) {
65
65
  if (data) {
66
66
  obj = obj || new LLMUpdateRequest();
67
- if (data.hasOwnProperty('validate')) {
68
- obj['validate'] = _ApiClient["default"].convertToType(data['validate'], Object);
69
- }
70
67
  if (data.hasOwnProperty('displayName')) {
71
68
  obj['displayName'] = _ApiClient["default"].convertToType(data['displayName'], 'String');
72
69
  }
@@ -181,11 +178,6 @@ var LLMUpdateRequest = /*#__PURE__*/function () {
181
178
  }
182
179
  }]);
183
180
  }();
184
- /**
185
- * @member {Object} validate
186
- */
187
- LLMUpdateRequest.prototype['validate'] = undefined;
188
-
189
181
  /**
190
182
  * Update display name
191
183
  * @member {String} displayName
@@ -199,7 +191,7 @@ LLMUpdateRequest.prototype['displayName'] = undefined;
199
191
  LLMUpdateRequest.prototype['description'] = undefined;
200
192
 
201
193
  /**
202
- * Update endpoint URL (must be valid HTTP/HTTPS URL)
194
+ * Update endpoint base URL (OpenAI-compatible base, typically ends with /v1)
203
195
  * @member {String} endpointUrl
204
196
  */
205
197
  LLMUpdateRequest.prototype['endpointUrl'] = undefined;
@@ -69,9 +69,6 @@ var MemoryCreationRequest = /*#__PURE__*/function () {
69
69
  value: function constructFromObject(data, obj) {
70
70
  if (data) {
71
71
  obj = obj || new MemoryCreationRequest();
72
- if (data.hasOwnProperty('validate')) {
73
- obj['validate'] = _ApiClient["default"].convertToType(data['validate'], Object);
74
- }
75
72
  if (data.hasOwnProperty('memoryId')) {
76
73
  obj['memoryId'] = _ApiClient["default"].convertToType(data['memoryId'], 'String');
77
74
  }
@@ -96,6 +93,9 @@ var MemoryCreationRequest = /*#__PURE__*/function () {
96
93
  if (data.hasOwnProperty('chunkingConfig')) {
97
94
  obj['chunkingConfig'] = _ChunkingConfiguration["default"].constructFromObject(data['chunkingConfig']);
98
95
  }
96
+ if (data.hasOwnProperty('fileField')) {
97
+ obj['fileField'] = _ApiClient["default"].convertToType(data['fileField'], 'String');
98
+ }
99
99
  }
100
100
  return obj;
101
101
  }
@@ -152,17 +152,16 @@ var MemoryCreationRequest = /*#__PURE__*/function () {
152
152
  // data not null
153
153
  _ChunkingConfiguration["default"].validateJSON(data['chunkingConfig']);
154
154
  }
155
+ // ensure the json data is a string
156
+ if (data['fileField'] && !(typeof data['fileField'] === 'string' || data['fileField'] instanceof String)) {
157
+ throw new Error("Expected the field `fileField` to be a primitive type in the JSON string but got " + data['fileField']);
158
+ }
155
159
  return true;
156
160
  }
157
161
  }]);
158
162
  }();
159
163
  MemoryCreationRequest.RequiredProperties = ["spaceId", "contentType"];
160
164
 
161
- /**
162
- * @member {Object} validate
163
- */
164
- MemoryCreationRequest.prototype['validate'] = undefined;
165
-
166
165
  /**
167
166
  * Optional client-provided UUID for the memory. If omitted, the server generates one. Returns ALREADY_EXISTS if the ID is already in use.
168
167
  * @member {String} memoryId
@@ -209,4 +208,10 @@ MemoryCreationRequest.prototype['metadata'] = undefined;
209
208
  * @member {module:model/ChunkingConfiguration} chunkingConfig
210
209
  */
211
210
  MemoryCreationRequest.prototype['chunkingConfig'] = undefined;
211
+
212
+ /**
213
+ * Optional multipart file field name to bind binary content; required when multiple files are uploaded in a batch multipart request.
214
+ * @member {String} fileField
215
+ */
216
+ MemoryCreationRequest.prototype['fileField'] = undefined;
212
217
  var _default = exports["default"] = MemoryCreationRequest;