@flashbacktech/flashbackclient 0.1.88 → 0.1.90
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 +7 -0
- package/dist/api/client.js +7 -0
- package/dist/api/types/bridge.d.ts +2 -0
- package/package.json +1 -1
package/dist/api/client.d.ts
CHANGED
|
@@ -52,6 +52,13 @@ export declare class ApiClient implements IApiClient {
|
|
|
52
52
|
private refreshGoogleToken;
|
|
53
53
|
private refreshGithubToken;
|
|
54
54
|
private exchangeGoogleCode;
|
|
55
|
+
getTokens: () => Promise<{
|
|
56
|
+
success: boolean;
|
|
57
|
+
tokens: any[];
|
|
58
|
+
}>;
|
|
59
|
+
revokeToken: (tokenId: string) => Promise<{
|
|
60
|
+
success: boolean;
|
|
61
|
+
}>;
|
|
55
62
|
createStorageUnit: (data: CreateUnitRequest) => Promise<CreateUnitResponse>;
|
|
56
63
|
getStorageUnits: () => Promise<GetUnitsResponse>;
|
|
57
64
|
validateStorageUnit: (unitId: string, data: ValidateUnitRequest) => Promise<ValidateUnitResponse>;
|
package/dist/api/client.js
CHANGED
|
@@ -155,6 +155,13 @@ class ApiClient {
|
|
|
155
155
|
this.exchangeGoogleCode = async (code) => {
|
|
156
156
|
return this.makeRequest('auth/google/exchange', 'POST', { code });
|
|
157
157
|
};
|
|
158
|
+
// Token Management
|
|
159
|
+
this.getTokens = async () => {
|
|
160
|
+
return this.makeRequest('token', 'GET', null);
|
|
161
|
+
};
|
|
162
|
+
this.revokeToken = async (tokenId) => {
|
|
163
|
+
return this.makeRequest(`token/${tokenId}`, 'DELETE', null);
|
|
164
|
+
};
|
|
158
165
|
////// Units API
|
|
159
166
|
this.createStorageUnit = async (data) => {
|
|
160
167
|
return this.makeRequest('unit', 'POST', data);
|
|
@@ -8,6 +8,7 @@ interface NodeSignedMessage {
|
|
|
8
8
|
region: string;
|
|
9
9
|
timestamp: number;
|
|
10
10
|
signature: string;
|
|
11
|
+
id_org?: string;
|
|
11
12
|
}
|
|
12
13
|
export interface NodeStatusInfo {
|
|
13
14
|
ip: string;
|
|
@@ -49,5 +50,6 @@ export interface NodeInfo {
|
|
|
49
50
|
latencyMs?: number;
|
|
50
51
|
lastUpdated: string;
|
|
51
52
|
url: string;
|
|
53
|
+
id_org?: string;
|
|
52
54
|
}
|
|
53
55
|
export {};
|