@arrowsphere/api-client 3.35.0-rc.ckh.1 → 3.35.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,11 +3,12 @@
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.35.0] - 2023-06-12
6
+
7
+ ## [3.35.0] - 2023-06-08
7
8
 
8
9
  ### Changed
9
10
 
10
- - Add extra information order
11
+ - Conditional logging of request and response
11
12
 
12
13
  ## [3.34.0] - 2023-05-10
13
14
 
@@ -7,6 +7,7 @@ export declare enum ParameterKeys {
7
7
  API_KEY = "apiKey",
8
8
  AUTHORIZATION = "Authorization",
9
9
  HEADERS = "headers",
10
+ IS_LOGGING = "is_logging",
10
11
  ORDER_BY = "order_by",
11
12
  PAGE = "page",
12
13
  PER_PAGE = "per_page",
@@ -32,6 +33,7 @@ export declare type Options = {
32
33
  export declare type ConfigurationsClient = {
33
34
  [ParameterKeys.API_KEY]?: string;
34
35
  [ParameterKeys.URL]?: string;
36
+ [ParameterKeys.IS_LOGGING]?: boolean;
35
37
  [ParameterKeys.HEADERS]?: Headers;
36
38
  };
37
39
  export declare type ExtraInformationType = {
@@ -17,6 +17,7 @@ var ParameterKeys;
17
17
  ParameterKeys["API_KEY"] = "apiKey";
18
18
  ParameterKeys["AUTHORIZATION"] = "Authorization";
19
19
  ParameterKeys["HEADERS"] = "headers";
20
+ ParameterKeys["IS_LOGGING"] = "is_logging";
20
21
  ParameterKeys["ORDER_BY"] = "order_by";
21
22
  ParameterKeys["PAGE"] = "page";
22
23
  ParameterKeys["PER_PAGE"] = "per_page";
@@ -52,7 +53,11 @@ class AbstractRestfulClient extends AbstractHttpClient_1.AbstractHttpClient {
52
53
  * Defines whether the pagination options are camel cased or not
53
54
  */
54
55
  this.isCamelPagination = false;
55
- this.client = axiosSingleton_1.AxiosSingleton.getInstance();
56
+ this.client = axiosSingleton_1.AxiosSingleton.getInstance({
57
+ isLogging: configuration
58
+ ? !!configuration[ParameterKeys.IS_LOGGING]
59
+ : false,
60
+ });
56
61
  this.setApiKey((_a = configuration === null || configuration === void 0 ? void 0 : configuration[ParameterKeys.API_KEY]) !== null && _a !== void 0 ? _a : '');
57
62
  this.setUrl((_b = configuration === null || configuration === void 0 ? void 0 : configuration[ParameterKeys.URL]) !== null && _b !== void 0 ? _b : '');
58
63
  this.setHeaders((_c = configuration === null || configuration === void 0 ? void 0 : configuration[ParameterKeys.HEADERS]) !== null && _c !== void 0 ? _c : {});
@@ -1,15 +1,21 @@
1
1
  import { AxiosInstance } from 'axios';
2
+ export declare type AxiosSingletonConfiguration = {
3
+ isLogging?: boolean;
4
+ };
2
5
  export declare class AxiosSingleton {
3
6
  private static _axiosInstance;
4
- static getInstance(): AxiosInstance;
7
+ private static _isLogging;
8
+ static getInstance(configuration?: AxiosSingletonConfiguration): AxiosInstance;
5
9
  private static _initializedRequestInterceptor;
6
10
  private static _initializedResponseInterceptor;
7
11
  /**
8
12
  * @param request - Axios Request
13
+ * @param isLogging - Must log
9
14
  */
10
15
  private static _handleRequest;
11
16
  /**
12
17
  * @param response - Axios Response
18
+ * @param isLogging - Must log
13
19
  */
14
20
  private static _handleResponse;
15
21
  /**
@@ -7,7 +7,8 @@ exports.AxiosSingleton = void 0;
7
7
  const axios_1 = __importDefault(require("axios"));
8
8
  const lodash_1 = require("lodash");
9
9
  class AxiosSingleton {
10
- static getInstance() {
10
+ static getInstance(configuration = {}) {
11
+ this._isLogging = !!configuration.isLogging;
11
12
  if (!AxiosSingleton._axiosInstance) {
12
13
  AxiosSingleton._axiosInstance = axios_1.default.create();
13
14
  AxiosSingleton._initializedRequestInterceptor();
@@ -17,23 +18,29 @@ class AxiosSingleton {
17
18
  return AxiosSingleton._axiosInstance;
18
19
  }
19
20
  static _initializedRequestInterceptor() {
20
- this._axiosInstance.interceptors.request.use(this._handleRequest);
21
+ this._axiosInstance.interceptors.request.use((req) => this._handleRequest(req, this._isLogging));
21
22
  }
22
23
  static _initializedResponseInterceptor() {
23
- this._axiosInstance.interceptors.response.use(this._handleResponse);
24
+ this._axiosInstance.interceptors.response.use((req) => this._handleResponse(req, this._isLogging));
24
25
  }
25
26
  /**
26
27
  * @param request - Axios Request
28
+ * @param isLogging - Must log
27
29
  */
28
- static _handleRequest(request) {
29
- console.info('AXIOS - Request : ', AxiosSingleton.cleanRequestLog(request));
30
+ static _handleRequest(request, isLogging = false) {
31
+ if (isLogging) {
32
+ console.info('AXIOS - Request : ', AxiosSingleton.cleanRequestLog(request));
33
+ }
30
34
  return request;
31
35
  }
32
36
  /**
33
37
  * @param response - Axios Response
38
+ * @param isLogging - Must log
34
39
  */
35
- static _handleResponse(response) {
36
- console.info('AXIOS - Response : ', AxiosSingleton.cleanResponseLog(response));
40
+ static _handleResponse(response, isLogging = false) {
41
+ if (isLogging) {
42
+ console.info('AXIOS - Response : ', AxiosSingleton.cleanResponseLog(response));
43
+ }
37
44
  return response;
38
45
  }
39
46
  /**
@@ -65,4 +72,5 @@ class AxiosSingleton {
65
72
  }
66
73
  }
67
74
  exports.AxiosSingleton = AxiosSingleton;
75
+ AxiosSingleton._isLogging = false;
68
76
  //# sourceMappingURL=axiosSingleton.js.map
@@ -2,7 +2,6 @@ import { AbstractEntity } from '../../../abstractEntity';
2
2
  import { OrderProduct, OrderProductsType } from './products/products';
3
3
  import { OrderPartner, OrderPartnerType } from './partner/partner';
4
4
  import { ReferenceLink, ReferenceLinkType } from '../referenceLink';
5
- import { OrderExtraInformation, OrderExtraInformationType } from './extraInformation/extraInformation';
6
5
  export declare enum OrderFields {
7
6
  COLUMN_REFERENCE = "reference",
8
7
  COLUMN_STATUS = "status",
@@ -12,8 +11,7 @@ export declare enum OrderFields {
12
11
  COLUMN_PARTNER = "partner",
13
12
  COLUMN_CUSTOMER = "customer",
14
13
  COLUMN_PONUMBER = "ponumber",
15
- COLUMN_PRODUCTS = "products",
16
- COLUMN_EXTRA_INFORMATION = "extraInformation"
14
+ COLUMN_PRODUCTS = "products"
17
15
  }
18
16
  export declare type OrderType = {
19
17
  [OrderFields.COLUMN_REFERENCE]: string;
@@ -25,7 +23,6 @@ export declare type OrderType = {
25
23
  [OrderFields.COLUMN_CUSTOMER]: ReferenceLinkType;
26
24
  [OrderFields.COLUMN_PONUMBER]: string;
27
25
  [OrderFields.COLUMN_PRODUCTS]: Array<OrderProductsType>;
28
- [OrderFields.COLUMN_EXTRA_INFORMATION]?: OrderExtraInformationType;
29
26
  };
30
27
  export declare class Order extends AbstractEntity<OrderType> {
31
28
  #private;
@@ -39,6 +36,5 @@ export declare class Order extends AbstractEntity<OrderType> {
39
36
  get customer(): ReferenceLink;
40
37
  get ponumber(): string;
41
38
  get products(): Array<OrderProduct>;
42
- get extraInformation(): OrderExtraInformation | undefined;
43
39
  toJSON(): OrderType;
44
40
  }
@@ -10,14 +10,13 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
10
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
11
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
12
12
  };
13
- var _Order_reference, _Order_status, _Order_dateStatus, _Order_dateCreation, _Order_order_reference, _Order_partner, _Order_customer, _Order_ponumber, _Order_products, _Order_extraInformation;
13
+ var _Order_reference, _Order_status, _Order_dateStatus, _Order_dateCreation, _Order_order_reference, _Order_partner, _Order_customer, _Order_ponumber, _Order_products;
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.Order = exports.OrderFields = void 0;
16
16
  const abstractEntity_1 = require("../../../abstractEntity");
17
17
  const products_1 = require("./products/products");
18
18
  const partner_1 = require("./partner/partner");
19
19
  const referenceLink_1 = require("../referenceLink");
20
- const extraInformation_1 = require("./extraInformation/extraInformation");
21
20
  var OrderFields;
22
21
  (function (OrderFields) {
23
22
  OrderFields["COLUMN_REFERENCE"] = "reference";
@@ -29,7 +28,6 @@ var OrderFields;
29
28
  OrderFields["COLUMN_CUSTOMER"] = "customer";
30
29
  OrderFields["COLUMN_PONUMBER"] = "ponumber";
31
30
  OrderFields["COLUMN_PRODUCTS"] = "products";
32
- OrderFields["COLUMN_EXTRA_INFORMATION"] = "extraInformation";
33
31
  })(OrderFields = exports.OrderFields || (exports.OrderFields = {}));
34
32
  class Order extends abstractEntity_1.AbstractEntity {
35
33
  constructor(getOrderDataInput) {
@@ -43,7 +41,6 @@ class Order extends abstractEntity_1.AbstractEntity {
43
41
  _Order_customer.set(this, void 0);
44
42
  _Order_ponumber.set(this, void 0);
45
43
  _Order_products.set(this, void 0);
46
- _Order_extraInformation.set(this, void 0);
47
44
  __classPrivateFieldSet(this, _Order_reference, getOrderDataInput[OrderFields.COLUMN_REFERENCE], "f");
48
45
  __classPrivateFieldSet(this, _Order_status, getOrderDataInput[OrderFields.COLUMN_STATUS], "f");
49
46
  __classPrivateFieldSet(this, _Order_dateStatus, getOrderDataInput[OrderFields.COLUMN_DATESTATUS], "f");
@@ -55,9 +52,6 @@ class Order extends abstractEntity_1.AbstractEntity {
55
52
  __classPrivateFieldSet(this, _Order_customer, new referenceLink_1.ReferenceLink(getOrderDataInput[OrderFields.COLUMN_CUSTOMER]), "f");
56
53
  __classPrivateFieldSet(this, _Order_ponumber, getOrderDataInput[OrderFields.COLUMN_PONUMBER], "f");
57
54
  __classPrivateFieldSet(this, _Order_products, getOrderDataInput[OrderFields.COLUMN_PRODUCTS].map((order) => new products_1.OrderProduct(order)), "f");
58
- __classPrivateFieldSet(this, _Order_extraInformation, getOrderDataInput[OrderFields.COLUMN_EXTRA_INFORMATION]
59
- ? new extraInformation_1.OrderExtraInformation(getOrderDataInput[OrderFields.COLUMN_EXTRA_INFORMATION])
60
- : undefined, "f");
61
55
  }
62
56
  get reference() {
63
57
  return __classPrivateFieldGet(this, _Order_reference, "f");
@@ -86,11 +80,8 @@ class Order extends abstractEntity_1.AbstractEntity {
86
80
  get products() {
87
81
  return __classPrivateFieldGet(this, _Order_products, "f");
88
82
  }
89
- get extraInformation() {
90
- return __classPrivateFieldGet(this, _Order_extraInformation, "f");
91
- }
92
83
  toJSON() {
93
- var _a, _b;
84
+ var _a;
94
85
  return {
95
86
  [OrderFields.COLUMN_REFERENCE]: this.reference,
96
87
  [OrderFields.COLUMN_STATUS]: this.status,
@@ -101,10 +92,9 @@ class Order extends abstractEntity_1.AbstractEntity {
101
92
  [OrderFields.COLUMN_CUSTOMER]: this.customer.toJSON(),
102
93
  [OrderFields.COLUMN_PONUMBER]: this.ponumber,
103
94
  [OrderFields.COLUMN_PRODUCTS]: this.products.map((order) => order.toJSON()),
104
- [OrderFields.COLUMN_EXTRA_INFORMATION]: (_b = this.extraInformation) === null || _b === void 0 ? void 0 : _b.toJSON(),
105
95
  };
106
96
  }
107
97
  }
108
98
  exports.Order = Order;
109
- _Order_reference = new WeakMap(), _Order_status = new WeakMap(), _Order_dateStatus = new WeakMap(), _Order_dateCreation = new WeakMap(), _Order_order_reference = new WeakMap(), _Order_partner = new WeakMap(), _Order_customer = new WeakMap(), _Order_ponumber = new WeakMap(), _Order_products = new WeakMap(), _Order_extraInformation = new WeakMap();
99
+ _Order_reference = new WeakMap(), _Order_status = new WeakMap(), _Order_dateStatus = new WeakMap(), _Order_dateCreation = new WeakMap(), _Order_order_reference = new WeakMap(), _Order_partner = new WeakMap(), _Order_customer = new WeakMap(), _Order_ponumber = new WeakMap(), _Order_products = new WeakMap();
110
100
  //# sourceMappingURL=order.js.map
@@ -6,6 +6,5 @@ export * from './entities/orders/products/identifiers/productIdentifiers';
6
6
  export * from './entities/orders/products/prices/productPrices';
7
7
  export * from './entities/orders/products/program/productProgram';
8
8
  export * from './entities/orders/products/products';
9
- export * from './entities/orders/extraInformation/extraInformation';
10
9
  export * from './entities/referenceLink';
11
10
  export * from './ordersClient';
@@ -22,7 +22,6 @@ __exportStar(require("./entities/orders/products/identifiers/productIdentifiers"
22
22
  __exportStar(require("./entities/orders/products/prices/productPrices"), exports);
23
23
  __exportStar(require("./entities/orders/products/program/productProgram"), exports);
24
24
  __exportStar(require("./entities/orders/products/products"), exports);
25
- __exportStar(require("./entities/orders/extraInformation/extraInformation"), exports);
26
25
  __exportStar(require("./entities/referenceLink"), exports);
27
26
  __exportStar(require("./ordersClient"), exports);
28
27
  //# sourceMappingURL=index.js.map
@@ -33,8 +33,7 @@ export declare enum CreateOrderInputFields {
33
33
  COLUMN_PRICE_END_CUSTOMER = "endCustomer",
34
34
  COLUMN_PRICE_CURRENCY = "currency",
35
35
  COLUMN_PRICE_UNIT = "unitPrice",
36
- COLUMN_PRICE_EXCHANGE_RATE = "exchangeRate",
37
- COLUMN_EXTRA_INFORMATION = "extraInformation"
36
+ COLUMN_PRICE_EXCHANGE_RATE = "exchangeRate"
38
37
  }
39
38
  export declare enum scenarioType {
40
39
  INJECTION = "injection",
@@ -91,13 +90,6 @@ export declare type CreateOrderInputType = {
91
90
  };
92
91
  };
93
92
  }>;
94
- [CreateOrderInputFields.COLUMN_EXTRA_INFORMATION]?: {
95
- programs: {
96
- [key: string]: {
97
- [name: string]: string;
98
- };
99
- };
100
- };
101
93
  };
102
94
  export declare class OrdersClient extends AbstractRestfulClient {
103
95
  /**
@@ -38,7 +38,6 @@ var CreateOrderInputFields;
38
38
  CreateOrderInputFields["COLUMN_PRICE_CURRENCY"] = "currency";
39
39
  CreateOrderInputFields["COLUMN_PRICE_UNIT"] = "unitPrice";
40
40
  CreateOrderInputFields["COLUMN_PRICE_EXCHANGE_RATE"] = "exchangeRate";
41
- CreateOrderInputFields["COLUMN_EXTRA_INFORMATION"] = "extraInformation";
42
41
  })(CreateOrderInputFields = exports.CreateOrderInputFields || (exports.CreateOrderInputFields = {}));
43
42
  var scenarioType;
44
43
  (function (scenarioType) {
@@ -1,4 +1,4 @@
1
- import { AbstractRestfulClient } from './abstractRestfulClient';
1
+ import { AbstractRestfulClient, ConfigurationsClient } from './abstractRestfulClient';
2
2
  import { CheckDomainClient, WhoAmIClient } from './general';
3
3
  import { LicensesClient } from './licenses';
4
4
  import { SubscriptionsClient } from './subscriptions';
@@ -23,49 +23,49 @@ export declare class PublicApiClient extends AbstractRestfulClient {
23
23
  * Creates a new {@link CustomersClient} instance and returns it
24
24
  * @returns {@link CustomersClient}
25
25
  */
26
- getCustomersClient(): CustomersClient;
26
+ getCustomersClient(configuration?: ConfigurationsClient): CustomersClient;
27
27
  /**
28
28
  * Creates a new {@link WhoAmIClient} instance and returns it
29
29
  * @returns {@link WhoAmIClient}
30
30
  */
31
- getWhoamiClient(): WhoAmIClient;
31
+ getWhoamiClient(configuration?: ConfigurationsClient): WhoAmIClient;
32
32
  /**
33
33
  * Creates a new {@link LicensesClient} instance and returns it
34
34
  * @returns {@link LicensesClient}
35
35
  */
36
- getLicensesClient(): LicensesClient;
36
+ getLicensesClient(configuration?: ConfigurationsClient): LicensesClient;
37
37
  /**
38
38
  * Creates a new {@link CheckDomainClient} instance and returns it
39
39
  * @returns {@link CheckDomainClient}
40
40
  */
41
- getCheckDomainClient(): CheckDomainClient;
41
+ getCheckDomainClient(configuration?: ConfigurationsClient): CheckDomainClient;
42
42
  /**
43
43
  * Creates a new {@link SubscriptionsClient} instance and returns it
44
44
  * @returns {@link SubscriptionsClient}
45
45
  */
46
- getSubscriptionsClient(): SubscriptionsClient;
46
+ getSubscriptionsClient(configuration?: ConfigurationsClient): SubscriptionsClient;
47
47
  /**
48
48
  * Creates a new {@link OrdersClient} instance and returns it
49
49
  * @returns {@link OrdersClient}
50
50
  */
51
- getOrdersClient(): OrdersClient;
51
+ getOrdersClient(configuration?: ConfigurationsClient): OrdersClient;
52
52
  /**
53
53
  * Creates a new {@link ContactClient} instance and returns it
54
54
  * @returns {@link ContactClient}
55
55
  */
56
- getContactClient(): ContactClient;
56
+ getContactClient(configuration?: ConfigurationsClient): ContactClient;
57
57
  /**
58
58
  * Creates a new {@link ContactClient} instance and returns it
59
59
  * @returns {@link ContactClient}
60
60
  */
61
- getCampaignClient(): CampaignClient;
62
- getConsumptionClient(): ConsumptionClient;
63
- getSecurityStandardsClient(): StandardsClient;
64
- getSecurityRegisterClient(): RegisterClient;
65
- getCartClient(): CartClient;
66
- getSupportCenterClient(): SupportCenterClient;
67
- getCatalogClient(): CatalogClient;
68
- getUserClient(): UserClient;
69
- getNotificationsClient(): NotificationsClient;
61
+ getCampaignClient(configuration?: ConfigurationsClient): CampaignClient;
62
+ getConsumptionClient(configuration?: ConfigurationsClient): ConsumptionClient;
63
+ getSecurityStandardsClient(configuration?: ConfigurationsClient): StandardsClient;
64
+ getSecurityRegisterClient(configuration?: ConfigurationsClient): RegisterClient;
65
+ getCartClient(configuration?: ConfigurationsClient): CartClient;
66
+ getSupportCenterClient(configuration?: ConfigurationsClient): SupportCenterClient;
67
+ getCatalogClient(configuration?: ConfigurationsClient): CatalogClient;
68
+ getUserClient(configuration?: ConfigurationsClient): UserClient;
69
+ getNotificationsClient(configuration?: ConfigurationsClient): NotificationsClient;
70
70
  }
71
71
  export default PublicApiClient;
@@ -28,8 +28,8 @@ class PublicApiClient extends abstractRestfulClient_1.AbstractRestfulClient {
28
28
  * Creates a new {@link CustomersClient} instance and returns it
29
29
  * @returns {@link CustomersClient}
30
30
  */
31
- getCustomersClient() {
32
- return new customers_1.CustomersClient()
31
+ getCustomersClient(configuration) {
32
+ return new customers_1.CustomersClient(configuration)
33
33
  .setUrl(this.url)
34
34
  .setApiKey(this.apiKey)
35
35
  .setHeaders(this.headers)
@@ -39,8 +39,8 @@ class PublicApiClient extends abstractRestfulClient_1.AbstractRestfulClient {
39
39
  * Creates a new {@link WhoAmIClient} instance and returns it
40
40
  * @returns {@link WhoAmIClient}
41
41
  */
42
- getWhoamiClient() {
43
- return new general_1.WhoAmIClient()
42
+ getWhoamiClient(configuration) {
43
+ return new general_1.WhoAmIClient(configuration)
44
44
  .setUrl(this.url)
45
45
  .setApiKey(this.apiKey)
46
46
  .setHeaders(this.headers)
@@ -50,8 +50,8 @@ class PublicApiClient extends abstractRestfulClient_1.AbstractRestfulClient {
50
50
  * Creates a new {@link LicensesClient} instance and returns it
51
51
  * @returns {@link LicensesClient}
52
52
  */
53
- getLicensesClient() {
54
- return new licenses_1.LicensesClient()
53
+ getLicensesClient(configuration) {
54
+ return new licenses_1.LicensesClient(configuration)
55
55
  .setUrl(this.url)
56
56
  .setApiKey(this.apiKey)
57
57
  .setHeaders(this.headers)
@@ -61,8 +61,8 @@ class PublicApiClient extends abstractRestfulClient_1.AbstractRestfulClient {
61
61
  * Creates a new {@link CheckDomainClient} instance and returns it
62
62
  * @returns {@link CheckDomainClient}
63
63
  */
64
- getCheckDomainClient() {
65
- return new general_1.CheckDomainClient()
64
+ getCheckDomainClient(configuration) {
65
+ return new general_1.CheckDomainClient(configuration)
66
66
  .setUrl(this.url)
67
67
  .setApiKey(this.apiKey)
68
68
  .setHeaders(this.headers)
@@ -72,8 +72,8 @@ class PublicApiClient extends abstractRestfulClient_1.AbstractRestfulClient {
72
72
  * Creates a new {@link SubscriptionsClient} instance and returns it
73
73
  * @returns {@link SubscriptionsClient}
74
74
  */
75
- getSubscriptionsClient() {
76
- return new subscriptions_1.SubscriptionsClient()
75
+ getSubscriptionsClient(configuration) {
76
+ return new subscriptions_1.SubscriptionsClient(configuration)
77
77
  .setUrl(this.url)
78
78
  .setApiKey(this.apiKey)
79
79
  .setHeaders(this.headers)
@@ -83,8 +83,8 @@ class PublicApiClient extends abstractRestfulClient_1.AbstractRestfulClient {
83
83
  * Creates a new {@link OrdersClient} instance and returns it
84
84
  * @returns {@link OrdersClient}
85
85
  */
86
- getOrdersClient() {
87
- return new orders_1.OrdersClient()
86
+ getOrdersClient(configuration) {
87
+ return new orders_1.OrdersClient(configuration)
88
88
  .setUrl(this.url)
89
89
  .setApiKey(this.apiKey)
90
90
  .setHeaders(this.headers)
@@ -94,8 +94,8 @@ class PublicApiClient extends abstractRestfulClient_1.AbstractRestfulClient {
94
94
  * Creates a new {@link ContactClient} instance and returns it
95
95
  * @returns {@link ContactClient}
96
96
  */
97
- getContactClient() {
98
- return new contact_1.ContactClient()
97
+ getContactClient(configuration) {
98
+ return new contact_1.ContactClient(configuration)
99
99
  .setUrl(this.url)
100
100
  .setApiKey(this.apiKey)
101
101
  .setHeaders(this.headers)
@@ -105,64 +105,64 @@ class PublicApiClient extends abstractRestfulClient_1.AbstractRestfulClient {
105
105
  * Creates a new {@link ContactClient} instance and returns it
106
106
  * @returns {@link ContactClient}
107
107
  */
108
- getCampaignClient() {
109
- return new campaign_1.CampaignClient()
108
+ getCampaignClient(configuration) {
109
+ return new campaign_1.CampaignClient(configuration)
110
110
  .setUrl(this.url)
111
111
  .setApiKey(this.apiKey)
112
112
  .setHeaders(this.headers)
113
113
  .setHttpExceptionHandlers(this.httpExceptionHandlers);
114
114
  }
115
- getConsumptionClient() {
116
- return new consumption_1.ConsumptionClient()
115
+ getConsumptionClient(configuration) {
116
+ return new consumption_1.ConsumptionClient(configuration)
117
117
  .setUrl(this.url)
118
118
  .setApiKey(this.apiKey)
119
119
  .setHeaders(this.headers)
120
120
  .setHttpExceptionHandlers(this.httpExceptionHandlers);
121
121
  }
122
- getSecurityStandardsClient() {
123
- return new standardsClient_1.StandardsClient()
122
+ getSecurityStandardsClient(configuration) {
123
+ return new standardsClient_1.StandardsClient(configuration)
124
124
  .setUrl(this.url)
125
125
  .setApiKey(this.apiKey)
126
126
  .setHeaders(this.headers)
127
127
  .setHttpExceptionHandlers(this.httpExceptionHandlers);
128
128
  }
129
- getSecurityRegisterClient() {
130
- return new security_1.RegisterClient()
129
+ getSecurityRegisterClient(configuration) {
130
+ return new security_1.RegisterClient(configuration)
131
131
  .setUrl(this.url)
132
132
  .setApiKey(this.apiKey)
133
133
  .setHeaders(this.headers)
134
134
  .setHttpExceptionHandlers(this.httpExceptionHandlers);
135
135
  }
136
- getCartClient() {
137
- return new cartClient_1.CartClient()
136
+ getCartClient(configuration) {
137
+ return new cartClient_1.CartClient(configuration)
138
138
  .setUrl(this.url)
139
139
  .setApiKey(this.apiKey)
140
140
  .setHeaders(this.headers)
141
141
  .setHttpExceptionHandlers(this.httpExceptionHandlers);
142
142
  }
143
- getSupportCenterClient() {
144
- return new supportCenter_1.SupportCenterClient()
143
+ getSupportCenterClient(configuration) {
144
+ return new supportCenter_1.SupportCenterClient(configuration)
145
145
  .setUrl(this.url)
146
146
  .setApiKey(this.apiKey)
147
147
  .setHeaders(this.headers)
148
148
  .setHttpExceptionHandlers(this.httpExceptionHandlers);
149
149
  }
150
- getCatalogClient() {
151
- return new catalog_1.CatalogClient()
150
+ getCatalogClient(configuration) {
151
+ return new catalog_1.CatalogClient(configuration)
152
152
  .setUrl(this.url)
153
153
  .setApiKey(this.apiKey)
154
154
  .setHeaders(this.headers)
155
155
  .setHttpExceptionHandlers(this.httpExceptionHandlers);
156
156
  }
157
- getUserClient() {
158
- return new user_1.UserClient()
157
+ getUserClient(configuration) {
158
+ return new user_1.UserClient(configuration)
159
159
  .setUrl(this.url)
160
160
  .setApiKey(this.apiKey)
161
161
  .setHeaders(this.headers)
162
162
  .setHttpExceptionHandlers(this.httpExceptionHandlers);
163
163
  }
164
- getNotificationsClient() {
165
- return new notifications_1.NotificationsClient()
164
+ getNotificationsClient(configuration) {
165
+ return new notifications_1.NotificationsClient(configuration)
166
166
  .setUrl(this.url)
167
167
  .setToken(this.token)
168
168
  .setHeaders(this.headers)
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.35.0-rc.ckh.1",
7
+ "version": "3.35.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",
@@ -1,18 +0,0 @@
1
- import { AbstractEntity } from '../../../../abstractEntity';
2
- export declare enum OrderExtraInformationFields {
3
- COLUMN_PROGRAMS = "programs"
4
- }
5
- export declare type OrderExtraInformationItemType = {
6
- [key: string]: {
7
- [name: string]: string;
8
- };
9
- };
10
- export declare type OrderExtraInformationType = {
11
- [OrderExtraInformationFields.COLUMN_PROGRAMS]: OrderExtraInformationItemType;
12
- };
13
- export declare class OrderExtraInformation extends AbstractEntity<OrderExtraInformationType> {
14
- #private;
15
- constructor(input: OrderExtraInformationType);
16
- get programs(): OrderExtraInformationItemType;
17
- toJSON(): OrderExtraInformationType;
18
- }
@@ -1,38 +0,0 @@
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 _OrderExtraInformation_programs;
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.OrderExtraInformation = exports.OrderExtraInformationFields = void 0;
16
- const abstractEntity_1 = require("../../../../abstractEntity");
17
- var OrderExtraInformationFields;
18
- (function (OrderExtraInformationFields) {
19
- OrderExtraInformationFields["COLUMN_PROGRAMS"] = "programs";
20
- })(OrderExtraInformationFields = exports.OrderExtraInformationFields || (exports.OrderExtraInformationFields = {}));
21
- class OrderExtraInformation extends abstractEntity_1.AbstractEntity {
22
- constructor(input) {
23
- super(input);
24
- _OrderExtraInformation_programs.set(this, void 0);
25
- __classPrivateFieldSet(this, _OrderExtraInformation_programs, input[OrderExtraInformationFields.COLUMN_PROGRAMS], "f");
26
- }
27
- get programs() {
28
- return __classPrivateFieldGet(this, _OrderExtraInformation_programs, "f");
29
- }
30
- toJSON() {
31
- return {
32
- [OrderExtraInformationFields.COLUMN_PROGRAMS]: this.programs,
33
- };
34
- }
35
- }
36
- exports.OrderExtraInformation = OrderExtraInformation;
37
- _OrderExtraInformation_programs = new WeakMap();
38
- //# sourceMappingURL=extraInformation.js.map