@arrowsphere/api-client 3.186.0 → 3.187.0-rc-jpb.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,13 +3,6 @@
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.186.0] - 2025.04.15
7
-
8
- ### Added
9
- - [graphql-api] add endpoint `getAttachmentsOrder` to get order attachments list
10
- - [graphql-api] add endpoint `deleteAttachmentOrder` to delete one order attachment
11
- - [graphql-api] add endpoint `uploadAttachmentOrder` to add new attachment to an order
12
-
13
6
  ## [3.185.0] - 2025.04.11
14
7
 
15
8
  ### Added
@@ -1,10 +1,15 @@
1
1
  import { AbstractEntity } from '../../abstractEntity';
2
2
  import { LicenseFindResultFields } from './license/licenseFindResult';
3
+ declare type FilterFindResultDataIterable = {
4
+ [field in LicenseFindResultFields]?: unknown;
5
+ };
3
6
  /**
4
7
  * Filter data values
5
8
  */
6
- export declare type FilterFindResultDataValues = {
7
- [field in LicenseFindResultFields]?: unknown;
9
+ export declare type FilterFindResultDataValues = FilterFindResultDataIterable | LicenseFilterAggregationType[];
10
+ export declare type LicenseFilterAggregationType = {
11
+ count: number;
12
+ values: string[];
8
13
  };
9
14
  /**
10
15
  * Filter data
@@ -44,3 +49,4 @@ export declare class FilterFindResult extends AbstractEntity<FilterFindResultDat
44
49
  */
45
50
  toJSON(): FilterFindResultData;
46
51
  }
52
+ export {};
@@ -32,6 +32,10 @@ import { LicenceCouponCodeHistoryResult } from './entities/history/licenceCoupon
32
32
  * Parameters passable to the request for refining search.
33
33
  */
