@bisondesk/core-sdk 1.0.603 → 1.0.605

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.
Files changed (94) hide show
  1. package/lib/types/activities.d.ts +1 -0
  2. package/lib/types/activities.d.ts.map +1 -1
  3. package/lib/types/activities.js.map +1 -1
  4. package/lib/types/crm.d.ts +1 -0
  5. package/lib/types/crm.d.ts.map +1 -1
  6. package/lib/types/crm.js.map +1 -1
  7. package/lib/types/reports-sales.d.ts +67 -0
  8. package/lib/types/reports-sales.d.ts.map +1 -0
  9. package/lib/types/reports-sales.js +13 -0
  10. package/lib/types/reports-sales.js.map +1 -0
  11. package/lib/types/tenants.d.ts +2 -1
  12. package/lib/types/tenants.d.ts.map +1 -1
  13. package/lib/types/tenants.js +1 -0
  14. package/lib/types/tenants.js.map +1 -1
  15. package/lib/types/user-performance.d.ts +1 -1
  16. package/lib/types/user-performance.d.ts.map +1 -1
  17. package/lib/types/user-performance.js.map +1 -1
  18. package/package.json +1 -1
  19. package/src/types/activities.js +13 -0
  20. package/src/types/activities.js.map +1 -0
  21. package/src/types/activities.ts +1 -0
  22. package/src/types/comparables.js +2 -0
  23. package/src/types/comparables.js.map +1 -0
  24. package/src/types/crm.js +58 -0
  25. package/src/types/crm.js.map +1 -0
  26. package/src/types/crm.ts +1 -0
  27. package/src/types/dashboard.js +2 -0
  28. package/src/types/dashboard.js.map +1 -0
  29. package/src/types/definitions.js +2 -0
  30. package/src/types/definitions.js.map +1 -0
  31. package/src/types/fields.js +2 -0
  32. package/src/types/fields.js.map +1 -0
  33. package/src/types/insights.js +2 -0
  34. package/src/types/insights.js.map +1 -0
  35. package/src/types/interests.js +6 -0
  36. package/src/types/interests.js.map +1 -0
  37. package/src/types/internal-events.js +18 -0
  38. package/src/types/internal-events.js.map +1 -0
  39. package/src/types/internet-opportunities.js +2 -0
  40. package/src/types/internet-opportunities.js.map +1 -0
  41. package/src/types/internet-vehicles.js +2 -0
  42. package/src/types/internet-vehicles.js.map +1 -0
  43. package/src/types/leasing-administration.js +2 -0
  44. package/src/types/leasing-administration.js.map +1 -0
  45. package/src/types/leasing-debtors.js +2 -0
  46. package/src/types/leasing-debtors.js.map +1 -0
  47. package/src/types/leasing-search.js +2 -0
  48. package/src/types/leasing-search.js.map +1 -0
  49. package/src/types/leasing-settings.js +7 -0
  50. package/src/types/leasing-settings.js.map +1 -0
  51. package/src/types/leasing.js +38 -0
  52. package/src/types/leasing.js.map +1 -0
  53. package/src/types/marketing.js +35 -0
  54. package/src/types/marketing.js.map +1 -0
  55. package/src/types/offers.js +56 -0
  56. package/src/types/opportunities.js +107 -0
  57. package/src/types/opportunities.js.map +1 -0
  58. package/src/types/payments.js +7 -0
  59. package/src/types/picklists.js +2 -0
  60. package/src/types/picklists.js.map +1 -0
  61. package/src/types/quotes.js +42 -0
  62. package/src/types/recently-viewed.js +2 -0
  63. package/src/types/recently-viewed.js.map +1 -0
  64. package/src/types/reports-sales.ts +126 -0
  65. package/src/types/reservations.js +5 -0
  66. package/src/types/reservations.js.map +1 -0
  67. package/src/types/roi-ratings.js +5 -0
  68. package/src/types/roi-ratings.js.map +1 -0
  69. package/src/types/saved-filters.js +9 -0
  70. package/src/types/saved-filters.js.map +1 -0
  71. package/src/types/search.js +2 -0
  72. package/src/types/search.js.map +1 -0
  73. package/src/types/settings.js +2 -0
  74. package/src/types/settings.js.map +1 -0
  75. package/src/types/templates.js +2 -0
  76. package/src/types/templates.js.map +1 -0
  77. package/src/types/tenants.js +21 -0
  78. package/src/types/tenants.js.map +1 -0
  79. package/src/types/tenants.ts +1 -0
  80. package/src/types/user-performance.js +7 -0
  81. package/src/types/user-performance.js.map +1 -0
  82. package/src/types/user-performance.ts +15 -3
  83. package/src/types/utils.js +2 -0
  84. package/src/types/validation.js +2 -0
  85. package/src/types/validation.js.map +1 -0
  86. package/src/types/vehicle-sales.js +6 -0
  87. package/src/types/vehicle-sales.js.map +1 -0
  88. package/src/types/vehicles.js +98 -0
  89. package/src/types/vehicles.js.map +1 -0
  90. package/src/utils/leasing.js +6 -0
  91. package/src/utils/leasing.js.map +1 -0
  92. package/src/utils/opportunities.js +48 -0
  93. package/src/utils/opportunities.js.map +1 -0
  94. package/tsconfig.tsbuildinfo +1 -1
