@flashbacktech/flashbackclient 0.1.20 → 0.1.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.
@@ -1,6 +1,6 @@
1
1
  import { CreateUnitRequest, CreateUnitResponse, CreateRepoRequest, CreateRepoResponse, StorageUnit, CreateRepoKeyRequest, CreateRepoKeyResponse, GetUnitsResponse, GetReposResponse, GetRepoKeysResponse, UpdateUnitRequest, UpdateUnitResponse, ActionResponse, UpdateRepoRequest, UpdateRepoResponse, UpdateRepoKeyRequest, UpdateRepoKeyResponse, ValidateUnitRequest, ValidateUnitResponse, ValidateRepoUnitsRequest, ValidateRepoUnitsResponse, StorageUnitStatusResponse, GetUnitNodeStatsResponse, GetUnitNodeStatsRequest } from './types/storage';
2
2
  import { IApiClient, ProviderType } from './interfaces';
3
- import { ActivateResponse, DeactivateResponse, LoginBody, LoginResponse, LogoutResponse, OAuth2ResponseDTO, RefreshTokenErrorResponse, RefreshTokenResponse, RegisterBody, RegisterResponse } from './types/auth';
3
+ import { ActivateResponse, DeactivateResponse, LoginBody, LoginResponse, LogoutResponse, OAuth2ResponseDTO, RefreshTokenErrorResponse, RefreshTokenResponse, RegisterBody, RegisterResponse, ResetPasswordBody } from './types/auth';
4
4
  import { StatsQueryParams, StatsResponse, NodeStatsMinuteResponse, NodeStatsDailyResponse, NodeStatsQueryParams, UnitStatsResponse, RepoStatsResponse, NodeStatsDailyQueryParams } from './types/stats';
5
5
  import { NodeInfo } from './types/bridge';
6
6
  import { FeedbackEmailBody } from './types/email';
@@ -65,6 +65,8 @@ export declare class ApiClient implements IApiClient {
65
65
  userActivate: () => Promise<ActivateResponse>;
66
66
  userDeactivate: () => Promise<DeactivateResponse>;
67
67
  getUserQuota: () => Promise<QuotaResponse>;
68
+ requestPasswordReset: (email: string) => Promise<ActionResponse>;
69
+ resetPassword: (data: ResetPasswordBody) => Promise<ActionResponse>;
68
70
  private validateDateRange;
69
71
  getDailyStats: (params: StatsQueryParams) => Promise<StatsResponse>;
70
72
  getMinuteStats: (params: StatsQueryParams) => Promise<StatsResponse>;
@@ -226,6 +226,12 @@ class ApiClient {
226
226
  this.getUserQuota = async () => {
227
227
  return this.makeRequest('user/quota', 'GET', null);
228
228
  };
229
+ this.requestPasswordReset = async (email) => {
230
+ return this.makeRequest('user/request-reset-password', 'POST', { email });
231
+ };
232
+ this.resetPassword = async (data) => {
233
+ return this.makeRequest('user/reset-password', 'POST', data);
234
+ };
229
235
  this.getDailyStats = async (params) => {
230
236
  this.validateDateRange(params.startDate, params.endDate);
231
237
  const queryParams = new URLSearchParams();
@@ -91,3 +91,7 @@ export interface DeactivateResponse {
91
91
  error_code?: string;
92
92
  message?: string;
93
93
  }
94
+ export interface ResetPasswordBody {
95
+ token: string;
96
+ newPassword: string;
97
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flashbacktech/flashbackclient",
3
- "version": "0.1.20",
3
+ "version": "0.1.21",
4
4
  "type": "commonjs",
5
5
  "publishConfig": {
6
6
  "access": "public"