@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 SendValidationCodeRequest model module.
31
+ * @module model/SendValidationCodeRequest
32
+ * @version 1.0.1
33
+ */
34
+ var SendValidationCodeRequest = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>SendValidationCodeRequest</code>.
37
+ * @alias module:model/SendValidationCodeRequest
38
+ * @param userId {String} user id
39
+ * @param mode {String} Mode - 0 for getting activation code, 1 for password change
40
+ */
41
+ function SendValidationCodeRequest(userId, mode) {
42
+ _classCallCheck(this, SendValidationCodeRequest);
43
+ SendValidationCodeRequest.initialize(this, userId, mode);
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(SendValidationCodeRequest, null, [{
52
+ key: "initialize",
53
+ value: function initialize(obj, userId, mode) {
54
+ obj['user_id'] = userId;
55
+ obj['mode'] = mode;
56
+ }
57
+
58
+ /**
59
+ * Constructs a <code>SendValidationCodeRequest</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/SendValidationCodeRequest} obj Optional instance to populate.
63
+ * @return {module:model/SendValidationCodeRequest} The populated <code>SendValidationCodeRequest</code> instance.
64
+ */
65
+ }, {
66
+ key: "constructFromObject",
67
+ value: function constructFromObject(data, obj) {
68
+ if (data) {
69
+ obj = obj || new SendValidationCodeRequest();
70
+ if (data.hasOwnProperty('user_id')) {
71
+ obj['user_id'] = _ApiClient["default"].convertToType(data['user_id'], 'String');
72
+ }
73
+ if (data.hasOwnProperty('mode')) {
74
+ obj['mode'] = _ApiClient["default"].convertToType(data['mode'], 'String');
75
+ }
76
+ }
77
+ return obj;
78
+ }
79
+
80
+ /**
81
+ * Validates the JSON data with respect to <code>SendValidationCodeRequest</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>SendValidationCodeRequest</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(SendValidationCodeRequest.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['user_id'] && !(typeof data['user_id'] === 'string' || data['user_id'] instanceof String)) {
105
+ throw new Error("Expected the field `user_id` to be a primitive type in the JSON string but got " + data['user_id']);
106
+ }
107
+ // ensure the json data is a string
108
+ if (data['mode'] && !(typeof data['mode'] === 'string' || data['mode'] instanceof String)) {
109
+ throw new Error("Expected the field `mode` to be a primitive type in the JSON string but got " + data['mode']);
110
+ }
111
+ return true;
112
+ }
113
+ }]);
114
+ }();
115
+ SendValidationCodeRequest.RequiredProperties = ["user_id", "mode"];
116
+
117
+ /**
118
+ * user id
119
+ * @member {String} user_id
120
+ */
121
+ SendValidationCodeRequest.prototype['user_id'] = undefined;
122
+
123
+ /**
124
+ * Mode - 0 for getting activation code, 1 for password change
125
+ * @member {String} mode
126
+ */
127
+ SendValidationCodeRequest.prototype['mode'] = undefined;
128
+ var _default = exports["default"] = SendValidationCodeRequest;
@@ -0,0 +1,145 @@
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 _FloorInfo = _interopRequireDefault(require("./FloorInfo"));
9
+ var _SignInWithEmail200ResponseProfile = _interopRequireDefault(require("./SignInWithEmail200ResponseProfile"));
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 SignInWithEmail200Response model module.
33
+ * @module model/SignInWithEmail200Response
34
+ * @version 1.0.1
35
+ */
36
+ var SignInWithEmail200Response = /*#__PURE__*/function () {
37
+ /**
38
+ * Constructs a new <code>SignInWithEmail200Response</code>.
39
+ * @alias module:model/SignInWithEmail200Response
40
+ * @param podInfo {module:model/FloorInfo}
41
+ * @param profile {module:model/SignInWithEmail200ResponseProfile}
42
+ * @param appId {String} App ID
43
+ */
44
+ function SignInWithEmail200Response(podInfo, profile, appId) {
45
+ _classCallCheck(this, SignInWithEmail200Response);
46
+ SignInWithEmail200Response.initialize(this, podInfo, profile, appId);
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(SignInWithEmail200Response, null, [{
55
+ key: "initialize",
56
+ value: function initialize(obj, podInfo, profile, appId) {
57
+ obj['pod_info'] = podInfo;
58
+ obj['profile'] = profile;
59
+ obj['app_id'] = appId;
60
+ }
61
+
62
+ /**
63
+ * Constructs a <code>SignInWithEmail200Response</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/SignInWithEmail200Response} obj Optional instance to populate.
67
+ * @return {module:model/SignInWithEmail200Response} The populated <code>SignInWithEmail200Response</code> instance.
68
+ */
69
+ }, {
70
+ key: "constructFromObject",
71
+ value: function constructFromObject(data, obj) {
72
+ if (data) {
73
+ obj = obj || new SignInWithEmail200Response();
74
+ if (data.hasOwnProperty('pod_info')) {
75
+ obj['pod_info'] = _FloorInfo["default"].constructFromObject(data['pod_info']);
76
+ }
77
+ if (data.hasOwnProperty('profile')) {
78
+ obj['profile'] = _SignInWithEmail200ResponseProfile["default"].constructFromObject(data['profile']);
79
+ }
80
+ if (data.hasOwnProperty('app_id')) {
81
+ obj['app_id'] = _ApiClient["default"].convertToType(data['app_id'], 'String');
82
+ }
83
+ }
84
+ return obj;
85
+ }
86
+
87
+ /**
88
+ * Validates the JSON data with respect to <code>SignInWithEmail200Response</code>.
89
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
90
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>SignInWithEmail200Response</code>.
91
+ */
92
+ }, {
93
+ key: "validateJSON",
94
+ value: function validateJSON(data) {
95
+ // check to make sure all required properties are present in the JSON string
96
+ var _iterator = _createForOfIteratorHelper(SignInWithEmail200Response.RequiredProperties),
97
+ _step;
98
+ try {
99
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
100
+ var property = _step.value;
101
+ if (!data.hasOwnProperty(property)) {
102
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
103
+ }
104
+ }
105
+ // validate the optional field `pod_info`
106
+ } catch (err) {
107
+ _iterator.e(err);
108
+ } finally {
109
+ _iterator.f();
110
+ }
111
+ if (data['pod_info']) {
112
+ // data not null
113
+ _FloorInfo["default"].validateJSON(data['pod_info']);
114
+ }
115
+ // validate the optional field `profile`
116
+ if (data['profile']) {
117
+ // data not null
118
+ _SignInWithEmail200ResponseProfile["default"].validateJSON(data['profile']);
119
+ }
120
+ // ensure the json data is a string
121
+ if (data['app_id'] && !(typeof data['app_id'] === 'string' || data['app_id'] instanceof String)) {
122
+ throw new Error("Expected the field `app_id` to be a primitive type in the JSON string but got " + data['app_id']);
123
+ }
124
+ return true;
125
+ }
126
+ }]);
127
+ }();
128
+ SignInWithEmail200Response.RequiredProperties = ["pod_info", "profile", "app_id"];
129
+
130
+ /**
131
+ * @member {module:model/FloorInfo} pod_info
132
+ */
133
+ SignInWithEmail200Response.prototype['pod_info'] = undefined;
134
+
135
+ /**
136
+ * @member {module:model/SignInWithEmail200ResponseProfile} profile
137
+ */
138
+ SignInWithEmail200Response.prototype['profile'] = undefined;
139
+
140
+ /**
141
+ * App ID
142
+ * @member {String} app_id
143
+ */
144
+ SignInWithEmail200Response.prototype['app_id'] = undefined;
145
+ var _default = exports["default"] = SignInWithEmail200Response;
@@ -0,0 +1,230 @@
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 _BlockDetails = _interopRequireDefault(require("./BlockDetails"));
9
+ var _SignInWithEmail200ResponseProfileAvatar = _interopRequireDefault(require("./SignInWithEmail200ResponseProfileAvatar"));
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 SignInWithEmail200ResponseProfile model module.
33
+ * @module model/SignInWithEmail200ResponseProfile
34
+ * @version 1.0.1
35
+ */
36
+ var SignInWithEmail200ResponseProfile = /*#__PURE__*/function () {
37
+ /**
38
+ * Constructs a new <code>SignInWithEmail200ResponseProfile</code>.
39
+ * User profile details
40
+ * @alias module:model/SignInWithEmail200ResponseProfile
41
+ * @param floorId {String} Associated floor ID
42
+ * @param fid {String} Unique ID of floor
43
+ * @param blocks {Array.<module:model/BlockDetails>} List of Blocks
44
+ * @param userId {String} Unique User ID
45
+ */
46
+ function SignInWithEmail200ResponseProfile(floorId, fid, blocks, userId) {
47
+ _classCallCheck(this, SignInWithEmail200ResponseProfile);
48
+ SignInWithEmail200ResponseProfile.initialize(this, floorId, fid, blocks, userId);
49
+ }
50
+
51
+ /**
52
+ * Initializes the fields of this object.
53
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
54
+ * Only for internal use.
55
+ */
56
+ return _createClass(SignInWithEmail200ResponseProfile, null, [{
57
+ key: "initialize",
58
+ value: function initialize(obj, floorId, fid, blocks, userId) {
59
+ obj['floor_id'] = floorId;
60
+ obj['fid'] = fid;
61
+ obj['blocks'] = blocks;
62
+ obj['user_id'] = userId;
63
+ }
64
+
65
+ /**
66
+ * Constructs a <code>SignInWithEmail200ResponseProfile</code> from a plain JavaScript object, optionally creating a new instance.
67
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
68
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
69
+ * @param {module:model/SignInWithEmail200ResponseProfile} obj Optional instance to populate.
70
+ * @return {module:model/SignInWithEmail200ResponseProfile} The populated <code>SignInWithEmail200ResponseProfile</code> instance.
71
+ */
72
+ }, {
73
+ key: "constructFromObject",
74
+ value: function constructFromObject(data, obj) {
75
+ if (data) {
76
+ obj = obj || new SignInWithEmail200ResponseProfile();
77
+ if (data.hasOwnProperty('floor_id')) {
78
+ obj['floor_id'] = _ApiClient["default"].convertToType(data['floor_id'], 'String');
79
+ }
80
+ if (data.hasOwnProperty('fid')) {
81
+ obj['fid'] = _ApiClient["default"].convertToType(data['fid'], 'String');
82
+ }
83
+ if (data.hasOwnProperty('blocks')) {
84
+ obj['blocks'] = _ApiClient["default"].convertToType(data['blocks'], [_BlockDetails["default"]]);
85
+ }
86
+ if (data.hasOwnProperty('name')) {
87
+ obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
88
+ }
89
+ if (data.hasOwnProperty('email')) {
90
+ obj['email'] = _ApiClient["default"].convertToType(data['email'], 'String');
91
+ }
92
+ if (data.hasOwnProperty('mobile_number')) {
93
+ obj['mobile_number'] = _ApiClient["default"].convertToType(data['mobile_number'], 'String');
94
+ }
95
+ if (data.hasOwnProperty('user_id')) {
96
+ obj['user_id'] = _ApiClient["default"].convertToType(data['user_id'], 'String');
97
+ }
98
+ if (data.hasOwnProperty('avatar')) {
99
+ obj['avatar'] = _SignInWithEmail200ResponseProfileAvatar["default"].constructFromObject(data['avatar']);
100
+ }
101
+ }
102
+ return obj;
103
+ }
104
+
105
+ /**
106
+ * Validates the JSON data with respect to <code>SignInWithEmail200ResponseProfile</code>.
107
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
108
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>SignInWithEmail200ResponseProfile</code>.
109
+ */
110
+ }, {
111
+ key: "validateJSON",
112
+ value: function validateJSON(data) {
113
+ // check to make sure all required properties are present in the JSON string
114
+ var _iterator = _createForOfIteratorHelper(SignInWithEmail200ResponseProfile.RequiredProperties),
115
+ _step;
116
+ try {
117
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
118
+ var property = _step.value;
119
+ if (!data.hasOwnProperty(property)) {
120
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
121
+ }
122
+ }
123
+ // ensure the json data is a string
124
+ } catch (err) {
125
+ _iterator.e(err);
126
+ } finally {
127
+ _iterator.f();
128
+ }
129
+ if (data['floor_id'] && !(typeof data['floor_id'] === 'string' || data['floor_id'] instanceof String)) {
130
+ throw new Error("Expected the field `floor_id` to be a primitive type in the JSON string but got " + data['floor_id']);
131
+ }
132
+ // ensure the json data is a string
133
+ if (data['fid'] && !(typeof data['fid'] === 'string' || data['fid'] instanceof String)) {
134
+ throw new Error("Expected the field `fid` to be a primitive type in the JSON string but got " + data['fid']);
135
+ }
136
+ if (data['blocks']) {
137
+ // data not null
138
+ // ensure the json data is an array
139
+ if (!Array.isArray(data['blocks'])) {
140
+ throw new Error("Expected the field `blocks` to be an array in the JSON data but got " + data['blocks']);
141
+ }
142
+ // validate the optional field `blocks` (array)
143
+ var _iterator2 = _createForOfIteratorHelper(data['blocks']),
144
+ _step2;
145
+ try {
146
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
147
+ var item = _step2.value;
148
+ _BlockDetails["default"].validateJSON(item);
149
+ }
150
+ } catch (err) {
151
+ _iterator2.e(err);
152
+ } finally {
153
+ _iterator2.f();
154
+ }
155
+ ;
156
+ }
157
+ // ensure the json data is a string
158
+ if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
159
+ throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
160
+ }
161
+ // ensure the json data is a string
162
+ if (data['email'] && !(typeof data['email'] === 'string' || data['email'] instanceof String)) {
163
+ throw new Error("Expected the field `email` to be a primitive type in the JSON string but got " + data['email']);
164
+ }
165
+ // ensure the json data is a string
166
+ if (data['mobile_number'] && !(typeof data['mobile_number'] === 'string' || data['mobile_number'] instanceof String)) {
167
+ throw new Error("Expected the field `mobile_number` to be a primitive type in the JSON string but got " + data['mobile_number']);
168
+ }
169
+ // ensure the json data is a string
170
+ if (data['user_id'] && !(typeof data['user_id'] === 'string' || data['user_id'] instanceof String)) {
171
+ throw new Error("Expected the field `user_id` to be a primitive type in the JSON string but got " + data['user_id']);
172
+ }
173
+ // validate the optional field `avatar`
174
+ if (data['avatar']) {
175
+ // data not null
176
+ _SignInWithEmail200ResponseProfileAvatar["default"].validateJSON(data['avatar']);
177
+ }
178
+ return true;
179
+ }
180
+ }]);
181
+ }();
182
+ SignInWithEmail200ResponseProfile.RequiredProperties = ["floor_id", "fid", "blocks", "user_id"];
183
+
184
+ /**
185
+ * Associated floor ID
186
+ * @member {String} floor_id
187
+ */
188
+ SignInWithEmail200ResponseProfile.prototype['floor_id'] = undefined;
189
+
190
+ /**
191
+ * Unique ID of floor
192
+ * @member {String} fid
193
+ */
194
+ SignInWithEmail200ResponseProfile.prototype['fid'] = undefined;
195
+
196
+ /**
197
+ * List of Blocks
198
+ * @member {Array.<module:model/BlockDetails>} blocks
199
+ */
200
+ SignInWithEmail200ResponseProfile.prototype['blocks'] = undefined;
201
+
202
+ /**
203
+ * User Name
204
+ * @member {String} name
205
+ */
206
+ SignInWithEmail200ResponseProfile.prototype['name'] = undefined;
207
+
208
+ /**
209
+ * Email ID
210
+ * @member {String} email
211
+ */
212
+ SignInWithEmail200ResponseProfile.prototype['email'] = undefined;
213
+
214
+ /**
215
+ * Mobile number
216
+ * @member {String} mobile_number
217
+ */
218
+ SignInWithEmail200ResponseProfile.prototype['mobile_number'] = undefined;
219
+
220
+ /**
221
+ * Unique User ID
222
+ * @member {String} user_id
223
+ */
224
+ SignInWithEmail200ResponseProfile.prototype['user_id'] = undefined;
225
+
226
+ /**
227
+ * @member {module:model/SignInWithEmail200ResponseProfileAvatar} avatar
228
+ */
229
+ SignInWithEmail200ResponseProfile.prototype['avatar'] = undefined;
230
+ var _default = exports["default"] = SignInWithEmail200ResponseProfile;
@@ -0,0 +1,129 @@
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 SignInWithEmail200ResponseProfileAvatar model module.
31
+ * @module model/SignInWithEmail200ResponseProfileAvatar
32
+ * @version 1.0.1
33
+ */
34
+ var SignInWithEmail200ResponseProfileAvatar = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>SignInWithEmail200ResponseProfileAvatar</code>.
37
+ * Profile Pick details
38
+ * @alias module:model/SignInWithEmail200ResponseProfileAvatar
39
+ * @param url {String} Image URL
40
+ * @param id {String} Image ID
41
+ */
42
+ function SignInWithEmail200ResponseProfileAvatar(url, id) {
43
+ _classCallCheck(this, SignInWithEmail200ResponseProfileAvatar);
44
+ SignInWithEmail200ResponseProfileAvatar.initialize(this, url, id);
45
+ }
46
+
47
+ /**
48
+ * Initializes the fields of this object.
49
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
50
+ * Only for internal use.
51
+ */
52
+ return _createClass(SignInWithEmail200ResponseProfileAvatar, null, [{
53
+ key: "initialize",
54
+ value: function initialize(obj, url, id) {
55
+ obj['url'] = url;
56
+ obj['id'] = id;
57
+ }
58
+
59
+ /**
60
+ * Constructs a <code>SignInWithEmail200ResponseProfileAvatar</code> from a plain JavaScript object, optionally creating a new instance.
61
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
62
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
63
+ * @param {module:model/SignInWithEmail200ResponseProfileAvatar} obj Optional instance to populate.
64
+ * @return {module:model/SignInWithEmail200ResponseProfileAvatar} The populated <code>SignInWithEmail200ResponseProfileAvatar</code> instance.
65
+ */
66
+ }, {
67
+ key: "constructFromObject",
68
+ value: function constructFromObject(data, obj) {
69
+ if (data) {
70
+ obj = obj || new SignInWithEmail200ResponseProfileAvatar();
71
+ if (data.hasOwnProperty('url')) {
72
+ obj['url'] = _ApiClient["default"].convertToType(data['url'], 'String');
73
+ }
74
+ if (data.hasOwnProperty('id')) {
75
+ obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String');
76
+ }
77
+ }
78
+ return obj;
79
+ }
80
+
81
+ /**
82
+ * Validates the JSON data with respect to <code>SignInWithEmail200ResponseProfileAvatar</code>.
83
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
84
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>SignInWithEmail200ResponseProfileAvatar</code>.
85
+ */
86
+ }, {
87
+ key: "validateJSON",
88
+ value: function validateJSON(data) {
89
+ // check to make sure all required properties are present in the JSON string
90
+ var _iterator = _createForOfIteratorHelper(SignInWithEmail200ResponseProfileAvatar.RequiredProperties),
91
+ _step;
92
+ try {
93
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
94
+ var property = _step.value;
95
+ if (!data.hasOwnProperty(property)) {
96
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
97
+ }
98
+ }
99
+ // ensure the json data is a string
100
+ } catch (err) {
101
+ _iterator.e(err);
102
+ } finally {
103
+ _iterator.f();
104
+ }
105
+ if (data['url'] && !(typeof data['url'] === 'string' || data['url'] instanceof String)) {
106
+ throw new Error("Expected the field `url` to be a primitive type in the JSON string but got " + data['url']);
107
+ }
108
+ // ensure the json data is a string
109
+ if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
110
+ throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
111
+ }
112
+ return true;
113
+ }
114
+ }]);
115
+ }();
116
+ SignInWithEmail200ResponseProfileAvatar.RequiredProperties = ["url", "id"];
117
+
118
+ /**
119
+ * Image URL
120
+ * @member {String} url
121
+ */
122
+ SignInWithEmail200ResponseProfileAvatar.prototype['url'] = undefined;
123
+
124
+ /**
125
+ * Image ID
126
+ * @member {String} id
127
+ */
128
+ SignInWithEmail200ResponseProfileAvatar.prototype['id'] = undefined;
129
+ var _default = exports["default"] = SignInWithEmail200ResponseProfileAvatar;