@pairsystems/goodmem-client 1.0.5 → 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 (48) hide show
  1. package/README.md +31 -2
  2. package/dist/api/EmbeddersApi.js +10 -10
  3. package/dist/api/LLMsApi.js +8 -8
  4. package/dist/api/MemoriesApi.js +62 -48
  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 +196 -0
  10. package/dist/model/BatchMemoryCreationRequest.js +0 -8
  11. package/dist/model/BatchMemoryDeletionRequest.js +0 -8
  12. package/dist/model/BatchMemoryResponse.js +132 -0
  13. package/dist/model/BatchMemoryResult.js +151 -0
  14. package/dist/model/BatchMemoryRetrievalRequest.js +0 -8
  15. package/dist/model/BoundingBox.js +143 -0
  16. package/dist/model/CreateApiKeyRequest.js +13 -0
  17. package/dist/model/DocumentTimings.js +154 -0
  18. package/dist/model/EmbedderCreationRequest.js +14 -9
  19. package/dist/model/ErrorDetail.js +125 -0
  20. package/dist/model/ImageInfo.js +132 -0
  21. package/dist/model/LLMCreationRequest.js +20 -17
  22. package/dist/model/LLMResponse.js +2 -2
  23. package/dist/model/LLMUpdateRequest.js +1 -9
  24. package/dist/model/MemoryCreationRequest.js +22 -4
  25. package/dist/model/OcrCategory.js +118 -0
  26. package/dist/model/OcrCell.js +154 -0
  27. package/dist/model/OcrDocumentRequest.js +159 -0
  28. package/dist/model/OcrDocumentResponse.js +170 -0
  29. package/dist/model/OcrInputFormat.js +78 -0
  30. package/dist/model/OcrLayout.js +132 -0
  31. package/dist/model/OcrPage.js +173 -0
  32. package/dist/model/OcrPageResult.js +138 -0
  33. package/dist/model/PageTimings.js +143 -0
  34. package/dist/model/PingEndpointInfo.js +170 -0
  35. package/dist/model/PingEvent.js +120 -0
  36. package/dist/model/PingNotice.js +140 -0
  37. package/dist/model/PingOnceRequest.js +163 -0
  38. package/dist/model/PingPayloadType.js +68 -0
  39. package/dist/model/PingResult.js +221 -0
  40. package/dist/model/PingStreamRequest.js +210 -0
  41. package/dist/model/PingSummary.js +269 -0
  42. package/dist/model/PingTargetType.js +68 -0
  43. package/dist/model/PingTiming.js +143 -0
  44. package/dist/model/RerankerCreationRequest.js +14 -9
  45. package/dist/model/RpcStatus.js +123 -0
  46. package/dist/model/SpaceCreationRequest.js +20 -5
  47. package/dist/model/SpaceEmbedderConfig.js +5 -7
  48. package/package.json +1 -1
