@arrowsphere/api-client 3.37.0 → 3.38.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,6 +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.38.0] - 2023-06-19
7
+
8
+ ### Changed
9
+
10
+ - Add extra information customer
11
+
6
12
  ## [3.37.0] - 2023-06-12
7
13
 
8
14
  ### Changed
@@ -41,13 +41,13 @@ export declare abstract class AbstractHttpClient {
41
41
  setSecurity(security: HttpClientSecurity): this;
42
42
  /**
43
43
  * Warning: can remove useful headers, prefer use mergeHeaders()
44
- * @param headers
44
+ * @param headers - Set headers information
45
45
  */
46
46
  setHeaders(headers: Record<string, string>): this;
47
47
  /**
48
48
  * Will merge existing headers with those in parameters.
49
49
  * If There is key equality, the header passed as parameter has priority.
50
- * @param headers
50
+ * @param headers - Merge headers information
51
51
  */
52
52
  mergeHeaders(headers: Record<string, string>): this;
53
53
  removeHeader(headerKey: string): this;
@@ -54,7 +54,7 @@ class AbstractHttpClient {
54
54
  }
55
55
  /**
56
56
  * Warning: can remove useful headers, prefer use mergeHeaders()
57
- * @param headers
57
+ * @param headers - Set headers information
58
58
  */
59
59
  setHeaders(headers) {
60
60
  this.headers = headers;
@@ -63,7 +63,7 @@ class AbstractHttpClient {
63
63
  /**
64
64
  * Will merge existing headers with those in parameters.
65
65
  * If There is key equality, the header passed as parameter has priority.
66
- * @param headers
66
+ * @param headers - Merge headers information
67
67
  */
68
68
  mergeHeaders(headers) {
69
69
  const mergedHeaders = {
@@ -8,7 +8,6 @@ export declare abstract class AbstractGraphQLClient extends AbstractHttpClient {
8
8
  /**
9
9
  * Must not be called directly.
10
10
  * Use getClientInstance() to access it.
11
- * @protected
12
11
  */
13
12
  protected graphQLClient: GraphQLClient;
14
13
  protected optionsHeader?: Dom.RequestInit['headers'];
@@ -1,6 +1,7 @@
1
1
  import { AbstractEntity } from '../../../abstractEntity';
2
2
  import { Contact, ContactType } from './contact/contact';
3
3
  import { Details, DetailsType } from './details/details';
4
+ import { AdditionalExtraInformation, AdditionalExtraInformationType } from '../../../shared';
4
5
  export declare enum CustomerFields {
5
6
  COLUMN_REFERENCE = "Reference",
6
7
  COLUMN_COMPANY_NAME = "CompanyName",
@@ -20,8 +21,9 @@ export declare enum CustomerFields {
20
21
  COLUMN_BILLING_ID = "BillingId",
21
22
  COLUMN_INTERNAL_REFERENCE = "InternalReference",
22
23
  COLUMN_CONTACT = "Contact",
24
+ COLUMN_DELETED_AT = "DeletedAt",
23
25
  COLUMN_DETAILS = "Details",
24
- COLUMN_DELETED_AT = "DeletedAt"
26
+ COLUMN_EXTRA_INFORMATION = "extraInformation"
25
27
  }
26
28
  export declare type CustomerType = {
27
29
  [CustomerFields.COLUMN_REFERENCE]: string;
@@ -42,8 +44,9 @@ export declare type CustomerType = {
42
44
  [CustomerFields.COLUMN_BILLING_ID]: string;
43
45
  [CustomerFields.COLUMN_INTERNAL_REFERENCE]: string;
44
46
  [CustomerFields.COLUMN_CONTACT]: ContactType;
45
- [CustomerFields.COLUMN_DETAILS]: DetailsType;
46
47
  [CustomerFields.COLUMN_DELETED_AT]?: string | null;
48
+ [CustomerFields.COLUMN_DETAILS]: DetailsType;
49
+ [CustomerFields.COLUMN_EXTRA_INFORMATION]?: AdditionalExtraInformationType;
47
50
  };
48
51
  export declare class Customer extends AbstractEntity<CustomerType> {
49
52
  #private;
@@ -68,5 +71,6 @@ export declare class Customer extends AbstractEntity<CustomerType> {
68
71
  get Contact(): Contact;
69
72
  get Details(): Details;
70
73
  get DeletedAt(): string | null | undefined;
74
+ get ExtraInformation(): AdditionalExtraInformation | undefined;
71
75
  toJSON(): CustomerType;
72
76
  }
@@ -10,12 +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 _Customer_reference, _Customer_companyName, _Customer_partnerCompanyId, _Customer_addressLine1, _Customer_addressLine2, _Customer_zip, _Customer_city, _Customer_countryCode, _Customer_state, _Customer_receptionPhone, _Customer_websiteUrl, _Customer_emailContact, _Customer_headcount, _Customer_taxNumber, _Customer_ref, _Customer_billingId, _Customer_internalReference, _Customer_contact, _Customer_details, _Customer_deletedAt;
13
+ var _Customer_reference, _Customer_companyName, _Customer_partnerCompanyId, _Customer_addressLine1, _Customer_addressLine2, _Customer_zip, _Customer_city, _Customer_countryCode, _Customer_state, _Customer_receptionPhone, _Customer_websiteUrl, _Customer_emailContact, _Customer_headcount, _Customer_taxNumber, _Customer_ref, _Customer_billingId, _Customer_internalReference, _Customer_contact, _Customer_deletedAt, _Customer_details, _Customer_extraInformation;
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.Customer = exports.CustomerFields = void 0;
16
16
  const abstractEntity_1 = require("../../../abstractEntity");
17
17
  const contact_1 = require("./contact/contact");
18
18
  const details_1 = require("./details/details");
19
+ const shared_1 = require("../../../shared");
19
20
  var CustomerFields;
20
21
  (function (CustomerFields) {
21
22
  CustomerFields["COLUMN_REFERENCE"] = "Reference";
@@ -36,8 +37,9 @@ var CustomerFields;
36
37
  CustomerFields["COLUMN_BILLING_ID"] = "BillingId";
37
38
  CustomerFields["COLUMN_INTERNAL_REFERENCE"] = "InternalReference";
38
39
  CustomerFields["COLUMN_CONTACT"] = "Contact";
39
- CustomerFields["COLUMN_DETAILS"] = "Details";
40
40
  CustomerFields["COLUMN_DELETED_AT"] = "DeletedAt";
41
+ CustomerFields["COLUMN_DETAILS"] = "Details";
42
+ CustomerFields["COLUMN_EXTRA_INFORMATION"] = "extraInformation";
41
43
  })(CustomerFields = exports.CustomerFields || (exports.CustomerFields = {}));
42
44
  class Customer extends abstractEntity_1.AbstractEntity {
43
45
  constructor(getCustomersDataInput) {
@@ -60,8 +62,9 @@ class Customer extends abstractEntity_1.AbstractEntity {
60
62
  _Customer_billingId.set(this, void 0);
61
63
  _Customer_internalReference.set(this, void 0);
62
64
  _Customer_contact.set(this, void 0);
63
- _Customer_details.set(this, void 0);
64
65
  _Customer_deletedAt.set(this, void 0);
66
+ _Customer_details.set(this, void 0);
67
+ _Customer_extraInformation.set(this, void 0);
65
68
  __classPrivateFieldSet(this, _Customer_reference, getCustomersDataInput[CustomerFields.COLUMN_REFERENCE], "f");
66
69
  __classPrivateFieldSet(this, _Customer_companyName, getCustomersDataInput[CustomerFields.COLUMN_COMPANY_NAME], "f");
67
70
  __classPrivateFieldSet(this, _Customer_partnerCompanyId, getCustomersDataInput[CustomerFields.COLUMN_PARTNER_COMPANY_ID], "f");
@@ -80,8 +83,11 @@ class Customer extends abstractEntity_1.AbstractEntity {
80
83
  __classPrivateFieldSet(this, _Customer_billingId, getCustomersDataInput[CustomerFields.COLUMN_BILLING_ID], "f");
81
84
  __classPrivateFieldSet(this, _Customer_internalReference, getCustomersDataInput[CustomerFields.COLUMN_INTERNAL_REFERENCE], "f");
82
85
  __classPrivateFieldSet(this, _Customer_contact, new contact_1.Contact(getCustomersDataInput[CustomerFields.COLUMN_CONTACT]), "f");
83
- __classPrivateFieldSet(this, _Customer_details, new details_1.Details(getCustomersDataInput[CustomerFields.COLUMN_DETAILS]), "f");
84
86
  __classPrivateFieldSet(this, _Customer_deletedAt, getCustomersDataInput[CustomerFields.COLUMN_DELETED_AT], "f");
87
+ __classPrivateFieldSet(this, _Customer_details, new details_1.Details(getCustomersDataInput[CustomerFields.COLUMN_DETAILS]), "f");
88
+ __classPrivateFieldSet(this, _Customer_extraInformation, getCustomersDataInput[CustomerFields.COLUMN_EXTRA_INFORMATION]
89
+ ? new shared_1.AdditionalExtraInformation(getCustomersDataInput[CustomerFields.COLUMN_EXTRA_INFORMATION])
90
+ : undefined, "f");
85
91
  }
86
92
  get Reference() {
87
93
  return __classPrivateFieldGet(this, _Customer_reference, "f");
@@ -143,7 +149,11 @@ class Customer extends abstractEntity_1.AbstractEntity {
143
149
  get DeletedAt() {
144
150
  return __classPrivateFieldGet(this, _Customer_deletedAt, "f");
145
151
  }
152
+ get ExtraInformation() {
153
+ return __classPrivateFieldGet(this, _Customer_extraInformation, "f");
154
+ }
146
155
  toJSON() {
156
+ var _a;
147
157
  return {
148
158
  [CustomerFields.COLUMN_REFERENCE]: this.Reference,
149
159
  [CustomerFields.COLUMN_COMPANY_NAME]: this.CompanyName,
@@ -165,9 +175,10 @@ class Customer extends abstractEntity_1.AbstractEntity {
165
175
  [CustomerFields.COLUMN_CONTACT]: this.Contact.toJSON(),
166
176
  [CustomerFields.COLUMN_DETAILS]: this.Details.toJSON(),
167
177
  [CustomerFields.COLUMN_DELETED_AT]: this.DeletedAt,
178
+ [CustomerFields.COLUMN_EXTRA_INFORMATION]: (_a = this.ExtraInformation) === null || _a === void 0 ? void 0 : _a.toJSON(),
168
179
  };
169
180
  }
170
181
  }
171
182
  exports.Customer = Customer;
172
- _Customer_reference = new WeakMap(), _Customer_companyName = new WeakMap(), _Customer_partnerCompanyId = new WeakMap(), _Customer_addressLine1 = new WeakMap(), _Customer_addressLine2 = new WeakMap(), _Customer_zip = new WeakMap(), _Customer_city = new WeakMap(), _Customer_countryCode = new WeakMap(), _Customer_state = new WeakMap(), _Customer_receptionPhone = new WeakMap(), _Customer_websiteUrl = new WeakMap(), _Customer_emailContact = new WeakMap(), _Customer_headcount = new WeakMap(), _Customer_taxNumber = new WeakMap(), _Customer_ref = new WeakMap(), _Customer_billingId = new WeakMap(), _Customer_internalReference = new WeakMap(), _Customer_contact = new WeakMap(), _Customer_details = new WeakMap(), _Customer_deletedAt = new WeakMap();
183
+ _Customer_reference = new WeakMap(), _Customer_companyName = new WeakMap(), _Customer_partnerCompanyId = new WeakMap(), _Customer_addressLine1 = new WeakMap(), _Customer_addressLine2 = new WeakMap(), _Customer_zip = new WeakMap(), _Customer_city = new WeakMap(), _Customer_countryCode = new WeakMap(), _Customer_state = new WeakMap(), _Customer_receptionPhone = new WeakMap(), _Customer_websiteUrl = new WeakMap(), _Customer_emailContact = new WeakMap(), _Customer_headcount = new WeakMap(), _Customer_taxNumber = new WeakMap(), _Customer_ref = new WeakMap(), _Customer_billingId = new WeakMap(), _Customer_internalReference = new WeakMap(), _Customer_contact = new WeakMap(), _Customer_deletedAt = new WeakMap(), _Customer_details = new WeakMap(), _Customer_extraInformation = new WeakMap();
173
184
  //# sourceMappingURL=customer.js.map
@@ -2,7 +2,7 @@ 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';
5
+ import { AdditionalExtraInformation, AdditionalExtraInformationType } from '../../../shared';
6
6
  export declare enum OrderFields {
7
7
  COLUMN_REFERENCE = "reference",
8
8
  COLUMN_STATUS = "status",
@@ -25,7 +25,7 @@ export declare type OrderType = {
25
25
  [OrderFields.COLUMN_CUSTOMER]: ReferenceLinkType;
26
26
  [OrderFields.COLUMN_PONUMBER]: string;
27
27
  [OrderFields.COLUMN_PRODUCTS]: Array<OrderProductsType>;
28
- [OrderFields.COLUMN_EXTRA_INFORMATION]?: OrderExtraInformationType;
28
+ [OrderFields.COLUMN_EXTRA_INFORMATION]?: AdditionalExtraInformationType;
29
29
  };
30
30
  export declare class Order extends AbstractEntity<OrderType> {
31
31
  #private;
@@ -39,6 +39,6 @@ export declare class Order extends AbstractEntity<OrderType> {
39
39
  get customer(): ReferenceLink;
40
40
  get ponumber(): string;
41
41
  get products(): Array<OrderProduct>;
42
- get extraInformation(): OrderExtraInformation | undefined;
42
+ get extraInformation(): AdditionalExtraInformation | undefined;
43
43
  toJSON(): OrderType;
44
44
  }
@@ -17,7 +17,7 @@ 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");
20
+ const shared_1 = require("../../../shared");
21
21
  var OrderFields;
22
22
  (function (OrderFields) {
23
23
  OrderFields["COLUMN_REFERENCE"] = "reference";
@@ -56,7 +56,7 @@ class Order extends abstractEntity_1.AbstractEntity {
56
56
  __classPrivateFieldSet(this, _Order_ponumber, getOrderDataInput[OrderFields.COLUMN_PONUMBER], "f");
57
57
  __classPrivateFieldSet(this, _Order_products, getOrderDataInput[OrderFields.COLUMN_PRODUCTS].map((order) => new products_1.OrderProduct(order)), "f");
58
58
  __classPrivateFieldSet(this, _Order_extraInformation, getOrderDataInput[OrderFields.COLUMN_EXTRA_INFORMATION]
59
- ? new extraInformation_1.OrderExtraInformation(getOrderDataInput[OrderFields.COLUMN_EXTRA_INFORMATION])
59
+ ? new shared_1.AdditionalExtraInformation(getOrderDataInput[OrderFields.COLUMN_EXTRA_INFORMATION])
60
60
  : undefined, "f");
61
61
  }
62
62
  get reference() {
@@ -6,6 +6,6 @@ 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';
9
+ export * from '../shared/extraInformation/additionalExtraInformation';
10
10
  export * from './entities/referenceLink';
11
11
  export * from './ordersClient';
@@ -22,7 +22,7 @@ __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);
25
+ __exportStar(require("../shared/extraInformation/additionalExtraInformation"), exports);
26
26
  __exportStar(require("./entities/referenceLink"), exports);
27
27
  __exportStar(require("./ordersClient"), exports);
28
28
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,18 @@
1
+ import { AbstractEntity } from '../../abstractEntity';
2
+ export declare enum AdditionalExtraInformationFields {
3
+ COLUMN_PROGRAMS = "programs"
4
+ }
5
+ export declare type AdditionalExtraInformationItemType = {
6
+ [key: string]: {
7
+ [name: string]: string;
8
+ } | unknown;
9
+ };
10
+ export declare type AdditionalExtraInformationType = {
11
+ [AdditionalExtraInformationFields.COLUMN_PROGRAMS]?: AdditionalExtraInformationItemType;
12
+ };
13
+ export declare class AdditionalExtraInformation extends AbstractEntity<AdditionalExtraInformationType> {
14
+ #private;
15
+ constructor(additionalExtraInformation: AdditionalExtraInformationType);
16
+ get programs(): AdditionalExtraInformationItemType | undefined;
17
+ toJSON(): AdditionalExtraInformationType;
18
+ }
@@ -10,29 +10,29 @@ 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 _OrderExtraInformation_programs;
13
+ var _AdditionalExtraInformation_programs;
14
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");
15
+ exports.AdditionalExtraInformation = exports.AdditionalExtraInformationFields = void 0;
16
+ const abstractEntity_1 = require("../../abstractEntity");
17
+ var AdditionalExtraInformationFields;
18
+ (function (AdditionalExtraInformationFields) {
19
+ AdditionalExtraInformationFields["COLUMN_PROGRAMS"] = "programs";
20
+ })(AdditionalExtraInformationFields = exports.AdditionalExtraInformationFields || (exports.AdditionalExtraInformationFields = {}));
21
+ class AdditionalExtraInformation extends abstractEntity_1.AbstractEntity {
22
+ constructor(additionalExtraInformation) {
23
+ super(additionalExtraInformation);
24
+ _AdditionalExtraInformation_programs.set(this, void 0);
25
+ __classPrivateFieldSet(this, _AdditionalExtraInformation_programs, additionalExtraInformation[AdditionalExtraInformationFields.COLUMN_PROGRAMS], "f");
26
26
  }
27
27
  get programs() {
28
- return __classPrivateFieldGet(this, _OrderExtraInformation_programs, "f");
28
+ return __classPrivateFieldGet(this, _AdditionalExtraInformation_programs, "f");
29
29
  }
30
30
  toJSON() {
31
31
  return {
32
- [OrderExtraInformationFields.COLUMN_PROGRAMS]: this.programs,
32
+ [AdditionalExtraInformationFields.COLUMN_PROGRAMS]: this.programs,
33
33
  };
34
34
  }
35
35
  }
36
- exports.OrderExtraInformation = OrderExtraInformation;
37
- _OrderExtraInformation_programs = new WeakMap();
38
- //# sourceMappingURL=extraInformation.js.map
36
+ exports.AdditionalExtraInformation = AdditionalExtraInformation;
37
+ _AdditionalExtraInformation_programs = new WeakMap();
38
+ //# sourceMappingURL=additionalExtraInformation.js.map
@@ -1 +1,2 @@
1
1
  export * from './contact/contact';
2
+ export * from './extraInformation/additionalExtraInformation';
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./contact/contact"), exports);
18
+ __exportStar(require("./extraInformation/additionalExtraInformation"), exports);
18
19
  //# sourceMappingURL=index.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.37.0",
7
+ "version": "3.38.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
- }