@@ -0,0 +1,38 @@
1
+ export var LeasingContractActions;
2
+ (function (LeasingContractActions) {
3
+ LeasingContractActions["CREATE_FINANCE_DOCUMENT"] = "create_finance_document";
4
+ LeasingContractActions["START_RETAKE_VEHICLE"] = "start_retake_vehicle";
5
+ LeasingContractActions["END_RETAKE_VEHICLE"] = "end_retake_vehicle";
6
+ LeasingContractActions["START_CONTRACT_END"] = "start_contract_end";
7
+ LeasingContractActions["END_CONTRACT"] = "end_contract";
8
+ LeasingContractActions["CANCEL_RETAKE_VEHICLE"] = "cancel_retake_vehicle";
9
+ })(LeasingContractActions || (LeasingContractActions = {}));
10
+ export var LeasingContractSource;
11
+ (function (LeasingContractSource) {
12
+ LeasingContractSource["HYPERPORTAL"] = "hyperportal";
13
+ LeasingContractSource["BISONDESK"] = "bisondesk";
14
+ })(LeasingContractSource || (LeasingContractSource = {}));
15
+ export var LeasingContractStatus;
16
+ (function (LeasingContractStatus) {
17
+ LeasingContractStatus["DRAFT"] = "draft";
18
+ LeasingContractStatus["DISCARDED"] = "discarded";
19
+ LeasingContractStatus["PAUSED"] = "paused";
20
+ LeasingContractStatus["ACTIVE"] = "active";
21
+ LeasingContractStatus["LEASING_RETURN"] = "leasing_return";
22
+ LeasingContractStatus["RECOVERED"] = "recovered";
23
+ LeasingContractStatus["ENDING"] = "ending";
24
+ LeasingContractStatus["ENDED"] = "ended";
25
+ })(LeasingContractStatus || (LeasingContractStatus = {}));
26
+ export var LeasingRemindersSortableColumns;
27
+ (function (LeasingRemindersSortableColumns) {
28
+ LeasingRemindersSortableColumns["NextActionAt"] = "next_action_at";
29
+ LeasingRemindersSortableColumns["OrganizationName"] = "organization_name";
30
+ LeasingRemindersSortableColumns["RemindersCount"] = "reminders_count";
31
+ LeasingRemindersSortableColumns["Status"] = "status";
32
+ })(LeasingRemindersSortableColumns || (LeasingRemindersSortableColumns = {}));
33
+ export var LEASING_EXPORT_TYPES;
34
+ (function (LEASING_EXPORT_TYPES) {
35
+ LEASING_EXPORT_TYPES["RENTAL_SOLUTIONS"] = "rental-solutions";
36
+ LEASING_EXPORT_TYPES["DEFAULT"] = "default";
37
+ })(LEASING_EXPORT_TYPES || (LEASING_EXPORT_TYPES = {}));
38
+ //# sourceMappingURL=leasing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"leasing.js","sourceRoot":"","sources":["leasing.ts"],"names":[],"mappings":"AAKA,MAAM,CAAN,IAAY,sBAOX;AAPD,WAAY,sBAAsB;IAChC,6EAAmD,CAAA;IACnD,uEAA6C,CAAA;IAC7C,mEAAyC,CAAA;IACzC,mEAAyC,CAAA;IACzC,uDAA6B,CAAA;IAC7B,yEAA+C,CAAA;AACjD,CAAC,EAPW,sBAAsB,KAAtB,sBAAsB,QAOjC;AA8DD,MAAM,CAAN,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC/B,oDAA2B,CAAA;IAC3B,gDAAuB,CAAA;AACzB,CAAC,EAHW,qBAAqB,KAArB,qBAAqB,QAGhC;AAED,MAAM,CAAN,IAAY,qBASX;AATD,WAAY,qBAAqB;IAC/B,wCAAe,CAAA;IACf,gDAAuB,CAAA;IACvB,0CAAiB,CAAA;IACjB,0CAAiB,CAAA;IACjB,0DAAiC,CAAA;IACjC,gDAAuB,CAAA;IACvB,0CAAiB,CAAA;IACjB,wCAAe,CAAA;AACjB,CAAC,EATW,qBAAqB,KAArB,qBAAqB,QAShC;AAuQD,MAAM,CAAN,IAAY,+BAKX;AALD,WAAY,+BAA+B;IACzC,kEAA+B,CAAA;IAC/B,yEAAsC,CAAA;IACtC,qEAAkC,CAAA;IAClC,oDAAiB,CAAA;AACnB,CAAC,EALW,+BAA+B,KAA/B,+BAA+B,QAK1C;AAgGD,MAAM,CAAN,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC9B,6DAAqC,CAAA;IACrC,2CAAmB,CAAA;AACrB,CAAC,EAHW,oBAAoB,KAApB,oBAAoB,QAG/B"}
@@ -0,0 +1,35 @@
1
+ export var MarketingPlatform;
2
+ (function (MarketingPlatform) {
3
+ MarketingPlatform["autoscout24"] = "autoscout24";
4
+ MarketingPlatform["autoline"] = "autoline";
5
+ MarketingPlatform["exportseller"] = "exportseller";
6
+ MarketingPlatform["machineryplanet"] = "machineryplanet";
7
+ MarketingPlatform["machinetrack"] = "machinetrack";
8
+ MarketingPlatform["marktnet"] = "marktnet";
9
+ MarketingPlatform["mobile"] = "mobile";
10
+ MarketingPlatform["truck1st"] = "truck1st";
11
+ MarketingPlatform["trucks"] = "trucks";
12
+ MarketingPlatform["truckscout"] = "truckscout24";
13
+ MarketingPlatform["tweedehandsbe"] = "2ehandsbe";
14
+ MarketingPlatform["viamobilis"] = "planettrucks";
15
+ MarketingPlatform["youtube"] = "youtube";
16
+ })(MarketingPlatform || (MarketingPlatform = {}));
17
+ export var MarketingEventStatus;
18
+ (function (MarketingEventStatus) {
19
+ MarketingEventStatus["Scheduled"] = "scheduled";
20
+ MarketingEventStatus["Processing"] = "processing";
21
+ MarketingEventStatus["Skipped"] = "skipped";
22
+ MarketingEventStatus["Error"] = "error";
23
+ MarketingEventStatus["Sent"] = "processed";
24
+ })(MarketingEventStatus || (MarketingEventStatus = {}));
25
+ export var MarketingEventType;
26
+ (function (MarketingEventType) {
27
+ MarketingEventType["PriceDrop"] = "price-drop";
28
+ MarketingEventType["PartnerOffer"] = "partner-offer";
29
+ })(MarketingEventType || (MarketingEventType = {}));
30
+ export var MarketingMessageChannelType;
31
+ (function (MarketingMessageChannelType) {
32
+ MarketingMessageChannelType["Whatsapp"] = "whatsapp";
33
+ MarketingMessageChannelType["Email"] = "email";
34
+ })(MarketingMessageChannelType || (MarketingMessageChannelType = {}));
35
+ //# sourceMappingURL=marketing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"marketing.js","sourceRoot":"","sources":["marketing.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,iBAcX;AAdD,WAAY,iBAAiB;IAC3B,gDAA2B,CAAA;IAC3B,0CAAqB,CAAA;IACrB,kDAA6B,CAAA;IAC7B,wDAAmC,CAAA;IACnC,kDAA6B,CAAA;IAC7B,0CAAqB,CAAA;IACrB,sCAAiB,CAAA;IACjB,0CAAqB,CAAA;IACrB,sCAAiB,CAAA;IACjB,gDAA2B,CAAA;IAC3B,gDAA2B,CAAA;IAC3B,gDAA2B,CAAA;IAC3B,wCAAmB,CAAA;AACrB,CAAC,EAdW,iBAAiB,KAAjB,iBAAiB,QAc5B;AA8DD,MAAM,CAAN,IAAY,oBAMX;AAND,WAAY,oBAAoB;IAC9B,+CAAuB,CAAA;IACvB,iDAAyB,CAAA;IACzB,2CAAmB,CAAA;IACnB,uCAAe,CAAA;IACf,0CAAkB,CAAA;AACpB,CAAC,EANW,oBAAoB,KAApB,oBAAoB,QAM/B;AAED,MAAM,CAAN,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,8CAAwB,CAAA;IACxB,oDAA8B,CAAA;AAChC,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B;AAED,MAAM,CAAN,IAAY,2BAGX;AAHD,WAAY,2BAA2B;IACrC,oDAAqB,CAAA;IACrB,8CAAe,CAAA;AACjB,CAAC,EAHW,2BAA2B,KAA3B,2BAA2B,QAGtC"}
@@ -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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"}
@@ -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,2 @@
1
+ export * from '@bisondesk/commons-sdk/picklists';
2
+ //# sourceMappingURL=picklists.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,2 @@
1
+ export {};
2
+ //# sourceMappingURL=recently-viewed.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recently-viewed.js","sourceRoot":"","sources":["recently-viewed.ts"],"names":[],"mappings":""}
@@ -0,0 +1,126 @@
1
+ /**
2
+ * Sales report — the payload for the `Reports → Sales` tab. Everything is computed
3
+ * from the per-tenant `opportunities` OpenSearch index, keyed on
4
+ * `opportunity.reviewedAt` (the moment an opportunity ENTERS Preparation — our
5
+ * "sale" event; `preparedAt` is when it leaves Preparation into Delivery).
6
+ *
7
+ * The API returns raw numbers only; the client formats (€, %, pp, "younger") and
8
+ * colors the deltas.
9
+ */
10
+
11
+ /**
12
+ * Period presets driving every metric except the fixed 18-month histogram, in
13
+ * selector order. Single source of truth — `SalesPeriodKey` is derived from it.
14
+ * `mtd`/`ytd` are to-date ranges (start of month/year → now); `lastMonth`/`lastYear`
15
+ * are the previous complete calendar month/year.
16
+ */
17
+ export const SALES_PERIOD_KEYS = [
18
+ '30d',
19
+ '45d',
20
+ '60d',
21
+ '90d',
22
+ 'lastMonth',
23
+ 'mtd',
24
+ 'ytd',
25
+ 'lastYear',
26
+ '12m',
27
+ ] as const;
28
+
29
+ export type SalesPeriodKey = (typeof SALES_PERIOD_KEYS)[number];
30
+
31
+ export const DEFAULT_SALES_PERIOD: SalesPeriodKey = 'mtd';
32
+
33
+ export type SalesReportRequest = { period: SalesPeriodKey };
34
+
35
+ /**
36
+ * A metric for the selected window with its year-over-year counterpart.
37
+ * - `value`: current window (null when undefined, e.g. no data / no median).
38
+ * - `prev`: same metric in the window shifted back exactly one year.
39
+ * - `pct`: fractional change `(value - prev) / prev` (null when prev is 0 or
40
+ * either side is undefined). The client renders/colors the delta.
41
+ */
42
+ export type YoyMetric = { value: number | null; prev: number | null; pct: number | null };
43
+
44
+ /** Tenure buckets for returning-customer analysis (share of buyers in the window). */
45
+ export type TenureBucketKey = '2y' | '1-2y' | '<1y' | 'new';
46
+
47
+ export type TenureBucket = {
48
+ bucket: TenureBucketKey;
49
+ /** Share of buyers in this bucket, 0–100. */
50
+ sharePct: number;
51
+ /** Year-over-year change in this share, as a fractional relative change (null when no prior data). */
52
+ yoyPct: number | null;
53
+ };
54
+
55
+ export type SalesReportCountry = {
56
+ /** ISO country code (lowercase) from `org.countryCode`. */
57
+ code: string;
58
+ units: number;
59
+ yoyPct: number | null;
60
+ };
61
+
62
+ export type SalesReportSalesperson = {
63
+ /** User id from `opportunity.accountManager`; the client resolves name + avatar. */
64
+ id: string;
65
+ units: number;
66
+ yoyPct: number | null;
67
+ };
68
+
69
+ /** A conglomerate-flagged organization (there is no group/parent model — each org stands alone). */
70
+ export type SalesReportConglomerateOrg = {
71
+ /** `org.id`. */
72
+ id: string;
73
+ /** `org.name` (resolved server-side); falls back to the id when missing. */
74
+ name: string;
75
+ units: number;
76
+ yoyPct: number | null;
77
+ };
78
+
79
+ export type SalesReportConglomerate = {
80
+ /** Share of units going to conglomerate-flagged customers, 0–100 (null when no sales). */
81
+ sharePct: number | null;
82
+ /** Year-over-year change in that share, as a fractional relative change (null when no prior data). */
83
+ yoyPct: number | null;
84
+ /** The conglomerate share in the year-ago window, 0–100. */
85
+ lastYearPct: number | null;
86
+ /** Top conglomerate-flagged organizations by units in the current window. */
87
+ orgs: SalesReportConglomerateOrg[];
88
+ };
89
+
90
+ export type SalesReportHistogramBucket = {
91
+ /** Calendar month, `YYYY-MM`. */
92
+ month: string;
93
+ count: number;
94
+ };
95
+
96
+ export type SalesReportResponse = {
97
+ period: {
98
+ key: SalesPeriodKey;
99
+ /** Current window, half-open `[start, end)` (ISO strings). */
100
+ start: string;
101
+ end: string;
102
+ /** Number of days in the window (the `salesPerDay` denominator). */
103
+ days: number;
104
+ /** Year-ago window `[yoyStart, yoyEnd)`. */
105
+ yoyStart: string;
106
+ yoyEnd: string;
107
+ };
108
+ /** All-types overview KPIs. `medianAge` is in years (a decrease is good — younger stock). */
109
+ overview: {
110
+ salesPerDay: YoyMetric;
111
+ salesTotal: YoyMetric;
112
+ medianRoi: YoyMetric;
113
+ medianPrice: YoyMetric;
114
+ medianAge: YoyMetric;
115
+ uniqueCustomers: YoyMetric;
116
+ };
117
+ /** Top countries by units in the current window. */
118
+ countries: SalesReportCountry[];
119
+ /** All sales people with units in either window (capped; the client list scrolls). */
120
+ salespeople: SalesReportSalesperson[];
121
+ /** Returning-customer tenure shares (4 buckets). */
122
+ returning: TenureBucket[];
123
+ conglomerate: SalesReportConglomerate;
124
+ /** Fixed last-18-calendar-months histogram of opps into Preparation (period-independent). */
125
+ histogram: SalesReportHistogramBucket[];
126
+ };
@@ -0,0 +1,5 @@
1
+ export var ReservationActions;
2
+ (function (ReservationActions) {
3
+ ReservationActions["SET_RESERVATION_EXPIRE"] = "update_expires_at";
4
+ })(ReservationActions || (ReservationActions = {}));
5
+ //# sourceMappingURL=reservations.js.map
@@ -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,5 @@
1
+ export var DisplayType;
2
+ (function (DisplayType) {
3
+ DisplayType["StarsRating"] = "stars-rating";
4
+ })(DisplayType || (DisplayType = {}));
5
+ //# sourceMappingURL=roi-ratings.js.map
@@ -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,2 @@
1
+ export * from '@bisondesk/commons-sdk/search';
2
+ //# sourceMappingURL=search.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.js","sourceRoot":"","sources":["search.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.js","sourceRoot":"","sources":["settings.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=templates.js.map
@@ -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"}
@@ -33,6 +33,7 @@ export enum TenantModule {
33
33
  WhatsappNotifications = 'whatsapp_notifications',
34
34
  Hexon = 'hexon',
35
35
  Transport = 'transport',
36
+ Reports = 'reports',
36
37
  }
