@xfloor/memory-sdk-js 1.0.1

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