@xfloor/floor-memory-sdk-ts 1.0.4 → 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.
Files changed (124) hide show
  1. package/README.md +152 -39
  2. package/dist/apis/DefaultApi.d.ts +88 -15
  3. package/dist/apis/DefaultApi.js +378 -10
  4. package/dist/apis/EditFloorApi.d.ts +3 -1
  5. package/dist/apis/EditFloorApi.js +3 -1
  6. package/dist/apis/EventApi.d.ts +5 -3
  7. package/dist/apis/EventApi.js +5 -3
  8. package/dist/apis/GetFloorInformationApi.d.ts +6 -4
  9. package/dist/apis/GetFloorInformationApi.js +8 -3
  10. package/dist/apis/GetRecentEventsApi.d.ts +4 -2
  11. package/dist/apis/GetRecentEventsApi.js +6 -1
  12. package/dist/apis/QueryApi.d.ts +3 -1
  13. package/dist/apis/QueryApi.js +3 -1
  14. package/dist/models/BlockDetails.d.ts +4 -2
  15. package/dist/models/BlockDetails.js +6 -4
  16. package/dist/models/ChangePassword200Response.d.ts +3 -1
  17. package/dist/models/ChangePassword200Response.js +3 -1
  18. package/dist/models/ConversationThreads200Response.d.ts +41 -0
  19. package/dist/models/ConversationThreads200Response.js +58 -0
  20. package/dist/models/ConversationThreads200ResponseThreadsInner.d.ts +46 -0
  21. package/dist/models/ConversationThreads200ResponseThreadsInner.js +61 -0
  22. package/dist/models/EditFloor400Response.d.ts +3 -1
  23. package/dist/models/EditFloor400Response.js +3 -1
  24. package/dist/models/EditFloor400ResponseError.d.ts +3 -1
  25. package/dist/models/EditFloor400ResponseError.js +3 -1
  26. package/dist/models/Event400Response.d.ts +3 -1
  27. package/dist/models/Event400Response.js +3 -1
  28. package/dist/models/Event400ResponseError.d.ts +3 -1
  29. package/dist/models/Event400ResponseError.js +3 -1
  30. package/dist/models/EventResponse.d.ts +3 -1
  31. package/dist/models/EventResponse.js +3 -1
  32. package/dist/models/FloorInfo.d.ts +3 -1
  33. package/dist/models/FloorInfo.js +3 -1
  34. package/dist/models/GetConversations200Response.d.ts +47 -0
  35. package/dist/models/GetConversations200Response.js +62 -0
  36. package/dist/models/GetConversations200ResponseConversationInner.d.ts +42 -0
  37. package/dist/models/GetConversations200ResponseConversationInner.js +55 -0
  38. package/dist/models/GetConversations200ResponseConversationInnerAssistant.d.ts +78 -0
  39. package/dist/models/GetConversations200ResponseConversationInnerAssistant.js +83 -0
  40. package/dist/models/GetConversations200ResponseConversationInnerAssistantChoicesInner.d.ts +61 -0
  41. package/dist/models/GetConversations200ResponseConversationInnerAssistantChoicesInner.js +62 -0
  42. package/dist/models/GetConversations200ResponseConversationInnerAssistantChoicesInnerAiModelDetails.d.ts +76 -0
  43. package/dist/models/GetConversations200ResponseConversationInnerAssistantChoicesInnerAiModelDetails.js +81 -0
  44. package/dist/models/GetConversations200ResponseConversationInnerAssistantChoicesInnerMessage.d.ts +40 -0
  45. package/dist/models/GetConversations200ResponseConversationInnerAssistantChoicesInnerMessage.js +57 -0
  46. package/dist/models/GetConversations200ResponseConversationInnerAssistantChoicesInnerPromptDetails.d.ts +40 -0
  47. package/dist/models/GetConversations200ResponseConversationInnerAssistantChoicesInnerPromptDetails.js +57 -0
  48. package/dist/models/GetConversations200ResponseConversationInnerAssistantFetchMultiplePosts.d.ts +59 -0
  49. package/dist/models/GetConversations200ResponseConversationInnerAssistantFetchMultiplePosts.js +70 -0
  50. package/dist/models/GetConversations200ResponseConversationInnerAssistantFetchMultiplePostsResultsInner.d.ts +82 -0
  51. package/dist/models/GetConversations200ResponseConversationInnerAssistantFetchMultiplePostsResultsInner.js +85 -0
  52. package/dist/models/GetConversations200ResponseConversationInnerUser.d.ts +59 -0
  53. package/dist/models/GetConversations200ResponseConversationInnerUser.js +70 -0
  54. package/dist/models/GetConversations200ResponseConversationInnerUserContext.d.ts +58 -0
  55. package/dist/models/GetConversations200ResponseConversationInnerUserContext.js +69 -0
  56. package/dist/models/GetFloorInformation200Response.d.ts +3 -1
  57. package/dist/models/GetFloorInformation200Response.js +3 -1
  58. package/dist/models/GetRecentEvents200Response.d.ts +3 -1
  59. package/dist/models/GetRecentEvents200Response.js +3 -1
  60. package/dist/models/GetRecentEvents200ResponseItemsInner.d.ts +3 -1
  61. package/dist/models/GetRecentEvents200ResponseItemsInner.js +3 -1
  62. package/dist/models/GetRecentEvents200ResponseItemsInnerAuthor.d.ts +3 -1
  63. package/dist/models/GetRecentEvents200ResponseItemsInnerAuthor.js +3 -1
  64. package/dist/models/GetRecentEvents400Response.d.ts +3 -1
  65. package/dist/models/GetRecentEvents400Response.js +3 -1
  66. package/dist/models/GetRecentEvents400ResponseError.d.ts +3 -1
  67. package/dist/models/GetRecentEvents400ResponseError.js +3 -1
  68. package/dist/models/Media.d.ts +3 -1
  69. package/dist/models/Media.js +3 -1
  70. package/dist/models/Model400ErrorCode.d.ts +3 -1
  71. package/dist/models/Model400ErrorCode.js +3 -1
  72. package/dist/models/PostAdd.d.ts +58 -0
  73. package/dist/models/PostAdd.js +69 -0
  74. package/dist/models/Query422Response.d.ts +3 -1
  75. package/dist/models/Query422Response.js +3 -1
  76. package/dist/models/Query422ResponseError.d.ts +3 -1
  77. package/dist/models/Query422ResponseError.js +3 -1
  78. package/dist/models/QueryRequest.d.ts +4 -2
  79. package/dist/models/QueryRequest.js +6 -2
  80. package/dist/models/QueryRequestFilters.d.ts +3 -1
  81. package/dist/models/QueryRequestFilters.js +3 -1
  82. package/dist/models/QueryResponse.d.ts +3 -1
  83. package/dist/models/QueryResponse.js +3 -1
  84. package/dist/models/QueryResponseItemsInner.d.ts +3 -1
  85. package/dist/models/QueryResponseItemsInner.js +3 -1
  86. package/dist/models/ResetPassword200Response.d.ts +3 -1
  87. package/dist/models/ResetPassword200Response.js +3 -1
  88. package/dist/models/ResetPassword400Response.d.ts +3 -1
  89. package/dist/models/ResetPassword400Response.js +3 -1
  90. package/dist/models/SendSignInValidationCode200Response.d.ts +46 -0
  91. package/dist/models/SendSignInValidationCode200Response.js +59 -0
  92. package/dist/models/SendValidationCode200Response.d.ts +3 -1
  93. package/dist/models/SendValidationCode200Response.js +3 -1
  94. package/dist/models/SendValidationCodeRequest.d.ts +3 -1
  95. package/dist/models/SendValidationCodeRequest.js +3 -1
  96. package/dist/models/SignInWithEmail200Response.d.ts +3 -1
  97. package/dist/models/SignInWithEmail200Response.js +3 -1
  98. package/dist/models/SignInWithEmail200ResponsePodInfo.d.ts +3 -1
  99. package/dist/models/SignInWithEmail200ResponsePodInfo.js +3 -1
  100. package/dist/models/SignInWithEmail200ResponseProfile.d.ts +3 -1
  101. package/dist/models/SignInWithEmail200ResponseProfile.js +3 -1
  102. package/dist/models/SignInWithEmail200ResponseProfileAvatar.d.ts +3 -1
  103. package/dist/models/SignInWithEmail200ResponseProfileAvatar.js +3 -1
  104. package/dist/models/SignUp200Response.d.ts +3 -1
  105. package/dist/models/SignUp200Response.js +3 -1
  106. package/dist/models/SignUpResponse.d.ts +3 -1
  107. package/dist/models/SignUpResponse.js +3 -1
  108. package/dist/models/Threads.d.ts +46 -0
  109. package/dist/models/Threads.js +61 -0
  110. package/dist/models/UserDetails.d.ts +3 -1
  111. package/dist/models/UserDetails.js +3 -1
  112. package/dist/models/ValidateCode400Response.d.ts +3 -1
  113. package/dist/models/ValidateCode400Response.js +3 -1
  114. package/dist/models/ValidateCode400ResponseError.d.ts +3 -1
  115. package/dist/models/ValidateCode400ResponseError.js +3 -1
  116. package/dist/models/ValidateCode412Response.d.ts +3 -1
  117. package/dist/models/ValidateCode412Response.js +3 -1
  118. package/dist/models/ValidateCodeRequest.d.ts +3 -1
  119. package/dist/models/ValidateCodeRequest.js +3 -1
  120. package/dist/models/index.d.ts +16 -0
  121. package/dist/models/index.js +16 -0
  122. package/dist/runtime.d.ts +3 -1
  123. package/dist/runtime.js +3 -1
  124. package/package.json +1 -1
