@xfloor/floor-memory-sdk-ts 1.0.19 → 1.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/README.md +56 -50
  2. package/dist/apis/{DefaultApi.d.ts → AuthApi.d.ts} +21 -51
  3. package/dist/apis/{DefaultApi.js → AuthApi.js} +57 -196
  4. package/dist/apis/EventApi.d.ts +16 -1
  5. package/dist/apis/EventApi.js +69 -0
  6. package/dist/apis/FloorApi.d.ts +99 -0
  7. package/dist/apis/FloorApi.js +460 -0
  8. package/dist/apis/index.d.ts +2 -4
  9. package/dist/apis/index.js +2 -4
  10. package/dist/models/ChangeEmail200Response.d.ts +48 -0
  11. package/dist/models/ChangeEmail200Response.js +61 -0
  12. package/dist/models/{SignInWithEmail200ResponsePodInfo.d.ts → ChangeEmail200ResponsePodInfo.d.ts} +16 -16
  13. package/dist/models/{SignInWithEmail200ResponsePodInfo.js → ChangeEmail200ResponsePodInfo.js} +13 -13
  14. package/dist/models/ChangeEmail200ResponseProfile.d.ts +84 -0
  15. package/dist/models/{SignInWithEmail200ResponseProfile.js → ChangeEmail200ResponseProfile.js} +20 -20
  16. package/dist/models/ChangeEmail200ResponseProfileAvatar.d.ts +40 -0
  17. package/dist/models/{SignInWithEmail200ResponseProfileAvatar.js → ChangeEmail200ResponseProfileAvatar.js} +13 -13
  18. package/dist/models/{GetFloorInformation200Response.d.ts → EditFloor200Response.d.ts} +17 -17
  19. package/dist/models/{GetFloorInformation200Response.js → EditFloor200Response.js} +13 -13
  20. package/dist/models/SignInResponse.d.ts +48 -0
  21. package/dist/models/SignInResponse.js +61 -0
  22. package/dist/models/UserDetails.d.ts +6 -6
  23. package/dist/models/UserDetails.js +6 -6
  24. package/dist/models/index.d.ts +6 -5
  25. package/dist/models/index.js +6 -5
  26. package/package.json +1 -1
  27. package/dist/apis/EditFloorApi.d.ts +0 -38
  28. package/dist/apis/EditFloorApi.js +0 -175
  29. package/dist/apis/GetFloorInformationApi.d.ts +0 -35
  30. package/dist/apis/GetFloorInformationApi.js +0 -149
  31. package/dist/apis/GetRecentEventsApi.d.ts +0 -35
  32. package/dist/apis/GetRecentEventsApi.js +0 -151
  33. package/dist/models/SignInWithEmail200Response.d.ts +0 -48
  34. package/dist/models/SignInWithEmail200Response.js +0 -61
  35. package/dist/models/SignInWithEmail200ResponseProfile.d.ts +0 -84
  36. package/dist/models/SignInWithEmail200ResponseProfileAvatar.d.ts +0 -40
@@ -0,0 +1,61 @@
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.
7
+ * - Memory and
8
+ * - Registration. The developer has two ways of using the APIs for the app development. Developer can choose to the Registration APIs for using the existing xfloor infracture or can implement custom Registration process. In the case of custom registration process, the developer is bound to provide proper authentication mechanisms and then send the user information to xlfoor.
9
+ *
10
+ * The version of the OpenAPI document: 1.0.0
11
+ * Contact: contact@ipomo.in
12
+ *
13
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
14
+ * https://openapi-generator.tech
15
+ * Do not edit the class manually.
16
+ */
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.instanceOfSignInResponse = instanceOfSignInResponse;
19
+ exports.SignInResponseFromJSON = SignInResponseFromJSON;
20
+ exports.SignInResponseFromJSONTyped = SignInResponseFromJSONTyped;
21
+ exports.SignInResponseToJSON = SignInResponseToJSON;
22
+ exports.SignInResponseToJSONTyped = SignInResponseToJSONTyped;
23
+ var ChangeEmail200ResponseProfile_1 = require("./ChangeEmail200ResponseProfile");
24
+ var ChangeEmail200ResponsePodInfo_1 = require("./ChangeEmail200ResponsePodInfo");
25
+ /**
26
+ * Check if a given object implements the SignInResponse interface.
27
+ */
28
+ function instanceOfSignInResponse(value) {
29
+ if (!('profile' in value) || value['profile'] === undefined)
30
+ return false;
31
+ if (!('podInfo' in value) || value['podInfo'] === undefined)
32
+ return false;
33
+ return true;
34
+ }
35
+ function SignInResponseFromJSON(json) {
36
+ return SignInResponseFromJSONTyped(json, false);
37
+ }
38
+ function SignInResponseFromJSONTyped(json, ignoreDiscriminator) {
39
+ if (json == null) {
40
+ return json;
41
+ }
42
+ return {
43
+ 'profile': (0, ChangeEmail200ResponseProfile_1.ChangeEmail200ResponseProfileFromJSON)(json['profile']),
44
+ 'podInfo': (0, ChangeEmail200ResponsePodInfo_1.ChangeEmail200ResponsePodInfoFromJSON)(json['pod_info']),
45
+ 'appId': json['app_id'] == null ? undefined : json['app_id'],
46
+ };
47
+ }
48
+ function SignInResponseToJSON(json) {
49
+ return SignInResponseToJSONTyped(json, false);
50
+ }
51
+ function SignInResponseToJSONTyped(value, ignoreDiscriminator) {
52
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
53
+ if (value == null) {
54
+ return value;
55
+ }
56
+ return {
57
+ 'profile': (0, ChangeEmail200ResponseProfile_1.ChangeEmail200ResponseProfileToJSON)(value['profile']),
58
+ 'pod_info': (0, ChangeEmail200ResponsePodInfo_1.ChangeEmail200ResponsePodInfoToJSON)(value['podInfo']),
59
+ 'app_id': value['appId'],
60
+ };
61
+ }
@@ -11,8 +11,8 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
- import type { SignInWithEmail200ResponsePodInfo } from './SignInWithEmail200ResponsePodInfo';
15
- import type { SignInWithEmail200ResponseProfile } from './SignInWithEmail200ResponseProfile';
14
+ import type { ChangeEmail200ResponseProfile } from './ChangeEmail200ResponseProfile';
15
+ import type { ChangeEmail200ResponsePodInfo } from './ChangeEmail200ResponsePodInfo';
16
16
  /**
17
17
  *
18
18
  * @export
@@ -21,16 +21,16 @@ import type { SignInWithEmail200ResponseProfile } from './SignInWithEmail200Resp
21
21
  export interface UserDetails {
22
22
  /**
23
23
  *
24
- * @type {SignInWithEmail200ResponseProfile}
24
+ * @type {ChangeEmail200ResponseProfile}
25
25
  * @memberof UserDetails
26
26
  */
