@arrowsphere/api-client 3.55.0-rc.fdi.6 → 3.55.0
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.
- package/CHANGELOG.md +6 -0
- package/build/abstractGraphQLClient.d.ts +1 -6
- package/build/abstractGraphQLClient.js +3 -15
- package/build/graphqlApi/types/entities/partnertag.d.ts +1 -0
- package/build/graphqlApi/types/graphqlApiQueries.d.ts +3 -1
- package/build/graphqlApi/types/graphqlApiQueries.js +1 -0
- package/build/index.d.ts +0 -1
- package/build/index.js +0 -1
- package/build/publicGraphQLClient.d.ts +6 -9
- package/build/publicGraphQLClient.js +9 -18
- package/package.json +1 -1
- package/build/account/accountGraphQLClient.d.ts +0 -10
- package/build/account/accountGraphQLClient.js +0 -27
- package/build/account/index.d.ts +0 -3
- package/build/account/index.js +0 -20
- package/build/account/types/accountGraphQLQueries.d.ts +0 -43
- package/build/account/types/accountGraphQLQueries.js +0 -3
- package/build/account/types/accountGraphQLSchemas.d.ts +0 -34
- package/build/account/types/accountGraphQLSchemas.js +0 -3
- package/build/account/types/accountGraphQLTypes.d.ts +0 -66
- package/build/account/types/accountGraphQLTypes.js +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
4
4
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
5
5
|
|
|
6
|
+
## [3.55.0] - 2023-09-25
|
|
7
|
+
|
|
8
|
+
### Changed
|
|
9
|
+
- update graphql-api spec, add field labelsSeralized
|
|
10
|
+
|
|
11
|
+
|
|
6
12
|
## [3.54.0] - 2023-09-21
|
|
7
13
|
|
|
8
14
|
### Changed
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { GraphQLClient } from 'graphql-request';
|
|
2
2
|
import * as Dom from 'graphql-request/dist/types.dom';
|
|
3
|
-
import { Options
|
|
3
|
+
import { Options } from './abstractRestfulClient';
|
|
4
4
|
import { GetProductsType } from './catalog';
|
|
5
5
|
import { AbstractHttpClient } from './AbstractHttpClient';
|
|
6
6
|
export declare type GraphQLResponseTypes = GetProductsType;
|
|
7
|
-
export declare type ConfigurationsGraphQLClient = {
|
|
8
|
-
[ParameterKeys.IS_LOGGING]?: boolean;
|
|
9
|
-
};
|
|
10
7
|
export declare abstract class AbstractGraphQLClient extends AbstractHttpClient {
|
|
11
8
|
/**
|
|
12
9
|
* Must not be called directly.
|
|
@@ -15,8 +12,6 @@ export declare abstract class AbstractGraphQLClient extends AbstractHttpClient {
|
|
|
15
12
|
protected graphQLClient: GraphQLClient;
|
|
16
13
|
protected optionsHeader?: Dom.RequestInit['headers'];
|
|
17
14
|
protected options: Options;
|
|
18
|
-
protected isLogging: boolean;
|
|
19
|
-
constructor(configuration?: ConfigurationsGraphQLClient);
|
|
20
15
|
private getClientInstance;
|
|
21
16
|
setOptions(options: Options): this;
|
|
22
17
|
protected post<GraphQLResponseTypes>(query: string): Promise<GraphQLResponseTypes>;
|
|
@@ -25,17 +25,13 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.AbstractGraphQLClient = void 0;
|
|
27
27
|
const graphql_request_1 = require("graphql-request");
|
|
28
|
-
const abstractRestfulClient_1 = require("./abstractRestfulClient");
|
|
29
28
|
const path = __importStar(require("path"));
|
|
30
29
|
const json_to_graphql_query_1 = require("json-to-graphql-query");
|
|
31
30
|
const AbstractHttpClient_1 = require("./AbstractHttpClient");
|
|
32
31
|
class AbstractGraphQLClient extends AbstractHttpClient_1.AbstractHttpClient {
|
|
33
|
-
constructor(
|
|
34
|
-
super();
|
|
32
|
+
constructor() {
|
|
33
|
+
super(...arguments);
|
|
35
34
|
this.options = {};
|
|
36
|
-
this.isLogging = configuration
|
|
37
|
-
? !!configuration[abstractRestfulClient_1.ParameterKeys.IS_LOGGING]
|
|
38
|
-
: false;
|
|
39
35
|
}
|
|
40
36
|
getClientInstance() {
|
|
41
37
|
var _a;
|
|
@@ -48,15 +44,7 @@ class AbstractGraphQLClient extends AbstractHttpClient_1.AbstractHttpClient {
|
|
|
48
44
|
async post(query) {
|
|
49
45
|
try {
|
|
50
46
|
this.applyHeaders();
|
|
51
|
-
|
|
52
|
-
console.info('GRAPHQL - Instance : ', this.getClientInstance());
|
|
53
|
-
console.info('GRAPHQL - Query : ', query);
|
|
54
|
-
}
|
|
55
|
-
const response = await this.getClientInstance().request(query);
|
|
56
|
-
if (this.isLogging) {
|
|
57
|
-
console.info('GRAPHQL - Response : ', response);
|
|
58
|
-
}
|
|
59
|
-
return response;
|
|
47
|
+
return await this.getClientInstance().request(query);
|
|
60
48
|
}
|
|
61
49
|
catch (error) {
|
|
62
50
|
const exception = this.mapToPublicApiException(error);
|
|
@@ -77,13 +77,15 @@ export declare enum InputFilterValueField {
|
|
|
77
77
|
NAME = "name",
|
|
78
78
|
OPERATOR = "operator",
|
|
79
79
|
VALUE = "value",
|
|
80
|
-
EXCLUSION = "exclusion"
|
|
80
|
+
EXCLUSION = "exclusion",
|
|
81
|
+
HAVING = "having"
|
|
81
82
|
}
|
|
82
83
|
export declare type InputFilterValueType = {
|
|
83
84
|
[InputFilterValueField.NAME]?: string;
|
|
84
85
|
[InputFilterValueField.OPERATOR]?: ComparisonOperator;
|
|
85
86
|
[InputFilterValueField.VALUE]?: string[];
|
|
86
87
|
[InputFilterValueField.EXCLUSION]?: boolean;
|
|
88
|
+
[InputFilterValueField.HAVING]?: boolean;
|
|
87
89
|
};
|
|
88
90
|
export declare enum InputQueryOptionsField {
|
|
89
91
|
SKIP_PARTITION = "skipPartition"
|
|
@@ -69,6 +69,7 @@ var InputFilterValueField;
|
|
|
69
69
|
InputFilterValueField["OPERATOR"] = "operator";
|
|
70
70
|
InputFilterValueField["VALUE"] = "value";
|
|
71
71
|
InputFilterValueField["EXCLUSION"] = "exclusion";
|
|
72
|
+
InputFilterValueField["HAVING"] = "having";
|
|
72
73
|
})(InputFilterValueField = exports.InputFilterValueField || (exports.InputFilterValueField = {}));
|
|
73
74
|
var InputQueryOptionsField;
|
|
74
75
|
(function (InputQueryOptionsField) {
|
package/build/index.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ export * from './axiosSingleton';
|
|
|
2
2
|
export * from './abstractRestfulClient';
|
|
3
3
|
export * from './abstractEntity';
|
|
4
4
|
export * from './abstractGraphQLClient';
|
|
5
|
-
export * from './account/';
|
|
6
5
|
export * from './campaign/';
|
|
7
6
|
export * from './cart/';
|
|
8
7
|
export * from './catalog/';
|
package/build/index.js
CHANGED
|
@@ -31,7 +31,6 @@ __exportStar(require("./axiosSingleton"), exports);
|
|
|
31
31
|
__exportStar(require("./abstractRestfulClient"), exports);
|
|
32
32
|
__exportStar(require("./abstractEntity"), exports);
|
|
33
33
|
__exportStar(require("./abstractGraphQLClient"), exports);
|
|
34
|
-
__exportStar(require("./account/"), exports);
|
|
35
34
|
__exportStar(require("./campaign/"), exports);
|
|
36
35
|
__exportStar(require("./cart/"), exports);
|
|
37
36
|
__exportStar(require("./catalog/"), exports);
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
import { CatalogGraphQLClient } from './catalog';
|
|
2
|
-
import { AbstractGraphQLClient
|
|
1
|
+
import { CatalogGraphQLClient } from './catalog/catalogGraphQLClient';
|
|
2
|
+
import { AbstractGraphQLClient } from './abstractGraphQLClient';
|
|
3
3
|
import { SecurityScoreGraphQLClient } from './securityScore';
|
|
4
4
|
import { GraphqlApiClient } from './graphqlApi';
|
|
5
5
|
import { WellArchitectedGraphQLClient } from './wellArchitected';
|
|
6
|
-
import { AccountGraphQLClient } from './account';
|
|
7
6
|
export declare class PublicGraphQLClient extends AbstractGraphQLClient {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
getGraphqlApiClient(configuration?: ConfigurationsGraphQLClient): GraphqlApiClient;
|
|
13
|
-
getGraphqlAccountClient(configuration?: ConfigurationsGraphQLClient): AccountGraphQLClient;
|
|
7
|
+
getCatalogGraphQLClient(): CatalogGraphQLClient;
|
|
8
|
+
getSecurityScoreGraphQLClient(): SecurityScoreGraphQLClient;
|
|
9
|
+
getWellArchitectedGraphQLClient(): WellArchitectedGraphQLClient;
|
|
10
|
+
getGraphqlApiClient(): GraphqlApiClient;
|
|
14
11
|
private applyConfig;
|
|
15
12
|
}
|
|
@@ -1,38 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PublicGraphQLClient = void 0;
|
|
4
|
-
const
|
|
4
|
+
const catalogGraphQLClient_1 = require("./catalog/catalogGraphQLClient");
|
|
5
5
|
const abstractGraphQLClient_1 = require("./abstractGraphQLClient");
|
|
6
6
|
const securityScore_1 = require("./securityScore");
|
|
7
7
|
const graphqlApi_1 = require("./graphqlApi");
|
|
8
8
|
const wellArchitected_1 = require("./wellArchitected");
|
|
9
|
-
const account_1 = require("./account");
|
|
10
9
|
class PublicGraphQLClient extends abstractGraphQLClient_1.AbstractGraphQLClient {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
getCatalogGraphQLClient(configuration) {
|
|
15
|
-
const client = new catalog_1.CatalogGraphQLClient(configuration);
|
|
16
|
-
this.applyConfig(client);
|
|
17
|
-
return client;
|
|
18
|
-
}
|
|
19
|
-
getSecurityScoreGraphQLClient(configuration) {
|
|
20
|
-
const client = new securityScore_1.SecurityScoreGraphQLClient(configuration);
|
|
10
|
+
getCatalogGraphQLClient() {
|
|
11
|
+
const client = new catalogGraphQLClient_1.CatalogGraphQLClient();
|
|
21
12
|
this.applyConfig(client);
|
|
22
13
|
return client;
|
|
23
14
|
}
|
|
24
|
-
|
|
25
|
-
const client = new
|
|
15
|
+
getSecurityScoreGraphQLClient() {
|
|
16
|
+
const client = new securityScore_1.SecurityScoreGraphQLClient();
|
|
26
17
|
this.applyConfig(client);
|
|
27
18
|
return client;
|
|
28
19
|
}
|
|
29
|
-
|
|
30
|
-
const client = new
|
|
20
|
+
getWellArchitectedGraphQLClient() {
|
|
21
|
+
const client = new wellArchitected_1.WellArchitectedGraphQLClient();
|
|
31
22
|
this.applyConfig(client);
|
|
32
23
|
return client;
|
|
33
24
|
}
|
|
34
|
-
|
|
35
|
-
const client = new
|
|
25
|
+
getGraphqlApiClient() {
|
|
26
|
+
const client = new graphqlApi_1.GraphqlApiClient();
|
|
36
27
|
this.applyConfig(client);
|
|
37
28
|
return client;
|
|
38
29
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { AbstractGraphQLClient } from '../abstractGraphQLClient';
|
|
2
|
-
import { GetAccountQuery } from './types/accountGraphQLQueries';
|
|
3
|
-
import { GetAccountType } from './types/accountGraphQLTypes';
|
|
4
|
-
export declare class AccountGraphQLClient extends AbstractGraphQLClient {
|
|
5
|
-
/**
|
|
6
|
-
* The base path of the API
|
|
7
|
-
*/
|
|
8
|
-
protected basePath: string;
|
|
9
|
-
findByQuery(query: GetAccountQuery): Promise<GetAccountType | null>;
|
|
10
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AccountGraphQLClient = void 0;
|
|
4
|
-
const abstractGraphQLClient_1 = require("../abstractGraphQLClient");
|
|
5
|
-
class AccountGraphQLClient extends abstractGraphQLClient_1.AbstractGraphQLClient {
|
|
6
|
-
constructor() {
|
|
7
|
-
super(...arguments);
|
|
8
|
-
/**
|
|
9
|
-
* The base path of the API
|
|
10
|
-
*/
|
|
11
|
-
this.basePath = '/v2';
|
|
12
|
-
}
|
|
13
|
-
async findByQuery(query) {
|
|
14
|
-
this.path = '/graphql';
|
|
15
|
-
console.info('GRAPHQL Query brut :', query);
|
|
16
|
-
const queryStr = this.stringifyQuery(query);
|
|
17
|
-
console.info('GRAPHQL Query after stringify :', queryStr);
|
|
18
|
-
try {
|
|
19
|
-
return await this.post(queryStr);
|
|
20
|
-
}
|
|
21
|
-
catch (error) {
|
|
22
|
-
return null;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
exports.AccountGraphQLClient = AccountGraphQLClient;
|
|
27
|
-
//# sourceMappingURL=accountGraphQLClient.js.map
|
package/build/account/index.d.ts
DELETED
package/build/account/index.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./types/accountGraphQLQueries"), exports);
|
|
18
|
-
__exportStar(require("./types/accountGraphQLTypes"), exports);
|
|
19
|
-
__exportStar(require("./accountGraphQLClient"), exports);
|
|
20
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { Merge, Schema } from 'type-fest';
|
|
2
|
-
import { AccountAttributeType } from './accountGraphQLTypes';
|
|
3
|
-
import { AccountAttributeSchema } from './accountGraphQLSchemas';
|
|
4
|
-
export declare type GetAccountQuery = {
|
|
5
|
-
getUsers?: GetAccountQueryRequest;
|
|
6
|
-
};
|
|
7
|
-
export declare type GetAccountQueryRequest = Merge<{
|
|
8
|
-
__args: QueryAccountArgument;
|
|
9
|
-
}, AccountAttributeSchema>;
|
|
10
|
-
export declare type QueryAccountArgument = {
|
|
11
|
-
paginate?: PaginateAccountArgument;
|
|
12
|
-
searchBody?: SearchBodyAccountArgument;
|
|
13
|
-
};
|
|
14
|
-
export declare type PaginateAccountArgument = {
|
|
15
|
-
page: number;
|
|
16
|
-
perPage: number;
|
|
17
|
-
};
|
|
18
|
-
export declare type SearchBodyAccountArgument = {
|
|
19
|
-
keywords?: string;
|
|
20
|
-
keywordsByField?: KeywordsByFieldsAccountArgument[];
|
|
21
|
-
filters?: FiltersAccountArgument[];
|
|
22
|
-
exclusionFilters?: FiltersAccountArgument[];
|
|
23
|
-
sort?: SortAccountArgument[];
|
|
24
|
-
highlight?: boolean;
|
|
25
|
-
aggregatorFilter?: string[];
|
|
26
|
-
scopes?: string | string[] | string[][];
|
|
27
|
-
rights?: string[];
|
|
28
|
-
};
|
|
29
|
-
export declare type SortAccountArgument = {
|
|
30
|
-
name?: string;
|
|
31
|
-
order?: string;
|
|
32
|
-
};
|
|
33
|
-
export declare type KeywordsByFieldsAccountArgument = {
|
|
34
|
-
name?: string;
|
|
35
|
-
values?: string[];
|
|
36
|
-
operator?: string;
|
|
37
|
-
type?: string;
|
|
38
|
-
};
|
|
39
|
-
export declare type FiltersAccountArgument = {
|
|
40
|
-
name?: string;
|
|
41
|
-
value?: string | string[];
|
|
42
|
-
};
|
|
43
|
-
export declare type AccountSchema = Schema<AccountAttributeType, boolean>;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { AccountAliasInfo, AccountExtraData, AccountFilterValues, AccountPagination, AccountPolicy } from './accountGraphQLTypes';
|
|
2
|
-
import { Schema } from 'type-fest';
|
|
3
|
-
export declare type AccountAttributeSchema = {
|
|
4
|
-
pagination?: Schema<AccountPagination, boolean>;
|
|
5
|
-
users?: AccountSchema;
|
|
6
|
-
filters?: AccountFilterSchema;
|
|
7
|
-
};
|
|
8
|
-
export declare type AccountFilterSchema = {
|
|
9
|
-
name?: boolean;
|
|
10
|
-
value?: Schema<AccountFilterValues, boolean>;
|
|
11
|
-
};
|
|
12
|
-
export declare type AccountSchema = {
|
|
13
|
-
updatedBy?: boolean;
|
|
14
|
-
updatedAt?: boolean;
|
|
15
|
-
version?: boolean;
|
|
16
|
-
isEnabled?: boolean;
|
|
17
|
-
cognitoUsername?: boolean;
|
|
18
|
-
authMethods?: boolean;
|
|
19
|
-
canSecureAccountUntil?: boolean;
|
|
20
|
-
extraData?: Schema<AccountExtraData, boolean>;
|
|
21
|
-
applications?: AccountApplicationSchema;
|
|
22
|
-
aliases?: Schema<AccountAliasInfo, boolean>;
|
|
23
|
-
};
|
|
24
|
-
export declare type AccountApplicationSchema = {
|
|
25
|
-
updatedBy?: boolean;
|
|
26
|
-
updatedAt?: boolean;
|
|
27
|
-
version?: boolean;
|
|
28
|
-
isEnabled?: boolean;
|
|
29
|
-
extraData?: Schema<AccountExtraData, boolean>;
|
|
30
|
-
applicationName?: boolean;
|
|
31
|
-
rights?: boolean;
|
|
32
|
-
scopes?: boolean;
|
|
33
|
-
policies?: Schema<AccountPolicy, boolean>;
|
|
34
|
-
};
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
export declare type GetAccountType = {
|
|
2
|
-
getUsers?: AccountAttributeType;
|
|
3
|
-
};
|
|
4
|
-
export declare type AccountAttributeType = {
|
|
5
|
-
pagination?: AccountPagination;
|
|
6
|
-
users?: Account[];
|
|
7
|
-
filters?: AccountFilter[];
|
|
8
|
-
};
|
|
9
|
-
export declare type Account = {
|
|
10
|
-
updatedBy?: string;
|
|
11
|
-
updatedAt?: string;
|
|
12
|
-
version?: number;
|
|
13
|
-
isEnabled?: boolean;
|
|
14
|
-
cognitoUsername?: string;
|
|
15
|
-
authMethods?: string[];
|
|
16
|
-
canSecureAccountUntil?: string;
|
|
17
|
-
extraData?: AccountExtraData[];
|
|
18
|
-
applications?: AccountApplication[];
|
|
19
|
-
aliases?: AccountAliasInfo[];
|
|
20
|
-
};
|
|
21
|
-
export declare type AccountExtraData = {
|
|
22
|
-
name?: string;
|
|
23
|
-
value?: string;
|
|
24
|
-
};
|
|
25
|
-
export declare type AccountApplication = {
|
|
26
|
-
updatedBy?: string;
|
|
27
|
-
updatedAt?: string;
|
|
28
|
-
version?: number;
|
|
29
|
-
isEnabled?: boolean;
|
|
30
|
-
extraData?: AccountExtraData[];
|
|
31
|
-
applicationName?: string;
|
|
32
|
-
rights?: string[];
|
|
33
|
-
scopes?: string[];
|
|
34
|
-
policies?: AccountPolicy[];
|
|
35
|
-
};
|
|
36
|
-
export declare type AccountPolicy = {
|
|
37
|
-
policyName?: string;
|
|
38
|
-
description?: string;
|
|
39
|
-
updatedBy?: string;
|
|
40
|
-
updatedAt?: string;
|
|
41
|
-
version?: number;
|
|
42
|
-
isEnabled?: boolean;
|
|
43
|
-
scopes?: string[];
|
|
44
|
-
rights?: string[];
|
|
45
|
-
};
|
|
46
|
-
export declare type AccountAliasInfo = {
|
|
47
|
-
username?: string;
|
|
48
|
-
providerName?: string;
|
|
49
|
-
email?: string;
|
|
50
|
-
};
|
|
51
|
-
export declare type AccountPagination = {
|
|
52
|
-
perPage?: number;
|
|
53
|
-
currentPage?: number;
|
|
54
|
-
totalPage?: number;
|
|
55
|
-
total?: number;
|
|
56
|
-
next?: string;
|
|
57
|
-
previous?: string;
|
|
58
|
-
};
|
|
59
|
-
export declare type AccountFilter = {
|
|
60
|
-
name?: string;
|
|
61
|
-
value?: AccountFilterValues[];
|
|
62
|
-
};
|
|
63
|
-
export declare type AccountFilterValues = {
|
|
64
|
-
value?: string;
|
|
65
|
-
count?: number;
|
|
66
|
-
};
|