@xfloor/floor-memory-sdk-ts 1.0.5 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @xfloor/floor-memory-sdk-ts@1.0.5
1
+ # @xfloor/floor-memory-sdk-ts@1.0.6
2
2
 
3
3
  A TypeScript SDK client for the appfloor.in API.
4
4
 
@@ -246,7 +246,7 @@ and is automatically generated by the
246
246
  [OpenAPI Generator](https://openapi-generator.tech) project:
247
247
 
248
248
  - API version: `1.0.0`
249
- - Package version: `1.0.5`
249
+ - Package version: `1.0.6`
250
250
  - Generator version: `7.18.0`
251
251
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
252
252
 
@@ -42,14 +42,14 @@ export interface GetConversationsRequest {
42
42
  threadId?: string;
43
43
  }
44
44
  export interface MakeFloorPrivateRequest {
45
- floorId?: string;
46
- userId?: string;
47
- appId?: string;
45
+ floorId: string;
46
+ userId: string;
47
+ appId: string;
48
48
  }
49
49
  export interface MakeFloorPublicRequest {
50
- floorId?: string;
51
- userId?: string;
52
- appId?: string;
50
+ floorId: string;
51
+ userId: string;
52
+ appId: string;
53
53
  }
54
54
  export interface RegisterExternalUserIdentityRequest {
55
55
  mobileNumber?: string;
@@ -58,10 +58,10 @@ export interface RegisterExternalUserIdentityRequest {
58
58
  appId?: string;
59
59
  }
60
60
  export interface RenameFloorRequest {
61
- userId?: string;
62
- appId?: string;
63
- from?: string;
64
- to?: string;
61
+ userId: string;
62
+ appId: string;
63
+ from: string;
64
+ to: string;
65
65
  }
66
66
  export interface ResetPasswordRequest {
67
67
  activationCode: string;
@@ -179,7 +179,7 @@ export declare class DefaultApi extends runtime.BaseAPI {
179
179
  * 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).
180
180
  * Make floor Private
181
181
  */
182
- makeFloorPrivate(requestParameters?: MakeFloorPrivateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetFloorInformation200Response>;
182
+ makeFloorPrivate(requestParameters: MakeFloorPrivateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetFloorInformation200Response>;
183
183
  /**
184
184
  * 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.”**
185
185
  * Make floor public
@@ -189,7 +189,7 @@ export declare class DefaultApi extends runtime.BaseAPI {
189
189
  * 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.”**
190
190
  * Make floor public
191
191
  */
192
- makeFloorPublic(requestParameters?: MakeFloorPublicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetFloorInformation200Response>;
192
+ makeFloorPublic(requestParameters: MakeFloorPublicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetFloorInformation200Response>;
193
193
  /**
194
194
  * This API allows a calling application to **pass externally authenticated user identity information to xfloor** after completing authentication within its own system. xfloor **does not perform authentication, credential verification, or session management** as part of this API. The calling application is fully responsible for validating the user and ensuring the correctness of the identity data provided. Upon invocation, xfloor will: * **Create a new user profile** if no matching user exists, or * **Update the existing user profile** if the user is already present. xfloor returns a unique `xfloor_user_id`, which serves as the **canonical user identifier** and must be used in all subsequent xfloor APIs, including floors, blocks, conversations, memory interactions, and analytics.
195
195
  * External User Registration
@@ -209,7 +209,7 @@ export declare class DefaultApi extends runtime.BaseAPI {
209
209
  * 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.”**
210
210
  * Rename floor
211
211
  */
212
- renameFloor(requestParameters?: RenameFloorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetFloorInformation200Response>;
212
+ renameFloor(requestParameters: RenameFloorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetFloorInformation200Response>;
213
213
  /**
214
214
  * --- ## 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.
215
215
  * Reset Password
@@ -566,6 +566,15 @@ var DefaultApi = /** @class */ (function (_super) {
566
566
  return __generator(this, function (_a) {
567
567
  switch (_a.label) {
568
568
  case 0:
569
+ if (requestParameters['floorId'] == null) {
570
+ throw new runtime.RequiredError('floorId', 'Required parameter "floorId" was null or undefined when calling makeFloorPrivate().');
571
+ }
572
+ if (requestParameters['userId'] == null) {
573
+ throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling makeFloorPrivate().');
574
+ }
575
+ if (requestParameters['appId'] == null) {
576
+ throw new runtime.RequiredError('appId', 'Required parameter "appId" was null or undefined when calling makeFloorPrivate().');
577
+ }
569
578
  queryParameters = {};
570
579
  if (requestParameters['floorId'] != null) {
571
580
  queryParameters['floor_id'] = requestParameters['floorId'];
@@ -605,10 +614,9 @@ var DefaultApi = /** @class */ (function (_super) {
605
614
  * 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).
606
615
  * Make floor Private
607
616
  */
608
- DefaultApi.prototype.makeFloorPrivate = function () {
609
- return __awaiter(this, arguments, void 0, function (requestParameters, initOverrides) {
617
+ DefaultApi.prototype.makeFloorPrivate = function (requestParameters, initOverrides) {
618
+ return __awaiter(this, void 0, void 0, function () {
610
619
  var response;
611
- if (requestParameters === void 0) { requestParameters = {}; }
612
620
  return __generator(this, function (_a) {
613
621
  switch (_a.label) {
614
622
  case 0: return [4 /*yield*/, this.makeFloorPrivateRaw(requestParameters, initOverrides)];
@@ -630,6 +638,15 @@ var DefaultApi = /** @class */ (function (_super) {
630
638
  return __generator(this, function (_a) {
631
639
  switch (_a.label) {
632
640
  case 0:
641
+ if (requestParameters['floorId'] == null) {
642
+ throw new runtime.RequiredError('floorId', 'Required parameter "floorId" was null or undefined when calling makeFloorPublic().');
643
+ }
644
+ if (requestParameters['userId'] == null) {
645
+ throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling makeFloorPublic().');
646
+ }
647
+ if (requestParameters['appId'] == null) {
648
+ throw new runtime.RequiredError('appId', 'Required parameter "appId" was null or undefined when calling makeFloorPublic().');
649
+ }
633
650
  queryParameters = {};
634
651
  if (requestParameters['floorId'] != null) {
635
652
  queryParameters['floor_id'] = requestParameters['floorId'];
@@ -669,10 +686,9 @@ var DefaultApi = /** @class */ (function (_super) {
669
686
  * 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.”**
670
687
  * Make floor public
671
688
  */
672
- DefaultApi.prototype.makeFloorPublic = function () {
673
- return __awaiter(this, arguments, void 0, function (requestParameters, initOverrides) {
689
+ DefaultApi.prototype.makeFloorPublic = function (requestParameters, initOverrides) {
690
+ return __awaiter(this, void 0, void 0, function () {
674
691
  var response;
675
- if (requestParameters === void 0) { requestParameters = {}; }
676
692
  return __generator(this, function (_a) {
677
693
  switch (_a.label) {
678
694
  case 0: return [4 /*yield*/, this.makeFloorPublicRaw(requestParameters, initOverrides)];
@@ -773,6 +789,18 @@ var DefaultApi = /** @class */ (function (_super) {
773
789
  return __generator(this, function (_a) {
774
790
  switch (_a.label) {
775
791
  case 0:
792
+ if (requestParameters['userId'] == null) {
793
+ throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling renameFloor().');
794
+ }
795
+ if (requestParameters['appId'] == null) {
796
+ throw new runtime.RequiredError('appId', 'Required parameter "appId" was null or undefined when calling renameFloor().');
797
+ }
798
+ if (requestParameters['from'] == null) {
799
+ throw new runtime.RequiredError('from', 'Required parameter "from" was null or undefined when calling renameFloor().');
800
+ }
801
+ if (requestParameters['to'] == null) {
802
+ throw new runtime.RequiredError('to', 'Required parameter "to" was null or undefined when calling renameFloor().');
803
+ }
776
804
  queryParameters = {};
777
805
  if (requestParameters['userId'] != null) {
778
806
  queryParameters['user_id'] = requestParameters['userId'];
@@ -805,10 +833,9 @@ var DefaultApi = /** @class */ (function (_super) {
805
833
  * 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.”**
806
834
  * Rename floor
807
835
  */
808
- DefaultApi.prototype.renameFloor = function () {
809
- return __awaiter(this, arguments, void 0, function (requestParameters, initOverrides) {
836
+ DefaultApi.prototype.renameFloor = function (requestParameters, initOverrides) {
837
+ return __awaiter(this, void 0, void 0, function () {
810
838
  var response;
811
- if (requestParameters === void 0) { requestParameters = {}; }
812
839
  return __generator(this, function (_a) {
813
840
  switch (_a.label) {
814
841
  case 0: return [4 /*yield*/, this.renameFloorRaw(requestParameters, initOverrides)];
@@ -15,8 +15,8 @@ import * as runtime from '../runtime';
15
15
  import type { GetFloorInformation200Response } from '../models/index';
16
16
  export interface GetFloorInformationRequest {
17
17
  floorId: string;
18
+ appId: string;
18
19
  userId?: string;
19
- appId?: string;
20
20
  }
21
21
  /**
22
22
  *
@@ -90,6 +90,9 @@ var GetFloorInformationApi = /** @class */ (function (_super) {
90
90
  if (requestParameters['floorId'] == null) {
91
91
  throw new runtime.RequiredError('floorId', 'Required parameter "floorId" was null or undefined when calling getFloorInformation().');
92
92
  }
93
+ if (requestParameters['appId'] == null) {
94
+ throw new runtime.RequiredError('appId', 'Required parameter "appId" was null or undefined when calling getFloorInformation().');
95
+ }
93
96
  queryParameters = {};
94
97
  if (requestParameters['userId'] != null) {
95
98
  queryParameters['user_id'] = requestParameters['userId'];
@@ -15,8 +15,8 @@ import * as runtime from '../runtime';
15
15
  import type { GetRecentEvents200Response } from '../models/index';
16
16
  export interface GetRecentEventsRequest {
17
17
  floorId: string;
18
+ appId: string;
18
19
  userId?: string;
19
- appId?: string;
20
20
  }
21
21
  /**
22
22
  *
@@ -90,6 +90,9 @@ var GetRecentEventsApi = /** @class */ (function (_super) {
90
90
  if (requestParameters['floorId'] == null) {
91
91
  throw new runtime.RequiredError('floorId', 'Required parameter "floorId" was null or undefined when calling getRecentEvents().');
92
92
  }
93
+ if (requestParameters['appId'] == null) {
94
+ throw new runtime.RequiredError('appId', 'Required parameter "appId" was null or undefined when calling getRecentEvents().');
95
+ }
93
96
  queryParameters = {};
94
97
  if (requestParameters['userId'] != null) {
95
98
  queryParameters['user_id'] = requestParameters['userId'];
@@ -53,7 +53,7 @@ export interface QueryRequest {
53
53
  * @type {string}
54
54
  * @memberof QueryRequest
55
55
  */
56
- appId?: string;
56
+ appId: string;
57
57
  /**
58
58
  *
59
59
  * @type {QueryRequestFilters}
@@ -31,6 +31,8 @@ function instanceOfQueryRequest(value) {
31
31
  return false;
32
32
  if (!('floorIds' in value) || value['floorIds'] === undefined)
33
33
  return false;
34
+ if (!('appId' in value) || value['appId'] === undefined)
35
+ return false;
34
36
  return true;
35
37
  }
36
38
  function QueryRequestFromJSON(json) {
@@ -46,7 +48,7 @@ function QueryRequestFromJSONTyped(json, ignoreDiscriminator) {
46
48
  'floorIds': json['floor_ids'],
47
49
  'includeMetadata': json['include_metadata'] == null ? undefined : json['include_metadata'],
48
50
  'summaryNeeded': json['summary_needed'] == null ? undefined : json['summary_needed'],
49
- 'appId': json['app_id'] == null ? undefined : json['app_id'],
51
+ 'appId': json['app_id'],
50
52
  'filters': json['filters'] == null ? undefined : (0, QueryRequestFilters_1.QueryRequestFiltersFromJSON)(json['filters']),
51
53
  };
52
54
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xfloor/floor-memory-sdk-ts",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "TypeScript SDK for xFloor Memory APIs (Memory + Registration).",
5
5
  "author": "xFloor",
6
6
  "repository": {