@xfloor/floor-memory-sdk-js 1.0.19 → 1.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -22
- package/dist/ApiClient.js +2 -2
- package/dist/api/{DefaultApi.js → AuthApi.js} +66 -179
- package/dist/api/EventApi.js +49 -1
- package/dist/api/FloorApi.js +306 -0
- package/dist/api/QueryApi.js +1 -1
- package/dist/index.js +46 -53
- package/dist/model/BlockDetails.js +1 -1
- package/dist/model/{SignInWithEmail200Response.js → ChangeEmail200Response.js} +32 -32
- package/dist/model/{SignInWithEmail200ResponsePodInfo.js → ChangeEmail200ResponsePodInfo.js} +27 -27
- package/dist/model/{SignInWithEmail200ResponseProfile.js → ChangeEmail200ResponseProfile.js} +44 -44
- package/dist/model/{SignInWithEmail200ResponseProfileAvatar.js → ChangeEmail200ResponseProfileAvatar.js} +21 -21
- package/dist/model/ChangePassword200Response.js +1 -1
- package/dist/model/{GetFloorInformation200Response.js → EditFloor200Response.js} +28 -28
- package/dist/model/EditFloor400Response.js +1 -1
- package/dist/model/EditFloor400ResponseError.js +1 -1
- package/dist/model/Event400Response.js +1 -1
- package/dist/model/Event400ResponseError.js +1 -1
- package/dist/model/EventResponse.js +1 -1
- package/dist/model/FloorInfo.js +1 -1
- package/dist/model/GetRecentEvents200Response.js +1 -1
- package/dist/model/GetRecentEvents200ResponseItemsInner.js +1 -1
- package/dist/model/GetRecentEvents200ResponseItemsInnerAuthor.js +1 -1
- package/dist/model/GetRecentEvents400Response.js +1 -1
- package/dist/model/GetRecentEvents400ResponseError.js +1 -1
- package/dist/model/Media.js +1 -1
- package/dist/model/Model400ErrorCode.js +1 -1
- package/dist/model/Query422Response.js +1 -1
- package/dist/model/Query422ResponseError.js +1 -1
- package/dist/model/QueryRequest.js +1 -1
- package/dist/model/QueryRequestFilters.js +1 -1
- package/dist/model/QueryResponse.js +1 -1
- package/dist/model/QueryResponseItemsInner.js +1 -1
- package/dist/model/Remaining.js +1 -1
- package/dist/model/ResetPassword200Response.js +1 -1
- package/dist/model/ResetPassword400Response.js +1 -1
- package/dist/model/SendValidationCode200Response.js +1 -1
- package/dist/model/SignInResponse.js +145 -0
- package/dist/model/SignUp200Response.js +1 -1
- package/dist/model/SignUpResponse.js +1 -1
- package/dist/model/UserDetails.js +11 -11
- package/dist/model/ValidateCode400Response.js +1 -1
- package/dist/model/ValidateCode400ResponseError.js +1 -1
- package/dist/model/ValidateCode412Response.js +1 -1
- package/package.json +1 -1
- package/dist/api/EditFloorApi.js +0 -105
- package/dist/api/GetFloorInformationApi.js +0 -95
- package/dist/api/GetRecentEventsApi.js +0 -94
|
@@ -31,7 +31,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
31
31
|
/**
|
|
32
32
|
* The ValidateCode412Response model module.
|
|
33
33
|
* @module model/ValidateCode412Response
|
|
34
|
-
* @version 1.0.
|
|
34
|
+
* @version 1.0.21
|
|
35
35
|
*/
|
|
36
36
|
var ValidateCode412Response = /*#__PURE__*/function () {
|
|
37
37
|
/**
|
package/package.json
CHANGED
package/dist/api/EditFloorApi.js
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
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.
|
|
19
|
-
* - Memory and
|
|
20
|
-
* - 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.
|
|
21
|
-
*
|
|
22
|
-
* The version of the OpenAPI document: 1.0.0
|
|
23
|
-
* Contact: contact@ipomo.in
|
|
24
|
-
*
|
|
25
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
26
|
-
* https://openapi-generator.tech
|
|
27
|
-
* Do not edit the class manually.
|
|
28
|
-
*
|
|
29
|
-
*/
|
|
30
|
-
/**
|
|
31
|
-
* EditFloor service.
|
|
32
|
-
* @module api/EditFloorApi
|
|
33
|
-
* @version 1.0.19
|
|
34
|
-
*/
|
|
35
|
-
var EditFloorApi = exports["default"] = /*#__PURE__*/function () {
|
|
36
|
-
/**
|
|
37
|
-
* Constructs a new EditFloorApi.
|
|
38
|
-
* @alias module:api/EditFloorApi
|
|
39
|
-
* @class
|
|
40
|
-
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
|
41
|
-
* default to {@link module:ApiClient#instance} if unspecified.
|
|
42
|
-
*/
|
|
43
|
-
function EditFloorApi(apiClient) {
|
|
44
|
-
_classCallCheck(this, EditFloorApi);
|
|
45
|
-
this.apiClient = apiClient || _ApiClient["default"].instance;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Callback function to receive the result of the editFloor operation.
|
|
50
|
-
* @callback module:api/EditFloorApi~editFloorCallback
|
|
51
|
-
* @param {String} error Error message, if any.
|
|
52
|
-
* @param {module:model/GetFloorInformation200Response} data The data returned by the service call.
|
|
53
|
-
* @param {String} response The complete HTTP response.
|
|
54
|
-
*/
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Edit floor
|
|
58
|
-
* This API updates an existing floor’s profile metadata using **multipart form data**. A floor **can be edited only by its owner**. If the authenticated user is **not the owner of the floor**, the request will be rejected, even if the user is a member or follower of the floor. The API allows the floor owner to update: * Floor **title** * Floor **details/description** * Floor **logo/avatar image** After a successful update, the API returns the **latest floor object**, including the updated avatar and the current list of blocks associated with the floor. --- ## Authorization Rules (Critical) * The caller **must be authenticated** * The caller **must be the owner of the floor** * Members, followers, or pod consumers **cannot** edit the floor * Ownership is validated internally using the authenticated user context > **Ownership is mandatory. There are no partial permissions for this API.** --- ## Content-Type `multipart/form-data` --- ## Request Body (Multipart Form Data) ### Form Fields | Field Name | Type | Required | Description | | ---------- | ------ | ------------ | ---------------------------------------- | | `floor_id` | String | Optional* | Public / human-readable floor identifier | | `title` | String | Optional | New floor title | | `details` | String | Optional | New floor description | | `logo` | File | Optional | New floor logo image (PNG/JPG/WebP) | * At least **one floor identifier** (`fid` or `floor_id`) must be provided. **Best practice:** Use `fid` as the primary identifier. --- ## Update Rules * At least one of `title`, `details`, or `logo` must be present * Missing update fields result in a validation error * If `logo` is provided, the previous logo is replaced --- ## Response Format `application/json` --- ## Sample Success Response ```json { \"floor_id\": \"my_floor\", \"title\": \"daughter ouch upon yummy clamor\", \"details\": \"nostrud occaecat incididunt dolor adipisicing\", \"fid\": \"86\", \"blocks\": [ { \"bid\": \"83\", \"type\": \"pariatur\", \"title\": \"wherever demobilise acidly refute\" } ], \"avatar\": { \"url\": \"https://legal-availability.name/\", \"id\": \"98\" } } ``` --- ## Error Responses (Authorization Focus) ### Not Floor Owner ```json { \"status\": \"ERROR\", \"message\": \"Only the floor owner can edit this floor\" } ``` ### Floor Not Found ```json { \"status\": \"ERROR\", \"message\": \"Floor not found\" } ``` ### No Update Fields ```json { \"status\": \"ERROR\", \"message\": \"No update fields provided\" } ``` --- ## Notes * This API is **owner-only by design** * Pods and developer tools must operate using **owner credentials** * Blocks are returned for convenience but are **not editable through this API** ---
|
|
59
|
-
* @param {String} floorId
|
|
60
|
-
* @param {String} userId User ID
|
|
61
|
-
* @param {String} appId App ID
|
|
62
|
-
* @param {Object} opts Optional parameters
|
|
63
|
-
* @param {File} [logoFile] Floor avatar
|
|
64
|
-
* @param {String} [title] Floor title
|
|
65
|
-
* @param {String} [details] Floor decription
|
|
66
|
-
* @param {module:api/EditFloorApi~editFloorCallback} callback The callback function, accepting three arguments: error, data, response
|
|
67
|
-
* data is of type: {@link module:model/GetFloorInformation200Response}
|
|
68
|
-
*/
|
|
69
|
-
return _createClass(EditFloorApi, [{
|
|
70
|
-
key: "editFloor",
|
|
71
|
-
value: function editFloor(floorId, userId, appId, opts, callback) {
|
|
72
|
-
opts = opts || {};
|
|
73
|
-
var postBody = null;
|
|
74
|
-
// verify the required parameter 'floorId' is set
|
|
75
|
-
if (floorId === undefined || floorId === null) {
|
|
76
|
-
throw new Error("Missing the required parameter 'floorId' when calling editFloor");
|
|
77
|
-
}
|
|
78
|
-
// verify the required parameter 'userId' is set
|
|
79
|
-
if (userId === undefined || userId === null) {
|
|
80
|
-
throw new Error("Missing the required parameter 'userId' when calling editFloor");
|
|
81
|
-
}
|
|
82
|
-
// verify the required parameter 'appId' is set
|
|
83
|
-
if (appId === undefined || appId === null) {
|
|
84
|
-
throw new Error("Missing the required parameter 'appId' when calling editFloor");
|
|
85
|
-
}
|
|
86
|
-
var pathParams = {
|
|
87
|
-
'floor_id': floorId
|
|
88
|
-
};
|
|
89
|
-
var queryParams = {};
|
|
90
|
-
var headerParams = {};
|
|
91
|
-
var formParams = {
|
|
92
|
-
'user_id': userId,
|
|
93
|
-
'app_id': appId,
|
|
94
|
-
'logo_file': opts['logoFile'],
|
|
95
|
-
'title': opts['title'],
|
|
96
|
-
'details': opts['details']
|
|
97
|
-
};
|
|
98
|
-
var authNames = ['bearer'];
|
|
99
|
-
var contentTypes = ['multipart/form-data'];
|
|
100
|
-
var accepts = ['application/json'];
|
|
101
|
-
var returnType = _GetFloorInformation200Response["default"];
|
|
102
|
-
return this.apiClient.callApi('/api/memory/edit/floor/{floor_id}', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
103
|
-
}
|
|
104
|
-
}]);
|
|
105
|
-
}();
|
|
@@ -1,95 +0,0 @@
|
|
|
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.
|
|
19
|
-
* - Memory and
|
|
20
|
-
* - 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.
|
|
21
|
-
*
|
|
22
|
-
* The version of the OpenAPI document: 1.0.0
|
|
23
|
-
* Contact: contact@ipomo.in
|
|
24
|
-
*
|
|
25
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
26
|
-
* https://openapi-generator.tech
|
|
27
|
-
* Do not edit the class manually.
|
|
28
|
-
*
|
|
29
|
-
*/
|
|
30
|
-
/**
|
|
31
|
-
* GetFloorInformation service.
|
|
32
|
-
* @module api/GetFloorInformationApi
|
|
33
|
-
* @version 1.0.19
|
|
34
|
-
*/
|
|
35
|
-
var GetFloorInformationApi = exports["default"] = /*#__PURE__*/function () {
|
|
36
|
-
/**
|
|
37
|
-
* Constructs a new GetFloorInformationApi.
|
|
38
|
-
* @alias module:api/GetFloorInformationApi
|
|
39
|
-
* @class
|
|
40
|
-
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
|
41
|
-
* default to {@link module:ApiClient#instance} if unspecified.
|
|
42
|
-
*/
|
|
43
|
-
function GetFloorInformationApi(apiClient) {
|
|
44
|
-
_classCallCheck(this, GetFloorInformationApi);
|
|
45
|
-
this.apiClient = apiClient || _ApiClient["default"].instance;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Callback function to receive the result of the getFloorInformation operation.
|
|
50
|
-
* @callback module:api/GetFloorInformationApi~getFloorInformationCallback
|
|
51
|
-
* @param {String} error Error message, if any.
|
|
52
|
-
* @param {module:model/GetFloorInformation200Response} data The data returned by the service call.
|
|
53
|
-
* @param {String} response The complete HTTP response.
|
|
54
|
-
*/
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Basic information of a floor
|
|
58
|
-
* This API returns the **basic profile information of a floor**. It is used to fetch all essential metadata required to **render a floor landing page, header, or navigation context**. The response includes: * Floor identity and type * Ownership information relative to the requesting user * Floor metadata (title, description, avatar) * List of blocks available in the floor * App association (for pod / developer use cases) This API does **not** return posts or content; it only provides **structural and descriptive information** about the floor. --- ## Typical Use Cases * Render floor header (title, logo, description) * Decide UI permissions (owner vs non-owner) * Display available blocks (Feeds, Blog, Quiz, etc.) * Pod discovery or developer-managed floor rendering * Lightweight floor metadata fetch before loading content --- ## Authorization & Context * The API may be called by authenticated or unauthenticated users (depending on floor visibility). * The `is_owner` field is calculated **relative to the requesting user context** (if authenticated). --- ## Response Format `application/json` --- ## Response Structure ### Top-Level Fields | Field | Type | Description | | ------------ | ---------------------- | ---------------------------------------------------------------- | | `floor_id` | String | Public, human-readable identifier of the floor | | `floor_uid` | String | Internal unique identifier of the floor | | `title` | String | Display title of the floor | | `details` | String | Short description or summary of the floor | | `floor_type` | String | Type of floor (`PUBLIC`, `PRIVATE`, `POD`) | | `is_owner` | String (`\"0\"` / `\"1\"`) | Indicates whether the requesting user is the owner | | `blocks` | Array | List of blocks available in the floor | | `avatar` | Object | Floor logo / avatar metadata | | `app_id` | String | Associated application ID (used mainly for pod/developer floors) | --- ## Ownership Indicator ### `is_owner` ```json \"is_owner\": \"0\" ``` | Value | Meaning | | ----- | ----------------------------------------- | | `\"1\"` | Requesting user is the owner of the floor | | `\"0\"` | Requesting user is not the owner | This field is typically used by clients to: * Enable or disable edit/settings UI * Show owner-only actions --- ## Blocks Object ```json \"blocks\": [ { \"block_id\": \"1765960948723\", \"type\": \"1\", \"title\": \"Feeds\" } ] ``` Each block represents a **content category or service** available inside the floor. ### Block Fields | Field | Type | Description | | ------- | ------ | ----------------------------------------------------- | | `block_id` | String | Unique identifier of the block | | `type` | String | Block type identifier (e.g., feed, blog, forum, quiz) | | `title` | String | Display name of the block | --- ## Avatar Object ```json \"avatar\": { \"id\": \"1767009204367\", \"url\": \"https://...\" } ``` | Field | Type | Description | | ----- | ------ | ------------------------------ | | `id` | String | Media identifier of the avatar | | `url` | String | CDN URL of the floor logo | Used to render the floor’s profile image or banner. --- ## Floor Type ```json \"floor_type\": \"POD\" ``` | Value | Meaning | | --------- | ------------------------------------- | | `PUBLIC` | Open floor visible to everyone | | `PRIVATE` | Restricted floor | | `POD` | Aggregated or developer-managed floor | `POD` floors are often associated with an `app_id` and may aggregate or serve content programmatically. --- ## Sample Success Response ```json { \"is_owner\": \"0\", \"blocks\": [ { \"block_id\": \"1765960948723\", \"type\": \"1\", \"title\": \"Feeds\" } ], \"floor_uid\": \"1765960956967\", \"floor_id\": \"raghupodfloor1\", \"details\": \"raghu\", \"avatar\": { \"id\": \"1767009204367\", \"url\": \"https://d2e5822u5ecuq8.cloudfront.net/room/1765960956967/logo/1765960956967.jpg\" }, \"title\": \"raghu\", \"floor_type\": \"POD\", \"app_id\": \"1765949734005\" } ``` --- ## Notes for Developers * This is a **lightweight metadata API** and is safe to call frequently. * Use this API **before** loading posts or analytics. * `blocks` ordering can be used directly for navigation UI. * `floor_type` + `is_owner` together determine which UI actions are allowed. --- ## Common Error Scenarios ### Floor Not Found ```json { \"status\": \"ERROR\", \"message\": \"Floor not found\" } ``` ### Access Restricted ```json { \"status\": \"ERROR\", \"message\": \"Access denied for this floor\" } ``` --- ### Final Mental Model > **This API answers: “What is this floor, who owns it, and what can I do here?”**
|
|
59
|
-
* @param {String} floorId
|
|
60
|
-
* @param {String} appId App ID - 13 digit numeric identity
|
|
61
|
-
* @param {Object} opts Optional parameters
|
|
62
|
-
* @param {String} [userId] User ID - 13 digit numeric identity
|
|
63
|
-
* @param {module:api/GetFloorInformationApi~getFloorInformationCallback} callback The callback function, accepting three arguments: error, data, response
|
|
64
|
-
* data is of type: {@link module:model/GetFloorInformation200Response}
|
|
65
|
-
*/
|
|
66
|
-
return _createClass(GetFloorInformationApi, [{
|
|
67
|
-
key: "getFloorInformation",
|
|
68
|
-
value: function getFloorInformation(floorId, appId, opts, callback) {
|
|
69
|
-
opts = opts || {};
|
|
70
|
-
var postBody = null;
|
|
71
|
-
// verify the required parameter 'floorId' is set
|
|
72
|
-
if (floorId === undefined || floorId === null) {
|
|
73
|
-
throw new Error("Missing the required parameter 'floorId' when calling getFloorInformation");
|
|
74
|
-
}
|
|
75
|
-
// verify the required parameter 'appId' is set
|
|
76
|
-
if (appId === undefined || appId === null) {
|
|
77
|
-
throw new Error("Missing the required parameter 'appId' when calling getFloorInformation");
|
|
78
|
-
}
|
|
79
|
-
var pathParams = {
|
|
80
|
-
'floor_id': floorId
|
|
81
|
-
};
|
|
82
|
-
var queryParams = {
|
|
83
|
-
'user_id': opts['userId'],
|
|
84
|
-
'app_id': appId
|
|
85
|
-
};
|
|
86
|
-
var headerParams = {};
|
|
87
|
-
var formParams = {};
|
|
88
|
-
var authNames = ['bearer'];
|
|
89
|
-
var contentTypes = [];
|
|
90
|
-
var accepts = ['application/json'];
|
|
91
|
-
var returnType = _GetFloorInformation200Response["default"];
|
|
92
|
-
return this.apiClient.callApi('/api/memory/floor/info/{floor_id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
93
|
-
}
|
|
94
|
-
}]);
|
|
95
|
-
}();
|
|
@@ -1,94 +0,0 @@
|
|
|
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.
|
|
19
|
-
* - Memory and
|
|
20
|
-
* - 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.
|
|
21
|
-
*
|
|
22
|
-
* The version of the OpenAPI document: 1.0.0
|
|
23
|
-
* Contact: contact@ipomo.in
|
|
24
|
-
*
|
|
25
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
26
|
-
* https://openapi-generator.tech
|
|
27
|
-
* Do not edit the class manually.
|
|
28
|
-
*
|
|
29
|
-
*/
|
|
30
|
-
/**
|
|
31
|
-
* GetRecentEvents service.
|
|
32
|
-
* @module api/GetRecentEventsApi
|
|
33
|
-
* @version 1.0.19
|
|
34
|
-
*/
|
|
35
|
-
var GetRecentEventsApi = exports["default"] = /*#__PURE__*/function () {
|
|
36
|
-
/**
|
|
37
|
-
* Constructs a new GetRecentEventsApi.
|
|
38
|
-
* @alias module:api/GetRecentEventsApi
|
|
39
|
-
* @class
|
|
40
|
-
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
|
41
|
-
* default to {@link module:ApiClient#instance} if unspecified.
|
|
42
|
-
*/
|
|
43
|
-
function GetRecentEventsApi(apiClient) {
|
|
44
|
-
_classCallCheck(this, GetRecentEventsApi);
|
|
45
|
-
this.apiClient = apiClient || _ApiClient["default"].instance;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Callback function to receive the result of the getRecentEvents operation.
|
|
50
|
-
* @callback module:api/GetRecentEventsApi~getRecentEventsCallback
|
|
51
|
-
* @param {String} error Error message, if any.
|
|
52
|
-
* @param {module:model/GetRecentEvents200Response} data The data returned by the service call.
|
|
53
|
-
* @param {String} response The complete HTTP response.
|
|
54
|
-
*/
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Recent Events
|
|
58
|
-
* 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`
|
|
59
|
-
* @param {String} floorId
|
|
60
|
-
* @param {String} appId
|
|
61
|
-
* @param {Object} opts Optional parameters
|
|
62
|
-
* @param {String} [userId]
|
|
63
|
-
* @param {module:api/GetRecentEventsApi~getRecentEventsCallback} callback The callback function, accepting three arguments: error, data, response
|
|
64
|
-
* data is of type: {@link module:model/GetRecentEvents200Response}
|
|
65
|
-
*/
|
|
66
|
-
return _createClass(GetRecentEventsApi, [{
|
|
67
|
-
key: "getRecentEvents",
|
|
68
|
-
value: function getRecentEvents(floorId, appId, opts, callback) {
|
|
69
|
-
opts = opts || {};
|
|
70
|
-
var postBody = null;
|
|
71
|
-
// verify the required parameter 'floorId' is set
|
|
72
|
-
if (floorId === undefined || floorId === null) {
|
|
73
|
-
throw new Error("Missing the required parameter 'floorId' when calling getRecentEvents");
|
|
74
|
-
}
|
|
75
|
-
// verify the required parameter 'appId' is set
|
|
76
|
-
if (appId === undefined || appId === null) {
|
|
77
|
-
throw new Error("Missing the required parameter 'appId' when calling getRecentEvents");
|
|
78
|
-
}
|
|
79
|
-
var pathParams = {};
|
|
80
|
-
var queryParams = {
|
|
81
|
-
'user_id': opts['userId'],
|
|
82
|
-
'floor_id': floorId,
|
|
83
|
-
'app_id': appId
|
|
84
|
-
};
|
|
85
|
-
var headerParams = {};
|
|
86
|
-
var formParams = {};
|
|
87
|
-
var authNames = ['bearer'];
|
|
88
|
-
var contentTypes = [];
|
|
89
|
-
var accepts = ['application/json'];
|
|
90
|
-
var returnType = _GetRecentEvents200Response["default"];
|
|
91
|
-
return this.apiClient.callApi('/api/memory/recent/events', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
92
|
-
}
|
|
93
|
-
}]);
|
|
94
|
-
}();
|