@bisondesk/core-sdk 1.0.493 → 1.0.494

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.
Files changed (48) hide show
  1. package/lib/constants.d.ts +2 -0
  2. package/lib/constants.d.ts.map +1 -1
  3. package/lib/constants.js +2 -0
  4. package/lib/constants.js.map +1 -1
  5. package/lib/types/activities.d.ts +15 -5
  6. package/lib/types/activities.d.ts.map +1 -1
  7. package/lib/types/activities.js +1 -0
  8. package/lib/types/activities.js.map +1 -1
  9. package/lib/types/internal-events.d.ts +2 -1
  10. package/lib/types/internal-events.d.ts.map +1 -1
  11. package/lib/types/internal-events.js +1 -0
  12. package/lib/types/internal-events.js.map +1 -1
  13. package/lib/types/journeys.d.ts +6 -0
  14. package/lib/types/journeys.d.ts.map +1 -1
  15. package/lib/types/journeys.js.map +1 -1
  16. package/lib/types/leasing-debtors.d.ts +202 -0
  17. package/lib/types/leasing-debtors.d.ts.map +1 -1
  18. package/lib/types/leasing-debtors.js +58 -1
  19. package/lib/types/leasing-debtors.js.map +1 -1
  20. package/lib/types/leasing-search.d.ts +1 -0
  21. package/lib/types/leasing-search.d.ts.map +1 -1
  22. package/lib/types/leasing-search.js.map +1 -1
  23. package/lib/types/leasing.d.ts +1 -22
  24. package/lib/types/leasing.d.ts.map +1 -1
  25. package/lib/types/leasing.js.map +1 -1
  26. package/lib/types/marketing.d.ts +0 -1
  27. package/lib/types/marketing.d.ts.map +1 -1
  28. package/lib/types/marketing.js +0 -1
  29. package/lib/types/marketing.js.map +1 -1
  30. package/lib/utils/debtors-dossiers.d.ts +15 -0
  31. package/lib/utils/debtors-dossiers.d.ts.map +1 -0
  32. package/lib/utils/debtors-dossiers.js +51 -0
  33. package/lib/utils/debtors-dossiers.js.map +1 -0
  34. package/lib/utils/search.d.ts +3 -2
  35. package/lib/utils/search.d.ts.map +1 -1
  36. package/lib/utils/search.js.map +1 -1
  37. package/package.json +1 -1
  38. package/src/constants.ts +2 -0
  39. package/src/types/activities.ts +49 -4
  40. package/src/types/internal-events.ts +1 -0
  41. package/src/types/journeys.ts +7 -0
  42. package/src/types/leasing-debtors.ts +309 -0
  43. package/src/types/leasing-search.ts +1 -0
  44. package/src/types/leasing.ts +0 -20
  45. package/src/types/marketing.ts +1 -1
  46. package/src/utils/debtors-dossiers.ts +73 -0
  47. package/src/utils/search.ts +9 -2
  48. package/tsconfig.tsbuildinfo +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"leasing-debtors.d.ts","sourceRoot":"/","sources":["types/leasing-debtors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAEjD,MAAM,MAAM,SAAS,GAAG;IACtB,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,qBAAqB,EAAE,MAAM,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,SAAS,EAAE,CAAC;IAGpB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,qBAAqB,EAAE,MAAM,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,YAAY,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,UAAU,CAAC;IACnB,MAAM,EAAE;QACN,cAAc,EAAE,MAAM,CAAC;QACvB,kBAAkB,EA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AC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;CACjD,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG,IAAI,CAC7C,QAAQ,CAAC,0BAA0B,EAAE,aAAa,CAAC,EACnD,WAAW,CACZ,GAAG;IACF,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;CACjD,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,oBAAoB,EAM3D,CAAC;AAEF,eAAO,MAAM,yBAAyB,gCAAgC,CAAC;AAEvE,eAAO,MAAM,8BAA8B,EAAE,MAAM,EAGlD,CAAC;AAEF,eAAO,MAAM,2BAA2B,UAGvC,CAAC"}
@@ -1,2 +1,59 @@
1
- export {};
1
+ export var DebtorsDossierStatus;
2
+ (function (DebtorsDossierStatus) {
3
+ DebtorsDossierStatus["AUTO_REMINDER"] = "auto_reminder";
4
+ DebtorsDossierStatus["OVERDUE"] = "overdue";
5
+ DebtorsDossierStatus["CONTACT_ATTEMPTED"] = "contact_attempted";
6
+ DebtorsDossierStatus["DIALOGUE"] = "dialogue";
7
+ DebtorsDossierStatus["PROMISE_TO_PAY"] = "promise_to_pay";
8
+ DebtorsDossierStatus["FAILURE"] = "failure";
9
+ DebtorsDossierStatus["RESOLVED"] = "resolved";
10
+ })(DebtorsDossierStatus || (DebtorsDossierStatus = {}));
11
+ export const debtorsDossierStatusToDateFieldMap = {
12
+ [DebtorsDossierStatus.AUTO_REMINDER]: null,
13
+ [DebtorsDossierStatus.OVERDUE]: { date: 'overdueAt', author: 'overdueBy' },
14
+ [DebtorsDossierStatus.CONTACT_ATTEMPTED]: { date: 'contactedAt', author: 'contactedBy' },
15
+ [DebtorsDossierStatus.DIALOGUE]: { date: 'dialogueAt', author: 'dialogueBy' },
16
+ [DebtorsDossierStatus.PROMISE_TO_PAY]: { date: 'promiseToPayAt', author: 'promiseToPayBy' },
17
+ [DebtorsDossierStatus.FAILURE]: { date: 'failedAt', author: 'failedBy' },
18
+ [DebtorsDossierStatus.RESOLVED]: { date: 'resolvedAt', author: 'resolvedBy' },
19
+ };
20
+ export var DebtorsDossierActions;
21
+ (function (DebtorsDossierActions) {
22
+ DebtorsDossierActions["SET_METADATA"] = "set_metadata";
23
+ DebtorsDossierActions["ADD_ACTIVITY"] = "add_activity";
24
+ DebtorsDossierActions["FINISH"] = "finish";
25
+ DebtorsDossierActions["SET_DOCUMENTS"] = "set_documents";
26
+ DebtorsDossierActions["SET_PAYMENT_PLAN"] = "set_payment_plan";
27
+ DebtorsDossierActions["SET_LEGAL_DOSSIER"] = "set_legal_dossier";
28
+ })(DebtorsDossierActions || (DebtorsDossierActions = {}));
29
+ export var LegalDossierStatus;
30
+ (function (LegalDossierStatus) {
31
+ LegalDossierStatus["ASSESSMENT"] = "assessment";
32
+ LegalDossierStatus["PRE_LEGAL_NOTICE"] = "pre_legal_notice";
33
+ LegalDossierStatus["SENT_TO_LAWYER"] = "sent_to_lawyer";
34
+ LegalDossierStatus["FILED"] = "filed";
35
+ LegalDossierStatus["IN_COURT"] = "in_court";
36
+ LegalDossierStatus["JUDGMENT"] = "judgment";
37
+ LegalDossierStatus["ENFORCEMENT"] = "enforcement";
38
+ LegalDossierStatus["SETTLEMENT"] = "settlement";
39
+ LegalDossierStatus["CLOSED_RECOVERED"] = "closed_recovered";
40
+ LegalDossierStatus["CLOSED_UNRECOVERABLE"] = "closed_unrecoverable";
41
+ LegalDossierStatus["ON_HOLD"] = "on_hold";
42
+ })(LegalDossierStatus || (LegalDossierStatus = {}));
43
+ export const DebtorsDossierStatusOrder = [
44
+ DebtorsDossierStatus.AUTO_REMINDER,
45
+ DebtorsDossierStatus.OVERDUE,
46
+ DebtorsDossierStatus.CONTACT_ATTEMPTED,
47
+ DebtorsDossierStatus.DIALOGUE,
48
+ DebtorsDossierStatus.PROMISE_TO_PAY,
49
+ ];
50
+ export const DebtorsDossierWonColumnId = DebtorsDossierStatus.RESOLVED;
51
+ export const DebtorsDossierKanbanEndColumns = [
52
+ DebtorsDossierStatus.RESOLVED,
53
+ DebtorsDossierStatus.FAILURE,
54
+ ];
55
+ export const DebtorsDossierKanbanColumns = [
56
+ ...DebtorsDossierStatusOrder,
57
+ ...DebtorsDossierKanbanEndColumns,
58
+ ];
2
59
  //# sourceMappingURL=leasing-debtors.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"leasing-debtors.js","sourceRoot":"/","sources":["types/leasing-debtors.ts"],"names":[],"mappings":"","sourcesContent":["import { Contact, Organization } from './crm.js';\n\nexport type MonthData = {\n activeContractIds: string[];\n date: string; // YYYY-MM\n overdueAmount: string;\n unpaidAmount: string;\n overdueContractIds: string[];\n overdueInvoiceIds: string[];\n riskLevel: number;\n monthlyInvoicedAmount: string;\n};\n\nexport type DebtorInfo = {\n clientId: string;\n months: MonthData[];\n\n // properties related to the current month\n activeContracts: number;\n overdueAmount: string;\n unpaidAmount: string;\n overdueContracts: number;\n riskLevel: number;\n monthlyInvoicedAmount: string;\n};\n\nexport type SearchDebtorInfo = {\n org: Organization;\n contact?: Contact;\n debtor: DebtorInfo;\n custom: {\n riskLevelLabel: string;\n hasActiveContracts: boolean;\n };\n};\n"]}
