@arrowsphere/api-client 2.1.0 → 2.1.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,6 +3,12 @@
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
+ ## [2.1.1] - 2022-01-27
7
+
8
+ ### Changed
9
+
10
+ - Fixed type of `GetLicense` endpoint
11
+
6
12
  ## [2.1.0] - 2022-01-25
7
13
 
8
14
  ### Added
@@ -0,0 +1,22 @@
1
+ import { LicenseGetData } from './getLicense/licenseGetResult';
2
+ import { AbstractEntity } from '../../abstractEntity';
3
+ /**
4
+ * For future get endpoint, create type like LicenseGet
5
+ * and add this type to TypesGet type
6
+ */
7
+ export declare type LicenseGet = {
8
+ license: LicenseGetData;
9
+ };
10
+ declare type TypesGet = LicenseGet;
11
+ export declare type GetData<TypesGet> = {
12
+ status: number;
13
+ data: TypesGet;
14
+ };
15
+ export declare class GetResult extends AbstractEntity<GetData<TypesGet>> {
16
+ #private;
17
+ constructor(data: GetData<TypesGet>);
18
+ get status(): number;
19
+ get data(): TypesGet;
20
+ toJSON(): GetData<TypesGet>;
21
+ }
22
+ export {};
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) {
3
+ if (!privateMap.has(receiver)) {
4
+ throw new TypeError("attempted to set private field on non-instance");
5
+ }
6
+ privateMap.set(receiver, value);
7
+ return value;
8
+ };
9
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, privateMap) {
10
+ if (!privateMap.has(receiver)) {
11
+ throw new TypeError("attempted to get private field on non-instance");
12
+ }
13
+ return privateMap.get(receiver);
14
+ };
15
+ var _status, _data;
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.GetResult = void 0;
18
+ const abstractEntity_1 = require("../../abstractEntity");
19
+ class GetResult extends abstractEntity_1.AbstractEntity {
20
+ constructor(data) {
21
+ super(data);
22
+ _status.set(this, void 0);
23
+ _data.set(this, void 0);
24
+ __classPrivateFieldSet(this, _status, data.status);
25
+ __classPrivateFieldSet(this, _data, data.data);
26
+ }
27
+ get status() {
28
+ return __classPrivateFieldGet(this, _status);
29
+ }
30
+ get data() {
31
+ return __classPrivateFieldGet(this, _data);
32
+ }
33
+ toJSON() {
34
+ return {
35
+ status: this.status,
36
+ data: this.data,
37
+ };
38
+ }
39
+ }
40
+ exports.GetResult = GetResult;
41
+ _status = new WeakMap(), _data = new WeakMap();
42
+ //# sourceMappingURL=getResult.js.map
@@ -21,3 +21,4 @@ export * from '../licenses/entities/getLicense/licensePriceGetResult';
21
21
  export * from '../licenses/entities/getLicense/orderGetResult';
22
22
  export * from './entities/filterFindResult';
23
23
  export * from './entities/findResult';
24
+ export * from './entities/getResult';
@@ -33,4 +33,5 @@ __exportStar(require("../licenses/entities/getLicense/licensePriceGetResult"), e
33
33
  __exportStar(require("../licenses/entities/getLicense/orderGetResult"), exports);
34
34
  __exportStar(require("./entities/filterFindResult"), exports);
35
35
  __exportStar(require("./entities/findResult"), exports);
36
+ __exportStar(require("./entities/getResult"), exports);
36
37
  //# sourceMappingURL=index.js.map
@@ -11,7 +11,7 @@ import { PriceFindResultDataKeywords, PriceFindResutDataSortParameters } from '.
11
11
  import { OfferFindResultDataFiltersParameters, OfferFindResultDataKeywords, OfferFindResultDataSortParameters } from './entities/offer/offerFindResult';
12
12
  import { ActionFlagsFindResultDataKeywords, ActionFlagsFindResultDataSortParameters } from './entities/offer/actionFlagsFindResult';
13
13
  import { PriceBandFindResultDataKeywords, PriceBandFindResultDataSortParameters } from './entities/offer/priceBandFindResult';
14
- import { LicenseGetData } from './entities/getLicense/licenseGetResult';
14
+ import { GetData, LicenseGet } from './entities/getResult';
15
15
  /**
16
16
  * Parameters passable to the request for refining search.
17
17
  */
@@ -221,5 +221,5 @@ export declare class LicensesClient extends AbstractClient {
221
221
  getConfigs(reference: string): AsyncGenerator<ConfigFindResultData>;
222
222
  updateConfigRaw(reference: string, config: ConfigFindResult): Promise<ConfigFindResultData>;
223
223
  updateConfig(reference: string, config: ConfigFindResult): Promise<ConfigFindResult>;
224
- getLicense(licenseReference: string, parameters?: Parameters): Promise<LicenseGetData>;
224
+ getLicense(licenseReference: string, parameters?: Parameters): Promise<GetData<LicenseGet>>;
225
225
  }
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": "2.1.0",
7
+ "version": "2.1.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",