@bisondesk/core-sdk 1.0.354 → 1.0.356
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/types/crm.d.ts +1 -0
- package/lib/types/crm.d.ts.map +1 -1
- package/lib/types/crm.js.map +1 -1
- package/lib/types/quotes.d.ts +1 -0
- package/lib/types/quotes.d.ts.map +1 -1
- package/lib/types/quotes.js.map +1 -1
- package/lib/utils/search.d.ts +3 -0
- package/lib/utils/search.d.ts.map +1 -1
- package/lib/utils/search.js +10 -5
- package/lib/utils/search.js.map +1 -1
- package/package.json +1 -1
- package/src/types/crm.ts +1 -0
- package/src/types/quotes.ts +1 -0
- package/src/utils/search.ts +27 -8
- package/tsconfig.tsbuildinfo +1 -1
package/lib/types/crm.d.ts
CHANGED
package/lib/types/crm.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crm.d.ts","sourceRoot":"/","sources":["types/crm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,MAAM,QAAQ,GAAG,oBAAoB,GAAG,eAAe,CAAC;AAE9D,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,QAAQ,GAAG,QAAQ,CAA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AClC,aAAa,EAAE,sBAAsB,CAAC;CACvC,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG;IACrC,EAAE,CAAC,EAAE,SAAS,CAAC;IACf,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,MAAM,EAAE,KAAK,CAAC,gBAAgB,GAAG,mBAAmB,CAAC,CAAC;CACvD,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG,WAAW,GAAG;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,gBAAgB,EAAE,CAAC;CAC5B,CAAC;AAEF,oBAAY,qBAAqB;IAC/B,gBAAgB,sBAAsB;IACtC,eAAe,qBAAqB;CACrC;AAED,oBAAY,iBAAiB;IAC3B,gBAAgB,sBAAsB;IACtC,eAAe,qBAAqB;CACrC;AAED,oBAAY,cAAc;IACxB,MAAM,WAAW;IACjB,YAAY,iBAAiB;CAC9B"}
|
package/lib/types/crm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crm.js","sourceRoot":"/","sources":["types/crm.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"crm.js","sourceRoot":"/","sources":["types/crm.ts"],"names":[],"mappings":"AAsJA,MAAM,CAAN,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC/B,+DAAsC,CAAA;IACtC,6DAAoC,CAAA;AACtC,CAAC,EAHW,qBAAqB,KAArB,qBAAqB,QAGhC;AAED,MAAM,CAAN,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,2DAAsC,CAAA;IACtC,yDAAoC,CAAA;AACtC,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,QAG5B;AAED,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,mCAAiB,CAAA;IACjB,+CAA6B,CAAA;AAC/B,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB","sourcesContent":["import {\n LocationValue,\n PhoneNumberRawValue,\n PhoneNumberValue,\n SearchPermissions,\n} from '@bisondesk/commons-sdk/types';\nimport { PublicSearchDefinition } from './definitions.js';\nimport { ReferenceData } from './utils.js';\n\nexport type CrmEvent = CrmOrganizationEvent | CrmContactEvent;\n\nexport type CrmContactEvent = {\n contactId: string;\n organizationId?: string;\n action: 'upsert' | 'delete';\n actionAt: string;\n userId: string;\n tenantId: string;\n};\n\nexport type CrmOrganizationEvent = {\n organizationId: string;\n action: 'upsert' | 'delete';\n actionAt: string;\n userId: string;\n tenantId: string;\n};\n\ntype BaseOrganization = {\n inUse: boolean;\n countryCode: string;\n syncedAt: string;\n name: string;\n segment?: string;\n type?: 'COMPANY' | 'INDIVIDUAL';\n vatNumber?: string;\n addresses?: {\n legal?: LocationValue;\n transport?: LocationValue;\n };\n accountManagers: string[];\n conglomerate?: boolean;\n riskTags?: string[];\n\n // billing\n billingEmails?: string[];\n skipPaymentReminders?: boolean;\n trustworthy?: boolean;\n};\n\nexport type NewOrganization = BaseOrganization & {\n id?: undefined;\n externalId?: undefined;\n createdAt?: undefined;\n createdBy?: undefined;\n billingPhone?: PhoneNumberValue | PhoneNumberRawValue;\n};\n\nexport type ValidatedNewOrganization = Omit<NewOrganization, 'billingPhone'> & {\n billingPhone?: PhoneNumberValue;\n};\n\nexport type Organization = BaseOrganization & {\n createdAt: string;\n externalId: number;\n createdBy: string;\n id: string;\n\n debt?: OrganizationDebtInfo;\n\n billingPhone?: PhoneNumberValue;\n\n disabled?: boolean;\n disabledAt?: string;\n disabledBy?: string;\n disabledReason?: string;\n};\n\nexport type OrganizationDebtInfo = {\n overdueSince?: string;\n overdueInvoices: number;\n overdueAmount: string;\n unpaidInvoices: number;\n unpaidAmount: string;\n syncedAt: string;\n};\n\nexport type OrgLeasingContract = {\n id: string;\n contractNumber?: string;\n vehicle: {\n id: string;\n stockNumber: string;\n administrativeNumber?: string;\n };\n};\n\nexport type SearchOrganization = {\n org: Organization;\n contract: OrgLeasingContract[]; // important for the logic regarding leasing overdue reminders\n};\n\nexport type PotentialDuplicatesReferenceData = ReferenceData & { blockIgnore?: boolean };\n\nexport type InputSearchOrganization = SearchOrganization & {\n permissions: SearchPermissions;\n};\n\nexport type SearchContact = {\n contact: Contact;\n org?: Organization;\n};\n\nexport type InputSearchContact = SearchContact & {\n permissions: SearchPermissions;\n};\n\nexport type CrmPublicSearchDefinitions = {\n searchOrg: PublicSearchDefinition;\n searchContact: PublicSearchDefinition;\n};\n\ntype BaseContact = {\n accountManager?: string;\n countryCode?: string;\n language?: string;\n emails: string[];\n job?: string;\n /** either firstName or lastName should be filled in */\n firstName?: string;\n lastName?: string;\n organizationId?: string;\n /** will not be filled if organizationId is present */\n orgName?: string;\n};\n\nexport type NewContact = BaseContact & {\n id?: undefined;\n createdAt?: undefined;\n createdBy?: undefined;\n phones: Array<PhoneNumberValue | PhoneNumberRawValue>;\n};\n\nexport type Contact = BaseContact & {\n id: string;\n createdAt: string;\n createdBy: string;\n phones: PhoneNumberValue[];\n};\n\nexport enum SaveContactResolution {\n IgnoreDuplicates = 'IGNORE_DUPLICATES',\n BlockDuplicates = 'BLOCK_DUPLICATES',\n}\n\nexport enum SaveOrgResolution {\n IgnoreDuplicates = 'IGNORE_DUPLICATES',\n BlockDuplicates = 'BLOCK_DUPLICATES',\n}\n\nexport enum CrmSearchScope {\n Tenant = 'tenant',\n Conglomerate = 'conglomerate',\n}\n"]}
|
package/lib/types/quotes.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quotes.d.ts","sourceRoot":"/","sources":["types/quotes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EACL,4BAA4B,EAC5B,0BAA0B,EAC1B,2BAA2B,EAC3B,sBAAsB,EACtB,oBAAoB,EACrB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEjD,oBAAY,YAAY;IACtB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,aAAa,kBAAkB;IAC/B,MAAM,WAAW;CAClB;AAED,oBAAY,WAAW;IACrB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,WAAW,gBAAgB;IAC3B,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,SAAS,cAAc;IACvB,gBAAgB,oBAAoB;IACpC,gBAAgB,oBAAoB;CACrC;AAED,oBAAY,iBAAiB;IAC3B,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,IAAI,SAAS;CACd;AACD,oBAAY,aAAa;IACvB,OAAO,WAAW;IAClB,OAAO,YAAY;IACnB,IAAI,SAAS;CACd;AAED,oBAAY,WAAW;IACrB,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,SAAS,aAAa;CACvB;AAED,oBAAY,kBAAkB;IAC5B,OAAO,WAAW;IAClB,UAAU,aAAa;CACxB;AAED,KAAK,wBAAwB,GAAG;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,i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IAAY,WASX;AATD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,sCAAuB,CAAA;IACvB,0CAA2B,CAAA;IAC3B,oCAAqB,CAAA;IACrB,oCAAqB,CAAA;IACrB,sCAAuB,CAAA;IACvB,mDAAoC,CAAA;IACpC,mDAAoC,CAAA;AACtC,CAAC,EATW,WAAW,KAAX,WAAW,QAStB;AAED,MAAM,CAAN,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,sCAAiB,CAAA;IACjB,wCAAmB,CAAA;IACnB,kCAAa,CAAA;AACf,CAAC,EAJW,iBAAiB,KAAjB,iBAAiB,QAI5B;AACD,MAAM,CAAN,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,mCAAkB,CAAA;IAClB,oCAAmB,CAAA;IACnB,8BAAa,CAAA;AACf,CAAC,EAJW,aAAa,KAAb,aAAa,QAIxB;AAED,MAAM,CAAN,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,8BAAe,CAAA;IACf,kCAAmB,CAAA;IACnB,qCAAsB,CAAA;AACxB,CAAC,EAJW,WAAW,KAAX,WAAW,QAItB;AAED,MAAM,CAAN,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,wCAAkB,CAAA;IAClB,6CAAuB,CAAA;AACzB,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B","sourcesContent":["import { AttachmentValue, LocationValue } from '@bisondesk/commons-sdk/types';\nimport { OpportunityType } from '../constants.js';\nimport {\n CustomLeasingQuoteExtraInput,\n CustomSalesQuoteExtraInput,\n LeasingDeliveryPackageInput,\n LeasingQuoteExtraInput,\n SalesQuoteExtraInput,\n} from './leasing-settings.js';\nimport { MatchingRuleValue } from './roi-ratings.js';\nimport { PricePercentageMode } from './utils.js';\n\nexport enum QuoteActions {\n ACCEPT = 'accept',\n VALIDATE = 'validate',\n DONWLOAD_PDFS = 'download-pdfs',\n CANCEL = 'cancel',\n}\n\nexport enum QuoteStatus {\n CREATED = 'created',\n VALIDATED = 'validated',\n INVALIDATED = 'invalidated',\n ACCEPTED = 'accepted',\n REJECTED = 'rejected',\n CANCELLED = 'cancelled',\n MANAGER_REJECTED = 'managerRejected',\n MANAGER_ACCEPTED = 'managerAccepted',\n}\n\nexport enum QuoteMetricsScore {\n DANGER = 'danger',\n NEUTRAL = 'neutral',\n GOOD = 'good',\n}\nexport enum DeliveryTypes {\n PICK_UP = 'pickUp',\n ADDRESS = 'address',\n PORT = 'port',\n}\n\nexport enum SpoilerInfo {\n MOUNT = 'mount',\n UNMOUNT = 'unmount',\n NO_ACTION = 'noAction',\n}\n\nexport enum TransportationMode {\n BY_ROAD = 'byRoad',\n ON_LOW_BED = 'onLowBed',\n}\n\ntype BaseQuoteCalculatorInput = {\n branchId: string;\n branchCountry: string;\n customerCountry: string;\n customerVatNumber?: string;\n currency: string;\n vehicle: {\n id: string;\n category: string;\n bodywork?: string;\n agreedPriceExclVat: string;\n };\n\n allRisksCost?: string;\n};\n\n// Sent by the Frontend to bootstrap the calculator\nexport type LeasingCalculatorDefaultInput = BaseQuoteCalculatorInput & {\n deliveryPackage?: LeasingQuoteExtraInput;\n};\n\nexport type LeasingCalculatorInput = BaseQuoteCalculatorInput & {\n localLicensePlate: boolean;\n vanCourier: boolean;\n vehicle: BaseQuoteCalculatorInput['vehicle'] & {\n purchasePriceExclVat: string;\n agreedPrice: string;\n purchasePrice: string;\n };\n leasing: {\n deposit: string;\n depositMode: PricePercentageMode;\n depositPercentage: string;\n residual: string;\n residualMode: PricePercentageMode;\n residualPercentage: string;\n startupFee: string;\n startupFeeMode: PricePercentageMode;\n startupFeePercentage: string;\n interestRate: string;\n duration: number;\n contractStartDate: string;\n };\n bank: {\n interestRate: string;\n deposit: string;\n depositMode: PricePercentageMode;\n depositPercentage: string;\n residual: string;\n residualMode: PricePercentageMode;\n residualPercentage: string;\n duration: number;\n salesPrice: string;\n };\n taxes: {\n yearlyRoadTax: boolean;\n oneTimeRoadTax: boolean;\n margin: string; //Non Editable, copies the value insurance > margin\n };\n insurance: {\n margin: string;\n civilLiabilities: boolean;\n allRisks: boolean;\n specialTechnicalInsurance: boolean;\n roadAssistance: boolean;\n initialFractionPercentage: string;\n };\n deliveryPackage?: LeasingDeliveryPackageInput;\n extras: LeasingQuoteExtraInput[];\n customRequests: CustomLeasingQuoteExtraInput[];\n};\n\ntype BaseDeliveryType = {\n agreedPrice: string;\n spoiler?: SpoilerInfo;\n stackingVehicleNeeded?: boolean;\n detailsStacking?: string;\n};\n\nexport type PickUpDeliveryType = BaseDeliveryType & {\n type: DeliveryTypes.PICK_UP;\n urgent: boolean;\n transportationMode?: TransportationMode;\n detailsBorderCrossing?: string;\n technicalControlNeeded: boolean;\n insuranceNeeded: boolean;\n transitPlateBelgiumNeeded: boolean;\n transitPlateAustriaNeeded: boolean;\n licensePlateNeeded: boolean;\n dateOfPickUpByCustomer?: string;\n};\n\nexport type AddressDeliveryType = BaseDeliveryType & {\n type: DeliveryTypes.ADDRESS;\n address: LocationValue;\n distanceKm: string;\n technicalControlNeeded: boolean;\n};\n\nexport type PortDeliverytype = BaseDeliveryType & {\n type: DeliveryTypes.PORT;\n portOriginId: string;\n portDestination?: string;\n shippingCompany?: string;\n portToPortCostPrice: string;\n portToPortMargin: string;\n};\n\n// Sent by the Frontend to bootstrap the calculator\nexport type SalesCalculatorDefaultInput = BaseQuoteCalculatorInput & {\n extras: SalesQuoteExtraInput[];\n customRequests: CustomSalesQuoteExtraInput[];\n};\n\nexport type SalesCalculatorInput = BaseQuoteCalculatorInput & {\n vehicle: BaseQuoteCalculatorInput['vehicle'] & {\n purchasePrice: string;\n purchasePriceExclVat: string;\n agreedPrice: string;\n premiumPrice?: string;\n vatRate: string;\n minimumPrice: string;\n internetPrice?: string;\n comissionCost: string;\n };\n delivery?: PickUpDeliveryType | AddressDeliveryType | PortDeliverytype;\n extras: SalesQuoteExtraInput[];\n customRequests: CustomSalesQuoteExtraInput[];\n};\n\nexport type SalesQuoteRuleInput = {\n minimumPrice: number;\n internetPrice: number;\n agreedPrice: number;\n premiumPrice: number;\n stockAge: number;\n};\n\nexport type LeasingCalculatorOutput = {\n vatApplicable: boolean;\n installment: string;\n installmentPrintable: string;\n totalMonthlyAmount: string;\n monthlyTaxesInsurance: string;\n beforeDeliveryExclVat: string;\n beforeDelivery: string;\n financingAmount: string;\n settingId: string;\n totalRetailAmount: string;\n finalSalesPrice: string;\n roi: {\n value: string;\n target: string;\n perYear: string;\n difference: string;\n score?: QuoteMetricsScore;\n };\n cashflow: {\n deficit: string;\n balanced: boolean;\n score: QuoteMetricsScore;\n };\n profitability: {\n leasing: string;\n vehicle: string;\n total: string;\n score: QuoteMetricsScore;\n };\n taxes: {\n yearlyRetailPrice: string;\n monthlyRetailPrice: string;\n yearlyRoadTax: string;\n oneTimeRoadTax: string;\n profit: string;\n };\n insurance: {\n beforeDelivery: string;\n yearlyRetailPrice: string;\n monthlyRetailPrice: string;\n civilLiabilities: string;\n allRisks: string;\n specialTechnicalInsurance: string;\n roadAssistance: string;\n profit: string;\n };\n trackAndTrace: {\n beforeDelivery: string;\n monthlyCost: string;\n installationCost: string; // currently this cost is being included as part of monthlyCost. In future, this will be a separate cost\n deviceCost: string; // same as above\n profit: string;\n };\n costs: {\n financingAmount: string;\n finalCostPrice: string;\n monhtly: string;\n };\n};\n\nexport type SalesCalculatorOutput = {\n totalRetailAmount: string;\n totalRetailAmountExclVat: string;\n retailAmounts: {\n vehicle: string;\n delivery: string;\n extras: string;\n };\n roi: { value: string; score?: QuoteMetricsScore };\n profit: {\n value: string;\n score: QuoteMetricsScore;\n };\n profitOverMin: {\n value: string;\n percentage: string;\n score: QuoteMetricsScore;\n };\n delivery: {\n retailPrice?: string;\n costPrice?: string;\n cleaningNeeded: boolean;\n cleaningNeededRetailPrice: string;\n transportationToPortRetailPrice?: string;\n };\n costs: {\n finalCostPrice: string;\n extras: string;\n delivery: string;\n };\n};\n\ntype BaseQuote = {\n opportunityId: string;\n preferredLanguage: string;\n clientNotes?: string;\n publicNotes?: string;\n} & (\n | {\n type: OpportunityType.LEASING;\n calculatorInput: LeasingCalculatorInput;\n calculatorOutput: LeasingCalculatorOutput;\n rating?: MatchingRuleValue;\n }\n | {\n type: OpportunityType.SALES;\n calculatorInput: SalesCalculatorInput;\n calculatorOutput: SalesCalculatorOutput;\n rating?: MatchingRuleValue;\n }\n);\n\nexport type NewQuote = BaseQuote & {\n id?: undefined;\n createdAt?: undefined;\n createdBy?: undefined;\n modifiedAt?: undefined;\n modifiedBy?: undefined;\n active: true;\n};\n\nexport type Quote = BaseQuote & {\n id: string;\n createdAt: string;\n createdBy: string;\n modifiedAt: string;\n modifiedBy: string;\n validationBy?: string;\n validationAt?: string;\n cancelledBy?: string;\n cancelledAt?: string;\n customerFeedbackAt?: string;\n customerFeedbackBy?: string;\n managerFeedbackAt?: string;\n managerFeedbackBy?: string;\n version: number;\n status: QuoteStatus;\n proformaPdf?: AttachmentValue;\n quotePdf?: AttachmentValue;\n salesAgreementPdf?: AttachmentValue;\n active: boolean;\n contactId: string;\n vehicleId: string;\n organizationId: string;\n};\n\nexport type QuoteUpdate = {\n status?: QuoteStatus;\n active?: boolean;\n};\n\nexport type CalculatorLeasingIO = {\n output: LeasingCalculatorOutput;\n input: LeasingCalculatorInput;\n rating?: MatchingRuleValue;\n};\nexport type CalculatorSalesIO = {\n output: SalesCalculatorOutput;\n input: SalesCalculatorInput;\n rating?: MatchingRuleValue;\n};\nexport type CalculatorQuoteIO = CalculatorLeasingIO | CalculatorSalesIO;\n\nexport type DeliveryLocationValue = Omit<LocationValue, 'addressLine1' | 'city'> & {\n addressLine1: string;\n city: string;\n};\n\nexport type DeliveryRoutesRequest = {\n origin: DeliveryLocationValue;\n destination: DeliveryLocationValue;\n};\n\ntype BaseCommission = {\n opportunityId: string;\n\n estimatedAmount: string;\n estimatedPaidAt: string;\n paidAmount?: string;\n paidAt?: string;\n\n notes?: string;\n};\n\nexport type NewCommission = BaseCommission & {};\n\nexport type Commission = BaseCommission & {\n stockNumber: string;\n vehicleId: string;\n\n branchId: string;\n currency: string;\n\n modifiedAt: string;\n modifiedBy: string;\n};\n\nexport type NewQuoteValidator = {\n userId: string;\n countryCode: string;\n type: OpportunityType;\n canValidateOwn?: boolean;\n};\n\nexport type QuoteValidator = NewQuoteValidator & {\n createdAt: string;\n};\n\nexport type QuoteValidatorUpdate = {\n canValidateOwn: boolean;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"quotes.js","sourceRoot":"/","sources":["types/quotes.ts"],"names":[],"mappings":"AAYA,MAAM,CAAN,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,iCAAiB,CAAA;IACjB,qCAAqB,CAAA;IACrB,+CAA+B,CAAA;IAC/B,iCAAiB,CAAA;AACnB,CAAC,EALW,YAAY,KAAZ,YAAY,QAKvB;AAED,MAAM,CAAN,IAAY,WASX;AATD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,sCAAuB,CAAA;IACvB,0CAA2B,CAAA;IAC3B,oCAAqB,CAAA;IACrB,oCAAqB,CAAA;IACrB,sCAAuB,CAAA;IACvB,mDAAoC,CAAA;IACpC,mDAAoC,CAAA;AACtC,CAAC,EATW,WAAW,KAAX,WAAW,QAStB;AAED,MAAM,CAAN,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,sCAAiB,CAAA;IACjB,wCAAmB,CAAA;IACnB,kCAAa,CAAA;AACf,CAAC,EAJW,iBAAiB,KAAjB,iBAAiB,QAI5B;AACD,MAAM,CAAN,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,mCAAkB,CAAA;IAClB,oCAAmB,CAAA;IACnB,8BAAa,CAAA;AACf,CAAC,EAJW,aAAa,KAAb,aAAa,QAIxB;AAED,MAAM,CAAN,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,8BAAe,CAAA;IACf,kCAAmB,CAAA;IACnB,qCAAsB,CAAA;AACxB,CAAC,EAJW,WAAW,KAAX,WAAW,QAItB;AAED,MAAM,CAAN,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,wCAAkB,CAAA;IAClB,6CAAuB,CAAA;AACzB,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B","sourcesContent":["import { AttachmentValue, LocationValue } from '@bisondesk/commons-sdk/types';\nimport { OpportunityType } from '../constants.js';\nimport {\n CustomLeasingQuoteExtraInput,\n CustomSalesQuoteExtraInput,\n LeasingDeliveryPackageInput,\n LeasingQuoteExtraInput,\n SalesQuoteExtraInput,\n} from './leasing-settings.js';\nimport { MatchingRuleValue } from './roi-ratings.js';\nimport { PricePercentageMode } from './utils.js';\n\nexport enum QuoteActions {\n ACCEPT = 'accept',\n VALIDATE = 'validate',\n DONWLOAD_PDFS = 'download-pdfs',\n CANCEL = 'cancel',\n}\n\nexport enum QuoteStatus {\n CREATED = 'created',\n VALIDATED = 'validated',\n INVALIDATED = 'invalidated',\n ACCEPTED = 'accepted',\n REJECTED = 'rejected',\n CANCELLED = 'cancelled',\n MANAGER_REJECTED = 'managerRejected',\n MANAGER_ACCEPTED = 'managerAccepted',\n}\n\nexport enum QuoteMetricsScore {\n DANGER = 'danger',\n NEUTRAL = 'neutral',\n GOOD = 'good',\n}\nexport enum DeliveryTypes {\n PICK_UP = 'pickUp',\n ADDRESS = 'address',\n PORT = 'port',\n}\n\nexport enum SpoilerInfo {\n MOUNT = 'mount',\n UNMOUNT = 'unmount',\n NO_ACTION = 'noAction',\n}\n\nexport enum TransportationMode {\n BY_ROAD = 'byRoad',\n ON_LOW_BED = 'onLowBed',\n}\n\ntype BaseQuoteCalculatorInput = {\n branchId: string;\n branchCountry: string;\n customerCountry: string;\n customerVatNumber?: string;\n currency: string;\n vehicle: {\n id: string;\n category: string;\n bodywork?: string;\n agreedPriceExclVat: string;\n technicalNotes?: string;\n };\n\n allRisksCost?: string;\n};\n\n// Sent by the Frontend to bootstrap the calculator\nexport type LeasingCalculatorDefaultInput = BaseQuoteCalculatorInput & {\n deliveryPackage?: LeasingQuoteExtraInput;\n};\n\nexport type LeasingCalculatorInput = BaseQuoteCalculatorInput & {\n localLicensePlate: boolean;\n vanCourier: boolean;\n vehicle: BaseQuoteCalculatorInput['vehicle'] & {\n purchasePriceExclVat: string;\n agreedPrice: string;\n purchasePrice: string;\n };\n leasing: {\n deposit: string;\n depositMode: PricePercentageMode;\n depositPercentage: string;\n residual: string;\n residualMode: PricePercentageMode;\n residualPercentage: string;\n startupFee: string;\n startupFeeMode: PricePercentageMode;\n startupFeePercentage: string;\n interestRate: string;\n duration: number;\n contractStartDate: string;\n };\n bank: {\n interestRate: string;\n deposit: string;\n depositMode: PricePercentageMode;\n depositPercentage: string;\n residual: string;\n residualMode: PricePercentageMode;\n residualPercentage: string;\n duration: number;\n salesPrice: string;\n };\n taxes: {\n yearlyRoadTax: boolean;\n oneTimeRoadTax: boolean;\n margin: string; //Non Editable, copies the value insurance > margin\n };\n insurance: {\n margin: string;\n civilLiabilities: boolean;\n allRisks: boolean;\n specialTechnicalInsurance: boolean;\n roadAssistance: boolean;\n initialFractionPercentage: string;\n };\n deliveryPackage?: LeasingDeliveryPackageInput;\n extras: LeasingQuoteExtraInput[];\n customRequests: CustomLeasingQuoteExtraInput[];\n};\n\ntype BaseDeliveryType = {\n agreedPrice: string;\n spoiler?: SpoilerInfo;\n stackingVehicleNeeded?: boolean;\n detailsStacking?: string;\n};\n\nexport type PickUpDeliveryType = BaseDeliveryType & {\n type: DeliveryTypes.PICK_UP;\n urgent: boolean;\n transportationMode?: TransportationMode;\n detailsBorderCrossing?: string;\n technicalControlNeeded: boolean;\n insuranceNeeded: boolean;\n transitPlateBelgiumNeeded: boolean;\n transitPlateAustriaNeeded: boolean;\n licensePlateNeeded: boolean;\n dateOfPickUpByCustomer?: string;\n};\n\nexport type AddressDeliveryType = BaseDeliveryType & {\n type: DeliveryTypes.ADDRESS;\n address: LocationValue;\n distanceKm: string;\n technicalControlNeeded: boolean;\n};\n\nexport type PortDeliverytype = BaseDeliveryType & {\n type: DeliveryTypes.PORT;\n portOriginId: string;\n portDestination?: string;\n shippingCompany?: string;\n portToPortCostPrice: string;\n portToPortMargin: string;\n};\n\n// Sent by the Frontend to bootstrap the calculator\nexport type SalesCalculatorDefaultInput = BaseQuoteCalculatorInput & {\n extras: SalesQuoteExtraInput[];\n customRequests: CustomSalesQuoteExtraInput[];\n};\n\nexport type SalesCalculatorInput = BaseQuoteCalculatorInput & {\n vehicle: BaseQuoteCalculatorInput['vehicle'] & {\n purchasePrice: string;\n purchasePriceExclVat: string;\n agreedPrice: string;\n premiumPrice?: string;\n vatRate: string;\n minimumPrice: string;\n internetPrice?: string;\n comissionCost: string;\n };\n delivery?: PickUpDeliveryType | AddressDeliveryType | PortDeliverytype;\n extras: SalesQuoteExtraInput[];\n customRequests: CustomSalesQuoteExtraInput[];\n};\n\nexport type SalesQuoteRuleInput = {\n minimumPrice: number;\n internetPrice: number;\n agreedPrice: number;\n premiumPrice: number;\n stockAge: number;\n};\n\nexport type LeasingCalculatorOutput = {\n vatApplicable: boolean;\n installment: string;\n installmentPrintable: string;\n totalMonthlyAmount: string;\n monthlyTaxesInsurance: string;\n beforeDeliveryExclVat: string;\n beforeDelivery: string;\n financingAmount: string;\n settingId: string;\n totalRetailAmount: string;\n finalSalesPrice: string;\n roi: {\n value: string;\n target: string;\n perYear: string;\n difference: string;\n score?: QuoteMetricsScore;\n };\n cashflow: {\n deficit: string;\n balanced: boolean;\n score: QuoteMetricsScore;\n };\n profitability: {\n leasing: string;\n vehicle: string;\n total: string;\n score: QuoteMetricsScore;\n };\n taxes: {\n yearlyRetailPrice: string;\n monthlyRetailPrice: string;\n yearlyRoadTax: string;\n oneTimeRoadTax: string;\n profit: string;\n };\n insurance: {\n beforeDelivery: string;\n yearlyRetailPrice: string;\n monthlyRetailPrice: string;\n civilLiabilities: string;\n allRisks: string;\n specialTechnicalInsurance: string;\n roadAssistance: string;\n profit: string;\n };\n trackAndTrace: {\n beforeDelivery: string;\n monthlyCost: string;\n installationCost: string; // currently this cost is being included as part of monthlyCost. In future, this will be a separate cost\n deviceCost: string; // same as above\n profit: string;\n };\n costs: {\n financingAmount: string;\n finalCostPrice: string;\n monhtly: string;\n };\n};\n\nexport type SalesCalculatorOutput = {\n totalRetailAmount: string;\n totalRetailAmountExclVat: string;\n retailAmounts: {\n vehicle: string;\n delivery: string;\n extras: string;\n };\n roi: { value: string; score?: QuoteMetricsScore };\n profit: {\n value: string;\n score: QuoteMetricsScore;\n };\n profitOverMin: {\n value: string;\n percentage: string;\n score: QuoteMetricsScore;\n };\n delivery: {\n retailPrice?: string;\n costPrice?: string;\n cleaningNeeded: boolean;\n cleaningNeededRetailPrice: string;\n transportationToPortRetailPrice?: string;\n };\n costs: {\n finalCostPrice: string;\n extras: string;\n delivery: string;\n };\n};\n\ntype BaseQuote = {\n opportunityId: string;\n preferredLanguage: string;\n clientNotes?: string;\n publicNotes?: string;\n} & (\n | {\n type: OpportunityType.LEASING;\n calculatorInput: LeasingCalculatorInput;\n calculatorOutput: LeasingCalculatorOutput;\n rating?: MatchingRuleValue;\n }\n | {\n type: OpportunityType.SALES;\n calculatorInput: SalesCalculatorInput;\n calculatorOutput: SalesCalculatorOutput;\n rating?: MatchingRuleValue;\n }\n);\n\nexport type NewQuote = BaseQuote & {\n id?: undefined;\n createdAt?: undefined;\n createdBy?: undefined;\n modifiedAt?: undefined;\n modifiedBy?: undefined;\n active: true;\n};\n\nexport type Quote = BaseQuote & {\n id: string;\n createdAt: string;\n createdBy: string;\n modifiedAt: string;\n modifiedBy: string;\n validationBy?: string;\n validationAt?: string;\n cancelledBy?: string;\n cancelledAt?: string;\n customerFeedbackAt?: string;\n customerFeedbackBy?: string;\n managerFeedbackAt?: string;\n managerFeedbackBy?: string;\n version: number;\n status: QuoteStatus;\n proformaPdf?: AttachmentValue;\n quotePdf?: AttachmentValue;\n salesAgreementPdf?: AttachmentValue;\n active: boolean;\n contactId: string;\n vehicleId: string;\n organizationId: string;\n};\n\nexport type QuoteUpdate = {\n status?: QuoteStatus;\n active?: boolean;\n};\n\nexport type CalculatorLeasingIO = {\n output: LeasingCalculatorOutput;\n input: LeasingCalculatorInput;\n rating?: MatchingRuleValue;\n};\nexport type CalculatorSalesIO = {\n output: SalesCalculatorOutput;\n input: SalesCalculatorInput;\n rating?: MatchingRuleValue;\n};\nexport type CalculatorQuoteIO = CalculatorLeasingIO | CalculatorSalesIO;\n\nexport type DeliveryLocationValue = Omit<LocationValue, 'addressLine1' | 'city'> & {\n addressLine1: string;\n city: string;\n};\n\nexport type DeliveryRoutesRequest = {\n origin: DeliveryLocationValue;\n destination: DeliveryLocationValue;\n};\n\ntype BaseCommission = {\n opportunityId: string;\n\n estimatedAmount: string;\n estimatedPaidAt: string;\n paidAmount?: string;\n paidAt?: string;\n\n notes?: string;\n};\n\nexport type NewCommission = BaseCommission & {};\n\nexport type Commission = BaseCommission & {\n stockNumber: string;\n vehicleId: string;\n\n branchId: string;\n currency: string;\n\n modifiedAt: string;\n modifiedBy: string;\n};\n\nexport type NewQuoteValidator = {\n userId: string;\n countryCode: string;\n type: OpportunityType;\n canValidateOwn?: boolean;\n};\n\nexport type QuoteValidator = NewQuoteValidator & {\n createdAt: string;\n};\n\nexport type QuoteValidatorUpdate = {\n canValidateOwn: boolean;\n};\n"]}
|
package/lib/utils/search.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export declare const mappings: {
|
|
|
21
21
|
getTitle: (entity: any) => string;
|
|
22
22
|
getTags: (entity: any) => (string | undefined)[];
|
|
23
23
|
getDescription?: (entity: any) => string;
|
|
24
|
+
getMeta?: (entity: any) => Record<string, any>;
|
|
24
25
|
};
|
|
25
26
|
};
|
|
26
27
|
export declare const getTagsForBusinessEntity: (businessEntityId: BusinessEntityIds, entity: GlobalBusinessEntity) => string[];
|
|
@@ -30,4 +31,6 @@ export declare const getDescriptionForSearchBusinessEntity: (businessEntityId: B
|
|
|
30
31
|
export declare const getMainEntityFromSearchEntity: (businessEntityId: BusinessEntityIds, entity: GlobalSearchEntity) => GlobalBusinessEntity;
|
|
31
32
|
export declare const getTitleForBusinessEntity: (businessEntityId: BusinessEntityIds, entity: GlobalBusinessEntity) => string;
|
|
32
33
|
export declare const getTitleForSearchBusinessEntity: (businessEntityId: BusinessEntityIds, searchEntity: GlobalSearchEntity) => string;
|
|
34
|
+
export declare const getMetaForBusinessEntity: (businessEntityId: BusinessEntityIds, entity: GlobalBusinessEntity) => Record<string, any> | undefined;
|
|
35
|
+
export declare const getMetaForSearchBusinessEntity: (businessEntityId: BusinessEntityIds, searchEntity: GlobalSearchEntity) => Record<string, any> | undefined;
|
|
33
36
|
//# sourceMappingURL=search.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.d.ts","sourceRoot":"/","sources":["utils/search.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE9D,MAAM,MAAM,oBAAoB,GAAG,WAAW,GAAG,OAAO,GAAG,YAAY,GAAG,eAAe,CAAC;AAC1F,MAAM,MAAM,kBAAkB,GAC1B,iBAAiB,GACjB,aAAa,GACb,kBAAkB,GAClB,qBAAqB,CAAC;AAE1B,eAAO,MAAM,sBAAsB,SAAU,YAAY,YAAY,OAAO;;;;;;;;aAe3E,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE;KACpB,GAAG,IAAI,iBAAiB,CAAC,CAAC,EAAE;QAC3B,aAAa,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,oBAAoB,CAAC;QACrD,QAAQ,EAAE,CAAC,MAAM,E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AO,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KAChD;CAuCF,CAAC;AAUF,eAAO,MAAM,wBAAwB,qBACjB,iBAAiB,UAC3B,oBAAoB,KAC3B,MAAM,EAA8E,CAAC;AAExF,eAAO,MAAM,8BAA8B,qBACvB,iBAAiB,UAC3B,kBAAkB,aAKzB,CAAC;AAEJ,eAAO,MAAM,+BAA+B,qBACxB,iBAAiB,UAC3B,oBAAoB,WAC4C,CAAC;AAE3E,eAAO,MAAM,qCAAqC,qBAC9B,iBAAiB,UAC3B,kBAAkB,WAS3B,CAAC;AAEF,eAAO,MAAM,6BAA6B,qBACtB,iBAAiB,UAC3B,kBAAkB,yBAC2B,CAAC;AAExD,eAAO,MAAM,yBAAyB,qBAClB,iBAAiB,UAC3B,oBAAoB,WACoB,CAAC;AAEnD,eAAO,MAAM,+BAA+B,qBACxB,iBAAiB,gBACrB,kBAAkB,WAK/B,CAAC;AAEJ,eAAO,MAAM,wBAAwB,qBACjB,iBAAiB,UAC3B,oBAAoB,oCACqB,CAAC;AAEpD,eAAO,MAAM,8BAA8B,qBACvB,iBAAiB,gBACrB,kBAAkB,oCAK/B,CAAC"}
|
package/lib/utils/search.js
CHANGED
|
@@ -19,11 +19,14 @@ export const mappings = {
|
|
|
19
19
|
[BusinessEntityIds.Opportunities]: {
|
|
20
20
|
getMainEntity: (entity) => entity.opportunity,
|
|
21
21
|
getTitle: (opp) => opp.id,
|
|
22
|
-
getDescription: (opp) =>
|
|
23
|
-
getCustomerInformation(opp.org, opp.contact)
|
|
24
|
-
opp.vehicle?.external.identification.stockNumber
|
|
25
|
-
|
|
26
|
-
getTags: (opp) => [opp.id],
|
|
22
|
+
getDescription: (opp) => {
|
|
23
|
+
const customer = getCustomerInformation(opp.org, opp.contact);
|
|
24
|
+
return joinWithSeparator([customer?.code, customer?.title, opp.vehicle?.external.identification.stockNumber].filter(Boolean));
|
|
25
|
+
},
|
|
26
|
+
getTags: (opp) => [opp.id, opp.status],
|
|
27
|
+
getMeta: (opp) => ({
|
|
28
|
+
status: opp.status,
|
|
29
|
+
}),
|
|
27
30
|
},
|
|
28
31
|
[BusinessEntityIds.Vehicles]: {
|
|
29
32
|
getMainEntity: (entity) => entity.vehicle,
|
|
@@ -62,4 +65,6 @@ export const getDescriptionForSearchBusinessEntity = (businessEntityId, entity)
|
|
|
62
65
|
export const getMainEntityFromSearchEntity = (businessEntityId, entity) => getMapping(businessEntityId).getMainEntity(entity);
|
|
63
66
|
export const getTitleForBusinessEntity = (businessEntityId, entity) => getMapping(businessEntityId).getTitle(entity);
|
|
64
67
|
export const getTitleForSearchBusinessEntity = (businessEntityId, searchEntity) => getTitleForBusinessEntity(businessEntityId, getMainEntityFromSearchEntity(businessEntityId, searchEntity));
|
|
68
|
+
export const getMetaForBusinessEntity = (businessEntityId, entity) => getMapping(businessEntityId).getMeta?.(entity);
|
|
69
|
+
export const getMetaForSearchBusinessEntity = (businessEntityId, searchEntity) => getMetaForBusinessEntity(businessEntityId, getMainEntityFromSearchEntity(businessEntityId, searchEntity));
|
|
65
70
|
//# sourceMappingURL=search.js.map
|
package/lib/utils/search.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.js","sourceRoot":"/","sources":["utils/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAcpD,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,GAAkB,EAAE,OAAiB,EAAE,EAAE;IAC9E,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAChB,OAAO;YACL,WAAW,EAAE,GAAG,CAAC,WAAW;YAC5B,KAAK,EAAE,GAAG,CAAC,IAAI;YACf,IAAI,EAAE,GAAG,CAAC,UAAU;SACrB,CAAC;IACJ,CAAC;IAED,IAAI,OAAO,IAA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,CAAC,MAAM,CAAC;QACrD,+BAA+B,CAC7B,gBAAgB,EAChB,6BAA6B,CAAC,gBAAgB,EAAE,MAAM,CAAC,CACxD,CACF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAC3C,gBAAmC,EACnC,MAA0B,EAC1B,EAAE,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;AAExD,MAAM,CAAC,MAAM,yBAAyB,GAAG,CACvC,gBAAmC,EACnC,MAA4B,EAC5B,EAAE,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAEnD,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAC7C,gBAAmC,EACnC,YAAgC,EAChC,EAAE,CACF,yBAAyB,CACvB,gBAAgB,EAChB,6BAA6B,CAAC,gBAAgB,EAAE,YAAY,CAAC,CAC9D,CAAC;AAEJ,MAAM,CAAC,MAAM,wBAAwB,GAAG,CACtC,gBAAmC,EACnC,MAA4B,EAC5B,EAAE,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC;AAEpD,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAC5C,gBAAmC,EACnC,YAAgC,EAChC,EAAE,CACF,wBAAwB,CACtB,gBAAgB,EAChB,6BAA6B,CAAC,gBAAgB,EAAE,YAAY,CAAC,CAC9D,CAAC","sourcesContent":["import { joinWithSeparator } from '@bisondesk/commons-sdk/formatting';\nimport { BusinessEntityIds } from '../constants.js';\nimport { Contact, Organization, SearchOrganization } from '../types/crm.js';\nimport { SearchLeasingContract } from '../types/leasing-search.js';\nimport { LeasingContract } from '../types/leasing.js';\nimport { Opportunity, SearchOpportunity } from '../types/opportunities.js';\nimport { SearchVehicle, Vehicle } from '../types/vehicles.js';\n\nexport type GlobalBusinessEntity = Opportunity | Vehicle | Organization | LeasingContract;\nexport type GlobalSearchEntity =\n | SearchOpportunity\n | SearchVehicle\n | SearchOrganization\n | SearchLeasingContract;\n\nexport const getCustomerInformation = (org?: Organization, contact?: Contact) => {\n if (org != null) {\n return {\n countryCode: org.countryCode,\n title: org.name,\n code: org.externalId,\n };\n }\n\n if (contact != null) {\n return {\n countryCode: contact.countryCode,\n title: [contact?.firstName, contact?.lastName].filter(Boolean).join(' '),\n };\n }\n};\n\nexport const mappings: {\n [key in BusinessEntityIds]?: {\n getMainEntity: (entity: any) => GlobalBusinessEntity;\n getTitle: (entity: any) => string;\n getTags: (entity: any) => (string | undefined)[];\n getDescription?: (entity: any) => string;\n getMeta?: (entity: any) => Record<string, any>;\n };\n} = {\n [BusinessEntityIds.Opportunities]: {\n getMainEntity: (entity: SearchOpportunity) => entity.opportunity,\n getTitle: (opp: Opportunity) => opp.id,\n getDescription: (opp: SearchOpportunity) => {\n const customer = getCustomerInformation(opp.org, opp.contact);\n return joinWithSeparator(\n [customer?.code, customer?.title, opp.vehicle?.external.identification.stockNumber].filter(\n Boolean\n )\n );\n },\n getTags: (opp: Opportunity) => [opp.id, opp.status],\n getMeta: (opp: Opportunity) => ({\n status: opp.status,\n }),\n },\n [BusinessEntityIds.Vehicles]: {\n getMainEntity: (entity: SearchVehicle) => entity.vehicle,\n getTitle: (vehicle: Vehicle) => vehicle.internal.description.title,\n getTags: (vehicle: Vehicle) => [\n // the order of the tags here is relevant for exact integration\n // see: packages/exact/src/service/purchase.ts\n vehicle.external.identification?.stockNumber,\n vehicle.internal.identification?.administrativeNumber,\n vehicle.external.identification?.vin,\n ],\n },\n [BusinessEntityIds.Organizations]: {\n getMainEntity: (entity: SearchOrganization) => entity.org,\n getTitle: (org: Organization) => org.name,\n getTags: (org: Organization) => [`${org.externalId}`, org.vatNumber],\n },\n [BusinessEntityIds.LeasingContracts]: {\n getMainEntity: (entity: SearchLeasingContract) => entity.contract,\n getTitle: (contract: LeasingContract) => contract.contractNumber ?? contract.id,\n getTags: (contract: LeasingContract) => [contract.contractNumber, contract.slbPartner],\n },\n};\n\nconst getMapping = (businessEntityId: BusinessEntityIds) => {\n const mapping = mappings[businessEntityId];\n if (!mapping) {\n throw new Error(`Invalid business entity id ${businessEntityId}`);\n }\n return mapping;\n};\n\nexport const getTagsForBusinessEntity = (\n businessEntityId: BusinessEntityIds,\n entity: GlobalBusinessEntity\n): string[] => getMapping(businessEntityId).getTags(entity).filter(Boolean) as string[];\n\nexport const getTagsForSearchBusinessEntity = (\n businessEntityId: BusinessEntityIds,\n entity: GlobalSearchEntity\n) =>\n getTagsForBusinessEntity(\n businessEntityId,\n getMainEntityFromSearchEntity(businessEntityId, entity)\n );\n\nexport const getDescriptionForBusinessEntity = (\n businessEntityId: BusinessEntityIds,\n entity: GlobalBusinessEntity\n) => joinWithSeparator(getTagsForBusinessEntity(businessEntityId, entity));\n\nexport const getDescriptionForSearchBusinessEntity = (\n businessEntityId: BusinessEntityIds,\n entity: GlobalSearchEntity\n) => {\n return (\n getMapping(businessEntityId).getDescription?.(entity) ??\n getDescriptionForBusinessEntity(\n businessEntityId,\n getMainEntityFromSearchEntity(businessEntityId, entity)\n )\n );\n};\n\nexport const getMainEntityFromSearchEntity = (\n businessEntityId: BusinessEntityIds,\n entity: GlobalSearchEntity\n) => getMapping(businessEntityId).getMainEntity(entity);\n\nexport const getTitleForBusinessEntity = (\n businessEntityId: BusinessEntityIds,\n entity: GlobalBusinessEntity\n) => getMapping(businessEntityId).getTitle(entity);\n\nexport const getTitleForSearchBusinessEntity = (\n businessEntityId: BusinessEntityIds,\n searchEntity: GlobalSearchEntity\n) =>\n getTitleForBusinessEntity(\n businessEntityId,\n getMainEntityFromSearchEntity(businessEntityId, searchEntity)\n );\n\nexport const getMetaForBusinessEntity = (\n businessEntityId: BusinessEntityIds,\n entity: GlobalBusinessEntity\n) => getMapping(businessEntityId).getMeta?.(entity);\n\nexport const getMetaForSearchBusinessEntity = (\n businessEntityId: BusinessEntityIds,\n searchEntity: GlobalSearchEntity\n) =>\n getMetaForBusinessEntity(\n businessEntityId,\n getMainEntityFromSearchEntity(businessEntityId, searchEntity)\n );\n"]}
|
package/package.json
CHANGED
package/src/types/crm.ts
CHANGED
package/src/types/quotes.ts
CHANGED
package/src/utils/search.ts
CHANGED
|
@@ -36,19 +36,24 @@ export const mappings: {
|
|
|
36
36
|
getTitle: (entity: any) => string;
|
|
37
37
|
getTags: (entity: any) => (string | undefined)[];
|
|
38
38
|
getDescription?: (entity: any) => string;
|
|
39
|
+
getMeta?: (entity: any) => Record<string, any>;
|
|
39
40
|
};
|
|
40
41
|
} = {
|
|
41
42
|
[BusinessEntityIds.Opportunities]: {
|
|
42
43
|
getMainEntity: (entity: SearchOpportunity) => entity.opportunity,
|
|
43
44
|
getTitle: (opp: Opportunity) => opp.id,
|
|
44
|
-
getDescription: (opp: SearchOpportunity) =>
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
)
|
|
51
|
-
|
|
45
|
+
getDescription: (opp: SearchOpportunity) => {
|
|
46
|
+
const customer = getCustomerInformation(opp.org, opp.contact);
|
|
47
|
+
return joinWithSeparator(
|
|
48
|
+
[customer?.code, customer?.title, opp.vehicle?.external.identification.stockNumber].filter(
|
|
49
|
+
Boolean
|
|
50
|
+
)
|
|
51
|
+
);
|
|
52
|
+
},
|
|
53
|
+
getTags: (opp: Opportunity) => [opp.id, opp.status],
|
|
54
|
+
getMeta: (opp: Opportunity) => ({
|
|
55
|
+
status: opp.status,
|
|
56
|
+
}),
|
|
52
57
|
},
|
|
53
58
|
[BusinessEntityIds.Vehicles]: {
|
|
54
59
|
getMainEntity: (entity: SearchVehicle) => entity.vehicle,
|
|
@@ -131,3 +136,17 @@ export const getTitleForSearchBusinessEntity = (
|
|
|
131
136
|
businessEntityId,
|
|
132
137
|
getMainEntityFromSearchEntity(businessEntityId, searchEntity)
|
|
133
138
|
);
|
|
139
|
+
|
|
140
|
+
export const getMetaForBusinessEntity = (
|
|
141
|
+
businessEntityId: BusinessEntityIds,
|
|
142
|
+
entity: GlobalBusinessEntity
|
|
143
|
+
) => getMapping(businessEntityId).getMeta?.(entity);
|
|
144
|
+
|
|
145
|
+
export const getMetaForSearchBusinessEntity = (
|
|
146
|
+
businessEntityId: BusinessEntityIds,
|
|
147
|
+
searchEntity: GlobalSearchEntity
|
|
148
|
+
) =>
|
|
149
|
+
getMetaForBusinessEntity(
|
|
150
|
+
businessEntityId,
|
|
151
|
+
getMainEntityFromSearchEntity(businessEntityId, searchEntity)
|
|
152
|
+
);
|