@bisondesk/core-sdk 1.0.680 → 1.0.682
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/lib/apis/exchange-rates.d.ts +3 -0
- package/lib/apis/exchange-rates.d.ts.map +1 -1
- package/lib/apis/exchange-rates.js +29 -0
- package/lib/apis/exchange-rates.js.map +1 -1
- package/lib/types/intercompany-payments.d.ts.map +1 -1
- package/lib/types/intercompany-payments.js.map +1 -1
- package/lib/types/offers.d.ts +2 -1
- package/lib/types/offers.d.ts.map +1 -1
- package/lib/types/offers.js.map +1 -1
- package/lib/types/opportunities.d.ts +8 -0
- package/lib/types/opportunities.d.ts.map +1 -1
- package/lib/types/opportunities.js.map +1 -1
- package/lib/types/opportunity-payments.d.ts +9 -0
- package/lib/types/opportunity-payments.d.ts.map +1 -1
- package/lib/types/opportunity-payments.js.map +1 -1
- package/lib/types/tenants.d.ts +1 -0
- package/lib/types/tenants.d.ts.map +1 -1
- package/lib/types/tenants.js.map +1 -1
- package/lib/types/vehicle-purchase-payments.d.ts +23 -1
- package/lib/types/vehicle-purchase-payments.d.ts.map +1 -1
- package/lib/types/vehicle-purchase-payments.js +6 -0
- package/lib/types/vehicle-purchase-payments.js.map +1 -1
- package/lib/types/vehicles.d.ts +7 -0
- package/lib/types/vehicles.d.ts.map +1 -1
- package/lib/types/vehicles.js.map +1 -1
- package/lib/utils/opportunity-payments.d.ts +3 -0
- package/lib/utils/opportunity-payments.d.ts.map +1 -0
- package/lib/utils/opportunity-payments.js +5 -0
- package/lib/utils/opportunity-payments.js.map +1 -0
- package/lib/utils/opportunity-payments.test.d.ts +2 -0
- package/lib/utils/opportunity-payments.test.d.ts.map +1 -0
- package/lib/utils/opportunity-payments.test.js +23 -0
- package/lib/utils/opportunity-payments.test.js.map +1 -0
- package/lib/utils/tenants.d.ts +3 -0
- package/lib/utils/tenants.d.ts.map +1 -1
- package/lib/utils/tenants.js +3 -0
- package/lib/utils/tenants.js.map +1 -1
- package/lib/utils/tenants.test.js +27 -1
- package/lib/utils/tenants.test.js.map +1 -1
- package/package.json +1 -1
- package/src/apis/exchange-rates.ts +49 -0
- package/src/types/activities.js +13 -0
- package/src/types/activities.js.map +1 -0
- package/src/types/comparables.js +2 -0
- package/src/types/comparables.js.map +1 -0
- package/src/types/crm.js +58 -0
- package/src/types/crm.js.map +1 -0
- package/src/types/dashboard.js +2 -0
- package/src/types/dashboard.js.map +1 -0
- package/src/types/definitions.js +2 -0
- package/src/types/definitions.js.map +1 -0
- package/src/types/fields.js +2 -0
- package/src/types/fields.js.map +1 -0
- package/src/types/insights.js +2 -0
- package/src/types/insights.js.map +1 -0
- package/src/types/intercompany-payments.ts +4 -3
- package/src/types/interests.js +6 -0
- package/src/types/interests.js.map +1 -0
- package/src/types/internal-events.js +18 -0
- package/src/types/internal-events.js.map +1 -0
- package/src/types/internet-opportunities.js +2 -0
- package/src/types/internet-opportunities.js.map +1 -0
- package/src/types/internet-vehicles.js +2 -0
- package/src/types/internet-vehicles.js.map +1 -0
- package/src/types/leasing-administration.js +2 -0
- package/src/types/leasing-administration.js.map +1 -0
- package/src/types/leasing-debtors.js +2 -0
- package/src/types/leasing-debtors.js.map +1 -0
- package/src/types/leasing-search.js +2 -0
- package/src/types/leasing-search.js.map +1 -0
- package/src/types/leasing-settings.js +7 -0
- package/src/types/leasing-settings.js.map +1 -0
- package/src/types/leasing.js +38 -0
- package/src/types/leasing.js.map +1 -0
- package/src/types/marketing.js +35 -0
- package/src/types/marketing.js.map +1 -0
- package/src/types/offers.js +56 -0
- package/src/types/offers.ts +2 -0
- package/src/types/opportunities.js +107 -0
- package/src/types/opportunities.js.map +1 -0
- package/src/types/opportunities.ts +15 -0
- package/src/types/opportunity-payments.ts +23 -0
- package/src/types/payments.js +7 -0
- package/src/types/picklists.js +2 -0
- package/src/types/picklists.js.map +1 -0
- package/src/types/quotes.js +42 -0
- package/src/types/recently-viewed.js +2 -0
- package/src/types/recently-viewed.js.map +1 -0
- package/src/types/reservations.js +5 -0
- package/src/types/reservations.js.map +1 -0
- package/src/types/roi-ratings.js +5 -0
- package/src/types/roi-ratings.js.map +1 -0
- package/src/types/saved-filters.js +9 -0
- package/src/types/saved-filters.js.map +1 -0
- package/src/types/search.js +2 -0
- package/src/types/search.js.map +1 -0
- package/src/types/settings.js +2 -0
- package/src/types/settings.js.map +1 -0
- package/src/types/templates.js +2 -0
- package/src/types/templates.js.map +1 -0
- package/src/types/tenants.js +21 -0
- package/src/types/tenants.js.map +1 -0
- package/src/types/tenants.ts +6 -0
- package/src/types/user-performance.js +7 -0
- package/src/types/user-performance.js.map +1 -0
- package/src/types/utils.js +2 -0
- package/src/types/validation.js +2 -0
- package/src/types/validation.js.map +1 -0
- package/src/types/vehicle-purchase-payments.ts +52 -6
- package/src/types/vehicle-sales.js +6 -0
- package/src/types/vehicle-sales.js.map +1 -0
- package/src/types/vehicles.js +98 -0
- package/src/types/vehicles.js.map +1 -0
- package/src/types/vehicles.ts +15 -1
- package/src/utils/leasing.js +6 -0
- package/src/utils/leasing.js.map +1 -0
- package/src/utils/opportunities.js +48 -0
- package/src/utils/opportunities.js.map +1 -0
- package/src/utils/opportunity-payments.test.ts +31 -0
- package/src/utils/opportunity-payments.ts +15 -0
- package/src/utils/tenants.test.ts +39 -1
- package/src/utils/tenants.ts +17 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
export var OpportunityActions;
|
|
2
|
+
(function (OpportunityActions) {
|
|
3
|
+
OpportunityActions["ADD_REMARKS"] = "add_remarks";
|
|
4
|
+
OpportunityActions["CREATE_QUOTE"] = "create_quote";
|
|
5
|
+
OpportunityActions["LOSE"] = "lose";
|
|
6
|
+
OpportunityActions["REOPEN"] = "reopen";
|
|
7
|
+
OpportunityActions["START_PREPARATION"] = "start_preparation";
|
|
8
|
+
OpportunityActions["REVERT_PREPARATION"] = "revert_preparation";
|
|
9
|
+
OpportunityActions["START_DELIVERY"] = "start_delivery";
|
|
10
|
+
OpportunityActions["REVERT_DELIVERY"] = "revert_delivery";
|
|
11
|
+
OpportunityActions["SET_CUSTOMER"] = "set_customer";
|
|
12
|
+
OpportunityActions["SET_DOCUMENTS"] = "set_documents";
|
|
13
|
+
OpportunityActions["SET_INTEREST"] = "set_interest";
|
|
14
|
+
OpportunityActions["SET_METADATA"] = "set_metadata";
|
|
15
|
+
OpportunityActions["SET_VEHICLE"] = "set_vehicle";
|
|
16
|
+
OpportunityActions["ADD_ACTIVITY"] = "add_activity";
|
|
17
|
+
OpportunityActions["ADD_PAYMENT"] = "add_payment";
|
|
18
|
+
OpportunityActions["SWITCH_VEHICLE"] = "switch_vehicle";
|
|
19
|
+
OpportunityActions["DELIVER_VEHICLE"] = "deliver_vehicle";
|
|
20
|
+
OpportunityActions["UNDO_DELIVER_VEHICLE"] = "undo_deliver_vehicle";
|
|
21
|
+
OpportunityActions["SET_DEAL_INFO"] = "update_deal_info";
|
|
22
|
+
OpportunityActions["ISSUE_INVOICE"] = "issue_invoice";
|
|
23
|
+
})(OpportunityActions || (OpportunityActions = {}));
|
|
24
|
+
export var OpportunityPaymentStatus;
|
|
25
|
+
(function (OpportunityPaymentStatus) {
|
|
26
|
+
OpportunityPaymentStatus["PARTIAL_PAYMENT"] = "partial_payment";
|
|
27
|
+
OpportunityPaymentStatus["FULL_PAYMENT"] = "full_payment";
|
|
28
|
+
OpportunityPaymentStatus["NO_PAYMENT"] = "no_payment";
|
|
29
|
+
})(OpportunityPaymentStatus || (OpportunityPaymentStatus = {}));
|
|
30
|
+
export var OpportunityStatus;
|
|
31
|
+
(function (OpportunityStatus) {
|
|
32
|
+
OpportunityStatus["PROSPECTION"] = "prospection";
|
|
33
|
+
OpportunityStatus["DISCOVERY"] = "discovery";
|
|
34
|
+
OpportunityStatus["EVALUATION"] = "evaluation";
|
|
35
|
+
OpportunityStatus["REVIEW"] = "review";
|
|
36
|
+
OpportunityStatus["PREPARATION"] = "preparation";
|
|
37
|
+
OpportunityStatus["DELIVERY"] = "delivery";
|
|
38
|
+
})(OpportunityStatus || (OpportunityStatus = {}));
|
|
39
|
+
export const OpportunityStatusOrder = [
|
|
40
|
+
OpportunityStatus.PROSPECTION,
|
|
41
|
+
OpportunityStatus.DISCOVERY,
|
|
42
|
+
OpportunityStatus.EVALUATION,
|
|
43
|
+
OpportunityStatus.REVIEW,
|
|
44
|
+
OpportunityStatus.PREPARATION,
|
|
45
|
+
OpportunityStatus.DELIVERY,
|
|
46
|
+
];
|
|
47
|
+
export var OpportunityRequirementsCode;
|
|
48
|
+
(function (OpportunityRequirementsCode) {
|
|
49
|
+
OpportunityRequirementsCode["VEHICLE_AT_ORIGIN"] = "vehicle_at_origin";
|
|
50
|
+
OpportunityRequirementsCode["LEASING_SL_ACTION"] = "sl_action";
|
|
51
|
+
OpportunityRequirementsCode["TECHNICAL_NOTES_CHANGED"] = "technical_notes_changed";
|
|
52
|
+
})(OpportunityRequirementsCode || (OpportunityRequirementsCode = {}));
|
|
53
|
+
export var OpportunityWarningsCode;
|
|
54
|
+
(function (OpportunityWarningsCode) {
|
|
55
|
+
OpportunityWarningsCode["QUOTE_PENDING_VALIDATION"] = "quote_pending_validation";
|
|
56
|
+
OpportunityWarningsCode["QUOTE_PEDING_MANAGER_APPROVAL"] = "quote_pending_manager_approval";
|
|
57
|
+
OpportunityWarningsCode["CONCURRENT_OPPORTUNITIES"] = "concurrent_opportunities";
|
|
58
|
+
OpportunityWarningsCode["VEHICLE_RESERVED"] = "vehicle_reserved";
|
|
59
|
+
OpportunityWarningsCode["OPPORTUNITY_NEEDS_SWITCH_VEHICLE"] = "opportunity_needs_switch_vehicle";
|
|
60
|
+
OpportunityWarningsCode["VEHICLE_RESERVED_DATE_INFO"] = "vehicle_reserved_date_info";
|
|
61
|
+
OpportunityWarningsCode["VEHICLE_RESERVED_INDEFINITELY"] = "vehicle_reserved_indefinitely";
|
|
62
|
+
OpportunityWarningsCode["QUOTE_MISSING_DELIVERY_DETAILS"] = "quote_missing_delivery_details";
|
|
63
|
+
OpportunityWarningsCode["VEHICLE_TECHNICAL_DETAILS_CHANGED"] = "vehicle_technical_details_changed";
|
|
64
|
+
OpportunityWarningsCode["QUOTE_MISSING_FINANCING_DETAILS"] = "quote_missing_financing_details";
|
|
65
|
+
})(OpportunityWarningsCode || (OpportunityWarningsCode = {}));
|
|
66
|
+
export const OpportunityWonColumnId = 'closed_won';
|
|
67
|
+
export const OpportunityKanbanColumns = [...OpportunityStatusOrder, OpportunityWonColumnId];
|
|
68
|
+
export const OpportunityKanbanEndColumns = [OpportunityWonColumnId];
|
|
69
|
+
export var OpportunityLostReasonValues;
|
|
70
|
+
(function (OpportunityLostReasonValues) {
|
|
71
|
+
OpportunityLostReasonValues["Expensive"] = "expensive";
|
|
72
|
+
OpportunityLostReasonValues["AlreadySold"] = "already_sold";
|
|
73
|
+
OpportunityLostReasonValues["BadExperience"] = "bad_experience";
|
|
74
|
+
OpportunityLostReasonValues["IncorrectVehicleCondition"] = "incorrect_vehicle_condition";
|
|
75
|
+
OpportunityLostReasonValues["NoStock"] = "not_enough_stock";
|
|
76
|
+
OpportunityLostReasonValues["SlowDelivery"] = "slow_delivery";
|
|
77
|
+
OpportunityLostReasonValues["HighDeposit"] = "deposit_too_high";
|
|
78
|
+
OpportunityLostReasonValues["NoAnswer"] = "client_not_answered";
|
|
79
|
+
OpportunityLostReasonValues["Automatic"] = "automatic";
|
|
80
|
+
OpportunityLostReasonValues["LeasingDeal"] = "sold-via-leasing";
|
|
81
|
+
})(OpportunityLostReasonValues || (OpportunityLostReasonValues = {}));
|
|
82
|
+
export var VehicleSaleDealStatus;
|
|
83
|
+
(function (VehicleSaleDealStatus) {
|
|
84
|
+
VehicleSaleDealStatus["SaleAgreed"] = "SALE_AGREED";
|
|
85
|
+
VehicleSaleDealStatus["FirstPaymentReceived"] = "FIRST_PAYMENT_RECEIVED";
|
|
86
|
+
VehicleSaleDealStatus["FullPaymentReceived"] = "FULL_PAYMENT_RECEIVED";
|
|
87
|
+
})(VehicleSaleDealStatus || (VehicleSaleDealStatus = {}));
|
|
88
|
+
export var VehicleSaleLogisticsStatus;
|
|
89
|
+
(function (VehicleSaleLogisticsStatus) {
|
|
90
|
+
VehicleSaleLogisticsStatus["AtOrigin"] = "AT_ORIGIN";
|
|
91
|
+
VehicleSaleLogisticsStatus["Delivered"] = "DELIVERED";
|
|
92
|
+
})(VehicleSaleLogisticsStatus || (VehicleSaleLogisticsStatus = {}));
|
|
93
|
+
export const QUOTE_NEEDS_VALIDATION_NOTIFICATION_ORIGIN = 'quote-validation';
|
|
94
|
+
export const QUOTE_NOT_CREATED_BY_ACCOUNT_MANAGER = 'quote-not-created-by-account-manager';
|
|
95
|
+
export const QUOTE_VALIDATOR_FEEDBACK_NOTIFICATION_ORIGIN = 'quote-validation-feedback';
|
|
96
|
+
export const OPPORTUNITY_VEHICLE_AVAILABLE_NOTIFICATION_ORIGIN = 'opportunity-vehicle-available';
|
|
97
|
+
export const OPPORTUNITY_VEHICLE_DELIVERY_NOTIFICATION_ORIGIN = 'opportunity-vehicle-delivery';
|
|
98
|
+
export const OPPORTUNITY_VEHICLE_RESERVATION_ABOUT_TO_EXPIRE_NOTIFICATION_ORIGIN = 'opportunity-vehicle-reservation-to-expire';
|
|
99
|
+
export const OPPORTUNITY_VEHICLE_RESERVATION_EXPIRED_NOTIFICATION_ORIGIN = 'opportunity-vehicle-reservation-expired';
|
|
100
|
+
export const OFFER_SET_FINAL_VALUATION_ORIGIN = 'offer-set-final-valuation';
|
|
101
|
+
export const VEHICLE_PRICE_DECREASES_NOTIFICATION_ORIGIN = 'vehicle-price-decreased';
|
|
102
|
+
export const VEHICLE_ARRIVED_NOTIFICATION_ORIGIN = 'vehicle-arrived';
|
|
103
|
+
export const VEHICLE_CHECKEDIN_NOTIFICATION_ORIGIN = 'vehicle-checkedin';
|
|
104
|
+
export const VEHICLE_PURCHASED_NOTIFICATION_ORIGIN = 'vehicle-purchased';
|
|
105
|
+
export const VEHICLE_PRICE_CHANGED_NOTIFICATION_ORIGIN = 'vehicle-price-changed';
|
|
106
|
+
export const VEHICLE_SOLD_NOTIFICATION_ORIGIN = 'vehicle-sold';
|
|
107
|
+
//# sourceMappingURL=opportunities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opportunities.js","sourceRoot":"","sources":["opportunities.ts"],"names":[],"mappings":"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"}
|
|
@@ -251,8 +251,23 @@ export type OpportunityUpdate = {
|
|
|
251
251
|
};
|
|
252
252
|
|
|
253
253
|
export type OpportunityPaymentSummary = {
|
|
254
|
+
/** Branch currency. */
|
|
254
255
|
total: string;
|
|
256
|
+
/** Sum of `amount` over the payments, in branch currency. */
|
|
255
257
|
paid: string;
|
|
258
|
+
/**
|
|
259
|
+
* The same pair in the quote's alternative currency, present when the branch can be paid in it.
|
|
260
|
+
* `paid` sums the payments that arrived in that currency.
|
|
261
|
+
*/
|
|
262
|
+
foreign?: {
|
|
263
|
+
total: string;
|
|
264
|
+
paid: string;
|
|
265
|
+
currencyCode: string;
|
|
266
|
+
exchangeRate: string;
|
|
267
|
+
};
|
|
268
|
+
/** Fully paid when either currency reaches its total. */
|
|
269
|
+
status: OpportunityPaymentStatus;
|
|
270
|
+
percentagePaid: string;
|
|
256
271
|
entries: DataRecord<OpportunityPayment>[];
|
|
257
272
|
};
|
|
258
273
|
|
|
@@ -7,8 +7,27 @@ export enum OpportunityPaymentActions {
|
|
|
7
7
|
|
|
8
8
|
export const OPPORTUNITY_PAYMENT_NOTIFICATION_ORIGIN = 'opportunity-payment-notification';
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* The money as it arrived, when it arrived in the quote's alternative currency. `amount` then
|
|
12
|
+
* holds its value in branch currency: `foreign.amount × foreign.exchangeRate`.
|
|
13
|
+
*/
|
|
14
|
+
export type OpportunityPaymentForeign = {
|
|
15
|
+
amount: string;
|
|
16
|
+
currencyCode: string;
|
|
17
|
+
/** Branch currency units per 1 unit of `currencyCode`, the quote's rate. */
|
|
18
|
+
exchangeRate: string;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** What a user sends for a payment in another currency. The backend takes the rate from the quote
|
|
22
|
+
* and derives `amount`. */
|
|
23
|
+
export type OpportunityPaymentForeignRequest = Pick<
|
|
24
|
+
OpportunityPaymentForeign,
|
|
25
|
+
'amount' | 'currencyCode'
|
|
26
|
+
>;
|
|
27
|
+
|
|
10
28
|
type BaseOpportunityPayment = {
|
|
11
29
|
opportunityId: string;
|
|
30
|
+
/** Branch currency. */
|
|
12
31
|
amount: string;
|
|
13
32
|
description?: string;
|
|
14
33
|
vehicleId: string;
|
|
@@ -24,6 +43,7 @@ export type NewOpportunityPayment = BaseOpportunityPayment & {
|
|
|
24
43
|
deletedAt?: undefined;
|
|
25
44
|
deletedBy?: undefined;
|
|
26
45
|
paidAt: string;
|
|
46
|
+
foreign?: OpportunityPaymentForeignRequest;
|
|
27
47
|
};
|
|
28
48
|
|
|
29
49
|
export type OpportunityPayment = BaseOpportunityPayment & {
|
|
@@ -35,11 +55,14 @@ export type OpportunityPayment = BaseOpportunityPayment & {
|
|
|
35
55
|
deletedAt?: string;
|
|
36
56
|
deletedBy?: string;
|
|
37
57
|
paidAt?: string;
|
|
58
|
+
foreign?: OpportunityPaymentForeign;
|
|
38
59
|
};
|
|
39
60
|
|
|
40
61
|
export type OpportunityPaymentUpdate = {
|
|
41
62
|
description?: string;
|
|
42
63
|
amount?: string;
|
|
64
|
+
/** `null` turns the payment back into a branch currency payment. */
|
|
65
|
+
foreign?: OpportunityPaymentForeignRequest | null;
|
|
43
66
|
paidAt?: string;
|
|
44
67
|
};
|
|
45
68
|
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export var PaymentActions;
|
|
2
|
+
(function (PaymentActions) {
|
|
3
|
+
PaymentActions["DELETE"] = "delete";
|
|
4
|
+
PaymentActions["EDIT"] = "edit";
|
|
5
|
+
})(PaymentActions || (PaymentActions = {}));
|
|
6
|
+
export const PAYMENT_NOTIFICATION_ORIGIN = 'payment-notification';
|
|
7
|
+
//# sourceMappingURL=payments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"picklists.js","sourceRoot":"","sources":["picklists.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export var QuoteActions;
|
|
2
|
+
(function (QuoteActions) {
|
|
3
|
+
QuoteActions["ACCEPT"] = "accept";
|
|
4
|
+
QuoteActions["VALIDATE"] = "validate";
|
|
5
|
+
QuoteActions["DONWLOAD_PDFS"] = "download-pdfs";
|
|
6
|
+
QuoteActions["CANCEL"] = "cancel";
|
|
7
|
+
})(QuoteActions || (QuoteActions = {}));
|
|
8
|
+
export var QuoteStatus;
|
|
9
|
+
(function (QuoteStatus) {
|
|
10
|
+
QuoteStatus["CREATED"] = "created";
|
|
11
|
+
QuoteStatus["VALIDATED"] = "validated";
|
|
12
|
+
QuoteStatus["INVALIDATED"] = "invalidated";
|
|
13
|
+
QuoteStatus["ACCEPTED"] = "accepted";
|
|
14
|
+
QuoteStatus["REJECTED"] = "rejected";
|
|
15
|
+
QuoteStatus["CANCELLED"] = "cancelled";
|
|
16
|
+
QuoteStatus["MANAGER_REJECTED"] = "managerRejected";
|
|
17
|
+
QuoteStatus["MANAGER_ACCEPTED"] = "managerAccepted";
|
|
18
|
+
})(QuoteStatus || (QuoteStatus = {}));
|
|
19
|
+
export var QuoteMetricsScore;
|
|
20
|
+
(function (QuoteMetricsScore) {
|
|
21
|
+
QuoteMetricsScore["DANGER"] = "danger";
|
|
22
|
+
QuoteMetricsScore["NEUTRAL"] = "neutral";
|
|
23
|
+
QuoteMetricsScore["GOOD"] = "good";
|
|
24
|
+
})(QuoteMetricsScore || (QuoteMetricsScore = {}));
|
|
25
|
+
export var DeliveryTypes;
|
|
26
|
+
(function (DeliveryTypes) {
|
|
27
|
+
DeliveryTypes["PICK_UP"] = "pickUp";
|
|
28
|
+
DeliveryTypes["ADDRESS"] = "address";
|
|
29
|
+
DeliveryTypes["PORT"] = "port";
|
|
30
|
+
})(DeliveryTypes || (DeliveryTypes = {}));
|
|
31
|
+
export var SpoilerInfo;
|
|
32
|
+
(function (SpoilerInfo) {
|
|
33
|
+
SpoilerInfo["MOUNT"] = "mount";
|
|
34
|
+
SpoilerInfo["UNMOUNT"] = "unmount";
|
|
35
|
+
SpoilerInfo["NO_ACTION"] = "noAction";
|
|
36
|
+
})(SpoilerInfo || (SpoilerInfo = {}));
|
|
37
|
+
export var TransportationMode;
|
|
38
|
+
(function (TransportationMode) {
|
|
39
|
+
TransportationMode["BY_ROAD"] = "byRoad";
|
|
40
|
+
TransportationMode["ON_LOW_BED"] = "onLowBed";
|
|
41
|
+
})(TransportationMode || (TransportationMode = {}));
|
|
42
|
+
//# sourceMappingURL=quotes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recently-viewed.js","sourceRoot":"","sources":["recently-viewed.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reservations.js","sourceRoot":"","sources":["reservations.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,kBAEX;AAFD,WAAY,kBAAkB;IAC5B,kEAA4C,CAAA;AAC9C,CAAC,EAFW,kBAAkB,KAAlB,kBAAkB,QAE7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"roi-ratings.js","sourceRoot":"","sources":["roi-ratings.ts"],"names":[],"mappings":"AAIA,MAAM,CAAN,IAAY,WAEX;AAFD,WAAY,WAAW;IACrB,2CAA4B,CAAA;AAC9B,CAAC,EAFW,WAAW,KAAX,WAAW,QAEtB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export var SavedFiltersActions;
|
|
2
|
+
(function (SavedFiltersActions) {
|
|
3
|
+
SavedFiltersActions["Share"] = "share";
|
|
4
|
+
SavedFiltersActions["Update"] = "update";
|
|
5
|
+
SavedFiltersActions["Delete"] = "delete";
|
|
6
|
+
SavedFiltersActions["SetPersonalDefault"] = "set_own_default";
|
|
7
|
+
SavedFiltersActions["SetGlobalDefault"] = "set_global_default";
|
|
8
|
+
})(SavedFiltersActions || (SavedFiltersActions = {}));
|
|
9
|
+
//# sourceMappingURL=saved-filters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"saved-filters.js","sourceRoot":"","sources":["saved-filters.ts"],"names":[],"mappings":"AAsBA,MAAM,CAAN,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,sCAAe,CAAA;IACf,wCAAiB,CAAA;IACjB,wCAAiB,CAAA;IACjB,6DAAsC,CAAA;IACtC,8DAAuC,CAAA;AACzC,CAAC,EANW,mBAAmB,KAAnB,mBAAmB,QAM9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"","sources":["search.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["settings.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templates.js","sourceRoot":"","sources":["templates.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export var TenantModule;
|
|
2
|
+
(function (TenantModule) {
|
|
3
|
+
TenantModule["Administration"] = "administration";
|
|
4
|
+
TenantModule["App"] = "app";
|
|
5
|
+
TenantModule["CRM"] = "crm";
|
|
6
|
+
TenantModule["Docs"] = "docs";
|
|
7
|
+
TenantModule["Leads"] = "leads";
|
|
8
|
+
TenantModule["Leasing"] = "leasing";
|
|
9
|
+
TenantModule["Marketing"] = "marketing";
|
|
10
|
+
TenantModule["Insights"] = "insights";
|
|
11
|
+
TenantModule["Opportunities"] = "opportunities";
|
|
12
|
+
TenantModule["Offers"] = "offers";
|
|
13
|
+
TenantModule["VehiclesMasterData"] = "vehicles_master_data";
|
|
14
|
+
TenantModule["Vehicles"] = "vehicles";
|
|
15
|
+
TenantModule["Tasks"] = "tasks";
|
|
16
|
+
TenantModule["TrackAndTrace"] = "track_and_trace";
|
|
17
|
+
TenantModule["Bootstrap"] = "bootstrap";
|
|
18
|
+
TenantModule["WhatsappNotifications"] = "whatsapp_notifications";
|
|
19
|
+
TenantModule["Hexon"] = "hexon";
|
|
20
|
+
})(TenantModule || (TenantModule = {}));
|
|
21
|
+
//# sourceMappingURL=tenants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tenants.js","sourceRoot":"","sources":["tenants.ts"],"names":[],"mappings":"AAgBA,MAAM,CAAN,IAAY,YAkBX;AAlBD,WAAY,YAAY;IACtB,iDAAiC,CAAA;IACjC,2BAAW,CAAA;IACX,2BAAW,CAAA;IACX,6BAAa,CAAA;IACb,+BAAe,CAAA;IACf,mCAAmB,CAAA;IACnB,uCAAuB,CAAA;IACvB,qCAAqB,CAAA;IACrB,+CAA+B,CAAA;IAC/B,iCAAiB,CAAA;IACjB,2DAA2C,CAAA;IAC3C,qCAAqB,CAAA;IACrB,+BAAe,CAAA;IACf,iDAAiC,CAAA;IACjC,uCAAuB,CAAA;IACvB,gEAAgD,CAAA;IAChD,+BAAe,CAAA;AACjB,CAAC,EAlBW,YAAY,KAAZ,YAAY,QAkBvB"}
|
package/src/types/tenants.ts
CHANGED
|
@@ -155,6 +155,12 @@ export type Branch = {
|
|
|
155
155
|
exactAccounting?: boolean;
|
|
156
156
|
accounting?: AccountingProvider;
|
|
157
157
|
currency: string;
|
|
158
|
+
/**
|
|
159
|
+
* The currencies money moves in at this branch, its own `currency` included. Customer payments,
|
|
160
|
+
* purchase prices, supplier invoice drafts and Exact bookings are supported in these currencies
|
|
161
|
+
* only. Absent = the branch's own `currency` only. Set by script.
|
|
162
|
+
*/
|
|
163
|
+
paymentCurrencies?: [string, ...string[]];
|
|
158
164
|
adminNumberPrefix: string;
|
|
159
165
|
stockNumberPrefix: string;
|
|
160
166
|
vatNumber: string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export var CommissionGrade;
|
|
2
|
+
(function (CommissionGrade) {
|
|
3
|
+
CommissionGrade["TooLow"] = "tooLow";
|
|
4
|
+
CommissionGrade["Low"] = "low";
|
|
5
|
+
CommissionGrade["OnTarget"] = "onTarget";
|
|
6
|
+
})(CommissionGrade || (CommissionGrade = {}));
|
|
7
|
+
//# sourceMappingURL=user-performance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-performance.js","sourceRoot":"","sources":["user-performance.ts"],"names":[],"mappings":"AAsCA,MAAM,CAAN,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,8BAAW,CAAA;IACX,wCAAqB,CAAA;AACvB,CAAC,EAJW,eAAe,KAAf,eAAe,QAI1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.js","sourceRoot":"","sources":["validation.ts"],"names":[],"mappings":""}
|
|
@@ -18,18 +18,33 @@ export enum PaymentStage {
|
|
|
18
18
|
Executed = 'executed',
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
/**
|
|
22
|
+
* A payment on a purchase priced in another currency is authorized and paid in that currency.
|
|
23
|
+
* `amount` then holds its value in branch currency: `foreign.amount × foreign.exchangeRate`.
|
|
24
|
+
*/
|
|
25
|
+
export type VehiclePurchasePaymentForeign = {
|
|
26
|
+
amount: string;
|
|
27
|
+
currencyCode: string;
|
|
28
|
+
/** Branch currency units per 1 unit of `currencyCode`, the purchase's rate. */
|
|
29
|
+
exchangeRate: string;
|
|
30
|
+
};
|
|
31
|
+
|
|
21
32
|
export type NewVehiclePurchasePayment = {
|
|
22
33
|
vehicleId: string;
|
|
34
|
+
/** Branch currency. Derived from `foreign` when the purchase is priced in another currency. */
|
|
23
35
|
amount: string;
|
|
36
|
+
/** The backend takes the rate from the purchase. */
|
|
37
|
+
foreign?: Pick<VehiclePurchasePaymentForeign, 'amount' | 'currencyCode'>;
|
|
24
38
|
description?: string;
|
|
25
39
|
paidAt?: string;
|
|
26
40
|
paidBy?: string;
|
|
27
41
|
};
|
|
28
42
|
|
|
29
|
-
export type VehiclePurchasePayment = NewVehiclePurchasePayment & {
|
|
43
|
+
export type VehiclePurchasePayment = Omit<NewVehiclePurchasePayment, 'foreign'> & {
|
|
30
44
|
id: string;
|
|
31
45
|
createdBy: string;
|
|
32
46
|
createdAt: string;
|
|
47
|
+
foreign?: VehiclePurchasePaymentForeign;
|
|
33
48
|
stage: PaymentStage;
|
|
34
49
|
/** Manual settlement priority within the Allowed tab; lower is paid first. */
|
|
35
50
|
priority: number;
|
|
@@ -90,9 +105,10 @@ export type VehiclePurchasePaymentBff = {
|
|
|
90
105
|
};
|
|
91
106
|
|
|
92
107
|
/**
|
|
93
|
-
* The group an unpaid purchase
|
|
94
|
-
*
|
|
95
|
-
*
|
|
108
|
+
* The group an unpaid purchase falls in, in the order the Unpaid list ranks them: sold to a client
|
|
109
|
+
* (whether or not it has arrived), arrived on our park and not sold, or still expected — neither
|
|
110
|
+
* sold nor arrived. The single Unpaid list filters by `sold` and `logisticStatus` instead; the
|
|
111
|
+
* `group` filter and `meta.counts` serve the client that paged each group on its own.
|
|
96
112
|
*/
|
|
97
113
|
export enum UnpaidPurchaseGroup {
|
|
98
114
|
Sold = 'sold',
|
|
@@ -100,6 +116,34 @@ export enum UnpaidPurchaseGroup {
|
|
|
100
116
|
Expected = 'expected',
|
|
101
117
|
}
|
|
102
118
|
|
|
119
|
+
/**
|
|
120
|
+
* Where the vehicle behind an unpaid purchase stands, in the order the Unpaid list ranks its sales:
|
|
121
|
+
* delivered to the client, arrived on our park, or still expected from the supplier. Delivered comes
|
|
122
|
+
* from the sale side, so only a sold vehicle is delivered, whether or not it passed our park.
|
|
123
|
+
*/
|
|
124
|
+
export enum UnpaidPurchaseLogisticStatus {
|
|
125
|
+
Delivered = 'delivered',
|
|
126
|
+
Arrived = 'arrived',
|
|
127
|
+
Expected = 'expected',
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/** The filters on the Unpaid list. A filter left out keeps every purchase. */
|
|
131
|
+
export type UnpaidPurchasesFilters = {
|
|
132
|
+
/**
|
|
133
|
+
* Free text, case-insensitive: every word must appear in the stock number, VIN, vehicle title or
|
|
134
|
+
* supplier name.
|
|
135
|
+
*/
|
|
136
|
+
q?: string;
|
|
137
|
+
sold?: boolean;
|
|
138
|
+
logisticStatus?: UnpaidPurchaseLogisticStatus;
|
|
139
|
+
/** Purchasers (`purchase.purchasedBy`); a purchase matches any of them. */
|
|
140
|
+
purchasedBy?: string[];
|
|
141
|
+
branchId?: string;
|
|
142
|
+
/** The vehicle's condition (`external.condition.used`); a vehicle without one matches neither. */
|
|
143
|
+
used?: boolean;
|
|
144
|
+
group?: UnpaidPurchaseGroup;
|
|
145
|
+
};
|
|
146
|
+
|
|
103
147
|
/**
|
|
104
148
|
* A row on the Unpaid tab: an agreed purchase that still has an amount to authorise for payment.
|
|
105
149
|
* Derived from the purchase deal and the payments already authorised, not a payment record.
|
|
@@ -122,11 +166,13 @@ export type UnpaidPurchase = {
|
|
|
122
166
|
supplierName?: string;
|
|
123
167
|
};
|
|
124
168
|
|
|
125
|
-
/** What a page of
|
|
169
|
+
/** What a page of the Unpaid list carries besides its rows. */
|
|
126
170
|
export type UnpaidPurchasesMeta = {
|
|
127
171
|
/** Whether the requester may authorise a payment, as on the vehicle purchase tab. */
|
|
128
172
|
canAllowPayment: boolean;
|
|
129
|
-
/**
|
|
173
|
+
/** Everyone who purchased an unpaid purchase, unfiltered, for the purchaser filter. */
|
|
174
|
+
purchasers: string[];
|
|
175
|
+
/** How many purchases each group holds, unfiltered. */
|
|
130
176
|
counts: Record<UnpaidPurchaseGroup, number>;
|
|
131
177
|
};
|
|
132
178
|
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export var VehicleSaleInfoActions;
|
|
2
|
+
(function (VehicleSaleInfoActions) {
|
|
3
|
+
VehicleSaleInfoActions["VIEW_COSTS"] = "canSeeCosts";
|
|
4
|
+
VehicleSaleInfoActions["VIEW_CUSTOMER"] = "canSeeCustomer";
|
|
5
|
+
})(VehicleSaleInfoActions || (VehicleSaleInfoActions = {}));
|
|
6
|
+
//# sourceMappingURL=vehicle-sales.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vehicle-sales.js","sourceRoot":"","sources":["vehicle-sales.ts"],"names":[],"mappings":"AAOA,MAAM,CAAN,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IAChC,oDAA0B,CAAA;IAC1B,0DAAgC,CAAA;AAClC,CAAC,EAHW,sBAAsB,KAAtB,sBAAsB,QAGjC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
export var VehicleRoles;
|
|
2
|
+
(function (VehicleRoles) {
|
|
3
|
+
VehicleRoles["SALE"] = "SALE";
|
|
4
|
+
VehicleRoles["OWN_USE"] = "OWN_USE";
|
|
5
|
+
VehicleRoles["RENTAL"] = "RENTAL";
|
|
6
|
+
VehicleRoles["BUILD"] = "BUILD";
|
|
7
|
+
VehicleRoles["UNKNOWN"] = "UNKNOWN";
|
|
8
|
+
VehicleRoles["BANK_FINANCE"] = "BANK_FINANCE";
|
|
9
|
+
})(VehicleRoles || (VehicleRoles = {}));
|
|
10
|
+
export var VehicleFuelType;
|
|
11
|
+
(function (VehicleFuelType) {
|
|
12
|
+
VehicleFuelType["Petrol"] = "PETROL";
|
|
13
|
+
VehicleFuelType["Diesel"] = "DIESEL";
|
|
14
|
+
VehicleFuelType["LPG"] = "LPG";
|
|
15
|
+
VehicleFuelType["LPG_G3"] = "LPG_G3";
|
|
16
|
+
VehicleFuelType["Electric"] = "ELECTRIC";
|
|
17
|
+
VehicleFuelType["CNG"] = "CNG";
|
|
18
|
+
VehicleFuelType["Hydrogen"] = "HYDROGEN";
|
|
19
|
+
VehicleFuelType["BioEthanol"] = "BIO_ETHANOL";
|
|
20
|
+
VehicleFuelType["BioDiesel"] = "BIO_DIESEL";
|
|
21
|
+
VehicleFuelType["E85"] = "E85";
|
|
22
|
+
VehicleFuelType["HCNG"] = "HCNG";
|
|
23
|
+
VehicleFuelType["LPG_Petrol"] = "LPG_PETROL";
|
|
24
|
+
VehicleFuelType["LPG_Diesel"] = "LPG_DIESEL";
|
|
25
|
+
VehicleFuelType["LPG_G3_Petrol"] = "LPG_G3_PETROL";
|
|
26
|
+
VehicleFuelType["LPG_G3_Diesel"] = "LPG_G3_DIESEL";
|
|
27
|
+
VehicleFuelType["Electric_Diesel"] = "ELECTRIC_DIESEL";
|
|
28
|
+
VehicleFuelType["Electric_Petrol"] = "ELECTRIC_PETROL";
|
|
29
|
+
VehicleFuelType["Hybrid"] = "HYBRID";
|
|
30
|
+
VehicleFuelType["Other"] = "OTHER";
|
|
31
|
+
})(VehicleFuelType || (VehicleFuelType = {}));
|
|
32
|
+
export var VehicleTachoTypes;
|
|
33
|
+
(function (VehicleTachoTypes) {
|
|
34
|
+
VehicleTachoTypes["Analog"] = "ANALOG";
|
|
35
|
+
VehicleTachoTypes["Digital"] = "DIGITAL";
|
|
36
|
+
VehicleTachoTypes["SmartTacho1"] = "SMART_TACHO_1";
|
|
37
|
+
VehicleTachoTypes["SmartTacho2"] = "SMART_TACHO_2";
|
|
38
|
+
})(VehicleTachoTypes || (VehicleTachoTypes = {}));
|
|
39
|
+
export var SearchVehicleSaleDealStatus;
|
|
40
|
+
(function (SearchVehicleSaleDealStatus) {
|
|
41
|
+
SearchVehicleSaleDealStatus["NotSold"] = "NOT_SOLD";
|
|
42
|
+
SearchVehicleSaleDealStatus["Reserved"] = "RESERVED";
|
|
43
|
+
SearchVehicleSaleDealStatus["Sold"] = "SOLD";
|
|
44
|
+
})(SearchVehicleSaleDealStatus || (SearchVehicleSaleDealStatus = {}));
|
|
45
|
+
export var VehiclePurchaseDealStatus;
|
|
46
|
+
(function (VehiclePurchaseDealStatus) {
|
|
47
|
+
VehiclePurchaseDealStatus["Marketing"] = "MARKETING";
|
|
48
|
+
VehiclePurchaseDealStatus["PurchaseEvaluation"] = "PURCHASE_EVALUATION";
|
|
49
|
+
VehiclePurchaseDealStatus["PurchaseAgreed"] = "PURCHASE_AGREED";
|
|
50
|
+
VehiclePurchaseDealStatus["FirstPaymentAllowed"] = "FIRST_PAYMENT_ALLOWED";
|
|
51
|
+
VehiclePurchaseDealStatus["FirstPaymentSent"] = "FIRST_PAYMENT_SENT";
|
|
52
|
+
VehiclePurchaseDealStatus["FullPaymentAllowed"] = "FULL_PAYMENT_ALLOWED";
|
|
53
|
+
VehiclePurchaseDealStatus["FullPaymentSent"] = "FULL_PAYMENT_SENT";
|
|
54
|
+
})(VehiclePurchaseDealStatus || (VehiclePurchaseDealStatus = {}));
|
|
55
|
+
export var VehiclePurchaseLogisticsStatus;
|
|
56
|
+
(function (VehiclePurchaseLogisticsStatus) {
|
|
57
|
+
VehiclePurchaseLogisticsStatus["AtOrigin"] = "AT_ORIGIN";
|
|
58
|
+
VehiclePurchaseLogisticsStatus["Arrived"] = "ARRIVED";
|
|
59
|
+
VehiclePurchaseLogisticsStatus["CheckedIn"] = "CHECKED_IN";
|
|
60
|
+
})(VehiclePurchaseLogisticsStatus || (VehiclePurchaseLogisticsStatus = {}));
|
|
61
|
+
export var VehiclePurchaseDeliveryType;
|
|
62
|
+
(function (VehiclePurchaseDeliveryType) {
|
|
63
|
+
VehiclePurchaseDeliveryType["PickUp"] = "PICK_UP";
|
|
64
|
+
VehiclePurchaseDeliveryType["DropOff"] = "DROP_OFF";
|
|
65
|
+
})(VehiclePurchaseDeliveryType || (VehiclePurchaseDeliveryType = {}));
|
|
66
|
+
export var VehicleActions;
|
|
67
|
+
(function (VehicleActions) {
|
|
68
|
+
VehicleActions["EditAdminDocs"] = "edit_admin_docs";
|
|
69
|
+
VehicleActions["EditEngineeringDocs"] = "edit_engineering_docs";
|
|
70
|
+
VehicleActions["EditMarketing"] = "edit_marketing";
|
|
71
|
+
VehicleActions["EditMedia"] = "edit_media";
|
|
72
|
+
VehicleActions["EditPictures"] = "edit_pictures";
|
|
73
|
+
VehicleActions["EditPrices"] = "edit_prices";
|
|
74
|
+
VehicleActions["EditPurchaseDeal"] = "edit_purchase_deal";
|
|
75
|
+
VehicleActions["EditPurchaseLogistics"] = "edit_purchase_logistics";
|
|
76
|
+
VehicleActions["EditSpecs"] = "edit_specs";
|
|
77
|
+
VehicleActions["EditVideos"] = "edit_videos";
|
|
78
|
+
VehicleActions["ViewLeads"] = "view_leads";
|
|
79
|
+
VehicleActions["ViewSimilarOnline"] = "view_similar_online";
|
|
80
|
+
VehicleActions["ViewPurchase"] = "view_purchase";
|
|
81
|
+
VehicleActions["ViewPriceHistory"] = "view_price_history";
|
|
82
|
+
VehicleActions["DeleteVehicle"] = "delete_vehicle";
|
|
83
|
+
})(VehicleActions || (VehicleActions = {}));
|
|
84
|
+
export var PurchaseActions;
|
|
85
|
+
(function (PurchaseActions) {
|
|
86
|
+
PurchaseActions["ViewDeal"] = "view_deal";
|
|
87
|
+
PurchaseActions["ViewSupplierOrganization"] = "view_supplier_organization";
|
|
88
|
+
PurchaseActions["ViewContact"] = "view_contact";
|
|
89
|
+
PurchaseActions["ViewLegalAddress"] = "view_legal_address";
|
|
90
|
+
PurchaseActions["ViewPickupAddress"] = "view_pickup_address";
|
|
91
|
+
PurchaseActions["ViewEstimatedCosts"] = "view_estimated_costs";
|
|
92
|
+
PurchaseActions["ViewFinanceDocuments"] = "view_finance_documents";
|
|
93
|
+
PurchaseActions["AddPayment"] = "add_payment";
|
|
94
|
+
PurchaseActions["EditPayment"] = "edit_payment";
|
|
95
|
+
PurchaseActions["MarkPaymentDone"] = "mark_payment_done";
|
|
96
|
+
PurchaseActions["AddRemarks"] = "add_remarks";
|
|
97
|
+
})(PurchaseActions || (PurchaseActions = {}));
|
|
98
|
+
//# sourceMappingURL=vehicles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vehicles.js","sourceRoot":"","sources":["vehicles.ts"],"names":[],"mappings":"AAgBA,MAAM,CAAN,IAAY,YAOX;AAPD,WAAY,YAAY;IACtB,6BAAa,CAAA;IACb,mCAAmB,CAAA;IACnB,iCAAiB,CAAA;IACjB,+BAAe,CAAA;IACf,mCAAmB,CAAA;IACnB,6CAA6B,CAAA;AAC/B,CAAC,EAPW,YAAY,KAAZ,YAAY,QAOvB;AAED,MAAM,CAAN,IAAY,eAoBX;AApBD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,oCAAiB,CAAA;IACjB,8BAAW,CAAA;IACX,oCAAiB,CAAA;IACjB,wCAAqB,CAAA;IACrB,8BAAW,CAAA;IACX,wCAAqB,CAAA;IACrB,6CAA0B,CAAA;IAC1B,2CAAwB,CAAA;IACxB,8BAAW,CAAA;IACX,gCAAa,CAAA;IACb,4CAAyB,CAAA;IACzB,4CAAyB,CAAA;IACzB,kDAA+B,CAAA;IAC/B,kDAA+B,CAAA;IAC/B,sDAAmC,CAAA;IACnC,sDAAmC,CAAA;IACnC,oCAAiB,CAAA;IACjB,kCAAe,CAAA;AACjB,CAAC,EApBW,eAAe,KAAf,eAAe,QAoB1B;AAED,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,sCAAiB,CAAA;IACjB,wCAAmB,CAAA;IACnB,kDAA6B,CAAA;IAC7B,kDAA6B,CAAA;AAC/B,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B;AAiLD,MAAM,CAAN,IAAY,2BAIX;AAJD,WAAY,2BAA2B;IACrC,mDAAoB,CAAA;IACpB,oDAAqB,CAAA;IACrB,4CAAa,CAAA;AACf,CAAC,EAJW,2BAA2B,KAA3B,2BAA2B,QAItC;AAwWD,MAAM,CAAN,IAAY,yBAQX;AARD,WAAY,yBAAyB;IACnC,oDAAuB,CAAA;IACvB,uEAA0C,CAAA;IAC1C,+DAAkC,CAAA;IAClC,0EAA6C,CAAA;IAC7C,oEAAuC,CAAA;IACvC,wEAA2C,CAAA;IAC3C,kEAAqC,CAAA;AACvC,CAAC,EARW,yBAAyB,KAAzB,yBAAyB,QAQpC;AAED,MAAM,CAAN,IAAY,8BAIX;AAJD,WAAY,8BAA8B;IACxC,wDAAsB,CAAA;IACtB,qDAAmB,CAAA;IACnB,0DAAwB,CAAA;AAC1B,CAAC,EAJW,8BAA8B,KAA9B,8BAA8B,QAIzC;AAED,MAAM,CAAN,IAAY,2BAGX;AAHD,WAAY,2BAA2B;IACrC,iDAAkB,CAAA;IAClB,mDAAoB,CAAA;AACtB,CAAC,EAHW,2BAA2B,KAA3B,2BAA2B,QAGtC;AAwGD,MAAM,CAAN,IAAY,cAgBX;AAhBD,WAAY,cAAc;IACxB,mDAAiC,CAAA;IACjC,+DAA6C,CAAA;IAC7C,kDAAgC,CAAA;IAChC,0CAAwB,CAAA;IACxB,gDAA8B,CAAA;IAC9B,4CAA0B,CAAA;IAC1B,yDAAuC,CAAA;IACvC,mEAAiD,CAAA;IACjD,0CAAwB,CAAA;IACxB,4CAA0B,CAAA;IAC1B,0CAAwB,CAAA;IACxB,2DAAyC,CAAA;IACzC,gDAA8B,CAAA;IAC9B,yDAAuC,CAAA;IACvC,kDAAgC,CAAA;AAClC,CAAC,EAhBW,cAAc,KAAd,cAAc,QAgBzB;AAED,MAAM,CAAN,IAAY,eAYX;AAZD,WAAY,eAAe;IACzB,yCAAsB,CAAA;IACtB,0EAAuD,CAAA;IACvD,+CAA4B,CAAA;IAC5B,0DAAuC,CAAA;IACvC,4DAAyC,CAAA;IACzC,8DAA2C,CAAA;IAC3C,kEAA+C,CAAA;IAC/C,6CAA0B,CAAA;IAC1B,+CAA4B,CAAA;IAC5B,wDAAqC,CAAA;IACrC,6CAA0B,CAAA;AAC5B,CAAC,EAZW,eAAe,KAAf,eAAe,QAY1B"}
|
package/src/types/vehicles.ts
CHANGED
|
@@ -170,6 +170,7 @@ export type NewVehicleRequest = {
|
|
|
170
170
|
dealStatus: VehiclePurchaseDealStatus;
|
|
171
171
|
costs: {
|
|
172
172
|
purchase: string;
|
|
173
|
+
foreign?: VehiclePurchaseDealForeign;
|
|
173
174
|
purchaseVatPercentage: string;
|
|
174
175
|
commission?: string;
|
|
175
176
|
externalTransport?: string;
|
|
@@ -811,6 +812,18 @@ export type VehiclePriceUpdateResponse =
|
|
|
811
812
|
errors: VehiclePriceUpdateError[];
|
|
812
813
|
};
|
|
813
814
|
|
|
815
|
+
/**
|
|
816
|
+
* The price the supplier asked, in the supplier's currency: one of the payment currencies of the
|
|
817
|
+
* vehicle's branch. The purchase's `deal.purchase` is then `purchase × exchangeRate`, and payments
|
|
818
|
+
* are authorized in `currencyCode`.
|
|
819
|
+
*/
|
|
820
|
+
export type VehiclePurchaseDealForeign = {
|
|
821
|
+
purchase: string; // exclusive VAT
|
|
822
|
+
currencyCode: string;
|
|
823
|
+
/** Branch currency units per 1 unit of `currencyCode`. */
|
|
824
|
+
exchangeRate: string;
|
|
825
|
+
};
|
|
826
|
+
|
|
814
827
|
export type VehiclePurchase = {
|
|
815
828
|
organizationId: string;
|
|
816
829
|
contactId: string;
|
|
@@ -854,7 +867,8 @@ export type VehiclePurchase = {
|
|
|
854
867
|
readyToDeliver?: boolean;
|
|
855
868
|
|
|
856
869
|
purchaseVatRate?: string;
|
|
857
|
-
purchase?: string; // exclusive VAT
|
|
870
|
+
purchase?: string; // exclusive VAT; derived from `foreign` when present
|
|
871
|
+
foreign?: VehiclePurchaseDealForeign;
|
|
858
872
|
|
|
859
873
|
bonus?: string; // sometimes manufacturers pay us a bonus when we reach a target
|
|
860
874
|
|