@arrowsphere/api-client 3.56.0 → 3.57.1-rc.sdj.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
@@ -3,8 +3,20 @@
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
+ ## [Unreleased]
7
+
8
+ ### Added
9
+ - Add public api billing exports types client
10
+
11
+ ## [3.57.0] - 2023-10-10
12
+
13
+ ### Changed
14
+ - add method findPriceBandsByQuery
15
+
6
16
 
7
17
  ## [3.56.0] - 2023-10-05
18
+
19
+ ### Changed
8
20
  - The **security** endpoint is now considered deprecrated.
9
21
  - Add the **register** and **standards** functions that used the **security** endpoint in the wellArchitected one.
10
22
 
@@ -0,0 +1,10 @@
1
+ import { AbstractRestfulClient, Parameters } from '../abstractRestfulClient';
2
+ import { DataExportsTypes } from './entities/Erp/Export/Type/dataExportsTypes';
3
+ import { GetResult } from '../getResult';
4
+ export declare class BillingClient extends AbstractRestfulClient {
5
+ protected basePath: string;
6
+ /**
7
+ * To get all the erp exports types
8
+ */
9
+ getExportsTypes(parameters?: Parameters): Promise<GetResult<DataExportsTypes>>;
10
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BillingClient = void 0;
4
+ const abstractRestfulClient_1 = require("../abstractRestfulClient");
5
+ const dataExportsTypes_1 = require("./entities/Erp/Export/Type/dataExportsTypes");
6
+ const getResult_1 = require("../getResult");
7
+ class BillingClient extends abstractRestfulClient_1.AbstractRestfulClient {
8
+ constructor() {
9
+ super(...arguments);
10
+ this.basePath = '/billing';
11
+ }
12
+ /**
13
+ * To get all the erp exports types
14
+ */
15
+ async getExportsTypes(parameters = {}) {
16
+ this.path = `/erp/exports/types`;
17
+ return new getResult_1.GetResult(dataExportsTypes_1.DataExportsTypes, await this.get(parameters));
18
+ }
19
+ }
20
+ exports.BillingClient = BillingClient;
21
+ //# sourceMappingURL=BillingClient.js.map
@@ -0,0 +1,16 @@
1
+ import { AbstractEntity } from '../../../../../abstractEntity';
2
+ import { ExportType } from './exportType';
3
+ export declare enum DataExportsTypesFields {
4
+ COLUMN_EXPORTS_TYPES = "exportTypes"
5
+ }
6
+ export declare type DataExportsTypesType = {
7
+ [DataExportsTypesFields.COLUMN_EXPORTS_TYPES]: Array<{
8
+ [k: string]: string;
9
+ }>;
10
+ };
11
+ export declare class DataExportsTypes extends AbstractEntity<DataExportsTypesType> {
12
+ #private;
13
+ constructor(ExportsTypesDataInput: DataExportsTypesType);
14
+ get ExportsTypes(): Array<ExportType>;
15
+ toJSON(): DataExportsTypesType;
16
+ }
@@ -0,0 +1,42 @@
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 _DataExportsTypes_ExportsTypes;
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.DataExportsTypes = exports.DataExportsTypesFields = void 0;
16
+ const abstractEntity_1 = require("../../../../../abstractEntity");
17
+ const exportType_1 = require("./exportType");
18
+ var DataExportsTypesFields;
19
+ (function (DataExportsTypesFields) {
20
+ DataExportsTypesFields["COLUMN_EXPORTS_TYPES"] = "exportTypes";
21
+ })(DataExportsTypesFields = exports.DataExportsTypesFields || (exports.DataExportsTypesFields = {}));
22
+ class DataExportsTypes extends abstractEntity_1.AbstractEntity {
23
+ constructor(ExportsTypesDataInput) {
24
+ super(ExportsTypesDataInput);
25
+ _DataExportsTypes_ExportsTypes.set(this, void 0);
26
+ __classPrivateFieldSet(this, _DataExportsTypes_ExportsTypes, ExportsTypesDataInput[DataExportsTypesFields.COLUMN_EXPORTS_TYPES].map((result) => new exportType_1.ExportType({
27
+ name: Object.values(result)[0],
28
+ reference: Object.keys(result)[0],
29
+ })), "f");
30
+ }
31
+ get ExportsTypes() {
32
+ return __classPrivateFieldGet(this, _DataExportsTypes_ExportsTypes, "f");
33
+ }
34
+ toJSON() {
35
+ return {
36
+ [DataExportsTypesFields.COLUMN_EXPORTS_TYPES]: this.ExportsTypes.map((result) => result.toJSON()),
37
+ };
38
+ }
39
+ }
40
+ exports.DataExportsTypes = DataExportsTypes;
41
+ _DataExportsTypes_ExportsTypes = new WeakMap();
42
+ //# sourceMappingURL=dataExportsTypes.js.map
@@ -0,0 +1,16 @@
1
+ import { AbstractEntity } from '../../../../../abstractEntity';
2
+ export declare enum ExportTypeFields {
3
+ COLUMN_NAME = "name",
4
+ COLUMN_REFERENCE = "reference"
5
+ }
6
+ export declare type ExportTypeType = {
7
+ [ExportTypeFields.COLUMN_NAME]: string;
8
+ [ExportTypeFields.COLUMN_REFERENCE]: string;
9
+ };
10
+ export declare class ExportType extends AbstractEntity<ExportTypeType> {
11
+ #private;
12
+ constructor(getExportTypesDataInput: ExportTypeType);
13
+ get Name(): string;
14
+ get Reference(): string;
15
+ toJSON(): ExportTypeType;
16
+ }
@@ -0,0 +1,45 @@
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 _ExportType_name, _ExportType_reference;
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.ExportType = exports.ExportTypeFields = void 0;
16
+ const abstractEntity_1 = require("../../../../../abstractEntity");
17
+ var ExportTypeFields;
18
+ (function (ExportTypeFields) {
19
+ ExportTypeFields["COLUMN_NAME"] = "name";
20
+ ExportTypeFields["COLUMN_REFERENCE"] = "reference";
21
+ })(ExportTypeFields = exports.ExportTypeFields || (exports.ExportTypeFields = {}));
22
+ class ExportType extends abstractEntity_1.AbstractEntity {
23
+ constructor(getExportTypesDataInput) {
24
+ super(getExportTypesDataInput);
25
+ _ExportType_name.set(this, void 0);
26
+ _ExportType_reference.set(this, void 0);
27
+ __classPrivateFieldSet(this, _ExportType_name, getExportTypesDataInput[ExportTypeFields.COLUMN_NAME], "f");
28
+ __classPrivateFieldSet(this, _ExportType_reference, getExportTypesDataInput[ExportTypeFields.COLUMN_REFERENCE], "f");
29
+ }
30
+ get Name() {
31
+ return __classPrivateFieldGet(this, _ExportType_name, "f");
32
+ }
33
+ get Reference() {
34
+ return __classPrivateFieldGet(this, _ExportType_reference, "f");
35
+ }
36
+ toJSON() {
37
+ return {
38
+ [ExportTypeFields.COLUMN_NAME]: this.Name,
39
+ [ExportTypeFields.COLUMN_REFERENCE]: this.Reference,
40
+ };
41
+ }
42
+ }
43
+ exports.ExportType = ExportType;
44
+ _ExportType_name = new WeakMap(), _ExportType_reference = new WeakMap();
45
+ //# sourceMappingURL=exportType.js.map
@@ -0,0 +1,2 @@
1
+ export * from './BillingClient';
2
+ export * from './entities/Erp/Export/Type/exportType';
@@ -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("./BillingClient"), exports);
18
+ __exportStar(require("./entities/Erp/Export/Type/exportType"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -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.1-rc.sdj.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",