Skip to content

Commit ef402f2

Browse files
authored
remove APIAuthenticatedService in favor of setting apiKeyRequired flag in-service when required (#1219)
1 parent 55009a9 commit ef402f2

File tree

3 files changed

+6
-33
lines changed

3 files changed

+6
-33
lines changed

src/apiKeyAuthenticatedService.ts

Lines changed: 0 additions & 29 deletions
This file was deleted.

src/services/terminalCloudAPI.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* See the LICENSE file for more info.
1818
*/
1919

20-
import ApiKeyAuthenticatedService from "../apiKeyAuthenticatedService";
20+
import Service from "../service";
2121
import Client from "../client";
2222
import getJsonResponse from "../helpers/getJsonResponse";
2323
import Async from "./resource/terminal/cloud/async";
@@ -26,12 +26,13 @@ import mergeDeep from "../utils/mergeDeep";
2626
import { ApplicationInfo } from "../typings/applicationInfo";
2727
import { ObjectSerializer, TerminalApiRequest, TerminalApiResponse } from "../typings/terminal/models";
2828

29-
class TerminalCloudAPI extends ApiKeyAuthenticatedService {
29+
class TerminalCloudAPI extends Service {
3030
private readonly terminalApiAsync: Async;
3131
private readonly terminalApiSync: Sync;
3232

3333
public constructor(client: Client) {
3434
super(client);
35+
this.apiKeyRequired = true;
3536
this.terminalApiAsync = new Async(this);
3637
this.terminalApiSync = new Sync(this);
3738
}

src/services/terminalLocalAPI.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* See the LICENSE file for more info.
1818
*/
1919

20-
import ApiKeyAuthenticatedService from "../apiKeyAuthenticatedService";
20+
import Service from "../service";
2121
import Client from "../client";
2222
import getJsonResponse from "../helpers/getJsonResponse";
2323
import NexoCrypto from "../security/nexoCrypto";
@@ -32,12 +32,13 @@ import {
3232
TerminalApiSecuredResponse
3333
} from "../typings/terminal/models";
3434

35-
class TerminalLocalAPI extends ApiKeyAuthenticatedService {
35+
class TerminalLocalAPI extends Service {
3636
private readonly localRequest: LocalRequest;
3737
private nexoCrypto: NexoCrypto;
3838

3939
public constructor(client: Client) {
4040
super(client);
41+
this.apiKeyRequired = true;
4142
this.localRequest = new LocalRequest(this);
4243
this.nexoCrypto = new NexoCrypto();
4344
}

0 commit comments

Comments
 (0)