@arrowsphere/api-client 3.88.0-rc.fdi.2 → 3.89.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 +7 -2
- package/build/abstractRestfulClient.js +3 -0
- package/build/licenses/index.d.ts +1 -0
- package/build/licenses/index.js +1 -0
- package/build/licenses/licensesClient.d.ts +6 -0
- package/build/licenses/licensesClient.js +29 -0
- package/build/licenses/types/bulkArguments.d.ts +35 -0
- package/build/licenses/types/bulkArguments.js +33 -0
- package/build/organisationUnit/entities/organizationUnit.d.ts +4 -1
- package/build/organisationUnit/entities/organizationUnit.js +9 -2
- package/build/organisationUnit/organizationUnitClient.d.ts +0 -9
- package/build/organisationUnit/organizationUnitClient.js +1 -11
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,10 +3,15 @@
|
|
|
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.
|
|
6
|
+
## [3.89.0] - 2024.01.11
|
|
7
7
|
|
|
8
8
|
### Added
|
|
9
|
-
- add
|
|
9
|
+
- [Organization Unit] add countLicenses fields to get List organization unit
|
|
10
|
+
|
|
11
|
+
## [3.88.0] - 2024.01.08
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
- [license] add bulk action on licenses
|
|
10
15
|
|
|
11
16
|
## [3.87.0] - 2024.01.08
|
|
12
17
|
|
|
@@ -321,6 +321,9 @@ class AbstractRestfulClient extends AbstractHttpClient_1.AbstractHttpClient {
|
|
|
321
321
|
? ParameterKeys.PER_PAGE_CAMEL
|
|
322
322
|
: ParameterKeys.PER_PAGE] = `${this.perPage}`;
|
|
323
323
|
}
|
|
324
|
+
// to keep client stateless
|
|
325
|
+
this.page = 1;
|
|
326
|
+
this.perPage = 0;
|
|
324
327
|
return params;
|
|
325
328
|
}
|
|
326
329
|
}
|
package/build/licenses/index.js
CHANGED
|
@@ -57,4 +57,5 @@ __exportStar(require("./licenseRequestClient"), exports);
|
|
|
57
57
|
__exportStar(require("./licensesClient"), exports);
|
|
58
58
|
__exportStar(require("./entities/license/securityFindResult"), exports);
|
|
59
59
|
__exportStar(require("./licensesEventClient"), exports);
|
|
60
|
+
__exportStar(require("./types/bulkArguments"), exports);
|
|
60
61
|
//# sourceMappingURL=index.js.map
|
|
@@ -22,6 +22,7 @@ import { CredentialsResult } from './entities/license/credentialsResult';
|
|
|
22
22
|
import { ScheduleTasksResult } from './entities/schedule/scheduleTasksResult';
|
|
23
23
|
import { GetPricingRateResult, RateTypeEnum } from './entities/pricingRate/getPricingRateResult';
|
|
24
24
|
import { PartialResponse } from '../partialResponse';
|
|
25
|
+
import { BulkBodyArgument } from './types/bulkArguments';
|
|
25
26
|
/**
|
|
26
27
|
* Parameters passable to the request for refining search.
|
|
27
28
|
*/
|
|
@@ -301,6 +302,10 @@ export declare class LicensesClient extends AbstractRestfulClient {
|
|
|
301
302
|
* The path to get/set pricing rate on a license
|
|
302
303
|
*/
|
|
303
304
|
private PRICING_RATE_PATH;
|
|
305
|
+
/**
|
|
306
|
+
* The path to apply bulk action on license(s)
|
|
307
|
+
*/
|
|
308
|
+
private BULK_PATH;
|
|
304
309
|
/**
|
|
305
310
|
* Returns the raw result from the find endpoint call
|
|
306
311
|
*
|
|
@@ -325,6 +330,7 @@ export declare class LicensesClient extends AbstractRestfulClient {
|
|
|
325
330
|
getConfigsRaw(reference: string): Promise<FindConfig>;
|
|
326
331
|
getConfigs(reference: string): AsyncGenerator<ConfigFindResultData>;
|
|
327
332
|
updateConfigRaw(reference: string, config: ConfigFindResult): Promise<ConfigFindResultData>;
|
|
333
|
+
bulkAction(bulkData: BulkBodyArgument): Promise<void>;
|
|
328
334
|
updateConfig(reference: string, config: ConfigFindResult): Promise<ConfigFindResult>;
|
|
329
335
|
getLicense(licenseReference: string, parameters?: Parameters): Promise<GetResult<GetLicenseResult>>;
|
|
330
336
|
updateLicense(licenseReference: string, payload: UpdateLicenseData, parameters?: Parameters): Promise<void | PartialResponse>;
|
|
@@ -18,6 +18,7 @@ const scheduleTasksResult_1 = require("./entities/schedule/scheduleTasksResult")
|
|
|
18
18
|
const getPricingRateResult_1 = require("./entities/pricingRate/getPricingRateResult");
|
|
19
19
|
const partialResponse_1 = require("../partialResponse");
|
|
20
20
|
const http2_1 = require("http2");
|
|
21
|
+
const bulkArguments_1 = require("./types/bulkArguments");
|
|
21
22
|
/**
|
|
22
23
|
* Parameters passable to the request for refining search.
|
|
23
24
|
*/
|
|
@@ -196,6 +197,10 @@ class LicensesClient extends abstractRestfulClient_1.AbstractRestfulClient {
|
|
|
196
197
|
* The path to get/set pricing rate on a license
|
|
197
198
|
*/
|
|
198
199
|
this.PRICING_RATE_PATH = '/pricing-rate';
|
|
200
|
+
/**
|
|
201
|
+
* The path to apply bulk action on license(s)
|
|
202
|
+
*/
|
|
203
|
+
this.BULK_PATH = '/bulk';
|
|
199
204
|
}
|
|
200
205
|
/**
|
|
201
206
|
* Returns the raw result from the find endpoint call
|
|
@@ -277,6 +282,30 @@ class LicensesClient extends abstractRestfulClient_1.AbstractRestfulClient {
|
|
|
277
282
|
};
|
|
278
283
|
return await this.post(postData);
|
|
279
284
|
}
|
|
285
|
+
async bulkAction(bulkData) {
|
|
286
|
+
this.path = this.BULK_PATH;
|
|
287
|
+
let postData = {
|
|
288
|
+
[bulkArguments_1.BulkBodyFields.ACTION_TYPE]: bulkData.actionType,
|
|
289
|
+
[bulkArguments_1.BulkBodyFields.LICENSES]: bulkData.licenses,
|
|
290
|
+
};
|
|
291
|
+
if (bulkData.actionType == bulkArguments_1.ActionTypes.AUTO_RENEW) {
|
|
292
|
+
const postAutoRenewData = {
|
|
293
|
+
...postData,
|
|
294
|
+
[bulkArguments_1.BulkBodyFields.AUTO_RENEW_STATUS]: bulkData.autoRenewStatus,
|
|
295
|
+
};
|
|
296
|
+
postData = postAutoRenewData;
|
|
297
|
+
}
|
|
298
|
+
else if (bulkData.actionType == bulkArguments_1.ActionTypes.SET_RATE) {
|
|
299
|
+
const postSetRateData = {
|
|
300
|
+
...postData,
|
|
301
|
+
[bulkArguments_1.BulkBodyFields.SPECIAL_PRICE_RATE_TYPE]: bulkData.specialPriceRateType,
|
|
302
|
+
[bulkArguments_1.BulkBodyFields.SPECIAL_PRICE_RATE_VALUE]: bulkData.specialPriceRateValue,
|
|
303
|
+
[bulkArguments_1.BulkBodyFields.SPECIAL_RATE_EFFECTIVE_APPLICATION_DATE]: bulkData.specialRateEffectiveApplicationDate,
|
|
304
|
+
};
|
|
305
|
+
postData = postSetRateData;
|
|
306
|
+
}
|
|
307
|
+
return await this.post(postData);
|
|
308
|
+
}
|
|
280
309
|
async updateConfig(reference, config) {
|
|
281
310
|
const rawResponse = await this.updateConfigRaw(reference, config);
|
|
282
311
|
return new configFindResult_1.ConfigFindResult(rawResponse);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Except } from 'type-fest';
|
|
2
|
+
export declare enum ActionTypes {
|
|
3
|
+
SET_RATE = "setRate",
|
|
4
|
+
AUTO_RENEW = "autoRenew"
|
|
5
|
+
}
|
|
6
|
+
export declare enum AutoRenewStatuses {
|
|
7
|
+
OFF = "off",
|
|
8
|
+
ON = "on"
|
|
9
|
+
}
|
|
10
|
+
export declare enum SpecialPriceRateTypes {
|
|
11
|
+
DISCOUNT = "discount",
|
|
12
|
+
UPLIFT = "uplift"
|
|
13
|
+
}
|
|
14
|
+
export declare enum SpecialRateEffectiveApplicationDate {
|
|
15
|
+
APPLY_IMMEDIATELY = "apply immediately",
|
|
16
|
+
APPLY_ON_NEXT_BILLING_PERIOD = "apply on next billing period"
|
|
17
|
+
}
|
|
18
|
+
export declare enum BulkBodyFields {
|
|
19
|
+
ACTION_TYPE = "actionType",
|
|
20
|
+
AUTO_RENEW_STATUS = "autoRenewStatus",
|
|
21
|
+
LICENSES = "licenses",
|
|
22
|
+
SPECIAL_PRICE_RATE_TYPE = "specialPriceRateType",
|
|
23
|
+
SPECIAL_PRICE_RATE_VALUE = "specialPriceRateValue",
|
|
24
|
+
SPECIAL_RATE_EFFECTIVE_APPLICATION_DATE = "specialRateEffectiveApplicationDate"
|
|
25
|
+
}
|
|
26
|
+
export declare type BulkBodyArgument = {
|
|
27
|
+
[BulkBodyFields.ACTION_TYPE]: ActionTypes;
|
|
28
|
+
[BulkBodyFields.LICENSES]: string[];
|
|
29
|
+
[BulkBodyFields.AUTO_RENEW_STATUS]?: AutoRenewStatuses;
|
|
30
|
+
[BulkBodyFields.SPECIAL_PRICE_RATE_TYPE]?: SpecialPriceRateTypes;
|
|
31
|
+
[BulkBodyFields.SPECIAL_PRICE_RATE_VALUE]?: string;
|
|
32
|
+
[BulkBodyFields.SPECIAL_RATE_EFFECTIVE_APPLICATION_DATE]?: SpecialRateEffectiveApplicationDate;
|
|
33
|
+
};
|
|
34
|
+
export declare type BulkAutoRenewBody = Except<BulkBodyArgument, BulkBodyFields.SPECIAL_PRICE_RATE_TYPE & BulkBodyFields.SPECIAL_PRICE_RATE_VALUE & BulkBodyFields.SPECIAL_RATE_EFFECTIVE_APPLICATION_DATE>;
|
|
35
|
+
export declare type BulkSetRateBody = Except<BulkBodyArgument, BulkBodyFields.AUTO_RENEW_STATUS>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BulkBodyFields = exports.SpecialRateEffectiveApplicationDate = exports.SpecialPriceRateTypes = exports.AutoRenewStatuses = exports.ActionTypes = void 0;
|
|
4
|
+
var ActionTypes;
|
|
5
|
+
(function (ActionTypes) {
|
|
6
|
+
ActionTypes["SET_RATE"] = "setRate";
|
|
7
|
+
ActionTypes["AUTO_RENEW"] = "autoRenew";
|
|
8
|
+
})(ActionTypes = exports.ActionTypes || (exports.ActionTypes = {}));
|
|
9
|
+
var AutoRenewStatuses;
|
|
10
|
+
(function (AutoRenewStatuses) {
|
|
11
|
+
AutoRenewStatuses["OFF"] = "off";
|
|
12
|
+
AutoRenewStatuses["ON"] = "on";
|
|
13
|
+
})(AutoRenewStatuses = exports.AutoRenewStatuses || (exports.AutoRenewStatuses = {}));
|
|
14
|
+
var SpecialPriceRateTypes;
|
|
15
|
+
(function (SpecialPriceRateTypes) {
|
|
16
|
+
SpecialPriceRateTypes["DISCOUNT"] = "discount";
|
|
17
|
+
SpecialPriceRateTypes["UPLIFT"] = "uplift";
|
|
18
|
+
})(SpecialPriceRateTypes = exports.SpecialPriceRateTypes || (exports.SpecialPriceRateTypes = {}));
|
|
19
|
+
var SpecialRateEffectiveApplicationDate;
|
|
20
|
+
(function (SpecialRateEffectiveApplicationDate) {
|
|
21
|
+
SpecialRateEffectiveApplicationDate["APPLY_IMMEDIATELY"] = "apply immediately";
|
|
22
|
+
SpecialRateEffectiveApplicationDate["APPLY_ON_NEXT_BILLING_PERIOD"] = "apply on next billing period";
|
|
23
|
+
})(SpecialRateEffectiveApplicationDate = exports.SpecialRateEffectiveApplicationDate || (exports.SpecialRateEffectiveApplicationDate = {}));
|
|
24
|
+
var BulkBodyFields;
|
|
25
|
+
(function (BulkBodyFields) {
|
|
26
|
+
BulkBodyFields["ACTION_TYPE"] = "actionType";
|
|
27
|
+
BulkBodyFields["AUTO_RENEW_STATUS"] = "autoRenewStatus";
|
|
28
|
+
BulkBodyFields["LICENSES"] = "licenses";
|
|
29
|
+
BulkBodyFields["SPECIAL_PRICE_RATE_TYPE"] = "specialPriceRateType";
|
|
30
|
+
BulkBodyFields["SPECIAL_PRICE_RATE_VALUE"] = "specialPriceRateValue";
|
|
31
|
+
BulkBodyFields["SPECIAL_RATE_EFFECTIVE_APPLICATION_DATE"] = "specialRateEffectiveApplicationDate";
|
|
32
|
+
})(BulkBodyFields = exports.BulkBodyFields || (exports.BulkBodyFields = {}));
|
|
33
|
+
//# sourceMappingURL=bulkArguments.js.map
|
|
@@ -4,7 +4,8 @@ export declare enum OrganizationUnitFields {
|
|
|
4
4
|
COLUMN_COMPANY_REF = "companyRef",
|
|
5
5
|
COLUMN_NAME = "name",
|
|
6
6
|
COLUMN_COUNT_USERS = "countUsers",
|
|
7
|
-
COLUMN_COUNT_CUSTOMERS = "countCustomers"
|
|
7
|
+
COLUMN_COUNT_CUSTOMERS = "countCustomers",
|
|
8
|
+
COLUMN_COUNT_LICENSES = "countLicenses"
|
|
8
9
|
}
|
|
9
10
|
export declare type OrganizationUnitType = {
|
|
10
11
|
[OrganizationUnitFields.COLUMN_ORGANIZATION_UNIT_REF]: string;
|
|
@@ -12,6 +13,7 @@ export declare type OrganizationUnitType = {
|
|
|
12
13
|
[OrganizationUnitFields.COLUMN_NAME]: string;
|
|
13
14
|
[OrganizationUnitFields.COLUMN_COUNT_USERS]?: number;
|
|
14
15
|
[OrganizationUnitFields.COLUMN_COUNT_CUSTOMERS]?: number;
|
|
16
|
+
[OrganizationUnitFields.COLUMN_COUNT_LICENSES]?: number;
|
|
15
17
|
};
|
|
16
18
|
export declare class OrganizationUnit extends AbstractEntity<OrganizationUnitType> {
|
|
17
19
|
#private;
|
|
@@ -21,5 +23,6 @@ export declare class OrganizationUnit extends AbstractEntity<OrganizationUnitTyp
|
|
|
21
23
|
get name(): string;
|
|
22
24
|
get countUsers(): number | undefined;
|
|
23
25
|
get countCustomers(): number | undefined;
|
|
26
|
+
get countLicenses(): number | undefined;
|
|
24
27
|
toJSON(): OrganizationUnitType;
|
|
25
28
|
}
|
|
@@ -10,7 +10,7 @@ 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 _OrganizationUnit_organizationUnitRef, _OrganizationUnit_companyRef, _OrganizationUnit_name, _OrganizationUnit_countUsers, _OrganizationUnit_countCustomers;
|
|
13
|
+
var _OrganizationUnit_organizationUnitRef, _OrganizationUnit_companyRef, _OrganizationUnit_name, _OrganizationUnit_countUsers, _OrganizationUnit_countCustomers, _OrganizationUnit_countLicenses;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.OrganizationUnit = exports.OrganizationUnitFields = void 0;
|
|
16
16
|
const abstractEntity_1 = require("../../abstractEntity");
|
|
@@ -21,6 +21,7 @@ var OrganizationUnitFields;
|
|
|
21
21
|
OrganizationUnitFields["COLUMN_NAME"] = "name";
|
|
22
22
|
OrganizationUnitFields["COLUMN_COUNT_USERS"] = "countUsers";
|
|
23
23
|
OrganizationUnitFields["COLUMN_COUNT_CUSTOMERS"] = "countCustomers";
|
|
24
|
+
OrganizationUnitFields["COLUMN_COUNT_LICENSES"] = "countLicenses";
|
|
24
25
|
})(OrganizationUnitFields = exports.OrganizationUnitFields || (exports.OrganizationUnitFields = {}));
|
|
25
26
|
class OrganizationUnit extends abstractEntity_1.AbstractEntity {
|
|
26
27
|
constructor(organizationUnitInput) {
|
|
@@ -30,11 +31,13 @@ class OrganizationUnit extends abstractEntity_1.AbstractEntity {
|
|
|
30
31
|
_OrganizationUnit_name.set(this, void 0);
|
|
31
32
|
_OrganizationUnit_countUsers.set(this, void 0);
|
|
32
33
|
_OrganizationUnit_countCustomers.set(this, void 0);
|
|
34
|
+
_OrganizationUnit_countLicenses.set(this, void 0);
|
|
33
35
|
__classPrivateFieldSet(this, _OrganizationUnit_organizationUnitRef, organizationUnitInput[OrganizationUnitFields.COLUMN_ORGANIZATION_UNIT_REF], "f");
|
|
34
36
|
__classPrivateFieldSet(this, _OrganizationUnit_companyRef, organizationUnitInput[OrganizationUnitFields.COLUMN_COMPANY_REF], "f");
|
|
35
37
|
__classPrivateFieldSet(this, _OrganizationUnit_name, organizationUnitInput[OrganizationUnitFields.COLUMN_NAME], "f");
|
|
36
38
|
__classPrivateFieldSet(this, _OrganizationUnit_countUsers, organizationUnitInput[OrganizationUnitFields.COLUMN_COUNT_USERS], "f");
|
|
37
39
|
__classPrivateFieldSet(this, _OrganizationUnit_countCustomers, organizationUnitInput[OrganizationUnitFields.COLUMN_COUNT_CUSTOMERS], "f");
|
|
40
|
+
__classPrivateFieldSet(this, _OrganizationUnit_countLicenses, organizationUnitInput[OrganizationUnitFields.COLUMN_COUNT_LICENSES], "f");
|
|
38
41
|
}
|
|
39
42
|
get organizationUnitRef() {
|
|
40
43
|
return __classPrivateFieldGet(this, _OrganizationUnit_organizationUnitRef, "f");
|
|
@@ -51,6 +54,9 @@ class OrganizationUnit extends abstractEntity_1.AbstractEntity {
|
|
|
51
54
|
get countCustomers() {
|
|
52
55
|
return __classPrivateFieldGet(this, _OrganizationUnit_countCustomers, "f");
|
|
53
56
|
}
|
|
57
|
+
get countLicenses() {
|
|
58
|
+
return __classPrivateFieldGet(this, _OrganizationUnit_countLicenses, "f");
|
|
59
|
+
}
|
|
54
60
|
toJSON() {
|
|
55
61
|
return {
|
|
56
62
|
[OrganizationUnitFields.COLUMN_ORGANIZATION_UNIT_REF]: this
|
|
@@ -59,9 +65,10 @@ class OrganizationUnit extends abstractEntity_1.AbstractEntity {
|
|
|
59
65
|
[OrganizationUnitFields.COLUMN_NAME]: this.name,
|
|
60
66
|
[OrganizationUnitFields.COLUMN_COUNT_USERS]: this.countUsers,
|
|
61
67
|
[OrganizationUnitFields.COLUMN_COUNT_CUSTOMERS]: this.countCustomers,
|
|
68
|
+
[OrganizationUnitFields.COLUMN_COUNT_LICENSES]: this.countLicenses,
|
|
62
69
|
};
|
|
63
70
|
}
|
|
64
71
|
}
|
|
65
72
|
exports.OrganizationUnit = OrganizationUnit;
|
|
66
|
-
_OrganizationUnit_organizationUnitRef = new WeakMap(), _OrganizationUnit_companyRef = new WeakMap(), _OrganizationUnit_name = new WeakMap(), _OrganizationUnit_countUsers = new WeakMap(), _OrganizationUnit_countCustomers = new WeakMap();
|
|
73
|
+
_OrganizationUnit_organizationUnitRef = new WeakMap(), _OrganizationUnit_companyRef = new WeakMap(), _OrganizationUnit_name = new WeakMap(), _OrganizationUnit_countUsers = new WeakMap(), _OrganizationUnit_countCustomers = new WeakMap(), _OrganizationUnit_countLicenses = new WeakMap();
|
|
67
74
|
//# sourceMappingURL=organizationUnit.js.map
|
|
@@ -8,14 +8,6 @@ export declare enum OrganizationUnitPayloadFields {
|
|
|
8
8
|
export declare type OrganizationUnitPayloadType = {
|
|
9
9
|
[OrganizationUnitPayloadFields.COLUMN_NAME]: string;
|
|
10
10
|
};
|
|
11
|
-
export declare enum OrganizationUnitClientActionFields {
|
|
12
|
-
ACTION_ATTACH = "attach",
|
|
13
|
-
ACTION_DETACH = "detach"
|
|
14
|
-
}
|
|
15
|
-
export declare type OrganizationUnitClientActionType = {
|
|
16
|
-
licenses: string[];
|
|
17
|
-
users: string[];
|
|
18
|
-
};
|
|
19
11
|
export declare class OrganizationUnitClient extends AbstractRestfulClient {
|
|
20
12
|
protected basePath: string;
|
|
21
13
|
getList(perPage?: number, page?: number, parameters?: Parameters): Promise<GetResult<OrganizationUnitList>>;
|
|
@@ -23,5 +15,4 @@ export declare class OrganizationUnitClient extends AbstractRestfulClient {
|
|
|
23
15
|
getOne(organizationUnitRef: string, parameters?: Parameters): Promise<GetResult<OrganizationUnit>>;
|
|
24
16
|
update(organizationUnitRef: string, payload: OrganizationUnitPayloadType, parameters?: Parameters): Promise<GetResult<OrganizationUnit>>;
|
|
25
17
|
deleteOne(organizationUnitRef: string, parameters?: Parameters): Promise<void>;
|
|
26
|
-
batchUpdate(action: OrganizationUnitClientActionFields, organizationUnitId: number, payload: OrganizationUnitClientActionType, parameters?: Parameters): Promise<void>;
|
|
27
18
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OrganizationUnitClient = exports.
|
|
3
|
+
exports.OrganizationUnitClient = exports.OrganizationUnitPayloadFields = void 0;
|
|
4
4
|
const abstractRestfulClient_1 = require("../abstractRestfulClient");
|
|
5
5
|
const getResult_1 = require("../getResult");
|
|
6
6
|
const organizationUnit_1 = require("./entities/organizationUnit");
|
|
@@ -9,11 +9,6 @@ var OrganizationUnitPayloadFields;
|
|
|
9
9
|
(function (OrganizationUnitPayloadFields) {
|
|
10
10
|
OrganizationUnitPayloadFields["COLUMN_NAME"] = "name";
|
|
11
11
|
})(OrganizationUnitPayloadFields = exports.OrganizationUnitPayloadFields || (exports.OrganizationUnitPayloadFields = {}));
|
|
12
|
-
var OrganizationUnitClientActionFields;
|
|
13
|
-
(function (OrganizationUnitClientActionFields) {
|
|
14
|
-
OrganizationUnitClientActionFields["ACTION_ATTACH"] = "attach";
|
|
15
|
-
OrganizationUnitClientActionFields["ACTION_DETACH"] = "detach";
|
|
16
|
-
})(OrganizationUnitClientActionFields = exports.OrganizationUnitClientActionFields || (exports.OrganizationUnitClientActionFields = {}));
|
|
17
12
|
class OrganizationUnitClient extends abstractRestfulClient_1.AbstractRestfulClient {
|
|
18
13
|
constructor() {
|
|
19
14
|
super(...arguments);
|
|
@@ -39,11 +34,6 @@ class OrganizationUnitClient extends abstractRestfulClient_1.AbstractRestfulClie
|
|
|
39
34
|
this.path = `/${organizationUnitRef}`;
|
|
40
35
|
return await this.delete(parameters);
|
|
41
36
|
}
|
|
42
|
-
async batchUpdate(action, organizationUnitId, payload, parameters = {}) {
|
|
43
|
-
this.basePath = '/organizationUnit';
|
|
44
|
-
this.path = `/${action}/${organizationUnitId}`;
|
|
45
|
-
return await this.patch(payload, parameters);
|
|
46
|
-
}
|
|
47
37
|
}
|
|
48
38
|
exports.OrganizationUnitClient = OrganizationUnitClient;
|
|
49
39
|
//# sourceMappingURL=organizationUnitClient.js.map
|
package/package.json
CHANGED