@arrowsphere/api-client 3.187.0-rc-jpb.1 → 3.187.0-rc-cni-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 +12 -0
- package/build/licenses/entities/filterFindResult.d.ts +2 -8
- package/build/licenses/licensesClient.d.ts +0 -6
- package/build/licenses/licensesClient.js +0 -13
- package/build/orders/entities/orders/attachment.d.ts +34 -0
- package/build/orders/entities/orders/attachment.js +80 -0
- package/build/orders/index.d.ts +1 -0
- package/build/orders/index.js +1 -0
- package/build/orders/ordersClient.d.ts +12 -0
- package/build/orders/ordersClient.js +25 -1
- package/build/organisationUnit/organizationUnitClient.d.ts +3 -3
- package/build/organisationUnit/organizationUnitClient.js +8 -11
- package/package.json +2 -2
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.187.0] - 2025.04.17
|
|
7
|
+
|
|
8
|
+
### Modified
|
|
9
|
+
- [organizationUnit] Change the URL Endpoint BasePath
|
|
10
|
+
|
|
11
|
+
## [3.186.0] - 2025.04.15
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
- [graphql-api] add endpoint `getAttachmentsOrder` to get order attachments list
|
|
15
|
+
- [graphql-api] add endpoint `deleteAttachmentOrder` to delete one order attachment
|
|
16
|
+
- [graphql-api] add endpoint `uploadAttachmentOrder` to add new attachment to an order
|
|
17
|
+
|
|
6
18
|
## [3.185.0] - 2025.04.11
|
|
7
19
|
|
|
8
20
|
### Added
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
import { AbstractEntity } from '../../abstractEntity';
|
|
2
2
|
import { LicenseFindResultFields } from './license/licenseFindResult';
|
|
3
|
-
declare type FilterFindResultDataIterable = {
|
|
4
|
-
[field in LicenseFindResultFields]?: unknown;
|
|
5
|
-
};
|
|
6
3
|
/**
|
|
7
4
|
* Filter data values
|
|
8
5
|
*/
|
|
9
|
-
export declare type FilterFindResultDataValues =
|
|
10
|
-
|
|
11
|
-
count: number;
|
|
12
|
-
values: string[];
|
|
6
|
+
export declare type FilterFindResultDataValues = {
|
|
7
|
+
[field in LicenseFindResultFields]?: unknown;
|
|
13
8
|
};
|
|
14
9
|
/**
|
|
15
10
|
* Filter data
|
|
@@ -49,4 +44,3 @@ export declare class FilterFindResult extends AbstractEntity<FilterFindResultDat
|
|
|
49
44
|
*/
|
|
50
45
|
toJSON(): FilterFindResultData;
|
|
51
46
|
}
|
|
52
|
-
export {};
|
|
@@ -32,10 +32,6 @@ 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",
|
|
39
35
|
/**
|
|
40
36
|
* The key for keyword search query parameter (to search one string in all available search fields)
|
|
41
37
|
*/
|
|
@@ -181,7 +177,6 @@ export declare type LicenseRawFiltersParameters = {
|
|
|
181
177
|
* Payload to pass the find request. Contains keyword(s), sort options, column filters and highlight option.
|
|
182
178
|
*/
|
|
183
179
|
export declare type LicenseFindPayload = {
|
|
184
|
-
[LicenseFindParameters.DATA_AGGREGATION]?: string[];
|
|
185
180
|
[LicenseFindParameters.DATA_KEYWORD]?: string;
|
|
186
181
|
[LicenseFindParameters.DATA_KEYWORDS]?: LicenseKeywordsParameters;
|
|
187
182
|
[LicenseFindParameters.DATA_FILTERS]?: LicenseFiltersParameters;
|
|
@@ -190,7 +185,6 @@ export declare type LicenseFindPayload = {
|
|
|
190
185
|
[LicenseFindParameters.DATA_HIGHLIGHT]?: boolean;
|
|
191
186
|
};
|
|
192
187
|
export declare type LicenseFindRawPayload = {
|
|
193
|
-
[LicenseFindParameters.DATA_AGGREGATION]?: string[];
|
|
194
188
|
[LicenseFindParameters.DATA_KEYWORD]?: string;
|
|
195
189
|
[LicenseFindParameters.DATA_KEYWORDS]?: {
|
|
196
190
|
license?: LicenseRawKeywordsParametersLicence;
|
|
@@ -27,10 +27,6 @@ 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";
|
|
34
30
|
/**
|
|
35
31
|
* The key for keyword search query parameter (to search one string in all available search fields)
|
|
36
32
|
*/
|
|
@@ -261,7 +257,6 @@ class LicensesClient extends abstractRestfulClient_1.AbstractRestfulClient {
|
|
|
261
257
|
this.setPerPage(perPage);
|
|
262
258
|
this.setPage(page);
|
|
263
259
|
const rawLicensePayload = {
|
|
264
|
-
aggregations: postData.aggregations,
|
|
265
260
|
keyword: postData.keyword,
|
|
266
261
|
highlight: postData.highlight,
|
|
267
262
|
};
|
|
@@ -273,14 +268,6 @@ class LicensesClient extends abstractRestfulClient_1.AbstractRestfulClient {
|
|
|
273
268
|
...this.createKeywords(postData.keywords, 'endCustomerOrganizationUnit'),
|
|
274
269
|
};
|
|
275
270
|
}
|
|
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
|
-
}
|
|
284
271
|
if (postData.filters) {
|
|
285
272
|
// Flatten with prefix for each type of filter (license and offer)
|
|
286
273
|
rawLicensePayload.filters = {
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
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
|
package/build/orders/index.d.ts
CHANGED
package/build/orders/index.js
CHANGED
|
@@ -15,6 +15,7 @@ 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);
|
|
18
19
|
__exportStar(require("./entities/orders/order"), exports);
|
|
19
20
|
__exportStar(require("./entities/orders/updateOrderResult"), exports);
|
|
20
21
|
__exportStar(require("./entities/orders/partner/partner"), exports);
|
|
@@ -3,6 +3,7 @@ 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';
|
|
6
7
|
export declare enum CreateOrderInputFields {
|
|
7
8
|
COLUMN_CUSTOMER = "customer",
|
|
8
9
|
COLUMN_REFERENCE = "reference",
|
|
@@ -164,6 +165,14 @@ export declare enum UpdateAdditionalInformationOrderInputFields {
|
|
|
164
165
|
export declare type UpdateAdditionalInformationOrderInputType = {
|
|
165
166
|
[UpdateAdditionalInformationOrderInputFields.COLUMN_DATA]: UpdateAdditionalInformationItemOrderInputType[];
|
|
166
167
|
};
|
|
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
|
+
};
|
|
167
176
|
export declare class OrdersClient extends AbstractRestfulClient {
|
|
168
177
|
/**
|
|
169
178
|
* The base path of the API
|
|
@@ -180,4 +189,7 @@ export declare class OrdersClient extends AbstractRestfulClient {
|
|
|
180
189
|
validateOrder(orderReference: string, parameters?: Parameters): Promise<void>;
|
|
181
190
|
updateStaffContributorsOrder(orderReference: string, payload: UpdateContributorOrderInputType, parameters?: Parameters): Promise<void>;
|
|
182
191
|
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>>;
|
|
183
195
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OrdersClient = exports.UpdateAdditionalInformationOrderInputFields = exports.UpdateAdditionalInformationItemOrderInputFields = exports.UpdateContributorOrderInputFields = exports.UpdateContributorItemOrderInputFields = exports.UpdateOrderInputFields = exports.StaffTypeEnum = exports.scenarioType = exports.CreateOrderInputFields = void 0;
|
|
3
|
+
exports.OrdersClient = exports.UploadAttachmentOrderInputFields = 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");
|
|
9
10
|
var CreateOrderInputFields;
|
|
10
11
|
(function (CreateOrderInputFields) {
|
|
11
12
|
CreateOrderInputFields["COLUMN_CUSTOMER"] = "customer";
|
|
@@ -86,6 +87,11 @@ var UpdateAdditionalInformationOrderInputFields;
|
|
|
86
87
|
(function (UpdateAdditionalInformationOrderInputFields) {
|
|
87
88
|
UpdateAdditionalInformationOrderInputFields["COLUMN_DATA"] = "data";
|
|
88
89
|
})(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 = {}));
|
|
89
95
|
class OrdersClient extends abstractRestfulClient_1.AbstractRestfulClient {
|
|
90
96
|
constructor() {
|
|
91
97
|
super(...arguments);
|
|
@@ -138,6 +144,24 @@ class OrdersClient extends abstractRestfulClient_1.AbstractRestfulClient {
|
|
|
138
144
|
this.path = `/${orderReference}/additionalInformation`;
|
|
139
145
|
await this.patch(payload, parameters);
|
|
140
146
|
}
|
|
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
|
+
}
|
|
141
165
|
}
|
|
142
166
|
exports.OrdersClient = OrdersClient;
|
|
143
167
|
//# sourceMappingURL=ordersClient.js.map
|
|
@@ -20,8 +20,8 @@ export declare class OrganizationUnitClient extends AbstractRestfulClient {
|
|
|
20
20
|
protected basePath: string;
|
|
21
21
|
getList(perPage?: number, page?: number, parameters?: Parameters): Promise<GetResult<OrganizationUnitList>>;
|
|
22
22
|
create(payload: OrganizationUnitPayloadType, parameters?: Parameters): Promise<GetResult<OrganizationUnit>>;
|
|
23
|
-
getOne(
|
|
24
|
-
update(
|
|
25
|
-
deleteOne(
|
|
23
|
+
getOne(ouRef: string, parameters?: Parameters): Promise<GetResult<OrganizationUnit>>;
|
|
24
|
+
update(ouRef: string, payload: OrganizationUnitPayloadType, parameters?: Parameters): Promise<GetResult<OrganizationUnit>>;
|
|
25
|
+
deleteOne(ouRef: string, parameters?: Parameters): Promise<void>;
|
|
26
26
|
batchUpdate(action: OrganizationUnitClientActionFields, organizationUnitRef: string, payload: OrganizationUnitClientActionType, parameters?: Parameters): Promise<void>;
|
|
27
27
|
}
|
|
@@ -17,7 +17,7 @@ var OrganizationUnitClientActionFields;
|
|
|
17
17
|
class OrganizationUnitClient extends abstractRestfulClient_1.AbstractRestfulClient {
|
|
18
18
|
constructor() {
|
|
19
19
|
super(...arguments);
|
|
20
|
-
this.basePath = '/
|
|
20
|
+
this.basePath = '/organizationUnit';
|
|
21
21
|
}
|
|
22
22
|
async getList(perPage = 25, page = 1, parameters = {}) {
|
|
23
23
|
this.setPage(page);
|
|
@@ -27,24 +27,21 @@ class OrganizationUnitClient extends abstractRestfulClient_1.AbstractRestfulClie
|
|
|
27
27
|
async create(payload, parameters = {}) {
|
|
28
28
|
return new getResult_1.GetResult(organizationUnit_1.OrganizationUnit, await this.post(payload, parameters));
|
|
29
29
|
}
|
|
30
|
-
async getOne(
|
|
31
|
-
this.path =
|
|
30
|
+
async getOne(ouRef, parameters = {}) {
|
|
31
|
+
this.path = `/ouRef/${ouRef}`;
|
|
32
32
|
return new getResult_1.GetResult(organizationUnit_1.OrganizationUnit, await this.get(parameters));
|
|
33
33
|
}
|
|
34
|
-
async update(
|
|
35
|
-
this.path =
|
|
34
|
+
async update(ouRef, payload, parameters = {}) {
|
|
35
|
+
this.path = `/ouRef/${ouRef}`;
|
|
36
36
|
return new getResult_1.GetResult(organizationUnit_1.OrganizationUnit, await this.patch(payload, parameters));
|
|
37
37
|
}
|
|
38
|
-
async deleteOne(
|
|
39
|
-
this.path =
|
|
38
|
+
async deleteOne(ouRef, parameters = {}) {
|
|
39
|
+
this.path = `/ouRef/${ouRef}`;
|
|
40
40
|
return await this.delete(parameters);
|
|
41
41
|
}
|
|
42
42
|
async batchUpdate(action, organizationUnitRef, payload, parameters = {}) {
|
|
43
|
-
this.basePath = '/organizationUnit';
|
|
44
43
|
this.path = `/${action}/${organizationUnitRef}`;
|
|
45
|
-
|
|
46
|
-
this.basePath = '/partners/organizationUnits';
|
|
47
|
-
return response;
|
|
44
|
+
return await this.patch(payload, parameters);
|
|
48
45
|
}
|
|
49
46
|
}
|
|
50
47
|
exports.OrganizationUnitClient = OrganizationUnitClient;
|
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.187.0-rc-
|
|
7
|
+
"version": "3.187.0-rc-cni-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
|
+
}
|