@arrowsphere/api-client 3.66.0-rc.bdj-2 → 3.67.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 CHANGED
@@ -3,6 +3,16 @@
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.67.0] - 2023-11-17
7
+
8
+ ### Changed
9
+ - Order creation endpoint : Add coterminosity + promotion ID option
10
+
11
+ ## [3.66.0] - 2023-11-17
12
+
13
+ ### Changed
14
+ - graphql-api adds functions to find companies
15
+
6
16
  ## [3.65.1] - 2023-11-17
7
17
 
8
18
  ### Changed
@@ -20,7 +30,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
20
30
  ### Changed
21
31
  - Add more license event types, add license event action enums
22
32
 
23
-
24
33
  ## [3.63.0] - 2023-11-13
25
34
 
26
35
  ### Changed
@@ -1,5 +1,7 @@
1
1
  import { AbstractGraphQLClient } from '../abstractGraphQLClient';
2
+ import { ArrowCompanyType, EndCustomerType, PartnerType } from './types/entities/company';
2
3
  import { SelectAllQueryType, SelectAllResultType, SelectOneQueryType, SelectOneResultType } from './types/graphqlApiQueries';
4
+ import { ArrowCompanySchema, EndCustomerSchema, PartnerSchema, SelectOneResponseDataSchema } from './types/graphqlApiSchemas';
3
5
  export declare class GraphqlApiClient extends AbstractGraphQLClient {
4
6
  /**
5
7
  * The Path of graphql catalog API
@@ -8,4 +10,8 @@ export declare class GraphqlApiClient extends AbstractGraphQLClient {
8
10
  find<GraphQLResponseTypes>(request: string): Promise<GraphQLResponseTypes | null>;
9
11
  selectAll(query: SelectAllQueryType): Promise<SelectAllResultType | null>;
10
12
  selectOne(query: SelectOneQueryType): Promise<SelectOneResultType | null>;
13
+ findOneById<T>(id: number, fieldSchema: SelectOneResponseDataSchema): Promise<T | null>;
14
+ findEndCustomerById(id: number, fields: EndCustomerSchema): Promise<EndCustomerType | null>;
15
+ findPartnerById(id: number, fields: PartnerSchema): Promise<PartnerType | null>;
16
+ findArrowCompanyById(id: number, fields: ArrowCompanySchema): Promise<ArrowCompanyType | null>;
11
17
  }
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GraphqlApiClient = void 0;
4
4
  const abstractGraphQLClient_1 = require("../abstractGraphQLClient");
5
+ const graphqlApiQueries_1 = require("./types/graphqlApiQueries");
5
6
  class GraphqlApiClient extends abstractGraphQLClient_1.AbstractGraphQLClient {
6
7
  constructor() {
7
8
  super(...arguments);
@@ -29,6 +30,58 @@ class GraphqlApiClient extends abstractGraphQLClient_1.AbstractGraphQLClient {
29
30
  const result = await this.find(queryStr);
30
31
  return result;
31
32
  }
33
+ async findOneById(id, fieldSchema) {
34
+ var _a, _b, _c, _d, _e, _f, _g;
35
+ const keys = Object.keys(fieldSchema);
36
+ if (keys.length === 0) {
37
+ return null;
38
+ }
39
+ const type = keys[0];
40
+ const query = {
41
+ [graphqlApiQueries_1.Queries.SELECT_ONE]: {
42
+ __args: {
43
+ [graphqlApiQueries_1.QueryVariablesField.FILTERS]: {
44
+ [graphqlApiQueries_1.InputSearchFilterField.GROUPS]: [
45
+ {
46
+ [graphqlApiQueries_1.InputFiltersField.ITEMS]: [
47
+ {
48
+ [graphqlApiQueries_1.InputFilterValueField.NAME]: 'id',
49
+ [graphqlApiQueries_1.InputFilterValueField.OPERATOR]: graphqlApiQueries_1.ComparisonOperator.EQUALS,
50
+ [graphqlApiQueries_1.InputFilterValueField.VALUE]: [`${id}`],
51
+ },
52
+ ],
53
+ },
54
+ ],
55
+ },
56
+ },
57
+ [graphqlApiQueries_1.SelectableField.DATA]: fieldSchema,
58
+ [graphqlApiQueries_1.SelectableField.ERRORS]: {
59
+ [graphqlApiQueries_1.ErrorsField.MESSAGE]: true,
60
+ },
61
+ },
62
+ };
63
+ const queryStr = this.stringifyQuery(query);
64
+ const result = await this.find(queryStr);
65
+ if ((_c = (_b = (_a = result === null || result === void 0 ? void 0 : result[graphqlApiQueries_1.Queries.SELECT_ONE]) === null || _a === void 0 ? void 0 : _a[graphqlApiQueries_1.SelectableField.ERRORS]) === null || _b === void 0 ? void 0 : _b[graphqlApiQueries_1.ErrorsField.MESSAGE]) === null || _c === void 0 ? void 0 : _c.length) {
66
+ throw new Error((_e = (_d = result === null || result === void 0 ? void 0 : result[graphqlApiQueries_1.Queries.SELECT_ONE]) === null || _d === void 0 ? void 0 : _d[graphqlApiQueries_1.SelectableField.ERRORS]) === null || _e === void 0 ? void 0 : _e[graphqlApiQueries_1.ErrorsField.MESSAGE]);
67
+ }
68
+ return (_g = (_f = result === null || result === void 0 ? void 0 : result[graphqlApiQueries_1.Queries.SELECT_ONE]) === null || _f === void 0 ? void 0 : _f[graphqlApiQueries_1.SelectableField.DATA]) === null || _g === void 0 ? void 0 : _g[type];
69
+ }
70
+ async findEndCustomerById(id, fields) {
71
+ return await this.findOneById(id, {
72
+ [graphqlApiQueries_1.SelectDataField.END_CUSTOMER]: fields,
73
+ });
74
+ }
75
+ async findPartnerById(id, fields) {
76
+ return await this.findOneById(id, {
77
+ [graphqlApiQueries_1.SelectDataField.PARTNER]: fields,
78
+ });
79
+ }
80
+ async findArrowCompanyById(id, fields) {
81
+ return await this.findOneById(id, {
82
+ [graphqlApiQueries_1.SelectDataField.ARROW_COMPANY]: fields,
83
+ });
84
+ }
32
85
  }
33
86
  exports.GraphqlApiClient = GraphqlApiClient;
34
87
  //# sourceMappingURL=graphqlApiClient.js.map
@@ -2,7 +2,7 @@ import { ArrowCompanyType, EndCustomerType, PartnerType } from './entities/compa
2
2
  import { ContinentType, CountryType } from './entities/country';
3
3
  import { PartnertagType } from './entities/partnertag';
4
4
  import { WorkgroupType } from './entities/workgroup';
5
- import { ErrorsSchema, PageSchema, SelectAllResponseDataSchema } from './graphqlApiSchemas';
5
+ import { ErrorsSchema, PageSchema, SelectAllResponseDataSchema, SelectOneResponseDataSchema } from './graphqlApiSchemas';
6
6
  /**
7
7
  * For field __args
8
8
  */
@@ -197,7 +197,7 @@ export declare enum Queries {
197
197
  export declare type SelectOneQueryType = {
198
198
  [Queries.SELECT_ONE]: {
199
199
  __args?: Omit<QueryVariablesType, QueryVariablesField.PAGINATION>;
200
- [SelectableField.DATA]: SelectAllResponseDataSchema;
200
+ [SelectableField.DATA]: SelectOneResponseDataSchema;
201
201
  [SelectableField.ERRORS]?: ErrorsSchema;
202
202
  };
203
203
  };
@@ -9,10 +9,7 @@ export declare enum ActionsGetFields {
9
9
  COLUMN_REACTIVATE = "reactivate",
10
10
  COLUMN_AUTO_RENEW_OFF = "autoRenewOff",
11
11
  COLUMN_AUTO_RENEW_ON = "autoRenewOn",
12
- COLUMN_CANCEL = "cancel",
13
- COLUMN_CONVERSION = "conversion",
14
- COLUMN_PAUSE = "pause",
15
- COLUMN_UPGRADE = "upgrade"
12
+ COLUMN_CANCEL = "cancel"
16
13
  }
17
14
  export declare type ActionsGetData = {
18
15
  [ActionsGetFields.COLUMN_HISTORY]: string;
@@ -25,9 +22,6 @@ export declare type ActionsGetData = {
25
22
  [ActionsGetFields.COLUMN_AUTO_RENEW_OFF]?: string;
26
23
  [ActionsGetFields.COLUMN_AUTO_RENEW_ON]?: string;
27
24
  [ActionsGetFields.COLUMN_CANCEL]?: string;
28
- [ActionsGetFields.COLUMN_CONVERSION]?: string;
29
- [ActionsGetFields.COLUMN_PAUSE]?: string;
30
- [ActionsGetFields.COLUMN_UPGRADE]?: string;
31
25
  };
32
26
  export declare class ActionsGetResult extends AbstractEntity<ActionsGetData> {
33
27
  #private;
@@ -42,8 +36,5 @@ export declare class ActionsGetResult extends AbstractEntity<ActionsGetData> {
42
36
  get autoRenewOff(): string | undefined;
43
37
  get autoRenewOn(): string | undefined;
44
38
  get cancel(): string | undefined;
45
- get conversion(): string | undefined;
46
- get pause(): string | undefined;
47
- get upgrade(): string | undefined;
48
39
  toJSON(): ActionsGetData;
49
40
  }
@@ -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 _ActionsGetResult_history, _ActionsGetResult_update, _ActionsGetResult_increaseSeats, _ActionsGetResult_decreaseSeats, _ActionsGetResult_addons_catalog, _ActionsGetResult_suspend, _ActionsGetResult_reactivate, _ActionsGetResult_autoRenewOff, _ActionsGetResult_autoRenewOn, _ActionsGetResult_cancel, _ActionsGetResult_conversion, _ActionsGetResult_pause, _ActionsGetResult_upgrade;
13
+ var _ActionsGetResult_history, _ActionsGetResult_update, _ActionsGetResult_increaseSeats, _ActionsGetResult_decreaseSeats, _ActionsGetResult_addons_catalog, _ActionsGetResult_suspend, _ActionsGetResult_reactivate, _ActionsGetResult_autoRenewOff, _ActionsGetResult_autoRenewOn, _ActionsGetResult_cancel;
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.ActionsGetResult = exports.ActionsGetFields = void 0;
16
16
  const abstractEntity_1 = require("../../../abstractEntity");
@@ -26,9 +26,6 @@ var ActionsGetFields;
26
26
  ActionsGetFields["COLUMN_AUTO_RENEW_OFF"] = "autoRenewOff";
27
27
  ActionsGetFields["COLUMN_AUTO_RENEW_ON"] = "autoRenewOn";
28
28
  ActionsGetFields["COLUMN_CANCEL"] = "cancel";
29
- ActionsGetFields["COLUMN_CONVERSION"] = "conversion";
30
- ActionsGetFields["COLUMN_PAUSE"] = "pause";
31
- ActionsGetFields["COLUMN_UPGRADE"] = "upgrade";
32
29
  })(ActionsGetFields = exports.ActionsGetFields || (exports.ActionsGetFields = {}));
33
30
  class ActionsGetResult extends abstractEntity_1.AbstractEntity {
34
31
  constructor(data) {
@@ -43,9 +40,6 @@ class ActionsGetResult extends abstractEntity_1.AbstractEntity {
43
40
  _ActionsGetResult_autoRenewOff.set(this, void 0);
44
41
  _ActionsGetResult_autoRenewOn.set(this, void 0);
45
42
  _ActionsGetResult_cancel.set(this, void 0);
46
- _ActionsGetResult_conversion.set(this, void 0);
47
- _ActionsGetResult_pause.set(this, void 0);
48
- _ActionsGetResult_upgrade.set(this, void 0);
49
43
  __classPrivateFieldSet(this, _ActionsGetResult_history, data[ActionsGetFields.COLUMN_HISTORY], "f");
50
44
  __classPrivateFieldSet(this, _ActionsGetResult_update, data[ActionsGetFields.COLUMN_UPDATE], "f");
51
45
  __classPrivateFieldSet(this, _ActionsGetResult_increaseSeats, data[ActionsGetFields.COLUMN_INCREASE_SEATS], "f");
@@ -56,9 +50,6 @@ class ActionsGetResult extends abstractEntity_1.AbstractEntity {
56
50
  __classPrivateFieldSet(this, _ActionsGetResult_autoRenewOff, data[ActionsGetFields.COLUMN_AUTO_RENEW_OFF], "f");
57
51
  __classPrivateFieldSet(this, _ActionsGetResult_autoRenewOn, data[ActionsGetFields.COLUMN_AUTO_RENEW_ON], "f");
58
52
  __classPrivateFieldSet(this, _ActionsGetResult_cancel, data[ActionsGetFields.COLUMN_CANCEL], "f");
59
- __classPrivateFieldSet(this, _ActionsGetResult_conversion, data[ActionsGetFields.COLUMN_CONVERSION], "f");
60
- __classPrivateFieldSet(this, _ActionsGetResult_pause, data[ActionsGetFields.COLUMN_PAUSE], "f");
61
- __classPrivateFieldSet(this, _ActionsGetResult_upgrade, data[ActionsGetFields.COLUMN_UPGRADE], "f");
62
53
  }
63
54
  get history() {
64
55
  return __classPrivateFieldGet(this, _ActionsGetResult_history, "f");
@@ -90,15 +81,6 @@ class ActionsGetResult extends abstractEntity_1.AbstractEntity {
90
81
  get cancel() {
91
82
  return __classPrivateFieldGet(this, _ActionsGetResult_cancel, "f");
92
83
  }
93
- get conversion() {
94
- return __classPrivateFieldGet(this, _ActionsGetResult_conversion, "f");
95
- }
96
- get pause() {
97
- return __classPrivateFieldGet(this, _ActionsGetResult_pause, "f");
98
- }
99
- get upgrade() {
100
- return __classPrivateFieldGet(this, _ActionsGetResult_upgrade, "f");
101
- }
102
84
  toJSON() {
103
85
  return {
104
86
  [ActionsGetFields.COLUMN_HISTORY]: this.history,
@@ -111,12 +93,9 @@ class ActionsGetResult extends abstractEntity_1.AbstractEntity {
111
93
  [ActionsGetFields.COLUMN_AUTO_RENEW_OFF]: this.autoRenewOff,
112
94
  [ActionsGetFields.COLUMN_AUTO_RENEW_ON]: this.autoRenewOn,
113
95
  [ActionsGetFields.COLUMN_CANCEL]: this.cancel,
114
- [ActionsGetFields.COLUMN_CONVERSION]: this.conversion,
115
- [ActionsGetFields.COLUMN_PAUSE]: this.pause,
116
- [ActionsGetFields.COLUMN_UPGRADE]: this.upgrade,
117
96
  };
118
97
  }
119
98
  }
120
99
  exports.ActionsGetResult = ActionsGetResult;
121
- _ActionsGetResult_history = new WeakMap(), _ActionsGetResult_update = new WeakMap(), _ActionsGetResult_increaseSeats = new WeakMap(), _ActionsGetResult_decreaseSeats = new WeakMap(), _ActionsGetResult_addons_catalog = new WeakMap(), _ActionsGetResult_suspend = new WeakMap(), _ActionsGetResult_reactivate = new WeakMap(), _ActionsGetResult_autoRenewOff = new WeakMap(), _ActionsGetResult_autoRenewOn = new WeakMap(), _ActionsGetResult_cancel = new WeakMap(), _ActionsGetResult_conversion = new WeakMap(), _ActionsGetResult_pause = new WeakMap(), _ActionsGetResult_upgrade = new WeakMap();
100
+ _ActionsGetResult_history = new WeakMap(), _ActionsGetResult_update = new WeakMap(), _ActionsGetResult_increaseSeats = new WeakMap(), _ActionsGetResult_decreaseSeats = new WeakMap(), _ActionsGetResult_addons_catalog = new WeakMap(), _ActionsGetResult_suspend = new WeakMap(), _ActionsGetResult_reactivate = new WeakMap(), _ActionsGetResult_autoRenewOff = new WeakMap(), _ActionsGetResult_autoRenewOn = new WeakMap(), _ActionsGetResult_cancel = new WeakMap();
122
101
  //# sourceMappingURL=actionsGetResult.js.map
@@ -16,7 +16,6 @@ import { GetResult } from '../getResult';
16
16
  import { LicenseGetFields } from './entities/getLicense/licenseGetResult';
17
17
  import { GetLicenseResult } from './entities/getResult/getLicenseResult';
18
18
  import { LicenceHistoryResult } from './entities/history/licenceHistoryResult';
19
- import { UpgradeResult } from './entities/license/upgradeResult';
20
19
  /**
21
20
  * Parameters passable to the request for refining search.
22
21
  */
@@ -193,12 +192,6 @@ export declare type PutSuspend = ExtraInformationType;
193
192
  export declare type PutCancel = ExtraInformationType;
194
193
  export declare type PutCancelAutoRenew = ExtraInformationType;
195
194
  export declare type PutReactivateAutoRenew = ExtraInformationType;
196
- export declare type PostUpgrade = {
197
- sku: string;
198
- billingCycle: number;
199
- term: number;
200
- quantity: number;
201
- };
202
195
  export declare class LicensesClient extends AbstractRestfulClient {
203
196
  /**
204
197
  * The base path of the API
@@ -244,10 +237,6 @@ export declare class LicensesClient extends AbstractRestfulClient {
244
237
  * The path of reactivate license auto-renew
245
238
  */
246
239
  private REACTIVATE_AUTO_RENEW_PATH;
247
- /**
248
- * The path of reactivate license auto-renew
249
- */
250
- private UPGRADE_PATH;
251
240
  /**
252
241
  * Returns the raw result from the find endpoint call
253
242
  *
@@ -282,7 +271,6 @@ export declare class LicensesClient extends AbstractRestfulClient {
282
271
  getHistory(licenseReference: string, parameters?: Parameters): Promise<GetResult<LicenceHistoryResult>>;
283
272
  cancelAutoRenew(licenseReference: string, payload?: PutCancelAutoRenew, parameters?: Parameters): Promise<void>;
284
273
  reactivateAutoRenew(licenseReference: string, payload?: PutReactivateAutoRenew, parameters?: Parameters): Promise<void>;
285
- upgrade(licenseReference: string, payload: PostUpgrade, parameters?: Parameters): Promise<GetResult<UpgradeResult>>;
286
274
  private createFilters;
287
275
  private createKeywords;
288
276
  }
@@ -11,7 +11,6 @@ const getResult_1 = require("../getResult");
11
11
  const licenseGetResult_1 = require("./entities/getLicense/licenseGetResult");
12
12
  const getLicenseResult_1 = require("./entities/getResult/getLicenseResult");
13
13
  const licenceHistoryResult_1 = require("./entities/history/licenceHistoryResult");
14
- const upgradeResult_1 = require("./entities/license/upgradeResult");
15
14
  /**
16
15
  * Parameters passable to the request for refining search.
17
16
  */
@@ -157,10 +156,6 @@ class LicensesClient extends abstractRestfulClient_1.AbstractRestfulClient {
157
156
  * The path of reactivate license auto-renew
158
157
  */
159
158
  this.REACTIVATE_AUTO_RENEW_PATH = '/autorenew/reactivate';
160
- /**
161
- * The path of reactivate license auto-renew
162
- */
163
- this.UPGRADE_PATH = '/conversion';
164
159
  }
165
160
  /**
166
161
  * Returns the raw result from the find endpoint call
@@ -282,10 +277,6 @@ class LicensesClient extends abstractRestfulClient_1.AbstractRestfulClient {
282
277
  this.path = `/${licenseReference}${this.REACTIVATE_AUTO_RENEW_PATH}`;
283
278
  return await this.put(payload, parameters);
284
279
  }
285
- async upgrade(licenseReference, payload, parameters = {}) {
286
- this.path = `/${licenseReference}${this.UPGRADE_PATH}`;
287
- return new getResult_1.GetResult(upgradeResult_1.UpgradeResult, await this.post(payload, parameters));
288
- }
289
280
  createFilters(parameters, keyParent) {
290
281
  let appropriateParameters;
291
282
  if (typeof parameters === 'object') {
@@ -36,7 +36,10 @@ export declare enum CreateOrderInputFields {
36
36
  COLUMN_PRICE_CURRENCY = "currency",
37
37
  COLUMN_PRICE_UNIT = "unitPrice",
38
38
  COLUMN_PRICE_EXCHANGE_RATE = "exchangeRate",
39
- COLUMN_EXTRA_INFORMATION = "extraInformation"
39
+ COLUMN_EXTRA_INFORMATION = "extraInformation",
40
+ COLUMN_COTERMINOSITY_DATE = "coterminosityDate",
41
+ COLUMN_COTERMINOSITY_SUBSCRIPTION_REF = "coterminositySubscriptionRef",
42
+ COLUMN_PROMOTION_ID = "promotionId"
40
43
  }
41
44
  export declare enum scenarioType {
42
45
  INJECTION = "injection",
@@ -80,6 +83,9 @@ export declare type CreateOrderProductType = {
80
83
  [CreateOrderInputFields.COLUMN_FRIENDLY_NAME]?: string;
81
84
  [CreateOrderInputFields.COLUMN_COMMENT1]?: string;
82
85
  [CreateOrderInputFields.COLUMN_COMMENT2]?: string;
86
+ [CreateOrderInputFields.COLUMN_COTERMINOSITY_DATE]?: string;
87
+ [CreateOrderInputFields.COLUMN_COTERMINOSITY_SUBSCRIPTION_REF]?: string;
88
+ [CreateOrderInputFields.COLUMN_PROMOTION_ID]?: string;
83
89
  [CreateOrderInputFields.COLUMN_PRICE]?: {
84
90
  [CreateOrderInputFields.COLUMN_PRICE_VENDOR]?: {
85
91
  [CreateOrderInputFields.COLUMN_PRICE_CURRENCY]?: string;
@@ -41,6 +41,9 @@ var CreateOrderInputFields;
41
41
  CreateOrderInputFields["COLUMN_PRICE_UNIT"] = "unitPrice";
42
42
  CreateOrderInputFields["COLUMN_PRICE_EXCHANGE_RATE"] = "exchangeRate";
43
43
  CreateOrderInputFields["COLUMN_EXTRA_INFORMATION"] = "extraInformation";
44
+ CreateOrderInputFields["COLUMN_COTERMINOSITY_DATE"] = "coterminosityDate";
45
+ CreateOrderInputFields["COLUMN_COTERMINOSITY_SUBSCRIPTION_REF"] = "coterminositySubscriptionRef";
46
+ CreateOrderInputFields["COLUMN_PROMOTION_ID"] = "promotionId";
44
47
  })(CreateOrderInputFields = exports.CreateOrderInputFields || (exports.CreateOrderInputFields = {}));
45
48
  var scenarioType;
46
49
  (function (scenarioType) {
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.66.0-rc.bdj-2",
7
+ "version": "3.67.0",
8
8
  "description": "Node.js client for ArrowSphere's public API",
9
9
  "main": "build/index.js",
10
10
  "types": "build/index.d.ts",
@@ -1,44 +0,0 @@
1
- import { AbstractEntity } from '../../../abstractEntity';
2
- export declare enum UpgradeResultOrderFields {
3
- COLUMN_LINK = "link",
4
- COLUMN_REFERENCE = "reference"
5
- }
6
- declare type UpgradeResultOrderType = {
7
- [UpgradeResultOrderFields.COLUMN_LINK]?: string;
8
- [UpgradeResultOrderFields.COLUMN_REFERENCE]?: string;
9
- };
10
- export declare class UpgradeResultOrder extends AbstractEntity<UpgradeResultOrderType> {
11
- #private;
12
- constructor(input: UpgradeResultOrderType);
13
- get link(): string | undefined;
14
- get reference(): string | undefined;
15
- toJSON(): UpgradeResultOrderType;
16
- }
17
- export declare enum UpgradeResultFields {
18
- COLUMN_QUANTITY = "quantity",
19
- COLUMN_NAME = "name",
20
- COLUMN_ORDER = "order",
21
- COLUMN_PERIODICITY = "periodicity",
22
- COLUMN_SKU = "sku",
23
- COLUMN_TERM = "term"
24
- }
25
- export declare type UpgradeResultType = {
26
- [UpgradeResultFields.COLUMN_QUANTITY]?: number;
27
- [UpgradeResultFields.COLUMN_NAME]?: string;
28
- [UpgradeResultFields.COLUMN_ORDER]?: UpgradeResultOrderType;
29
- [UpgradeResultFields.COLUMN_PERIODICITY]?: string;
30
- [UpgradeResultFields.COLUMN_SKU]?: string;
31
- [UpgradeResultFields.COLUMN_TERM]?: string;
32
- };
33
- export declare class UpgradeResult extends AbstractEntity<UpgradeResultType> {
34
- #private;
35
- constructor(input: UpgradeResultType);
36
- get quantity(): number | undefined;
37
- get name(): string | undefined;
38
- get order(): UpgradeResultOrder | undefined;
39
- get periodicity(): string | undefined;
40
- get sku(): string | undefined;
41
- get term(): string | undefined;
42
- toJSON(): UpgradeResultType;
43
- }
44
- export {};
@@ -1,104 +0,0 @@
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 _UpgradeResultOrder_link, _UpgradeResultOrder_reference, _UpgradeResult_quantity, _UpgradeResult_name, _UpgradeResult_order, _UpgradeResult_periodicity, _UpgradeResult_sku, _UpgradeResult_term;
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.UpgradeResult = exports.UpgradeResultFields = exports.UpgradeResultOrder = exports.UpgradeResultOrderFields = void 0;
16
- const abstractEntity_1 = require("../../../abstractEntity");
17
- var UpgradeResultOrderFields;
18
- (function (UpgradeResultOrderFields) {
19
- UpgradeResultOrderFields["COLUMN_LINK"] = "link";
20
- UpgradeResultOrderFields["COLUMN_REFERENCE"] = "reference";
21
- })(UpgradeResultOrderFields = exports.UpgradeResultOrderFields || (exports.UpgradeResultOrderFields = {}));
22
- class UpgradeResultOrder extends abstractEntity_1.AbstractEntity {
23
- constructor(input) {
24
- super(input);
25
- _UpgradeResultOrder_link.set(this, void 0);
26
- _UpgradeResultOrder_reference.set(this, void 0);
27
- __classPrivateFieldSet(this, _UpgradeResultOrder_link, input[UpgradeResultOrderFields.COLUMN_LINK], "f");
28
- __classPrivateFieldSet(this, _UpgradeResultOrder_reference, input[UpgradeResultOrderFields.COLUMN_REFERENCE], "f");
29
- }
30
- get link() {
31
- return __classPrivateFieldGet(this, _UpgradeResultOrder_link, "f");
32
- }
33
- get reference() {
34
- return __classPrivateFieldGet(this, _UpgradeResultOrder_reference, "f");
35
- }
36
- toJSON() {
37
- return {
38
- [UpgradeResultOrderFields.COLUMN_LINK]: this.link,
39
- [UpgradeResultOrderFields.COLUMN_REFERENCE]: this.reference,
40
- };
41
- }
42
- }
43
- exports.UpgradeResultOrder = UpgradeResultOrder;
44
- _UpgradeResultOrder_link = new WeakMap(), _UpgradeResultOrder_reference = new WeakMap();
45
- var UpgradeResultFields;
46
- (function (UpgradeResultFields) {
47
- UpgradeResultFields["COLUMN_QUANTITY"] = "quantity";
48
- UpgradeResultFields["COLUMN_NAME"] = "name";
49
- UpgradeResultFields["COLUMN_ORDER"] = "order";
50
- UpgradeResultFields["COLUMN_PERIODICITY"] = "periodicity";
51
- UpgradeResultFields["COLUMN_SKU"] = "sku";
52
- UpgradeResultFields["COLUMN_TERM"] = "term";
53
- })(UpgradeResultFields = exports.UpgradeResultFields || (exports.UpgradeResultFields = {}));
54
- class UpgradeResult extends abstractEntity_1.AbstractEntity {
55
- constructor(input) {
56
- super(input);
57
- _UpgradeResult_quantity.set(this, void 0);
58
- _UpgradeResult_name.set(this, void 0);
59
- _UpgradeResult_order.set(this, void 0);
60
- _UpgradeResult_periodicity.set(this, void 0);
61
- _UpgradeResult_sku.set(this, void 0);
62
- _UpgradeResult_term.set(this, void 0);
63
- __classPrivateFieldSet(this, _UpgradeResult_quantity, input[UpgradeResultFields.COLUMN_QUANTITY], "f");
64
- __classPrivateFieldSet(this, _UpgradeResult_name, input[UpgradeResultFields.COLUMN_NAME], "f");
65
- __classPrivateFieldSet(this, _UpgradeResult_order, input[UpgradeResultFields.COLUMN_ORDER]
66
- ? new UpgradeResultOrder(input[UpgradeResultFields.COLUMN_ORDER])
67
- : undefined, "f");
68
- __classPrivateFieldSet(this, _UpgradeResult_periodicity, input[UpgradeResultFields.COLUMN_PERIODICITY], "f");
69
- __classPrivateFieldSet(this, _UpgradeResult_sku, input[UpgradeResultFields.COLUMN_SKU], "f");
70
- __classPrivateFieldSet(this, _UpgradeResult_term, input[UpgradeResultFields.COLUMN_TERM], "f");
71
- }
72
- get quantity() {
73
- return __classPrivateFieldGet(this, _UpgradeResult_quantity, "f");
74
- }
75
- get name() {
76
- return __classPrivateFieldGet(this, _UpgradeResult_name, "f");
77
- }
78
- get order() {
79
- return __classPrivateFieldGet(this, _UpgradeResult_order, "f");
80
- }
81
- get periodicity() {
82
- return __classPrivateFieldGet(this, _UpgradeResult_periodicity, "f");
83
- }
84
- get sku() {
85
- return __classPrivateFieldGet(this, _UpgradeResult_sku, "f");
86
- }
87
- get term() {
88
- return __classPrivateFieldGet(this, _UpgradeResult_term, "f");
89
- }
90
- toJSON() {
91
- var _a;
92
- return {
93
- [UpgradeResultFields.COLUMN_QUANTITY]: this.quantity,
94
- [UpgradeResultFields.COLUMN_NAME]: this.name,
95
- [UpgradeResultFields.COLUMN_ORDER]: (_a = this.order) === null || _a === void 0 ? void 0 : _a.toJSON(),
96
- [UpgradeResultFields.COLUMN_PERIODICITY]: this.periodicity,
97
- [UpgradeResultFields.COLUMN_SKU]: this.sku,
98
- [UpgradeResultFields.COLUMN_TERM]: this.term,
99
- };
100
- }
101
- }
102
- exports.UpgradeResult = UpgradeResult;
103
- _UpgradeResult_quantity = new WeakMap(), _UpgradeResult_name = new WeakMap(), _UpgradeResult_order = new WeakMap(), _UpgradeResult_periodicity = new WeakMap(), _UpgradeResult_sku = new WeakMap(), _UpgradeResult_term = new WeakMap();
104
- //# sourceMappingURL=upgradeResult.js.map