@arrowsphere/api-client 3.9.1 → 3.10.0-rc.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,6 +3,18 @@
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.10.0] - 2022-07-28
7
+
8
+ ### Changed
9
+
10
+ - add new policy field in get invitation endpoint
11
+
12
+ ## [3.9.2] - 2022-07-27
13
+
14
+ ### Changed
15
+
16
+ - add exclusion Filters in find license
17
+
6
18
  ## [3.9.1] - 2022-07-26
7
19
 
8
20
  ### Changed
@@ -6,7 +6,8 @@ export declare enum DataInvitationFields {
6
6
  COLUMN_CREATED_AT = "createdAt",
7
7
  COLUMN_UPDATED_AT = "updatedAt",
8
8
  COLUMN_COMPANY = "company",
9
- COLUMN_CONTACT = "contact"
9
+ COLUMN_CONTACT = "contact",
10
+ COLUMN_POLICY = "policy"
10
11
  }
11
12
  export declare type DataInvitationType = {
12
13
  [DataInvitationFields.COLUMN_CODE]: string;
@@ -14,6 +15,7 @@ export declare type DataInvitationType = {
14
15
  [DataInvitationFields.COLUMN_UPDATED_AT]: string;
15
16
  [DataInvitationFields.COLUMN_COMPANY]: CompanyType;
16
17
  [DataInvitationFields.COLUMN_CONTACT]: InvitationContactType;
18
+ [DataInvitationFields.COLUMN_POLICY]: string;
17
19
  };
18
20
  export declare class DataInvitation extends AbstractEntity<DataInvitationType> {
19
21
  #private;
@@ -23,5 +25,6 @@ export declare class DataInvitation extends AbstractEntity<DataInvitationType> {
23
25
  get updatedAt(): string;
24
26
  get company(): Company;
25
27
  get contact(): InvitationContact;
28
+ get policy(): string;
26
29
  toJSON(): DataInvitationType;
27
30
  }
@@ -12,7 +12,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
12
12
  }
13
13
  return privateMap.get(receiver);
14
14
  };
15
- var _code, _createdAt, _updatedAt, _company, _contact;
15
+ var _code, _createdAt, _updatedAt, _company, _contact, _policy;
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.DataInvitation = exports.DataInvitationFields = void 0;
18
18
  const abstractEntity_1 = require("../../abstractEntity");
@@ -25,6 +25,7 @@ var DataInvitationFields;
25
25
  DataInvitationFields["COLUMN_UPDATED_AT"] = "updatedAt";
26
26
  DataInvitationFields["COLUMN_COMPANY"] = "company";
27
27
  DataInvitationFields["COLUMN_CONTACT"] = "contact";
28
+ DataInvitationFields["COLUMN_POLICY"] = "policy";
28
29
  })(DataInvitationFields = exports.DataInvitationFields || (exports.DataInvitationFields = {}));
