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

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 CHANGED
@@ -3,15 +3,6 @@
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.40.0] - 2023-06-20
7
-
8
- ### Changed
9
-
10
- - Refactor find products by query
11
- - Add find one priceBand by query
12
- - Add find one product by query
13
- - Add fetch promotions
14
-
15
6
  ## [3.39.0] - 2023-06-20
16
7
 
17
8
  ### Changed
@@ -1,6 +1,6 @@
1
1
  import { AbstractGraphQLClient } from '../abstractGraphQLClient';
2
- import { GetPriceBandType, GetProductsType, GetProductType } from './types/catalogGraphQLTypes';
3
- import { CatalogQueries, CatalogQuery } from './types/catalogGraphQLQueries';
2
+ import { GetProductsType } from './types/catalogGraphQLTypes';
3
+ import { CatalogQuery } from './types/catalogGraphQLQueries';
4
4
  export declare class CatalogGraphQLClient extends AbstractGraphQLClient {
5
5
  /**
6
6
  * The base path of the API
@@ -11,12 +11,5 @@ export declare class CatalogGraphQLClient extends AbstractGraphQLClient {
11
11
  */
12
12
  private GRAPHQL;
13
13
  find(request: string): Promise<GetProductsType>;
14
- /**
15
- * @deprecated
16
- * Prefer using findProductsByQuery instead.
17
- */
18
14
  findByQuery(query: CatalogQuery): Promise<GetProductsType | null>;
19
- findProductsByQuery(query: Pick<CatalogQueries, 'getProducts'>): Promise<GetProductsType | null>;
20
- findOneProductByQuery(query: Pick<CatalogQueries, 'product'>): Promise<GetProductType | null>;
21
- findOnePriceBandByQuery(query: Pick<CatalogQueries, 'priceBand'>): Promise<GetPriceBandType | null>;
22
15
  }
@@ -18,10 +18,6 @@ class CatalogGraphQLClient extends abstractGraphQLClient_1.AbstractGraphQLClient
18
18
  this.path = this.GRAPHQL;
19
19
  return await this.post(request);
20
20
  }
21
- /**
22
- * @deprecated
23
- * Prefer using findProductsByQuery instead.
24
- */
25
21
  async findByQuery(query) {
26
22
  const queryStr = this.stringifyQuery(query);
27
23
  try {
@@ -36,50 +32,6 @@ class CatalogGraphQLClient extends abstractGraphQLClient_1.AbstractGraphQLClient
36
32
  }
37
33
  return null;
38
34
  }
39
- async findProductsByQuery(query) {
40
- const queryStr = this.stringifyQuery(query);
41
- try {
42
- return await this.find(queryStr);
43
- }
44
- catch (error) {
45
- const exception = this.mapToPublicApiException(error);
46
- const { mustRetry } = await this.handleError(exception);
47
- if (mustRetry) {
48
- return await this.find(queryStr);
49
- }
50
- }
51
- return null;
52
- }
53
- async findOneProductByQuery(query) {
54
- this.path = this.GRAPHQL;
55
- const queryStr = this.stringifyQuery(query);
56
- try {
57
- return await this.post(queryStr);
58
- }
59
- catch (error) {
60
- const exception = this.mapToPublicApiException(error);
61
- const { mustRetry } = await this.handleError(exception);
62
- if (mustRetry) {
63
- return await this.post(queryStr);
64
- }
65
- }
66
- return null;
67
- }
68
- async findOnePriceBandByQuery(query) {
69
- this.path = this.GRAPHQL;
70
- const queryStr = this.stringifyQuery(query);
71
- try {
72
- return await this.post(queryStr);
73
- }
74
- catch (error) {
75
- const exception = this.mapToPublicApiException(error);
76
- const { mustRetry } = await this.handleError(exception);
77
- if (mustRetry) {
78
- return await this.post(queryStr);
79
- }
80
- }
81
- return null;
82
- }
83
35
  }
84
36
  exports.CatalogGraphQLClient = CatalogGraphQLClient;
85
37
  //# sourceMappingURL=catalogGraphQLClient.js.map
@@ -1,31 +1,12 @@
1
- import { QueryPriceBandArguments, QueryProductArguments } from './queryProductArguments';
2
- import { FiltersSchema, PaginationSchema, PriceBandSchema, ProductSchema } from './catalogGraphQLSchemas';
3
- import { Merge } from 'type-fest';
4
- /**
5
- * @deprecated
6
- * Prefer using CatalogQueries instead.
7
- */
1
+ import { QueryArguments } from './queryArguments';
2
+ import { FiltersSchema, PaginationSchema, ProductSchema } from './catalogGraphQLSchemas';
8
3
  export declare type CatalogQuery = {
9
4
  getProducts: GetPaginatedProductsQuery;
10
5
  };
