@arrowsphere/api-client 3.410.0 → 3.411.0-rc-cpe-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/build/quotes/entities/Quote.d.ts +46 -0
- package/build/quotes/entities/Quote.js +114 -0
- package/build/quotes/entities/QuoteList.d.ts +9 -0
- package/build/quotes/entities/QuoteList.js +33 -0
- package/build/quotes/entities/QuoteProduct.d.ts +27 -0
- package/build/quotes/entities/QuoteProduct.js +68 -0
- package/build/quotes/entities/QuoteProductPrices.d.ts +25 -0
- package/build/quotes/entities/QuoteProductPrices.js +66 -0
- package/build/quotes/index.d.ts +4 -0
- package/build/quotes/index.js +4 -0
- package/build/quotes/quotesClient.d.ts +4 -0
- package/build/quotes/quotesClient.js +12 -0
- package/package.json +1 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../abstractEntity';
|
|
2
|
+
import { OrderPartner, OrderPartnerType } from '../../orders/entities/orders/partner/partner';
|
|
3
|
+
import { ReferenceLink, ReferenceLinkType } from '../../orders/entities/referenceLink';
|
|
4
|
+
import { QuoteProduct, QuoteProductData } from './QuoteProduct';
|
|
5
|
+
export declare enum QuoteFields {
|
|
6
|
+
QUOTE_REFERENCE = "quoteReference",
|
|
7
|
+
REFERENCE = "reference",
|
|
8
|
+
STATUS = "status",
|
|
9
|
+
DATE_CREATION = "dateCreation",
|
|
10
|
+
DATE_UPDATE = "dateUpdate",
|
|
11
|
+
DATE_END = "dateEnd",
|
|
12
|
+
PARTNER = "partner",
|
|
13
|
+
CUSTOMER = "customer",
|
|
14
|
+
PO_NUMBER = "ponumber",
|
|
15
|
+
END_CUSTOMER_PO_NUMBER = "endCustomerPONumber",
|
|
16
|
+
PRODUCTS = "products"
|
|
17
|
+
}
|
|
18
|
+
export declare type QuoteData = {
|
|
19
|
+
[QuoteFields.QUOTE_REFERENCE]: string;
|
|
20
|
+
[QuoteFields.REFERENCE]: string;
|
|
21
|
+
[QuoteFields.STATUS]: string;
|
|
22
|
+
[QuoteFields.DATE_CREATION]: string;
|
|
23
|
+
[QuoteFields.DATE_UPDATE]: string;
|
|
24
|
+
[QuoteFields.DATE_END]?: string;
|
|
25
|
+
[QuoteFields.PARTNER]?: OrderPartnerType;
|
|
26
|
+
[QuoteFields.CUSTOMER]?: ReferenceLinkType;
|
|
27
|
+
[QuoteFields.PO_NUMBER]?: string;
|
|
28
|
+
[QuoteFields.END_CUSTOMER_PO_NUMBER]?: string;
|
|
29
|
+
[QuoteFields.PRODUCTS]: QuoteProductData[];
|
|
30
|
+
};
|
|
31
|
+
export declare class Quote extends AbstractEntity<QuoteData> {
|
|
32
|
+
#private;
|
|
33
|
+
constructor(data: QuoteData);
|
|
34
|
+
get quoteReference(): string;
|
|
35
|
+
get reference(): string;
|
|
36
|
+
get status(): string;
|
|
37
|
+
get dateCreation(): string;
|
|
38
|
+
get dateUpdate(): string;
|
|
39
|
+
get dateEnd(): string | undefined;
|
|
40
|
+
get partner(): OrderPartner | undefined;
|
|
41
|
+
get customer(): ReferenceLink | undefined;
|
|
42
|
+
get ponumber(): string | undefined;
|
|
43
|
+
get endCustomerPONumber(): string | undefined;
|
|
44
|
+
get products(): QuoteProduct[];
|
|
45
|
+
toJSON(): QuoteData;
|
|
46
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
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 _Quote_quoteReference, _Quote_reference, _Quote_status, _Quote_dateCreation, _Quote_dateUpdate, _Quote_dateEnd, _Quote_partner, _Quote_customer, _Quote_ponumber, _Quote_endCustomerPONumber, _Quote_products;
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.Quote = exports.QuoteFields = void 0;
|
|
16
|
+
const abstractEntity_1 = require("../../abstractEntity");
|
|
17
|
+
const partner_1 = require("../../orders/entities/orders/partner/partner");
|
|
18
|
+
const referenceLink_1 = require("../../orders/entities/referenceLink");
|
|
19
|
+
const QuoteProduct_1 = require("./QuoteProduct");
|
|
20
|
+
var QuoteFields;
|
|
21
|
+
(function (QuoteFields) {
|
|
22
|
+
QuoteFields["QUOTE_REFERENCE"] = "quoteReference";
|
|
23
|
+
QuoteFields["REFERENCE"] = "reference";
|
|
24
|
+
QuoteFields["STATUS"] = "status";
|
|
25
|
+
QuoteFields["DATE_CREATION"] = "dateCreation";
|
|
26
|
+
QuoteFields["DATE_UPDATE"] = "dateUpdate";
|
|
27
|
+
QuoteFields["DATE_END"] = "dateEnd";
|
|
28
|
+
QuoteFields["PARTNER"] = "partner";
|
|
29
|
+
QuoteFields["CUSTOMER"] = "customer";
|
|
30
|
+
QuoteFields["PO_NUMBER"] = "ponumber";
|
|
31
|
+
QuoteFields["END_CUSTOMER_PO_NUMBER"] = "endCustomerPONumber";
|
|
32
|
+
QuoteFields["PRODUCTS"] = "products";
|
|
33
|
+
})(QuoteFields = exports.QuoteFields || (exports.QuoteFields = {}));
|
|
34
|
+
class Quote extends abstractEntity_1.AbstractEntity {
|
|
35
|
+
constructor(data) {
|
|
36
|
+
super(data);
|
|
37
|
+
_Quote_quoteReference.set(this, void 0);
|
|
38
|
+
_Quote_reference.set(this, void 0);
|
|
39
|
+
_Quote_status.set(this, void 0);
|
|
40
|
+
_Quote_dateCreation.set(this, void 0);
|
|
41
|
+
_Quote_dateUpdate.set(this, void 0);
|
|
42
|
+
_Quote_dateEnd.set(this, void 0);
|
|
43
|
+
_Quote_partner.set(this, void 0);
|
|
44
|
+
_Quote_customer.set(this, void 0);
|
|
45
|
+
_Quote_ponumber.set(this, void 0);
|
|
46
|
+
_Quote_endCustomerPONumber.set(this, void 0);
|
|
47
|
+
_Quote_products.set(this, void 0);
|
|
48
|
+
__classPrivateFieldSet(this, _Quote_quoteReference, data[QuoteFields.QUOTE_REFERENCE], "f");
|
|
49
|
+
__classPrivateFieldSet(this, _Quote_reference, data[QuoteFields.REFERENCE], "f");
|
|
50
|
+
__classPrivateFieldSet(this, _Quote_status, data[QuoteFields.STATUS], "f");
|
|
51
|
+
__classPrivateFieldSet(this, _Quote_dateCreation, data[QuoteFields.DATE_CREATION], "f");
|
|
52
|
+
__classPrivateFieldSet(this, _Quote_dateUpdate, data[QuoteFields.DATE_UPDATE], "f");
|
|
53
|
+
__classPrivateFieldSet(this, _Quote_dateEnd, data[QuoteFields.DATE_END], "f");
|
|
54
|
+
const partner = data[QuoteFields.PARTNER];
|
|
55
|
+
__classPrivateFieldSet(this, _Quote_partner, partner ? new partner_1.OrderPartner(partner) : undefined, "f");
|
|
56
|
+
const customer = data[QuoteFields.CUSTOMER];
|
|
57
|
+
__classPrivateFieldSet(this, _Quote_customer, customer ? new referenceLink_1.ReferenceLink(customer) : undefined, "f");
|
|
58
|
+
__classPrivateFieldSet(this, _Quote_ponumber, data[QuoteFields.PO_NUMBER], "f");
|
|
59
|
+
__classPrivateFieldSet(this, _Quote_endCustomerPONumber, data[QuoteFields.END_CUSTOMER_PO_NUMBER], "f");
|
|
60
|
+
__classPrivateFieldSet(this, _Quote_products, data[QuoteFields.PRODUCTS].map((product) => new QuoteProduct_1.QuoteProduct(product)), "f");
|
|
61
|
+
}
|
|
62
|
+
get quoteReference() {
|
|
63
|
+
return __classPrivateFieldGet(this, _Quote_quoteReference, "f");
|
|
64
|
+
}
|
|
65
|
+
get reference() {
|
|
66
|
+
return __classPrivateFieldGet(this, _Quote_reference, "f");
|
|
67
|
+
}
|
|
68
|
+
get status() {
|
|
69
|
+
return __classPrivateFieldGet(this, _Quote_status, "f");
|
|
70
|
+
}
|
|
71
|
+
get dateCreation() {
|
|
72
|
+
return __classPrivateFieldGet(this, _Quote_dateCreation, "f");
|
|
73
|
+
}
|
|
74
|
+
get dateUpdate() {
|
|
75
|
+
return __classPrivateFieldGet(this, _Quote_dateUpdate, "f");
|
|
76
|
+
}
|
|
77
|
+
get dateEnd() {
|
|
78
|
+
return __classPrivateFieldGet(this, _Quote_dateEnd, "f");
|
|
79
|
+
}
|
|
80
|
+
get partner() {
|
|
81
|
+
return __classPrivateFieldGet(this, _Quote_partner, "f");
|
|
82
|
+
}
|
|
83
|
+
get customer() {
|
|
84
|
+
return __classPrivateFieldGet(this, _Quote_customer, "f");
|
|
85
|
+
}
|
|
86
|
+
get ponumber() {
|
|
87
|
+
return __classPrivateFieldGet(this, _Quote_ponumber, "f");
|
|
88
|
+
}
|
|
89
|
+
get endCustomerPONumber() {
|
|
90
|
+
return __classPrivateFieldGet(this, _Quote_endCustomerPONumber, "f");
|
|
91
|
+
}
|
|
92
|
+
get products() {
|
|
93
|
+
return __classPrivateFieldGet(this, _Quote_products, "f");
|
|
94
|
+
}
|
|
95
|
+
toJSON() {
|
|
96
|
+
var _a, _b;
|
|
97
|
+
return {
|
|
98
|
+
[QuoteFields.QUOTE_REFERENCE]: this.quoteReference,
|
|
99
|
+
[QuoteFields.REFERENCE]: this.reference,
|
|
100
|
+
[QuoteFields.STATUS]: this.status,
|
|
101
|
+
[QuoteFields.DATE_CREATION]: this.dateCreation,
|
|
102
|
+
[QuoteFields.DATE_UPDATE]: this.dateUpdate,
|
|
103
|
+
[QuoteFields.DATE_END]: this.dateEnd,
|
|
104
|
+
[QuoteFields.PARTNER]: (_a = this.partner) === null || _a === void 0 ? void 0 : _a.toJSON(),
|
|
105
|
+
[QuoteFields.CUSTOMER]: (_b = this.customer) === null || _b === void 0 ? void 0 : _b.toJSON(),
|
|
106
|
+
[QuoteFields.PO_NUMBER]: this.ponumber,
|
|
107
|
+
[QuoteFields.END_CUSTOMER_PO_NUMBER]: this.endCustomerPONumber,
|
|
108
|
+
[QuoteFields.PRODUCTS]: this.products.map((product) => product.toJSON()),
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
exports.Quote = Quote;
|
|
113
|
+
_Quote_quoteReference = new WeakMap(), _Quote_reference = new WeakMap(), _Quote_status = new WeakMap(), _Quote_dateCreation = new WeakMap(), _Quote_dateUpdate = new WeakMap(), _Quote_dateEnd = new WeakMap(), _Quote_partner = new WeakMap(), _Quote_customer = new WeakMap(), _Quote_ponumber = new WeakMap(), _Quote_endCustomerPONumber = new WeakMap(), _Quote_products = new WeakMap();
|
|
114
|
+
//# sourceMappingURL=Quote.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../abstractEntity';
|
|
2
|
+
import { Quote, QuoteData } from './Quote';
|
|
3
|
+
export declare type QuoteListData = Array<QuoteData>;
|
|
4
|
+
export declare class QuoteList extends AbstractEntity<QuoteListData> {
|
|
5
|
+
#private;
|
|
6
|
+
constructor(data: QuoteListData);
|
|
7
|
+
get quotes(): Array<Quote>;
|
|
8
|
+
toJSON(): QuoteListData;
|
|
9
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
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 _QuoteList_quotes;
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.QuoteList = void 0;
|
|
16
|
+
const abstractEntity_1 = require("../../abstractEntity");
|
|
17
|
+
const Quote_1 = require("./Quote");
|
|
18
|
+
class QuoteList extends abstractEntity_1.AbstractEntity {
|
|
19
|
+
constructor(data) {
|
|
20
|
+
super(data);
|
|
21
|
+
_QuoteList_quotes.set(this, void 0);
|
|
22
|
+
__classPrivateFieldSet(this, _QuoteList_quotes, data.map((quote) => new Quote_1.Quote(quote)), "f");
|
|
23
|
+
}
|
|
24
|
+
get quotes() {
|
|
25
|
+
return __classPrivateFieldGet(this, _QuoteList_quotes, "f");
|
|
26
|
+
}
|
|
27
|
+
toJSON() {
|
|
28
|
+
return this.quotes.map((quote) => quote.toJSON());
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.QuoteList = QuoteList;
|
|
32
|
+
_QuoteList_quotes = new WeakMap();
|
|
33
|
+
//# sourceMappingURL=QuoteList.js.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../abstractEntity';
|
|
2
|
+
import { ReferenceLink, ReferenceLinkType } from '../../orders/entities/referenceLink';
|
|
3
|
+
import { QuoteProductPrices, QuoteProductPricesData } from './QuoteProductPrices';
|
|
4
|
+
export declare enum QuoteProductFields {
|
|
5
|
+
SKU = "sku",
|
|
6
|
+
QUANTITY = "quantity",
|
|
7
|
+
PRICES = "prices",
|
|
8
|
+
LICENSE = "license",
|
|
9
|
+
NAME = "name"
|
|
10
|
+
}
|
|
11
|
+
export declare type QuoteProductData = {
|
|
12
|
+
[QuoteProductFields.SKU]: string;
|
|
13
|
+
[QuoteProductFields.QUANTITY]: number;
|
|
14
|
+
[QuoteProductFields.PRICES]: QuoteProductPricesData;
|
|
15
|
+
[QuoteProductFields.LICENSE]: ReferenceLinkType;
|
|
16
|
+
[QuoteProductFields.NAME]: string;
|
|
17
|
+
};
|
|
18
|
+
export declare class QuoteProduct extends AbstractEntity<QuoteProductData> {
|
|
19
|
+
#private;
|
|
20
|
+
constructor(data: QuoteProductData);
|
|
21
|
+
get sku(): string;
|
|
22
|
+
get quantity(): number;
|
|
23
|
+
get prices(): QuoteProductPrices;
|
|
24
|
+
get license(): ReferenceLink;
|
|
25
|
+
get name(): string;
|
|
26
|
+
toJSON(): QuoteProductData;
|
|
27
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
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 _QuoteProduct_sku, _QuoteProduct_quantity, _QuoteProduct_prices, _QuoteProduct_license, _QuoteProduct_name;
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.QuoteProduct = exports.QuoteProductFields = void 0;
|
|
16
|
+
const abstractEntity_1 = require("../../abstractEntity");
|
|
17
|
+
const referenceLink_1 = require("../../orders/entities/referenceLink");
|
|
18
|
+
const QuoteProductPrices_1 = require("./QuoteProductPrices");
|
|
19
|
+
var QuoteProductFields;
|
|
20
|
+
(function (QuoteProductFields) {
|
|
21
|
+
QuoteProductFields["SKU"] = "sku";
|
|
22
|
+
QuoteProductFields["QUANTITY"] = "quantity";
|
|
23
|
+
QuoteProductFields["PRICES"] = "prices";
|
|
24
|
+
QuoteProductFields["LICENSE"] = "license";
|
|
25
|
+
QuoteProductFields["NAME"] = "name";
|
|
26
|
+
})(QuoteProductFields = exports.QuoteProductFields || (exports.QuoteProductFields = {}));
|
|
27
|
+
class QuoteProduct extends abstractEntity_1.AbstractEntity {
|
|
28
|
+
constructor(data) {
|
|
29
|
+
super(data);
|
|
30
|
+
_QuoteProduct_sku.set(this, void 0);
|
|
31
|
+
_QuoteProduct_quantity.set(this, void 0);
|
|
32
|
+
_QuoteProduct_prices.set(this, void 0);
|
|
33
|
+
_QuoteProduct_license.set(this, void 0);
|
|
34
|
+
_QuoteProduct_name.set(this, void 0);
|
|
35
|
+
__classPrivateFieldSet(this, _QuoteProduct_sku, data[QuoteProductFields.SKU], "f");
|
|
36
|
+
__classPrivateFieldSet(this, _QuoteProduct_quantity, data[QuoteProductFields.QUANTITY], "f");
|
|
37
|
+
__classPrivateFieldSet(this, _QuoteProduct_prices, new QuoteProductPrices_1.QuoteProductPrices(data[QuoteProductFields.PRICES]), "f");
|
|
38
|
+
__classPrivateFieldSet(this, _QuoteProduct_license, new referenceLink_1.ReferenceLink(data[QuoteProductFields.LICENSE]), "f");
|
|
39
|
+
__classPrivateFieldSet(this, _QuoteProduct_name, data[QuoteProductFields.NAME], "f");
|
|
40
|
+
}
|
|
41
|
+
get sku() {
|
|
42
|
+
return __classPrivateFieldGet(this, _QuoteProduct_sku, "f");
|
|
43
|
+
}
|
|
44
|
+
get quantity() {
|
|
45
|
+
return __classPrivateFieldGet(this, _QuoteProduct_quantity, "f");
|
|
46
|
+
}
|
|
47
|
+
get prices() {
|
|
48
|
+
return __classPrivateFieldGet(this, _QuoteProduct_prices, "f");
|
|
49
|
+
}
|
|
50
|
+
get license() {
|
|
51
|
+
return __classPrivateFieldGet(this, _QuoteProduct_license, "f");
|
|
52
|
+
}
|
|
53
|
+
get name() {
|
|
54
|
+
return __classPrivateFieldGet(this, _QuoteProduct_name, "f");
|
|
55
|
+
}
|
|
56
|
+
toJSON() {
|
|
57
|
+
return {
|
|
58
|
+
[QuoteProductFields.SKU]: this.sku,
|
|
59
|
+
[QuoteProductFields.QUANTITY]: this.quantity,
|
|
60
|
+
[QuoteProductFields.PRICES]: this.prices.toJSON(),
|
|
61
|
+
[QuoteProductFields.LICENSE]: this.license.toJSON(),
|
|
62
|
+
[QuoteProductFields.NAME]: this.name,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
exports.QuoteProduct = QuoteProduct;
|
|
67
|
+
_QuoteProduct_sku = new WeakMap(), _QuoteProduct_quantity = new WeakMap(), _QuoteProduct_prices = new WeakMap(), _QuoteProduct_license = new WeakMap(), _QuoteProduct_name = new WeakMap();
|
|
68
|
+
//# sourceMappingURL=QuoteProduct.js.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../abstractEntity';
|
|
2
|
+
export declare enum QuoteProductPricesFields {
|
|
3
|
+
BUY = "buy",
|
|
4
|
+
SELL = "sell",
|
|
5
|
+
CURRENCY = "currency",
|
|
6
|
+
PERIODICITY = "periodicity",
|
|
7
|
+
TERM = "term"
|
|
8
|
+
}
|
|
9
|
+
export declare type QuoteProductPricesData = {
|
|
10
|
+
[QuoteProductPricesFields.BUY]: number;
|
|
11
|
+
[QuoteProductPricesFields.SELL]: number;
|
|
12
|
+
[QuoteProductPricesFields.CURRENCY]: string;
|
|
13
|
+
[QuoteProductPricesFields.PERIODICITY]: string;
|
|
14
|
+
[QuoteProductPricesFields.TERM]: string;
|
|
15
|
+
};
|
|
16
|
+
export declare class QuoteProductPrices extends AbstractEntity<QuoteProductPricesData> {
|
|
17
|
+
#private;
|
|
18
|
+
constructor(data: QuoteProductPricesData);
|
|
19
|
+
get buy(): number;
|
|
20
|
+
get sell(): number;
|
|
21
|
+
get currency(): string;
|
|
22
|
+
get periodicity(): string;
|
|
23
|
+
get term(): string;
|
|
24
|
+
toJSON(): QuoteProductPricesData;
|
|
25
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
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 _QuoteProductPrices_buy, _QuoteProductPrices_sell, _QuoteProductPrices_currency, _QuoteProductPrices_periodicity, _QuoteProductPrices_term;
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.QuoteProductPrices = exports.QuoteProductPricesFields = void 0;
|
|
16
|
+
const abstractEntity_1 = require("../../abstractEntity");
|
|
17
|
+
var QuoteProductPricesFields;
|
|
18
|
+
(function (QuoteProductPricesFields) {
|
|
19
|
+
QuoteProductPricesFields["BUY"] = "buy";
|
|
20
|
+
QuoteProductPricesFields["SELL"] = "sell";
|
|
21
|
+
QuoteProductPricesFields["CURRENCY"] = "currency";
|
|
22
|
+
QuoteProductPricesFields["PERIODICITY"] = "periodicity";
|
|
23
|
+
QuoteProductPricesFields["TERM"] = "term";
|
|
24
|
+
})(QuoteProductPricesFields = exports.QuoteProductPricesFields || (exports.QuoteProductPricesFields = {}));
|
|
25
|
+
class QuoteProductPrices extends abstractEntity_1.AbstractEntity {
|
|
26
|
+
constructor(data) {
|
|
27
|
+
super(data);
|
|
28
|
+
_QuoteProductPrices_buy.set(this, void 0);
|
|
29
|
+
_QuoteProductPrices_sell.set(this, void 0);
|
|
30
|
+
_QuoteProductPrices_currency.set(this, void 0);
|
|
31
|
+
_QuoteProductPrices_periodicity.set(this, void 0);
|
|
32
|
+
_QuoteProductPrices_term.set(this, void 0);
|
|
33
|
+
__classPrivateFieldSet(this, _QuoteProductPrices_buy, data[QuoteProductPricesFields.BUY], "f");
|
|
34
|
+
__classPrivateFieldSet(this, _QuoteProductPrices_sell, data[QuoteProductPricesFields.SELL], "f");
|
|
35
|
+
__classPrivateFieldSet(this, _QuoteProductPrices_currency, data[QuoteProductPricesFields.CURRENCY], "f");
|
|
36
|
+
__classPrivateFieldSet(this, _QuoteProductPrices_periodicity, data[QuoteProductPricesFields.PERIODICITY], "f");
|
|
37
|
+
__classPrivateFieldSet(this, _QuoteProductPrices_term, data[QuoteProductPricesFields.TERM], "f");
|
|
38
|
+
}
|
|
39
|
+
get buy() {
|
|
40
|
+
return __classPrivateFieldGet(this, _QuoteProductPrices_buy, "f");
|
|
41
|
+
}
|
|
42
|
+
get sell() {
|
|
43
|
+
return __classPrivateFieldGet(this, _QuoteProductPrices_sell, "f");
|
|
44
|
+
}
|
|
45
|
+
get currency() {
|
|
46
|
+
return __classPrivateFieldGet(this, _QuoteProductPrices_currency, "f");
|
|
47
|
+
}
|
|
48
|
+
get periodicity() {
|
|
49
|
+
return __classPrivateFieldGet(this, _QuoteProductPrices_periodicity, "f");
|
|
50
|
+
}
|
|
51
|
+
get term() {
|
|
52
|
+
return __classPrivateFieldGet(this, _QuoteProductPrices_term, "f");
|
|
53
|
+
}
|
|
54
|
+
toJSON() {
|
|
55
|
+
return {
|
|
56
|
+
[QuoteProductPricesFields.BUY]: this.buy,
|
|
57
|
+
[QuoteProductPricesFields.SELL]: this.sell,
|
|
58
|
+
[QuoteProductPricesFields.CURRENCY]: this.currency,
|
|
59
|
+
[QuoteProductPricesFields.PERIODICITY]: this.periodicity,
|
|
60
|
+
[QuoteProductPricesFields.TERM]: this.term,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
exports.QuoteProductPrices = QuoteProductPrices;
|
|
65
|
+
_QuoteProductPrices_buy = new WeakMap(), _QuoteProductPrices_sell = new WeakMap(), _QuoteProductPrices_currency = new WeakMap(), _QuoteProductPrices_periodicity = new WeakMap(), _QuoteProductPrices_term = new WeakMap();
|
|
66
|
+
//# sourceMappingURL=QuoteProductPrices.js.map
|
package/build/quotes/index.d.ts
CHANGED
package/build/quotes/index.js
CHANGED
|
@@ -15,4 +15,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./quotesClient"), exports);
|
|
18
|
+
__exportStar(require("./entities/Quote"), exports);
|
|
19
|
+
__exportStar(require("./entities/QuoteProduct"), exports);
|
|
20
|
+
__exportStar(require("./entities/QuoteProductPrices"), exports);
|
|
21
|
+
__exportStar(require("./entities/QuoteList"), exports);
|
|
18
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -3,6 +3,8 @@ import { GetResult } from '../getResult';
|
|
|
3
3
|
import { QuoteRequest } from './entities/QuoteRequest';
|
|
4
4
|
import { PutQuoteResult } from './entities/PutQuoteResult';
|
|
5
5
|
import { QuoteComments } from './entities/QuoteComments';
|
|
6
|
+
import { Quote } from './entities/Quote';
|
|
7
|
+
import { QuoteList } from './entities/QuoteList';
|
|
6
8
|
export declare type RequestQuoteRequestType = {
|
|
7
9
|
agreeToReceiveCommunications: boolean;
|
|
8
10
|
agreeSharingInformation: boolean;
|
|
@@ -65,6 +67,8 @@ export declare type CreateCommentType = {
|
|
|
65
67
|
};
|
|
66
68
|
export declare class QuotesClient extends AbstractRestfulClient {
|
|
67
69
|
protected basePath: string;
|
|
70
|
+
listQuotes(perPage?: number, page?: number, parameters?: Parameters): Promise<GetResult<QuoteList>>;
|
|
71
|
+
getQuote(reference: string): Promise<GetResult<Quote>>;
|
|
68
72
|
requestQuote(postData: RequestQuoteRequestType, parameters?: Parameters): Promise<GetResult<QuoteRequest>>;
|
|
69
73
|
requestQuoteForVendor(vendor: string, postData: RequestQuoteIbmRequestType, parameters?: Parameters): Promise<void>;
|
|
70
74
|
deleteQuote(quoteReference: string, parameters?: Parameters): Promise<void>;
|
|
@@ -6,11 +6,23 @@ const getResult_1 = require("../getResult");
|
|
|
6
6
|
const QuoteRequest_1 = require("./entities/QuoteRequest");
|
|
7
7
|
const PutQuoteResult_1 = require("./entities/PutQuoteResult");
|
|
8
8
|
const QuoteComments_1 = require("./entities/QuoteComments");
|
|
9
|
+
const Quote_1 = require("./entities/Quote");
|
|
10
|
+
const QuoteList_1 = require("./entities/QuoteList");
|
|
9
11
|
class QuotesClient extends abstractRestfulClient_1.AbstractRestfulClient {
|
|
10
12
|
constructor() {
|
|
11
13
|
super(...arguments);
|
|
12
14
|
this.basePath = '/quotes';
|
|
13
15
|
}
|
|
16
|
+
async listQuotes(perPage = 25, page = 1, parameters = {}) {
|
|
17
|
+
this.path = '';
|
|
18
|
+
this.setPerPage(perPage);
|
|
19
|
+
this.setPage(page);
|
|
20
|
+
return new getResult_1.GetResult(QuoteList_1.QuoteList, await this.get(parameters));
|
|
21
|
+
}
|
|
22
|
+
async getQuote(reference) {
|
|
23
|
+
this.path = `/${reference}`;
|
|
24
|
+
return new getResult_1.GetResult(Quote_1.Quote, await this.get());
|
|
25
|
+
}
|
|
14
26
|
async requestQuote(postData, parameters = {}) {
|
|
15
27
|
this.path = '/request';
|
|
16
28
|
return new getResult_1.GetResult(QuoteRequest_1.QuoteRequest, await this.post(postData, parameters));
|
package/package.json
CHANGED