@bisondesk/core-sdk 1.0.610 → 1.0.612
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/constants.d.ts +2 -0
- package/lib/constants.d.ts.map +1 -1
- package/lib/constants.js +2 -0
- package/lib/constants.js.map +1 -1
- package/lib/types/activities.d.ts +3 -2
- package/lib/types/activities.d.ts.map +1 -1
- package/lib/types/activities.js.map +1 -1
- package/lib/types/crm.d.ts +7 -1
- package/lib/types/crm.d.ts.map +1 -1
- package/lib/types/crm.js.map +1 -1
- package/lib/types/interests.d.ts +9 -14
- package/lib/types/interests.d.ts.map +1 -1
- package/lib/types/interests.js +2 -3
- package/lib/types/interests.js.map +1 -1
- package/lib/types/opportunities.d.ts +5 -3
- package/lib/types/opportunities.d.ts.map +1 -1
- package/lib/types/opportunities.js +1 -0
- package/lib/types/opportunities.js.map +1 -1
- package/lib/types/prospects.d.ts +126 -5
- package/lib/types/prospects.d.ts.map +1 -1
- package/lib/types/prospects.js +28 -0
- package/lib/types/prospects.js.map +1 -1
- package/lib/types/reports-leasing.d.ts +5 -0
- package/lib/types/reports-leasing.d.ts.map +1 -1
- package/lib/types/reports-leasing.js.map +1 -1
- package/lib/types/reports-sales.d.ts +8 -0
- package/lib/types/reports-sales.d.ts.map +1 -1
- package/lib/types/reports-sales.js +1 -0
- package/lib/types/reports-sales.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/users.d.ts +19 -20
- package/lib/types/users.d.ts.map +1 -1
- package/lib/types/users.js.map +1 -1
- package/lib/types/vehicle-timeline.d.ts +96 -0
- package/lib/types/vehicle-timeline.d.ts.map +1 -0
- package/lib/types/vehicle-timeline.js +20 -0
- package/lib/types/vehicle-timeline.js.map +1 -0
- package/lib/types/vehicles.d.ts +4 -0
- package/lib/types/vehicles.d.ts.map +1 -1
- package/lib/types/vehicles.js.map +1 -1
- package/package.json +1 -1
- package/src/constants.ts +2 -0
- package/src/types/activities.js +13 -0
- package/src/types/activities.js.map +1 -0
- package/src/types/activities.ts +3 -3
- 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/crm.ts +20 -1
- 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/interests.js +6 -0
- package/src/types/interests.js.map +1 -0
- package/src/types/interests.ts +25 -20
- 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/opportunities.js +107 -0
- package/src/types/opportunities.js.map +1 -0
- package/src/types/opportunities.ts +6 -2
- 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/prospects.ts +281 -4
- 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/reports-leasing.ts +9 -0
- package/src/types/reports-sales.ts +32 -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 +2 -0
- package/src/types/user-performance.js +7 -0
- package/src/types/user-performance.js.map +1 -0
- package/src/types/users.ts +20 -21
- 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-sales.js +6 -0
- package/src/types/vehicle-sales.js.map +1 -0
- package/src/types/vehicle-timeline.ts +143 -0
- package/src/types/vehicles.js +98 -0
- package/src/types/vehicles.js.map +1 -0
- package/src/types/vehicles.ts +7 -0
- 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/tsconfig.tsbuildinfo +1 -1
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export var OfferActions;
|
|
2
|
+
(function (OfferActions) {
|
|
3
|
+
OfferActions["CREATE_BID"] = "create_bid";
|
|
4
|
+
OfferActions["SET_FINAL_VALUATION"] = "set_final_valuation";
|
|
5
|
+
OfferActions["LOSE"] = "lose";
|
|
6
|
+
OfferActions["REOPEN"] = "reopen";
|
|
7
|
+
OfferActions["SET_DOCUMENTS"] = "set_documents";
|
|
8
|
+
OfferActions["SET_METADATA"] = "set_metadata";
|
|
9
|
+
OfferActions["SEE_SUPPLIER"] = "see_supplier";
|
|
10
|
+
OfferActions["SEE_INSIGHTS"] = "see_insights";
|
|
11
|
+
OfferActions["VIEW_BIDS"] = "view_bids";
|
|
12
|
+
OfferActions["DELETE_FINAL_VALUATION"] = "delete_final_valuation";
|
|
13
|
+
OfferActions["SEE_ASKING_PRICE"] = "see_asking_price";
|
|
14
|
+
OfferActions["ACCEPT_NEGOTIATION"] = "accept_negotiation";
|
|
15
|
+
OfferActions["UNDO_ACCEPT_NEGOTIATION"] = "undo_accept_negotiation";
|
|
16
|
+
OfferActions["SET_SUPPLIER_VEHICLE"] = "set_supplier_vehicle";
|
|
17
|
+
OfferActions["CAN_PURCHASE"] = "can_purchase";
|
|
18
|
+
})(OfferActions || (OfferActions = {}));
|
|
19
|
+
export var OfferBidActions;
|
|
20
|
+
(function (OfferBidActions) {
|
|
21
|
+
OfferBidActions["EDIT_BID"] = "create_bid";
|
|
22
|
+
OfferBidActions["DELETE_BID"] = "delete_bid";
|
|
23
|
+
})(OfferBidActions || (OfferBidActions = {}));
|
|
24
|
+
export var OfferStatus;
|
|
25
|
+
(function (OfferStatus) {
|
|
26
|
+
OfferStatus["PROSPECTION"] = "prospection";
|
|
27
|
+
OfferStatus["VALUATION"] = "valuation";
|
|
28
|
+
OfferStatus["NEGOTIATION"] = "negotiation";
|
|
29
|
+
})(OfferStatus || (OfferStatus = {}));
|
|
30
|
+
export var OfferLostReasonValues;
|
|
31
|
+
(function (OfferLostReasonValues) {
|
|
32
|
+
OfferLostReasonValues["Expensive"] = "expensive";
|
|
33
|
+
OfferLostReasonValues["NoMarket"] = "no_market";
|
|
34
|
+
OfferLostReasonValues["BadExperience"] = "bad_experience";
|
|
35
|
+
OfferLostReasonValues["NoAnswer"] = "supplier_mia";
|
|
36
|
+
OfferLostReasonValues["Other"] = "other";
|
|
37
|
+
OfferLostReasonValues["Automatic"] = "automatic";
|
|
38
|
+
})(OfferLostReasonValues || (OfferLostReasonValues = {}));
|
|
39
|
+
export var OfferBidType;
|
|
40
|
+
(function (OfferBidType) {
|
|
41
|
+
OfferBidType["INTERNAL"] = "internal";
|
|
42
|
+
OfferBidType["EXTERNAL"] = "external";
|
|
43
|
+
})(OfferBidType || (OfferBidType = {}));
|
|
44
|
+
export var OfferWarningsCode;
|
|
45
|
+
(function (OfferWarningsCode) {
|
|
46
|
+
OfferWarningsCode["NO_SUPPLIER"] = "no_supplier";
|
|
47
|
+
})(OfferWarningsCode || (OfferWarningsCode = {}));
|
|
48
|
+
export const OfferStatusOrder = [
|
|
49
|
+
OfferStatus.PROSPECTION,
|
|
50
|
+
OfferStatus.VALUATION,
|
|
51
|
+
OfferStatus.NEGOTIATION,
|
|
52
|
+
];
|
|
53
|
+
export const OfferWonColumnId = 'closed_won';
|
|
54
|
+
export const OfferKanbanColumns = [...OfferStatusOrder, OfferWonColumnId];
|
|
55
|
+
export const OfferKanbanEndColumns = [OfferWonColumnId];
|
|
56
|
+
//# sourceMappingURL=offers.js.map
|
|
@@ -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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"}
|
|
@@ -2,7 +2,7 @@ import { Task } from '@bisondesk/commons-sdk/tasks';
|
|
|
2
2
|
import { Document, NextList } from '@bisondesk/commons-sdk/types';
|
|
3
3
|
import { BusinessEntityIds, OpportunityType, WarningHints } from '../constants.js';
|
|
4
4
|
import { Contact, Organization } from './crm.js';
|
|
5
|
-
import type {
|
|
5
|
+
import type { Interest, InterestBffMeta } from './interests.js';
|
|
6
6
|
import { BaseEvent } from './internal-events.js';
|
|
7
7
|
import { Payment } from './payments.js';
|
|
8
8
|
import { Quote, QuoteStatus } from './quotes.js';
|
|
@@ -91,6 +91,7 @@ export enum OpportunityWarningsCode {
|
|
|
91
91
|
QUOTE_MISSING_DELIVERY_DETAILS = 'quote_missing_delivery_details',
|
|
92
92
|
VEHICLE_TECHNICAL_DETAILS_CHANGED = 'vehicle_technical_details_changed',
|
|
93
93
|
QUOTE_MISSING_FINANCING_DETAILS = 'quote_missing_financing_details',
|
|
94
|
+
VEHICLE_BRANCH_MISMATCH = 'vehicle_branch_mismatch',
|
|
94
95
|
}
|
|
95
96
|
|
|
96
97
|
export const OpportunityWonColumnId = 'closed_won';
|
|
@@ -268,7 +269,7 @@ export type ContactMetdata = {
|
|
|
268
269
|
export type OpportunityBFF = {
|
|
269
270
|
opportunity: DataRecord<Opportunity, OpportunityBffMeta>;
|
|
270
271
|
vehicle?: DataRecord<Vehicle, VehicleBffMetadata>;
|
|
271
|
-
interest?: DataRecord<
|
|
272
|
+
interest?: DataRecord<Interest, InterestBffMeta>;
|
|
272
273
|
bids: DataRecord<Bid>[];
|
|
273
274
|
quotes: DataRecord<Quote>[];
|
|
274
275
|
activeQuote?: DataRecord<Quote>;
|
|
@@ -352,6 +353,9 @@ export type SearchOpportunity = {
|
|
|
352
353
|
// Operational supplier for reporting. For SLB clones this is the source vehicle supplier,
|
|
353
354
|
// not the bank supplier on the clone purchase.
|
|
354
355
|
realSupplierId?: string;
|
|
356
|
+
// Branch of the associated vehicle, coalesced from the synced original branch then the
|
|
357
|
+
// local branch — mirrors the vehicle index `custom.originalBranchId` facet.
|
|
358
|
+
originalBranchId?: string;
|
|
355
359
|
};
|
|
356
360
|
};
|
|
357
361
|
|
|
@@ -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"}
|
package/src/types/prospects.ts
CHANGED
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
import { Task } from '@bisondesk/commons-sdk/tasks';
|
|
2
|
-
import { MultiLangValue, NextList } from '@bisondesk/commons-sdk/types';
|
|
2
|
+
import { MultiLangValue, NextList, PaginatedList } from '@bisondesk/commons-sdk/types';
|
|
3
|
+
import { Activity } from './activities.js';
|
|
3
4
|
import { Contact, Organization } from './crm.js';
|
|
4
5
|
import { Interest } from './interests.js';
|
|
5
6
|
import { BaseEvent } from './internal-events.js';
|
|
6
|
-
import {
|
|
7
|
+
import { Offer } from './offers.js';
|
|
8
|
+
import { Opportunity } from './opportunities.js';
|
|
9
|
+
import { BaseSearchRequest, SearchRequest, SortFilter } from './search.js';
|
|
7
10
|
import { DataRecord, ReferenceData } from './utils.js';
|
|
8
11
|
|
|
9
12
|
export enum ProspectActions {
|
|
10
13
|
CLOSE = 'close',
|
|
11
14
|
REOPEN = 'reopen',
|
|
12
15
|
ENGAGE = 'engage',
|
|
16
|
+
// Claiming an unassigned prospect is open to any active sales rep — a deliberate widening of
|
|
17
|
+
// ADR-0013's permission matrix (ADR-0021 §7).
|
|
18
|
+
CLAIM = 'claim',
|
|
13
19
|
SET_METADATA = 'set_metadata',
|
|
14
20
|
SET_OBJECTIVES = 'set_objectives',
|
|
15
21
|
SET_CUSTOMER = 'set_customer',
|
|
@@ -46,20 +52,170 @@ export enum ProspectPriority {
|
|
|
46
52
|
LOW = 'low',
|
|
47
53
|
NORMAL = 'normal',
|
|
48
54
|
HIGH = 'high',
|
|
55
|
+
// "Call me" fast lane (ADR-0021 §8): a manual URGENT prospect sorts ahead of every
|
|
56
|
+
// engine-ranked card. Above NORMAL, priority dominates scoreTier in the "next" cursor.
|
|
57
|
+
URGENT = 'urgent',
|
|
49
58
|
}
|
|
50
59
|
|
|
60
|
+
/**
|
|
61
|
+
* Numeric rank for priority, computed at index time into `custom.priorityRank` so OpenSearch
|
|
62
|
+
* can sort ordinally rather than alphabetically. Higher = more urgent.
|
|
63
|
+
*/
|
|
64
|
+
export const PRIORITY_RANK: Record<ProspectPriority, number> = {
|
|
65
|
+
[ProspectPriority.LOW]: 1,
|
|
66
|
+
[ProspectPriority.NORMAL]: 2,
|
|
67
|
+
[ProspectPriority.HIGH]: 3,
|
|
68
|
+
[ProspectPriority.URGENT]: 4,
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* How a prospect entered the system (ADR-0021 §3). The engine's truncate-and-regenerate
|
|
73
|
+
* delete predicate only ever touches `AUTO` cards, so `MANUAL`/`IMPORT` cards survive
|
|
74
|
+
* regardless of status. `IMPORT` is reserved for the v2 import pipeline — nothing produces
|
|
75
|
+
* it in v1, but it stays in the enum because the discriminator is part of the delete-predicate
|
|
76
|
+
* safety contract.
|
|
77
|
+
*/
|
|
78
|
+
export enum ProspectSource {
|
|
79
|
+
MANUAL = 'manual',
|
|
80
|
+
AUTO = 'auto',
|
|
81
|
+
IMPORT = 'import',
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Discrete ranking band for an auto prospect (ADR-0021 §4). Each generator maps its own raw
|
|
86
|
+
* score into these bands via its own thresholds; the tier — not a raw number — is what the
|
|
87
|
+
* engine persists and the "next" cursor sorts on.
|
|
88
|
+
*/
|
|
89
|
+
export enum ProspectScoreTier {
|
|
90
|
+
COLD = 'cold',
|
|
91
|
+
LUKEWARM = 'lukewarm',
|
|
92
|
+
WARM = 'warm',
|
|
93
|
+
HOT = 'hot',
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Numeric rank for a score tier, computed at index time into `custom.scoreTierRank`
|
|
98
|
+
* (0 = unscored/no tier). Higher = warmer.
|
|
99
|
+
*/
|
|
100
|
+
export const SCORE_TIER_RANK: Record<ProspectScoreTier, number> = {
|
|
101
|
+
[ProspectScoreTier.COLD]: 1,
|
|
102
|
+
[ProspectScoreTier.LUKEWARM]: 2,
|
|
103
|
+
[ProspectScoreTier.WARM]: 3,
|
|
104
|
+
[ProspectScoreTier.HOT]: 4,
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Virtual sort field for search requests: "importance" is the compound priority → tier
|
|
109
|
+
* ranking (ADR-0021 §5). The backend expands it server-side, so clients never spell out
|
|
110
|
+
* the underlying fields.
|
|
111
|
+
*/
|
|
112
|
+
export const PROSPECT_IMPORTANCE_SORT_FIELD = 'prospect.importance';
|
|
113
|
+
|
|
114
|
+
/** One line of the score breakdown recorded for explanation (raw score, thresholds, dampening). */
|
|
115
|
+
export type ProspectScoreDetail = {
|
|
116
|
+
name: string;
|
|
117
|
+
value: number | string;
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Denormalized vehicle display data carried on each candidate vehicle, so the UI can render the
|
|
122
|
+
* anchor and runner-ups without a second fetch. Mirrors `InterestLead.vehicleData` (and extends it
|
|
123
|
+
* with make/model/category/vin), keeping the two card surfaces consistent.
|
|
124
|
+
*/
|
|
125
|
+
export type ProspectVehicleData = {
|
|
126
|
+
title: string;
|
|
127
|
+
mainPictureUrl?: string;
|
|
128
|
+
stockNumber?: string;
|
|
129
|
+
|
|
130
|
+
category: string;
|
|
131
|
+
bodywork?: string;
|
|
132
|
+
makeName: string;
|
|
133
|
+
modelName?: string;
|
|
134
|
+
typeName?: string;
|
|
135
|
+
|
|
136
|
+
used?: boolean; // Vehicle.condition.used — false/absent means new.
|
|
137
|
+
damaged?: boolean;
|
|
138
|
+
|
|
139
|
+
advertisingYear?: number;
|
|
140
|
+
km?: number;
|
|
141
|
+
emissionsClass?: string;
|
|
142
|
+
emissionsSubClass?: string;
|
|
143
|
+
cabinModel?: string;
|
|
144
|
+
configuration?: string;
|
|
145
|
+
vin?: string;
|
|
146
|
+
|
|
147
|
+
// Notable boolean equipment, mirroring Vehicle.accessories (and superstructure.crane).
|
|
148
|
+
features?: {
|
|
149
|
+
adr?: boolean;
|
|
150
|
+
jumbo?: boolean;
|
|
151
|
+
crane?: boolean;
|
|
152
|
+
hydraulicTipperKit?: boolean;
|
|
153
|
+
lowDeck?: boolean;
|
|
154
|
+
retarderIntarder?: boolean;
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
/** A candidate anchor/runner-up vehicle, scored by the lead-engine matcher. */
|
|
159
|
+
export type ProspectVehicleCandidate = {
|
|
160
|
+
vehicleId: string;
|
|
161
|
+
/** Branch that holds this stock. The anchor's branch decides the card's branch (ADR-0021 §2). */
|
|
162
|
+
branchId: string;
|
|
163
|
+
score: number;
|
|
164
|
+
vehicleData: ProspectVehicleData;
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
/** A recommended account manager with an affinity score and the reasons behind it. */
|
|
168
|
+
export type ProspectRecommendedAm = {
|
|
169
|
+
userId: string;
|
|
170
|
+
score: number;
|
|
171
|
+
reasons: string[];
|
|
172
|
+
};
|
|
173
|
+
|
|
51
174
|
export type ProspectObjective = {
|
|
52
175
|
id: string;
|
|
53
176
|
title: MultiLangValue;
|
|
54
177
|
};
|
|
55
178
|
|
|
179
|
+
/**
|
|
180
|
+
* Inline identity for a card whose person/company matches no CRM record yet — the "draft party"
|
|
181
|
+
* of ADR-0021 §9. Carries enough structure to materialise a Contact (first/last name, phone,
|
|
182
|
+
* email) and/or an Organization (orgName, VAT, country) when the draft is converted
|
|
183
|
+
* (`SET_CUSTOMER`, grown). Drafts enter through import or manual entry only — the engine never
|
|
184
|
+
* produces them — and the nightly truncate never touches them.
|
|
185
|
+
*/
|
|
186
|
+
export type ProspectPartyDraft = {
|
|
187
|
+
// contact identity
|
|
188
|
+
firstName?: string;
|
|
189
|
+
lastName?: string;
|
|
190
|
+
phone?: string;
|
|
191
|
+
email?: string;
|
|
192
|
+
// organization identity
|
|
193
|
+
orgName?: string;
|
|
194
|
+
vatNumber?: string;
|
|
195
|
+
countryCode?: string;
|
|
196
|
+
/**
|
|
197
|
+
* Client sector (Tier 1) and sub-industry (Tier 2), captured on the draft so they survive
|
|
198
|
+
* promotion to an Organization. Same picklists and semantics as the Organization fields of the
|
|
199
|
+
* same name (`ORG_INDUSTRY_PICKLIST_ID` / `SUB_INDUSTRY_PICKLIST_ID`).
|
|
200
|
+
*/
|
|
201
|
+
industry?: string;
|
|
202
|
+
subIndustry?: string;
|
|
203
|
+
/**
|
|
204
|
+
* The draft party's interests, embedded on the card — a draft has no CRM record to hang
|
|
205
|
+
* interests on, so they ride the card until conversion copies them onto the linked
|
|
206
|
+
* Contact/Organization (where the lead engine picks them up; embedded ones never feed it).
|
|
207
|
+
*/
|
|
208
|
+
interests?: Interest[];
|
|
209
|
+
};
|
|
210
|
+
|
|
56
211
|
type BaseProspect = {
|
|
57
212
|
contactId?: string;
|
|
58
213
|
organizationId?: string;
|
|
214
|
+
/** Draft-party identity when the card is linked to no Contact/Organization yet (ADR §9). */
|
|
215
|
+
partyDraft?: ProspectPartyDraft;
|
|
59
216
|
branchId: string;
|
|
60
217
|
accountManager?: string;
|
|
61
218
|
priority: ProspectPriority;
|
|
62
|
-
score?: number;
|
|
63
219
|
objectives: ProspectObjective[];
|
|
64
220
|
};
|
|
65
221
|
|
|
@@ -76,6 +232,17 @@ export type Prospect = BaseProspect & {
|
|
|
76
232
|
|
|
77
233
|
status: ProspectStatus;
|
|
78
234
|
|
|
235
|
+
// ── Engine-owned fields (ADR-0021). The manual write path treats these as read-only
|
|
236
|
+
// (Joi.forbidden in the user schemas) so a human edit is never silently overwritten by the
|
|
237
|
+
// next nightly run. `source` is always present on a persisted card; the rest exist only on
|
|
238
|
+
// scored auto cards.
|
|
239
|
+
source: ProspectSource;
|
|
240
|
+
scoreTier?: ProspectScoreTier;
|
|
241
|
+
scoreDetails?: ProspectScoreDetail[];
|
|
242
|
+
/** Ordered by score desc; `vehicles[0]` is the anchor the rep opens the call with. */
|
|
243
|
+
vehicles?: ProspectVehicleCandidate[];
|
|
244
|
+
recommendedAccountManagers?: ProspectRecommendedAm[];
|
|
245
|
+
|
|
79
246
|
attemptingAt?: string;
|
|
80
247
|
attemptingBy?: string;
|
|
81
248
|
engagedAt?: string;
|
|
@@ -93,10 +260,10 @@ export type Prospect = BaseProspect & {
|
|
|
93
260
|
export type ProspectUpdate = {
|
|
94
261
|
contactId?: string | null;
|
|
95
262
|
organizationId?: string | null;
|
|
263
|
+
partyDraft?: ProspectPartyDraft | null;
|
|
96
264
|
branchId?: string;
|
|
97
265
|
accountManager?: string | null;
|
|
98
266
|
priority?: ProspectPriority;
|
|
99
|
-
score?: number | null;
|
|
100
267
|
objectives?: ProspectObjective[];
|
|
101
268
|
|
|
102
269
|
close?: boolean;
|
|
@@ -110,6 +277,19 @@ export type ProspectBff = {
|
|
|
110
277
|
contact?: DataRecord<Contact>;
|
|
111
278
|
org?: DataRecord<Organization>;
|
|
112
279
|
tasks: DataRecord<Task>[];
|
|
280
|
+
|
|
281
|
+
/** All interests in scope: the linked contact/org's, or the draft party's embedded ones. */
|
|
282
|
+
interests: Interest[];
|
|
283
|
+
/** Opportunities for the linked contact/org, deduped by id. */
|
|
284
|
+
opportunities: Opportunity[];
|
|
285
|
+
/** Offers for the linked contact/org, deduped by id, newest first. */
|
|
286
|
+
offers: Offer[];
|
|
287
|
+
/** The other prospect lines on the same contact/org (this one excluded), newest first. */
|
|
288
|
+
relatedProspects: Prospect[];
|
|
289
|
+
/** Most-recent interaction history (first page): the card's own + linked contact/org activities. */
|
|
290
|
+
activities: DataRecord<Activity>[];
|
|
291
|
+
/** Cursor for the next page of the merged activity history; absent when fully loaded. */
|
|
292
|
+
activitiesNextToken?: string;
|
|
113
293
|
};
|
|
114
294
|
|
|
115
295
|
/************
|
|
@@ -134,17 +314,107 @@ export type SearchProspect = {
|
|
|
134
314
|
* Country of the lead, preferring contact country over org country when both are set.
|
|
135
315
|
*/
|
|
136
316
|
country?: string;
|
|
317
|
+
/**
|
|
318
|
+
* Numeric ranks computed at index time so OpenSearch sorts ordinally, not alphabetically
|
|
319
|
+
* (ADR-0021 §4, §5). The "next" cursor sorts priorityRank desc → scoreTierRank desc → id asc.
|
|
320
|
+
*/
|
|
321
|
+
priorityRank: number;
|
|
322
|
+
/** 0 = unscored (no tier yet). */
|
|
323
|
+
scoreTierRank: number;
|
|
324
|
+
/** User ids from `recommendedAccountManagers`, for the "suitable for me" filter (ADR §6). */
|
|
325
|
+
recommendedAmIds?: string[];
|
|
326
|
+
/**
|
|
327
|
+
* Collapse key for grouping by main vehicle (minimizing context switch): the anchor's
|
|
328
|
+
* vehicleId when the card carries vehicles, else the prospect id (a singleton group).
|
|
329
|
+
* Mirrors the opportunities kanban's `custom.groupKey` (group-by-client) convention.
|
|
330
|
+
*/
|
|
331
|
+
groupKey: string;
|
|
332
|
+
};
|
|
333
|
+
/** Task counters denormalized at index time, for kanban/list badges. */
|
|
334
|
+
tasks?: {
|
|
335
|
+
totalTasks: number;
|
|
336
|
+
openTasks: number;
|
|
337
|
+
/** Soonest due date among open tasks. */
|
|
338
|
+
nextDueAt?: string;
|
|
137
339
|
};
|
|
138
340
|
};
|
|
139
341
|
|
|
342
|
+
/************
|
|
343
|
+
*
|
|
344
|
+
* Claim
|
|
345
|
+
*/
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Returned with HTTP 409 when a guarded claim finds the prospect already owned (a lost race). On
|
|
349
|
+
* success the endpoint returns the claimed `DataRecord<Prospect>` with 200 instead (ADR-0021 §7).
|
|
350
|
+
*/
|
|
351
|
+
export type ProspectClaimConflict = {
|
|
352
|
+
claimed: false;
|
|
353
|
+
accountManager?: string;
|
|
354
|
+
};
|
|
355
|
+
|
|
356
|
+
/************
|
|
357
|
+
*
|
|
358
|
+
* Next cursor / play mode
|
|
359
|
+
*/
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* The "next prospect" cursor (ADR-0021 §5). Accepts the same filter body as the list search, so
|
|
363
|
+
* "next" walks the rep's current view. Only the filter-defining fields are honored — sort, paging
|
|
364
|
+
* size and `nextToken` are owned by the endpoint (fixed priority→tier sort, `cursor` below). `cursor`
|
|
365
|
+
* is an opaque token embedding the sort position and a hash of the filters — it is rejected if the
|
|
366
|
+
* filter set changed. `claim: true` is play mode: the next matching unassigned card is served and
|
|
367
|
+
* claimed atomically (ADR §7).
|
|
368
|
+
*/
|
|
369
|
+
export type ProspectNextRequest = Pick<SearchRequest, 'fullText' | 'query' | 'geoFilters'> & {
|
|
370
|
+
cursor?: string;
|
|
371
|
+
claim?: boolean;
|
|
372
|
+
/**
|
|
373
|
+
* Serve cards grouped by main vehicle (minimizing context switch): all matching cards anchored
|
|
374
|
+
* on the same vehicle come consecutively before "next" moves to the following vehicle group.
|
|
375
|
+
*/
|
|
376
|
+
groupByVehicle?: boolean;
|
|
377
|
+
};
|
|
378
|
+
|
|
379
|
+
export type ProspectNextResponse = {
|
|
380
|
+
result?: SearchProspect;
|
|
381
|
+
cursor?: string;
|
|
382
|
+
meta: ReferenceData;
|
|
383
|
+
};
|
|
384
|
+
|
|
385
|
+
/** A main-vehicle group (ES collapse on `custom.groupKey`), shared by kanban and list. */
|
|
386
|
+
export type ProspectVehicleGroup = {
|
|
387
|
+
representative: SearchProspect;
|
|
388
|
+
items: SearchProspect[];
|
|
389
|
+
};
|
|
390
|
+
|
|
391
|
+
/** Flat list search, optionally collapsed by the card's main vehicle. */
|
|
392
|
+
export type ProspectsSearchRequest = SearchRequest & {
|
|
393
|
+
/** Collapse on `custom.groupKey`: the page then streams GROUPS (offset-paged), not rows. */
|
|
394
|
+
groupByVehicle?: boolean;
|
|
395
|
+
};
|
|
396
|
+
|
|
397
|
+
export type ProspectsSearchResponse = PaginatedList<SearchProspect, ReferenceData> & {
|
|
398
|
+
/**
|
|
399
|
+
* Populated only when `groupByVehicle` is requested; `results` is then empty and
|
|
400
|
+
* `totalCount` counts groups (collapse cardinality), not rows.
|
|
401
|
+
*/
|
|
402
|
+
groups?: ProspectVehicleGroup[];
|
|
403
|
+
};
|
|
404
|
+
|
|
140
405
|
/************
|
|
141
406
|
*
|
|
142
407
|
* Kanban
|
|
143
408
|
*/
|
|
144
409
|
|
|
410
|
+
/** A main-vehicle group inside a kanban column when `groupByVehicle` is on. */
|
|
411
|
+
export type KanbanProspectGroup = ProspectVehicleGroup;
|
|
412
|
+
|
|
145
413
|
export type ProspectsKanbanColumn = {
|
|
146
414
|
status: string;
|
|
147
415
|
results: SearchProspect[];
|
|
416
|
+
/** Populated only when `groupByVehicle` is requested; `results` is then empty. */
|
|
417
|
+
groups?: KanbanProspectGroup[];
|
|
148
418
|
totalCount: number;
|
|
149
419
|
};
|
|
150
420
|
|
|
@@ -155,6 +425,13 @@ export type MSearchProspectsKanbanColumn = {
|
|
|
155
425
|
|
|
156
426
|
export type KanbanProspectsSearchRequest = BaseSearchRequest & {
|
|
157
427
|
nextTokens?: Record<string, string | undefined>;
|
|
428
|
+
/** Collapse each column by the card's main vehicle (mirrors opportunities' group-by-client). */
|
|
429
|
+
groupByVehicle?: boolean;
|
|
430
|
+
/**
|
|
431
|
+
* Per-column sort overrides, keyed by prospect status. Unlisted columns keep their defaults:
|
|
432
|
+
* the nurture column sorts by the priority→tier "next" order, the rest newest-first.
|
|
433
|
+
*/
|
|
434
|
+
statusSortBy?: Partial<Record<ProspectStatus, SortFilter[]>>;
|
|
158
435
|
};
|
|
159
436
|
|
|
160
437
|
export type KanbanProspectsNextList = Omit<
|
|
@@ -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":""}
|
|
@@ -99,6 +99,13 @@ export type LeasingOverdueBucket = {
|
|
|
99
99
|
amount: number;
|
|
100
100
|
};
|
|
101
101
|
|
|
102
|
+
export type LeasingInvoicedBucket = {
|
|
103
|
+
/** `YYYY-MM` month. */
|
|
104
|
+
month: string;
|
|
105
|
+
/** Net invoiced rent (invoices − credit notes, excl VAT) issued in that month. */
|
|
106
|
+
amount: number;
|
|
107
|
+
};
|
|
108
|
+
|
|
102
109
|
export type LeasingReportResponse = {
|
|
103
110
|
period: {
|
|
104
111
|
key: LeasingPeriodKey;
|
|
@@ -173,6 +180,8 @@ export type LeasingReportResponse = {
|
|
|
173
180
|
cumulativeContracts: LeasingCumulativeBucket[];
|
|
174
181
|
/** Fixed trailing-6-month overdue rent amount (excl VAT), as of each month-end. */
|
|
175
182
|
overdueHistory: LeasingOverdueBucket[];
|
|
183
|
+
/** Net invoiced rent (excl VAT) by issue month, from a fixed start (Jan 2025) to now. */
|
|
184
|
+
invoicedHistory: LeasingInvoicedBucket[];
|
|
176
185
|
/** Track-and-trace fleet usage over the window. */
|
|
177
186
|
fleet: {
|
|
178
187
|
/**
|