@arrowsphere/api-client 3.27.0-rc.bjp.1 → 3.28.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.
- package/CHANGELOG.md +4 -0
- package/README.md +1 -0
- package/build/AbstractHttpClient.d.ts +35 -0
- package/build/AbstractHttpClient.js +64 -0
- package/build/abstractClient.d.ts +2 -19
- package/build/abstractClient.js +3 -22
- package/build/abstractGraphQLClient.d.ts +3 -16
- package/build/abstractGraphQLClient.js +3 -20
- package/build/catalog/catalogGraphQLClient.d.ts +0 -2
- package/build/catalog/catalogGraphQLClient.js +1 -4
- package/build/catalog/types/catalogGraphQLTypes.js +0 -1
- package/build/exception/exception-handlers/HandleHttpExceptionOutput.d.ts +3 -0
- package/build/exception/exception-handlers/HandleHttpExceptionOutput.js +3 -0
- package/build/exception/exception-handlers/Hooks.d.ts +3 -0
- package/build/{catalog/types/catalogGraphQLQueries.js → exception/exception-handlers/Hooks.js} +1 -1
- package/build/exception/exception-handlers/HttpExceptionHandler.d.ts +10 -0
- package/build/exception/exception-handlers/HttpExceptionHandler.js +3 -0
- package/build/exception/exception-handlers/index.d.ts +3 -0
- package/build/exception/exception-handlers/index.js +20 -0
- package/build/index.d.ts +1 -0
- package/build/index.js +1 -0
- package/build/orders/ordersClient.d.ts +58 -3
- package/build/orders/ordersClient.js +25 -1
- package/build/securityScore/index.d.ts +2 -0
- package/build/securityScore/index.js +19 -0
- package/build/securityScore/securityScoreGraphQLClient.d.ts +17 -0
- package/build/securityScore/securityScoreGraphQLClient.js +35 -0
- package/build/securityScore/types/queryArguments.d.ts +72 -0
- package/build/securityScore/types/queryArguments.js +57 -0
- package/build/securityScore/types/securityScoreGraphQLQueries.d.ts +43 -0
- package/build/securityScore/types/securityScoreGraphQLQueries.js +3 -0
- package/build/securityScore/types/securityScoreGraphQLTypes.d.ts +144 -0
- package/build/securityScore/types/securityScoreGraphQLTypes.js +3 -0
- package/package.json +1 -1
- package/build/catalog/types/catalogGraphQLQueries.d.ts +0 -12
- package/build/catalog/types/catalogGraphQLSchemas.d.ts +0 -30
- package/build/catalog/types/catalogGraphQLSchemas.js +0 -4
- package/build/catalog/types/queryArguments.d.ts +0 -42
- package/build/catalog/types/queryArguments.js +0 -9
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
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.27.0] - 2023-05-10
|
|
7
|
+
|
|
8
|
+
- update create order client to add attributes for injection scenario
|
|
9
|
+
|
|
6
10
|
## [3.26.0] - 2023-04-20
|
|
7
11
|
|
|
8
12
|
### Changed
|
package/README.md
CHANGED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { HttpExceptionHandler, HandleHttpExceptionOutput } from './exception/exception-handlers';
|
|
2
|
+
import { PublicApiClientException } from './exception';
|
|
3
|
+
export declare abstract class AbstractHttpClient {
|
|
4
|
+
/**
|
|
5
|
+
* Base path for HTTP calls
|
|
6
|
+
*/
|
|
7
|
+
protected basePath: string;
|
|
8
|
+
/**
|
|
9
|
+
* Current path for HTTP calls
|
|
10
|
+
*/
|
|
11
|
+
protected path: string;
|
|
12
|
+
/**
|
|
13
|
+
* Token to authenticate the user
|
|
14
|
+
*/
|
|
15
|
+
protected token: string;
|
|
16
|
+
/**
|
|
17
|
+
* ArrowSphere API URL
|
|
18
|
+
*/
|
|
19
|
+
protected url: string;
|
|
20
|
+
/**
|
|
21
|
+
* Http Exceptions Handlers
|
|
22
|
+
*/
|
|
23
|
+
protected httpExceptionHandlers: HttpExceptionHandler[];
|
|
24
|
+
setToken(token: string): this;
|
|
25
|
+
setUrl(url: string): this;
|
|
26
|
+
/**
|
|
27
|
+
* Allow to register error/exception handler.
|
|
28
|
+
* Handlers can be developed in another projects as long as they respect the interface HttpExceptionHandler.
|
|
29
|
+
*/
|
|
30
|
+
registerHttpExceptionHandler(handler: HttpExceptionHandler): this;
|
|
31
|
+
/**
|
|
32
|
+
* Will find appropriate ErrorHandlers and apply them to the error in order of registering.
|
|
33
|
+
*/
|
|
34
|
+
protected handleError(error: PublicApiClientException): Promise<HandleHttpExceptionOutput>;
|
|
35
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AbstractHttpClient = void 0;
|
|
4
|
+
class AbstractHttpClient {
|
|
5
|
+
constructor() {
|
|
6
|
+
/**
|
|
7
|
+
* Base path for HTTP calls
|
|
8
|
+
*/
|
|
9
|
+
this.basePath = '';
|
|
10
|
+
/**
|
|
11
|
+
* Current path for HTTP calls
|
|
12
|
+
*/
|
|
13
|
+
this.path = '';
|
|
14
|
+
/**
|
|
15
|
+
* Token to authenticate the user
|
|
16
|
+
*/
|
|
17
|
+
this.token = '';
|
|
18
|
+
/**
|
|
19
|
+
* ArrowSphere API URL
|
|
20
|
+
*/
|
|
21
|
+
this.url = '';
|
|
22
|
+
/**
|
|
23
|
+
* Http Exceptions Handlers
|
|
24
|
+
*/
|
|
25
|
+
this.httpExceptionHandlers = [];
|
|
26
|
+
}
|
|
27
|
+
setToken(token) {
|
|
28
|
+
this.token = token;
|
|
29
|
+
return this;
|
|
30
|
+
}
|
|
31
|
+
setUrl(url) {
|
|
32
|
+
this.url = url;
|
|
33
|
+
return this;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Allow to register error/exception handler.
|
|
37
|
+
* Handlers can be developed in another projects as long as they respect the interface HttpExceptionHandler.
|
|
38
|
+
*/
|
|
39
|
+
registerHttpExceptionHandler(handler) {
|
|
40
|
+
this.httpExceptionHandlers.push(handler);
|
|
41
|
+
return this;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Will find appropriate ErrorHandlers and apply them to the error in order of registering.
|
|
45
|
+
*/
|
|
46
|
+
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
|
+
});
|
|
52
|
+
// handle retry
|
|
53
|
+
const output = { mustRetry: false };
|
|
54
|
+
for (const handler of appropriateHandlers) {
|
|
55
|
+
const res = await handler.handle(error, {
|
|
56
|
+
setToken: this.setToken,
|
|
57
|
+
});
|
|
58
|
+
output.mustRetry = res.mustRetry;
|
|
59
|
+
}
|
|
60
|
+
return output;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
exports.AbstractHttpClient = AbstractHttpClient;
|
|
64
|
+
//# sourceMappingURL=AbstractHttpClient.js.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AxiosInstance, AxiosResponse } from 'axios';
|
|
2
|
+
import { AbstractHttpClient } from './AbstractHttpClient';
|
|
2
3
|
/**
|
|
3
4
|
* Lists of available query parameters for the API call
|
|
4
5
|
*/
|
|
@@ -36,23 +37,11 @@ export declare type ConfigurationsClient = {
|
|
|
36
37
|
export declare type ExtraInformationType = {
|
|
37
38
|
[ExtraInformationFields.COLUMN_EXTRA_INFORMATION]?: Record<string, unknown>;
|
|
38
39
|
};
|
|
39
|
-
export declare abstract class AbstractClient {
|
|
40
|
-
/**
|
|
41
|
-
* Base path for HTTP calls
|
|
42
|
-
*/
|
|
43
|
-
protected basePath: string;
|
|
44
|
-
/**
|
|
45
|
-
* Current path for HTTP calls
|
|
46
|
-
*/
|
|
47
|
-
protected path: string;
|
|
40
|
+
export declare abstract class AbstractClient extends AbstractHttpClient {
|
|
48
41
|
/**
|
|
49
42
|
* Axios instance for client
|
|
50
43
|
*/
|
|
51
44
|
protected client: AxiosInstance;
|
|
52
|
-
/**
|
|
53
|
-
* ArrowSphere API URL
|
|
54
|
-
*/
|
|
55
|
-
protected url: string;
|
|
56
45
|
/**
|
|
57
46
|
* ArrowSphere API key
|
|
58
47
|
*/
|
|
@@ -84,12 +73,6 @@ export declare abstract class AbstractClient {
|
|
|
84
73
|
* @returns this
|
|
85
74
|
*/
|
|
86
75
|
setApiKey(key: string): this;
|
|
87
|
-
/**
|
|
88
|
-
* Sets the client ArrowSphere API url
|
|
89
|
-
* @param url - API url
|
|
90
|
-
* @returns this
|
|
91
|
-
*/
|
|
92
|
-
setUrl(url: string): this;
|
|
93
76
|
/**
|
|
94
77
|
* Returns the API url.
|
|
95
78
|
* @returns string
|
package/build/abstractClient.js
CHANGED
|
@@ -9,6 +9,7 @@ const querystring_1 = __importDefault(require("querystring"));
|
|
|
9
9
|
const url_1 = require("url");
|
|
10
10
|
const path_1 = __importDefault(require("path"));
|
|
11
11
|
const axiosSingleton_1 = require("./axiosSingleton");
|
|
12
|
+
const AbstractHttpClient_1 = require("./AbstractHttpClient");
|
|
12
13
|
/**
|
|
13
14
|
* Lists of available query parameters for the API call
|
|
14
15
|
*/
|
|
@@ -27,25 +28,14 @@ var ExtraInformationFields;
|
|
|
27
28
|
(function (ExtraInformationFields) {
|
|
28
29
|
ExtraInformationFields["COLUMN_EXTRA_INFORMATION"] = "extraInformation";
|
|
29
30
|
})(ExtraInformationFields = exports.ExtraInformationFields || (exports.ExtraInformationFields = {}));
|
|
30
|
-
class AbstractClient {
|
|
31
|
+
class AbstractClient extends AbstractHttpClient_1.AbstractHttpClient {
|
|
31
32
|
/**
|
|
32
33
|
* AbstractClient constructor.
|
|
33
34
|
* @returns AbstractClient
|
|
34
35
|
*/
|
|
35
36
|
constructor(configuration) {
|
|
36
37
|
var _a, _b, _c;
|
|
37
|
-
|
|
38
|
-
* Base path for HTTP calls
|
|
39
|
-
*/
|
|
40
|
-
this.basePath = '';
|
|
41
|
-
/**
|
|
42
|
-
* Current path for HTTP calls
|
|
43
|
-
*/
|
|
44
|
-
this.path = '';
|
|
45
|
-
/**
|
|
46
|
-
* ArrowSphere API URL
|
|
47
|
-
*/
|
|
48
|
-
this.url = '';
|
|
38
|
+
super();
|
|
49
39
|
/**
|
|
50
40
|
* ArrowSphere API key
|
|
51
41
|
*/
|
|
@@ -80,15 +70,6 @@ class AbstractClient {
|
|
|
80
70
|
this.apiKey = key;
|
|
81
71
|
return this;
|
|
82
72
|
}
|
|
83
|
-
/**
|
|
84
|
-
* Sets the client ArrowSphere API url
|
|
85
|
-
* @param url - API url
|
|
86
|
-
* @returns this
|
|
87
|
-
*/
|
|
88
|
-
setUrl(url) {
|
|
89
|
-
this.url = url;
|
|
90
|
-
return this;
|
|
91
|
-
}
|
|
92
73
|
/**
|
|
93
74
|
* Returns the API url.
|
|
94
75
|
* @returns string
|
|
@@ -1,28 +1,15 @@
|
|
|
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 {
|
|
5
|
-
export declare
|
|
6
|
-
export declare abstract class AbstractGraphQLClient {
|
|
7
|
-
/**
|
|
8
|
-
* Base path for HTTP calls
|
|
9
|
-
*/
|
|
10
|
-
protected basePath: string;
|
|
11
|
-
/**
|
|
12
|
-
* Current path for HTTP calls
|
|
13
|
-
*/
|
|
14
|
-
protected path: string;
|
|
4
|
+
import { AbstractHttpClient } from './AbstractHttpClient';
|
|
5
|
+
export declare abstract class AbstractGraphQLClient extends AbstractHttpClient {
|
|
15
6
|
protected client: GraphQLClient;
|
|
16
|
-
protected url: string;
|
|
17
|
-
protected token: string;
|
|
18
7
|
protected optionsHeader?: Dom.RequestInit['headers'];
|
|
19
8
|
protected options: Options;
|
|
20
9
|
private getClient;
|
|
21
|
-
setToken(token: string): this;
|
|
22
|
-
setUrl(url: string): this;
|
|
23
10
|
setOptionsHeader(options: Dom.RequestInit['headers']): this;
|
|
24
11
|
setOptions(options: Options): this;
|
|
25
|
-
protected post(query: string): Promise<GraphQLResponseTypes>;
|
|
12
|
+
protected post<GraphQLResponseTypes>(query: string): Promise<GraphQLResponseTypes>;
|
|
26
13
|
protected generateUrl(): string;
|
|
27
14
|
protected stringifyQuery(query: any): string;
|
|
28
15
|
}
|
|
@@ -27,32 +27,16 @@ exports.AbstractGraphQLClient = void 0;
|
|
|
27
27
|
const graphql_request_1 = require("graphql-request");
|
|
28
28
|
const path = __importStar(require("path"));
|
|
29
29
|
const json_to_graphql_query_1 = require("json-to-graphql-query");
|
|
30
|
-
|
|
30
|
+
const AbstractHttpClient_1 = require("./AbstractHttpClient");
|
|
31
|
+
class AbstractGraphQLClient extends AbstractHttpClient_1.AbstractHttpClient {
|
|
31
32
|
constructor() {
|
|
32
|
-
|
|
33
|
-
* Base path for HTTP calls
|
|
34
|
-
*/
|
|
35
|
-
this.basePath = '';
|
|
36
|
-
/**
|
|
37
|
-
* Current path for HTTP calls
|
|
38
|
-
*/
|
|
39
|
-
this.path = '';
|
|
40
|
-
this.url = '';
|
|
41
|
-
this.token = '';
|
|
33
|
+
super(...arguments);
|
|
42
34
|
this.options = {};
|
|
43
35
|
}
|
|
44
36
|
getClient() {
|
|
45
37
|
this.client = new graphql_request_1.GraphQLClient(this.generateUrl());
|
|
46
38
|
return this;
|
|
47
39
|
}
|
|
48
|
-
setToken(token) {
|
|
49
|
-
this.token = token;
|
|
50
|
-
return this;
|
|
51
|
-
}
|
|
52
|
-
setUrl(url) {
|
|
53
|
-
this.url = url;
|
|
54
|
-
return this;
|
|
55
|
-
}
|
|
56
40
|
setOptionsHeader(options) {
|
|
57
41
|
this.optionsHeader = options;
|
|
58
42
|
return this;
|
|
@@ -62,7 +46,6 @@ class AbstractGraphQLClient {
|
|
|
62
46
|
return this;
|
|
63
47
|
}
|
|
64
48
|
async post(query) {
|
|
65
|
-
console.log('entering post');
|
|
66
49
|
this.getClient().client.setHeaders({
|
|
67
50
|
authorization: this.token,
|
|
68
51
|
...this.optionsHeader,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AbstractGraphQLClient } from '../abstractGraphQLClient';
|
|
2
2
|
import { GetProductsType } from './types/catalogGraphQLTypes';
|
|
3
|
-
import { CatalogQuery } from './types/catalogGraphQLQueries';
|
|
4
3
|
export declare class CatalogGraphQLClient extends AbstractGraphQLClient {
|
|
5
4
|
/**
|
|
6
5
|
* The base path of the API
|
|
@@ -11,5 +10,4 @@ export declare class CatalogGraphQLClient extends AbstractGraphQLClient {
|
|
|
11
10
|
*/
|
|
12
11
|
private GRAPHQL;
|
|
13
12
|
find(request: string): Promise<GetProductsType>;
|
|
14
|
-
findByQuery(query: CatalogQuery): Promise<GetProductsType>;
|
|
15
13
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
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';
|
|
5
6
|
class CatalogGraphQLClient extends abstractGraphQLClient_1.AbstractGraphQLClient {
|
|
6
7
|
constructor() {
|
|
7
8
|
super(...arguments);
|
|
@@ -18,10 +19,6 @@ class CatalogGraphQLClient extends abstractGraphQLClient_1.AbstractGraphQLClient
|
|
|
18
19
|
this.path = this.GRAPHQL;
|
|
19
20
|
return await this.post(request);
|
|
20
21
|
}
|
|
21
|
-
async findByQuery(query) {
|
|
22
|
-
const queryStr = this.stringifyQuery(query);
|
|
23
|
-
return this.find(queryStr);
|
|
24
|
-
}
|
|
25
22
|
}
|
|
26
23
|
exports.CatalogGraphQLClient = CatalogGraphQLClient;
|
|
27
24
|
//# sourceMappingURL=catalogGraphQLClient.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HandleHttpExceptionOutput } from '././HandleHttpExceptionOutput';
|
|
2
|
+
import { Hooks } from './Hooks';
|
|
3
|
+
import { PublicApiClientException } from '../publicApiClientException';
|
|
4
|
+
/**
|
|
5
|
+
* Implementations can be outside of this project to inject other dependencies.
|
|
6
|
+
*/
|
|
7
|
+
export interface HttpExceptionHandler {
|
|
8
|
+
handle(error: PublicApiClientException, hooks: Hooks): Promise<HandleHttpExceptionOutput>;
|
|
9
|
+
getHandledHttpStatuses(): number[];
|
|
10
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
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("./HttpExceptionHandler"), exports);
|
|
18
|
+
__exportStar(require("./HandleHttpExceptionOutput"), exports);
|
|
19
|
+
__exportStar(require("./Hooks"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
package/build/index.d.ts
CHANGED
package/build/index.js
CHANGED
|
@@ -48,6 +48,7 @@ __exportStar(require("./shared/"), exports);
|
|
|
48
48
|
__exportStar(require("./security/"), exports);
|
|
49
49
|
__exportStar(require("./subscriptions/"), exports);
|
|
50
50
|
__exportStar(require("./supportCenter/"), exports);
|
|
51
|
+
__exportStar(require("./securityScore/"), exports);
|
|
51
52
|
const ContactInformation = __importStar(require("./contact"));
|
|
52
53
|
exports.ContactInformation = ContactInformation;
|
|
53
54
|
//# sourceMappingURL=index.js.map
|
|
@@ -15,13 +15,38 @@ export declare enum CreateOrderInputFields {
|
|
|
15
15
|
COLUMN_PERIODICITY = "periodicity",
|
|
16
16
|
COLUMN_TERM = "term",
|
|
17
17
|
COLUMN_DISCOUNT = "discount",
|
|
18
|
-
COLUMN_UPLIFT = "uplift"
|
|
18
|
+
COLUMN_UPLIFT = "uplift",
|
|
19
|
+
COLUMN_AUTO_RENEW = "autoRenew",
|
|
20
|
+
COLUMN_EFFECTIVE_START_DATE = "effectiveStartDate",
|
|
21
|
+
COLUMN_EFFECTIVE_END_DATE = "effectiveEndDate",
|
|
22
|
+
COLUMN_VENDOR_REFERENCE_ID = "vendorReferenceId",
|
|
23
|
+
COLUMN_PARENT_VENDOR_REFERENCE_ID = "parentVendorReferenceId",
|
|
24
|
+
COLUMN_FRIENDLY_NAME = "friendlyName",
|
|
25
|
+
COLUMN_COMMENT1 = "comment1",
|
|
26
|
+
COLUMN_COMMENT2 = "comment2",
|
|
27
|
+
COLUMN_SCENARIO = "scenario",
|
|
28
|
+
COLUMN_SCHEDULE_DATE = "scheduledDate",
|
|
29
|
+
COLUMN_PRICE = "price",
|
|
30
|
+
COLUMN_PRICE_BUY = "buy",
|
|
31
|
+
COLUMN_PRICE_LIST = "list",
|
|
32
|
+
COLUMN_PRICE_RESELLER = "reseller",
|
|
33
|
+
COLUMN_PRICE_END_CUSTOMER = "endCustomer",
|
|
34
|
+
COLUMN_PRICE_CURRENCY = "currency",
|
|
35
|
+
COLUMN_PRICE_UNIT = "unitPrice",
|
|
36
|
+
COLUMN_PRICE_EXCHANGE_RATE = "exchangeRate"
|
|
37
|
+
}
|
|
38
|
+
export declare enum scenarioType {
|
|
39
|
+
INJECTION = "injection",
|
|
40
|
+
RECONCILIATION = "reconciliation",
|
|
41
|
+
PROVISION = "provision"
|
|
19
42
|
}
|
|
20
43
|
export declare type CreateOrderInputType = {
|
|
21
44
|
[CreateOrderInputFields.COLUMN_CUSTOMER]: {
|
|
22
45
|
[CreateOrderInputFields.COLUMN_REFERENCE]: string;
|
|
23
46
|
[CreateOrderInputFields.COLUMN_PO_NUMBER]?: string;
|
|
24
47
|
};
|
|
48
|
+
[CreateOrderInputFields.COLUMN_SCENARIO]?: scenarioType;
|
|
49
|
+
[CreateOrderInputFields.COLUMN_SCHEDULE_DATE]?: string;
|
|
25
50
|
[CreateOrderInputFields.COLUMN_PRODUCTS]: Array<{
|
|
26
51
|
[CreateOrderInputFields.COLUMN_SKU]: string;
|
|
27
52
|
[CreateOrderInputFields.COLUMN_QUANTITY]: number;
|
|
@@ -30,10 +55,40 @@ export declare type CreateOrderInputType = {
|
|
|
30
55
|
};
|
|
31
56
|
[CreateOrderInputFields.COLUMN_PARENT_LICENSE_ID]?: string;
|
|
32
57
|
[CreateOrderInputFields.COLUMN_PARENT_SKU]?: string;
|
|
33
|
-
[CreateOrderInputFields.COLUMN_PERIODICITY]?: string;
|
|
34
|
-
[CreateOrderInputFields.COLUMN_TERM]?: string;
|
|
58
|
+
[CreateOrderInputFields.COLUMN_PERIODICITY]?: string | number;
|
|
59
|
+
[CreateOrderInputFields.COLUMN_TERM]?: string | number;
|
|
35
60
|
[CreateOrderInputFields.COLUMN_DISCOUNT]?: number;
|
|
36
61
|
[CreateOrderInputFields.COLUMN_UPLIFT]?: number;
|
|
62
|
+
[CreateOrderInputFields.COLUMN_AUTO_RENEW]?: boolean;
|
|
63
|
+
[CreateOrderInputFields.COLUMN_EFFECTIVE_START_DATE]?: string;
|
|
64
|
+
[CreateOrderInputFields.COLUMN_EFFECTIVE_END_DATE]?: string;
|
|
65
|
+
[CreateOrderInputFields.COLUMN_VENDOR_REFERENCE_ID]?: string;
|
|
66
|
+
[CreateOrderInputFields.COLUMN_PARENT_VENDOR_REFERENCE_ID]?: string;
|
|
67
|
+
[CreateOrderInputFields.COLUMN_FRIENDLY_NAME]?: string;
|
|
68
|
+
[CreateOrderInputFields.COLUMN_COMMENT1]?: string;
|
|
69
|
+
[CreateOrderInputFields.COLUMN_COMMENT2]?: string;
|
|
70
|
+
[CreateOrderInputFields.COLUMN_PRICE]?: {
|
|
71
|
+
[CreateOrderInputFields.COLUMN_PRICE_BUY]?: {
|
|
72
|
+
[CreateOrderInputFields.COLUMN_PRICE_CURRENCY]?: string;
|
|
73
|
+
[CreateOrderInputFields.COLUMN_PRICE_UNIT]?: number;
|
|
74
|
+
[CreateOrderInputFields.COLUMN_PRICE_EXCHANGE_RATE]?: number;
|
|
75
|
+
};
|
|
76
|
+
[CreateOrderInputFields.COLUMN_PRICE_LIST]?: {
|
|
77
|
+
[CreateOrderInputFields.COLUMN_PRICE_CURRENCY]?: string;
|
|
78
|
+
[CreateOrderInputFields.COLUMN_PRICE_UNIT]?: number;
|
|
79
|
+
[CreateOrderInputFields.COLUMN_PRICE_EXCHANGE_RATE]?: number;
|
|
80
|
+
};
|
|
81
|
+
[CreateOrderInputFields.COLUMN_PRICE_RESELLER]?: {
|
|
82
|
+
[CreateOrderInputFields.COLUMN_PRICE_CURRENCY]?: string;
|
|
83
|
+
[CreateOrderInputFields.COLUMN_PRICE_UNIT]?: number;
|
|
84
|
+
[CreateOrderInputFields.COLUMN_PRICE_EXCHANGE_RATE]?: number;
|
|
85
|
+
};
|
|
86
|
+
[CreateOrderInputFields.COLUMN_PRICE_END_CUSTOMER]?: {
|
|
87
|
+
[CreateOrderInputFields.COLUMN_PRICE_CURRENCY]?: string;
|
|
88
|
+
[CreateOrderInputFields.COLUMN_PRICE_UNIT]?: number;
|
|
89
|
+
[CreateOrderInputFields.COLUMN_PRICE_EXCHANGE_RATE]?: number;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
37
92
|
}>;
|
|
38
93
|
};
|
|
39
94
|
export declare class OrdersClient extends AbstractClient {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OrdersClient = exports.CreateOrderInputFields = void 0;
|
|
3
|
+
exports.OrdersClient = exports.scenarioType = exports.CreateOrderInputFields = void 0;
|
|
4
4
|
const abstractClient_1 = require("../abstractClient");
|
|
5
5
|
const getResult_1 = require("../getResult");
|
|
6
6
|
const dataListOrders_1 = require("./entities/dataListOrders");
|
|
@@ -20,7 +20,31 @@ var CreateOrderInputFields;
|
|
|
20
20
|
CreateOrderInputFields["COLUMN_TERM"] = "term";
|
|
21
21
|
CreateOrderInputFields["COLUMN_DISCOUNT"] = "discount";
|
|
22
22
|
CreateOrderInputFields["COLUMN_UPLIFT"] = "uplift";
|
|
23
|
+
CreateOrderInputFields["COLUMN_AUTO_RENEW"] = "autoRenew";
|
|
24
|
+
CreateOrderInputFields["COLUMN_EFFECTIVE_START_DATE"] = "effectiveStartDate";
|
|
25
|
+
CreateOrderInputFields["COLUMN_EFFECTIVE_END_DATE"] = "effectiveEndDate";
|
|
26
|
+
CreateOrderInputFields["COLUMN_VENDOR_REFERENCE_ID"] = "vendorReferenceId";
|
|
27
|
+
CreateOrderInputFields["COLUMN_PARENT_VENDOR_REFERENCE_ID"] = "parentVendorReferenceId";
|
|
28
|
+
CreateOrderInputFields["COLUMN_FRIENDLY_NAME"] = "friendlyName";
|
|
29
|
+
CreateOrderInputFields["COLUMN_COMMENT1"] = "comment1";
|
|
30
|
+
CreateOrderInputFields["COLUMN_COMMENT2"] = "comment2";
|
|
31
|
+
CreateOrderInputFields["COLUMN_SCENARIO"] = "scenario";
|
|
32
|
+
CreateOrderInputFields["COLUMN_SCHEDULE_DATE"] = "scheduledDate";
|
|
33
|
+
CreateOrderInputFields["COLUMN_PRICE"] = "price";
|
|
34
|
+
CreateOrderInputFields["COLUMN_PRICE_BUY"] = "buy";
|
|
35
|
+
CreateOrderInputFields["COLUMN_PRICE_LIST"] = "list";
|
|
36
|
+
CreateOrderInputFields["COLUMN_PRICE_RESELLER"] = "reseller";
|
|
37
|
+
CreateOrderInputFields["COLUMN_PRICE_END_CUSTOMER"] = "endCustomer";
|
|
38
|
+
CreateOrderInputFields["COLUMN_PRICE_CURRENCY"] = "currency";
|
|
39
|
+
CreateOrderInputFields["COLUMN_PRICE_UNIT"] = "unitPrice";
|
|
40
|
+
CreateOrderInputFields["COLUMN_PRICE_EXCHANGE_RATE"] = "exchangeRate";
|
|
23
41
|
})(CreateOrderInputFields = exports.CreateOrderInputFields || (exports.CreateOrderInputFields = {}));
|
|
42
|
+
var scenarioType;
|
|
43
|
+
(function (scenarioType) {
|
|
44
|
+
scenarioType["INJECTION"] = "injection";
|
|
45
|
+
scenarioType["RECONCILIATION"] = "reconciliation";
|
|
46
|
+
scenarioType["PROVISION"] = "provision";
|
|
47
|
+
})(scenarioType = exports.scenarioType || (exports.scenarioType = {}));
|
|
24
48
|
class OrdersClient extends abstractClient_1.AbstractClient {
|
|
25
49
|
constructor() {
|
|
26
50
|
super(...arguments);
|
|
@@ -0,0 +1,19 @@
|
|
|
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("./securityScoreGraphQLClient"), exports);
|
|
18
|
+
__exportStar(require("./types/securityScoreGraphQLTypes"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AbstractGraphQLClient } from '../abstractGraphQLClient';
|
|
2
|
+
import { GetPartnerDataType, GetCustomerDataType, GetCustomerAccountDataType } from './types/securityScoreGraphQLTypes';
|
|
3
|
+
import { GetPartnerDataQuery, GetCustomerDataQuery, GetCustomerAccountDataQuery } from './types/securityScoreGraphQLQueries';
|
|
4
|
+
export declare class SecurityScoreGraphQLClient extends AbstractGraphQLClient {
|
|
5
|
+
/**
|
|
6
|
+
* The base path of the API
|
|
7
|
+
*/
|
|
8
|
+
protected basePath: string;
|
|
9
|
+
/**
|
|
10
|
+
* The Path of graphql catalog API
|
|
11
|
+
*/
|
|
12
|
+
private GRAPHQL;
|
|
13
|
+
find<GraphQLResponseTypes>(request: string): Promise<GraphQLResponseTypes>;
|
|
14
|
+
getPartnerData(getPartnerDataQuery: GetPartnerDataQuery): Promise<GetPartnerDataType>;
|
|
15
|
+
getCustomerData(getCustomerDataQuery: GetCustomerDataQuery): Promise<GetCustomerDataType>;
|
|
16
|
+
getCustomerAccountData(getCustomerAccountDataQuery: GetCustomerAccountDataQuery): Promise<GetCustomerAccountDataType>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SecurityScoreGraphQLClient = void 0;
|
|
4
|
+
const abstractGraphQLClient_1 = require("../abstractGraphQLClient");
|
|
5
|
+
class SecurityScoreGraphQLClient extends abstractGraphQLClient_1.AbstractGraphQLClient {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
/**
|
|
9
|
+
* The base path of the API
|
|
10
|
+
*/
|
|
11
|
+
this.basePath = 'security/';
|
|
12
|
+
/**
|
|
13
|
+
* The Path of graphql catalog API
|
|
14
|
+
*/
|
|
15
|
+
this.GRAPHQL = 'graphql/score';
|
|
16
|
+
}
|
|
17
|
+
async find(request) {
|
|
18
|
+
this.path = this.GRAPHQL;
|
|
19
|
+
return await this.post(request);
|
|
20
|
+
}
|
|
21
|
+
async getPartnerData(getPartnerDataQuery) {
|
|
22
|
+
const queryStr = this.stringifyQuery(getPartnerDataQuery);
|
|
23
|
+
return this.find(queryStr);
|
|
24
|
+
}
|
|
25
|
+
async getCustomerData(getCustomerDataQuery) {
|
|
26
|
+
const queryStr = this.stringifyQuery(getCustomerDataQuery);
|
|
27
|
+
return this.find(queryStr);
|
|
28
|
+
}
|
|
29
|
+
async getCustomerAccountData(getCustomerAccountDataQuery) {
|
|
30
|
+
const queryStr = this.stringifyQuery(getCustomerAccountDataQuery);
|
|
31
|
+
return this.find(queryStr);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.SecurityScoreGraphQLClient = SecurityScoreGraphQLClient;
|
|
35
|
+
//# sourceMappingURL=securityScoreGraphQLClient.js.map
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* For field __args
|
|
3
|
+
*/
|
|
4
|
+
export declare enum OperatorArgument {
|
|
5
|
+
OR = "OR",
|
|
6
|
+
AND = "AND",
|
|
7
|
+
BETWEEN = "BETWEEN"
|
|
8
|
+
}
|
|
9
|
+
export declare enum PeriodInputFields {
|
|
10
|
+
FROM = "from",
|
|
11
|
+
TO = "to"
|
|
12
|
+
}
|
|
13
|
+
export declare enum PaginateFields {
|
|
14
|
+
PAGE = "page",
|
|
15
|
+
PER_PAGE = "perPage"
|
|
16
|
+
}
|
|
17
|
+
export declare enum SearchBodyFields {
|
|
18
|
+
FILTERS = "filters",
|
|
19
|
+
EXCLUSION_FILTERS = "exclusionFilters",
|
|
20
|
+
SORT = "sort",
|
|
21
|
+
SUBSCRIPTION_REFERENCE = "subscriptionReference",
|
|
22
|
+
MARKETPLACE = "marketplace",
|
|
23
|
+
MONTHLY_TREND_PERIOD = "monthlyTrendPeriod",
|
|
24
|
+
PERIOD = "period"
|
|
25
|
+
}
|
|
26
|
+
export declare enum SearchFilterFields {
|
|
27
|
+
NAMES = "names",
|
|
28
|
+
VALUES = "values",
|
|
29
|
+
OPERATOR = "operator",
|
|
30
|
+
FILTERS = "filters"
|
|
31
|
+
}
|
|
32
|
+
export declare enum SearchFilterValues {
|
|
33
|
+
ACCOUNT_REFERENCE = "account.reference",
|
|
34
|
+
REGISTRATION_CUSTOMER_REFERENCE = "registration.customer.reference",
|
|
35
|
+
REGISTRATION_RESELLER_REFERENCE = "registration.reseller.reference"
|
|
36
|
+
}
|
|
37
|
+
export declare enum SortFields {
|
|
38
|
+
NAME = "name",
|
|
39
|
+
ORDER = "order"
|
|
40
|
+
}
|
|
41
|
+
export declare enum SecurityScoreQueries {
|
|
42
|
+
GET_PARTNER_DATA = "getPartnerData",
|
|
43
|
+
GET_CUSTOMER_DATA = "getCustomerData",
|
|
44
|
+
GET_CUSTOMER_ACCOUNT_DATA = "getCustomerAccountData"
|
|
45
|
+
}
|
|
46
|
+
export declare type PaginateArgument = {
|
|
47
|
+
[PaginateFields.PAGE]?: number;
|
|
48
|
+
[PaginateFields.PER_PAGE]?: number;
|
|
49
|
+
};
|
|
50
|
+
export declare type SearchBodyArgument = {
|
|
51
|
+
[SearchBodyFields.FILTERS]?: [SearchFilterArgument];
|
|
52
|
+
[SearchBodyFields.EXCLUSION_FILTERS]?: [SearchFilterArgument];
|
|
53
|
+
[SearchBodyFields.SORT]?: [SortArgument];
|
|
54
|
+
[SearchBodyFields.SUBSCRIPTION_REFERENCE]?: [[string]];
|
|
55
|
+
[SearchBodyFields.MARKETPLACE]?: [[string]];
|
|
56
|
+
[SearchBodyFields.MONTHLY_TREND_PERIOD]?: PeriodInputArgument;
|
|
57
|
+
[SearchBodyFields.PERIOD]?: PeriodInputArgument;
|
|
58
|
+
};
|
|
59
|
+
export declare type PeriodInputArgument = {
|
|
60
|
+
[PeriodInputFields.FROM]: string;
|
|
61
|
+
[PeriodInputFields.TO]: string;
|
|
62
|
+
};
|
|
63
|
+
export declare type SearchFilterArgument = {
|
|
64
|
+
[SearchFilterFields.NAMES]?: [string];
|
|
65
|
+
[SearchFilterFields.VALUES]?: [[string]];
|
|
66
|
+
[SearchFilterFields.OPERATOR]?: OperatorArgument;
|
|
67
|
+
[SearchFilterFields.FILTERS]?: [SearchFilterArgument];
|
|
68
|
+
};
|
|
69
|
+
export declare type SortArgument = {
|
|
70
|
+
[SortFields.NAME]?: string;
|
|
71
|
+
[SortFields.ORDER]?: string;
|
|
72
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SecurityScoreQueries = exports.SortFields = exports.SearchFilterValues = exports.SearchFilterFields = exports.SearchBodyFields = exports.PaginateFields = exports.PeriodInputFields = exports.OperatorArgument = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* For field __args
|
|
6
|
+
*/
|
|
7
|
+
var OperatorArgument;
|
|
8
|
+
(function (OperatorArgument) {
|
|
9
|
+
OperatorArgument["OR"] = "OR";
|
|
10
|
+
OperatorArgument["AND"] = "AND";
|
|
11
|
+
OperatorArgument["BETWEEN"] = "BETWEEN";
|
|
12
|
+
})(OperatorArgument = exports.OperatorArgument || (exports.OperatorArgument = {}));
|
|
13
|
+
var PeriodInputFields;
|
|
14
|
+
(function (PeriodInputFields) {
|
|
15
|
+
PeriodInputFields["FROM"] = "from";
|
|
16
|
+
PeriodInputFields["TO"] = "to";
|
|
17
|
+
})(PeriodInputFields = exports.PeriodInputFields || (exports.PeriodInputFields = {}));
|
|
18
|
+
var PaginateFields;
|
|
19
|
+
(function (PaginateFields) {
|
|
20
|
+
PaginateFields["PAGE"] = "page";
|
|
21
|
+
PaginateFields["PER_PAGE"] = "perPage";
|
|
22
|
+
})(PaginateFields = exports.PaginateFields || (exports.PaginateFields = {}));
|
|
23
|
+
var SearchBodyFields;
|
|
24
|
+
(function (SearchBodyFields) {
|
|
25
|
+
SearchBodyFields["FILTERS"] = "filters";
|
|
26
|
+
SearchBodyFields["EXCLUSION_FILTERS"] = "exclusionFilters";
|
|
27
|
+
SearchBodyFields["SORT"] = "sort";
|
|
28
|
+
SearchBodyFields["SUBSCRIPTION_REFERENCE"] = "subscriptionReference";
|
|
29
|
+
SearchBodyFields["MARKETPLACE"] = "marketplace";
|
|
30
|
+
SearchBodyFields["MONTHLY_TREND_PERIOD"] = "monthlyTrendPeriod";
|
|
31
|
+
SearchBodyFields["PERIOD"] = "period";
|
|
32
|
+
})(SearchBodyFields = exports.SearchBodyFields || (exports.SearchBodyFields = {}));
|
|
33
|
+
var SearchFilterFields;
|
|
34
|
+
(function (SearchFilterFields) {
|
|
35
|
+
SearchFilterFields["NAMES"] = "names";
|
|
36
|
+
SearchFilterFields["VALUES"] = "values";
|
|
37
|
+
SearchFilterFields["OPERATOR"] = "operator";
|
|
38
|
+
SearchFilterFields["FILTERS"] = "filters";
|
|
39
|
+
})(SearchFilterFields = exports.SearchFilterFields || (exports.SearchFilterFields = {}));
|
|
40
|
+
var SearchFilterValues;
|
|
41
|
+
(function (SearchFilterValues) {
|
|
42
|
+
SearchFilterValues["ACCOUNT_REFERENCE"] = "account.reference";
|
|
43
|
+
SearchFilterValues["REGISTRATION_CUSTOMER_REFERENCE"] = "registration.customer.reference";
|
|
44
|
+
SearchFilterValues["REGISTRATION_RESELLER_REFERENCE"] = "registration.reseller.reference";
|
|
45
|
+
})(SearchFilterValues = exports.SearchFilterValues || (exports.SearchFilterValues = {}));
|
|
46
|
+
var SortFields;
|
|
47
|
+
(function (SortFields) {
|
|
48
|
+
SortFields["NAME"] = "name";
|
|
49
|
+
SortFields["ORDER"] = "order";
|
|
50
|
+
})(SortFields = exports.SortFields || (exports.SortFields = {}));
|
|
51
|
+
var SecurityScoreQueries;
|
|
52
|
+
(function (SecurityScoreQueries) {
|
|
53
|
+
SecurityScoreQueries["GET_PARTNER_DATA"] = "getPartnerData";
|
|
54
|
+
SecurityScoreQueries["GET_CUSTOMER_DATA"] = "getCustomerData";
|
|
55
|
+
SecurityScoreQueries["GET_CUSTOMER_ACCOUNT_DATA"] = "getCustomerAccountData";
|
|
56
|
+
})(SecurityScoreQueries = exports.SecurityScoreQueries || (exports.SecurityScoreQueries = {}));
|
|
57
|
+
//# sourceMappingURL=queryArguments.js.map
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { SearchBodyArgument, PaginateArgument } from './queryArguments';
|
|
2
|
+
import { AccountsAggType, EndCustomersAggType, FilterType, IssuesAggType, MonthlyTrendAggType, PeriodsType, ScoreResultType, SeveritiesAggType, StandardsAggType } from './securityScoreGraphQLTypes';
|
|
3
|
+
export declare type GetPartnerDataQuery = {
|
|
4
|
+
getPartnerData: {
|
|
5
|
+
__args?: {
|
|
6
|
+
searchBody?: SearchBodyArgument;
|
|
7
|
+
paginate?: PaginateArgument;
|
|
8
|
+
};
|
|
9
|
+
filters?: [FilterType];
|
|
10
|
+
results?: [ScoreResultType];
|
|
11
|
+
avgCurrentScore?: number;
|
|
12
|
+
monthlyTrendAgg?: MonthlyTrendAggType;
|
|
13
|
+
endCustomersAgg?: EndCustomersAggType;
|
|
14
|
+
issueAgg?: IssuesAggType;
|
|
15
|
+
severityAgg?: SeveritiesAggType;
|
|
16
|
+
period?: PeriodsType;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare type GetCustomerDataQuery = {
|
|
20
|
+
getCustomerData: {
|
|
21
|
+
__args?: {
|
|
22
|
+
searchBody?: SearchBodyArgument;
|
|
23
|
+
};
|
|
24
|
+
filters?: [FilterType];
|
|
25
|
+
avgCurrentScore?: number;
|
|
26
|
+
accountsAgg?: AccountsAggType;
|
|
27
|
+
severityAgg?: SeveritiesAggType;
|
|
28
|
+
period?: PeriodsType;
|
|
29
|
+
subscriptionReferences?: number;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export declare type GetCustomerAccountDataQuery = {
|
|
33
|
+
getCustomerAccountData: {
|
|
34
|
+
__args?: {
|
|
35
|
+
searchBody?: SearchBodyArgument;
|
|
36
|
+
};
|
|
37
|
+
filters?: [FilterType];
|
|
38
|
+
avgCurrentScore?: boolean;
|
|
39
|
+
standardsAgg?: StandardsAggType;
|
|
40
|
+
severityAgg?: SeveritiesAggType;
|
|
41
|
+
period?: PeriodsType;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
export declare type FilterType = {
|
|
2
|
+
name?: string;
|
|
3
|
+
values?: [FilterValuesType];
|
|
4
|
+
};
|
|
5
|
+
export declare type FilterValuesType = {
|
|
6
|
+
value?: string;
|
|
7
|
+
count?: number;
|
|
8
|
+
};
|
|
9
|
+
export declare type RegistrationType = {
|
|
10
|
+
accountReference?: string;
|
|
11
|
+
subscriptionReference?: string;
|
|
12
|
+
customerReference?: string;
|
|
13
|
+
resellerReference?: string;
|
|
14
|
+
vendorCode?: string;
|
|
15
|
+
marketplace?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare type CheckType = {
|
|
18
|
+
name?: string;
|
|
19
|
+
description?: string;
|
|
20
|
+
processed?: number;
|
|
21
|
+
isFailed?: boolean;
|
|
22
|
+
flagged?: number;
|
|
23
|
+
reference?: string;
|
|
24
|
+
score?: number;
|
|
25
|
+
severity?: string;
|
|
26
|
+
};
|
|
27
|
+
export declare type StandardType = {
|
|
28
|
+
name?: string;
|
|
29
|
+
checks?: [CheckType];
|
|
30
|
+
failed?: number;
|
|
31
|
+
passed?: number;
|
|
32
|
+
score?: number;
|
|
33
|
+
total?: number;
|
|
34
|
+
};
|
|
35
|
+
export declare type AccountType = {
|
|
36
|
+
reference?: string;
|
|
37
|
+
name?: string;
|
|
38
|
+
standards?: [StandardType];
|
|
39
|
+
failed?: number;
|
|
40
|
+
passed?: number;
|
|
41
|
+
score?: number;
|
|
42
|
+
total?: number;
|
|
43
|
+
};
|
|
44
|
+
export declare type ScoreResultType = {
|
|
45
|
+
account?: AccountType;
|
|
46
|
+
registration?: RegistrationType;
|
|
47
|
+
};
|
|
48
|
+
export declare type NameCountByDateType = {
|
|
49
|
+
count?: number;
|
|
50
|
+
date?: string;
|
|
51
|
+
};
|
|
52
|
+
export declare type NameAggType = {
|
|
53
|
+
name?: string;
|
|
54
|
+
data?: [NameCountByDateType];
|
|
55
|
+
progression?: number;
|
|
56
|
+
};
|
|
57
|
+
export declare type SeveritiesAggType = {
|
|
58
|
+
severities: [NameAggType];
|
|
59
|
+
};
|
|
60
|
+
export declare type IssuesAggType = {
|
|
61
|
+
issues: [NameAggType];
|
|
62
|
+
};
|
|
63
|
+
export declare type CompareEndCustomerAggType = {
|
|
64
|
+
date?: string;
|
|
65
|
+
accounts?: number;
|
|
66
|
+
avgCurrentScore?: number;
|
|
67
|
+
failed?: number;
|
|
68
|
+
passed?: number;
|
|
69
|
+
subscriptionReferences?: number;
|
|
70
|
+
};
|
|
71
|
+
export declare type EndCustomerAggType = {
|
|
72
|
+
customerRef?: string;
|
|
73
|
+
data?: [CompareEndCustomerAggType];
|
|
74
|
+
progression?: number;
|
|
75
|
+
};
|
|
76
|
+
export declare type EndCustomersAggType = {
|
|
77
|
+
customers: [EndCustomerAggType];
|
|
78
|
+
};
|
|
79
|
+
export declare type ScoreByMonthType = {
|
|
80
|
+
date?: string;
|
|
81
|
+
avgCurrentScore?: number;
|
|
82
|
+
};
|
|
83
|
+
export declare type PeriodsType = {
|
|
84
|
+
from?: string;
|
|
85
|
+
to?: string;
|
|
86
|
+
};
|
|
87
|
+
export declare type MonthlyTrendAggType = {
|
|
88
|
+
period?: PeriodsType;
|
|
89
|
+
avgCurrentScore?: number;
|
|
90
|
+
scores?: [ScoreByMonthType];
|
|
91
|
+
};
|
|
92
|
+
export declare type GetPartnerDataType = {
|
|
93
|
+
filters?: [FilterType];
|
|
94
|
+
results?: [ScoreResultType];
|
|
95
|
+
avgCurrentScore?: number;
|
|
96
|
+
monthlyTrendAgg?: MonthlyTrendAggType;
|
|
97
|
+
endCustomersAgg?: EndCustomersAggType;
|
|
98
|
+
issueAgg?: IssuesAggType;
|
|
99
|
+
severityAgg?: SeveritiesAggType;
|
|
100
|
+
period?: PeriodsType;
|
|
101
|
+
};
|
|
102
|
+
export declare type CompareAccountAggType = {
|
|
103
|
+
date?: string;
|
|
104
|
+
avgCurrentScore?: number;
|
|
105
|
+
failed?: number;
|
|
106
|
+
passed?: number;
|
|
107
|
+
};
|
|
108
|
+
export declare type AccountAggType = {
|
|
109
|
+
accountRef?: string;
|
|
110
|
+
data?: [CompareAccountAggType];
|
|
111
|
+
progression?: number;
|
|
112
|
+
};
|
|
113
|
+
export declare type AccountsAggType = {
|
|
114
|
+
accounts: [AccountAggType];
|
|
115
|
+
};
|
|
116
|
+
export declare type GetCustomerDataType = {
|
|
117
|
+
filters?: [FilterType];
|
|
118
|
+
avgCurrentScore?: number;
|
|
119
|
+
accountsAgg?: AccountsAggType;
|
|
120
|
+
severityAgg?: SeveritiesAggType;
|
|
121
|
+
period?: PeriodsType;
|
|
122
|
+
subscriptionReferences?: number;
|
|
123
|
+
};
|
|
124
|
+
export declare type CompareStandardAggType = {
|
|
125
|
+
date?: string;
|
|
126
|
+
score?: number;
|
|
127
|
+
failed?: number;
|
|
128
|
+
passed?: number;
|
|
129
|
+
};
|
|
130
|
+
export declare type StandardAggType = {
|
|
131
|
+
name?: string;
|
|
132
|
+
data?: [CompareStandardAggType];
|
|
133
|
+
progression?: number;
|
|
134
|
+
};
|
|
135
|
+
export declare type StandardsAggType = {
|
|
136
|
+
standards: StandardAggType;
|
|
137
|
+
};
|
|
138
|
+
export declare type GetCustomerAccountDataType = {
|
|
139
|
+
filters?: [FilterType];
|
|
140
|
+
avgCurrentScore?: number;
|
|
141
|
+
standardsAgg?: StandardsAggType;
|
|
142
|
+
severityAgg?: SeveritiesAggType;
|
|
143
|
+
period?: PeriodsType;
|
|
144
|
+
};
|
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.
|
|
7
|
+
"version": "3.28.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",
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,42 +0,0 @@
|
|
|
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
|
-
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
|
-
};
|
|
42
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var OperatorArgument;
|
|
4
|
-
(function (OperatorArgument) {
|
|
5
|
-
OperatorArgument["OR"] = "OR";
|
|
6
|
-
OperatorArgument["AND"] = "AND";
|
|
7
|
-
OperatorArgument["BETWEEN"] = "BETWEEN";
|
|
8
|
-
})(OperatorArgument || (OperatorArgument = {}));
|
|
9
|
-
//# sourceMappingURL=queryArguments.js.map
|