29
30
  class DataInvitation extends abstractEntity_1.AbstractEntity {
30
31
  constructor(getCustomerInvitationDataInput) {
@@ -34,11 +35,13 @@ class DataInvitation extends abstractEntity_1.AbstractEntity {
34
35
  _updatedAt.set(this, void 0);
35
36
  _company.set(this, void 0);
36
37
  _contact.set(this, void 0);
38
+ _policy.set(this, void 0);
37
39
  __classPrivateFieldSet(this, _code, getCustomerInvitationDataInput[DataInvitationFields.COLUMN_CODE]);
38
40
  __classPrivateFieldSet(this, _createdAt, getCustomerInvitationDataInput[DataInvitationFields.COLUMN_CREATED_AT]);
39
41
  __classPrivateFieldSet(this, _updatedAt, getCustomerInvitationDataInput[DataInvitationFields.COLUMN_UPDATED_AT]);
40
42
  __classPrivateFieldSet(this, _company, new company_1.Company(getCustomerInvitationDataInput[DataInvitationFields.COLUMN_COMPANY]));
41
43
  __classPrivateFieldSet(this, _contact, new invitationContact_1.InvitationContact(getCustomerInvitationDataInput[DataInvitationFields.COLUMN_CONTACT]));
44
+ __classPrivateFieldSet(this, _policy, getCustomerInvitationDataInput[DataInvitationFields.COLUMN_POLICY]);
42
45
  }
43
46
  get code() {
44
47
  return __classPrivateFieldGet(this, _code);
@@ -55,6 +58,9 @@ class DataInvitation extends abstractEntity_1.AbstractEntity {
55
58
  get contact() {
56
59
  return __classPrivateFieldGet(this, _contact);
57
60
  }
61
+ get policy() {
62
+ return __classPrivateFieldGet(this, _policy);
63
+ }
58
64
  toJSON() {
59
65
  return {
60
66
  [DataInvitationFields.COLUMN_CODE]: this.code,
@@ -62,9 +68,10 @@ class DataInvitation extends abstractEntity_1.AbstractEntity {
62
68
  [DataInvitationFields.COLUMN_UPDATED_AT]: this.updatedAt,
63
69
  [DataInvitationFields.COLUMN_COMPANY]: this.company.toJSON(),
64
70
  [DataInvitationFields.COLUMN_CONTACT]: this.contact.toJSON(),
71
+ [DataInvitationFields.COLUMN_POLICY]: this.policy,
65
72
  };
66
73
  }
67
74
  }
68
75
  exports.DataInvitation = DataInvitation;
69
- _code = new WeakMap(), _createdAt = new WeakMap(), _updatedAt = new WeakMap(), _company = new WeakMap(), _contact = new WeakMap();
76
+ _code = new WeakMap(), _createdAt = new WeakMap(), _updatedAt = new WeakMap(), _company = new WeakMap(), _contact = new WeakMap(), _policy = new WeakMap();
70
77
  //# sourceMappingURL=dataInvitation.js.map
@@ -30,6 +30,10 @@ export declare enum LicenseFindParameters {
30
30
  * The key for filers search query parameter
31
31
  */
32
32
  DATA_FILTERS = "filters",
33
+ /**
34
+ * The key for exclusion filers search query parameter
35
+ */
36
+ DATA_EXCLUSION_FILTERS = "exclusionFilters",
33
37
  /**
34
38
  * The key for sort search query parameter
35
39
  */
@@ -165,6 +169,7 @@ export declare type LicenseFindPayload = {
165
169
  [LicenseFindParameters.DATA_KEYWORD]?: string;
166
170
  [LicenseFindParameters.DATA_KEYWORDS]?: LicenseKeywordsParameters;
167
171
  [LicenseFindParameters.DATA_FILTERS]?: LicenseFiltersParameters;
172
+ [LicenseFindParameters.DATA_EXCLUSION_FILTERS]?: LicenseFiltersParameters;
168
173
  [LicenseFindParameters.DATA_SORT]?: LicenseSortParameters;
169
174
  [LicenseFindParameters.DATA_HIGHLIGHT]?: boolean;
170
175
  };
@@ -175,6 +180,7 @@ export declare type LicenseFindRawPayload = {
175
180
  offer?: LicenseRawKeywordsParametersOffer;
176
181
  };
177
182
  [LicenseFindParameters.DATA_FILTERS]?: LicenseRawFiltersParameters;
183
+ [LicenseFindParameters.DATA_EXCLUSION_FILTERS]?: LicenseRawFiltersParameters;
178
184
  [LicenseFindParameters.DATA_SORT]?: {
179
185
  license?: LicenseRawSortParametersLicense;
180
186
  offer?: LicenseRawSortParametersOffer;
@@ -27,6 +27,10 @@ var LicenseFindParameters;
27
27
  * The key for filers search query parameter
28
28
  */
29
29
  LicenseFindParameters["DATA_FILTERS"] = "filters";
30
+ /**
31
+ * The key for exclusion filers search query parameter
32
+ */
33
+ LicenseFindParameters["DATA_EXCLUSION_FILTERS"] = "exclusionFilters";
30
34
  /**
31
35
  * The key for sort search query parameter
32
36
  */
@@ -168,7 +172,7 @@ class LicensesClient extends abstractClient_1.AbstractClient {
168
172
  *
169
173
  */
170
174
  async find(postData = {}, perPage = 100, page = 1, parameters = {}) {
171
- var _a, _b, _c, _d, _e, _f;
175
+ var _a, _b, _c, _d, _e, _f, _g, _h;
172
176
  this.setPerPage(perPage);
173
177
  this.setPage(page);
174
178
  const rawLicensePayload = {
@@ -201,14 +205,27 @@ class LicensesClient extends abstractClient_1.AbstractClient {
201
205
  }, {}),
202
206
  };
203
207
  }
208
+ if (postData.exclusionFilters) {
209
+ // Flatten with prefix for each type of filter (license and offer)
210
+ rawLicensePayload.exclusionFilters = {
211
+ ...Object.entries((_e = postData.exclusionFilters.license) !== null && _e !== void 0 ? _e : {}).reduce((acc, [filter, value]) => {
212
+ acc[`license.${filter}`] = value;
213
+ return acc;
214
+ }, {}),
215
+ ...Object.entries((_f = postData.exclusionFilters.offer) !== null && _f !== void 0 ? _f : {}).reduce((acc, [filter, value]) => {
216
+ acc[`offer.${filter}`] = value;
217
+ return acc;
218
+ }, {}),
219
+ };
220
+ }
204
221
  if (postData.sort) {
205
222
  // Flatten with prefix for each type of sort keys (license and offer)
206
223
  rawLicensePayload.sort = {
207
- ...Object.entries((_e = postData.sort.license) !== null && _e !== void 0 ? _e : {}).reduce((acc, [sort, value]) => {
224
+ ...Object.entries((_g = postData.sort.license) !== null && _g !== void 0 ? _g : {}).reduce((acc, [sort, value]) => {
208
225
  acc[`license.${sort}`] = value;
209
226
  return acc;
210
227
  }, {}),
211
- ...Object.entries((_f = postData.sort.offer) !== null && _f !== void 0 ? _f : {}).reduce((acc, [sort, value]) => {
228
+ ...Object.entries((_h = postData.sort.offer) !== null && _h !== void 0 ? _h : {}).reduce((acc, [sort, value]) => {
212
229
  acc[`offer.${sort}`] = value;
213
230
  return acc;
214
231
  }, {}),
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.9.1",
7
+ "version": "3.10.0-rc.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",