@flashbacktech/flashbackclient 0.1.12 → 0.1.14

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,6 +3,7 @@ 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
5
  import { NodeInfo } from './types/bridge';
6
+ import { FeedbackEmailBody } from './types/email';
6
7
  interface ErrorResponse {
7
8
  message?: string;
8
9
  [key: string]: any;
@@ -73,5 +74,6 @@ export declare class ApiClient implements IApiClient {
73
74
  unitId?: string[];
74
75
  }) => Promise<UnitStatsResponse>;
75
76
  getNodeInfo: () => Promise<NodeInfo[]>;
77
+ sendFeedbackEmail: (data: FeedbackEmailBody) => Promise<ActionResponse>;
76
78
  }
77
79
  export {};
@@ -296,6 +296,9 @@ class ApiClient {
296
296
  this.getNodeInfo = async () => {
297
297
  return this.makeRequest('node', 'GET', null);
298
298
  };
299
+ this.sendFeedbackEmail = async (data) => {
300
+ return this.makeRequest('email/feedback', 'POST', data);
301
+ };
299
302
  this.baseURL = baseURL;
300
303
  this.headers = {};
301
304
  this.debug = false;
@@ -4,4 +4,5 @@ import * as AuthTypes from './types/auth';
4
4
  import * as StatsTypes from './types/stats';
5
5
  import * as ApiInterfaces from './interfaces';
6
6
  import * as BridgeTypes from './types/bridge';
7
- export { ApiClient, ApiTypes, AuthTypes, StatsTypes, ApiInterfaces, HttpError, BridgeTypes };
7
+ import * as EmailTypes from './types/email';
8
+ export { ApiClient, ApiTypes, AuthTypes, StatsTypes, ApiInterfaces, HttpError, BridgeTypes, EmailTypes };
package/dist/api/index.js CHANGED
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.BridgeTypes = exports.HttpError = exports.ApiInterfaces = exports.StatsTypes = exports.AuthTypes = exports.ApiTypes = exports.ApiClient = void 0;
36
+ exports.EmailTypes = exports.BridgeTypes = exports.HttpError = exports.ApiInterfaces = exports.StatsTypes = exports.AuthTypes = exports.ApiTypes = exports.ApiClient = void 0;
37
37
  const client_1 = require("./client");
38
38
  Object.defineProperty(exports, "ApiClient", { enumerable: true, get: function () { return client_1.ApiClient; } });
39
39
  Object.defineProperty(exports, "HttpError", { enumerable: true, get: function () { return client_1.HttpError; } });
@@ -47,3 +47,5 @@ const ApiInterfaces = __importStar(require("./interfaces"));
47
47
  exports.ApiInterfaces = ApiInterfaces;
48
48
  const BridgeTypes = __importStar(require("./types/bridge"));
49
49
  exports.BridgeTypes = BridgeTypes;
50
+ const EmailTypes = __importStar(require("./types/email"));
51
+ exports.EmailTypes = EmailTypes;
@@ -0,0 +1,5 @@
1
+ export interface FeedbackEmailBody {
2
+ email: string;
3
+ message: string;
4
+ subject: string;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -15,7 +15,7 @@ class FlashbackGCSStorage extends storage_1.Storage {
15
15
  const { credentials, apiEndpoint = 'https://gcs-us-east-1-gcp.flashback.tech', tokenScopes = ['READ', 'WRITE'], ...rest } = opts;
16
16
  // Ensure the endpoint doesn't have a trailing slash
17
17
  const cleanEndpoint = apiEndpoint.replace(/\/$/, '');
18
- const authClient = new oauth2_1.FlashbackAuthClient(cleanEndpoint + '/token', tokenScopes, credentials);
18
+ const authClient = new oauth2_1.FlashbackAuthClient(cleanEndpoint + '/token', credentials, tokenScopes);
19
19
  super({
20
20
  ...rest,
21
21
  apiEndpoint: cleanEndpoint,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flashbacktech/flashbackclient",
3
- "version": "0.1.12",
3
+ "version": "0.1.14",
4
4
  "type": "commonjs",
5
5
  "publishConfig": {
6
6
  "access": "public"