@flashbacktech/flashbackclient 0.1.11 → 0.1.12
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 +2 -0
- package/dist/api/client.js +3 -0
- package/package.json +1 -1
package/dist/api/client.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { CreateUnitRequest, CreateUnitResponse, CreateRepoRequest, CreateRepoRes
|
|
|
2
2
|
import { IApiClient, ProviderType } from './interfaces';
|
|
3
3
|
import { ActivateResponse, DeactivateResponse, LoginBody, LoginResponse, LogoutResponse, OAuth2ResponseDTO, RefreshTokenErrorResponse, RefreshTokenResponse, RegisterBody, RegisterResponse } from './types/auth';
|
|
4
4
|
import { StatsQueryParams, StatsResponse, NodeStatsMinuteResponse, NodeStatsDailyResponse, NodeStatsQueryParams, UnitStatsResponse, RepoStatsResponse, NodeStatsDailyQueryParams } from './types/stats';
|
|
5
|
+
import { NodeInfo } from './types/bridge';
|
|
5
6
|
interface ErrorResponse {
|
|
6
7
|
message?: string;
|
|
7
8
|
[key: string]: any;
|
|
@@ -71,5 +72,6 @@ export declare class ApiClient implements IApiClient {
|
|
|
71
72
|
getUnitStats: (params?: {
|
|
72
73
|
unitId?: string[];
|
|
73
74
|
}) => Promise<UnitStatsResponse>;
|
|
75
|
+
getNodeInfo: () => Promise<NodeInfo[]>;
|
|
74
76
|
}
|
|
75
77
|
export {};
|
package/dist/api/client.js
CHANGED
|
@@ -293,6 +293,9 @@ class ApiClient {
|
|
|
293
293
|
}
|
|
294
294
|
return this.makeRequest(`unit/stats${queryParams.toString() ? `?${queryParams.toString()}` : ''}`, 'GET', null);
|
|
295
295
|
};
|
|
296
|
+
this.getNodeInfo = async () => {
|
|
297
|
+
return this.makeRequest('node', 'GET', null);
|
|
298
|
+
};
|
|
296
299
|
this.baseURL = baseURL;
|
|
297
300
|
this.headers = {};
|
|
298
301
|
this.debug = false;
|