@xfloor/floor-memory-sdk-ts 1.0.0

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 (95) hide show
  1. package/LICENSE +1 -0
  2. package/README.md +176 -0
  3. package/dist/apis/DefaultApi.d.ts +209 -0
  4. package/dist/apis/DefaultApi.js +986 -0
  5. package/dist/apis/EditFloorApi.d.ts +36 -0
  6. package/dist/apis/EditFloorApi.js +173 -0
  7. package/dist/apis/EventApi.d.ts +32 -0
  8. package/dist/apis/EventApi.js +157 -0
  9. package/dist/apis/GetFloorInformationApi.d.ts +33 -0
  10. package/dist/apis/GetFloorInformationApi.js +144 -0
  11. package/dist/apis/GetRecentEventsApi.d.ts +33 -0
  12. package/dist/apis/GetRecentEventsApi.js +146 -0
  13. package/dist/apis/QueryApi.d.ts +31 -0
  14. package/dist/apis/QueryApi.js +139 -0
  15. package/dist/apis/index.d.ts +6 -0
  16. package/dist/apis/index.js +24 -0
  17. package/dist/index.d.ts +3 -0
  18. package/dist/index.js +21 -0
  19. package/dist/models/BlockDetails.d.ts +44 -0
  20. package/dist/models/BlockDetails.js +59 -0
  21. package/dist/models/ChangePassword200Response.d.ts +32 -0
  22. package/dist/models/ChangePassword200Response.js +51 -0
  23. package/dist/models/EditFloor400Response.d.ts +33 -0
  24. package/dist/models/EditFloor400Response.js +52 -0
  25. package/dist/models/EditFloor400ResponseError.d.ts +50 -0
  26. package/dist/models/EditFloor400ResponseError.js +63 -0
  27. package/dist/models/Event400Response.d.ts +33 -0
  28. package/dist/models/Event400Response.js +52 -0
  29. package/dist/models/Event400ResponseError.d.ts +50 -0
  30. package/dist/models/Event400ResponseError.js +63 -0
  31. package/dist/models/EventResponse.d.ts +32 -0
  32. package/dist/models/EventResponse.js +51 -0
  33. package/dist/models/FloorInfo.d.ts +64 -0
  34. package/dist/models/FloorInfo.js +67 -0
  35. package/dist/models/GetFloorInformation200Response.d.ts +64 -0
  36. package/dist/models/GetFloorInformation200Response.js +67 -0
  37. package/dist/models/GetRecentEvents200Response.d.ts +39 -0
  38. package/dist/models/GetRecentEvents200Response.js +56 -0
  39. package/dist/models/GetRecentEvents200ResponseItemsInner.d.ts +82 -0
  40. package/dist/models/GetRecentEvents200ResponseItemsInner.js +67 -0
  41. package/dist/models/GetRecentEvents200ResponseItemsInnerAuthor.d.ts +51 -0
  42. package/dist/models/GetRecentEvents200ResponseItemsInnerAuthor.js +56 -0
  43. package/dist/models/GetRecentEvents400Response.d.ts +33 -0
  44. package/dist/models/GetRecentEvents400Response.js +52 -0
  45. package/dist/models/GetRecentEvents400ResponseError.d.ts +50 -0
  46. package/dist/models/GetRecentEvents400ResponseError.js +63 -0
  47. package/dist/models/Media.d.ts +38 -0
  48. package/dist/models/Media.js +55 -0
  49. package/dist/models/Model400ErrorCode.d.ts +50 -0
  50. package/dist/models/Model400ErrorCode.js +63 -0
  51. package/dist/models/Query422Response.d.ts +33 -0
  52. package/dist/models/Query422Response.js +52 -0
  53. package/dist/models/Query422ResponseError.d.ts +32 -0
  54. package/dist/models/Query422ResponseError.js +51 -0
  55. package/dist/models/QueryRequest.d.ts +69 -0
  56. package/dist/models/QueryRequest.js +68 -0
  57. package/dist/models/QueryRequestFilters.d.ts +50 -0
  58. package/dist/models/QueryRequestFilters.js +63 -0
  59. package/dist/models/QueryResponse.d.ts +39 -0
  60. package/dist/models/QueryResponse.js +52 -0
  61. package/dist/models/QueryResponseItemsInner.d.ts +92 -0
  62. package/dist/models/QueryResponseItemsInner.js +69 -0
  63. package/dist/models/SendSignInValidationCode200Response.d.ts +44 -0
  64. package/dist/models/SendSignInValidationCode200Response.js +57 -0
  65. package/dist/models/SendSignInValidationCode400Response.d.ts +50 -0
  66. package/dist/models/SendSignInValidationCode400Response.js +63 -0
  67. package/dist/models/SendValidationCode200Response.d.ts +32 -0
  68. package/dist/models/SendValidationCode200Response.js +51 -0
  69. package/dist/models/SendValidationCodeRequest.d.ts +38 -0
  70. package/dist/models/SendValidationCodeRequest.js +55 -0
  71. package/dist/models/SignInWithEmail200Response.d.ts +46 -0
  72. package/dist/models/SignInWithEmail200Response.js +61 -0
  73. package/dist/models/SignInWithEmail200ResponseProfile.d.ts +76 -0
  74. package/dist/models/SignInWithEmail200ResponseProfile.js +73 -0
  75. package/dist/models/SignInWithEmail200ResponseProfileAvatar.d.ts +38 -0
  76. package/dist/models/SignInWithEmail200ResponseProfileAvatar.js +55 -0
  77. package/dist/models/SignUp200Response.d.ts +38 -0
  78. package/dist/models/SignUp200Response.js +55 -0
  79. package/dist/models/SignUpResponse.d.ts +38 -0
  80. package/dist/models/SignUpResponse.js +55 -0
  81. package/dist/models/UserDetails.d.ts +46 -0
  82. package/dist/models/UserDetails.js +61 -0
  83. package/dist/models/ValidateCode400Response.d.ts +33 -0
  84. package/dist/models/ValidateCode400Response.js +52 -0
  85. package/dist/models/ValidateCode400ResponseError.d.ts +50 -0
  86. package/dist/models/ValidateCode400ResponseError.js +63 -0
  87. package/dist/models/ValidateCode412Response.d.ts +32 -0
  88. package/dist/models/ValidateCode412Response.js +51 -0
  89. package/dist/models/ValidateCodeRequest.d.ts +50 -0
  90. package/dist/models/ValidateCodeRequest.js +63 -0
  91. package/dist/models/index.d.ts +36 -0
  92. package/dist/models/index.js +54 -0
  93. package/dist/runtime.d.ts +184 -0
  94. package/dist/runtime.js +564 -0
  95. package/package.json +36 -0