@@ -3,7 +3,9 @@
3
3
  /* eslint-disable */
4
4
  /**
5
5
  * Floor Memory
6
- * The set APIs are used to develop Floor pds which can be used as their personal assistants. This set of APIs are divided into two parts. - Memory and - Registration. The developer has two ways of using the APIs for the app development. Developer can choose to the Registration APIs for using the existing xfloor infracture or can implement custom Registration process. In the case of custom registration process, the developer is bound to provide proper authentication mechanisms and then send the user information to xlfoor.
6
+ * The set APIs are used to develop Floor pds which can be used as their personal assistants. This set of APIs are divided into two parts.
7
+ * - Memory and
8
+ * - Registration. The developer has two ways of using the APIs for the app development. Developer can choose to the Registration APIs for using the existing xfloor infracture or can implement custom Registration process. In the case of custom registration process, the developer is bound to provide proper authentication mechanisms and then send the user information to xlfoor.
7
9
  *
8
10
  * The version of the OpenAPI document: 1.0.0
9
11
  * Contact: contact@ipomo.in
@@ -75,6 +77,140 @@ var DefaultApi = /** @class */ (function (_super) {
75
77
  function DefaultApi() {
76
78
  return _super !== null && _super.apply(this, arguments) || this;
77
79
  }
80
+ /**
81
+ * Create a custom app using APIs. A 13 digit app ID gets created which takes title and description the app. An icon of specified size needs to be uploaded.
82
+ * Create App
83
+ */
84
+ DefaultApi.prototype.apiDeveloperCreateAppPostRaw = function (requestParameters, initOverrides) {
85
+ return __awaiter(this, void 0, void 0, function () {
86
+ var queryParameters, headerParameters, consumes, canConsumeForm, formParams, useForm, urlPath, response;
87
+ return __generator(this, function (_a) {
88
+ switch (_a.label) {
89
+ case 0:
90
+ if (requestParameters['inputInfo'] == null) {
91
+ throw new runtime.RequiredError('inputInfo', 'Required parameter "inputInfo" was null or undefined when calling apiDeveloperCreateAppPost().');
92
+ }
93
+ queryParameters = {};
94
+ headerParameters = {};
95
+ consumes = [
96
+ { contentType: 'multipart/form-data' },
97
+ ];
98
+ canConsumeForm = runtime.canConsumeForm(consumes);
99
+ useForm = false;
100
+ // use FormData to transmit files using content-type "multipart/form-data"
101
+ useForm = canConsumeForm;
102
+ if (useForm) {
103
+ formParams = new FormData();
104
+ }
105
+ else {
106
+ formParams = new URLSearchParams();
107
+ }
108
+ if (requestParameters['inputInfo'] != null) {
109
+ formParams.append('input_info', requestParameters['inputInfo']);
110
+ }
111
+ if (requestParameters['icon'] != null) {
112
+ formParams.append('icon', requestParameters['icon']);
113
+ }
114
+ urlPath = "/api/developer/create/app";
115
+ return [4 /*yield*/, this.request({
116
+ path: urlPath,
117
+ method: 'POST',
118
+ headers: headerParameters,
119
+ query: queryParameters,
120
+ body: formParams,
121
+ }, initOverrides)];
122
+ case 1:
123
+ response = _a.sent();
124
+ return [2 /*return*/, new runtime.JSONApiResponse(response)];
125
+ }
126
+ });
127
+ });
128
+ };
129
+ /**
130
+ * Create a custom app using APIs. A 13 digit app ID gets created which takes title and description the app. An icon of specified size needs to be uploaded.
131
+ * Create App
132
+ */
133
+ DefaultApi.prototype.apiDeveloperCreateAppPost = function (requestParameters, initOverrides) {
134
+ return __awaiter(this, void 0, void 0, function () {
135
+ var response;
136
+ return __generator(this, function (_a) {
137
+ switch (_a.label) {
138
+ case 0: return [4 /*yield*/, this.apiDeveloperCreateAppPostRaw(requestParameters, initOverrides)];
139
+ case 1:
140
+ response = _a.sent();
141
+ return [4 /*yield*/, response.value()];
142
+ case 2: return [2 /*return*/, _a.sent()];
143
+ }
144
+ });
145
+ });
146
+ };
147
+ /**
148
+ * Modify title, details or the app icon
149
+ * Modify Floorpod App
150
+ */
151
+ DefaultApi.prototype.apiDeveloperModifyAppPostRaw = function (requestParameters, initOverrides) {
152
+ return __awaiter(this, void 0, void 0, function () {
153
+ var queryParameters, headerParameters, consumes, canConsumeForm, formParams, useForm, urlPath, response;
154
+ return __generator(this, function (_a) {
155
+ switch (_a.label) {
156
+ case 0:
157
+ if (requestParameters['inputInfo'] == null) {
158
+ throw new runtime.RequiredError('inputInfo', 'Required parameter "inputInfo" was null or undefined when calling apiDeveloperModifyAppPost().');
159
+ }
160
+ queryParameters = {};
161
+ headerParameters = {};
162
+ consumes = [
163
+ { contentType: 'multipart/form-data' },
164
+ ];
165
+ canConsumeForm = runtime.canConsumeForm(consumes);
166
+ useForm = false;
167
+ // use FormData to transmit files using content-type "multipart/form-data"
168
+ useForm = canConsumeForm;
169
+ if (useForm) {
170
+ formParams = new FormData();
171
+ }
172
+ else {
173
+ formParams = new URLSearchParams();
174
+ }
175
+ if (requestParameters['inputInfo'] != null) {
176
+ formParams.append('input_info', requestParameters['inputInfo']);
177
+ }
178
+ if (requestParameters['file'] != null) {
179
+ formParams.append('file', requestParameters['file']);
180
+ }
181
+ urlPath = "/api/developer/modify/app";
182
+ return [4 /*yield*/, this.request({
183
+ path: urlPath,
184
+ method: 'POST',
185
+ headers: headerParameters,
186
+ query: queryParameters,
187
+ body: formParams,
188
+ }, initOverrides)];
189
+ case 1:
190
+ response = _a.sent();
191
+ return [2 /*return*/, new runtime.JSONApiResponse(response)];
192
+ }
193
+ });
194
+ });
195
+ };
196
+ /**
197
+ * Modify title, details or the app icon
198
+ * Modify Floorpod App
199
+ */
200
+ DefaultApi.prototype.apiDeveloperModifyAppPost = function (requestParameters, initOverrides) {
201
+ return __awaiter(this, void 0, void 0, function () {
202
+ var response;
203
+ return __generator(this, function (_a) {
204
+ switch (_a.label) {
205
+ case 0: return [4 /*yield*/, this.apiDeveloperModifyAppPostRaw(requestParameters, initOverrides)];
206
+ case 1:
207
+ response = _a.sent();
208
+ return [4 /*yield*/, response.value()];
209
+ case 2: return [2 /*return*/, _a.sent()];
210
+ }
211
+ });
212
+ });
213
+ };
78
214
  /**
79
215
  * Updates the email ID associated with an existing user account after validating a one-time activation code sent to the **new email address**. This operation can only be performed by a **logged-in user**. When a user initiates an email change, an activation code is sent to the newly provided email ID. The email update takes effect only after the activation code is successfully validated. If the activation code validation fails, the email ID remains unchanged. --- ### **Authentication** This endpoint requires **Bearer Token authentication**. ``` Authorization: Bearer <access_token> ``` --- ### **Request Body** ```json { \"user_id\": \"string\", \"new_email_id\": \"string\", \"activation_code\": \"string\", \"app_id\":\"string\" } ``` **Field Description** * `user_id` – Unique identifier of the logged-in user * `new_email_id` – New email address to be associated with the account * `activation_code` – One-time activation code sent to the new email ID for verification --- ### **Flow Summary** 1. User is authenticated and logged in 2. User requests to change email ID 3. System sends an activation code to the **new email address** 4. User submits the activation code via this API 5. On successful validation, the email ID is updated --- ### **Successful Response** On successful validation: * The activation code is verified * The user’s email ID is updated immediately * A `success` string is returned confirming the email change --- ### **Error Response** The API returns an error response if: * The activation code is invalid or expired * The activation code does not match the user or email * The new email ID is already in use * Authorization fails or the bearer token is missing or invalid In all error cases, the existing email ID remains unchanged. --- ### **Behavior Notes** * Requires a prior call to `/auth-service/send/validation/code` with the proper mode. --- ### **Security Notes (Recommended)** * Activation codes are single-use and time-bound * Email changes require prior authentication * Rate limiting may be applied to prevent abuse --- ### **One-Line Summary** > Changes a user’s email ID after validating an activation code sent to the new email address.
80
216
  * Change email ID
@@ -293,6 +429,133 @@ var DefaultApi = /** @class */ (function (_super) {
293
429
  });
294
430
  });
