@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
@@ -168,6 +168,75 @@ var EventApi = /** @class */ (function (_super) {
168
168
  });
169
169
  });
170
170
  };
171
+ /**
172
+ * 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`
173
+ * Recent Events
174
+ */
175
+ EventApi.prototype.getRecentEventsRaw = function (requestParameters, initOverrides) {
176
+ return __awaiter(this, void 0, void 0, function () {
177
+ var queryParameters, headerParameters, token, tokenString, urlPath, response;
178
+ return __generator(this, function (_a) {
179
+ switch (_a.label) {
180
+ case 0:
181
+ if (requestParameters['floorId'] == null) {
182
+ throw new runtime.RequiredError('floorId', 'Required parameter "floorId" was null or undefined when calling getRecentEvents().');
183
+ }
184
+ if (requestParameters['appId'] == null) {
185
+ throw new runtime.RequiredError('appId', 'Required parameter "appId" was null or undefined when calling getRecentEvents().');
186
+ }
187
+ queryParameters = {};
188
+ if (requestParameters['userId'] != null) {
189
+ queryParameters['user_id'] = requestParameters['userId'];
190
+ }
191
+ if (requestParameters['floorId'] != null) {
192
+ queryParameters['floor_id'] = requestParameters['floorId'];
193
+ }
194
+ if (requestParameters['appId'] != null) {
195
+ queryParameters['app_id'] = requestParameters['appId'];
196
+ }
197
+ headerParameters = {};
198
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
199
+ token = this.configuration.accessToken;
200
+ return [4 /*yield*/, token("bearer", [])];
201
+ case 1:
202
+ tokenString = _a.sent();
203
+ if (tokenString) {
204
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
205
+ }
206
+ _a.label = 2;
207
+ case 2:
208
+ urlPath = "/api/memory/recent/events";
209
+ return [4 /*yield*/, this.request({
210
+ path: urlPath,
211
+ method: 'GET',
212
+ headers: headerParameters,
213
+ query: queryParameters,
214
+ }, initOverrides)];
215
+ case 3:
216
+ response = _a.sent();
217
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GetRecentEvents200ResponseFromJSON)(jsonValue); })];
218
+ }
219
+ });
220
+ });
221
+ };
222
+ /**
223
+ * 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`
224
+ * Recent Events
225
+ */
226
+ EventApi.prototype.getRecentEvents = function (requestParameters, initOverrides) {
227
+ return __awaiter(this, void 0, void 0, function () {
228
+ var response;
229
+ return __generator(this, function (_a) {
230
+ switch (_a.label) {
231
+ case 0: return [4 /*yield*/, this.getRecentEventsRaw(requestParameters, initOverrides)];
232
+ case 1:
233
+ response = _a.sent();
234
+ return [4 /*yield*/, response.value()];
235
+ case 2: return [2 /*return*/, _a.sent()];
236
+ }
237
+ });
238
+ });
239
+ };
171
240
  return EventApi;
172
241
  }(runtime.BaseAPI));
173
242
  exports.EventApi = EventApi;
