@bisondesk/core-sdk 1.0.398 → 1.0.400

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.
@@ -1,10 +1,16 @@
1
- import { DistributiveOmit, Document, NextList } from '@bisondesk/commons-sdk/types';
1
+ import { DistributiveOmit, Document, LocationValue, NextList } from '@bisondesk/commons-sdk/types';
2
2
  import { BusinessEntityIds, WarningHints } from '../constants.js';
3
3
  import { Contact, Organization } from './crm.js';
4
4
  import { Insights, InsightsComparableSpecs } from './insights.js';
5
5
  import { BaseSearchRequest } from './search.js';
6
6
  import { DataRecord, ReferenceData } from './utils.js';
7
- import { VehicleExternalInfo } from './vehicles.js';
7
+ import {
8
+ SearchVehicle,
9
+ VehicleExternalInfo,
10
+ VehicleInternalInfo,
11
+ VehiclePurchaseDealStatus,
12
+ VehiclePurchaseDeliveryType,
13
+ } from './vehicles.js';
8
14
 
9
15
  export enum OfferActions {
10
16
  CREATE_BID = 'create_bid',
@@ -21,6 +27,7 @@ export enum OfferActions {
21
27
  ACCEPT_NEGOTIATION = 'accept_negotiation',
22
28
  UNDO_ACCEPT_NEGOTIATION = 'undo_accept_negotiation',
23
29
  SET_SUPPLIER_VEHICLE = 'set_supplier_vehicle',
30
+ CAN_PURCHASE = 'can_purchase',
24
31
  }
25
32
 
26
33
  export enum OfferBidActions {
@@ -77,6 +84,7 @@ type BaseOffer = {
77
84
  organizationId?: string;
78
85
 
79
86
  supplierNotes?: string; // Optional notes from the supplier
87
+ description: { remarks?: string; technicalRemarks?: string };
80
88
  };
81
89
 
82
90
  export type NewOffer = BaseOffer & {
@@ -133,6 +141,7 @@ export type OfferUpdate = {
133
141
 
134
142
  finalValuation?: string | null;
135
143
  agreed?: boolean;
144
+ description?: { remarks?: string; technicalRemarks?: string };
136
145
  };
137
146
 
138
147
  type OfferWarningActionLink = {
@@ -163,6 +172,7 @@ export type OfferMetadata = {
163
172
  export type OfferBff = {
164
173
  offer: DataRecord<Offer, OfferMetadata>;
165
174
  bids: DataRecord<OfferBid>[];
175
+ vehicles: SearchVehicle[];
166
176
  customer?: {
167
177
  contact: DataRecord<Contact>;
168
178
  org?: DataRecord<Organization>;
@@ -270,3 +280,46 @@ export type KanbanOffersNextList = Omit<
270
280
  > & {
271
281
  nextTokens?: Record<string, string | undefined>;
272
282
  };
283
+
284
+ /********
285
+ * Vehicle Purchase
286
+ */
287
+
288
+ export type OfferPurchase = {
289
+ offerId: string;
290
+ vin: string;
291
+ supplierStockNumber?: string;
292
+
293
+ deal: {
294
+ description: {
295
+ technicalRemarks: string;
296
+ };
297
+ dealStatus:
298
+ | VehiclePurchaseDealStatus.PurchaseEvaluation
299
+ | VehiclePurchaseDealStatus.PurchaseAgreed
300
+ | VehiclePurchaseDealStatus.Marketing;
301
+ costs: {
302
+ purchase: string;
303
+ purchaseVatPercentage: string;
304
+ internalGarage?: string;
305
+ externalGarage?: string;
306
+ internalTransport?: string;
307
+ externalTransport?: string;
308
+ other?: string;
309
+ commission?: string;
310
+ };
311
+ };
312
+
313
+ logistics: {
314
+ vehicleRole: VehicleInternalInfo['role'];
315
+ availabilityDate: string;
316
+ deliveryType?: VehiclePurchaseDeliveryType;
317
+ pickupAddress?: LocationValue;
318
+ };
319
+
320
+ salesPrices?: {
321
+ internet?: string;
322
+ premium?: string;
323
+ minimum?: string;
324
+ };
325
+ };
@@ -73,8 +73,8 @@ export type NewVehicleRequest = {
73
73
  technicalRemarks?: string;
74
74
  };
75
75
  logistics: {
76
- parking: string;
77
- deliveryType: VehiclePurchaseDeliveryType;
76
+ parking?: string;
77
+ deliveryType?: VehiclePurchaseDeliveryType;
78
78
  pickupAddress?: LocationValue;
79
79
  checkedInAt?: string;
80
80
  checkedInBy?: string;
@@ -95,13 +95,15 @@ export type NewVehicleRequest = {
95
95
  };
96
96
  vinList?: string;
97
97
  deal: {
98
+ offerId?: string;
98
99
  stockNumber?: string;
99
100
  contactId: string;
100
101
  orgId: string;
101
102
  purchasedBy: string;
102
103
  dealStatus:
103
104
  | VehiclePurchaseDealStatus.PurchaseEvaluation
104
- | VehiclePurchaseDealStatus.PurchaseAgreed;
105
+ | VehiclePurchaseDealStatus.PurchaseAgreed
106
+ | VehiclePurchaseDealStatus.Marketing;
105
107
  costs: {
106
108
  purchase: string;
107
109
  purchaseVatPercentage: string;
@@ -257,6 +259,8 @@ export type VehicleInternalInfo = {
257
259
  stockNumber: string;
258
260
  branch: string;
259
261
 
262
+ offerId?: string;
263
+
260
264
  /**
261
265
  * This ID is used to link different vehicle objects that represent the same real world asset.
262
266
  * Ideally the chassis number could be used, but in some cases it is not available yet.
@@ -517,6 +521,7 @@ export enum VehiclePurchaseDealStatus {
517
521
  FirstPaymentSent = 'FIRST_PAYMENT_SENT',
518
522
  FullPaymentAllowed = 'FULL_PAYMENT_ALLOWED',
519
523
  FullPaymentSent = 'FULL_PAYMENT_SENT',
524
+ Marketing = 'MARKETING',
520
525
  }
521
526
 
522
527
  export enum VehiclePurchaseLogisticsStatus {