@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
@@ -5,14 +5,19 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _PingEventOneOf = _interopRequireDefault(require("./PingEventOneOf"));
9
+ var _PingEventOneOf2 = _interopRequireDefault(require("./PingEventOneOf1"));
10
+ var _PingEventOneOf3 = _interopRequireDefault(require("./PingEventOneOf2"));
8
11
  var _PingNotice = _interopRequireDefault(require("./PingNotice"));
9
12
  var _PingResult = _interopRequireDefault(require("./PingResult"));
10
13
  var _PingSummary = _interopRequireDefault(require("./PingSummary"));
14
+ var _PingEvent;
11
15
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
12
16
  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
17
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
14
18
  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
19
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
20
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
16
21
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
22
  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
23
  *
@@ -36,85 +41,138 @@ var PingEvent = /*#__PURE__*/function () {
36
41
  * Constructs a new <code>PingEvent</code>.
37
42
  * Streaming event from a ping session
38
43
  * @alias module:model/PingEvent
44
+ * @param {(module:model/PingEventOneOf|module:model/PingEventOneOf1|module:model/PingEventOneOf2)} instance The actual instance to initialize PingEvent.
39
45
  */
40
46
  function PingEvent() {
47
+ var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
41
48
  _classCallCheck(this, PingEvent);
42
- PingEvent.initialize(this);
49
+ /**
50
+ * Returns the JSON representation of the actual instance.
51
+ * @return {string}
52
+ */
53
+ _defineProperty(this, "toJSON", function () {
54
+ return this.getActualInstance();
55
+ });
56
+ if (instance === null) {
57
+ this.actualInstance = null;
58
+ return;
59
+ }
60
+ var match = 0;
61
+ var errorMessages = [];
62
+ try {
63
+ if (instance instanceof _PingEventOneOf["default"]) {
64
+ this.actualInstance = instance;
65
+ } else {
66
+ // plain JS object
67
+ // validate the object
68
+ _PingEventOneOf["default"].validateJSON(instance); // throw an exception if no match
69
+ // create PingEventOneOf from JS object
70
+ this.actualInstance = _PingEventOneOf["default"].constructFromObject(instance);
71
+ }
72
+ match++;
73
+ } catch (err) {
74
+ // json data failed to deserialize into PingEventOneOf
75
+ errorMessages.push("Failed to construct PingEventOneOf: " + err);
76
+ }
77
+ try {
78
+ if (instance instanceof _PingEventOneOf2["default"]) {
79
+ this.actualInstance = instance;
80
+ } else {
81
+ // plain JS object
82
+ // validate the object
83
+ _PingEventOneOf2["default"].validateJSON(instance); // throw an exception if no match
84
+ // create PingEventOneOf1 from JS object
85
+ this.actualInstance = _PingEventOneOf2["default"].constructFromObject(instance);
86
+ }
87
+ match++;
88
+ } catch (err) {
89
+ // json data failed to deserialize into PingEventOneOf1
90
+ errorMessages.push("Failed to construct PingEventOneOf1: " + err);
91
+ }
92
+ try {
93
+ if (instance instanceof _PingEventOneOf3["default"]) {
94
+ this.actualInstance = instance;
95
+ } else {
96
+ // plain JS object
97
+ // validate the object
98
+ _PingEventOneOf3["default"].validateJSON(instance); // throw an exception if no match
99
+ // create PingEventOneOf2 from JS object
100
+ this.actualInstance = _PingEventOneOf3["default"].constructFromObject(instance);
101
+ }
102
+ match++;
103
+ } catch (err) {
104
+ // json data failed to deserialize into PingEventOneOf2
105
+ errorMessages.push("Failed to construct PingEventOneOf2: " + err);
106
+ }
107
+ if (match > 1) {
108
+ throw new Error("Multiple matches found constructing `PingEvent` with oneOf schemas PingEventOneOf, PingEventOneOf1, PingEventOneOf2. Input: " + JSON.stringify(instance));
109
+ } else if (match === 0) {
110
+ this.actualInstance = null; // clear the actual instance in case there are multiple matches
111
+ throw new Error("No match found constructing `PingEvent` with oneOf schemas PingEventOneOf, PingEventOneOf1, PingEventOneOf2. Details: " + errorMessages.join(", "));
112
+ } else {// only 1 match
113
+ // the input is valid
114
+ }
43
115
  }
44
116
 
45
117
  /**
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.
118
+ * Constructs a <code>PingEvent</code> from a plain JavaScript object, optionally creating a new instance.
119
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
120
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
121
+ * @param {module:model/PingEvent} obj Optional instance to populate.
122
+ * @return {module:model/PingEvent} The populated <code>PingEvent</code> instance.
49
123
  */
50
- return _createClass(PingEvent, null, [{
51
- key: "initialize",
52
- value: function initialize(obj) {}
53
-
124
+ return _createClass(PingEvent, [{
125
+ key: "getActualInstance",
126
+ value:
54
127
  /**
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.
128
+ * Gets the actual instance, which can be <code>PingEventOneOf</code>, <code>PingEventOneOf1</code>, <code>PingEventOneOf2</code>.
129
+ * @return {(module:model/PingEventOneOf|module:model/PingEventOneOf1|module:model/PingEventOneOf2)} The actual instance.
60
130
  */
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;
131
+ function getActualInstance() {
132
+ return this.actualInstance;
77
133
  }
78
134
 
79
135
  /**
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>.
136
+ * Sets the actual instance, which can be <code>PingEventOneOf</code>, <code>PingEventOneOf1</code>, <code>PingEventOneOf2</code>.
137
+ * @param {(module:model/PingEventOneOf|module:model/PingEventOneOf1|module:model/PingEventOneOf2)} obj The actual instance.
83
138
  */
84
139
  }, {
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;
140
+ key: "setActualInstance",
141
+ value: function setActualInstance(obj) {
142
+ this.actualInstance = PingEvent.constructFromObject(obj).getActualInstance();
143
+ }
144
+ }], [{
145
+ key: "constructFromObject",
146
+ value: function constructFromObject(data, obj) {
147
+ return new PingEvent(data);
103
148
  }
104
149
  }]);
105
150
  }();
106
151
  /**
152
+ * Probe result event
107
153
  * @member {module:model/PingResult} result
108
154
  */
155
+ _PingEvent = PingEvent;
156
+ /**
157
+ * Create an instance of PingEvent from a JSON string.
158
+ * @param {string} json_string JSON string.
159
+ * @return {module:model/PingEvent} An instance of PingEvent.
160
+ */
161
+ _defineProperty(PingEvent, "fromJSON", function (json_string) {
162
+ return _PingEvent.constructFromObject(JSON.parse(json_string));
163
+ });
109
164
  PingEvent.prototype['result'] = undefined;
110
165
 
111
166
  /**
167
+ * Summary emitted at session completion
112
168
  * @member {module:model/PingSummary} summary
113
169
  */
114
170
  PingEvent.prototype['summary'] = undefined;
115
171
 
116
172
  /**
173
+ * Non-fatal notice emitted during session
117
174
  * @member {module:model/PingNotice} notice
118
175
  */
119
176
  PingEvent.prototype['notice'] = undefined;
177
+ PingEvent.OneOf = ["PingEventOneOf", "PingEventOneOf1", "PingEventOneOf2"];
120
178
  var _default = exports["default"] = PingEvent;
@@ -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 PingEventOneOf model module.
31
+ * @module model/PingEventOneOf
32
+ * @version 1.0.0
33
+ */
34
+ var PingEventOneOf = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>PingEventOneOf</code>.
37
+ * @alias module:model/PingEventOneOf
38
+ * @param result {Object}
39
+ */
40
+ function PingEventOneOf(result) {
41
+ _classCallCheck(this, PingEventOneOf);
42
+ PingEventOneOf.initialize(this, result);
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(PingEventOneOf, null, [{
51
+ key: "initialize",
52
+ value: function initialize(obj, result) {
53
+ obj['result'] = result;
54
+ }
55
+
56
+ /**
57
+ * Constructs a <code>PingEventOneOf</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/PingEventOneOf} obj Optional instance to populate.
61
+ * @return {module:model/PingEventOneOf} The populated <code>PingEventOneOf</code> instance.
62
+ */
63
+ }, {
64
+ key: "constructFromObject",
65
+ value: function constructFromObject(data, obj) {
66
+ if (data) {
67
+ obj = obj || new PingEventOneOf();
68
+ if (data.hasOwnProperty('result')) {
69
+ obj['result'] = _ApiClient["default"].convertToType(data['result'], Object);
70
+ }
71
+ }
72
+ return obj;
73
+ }
74
+
75
+ /**
76
+ * Validates the JSON data with respect to <code>PingEventOneOf</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>PingEventOneOf</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(PingEventOneOf.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
+ PingEventOneOf.RequiredProperties = ["result"];
104
+
105
+ /**
106
+ * @member {Object} result
107
+ */
108
+ PingEventOneOf.prototype['result'] = undefined;
109
+ var _default = exports["default"] = PingEventOneOf;
@@ -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 PingEventOneOf1 model module.
31
+ * @module model/PingEventOneOf1
32
+ * @version 1.0.0
33
+ */
34
+ var PingEventOneOf1 = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>PingEventOneOf1</code>.
37
+ * @alias module:model/PingEventOneOf1
38
+ * @param summary {Object}
39
+ */
40
+ function PingEventOneOf1(summary) {
41
+ _classCallCheck(this, PingEventOneOf1);
42
+ PingEventOneOf1.initialize(this, summary);
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(PingEventOneOf1, null, [{
51
+ key: "initialize",
52
+ value: function initialize(obj, summary) {
53
+ obj['summary'] = summary;
54
+ }
55
+
56
+ /**
57
+ * Constructs a <code>PingEventOneOf1</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/PingEventOneOf1} obj Optional instance to populate.
61
+ * @return {module:model/PingEventOneOf1} The populated <code>PingEventOneOf1</code> instance.
62
+ */
63
+ }, {
64
+ key: "constructFromObject",
65
+ value: function constructFromObject(data, obj) {
66
+ if (data) {
67
+ obj = obj || new PingEventOneOf1();
68
+ if (data.hasOwnProperty('summary')) {
69
+ obj['summary'] = _ApiClient["default"].convertToType(data['summary'], Object);
70
+ }
71
+ }
72
+ return obj;
73
+ }
74
+
75
+ /**
76
+ * Validates the JSON data with respect to <code>PingEventOneOf1</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>PingEventOneOf1</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(PingEventOneOf1.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
+ PingEventOneOf1.RequiredProperties = ["summary"];
104
+
105
+ /**
106
+ * @member {Object} summary
107
+ */
108
+ PingEventOneOf1.prototype['summary'] = undefined;
109
+ var _default = exports["default"] = PingEventOneOf1;
@@ -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 PingEventOneOf2 model module.
31
+ * @module model/PingEventOneOf2
32
+ * @version 1.0.0
33
+ */
34
+ var PingEventOneOf2 = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>PingEventOneOf2</code>.
37
+ * @alias module:model/PingEventOneOf2
38
+ * @param notice {Object}
39
+ */
40
+ function PingEventOneOf2(notice) {
41
+ _classCallCheck(this, PingEventOneOf2);
42
+ PingEventOneOf2.initialize(this, notice);
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(PingEventOneOf2, null, [{
51
+ key: "initialize",
52
+ value: function initialize(obj, notice) {
53
+ obj['notice'] = notice;
54
+ }
55
+
56
+ /**
57
+ * Constructs a <code>PingEventOneOf2</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/PingEventOneOf2} obj Optional instance to populate.
61
+ * @return {module:model/PingEventOneOf2} The populated <code>PingEventOneOf2</code> instance.
62
+ */
63
+ }, {
64
+ key: "constructFromObject",
65
+ value: function constructFromObject(data, obj) {
66
+ if (data) {
67
+ obj = obj || new PingEventOneOf2();
68
+ if (data.hasOwnProperty('notice')) {
69
+ obj['notice'] = _ApiClient["default"].convertToType(data['notice'], Object);
70
+ }
71
+ }
72
+ return obj;
73
+ }
74
+
75
+ /**
76
+ * Validates the JSON data with respect to <code>PingEventOneOf2</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>PingEventOneOf2</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(PingEventOneOf2.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
+ PingEventOneOf2.RequiredProperties = ["notice"];
104
+
105
+ /**
106
+ * @member {Object} notice
107
+ */
108
+ PingEventOneOf2.prototype['notice'] = undefined;
109
+ var _default = exports["default"] = PingEventOneOf2;
@@ -72,10 +72,10 @@ var PingOnceRequest = /*#__PURE__*/function () {
72
72
  obj['targetId'] = _ApiClient["default"].convertToType(data['targetId'], 'String');
73
73
  }
74
74
  if (data.hasOwnProperty('targetTypeHint')) {
75
- obj['targetTypeHint'] = _PingTargetType["default"].constructFromObject(data['targetTypeHint']);
75
+ obj['targetTypeHint'] = _ApiClient["default"].convertToType(data['targetTypeHint'], _PingTargetType["default"]);
76
76
  }
77
77
  if (data.hasOwnProperty('payloadType')) {
78
- obj['payloadType'] = _PingPayloadType["default"].constructFromObject(data['payloadType']);
78
+ obj['payloadType'] = _ApiClient["default"].convertToType(data['payloadType'], _PingPayloadType["default"]);
79
79
  }
80
80
  if (data.hasOwnProperty('payload')) {
81
81
  obj['payload'] = _ApiClient["default"].convertToType(data['payload'], 'String');
@@ -134,11 +134,13 @@ PingOnceRequest.RequiredProperties = ["targetId"];
134
134
  PingOnceRequest.prototype['targetId'] = undefined;
135
135
 
136
136
  /**
137
+ * Optional hint for the target resource type
137
138
  * @member {module:model/PingTargetType} targetTypeHint
138
139
  */
139
140
  PingOnceRequest.prototype['targetTypeHint'] = undefined;
140
141
 
141
142
  /**
143
+ * Desired payload type (defaults to provider-specific value)
142
144
  * @member {module:model/PingPayloadType} payloadType
143
145
  */
144
146
  PingOnceRequest.prototype['payloadType'] = undefined;
@@ -38,14 +38,14 @@ var PingResult = /*#__PURE__*/function () {
38
38
  * Constructs a new <code>PingResult</code>.
39
39
  * Result from an individual ping probe
40
40
  * @alias module:model/PingResult
41
- * @param endpoint {module:model/PingEndpointInfo}
41
+ * @param endpoint {module:model/PingEndpointInfo} Resolved endpoint metadata for the target
42
42
  * @param seq {Number} Sequential probe number (1-based)
43
43
  * @param bytesSent {Number} Payload bytes transmitted
44
44
  * @param bytesReceived {Number} Payload bytes received
45
45
  * @param ok {Boolean} True when the provider responded successfully within the timeout
46
46
  * @param httpStatus {Number} Provider HTTP status code or equivalent transport status
47
47
  * @param rttMs {Number} Observed round-trip latency in milliseconds
48
- * @param timing {module:model/PingTiming}
48
+ * @param timing {module:model/PingTiming} Raw timing data recorded on the server
49
49
  */
50
50
  function PingResult(endpoint, seq, bytesSent, bytesReceived, ok, httpStatus, rttMs, timing) {
51
51
  _classCallCheck(this, PingResult);
@@ -83,7 +83,7 @@ var PingResult = /*#__PURE__*/function () {
83
83
  if (data) {
84
84
  obj = obj || new PingResult();
85
85
  if (data.hasOwnProperty('endpoint')) {
86
- obj['endpoint'] = _PingEndpointInfo["default"].constructFromObject(data['endpoint']);
86
+ obj['endpoint'] = _ApiClient["default"].convertToType(data['endpoint'], _PingEndpointInfo["default"]);
87
87
  }
88
88
  if (data.hasOwnProperty('seq')) {
89
89
  obj['seq'] = _ApiClient["default"].convertToType(data['seq'], 'Number');
@@ -107,7 +107,7 @@ var PingResult = /*#__PURE__*/function () {
107
107
  obj['rttMs'] = _ApiClient["default"].convertToType(data['rttMs'], 'Number');
108
108
  }
109
109
  if (data.hasOwnProperty('timing')) {
110
- obj['timing'] = _PingTiming["default"].constructFromObject(data['timing']);
110
+ obj['timing'] = _ApiClient["default"].convertToType(data['timing'], _PingTiming["default"]);
111
111
  }
112
112
  if (data.hasOwnProperty('metadata')) {
113
113
  obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'], {
@@ -162,6 +162,7 @@ var PingResult = /*#__PURE__*/function () {
162
162
  PingResult.RequiredProperties = ["endpoint", "seq", "bytesSent", "bytesReceived", "ok", "httpStatus", "rttMs", "timing"];
163
163
 
164
164
  /**
165
+ * Resolved endpoint metadata for the target
165
166
  * @member {module:model/PingEndpointInfo} endpoint
166
167
  */
167
168
  PingResult.prototype['endpoint'] = undefined;
@@ -209,6 +210,7 @@ PingResult.prototype['errorMessage'] = undefined;
209
210
  PingResult.prototype['rttMs'] = undefined;
210
211
 
211
212
  /**
213
+ * Raw timing data recorded on the server
212
214
  * @member {module:model/PingTiming} timing
213
215
  */
214
216
  PingResult.prototype['timing'] = undefined;