@ikonintegration/mod-license-client 2.0.8 → 2.0.10

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.
@@ -14,4 +14,12 @@ export default class Key {
14
14
  req.path = '/activationKey/' + activationKey;
15
15
  return await req.exec();
16
16
  }
17
+ async getAssignedKeys(externalID, assignedTo, productID, showConsumed) {
18
+ const req = await this.api.newBaseRequest('GET');
19
+ req.path = '/keys/' + externalID + '/assigned';
20
+ if (assignedTo) req.appendQueryParam('assignedTo', assignedTo);
21
+ if (productID) req.appendQueryParam('productID', productID);
22
+ req.appendQueryParam('showConsumed', showConsumed);
23
+ return await req.exec();
24
+ }
17
25
  }
@@ -2,6 +2,17 @@ export default class License {
2
2
  constructor(API) {
3
3
  this.api = API;
4
4
  }
5
+ async assignLicense(externalID, assignedTo, body) {
6
+ const req = await this.api.newBaseRequest('POST');
7
+ req.path = '/license/' + externalID + '/assign/' + assignedTo;
8
+ req.body = { ...body };
9
+ return await req.exec();
10
+ }
11
+ async unassignLicense(externalID, activationKey) {
12
+ const req = await this.api.newBaseRequest('POST');
13
+ req.path = '/license/' + externalID + '/unassign/' + activationKey;
14
+ return await req.exec();
15
+ }
5
16
  async redeemLicenseByProduct(productID, externalID) {
6
17
  const req = await this.api.newBaseRequest('POST');
7
18
  req.path = '/license/redeem/available';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikonintegration/mod-license-client",
3
- "version": "2.0.8",
3
+ "version": "2.0.10",
4
4
  "description": "Shared module license API client",
5
5
  "main": "index.js",
6
6
  "scripts": {