37
38
 
38
39
  export type Tenant = PublicTenant & {
@@ -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"}
@@ -1,5 +1,7 @@
1
- // The commission can be expressed either as a percentage (for profit-based metrics)
2
- // or as an amount per unit (for unit-based metrics).
1
+ // The commission can be expressed either as a percentage (for profit-based metrics),
2
+ // as an amount per unit (for unit-based metrics), or as a per-deal bucket reward
3
+ // (for metrics where each qualifying record earns a flat amount based on which tier
4
+ // range it falls into — see 'bucket' below).
3
5
  import { AttachmentValue } from '@bisondesk/commons-sdk/types';
4
6
 
5
7
  export enum CommissionSetting {
@@ -14,7 +16,14 @@ export enum CommissionTeam {
14
16
  LEASING = 'leasing_team',
15
17
  }
16
18
 
17
- export type CommissionType = 'percentage' | 'unit';
19
+ // - 'percentage': commission = value * rate / 100 (value is a money sum, rate is a %)
20
+ // - 'unit': commission = value * rate (value is a count, rate is € per unit)
21
+ // - 'bucket': non-cumulative per-deal reward. Each qualifying record is classified
22
+ // into the tier whose [lowerBound, upperBound] range contains a measured
23
+ // attribute (e.g. days until payment), and earns that tier's
24
+ // commissionRate (€). The metric value is the already-summed € reward, so
25
+ // the commission engine treats it as a passthrough (no marginal stacking).
26
+ export type CommissionType = 'percentage' | 'unit' | 'bucket';
18
27
 
19
28
  // Comprehensive metric configuration
20
29
  export type MetricConfig = {
@@ -31,6 +40,9 @@ export type MetricConfig = {
31
40
 
32
41
  // A tier defines a range of performance (using lower and optional upper bounds)
33
42
  // along with the associated commission rate. For example, 0–100 units, then 100–400 units, etc.
43
+ // For 'bucket' metrics the bounds describe the measured attribute (e.g. days until payment:
44
+ // 0–7, 8–30, 30+) and commissionRate is the flat € awarded per qualifying deal in that range;
45
+ // tiers are matched in order, first match wins, so overlapping bounds resolve to the first tier.
34
46
  export type CommissionTier = {
35
47
  lowerBound: number; // inclusive
36
48
  upperBound?: number; // inclusive (omit for the last tier)
@@ -0,0 +1,2 @@
1
+ export * from '@bisondesk/commons-sdk/utils';
2
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=validation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.js","sourceRoot":"","sources":["validation.ts"],"names":[],"mappings":""}
@@ -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"}