@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,36 @@
|
|
|
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 { GetFloorInformation200Response } from '../models/index';
|
|
14
|
+
export interface EditFloorRequest {
|
|
15
|
+
floorId: string;
|
|
16
|
+
userId: string;
|
|
17
|
+
appId: string;
|
|
18
|
+
logoFile?: Blob;
|
|
19
|
+
title?: string;
|
|
20
|
+
details?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
export declare class EditFloorApi extends runtime.BaseAPI {
|
|
26
|
+
/**
|
|
27
|
+
* This API updates an existing floor’s profile metadata using **multipart form data**. A floor **can be edited only by its owner**. If the authenticated user is **not the owner of the floor**, the request will be rejected, even if the user is a member or follower of the floor. The API allows the floor owner to update: * Floor **title** * Floor **details/description** * Floor **logo/avatar image** After a successful update, the API returns the **latest floor object**, including the updated avatar and the current list of blocks associated with the floor. --- ## Authorization Rules (Critical) * The caller **must be authenticated** * The caller **must be the owner of the floor** * Members, followers, or pod consumers **cannot** edit the floor * Ownership is validated internally using the authenticated user context > **Ownership is mandatory. There are no partial permissions for this API.** --- ## Content-Type `multipart/form-data` --- ## Request Body (Multipart Form Data) ### Form Fields | Field Name | Type | Required | Description | | ---------- | ------ | ------------ | ---------------------------------------- | | `fid` | String | Recommended* | Immutable internal floor ID | | `floor_id` | String | Optional* | Public / human-readable floor identifier | | `title` | String | Optional | New floor title | | `details` | String | Optional | New floor description | | `logo` | File | Optional | New floor logo image (PNG/JPG/WebP) | * At least **one floor identifier** (`fid` or `floor_id`) must be provided. **Best practice:** Use `fid` as the primary identifier. --- ## Update Rules * At least one of `title`, `details`, or `logo` must be present * Missing update fields result in a validation error * If `logo` is provided, the previous logo is replaced --- ## Response Format `application/json` --- ## Sample Success Response ```json { \"floor_id\": \"my_floor\", \"title\": \"daughter ouch upon yummy clamor\", \"details\": \"nostrud occaecat incididunt dolor adipisicing\", \"fid\": \"86\", \"blocks\": [ { \"bid\": \"83\", \"type\": \"pariatur\", \"title\": \"wherever demobilise acidly refute\" } ], \"avatar\": { \"url\": \"https://legal-availability.name/\", \"id\": \"98\" } } ``` --- ## Error Responses (Authorization Focus) ### Not Floor Owner ```json { \"status\": \"ERROR\", \"message\": \"Only the floor owner can edit this floor\" } ``` ### Floor Not Found ```json { \"status\": \"ERROR\", \"message\": \"Floor not found\" } ``` ### No Update Fields ```json { \"status\": \"ERROR\", \"message\": \"No update fields provided\" } ``` --- ## Notes * This API is **owner-only by design** * Pods and developer tools must operate using **owner credentials** * Blocks are returned for convenience but are **not editable through this API** ---
|
|
28
|
+
* Edit floor
|
|
29
|
+
*/
|
|
30
|
+
editFloorRaw(requestParameters: EditFloorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetFloorInformation200Response>>;
|
|
31
|
+
/**
|
|
32
|
+
* This API updates an existing floor’s profile metadata using **multipart form data**. A floor **can be edited only by its owner**. If the authenticated user is **not the owner of the floor**, the request will be rejected, even if the user is a member or follower of the floor. The API allows the floor owner to update: * Floor **title** * Floor **details/description** * Floor **logo/avatar image** After a successful update, the API returns the **latest floor object**, including the updated avatar and the current list of blocks associated with the floor. --- ## Authorization Rules (Critical) * The caller **must be authenticated** * The caller **must be the owner of the floor** * Members, followers, or pod consumers **cannot** edit the floor * Ownership is validated internally using the authenticated user context > **Ownership is mandatory. There are no partial permissions for this API.** --- ## Content-Type `multipart/form-data` --- ## Request Body (Multipart Form Data) ### Form Fields | Field Name | Type | Required | Description | | ---------- | ------ | ------------ | ---------------------------------------- | | `fid` | String | Recommended* | Immutable internal floor ID | | `floor_id` | String | Optional* | Public / human-readable floor identifier | | `title` | String | Optional | New floor title | | `details` | String | Optional | New floor description | | `logo` | File | Optional | New floor logo image (PNG/JPG/WebP) | * At least **one floor identifier** (`fid` or `floor_id`) must be provided. **Best practice:** Use `fid` as the primary identifier. --- ## Update Rules * At least one of `title`, `details`, or `logo` must be present * Missing update fields result in a validation error * If `logo` is provided, the previous logo is replaced --- ## Response Format `application/json` --- ## Sample Success Response ```json { \"floor_id\": \"my_floor\", \"title\": \"daughter ouch upon yummy clamor\", \"details\": \"nostrud occaecat incididunt dolor adipisicing\", \"fid\": \"86\", \"blocks\": [ { \"bid\": \"83\", \"type\": \"pariatur\", \"title\": \"wherever demobilise acidly refute\" } ], \"avatar\": { \"url\": \"https://legal-availability.name/\", \"id\": \"98\" } } ``` --- ## Error Responses (Authorization Focus) ### Not Floor Owner ```json { \"status\": \"ERROR\", \"message\": \"Only the floor owner can edit this floor\" } ``` ### Floor Not Found ```json { \"status\": \"ERROR\", \"message\": \"Floor not found\" } ``` ### No Update Fields ```json { \"status\": \"ERROR\", \"message\": \"No update fields provided\" } ``` --- ## Notes * This API is **owner-only by design** * Pods and developer tools must operate using **owner credentials** * Blocks are returned for convenience but are **not editable through this API** ---
|
|
33
|
+
* Edit floor
|
|
34
|
+
*/
|
|
35
|
+
editFloor(requestParameters: EditFloorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetFloorInformation200Response>;
|
|
36
|
+
}
|
|
@@ -0,0 +1,173 @@
|
|
|
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.EditFloorApi = void 0;
|
|
68
|
+
var runtime = require("../runtime");
|
|
69
|
+
var index_1 = require("../models/index");
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
*/
|
|
73
|
+
var EditFloorApi = /** @class */ (function (_super) {
|
|
74
|
+
__extends(EditFloorApi, _super);
|
|
75
|
+
function EditFloorApi() {
|
|
76
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* This API updates an existing floor’s profile metadata using **multipart form data**. A floor **can be edited only by its owner**. If the authenticated user is **not the owner of the floor**, the request will be rejected, even if the user is a member or follower of the floor. The API allows the floor owner to update: * Floor **title** * Floor **details/description** * Floor **logo/avatar image** After a successful update, the API returns the **latest floor object**, including the updated avatar and the current list of blocks associated with the floor. --- ## Authorization Rules (Critical) * The caller **must be authenticated** * The caller **must be the owner of the floor** * Members, followers, or pod consumers **cannot** edit the floor * Ownership is validated internally using the authenticated user context > **Ownership is mandatory. There are no partial permissions for this API.** --- ## Content-Type `multipart/form-data` --- ## Request Body (Multipart Form Data) ### Form Fields | Field Name | Type | Required | Description | | ---------- | ------ | ------------ | ---------------------------------------- | | `fid` | String | Recommended* | Immutable internal floor ID | | `floor_id` | String | Optional* | Public / human-readable floor identifier | | `title` | String | Optional | New floor title | | `details` | String | Optional | New floor description | | `logo` | File | Optional | New floor logo image (PNG/JPG/WebP) | * At least **one floor identifier** (`fid` or `floor_id`) must be provided. **Best practice:** Use `fid` as the primary identifier. --- ## Update Rules * At least one of `title`, `details`, or `logo` must be present * Missing update fields result in a validation error * If `logo` is provided, the previous logo is replaced --- ## Response Format `application/json` --- ## Sample Success Response ```json { \"floor_id\": \"my_floor\", \"title\": \"daughter ouch upon yummy clamor\", \"details\": \"nostrud occaecat incididunt dolor adipisicing\", \"fid\": \"86\", \"blocks\": [ { \"bid\": \"83\", \"type\": \"pariatur\", \"title\": \"wherever demobilise acidly refute\" } ], \"avatar\": { \"url\": \"https://legal-availability.name/\", \"id\": \"98\" } } ``` --- ## Error Responses (Authorization Focus) ### Not Floor Owner ```json { \"status\": \"ERROR\", \"message\": \"Only the floor owner can edit this floor\" } ``` ### Floor Not Found ```json { \"status\": \"ERROR\", \"message\": \"Floor not found\" } ``` ### No Update Fields ```json { \"status\": \"ERROR\", \"message\": \"No update fields provided\" } ``` --- ## Notes * This API is **owner-only by design** * Pods and developer tools must operate using **owner credentials** * Blocks are returned for convenience but are **not editable through this API** ---
|
|
80
|
+
* Edit floor
|
|
81
|
+
*/
|
|
82
|
+
EditFloorApi.prototype.editFloorRaw = function (requestParameters, initOverrides) {
|
|
83
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
84
|
+
var queryParameters, headerParameters, token, tokenString, consumes, canConsumeForm, formParams, useForm, 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 editFloor().');
|
|
90
|
+
}
|
|
91
|
+
if (requestParameters['userId'] == null) {
|
|
92
|
+
throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling editFloor().');
|
|
93
|
+
}
|
|
94
|
+
if (requestParameters['appId'] == null) {
|
|
95
|
+
throw new runtime.RequiredError('appId', 'Required parameter "appId" was null or undefined when calling editFloor().');
|
|
96
|
+
}
|
|
97
|
+
queryParameters = {};
|
|
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
|
+
consumes = [
|
|
110
|
+
{ contentType: 'multipart/form-data' },
|
|
111
|
+
];
|
|
112
|
+
canConsumeForm = runtime.canConsumeForm(consumes);
|
|
113
|
+
useForm = false;
|
|
114
|
+
// use FormData to transmit files using content-type "multipart/form-data"
|
|
115
|
+
useForm = canConsumeForm;
|
|
116
|
+
if (useForm) {
|
|
117
|
+
formParams = new FormData();
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
formParams = new URLSearchParams();
|
|
121
|
+
}
|
|
122
|
+
if (requestParameters['userId'] != null) {
|
|
123
|
+
formParams.append('user_id', requestParameters['userId']);
|
|
124
|
+
}
|
|
125
|
+
if (requestParameters['appId'] != null) {
|
|
126
|
+
formParams.append('app_id', requestParameters['appId']);
|
|
127
|
+
}
|
|
128
|
+
if (requestParameters['logoFile'] != null) {
|
|
129
|
+
formParams.append('logo_file', requestParameters['logoFile']);
|
|
130
|
+
}
|
|
131
|
+
if (requestParameters['title'] != null) {
|
|
132
|
+
formParams.append('title', requestParameters['title']);
|
|
133
|
+
}
|
|
134
|
+
if (requestParameters['details'] != null) {
|
|
135
|
+
formParams.append('details', requestParameters['details']);
|
|
136
|
+
}
|
|
137
|
+
urlPath = "/api/memory/edit/floor/{floor_id}";
|
|
138
|
+
urlPath = urlPath.replace("{".concat("floor_id", "}"), encodeURIComponent(String(requestParameters['floorId'])));
|
|
139
|
+
return [4 /*yield*/, this.request({
|
|
140
|
+
path: urlPath,
|
|
141
|
+
method: 'POST',
|
|
142
|
+
headers: headerParameters,
|
|
143
|
+
query: queryParameters,
|
|
144
|
+
body: formParams,
|
|
145
|
+
}, initOverrides)];
|
|
146
|
+
case 3:
|
|
147
|
+
response = _a.sent();
|
|
148
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GetFloorInformation200ResponseFromJSON)(jsonValue); })];
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
* This API updates an existing floor’s profile metadata using **multipart form data**. A floor **can be edited only by its owner**. If the authenticated user is **not the owner of the floor**, the request will be rejected, even if the user is a member or follower of the floor. The API allows the floor owner to update: * Floor **title** * Floor **details/description** * Floor **logo/avatar image** After a successful update, the API returns the **latest floor object**, including the updated avatar and the current list of blocks associated with the floor. --- ## Authorization Rules (Critical) * The caller **must be authenticated** * The caller **must be the owner of the floor** * Members, followers, or pod consumers **cannot** edit the floor * Ownership is validated internally using the authenticated user context > **Ownership is mandatory. There are no partial permissions for this API.** --- ## Content-Type `multipart/form-data` --- ## Request Body (Multipart Form Data) ### Form Fields | Field Name | Type | Required | Description | | ---------- | ------ | ------------ | ---------------------------------------- | | `fid` | String | Recommended* | Immutable internal floor ID | | `floor_id` | String | Optional* | Public / human-readable floor identifier | | `title` | String | Optional | New floor title | | `details` | String | Optional | New floor description | | `logo` | File | Optional | New floor logo image (PNG/JPG/WebP) | * At least **one floor identifier** (`fid` or `floor_id`) must be provided. **Best practice:** Use `fid` as the primary identifier. --- ## Update Rules * At least one of `title`, `details`, or `logo` must be present * Missing update fields result in a validation error * If `logo` is provided, the previous logo is replaced --- ## Response Format `application/json` --- ## Sample Success Response ```json { \"floor_id\": \"my_floor\", \"title\": \"daughter ouch upon yummy clamor\", \"details\": \"nostrud occaecat incididunt dolor adipisicing\", \"fid\": \"86\", \"blocks\": [ { \"bid\": \"83\", \"type\": \"pariatur\", \"title\": \"wherever demobilise acidly refute\" } ], \"avatar\": { \"url\": \"https://legal-availability.name/\", \"id\": \"98\" } } ``` --- ## Error Responses (Authorization Focus) ### Not Floor Owner ```json { \"status\": \"ERROR\", \"message\": \"Only the floor owner can edit this floor\" } ``` ### Floor Not Found ```json { \"status\": \"ERROR\", \"message\": \"Floor not found\" } ``` ### No Update Fields ```json { \"status\": \"ERROR\", \"message\": \"No update fields provided\" } ``` --- ## Notes * This API is **owner-only by design** * Pods and developer tools must operate using **owner credentials** * Blocks are returned for convenience but are **not editable through this API** ---
|
|
155
|
+
* Edit floor
|
|
156
|
+
*/
|
|
157
|
+
EditFloorApi.prototype.editFloor = function (requestParameters, initOverrides) {
|
|
158
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
159
|
+
var response;
|
|
160
|
+
return __generator(this, function (_a) {
|
|
161
|
+
switch (_a.label) {
|
|
162
|
+
case 0: return [4 /*yield*/, this.editFloorRaw(requestParameters, initOverrides)];
|
|
163
|
+
case 1:
|
|
164
|
+
response = _a.sent();
|
|
165
|
+
return [4 /*yield*/, response.value()];
|
|
166
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
});
|
|
170
|
+
};
|
|
171
|
+
return EditFloorApi;
|
|
172
|
+
}(runtime.BaseAPI));
|
|
173
|
+
exports.EditFloorApi = EditFloorApi;
|
|
@@ -0,0 +1,32 @@
|
|
|
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 { EventResponse } from '../models/index';
|
|
14
|
+
export interface EventRequest {
|
|
15
|
+
inputInfo: string;
|
|
16
|
+
files?: Blob;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
export declare class EventApi extends runtime.BaseAPI {
|
|
22
|
+
/**
|
|
23
|
+
* Posts into the given floor_id. This is asynchronous ingestion. 200 OK means queued, not immediately retrievable. This API allows a user to **post personal content into their POD (Personal Object Database)**. The posted content is stored under a specified **floor**, embedded by the platform, and made available for **semantic querying, conversational retrieval, and memory-based interactions**. It is primarily used to: * Save reminders, notes, writeups, or personal knowledge * Upload content that the user wants the system to remember * Add information that should later be discoverable via conversational queries The content may consist of **text only** or **text combined with one or more media files**. --- ## **Key Capabilities** * Stores user-generated content inside a specific floor * Supports **multi-modal inputs** (text + media) * Automatically embeds content for semantic search * Makes content available to: * `/agent/memory/query` * conversational agents * future recall and analytics * Associates content with user, block, and application context --- ## **Authentication** * Requires a valid, authenticated `user_id` * The calling application is responsible for user authentication * `app_id` identifies the application context --- ## **Request Type** **Content-Type:** `multipart/form-data` --- ## **Request Parameters** ### **1. Files (Optional)** | Field | Type | Required | Description | | ------- | ------ | -------- | --------------------------------------------------------------------- | | `files` | file[] | Optional | Media files to attach to the content. Multiple files may be uploaded. | **Supported formats include (but are not limited to):** * Images: `jpg`, `png` * Audio: `mp3` * Documents: `pdf` * Video: `mp4` These files are processed and embedded along with the textual content where applicable. --- ### **2. Input Information (Required)** | Field | Type | Required | Description | | ------------ | ------------- | -------- | ----------------------------------------------------------------- | | `input_info` | string (JSON) | Yes | JSON string containing metadata and textual content for the post. | --- ## **`input_info` Structure** ```json { \"floor_id\": \"my_floor\", \"BID\": \"17845683456\", \"user_id\": \"145623907625\", \"title\": \"My floor\", \"description\": \"My floor details\", \"app_id\": \"165434879028\" } ``` --- ### **Field Descriptions** | Field | Type | Required | Description | | ------------- | ------ | -------- | ---------------------------------------------------------------------------------- | | `floor_id` | string | Yes | Identifier of the user’s floor (POD) where the content will be stored. | | `block_type` | string | Yes | Type of block under which the content is categorized (e.g., post, note, reminder). | | `BID` | string | Yes | Block identifier associated with this content. | | `user_id` | string | Yes | Unique identifier of the user posting the content. | | `title` | string | Optional | Title or short heading for the content. | | `description` | string | Yes | Main textual content to be stored and embedded. | | `app_id` | string | Optional | Identifier of the calling application. | --- ## **Behavior** 1. The API validates the user and floor context. 2. Textual content (`title` and `description`) is ingested. 3. Attached media files are processed and linked to the content. 4. Embeddings are generated for: * Text * Supported media (where applicable) 5. The content becomes part of the user’s **personal memory store**. 6. The stored data is immediately available for querying and conversational retrieval. --- ## **Successful Response** On success, the API confirms that: * The content has been stored * Embeddings have been generated * The memory item is available for future queries A success status and reference identifiers are returned. --- ## **Error Handling** The API may return errors if: * Required fields are missing (`floor_id`, `user_id`, `description`) * Unsupported file formats are uploaded * The user does not have access to the specified floor * The request payload is malformed * Internal embedding or storage operations fail --- ## **Typical Use Cases** * Saving personal reminders * Posting notes or observations * Uploading documents for future reference * Creating a personal knowledge base * Feeding data into conversational agents --- ## **One-Line Summary** > Stores user-generated text and media into a personal POD, embeds it for semantic search, and makes it available for conversational querying. ⚠️ Content Ingestion is Asynchronous The Create Event API queues content for processing. A successful response indicates **acceptance**, not availability. Newly ingested content may take time to become searchable via the Query API.
|
|
24
|
+
* Create Event (Post Content)
|
|
25
|
+
*/
|
|
26
|
+
eventRaw(requestParameters: EventRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EventResponse>>;
|
|
27
|
+
/**
|
|
28
|
+
* Posts into the given floor_id. This is asynchronous ingestion. 200 OK means queued, not immediately retrievable. This API allows a user to **post personal content into their POD (Personal Object Database)**. The posted content is stored under a specified **floor**, embedded by the platform, and made available for **semantic querying, conversational retrieval, and memory-based interactions**. It is primarily used to: * Save reminders, notes, writeups, or personal knowledge * Upload content that the user wants the system to remember * Add information that should later be discoverable via conversational queries The content may consist of **text only** or **text combined with one or more media files**. --- ## **Key Capabilities** * Stores user-generated content inside a specific floor * Supports **multi-modal inputs** (text + media) * Automatically embeds content for semantic search * Makes content available to: * `/agent/memory/query` * conversational agents * future recall and analytics * Associates content with user, block, and application context --- ## **Authentication** * Requires a valid, authenticated `user_id` * The calling application is responsible for user authentication * `app_id` identifies the application context --- ## **Request Type** **Content-Type:** `multipart/form-data` --- ## **Request Parameters** ### **1. Files (Optional)** | Field | Type | Required | Description | | ------- | ------ | -------- | --------------------------------------------------------------------- | | `files` | file[] | Optional | Media files to attach to the content. Multiple files may be uploaded. | **Supported formats include (but are not limited to):** * Images: `jpg`, `png` * Audio: `mp3` * Documents: `pdf` * Video: `mp4` These files are processed and embedded along with the textual content where applicable. --- ### **2. Input Information (Required)** | Field | Type | Required | Description | | ------------ | ------------- | -------- | ----------------------------------------------------------------- | | `input_info` | string (JSON) | Yes | JSON string containing metadata and textual content for the post. | --- ## **`input_info` Structure** ```json { \"floor_id\": \"my_floor\", \"BID\": \"17845683456\", \"user_id\": \"145623907625\", \"title\": \"My floor\", \"description\": \"My floor details\", \"app_id\": \"165434879028\" } ``` --- ### **Field Descriptions** | Field | Type | Required | Description | | ------------- | ------ | -------- | ---------------------------------------------------------------------------------- | | `floor_id` | string | Yes | Identifier of the user’s floor (POD) where the content will be stored. | | `block_type` | string | Yes | Type of block under which the content is categorized (e.g., post, note, reminder). | | `BID` | string | Yes | Block identifier associated with this content. | | `user_id` | string | Yes | Unique identifier of the user posting the content. | | `title` | string | Optional | Title or short heading for the content. | | `description` | string | Yes | Main textual content to be stored and embedded. | | `app_id` | string | Optional | Identifier of the calling application. | --- ## **Behavior** 1. The API validates the user and floor context. 2. Textual content (`title` and `description`) is ingested. 3. Attached media files are processed and linked to the content. 4. Embeddings are generated for: * Text * Supported media (where applicable) 5. The content becomes part of the user’s **personal memory store**. 6. The stored data is immediately available for querying and conversational retrieval. --- ## **Successful Response** On success, the API confirms that: * The content has been stored * Embeddings have been generated * The memory item is available for future queries A success status and reference identifiers are returned. --- ## **Error Handling** The API may return errors if: * Required fields are missing (`floor_id`, `user_id`, `description`) * Unsupported file formats are uploaded * The user does not have access to the specified floor * The request payload is malformed * Internal embedding or storage operations fail --- ## **Typical Use Cases** * Saving personal reminders * Posting notes or observations * Uploading documents for future reference * Creating a personal knowledge base * Feeding data into conversational agents --- ## **One-Line Summary** > Stores user-generated text and media into a personal POD, embeds it for semantic search, and makes it available for conversational querying. ⚠️ Content Ingestion is Asynchronous The Create Event API queues content for processing. A successful response indicates **acceptance**, not availability. Newly ingested content may take time to become searchable via the Query API.
|
|
29
|
+
* Create Event (Post Content)
|
|
30
|
+
*/
|
|
31
|
+
event(requestParameters: EventRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EventResponse>;
|
|
32
|
+
}
|
|
@@ -0,0 +1,157 @@
|
|
|
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.EventApi = void 0;
|
|
68
|
+
var runtime = require("../runtime");
|
|
69
|
+
var index_1 = require("../models/index");
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
*/
|
|
73
|
+
var EventApi = /** @class */ (function (_super) {
|
|
74
|
+
__extends(EventApi, _super);
|
|
75
|
+
function EventApi() {
|
|
76
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Posts into the given floor_id. This is asynchronous ingestion. 200 OK means queued, not immediately retrievable. This API allows a user to **post personal content into their POD (Personal Object Database)**. The posted content is stored under a specified **floor**, embedded by the platform, and made available for **semantic querying, conversational retrieval, and memory-based interactions**. It is primarily used to: * Save reminders, notes, writeups, or personal knowledge * Upload content that the user wants the system to remember * Add information that should later be discoverable via conversational queries The content may consist of **text only** or **text combined with one or more media files**. --- ## **Key Capabilities** * Stores user-generated content inside a specific floor * Supports **multi-modal inputs** (text + media) * Automatically embeds content for semantic search * Makes content available to: * `/agent/memory/query` * conversational agents * future recall and analytics * Associates content with user, block, and application context --- ## **Authentication** * Requires a valid, authenticated `user_id` * The calling application is responsible for user authentication * `app_id` identifies the application context --- ## **Request Type** **Content-Type:** `multipart/form-data` --- ## **Request Parameters** ### **1. Files (Optional)** | Field | Type | Required | Description | | ------- | ------ | -------- | --------------------------------------------------------------------- | | `files` | file[] | Optional | Media files to attach to the content. Multiple files may be uploaded. | **Supported formats include (but are not limited to):** * Images: `jpg`, `png` * Audio: `mp3` * Documents: `pdf` * Video: `mp4` These files are processed and embedded along with the textual content where applicable. --- ### **2. Input Information (Required)** | Field | Type | Required | Description | | ------------ | ------------- | -------- | ----------------------------------------------------------------- | | `input_info` | string (JSON) | Yes | JSON string containing metadata and textual content for the post. | --- ## **`input_info` Structure** ```json { \"floor_id\": \"my_floor\", \"BID\": \"17845683456\", \"user_id\": \"145623907625\", \"title\": \"My floor\", \"description\": \"My floor details\", \"app_id\": \"165434879028\" } ``` --- ### **Field Descriptions** | Field | Type | Required | Description | | ------------- | ------ | -------- | ---------------------------------------------------------------------------------- | | `floor_id` | string | Yes | Identifier of the user’s floor (POD) where the content will be stored. | | `block_type` | string | Yes | Type of block under which the content is categorized (e.g., post, note, reminder). | | `BID` | string | Yes | Block identifier associated with this content. | | `user_id` | string | Yes | Unique identifier of the user posting the content. | | `title` | string | Optional | Title or short heading for the content. | | `description` | string | Yes | Main textual content to be stored and embedded. | | `app_id` | string | Optional | Identifier of the calling application. | --- ## **Behavior** 1. The API validates the user and floor context. 2. Textual content (`title` and `description`) is ingested. 3. Attached media files are processed and linked to the content. 4. Embeddings are generated for: * Text * Supported media (where applicable) 5. The content becomes part of the user’s **personal memory store**. 6. The stored data is immediately available for querying and conversational retrieval. --- ## **Successful Response** On success, the API confirms that: * The content has been stored * Embeddings have been generated * The memory item is available for future queries A success status and reference identifiers are returned. --- ## **Error Handling** The API may return errors if: * Required fields are missing (`floor_id`, `user_id`, `description`) * Unsupported file formats are uploaded * The user does not have access to the specified floor * The request payload is malformed * Internal embedding or storage operations fail --- ## **Typical Use Cases** * Saving personal reminders * Posting notes or observations * Uploading documents for future reference * Creating a personal knowledge base * Feeding data into conversational agents --- ## **One-Line Summary** > Stores user-generated text and media into a personal POD, embeds it for semantic search, and makes it available for conversational querying. ⚠️ Content Ingestion is Asynchronous The Create Event API queues content for processing. A successful response indicates **acceptance**, not availability. Newly ingested content may take time to become searchable via the Query API.
|
|
80
|
+
* Create Event (Post Content)
|
|
81
|
+
*/
|
|
82
|
+
EventApi.prototype.eventRaw = function (requestParameters, initOverrides) {
|
|
83
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
84
|
+
var queryParameters, headerParameters, token, tokenString, consumes, canConsumeForm, formParams, useForm, urlPath, response;
|
|
85
|
+
return __generator(this, function (_a) {
|
|
86
|
+
switch (_a.label) {
|
|
87
|
+
case 0:
|
|
88
|
+
if (requestParameters['inputInfo'] == null) {
|
|
89
|
+
throw new runtime.RequiredError('inputInfo', 'Required parameter "inputInfo" was null or undefined when calling event().');
|
|
90
|
+
}
|
|
91
|
+
queryParameters = {};
|
|
92
|
+
headerParameters = {};
|
|
93
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
94
|
+
token = this.configuration.accessToken;
|
|
95
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
96
|
+
case 1:
|
|
97
|
+
tokenString = _a.sent();
|
|
98
|
+
if (tokenString) {
|
|
99
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
100
|
+
}
|
|
101
|
+
_a.label = 2;
|
|
102
|
+
case 2:
|
|
103
|
+
consumes = [
|
|
104
|
+
{ contentType: 'multipart/form-data' },
|
|
105
|
+
];
|
|
106
|
+
canConsumeForm = runtime.canConsumeForm(consumes);
|
|
107
|
+
useForm = false;
|
|
108
|
+
// use FormData to transmit files using content-type "multipart/form-data"
|
|
109
|
+
useForm = canConsumeForm;
|
|
110
|
+
if (useForm) {
|
|
111
|
+
formParams = new FormData();
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
formParams = new URLSearchParams();
|
|
115
|
+
}
|
|
116
|
+
if (requestParameters['files'] != null) {
|
|
117
|
+
formParams.append('files', requestParameters['files']);
|
|
118
|
+
}
|
|
119
|
+
if (requestParameters['inputInfo'] != null) {
|
|
120
|
+
formParams.append('input_info', requestParameters['inputInfo']);
|
|
121
|
+
}
|
|
122
|
+
urlPath = "/api/memory/events";
|
|
123
|
+
return [4 /*yield*/, this.request({
|
|
124
|
+
path: urlPath,
|
|
125
|
+
method: 'POST',
|
|
126
|
+
headers: headerParameters,
|
|
127
|
+
query: queryParameters,
|
|
128
|
+
body: formParams,
|
|
129
|
+
}, initOverrides)];
|
|
130
|
+
case 3:
|
|
131
|
+
response = _a.sent();
|
|
132
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.EventResponseFromJSON)(jsonValue); })];
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* Posts into the given floor_id. This is asynchronous ingestion. 200 OK means queued, not immediately retrievable. This API allows a user to **post personal content into their POD (Personal Object Database)**. The posted content is stored under a specified **floor**, embedded by the platform, and made available for **semantic querying, conversational retrieval, and memory-based interactions**. It is primarily used to: * Save reminders, notes, writeups, or personal knowledge * Upload content that the user wants the system to remember * Add information that should later be discoverable via conversational queries The content may consist of **text only** or **text combined with one or more media files**. --- ## **Key Capabilities** * Stores user-generated content inside a specific floor * Supports **multi-modal inputs** (text + media) * Automatically embeds content for semantic search * Makes content available to: * `/agent/memory/query` * conversational agents * future recall and analytics * Associates content with user, block, and application context --- ## **Authentication** * Requires a valid, authenticated `user_id` * The calling application is responsible for user authentication * `app_id` identifies the application context --- ## **Request Type** **Content-Type:** `multipart/form-data` --- ## **Request Parameters** ### **1. Files (Optional)** | Field | Type | Required | Description | | ------- | ------ | -------- | --------------------------------------------------------------------- | | `files` | file[] | Optional | Media files to attach to the content. Multiple files may be uploaded. | **Supported formats include (but are not limited to):** * Images: `jpg`, `png` * Audio: `mp3` * Documents: `pdf` * Video: `mp4` These files are processed and embedded along with the textual content where applicable. --- ### **2. Input Information (Required)** | Field | Type | Required | Description | | ------------ | ------------- | -------- | ----------------------------------------------------------------- | | `input_info` | string (JSON) | Yes | JSON string containing metadata and textual content for the post. | --- ## **`input_info` Structure** ```json { \"floor_id\": \"my_floor\", \"BID\": \"17845683456\", \"user_id\": \"145623907625\", \"title\": \"My floor\", \"description\": \"My floor details\", \"app_id\": \"165434879028\" } ``` --- ### **Field Descriptions** | Field | Type | Required | Description | | ------------- | ------ | -------- | ---------------------------------------------------------------------------------- | | `floor_id` | string | Yes | Identifier of the user’s floor (POD) where the content will be stored. | | `block_type` | string | Yes | Type of block under which the content is categorized (e.g., post, note, reminder). | | `BID` | string | Yes | Block identifier associated with this content. | | `user_id` | string | Yes | Unique identifier of the user posting the content. | | `title` | string | Optional | Title or short heading for the content. | | `description` | string | Yes | Main textual content to be stored and embedded. | | `app_id` | string | Optional | Identifier of the calling application. | --- ## **Behavior** 1. The API validates the user and floor context. 2. Textual content (`title` and `description`) is ingested. 3. Attached media files are processed and linked to the content. 4. Embeddings are generated for: * Text * Supported media (where applicable) 5. The content becomes part of the user’s **personal memory store**. 6. The stored data is immediately available for querying and conversational retrieval. --- ## **Successful Response** On success, the API confirms that: * The content has been stored * Embeddings have been generated * The memory item is available for future queries A success status and reference identifiers are returned. --- ## **Error Handling** The API may return errors if: * Required fields are missing (`floor_id`, `user_id`, `description`) * Unsupported file formats are uploaded * The user does not have access to the specified floor * The request payload is malformed * Internal embedding or storage operations fail --- ## **Typical Use Cases** * Saving personal reminders * Posting notes or observations * Uploading documents for future reference * Creating a personal knowledge base * Feeding data into conversational agents --- ## **One-Line Summary** > Stores user-generated text and media into a personal POD, embeds it for semantic search, and makes it available for conversational querying. ⚠️ Content Ingestion is Asynchronous The Create Event API queues content for processing. A successful response indicates **acceptance**, not availability. Newly ingested content may take time to become searchable via the Query API.
|
|
139
|
+
* Create Event (Post Content)
|
|
140
|
+
*/
|
|
141
|
+
EventApi.prototype.event = function (requestParameters, initOverrides) {
|
|
142
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
143
|
+
var response;
|
|
144
|
+
return __generator(this, function (_a) {
|
|
145
|
+
switch (_a.label) {
|
|
146
|
+
case 0: return [4 /*yield*/, this.eventRaw(requestParameters, initOverrides)];
|
|
147
|
+
case 1:
|
|
148
|
+
response = _a.sent();
|
|
149
|
+
return [4 /*yield*/, response.value()];
|
|
150
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
});
|
|
154
|
+
};
|
|
155
|
+
return EventApi;
|
|
156
|
+
}(runtime.BaseAPI));
|
|
157
|
+
exports.EventApi = EventApi;
|
|
@@ -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 { GetFloorInformation200Response } from '../models/index';
|
|
14
|
+
export interface GetFloorInformationRequest {
|
|
15
|
+
floorId: string;
|
|
16
|
+
userId?: string;
|
|
17
|
+
appId?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
export declare class GetFloorInformationApi extends runtime.BaseAPI {
|
|
23
|
+
/**
|
|
24
|
+
* 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?”**
|
|
25
|
+
* Basic information of a floor
|
|
26
|
+
*/
|
|
27
|
+
getFloorInformationRaw(requestParameters: GetFloorInformationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetFloorInformation200Response>>;
|
|
28
|
+
/**
|
|
29
|
+
* 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?”**
|
|
30
|
+
* Basic information of a floor
|
|
31
|
+
*/
|
|
32
|
+
getFloorInformation(requestParameters: GetFloorInformationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetFloorInformation200Response>;
|
|
33
|
+
}
|