@arrowsphere/api-client 3.47.0-rc.bdj.1 → 3.47.0-rc.bdj.2

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.
@@ -6,4 +6,5 @@ export declare class PublicGraphQLClient extends AbstractGraphQLClient {
6
6
  getCatalogGraphQLClient(): CatalogGraphQLClient;
7
7
  getSecurityScoreGraphQLClient(): SecurityScoreGraphQLClient;
8
8
  getGraphqlApiClient(): GraphqlApiClient;
9
+ private applyConfig;
9
10
  }
@@ -7,27 +7,25 @@ const securityScore_1 = require("./securityScore");
7
7
  const graphqlApi_1 = require("./graphqlApi");
8
8
  class PublicGraphQLClient extends abstractGraphQLClient_1.AbstractGraphQLClient {
9
9
  getCatalogGraphQLClient() {
10
- return new catalogGraphQLClient_1.CatalogGraphQLClient()
11
- .setUrl(this.url)
12
- .setToken(this.token)
13
- .setHeaders(this.headers)
14
- .setToken(this.token)
15
- .setHttpExceptionHandlers(this.httpExceptionHandlers);
10
+ const client = new catalogGraphQLClient_1.CatalogGraphQLClient();
11
+ this.applyConfig(client);
12
+ return client;
16
13
  }
17
14
  getSecurityScoreGraphQLClient() {
18
- return new securityScore_1.SecurityScoreGraphQLClient()
19
- .setUrl(this.url)
20
- .setToken(this.token)
21
- .setHeaders(this.headers)
22
- .setToken(this.token)
23
- .setHttpExceptionHandlers(this.httpExceptionHandlers);
15
+ const client = new securityScore_1.SecurityScoreGraphQLClient();
16
+ this.applyConfig(client);
17
+ return client;
24
18
  }
25
19
  getGraphqlApiClient() {
26
- return new graphqlApi_1.GraphqlApiClient()
20
+ const client = new graphqlApi_1.GraphqlApiClient();
21
+ this.applyConfig(client);
22
+ return client;
23
+ }
24
+ applyConfig(client) {
25
+ return client
27
26
  .setUrl(this.url)
28
- .setToken(this.token)
27
+ .setSecurity(this.security)
29
28
  .setHeaders(this.headers)
30
- .setToken(this.token)
31
29
  .setHttpExceptionHandlers(this.httpExceptionHandlers);
32
30
  }
33
31
  }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/ArrowSphere/nodejs-api-client.git"
6
6
  },
7
- "version": "3.47.0-rc.bdj.1",
7
+ "version": "3.47.0-rc.bdj.2",
8
8
  "description": "Node.js client for ArrowSphere's public API",
9
9
  "main": "build/index.js",
10
10
  "types": "build/index.d.ts",