@bisondesk/commons-sdk 1.0.677 → 1.0.678

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.
@@ -0,0 +1,6 @@
1
+ export type BankAccountDetails = {
2
+ accountNumber: string;
3
+ bic?: string;
4
+ holderName: string;
5
+ };
6
+ //# sourceMappingURL=bank-accounts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bank-accounts.d.ts","sourceRoot":"/","sources":["bank-accounts.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=bank-accounts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bank-accounts.js","sourceRoot":"/","sources":["bank-accounts.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * What a transfer needs to name one side of the payment: the account number, the bank's BIC when\n * known, and the account holder's name as the bank knows it. In a SEPA file the account number is\n * an IBAN. Shared by the organisation bank account, the frozen payment export line and the debtor\n * and creditor blocks of the SEPA file.\n */\nexport type BankAccountDetails = {\n accountNumber: string;\n bic?: string;\n holderName: string;\n};\n"]}
@@ -55,7 +55,14 @@ export declare enum TopLevelActions {
55
55
  TrackAndTraceDevicesExport = "tt:devices:export",
56
56
  ManageStocklists = "stocklists:manage",
57
57
  TransportsBrowse = "transports:browse",
58
- TransportsManage = "transports:manage"
58
+ TransportsManage = "transports:manage",
59
+ ReorderPurchasePayments = "vehicles:purchase-payments:reorder",
60
+ SendPurchasePaymentsToProcessing = "vehicles:purchase-payments:send-to-processing",
61
+ EditPurchaseInvoiceDueDate = "vehicles:purchase-payments:due-date",
62
+ ExportPurchasePayments = "vehicles:purchase-payments:export",
63
+ CancelPurchasePayment = "vehicles:purchase-payments:cancel",
64
+ ManageOrganizationBankAccount = "crm:orgs:bank-account:manage",
65
+ VerifyOrganizationBankAccount = "crm:orgs:bank-account:verify"
59
66
  }
60
67
  export declare const SUPPORTED_LANGUAGES: readonly ['en', 'fr', 'nl', 'es', 'de', 'pt'];
61
68
  export declare const TENANT_ID_ADMIN_HEADER = "tenant-id";
@@ -92,7 +99,8 @@ export declare enum BusinessEntityIds {
92
99
  Interests = "interests",
93
100
  Prospects = "prospects",
94
101
  Stocklists = "stocklists",
95
- Transports = "transports"
102
+ Transports = "transports",
103
+ PaymentExports = "payment_exports"
96
104
  }
97
105
  export declare const LEASING_QUOTE_TEMPLATE_GROUP_ID = "leasing_quote_template";
98
106
  export declare const LEASING_QUOTE_PROFORMA_TEMPLATE_GROUP_ID = "leasing_quote_proforma_template";
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"/","sources":["constants.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,qBAAqB,qBAAqB,CAAC;AAKxD,oBAAY,QAAQ;IAClB,UAAU,eAAe;IACzB,KAAK,WAAW;IAChB,cAAc,mBAAmB;IACjC,UAAU,gBAAgB;IAC1B,KAAK,UAAU;IACf,UAAU,eAAe;IACzB,iBAAiB,uBAAuB;IACxC,iBAAiB,uBAAuB;IACxC,cAAc,oBAAoB;IAClC,uBAAuB,8BAA8B;IACrD,aAAa,mBAAmB;IAChC,SAAS,cAAc;IACvB,YAAY,kBAAkB;IAC9B,iBAAiB,wBAAwB;IACzC,iBAAiB,wBAAwB;IACzC,qBAAqB,4BAA4B;IACjD,gBAAgB,sBAAsB;IACtC,oBAAoB,4BAA4B;CACjD;AAED,eAAO,MAAM,SAAS,YAKrB,CAAC;AAEF,oBAAY,eAAe;IACzB,iBAAiB,YAAY;IAC7B,sBAAsB,wBAAwB;IAC9C,6BAA6B,8BAA8B;IAC3D,qBAAqB,qBAAqB;IAC1C,6BAA6B,+BAA+B;IAC5D,QAAQ,YAAY;IACpB,aAAa,oBAAoB;IACjC,iBAAiB,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B,cAAc,oBAAoB;IAClC,cAAc,oBAAoB;IAClC,oBAAoB,4BAA4B;IAChD,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,UAAU,eAAe;IACzB,UAAU,eAAe;IACzB,cAAc,oBAAoB;CACnC;AAKD,eAAO,MAAM,+BAA+B,2BAA2B,CAAC;AACxE,eAAO,MAAM,wCAAwC,oCAAoC,CAAC;AAC1F,eAAO,MAAM,+CAA+C,2CAClB,CAAC;AAC3C,eAAO,MAAM,6DAA6D,yDAClB,CAAC;AACzD,eAAO,MAAM,+BAA+B,oCAAoC,CAAC;AACjF,eAAO,MAAM,qCAAqC,iCAAiC,CAAC;AACpF,eAAO,MAAM,sDAAsD,kDAClB,CAAC;AAClD,eAAO,MAAM,gDAAgD,4CAClB,CAAC;AAC5C,eAAO,MAAM,wDAAwD,oDAClB,CAAC;AACpD,eAAO,MAAM,sCAAsC,kCAAkC,CAAC;AACtF,eAAO,MAAM,uCAAuC,mCAAmC,CAAC;AACxF,eAAO,MAAM,+BAA+B,2BAA2B,CAAC;AACxE,eAAO,MAAM,kCAAkC,8BAA8B,CAAC;AAC9E,eAAO,MAAM,uCAAuC,mCAAmC,CAAC;AACxF,eAAO,MAAM,+BAA+B,2BAA2B,CAAC;AACxE,eAAO,MAAM,gDAAgD,mCAAmC,CAAC;AAKjG,eAAO,MAAM,oBAAoB,UA8BhC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAalD,CAAC;AAEF,eAAO,MAAM,mBAAmB,oBAAoB,CAAC"}
package/lib/constants.js CHANGED
@@ -63,6 +63,13 @@ export var TopLevelActions;
63
63
  TopLevelActions["ManageStocklists"] = "stocklists:manage";
64
64
  TopLevelActions["TransportsBrowse"] = "transports:browse";
65
65
  TopLevelActions["TransportsManage"] = "transports:manage";
66
+ TopLevelActions["ReorderPurchasePayments"] = "vehicles:purchase-payments:reorder";
67
+ TopLevelActions["SendPurchasePaymentsToProcessing"] = "vehicles:purchase-payments:send-to-processing";
68
+ TopLevelActions["EditPurchaseInvoiceDueDate"] = "vehicles:purchase-payments:due-date";
69
+ TopLevelActions["ExportPurchasePayments"] = "vehicles:purchase-payments:export";
70
+ TopLevelActions["CancelPurchasePayment"] = "vehicles:purchase-payments:cancel";
71
+ TopLevelActions["ManageOrganizationBankAccount"] = "crm:orgs:bank-account:manage";
72
+ TopLevelActions["VerifyOrganizationBankAccount"] = "crm:orgs:bank-account:verify";
66
73
  })(TopLevelActions || (TopLevelActions = {}));
67
74
  export const SUPPORTED_LANGUAGES = ['en', 'fr', 'nl', 'es', 'de', 'pt'];
68
75
  export const TENANT_ID_ADMIN_HEADER = 'tenant-id';
@@ -109,6 +116,7 @@ export var BusinessEntityIds;
109
116
  BusinessEntityIds["Prospects"] = "prospects";
110
117
  BusinessEntityIds["Stocklists"] = "stocklists";
111
118
  BusinessEntityIds["Transports"] = "transports";
119
+ BusinessEntityIds["PaymentExports"] = "payment_exports";
112
120
  })(BusinessEntityIds || (BusinessEntityIds = {}));
113
121
  export const LEASING_QUOTE_TEMPLATE_GROUP_ID = 'leasing_quote_template';
