@arrowsphere/api-client 3.28.0-rc.bdj.2 → 3.28.0-rc.bdj.4
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/README.md +11 -0
- package/build/AbstractHttpClient.d.ts +1 -0
- package/build/AbstractHttpClient.js +6 -5
- package/build/abstractGraphQLClient.d.ts +2 -0
- package/build/catalog/catalogGraphQLClient.d.ts +2 -0
- package/build/catalog/catalogGraphQLClient.js +14 -1
- package/build/catalog/index.d.ts +2 -0
- package/build/catalog/index.js +2 -0
- package/build/catalog/types/catalogGraphQLQueries.d.ts +12 -0
- package/build/catalog/types/catalogGraphQLQueries.js +3 -0
- package/build/catalog/types/catalogGraphQLSchemas.d.ts +30 -0
- package/build/catalog/types/catalogGraphQLSchemas.js +4 -0
- package/build/catalog/types/catalogGraphQLTypes.js +1 -0
- package/build/catalog/types/queryArguments.d.ts +41 -0
- package/build/catalog/types/queryArguments.js +10 -0
- package/build/exception/exception-handlers/HttpExceptionHandler.d.ts +1 -1
- package/build/exception/publicApiClientException.d.ts +2 -1
- package/build/exception/publicApiClientException.js +2 -1
- package/build/securityScore/types/queryArguments.d.ts +37 -1
- package/build/securityScore/types/queryArguments.js +36 -0
- package/build/securityScore/types/securityScoreGraphQLQueries.d.ts +26 -19
- package/build/securityScore/types/securityScoreGraphQLSchemas.d.ts +70 -0
- package/build/securityScore/types/securityScoreGraphQLSchemas.js +3 -0
- package/build/securityScore/types/securityScoreGraphQLTypes.d.ts +41 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -50,6 +50,17 @@ The output documentation should be located in the `docs/` folder, just open the
|
|
|
50
50
|
|
|
51
51
|
- [CheckDomain](./src/general/CHECKDOMAIN.md)
|
|
52
52
|
- [WhoAmI](./src/general/WHOAMI.md)
|
|
53
|
+
- [Campaign](./src/campaign/README.md)
|
|
54
|
+
- [Cart](./src/cart/README.md)
|
|
55
|
+
- [Catalog](./src/catalog/README.md)
|
|
56
|
+
- [Consumption](./src/consumption/README.md)
|
|
57
|
+
- [Contact](./src/contact/README.md)
|
|
58
|
+
- [Customers](./src/customers/README.md)
|
|
59
|
+
- [Licenses](./src/licenses/README.md)
|
|
60
|
+
- [Orders](./src/orders/README.md)
|
|
61
|
+
- [Subscriptions](./src/subscriptions/README.md)
|
|
62
|
+
- [Support Center](./src/supportCenter/README.md)
|
|
63
|
+
|
|
53
64
|
- [SecurityScore](./src/securityScore/README.md)
|
|
54
65
|
|
|
55
66
|
### Licenses
|
|
@@ -32,4 +32,5 @@ export declare abstract class AbstractHttpClient {
|
|
|
32
32
|
* Will find appropriate ErrorHandlers and apply them to the error in order of registering.
|
|
33
33
|
*/
|
|
34
34
|
protected handleError(error: PublicApiClientException): Promise<HandleHttpExceptionOutput>;
|
|
35
|
+
protected mapToPublicApiException(error: any): PublicApiClientException;
|
|
35
36
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AbstractHttpClient = void 0;
|
|
4
|
+
const exception_1 = require("./exception");
|
|
4
5
|
class AbstractHttpClient {
|
|
5
6
|
constructor() {
|
|
6
7
|
/**
|
|
@@ -44,11 +45,7 @@ class AbstractHttpClient {
|
|
|
44
45
|
* Will find appropriate ErrorHandlers and apply them to the error in order of registering.
|
|
45
46
|
*/
|
|
46
47
|
async handleError(error) {
|
|
47
|
-
const appropriateHandlers = this.httpExceptionHandlers.filter((handler) =>
|
|
48
|
-
console.log('httpStatus', error.httpCode);
|
|
49
|
-
const res = handler.getHandledHttpStatuses().includes(error.httpCode);
|
|
50
|
-
return res;
|
|
51
|
-
});
|
|
48
|
+
const appropriateHandlers = this.httpExceptionHandlers.filter((handler) => handler.getHandledHttpStatuses().includes(error.httpCode));
|
|
52
49
|
// handle retry
|
|
53
50
|
const output = { mustRetry: false };
|
|
54
51
|
for (const handler of appropriateHandlers) {
|
|
@@ -59,6 +56,10 @@ class AbstractHttpClient {
|
|
|
59
56
|
}
|
|
60
57
|
return output;
|
|
61
58
|
}
|
|
59
|
+
mapToPublicApiException(error) {
|
|
60
|
+
var _a, _b;
|
|
61
|
+
return new exception_1.PublicApiClientException(error === null || error === void 0 ? void 0 : error.message, String(error), (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.status, (_b = error === null || error === void 0 ? void 0 : error.response) === null || _b === void 0 ? void 0 : _b.config);
|
|
62
|
+
}
|
|
62
63
|
}
|
|
63
64
|
exports.AbstractHttpClient = AbstractHttpClient;
|
|
64
65
|
//# sourceMappingURL=AbstractHttpClient.js.map
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { GraphQLClient } from 'graphql-request';
|
|
2
2
|
import * as Dom from 'graphql-request/dist/types.dom';
|
|
3
3
|
import { Options } from './abstractClient';
|
|
4
|
+
import { GetProductsType } from './catalog';
|
|
4
5
|
import { AbstractHttpClient } from './AbstractHttpClient';
|
|
6
|
+
export declare type GraphQLResponseTypes = GetProductsType;
|
|
5
7
|
export declare abstract class AbstractGraphQLClient extends AbstractHttpClient {
|
|
6
8
|
protected client: GraphQLClient;
|
|
7
9
|
protected optionsHeader?: Dom.RequestInit['headers'];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AbstractGraphQLClient } from '../abstractGraphQLClient';
|
|
2
2
|
import { GetProductsType } from './types/catalogGraphQLTypes';
|
|
3
|
+
import { CatalogQuery } from './types/catalogGraphQLQueries';
|
|
3
4
|
export declare class CatalogGraphQLClient extends AbstractGraphQLClient {
|
|
4
5
|
/**
|
|
5
6
|
* The base path of the API
|
|
@@ -10,4 +11,5 @@ export declare class CatalogGraphQLClient extends AbstractGraphQLClient {
|
|
|
10
11
|
*/
|
|
11
12
|
private GRAPHQL;
|
|
12
13
|
find(request: string): Promise<GetProductsType>;
|
|
14
|
+
findByQuery(query: CatalogQuery): Promise<GetProductsType | null>;
|
|
13
15
|
}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CatalogGraphQLClient = void 0;
|
|
4
4
|
const abstractGraphQLClient_1 = require("../abstractGraphQLClient");
|
|
5
|
-
// import { inspect } from 'util';
|
|
6
5
|
class CatalogGraphQLClient extends abstractGraphQLClient_1.AbstractGraphQLClient {
|
|
7
6
|
constructor() {
|
|
8
7
|
super(...arguments);
|
|
@@ -19,6 +18,20 @@ class CatalogGraphQLClient extends abstractGraphQLClient_1.AbstractGraphQLClient
|
|
|
19
18
|
this.path = this.GRAPHQL;
|
|
20
19
|
return await this.post(request);
|
|
21
20
|
}
|
|
21
|
+
async findByQuery(query) {
|
|
22
|
+
const queryStr = this.stringifyQuery(query);
|
|
23
|
+
try {
|
|
24
|
+
return await this.find(queryStr);
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
const exception = this.mapToPublicApiException(error);
|
|
28
|
+
const { mustRetry } = await this.handleError(exception);
|
|
29
|
+
if (mustRetry) {
|
|
30
|
+
return await this.find(queryStr);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
22
35
|
}
|
|
23
36
|
exports.CatalogGraphQLClient = CatalogGraphQLClient;
|
|
24
37
|
//# sourceMappingURL=catalogGraphQLClient.js.map
|
package/build/catalog/index.d.ts
CHANGED
package/build/catalog/index.js
CHANGED
|
@@ -16,4 +16,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./catalogGraphQLClient"), exports);
|
|
18
18
|
__exportStar(require("./types/catalogGraphQLTypes"), exports);
|
|
19
|
+
__exportStar(require("./types/catalogGraphQLQueries"), exports);
|
|
20
|
+
__exportStar(require("./types/catalogGraphQLSchemas"), exports);
|
|
19
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { QueryArguments } from './queryArguments';
|
|
2
|
+
import { FiltersSchema, PaginationSchema, ProductSchema } from './catalogGraphQLSchemas';
|
|
3
|
+
export declare type CatalogQuery = {
|
|
4
|
+
getProducts: GetPaginatedProductsQuery;
|
|
5
|
+
};
|
|
6
|
+
export declare type GetPaginatedProductsQuery = {
|
|
7
|
+
__args: QueryArguments;
|
|
8
|
+
filters?: FiltersSchema;
|
|
9
|
+
pagination?: PaginationSchema;
|
|
10
|
+
products?: ProductSchema;
|
|
11
|
+
topOffers?: ProductSchema;
|
|
12
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { AttributeType, FiltersType, IdentifiersType, PaginationType, PriceBandType, PricesType, ProductType, RelatedOfferType } from './catalogGraphQLTypes';
|
|
2
|
+
import { Merge, Schema } from 'type-fest';
|
|
3
|
+
export declare type PaginationSchema = Schema<PaginationType, boolean>;
|
|
4
|
+
export declare type FiltersSchema = Schema<FiltersType, boolean>;
|
|
5
|
+
declare type IdentifiersSchema = Schema<IdentifiersType, boolean>;
|
|
6
|
+
declare type RelatedOfferSchema = Schema<RelatedOfferType, boolean>;
|
|
7
|
+
/**
|
|
8
|
+
* Field of type array are not handled by Schema, they must be overwritten
|
|
9
|
+
*/
|
|
10
|
+
declare type MissingFieldsOfProductSchema = {
|
|
11
|
+
addonPrimaries?: IdentifiersSchema;
|
|
12
|
+
baseOfferPrimaries?: IdentifiersSchema;
|
|
13
|
+
conversionOfferPrimaries?: IdentifiersSchema;
|
|
14
|
+
relatedOffers?: RelatedOfferSchema;
|
|
15
|
+
priceBand?: PriceBandSchema;
|
|
16
|
+
};
|
|
17
|
+
export declare type ProductSchema = Merge<Schema<ProductType, boolean>, MissingFieldsOfProductSchema>;
|
|
18
|
+
declare type AttributeSchema = Schema<AttributeType, boolean>;
|
|
19
|
+
/**
|
|
20
|
+
* Field of type array are not handled by Schema, they must be overwritten
|
|
21
|
+
*/
|
|
22
|
+
declare type MissingFieldsOfPriceBandSchema = {
|
|
23
|
+
attributes?: Array<AttributeSchema>;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* No type corresponding
|
|
27
|
+
*/
|
|
28
|
+
export declare type PriceBandSchema = Merge<Schema<PriceBandType, boolean>, MissingFieldsOfPriceBandSchema>;
|
|
29
|
+
export declare type PriceBandPriceSchema = Schema<PricesType, boolean>;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* For field __args
|
|
3
|
+
*/
|
|
4
|
+
export declare type QueryArguments = {
|
|
5
|
+
paginate?: PaginateArgument;
|
|
6
|
+
searchBody: SearchBodyArgument;
|
|
7
|
+
};
|
|
8
|
+
export declare type PaginateArgument = {
|
|
9
|
+
page: number;
|
|
10
|
+
perPage: number;
|
|
11
|
+
};
|
|
12
|
+
export declare type SearchBodyArgument = {
|
|
13
|
+
aggregatorFilter?: string[];
|
|
14
|
+
endCustomerRef?: string;
|
|
15
|
+
exclusionFilters?: SearchFilterArgument[];
|
|
16
|
+
filters?: SearchFilterArgument[];
|
|
17
|
+
getFamilies?: boolean;
|
|
18
|
+
highlight?: boolean;
|
|
19
|
+
keywords?: string;
|
|
20
|
+
marketplace?: string;
|
|
21
|
+
quantity?: number;
|
|
22
|
+
resellerRef?: string;
|
|
23
|
+
restricted?: boolean;
|
|
24
|
+
sort?: SortArgument;
|
|
25
|
+
topOffers?: boolean;
|
|
26
|
+
};
|
|
27
|
+
export declare type SearchFilterArgument = {
|
|
28
|
+
name: string;
|
|
29
|
+
value: string | string[];
|
|
30
|
+
operator?: OperatorArgument;
|
|
31
|
+
filters?: SearchFilterArgument[];
|
|
32
|
+
};
|
|
33
|
+
export declare enum OperatorArgument {
|
|
34
|
+
OR = "OR",
|
|
35
|
+
AND = "AND",
|
|
36
|
+
BETWEEN = "BETWEEN"
|
|
37
|
+
}
|
|
38
|
+
export declare type SortArgument = {
|
|
39
|
+
name?: string;
|
|
40
|
+
order?: string;
|
|
41
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OperatorArgument = void 0;
|
|
4
|
+
var OperatorArgument;
|
|
5
|
+
(function (OperatorArgument) {
|
|
6
|
+
OperatorArgument["OR"] = "OR";
|
|
7
|
+
OperatorArgument["AND"] = "AND";
|
|
8
|
+
OperatorArgument["BETWEEN"] = "BETWEEN";
|
|
9
|
+
})(OperatorArgument = exports.OperatorArgument || (exports.OperatorArgument = {}));
|
|
10
|
+
//# sourceMappingURL=queryArguments.js.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare class PublicApiClientException extends Error {
|
|
2
2
|
httpCode: number;
|
|
3
3
|
httpError: string;
|
|
4
|
-
|
|
4
|
+
config: any;
|
|
5
|
+
constructor(message: string, httpError?: string, httpCode?: number, config?: {});
|
|
5
6
|
}
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PublicApiClientException = void 0;
|
|
4
4
|
class PublicApiClientException extends Error {
|
|
5
|
-
constructor(message, httpError = '', httpCode = 0) {
|
|
5
|
+
constructor(message, httpError = '', httpCode = 0, config = {}) {
|
|
6
6
|
super(message);
|
|
7
7
|
this.httpCode = httpCode;
|
|
8
8
|
this.httpError = httpError;
|
|
9
|
+
this.config = config;
|
|
9
10
|
}
|
|
10
11
|
}
|
|
11
12
|
exports.PublicApiClientException = PublicApiClientException;
|
|
@@ -30,9 +30,45 @@ export declare enum SearchFilterFields {
|
|
|
30
30
|
FILTERS = "filters"
|
|
31
31
|
}
|
|
32
32
|
export declare enum SearchFilterValues {
|
|
33
|
+
ACCOUNT = "account",
|
|
34
|
+
ACCOUNT_ID = "account.id",
|
|
33
35
|
ACCOUNT_REFERENCE = "account.reference",
|
|
36
|
+
ACCOUNT_NAME = "account.name",
|
|
37
|
+
ACCOUNT_STANDARDS = "account.standards",
|
|
38
|
+
ACCOUNT_STANDARDS_REFERENCE = "account.standards.reference",
|
|
39
|
+
ACCOUNT_STANDARDS_NAME = "account.standards.name",
|
|
40
|
+
ACCOUNT_STANDARDS_TOTAL = "account.standards.total",
|
|
41
|
+
ACCOUNT_STANDARDS_PASSED = "account.standards.passed",
|
|
42
|
+
ACCOUNT_STANDARDS_FAILED = "account.standards.failed",
|
|
43
|
+
ACCOUNT_STANDARDS_SCORE = "account.standards.score",
|
|
44
|
+
ACCOUNT_STANDARDS_MAX_SCORE = "account.standards.maxScore",
|
|
45
|
+
ACCOUNT_STANDARDS_CHECKS = "account.standards.checks",
|
|
46
|
+
ACCOUNT_STANDARDS_CHECKS_ID = "account.standards.checks.id",
|
|
47
|
+
ACCOUNT_STANDARDS_CHECKS_REFERENCE = "account.standards.checks.reference",
|
|
48
|
+
ACCOUNT_STANDARDS_CHECKS_NAME = "account.standards.checks.name",
|
|
49
|
+
ACCOUNT_STANDARDS_CHECKS_DESCRIPTION = "account.standards.checks.description",
|
|
50
|
+
ACCOUNT_STANDARDS_CHECKS_SEVERITY = "account.standards.checks.severity",
|
|
51
|
+
ACCOUNT_STANDARDS_CHECKS_PROCESSED = "account.standards.checks.processed",
|
|
52
|
+
ACCOUNT_STANDARDS_CHECKS_FLAGGED = "account.standards.checks.flagged",
|
|
53
|
+
ACCOUNT_STANDARDS_CHECKS_IS_FAILED = "account.standards.checks.isFailed",
|
|
54
|
+
ACCOUNT_STANDARDS_CHECKS_SCORE = "account.standards.checks.score",
|
|
55
|
+
ACCOUNT_FAILED = "account.failed",
|
|
56
|
+
ACCOUNT_PASSED = "account.passed",
|
|
57
|
+
ACCOUNT_SCORE = "account.score",
|
|
58
|
+
ACCOUNT_TOTAL = "account.total",
|
|
59
|
+
REGISTRATION = "registration",
|
|
60
|
+
REGISTRATION_ACCOUNT_REFERENCE = "registration.accountReference",
|
|
61
|
+
REGISTRATION_SUBSCRIPTION_REFERENCE = "registration.subscription.reference",
|
|
62
|
+
REGISTRATION_CUSTOMER_ID = "registration.customer.id",
|
|
63
|
+
REGISTRATION_CUSTOMER_NAME = "registration.customer.name",
|
|
34
64
|
REGISTRATION_CUSTOMER_REFERENCE = "registration.customer.reference",
|
|
35
|
-
|
|
65
|
+
REGISTRATION_RESELLER_ID = "registration.reseller.id",
|
|
66
|
+
REGISTRATION_RESELLER_NAME = "registration.reseller.name",
|
|
67
|
+
REGISTRATION_RESELLER_REFERENCE = "registration.reseller.reference",
|
|
68
|
+
REGISTRATION_VENDOR_CODE = "registration.vendorCode",
|
|
69
|
+
REGISTRATION_MARKETPLACE = "registration.marketplace",
|
|
70
|
+
UPDATED_AT = "updatedAt",
|
|
71
|
+
UPDATED_BY = "updatedBy"
|
|
36
72
|
}
|
|
37
73
|
export declare enum SortFields {
|
|
38
74
|
NAME = "name",
|
|
@@ -39,9 +39,45 @@ var SearchFilterFields;
|
|
|
39
39
|
})(SearchFilterFields = exports.SearchFilterFields || (exports.SearchFilterFields = {}));
|
|
40
40
|
var SearchFilterValues;
|
|
41
41
|
(function (SearchFilterValues) {
|
|
42
|
+
SearchFilterValues["ACCOUNT"] = "account";
|
|
43
|
+
SearchFilterValues["ACCOUNT_ID"] = "account.id";
|
|
42
44
|
SearchFilterValues["ACCOUNT_REFERENCE"] = "account.reference";
|
|
45
|
+
SearchFilterValues["ACCOUNT_NAME"] = "account.name";
|
|
46
|
+
SearchFilterValues["ACCOUNT_STANDARDS"] = "account.standards";
|
|
47
|
+
SearchFilterValues["ACCOUNT_STANDARDS_REFERENCE"] = "account.standards.reference";
|
|
48
|
+
SearchFilterValues["ACCOUNT_STANDARDS_NAME"] = "account.standards.name";
|
|
49
|
+
SearchFilterValues["ACCOUNT_STANDARDS_TOTAL"] = "account.standards.total";
|
|
50
|
+
SearchFilterValues["ACCOUNT_STANDARDS_PASSED"] = "account.standards.passed";
|
|
51
|
+
SearchFilterValues["ACCOUNT_STANDARDS_FAILED"] = "account.standards.failed";
|
|
52
|
+
SearchFilterValues["ACCOUNT_STANDARDS_SCORE"] = "account.standards.score";
|
|
53
|
+
SearchFilterValues["ACCOUNT_STANDARDS_MAX_SCORE"] = "account.standards.maxScore";
|
|
54
|
+
SearchFilterValues["ACCOUNT_STANDARDS_CHECKS"] = "account.standards.checks";
|
|
55
|
+
SearchFilterValues["ACCOUNT_STANDARDS_CHECKS_ID"] = "account.standards.checks.id";
|
|
56
|
+
SearchFilterValues["ACCOUNT_STANDARDS_CHECKS_REFERENCE"] = "account.standards.checks.reference";
|
|
57
|
+
SearchFilterValues["ACCOUNT_STANDARDS_CHECKS_NAME"] = "account.standards.checks.name";
|
|
58
|
+
SearchFilterValues["ACCOUNT_STANDARDS_CHECKS_DESCRIPTION"] = "account.standards.checks.description";
|
|
59
|
+
SearchFilterValues["ACCOUNT_STANDARDS_CHECKS_SEVERITY"] = "account.standards.checks.severity";
|
|
60
|
+
SearchFilterValues["ACCOUNT_STANDARDS_CHECKS_PROCESSED"] = "account.standards.checks.processed";
|
|
61
|
+
SearchFilterValues["ACCOUNT_STANDARDS_CHECKS_FLAGGED"] = "account.standards.checks.flagged";
|
|
62
|
+
SearchFilterValues["ACCOUNT_STANDARDS_CHECKS_IS_FAILED"] = "account.standards.checks.isFailed";
|
|
63
|
+
SearchFilterValues["ACCOUNT_STANDARDS_CHECKS_SCORE"] = "account.standards.checks.score";
|
|
64
|
+
SearchFilterValues["ACCOUNT_FAILED"] = "account.failed";
|
|
65
|
+
SearchFilterValues["ACCOUNT_PASSED"] = "account.passed";
|
|
66
|
+
SearchFilterValues["ACCOUNT_SCORE"] = "account.score";
|
|
67
|
+
SearchFilterValues["ACCOUNT_TOTAL"] = "account.total";
|
|
68
|
+
SearchFilterValues["REGISTRATION"] = "registration";
|
|
69
|
+
SearchFilterValues["REGISTRATION_ACCOUNT_REFERENCE"] = "registration.accountReference";
|
|
70
|
+
SearchFilterValues["REGISTRATION_SUBSCRIPTION_REFERENCE"] = "registration.subscription.reference";
|
|
71
|
+
SearchFilterValues["REGISTRATION_CUSTOMER_ID"] = "registration.customer.id";
|
|
72
|
+
SearchFilterValues["REGISTRATION_CUSTOMER_NAME"] = "registration.customer.name";
|
|
43
73
|
SearchFilterValues["REGISTRATION_CUSTOMER_REFERENCE"] = "registration.customer.reference";
|
|
74
|
+
SearchFilterValues["REGISTRATION_RESELLER_ID"] = "registration.reseller.id";
|
|
75
|
+
SearchFilterValues["REGISTRATION_RESELLER_NAME"] = "registration.reseller.name";
|
|
44
76
|
SearchFilterValues["REGISTRATION_RESELLER_REFERENCE"] = "registration.reseller.reference";
|
|
77
|
+
SearchFilterValues["REGISTRATION_VENDOR_CODE"] = "registration.vendorCode";
|
|
78
|
+
SearchFilterValues["REGISTRATION_MARKETPLACE"] = "registration.marketplace";
|
|
79
|
+
SearchFilterValues["UPDATED_AT"] = "updatedAt";
|
|
80
|
+
SearchFilterValues["UPDATED_BY"] = "updatedBy";
|
|
45
81
|
})(SearchFilterValues = exports.SearchFilterValues || (exports.SearchFilterValues = {}));
|
|
46
82
|
var SortFields;
|
|
47
83
|
(function (SortFields) {
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { SearchBodyArgument, PaginateArgument } from './queryArguments';
|
|
2
|
-
import {
|
|
2
|
+
import { AccountsAggSchema, CheckSchema, EndCustomersAggSchema, FilterSchema, IssuesAggSchema, MonthlyTrendAggSchema, PeriodsSchema, ScoreResultSchema, SeveritiesAggSchema, StandardsAggSchema, StandardSchema } from './securityScoreGraphQLSchemas';
|
|
3
3
|
export declare type GetPartnerDataQuery = {
|
|
4
4
|
getPartnerData: {
|
|
5
5
|
__args?: {
|
|
6
6
|
searchBody?: SearchBodyArgument;
|
|
7
7
|
paginate?: PaginateArgument;
|
|
8
8
|
};
|
|
9
|
-
filters?:
|
|
10
|
-
results?:
|
|
11
|
-
avgCurrentScore?:
|
|
12
|
-
monthlyTrendAgg?:
|
|
13
|
-
endCustomersAgg?:
|
|
14
|
-
issueAgg?:
|
|
15
|
-
severityAgg?:
|
|
16
|
-
period?:
|
|
9
|
+
filters?: FilterSchema;
|
|
10
|
+
results?: ScoreResultSchema;
|
|
11
|
+
avgCurrentScore?: boolean;
|
|
12
|
+
monthlyTrendAgg?: MonthlyTrendAggSchema;
|
|
13
|
+
endCustomersAgg?: EndCustomersAggSchema;
|
|
14
|
+
issueAgg?: IssuesAggSchema;
|
|
15
|
+
severityAgg?: SeveritiesAggSchema;
|
|
16
|
+
period?: PeriodsSchema;
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
19
|
export declare type GetCustomerDataQuery = {
|
|
@@ -21,12 +21,15 @@ export declare type GetCustomerDataQuery = {
|
|
|
21
21
|
__args?: {
|
|
22
22
|
searchBody?: SearchBodyArgument;
|
|
23
23
|
};
|
|
24
|
-
filters?:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
filters?: FilterSchema;
|
|
25
|
+
accountsAgg?: AccountsAggSchema;
|
|
26
|
+
severityAgg?: SeveritiesAggSchema;
|
|
27
|
+
period?: PeriodsSchema;
|
|
28
|
+
avgCurrentScore?: boolean;
|
|
29
|
+
monthlyTrendAgg?: MonthlyTrendAggSchema;
|
|
30
|
+
results?: ScoreResultSchema;
|
|
31
|
+
standards?: StandardSchema;
|
|
32
|
+
subscriptionReferences?: boolean;
|
|
30
33
|
};
|
|
31
34
|
};
|
|
32
35
|
export declare type GetCustomerAccountDataQuery = {
|
|
@@ -34,10 +37,14 @@ export declare type GetCustomerAccountDataQuery = {
|
|
|
34
37
|
__args?: {
|
|
35
38
|
searchBody?: SearchBodyArgument;
|
|
36
39
|
};
|
|
37
|
-
filters?: [
|
|
40
|
+
filters?: [FilterSchema];
|
|
38
41
|
avgCurrentScore?: boolean;
|
|
39
|
-
standardsAgg?:
|
|
40
|
-
severityAgg?:
|
|
41
|
-
period?:
|
|
42
|
+
standardsAgg?: StandardsAggSchema;
|
|
43
|
+
severityAgg?: SeveritiesAggSchema;
|
|
44
|
+
period?: PeriodsSchema;
|
|
45
|
+
checks?: CheckSchema;
|
|
46
|
+
monthlyTrendAgg?: MonthlyTrendAggSchema;
|
|
47
|
+
result?: ScoreResultSchema;
|
|
48
|
+
standards?: StandardSchema;
|
|
42
49
|
};
|
|
43
50
|
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Merge, Schema } from 'type-fest';
|
|
2
|
+
import { AccountType, CheckType, CompareAccountAggType, CompareEndCustomerAggType, CompareStandardAggType, FilterValuesType, IssueDataAggType, MonthlyTrendAggType, NameCountByDateType, PeriodsType, RegistrationType, ScoreByMonthType, StandardAggType, StandardType } from './securityScoreGraphQLTypes';
|
|
3
|
+
declare type MissingFieldsOfMonthlyTrendAggSchema = {
|
|
4
|
+
scores?: Schema<ScoreByMonthType, boolean>;
|
|
5
|
+
};
|
|
6
|
+
export declare type MonthlyTrendAggSchema = Merge<Schema<MonthlyTrendAggType, boolean>, MissingFieldsOfMonthlyTrendAggSchema>;
|
|
7
|
+
declare type CompareEndCustomerAggSchema = Schema<CompareEndCustomerAggType, boolean>;
|
|
8
|
+
declare type EndCustomerAggSchema = {
|
|
9
|
+
reference?: boolean;
|
|
10
|
+
name?: boolean;
|
|
11
|
+
data?: CompareEndCustomerAggSchema;
|
|
12
|
+
progression?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export declare type EndCustomersAggSchema = {
|
|
15
|
+
customers: EndCustomerAggSchema;
|
|
16
|
+
};
|
|
17
|
+
declare type CompareAccountAggSchema = Schema<CompareAccountAggType, boolean>;
|
|
18
|
+
export declare type AccountAggSchema = {
|
|
19
|
+
accountRef?: boolean;
|
|
20
|
+
data?: CompareAccountAggSchema;
|
|
21
|
+
progression?: boolean;
|
|
22
|
+
};
|
|
23
|
+
export declare type AccountsAggSchema = {
|
|
24
|
+
accounts: AccountAggSchema;
|
|
25
|
+
};
|
|
26
|
+
declare type FilterValuesSchema = Schema<FilterValuesType, boolean>;
|
|
27
|
+
export declare type FilterSchema = {
|
|
28
|
+
name?: boolean;
|
|
29
|
+
values?: FilterValuesSchema;
|
|
30
|
+
};
|
|
31
|
+
declare type NameCountByDateSchema = Schema<NameCountByDateType, boolean>;
|
|
32
|
+
declare type NameAggSchema = {
|
|
33
|
+
name?: boolean;
|
|
34
|
+
data?: NameCountByDateSchema;
|
|
35
|
+
progression?: boolean;
|
|
36
|
+
};
|
|
37
|
+
declare type MissingFieldsInIssueDataAggSchema = {
|
|
38
|
+
data?: NameCountByDateSchema;
|
|
39
|
+
};
|
|
40
|
+
declare type IssueDataAggSchema = Merge<Schema<IssueDataAggType, boolean>, MissingFieldsInIssueDataAggSchema>;
|
|
41
|
+
export declare type IssuesAggSchema = {
|
|
42
|
+
issues: IssueDataAggSchema;
|
|
43
|
+
};
|
|
44
|
+
export declare type PeriodsSchema = Schema<PeriodsType, boolean>;
|
|
45
|
+
export declare type CheckSchema = Schema<CheckType, boolean>;
|
|
46
|
+
declare type MissingFieldsInStandardType = {
|
|
47
|
+
checks?: CheckSchema;
|
|
48
|
+
};
|
|
49
|
+
export declare type StandardSchema = Merge<Schema<StandardType, boolean>, MissingFieldsInStandardType>;
|
|
50
|
+
declare type MissingFieldsInAccountSchema = {
|
|
51
|
+
standards: StandardSchema;
|
|
52
|
+
};
|
|
53
|
+
declare type AccountSchema = Merge<Schema<AccountType, boolean>, MissingFieldsInAccountSchema>;
|
|
54
|
+
declare type RegistrationSchema = Schema<RegistrationType, boolean>;
|
|
55
|
+
export declare type ScoreResultSchema = {
|
|
56
|
+
account?: AccountSchema;
|
|
57
|
+
registration?: RegistrationSchema;
|
|
58
|
+
};
|
|
59
|
+
export declare type SeveritiesAggSchema = {
|
|
60
|
+
severities: NameAggSchema;
|
|
61
|
+
};
|
|
62
|
+
declare type CompareStandardAggSchema = Schema<CompareStandardAggType, boolean>;
|
|
63
|
+
declare type MissingFieldsInStandardAggSchema = {
|
|
64
|
+
data?: CompareStandardAggSchema;
|
|
65
|
+
};
|
|
66
|
+
declare type StandardAggSchema = Merge<Schema<StandardAggType, boolean>, MissingFieldsInStandardAggSchema>;
|
|
67
|
+
export declare type StandardsAggSchema = {
|
|
68
|
+
standards: StandardAggSchema;
|
|
69
|
+
};
|
|
70
|
+
export {};
|
|
@@ -6,11 +6,22 @@ export declare type FilterValuesType = {
|
|
|
6
6
|
value?: string;
|
|
7
7
|
count?: number;
|
|
8
8
|
};
|
|
9
|
+
export declare type SubscriptionRegistrationType = {
|
|
10
|
+
reference: string;
|
|
11
|
+
};
|
|
12
|
+
export declare type CustomerRegistrationType = {
|
|
13
|
+
reference?: string;
|
|
14
|
+
name?: string;
|
|
15
|
+
};
|
|
16
|
+
export declare type ResellerRegistrationType = {
|
|
17
|
+
reference?: string;
|
|
18
|
+
name?: string;
|
|
19
|
+
};
|
|
9
20
|
export declare type RegistrationType = {
|
|
10
21
|
accountReference?: string;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
22
|
+
subscription?: SubscriptionRegistrationType;
|
|
23
|
+
customer?: CustomerRegistrationType;
|
|
24
|
+
reseller?: ResellerRegistrationType;
|
|
14
25
|
vendorCode?: string;
|
|
15
26
|
marketplace?: string;
|
|
16
27
|
};
|
|
@@ -54,11 +65,18 @@ export declare type NameAggType = {
|
|
|
54
65
|
data?: [NameCountByDateType];
|
|
55
66
|
progression?: number;
|
|
56
67
|
};
|
|
68
|
+
export declare type IssueDataAggType = {
|
|
69
|
+
name?: string;
|
|
70
|
+
reference?: string;
|
|
71
|
+
vendorCode?: string;
|
|
72
|
+
data?: [NameCountByDateType];
|
|
73
|
+
progression?: number;
|
|
74
|
+
};
|
|
57
75
|
export declare type SeveritiesAggType = {
|
|
58
76
|
severities: [NameAggType];
|
|
59
77
|
};
|
|
60
78
|
export declare type IssuesAggType = {
|
|
61
|
-
issues: [
|
|
79
|
+
issues: [IssueDataAggType];
|
|
62
80
|
};
|
|
63
81
|
export declare type CompareEndCustomerAggType = {
|
|
64
82
|
date?: string;
|
|
@@ -69,7 +87,8 @@ export declare type CompareEndCustomerAggType = {
|
|
|
69
87
|
subscriptionReferences?: number;
|
|
70
88
|
};
|
|
71
89
|
export declare type EndCustomerAggType = {
|
|
72
|
-
|
|
90
|
+
reference?: string;
|
|
91
|
+
name?: string;
|
|
73
92
|
data?: [CompareEndCustomerAggType];
|
|
74
93
|
progression?: number;
|
|
75
94
|
};
|
|
@@ -114,11 +133,15 @@ export declare type AccountsAggType = {
|
|
|
114
133
|
accounts: [AccountAggType];
|
|
115
134
|
};
|
|
116
135
|
export declare type GetCustomerDataType = {
|
|
117
|
-
filters?: [FilterType];
|
|
118
|
-
avgCurrentScore?: number;
|
|
119
136
|
accountsAgg?: AccountsAggType;
|
|
120
|
-
|
|
137
|
+
avgCurrentScore?: number;
|
|
138
|
+
filters?: [FilterType];
|
|
139
|
+
monthlyTrendAgg?: MonthlyTrendAggType;
|
|
121
140
|
period?: PeriodsType;
|
|
141
|
+
results?: [ScoreResultType];
|
|
142
|
+
issueAgg?: IssuesAggType;
|
|
143
|
+
severityAgg?: SeveritiesAggType;
|
|
144
|
+
standards?: [StandardType];
|
|
122
145
|
subscriptionReferences?: number;
|
|
123
146
|
};
|
|
124
147
|
export declare type CompareStandardAggType = {
|
|
@@ -129,16 +152,22 @@ export declare type CompareStandardAggType = {
|
|
|
129
152
|
};
|
|
130
153
|
export declare type StandardAggType = {
|
|
131
154
|
name?: string;
|
|
155
|
+
reference?: string;
|
|
132
156
|
data?: [CompareStandardAggType];
|
|
133
157
|
progression?: number;
|
|
134
158
|
};
|
|
135
159
|
export declare type StandardsAggType = {
|
|
136
|
-
standards: StandardAggType;
|
|
160
|
+
standards: [StandardAggType];
|
|
137
161
|
};
|
|
138
162
|
export declare type GetCustomerAccountDataType = {
|
|
139
|
-
filters?: [FilterType];
|
|
140
163
|
avgCurrentScore?: number;
|
|
141
|
-
|
|
142
|
-
|
|
164
|
+
checks?: [CheckType];
|
|
165
|
+
filters?: [FilterType];
|
|
166
|
+
issueAgg?: IssuesAggType;
|
|
167
|
+
monthlyTrendAgg?: MonthlyTrendAggType;
|
|
143
168
|
period?: PeriodsType;
|
|
169
|
+
result?: ScoreResultType;
|
|
170
|
+
severityAgg?: SeveritiesAggType;
|
|
171
|
+
standardsAgg?: StandardsAggType;
|
|
172
|
+
standards?: [StandardType];
|
|
144
173
|
};
|
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.28.0-rc.bdj.
|
|
7
|
+
"version": "3.28.0-rc.bdj.4",
|
|
8
8
|
"description": "Node.js client for ArrowSphere's public API",
|
|
9
9
|
"main": "build/index.js",
|
|
10
10
|
"types": "build/index.d.ts",
|