27
- profile: SignInWithEmail200ResponseProfile;
27
+ profile: ChangeEmail200ResponseProfile;
28
28
  /**
29
29
  *
30
- * @type {SignInWithEmail200ResponsePodInfo}
30
+ * @type {ChangeEmail200ResponsePodInfo}
31
31
  * @memberof UserDetails
32
32
  */
33
- podInfo: SignInWithEmail200ResponsePodInfo;
33
+ podInfo: ChangeEmail200ResponsePodInfo;
34
34
  /**
35
35
  * App ID
36
36
  * @type {string}
@@ -20,8 +20,8 @@ exports.UserDetailsFromJSON = UserDetailsFromJSON;
20
20
  exports.UserDetailsFromJSONTyped = UserDetailsFromJSONTyped;
21
21
  exports.UserDetailsToJSON = UserDetailsToJSON;
22
22
  exports.UserDetailsToJSONTyped = UserDetailsToJSONTyped;
23
- var SignInWithEmail200ResponsePodInfo_1 = require("./SignInWithEmail200ResponsePodInfo");
24
- var SignInWithEmail200ResponseProfile_1 = require("./SignInWithEmail200ResponseProfile");
23
+ var ChangeEmail200ResponseProfile_1 = require("./ChangeEmail200ResponseProfile");
24
+ var ChangeEmail200ResponsePodInfo_1 = require("./ChangeEmail200ResponsePodInfo");
25
25
  /**
26
26
  * Check if a given object implements the UserDetails interface.
27
27
  */
@@ -40,8 +40,8 @@ function UserDetailsFromJSONTyped(json, ignoreDiscriminator) {
40
40
  return json;
41
41
  }
42
42
  return {
43
- 'profile': (0, SignInWithEmail200ResponseProfile_1.SignInWithEmail200ResponseProfileFromJSON)(json['profile']),
44
- 'podInfo': (0, SignInWithEmail200ResponsePodInfo_1.SignInWithEmail200ResponsePodInfoFromJSON)(json['pod_info']),
43
+ 'profile': (0, ChangeEmail200ResponseProfile_1.ChangeEmail200ResponseProfileFromJSON)(json['profile']),
44
+ 'podInfo': (0, ChangeEmail200ResponsePodInfo_1.ChangeEmail200ResponsePodInfoFromJSON)(json['pod_info']),
45
45
  'appId': json['app_id'] == null ? undefined : json['app_id'],
46
46
  };
47
47
  }
@@ -54,8 +54,8 @@ function UserDetailsToJSONTyped(value, ignoreDiscriminator) {
54
54
  return value;
55
55
  }
56
56
  return {
57
- 'profile': (0, SignInWithEmail200ResponseProfile_1.SignInWithEmail200ResponseProfileToJSON)(value['profile']),
58
- 'pod_info': (0, SignInWithEmail200ResponsePodInfo_1.SignInWithEmail200ResponsePodInfoToJSON)(value['podInfo']),
57
+ 'profile': (0, ChangeEmail200ResponseProfile_1.ChangeEmail200ResponseProfileToJSON)(value['profile']),
58
+ 'pod_info': (0, ChangeEmail200ResponsePodInfo_1.ChangeEmail200ResponsePodInfoToJSON)(value['podInfo']),
59
59
  'app_id': value['appId'],
60
60
  };
61
61
  }
@@ -1,12 +1,16 @@
1
1
  export * from './BlockDetails';
