@bisondesk/core-sdk 1.0.620 → 1.0.621

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.
@@ -107,6 +107,8 @@ export type VehicleBusinessOverviewXL = VehicleBusinessOverview & {
107
107
  daysInVirtualInventory?: number;
108
108
  cashConversionCycle?: number;
109
109
  daysSaleUnpaid?: number;
110
+ opportunitiesCreated?: number;
111
+ websiteViews?: number;
110
112
  };
111
113
  };
112
114
  export type VehicleBusinessOverviewEvent = BaseEvent & {
@@ -1 +1 @@
1
- {"version":3,"file":"vehicle-performance.d.ts","sourceRoot":"/","sources":["types/vehicle-performance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AACvF,OAAO,EACL,yBAAyB,EACzB,8BAA8B,EAC9B,YAAY,EACb,MAAM,eAAe,CAAC;AAEvB,MAAM,MAAM,mBAAmB,GAAG;IAChC,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,eAAe,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IAGzB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,cAAc,CAAC,EAAE,MAAM,CAAC;IAGxB,UAAU,EAAE,qBAAqB,CAAC;IAClC,eAAe,EAAE,0BAA0B,CAAC;IAG5C,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,M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AAE,QAAQ,CAAC;IACjB,IAAI,EAAE,uBAAuB,CAAC;IAC9B,YAAY,CAAC,EAAE,uBAAuB,CAAC;CACxC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"vehicle-performance.js","sourceRoot":"/","sources":["types/vehicle-performance.ts"],"names":[],"mappings":"","sourcesContent":["import { OpportunityType } from '../constants.js';\nimport { BaseEvent } from './internal-events.js';\nimport { VehicleSaleDealStatus, VehicleSaleLogisticsStatus } from './opportunities.js';\nimport {\n VehiclePurchaseDealStatus,\n VehiclePurchaseLogisticsStatus,\n VehicleRoles,\n} from './vehicles.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 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 firstAcceptedAt?: 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 firstInvoiceBookingNumber?: string;\n lastInvoiceIssuedAt?: string;\n firstPaymentAt?: string;\n fullPaymentAt?: string;\n daysSaleUnpaid?: number;\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 mainInvoicesAmount?: string;\n\n // is there a sale invoice with leasing line categories (capital, rent, deposit, residual) and amount > 0?\n hasLeasingInvoices?: boolean;\n leasingInvoicesAmount?: string;\n};\n\nexport type VehiclePurchaseOverview = {\n userId: string; // purchaser\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 firstInvoiceBookingNumber?: string;\n lastInvoiceIssuedAt?: string;\n firstPaymentAt?: string;\n fullPaymentAt?: string;\n amountPaid?: string;\n expectedAmount: string;\n actualAmount: string;\n purchaseAmount: string;\n estimatedPurchasePrice: string;\n creditNoteAmount: string;\n additionalPurchaseCosts: 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 mainInvoicesAmount?: string;\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 from first Review until 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"]}
1
+ {"version":3,"file":"vehicle-performance.js","sourceRoot":"/","sources":["types/vehicle-performance.ts"],"names":[],"mappings":"","sourcesContent":["import { OpportunityType } from '../constants.js';\nimport { BaseEvent } from './internal-events.js';\nimport { VehicleSaleDealStatus, VehicleSaleLogisticsStatus } from './opportunities.js';\nimport {\n VehiclePurchaseDealStatus,\n VehiclePurchaseLogisticsStatus,\n VehicleRoles,\n} from './vehicles.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 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 firstAcceptedAt?: 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 firstInvoiceBookingNumber?: string;\n lastInvoiceIssuedAt?: string;\n firstPaymentAt?: string;\n fullPaymentAt?: string;\n daysSaleUnpaid?: number;\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 mainInvoicesAmount?: string;\n\n // is there a sale invoice with leasing line categories (capital, rent, deposit, residual) and amount > 0?\n hasLeasingInvoices?: boolean;\n leasingInvoicesAmount?: string;\n};\n\nexport type VehiclePurchaseOverview = {\n userId: string; // purchaser\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 firstInvoiceBookingNumber?: string;\n lastInvoiceIssuedAt?: string;\n firstPaymentAt?: string;\n fullPaymentAt?: string;\n amountPaid?: string;\n expectedAmount: string;\n actualAmount: string;\n purchaseAmount: string;\n estimatedPurchasePrice: string;\n creditNoteAmount: string;\n additionalPurchaseCosts: 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 mainInvoicesAmount?: string;\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 from first Review until fully paid\n opportunitiesCreated?: number; // total number of opportunities created for this vehicle\n websiteViews?: number; // number of website views in the last 30 days\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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bisondesk/core-sdk",
3
- "version": "1.0.620",
3
+ "version": "1.0.621",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "author": "TheTruckCompany",
@@ -149,6 +149,8 @@ export type VehicleBusinessOverviewXL = VehicleBusinessOverview & {
149
149
  daysInVirtualInventory?: number; // days since vehicle created in the system until opportunity goes to Review
150
150
  cashConversionCycle?: number; // days since full payment sent until full payment received
151
151
  daysSaleUnpaid?: number; // days from first Review until fully paid
152
+ opportunitiesCreated?: number; // total number of opportunities created for this vehicle
153
+ websiteViews?: number; // number of website views in the last 30 days
152
154
  };
153
155
  };
154
156