@flashbacktech/flashbackclient 0.1.19 → 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.
- package/dist/api/client.d.ts +3 -1
- package/dist/api/client.js +6 -0
- package/dist/api/types/auth.d.ts +14 -0
- package/package.json +1 -1
package/dist/api/client.d.ts
CHANGED
|
@@ -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>;
|
package/dist/api/client.js
CHANGED
|
@@ -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();
|
package/dist/api/types/auth.d.ts
CHANGED
|
@@ -38,8 +38,18 @@ export interface JwtPayload {
|
|
|
38
38
|
export interface RegisterBody {
|
|
39
39
|
email: string;
|
|
40
40
|
password: string;
|
|
41
|
+
firstName: string;
|
|
42
|
+
lastName: string;
|
|
41
43
|
companyName: string;
|
|
42
44
|
companyWebsite?: string;
|
|
45
|
+
phone?: string;
|
|
46
|
+
address1?: string;
|
|
47
|
+
address2?: string;
|
|
48
|
+
city?: string;
|
|
49
|
+
state?: string;
|
|
50
|
+
zipcode?: string;
|
|
51
|
+
country?: string;
|
|
52
|
+
website?: string;
|
|
43
53
|
isBusiness: boolean;
|
|
44
54
|
}
|
|
45
55
|
export interface LoginBody {
|
|
@@ -81,3 +91,7 @@ export interface DeactivateResponse {
|
|
|
81
91
|
error_code?: string;
|
|
82
92
|
message?: string;
|
|
83
93
|
}
|
|
94
|
+
export interface ResetPasswordBody {
|
|
95
|
+
token: string;
|
|
96
|
+
newPassword: string;
|
|
97
|
+
}
|