@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,128 @@
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. - 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 Media model module.
31
+ * @module model/Media
32
+ * @version 1.0.1
33
+ */
34
+ var Media = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>Media</code>.
37
+ * @alias module:model/Media
38
+ * @param url {String} Url where media is stored
39
+ * @param type {String} ID of the media
40
+ */
41
+ function Media(url, type) {
42
+ _classCallCheck(this, Media);
43
+ Media.initialize(this, url, type);
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(Media, null, [{
52
+ key: "initialize",
53
+ value: function initialize(obj, url, type) {
54
+ obj['url'] = url;
55
+ obj['type'] = type;
56
+ }
57
+
58
+ /**
59
+ * Constructs a <code>Media</code> from a plain JavaScript object, optionally creating a new instance.
60
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
61
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
62
+ * @param {module:model/Media} obj Optional instance to populate.
63
+ * @return {module:model/Media} The populated <code>Media</code> instance.
64
+ */
65
+ }, {
66
+ key: "constructFromObject",
67
+ value: function constructFromObject(data, obj) {
68
+ if (data) {
69
+ obj = obj || new Media();
70
+ if (data.hasOwnProperty('url')) {
71
+ obj['url'] = _ApiClient["default"].convertToType(data['url'], 'String');
72
+ }
73
+ if (data.hasOwnProperty('type')) {
74
+ obj['type'] = _ApiClient["default"].convertToType(data['type'], 'String');
75
+ }
76
+ }
77
+ return obj;
78
+ }
79
+
80
+ /**
81
+ * Validates the JSON data with respect to <code>Media</code>.
82
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
83
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>Media</code>.
84
+ */
85
+ }, {
86
+ key: "validateJSON",
87
+ value: function validateJSON(data) {
88
+ // check to make sure all required properties are present in the JSON string
89
+ var _iterator = _createForOfIteratorHelper(Media.RequiredProperties),
90
+ _step;
91
+ try {
92
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
93
+ var property = _step.value;
94
+ if (!data.hasOwnProperty(property)) {
95
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
96
+ }
97
+ }
98
+ // ensure the json data is a string
99
+ } catch (err) {
100
+ _iterator.e(err);
101
+ } finally {
102
+ _iterator.f();
103
+ }
104
+ if (data['url'] && !(typeof data['url'] === 'string' || data['url'] instanceof String)) {
105
+ throw new Error("Expected the field `url` to be a primitive type in the JSON string but got " + data['url']);
106
+ }
107
+ // ensure the json data is a string
108
+ if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) {
109
+ throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']);
110
+ }
111
+ return true;
112
+ }
113
+ }]);
114
+ }();
115
+ Media.RequiredProperties = ["url", "type"];
116
+
117
+ /**
118
+ * Url where media is stored
119
+ * @member {String} url
120
+ */
121
+ Media.prototype['url'] = undefined;
122
+
123
+ /**
124
+ * ID of the media
125
+ * @member {String} type
126
+ */
127
+ Media.prototype['type'] = undefined;
128
+ var _default = exports["default"] = Media;
@@ -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
+ 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. - 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 Model400ErrorCode model module.
31
+ * @module model/Model400ErrorCode
32
+ * @version 1.0.1
33
+ */
34
+ var Model400ErrorCode = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>Model400ErrorCode</code>.
37
+ * @alias module:model/Model400ErrorCode
38
+ * @param code {String} Validation Error
39
+ * @param message {String} Error Message
40
+ * @param path {String} REST api path
41
+ * @param timestamp {String} Time stamp
42
+ */
43
+ function Model400ErrorCode(code, message, path, timestamp) {
44
+ _classCallCheck(this, Model400ErrorCode);
45
+ Model400ErrorCode.initialize(this, code, message, path, timestamp);
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(Model400ErrorCode, null, [{
54
+ key: "initialize",
55
+ value: function initialize(obj, code, message, path, timestamp) {
56
+ obj['code'] = code;
57
+ obj['message'] = message;
58
+ obj['path'] = path;
59
+ obj['timestamp'] = timestamp;
60
+ }
61
+
62
+ /**
63
+ * Constructs a <code>Model400ErrorCode</code> from a plain JavaScript object, optionally creating a new instance.
64
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
65
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
66
+ * @param {module:model/Model400ErrorCode} obj Optional instance to populate.
67
+ * @return {module:model/Model400ErrorCode} The populated <code>Model400ErrorCode</code> instance.
68
+ */
69
+ }, {
70
+ key: "constructFromObject",
71
+ value: function constructFromObject(data, obj) {
72
+ if (data) {
73
+ obj = obj || new Model400ErrorCode();
74
+ if (data.hasOwnProperty('code')) {
75
+ obj['code'] = _ApiClient["default"].convertToType(data['code'], 'String');
76
+ }
77
+ if (data.hasOwnProperty('message')) {
78
+ obj['message'] = _ApiClient["default"].convertToType(data['message'], 'String');
79
+ }
80
+ if (data.hasOwnProperty('path')) {
81
+ obj['path'] = _ApiClient["default"].convertToType(data['path'], 'String');
82
+ }
83
+ if (data.hasOwnProperty('timestamp')) {
84
+ obj['timestamp'] = _ApiClient["default"].convertToType(data['timestamp'], 'String');
85
+ }
86
+ }
87
+ return obj;
88
+ }
89
+
90
+ /**
91
+ * Validates the JSON data with respect to <code>Model400ErrorCode</code>.
92
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
93
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>Model400ErrorCode</code>.
94
+ */
95
+ }, {
96
+ key: "validateJSON",
97
+ value: function validateJSON(data) {
98
+ // check to make sure all required properties are present in the JSON string
99
+ var _iterator = _createForOfIteratorHelper(Model400ErrorCode.RequiredProperties),
100
+ _step;
101
+ try {
102
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
103
+ var property = _step.value;
104
+ if (!data.hasOwnProperty(property)) {
105
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
106
+ }
107
+ }
108
+ // ensure the json data is a string
109
+ } catch (err) {
110
+ _iterator.e(err);
111
+ } finally {
112
+ _iterator.f();
113
+ }
114
+ if (data['code'] && !(typeof data['code'] === 'string' || data['code'] instanceof String)) {
115
+ throw new Error("Expected the field `code` to be a primitive type in the JSON string but got " + data['code']);
116
+ }
117
+ // ensure the json data is a string
118
+ if (data['message'] && !(typeof data['message'] === 'string' || data['message'] instanceof String)) {
119
+ throw new Error("Expected the field `message` to be a primitive type in the JSON string but got " + data['message']);
120
+ }
121
+ // ensure the json data is a string
122
+ if (data['path'] && !(typeof data['path'] === 'string' || data['path'] instanceof String)) {
123
+ throw new Error("Expected the field `path` to be a primitive type in the JSON string but got " + data['path']);
124
+ }
125
+ // ensure the json data is a string
126
+ if (data['timestamp'] && !(typeof data['timestamp'] === 'string' || data['timestamp'] instanceof String)) {
127
+ throw new Error("Expected the field `timestamp` to be a primitive type in the JSON string but got " + data['timestamp']);
128
+ }
129
+ return true;
130
+ }
131
+ }]);
132
+ }();
133
+ Model400ErrorCode.RequiredProperties = ["code", "message", "path", "timestamp"];
134
+
135
+ /**
136
+ * Validation Error
137
+ * @member {String} code
138
+ */
139
+ Model400ErrorCode.prototype['code'] = undefined;
140
+
141
+ /**
142
+ * Error Message
143
+ * @member {String} message
144
+ */
145
+ Model400ErrorCode.prototype['message'] = undefined;
146
+
147
+ /**
148
+ * REST api path
149
+ * @member {String} path
150
+ */
151
+ Model400ErrorCode.prototype['path'] = undefined;
152
+
153
+ /**
154
+ * Time stamp
155
+ * @member {String} timestamp
156
+ */
157
+ Model400ErrorCode.prototype['timestamp'] = undefined;
158
+ var _default = exports["default"] = Model400ErrorCode;
@@ -0,0 +1,173 @@
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. - 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 PostAdd model module.
31
+ * @module model/PostAdd
32
+ * @version 1.0.1
33
+ */
34
+ var PostAdd = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>PostAdd</code>.
37
+ * @alias module:model/PostAdd
38
+ * @param floorId {String} Floor ID to which the post needs to be added
39
+ * @param BID {String} Block type (0 or 1)
40
+ * @param userId {String} User Identifcation who has added the post
41
+ * @param title {String} Title of the post
42
+ * @param description {String} Description or Details
43
+ */
44
+ function PostAdd(floorId, BID, userId, title, description) {
45
+ _classCallCheck(this, PostAdd);
46
+ PostAdd.initialize(this, floorId, BID, userId, title, description);
47
+ }
48
+
49
+ /**
50
+ * Initializes the fields of this object.
51
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
52
+ * Only for internal use.
53
+ */
54
+ return _createClass(PostAdd, null, [{
55
+ key: "initialize",
56
+ value: function initialize(obj, floorId, BID, userId, title, description) {
57
+ obj['floor_id'] = floorId;
58
+ obj['BID'] = BID;
59
+ obj['user_id'] = userId;
60
+ obj['title'] = title;
61
+ obj['description'] = description;
62
+ }
63
+
64
+ /**
65
+ * Constructs a <code>PostAdd</code> from a plain JavaScript object, optionally creating a new instance.
66
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
67
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
68
+ * @param {module:model/PostAdd} obj Optional instance to populate.
69
+ * @return {module:model/PostAdd} The populated <code>PostAdd</code> instance.
70
+ */
71
+ }, {
72
+ key: "constructFromObject",
73
+ value: function constructFromObject(data, obj) {
74
+ if (data) {
75
+ obj = obj || new PostAdd();
76
+ if (data.hasOwnProperty('floor_id')) {
77
+ obj['floor_id'] = _ApiClient["default"].convertToType(data['floor_id'], 'String');
78
+ }
79
+ if (data.hasOwnProperty('BID')) {
80
+ obj['BID'] = _ApiClient["default"].convertToType(data['BID'], 'String');
81
+ }
82
+ if (data.hasOwnProperty('user_id')) {
83
+ obj['user_id'] = _ApiClient["default"].convertToType(data['user_id'], 'String');
84
+ }
85
+ if (data.hasOwnProperty('title')) {
86
+ obj['title'] = _ApiClient["default"].convertToType(data['title'], 'String');
87
+ }
88
+ if (data.hasOwnProperty('description')) {
89
+ obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
90
+ }
91
+ }
92
+ return obj;
93
+ }
94
+
95
+ /**
96
+ * Validates the JSON data with respect to <code>PostAdd</code>.
97
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
98
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>PostAdd</code>.
99
+ */
100
+ }, {
101
+ key: "validateJSON",
102
+ value: function validateJSON(data) {
103
+ // check to make sure all required properties are present in the JSON string
104
+ var _iterator = _createForOfIteratorHelper(PostAdd.RequiredProperties),
105
+ _step;
106
+ try {
107
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
108
+ var property = _step.value;
109
+ if (!data.hasOwnProperty(property)) {
110
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
111
+ }
112
+ }
113
+ // ensure the json data is a string
114
+ } catch (err) {
115
+ _iterator.e(err);
116
+ } finally {
117
+ _iterator.f();
118
+ }
119
+ if (data['floor_id'] && !(typeof data['floor_id'] === 'string' || data['floor_id'] instanceof String)) {
120
+ throw new Error("Expected the field `floor_id` to be a primitive type in the JSON string but got " + data['floor_id']);
121
+ }
122
+ // ensure the json data is a string
123
+ if (data['BID'] && !(typeof data['BID'] === 'string' || data['BID'] instanceof String)) {
124
+ throw new Error("Expected the field `BID` to be a primitive type in the JSON string but got " + data['BID']);
125
+ }
126
+ // ensure the json data is a string
127
+ if (data['user_id'] && !(typeof data['user_id'] === 'string' || data['user_id'] instanceof String)) {
128
+ throw new Error("Expected the field `user_id` to be a primitive type in the JSON string but got " + data['user_id']);
129
+ }
130
+ // ensure the json data is a string
131
+ if (data['title'] && !(typeof data['title'] === 'string' || data['title'] instanceof String)) {
132
+ throw new Error("Expected the field `title` to be a primitive type in the JSON string but got " + data['title']);
133
+ }
134
+ // ensure the json data is a string
135
+ if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
136
+ throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
137
+ }
138
+ return true;
139
+ }
140
+ }]);
141
+ }();
142
+ PostAdd.RequiredProperties = ["floor_id", "BID", "user_id", "title", "description"];
143
+
144
+ /**
145
+ * Floor ID to which the post needs to be added
146
+ * @member {String} floor_id
147
+ */
148
+ PostAdd.prototype['floor_id'] = undefined;
149
+
150
+ /**
151
+ * Block type (0 or 1)
152
+ * @member {String} BID
153
+ */
154
+ PostAdd.prototype['BID'] = undefined;
155
+
156
+ /**
157
+ * User Identifcation who has added the post
158
+ * @member {String} user_id
159
+ */
160
+ PostAdd.prototype['user_id'] = undefined;
161
+
162
+ /**
163
+ * Title of the post
164
+ * @member {String} title
165
+ */
166
+ PostAdd.prototype['title'] = undefined;
167
+
168
+ /**
169
+ * Description or Details
170
+ * @member {String} description
171
+ */
172
+ PostAdd.prototype['description'] = undefined;
173
+ var _default = exports["default"] = PostAdd;
@@ -0,0 +1,114 @@
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 _Query422ResponseError = _interopRequireDefault(require("./Query422ResponseError"));
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 Query422Response model module.
32
+ * @module model/Query422Response
33
+ * @version 1.0.1
34
+ */
35
+ var Query422Response = /*#__PURE__*/function () {
36
+ /**
37
+ * Constructs a new <code>Query422Response</code>.
38
+ * @alias module:model/Query422Response
39
+ * @param error {module:model/Query422ResponseError}
40
+ */
41
+ function Query422Response(error) {
42
+ _classCallCheck(this, Query422Response);
43
+ Query422Response.initialize(this, error);
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(Query422Response, null, [{
52
+ key: "initialize",
53
+ value: function initialize(obj, error) {
54
+ obj['error'] = error;
55
+ }
56
+
57
+ /**
58
+ * Constructs a <code>Query422Response</code> from a plain JavaScript object, optionally creating a new instance.
59
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
60
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
61
+ * @param {module:model/Query422Response} obj Optional instance to populate.
62
+ * @return {module:model/Query422Response} The populated <code>Query422Response</code> instance.
63
+ */
64
+ }, {
65
+ key: "constructFromObject",
66
+ value: function constructFromObject(data, obj) {
67
+ if (data) {
68
+ obj = obj || new Query422Response();
69
+ if (data.hasOwnProperty('error')) {
70
+ obj['error'] = _Query422ResponseError["default"].constructFromObject(data['error']);
71
+ }
72
+ }
73
+ return obj;
74
+ }
75
+
76
+ /**
77
+ * Validates the JSON data with respect to <code>Query422Response</code>.
78
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
79
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>Query422Response</code>.
80
+ */
81
+ }, {
82
+ key: "validateJSON",
83
+ value: function validateJSON(data) {
84
+ // check to make sure all required properties are present in the JSON string
85
+ var _iterator = _createForOfIteratorHelper(Query422Response.RequiredProperties),
86
+ _step;
87
+ try {
88
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
89
+ var property = _step.value;
90
+ if (!data.hasOwnProperty(property)) {
91
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
92
+ }
93
+ }
94
+ // validate the optional field `error`
95
+ } catch (err) {
96
+ _iterator.e(err);
97
+ } finally {
98
+ _iterator.f();
99
+ }
100
+ if (data['error']) {
101
+ // data not null
102
+ _Query422ResponseError["default"].validateJSON(data['error']);
103
+ }
104
+ return true;
105
+ }
106
+ }]);
107
+ }();
108
+ Query422Response.RequiredProperties = ["error"];
109
+
110
+ /**
111
+ * @member {module:model/Query422ResponseError} error
112
+ */
113
+ Query422Response.prototype['error'] = undefined;
114
+ var _default = exports["default"] = Query422Response;