@xfloor/floor-memory-sdk-ts 1.0.20 → 1.0.22

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 (33) hide show
  1. package/README.md +52 -52
  2. package/dist/apis/{DefaultApi.d.ts → AuthApi.d.ts} +10 -56
  3. package/dist/apis/{DefaultApi.js → AuthApi.js} +28 -246
  4. package/dist/apis/EventApi.d.ts +16 -1
  5. package/dist/apis/EventApi.js +69 -0
  6. package/dist/apis/FloorApi.d.ts +99 -0
  7. package/dist/apis/FloorApi.js +460 -0
  8. package/dist/apis/index.d.ts +2 -4
  9. package/dist/apis/index.js +2 -4
  10. package/dist/models/{GetFloorInformation200Response.d.ts → EditFloor200Response.d.ts} +17 -17
  11. package/dist/models/{GetFloorInformation200Response.js → EditFloor200Response.js} +13 -13
  12. package/dist/models/SignInResponse.d.ts +48 -0
  13. package/dist/models/SignInResponse.js +61 -0
  14. package/dist/models/UserDetails.d.ts +6 -6
  15. package/dist/models/UserDetails.js +6 -6
  16. package/dist/models/{SignInWithEmail200ResponsePodInfo.d.ts → UserDetailsPodInfo.d.ts} +16 -16
  17. package/dist/models/{SignInWithEmail200ResponsePodInfo.js → UserDetailsPodInfo.js} +13 -13
  18. package/dist/models/{SignInWithEmail200ResponseProfile.d.ts → UserDetailsProfile.d.ts} +20 -20
  19. package/dist/models/{SignInWithEmail200ResponseProfile.js → UserDetailsProfile.js} +16 -16
  20. package/dist/models/UserDetailsProfileAvatar.d.ts +40 -0
  21. package/dist/models/{SignInWithEmail200ResponseProfileAvatar.js → UserDetailsProfileAvatar.js} +13 -13
  22. package/dist/models/index.d.ts +5 -5
  23. package/dist/models/index.js +5 -5
  24. package/package.json +1 -1
  25. package/dist/apis/EditFloorApi.d.ts +0 -38
  26. package/dist/apis/EditFloorApi.js +0 -175
  27. package/dist/apis/GetFloorInformationApi.d.ts +0 -35
  28. package/dist/apis/GetFloorInformationApi.js +0 -149
  29. package/dist/apis/GetRecentEventsApi.d.ts +0 -35
  30. package/dist/apis/GetRecentEventsApi.js +0 -151
  31. package/dist/models/SignInWithEmail200Response.d.ts +0 -48
  32. package/dist/models/SignInWithEmail200Response.js +0 -61
  33. package/dist/models/SignInWithEmail200ResponseProfileAvatar.d.ts +0 -40
@@ -66,22 +66,22 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
66
66
  }
67
67
  };
68
68
  Object.defineProperty(exports, "__esModule", { value: true });
69
- exports.DefaultApi = void 0;
69
+ exports.AuthApi = void 0;
70
70
  var runtime = require("../runtime");
71
71
  var index_1 = require("../models/index");
72
72
  /**
73
73
  *
74
74
  */
75
- var DefaultApi = /** @class */ (function (_super) {
76
- __extends(DefaultApi, _super);
77
- function DefaultApi() {
75
+ var AuthApi = /** @class */ (function (_super) {
76
+ __extends(AuthApi, _super);
77
+ function AuthApi() {
78
78
  return _super !== null && _super.apply(this, arguments) || this;
79
79
  }
80
80
  /**
81
81
  * 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.
82
82
  * Change email ID
83
83
  */
84
- DefaultApi.prototype.changeEmailRaw = function (requestParameters, initOverrides) {
84
+ AuthApi.prototype.changeEmailRaw = function (requestParameters, initOverrides) {
85
85
  return __awaiter(this, void 0, void 0, function () {
86
86
  var queryParameters, headerParameters, token, tokenString, consumes, canConsumeForm, formParams, useForm, urlPath, response;
87
87
  return __generator(this, function (_a) {
@@ -132,7 +132,7 @@ var DefaultApi = /** @class */ (function (_super) {
132
132
  }, initOverrides)];
133
133
  case 3:
134
134
  response = _a.sent();
135
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.SignInWithEmail200ResponseFromJSON)(jsonValue); })];
135
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.SignInResponseFromJSON)(jsonValue); })];
136
136
  }
137
137
  });
138
138
  });
