@arrowsphere/api-client 3.114.2 → 3.115.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.
|
@@ -4,11 +4,13 @@ import { SecurityScoreGraphQLClient } from './securityScore';
|
|
|
4
4
|
import { GraphqlApiClient } from './graphqlApi';
|
|
5
5
|
import { WellArchitectedGraphQLClient } from './wellArchitected';
|
|
6
6
|
import { LicensesEventClient } from './licenses/licensesEventClient';
|
|
7
|
+
import { UserGraphqlClient } from './user';
|
|
7
8
|
export declare class PublicGraphQLClient extends AbstractGraphQLClient {
|
|
8
9
|
getCatalogGraphQLClient(): CatalogGraphQLClient;
|
|
9
10
|
getSecurityScoreGraphQLClient(): SecurityScoreGraphQLClient;
|
|
10
11
|
getWellArchitectedGraphQLClient(): WellArchitectedGraphQLClient;
|
|
11
12
|
getGraphqlApiClient(): GraphqlApiClient;
|
|
12
13
|
getLicensesEventClient(): LicensesEventClient;
|
|
14
|
+
getUserGraphqlApiClient(): UserGraphqlClient;
|
|
13
15
|
private applyConfig;
|
|
14
16
|
}
|
|
@@ -7,6 +7,7 @@ const securityScore_1 = require("./securityScore");
|
|
|
7
7
|
const graphqlApi_1 = require("./graphqlApi");
|
|
8
8
|
const wellArchitected_1 = require("./wellArchitected");
|
|
9
9
|
const licensesEventClient_1 = require("./licenses/licensesEventClient");
|
|
10
|
+
const user_1 = require("./user");
|
|
10
11
|
class PublicGraphQLClient extends abstractGraphQLClient_1.AbstractGraphQLClient {
|
|
11
12
|
getCatalogGraphQLClient() {
|
|
12
13
|
const client = new catalogGraphQLClient_1.CatalogGraphQLClient();
|
|
@@ -33,6 +34,11 @@ class PublicGraphQLClient extends abstractGraphQLClient_1.AbstractGraphQLClient
|
|
|
33
34
|
this.applyConfig(client);
|
|
34
35
|
return client;
|
|
35
36
|
}
|
|
37
|
+
getUserGraphqlApiClient() {
|
|
38
|
+
const client = new user_1.UserGraphqlClient();
|
|
39
|
+
this.applyConfig(client);
|
|
40
|
+
return client;
|
|
41
|
+
}
|
|
36
42
|
applyConfig(client) {
|
|
37
43
|
return client
|
|
38
44
|
.setUrl(this.url)
|
package/build/user/index.d.ts
CHANGED
package/build/user/index.js
CHANGED
|
@@ -15,5 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./UserClient"), exports);
|
|
18
|
+
__exportStar(require("./userGraphqlClient"), exports);
|
|
18
19
|
__exportStar(require("./types"), exports);
|
|
19
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AbstractGraphQLClient } from '../abstractGraphQLClient';
|
|
2
|
+
export declare class UserGraphqlClient extends AbstractGraphQLClient {
|
|
3
|
+
/**
|
|
4
|
+
* The Path of graphql catalog API
|
|
5
|
+
*/
|
|
6
|
+
private GRAPHQL;
|
|
7
|
+
findRaw<GraphQLResponseTypes>(request: string): Promise<GraphQLResponseTypes | null>;
|
|
8
|
+
find(): Promise<unknown | null>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserGraphqlClient = void 0;
|
|
4
|
+
const abstractGraphQLClient_1 = require("../abstractGraphQLClient");
|
|
5
|
+
class UserGraphqlClient extends abstractGraphQLClient_1.AbstractGraphQLClient {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
/**
|
|
9
|
+
* The Path of graphql catalog API
|
|
10
|
+
*/
|
|
11
|
+
this.GRAPHQL = '/v2/graphql';
|
|
12
|
+
}
|
|
13
|
+
async findRaw(request) {
|
|
14
|
+
this.path = this.GRAPHQL;
|
|
15
|
+
try {
|
|
16
|
+
return await this.post(request);
|
|
17
|
+
}
|
|
18
|
+
catch (error) {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
async find() {
|
|
23
|
+
const queryStr = '{ getUsers { updatedBy isEnabled extraData { name value} } }';
|
|
24
|
+
const result = await this.findRaw(queryStr);
|
|
25
|
+
console.log(result);
|
|
26
|
+
return result;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.UserGraphqlClient = UserGraphqlClient;
|
|
30
|
+
//# sourceMappingURL=userGraphqlClient.js.map
|
package/package.json
CHANGED