@@ -0,0 +1,138 @@
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 _OcrPage = _interopRequireDefault(require("./OcrPage"));
9
+ var _RpcStatus = _interopRequireDefault(require("./RpcStatus"));
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 OcrPageResult model module.
33
+ * @module model/OcrPageResult
34
+ * @version 1.0.0
35
+ */
36
+ var OcrPageResult = /*#__PURE__*/function () {
37
+ /**
38
+ * Constructs a new <code>OcrPageResult</code>.
39
+ * Per-page OCR result containing output or error status.
40
+ * @alias module:model/OcrPageResult
41
+ * @param pageIndex {Number} 0-based page index
42
+ */
43
+ function OcrPageResult(pageIndex) {
44
+ _classCallCheck(this, OcrPageResult);
45
+ OcrPageResult.initialize(this, pageIndex);
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(OcrPageResult, null, [{
54
+ key: "initialize",
55
+ value: function initialize(obj, pageIndex) {
56
+ obj['pageIndex'] = pageIndex;
57
+ }
58
+
59
+ /**
60
+ * Constructs a <code>OcrPageResult</code> from a plain JavaScript object, optionally creating a new instance.
61
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
62
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
63
+ * @param {module:model/OcrPageResult} obj Optional instance to populate.
64
+ * @return {module:model/OcrPageResult} The populated <code>OcrPageResult</code> instance.
65
+ */
66
+ }, {
67
+ key: "constructFromObject",
68
+ value: function constructFromObject(data, obj) {
69
+ if (data) {
70
+ obj = obj || new OcrPageResult();
71
+ if (data.hasOwnProperty('pageIndex')) {
72
+ obj['pageIndex'] = _ApiClient["default"].convertToType(data['pageIndex'], 'Number');
73
+ }
74
+ if (data.hasOwnProperty('page')) {
75
+ obj['page'] = _OcrPage["default"].constructFromObject(data['page']);
76
+ }
77
+ if (data.hasOwnProperty('status')) {
78
+ obj['status'] = _RpcStatus["default"].constructFromObject(data['status']);
79
+ }
80
+ }
81
+ return obj;
82
+ }
83
+
84
+ /**
85
+ * Validates the JSON data with respect to <code>OcrPageResult</code>.
86
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
87
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>OcrPageResult</code>.
88
+ */
89
+ }, {
90
+ key: "validateJSON",
91
+ value: function validateJSON(data) {
92
+ // check to make sure all required properties are present in the JSON string
93
+ var _iterator = _createForOfIteratorHelper(OcrPageResult.RequiredProperties),
94
+ _step;
95
+ try {
96
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
97
+ var property = _step.value;
98
+ if (!data.hasOwnProperty(property)) {
99
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
100
+ }
101
+ }
102
+ // validate the optional field `page`
103
+ } catch (err) {
104
+ _iterator.e(err);
105
+ } finally {
106
+ _iterator.f();
107
+ }
108
+ if (data['page']) {
109
+ // data not null
110
+ _OcrPage["default"].validateJSON(data['page']);
111
+ }
112
+ // validate the optional field `status`
113
+ if (data['status']) {
114
+ // data not null
115
+ _RpcStatus["default"].validateJSON(data['status']);
116
+ }
117
+ return true;
118
+ }
119
+ }]);
120
+ }();
121
+ OcrPageResult.RequiredProperties = ["pageIndex"];
122
+
123
+ /**
124
+ * 0-based page index
125
+ * @member {Number} pageIndex
126
+ */
127
+ OcrPageResult.prototype['pageIndex'] = undefined;
128
+
129
+ /**
130
+ * @member {module:model/OcrPage} page
131
+ */
132
+ OcrPageResult.prototype['page'] = undefined;
133
+
134
+ /**
135
+ * @member {module:model/RpcStatus} status
136
+ */
137
+ OcrPageResult.prototype['status'] = undefined;
138
+ var _default = exports["default"] = OcrPageResult;
@@ -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 PageTimings model module.
31
+ * @module model/PageTimings
32
+ * @version 1.0.0
33
+ */
34
+ var PageTimings = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>PageTimings</code>.
37
+ * Per-page timing breakdown for OCR processing.
38
+ * @alias module:model/PageTimings
39
+ * @param queueWaitMs {Number} Time spent waiting in the render queue (ms)
40
+ * @param renderMs {Number} Time spent rendering the page image (ms)
41
+ * @param ocrMs {Number} Time spent running OCR (ms)
42
+ * @param totalMs {Number} Total page processing time (ms)
43
+ */
44
+ function PageTimings(queueWaitMs, renderMs, ocrMs, totalMs) {
45
+ _classCallCheck(this, PageTimings);
46
+ PageTimings.initialize(this, queueWaitMs, renderMs, ocrMs, totalMs);
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(PageTimings, null, [{
55
+ key: "initialize",
56
+ value: function initialize(obj, queueWaitMs, renderMs, ocrMs, totalMs) {
57
+ obj['queueWaitMs'] = queueWaitMs;
58
+ obj['renderMs'] = renderMs;
59
+ obj['ocrMs'] = ocrMs;
60
+ obj['totalMs'] = totalMs;
61
+ }
62
+
63
+ /**
64
+ * Constructs a <code>PageTimings</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/PageTimings} obj Optional instance to populate.
68
+ * @return {module:model/PageTimings} The populated <code>PageTimings</code> instance.
69
+ */
70
+ }, {
71
+ key: "constructFromObject",
72
+ value: function constructFromObject(data, obj) {
73
+ if (data) {
74
+ obj = obj || new PageTimings();
75
+ if (data.hasOwnProperty('queueWaitMs')) {
76
+ obj['queueWaitMs'] = _ApiClient["default"].convertToType(data['queueWaitMs'], 'Number');
77
+ }
78
+ if (data.hasOwnProperty('renderMs')) {
79
+ obj['renderMs'] = _ApiClient["default"].convertToType(data['renderMs'], 'Number');
80
+ }
81
+ if (data.hasOwnProperty('ocrMs')) {
82
+ obj['ocrMs'] = _ApiClient["default"].convertToType(data['ocrMs'], 'Number');
83
+ }
84
+ if (data.hasOwnProperty('totalMs')) {
85
+ obj['totalMs'] = _ApiClient["default"].convertToType(data['totalMs'], 'Number');
86
+ }
87
+ }
88
+ return obj;
89
+ }
90
+
91
+ /**
92
+ * Validates the JSON data with respect to <code>PageTimings</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>PageTimings</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(PageTimings.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
+ PageTimings.RequiredProperties = ["queueWaitMs", "renderMs", "ocrMs", "totalMs"];
119
+
120
+ /**
121
+ * Time spent waiting in the render queue (ms)
122
+ * @member {Number} queueWaitMs
123
+ */
124
+ PageTimings.prototype['queueWaitMs'] = undefined;
125
+
126
+ /**
127
+ * Time spent rendering the page image (ms)
128
+ * @member {Number} renderMs
129
+ */
130
+ PageTimings.prototype['renderMs'] = undefined;
131
+
132
+ /**
133
+ * Time spent running OCR (ms)
134
+ * @member {Number} ocrMs
135
+ */
136
+ PageTimings.prototype['ocrMs'] = undefined;
137
+
138
+ /**
139
+ * Total page processing time (ms)
140
+ * @member {Number} totalMs
141
+ */
142
+ PageTimings.prototype['totalMs'] = undefined;
143
+ var _default = exports["default"] = PageTimings;
@@ -0,0 +1,170 @@
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 _PingTargetType = _interopRequireDefault(require("./PingTargetType"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
11
+ function _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; } } }; }
12
+ 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; } }
13
+ 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; }
14
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
15
+ 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); } }
16
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
17
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
18
+ 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); } /**
19
+ *
20
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
21
+ *
22
+ * The version of the OpenAPI document:
23
+ *
24
+ *
25
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
26
+ * https://openapi-generator.tech
27
+ * Do not edit the class manually.
28
+ *
29
+ */
30
+ /**
31
+ * The PingEndpointInfo model module.
32
+ * @module model/PingEndpointInfo
33
+ * @version 1.0.0
34
+ */
35
+ var PingEndpointInfo = /*#__PURE__*/function () {
36
+ /**
37
+ * Constructs a new <code>PingEndpointInfo</code>.
38
+ * Resolved endpoint metadata for ping responses
39
+ * @alias module:model/PingEndpointInfo
40
+ * @param targetType {module:model/PingTargetType}
41
+ * @param targetId {String} Target resource ID (UUID)
42
+ * @param resolvedEndpoint {String} Fully resolved endpoint URL used for the probe
43
+ * @param provider {String} Provider name backing the resource
44
+ * @param modelIdentifier {String} Provider-specific model identifier
45
+ */
46
+ function PingEndpointInfo(targetType, targetId, resolvedEndpoint, provider, modelIdentifier) {
47
+ _classCallCheck(this, PingEndpointInfo);
48
+ PingEndpointInfo.initialize(this, targetType, targetId, resolvedEndpoint, provider, modelIdentifier);
49
+ }
50
+
51
+ /**
52
+ * Initializes the fields of this object.
53
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
54
+ * Only for internal use.
55
+ */
56
+ return _createClass(PingEndpointInfo, null, [{
57
+ key: "initialize",
58
+ value: function initialize(obj, targetType, targetId, resolvedEndpoint, provider, modelIdentifier) {
59
+ obj['targetType'] = targetType;
60
+ obj['targetId'] = targetId;
61
+ obj['resolvedEndpoint'] = resolvedEndpoint;
62
+ obj['provider'] = provider;
63
+ obj['modelIdentifier'] = modelIdentifier;
64
+ }
65
+
66
+ /**
67
+ * Constructs a <code>PingEndpointInfo</code> from a plain JavaScript object, optionally creating a new instance.
68
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
69
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
70
+ * @param {module:model/PingEndpointInfo} obj Optional instance to populate.
71
+ * @return {module:model/PingEndpointInfo} The populated <code>PingEndpointInfo</code> instance.
72
+ */
73
+ }, {
74
+ key: "constructFromObject",
75
+ value: function constructFromObject(data, obj) {
76
+ if (data) {
77
+ obj = obj || new PingEndpointInfo();
78
+ if (data.hasOwnProperty('targetType')) {
79
+ obj['targetType'] = _PingTargetType["default"].constructFromObject(data['targetType']);
80
+ }
81
+ if (data.hasOwnProperty('targetId')) {
82
+ obj['targetId'] = _ApiClient["default"].convertToType(data['targetId'], 'String');
83
+ }
84
+ if (data.hasOwnProperty('resolvedEndpoint')) {
85
+ obj['resolvedEndpoint'] = _ApiClient["default"].convertToType(data['resolvedEndpoint'], 'String');
86
+ }
87
+ if (data.hasOwnProperty('provider')) {
88
+ obj['provider'] = _ApiClient["default"].convertToType(data['provider'], 'String');
89
+ }
90
+ if (data.hasOwnProperty('modelIdentifier')) {
91
+ obj['modelIdentifier'] = _ApiClient["default"].convertToType(data['modelIdentifier'], 'String');
92
+ }
93
+ }
94
+ return obj;
95
+ }
96
+
97
+ /**
98
+ * Validates the JSON data with respect to <code>PingEndpointInfo</code>.
99
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
100
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>PingEndpointInfo</code>.
101
+ */
102
+ }, {
103
+ key: "validateJSON",
104
+ value: function validateJSON(data) {
105
+ // check to make sure all required properties are present in the JSON string
106
+ var _iterator = _createForOfIteratorHelper(PingEndpointInfo.RequiredProperties),
107
+ _step;
108
+ try {
109
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
110
+ var property = _step.value;
111
+ if (!data.hasOwnProperty(property)) {
112
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
113
+ }
114
+ }
115
+ // ensure the json data is a string
116
+ } catch (err) {
117
+ _iterator.e(err);
118
+ } finally {
119
+ _iterator.f();
120
+ }
121
+ if (data['targetId'] && !(typeof data['targetId'] === 'string' || data['targetId'] instanceof String)) {
122
+ throw new Error("Expected the field `targetId` to be a primitive type in the JSON string but got " + data['targetId']);
123
+ }
124
+ // ensure the json data is a string
125
+ if (data['resolvedEndpoint'] && !(typeof data['resolvedEndpoint'] === 'string' || data['resolvedEndpoint'] instanceof String)) {
126
+ throw new Error("Expected the field `resolvedEndpoint` to be a primitive type in the JSON string but got " + data['resolvedEndpoint']);
127
+ }
128
+ // ensure the json data is a string
129
+ if (data['provider'] && !(typeof data['provider'] === 'string' || data['provider'] instanceof String)) {
130
+ throw new Error("Expected the field `provider` to be a primitive type in the JSON string but got " + data['provider']);
131
+ }
132
+ // ensure the json data is a string
133
+ if (data['modelIdentifier'] && !(typeof data['modelIdentifier'] === 'string' || data['modelIdentifier'] instanceof String)) {
134
+ throw new Error("Expected the field `modelIdentifier` to be a primitive type in the JSON string but got " + data['modelIdentifier']);
135
+ }
136
+ return true;
137
+ }
138
+ }]);
139
+ }();
140
+ PingEndpointInfo.RequiredProperties = ["targetType", "targetId", "resolvedEndpoint", "provider", "modelIdentifier"];
141
+
142
+ /**
143
+ * @member {module:model/PingTargetType} targetType
144
+ */
145
+ PingEndpointInfo.prototype['targetType'] = undefined;
146
+
147
+ /**
148
+ * Target resource ID (UUID)
149
+ * @member {String} targetId
150
+ */
151
+ PingEndpointInfo.prototype['targetId'] = undefined;
152
+
153
+ /**
154
+ * Fully resolved endpoint URL used for the probe
155
+ * @member {String} resolvedEndpoint
156
+ */
157
+ PingEndpointInfo.prototype['resolvedEndpoint'] = undefined;
158
+
159
+ /**
160
+ * Provider name backing the resource
161
+ * @member {String} provider
162
+ */
163
+ PingEndpointInfo.prototype['provider'] = undefined;
164
+
165
+ /**
166
+ * Provider-specific model identifier
167
+ * @member {String} modelIdentifier
168
+ */
169
+ PingEndpointInfo.prototype['modelIdentifier'] = undefined;
170
+ var _default = exports["default"] = PingEndpointInfo;
@@ -0,0 +1,120 @@
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 _PingNotice = _interopRequireDefault(require("./PingNotice"));
9
+ var _PingResult = _interopRequireDefault(require("./PingResult"));
10
+ var _PingSummary = _interopRequireDefault(require("./PingSummary"));
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 _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 PingEvent model module.
31
+ * @module model/PingEvent
32
+ * @version 1.0.0
33
+ */
34
+ var PingEvent = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>PingEvent</code>.
37
+ * Streaming event from a ping session
38
+ * @alias module:model/PingEvent
39
+ */
40
+ function PingEvent() {
41
+ _classCallCheck(this, PingEvent);
42
+ PingEvent.initialize(this);
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(PingEvent, null, [{
51
+ key: "initialize",
52
+ value: function initialize(obj) {}
53
+
54
+ /**
55
+ * Constructs a <code>PingEvent</code> from a plain JavaScript object, optionally creating a new instance.
56
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
57
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
58
+ * @param {module:model/PingEvent} obj Optional instance to populate.
59
+ * @return {module:model/PingEvent} The populated <code>PingEvent</code> instance.
60
+ */
61
+ }, {
62
+ key: "constructFromObject",
63
+ value: function constructFromObject(data, obj) {
64
+ if (data) {
65
+ obj = obj || new PingEvent();
66
+ if (data.hasOwnProperty('result')) {
67
+ obj['result'] = _PingResult["default"].constructFromObject(data['result']);
68
+ }
69
+ if (data.hasOwnProperty('summary')) {
70
+ obj['summary'] = _PingSummary["default"].constructFromObject(data['summary']);
71
+ }
72
+ if (data.hasOwnProperty('notice')) {
73
+ obj['notice'] = _PingNotice["default"].constructFromObject(data['notice']);
74
+ }
75
+ }
76
+ return obj;
77
+ }
78
+
79
+ /**
80
+ * Validates the JSON data with respect to <code>PingEvent</code>.
81
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
82
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>PingEvent</code>.
83
+ */
84
+ }, {
85
+ key: "validateJSON",
86
+ value: function validateJSON(data) {
87
+ // validate the optional field `result`
88
+ if (data['result']) {
89
+ // data not null
90
+ _PingResult["default"].validateJSON(data['result']);
91
+ }
92
+ // validate the optional field `summary`
93
+ if (data['summary']) {
94
+ // data not null
95
+ _PingSummary["default"].validateJSON(data['summary']);
96
+ }
97
+ // validate the optional field `notice`
98
+ if (data['notice']) {
99
+ // data not null
100
+ _PingNotice["default"].validateJSON(data['notice']);
101
+ }
102
+ return true;
103
+ }
104
+ }]);
105
+ }();
106
+ /**
107
+ * @member {module:model/PingResult} result
108
+ */
109
+ PingEvent.prototype['result'] = undefined;
110
+
111
+ /**
112
+ * @member {module:model/PingSummary} summary
113
+ */
114
+ PingEvent.prototype['summary'] = undefined;
115
+
116
+ /**
117
+ * @member {module:model/PingNotice} notice
118
+ */
119
+ PingEvent.prototype['notice'] = undefined;
120
+ var _default = exports["default"] = PingEvent;