@xfloor/floor-memory-sdk-js 1.0.4 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/README.md +155 -36
  2. package/dist/ApiClient.js +5 -3
  3. package/dist/api/DefaultApi.js +277 -38
  4. package/dist/api/EditFloorApi.js +4 -2
  5. package/dist/api/EventApi.js +5 -3
  6. package/dist/api/GetFloorInformationApi.js +12 -6
  7. package/dist/api/GetRecentEventsApi.js +11 -5
  8. package/dist/api/QueryApi.js +4 -2
  9. package/dist/index.js +112 -0
  10. package/dist/model/BlockDetails.js +16 -14
  11. package/dist/model/ChangePassword200Response.js +4 -2
  12. package/dist/model/ConversationThreads200Response.js +146 -0
  13. package/dist/model/ConversationThreads200ResponseThreadsInner.js +142 -0
  14. package/dist/model/EditFloor400Response.js +4 -2
  15. package/dist/model/EditFloor400ResponseError.js +4 -2
  16. package/dist/model/Event400Response.js +4 -2
  17. package/dist/model/Event400ResponseError.js +4 -2
  18. package/dist/model/EventResponse.js +4 -2
  19. package/dist/model/FloorInfo.js +4 -2
  20. package/dist/model/GetConversations200Response.js +160 -0
  21. package/dist/model/GetConversations200ResponseConversationInner.js +107 -0
  22. package/dist/model/GetConversations200ResponseConversationInnerAssistant.js +228 -0
  23. package/dist/model/GetConversations200ResponseConversationInnerAssistantChoicesInner.js +141 -0
  24. package/dist/model/GetConversations200ResponseConversationInnerAssistantChoicesInnerAiModelDetails.js +212 -0
  25. package/dist/model/GetConversations200ResponseConversationInnerAssistantChoicesInnerMessage.js +128 -0
  26. package/dist/model/GetConversations200ResponseConversationInnerAssistantChoicesInnerPromptDetails.js +128 -0
  27. package/dist/model/GetConversations200ResponseConversationInnerAssistantFetchMultiplePosts.js +188 -0
  28. package/dist/model/GetConversations200ResponseConversationInnerAssistantFetchMultiplePostsResultsInner.js +218 -0
  29. package/dist/model/GetConversations200ResponseConversationInnerUser.js +172 -0
  30. package/dist/model/GetConversations200ResponseConversationInnerUserContext.js +170 -0
  31. package/dist/model/GetFloorInformation200Response.js +4 -2
  32. package/dist/model/GetRecentEvents200Response.js +4 -2
  33. package/dist/model/GetRecentEvents200ResponseItemsInner.js +4 -2
  34. package/dist/model/GetRecentEvents200ResponseItemsInnerAuthor.js +4 -2
  35. package/dist/model/GetRecentEvents400Response.js +4 -2
  36. package/dist/model/GetRecentEvents400ResponseError.js +4 -2
  37. package/dist/model/Media.js +4 -2
  38. package/dist/model/Model400ErrorCode.js +4 -2
  39. package/dist/model/PostAdd.js +175 -0
  40. package/dist/model/Query422Response.js +4 -2
  41. package/dist/model/Query422ResponseError.js +4 -2
  42. package/dist/model/QueryRequest.js +10 -6
  43. package/dist/model/QueryRequestFilters.js +4 -2
  44. package/dist/model/QueryResponse.js +4 -2
  45. package/dist/model/QueryResponseItemsInner.js +4 -2
  46. package/dist/model/ResetPassword200Response.js +4 -2
  47. package/dist/model/ResetPassword400Response.js +4 -2
  48. package/dist/model/SendSignInValidationCode200Response.js +143 -0
  49. package/dist/model/SendValidationCode200Response.js +4 -2
  50. package/dist/model/SendValidationCodeRequest.js +4 -2
  51. package/dist/model/SignInWithEmail200Response.js +4 -2
  52. package/dist/model/SignInWithEmail200ResponsePodInfo.js +4 -2
  53. package/dist/model/SignInWithEmail200ResponseProfile.js +4 -2
  54. package/dist/model/SignInWithEmail200ResponseProfileAvatar.js +4 -2
  55. package/dist/model/SignUp200Response.js +4 -2
  56. package/dist/model/SignUpResponse.js +4 -2
  57. package/dist/model/Threads.js +142 -0
  58. package/dist/model/UserDetails.js +4 -2
  59. package/dist/model/ValidateCode400Response.js +4 -2
  60. package/dist/model/ValidateCode400ResponseError.js +4 -2
  61. package/dist/model/ValidateCode412Response.js +4 -2
  62. package/dist/model/ValidateCodeRequest.js +4 -2
  63. package/package.json +1 -1