2
+ export * from './ChangeEmail200Response';
3
+ export * from './ChangeEmail200ResponsePodInfo';
4
+ export * from './ChangeEmail200ResponseProfile';
5
+ export * from './ChangeEmail200ResponseProfileAvatar';
2
6
  export * from './ChangePassword200Response';
7
+ export * from './EditFloor200Response';
3
8
  export * from './EditFloor400Response';
4
9
  export * from './EditFloor400ResponseError';
5
10
  export * from './Event400Response';
6
11
  export * from './Event400ResponseError';
7
12
  export * from './EventResponse';
8
13
  export * from './FloorInfo';
9
- export * from './GetFloorInformation200Response';
10
14
  export * from './GetRecentEvents200Response';
11
15
  export * from './GetRecentEvents200ResponseItemsInner';
12
16
  export * from './GetRecentEvents200ResponseItemsInnerAuthor';
@@ -24,10 +28,7 @@ export * from './Remaining';
24
28
  export * from './ResetPassword200Response';
25
29
  export * from './ResetPassword400Response';
26
30
  export * from './SendValidationCode200Response';
27
- export * from './SignInWithEmail200Response';
28
- export * from './SignInWithEmail200ResponsePodInfo';
29
- export * from './SignInWithEmail200ResponseProfile';
30
- export * from './SignInWithEmail200ResponseProfileAvatar';
31
+ export * from './SignInResponse';
31
32
  export * from './SignUp200Response';
32
33
  export * from './SignUpResponse';
33
34
  export * from './UserDetails';
@@ -17,14 +17,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  /* tslint:disable */
18
18
  /* eslint-disable */
19
19
  __exportStar(require("./BlockDetails"), exports);
20
+ __exportStar(require("./ChangeEmail200Response"), exports);
21
+ __exportStar(require("./ChangeEmail200ResponsePodInfo"), exports);
22
+ __exportStar(require("./ChangeEmail200ResponseProfile"), exports);
23
+ __exportStar(require("./ChangeEmail200ResponseProfileAvatar"), exports);
20
24
  __exportStar(require("./ChangePassword200Response"), exports);
25
+ __exportStar(require("./EditFloor200Response"), exports);
21
26
  __exportStar(require("./EditFloor400Response"), exports);
22
27
  __exportStar(require("./EditFloor400ResponseError"), exports);
23
28
  __exportStar(require("./Event400Response"), exports);
24
29
  __exportStar(require("./Event400ResponseError"), exports);
25
30
  __exportStar(require("./EventResponse"), exports);
26
31
  __exportStar(require("./FloorInfo"), exports);
27
- __exportStar(require("./GetFloorInformation200Response"), exports);
28
32
  __exportStar(require("./GetRecentEvents200Response"), exports);
29
33
  __exportStar(require("./GetRecentEvents200ResponseItemsInner"), exports);
30
34
  __exportStar(require("./GetRecentEvents200ResponseItemsInnerAuthor"), exports);
@@ -42,10 +46,7 @@ __exportStar(require("./Remaining"), exports);
42
46
  __exportStar(require("./ResetPassword200Response"), exports);
43
47
  __exportStar(require("./ResetPassword400Response"), exports);
44
48
  __exportStar(require("./SendValidationCode200Response"), exports);
45
- __exportStar(require("./SignInWithEmail200Response"), exports);
46
- __exportStar(require("./SignInWithEmail200ResponsePodInfo"), exports);
47
- __exportStar(require("./SignInWithEmail200ResponseProfile"), exports);
48
- __exportStar(require("./SignInWithEmail200ResponseProfileAvatar"), exports);
49
+ __exportStar(require("./SignInResponse"), exports);
49
50
  __exportStar(require("./SignUp200Response"), exports);
50
51
  __exportStar(require("./SignUpResponse"), exports);
