@arrowsphere/api-client 3.227.0 → 3.229.0-rc-cpe-3
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 +8 -0
- package/Makefile +35 -2
- package/README.md +4 -0
- package/build/abstractGraphQLClient.d.ts +2 -3
- package/build/abstractGraphQLClient.js +1 -1
- package/build/abstractRestfulClient.d.ts +1 -1
- package/build/abstractRestfulClient.js +3 -3
- package/build/orders/entities/orders/products/family/family.d.ts +13 -0
- package/build/orders/entities/orders/products/family/family.js +38 -0
- package/build/orders/entities/orders/products/identifiers/vendor/attributes/identifiersVendorAttributes.d.ts +13 -0
- package/build/orders/entities/orders/products/identifiers/vendor/attributes/identifiersVendorAttributes.js +39 -0
- package/build/orders/entities/orders/products/identifiers/vendor/identifiersVendor.d.ts +8 -1
- package/build/orders/entities/orders/products/identifiers/vendor/identifiersVendor.js +20 -2
- package/build/orders/entities/orders/products/priceBand/priceBand.d.ts +9 -0
- package/build/orders/entities/orders/products/priceBand/priceBand.js +6 -0
- package/build/orders/entities/orders/products/pricingRules/pricingRules.d.ts +35 -0
- package/build/orders/entities/orders/products/pricingRules/pricingRules.js +71 -0
- package/build/orders/entities/orders/products/products.d.ts +24 -4
- package/build/orders/entities/orders/products/products.js +48 -4
- package/package.json +11 -13
package/CHANGELOG.md
CHANGED
|
@@ -3,9 +3,17 @@
|
|
|
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.228.0] - 2025.12.09
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
|
|
10
|
+
- [Project Security] Update multiple libraries to fix security vulnerabilities and add ci to check vulnerabilities
|
|
11
|
+
|
|
12
|
+
|
|
6
13
|
## [3.227.0] - 2025.11.26
|
|
7
14
|
|
|
8
15
|
### Added
|
|
16
|
+
|
|
9
17
|
- [campaigns] Add field campaignPopup and all subfield needed
|
|
10
18
|
|
|
11
19
|
## [3.226.0] - 2025.11.20
|
package/Makefile
CHANGED
|
@@ -1,14 +1,47 @@
|
|
|
1
|
+
.PHONY: help install build clean test test-unit audit check-deps dedupe audits check-registry
|
|
2
|
+
|
|
3
|
+
help:
|
|
4
|
+
@echo "\033[1;36mInstallation:\033[0m" \
|
|
5
|
+
&& echo " \033[1;32minstall \033[0m : Install dependencies (yarn install --frozen-lockfile)" \
|
|
6
|
+
&& echo " \033[1;32minstall-mutable \033[0m : Update yarn.lock from package.json (yarn install)" \
|
|
7
|
+
&& echo "" \
|
|
8
|
+
&& echo "\033[1;36mBuild & Clean:\033[0m" \
|
|
9
|
+
&& echo " \033[1;32mbuild \033[0m : Build the project (yarn build)" \
|
|
10
|
+
&& echo " \033[1;32mclean \033[0m : Remove build and node_modules folders" \
|
|
11
|
+
&& echo "" \
|
|
12
|
+
&& echo "\033[1;36mTests:\033[0m" \
|
|
13
|
+
&& echo " \033[1;32mtest \033[0m : Run unit tests" \
|
|
14
|
+
&& echo " \033[1;32mtest-unit \033[0m : Run unit tests (alias for test)" \
|
|
15
|
+
&& echo "" \
|
|
16
|
+
&& echo "\033[1;36mAudit & Dependencies:\033[0m" \
|
|
17
|
+
&& echo " \033[1;32maudit \033[0m : Security audit of dependencies (yarn audit)" \
|
|
18
|
+
&& echo " \033[1;32mcheck-deps \033[0m : Check for unused dependencies (depcheck)" \
|
|
19
|
+
&& echo " \033[1;32mdedupe \033[0m : Deduplicate dependencies in yarn.lock" \
|
|
20
|
+
&& echo " \033[1;32mcheck-registry\033[0m : Ensure all dependencies come from npmjs.org or yarnpkg.com"
|
|
21
|
+
|
|
1
22
|
install:
|
|
23
|
+
yarn install --frozen-lockfile
|
|
24
|
+
|
|
25
|
+
install-mutable:
|
|
2
26
|
yarn install
|
|
3
27
|
|
|
4
28
|
build:
|
|
5
29
|
yarn build
|
|
6
30
|
|
|
7
31
|
clean:
|
|
8
|
-
rm -rf build
|
|
9
|
-
node_modules
|
|
32
|
+
rm -rf build node_modules
|
|
10
33
|
|
|
11
34
|
test: test-unit
|
|
12
35
|
|
|
13
36
|
test-unit:
|
|
14
37
|
yarn test
|
|
38
|
+
|
|
39
|
+
audit:
|
|
40
|
+
yarn audit
|
|
41
|
+
|
|
42
|
+
dedupe:
|
|
43
|
+
yarn dedupe && yarn install --frozen-lockfile
|
|
44
|
+
|
|
45
|
+
check-registry:
|
|
46
|
+
@echo "\033[1;36mChecking that all dependencies come from npmjs.org or yarnpkg.com...\033[0m"
|
|
47
|
+
@awk '/^ resolved / {print $$2}' yarn.lock | grep -Ev 'npmjs.org|yarnpkg.com' && (echo '\033[1;31mSome dependencies are not from npmjs.org or yarnpkg.com!\033[0m' && exit 1) || echo '\033[1;32mAll dependencies are from npmjs.org or yarnpkg.com.\033[0m'
|
package/README.md
CHANGED
|
@@ -10,6 +10,10 @@ It should be the only way to make calls to ArrowSphere's API with Node.js code.
|
|
|
10
10
|
|
|
11
11
|
To use this package, you need valid access to ArrowSphere, with a valid API key.
|
|
12
12
|
|
|
13
|
+
# ⚠️ Security Disclaimer
|
|
14
|
+
|
|
15
|
+
**Please exercise extreme caution when installing new dependencies. Always verify the source and reputation of any library before adding it to your project, to avoid introducing malicious packages.**
|
|
16
|
+
|
|
13
17
|
## Installation
|
|
14
18
|
|
|
15
19
|
Install the latest version with
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { GraphQLClient } from 'graphql-request';
|
|
2
|
-
import * as Dom from 'graphql-request/dist/types.dom';
|
|
3
1
|
import { Options } from './abstractRestfulClient';
|
|
4
2
|
import { GetProductsType } from './catalog';
|
|
5
3
|
import { AbstractHttpClient } from './AbstractHttpClient';
|
|
4
|
+
import { GraphQLClient } from 'graphql-request';
|
|
6
5
|
export declare type GraphQLResponseTypes = GetProductsType;
|
|
7
6
|
export declare abstract class AbstractGraphQLClient extends AbstractHttpClient {
|
|
8
7
|
/**
|
|
@@ -10,7 +9,7 @@ export declare abstract class AbstractGraphQLClient extends AbstractHttpClient {
|
|
|
10
9
|
* Use getClientInstance() to access it.
|
|
11
10
|
*/
|
|
12
11
|
protected graphQLClient: GraphQLClient;
|
|
13
|
-
protected optionsHeader?:
|
|
12
|
+
protected optionsHeader?: RequestInit['headers'];
|
|
14
13
|
protected options: Options;
|
|
15
14
|
private getClientInstance;
|
|
16
15
|
setOptions(options: Options): this;
|
|
@@ -24,10 +24,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.AbstractGraphQLClient = void 0;
|
|
27
|
-
const graphql_request_1 = require("graphql-request");
|
|
28
27
|
const path = __importStar(require("path"));
|
|
29
28
|
const json_to_graphql_query_1 = require("json-to-graphql-query");
|
|
30
29
|
const AbstractHttpClient_1 = require("./AbstractHttpClient");
|
|
30
|
+
const graphql_request_1 = require("graphql-request");
|
|
31
31
|
class AbstractGraphQLClient extends AbstractHttpClient_1.AbstractHttpClient {
|
|
32
32
|
constructor() {
|
|
33
33
|
super(...arguments);
|
|
@@ -34,7 +34,7 @@ export declare enum FileUploadKeys {
|
|
|
34
34
|
}
|
|
35
35
|
export declare type Payload = Record<string, unknown> | Array<Payload>;
|
|
36
36
|
export interface PayloadWithFile {
|
|
37
|
-
[FileUploadKeys.Fields]?: Record<string,
|
|
37
|
+
[FileUploadKeys.Fields]?: Record<string, File>;
|
|
38
38
|
[FileUploadKeys.File]?: File;
|
|
39
39
|
}
|
|
40
40
|
export declare type Options = {
|
|
@@ -209,7 +209,7 @@ class AbstractRestfulClient extends AbstractHttpClient_1.AbstractHttpClient {
|
|
|
209
209
|
* @param options - Options to send
|
|
210
210
|
*/
|
|
211
211
|
async postFile(payload, parameters = {}, headers = {}, options = {}) {
|
|
212
|
-
var _a;
|
|
212
|
+
var _a, _b;
|
|
213
213
|
if (!payload[FileUploadKeys.File]) {
|
|
214
214
|
throw new Error('File upload required');
|
|
215
215
|
}
|
|
@@ -220,8 +220,8 @@ class AbstractRestfulClient extends AbstractHttpClient_1.AbstractHttpClient {
|
|
|
220
220
|
headers: this.prepareHeaders(headers),
|
|
221
221
|
};
|
|
222
222
|
const formData = new FormData();
|
|
223
|
-
formData.append(FileUploadKeys.File, payload[FileUploadKeys.File]);
|
|
224
|
-
for (const [key, value] of Object.entries((
|
|
223
|
+
formData.append(FileUploadKeys.File, (_a = payload[FileUploadKeys.File]) !== null && _a !== void 0 ? _a : '');
|
|
224
|
+
for (const [key, value] of Object.entries((_b = payload[FileUploadKeys.Fields]) !== null && _b !== void 0 ? _b : {})) {
|
|
225
225
|
console.log(`${key}: ${value}`);
|
|
226
226
|
formData.set(key, value);
|
|
227
227
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../../../../abstractEntity';
|
|
2
|
+
export declare enum FamilyFields {
|
|
3
|
+
COLUMN_NAME = "name"
|
|
4
|
+
}
|
|
5
|
+
export declare type FamilyType = {
|
|
6
|
+
[FamilyFields.COLUMN_NAME]?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare class Family extends AbstractEntity<FamilyType> {
|
|
9
|
+
#private;
|
|
10
|
+
constructor(family: FamilyType);
|
|
11
|
+
get name(): string | undefined;
|
|
12
|
+
toJSON(): FamilyType;
|
|
13
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
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 _Family_name;
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.Family = exports.FamilyFields = void 0;
|
|
16
|
+
const abstractEntity_1 = require("../../../../../abstractEntity");
|
|
17
|
+
var FamilyFields;
|
|
18
|
+
(function (FamilyFields) {
|
|
19
|
+
FamilyFields["COLUMN_NAME"] = "name";
|
|
20
|
+
})(FamilyFields = exports.FamilyFields || (exports.FamilyFields = {}));
|
|
21
|
+
class Family extends abstractEntity_1.AbstractEntity {
|
|
22
|
+
constructor(family) {
|
|
23
|
+
super(family);
|
|
24
|
+
_Family_name.set(this, void 0);
|
|
25
|
+
__classPrivateFieldSet(this, _Family_name, family[FamilyFields.COLUMN_NAME], "f");
|
|
26
|
+
}
|
|
27
|
+
get name() {
|
|
28
|
+
return __classPrivateFieldGet(this, _Family_name, "f");
|
|
29
|
+
}
|
|
30
|
+
toJSON() {
|
|
31
|
+
return {
|
|
32
|
+
[FamilyFields.COLUMN_NAME]: this.name,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.Family = Family;
|
|
37
|
+
_Family_name = new WeakMap();
|
|
38
|
+
//# sourceMappingURL=family.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../../../../../../abstractEntity';
|
|
2
|
+
export declare enum IdentifiersVendorAttributesFields {
|
|
3
|
+
COLUMN_CAN_SWITCH_AUTO_RENEW = "canSwitchAutoRenew"
|
|
4
|
+
}
|
|
5
|
+
export declare type IdentifiersVendorAttributesType = {
|
|
6
|
+
[IdentifiersVendorAttributesFields.COLUMN_CAN_SWITCH_AUTO_RENEW]?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare class IdentifiersVendorAttributes extends AbstractEntity<IdentifiersVendorAttributesType> {
|
|
9
|
+
#private;
|
|
10
|
+
constructor(attributes: IdentifiersVendorAttributesType);
|
|
11
|
+
get canSwitchAutoRenew(): boolean | undefined;
|
|
12
|
+
toJSON(): IdentifiersVendorAttributesType;
|
|
13
|
+
}
|
|
@@ -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 _IdentifiersVendorAttributes_canSwitchAutoRenew;
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.IdentifiersVendorAttributes = exports.IdentifiersVendorAttributesFields = void 0;
|
|
16
|
+
const abstractEntity_1 = require("../../../../../../../abstractEntity");
|
|
17
|
+
var IdentifiersVendorAttributesFields;
|
|
18
|
+
(function (IdentifiersVendorAttributesFields) {
|
|
19
|
+
IdentifiersVendorAttributesFields["COLUMN_CAN_SWITCH_AUTO_RENEW"] = "canSwitchAutoRenew";
|
|
20
|
+
})(IdentifiersVendorAttributesFields = exports.IdentifiersVendorAttributesFields || (exports.IdentifiersVendorAttributesFields = {}));
|
|
21
|
+
class IdentifiersVendorAttributes extends abstractEntity_1.AbstractEntity {
|
|
22
|
+
constructor(attributes) {
|
|
23
|
+
super(attributes);
|
|
24
|
+
_IdentifiersVendorAttributes_canSwitchAutoRenew.set(this, void 0);
|
|
25
|
+
__classPrivateFieldSet(this, _IdentifiersVendorAttributes_canSwitchAutoRenew, attributes[IdentifiersVendorAttributesFields.COLUMN_CAN_SWITCH_AUTO_RENEW], "f");
|
|
26
|
+
}
|
|
27
|
+
get canSwitchAutoRenew() {
|
|
28
|
+
return __classPrivateFieldGet(this, _IdentifiersVendorAttributes_canSwitchAutoRenew, "f");
|
|
29
|
+
}
|
|
30
|
+
toJSON() {
|
|
31
|
+
return {
|
|
32
|
+
[IdentifiersVendorAttributesFields.COLUMN_CAN_SWITCH_AUTO_RENEW]: this
|
|
33
|
+
.canSwitchAutoRenew,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.IdentifiersVendorAttributes = IdentifiersVendorAttributes;
|
|
38
|
+
_IdentifiersVendorAttributes_canSwitchAutoRenew = new WeakMap();
|
|
39
|
+
//# sourceMappingURL=identifiersVendorAttributes.js.map
|
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
import { AbstractEntity } from '../../../../../../abstractEntity';
|
|
2
|
+
import { IdentifiersVendorAttributes, IdentifiersVendorAttributesType } from './attributes/identifiersVendorAttributes';
|
|
2
3
|
export declare enum IdentifiersVendorFields {
|
|
3
|
-
|
|
4
|
+
COLUMN_ATTRIBUTES = "attributes",
|
|
5
|
+
COLUMN_SKU = "sku",
|
|
6
|
+
COLUMN_NAME = "name"
|
|
4
7
|
}
|
|
5
8
|
export declare type IdentifiersVendorType = {
|
|
9
|
+
[IdentifiersVendorFields.COLUMN_ATTRIBUTES]?: IdentifiersVendorAttributesType;
|
|
6
10
|
[IdentifiersVendorFields.COLUMN_SKU]: string;
|
|
11
|
+
[IdentifiersVendorFields.COLUMN_NAME]?: string;
|
|
7
12
|
};
|
|
8
13
|
export declare class IdentifiersVendor extends AbstractEntity<IdentifiersVendorType> {
|
|
9
14
|
#private;
|
|
10
15
|
constructor(vendor: IdentifiersVendorType);
|
|
16
|
+
get attributes(): IdentifiersVendorAttributes | undefined;
|
|
17
|
+
get name(): string | undefined;
|
|
11
18
|
get sku(): string;
|
|
12
19
|
toJSON(): IdentifiersVendorType;
|
|
13
20
|
}
|
|
@@ -10,29 +10,47 @@ 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 _IdentifiersVendor_sku;
|
|
13
|
+
var _IdentifiersVendor_attributes, _IdentifiersVendor_name, _IdentifiersVendor_sku;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.IdentifiersVendor = exports.IdentifiersVendorFields = void 0;
|
|
16
16
|
const abstractEntity_1 = require("../../../../../../abstractEntity");
|
|
17
|
+
const identifiersVendorAttributes_1 = require("./attributes/identifiersVendorAttributes");
|
|
17
18
|
var IdentifiersVendorFields;
|
|
18
19
|
(function (IdentifiersVendorFields) {
|
|
20
|
+
IdentifiersVendorFields["COLUMN_ATTRIBUTES"] = "attributes";
|
|
19
21
|
IdentifiersVendorFields["COLUMN_SKU"] = "sku";
|
|
22
|
+
IdentifiersVendorFields["COLUMN_NAME"] = "name";
|
|
20
23
|
})(IdentifiersVendorFields = exports.IdentifiersVendorFields || (exports.IdentifiersVendorFields = {}));
|
|
21
24
|
class IdentifiersVendor extends abstractEntity_1.AbstractEntity {
|
|
22
25
|
constructor(vendor) {
|
|
23
26
|
super(vendor);
|
|
27
|
+
_IdentifiersVendor_attributes.set(this, void 0);
|
|
28
|
+
_IdentifiersVendor_name.set(this, void 0);
|
|
24
29
|
_IdentifiersVendor_sku.set(this, void 0);
|
|
30
|
+
__classPrivateFieldSet(this, _IdentifiersVendor_attributes, vendor[IdentifiersVendorFields.COLUMN_ATTRIBUTES]
|
|
31
|
+
? new identifiersVendorAttributes_1.IdentifiersVendorAttributes(vendor[IdentifiersVendorFields.COLUMN_ATTRIBUTES])
|
|
32
|
+
: undefined, "f");
|
|
33
|
+
__classPrivateFieldSet(this, _IdentifiersVendor_name, vendor[IdentifiersVendorFields.COLUMN_NAME], "f");
|
|
25
34
|
__classPrivateFieldSet(this, _IdentifiersVendor_sku, vendor[IdentifiersVendorFields.COLUMN_SKU], "f");
|
|
26
35
|
}
|
|
36
|
+
get attributes() {
|
|
37
|
+
return __classPrivateFieldGet(this, _IdentifiersVendor_attributes, "f");
|
|
38
|
+
}
|
|
39
|
+
get name() {
|
|
40
|
+
return __classPrivateFieldGet(this, _IdentifiersVendor_name, "f");
|
|
41
|
+
}
|
|
27
42
|
get sku() {
|
|
28
43
|
return __classPrivateFieldGet(this, _IdentifiersVendor_sku, "f");
|
|
29
44
|
}
|
|
30
45
|
toJSON() {
|
|
46
|
+
var _a;
|
|
31
47
|
return {
|
|
48
|
+
[IdentifiersVendorFields.COLUMN_ATTRIBUTES]: (_a = this.attributes) === null || _a === void 0 ? void 0 : _a.toJSON(),
|
|
49
|
+
[IdentifiersVendorFields.COLUMN_NAME]: this.name,
|
|
32
50
|
[IdentifiersVendorFields.COLUMN_SKU]: this.sku,
|
|
33
51
|
};
|
|
34
52
|
}
|
|
35
53
|
}
|
|
36
54
|
exports.IdentifiersVendor = IdentifiersVendor;
|
|
37
|
-
_IdentifiersVendor_sku = new WeakMap();
|
|
55
|
+
_IdentifiersVendor_attributes = new WeakMap(), _IdentifiersVendor_name = new WeakMap(), _IdentifiersVendor_sku = new WeakMap();
|
|
38
56
|
//# sourceMappingURL=identifiersVendor.js.map
|
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
import { PriceBandAttribute } from '../../../../../licenses';
|
|
2
2
|
import { AbstractEntity } from '../../../../../abstractEntity';
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Use PriceBandDataFields instead
|
|
5
|
+
*/
|
|
3
6
|
export declare enum PriceBandFields {
|
|
4
7
|
COLUMN_ATTRIBUTES = "attributes"
|
|
5
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated Use PriceBandData instead
|
|
11
|
+
*/
|
|
6
12
|
export declare type PriceBandType = {
|
|
7
13
|
[PriceBandFields.COLUMN_ATTRIBUTES]?: PriceBandAttribute[];
|
|
8
14
|
};
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated Use PriceBandGetResult instead
|
|
17
|
+
*/
|
|
9
18
|
export declare class PriceBand extends AbstractEntity<PriceBandType> {
|
|
10
19
|
#private;
|
|
11
20
|
constructor(data: PriceBand);
|
|
@@ -15,10 +15,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
exports.PriceBand = exports.PriceBandFields = void 0;
|
|
16
16
|
const licenses_1 = require("../../../../../licenses");
|
|
17
17
|
const abstractEntity_1 = require("../../../../../abstractEntity");
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated Use PriceBandDataFields instead
|
|
20
|
+
*/
|
|
18
21
|
var PriceBandFields;
|
|
19
22
|
(function (PriceBandFields) {
|
|
20
23
|
PriceBandFields["COLUMN_ATTRIBUTES"] = "attributes";
|
|
21
24
|
})(PriceBandFields = exports.PriceBandFields || (exports.PriceBandFields = {}));
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated Use PriceBandGetResult instead
|
|
27
|
+
*/
|
|
22
28
|
class PriceBand extends abstractEntity_1.AbstractEntity {
|
|
23
29
|
constructor(data) {
|
|
24
30
|
super(data);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../../../../abstractEntity';
|
|
2
|
+
export declare enum PricingRulesFields {
|
|
3
|
+
COLUMN_TIER = "tier",
|
|
4
|
+
COLUMN_TYPE = "type",
|
|
5
|
+
COLUMN_RATE_TYPE = "rateType",
|
|
6
|
+
COLUMN_VALUE = "value"
|
|
7
|
+
}
|
|
8
|
+
export declare enum RuleEnum {
|
|
9
|
+
RATE = "rate",
|
|
10
|
+
LINK_TO_DEFAULT = "linkToDefault"
|
|
11
|
+
}
|
|
12
|
+
export declare enum RateEnum {
|
|
13
|
+
UPLIFT = "uplift",
|
|
14
|
+
DISCOUNT = "discount",
|
|
15
|
+
DISCOUNT_ON_SELF = "discountOnSelf",
|
|
16
|
+
UPLIFT_ON_SELF = "upliftOnSelf"
|
|
17
|
+
}
|
|
18
|
+
export declare type Tier = 1 | 2 | 3;
|
|
19
|
+
export declare type RuleType = RuleEnum.RATE | RuleEnum.LINK_TO_DEFAULT;
|
|
20
|
+
export declare type RateType = RateEnum.DISCOUNT | RateEnum.DISCOUNT_ON_SELF | RateEnum.UPLIFT | RateEnum.UPLIFT_ON_SELF;
|
|
21
|
+
export declare type BusinessRuleEffectType = {
|
|
22
|
+
[PricingRulesFields.COLUMN_TIER]: Tier;
|
|
23
|
+
[PricingRulesFields.COLUMN_TYPE]: RuleType;
|
|
24
|
+
[PricingRulesFields.COLUMN_RATE_TYPE]?: RateType;
|
|
25
|
+
[PricingRulesFields.COLUMN_VALUE]?: number;
|
|
26
|
+
};
|
|
27
|
+
export declare class PricingRules extends AbstractEntity<BusinessRuleEffectType> {
|
|
28
|
+
#private;
|
|
29
|
+
constructor(businessRuleEffect: BusinessRuleEffectType);
|
|
30
|
+
get tier(): Tier;
|
|
31
|
+
get type(): RuleType;
|
|
32
|
+
get rateType(): RateType | undefined;
|
|
33
|
+
get value(): number | undefined;
|
|
34
|
+
toJSON(): BusinessRuleEffectType;
|
|
35
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
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 _PricingRules_tier, _PricingRules_type, _PricingRules_rateType, _PricingRules_value;
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.PricingRules = exports.RateEnum = exports.RuleEnum = exports.PricingRulesFields = void 0;
|
|
16
|
+
const abstractEntity_1 = require("../../../../../abstractEntity");
|
|
17
|
+
var PricingRulesFields;
|
|
18
|
+
(function (PricingRulesFields) {
|
|
19
|
+
PricingRulesFields["COLUMN_TIER"] = "tier";
|
|
20
|
+
PricingRulesFields["COLUMN_TYPE"] = "type";
|
|
21
|
+
PricingRulesFields["COLUMN_RATE_TYPE"] = "rateType";
|
|
22
|
+
PricingRulesFields["COLUMN_VALUE"] = "value";
|
|
23
|
+
})(PricingRulesFields = exports.PricingRulesFields || (exports.PricingRulesFields = {}));
|
|
24
|
+
var RuleEnum;
|
|
25
|
+
(function (RuleEnum) {
|
|
26
|
+
RuleEnum["RATE"] = "rate";
|
|
27
|
+
RuleEnum["LINK_TO_DEFAULT"] = "linkToDefault";
|
|
28
|
+
})(RuleEnum = exports.RuleEnum || (exports.RuleEnum = {}));
|
|
29
|
+
var RateEnum;
|
|
30
|
+
(function (RateEnum) {
|
|
31
|
+
RateEnum["UPLIFT"] = "uplift";
|
|
32
|
+
RateEnum["DISCOUNT"] = "discount";
|
|
33
|
+
RateEnum["DISCOUNT_ON_SELF"] = "discountOnSelf";
|
|
34
|
+
RateEnum["UPLIFT_ON_SELF"] = "upliftOnSelf";
|
|
35
|
+
})(RateEnum = exports.RateEnum || (exports.RateEnum = {}));
|
|
36
|
+
class PricingRules extends abstractEntity_1.AbstractEntity {
|
|
37
|
+
constructor(businessRuleEffect) {
|
|
38
|
+
super(businessRuleEffect);
|
|
39
|
+
_PricingRules_tier.set(this, void 0);
|
|
40
|
+
_PricingRules_type.set(this, void 0);
|
|
41
|
+
_PricingRules_rateType.set(this, void 0);
|
|
42
|
+
_PricingRules_value.set(this, void 0);
|
|
43
|
+
__classPrivateFieldSet(this, _PricingRules_tier, businessRuleEffect[PricingRulesFields.COLUMN_TIER], "f");
|
|
44
|
+
__classPrivateFieldSet(this, _PricingRules_type, businessRuleEffect[PricingRulesFields.COLUMN_TYPE], "f");
|
|
45
|
+
__classPrivateFieldSet(this, _PricingRules_rateType, businessRuleEffect[PricingRulesFields.COLUMN_RATE_TYPE], "f");
|
|
46
|
+
__classPrivateFieldSet(this, _PricingRules_value, businessRuleEffect[PricingRulesFields.COLUMN_VALUE], "f");
|
|
47
|
+
}
|
|
48
|
+
get tier() {
|
|
49
|
+
return __classPrivateFieldGet(this, _PricingRules_tier, "f");
|
|
50
|
+
}
|
|
51
|
+
get type() {
|
|
52
|
+
return __classPrivateFieldGet(this, _PricingRules_type, "f");
|
|
53
|
+
}
|
|
54
|
+
get rateType() {
|
|
55
|
+
return __classPrivateFieldGet(this, _PricingRules_rateType, "f");
|
|
56
|
+
}
|
|
57
|
+
get value() {
|
|
58
|
+
return __classPrivateFieldGet(this, _PricingRules_value, "f");
|
|
59
|
+
}
|
|
60
|
+
toJSON() {
|
|
61
|
+
return {
|
|
62
|
+
[PricingRulesFields.COLUMN_TIER]: this.tier,
|
|
63
|
+
[PricingRulesFields.COLUMN_TYPE]: this.type,
|
|
64
|
+
[PricingRulesFields.COLUMN_RATE_TYPE]: this.rateType,
|
|
65
|
+
[PricingRulesFields.COLUMN_VALUE]: this.value,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.PricingRules = PricingRules;
|
|
70
|
+
_PricingRules_tier = new WeakMap(), _PricingRules_type = new WeakMap(), _PricingRules_rateType = new WeakMap(), _PricingRules_value = new WeakMap();
|
|
71
|
+
//# sourceMappingURL=pricingRules.js.map
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import { AbstractEntity } from '../../../../abstractEntity';
|
|
2
|
+
import { PriceBandData, PriceBandGetResult } from '../../../../licenses';
|
|
2
3
|
import { ReferenceLink, ReferenceLinkType } from '../../referenceLink';
|
|
3
4
|
import { ProductPrices, ProductPricesType } from './prices/productPrices';
|
|
4
5
|
import { ProductProgram, ProductProgramType } from './program/productProgram';
|
|
5
6
|
import { ProductIdentifiers, ProductIdentifiersType } from './identifiers/productIdentifiers';
|
|
6
|
-
import { PriceBand, PriceBandType } from './priceBand/priceBand';
|
|
7
7
|
import { OrganizationUnit, OrganizationUnitType } from './organizationUnit/organizationUnit';
|
|
8
|
+
import { Family, FamilyType } from './family/family';
|
|
9
|
+
import { BusinessRuleEffectType, PricingRules } from './pricingRules/pricingRules';
|
|
8
10
|
export declare enum OrderProductsFields {
|
|
9
11
|
COLUMN_SKU = "sku",
|
|
10
12
|
COLUMN_QUANTITY = "quantity",
|
|
11
13
|
COLUMN_STATUS = "status",
|
|
14
|
+
COLUMN_CREATION_DATE = "creationDate",
|
|
12
15
|
COLUMN_DATESTATUS = "dateStatus",
|
|
13
16
|
COLUMN_DETAILEDSTATUS = "detailedStatus",
|
|
17
|
+
COLUMN_FAMILY = "family",
|
|
14
18
|
COLUMN_IS_ADDON = "isAddon",
|
|
15
19
|
COLUMN_ARROWSUBCATEGORIES = "arrowSubCategories",
|
|
16
20
|
COLUMN_IS_TRIAL = "isTrial",
|
|
@@ -23,14 +27,20 @@ export declare enum OrderProductsFields {
|
|
|
23
27
|
COLUMN_IDENTIFIERS = "identifiers",
|
|
24
28
|
COLUMN_ORGANIZATION_UNIT_REF = "organizationUnitRef",
|
|
25
29
|
COLUMN_ORGANIZATION_UNIT = "organizationUnit",
|
|
26
|
-
COLUMN_PRICE_BAND = "priceBand"
|
|
30
|
+
COLUMN_PRICE_BAND = "priceBand",
|
|
31
|
+
COLUMN_PRICING_RULES = "pricingRules",
|
|
32
|
+
COLUMN_PROGRAM_NAME = "programName",
|
|
33
|
+
COLUMN_SOURCE = "source",
|
|
34
|
+
COLUMN_VENDOR_NAME = "vendorName"
|
|
27
35
|
}
|
|
28
36
|
export declare type OrderProductsType = {
|
|
29
37
|
[OrderProductsFields.COLUMN_SKU]: string;
|
|
30
38
|
[OrderProductsFields.COLUMN_QUANTITY]: number;
|
|
31
39
|
[OrderProductsFields.COLUMN_STATUS]: string;
|
|
40
|
+
[OrderProductsFields.COLUMN_CREATION_DATE]?: string;
|
|
32
41
|
[OrderProductsFields.COLUMN_DATESTATUS]: string;
|
|
33
42
|
[OrderProductsFields.COLUMN_DETAILEDSTATUS]: string;
|
|
43
|
+
[OrderProductsFields.COLUMN_FAMILY]: FamilyType;
|
|
34
44
|
[OrderProductsFields.COLUMN_IS_ADDON]: boolean;
|
|
35
45
|
[OrderProductsFields.COLUMN_ARROWSUBCATEGORIES]?: Array<string>;
|
|
36
46
|
[OrderProductsFields.COLUMN_IS_TRIAL]: boolean;
|
|
@@ -43,7 +53,11 @@ export declare type OrderProductsType = {
|
|
|
43
53
|
[OrderProductsFields.COLUMN_IDENTIFIERS]: ProductIdentifiersType;
|
|
44
54
|
[OrderProductsFields.COLUMN_ORGANIZATION_UNIT_REF]?: string;
|
|
45
55
|
[OrderProductsFields.COLUMN_ORGANIZATION_UNIT]?: OrganizationUnitType;
|
|
46
|
-
[OrderProductsFields.COLUMN_PRICE_BAND]?:
|
|
56
|
+
[OrderProductsFields.COLUMN_PRICE_BAND]?: PriceBandData;
|
|
57
|
+
[OrderProductsFields.COLUMN_PRICING_RULES]: Array<BusinessRuleEffectType>;
|
|
58
|
+
[OrderProductsFields.COLUMN_PROGRAM_NAME]?: string;
|
|
59
|
+
[OrderProductsFields.COLUMN_SOURCE]?: string;
|
|
60
|
+
[OrderProductsFields.COLUMN_VENDOR_NAME]?: string;
|
|
47
61
|
};
|
|
48
62
|
export declare class OrderProduct extends AbstractEntity<OrderProductsType> {
|
|
49
63
|
#private;
|
|
@@ -51,8 +65,10 @@ export declare class OrderProduct extends AbstractEntity<OrderProductsType> {
|
|
|
51
65
|
get sku(): string;
|
|
52
66
|
get quantity(): number;
|
|
53
67
|
get status(): string;
|
|
68
|
+
get creationDate(): string | undefined;
|
|
54
69
|
get dateStatus(): string;
|
|
55
70
|
get detailedStatus(): string;
|
|
71
|
+
get family(): Family;
|
|
56
72
|
get isAddon(): boolean;
|
|
57
73
|
get arrowSubCategories(): Array<string> | undefined;
|
|
58
74
|
get isTrial(): boolean;
|
|
@@ -64,7 +80,11 @@ export declare class OrderProduct extends AbstractEntity<OrderProductsType> {
|
|
|
64
80
|
get program(): ProductProgram;
|
|
65
81
|
get identifier(): ProductIdentifiers;
|
|
66
82
|
get organizationUnitRef(): string | undefined;
|
|
67
|
-
get priceBand():
|
|
83
|
+
get priceBand(): PriceBandGetResult | undefined;
|
|
68
84
|
get organizationUnit(): OrganizationUnit | undefined;
|
|
85
|
+
get pricingRules(): Array<PricingRules>;
|
|
86
|
+
get programName(): string | undefined;
|
|
87
|
+
get source(): string | undefined;
|
|
88
|
+
get vendorName(): string | undefined;
|
|
69
89
|
toJSON(): OrderProductsType;
|
|
70
90
|
}
|
|
@@ -10,23 +10,27 @@ 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 _OrderProduct_sku, _OrderProduct_quantity, _OrderProduct_status, _OrderProduct_dateStatus, _OrderProduct_detailedStatus, _OrderProduct_isAddon, _OrderProduct_arrowSubCategories, _OrderProduct_isTrial, _OrderProduct_prices, _OrderProduct_subscription, _OrderProduct_license, _OrderProduct_name, _OrderProduct_classification, _OrderProduct_program, _OrderProduct_identifier, _OrderProduct_organizationUnitRef, _OrderProduct_organizationUnit, _OrderProduct_priceBand;
|
|
13
|
+
var _OrderProduct_sku, _OrderProduct_quantity, _OrderProduct_status, _OrderProduct_creationDate, _OrderProduct_dateStatus, _OrderProduct_detailedStatus, _OrderProduct_family, _OrderProduct_isAddon, _OrderProduct_arrowSubCategories, _OrderProduct_isTrial, _OrderProduct_prices, _OrderProduct_subscription, _OrderProduct_license, _OrderProduct_name, _OrderProduct_classification, _OrderProduct_program, _OrderProduct_identifier, _OrderProduct_organizationUnitRef, _OrderProduct_organizationUnit, _OrderProduct_priceBand, _OrderProduct_pricingRules, _OrderProduct_programName, _OrderProduct_source, _OrderProduct_vendorName;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.OrderProduct = exports.OrderProductsFields = void 0;
|
|
16
16
|
const abstractEntity_1 = require("../../../../abstractEntity");
|
|
17
|
+
const licenses_1 = require("../../../../licenses");
|
|
17
18
|
const referenceLink_1 = require("../../referenceLink");
|
|
18
19
|
const productPrices_1 = require("./prices/productPrices");
|
|
19
20
|
const productProgram_1 = require("./program/productProgram");
|
|
20
21
|
const productIdentifiers_1 = require("./identifiers/productIdentifiers");
|
|
21
|
-
const priceBand_1 = require("./priceBand/priceBand");
|
|
22
22
|
const organizationUnit_1 = require("./organizationUnit/organizationUnit");
|
|
23
|
+
const family_1 = require("./family/family");
|
|
24
|
+
const pricingRules_1 = require("./pricingRules/pricingRules");
|
|
23
25
|
var OrderProductsFields;
|
|
24
26
|
(function (OrderProductsFields) {
|
|
25
27
|
OrderProductsFields["COLUMN_SKU"] = "sku";
|
|
26
28
|
OrderProductsFields["COLUMN_QUANTITY"] = "quantity";
|
|
27
29
|
OrderProductsFields["COLUMN_STATUS"] = "status";
|
|
30
|
+
OrderProductsFields["COLUMN_CREATION_DATE"] = "creationDate";
|
|
28
31
|
OrderProductsFields["COLUMN_DATESTATUS"] = "dateStatus";
|
|
29
32
|
OrderProductsFields["COLUMN_DETAILEDSTATUS"] = "detailedStatus";
|
|
33
|
+
OrderProductsFields["COLUMN_FAMILY"] = "family";
|
|
30
34
|
OrderProductsFields["COLUMN_IS_ADDON"] = "isAddon";
|
|
31
35
|
OrderProductsFields["COLUMN_ARROWSUBCATEGORIES"] = "arrowSubCategories";
|
|
32
36
|
OrderProductsFields["COLUMN_IS_TRIAL"] = "isTrial";
|
|
@@ -40,6 +44,10 @@ var OrderProductsFields;
|
|
|
40
44
|
OrderProductsFields["COLUMN_ORGANIZATION_UNIT_REF"] = "organizationUnitRef";
|
|
41
45
|
OrderProductsFields["COLUMN_ORGANIZATION_UNIT"] = "organizationUnit";
|
|
42
46
|
OrderProductsFields["COLUMN_PRICE_BAND"] = "priceBand";
|
|
47
|
+
OrderProductsFields["COLUMN_PRICING_RULES"] = "pricingRules";
|
|
48
|
+
OrderProductsFields["COLUMN_PROGRAM_NAME"] = "programName";
|
|
49
|
+
OrderProductsFields["COLUMN_SOURCE"] = "source";
|
|
50
|
+
OrderProductsFields["COLUMN_VENDOR_NAME"] = "vendorName";
|
|
43
51
|
})(OrderProductsFields = exports.OrderProductsFields || (exports.OrderProductsFields = {}));
|
|
44
52
|
class OrderProduct extends abstractEntity_1.AbstractEntity {
|
|
45
53
|
constructor(getOrderProducts) {
|
|
@@ -48,8 +56,10 @@ class OrderProduct extends abstractEntity_1.AbstractEntity {
|
|
|
48
56
|
_OrderProduct_sku.set(this, void 0);
|
|
49
57
|
_OrderProduct_quantity.set(this, void 0);
|
|
50
58
|
_OrderProduct_status.set(this, void 0);
|
|
59
|
+
_OrderProduct_creationDate.set(this, void 0);
|
|
51
60
|
_OrderProduct_dateStatus.set(this, void 0);
|
|
52
61
|
_OrderProduct_detailedStatus.set(this, void 0);
|
|
62
|
+
_OrderProduct_family.set(this, void 0);
|
|
53
63
|
_OrderProduct_isAddon.set(this, void 0);
|
|
54
64
|
_OrderProduct_arrowSubCategories.set(this, void 0);
|
|
55
65
|
_OrderProduct_isTrial.set(this, void 0);
|
|
@@ -63,11 +73,17 @@ class OrderProduct extends abstractEntity_1.AbstractEntity {
|
|
|
63
73
|
_OrderProduct_organizationUnitRef.set(this, void 0);
|
|
64
74
|
_OrderProduct_organizationUnit.set(this, void 0);
|
|
65
75
|
_OrderProduct_priceBand.set(this, void 0);
|
|
76
|
+
_OrderProduct_pricingRules.set(this, void 0);
|
|
77
|
+
_OrderProduct_programName.set(this, void 0);
|
|
78
|
+
_OrderProduct_source.set(this, void 0);
|
|
79
|
+
_OrderProduct_vendorName.set(this, void 0);
|
|
66
80
|
__classPrivateFieldSet(this, _OrderProduct_sku, getOrderProducts[OrderProductsFields.COLUMN_SKU], "f");
|
|
81
|
+
__classPrivateFieldSet(this, _OrderProduct_creationDate, getOrderProducts[OrderProductsFields.COLUMN_CREATION_DATE], "f");
|
|
67
82
|
__classPrivateFieldSet(this, _OrderProduct_quantity, getOrderProducts[OrderProductsFields.COLUMN_QUANTITY], "f");
|
|
68
83
|
__classPrivateFieldSet(this, _OrderProduct_status, getOrderProducts[OrderProductsFields.COLUMN_STATUS], "f");
|
|
69
84
|
__classPrivateFieldSet(this, _OrderProduct_dateStatus, getOrderProducts[OrderProductsFields.COLUMN_DATESTATUS], "f");
|
|
70
85
|
__classPrivateFieldSet(this, _OrderProduct_detailedStatus, getOrderProducts[OrderProductsFields.COLUMN_DETAILEDSTATUS], "f");
|
|
86
|
+
__classPrivateFieldSet(this, _OrderProduct_family, new family_1.Family(getOrderProducts[OrderProductsFields.COLUMN_FAMILY]), "f");
|
|
71
87
|
__classPrivateFieldSet(this, _OrderProduct_isAddon, getOrderProducts[OrderProductsFields.COLUMN_IS_ADDON], "f");
|
|
72
88
|
__classPrivateFieldSet(this, _OrderProduct_arrowSubCategories, (_a = getOrderProducts[OrderProductsFields.COLUMN_ARROWSUBCATEGORIES]) !== null && _a !== void 0 ? _a : undefined, "f");
|
|
73
89
|
__classPrivateFieldSet(this, _OrderProduct_isTrial, getOrderProducts[OrderProductsFields.COLUMN_IS_TRIAL], "f");
|
|
@@ -85,8 +101,12 @@ class OrderProduct extends abstractEntity_1.AbstractEntity {
|
|
|
85
101
|
? new organizationUnit_1.OrganizationUnit(getOrderProducts[OrderProductsFields.COLUMN_ORGANIZATION_UNIT])
|
|
86
102
|
: undefined, "f");
|
|
87
103
|
__classPrivateFieldSet(this, _OrderProduct_priceBand, getOrderProducts[OrderProductsFields.COLUMN_PRICE_BAND]
|
|
88
|
-
? new
|
|
104
|
+
? new licenses_1.PriceBandGetResult(getOrderProducts[OrderProductsFields.COLUMN_PRICE_BAND])
|
|
89
105
|
: undefined, "f");
|
|
106
|
+
__classPrivateFieldSet(this, _OrderProduct_pricingRules, getOrderProducts[OrderProductsFields.COLUMN_PRICING_RULES].map((businessRuleEffect) => new pricingRules_1.PricingRules(businessRuleEffect)), "f");
|
|
107
|
+
__classPrivateFieldSet(this, _OrderProduct_programName, getOrderProducts[OrderProductsFields.COLUMN_PROGRAM_NAME], "f");
|
|
108
|
+
__classPrivateFieldSet(this, _OrderProduct_source, getOrderProducts[OrderProductsFields.COLUMN_SOURCE], "f");
|
|
109
|
+
__classPrivateFieldSet(this, _OrderProduct_vendorName, getOrderProducts[OrderProductsFields.COLUMN_VENDOR_NAME], "f");
|
|
90
110
|
}
|
|
91
111
|
get sku() {
|
|
92
112
|
return __classPrivateFieldGet(this, _OrderProduct_sku, "f");
|
|
@@ -97,12 +117,18 @@ class OrderProduct extends abstractEntity_1.AbstractEntity {
|
|
|
97
117
|
get status() {
|
|
98
118
|
return __classPrivateFieldGet(this, _OrderProduct_status, "f");
|
|
99
119
|
}
|
|
120
|
+
get creationDate() {
|
|
121
|
+
return __classPrivateFieldGet(this, _OrderProduct_creationDate, "f");
|
|
122
|
+
}
|
|
100
123
|
get dateStatus() {
|
|
101
124
|
return __classPrivateFieldGet(this, _OrderProduct_dateStatus, "f");
|
|
102
125
|
}
|
|
103
126
|
get detailedStatus() {
|
|
104
127
|
return __classPrivateFieldGet(this, _OrderProduct_detailedStatus, "f");
|
|
105
128
|
}
|
|
129
|
+
get family() {
|
|
130
|
+
return __classPrivateFieldGet(this, _OrderProduct_family, "f");
|
|
131
|
+
}
|
|
106
132
|
get isAddon() {
|
|
107
133
|
return __classPrivateFieldGet(this, _OrderProduct_isAddon, "f");
|
|
108
134
|
}
|
|
@@ -142,14 +168,28 @@ class OrderProduct extends abstractEntity_1.AbstractEntity {
|
|
|
142
168
|
get organizationUnit() {
|
|
143
169
|
return __classPrivateFieldGet(this, _OrderProduct_organizationUnit, "f");
|
|
144
170
|
}
|
|
171
|
+
get pricingRules() {
|
|
172
|
+
return __classPrivateFieldGet(this, _OrderProduct_pricingRules, "f");
|
|
173
|
+
}
|
|
174
|
+
get programName() {
|
|
175
|
+
return __classPrivateFieldGet(this, _OrderProduct_programName, "f");
|
|
176
|
+
}
|
|
177
|
+
get source() {
|
|
178
|
+
return __classPrivateFieldGet(this, _OrderProduct_source, "f");
|
|
179
|
+
}
|
|
180
|
+
get vendorName() {
|
|
181
|
+
return __classPrivateFieldGet(this, _OrderProduct_vendorName, "f");
|
|
182
|
+
}
|
|
145
183
|
toJSON() {
|
|
146
184
|
var _a, _b, _c;
|
|
147
185
|
return {
|
|
148
186
|
[OrderProductsFields.COLUMN_SKU]: this.sku,
|
|
149
187
|
[OrderProductsFields.COLUMN_QUANTITY]: this.quantity,
|
|
150
188
|
[OrderProductsFields.COLUMN_STATUS]: this.status,
|
|
189
|
+
[OrderProductsFields.COLUMN_CREATION_DATE]: this.creationDate,
|
|
151
190
|
[OrderProductsFields.COLUMN_DATESTATUS]: this.dateStatus,
|
|
152
191
|
[OrderProductsFields.COLUMN_DETAILEDSTATUS]: this.detailedStatus,
|
|
192
|
+
[OrderProductsFields.COLUMN_FAMILY]: this.family.toJSON(),
|
|
153
193
|
[OrderProductsFields.COLUMN_IS_ADDON]: this.isAddon,
|
|
154
194
|
[OrderProductsFields.COLUMN_ARROWSUBCATEGORIES]: this.arrowSubCategories,
|
|
155
195
|
[OrderProductsFields.COLUMN_IS_TRIAL]: this.isTrial,
|
|
@@ -164,9 +204,13 @@ class OrderProduct extends abstractEntity_1.AbstractEntity {
|
|
|
164
204
|
.organizationUnitRef,
|
|
165
205
|
[OrderProductsFields.COLUMN_ORGANIZATION_UNIT]: (_b = this.organizationUnit) === null || _b === void 0 ? void 0 : _b.toJSON(),
|
|
166
206
|
[OrderProductsFields.COLUMN_PRICE_BAND]: (_c = this.priceBand) === null || _c === void 0 ? void 0 : _c.toJSON(),
|
|
207
|
+
[OrderProductsFields.COLUMN_PRICING_RULES]: this.pricingRules.map((pricingRules) => pricingRules.toJSON()),
|
|
208
|
+
[OrderProductsFields.COLUMN_PROGRAM_NAME]: this.programName,
|
|
209
|
+
[OrderProductsFields.COLUMN_SOURCE]: this.source,
|
|
210
|
+
[OrderProductsFields.COLUMN_VENDOR_NAME]: this.vendorName,
|
|
167
211
|
};
|
|
168
212
|
}
|
|
169
213
|
}
|
|
170
214
|
exports.OrderProduct = OrderProduct;
|
|
171
|
-
_OrderProduct_sku = new WeakMap(), _OrderProduct_quantity = new WeakMap(), _OrderProduct_status = new WeakMap(), _OrderProduct_dateStatus = new WeakMap(), _OrderProduct_detailedStatus = new WeakMap(), _OrderProduct_isAddon = new WeakMap(), _OrderProduct_arrowSubCategories = new WeakMap(), _OrderProduct_isTrial = new WeakMap(), _OrderProduct_prices = new WeakMap(), _OrderProduct_subscription = new WeakMap(), _OrderProduct_license = new WeakMap(), _OrderProduct_name = new WeakMap(), _OrderProduct_classification = new WeakMap(), _OrderProduct_program = new WeakMap(), _OrderProduct_identifier = new WeakMap(), _OrderProduct_organizationUnitRef = new WeakMap(), _OrderProduct_organizationUnit = new WeakMap(), _OrderProduct_priceBand = new WeakMap();
|
|
215
|
+
_OrderProduct_sku = new WeakMap(), _OrderProduct_quantity = new WeakMap(), _OrderProduct_status = new WeakMap(), _OrderProduct_creationDate = new WeakMap(), _OrderProduct_dateStatus = new WeakMap(), _OrderProduct_detailedStatus = new WeakMap(), _OrderProduct_family = new WeakMap(), _OrderProduct_isAddon = new WeakMap(), _OrderProduct_arrowSubCategories = new WeakMap(), _OrderProduct_isTrial = new WeakMap(), _OrderProduct_prices = new WeakMap(), _OrderProduct_subscription = new WeakMap(), _OrderProduct_license = new WeakMap(), _OrderProduct_name = new WeakMap(), _OrderProduct_classification = new WeakMap(), _OrderProduct_program = new WeakMap(), _OrderProduct_identifier = new WeakMap(), _OrderProduct_organizationUnitRef = new WeakMap(), _OrderProduct_organizationUnit = new WeakMap(), _OrderProduct_priceBand = new WeakMap(), _OrderProduct_pricingRules = new WeakMap(), _OrderProduct_programName = new WeakMap(), _OrderProduct_source = new WeakMap(), _OrderProduct_vendorName = new WeakMap();
|
|
172
216
|
//# sourceMappingURL=products.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.
|
|
7
|
+
"version": "3.229.0-rc-cpe-3",
|
|
8
8
|
"description": "Node.js client for ArrowSphere's public API",
|
|
9
9
|
"main": "build/index.js",
|
|
10
10
|
"types": "build/index.d.ts",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"@types/validatorjs": "3.15.0",
|
|
35
35
|
"@types/chai": "4.2.15",
|
|
36
36
|
"@types/chai-as-promised": "7.1.3",
|
|
37
|
-
"@types/lodash": "
|
|
37
|
+
"@types/lodash": "4.14.191",
|
|
38
38
|
"@types/mocha": "8.2.0",
|
|
39
|
-
"@types/node": "
|
|
39
|
+
"@types/node": "18.19.9",
|
|
40
40
|
"@types/sinon": "9.0.10",
|
|
41
41
|
"@types/sinon-chai": "3.2.5",
|
|
42
42
|
"@typescript-eslint/eslint-plugin": "5.58.0",
|
|
@@ -53,14 +53,12 @@
|
|
|
53
53
|
"lint-staged": "13.2.1",
|
|
54
54
|
"mocha": "10.2.0",
|
|
55
55
|
"mocha-suppress-logs": "0.3.1",
|
|
56
|
-
"nock": "
|
|
56
|
+
"nock": "14.0.10",
|
|
57
57
|
"nyc": "15.1.0",
|
|
58
58
|
"prettier": "2.2.1",
|
|
59
|
-
"rimraf": "5.0.0",
|
|
60
59
|
"sinon": "9.2.4",
|
|
61
60
|
"sinon-chai": "3.5.0",
|
|
62
|
-
"
|
|
63
|
-
"ts-node": "^10.9.1",
|
|
61
|
+
"ts-node": "10.9.1",
|
|
64
62
|
"typescript": "4.7.4"
|
|
65
63
|
},
|
|
66
64
|
"husky": {
|
|
@@ -82,12 +80,12 @@
|
|
|
82
80
|
"test": "tests"
|
|
83
81
|
},
|
|
84
82
|
"dependencies": {
|
|
85
|
-
"axios": "1.
|
|
86
|
-
"graphql": "
|
|
87
|
-
"graphql-request": "
|
|
88
|
-
"json-to-graphql-query": "
|
|
89
|
-
"lodash": "
|
|
90
|
-
"type-fest": "
|
|
83
|
+
"axios": "1.13.2",
|
|
84
|
+
"graphql": "16.8.1",
|
|
85
|
+
"graphql-request": "7.3.5",
|
|
86
|
+
"json-to-graphql-query": "2.2.5",
|
|
87
|
+
"lodash": "4.17.21",
|
|
88
|
+
"type-fest": "2.19.0",
|
|
91
89
|
"validatorjs": "3.22.1"
|
|
92
90
|
}
|
|
93
91
|
}
|