@bisondesk/core-sdk 1.0.680 → 1.0.682

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 (123) hide show
  1. package/lib/apis/exchange-rates.d.ts +3 -0
  2. package/lib/apis/exchange-rates.d.ts.map +1 -1
  3. package/lib/apis/exchange-rates.js +29 -0
  4. package/lib/apis/exchange-rates.js.map +1 -1
  5. package/lib/types/intercompany-payments.d.ts.map +1 -1
  6. package/lib/types/intercompany-payments.js.map +1 -1
  7. package/lib/types/offers.d.ts +2 -1
  8. package/lib/types/offers.d.ts.map +1 -1
  9. package/lib/types/offers.js.map +1 -1
  10. package/lib/types/opportunities.d.ts +8 -0
  11. package/lib/types/opportunities.d.ts.map +1 -1
  12. package/lib/types/opportunities.js.map +1 -1
  13. package/lib/types/opportunity-payments.d.ts +9 -0
  14. package/lib/types/opportunity-payments.d.ts.map +1 -1
  15. package/lib/types/opportunity-payments.js.map +1 -1
  16. package/lib/types/tenants.d.ts +1 -0
  17. package/lib/types/tenants.d.ts.map +1 -1
  18. package/lib/types/tenants.js.map +1 -1
  19. package/lib/types/vehicle-purchase-payments.d.ts +23 -1
  20. package/lib/types/vehicle-purchase-payments.d.ts.map +1 -1
  21. package/lib/types/vehicle-purchase-payments.js +6 -0
  22. package/lib/types/vehicle-purchase-payments.js.map +1 -1
  23. package/lib/types/vehicles.d.ts +7 -0
  24. package/lib/types/vehicles.d.ts.map +1 -1
  25. package/lib/types/vehicles.js.map +1 -1
  26. package/lib/utils/opportunity-payments.d.ts +3 -0
  27. package/lib/utils/opportunity-payments.d.ts.map +1 -0
  28. package/lib/utils/opportunity-payments.js +5 -0
  29. package/lib/utils/opportunity-payments.js.map +1 -0
  30. package/lib/utils/opportunity-payments.test.d.ts +2 -0
  31. package/lib/utils/opportunity-payments.test.d.ts.map +1 -0
  32. package/lib/utils/opportunity-payments.test.js +23 -0
  33. package/lib/utils/opportunity-payments.test.js.map +1 -0
  34. package/lib/utils/tenants.d.ts +3 -0
  35. package/lib/utils/tenants.d.ts.map +1 -1
  36. package/lib/utils/tenants.js +3 -0
  37. package/lib/utils/tenants.js.map +1 -1
  38. package/lib/utils/tenants.test.js +27 -1
  39. package/lib/utils/tenants.test.js.map +1 -1
  40. package/package.json +1 -1
  41. package/src/apis/exchange-rates.ts +49 -0
  42. package/src/types/activities.js +13 -0
  43. package/src/types/activities.js.map +1 -0
  44. package/src/types/comparables.js +2 -0
  45. package/src/types/comparables.js.map +1 -0
  46. package/src/types/crm.js +58 -0
  47. package/src/types/crm.js.map +1 -0
  48. package/src/types/dashboard.js +2 -0
  49. package/src/types/dashboard.js.map +1 -0
  50. package/src/types/definitions.js +2 -0
  51. package/src/types/definitions.js.map +1 -0
  52. package/src/types/fields.js +2 -0
  53. package/src/types/fields.js.map +1 -0
  54. package/src/types/insights.js +2 -0
  55. package/src/types/insights.js.map +1 -0
  56. package/src/types/intercompany-payments.ts +4 -3
  57. package/src/types/interests.js +6 -0
  58. package/src/types/interests.js.map +1 -0
  59. package/src/types/internal-events.js +18 -0
  60. package/src/types/internal-events.js.map +1 -0
  61. package/src/types/internet-opportunities.js +2 -0
  62. package/src/types/internet-opportunities.js.map +1 -0
  63. package/src/types/internet-vehicles.js +2 -0
  64. package/src/types/internet-vehicles.js.map +1 -0
  65. package/src/types/leasing-administration.js +2 -0
  66. package/src/types/leasing-administration.js.map +1 -0
  67. package/src/types/leasing-debtors.js +2 -0
  68. package/src/types/leasing-debtors.js.map +1 -0
  69. package/src/types/leasing-search.js +2 -0
  70. package/src/types/leasing-search.js.map +1 -0
  71. package/src/types/leasing-settings.js +7 -0
  72. package/src/types/leasing-settings.js.map +1 -0
  73. package/src/types/leasing.js +38 -0
  74. package/src/types/leasing.js.map +1 -0
  75. package/src/types/marketing.js +35 -0
  76. package/src/types/marketing.js.map +1 -0
  77. package/src/types/offers.js +56 -0
  78. package/src/types/offers.ts +2 -0
  79. package/src/types/opportunities.js +107 -0
  80. package/src/types/opportunities.js.map +1 -0
  81. package/src/types/opportunities.ts +15 -0
  82. package/src/types/opportunity-payments.ts +23 -0
  83. package/src/types/payments.js +7 -0
  84. package/src/types/picklists.js +2 -0
  85. package/src/types/picklists.js.map +1 -0
  86. package/src/types/quotes.js +42 -0
  87. package/src/types/recently-viewed.js +2 -0
  88. package/src/types/recently-viewed.js.map +1 -0
  89. package/src/types/reservations.js +5 -0
  90. package/src/types/reservations.js.map +1 -0
  91. package/src/types/roi-ratings.js +5 -0
  92. package/src/types/roi-ratings.js.map +1 -0
  93. package/src/types/saved-filters.js +9 -0
  94. package/src/types/saved-filters.js.map +1 -0
  95. package/src/types/search.js +2 -0
  96. package/src/types/search.js.map +1 -0
  97. package/src/types/settings.js +2 -0
  98. package/src/types/settings.js.map +1 -0
  99. package/src/types/templates.js +2 -0
  100. package/src/types/templates.js.map +1 -0
  101. package/src/types/tenants.js +21 -0
  102. package/src/types/tenants.js.map +1 -0
  103. package/src/types/tenants.ts +6 -0
  104. package/src/types/user-performance.js +7 -0
  105. package/src/types/user-performance.js.map +1 -0
  106. package/src/types/utils.js +2 -0
  107. package/src/types/validation.js +2 -0
  108. package/src/types/validation.js.map +1 -0
  109. package/src/types/vehicle-purchase-payments.ts +52 -6
  110. package/src/types/vehicle-sales.js +6 -0
  111. package/src/types/vehicle-sales.js.map +1 -0
  112. package/src/types/vehicles.js +98 -0
  113. package/src/types/vehicles.js.map +1 -0
  114. package/src/types/vehicles.ts +15 -1
  115. package/src/utils/leasing.js +6 -0
  116. package/src/utils/leasing.js.map +1 -0
  117. package/src/utils/opportunities.js +48 -0
  118. package/src/utils/opportunities.js.map +1 -0
  119. package/src/utils/opportunity-payments.test.ts +31 -0
  120. package/src/utils/opportunity-payments.ts +15 -0
  121. package/src/utils/tenants.test.ts +39 -1
  122. package/src/utils/tenants.ts +17 -0
  123. package/tsconfig.tsbuildinfo +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"tenants.js","sourceRoot":"/","sources":["types/tenants.ts"],"names":[],"mappings":"AAgBA,MAAM,CAAN,IAAY,YAgEX;AAhED,WAAY,YAAY;IACtB,iDAAiC,CAAA;IACjC,2BAAW,CAAA;IAOX,0CAA0B,CAAA;IAC1B,2BAAW,CAAA;IACX,6BAAa,CAAA;IAMb,0CAA0B,CAAA;IAQ1B,4CAA4B,CAAA;IAC5B,+BAAe,CAAA;IACf,mCAAmB,CAAA;IACnB,yEAAyD,CAAA;IACzD,uCAAuB,CAAA;IACvB,qCAAqB,CAAA;IAQrB,6CAA6B,CAAA;IAC7B,+CAA+B,CAAA;IAC/B,iCAAiB,CAAA;IAOjB,kDAAkC,CAAA;IAClC,qCAAqB,CAAA;IACrB,+BAAe,CAAA;IACf,iDAAiC,CAAA;IACjC,uCAAuB,CAAA;IACvB,gDAAgC,CAAA;IAMhC,gEAAgD,CAAA;IAChD,+BAAe,CAAA;IACf,8DAA8C,CAAA;IAC9C,uCAAuB,CAAA;IACvB,mCAAmB,CAAA;IACnB,uCAAuB,CAAA;AACzB,CAAC,EAhEW,YAAY,KAAZ,YAAY,QAgEvB;AAGD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,CAAU,CAAC","sourcesContent":["import { CognitoInfo, LocationValue, Region } from '@bisondesk/commons-sdk/types';\nimport { OpportunityType } from '../constants.js';\n\nexport type PublicTenant = {\n defaultCountry: string;\n defaultCurrency: string;\n defaultLanguage: string;\n id: string; // the id is provided on creation bc we assume tenants will be created by someone on the team\n name: string;\n region: Region;\n subdomains: [string, ...string[]];\n\n // Pay attention to what information is added here since\n // the tenant can be obtained without authentication\n};\n\nexport enum TenantModule {\n Administration = 'administration',\n App = 'app',\n /**\n * The tenant's users can put the app into client mode, hiding the internal-only pages while\n * showing a screen to a customer. Left off for a tenant whose users are themselves the\n * customer: it would hide their sign-out to no purpose, and turning it back off needs a PIN\n * they were never given.\n */\n ClientMode = 'client_mode',\n CRM = 'crm',\n Docs = 'docs',\n /**\n * The app may send email on behalf of this tenant's users, e.g. sharing a vehicle: the\n * sender is the requesting user's own address, so the tenant's email domain must be one we\n * can deliver from. Absent on client tenants — we do not send mail as outsiders.\n */\n EmailShare = 'email_share',\n /**\n * The tenant's users can sign in with Google. It is a tenant fact rather than a user one:\n * `googleEmail` is only filled when the Google address differs from the BisonDesk one, and\n * every pool carries the Google provider regardless, so neither can tell who actually uses it.\n * Absent means password-only, which is what routes those users an emailed invite with a\n * genuine temporary password.\n */\n GoogleLogin = 'google_login',\n Leads = 'leads',\n Leasing = 'leasing',\n LeasingContractGeneration = 'leasing_contract_generation',\n Marketing = 'marketing',\n Insights = 'insights',\n /**\n * The tenant has agreed to exchange deal data through BisonDesk automatically, on top of the\n * bare vehicle distribution: it may be named as the buyer on an intercompany sale, which lets\n * the invoice sync and the purchase reconciliation write a purchase onto its copy. Read on the\n * BUYER only. All group tenants have it today; a supplier or client tenant that wants deal\n * data pushed too joins the exchange by being granted it.\n */\n Intercompany = 'intercompany',\n Opportunities = 'opportunities',\n Offers = 'offers',\n /**\n * The tenant pays suppliers through Isabel file exports (SEPA transfer files). It grants the\n * export itself and the verification of the supplier bank accounts it pays to, and requires those\n * account numbers to be valid IBANs. Without it, Processing payments are simply marked paid, and\n * a bank account can hold any account number.\n */\n PaymentExports = 'payment_exports',\n Vehicles = 'vehicles',\n Tasks = 'tasks',\n TrackAndTrace = 'track_and_trace',\n Bootstrap = 'bootstrap',\n WhatsappCrisp = 'whatsapp_crisp',\n /**\n * The app sends leasing clients WhatsApp messages on its own: the monthly invoice summary and\n * the overdue payment reminders (ADR-0026). Separate from `whatsapp_crisp`, which only lets\n * users send WhatsApp messages themselves. Both flows also need the tenant's Crisp settings.\n */\n WhatsappNotifications = 'whatsapp_notifications',\n Hexon = 'hexon',\n DeliveryConfirmation = 'delivery_confirmation',\n Transport = 'transport',\n Reports = 'reports',\n Prospects = 'prospects',\n}\n\n/** Report tabs a tenant can enable, in canonical order. */\nexport const REPORT_TAB_KEYS = ['sales', 'leasing', 'purchases', 'arrivals'] as const;\n\nexport type ReportTabKey = (typeof REPORT_TAB_KEYS)[number];\n\nexport type Tenant = PublicTenant & {\n cognito?: CognitoInfo;\n languages: [string, ...string[]];\n conglomerate?: string;\n emailDomain: string;\n hyperdmsIds?: string[];\n hyperportalId?: string;\n\n /* deprecated */\n exactAccounting?: boolean;\n\n branches: [Branch, ...Branch[]];\n modules: TenantModule[];\n /**\n * Reports page configuration. `tabs` lists the visible tabs in display order;\n * absent or empty means no reports are configured for the tenant (the page\n * shows a notice instead of tabs).\n */\n reports?: {\n tabs: ReportTabKey[];\n };\n test?: boolean;\n opportunities: {\n types: OpportunityType[];\n };\n /**\n * Reservation expiry for this tenant's OWN vehicles (ADR-0026): the truck's owner sets the\n * clock, wherever the deal runs — for a cross-tenant copy the chain origin's policy\n * applies, whatever opportunity type the tenant selling to the end customer uses.\n * Absent = the default\n * business-day tiers; the tier is still picked by the local customer org's\n * trustworthy/conglomerate flags.\n */\n reservationExpiry?: ReservationExpiryPolicy;\n crm?: {\n vatNumberRequiredForCompanies?: boolean;\n };\n accounting?: {\n costCenterPerLine?: boolean;\n };\n // E.164 Twilio caller ID used as a fallback when a user has no own number configured\n defaultTwilioPhoneNumber?: string;\n deliveryEmail?: string;\n /**\n * The tenant's brand. The vehicle sticker's header band takes `primary`, and so do document\n * headings when the branch letterhead sets no colour, so one layout serves every tenant. The\n * app's navigation shows the tenant name on `primary`, so users working in several tenants\n * can tell them apart. Absent = neutral grey.\n */\n brand?: {\n /** `#rrggbb` */\n primary: string;\n };\n};\n\nexport type ReservationExpiryPolicy =\n | { policy: 'disabled' }\n | { policy: 'days'; generic: number; trustworthy: number; conglomerate: number };\n\nexport type AccountingProvider = 'exact' | 'odoo';\n\nexport type Branch = {\n id: string;\n name: string;\n country: string;\n language: string;\n /* deprecated — use `accounting === 'exact'` instead. Kept until prod cutover. */\n exactAccounting?: boolean;\n accounting?: AccountingProvider;\n currency: string;\n adminNumberPrefix: string;\n stockNumberPrefix: string;\n vatNumber: string;\n contactPerson?: { firstName: string; lastName: string };\n vatRates: {\n standard: string; //percentage value (e.g. 21)\n };\n location: LocationValue;\n /**\n * The parking (a `location` picklist value) this branch's vehicles go to when their purchase\n * names none. Vehicle entry offers it as the stock destination, and the transport ITR prints\n * it as the park. Absent = the ITR prints the branch's own address.\n */\n defaultParking?: string;\n\n storecoveExternalId?: number;\n // true if the branch is for a company where VAT is due when the invoice\n // is issued not when the payment is collected (e.g. France, Italy, Spain)\n vatOnDebits?: boolean;\n /**\n * The French issuing duties — e-invoicing, e-reporting and the Encaissée status — are switched\n * on for this branch. Receiving is unaffected and always active.\n *\n * Kept separate from `storecoveExternalId` on purpose: registering a Storecove legal entity only\n * makes a branch reachable, it does not mean the French duties have started. As a PME those\n * duties begin 2027-09-01, so this stays off until then or until a deliberate earlier adoption.\n */\n frIssuingEnabled?: boolean;\n externalQuote?: boolean;\n hyperdmsId?: string;\n internalDealsEnabled?: boolean;\n /** The source invoices the end customer directly; this branch collects payment and earns\n * commission. Intercompany source opportunities for this branch's deals take the buyer\n * deal's own client instead of the branch counterparty org. */\n dropshipping?: boolean;\n};\n\nexport type WhatsappStateResponse = {\n enabled: boolean;\n};\n\n/**\n * What the login page is told about a tenant before anyone has signed in. Reached by subdomain\n * on the one public tenant endpoint, so it carries only what an anonymous visitor may see —\n * mind that when adding to it.\n *\n * The two booleans are answers the page cannot work out for itself: it has no session, so no\n * modules to read. They say which sign-in options to offer and whether WhatsApp sharing is on.\n */\nexport type TenantInfoResponse = {\n tenant: PublicTenant;\n whatsapp: boolean;\n googleLogin: boolean;\n cognito: CognitoInfo;\n};\n"]}
