@bisondesk/core-sdk 1.0.193 → 1.0.194

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.
@@ -54,6 +54,25 @@ export type LeasingContractClient = {
54
54
  becrisStartDate?: string;
55
55
  };
56
56
 
57
+ export enum LeasingContractSource {
58
+ HYPERPORTAL = 'hyperportal',
59
+ BISONDESK = 'bisondesk',
60
+ }
61
+
62
+ export type LeasingContractHyperportal = {
63
+ source: LeasingContractSource.HYPERPORTAL;
64
+ /** oldest first **/
65
+ conditions: ConditionsRef[];
66
+ opportunities?: undefined;
67
+ };
68
+
69
+ export type LeasingContractBisondesk = {
70
+ source: LeasingContractSource.BISONDESK;
71
+ conditions?: undefined;
72
+ /** oldest first **/
73
+ opportunities: OpportunityRef[];
74
+ };
75
+
57
76
  export type LeasingContract = {
58
77
  id: string;
59
78
  createdAt: string;
@@ -71,14 +90,21 @@ export type LeasingContract = {
71
90
  stockNumber: string;
72
91
  administrativeNumber?: string;
73
92
  };
74
- conditions: ConditionsRef[];
75
- };
93
+ } & (LeasingContractHyperportal | LeasingContractBisondesk);
76
94
 
77
95
  export type ConditionsRef = {
78
96
  id: string;
79
97
  validSince: string;
80
98
  };
81
99
 
100
+ export type OpportunityRef = {
101
+ id: string;
102
+ createdAt: string;
103
+ leasingMonthlyAmount: string;
104
+ totalMonthlyAmount: string;
105
+ quoteId: string;
106
+ };
107
+
82
108
  export type ListOverdueRemindersResponse = PaginatedList<OverdueDossier, ReferenceData>;