@@ -0,0 +1,986 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Floor Memory
6
+ * 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.
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ * Contact: contact@ipomo.in
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __extends = (this && this.__extends) || (function () {
16
+ var extendStatics = function (d, b) {
17
+ extendStatics = Object.setPrototypeOf ||
18
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
20
+ return extendStatics(d, b);
21
+ };
22
+ return function (d, b) {
23
+ if (typeof b !== "function" && b !== null)
24
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
25
+ extendStatics(d, b);
26
+ function __() { this.constructor = d; }
27
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28
+ };
29
+ })();
30
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
31
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
32
+ return new (P || (P = Promise))(function (resolve, reject) {
33
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
34
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
35
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
36
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
37
+ });
38
+ };
39
+ var __generator = (this && this.__generator) || function (thisArg, body) {
40
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
41
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
42
+ function verb(n) { return function (v) { return step([n, v]); }; }
43
+ function step(op) {
44
+ if (f) throw new TypeError("Generator is already executing.");
45
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
46
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
47
+ if (y = 0, t) op = [op[0] & 2, t.value];
48
+ switch (op[0]) {
49
+ case 0: case 1: t = op; break;
50
+ case 4: _.label++; return { value: op[1], done: false };
51
+ case 5: _.label++; y = op[1]; op = [0]; continue;
52
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
53
+ default:
54
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
55
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
56
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
57
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
58
+ if (t[2]) _.ops.pop();
59
+ _.trys.pop(); continue;
60
+ }
61
+ op = body.call(thisArg, _);
62
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
63
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
64
+ }
65
+ };
66
+ Object.defineProperty(exports, "__esModule", { value: true });
67
+ exports.DefaultApi = void 0;
68
+ var runtime = require("../runtime");
69
+ var index_1 = require("../models/index");
70
+ /**
71
+ *
72
+ */
73
+ var DefaultApi = /** @class */ (function (_super) {
74
+ __extends(DefaultApi, _super);
75
+ function DefaultApi() {
76
+ return _super !== null && _super.apply(this, arguments) || this;
77
+ }
78
+ /**
79
+ * Updates the email ID associated with an existing user account after validating a one-time activation code sent to the **new email address**. This operation can only be performed by a **logged-in user**. When a user initiates an email change, an activation code is sent to the newly provided email ID. The email update takes effect only after the activation code is successfully validated. If the activation code validation fails, the email ID remains unchanged. --- ### **Authentication** This endpoint requires **Bearer Token authentication**. ``` Authorization: Bearer <access_token> ``` --- ### **Request Body** ```json { \"user_id\": \"string\", \"new_email_id\": \"string\", \"activation_code\": \"string\", \"app_id\":\"string\" } ``` **Field Description** * `user_id` – Unique identifier of the logged-in user * `new_email_id` – New email address to be associated with the account * `activation_code` – One-time activation code sent to the new email ID for verification --- ### **Flow Summary** 1. User is authenticated and logged in 2. User requests to change email ID 3. System sends an activation code to the **new email address** 4. User submits the activation code via this API 5. On successful validation, the email ID is updated --- ### **Successful Response** On successful validation: * The activation code is verified * The user’s email ID is updated immediately * A `success` string is returned confirming the email change --- ### **Error Response** The API returns an error response if: * The activation code is invalid or expired * The activation code does not match the user or email * The new email ID is already in use * Authorization fails or the bearer token is missing or invalid In all error cases, the existing email ID remains unchanged. --- ### **Behavior Notes** * Requires a prior call to `/auth-service/send/validation/code` with the proper mode. --- ### **Security Notes (Recommended)** * Activation codes are single-use and time-bound * Email changes require prior authentication * Rate limiting may be applied to prevent abuse --- ### **One-Line Summary** > Changes a user’s email ID after validating an activation code sent to the new email address.
80
+ * Change email ID
81
+ */
82
+ DefaultApi.prototype.changeEmailRaw = function (requestParameters, initOverrides) {
83
+ return __awaiter(this, void 0, void 0, function () {
84
+ var queryParameters, headerParameters, token, tokenString, consumes, canConsumeForm, formParams, useForm, urlPath, response;
85
+ return __generator(this, function (_a) {
86
+ switch (_a.label) {
87
+ case 0:
88
+ if (requestParameters['newEmailId'] == null) {
89
+ throw new runtime.RequiredError('newEmailId', 'Required parameter "newEmailId" was null or undefined when calling changeEmail().');
90
+ }
91
+ if (requestParameters['activationCode'] == null) {
92
+ throw new runtime.RequiredError('activationCode', 'Required parameter "activationCode" was null or undefined when calling changeEmail().');
93
+ }
94
+ queryParameters = {};
95
+ headerParameters = {};
96
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
97
+ token = this.configuration.accessToken;
98
+ return [4 /*yield*/, token("bearer", [])];
99
+ case 1:
100
+ tokenString = _a.sent();
101
+ if (tokenString) {
102
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
103
+ }
104
+ _a.label = 2;
105
+ case 2:
106
+ consumes = [
107
+ { contentType: 'multipart/form-data' },
108
+ ];
109
+ canConsumeForm = runtime.canConsumeForm(consumes);
110
+ useForm = false;
111
+ if (useForm) {
112
+ formParams = new FormData();
113
+ }
114
+ else {
115
+ formParams = new URLSearchParams();
116
+ }
117
+ if (requestParameters['newEmailId'] != null) {
118
+ formParams.append('new_email_id', requestParameters['newEmailId']);
119
+ }
120
+ if (requestParameters['activationCode'] != null) {
121
+ formParams.append('activation_code', requestParameters['activationCode']);
122
+ }
123
+ urlPath = "/auth-service/change/email";
124
+ return [4 /*yield*/, this.request({
125
+ path: urlPath,
126
+ method: 'POST',
127
+ headers: headerParameters,
128
+ query: queryParameters,
129
+ body: formParams,
130
+ }, initOverrides)];
131
+ case 3:
132
+ response = _a.sent();
133
+ return [2 /*return*/, new runtime.JSONApiResponse(response)];
134
+ }
135
+ });
136
+ });
137
+ };
138
+ /**
139
+ * Updates the email ID associated with an existing user account after validating a one-time activation code sent to the **new email address**. This operation can only be performed by a **logged-in user**. When a user initiates an email change, an activation code is sent to the newly provided email ID. The email update takes effect only after the activation code is successfully validated. If the activation code validation fails, the email ID remains unchanged. --- ### **Authentication** This endpoint requires **Bearer Token authentication**. ``` Authorization: Bearer <access_token> ``` --- ### **Request Body** ```json { \"user_id\": \"string\", \"new_email_id\": \"string\", \"activation_code\": \"string\", \"app_id\":\"string\" } ``` **Field Description** * `user_id` – Unique identifier of the logged-in user * `new_email_id` – New email address to be associated with the account * `activation_code` – One-time activation code sent to the new email ID for verification --- ### **Flow Summary** 1. User is authenticated and logged in 2. User requests to change email ID 3. System sends an activation code to the **new email address** 4. User submits the activation code via this API 5. On successful validation, the email ID is updated --- ### **Successful Response** On successful validation: * The activation code is verified * The user’s email ID is updated immediately * A `success` string is returned confirming the email change --- ### **Error Response** The API returns an error response if: * The activation code is invalid or expired * The activation code does not match the user or email * The new email ID is already in use * Authorization fails or the bearer token is missing or invalid In all error cases, the existing email ID remains unchanged. --- ### **Behavior Notes** * Requires a prior call to `/auth-service/send/validation/code` with the proper mode. --- ### **Security Notes (Recommended)** * Activation codes are single-use and time-bound * Email changes require prior authentication * Rate limiting may be applied to prevent abuse --- ### **One-Line Summary** > Changes a user’s email ID after validating an activation code sent to the new email address.
140
+ * Change email ID
141
+ */
142
+ DefaultApi.prototype.changeEmail = function (requestParameters, initOverrides) {
143
+ return __awaiter(this, void 0, void 0, function () {
144
+ var response;
145
+ return __generator(this, function (_a) {
146
+ switch (_a.label) {
147
+ case 0: return [4 /*yield*/, this.changeEmailRaw(requestParameters, initOverrides)];
148
+ case 1:
149
+ response = _a.sent();
150
+ return [4 /*yield*/, response.value()];
151
+ case 2: return [2 /*return*/, _a.sent()];
152
+ }
153
+ });
154
+ });
155
+ };
156
+ /**
157
+ * Updates the mobile number associated with an existing user account after validating a one-time activation code sent to the **new mobile number**. This operation can only be performed by a **logged-in user**. When a user initiates a mobile number change, an activation code is sent to the newly provided mobile number. The mobile number update takes effect only after the activation code is successfully validated. If the activation code validation fails, the mobile number remains unchanged. --- ### **Authentication** This endpoint requires **Bearer Token authentication**. ``` Authorization: Bearer <access_token> ``` --- ### **Request Body** ```json { \"user_id\": \"string\", \"new_mobile_number\": \"string\", \"activation_code\": \"string\" } ``` **Field Description** * `user_id` – Unique identifier of the logged-in user * `new_mobile_number` – New mobile number to be associated with the account * `activation_code` – One-time activation code sent to the new mobile number for verification --- ### **Flow Summary** 1. User is authenticated and logged in 2. User requests to change mobile number 3. System sends an activation code to the **new mobile number** 4. User submits the activation code via this API 5. On successful validation, the mobile number is updated --- ### **Successful Response** On successful validation: * The activation code is verified * The user’s mobile number is updated immediately * A `success` string is returned confirming the mobile number change --- ### **Error Response** The API returns an error response if: * The activation code is invalid or expired * The activation code does not match the user or mobile number * The new mobile number is already in use * Authorization fails or the bearer token is missing or invalid In all error cases, the existing mobile number remains unchanged. --- ### **Behavior Notes** * Requires a prior call to `/auth-service/send/validation/code` with the proper mode. --- ### **Security Notes (Recommended)** * Activation codes are single-use and time-bound * Mobile number changes require prior authentication * Rate limiting may be applied to prevent abuse --- ### **One-Line Summary** > Changes a user’s mobile number after validating an activation code sent to the new mobile number.
158
+ * Change Mobile number
159
+ */
160
+ DefaultApi.prototype.changeMobileNumberRaw = function (requestParameters, initOverrides) {
161
+ return __awaiter(this, void 0, void 0, function () {
162
+ var queryParameters, headerParameters, token, tokenString, urlPath, response;
163
+ return __generator(this, function (_a) {
164
+ switch (_a.label) {
165
+ case 0:
166
+ if (requestParameters['body'] == null) {
167
+ throw new runtime.RequiredError('body', 'Required parameter "body" was null or undefined when calling changeMobileNumber().');
168
+ }
169
+ queryParameters = {};
170
+ headerParameters = {};
171
+ headerParameters['Content-Type'] = 'application/json';
172
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
173
+ token = this.configuration.accessToken;
174
+ return [4 /*yield*/, token("bearer", [])];
175
+ case 1:
176
+ tokenString = _a.sent();
177
+ if (tokenString) {
178
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
179
+ }
180
+ _a.label = 2;
181
+ case 2:
182
+ urlPath = "/auth-service/change/mobile";
183
+ return [4 /*yield*/, this.request({
184
+ path: urlPath,
185
+ method: 'POST',
186
+ headers: headerParameters,
187
+ query: queryParameters,
188
+ body: requestParameters['body'],
189
+ }, initOverrides)];
190
+ case 3:
191
+ response = _a.sent();
192
+ return [2 /*return*/, new runtime.JSONApiResponse(response)];
193
+ }
194
+ });
195
+ });
196
+ };
197
+ /**
198
+ * Updates the mobile number associated with an existing user account after validating a one-time activation code sent to the **new mobile number**. This operation can only be performed by a **logged-in user**. When a user initiates a mobile number change, an activation code is sent to the newly provided mobile number. The mobile number update takes effect only after the activation code is successfully validated. If the activation code validation fails, the mobile number remains unchanged. --- ### **Authentication** This endpoint requires **Bearer Token authentication**. ``` Authorization: Bearer <access_token> ``` --- ### **Request Body** ```json { \"user_id\": \"string\", \"new_mobile_number\": \"string\", \"activation_code\": \"string\" } ``` **Field Description** * `user_id` – Unique identifier of the logged-in user * `new_mobile_number` – New mobile number to be associated with the account * `activation_code` – One-time activation code sent to the new mobile number for verification --- ### **Flow Summary** 1. User is authenticated and logged in 2. User requests to change mobile number 3. System sends an activation code to the **new mobile number** 4. User submits the activation code via this API 5. On successful validation, the mobile number is updated --- ### **Successful Response** On successful validation: * The activation code is verified * The user’s mobile number is updated immediately * A `success` string is returned confirming the mobile number change --- ### **Error Response** The API returns an error response if: * The activation code is invalid or expired * The activation code does not match the user or mobile number * The new mobile number is already in use * Authorization fails or the bearer token is missing or invalid In all error cases, the existing mobile number remains unchanged. --- ### **Behavior Notes** * Requires a prior call to `/auth-service/send/validation/code` with the proper mode. --- ### **Security Notes (Recommended)** * Activation codes are single-use and time-bound * Mobile number changes require prior authentication * Rate limiting may be applied to prevent abuse --- ### **One-Line Summary** > Changes a user’s mobile number after validating an activation code sent to the new mobile number.
199
+ * Change Mobile number
200
+ */
201
+ DefaultApi.prototype.changeMobileNumber = function (requestParameters, initOverrides) {
202
+ return __awaiter(this, void 0, void 0, function () {
203
+ var response;
204
+ return __generator(this, function (_a) {
205
+ switch (_a.label) {
206
+ case 0: return [4 /*yield*/, this.changeMobileNumberRaw(requestParameters, initOverrides)];
207
+ case 1:
208
+ response = _a.sent();
209
+ return [4 /*yield*/, response.value()];
210
+ case 2: return [2 /*return*/, _a.sent()];
211
+ }
212
+ });
213
+ });
214
+ };
215
+ /**
216
+ * Changes the password of an existing user after validating a one-time password change activation code. This API validates the provided `activation_code` for the given `user_id`. If the activation code is valid and not expired, the user’s password is updated to the supplied `new_password` and takes effect immediately. If the activation code validation fails, the password remains unchanged and an error response is returned. --- ### **Authentication** This endpoint requires **Bearer Token authentication**. ``` Authorization: Bearer <access_token> ``` --- ### **Request Body (Form Data)** | Field | Type | Required | Description | | ------------ | ------------- | -------- | ----------------------------------------------------------------- | | `user_id` | string | Yes | User ID | | `new_password` | string | Yes | New Password | | `activation_code` | string | Yes | Activation code | **Field Description** * `user_id` – Unique identifier of the user requesting the password change * `new_password` – New password to be set for the user * `activation_code` – One-time activation code generated for password change verification --- ### **Successful Response** On successful validation: * The activation code is verified * The user password is updated immediately * The API returns a `success` string indicating that the password change was completed --- ### **Error Response** The API returns an error response if: * The activation code is invalid or expired * The activation code does not match the specified user * The password does not meet security or policy requirements * Authorization fails or the bearer token is missing or invalid In all error cases, the existing password remains unchanged. --- ### **Behavior Notes** * Requires a prior call to `/auth-service/send/validation/code` with the proper mode. --- ### **Security Notes** * Activation codes are single-use and time-bound * Passwords are never returned in API responses * Rate limiting may be applied to prevent brute-force attempts --- ### **One-Line Summary** > Updates a user’s password after validating a one-time activation code.
217
+ * Change Password
218
+ */
219
+ DefaultApi.prototype.changePasswordRaw = function (requestParameters, initOverrides) {
220
+ return __awaiter(this, void 0, void 0, function () {
221
+ var queryParameters, headerParameters, token, tokenString, consumes, canConsumeForm, formParams, useForm, urlPath, response;
222
+ return __generator(this, function (_a) {
223
+ switch (_a.label) {
224
+ case 0:
225
+ queryParameters = {};
226
+ headerParameters = {};
227
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
228
+ token = this.configuration.accessToken;
229
+ return [4 /*yield*/, token("bearer", [])];
230
+ case 1:
231
+ tokenString = _a.sent();
232
+ if (tokenString) {
233
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
234
+ }
235
+ _a.label = 2;
236
+ case 2:
237
+ consumes = [
238
+ { contentType: 'multipart/form-data' },
239
+ ];
240
+ canConsumeForm = runtime.canConsumeForm(consumes);
241
+ useForm = false;
242
+ if (useForm) {
243
+ formParams = new FormData();
244
+ }
245
+ else {
246
+ formParams = new URLSearchParams();
247
+ }
248
+ if (requestParameters['userId'] != null) {
249
+ formParams.append('user_id', requestParameters['userId']);
250
+ }
251
+ if (requestParameters['newPassword'] != null) {
252
+ formParams.append('new_password', requestParameters['newPassword']);
253
+ }
254
+ if (requestParameters['acticationCode'] != null) {
255
+ formParams.append('actication_code', requestParameters['acticationCode']);
256
+ }
257
+ urlPath = "/auth-service/change/password";
258
+ return [4 /*yield*/, this.request({
259
+ path: urlPath,
260
+ method: 'POST',
261
+ headers: headerParameters,
262
+ query: queryParameters,
263
+ body: formParams,
264
+ }, initOverrides)];
265
+ case 3:
266
+ response = _a.sent();
267
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ChangePassword200ResponseFromJSON)(jsonValue); })];
268
+ }
269
+ });
270
+ });
271
+ };
272
+ /**
273
+ * Changes the password of an existing user after validating a one-time password change activation code. This API validates the provided `activation_code` for the given `user_id`. If the activation code is valid and not expired, the user’s password is updated to the supplied `new_password` and takes effect immediately. If the activation code validation fails, the password remains unchanged and an error response is returned. --- ### **Authentication** This endpoint requires **Bearer Token authentication**. ``` Authorization: Bearer <access_token> ``` --- ### **Request Body (Form Data)** | Field | Type | Required | Description | | ------------ | ------------- | -------- | ----------------------------------------------------------------- | | `user_id` | string | Yes | User ID | | `new_password` | string | Yes | New Password | | `activation_code` | string | Yes | Activation code | **Field Description** * `user_id` – Unique identifier of the user requesting the password change * `new_password` – New password to be set for the user * `activation_code` – One-time activation code generated for password change verification --- ### **Successful Response** On successful validation: * The activation code is verified * The user password is updated immediately * The API returns a `success` string indicating that the password change was completed --- ### **Error Response** The API returns an error response if: * The activation code is invalid or expired * The activation code does not match the specified user * The password does not meet security or policy requirements * Authorization fails or the bearer token is missing or invalid In all error cases, the existing password remains unchanged. --- ### **Behavior Notes** * Requires a prior call to `/auth-service/send/validation/code` with the proper mode. --- ### **Security Notes** * Activation codes are single-use and time-bound * Passwords are never returned in API responses * Rate limiting may be applied to prevent brute-force attempts --- ### **One-Line Summary** > Updates a user’s password after validating a one-time activation code.
274
+ * Change Password
275
+ */
276
+ DefaultApi.prototype.changePassword = function () {
277
+ return __awaiter(this, arguments, void 0, function (requestParameters, initOverrides) {
278
+ var response;
279
+ if (requestParameters === void 0) { requestParameters = {}; }
280
+ return __generator(this, function (_a) {
281
+ switch (_a.label) {
282
+ case 0: return [4 /*yield*/, this.changePasswordRaw(requestParameters, initOverrides)];
283
+ case 1:
284
+ response = _a.sent();
285
+ return [4 /*yield*/, response.value()];
286
+ case 2: return [2 /*return*/, _a.sent()];
287
+ }
288
+ });
289
+ });
290
+ };
291
+ /**
292
+ * This API changes a floor’s visibility to **PRIVATE**. It is used when a floor owner wants to **restrict access** to a floor that is currently public. After the update, the floor becomes private and is no longer accessible to non-authorized users (based on your platform’s access rules). This endpoint is **state-changing**: * If the floor is **PUBLIC**, it will be converted to **PRIVATE** * If the floor is already **PRIVATE**, the API returns success (idempotent) or an “already private” response depending on implementation This API is commonly used in: * Floor settings → “Privacy” toggle * Developer-managed pod workflows (app_id context) * Admin tools (if applicable) --- ## Request Method `POST` --- ## Content-Type `application/x-www-form-urlencoded` (or `multipart/form-data` if your system uses form-data) *(Document whichever you actually accept; below assumes standard form fields.)* --- ## Request Parameters (Form Fields) | Field | Type | Required | Description | | ---------- | ------ | -------- | -------------------------------------------------------------------- | | `user_id` | String | **Yes** | User requesting the change. Must be the **owner** of the floor. | | `floor_id` | String | **Yes** | Public identifier of the floor to update. | | `app_id` | String | No | Calling application identifier (used for developer/pod integration). | --- ## Authorization Rules (Critical) * The caller must be authenticated as `user_id` * **Only the floor owner** can change floor visibility * If the user is not the owner, the request must be rejected --- ## Behavior Rules * Converts visibility from **PUBLIC → PRIVATE** * Does not modify floor content or blocks * Access enforcement for private floors is applied immediately after the change **Idempotency** * Calling this API multiple times should not cause repeated changes * If already private, the API should either: * return success with a message like `\"already private\"`, or * return a specific error/status indicating no-op --- ## Response Format `application/json` --- ## Sample Success Response *(Example — adjust to match your actual response format)* ```json { \"status\": \"SUCCESS\", \"floor_id\": \"my_floor\", \"visibility\": \"PRIVATE\", \"message\": \"Floor is now private\" } ``` --- ## Sample No-Op Response (Already Private) ```json { \"status\": \"SUCCESS\", \"floor_id\": \"my_floor\", \"visibility\": \"PRIVATE\", \"message\": \"Floor is already private\" } ``` --- ## Error Responses (Examples) ### Not Authorized (Not Owner) ```json { \"status\": \"ERROR\", \"message\": \"Only the floor owner can change floor visibility\" } ``` ### Floor Not Found ```json { \"status\": \"ERROR\", \"message\": \"Floor not found\" } ``` ### Invalid Request ```json { \"status\": \"ERROR\", \"message\": \"user_id and floor_id are required\" } ``` --- ## Notes * This API is intended to control floor visibility only; membership/invite rules (for private floors) are handled elsewhere. * `app_id` is provided for developer/pod applications and is optional unless enforced by your app model. * If you support floor types like `POD`, document whether pods are allowed to be private or not (some platforms restrict this).
293
+ * Make floor Private
294
+ */
295
+ DefaultApi.prototype.makeFloorPrivateRaw = function (requestParameters, initOverrides) {
296
+ return __awaiter(this, void 0, void 0, function () {
297
+ var queryParameters, headerParameters, token, tokenString, urlPath, response;
298
+ return __generator(this, function (_a) {
299
+ switch (_a.label) {
300
+ case 0:
301
+ queryParameters = {};
302
+ if (requestParameters['floorId'] != null) {
303
+ queryParameters['floor_id'] = requestParameters['floorId'];
304
+ }
305
+ if (requestParameters['userId'] != null) {
306
+ queryParameters['user_id'] = requestParameters['userId'];
307
+ }
308
+ if (requestParameters['appId'] != null) {
309
+ queryParameters['app_id'] = requestParameters['appId'];
310
+ }
311
+ headerParameters = {};
312
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
313
+ token = this.configuration.accessToken;
314
+ return [4 /*yield*/, token("bearer", [])];
315
+ case 1:
316
+ tokenString = _a.sent();
317
+ if (tokenString) {
318
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
319
+ }
320
+ _a.label = 2;
321
+ case 2:
322
+ urlPath = "/api/memory/make/floor/private";
323
+ return [4 /*yield*/, this.request({
324
+ path: urlPath,
325
+ method: 'POST',
326
+ headers: headerParameters,
327
+ query: queryParameters,
328
+ }, initOverrides)];
329
+ case 3:
330
+ response = _a.sent();
331
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GetFloorInformation200ResponseFromJSON)(jsonValue); })];
332
+ }
333
+ });
334
+ });
335
+ };
336
+ /**
337
+ * This API changes a floor’s visibility to **PRIVATE**. It is used when a floor owner wants to **restrict access** to a floor that is currently public. After the update, the floor becomes private and is no longer accessible to non-authorized users (based on your platform’s access rules). This endpoint is **state-changing**: * If the floor is **PUBLIC**, it will be converted to **PRIVATE** * If the floor is already **PRIVATE**, the API returns success (idempotent) or an “already private” response depending on implementation This API is commonly used in: * Floor settings → “Privacy” toggle * Developer-managed pod workflows (app_id context) * Admin tools (if applicable) --- ## Request Method `POST` --- ## Content-Type `application/x-www-form-urlencoded` (or `multipart/form-data` if your system uses form-data) *(Document whichever you actually accept; below assumes standard form fields.)* --- ## Request Parameters (Form Fields) | Field | Type | Required | Description | | ---------- | ------ | -------- | -------------------------------------------------------------------- | | `user_id` | String | **Yes** | User requesting the change. Must be the **owner** of the floor. | | `floor_id` | String | **Yes** | Public identifier of the floor to update. | | `app_id` | String | No | Calling application identifier (used for developer/pod integration). | --- ## Authorization Rules (Critical) * The caller must be authenticated as `user_id` * **Only the floor owner** can change floor visibility * If the user is not the owner, the request must be rejected --- ## Behavior Rules * Converts visibility from **PUBLIC → PRIVATE** * Does not modify floor content or blocks * Access enforcement for private floors is applied immediately after the change **Idempotency** * Calling this API multiple times should not cause repeated changes * If already private, the API should either: * return success with a message like `\"already private\"`, or * return a specific error/status indicating no-op --- ## Response Format `application/json` --- ## Sample Success Response *(Example — adjust to match your actual response format)* ```json { \"status\": \"SUCCESS\", \"floor_id\": \"my_floor\", \"visibility\": \"PRIVATE\", \"message\": \"Floor is now private\" } ``` --- ## Sample No-Op Response (Already Private) ```json { \"status\": \"SUCCESS\", \"floor_id\": \"my_floor\", \"visibility\": \"PRIVATE\", \"message\": \"Floor is already private\" } ``` --- ## Error Responses (Examples) ### Not Authorized (Not Owner) ```json { \"status\": \"ERROR\", \"message\": \"Only the floor owner can change floor visibility\" } ``` ### Floor Not Found ```json { \"status\": \"ERROR\", \"message\": \"Floor not found\" } ``` ### Invalid Request ```json { \"status\": \"ERROR\", \"message\": \"user_id and floor_id are required\" } ``` --- ## Notes * This API is intended to control floor visibility only; membership/invite rules (for private floors) are handled elsewhere. * `app_id` is provided for developer/pod applications and is optional unless enforced by your app model. * If you support floor types like `POD`, document whether pods are allowed to be private or not (some platforms restrict this).
338
+ * Make floor Private
339
+ */
340
+ DefaultApi.prototype.makeFloorPrivate = function () {
341
+ return __awaiter(this, arguments, void 0, function (requestParameters, initOverrides) {
342
+ var response;
343
+ if (requestParameters === void 0) { requestParameters = {}; }
344
+ return __generator(this, function (_a) {
345
+ switch (_a.label) {
346
+ case 0: return [4 /*yield*/, this.makeFloorPrivateRaw(requestParameters, initOverrides)];
347
+ case 1:
348
+ response = _a.sent();
349
+ return [4 /*yield*/, response.value()];
350
+ case 2: return [2 /*return*/, _a.sent()];
351
+ }
352
+ });
353
+ });
354
+ };
355
+ /**
356
+ * This API changes a floor’s visibility to **PUBLIC**. It is used when a floor owner wants to **make a private floor accessible to everyone**. After the update, the floor becomes public and can be viewed and discovered by any user, subject to platform rules (search, feeds, pods, etc.). This endpoint performs a **visibility state transition**: * **PRIVATE → PUBLIC** * If the floor is already public, the operation is treated as **idempotent** (no state change). This API is typically used from: * Floor settings → Privacy / Visibility controls * Owner or admin tools * Developer or pod-based applications using `app_id` --- ## Request Method `POST` --- ## Content-Type `application/x-www-form-urlencoded` (or `multipart/form-data`, depending on your implementation) --- ## Request Parameters (Form Fields) | Field | Type | Required | Description | | ---------- | ------ | -------- | ------------------------------------------------------------------------------- | | `user_id` | String | **Yes** | User requesting the change. Must be the **owner** of the floor. | | `floor_id` | String | **Yes** | Public identifier of the floor whose visibility is to be changed. | | `app_id` | String | No | Identifier of the calling application (used mainly for pod/developer contexts). | --- ## Authorization Rules (Critical) * The caller must be authenticated as `user_id` * **Only the floor owner** is allowed to change the floor’s visibility * Requests from non-owners must be rejected --- ## Behavior Rules * Converts floor visibility from **PRIVATE → PUBLIC** * Does not modify floor content, blocks, or ownership * Visibility change takes effect immediately ### Idempotency * If the floor is already public, the API should: * Return success with a message indicating no change, or * Return a specific “already public” status (implementation-dependent) --- ## Response Format `application/json` --- ## Sample Success Response ```json { \"status\": \"SUCCESS\", \"floor_id\": \"my_floor\", \"visibility\": \"PUBLIC\", \"message\": \"Floor is now public\" } ``` --- ## Sample No-Op Response (Already Public) ```json { \"status\": \"SUCCESS\", \"floor_id\": \"my_floor\", \"visibility\": \"PUBLIC\", \"message\": \"Floor is already public\" } ``` --- ## Error Responses (Examples) ### Not Authorized (Not Owner) ```json { \"status\": \"ERROR\", \"message\": \"Only the floor owner can change floor visibility\" } ``` --- ### Floor Not Found ```json { \"status\": \"ERROR\", \"message\": \"Floor not found\" } ``` --- ### Invalid Request ```json { \"status\": \"ERROR\", \"message\": \"user_id and floor_id are required\" } ``` --- ## Notes for Developers * This API controls **visibility only**. Membership, invitations, and moderation rules are handled by separate APIs. * `app_id` is optional and primarily used for developer-managed or pod floors. * Clients should refresh floor metadata (e.g., via `/api/floor/info`) after a successful visibility change. --- ### Mental Model (One Line) > **This API answers: “Make this floor visible to everyone.”**
357
+ * Make floor public
358
+ */
359
+ DefaultApi.prototype.makeFloorPublicRaw = function (requestParameters, initOverrides) {
360
+ return __awaiter(this, void 0, void 0, function () {
361
+ var queryParameters, headerParameters, token, tokenString, urlPath, response;
362
+ return __generator(this, function (_a) {
363
+ switch (_a.label) {
364
+ case 0:
365
+ queryParameters = {};
366
+ if (requestParameters['floorId'] != null) {
367
+ queryParameters['floor_id'] = requestParameters['floorId'];
368
+ }
369
+ if (requestParameters['userId'] != null) {
370
+ queryParameters['user_id'] = requestParameters['userId'];
371
+ }
372
+ if (requestParameters['appId'] != null) {
373
+ queryParameters['app_id'] = requestParameters['appId'];
374
+ }
375
+ headerParameters = {};
376
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
377
+ token = this.configuration.accessToken;
378
+ return [4 /*yield*/, token("bearer", [])];
379
+ case 1:
380
+ tokenString = _a.sent();
381
+ if (tokenString) {
382
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
383
+ }
384
+ _a.label = 2;
385
+ case 2:
386
+ urlPath = "/api/memory/make/floor/public";
387
+ return [4 /*yield*/, this.request({
388
+ path: urlPath,
389
+ method: 'POST',
390
+ headers: headerParameters,
391
+ query: queryParameters,
392
+ }, initOverrides)];
393
+ case 3:
394
+ response = _a.sent();
395
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GetFloorInformation200ResponseFromJSON)(jsonValue); })];
396
+ }
397
+ });
398
+ });
399
+ };
400
+ /**
401
+ * This API changes a floor’s visibility to **PUBLIC**. It is used when a floor owner wants to **make a private floor accessible to everyone**. After the update, the floor becomes public and can be viewed and discovered by any user, subject to platform rules (search, feeds, pods, etc.). This endpoint performs a **visibility state transition**: * **PRIVATE → PUBLIC** * If the floor is already public, the operation is treated as **idempotent** (no state change). This API is typically used from: * Floor settings → Privacy / Visibility controls * Owner or admin tools * Developer or pod-based applications using `app_id` --- ## Request Method `POST` --- ## Content-Type `application/x-www-form-urlencoded` (or `multipart/form-data`, depending on your implementation) --- ## Request Parameters (Form Fields) | Field | Type | Required | Description | | ---------- | ------ | -------- | ------------------------------------------------------------------------------- | | `user_id` | String | **Yes** | User requesting the change. Must be the **owner** of the floor. | | `floor_id` | String | **Yes** | Public identifier of the floor whose visibility is to be changed. | | `app_id` | String | No | Identifier of the calling application (used mainly for pod/developer contexts). | --- ## Authorization Rules (Critical) * The caller must be authenticated as `user_id` * **Only the floor owner** is allowed to change the floor’s visibility * Requests from non-owners must be rejected --- ## Behavior Rules * Converts floor visibility from **PRIVATE → PUBLIC** * Does not modify floor content, blocks, or ownership * Visibility change takes effect immediately ### Idempotency * If the floor is already public, the API should: * Return success with a message indicating no change, or * Return a specific “already public” status (implementation-dependent) --- ## Response Format `application/json` --- ## Sample Success Response ```json { \"status\": \"SUCCESS\", \"floor_id\": \"my_floor\", \"visibility\": \"PUBLIC\", \"message\": \"Floor is now public\" } ``` --- ## Sample No-Op Response (Already Public) ```json { \"status\": \"SUCCESS\", \"floor_id\": \"my_floor\", \"visibility\": \"PUBLIC\", \"message\": \"Floor is already public\" } ``` --- ## Error Responses (Examples) ### Not Authorized (Not Owner) ```json { \"status\": \"ERROR\", \"message\": \"Only the floor owner can change floor visibility\" } ``` --- ### Floor Not Found ```json { \"status\": \"ERROR\", \"message\": \"Floor not found\" } ``` --- ### Invalid Request ```json { \"status\": \"ERROR\", \"message\": \"user_id and floor_id are required\" } ``` --- ## Notes for Developers * This API controls **visibility only**. Membership, invitations, and moderation rules are handled by separate APIs. * `app_id` is optional and primarily used for developer-managed or pod floors. * Clients should refresh floor metadata (e.g., via `/api/floor/info`) after a successful visibility change. --- ### Mental Model (One Line) > **This API answers: “Make this floor visible to everyone.”**
402
+ * Make floor public
403
+ */
404
+ DefaultApi.prototype.makeFloorPublic = function () {
405
+ return __awaiter(this, arguments, void 0, function (requestParameters, initOverrides) {
406
+ var response;
407
+ if (requestParameters === void 0) { requestParameters = {}; }
408
+ return __generator(this, function (_a) {
409
+ switch (_a.label) {
410
+ case 0: return [4 /*yield*/, this.makeFloorPublicRaw(requestParameters, initOverrides)];
411
+ case 1:
412
+ response = _a.sent();
413
+ return [4 /*yield*/, response.value()];
414
+ case 2: return [2 /*return*/, _a.sent()];
415
+ }
416
+ });
417
+ });
418
+ };
419
+ /**
420
+ * This API allows a calling application to **pass externally authenticated user identity information to xfloor** after completing authentication within its own system. xfloor **does not perform authentication, credential verification, or session management** as part of this API. The calling application is fully responsible for validating the user and ensuring the correctness of the identity data provided. Upon invocation, xfloor will: * **Create a new user profile** if no matching user exists, or * **Update the existing user profile** if the user is already present. xfloor returns a unique `xfloor_user_id`, which serves as the **canonical user identifier** and must be used in all subsequent xfloor APIs, including floors, blocks, conversations, memory interactions, and analytics.
421
+ * External User Registration
422
+ */
423
+ DefaultApi.prototype.registerExternalUserIdentityRaw = function (requestParameters, initOverrides) {
424
+ return __awaiter(this, void 0, void 0, function () {
425
+ var queryParameters, headerParameters, token, tokenString, consumes, canConsumeForm, formParams, useForm, urlPath, response;
426
+ return __generator(this, function (_a) {
427
+ switch (_a.label) {
428
+ case 0:
429
+ queryParameters = {};
430
+ headerParameters = {};
431
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
432
+ token = this.configuration.accessToken;
433
+ return [4 /*yield*/, token("bearer", [])];
434
+ case 1:
435
+ tokenString = _a.sent();
436
+ if (tokenString) {
437
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
438
+ }
439
+ _a.label = 2;
440
+ case 2:
441
+ consumes = [
442
+ { contentType: 'multipart/form-data' },
443
+ ];
444
+ canConsumeForm = runtime.canConsumeForm(consumes);
445
+ useForm = false;
446
+ if (useForm) {
447
+ formParams = new FormData();
448
+ }
449
+ else {
450
+ formParams = new URLSearchParams();
451
+ }
452
+ if (requestParameters['mobileNumber'] != null) {
453
+ formParams.append('mobile_number', requestParameters['mobileNumber']);
454
+ }
455
+ if (requestParameters['emailId'] != null) {
456
+ formParams.append('email_id', requestParameters['emailId']);
457
+ }
458
+ if (requestParameters['name'] != null) {
459
+ formParams.append('name', requestParameters['name']);
460
+ }
461
+ if (requestParameters['appId'] != null) {
462
+ formParams.append('app_id', requestParameters['appId']);
463
+ }
464
+ urlPath = "/memory/identity/external-user";
465
+ return [4 /*yield*/, this.request({
466
+ path: urlPath,
467
+ method: 'POST',
468
+ headers: headerParameters,
469
+ query: queryParameters,
470
+ body: formParams,
471
+ }, initOverrides)];
472
+ case 3:
473
+ response = _a.sent();
474
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.SignInWithEmail200ResponseFromJSON)(jsonValue); })];
475
+ }
476
+ });
477
+ });
478
+ };
479
+ /**
480
+ * This API allows a calling application to **pass externally authenticated user identity information to xfloor** after completing authentication within its own system. xfloor **does not perform authentication, credential verification, or session management** as part of this API. The calling application is fully responsible for validating the user and ensuring the correctness of the identity data provided. Upon invocation, xfloor will: * **Create a new user profile** if no matching user exists, or * **Update the existing user profile** if the user is already present. xfloor returns a unique `xfloor_user_id`, which serves as the **canonical user identifier** and must be used in all subsequent xfloor APIs, including floors, blocks, conversations, memory interactions, and analytics.
481
+ * External User Registration
482
+ */
483
+ DefaultApi.prototype.registerExternalUserIdentity = function () {
484
+ return __awaiter(this, arguments, void 0, function (requestParameters, initOverrides) {
485
+ var response;
486
+ if (requestParameters === void 0) { requestParameters = {}; }
487
+ return __generator(this, function (_a) {
488
+ switch (_a.label) {
489
+ case 0: return [4 /*yield*/, this.registerExternalUserIdentityRaw(requestParameters, initOverrides)];
490
+ case 1:
491
+ response = _a.sent();
492
+ return [4 /*yield*/, response.value()];
493
+ case 2: return [2 /*return*/, _a.sent()];
494
+ }
495
+ });
496
+ });
497
+ };
498
+ /**
499
+ * This API renames a floor by changing knowing the **floor identifier (floor_id)**. It allows the **floor owner** to update the public-facing floor ID (slug/handle) from an old value to a new value. This is typically used when the owner wants to rebrand, reorganize, or correct the floor’s identifier. ⚠️ **This operation affects how the floor is accessed and referenced externally**, so it must be performed carefully. --- ## Ownership & Authorization (Critical) * The caller **must be authenticated** * **Only the floor owner** is allowed to rename a floor * Members, followers, or non-owners **cannot** perform this operation * Ownership is validated internally using `user_id` > If the user is not the owner, the request must be rejected. --- ## Request Method `POST` --- ## Content-Type `application/x-www-form-urlencoded` (or equivalent form-data encoding) --- ## Request Parameters (Form Fields) | Parameter | Type | Required | Description | | --------- | ------ | -------- | ------------------------------------------------------------------------------- | | `user_id` | String | **Yes** | User requesting the rename. Must be the **owner** of the floor. | | `from` | String | **Yes** | Existing floor ID (current identifier to be renamed). | | `to` | String | **Yes** | New floor ID to assign to the floor. | | `app_id` | String | No | Identifier of the calling application (used mainly for pod/developer contexts). | --- ## Rename Rules & Constraints * The `from` floor ID **must exist** * The `to` floor ID **must be unique** and not already in use * The rename operation updates **only the floor ID** * Floor ownership, blocks, posts, and internal `fid` remain unchanged * Any links or references using the old floor ID may no longer be valid after rename --- ## Behavior Summary | Scenario | Result | | ---------------------------- | ------------------------------------------------- | | Valid owner + unique new ID | Floor ID renamed successfully | | Non-owner user | Request rejected | | `from` floor ID not found | Error | | `to` floor ID already exists | Error | | `from` == `to` | No-op or validation error (implementation choice) | --- ## Response Format `application/json` --- ## Sample Success Response ```json { \"status\": \"SUCCESS\", \"old_floor_id\": \"oldfloorid\", \"new_floor_id\": \"newfloorid\", \"message\": \"Floor ID renamed successfully\" } ``` --- ## Sample Error Responses ### Not Floor Owner ```json { \"status\": \"ERROR\", \"message\": \"Only the floor owner can rename the floor\" } ``` --- ### Floor Not Found ```json { \"status\": \"ERROR\", \"message\": \"Source floor ID does not exist\" } ``` --- ### Floor ID Already Exists ```json { \"status\": \"ERROR\", \"message\": \"Target floor ID is already in use\" } ``` --- ### Invalid Request ```json { \"status\": \"ERROR\", \"message\": \"user_id, from, and to are required\" } ``` --- ## Notes for Developers * This API **renames the public identifier only**; the internal immutable floor ID (`fid`) is not affected. * Clients should refresh cached floor metadata after a successful rename. * If your platform supports deep links or bookmarks, consider redirect or alias handling for old floor IDs (if supported). --- ### One-Line Mental Model > **This API answers: “Change the public identity (ID) of a floor, owner-only.”**
500
+ * Rename floor
501
+ */
502
+ DefaultApi.prototype.renameFloorRaw = function (requestParameters, initOverrides) {
503
+ return __awaiter(this, void 0, void 0, function () {
504
+ var queryParameters, headerParameters, urlPath, response;
505
+ return __generator(this, function (_a) {
506
+ switch (_a.label) {
507
+ case 0:
508
+ queryParameters = {};
509
+ if (requestParameters['userId'] != null) {
510
+ queryParameters['user_id'] = requestParameters['userId'];
511
+ }
512
+ if (requestParameters['appId'] != null) {
513
+ queryParameters['app_id'] = requestParameters['appId'];
514
+ }
515
+ if (requestParameters['from'] != null) {
516
+ queryParameters['from'] = requestParameters['from'];
517
+ }
518
+ if (requestParameters['to'] != null) {
519
+ queryParameters['to'] = requestParameters['to'];
520
+ }
521
+ headerParameters = {};
522
+ urlPath = "/api/memory/change/floor/id";
523
+ return [4 /*yield*/, this.request({
524
+ path: urlPath,
525
+ method: 'POST',
526
+ headers: headerParameters,
527
+ query: queryParameters,
528
+ }, initOverrides)];
529
+ case 1:
530
+ response = _a.sent();
531
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GetFloorInformation200ResponseFromJSON)(jsonValue); })];
532
+ }
533
+ });
534
+ });
535
+ };
536
+ /**
537
+ * This API renames a floor by changing knowing the **floor identifier (floor_id)**. It allows the **floor owner** to update the public-facing floor ID (slug/handle) from an old value to a new value. This is typically used when the owner wants to rebrand, reorganize, or correct the floor’s identifier. ⚠️ **This operation affects how the floor is accessed and referenced externally**, so it must be performed carefully. --- ## Ownership & Authorization (Critical) * The caller **must be authenticated** * **Only the floor owner** is allowed to rename a floor * Members, followers, or non-owners **cannot** perform this operation * Ownership is validated internally using `user_id` > If the user is not the owner, the request must be rejected. --- ## Request Method `POST` --- ## Content-Type `application/x-www-form-urlencoded` (or equivalent form-data encoding) --- ## Request Parameters (Form Fields) | Parameter | Type | Required | Description | | --------- | ------ | -------- | ------------------------------------------------------------------------------- | | `user_id` | String | **Yes** | User requesting the rename. Must be the **owner** of the floor. | | `from` | String | **Yes** | Existing floor ID (current identifier to be renamed). | | `to` | String | **Yes** | New floor ID to assign to the floor. | | `app_id` | String | No | Identifier of the calling application (used mainly for pod/developer contexts). | --- ## Rename Rules & Constraints * The `from` floor ID **must exist** * The `to` floor ID **must be unique** and not already in use * The rename operation updates **only the floor ID** * Floor ownership, blocks, posts, and internal `fid` remain unchanged * Any links or references using the old floor ID may no longer be valid after rename --- ## Behavior Summary | Scenario | Result | | ---------------------------- | ------------------------------------------------- | | Valid owner + unique new ID | Floor ID renamed successfully | | Non-owner user | Request rejected | | `from` floor ID not found | Error | | `to` floor ID already exists | Error | | `from` == `to` | No-op or validation error (implementation choice) | --- ## Response Format `application/json` --- ## Sample Success Response ```json { \"status\": \"SUCCESS\", \"old_floor_id\": \"oldfloorid\", \"new_floor_id\": \"newfloorid\", \"message\": \"Floor ID renamed successfully\" } ``` --- ## Sample Error Responses ### Not Floor Owner ```json { \"status\": \"ERROR\", \"message\": \"Only the floor owner can rename the floor\" } ``` --- ### Floor Not Found ```json { \"status\": \"ERROR\", \"message\": \"Source floor ID does not exist\" } ``` --- ### Floor ID Already Exists ```json { \"status\": \"ERROR\", \"message\": \"Target floor ID is already in use\" } ``` --- ### Invalid Request ```json { \"status\": \"ERROR\", \"message\": \"user_id, from, and to are required\" } ``` --- ## Notes for Developers * This API **renames the public identifier only**; the internal immutable floor ID (`fid`) is not affected. * Clients should refresh cached floor metadata after a successful rename. * If your platform supports deep links or bookmarks, consider redirect or alias handling for old floor IDs (if supported). --- ### One-Line Mental Model > **This API answers: “Change the public identity (ID) of a floor, owner-only.”**
538
+ * Rename floor
539
+ */
540
+ DefaultApi.prototype.renameFloor = function () {
541
+ return __awaiter(this, arguments, void 0, function (requestParameters, initOverrides) {
542
+ var response;
543
+ if (requestParameters === void 0) { requestParameters = {}; }
544
+ return __generator(this, function (_a) {
545
+ switch (_a.label) {
546
+ case 0: return [4 /*yield*/, this.renameFloorRaw(requestParameters, initOverrides)];
547
+ case 1:
548
+ response = _a.sent();
549
+ return [4 /*yield*/, response.value()];
550
+ case 2: return [2 /*return*/, _a.sent()];
551
+ }
552
+ });
553
+ });
554
+ };
555
+ /**
556
+ * This API initiates the **sign-in validation process** by sending a **one-time validation code (OTP)** to the user. The OTP is delivered to **either the mobile number or the email address** provided in the request. This endpoint is typically called **before completing sign-in**, to verify that the user owns the supplied contact identifier. The calling application is responsible for: * Collecting the OTP from the user * Submitting it to the OTP verification API (handled separately) --- ## **Use Case** * User attempts to sign in * User provides **mobile number or email** * System sends a **validation code (OTP)** * User enters OTP to complete sign-in --- ## **Request Method** `POST` --- ## **Formdata Parameters** | Parameter Name | Type | Required | Description | | --------------- | ------ | --------- | ------------------------------------------- | | `mobile_number` | String | Optional* | Mobile number to which the OTP will be sent | | `email_id` | String | Optional* | Email address to which the OTP will be sent | | `app_id` | String | Optional | Identifier of the calling application | * **Either `mobile_number` or `email_id` must be provided.** Providing both is allowed; the system may choose one based on configuration. --- ## **Request Rules** * At least **one** of `mobile_number` or `email_id` is mandatory * If both are missing, the request will be rejected * OTP delivery channel depends on the provided identifier --- ## **Response Format** `application/json` --- ## **Sample Success Response** ```json { \"status\": \"SUCCESS\", \"message\": \"Validation code sent successfully\" } ``` --- ## **Sample Error Responses** ### Missing Identifier ```json { \"status\": \"ERROR\", \"message\": \"Either mobile_number or email_id must be provided\" } ``` ### Invalid Identifier ```json { \"status\": \"ERROR\", \"message\": \"Invalid mobile number or email address\" } ``` --- ## **Notes** * This API **only sends** the validation code * OTP verification must be performed using the corresponding **verify validation code** API * Rate limiting and retry restrictions may apply to prevent abuse
557
+ * Send Sign-In Validation Code (OTP)
558
+ */
559
+ DefaultApi.prototype.sendSignInValidationCodeRaw = function (requestParameters, initOverrides) {
560
+ return __awaiter(this, void 0, void 0, function () {
561
+ var queryParameters, headerParameters, token, tokenString, consumes, canConsumeForm, formParams, useForm, urlPath, response;
562
+ return __generator(this, function (_a) {
563
+ switch (_a.label) {
564
+ case 0:
565
+ if (requestParameters['appId'] == null) {
566
+ throw new runtime.RequiredError('appId', 'Required parameter "appId" was null or undefined when calling sendSignInValidationCode().');
567
+ }
568
+ queryParameters = {};
569
+ headerParameters = {};
570
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
571
+ token = this.configuration.accessToken;
572
+ return [4 /*yield*/, token("bearer", [])];
573
+ case 1:
574
+ tokenString = _a.sent();
575
+ if (tokenString) {
576
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
577
+ }
578
+ _a.label = 2;
579
+ case 2:
580
+ consumes = [
581
+ { contentType: 'multipart/form-data' },
582
+ ];
583
+ canConsumeForm = runtime.canConsumeForm(consumes);
584
+ useForm = false;
585
+ if (useForm) {
586
+ formParams = new FormData();
587
+ }
588
+ else {
589
+ formParams = new URLSearchParams();
590
+ }
591
+ if (requestParameters['mobileNumber'] != null) {
592
+ formParams.append('mobile_number', requestParameters['mobileNumber']);
593
+ }
594
+ if (requestParameters['emailId'] != null) {
595
+ formParams.append('email_id', requestParameters['emailId']);
596
+ }
597
+ if (requestParameters['appId'] != null) {
598
+ formParams.append('app_id', requestParameters['appId']);
599
+ }
600
+ urlPath = "/auth-service/send/sign/in/validation/code";
601
+ return [4 /*yield*/, this.request({
602
+ path: urlPath,
603
+ method: 'POST',
604
+ headers: headerParameters,
605
+ query: queryParameters,
606
+ body: formParams,
607
+ }, initOverrides)];
608
+ case 3:
609
+ response = _a.sent();
610
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.SendSignInValidationCode200ResponseFromJSON)(jsonValue); })];
611
+ }
612
+ });
613
+ });
614
+ };
615
+ /**
616
+ * This API initiates the **sign-in validation process** by sending a **one-time validation code (OTP)** to the user. The OTP is delivered to **either the mobile number or the email address** provided in the request. This endpoint is typically called **before completing sign-in**, to verify that the user owns the supplied contact identifier. The calling application is responsible for: * Collecting the OTP from the user * Submitting it to the OTP verification API (handled separately) --- ## **Use Case** * User attempts to sign in * User provides **mobile number or email** * System sends a **validation code (OTP)** * User enters OTP to complete sign-in --- ## **Request Method** `POST` --- ## **Formdata Parameters** | Parameter Name | Type | Required | Description | | --------------- | ------ | --------- | ------------------------------------------- | | `mobile_number` | String | Optional* | Mobile number to which the OTP will be sent | | `email_id` | String | Optional* | Email address to which the OTP will be sent | | `app_id` | String | Optional | Identifier of the calling application | * **Either `mobile_number` or `email_id` must be provided.** Providing both is allowed; the system may choose one based on configuration. --- ## **Request Rules** * At least **one** of `mobile_number` or `email_id` is mandatory * If both are missing, the request will be rejected * OTP delivery channel depends on the provided identifier --- ## **Response Format** `application/json` --- ## **Sample Success Response** ```json { \"status\": \"SUCCESS\", \"message\": \"Validation code sent successfully\" } ``` --- ## **Sample Error Responses** ### Missing Identifier ```json { \"status\": \"ERROR\", \"message\": \"Either mobile_number or email_id must be provided\" } ``` ### Invalid Identifier ```json { \"status\": \"ERROR\", \"message\": \"Invalid mobile number or email address\" } ``` --- ## **Notes** * This API **only sends** the validation code * OTP verification must be performed using the corresponding **verify validation code** API * Rate limiting and retry restrictions may apply to prevent abuse
617
+ * Send Sign-In Validation Code (OTP)
618
+ */
619
+ DefaultApi.prototype.sendSignInValidationCode = function (requestParameters, initOverrides) {
620
+ return __awaiter(this, void 0, void 0, function () {
621
+ var response;
622
+ return __generator(this, function (_a) {
623
+ switch (_a.label) {
624
+ case 0: return [4 /*yield*/, this.sendSignInValidationCodeRaw(requestParameters, initOverrides)];
625
+ case 1:
626
+ response = _a.sent();
627
+ return [4 /*yield*/, response.value()];
628
+ case 2: return [2 /*return*/, _a.sent()];
629
+ }
630
+ });
631
+ });
632
+ };
633
+ /**
634
+ * Generates and sends a one-time validation code to the user for verification of sensitive or critical account operations. This API is used across multiple authentication and account-management flows. The validation code is delivered to the user via the appropriate channel (**email or mobile number**), based on the requested operation mode and the input provided. The generated code is **time-bound**, **single-use**, and must be validated using the corresponding verification APIs to complete the requested action. --- ### **Usage Scenarios (Mode Definition)** | Mode | Purpose | | ---- | ----------------------------- | | `0` | Email or mobile number change | | `1` | Password change | | `2` | Delete account | | `3` | Clear account | | `4` | Signup Verification | **Mode `5` – Signup Verification** For login verification, the validation code is sent to **either the email ID or the mobile number provided in the request**. At least **one of email or mobile number must be supplied** for this mode. --- ### **Behavior** * Generates a secure, one-time validation code * Sends the code to the appropriate channel: * Email or mobile number, depending on the operation mode and input * Associates the code with: * User identity (or login identifier) * Requested operation (`mode`) * Application context (if applicable) * Validation codes are valid for a limited duration and **cannot be reused** --- ### **Authentication** This endpoint requires **Bearer Token authentication**, **except** where explicitly allowed (for example, login-related flows). ``` Authorization: Bearer <access_token> ``` --- ### **Successful Response** On success, the API confirms that the validation code has been generated and successfully dispatched to the user. --- ### **Error Response** The API returns an error response if: * The user does not exist or is not eligible for the requested operation * The requested mode is invalid or unsupported * Required identifiers (email or mobile number for login verification) are missing * Rate limits are exceeded * Authorization fails (where applicable) --- ### **Security Notes (Recommended)** * Validation codes are single-use and time-bound * Rate limiting is enforced to prevent abuse * Repeated failures may trigger temporary blocking or additional verification --- ### **One-Line Summary** > Sends a one-time validation code for secure account and authentication operations, including login via email or mobile number.
635
+ * Send Validation code
636
+ */
637
+ DefaultApi.prototype.sendValidationCodeRaw = function (requestParameters, initOverrides) {
638
+ return __awaiter(this, void 0, void 0, function () {
639
+ var queryParameters, headerParameters, token, tokenString, urlPath, response;
640
+ return __generator(this, function (_a) {
641
+ switch (_a.label) {
642
+ case 0:
643
+ if (requestParameters['sendValidationCodeRequest'] == null) {
644
+ throw new runtime.RequiredError('sendValidationCodeRequest', 'Required parameter "sendValidationCodeRequest" was null or undefined when calling sendValidationCode().');
645
+ }
646
+ queryParameters = {};
647
+ headerParameters = {};
648
+ headerParameters['Content-Type'] = 'application/json';
649
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
650
+ token = this.configuration.accessToken;
651
+ return [4 /*yield*/, token("bearer", [])];
652
+ case 1:
653
+ tokenString = _a.sent();
654
+ if (tokenString) {
655
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
656
+ }
657
+ _a.label = 2;
658
+ case 2:
659
+ urlPath = "/auth-service/send/validation/code";
660
+ return [4 /*yield*/, this.request({
661
+ path: urlPath,
662
+ method: 'POST',
663
+ headers: headerParameters,
664
+ query: queryParameters,
665
+ body: (0, index_1.SendValidationCodeRequestToJSON)(requestParameters['sendValidationCodeRequest']),
666
+ }, initOverrides)];
667
+ case 3:
668
+ response = _a.sent();
669
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.SendValidationCode200ResponseFromJSON)(jsonValue); })];
670
+ }
671
+ });
672
+ });
673
+ };
674
+ /**
675
+ * Generates and sends a one-time validation code to the user for verification of sensitive or critical account operations. This API is used across multiple authentication and account-management flows. The validation code is delivered to the user via the appropriate channel (**email or mobile number**), based on the requested operation mode and the input provided. The generated code is **time-bound**, **single-use**, and must be validated using the corresponding verification APIs to complete the requested action. --- ### **Usage Scenarios (Mode Definition)** | Mode | Purpose | | ---- | ----------------------------- | | `0` | Email or mobile number change | | `1` | Password change | | `2` | Delete account | | `3` | Clear account | | `4` | Signup Verification | **Mode `5` – Signup Verification** For login verification, the validation code is sent to **either the email ID or the mobile number provided in the request**. At least **one of email or mobile number must be supplied** for this mode. --- ### **Behavior** * Generates a secure, one-time validation code * Sends the code to the appropriate channel: * Email or mobile number, depending on the operation mode and input * Associates the code with: * User identity (or login identifier) * Requested operation (`mode`) * Application context (if applicable) * Validation codes are valid for a limited duration and **cannot be reused** --- ### **Authentication** This endpoint requires **Bearer Token authentication**, **except** where explicitly allowed (for example, login-related flows). ``` Authorization: Bearer <access_token> ``` --- ### **Successful Response** On success, the API confirms that the validation code has been generated and successfully dispatched to the user. --- ### **Error Response** The API returns an error response if: * The user does not exist or is not eligible for the requested operation * The requested mode is invalid or unsupported * Required identifiers (email or mobile number for login verification) are missing * Rate limits are exceeded * Authorization fails (where applicable) --- ### **Security Notes (Recommended)** * Validation codes are single-use and time-bound * Rate limiting is enforced to prevent abuse * Repeated failures may trigger temporary blocking or additional verification --- ### **One-Line Summary** > Sends a one-time validation code for secure account and authentication operations, including login via email or mobile number.
676
+ * Send Validation code
677
+ */
678
+ DefaultApi.prototype.sendValidationCode = function (requestParameters, initOverrides) {
679
+ return __awaiter(this, void 0, void 0, function () {
680
+ var response;
681
+ return __generator(this, function (_a) {
682
+ switch (_a.label) {
683
+ case 0: return [4 /*yield*/, this.sendValidationCodeRaw(requestParameters, initOverrides)];
684
+ case 1:
685
+ response = _a.sent();
686
+ return [4 /*yield*/, response.value()];
687
+ case 2: return [2 /*return*/, _a.sent()];
688
+ }
689
+ });
690
+ });
691
+ };
692
+ /**
693
+ * Authenticates a user using a registered email ID. The authentication mechanism is determined by the specified `mode`. * When `login_type` is set to **`1`**, the user is authenticated using the provided **password**. * When `login_type` is set to **`2`**, the user is authenticated using a **one-time activation code (OTP)**. For OTP-based authentication (`login_type = 2`), the client **must first invoke the Send Validation Code API** with the appropriate login mode to generate and deliver the activation code to the user. --- ### **Request Body** | Field | Type | Required | Description | | ------------ | ------------- | -------- | ----------------------------------------------------------------- | | `email_id` | string | Yes | Email ID | | `pass_code` | string | Yes | Password/Validation code depending on the login_type| | `login_type` | string | Yes | login type 1 for password 2 for validation code| |`app_id` | string | Yes | App ID | **Field Description** * `email_id` – Registered email address of the user * `pass_code` – password or activation code (this is password if it is 1 and 2 it is validation code) * `app_id` - App ID which is a 13 digit numeric value * `login_type` – Login type * `1` → Password-based login * `2` → Activation code (OTP)–based login --- ### **Behavior Notes** * When `login_type = 2`, password validation is bypassed. * OTP-based login requires a prior call to ` /auth-service/send/sign/in/validation/code`. * If the required credentials for the selected mode are missing or invalid, authentication fails. --- ### **Successful Response** On successful authentication, the user is signed in and a success response is returned as per the authentication flow. --- ### **Error Response** The API returns an error response if: * The email ID is not registered * The password is incorrect (`login_type = 1 `) * The activation code is missing, invalid, or expired (`login_type = 2`) * The mode value is invalid or unsupported --- ### **One-Line Summary** > Signs in a user using an email ID with either password-based or OTP-based authentication, based on the selected mode.
694
+ * Sign In with email ID
695
+ */
696
+ DefaultApi.prototype.signInWithEmailRaw = function (requestParameters, initOverrides) {
697
+ return __awaiter(this, void 0, void 0, function () {
698
+ var queryParameters, headerParameters, token, tokenString, consumes, canConsumeForm, formParams, useForm, urlPath, response;
699
+ return __generator(this, function (_a) {
700
+ switch (_a.label) {
701
+ case 0:
702
+ if (requestParameters['emailId'] == null) {
703
+ throw new runtime.RequiredError('emailId', 'Required parameter "emailId" was null or undefined when calling signInWithEmail().');
704
+ }
705
+ if (requestParameters['passCode'] == null) {
706
+ throw new runtime.RequiredError('passCode', 'Required parameter "passCode" was null or undefined when calling signInWithEmail().');
707
+ }
708
+ if (requestParameters['loginType'] == null) {
709
+ throw new runtime.RequiredError('loginType', 'Required parameter "loginType" was null or undefined when calling signInWithEmail().');
710
+ }
711
+ queryParameters = {};
712
+ headerParameters = {};
713
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
714
+ token = this.configuration.accessToken;
715
+ return [4 /*yield*/, token("bearer", [])];
716
+ case 1:
717
+ tokenString = _a.sent();
718
+ if (tokenString) {
719
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
720
+ }
721
+ _a.label = 2;
722
+ case 2:
723
+ consumes = [
724
+ { contentType: 'multipart/form-data' },
725
+ ];
726
+ canConsumeForm = runtime.canConsumeForm(consumes);
727
+ useForm = false;
728
+ if (useForm) {
729
+ formParams = new FormData();
730
+ }
731
+ else {
732
+ formParams = new URLSearchParams();
733
+ }
734
+ if (requestParameters['emailId'] != null) {
735
+ formParams.append('email_id', requestParameters['emailId']);
736
+ }
737
+ if (requestParameters['passCode'] != null) {
738
+ formParams.append('pass_code', requestParameters['passCode']);
739
+ }
740
+ if (requestParameters['loginType'] != null) {
741
+ formParams.append('login_type', requestParameters['loginType']);
742
+ }
743
+ if (requestParameters['appId'] != null) {
744
+ formParams.append('app_id', requestParameters['appId']);
745
+ }
746
+ urlPath = "/auth-service/sign/in/with/email";
747
+ return [4 /*yield*/, this.request({
748
+ path: urlPath,
749
+ method: 'POST',
750
+ headers: headerParameters,
751
+ query: queryParameters,
752
+ body: formParams,
753
+ }, initOverrides)];
754
+ case 3:
755
+ response = _a.sent();
756
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.SignInWithEmail200ResponseFromJSON)(jsonValue); })];
757
+ }
758
+ });
759
+ });
760
+ };
761
+ /**
762
+ * Authenticates a user using a registered email ID. The authentication mechanism is determined by the specified `mode`. * When `login_type` is set to **`1`**, the user is authenticated using the provided **password**. * When `login_type` is set to **`2`**, the user is authenticated using a **one-time activation code (OTP)**. For OTP-based authentication (`login_type = 2`), the client **must first invoke the Send Validation Code API** with the appropriate login mode to generate and deliver the activation code to the user. --- ### **Request Body** | Field | Type | Required | Description | | ------------ | ------------- | -------- | ----------------------------------------------------------------- | | `email_id` | string | Yes | Email ID | | `pass_code` | string | Yes | Password/Validation code depending on the login_type| | `login_type` | string | Yes | login type 1 for password 2 for validation code| |`app_id` | string | Yes | App ID | **Field Description** * `email_id` – Registered email address of the user * `pass_code` – password or activation code (this is password if it is 1 and 2 it is validation code) * `app_id` - App ID which is a 13 digit numeric value * `login_type` – Login type * `1` → Password-based login * `2` → Activation code (OTP)–based login --- ### **Behavior Notes** * When `login_type = 2`, password validation is bypassed. * OTP-based login requires a prior call to ` /auth-service/send/sign/in/validation/code`. * If the required credentials for the selected mode are missing or invalid, authentication fails. --- ### **Successful Response** On successful authentication, the user is signed in and a success response is returned as per the authentication flow. --- ### **Error Response** The API returns an error response if: * The email ID is not registered * The password is incorrect (`login_type = 1 `) * The activation code is missing, invalid, or expired (`login_type = 2`) * The mode value is invalid or unsupported --- ### **One-Line Summary** > Signs in a user using an email ID with either password-based or OTP-based authentication, based on the selected mode.
763
+ * Sign In with email ID
764
+ */
765
+ DefaultApi.prototype.signInWithEmail = function (requestParameters, initOverrides) {
766
+ return __awaiter(this, void 0, void 0, function () {
767
+ var response;
768
+ return __generator(this, function (_a) {
769
+ switch (_a.label) {
770
+ case 0: return [4 /*yield*/, this.signInWithEmailRaw(requestParameters, initOverrides)];
771
+ case 1:
772
+ response = _a.sent();
773
+ return [4 /*yield*/, response.value()];
774
+ case 2: return [2 /*return*/, _a.sent()];
775
+ }
776
+ });
777
+ });
778
+ };
779
+ /**
780
+ * Authenticates a user using a registered mobile number. The authentication method is determined by the specified `mode`. * When `login_type` is set to **`1`**, the user is authenticated using the **password** associated with the account. * When `login_type` is set to **`2`**, the user is authenticated using a **one-time activation code (OTP)** sent to the registered mobile number. For OTP-based authentication (`login_type = 1`), the client **must first call the Send Validation Code API** with the appropriate login mode to generate and deliver the activation code. --- ### **Request Formdata** | Field | Type | Required | Description | | ------------ | ------------- | -------- | ----------------------------------------------------------------- | | `mobile_number` | string | Yes | Mobile number| | `pass_code` | string | Yes | Password/Validation code depending on the login_type| | `login_type` | string | Yes | login type 1 for password 2 for validation code| |`app_id` | string | Yes | App ID | **Field Description** * `mobile_number` – Registered mobile number of the user * `pass_code` – Password / Validation code (password when `login_type= 1`; validation code when `login_type = 2`) * `login_type` – Login type * `1` → Password-based login * `2` → Activation code (OTP)–based login --- ### **Behavior Notes** * When `login_type = 2`, password validation is skipped. * OTP-based login requires a prior call to `/auth-service/send/sign/in/validation/code`. * Missing or invalid credentials for the selected mode will result in authentication failure. --- ### **Successful Response** On successful authentication, the user is signed in and a success response is returned according to the authentication flow. --- ### **Error Response** The API returns an error response if: * The mobile number is not registered * The password is incorrect (`login_type = 1`) * The activation code is missing, invalid, or expired (`login_type = 2`) * An invalid or unsupported mode is provided --- ### **One-Line Summary** > Signs in a user using a mobile number with either password-based or OTP-based authentication, based on the selected mode.
781
+ * Sign In with Mobile number
782
+ */
783
+ DefaultApi.prototype.signInWithMobileNumberRaw = function (requestParameters, initOverrides) {
784
+ return __awaiter(this, void 0, void 0, function () {
785
+ var queryParameters, headerParameters, token, tokenString, urlPath, response;
786
+ return __generator(this, function (_a) {
787
+ switch (_a.label) {
788
+ case 0:
789
+ if (requestParameters['body'] == null) {
790
+ throw new runtime.RequiredError('body', 'Required parameter "body" was null or undefined when calling signInWithMobileNumber().');
791
+ }
792
+ queryParameters = {};
793
+ headerParameters = {};
794
+ headerParameters['Content-Type'] = 'application/json';
795
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
796
+ token = this.configuration.accessToken;
797
+ return [4 /*yield*/, token("bearer", [])];
798
+ case 1:
799
+ tokenString = _a.sent();
800
+ if (tokenString) {
801
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
802
+ }
803
+ _a.label = 2;
804
+ case 2:
805
+ urlPath = "/auth-service/sign/in/with/mobile/number";
806
+ return [4 /*yield*/, this.request({
807
+ path: urlPath,
808
+ method: 'POST',
809
+ headers: headerParameters,
810
+ query: queryParameters,
811
+ body: requestParameters['body'],
812
+ }, initOverrides)];
813
+ case 3:
814
+ response = _a.sent();
815
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.SignInWithEmail200ResponseFromJSON)(jsonValue); })];
816
+ }
817
+ });
818
+ });
819
+ };
820
+ /**
821
+ * Authenticates a user using a registered mobile number. The authentication method is determined by the specified `mode`. * When `login_type` is set to **`1`**, the user is authenticated using the **password** associated with the account. * When `login_type` is set to **`2`**, the user is authenticated using a **one-time activation code (OTP)** sent to the registered mobile number. For OTP-based authentication (`login_type = 1`), the client **must first call the Send Validation Code API** with the appropriate login mode to generate and deliver the activation code. --- ### **Request Formdata** | Field | Type | Required | Description | | ------------ | ------------- | -------- | ----------------------------------------------------------------- | | `mobile_number` | string | Yes | Mobile number| | `pass_code` | string | Yes | Password/Validation code depending on the login_type| | `login_type` | string | Yes | login type 1 for password 2 for validation code| |`app_id` | string | Yes | App ID | **Field Description** * `mobile_number` – Registered mobile number of the user * `pass_code` – Password / Validation code (password when `login_type= 1`; validation code when `login_type = 2`) * `login_type` – Login type * `1` → Password-based login * `2` → Activation code (OTP)–based login --- ### **Behavior Notes** * When `login_type = 2`, password validation is skipped. * OTP-based login requires a prior call to `/auth-service/send/sign/in/validation/code`. * Missing or invalid credentials for the selected mode will result in authentication failure. --- ### **Successful Response** On successful authentication, the user is signed in and a success response is returned according to the authentication flow. --- ### **Error Response** The API returns an error response if: * The mobile number is not registered * The password is incorrect (`login_type = 1`) * The activation code is missing, invalid, or expired (`login_type = 2`) * An invalid or unsupported mode is provided --- ### **One-Line Summary** > Signs in a user using a mobile number with either password-based or OTP-based authentication, based on the selected mode.
822
+ * Sign In with Mobile number
823
+ */
824
+ DefaultApi.prototype.signInWithMobileNumber = function (requestParameters, initOverrides) {
825
+ return __awaiter(this, void 0, void 0, function () {
826
+ var response;
827
+ return __generator(this, function (_a) {
828
+ switch (_a.label) {
829
+ case 0: return [4 /*yield*/, this.signInWithMobileNumberRaw(requestParameters, initOverrides)];
830
+ case 1:
831
+ response = _a.sent();
832
+ return [4 /*yield*/, response.value()];
833
+ case 2: return [2 /*return*/, _a.sent()];
834
+ }
835
+ });
836
+ });
837
+ };
838
+ /**
839
+ * Creates a new user account in the Floor POD using **either a mobile number or an email ID**. At least **one of `mobile_number` or `email_id` is required** to register a user. Both may be provided if available. The API registers the user under the specified application context and prepares the account for subsequent authentication and usage. Upon successful registration, the API returns: - a unique user_id identifying the newly created user, and - a success string indicating the outcome of the sign-up operation. The user account is created under the specified application context and can be used for subsequent interactions with Floor POD APIs. --- ### **Parameter Clarification (Recommended)** * `name` is mandatory for user profile creation * Either `mobile_number` **or** `email_id` must be present * `app_id` is optional and used to associate the user with a specific application
840
+ * Sign Up
841
+ */
842
+ DefaultApi.prototype.signUpRaw = function (requestParameters, initOverrides) {
843
+ return __awaiter(this, void 0, void 0, function () {
844
+ var queryParameters, headerParameters, token, tokenString, consumes, canConsumeForm, formParams, useForm, urlPath, response;
845
+ return __generator(this, function (_a) {
846
+ switch (_a.label) {
847
+ case 0:
848
+ if (requestParameters['name'] == null) {
849
+ throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling signUp().');
850
+ }
851
+ if (requestParameters['password'] == null) {
852
+ throw new runtime.RequiredError('password', 'Required parameter "password" was null or undefined when calling signUp().');
853
+ }
854
+ queryParameters = {};
855
+ headerParameters = {};
856
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
857
+ token = this.configuration.accessToken;
858
+ return [4 /*yield*/, token("bearer", [])];
859
+ case 1:
860
+ tokenString = _a.sent();
861
+ if (tokenString) {
862
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
863
+ }
864
+ _a.label = 2;
865
+ case 2:
866
+ consumes = [
867
+ { contentType: 'multipart/form-data' },
868
+ ];
869
+ canConsumeForm = runtime.canConsumeForm(consumes);
870
+ useForm = false;
871
+ if (useForm) {
872
+ formParams = new FormData();
873
+ }
874
+ else {
875
+ formParams = new URLSearchParams();
876
+ }
877
+ if (requestParameters['name'] != null) {
878
+ formParams.append('name', requestParameters['name']);
879
+ }
880
+ if (requestParameters['emailId'] != null) {
881
+ formParams.append('email_id', requestParameters['emailId']);
882
+ }
883
+ if (requestParameters['mobileNumber'] != null) {
884
+ formParams.append('mobile_number', requestParameters['mobileNumber']);
885
+ }
886
+ if (requestParameters['password'] != null) {
887
+ formParams.append('password', requestParameters['password']);
888
+ }
889
+ if (requestParameters['appId'] != null) {
890
+ formParams.append('app_id', requestParameters['appId']);
891
+ }
892
+ urlPath = "/auth-service/sign/up";
893
+ return [4 /*yield*/, this.request({
894
+ path: urlPath,
895
+ method: 'POST',
896
+ headers: headerParameters,
897
+ query: queryParameters,
898
+ body: formParams,
899
+ }, initOverrides)];
900
+ case 3:
901
+ response = _a.sent();
902
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.SignUp200ResponseFromJSON)(jsonValue); })];
903
+ }
904
+ });
905
+ });
906
+ };
907
+ /**
908
+ * Creates a new user account in the Floor POD using **either a mobile number or an email ID**. At least **one of `mobile_number` or `email_id` is required** to register a user. Both may be provided if available. The API registers the user under the specified application context and prepares the account for subsequent authentication and usage. Upon successful registration, the API returns: - a unique user_id identifying the newly created user, and - a success string indicating the outcome of the sign-up operation. The user account is created under the specified application context and can be used for subsequent interactions with Floor POD APIs. --- ### **Parameter Clarification (Recommended)** * `name` is mandatory for user profile creation * Either `mobile_number` **or** `email_id` must be present * `app_id` is optional and used to associate the user with a specific application
909
+ * Sign Up
910
+ */
911
+ DefaultApi.prototype.signUp = function (requestParameters, initOverrides) {
912
+ return __awaiter(this, void 0, void 0, function () {
913
+ var response;
914
+ return __generator(this, function (_a) {
915
+ switch (_a.label) {
916
+ case 0: return [4 /*yield*/, this.signUpRaw(requestParameters, initOverrides)];
917
+ case 1:
918
+ response = _a.sent();
919
+ return [4 /*yield*/, response.value()];
920
+ case 2: return [2 /*return*/, _a.sent()];
921
+ }
922
+ });
923
+ });
924
+ };
925
+ /**
926
+ * Validates the activation code submitted by a newly registered user and completes the account activation process. This API verifies the provided `activation_code` against the specified `user_id` and activation `mode` (e.g., email or mobile). Upon successful validation, the user account is activated and the API returns the associated **POD information** along with the user’s **profile details**. If the activation code is invalid, expired, or does not match the user context, the API returns an appropriate error response and the account remains inactive. --- ### **Authentication** This endpoint requires **Bearer Token authentication**. * The token must be included in the `Authorization` header: ``` Authorization: Bearer <access_token> ``` --- ### **Request Body** ```json { \"user_id\": \"string\", \"activation_code\": \"string\", \"app_id\": \"string\", \"mode\": \"string\" } ``` **Field Description** * `user_id` – Unique identifier of the newly registered user * `activation_code` – One-time validation code sent to the user * `app_id` – Application identifier (optional or context-specific) * `mode` – Activation channel used (e.g., `email`, `mobile`) --- ### **Usage Scenarios (Mode Definition)** | Mode | Purpose | | ---- | ----------------------------- | | `0` | Email or mobile number change | | `1` | Password change | | `2` | Delete account | | `3` | Clear account | | `5` | Login verification | ### **Successful Response** On successful validation: * The user account is activated * The API returns: * `pod_info` associated with the user * User `profile` information The activated account can now be used for login and other Floor POD operations. --- ### **Error Response** The API returns an error response when: * The activation code is invalid or expired * The activation code does not match the user or mode * The user is already activated * Authorization fails or the bearer token is missing/invalid In all error cases, **account activation is not completed**. --- ### **One-Line Summary** > Validates a user’s activation code, activates the account, and returns POD and profile details on success.
927
+ * Validation
928
+ */
929
+ DefaultApi.prototype.validateCodeRaw = function (requestParameters, initOverrides) {
930
+ return __awaiter(this, void 0, void 0, function () {
931
+ var queryParameters, headerParameters, token, tokenString, urlPath, response;
932
+ return __generator(this, function (_a) {
933
+ switch (_a.label) {
934
+ case 0:
935
+ if (requestParameters['validateCodeRequest'] == null) {
936
+ throw new runtime.RequiredError('validateCodeRequest', 'Required parameter "validateCodeRequest" was null or undefined when calling validateCode().');
937
+ }
938
+ queryParameters = {};
939
+ headerParameters = {};
940
+ headerParameters['Content-Type'] = 'application/json';
941
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
942
+ token = this.configuration.accessToken;
943
+ return [4 /*yield*/, token("bearer", [])];
944
+ case 1:
945
+ tokenString = _a.sent();
946
+ if (tokenString) {
947
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
948
+ }
949
+ _a.label = 2;
950
+ case 2:
951
+ urlPath = "/auth-service/validate/activation/code";
952
+ return [4 /*yield*/, this.request({
953
+ path: urlPath,
954
+ method: 'POST',
955
+ headers: headerParameters,
956
+ query: queryParameters,
957
+ body: (0, index_1.ValidateCodeRequestToJSON)(requestParameters['validateCodeRequest']),
958
+ }, initOverrides)];
959
+ case 3:
960
+ response = _a.sent();
961
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.UserDetailsFromJSON)(jsonValue); })];
962
+ }
963
+ });
964
+ });
965
+ };
966
+ /**
967
+ * Validates the activation code submitted by a newly registered user and completes the account activation process. This API verifies the provided `activation_code` against the specified `user_id` and activation `mode` (e.g., email or mobile). Upon successful validation, the user account is activated and the API returns the associated **POD information** along with the user’s **profile details**. If the activation code is invalid, expired, or does not match the user context, the API returns an appropriate error response and the account remains inactive. --- ### **Authentication** This endpoint requires **Bearer Token authentication**. * The token must be included in the `Authorization` header: ``` Authorization: Bearer <access_token> ``` --- ### **Request Body** ```json { \"user_id\": \"string\", \"activation_code\": \"string\", \"app_id\": \"string\", \"mode\": \"string\" } ``` **Field Description** * `user_id` – Unique identifier of the newly registered user * `activation_code` – One-time validation code sent to the user * `app_id` – Application identifier (optional or context-specific) * `mode` – Activation channel used (e.g., `email`, `mobile`) --- ### **Usage Scenarios (Mode Definition)** | Mode | Purpose | | ---- | ----------------------------- | | `0` | Email or mobile number change | | `1` | Password change | | `2` | Delete account | | `3` | Clear account | | `5` | Login verification | ### **Successful Response** On successful validation: * The user account is activated * The API returns: * `pod_info` associated with the user * User `profile` information The activated account can now be used for login and other Floor POD operations. --- ### **Error Response** The API returns an error response when: * The activation code is invalid or expired * The activation code does not match the user or mode * The user is already activated * Authorization fails or the bearer token is missing/invalid In all error cases, **account activation is not completed**. --- ### **One-Line Summary** > Validates a user’s activation code, activates the account, and returns POD and profile details on success.
968
+ * Validation
969
+ */
970
+ DefaultApi.prototype.validateCode = function (requestParameters, initOverrides) {
971
+ return __awaiter(this, void 0, void 0, function () {
972
+ var response;
973
+ return __generator(this, function (_a) {
974
+ switch (_a.label) {
975
+ case 0: return [4 /*yield*/, this.validateCodeRaw(requestParameters, initOverrides)];
976
+ case 1:
977
+ response = _a.sent();
978
+ return [4 /*yield*/, response.value()];
979
+ case 2: return [2 /*return*/, _a.sent()];
980
+ }
981
+ });
982
+ });
983
+ };
984
+ return DefaultApi;
985
+ }(runtime.BaseAPI));
986
+ exports.DefaultApi = DefaultApi;