1
+ {"version":3,"file":"tenants.js","sourceRoot":"/","sources":["types/tenants.ts"],"names":[],"mappings":"AAgBA,MAAM,CAAN,IAAY,YAgEX;AAhED,WAAY,YAAY;IACtB,iDAAiC,CAAA;IACjC,2BAAW,CAAA;IAOX,0CAA0B,CAAA;IAC1B,2BAAW,CAAA;IACX,6BAAa,CAAA;IAMb,0CAA0B,CAAA;IAQ1B,4CAA4B,CAAA;IAC5B,+BAAe,CAAA;IACf,mCAAmB,CAAA;IACnB,yEAAyD,CAAA;IACzD,uCAAuB,CAAA;IACvB,qCAAqB,CAAA;IAQrB,6CAA6B,CAAA;IAC7B,+CAA+B,CAAA;IAC/B,iCAAiB,CAAA;IAOjB,kDAAkC,CAAA;IAClC,qCAAqB,CAAA;IACrB,+BAAe,CAAA;IACf,iDAAiC,CAAA;IACjC,uCAAuB,CAAA;IACvB,gDAAgC,CAAA;IAMhC,gEAAgD,CAAA;IAChD,+BAAe,CAAA;IACf,8DAA8C,CAAA;IAC9C,uCAAuB,CAAA;IACvB,mCAAmB,CAAA;IACnB,uCAAuB,CAAA;AACzB,CAAC,EAhEW,YAAY,KAAZ,YAAY,QAgEvB;AAGD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,CAAU,CAAC","sourcesContent":["import { CognitoInfo, LocationValue, Region } from '@bisondesk/commons-sdk/types';\nimport { OpportunityType } from '../constants.js';\n\nexport type PublicTenant = {\n defaultCountry: string;\n defaultCurrency: string;\n defaultLanguage: string;\n id: string; // the id is provided on creation bc we assume tenants will be created by someone on the team\n name: string;\n region: Region;\n subdomains: [string, ...string[]];\n\n // Pay attention to what information is added here since\n // the tenant can be obtained without authentication\n};\n\nexport enum TenantModule {\n Administration = 'administration',\n App = 'app',\n /**\n * The tenant's users can put the app into client mode, hiding the internal-only pages while\n * showing a screen to a customer. Left off for a tenant whose users are themselves the\n * customer: it would hide their sign-out to no purpose, and turning it back off needs a PIN\n * they were never given.\n */\n ClientMode = 'client_mode',\n CRM = 'crm',\n Docs = 'docs',\n /**\n * The app may send email on behalf of this tenant's users, e.g. sharing a vehicle: the\n * sender is the requesting user's own address, so the tenant's email domain must be one we\n * can deliver from. Absent on client tenants — we do not send mail as outsiders.\n */\n EmailShare = 'email_share',\n /**\n * The tenant's users can sign in with Google. It is a tenant fact rather than a user one:\n * `googleEmail` is only filled when the Google address differs from the BisonDesk one, and\n * every pool carries the Google provider regardless, so neither can tell who actually uses it.\n * Absent means password-only, which is what routes those users an emailed invite with a\n * genuine temporary password.\n */\n GoogleLogin = 'google_login',\n Leads = 'leads',\n Leasing = 'leasing',\n LeasingContractGeneration = 'leasing_contract_generation',\n Marketing = 'marketing',\n Insights = 'insights',\n /**\n * The tenant has agreed to exchange deal data through BisonDesk automatically, on top of the\n * bare vehicle distribution: it may be named as the buyer on an intercompany sale, which lets\n * the invoice sync and the purchase reconciliation write a purchase onto its copy. Read on the\n * BUYER only. All group tenants have it today; a supplier or client tenant that wants deal\n * data pushed too joins the exchange by being granted it.\n */\n Intercompany = 'intercompany',\n Opportunities = 'opportunities',\n Offers = 'offers',\n /**\n * The tenant pays suppliers through Isabel file exports (SEPA transfer files). It grants the\n * export itself and the verification of the supplier bank accounts it pays to, and requires those\n * account numbers to be valid IBANs. Without it, Processing payments are simply marked paid, and\n * a bank account can hold any account number.\n */\n PaymentExports = 'payment_exports',\n Vehicles = 'vehicles',\n Tasks = 'tasks',\n TrackAndTrace = 'track_and_trace',\n Bootstrap = 'bootstrap',\n WhatsappCrisp = 'whatsapp_crisp',\n /**\n * The app sends leasing clients WhatsApp messages on its own: the monthly invoice summary and\n * the overdue payment reminders (ADR-0026). Separate from `whatsapp_crisp`, which only lets\n * users send WhatsApp messages themselves. Both flows also need the tenant's Crisp settings.\n */\n WhatsappNotifications = 'whatsapp_notifications',\n Hexon = 'hexon',\n DeliveryConfirmation = 'delivery_confirmation',\n Transport = 'transport',\n Reports = 'reports',\n Prospects = 'prospects',\n}\n\n/** Report tabs a tenant can enable, in canonical order. */\nexport const REPORT_TAB_KEYS = ['sales', 'leasing', 'purchases', 'arrivals'] as const;\n\nexport type ReportTabKey = (typeof REPORT_TAB_KEYS)[number];\n\nexport type Tenant = PublicTenant & {\n cognito?: CognitoInfo;\n languages: [string, ...string[]];\n conglomerate?: string;\n emailDomain: string;\n hyperdmsIds?: string[];\n hyperportalId?: string;\n\n /* deprecated */\n exactAccounting?: boolean;\n\n branches: [Branch, ...Branch[]];\n modules: TenantModule[];\n /**\n * Reports page configuration. `tabs` lists the visible tabs in display order;\n * absent or empty means no reports are configured for the tenant (the page\n * shows a notice instead of tabs).\n */\n reports?: {\n tabs: ReportTabKey[];\n };\n test?: boolean;\n opportunities: {\n types: OpportunityType[];\n };\n /**\n * Reservation expiry for this tenant's OWN vehicles (ADR-0026): the truck's owner sets the\n * clock, wherever the deal runs — for a cross-tenant copy the chain origin's policy\n * applies, whatever opportunity type the tenant selling to the end customer uses.\n * Absent = the default\n * business-day tiers; the tier is still picked by the local customer org's\n * trustworthy/conglomerate flags.\n */\n reservationExpiry?: ReservationExpiryPolicy;\n crm?: {\n vatNumberRequiredForCompanies?: boolean;\n };\n accounting?: {\n costCenterPerLine?: boolean;\n };\n // E.164 Twilio caller ID used as a fallback when a user has no own number configured\n defaultTwilioPhoneNumber?: string;\n deliveryEmail?: string;\n /**\n * The tenant's brand. The vehicle sticker's header band takes `primary`, and so do document\n * headings when the branch letterhead sets no colour, so one layout serves every tenant. The\n * app's navigation shows the tenant name on `primary`, so users working in several tenants\n * can tell them apart. Absent = neutral grey.\n */\n brand?: {\n /** `#rrggbb` */\n primary: string;\n };\n};\n\nexport type ReservationExpiryPolicy =\n | { policy: 'disabled' }\n | { policy: 'days'; generic: number; trustworthy: number; conglomerate: number };\n\nexport type AccountingProvider = 'exact' | 'odoo';\n\nexport type Branch = {\n id: string;\n name: string;\n country: string;\n language: string;\n /* deprecated — use `accounting === 'exact'` instead. Kept until prod cutover. */\n exactAccounting?: boolean;\n accounting?: AccountingProvider;\n currency: string;\n /**\n * The currencies money moves in at this branch, its own `currency` included. Customer payments,\n * purchase prices, supplier invoice drafts and Exact bookings are supported in these currencies\n * only. Absent = the branch's own `currency` only. Set by script.\n */\n paymentCurrencies?: [string, ...string[]];\n adminNumberPrefix: string;\n stockNumberPrefix: string;\n vatNumber: string;\n contactPerson?: { firstName: string; lastName: string };\n vatRates: {\n standard: string; //percentage value (e.g. 21)\n };\n location: LocationValue;\n /**\n * The parking (a `location` picklist value) this branch's vehicles go to when their purchase\n * names none. Vehicle entry offers it as the stock destination, and the transport ITR prints\n * it as the park. Absent = the ITR prints the branch's own address.\n */\n defaultParking?: string;\n\n storecoveExternalId?: number;\n // true if the branch is for a company where VAT is due when the invoice\n // is issued not when the payment is collected (e.g. France, Italy, Spain)\n vatOnDebits?: boolean;\n /**\n * The French issuing duties — e-invoicing, e-reporting and the Encaissée status — are switched\n * on for this branch. Receiving is unaffected and always active.\n *\n * Kept separate from `storecoveExternalId` on purpose: registering a Storecove legal entity only\n * makes a branch reachable, it does not mean the French duties have started. As a PME those\n * duties begin 2027-09-01, so this stays off until then or until a deliberate earlier adoption.\n */\n frIssuingEnabled?: boolean;\n externalQuote?: boolean;\n hyperdmsId?: string;\n internalDealsEnabled?: boolean;\n /** The source invoices the end customer directly; this branch collects payment and earns\n * commission. Intercompany source opportunities for this branch's deals take the buyer\n * deal's own client instead of the branch counterparty org. */\n dropshipping?: boolean;\n};\n\nexport type WhatsappStateResponse = {\n enabled: boolean;\n};\n\n/**\n * What the login page is told about a tenant before anyone has signed in. Reached by subdomain\n * on the one public tenant endpoint, so it carries only what an anonymous visitor may see —\n * mind that when adding to it.\n *\n * The two booleans are answers the page cannot work out for itself: it has no session, so no\n * modules to read. They say which sign-in options to offer and whether WhatsApp sharing is on.\n */\nexport type TenantInfoResponse = {\n tenant: PublicTenant;\n whatsapp: boolean;\n googleLogin: boolean;\n cognito: CognitoInfo;\n};\n"]}
@@ -7,17 +7,24 @@ export declare enum PaymentStage {
7
7
  Processing = "processing",
8
8
  Executed = "executed"
9
9
  }
10
+ export type VehiclePurchasePaymentForeign = {
11
+ amount: string;
12
+ currencyCode: string;
13
+ exchangeRate: string;
14
+ };
10
15
  export type NewVehiclePurchasePayment = {
11
16
  vehicleId: string;
12
17
  amount: string;
18
+ foreign?: Pick<VehiclePurchasePaymentForeign, 'amount' | 'currencyCode'>;
13
19
  description?: string;
14
20
  paidAt?: string;
15
21
  paidBy?: string;
16
22
  };
