@arrowsphere/api-client 3.240.0 → 3.241.0-rc-jpb.4
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/build/licenses/entities/attachment/GetLicenseAttachmentResult.d.ts +22 -0
- package/build/licenses/entities/attachment/GetLicenseAttachmentResult.js +60 -0
- package/build/licenses/entities/attachment/GetLicenseAttachmentsResult.d.ts +14 -0
- package/build/licenses/entities/attachment/GetLicenseAttachmentsResult.js +39 -0
- package/build/licenses/entities/attachment/PostLicenseAttachmentResult.d.ts +22 -0
- package/build/licenses/entities/attachment/PostLicenseAttachmentResult.js +60 -0
- package/build/licenses/licensesClient.d.ts +10 -1
- package/build/licenses/licensesClient.js +21 -5
- package/package.json +1 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../../abstractEntity';
|
|
2
|
+
export declare enum GetLicenseAttachmentResultFields {
|
|
3
|
+
COLUMN_NAME = "name",
|
|
4
|
+
COLUMN_LAST_MODIFIED = "lastModified",
|
|
5
|
+
COLUMN_URL = "url",
|
|
6
|
+
COLUMN_METADATA = "metadata"
|
|
7
|
+
}
|
|
8
|
+
export declare type GetLicenseAttachmentResultData = {
|
|
9
|
+
[GetLicenseAttachmentResultFields.COLUMN_NAME]: string;
|
|
10
|
+
[GetLicenseAttachmentResultFields.COLUMN_LAST_MODIFIED]: string;
|
|
11
|
+
[GetLicenseAttachmentResultFields.COLUMN_URL]: string;
|
|
12
|
+
[GetLicenseAttachmentResultFields.COLUMN_METADATA]?: Record<string, string>;
|
|
13
|
+
};
|
|
14
|
+
export declare class GetLicenseAttachmentResult extends AbstractEntity<GetLicenseAttachmentResultData> {
|
|
15
|
+
#private;
|
|
16
|
+
constructor(input: GetLicenseAttachmentResultData);
|
|
17
|
+
get name(): string;
|
|
18
|
+
get lastModified(): string;
|
|
19
|
+
get url(): string;
|
|
20
|
+
get metadata(): Record<string, string> | undefined;
|
|
21
|
+
toJSON(): GetLicenseAttachmentResultData;
|
|
22
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
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 _GetLicenseAttachmentResult_name, _GetLicenseAttachmentResult_lastModified, _GetLicenseAttachmentResult_url, _GetLicenseAttachmentResult_metadata;
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.GetLicenseAttachmentResult = exports.GetLicenseAttachmentResultFields = void 0;
|
|
16
|
+
const abstractEntity_1 = require("../../../abstractEntity");
|
|
17
|
+
var GetLicenseAttachmentResultFields;
|
|
18
|
+
(function (GetLicenseAttachmentResultFields) {
|
|
19
|
+
GetLicenseAttachmentResultFields["COLUMN_NAME"] = "name";
|
|
20
|
+
GetLicenseAttachmentResultFields["COLUMN_LAST_MODIFIED"] = "lastModified";
|
|
21
|
+
GetLicenseAttachmentResultFields["COLUMN_URL"] = "url";
|
|
22
|
+
GetLicenseAttachmentResultFields["COLUMN_METADATA"] = "metadata";
|
|
23
|
+
})(GetLicenseAttachmentResultFields = exports.GetLicenseAttachmentResultFields || (exports.GetLicenseAttachmentResultFields = {}));
|
|
24
|
+
class GetLicenseAttachmentResult extends abstractEntity_1.AbstractEntity {
|
|
25
|
+
constructor(input) {
|
|
26
|
+
super(input);
|
|
27
|
+
_GetLicenseAttachmentResult_name.set(this, void 0);
|
|
28
|
+
_GetLicenseAttachmentResult_lastModified.set(this, void 0);
|
|
29
|
+
_GetLicenseAttachmentResult_url.set(this, void 0);
|
|
30
|
+
_GetLicenseAttachmentResult_metadata.set(this, void 0);
|
|
31
|
+
__classPrivateFieldSet(this, _GetLicenseAttachmentResult_name, input[GetLicenseAttachmentResultFields.COLUMN_NAME], "f");
|
|
32
|
+
__classPrivateFieldSet(this, _GetLicenseAttachmentResult_lastModified, input[GetLicenseAttachmentResultFields.COLUMN_LAST_MODIFIED], "f");
|
|
33
|
+
__classPrivateFieldSet(this, _GetLicenseAttachmentResult_url, input[GetLicenseAttachmentResultFields.COLUMN_URL], "f");
|
|
34
|
+
__classPrivateFieldSet(this, _GetLicenseAttachmentResult_metadata, input[GetLicenseAttachmentResultFields.COLUMN_METADATA], "f");
|
|
35
|
+
}
|
|
36
|
+
get name() {
|
|
37
|
+
return __classPrivateFieldGet(this, _GetLicenseAttachmentResult_name, "f");
|
|
38
|
+
}
|
|
39
|
+
get lastModified() {
|
|
40
|
+
return __classPrivateFieldGet(this, _GetLicenseAttachmentResult_lastModified, "f");
|
|
41
|
+
}
|
|
42
|
+
get url() {
|
|
43
|
+
return __classPrivateFieldGet(this, _GetLicenseAttachmentResult_url, "f");
|
|
44
|
+
}
|
|
45
|
+
get metadata() {
|
|
46
|
+
return __classPrivateFieldGet(this, _GetLicenseAttachmentResult_metadata, "f");
|
|
47
|
+
}
|
|
48
|
+
toJSON() {
|
|
49
|
+
return {
|
|
50
|
+
[GetLicenseAttachmentResultFields.COLUMN_NAME]: this.name,
|
|
51
|
+
[GetLicenseAttachmentResultFields.COLUMN_LAST_MODIFIED]: this
|
|
52
|
+
.lastModified,
|
|
53
|
+
[GetLicenseAttachmentResultFields.COLUMN_URL]: this.url,
|
|
54
|
+
[GetLicenseAttachmentResultFields.COLUMN_METADATA]: this.metadata,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.GetLicenseAttachmentResult = GetLicenseAttachmentResult;
|
|
59
|
+
_GetLicenseAttachmentResult_name = new WeakMap(), _GetLicenseAttachmentResult_lastModified = new WeakMap(), _GetLicenseAttachmentResult_url = new WeakMap(), _GetLicenseAttachmentResult_metadata = new WeakMap();
|
|
60
|
+
//# sourceMappingURL=GetLicenseAttachmentResult.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../../abstractEntity';
|
|
2
|
+
import { GetLicenseAttachmentResult, GetLicenseAttachmentResultData } from './GetLicenseAttachmentResult';
|
|
3
|
+
export declare enum GetLicenseAttachmentsResultFields {
|
|
4
|
+
COLUMN_ATTACHMENTS = "attachements"
|
|
5
|
+
}
|
|
6
|
+
export declare type GetLicenseAttachmentsResultData = {
|
|
7
|
+
[GetLicenseAttachmentsResultFields.COLUMN_ATTACHMENTS]: GetLicenseAttachmentResultData[];
|
|
8
|
+
};
|
|
9
|
+
export declare class GetLicenseAttachmentsResult extends AbstractEntity<GetLicenseAttachmentsResultData> {
|
|
10
|
+
#private;
|
|
11
|
+
constructor(input: GetLicenseAttachmentsResultData);
|
|
12
|
+
getLicenseAttachments(): GetLicenseAttachmentResult[];
|
|
13
|
+
toJSON(): GetLicenseAttachmentsResultData;
|
|
14
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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 _GetLicenseAttachmentsResult_attachments;
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.GetLicenseAttachmentsResult = exports.GetLicenseAttachmentsResultFields = void 0;
|
|
16
|
+
const abstractEntity_1 = require("../../../abstractEntity");
|
|
17
|
+
const GetLicenseAttachmentResult_1 = require("./GetLicenseAttachmentResult");
|
|
18
|
+
var GetLicenseAttachmentsResultFields;
|
|
19
|
+
(function (GetLicenseAttachmentsResultFields) {
|
|
20
|
+
GetLicenseAttachmentsResultFields["COLUMN_ATTACHMENTS"] = "attachements";
|
|
21
|
+
})(GetLicenseAttachmentsResultFields = exports.GetLicenseAttachmentsResultFields || (exports.GetLicenseAttachmentsResultFields = {}));
|
|
22
|
+
class GetLicenseAttachmentsResult extends abstractEntity_1.AbstractEntity {
|
|
23
|
+
constructor(input) {
|
|
24
|
+
super(input);
|
|
25
|
+
_GetLicenseAttachmentsResult_attachments.set(this, void 0);
|
|
26
|
+
__classPrivateFieldSet(this, _GetLicenseAttachmentsResult_attachments, input[GetLicenseAttachmentsResultFields.COLUMN_ATTACHMENTS].map((result) => new GetLicenseAttachmentResult_1.GetLicenseAttachmentResult(result)), "f");
|
|
27
|
+
}
|
|
28
|
+
getLicenseAttachments() {
|
|
29
|
+
return __classPrivateFieldGet(this, _GetLicenseAttachmentsResult_attachments, "f");
|
|
30
|
+
}
|
|
31
|
+
toJSON() {
|
|
32
|
+
return {
|
|
33
|
+
[GetLicenseAttachmentsResultFields.COLUMN_ATTACHMENTS]: __classPrivateFieldGet(this, _GetLicenseAttachmentsResult_attachments, "f").map((result) => result.toJSON()),
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.GetLicenseAttachmentsResult = GetLicenseAttachmentsResult;
|
|
38
|
+
_GetLicenseAttachmentsResult_attachments = new WeakMap();
|
|
39
|
+
//# sourceMappingURL=GetLicenseAttachmentsResult.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../../abstractEntity';
|
|
2
|
+
export declare enum PostLicenseAttachmentResultFields {
|
|
3
|
+
COLUMN_NAME = "name",
|
|
4
|
+
COLUMN_LAST_MODIFIED = "lastModified",
|
|
5
|
+
COLUMN_URL = "url",
|
|
6
|
+
COLUMN_METADATA = "metadata"
|
|
7
|
+
}
|
|
8
|
+
export declare type PostLicenseAttachmentResultData = {
|
|
9
|
+
[PostLicenseAttachmentResultFields.COLUMN_NAME]: string;
|
|
10
|
+
[PostLicenseAttachmentResultFields.COLUMN_LAST_MODIFIED]: string;
|
|
11
|
+
[PostLicenseAttachmentResultFields.COLUMN_URL]: string;
|
|
12
|
+
[PostLicenseAttachmentResultFields.COLUMN_METADATA]?: Record<string, string>;
|
|
13
|
+
};
|
|
14
|
+
export declare class PostLicenseAttachmentResult extends AbstractEntity<PostLicenseAttachmentResultData> {
|
|
15
|
+
#private;
|
|
16
|
+
constructor(input: PostLicenseAttachmentResultData);
|
|
17
|
+
get name(): string;
|
|
18
|
+
get lastModified(): string;
|
|
19
|
+
get url(): string;
|
|
20
|
+
get metadata(): Record<string, string> | undefined;
|
|
21
|
+
toJSON(): PostLicenseAttachmentResultData;
|
|
22
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
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 _PostLicenseAttachmentResult_name, _PostLicenseAttachmentResult_lastModified, _PostLicenseAttachmentResult_url, _PostLicenseAttachmentResult_metadata;
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.PostLicenseAttachmentResult = exports.PostLicenseAttachmentResultFields = void 0;
|
|
16
|
+
const abstractEntity_1 = require("../../../abstractEntity");
|
|
17
|
+
var PostLicenseAttachmentResultFields;
|
|
18
|
+
(function (PostLicenseAttachmentResultFields) {
|
|
19
|
+
PostLicenseAttachmentResultFields["COLUMN_NAME"] = "name";
|
|
20
|
+
PostLicenseAttachmentResultFields["COLUMN_LAST_MODIFIED"] = "lastModified";
|
|
21
|
+
PostLicenseAttachmentResultFields["COLUMN_URL"] = "url";
|
|
22
|
+
PostLicenseAttachmentResultFields["COLUMN_METADATA"] = "metadata";
|
|
23
|
+
})(PostLicenseAttachmentResultFields = exports.PostLicenseAttachmentResultFields || (exports.PostLicenseAttachmentResultFields = {}));
|
|
24
|
+
class PostLicenseAttachmentResult extends abstractEntity_1.AbstractEntity {
|
|
25
|
+
constructor(input) {
|
|
26
|
+
super(input);
|
|
27
|
+
_PostLicenseAttachmentResult_name.set(this, void 0);
|
|
28
|
+
_PostLicenseAttachmentResult_lastModified.set(this, void 0);
|
|
29
|
+
_PostLicenseAttachmentResult_url.set(this, void 0);
|
|
30
|
+
_PostLicenseAttachmentResult_metadata.set(this, void 0);
|
|
31
|
+
__classPrivateFieldSet(this, _PostLicenseAttachmentResult_name, input[PostLicenseAttachmentResultFields.COLUMN_NAME], "f");
|
|
32
|
+
__classPrivateFieldSet(this, _PostLicenseAttachmentResult_lastModified, input[PostLicenseAttachmentResultFields.COLUMN_LAST_MODIFIED], "f");
|
|
33
|
+
__classPrivateFieldSet(this, _PostLicenseAttachmentResult_url, input[PostLicenseAttachmentResultFields.COLUMN_URL], "f");
|
|
34
|
+
__classPrivateFieldSet(this, _PostLicenseAttachmentResult_metadata, input[PostLicenseAttachmentResultFields.COLUMN_METADATA], "f");
|
|
35
|
+
}
|
|
36
|
+
get name() {
|
|
37
|
+
return __classPrivateFieldGet(this, _PostLicenseAttachmentResult_name, "f");
|
|
38
|
+
}
|
|
39
|
+
get lastModified() {
|
|
40
|
+
return __classPrivateFieldGet(this, _PostLicenseAttachmentResult_lastModified, "f");
|
|
41
|
+
}
|
|
42
|
+
get url() {
|
|
43
|
+
return __classPrivateFieldGet(this, _PostLicenseAttachmentResult_url, "f");
|
|
44
|
+
}
|
|
45
|
+
get metadata() {
|
|
46
|
+
return __classPrivateFieldGet(this, _PostLicenseAttachmentResult_metadata, "f");
|
|
47
|
+
}
|
|
48
|
+
toJSON() {
|
|
49
|
+
return {
|
|
50
|
+
[PostLicenseAttachmentResultFields.COLUMN_NAME]: this.name,
|
|
51
|
+
[PostLicenseAttachmentResultFields.COLUMN_LAST_MODIFIED]: this
|
|
52
|
+
.lastModified,
|
|
53
|
+
[PostLicenseAttachmentResultFields.COLUMN_URL]: this.url,
|
|
54
|
+
[PostLicenseAttachmentResultFields.COLUMN_METADATA]: this.metadata,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.PostLicenseAttachmentResult = PostLicenseAttachmentResult;
|
|
59
|
+
_PostLicenseAttachmentResult_name = new WeakMap(), _PostLicenseAttachmentResult_lastModified = new WeakMap(), _PostLicenseAttachmentResult_url = new WeakMap(), _PostLicenseAttachmentResult_metadata = new WeakMap();
|
|
60
|
+
//# sourceMappingURL=PostLicenseAttachmentResult.js.map
|
|
@@ -28,6 +28,8 @@ import { ConsumptionDailyPrediction } from '../consumption';
|
|
|
28
28
|
import { GetScheduledTasksResult } from './entities/schedule/getScheduledTasksResult';
|
|
29
29
|
import { GetScheduleTaskResult } from './entities/schedule/getScheduleTaskResult';
|
|
30
30
|
import { LicenceCouponCodeHistoryResult } from './entities/history/licenceCouponCodeHistoryResult';
|
|
31
|
+
import { GetLicenseAttachmentsResult } from './entities/attachment/GetLicenseAttachmentsResult';
|
|
32
|
+
import { PostLicenseAttachmentResult } from './entities/attachment/PostLicenseAttachmentResult';
|
|
31
33
|
/**
|
|
32
34
|
* Parameters passable to the request for refining search.
|
|
33
35
|
*/
|
|
@@ -138,6 +140,10 @@ export declare type BaseParameters<LicenseType, OfferType, endCustomerOrganizati
|
|
|
138
140
|
offer?: OfferType;
|
|
139
141
|
endCustomerOrganizationUnit?: endCustomerOrganizationUnitType;
|
|
140
142
|
};
|
|
143
|
+
export declare type AttachFileToLicenseParameters = {
|
|
144
|
+
name: string;
|
|
145
|
+
fileEncoded: string;
|
|
146
|
+
};
|
|
141
147
|
export declare type LicenseSortParameters = BaseParameters<LicenceFindDataSortParameters, OfferFindResultDataSortParameters, EndCustomerOrganizationUnitSortParameters>;
|
|
142
148
|
export declare type LicenseCompareParameters = {
|
|
143
149
|
[field: string]: unknown;
|
|
@@ -397,6 +403,10 @@ export declare class LicensesClient extends AbstractRestfulClient {
|
|
|
397
403
|
*
|
|
398
404
|
*/
|
|
399
405
|
find(postData?: LicenseFindPayload, perPage?: number, page?: number, parameters?: Parameters): Promise<FindResult>;
|
|
406
|
+
findAttachments(licenseReference: string, perPage?: number, page?: number, parameters?: Parameters): Promise<GetResult<GetLicenseAttachmentsResult>>;
|
|
407
|
+
attachFileToLicense(licenseReference: string, parameters: AttachFileToLicenseParameters): Promise<GetResult<PostLicenseAttachmentResult>>;
|
|
408
|
+
removeLicenseAttachment(licenseReference: string, documentName: string): Promise<void>;
|
|
409
|
+
getScheduledTasks(licenseReference: string, parameters?: Parameters): Promise<GetResult<GetScheduledTasksResult>>;
|
|
400
410
|
getConfigsRaw(reference: string): Promise<FindConfig>;
|
|
401
411
|
getConfigs(reference: string): AsyncGenerator<ConfigFindResultData>;
|
|
402
412
|
/**
|
|
@@ -424,7 +434,6 @@ export declare class LicensesClient extends AbstractRestfulClient {
|
|
|
424
434
|
getCredentials(licenseReference: string, parameters?: Parameters): Promise<GetResult<CredentialsResult>>;
|
|
425
435
|
setPricingRate(licenseReference: string, payload: LicensePricingRate, parameters?: Parameters): Promise<void>;
|
|
426
436
|
scheduleTasks(licenseReference: string, payload: ScheduleTasks, parameters?: Parameters): Promise<GetResult<ScheduleTasksResult>>;
|
|
427
|
-
getScheduledTasks(licenseReference: string, parameters?: Parameters): Promise<GetResult<GetScheduledTasksResult>>;
|
|
428
437
|
updateScheduledTask(licenseReference: string, scheduledTaskId: number, payload: UpdateScheduledTaskRequestType, parameters?: Parameters): Promise<void>;
|
|
429
438
|
getScheduledTask(licenseReference: string, scheduledTaskId: number, parameters?: Parameters): Promise<GetResult<GetScheduleTaskResult>>;
|
|
430
439
|
deleteScheduledTask(licenseReference: string, scheduledTaskId: number, parameters?: Parameters, payload?: DeleteScheduledTaskType): Promise<void>;
|
|
@@ -22,6 +22,8 @@ const consumption_1 = require("../consumption");
|
|
|
22
22
|
const getScheduledTasksResult_1 = require("./entities/schedule/getScheduledTasksResult");
|
|
23
23
|
const getScheduleTaskResult_1 = require("./entities/schedule/getScheduleTaskResult");
|
|
24
24
|
const licenceCouponCodeHistoryResult_1 = require("./entities/history/licenceCouponCodeHistoryResult");
|
|
25
|
+
const GetLicenseAttachmentsResult_1 = require("./entities/attachment/GetLicenseAttachmentsResult");
|
|
26
|
+
const PostLicenseAttachmentResult_1 = require("./entities/attachment/PostLicenseAttachmentResult");
|
|
25
27
|
/**
|
|
26
28
|
* Parameters passable to the request for refining search.
|
|
27
29
|
*/
|
|
@@ -316,6 +318,25 @@ class LicensesClient extends abstractRestfulClient_1.AbstractRestfulClient {
|
|
|
316
318
|
const response = await this.findRaw(rawLicensePayload, parameters);
|
|
317
319
|
return new findResult_1.FindResult(response, this, rawLicensePayload, parameters);
|
|
318
320
|
}
|
|
321
|
+
async findAttachments(licenseReference, perPage = 100, page = 1, parameters = {}) {
|
|
322
|
+
this.setPerPage(perPage);
|
|
323
|
+
this.setPage(page);
|
|
324
|
+
this.path = `/${licenseReference}/attachment`;
|
|
325
|
+
return new getResult_1.GetResult(GetLicenseAttachmentsResult_1.GetLicenseAttachmentsResult, await this.get(parameters));
|
|
326
|
+
}
|
|
327
|
+
async attachFileToLicense(licenseReference, parameters) {
|
|
328
|
+
this.path = `/${licenseReference}/attachment`;
|
|
329
|
+
return new getResult_1.GetResult(PostLicenseAttachmentResult_1.PostLicenseAttachmentResult, await this.post(parameters));
|
|
330
|
+
}
|
|
331
|
+
async removeLicenseAttachment(licenseReference, documentName) {
|
|
332
|
+
this.path = `/${licenseReference}/attachment/${documentName}`;
|
|
333
|
+
return await this.delete();
|
|
334
|
+
}
|
|
335
|
+
async getScheduledTasks(licenseReference, parameters = {}) {
|
|
336
|
+
this.path = `/${licenseReference}${this.SCHEDULE_TASKS_PATH}`;
|
|
337
|
+
const response = await this.get(parameters);
|
|
338
|
+
return new getResult_1.GetResult(getScheduledTasksResult_1.GetScheduledTasksResult, response);
|
|
339
|
+
}
|
|
319
340
|
getConfigsRaw(reference) {
|
|
320
341
|
this.path = `/${reference}${this.CONFIGS_PATH}`;
|
|
321
342
|
return this.get();
|
|
@@ -474,11 +495,6 @@ class LicensesClient extends abstractRestfulClient_1.AbstractRestfulClient {
|
|
|
474
495
|
this.path = `/${licenseReference}${this.SCHEDULE_TASKS_PATH}`;
|
|
475
496
|
return new getResult_1.GetResult(scheduleTasksResult_1.ScheduleTasksResult, await this.post(payload, parameters));
|
|
476
497
|
}
|
|
477
|
-
async getScheduledTasks(licenseReference, parameters = {}) {
|
|
478
|
-
this.path = `/${licenseReference}${this.SCHEDULE_TASKS_PATH}`;
|
|
479
|
-
const response = await this.get(parameters);
|
|
480
|
-
return new getResult_1.GetResult(getScheduledTasksResult_1.GetScheduledTasksResult, response);
|
|
481
|
-
}
|
|
482
498
|
async updateScheduledTask(licenseReference, scheduledTaskId, payload, parameters = {}) {
|
|
483
499
|
this.path = `/${licenseReference}${this.SCHEDULE_TASKS_PATH}/${scheduledTaskId}`;
|
|
484
500
|
return await this.patch(payload, parameters);
|
package/package.json
CHANGED