11
- /**
12
- * Represent the Catalog Schema of Public API
13
- */
14
- export declare type CatalogQueries = {
15
- getProducts?: GetPaginatedProductsQuery;
16
- priceBand?: GetPriceBandQuery;
17
- product?: GetProductQuery;
18
- };
19
6
  export declare type GetPaginatedProductsQuery = {
20
- __args: QueryProductArguments;
7
+ __args: QueryArguments;
21
8
  filters?: FiltersSchema;
22
9
  pagination?: PaginationSchema;
23
10
  products?: ProductSchema;
24
11
  topOffers?: ProductSchema;
25
12
  };
26
- export declare type GetProductQuery = Merge<{
27
- __args: QueryProductArguments;
28
- }, ProductSchema>;
29
- export declare type GetPriceBandQuery = Merge<{
30
- __args: QueryPriceBandArguments;
31
- }, PriceBandSchema>;
@@ -1,10 +1,9 @@
1
- import { AttributeType, FiltersType, IdentifiersType, PaginationType, PriceBandType, PricesType, ProductType, PromotionType, RelatedOfferType } from './catalogGraphQLTypes';
1
+ import { AttributeType, FiltersType, IdentifiersType, PaginationType, PriceBandType, PricesType, ProductType, RelatedOfferType } from './catalogGraphQLTypes';
2
2
  import { Merge, Schema } from 'type-fest';
3
3
  export declare type PaginationSchema = Schema<PaginationType, boolean>;
4
4
  export declare type FiltersSchema = Schema<FiltersType, boolean>;
5
5
  declare type IdentifiersSchema = Schema<IdentifiersType, boolean>;
6
6
  declare type RelatedOfferSchema = Schema<RelatedOfferType, boolean>;
7
- declare type PromotionSchema = Schema<PromotionType, boolean>;
8
7
  /**
9
8
  * Field of type array are not handled by Schema, they must be overwritten
10
9
  */
@@ -14,7 +13,6 @@ declare type MissingFieldsOfProductSchema = {
14
13
  conversionOfferPrimaries?: IdentifiersSchema;
15
14
  relatedOffers?: RelatedOfferSchema;
16
15
  priceBand?: PriceBandSchema;
17
- promotions?: PromotionSchema;
18
16
  };
19
17
  export declare type ProductSchema = Merge<Schema<ProductType, boolean>, MissingFieldsOfProductSchema>;
20
18
  declare type AttributeSchema = Schema<AttributeType, boolean>;
@@ -22,7 +20,7 @@ declare type AttributeSchema = Schema<AttributeType, boolean>;
22
20
  * Field of type array are not handled by Schema, they must be overwritten
23
21
  */
24
22
  declare type MissingFieldsOfPriceBandSchema = {
25
- attributes?: AttributeSchema;
23
+ attributes?: Array<AttributeSchema>;
26
24
  };
