@arrowsphere/api-client 3.145.0-rc-cpu-2 → 3.145.1-rc.sba.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,13 +3,6 @@
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.145.0] - 2024.10.04
7
-
8
- ### Added
9
- - [orders] Added organizationUnitRef property in order entity
10
- - [orders] Added endpoint to update an order
11
- - [organization unit] Added countOrders in organizationUnit entity
12
-
13
6
  ## [3.144.0] - 2024.10.03
14
7
 
15
8
  ### Added
@@ -40,6 +40,7 @@ export declare type QuoteItemType = {
40
40
  export declare type ItemData = {
41
41
  id?: string;
42
42
  offerName?: string;
43
+ customTermEndDate?: string;
43
44
  publicPrice?: number;
44
45
  buyPrice?: number;
45
46
  sellPrice?: number;
@@ -4,6 +4,7 @@ export declare type UserType = {
4
4
  id?: number;
5
5
  allowDirectLogin?: boolean;
6
6
  contact?: ContactsType;
7
+ role?: UserRole;
7
8
  userTags?: PartnertagType[];
8
9
  validatedAt?: string;
9
10
  };
@@ -15,3 +16,7 @@ export declare type UserHistoryType = {
15
16
  impactedUser?: UserType;
16
17
  originatorUser?: UserType;
17
18
  };
19
+ export declare type UserRole = {
20
+ id?: number;
21
+ name?: string;
22
+ };
@@ -11,7 +11,7 @@ import { OrderItemsType, OrdersType } from './entities/order';
11
11
  import { VendorsType } from './entities/vendor';
12
12
  import { GraphqlApiProgramType, SubscribedProgramType } from './entities/program';
13
13
  import { LicenseBudgetNotificationType, LicenseBudgetType } from './entities/licenseBudget';
14
- import { UserHistoryType, UserType } from './entities/user';
14
+ import { UserHistoryType, UserRole, UserType } from './entities/user';
15
15
  import { OrganizationUnitsType } from './entities/organizationUnit';
16
16
  import { CurrencyType } from './entities/currency';
17
17
  import { ItemData, QuoteItemType, QuoteType } from './entities/quote';
@@ -52,6 +52,7 @@ declare type MissingFieldsOfContactSchema = {
52
52
  declare type MissingFieldsOfUserSchema = {
53
53
  contact?: ContactsSchema;
54
54
  userTags?: PartnertagSchema;
55
+ role?: UserRoleSchema;
55
56
  };
56
57
  declare type MissingFieldsOfLicenseBudgetSchema = {
57
58
  notifications?: LicenseBudgetNotificationSchema;
@@ -80,6 +81,7 @@ declare type MissingFieldsOfCountrySchema = {
80
81
  continent?: ContinentSchema;
81
82
  };
82
83
  export declare type ItemDataSchema = Schema<ItemData, boolean>;
84
+ export declare type UserRoleSchema = Schema<UserRole, boolean>;
83
85
  export declare type QuoteSchema = Merge<Schema<QuoteType, boolean>, MissingFieldsOfQuoteSchema>;
84
86
  export declare type ContactsSchema = Merge<Schema<ContactsType, boolean>, MissingFieldsOfContactSchema>;
85
87
  export declare type UserSchema = Merge<Schema<UserType, boolean>, MissingFieldsOfUserSchema>;
@@ -13,8 +13,7 @@ export declare enum OrderFields {
13
13
  COLUMN_CUSTOMER = "customer",
14
14
  COLUMN_PONUMBER = "ponumber",
15
15
  COLUMN_PRODUCTS = "products",
16
- COLUMN_EXTRA_INFORMATION = "extraInformation",
17
- COLUMN_ORGANIZATION_UNIT_REF = "organizationUnitRef"
16
+ COLUMN_EXTRA_INFORMATION = "extraInformation"
18
17
  }
19
18
  export declare type OrderType = {
20
19
  [OrderFields.COLUMN_REFERENCE]: string;
@@ -27,7 +26,6 @@ export declare type OrderType = {
27
26
  [OrderFields.COLUMN_PONUMBER]: string;
28
27
  [OrderFields.COLUMN_PRODUCTS]: Array<OrderProductsType>;
29
28
  [OrderFields.COLUMN_EXTRA_INFORMATION]?: AdditionalExtraInformationType;
30
- [OrderFields.COLUMN_ORGANIZATION_UNIT_REF]?: string;
31
29
  };
32
30
  export declare class Order extends AbstractEntity<OrderType> {
33
31
  #private;
@@ -42,6 +40,5 @@ export declare class Order extends AbstractEntity<OrderType> {
42
40
  get ponumber(): string;
43
41
  get products(): Array<OrderProduct>;
44
42
  get extraInformation(): AdditionalExtraInformation | undefined;
45
- get organizationUnitRef(): string | undefined;
46
43
  toJSON(): OrderType;
47
44
  }
@@ -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 _Order_reference, _Order_status, _Order_dateStatus, _Order_dateCreation, _Order_order_reference, _Order_partner, _Order_customer, _Order_ponumber, _Order_products, _Order_extraInformation, _Order_organizationUnitRef;
13
+ var _Order_reference, _Order_status, _Order_dateStatus, _Order_dateCreation, _Order_order_reference, _Order_partner, _Order_customer, _Order_ponumber, _Order_products, _Order_extraInformation;
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.Order = exports.OrderFields = void 0;
16
16
  const abstractEntity_1 = require("../../../abstractEntity");
@@ -30,7 +30,6 @@ var OrderFields;
30
30
  OrderFields["COLUMN_PONUMBER"] = "ponumber";
31
31
  OrderFields["COLUMN_PRODUCTS"] = "products";
32
32
  OrderFields["COLUMN_EXTRA_INFORMATION"] = "extraInformation";
33
- OrderFields["COLUMN_ORGANIZATION_UNIT_REF"] = "organizationUnitRef";
34
33
  })(OrderFields = exports.OrderFields || (exports.OrderFields = {}));
35
34
  class Order extends abstractEntity_1.AbstractEntity {
36
35
  constructor(getOrderDataInput) {
@@ -45,7 +44,6 @@ class Order extends abstractEntity_1.AbstractEntity {
45
44
  _Order_ponumber.set(this, void 0);
46
45
  _Order_products.set(this, void 0);
47
46
  _Order_extraInformation.set(this, void 0);
48
- _Order_organizationUnitRef.set(this, void 0);
49
47
  __classPrivateFieldSet(this, _Order_reference, getOrderDataInput[OrderFields.COLUMN_REFERENCE], "f");
50
48
  __classPrivateFieldSet(this, _Order_status, getOrderDataInput[OrderFields.COLUMN_STATUS], "f");
51
49
  __classPrivateFieldSet(this, _Order_dateStatus, getOrderDataInput[OrderFields.COLUMN_DATESTATUS], "f");
@@ -60,7 +58,6 @@ class Order extends abstractEntity_1.AbstractEntity {
60
58
  __classPrivateFieldSet(this, _Order_extraInformation, getOrderDataInput[OrderFields.COLUMN_EXTRA_INFORMATION]
61
59
  ? new shared_1.AdditionalExtraInformation(getOrderDataInput[OrderFields.COLUMN_EXTRA_INFORMATION])
62
60
  : undefined, "f");
63
- __classPrivateFieldSet(this, _Order_organizationUnitRef, getOrderDataInput[OrderFields.COLUMN_ORGANIZATION_UNIT_REF], "f");
64
61
  }
65
62
  get reference() {
66
63
  return __classPrivateFieldGet(this, _Order_reference, "f");
@@ -92,9 +89,6 @@ class Order extends abstractEntity_1.AbstractEntity {
92
89
  get extraInformation() {
93
90
  return __classPrivateFieldGet(this, _Order_extraInformation, "f");
94
91
  }
95
- get organizationUnitRef() {
96
- return __classPrivateFieldGet(this, _Order_organizationUnitRef, "f");
97
- }
98
92
  toJSON() {
99
93
  var _a, _b;
100
94
  return {
@@ -108,10 +102,9 @@ class Order extends abstractEntity_1.AbstractEntity {
108
102
  [OrderFields.COLUMN_PONUMBER]: this.ponumber,
109
103
  [OrderFields.COLUMN_PRODUCTS]: this.products.map((order) => order.toJSON()),
110
104
  [OrderFields.COLUMN_EXTRA_INFORMATION]: (_b = this.extraInformation) === null || _b === void 0 ? void 0 : _b.toJSON(),
111
- [OrderFields.COLUMN_ORGANIZATION_UNIT_REF]: this.organizationUnitRef,
112
105
  };
113
106
  }
114
107
  }
115
108
  exports.Order = Order;
116
- _Order_reference = new WeakMap(), _Order_status = new WeakMap(), _Order_dateStatus = new WeakMap(), _Order_dateCreation = new WeakMap(), _Order_order_reference = new WeakMap(), _Order_partner = new WeakMap(), _Order_customer = new WeakMap(), _Order_ponumber = new WeakMap(), _Order_products = new WeakMap(), _Order_extraInformation = new WeakMap(), _Order_organizationUnitRef = new WeakMap();
109
+ _Order_reference = new WeakMap(), _Order_status = new WeakMap(), _Order_dateStatus = new WeakMap(), _Order_dateCreation = new WeakMap(), _Order_order_reference = new WeakMap(), _Order_partner = new WeakMap(), _Order_customer = new WeakMap(), _Order_ponumber = new WeakMap(), _Order_products = new WeakMap(), _Order_extraInformation = new WeakMap();
117
110
  //# sourceMappingURL=order.js.map
@@ -2,7 +2,6 @@ import { AbstractRestfulClient, Parameters } from '../abstractRestfulClient';
2
2
  import { GetResult } from '../getResult';
3
3
  import { DataListOrders } from './entities/dataListOrders';
4
4
  import { ReferenceLink } from './entities/referenceLink';
5
- import { UpdateOrderResult } from './entities/orders/updateOrderResult';
6
5
  export declare enum CreateOrderInputFields {
7
6
  COLUMN_CUSTOMER = "customer",
8
7
  COLUMN_REFERENCE = "reference",
@@ -118,12 +117,6 @@ export declare type CreateOrderProductType = {
118
117
  };
119
118
  [CreateOrderInputFields.COLUMN_EAVS]?: Record<string, string>;
120
119
  };
121
- export declare enum UpdateOrderInputFields {
122
- COLUMN_PO_NUMBER = "PO_number"
123
- }
124
- export declare type UpdateOrderInputType = {
125
- [UpdateOrderInputFields.COLUMN_PO_NUMBER]: string;
126
- };
127
120
  export declare class OrdersClient extends AbstractRestfulClient {
128
121
  /**
129
122
  * The base path of the API
@@ -132,5 +125,4 @@ export declare class OrdersClient extends AbstractRestfulClient {
132
125
  create(postData: CreateOrderInputType, parameters?: Parameters): Promise<GetResult<ReferenceLink>>;
133
126
  getListOrders(perPage?: number, page?: number, parameters?: Parameters): Promise<GetResult<DataListOrders>>;
134
127
  getOrder(orderReference: string, parameters?: Parameters): Promise<GetResult<DataListOrders>>;
135
- updateOrder(orderReference: string, payload: UpdateOrderInputType, parameters?: Parameters): Promise<GetResult<UpdateOrderResult>>;
136
128
  }
@@ -1,11 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OrdersClient = exports.UpdateOrderInputFields = exports.scenarioType = exports.CreateOrderInputFields = void 0;
3
+ exports.OrdersClient = exports.scenarioType = exports.CreateOrderInputFields = void 0;
4
4
  const abstractRestfulClient_1 = require("../abstractRestfulClient");
5
5
  const getResult_1 = require("../getResult");
6
6
  const dataListOrders_1 = require("./entities/dataListOrders");
7
7
  const referenceLink_1 = require("./entities/referenceLink");
8
- const updateOrderResult_1 = require("./entities/orders/updateOrderResult");
9
8
  var CreateOrderInputFields;
10
9
  (function (CreateOrderInputFields) {
11
10
  CreateOrderInputFields["COLUMN_CUSTOMER"] = "customer";
@@ -54,10 +53,6 @@ var scenarioType;
54
53
  scenarioType["RECONCILIATION"] = "reconciliation";
55
54
  scenarioType["PROVISION"] = "provision";
56
55
  })(scenarioType = exports.scenarioType || (exports.scenarioType = {}));
57
- var UpdateOrderInputFields;
58
- (function (UpdateOrderInputFields) {
59
- UpdateOrderInputFields["COLUMN_PO_NUMBER"] = "PO_number";
60
- })(UpdateOrderInputFields = exports.UpdateOrderInputFields || (exports.UpdateOrderInputFields = {}));
61
56
  class OrdersClient extends abstractRestfulClient_1.AbstractRestfulClient {
62
57
  constructor() {
63
58
  super(...arguments);
@@ -78,10 +73,6 @@ class OrdersClient extends abstractRestfulClient_1.AbstractRestfulClient {
78
73
  this.path = `/${orderReference}`;
79
74
  return new getResult_1.GetResult(dataListOrders_1.DataListOrders, await this.get(parameters));
80
75
  }
81
- async updateOrder(orderReference, payload, parameters = {}) {
82
- this.path = `/${orderReference}`;
83
- return new getResult_1.GetResult(updateOrderResult_1.UpdateOrderResult, await this.patch(payload, parameters));
84
- }
85
76
  }
86
77
  exports.OrdersClient = OrdersClient;
87
78
  //# sourceMappingURL=ordersClient.js.map
@@ -5,8 +5,7 @@ export declare enum OrganizationUnitFields {
5
5
  COLUMN_NAME = "name",
6
6
  COLUMN_COUNT_USERS = "countUsers",
7
7
  COLUMN_COUNT_CUSTOMERS = "countCustomers",
8
- COLUMN_COUNT_LICENSES = "countLicenses",
9
- COLUMN_COUNT_ORDERS = "countOrders"
8
+ COLUMN_COUNT_LICENSES = "countLicenses"
10
9
  }
11
10
  export declare type OrganizationUnitType = {
12
11
  [OrganizationUnitFields.COLUMN_ORGANIZATION_UNIT_REF]: string;
@@ -15,7 +14,6 @@ export declare type OrganizationUnitType = {
15
14
  [OrganizationUnitFields.COLUMN_COUNT_USERS]?: number;
16
15
  [OrganizationUnitFields.COLUMN_COUNT_CUSTOMERS]?: number;
17
16
  [OrganizationUnitFields.COLUMN_COUNT_LICENSES]?: number;
18
- [OrganizationUnitFields.COLUMN_COUNT_ORDERS]?: number;
19
17
  };
20
18
  export declare class OrganizationUnit extends AbstractEntity<OrganizationUnitType> {
21
19
  #private;
@@ -26,6 +24,5 @@ export declare class OrganizationUnit extends AbstractEntity<OrganizationUnitTyp
26
24
  get countUsers(): number | undefined;
27
25
  get countCustomers(): number | undefined;
28
26
  get countLicenses(): number | undefined;
29
- get countOrders(): number | undefined;
30
27
  toJSON(): OrganizationUnitType;
31
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, _OrganizationUnit_countLicenses, _OrganizationUnit_countOrders;
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");
@@ -22,7 +22,6 @@ var OrganizationUnitFields;
22
22
  OrganizationUnitFields["COLUMN_COUNT_USERS"] = "countUsers";
23
23
  OrganizationUnitFields["COLUMN_COUNT_CUSTOMERS"] = "countCustomers";
24
24
  OrganizationUnitFields["COLUMN_COUNT_LICENSES"] = "countLicenses";
25
- OrganizationUnitFields["COLUMN_COUNT_ORDERS"] = "countOrders";
26
25
  })(OrganizationUnitFields = exports.OrganizationUnitFields || (exports.OrganizationUnitFields = {}));
27
26
  class OrganizationUnit extends abstractEntity_1.AbstractEntity {
28
27
  constructor(organizationUnitInput) {
@@ -33,14 +32,12 @@ class OrganizationUnit extends abstractEntity_1.AbstractEntity {
33
32
  _OrganizationUnit_countUsers.set(this, void 0);
34
33
  _OrganizationUnit_countCustomers.set(this, void 0);
35
34
  _OrganizationUnit_countLicenses.set(this, void 0);
36
- _OrganizationUnit_countOrders.set(this, void 0);
37
35
  __classPrivateFieldSet(this, _OrganizationUnit_organizationUnitRef, organizationUnitInput[OrganizationUnitFields.COLUMN_ORGANIZATION_UNIT_REF], "f");
38
36
  __classPrivateFieldSet(this, _OrganizationUnit_companyRef, organizationUnitInput[OrganizationUnitFields.COLUMN_COMPANY_REF], "f");
39
37
  __classPrivateFieldSet(this, _OrganizationUnit_name, organizationUnitInput[OrganizationUnitFields.COLUMN_NAME], "f");
40
38
  __classPrivateFieldSet(this, _OrganizationUnit_countUsers, organizationUnitInput[OrganizationUnitFields.COLUMN_COUNT_USERS], "f");
41
39
  __classPrivateFieldSet(this, _OrganizationUnit_countCustomers, organizationUnitInput[OrganizationUnitFields.COLUMN_COUNT_CUSTOMERS], "f");
42
40
  __classPrivateFieldSet(this, _OrganizationUnit_countLicenses, organizationUnitInput[OrganizationUnitFields.COLUMN_COUNT_LICENSES], "f");
43
- __classPrivateFieldSet(this, _OrganizationUnit_countOrders, organizationUnitInput[OrganizationUnitFields.COLUMN_COUNT_ORDERS], "f");
44
41
  }
45
42
  get organizationUnitRef() {
46
43
  return __classPrivateFieldGet(this, _OrganizationUnit_organizationUnitRef, "f");
@@ -60,9 +57,6 @@ class OrganizationUnit extends abstractEntity_1.AbstractEntity {
60
57
  get countLicenses() {
61
58
  return __classPrivateFieldGet(this, _OrganizationUnit_countLicenses, "f");
62
59
  }
63
- get countOrders() {
64
- return __classPrivateFieldGet(this, _OrganizationUnit_countOrders, "f");
65
- }
66
60
  toJSON() {
67
61
  return {
68
62
  [OrganizationUnitFields.COLUMN_ORGANIZATION_UNIT_REF]: this
@@ -72,10 +66,9 @@ class OrganizationUnit extends abstractEntity_1.AbstractEntity {
72
66
  [OrganizationUnitFields.COLUMN_COUNT_USERS]: this.countUsers,
73
67
  [OrganizationUnitFields.COLUMN_COUNT_CUSTOMERS]: this.countCustomers,
74
68
  [OrganizationUnitFields.COLUMN_COUNT_LICENSES]: this.countLicenses,
75
- [OrganizationUnitFields.COLUMN_COUNT_ORDERS]: this.countOrders,
76
69
  };
77
70
  }
78
71
  }
79
72
  exports.OrganizationUnit = OrganizationUnit;
80
- _OrganizationUnit_organizationUnitRef = new WeakMap(), _OrganizationUnit_companyRef = new WeakMap(), _OrganizationUnit_name = new WeakMap(), _OrganizationUnit_countUsers = new WeakMap(), _OrganizationUnit_countCustomers = new WeakMap(), _OrganizationUnit_countLicenses = new WeakMap(), _OrganizationUnit_countOrders = 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();
81
74
  //# sourceMappingURL=organizationUnit.js.map
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.145.0-rc-cpu-2",
7
+ "version": "3.145.1-rc.sba.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",
@@ -1,9 +0,0 @@
1
- import { AbstractEntity } from '../../../abstractEntity';
2
- export declare type UpdateOrderResultData = {
3
- message: string;
4
- };
5
- export declare class UpdateOrderResult extends AbstractEntity<UpdateOrderResultData> {
6
- #private;
7
- constructor(data: UpdateOrderResultData);
8
- toJSON(): UpdateOrderResultData;
9
- }
@@ -1,31 +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 _UpdateOrderResult_message;
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.UpdateOrderResult = void 0;
16
- const abstractEntity_1 = require("../../../abstractEntity");
17
- class UpdateOrderResult extends abstractEntity_1.AbstractEntity {
18
- constructor(data) {
19
- super(data);
20
- _UpdateOrderResult_message.set(this, void 0);
21
- __classPrivateFieldSet(this, _UpdateOrderResult_message, data.message, "f");
22
- }
23
- toJSON() {
24
- return {
25
- message: __classPrivateFieldGet(this, _UpdateOrderResult_message, "f"),
26
- };
27
- }
28
- }
29
- exports.UpdateOrderResult = UpdateOrderResult;
30
- _UpdateOrderResult_message = new WeakMap();
31
- //# sourceMappingURL=updateOrderResult.js.map