@xfloor/memory-sdk-js 1.0.1

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 (62) hide show
  1. package/LICENSE +1 -0
  2. package/README.md +220 -0
  3. package/dist/ApiClient.js +701 -0
  4. package/dist/api/DefaultApi.js +734 -0
  5. package/dist/api/EditFloorApi.js +103 -0
  6. package/dist/api/EventApi.js +86 -0
  7. package/dist/api/GetFloorInformationApi.js +89 -0
  8. package/dist/api/GetRecentEventsApi.js +88 -0
  9. package/dist/api/QueryApi.js +81 -0
  10. package/dist/index.js +412 -0
  11. package/dist/model/BlockDetails.js +144 -0
  12. package/dist/model/ChangePassword200Response.js +113 -0
  13. package/dist/model/ConversationThreads200Response.js +144 -0
  14. package/dist/model/ConversationThreads200ResponseThreadsInner.js +140 -0
  15. package/dist/model/EditFloor400Response.js +114 -0
  16. package/dist/model/EditFloor400ResponseError.js +158 -0
  17. package/dist/model/Event400Response.js +114 -0
  18. package/dist/model/Event400ResponseError.js +155 -0
  19. package/dist/model/EventResponse.js +112 -0
  20. package/dist/model/FloorInfo.js +202 -0
  21. package/dist/model/GetConversations200Response.js +158 -0
  22. package/dist/model/GetConversations200ResponseConversationInner.js +105 -0
  23. package/dist/model/GetConversations200ResponseConversationInnerAssistant.js +226 -0
  24. package/dist/model/GetConversations200ResponseConversationInnerAssistantChoicesInner.js +139 -0
  25. package/dist/model/GetConversations200ResponseConversationInnerAssistantChoicesInnerAiModelDetails.js +210 -0
  26. package/dist/model/GetConversations200ResponseConversationInnerAssistantChoicesInnerMessage.js +126 -0
  27. package/dist/model/GetConversations200ResponseConversationInnerAssistantChoicesInnerPromptDetails.js +126 -0
  28. package/dist/model/GetConversations200ResponseConversationInnerAssistantFetchMultiplePosts.js +186 -0
  29. package/dist/model/GetConversations200ResponseConversationInnerAssistantFetchMultiplePostsResultsInner.js +216 -0
  30. package/dist/model/GetConversations200ResponseConversationInnerUser.js +170 -0
  31. package/dist/model/GetConversations200ResponseConversationInnerUserContext.js +168 -0
  32. package/dist/model/GetFloorInformation200Response.js +201 -0
  33. package/dist/model/GetRecentEvents200Response.js +146 -0
  34. package/dist/model/GetRecentEvents200ResponseItemsInner.js +217 -0
  35. package/dist/model/GetRecentEvents200ResponseItemsInnerAuthor.js +131 -0
  36. package/dist/model/GetRecentEvents400Response.js +114 -0
  37. package/dist/model/GetRecentEvents400ResponseError.js +154 -0
  38. package/dist/model/Media.js +128 -0
  39. package/dist/model/Model400ErrorCode.js +158 -0
  40. package/dist/model/PostAdd.js +173 -0
  41. package/dist/model/Query422Response.js +114 -0
  42. package/dist/model/Query422ResponseError.js +113 -0
  43. package/dist/model/QueryRequest.js +196 -0
  44. package/dist/model/QueryRequestFilters.js +159 -0
  45. package/dist/model/QueryResponse.js +124 -0
  46. package/dist/model/QueryResponseItemsInner.js +213 -0
  47. package/dist/model/SendSignInValidationCode200Response.js +141 -0
  48. package/dist/model/SendSignInValidationCode400Response.js +158 -0
  49. package/dist/model/SendValidationCode200Response.js +113 -0
  50. package/dist/model/SendValidationCodeRequest.js +128 -0
  51. package/dist/model/SignInWithEmail200Response.js +145 -0
  52. package/dist/model/SignInWithEmail200ResponseProfile.js +230 -0
  53. package/dist/model/SignInWithEmail200ResponseProfileAvatar.js +129 -0
  54. package/dist/model/SignUp200Response.js +128 -0
  55. package/dist/model/SignUpResponse.js +128 -0
  56. package/dist/model/Threads.js +140 -0
  57. package/dist/model/UserDetails.js +145 -0
  58. package/dist/model/ValidateCode400Response.js +114 -0
  59. package/dist/model/ValidateCode400ResponseError.js +156 -0
  60. package/dist/model/ValidateCode412Response.js +113 -0
  61. package/dist/model/ValidateCodeRequest.js +158 -0
  62. package/package.json +64 -0
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _EditFloor400Response = _interopRequireDefault(require("../model/EditFloor400Response"));
9
+ var _GetFloorInformation200Response = _interopRequireDefault(require("../model/GetFloorInformation200Response"));
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
12
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
13
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
14
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
15
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
16
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
17
+ * Floor Memory
18
+ * 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.
19
+ *
20
+ * The version of the OpenAPI document: 1.0.0
21
+ * Contact: contact@ipomo.in
22
+ *
23
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
24
+ * https://openapi-generator.tech
25
+ * Do not edit the class manually.
26
+ *
27
+ */
28
+ /**
29
+ * EditFloor service.
30
+ * @module api/EditFloorApi
31
+ * @version 1.0.1
32
+ */
33
+ var EditFloorApi = exports["default"] = /*#__PURE__*/function () {
34
+ /**
35
+ * Constructs a new EditFloorApi.
36
+ * @alias module:api/EditFloorApi
37
+ * @class
38
+ * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
39
+ * default to {@link module:ApiClient#instance} if unspecified.
40
+ */
41
+ function EditFloorApi(apiClient) {
42
+ _classCallCheck(this, EditFloorApi);
43
+ this.apiClient = apiClient || _ApiClient["default"].instance;
44
+ }
45
+
46
+ /**
47
+ * Callback function to receive the result of the editFloor operation.
48
+ * @callback module:api/EditFloorApi~editFloorCallback
49
+ * @param {String} error Error message, if any.
50
+ * @param {module:model/GetFloorInformation200Response} data The data returned by the service call.
51
+ * @param {String} response The complete HTTP response.
52
+ */
53
+
54
+ /**
55
+ * Edit floor
56
+ * This API updates an existing floor’s profile metadata using **multipart form data**. A floor **can be edited only by its owner**. If the authenticated user is **not the owner of the floor**, the request will be rejected, even if the user is a member or follower of the floor. The API allows the floor owner to update: * Floor **title** * Floor **details/description** * Floor **logo/avatar image** After a successful update, the API returns the **latest floor object**, including the updated avatar and the current list of blocks associated with the floor. --- ## Authorization Rules (Critical) * The caller **must be authenticated** * The caller **must be the owner of the floor** * Members, followers, or pod consumers **cannot** edit the floor * Ownership is validated internally using the authenticated user context > **Ownership is mandatory. There are no partial permissions for this API.** --- ## Content-Type `multipart/form-data` --- ## Request Body (Multipart Form Data) ### Form Fields | Field Name | Type | Required | Description | | ---------- | ------ | ------------ | ---------------------------------------- | | `fid` | String | Recommended* | Immutable internal floor ID | | `floor_id` | String | Optional* | Public / human-readable floor identifier | | `title` | String | Optional | New floor title | | `details` | String | Optional | New floor description | | `logo` | File | Optional | New floor logo image (PNG/JPG/WebP) | * At least **one floor identifier** (`fid` or `floor_id`) must be provided. **Best practice:** Use `fid` as the primary identifier. --- ## Update Rules * At least one of `title`, `details`, or `logo` must be present * Missing update fields result in a validation error * If `logo` is provided, the previous logo is replaced --- ## Response Format `application/json` --- ## Sample Success Response ```json { \"floor_id\": \"my_floor\", \"title\": \"daughter ouch upon yummy clamor\", \"details\": \"nostrud occaecat incididunt dolor adipisicing\", \"fid\": \"86\", \"blocks\": [ { \"bid\": \"83\", \"type\": \"pariatur\", \"title\": \"wherever demobilise acidly refute\" } ], \"avatar\": { \"url\": \"https://legal-availability.name/\", \"id\": \"98\" } } ``` --- ## Error Responses (Authorization Focus) ### Not Floor Owner ```json { \"status\": \"ERROR\", \"message\": \"Only the floor owner can edit this floor\" } ``` ### Floor Not Found ```json { \"status\": \"ERROR\", \"message\": \"Floor not found\" } ``` ### No Update Fields ```json { \"status\": \"ERROR\", \"message\": \"No update fields provided\" } ``` --- ## Notes * This API is **owner-only by design** * Pods and developer tools must operate using **owner credentials** * Blocks are returned for convenience but are **not editable through this API** ---
57
+ * @param {String} floorId
58
+ * @param {String} userId User ID
59
+ * @param {String} appId App ID
60
+ * @param {Object} opts Optional parameters
61
+ * @param {File} [logoFile] Floor avatar
62
+ * @param {String} [title] Floor title
63
+ * @param {String} [details] Floor decription
64
+ * @param {module:api/EditFloorApi~editFloorCallback} callback The callback function, accepting three arguments: error, data, response
65
+ * data is of type: {@link module:model/GetFloorInformation200Response}
66
+ */
67
+ return _createClass(EditFloorApi, [{
68
+ key: "editFloor",
69
+ value: function editFloor(floorId, userId, appId, opts, callback) {
70
+ opts = opts || {};
71
+ var postBody = null;
72
+ // verify the required parameter 'floorId' is set
73
+ if (floorId === undefined || floorId === null) {
74
+ throw new Error("Missing the required parameter 'floorId' when calling editFloor");
75
+ }
76
+ // verify the required parameter 'userId' is set
77
+ if (userId === undefined || userId === null) {
78
+ throw new Error("Missing the required parameter 'userId' when calling editFloor");
79
+ }
80
+ // verify the required parameter 'appId' is set
81
+ if (appId === undefined || appId === null) {
82
+ throw new Error("Missing the required parameter 'appId' when calling editFloor");
83
+ }
84
+ var pathParams = {
85
+ 'floor_id': floorId
86
+ };
87
+ var queryParams = {};
88
+ var headerParams = {};
89
+ var formParams = {
90
+ 'user_id': userId,
91
+ 'app_id': appId,
92
+ 'logo_file': opts['logoFile'],
93
+ 'title': opts['title'],
94
+ 'details': opts['details']
95
+ };
96
+ var authNames = ['bearer'];
97
+ var contentTypes = ['multipart/form-data'];
98
+ var accepts = ['application/json'];
99
+ var returnType = _GetFloorInformation200Response["default"];
100
+ return this.apiClient.callApi('/api/memory/edit/floor/{floor_id}', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
101
+ }
102
+ }]);
103
+ }();
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _Event400Response = _interopRequireDefault(require("../model/Event400Response"));
9
+ var _EventResponse = _interopRequireDefault(require("../model/EventResponse"));
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
12
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
13
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
14
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
15
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
16
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
17
+ * Floor Memory
18
+ * 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.
19
+ *
20
+ * The version of the OpenAPI document: 1.0.0
21
+ * Contact: contact@ipomo.in
22
+ *
23
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
24
+ * https://openapi-generator.tech
25
+ * Do not edit the class manually.
26
+ *
27
+ */
28
+ /**
29
+ * Event service.
30
+ * @module api/EventApi
31
+ * @version 1.0.1
32
+ */
33
+ var EventApi = exports["default"] = /*#__PURE__*/function () {
34
+ /**
35
+ * Constructs a new EventApi.
36
+ * @alias module:api/EventApi
37
+ * @class
38
+ * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
39
+ * default to {@link module:ApiClient#instance} if unspecified.
40
+ */
41
+ function EventApi(apiClient) {
42
+ _classCallCheck(this, EventApi);
43
+ this.apiClient = apiClient || _ApiClient["default"].instance;
44
+ }
45
+
46
+ /**
47
+ * Callback function to receive the result of the event operation.
48
+ * @callback module:api/EventApi~eventCallback
49
+ * @param {String} error Error message, if any.
50
+ * @param {module:model/EventResponse} data The data returned by the service call.
51
+ * @param {String} response The complete HTTP response.
52
+ */
53
+
54
+ /**
55
+ * Create Event (Post Content)
56
+ * Posts into the given floor_id. This is asynchronous ingestion. 200 OK means queued, not immediately retrievable. This API allows a user to **post personal content into their POD (Personal Object Database)**. The posted content is stored under a specified **floor**, embedded by the platform, and made available for **semantic querying, conversational retrieval, and memory-based interactions**. It is primarily used to: * Save reminders, notes, writeups, or personal knowledge * Upload content that the user wants the system to remember * Add information that should later be discoverable via conversational queries The content may consist of **text only** or **text combined with one or more media files**. --- ## **Key Capabilities** * Stores user-generated content inside a specific floor * Supports **multi-modal inputs** (text + media) * Automatically embeds content for semantic search * Makes content available to: * `/agent/memory/query` * conversational agents * future recall and analytics * Associates content with user, block, and application context --- ## **Authentication** * Requires a valid, authenticated `user_id` * The calling application is responsible for user authentication * `app_id` identifies the application context --- ## **Request Type** **Content-Type:** `multipart/form-data` --- ## **Request Parameters** ### **1. Files (Optional)** | Field | Type | Required | Description | | ------- | ------ | -------- | --------------------------------------------------------------------- | | `files` | file[] | Optional | Media files to attach to the content. Multiple files may be uploaded. | **Supported formats include (but are not limited to):** * Images: `jpg`, `png` * Audio: `mp3` * Documents: `pdf` * Video: `mp4` These files are processed and embedded along with the textual content where applicable. --- ### **2. Input Information (Required)** | Field | Type | Required | Description | | ------------ | ------------- | -------- | ----------------------------------------------------------------- | | `input_info` | string (JSON) | Yes | JSON string containing metadata and textual content for the post. | --- ## **`input_info` Structure** ```json { \"floor_id\": \"my_floor\", \"BID\": \"17845683456\", \"user_id\": \"145623907625\", \"title\": \"My floor\", \"description\": \"My floor details\", \"app_id\": \"165434879028\" } ``` --- ### **Field Descriptions** | Field | Type | Required | Description | | ------------- | ------ | -------- | ---------------------------------------------------------------------------------- | | `floor_id` | string | Yes | Identifier of the user’s floor (POD) where the content will be stored. | | `block_type` | string | Yes | Type of block under which the content is categorized (e.g., post, note, reminder). | | `BID` | string | Yes | Block identifier associated with this content. | | `user_id` | string | Yes | Unique identifier of the user posting the content. | | `title` | string | Optional | Title or short heading for the content. | | `description` | string | Yes | Main textual content to be stored and embedded. | | `app_id` | string | Optional | Identifier of the calling application. | --- ## **Behavior** 1. The API validates the user and floor context. 2. Textual content (`title` and `description`) is ingested. 3. Attached media files are processed and linked to the content. 4. Embeddings are generated for: * Text * Supported media (where applicable) 5. The content becomes part of the user’s **personal memory store**. 6. The stored data is immediately available for querying and conversational retrieval. --- ## **Successful Response** On success, the API confirms that: * The content has been stored * Embeddings have been generated * The memory item is available for future queries A success status and reference identifiers are returned. --- ## **Error Handling** The API may return errors if: * Required fields are missing (`floor_id`, `user_id`, `description`) * Unsupported file formats are uploaded * The user does not have access to the specified floor * The request payload is malformed * Internal embedding or storage operations fail --- ## **Typical Use Cases** * Saving personal reminders * Posting notes or observations * Uploading documents for future reference * Creating a personal knowledge base * Feeding data into conversational agents --- ## **One-Line Summary** > Stores user-generated text and media into a personal POD, embeds it for semantic search, and makes it available for conversational querying. ⚠️ Content Ingestion is Asynchronous The Create Event API queues content for processing. A successful response indicates **acceptance**, not availability. Newly ingested content may take time to become searchable via the Query API.
57
+ * @param {String} inputInfo Input parameters, bid is optional
58
+ * @param {Object} opts Optional parameters
59
+ * @param {File} [files] Attach relevant media here, which includes, jpg, mp3, pdf, mp4 files. More than one media can be selected
60
+ * @param {module:api/EventApi~eventCallback} callback The callback function, accepting three arguments: error, data, response
61
+ * data is of type: {@link module:model/EventResponse}
62
+ */
63
+ return _createClass(EventApi, [{
64
+ key: "event",
65
+ value: function event(inputInfo, opts, callback) {
66
+ opts = opts || {};
67
+ var postBody = null;
68
+ // verify the required parameter 'inputInfo' is set
69
+ if (inputInfo === undefined || inputInfo === null) {
70
+ throw new Error("Missing the required parameter 'inputInfo' when calling event");
71
+ }
72
+ var pathParams = {};
73
+ var queryParams = {};
74
+ var headerParams = {};
75
+ var formParams = {
76
+ 'files': opts['files'],
77
+ 'input_info': inputInfo
78
+ };
79
+ var authNames = ['bearer'];
80
+ var contentTypes = ['multipart/form-data'];
81
+ var accepts = ['application/json'];
82
+ var returnType = _EventResponse["default"];
83
+ return this.apiClient.callApi('/api/memory/events', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
84
+ }
85
+ }]);
86
+ }();
@@ -0,0 +1,89 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _GetFloorInformation200Response = _interopRequireDefault(require("../model/GetFloorInformation200Response"));
9
+ var _GetRecentEvents400Response = _interopRequireDefault(require("../model/GetRecentEvents400Response"));
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
12
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
13
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
14
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
15
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
16
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
17
+ * Floor Memory
18
+ * 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.
19
+ *
20
+ * The version of the OpenAPI document: 1.0.0
21
+ * Contact: contact@ipomo.in
22
+ *
23
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
24
+ * https://openapi-generator.tech
25
+ * Do not edit the class manually.
26
+ *
27
+ */
28
+ /**
29
+ * GetFloorInformation service.
30
+ * @module api/GetFloorInformationApi
31
+ * @version 1.0.1
32
+ */
33
+ var GetFloorInformationApi = exports["default"] = /*#__PURE__*/function () {
34
+ /**
35
+ * Constructs a new GetFloorInformationApi.
36
+ * @alias module:api/GetFloorInformationApi
37
+ * @class
38
+ * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
39
+ * default to {@link module:ApiClient#instance} if unspecified.
40
+ */
41
+ function GetFloorInformationApi(apiClient) {
42
+ _classCallCheck(this, GetFloorInformationApi);
43
+ this.apiClient = apiClient || _ApiClient["default"].instance;
44
+ }
45
+
46
+ /**
47
+ * Callback function to receive the result of the getFloorInformation operation.
48
+ * @callback module:api/GetFloorInformationApi~getFloorInformationCallback
49
+ * @param {String} error Error message, if any.
50
+ * @param {module:model/GetFloorInformation200Response} data The data returned by the service call.
51
+ * @param {String} response The complete HTTP response.
52
+ */
53
+
54
+ /**
55
+ * Basic information of a floor
56
+ * This API returns the **basic profile information of a floor**. It is used to fetch all essential metadata required to **render a floor landing page, header, or navigation context**. The response includes: * Floor identity and type * Ownership information relative to the requesting user * Floor metadata (title, description, avatar) * List of blocks available in the floor * App association (for pod / developer use cases) This API does **not** return posts or content; it only provides **structural and descriptive information** about the floor. --- ## Typical Use Cases * Render floor header (title, logo, description) * Decide UI permissions (owner vs non-owner) * Display available blocks (Feeds, Blog, Quiz, etc.) * Pod discovery or developer-managed floor rendering * Lightweight floor metadata fetch before loading content --- ## Authorization & Context * The API may be called by authenticated or unauthenticated users (depending on floor visibility). * The `is_owner` field is calculated **relative to the requesting user context** (if authenticated). --- ## Response Format `application/json` --- ## Response Structure ### Top-Level Fields | Field | Type | Description | | ------------ | ---------------------- | ---------------------------------------------------------------- | | `floor_id` | String | Public, human-readable identifier of the floor | | `floor_uid` | String | Internal unique identifier of the floor | | `title` | String | Display title of the floor | | `details` | String | Short description or summary of the floor | | `floor_type` | String | Type of floor (`PUBLIC`, `PRIVATE`, `POD`) | | `is_owner` | String (`\"0\"` / `\"1\"`) | Indicates whether the requesting user is the owner | | `blocks` | Array | List of blocks available in the floor | | `avatar` | Object | Floor logo / avatar metadata | | `app_id` | String | Associated application ID (used mainly for pod/developer floors) | --- ## Ownership Indicator ### `is_owner` ```json \"is_owner\": \"0\" ``` | Value | Meaning | | ----- | ----------------------------------------- | | `\"1\"` | Requesting user is the owner of the floor | | `\"0\"` | Requesting user is not the owner | This field is typically used by clients to: * Enable or disable edit/settings UI * Show owner-only actions --- ## Blocks Object ```json \"blocks\": [ { \"BID\": \"1765960948723\", \"type\": \"1\", \"title\": \"Feeds\" } ] ``` Each block represents a **content category or service** available inside the floor. ### Block Fields | Field | Type | Description | | ------- | ------ | ----------------------------------------------------- | | `BID` | String | Unique identifier of the block | | `type` | String | Block type identifier (e.g., feed, blog, forum, quiz) | | `title` | String | Display name of the block | --- ## Avatar Object ```json \"avatar\": { \"id\": \"1767009204367\", \"url\": \"https://...\" } ``` | Field | Type | Description | | ----- | ------ | ------------------------------ | | `id` | String | Media identifier of the avatar | | `url` | String | CDN URL of the floor logo | Used to render the floor’s profile image or banner. --- ## Floor Type ```json \"floor_type\": \"POD\" ``` | Value | Meaning | | --------- | ------------------------------------- | | `PUBLIC` | Open floor visible to everyone | | `PRIVATE` | Restricted floor | | `POD` | Aggregated or developer-managed floor | `POD` floors are often associated with an `app_id` and may aggregate or serve content programmatically. --- ## Sample Success Response ```json { \"is_owner\": \"0\", \"blocks\": [ { \"BID\": \"1765960948723\", \"type\": \"1\", \"title\": \"Feeds\" } ], \"floor_uid\": \"1765960956967\", \"floor_id\": \"raghupodfloor1\", \"details\": \"raghu\", \"avatar\": { \"id\": \"1767009204367\", \"url\": \"https://d2e5822u5ecuq8.cloudfront.net/room/1765960956967/logo/1765960956967.jpg\" }, \"title\": \"raghu\", \"floor_type\": \"POD\", \"app_id\": \"1765949734005\" } ``` --- ## Notes for Developers * This is a **lightweight metadata API** and is safe to call frequently. * Use this API **before** loading posts or analytics. * `blocks` ordering can be used directly for navigation UI. * `floor_type` + `is_owner` together determine which UI actions are allowed. --- ## Common Error Scenarios ### Floor Not Found ```json { \"status\": \"ERROR\", \"message\": \"Floor not found\" } ``` ### Access Restricted ```json { \"status\": \"ERROR\", \"message\": \"Access denied for this floor\" } ``` --- ### Final Mental Model > **This API answers: “What is this floor, who owns it, and what can I do here?”**
57
+ * @param {String} floorId
58
+ * @param {Object} opts Optional parameters
59
+ * @param {String} [userId] User ID - 13 digit numeric identity
60
+ * @param {String} [appId] App ID - 13 digit numeric identity
61
+ * @param {module:api/GetFloorInformationApi~getFloorInformationCallback} callback The callback function, accepting three arguments: error, data, response
62
+ * data is of type: {@link module:model/GetFloorInformation200Response}
63
+ */
64
+ return _createClass(GetFloorInformationApi, [{
65
+ key: "getFloorInformation",
66
+ value: function getFloorInformation(floorId, opts, callback) {
67
+ opts = opts || {};
68
+ var postBody = null;
69
+ // verify the required parameter 'floorId' is set
70
+ if (floorId === undefined || floorId === null) {
71
+ throw new Error("Missing the required parameter 'floorId' when calling getFloorInformation");
72
+ }
73
+ var pathParams = {
74
+ 'floor_id': floorId
75
+ };
76
+ var queryParams = {
77
+ 'user_id': opts['userId'],
78
+ 'app_id': opts['appId']
79
+ };
80
+ var headerParams = {};
81
+ var formParams = {};
82
+ var authNames = ['bearer'];
83
+ var contentTypes = [];
84
+ var accepts = ['application/json'];
85
+ var returnType = _GetFloorInformation200Response["default"];
86
+ return this.apiClient.callApi('/api/memory/floor/info/{floor_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
87
+ }
88
+ }]);
89
+ }();
@@ -0,0 +1,88 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _GetRecentEvents200Response = _interopRequireDefault(require("../model/GetRecentEvents200Response"));
9
+ var _GetRecentEvents400Response = _interopRequireDefault(require("../model/GetRecentEvents400Response"));
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
12
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
13
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
14
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
15
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
16
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
17
+ * Floor Memory
18
+ * 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.
19
+ *
20
+ * The version of the OpenAPI document: 1.0.0
21
+ * Contact: contact@ipomo.in
22
+ *
23
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
24
+ * https://openapi-generator.tech
25
+ * Do not edit the class manually.
26
+ *
27
+ */
28
+ /**
29
+ * GetRecentEvents service.
30
+ * @module api/GetRecentEventsApi
31
+ * @version 1.0.1
32
+ */
33
+ var GetRecentEventsApi = exports["default"] = /*#__PURE__*/function () {
34
+ /**
35
+ * Constructs a new GetRecentEventsApi.
36
+ * @alias module:api/GetRecentEventsApi
37
+ * @class
38
+ * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
39
+ * default to {@link module:ApiClient#instance} if unspecified.
40
+ */
41
+ function GetRecentEventsApi(apiClient) {
42
+ _classCallCheck(this, GetRecentEventsApi);
43
+ this.apiClient = apiClient || _ApiClient["default"].instance;
44
+ }
45
+
46
+ /**
47
+ * Callback function to receive the result of the getRecentEvents operation.
48
+ * @callback module:api/GetRecentEventsApi~getRecentEventsCallback
49
+ * @param {String} error Error message, if any.
50
+ * @param {module:model/GetRecentEvents200Response} data The data returned by the service call.
51
+ * @param {String} response The complete HTTP response.
52
+ */
53
+
54
+ /**
55
+ * Recent Events
56
+ * This API retrieves the **latest posts (events)** from a specified floor. The behaviour of the API changes based on whether a **user ID** is provided: * **If `user_id` is provided** → The API returns **recent posts relevant to that user**, scoped within the given floor. This includes posts from: * Floors the user follows * Floors created by the user * Pod floors associated with the user (if applicable) * **If `user_id` is NOT provided** → The API returns the **most recent posts available in the specified floor**, without user-specific filtering. This makes the API suitable for: * Personalized activity feeds * Floor-level public timelines * Pod-based content aggregation * Developer-built pods and custom clients --- ## **Key Concepts** * A **floor** represents a content space (independent floor, followed floor, or pod floor) * A **pod floor** may aggregate content across multiple related floors * Posts are returned **in reverse chronological order** (latest first) * Each post belongs to a specific **block** within the floor --- ## **Request Method** `GET` --- ## **Request Parameters (Query Params)** | Parameter Name | Type | Required | Description | | -------------- | ------ | -------- | -------------------------------------------------------------------------------------------------------------------------- | | `floor_id` | String | **Yes** | Floor identifier from which events should be fetched. Can be a pod floor ID, followed floor ID, or an independent floor ID | | `user_id` | String | No | If provided, returns posts relevant to the user within the given floor | | `app_id` | String | No | Identifier for external developers or pod-based applications consuming this API | --- ## **Behavior Summary** | Scenario | Result | | ---------------------- | ----------------------------------------- | | `floor_id` only | Latest posts from the specified floor | | `floor_id` + `user_id` | User-relevant posts within that floor | | Pod floor ID | Aggregated posts across pod-linked floors | | Independent floor ID | Posts only from that floor | --- ## **Response Format** `application/json` --- ## **Response Structure** ### **Top-Level Fields** | Field | Type | Description | | ------------ | ------ | ------------------------------ | | `post_count` | String | Total number of posts returned | | `items` | Array | List of recent post objects | --- ### **Post Object (`items[]`)** | Field | Type | Description | | --------------- | ------ | ------------------------------------------------------------------------- | | `event_id` | String | Unique identifier of the post/event | | `block_type` | String | Type of block where the post was created (e.g., blog, forum, audio, etc.) | | `block_id` | String | Identifier of the block within the floor | | `floor_uid` | String | Floor identifier where the post belongs | | `title` | String | Title of the post (may be empty) | | `text` | String | Text or HTML content of the post | | `media` | Array | Media objects (audio, image, etc.), if any | | `created_at_ms` | String | Post creation time in milliseconds (epoch) | --- ### **Author Object** | Field | Type | Description | | ----------- | ------ | ---------------------------- | | `name` | String | Display name of the author | | `floor_uid` | String | Author’s floor/user handle | | `avatar` | Object | Author profile image details | --- ### **Media Object** | Field | Type | Description | | ------ | ------ | ----------------------------------- | | `type` | String | Media type (e.g., `AUDIO`, `IMAGE`) | | `url` | String | Public URL of the media file | --- ## **Sample Success Response** *(structure abbreviated for clarity)* ```json { \"post_count\": \"18\", \"items\": [ { \"event_id\": \"1766557274836\", \"block_type\": \"0\", \"title\": \"voice-note-1766557272764.wav\", \"text\": \"You\", \"created_at_ms\": \"1766557275000\", \"author\": { \"name\": \"MEGHANA G\", \"floor_uid\": \"meghanag\", \"avatar\": { \"type\": \"IMAGE\", \"url\": \"https://...\" } }, \"media\": [ { \"type\": \"AUDIO\", \"url\": \"https://...\" } ] } ] } ``` --- ## **Notes** * Posts may contain **plain text or HTML** * Media is optional and may be absent * Ordering is **latest first** * The API is read-only and does not require authentication by default * Access control (public/private floors) is enforced internally --- ## **Typical Use Cases** * Floor activity feed * Pod-level dashboards * User-personalized timelines * Public floor landing pages * External developer pods using `app_id`
57
+ * @param {String} floorId
58
+ * @param {Object} opts Optional parameters
59
+ * @param {String} [userId]
60
+ * @param {String} [appId]
61
+ * @param {module:api/GetRecentEventsApi~getRecentEventsCallback} callback The callback function, accepting three arguments: error, data, response
62
+ * data is of type: {@link module:model/GetRecentEvents200Response}
63
+ */
64
+ return _createClass(GetRecentEventsApi, [{
65
+ key: "getRecentEvents",
66
+ value: function getRecentEvents(floorId, opts, callback) {
67
+ opts = opts || {};
68
+ var postBody = null;
69
+ // verify the required parameter 'floorId' is set
70
+ if (floorId === undefined || floorId === null) {
71
+ throw new Error("Missing the required parameter 'floorId' when calling getRecentEvents");
72
+ }
73
+ var pathParams = {};
74
+ var queryParams = {
75
+ 'user_id': opts['userId'],
76
+ 'floor_id': floorId,
77
+ 'app_id': opts['appId']
78
+ };
79
+ var headerParams = {};
80
+ var formParams = {};
81
+ var authNames = ['bearer'];
82
+ var contentTypes = [];
83
+ var accepts = ['application/json'];
84
+ var returnType = _GetRecentEvents200Response["default"];
85
+ return this.apiClient.callApi('/api/memory/recent/events', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
86
+ }
87
+ }]);
88
+ }();
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _Query422Response = _interopRequireDefault(require("../model/Query422Response"));
9
+ var _QueryRequest = _interopRequireDefault(require("../model/QueryRequest"));
10
+ var _QueryResponse = _interopRequireDefault(require("../model/QueryResponse"));
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
12
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
13
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
14
+ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
15
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
16
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
18
+ * Floor Memory
19
+ * 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.
20
+ *
21
+ * The version of the OpenAPI document: 1.0.0
22
+ * Contact: contact@ipomo.in
23
+ *
24
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
25
+ * https://openapi-generator.tech
26
+ * Do not edit the class manually.
27
+ *
28
+ */
29
+ /**
30
+ * Query service.
31
+ * @module api/QueryApi
32
+ * @version 1.0.1
33
+ */
34
+ var QueryApi = exports["default"] = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new QueryApi.
37
+ * @alias module:api/QueryApi
38
+ * @class
39
+ * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
40
+ * default to {@link module:ApiClient#instance} if unspecified.
41
+ */
42
+ function QueryApi(apiClient) {
43
+ _classCallCheck(this, QueryApi);
44
+ this.apiClient = apiClient || _ApiClient["default"].instance;
45
+ }
46
+
47
+ /**
48
+ * Callback function to receive the result of the query operation.
49
+ * @callback module:api/QueryApi~queryCallback
50
+ * @param {String} error Error message, if any.
51
+ * @param {module:model/QueryResponse} data The data returned by the service call.
52
+ * @param {String} response The complete HTTP response.
53
+ */
54
+
55
+ /**
56
+ * Query (Primary API)
57
+ * # **Conversational Query API** This is the **core API** of xfloor. It accepts a natural language query and returns a conversational response derived from: - Content ingested into the specified Floor - The user’s prior conversation history (if provided) - Relevant metadata and context This API is designed for **multi-turn conversations** and can be used to build: - AI chatbots - Knowledge assistants - Floor-specific copilots This API enables **conversational, context-aware querying** over data stored within xfloor. It accepts a natural language query (for example, *“What options do I have in your institute?”*) and returns relevant information derived from the specified floors and their associated content. The API is designed for **multi-turn conversations**. Follow-up questions from the same user automatically build upon prior context, allowing the system to refine, expand, or clarify results across successive calls. --- ## **Core Capabilities** * Interprets **natural language queries** * Retrieves relevant information from one or more floors * Applies **time-, type-, and tag-based filters** * Supports **Top-K retrieval** for result control * Optionally includes metadata with responses * Can generate **summarized responses** when requested * Maintains **conversation continuity** across multiple queries from the same user --- ## **Authentication & Identity** * A valid `user_id` is **required** * User authentication is assumed to be completed **before** calling this API * `app_id` identifies the calling application context * Conversational continuity is maintained **per `user_id`** > **Note:** All queries from the same `user_id` are treated as part of a single conversational context unless explicitly reset by the application. --- ## **Request Contract** ### **HTTP Method** `POST` ### **Content-Type** ``` application/json ``` > **Important:** > This API accepts **JSON requests only**. > `multipart/form-data` is **not supported**. --- ## **Request Body (JSON)** ### **Field Descriptions** | Field | Type | Required | Description | | ------------------- | ----------------------- | -------- | ---------------------------------------------------------------------------------------------- | | `user_id` | string | Yes | Unique xfloor user identifier. Used to maintain conversational continuity and personalization. | | `query` | string | Yes | Natural language query provided by the user. | | `floor_ids` | array of strings | Yes | List of floor identifiers that define the search scope. Must be provided as a JSON array. | | `filters` | object | Optional | Additional constraints to narrow search results. | | `filters.time_from` | string (ISO-8601) | Optional | Start timestamp for filtering content by creation or update time. | | `filters.time_to` | string (ISO-8601) | Optional | End timestamp for filtering content by creation or update time. | | `filters.types` | array of strings | Optional | Content types to include (e.g., `post`, `blog`, `forum`). | | `filters.tags` | array of strings | Optional | Tags used to further refine results. | | `k` | integer | Optional | Maximum number of results to retrieve (Top-K). Defaults to system-defined behavior if omitted. | | `include_metadata` | string (`\"0\"` or `\"1\"`) | Optional | Whether to include metadata (source, timestamps, tags) in the response. Defaults to `\"0\"`. | | `summary_needed` | string (`\"0\"` or `\"1\"`) | Optional | Whether a summarized conversational answer should be generated. Defaults to `\"0\"`. | | `app_id` | string | Optional | Identifies the application invoking the API. Useful for multi-app integrations. | --- ### **Important Encoding Rules** * `floor_ids` **must** be provided as a JSON array ```json \"floor_ids\": [\"floor_1\", \"floor_2\"] ``` * Boolean-style flags (`include_metadata`, `summary_needed`) are encoded as **string values**: `\"0\"` or `\"1\"` * `filters` must be provided as a **JSON object**, not a string --- ### **Canonical Request Example** ```json { \"user_id\": \"xf_user_123\", \"query\": \"What options do I have in your institute?\", \"floor_ids\": [\"institute_floor\"], \"filters\": { \"types\": [\"post\", \"blog\"], \"tags\": [\"admissions\"] }, \"k\": 5, \"include_metadata\": \"1\", \"summary_needed\": \"1\", \"app_id\": \"student_portal\" } ``` --- ## **Behavior** 1. The query is analyzed using conversational and semantic understanding. 2. Relevant content is retrieved from the specified floors. 3. Filters (time, type, tags) are applied if provided. 4. Results are ranked and limited based on `k`. 5. If `summary_needed = \"1\"`, a synthesized conversational summary is generated. 6. If `include_metadata = \"1\"`, metadata is attached to each result item. 7. The response is returned in a conversational format suitable for follow-up questions. --- ## **Response Contract** ### **High-Level Response Structure** ```json { \"answer\": \"Assistant-generated conversational response\", \"items\": [ { \"id\": \"content_id\", \"type\": \"post\", \"text\": \"Original content snippet\", \"metadata\": { } } ] } ``` --- ### **Response Field Semantics** | Field | Always Present | Description | Rendering Guidance | | ------------------ | ------------------ | ------------------------------------------- | ---------------------- | | `answer` | Yes | Assistant-generated conversational response | **Render prominently** | | `items` | Yes (may be empty) | List of matched content used for grounding | Render optionally | | `items[].metadata` | Conditional | Included only if `include_metadata = \"1\"` | Render on demand | > **No-Result Case:** > If no relevant content is found, `items` will be an empty array and `answer` will contain a conversational fallback response. --- ## **Conversation Continuity** * Conversation state is maintained **per `user_id`** * Follow-up queries automatically reference prior context * The API does not require explicit conversation IDs * Applications may reset conversation context by using a new `user_id` --- ## **Error Handling** The API may return errors in the following cases: * Missing or invalid `user_id` * Empty or unsupported `query` * Invalid or inaccessible `floor_ids` * Authorization or application context errors * Internal processing failures All errors are returned with appropriate HTTP status codes and descriptive messages. --- ## **Typical Use Case Flow** 1. User asks an initial question *“What options do I have in your institute?”* 2. Application calls `/agent/memory/query` 3. Results are displayed to the user 4. User asks a follow-up *“Which ones are available on weekends?”* 5. Application calls the same API again with the new query 6. Conversation continues seamlessly using prior context --- ## **One-Line Summary** > Executes a conversational query over xfloor content, returning context-aware, filtered, and optionally summarized results with support for multi-turn interactions.
58
+ * @param {module:model/QueryRequest} queryRequest
59
+ * @param {module:api/QueryApi~queryCallback} callback The callback function, accepting three arguments: error, data, response
60
+ * data is of type: {@link module:model/QueryResponse}
61
+ */
62
+ return _createClass(QueryApi, [{
63
+ key: "query",
64
+ value: function query(queryRequest, callback) {
65
+ var postBody = queryRequest;
66
+ // verify the required parameter 'queryRequest' is set
67
+ if (queryRequest === undefined || queryRequest === null) {
68
+ throw new Error("Missing the required parameter 'queryRequest' when calling query");
69
+ }
70
+ var pathParams = {};
71
+ var queryParams = {};
72
+ var headerParams = {};
73
+ var formParams = {};
74
+ var authNames = ['bearer'];
75
+ var contentTypes = ['application/json'];
76
+ var accepts = ['application/json'];
77
+ var returnType = _QueryResponse["default"];
78
+ return this.apiClient.callApi('/agent/memory/query', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
79
+ }
80
+ }]);
81
+ }();