27
25
  /**
28
26
  * No type corresponding
@@ -1,12 +1,6 @@
1
1
  export declare type GetProductsType = {
2
2
  getProducts?: PaginatedProductsType;
3
3
  };
4
- export declare type GetProductType = {
5
- product?: ProductType;
6
- };
7
- export declare type GetPriceBandType = {
8
- priceBand?: PriceBandType;
9
- };
10
4
  export declare type PaginatedProductsType = {
11
5
  filters?: Array<FiltersType>;
12
6
  pagination?: PaginationType;
@@ -46,7 +40,6 @@ export declare type ProductType = {
46
40
  baseOfferPrimaries?: Array<IdentifiersType>;
47
41
  assets?: AssetsType;
48
42
  environmentAvailability?: string;
49
- promotions?: Array<PromotionType>;
50
43
  marketplace?: string;
51
44
  isEnabled?: boolean;
52
45
  isTrial?: boolean;
@@ -160,8 +153,6 @@ export declare type PriceBandType = {
160
153
  prices?: PricesType;
161
154
  saleConstraints?: PriceBandSaleConstraintsType;
162
155
  uom?: UomType;
163
- promotionPrices?: PromotionPricesType;
164
- vendor?: VendorType;
165
156
  };
166
157
  export declare type PriceBandActionFlagsType = {
167
158
  canBeCancelled?: boolean;
@@ -180,10 +171,10 @@ export declare type BillingType = {
180
171
  type?: string;
181
172
  };
182
173
  export declare type DynamicAttributesType = {
174
+ diskSize?: string;
175
+ ram?: string;
183
176
  region?: string;
184
177
  vCpu?: string;
185
- ram?: string;
186
- diskSize?: string;
187
178
  reservationsAutofitGroup?: string;
188
179
  acu?: string;
189
180
  marketSegment?: string;
@@ -209,7 +200,6 @@ export declare type PricesType = {
209
200
  buy?: string;
210
201
  sell?: string;
211
202
  public?: string;
212
- vendorPricingSource?: VendorPricingSourceType;
213
203
  };
214
204
  export declare type PriceBandSaleConstraintsType = {
215
205
  availableDate?: string;
@@ -232,32 +222,3 @@ export declare type OfferResellersType = {
232
222
  export declare type ResellerType = {
233
223
  xspRef?: string;
234
224
  };
235
- export declare type PromotionPricesType = {
236
- promotionId?: string;
237
- prices?: PricesType;
238
- };
239
- export declare type VendorPricingSourceType = {
240
- currency?: string;
241
- changeRate?: number;
242
- prices?: PricesType;
243
- };
244
- export declare type PromotionType = {
245
- promotionId?: string;
246
- vendorSku?: string;
247
- marketplace?: string;
248
- name?: string;
249
- description?: string;
250
- isAutoApplicable?: boolean;
251
- startDate?: string;
252
- endDate?: string;
253
- promotionType?: string;
254
- pricingType?: string;
255
- pricingValue?: number;
256
- billing?: BillingType;
257
- minQuantity?: number;
258
- maxQuantity?: number;
259
- currency?: string;
260
- applicableUntil?: string;
261
- applicableFor?: number;
262
- checkEligibility?: boolean;
263
- };
@@ -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
+ };
@@ -7,4 +7,4 @@ var OperatorArgument;
7
7
  OperatorArgument["AND"] = "AND";
8
8
  OperatorArgument["BETWEEN"] = "BETWEEN";
9
9
  })(OperatorArgument = exports.OperatorArgument || (exports.OperatorArgument = {}));
10
- //# sourceMappingURL=queryProductArguments.js.map
10
+ //# sourceMappingURL=queryArguments.js.map
@@ -0,0 +1,42 @@
1
+ import { AbstractEntity } from '../../abstractEntity';
2
+ import { ChecksAggType, MarketplacesAggType, MonthlyTrendAggType, PaginationsType, PartnersAggType, PeriodsType, ScoreResultType, ScoresAggType, SeveritiesAggType } from '../types/securityScoreGraphQLTypes';
3
+ import { SecurityScoreQueries } from '../types/queryArguments';
4
+ export declare enum GetAdminDataFields {
5
+ COLUMN_CHECKS_AGG = "checksAgg",
6
+ COLUMN_MARKETPLACES_AGG = "marketplacesAgg",
7
+ COLUMN_MONTHLY_TREND_AGG = "monthlyTrendAgg",
8
+ COLUMN_PARTNERS_AGG = "partnersAgg",
9
+ COLUMN_PAGINATION = "pagination",
10
+ COLUMN_PERIOD = "period",
11
+ COLUMN_RESULTS = "results",
12
+ COLUMN_SCORES_AGG = "scoresAgg",
13
+ COLUMN_SEVERITIES_AGG = "severitiesAgg"
14
+ }
15
+ export declare type GetAdminDataType = {
16
+ [GetAdminDataFields.COLUMN_CHECKS_AGG]?: ChecksAggType;
17
+ [GetAdminDataFields.COLUMN_MARKETPLACES_AGG]?: MarketplacesAggType;
18
+ [GetAdminDataFields.COLUMN_MONTHLY_TREND_AGG]?: MonthlyTrendAggType;
19
+ [GetAdminDataFields.COLUMN_PARTNERS_AGG]?: PartnersAggType;
20
+ [GetAdminDataFields.COLUMN_PAGINATION]?: PaginationsType;
21
+ [GetAdminDataFields.COLUMN_PERIOD]?: PeriodsType;
22
+ [GetAdminDataFields.COLUMN_RESULTS]?: ScoreResultType[];
23
+ [GetAdminDataFields.COLUMN_SCORES_AGG]?: ScoresAggType;
24
+ [GetAdminDataFields.COLUMN_SEVERITIES_AGG]?: SeveritiesAggType;
25
+ };
26
+ export declare type GetAdminDataGraphQLResultType = {
27
+ [SecurityScoreQueries.GET_ADMIN_DATA]: GetAdminDataType;
28
+ };
29
+ export declare class GetAdminData extends AbstractEntity<GetAdminDataType> {
30
+ #private;
31
+ constructor(getAdminDataInput: GetAdminDataType);
32
+ get checksAgg(): ChecksAggType | undefined;
33
+ get monthlyTrendAgg(): MonthlyTrendAggType | undefined;
34
+ get marketplacesAgg(): MarketplacesAggType | undefined;
35
+ get partnersAgg(): PartnersAggType | undefined;
36
+ get period(): PeriodsType | undefined;
37
+ get pagination(): PaginationsType | undefined;
38
+ get results(): ScoreResultType[] | undefined;
39
+ get scoresAgg(): ScoresAggType | undefined;
40
+ get severitiesAgg(): SeveritiesAggType | undefined;
41
+ toJSON(): GetAdminDataType;
42
+ }
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
3
+ if (kind === "m") throw new TypeError("Private method is not writable");
4
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
5
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
6
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
7
+ };
8
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
9
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
11
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
12
+ };
13
+ var _GetAdminData_checksAgg, _GetAdminData_marketplacesAgg, _GetAdminData_monthlyTrendAgg, _GetAdminData_partnersAgg, _GetAdminData_period, _GetAdminData_pagination, _GetAdminData_results, _GetAdminData_scoresAgg, _GetAdminData_severitiesAgg;
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.GetAdminData = exports.GetAdminDataFields = void 0;
16
+ const abstractEntity_1 = require("../../abstractEntity");
17
+ const queryArguments_1 = require("../types/queryArguments");
18
+ var GetAdminDataFields;
19
+ (function (GetAdminDataFields) {
20
+ GetAdminDataFields["COLUMN_CHECKS_AGG"] = "checksAgg";
21
+ GetAdminDataFields["COLUMN_MARKETPLACES_AGG"] = "marketplacesAgg";
22
+ GetAdminDataFields["COLUMN_MONTHLY_TREND_AGG"] = "monthlyTrendAgg";
23
+ GetAdminDataFields["COLUMN_PARTNERS_AGG"] = "partnersAgg";
24
+ GetAdminDataFields["COLUMN_PAGINATION"] = "pagination";
25
+ GetAdminDataFields["COLUMN_PERIOD"] = "period";
26
+ GetAdminDataFields["COLUMN_RESULTS"] = "results";
27
+ GetAdminDataFields["COLUMN_SCORES_AGG"] = "scoresAgg";
28
+ GetAdminDataFields["COLUMN_SEVERITIES_AGG"] = "severitiesAgg";
29
+ })(GetAdminDataFields = exports.GetAdminDataFields || (exports.GetAdminDataFields = {}));
30
+ class GetAdminData extends abstractEntity_1.AbstractEntity {
31
+ constructor(getAdminDataInput) {
32
+ super(getAdminDataInput);
33
+ _GetAdminData_checksAgg.set(this, void 0);
34
+ _GetAdminData_marketplacesAgg.set(this, void 0);
35
+ _GetAdminData_monthlyTrendAgg.set(this, void 0);
36
+ _GetAdminData_partnersAgg.set(this, void 0);
37
+ _GetAdminData_period.set(this, void 0);
38
+ _GetAdminData_pagination.set(this, void 0);
39
+ _GetAdminData_results.set(this, void 0);
40
+ _GetAdminData_scoresAgg.set(this, void 0);
41
+ _GetAdminData_severitiesAgg.set(this, void 0);
42
+ __classPrivateFieldSet(this, _GetAdminData_checksAgg, getAdminDataInput[GetAdminDataFields.COLUMN_CHECKS_AGG], "f");
43
+ __classPrivateFieldSet(this, _GetAdminData_marketplacesAgg, getAdminDataInput[GetAdminDataFields.COLUMN_MARKETPLACES_AGG], "f");
44
+ __classPrivateFieldSet(this, _GetAdminData_monthlyTrendAgg, getAdminDataInput[GetAdminDataFields.COLUMN_MONTHLY_TREND_AGG], "f");
45
+ __classPrivateFieldSet(this, _GetAdminData_partnersAgg, getAdminDataInput[GetAdminDataFields.COLUMN_PARTNERS_AGG], "f");
46
+ __classPrivateFieldSet(this, _GetAdminData_period, getAdminDataInput[GetAdminDataFields.COLUMN_PERIOD], "f");
47
+ __classPrivateFieldSet(this, _GetAdminData_pagination, getAdminDataInput[GetAdminDataFields.COLUMN_PAGINATION], "f");
48
+ __classPrivateFieldSet(this, _GetAdminData_results, getAdminDataInput[GetAdminDataFields.COLUMN_RESULTS], "f");
49
+ __classPrivateFieldSet(this, _GetAdminData_scoresAgg, getAdminDataInput[GetAdminDataFields.COLUMN_SCORES_AGG], "f");
50
+ __classPrivateFieldSet(this, _GetAdminData_severitiesAgg, getAdminDataInput[GetAdminDataFields.COLUMN_SEVERITIES_AGG], "f");
51
+ }
52
+ get checksAgg() {
53
+ return __classPrivateFieldGet(this, _GetAdminData_checksAgg, "f");
54
+ }
55
+ get monthlyTrendAgg() {
56
+ return __classPrivateFieldGet(this, _GetAdminData_monthlyTrendAgg, "f");
57
+ }
58
+ get marketplacesAgg() {
59
+ return __classPrivateFieldGet(this, _GetAdminData_marketplacesAgg, "f");
60
+ }
61
+ get partnersAgg() {
62
+ return __classPrivateFieldGet(this, _GetAdminData_partnersAgg, "f");
63
+ }
64
+ get period() {
65
+ return __classPrivateFieldGet(this, _GetAdminData_period, "f");
66
+ }
67
+ get pagination() {
68
+ return __classPrivateFieldGet(this, _GetAdminData_pagination, "f");
69
+ }
70
+ get results() {
71
+ return __classPrivateFieldGet(this, _GetAdminData_results, "f");
72
+ }
73
+ get scoresAgg() {
74
+ return __classPrivateFieldGet(this, _GetAdminData_scoresAgg, "f");
75
+ }
76
+ get severitiesAgg() {
77
+ return __classPrivateFieldGet(this, _GetAdminData_severitiesAgg, "f");
78
+ }
79
+ toJSON() {
80
+ return {
81
+ [GetAdminDataFields.COLUMN_CHECKS_AGG]: this.checksAgg,
82
+ [GetAdminDataFields.COLUMN_MARKETPLACES_AGG]: this.marketplacesAgg,
83
+ [GetAdminDataFields.COLUMN_MONTHLY_TREND_AGG]: this.monthlyTrendAgg,
84
+ [GetAdminDataFields.COLUMN_PARTNERS_AGG]: this.partnersAgg,
85
+ [GetAdminDataFields.COLUMN_PERIOD]: this.period,
86
+ [GetAdminDataFields.COLUMN_PAGINATION]: this.pagination,
87
+ [GetAdminDataFields.COLUMN_RESULTS]: this.results,
88
+ [GetAdminDataFields.COLUMN_SCORES_AGG]: this.scoresAgg,
89
+ [GetAdminDataFields.COLUMN_SEVERITIES_AGG]: this.severitiesAgg,
90
+ };
91
+ }
92
+ }
93
+ exports.GetAdminData = GetAdminData;
94
+ _GetAdminData_checksAgg = new WeakMap(), _GetAdminData_marketplacesAgg = new WeakMap(), _GetAdminData_monthlyTrendAgg = new WeakMap(), _GetAdminData_partnersAgg = new WeakMap(), _GetAdminData_period = new WeakMap(), _GetAdminData_pagination = new WeakMap(), _GetAdminData_results = new WeakMap(), _GetAdminData_scoresAgg = new WeakMap(), _GetAdminData_severitiesAgg = new WeakMap();
95
+ //# sourceMappingURL=getAdminData.js.map
@@ -2,6 +2,7 @@ export * from './securityScoreGraphQLClient';
2
2
  export * from './types/securityScoreGraphQLQueries';
3
3
  export * from './types/securityScoreGraphQLTypes';
4
4
  export * from './types/queryArguments';
5
+ export * from './entities/getAdminData';
5
6
  export * from './entities/getPartnerData';
6
7
  export * from './entities/getCustomerData';
7
8
  export * from './entities/getCustomerAccountData';
@@ -18,6 +18,7 @@ __exportStar(require("./securityScoreGraphQLClient"), exports);
18
18
  __exportStar(require("./types/securityScoreGraphQLQueries"), exports);
19
19
  __exportStar(require("./types/securityScoreGraphQLTypes"), exports);
20
20
  __exportStar(require("./types/queryArguments"), exports);
21
+ __exportStar(require("./entities/getAdminData"), exports);
21
22
  __exportStar(require("./entities/getPartnerData"), exports);
22
23
  __exportStar(require("./entities/getCustomerData"), exports);
23
24
  __exportStar(require("./entities/getCustomerAccountData"), exports);
@@ -2,7 +2,8 @@ import { AbstractGraphQLClient } from '../abstractGraphQLClient';
2
2
  import { GetPartnerDataType } from './entities/getPartnerData';
3
3
  import { GetCustomerDataType } from './entities/getCustomerData';
4
4
  import { GetCustomerAccountDataType } from './entities/getCustomerAccountData';
5
- import { GetPartnerDataQuery, GetCustomerDataQuery, GetCustomerAccountDataQuery } from './types/securityScoreGraphQLQueries';
5
+ import { GetPartnerDataQuery, GetCustomerDataQuery, GetCustomerAccountDataQuery, GetAdminDataQuery } from './types/securityScoreGraphQLQueries';
6
+ import { GetAdminDataType } from './entities/getAdminData';
6
7
  export declare class SecurityScoreGraphQLClient extends AbstractGraphQLClient {
7
8
  /**
8
9
  * The base path of the API
@@ -14,6 +15,7 @@ export declare class SecurityScoreGraphQLClient extends AbstractGraphQLClient {
14
15
  private GRAPHQL;
15
16
  find<GraphQLResponseTypes>(request: string): Promise<GraphQLResponseTypes | null>;
16
17
  getPartnerData(getPartnerDataQuery: GetPartnerDataQuery): Promise<GetPartnerDataType | null>;
18
+ getAdminData(getAdminDataQuery: GetAdminDataQuery): Promise<GetAdminDataType | null>;
17
19
  getCustomerData(getCustomerDataQuery: GetCustomerDataQuery): Promise<GetCustomerDataType | null>;
18
20
  getCustomerAccountData(getCustomerAccountDataQuery: GetCustomerAccountDataQuery): Promise<GetCustomerAccountDataType | null>;
19
21
  }
@@ -6,6 +6,7 @@ const getPartnerData_1 = require("./entities/getPartnerData");
6
6
  const getCustomerData_1 = require("./entities/getCustomerData");
7
7
  const getCustomerAccountData_1 = require("./entities/getCustomerAccountData");
8
8
  const queryArguments_1 = require("./types/queryArguments");
9
+ const getAdminData_1 = require("./entities/getAdminData");
9
10
  class SecurityScoreGraphQLClient extends abstractGraphQLClient_1.AbstractGraphQLClient {
10
11
  constructor() {
11
12
  super(...arguments);
@@ -40,6 +41,14 @@ class SecurityScoreGraphQLClient extends abstractGraphQLClient_1.AbstractGraphQL
40
41
  }
41
42
  return null;
42
43
  }
44
+ async getAdminData(getAdminDataQuery) {
45
+ const queryStr = this.stringifyQuery(getAdminDataQuery);
46
+ const getAdminDataResult = await this.find(queryStr);
47
+ if (getAdminDataResult) {
48
+ return new getAdminData_1.GetAdminData(getAdminDataResult[queryArguments_1.SecurityScoreQueries.GET_ADMIN_DATA]).toJSON();
49
+ }
50
+ return null;
51
+ }
43
52
  async getCustomerData(getCustomerDataQuery) {
44
53
  const queryStr = this.stringifyQuery(getCustomerDataQuery);
45
54
  const getCustomerDataResult = await this.find(queryStr);
@@ -75,6 +75,7 @@ export declare enum SortFields {
75
75
  ORDER = "order"
76
76
  }
77
77
  export declare enum SecurityScoreQueries {
78
+ GET_ADMIN_DATA = "getAdminData",
78
79
  GET_PARTNER_DATA = "getPartnerData",
79
80
  GET_CUSTOMER_DATA = "getCustomerData",
80
81
  GET_CUSTOMER_ACCOUNT_DATA = "getCustomerAccountData"
@@ -86,6 +86,7 @@ var SortFields;
86
86
  })(SortFields = exports.SortFields || (exports.SortFields = {}));
87
87
  var SecurityScoreQueries;
88
88
  (function (SecurityScoreQueries) {
89
+ SecurityScoreQueries["GET_ADMIN_DATA"] = "getAdminData";
89
90
  SecurityScoreQueries["GET_PARTNER_DATA"] = "getPartnerData";
90
91
  SecurityScoreQueries["GET_CUSTOMER_DATA"] = "getCustomerData";
91
92
  SecurityScoreQueries["GET_CUSTOMER_ACCOUNT_DATA"] = "getCustomerAccountData";
@@ -1,8 +1,9 @@
1
1
  import { SearchBodyArgument, PaginateArgument, SecurityScoreQueries } from './queryArguments';
2
- import { AccountsAggSchema, ChecksAggSchema, EndCustomersAggSchema, MonthlyTrendAggSchema, PaginationSchema, PeriodsSchema, ScoreResultSchema, ScoresAggSchema, SeveritiesAggSchema, StandardsAggSchema, StandardWithCheckSchema, MarketplacesAggSchema } from './securityScoreGraphQLSchemas';
2
+ import { AccountsAggSchema, ChecksAggSchema, EndCustomersAggSchema, MonthlyTrendAggSchema, PaginationSchema, PeriodsSchema, ScoreResultSchema, ScoresAggSchema, SeveritiesAggSchema, StandardsAggSchema, StandardWithCheckSchema, MarketplacesAggSchema, PartnersAggSchema } from './securityScoreGraphQLSchemas';
3
3
  import { GetPartnerDataFields } from '../entities/getPartnerData';
4
4
  import { GetCustomerDataFields } from '../entities/getCustomerData';
5
5
  import { GetCustomerAccountDataFields } from '../entities/getCustomerAccountData';
6
+ import { GetAdminDataFields } from '../entities/getAdminData';
6
7
  export declare type GetPartnerDataQuery = {
7
8
  [SecurityScoreQueries.GET_PARTNER_DATA]: {
8
9
  __args?: {
@@ -55,3 +56,20 @@ export declare type GetCustomerAccountDataQuery = {
55
56
  [GetCustomerAccountDataFields.COLUMN_STANDARDS]?: StandardWithCheckSchema;
56
57
  };
57
58
  };
59
+ export declare type GetAdminDataQuery = {
60
+ [SecurityScoreQueries.GET_ADMIN_DATA]: {
61
+ __args?: {
62
+ searchBody?: SearchBodyArgument;
63
+ paginate?: PaginateArgument;
64
+ };
65
+ [GetAdminDataFields.COLUMN_CHECKS_AGG]?: ChecksAggSchema;
66
+ [GetAdminDataFields.COLUMN_MARKETPLACES_AGG]?: MarketplacesAggSchema;
67
+ [GetAdminDataFields.COLUMN_MONTHLY_TREND_AGG]?: MonthlyTrendAggSchema;
68
+ [GetAdminDataFields.COLUMN_PARTNERS_AGG]?: PartnersAggSchema;
69
+ [GetAdminDataFields.COLUMN_PAGINATION]?: PaginationSchema;
70
+ [GetAdminDataFields.COLUMN_PERIOD]?: PeriodsSchema;
71
+ [GetAdminDataFields.COLUMN_RESULTS]?: ScoreResultSchema;
72
+ [GetPartnerDataFields.COLUMN_SCORES_AGG]?: ScoresAggSchema;
73
+ [GetPartnerDataFields.COLUMN_SEVERITIES_AGG]?: SeveritiesAggSchema;
74
+ };
75
+ };
@@ -4,4 +4,5 @@ const queryArguments_1 = require("./queryArguments");
4
4
  const getPartnerData_1 = require("../entities/getPartnerData");
5
5
  const getCustomerData_1 = require("../entities/getCustomerData");
6
6
  const getCustomerAccountData_1 = require("../entities/getCustomerAccountData");
7
+ const getAdminData_1 = require("../entities/getAdminData");
7
8
  //# sourceMappingURL=securityScoreGraphQLQueries.js.map
@@ -1,5 +1,5 @@
1
1
  import { Merge, Schema } from 'type-fest';
2
- import { AccountType, CheckType, FilterValuesType, MonthlyTrendAggType, PeriodsType, RegistrationType, StandardAggType, StandardType, EndCustomerByDateAggType, AccountByDateAggType, CheckAggType, PaginationsType, ScoreByDateAggType, StandardWithCheckType, ChecksByStandardType, CheckByDateType, NameCountByDateAggType, EndCustomerAggType, SeverityAggType, AccountAggType, StandardByDateAggType, ScoreByMonthAggType, ScoresAggType, MarketplaceAggType, MarketplaceByDateAggType, MarketplacePartnerAggType, MarketplacePartnerAggByDateAggType } from './securityScoreGraphQLTypes';
2
+ import { AccountType, CheckType, FilterValuesType, MonthlyTrendAggType, PeriodsType, RegistrationType, StandardAggType, StandardType, EndCustomerByDateAggType, AccountByDateAggType, CheckAggType, PaginationsType, ScoreByDateAggType, StandardWithCheckType, ChecksByStandardType, CheckByDateType, NameCountByDateAggType, EndCustomerAggType, SeverityAggType, AccountAggType, StandardByDateAggType, ScoreByMonthAggType, ScoresAggType, MarketplaceAggType, MarketplaceByDateAggType, MarketplacePartnerAggType, MarketplacePartnerAggByDateAggType, CheckCountByDateAggType, PartnerByDateAggType, PartnerAggType } from './securityScoreGraphQLTypes';
3
3
  declare type MissingFieldsOfMonthlyTrendAggSchema = {
4
4
  scores?: Schema<ScoreByMonthAggType, boolean>;
5
5
  };
@@ -27,12 +27,16 @@ export declare type FilterSchema = {
27
27
  values?: FilterValuesSchema;
28
28
  };
29
29
  declare type NameCountByDateAggSchema = Schema<NameCountByDateAggType, boolean>;
30
- declare type MissingFieldsInCheckDataAggSchema = {
30
+ declare type MissingFieldsInSeverityAggSchema = {
31
31
  data?: NameCountByDateAggSchema;
32
32
  };
33
- declare type CheckAggAggSchema = Merge<Schema<CheckAggType, boolean>, MissingFieldsInCheckDataAggSchema>;
33
+ declare type CheckCountByDateAggSchema = Schema<CheckCountByDateAggType, boolean>;
34
+ declare type MissingFieldsInCheckAggSchema = {
35
+ data?: CheckCountByDateAggSchema;
36
+ };
37
+ declare type CheckAggSchema = Merge<Schema<CheckAggType, boolean>, MissingFieldsInCheckAggSchema>;
34
38
  export declare type ChecksAggSchema = {
35
- checks?: CheckAggAggSchema;
39
+ checks?: CheckAggSchema;
36
40
  };
37
41
  export declare type PeriodsSchema = Schema<PeriodsType, boolean>;
38
42
  declare type CheckSchema = Schema<CheckType, boolean>;
@@ -49,7 +53,7 @@ export declare type ScoreResultSchema = {
49
53
  account?: AccountSchema;
50
54
  registration?: RegistrationSchema;
51
55
  };
52
- export declare type SeverityAggSchema = Merge<Schema<SeverityAggType, boolean>, MissingFieldsInCheckDataAggSchema>;
56
+ export declare type SeverityAggSchema = Merge<Schema<SeverityAggType, boolean>, MissingFieldsInSeverityAggSchema>;
53
57
  export declare type SeveritiesAggSchema = {
54
58
  severities?: SeverityAggSchema;
55
59
  };
@@ -89,4 +93,12 @@ declare type MarketplaceAggSchema = Merge<Schema<MarketplaceAggType, boolean>, M
89
93
  export declare type MarketplacesAggSchema = {
90
94
  marketplaces?: MarketplaceAggSchema;
91
95
  };
96
+ declare type PartnerByDateAggTypeSchema = Schema<PartnerByDateAggType, boolean>;
97
+ declare type MissingFieldsInPartnerAggSchema = {
98
+ data?: PartnerByDateAggTypeSchema;
99
+ };
100
+ declare type PartnerAggSchema = Merge<Schema<PartnerAggType, boolean>, MissingFieldsInPartnerAggSchema>;
101
+ export declare type PartnersAggSchema = {
102
+ partners?: PartnerAggSchema;
103
+ };
92
104
  export {};
@@ -81,9 +81,16 @@ export declare type SeverityAggType = {
81
81
  export declare type SeveritiesAggType = {
82
82
  severities: SeverityAggType[];
83
83
  };
84
+ export declare type CheckCountByDateAggType = {
85
+ count?: number;
86
+ accounts?: number;
87
+ customers?: number;
88
+ partners?: number;
89
+ date?: string;
90
+ };
84
91
  export declare type CheckAggType = {
85
- data?: NameCountByDateAggType[];
86
- last?: NameCountByDateAggType;
92
+ data?: CheckCountByDateAggType[];
93
+ last?: CheckCountByDateAggType;
87
94
  name?: string;
88
95
  progression?: number;
89
96
  reference?: string;
@@ -111,6 +118,23 @@ export declare type EndCustomerAggType = {
111
118
  export declare type EndCustomersAggType = {
112
119
  customers: EndCustomerAggType[];
113
120
  };
121
+ export declare type PartnerByDateAggType = {
122
+ avgCurrentScore?: number;
123
+ date?: string;
124
+ failed?: number;
125
+ passed?: number;
126
+ total?: number;
127
+ };
128
+ export declare type PartnerAggType = {
129
+ data?: PartnerByDateAggType[];
130
+ last?: PartnerByDateAggType;
131
+ name?: string;
132
+ progression?: number;
133
+ reference?: string;
134
+ };
135
+ export declare type PartnersAggType = {
136
+ partners?: PartnerAggType[];
137
+ };
114
138
  export declare type ScoreByMonthAggType = {
115
139
  avgCurrentScore?: number;
116
140
  date?: string;
@@ -165,19 +189,12 @@ export declare type StandardAggType = {
165
189
  export declare type StandardsAggType = {
166
190
  standards: StandardAggType[];
167
191
  };
168
- export declare type MarketplaceSubscriptionReferenceAggType = {
169
- accounts?: number;
170
- avgCurrentScore?: number;
171
- name?: string;
172
- };
173
- export declare type MarketplaceSubscriptionReferencesAggType = {
174
- subscriptionReferences?: MarketplaceSubscriptionReferenceAggType[];
175
- };
176
192
  export declare type MarketplacePartnerAggByDateAggType = {
177
- accounts?: number;
178
193
  avgCurrentScore?: number;
179
194
  date?: string;
180
- subscriptionReferencesAgg?: MarketplaceSubscriptionReferencesAggType;
195
+ failed?: number;
196
+ passed?: number;
197
+ total?: number;
181
198
  };
182
199
  export declare type MarketplaceByDateAggType = {
183
200
  avgCurrentScore?: number;
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.40.0-rc-jpb.2",
7
+ "version": "3.40.0-rc.bdj.1",
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,7 +0,0 @@
1
- import { PriceBandType, ProductType } from './catalogGraphQLTypes';
2
- export declare type FindOneProductQueryOutput = {
3
- product: ProductType;
4
- };
5
- export declare type FindOnePriceBandQueryOutput = {
6
- priceBand: PriceBandType;
7
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=FindOneProductQueryOutput.js.map
@@ -1,62 +0,0 @@
1
- /**
2
- * For field __args
3
- */
4
- export declare type QueryProductArguments = {
5
- paginate?: PaginateArgument;
6
- searchBody: SearchBodyArgument;
7
- };
8
- /**
9
- * For field __args
10
- */
11
- export declare type QueryPriceBandArguments = {
12
- paginate?: PaginateArgument;
13
- searchBody: SearchBodyPriceBandsArgument;
14
- };
15
- export declare type PaginateArgument = {
16
- page: number;
17
- perPage: number;
18
- };
19
- export declare type SearchBodyPriceBandsArgument = {
20
- keywords?: string;
21
- filters?: SearchProductFilterArgument[];
22
- exclusionFilters?: SearchProductFilterArgument[];
23
- sort?: SortArgument;
24
- highlight?: boolean;
25
- aggregatorFilter?: string[];
26
- marketplace?: string;
27
- resellerRef?: string;
28
- endCustomerRef?: string;
29
- restricted?: boolean;
30
- getFamilies?: boolean;
31
- quantity?: number;
32
- };
33
- export declare type SearchBodyArgument = {
34
- aggregatorFilter?: string[];
35
- endCustomerRef?: string;
36
- exclusionFilters?: SearchProductFilterArgument[];
37
- filters?: SearchProductFilterArgument[];
38
- getFamilies?: boolean;
39
- highlight?: boolean;
40
- keywords?: string;
41
- marketplace?: string;
42
- quantity?: number;
43
- resellerRef?: string;
44
- restricted?: boolean;
45
- sort?: SortArgument;
46
- topOffers?: boolean;
47
- };
48
- export declare type SearchProductFilterArgument = {
49
- name: string;
50
- value: string | string[];
51
- operator?: OperatorArgument;
52
- filters?: SearchProductFilterArgument[];
53
- };
54
- export declare enum OperatorArgument {
55
- OR = "OR",
56
- AND = "AND",
57
- BETWEEN = "BETWEEN"
58
- }
59
- export declare type SortArgument = {
60
- name?: string;
61
- order?: string;
62
- };