1
+ {"version":3,"file":"leasing-debtors.js","sourceRoot":"/","sources":["types/leasing-debtors.ts"],"names":[],"mappings":"AAyCA,MAAM,CAAN,IAAY,oBAQX;AARD,WAAY,oBAAoB;IAC9B,uDAA+B,CAAA;IAC/B,2CAAmB,CAAA;IACnB,+DAAuC,CAAA;IACvC,6CAAqB,CAAA;IACrB,yDAAiC,CAAA;IACjC,2CAAmB,CAAA;IACnB,6CAAqB,CAAA;AACvB,CAAC,EARW,oBAAoB,KAApB,oBAAoB,QAQ/B;AAED,MAAM,CAAC,MAAM,kCAAkC,GAG3C;IACF,CAAC,oBAAoB,CAAC,aAAa,CAAC,EAAE,IAAI;IAC1C,CAAC,oBAAoB,CAAC,OAAO,CAAC,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,WAA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AAQ;IAC7B,oBAAoB,CAAC,cAAc;CACpC,CAAC;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAAG,oBAAoB,CAAC,QAAQ,CAAC;AAEvE,MAAM,CAAC,MAAM,8BAA8B,GAAa;IACtD,oBAAoB,CAAC,QAAQ;IAC7B,oBAAoB,CAAC,OAAO;CAC7B,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,GAAG,yBAAyB;IAC5B,GAAG,8BAA8B;CAClC,CAAC","sourcesContent":["import { EmailMessage } from '@bisondesk/commons-sdk/messages';\nimport { NextList, PaginatedList } from '@bisondesk/commons-sdk/types';\nimport { Contact, Organization } from './crm.js';\nimport { LeasingContract } from './leasing.js';\nimport { BaseSearchRequest, SortFilter } from './search.js';\nimport { DataRecord, ReferenceData } from './utils.js';\n\nexport type MonthData = {\n activeContractIds: string[];\n date: string; // YYYY-MM\n overdueAmount: string;\n unpaidAmount: string;\n overdueContractIds: string[];\n overdueInvoiceIds: string[];\n riskLevel: number;\n monthlyInvoicedAmount: string;\n};\n\nexport type DebtorInfo = {\n clientId: string;\n months: MonthData[];\n\n // properties related to the current month\n activeContracts: number;\n overdueAmount: string;\n unpaidAmount: string;\n overdueContracts: number;\n riskLevel: number;\n monthlyInvoicedAmount: string;\n};\n\nexport type SearchDebtorInfo = {\n org: Organization;\n contact?: Contact;\n debtor: DebtorInfo;\n custom: {\n riskLevelLabel: string;\n hasActiveContracts: boolean;\n };\n};\n\nexport enum DebtorsDossierStatus {\n AUTO_REMINDER = 'auto_reminder',\n OVERDUE = 'overdue',\n CONTACT_ATTEMPTED = 'contact_attempted',\n DIALOGUE = 'dialogue',\n PROMISE_TO_PAY = 'promise_to_pay',\n FAILURE = 'failure',\n RESOLVED = 'resolved',\n}\n\nexport const debtorsDossierStatusToDateFieldMap: Record<\n DebtorsDossierStatus,\n { date: keyof DossierStatusLogFields; author: keyof DossierStatusLogFields } | null\n> = {\n [DebtorsDossierStatus.AUTO_REMINDER]: null,\n [DebtorsDossierStatus.OVERDUE]: { date: 'overdueAt', author: 'overdueBy' },\n [DebtorsDossierStatus.CONTACT_ATTEMPTED]: { date: 'contactedAt', author: 'contactedBy' },\n [DebtorsDossierStatus.DIALOGUE]: { date: 'dialogueAt', author: 'dialogueBy' },\n [DebtorsDossierStatus.PROMISE_TO_PAY]: { date: 'promiseToPayAt', author: 'promiseToPayBy' },\n [DebtorsDossierStatus.FAILURE]: { date: 'failedAt', author: 'failedBy' },\n [DebtorsDossierStatus.RESOLVED]: { date: 'resolvedAt', author: 'resolvedBy' },\n};\n\n/******\n * Auto Follow-Up Types\n ******/\n\nexport type DebtorAutoFollowUp = {\n id: string;\n organizationId: string;\n organizationName: string;\n status: 'ONGOING' | 'ERROR' | 'SUCCESS' | 'EXPIRED' | 'DISCARDED';\n emails: EmailMessage[];\n createdAt: string;\n modifiedAt: string;\n completedAt?: string;\n nextActionAt: string;\n riskLevel: number;\n};\n\nexport type ListOverdueRemindersResponse = PaginatedList<DebtorAutoFollowUp, ReferenceData>;\nexport type ListOverdueRemindersRequest = {\n offset: number;\n limit: number;\n sortBy: SortFilter;\n};\n\n/******\n * Debtor Dossier Types\n ******/\n\nexport enum DebtorsDossierActions {\n SET_METADATA = 'set_metadata',\n ADD_ACTIVITY = 'add_activity',\n FINISH = 'finish',\n SET_DOCUMENTS = 'set_documents',\n SET_PAYMENT_PLAN = 'set_payment_plan',\n SET_LEGAL_DOSSIER = 'set_legal_dossier',\n}\n\nexport type DossierStatusLogFields = {\n failedAt?: string;\n failedBy?: string;\n resolvedAt?: string;\n contactedAt?: string;\n contactedBy?: string;\n overdueAt?: string;\n overdueBy?: string;\n resolvedBy?: string;\n dialogueAt?: string;\n dialogueBy?: string;\n promiseToPayAt?: string;\n promiseToPayBy?: string;\n};\n\nexport type BaseDebtorsDossier = {\n organizationId: string;\n contactId?: string;\n tags: string[];\n origin: 'manual' | 'auto';\n autoFollowUpId?: string;\n administrativeUserId?: string;\n branchId: string;\n tenantId: string;\n};\nexport type DebtorsDossierStatusAudit = {\n from: DebtorsDossierStatus;\n to: DebtorsDossierStatus;\n changedAt: string;\n changedBy: string;\n};\n\nexport type DebtorsDossier = BaseDebtorsDossier &\n DossierStatusLogFields & {\n id: string;\n createdAt: string;\n createdBy: string;\n updatedAt: string;\n updatedBy: string;\n status: DebtorsDossierStatus;\n statusAudit: DebtorsDossierStatusAudit[];\n };\n\nexport type NewDebtorsDossier = BaseDebtorsDossier & {\n id?: undefined;\n createdBy?: undefined;\n createdAt?: undefined;\n updatedBy?: undefined;\n updatedAt?: undefined;\n};\n\nexport type DebtorsDossierBff = {\n dossier: DataRecord<DebtorsDossier>;\n organization?: Organization;\n contact?: Contact;\n leasingContracts: LeasingContract[];\n debt?: DebtorInfo;\n paymentPlan?: DebtorsPaymentPlan;\n legalDossier?: LegalDossier;\n trackAndTraceDevices: {\n /* odometer: TrackAndTraceOdometerData;\n device: TrackAndTraceDevice; */\n }[];\n};\n\nexport type UpdateDebtorsDossier = Partial<\n Pick<\n DebtorsDossier,\n 'status' | 'tags' | 'contactId' | 'administrativeUserId' | 'branchId' | 'organizationId'\n >\n> & {\n overdue?: boolean;\n resolve?: boolean;\n terminate?: boolean;\n};\n\n/******\n * Payment Plan Types\n ******/\n\nexport type DebtorsPaymentPlan = {\n id: string;\n debtorDossierId: string;\n\n notes?: string;\n\n reminders?: {\n frequency: {\n every: number;\n period: 'days' | 'weeks' | 'months';\n };\n endCondition:\n | {\n endDate: string; // ISO date string\n }\n | {\n occurrences: number; // Number of reminders to send\n };\n };\n\n createdAt: string;\n createdBy: string;\n updatedAt: string;\n updatedBy: string;\n};\n\nexport type NewPaymentPlan = Omit<\n DebtorsPaymentPlan,\n 'id' | 'createdAt' | 'updatedAt' | 'createdBy' | 'updatedBy'\n>;\n\nexport type UpdatePaymentPlan = Partial<Pick<DebtorsPaymentPlan, 'notes' | 'reminders'>>;\n\n/******\n * Legal Dossier Types\n ******/\n\nexport enum LegalDossierStatus {\n ASSESSMENT = 'assessment',\n PRE_LEGAL_NOTICE = 'pre_legal_notice',\n SENT_TO_LAWYER = 'sent_to_lawyer',\n FILED = 'filed',\n IN_COURT = 'in_court',\n JUDGMENT = 'judgment',\n ENFORCEMENT = 'enforcement',\n SETTLEMENT = 'settlement',\n CLOSED_RECOVERED = 'closed_recovered',\n CLOSED_UNRECOVERABLE = 'closed_unrecoverable',\n ON_HOLD = 'on_hold',\n}\n\nexport type LegalDossier = {\n id: string;\n debtorDossierId: string;\n caseNumber?: string;\n notes?: string;\n createdAt: string;\n createdBy: string;\n updatedAt: string;\n updatedBy: string;\n status: LegalDossierStatus;\n};\n\nexport type NewLegalDossier = Omit<\n LegalDossier,\n 'id' | 'createdAt' | 'updatedAt' | 'createdBy' | 'updatedBy'\n>;\n\nexport type UpdateLegalDossier = Partial<Pick<LegalDossier, 'caseNumber' | 'status' | 'notes'>>;\n\n/******\n * Debtor Dossier Events\n ******/\n\nexport type DebtorsDossierCreateEvent = {\n action: 'created';\n data: DebtorsDossier;\n previousData?: undefined;\n tenantId: string;\n userId: string;\n};\n\nexport type DebtorsDossierUpdateEvent = {\n action: 'updated';\n data: DebtorsDossier;\n previousData: DebtorsDossier;\n tenantId: string;\n userId: string;\n};\n\nexport type DebtorsDossierDeleteEvent = {\n action: 'deleted';\n data?: undefined;\n previousData: DebtorsDossier;\n tenantId: string;\n userId: string;\n};\n\nexport type DebtorsDossierEvent =\n | DebtorsDossierCreateEvent\n | DebtorsDossierUpdateEvent\n | DebtorsDossierDeleteEvent;\n\n/************\n *\n * Search\n */\n\nexport type SearchDebtorsDossier = {\n contact?: Contact;\n debtorsDossier: DebtorsDossier;\n org?: Organization;\n legalDossier?: LegalDossier;\n paymentPlan?: DebtorsPaymentPlan;\n};\n\n/************\n *\n * Kanban\n */\n\nexport type DebtorsDossierKanbanColumn = {\n status: string;\n results: SearchDebtorsDossier[];\n totalCount: number;\n totalValue: string;\n};\n\nexport type MSearchDebtorsDossierKanbanColumn = {\n column: DebtorsDossierKanbanColumn;\n nextToken?: string;\n};\n\nexport type KanbanDebtorsDossierSearchRequest = BaseSearchRequest & {\n nextTokens?: Record<string, string | undefined>;\n};\n\nexport type KanbanDebtorsDossierNextList = Omit<\n NextList<DebtorsDossierKanbanColumn, ReferenceData>,\n 'nextToken'\n> & {\n nextTokens?: Record<string, string | undefined>;\n};\n\nexport const DebtorsDossierStatusOrder: DebtorsDossierStatus[] = [\n DebtorsDossierStatus.AUTO_REMINDER,\n DebtorsDossierStatus.OVERDUE,\n DebtorsDossierStatus.CONTACT_ATTEMPTED,\n DebtorsDossierStatus.DIALOGUE,\n DebtorsDossierStatus.PROMISE_TO_PAY,\n];\n\nexport const DebtorsDossierWonColumnId = DebtorsDossierStatus.RESOLVED;\n\nexport const DebtorsDossierKanbanEndColumns: string[] = [\n DebtorsDossierStatus.RESOLVED,\n DebtorsDossierStatus.FAILURE,\n];\n\nexport const DebtorsDossierKanbanColumns = [\n ...DebtorsDossierStatusOrder,\n ...DebtorsDossierKanbanEndColumns,\n];\n"]}
@@ -19,6 +19,7 @@ export type SearchLeasingContract = {
19
19
  insurance?: InsuranceEntry;
20
20
  externalTracking?: boolean;
21
21
  accountManager?: string;
22
+ lastIssuedInvoiceDate?: string;
22
23
  };
