@flashbacktech/flashbackclient 0.2.21 → 0.2.23
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CreateRepoRequest, CreateRepoResponse, CreateRepoKeyRequest, CreateRepoKeyResponse, GetReposResponse, GetRepoKeysResponse, ActionResponse, UpdateRepoRequest, UpdateRepoResponse, UpdateRepoKeyRequest, UpdateRepoKeyResponse, ValidateRepoUnitsRequest, ValidateRepoUnitsResponse, CreateBucketRequest, CreateBucketResponse, UpdateBucketRequest, UpdateBucketResponse, ValidateBucketRequest, ValidateBucketResponse, StorageBucket, GetBucketsResponse, StorageBucketStatusResponse, GetBucketNodeStatsRequest, GetBucketNodeStatsResponse, CreateRepoWithBucketsRequest, UpdateRepoWithBucketsRequest, ValidateRepoBucketsRequest, ValidateRepoBucketsResponse } from './types/storage/storage';
|
|
2
2
|
import { IApiClient, ProviderType } from './interfaces';
|
|
3
|
-
import {
|
|
3
|
+
import { ActivateUserRequest, ActivateUserResponse, DeactivateResponse, DemoRequestBody, DemoRequestResponse, LoginBody, LoginResponse, LogoutResponse, OAuth2ResponseDTO, RefreshTokenErrorResponse, RefreshTokenResponse, RegisterBody, RegisterResponse, ResetPasswordBody, Web3RegisterBody } from './types/platform/auth';
|
|
4
4
|
import { StatsQueryParams, StatsResponse, NodeStatsMinuteResponse, NodeStatsDailyResponse, NodeStatsQueryParams, UnitStatsResponse, RepoStatsResponse, NodeStatsDailyQueryParams, BucketStatsResponse, StatsQueryWithBucketParams, NodeStatsQueryWithBucketParams, NodeStatsDailyQueryWithBucketParams } from './types/storage/stats';
|
|
5
5
|
import { NodeInfoResponse, RegisterRequest } from './types/storage/bridge';
|
|
6
6
|
import { GetOrganizationKeysResponse } from './types/storage/noderegistration';
|
|
@@ -93,12 +93,13 @@ export declare class ApiClient implements IApiClient {
|
|
|
93
93
|
userLogin: (data: LoginBody) => Promise<LoginResponse>;
|
|
94
94
|
userRefresh: (refreshToken: string) => Promise<RefreshTokenResponse | RefreshTokenErrorResponse>;
|
|
95
95
|
userLogout: (refreshToken: string) => Promise<LogoutResponse>;
|
|
96
|
-
userActivate: () => Promise<
|
|
96
|
+
userActivate: (data: ActivateUserRequest) => Promise<ActivateUserResponse>;
|
|
97
97
|
userDeactivate: () => Promise<DeactivateResponse>;
|
|
98
98
|
getUserQuota: () => Promise<QuotaResponse>;
|
|
99
99
|
updateUser: (userId: string, data: UserUpdateRequest) => Promise<UserUpdateResponse>;
|
|
100
100
|
requestPasswordReset: (email: string) => Promise<ActionResponse>;
|
|
101
101
|
resetPassword: (data: ResetPasswordBody) => Promise<ActionResponse>;
|
|
102
|
+
requestDemo: (data: DemoRequestBody) => Promise<DemoRequestResponse>;
|
|
102
103
|
private validateDateRange;
|
|
103
104
|
getDailyStats(params: StatsQueryParams): Promise<StatsResponse>;
|
|
104
105
|
getDailyStats(params: StatsQueryWithBucketParams): Promise<StatsResponse>;
|
package/dist/api/client.js
CHANGED
|
@@ -222,8 +222,8 @@ class ApiClient {
|
|
|
222
222
|
this.userLogout = async (refreshToken) => {
|
|
223
223
|
return this.makeRequest('user/logout', 'POST', { refresh_token: refreshToken });
|
|
224
224
|
};
|
|
225
|
-
this.userActivate = async () => {
|
|
226
|
-
return this.makeRequest('user/activate', 'POST',
|
|
225
|
+
this.userActivate = async (data) => {
|
|
226
|
+
return this.makeRequest('user/activate', 'POST', data);
|
|
227
227
|
};
|
|
228
228
|
this.userDeactivate = async () => {
|
|
229
229
|
return this.makeRequest('user/deactivate', 'POST', null);
|
|
@@ -240,6 +240,9 @@ class ApiClient {
|
|
|
240
240
|
this.resetPassword = async (data) => {
|
|
241
241
|
return this.makeRequest('user/reset-password', 'POST', data);
|
|
242
242
|
};
|
|
243
|
+
this.requestDemo = async (data) => {
|
|
244
|
+
return this.makeRequest('demo/request', 'POST', data);
|
|
245
|
+
};
|
|
243
246
|
this.getRepoStats = async (params) => {
|
|
244
247
|
const queryParams = new URLSearchParams();
|
|
245
248
|
if (params && params.repoId && params.repoId.length > 0) {
|
package/dist/api/interfaces.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CreateRepoRequest, CreateRepoResponse, CreateRepoKeyRequest, CreateRepoKeyResponse, GetReposResponse, GetRepoKeysResponse, ActionResponse, UpdateRepoResponse, UpdateRepoRequest, UpdateRepoKeyRequest, UpdateRepoKeyResponse, ValidateRepoUnitsRequest, ValidateRepoUnitsResponse, GetBucketsResponse, CreateBucketRequest, CreateBucketResponse, UpdateBucketRequest, UpdateBucketResponse, ValidateBucketRequest, ValidateBucketResponse } from './types/storage/storage';
|
|
2
|
-
import { RegisterBody, LoginBody, RegisterResponse, LoginResponse, LogoutResponse,
|
|
2
|
+
import { RegisterBody, LoginBody, RegisterResponse, LoginResponse, LogoutResponse, ActivateUserRequest, ActivateUserResponse, DeactivateResponse, RefreshTokenResponse, RefreshTokenErrorResponse } from './types/platform/auth';
|
|
3
3
|
import { StatsQueryParams, StatsResponse, NodeStatsMinuteResponse, NodeStatsDailyResponse, NodeStatsQueryParams } from './types/storage/stats';
|
|
4
4
|
import { BuySubscriptionRequest, BuySubscriptionResponse, GetSubscriptionsResponse, MySubscriptionResponse, PaymentsListResponse, PaymentsQueryParams, CancelSubscriptionResponse } from './types/platform/subscriptions';
|
|
5
5
|
export declare enum ProviderType {
|
|
@@ -29,7 +29,7 @@ export interface IApiClient {
|
|
|
29
29
|
userLogin(loginBody: LoginBody): Promise<LoginResponse>;
|
|
30
30
|
userRefresh(refreshToken: string): Promise<RefreshTokenResponse | RefreshTokenErrorResponse>;
|
|
31
31
|
userLogout(refreshToken: string): Promise<LogoutResponse>;
|
|
32
|
-
userActivate(): Promise<
|
|
32
|
+
userActivate(data: ActivateUserRequest): Promise<ActivateUserResponse>;
|
|
33
33
|
userDeactivate(): Promise<DeactivateResponse>;
|
|
34
34
|
getDailyStats(params: StatsQueryParams): Promise<StatsResponse>;
|
|
35
35
|
getMinuteStats(params: StatsQueryParams): Promise<StatsResponse>;
|
|
@@ -112,3 +112,33 @@ export interface GoogleLoginRequest extends LoginDeviceInfo {
|
|
|
112
112
|
export interface GithubLoginRequest extends LoginDeviceInfo {
|
|
113
113
|
code: string;
|
|
114
114
|
}
|
|
115
|
+
export interface DemoRequestBody {
|
|
116
|
+
userId: string;
|
|
117
|
+
email: string;
|
|
118
|
+
name: string;
|
|
119
|
+
}
|
|
120
|
+
export interface DemoRequestResponse {
|
|
121
|
+
success: boolean;
|
|
122
|
+
calendarUrl: string;
|
|
123
|
+
}
|
|
124
|
+
export interface ActivateUserRequest {
|
|
125
|
+
uid: string;
|
|
126
|
+
token: string;
|
|
127
|
+
registrationInfo: RegisterBody;
|
|
128
|
+
}
|
|
129
|
+
export interface ActivateUserResponse {
|
|
130
|
+
success: boolean;
|
|
131
|
+
error_code?: string;
|
|
132
|
+
message?: string;
|
|
133
|
+
accessToken?: string;
|
|
134
|
+
refreshToken?: string;
|
|
135
|
+
tokenId?: string;
|
|
136
|
+
expiresAt?: number;
|
|
137
|
+
user?: {
|
|
138
|
+
id: string;
|
|
139
|
+
email: string;
|
|
140
|
+
name: string;
|
|
141
|
+
orgId?: string;
|
|
142
|
+
orgRole?: number;
|
|
143
|
+
};
|
|
144
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flashbacktech/flashbackclient",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.23",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@aws-sdk/client-sts": "^3.777.0",
|
|
28
|
+
"@flashbacktech/flashbackclient": "^0.2.21",
|
|
28
29
|
"@google-cloud/storage": "^7.15.0",
|
|
29
30
|
"@stellar/stellar-sdk": "^14.0.0",
|
|
30
31
|
"formdata-node": "^6.0.3",
|