34
34
  export declare enum LicenseFindParameters {
35
+ /**
36
+ * The key for aggregation search query parameter (to request extra aggregation, which are not provided by default)
37
+ */
38
+ DATA_AGGREGATION = "aggregations",
35
39
  /**
36
40
  * The key for keyword search query parameter (to search one string in all available search fields)
37
41
  */
@@ -177,6 +181,7 @@ export declare type LicenseRawFiltersParameters = {
177
181
  * Payload to pass the find request. Contains keyword(s), sort options, column filters and highlight option.
178
182
  */
179
183
  export declare type LicenseFindPayload = {
184
+ [LicenseFindParameters.DATA_AGGREGATION]?: string[];
180
185
  [LicenseFindParameters.DATA_KEYWORD]?: string;
181
186
  [LicenseFindParameters.DATA_KEYWORDS]?: LicenseKeywordsParameters;
182
187
  [LicenseFindParameters.DATA_FILTERS]?: LicenseFiltersParameters;
@@ -185,6 +190,7 @@ export declare type LicenseFindPayload = {
185
190
  [LicenseFindParameters.DATA_HIGHLIGHT]?: boolean;
186
191
  };
187
192
  export declare type LicenseFindRawPayload = {
193
+ [LicenseFindParameters.DATA_AGGREGATION]?: string[];
188
194
  [LicenseFindParameters.DATA_KEYWORD]?: string;
189
195
  [LicenseFindParameters.DATA_KEYWORDS]?: {
190
196
  license?: LicenseRawKeywordsParametersLicence;
@@ -27,6 +27,10 @@ const licenceCouponCodeHistoryResult_1 = require("./entities/history/licenceCoup
27
27
  */
28
28
  var LicenseFindParameters;
29
29
  (function (LicenseFindParameters) {
30
+ /**
31
+ * The key for aggregation search query parameter (to request extra aggregation, which are not provided by default)
32
+ */
33
+ LicenseFindParameters["DATA_AGGREGATION"] = "aggregations";
30
34
  /**
31
35
  * The key for keyword search query parameter (to search one string in all available search fields)
32
36
  */
@@ -257,6 +261,7 @@ class LicensesClient extends abstractRestfulClient_1.AbstractRestfulClient {
257
261
  this.setPerPage(perPage);
258
262
  this.setPage(page);
259
263
  const rawLicensePayload = {
264
+ aggregations: postData.aggregations,
260
265
  keyword: postData.keyword,
261
266
  highlight: postData.highlight,
262
267
  };
@@ -268,6 +273,14 @@ class LicensesClient extends abstractRestfulClient_1.AbstractRestfulClient {
268
273
  ...this.createKeywords(postData.keywords, 'endCustomerOrganizationUnit'),
269
274
  };
270
275
  }
276
+ if (postData.keywords) {
277
+ // Flatten with prefix for each type of keyword (license and offer)
278
+ rawLicensePayload.keywords = {
279
+ ...this.createKeywords(postData.keywords, 'license'),
280
+ ...this.createKeywords(postData.keywords, 'offer'),
281
+ ...this.createKeywords(postData.keywords, 'endCustomerOrganizationUnit'),
282
+ };
283
+ }
271
284
  if (postData.filters) {
272
285
  // Flatten with prefix for each type of filter (license and offer)
273
286
  rawLicensePayload.filters = {
@@ -1,5 +1,4 @@
1
1
  export * from './entities/dataListOrders';
2
- export * from './entities/orders/attachment';
3
2
  export * from './entities/orders/order';
4
3
  export * from './entities/orders/updateOrderResult';
5
4
  export * from './entities/orders/partner/partner';
@@ -15,7 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./entities/dataListOrders"), exports);
18
- __exportStar(require("./entities/orders/attachment"), exports);
19
18
  __exportStar(require("./entities/orders/order"), exports);
20
19
  __exportStar(require("./entities/orders/updateOrderResult"), exports);
21
20
  __exportStar(require("./entities/orders/partner/partner"), exports);
@@ -3,7 +3,6 @@ import { GetResult } from '../getResult';
3
3
  import { DataListOrders } from './entities/dataListOrders';
4
4
  import { ReferenceLink } from './entities/referenceLink';
5
5
  import { UpdateOrderResult } from './entities/orders/updateOrderResult';
6
- import { AttachmentOrder, AttachmentsListOrder } from './entities/orders/attachment';
7
6
  export declare enum CreateOrderInputFields {
8
7
  COLUMN_CUSTOMER = "customer",
9
8
  COLUMN_REFERENCE = "reference",
@@ -165,14 +164,6 @@ export declare enum UpdateAdditionalInformationOrderInputFields {
165
164
  export declare type UpdateAdditionalInformationOrderInputType = {
166
165
  [UpdateAdditionalInformationOrderInputFields.COLUMN_DATA]: UpdateAdditionalInformationItemOrderInputType[];
167
166
  };
168
- export declare enum UploadAttachmentOrderInputFields {
169
- COLUMN_NAME = "name",
170
- COLUMN_FILE_ENCODED = "fileEncoded"
171
- }
172
- export declare type UploadAttachmentOrderInputType = {
173
- [UploadAttachmentOrderInputFields.COLUMN_NAME]: string;
174
- [UploadAttachmentOrderInputFields.COLUMN_FILE_ENCODED]: string;
175
- };
176
167
  export declare class OrdersClient extends AbstractRestfulClient {
177
168
  /**
178
169
  * The base path of the API
@@ -189,7 +180,4 @@ export declare class OrdersClient extends AbstractRestfulClient {
189
180
  validateOrder(orderReference: string, parameters?: Parameters): Promise<void>;
190
181
  updateStaffContributorsOrder(orderReference: string, payload: UpdateContributorOrderInputType, parameters?: Parameters): Promise<void>;
191
182
  updateAdditionalInformationOrder(orderReference: string, payload: UpdateAdditionalInformationOrderInputType, parameters?: Parameters): Promise<void>;
192
- getAttachmentsOrder(orderReference: string, perPage?: number, page?: number, parameters?: Parameters): Promise<GetResult<AttachmentsListOrder>>;
193
- deleteAttachmentOrder(orderReference: string, name: string, parameters?: Parameters): Promise<void>;
194
- uploadAttachmentOrder(orderReference: string, payload: UploadAttachmentOrderInputType, parameters?: Parameters): Promise<GetResult<AttachmentOrder>>;
195
183
  }
@@ -1,12 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OrdersClient = exports.UploadAttachmentOrderInputFields = exports.UpdateAdditionalInformationOrderInputFields = exports.UpdateAdditionalInformationItemOrderInputFields = exports.UpdateContributorOrderInputFields = exports.UpdateContributorItemOrderInputFields = exports.UpdateOrderInputFields = exports.StaffTypeEnum = exports.scenarioType = exports.CreateOrderInputFields = void 0;
3
+ exports.OrdersClient = exports.UpdateAdditionalInformationOrderInputFields = exports.UpdateAdditionalInformationItemOrderInputFields = exports.UpdateContributorOrderInputFields = exports.UpdateContributorItemOrderInputFields = exports.UpdateOrderInputFields = exports.StaffTypeEnum = exports.scenarioType = exports.CreateOrderInputFields = void 0;
4
4
  const abstractRestfulClient_1 = require("../abstractRestfulClient");
5
5
  const getResult_1 = require("../getResult");
6
6
  const dataListOrders_1 = require("./entities/dataListOrders");
7
7
  const referenceLink_1 = require("./entities/referenceLink");
8
8
  const updateOrderResult_1 = require("./entities/orders/updateOrderResult");
9
- const attachment_1 = require("./entities/orders/attachment");
10
9
  var CreateOrderInputFields;
11
10
  (function (CreateOrderInputFields) {
12
11
  CreateOrderInputFields["COLUMN_CUSTOMER"] = "customer";
@@ -87,11 +86,6 @@ var UpdateAdditionalInformationOrderInputFields;
87
86
  (function (UpdateAdditionalInformationOrderInputFields) {
88
87
  UpdateAdditionalInformationOrderInputFields["COLUMN_DATA"] = "data";
89
88
  })(UpdateAdditionalInformationOrderInputFields = exports.UpdateAdditionalInformationOrderInputFields || (exports.UpdateAdditionalInformationOrderInputFields = {}));
90
- var UploadAttachmentOrderInputFields;
91
- (function (UploadAttachmentOrderInputFields) {
92
- UploadAttachmentOrderInputFields["COLUMN_NAME"] = "name";
93
- UploadAttachmentOrderInputFields["COLUMN_FILE_ENCODED"] = "fileEncoded";
94
- })(UploadAttachmentOrderInputFields = exports.UploadAttachmentOrderInputFields || (exports.UploadAttachmentOrderInputFields = {}));
95
89
  class OrdersClient extends abstractRestfulClient_1.AbstractRestfulClient {
96
90
  constructor() {
97
91
  super(...arguments);
@@ -144,24 +138,6 @@ class OrdersClient extends abstractRestfulClient_1.AbstractRestfulClient {
144
138
  this.path = `/${orderReference}/additionalInformation`;
145
139
  await this.patch(payload, parameters);
146
140
  }
147
- async getAttachmentsOrder(orderReference, perPage, page, parameters = {}) {
148
- this.path = `/${orderReference}/attachment`;
149
- if (perPage) {
150
- this.setPerPage(perPage);
151
- }
152
- if (page) {
153
- this.setPage(page);
154
- }
155
- return new getResult_1.GetResult(attachment_1.AttachmentsListOrder, await this.get(parameters));
156
- }
157
- async deleteAttachmentOrder(orderReference, name, parameters = {}) {
158
- this.path = `/${orderReference}/attachment/${name}`;
159
- await this.delete(parameters);
160
- }
161
- async uploadAttachmentOrder(orderReference, payload, parameters = {}) {
162
- this.path = `/${orderReference}/attachment`;
163
- return new getResult_1.GetResult(attachment_1.AttachmentOrder, await this.post(payload, parameters));
164
- }
165
141
  }
166
142
  exports.OrdersClient = OrdersClient;
167
143
  //# sourceMappingURL=ordersClient.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.186.0",
7
+ "version": "3.187.0-rc-jpb.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",
@@ -90,4 +90,4 @@
90
90
  "type-fest": "^2.19.0",
91
91
  "validatorjs": "3.22.1"
92
92
  }
93
- }
93
+ }
@@ -1,34 +0,0 @@
1
- import { AbstractEntity } from '../../../abstractEntity';
2
- export declare enum AttachmentOrderFields {
3
- COLUMN_LAST_MODIFIED = "lastModified",
4
- COLUMN_METADATA = "metadata",
5
- COLUMN_NAME = "name",
6
- COLUMN_URL = "url"
7
- }
8
- export declare type AttachmentOrderType = {
9
- [AttachmentOrderFields.COLUMN_LAST_MODIFIED]: string;
10
- [AttachmentOrderFields.COLUMN_METADATA]?: Record<string, string>;
11
- [AttachmentOrderFields.COLUMN_NAME]: string;
12
- [AttachmentOrderFields.COLUMN_URL]: string;
13
- };
14
- export declare enum AttachmentsOrderListFields {
15
- COLUMN_ATTACHMENTS = "attachments"
16
- }
17
- export declare type AttachmentsOrderListType = {
18
- [AttachmentsOrderListFields.COLUMN_ATTACHMENTS]: AttachmentOrderType[];
19
- };
20
- export declare class AttachmentOrder extends AbstractEntity<AttachmentOrderType> {
21
- #private;
22
- constructor(attachmentOrderTypeInput: AttachmentOrderType);
23
- get lastModified(): string;
24
- get metadata(): Record<string, string> | undefined;
25
- get name(): string;
26
- get url(): string;
27
- toJSON(): AttachmentOrderType;
28
- }
29
- export declare class AttachmentsListOrder extends AbstractEntity<AttachmentsOrderListType> {
30
- #private;
31
- constructor(attachmentsListOrderTypeInput: AttachmentsOrderListType);
32
- get attachments(): AttachmentOrder[];
33
- toJSON(): AttachmentsOrderListType;
34
- }
@@ -1,80 +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 _AttachmentOrder_lastModified, _AttachmentOrder_metadata, _AttachmentOrder_name, _AttachmentOrder_url, _AttachmentsListOrder_attachments;
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.AttachmentsListOrder = exports.AttachmentOrder = exports.AttachmentsOrderListFields = exports.AttachmentOrderFields = void 0;
16
- const abstractEntity_1 = require("../../../abstractEntity");
17
- var AttachmentOrderFields;
18
- (function (AttachmentOrderFields) {
19
- AttachmentOrderFields["COLUMN_LAST_MODIFIED"] = "lastModified";
20
- AttachmentOrderFields["COLUMN_METADATA"] = "metadata";
21
- AttachmentOrderFields["COLUMN_NAME"] = "name";
22
- AttachmentOrderFields["COLUMN_URL"] = "url";
23
- })(AttachmentOrderFields = exports.AttachmentOrderFields || (exports.AttachmentOrderFields = {}));
24
- var AttachmentsOrderListFields;
25
- (function (AttachmentsOrderListFields) {
26
- AttachmentsOrderListFields["COLUMN_ATTACHMENTS"] = "attachments";
27
- })(AttachmentsOrderListFields = exports.AttachmentsOrderListFields || (exports.AttachmentsOrderListFields = {}));
28
- class AttachmentOrder extends abstractEntity_1.AbstractEntity {
29
- constructor(attachmentOrderTypeInput) {
30
- super(attachmentOrderTypeInput);
31
- _AttachmentOrder_lastModified.set(this, void 0);
32
- _AttachmentOrder_metadata.set(this, void 0);
33
- _AttachmentOrder_name.set(this, void 0);
34
- _AttachmentOrder_url.set(this, void 0);
35
- __classPrivateFieldSet(this, _AttachmentOrder_lastModified, attachmentOrderTypeInput[AttachmentOrderFields.COLUMN_LAST_MODIFIED], "f");
36
- __classPrivateFieldSet(this, _AttachmentOrder_metadata, attachmentOrderTypeInput[AttachmentOrderFields.COLUMN_METADATA], "f");
37
- __classPrivateFieldSet(this, _AttachmentOrder_name, attachmentOrderTypeInput[AttachmentOrderFields.COLUMN_NAME], "f");
38
- __classPrivateFieldSet(this, _AttachmentOrder_url, attachmentOrderTypeInput[AttachmentOrderFields.COLUMN_URL], "f");
39
- }
40
- get lastModified() {
41
- return __classPrivateFieldGet(this, _AttachmentOrder_lastModified, "f");
42
- }
43
- get metadata() {
44
- return __classPrivateFieldGet(this, _AttachmentOrder_metadata, "f");
45
- }
46
- get name() {
47
- return __classPrivateFieldGet(this, _AttachmentOrder_name, "f");
48
- }
49
- get url() {
50
- return __classPrivateFieldGet(this, _AttachmentOrder_url, "f");
51
- }
52
- toJSON() {
53
- return {
54
- [AttachmentOrderFields.COLUMN_LAST_MODIFIED]: this.lastModified,
55
- [AttachmentOrderFields.COLUMN_METADATA]: this.metadata,
56
- [AttachmentOrderFields.COLUMN_NAME]: this.name,
57
- [AttachmentOrderFields.COLUMN_URL]: this.url,
58
- };
59
- }
60
- }
61
- exports.AttachmentOrder = AttachmentOrder;
62
- _AttachmentOrder_lastModified = new WeakMap(), _AttachmentOrder_metadata = new WeakMap(), _AttachmentOrder_name = new WeakMap(), _AttachmentOrder_url = new WeakMap();
63
- class AttachmentsListOrder extends abstractEntity_1.AbstractEntity {
64
- constructor(attachmentsListOrderTypeInput) {
65
- super(attachmentsListOrderTypeInput);
66
- _AttachmentsListOrder_attachments.set(this, void 0);
67
- __classPrivateFieldSet(this, _AttachmentsListOrder_attachments, attachmentsListOrderTypeInput[AttachmentsOrderListFields.COLUMN_ATTACHMENTS].map((attachment) => new AttachmentOrder(attachment)), "f");
68
- }
69
- get attachments() {
70
- return __classPrivateFieldGet(this, _AttachmentsListOrder_attachments, "f");
71
- }
72
- toJSON() {
73
- return {
74
- [AttachmentsOrderListFields.COLUMN_ATTACHMENTS]: this.attachments.map((attachment) => attachment.toJSON()),
75
- };
76
- }
77
- }
78
- exports.AttachmentsListOrder = AttachmentsListOrder;
79
- _AttachmentsListOrder_attachments = new WeakMap();
80
- //# sourceMappingURL=attachment.js.map