@arrowsphere/api-client 3.56.0 → 3.57.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,7 +4,15 @@ 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
6
 
7
+ ## [3.57.0] - 2023-10-10
8
+
9
+ ### Changed
10
+ - add method findPriceBandsByQuery
11
+
12
+
7
13
  ## [3.56.0] - 2023-10-05
14
+
15
+ ### Changed
8
16
  - The **security** endpoint is now considered deprecrated.
9
17
  - Add the **register** and **standards** functions that used the **security** endpoint in the wellArchitected one.
10
18
 
@@ -1,5 +1,5 @@
1
1
  import { AbstractGraphQLClient } from '../abstractGraphQLClient';
2
- import { GetExchangeRatesType, GetExchangeRateValueType, GetPriceBandType, GetProductsType, GetProductType } from './types/catalogGraphQLTypes';
2
+ import { GetExchangeRatesType, GetExchangeRateValueType, GetPriceBandsType, GetPriceBandType, GetProductsType, GetProductType } from './types/catalogGraphQLTypes';
3
3
  import { CatalogQueries, CatalogQuery } from './types/catalogGraphQLQueries';
4
4
  export declare class CatalogGraphQLClient extends AbstractGraphQLClient {
5
5
  /**
@@ -19,6 +19,7 @@ export declare class CatalogGraphQLClient extends AbstractGraphQLClient {
19
19
  findProductsByQuery(query: Pick<CatalogQueries, 'getProducts'>): Promise<GetProductsType | null>;
20
20
  findOneProductByQuery(query: Pick<CatalogQueries, 'product'>): Promise<GetProductType | null>;
21
21
  findOnePriceBandByQuery(query: Pick<CatalogQueries, 'priceBand'>): Promise<GetPriceBandType | null>;
22
+ findPriceBandsByQuery(query: Pick<CatalogQueries, 'getPriceBands'>): Promise<GetPriceBandsType | null>;
22
23
  getExchangeRates(query: Pick<CatalogQueries, 'getExchangeRates'>): Promise<GetExchangeRatesType | null>;
23
24
  findExchangeRateValue(query: Pick<CatalogQueries, 'exchangeRate'>): Promise<GetExchangeRateValueType | null>;
24
25
  }
@@ -60,6 +60,16 @@ class CatalogGraphQLClient extends abstractGraphQLClient_1.AbstractGraphQLClient
60
60
  return null;
61
61
  }
62
62
  }
63
+ async findPriceBandsByQuery(query) {
64
+ this.path = this.GRAPHQL;
65
+ const queryStr = this.stringifyQuery(query);
66
+ try {
67
+ return await this.post(queryStr);
68
+ }
69
+ catch (error) {
70
+ return null;
71
+ }
72
+ }
63
73
  async getExchangeRates(query) {
64
74
  this.path = this.GRAPHQL;
65
75
  const queryStr = this.stringifyQuery(query);
@@ -5,6 +5,11 @@ export declare type FindOneProductQueryOutput = {
5
5
  export declare type FindOnePriceBandQueryOutput = {
6
6
  priceBand: PriceBandType;
7
7
  };
8
+ export declare type FindPriceBandsQueryOutput = {
9
+ getPriceBands: {
10
+ priceBands: PriceBandType[];
11
+ };
12
+ };
8
13
  export declare type FindExchangeRatesQueryOutput = {
9
14
  exchangeRates: ExchangeRateType[];
10
15
  };
@@ -14,6 +14,7 @@ export declare type CatalogQuery = {
14
14
  export declare type CatalogQueries = {
15
15
  getExchangeRates?: GetExchangeRatesQuery;
16
16
  exchangeRate?: GetExchangeRateValueQuery;
17
+ getPriceBands?: GetPriceBandsQuery;
17
18
  getProducts?: GetPaginatedProductsQuery;
18
19
  priceBand?: GetPriceBandQuery;
19
20
  product?: GetProductQuery;
@@ -31,6 +32,11 @@ export declare type GetProductQuery = Merge<{
31
32
  export declare type GetPriceBandQuery = Merge<{
32
33
  __args: QueryPriceBandArguments;
33
34
  }, PriceBandSchema>;
35
+ export declare type GetPriceBandsQuery = Merge<{
36
+ __args: QueryPriceBandArguments;
37
+ }, {
38
+ priceBands: PriceBandSchema;
39
+ }>;
34
40
  export declare type GetExchangeRatesQuery = Merge<{
35
41
  __args: QueryExchangeRatesArguments;
36
42
  }, ExchangeRateSchema>;
@@ -1,7 +1,8 @@
1
- import { AttributeType, ExchangeRateType, ExchangeRateValueType, FiltersType, IdentifiersType, PaginationType, PriceBandType, PricesType, ProductType, PromotionType, RelatedOfferType } from './catalogGraphQLTypes';
1
+ import { AttributesParameters, AttributeType, ExchangeRateType, ExchangeRateValueType, FiltersType, IdentifiersType, PaginationType, PriceBandType, PricesType, ProductType, PromotionType, 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
+ declare type AttributesParametersSchema = Schema<AttributesParameters, boolean>;
5
6
  declare type IdentifiersSchema = Schema<IdentifiersType, boolean>;
6
7
  declare type RelatedOfferSchema = Schema<RelatedOfferType, boolean>;
7
8
  declare type PromotionSchema = Schema<PromotionType, boolean>;
@@ -10,6 +11,7 @@ declare type PromotionSchema = Schema<PromotionType, boolean>;
10
11
  */
11
12
  declare type MissingFieldsOfProductSchema = {
12
13
  addonPrimaries?: IdentifiersSchema;
14
+ attributesParameters?: AttributesParametersSchema;
13
15
  baseOfferPrimaries?: IdentifiersSchema;
14
16
  conversionOfferPrimaries?: IdentifiersSchema;
15
17
  relatedOffers?: RelatedOfferSchema;
@@ -7,6 +7,11 @@ export declare type GetProductType = {
7
7
  export declare type GetPriceBandType = {
8
8
  priceBand?: PriceBandType;
9
9
  };
10
+ export declare type GetPriceBandsType = {
11
+ getPriceBands: {
12
+ priceBands: PriceBandType[];
13
+ };
14
+ };
10
15
  export declare type GetExchangeRatesType = {
11
16
  exchangeRates?: ExchangeRateType[];
12
17
  };
@@ -214,11 +219,17 @@ export declare type PriceBandVendorIdentifierType = {
214
219
  purchasePlan?: string;
215
220
  sku?: string;
216
221
  };
222
+ export declare enum PricesTypeKeys {
223
+ BUY_KEY = "buy",
224
+ SELL_KEY = "sell",
225
+ PUBLIC_KEY = "public",
226
+ VENDOR_PRICING_SOURCE_KEY = "vendorPricingSource"
227
+ }
217
228
  export declare type PricesType = {
218
- buy?: string;
219
- sell?: string;
220
- public?: string;
221
- vendorPricingSource?: VendorPricingSourceType;
229
+ [PricesTypeKeys.BUY_KEY]?: string;
230
+ [PricesTypeKeys.SELL_KEY]?: string;
231
+ [PricesTypeKeys.PUBLIC_KEY]?: string;
232
+ [PricesTypeKeys.VENDOR_PRICING_SOURCE_KEY]?: VendorPricingSourceType;
222
233
  };
223
234
  export declare type PriceBandSaleConstraintsType = {
224
235
  availableDate?: string;
@@ -1,4 +1,12 @@
1
1
  "use strict";
2
2
  // Here are the types, they are useful to have exact types of the responses
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.PricesTypeKeys = void 0;
5
+ var PricesTypeKeys;
6
+ (function (PricesTypeKeys) {
7
+ PricesTypeKeys["BUY_KEY"] = "buy";
8
+ PricesTypeKeys["SELL_KEY"] = "sell";
9
+ PricesTypeKeys["PUBLIC_KEY"] = "public";
10
+ PricesTypeKeys["VENDOR_PRICING_SOURCE_KEY"] = "vendorPricingSource";
11
+ })(PricesTypeKeys = exports.PricesTypeKeys || (exports.PricesTypeKeys = {}));
4
12
  //# sourceMappingURL=catalogGraphQLTypes.js.map
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.56.0",
7
+ "version": "3.57.0",
8
8
  "description": "Node.js client for ArrowSphere's public API",
9
9
  "main": "build/index.js",
10
10
  "types": "build/index.d.ts",