17
- export type VehiclePurchasePayment = NewVehiclePurchasePayment & {
23
+ export type VehiclePurchasePayment = Omit<NewVehiclePurchasePayment, 'foreign'> & {
18
24
  id: string;
19
25
  createdBy: string;
20
26
  createdAt: string;
27
+ foreign?: VehiclePurchasePaymentForeign;
21
28
  stage: PaymentStage;
22
29
  priority: number;
23
30
  exportId?: string;
@@ -48,6 +55,20 @@ export declare enum UnpaidPurchaseGroup {
48
55
  Arrived = "arrived",
49
56
  Expected = "expected"
50
57
  }
58
+ export declare enum UnpaidPurchaseLogisticStatus {
59
+ Delivered = "delivered",
60
+ Arrived = "arrived",
61
+ Expected = "expected"
62
+ }
63
+ export type UnpaidPurchasesFilters = {
64
+ q?: string;
65
+ sold?: boolean;
66
+ logisticStatus?: UnpaidPurchaseLogisticStatus;
67
+ purchasedBy?: string[];
68
+ branchId?: string;
69
+ used?: boolean;
70
+ group?: UnpaidPurchaseGroup;
71
+ };
51
72
  export type UnpaidPurchase = {
52
73
  group: UnpaidPurchaseGroup;
53
74
  vehicle: SearchVehicle;
@@ -60,6 +81,7 @@ export type UnpaidPurchase = {
60
81
  };
61
82
  export type UnpaidPurchasesMeta = {
62
83
  canAllowPayment: boolean;
84
+ purchasers: string[];
63
85
  counts: Record<UnpaidPurchaseGroup, number>;
64
86
  };
65
87
  export type ExportPaymentsRequest = {
@@ -1 +1 @@
1
- {"version":3,"file":"vehicle-purchase-payments.d.ts","sourceRoot":"/","sources":["types/vehicle-purchase-payments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,8BAA8B,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,eAAO,MAAM,oDAAoD,kDAChB,CAAC;AASlD,oBAAY,YAAY;IACtB,OA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AC9C,OAAO,EAAE,sBAAsB,CAAC;IAChC,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,MAAM,EAAE,QAAQ,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,iCAAiC,GAAG;IAC9C,OAAO,EAAE,sBAAsB,CAAC;IAChC,eAAe,EAAE,sBAAsB,CAAC;IACxC,MAAM,EAAE,QAAQ,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,iCAAiC,GAAG;IAC9C,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,eAAe,EAAE,sBAAsB,CAAC;IACxC,MAAM,EAAE,QAAQ,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,SAAS,GACjD,CACI,iCAAiC,GACjC,iCAAiC,GACjC,iCAAiC,CACpC,CAAC"}
@@ -11,4 +11,10 @@ export var UnpaidPurchaseGroup;
11
11
  UnpaidPurchaseGroup["Arrived"] = "arrived";
12
12
  UnpaidPurchaseGroup["Expected"] = "expected";
13
13
  })(UnpaidPurchaseGroup || (UnpaidPurchaseGroup = {}));
14
+ export var UnpaidPurchaseLogisticStatus;
15
+ (function (UnpaidPurchaseLogisticStatus) {
16
+ UnpaidPurchaseLogisticStatus["Delivered"] = "delivered";
17
+ UnpaidPurchaseLogisticStatus["Arrived"] = "arrived";
18
+ UnpaidPurchaseLogisticStatus["Expected"] = "expected";
19
+ })(UnpaidPurchaseLogisticStatus || (UnpaidPurchaseLogisticStatus = {}));
14
20
  //# sourceMappingURL=vehicle-purchase-payments.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"vehicle-purchase-payments.js","sourceRoot":"/","sources":["types/vehicle-purchase-payments.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,oDAAoD,GAC/D,+CAA+C,CAAC;AASlD,MAAM,CAAN,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,mCAAmB,CAAA;IACnB,yCAAyB,CAAA;IACzB,qCAAqB,CAAA;AACvB,CAAC,EAJW,YAAY,KAAZ,YAAY,QAIvB;AA8ED,MAAM,CAAN,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,oCAAa,CAAA;IACb,0CAAmB,CAAA;IACnB,4CAAqB,CAAA;AACvB,CAAC,EAJW,mBAAmB,KAAnB,mBAAmB,QAI9B","sourcesContent":["import { BaseEvent } from './internal-events.js';\nimport { OrganizationBankAccountActions } from './organization-bank-accounts.js';\nimport { SearchVehicle } from './vehicles.js';\n\nexport const VEHICLE_PURCHASE_PAYMENT_ALLOWED_NOTIFICATION_ORIGIN =\n 'vehicle-purchase-payment-allowed-notification';\n\n/**\n * The stage a supplier payment sits at, driving the Unpaid/Allowed/Processing/Executed tabs.\n * A payment only ever moves forward: an authorised payment is `allowed`; sending it to processing\n * groups it into a payment batch and hands it to accounting (`processing`), which exports it\n * to the Isabel bank file; marking it paid moves it to `executed`.\n * (`unpaid` is not a stage — it is an agreed purchase with an amount still to authorise.)\n */\nexport enum PaymentStage {\n Allowed = 'allowed',\n Processing = 'processing',\n Executed = 'executed',\n}\n\nexport type NewVehiclePurchasePayment = {\n vehicleId: string;\n amount: string;\n description?: string;\n paidAt?: string;\n paidBy?: string;\n};\n\nexport type VehiclePurchasePayment = NewVehiclePurchasePayment & {\n id: string;\n createdBy: string;\n createdAt: string;\n stage: PaymentStage;\n /** Manual settlement priority within the Allowed tab; lower is paid first. */\n priority: number;\n /** Set once the payment has been exported; links it to its payment export. */\n exportId?: string;\n /** The payment batch this payment was sent to processing in; unset while Allowed, and on payments\n * marked paid straight from Allowed. */\n paymentBatchId?: string;\n /**\n * Supplier-facing communication that becomes the SEPA transfer's remittance information (`RmtInf`),\n * so the supplier can reconcile the payment to an invoice. Editable while Processing and not yet\n * exported; prefilled from the latest purchase invoice. This is not the file's per-line\n * `EndToEndId`.\n */\n transferReference?: string;\n /** Who sent the payment to processing, and when — set at the Allowed → Processing step. */\n sentToProcessingBy?: string;\n sentToProcessingAt?: string;\n};\n\n/**\n * One send to processing: the Allowed payments an accountant moved to Processing together, and who\n * sent them. The Processing tab groups its rows by batch. A batch holds no amount of its own; its\n * total is the sum of the payments still in it.\n */\nexport type PaymentBatch = {\n id: string;\n createdAt: string;\n createdBy: string;\n};\n\n/**\n * Whether a payment's supplier can be paid in an export. Mirrors the export gate: a transfer needs a\n * supplier bank account that carries an IBAN and holder name and has been verified. Shown as an\n * export-blocked marker on the Processing rows, where the accountant clears it before exporting.\n * (The invoice / pro-forma document half of the gate is not reflected here — its source is a Q3\n * residual the backend export gate also defers.)\n *\n * The bank account is the supplier's default one, `bankAccountId`, which is the account an export\n * pays. `bankAccountActions` lists what the current user may do on it, so a row can point out the\n * accounts they can verify themselves. Once the account number or holder name changed, verify is\n * left out for accountants, and for whichever Senior Accountant made the change (four-eyes).\n */\nexport type PaymentExportChecks = {\n bankAccountId?: string;\n hasBankAccount: boolean;\n bankAccountVerified: boolean;\n bankAccountActions: OrganizationBankAccountActions[];\n};\n\nexport type VehiclePurchasePaymentBff = {\n payment: VehiclePurchasePayment;\n vehicle: SearchVehicle;\n /** Name of the supplier organisation (`vehicle.purchase.organizationId`), resolved for display. */\n supplierName?: string;\n /** Export checks on the supplier bank account; filled for the Processing list only. */\n exportChecks?: PaymentExportChecks;\n};\n\n/**\n * The group an unpaid purchase is listed under, in the order the Unpaid list shows them: sold to a\n * client (whether or not it has arrived), arrived on our park and not sold, or still expected —\n * neither sold nor arrived.\n */\nexport enum UnpaidPurchaseGroup {\n Sold = 'sold',\n Arrived = 'arrived',\n Expected = 'expected',\n}\n\n/**\n * A row on the Unpaid tab: an agreed purchase that still has an amount to authorise for payment.\n * Derived from the purchase deal and the payments already authorised, not a payment record.\n */\nexport type UnpaidPurchase = {\n group: UnpaidPurchaseGroup;\n vehicle: SearchVehicle;\n /** The agreed purchase price including VAT (`deal.purchase` grossed up by `deal.purchaseVatRate`),\n * so it matches the VAT-inclusive cost the vehicle purchase tab authorises against. */\n purchaseAmount: string;\n /** Sum of amounts already authorised (payments in any stage) for this vehicle. */\n allowedAmount: string;\n /** Sum of the authorised amounts already settled (payments in Executed) for this vehicle. */\n paidAmount: string;\n /** `purchaseAmount − allowedAmount`; always greater than zero for rows shown here. */\n remainingAmount: string;\n /** Due date of the purchase invoice. */\n invoiceDueDate?: string;\n /** Name of the supplier organisation (`vehicle.purchase.organizationId`), resolved for display. */\n supplierName?: string;\n};\n\n/** What a page of one Unpaid group carries besides its rows. */\nexport type UnpaidPurchasesMeta = {\n /** Whether the requester may authorise a payment, as on the vehicle purchase tab. */\n canAllowPayment: boolean;\n /** How many purchases each group holds, for the group headers. */\n counts: Record<UnpaidPurchaseGroup, number>;\n};\n\n/** Body of the export request: the Processing payments to put in one file, the paying account, and the execution date. */\nexport type ExportPaymentsRequest = {\n paymentIds: string[];\n /** The bank account (from documents settings) to pay the file from — the file's debtor. */\n debtorBankAccountId: string;\n /** Single execution date (`yyyy-MM-dd`) written to `ReqdExctnDt`; defaults to today. */\n executionDate?: string;\n};\n\n/** Body of the mark-paid request: the payments (Allowed or Processing) to settle in one call. */\nexport type MarkPaymentsPaidRequest = {\n paymentIds: string[];\n};\n\n/** Body of the send-to-processing request: the Allowed payments to send together as one batch. */\nexport type SendPaymentsToProcessingRequest = {\n paymentIds: string[];\n};\n\n/**\n * How many rows sit behind each payment tab, for the tab counters. Executed is unbounded and has no\n * counter, so it is left out.\n */\nexport type PurchasePaymentCounts = {\n unpaid: number;\n allowed: number;\n processing: number;\n};\n\nexport type VehiclePurchasePaymentCreateEvent = {\n payment: VehiclePurchasePayment;\n previousPayment?: undefined;\n action: 'create';\n actionAt: string;\n userId: string;\n tenantId: string;\n};\n\nexport type VehiclePurchasePaymentUpdateEvent = {\n payment: VehiclePurchasePayment;\n previousPayment: VehiclePurchasePayment;\n action: 'update';\n actionAt: string;\n userId: string;\n tenantId: string;\n};\n\nexport type VehiclePurchasePaymentDeleteEvent = {\n payment?: undefined;\n previousPayment: VehiclePurchasePayment;\n action: 'delete';\n actionAt: string;\n userId: string;\n tenantId: string;\n};\n\nexport type VehiclePurchasePaymentEvent = BaseEvent &\n (\n | VehiclePurchasePaymentCreateEvent\n | VehiclePurchasePaymentUpdateEvent\n | VehiclePurchasePaymentDeleteEvent\n );\n"]}
1
+ {"version":3,"file":"vehicle-purchase-payments.js","sourceRoot":"/","sources":["types/vehicle-purchase-payments.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,oDAAoD,GAC/D,+CAA+C,CAAC;AASlD,MAAM,CAAN,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,mCAAmB,CAAA;IACnB,yCAAyB,CAAA;IACzB,qCAAqB,CAAA;AACvB,CAAC,EAJW,YAAY,KAAZ,YAAY,QAIvB;AA8FD,MAAM,CAAN,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,oCAAa,CAAA;IACb,0CAAmB,CAAA;IACnB,4CAAqB,CAAA;AACvB,CAAC,EAJW,mBAAmB,KAAnB,mBAAmB,QAI9B;AAOD,MAAM,CAAN,IAAY,4BAIX;AAJD,WAAY,4BAA4B;IACtC,uDAAuB,CAAA;IACvB,mDAAmB,CAAA;IACnB,qDAAqB,CAAA;AACvB,CAAC,EAJW,4BAA4B,KAA5B,4BAA4B,QAIvC","sourcesContent":["import { BaseEvent } from './internal-events.js';\nimport { OrganizationBankAccountActions } from './organization-bank-accounts.js';\nimport { SearchVehicle } from './vehicles.js';\n\nexport const VEHICLE_PURCHASE_PAYMENT_ALLOWED_NOTIFICATION_ORIGIN =\n 'vehicle-purchase-payment-allowed-notification';\n\n/**\n * The stage a supplier payment sits at, driving the Unpaid/Allowed/Processing/Executed tabs.\n * A payment only ever moves forward: an authorised payment is `allowed`; sending it to processing\n * groups it into a payment batch and hands it to accounting (`processing`), which exports it\n * to the Isabel bank file; marking it paid moves it to `executed`.\n * (`unpaid` is not a stage — it is an agreed purchase with an amount still to authorise.)\n */\nexport enum PaymentStage {\n Allowed = 'allowed',\n Processing = 'processing',\n Executed = 'executed',\n}\n\n/**\n * A payment on a purchase priced in another currency is authorized and paid in that currency.\n * `amount` then holds its value in branch currency: `foreign.amount × foreign.exchangeRate`.\n */\nexport type VehiclePurchasePaymentForeign = {\n amount: string;\n currencyCode: string;\n /** Branch currency units per 1 unit of `currencyCode`, the purchase's rate. */\n exchangeRate: string;\n};\n\nexport type NewVehiclePurchasePayment = {\n vehicleId: string;\n /** Branch currency. Derived from `foreign` when the purchase is priced in another currency. */\n amount: string;\n /** The backend takes the rate from the purchase. */\n foreign?: Pick<VehiclePurchasePaymentForeign, 'amount' | 'currencyCode'>;\n description?: string;\n paidAt?: string;\n paidBy?: string;\n};\n\nexport type VehiclePurchasePayment = Omit<NewVehiclePurchasePayment, 'foreign'> & {\n id: string;\n createdBy: string;\n createdAt: string;\n foreign?: VehiclePurchasePaymentForeign;\n stage: PaymentStage;\n /** Manual settlement priority within the Allowed tab; lower is paid first. */\n priority: number;\n /** Set once the payment has been exported; links it to its payment export. */\n exportId?: string;\n /** The payment batch this payment was sent to processing in; unset while Allowed, and on payments\n * marked paid straight from Allowed. */\n paymentBatchId?: string;\n /**\n * Supplier-facing communication that becomes the SEPA transfer's remittance information (`RmtInf`),\n * so the supplier can reconcile the payment to an invoice. Editable while Processing and not yet\n * exported; prefilled from the latest purchase invoice. This is not the file's per-line\n * `EndToEndId`.\n */\n transferReference?: string;\n /** Who sent the payment to processing, and when — set at the Allowed → Processing step. */\n sentToProcessingBy?: string;\n sentToProcessingAt?: string;\n};\n\n/**\n * One send to processing: the Allowed payments an accountant moved to Processing together, and who\n * sent them. The Processing tab groups its rows by batch. A batch holds no amount of its own; its\n * total is the sum of the payments still in it.\n */\nexport type PaymentBatch = {\n id: string;\n createdAt: string;\n createdBy: string;\n};\n\n/**\n * Whether a payment's supplier can be paid in an export. Mirrors the export gate: a transfer needs a\n * supplier bank account that carries an IBAN and holder name and has been verified. Shown as an\n * export-blocked marker on the Processing rows, where the accountant clears it before exporting.\n * (The invoice / pro-forma document half of the gate is not reflected here — its source is a Q3\n * residual the backend export gate also defers.)\n *\n * The bank account is the supplier's default one, `bankAccountId`, which is the account an export\n * pays. `bankAccountActions` lists what the current user may do on it, so a row can point out the\n * accounts they can verify themselves. Once the account number or holder name changed, verify is\n * left out for accountants, and for whichever Senior Accountant made the change (four-eyes).\n */\nexport type PaymentExportChecks = {\n bankAccountId?: string;\n hasBankAccount: boolean;\n bankAccountVerified: boolean;\n bankAccountActions: OrganizationBankAccountActions[];\n};\n\nexport type VehiclePurchasePaymentBff = {\n payment: VehiclePurchasePayment;\n vehicle: SearchVehicle;\n /** Name of the supplier organisation (`vehicle.purchase.organizationId`), resolved for display. */\n supplierName?: string;\n /** Export checks on the supplier bank account; filled for the Processing list only. */\n exportChecks?: PaymentExportChecks;\n};\n\n/**\n * The group an unpaid purchase falls in, in the order the Unpaid list ranks them: sold to a client\n * (whether or not it has arrived), arrived on our park and not sold, or still expected — neither\n * sold nor arrived. The single Unpaid list filters by `sold` and `logisticStatus` instead; the\n * `group` filter and `meta.counts` serve the client that paged each group on its own.\n */\nexport enum UnpaidPurchaseGroup {\n Sold = 'sold',\n Arrived = 'arrived',\n Expected = 'expected',\n}\n\n/**\n * Where the vehicle behind an unpaid purchase stands, in the order the Unpaid list ranks its sales:\n * delivered to the client, arrived on our park, or still expected from the supplier. Delivered comes\n * from the sale side, so only a sold vehicle is delivered, whether or not it passed our park.\n */\nexport enum UnpaidPurchaseLogisticStatus {\n Delivered = 'delivered',\n Arrived = 'arrived',\n Expected = 'expected',\n}\n\n/** The filters on the Unpaid list. A filter left out keeps every purchase. */\nexport type UnpaidPurchasesFilters = {\n /**\n * Free text, case-insensitive: every word must appear in the stock number, VIN, vehicle title or\n * supplier name.\n */\n q?: string;\n sold?: boolean;\n logisticStatus?: UnpaidPurchaseLogisticStatus;\n /** Purchasers (`purchase.purchasedBy`); a purchase matches any of them. */\n purchasedBy?: string[];\n branchId?: string;\n /** The vehicle's condition (`external.condition.used`); a vehicle without one matches neither. */\n used?: boolean;\n group?: UnpaidPurchaseGroup;\n};\n\n/**\n * A row on the Unpaid tab: an agreed purchase that still has an amount to authorise for payment.\n * Derived from the purchase deal and the payments already authorised, not a payment record.\n */\nexport type UnpaidPurchase = {\n group: UnpaidPurchaseGroup;\n vehicle: SearchVehicle;\n /** The agreed purchase price including VAT (`deal.purchase` grossed up by `deal.purchaseVatRate`),\n * so it matches the VAT-inclusive cost the vehicle purchase tab authorises against. */\n purchaseAmount: string;\n /** Sum of amounts already authorised (payments in any stage) for this vehicle. */\n allowedAmount: string;\n /** Sum of the authorised amounts already settled (payments in Executed) for this vehicle. */\n paidAmount: string;\n /** `purchaseAmount − allowedAmount`; always greater than zero for rows shown here. */\n remainingAmount: string;\n /** Due date of the purchase invoice. */\n invoiceDueDate?: string;\n /** Name of the supplier organisation (`vehicle.purchase.organizationId`), resolved for display. */\n supplierName?: string;\n};\n\n/** What a page of the Unpaid list carries besides its rows. */\nexport type UnpaidPurchasesMeta = {\n /** Whether the requester may authorise a payment, as on the vehicle purchase tab. */\n canAllowPayment: boolean;\n /** Everyone who purchased an unpaid purchase, unfiltered, for the purchaser filter. */\n purchasers: string[];\n /** How many purchases each group holds, unfiltered. */\n counts: Record<UnpaidPurchaseGroup, number>;\n};\n\n/** Body of the export request: the Processing payments to put in one file, the paying account, and the execution date. */\nexport type ExportPaymentsRequest = {\n paymentIds: string[];\n /** The bank account (from documents settings) to pay the file from — the file's debtor. */\n debtorBankAccountId: string;\n /** Single execution date (`yyyy-MM-dd`) written to `ReqdExctnDt`; defaults to today. */\n executionDate?: string;\n};\n\n/** Body of the mark-paid request: the payments (Allowed or Processing) to settle in one call. */\nexport type MarkPaymentsPaidRequest = {\n paymentIds: string[];\n};\n\n/** Body of the send-to-processing request: the Allowed payments to send together as one batch. */\nexport type SendPaymentsToProcessingRequest = {\n paymentIds: string[];\n};\n\n/**\n * How many rows sit behind each payment tab, for the tab counters. Executed is unbounded and has no\n * counter, so it is left out.\n */\nexport type PurchasePaymentCounts = {\n unpaid: number;\n allowed: number;\n processing: number;\n};\n\nexport type VehiclePurchasePaymentCreateEvent = {\n payment: VehiclePurchasePayment;\n previousPayment?: undefined;\n action: 'create';\n actionAt: string;\n userId: string;\n tenantId: string;\n};\n\nexport type VehiclePurchasePaymentUpdateEvent = {\n payment: VehiclePurchasePayment;\n previousPayment: VehiclePurchasePayment;\n action: 'update';\n actionAt: string;\n userId: string;\n tenantId: string;\n};\n\nexport type VehiclePurchasePaymentDeleteEvent = {\n payment?: undefined;\n previousPayment: VehiclePurchasePayment;\n action: 'delete';\n actionAt: string;\n userId: string;\n tenantId: string;\n};\n\nexport type VehiclePurchasePaymentEvent = BaseEvent &\n (\n | VehiclePurchasePaymentCreateEvent\n | VehiclePurchasePaymentUpdateEvent\n | VehiclePurchasePaymentDeleteEvent\n );\n"]}
@@ -150,6 +150,7 @@ export type NewVehicleRequest = {
150
150
  dealStatus: VehiclePurchaseDealStatus;
151
151
  costs: {
152
152
  purchase: string;
153
+ foreign?: VehiclePurchaseDealForeign;
153
154
  purchaseVatPercentage: string;
154
155
  commission?: string;
155
156
  externalTransport?: string;
@@ -684,6 +685,11 @@ export type VehiclePriceUpdateResponse = {
684
685
  success: false;
685
686
  errors: VehiclePriceUpdateError[];
686
687
  };
688
+ export type VehiclePurchaseDealForeign = {
689
+ purchase: string;
690
+ currencyCode: string;
691
+ exchangeRate: string;
692
+ };
687
693
  export type VehiclePurchase = {
688
694
  organizationId: string;
689
695
  contactId: string;
@@ -716,6 +722,7 @@ export type VehiclePurchase = {
716
722
  readyToDeliver?: boolean;
717
723
  purchaseVatRate?: string;
718
724
  purchase?: string;
725
+ foreign?: VehiclePurchaseDealForeign;
719
726
  bonus?: string;
720
727
  commission?: string;
721
728
  externalTransport?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"vehicles.d.ts","sourceRoot":"/","sources":["types/vehicles.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,QAAQ,EACR,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,oBAAY,YAAY;IACtB,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,YAAY,iBAAiB;CAC9B;AAED,oBAAY,eAAe;IACzB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,GAAG,QAAQ;IACX,QAAQ,aAAa;IACrB,UAAU,gBAAgB;IAC1B,SAAS,eAAe;IACxB,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,UAAU,eAAe;IACzB,UAAU,eAAe;IACzB,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;IAC/B,eAAe,oB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n AttachmentValue,\n Document,\n LocationValue,\n MultiLangValue,\n PaginatedRequest,\n SearchPermissions,\n ShareEmailRequest,\n ShareWhatsappRequest,\n} from '@bisondesk/commons-sdk/types';\nimport { ReferenceData } from '@bisondesk/commons-sdk/utils';\nimport { BaseEvent } from './internal-events.js';\nimport { VehicleSaleLogisticsStatus } from './opportunities.js';\nimport { OpportunityReservation } from './reservations.js';\nimport { ComplexFilter, Filter } from './search.js';\nimport { Transport } from './transports.js';\nimport { DataRecord } from './utils.js';\nimport { VehicleBusinessOverviewXL } from './vehicle-performance.js';\nimport { VehicleSaleInfo } from './vehicle-sales.js';\n\nexport enum VehicleRoles {\n SALE = 'SALE',\n OWN_USE = 'OWN_USE',\n RENTAL = 'RENTAL',\n BUILD = 'BUILD',\n UNKNOWN = 'UNKNOWN',\n BANK_FINANCE = 'BANK_FINANCE',\n}\n\nexport enum VehicleFuelType {\n Petrol = 'PETROL',\n Diesel = 'DIESEL',\n LPG = 'LPG',\n LPG_G3 = 'LPG_G3',\n Electric = 'ELECTRIC',\n CNG = 'CNG',\n Hydrogen = 'HYDROGEN',\n BioEthanol = 'BIO_ETHANOL',\n BioDiesel = 'BIO_DIESEL',\n E85 = 'E85',\n HCNG = 'HCNG',\n LPG_Petrol = 'LPG_PETROL',\n LPG_Diesel = 'LPG_DIESEL',\n LPG_G3_Petrol = 'LPG_G3_PETROL',\n LPG_G3_Diesel = 'LPG_G3_DIESEL',\n Electric_Diesel = 'ELECTRIC_DIESEL',\n Electric_Petrol = 'ELECTRIC_PETROL',\n Hybrid = 'HYBRID',\n Other = 'OTHER',\n}\n\nexport enum VehicleTachoTypes {\n Analog = 'ANALOG',\n Digital = 'DIGITAL',\n SmartTacho1 = 'SMART_TACHO_1',\n SmartTacho2 = 'SMART_TACHO_2',\n}\n\n/**\n * Official manufacturer warranty programs offered\n * */\nexport enum WarrantyProgram {\n OfficialDaf = 'OFFICIAL_DAF',\n OfficialMan = 'OFFICIAL_MAN',\n}\n\ntype BaseVehicleEvent = BaseEvent & {\n id: string;\n actionAt: string;\n userId: string;\n tenantId: string;\n};\n\ntype VehicleSuperstructure = {\n carCapacity?: number;\n compartmentCount?: number;\n counter?: boolean;\n crane?: {\n make?: string;\n model?: string;\n position?: 'Behind the cabin' | 'Rear';\n present?: boolean;\n year?: number;\n };\n dimensions?: {\n height?: number;\n length?: number;\n width?: number;\n extended?: string; // L1, L2, ...\n heightened?: string; // H1, H2, ...\n };\n baseVehicle?: SuperstructureBaseVehicle;\n extendable?: boolean;\n highPressurePump?: boolean;\n loadingPlatformHeight?: number;\n pump?: boolean;\n slidingRoof?: boolean;\n tailgate?: {\n capacity?: number;\n make?: string;\n model?: string;\n present?: boolean;\n type?: 'slider_lift' | 'cantilever' | 'column_lift';\n };\n tank?: {\n capacity: number; //litters\n volume?: number; //m3\n };\n temperatureControl?: {\n engineType?: 'diesel' | 'electric' | 'diesel+electric' | 'engine';\n make?: string;\n runningHours?: {\n diesel?: number;\n electric?: number;\n };\n };\n tipper?: {\n tipsBack?: boolean;\n tipsLeft?: boolean;\n tipsRight?: boolean;\n };\n};\n\nexport type NewVehicleRequest = {\n branch: string;\n count: number;\n specs: VehicleExternalInfo;\n description: {\n remarks?: string;\n technicalRemarks?: string;\n };\n salesConditions?: {\n marginScheme?: boolean;\n manufacturerWarranty?: {\n remarks?: string;\n available?: boolean;\n program?: WarrantyProgram;\n };\n };\n logistics: {\n parking?: string;\n deliveryType?: VehiclePurchaseDeliveryType;\n pickupAddress?: LocationValue;\n status: VehiclePurchaseLogisticsStatus;\n transportWithoutPayment?: boolean;\n };\n prices: {\n minimum?: string;\n premium?: string;\n internet?: string;\n };\n media: {\n internalPictures: AttachmentValue[];\n pictures: AttachmentValue[];\n videos: AttachmentValue[];\n docs: Document[];\n engineeringDocs: Document[];\n };\n vinList?: string;\n /** Bulk only: derive every stock number from a single base number (B49397A, B49397B, ...). */\n relatedStockNumbers?: boolean;\n deal: {\n offerId?: string;\n stockNumber?: string;\n contactId: string;\n orgId: string;\n purchasedBy: string;\n purchaseAssistedBy?: string;\n readyToDeliver?: boolean;\n dealStatus: VehiclePurchaseDealStatus;\n costs: {\n purchase: string;\n purchaseVatPercentage: string;\n commission?: string;\n externalTransport?: string;\n internalTransport?: string;\n externalGarage?: string;\n internalGarage?: string;\n other?: string;\n bonus?: string;\n };\n logistics: {\n availableDate?: string;\n vehicleRole: VehicleRoles;\n };\n };\n};\n\nexport type VehicleCreateEvent = BaseVehicleEvent & {\n action: 'create';\n vehicle: Vehicle;\n previousVehicle?: undefined;\n};\n\nexport type VehicleUpdateEvent = BaseVehicleEvent & {\n action: 'update';\n vehicle: Vehicle;\n previousVehicle: Vehicle;\n};\n\nexport type VehicleDeleteEvent = BaseVehicleEvent & {\n action: 'delete';\n vehicle?: undefined;\n previousVehicle: Vehicle;\n};\n\nexport type VehicleEvent = VehicleCreateEvent | VehicleUpdateEvent | VehicleDeleteEvent;\n\ntype BaseVehiclePurchaseEvent = {\n actionAt: string;\n userId: string;\n tenantId: string;\n branchId: string;\n vehicleId: string;\n};\n\nexport type VehiclePurchaseCreateEvent = BaseVehiclePurchaseEvent & {\n action: 'create';\n data: VehiclePurchase;\n previousData?: undefined;\n};\n\nexport type VehiclePurchaseUpdateEvent = BaseVehiclePurchaseEvent & {\n action: 'update';\n data: VehiclePurchase;\n previousData: VehiclePurchase;\n};\n\nexport type VehiclePurchaseEvent = BaseEvent &\n (VehiclePurchaseCreateEvent | VehiclePurchaseUpdateEvent);\n\nexport type UpdateVehiclesPricesEvent = {\n id: string;\n actionAt: string;\n userId: string;\n tenantId: string;\n priceList: AttachmentValue;\n};\n\nexport type PublicVehicle = Pick<Vehicle, 'external' | 'id'>;\n\nexport type PublicSearchVehicle = {\n vehicle: PublicVehicle;\n};\n\nexport enum SearchVehicleSaleDealStatus {\n NotSold = 'NOT_SOLD',\n Reserved = 'RESERVED',\n Sold = 'SOLD',\n}\n\nexport type SearchVehicle = {\n custom: {\n features: string[];\n sold: boolean;\n isReserved: boolean;\n hasPayments: boolean;\n listedOnWebsite: boolean;\n publishedOnWebsiteAt?: string;\n originalBranchId: string;\n };\n customSortableFields: {\n priceChangedAt?: string;\n checkedInAt?: string;\n saleAgreementAt?: string;\n /** Date the vehicle entered virtual inventory (marketing ?? evaluation ?? purchase-agreed). */\n virtualInventoryStartedAt?: string;\n };\n purchase?: {\n supplierStockNumber?: string;\n readyToDeliver: boolean;\n dealStatus?: VehiclePurchaseDealStatus;\n logisticsStatus?: VehiclePurchaseLogisticsStatus;\n purchasedBy?: string;\n purchaseAgreedAt?: string;\n parkingName?: string;\n organizationId: string;\n organizationExternalId?: number;\n fullPaymentSentAt?: string;\n marketingStartedAt?: string;\n arrivedAt?: string;\n };\n reservation?: Pick<OpportunityReservation, 'expiresAt' | 'opportunityId' | 'createdBy'>;\n transports: Transport[];\n vehicle: Vehicle;\n sale: {\n opportunityId?: string;\n externalSaleId?: string;\n soldAt?: string;\n soldBy?: string;\n sellers?: string[]; // opportunity account manager [+ assistant]\n dealStatus: SearchVehicleSaleDealStatus;\n logisticStatus?: VehicleSaleLogisticsStatus;\n };\n};\n\nexport type InputSearchVehicle = SearchVehicle & {\n permissions?: SearchPermissions;\n};\n\nexport type VehicleSearchMeta = ReferenceData & {\n matchingOffers?: {\n count: number;\n filters: {\n conditions: Array<Filter | ComplexFilter>;\n fullText?: string;\n };\n };\n};\n\nexport type PriceChangeEvent = BaseEvent & {\n tenantId: string;\n userId: string;\n vehicleId: string;\n input: {\n previousPrices: VehiclePricingHistoryInput;\n currentPrices: VehiclePricingHistoryInput;\n };\n};\n\nexport type VehiclePricingHistory = {\n pricing: VehiclePricingHistoryInput;\n createdAt: string;\n createdBy: string;\n};\n\nexport type VehiclePricingHistoryInput = VehiclePricing & { internet?: string };\n\nexport type VehiclePricing = {\n premium?: string;\n minimum?: string;\n currency?: string;\n};\n\nexport type RelatedVehicle = {\n vehicleId: string;\n description: string;\n stockNumber: string;\n};\n\nexport type VehicleBranchHistoryEntry = {\n branch: string;\n stockNumber: string;\n administrativeNumber?: string;\n changedAt: string;\n changedBy: string;\n reason?: string;\n};\n\nexport type VehicleInternalInfo = {\n createdAt: string;\n description: {\n title: string;\n remarks?: string;\n technicalRemarks?: string;\n };\n identification: {\n administrativeNumber?: string;\n stockNumber: string;\n branch: string;\n customerStockNumber?: string;\n offerId?: string;\n licensePlateHistory?: {\n licensePlate: string;\n changedAt: string;\n }[];\n /**\n * One entry per branch the vehicle has left, oldest first. Records the identity it carried\n * there (stock and administrative numbers are redrawn on a move) and who moved it.\n */\n branchHistory?: VehicleBranchHistoryEntry[];\n\n /**\n * This ID is used to link different vehicle objects that represent the same real world asset.\n * Ideally the chassis number could be used, but in some cases it is not available yet.\n */\n metaId: string;\n };\n documents: Document[];\n pictures: AttachmentValue[];\n engineeringDocs: Document[];\n pricing: VehiclePricing;\n /**\n * Set when a target-tenant operator edits the retail price on a cross-tenant\n * copy (`original` set) that is still source-mastered. From that moment,\n * cross-tenant sync stops overwriting `external.salesConditions` from the\n * source. ISO timestamp + user id of the first takeover.\n */\n sourcePriceOverride?: { at: string; by: string };\n role: VehicleRoles;\n /** An own-use vehicle administration can assign to our own transports; read with role OWN_USE. */\n transportFleet?: boolean;\n status: VehicleStatus;\n updatedAt: string;\n /* use this property to store additional terms that you want the vehicle to be found with when doing a full text search */\n keywords?: string[];\n relatedVehicles: RelatedVehicle[];\n};\n\nexport type VehicleOriginalInfo = {\n /** IMMEDIATE source tenant (the predecessor in a sync chain). */\n tenantId: string;\n tenantChain?: string[];\n identification: {\n id: string;\n branchId: string;\n stockNumber: string;\n metaId?: string;\n country: string;\n };\n salesConditions: {\n leasing?: boolean;\n price?: string;\n currency?: string;\n marginScheme?: boolean;\n manufacturerWarranty?: {\n remarks?: string;\n available?: boolean;\n };\n /**\n * The immediate source's sellability at the last sync hop: true when the source was not\n * sellable — not in `SALE` role, had an active reservation or external sale, or was itself\n * unavailable. Derived (never set by a human) and refreshed on every cross-tenant update so\n * it cascades down the whole chain.\n */\n unavailable?: boolean;\n };\n /**\n * Deepest-origin tenant/branch in a multi-hop sync chain. Carries forward\n * verbatim across hops so consumers can answer \"where did this vehicle\n * actually originate?\" without walking the chain.\n */\n owner: {\n tenantId: string;\n branchId: string;\n country: string;\n };\n};\n\nexport type VehicleAxlesInfo = {\n details?: VehicleAxle[];\n configuration?: string;\n count?: number;\n poweredAxlesCount?: number;\n wheelbase?: number;\n suspension?: 'Air' | 'Air/Steel' | 'Steel';\n loadCapacity?: number;\n};\n\nexport type SuperstructureBaseVehicle = {\n category: string;\n make: string;\n model?: string;\n type?: string;\n axlesConfiguration?: string;\n emissionsClass?: string;\n transmissionType?: 'Automatic' | 'Manual' | 'Semi-Automatic';\n vin?: string;\n currentRegistration?: {\n country?: string;\n };\n suspension?: 'Air' | 'Air/Steel' | 'Steel';\n constructionYear?: number;\n firstRegistration?: string;\n odometerKm?: number;\n powerHp?: number;\n bodystyle?: string;\n accessories: VehicleExternalInfo['accessories'];\n superstructure?: Pick<VehicleSuperstructure, 'crane' | 'tailgate'>;\n};\n\n// mostly inspired by the Hexon data model\nexport type VehicleExternalInfo = {\n body?: {\n cabin?: {\n type: 'Day' | 'Sleep / Small' | 'Sleep / Medium' | 'Sleep / Large';\n model?: string;\n };\n colour?: string;\n dimensions?: {\n height?: number;\n length?: number;\n width?: number;\n };\n doorCount?: number;\n interior?: {\n bedCount?: number;\n seatCount?: number;\n };\n internalDimensions?: {\n //for Trailers/Semi-trailers of type reefers, box, curtainsides\n height?: number;\n length?: number;\n width?: number;\n };\n kingpin?: {\n //for Trailers/Semi-trailers\n size?: number; // in inches\n capacity?: number; // in kg\n };\n fifthWheelHeight?: number; //for new trailers in mm\n };\n mainPicture?: AttachmentValue;\n pictures?: AttachmentValue[];\n videos?: AttachmentValue[];\n condition?: {\n damaged?: boolean;\n odometer?: {\n km?: number;\n };\n used?: boolean;\n };\n general: {\n bodystyle?: string;\n category: string;\n make?: string;\n model?: string;\n modelName?: string;\n type?: string;\n typeName?: string;\n tacho?: VehicleTachoTypes;\n color?: {\n mainColorHex?: string; //Hex color code\n chassisColorReferenceCode?: string; //Maker reference code. For now, mainly relevant for new trailers\n upperStructureColorReferenceCode?: string; //Maker reference code. For now, mainly relevant for new trailers\n };\n };\n history?: {\n advertisingYear?: number;\n constructionYear?: number;\n currentRegistration?: {\n country?: string;\n technicalInspectionEndDate?: string;\n carpassUrl?: string;\n carpassAvailable?: boolean;\n };\n firstRegistration?: string;\n cocPvg?: string;\n };\n identification: {\n licensePlate?: string;\n stockNumber?: string;\n vin?: string;\n buildStockNumber?: string;\n engineNumber?: string;\n };\n trailers?: {\n cooler?: {\n hasCooler?: boolean;\n make?: string;\n };\n };\n powertrain?: {\n axles?: VehicleAxlesInfo;\n emissions?: {\n class?: string;\n subclass?: string;\n };\n engine?: {\n cylinderCount?: number;\n energy?: { type?: VehicleFuelType };\n power?: {\n hp?: number;\n };\n displacement?: number;\n };\n transmission?: {\n gearCount?: number;\n make?: string;\n model?: string;\n type?: 'Automatic' | 'Manual' | 'Semi-Automatic';\n };\n };\n salesConditions: {\n leasing?: boolean;\n price?: string | undefined;\n currency?: string | undefined;\n /**\n * Read-only field maintained by `fillReadOnlyFields` on every vehicle save:\n * the value of `price` immediately before the most recent price change. Stays\n * unchanged when `price` does not change between saves. Same currency as\n * `price`. Useful for storefront \"was/now\" price-drop labels and for the AI\n * assistant's negotiation context.\n */\n previousPrice?: string;\n marginScheme?: boolean;\n manufacturerWarranty?: {\n remarks?: string;\n available?: boolean;\n included?: boolean;\n remarksIncluded?: string;\n program?: WarrantyProgram;\n };\n /**\n * Per-country snapshot computed by the owning tenant's `fillReadOnlyFields`.\n * Every field on this snapshot is public — `vehicle.external` rides through\n * to the storefront via cross-tenant sync, so internal-only values (e.g. the\n * owner's freight cost) must not appear here. Cross-tenant sync derives the\n * internal `externalTransport` figure directly from the owner's country-\n * delivery rule at sync time.\n *\n * Each entry exposes:\n * - `price` — bare currency conversion for the rule's country.\n * - `previousPrice` — bare conversion of `salesConditions.previousPrice`\n * when set.\n * - `deliveryPrice` — customer-facing delivery fee (when the rule covers\n * the vehicle's category). Storefront consumers sum\n * `price + (deliveryPrice ?? 0)` at the display layer.\n * - `deliveryLocation` — human-readable label, present whenever the rule\n * declared a location for this country.\n *\n * Only the original owner recomputes on save; cross-tenant copies preserve\n * the array. One exception: the target operator may edit the branch-country\n * entry's `deliveryPrice`. The first such edit is a price takeover\n * (`internal.sourcePriceOverride`), after which the snapshot collapses to the\n * branch-country row and the sync stops rebuilding sales conditions.\n */\n localizedPricing?: Array<{\n countryCode: string;\n currency: string;\n price: number;\n previousPrice?: number;\n deliveryPrice?: number;\n deliveryLocation?: string;\n }>;\n };\n superstructure?: VehicleSuperstructure;\n weights?: {\n gvw?: number;\n massEmpty?: number;\n };\n accessories: {\n abs?: boolean;\n jumbo?: boolean;\n adr?: boolean;\n airco?: boolean;\n alloyWheels?: boolean;\n aluminiumFuelTank?: boolean;\n cdPlayer?: boolean;\n coil?: boolean;\n doubleStock?: boolean;\n centralLocking?: boolean;\n centralLubrication?: boolean;\n cruiseControl?: boolean;\n electricDoorMirrors?: boolean;\n electricWindows?: boolean;\n engineBrake?: boolean;\n forklift?: boolean;\n navigationSystem?: boolean;\n hydraulicTipperKit?: boolean;\n lowDeck?: boolean;\n lowNoise?: boolean;\n mega?: boolean;\n parkingHeater?: boolean;\n particleFilter?: boolean;\n powerTakeOff?: boolean;\n refrigerator?: boolean;\n retarderIntarder?: boolean;\n reversingCamera?: boolean;\n roofSpoiler?: boolean;\n sideSkirts?: boolean;\n spareKey?: boolean;\n spareWheel?: boolean;\n speedLimiter?: boolean;\n spoilers?: boolean;\n spotlights?: boolean;\n stabilityControl?: boolean;\n standardAirco?: boolean;\n television?: boolean;\n toolbox?: boolean;\n trailerCoupling?: boolean;\n twinFuelTank?: boolean;\n visor?: boolean;\n xenonLights?: boolean;\n };\n publicLink?: string;\n};\n\ntype BaseVehicle<I = VehicleInternalInfo, E = VehicleExternalInfo> = {\n internal: I;\n external: E;\n original?: VehicleOriginalInfo;\n};\n\nexport type NewVehicle<I = VehicleInternalInfo, E = VehicleExternalInfo> = BaseVehicle<I, E> & {\n id?: undefined;\n};\n\nexport type Vehicle<I = VehicleInternalInfo, E = VehicleExternalInfo> = BaseVehicle<I, E> & {\n id: string;\n};\n\nexport type VehicleBffMetadata = {\n openOpportunities: number;\n};\n\nexport type VehicleBff = {\n vehicle: DataRecord<Vehicle, VehicleBffMetadata>;\n sale?: VehicleSaleInfo;\n purchase?: VehiclePurchase;\n overview?: VehicleBusinessOverviewXL;\n marketing?: {\n titles?: MultiLangValue;\n listed: boolean;\n sharable: boolean;\n publishedOnWebsiteAt?: string;\n numPlatformsPublished: number;\n };\n};\n\nexport type VehiclesByChassisNumberRequest = {\n tenantIds: string[];\n chassisNumber: string;\n};\n\nexport type VehiclesByMetaIdRequest = {\n tenantIds: string[];\n metaId: string;\n};\n\nexport type VehicleAxle = {\n make?: string;\n alloyWheels?: boolean;\n brakes?: 'Disc' | 'Drum';\n differentialLock?: boolean;\n liftAxle?: boolean;\n maxLoad?: number;\n nr: number;\n position?: string;\n powered?: boolean;\n reduction?: string;\n steering?: boolean;\n suspension?: 'Steel' | 'Air' | 'Hydraulic';\n twinWheels?: boolean;\n tyreSize?: string;\n tyreConditionType?: 'mm' | '%';\n\n tyreConditionMmLeftInside?: number;\n tyreConditionMmLeftOutside?: number;\n tyreConditionMmRightInside?: number;\n tyreConditionMmRightOutside?: number;\n\n tyreConditionPercLeftInside?: number;\n tyreConditionPercLeftOutside?: number;\n tyreConditionPercRightInside?: number;\n tyreConditionPercRightOutside?: number;\n\n steeringType?: 'fixed' | 'self_steering' | 'hydraulic';\n};\n\nexport enum VehiclePurchaseDealStatus {\n Marketing = 'MARKETING',\n PurchaseEvaluation = 'PURCHASE_EVALUATION', // used for vehicle consignation\n PurchaseAgreed = 'PURCHASE_AGREED',\n FirstPaymentAllowed = 'FIRST_PAYMENT_ALLOWED',\n FirstPaymentSent = 'FIRST_PAYMENT_SENT',\n FullPaymentAllowed = 'FULL_PAYMENT_ALLOWED',\n FullPaymentSent = 'FULL_PAYMENT_SENT',\n}\n\nexport enum VehiclePurchaseLogisticsStatus {\n AtOrigin = 'AT_ORIGIN',\n Arrived = 'ARRIVED',\n CheckedIn = 'CHECKED_IN',\n NotApplicable = 'NOT_APPLICABLE',\n}\n\nexport enum VehiclePurchaseDeliveryType {\n PickUp = 'PICK_UP',\n DropOff = 'DROP_OFF',\n}\n\nexport type VehicleStatus = {\n deleted?: boolean;\n deletedReason?: string;\n};\n\nexport type VehiclePriceList = {\n uploadedAt: string;\n uploadedBy: string;\n priceList: AttachmentValue;\n id: string;\n};\n\nexport type UpdateVehiclesPricesRequest = {\n priceList: AttachmentValue;\n};\n\nexport type VehiclePriceListLine = {\n reference: string;\n internet?: string;\n premium?: string;\n minimum?: string;\n};\n\nexport type VehiclePriceUpdateError = {\n data: VehiclePriceListLine;\n line: number;\n error: {\n fieldId: keyof VehiclePriceListLine;\n msg: string;\n };\n};\n\nexport type VehiclePriceUpdateResponse =\n | {\n success: true;\n }\n | {\n success: false;\n errors: VehiclePriceUpdateError[];\n };\n\nexport type VehiclePurchase = {\n organizationId: string;\n contactId: string;\n supplierStockNumber?: string;\n purchasedBy: string;\n purchaseAssistedBy?: string;\n\n log: {\n // computed automatically by the backend\n marketingStartedAt?: string;\n marketingStartedBy?: string;\n\n evaluationStartedAt?: string;\n evaluationStartedBy?: string;\n\n purchaseAgreedAt?: string;\n purchaseAgreedBy?: string;\n\n firstPaymentAllowedAt?: string;\n firstPaymentAllowedBy?: string;\n firstPaymentSentAt?: string;\n firstPaymentSentBy?: string;\n\n fullPaymentAllowedAt?: string;\n fullPaymentAllowedBy?: string;\n fullPaymentSentAt?: string;\n fullPaymentSentBy?: string;\n\n arrivedAt?: string;\n arrivedBy?: string;\n\n checkedInAt?: string;\n checkedInBy?: string;\n };\n\n /** Due date of the supplier purchase invoice; editable from the payments page. */\n invoiceDueDate?: string;\n\n deal: {\n status: VehiclePurchaseDealStatus; // partially set by the user, if there are payments then it is set automatically by the backend\n readyToDeliver?: boolean;\n\n purchaseVatRate?: string;\n purchase?: string; // exclusive VAT\n\n bonus?: string; // sometimes manufacturers pay us a bonus when we reach a target\n\n // estimated costs, real costs come from actual invoices\n commission?: string;\n externalTransport?: string;\n internalTransport?: string;\n externalGarage?: string;\n internalGarage?: string;\n other?: string;\n\n totalCosts?: string; // exclusive VAT\n };\n\n logistics: {\n parkingName?: string;\n status: VehiclePurchaseLogisticsStatus; // manually set by the user\n deliveryType?: VehiclePurchaseDeliveryType;\n pickupAddress?: LocationValue;\n availableWeek?: string; // ISOWEEK, e.g. 2016-W02\n transportWithoutPayment?: boolean;\n };\n};\n\nexport type PurchaseRecordMeta = ReferenceData & {\n allowedLogisticsTransitions?: VehiclePurchaseLogisticsStatus[];\n};\n\nexport type SaveVehiclePurchaseOpts = {\n skipTransportValidation?: boolean;\n /**\n * Save only while the purchase still stands at this version, as read alongside it. The save\n * fails with `vehicles.purchase.changed-since-read` when it has moved on.\n */\n atVersion?: string;\n};\n\nexport enum VehicleActions {\n EditAdminDocs = 'edit_admin_docs',\n EditEngineeringDocs = 'edit_engineering_docs',\n EditMarketing = 'edit_marketing',\n EditMedia = 'edit_media',\n EditPictures = 'edit_pictures',\n EditPrices = 'edit_prices',\n EditPurchaseDeal = 'edit_purchase_deal',\n EditPurchaseLogistics = 'edit_purchase_logistics',\n EditSpecs = 'edit_specs',\n EditVideos = 'edit_videos',\n ViewLeads = 'view_leads',\n ViewBusinessOverview = 'view_business_overview',\n ViewSimilarOnline = 'view_similar_online',\n ViewPurchase = 'view_purchase',\n ViewPriceHistory = 'view_price_history',\n DeleteVehicle = 'delete_vehicle',\n ChangeBranch = 'change_branch',\n}\n\nexport type VehicleBranchChangeRequest = {\n branch: string;\n reason?: string;\n /** Required when the preview carries a warning that needs acknowledgement. */\n acknowledged?: boolean;\n};\n\nexport enum VehicleBranchChangeBlockerCode {\n SameBranch = 'same_branch',\n VehicleDeleted = 'vehicle_deleted',\n CurrencyMismatch = 'currency_mismatch',\n FinanceDocumentsExist = 'finance_documents_exist',\n PurchasePaymentsExist = 'purchase_payments_exist',\n DealCommitted = 'deal_committed',\n VehicleSold = 'vehicle_sold',\n LeasingContractExists = 'leasing_contract_exists',\n RelatedVehicles = 'related_vehicles',\n InternalDealQuote = 'internal_deal_quote',\n IntercompanyLinkLive = 'intercompany_link_live',\n HyperdmsOrganisationChange = 'hyperdms_organisation_change',\n StockNumberTaken = 'stock_number_taken',\n}\n\nexport enum VehicleBranchChangeWarningCode {\n DealsLoseQuotes = 'deals_lose_quotes',\n DealPaymentsExist = 'deal_payments_exist',\n OpenTransports = 'open_transports',\n CopiesWithdrawn = 'copies_withdrawn',\n CopiesCreated = 'copies_created',\n TargetWithoutAccounting = 'target_without_accounting',\n TargetWithoutStorecove = 'target_without_storecove',\n}\n\nexport type VehicleBranchChangeBlocker = {\n code: VehicleBranchChangeBlockerCode;\n data?: Record<string, unknown>;\n};\n\nexport type VehicleBranchChangeWarning = {\n code: VehicleBranchChangeWarningCode;\n /** The write refuses unless the request says `acknowledged: true`. */\n requiresAcknowledgement: boolean;\n data?: Record<string, unknown>;\n};\n\nexport enum VehicleBranchChangeDealOutcome {\n /** Branches are quote-compatible: the deal and its quotes move together. */\n FollowsWithQuotes = 'follows_with_quotes',\n /** The deal moves; its quotes stay archived on the old branch and it needs a new one. */\n FollowsNeedsRequote = 'follows_needs_requote',\n AlreadyOnTarget = 'already_on_target',\n StaysClosed = 'stays_closed',\n /** In Preparation or later: contracts and paperwork exist, so this deal blocks the move. */\n Committed = 'committed',\n}\n\nexport type VehicleBranchChangeDealImpact = {\n opportunityId: string;\n status: string;\n branch: string;\n outcome: VehicleBranchChangeDealOutcome;\n hasActiveQuote: boolean;\n paymentsCount: number;\n};\n\nexport type VehicleBranchChangeIdentity = {\n branch: string;\n stockNumber: string;\n administrativeNumber?: string;\n};\n\nexport type VehicleBranchChangePreview = {\n from: VehicleBranchChangeIdentity;\n /** The administrative number is only known once drawn, so the preview leaves it out. */\n to: Omit<VehicleBranchChangeIdentity, 'administrativeNumber'>;\n blockers: VehicleBranchChangeBlocker[];\n warnings: VehicleBranchChangeWarning[];\n /** Counts of the records that follow are not reported: the warnings above already name them. */\n impact: { deals: VehicleBranchChangeDealImpact[] };\n};\n\nexport type VehicleBranchChangeResult = {\n vehicle: Vehicle;\n from: VehicleBranchChangeIdentity;\n to: VehicleBranchChangeIdentity;\n deals: VehicleBranchChangeDealImpact[];\n /** Repair steps that failed after the vehicle moved; running the move again retries them. */\n failedSteps: string[];\n};\n\nexport enum PurchaseActions {\n ViewDeal = 'view_deal',\n ViewSupplierOrganization = 'view_supplier_organization',\n ViewContact = 'view_contact',\n ViewLegalAddress = 'view_legal_address',\n ViewPickupAddress = 'view_pickup_address',\n ViewEstimatedCosts = 'view_estimated_costs',\n ViewFinanceDocuments = 'view_finance_documents',\n AddPayment = 'add_payment',\n EditPayment = 'edit_payment',\n MarkPaymentDone = 'mark_payment_done',\n AddRemarks = 'add_remarks',\n}\n\nexport enum VehicleBusinessOverviewActions {\n View = 'view_business_overview',\n}\n\nexport type VehicleShareEmailRequest = ShareEmailRequest & {\n pictures: AttachmentValue[];\n};\n\nexport type VehicleShareData = {\n title: string;\n mainPicture?: string;\n pictures: {\n picture: string;\n }[];\n message: string;\n specs: {\n name: string;\n value: string;\n }[];\n features: {\n name: string;\n }[];\n stockNumber: string;\n price?: string;\n description?: string;\n publicLink?: string;\n};\n\nexport type MarketingEmailData = {\n message: string;\n vehicles: VehicleShareData[];\n vehiclePairs: { first: VehicleShareData; second?: VehicleShareData }[];\n lastVehicle?: VehicleShareData;\n unsubscribeUrl?: string;\n};\n\nexport type VehicleReservationCreateEvent = BaseVehicleEvent & {\n action: 'create';\n reservation: OpportunityReservation;\n previousReservation?: undefined;\n};\n\nexport type VehicleReservationUpdateEvent = BaseVehicleEvent & {\n action: 'update';\n reservation: OpportunityReservation;\n previousReservation: OpportunityReservation;\n};\n\nexport type VehicleReservationDeleteEvent = BaseVehicleEvent & {\n action: 'delete';\n reservation?: undefined;\n previousReservation: OpportunityReservation;\n};\n\nexport type VehicleReservationEvent =\n | VehicleReservationCreateEvent\n | VehicleReservationUpdateEvent\n | VehicleReservationDeleteEvent;\n\nexport type ShareVehicleViaWahtsappRequest = {\n data: ShareWhatsappRequest;\n vehicleId: string;\n};\n\ntype RecordChange = {\n modifiedAt: string;\n modifiedBy: string;\n};\n\nexport type VehicleChange = RecordChange & {\n vehicle: Vehicle;\n};\n\nexport type PurchaseChange = RecordChange & {\n purchase: VehiclePurchase;\n};\n\nexport type RecordChangeRequest = PaginatedRequest & {\n fieldPath?: string;\n};\n"]}
1
+ {"version":3,"file":"vehicles.js","sourceRoot":"/","sources":["types/vehicles.ts"],"names":[],"mappings":"AAoBA,MAAM,CAAN,IAAY,YAOX;AAPD,WAAY,YAAY;IACtB,6BAAa,CAAA;IACb,mCAAmB,CAAA;IACnB,iCAAiB,CAAA;IACjB,+BAAe,CAAA;IACf,mCAAmB,CAAA;IACnB,6CAA6B,CAAA;AAC/B,CAAC,EAPW,YAAY,KAAZ,YAAY,QAOvB;AAED,MAAM,CAAN,IAAY,eAoBX;AApBD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,oCAAiB,CAAA;IACjB,8BAAW,CAAA;IACX,oCAAiB,CAAA;IACjB,wCAAqB,CAAA;IACrB,8BAAW,CAAA;IACX,wCAAqB,CAAA;IACrB,6CAA0B,CAAA;IAC1B,2CAAwB,CAAA;IACxB,8BAAW,CAAA;IACX,gCAAa,CAAA;IACb,4CAAyB,CAAA;IACzB,4CAAyB,CAAA;IACzB,kDAA+B,CAAA;IAC/B,kDAA+B,CAAA;IAC/B,sDAAmC,CAAA;IACnC,sDAAmC,CAAA;IACnC,oCAAiB,CAAA;IACjB,kCAAe,CAAA;AACjB,CAAC,EApBW,eAAe,KAAf,eAAe,QAoB1B;AAED,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;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A0B,CAAA;IAC1B,+CAA4B,CAAA;IAC5B,wDAAqC,CAAA;IACrC,6CAA0B,CAAA;AAC5B,CAAC,EAZW,eAAe,KAAf,eAAe,QAY1B;AAED,MAAM,CAAN,IAAY,8BAEX;AAFD,WAAY,8BAA8B;IACxC,iEAA+B,CAAA;AACjC,CAAC,EAFW,8BAA8B,KAA9B,8BAA8B,QAEzC","sourcesContent":["import {\n AttachmentValue,\n Document,\n LocationValue,\n MultiLangValue,\n PaginatedRequest,\n SearchPermissions,\n ShareEmailRequest,\n ShareWhatsappRequest,\n} from '@bisondesk/commons-sdk/types';\nimport { ReferenceData } from '@bisondesk/commons-sdk/utils';\nimport { BaseEvent } from './internal-events.js';\nimport { VehicleSaleLogisticsStatus } from './opportunities.js';\nimport { OpportunityReservation } from './reservations.js';\nimport { ComplexFilter, Filter } from './search.js';\nimport { Transport } from './transports.js';\nimport { DataRecord } from './utils.js';\nimport { VehicleBusinessOverviewXL } from './vehicle-performance.js';\nimport { VehicleSaleInfo } from './vehicle-sales.js';\n\nexport enum VehicleRoles {\n SALE = 'SALE',\n OWN_USE = 'OWN_USE',\n RENTAL = 'RENTAL',\n BUILD = 'BUILD',\n UNKNOWN = 'UNKNOWN',\n BANK_FINANCE = 'BANK_FINANCE',\n}\n\nexport enum VehicleFuelType {\n Petrol = 'PETROL',\n Diesel = 'DIESEL',\n LPG = 'LPG',\n LPG_G3 = 'LPG_G3',\n Electric = 'ELECTRIC',\n CNG = 'CNG',\n Hydrogen = 'HYDROGEN',\n BioEthanol = 'BIO_ETHANOL',\n BioDiesel = 'BIO_DIESEL',\n E85 = 'E85',\n HCNG = 'HCNG',\n LPG_Petrol = 'LPG_PETROL',\n LPG_Diesel = 'LPG_DIESEL',\n LPG_G3_Petrol = 'LPG_G3_PETROL',\n LPG_G3_Diesel = 'LPG_G3_DIESEL',\n Electric_Diesel = 'ELECTRIC_DIESEL',\n Electric_Petrol = 'ELECTRIC_PETROL',\n Hybrid = 'HYBRID',\n Other = 'OTHER',\n}\n\nexport enum VehicleTachoTypes {\n Analog = 'ANALOG',\n Digital = 'DIGITAL',\n SmartTacho1 = 'SMART_TACHO_1',\n SmartTacho2 = 'SMART_TACHO_2',\n}\n\n/**\n * Official manufacturer warranty programs offered\n * */\nexport enum WarrantyProgram {\n OfficialDaf = 'OFFICIAL_DAF',\n OfficialMan = 'OFFICIAL_MAN',\n}\n\ntype BaseVehicleEvent = BaseEvent & {\n id: string;\n actionAt: string;\n userId: string;\n tenantId: string;\n};\n\ntype VehicleSuperstructure = {\n carCapacity?: number;\n compartmentCount?: number;\n counter?: boolean;\n crane?: {\n make?: string;\n model?: string;\n position?: 'Behind the cabin' | 'Rear';\n present?: boolean;\n year?: number;\n };\n dimensions?: {\n height?: number;\n length?: number;\n width?: number;\n extended?: string; // L1, L2, ...\n heightened?: string; // H1, H2, ...\n };\n baseVehicle?: SuperstructureBaseVehicle;\n extendable?: boolean;\n highPressurePump?: boolean;\n loadingPlatformHeight?: number;\n pump?: boolean;\n slidingRoof?: boolean;\n tailgate?: {\n capacity?: number;\n make?: string;\n model?: string;\n present?: boolean;\n type?: 'slider_lift' | 'cantilever' | 'column_lift';\n };\n tank?: {\n capacity: number; //litters\n volume?: number; //m3\n };\n temperatureControl?: {\n engineType?: 'diesel' | 'electric' | 'diesel+electric' | 'engine';\n make?: string;\n runningHours?: {\n diesel?: number;\n electric?: number;\n };\n };\n tipper?: {\n tipsBack?: boolean;\n tipsLeft?: boolean;\n tipsRight?: boolean;\n };\n};\n\nexport type NewVehicleRequest = {\n branch: string;\n count: number;\n specs: VehicleExternalInfo;\n description: {\n remarks?: string;\n technicalRemarks?: string;\n };\n salesConditions?: {\n marginScheme?: boolean;\n manufacturerWarranty?: {\n remarks?: string;\n available?: boolean;\n program?: WarrantyProgram;\n };\n };\n logistics: {\n parking?: string;\n deliveryType?: VehiclePurchaseDeliveryType;\n pickupAddress?: LocationValue;\n status: VehiclePurchaseLogisticsStatus;\n transportWithoutPayment?: boolean;\n };\n prices: {\n minimum?: string;\n premium?: string;\n internet?: string;\n };\n media: {\n internalPictures: AttachmentValue[];\n pictures: AttachmentValue[];\n videos: AttachmentValue[];\n docs: Document[];\n engineeringDocs: Document[];\n };\n vinList?: string;\n /** Bulk only: derive every stock number from a single base number (B49397A, B49397B, ...). */\n relatedStockNumbers?: boolean;\n deal: {\n offerId?: string;\n stockNumber?: string;\n contactId: string;\n orgId: string;\n purchasedBy: string;\n purchaseAssistedBy?: string;\n readyToDeliver?: boolean;\n dealStatus: VehiclePurchaseDealStatus;\n costs: {\n purchase: string;\n foreign?: VehiclePurchaseDealForeign;\n purchaseVatPercentage: string;\n commission?: string;\n externalTransport?: string;\n internalTransport?: string;\n externalGarage?: string;\n internalGarage?: string;\n other?: string;\n bonus?: string;\n };\n logistics: {\n availableDate?: string;\n vehicleRole: VehicleRoles;\n };\n };\n};\n\nexport type VehicleCreateEvent = BaseVehicleEvent & {\n action: 'create';\n vehicle: Vehicle;\n previousVehicle?: undefined;\n};\n\nexport type VehicleUpdateEvent = BaseVehicleEvent & {\n action: 'update';\n vehicle: Vehicle;\n previousVehicle: Vehicle;\n};\n\nexport type VehicleDeleteEvent = BaseVehicleEvent & {\n action: 'delete';\n vehicle?: undefined;\n previousVehicle: Vehicle;\n};\n\nexport type VehicleEvent = VehicleCreateEvent | VehicleUpdateEvent | VehicleDeleteEvent;\n\ntype BaseVehiclePurchaseEvent = {\n actionAt: string;\n userId: string;\n tenantId: string;\n branchId: string;\n vehicleId: string;\n};\n\nexport type VehiclePurchaseCreateEvent = BaseVehiclePurchaseEvent & {\n action: 'create';\n data: VehiclePurchase;\n previousData?: undefined;\n};\n\nexport type VehiclePurchaseUpdateEvent = BaseVehiclePurchaseEvent & {\n action: 'update';\n data: VehiclePurchase;\n previousData: VehiclePurchase;\n};\n\nexport type VehiclePurchaseEvent = BaseEvent &\n (VehiclePurchaseCreateEvent | VehiclePurchaseUpdateEvent);\n\nexport type UpdateVehiclesPricesEvent = {\n id: string;\n actionAt: string;\n userId: string;\n tenantId: string;\n priceList: AttachmentValue;\n};\n\nexport type PublicVehicle = Pick<Vehicle, 'external' | 'id'>;\n\nexport type PublicSearchVehicle = {\n vehicle: PublicVehicle;\n};\n\nexport enum SearchVehicleSaleDealStatus {\n NotSold = 'NOT_SOLD',\n Reserved = 'RESERVED',\n Sold = 'SOLD',\n}\n\nexport type SearchVehicle = {\n custom: {\n features: string[];\n sold: boolean;\n isReserved: boolean;\n hasPayments: boolean;\n listedOnWebsite: boolean;\n publishedOnWebsiteAt?: string;\n originalBranchId: string;\n };\n customSortableFields: {\n priceChangedAt?: string;\n checkedInAt?: string;\n saleAgreementAt?: string;\n /** Date the vehicle entered virtual inventory (marketing ?? evaluation ?? purchase-agreed). */\n virtualInventoryStartedAt?: string;\n };\n purchase?: {\n supplierStockNumber?: string;\n readyToDeliver: boolean;\n dealStatus?: VehiclePurchaseDealStatus;\n logisticsStatus?: VehiclePurchaseLogisticsStatus;\n purchasedBy?: string;\n purchaseAgreedAt?: string;\n parkingName?: string;\n organizationId: string;\n organizationExternalId?: number;\n fullPaymentSentAt?: string;\n marketingStartedAt?: string;\n arrivedAt?: string;\n };\n reservation?: Pick<OpportunityReservation, 'expiresAt' | 'opportunityId' | 'createdBy'>;\n transports: Transport[];\n vehicle: Vehicle;\n sale: {\n opportunityId?: string;\n externalSaleId?: string;\n soldAt?: string;\n soldBy?: string;\n sellers?: string[]; // opportunity account manager [+ assistant]\n dealStatus: SearchVehicleSaleDealStatus;\n logisticStatus?: VehicleSaleLogisticsStatus;\n };\n};\n\nexport type InputSearchVehicle = SearchVehicle & {\n permissions?: SearchPermissions;\n};\n\nexport type VehicleSearchMeta = ReferenceData & {\n matchingOffers?: {\n count: number;\n filters: {\n conditions: Array<Filter | ComplexFilter>;\n fullText?: string;\n };\n };\n};\n\nexport type PriceChangeEvent = BaseEvent & {\n tenantId: string;\n userId: string;\n vehicleId: string;\n input: {\n previousPrices: VehiclePricingHistoryInput;\n currentPrices: VehiclePricingHistoryInput;\n };\n};\n\nexport type VehiclePricingHistory = {\n pricing: VehiclePricingHistoryInput;\n createdAt: string;\n createdBy: string;\n};\n\nexport type VehiclePricingHistoryInput = VehiclePricing & { internet?: string };\n\nexport type VehiclePricing = {\n premium?: string;\n minimum?: string;\n currency?: string;\n};\n\nexport type RelatedVehicle = {\n vehicleId: string;\n description: string;\n stockNumber: string;\n};\n\nexport type VehicleBranchHistoryEntry = {\n branch: string;\n stockNumber: string;\n administrativeNumber?: string;\n changedAt: string;\n changedBy: string;\n reason?: string;\n};\n\nexport type VehicleInternalInfo = {\n createdAt: string;\n description: {\n title: string;\n remarks?: string;\n technicalRemarks?: string;\n };\n identification: {\n administrativeNumber?: string;\n stockNumber: string;\n branch: string;\n customerStockNumber?: string;\n offerId?: string;\n licensePlateHistory?: {\n licensePlate: string;\n changedAt: string;\n }[];\n /**\n * One entry per branch the vehicle has left, oldest first. Records the identity it carried\n * there (stock and administrative numbers are redrawn on a move) and who moved it.\n */\n branchHistory?: VehicleBranchHistoryEntry[];\n\n /**\n * This ID is used to link different vehicle objects that represent the same real world asset.\n * Ideally the chassis number could be used, but in some cases it is not available yet.\n */\n metaId: string;\n };\n documents: Document[];\n pictures: AttachmentValue[];\n engineeringDocs: Document[];\n pricing: VehiclePricing;\n /**\n * Set when a target-tenant operator edits the retail price on a cross-tenant\n * copy (`original` set) that is still source-mastered. From that moment,\n * cross-tenant sync stops overwriting `external.salesConditions` from the\n * source. ISO timestamp + user id of the first takeover.\n */\n sourcePriceOverride?: { at: string; by: string };\n role: VehicleRoles;\n /** An own-use vehicle administration can assign to our own transports; read with role OWN_USE. */\n transportFleet?: boolean;\n status: VehicleStatus;\n updatedAt: string;\n /* use this property to store additional terms that you want the vehicle to be found with when doing a full text search */\n keywords?: string[];\n relatedVehicles: RelatedVehicle[];\n};\n\nexport type VehicleOriginalInfo = {\n /** IMMEDIATE source tenant (the predecessor in a sync chain). */\n tenantId: string;\n tenantChain?: string[];\n identification: {\n id: string;\n branchId: string;\n stockNumber: string;\n metaId?: string;\n country: string;\n };\n salesConditions: {\n leasing?: boolean;\n price?: string;\n currency?: string;\n marginScheme?: boolean;\n manufacturerWarranty?: {\n remarks?: string;\n available?: boolean;\n };\n /**\n * The immediate source's sellability at the last sync hop: true when the source was not\n * sellable — not in `SALE` role, had an active reservation or external sale, or was itself\n * unavailable. Derived (never set by a human) and refreshed on every cross-tenant update so\n * it cascades down the whole chain.\n */\n unavailable?: boolean;\n };\n /**\n * Deepest-origin tenant/branch in a multi-hop sync chain. Carries forward\n * verbatim across hops so consumers can answer \"where did this vehicle\n * actually originate?\" without walking the chain.\n */\n owner: {\n tenantId: string;\n branchId: string;\n country: string;\n };\n};\n\nexport type VehicleAxlesInfo = {\n details?: VehicleAxle[];\n configuration?: string;\n count?: number;\n poweredAxlesCount?: number;\n wheelbase?: number;\n suspension?: 'Air' | 'Air/Steel' | 'Steel';\n loadCapacity?: number;\n};\n\nexport type SuperstructureBaseVehicle = {\n category: string;\n make: string;\n model?: string;\n type?: string;\n axlesConfiguration?: string;\n emissionsClass?: string;\n transmissionType?: 'Automatic' | 'Manual' | 'Semi-Automatic';\n vin?: string;\n currentRegistration?: {\n country?: string;\n };\n suspension?: 'Air' | 'Air/Steel' | 'Steel';\n constructionYear?: number;\n firstRegistration?: string;\n odometerKm?: number;\n powerHp?: number;\n bodystyle?: string;\n accessories: VehicleExternalInfo['accessories'];\n superstructure?: Pick<VehicleSuperstructure, 'crane' | 'tailgate'>;\n};\n\n// mostly inspired by the Hexon data model\nexport type VehicleExternalInfo = {\n body?: {\n cabin?: {\n type: 'Day' | 'Sleep / Small' | 'Sleep / Medium' | 'Sleep / Large';\n model?: string;\n };\n colour?: string;\n dimensions?: {\n height?: number;\n length?: number;\n width?: number;\n };\n doorCount?: number;\n interior?: {\n bedCount?: number;\n seatCount?: number;\n };\n internalDimensions?: {\n //for Trailers/Semi-trailers of type reefers, box, curtainsides\n height?: number;\n length?: number;\n width?: number;\n };\n kingpin?: {\n //for Trailers/Semi-trailers\n size?: number; // in inches\n capacity?: number; // in kg\n };\n fifthWheelHeight?: number; //for new trailers in mm\n };\n mainPicture?: AttachmentValue;\n pictures?: AttachmentValue[];\n videos?: AttachmentValue[];\n condition?: {\n damaged?: boolean;\n odometer?: {\n km?: number;\n };\n used?: boolean;\n };\n general: {\n bodystyle?: string;\n category: string;\n make?: string;\n model?: string;\n modelName?: string;\n type?: string;\n typeName?: string;\n tacho?: VehicleTachoTypes;\n color?: {\n mainColorHex?: string; //Hex color code\n chassisColorReferenceCode?: string; //Maker reference code. For now, mainly relevant for new trailers\n upperStructureColorReferenceCode?: string; //Maker reference code. For now, mainly relevant for new trailers\n };\n };\n history?: {\n advertisingYear?: number;\n constructionYear?: number;\n currentRegistration?: {\n country?: string;\n technicalInspectionEndDate?: string;\n carpassUrl?: string;\n carpassAvailable?: boolean;\n };\n firstRegistration?: string;\n cocPvg?: string;\n };\n identification: {\n licensePlate?: string;\n stockNumber?: string;\n vin?: string;\n buildStockNumber?: string;\n engineNumber?: string;\n };\n trailers?: {\n cooler?: {\n hasCooler?: boolean;\n make?: string;\n };\n };\n powertrain?: {\n axles?: VehicleAxlesInfo;\n emissions?: {\n class?: string;\n subclass?: string;\n };\n engine?: {\n cylinderCount?: number;\n energy?: { type?: VehicleFuelType };\n power?: {\n hp?: number;\n };\n displacement?: number;\n };\n transmission?: {\n gearCount?: number;\n make?: string;\n model?: string;\n type?: 'Automatic' | 'Manual' | 'Semi-Automatic';\n };\n };\n salesConditions: {\n leasing?: boolean;\n price?: string | undefined;\n currency?: string | undefined;\n /**\n * Read-only field maintained by `fillReadOnlyFields` on every vehicle save:\n * the value of `price` immediately before the most recent price change. Stays\n * unchanged when `price` does not change between saves. Same currency as\n * `price`. Useful for storefront \"was/now\" price-drop labels and for the AI\n * assistant's negotiation context.\n */\n previousPrice?: string;\n marginScheme?: boolean;\n manufacturerWarranty?: {\n remarks?: string;\n available?: boolean;\n included?: boolean;\n remarksIncluded?: string;\n program?: WarrantyProgram;\n };\n /**\n * Per-country snapshot computed by the owning tenant's `fillReadOnlyFields`.\n * Every field on this snapshot is public — `vehicle.external` rides through\n * to the storefront via cross-tenant sync, so internal-only values (e.g. the\n * owner's freight cost) must not appear here. Cross-tenant sync derives the\n * internal `externalTransport` figure directly from the owner's country-\n * delivery rule at sync time.\n *\n * Each entry exposes:\n * - `price` — bare currency conversion for the rule's country.\n * - `previousPrice` — bare conversion of `salesConditions.previousPrice`\n * when set.\n * - `deliveryPrice` — customer-facing delivery fee (when the rule covers\n * the vehicle's category). Storefront consumers sum\n * `price + (deliveryPrice ?? 0)` at the display layer.\n * - `deliveryLocation` — human-readable label, present whenever the rule\n * declared a location for this country.\n *\n * Only the original owner recomputes on save; cross-tenant copies preserve\n * the array. One exception: the target operator may edit the branch-country\n * entry's `deliveryPrice`. The first such edit is a price takeover\n * (`internal.sourcePriceOverride`), after which the snapshot collapses to the\n * branch-country row and the sync stops rebuilding sales conditions.\n */\n localizedPricing?: Array<{\n countryCode: string;\n currency: string;\n price: number;\n previousPrice?: number;\n deliveryPrice?: number;\n deliveryLocation?: string;\n }>;\n };\n superstructure?: VehicleSuperstructure;\n weights?: {\n gvw?: number;\n massEmpty?: number;\n };\n accessories: {\n abs?: boolean;\n jumbo?: boolean;\n adr?: boolean;\n airco?: boolean;\n alloyWheels?: boolean;\n aluminiumFuelTank?: boolean;\n cdPlayer?: boolean;\n coil?: boolean;\n doubleStock?: boolean;\n centralLocking?: boolean;\n centralLubrication?: boolean;\n cruiseControl?: boolean;\n electricDoorMirrors?: boolean;\n electricWindows?: boolean;\n engineBrake?: boolean;\n forklift?: boolean;\n navigationSystem?: boolean;\n hydraulicTipperKit?: boolean;\n lowDeck?: boolean;\n lowNoise?: boolean;\n mega?: boolean;\n parkingHeater?: boolean;\n particleFilter?: boolean;\n powerTakeOff?: boolean;\n refrigerator?: boolean;\n retarderIntarder?: boolean;\n reversingCamera?: boolean;\n roofSpoiler?: boolean;\n sideSkirts?: boolean;\n spareKey?: boolean;\n spareWheel?: boolean;\n speedLimiter?: boolean;\n spoilers?: boolean;\n spotlights?: boolean;\n stabilityControl?: boolean;\n standardAirco?: boolean;\n television?: boolean;\n toolbox?: boolean;\n trailerCoupling?: boolean;\n twinFuelTank?: boolean;\n visor?: boolean;\n xenonLights?: boolean;\n };\n publicLink?: string;\n};\n\ntype BaseVehicle<I = VehicleInternalInfo, E = VehicleExternalInfo> = {\n internal: I;\n external: E;\n original?: VehicleOriginalInfo;\n};\n\nexport type NewVehicle<I = VehicleInternalInfo, E = VehicleExternalInfo> = BaseVehicle<I, E> & {\n id?: undefined;\n};\n\nexport type Vehicle<I = VehicleInternalInfo, E = VehicleExternalInfo> = BaseVehicle<I, E> & {\n id: string;\n};\n\nexport type VehicleBffMetadata = {\n openOpportunities: number;\n};\n\nexport type VehicleBff = {\n vehicle: DataRecord<Vehicle, VehicleBffMetadata>;\n sale?: VehicleSaleInfo;\n purchase?: VehiclePurchase;\n overview?: VehicleBusinessOverviewXL;\n marketing?: {\n titles?: MultiLangValue;\n listed: boolean;\n sharable: boolean;\n publishedOnWebsiteAt?: string;\n numPlatformsPublished: number;\n };\n};\n\nexport type VehiclesByChassisNumberRequest = {\n tenantIds: string[];\n chassisNumber: string;\n};\n\nexport type VehiclesByMetaIdRequest = {\n tenantIds: string[];\n metaId: string;\n};\n\nexport type VehicleAxle = {\n make?: string;\n alloyWheels?: boolean;\n brakes?: 'Disc' | 'Drum';\n differentialLock?: boolean;\n liftAxle?: boolean;\n maxLoad?: number;\n nr: number;\n position?: string;\n powered?: boolean;\n reduction?: string;\n steering?: boolean;\n suspension?: 'Steel' | 'Air' | 'Hydraulic';\n twinWheels?: boolean;\n tyreSize?: string;\n tyreConditionType?: 'mm' | '%';\n\n tyreConditionMmLeftInside?: number;\n tyreConditionMmLeftOutside?: number;\n tyreConditionMmRightInside?: number;\n tyreConditionMmRightOutside?: number;\n\n tyreConditionPercLeftInside?: number;\n tyreConditionPercLeftOutside?: number;\n tyreConditionPercRightInside?: number;\n tyreConditionPercRightOutside?: number;\n\n steeringType?: 'fixed' | 'self_steering' | 'hydraulic';\n};\n\nexport enum VehiclePurchaseDealStatus {\n Marketing = 'MARKETING',\n PurchaseEvaluation = 'PURCHASE_EVALUATION', // used for vehicle consignation\n PurchaseAgreed = 'PURCHASE_AGREED',\n FirstPaymentAllowed = 'FIRST_PAYMENT_ALLOWED',\n FirstPaymentSent = 'FIRST_PAYMENT_SENT',\n FullPaymentAllowed = 'FULL_PAYMENT_ALLOWED',\n FullPaymentSent = 'FULL_PAYMENT_SENT',\n}\n\nexport enum VehiclePurchaseLogisticsStatus {\n AtOrigin = 'AT_ORIGIN',\n Arrived = 'ARRIVED',\n CheckedIn = 'CHECKED_IN',\n NotApplicable = 'NOT_APPLICABLE',\n}\n\nexport enum VehiclePurchaseDeliveryType {\n PickUp = 'PICK_UP',\n DropOff = 'DROP_OFF',\n}\n\nexport type VehicleStatus = {\n deleted?: boolean;\n deletedReason?: string;\n};\n\nexport type VehiclePriceList = {\n uploadedAt: string;\n uploadedBy: string;\n priceList: AttachmentValue;\n id: string;\n};\n\nexport type UpdateVehiclesPricesRequest = {\n priceList: AttachmentValue;\n};\n\nexport type VehiclePriceListLine = {\n reference: string;\n internet?: string;\n premium?: string;\n minimum?: string;\n};\n\nexport type VehiclePriceUpdateError = {\n data: VehiclePriceListLine;\n line: number;\n error: {\n fieldId: keyof VehiclePriceListLine;\n msg: string;\n };\n};\n\nexport type VehiclePriceUpdateResponse =\n | {\n success: true;\n }\n | {\n success: false;\n errors: VehiclePriceUpdateError[];\n };\n\n/**\n * The price the supplier asked, in the supplier's currency: one of the payment currencies of the\n * vehicle's branch. The purchase's `deal.purchase` is then `purchase × exchangeRate`, and payments\n * are authorized in `currencyCode`.\n */\nexport type VehiclePurchaseDealForeign = {\n purchase: string; // exclusive VAT\n currencyCode: string;\n /** Branch currency units per 1 unit of `currencyCode`. */\n exchangeRate: string;\n};\n\nexport type VehiclePurchase = {\n organizationId: string;\n contactId: string;\n supplierStockNumber?: string;\n purchasedBy: string;\n purchaseAssistedBy?: string;\n\n log: {\n // computed automatically by the backend\n marketingStartedAt?: string;\n marketingStartedBy?: string;\n\n evaluationStartedAt?: string;\n evaluationStartedBy?: string;\n\n purchaseAgreedAt?: string;\n purchaseAgreedBy?: string;\n\n firstPaymentAllowedAt?: string;\n firstPaymentAllowedBy?: string;\n firstPaymentSentAt?: string;\n firstPaymentSentBy?: string;\n\n fullPaymentAllowedAt?: string;\n fullPaymentAllowedBy?: string;\n fullPaymentSentAt?: string;\n fullPaymentSentBy?: string;\n\n arrivedAt?: string;\n arrivedBy?: string;\n\n checkedInAt?: string;\n checkedInBy?: string;\n };\n\n /** Due date of the supplier purchase invoice; editable from the payments page. */\n invoiceDueDate?: string;\n\n deal: {\n status: VehiclePurchaseDealStatus; // partially set by the user, if there are payments then it is set automatically by the backend\n readyToDeliver?: boolean;\n\n purchaseVatRate?: string;\n purchase?: string; // exclusive VAT; derived from `foreign` when present\n foreign?: VehiclePurchaseDealForeign;\n\n bonus?: string; // sometimes manufacturers pay us a bonus when we reach a target\n\n // estimated costs, real costs come from actual invoices\n commission?: string;\n externalTransport?: string;\n internalTransport?: string;\n externalGarage?: string;\n internalGarage?: string;\n other?: string;\n\n totalCosts?: string; // exclusive VAT\n };\n\n logistics: {\n parkingName?: string;\n status: VehiclePurchaseLogisticsStatus; // manually set by the user\n deliveryType?: VehiclePurchaseDeliveryType;\n pickupAddress?: LocationValue;\n availableWeek?: string; // ISOWEEK, e.g. 2016-W02\n transportWithoutPayment?: boolean;\n };\n};\n\nexport type PurchaseRecordMeta = ReferenceData & {\n allowedLogisticsTransitions?: VehiclePurchaseLogisticsStatus[];\n};\n\nexport type SaveVehiclePurchaseOpts = {\n skipTransportValidation?: boolean;\n /**\n * Save only while the purchase still stands at this version, as read alongside it. The save\n * fails with `vehicles.purchase.changed-since-read` when it has moved on.\n */\n atVersion?: string;\n};\n\nexport enum VehicleActions {\n EditAdminDocs = 'edit_admin_docs',\n EditEngineeringDocs = 'edit_engineering_docs',\n EditMarketing = 'edit_marketing',\n EditMedia = 'edit_media',\n EditPictures = 'edit_pictures',\n EditPrices = 'edit_prices',\n EditPurchaseDeal = 'edit_purchase_deal',\n EditPurchaseLogistics = 'edit_purchase_logistics',\n EditSpecs = 'edit_specs',\n EditVideos = 'edit_videos',\n ViewLeads = 'view_leads',\n ViewBusinessOverview = 'view_business_overview',\n ViewSimilarOnline = 'view_similar_online',\n ViewPurchase = 'view_purchase',\n ViewPriceHistory = 'view_price_history',\n DeleteVehicle = 'delete_vehicle',\n ChangeBranch = 'change_branch',\n}\n\nexport type VehicleBranchChangeRequest = {\n branch: string;\n reason?: string;\n /** Required when the preview carries a warning that needs acknowledgement. */\n acknowledged?: boolean;\n};\n\nexport enum VehicleBranchChangeBlockerCode {\n SameBranch = 'same_branch',\n VehicleDeleted = 'vehicle_deleted',\n CurrencyMismatch = 'currency_mismatch',\n FinanceDocumentsExist = 'finance_documents_exist',\n PurchasePaymentsExist = 'purchase_payments_exist',\n DealCommitted = 'deal_committed',\n VehicleSold = 'vehicle_sold',\n LeasingContractExists = 'leasing_contract_exists',\n RelatedVehicles = 'related_vehicles',\n InternalDealQuote = 'internal_deal_quote',\n IntercompanyLinkLive = 'intercompany_link_live',\n HyperdmsOrganisationChange = 'hyperdms_organisation_change',\n StockNumberTaken = 'stock_number_taken',\n}\n\nexport enum VehicleBranchChangeWarningCode {\n DealsLoseQuotes = 'deals_lose_quotes',\n DealPaymentsExist = 'deal_payments_exist',\n OpenTransports = 'open_transports',\n CopiesWithdrawn = 'copies_withdrawn',\n CopiesCreated = 'copies_created',\n TargetWithoutAccounting = 'target_without_accounting',\n TargetWithoutStorecove = 'target_without_storecove',\n}\n\nexport type VehicleBranchChangeBlocker = {\n code: VehicleBranchChangeBlockerCode;\n data?: Record<string, unknown>;\n};\n\nexport type VehicleBranchChangeWarning = {\n code: VehicleBranchChangeWarningCode;\n /** The write refuses unless the request says `acknowledged: true`. */\n requiresAcknowledgement: boolean;\n data?: Record<string, unknown>;\n};\n\nexport enum VehicleBranchChangeDealOutcome {\n /** Branches are quote-compatible: the deal and its quotes move together. */\n FollowsWithQuotes = 'follows_with_quotes',\n /** The deal moves; its quotes stay archived on the old branch and it needs a new one. */\n FollowsNeedsRequote = 'follows_needs_requote',\n AlreadyOnTarget = 'already_on_target',\n StaysClosed = 'stays_closed',\n /** In Preparation or later: contracts and paperwork exist, so this deal blocks the move. */\n Committed = 'committed',\n}\n\nexport type VehicleBranchChangeDealImpact = {\n opportunityId: string;\n status: string;\n branch: string;\n outcome: VehicleBranchChangeDealOutcome;\n hasActiveQuote: boolean;\n paymentsCount: number;\n};\n\nexport type VehicleBranchChangeIdentity = {\n branch: string;\n stockNumber: string;\n administrativeNumber?: string;\n};\n\nexport type VehicleBranchChangePreview = {\n from: VehicleBranchChangeIdentity;\n /** The administrative number is only known once drawn, so the preview leaves it out. */\n to: Omit<VehicleBranchChangeIdentity, 'administrativeNumber'>;\n blockers: VehicleBranchChangeBlocker[];\n warnings: VehicleBranchChangeWarning[];\n /** Counts of the records that follow are not reported: the warnings above already name them. */\n impact: { deals: VehicleBranchChangeDealImpact[] };\n};\n\nexport type VehicleBranchChangeResult = {\n vehicle: Vehicle;\n from: VehicleBranchChangeIdentity;\n to: VehicleBranchChangeIdentity;\n deals: VehicleBranchChangeDealImpact[];\n /** Repair steps that failed after the vehicle moved; running the move again retries them. */\n failedSteps: string[];\n};\n\nexport enum PurchaseActions {\n ViewDeal = 'view_deal',\n ViewSupplierOrganization = 'view_supplier_organization',\n ViewContact = 'view_contact',\n ViewLegalAddress = 'view_legal_address',\n ViewPickupAddress = 'view_pickup_address',\n ViewEstimatedCosts = 'view_estimated_costs',\n ViewFinanceDocuments = 'view_finance_documents',\n AddPayment = 'add_payment',\n EditPayment = 'edit_payment',\n MarkPaymentDone = 'mark_payment_done',\n AddRemarks = 'add_remarks',\n}\n\nexport enum VehicleBusinessOverviewActions {\n View = 'view_business_overview',\n}\n\nexport type VehicleShareEmailRequest = ShareEmailRequest & {\n pictures: AttachmentValue[];\n};\n\nexport type VehicleShareData = {\n title: string;\n mainPicture?: string;\n pictures: {\n picture: string;\n }[];\n message: string;\n specs: {\n name: string;\n value: string;\n }[];\n features: {\n name: string;\n }[];\n stockNumber: string;\n price?: string;\n description?: string;\n publicLink?: string;\n};\n\nexport type MarketingEmailData = {\n message: string;\n vehicles: VehicleShareData[];\n vehiclePairs: { first: VehicleShareData; second?: VehicleShareData }[];\n lastVehicle?: VehicleShareData;\n unsubscribeUrl?: string;\n};\n\nexport type VehicleReservationCreateEvent = BaseVehicleEvent & {\n action: 'create';\n reservation: OpportunityReservation;\n previousReservation?: undefined;\n};\n\nexport type VehicleReservationUpdateEvent = BaseVehicleEvent & {\n action: 'update';\n reservation: OpportunityReservation;\n previousReservation: OpportunityReservation;\n};\n\nexport type VehicleReservationDeleteEvent = BaseVehicleEvent & {\n action: 'delete';\n reservation?: undefined;\n previousReservation: OpportunityReservation;\n};\n\nexport type VehicleReservationEvent =\n | VehicleReservationCreateEvent\n | VehicleReservationUpdateEvent\n | VehicleReservationDeleteEvent;\n\nexport type ShareVehicleViaWahtsappRequest = {\n data: ShareWhatsappRequest;\n vehicleId: string;\n};\n\ntype RecordChange = {\n modifiedAt: string;\n modifiedBy: string;\n};\n\nexport type VehicleChange = RecordChange & {\n vehicle: Vehicle;\n};\n\nexport type PurchaseChange = RecordChange & {\n purchase: VehiclePurchase;\n};\n\nexport type RecordChangeRequest = PaginatedRequest & {\n fieldPath?: string;\n};\n"]}
@@ -0,0 +1,3 @@
1
+ import { OpportunityPayment } from '../types/opportunity-payments.js';
2
+ export declare const isPaidInAlternativeCurrency: (alternativeCurrency: string | undefined, payments: Pick<OpportunityPayment, 'foreign' | 'deletedAt'>[]) => boolean;
3
+ //# sourceMappingURL=opportunity-payments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"opportunity-payments.d.ts","sourceRoot":"/","sources":["utils/opportunity-payments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAOtE,eAAO,MAAM,2BAA2B,wBACjB,MAAM,GAAG,SAAS,YAC7B,IAAI,CAAC,kBAAkB,EAAE,SAAS,GAAG,WAAW,CAAC,EAAE,KAC5D,OAI2E,CAAC"}
@@ -0,0 +1,5 @@
1
+ export const isPaidInAlternativeCurrency = (alternativeCurrency, payments) => alternativeCurrency != null &&
2
+ payments
3
+ .filter((payment) => payment.deletedAt == null)
4
+ .every((payment) => payment.foreign?.currencyCode === alternativeCurrency);
5
+ //# sourceMappingURL=opportunity-payments.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"opportunity-payments.js","sourceRoot":"/","sources":["utils/opportunity-payments.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,2BAA2B,GAAG,CACzC,mBAAuC,EACvC,QAA6D,EACpD,EAAE,CACX,mBAAmB,IAAI,IAAI;IAC3B,QAAQ;SACL,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,SAAS,IAAI,IAAI,CAAC;SAC9C,KAAK,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,YAAY,KAAK,mBAAmB,CAAC,CAAC","sourcesContent":["import { OpportunityPayment } from '../types/opportunity-payments.js';\n\n/**\n * Whether a deal's payments are shown in the quote's alternative currency: every payment so far\n * arrived in it. One payment in branch currency switches the deal to branch currency, because\n * only the branch currency amounts then add up to the whole.\n */\nexport const isPaidInAlternativeCurrency = (\n alternativeCurrency: string | undefined,\n payments: Pick<OpportunityPayment, 'foreign' | 'deletedAt'>[],\n): boolean =>\n alternativeCurrency != null &&\n payments\n .filter((payment) => payment.deletedAt == null)\n .every((payment) => payment.foreign?.currencyCode === alternativeCurrency);\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=opportunity-payments.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"opportunity-payments.test.d.ts","sourceRoot":"/","sources":["utils/opportunity-payments.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,23 @@
1
+ import { isPaidInAlternativeCurrency } from './opportunity-payments.js';
2
+ const dollarPayment = {
3
+ foreign: { amount: '30000', currencyCode: 'USD', exchangeRate: '0.861804' },
4
+ };
5
+ const euroPayment = {};
6
+ describe('isPaidInAlternativeCurrency', () => {
7
+ it('shows the alternative currency before any payment arrived', () => {
8
+ expect(isPaidInAlternativeCurrency('USD', [])).toBe(true);
9
+ });
10
+ it('shows the alternative currency while every payment arrived in it', () => {
11
+ expect(isPaidInAlternativeCurrency('USD', [dollarPayment, dollarPayment])).toBe(true);
12
+ });
13
+ it('switches to branch currency once one payment arrived in branch currency', () => {
14
+ expect(isPaidInAlternativeCurrency('USD', [dollarPayment, euroPayment])).toBe(false);
15
+ });
16
+ it('leaves deleted payments out', () => {
17
+ expect(isPaidInAlternativeCurrency('USD', [dollarPayment, { deletedAt: '2026-09-30T10:00:00Z' }])).toBe(true);
18
+ });
19
+ it('shows branch currency when the quote has no alternative currency', () => {
20
+ expect(isPaidInAlternativeCurrency(undefined, [dollarPayment])).toBe(false);
21
+ });
22
+ });
23
+ //# sourceMappingURL=opportunity-payments.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"opportunity-payments.test.js","sourceRoot":"/","sources":["utils/opportunity-payments.test.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AAExE,MAAM,aAAa,GAAsD;IACvE,OAAO,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE;CAC5E,CAAC;AACF,MAAM,WAAW,GAAsD,EAAE,CAAC;AAE1E,QAAQ,CAAC,6BAA6B,EAAE,GAAG,EAAE;IAC3C,EAAE,CAAC,2DAA2D,EAAE,GAAG,EAAE;QACnE,MAAM,CAAC,2BAA2B,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kEAAkE,EAAE,GAAG,EAAE;QAC1E,MAAM,CAAC,2BAA2B,CAAC,KAAK,EAAE,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACxF,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yEAAyE,EAAE,GAAG,EAAE;QACjF,MAAM,CAAC,2BAA2B,CAAC,KAAK,EAAE,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACvF,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,6BAA6B,EAAE,GAAG,EAAE;QACrC,MAAM,CACJ,2BAA2B,CAAC,KAAK,EAAE,CAAC,aAAa,EAAE,EAAE,SAAS,EAAE,sBAAsB,EAAE,CAAC,CAAC,CAC3F,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACf,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kEAAkE,EAAE,GAAG,EAAE;QAC1E,MAAM,CAAC,2BAA2B,CAAC,SAAS,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9E,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { OpportunityPayment } from '../types/opportunity-payments.js';\nimport { isPaidInAlternativeCurrency } from './opportunity-payments.js';\n\nconst dollarPayment: Pick<OpportunityPayment, 'foreign' | 'deletedAt'> = {\n foreign: { amount: '30000', currencyCode: 'USD', exchangeRate: '0.861804' },\n};\nconst euroPayment: Pick<OpportunityPayment, 'foreign' | 'deletedAt'> = {};\n\ndescribe('isPaidInAlternativeCurrency', () => {\n it('shows the alternative currency before any payment arrived', () => {\n expect(isPaidInAlternativeCurrency('USD', [])).toBe(true);\n });\n\n it('shows the alternative currency while every payment arrived in it', () => {\n expect(isPaidInAlternativeCurrency('USD', [dollarPayment, dollarPayment])).toBe(true);\n });\n\n it('switches to branch currency once one payment arrived in branch currency', () => {\n expect(isPaidInAlternativeCurrency('USD', [dollarPayment, euroPayment])).toBe(false);\n });\n\n it('leaves deleted payments out', () => {\n expect(\n isPaidInAlternativeCurrency('USD', [dollarPayment, { deletedAt: '2026-09-30T10:00:00Z' }]),\n ).toBe(true);\n });\n\n it('shows branch currency when the quote has no alternative currency', () => {\n expect(isPaidInAlternativeCurrency(undefined, [dollarPayment])).toBe(false);\n });\n});\n"]}
@@ -2,6 +2,9 @@ import { Branch, Tenant } from '../types/tenants.js';
2
2
  export declare const getBranch: (tenant: Tenant, branchId: string) => Branch;
3
3
  export declare const getDefaultBranch: (tenant: Tenant) => Branch;
4
4
  export declare const getBranchAskingVies: (tenant: Tenant, branchId?: string) => Branch | undefined;
5
+ export declare const getBranchPaymentCurrencies: (branch: Branch) => string[];
6
+ export declare const isForeignPaymentCurrency: (branch: Branch, currencyCode: string) => boolean;
7
+ export declare const hasForeignPaymentCurrency: (branch: Branch) => boolean;
5
8
  export declare const isDropshippingBranch: (branch: Branch) => boolean;
6
9
  export declare const getBranchStandardVatRate: (tenant: Tenant, branchId: string) => string;
7
10
  export declare const areBranchesQuoteCompatible: (a: Branch, b: Branch) => boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"tenants.d.ts","sourceRoot":"/","sources":["utils/tenants.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAErD,eAAO,MAAM,SAAS,WAAY,MAAM,YAAY,MAAM,KAAG,MAO5D,CAAC;AAEF,eAAO,MAAM,gBAAgB,WAAY,MAAM,KAAG,MAAiC,CAAC;AAOpF,eAAO,MAAM,mBAAmB,WAAY,MAAM,aAAa,MAAM,KAAG,MAAM,GAAG,SAGhF,CAAC;AAIF,eAAO,MAAM,oBAAoB,WAAY,MAAM,KAAG,OAAuC,CAAC;AAE9F,eAAO,MAAM,wBAAwB,WAAY,MAAM,YAAY,MAAM,KAAG,MAG3E,CAAC;AAOF,eAAO,MAAM,0BAA0B,MAAO,MAAM,KAAK,MAAM,KAAG,OAIP,CAAC"}
1
+ {"version":3,"file":"tenants.d.ts","sourceRoot":"/","sources":["utils/tenants.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAErD,eAAO,MAAM,SAAS,WAAY,MAAM,YAAY,MAAM,KAAG,MAO5D,CAAC;AAEF,eAAO,MAAM,gBAAgB,WAAY,MAAM,KAAG,MAAiC,CAAC;AAOpF,eAAO,MAAM,mBAAmB,WAAY,MAAM,aAAa,MAAM,KAAG,MAAM,GAAG,SAGhF,CAAC;AAGF,eAAO,MAAM,0BAA0B,WAAY,MAAM,KAAG,MAAM,EACnB,CAAC;AAMhD,eAAO,MAAM,wBAAwB,WAAY,MAAM,gBAAgB,MAAM,KAAG,OACe,CAAC;AAGhG,eAAO,MAAM,yBAAyB,WAAY,MAAM,KAAG,OAGxD,CAAC;AAIJ,eAAO,MAAM,oBAAoB,WAAY,MAAM,KAAG,OAAuC,CAAC;AAE9F,eAAO,MAAM,wBAAwB,WAAY,MAAM,YAAY,MAAM,KAAG,MAG3E,CAAC;AAOF,eAAO,MAAM,0BAA0B,MAAO,MAAM,KAAK,MAAM,KAAG,OAIP,CAAC"}
@@ -13,6 +13,9 @@ export const getBranchAskingVies = (tenant, branchId) => {
13
13
  const europeanBranches = tenant.branches.filter((branch) => isEUCountry(branch.country));
14
14
  return europeanBranches.find((branch) => branch.id === branchId) ?? europeanBranches.at(0);
15
15
  };
16
+ export const getBranchPaymentCurrencies = (branch) => branch.paymentCurrencies ?? [branch.currency];
17
+ export const isForeignPaymentCurrency = (branch, currencyCode) => currencyCode !== branch.currency && getBranchPaymentCurrencies(branch).includes(currencyCode);
18
+ export const hasForeignPaymentCurrency = (branch) => getBranchPaymentCurrencies(branch).some((currencyCode) => isForeignPaymentCurrency(branch, currencyCode));
16
19
  export const isDropshippingBranch = (branch) => branch.dropshipping === true;
17
20
  export const getBranchStandardVatRate = (tenant, branchId) => {
18
21
  const branch = getBranch(tenant, branchId);