@flashbacktech/flashbackclient 0.0.78 → 0.0.80

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.
@@ -3,13 +3,35 @@ export declare enum BucketStatusType {
3
3
  OFFLINE = "OFFLINE",
4
4
  ERROR = "ERROR"
5
5
  }
6
+ interface NodeSignedMessage {
7
+ ip: string;
8
+ region: string;
9
+ timestamp: number;
10
+ signature: string;
11
+ }
6
12
  export interface BucketStatus {
7
13
  unitId: string;
8
14
  status: BucketStatusType;
9
15
  latency_ms?: number;
10
16
  createdAt: string;
11
17
  }
12
- export interface BucketStatusResponse {
18
+ export interface BucketStatusRequest extends NodeSignedMessage {
19
+ buckets: BucketStatus[];
20
+ }
21
+ export interface NodeStatsResponse {
13
22
  nodeIP: string;
14
23
  buckets: BucketStatus[];
15
24
  }
25
+ export interface RegisterRequest extends NodeSignedMessage {
26
+ provider: string;
27
+ status: string;
28
+ region: string;
29
+ version: string;
30
+ }
31
+ export interface RegisterResponse {
32
+ success: boolean;
33
+ message: string;
34
+ error_code?: string;
35
+ error_message?: string;
36
+ }
37
+ export {};
@@ -107,7 +107,6 @@ export interface StorageUnit {
107
107
  endpoint?: string;
108
108
  region?: string;
109
109
  status?: string;
110
- latency_ms?: number;
111
110
  projectId?: string;
112
111
  createdAt: string;
113
112
  }
@@ -1,2 +1,3 @@
1
- import { MockupAuthClient } from "./oauth2";
2
- export { MockupAuthClient };
1
+ import { FlashbackAuthClient } from "./oauth2";
2
+ import { FlashbackGCSStorage, FlashbackStorageOptions } from "./storage";
3
+ export { FlashbackAuthClient, FlashbackGCSStorage, FlashbackStorageOptions };
package/dist/gcs/index.js CHANGED
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MockupAuthClient = void 0;
3
+ exports.FlashbackGCSStorage = exports.FlashbackAuthClient = void 0;
4
4
  const oauth2_1 = require("./oauth2");
5
- Object.defineProperty(exports, "MockupAuthClient", { enumerable: true, get: function () { return oauth2_1.MockupAuthClient; } });
5
+ Object.defineProperty(exports, "FlashbackAuthClient", { enumerable: true, get: function () { return oauth2_1.FlashbackAuthClient; } });
6
+ const storage_1 = require("./storage");
7
+ Object.defineProperty(exports, "FlashbackGCSStorage", { enumerable: true, get: function () { return storage_1.FlashbackGCSStorage; } });
@@ -10,7 +10,7 @@ const crypto_1 = __importDefault(require("crypto"));
10
10
  const originalRequest = require('gaxios').instance.request;
11
11
  class FlashbackGCSStorage extends storage_1.Storage {
12
12
  constructor(opts) {
13
- const { credentials, apiEndpoint = 'https://gcs.us-east-1.flashback.tech', tokenScopes = ['READ', 'WRITE'], ...rest } = opts;
13
+ const { credentials, apiEndpoint = 'https://gcs-us-east-1-gcp.flashback.tech', tokenScopes = ['READ', 'WRITE'], ...rest } = opts;
14
14
  const authClient = new oauth2_1.FlashbackAuthClient(apiEndpoint + '/token', tokenScopes, credentials);
15
15
  super({
16
16
  ...rest,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flashbacktech/flashbackclient",
3
- "version": "0.0.78",
3
+ "version": "0.0.80",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },