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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
- # @xfloor/floor-memory-sdk-ts@1.0.17
2
- A TypeScript SDK client for the localhost API.
1
+ # @xfloor/floor-memory-sdk-ts@1.0.19
2
+ A TypeScript SDK client for the appfloor.in API.
3
3
 
4
4
  ### Usage
5
5
 
@@ -51,7 +51,7 @@ example().catch(console.error);
51
51
 
52
52
  ### API Endpoints
53
53
 
54
- All URIs are relative to *http://localhost*
54
+ All URIs are relative to *https://appfloor.in*
55
55
 
56
56
  | Class | Method | HTTP request |
57
57
 
@@ -116,7 +116,7 @@ Sign In with Mobile number
116
116
  Sign Up
117
117
  *DefaultApi*
118
118
 
119
- | [**validateCode**](docs/DefaultApi.md#validatecodeoperation) | **POST** /auth-service/validate/activation/code |
119
+ | [**validateCode**](docs/DefaultApi.md#validatecode) | **POST** /auth-service/validate/activation/code |
120
120
 
121
121
  Validation
122
122
  *EditFloorApi*
@@ -170,6 +170,7 @@ Query (Primary API)
170
170
  - [QueryRequestFilters](docs/QueryRequestFilters.md)
171
171
  - [QueryResponse](docs/QueryResponse.md)
172
172
  - [QueryResponseItemsInner](docs/QueryResponseItemsInner.md)
173
+ - [Remaining](docs/Remaining.md)
173
174
  - [ResetPassword200Response](docs/ResetPassword200Response.md)
174
175
  - [ResetPassword400Response](docs/ResetPassword400Response.md)
175
176
  - [SendValidationCode200Response](docs/SendValidationCode200Response.md)
@@ -183,7 +184,6 @@ Query (Primary API)
183
184
  - [ValidateCode400Response](docs/ValidateCode400Response.md)
184
185
  - [ValidateCode400ResponseError](docs/ValidateCode400ResponseError.md)
185
186
  - [ValidateCode412Response](docs/ValidateCode412Response.md)
186
- - [ValidateCodeRequest](docs/ValidateCodeRequest.md)
187
187
 
188
188
  ### Authorization
189
189
 
@@ -202,7 +202,7 @@ and is automatically generated by the
202
202
  [OpenAPI Generator](https://openapi-generator.tech) project:
203
203
 
204
204
  - API version: `1.0.0`
205
- - Package version: `1.0.17`
205
+ - Package version: `1.0.19`
206
206
  - Generator version: `7.18.0`
207
207
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
208
208
 
@@ -12,13 +12,14 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  import * as runtime from '../runtime';
15
- import type { ChangePassword200Response, GetFloorInformation200Response, ResetPassword200Response, SendValidationCode200Response, SignInWithEmail200Response, SignUp200Response, UserDetails, ValidateCodeRequest } from '../models/index';
15
+ import type { ChangePassword200Response, GetFloorInformation200Response, ResetPassword200Response, SendValidationCode200Response, SignInWithEmail200Response, SignUp200Response, UserDetails } from '../models/index';
16
16
  export interface ChangeEmailRequest {
17
17
  newEmailId: string;
18
18
  activationCode: string;
19
19
  }
20
20
  export interface ChangeMobileNumberRequest {
21
- body: object;
21
+ newMobileNumber: string;
22
+ activationCode: string;
22
23
  }
23
24
  export interface ChangePasswordRequest {
24
25
  newPassword: string;
@@ -42,9 +43,10 @@ export interface RenameFloorRequest {
42
43
  to: string;
43
44
  }
44
45
  export interface ResetPasswordRequest {
46
+ newPassword: string;
45
47
  activationCode: string;
46
- emailId?: string;
47
48
  mobileNumber?: string;
49
+ emailId?: string;
48
50
  appId?: string;
49
51
  }
50
52
  export interface SendValidationCodeRequest {
@@ -73,8 +75,11 @@ export interface SignUpRequest {
73
75
  mobileNumber?: string;
74
76
  appId?: string;
75
77
  }
76
- export interface ValidateCodeOperationRequest {
77
- validateCodeRequest: ValidateCodeRequest;
78
+ export interface ValidateCodeRequest {
79
+ userId: string;
80
+ activationCode: string;
81
+ mode: string;
82
+ appId?: string;
78
83
  }
79
84
  /**
80
85
  *
@@ -84,22 +89,22 @@ export declare class DefaultApi extends runtime.BaseAPI {
84
89
  * Updates the email ID associated with an existing user account after validating a one-time activation code sent to the **new email address**. This operation can only be performed by a **logged-in user**. When a user initiates an email change, an activation code is sent to the newly provided email ID. The email update takes effect only after the activation code is successfully validated. If the activation code validation fails, the email ID remains unchanged. --- ### **Authentication** This endpoint requires **Bearer Token authentication**. ``` Authorization: Bearer <access_token> ``` --- ### **Request Body** ```json { \"user_id\": \"string\", \"new_email_id\": \"string\", \"activation_code\": \"string\", \"app_id\":\"string\" } ``` **Field Description** * `user_id` – Unique identifier of the logged-in user * `new_email_id` – New email address to be associated with the account * `activation_code` – One-time activation code sent to the new email ID for verification --- ### **Flow Summary** 1. User is authenticated and logged in 2. User requests to change email ID 3. System sends an activation code to the **new email address** 4. User submits the activation code via this API 5. On successful validation, the email ID is updated --- ### **Successful Response** On successful validation: * The activation code is verified * The user’s email ID is updated immediately * A `success` string is returned confirming the email change --- ### **Error Response** The API returns an error response if: * The activation code is invalid or expired * The activation code does not match the user or email * The new email ID is already in use * Authorization fails or the bearer token is missing or invalid In all error cases, the existing email ID remains unchanged. --- ### **Behavior Notes** * Requires a prior call to `/auth-service/send/validation/code` with the proper mode. --- ### **Security Notes (Recommended)** * Activation codes are single-use and time-bound * Email changes require prior authentication * Rate limiting may be applied to prevent abuse --- ### **One-Line Summary** > Changes a user’s email ID after validating an activation code sent to the new email address.
85
90
  * Change email ID
86
91
  */
87
- changeEmailRaw(requestParameters: ChangeEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>>;
92
+ changeEmailRaw(requestParameters: ChangeEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SignInWithEmail200Response>>;
88
93
  /**
89
94
  * Updates the email ID associated with an existing user account after validating a one-time activation code sent to the **new email address**. This operation can only be performed by a **logged-in user**. When a user initiates an email change, an activation code is sent to the newly provided email ID. The email update takes effect only after the activation code is successfully validated. If the activation code validation fails, the email ID remains unchanged. --- ### **Authentication** This endpoint requires **Bearer Token authentication**. ``` Authorization: Bearer <access_token> ``` --- ### **Request Body** ```json { \"user_id\": \"string\", \"new_email_id\": \"string\", \"activation_code\": \"string\", \"app_id\":\"string\" } ``` **Field Description** * `user_id` – Unique identifier of the logged-in user * `new_email_id` – New email address to be associated with the account * `activation_code` – One-time activation code sent to the new email ID for verification --- ### **Flow Summary** 1. User is authenticated and logged in 2. User requests to change email ID 3. System sends an activation code to the **new email address** 4. User submits the activation code via this API 5. On successful validation, the email ID is updated --- ### **Successful Response** On successful validation: * The activation code is verified * The user’s email ID is updated immediately * A `success` string is returned confirming the email change --- ### **Error Response** The API returns an error response if: * The activation code is invalid or expired * The activation code does not match the user or email * The new email ID is already in use * Authorization fails or the bearer token is missing or invalid In all error cases, the existing email ID remains unchanged. --- ### **Behavior Notes** * Requires a prior call to `/auth-service/send/validation/code` with the proper mode. --- ### **Security Notes (Recommended)** * Activation codes are single-use and time-bound * Email changes require prior authentication * Rate limiting may be applied to prevent abuse --- ### **One-Line Summary** > Changes a user’s email ID after validating an activation code sent to the new email address.
90
95
  * Change email ID
91
96
  */
92
- changeEmail(requestParameters: ChangeEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object>;
97
+ changeEmail(requestParameters: ChangeEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SignInWithEmail200Response>;
93
98
  /**
94
99
  * Updates the mobile number associated with an existing user account after validating a one-time activation code sent to the **new mobile number**. This operation can only be performed by a **logged-in user**. When a user initiates a mobile number change, an activation code is sent to the newly provided mobile number. The mobile number update takes effect only after the activation code is successfully validated. If the activation code validation fails, the mobile number remains unchanged. --- ### **Authentication** This endpoint requires **Bearer Token authentication**. ``` Authorization: Bearer <access_token> ``` --- ### **Request Body** ```json { \"user_id\": \"string\", \"new_mobile_number\": \"string\", \"activation_code\": \"string\" } ``` **Field Description** * `user_id` – Unique identifier of the logged-in user * `new_mobile_number` – New mobile number to be associated with the account * `activation_code` – One-time activation code sent to the new mobile number for verification --- ### **Flow Summary** 1. User is authenticated and logged in 2. User requests to change mobile number 3. System sends an activation code to the **new mobile number** 4. User submits the activation code via this API 5. On successful validation, the mobile number is updated --- ### **Successful Response** On successful validation: * The activation code is verified * The user’s mobile number is updated immediately * A `success` string is returned confirming the mobile number change --- ### **Error Response** The API returns an error response if: * The activation code is invalid or expired * The activation code does not match the user or mobile number * The new mobile number is already in use * Authorization fails or the bearer token is missing or invalid In all error cases, the existing mobile number remains unchanged. --- ### **Behavior Notes** * Requires a prior call to `/auth-service/send/validation/code` with the proper mode. --- ### **Security Notes (Recommended)** * Activation codes are single-use and time-bound * Mobile number changes require prior authentication * Rate limiting may be applied to prevent abuse --- ### **One-Line Summary** > Changes a user’s mobile number after validating an activation code sent to the new mobile number.
95
100
  * Change Mobile number
96
101
  */
97
- changeMobileNumberRaw(requestParameters: ChangeMobileNumberRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>>;
102
+ changeMobileNumberRaw(requestParameters: ChangeMobileNumberRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SignInWithEmail200Response>>;
98
103
  /**
99
104
  * Updates the mobile number associated with an existing user account after validating a one-time activation code sent to the **new mobile number**. This operation can only be performed by a **logged-in user**. When a user initiates a mobile number change, an activation code is sent to the newly provided mobile number. The mobile number update takes effect only after the activation code is successfully validated. If the activation code validation fails, the mobile number remains unchanged. --- ### **Authentication** This endpoint requires **Bearer Token authentication**. ``` Authorization: Bearer <access_token> ``` --- ### **Request Body** ```json { \"user_id\": \"string\", \"new_mobile_number\": \"string\", \"activation_code\": \"string\" } ``` **Field Description** * `user_id` – Unique identifier of the logged-in user * `new_mobile_number` – New mobile number to be associated with the account * `activation_code` – One-time activation code sent to the new mobile number for verification --- ### **Flow Summary** 1. User is authenticated and logged in 2. User requests to change mobile number 3. System sends an activation code to the **new mobile number** 4. User submits the activation code via this API 5. On successful validation, the mobile number is updated --- ### **Successful Response** On successful validation: * The activation code is verified * The user’s mobile number is updated immediately * A `success` string is returned confirming the mobile number change --- ### **Error Response** The API returns an error response if: * The activation code is invalid or expired * The activation code does not match the user or mobile number * The new mobile number is already in use * Authorization fails or the bearer token is missing or invalid In all error cases, the existing mobile number remains unchanged. --- ### **Behavior Notes** * Requires a prior call to `/auth-service/send/validation/code` with the proper mode. --- ### **Security Notes (Recommended)** * Activation codes are single-use and time-bound * Mobile number changes require prior authentication * Rate limiting may be applied to prevent abuse --- ### **One-Line Summary** > Changes a user’s mobile number after validating an activation code sent to the new mobile number.
100
105
  * Change Mobile number
101
106
  */
102
- changeMobileNumber(requestParameters: ChangeMobileNumberRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object>;
107
+ changeMobileNumber(requestParameters: ChangeMobileNumberRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SignInWithEmail200Response>;
103
108
  /**
104
109
  * ## 1) `POST /password/change` — Change Password (Logged-in User) Changes the password of an **authenticated user** who is currently logged in. This endpoint is used when a user is already signed in and wants to update their password as a security or preference action. The system validates a **one-time password-change verification code** (`activation_code`) issued specifically for the change-password flow. If the code is valid and not expired, the user’s password is updated to `new_password` and takes effect immediately. If verification fails, the password remains unchanged and an error response is returned. ### Authentication ✅ **Required**: Bearer token for the logged-in session ``` Authorization: Bearer <access_token> ``` ### Request Body (Form Data) * `user_id` (optional if derived from token) * `activation_code` (required) * `new_password` (required) ### Behavior Notes * Typically requires a prior call to **send a verification code** for password change (mode = password change). * `user_id` can be taken from the access token; include it only if your system requires it explicitly. ### One-Line Summary > Changes the password for a logged-in user after validating a one-time password-change code.
105
110
  * Change Password
@@ -194,10 +199,10 @@ export declare class DefaultApi extends runtime.BaseAPI {
194
199
  * ## **Validate Activation / Verification Code** This API **validates a one-time verification code** submitted by a user and **executes the corresponding account operation** based on the specified **mode**. Depending on the mode, the API may: * Activate a newly registered account * Confirm a login attempt * Verify a password change or reset * Validate email or mobile updates * Confirm account deletion or clearing requests The API verifies the provided `activation_code` against the given `user_id`, `mode`, and application context. If validation succeeds, the requested operation is completed and the API returns the relevant **POD information** and **user profile details** (where applicable). If validation fails, the operation is **not performed** and an appropriate error response is returned. --- ## **Authentication** This endpoint requires **Bearer Token authentication**. **Header** ``` Authorization: Bearer <access_token> ``` --- ## **Request Body** ```json { \"user_id\": \"string\", \"activation_code\": \"string\", \"app_id\": \"string\", \"mode\": \"string\" } ``` ### **Field Descriptions** * **user_id** – Unique identifier of the user initiating the operation * **activation_code** – One-time verification code sent to the user * **app_id** – Application identifier (optional or context-specific) * **mode** – Operation context for which the verification is being performed --- ## **Usage Scenarios (Mode Definitions)** | Mode | Purpose | | ---- | ---------------------------------------- | | 0 | Email or mobile number change | | 1 | Password change | | 2 | Delete account | | 3 | Clear account | | 4 | Signup verification (account activation) | | 5 | Login verification | | 6 | Forgot password verification | --- ## **Successful Response** On successful validation: * The requested operation (based on `mode`) is completed * The API returns: * **POD information** associated with the user (if applicable) * **User profile details** (if applicable) Examples: * For **signup verification**, the user account is activated * For **login**, access is confirmed * For **password reset**, the user may proceed to set a new password * For **account deletion**, the request is confirmed --- ## **Error Response** The API returns an error response when: * The activation code is invalid or expired * The activation code does not match the user or operation mode * The requested operation is already completed (e.g., user already activated) * Authorization fails or the bearer token is missing or invalid ⚠️ In all error cases, **no account state change occurs**. --- ## **One-Line Summary** > Validates a one-time verification code and securely completes the requested user account operation (signup, login, password change, or account actions), returning POD and profile details on success.
195
200
  * Validation
196
201
  */
197
- validateCodeRaw(requestParameters: ValidateCodeOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserDetails>>;
202
+ validateCodeRaw(requestParameters: ValidateCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserDetails>>;
198
203
  /**
199
204
  * ## **Validate Activation / Verification Code** This API **validates a one-time verification code** submitted by a user and **executes the corresponding account operation** based on the specified **mode**. Depending on the mode, the API may: * Activate a newly registered account * Confirm a login attempt * Verify a password change or reset * Validate email or mobile updates * Confirm account deletion or clearing requests The API verifies the provided `activation_code` against the given `user_id`, `mode`, and application context. If validation succeeds, the requested operation is completed and the API returns the relevant **POD information** and **user profile details** (where applicable). If validation fails, the operation is **not performed** and an appropriate error response is returned. --- ## **Authentication** This endpoint requires **Bearer Token authentication**. **Header** ``` Authorization: Bearer <access_token> ``` --- ## **Request Body** ```json { \"user_id\": \"string\", \"activation_code\": \"string\", \"app_id\": \"string\", \"mode\": \"string\" } ``` ### **Field Descriptions** * **user_id** – Unique identifier of the user initiating the operation * **activation_code** – One-time verification code sent to the user * **app_id** – Application identifier (optional or context-specific) * **mode** – Operation context for which the verification is being performed --- ## **Usage Scenarios (Mode Definitions)** | Mode | Purpose | | ---- | ---------------------------------------- | | 0 | Email or mobile number change | | 1 | Password change | | 2 | Delete account | | 3 | Clear account | | 4 | Signup verification (account activation) | | 5 | Login verification | | 6 | Forgot password verification | --- ## **Successful Response** On successful validation: * The requested operation (based on `mode`) is completed * The API returns: * **POD information** associated with the user (if applicable) * **User profile details** (if applicable) Examples: * For **signup verification**, the user account is activated * For **login**, access is confirmed * For **password reset**, the user may proceed to set a new password * For **account deletion**, the request is confirmed --- ## **Error Response** The API returns an error response when: * The activation code is invalid or expired * The activation code does not match the user or operation mode * The requested operation is already completed (e.g., user already activated) * Authorization fails or the bearer token is missing or invalid ⚠️ In all error cases, **no account state change occurs**. --- ## **One-Line Summary** > Validates a one-time verification code and securely completes the requested user account operation (signup, login, password change, or account actions), returning POD and profile details on success.
200
205
  * Validation
201
206
  */
202
- validateCode(requestParameters: ValidateCodeOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserDetails>;
207
+ validateCode(requestParameters: ValidateCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserDetails>;
203
208
  }
@@ -132,7 +132,7 @@ var DefaultApi = /** @class */ (function (_super) {
132
132
  }, initOverrides)];
133
133
  case 3:
134
134
  response = _a.sent();
135
- return [2 /*return*/, new runtime.JSONApiResponse(response)];
135
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.SignInWithEmail200ResponseFromJSON)(jsonValue); })];
136
136
  }
137
137
  });
138
138
  });
@@ -161,16 +161,18 @@ var DefaultApi = /** @class */ (function (_super) {
161
161
  */
162
162
  DefaultApi.prototype.changeMobileNumberRaw = function (requestParameters, initOverrides) {
163
163
  return __awaiter(this, void 0, void 0, function () {
164
- var queryParameters, headerParameters, token, tokenString, urlPath, response;
164
+ var queryParameters, headerParameters, token, tokenString, consumes, canConsumeForm, formParams, useForm, urlPath, response;
165
165
  return __generator(this, function (_a) {
166
166
  switch (_a.label) {
167
167
  case 0:
168
- if (requestParameters['body'] == null) {
169
- throw new runtime.RequiredError('body', 'Required parameter "body" was null or undefined when calling changeMobileNumber().');
168
+ if (requestParameters['newMobileNumber'] == null) {
169
+ throw new runtime.RequiredError('newMobileNumber', 'Required parameter "newMobileNumber" was null or undefined when calling changeMobileNumber().');
170
+ }
171
+ if (requestParameters['activationCode'] == null) {
172
+ throw new runtime.RequiredError('activationCode', 'Required parameter "activationCode" was null or undefined when calling changeMobileNumber().');
170
173
  }
171
174
  queryParameters = {};
172
175
  headerParameters = {};
173
- headerParameters['Content-Type'] = 'application/json';
174
176
  if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
175
177
  token = this.configuration.accessToken;
176
178
  return [4 /*yield*/, token("bearer", [])];
@@ -181,17 +183,34 @@ var DefaultApi = /** @class */ (function (_super) {
181
183
  }
182
184
  _a.label = 2;
183
185
  case 2:
186
+ consumes = [
187
+ { contentType: 'multipart/form-data' },
188
+ ];
189
+ canConsumeForm = runtime.canConsumeForm(consumes);
190
+ useForm = false;
191
+ if (useForm) {
192
+ formParams = new FormData();
193
+ }
194
+ else {
195
+ formParams = new URLSearchParams();
196
+ }
197
+ if (requestParameters['newMobileNumber'] != null) {
198
+ formParams.append('new_mobile_number', requestParameters['newMobileNumber']);
199
+ }
200
+ if (requestParameters['activationCode'] != null) {
201
+ formParams.append('activation_code', requestParameters['activationCode']);
202
+ }
184
203
  urlPath = "/auth-service/change/mobile";
185
204
  return [4 /*yield*/, this.request({
186
205
  path: urlPath,
187
206
  method: 'POST',
188
207
  headers: headerParameters,
189
208
  query: queryParameters,
190
- body: requestParameters['body'],
209
+ body: formParams,
191
210
  }, initOverrides)];
192
211
  case 3:
193
212
  response = _a.sent();
194
- return [2 /*return*/, new runtime.JSONApiResponse(response)];
213
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.SignInWithEmail200ResponseFromJSON)(jsonValue); })];
195
214
  }
196
215
  });
197
216
  });
@@ -519,33 +538,51 @@ var DefaultApi = /** @class */ (function (_super) {
519
538
  */
520
539
  DefaultApi.prototype.resetPasswordRaw = function (requestParameters, initOverrides) {
521
540
  return __awaiter(this, void 0, void 0, function () {
522
- var queryParameters, headerParameters, urlPath, response;
541
+ var queryParameters, headerParameters, consumes, canConsumeForm, formParams, useForm, urlPath, response;
523
542
  return __generator(this, function (_a) {
524
543
  switch (_a.label) {
525
544
  case 0:
545
+ if (requestParameters['newPassword'] == null) {
546
+ throw new runtime.RequiredError('newPassword', 'Required parameter "newPassword" was null or undefined when calling resetPassword().');
547
+ }
526
548
  if (requestParameters['activationCode'] == null) {
527
549
  throw new runtime.RequiredError('activationCode', 'Required parameter "activationCode" was null or undefined when calling resetPassword().');
528
550
  }
529
551
  queryParameters = {};
530
- if (requestParameters['emailId'] != null) {
531
- queryParameters['email_id'] = requestParameters['emailId'];
552
+ headerParameters = {};
553
+ consumes = [
554
+ { contentType: 'multipart/form-data' },
555
+ ];
556
+ canConsumeForm = runtime.canConsumeForm(consumes);
557
+ useForm = false;
558
+ if (useForm) {
559
+ formParams = new FormData();
560
+ }
561
+ else {
562
+ formParams = new URLSearchParams();
532
563
  }
533
564
  if (requestParameters['mobileNumber'] != null) {
534
- queryParameters['mobile_number'] = requestParameters['mobileNumber'];
565
+ formParams.append('mobile_number', requestParameters['mobileNumber']);
566
+ }
567
+ if (requestParameters['emailId'] != null) {
568
+ formParams.append('email_id', requestParameters['emailId']);
569
+ }
570
+ if (requestParameters['newPassword'] != null) {
571
+ formParams.append('new_password', requestParameters['newPassword']);
535
572
  }
536
573
  if (requestParameters['activationCode'] != null) {
537
- queryParameters['activation_code'] = requestParameters['activationCode'];
574
+ formParams.append('activation_code', requestParameters['activationCode']);
538
575
  }
539
576
  if (requestParameters['appId'] != null) {
540
- queryParameters['app_id'] = requestParameters['appId'];
577
+ formParams.append('app_id', requestParameters['appId']);
541
578
  }
542
- headerParameters = {};
543
579
  urlPath = "/auth-service/password/reset";
544
580
  return [4 /*yield*/, this.request({
545
581
  path: urlPath,
546
582
  method: 'POST',
547
583
  headers: headerParameters,
548
584
  query: queryParameters,
585
+ body: formParams,
549
586
  }, initOverrides)];
550
587
  case 1:
551
588
  response = _a.sent();
@@ -923,16 +960,21 @@ var DefaultApi = /** @class */ (function (_super) {
923
960
  */
924
961
  DefaultApi.prototype.validateCodeRaw = function (requestParameters, initOverrides) {
925
962
  return __awaiter(this, void 0, void 0, function () {
926
- var queryParameters, headerParameters, token, tokenString, urlPath, response;
963
+ var queryParameters, headerParameters, token, tokenString, consumes, canConsumeForm, formParams, useForm, urlPath, response;
927
964
  return __generator(this, function (_a) {
928
965
  switch (_a.label) {
929
966
  case 0:
930
- if (requestParameters['validateCodeRequest'] == null) {
931
- throw new runtime.RequiredError('validateCodeRequest', 'Required parameter "validateCodeRequest" was null or undefined when calling validateCode().');
967
+ if (requestParameters['userId'] == null) {
968
+ throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling validateCode().');
969
+ }
970
+ if (requestParameters['activationCode'] == null) {
971
+ throw new runtime.RequiredError('activationCode', 'Required parameter "activationCode" was null or undefined when calling validateCode().');
972
+ }
973
+ if (requestParameters['mode'] == null) {
974
+ throw new runtime.RequiredError('mode', 'Required parameter "mode" was null or undefined when calling validateCode().');
932
975
  }
933
976
  queryParameters = {};
934
977
  headerParameters = {};
935
- headerParameters['Content-Type'] = 'application/json';
936
978
  if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
937
979
  token = this.configuration.accessToken;
938
980
  return [4 /*yield*/, token("bearer", [])];
@@ -943,13 +985,36 @@ var DefaultApi = /** @class */ (function (_super) {
943
985
  }
944
986
  _a.label = 2;
945
987
  case 2:
988
+ consumes = [
989
+ { contentType: 'multipart/form-data' },
990
+ ];
991
+ canConsumeForm = runtime.canConsumeForm(consumes);
992
+ useForm = false;
993
+ if (useForm) {
994
+ formParams = new FormData();
995
+ }
996
+ else {
997
+ formParams = new URLSearchParams();
998
+ }
999
+ if (requestParameters['userId'] != null) {
1000
+ formParams.append('user_id', requestParameters['userId']);
1001
+ }
1002
+ if (requestParameters['activationCode'] != null) {
1003
+ formParams.append('activation_code', requestParameters['activationCode']);
1004
+ }
1005
+ if (requestParameters['mode'] != null) {
1006
+ formParams.append('mode', requestParameters['mode']);
1007
+ }
1008
+ if (requestParameters['appId'] != null) {
1009
+ formParams.append('app_id', requestParameters['appId']);
1010
+ }
946
1011
  urlPath = "/auth-service/validate/activation/code";
947
1012
  return [4 /*yield*/, this.request({
948
1013
  path: urlPath,
949
1014
  method: 'POST',
950
1015
  headers: headerParameters,
951
1016
  query: queryParameters,
952
- body: (0, index_1.ValidateCodeRequestToJSON)(requestParameters['validateCodeRequest']),
1017
+ body: formParams,
953
1018
  }, initOverrides)];
954
1019
  case 3:
955
1020
  response = _a.sent();
@@ -0,0 +1,40 @@
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
+ /**
15
+ *
16
+ * @export
17
+ * @interface Remaining
18
+ */
19
+ export interface Remaining {
20
+ /**
21
+ *
22
+ * @type {string}
23
+ * @memberof Remaining
24
+ */
25
+ permitted?: string;
26
+ /**
27
+ *
28
+ * @type {string}
29
+ * @memberof Remaining
30
+ */
31
+ remaining?: string;
32
+ }
33
+ /**
34
+ * Check if a given object implements the Remaining interface.
35
+ */
36
+ export declare function instanceOfRemaining(value: object): value is Remaining;
37
+ export declare function RemainingFromJSON(json: any): Remaining;
38
+ export declare function RemainingFromJSONTyped(json: any, ignoreDiscriminator: boolean): Remaining;
39
+ export declare function RemainingToJSON(json: any): Remaining;
40
+ export declare function RemainingToJSONTyped(value?: Remaining | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,53 @@
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.instanceOfRemaining = instanceOfRemaining;
19
+ exports.RemainingFromJSON = RemainingFromJSON;
20
+ exports.RemainingFromJSONTyped = RemainingFromJSONTyped;
21
+ exports.RemainingToJSON = RemainingToJSON;
22
+ exports.RemainingToJSONTyped = RemainingToJSONTyped;
23
+ /**
24
+ * Check if a given object implements the Remaining interface.
25
+ */
26
+ function instanceOfRemaining(value) {
27
+ return true;
28
+ }
29
+ function RemainingFromJSON(json) {
30
+ return RemainingFromJSONTyped(json, false);
31
+ }
32
+ function RemainingFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'permitted': json['permitted'] == null ? undefined : json['permitted'],
38
+ 'remaining': json['remaining'] == null ? undefined : json['remaining'],
39
+ };
40
+ }
41
+ function RemainingToJSON(json) {
42
+ return RemainingToJSONTyped(json, false);
43
+ }
44
+ function RemainingToJSONTyped(value, ignoreDiscriminator) {
45
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
46
+ if (value == null) {
47
+ return value;
48
+ }
49
+ return {
50
+ 'permitted': value['permitted'],
51
+ 'remaining': value['remaining'],
52
+ };
53
+ }
@@ -25,6 +25,18 @@ export interface SignInWithEmail200ResponsePodInfo {
25
25
  * @memberof SignInWithEmail200ResponsePodInfo
26
26
  */
27
27
  floorId: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof SignInWithEmail200ResponsePodInfo
32
+ */
33
+ isOwner?: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof SignInWithEmail200ResponsePodInfo
38
+ */
39
+ appId?: string;
28
40
  /**
29
41
  *
30
42
  * @type {string}
@@ -42,7 +54,7 @@ export interface SignInWithEmail200ResponsePodInfo {
42
54
  * @type {string}
43
55
  * @memberof SignInWithEmail200ResponsePodInfo
44
56
  */
45
- fid: string;
57
+ floorUid: string;
46
58
  /**
47
59
  *
48
60
  * @type {Array<BlockDetails>}
@@ -30,7 +30,7 @@ function instanceOfSignInWithEmail200ResponsePodInfo(value) {
30
30
  return false;
31
31
  if (!('title' in value) || value['title'] === undefined)
32
32
  return false;
33
- if (!('fid' in value) || value['fid'] === undefined)
33
+ if (!('floorUid' in value) || value['floorUid'] === undefined)
34
34
  return false;
35
35
  if (!('blocks' in value) || value['blocks'] === undefined)
36
36
  return false;
@@ -45,9 +45,11 @@ function SignInWithEmail200ResponsePodInfoFromJSONTyped(json, ignoreDiscriminato
45
45
  }
46
46
  return {
47
47
  'floorId': json['floor_id'],
48
+ 'isOwner': json['is_owner'] == null ? undefined : json['is_owner'],
49
+ 'appId': json['app_id'] == null ? undefined : json['app_id'],
48
50
  'title': json['title'],
49
51
  'details': json['details'] == null ? undefined : json['details'],
50
- 'fid': json['fid'],
52
+ 'floorUid': json['floor_uid'],
51
53
  'blocks': (json['blocks'].map(BlockDetails_1.BlockDetailsFromJSON)),
52
54
  'avatar': json['avatar'] == null ? undefined : (0, Media_1.MediaFromJSON)(json['avatar']),
53
55
  };
@@ -62,9 +64,11 @@ function SignInWithEmail200ResponsePodInfoToJSONTyped(value, ignoreDiscriminator
62
64
  }
63
65
  return {
64
66
  'floor_id': value['floorId'],
67
+ 'is_owner': value['isOwner'],
68
+ 'app_id': value['appId'],
65
69
  'title': value['title'],
66
70
  'details': value['details'],
67
- 'fid': value['fid'],
71
+ 'floor_uid': value['floorUid'],
68
72
  'blocks': (value['blocks'].map(BlockDetails_1.BlockDetailsToJSON)),
69
73
  'avatar': (0, Media_1.MediaToJSON)(value['avatar']),
70
74
  };
@@ -11,8 +11,8 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
- import type { BlockDetails } from './BlockDetails';
15
14
  import type { SignInWithEmail200ResponseProfileAvatar } from './SignInWithEmail200ResponseProfileAvatar';
15
+ import type { Remaining } from './Remaining';
16
16
  /**
17
17
  * User profile details
18
18
  * @export
@@ -26,17 +26,23 @@ export interface SignInWithEmail200ResponseProfile {
26
26
  */
27
27
  floorId: string;
28
28
  /**
29
- * Unique ID of floor
30
- * @type {string}
29
+ *
30
+ * @type {Remaining}
31
31
  * @memberof SignInWithEmail200ResponseProfile
32
32
  */
33
- fid: string;
33
+ floors?: Remaining;
34
34
  /**
35
- * List of Blocks
36
- * @type {Array<BlockDetails>}
35
+ *
36
+ * @type {Remaining}
37
+ * @memberof SignInWithEmail200ResponseProfile
38
+ */
39
+ blocks?: Remaining;
40
+ /**
41
+ * Unique ID of floor
42
+ * @type {string}
37
43
  * @memberof SignInWithEmail200ResponseProfile
38
44
  */
39
- blocks?: Array<BlockDetails>;
45
+ fID: string;
40
46
  /**
41
47
  * User Name
42
48
  * @type {string}
@@ -20,15 +20,15 @@ exports.SignInWithEmail200ResponseProfileFromJSON = SignInWithEmail200ResponsePr
20
20
  exports.SignInWithEmail200ResponseProfileFromJSONTyped = SignInWithEmail200ResponseProfileFromJSONTyped;
21
21
  exports.SignInWithEmail200ResponseProfileToJSON = SignInWithEmail200ResponseProfileToJSON;
22
22
  exports.SignInWithEmail200ResponseProfileToJSONTyped = SignInWithEmail200ResponseProfileToJSONTyped;
23
- var BlockDetails_1 = require("./BlockDetails");
24
23
  var SignInWithEmail200ResponseProfileAvatar_1 = require("./SignInWithEmail200ResponseProfileAvatar");
24
+ var Remaining_1 = require("./Remaining");
25
25
  /**
26
26
  * Check if a given object implements the SignInWithEmail200ResponseProfile interface.
27
27
  */
28
28
  function instanceOfSignInWithEmail200ResponseProfile(value) {
29
29
  if (!('floorId' in value) || value['floorId'] === undefined)
30
30
  return false;
31
- if (!('fid' in value) || value['fid'] === undefined)
31
+ if (!('fID' in value) || value['fID'] === undefined)
32
32
  return false;
33
33
  if (!('userId' in value) || value['userId'] === undefined)
34
34
  return false;
@@ -43,8 +43,9 @@ function SignInWithEmail200ResponseProfileFromJSONTyped(json, ignoreDiscriminato
43
43
  }
44
44
  return {
45
45
  'floorId': json['floor_id'],
46
- 'fid': json['fid'],
47
- 'blocks': json['blocks'] == null ? undefined : (json['blocks'].map(BlockDetails_1.BlockDetailsFromJSON)),
46
+ 'floors': json['floors'] == null ? undefined : (0, Remaining_1.RemainingFromJSON)(json['floors']),
47
+ 'blocks': json['blocks'] == null ? undefined : (0, Remaining_1.RemainingFromJSON)(json['blocks']),
48
+ 'fID': json['FID'],
48
49
  'name': json['name'] == null ? undefined : json['name'],
49
50
  'email': json['email'] == null ? undefined : json['email'],
50
51
  'mobileNumber': json['mobile_number'] == null ? undefined : json['mobile_number'],
@@ -62,8 +63,9 @@ function SignInWithEmail200ResponseProfileToJSONTyped(value, ignoreDiscriminator
62
63
  }
63
64
  return {
64
65
  'floor_id': value['floorId'],
65
- 'fid': value['fid'],
66
- 'blocks': value['blocks'] == null ? undefined : (value['blocks'].map(BlockDetails_1.BlockDetailsToJSON)),
66
+ 'floors': (0, Remaining_1.RemainingToJSON)(value['floors']),
67
+ 'blocks': (0, Remaining_1.RemainingToJSON)(value['blocks']),
68
+ 'FID': value['fID'],
67
69
  'name': value['name'],
68
70
  'email': value['email'],
69
71
  'mobile_number': value['mobileNumber'],
@@ -20,6 +20,7 @@ export * from './QueryRequest';
20
20
  export * from './QueryRequestFilters';
21
21
  export * from './QueryResponse';
22
22
  export * from './QueryResponseItemsInner';
23
+ export * from './Remaining';
23
24
  export * from './ResetPassword200Response';
24
25
  export * from './ResetPassword400Response';
25
26
  export * from './SendValidationCode200Response';
@@ -33,4 +34,3 @@ export * from './UserDetails';
33
34
  export * from './ValidateCode400Response';
34
35
  export * from './ValidateCode400ResponseError';
35
36
  export * from './ValidateCode412Response';
36
- export * from './ValidateCodeRequest';
@@ -38,6 +38,7 @@ __exportStar(require("./QueryRequest"), exports);
38
38
  __exportStar(require("./QueryRequestFilters"), exports);
39
39
  __exportStar(require("./QueryResponse"), exports);
40
40
  __exportStar(require("./QueryResponseItemsInner"), exports);
41
+ __exportStar(require("./Remaining"), exports);
41
42
  __exportStar(require("./ResetPassword200Response"), exports);
42
43
  __exportStar(require("./ResetPassword400Response"), exports);
43
44
  __exportStar(require("./SendValidationCode200Response"), exports);
@@ -51,4 +52,3 @@ __exportStar(require("./UserDetails"), exports);
51
52
  __exportStar(require("./ValidateCode400Response"), exports);
52
53
  __exportStar(require("./ValidateCode400ResponseError"), exports);
53
54
  __exportStar(require("./ValidateCode412Response"), exports);
54
- __exportStar(require("./ValidateCodeRequest"), exports);
package/dist/runtime.js CHANGED
@@ -82,7 +82,7 @@ exports.querystring = querystring;
82
82
  exports.exists = exists;
83
83
  exports.mapValues = mapValues;
84
84
  exports.canConsumeForm = canConsumeForm;
85
- exports.BASE_PATH = "http://localhost".replace(/\/+$/, "");
85
+ exports.BASE_PATH = "https://appfloor.in".replace(/\/+$/, "");
86
86
  var Configuration = /** @class */ (function () {
87
87
  function Configuration(configuration) {
88
88
  if (configuration === void 0) { configuration = {}; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xfloor/floor-memory-sdk-ts",
3
- "version": "1.0.17",
3
+ "version": "1.0.19",
4
4
  "description": "TypeScript SDK for xFloor Memory APIs (Memory + Registration).",
5
5
  "author": "xFloor",
6
6
  "repository": {
@@ -1,52 +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
- /**
15
- *
16
- * @export
17
- * @interface ValidateCodeRequest
18
- */
19
- export interface ValidateCodeRequest {
20
- /**
21
- * User ID
22
- * @type {string}
23
- * @memberof ValidateCodeRequest
24
- */
25
- userId: string;
26
- /**
27
- * Validation code
28
- * @type {string}
29
- * @memberof ValidateCodeRequest
30
- */
31
- activationCode: string;
32
- /**
33
- * App ID which is given while registering as developer
34
- * @type {string}
35
- * @memberof ValidateCodeRequest
36
- */
37
- appId: string;
38
- /**
39
- * 4 for sign up, 5 for login
40
- * @type {string}
41
- * @memberof ValidateCodeRequest
42
- */
43
- mode: string;
44
- }
45
- /**
46
- * Check if a given object implements the ValidateCodeRequest interface.
47
- */
48
- export declare function instanceOfValidateCodeRequest(value: object): value is ValidateCodeRequest;
49
- export declare function ValidateCodeRequestFromJSON(json: any): ValidateCodeRequest;
50
- export declare function ValidateCodeRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ValidateCodeRequest;
51
- export declare function ValidateCodeRequestToJSON(json: any): ValidateCodeRequest;
52
- export declare function ValidateCodeRequestToJSONTyped(value?: ValidateCodeRequest | null, ignoreDiscriminator?: boolean): any;
@@ -1,65 +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
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.instanceOfValidateCodeRequest = instanceOfValidateCodeRequest;
19
- exports.ValidateCodeRequestFromJSON = ValidateCodeRequestFromJSON;
20
- exports.ValidateCodeRequestFromJSONTyped = ValidateCodeRequestFromJSONTyped;
21
- exports.ValidateCodeRequestToJSON = ValidateCodeRequestToJSON;
22
- exports.ValidateCodeRequestToJSONTyped = ValidateCodeRequestToJSONTyped;
23
- /**
24
- * Check if a given object implements the ValidateCodeRequest interface.
25
- */
26
- function instanceOfValidateCodeRequest(value) {
27
- if (!('userId' in value) || value['userId'] === undefined)
28
- return false;
29
- if (!('activationCode' in value) || value['activationCode'] === undefined)
30
- return false;
31
- if (!('appId' in value) || value['appId'] === undefined)
32
- return false;
33
- if (!('mode' in value) || value['mode'] === undefined)
34
- return false;
35
- return true;
36
- }
37
- function ValidateCodeRequestFromJSON(json) {
38
- return ValidateCodeRequestFromJSONTyped(json, false);
39
- }
40
- function ValidateCodeRequestFromJSONTyped(json, ignoreDiscriminator) {
41
- if (json == null) {
42
- return json;
43
- }
44
- return {
45
- 'userId': json['user_id'],
46
- 'activationCode': json['activation_code'],
47
- 'appId': json['app_id'],
48
- 'mode': json['mode'],
49
- };
50
- }
51
- function ValidateCodeRequestToJSON(json) {
52
- return ValidateCodeRequestToJSONTyped(json, false);
53
- }
54
- function ValidateCodeRequestToJSONTyped(value, ignoreDiscriminator) {
55
- if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
56
- if (value == null) {
57
- return value;
58
- }
59
- return {
60
- 'user_id': value['userId'],
61
- 'activation_code': value['activationCode'],
62
- 'app_id': value['appId'],
63
- 'mode': value['mode'],
64
- };
65
- }