@@ -141,7 +141,7 @@ var DefaultApi = /** @class */ (function (_super) {
141
141
  * 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.
142
142
  * Change email ID
143
143
  */
144
- DefaultApi.prototype.changeEmail = function (requestParameters, initOverrides) {
144
+ AuthApi.prototype.changeEmail = function (requestParameters, initOverrides) {
145
145
  return __awaiter(this, void 0, void 0, function () {
146
146
  var response;
147
147
  return __generator(this, function (_a) {
@@ -159,7 +159,7 @@ var DefaultApi = /** @class */ (function (_super) {
159
159
  * 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.
160
160
  * Change Mobile number
161
161
  */
162
- DefaultApi.prototype.changeMobileNumberRaw = function (requestParameters, initOverrides) {
162
+ AuthApi.prototype.changeMobileNumberRaw = function (requestParameters, initOverrides) {
163
163
  return __awaiter(this, void 0, void 0, function () {
164
164
  var queryParameters, headerParameters, token, tokenString, consumes, canConsumeForm, formParams, useForm, urlPath, response;
165
165
  return __generator(this, function (_a) {
@@ -210,7 +210,7 @@ var DefaultApi = /** @class */ (function (_super) {
210
210
  }, initOverrides)];
211
211
  case 3:
212
212
  response = _a.sent();
213
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.SignInWithEmail200ResponseFromJSON)(jsonValue); })];
213
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.SignInResponseFromJSON)(jsonValue); })];
214
214
  }
215
215
  });
216
216
  });
@@ -219,7 +219,7 @@ var DefaultApi = /** @class */ (function (_super) {
219
219
  * 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.
220
220
  * Change Mobile number
221
221
  */
222
- DefaultApi.prototype.changeMobileNumber = function (requestParameters, initOverrides) {
222
+ AuthApi.prototype.changeMobileNumber = function (requestParameters, initOverrides) {
223
223
  return __awaiter(this, void 0, void 0, function () {
224
224
  var response;
225
225
  return __generator(this, function (_a) {
@@ -237,7 +237,7 @@ var DefaultApi = /** @class */ (function (_super) {
237
237
  * ## 1) `POST /password/change` — Change Password (Logged-in User) Changes the password of an **authenticated user** who is currently logged in. This endpoint is used when a user is already signed in and wants to update their password as a security or preference action. The system validates a **one-time password-change verification code** (`activation_code`) issued specifically for the change-password flow. If the code is valid and not expired, the user’s password is updated to `new_password` and takes effect immediately. If verification fails, the password remains unchanged and an error response is returned. ### Authentication ✅ **Required**: Bearer token for the logged-in session ``` Authorization: Bearer <access_token> ``` ### Request Body (Form Data) * `user_id` (optional if derived from token) * `activation_code` (required) * `new_password` (required) ### Behavior Notes * Typically requires a prior call to **send a verification code** for password change (mode = password change). * `user_id` can be taken from the access token; include it only if your system requires it explicitly. ### One-Line Summary > Changes the password for a logged-in user after validating a one-time password-change code.
238
238
  * Change Password
239
239
  */
240
- DefaultApi.prototype.changePasswordRaw = function (requestParameters, initOverrides) {
240
+ AuthApi.prototype.changePasswordRaw = function (requestParameters, initOverrides) {
241
241
  return __awaiter(this, void 0, void 0, function () {
242
242
  var queryParameters, headerParameters, token, tokenString, consumes, canConsumeForm, formParams, useForm, urlPath, response;
243
243
  return __generator(this, function (_a) {
@@ -300,7 +300,7 @@ var DefaultApi = /** @class */ (function (_super) {
300
300
  * ## 1) `POST /password/change` — Change Password (Logged-in User) Changes the password of an **authenticated user** who is currently logged in. This endpoint is used when a user is already signed in and wants to update their password as a security or preference action. The system validates a **one-time password-change verification code** (`activation_code`) issued specifically for the change-password flow. If the code is valid and not expired, the user’s password is updated to `new_password` and takes effect immediately. If verification fails, the password remains unchanged and an error response is returned. ### Authentication ✅ **Required**: Bearer token for the logged-in session ``` Authorization: Bearer <access_token> ``` ### Request Body (Form Data) * `user_id` (optional if derived from token) * `activation_code` (required) * `new_password` (required) ### Behavior Notes * Typically requires a prior call to **send a verification code** for password change (mode = password change). * `user_id` can be taken from the access token; include it only if your system requires it explicitly. ### One-Line Summary > Changes the password for a logged-in user after validating a one-time password-change code.
301
301
  * Change Password
302
302
  */
303
- DefaultApi.prototype.changePassword = function (requestParameters, initOverrides) {
303
+ AuthApi.prototype.changePassword = function (requestParameters, initOverrides) {
304
304
  return __awaiter(this, void 0, void 0, function () {
305
305
  var response;
306
306
  return __generator(this, function (_a) {
@@ -314,229 +314,11 @@ var DefaultApi = /** @class */ (function (_super) {
314
314
  });
315
315
  });
316
316
  };
317
- /**
318
- * 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).
319
- * Make floor Private
320
- */
321
- DefaultApi.prototype.makeFloorPrivateRaw = function (requestParameters, initOverrides) {
322
- return __awaiter(this, void 0, void 0, function () {
323
- var queryParameters, headerParameters, token, tokenString, urlPath, response;
324
- return __generator(this, function (_a) {
325
- switch (_a.label) {
326
- case 0:
327
- if (requestParameters['floorId'] == null) {
328
- throw new runtime.RequiredError('floorId', 'Required parameter "floorId" was null or undefined when calling makeFloorPrivate().');
329
- }
330
- if (requestParameters['userId'] == null) {
331
- throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling makeFloorPrivate().');
332
- }
333
- if (requestParameters['appId'] == null) {
334
- throw new runtime.RequiredError('appId', 'Required parameter "appId" was null or undefined when calling makeFloorPrivate().');
335
- }
336
- queryParameters = {};
337
- if (requestParameters['userId'] != null) {
338
- queryParameters['user_id'] = requestParameters['userId'];
339
- }
340
- if (requestParameters['appId'] != null) {
341
- queryParameters['app_id'] = requestParameters['appId'];
342
- }
343
- headerParameters = {};
344
- if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
345
- token = this.configuration.accessToken;
346
- return [4 /*yield*/, token("bearer", [])];
347
- case 1:
348
- tokenString = _a.sent();
349
- if (tokenString) {
350
- headerParameters["Authorization"] = "Bearer ".concat(tokenString);
351
- }
352
- _a.label = 2;
353
- case 2:
354
- urlPath = "/api/memory/make/floor/private/{floor_id}";
355
- urlPath = urlPath.replace("{".concat("floor_id", "}"), encodeURIComponent(String(requestParameters['floorId'])));
356
- return [4 /*yield*/, this.request({
357
- path: urlPath,
358
- method: 'POST',
359
- headers: headerParameters,
360
- query: queryParameters,
361
- }, initOverrides)];
362
- case 3:
363
- response = _a.sent();
364
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GetFloorInformation200ResponseFromJSON)(jsonValue); })];
365
- }
366
- });
367
- });
368
- };
369
- /**
370
- * 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).
371
- * Make floor Private
372
- */
373
- DefaultApi.prototype.makeFloorPrivate = function (requestParameters, initOverrides) {
374
- return __awaiter(this, void 0, void 0, function () {
375
- var response;
376
- return __generator(this, function (_a) {
377
- switch (_a.label) {
378
- case 0: return [4 /*yield*/, this.makeFloorPrivateRaw(requestParameters, initOverrides)];
379
- case 1:
380
- response = _a.sent();
381
- return [4 /*yield*/, response.value()];
382
- case 2: return [2 /*return*/, _a.sent()];
383
- }
384
- });
385
- });
386
- };
387
- /**
388
- * 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.”**
389
- * Make floor public
390
- */
391
- DefaultApi.prototype.makeFloorPublicRaw = function (requestParameters, initOverrides) {
392
- return __awaiter(this, void 0, void 0, function () {
393
- var queryParameters, headerParameters, token, tokenString, urlPath, response;
394
- return __generator(this, function (_a) {
395
- switch (_a.label) {
396
- case 0:
397
- if (requestParameters['floorId'] == null) {
398
- throw new runtime.RequiredError('floorId', 'Required parameter "floorId" was null or undefined when calling makeFloorPublic().');
399
- }
400
- if (requestParameters['userId'] == null) {
401
- throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling makeFloorPublic().');
402
- }
403
- if (requestParameters['appId'] == null) {
404
- throw new runtime.RequiredError('appId', 'Required parameter "appId" was null or undefined when calling makeFloorPublic().');
405
- }
406
- queryParameters = {};
407
- if (requestParameters['userId'] != null) {
408
- queryParameters['user_id'] = requestParameters['userId'];
409
- }
410
- if (requestParameters['appId'] != null) {
411
- queryParameters['app_id'] = requestParameters['appId'];
412
- }
413
- headerParameters = {};
414
- if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
415
- token = this.configuration.accessToken;
416
- return [4 /*yield*/, token("bearer", [])];
417
- case 1:
418
- tokenString = _a.sent();
419
- if (tokenString) {
420
- headerParameters["Authorization"] = "Bearer ".concat(tokenString);
421
- }
422
- _a.label = 2;
423
- case 2:
424
- urlPath = "/api/memory/make/floor/public/{floor_id}";
425
- urlPath = urlPath.replace("{".concat("floor_id", "}"), encodeURIComponent(String(requestParameters['floorId'])));
426
- return [4 /*yield*/, this.request({
427
- path: urlPath,
428
- method: 'POST',
429
- headers: headerParameters,
430
- query: queryParameters,
431
- }, initOverrides)];
432
- case 3:
433
- response = _a.sent();
434
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GetFloorInformation200ResponseFromJSON)(jsonValue); })];
435
- }
436
- });
437
- });
438
- };
439
- /**
440
- * 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.”**
441
- * Make floor public
442
- */
443
- DefaultApi.prototype.makeFloorPublic = function (requestParameters, initOverrides) {
444
- return __awaiter(this, void 0, void 0, function () {
445
- var response;
446
- return __generator(this, function (_a) {
447
- switch (_a.label) {
448
- case 0: return [4 /*yield*/, this.makeFloorPublicRaw(requestParameters, initOverrides)];
449
- case 1:
450
- response = _a.sent();
451
- return [4 /*yield*/, response.value()];
452
- case 2: return [2 /*return*/, _a.sent()];
453
- }
454
- });
455
- });
456
- };
457
- /**
458
- * 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.”**
459
- * Rename floor
460
- */
461
- DefaultApi.prototype.renameFloorRaw = function (requestParameters, initOverrides) {
462
- return __awaiter(this, void 0, void 0, function () {
463
- var queryParameters, headerParameters, token, tokenString, urlPath, response;
464
- return __generator(this, function (_a) {
465
- switch (_a.label) {
466
- case 0:
467
- if (requestParameters['userId'] == null) {
468
- throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling renameFloor().');
469
- }
470
- if (requestParameters['appId'] == null) {
471
- throw new runtime.RequiredError('appId', 'Required parameter "appId" was null or undefined when calling renameFloor().');
472
- }
473
- if (requestParameters['from'] == null) {
474
- throw new runtime.RequiredError('from', 'Required parameter "from" was null or undefined when calling renameFloor().');
475
- }
476
- if (requestParameters['to'] == null) {
477
- throw new runtime.RequiredError('to', 'Required parameter "to" was null or undefined when calling renameFloor().');
478
- }
479
- queryParameters = {};
480
- if (requestParameters['userId'] != null) {
481
- queryParameters['user_id'] = requestParameters['userId'];
482
- }
483
- if (requestParameters['appId'] != null) {
484
- queryParameters['app_id'] = requestParameters['appId'];
485
- }
486
- if (requestParameters['from'] != null) {
487
- queryParameters['from'] = requestParameters['from'];
488
- }
489
- if (requestParameters['to'] != null) {
490
- queryParameters['to'] = requestParameters['to'];
491
- }
492
- headerParameters = {};
493
- if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
494
- token = this.configuration.accessToken;
495
- return [4 /*yield*/, token("bearer", [])];
496
- case 1:
497
- tokenString = _a.sent();
498
- if (tokenString) {
499
- headerParameters["Authorization"] = "Bearer ".concat(tokenString);
500
- }
501
- _a.label = 2;
502
- case 2:
503
- urlPath = "/api/memory/change/floor/id";
504
- return [4 /*yield*/, this.request({
505
- path: urlPath,
506
- method: 'POST',
507
- headers: headerParameters,
508
- query: queryParameters,
509
- }, initOverrides)];
510
- case 3:
511
- response = _a.sent();
512
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GetFloorInformation200ResponseFromJSON)(jsonValue); })];
513
- }
514
- });
515
- });
516
- };
517
- /**
518
- * 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.”**
519
- * Rename floor
520
- */
521
- DefaultApi.prototype.renameFloor = function (requestParameters, initOverrides) {
522
- return __awaiter(this, void 0, void 0, function () {
523
- var response;
524
- return __generator(this, function (_a) {
525
- switch (_a.label) {
526
- case 0: return [4 /*yield*/, this.renameFloorRaw(requestParameters, initOverrides)];
527
- case 1:
528
- response = _a.sent();
529
- return [4 /*yield*/, response.value()];
530
- case 2: return [2 /*return*/, _a.sent()];
531
- }
532
- });
533
- });
534
- };
535
317
  /**
536
318
  * --- ## Reset Password (Forgot Password, Not Logged In) Resets the password of a user who **cannot log in** and is using a **forgot-password** flow. This endpoint is used when the user is not authenticated and requests a password reset using a verified identity channel such as **email** or **mobile number**. The system validates a **one-time reset verification code** (`activation_code`) issued for the reset-password flow. If valid and not expired, the password is updated to `new_password` and takes effect immediately. If verification fails, the password remains unchanged and an error response is returned. ### Authentication ✅ **Recommended** (better security): a short-lived **reset token** issued after initiating reset ``` Authorization: Bearer <reset_token> ``` > If you don’t use a reset token, you must enforce strong rate limiting + OTP attempt throttling on this endpoint. ### Request Body (Form Data) * `email_id` or `mobile_number` (required to identify user) * `activation_code` (required) * `new_password` (required) * `user_id` (optional, if your reset flow already resolved it) ### Behavior Notes * Requires a prior call to **initiate reset** and send OTP/code (mode = forgot password). * Must enforce code attempt limits and expiration strictly. ### One-Line Summary > Resets a user’s password (forgot-password flow) after validating a one-time reset code sent to email or mobile.
537
319
  * Reset Password
538
320
  */
539
- DefaultApi.prototype.resetPasswordRaw = function (requestParameters, initOverrides) {
321
+ AuthApi.prototype.resetPasswordRaw = function (requestParameters, initOverrides) {
540
322
  return __awaiter(this, void 0, void 0, function () {
541
323
  var queryParameters, headerParameters, consumes, canConsumeForm, formParams, useForm, urlPath, response;
542
324
  return __generator(this, function (_a) {
@@ -595,7 +377,7 @@ var DefaultApi = /** @class */ (function (_super) {
595
377
  * --- ## Reset Password (Forgot Password, Not Logged In) Resets the password of a user who **cannot log in** and is using a **forgot-password** flow. This endpoint is used when the user is not authenticated and requests a password reset using a verified identity channel such as **email** or **mobile number**. The system validates a **one-time reset verification code** (`activation_code`) issued for the reset-password flow. If valid and not expired, the password is updated to `new_password` and takes effect immediately. If verification fails, the password remains unchanged and an error response is returned. ### Authentication ✅ **Recommended** (better security): a short-lived **reset token** issued after initiating reset ``` Authorization: Bearer <reset_token> ``` > If you don’t use a reset token, you must enforce strong rate limiting + OTP attempt throttling on this endpoint. ### Request Body (Form Data) * `email_id` or `mobile_number` (required to identify user) * `activation_code` (required) * `new_password` (required) * `user_id` (optional, if your reset flow already resolved it) ### Behavior Notes * Requires a prior call to **initiate reset** and send OTP/code (mode = forgot password). * Must enforce code attempt limits and expiration strictly. ### One-Line Summary > Resets a user’s password (forgot-password flow) after validating a one-time reset code sent to email or mobile.
596
378
  * Reset Password
597
379
  */
598
- DefaultApi.prototype.resetPassword = function (requestParameters, initOverrides) {
380
+ AuthApi.prototype.resetPassword = function (requestParameters, initOverrides) {
599
381
  return __awaiter(this, void 0, void 0, function () {
600
382
  var response;
601
383
  return __generator(this, function (_a) {
@@ -613,7 +395,7 @@ var DefaultApi = /** @class */ (function (_super) {
613
395
  * 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 | | `5` | Using OTP for Login | | `6` | OTP for forgot password | **Mode `4` – 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.
614
396
  * Send Validation code
615
397
  */
616
- DefaultApi.prototype.sendValidationCodeRaw = function (requestParameters, initOverrides) {
398
+ AuthApi.prototype.sendValidationCodeRaw = function (requestParameters, initOverrides) {
617
399
  return __awaiter(this, void 0, void 0, function () {
618
400
  var queryParameters, headerParameters, token, tokenString, consumes, canConsumeForm, formParams, useForm, urlPath, response;
619
401
  return __generator(this, function (_a) {
@@ -679,7 +461,7 @@ var DefaultApi = /** @class */ (function (_super) {
679
461
  * 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 | | `5` | Using OTP for Login | | `6` | OTP for forgot password | **Mode `4` – 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.
680
462
  * Send Validation code
681
463
  */
682
- DefaultApi.prototype.sendValidationCode = function (requestParameters, initOverrides) {
464
+ AuthApi.prototype.sendValidationCode = function (requestParameters, initOverrides) {
683
465
  return __awaiter(this, void 0, void 0, function () {
684
466
  var response;
685
467
  return __generator(this, function (_a) {
@@ -697,7 +479,7 @@ var DefaultApi = /** @class */ (function (_super) {
697
479
  * 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.
698
480
  * Sign In with email ID
699
481
  */
700
- DefaultApi.prototype.signInWithEmailRaw = function (requestParameters, initOverrides) {
482
+ AuthApi.prototype.signInWithEmailRaw = function (requestParameters, initOverrides) {
701
483
  return __awaiter(this, void 0, void 0, function () {
702
484
  var queryParameters, headerParameters, token, tokenString, consumes, canConsumeForm, formParams, useForm, urlPath, response;
703
485
  return __generator(this, function (_a) {
@@ -757,7 +539,7 @@ var DefaultApi = /** @class */ (function (_super) {
757
539
  }, initOverrides)];
758
540
  case 3:
759
541
  response = _a.sent();
760
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.SignInWithEmail200ResponseFromJSON)(jsonValue); })];
542
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.SignInResponseFromJSON)(jsonValue); })];
761
543
  }
762
544
  });
763
545
  });
@@ -766,7 +548,7 @@ var DefaultApi = /** @class */ (function (_super) {
766
548
  * 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.
767
549
  * Sign In with email ID
768
550
  */
769
- DefaultApi.prototype.signInWithEmail = function (requestParameters, initOverrides) {
551
+ AuthApi.prototype.signInWithEmail = function (requestParameters, initOverrides) {
770
552
  return __awaiter(this, void 0, void 0, function () {
771
553
  var response;
772
554
  return __generator(this, function (_a) {
@@ -784,7 +566,7 @@ var DefaultApi = /** @class */ (function (_super) {
784
566
  * 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.
785
567
  * Sign In with Mobile number
786
568
  */
787
- DefaultApi.prototype.signInWithMobileNumberRaw = function (requestParameters, initOverrides) {
569
+ AuthApi.prototype.signInWithMobileNumberRaw = function (requestParameters, initOverrides) {
788
570
  return __awaiter(this, void 0, void 0, function () {
789
571
  var queryParameters, headerParameters, token, tokenString, consumes, canConsumeForm, formParams, useForm, urlPath, response;
790
572
  return __generator(this, function (_a) {
@@ -844,7 +626,7 @@ var DefaultApi = /** @class */ (function (_super) {
844
626
  }, initOverrides)];
845
627
  case 3:
846
628
  response = _a.sent();
847
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.SignInWithEmail200ResponseFromJSON)(jsonValue); })];
629
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.SignInResponseFromJSON)(jsonValue); })];
848
630
  }
849
631
  });
850
632
  });
@@ -853,7 +635,7 @@ var DefaultApi = /** @class */ (function (_super) {
853
635
  * 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.
854
636
  * Sign In with Mobile number
855
637
  */
856
- DefaultApi.prototype.signInWithMobileNumber = function (requestParameters, initOverrides) {
638
+ AuthApi.prototype.signInWithMobileNumber = function (requestParameters, initOverrides) {
857
639
  return __awaiter(this, void 0, void 0, function () {
858
640
  var response;
859
641
  return __generator(this, function (_a) {
@@ -871,7 +653,7 @@ var DefaultApi = /** @class */ (function (_super) {
871
653
  * 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
872
654
  * Sign Up
873
655
  */
874
- DefaultApi.prototype.signUpRaw = function (requestParameters, initOverrides) {
656
+ AuthApi.prototype.signUpRaw = function (requestParameters, initOverrides) {
875
657
  return __awaiter(this, void 0, void 0, function () {
876
658
  var queryParameters, headerParameters, token, tokenString, consumes, canConsumeForm, formParams, useForm, urlPath, response;
877
659
  return __generator(this, function (_a) {
@@ -940,7 +722,7 @@ var DefaultApi = /** @class */ (function (_super) {
940
722
  * 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
941
723
  * Sign Up
942
724
  */
943
- DefaultApi.prototype.signUp = function (requestParameters, initOverrides) {
725
+ AuthApi.prototype.signUp = function (requestParameters, initOverrides) {
944
726
  return __awaiter(this, void 0, void 0, function () {
945
727
  var response;
946
728
  return __generator(this, function (_a) {
@@ -958,7 +740,7 @@ var DefaultApi = /** @class */ (function (_super) {
958
740
  * ## **Validate Activation / Verification Code** This API **validates a one-time verification code** submitted by a user and **executes the corresponding account operation** based on the specified **mode**. Depending on the mode, the API may: * Activate a newly registered account * Confirm a login attempt * Verify a password change or reset * Validate email or mobile updates * Confirm account deletion or clearing requests The API verifies the provided `activation_code` against the given `user_id`, `mode`, and application context. If validation succeeds, the requested operation is completed and the API returns the relevant **POD information** and **user profile details** (where applicable). If validation fails, the operation is **not performed** and an appropriate error response is returned. --- ## **Authentication** This endpoint requires **Bearer Token authentication**. **Header** ``` Authorization: Bearer <access_token> ``` --- ## **Request Body** ```json { \"user_id\": \"string\", \"activation_code\": \"string\", \"app_id\": \"string\", \"mode\": \"string\" } ``` ### **Field Descriptions** * **user_id** – Unique identifier of the user initiating the operation * **activation_code** – One-time verification code sent to the user * **app_id** – Application identifier (optional or context-specific) * **mode** – Operation context for which the verification is being performed --- ## **Usage Scenarios (Mode Definitions)** | Mode | Purpose | | ---- | ---------------------------------------- | | 0 | Email or mobile number change | | 1 | Password change | | 2 | Delete account | | 3 | Clear account | | 4 | Signup verification (account activation) | | 5 | Login verification | | 6 | Forgot password verification | --- ## **Successful Response** On successful validation: * The requested operation (based on `mode`) is completed * The API returns: * **POD information** associated with the user (if applicable) * **User profile details** (if applicable) Examples: * For **signup verification**, the user account is activated * For **login**, access is confirmed * For **password reset**, the user may proceed to set a new password * For **account deletion**, the request is confirmed --- ## **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 operation mode * The requested operation is already completed (e.g., user already activated) * Authorization fails or the bearer token is missing or invalid ⚠️ In all error cases, **no account state change occurs**. --- ## **One-Line Summary** > Validates a one-time verification code and securely completes the requested user account operation (signup, login, password change, or account actions), returning POD and profile details on success.
959
741
  * Validation
960
742
  */
961
- DefaultApi.prototype.validateCodeRaw = function (requestParameters, initOverrides) {
743
+ AuthApi.prototype.validateCodeRaw = function (requestParameters, initOverrides) {
962
744
  return __awaiter(this, void 0, void 0, function () {
963
745
  var queryParameters, headerParameters, token, tokenString, consumes, canConsumeForm, formParams, useForm, urlPath, response;
964
746
  return __generator(this, function (_a) {
@@ -1027,7 +809,7 @@ var DefaultApi = /** @class */ (function (_super) {
1027
809
  * ## **Validate Activation / Verification Code** This API **validates a one-time verification code** submitted by a user and **executes the corresponding account operation** based on the specified **mode**. Depending on the mode, the API may: * Activate a newly registered account * Confirm a login attempt * Verify a password change or reset * Validate email or mobile updates * Confirm account deletion or clearing requests The API verifies the provided `activation_code` against the given `user_id`, `mode`, and application context. If validation succeeds, the requested operation is completed and the API returns the relevant **POD information** and **user profile details** (where applicable). If validation fails, the operation is **not performed** and an appropriate error response is returned. --- ## **Authentication** This endpoint requires **Bearer Token authentication**. **Header** ``` Authorization: Bearer <access_token> ``` --- ## **Request Body** ```json { \"user_id\": \"string\", \"activation_code\": \"string\", \"app_id\": \"string\", \"mode\": \"string\" } ``` ### **Field Descriptions** * **user_id** – Unique identifier of the user initiating the operation * **activation_code** – One-time verification code sent to the user * **app_id** – Application identifier (optional or context-specific) * **mode** – Operation context for which the verification is being performed --- ## **Usage Scenarios (Mode Definitions)** | Mode | Purpose | | ---- | ---------------------------------------- | | 0 | Email or mobile number change | | 1 | Password change | | 2 | Delete account | | 3 | Clear account | | 4 | Signup verification (account activation) | | 5 | Login verification | | 6 | Forgot password verification | --- ## **Successful Response** On successful validation: * The requested operation (based on `mode`) is completed * The API returns: * **POD information** associated with the user (if applicable) * **User profile details** (if applicable) Examples: * For **signup verification**, the user account is activated * For **login**, access is confirmed * For **password reset**, the user may proceed to set a new password * For **account deletion**, the request is confirmed --- ## **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 operation mode * The requested operation is already completed (e.g., user already activated) * Authorization fails or the bearer token is missing or invalid ⚠️ In all error cases, **no account state change occurs**. --- ## **One-Line Summary** > Validates a one-time verification code and securely completes the requested user account operation (signup, login, password change, or account actions), returning POD and profile details on success.
1028
810
  * Validation
1029
811
  */
1030
- DefaultApi.prototype.validateCode = function (requestParameters, initOverrides) {
812
+ AuthApi.prototype.validateCode = function (requestParameters, initOverrides) {
1031
813
  return __awaiter(this, void 0, void 0, function () {
1032
814
  var response;
1033
815
  return __generator(this, function (_a) {
@@ -1041,6 +823,6 @@ var DefaultApi = /** @class */ (function (_super) {
1041
823
  });
1042
824
  });
1043
825
  };
1044
- return DefaultApi;
826
+ return AuthApi;
1045
827
  }(runtime.BaseAPI));
1046
- exports.DefaultApi = DefaultApi;
828
+ exports.AuthApi = AuthApi;
@@ -12,13 +12,18 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  import * as runtime from '../runtime';
15
- import type { EventResponse } from '../models/index';
15
+ import type { EventResponse, GetRecentEvents200Response } from '../models/index';
16
16
  export interface EventRequest {
17
17
  inputInfo: string;
18
18
  appId: string;
19
19
  userId: string;
20
20
  files?: Array<Blob>;
21
21
  }
22
+ export interface GetRecentEventsRequest {
23
+ floorId: string;
24
+ appId: string;
25
+ userId?: string;
26
+ }
22
27
  /**
23
28
  *
24
29
  */
@@ -33,4 +38,14 @@ export declare class EventApi extends runtime.BaseAPI {
33
38
  * Create Event (Post Content)
34
39
  */
35
40
  event(requestParameters: EventRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EventResponse>;
41
+ /**
42
+ * This API retrieves the **latest posts (events)** from a specified floor. The behaviour of the API changes based on whether a **user ID** is provided: * **If `user_id` is provided** → The API returns **recent posts relevant to that user**, scoped within the given floor. This includes posts from: * Floors the user follows * Floors created by the user * Pod floors associated with the user (if applicable) * **If `user_id` is NOT provided** → The API returns the **most recent posts available in the specified floor**, without user-specific filtering. This makes the API suitable for: * Personalized activity feeds * Floor-level public timelines * Pod-based content aggregation * Developer-built pods and custom clients --- ## **Key Concepts** * A **floor** represents a content space (independent floor, followed floor, or pod floor) * A **pod floor** may aggregate content across multiple related floors * Posts are returned **in reverse chronological order** (latest first) * Each post belongs to a specific **block** within the floor --- ## **Request Method** `GET` --- ## **Request Parameters (Query Params)** | Parameter Name | Type | Required | Description | | -------------- | ------ | -------- | -------------------------------------------------------------------------------------------------------------------------- | | `floor_id` | String | **Yes** | Floor identifier from which events should be fetched. Can be a pod floor ID, followed floor ID, or an independent floor ID | | `user_id` | String | No | If provided, returns posts relevant to the user within the given floor | | `app_id` | String | No | Identifier for external developers or pod-based applications consuming this API | --- ## **Behavior Summary** | Scenario | Result | | ---------------------- | ----------------------------------------- | | `floor_id` only | Latest posts from the specified floor | | `floor_id` + `user_id` | User-relevant posts within that floor | | Pod floor ID | Aggregated posts across pod-linked floors | | Independent floor ID | Posts only from that floor | --- ## **Response Format** `application/json` --- ## **Response Structure** ### **Top-Level Fields** | Field | Type | Description | | ------------ | ------ | ------------------------------ | | `post_count` | String | Total number of posts returned | | `items` | Array | List of recent post objects | --- ### **Post Object (`items[]`)** | Field | Type | Description | | --------------- | ------ | ------------------------------------------------------------------------- | | `event_id` | String | Unique identifier of the post/event | | `block_type` | String | Type of block where the post was created (e.g., blog, forum, audio, etc.) | | `block_id` | String | Identifier of the block within the floor | | `floor_uid` | String | Floor identifier where the post belongs | | `title` | String | Title of the post (may be empty) | | `text` | String | Text or HTML content of the post | | `media` | Array | Media objects (audio, image, etc.), if any | | `created_at_ms` | String | Post creation time in milliseconds (epoch) | --- ### **Author Object** | Field | Type | Description | | ----------- | ------ | ---------------------------- | | `name` | String | Display name of the author | | `floor_uid` | String | Author’s floor/user handle | | `avatar` | Object | Author profile image details | --- ### **Media Object** | Field | Type | Description | | ------ | ------ | ----------------------------------- | | `type` | String | Media type (e.g., `AUDIO`, `IMAGE`) | | `url` | String | Public URL of the media file | --- ## **Sample Success Response** *(structure abbreviated for clarity)* ```json { \"post_count\": \"18\", \"items\": [ { \"event_id\": \"1766557274836\", \"block_type\": \"0\", \"title\": \"voice-note-1766557272764.wav\", \"text\": \"You\", \"created_at_ms\": \"1766557275000\", \"author\": { \"name\": \"MEGHANA G\", \"floor_uid\": \"meghanag\", \"avatar\": { \"type\": \"IMAGE\", \"url\": \"https://...\" } }, \"media\": [ { \"type\": \"AUDIO\", \"url\": \"https://...\" } ] } ] } ``` --- ## **Notes** * Posts may contain **plain text or HTML** * Media is optional and may be absent * Ordering is **latest first** * The API is read-only and does not require authentication by default * Access control (public/private floors) is enforced internally --- ## **Typical Use Cases** * Floor activity feed * Pod-level dashboards * User-personalized timelines * Public floor landing pages * External developer pods using `app_id`
43
+ * Recent Events
44
+ */
45
+ getRecentEventsRaw(requestParameters: GetRecentEventsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetRecentEvents200Response>>;
46
+ /**
47
+ * This API retrieves the **latest posts (events)** from a specified floor. The behaviour of the API changes based on whether a **user ID** is provided: * **If `user_id` is provided** → The API returns **recent posts relevant to that user**, scoped within the given floor. This includes posts from: * Floors the user follows * Floors created by the user * Pod floors associated with the user (if applicable) * **If `user_id` is NOT provided** → The API returns the **most recent posts available in the specified floor**, without user-specific filtering. This makes the API suitable for: * Personalized activity feeds * Floor-level public timelines * Pod-based content aggregation * Developer-built pods and custom clients --- ## **Key Concepts** * A **floor** represents a content space (independent floor, followed floor, or pod floor) * A **pod floor** may aggregate content across multiple related floors * Posts are returned **in reverse chronological order** (latest first) * Each post belongs to a specific **block** within the floor --- ## **Request Method** `GET` --- ## **Request Parameters (Query Params)** | Parameter Name | Type | Required | Description | | -------------- | ------ | -------- | -------------------------------------------------------------------------------------------------------------------------- | | `floor_id` | String | **Yes** | Floor identifier from which events should be fetched. Can be a pod floor ID, followed floor ID, or an independent floor ID | | `user_id` | String | No | If provided, returns posts relevant to the user within the given floor | | `app_id` | String | No | Identifier for external developers or pod-based applications consuming this API | --- ## **Behavior Summary** | Scenario | Result | | ---------------------- | ----------------------------------------- | | `floor_id` only | Latest posts from the specified floor | | `floor_id` + `user_id` | User-relevant posts within that floor | | Pod floor ID | Aggregated posts across pod-linked floors | | Independent floor ID | Posts only from that floor | --- ## **Response Format** `application/json` --- ## **Response Structure** ### **Top-Level Fields** | Field | Type | Description | | ------------ | ------ | ------------------------------ | | `post_count` | String | Total number of posts returned | | `items` | Array | List of recent post objects | --- ### **Post Object (`items[]`)** | Field | Type | Description | | --------------- | ------ | ------------------------------------------------------------------------- | | `event_id` | String | Unique identifier of the post/event | | `block_type` | String | Type of block where the post was created (e.g., blog, forum, audio, etc.) | | `block_id` | String | Identifier of the block within the floor | | `floor_uid` | String | Floor identifier where the post belongs | | `title` | String | Title of the post (may be empty) | | `text` | String | Text or HTML content of the post | | `media` | Array | Media objects (audio, image, etc.), if any | | `created_at_ms` | String | Post creation time in milliseconds (epoch) | --- ### **Author Object** | Field | Type | Description | | ----------- | ------ | ---------------------------- | | `name` | String | Display name of the author | | `floor_uid` | String | Author’s floor/user handle | | `avatar` | Object | Author profile image details | --- ### **Media Object** | Field | Type | Description | | ------ | ------ | ----------------------------------- | | `type` | String | Media type (e.g., `AUDIO`, `IMAGE`) | | `url` | String | Public URL of the media file | --- ## **Sample Success Response** *(structure abbreviated for clarity)* ```json { \"post_count\": \"18\", \"items\": [ { \"event_id\": \"1766557274836\", \"block_type\": \"0\", \"title\": \"voice-note-1766557272764.wav\", \"text\": \"You\", \"created_at_ms\": \"1766557275000\", \"author\": { \"name\": \"MEGHANA G\", \"floor_uid\": \"meghanag\", \"avatar\": { \"type\": \"IMAGE\", \"url\": \"https://...\" } }, \"media\": [ { \"type\": \"AUDIO\", \"url\": \"https://...\" } ] } ] } ``` --- ## **Notes** * Posts may contain **plain text or HTML** * Media is optional and may be absent * Ordering is **latest first** * The API is read-only and does not require authentication by default * Access control (public/private floors) is enforced internally --- ## **Typical Use Cases** * Floor activity feed * Pod-level dashboards * User-personalized timelines * Public floor landing pages * External developer pods using `app_id`
48
+ * Recent Events
49
+ */
50
+ getRecentEvents(requestParameters: GetRecentEventsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetRecentEvents200Response>;
36
51
  }