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