@@ -0,0 +1,99 @@
1
+ /**
2
+ * Floor Memory
3
+ * 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.
4
+ * - Memory and
5
+ * - 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.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: contact@ipomo.in
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ import * as runtime from '../runtime';
15
+ import type { EditFloor200Response, FloorInfo } from '../models/index';
16
+ export interface EditFloorRequest {
17
+ floorId: string;
18
+ userId: string;
19
+ appId: string;
20
+ logoFile?: Blob;
21
+ title?: string;
22
+ details?: string;
23
+ }
24
+ export interface GetFloorInformationRequest {
25
+ floorId: string;
26
+ appId: string;
27
+ userId?: string;
28
+ }
29
+ export interface MakeFloorPrivateRequest {
30
+ floorId: string;
31
+ userId: string;
32
+ appId: string;
33
+ }
34
+ export interface MakeFloorPublicRequest {
35
+ floorId: string;
36
+ userId: string;
37
+ appId: string;
38
+ }
39
+ export interface RenameFloorRequest {
40
+ userId: string;
41
+ appId: string;
42
+ from: string;
43
+ to: string;
44
+ }
45
+ /**
46
+ *
47
+ */
48
+ export declare class FloorApi extends runtime.BaseAPI {
49
+ /**
50
+ * This API updates an existing floor’s profile metadata using **multipart form data**. A floor **can be edited only by its owner**. If the authenticated user is **not the owner of the floor**, the request will be rejected, even if the user is a member or follower of the floor. The API allows the floor owner to update: * Floor **title** * Floor **details/description** * Floor **logo/avatar image** After a successful update, the API returns the **latest floor object**, including the updated avatar and the current list of blocks associated with the floor. --- ## Authorization Rules (Critical) * The caller **must be authenticated** * The caller **must be the owner of the floor** * Members, followers, or pod consumers **cannot** edit the floor * Ownership is validated internally using the authenticated user context > **Ownership is mandatory. There are no partial permissions for this API.** --- ## Content-Type `multipart/form-data` --- ## Request Body (Multipart Form Data) ### Form Fields | Field Name | Type | Required | Description | | ---------- | ------ | ------------ | ---------------------------------------- | | `floor_id` | String | Optional* | Public / human-readable floor identifier | | `title` | String | Optional | New floor title | | `details` | String | Optional | New floor description | | `logo` | File | Optional | New floor logo image (PNG/JPG/WebP) | * At least **one floor identifier** (`fid` or `floor_id`) must be provided. **Best practice:** Use `fid` as the primary identifier. --- ## Update Rules * At least one of `title`, `details`, or `logo` must be present * Missing update fields result in a validation error * If `logo` is provided, the previous logo is replaced --- ## Response Format `application/json` --- ## Sample Success Response ```json { \"floor_id\": \"my_floor\", \"title\": \"daughter ouch upon yummy clamor\", \"details\": \"nostrud occaecat incididunt dolor adipisicing\", \"fid\": \"86\", \"blocks\": [ { \"bid\": \"83\", \"type\": \"pariatur\", \"title\": \"wherever demobilise acidly refute\" } ], \"avatar\": { \"url\": \"https://legal-availability.name/\", \"id\": \"98\" } } ``` --- ## Error Responses (Authorization Focus) ### Not Floor Owner ```json { \"status\": \"ERROR\", \"message\": \"Only the floor owner can edit this floor\" } ``` ### Floor Not Found ```json { \"status\": \"ERROR\", \"message\": \"Floor not found\" } ``` ### No Update Fields ```json { \"status\": \"ERROR\", \"message\": \"No update fields provided\" } ``` --- ## Notes * This API is **owner-only by design** * Pods and developer tools must operate using **owner credentials** * Blocks are returned for convenience but are **not editable through this API** ---
51
+ * Edit floor
52
+ */
53
+ editFloorRaw(requestParameters: EditFloorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EditFloor200Response>>;
54
+ /**
55
+ * This API updates an existing floor’s profile metadata using **multipart form data**. A floor **can be edited only by its owner**. If the authenticated user is **not the owner of the floor**, the request will be rejected, even if the user is a member or follower of the floor. The API allows the floor owner to update: * Floor **title** * Floor **details/description** * Floor **logo/avatar image** After a successful update, the API returns the **latest floor object**, including the updated avatar and the current list of blocks associated with the floor. --- ## Authorization Rules (Critical) * The caller **must be authenticated** * The caller **must be the owner of the floor** * Members, followers, or pod consumers **cannot** edit the floor * Ownership is validated internally using the authenticated user context > **Ownership is mandatory. There are no partial permissions for this API.** --- ## Content-Type `multipart/form-data` --- ## Request Body (Multipart Form Data) ### Form Fields | Field Name | Type | Required | Description | | ---------- | ------ | ------------ | ---------------------------------------- | | `floor_id` | String | Optional* | Public / human-readable floor identifier | | `title` | String | Optional | New floor title | | `details` | String | Optional | New floor description | | `logo` | File | Optional | New floor logo image (PNG/JPG/WebP) | * At least **one floor identifier** (`fid` or `floor_id`) must be provided. **Best practice:** Use `fid` as the primary identifier. --- ## Update Rules * At least one of `title`, `details`, or `logo` must be present * Missing update fields result in a validation error * If `logo` is provided, the previous logo is replaced --- ## Response Format `application/json` --- ## Sample Success Response ```json { \"floor_id\": \"my_floor\", \"title\": \"daughter ouch upon yummy clamor\", \"details\": \"nostrud occaecat incididunt dolor adipisicing\", \"fid\": \"86\", \"blocks\": [ { \"bid\": \"83\", \"type\": \"pariatur\", \"title\": \"wherever demobilise acidly refute\" } ], \"avatar\": { \"url\": \"https://legal-availability.name/\", \"id\": \"98\" } } ``` --- ## Error Responses (Authorization Focus) ### Not Floor Owner ```json { \"status\": \"ERROR\", \"message\": \"Only the floor owner can edit this floor\" } ``` ### Floor Not Found ```json { \"status\": \"ERROR\", \"message\": \"Floor not found\" } ``` ### No Update Fields ```json { \"status\": \"ERROR\", \"message\": \"No update fields provided\" } ``` --- ## Notes * This API is **owner-only by design** * Pods and developer tools must operate using **owner credentials** * Blocks are returned for convenience but are **not editable through this API** ---
56
+ * Edit floor
57
+ */
58
+ editFloor(requestParameters: EditFloorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EditFloor200Response>;
59
+ /**
60
+ * This API returns the **basic profile information of a floor**. It is used to fetch all essential metadata required to **render a floor landing page, header, or navigation context**. The response includes: * Floor identity and type * Ownership information relative to the requesting user * Floor metadata (title, description, avatar) * List of blocks available in the floor * App association (for pod / developer use cases) This API does **not** return posts or content; it only provides **structural and descriptive information** about the floor. --- ## Typical Use Cases * Render floor header (title, logo, description) * Decide UI permissions (owner vs non-owner) * Display available blocks (Feeds, Blog, Quiz, etc.) * Pod discovery or developer-managed floor rendering * Lightweight floor metadata fetch before loading content --- ## Authorization & Context * The API may be called by authenticated or unauthenticated users (depending on floor visibility). * The `is_owner` field is calculated **relative to the requesting user context** (if authenticated). --- ## Response Format `application/json` --- ## Response Structure ### Top-Level Fields | Field | Type | Description | | ------------ | ---------------------- | ---------------------------------------------------------------- | | `floor_id` | String | Public, human-readable identifier of the floor | | `floor_uid` | String | Internal unique identifier of the floor | | `title` | String | Display title of the floor | | `details` | String | Short description or summary of the floor | | `floor_type` | String | Type of floor (`PUBLIC`, `PRIVATE`, `POD`) | | `is_owner` | String (`\"0\"` / `\"1\"`) | Indicates whether the requesting user is the owner | | `blocks` | Array | List of blocks available in the floor | | `avatar` | Object | Floor logo / avatar metadata | | `app_id` | String | Associated application ID (used mainly for pod/developer floors) | --- ## Ownership Indicator ### `is_owner` ```json \"is_owner\": \"0\" ``` | Value | Meaning | | ----- | ----------------------------------------- | | `\"1\"` | Requesting user is the owner of the floor | | `\"0\"` | Requesting user is not the owner | This field is typically used by clients to: * Enable or disable edit/settings UI * Show owner-only actions --- ## Blocks Object ```json \"blocks\": [ { \"block_id\": \"1765960948723\", \"type\": \"1\", \"title\": \"Feeds\" } ] ``` Each block represents a **content category or service** available inside the floor. ### Block Fields | Field | Type | Description | | ------- | ------ | ----------------------------------------------------- | | `block_id` | String | Unique identifier of the block | | `type` | String | Block type identifier (e.g., feed, blog, forum, quiz) | | `title` | String | Display name of the block | --- ## Avatar Object ```json \"avatar\": { \"id\": \"1767009204367\", \"url\": \"https://...\" } ``` | Field | Type | Description | | ----- | ------ | ------------------------------ | | `id` | String | Media identifier of the avatar | | `url` | String | CDN URL of the floor logo | Used to render the floor’s profile image or banner. --- ## Floor Type ```json \"floor_type\": \"POD\" ``` | Value | Meaning | | --------- | ------------------------------------- | | `PUBLIC` | Open floor visible to everyone | | `PRIVATE` | Restricted floor | | `POD` | Aggregated or developer-managed floor | `POD` floors are often associated with an `app_id` and may aggregate or serve content programmatically. --- ## Sample Success Response ```json { \"is_owner\": \"0\", \"blocks\": [ { \"block_id\": \"1765960948723\", \"type\": \"1\", \"title\": \"Feeds\" } ], \"floor_uid\": \"1765960956967\", \"floor_id\": \"raghupodfloor1\", \"details\": \"raghu\", \"avatar\": { \"id\": \"1767009204367\", \"url\": \"https://d2e5822u5ecuq8.cloudfront.net/room/1765960956967/logo/1765960956967.jpg\" }, \"title\": \"raghu\", \"floor_type\": \"POD\", \"app_id\": \"1765949734005\" } ``` --- ## Notes for Developers * This is a **lightweight metadata API** and is safe to call frequently. * Use this API **before** loading posts or analytics. * `blocks` ordering can be used directly for navigation UI. * `floor_type` + `is_owner` together determine which UI actions are allowed. --- ## Common Error Scenarios ### Floor Not Found ```json { \"status\": \"ERROR\", \"message\": \"Floor not found\" } ``` ### Access Restricted ```json { \"status\": \"ERROR\", \"message\": \"Access denied for this floor\" } ``` --- ### Final Mental Model > **This API answers: “What is this floor, who owns it, and what can I do here?”**
61
+ * Basic information of a floor
62
+ */
63
+ getFloorInformationRaw(requestParameters: GetFloorInformationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FloorInfo>>;
64
+ /**
65
+ * This API returns the **basic profile information of a floor**. It is used to fetch all essential metadata required to **render a floor landing page, header, or navigation context**. The response includes: * Floor identity and type * Ownership information relative to the requesting user * Floor metadata (title, description, avatar) * List of blocks available in the floor * App association (for pod / developer use cases) This API does **not** return posts or content; it only provides **structural and descriptive information** about the floor. --- ## Typical Use Cases * Render floor header (title, logo, description) * Decide UI permissions (owner vs non-owner) * Display available blocks (Feeds, Blog, Quiz, etc.) * Pod discovery or developer-managed floor rendering * Lightweight floor metadata fetch before loading content --- ## Authorization & Context * The API may be called by authenticated or unauthenticated users (depending on floor visibility). * The `is_owner` field is calculated **relative to the requesting user context** (if authenticated). --- ## Response Format `application/json` --- ## Response Structure ### Top-Level Fields | Field | Type | Description | | ------------ | ---------------------- | ---------------------------------------------------------------- | | `floor_id` | String | Public, human-readable identifier of the floor | | `floor_uid` | String | Internal unique identifier of the floor | | `title` | String | Display title of the floor | | `details` | String | Short description or summary of the floor | | `floor_type` | String | Type of floor (`PUBLIC`, `PRIVATE`, `POD`) | | `is_owner` | String (`\"0\"` / `\"1\"`) | Indicates whether the requesting user is the owner | | `blocks` | Array | List of blocks available in the floor | | `avatar` | Object | Floor logo / avatar metadata | | `app_id` | String | Associated application ID (used mainly for pod/developer floors) | --- ## Ownership Indicator ### `is_owner` ```json \"is_owner\": \"0\" ``` | Value | Meaning | | ----- | ----------------------------------------- | | `\"1\"` | Requesting user is the owner of the floor | | `\"0\"` | Requesting user is not the owner | This field is typically used by clients to: * Enable or disable edit/settings UI * Show owner-only actions --- ## Blocks Object ```json \"blocks\": [ { \"block_id\": \"1765960948723\", \"type\": \"1\", \"title\": \"Feeds\" } ] ``` Each block represents a **content category or service** available inside the floor. ### Block Fields | Field | Type | Description | | ------- | ------ | ----------------------------------------------------- | | `block_id` | String | Unique identifier of the block | | `type` | String | Block type identifier (e.g., feed, blog, forum, quiz) | | `title` | String | Display name of the block | --- ## Avatar Object ```json \"avatar\": { \"id\": \"1767009204367\", \"url\": \"https://...\" } ``` | Field | Type | Description | | ----- | ------ | ------------------------------ | | `id` | String | Media identifier of the avatar | | `url` | String | CDN URL of the floor logo | Used to render the floor’s profile image or banner. --- ## Floor Type ```json \"floor_type\": \"POD\" ``` | Value | Meaning | | --------- | ------------------------------------- | | `PUBLIC` | Open floor visible to everyone | | `PRIVATE` | Restricted floor | | `POD` | Aggregated or developer-managed floor | `POD` floors are often associated with an `app_id` and may aggregate or serve content programmatically. --- ## Sample Success Response ```json { \"is_owner\": \"0\", \"blocks\": [ { \"block_id\": \"1765960948723\", \"type\": \"1\", \"title\": \"Feeds\" } ], \"floor_uid\": \"1765960956967\", \"floor_id\": \"raghupodfloor1\", \"details\": \"raghu\", \"avatar\": { \"id\": \"1767009204367\", \"url\": \"https://d2e5822u5ecuq8.cloudfront.net/room/1765960956967/logo/1765960956967.jpg\" }, \"title\": \"raghu\", \"floor_type\": \"POD\", \"app_id\": \"1765949734005\" } ``` --- ## Notes for Developers * This is a **lightweight metadata API** and is safe to call frequently. * Use this API **before** loading posts or analytics. * `blocks` ordering can be used directly for navigation UI. * `floor_type` + `is_owner` together determine which UI actions are allowed. --- ## Common Error Scenarios ### Floor Not Found ```json { \"status\": \"ERROR\", \"message\": \"Floor not found\" } ``` ### Access Restricted ```json { \"status\": \"ERROR\", \"message\": \"Access denied for this floor\" } ``` --- ### Final Mental Model > **This API answers: “What is this floor, who owns it, and what can I do here?”**
66
+ * Basic information of a floor
67
+ */
68
+ getFloorInformation(requestParameters: GetFloorInformationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FloorInfo>;
69
+ /**
70
+ * 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).
71
+ * Make floor Private
72
+ */
73
+ makeFloorPrivateRaw(requestParameters: MakeFloorPrivateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EditFloor200Response>>;
74
+ /**
75
+ * 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).
76
+ * Make floor Private
77
+ */
78
+ makeFloorPrivate(requestParameters: MakeFloorPrivateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EditFloor200Response>;
79
+ /**
80
+ * 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.”**
81
+ * Make floor public
82
+ */
83
+ makeFloorPublicRaw(requestParameters: MakeFloorPublicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EditFloor200Response>>;
84
+ /**
85
+ * 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.”**
86
+ * Make floor public
87
+ */
88
+ makeFloorPublic(requestParameters: MakeFloorPublicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EditFloor200Response>;
89
+ /**
90
+ * 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.”**
91
+ * Rename floor
92
+ */
93
+ renameFloorRaw(requestParameters: RenameFloorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EditFloor200Response>>;
94
+ /**
95
+ * 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.”**
96
+ * Rename floor
97
+ */
98
+ renameFloor(requestParameters: RenameFloorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EditFloor200Response>;
99
+ }