@arrowsphere/api-client 3.195.0-rc.tbo.1 → 3.195.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,11 @@
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.195.0] - 2025.05.12
7
+
8
+ ### Added
9
+ - [licenses] Handle compare for endpoint find licenses v2
10
+
6
11
  ## [3.194.0] - 2025.05.12
7
12
 
8
13
  ### Added
@@ -36,6 +36,10 @@ export declare enum LicenseFindParameters {
36
36
  * The key for aggregation search query parameter (to request extra aggregation, which are not provided by default)
37
37
  */
38
38
  DATA_AGGREGATION = "aggregations",
39
+ /**
40
+ * The key for comparisons
41
+ */
42
+ DATA_COMPARE = "compare",
39
43
  /**
40
44
  * The key for keyword search query parameter (to search one string in all available search fields)
41
45
  */
@@ -135,6 +139,9 @@ export declare type BaseParameters<LicenseType, OfferType, endCustomerOrganizati
135
139
  endCustomerOrganizationUnit?: endCustomerOrganizationUnitType;
136
140
  };
137
141
  export declare type LicenseSortParameters = BaseParameters<LicenceFindDataSortParameters, OfferFindResultDataSortParameters, EndCustomerOrganizationUnitSortParameters>;
142
+ export declare type LicenseCompareParameters = {
143
+ [field: string]: unknown;
144
+ };
138
145
  export declare type LicenseFiltersParameters = BaseParameters<LicenceFindDataFiltersParameters, OfferFindResultDataFiltersParameters, EndCustomerOrganizationUnitFiltersParameters>;
139
146
  /**
140
147
  * List of keywords to search with.
@@ -174,6 +181,9 @@ export declare type FiltersCompareValue = {
174
181
  [LicenseFindParameters.FILTERS_LTE]?: string | number;
175
182
  };
176
183
  export declare type FiltersParameters = string | string[] | number | number[] | boolean | FiltersCompareValue;
184
+ export declare type LicenseRawCompareParameters = {
185
+ [field: string]: unknown;
186
+ };
177
187
  export declare type LicenseRawFiltersParameters = {
178
188
  [field: string]: unknown;
179
189
  };
@@ -182,6 +192,7 @@ export declare type LicenseRawFiltersParameters = {
182
192
  */
183
193
  export declare type LicenseFindPayload = {
184
194
  [LicenseFindParameters.DATA_AGGREGATION]?: string[];
195
+ [LicenseFindParameters.DATA_COMPARE]?: LicenseCompareParameters;
185
196
  [LicenseFindParameters.DATA_KEYWORD]?: string;
186
197
  [LicenseFindParameters.DATA_KEYWORDS]?: LicenseKeywordsParameters;
187
198
  [LicenseFindParameters.DATA_FILTERS]?: LicenseFiltersParameters;
@@ -191,6 +202,7 @@ export declare type LicenseFindPayload = {
191
202
  };
192
203
  export declare type LicenseFindRawPayload = {
193
204
  [LicenseFindParameters.DATA_AGGREGATION]?: string[];
205
+ [LicenseFindParameters.DATA_COMPARE]?: LicenseRawCompareParameters;
194
206
  [LicenseFindParameters.DATA_KEYWORD]?: string;
195
207
  [LicenseFindParameters.DATA_KEYWORDS]?: {
196
208
  license?: LicenseRawKeywordsParametersLicence;
@@ -31,6 +31,10 @@ var LicenseFindParameters;
31
31
  * The key for aggregation search query parameter (to request extra aggregation, which are not provided by default)
32
32
  */
33
33
  LicenseFindParameters["DATA_AGGREGATION"] = "aggregations";
34
+ /**
35
+ * The key for comparisons
36
+ */
37
+ LicenseFindParameters["DATA_COMPARE"] = "compare";
34
38
  /**
35
39
  * The key for keyword search query parameter (to search one string in all available search fields)
36
40
  */
@@ -258,6 +262,7 @@ class LicensesClient extends abstractRestfulClient_1.AbstractRestfulClient {
258
262
  *
259
263
  */
260
264
  async find(postData = {}, perPage = 100, page = 1, parameters = {}) {
265
+ var _a;
261
266
  this.setPerPage(perPage);
262
267
  this.setPage(page);
263
268
  const rawLicensePayload = {
@@ -265,6 +270,9 @@ class LicensesClient extends abstractRestfulClient_1.AbstractRestfulClient {
265
270
  keyword: postData.keyword,
266
271
  highlight: postData.highlight,
267
272
  };
273
+ if (Object.keys((_a = postData.compare) !== null && _a !== void 0 ? _a : {}).length > 0) {
274
+ rawLicensePayload.compare = postData.compare;
275
+ }
268
276
  if (postData.keywords) {
269
277
  // Flatten with prefix for each type of keyword (license and offer)
270
278
  rawLicensePayload.keywords = {
@@ -58,9 +58,7 @@ export declare class SubscriptionsClient extends AbstractRestfulClient {
58
58
  * @param data - List payload
59
59
  *
60
60
  * @returns Promise\<AxiosResponse\<{@link SubscriptionsListData}\>\> */
61
- listRaw(data?: SubscriptionsListPayload, options?: {
62
- isAdmin: boolean;
63
- }): Promise<SubscriptionsListData>;
61
+ listRaw(data?: SubscriptionsListPayload): Promise<SubscriptionsListData>;
64
62
  /**
65
63
  * Lists subscriptions and returns a SubscriptionsListResult to manipulate the results.
66
64
  *
@@ -74,6 +72,5 @@ export declare class SubscriptionsClient extends AbstractRestfulClient {
74
72
  *
75
73
  */
76
74
  list(postData?: SubscriptionsListPayload, perPage?: number, page?: number): Promise<SubscriptionsListResult>;
77
- listAdmin(postData?: SubscriptionsListPayload, perPage?: number, page?: number): Promise<SubscriptionsListResult>;
78
75
  addSubscription(postData: SubscriptionCreationData): Promise<void>;
79
76
  }
@@ -28,9 +28,9 @@ class SubscriptionsClient extends abstractRestfulClient_1.AbstractRestfulClient
28
28
  * @param data - List payload
29
29
  *
30
30
  * @returns Promise\<AxiosResponse\<{@link SubscriptionsListData}\>\> */
31
- async listRaw(data = {}, options = { isAdmin: false }) {
31
+ async listRaw(data = {}) {
32
32
  this.path = this.LIST_PATH;
33
- return this.get(data, {}, options);
33
+ return this.get(data, {}, { isAdmin: true });
34
34
  }
35
35
  /**
36
36
  * Lists subscriptions and returns a SubscriptionsListResult to manipulate the results.
@@ -47,13 +47,7 @@ class SubscriptionsClient extends abstractRestfulClient_1.AbstractRestfulClient
47
47
  async list(postData = {}, perPage = 100, page = 1) {
48
48
  this.setPerPage(perPage);
49
49
  this.setPage(page);
50
- const response = await this.listRaw(postData, { isAdmin: false });
51
- return new subscriptionsListResult_1.SubscriptionsListResult(response, this, postData);
52
- }
53
- async listAdmin(postData = {}, perPage = 100, page = 1) {
54
- this.setPerPage(perPage);
55
- this.setPage(page);
56
- const response = await this.listRaw(postData, { isAdmin: true });
50
+ const response = await this.listRaw(postData);
57
51
  return new subscriptionsListResult_1.SubscriptionsListResult(response, this, postData);
58
52
  }
59
53
  async addSubscription(postData) {
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.195.0-rc.tbo.1",
7
+ "version": "3.195.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",