23
24
  };
24
25
  export type InputSearchLeasingContract = SearchLeasingContract;
@@ -1 +1 @@
1
- {"version":3,"file":"leasing-search.d.ts","sourceRoot":"/","sources":["types/leasing-search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,MAAM,MAAM,8BAA8B,GAAG;IAC3C,qBAAqB,EAAE,sBAAsB,CAAC;CA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BAAgB,CAAC,EAAE,OAAO,CAAC;QAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,qBAAqB,CAAC,EAAE,MAAM,CAAC;KAChC,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG,qBAAqB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"leasing-search.js","sourceRoot":"/","sources":["types/leasing-search.ts"],"names":[],"mappings":"","sourcesContent":["import { InsuranceEntry } from '@bisondesk/commons-sdk/insurance';\nimport { Contact, Organization } from './crm.js';\nimport { PublicSearchDefinition } from './definitions.js';\nimport { LeasingContract } from './leasing.js';\nimport { Vehicle } from './vehicles.js';\n\nexport type LeasingPublicSearchDefinitions = {\n searchLeasingContract: PublicSearchDefinition;\n};\n\nexport type LeasingDebtorsSearchDefinitions = {\n debtors: PublicSearchDefinition;\n};\n\nexport type SearchLeasingContract = {\n contract: LeasingContract;\n org: Organization;\n contact?: Contact;\n vehicle: Vehicle;\n custom: {\n active: boolean;\n insurance?: InsuranceEntry;\n externalTracking?: boolean;\n accountManager?: string;\n };\n};\n\nexport type InputSearchLeasingContract = SearchLeasingContract;\n"]}
1
+ {"version":3,"file":"leasing-search.js","sourceRoot":"/","sources":["types/leasing-search.ts"],"names":[],"mappings":"","sourcesContent":["import { InsuranceEntry } from '@bisondesk/commons-sdk/insurance';\nimport { Contact, Organization } from './crm.js';\nimport { PublicSearchDefinition } from './definitions.js';\nimport { LeasingContract } from './leasing.js';\nimport { Vehicle } from './vehicles.js';\n\nexport type LeasingPublicSearchDefinitions = {\n searchLeasingContract: PublicSearchDefinition;\n};\n\nexport type LeasingDebtorsSearchDefinitions = {\n debtors: PublicSearchDefinition;\n};\n\nexport type SearchLeasingContract = {\n contract: LeasingContract;\n org: Organization;\n contact?: Contact;\n vehicle: Vehicle;\n custom: {\n active: boolean;\n insurance?: InsuranceEntry;\n externalTracking?: boolean;\n accountManager?: string;\n lastIssuedInvoiceDate?: string;\n };\n};\n\nexport type InputSearchLeasingContract = SearchLeasingContract;\n"]}
@@ -1,8 +1,5 @@
1
- import { EmailMessage } from '@bisondesk/commons-sdk/messages';
2
- import { AttachmentValue, Document, LinkValue, PaginatedList } from '@bisondesk/commons-sdk/types';
1
+ import { AttachmentValue, Document, LinkValue } from '@bisondesk/commons-sdk/types';
3
2
  import { BaseEvent } from './internal-events.js';
4
- import { SortFilter } from './search.js';
5
- import { ReferenceData } from './utils.js';
6
3
  export declare enum LeasingContractActions {
7
4
  CREATE_FINANCE_DOCUMENT = "create_finance_document",
8
5
  START_RETAKE_VEHICLE = "start_retake_vehicle",
@@ -36,18 +33,6 @@ export type LeasingConditionEvent = {
36
33
  userId: string;
37
34
  tenantId: string;
38
35
  };
39
- export type OverdueDossier = {
40
- id: string;
41
- organizationId: string;
42
- organizationName: string;
43
- status: 'ONGOING' | 'ERROR' | 'SUCCESS' | 'EXPIRED' | 'DISCARDED';
44
- emails: EmailMessage[];
45
- createdAt: string;
46
- modifiedAt: string;
47
- completedAt?: string;
48
- nextActionAt: string;
49
- riskLevel: number;
50
- };
51
36
  export type LeasingContractClient = {
52
37
  organizationId: string;
53
38
  contactIds: string[];
@@ -162,12 +147,6 @@ export type OpportunityRef = BaseRef & {
162
147
  createdAt: string;
163
148
  quoteId: string;
164
149
  };
165
- export type ListOverdueRemindersResponse = PaginatedList<OverdueDossier, ReferenceData>;
166
- export type ListOverdueRemindersRequest = {
167
- offset: number;
168
- limit: number;
169
- sortBy: SortFilter;
170
- };
171
150
  export type NewLeasingConditions = {
172
151
  parameters: {
173
152
  yearlyRoadTax: string;
@@ -1 +1 @@
1
- {"version":3,"file":"leasing.d.ts","sourceRoot":"/","sources":["types/leasing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AACnG,OAAO,EAAE,SAAS,EAAE,MAAM,s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;AAgGD,MAAM,CAAN,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC9B,6DAAqC,CAAA;IACrC,2CAAmB,CAAA;AACrB,CAAC,EAHW,oBAAoB,KAApB,oBAAoB,QAG/B","sourcesContent":["import { EmailMessage } from '@bisondesk/commons-sdk/messages';\nimport { AttachmentValue, Document, LinkValue, PaginatedList } from '@bisondesk/commons-sdk/types';\nimport { BaseEvent } from './internal-events.js';\nimport { SortFilter } from './search.js';\nimport { ReferenceData } from './utils.js';\n\nexport enum LeasingContractActions {\n CREATE_FINANCE_DOCUMENT = 'create_finance_document',\n START_RETAKE_VEHICLE = 'start_retake_vehicle',\n END_RETAKE_VEHICLE = 'end_retake_vehicle',\n START_CONTRACT_END = 'start_contract_end',\n END_CONTRACT = 'end_contract',\n CANCEL_RETAKE_VEHICLE = 'cancel_retake_vehicle',\n}\n\nexport type LeasingContractDebtInfo = {\n overdueSince?: string;\n overdueInvoices: number;\n overdueAmount: string;\n unpaidInvoices: number;\n unpaidAmount: string;\n};\n\nexport type LeasingContractEvent = {\n id: string;\n action: 'create' | 'update' | 'delete';\n actionAt: string;\n userId: string;\n tenantId: string;\n contract: LeasingContract;\n};\n\nexport type LeasingContractImportEvent = {\n tenantId: string;\n};\n\nexport type LeasingConditionEvent = {\n id: string;\n action: 'create';\n actionAt: string;\n userId: string;\n tenantId: string;\n};\n\nexport type OverdueDossier = {\n id: string;\n organizationId: string;\n organizationName: string;\n status: 'ONGOING' | 'ERROR' | 'SUCCESS' | 'EXPIRED' | 'DISCARDED';\n emails: EmailMessage[];\n createdAt: string;\n modifiedAt: string;\n completedAt?: string;\n nextActionAt: string;\n riskLevel: number;\n};\n\nexport type LeasingContractClient = {\n organizationId: string;\n contactIds: string[];\n email?: string;\n since: string;\n takeoverId?: string;\n country: string;\n beEntityType?: 'Legal Person' | 'Natural Person';\n beForeignEntity?: boolean;\n\n /**\n * Used to overwrite the startDate in the context of a Becris declaration. This might be necessary\n * when due to some data-quality issue we do not report the contract at the right period and it is no\n * longer possible to resend the declaration for the corresponding month.\n */\n becrisStartDate?: string;\n};\n\nexport enum LeasingContractSource {\n HYPERPORTAL = 'hyperportal',\n BISONDESK = 'bisondesk',\n}\n\nexport enum LeasingContractStatus {\n DRAFT = 'draft',\n DISCARDED = 'discarded',\n PAUSED = 'paused',\n ACTIVE = 'active', // getDbLeasingContractByStockNumber uses ordering by status if this changes update there\n LEASING_RETURN = 'leasing_return',\n RECOVERED = 'recovered',\n ENDING = 'ending',\n ENDED = 'ended',\n}\n\nexport type LeasingContractHyperportal = {\n source: LeasingContractSource.HYPERPORTAL;\n /** oldest first **/\n conditions: ConditionsRef[];\n opportunities?: undefined;\n};\n\nexport type LeasingContractBisondesk = {\n source: LeasingContractSource.BISONDESK;\n conditions?: undefined;\n /** oldest first **/\n opportunities: OpportunityRef[];\n};\n\ntype BaseLeasingContract<T = LeasingContractHyperportal | LeasingContractBisondesk> = {\n id: string;\n createdAt: string;\n updatedAt: string;\n contractNumber?: string;\n startDate: string;\n deliveryDate?: string;\n endDate?: string;\n links?: LinkValue[];\n accountManager?: string;\n clients: LeasingContractClient[];\n hasSlbPartnerAmortisationTable?: boolean;\n slbPartner?: string;\n slbBankAccountOrganizationId?: string;\n slbContractNumber?: string;\n slbContractAmount?: string;\n externalTracking?: boolean;\n vehicle: {\n id: string;\n stockNumber: string;\n administrativeNumber?: string;\n retake?: {\n date?: string;\n actionBy: string;\n actionAt: string;\n startedAt?: string;\n startedBy?: string;\n completedAt?: string;\n completedBy?: string;\n clonedVehicleId?: string;\n totalLoss?: boolean;\n };\n };\n status: LeasingContractStatus;\n documents: Document[];\n} & T;\n\nexport type LeasingContract<T = LeasingContractHyperportal | LeasingContractBisondesk> =\n BaseLeasingContract<T> & {\n readonly expectedEndDate: string;\n readonly debt: LeasingContractDebtInfo;\n };\n\nexport type NewLeasingContract<T = LeasingContractHyperportal | LeasingContractBisondesk> =\n BaseLeasingContract<T> & {\n readonly expectedEndDate?: string | undefined;\n readonly debt?: LeasingContractDebtInfo | undefined;\n };\n\nexport type NextLeasingRentRowRequest = {\n vehicleId: string;\n organizationId: string;\n issueDate: string;\n};\n\nexport type NextLeasingRentRowResponse = {\n capital: string;\n contract: string;\n insurance?: string;\n interest: string;\n other?: string; // insurance + taxes + others\n period: number;\n taxes?: string;\n total: string;\n};\n\ntype BaseRef = {\n id: string;\n depositAmount: string;\n durationInMonths: number;\n taxesAmount?: string;\n insuranceAmount?: string;\n saleAmount: string; // includes the extras\n interestRate: string; //TODO: In LC from BD value is percentage, in LC from HP value is decimal\n residualAmount: string;\n leasingMonthlyAmount: string; // excluding VAT\n otherMonthlyAmounts: string; // insurance + taxes + others (excluding VAT)\n totalMonthlyAmount: string; // excluding VAT\n};\n\nexport type ConditionsRef = BaseRef & {\n validSince: string;\n};\n\nexport type OpportunityRef = BaseRef & {\n createdAt: string;\n quoteId: string;\n //Since VAT is client specific and contracts can be transferred between clients, we always handle values without VAT\n};\n\nexport type ListOverdueRemindersResponse = PaginatedList<OverdueDossier, ReferenceData>;\nexport type ListOverdueRemindersRequest = {\n offset: number;\n limit: number;\n sortBy: SortFilter;\n};\n\nexport type NewLeasingConditions = {\n parameters: {\n yearlyRoadTax: string;\n civilLiability: string;\n oneTimeRoadTax: string;\n specialInsurance: string;\n allRisksPercentage: string;\n allRisksTaxPercentage: string;\n };\n\n inputs: {\n deposit: string;\n salesPrice: string;\n bankDeposit: string;\n purchasePrice: string;\n residualValue: string;\n insuranceAmount: string;\n durationInMonths: number;\n includesAllRisks: boolean;\n marginPercentage: string;\n bankResidualValue: string;\n bankDurationInMonths: number;\n startupFeePercentage: string;\n includesYearlyRoadTax: boolean;\n includesCivilLiability: boolean;\n includesOneTimeRoadTax: boolean;\n interestRatePercentage: string;\n includesSpecialInsurance: boolean;\n monthlyAdministrationFee: string;\n bankInterestRatePercentage: string;\n };\n\n outputs: {\n ROI: string;\n ROITarget: string;\n ROIPerYear: string;\n cashDeficit: string;\n totalProfit: string;\n ROIDifference: string;\n leasingAmount: string;\n leasingProfit: string;\n vehicleProfit: string;\n oneTimeTaxCost: string;\n financingAmount: string;\n bankContractValue: string;\n bankLeasingAmount: string;\n totalMonthlyPayment: string;\n leasingContractValue: string;\n monthlyTaxRetailPrice: string;\n allRisksInsuranceAmount: string;\n };\n\n cashIn: Array<{\n time: string;\n cashIn: string;\n deposit: string;\n startupFee: string;\n taxPayment: string;\n residualValue: string;\n cumulativeCash: string;\n insurancePayment: string;\n monthlyAdministrationFee: string;\n leasingAmountWithoutAdminFee: string;\n }>;\n\n cashOut: Array<{\n time: string;\n cashOut: string;\n deposit: string;\n taxPayment: string;\n leasingAmount: string;\n residualValue: string;\n cumulativeCash: string;\n insurancePayment: string;\n }>;\n};\n\nexport type LeasingConditions = NewLeasingConditions & {\n id: string;\n createdAt: string;\n createdBy: string;\n amortization: AmortizationTable;\n};\n\nexport type AmortizationRow = {\n period: number;\n /* An estimate of the date in which the period will happen\n based on the contract start date. Empty for period zero. */\n expectedPeriodDate?: string;\n buyOff: string;\n payment: string;\n capital: string;\n interest: string;\n totalInterest: string;\n balance: string;\n};\n\nexport type AmortizationTable = {\n annualInterestRate?: string;\n monthlyInterestRate?: string;\n rows: AmortizationRow[];\n};\n\nexport type AmortizationDocsEvent = BaseEvent & {\n contractId: string;\n changedDocumentIds: string[];\n actionAt: string;\n userId: string;\n tenantId: string;\n};\n\nexport type AmortizationDocs = {\n contractId: string;\n period: number;\n documents: AmortizationDoc[];\n};\n\n/* for a given document in what contract and periods it is */\nexport type DocumentAmortizationData = {\n contractId: string;\n periods: number[];\n};\n\nexport type AmortizationDoc = {\n amount: string;\n bookingNumber: string;\n branchId: string;\n documentId: string;\n issueDate: string;\n subtype: 'Invoice' | 'Credit Note';\n clientExternalId: number;\n};\n\nexport type BecrisDeclaration = {\n createdAt: string;\n endDate: string;\n endingInstruments: number;\n existingInstruments: number;\n file: AttachmentValue;\n id: string;\n newInstruments: number;\n startDate: string;\n};\n\nexport type LeasingReportingSettings = {\n active: boolean;\n branchId: string;\n tenantId: string;\n};\n\nexport enum LeasingRemindersSortableColumns {\n NextActionAt = 'next_action_at',\n OrganizationName = 'organization_name',\n RemindersCount = 'reminders_count',\n Status = 'status',\n}\n\nexport type AmortizationTableRequest = {\n leasingAmount: string; // monthly amount\n deposit: string;\n salesPrice: string;\n duration: number; // in months\n residual: string;\n monthlyInterestRate: string; // the annual interest rate divided by 12\n startDate?: string; // should be filled in if you want an amortization table with expected period dates\n};\n\nexport type AmortizationTableTemplateData = {\n opportunity: {\n id: string;\n };\n v: {\n make: string;\n model: string;\n category: string;\n type?: string;\n vin: string;\n year?: string | number;\n stockNumber: string;\n };\n c: {\n clientNumber: number;\n company: string;\n fullName: string;\n vatNumber?: string;\n email?: string;\n phone?: string;\n address?: string;\n };\n leasing: {\n salesPrice: string;\n salesPriceVat: string;\n salesPriceExclVat: string;\n deposit: string;\n depositExclVat: string;\n depositVat: string;\n installment: string;\n installmentVat: string;\n installmentExclVat: string;\n duration: number;\n monthlyInsurance: string;\n monthlyTax: string;\n monthlyTaxesInsurance: string;\n residual: string;\n residualVat: string;\n residualExclVat: string;\n offerNumber: string;\n contractNumber: string;\n vatPercentage: string;\n totalLeasingAmount: string;\n totalLeasingAmountExclVat: string;\n balance: string;\n balanceExclVat: string;\n };\n amortization: {\n period: number;\n periodStartDate: string;\n periodEndDate: string;\n deposit: string;\n startUpFee: string;\n monthlyAmount: string;\n capital: string;\n balance: string;\n interest: string;\n insurance: string;\n expirationDate: string;\n total: string;\n }[];\n};\n\nexport type CmrTemplateData = {\n contractId: string;\n date: string;\n\n c: {\n name: string;\n nit: string;\n address: string;\n city: string;\n };\n v: {\n make: string;\n model: string;\n year: string;\n vin: string;\n licensePlate: string;\n color?: string;\n parkLocation: string;\n };\n};\n\nexport enum LEASING_EXPORT_TYPES {\n RENTAL_SOLUTIONS = 'rental-solutions',\n DEFAULT = 'default',\n}\n\nexport type VehicleRetakeRequest = {\n retrievalDate: string;\n totalLoss?: boolean;\n cloneVehicle?: boolean;\n stopBilling?: boolean;\n};\n\nexport type LeasingContractEndRequest = {\n contractId: string;\n endDate?: string;\n};\n"]}
1
+ {"version":3,"file":"leasing.js","sourceRoot":"/","sources":["types/leasing.ts"],"names":[],"mappings":"AAMA,MAAM,CAAN,IAAY,sBAOX;AAPD,WAAY,sBAAsB;IAChC,6EAAmD,CAAA;IACnD,uEAA6C,CAAA;IAC7C,mEAAyC,CAAA;IACzC,mEAAyC,CAAA;IACzC,uDAA6B,CAAA;IAC7B,yEAA+C,CAAA;AACjD,CAAC,EAPW,sBAAsB,KAAtB,sBAAsB,QAOjC;AAiDD,MAAM,CAAN,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC/B,oDAA2B,CAAA;IAC3B,gDAAuB,CAAA;AACzB,CAAC,EAHW,qBAAqB,KAArB,qBAAqB,QAGhC;AAED,MAAM,CAAN,IAAY,qBASX;AATD,WAAY,qBAAqB;IAC/B,wCAAe,CAAA;IACf,gDAAuB,CAAA;IACvB,0CAAiB,CAAA;IACjB,0CAAiB,CAAA;IACjB,0DAAiC,CAAA;IACjC,gDAAuB,CAAA;IACvB,0CAAiB,CAAA;IACjB,wCAAe,CAAA;AACjB,CAAC,EATW,qBAAqB,KAArB,qBAAqB,QAShC;AAgQD,MAAM,CAAN,IAAY,+BAKX;AALD,WAAY,+BAA+B;IACzC,kEAA+B,CAAA;IAC/B,yEAAsC,CAAA;IACtC,qEAAkC,CAAA;IAClC,oDAAiB,CAAA;AACnB,CAAC,EALW,+BAA+B,KAA/B,+BAA+B,QAK1C;AAgGD,MAAM,CAAN,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC9B,6DAAqC,CAAA;IACrC,2CAAmB,CAAA;AACrB,CAAC,EAHW,oBAAoB,KAApB,oBAAoB,QAG/B","sourcesContent":["import { EmailMessage } from '@bisondesk/commons-sdk/messages';\nimport { AttachmentValue, Document, LinkValue, PaginatedList } from '@bisondesk/commons-sdk/types';\nimport { BaseEvent } from './internal-events.js';\nimport { SortFilter } from './search.js';\nimport { ReferenceData } from './utils.js';\n\nexport enum LeasingContractActions {\n CREATE_FINANCE_DOCUMENT = 'create_finance_document',\n START_RETAKE_VEHICLE = 'start_retake_vehicle',\n END_RETAKE_VEHICLE = 'end_retake_vehicle',\n START_CONTRACT_END = 'start_contract_end',\n END_CONTRACT = 'end_contract',\n CANCEL_RETAKE_VEHICLE = 'cancel_retake_vehicle',\n}\n\nexport type LeasingContractDebtInfo = {\n overdueSince?: string;\n overdueInvoices: number;\n overdueAmount: string;\n unpaidInvoices: number;\n unpaidAmount: string;\n};\n\nexport type LeasingContractEvent = {\n id: string;\n action: 'create' | 'update' | 'delete';\n actionAt: string;\n userId: string;\n tenantId: string;\n contract: LeasingContract;\n};\n\nexport type LeasingContractImportEvent = {\n tenantId: string;\n};\n\nexport type LeasingConditionEvent = {\n id: string;\n action: 'create';\n actionAt: string;\n userId: string;\n tenantId: string;\n};\n\nexport type LeasingContractClient = {\n organizationId: string;\n contactIds: string[];\n email?: string;\n since: string;\n takeoverId?: string;\n country: string;\n beEntityType?: 'Legal Person' | 'Natural Person';\n beForeignEntity?: boolean;\n\n /**\n * Used to overwrite the startDate in the context of a Becris declaration. This might be necessary\n * when due to some data-quality issue we do not report the contract at the right period and it is no\n * longer possible to resend the declaration for the corresponding month.\n */\n becrisStartDate?: string;\n};\n\nexport enum LeasingContractSource {\n HYPERPORTAL = 'hyperportal',\n BISONDESK = 'bisondesk',\n}\n\nexport enum LeasingContractStatus {\n DRAFT = 'draft',\n DISCARDED = 'discarded',\n PAUSED = 'paused',\n ACTIVE = 'active', // getDbLeasingContractByStockNumber uses ordering by status if this changes update there\n LEASING_RETURN = 'leasing_return',\n RECOVERED = 'recovered',\n ENDING = 'ending',\n ENDED = 'ended',\n}\n\nexport type LeasingContractHyperportal = {\n source: LeasingContractSource.HYPERPORTAL;\n /** oldest first **/\n conditions: ConditionsRef[];\n opportunities?: undefined;\n};\n\nexport type LeasingContractBisondesk = {\n source: LeasingContractSource.BISONDESK;\n conditions?: undefined;\n /** oldest first **/\n opportunities: OpportunityRef[];\n};\n\ntype BaseLeasingContract<T = LeasingContractHyperportal | LeasingContractBisondesk> = {\n id: string;\n createdAt: string;\n updatedAt: string;\n contractNumber?: string;\n startDate: string;\n deliveryDate?: string;\n endDate?: string;\n links?: LinkValue[];\n accountManager?: string;\n clients: LeasingContractClient[];\n hasSlbPartnerAmortisationTable?: boolean;\n slbPartner?: string;\n slbBankAccountOrganizationId?: string;\n slbContractNumber?: string;\n slbContractAmount?: string;\n externalTracking?: boolean;\n vehicle: {\n id: string;\n stockNumber: string;\n administrativeNumber?: string;\n retake?: {\n date?: string;\n actionBy: string;\n actionAt: string;\n startedAt?: string;\n startedBy?: string;\n completedAt?: string;\n completedBy?: string;\n clonedVehicleId?: string;\n totalLoss?: boolean;\n };\n };\n status: LeasingContractStatus;\n documents: Document[];\n} & T;\n\nexport type LeasingContract<T = LeasingContractHyperportal | LeasingContractBisondesk> =\n BaseLeasingContract<T> & {\n readonly expectedEndDate: string;\n readonly debt: LeasingContractDebtInfo;\n };\n\nexport type NewLeasingContract<T = LeasingContractHyperportal | LeasingContractBisondesk> =\n BaseLeasingContract<T> & {\n readonly expectedEndDate?: string | undefined;\n readonly debt?: LeasingContractDebtInfo | undefined;\n };\n\nexport type NextLeasingRentRowRequest = {\n vehicleId: string;\n organizationId: string;\n issueDate: string;\n};\n\nexport type NextLeasingRentRowResponse = {\n capital: string;\n contract: string;\n insurance?: string;\n interest: string;\n other?: string; // insurance + taxes + others\n period: number;\n taxes?: string;\n total: string;\n};\n\ntype BaseRef = {\n id: string;\n depositAmount: string;\n durationInMonths: number;\n taxesAmount?: string;\n insuranceAmount?: string;\n saleAmount: string; // includes the extras\n interestRate: string; //TODO: In LC from BD value is percentage, in LC from HP value is decimal\n residualAmount: string;\n leasingMonthlyAmount: string; // excluding VAT\n otherMonthlyAmounts: string; // insurance + taxes + others (excluding VAT)\n totalMonthlyAmount: string; // excluding VAT\n};\n\nexport type ConditionsRef = BaseRef & {\n validSince: string;\n};\n\nexport type OpportunityRef = BaseRef & {\n createdAt: string;\n quoteId: string;\n //Since VAT is client specific and contracts can be transferred between clients, we always handle values without VAT\n};\n\nexport type NewLeasingConditions = {\n parameters: {\n yearlyRoadTax: string;\n civilLiability: string;\n oneTimeRoadTax: string;\n specialInsurance: string;\n allRisksPercentage: string;\n allRisksTaxPercentage: string;\n };\n\n inputs: {\n deposit: string;\n salesPrice: string;\n bankDeposit: string;\n purchasePrice: string;\n residualValue: string;\n insuranceAmount: string;\n durationInMonths: number;\n includesAllRisks: boolean;\n marginPercentage: string;\n bankResidualValue: string;\n bankDurationInMonths: number;\n startupFeePercentage: string;\n includesYearlyRoadTax: boolean;\n includesCivilLiability: boolean;\n includesOneTimeRoadTax: boolean;\n interestRatePercentage: string;\n includesSpecialInsurance: boolean;\n monthlyAdministrationFee: string;\n bankInterestRatePercentage: string;\n };\n\n outputs: {\n ROI: string;\n ROITarget: string;\n ROIPerYear: string;\n cashDeficit: string;\n totalProfit: string;\n ROIDifference: string;\n leasingAmount: string;\n leasingProfit: string;\n vehicleProfit: string;\n oneTimeTaxCost: string;\n financingAmount: string;\n bankContractValue: string;\n bankLeasingAmount: string;\n totalMonthlyPayment: string;\n leasingContractValue: string;\n monthlyTaxRetailPrice: string;\n allRisksInsuranceAmount: string;\n };\n\n cashIn: Array<{\n time: string;\n cashIn: string;\n deposit: string;\n startupFee: string;\n taxPayment: string;\n residualValue: string;\n cumulativeCash: string;\n insurancePayment: string;\n monthlyAdministrationFee: string;\n leasingAmountWithoutAdminFee: string;\n }>;\n\n cashOut: Array<{\n time: string;\n cashOut: string;\n deposit: string;\n taxPayment: string;\n leasingAmount: string;\n residualValue: string;\n cumulativeCash: string;\n insurancePayment: string;\n }>;\n};\n\nexport type LeasingConditions = NewLeasingConditions & {\n id: string;\n createdAt: string;\n createdBy: string;\n amortization: AmortizationTable;\n};\n\nexport type AmortizationRow = {\n period: number;\n /* An estimate of the date in which the period will happen\n based on the contract start date. Empty for period zero. */\n expectedPeriodDate?: string;\n buyOff: string;\n payment: string;\n capital: string;\n interest: string;\n totalInterest: string;\n balance: string;\n};\n\nexport type AmortizationTable = {\n annualInterestRate?: string;\n monthlyInterestRate?: string;\n rows: AmortizationRow[];\n};\n\nexport type AmortizationDocsEvent = BaseEvent & {\n contractId: string;\n changedDocumentIds: string[];\n actionAt: string;\n userId: string;\n tenantId: string;\n};\n\nexport type AmortizationDocs = {\n contractId: string;\n period: number;\n documents: AmortizationDoc[];\n};\n\n/* for a given document in what contract and periods it is */\nexport type DocumentAmortizationData = {\n contractId: string;\n periods: number[];\n};\n\nexport type AmortizationDoc = {\n amount: string;\n bookingNumber: string;\n branchId: string;\n documentId: string;\n issueDate: string;\n subtype: 'Invoice' | 'Credit Note';\n clientExternalId: number;\n};\n\nexport type BecrisDeclaration = {\n createdAt: string;\n endDate: string;\n endingInstruments: number;\n existingInstruments: number;\n file: AttachmentValue;\n id: string;\n newInstruments: number;\n startDate: string;\n};\n\nexport type LeasingReportingSettings = {\n active: boolean;\n branchId: string;\n tenantId: string;\n};\n\nexport enum LeasingRemindersSortableColumns {\n NextActionAt = 'next_action_at',\n OrganizationName = 'organization_name',\n RemindersCount = 'reminders_count',\n Status = 'status',\n}\n\nexport type AmortizationTableRequest = {\n leasingAmount: string; // monthly amount\n deposit: string;\n salesPrice: string;\n duration: number; // in months\n residual: string;\n monthlyInterestRate: string; // the annual interest rate divided by 12\n startDate?: string; // should be filled in if you want an amortization table with expected period dates\n};\n\nexport type AmortizationTableTemplateData = {\n opportunity: {\n id: string;\n };\n v: {\n make: string;\n model: string;\n category: string;\n type?: string;\n vin: string;\n year?: string | number;\n stockNumber: string;\n };\n c: {\n clientNumber: number;\n company: string;\n fullName: string;\n vatNumber?: string;\n email?: string;\n phone?: string;\n address?: string;\n };\n leasing: {\n salesPrice: string;\n salesPriceVat: string;\n salesPriceExclVat: string;\n deposit: string;\n depositExclVat: string;\n depositVat: string;\n installment: string;\n installmentVat: string;\n installmentExclVat: string;\n duration: number;\n monthlyInsurance: string;\n monthlyTax: string;\n monthlyTaxesInsurance: string;\n residual: string;\n residualVat: string;\n residualExclVat: string;\n offerNumber: string;\n contractNumber: string;\n vatPercentage: string;\n totalLeasingAmount: string;\n totalLeasingAmountExclVat: string;\n balance: string;\n balanceExclVat: string;\n };\n amortization: {\n period: number;\n periodStartDate: string;\n periodEndDate: string;\n deposit: string;\n startUpFee: string;\n monthlyAmount: string;\n capital: string;\n balance: string;\n interest: string;\n insurance: string;\n expirationDate: string;\n total: string;\n }[];\n};\n\nexport type CmrTemplateData = {\n contractId: string;\n date: string;\n\n c: {\n name: string;\n nit: string;\n address: string;\n city: string;\n };\n v: {\n make: string;\n model: string;\n year: string;\n vin: string;\n licensePlate: string;\n color?: string;\n parkLocation: string;\n };\n};\n\nexport enum LEASING_EXPORT_TYPES {\n RENTAL_SOLUTIONS = 'rental-solutions',\n DEFAULT = 'default',\n}\n\nexport type VehicleRetakeRequest = {\n retrievalDate: string;\n totalLoss?: boolean;\n cloneVehicle?: boolean;\n stopBilling?: boolean;\n};\n\nexport type LeasingContractEndRequest = {\n contractId: string;\n endDate?: string;\n};\n"]}
@@ -6,7 +6,6 @@ export declare enum MarketingPlatform {
6
6
  machineryplanet = "machineryplanet",
7
7
  machinetrack = "machinetrack",
8
8
  marktnet = "marktnet",
9
- mobile = "mobile",
10
9
  truck1st = "truck1st",
11
10
  trucks = "trucks",
12
11
  truckscout = "truckscout24",
@@ -1 +1 @@
1
- {"version":3,"file":"marketing.d.ts","sourceRoot":"/","sources":["types/marketing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE5F,oBAAY,iBAAiB;IAC3B,WAAW,gBAAgB;IAC3B,QAAQ,aAAa;IACrB,YAAY,iBAAiB;IAC7B,eAAe,oBAAoB;IACnC,YAAY,iBAAiB;IAC7B,QAAQ,aAAa;IACrB,MAA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AAM,CAAA;CAAE,CAAC,CAAC;AAE5E,MAAM,MAAM,cAAc,CAAC,CAAC,GAAG,GAAG,IAAI;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,oBAAoB,CAAC;IAClC,MAAM,EAAE,oBAAoB,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,CAAC,CAAC;IACT,SAAS,EAAE,kBAAkB,CAAC;IAC9B,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC"}
@@ -6,7 +6,6 @@ export var MarketingPlatform;
6
6
  MarketingPlatform["machineryplanet"] = "machineryplanet";
7
7
  MarketingPlatform["machinetrack"] = "machinetrack";
8
8
  MarketingPlatform["marktnet"] = "marktnet";
9
- MarketingPlatform["mobile"] = "mobile";
10
9
  MarketingPlatform["truck1st"] = "truck1st";
11
10
  MarketingPlatform["trucks"] = "trucks";
12
11
  MarketingPlatform["truckscout"] = "truckscout24";
@@ -1 +1 @@
1
- {"version":3,"file":"marketing.js","sourceRoot":"/","sources":["types/marketing.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,iBAcX;AAdD,WAAY,iBAAiB;IAC3B,gDAA2B,CAAA;IAC3B,0CAAqB,CAAA;IACrB,kDAA6B,CAAA;IAC7B,wDAAmC,CAAA;IACnC,kDAA6B,CAAA;IAC7B,0CAAqB,CAAA;IACrB,sCAAiB,CAAA;IACjB,0CAAqB,CAAA;IACrB,sCAAiB,CAAA;IACjB,gDAA2B,CAAA;IAC3B,gDAA2B,CAAA;IAC3B,gDAA2B,CAAA;IAC3B,wCAAmB,CAAA;AACrB,CAAC,EAdW,iBAAiB,KAAjB,iBAAiB,QAc5B;AA8DD,MAAM,CAAN,IAAY,oBAMX;AAND,WAAY,oBAAoB;IAC9B,+CAAuB,CAAA;IACvB,iDAAyB,CAAA;IACzB,2CAAmB,CAAA;IACnB,uCAAe,CAAA;IACf,0CAAkB,CAAA;AACpB,CAAC,EANW,oBAAoB,KAApB,oBAAoB,QAM/B;AAED,MAAM,CAAN,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,8CAAwB,CAAA;IACxB,oDAA8B,CAAA;IAC9B,4DAAsC,CAAA;AACxC,CAAC,EAJW,kBAAkB,KAAlB,kBAAkB,QAI7B;AAED,MAAM,CAAN,IAAY,2BAGX;AAHD,WAAY,2BAA2B;IACrC,oDAAqB,CAAA;IACrB,8CAAe,CAAA;AACjB,CAAC,EAHW,2BAA2B,KAA3B,2BAA2B,QAGtC","sourcesContent":["import { AttachmentValue, MultiLangValue, NextRequest } from '@bisondesk/commons-sdk/types';\n\nexport enum MarketingPlatform {\n autoscout24 = 'autoscout24',\n autoline = 'autoline',\n exportseller = 'exportseller',\n machineryplanet = 'machineryplanet',\n machinetrack = 'machinetrack',\n marktnet = 'marktnet',\n mobile = 'mobile',\n truck1st = 'truck1st', // Truck1.eu\n trucks = 'trucks', //Trucks.nl\n truckscout = 'truckscout24',\n tweedehandsbe = '2ehandsbe',\n viamobilis = 'planettrucks',\n youtube = 'youtube',\n}\n\nexport type VehicleMarketing = {\n titles: MultiLangValue;\n remarks?: MultiLangValue;\n marketingPlatforms: string[];\n videos: AttachmentValue[];\n publishedOnWebsiteAt?: string;\n unpublishedOnWebsiteAt?: string;\n\n edited?: {\n marketingPlatforms?: boolean;\n remarks?: boolean;\n titles?: boolean;\n videos?: boolean;\n };\n};\n\nexport type VehicleMarketingDataEvent = {\n actionAt: string;\n data: VehicleMarketing;\n previousData?: VehicleMarketing;\n tenantId: string;\n userId: string;\n vehicleId: string;\n};\n\nexport type NewVehicleAd = {\n vehicleId: string;\n platform: MarketingPlatform;\n stockNumber: string;\n\n scheduledStart: string; // when its supposed to start\n scheduledEnd?: string; // when its supposed to end\n};\n\nexport type VehicleAd = NewVehicleAd & {\n id: string;\n\n createdAt: string;\n createdBy: string;\n status: 'enabled' | 'suspended';\n\n modifiedAt?: string;\n modifiedBy?: string;\n\n startedAt?: string; // when it actually started\n endedAt?: string; // when it actually ended\n};\n\nexport type VehicleAdListRequest = NextRequest & {\n listEnded?: boolean;\n userModified?: boolean;\n platform?: MarketingPlatform;\n vehicleId?: string;\n};\n\nexport type VehicleMarketingStats = {\n active: { [platform in MarketingPlatform]?: number };\n manual: { [platform in MarketingPlatform]?: number };\n};\n\nexport enum MarketingEventStatus {\n Scheduled = 'scheduled',\n Processing = 'processing',\n Skipped = 'skipped',\n Error = 'error',\n Sent = 'processed',\n}\n\nexport enum MarketingEventType {\n PriceDrop = 'price-drop',\n PartnerOffer = 'partner-offer',\n VehicleAvailable = 'vehicle-available',\n}\n\nexport enum MarketingMessageChannelType {\n Whatsapp = 'whatsapp',\n Email = 'email',\n}\n\nexport type MarketingMessage = {\n id: string;\n channelType: MarketingMessageChannelType;\n templateId: string;\n contactId?: string;\n organizationId?: string;\n createdAt: string;\n createdBy: string;\n marketingEventId: string;\n phone: string;\n};\n\nexport type MarketingDestination = {\n contactId?: string;\n organizationId?: string;\n name?: string;\n language?: string;\n} & ({ phone?: string; email: string } | { phone: string; email?: string });\n\nexport type MarketingEvent<E = any> = {\n tenantId: string;\n id: string;\n destination: MarketingDestination;\n status: MarketingEventStatus;\n statusReason?: string;\n createdAt: string;\n createdBy: string;\n modifiedAt: string;\n modifiedBy: string;\n event: E;\n eventType: MarketingEventType;\n sendAt: string;\n};\n"]}
1
+ {"version":3,"file":"marketing.js","sourceRoot":"/","sources":["types/marketing.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,iBAcX;AAdD,WAAY,iBAAiB;IAC3B,gDAA2B,CAAA;IAC3B,0CAAqB,CAAA;IACrB,kDAA6B,CAAA;IAC7B,wDAAmC,CAAA;IACnC,kDAA6B,CAAA;IAC7B,0CAAqB,CAAA;IAErB,0CAAqB,CAAA;IACrB,sCAAiB,CAAA;IACjB,gDAA2B,CAAA;IAC3B,gDAA2B,CAAA;IAC3B,gDAA2B,CAAA;IAC3B,wCAAmB,CAAA;AACrB,CAAC,EAdW,iBAAiB,KAAjB,iBAAiB,QAc5B;AA8DD,MAAM,CAAN,IAAY,oBAMX;AAND,WAAY,oBAAoB;IAC9B,+CAAuB,CAAA;IACvB,iDAAyB,CAAA;IACzB,2CAAmB,CAAA;IACnB,uCAAe,CAAA;IACf,0CAAkB,CAAA;AACpB,CAAC,EANW,oBAAoB,KAApB,oBAAoB,QAM/B;AAED,MAAM,CAAN,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,8CAAwB,CAAA;IACxB,oDAA8B,CAAA;IAC9B,4DAAsC,CAAA;AACxC,CAAC,EAJW,kBAAkB,KAAlB,kBAAkB,QAI7B;AAED,MAAM,CAAN,IAAY,2BAGX;AAHD,WAAY,2BAA2B;IACrC,oDAAqB,CAAA;IACrB,8CAAe,CAAA;AACjB,CAAC,EAHW,2BAA2B,KAA3B,2BAA2B,QAGtC","sourcesContent":["import { AttachmentValue, MultiLangValue, NextRequest } from '@bisondesk/commons-sdk/types';\n\nexport enum MarketingPlatform {\n autoscout24 = 'autoscout24',\n autoline = 'autoline',\n exportseller = 'exportseller',\n machineryplanet = 'machineryplanet',\n machinetrack = 'machinetrack',\n marktnet = 'marktnet',\n // mobile = 'mobile',\n truck1st = 'truck1st', // Truck1.eu\n trucks = 'trucks', //Trucks.nl\n truckscout = 'truckscout24',\n tweedehandsbe = '2ehandsbe',\n viamobilis = 'planettrucks',\n youtube = 'youtube',\n}\n\nexport type VehicleMarketing = {\n titles: MultiLangValue;\n remarks?: MultiLangValue;\n marketingPlatforms: string[];\n videos: AttachmentValue[];\n publishedOnWebsiteAt?: string;\n unpublishedOnWebsiteAt?: string;\n\n edited?: {\n marketingPlatforms?: boolean;\n remarks?: boolean;\n titles?: boolean;\n videos?: boolean;\n };\n};\n\nexport type VehicleMarketingDataEvent = {\n actionAt: string;\n data: VehicleMarketing;\n previousData?: VehicleMarketing;\n tenantId: string;\n userId: string;\n vehicleId: string;\n};\n\nexport type NewVehicleAd = {\n vehicleId: string;\n platform: MarketingPlatform;\n stockNumber: string;\n\n scheduledStart: string; // when its supposed to start\n scheduledEnd?: string; // when its supposed to end\n};\n\nexport type VehicleAd = NewVehicleAd & {\n id: string;\n\n createdAt: string;\n createdBy: string;\n status: 'enabled' | 'suspended';\n\n modifiedAt?: string;\n modifiedBy?: string;\n\n startedAt?: string; // when it actually started\n endedAt?: string; // when it actually ended\n};\n\nexport type VehicleAdListRequest = NextRequest & {\n listEnded?: boolean;\n userModified?: boolean;\n platform?: MarketingPlatform;\n vehicleId?: string;\n};\n\nexport type VehicleMarketingStats = {\n active: { [platform in MarketingPlatform]?: number };\n manual: { [platform in MarketingPlatform]?: number };\n};\n\nexport enum MarketingEventStatus {\n Scheduled = 'scheduled',\n Processing = 'processing',\n Skipped = 'skipped',\n Error = 'error',\n Sent = 'processed',\n}\n\nexport enum MarketingEventType {\n PriceDrop = 'price-drop',\n PartnerOffer = 'partner-offer',\n VehicleAvailable = 'vehicle-available',\n}\n\nexport enum MarketingMessageChannelType {\n Whatsapp = 'whatsapp',\n Email = 'email',\n}\n\nexport type MarketingMessage = {\n id: string;\n channelType: MarketingMessageChannelType;\n templateId: string;\n contactId?: string;\n organizationId?: string;\n createdAt: string;\n createdBy: string;\n marketingEventId: string;\n phone: string;\n};\n\nexport type MarketingDestination = {\n contactId?: string;\n organizationId?: string;\n name?: string;\n language?: string;\n} & ({ phone?: string; email: string } | { phone: string; email?: string });\n\nexport type MarketingEvent<E = any> = {\n tenantId: string;\n id: string;\n destination: MarketingDestination;\n status: MarketingEventStatus;\n statusReason?: string;\n createdAt: string;\n createdBy: string;\n modifiedAt: string;\n modifiedBy: string;\n event: E;\n eventType: MarketingEventType;\n sendAt: string;\n};\n"]}
@@ -0,0 +1,15 @@
1
+ import { DebtorsDossier, DebtorsDossierStatus } from '@bisondesk/core-sdk/types/leasing-debtors';
2
+ export declare const DebtorsDossierStatusOrder: DebtorsDossierStatus[];
3
+ type CompareInput = {
4
+ currentStatus: DebtorsDossierStatus;
5
+ referenceStatus: DebtorsDossierStatus;
6
+ };
7
+ export declare const getPreviousStatus: (currentStatus: DebtorsDossierStatus) => DebtorsDossierStatus | undefined;
8
+ export declare const getNextStatus: (status: DebtorsDossierStatus) => DebtorsDossierStatus | undefined;
9
+ export declare const isSameOrAfterReferenceDebtorsDossierStatus: (input: CompareInput) => boolean;
10
+ export declare const isAfterReferenceDebtorsDossierStatus: (input: CompareInput) => boolean;
11
+ export declare const isSameOrBeforeReferenceDebtorsDossierStatus: (input: CompareInput) => boolean;
12
+ export declare const isBeforeReferenceDebtorsDossierStatus: (input: CompareInput) => boolean;
13
+ export declare const isDossierFinished: (dossier: DebtorsDossier) => boolean;
14
+ export {};
15
+ //# sourceMappingURL=debtors-dossiers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debtors-dossiers.d.ts","sourceRoot":"/","sources":["utils/debtors-dossiers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEjG,eAAO,MAAM,yBAAyB,EAAE,oBAAoB,EAQ3D,CAAC;AAEF,KAAK,YAAY,GAAG;IAClB,aAAa,EAAE,oBAAoB,CAAC;IACpC,eAAe,EAAE,oBAAoB,CAAC;CACvC,CAAC;AAcF,eAAO,MAAM,iBAAiB,kBACb,oBAAoB,KAClC,oBAAoB,GAAG,SAMzB,CAAC;AAEF,eAAO,MAAM,aAAa,WAAY,oBAAoB,KAAG,oBAAoB,GAAG,SAMnF,CAAC;AAEF,eAAO,MAAM,0CAA0C,UAAW,YAAY,KAAG,OAIhF,CAAC;AAEF,eAAO,MAAM,oCAAoC,UAAW,YAAY,KAAG,OAI1E,CAAC;AAEF,eAAO,MAAM,2CAA2C,UAAW,YAAY,KAAG,OAIjF,CAAC;AAEF,eAAO,MAAM,qCAAqC,UAAW,YAAY,KAAG,OAI3E,CAAC;AAEF,eAAO,MAAM,iBAAiB,YAAa,cAAc,KAAG,OACJ,CAAC"}
@@ -0,0 +1,51 @@
1
+ import { DebtorsDossierStatus } from '@bisondesk/core-sdk/types/leasing-debtors';
2
+ export const DebtorsDossierStatusOrder = [
3
+ DebtorsDossierStatus.AUTO_REMINDER,
4
+ DebtorsDossierStatus.OVERDUE,
5
+ DebtorsDossierStatus.CONTACT_ATTEMPTED,
6
+ DebtorsDossierStatus.DIALOGUE,
7
+ DebtorsDossierStatus.PROMISE_TO_PAY,
8
+ DebtorsDossierStatus.FAILURE,
9
+ DebtorsDossierStatus.RESOLVED,
10
+ ];
11
+ const compareDebtorsDossierStatus = (input) => {
12
+ const { currentStatus, referenceStatus } = input;
13
+ const currentStatusIdx = DebtorsDossierStatusOrder.indexOf(currentStatus);
14
+ const referenceStatusIdx = DebtorsDossierStatusOrder.indexOf(referenceStatus);
15
+ return {
16
+ currentStatusIdx,
17
+ referenceStatusIdx,
18
+ };
19
+ };
20
+ export const getPreviousStatus = (currentStatus) => {
21
+ const currentIndex = DebtorsDossierStatusOrder.indexOf(currentStatus);
22
+ if (currentIndex <= 0) {
23
+ return;
24
+ }
25
+ return DebtorsDossierStatusOrder[currentIndex - 1];
26
+ };
27
+ export const getNextStatus = (status) => {
28
+ const statusIndex = DebtorsDossierStatusOrder.indexOf(status);
29
+ if (statusIndex >= DebtorsDossierStatusOrder.length - 1) {
30
+ return;
31
+ }
32
+ return DebtorsDossierStatusOrder[statusIndex + 1];
33
+ };
34
+ export const isSameOrAfterReferenceDebtorsDossierStatus = (input) => {
35
+ const { currentStatusIdx, referenceStatusIdx } = compareDebtorsDossierStatus(input);
36
+ return currentStatusIdx >= referenceStatusIdx;
37
+ };
38
+ export const isAfterReferenceDebtorsDossierStatus = (input) => {
39
+ const { currentStatusIdx, referenceStatusIdx } = compareDebtorsDossierStatus(input);
40
+ return currentStatusIdx > referenceStatusIdx;
41
+ };
42
+ export const isSameOrBeforeReferenceDebtorsDossierStatus = (input) => {
43
+ const { currentStatusIdx, referenceStatusIdx } = compareDebtorsDossierStatus(input);
44
+ return currentStatusIdx <= referenceStatusIdx;
45
+ };
46
+ export const isBeforeReferenceDebtorsDossierStatus = (input) => {
47
+ const { currentStatusIdx, referenceStatusIdx } = compareDebtorsDossierStatus(input);
48
+ return currentStatusIdx < referenceStatusIdx;
49
+ };
50
+ export const isDossierFinished = (dossier) => dossier.resolvedAt != null || dossier.failedAt != null;
51
+ //# sourceMappingURL=debtors-dossiers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debtors-dossiers.js","sourceRoot":"/","sources":["utils/debtors-dossiers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEjG,MAAM,CAAC,MAAM,yBAAyB,GAA2B;IAC/D,oBAAoB,CAAC,aAAa;IAClC,oBAAoB,CAAC,OAAO;IAC5B,oBAAoB,CAAC,iBAAiB;IACtC,oBAAoB,CAAC,QAAQ;IAC7B,oBAAoB,CAAC,cAAc;IACnC,oBAAoB,CAAC,OAAO;IAC5B,oBAAoB,CAAC,QAAQ;CAC9B,CAAC;AAOF,MAAM,2BAA2B,GAAG,CAAC,KAAmB,EAAE,EAAE;IAC1D,MAAM,EAAE,aAAa,EAAE,eAAe,EAAE,GAAG,KAAK,CAAC;IAEjD,MAAM,gBAAgB,GAAG,yBAAyB,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IAC1E,MAAM,kBAAkB,GAAG,yBAAyB,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;IAE9E,OAAO;QACL,gBAAgB;QAChB,kBAAkB;KACnB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,aAAmC,EACD,EAAE;IACpC,MAAM,YAAY,GAAG,yBAAyB,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IACt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B,GAAG,kBAAkB,CAAC;AAC/C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,OAAuB,EAAW,EAAE,CACpE,OAAO,CAAC,UAAU,IAAI,IAAI,IAAI,OAAO,CAAC,QAAQ,IAAI,IAAI,CAAC","sourcesContent":["import { DebtorsDossier, DebtorsDossierStatus } from '@bisondesk/core-sdk/types/leasing-debtors';\n\nexport const DebtorsDossierStatusOrder: DebtorsDossierStatus[] = [\n DebtorsDossierStatus.AUTO_REMINDER,\n DebtorsDossierStatus.OVERDUE,\n DebtorsDossierStatus.CONTACT_ATTEMPTED,\n DebtorsDossierStatus.DIALOGUE,\n DebtorsDossierStatus.PROMISE_TO_PAY,\n DebtorsDossierStatus.FAILURE,\n DebtorsDossierStatus.RESOLVED,\n];\n\ntype CompareInput = {\n currentStatus: DebtorsDossierStatus;\n referenceStatus: DebtorsDossierStatus;\n};\n\nconst compareDebtorsDossierStatus = (input: CompareInput) => {\n const { currentStatus, referenceStatus } = input;\n\n const currentStatusIdx = DebtorsDossierStatusOrder.indexOf(currentStatus);\n const referenceStatusIdx = DebtorsDossierStatusOrder.indexOf(referenceStatus);\n\n return {\n currentStatusIdx,\n referenceStatusIdx,\n };\n};\n\nexport const getPreviousStatus = (\n currentStatus: DebtorsDossierStatus\n): DebtorsDossierStatus | undefined => {\n const currentIndex = DebtorsDossierStatusOrder.indexOf(currentStatus);\n if (currentIndex <= 0) {\n return;\n }\n return DebtorsDossierStatusOrder[currentIndex - 1];\n};\n\nexport const getNextStatus = (status: DebtorsDossierStatus): DebtorsDossierStatus | undefined => {\n const statusIndex = DebtorsDossierStatusOrder.indexOf(status);\n if (statusIndex >= DebtorsDossierStatusOrder.length - 1) {\n return;\n }\n return DebtorsDossierStatusOrder[statusIndex + 1];\n};\n\nexport const isSameOrAfterReferenceDebtorsDossierStatus = (input: CompareInput): boolean => {\n const { currentStatusIdx, referenceStatusIdx } = compareDebtorsDossierStatus(input);\n\n return currentStatusIdx >= referenceStatusIdx;\n};\n\nexport const isAfterReferenceDebtorsDossierStatus = (input: CompareInput): boolean => {\n const { currentStatusIdx, referenceStatusIdx } = compareDebtorsDossierStatus(input);\n\n return currentStatusIdx > referenceStatusIdx;\n};\n\nexport const isSameOrBeforeReferenceDebtorsDossierStatus = (input: CompareInput): boolean => {\n const { currentStatusIdx, referenceStatusIdx } = compareDebtorsDossierStatus(input);\n\n return currentStatusIdx <= referenceStatusIdx;\n};\n\nexport const isBeforeReferenceDebtorsDossierStatus = (input: CompareInput): boolean => {\n const { currentStatusIdx, referenceStatusIdx } = compareDebtorsDossierStatus(input);\n\n return currentStatusIdx < referenceStatusIdx;\n};\n\nexport const isDossierFinished = (dossier: DebtorsDossier): boolean =>\n dossier.resolvedAt != null || dossier.failedAt != null;\n"]}
@@ -1,11 +1,12 @@
1
1
  import { BusinessEntityIds } from '../constants.js';
2
2
  import { Contact, Organization, SearchOrganization } from '../types/crm.js';
3
+ import { DebtorsDossier, SearchDebtorsDossier } from '../types/leasing-debtors.js';
3
4
  import { SearchLeasingContract } from '../types/leasing-search.js';
4
5
  import { LeasingContract } from '../types/leasing.js';
5
6
  import { Opportunity, SearchOpportunity } from '../types/opportunities.js';
6
7
  import { SearchVehicle, Vehicle } from '../types/vehicles.js';
7
- export type GlobalBusinessEntity = Opportunity | Vehicle | Organization | LeasingContract;
8
- export type GlobalSearchEntity = SearchOpportunity | SearchVehicle | SearchOrganization | SearchLeasingContract;
8
+ export type GlobalBusinessEntity = Opportunity | Vehicle | Organization | LeasingContract | DebtorsDossier;
9
+ export type GlobalSearchEntity = SearchOpportunity | SearchVehicle | SearchOrganization | SearchLeasingContract | SearchDebtorsDossier;
9
10
  export declare const getCustomerInformation: (org?: Organization, contact?: Contact) => {
10
11
  countryCode: string;
11
12
  title: string;
@@ -1 +1 @@
1
- {"version":3,"file":"search.d.ts","sourceRoot":"/","sources":["utils/search.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,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IACF,OAAO,CACL,UAAU,CAAC,gBAAgB,CAAC,CAAC,cAAc,EAAE,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[];\n getTagsForSearchEntity?: (entity: any) => string[];\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],\n getTagsForSearchEntity: (opp: SearchOpportunity) => {\n const vehicleTags =\n opp.vehicle != null\n ? getTagsForBusinessEntity(BusinessEntityIds.Vehicles, opp.vehicle)\n : [];\n return [...vehicleTags, opp.opportunity.id];\n },\n getMeta: (opp: Opportunity) => ({\n status: opp.status,\n wonAt: opp.wonAt,\n lostAt: opp.lostAt,\n }),\n },\n [BusinessEntityIds.Vehicles]: {\n getMainEntity: (entity: SearchVehicle) => entity.vehicle,\n getTitle: (vehicle: Vehicle) => vehicle.internal.description.title,\n getTags: (vehicle: Vehicle) =>\n [\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 ].filter(Boolean) as string[],\n },\n [BusinessEntityIds.ExternalVehicleSale]: {\n getMainEntity: (entity: SearchVehicle) => entity.vehicle,\n getTitle: (vehicle: Vehicle) => vehicle.internal.description.title,\n getTags: (vehicle: Vehicle) =>\n [\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 ].filter(Boolean) as string[],\n },\n [BusinessEntityIds.Organizations]: {\n getMainEntity: (entity: SearchOrganization) => entity.org,\n getTitle: (org: Organization) => org.name,\n getTags: (org: Organization) =>\n [`${org.externalId}`, org.vatNumber].filter(Boolean) as string[],\n },\n [BusinessEntityIds.LeasingContracts]: {\n getMainEntity: (entity: SearchLeasingContract) => entity.contract,\n getTitle: (contract: LeasingContract) => contract.contractNumber ?? contract.id,\n getTags: (contract: LeasingContract) =>\n [contract.id, contract.contractNumber].filter(Boolean) as string[],\n },\n [BusinessEntityIds.FinanceDocuments]: {\n getMainEntity: (entity: any) => entity,\n getTitle: (entity: any) => entity.id,\n getTags: (entity: any) => [entity.id],\n },\n [BusinessEntityIds.AdministrativeDocuments]: {\n getMainEntity: (entity: any) => entity,\n getTitle: (entity: any) => entity.id,\n getTags: (entity: any) => [entity.id],\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);\n\nexport const getTagsForSearchBusinessEntity = (\n businessEntityId: BusinessEntityIds,\n entity: GlobalSearchEntity\n) => {\n const tags = getMapping(businessEntityId).getTagsForSearchEntity?.(entity);\n\n if (tags) {\n return tags;\n }\n\n return getTagsForBusinessEntity(\n businessEntityId,\n getMainEntityFromSearchEntity(businessEntityId, entity)\n );\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"]}
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;AAqBpD,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,GAAkB,EAAE,OAAiB,EAAE,EAAE;IAC9E,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAChB,OAAO;YACL,WAAW,EAAE,G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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 { DebtorsDossier, SearchDebtorsDossier } from '../types/leasing-debtors.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 =\n | Opportunity\n | Vehicle\n | Organization\n | LeasingContract\n | DebtorsDossier;\nexport type GlobalSearchEntity =\n | SearchOpportunity\n | SearchVehicle\n | SearchOrganization\n | SearchLeasingContract\n | SearchDebtorsDossier;\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[];\n getTagsForSearchEntity?: (entity: any) => string[];\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],\n getTagsForSearchEntity: (opp: SearchOpportunity) => {\n const vehicleTags =\n opp.vehicle != null\n ? getTagsForBusinessEntity(BusinessEntityIds.Vehicles, opp.vehicle)\n : [];\n return [...vehicleTags, opp.opportunity.id];\n },\n getMeta: (opp: Opportunity) => ({\n status: opp.status,\n wonAt: opp.wonAt,\n lostAt: opp.lostAt,\n }),\n },\n [BusinessEntityIds.Vehicles]: {\n getMainEntity: (entity: SearchVehicle) => entity.vehicle,\n getTitle: (vehicle: Vehicle) => vehicle.internal.description.title,\n getTags: (vehicle: Vehicle) =>\n [\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 ].filter(Boolean) as string[],\n },\n [BusinessEntityIds.ExternalVehicleSale]: {\n getMainEntity: (entity: SearchVehicle) => entity.vehicle,\n getTitle: (vehicle: Vehicle) => vehicle.internal.description.title,\n getTags: (vehicle: Vehicle) =>\n [\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 ].filter(Boolean) as string[],\n },\n [BusinessEntityIds.Organizations]: {\n getMainEntity: (entity: SearchOrganization) => entity.org,\n getTitle: (org: Organization) => org.name,\n getTags: (org: Organization) =>\n [`${org.externalId}`, org.vatNumber].filter(Boolean) as string[],\n },\n [BusinessEntityIds.LeasingContracts]: {\n getMainEntity: (entity: SearchLeasingContract) => entity.contract,\n getTitle: (contract: LeasingContract) => contract.contractNumber ?? contract.id,\n getTags: (contract: LeasingContract) =>\n [contract.id, contract.contractNumber].filter(Boolean) as string[],\n },\n [BusinessEntityIds.FinanceDocuments]: {\n getMainEntity: (entity: any) => entity,\n getTitle: (entity: any) => entity.id,\n getTags: (entity: any) => [entity.id],\n },\n [BusinessEntityIds.AdministrativeDocuments]: {\n getMainEntity: (entity: any) => entity,\n getTitle: (entity: any) => entity.id,\n getTags: (entity: any) => [entity.id],\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);\n\nexport const getTagsForSearchBusinessEntity = (\n businessEntityId: BusinessEntityIds,\n entity: GlobalSearchEntity\n) => {\n const tags = getMapping(businessEntityId).getTagsForSearchEntity?.(entity);\n\n if (tags) {\n return tags;\n }\n\n return getTagsForBusinessEntity(\n businessEntityId,\n getMainEntityFromSearchEntity(businessEntityId, entity)\n );\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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bisondesk/core-sdk",
3
- "version": "1.0.493",
3
+ "version": "1.0.494",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "scripts": {
package/src/constants.ts CHANGED
@@ -9,6 +9,8 @@ export const APP_LANGUAGES_PICKLIST_ID = 'appLanguages';
9
9
  export const CLIENT_LANGUAGES_PICKLIST_ID = 'clientLanguages';
10
10
  export const TIMEZONES_PICKLIST_ID = 'timezones';
11
11
  export const COUNTRIES_PICKLIST_ID = 'countries';
12
+ export const DEBTORS_DOSSIER_STATUS_PICKLIST_ID = 'debtorsDossierStatus';
13
+ export const LEGAL_DOSSIER_STATUS_PICKLIST_ID = 'legalDossierStatus';
12
14
  export const VEHICLE_MAIN_FEATURES_PICKLIST_ID = 'vehicleMainFeatures';
13
15
  export const VEHICLE_STATE_FILTERS_PICKLIST_ID = 'vehicleStateFilters';
14
16
  export const VEHICLE_SEARCH_SALE_DEAL_STATUS_PICKLIST_ID = 'vehicleSearchSaleDealStatus';