51
52
  __exportStar(require("./UserDetails"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xfloor/floor-memory-sdk-ts",
3
- "version": "1.0.19",
3
+ "version": "1.0.21",
4
4
  "description": "TypeScript SDK for xFloor Memory APIs (Memory + Registration).",
5
5
  "author": "xFloor",
6
6
  "repository": {
@@ -1,38 +0,0 @@
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.
4
- * - Memory and
5
- * - Registration. The developer has two ways of using the APIs for the app development. Developer can choose to the Registration APIs for using the existing xfloor infracture or can implement custom Registration process. In the case of custom registration process, the developer is bound to provide proper authentication mechanisms and then send the user information to xlfoor.
6
- *
7
- * The version of the OpenAPI document: 1.0.0
8
- * Contact: contact@ipomo.in
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- import * as runtime from '../runtime';
15
- import type { GetFloorInformation200Response } from '../models/index';
16
- export interface EditFloorRequest {
17
- floorId: string;
18
- userId: string;
19
- appId: string;
20
- logoFile?: Blob;
21
- title?: string;
22
- details?: string;
23
- }
24
- /**
25
- *
26
- */
27
- export declare class EditFloorApi extends runtime.BaseAPI {
28
- /**
29
- * This API updates an existing floor’s profile metadata using **multipart form data**. A floor **can be edited only by its owner**. If the authenticated user is **not the owner of the floor**, the request will be rejected, even if the user is a member or follower of the floor. The API allows the floor owner to update: * Floor **title** * Floor **details/description** * Floor **logo/avatar image** After a successful update, the API returns the **latest floor object**, including the updated avatar and the current list of blocks associated with the floor. --- ## Authorization Rules (Critical) * The caller **must be authenticated** * The caller **must be the owner of the floor** * Members, followers, or pod consumers **cannot** edit the floor * Ownership is validated internally using the authenticated user context > **Ownership is mandatory. There are no partial permissions for this API.** --- ## Content-Type `multipart/form-data` --- ## Request Body (Multipart Form Data) ### Form Fields | Field Name | Type | Required | Description | | ---------- | ------ | ------------ | ---------------------------------------- | | `floor_id` | String | Optional* | Public / human-readable floor identifier | | `title` | String | Optional | New floor title | | `details` | String | Optional | New floor description | | `logo` | File | Optional | New floor logo image (PNG/JPG/WebP) | * At least **one floor identifier** (`fid` or `floor_id`) must be provided. **Best practice:** Use `fid` as the primary identifier. --- ## Update Rules * At least one of `title`, `details`, or `logo` must be present * Missing update fields result in a validation error * If `logo` is provided, the previous logo is replaced --- ## Response Format `application/json` --- ## Sample Success Response ```json { \"floor_id\": \"my_floor\", \"title\": \"daughter ouch upon yummy clamor\", \"details\": \"nostrud occaecat incididunt dolor adipisicing\", \"fid\": \"86\", \"blocks\": [ { \"bid\": \"83\", \"type\": \"pariatur\", \"title\": \"wherever demobilise acidly refute\" } ], \"avatar\": { \"url\": \"https://legal-availability.name/\", \"id\": \"98\" } } ``` --- ## Error Responses (Authorization Focus) ### Not Floor Owner ```json { \"status\": \"ERROR\", \"message\": \"Only the floor owner can edit this floor\" } ``` ### Floor Not Found ```json { \"status\": \"ERROR\", \"message\": \"Floor not found\" } ``` ### No Update Fields ```json { \"status\": \"ERROR\", \"message\": \"No update fields provided\" } ``` --- ## Notes * This API is **owner-only by design** * Pods and developer tools must operate using **owner credentials** * Blocks are returned for convenience but are **not editable through this API** ---
30
- * Edit floor
31
- */
32
- editFloorRaw(requestParameters: EditFloorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetFloorInformation200Response>>;
33
- /**
34
- * This API updates an existing floor’s profile metadata using **multipart form data**. A floor **can be edited only by its owner**. If the authenticated user is **not the owner of the floor**, the request will be rejected, even if the user is a member or follower of the floor. The API allows the floor owner to update: * Floor **title** * Floor **details/description** * Floor **logo/avatar image** After a successful update, the API returns the **latest floor object**, including the updated avatar and the current list of blocks associated with the floor. --- ## Authorization Rules (Critical) * The caller **must be authenticated** * The caller **must be the owner of the floor** * Members, followers, or pod consumers **cannot** edit the floor * Ownership is validated internally using the authenticated user context > **Ownership is mandatory. There are no partial permissions for this API.** --- ## Content-Type `multipart/form-data` --- ## Request Body (Multipart Form Data) ### Form Fields | Field Name | Type | Required | Description | | ---------- | ------ | ------------ | ---------------------------------------- | | `floor_id` | String | Optional* | Public / human-readable floor identifier | | `title` | String | Optional | New floor title | | `details` | String | Optional | New floor description | | `logo` | File | Optional | New floor logo image (PNG/JPG/WebP) | * At least **one floor identifier** (`fid` or `floor_id`) must be provided. **Best practice:** Use `fid` as the primary identifier. --- ## Update Rules * At least one of `title`, `details`, or `logo` must be present * Missing update fields result in a validation error * If `logo` is provided, the previous logo is replaced --- ## Response Format `application/json` --- ## Sample Success Response ```json { \"floor_id\": \"my_floor\", \"title\": \"daughter ouch upon yummy clamor\", \"details\": \"nostrud occaecat incididunt dolor adipisicing\", \"fid\": \"86\", \"blocks\": [ { \"bid\": \"83\", \"type\": \"pariatur\", \"title\": \"wherever demobilise acidly refute\" } ], \"avatar\": { \"url\": \"https://legal-availability.name/\", \"id\": \"98\" } } ``` --- ## Error Responses (Authorization Focus) ### Not Floor Owner ```json { \"status\": \"ERROR\", \"message\": \"Only the floor owner can edit this floor\" } ``` ### Floor Not Found ```json { \"status\": \"ERROR\", \"message\": \"Floor not found\" } ``` ### No Update Fields ```json { \"status\": \"ERROR\", \"message\": \"No update fields provided\" } ``` --- ## Notes * This API is **owner-only by design** * Pods and developer tools must operate using **owner credentials** * Blocks are returned for convenience but are **not editable through this API** ---
35
- * Edit floor
36
- */
37
- editFloor(requestParameters: EditFloorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetFloorInformation200Response>;
38
- }
@@ -1,175 +0,0 @@
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.
7
- * - Memory and
8
- * - Registration. The developer has two ways of using the APIs for the app development. Developer can choose to the Registration APIs for using the existing xfloor infracture or can implement custom Registration process. In the case of custom registration process, the developer is bound to provide proper authentication mechanisms and then send the user information to xlfoor.
9
- *
10
- * The version of the OpenAPI document: 1.0.0
11
- * Contact: contact@ipomo.in
12
- *
13
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
14
- * https://openapi-generator.tech
15
- * Do not edit the class manually.
16
- */
17
- var __extends = (this && this.__extends) || (function () {
18
- var extendStatics = function (d, b) {
19
- extendStatics = Object.setPrototypeOf ||
20
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
21
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
22
- return extendStatics(d, b);
23
- };
24
- return function (d, b) {
25
- if (typeof b !== "function" && b !== null)
26
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
27
- extendStatics(d, b);
28
- function __() { this.constructor = d; }
29
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
30
- };
31
- })();
32
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
33
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
34
- return new (P || (P = Promise))(function (resolve, reject) {
35
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
36
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
37
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
38
- step((generator = generator.apply(thisArg, _arguments || [])).next());
39
- });
40
- };
41
- var __generator = (this && this.__generator) || function (thisArg, body) {
42
- 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);
43
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
44
- function verb(n) { return function (v) { return step([n, v]); }; }
45
- function step(op) {
46
- if (f) throw new TypeError("Generator is already executing.");
47
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
48
- 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;
49
- if (y = 0, t) op = [op[0] & 2, t.value];
50
- switch (op[0]) {
51
- case 0: case 1: t = op; break;
52
- case 4: _.label++; return { value: op[1], done: false };
53
- case 5: _.label++; y = op[1]; op = [0]; continue;
54
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
55
- default:
56
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
57
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
58
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
59
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
60
- if (t[2]) _.ops.pop();
61
- _.trys.pop(); continue;
62
- }
63
- op = body.call(thisArg, _);
64
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
65
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
66
- }
67
- };
68
- Object.defineProperty(exports, "__esModule", { value: true });
69
- exports.EditFloorApi = void 0;
70
- var runtime = require("../runtime");
71
- var index_1 = require("../models/index");
72
- /**
73
- *
74
- */
75
- var EditFloorApi = /** @class */ (function (_super) {
76
- __extends(EditFloorApi, _super);
77
- function EditFloorApi() {
78
- return _super !== null && _super.apply(this, arguments) || this;
79
- }
80
- /**
81
- * This API updates an existing floor’s profile metadata using **multipart form data**. A floor **can be edited only by its owner**. If the authenticated user is **not the owner of the floor**, the request will be rejected, even if the user is a member or follower of the floor. The API allows the floor owner to update: * Floor **title** * Floor **details/description** * Floor **logo/avatar image** After a successful update, the API returns the **latest floor object**, including the updated avatar and the current list of blocks associated with the floor. --- ## Authorization Rules (Critical) * The caller **must be authenticated** * The caller **must be the owner of the floor** * Members, followers, or pod consumers **cannot** edit the floor * Ownership is validated internally using the authenticated user context > **Ownership is mandatory. There are no partial permissions for this API.** --- ## Content-Type `multipart/form-data` --- ## Request Body (Multipart Form Data) ### Form Fields | Field Name | Type | Required | Description | | ---------- | ------ | ------------ | ---------------------------------------- | | `floor_id` | String | Optional* | Public / human-readable floor identifier | | `title` | String | Optional | New floor title | | `details` | String | Optional | New floor description | | `logo` | File | Optional | New floor logo image (PNG/JPG/WebP) | * At least **one floor identifier** (`fid` or `floor_id`) must be provided. **Best practice:** Use `fid` as the primary identifier. --- ## Update Rules * At least one of `title`, `details`, or `logo` must be present * Missing update fields result in a validation error * If `logo` is provided, the previous logo is replaced --- ## Response Format `application/json` --- ## Sample Success Response ```json { \"floor_id\": \"my_floor\", \"title\": \"daughter ouch upon yummy clamor\", \"details\": \"nostrud occaecat incididunt dolor adipisicing\", \"fid\": \"86\", \"blocks\": [ { \"bid\": \"83\", \"type\": \"pariatur\", \"title\": \"wherever demobilise acidly refute\" } ], \"avatar\": { \"url\": \"https://legal-availability.name/\", \"id\": \"98\" } } ``` --- ## Error Responses (Authorization Focus) ### Not Floor Owner ```json { \"status\": \"ERROR\", \"message\": \"Only the floor owner can edit this floor\" } ``` ### Floor Not Found ```json { \"status\": \"ERROR\", \"message\": \"Floor not found\" } ``` ### No Update Fields ```json { \"status\": \"ERROR\", \"message\": \"No update fields provided\" } ``` --- ## Notes * This API is **owner-only by design** * Pods and developer tools must operate using **owner credentials** * Blocks are returned for convenience but are **not editable through this API** ---
82
- * Edit floor
83
- */
84
- EditFloorApi.prototype.editFloorRaw = function (requestParameters, initOverrides) {
85
- return __awaiter(this, void 0, void 0, function () {
86
- var queryParameters, headerParameters, token, tokenString, consumes, canConsumeForm, formParams, useForm, urlPath, response;
87
- return __generator(this, function (_a) {
88
- switch (_a.label) {
89
- case 0:
90
- if (requestParameters['floorId'] == null) {
91
- throw new runtime.RequiredError('floorId', 'Required parameter "floorId" was null or undefined when calling editFloor().');
92
- }
93
- if (requestParameters['userId'] == null) {
94
- throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling editFloor().');
95
- }
96
- if (requestParameters['appId'] == null) {
97
- throw new runtime.RequiredError('appId', 'Required parameter "appId" was null or undefined when calling editFloor().');
98
- }
99
- queryParameters = {};
100
- headerParameters = {};
101
- if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
102
- token = this.configuration.accessToken;
103
- return [4 /*yield*/, token("bearer", [])];
104
- case 1:
105
- tokenString = _a.sent();
106
- if (tokenString) {
107
- headerParameters["Authorization"] = "Bearer ".concat(tokenString);
108
- }
109
- _a.label = 2;
110
- case 2:
111
- consumes = [
112
- { contentType: 'multipart/form-data' },
113
- ];
114
- canConsumeForm = runtime.canConsumeForm(consumes);
115
- useForm = false;
116
- // use FormData to transmit files using content-type "multipart/form-data"
117
- useForm = canConsumeForm;
118
- if (useForm) {
119
- formParams = new FormData();
120
- }
121
- else {
122
- formParams = new URLSearchParams();
123
- }
124
- if (requestParameters['userId'] != null) {
125
- formParams.append('user_id', requestParameters['userId']);
126
- }
127
- if (requestParameters['appId'] != null) {
128
- formParams.append('app_id', requestParameters['appId']);
129
- }
130
- if (requestParameters['logoFile'] != null) {
131
- formParams.append('logo_file', requestParameters['logoFile']);
132
- }
133
- if (requestParameters['title'] != null) {
134
- formParams.append('title', requestParameters['title']);
135
- }
136
- if (requestParameters['details'] != null) {
137
- formParams.append('details', requestParameters['details']);
138
- }
139
- urlPath = "/api/memory/edit/floor/{floor_id}";
140
- urlPath = urlPath.replace("{".concat("floor_id", "}"), encodeURIComponent(String(requestParameters['floorId'])));
141
- return [4 /*yield*/, this.request({
142
- path: urlPath,
143
- method: 'POST',
144
- headers: headerParameters,
145
- query: queryParameters,
146
- body: formParams,
147
- }, initOverrides)];
148
- case 3:
149
- response = _a.sent();
150
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GetFloorInformation200ResponseFromJSON)(jsonValue); })];
151
- }
152
- });
153
- });
154
- };
155
- /**
156
- * This API updates an existing floor’s profile metadata using **multipart form data**. A floor **can be edited only by its owner**. If the authenticated user is **not the owner of the floor**, the request will be rejected, even if the user is a member or follower of the floor. The API allows the floor owner to update: * Floor **title** * Floor **details/description** * Floor **logo/avatar image** After a successful update, the API returns the **latest floor object**, including the updated avatar and the current list of blocks associated with the floor. --- ## Authorization Rules (Critical) * The caller **must be authenticated** * The caller **must be the owner of the floor** * Members, followers, or pod consumers **cannot** edit the floor * Ownership is validated internally using the authenticated user context > **Ownership is mandatory. There are no partial permissions for this API.** --- ## Content-Type `multipart/form-data` --- ## Request Body (Multipart Form Data) ### Form Fields | Field Name | Type | Required | Description | | ---------- | ------ | ------------ | ---------------------------------------- | | `floor_id` | String | Optional* | Public / human-readable floor identifier | | `title` | String | Optional | New floor title | | `details` | String | Optional | New floor description | | `logo` | File | Optional | New floor logo image (PNG/JPG/WebP) | * At least **one floor identifier** (`fid` or `floor_id`) must be provided. **Best practice:** Use `fid` as the primary identifier. --- ## Update Rules * At least one of `title`, `details`, or `logo` must be present * Missing update fields result in a validation error * If `logo` is provided, the previous logo is replaced --- ## Response Format `application/json` --- ## Sample Success Response ```json { \"floor_id\": \"my_floor\", \"title\": \"daughter ouch upon yummy clamor\", \"details\": \"nostrud occaecat incididunt dolor adipisicing\", \"fid\": \"86\", \"blocks\": [ { \"bid\": \"83\", \"type\": \"pariatur\", \"title\": \"wherever demobilise acidly refute\" } ], \"avatar\": { \"url\": \"https://legal-availability.name/\", \"id\": \"98\" } } ``` --- ## Error Responses (Authorization Focus) ### Not Floor Owner ```json { \"status\": \"ERROR\", \"message\": \"Only the floor owner can edit this floor\" } ``` ### Floor Not Found ```json { \"status\": \"ERROR\", \"message\": \"Floor not found\" } ``` ### No Update Fields ```json { \"status\": \"ERROR\", \"message\": \"No update fields provided\" } ``` --- ## Notes * This API is **owner-only by design** * Pods and developer tools must operate using **owner credentials** * Blocks are returned for convenience but are **not editable through this API** ---
157
- * Edit floor
158
- */
159
- EditFloorApi.prototype.editFloor = function (requestParameters, initOverrides) {
160
- return __awaiter(this, void 0, void 0, function () {
161
- var response;
162
- return __generator(this, function (_a) {
163
- switch (_a.label) {
164
- case 0: return [4 /*yield*/, this.editFloorRaw(requestParameters, initOverrides)];
165
- case 1:
166
- response = _a.sent();
167
- return [4 /*yield*/, response.value()];
168
- case 2: return [2 /*return*/, _a.sent()];
169
- }
170
- });
171
- });
172
- };
173
- return EditFloorApi;
174
- }(runtime.BaseAPI));
175
- exports.EditFloorApi = EditFloorApi;
@@ -1,35 +0,0 @@
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.
4
- * - Memory and
5
- * - Registration. The developer has two ways of using the APIs for the app development. Developer can choose to the Registration APIs for using the existing xfloor infracture or can implement custom Registration process. In the case of custom registration process, the developer is bound to provide proper authentication mechanisms and then send the user information to xlfoor.
6
- *
7
- * The version of the OpenAPI document: 1.0.0
8
- * Contact: contact@ipomo.in
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- import * as runtime from '../runtime';
15
- import type { GetFloorInformation200Response } from '../models/index';
16
- export interface GetFloorInformationRequest {
17
- floorId: string;
18
- appId: string;
19
- userId?: string;
20
- }
21
- /**
22
- *
23
- */
24
- export declare class GetFloorInformationApi extends runtime.BaseAPI {
25
- /**
26
- * This API returns the **basic profile information of a floor**. It is used to fetch all essential metadata required to **render a floor landing page, header, or navigation context**. The response includes: * Floor identity and type * Ownership information relative to the requesting user * Floor metadata (title, description, avatar) * List of blocks available in the floor * App association (for pod / developer use cases) This API does **not** return posts or content; it only provides **structural and descriptive information** about the floor. --- ## Typical Use Cases * Render floor header (title, logo, description) * Decide UI permissions (owner vs non-owner) * Display available blocks (Feeds, Blog, Quiz, etc.) * Pod discovery or developer-managed floor rendering * Lightweight floor metadata fetch before loading content --- ## Authorization & Context * The API may be called by authenticated or unauthenticated users (depending on floor visibility). * The `is_owner` field is calculated **relative to the requesting user context** (if authenticated). --- ## Response Format `application/json` --- ## Response Structure ### Top-Level Fields | Field | Type | Description | | ------------ | ---------------------- | ---------------------------------------------------------------- | | `floor_id` | String | Public, human-readable identifier of the floor | | `floor_uid` | String | Internal unique identifier of the floor | | `title` | String | Display title of the floor | | `details` | String | Short description or summary of the floor | | `floor_type` | String | Type of floor (`PUBLIC`, `PRIVATE`, `POD`) | | `is_owner` | String (`\"0\"` / `\"1\"`) | Indicates whether the requesting user is the owner | | `blocks` | Array | List of blocks available in the floor | | `avatar` | Object | Floor logo / avatar metadata | | `app_id` | String | Associated application ID (used mainly for pod/developer floors) | --- ## Ownership Indicator ### `is_owner` ```json \"is_owner\": \"0\" ``` | Value | Meaning | | ----- | ----------------------------------------- | | `\"1\"` | Requesting user is the owner of the floor | | `\"0\"` | Requesting user is not the owner | This field is typically used by clients to: * Enable or disable edit/settings UI * Show owner-only actions --- ## Blocks Object ```json \"blocks\": [ { \"block_id\": \"1765960948723\", \"type\": \"1\", \"title\": \"Feeds\" } ] ``` Each block represents a **content category or service** available inside the floor. ### Block Fields | Field | Type | Description | | ------- | ------ | ----------------------------------------------------- | | `block_id` | String | Unique identifier of the block | | `type` | String | Block type identifier (e.g., feed, blog, forum, quiz) | | `title` | String | Display name of the block | --- ## Avatar Object ```json \"avatar\": { \"id\": \"1767009204367\", \"url\": \"https://...\" } ``` | Field | Type | Description | | ----- | ------ | ------------------------------ | | `id` | String | Media identifier of the avatar | | `url` | String | CDN URL of the floor logo | Used to render the floor’s profile image or banner. --- ## Floor Type ```json \"floor_type\": \"POD\" ``` | Value | Meaning | | --------- | ------------------------------------- | | `PUBLIC` | Open floor visible to everyone | | `PRIVATE` | Restricted floor | | `POD` | Aggregated or developer-managed floor | `POD` floors are often associated with an `app_id` and may aggregate or serve content programmatically. --- ## Sample Success Response ```json { \"is_owner\": \"0\", \"blocks\": [ { \"block_id\": \"1765960948723\", \"type\": \"1\", \"title\": \"Feeds\" } ], \"floor_uid\": \"1765960956967\", \"floor_id\": \"raghupodfloor1\", \"details\": \"raghu\", \"avatar\": { \"id\": \"1767009204367\", \"url\": \"https://d2e5822u5ecuq8.cloudfront.net/room/1765960956967/logo/1765960956967.jpg\" }, \"title\": \"raghu\", \"floor_type\": \"POD\", \"app_id\": \"1765949734005\" } ``` --- ## Notes for Developers * This is a **lightweight metadata API** and is safe to call frequently. * Use this API **before** loading posts or analytics. * `blocks` ordering can be used directly for navigation UI. * `floor_type` + `is_owner` together determine which UI actions are allowed. --- ## Common Error Scenarios ### Floor Not Found ```json { \"status\": \"ERROR\", \"message\": \"Floor not found\" } ``` ### Access Restricted ```json { \"status\": \"ERROR\", \"message\": \"Access denied for this floor\" } ``` --- ### Final Mental Model > **This API answers: “What is this floor, who owns it, and what can I do here?”**
27
- * Basic information of a floor
28
- */
29
- getFloorInformationRaw(requestParameters: GetFloorInformationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetFloorInformation200Response>>;
30
- /**
31
- * This API returns the **basic profile information of a floor**. It is used to fetch all essential metadata required to **render a floor landing page, header, or navigation context**. The response includes: * Floor identity and type * Ownership information relative to the requesting user * Floor metadata (title, description, avatar) * List of blocks available in the floor * App association (for pod / developer use cases) This API does **not** return posts or content; it only provides **structural and descriptive information** about the floor. --- ## Typical Use Cases * Render floor header (title, logo, description) * Decide UI permissions (owner vs non-owner) * Display available blocks (Feeds, Blog, Quiz, etc.) * Pod discovery or developer-managed floor rendering * Lightweight floor metadata fetch before loading content --- ## Authorization & Context * The API may be called by authenticated or unauthenticated users (depending on floor visibility). * The `is_owner` field is calculated **relative to the requesting user context** (if authenticated). --- ## Response Format `application/json` --- ## Response Structure ### Top-Level Fields | Field | Type | Description | | ------------ | ---------------------- | ---------------------------------------------------------------- | | `floor_id` | String | Public, human-readable identifier of the floor | | `floor_uid` | String | Internal unique identifier of the floor | | `title` | String | Display title of the floor | | `details` | String | Short description or summary of the floor | | `floor_type` | String | Type of floor (`PUBLIC`, `PRIVATE`, `POD`) | | `is_owner` | String (`\"0\"` / `\"1\"`) | Indicates whether the requesting user is the owner | | `blocks` | Array | List of blocks available in the floor | | `avatar` | Object | Floor logo / avatar metadata | | `app_id` | String | Associated application ID (used mainly for pod/developer floors) | --- ## Ownership Indicator ### `is_owner` ```json \"is_owner\": \"0\" ``` | Value | Meaning | | ----- | ----------------------------------------- | | `\"1\"` | Requesting user is the owner of the floor | | `\"0\"` | Requesting user is not the owner | This field is typically used by clients to: * Enable or disable edit/settings UI * Show owner-only actions --- ## Blocks Object ```json \"blocks\": [ { \"block_id\": \"1765960948723\", \"type\": \"1\", \"title\": \"Feeds\" } ] ``` Each block represents a **content category or service** available inside the floor. ### Block Fields | Field | Type | Description | | ------- | ------ | ----------------------------------------------------- | | `block_id` | String | Unique identifier of the block | | `type` | String | Block type identifier (e.g., feed, blog, forum, quiz) | | `title` | String | Display name of the block | --- ## Avatar Object ```json \"avatar\": { \"id\": \"1767009204367\", \"url\": \"https://...\" } ``` | Field | Type | Description | | ----- | ------ | ------------------------------ | | `id` | String | Media identifier of the avatar | | `url` | String | CDN URL of the floor logo | Used to render the floor’s profile image or banner. --- ## Floor Type ```json \"floor_type\": \"POD\" ``` | Value | Meaning | | --------- | ------------------------------------- | | `PUBLIC` | Open floor visible to everyone | | `PRIVATE` | Restricted floor | | `POD` | Aggregated or developer-managed floor | `POD` floors are often associated with an `app_id` and may aggregate or serve content programmatically. --- ## Sample Success Response ```json { \"is_owner\": \"0\", \"blocks\": [ { \"block_id\": \"1765960948723\", \"type\": \"1\", \"title\": \"Feeds\" } ], \"floor_uid\": \"1765960956967\", \"floor_id\": \"raghupodfloor1\", \"details\": \"raghu\", \"avatar\": { \"id\": \"1767009204367\", \"url\": \"https://d2e5822u5ecuq8.cloudfront.net/room/1765960956967/logo/1765960956967.jpg\" }, \"title\": \"raghu\", \"floor_type\": \"POD\", \"app_id\": \"1765949734005\" } ``` --- ## Notes for Developers * This is a **lightweight metadata API** and is safe to call frequently. * Use this API **before** loading posts or analytics. * `blocks` ordering can be used directly for navigation UI. * `floor_type` + `is_owner` together determine which UI actions are allowed. --- ## Common Error Scenarios ### Floor Not Found ```json { \"status\": \"ERROR\", \"message\": \"Floor not found\" } ``` ### Access Restricted ```json { \"status\": \"ERROR\", \"message\": \"Access denied for this floor\" } ``` --- ### Final Mental Model > **This API answers: “What is this floor, who owns it, and what can I do here?”**
32
- * Basic information of a floor
33
- */
34
- getFloorInformation(requestParameters: GetFloorInformationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetFloorInformation200Response>;
35
- }