@bisondesk/core-sdk 1.0.460 → 1.0.462

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.
@@ -0,0 +1,94 @@
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 || (PurchaseActions = {}));
94
+ //# sourceMappingURL=vehicles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,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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,eAQX;AARD,WAAY,eAAe;IACzB,yCAAsB,CAAA;IACtB,0EAAuD,CAAA;IACvD,+CAA4B,CAAA;IAC5B,0DAAuC,CAAA;IACvC,4DAAyC,CAAA;IACzC,8DAA2C,CAAA;IAC3C,kEAA+C,CAAA;AACjD,CAAC,EARW,eAAe,KAAf,eAAe,QAQ1B"}
@@ -547,7 +547,9 @@ export type VehicleBff = {
547
547
  sale?: VehicleSaleInfo;
548
548
  purchase?: VehiclePurchase;
549
549
  marketing?: {
550
- isPublished: boolean;
550
+ listed: boolean;
551
+ sharable: boolean;
552
+ publishedOnWebsiteAt?: string;
551
553
  numPlatformsPublished: number;
552
554
  };
553
555
  };
@@ -0,0 +1,48 @@
1
+ import { OpportunityStatus, OpportunityStatusOrder } from '../types/opportunities.js';
2
+ const compareOpportunityStatus = (input) => {
3
+ const { currentStatus, referenceStatus } = input;
4
+ const currentStatusIdx = OpportunityStatusOrder.indexOf(currentStatus);
5
+ const referenceStatusIdx = OpportunityStatusOrder.indexOf(referenceStatus);
6
+ return {
7
+ currentStatusIdx,
8
+ referenceStatusIdx,
9
+ };
10
+ };
11
+ export const getPreviousStatus = (currentStatus) => {
12
+ const currentIndex = OpportunityStatusOrder.indexOf(currentStatus);
13
+ if (currentIndex === 0) {
14
+ return;
15
+ }
16
+ return OpportunityStatusOrder[currentIndex - 1];
17
+ };
18
+ export const getNextStatus = (status) => {
19
+ const statusIndex = OpportunityStatusOrder.indexOf(status);
20
+ if (statusIndex >= OpportunityStatusOrder.length - 1) {
21
+ return;
22
+ }
23
+ return OpportunityStatusOrder[statusIndex + 1];
24
+ };
25
+ export const isSameOrAfterReferenceOpportunityStatus = (input) => {
26
+ const { currentStatusIdx, referenceStatusIdx } = compareOpportunityStatus(input);
27
+ return currentStatusIdx >= referenceStatusIdx;
28
+ };
29
+ export const isAfterReferenceOpportunityStatus = (input) => {
30
+ const { currentStatusIdx, referenceStatusIdx } = compareOpportunityStatus(input);
31
+ return currentStatusIdx > referenceStatusIdx;
32
+ };
33
+ export const isSameOrBeforeReferenceOpportunityStatus = (input) => {
34
+ const { currentStatusIdx, referenceStatusIdx } = compareOpportunityStatus(input);
35
+ return currentStatusIdx <= referenceStatusIdx;
36
+ };
37
+ export const isBeforeReferenceOpportunityStatus = (input) => {
38
+ const { currentStatusIdx, referenceStatusIdx } = compareOpportunityStatus(input);
39
+ return currentStatusIdx < referenceStatusIdx;
40
+ };
41
+ export const isOpportunityLost = (input) => input.lostAt != null;
42
+ export const getOpportunityReservedStatus = () => [
43
+ OpportunityStatus.REVIEW,
44
+ OpportunityStatus.PREPARATION,
45
+ OpportunityStatus.DELIVERY,
46
+ ];
47
+ export const isOpportunityReserved = (input) => getOpportunityReservedStatus().includes(input.status);
48
+ //# sourceMappingURL=opportunities.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"opportunities.js","sourceRoot":"","sources":["opportunities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAOnG,MAAM,wBAAwB,GAAG,CAAC,KAAmB,EAAE,EAAE;IACvD,MAAM,EAAE,aAAa,EAAE,eAAe,EAAE,GAAG,KAAK,CAAC;IAEjD,MAAM,gBAAgB,GAAG,sBAAsB,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IACvE,MAAM,kBAAkB,GAAG,sBAAsB,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;IAE3E,OAAO;QACL,gBAAgB;QAChB,kBAAkB;KACnB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,aAAgC,EACD,EAAE;IACjC,MAAM,YAAY,GAAG,sBAAsB,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IACnE,IAAI,YAAY,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO;IACT,CAAC;IACD,OAAO,sBAAsB,CAAC,YAAY,GAAG,CAAC,CAAC,CAAC;AAClD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,MAAyB,EAAiC,EAAE;IACxF,MAAM,WAAW,GAAG,sBAAsB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC3D,IAAI,WAAW,IAAI,sBAAsB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACrD,OAAO;IACT,CAAC;IACD,OAAO,sBAAsB,CAAC,WAAW,GAAG,CAAC,CAAC,CAAC;AACjD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,uCAAuC,GAAG,CAAC,KAAmB,EAAW,EAAE;IACtF,MAAM,EAAE,gBAAgB,EAAE,kBAAkB,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