83
109
  export type ListOverdueRemindersRequest = {
84
110
  offset: number;
@@ -133,22 +159,14 @@ export type NewLeasingConditions = {
133
159
  leasingAmount: string;
134
160
  leasingProfit: string;
135
161
  vehicleProfit: string;
136
- yearlyTaxCost: string;
137
- monthlyTaxCost: string;
138
162
  oneTimeTaxCost: string;
139
163
  financingAmount: string;
140
164
  bankContractValue: string;
141
165
  bankLeasingAmount: string;
142
166
  totalMonthlyPayment: string;
143
- yearlyInsuranceCost: string;
144
167
  leasingContractValue: string;
145
- monthlyInsuranceCost: string;
146
- yearlyTaxRetailPrice: string;
147
168
  monthlyTaxRetailPrice: string;
148
169
  allRisksInsuranceAmount: string;
149
- yearlyInsuranceRetailPrice: string;
150
- monthlyInsuranceRetailPrice: string;
151
- monthlyInsuranceAndTaxesRetailPrice: string;
152
170
  };
153
171
 
154
172
  cashIn: Array<{
@@ -245,3 +263,12 @@ export enum LeasingRemindersSortableColumns {
245
263
  RemindersCount = 'reminders_count',
246
264
  Status = 'status',
247
265
  }
266
+
267
+ export type AmortizationTableRequest = {
268
+ leasingAmount: string;
269
+ deposit: string;
270
+ salesPrice: string;
271
+ duration: number; // in months
272
+ residual: string;
273
+ monthlyInterestRate: string; // the annual interest rate divided by 12
274
+ };
@@ -129,6 +129,7 @@ export type Opportunity = BaseOpportunity & {
129
129
  amount?: string;
130
130
  interest?: Interest;
131
131
  documents?: Document[];
132
+ leasingContractId?: string;
132
133
  };
133
134
 
134
135
  export type OpportunityUpdate = {
@@ -306,3 +307,160 @@ export type OpportunitiesKanbanColumn = {
306
307
  totalCount: number;
307
308
  totalValue: string;
308
309
  };
310
+
311
+ export type HpLeasingDealRequest = {
312
+ tenantId: string;
313
+ initiatedBy: 'bisondesk';
314
+ processMetaId: string;
315
+ processRunData: {
316
+ entityOwner: string;
317
+ leasingContractOwner: string;
318
+ foreseenDeliveryDate?: string;
319
+ deliveryAddressLeasing?: string;
320
+ nameSalesPerson: string;
321
+ durationLeasingInMonths: number;
322
+ vanCourier: boolean;
323
+ newVehicle?: boolean;
324
+ newTrailer?: boolean;
325
+ registrationOnTtcoBe?: string;
326
+ yearOfConstruction?: number;
327
+ chassisnumber?: string;
328
+ vehicleModel?: string;
329
+ vehicleCategory2?: string;
330
+ licencePlate?: string;
331
+
332
+ company: string;
333
+ customerNumber?: number; //bisondesk external id
334
+ //MrLease fields
335
+ vehicle: string;
336
+ salesPriceEur: string;
337
+ depositFullAmountExclVat: string;
338
+ depositToBePrepaidExclVat: string;
339
+ vehicleMake3?: string;
340
+
341
+ //TTC fields
342
+ vehicleOriginalReference?: string;
343
+ salesPrice: string;
344
+ depositFullAmount: string;
345
+ depositAmountToBePrepaid: string;
346
+ make?: string;
347
+ };
348
+ };
349
+
350
+ export type HpLeasingDealResponse = {
351
+ entityId: string;
352
+ id: string;
353
+ status: string;
354
+ leasingContractNumber?: string;
355
+ definitionId: string;
356
+ };
357
+
358
+ export type HpLeasingContractRequest = {
359
+ tenantId: string;
360
+ initiatedBy: 'bisondesk';
361
+ processMetaId: string;
362
+ processRunData: {
363
+ entityOwner: string;
364
+ company: string;
365
+ vehicle: string;
366
+ ldNumber: number;
367
+ vanCourier: boolean;
368
+ startDate: number;
369
+ data: {
370
+ leasingParameter: {
371
+ allRisksPercentage: number;
372
+ allRisksTaxPercentage: number;
373
+ civilLiability: number;
374
+ entityId: string; //??
375
+ oneTimeRoadTax: number;
376
+ specialInsurance: number;
377
+ yearlyRoadTax: number;
378
+ countries: string[]; //is it array?
379
+ vehicleCategory: string;
380
+ };
381
+
382
+ calculatorRequest: {
383
+ bankDeposit: number;
384
+ bankDurationInMonths: number;
385
+ bankInterestRatePercentage: number;
386
+ bankResidualValue: number;
387
+ deposit: number;
388
+ durationInMonths: number;
389
+ includesAllRisks: boolean;
390
+ includesCivilLiability: boolean;
391
+ includesOneTimeRoadTax: boolean;
392
+ includesSpecialInsurance: boolean;
393
+ includesYearlyRoadTax: boolean;
394
+ insuranceAmount: number;
395
+ interestRatePercentage: number;
396
+ marginPercentage: number;
397
+ monthlyAdministrationFee: 0;
398
+ purchasePrice: number;
399
+ residualValue: number;
400
+ salesPrice: number;
401
+ startupFeePercentage: number;
402
+ };
403
+
404
+ calculatorResponse: {
405
+ ROI: number;
406
+ ROIDifference: number;
407
+ ROIPerYear: number;
408
+ ROITarget: number;
409
+ allRisksInsuranceAmount: number;
410
+ bankContractValue: number;
411
+ bankLeasingAmount: number;
412
+ cashDeficit: number;
413
+ financingAmount: number;
414
+ leasingAmount: number;
415
+ leasingContractValue: number;
416
+ leasingProfit: number;
417
+ monthlyTaxRetailPrice: number;
418
+ oneTimeTaxCost: number;
419
+ totalMonthlyPayment: number;
420
+ totalProfit: number;
421
+ vehicleProfit: number;
422
+ };
423
+
424
+ cashInValues: CashInRow[];
425
+
426
+ cashOutValues: CashOutRow[];
427
+ };
428
+ };
429
+ };
430
+
431
+ export type HpLeasingContractResponse = {
432
+ entityId: string;
433
+ id: string;
434
+ status: string;
435
+ createdAt: string;
436
+ updatedAt: string;
437
+ dateOfFinalSettlement: string;
438
+ startDate: string;
439
+ email: string;
440
+ contractNumber: string;
441
+ definitionId: string;
442
+ };
443
+
444
+ export type CashInRow = {
445
+ time: number;
446
+ deposit: number;
447
+ monthlyAdministrationFee: 0; //Legacy field - Should always be 0
448
+ residualValue: number;
449
+ startupFee: number;
450
+ leasingAmountWithoutAdminFee: number;
451
+ insurancePayment: number;
452
+ taxPayment: number;
453
+ cashIn: number;
454
+ cumulativeCash: number;
455
+ };
456
+
457
+ export type CashOutRow = {
458
+ time: number;
459
+ deposit: number;
460
+ residualValue: number;
461
+ leasingAmount: number;
462
+ insurancePayment: number;
463
+ taxPayment: number;
464
+ cashOut: number;
465
+ cumulativeCash: number;
466
+ };
@@ -28,6 +28,7 @@ export type HyperportalSettings = {
28
28
  leasing: {
29
29
  contractTransferDefinitionId: string;
30
30
  contractDealDefinitionId: string;
31
+ contractOwner: { [countryCode: string]: string };
31
32
  };
32
33
  };
33
34