@bisondesk/core-sdk 1.0.665 → 1.0.667
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/apis/tenants.d.ts +1 -3
- package/lib/apis/tenants.d.ts.map +1 -1
- package/lib/apis/tenants.js +0 -30
- package/lib/apis/tenants.js.map +1 -1
- package/lib/types/leasing.d.ts +0 -139
- package/lib/types/leasing.d.ts.map +1 -1
- package/lib/types/leasing.js.map +1 -1
- package/lib/types/opportunities.d.ts +3 -185
- package/lib/types/opportunities.d.ts.map +1 -1
- package/lib/types/opportunities.js.map +1 -1
- package/lib/types/quotes.d.ts +10 -0
- package/lib/types/quotes.d.ts.map +1 -1
- package/lib/types/quotes.js +7 -0
- package/lib/types/quotes.js.map +1 -1
- package/lib/types/tenants.d.ts +3 -15
- package/lib/types/tenants.d.ts.map +1 -1
- package/lib/types/tenants.js.map +1 -1
- package/package.json +1 -1
- package/src/apis/tenants.ts +1 -39
- package/src/types/leasing.ts +0 -158
- package/src/types/opportunities.ts +4 -190
- package/src/types/quotes.ts +23 -0
- package/src/types/tenants.ts +9 -19
- package/tsconfig.tsbuildinfo +1 -1
package/src/types/leasing.ts
CHANGED
|
@@ -415,164 +415,6 @@ export type AmortizationTableRequest = {
|
|
|
415
415
|
startDate?: string; // should be filled in if you want an amortization table with expected period dates
|
|
416
416
|
};
|
|
417
417
|
|
|
418
|
-
export type AmortizationTableTemplateData = {
|
|
419
|
-
opportunity: {
|
|
420
|
-
id: string;
|
|
421
|
-
};
|
|
422
|
-
v: {
|
|
423
|
-
make: string;
|
|
424
|
-
model: string;
|
|
425
|
-
category: string;
|
|
426
|
-
type?: string;
|
|
427
|
-
vin: string;
|
|
428
|
-
year?: string | number;
|
|
429
|
-
stockNumber: string;
|
|
430
|
-
};
|
|
431
|
-
c: {
|
|
432
|
-
clientNumber: number;
|
|
433
|
-
company: string;
|
|
434
|
-
fullName: string;
|
|
435
|
-
vatNumber?: string;
|
|
436
|
-
email?: string;
|
|
437
|
-
phone?: string;
|
|
438
|
-
address?: string;
|
|
439
|
-
};
|
|
440
|
-
leasing: {
|
|
441
|
-
salesPrice: string;
|
|
442
|
-
salesPriceVat: string;
|
|
443
|
-
salesPriceExclVat: string;
|
|
444
|
-
deposit: string;
|
|
445
|
-
depositExclVat: string;
|
|
446
|
-
depositVat: string;
|
|
447
|
-
/** Returnable guarantee deposit; VAT-free, so incl and excl VAT are the same amount. */
|
|
448
|
-
guaranteeDeposit?: string;
|
|
449
|
-
installment: string;
|
|
450
|
-
installmentVat: string;
|
|
451
|
-
installmentExclVat: string;
|
|
452
|
-
duration: number;
|
|
453
|
-
monthlyInsurance: string;
|
|
454
|
-
monthlyTax: string;
|
|
455
|
-
monthlyTaxesInsurance: string;
|
|
456
|
-
residual: string;
|
|
457
|
-
residualVat: string;
|
|
458
|
-
residualExclVat: string;
|
|
459
|
-
offerNumber: string;
|
|
460
|
-
contractNumber: string;
|
|
461
|
-
vatPercentage: string;
|
|
462
|
-
totalLeasingAmount: string;
|
|
463
|
-
totalLeasingAmountExclVat: string;
|
|
464
|
-
balance: string;
|
|
465
|
-
balanceExclVat: string;
|
|
466
|
-
};
|
|
467
|
-
amortization: {
|
|
468
|
-
period: number;
|
|
469
|
-
periodStartDate: string;
|
|
470
|
-
periodEndDate: string;
|
|
471
|
-
deposit: string;
|
|
472
|
-
startUpFee: string;
|
|
473
|
-
monthlyAmount: string;
|
|
474
|
-
capital: string;
|
|
475
|
-
balance: string;
|
|
476
|
-
interest: string;
|
|
477
|
-
insurance: string;
|
|
478
|
-
expirationDate: string;
|
|
479
|
-
total: string;
|
|
480
|
-
}[];
|
|
481
|
-
};
|
|
482
|
-
|
|
483
|
-
/**
|
|
484
|
-
* Merge payload for the printable contract conditions documents (Conditions Particulières and
|
|
485
|
-
* Conditions Générales share it; the Générales template consumes a subset). Country-agnostic —
|
|
486
|
-
* first used by MrLease CI. Amounts are display-ready strings without a currency symbol; the
|
|
487
|
-
* currency literals live in the per-branch DOCX templates.
|
|
488
|
-
*/
|
|
489
|
-
export type ContractConditionsTemplateData = {
|
|
490
|
-
contractNumber: string;
|
|
491
|
-
currentDate: string;
|
|
492
|
-
c: {
|
|
493
|
-
company: string;
|
|
494
|
-
address: string;
|
|
495
|
-
};
|
|
496
|
-
v: {
|
|
497
|
-
make: string;
|
|
498
|
-
type: string;
|
|
499
|
-
year: string | number;
|
|
500
|
-
vin: string;
|
|
501
|
-
condition: string;
|
|
502
|
-
};
|
|
503
|
-
leasing: {
|
|
504
|
-
duration: number;
|
|
505
|
-
salesPriceExclVat: string;
|
|
506
|
-
depositExclVat: string;
|
|
507
|
-
depositPercentage: string;
|
|
508
|
-
installmentExclVat: string;
|
|
509
|
-
paymentMode: string;
|
|
510
|
-
guaranteeDeposit: string;
|
|
511
|
-
deliveryDate: string;
|
|
512
|
-
installationLocation: string;
|
|
513
|
-
maxKmPerYear: string;
|
|
514
|
-
startupFee: string;
|
|
515
|
-
residualExclVat: string;
|
|
516
|
-
};
|
|
517
|
-
};
|
|
518
|
-
|
|
519
|
-
/**
|
|
520
|
-
* Merge payload for the delivery confirmation (procès-verbal de réception): the lessee's receipt
|
|
521
|
-
* that the vehicle arrived complete and matching the contract.
|
|
522
|
-
*/
|
|
523
|
-
export type LeasingDeliveryConfirmationTemplateData = {
|
|
524
|
-
contractNumber: string;
|
|
525
|
-
currentDate: string;
|
|
526
|
-
c: {
|
|
527
|
-
company: string;
|
|
528
|
-
street: string;
|
|
529
|
-
postalCode: string;
|
|
530
|
-
city: string;
|
|
531
|
-
/** ISO country code of the customer's legal address, as the CRM stores it. */
|
|
532
|
-
country: string;
|
|
533
|
-
phone: string;
|
|
534
|
-
email: string;
|
|
535
|
-
vatNumber: string;
|
|
536
|
-
};
|
|
537
|
-
v: {
|
|
538
|
-
make: string;
|
|
539
|
-
type: string;
|
|
540
|
-
year: string | number;
|
|
541
|
-
vin: string;
|
|
542
|
-
};
|
|
543
|
-
/** The customer's contact person, who signs the receipt. */
|
|
544
|
-
contact: {
|
|
545
|
-
name: string;
|
|
546
|
-
};
|
|
547
|
-
};
|
|
548
|
-
|
|
549
|
-
/** Merge payload for the cautionnement (personal surety) document. */
|
|
550
|
-
export type CautionnementTemplateData = {
|
|
551
|
-
currentDate: string;
|
|
552
|
-
c: {
|
|
553
|
-
company: string;
|
|
554
|
-
address: string;
|
|
555
|
-
vatNumber: string;
|
|
556
|
-
shareCapital: string;
|
|
557
|
-
};
|
|
558
|
-
v: {
|
|
559
|
-
make: string;
|
|
560
|
-
type: string;
|
|
561
|
-
year: string | number;
|
|
562
|
-
vin: string;
|
|
563
|
-
};
|
|
564
|
-
p: {
|
|
565
|
-
name: string;
|
|
566
|
-
birthDate: string;
|
|
567
|
-
nationalId: string;
|
|
568
|
-
address: string;
|
|
569
|
-
role: string;
|
|
570
|
-
/** Cap of the guarantee: the whole lease incl. VAT. See `computeGuaranteedAmount`. */
|
|
571
|
-
maxGuaranteedAmount: string;
|
|
572
|
-
maxGuaranteedAmountWords: string;
|
|
573
|
-
};
|
|
574
|
-
};
|
|
575
|
-
|
|
576
418
|
export type CmrTemplateData = {
|
|
577
419
|
contractId: string;
|
|
578
420
|
date: string;
|
|
@@ -5,7 +5,7 @@ import { Contact, Organization } from './crm.js';
|
|
|
5
5
|
import type { Interest, InterestBffMeta } from './interests.js';
|
|
6
6
|
import { BaseEvent } from './internal-events.js';
|
|
7
7
|
import { OpportunityPayment } from './opportunity-payments.js';
|
|
8
|
-
import { Quote, QuoteStatus } from './quotes.js';
|
|
8
|
+
import { Quote, QuoteRecordMeta, QuoteStatus } from './quotes.js';
|
|
9
9
|
import { OpportunityReservation } from './reservations.js';
|
|
10
10
|
import { BaseSearchRequest } from './search.js';
|
|
11
11
|
import { Transport } from './transports.js';
|
|
@@ -325,8 +325,9 @@ export type OpportunityBFF = {
|
|
|
325
325
|
vehicle?: DataRecord<Vehicle, VehicleBffMetadata>;
|
|
326
326
|
interest?: DataRecord<Interest, InterestBffMeta>;
|
|
327
327
|
bids: DataRecord<Bid>[];
|
|
328
|
-
|
|
329
|
-
|
|
328
|
+
/** Every quote the deal has ever had; the ones it has left carry `meta.archived`. */
|
|
329
|
+
quotes: DataRecord<Quote, QuoteRecordMeta>[];
|
|
330
|
+
activeQuote?: DataRecord<Quote, QuoteRecordMeta>;
|
|
330
331
|
payments: OpportunityPaymentSummary | undefined;
|
|
331
332
|
reservation?: DataRecord<OpportunityReservation>;
|
|
332
333
|
tasks: DataRecord<Task>[];
|
|
@@ -442,198 +443,11 @@ export type OpportunityNotificationData = {
|
|
|
442
443
|
snippet?: string;
|
|
443
444
|
};
|
|
444
445
|
|
|
445
|
-
export type LeasingQuoteTemplateData = {
|
|
446
|
-
opportunity: {
|
|
447
|
-
id: string;
|
|
448
|
-
};
|
|
449
|
-
currentDate: string;
|
|
450
|
-
expirationDate: string;
|
|
451
|
-
vehicle: {
|
|
452
|
-
make: string;
|
|
453
|
-
model: string;
|
|
454
|
-
type?: string;
|
|
455
|
-
km: string | number;
|
|
456
|
-
vin: string;
|
|
457
|
-
mainImage: string;
|
|
458
|
-
localLicensePlate: boolean;
|
|
459
|
-
description: string;
|
|
460
|
-
year?: string | number;
|
|
461
|
-
stockNumber?: string;
|
|
462
|
-
};
|
|
463
|
-
accountManager: {
|
|
464
|
-
fullName: string;
|
|
465
|
-
email: string;
|
|
466
|
-
phone: string;
|
|
467
|
-
};
|
|
468
|
-
customer: {
|
|
469
|
-
company: string;
|
|
470
|
-
fullName: string;
|
|
471
|
-
vatNumber?: string;
|
|
472
|
-
address?: string;
|
|
473
|
-
};
|
|
474
|
-
settingId: string;
|
|
475
|
-
leasing: {
|
|
476
|
-
deposit: string;
|
|
477
|
-
totalMonthlyAmount: string;
|
|
478
|
-
totalMonthlyAmountExclVat: string;
|
|
479
|
-
depositExclVat: string;
|
|
480
|
-
startupFee: string;
|
|
481
|
-
startupFeeExclVat: string;
|
|
482
|
-
/** Returnable guarantee deposit; VAT-free, so incl and excl VAT are the same amount. */
|
|
483
|
-
guaranteeDeposit?: string;
|
|
484
|
-
totalExtras: string;
|
|
485
|
-
totalExtrasExclVat: string;
|
|
486
|
-
totalBeforeDeliveryExclVat: string;
|
|
487
|
-
totalBeforeDelivery: string;
|
|
488
|
-
installment: string;
|
|
489
|
-
installmentExclVat: string;
|
|
490
|
-
duration: number;
|
|
491
|
-
monthlyInsurance: string;
|
|
492
|
-
monthlyTax: string;
|
|
493
|
-
monthlyTaxesInsurance: string;
|
|
494
|
-
monthlyTaxesInsuranceExclVat: string;
|
|
495
|
-
residual: string;
|
|
496
|
-
residualExclVat: string;
|
|
497
|
-
offerNumber: string;
|
|
498
|
-
extras: { name: string }[];
|
|
499
|
-
};
|
|
500
|
-
};
|
|
501
|
-
|
|
502
|
-
export type LineItemPdfTemplate = {
|
|
503
|
-
description: string;
|
|
504
|
-
vat: string;
|
|
505
|
-
quantity: number;
|
|
506
|
-
unitPriceExclVat: string;
|
|
507
|
-
amount: string;
|
|
508
|
-
amountExclVat: string;
|
|
509
|
-
};
|
|
510
|
-
|
|
511
|
-
export type LeasingProformaTemplateData = {
|
|
512
|
-
opportunity: {
|
|
513
|
-
id: string;
|
|
514
|
-
offerNumber: string;
|
|
515
|
-
};
|
|
516
|
-
currentDate: string;
|
|
517
|
-
accountManager: {
|
|
518
|
-
fullName: string;
|
|
519
|
-
email: string;
|
|
520
|
-
phone: string;
|
|
521
|
-
};
|
|
522
|
-
vehicle: {
|
|
523
|
-
line1: string;
|
|
524
|
-
line2: string;
|
|
525
|
-
stockNumber: string;
|
|
526
|
-
};
|
|
527
|
-
c: {
|
|
528
|
-
organizationId?: string;
|
|
529
|
-
clientId: string;
|
|
530
|
-
company: string;
|
|
531
|
-
fullName: string;
|
|
532
|
-
vatNumber?: string;
|
|
533
|
-
email?: string;
|
|
534
|
-
phone?: string;
|
|
535
|
-
address?: string;
|
|
536
|
-
};
|
|
537
|
-
i: LineItemPdfTemplate[];
|
|
538
|
-
t: {
|
|
539
|
-
totalExclVat: string;
|
|
540
|
-
vatAmount: string;
|
|
541
|
-
displayVatMessage: boolean;
|
|
542
|
-
total: string;
|
|
543
|
-
/** Returnable guarantee deposit included in the totals; VAT-free. */
|
|
544
|
-
guaranteeDeposit?: string;
|
|
545
|
-
monthly: string;
|
|
546
|
-
monthlyExclVat: string;
|
|
547
|
-
residual: string;
|
|
548
|
-
residualExclVat: string;
|
|
549
|
-
duration: number;
|
|
550
|
-
};
|
|
551
|
-
};
|
|
552
|
-
|
|
553
|
-
export type SalesTemplateData = {
|
|
554
|
-
opportunity: {
|
|
555
|
-
id: string;
|
|
556
|
-
offerNumber: string;
|
|
557
|
-
};
|
|
558
|
-
currentDate: string;
|
|
559
|
-
expirationDate: string;
|
|
560
|
-
notes?: string;
|
|
561
|
-
accountManager: {
|
|
562
|
-
fullName: string;
|
|
563
|
-
email: string;
|
|
564
|
-
phone: string;
|
|
565
|
-
};
|
|
566
|
-
vehicle: {
|
|
567
|
-
line1: string;
|
|
568
|
-
line2: string;
|
|
569
|
-
stockNumber: string;
|
|
570
|
-
mainImage: string;
|
|
571
|
-
make: string;
|
|
572
|
-
model: string;
|
|
573
|
-
type?: string;
|
|
574
|
-
km: string | number;
|
|
575
|
-
vin: string;
|
|
576
|
-
year: string;
|
|
577
|
-
parkingLocation: string;
|
|
578
|
-
};
|
|
579
|
-
c: {
|
|
580
|
-
organizationId?: string;
|
|
581
|
-
clientId: string;
|
|
582
|
-
company: string;
|
|
583
|
-
fullName: string;
|
|
584
|
-
vatNumber?: string;
|
|
585
|
-
email?: string;
|
|
586
|
-
phone?: string;
|
|
587
|
-
address?: string;
|
|
588
|
-
country: string;
|
|
589
|
-
};
|
|
590
|
-
iExtended: LineItemPdfTemplate[];
|
|
591
|
-
i: LineItemPdfTemplate[];
|
|
592
|
-
t: {
|
|
593
|
-
totalExclVat: string;
|
|
594
|
-
vatAmount: string;
|
|
595
|
-
total: string;
|
|
596
|
-
displayVatMessage: boolean;
|
|
597
|
-
totalAlternativeCurrency?: string;
|
|
598
|
-
totalAlternativeCurrencyCode?: string;
|
|
599
|
-
totalAlternativeCurrencyExclVat?: string;
|
|
600
|
-
};
|
|
601
|
-
l?: {
|
|
602
|
-
advance: string;
|
|
603
|
-
residual: string;
|
|
604
|
-
duration: number; // in months
|
|
605
|
-
monthlyAmount: string;
|
|
606
|
-
};
|
|
607
|
-
};
|
|
608
|
-
|
|
609
446
|
export type KanbanOpportunityGroup = {
|
|
610
447
|
representative: SearchOpportunity;
|
|
611
448
|
items: SearchOpportunity[];
|
|
612
449
|
};
|
|
613
450
|
|
|
614
|
-
export type DeliveryConfirmationTemplateData = {
|
|
615
|
-
supplier: {
|
|
616
|
-
company: string;
|
|
617
|
-
contactPerson: string;
|
|
618
|
-
vatNumber?: string;
|
|
619
|
-
};
|
|
620
|
-
customer: {
|
|
621
|
-
company: string;
|
|
622
|
-
contactPerson: string;
|
|
623
|
-
phone?: string;
|
|
624
|
-
};
|
|
625
|
-
vehicle: {
|
|
626
|
-
makeAndModel: string;
|
|
627
|
-
vin: string;
|
|
628
|
-
licensePlate?: string;
|
|
629
|
-
stockNumber?: string;
|
|
630
|
-
};
|
|
631
|
-
opportunity: {
|
|
632
|
-
id: string;
|
|
633
|
-
};
|
|
634
|
-
currentDate: string;
|
|
635
|
-
};
|
|
636
|
-
|
|
637
451
|
export type OpportunitiesKanbanColumn = {
|
|
638
452
|
status: string;
|
|
639
453
|
results: SearchOpportunity[];
|
package/src/types/quotes.ts
CHANGED
|
@@ -310,6 +310,29 @@ export type NewQuote = BaseQuote & {
|
|
|
310
310
|
active: true;
|
|
311
311
|
};
|
|
312
312
|
|
|
313
|
+
/**
|
|
314
|
+
* A field of the linkage a quote is written against — opportunity, vehicle, contact, type and
|
|
315
|
+
* branch. When one of them is edited on the deal, the deal moves to a new linkage and its
|
|
316
|
+
* earlier quotes stay behind on the old one rather than following.
|
|
317
|
+
*/
|
|
318
|
+
export enum QuoteLinkageField {
|
|
319
|
+
Vehicle = 'vehicle',
|
|
320
|
+
Contact = 'contact',
|
|
321
|
+
Type = 'type',
|
|
322
|
+
Branch = 'branch',
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
export type QuoteRecordMeta = {
|
|
326
|
+
/**
|
|
327
|
+
* The quote was computed for a linkage the deal has since left. Kept visible as history: its
|
|
328
|
+
* figures were right for the vehicle, customer and branch of the day, and are not right now,
|
|
329
|
+
* so the only thing left to do with it is read the PDF that was sent.
|
|
330
|
+
*/
|
|
331
|
+
archived?: boolean;
|
|
332
|
+
/** Why: the linkage fields edited on the deal since this quote was written. */
|
|
333
|
+
archivedReason?: QuoteLinkageField[];
|
|
334
|
+
};
|
|
335
|
+
|
|
313
336
|
export type Quote = BaseQuote & {
|
|
314
337
|
id: string;
|
|
315
338
|
createdAt: string;
|
package/src/types/tenants.ts
CHANGED
|
@@ -115,6 +115,15 @@ export type Tenant = PublicTenant & {
|
|
|
115
115
|
// E.164 Twilio caller ID used as a fallback when a user has no own number configured
|
|
116
116
|
defaultTwilioPhoneNumber?: string;
|
|
117
117
|
deliveryEmail?: string;
|
|
118
|
+
/**
|
|
119
|
+
* The tenant's brand, for printed material generated in code: the vehicle sticker takes its
|
|
120
|
+
* header colour from `primary` and its name from `name`, so one layout serves every tenant.
|
|
121
|
+
* Absent = the layout's neutral grey. Mirrors the brand registry of the websites.
|
|
122
|
+
*/
|
|
123
|
+
brand?: {
|
|
124
|
+
/** `#rrggbb` */
|
|
125
|
+
primary: string;
|
|
126
|
+
};
|
|
118
127
|
};
|
|
119
128
|
|
|
120
129
|
export type ReservationExpiryPolicy =
|
|
@@ -163,25 +172,6 @@ export type Branch = {
|
|
|
163
172
|
dropshipping?: boolean;
|
|
164
173
|
};
|
|
165
174
|
|
|
166
|
-
export type HdmsVehiclesSync = {
|
|
167
|
-
active: boolean;
|
|
168
|
-
};
|
|
169
|
-
|
|
170
|
-
export type HdmsCrmSync = {
|
|
171
|
-
active: boolean;
|
|
172
|
-
};
|
|
173
|
-
|
|
174
|
-
export type HdmsDocumentSync = {
|
|
175
|
-
active: boolean;
|
|
176
|
-
};
|
|
177
|
-
|
|
178
|
-
export type TenantSyncSettings = {
|
|
179
|
-
tenantId: string;
|
|
180
|
-
hdmsVehicles: HdmsVehiclesSync | undefined;
|
|
181
|
-
hdmsCrm: HdmsCrmSync | undefined;
|
|
182
|
-
hdmsDocuments: HdmsDocumentSync | undefined;
|
|
183
|
-
};
|
|
184
|
-
|
|
185
175
|
export type WhatsappStateResponse = {
|
|
186
176
|
enabled: boolean;
|
|
187
177
|
};
|