@@ -0,0 +1,228 @@
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 _GetConversations200ResponseConversationInnerAssistantChoicesInner = _interopRequireDefault(require("./GetConversations200ResponseConversationInnerAssistantChoicesInner"));
9
+ var _GetConversations200ResponseConversationInnerAssistantFetchMultiplePosts = _interopRequireDefault(require("./GetConversations200ResponseConversationInnerAssistantFetchMultiplePosts"));
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
+ * Floor Memory
21
+ * The set APIs are used to develop Floor pds which can be used as their personal assistants. This set of APIs are divided into two parts.
22
+ * - Memory and
23
+ * - Registration. The developer has two ways of using the APIs for the app development. Developer can choose to the Registration APIs for using the existing xfloor infracture or can implement custom Registration process. In the case of custom registration process, the developer is bound to provide proper authentication mechanisms and then send the user information to xlfoor.
24
+ *
25
+ * The version of the OpenAPI document: 1.0.0
26
+ * Contact: contact@ipomo.in
27
+ *
28
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
29
+ * https://openapi-generator.tech
30
+ * Do not edit the class manually.
31
+ *
32
+ */
33
+ /**
34
+ * The GetConversations200ResponseConversationInnerAssistant model module.
35
+ * @module model/GetConversations200ResponseConversationInnerAssistant
36
+ * @version 1.0.6
37
+ */
38
+ var GetConversations200ResponseConversationInnerAssistant = /*#__PURE__*/function () {
39
+ /**
40
+ * Constructs a new <code>GetConversations200ResponseConversationInnerAssistant</code>.
41
+ * @alias module:model/GetConversations200ResponseConversationInnerAssistant
42
+ * @param id {String}
43
+ * @param object {String}
44
+ * @param created {Number}
45
+ * @param floorMode {String}
46
+ * @param model {String}
47
+ * @param choices {Array.<module:model/GetConversations200ResponseConversationInnerAssistantChoicesInner>}
48
+ * @param fetchMultiplePosts {module:model/GetConversations200ResponseConversationInnerAssistantFetchMultiplePosts}
49
+ * @param contentType {String}
50
+ */
51
+ function GetConversations200ResponseConversationInnerAssistant(id, object, created, floorMode, model, choices, fetchMultiplePosts, contentType) {
52
+ _classCallCheck(this, GetConversations200ResponseConversationInnerAssistant);
53
+ GetConversations200ResponseConversationInnerAssistant.initialize(this, id, object, created, floorMode, model, choices, fetchMultiplePosts, contentType);
54
+ }
55
+
56
+ /**
57
+ * Initializes the fields of this object.
58
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
59
+ * Only for internal use.
60
+ */
61
+ return _createClass(GetConversations200ResponseConversationInnerAssistant, null, [{
62
+ key: "initialize",
63
+ value: function initialize(obj, id, object, created, floorMode, model, choices, fetchMultiplePosts, contentType) {
64
+ obj['id'] = id;
65
+ obj['object'] = object;
66
+ obj['created'] = created;
67
+ obj['floor_mode'] = floorMode;
68
+ obj['model'] = model;
69
+ obj['choices'] = choices;
70
+ obj['fetch_multiple_posts'] = fetchMultiplePosts;
71
+ obj['content_type'] = contentType;
72
+ }
73
+
74
+ /**
75
+ * Constructs a <code>GetConversations200ResponseConversationInnerAssistant</code> from a plain JavaScript object, optionally creating a new instance.
76
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
77
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
78
+ * @param {module:model/GetConversations200ResponseConversationInnerAssistant} obj Optional instance to populate.
79
+ * @return {module:model/GetConversations200ResponseConversationInnerAssistant} The populated <code>GetConversations200ResponseConversationInnerAssistant</code> instance.
80
+ */
81
+ }, {
82
+ key: "constructFromObject",
83
+ value: function constructFromObject(data, obj) {
84
+ if (data) {
85
+ obj = obj || new GetConversations200ResponseConversationInnerAssistant();
86
+ if (data.hasOwnProperty('id')) {
87
+ obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String');
88
+ }
89
+ if (data.hasOwnProperty('object')) {
90
+ obj['object'] = _ApiClient["default"].convertToType(data['object'], 'String');
91
+ }
92
+ if (data.hasOwnProperty('created')) {
93
+ obj['created'] = _ApiClient["default"].convertToType(data['created'], 'Number');
94
+ }
95
+ if (data.hasOwnProperty('floor_mode')) {
96
+ obj['floor_mode'] = _ApiClient["default"].convertToType(data['floor_mode'], 'String');
97
+ }
98
+ if (data.hasOwnProperty('model')) {
99
+ obj['model'] = _ApiClient["default"].convertToType(data['model'], 'String');
100
+ }
101
+ if (data.hasOwnProperty('choices')) {
102
+ obj['choices'] = _ApiClient["default"].convertToType(data['choices'], [_GetConversations200ResponseConversationInnerAssistantChoicesInner["default"]]);
103
+ }
104
+ if (data.hasOwnProperty('fetch_multiple_posts')) {
105
+ obj['fetch_multiple_posts'] = _GetConversations200ResponseConversationInnerAssistantFetchMultiplePosts["default"].constructFromObject(data['fetch_multiple_posts']);
106
+ }
107
+ if (data.hasOwnProperty('content_type')) {
108
+ obj['content_type'] = _ApiClient["default"].convertToType(data['content_type'], 'String');
109
+ }
110
+ }
111
+ return obj;
112
+ }
113
+
114
+ /**
115
+ * Validates the JSON data with respect to <code>GetConversations200ResponseConversationInnerAssistant</code>.
116
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
117
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>GetConversations200ResponseConversationInnerAssistant</code>.
118
+ */
119
+ }, {
120
+ key: "validateJSON",
121
+ value: function validateJSON(data) {
122
+ // check to make sure all required properties are present in the JSON string
123
+ var _iterator = _createForOfIteratorHelper(GetConversations200ResponseConversationInnerAssistant.RequiredProperties),
124
+ _step;
125
+ try {
126
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
127
+ var property = _step.value;
128
+ if (!data.hasOwnProperty(property)) {
129
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
130
+ }
131
+ }
132
+ // ensure the json data is a string
133
+ } catch (err) {
134
+ _iterator.e(err);
135
+ } finally {
136
+ _iterator.f();
137
+ }
138
+ if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
139
+ throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
140
+ }
141
+ // ensure the json data is a string
142
+ if (data['object'] && !(typeof data['object'] === 'string' || data['object'] instanceof String)) {
143
+ throw new Error("Expected the field `object` to be a primitive type in the JSON string but got " + data['object']);
144
+ }
145
+ // ensure the json data is a string
146
+ if (data['floor_mode'] && !(typeof data['floor_mode'] === 'string' || data['floor_mode'] instanceof String)) {
147
+ throw new Error("Expected the field `floor_mode` to be a primitive type in the JSON string but got " + data['floor_mode']);
148
+ }
149
+ // ensure the json data is a string
150
+ if (data['model'] && !(typeof data['model'] === 'string' || data['model'] instanceof String)) {
151
+ throw new Error("Expected the field `model` to be a primitive type in the JSON string but got " + data['model']);
152
+ }
153
+ if (data['choices']) {
154
+ // data not null
155
+ // ensure the json data is an array
156
+ if (!Array.isArray(data['choices'])) {
157
+ throw new Error("Expected the field `choices` to be an array in the JSON data but got " + data['choices']);
158
+ }
159
+ // validate the optional field `choices` (array)
160
+ var _iterator2 = _createForOfIteratorHelper(data['choices']),
161
+ _step2;
162
+ try {
163
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
164
+ var item = _step2.value;
165
+ _GetConversations200ResponseConversationInnerAssistantChoicesInner["default"].validateJSON(item);
166
+ }
167
+ } catch (err) {
168
+ _iterator2.e(err);
169
+ } finally {
170
+ _iterator2.f();
171
+ }
172
+ ;
173
+ }
174
+ // validate the optional field `fetch_multiple_posts`
175
+ if (data['fetch_multiple_posts']) {
176
+ // data not null
177
+ _GetConversations200ResponseConversationInnerAssistantFetchMultiplePosts["default"].validateJSON(data['fetch_multiple_posts']);
178
+ }
179
+ // ensure the json data is a string
180
+ if (data['content_type'] && !(typeof data['content_type'] === 'string' || data['content_type'] instanceof String)) {
181
+ throw new Error("Expected the field `content_type` to be a primitive type in the JSON string but got " + data['content_type']);
182
+ }
183
+ return true;
184
+ }
185
+ }]);
186
+ }();
187
+ GetConversations200ResponseConversationInnerAssistant.RequiredProperties = ["id", "object", "created", "floor_mode", "model", "choices", "fetch_multiple_posts", "content_type"];
188
+
189
+ /**
190
+ * @member {String} id
191
+ */
192
+ GetConversations200ResponseConversationInnerAssistant.prototype['id'] = undefined;
193
+
194
+ /**
195
+ * @member {String} object
196
+ */
197
+ GetConversations200ResponseConversationInnerAssistant.prototype['object'] = undefined;
198
+
199
+ /**
200
+ * @member {Number} created
201
+ */
202
+ GetConversations200ResponseConversationInnerAssistant.prototype['created'] = undefined;
203
+
204
+ /**
205
+ * @member {String} floor_mode
206
+ */
207
+ GetConversations200ResponseConversationInnerAssistant.prototype['floor_mode'] = undefined;
208
+
209
+ /**
210
+ * @member {String} model
211
+ */
212
+ GetConversations200ResponseConversationInnerAssistant.prototype['model'] = undefined;
213
+
214
+ /**
215
+ * @member {Array.<module:model/GetConversations200ResponseConversationInnerAssistantChoicesInner>} choices
216
+ */
217
+ GetConversations200ResponseConversationInnerAssistant.prototype['choices'] = undefined;
218
+
219
+ /**
220
+ * @member {module:model/GetConversations200ResponseConversationInnerAssistantFetchMultiplePosts} fetch_multiple_posts
221
+ */
222
+ GetConversations200ResponseConversationInnerAssistant.prototype['fetch_multiple_posts'] = undefined;
223
+
224
+ /**
225
+ * @member {String} content_type
226
+ */
227
+ GetConversations200ResponseConversationInnerAssistant.prototype['content_type'] = undefined;
228
+ var _default = exports["default"] = GetConversations200ResponseConversationInnerAssistant;
@@ -0,0 +1,141 @@
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 _GetConversations200ResponseConversationInnerAssistantChoicesInnerAiModelDetails = _interopRequireDefault(require("./GetConversations200ResponseConversationInnerAssistantChoicesInnerAiModelDetails"));
9
+ var _GetConversations200ResponseConversationInnerAssistantChoicesInnerMessage = _interopRequireDefault(require("./GetConversations200ResponseConversationInnerAssistantChoicesInnerMessage"));
10
+ var _GetConversations200ResponseConversationInnerAssistantChoicesInnerPromptDetails = _interopRequireDefault(require("./GetConversations200ResponseConversationInnerAssistantChoicesInnerPromptDetails"));
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
+ * Floor Memory
19
+ * The set APIs are used to develop Floor pds which can be used as their personal assistants. This set of APIs are divided into two parts.
20
+ * - Memory and
21
+ * - Registration. The developer has two ways of using the APIs for the app development. Developer can choose to the Registration APIs for using the existing xfloor infracture or can implement custom Registration process. In the case of custom registration process, the developer is bound to provide proper authentication mechanisms and then send the user information to xlfoor.
22
+ *
23
+ * The version of the OpenAPI document: 1.0.0
24
+ * Contact: contact@ipomo.in
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 GetConversations200ResponseConversationInnerAssistantChoicesInner model module.
33
+ * @module model/GetConversations200ResponseConversationInnerAssistantChoicesInner
34
+ * @version 1.0.6
35
+ */
36
+ var GetConversations200ResponseConversationInnerAssistantChoicesInner = /*#__PURE__*/function () {
37
+ /**
38
+ * Constructs a new <code>GetConversations200ResponseConversationInnerAssistantChoicesInner</code>.
39
+ * @alias module:model/GetConversations200ResponseConversationInnerAssistantChoicesInner
40
+ */
41
+ function GetConversations200ResponseConversationInnerAssistantChoicesInner() {
42
+ _classCallCheck(this, GetConversations200ResponseConversationInnerAssistantChoicesInner);
43
+ GetConversations200ResponseConversationInnerAssistantChoicesInner.initialize(this);
44
+ }
45
+
46
+ /**
47
+ * Initializes the fields of this object.
48
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
49
+ * Only for internal use.
50
+ */
51
+ return _createClass(GetConversations200ResponseConversationInnerAssistantChoicesInner, null, [{
52
+ key: "initialize",
53
+ value: function initialize(obj) {}
54
+
55
+ /**
56
+ * Constructs a <code>GetConversations200ResponseConversationInnerAssistantChoicesInner</code> from a plain JavaScript object, optionally creating a new instance.
57
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
58
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
59
+ * @param {module:model/GetConversations200ResponseConversationInnerAssistantChoicesInner} obj Optional instance to populate.
60
+ * @return {module:model/GetConversations200ResponseConversationInnerAssistantChoicesInner} The populated <code>GetConversations200ResponseConversationInnerAssistantChoicesInner</code> instance.
61
+ */
62
+ }, {
63
+ key: "constructFromObject",
64
+ value: function constructFromObject(data, obj) {
65
+ if (data) {
66
+ obj = obj || new GetConversations200ResponseConversationInnerAssistantChoicesInner();
67
+ if (data.hasOwnProperty('index')) {
68
+ obj['index'] = _ApiClient["default"].convertToType(data['index'], 'Number');
69
+ }
70
+ if (data.hasOwnProperty('message')) {
71
+ obj['message'] = _GetConversations200ResponseConversationInnerAssistantChoicesInnerMessage["default"].constructFromObject(data['message']);
72
+ }
73
+ if (data.hasOwnProperty('finish_reason')) {
74
+ obj['finish_reason'] = _ApiClient["default"].convertToType(data['finish_reason'], 'String');
75
+ }
76
+ if (data.hasOwnProperty('ai_model_details')) {
77
+ obj['ai_model_details'] = _GetConversations200ResponseConversationInnerAssistantChoicesInnerAiModelDetails["default"].constructFromObject(data['ai_model_details']);
78
+ }
79
+ if (data.hasOwnProperty('prompt_details')) {
80
+ obj['prompt_details'] = _GetConversations200ResponseConversationInnerAssistantChoicesInnerPromptDetails["default"].constructFromObject(data['prompt_details']);
81
+ }
82
+ }
83
+ return obj;
84
+ }
85
+
86
+ /**
87
+ * Validates the JSON data with respect to <code>GetConversations200ResponseConversationInnerAssistantChoicesInner</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>GetConversations200ResponseConversationInnerAssistantChoicesInner</code>.
90
+ */
91
+ }, {
92
+ key: "validateJSON",
93
+ value: function validateJSON(data) {
94
+ // validate the optional field `message`
95
+ if (data['message']) {
96
+ // data not null
97
+ _GetConversations200ResponseConversationInnerAssistantChoicesInnerMessage["default"].validateJSON(data['message']);
98
+ }
99
+ // ensure the json data is a string
100
+ if (data['finish_reason'] && !(typeof data['finish_reason'] === 'string' || data['finish_reason'] instanceof String)) {
101
+ throw new Error("Expected the field `finish_reason` to be a primitive type in the JSON string but got " + data['finish_reason']);
102
+ }
103
+ // validate the optional field `ai_model_details`
104
+ if (data['ai_model_details']) {
105
+ // data not null
106
+ _GetConversations200ResponseConversationInnerAssistantChoicesInnerAiModelDetails["default"].validateJSON(data['ai_model_details']);
107
+ }
108
+ // validate the optional field `prompt_details`
109
+ if (data['prompt_details']) {
110
+ // data not null
111
+ _GetConversations200ResponseConversationInnerAssistantChoicesInnerPromptDetails["default"].validateJSON(data['prompt_details']);
112
+ }
113
+ return true;
114
+ }
115
+ }]);
116
+ }();
117
+ /**
118
+ * @member {Number} index
119
+ */
120
+ GetConversations200ResponseConversationInnerAssistantChoicesInner.prototype['index'] = undefined;
121
+
122
+ /**
123
+ * @member {module:model/GetConversations200ResponseConversationInnerAssistantChoicesInnerMessage} message
124
+ */
125
+ GetConversations200ResponseConversationInnerAssistantChoicesInner.prototype['message'] = undefined;
126
+
127
+ /**
128
+ * @member {String} finish_reason
129
+ */
130
+ GetConversations200ResponseConversationInnerAssistantChoicesInner.prototype['finish_reason'] = undefined;
131
+
132
+ /**
133
+ * @member {module:model/GetConversations200ResponseConversationInnerAssistantChoicesInnerAiModelDetails} ai_model_details
134
+ */
135
+ GetConversations200ResponseConversationInnerAssistantChoicesInner.prototype['ai_model_details'] = undefined;
136
+
137
+ /**
138
+ * @member {module:model/GetConversations200ResponseConversationInnerAssistantChoicesInnerPromptDetails} prompt_details
139
+ */
140
+ GetConversations200ResponseConversationInnerAssistantChoicesInner.prototype['prompt_details'] = undefined;
141
+ var _default = exports["default"] = GetConversations200ResponseConversationInnerAssistantChoicesInner;
@@ -0,0 +1,212 @@
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
+ * Floor Memory
19
+ * The set APIs are used to develop Floor pds which can be used as their personal assistants. This set of APIs are divided into two parts.
20
+ * - Memory and
21
+ * - Registration. The developer has two ways of using the APIs for the app development. Developer can choose to the Registration APIs for using the existing xfloor infracture or can implement custom Registration process. In the case of custom registration process, the developer is bound to provide proper authentication mechanisms and then send the user information to xlfoor.
22
+ *
23
+ * The version of the OpenAPI document: 1.0.0
24
+ * Contact: contact@ipomo.in
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 GetConversations200ResponseConversationInnerAssistantChoicesInnerAiModelDetails model module.
33
+ * @module model/GetConversations200ResponseConversationInnerAssistantChoicesInnerAiModelDetails
34
+ * @version 1.0.6
35
+ */
36
+ var GetConversations200ResponseConversationInnerAssistantChoicesInnerAiModelDetails = /*#__PURE__*/function () {
37
+ /**
38
+ * Constructs a new <code>GetConversations200ResponseConversationInnerAssistantChoicesInnerAiModelDetails</code>.
39
+ * @alias module:model/GetConversations200ResponseConversationInnerAssistantChoicesInnerAiModelDetails
40
+ * @param topP {String}
41
+ * @param outputChoice {String}
42
+ * @param frequencyPenalty {String}
43
+ * @param maxTokens {String}
44
+ * @param presencePenalty {String}
45
+ * @param temperature {String}
46
+ * @param model {String}
47
+ * @param modelId {String}
48
+ */
49
+ function GetConversations200ResponseConversationInnerAssistantChoicesInnerAiModelDetails(topP, outputChoice, frequencyPenalty, maxTokens, presencePenalty, temperature, model, modelId) {
50
+ _classCallCheck(this, GetConversations200ResponseConversationInnerAssistantChoicesInnerAiModelDetails);
51
+ GetConversations200ResponseConversationInnerAssistantChoicesInnerAiModelDetails.initialize(this, topP, outputChoice, frequencyPenalty, maxTokens, presencePenalty, temperature, model, modelId);
52
+ }
53
+
54
+ /**
55
+ * Initializes the fields of this object.
56
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
57
+ * Only for internal use.
58
+ */
59
+ return _createClass(GetConversations200ResponseConversationInnerAssistantChoicesInnerAiModelDetails, null, [{
60
+ key: "initialize",
61
+ value: function initialize(obj, topP, outputChoice, frequencyPenalty, maxTokens, presencePenalty, temperature, model, modelId) {
62
+ obj['top_p'] = topP;
63
+ obj['output_choice'] = outputChoice;
64
+ obj['frequency_penalty'] = frequencyPenalty;
65
+ obj['max_tokens'] = maxTokens;
66
+ obj['presence_penalty'] = presencePenalty;
67
+ obj['temperature'] = temperature;
68
+ obj['model'] = model;
69
+ obj['model_id'] = modelId;
70
+ }
71
+
72
+ /**
73
+ * Constructs a <code>GetConversations200ResponseConversationInnerAssistantChoicesInnerAiModelDetails</code> from a plain JavaScript object, optionally creating a new instance.
74
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
75
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
76
+ * @param {module:model/GetConversations200ResponseConversationInnerAssistantChoicesInnerAiModelDetails} obj Optional instance to populate.
77
+ * @return {module:model/GetConversations200ResponseConversationInnerAssistantChoicesInnerAiModelDetails} The populated <code>GetConversations200ResponseConversationInnerAssistantChoicesInnerAiModelDetails</code> instance.
78
+ */
79
+ }, {
80
+ key: "constructFromObject",
81
+ value: function constructFromObject(data, obj) {
82
+ if (data) {
83
+ obj = obj || new GetConversations200ResponseConversationInnerAssistantChoicesInnerAiModelDetails();
84
+ if (data.hasOwnProperty('top_p')) {
85
+ obj['top_p'] = _ApiClient["default"].convertToType(data['top_p'], 'String');
86
+ }
87
+ if (data.hasOwnProperty('output_choice')) {
88
+ obj['output_choice'] = _ApiClient["default"].convertToType(data['output_choice'], 'String');
89
+ }
90
+ if (data.hasOwnProperty('frequency_penalty')) {
91
+ obj['frequency_penalty'] = _ApiClient["default"].convertToType(data['frequency_penalty'], 'String');
92
+ }
93
+ if (data.hasOwnProperty('max_tokens')) {
94
+ obj['max_tokens'] = _ApiClient["default"].convertToType(data['max_tokens'], 'String');
95
+ }
96
+ if (data.hasOwnProperty('presence_penalty')) {
97
+ obj['presence_penalty'] = _ApiClient["default"].convertToType(data['presence_penalty'], 'String');
98
+ }
99
+ if (data.hasOwnProperty('temperature')) {
100
+ obj['temperature'] = _ApiClient["default"].convertToType(data['temperature'], 'String');
101
+ }
102
+ if (data.hasOwnProperty('model')) {
103
+ obj['model'] = _ApiClient["default"].convertToType(data['model'], 'String');
104
+ }
105
+ if (data.hasOwnProperty('model_id')) {
106
+ obj['model_id'] = _ApiClient["default"].convertToType(data['model_id'], 'String');
107
+ }
108
+ }
109
+ return obj;
110
+ }
111
+
112
+ /**
113
+ * Validates the JSON data with respect to <code>GetConversations200ResponseConversationInnerAssistantChoicesInnerAiModelDetails</code>.
114
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
115
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>GetConversations200ResponseConversationInnerAssistantChoicesInnerAiModelDetails</code>.
116
+ */
117
+ }, {
118
+ key: "validateJSON",
119
+ value: function validateJSON(data) {
120
+ // check to make sure all required properties are present in the JSON string
121
+ var _iterator = _createForOfIteratorHelper(GetConversations200ResponseConversationInnerAssistantChoicesInnerAiModelDetails.RequiredProperties),
122
+ _step;
123
+ try {
124
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
125
+ var property = _step.value;
126
+ if (!data.hasOwnProperty(property)) {
127
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
128
+ }
129
+ }
130
+ // ensure the json data is a string
131
+ } catch (err) {
132
+ _iterator.e(err);
133
+ } finally {
134
+ _iterator.f();
135
+ }
136
+ if (data['top_p'] && !(typeof data['top_p'] === 'string' || data['top_p'] instanceof String)) {
137
+ throw new Error("Expected the field `top_p` to be a primitive type in the JSON string but got " + data['top_p']);
138
+ }
139
+ // ensure the json data is a string
140
+ if (data['output_choice'] && !(typeof data['output_choice'] === 'string' || data['output_choice'] instanceof String)) {
141
+ throw new Error("Expected the field `output_choice` to be a primitive type in the JSON string but got " + data['output_choice']);
142
+ }
143
+ // ensure the json data is a string
144
+ if (data['frequency_penalty'] && !(typeof data['frequency_penalty'] === 'string' || data['frequency_penalty'] instanceof String)) {
145
+ throw new Error("Expected the field `frequency_penalty` to be a primitive type in the JSON string but got " + data['frequency_penalty']);
146
+ }
147
+ // ensure the json data is a string
148
+ if (data['max_tokens'] && !(typeof data['max_tokens'] === 'string' || data['max_tokens'] instanceof String)) {
149
+ throw new Error("Expected the field `max_tokens` to be a primitive type in the JSON string but got " + data['max_tokens']);
150
+ }
151
+ // ensure the json data is a string
152
+ if (data['presence_penalty'] && !(typeof data['presence_penalty'] === 'string' || data['presence_penalty'] instanceof String)) {
153
+ throw new Error("Expected the field `presence_penalty` to be a primitive type in the JSON string but got " + data['presence_penalty']);
154
+ }
155
+ // ensure the json data is a string
156
+ if (data['temperature'] && !(typeof data['temperature'] === 'string' || data['temperature'] instanceof String)) {
157
+ throw new Error("Expected the field `temperature` to be a primitive type in the JSON string but got " + data['temperature']);
158
+ }
159
+ // ensure the json data is a string
160
+ if (data['model'] && !(typeof data['model'] === 'string' || data['model'] instanceof String)) {
161
+ throw new Error("Expected the field `model` to be a primitive type in the JSON string but got " + data['model']);
162
+ }
163
+ // ensure the json data is a string
164
+ if (data['model_id'] && !(typeof data['model_id'] === 'string' || data['model_id'] instanceof String)) {
165
+ throw new Error("Expected the field `model_id` to be a primitive type in the JSON string but got " + data['model_id']);
166
+ }
167
+ return true;
168
+ }
169
+ }]);
170
+ }();
171
+ GetConversations200ResponseConversationInnerAssistantChoicesInnerAiModelDetails.RequiredProperties = ["top_p", "output_choice", "frequency_penalty", "max_tokens", "presence_penalty", "temperature", "model", "model_id"];
172
+
173
+ /**
174
+ * @member {String} top_p
175
+ */
176
+ GetConversations200ResponseConversationInnerAssistantChoicesInnerAiModelDetails.prototype['top_p'] = undefined;
177
+
178
+ /**
179
+ * @member {String} output_choice
180
+ */
181
+ GetConversations200ResponseConversationInnerAssistantChoicesInnerAiModelDetails.prototype['output_choice'] = undefined;
182
+
183
+ /**
184
+ * @member {String} frequency_penalty
185
+ */
186
+ GetConversations200ResponseConversationInnerAssistantChoicesInnerAiModelDetails.prototype['frequency_penalty'] = undefined;
187
+
188
+ /**
189
+ * @member {String} max_tokens
190
+ */
191
+ GetConversations200ResponseConversationInnerAssistantChoicesInnerAiModelDetails.prototype['max_tokens'] = undefined;
192
+
193
+ /**
194
+ * @member {String} presence_penalty
195
+ */
196
+ GetConversations200ResponseConversationInnerAssistantChoicesInnerAiModelDetails.prototype['presence_penalty'] = undefined;
197
+
198
+ /**
199
+ * @member {String} temperature
200
+ */
201
+ GetConversations200ResponseConversationInnerAssistantChoicesInnerAiModelDetails.prototype['temperature'] = undefined;
202
+
203
+ /**
204
+ * @member {String} model
205
+ */
206
+ GetConversations200ResponseConversationInnerAssistantChoicesInnerAiModelDetails.prototype['model'] = undefined;
207
+
208
+ /**
209
+ * @member {String} model_id
210
+ */
211
+ GetConversations200ResponseConversationInnerAssistantChoicesInnerAiModelDetails.prototype['model_id'] = undefined;
212
+ var _default = exports["default"] = GetConversations200ResponseConversationInnerAssistantChoicesInnerAiModelDetails;