295
431
  };
432
+ /**
433
+ * ### Conversation Model - A **Thread** represents a single conversational context. - A **Conversation** is the ordered exchange of messages within a thread. - Threads are scoped per user and per floor. This API retrieves the list of **conversational threads** associated with a specific **user** within a specific **floor**. A **thread** represents a persistent conversation context between the user and the system (agent/assistant) inside a floor. Each thread maintains its own history and state, allowing users to resume previous conversations without losing context. The API returns **only thread metadata**, not the message content itself. This makes it suitable for: * Displaying a conversation list or sidebar * Allowing users to select and resume past conversations * Managing conversational memory per floor --- ## Key Concepts * **Thread**: A long-lived conversational context tied to a user and a floor * **Floor-scoped memory**: Conversations are isolated per floor; threads from one floor are not visible in another * **User-specific**: Threads are private to the requesting user --- ## Request Method `GET` --- ## Request Parameters (Query Parameters) | Parameter Name | Type | Required | Description | | -------------- | ------ | -------- | ---------------------------------------------------------------------------- | | `user_id` | String | **Yes** | Unique identifier of the user whose conversation threads are being requested | | `floor_id` | String | **Yes** | Identifier of the floor in which the conversations exist | --- ## Authorization & Access Rules * The caller must be authenticated as the given `user_id` * A user can retrieve **only their own threads** * Threads are scoped to the provided `floor_id` * Threads from other floors or other users are not accessible --- ## Response Format `application/json` --- ## Response Description The response contains: * The `user_id` for which threads were fetched * A list of thread metadata objects, sorted by **most recently updated first** --- ## Response Structure ### Top-Level Fields | Field | Type | Description | | --------- | ------ | ------------------------------------------------------------------------- | | `user_id` | String | Identifier of the user | | `threads` | Array | List of conversation threads belonging to the user in the specified floor | --- ### Thread Object (`threads[]`) | Field | Type | Description | | -------------- | ------------------- | ------------------------------------------------- | | `thread_id` | String | Unique identifier of the conversation thread | | `title` | String | Human-readable title summarizing the conversation | | `last_updated` | String (YYYY-MM-DD) | Date when the thread was last updated | --- ## Sample Success Response ```json { \"user_id\": \"59\", \"threads\": [ { \"thread_id\": \"55\", \"title\": \"elegant potentially hopelessly ambitious sneak\", \"last_updated\": \"2025-04-26\" }, { \"thread_id\": \"79\", \"title\": \"sans profitable alienated by even overstay miserly practical\", \"last_updated\": \"2025-04-24\" }, { \"thread_id\": \"89\", \"title\": \"although light uh-huh despite instead vol sorrowful\", \"last_updated\": \"2025-02-16\" } ] } ``` --- ## Typical Use Cases * Show a **list of past conversations** in a chat UI * Allow users to **resume a previous thread** * Display conversation history grouped by floor * Build agent dashboards with user-specific memory --- ## Notes * This API returns **metadata only**; message history is retrieved using a separate thread-messages API * If no threads exist, the `threads` array will be empty * Thread titles may be system-generated or user-editable depending on implementation --- ## Common Error Responses (Examples) ### Missing Parameters ```json { \"status\": \"ERROR\", \"message\": \"user_id and floor_id are required\" } ``` ### Unauthorised Access ```json { \"status\": \"ERROR\", \"message\": \"Unauthorized access to conversation threads\" } ```
434
+ * Get the conversational threads
435
+ */
436
+ DefaultApi.prototype.conversationThreadsRaw = function (requestParameters, initOverrides) {
437
+ return __awaiter(this, void 0, void 0, function () {
438
+ var queryParameters, headerParameters, token, tokenString, urlPath, response;
439
+ return __generator(this, function (_a) {
440
+ switch (_a.label) {
441
+ case 0:
442
+ if (requestParameters['userId'] == null) {
443
+ throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling conversationThreads().');
444
+ }
445
+ if (requestParameters['floorId'] == null) {
446
+ throw new runtime.RequiredError('floorId', 'Required parameter "floorId" was null or undefined when calling conversationThreads().');
447
+ }
448
+ queryParameters = {};
449
+ if (requestParameters['userId'] != null) {
450
+ queryParameters['user_id'] = requestParameters['userId'];
451
+ }
452
+ if (requestParameters['floorId'] != null) {
453
+ queryParameters['floor_id'] = requestParameters['floorId'];
454
+ }
455
+ headerParameters = {};
456
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
457
+ token = this.configuration.accessToken;
458
+ return [4 /*yield*/, token("bearer", [])];
459
+ case 1:
460
+ tokenString = _a.sent();
461
+ if (tokenString) {
462
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
463
+ }
464
+ _a.label = 2;
465
+ case 2:
466
+ urlPath = "/agent/memory/threads";
467
+ return [4 /*yield*/, this.request({
468
+ path: urlPath,
469
+ method: 'GET',
470
+ headers: headerParameters,
471
+ query: queryParameters,
472
+ }, initOverrides)];
473
+ case 3:
474
+ response = _a.sent();
475
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ConversationThreads200ResponseFromJSON)(jsonValue); })];
476
+ }
477
+ });
478
+ });
479
+ };
480
+ /**
481
+ * ### Conversation Model - A **Thread** represents a single conversational context. - A **Conversation** is the ordered exchange of messages within a thread. - Threads are scoped per user and per floor. This API retrieves the list of **conversational threads** associated with a specific **user** within a specific **floor**. A **thread** represents a persistent conversation context between the user and the system (agent/assistant) inside a floor. Each thread maintains its own history and state, allowing users to resume previous conversations without losing context. The API returns **only thread metadata**, not the message content itself. This makes it suitable for: * Displaying a conversation list or sidebar * Allowing users to select and resume past conversations * Managing conversational memory per floor --- ## Key Concepts * **Thread**: A long-lived conversational context tied to a user and a floor * **Floor-scoped memory**: Conversations are isolated per floor; threads from one floor are not visible in another * **User-specific**: Threads are private to the requesting user --- ## Request Method `GET` --- ## Request Parameters (Query Parameters) | Parameter Name | Type | Required | Description | | -------------- | ------ | -------- | ---------------------------------------------------------------------------- | | `user_id` | String | **Yes** | Unique identifier of the user whose conversation threads are being requested | | `floor_id` | String | **Yes** | Identifier of the floor in which the conversations exist | --- ## Authorization & Access Rules * The caller must be authenticated as the given `user_id` * A user can retrieve **only their own threads** * Threads are scoped to the provided `floor_id` * Threads from other floors or other users are not accessible --- ## Response Format `application/json` --- ## Response Description The response contains: * The `user_id` for which threads were fetched * A list of thread metadata objects, sorted by **most recently updated first** --- ## Response Structure ### Top-Level Fields | Field | Type | Description | | --------- | ------ | ------------------------------------------------------------------------- | | `user_id` | String | Identifier of the user | | `threads` | Array | List of conversation threads belonging to the user in the specified floor | --- ### Thread Object (`threads[]`) | Field | Type | Description | | -------------- | ------------------- | ------------------------------------------------- | | `thread_id` | String | Unique identifier of the conversation thread | | `title` | String | Human-readable title summarizing the conversation | | `last_updated` | String (YYYY-MM-DD) | Date when the thread was last updated | --- ## Sample Success Response ```json { \"user_id\": \"59\", \"threads\": [ { \"thread_id\": \"55\", \"title\": \"elegant potentially hopelessly ambitious sneak\", \"last_updated\": \"2025-04-26\" }, { \"thread_id\": \"79\", \"title\": \"sans profitable alienated by even overstay miserly practical\", \"last_updated\": \"2025-04-24\" }, { \"thread_id\": \"89\", \"title\": \"although light uh-huh despite instead vol sorrowful\", \"last_updated\": \"2025-02-16\" } ] } ``` --- ## Typical Use Cases * Show a **list of past conversations** in a chat UI * Allow users to **resume a previous thread** * Display conversation history grouped by floor * Build agent dashboards with user-specific memory --- ## Notes * This API returns **metadata only**; message history is retrieved using a separate thread-messages API * If no threads exist, the `threads` array will be empty * Thread titles may be system-generated or user-editable depending on implementation --- ## Common Error Responses (Examples) ### Missing Parameters ```json { \"status\": \"ERROR\", \"message\": \"user_id and floor_id are required\" } ``` ### Unauthorised Access ```json { \"status\": \"ERROR\", \"message\": \"Unauthorized access to conversation threads\" } ```
482
+ * Get the conversational threads
483
+ */
484
+ DefaultApi.prototype.conversationThreads = function (requestParameters, initOverrides) {
485
+ return __awaiter(this, void 0, void 0, function () {
486
+ var response;
487
+ return __generator(this, function (_a) {
488
+ switch (_a.label) {
489
+ case 0: return [4 /*yield*/, this.conversationThreadsRaw(requestParameters, initOverrides)];
490
+ case 1:
491
+ response = _a.sent();
492
+ return [4 /*yield*/, response.value()];
493
+ case 2: return [2 /*return*/, _a.sent()];
494
+ }
495
+ });
496
+ });
497
+ };
498
+ /**
499
+ * This API returns the **full conversation history** for a specific **thread** belonging to a user within a floor. A **thread** represents a persistent conversation session. Each item in the returned `conversation` array contains: * The **user request payload** (user query + context) * The **assistant response payload** (full LLM completion object) * The **retrieval trace** (metadata of posts fetched/used for the answer, including scores and identifiers) This endpoint is intended for **developers** building custom conversational UIs and tooling that require: * Full conversation replay * Debug visibility into the assistant output object (`choices`, model info, etc.) * RAG explainability via `fetch_multiple_posts.results[]` --- ## Request Method `GET` --- ## Query Parameters | Parameter | Type | Required | Description | | ----------- | ------ | -------- | --------------------------------------------------------------------------- | | `user_id` | String | **Yes** | Owner of the conversation thread. The thread must belong to this user. | | `floor_id` | String | **Yes** | Floor identifier in which the thread exists. Threads are scoped to a floor. | | `thread_id` | String | **Yes** | Thread identifier whose conversations should be returned. | --- ## Authorization & Access Rules * The caller must be authenticated as the given `user_id` (or have equivalent developer/system permission). * A user can access **only their own threads**. * Cross-user or cross-floor access must be rejected. --- ## Response Format `application/json` --- ## Response Description Returns the thread-level conversation payload: * `user_id`: the user who owns the thread * `thread_id`: the requested thread * `conversation`: ordered list of conversation entries (each entry = user object + assistant object) --- ## Response Schema ### Top-Level Fields | Field | Type | Description | | -------------- | ------ | ---------------------------- | | `user_id` | String | Owner of the thread | | `thread_id` | String | Thread identifier | | `conversation` | Array | List of conversation entries | --- ## `conversation[]` Entry Structure Each entry contains two objects: `user` and `assistant`. --- ### `user` Object | Field | Type | Description | | ------------------ | ------ | ------------------------------------------------------------------- | | `context` | Object | Context used when processing the query (floor metadata, mode, etc.) | | `user_query` | String | The user’s query message | | `user_id` | String | User identifier (should match top-level `user_id`) | | `user_thread` | String | Thread identifier (should match top-level `thread_id`) | | `recorded_content` | String | Persisted user content (often same as `user_query`) | #### `user.context` | Field | Type | Description | | ---------------- | ------ | ---------------------------------------------- | | `floor_id` | String | Floor UID/slug where the conversation occurred | | `title` | String | Floor title at the time of the query | | `fid` | String | Immutable internal floor ID | | `floor_category` | String | Floor category identifier | | `floor_mode` | String | Floor mode indicator (example: `\"1\"`) | --- ### `assistant` Object This contains the **full completion response** plus retrieval details. | Field | Type | Description | | ---------------------- | ------ | --------------------------------------------------- | | `id` | String | Completion id (e.g., `chatcmpl-*`) | | `object` | String | Response type (e.g., `chat.completion`) | | `created` | Number | Timestamp when response was created (epoch seconds) | | `floor_mode` | String | Floor mode applied for generation | | `model` | String | Model identifier used | | `choices` | Array | Generated outputs and metadata | | `fetch_multiple_posts` | Object | Retrieval trace (if retrieval was performed) | | `content_type` | String | Retrieved content type (e.g., `post`) | --- ## `assistant.choices[]` | Field | Type | Description | | ------------------ | ------ | -------------------------------------------------------------------------- | | `index` | Number | Choice index | | `message` | Object | Assistant message content | | `finish_reason` | String | Why generation stopped (`stop`, `length`, etc.) | | `ai_model_details` | Object | Model runtime parameters (temperature, top_p, max_tokens, penalties, etc.) | | `prompt_details` | Object | Prompt configuration used (system prompt, system_prompt_id, etc.) | > **Note:** `prompt_details.system_prompt` may be large and is returned as-is for developer inspection. --- ## `assistant.fetch_multiple_posts` Describes the retrieval operation performed for the query. | Field | Type | Description | | -------------- | ------ | -------------------------------------- | | `content_type` | String | Type of retrieved content (`post`) | | `query` | String | Query used for retrieval | | `status` | String | Retrieval status (`success`, `failed`) | | `message` | String | Retrieval message | | `results` | Array | List of matched posts and metadata | --- ## `assistant.fetch_multiple_posts.results[]` | Field | Type | Description | | ------------ | ------ | ----------------------------------------------------------------- | | `from_floor` | String | Indicates source floor relation (e.g., same floor / linked floor) | | `content` | String | Raw JSON string of the matched post metadata/content | | `author` | String | Author id of the matched post | | `block_type` | Number | Block type of the matched post | | `pid` | String | Post/document id | | `bid` | String | Block id containing the post | | `fid` | String | Floor internal id where the post belongs | | `score` | Number | Similarity score | | `match_type` | String | Match type (`text`, etc.) | --- ## Sample Success Response Your provided payload is the canonical example. It includes: * the user query and floor context * the full assistant completion object * the full retrieval results with post metadata * the response shown covers a few important items. --- ## Common Error Responses ### Missing Parameters ```json { \"status\": \"ERROR\", \"message\": \"user_id, floor_id, and thread_id are required\" } ``` ### Unauthorized Access ```json { \"status\": \"ERROR\", \"message\": \"Unauthorized access to thread\" } ``` ### Thread Not Found ```json { \"status\": \"ERROR\", \"message\": \"Thread not found\" } ``` --- ## Developer Notes (Important) * The `content` field inside retrieval results is a **stringified JSON**. Developers may parse it to access fields such as `post_title`, `post_details`, etc. * `choices` may contain multiple outputs depending on backend configuration. * This API returns a “full debug payload” suitable for developers. If you later create a lightweight UI endpoint, it should strip execution details and return only `user_query`, `assistant.content`, and curated post references.
500
+ * Conversations
501
+ */
502
+ DefaultApi.prototype.getConversationsRaw = function (requestParameters, initOverrides) {
503
+ return __awaiter(this, void 0, void 0, function () {
504
+ var queryParameters, headerParameters, token, tokenString, urlPath, response;
505
+ return __generator(this, function (_a) {
506
+ switch (_a.label) {
507
+ case 0:
508
+ queryParameters = {};
509
+ if (requestParameters['userId'] != null) {
510
+ queryParameters['user_id'] = requestParameters['userId'];
511
+ }
512
+ if (requestParameters['threadId'] != null) {
513
+ queryParameters['thread_id'] = requestParameters['threadId'];
514
+ }
515
+ headerParameters = {};
516
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
517
+ token = this.configuration.accessToken;
518
+ return [4 /*yield*/, token("bearer", [])];
519
+ case 1:
520
+ tokenString = _a.sent();
521
+ if (tokenString) {
522
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
523
+ }
524
+ _a.label = 2;
525
+ case 2:
526
+ urlPath = "/agent/memory/conversations";
527
+ return [4 /*yield*/, this.request({
528
+ path: urlPath,
529
+ method: 'GET',
530
+ headers: headerParameters,
531
+ query: queryParameters,
532
+ }, initOverrides)];
533
+ case 3:
534
+ response = _a.sent();
535
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GetConversations200ResponseFromJSON)(jsonValue); })];
536
+ }
537
+ });
538
+ });
539
+ };
540
+ /**
541
+ * This API returns the **full conversation history** for a specific **thread** belonging to a user within a floor. A **thread** represents a persistent conversation session. Each item in the returned `conversation` array contains: * The **user request payload** (user query + context) * The **assistant response payload** (full LLM completion object) * The **retrieval trace** (metadata of posts fetched/used for the answer, including scores and identifiers) This endpoint is intended for **developers** building custom conversational UIs and tooling that require: * Full conversation replay * Debug visibility into the assistant output object (`choices`, model info, etc.) * RAG explainability via `fetch_multiple_posts.results[]` --- ## Request Method `GET` --- ## Query Parameters | Parameter | Type | Required | Description | | ----------- | ------ | -------- | --------------------------------------------------------------------------- | | `user_id` | String | **Yes** | Owner of the conversation thread. The thread must belong to this user. | | `floor_id` | String | **Yes** | Floor identifier in which the thread exists. Threads are scoped to a floor. | | `thread_id` | String | **Yes** | Thread identifier whose conversations should be returned. | --- ## Authorization & Access Rules * The caller must be authenticated as the given `user_id` (or have equivalent developer/system permission). * A user can access **only their own threads**. * Cross-user or cross-floor access must be rejected. --- ## Response Format `application/json` --- ## Response Description Returns the thread-level conversation payload: * `user_id`: the user who owns the thread * `thread_id`: the requested thread * `conversation`: ordered list of conversation entries (each entry = user object + assistant object) --- ## Response Schema ### Top-Level Fields | Field | Type | Description | | -------------- | ------ | ---------------------------- | | `user_id` | String | Owner of the thread | | `thread_id` | String | Thread identifier | | `conversation` | Array | List of conversation entries | --- ## `conversation[]` Entry Structure Each entry contains two objects: `user` and `assistant`. --- ### `user` Object | Field | Type | Description | | ------------------ | ------ | ------------------------------------------------------------------- | | `context` | Object | Context used when processing the query (floor metadata, mode, etc.) | | `user_query` | String | The user’s query message | | `user_id` | String | User identifier (should match top-level `user_id`) | | `user_thread` | String | Thread identifier (should match top-level `thread_id`) | | `recorded_content` | String | Persisted user content (often same as `user_query`) | #### `user.context` | Field | Type | Description | | ---------------- | ------ | ---------------------------------------------- | | `floor_id` | String | Floor UID/slug where the conversation occurred | | `title` | String | Floor title at the time of the query | | `fid` | String | Immutable internal floor ID | | `floor_category` | String | Floor category identifier | | `floor_mode` | String | Floor mode indicator (example: `\"1\"`) | --- ### `assistant` Object This contains the **full completion response** plus retrieval details. | Field | Type | Description | | ---------------------- | ------ | --------------------------------------------------- | | `id` | String | Completion id (e.g., `chatcmpl-*`) | | `object` | String | Response type (e.g., `chat.completion`) | | `created` | Number | Timestamp when response was created (epoch seconds) | | `floor_mode` | String | Floor mode applied for generation | | `model` | String | Model identifier used | | `choices` | Array | Generated outputs and metadata | | `fetch_multiple_posts` | Object | Retrieval trace (if retrieval was performed) | | `content_type` | String | Retrieved content type (e.g., `post`) | --- ## `assistant.choices[]` | Field | Type | Description | | ------------------ | ------ | -------------------------------------------------------------------------- | | `index` | Number | Choice index | | `message` | Object | Assistant message content | | `finish_reason` | String | Why generation stopped (`stop`, `length`, etc.) | | `ai_model_details` | Object | Model runtime parameters (temperature, top_p, max_tokens, penalties, etc.) | | `prompt_details` | Object | Prompt configuration used (system prompt, system_prompt_id, etc.) | > **Note:** `prompt_details.system_prompt` may be large and is returned as-is for developer inspection. --- ## `assistant.fetch_multiple_posts` Describes the retrieval operation performed for the query. | Field | Type | Description | | -------------- | ------ | -------------------------------------- | | `content_type` | String | Type of retrieved content (`post`) | | `query` | String | Query used for retrieval | | `status` | String | Retrieval status (`success`, `failed`) | | `message` | String | Retrieval message | | `results` | Array | List of matched posts and metadata | --- ## `assistant.fetch_multiple_posts.results[]` | Field | Type | Description | | ------------ | ------ | ----------------------------------------------------------------- | | `from_floor` | String | Indicates source floor relation (e.g., same floor / linked floor) | | `content` | String | Raw JSON string of the matched post metadata/content | | `author` | String | Author id of the matched post | | `block_type` | Number | Block type of the matched post | | `pid` | String | Post/document id | | `bid` | String | Block id containing the post | | `fid` | String | Floor internal id where the post belongs | | `score` | Number | Similarity score | | `match_type` | String | Match type (`text`, etc.) | --- ## Sample Success Response Your provided payload is the canonical example. It includes: * the user query and floor context * the full assistant completion object * the full retrieval results with post metadata * the response shown covers a few important items. --- ## Common Error Responses ### Missing Parameters ```json { \"status\": \"ERROR\", \"message\": \"user_id, floor_id, and thread_id are required\" } ``` ### Unauthorized Access ```json { \"status\": \"ERROR\", \"message\": \"Unauthorized access to thread\" } ``` ### Thread Not Found ```json { \"status\": \"ERROR\", \"message\": \"Thread not found\" } ``` --- ## Developer Notes (Important) * The `content` field inside retrieval results is a **stringified JSON**. Developers may parse it to access fields such as `post_title`, `post_details`, etc. * `choices` may contain multiple outputs depending on backend configuration. * This API returns a “full debug payload” suitable for developers. If you later create a lightweight UI endpoint, it should strip execution details and return only `user_query`, `assistant.content`, and curated post references.
542
+ * Conversations
543
+ */
544
+ DefaultApi.prototype.getConversations = function () {
545
+ return __awaiter(this, arguments, void 0, function (requestParameters, initOverrides) {
546
+ var response;
547
+ if (requestParameters === void 0) { requestParameters = {}; }
548
+ return __generator(this, function (_a) {
549
+ switch (_a.label) {
550
+ case 0: return [4 /*yield*/, this.getConversationsRaw(requestParameters, initOverrides)];
551
+ case 1:
552
+ response = _a.sent();
553
+ return [4 /*yield*/, response.value()];
554
+ case 2: return [2 /*return*/, _a.sent()];
555
+ }
556
+ });
557
+ });
558
+ };
296
559
  /**
297
560
  * 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).
298
561
  * Make floor Private
@@ -303,6 +566,15 @@ var DefaultApi = /** @class */ (function (_super) {
303
566
  return __generator(this, function (_a) {
304
567
  switch (_a.label) {
305
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
+ }
306
578
  queryParameters = {};
307
579
  if (requestParameters['floorId'] != null) {
308
580
  queryParameters['floor_id'] = requestParameters['floorId'];
@@ -342,10 +614,9 @@ var DefaultApi = /** @class */ (function (_super) {
342
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).
343
615
  * Make floor Private
344
616
  */
345
- DefaultApi.prototype.makeFloorPrivate = function () {
346
- 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 () {
347
619
  var response;
348
- if (requestParameters === void 0) { requestParameters = {}; }
349
620
  return __generator(this, function (_a) {
350
621
  switch (_a.label) {
351
622
  case 0: return [4 /*yield*/, this.makeFloorPrivateRaw(requestParameters, initOverrides)];
@@ -367,6 +638,15 @@ var DefaultApi = /** @class */ (function (_super) {
367
638
  return __generator(this, function (_a) {
368
639
  switch (_a.label) {
369
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
+ }
370
650
  queryParameters = {};
371
651
  if (requestParameters['floorId'] != null) {
372
652
  queryParameters['floor_id'] = requestParameters['floorId'];
@@ -406,10 +686,9 @@ var DefaultApi = /** @class */ (function (_super) {
406
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.”**
407
687
  * Make floor public
408
688
  */
409
- DefaultApi.prototype.makeFloorPublic = function () {
410
- 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 () {
411
691
  var response;
412
- if (requestParameters === void 0) { requestParameters = {}; }
413
692
  return __generator(this, function (_a) {
414
693
  switch (_a.label) {
415
694
  case 0: return [4 /*yield*/, this.makeFloorPublicRaw(requestParameters, initOverrides)];
@@ -510,6 +789,18 @@ var DefaultApi = /** @class */ (function (_super) {
510
789
  return __generator(this, function (_a) {
511
790
  switch (_a.label) {
512
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
+ }
513
804
  queryParameters = {};
514
805
  if (requestParameters['userId'] != null) {
515
806
  queryParameters['user_id'] = requestParameters['userId'];
@@ -542,10 +833,9 @@ var DefaultApi = /** @class */ (function (_super) {
542
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.”**
543
834
  * Rename floor
544
835
  */
545
- DefaultApi.prototype.renameFloor = function () {
546
- 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 () {
547
838
  var response;
548
- if (requestParameters === void 0) { requestParameters = {}; }
549
839
  return __generator(this, function (_a) {
550
840
  switch (_a.label) {
551
841
  case 0: return [4 /*yield*/, this.renameFloorRaw(requestParameters, initOverrides)];
@@ -616,6 +906,84 @@ var DefaultApi = /** @class */ (function (_super) {
616
906
  });
617
907
  });
618
908
  };
909
+ /**
910
+ * This API initiates the **sign-in validation process** by sending a **one-time validation code (OTP)** to the user. The OTP is delivered to **either the mobile number or the email address** provided in the request. This endpoint is typically called **before completing sign-in**, to verify that the user owns the supplied contact identifier. The calling application is responsible for: * Collecting the OTP from the user * Submitting it to the OTP verification API (handled separately) --- ## **Use Case** * User attempts to sign in * User provides **mobile number or email** * System sends a **validation code (OTP)** * User enters OTP to complete sign-in --- ## **Request Method** `POST` --- ## **Formdata Parameters** | Parameter Name | Type | Required | Description | | --------------- | ------ | --------- | ------------------------------------------- | | `mobile_number` | String | Optional* | Mobile number to which the OTP will be sent | | `email_id` | String | Optional* | Email address to which the OTP will be sent | | `app_id` | String | Optional | Identifier of the calling application | * **Either `mobile_number` or `email_id` must be provided.** Providing both is allowed; the system may choose one based on configuration. --- ## **Request Rules** * At least **one** of `mobile_number` or `email_id` is mandatory * If both are missing, the request will be rejected * OTP delivery channel depends on the provided identifier --- ## **Response Format** `application/json` --- ## **Sample Success Response** ```json { \"status\": \"SUCCESS\", \"message\": \"Validation code sent successfully\" } ``` --- ## **Sample Error Responses** ### Missing Identifier ```json { \"status\": \"ERROR\", \"message\": \"Either mobile_number or email_id must be provided\" } ``` ### Invalid Identifier ```json { \"status\": \"ERROR\", \"message\": \"Invalid mobile number or email address\" } ``` --- ## **Notes** * This API **only sends** the validation code * OTP verification must be performed using the corresponding **verify validation code** API * Rate limiting and retry restrictions may apply to prevent abuse
911
+ * Send Sign-In Validation Code (OTP)
912
+ */
913
+ DefaultApi.prototype.sendSignInValidationCodeRaw = function (requestParameters, initOverrides) {
914
+ return __awaiter(this, void 0, void 0, function () {
915
+ var queryParameters, headerParameters, token, tokenString, consumes, canConsumeForm, formParams, useForm, urlPath, response;
916
+ return __generator(this, function (_a) {
917
+ switch (_a.label) {
918
+ case 0:
919
+ if (requestParameters['appId'] == null) {
920
+ throw new runtime.RequiredError('appId', 'Required parameter "appId" was null or undefined when calling sendSignInValidationCode().');
921
+ }
922
+ queryParameters = {};
923
+ headerParameters = {};
924
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
925
+ token = this.configuration.accessToken;
926
+ return [4 /*yield*/, token("bearer", [])];
927
+ case 1:
928
+ tokenString = _a.sent();
929
+ if (tokenString) {
930
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
931
+ }
932
+ _a.label = 2;
933
+ case 2:
934
+ consumes = [
935
+ { contentType: 'multipart/form-data' },
936
+ ];
937
+ canConsumeForm = runtime.canConsumeForm(consumes);
938
+ useForm = false;
939
+ if (useForm) {
940
+ formParams = new FormData();
941
+ }
942
+ else {
943
+ formParams = new URLSearchParams();
944
+ }
945
+ if (requestParameters['mobileNumber'] != null) {
946
+ formParams.append('mobile_number', requestParameters['mobileNumber']);
947
+ }
948
+ if (requestParameters['emailId'] != null) {
949
+ formParams.append('email_id', requestParameters['emailId']);
950
+ }
951
+ if (requestParameters['appId'] != null) {
952
+ formParams.append('app_id', requestParameters['appId']);
953
+ }
954
+ urlPath = "/auth-service/send/sign/in/validation/code";
955
+ return [4 /*yield*/, this.request({
956
+ path: urlPath,
957
+ method: 'POST',
958
+ headers: headerParameters,
959
+ query: queryParameters,
960
+ body: formParams,
961
+ }, initOverrides)];
962
+ case 3:
963
+ response = _a.sent();
964
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.SendSignInValidationCode200ResponseFromJSON)(jsonValue); })];
965
+ }
966
+ });
967
+ });
968
+ };
969
+ /**
970
+ * This API initiates the **sign-in validation process** by sending a **one-time validation code (OTP)** to the user. The OTP is delivered to **either the mobile number or the email address** provided in the request. This endpoint is typically called **before completing sign-in**, to verify that the user owns the supplied contact identifier. The calling application is responsible for: * Collecting the OTP from the user * Submitting it to the OTP verification API (handled separately) --- ## **Use Case** * User attempts to sign in * User provides **mobile number or email** * System sends a **validation code (OTP)** * User enters OTP to complete sign-in --- ## **Request Method** `POST` --- ## **Formdata Parameters** | Parameter Name | Type | Required | Description | | --------------- | ------ | --------- | ------------------------------------------- | | `mobile_number` | String | Optional* | Mobile number to which the OTP will be sent | | `email_id` | String | Optional* | Email address to which the OTP will be sent | | `app_id` | String | Optional | Identifier of the calling application | * **Either `mobile_number` or `email_id` must be provided.** Providing both is allowed; the system may choose one based on configuration. --- ## **Request Rules** * At least **one** of `mobile_number` or `email_id` is mandatory * If both are missing, the request will be rejected * OTP delivery channel depends on the provided identifier --- ## **Response Format** `application/json` --- ## **Sample Success Response** ```json { \"status\": \"SUCCESS\", \"message\": \"Validation code sent successfully\" } ``` --- ## **Sample Error Responses** ### Missing Identifier ```json { \"status\": \"ERROR\", \"message\": \"Either mobile_number or email_id must be provided\" } ``` ### Invalid Identifier ```json { \"status\": \"ERROR\", \"message\": \"Invalid mobile number or email address\" } ``` --- ## **Notes** * This API **only sends** the validation code * OTP verification must be performed using the corresponding **verify validation code** API * Rate limiting and retry restrictions may apply to prevent abuse
971
+ * Send Sign-In Validation Code (OTP)
972
+ */
973
+ DefaultApi.prototype.sendSignInValidationCode = function (requestParameters, initOverrides) {
974
+ return __awaiter(this, void 0, void 0, function () {
975
+ var response;
976
+ return __generator(this, function (_a) {
977
+ switch (_a.label) {
978
+ case 0: return [4 /*yield*/, this.sendSignInValidationCodeRaw(requestParameters, initOverrides)];
979
+ case 1:
980
+ response = _a.sent();
981
+ return [4 /*yield*/, response.value()];
982
+ case 2: return [2 /*return*/, _a.sent()];
983
+ }
984
+ });
985
+ });
986
+ };
619
987
  /**
620
988
  * 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.
621
989
  * Send Validation code
@@ -1,6 +1,8 @@
1
1
  /**
2
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. - Memory and - Registration. The developer has two ways of using the APIs for the app development. Developer can choose to the Registration APIs for using the existing xfloor infracture or can implement custom Registration process. In the case of custom registration process, the developer is bound to provide proper authentication mechanisms and then send the user information to xlfoor.
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.
4
6
  *
5
7
  * The version of the OpenAPI document: 1.0.0
6
8
  * Contact: contact@ipomo.in
@@ -3,7 +3,9 @@
3
3
  /* eslint-disable */
4
4
  /**
5
5
  * Floor Memory
6
- * The set APIs are used to develop Floor pds which can be used as their personal assistants. This set of APIs are divided into two parts. - Memory and - Registration. The developer has two ways of using the APIs for the app development. Developer can choose to the Registration APIs for using the existing xfloor infracture or can implement custom Registration process. In the case of custom registration process, the developer is bound to provide proper authentication mechanisms and then send the user information to xlfoor.
6
+ * The set APIs are used to develop Floor pds which can be used as their personal assistants. This set of APIs are divided into two parts.
7
+ * - Memory and
8
+ * - Registration. The developer has two ways of using the APIs for the app development. Developer can choose to the Registration APIs for using the existing xfloor infracture or can implement custom Registration process. In the case of custom registration process, the developer is bound to provide proper authentication mechanisms and then send the user information to xlfoor.
7
9
  *
8
10
  * The version of the OpenAPI document: 1.0.0
9
11
  * Contact: contact@ipomo.in