@bisondesk/core-sdk 1.0.524 → 1.0.526
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 +1 -0
- package/lib/constants.d.ts.map +1 -1
- package/lib/constants.js +1 -0
- package/lib/constants.js.map +1 -1
- package/lib/types/internal-events.d.ts +2 -1
- package/lib/types/internal-events.d.ts.map +1 -1
- package/lib/types/internal-events.js +1 -0
- package/lib/types/internal-events.js.map +1 -1
- package/lib/types/leasing.d.ts +2 -1
- package/lib/types/leasing.d.ts.map +1 -1
- package/lib/types/leasing.js +1 -0
- package/lib/types/leasing.js.map +1 -1
- package/lib/types/quotes.d.ts +3 -0
- package/lib/types/quotes.d.ts.map +1 -1
- package/lib/types/quotes.js.map +1 -1
- package/lib/types/vehicle-performance.d.ts +10 -0
- package/lib/types/vehicle-performance.d.ts.map +1 -1
- package/lib/types/vehicle-performance.js.map +1 -1
- package/package.json +1 -1
- package/src/constants.ts +1 -0
- package/src/types/internal-events.ts +1 -0
- package/src/types/leasing.ts +2 -4
- package/src/types/quotes.ts +3 -0
- package/src/types/vehicle-performance.ts +14 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vehicle-performance.js","sourceRoot":"/","sources":["types/vehicle-performance.ts"],"names":[],"mappings":"","sourcesContent":["import { OpportunityType } from '../constants.js';\nimport { VehicleSaleDealStatus, VehicleSaleLogisticsStatus } from './opportunities.js';\nimport {\n VehiclePurchaseDealStatus,\n VehiclePurchaseLogisticsStatus,\n VehicleRoles,\n} from './vehicles.js';\nimport {
|
|
1
|
+
{"version":3,"file":"vehicle-performance.js","sourceRoot":"/","sources":["types/vehicle-performance.ts"],"names":[],"mappings":"","sourcesContent":["import { OpportunityType } from '../constants.js';\nimport { VehicleSaleDealStatus, VehicleSaleLogisticsStatus } from './opportunities.js';\nimport {\n VehiclePurchaseDealStatus,\n VehiclePurchaseLogisticsStatus,\n VehicleRoles,\n} from './vehicles.js';\nimport { BaseEvent } from './internal-events.js';\n\nexport type VehicleSaleOverview = {\n opportunityId: string;\n type: OpportunityType;\n userId: string; // account manager of the latest opportunity (if opportunity is >= review)\n teamId?: string; // team of the account manager at the time of the latest opportunity\n assistantUserId?: string;\n\n // client details\n clientId: string;\n clientCode: number;\n clientCountryCode: string;\n clientVat?: string;\n conglomerate?: boolean;\n clientEmail?: string;\n clientPhone?: string;\n\n // financing details\n financingOrgId?: string;\n\n // vehicle details\n dealStatus: VehicleSaleDealStatus;\n logisticsStatus: VehicleSaleLogisticsStatus;\n\n // opportunity dates\n createdAt: string;\n engagedAt?: string;\n acceptedAt?: string;\n validatedAt?: string;\n reviewedAt?: string;\n preparedAt?: string;\n deliveredAt?: string;\n wonAt?: string;\n\n saleAt?: string; // this is the date that should be considered for the sale according to TJ (often the same as fullPaymentAt)\n\n // money-related details\n firstInvoiceIssuedAt?: string;\n lastInvoiceIssuedAt?: string;\n firstPaymentAt?: string;\n fullPaymentAt?: string;\n expectedAmount: string; // from quote(s)\n actualAmount: string; // from all invoices\n lifetimeActualAmount: string; // sum of all invoices from all opportunities for this vehicle\n\n // is there an invoice with line categories related to the purchase of commercial vehicle?\n hasMainInvoice?: boolean;\n};\n\nexport type VehiclePurchaseOverview = {\n userId: string; // purchaser\n teamId?: string; // team of the purchaser at the time of purchase\n assistantUserId?: string;\n\n dealStatus: VehiclePurchaseDealStatus;\n logisticsStatus: VehiclePurchaseLogisticsStatus;\n\n supplierId: string;\n supplierCode: string;\n supplierCountryCode: string;\n supplierVat?: string;\n conglomerate?: boolean;\n supplierEmail?: string;\n supplierPhone?: string;\n\n // money-related details\n firstInvoiceIssuedAt?: string;\n lastInvoiceIssuedAt?: string;\n firstPaymentAt?: string;\n fullPaymentAt?: string;\n expectedAmount: string;\n actualAmount: string;\n\n purchaseAt?: string; // this is the date that should be considered for the purchase according to TJ (often the same as fullPaymentAt)\n\n // log\n marketingAt?: string; // no vehicle in our parking, just digital marketing\n evaluationAt?: string; // in consignation\n purchaseAgreedAt?: string;\n // firstPaymentAllowedAt?: string;\n // firstPaymentSentAt?: string;\n // fullPaymentAllowedAt?: string;\n // fullPaymentSentAt?: string;\n arrivedAt?: string;\n checkedInAt?: string;\n\n hasMainInvoice?: boolean;\n};\n\nexport type VehicleProfitOverview = {\n expectedProfit?: string;\n expectedRoi?: string;\n\n actualProfit?: string;\n actualRoi?: string;\n};\n\ntype VehicleSummary = {\n branch: string;\n stockNumber: string;\n id: string;\n role: VehicleRoles;\n newCondition?: boolean;\n\n // latest document of category Registration related to the vehicle\n hasRegistration?: boolean;\n registrationDocId?: string;\n\n // latest document of category CoC related to the vehicle\n hasCoc?: boolean;\n cocDocId?: string;\n};\n\nexport type VehicleBusinessOverview = {\n currency: string; // eg EUR\n vehicle: VehicleSummary;\n purchase: VehiclePurchaseOverview;\n sale?: VehicleSaleOverview;\n profit?: VehicleProfitOverview;\n};\n\nexport type VehicleBusinessOverviewXL = VehicleBusinessOverview & {\n statistics: {\n daysToArrival?: number; // days since full payment sent until vehicle arriving at our park\n daysToCheckIn?: number; // days since full payment sent until vehicle being checked-in\n daysToMakeReady?: number; // days since arrival until vehicle being checked-in\n daysInRealInventory?: number; // days since check-in until opportunity goes to Review (vehicle reserved)\n daysInVirtualInventory?: number; // days since vehicle created in the system until opportunity goes to Review\n cashConversionCycle?: number; // days since full payment sent until full payment received\n daysSaleUnpaid?: number; // days since opportunity goes to Review until it is fully paid\n };\n};\n\n// Event types for VehicleBusinessOverview changes\nexport type VehicleBusinessOverviewEvent = BaseEvent & {\n vehicleId: string;\n tenantId: string;\n actionAt: string;\n action: 'upsert';\n data: VehicleBusinessOverview;\n previousData?: VehicleBusinessOverview;\n};\n"]}
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED
|
@@ -35,6 +35,7 @@ export const SUPPLIER_VAT_RATE_PICKLIST_ID = 'supplierVATRate';
|
|
|
35
35
|
export const AXLE_MAKE_PICKLIST_ID = 'axleMake';
|
|
36
36
|
export const TAILGATE_MAKE_PICKLIST_ID = 'tailgateMakes';
|
|
37
37
|
export const VAT_PERCENTAGE_PICKLIST_ID = 'vatPercentages';
|
|
38
|
+
export const SELLER_VAT_PERCENTAGE_PICKLIST_ID = 'sellerVatPercentages';
|
|
38
39
|
export const CRANE_MAKE_PICKLIST_ID = 'craneMakes';
|
|
39
40
|
export const ENGINEERING_DOCS_PICKLIST_ID = 'engineeringDocs';
|
|
40
41
|
export const SHIPPING_COMPANIES_PICKLIST_ID = 'shippingCompanies';
|
|
@@ -13,6 +13,7 @@ export enum EventTypes {
|
|
|
13
13
|
EXTERNAL_VEHICLE_SALE = 'external-vehicle-sales',
|
|
14
14
|
AMORTIZATION_DOC = 'amortization-docs',
|
|
15
15
|
DEBTOR_DOSSIER = 'debtor-dossiers',
|
|
16
|
+
VEHICLE_BUSINESS_OVERVIEW = 'vehicle-business-overview',
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
export enum InternalNotificationChannels {
|
package/src/types/leasing.ts
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AttachmentValue, Document, LinkValue, PaginatedList } from '@bisondesk/commons-sdk/types';
|
|
1
|
+
import { AttachmentValue, Document, LinkValue } from '@bisondesk/commons-sdk/types';
|
|
3
2
|
import { BaseEvent } from './internal-events.js';
|
|
4
|
-
import { SortFilter } from './search.js';
|
|
5
|
-
import { ReferenceData } from './utils.js';
|
|
6
3
|
|
|
7
4
|
export enum LeasingContractActions {
|
|
8
5
|
CREATE_FINANCE_DOCUMENT = 'create_finance_document',
|
|
@@ -11,6 +8,7 @@ export enum LeasingContractActions {
|
|
|
11
8
|
START_CONTRACT_END = 'start_contract_end',
|
|
12
9
|
END_CONTRACT = 'end_contract',
|
|
13
10
|
CANCEL_RETAKE_VEHICLE = 'cancel_retake_vehicle',
|
|
11
|
+
CLONE_VEHICLE_FOR_RETAKE = 'clone_vehicle_for_retake',
|
|
14
12
|
}
|
|
15
13
|
|
|
16
14
|
export type LeasingContractDebtInfo = {
|
package/src/types/quotes.ts
CHANGED
|
@@ -189,6 +189,9 @@ export type SalesCalculatorInput = BaseQuoteCalculatorInput & {
|
|
|
189
189
|
delivery?: PickUpDeliveryType | AddressDeliveryType | PortDeliverytype;
|
|
190
190
|
extras: SalesQuoteExtraInput[];
|
|
191
191
|
customRequests: CustomSalesQuoteExtraInput[];
|
|
192
|
+
financing?: {
|
|
193
|
+
organizationId: string;
|
|
194
|
+
};
|
|
192
195
|
};
|
|
193
196
|
|
|
194
197
|
export type SalesQuoteRuleInput = {
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
VehiclePurchaseLogisticsStatus,
|
|
6
6
|
VehicleRoles,
|
|
7
7
|
} from './vehicles.js';
|
|
8
|
-
import {
|
|
8
|
+
import { BaseEvent } from './internal-events.js';
|
|
9
9
|
|
|
10
10
|
export type VehicleSaleOverview = {
|
|
11
11
|
opportunityId: string;
|
|
@@ -23,6 +23,9 @@ export type VehicleSaleOverview = {
|
|
|
23
23
|
clientEmail?: string;
|
|
24
24
|
clientPhone?: string;
|
|
25
25
|
|
|
26
|
+
// financing details
|
|
27
|
+
financingOrgId?: string;
|
|
28
|
+
|
|
26
29
|
// vehicle details
|
|
27
30
|
dealStatus: VehicleSaleDealStatus;
|
|
28
31
|
logisticsStatus: VehicleSaleLogisticsStatus;
|
|
@@ -135,3 +138,13 @@ export type VehicleBusinessOverviewXL = VehicleBusinessOverview & {
|
|
|
135
138
|
daysSaleUnpaid?: number; // days since opportunity goes to Review until it is fully paid
|
|
136
139
|
};
|
|
137
140
|
};
|
|
141
|
+
|
|
142
|
+
// Event types for VehicleBusinessOverview changes
|
|
143
|
+
export type VehicleBusinessOverviewEvent = BaseEvent & {
|
|
144
|
+
vehicleId: string;
|
|
145
|
+
tenantId: string;
|
|
146
|
+
actionAt: string;
|
|
147
|
+
action: 'upsert';
|
|
148
|
+
data: VehicleBusinessOverview;
|
|
149
|
+
previousData?: VehicleBusinessOverview;
|
|
150
|
+
};
|