114
122
  export const LEASING_QUOTE_PROFORMA_TEMPLATE_GROUP_ID = 'leasing_quote_proforma_template';
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"/","sources":["constants.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,qBAAqB,GAAG,kBAAkB,CAAC;AAKxD,MAAM,CAAN,IAAY,QAmBX;AAnBD,WAAY,QAAQ;IAClB,qCAAyB,CAAA;IACzB,4BAAgB,CAAA;IAChB,6CAAiC,CAAA;IACjC,sCAA0B,CAAA;IAC1B,2BAAe,CAAA;IACf,qCAAyB,CAAA;IACzB,oDAAwC,CAAA;IACxC,oDAAwC,CAAA;IACxC,8CAAkC,CAAA;IAClC,iEAAqD,CAAA;IACrD,4CAAgC,CAAA;IAChC,mCAAuB,CAAA;IACvB,0CAA8B,CAAA;IAC9B,qDAAyC,C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I;CACL,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAA0B;IACrD,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;CACL,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,iBAAiB,CAAC","sourcesContent":["/**\n * Carries a record's version between server and client: the server answers with it on a read,\n * and a client hands it back on a write so the write only lands while the row still stands\n * there. Successor to the older `x-record-modified-at`.\n */\nexport const RECORD_VERSION_HEADER = 'x-record-version';\n\n//\n// STATIC ROLES\n//\nexport enum AppRoles {\n Accountant = 'accountant',\n Admin = 'admins',\n Administrative = 'administrative',\n AppManager = 'app_manager',\n Board = 'board',\n Commercial = 'commercial',\n InboundCommercial = 'inbound_commercial',\n LeasingCommercial = 'leasing_commercial',\n GeneralManager = 'general_manager',\n GeneralManagerAssistant = 'general_manager_assistant',\n ParkLogistics = 'park_logistics',\n Purchaser = 'purchaser',\n SalesManager = 'sales_manager',\n SalesPriceManager = 'sales_price_manager',\n SalesStockManager = 'sales_stock_manager',\n SalesMarketingManager = 'sales_marketing_manager',\n SeniorAccountant = 'senior_accountant',\n TrackAndTraceManager = 'track_and_trace_manager',\n}\n\nexport const TOP_ROLES = [\n AppRoles.Admin,\n AppRoles.Board,\n AppRoles.GeneralManager,\n AppRoles.SeniorAccountant,\n];\n\nexport enum TopLevelActions {\n AdministrationAll = 'admin:*',\n DocumentsFinanceBrowse = 'docs:finance:browse',\n DocumentsFinanceIssueProforma = 'docs:finance:new:proforma',\n DocumentsFinanceIssue = 'docs:finance:new',\n DocumentsAdministrativeBrowse = 'docs:administrative:browse',\n LeadsAll = 'leads:*',\n CrmOrgsBrowse = 'crm:orgs:browse',\n CrmContactsBrowse = 'crm:contacts:browse',\n BrowseDocumentDrafts = 'docs:drafts:browse',\n BrowsePurchasePayments = 'vehicles:purchase-payments:browse',\n BrowsePendingRemarks = 'remarks:pending:browse',\n LeasingDebtorsView = 'leasing:debtors:view',\n LeasingOverduesView = 'leasing:overdues:view',\n LeasingContractsExport = 'leasing:contracts:export',\n LeasingContractsBrowse = 'leasing:contracts:browse',\n LeasingContractsRsExport = 'leasing:contracts:rs:export-rs', // rs stands for rental solutions\n LeasingDebtorsExport = 'leasing:debtors:export',\n MarketBrowse = 'market:browse',\n MarketInsights = 'insights:market',\n MarketingAll = 'marketing:*',\n OffersBrowse = 'offers:browse',\n OpportunitiesBrowseAll = 'opps:browse',\n OpportunitiesBrowseAssigned = 'opps:browse:assigned',\n IntercompanyPaymentsBrowse = 'opps:intercompany-payments:browse',\n VehicleInsights = 'insights:vehicle',\n SaveBankAccounts = 'settings:bank-accounts:save',\n SettingsAll = 'settings:*',\n VehicleCreate = 'vehicle:create',\n TasksAll = 'tasks:*',\n /** Read tasks that are not your own: the unassigned pool, a colleague's list, everyone's. */\n TasksReadAll = 'tasks:read-all',\n TrackAndTraceDevices = 'tt:devices:*',\n TrackAndTraceDevicesExport = 'tt:devices:export',\n ManageStocklists = 'stocklists:manage',\n TransportsBrowse = 'transports:browse',\n TransportsManage = 'transports:manage',\n}\n\n//\n// I18N\n//\nexport const SUPPORTED_LANGUAGES = ['en', 'fr', 'nl', 'es', 'de', 'pt'] as const;\n\n//\n// Headers\n//\nexport const TENANT_ID_ADMIN_HEADER = 'tenant-id';\nexport const SERVICE_ID_ADMIN_HEADER = 'service-id';\n\n//\n// AUTH\n//\nexport const NO_TENANT_ID_VALUE = 'notenant';\nexport const SYSTEM_USER_ID = 'system';\nexport const CROSS_TENANT_USER_ID = 'cross-tenant-sync';\nexport const WHATSAPP_TEMPLATE_SYNC_USER_ID = 'whatsapp-template-sync';\n\n/** The registry of synthetic (non-human) user ids — behavior checks key on this list. */\nexport const SYNTHETIC_USER_IDS: readonly string[] = [\n SYSTEM_USER_ID,\n CROSS_TENANT_USER_ID,\n WHATSAPP_TEMPLATE_SYNC_USER_ID,\n];\n\n/** Display labels for the synthetic user ids — a projection of the registry above. */\nexport const SYNTHETIC_USER_LABELS: Record<string, string> = {\n [SYSTEM_USER_ID]: 'System',\n [CROSS_TENANT_USER_ID]: 'Tenant-sync',\n [WHATSAPP_TEMPLATE_SYNC_USER_ID]: 'Template-sync',\n};\n\n//\n// Business Entity IDs\n//\nexport enum BusinessEntityIds {\n BecrisDeclarations = 'becris_declarations',\n Contacts = 'contacts',\n Emails = 'emails',\n ExternalVehicleSale = 'external_vehicle_sale',\n Documents = 'documents',\n FinanceDocuments = 'finance_documents',\n AdministrativeDocuments = 'administrative_documents',\n InternetVehicles = 'internet-vehicles',\n LeasingContracts = 'leasing_contracts',\n LeasingUploadAutomation = 'leasing_upload_automation',\n Offers = 'offers',\n Opportunities = 'opportunities',\n Organizations = 'organizations',\n PdfTemplates = 'pdf_templates',\n Users = 'users',\n Vehicles = 'vehicles',\n VehiclesPurchase = 'vehicle_purchase',\n VehiclesPriceLists = 'vehicles_price_lists',\n Debtors = 'debtors',\n DebtorsDossier = 'debtor-dossiers',\n DocumentDrafts = 'document_drafts',\n TrackAndTraceDevices = 'track_and_trace_devices',\n Interests = 'interests',\n Prospects = 'prospects',\n Stocklists = 'stocklists',\n Transports = 'transports',\n}\n\n//\n// PDF Templates IDs\n//\nexport const LEASING_QUOTE_TEMPLATE_GROUP_ID = 'leasing_quote_template';\nexport const LEASING_QUOTE_PROFORMA_TEMPLATE_GROUP_ID = 'leasing_quote_proforma_template';\nexport const LEASING_CONTRACT_AMORTIZATION_TEMPLATE_GROUP_ID =\n 'leasing_contract_amortization_template';\nexport const LEASING_CONTRACT_AMORTIZATION_TEMPLATE_PRINT_VERSION_GROUP_ID =\n 'leasing_contract_amortization_print_version_template';\nexport const LEASING_QUOTE_LOCATION_TEMPLATE = 'leasing_quote_location_template';\nexport const LEASING_CONTRACT_TC_TEMPLATE_GROUP_ID = 'leasing_contract_tc_template';\nexport const LEASING_CONTRACT_SPECIFIC_CONDITIONS_TEMPLATE_GROUP_ID =\n 'leasing_contract_specific_conditions_template';\nexport const LEASING_CONTRACT_CAUTIONNEMENT_TEMPLATE_GROUP_ID =\n 'leasing_contract_cautionnement_template';\nexport const LEASING_CONTRACT_DELIVERY_CONFIRMATION_TEMPLATE_GROUP_ID =\n 'leasing_contract_delivery_confirmation_template';\nexport const SALES_QUOTE_PROFORMA_TEMPLATE_GROUP_ID = 'sales_quote_proforma_template';\nexport const SALES_QUOTE_AGREEMENT_TEMPLATE_GROUP_ID = 'sales_quote_agreement_template';\nexport const SALES_INVOICE_TEMPLATE_GROUP_ID = 'sales_invoice_template';\nexport const VEHICLES_STICKER_TEMPLATE_GROUP_ID = 'vehicles_sticker_template';\nexport const VEHICLES_MINI_STICKER_TEMPLATE_GROUP_ID = 'vehicles_mini_sticker_template';\nexport const TRANSPORT_ITR_TEMPLATE_GROUP_ID = 'transport_itr_template';\nexport const EXTERNAL_DELIVERY_CONFIRMATION_TEMPLATE_GROUP_ID = 'external_delivery_confirmation';\n\n//\n// VAT Prefixes for EU Countries and Great Britain & Northern Ireland\n//\nexport const EU_VAT_COUNTRY_CODES = [\n 'at',\n 'be',\n 'bg',\n 'hr',\n 'cy',\n 'cz',\n 'dk',\n 'ee',\n 'fi',\n 'fr',\n 'de',\n 'gr', // greece has EL prefix but the country code is GR\n 'el',\n 'hu',\n 'ie',\n 'it',\n 'lv',\n 'lt',\n 'lu',\n 'mt',\n 'nl',\n 'pl',\n 'pt',\n 'ro',\n 'sk',\n 'si',\n 'es',\n 'se',\n 'xi', // Northern Ireland\n];\n\nexport const HEXON_LANG_CODES: [string, ...string[]] = [\n 'en',\n 'nl',\n 'de',\n 'fr',\n 'es',\n 'pt',\n 'it',\n 'pl',\n 'ru',\n 'ro',\n 'el',\n 'bg',\n];\n\nexport const DEFAULT_SLB_PARTNER = 'To be announced';\n"]}
1
+ {"version":3,"file":"constants.js","sourceRoot":"/","sources":["constants.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,qBAA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,MAAM,uCAAuC,GAAG,gCAAgC,CAAC;AACxF,MAAM,CAAC,MAAM,+BAA+B,GAAG,wBAAwB,CAAC;AACxE,MAAM,CAAC,MAAM,gDAAgD,GAAG,gCAAgC,CAAC;AAKjG,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;CACL,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAA0B;IACrD,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;CACL,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,iBAAiB,CAAC","sourcesContent":["/**\n * Carries a record's version between server and client: the server answers with it on a read,\n * and a client hands it back on a write so the write only lands while the row still stands\n * there. Successor to the older `x-record-modified-at`.\n */\nexport const RECORD_VERSION_HEADER = 'x-record-version';\n\n//\n// STATIC ROLES\n//\nexport enum AppRoles {\n Accountant = 'accountant',\n Admin = 'admins',\n Administrative = 'administrative',\n AppManager = 'app_manager',\n Board = 'board',\n Commercial = 'commercial',\n InboundCommercial = 'inbound_commercial',\n LeasingCommercial = 'leasing_commercial',\n GeneralManager = 'general_manager',\n GeneralManagerAssistant = 'general_manager_assistant',\n ParkLogistics = 'park_logistics',\n Purchaser = 'purchaser',\n SalesManager = 'sales_manager',\n SalesPriceManager = 'sales_price_manager',\n SalesStockManager = 'sales_stock_manager',\n SalesMarketingManager = 'sales_marketing_manager',\n SeniorAccountant = 'senior_accountant',\n TrackAndTraceManager = 'track_and_trace_manager',\n}\n\nexport const TOP_ROLES = [\n AppRoles.Admin,\n AppRoles.Board,\n AppRoles.GeneralManager,\n AppRoles.SeniorAccountant,\n];\n\nexport enum TopLevelActions {\n AdministrationAll = 'admin:*',\n DocumentsFinanceBrowse = 'docs:finance:browse',\n DocumentsFinanceIssueProforma = 'docs:finance:new:proforma',\n DocumentsFinanceIssue = 'docs:finance:new',\n DocumentsAdministrativeBrowse = 'docs:administrative:browse',\n LeadsAll = 'leads:*',\n CrmOrgsBrowse = 'crm:orgs:browse',\n CrmContactsBrowse = 'crm:contacts:browse',\n BrowseDocumentDrafts = 'docs:drafts:browse',\n BrowsePurchasePayments = 'vehicles:purchase-payments:browse',\n BrowsePendingRemarks = 'remarks:pending:browse',\n LeasingDebtorsView = 'leasing:debtors:view',\n LeasingOverduesView = 'leasing:overdues:view',\n LeasingContractsExport = 'leasing:contracts:export',\n LeasingContractsBrowse = 'leasing:contracts:browse',\n LeasingContractsRsExport = 'leasing:contracts:rs:export-rs', // rs stands for rental solutions\n LeasingDebtorsExport = 'leasing:debtors:export',\n MarketBrowse = 'market:browse',\n MarketInsights = 'insights:market',\n MarketingAll = 'marketing:*',\n OffersBrowse = 'offers:browse',\n OpportunitiesBrowseAll = 'opps:browse',\n OpportunitiesBrowseAssigned = 'opps:browse:assigned',\n IntercompanyPaymentsBrowse = 'opps:intercompany-payments:browse',\n VehicleInsights = 'insights:vehicle',\n SaveBankAccounts = 'settings:bank-accounts:save',\n SettingsAll = 'settings:*',\n VehicleCreate = 'vehicle:create',\n TasksAll = 'tasks:*',\n /** Read tasks that are not your own: the unassigned pool, a colleague's list, everyone's. */\n TasksReadAll = 'tasks:read-all',\n TrackAndTraceDevices = 'tt:devices:*',\n TrackAndTraceDevicesExport = 'tt:devices:export',\n ManageStocklists = 'stocklists:manage',\n TransportsBrowse = 'transports:browse',\n TransportsManage = 'transports:manage',\n ReorderPurchasePayments = 'vehicles:purchase-payments:reorder',\n SendPurchasePaymentsToProcessing = 'vehicles:purchase-payments:send-to-processing',\n EditPurchaseInvoiceDueDate = 'vehicles:purchase-payments:due-date',\n ExportPurchasePayments = 'vehicles:purchase-payments:export',\n CancelPurchasePayment = 'vehicles:purchase-payments:cancel',\n ManageOrganizationBankAccount = 'crm:orgs:bank-account:manage',\n VerifyOrganizationBankAccount = 'crm:orgs:bank-account:verify',\n}\n\n//\n// I18N\n//\nexport const SUPPORTED_LANGUAGES = ['en', 'fr', 'nl', 'es', 'de', 'pt'] as const;\n\n//\n// Headers\n//\nexport const TENANT_ID_ADMIN_HEADER = 'tenant-id';\nexport const SERVICE_ID_ADMIN_HEADER = 'service-id';\n\n//\n// AUTH\n//\nexport const NO_TENANT_ID_VALUE = 'notenant';\nexport const SYSTEM_USER_ID = 'system';\nexport const CROSS_TENANT_USER_ID = 'cross-tenant-sync';\nexport const WHATSAPP_TEMPLATE_SYNC_USER_ID = 'whatsapp-template-sync';\n\n/** The registry of synthetic (non-human) user ids — behavior checks key on this list. */\nexport const SYNTHETIC_USER_IDS: readonly string[] = [\n SYSTEM_USER_ID,\n CROSS_TENANT_USER_ID,\n WHATSAPP_TEMPLATE_SYNC_USER_ID,\n];\n\n/** Display labels for the synthetic user ids — a projection of the registry above. */\nexport const SYNTHETIC_USER_LABELS: Record<string, string> = {\n [SYSTEM_USER_ID]: 'System',\n [CROSS_TENANT_USER_ID]: 'Tenant-sync',\n [WHATSAPP_TEMPLATE_SYNC_USER_ID]: 'Template-sync',\n};\n\n//\n// Business Entity IDs\n//\nexport enum BusinessEntityIds {\n BecrisDeclarations = 'becris_declarations',\n Contacts = 'contacts',\n Emails = 'emails',\n ExternalVehicleSale = 'external_vehicle_sale',\n Documents = 'documents',\n FinanceDocuments = 'finance_documents',\n AdministrativeDocuments = 'administrative_documents',\n InternetVehicles = 'internet-vehicles',\n LeasingContracts = 'leasing_contracts',\n LeasingUploadAutomation = 'leasing_upload_automation',\n Offers = 'offers',\n Opportunities = 'opportunities',\n Organizations = 'organizations',\n PdfTemplates = 'pdf_templates',\n Users = 'users',\n Vehicles = 'vehicles',\n VehiclesPurchase = 'vehicle_purchase',\n VehiclesPriceLists = 'vehicles_price_lists',\n Debtors = 'debtors',\n DebtorsDossier = 'debtor-dossiers',\n DocumentDrafts = 'document_drafts',\n TrackAndTraceDevices = 'track_and_trace_devices',\n Interests = 'interests',\n Prospects = 'prospects',\n Stocklists = 'stocklists',\n Transports = 'transports',\n PaymentExports = 'payment_exports',\n}\n\n//\n// PDF Templates IDs\n//\nexport const LEASING_QUOTE_TEMPLATE_GROUP_ID = 'leasing_quote_template';\nexport const LEASING_QUOTE_PROFORMA_TEMPLATE_GROUP_ID = 'leasing_quote_proforma_template';\nexport const LEASING_CONTRACT_AMORTIZATION_TEMPLATE_GROUP_ID =\n 'leasing_contract_amortization_template';\nexport const LEASING_CONTRACT_AMORTIZATION_TEMPLATE_PRINT_VERSION_GROUP_ID =\n 'leasing_contract_amortization_print_version_template';\nexport const LEASING_QUOTE_LOCATION_TEMPLATE = 'leasing_quote_location_template';\nexport const LEASING_CONTRACT_TC_TEMPLATE_GROUP_ID = 'leasing_contract_tc_template';\nexport const LEASING_CONTRACT_SPECIFIC_CONDITIONS_TEMPLATE_GROUP_ID =\n 'leasing_contract_specific_conditions_template';\nexport const LEASING_CONTRACT_CAUTIONNEMENT_TEMPLATE_GROUP_ID =\n 'leasing_contract_cautionnement_template';\nexport const LEASING_CONTRACT_DELIVERY_CONFIRMATION_TEMPLATE_GROUP_ID =\n 'leasing_contract_delivery_confirmation_template';\nexport const SALES_QUOTE_PROFORMA_TEMPLATE_GROUP_ID = 'sales_quote_proforma_template';\nexport const SALES_QUOTE_AGREEMENT_TEMPLATE_GROUP_ID = 'sales_quote_agreement_template';\nexport const SALES_INVOICE_TEMPLATE_GROUP_ID = 'sales_invoice_template';\nexport const VEHICLES_STICKER_TEMPLATE_GROUP_ID = 'vehicles_sticker_template';\nexport const VEHICLES_MINI_STICKER_TEMPLATE_GROUP_ID = 'vehicles_mini_sticker_template';\nexport const TRANSPORT_ITR_TEMPLATE_GROUP_ID = 'transport_itr_template';\nexport const EXTERNAL_DELIVERY_CONFIRMATION_TEMPLATE_GROUP_ID = 'external_delivery_confirmation';\n\n//\n// VAT Prefixes for EU Countries and Great Britain & Northern Ireland\n//\nexport const EU_VAT_COUNTRY_CODES = [\n 'at',\n 'be',\n 'bg',\n 'hr',\n 'cy',\n 'cz',\n 'dk',\n 'ee',\n 'fi',\n 'fr',\n 'de',\n 'gr', // greece has EL prefix but the country code is GR\n 'el',\n 'hu',\n 'ie',\n 'it',\n 'lv',\n 'lt',\n 'lu',\n 'mt',\n 'nl',\n 'pl',\n 'pt',\n 'ro',\n 'sk',\n 'si',\n 'es',\n 'se',\n 'xi', // Northern Ireland\n];\n\nexport const HEXON_LANG_CODES: [string, ...string[]] = [\n 'en',\n 'nl',\n 'de',\n 'fr',\n 'es',\n 'pt',\n 'it',\n 'pl',\n 'ru',\n 'ro',\n 'el',\n 'bg',\n];\n\nexport const DEFAULT_SLB_PARTNER = 'To be announced';\n"]}
package/lib/iban.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ export declare const normalizeIban: (raw: string) => string;
2
+ export declare const isValidIban: (raw: string) => boolean;
3
+ //# sourceMappingURL=iban.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iban.d.ts","sourceRoot":"/","sources":["iban.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,aAAa,QAAS,MAAM,KAAG,MAA+C,CAAC;AAM5F,eAAO,MAAM,WAAW,QAAS,MAAM,KAAG,OAczC,CAAC"}
package/lib/iban.js ADDED
@@ -0,0 +1,15 @@
1
+ export const normalizeIban = (raw) => raw.replace(/\s+/g, '').toUpperCase();
2
+ export const isValidIban = (raw) => {
3
+ const iban = normalizeIban(raw);
4
+ if (!/^[A-Z]{2}[0-9]{2}[A-Z0-9]{10,30}$/.test(iban)) {
5
+ return false;
6
+ }
7
+ const rearranged = iban.slice(4) + iban.slice(0, 4);
8
+ const numeric = rearranged.replace(/[A-Z]/g, (ch) => (ch.charCodeAt(0) - 55).toString());
9
+ let remainder = 0;
10
+ for (let i = 0; i < numeric.length; i += 7) {
11
+ remainder = Number(`${remainder}${numeric.slice(i, i + 7)}`) % 97;
12
+ }
13
+ return remainder === 1;
14
+ };
15
+ //# sourceMappingURL=iban.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iban.js","sourceRoot":"/","sources":["iban.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,GAAW,EAAU,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;AAM5F,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,GAAW,EAAW,EAAE;IAClD,MAAM,IAAI,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;IAChC,IAAI,CAAC,mCAAmC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QACpD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACpD,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;IAEzF,IAAI,SAAS,GAAG,CAAC,CAAC;IAClB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;QAC3C,SAAS,GAAG,MAAM,CAAC,GAAG,SAAS,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC;IACpE,CAAC;IACD,OAAO,SAAS,KAAK,CAAC,CAAC;AACzB,CAAC,CAAC","sourcesContent":["/** Strips spaces and upper-cases an IBAN into its canonical, storable form. */\nexport const normalizeIban = (raw: string): string => raw.replace(/\\s+/g, '').toUpperCase();\n\n/**\n * Validates an IBAN's structure and its mod-97 checksum. A passing checksum means the number is\n * well-formed — it is never proof of who holds the account, which stays a manual verification step.\n */\nexport const isValidIban = (raw: string): boolean => {\n const iban = normalizeIban(raw);\n if (!/^[A-Z]{2}[0-9]{2}[A-Z0-9]{10,30}$/.test(iban)) {\n return false;\n }\n\n const rearranged = iban.slice(4) + iban.slice(0, 4);\n const numeric = rearranged.replace(/[A-Z]/g, (ch) => (ch.charCodeAt(0) - 55).toString());\n\n let remainder = 0;\n for (let i = 0; i < numeric.length; i += 7) {\n remainder = Number(`${remainder}${numeric.slice(i, i + 7)}`) % 97;\n }\n return remainder === 1;\n};\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=iban.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iban.test.d.ts","sourceRoot":"/","sources":["iban.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,28 @@
1
+ import { isValidIban, normalizeIban } from './iban.js';
2
+ describe('normalizeIban', () => {
3
+ test('strips spaces and upper-cases', () => {
4
+ expect(normalizeIban('be76 0689 0799 4795')).toBe('BE76068907994795');
5
+ });
6
+ });
7
+ describe('isValidIban', () => {
8
+ test.each([
9
+ ['BE76 0689 0799 4795', true],
10
+ ['BE84068236789959', true],
11
+ ['BE57736064958035', true],
12
+ ['NL92INGB0671129821', true],
13
+ ['NL26BNPA0227715233', true],
14
+ ['GB82WEST12345698765432', true],
15
+ ])('accepts a valid IBAN %s', (iban, expected) => {
16
+ expect(isValidIban(iban)).toBe(expected);
17
+ });
18
+ test.each([
19
+ ['BE76 0689 0799 4796', false],
20
+ ['BE00068236789959', false],
21
+ ['', false],
22
+ ['NOTANIBAN', false],
23
+ ['BE7', false],
24
+ ])('rejects an invalid IBAN %s', (iban, expected) => {
25
+ expect(isValidIban(iban)).toBe(expected);
26
+ });
27
+ });
28
+ //# sourceMappingURL=iban.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iban.test.js","sourceRoot":"/","sources":["iban.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAEvD,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,IAAI,CAAC,+BAA+B,EAAE,GAAG,EAAE;QACzC,MAAM,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IACxE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IAC3B,IAAI,CAAC,IAAI,CAAC;QACR,CAAC,qBAAqB,EAAE,IAAI,CAAC;QAC7B,CAAC,kBAAkB,EAAE,IAAI,CAAC;QAC1B,CAAC,kBAAkB,EAAE,IAAI,CAAC;QAC1B,CAAC,oBAAoB,EAAE,IAAI,CAAC;QAC5B,CAAC,oBAAoB,EAAE,IAAI,CAAC;QAC5B,CAAC,wBAAwB,EAAE,IAAI,CAAC;KACjC,CAAC,CAAC,yBAAyB,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,EAAE;QAC/C,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,IAAI,CAAC;QACR,CAAC,qBAAqB,EAAE,KAAK,CAAC;QAC9B,CAAC,kBAAkB,EAAE,KAAK,CAAC;QAC3B,CAAC,EAAE,EAAE,KAAK,CAAC;QACX,CAAC,WAAW,EAAE,KAAK,CAAC;QACpB,CAAC,KAAK,EAAE,KAAK,CAAC;KACf,CAAC,CAAC,4BAA4B,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,EAAE;QAClD,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { isValidIban, normalizeIban } from './iban.js';\n\ndescribe('normalizeIban', () => {\n test('strips spaces and upper-cases', () => {\n expect(normalizeIban('be76 0689 0799 4795')).toBe('BE76068907994795');\n });\n});\n\ndescribe('isValidIban', () => {\n test.each([\n ['BE76 0689 0799 4795', true], // TheTruckCompany debtor account\n ['BE84068236789959', true], // example file debtor\n ['BE57736064958035', true], // example file creditor\n ['NL92INGB0671129821', true], // example file NL creditor\n ['NL26BNPA0227715233', true],\n ['GB82WEST12345698765432', true],\n ])('accepts a valid IBAN %s', (iban, expected) => {\n expect(isValidIban(iban)).toBe(expected);\n });\n\n test.each([\n ['BE76 0689 0799 4796', false], // last digit changed — checksum fails\n ['BE00068236789959', false], // wrong check digits\n ['', false],\n ['NOTANIBAN', false],\n ['BE7', false], // too short\n ])('rejects an invalid IBAN %s', (iban, expected) => {\n expect(isValidIban(iban)).toBe(expected);\n });\n});\n"]}
package/lib/money.d.ts CHANGED
@@ -7,7 +7,6 @@ type CurrencySettings = {
7
7
  };
8
8
  export declare const getCurrencySettings: (currency?: string) => CurrencySettings;
9
9
  export declare const roundMoney: (currency: string | undefined, value: Decimal | string) => Decimal;
10
- export declare const getBranchAmountFromForeign: (branchCurrency: string | undefined, foreignAmount: Decimal.Value, exchangeRate: Decimal.Value) => string;
11
10
  export declare const isAmountWithinToleranceSame: (currency: string | undefined, amount1: Decimal | string, amount2: Decimal | string, tolerance?: number) => boolean;
12
11
  export {};
13
12
  //# sourceMappingURL=money.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"money.d.ts","sourceRoot":"/","sources":["money.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAoBrC,KAAK,gBAAgB,GAAG;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,OAAO,OAAO,CAAC,eAAe,CAAC;IAC/C,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AASF,eAAO,MAAM,mBAAmB,cAAc,MAAM,KAAW,gBAE9D,CAAC;AAEF,eAAO,MAAM,UAAU,aAAc,MAAM,qBAAiB,OAAO,GAAG,MAAM,KAAG,OAG9E,CAAC;AAMF,eAAO,MAAM,0BAA0B,mBACrB,MAAM,GAAG,SAAS,iBACnB,OAAO,CAAC,KAAK,gBACd,OAAO,CAAC,KAAK,KAC1B,MAA6F,CAAC;AAGjG,eAAO,MAAM,2BAA2B,aAC5B,MAAM,uBACP,OAAO,GAAG,MAAM,WAChB,OAAO,GAAG,MAAM,yBAExB,OAI8B,CAAC"}
1
+ {"version":3,"file":"money.d.ts","sourceRoot":"/","sources":["money.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAoBrC,KAAK,gBAAgB,GAAG;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,OAAO,OAAO,CAAC,eAAe,CAAC;IAC/C,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AASF,eAAO,MAAM,mBAAmB,cAAc,MAAM,KAAW,gBAE9D,CAAC;AAEF,eAAO,MAAM,UAAU,aAAc,MAAM,qBAAiB,OAAO,GAAG,MAAM,KAAG,OAG9E,CAAC;AAGF,eAAO,MAAM,2BAA2B,aAC5B,MAAM,uBACP,OAAO,GAAG,MAAM,WAChB,OAAO,GAAG,MAAM,yBAExB,OAI8B,CAAC"}
package/lib/money.js CHANGED
@@ -27,7 +27,6 @@ export const roundMoney = (currency = 'EUR', value) => {
27
27
  const settings = getCurrencySettings(currency);
28
28
  return new Decimal(value).toDecimalPlaces(settings.decimalPlaces, settings.roundingMethod);
29
29
  };
30
- export const getBranchAmountFromForeign = (branchCurrency, foreignAmount, exchangeRate) => roundMoney(branchCurrency, new Decimal(foreignAmount).mul(exchangeRate)).toString();
31
30
  export const isAmountWithinToleranceSame = (currency = 'EUR', amount1, amount2, tolerance = 0.1) => roundMoney(currency, amount1)
32
31
  .minus(roundMoney(currency, amount2))
33
32
  .abs()
package/lib/money.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"money.js","sourceRoot":"/","sources":["money.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,MAAM,YAAY,GAAG;IACnB,aAAa,EAAE,CAAC;IAChB,cAAc,EAAE,OAAO,CAAC,eAAe;IACvC,cAAc,EAAE,KAAK;CACtB,CAAC;AAEF,MAAM,YAAY,GAAG;IACnB,aAAa,EAAE,CAAC;IAChB,cAAc,EAAE,OAAO,CAAC,eAAe;IACvC,cAAc,EAAE,KAAK;CACtB,CAAC;AAEF,MAAM,YAAY,GAAG;IACnB,aAAa,EAAE,CAAC;IAChB,cAAc,EAAE,OAAO,CAAC,eAAe;IACvC,cAAc,EAAE,KAAK;CACtB,CAAC;AASF,MAAM,gBAAgB,GAAqC;IACzD,GAAG,EAAE,YAAY;IACjB,GAAG,EAAE,YAAY;IACjB,GAAG,EAAE,YAAY;IACjB,GAAG,EAAE,YAAY;CAClB,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,QAAQ,GAAW,KAAK,EAAoB,EAAE;IAChF,OAAO,gBAAgB,CAAC,QAAQ,CAAC,IAAI,YAAY,CAAC;AACpD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,QAAQ,GAAW,KAAK,EAAE,KAAuB,EAAW,EAAE;IACvF,MAAM,QAAQ,GAAG,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAC/C,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,eAAe,CAAC,QAAQ,CAAC,aAAa,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC;AAC7F,CAAC,CAAC;AAMF,MAAM,CAAC,MAAM,0BAA0B,GAAG,CACxC,cAAkC,EAClC,aAA4B,EAC5B,YAA2B,EACnB,EAAE,CAAC,UAAU,CAAC,cAAc,EAAE,IAAI,OAAO,CAAC,aAAa,CAAC,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;AAGjG,MAAM,CAAC,MAAM,2BAA2B,GAAG,CACzC,QAAQ,GAAW,KAAK,EACxB,OAAyB,EACzB,OAAyB,EACzB,SAAS,GAAG,GAAG,EACN,EAAE,CACX,UAAU,CAAC,QAAQ,EAAE,OAAO,CAAC;KAC1B,KAAK,CAAC,UAAU,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;KACpC,GAAG,EAAE;KACL,iBAAiB,CAAC,SAAS,CAAC,CAAC","sourcesContent":["import { Decimal } from 'decimal.js';\n\nconst CFA_SETTINGS = {\n decimalPlaces: 0,\n roundingMethod: Decimal.ROUND_HALF_EVEN,\n currencySymbol: 'CFA',\n};\n\nconst EUR_SETTINGS = {\n decimalPlaces: 2,\n roundingMethod: Decimal.ROUND_HALF_EVEN,\n currencySymbol: 'EUR',\n};\n\nconst USD_SETTINGS = {\n decimalPlaces: 2,\n roundingMethod: Decimal.ROUND_HALF_EVEN,\n currencySymbol: 'USD',\n};\n\ntype CurrencySettings = {\n decimalPlaces: number;\n roundingMethod: typeof Decimal.ROUND_HALF_EVEN;\n thousandSeparator?: string;\n currencySymbol?: string;\n};\n\nconst currencySettings: Record<string, CurrencySettings> = {\n XOF: CFA_SETTINGS,\n CFA: CFA_SETTINGS,\n EUR: EUR_SETTINGS,\n USD: USD_SETTINGS,\n};\n\nexport const getCurrencySettings = (currency: string = 'EUR'): CurrencySettings => {\n return currencySettings[currency] || EUR_SETTINGS;\n};\n\nexport const roundMoney = (currency: string = 'EUR', value: Decimal | string): Decimal => {\n const settings = getCurrencySettings(currency);\n return new Decimal(value).toDecimalPlaces(settings.decimalPlaces, settings.roundingMethod);\n};\n\n/**\n * The branch currency value of an amount in another currency. `exchangeRate` is in branch currency\n * units per 1 unit of the other currency, the direction of every `foreign` block.\n */\nexport const getBranchAmountFromForeign = (\n branchCurrency: string | undefined,\n foreignAmount: Decimal.Value,\n exchangeRate: Decimal.Value,\n): string => roundMoney(branchCurrency, new Decimal(foreignAmount).mul(exchangeRate)).toString();\n\n// We tolerate a 10 cent rounding difference\nexport const isAmountWithinToleranceSame = (\n currency: string = 'EUR',\n amount1: Decimal | string,\n amount2: Decimal | string,\n tolerance = 0.1,\n): boolean =>\n roundMoney(currency, amount1)\n .minus(roundMoney(currency, amount2))\n .abs()\n .lessThanOrEqualTo(tolerance);\n"]}
1
+ {"version":3,"file":"money.js","sourceRoot":"/","sources":["money.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,MAAM,YAAY,GAAG;IACnB,aAAa,EAAE,CAAC;IAChB,cAAc,EAAE,OAAO,CAAC,eAAe;IACvC,cAAc,EAAE,KAAK;CACtB,CAAC;AAEF,MAAM,YAAY,GAAG;IACnB,aAAa,EAAE,CAAC;IAChB,cAAc,EAAE,OAAO,CAAC,eAAe;IACvC,cAAc,EAAE,KAAK;CACtB,CAAC;AAEF,MAAM,YAAY,GAAG;IACnB,aAAa,EAAE,CAAC;IAChB,cAAc,EAAE,OAAO,CAAC,eAAe;IACvC,cAAc,EAAE,KAAK;CACtB,CAAC;AASF,MAAM,gBAAgB,GAAqC;IACzD,GAAG,EAAE,YAAY;IACjB,GAAG,EAAE,YAAY;IACjB,GAAG,EAAE,YAAY;IACjB,GAAG,EAAE,YAAY;CAClB,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,QAAQ,GAAW,KAAK,EAAoB,EAAE;IAChF,OAAO,gBAAgB,CAAC,QAAQ,CAAC,IAAI,YAAY,CAAC;AACpD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,QAAQ,GAAW,KAAK,EAAE,KAAuB,EAAW,EAAE;IACvF,MAAM,QAAQ,GAAG,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAC/C,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,eAAe,CAAC,QAAQ,CAAC,aAAa,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC;AAC7F,CAAC,CAAC;AAGF,MAAM,CAAC,MAAM,2BAA2B,GAAG,CACzC,QAAQ,GAAW,KAAK,EACxB,OAAyB,EACzB,OAAyB,EACzB,SAAS,GAAG,GAAG,EACN,EAAE,CACX,UAAU,CAAC,QAAQ,EAAE,OAAO,CAAC;KAC1B,KAAK,CAAC,UAAU,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;KACpC,GAAG,EAAE;KACL,iBAAiB,CAAC,SAAS,CAAC,CAAC","sourcesContent":["import { Decimal } from 'decimal.js';\n\nconst CFA_SETTINGS = {\n decimalPlaces: 0,\n roundingMethod: Decimal.ROUND_HALF_EVEN,\n currencySymbol: 'CFA',\n};\n\nconst EUR_SETTINGS = {\n decimalPlaces: 2,\n roundingMethod: Decimal.ROUND_HALF_EVEN,\n currencySymbol: 'EUR',\n};\n\nconst USD_SETTINGS = {\n decimalPlaces: 2,\n roundingMethod: Decimal.ROUND_HALF_EVEN,\n currencySymbol: 'USD',\n};\n\ntype CurrencySettings = {\n decimalPlaces: number;\n roundingMethod: typeof Decimal.ROUND_HALF_EVEN;\n thousandSeparator?: string;\n currencySymbol?: string;\n};\n\nconst currencySettings: Record<string, CurrencySettings> = {\n XOF: CFA_SETTINGS,\n CFA: CFA_SETTINGS,\n EUR: EUR_SETTINGS,\n USD: USD_SETTINGS,\n};\n\nexport const getCurrencySettings = (currency: string = 'EUR'): CurrencySettings => {\n return currencySettings[currency] || EUR_SETTINGS;\n};\n\nexport const roundMoney = (currency: string = 'EUR', value: Decimal | string): Decimal => {\n const settings = getCurrencySettings(currency);\n return new Decimal(value).toDecimalPlaces(settings.decimalPlaces, settings.roundingMethod);\n};\n\n// We tolerate a 10 cent rounding difference\nexport const isAmountWithinToleranceSame = (\n currency: string = 'EUR',\n amount1: Decimal | string,\n amount2: Decimal | string,\n tolerance = 0.1,\n): boolean =>\n roundMoney(currency, amount1)\n .minus(roundMoney(currency, amount2))\n .abs()\n .lessThanOrEqualTo(tolerance);\n"]}
package/lib/types.d.ts CHANGED
@@ -145,8 +145,6 @@ export type CurrencyListResponse = {
145
145
  export type CurrencyConversionRequest = {
146
146
  sourceCurrency: string;
147
147
  targetCurrency?: string;
148
- date?: string;
149
- bankFeeMarkup?: boolean;
150
148
  };
151
149
  export type DefaultVatRateRequest = {
152
150
  branchId?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"/","sources":["types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE9D,MAAM,MAAM,aAAa,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI;IACrC,OAAO,EAAE,CAAC,EAAE,CAAC;IACb,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,IAAI,EAAE,CAAC,CAAC;IACR,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,QAAQ,CAA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AM,YAAY,GAAG;IACzB,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC"}
package/lib/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"/","sources":["types.ts"],"names":[],"mappings":"AAsDA,MAAM,CAAN,IAAY,MAEX;AAFD,WAAY,MAAM;IAChB,+BAAqB,CAAA;AACvB,CAAC,EAFW,MAAM,KAAN,MAAM,QAEjB;AA2ID,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,gCAAa,CAAA;IACb,wCAAqB,CAAA;AACvB,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B","sourcesContent":["import { AppRoles, TopLevelActions } from './constants.js';\nimport { LocationValue } from './locations.js';\nimport { EmailDestination } from './messages.js';\n\nexport type { GPSCoord, LocationValue } from './locations.js';\n\nexport type PaginatedList<T, M = {}> = {\n results: T[];\n nextToken?: undefined;\n meta: M;\n totalCount: number;\n};\n\nexport type PaginationRequest = {\n limit: number;\n offset: number;\n};\n\nexport type NextList<T, M = {}> = {\n results: T[];\n nextToken?: string;\n meta: M;\n totalCount?: number;\n};\n\nexport type NextRequest = {\n limit?: number;\n nextToken?: string;\n};\n\nexport type PaginatedRequest = {\n limit?: number;\n offset?: number;\n};\nexport type Requester = {\n lang: string;\n roles: AppRoles[];\n actions: TopLevelActions[];\n tenantId: string;\n tenantLang: string;\n userAgent?: string;\n source?: string;\n userId: string;\n isAdmin: boolean;\n isApi: boolean;\n isHuman: boolean;\n};\n\nexport type Option = {\n value: string | number;\n label: string;\n color?: string;\n};\n\nexport enum Region {\n euWest1 = 'eu-west-1',\n}\n\nexport type ErrorResponse = {\n message?: string;\n data?: unknown;\n};\n\nexport type MultiLangValue = { key?: string } & { [languageCode: string]: string };\n\nexport type CognitoInfo = {\n userPoolId: string;\n appClientId: string;\n};\n\nexport type SearchPermissions = {\n users: string[];\n roles: AppRoles[];\n};\n\nexport type PhoneNumberValue = {\n country: string;\n e164: string;\n international: string;\n national: string;\n};\n\nexport type PhoneNumberRawValue = {\n defaultCountry?: string;\n input: string;\n};\n\nexport type LinkValue = {\n text?: string;\n url: string;\n};\n\nexport type Document = {\n type: string; // passport, driving_license, ...\n displayName: string;\n file: AttachmentValue;\n};\n\nexport type AttachmentValue = {\n contentType: string;\n fileName: string;\n id: string;\n previewSrc?: string;\n size: number;\n uploadedAt: string;\n uploadedBy: string;\n url: string;\n descriptions?: string | MultiLangValue;\n};\n\n/** One row of `public.vatlayer_logs`: our reading of a VIES answer next to the answer itself. */\nexport type VatLayerResponseLog = {\n response: VatLayerResponse;\n raw: any;\n};\n\n/**\n * A VIES answer about a VAT number. The name dates from the vatlayer proxy that relayed VIES\n * answers until September 2026; the shape is unchanged. `formatValid` is absent when the number\n * carries no EU member state prefix, so no format applies. `viesStatus: 'failure'` means VIES\n * could not be reached and the other fields, if any, repeat the last logged answer.\n */\nexport type VatLayerResponse = {\n vatNumber: string;\n viesStatus: 'ok' | 'failure';\n} & (\n | { formatValid?: boolean; viesValid: false; validAt?: undefined; countryCode?: string }\n | {\n formatValid: true;\n viesValid: boolean;\n validAt: string;\n countryCode: string;\n name: string;\n addressLines: string[];\n /** VIES's proof of this check, issued only when we identified ourselves as requester. */\n consultationNumber?: string;\n /** Our VAT number the check was consulted under, when it was. */\n requesterVatNumber?: string;\n }\n);\n\nexport type VatValidationResponse = {\n vatNumber: string;\n formatValid?: boolean;\n viesStatus: 'ok' | 'failure';\n countryCode?: string;\n} & (\n | { viesValid: false; validAt?: undefined }\n | {\n viesValid: true;\n validAt: string;\n name?: string;\n normalizedAddress?: LocationValue;\n officialAddress?: string[];\n }\n);\n\nexport type VatValidationRequest = {\n defaultCountry?: string;\n input: string;\n cacheDays?: number;\n /** Branch the check is made for. Its VAT number, if European, is sent to VIES as requester. */\n branchId?: string;\n};\n\nexport type CurrencyListResponse = {\n currencies: Record<string, { label: string }>;\n};\n\nexport type CurrencyConversionRequest = {\n sourceCurrency: string;\n targetCurrency?: string;\n /** yyyy-MM-dd. The rates of that day. Absent = yesterday's rates. */\n date?: string;\n /**\n * Lower the rate by the bank's conversion fee, so a customer pays that fee in the foreign\n * amount. Absent = true. A purchase price or a supplier invoice asks for the plain rate.\n */\n bankFeeMarkup?: boolean;\n};\n\nexport type DefaultVatRateRequest = {\n branchId?: string;\n organizationId?: string;\n};\n\nexport type DefaultVatRateResponse = {\n defaultVatRate: string;\n};\n\nexport type CurrencyConversionResponse = {\n sourceCurrency: string;\n rates: Record<string, string>;\n};\n\nexport enum TransactionType {\n sale = 'sale',\n purchase = 'purchase',\n}\n\nexport type ShareEmailRequest = {\n country: string; // Lowercase ISO 3166-1 alpha-2 code, e.g. 'be'\n destinations: EmailDestination[];\n message: string;\n subject: string;\n attachments?: AttachmentValue[];\n headers?: Record<string, string>;\n};\n\nexport type WhatsAppContact = {\n phone: PhoneNumberValue | PhoneNumberRawValue;\n name?: string;\n /**\n * Any language the sending flow's template is approved in — both share flows validate against\n * the tenant's catalogue at send time.\n */\n language: string;\n};\n\nexport type ShareWhatsappRequest = {\n contacts: WhatsAppContact[];\n};\n\nexport type DistributiveOmit<T, K extends PropertyKey> = T extends any ? Omit<T, K> : never;\n\nexport type ChangeRecord = {\n oldValue?: any;\n newValue?: any;\n modifiedBy?: string;\n modifiedAt: string;\n};\n\nexport type LinkWebsiteUserRequest = {\n tenantId: string;\n websiteUserId: string;\n email: string;\n vatNumber: string;\n};\n\nexport type DeleteWebsiteContactLinkRequest = {\n tenantId: string;\n websiteUserId: string;\n};\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"/","sources":["types.ts"],"names":[],"mappings":"AAsDA,MAAM,CAAN,IAAY,MAEX;AAFD,WAAY,MAAM;IAChB,+BAAqB,CAAA;AACvB,CAAC,EAFW,MAAM,KAAN,MAAM,QAEjB;AAoID,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,gCAAa,CAAA;IACb,wCAAqB,CAAA;AACvB,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B","sourcesContent":["import { AppRoles, TopLevelActions } from './constants.js';\nimport { LocationValue } from './locations.js';\nimport { EmailDestination } from './messages.js';\n\nexport type { GPSCoord, LocationValue } from './locations.js';\n\nexport type PaginatedList<T, M = {}> = {\n results: T[];\n nextToken?: undefined;\n meta: M;\n totalCount: number;\n};\n\nexport type PaginationRequest = {\n limit: number;\n offset: number;\n};\n\nexport type NextList<T, M = {}> = {\n results: T[];\n nextToken?: string;\n meta: M;\n totalCount?: number;\n};\n\nexport type NextRequest = {\n limit?: number;\n nextToken?: string;\n};\n\nexport type PaginatedRequest = {\n limit?: number;\n offset?: number;\n};\nexport type Requester = {\n lang: string;\n roles: AppRoles[];\n actions: TopLevelActions[];\n tenantId: string;\n tenantLang: string;\n userAgent?: string;\n source?: string;\n userId: string;\n isAdmin: boolean;\n isApi: boolean;\n isHuman: boolean;\n};\n\nexport type Option = {\n value: string | number;\n label: string;\n color?: string;\n};\n\nexport enum Region {\n euWest1 = 'eu-west-1',\n}\n\nexport type ErrorResponse = {\n message?: string;\n data?: unknown;\n};\n\nexport type MultiLangValue = { key?: string } & { [languageCode: string]: string };\n\nexport type CognitoInfo = {\n userPoolId: string;\n appClientId: string;\n};\n\nexport type SearchPermissions = {\n users: string[];\n roles: AppRoles[];\n};\n\nexport type PhoneNumberValue = {\n country: string;\n e164: string;\n international: string;\n national: string;\n};\n\nexport type PhoneNumberRawValue = {\n defaultCountry?: string;\n input: string;\n};\n\nexport type LinkValue = {\n text?: string;\n url: string;\n};\n\nexport type Document = {\n type: string; // passport, driving_license, ...\n displayName: string;\n file: AttachmentValue;\n};\n\nexport type AttachmentValue = {\n contentType: string;\n fileName: string;\n id: string;\n previewSrc?: string;\n size: number;\n uploadedAt: string;\n uploadedBy: string;\n url: string;\n descriptions?: string | MultiLangValue;\n};\n\n/** One row of `public.vatlayer_logs`: our reading of a VIES answer next to the answer itself. */\nexport type VatLayerResponseLog = {\n response: VatLayerResponse;\n raw: any;\n};\n\n/**\n * A VIES answer about a VAT number. The name dates from the vatlayer proxy that relayed VIES\n * answers until September 2026; the shape is unchanged. `formatValid` is absent when the number\n * carries no EU member state prefix, so no format applies. `viesStatus: 'failure'` means VIES\n * could not be reached and the other fields, if any, repeat the last logged answer.\n */\nexport type VatLayerResponse = {\n vatNumber: string;\n viesStatus: 'ok' | 'failure';\n} & (\n | { formatValid?: boolean; viesValid: false; validAt?: undefined; countryCode?: string }\n | {\n formatValid: true;\n viesValid: boolean;\n validAt: string;\n countryCode: string;\n name: string;\n addressLines: string[];\n /** VIES's proof of this check, issued only when we identified ourselves as requester. */\n consultationNumber?: string;\n /** Our VAT number the check was consulted under, when it was. */\n requesterVatNumber?: string;\n }\n);\n\nexport type VatValidationResponse = {\n vatNumber: string;\n formatValid?: boolean;\n viesStatus: 'ok' | 'failure';\n countryCode?: string;\n} & (\n | { viesValid: false; validAt?: undefined }\n | {\n viesValid: true;\n validAt: string;\n name?: string;\n normalizedAddress?: LocationValue;\n officialAddress?: string[];\n }\n);\n\nexport type VatValidationRequest = {\n defaultCountry?: string;\n input: string;\n cacheDays?: number;\n /** Branch the check is made for. Its VAT number, if European, is sent to VIES as requester. */\n branchId?: string;\n};\n\nexport type CurrencyListResponse = {\n currencies: Record<string, { label: string }>;\n};\n\nexport type CurrencyConversionRequest = {\n sourceCurrency: string;\n targetCurrency?: string;\n};\n\nexport type DefaultVatRateRequest = {\n branchId?: string;\n organizationId?: string;\n};\n\nexport type DefaultVatRateResponse = {\n defaultVatRate: string;\n};\n\nexport type CurrencyConversionResponse = {\n sourceCurrency: string;\n rates: Record<string, string>;\n};\n\nexport enum TransactionType {\n sale = 'sale',\n purchase = 'purchase',\n}\n\nexport type ShareEmailRequest = {\n country: string; // Lowercase ISO 3166-1 alpha-2 code, e.g. 'be'\n destinations: EmailDestination[];\n message: string;\n subject: string;\n attachments?: AttachmentValue[];\n headers?: Record<string, string>;\n};\n\nexport type WhatsAppContact = {\n phone: PhoneNumberValue | PhoneNumberRawValue;\n name?: string;\n /**\n * Any language the sending flow's template is approved in — both share flows validate against\n * the tenant's catalogue at send time.\n */\n language: string;\n};\n\nexport type ShareWhatsappRequest = {\n contacts: WhatsAppContact[];\n};\n\nexport type DistributiveOmit<T, K extends PropertyKey> = T extends any ? Omit<T, K> : never;\n\nexport type ChangeRecord = {\n oldValue?: any;\n newValue?: any;\n modifiedBy?: string;\n modifiedAt: string;\n};\n\nexport type LinkWebsiteUserRequest = {\n tenantId: string;\n websiteUserId: string;\n email: string;\n vatNumber: string;\n};\n\nexport type DeleteWebsiteContactLinkRequest = {\n tenantId: string;\n websiteUserId: string;\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bisondesk/commons-sdk",
3
- "version": "1.0.677",
3
+ "version": "1.0.678",
4
4
  "type": "module",
5
5
  "dependencies": {
6
6
  "@date-fns/utc": "2.1.1",
@@ -0,0 +1,11 @@
1
+ /**
2
+ * What a transfer needs to name one side of the payment: the account number, the bank's BIC when
3
+ * known, and the account holder's name as the bank knows it. In a SEPA file the account number is
4
+ * an IBAN. Shared by the organisation bank account, the frozen payment export line and the debtor
5
+ * and creditor blocks of the SEPA file.
6
+ */
7
+ export type BankAccountDetails = {
8
+ accountNumber: string;
9
+ bic?: string;
10
+ holderName: string;
11
+ };
package/src/constants.ts CHANGED
@@ -73,6 +73,13 @@ export enum TopLevelActions {
73
73
  ManageStocklists = 'stocklists:manage',
74
74
  TransportsBrowse = 'transports:browse',
75
75
  TransportsManage = 'transports:manage',
76
+ ReorderPurchasePayments = 'vehicles:purchase-payments:reorder',
77
+ SendPurchasePaymentsToProcessing = 'vehicles:purchase-payments:send-to-processing',
78
+ EditPurchaseInvoiceDueDate = 'vehicles:purchase-payments:due-date',
79
+ ExportPurchasePayments = 'vehicles:purchase-payments:export',
80
+ CancelPurchasePayment = 'vehicles:purchase-payments:cancel',
81
+ ManageOrganizationBankAccount = 'crm:orgs:bank-account:manage',
82
+ VerifyOrganizationBankAccount = 'crm:orgs:bank-account:verify',
76
83
  }
77
84
 
78
85
  //
@@ -138,6 +145,7 @@ export enum BusinessEntityIds {
138
145
  Prospects = 'prospects',
139
146
  Stocklists = 'stocklists',
140
147
  Transports = 'transports',
148
+ PaymentExports = 'payment_exports',
141
149
  }
142
150
 
143
151
  //
@@ -0,0 +1,30 @@
1
+ import { isValidIban, normalizeIban } from './iban.js';
2
+
3
+ describe('normalizeIban', () => {
4
+ test('strips spaces and upper-cases', () => {
5
+ expect(normalizeIban('be76 0689 0799 4795')).toBe('BE76068907994795');
6
+ });
7
+ });
8
+
9
+ describe('isValidIban', () => {
10
+ test.each([
11
+ ['BE76 0689 0799 4795', true], // TheTruckCompany debtor account
12
+ ['BE84068236789959', true], // example file debtor
13
+ ['BE57736064958035', true], // example file creditor
14
+ ['NL92INGB0671129821', true], // example file NL creditor
15
+ ['NL26BNPA0227715233', true],
16
+ ['GB82WEST12345698765432', true],
17
+ ])('accepts a valid IBAN %s', (iban, expected) => {
18
+ expect(isValidIban(iban)).toBe(expected);
19
+ });
20
+
21
+ test.each([
22
+ ['BE76 0689 0799 4796', false], // last digit changed — checksum fails
23
+ ['BE00068236789959', false], // wrong check digits
24
+ ['', false],
25
+ ['NOTANIBAN', false],
26
+ ['BE7', false], // too short
27
+ ])('rejects an invalid IBAN %s', (iban, expected) => {
28
+ expect(isValidIban(iban)).toBe(expected);
29
+ });
30
+ });
package/src/iban.ts ADDED
@@ -0,0 +1,22 @@
1
+ /** Strips spaces and upper-cases an IBAN into its canonical, storable form. */
2
+ export const normalizeIban = (raw: string): string => raw.replace(/\s+/g, '').toUpperCase();
3
+
4
+ /**
5
+ * Validates an IBAN's structure and its mod-97 checksum. A passing checksum means the number is
6
+ * well-formed — it is never proof of who holds the account, which stays a manual verification step.
7
+ */
8
+ export const isValidIban = (raw: string): boolean => {
9
+ const iban = normalizeIban(raw);
10
+ if (!/^[A-Z]{2}[0-9]{2}[A-Z0-9]{10,30}$/.test(iban)) {
11
+ return false;
12
+ }
13
+
14
+ const rearranged = iban.slice(4) + iban.slice(0, 4);
15
+ const numeric = rearranged.replace(/[A-Z]/g, (ch) => (ch.charCodeAt(0) - 55).toString());
16
+
17
+ let remainder = 0;
18
+ for (let i = 0; i < numeric.length; i += 7) {
19
+ remainder = Number(`${remainder}${numeric.slice(i, i + 7)}`) % 97;
20
+ }
21
+ return remainder === 1;
22
+ };
package/src/money.ts CHANGED
@@ -41,16 +41,6 @@ export const roundMoney = (currency: string = 'EUR', value: Decimal | string): D
41
41
  return new Decimal(value).toDecimalPlaces(settings.decimalPlaces, settings.roundingMethod);
42
42
  };
43
43
 
44
- /**
45
- * The branch currency value of an amount in another currency. `exchangeRate` is in branch currency
46
- * units per 1 unit of the other currency, the direction of every `foreign` block.
47
- */
48
- export const getBranchAmountFromForeign = (
49
- branchCurrency: string | undefined,
50
- foreignAmount: Decimal.Value,
51
- exchangeRate: Decimal.Value,
52
- ): string => roundMoney(branchCurrency, new Decimal(foreignAmount).mul(exchangeRate)).toString();
53
-
54
44
  // We tolerate a 10 cent rounding difference
55
45
  export const isAmountWithinToleranceSame = (
56
46
  currency: string = 'EUR',
package/src/types.ts CHANGED
@@ -170,13 +170,6 @@ export type CurrencyListResponse = {
170
170
  export type CurrencyConversionRequest = {
171
171
  sourceCurrency: string;
172
172
  targetCurrency?: string;
173
- /** yyyy-MM-dd. The rates of that day. Absent = yesterday's rates. */
174
- date?: string;
175
- /**
176
- * Lower the rate by the bank's conversion fee, so a customer pays that fee in the foreign
177
- * amount. Absent = true. A purchase price or a supplier invoice asks for the plain rate.
178
- */
179
- bankFeeMarkup?: boolean;
180
173
  };
181
174
 
182
175
  export type DefaultVatRateRequest = {