@xfloor/floor-memory-sdk-ts 1.0.0
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/LICENSE +1 -0
- package/README.md +176 -0
- package/dist/apis/DefaultApi.d.ts +209 -0
- package/dist/apis/DefaultApi.js +986 -0
- package/dist/apis/EditFloorApi.d.ts +36 -0
- package/dist/apis/EditFloorApi.js +173 -0
- package/dist/apis/EventApi.d.ts +32 -0
- package/dist/apis/EventApi.js +157 -0
- package/dist/apis/GetFloorInformationApi.d.ts +33 -0
- package/dist/apis/GetFloorInformationApi.js +144 -0
- package/dist/apis/GetRecentEventsApi.d.ts +33 -0
- package/dist/apis/GetRecentEventsApi.js +146 -0
- package/dist/apis/QueryApi.d.ts +31 -0
- package/dist/apis/QueryApi.js +139 -0
- package/dist/apis/index.d.ts +6 -0
- package/dist/apis/index.js +24 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +21 -0
- package/dist/models/BlockDetails.d.ts +44 -0
- package/dist/models/BlockDetails.js +59 -0
- package/dist/models/ChangePassword200Response.d.ts +32 -0
- package/dist/models/ChangePassword200Response.js +51 -0
- package/dist/models/EditFloor400Response.d.ts +33 -0
- package/dist/models/EditFloor400Response.js +52 -0
- package/dist/models/EditFloor400ResponseError.d.ts +50 -0
- package/dist/models/EditFloor400ResponseError.js +63 -0
- package/dist/models/Event400Response.d.ts +33 -0
- package/dist/models/Event400Response.js +52 -0
- package/dist/models/Event400ResponseError.d.ts +50 -0
- package/dist/models/Event400ResponseError.js +63 -0
- package/dist/models/EventResponse.d.ts +32 -0
- package/dist/models/EventResponse.js +51 -0
- package/dist/models/FloorInfo.d.ts +64 -0
- package/dist/models/FloorInfo.js +67 -0
- package/dist/models/GetFloorInformation200Response.d.ts +64 -0
- package/dist/models/GetFloorInformation200Response.js +67 -0
- package/dist/models/GetRecentEvents200Response.d.ts +39 -0
- package/dist/models/GetRecentEvents200Response.js +56 -0
- package/dist/models/GetRecentEvents200ResponseItemsInner.d.ts +82 -0
- package/dist/models/GetRecentEvents200ResponseItemsInner.js +67 -0
- package/dist/models/GetRecentEvents200ResponseItemsInnerAuthor.d.ts +51 -0
- package/dist/models/GetRecentEvents200ResponseItemsInnerAuthor.js +56 -0
- package/dist/models/GetRecentEvents400Response.d.ts +33 -0
- package/dist/models/GetRecentEvents400Response.js +52 -0
- package/dist/models/GetRecentEvents400ResponseError.d.ts +50 -0
- package/dist/models/GetRecentEvents400ResponseError.js +63 -0
- package/dist/models/Media.d.ts +38 -0
- package/dist/models/Media.js +55 -0
- package/dist/models/Model400ErrorCode.d.ts +50 -0
- package/dist/models/Model400ErrorCode.js +63 -0
- package/dist/models/Query422Response.d.ts +33 -0
- package/dist/models/Query422Response.js +52 -0
- package/dist/models/Query422ResponseError.d.ts +32 -0
- package/dist/models/Query422ResponseError.js +51 -0
- package/dist/models/QueryRequest.d.ts +69 -0
- package/dist/models/QueryRequest.js +68 -0
- package/dist/models/QueryRequestFilters.d.ts +50 -0
- package/dist/models/QueryRequestFilters.js +63 -0
- package/dist/models/QueryResponse.d.ts +39 -0
- package/dist/models/QueryResponse.js +52 -0
- package/dist/models/QueryResponseItemsInner.d.ts +92 -0
- package/dist/models/QueryResponseItemsInner.js +69 -0
- package/dist/models/SendSignInValidationCode200Response.d.ts +44 -0
- package/dist/models/SendSignInValidationCode200Response.js +57 -0
- package/dist/models/SendSignInValidationCode400Response.d.ts +50 -0
- package/dist/models/SendSignInValidationCode400Response.js +63 -0
- package/dist/models/SendValidationCode200Response.d.ts +32 -0
- package/dist/models/SendValidationCode200Response.js +51 -0
- package/dist/models/SendValidationCodeRequest.d.ts +38 -0
- package/dist/models/SendValidationCodeRequest.js +55 -0
- package/dist/models/SignInWithEmail200Response.d.ts +46 -0
- package/dist/models/SignInWithEmail200Response.js +61 -0
- package/dist/models/SignInWithEmail200ResponseProfile.d.ts +76 -0
- package/dist/models/SignInWithEmail200ResponseProfile.js +73 -0
- package/dist/models/SignInWithEmail200ResponseProfileAvatar.d.ts +38 -0
- package/dist/models/SignInWithEmail200ResponseProfileAvatar.js +55 -0
- package/dist/models/SignUp200Response.d.ts +38 -0
- package/dist/models/SignUp200Response.js +55 -0
- package/dist/models/SignUpResponse.d.ts +38 -0
- package/dist/models/SignUpResponse.js +55 -0
- package/dist/models/UserDetails.d.ts +46 -0
- package/dist/models/UserDetails.js +61 -0
- package/dist/models/ValidateCode400Response.d.ts +33 -0
- package/dist/models/ValidateCode400Response.js +52 -0
- package/dist/models/ValidateCode400ResponseError.d.ts +50 -0
- package/dist/models/ValidateCode400ResponseError.js +63 -0
- package/dist/models/ValidateCode412Response.d.ts +32 -0
- package/dist/models/ValidateCode412Response.js +51 -0
- package/dist/models/ValidateCodeRequest.d.ts +50 -0
- package/dist/models/ValidateCodeRequest.js +63 -0
- package/dist/models/index.d.ts +36 -0
- package/dist/models/index.js +54 -0
- package/dist/runtime.d.ts +184 -0
- package/dist/runtime.js +564 -0
- package/package.json +36 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
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.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: contact@ipomo.in
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __extends = (this && this.__extends) || (function () {
|
|
16
|
+
var extendStatics = function (d, b) {
|
|
17
|
+
extendStatics = Object.setPrototypeOf ||
|
|
18
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
19
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
20
|
+
return extendStatics(d, b);
|
|
21
|
+
};
|
|
22
|
+
return function (d, b) {
|
|
23
|
+
if (typeof b !== "function" && b !== null)
|
|
24
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
25
|
+
extendStatics(d, b);
|
|
26
|
+
function __() { this.constructor = d; }
|
|
27
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
28
|
+
};
|
|
29
|
+
})();
|
|
30
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
31
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
32
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
33
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
34
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
35
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
36
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
40
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
41
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
42
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
43
|
+
function step(op) {
|
|
44
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
45
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
46
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
47
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
48
|
+
switch (op[0]) {
|
|
49
|
+
case 0: case 1: t = op; break;
|
|
50
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
51
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
52
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
53
|
+
default:
|
|
54
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
55
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
56
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
57
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
58
|
+
if (t[2]) _.ops.pop();
|
|
59
|
+
_.trys.pop(); continue;
|
|
60
|
+
}
|
|
61
|
+
op = body.call(thisArg, _);
|
|
62
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
63
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
67
|
+
exports.GetFloorInformationApi = void 0;
|
|
68
|
+
var runtime = require("../runtime");
|
|
69
|
+
var index_1 = require("../models/index");
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
*/
|
|
73
|
+
var GetFloorInformationApi = /** @class */ (function (_super) {
|
|
74
|
+
__extends(GetFloorInformationApi, _super);
|
|
75
|
+
function GetFloorInformationApi() {
|
|
76
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* 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?”**
|
|
80
|
+
* Basic information of a floor
|
|
81
|
+
*/
|
|
82
|
+
GetFloorInformationApi.prototype.getFloorInformationRaw = function (requestParameters, initOverrides) {
|
|
83
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
84
|
+
var queryParameters, headerParameters, token, tokenString, urlPath, response;
|
|
85
|
+
return __generator(this, function (_a) {
|
|
86
|
+
switch (_a.label) {
|
|
87
|
+
case 0:
|
|
88
|
+
if (requestParameters['floorId'] == null) {
|
|
89
|
+
throw new runtime.RequiredError('floorId', 'Required parameter "floorId" was null or undefined when calling getFloorInformation().');
|
|
90
|
+
}
|
|
91
|
+
queryParameters = {};
|
|
92
|
+
if (requestParameters['userId'] != null) {
|
|
93
|
+
queryParameters['user_id'] = requestParameters['userId'];
|
|
94
|
+
}
|
|
95
|
+
if (requestParameters['appId'] != null) {
|
|
96
|
+
queryParameters['app_id'] = requestParameters['appId'];
|
|
97
|
+
}
|
|
98
|
+
headerParameters = {};
|
|
99
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
100
|
+
token = this.configuration.accessToken;
|
|
101
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
102
|
+
case 1:
|
|
103
|
+
tokenString = _a.sent();
|
|
104
|
+
if (tokenString) {
|
|
105
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
106
|
+
}
|
|
107
|
+
_a.label = 2;
|
|
108
|
+
case 2:
|
|
109
|
+
urlPath = "/api/memory/floor/info/{floor_id}";
|
|
110
|
+
urlPath = urlPath.replace("{".concat("floor_id", "}"), encodeURIComponent(String(requestParameters['floorId'])));
|
|
111
|
+
return [4 /*yield*/, this.request({
|
|
112
|
+
path: urlPath,
|
|
113
|
+
method: 'GET',
|
|
114
|
+
headers: headerParameters,
|
|
115
|
+
query: queryParameters,
|
|
116
|
+
}, initOverrides)];
|
|
117
|
+
case 3:
|
|
118
|
+
response = _a.sent();
|
|
119
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GetFloorInformation200ResponseFromJSON)(jsonValue); })];
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* 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?”**
|
|
126
|
+
* Basic information of a floor
|
|
127
|
+
*/
|
|
128
|
+
GetFloorInformationApi.prototype.getFloorInformation = function (requestParameters, initOverrides) {
|
|
129
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
130
|
+
var response;
|
|
131
|
+
return __generator(this, function (_a) {
|
|
132
|
+
switch (_a.label) {
|
|
133
|
+
case 0: return [4 /*yield*/, this.getFloorInformationRaw(requestParameters, initOverrides)];
|
|
134
|
+
case 1:
|
|
135
|
+
response = _a.sent();
|
|
136
|
+
return [4 /*yield*/, response.value()];
|
|
137
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
});
|
|
141
|
+
};
|
|
142
|
+
return GetFloorInformationApi;
|
|
143
|
+
}(runtime.BaseAPI));
|
|
144
|
+
exports.GetFloorInformationApi = GetFloorInformationApi;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Floor Memory
|
|
3
|
+
* The set APIs are used to develop Floor pds which can be used as their personal assistants. This set of APIs are divided into two parts. - 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.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: contact@ipomo.in
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import type { GetRecentEvents200Response } from '../models/index';
|
|
14
|
+
export interface GetRecentEventsRequest {
|
|
15
|
+
floorId: string;
|
|
16
|
+
userId?: string;
|
|
17
|
+
appId?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
export declare class GetRecentEventsApi extends runtime.BaseAPI {
|
|
23
|
+
/**
|
|
24
|
+
* 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`
|
|
25
|
+
* Recent Events
|
|
26
|
+
*/
|
|
27
|
+
getRecentEventsRaw(requestParameters: GetRecentEventsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetRecentEvents200Response>>;
|
|
28
|
+
/**
|
|
29
|
+
* 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`
|
|
30
|
+
* Recent Events
|
|
31
|
+
*/
|
|
32
|
+
getRecentEvents(requestParameters: GetRecentEventsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetRecentEvents200Response>;
|
|
33
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
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.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: contact@ipomo.in
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __extends = (this && this.__extends) || (function () {
|
|
16
|
+
var extendStatics = function (d, b) {
|
|
17
|
+
extendStatics = Object.setPrototypeOf ||
|
|
18
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
19
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
20
|
+
return extendStatics(d, b);
|
|
21
|
+
};
|
|
22
|
+
return function (d, b) {
|
|
23
|
+
if (typeof b !== "function" && b !== null)
|
|
24
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
25
|
+
extendStatics(d, b);
|
|
26
|
+
function __() { this.constructor = d; }
|
|
27
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
28
|
+
};
|
|
29
|
+
})();
|
|
30
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
31
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
32
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
33
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
34
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
35
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
36
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
40
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
41
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
42
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
43
|
+
function step(op) {
|
|
44
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
45
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
46
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
47
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
48
|
+
switch (op[0]) {
|
|
49
|
+
case 0: case 1: t = op; break;
|
|
50
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
51
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
52
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
53
|
+
default:
|
|
54
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
55
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
56
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
57
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
58
|
+
if (t[2]) _.ops.pop();
|
|
59
|
+
_.trys.pop(); continue;
|
|
60
|
+
}
|
|
61
|
+
op = body.call(thisArg, _);
|
|
62
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
63
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
67
|
+
exports.GetRecentEventsApi = void 0;
|
|
68
|
+
var runtime = require("../runtime");
|
|
69
|
+
var index_1 = require("../models/index");
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
*/
|
|
73
|
+
var GetRecentEventsApi = /** @class */ (function (_super) {
|
|
74
|
+
__extends(GetRecentEventsApi, _super);
|
|
75
|
+
function GetRecentEventsApi() {
|
|
76
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* 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`
|
|
80
|
+
* Recent Events
|
|
81
|
+
*/
|
|
82
|
+
GetRecentEventsApi.prototype.getRecentEventsRaw = function (requestParameters, initOverrides) {
|
|
83
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
84
|
+
var queryParameters, headerParameters, token, tokenString, urlPath, response;
|
|
85
|
+
return __generator(this, function (_a) {
|
|
86
|
+
switch (_a.label) {
|
|
87
|
+
case 0:
|
|
88
|
+
if (requestParameters['floorId'] == null) {
|
|
89
|
+
throw new runtime.RequiredError('floorId', 'Required parameter "floorId" was null or undefined when calling getRecentEvents().');
|
|
90
|
+
}
|
|
91
|
+
queryParameters = {};
|
|
92
|
+
if (requestParameters['userId'] != null) {
|
|
93
|
+
queryParameters['user_id'] = requestParameters['userId'];
|
|
94
|
+
}
|
|
95
|
+
if (requestParameters['floorId'] != null) {
|
|
96
|
+
queryParameters['floor_id'] = requestParameters['floorId'];
|
|
97
|
+
}
|
|
98
|
+
if (requestParameters['appId'] != null) {
|
|
99
|
+
queryParameters['app_id'] = requestParameters['appId'];
|
|
100
|
+
}
|
|
101
|
+
headerParameters = {};
|
|
102
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
103
|
+
token = this.configuration.accessToken;
|
|
104
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
105
|
+
case 1:
|
|
106
|
+
tokenString = _a.sent();
|
|
107
|
+
if (tokenString) {
|
|
108
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
109
|
+
}
|
|
110
|
+
_a.label = 2;
|
|
111
|
+
case 2:
|
|
112
|
+
urlPath = "/api/memory/recent/events";
|
|
113
|
+
return [4 /*yield*/, this.request({
|
|
114
|
+
path: urlPath,
|
|
115
|
+
method: 'GET',
|
|
116
|
+
headers: headerParameters,
|
|
117
|
+
query: queryParameters,
|
|
118
|
+
}, initOverrides)];
|
|
119
|
+
case 3:
|
|
120
|
+
response = _a.sent();
|
|
121
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GetRecentEvents200ResponseFromJSON)(jsonValue); })];
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* 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`
|
|
128
|
+
* Recent Events
|
|
129
|
+
*/
|
|
130
|
+
GetRecentEventsApi.prototype.getRecentEvents = function (requestParameters, initOverrides) {
|
|
131
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
132
|
+
var response;
|
|
133
|
+
return __generator(this, function (_a) {
|
|
134
|
+
switch (_a.label) {
|
|
135
|
+
case 0: return [4 /*yield*/, this.getRecentEventsRaw(requestParameters, initOverrides)];
|
|
136
|
+
case 1:
|
|
137
|
+
response = _a.sent();
|
|
138
|
+
return [4 /*yield*/, response.value()];
|
|
139
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
};
|
|
144
|
+
return GetRecentEventsApi;
|
|
145
|
+
}(runtime.BaseAPI));
|
|
146
|
+
exports.GetRecentEventsApi = GetRecentEventsApi;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Floor Memory
|
|
3
|
+
* The set APIs are used to develop Floor pds which can be used as their personal assistants. This set of APIs are divided into two parts. - 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.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: contact@ipomo.in
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import type { QueryRequest, QueryResponse } from '../models/index';
|
|
14
|
+
export interface QueryOperationRequest {
|
|
15
|
+
queryRequest: QueryRequest;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
export declare class QueryApi extends runtime.BaseAPI {
|
|
21
|
+
/**
|
|
22
|
+
* # **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.
|
|
23
|
+
* Query (Primary API)
|
|
24
|
+
*/
|
|
25
|
+
queryRaw(requestParameters: QueryOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<QueryResponse>>;
|
|
26
|
+
/**
|
|
27
|
+
* # **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.
|
|
28
|
+
* Query (Primary API)
|
|
29
|
+
*/
|
|
30
|
+
query(requestParameters: QueryOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<QueryResponse>;
|
|
31
|
+
}
|