@bisondesk/core-sdk 1.0.677 → 1.0.679

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 (159) hide show
  1. package/lib/apis/exchange-rates.d.ts +0 -3
  2. package/lib/apis/exchange-rates.d.ts.map +1 -1
  3. package/lib/apis/exchange-rates.js +0 -29
  4. package/lib/apis/exchange-rates.js.map +1 -1
  5. package/lib/apis/organization-bank-accounts.d.ts +11 -0
  6. package/lib/apis/organization-bank-accounts.d.ts.map +1 -0
  7. package/lib/apis/organization-bank-accounts.js +47 -0
  8. package/lib/apis/organization-bank-accounts.js.map +1 -0
  9. package/lib/types/intercompany-payments.d.ts.map +1 -1
  10. package/lib/types/intercompany-payments.js.map +1 -1
  11. package/lib/types/offers.d.ts +1 -2
  12. package/lib/types/offers.d.ts.map +1 -1
  13. package/lib/types/offers.js.map +1 -1
  14. package/lib/types/opportunities.d.ts +1 -8
  15. package/lib/types/opportunities.d.ts.map +1 -1
  16. package/lib/types/opportunities.js.map +1 -1
  17. package/lib/types/opportunity-payments.d.ts +0 -9
  18. package/lib/types/opportunity-payments.d.ts.map +1 -1
  19. package/lib/types/opportunity-payments.js.map +1 -1
  20. package/lib/types/organization-bank-accounts.d.ts +35 -0
  21. package/lib/types/organization-bank-accounts.d.ts.map +1 -0
  22. package/lib/types/organization-bank-accounts.js +9 -0
  23. package/lib/types/organization-bank-accounts.js.map +1 -0
  24. package/lib/types/payment-exports.d.ts +23 -0
  25. package/lib/types/payment-exports.d.ts.map +1 -0
  26. package/lib/types/payment-exports.js +2 -0
  27. package/lib/types/payment-exports.js.map +1 -0
  28. package/lib/types/tenants.d.ts +1 -1
  29. package/lib/types/tenants.d.ts.map +1 -1
  30. package/lib/types/tenants.js +1 -0
  31. package/lib/types/tenants.js.map +1 -1
  32. package/lib/types/transports.d.ts +1 -1
  33. package/lib/types/transports.d.ts.map +1 -1
  34. package/lib/types/transports.js +1 -1
  35. package/lib/types/transports.js.map +1 -1
  36. package/lib/types/vehicle-purchase-payments.d.ts +52 -8
  37. package/lib/types/vehicle-purchase-payments.d.ts.map +1 -1
  38. package/lib/types/vehicle-purchase-payments.js +6 -0
  39. package/lib/types/vehicle-purchase-payments.js.map +1 -1
  40. package/lib/types/vehicles.d.ts +1 -7
  41. package/lib/types/vehicles.d.ts.map +1 -1
  42. package/lib/types/vehicles.js.map +1 -1
  43. package/lib/utils/organization-bank-accounts.d.ts +3 -0
  44. package/lib/utils/organization-bank-accounts.d.ts.map +1 -0
  45. package/lib/utils/organization-bank-accounts.js +9 -0
  46. package/lib/utils/organization-bank-accounts.js.map +1 -0
  47. package/lib/utils/tenants.d.ts +0 -3
  48. package/lib/utils/tenants.d.ts.map +1 -1
  49. package/lib/utils/tenants.js +0 -3
  50. package/lib/utils/tenants.js.map +1 -1
  51. package/lib/utils/tenants.test.js +1 -27
  52. package/lib/utils/tenants.test.js.map +1 -1
  53. package/lib/utils/transports.d.ts +8 -4
  54. package/lib/utils/transports.d.ts.map +1 -1
  55. package/lib/utils/transports.js +13 -7
  56. package/lib/utils/transports.js.map +1 -1
  57. package/lib/utils/transports.test.d.ts +2 -0
  58. package/lib/utils/transports.test.d.ts.map +1 -0
  59. package/lib/utils/transports.test.js +40 -0
  60. package/lib/utils/transports.test.js.map +1 -0
  61. package/package.json +1 -1
  62. package/src/apis/exchange-rates.ts +0 -49
  63. package/src/apis/organization-bank-accounts.ts +123 -0
  64. package/src/types/intercompany-payments.ts +3 -4
  65. package/src/types/offers.ts +0 -2
  66. package/src/types/opportunities.ts +1 -15
  67. package/src/types/opportunity-payments.ts +0 -23
  68. package/src/types/organization-bank-accounts.ts +56 -0
  69. package/src/types/payment-exports.ts +40 -0
  70. package/src/types/tenants.ts +7 -6
  71. package/src/types/transports.ts +1 -1
  72. package/src/types/vehicle-purchase-payments.ts +114 -13
  73. package/src/types/vehicles.ts +4 -15
  74. package/src/utils/organization-bank-accounts.ts +19 -0
  75. package/src/utils/tenants.test.ts +1 -39
  76. package/src/utils/tenants.ts +0 -17
  77. package/src/utils/transports.test.ts +50 -0
  78. package/src/utils/transports.ts +39 -22
  79. package/tsconfig.tsbuildinfo +1 -1
  80. package/lib/utils/opportunity-payments.d.ts +0 -3
  81. package/lib/utils/opportunity-payments.d.ts.map +0 -1
  82. package/lib/utils/opportunity-payments.js +0 -5
  83. package/lib/utils/opportunity-payments.js.map +0 -1
  84. package/lib/utils/opportunity-payments.test.d.ts +0 -2
  85. package/lib/utils/opportunity-payments.test.d.ts.map +0 -1
  86. package/lib/utils/opportunity-payments.test.js +0 -23
  87. package/lib/utils/opportunity-payments.test.js.map +0 -1
  88. package/src/types/activities.js +0 -13
  89. package/src/types/activities.js.map +0 -1
  90. package/src/types/comparables.js +0 -2
  91. package/src/types/comparables.js.map +0 -1
  92. package/src/types/crm.js +0 -58
  93. package/src/types/crm.js.map +0 -1
  94. package/src/types/dashboard.js +0 -2
  95. package/src/types/dashboard.js.map +0 -1
  96. package/src/types/definitions.js +0 -2
  97. package/src/types/definitions.js.map +0 -1
  98. package/src/types/fields.js +0 -2
  99. package/src/types/fields.js.map +0 -1
  100. package/src/types/insights.js +0 -2
  101. package/src/types/insights.js.map +0 -1
  102. package/src/types/interests.js +0 -6
  103. package/src/types/interests.js.map +0 -1
  104. package/src/types/internal-events.js +0 -18
  105. package/src/types/internal-events.js.map +0 -1
  106. package/src/types/internet-opportunities.js +0 -2
  107. package/src/types/internet-opportunities.js.map +0 -1
  108. package/src/types/internet-vehicles.js +0 -2
  109. package/src/types/internet-vehicles.js.map +0 -1
  110. package/src/types/leasing-administration.js +0 -2
  111. package/src/types/leasing-administration.js.map +0 -1
  112. package/src/types/leasing-debtors.js +0 -2
  113. package/src/types/leasing-debtors.js.map +0 -1
  114. package/src/types/leasing-search.js +0 -2
  115. package/src/types/leasing-search.js.map +0 -1
  116. package/src/types/leasing-settings.js +0 -7
  117. package/src/types/leasing-settings.js.map +0 -1
  118. package/src/types/leasing.js +0 -38
  119. package/src/types/leasing.js.map +0 -1
  120. package/src/types/marketing.js +0 -35
  121. package/src/types/marketing.js.map +0 -1
  122. package/src/types/offers.js +0 -56
  123. package/src/types/opportunities.js +0 -107
  124. package/src/types/opportunities.js.map +0 -1
  125. package/src/types/payments.js +0 -7
  126. package/src/types/picklists.js +0 -2
  127. package/src/types/picklists.js.map +0 -1
  128. package/src/types/quotes.js +0 -42
  129. package/src/types/recently-viewed.js +0 -2
  130. package/src/types/recently-viewed.js.map +0 -1
  131. package/src/types/reservations.js +0 -5
  132. package/src/types/reservations.js.map +0 -1
  133. package/src/types/roi-ratings.js +0 -5
  134. package/src/types/roi-ratings.js.map +0 -1
  135. package/src/types/saved-filters.js +0 -9
  136. package/src/types/saved-filters.js.map +0 -1
  137. package/src/types/search.js +0 -2
  138. package/src/types/search.js.map +0 -1
  139. package/src/types/settings.js +0 -2
  140. package/src/types/settings.js.map +0 -1
  141. package/src/types/templates.js +0 -2
  142. package/src/types/templates.js.map +0 -1
  143. package/src/types/tenants.js +0 -21
  144. package/src/types/tenants.js.map +0 -1
  145. package/src/types/user-performance.js +0 -7
  146. package/src/types/user-performance.js.map +0 -1
  147. package/src/types/utils.js +0 -2
  148. package/src/types/validation.js +0 -2
  149. package/src/types/validation.js.map +0 -1
  150. package/src/types/vehicle-sales.js +0 -6
  151. package/src/types/vehicle-sales.js.map +0 -1
  152. package/src/types/vehicles.js +0 -98
  153. package/src/types/vehicles.js.map +0 -1
  154. package/src/utils/leasing.js +0 -6
  155. package/src/utils/leasing.js.map +0 -1
  156. package/src/utils/opportunities.js +0 -48
  157. package/src/utils/opportunities.js.map +0 -1
  158. package/src/utils/opportunity-payments.test.ts +0 -31
  159. package/src/utils/opportunity-payments.ts +0 -15
@@ -4,12 +4,6 @@ export declare enum OpportunityPaymentActions {
4
4
  EDIT = "edit"
5
5
  }
6
6
  export declare const OPPORTUNITY_PAYMENT_NOTIFICATION_ORIGIN = "opportunity-payment-notification";
7
- export type OpportunityPaymentForeign = {
8
- amount: string;
9
- currencyCode: string;
10
- exchangeRate: string;
11
- };
12
- export type OpportunityPaymentForeignRequest = Pick<OpportunityPaymentForeign, 'amount' | 'currencyCode'>;
13
7
  type BaseOpportunityPayment = {
14
8
  opportunityId: string;
15
9
  amount: string;
@@ -26,7 +20,6 @@ export type NewOpportunityPayment = BaseOpportunityPayment & {
26
20
  deletedAt?: undefined;
27
21
  deletedBy?: undefined;
28
22
  paidAt: string;
29
- foreign?: OpportunityPaymentForeignRequest;
30
23
  };
31
24
  export type OpportunityPayment = BaseOpportunityPayment & {
32
25
  id: string;
@@ -37,12 +30,10 @@ export type OpportunityPayment = BaseOpportunityPayment & {
37
30
  deletedAt?: string;
38
31
  deletedBy?: string;
39
32
  paidAt?: string;
40
- foreign?: OpportunityPaymentForeign;
41
33
  };
42
34
  export type OpportunityPaymentUpdate = {
43
35
  description?: string;
44
36
  amount?: string;
45
- foreign?: OpportunityPaymentForeignRequest | null;
46
37
  paidAt?: string;
47
38
  };
48
39
  export type OpportunityPaymentCreateEvent = {
@@ -1 +1 @@
1
- {"version":3,"file":"opportunity-payments.d.ts","sourceRoot":"/","sources":["types/opportunity-payments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,oBAAY,yBAAyB;IACnC,MAAM,WAAW;IACjB,IAAI,SAAS;CACd;AAED,eAAO,MAAM,uCAAuC,qCAAqC,CAAC;AAM1F,MAAM,MAAM,yBAAyB,GAAG;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IAErB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAIF,MAAM,MAAM,gCAAgC,GAAG,IAAI,CACjD,yBAAyB,EACzB,QAAQ,GAAG,cAAc,CAC1B,CAAC;AAEF,KAAK,sBAAsB,GAAG;IAC5B,aAAa,EAAE,MAAM,CAAC;IAEtB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACr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EF,MAAM,MAAM,6BAA6B,GAAG;IAC1C,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,eAAe,EAAE,kBAAkB,CAAC;IACpC,MAAM,EAAE,QAAQ,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,SAAS,GAC7C,CAAC,6BAA6B,GAAG,6BAA6B,GAAG,6BAA6B,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"opportunity-payments.js","sourceRoot":"/","sources":["types/opportunity-payments.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,yBAGX;AAHD,WAAY,yBAAyB;IACnC,8CAAiB,CAAA;IACjB,0CAAa,CAAA;AACf,CAAC,EAHW,yBAAyB,KAAzB,yBAAyB,QAGpC;AAED,MAAM,CAAC,MAAM,uCAAuC,GAAG,kCAAkC,CAAC","sourcesContent":["import { BaseEvent } from './internal-events.js';\n\nexport enum OpportunityPaymentActions {\n DELETE = 'delete',\n EDIT = 'edit',\n}\n\nexport const OPPORTUNITY_PAYMENT_NOTIFICATION_ORIGIN = 'opportunity-payment-notification';\n\n/**\n * The money as it arrived, when it arrived in the quote's alternative currency. `amount` then\n * holds its value in branch currency: `foreign.amount × foreign.exchangeRate`.\n */\nexport type OpportunityPaymentForeign = {\n amount: string;\n currencyCode: string;\n /** Branch currency units per 1 unit of `currencyCode`, the quote's rate. */\n exchangeRate: string;\n};\n\n/** What a user sends for a payment in another currency. The backend takes the rate from the quote\n * and derives `amount`. */\nexport type OpportunityPaymentForeignRequest = Pick<\n OpportunityPaymentForeign,\n 'amount' | 'currencyCode'\n>;\n\ntype BaseOpportunityPayment = {\n opportunityId: string;\n /** Branch currency. */\n amount: string;\n description?: string;\n vehicleId: string;\n organizationId: string;\n};\n\nexport type NewOpportunityPayment = BaseOpportunityPayment & {\n id?: undefined;\n createdAt?: undefined;\n createdBy?: undefined;\n modifiedAt?: undefined;\n modifiedBy?: undefined;\n deletedAt?: undefined;\n deletedBy?: undefined;\n paidAt: string;\n foreign?: OpportunityPaymentForeignRequest;\n};\n\nexport type OpportunityPayment = BaseOpportunityPayment & {\n id: string;\n createdAt: string;\n createdBy: string;\n modifiedAt: string;\n modifiedBy: string;\n deletedAt?: string;\n deletedBy?: string;\n paidAt?: string;\n foreign?: OpportunityPaymentForeign;\n};\n\nexport type OpportunityPaymentUpdate = {\n description?: string;\n amount?: string;\n /** `null` turns the payment back into a branch currency payment. */\n foreign?: OpportunityPaymentForeignRequest | null;\n paidAt?: string;\n};\n\nexport type OpportunityPaymentCreateEvent = {\n payment: OpportunityPayment;\n previousPayment?: undefined;\n action: 'create';\n actionAt: string;\n userId: string;\n tenantId: string;\n branchId: string;\n};\n\nexport type OpportunityPaymentUpdateEvent = {\n payment: OpportunityPayment;\n previousPayment: OpportunityPayment;\n action: 'update';\n actionAt: string;\n userId: string;\n tenantId: string;\n branchId: string;\n};\n\nexport type OpportunityPaymentDeleteEvent = {\n payment?: undefined;\n previousPayment: OpportunityPayment;\n action: 'delete';\n actionAt: string;\n userId: string;\n tenantId: string;\n branchId: string;\n};\n\nexport type OpportunityPaymentEvent = BaseEvent &\n (OpportunityPaymentCreateEvent | OpportunityPaymentUpdateEvent | OpportunityPaymentDeleteEvent);\n"]}
1
+ {"version":3,"file":"opportunity-payments.js","sourceRoot":"/","sources":["types/opportunity-payments.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,yBAGX;AAHD,WAAY,yBAAyB;IACnC,8CAAiB,CAAA;IACjB,0CAAa,CAAA;AACf,CAAC,EAHW,yBAAyB,KAAzB,yBAAyB,QAGpC;AAED,MAAM,CAAC,MAAM,uCAAuC,GAAG,kCAAkC,CAAC","sourcesContent":["import { BaseEvent } from './internal-events.js';\n\nexport enum OpportunityPaymentActions {\n DELETE = 'delete',\n EDIT = 'edit',\n}\n\nexport const OPPORTUNITY_PAYMENT_NOTIFICATION_ORIGIN = 'opportunity-payment-notification';\n\ntype BaseOpportunityPayment = {\n opportunityId: string;\n amount: string;\n description?: string;\n vehicleId: string;\n organizationId: string;\n};\n\nexport type NewOpportunityPayment = BaseOpportunityPayment & {\n id?: undefined;\n createdAt?: undefined;\n createdBy?: undefined;\n modifiedAt?: undefined;\n modifiedBy?: undefined;\n deletedAt?: undefined;\n deletedBy?: undefined;\n paidAt: string;\n};\n\nexport type OpportunityPayment = BaseOpportunityPayment & {\n id: string;\n createdAt: string;\n createdBy: string;\n modifiedAt: string;\n modifiedBy: string;\n deletedAt?: string;\n deletedBy?: string;\n paidAt?: string;\n};\n\nexport type OpportunityPaymentUpdate = {\n description?: string;\n amount?: string;\n paidAt?: string;\n};\n\nexport type OpportunityPaymentCreateEvent = {\n payment: OpportunityPayment;\n previousPayment?: undefined;\n action: 'create';\n actionAt: string;\n userId: string;\n tenantId: string;\n branchId: string;\n};\n\nexport type OpportunityPaymentUpdateEvent = {\n payment: OpportunityPayment;\n previousPayment: OpportunityPayment;\n action: 'update';\n actionAt: string;\n userId: string;\n tenantId: string;\n branchId: string;\n};\n\nexport type OpportunityPaymentDeleteEvent = {\n payment?: undefined;\n previousPayment: OpportunityPayment;\n action: 'delete';\n actionAt: string;\n userId: string;\n tenantId: string;\n branchId: string;\n};\n\nexport type OpportunityPaymentEvent = BaseEvent &\n (OpportunityPaymentCreateEvent | OpportunityPaymentUpdateEvent | OpportunityPaymentDeleteEvent);\n"]}
@@ -0,0 +1,35 @@
1
+ import { BankAccountDetails } from '@bisondesk/commons-sdk/bank-accounts';
2
+ export type OrganizationBankAccountVerification = {
3
+ accountNumber: string;
4
+ verifiedBy: string;
5
+ verifiedAt: string;
6
+ };
7
+ export declare enum OrganizationBankAccountActions {
8
+ VERIFY = "verify"
9
+ }
10
+ export declare enum OrganizationBankAccountActionBlockerCode {
11
+ CHANGED_NEEDS_VERIFICATION = "changed_needs_verification"
12
+ }
13
+ export type OrganizationBankAccountActionBlocker = {
14
+ code: OrganizationBankAccountActionBlockerCode;
15
+ };
16
+ export type OrganizationBankAccountBlockedAction = {
17
+ action: OrganizationBankAccountActions;
18
+ reasons: OrganizationBankAccountActionBlocker[];
19
+ };
20
+ export type OrganizationBankAccountMeta = {
21
+ blockedActions: OrganizationBankAccountBlockedAction[];
22
+ };
23
+ export type NewOrganizationBankAccount = BankAccountDetails & {
24
+ organizationId: string;
25
+ };
26
+ export type OrganizationBankAccount = NewOrganizationBankAccount & {
27
+ id: string;
28
+ default?: boolean;
29
+ createdAt: string;
30
+ createdBy: string;
31
+ modifiedAt: string;
32
+ modifiedBy: string;
33
+ verification?: OrganizationBankAccountVerification;
34
+ };
35
+ //# sourceMappingURL=organization-bank-accounts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organization-bank-accounts.d.ts","sourceRoot":"/","sources":["types/organization-bank-accounts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAM1E,MAAM,MAAM,mCAAmC,GAAG;IAChD,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,oBAAY,8BAA8B;IACxC,MAAM,WAAW;CAClB;AAED,oBAAY,wCAAwC;IAClD,0BAA0B,+BAA+B;CAC1D;AAED,MAAM,MAAM,oCAAoC,GAAG;IACjD,IAAI,EAAE,wCAAwC,CAAC;CAChD,CAAC;AAMF,MAAM,MAAM,oCAAoC,GAAG;IACjD,MAAM,EAAE,8BAA8B,CAAC;IACvC,OAAO,EAAE,oCAAoC,EAAE,CAAC;CACjD,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACxC,cAAc,EAAE,oCAAoC,EAAE,CAAC;CACxD,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG,kBAAkB,GAAG;IAC5D,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAQF,MAAM,MAAM,uBAAuB,GAAG,0BAA0B,GAAG;IACjE,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,mCAAmC,CAAC;CACpD,CAAC"}
@@ -0,0 +1,9 @@
1
+ export var OrganizationBankAccountActions;
2
+ (function (OrganizationBankAccountActions) {
3
+ OrganizationBankAccountActions["VERIFY"] = "verify";
4
+ })(OrganizationBankAccountActions || (OrganizationBankAccountActions = {}));
5
+ export var OrganizationBankAccountActionBlockerCode;
6
+ (function (OrganizationBankAccountActionBlockerCode) {
7
+ OrganizationBankAccountActionBlockerCode["CHANGED_NEEDS_VERIFICATION"] = "changed_needs_verification";
8
+ })(OrganizationBankAccountActionBlockerCode || (OrganizationBankAccountActionBlockerCode = {}));
9
+ //# sourceMappingURL=organization-bank-accounts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organization-bank-accounts.js","sourceRoot":"/","sources":["types/organization-bank-accounts.ts"],"names":[],"mappings":"AAYA,MAAM,CAAN,IAAY,8BAEX;AAFD,WAAY,8BAA8B;IACxC,mDAAiB,CAAA;AACnB,CAAC,EAFW,8BAA8B,KAA9B,8BAA8B,QAEzC;AAED,MAAM,CAAN,IAAY,wCAEX;AAFD,WAAY,wCAAwC;IAClD,qGAAyD,CAAA;AAC3D,CAAC,EAFW,wCAAwC,KAAxC,wCAAwC,QAEnD","sourcesContent":["import { BankAccountDetails } from '@bisondesk/commons-sdk/bank-accounts';\n\n/**\n * An accountant's confirmation of one account number. It only counts while the account still\n * holds that number, so trust never carries over to a new number however the account was edited.\n */\nexport type OrganizationBankAccountVerification = {\n accountNumber: string;\n verifiedBy: string;\n verifiedAt: string;\n};\n\nexport enum OrganizationBankAccountActions {\n VERIFY = 'verify',\n}\n\nexport enum OrganizationBankAccountActionBlockerCode {\n CHANGED_NEEDS_VERIFICATION = 'changed_needs_verification',\n}\n\nexport type OrganizationBankAccountActionBlocker = {\n code: OrganizationBankAccountActionBlockerCode;\n};\n\n/**\n * Why an action the user would otherwise see is refused right now. A missing permission hides the\n * action instead.\n */\nexport type OrganizationBankAccountBlockedAction = {\n action: OrganizationBankAccountActions;\n reasons: OrganizationBankAccountActionBlocker[];\n};\n\nexport type OrganizationBankAccountMeta = {\n blockedActions: OrganizationBankAccountBlockedAction[];\n};\n\nexport type NewOrganizationBankAccount = BankAccountDetails & {\n organizationId: string;\n};\n\n/**\n * An organisation's bank account for outgoing SEPA transfers, never shared across companies. An\n * organisation can hold several; at most one is its `default`, the one payment exports pay to.\n * Editing the account number or holder name clears the manual verification, so a valid checksum is\n * never mistaken for a confirmed account holder.\n */\nexport type OrganizationBankAccount = NewOrganizationBankAccount & {\n id: string;\n default?: boolean;\n createdAt: string;\n createdBy: string;\n modifiedAt: string;\n modifiedBy: string;\n verification?: OrganizationBankAccountVerification;\n};\n"]}
@@ -0,0 +1,23 @@
1
+ import { BankAccountDetails } from '@bisondesk/commons-sdk/bank-accounts';
2
+ import { AttachmentValue } from '@bisondesk/commons-sdk/types';
3
+ export type PaymentExportLine = {
4
+ paymentId: string;
5
+ vehicleId: string;
6
+ amount: string;
7
+ creditor: BankAccountDetails;
8
+ paymentBatchId: string;
9
+ transferReference?: string;
10
+ };
11
+ export type NewPaymentExport = {
12
+ executionDate: string;
13
+ totalAmount: string;
14
+ paymentIds: string[];
15
+ lines: PaymentExportLine[];
16
+ xmlFile: AttachmentValue;
17
+ };
18
+ export type PaymentExport = NewPaymentExport & {
19
+ id: string;
20
+ exportedAt: string;
21
+ exportedBy: string;
22
+ };
23
+ //# sourceMappingURL=payment-exports.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payment-exports.d.ts","sourceRoot":"/","sources":["types/payment-exports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAS/D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAE7B,aAAa,EAAE,MAAM,CAAC;IAEtB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAE3B,OAAO,EAAE,eAAe,CAAC;CAC1B,CAAC;AAOF,MAAM,MAAM,aAAa,GAAG,gBAAgB,GAAG;IAC7C,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=payment-exports.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payment-exports.js","sourceRoot":"/","sources":["types/payment-exports.ts"],"names":[],"mappings":"","sourcesContent":["import { BankAccountDetails } from '@bisondesk/commons-sdk/bank-accounts';\nimport { AttachmentValue } from '@bisondesk/commons-sdk/types';\n\n/**\n * The transfer details of one payment, frozen at export time. A later edit to the payment or the\n * supplier bank account must not rewrite what the sent file said, so the export keeps its own copy\n * of every value that went into the XML. It also records the payment batch the payment was sent to\n * processing in, so the export is a self-contained audit record even though one file can span\n * several batches.\n */\nexport type PaymentExportLine = {\n paymentId: string;\n vehicleId: string;\n amount: string;\n creditor: BankAccountDetails;\n paymentBatchId: string;\n transferReference?: string;\n};\n\nexport type NewPaymentExport = {\n /** Single execution date (`yyyy-MM-dd`) written to the file's `ReqdExctnDt`. */\n executionDate: string;\n /** Σ of the exported line amounts (string; computed with decimal arithmetic). */\n totalAmount: string;\n paymentIds: string[];\n lines: PaymentExportLine[];\n /** The generated SEPA file, stored in S3 and re-downloadable from Processing. */\n xmlFile: AttachmentValue;\n};\n\n/**\n * A generated SEPA file for a selection of Processing payments, plus the frozen record of exactly what\n * was sent. Re-downloading serves the same file and never re-exports; a payment cancelled out of the\n * file returns to Allowed and leaves this record intact.\n */\nexport type PaymentExport = NewPaymentExport & {\n id: string;\n exportedAt: string;\n exportedBy: string;\n};\n"]}
@@ -25,6 +25,7 @@ export declare enum TenantModule {
25
25
  Intercompany = "intercompany",
26
26
  Opportunities = "opportunities",
27
27
  Offers = "offers",
28
+ PaymentExports = "payment_exports",
28
29
  Vehicles = "vehicles",
29
30
  Tasks = "tasks",
30
31
  TrackAndTrace = "track_and_trace",
@@ -86,7 +87,6 @@ export type Branch = {
86
87
  exactAccounting?: boolean;
87
88
  accounting?: AccountingProvider;
88
89
  currency: string;
89
- paymentCurrencies?: [string, ...string[]];
90
90
  adminNumberPrefix: string;
91
91
  stockNumberPrefix: string;
92
92
  vatNumber: string;
@@ -1 +1 @@
1
- {"version":3,"file":"tenants.d.ts","sourceRoot":"/","sources":["types/tenants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,MAAM,YAAY,GAAG;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC;CAInC,CA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O,CAAC;IAStB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAI/B,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAUF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,YAAY,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,WAAW,CAAC;CACtB,CAAC"}
@@ -15,6 +15,7 @@ export var TenantModule;
15
15
  TenantModule["Intercompany"] = "intercompany";
16
16
  TenantModule["Opportunities"] = "opportunities";
17
17
  TenantModule["Offers"] = "offers";
18
+ TenantModule["PaymentExports"] = "payment_exports";
18
19
  TenantModule["Vehicles"] = "vehicles";
19
20
  TenantModule["Tasks"] = "tasks";
20
21
  TenantModule["TrackAndTrace"] = "track_and_trace";
@@ -1 +1 @@
1
- {"version":3,"file":"tenants.js","sourceRoot":"/","sources":["types/tenants.ts"],"names":[],"mappings":"AAgBA,MAAM,CAAN,IAAY,YAyDX;AAzDD,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;IACjB,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,EAzDW,YAAY,KAAZ,YAAY,QAyDvB;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 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"]}
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"]}
@@ -197,7 +197,7 @@ export type SearchTransport = {
197
197
  };
198
198
  };
199
199
  export type SearchTransportList = PaginatedList<SearchTransport, ReferenceData>;
200
- export declare const KANBAN_TRANSPORT_ITEM_FIELDS: readonly ["transport", "custom.commercialUserIds", "custom.warnings", "custom.payment", "custom.intercompany", "tasks.openTasks", "org.id", "org.name", "org.countryCode", "org.externalId", "opportunity.deliveredAt", "purchase.logistics.status", "purchase.logistics.availableWeek", "purchase.logistics.pickupAddress", "vehicle.id", "vehicle.internal.identification.stockNumber", "vehicle.internal.identification.administrativeNumber", "vehicle.internal.identification.branch", "vehicle.internal.description.title", "vehicle.external.identification.stockNumber", "vehicle.external.identification.vin", "vehicle.external.mainPicture.url", "vehicle.external.condition.damaged", "vehicle.external.general.category"];
200
+ export declare const KANBAN_TRANSPORT_ITEM_FIELDS: readonly ["transport", "custom.commercialUserIds", "custom.warnings", "custom.payment", "custom.intercompany", "tasks.openTasks", "org.id", "org.name", "org.countryCode", "org.externalId", "opportunity.branch", "purchase.logistics.status", "purchase.logistics.availableWeek", "purchase.logistics.pickupAddress", "vehicle.id", "vehicle.internal.identification.stockNumber", "vehicle.internal.identification.administrativeNumber", "vehicle.internal.identification.branch", "vehicle.internal.description.title", "vehicle.external.identification.stockNumber", "vehicle.external.identification.vin", "vehicle.external.mainPicture.url", "vehicle.external.condition.damaged", "vehicle.external.general.category"];
201
201
  export type KanbanTransportItem = PickFieldIds<SearchTransport, (typeof KANBAN_TRANSPORT_ITEM_FIELDS)[number]>;
202
202
  export type KanbanTransportGroup = {
203
203
  representative: KanbanTransportItem;
@@ -1 +1 @@
1
- {"version":3,"file":"transports.d.ts","sourceRoot":"/","sources":["types/transports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAW,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAClF,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEzD,oBAAY,aAAa;IACvB,QAAQ,aAAa;IACrB,IAAI,SAAS;CACd;AAED,oBAAY,eAAe;IACzB,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,iBAAiB,uBAAuB;IACxC,eAAe,qBAAqB;IACpC,WAAW,iBAAiB;IAC5B,IAAI,SAAS;CACd;AAED,eAAO,MAAM,oBAAoB,EAAE,eAAe,EAOjD,CAAC;AAEF,eAAO,MAAM,qBAAqB,uBAAuB,CAAC;AAE1D,eAAO,MAAM,yBAAyB,EAAE,eAAe,EAA4B,CAAC;AACpF,eAAO,MAAM,sBAAsB,EAAE,eAAe,EAGnD,CAAC;AAEF,oBAAY,iBAAiB;IAC3B,MAAM,WAAW;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9D,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IAChD,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC,eAAe,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,SAAS,CAAA;KAAE,EAAE,CAAC,CAAC;CACjF,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,IAAI,CACzC,QAAQ,CAAC,qBAAqB,EAAE,aAAa,CAAC,EAC9C,WAAW,CACZ,GAAG;IACF,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;CACjD,CAAC"}
@@ -91,7 +91,7 @@ export const KANBAN_TRANSPORT_ITEM_FIELDS = [
91
91
  'org.name',
92
92
  'org.countryCode',
93
93
  'org.externalId',
94
- 'opportunity.deliveredAt',
94
+ 'opportunity.branch',
95
95
  'purchase.logistics.status',
96
96
  'purchase.logistics.availableWeek',
97
97
  'purchase.logistics.pickupAddress',
@@ -1 +1 @@
1
- {"version":3,"file":"transports.js","sourceRoot":"/","sources":["types/transports.ts"],"names":[],"mappings":"AAEA,OAAO,EAKL,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;AAQzB,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,sCAAqB,CAAA;IACrB,8BAAa,CAAA;AACf,CAAC,EAHW,aAAa,KAAb,aAAa,QAGxB;AAED,MAAM,CAAN,IAAY,eAQX;AARD,WAAY,eAAe;IACzB,gCAAa,CAAA;IACb,wCAAqB,CAAA;IACrB,kCAAe,CAAA;IACf,2DAAwC,CAAA;IACxC,uDAAoC,CAAA;IACpC,+CAA4B,CAAA;IAC5B,gCAAa,CAAA;AACf,CAAC,EARW,eAAe,KAAf,eAAe,QAQ1B;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAsB;IACrD,eAAe,CAAC,IAAI;IACpB,eAA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;AACnC,CAAC,EAVW,gBAAgB,KAAhB,gBAAgB,QAU3B;AAyCD,MAAM,CAAN,IAAY,sBAOX;AAPD,WAAY,sBAAsB;IAChC,iEAAuC,CAAA;IACvC,kDAAwB,CAAA;IACxB,6EAAmD,CAAA;IACnD,uEAA6C,CAAA;IAC7C,qEAA2C,CAAA;IAC3C,+DAAqC,CAAA;AACvC,CAAC,EAPW,sBAAsB,KAAtB,sBAAsB,QAOjC;AAcD,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC;AAM1C,MAAM,CAAN,IAAY,mCAIX;AAJD,WAAY,mCAAmC;IAC7C,gDAAS,CAAA;IACT,8DAAuB,CAAA;IACvB,kDAAW,CAAA;AACb,CAAC,EAJW,mCAAmC,KAAnC,mCAAmC,QAI9C;AAGD,MAAM,CAAN,IAAY,uBAIX;AAJD,WAAY,uBAAuB;IACjC,+DAAoC,CAAA;IACpC,qDAA0B,CAAA;IAC1B,qDAA0B,CAAA;AAC5B,CAAC,EAJW,uBAAuB,KAAvB,uBAAuB,QAIlC;AAyDD,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,WAAW;IACX,0BAA0B;IAC1B,iBAAiB;IACjB,gBAAgB;IAChB,qBAAqB;IACrB,iBAAiB;IACjB,QAAQ;IACR,UAAU;IACV,iBAAiB;IACjB,gBAAgB;IAChB,yBAAyB;IACzB,2BAA2B;IAC3B,kCAAkC;IAClC,kCAAkC;IAClC,YAAY;IACZ,6CAA6C;IAC7C,sDAAsD;IACtD,wCAAwC;IACxC,oCAAoC;IACpC,6CAA6C;IAC7C,qCAAqC;IACrC,kCAAkC;IAClC,oCAAoC;IACpC,mCAAmC;CACmB,CAAC","sourcesContent":["import { GPSCoord, NextList, PaginatedList } from '@bisondesk/commons-sdk/types';\nimport { Organization } from './crm.js';\nimport {\n AddressDeliveryType,\n PickUpDeliveryType,\n PortDeliverytype,\n PurchaseDeliveryType,\n SalesDeliveryTypes,\n} from './deliveries.js';\nimport { BaseEvent } from './internal-events.js';\nimport { Opportunity, OpportunityPaymentStatus } from './opportunities.js';\nimport { PicklistValue } from './picklists.js';\nimport { BaseSearchRequest, FieldId, PickFieldIds, SortOrder } from './search.js';\nimport { DataRecord, ReferenceData } from './utils.js';\nimport { Vehicle, VehiclePurchase } from './vehicles.js';\n\nexport enum TransportType {\n Purchase = 'PURCHASE',\n Sale = 'SALE',\n}\n\nexport enum TransportStatus {\n Todo = 'TODO',\n Planning = 'PLANNING',\n Ready = 'READY',\n ScheduledExternal = 'SCHEDULED_EXTERNAL',\n OngoingInternal = 'ONGOING_INTERNAL',\n OngoingShip = 'ONGOING_SHIP',\n Done = 'DONE',\n}\n\nexport const TransportStatusOrder: TransportStatus[] = [\n TransportStatus.Todo,\n TransportStatus.Planning,\n TransportStatus.Ready,\n TransportStatus.ScheduledExternal,\n TransportStatus.OngoingInternal,\n TransportStatus.OngoingShip,\n];\n\nexport const TransportDoneColumnId = TransportStatus.Done;\n\nexport const TransportKanbanEndColumns: TransportStatus[] = [TransportDoneColumnId];\nexport const TransportKanbanColumns: TransportStatus[] = [\n ...TransportStatusOrder,\n ...TransportKanbanEndColumns,\n];\n\nexport enum TransportPriority {\n Normal = 'NORMAL',\n High = 'HIGH',\n Urgent = 'URGENT',\n}\n\n/**\n * The customer collects the vehicle. Nothing is driven anywhere, but the papers still have to be\n * arranged and paid for — transit plates, technical control, insurance — which is why it is a\n * delivery type administration reviews rather than the absence of one.\n *\n * `dateOfPickUpByCustomer` is dropped from the quote's shape: the transport's own `date` is the\n * collection day, and two fields for one date only ever disagree.\n */\nexport type TransportPickUpDeliveryType = Omit<PickUpDeliveryType, 'dateOfPickUpByCustomer'>;\n\n/** `meta` of a value in the TRANSPORT_DRIVERS_PICKLIST_ID picklist, edited as JSON by an admin. */\nexport type TransportDriverMeta = {\n phone?: string;\n employment?: 'employee' | 'flexi' | 'interim';\n /** The agency we book and pay this driver through; an organization in the driver's tenant. */\n agency?: { id: string; name: string };\n /** When the driver can't drive or what they can't take on, e.g. \"Not on Wednesdays\". */\n notes?: string;\n /** Hidden from the picker; transports that already name the driver keep showing them. */\n inactive?: boolean;\n};\n\nexport type TransportDriver = PicklistValue<TransportDriverMeta>;\n\nexport type TransportDeliveryExtras = {\n cleaningNeeded?: boolean;\n /** Value id in the TRANSPORT_DRIVERS_PICKLIST_ID picklist. */\n driver?: string;\n /** Own-use vehicles doing this transport, e.g. a tractor and its trailer. */\n fleetVehicleIds?: string[];\n /** Organizations we hire for this transport, listed by the TRANSPORT_PARTNER_ORG_TAG tag. */\n externalServiceOrgIds?: string[];\n transportCompany?: string;\n date?: string; // Pick-up (purchase) | Delivery (OPP) (leaves parking)\n adminCost?: string; // user-entered administrative cost summed into totalCostExclVat\n stackingVehicleCostPrice?: string; // overrides the stacking rate from the delivery settings\n};\n\nexport type TransportSalesDeliveryType = (\n | PortDeliverytype\n | AddressDeliveryType\n | TransportPickUpDeliveryType\n) &\n TransportDeliveryExtras;\n\nexport type TransportPurchaseDeliveryType = PurchaseDeliveryType & TransportDeliveryExtras;\n\n/** @deprecated Use SalesDeliveryTypes from ./deliveries.js. */\nexport const TransportSalesDeliveryType = {\n Address: SalesDeliveryTypes.ADDRESS,\n Port: SalesDeliveryTypes.PORT,\n PortAndShip: SalesDeliveryTypes.PORT_AND_SHIP,\n PickUp: SalesDeliveryTypes.PICK_UP,\n} as const;\n\nexport const TRANSPORT_CANCELED_NOTIFICATION_ORIGIN = 'transport-canceled';\nexport const TRANSPORT_QUOTE_DELIVERY_CHANGED_NOTIFICATION_ORIGIN =\n 'transport-quote-delivery-changed';\nexport const TRANSPORT_RESTORED_NOTIFICATION_ORIGIN = 'transport-restored';\n\nexport type Transport = {\n id: string;\n vehicleId: string;\n opportunityId?: string;\n /** Sale deliveries: the quote the transport's delivery follows. */\n quoteId?: string;\n /** A newer quote replaced the delivery. Cleared once someone marks the transport as checked. */\n quoteDeliveryChangedAt?: string;\n\n status: TransportStatus;\n priority: TransportPriority;\n\n // administrative fields\n adminApproved: boolean;\n adminApprovedAt?: string;\n adminApprovedBy?: string;\n transportWithoutPayment?: boolean;\n notes?: string;\n\n totals: {\n totalRetailAmountExclVat: string;\n totalCostExclVat: string;\n estimatedTotalCostExclVat?: string;\n };\n\n log: Array<{\n status: TransportStatus;\n completedAt: string;\n completedBy: string;\n }>;\n\n doneAt?: string;\n doneBy?: string;\n canceledAt?: string;\n canceledBy?: string;\n\n createdAt: string;\n createdBy: string;\n updatedAt: string;\n updatedBy: string;\n} & (\n | {\n type: TransportType.Purchase;\n delivery: TransportPurchaseDeliveryType;\n }\n | {\n type: TransportType.Sale;\n delivery: TransportSalesDeliveryType;\n }\n);\n\nexport enum TransportWarningCode {\n PurchaseLogisticsNotReady = 'purchase_logistics_not_ready',\n OpportunityInReview = 'opportunity_in_review',\n QuoteChanged = 'quote_changed',\n}\n\nexport type TransportWarning = {\n code: TransportWarningCode;\n details?: Record<string, string | number | boolean>;\n};\n\nexport type TransportCost = Pick<Transport, 'totals'>;\n\nexport type TransportRecord = DataRecord<Transport>;\n\n/**\n * What a requester may change on a transport, field group by field group. The server filters an\n * update through these and returns the ones granted on the record, so the drawer disables what the\n * user cannot touch instead of deciding for itself from the user's roles.\n */\nexport enum TransportActions {\n /** The route: addresses, ports, dates, costs. */\n SetDelivery = 'set_delivery',\n SetNotes = 'set_notes',\n /** The administrative sign-off, and the clearance to move before the payment. */\n SetApproval = 'set_approval',\n /** The board column. */\n SetStatus = 'set_status',\n SetPriority = 'set_priority',\n SetBookingRef = 'set_booking_ref',\n}\n\n/**\n * Every field a write may set, in one shape. `delivery` is replaced whole when it is sent — there is\n * no partial merge into the stored one — which is why `bookingRef` rides alongside as a scalar the\n * server writes into the delivery it ends up with.\n */\nexport type TransportUpdate = {\n delivery?: TransportSalesDeliveryType | TransportPurchaseDeliveryType;\n notes?: string | null;\n adminApproved?: boolean;\n transportWithoutPayment?: boolean;\n status?: TransportStatus;\n priority?: TransportPriority;\n bookingRef?: string | null;\n /** Someone checked the delivery a newer quote brought in; the quote_changed warning clears. */\n acknowledgeQuoteChange?: boolean;\n};\n\ntype BaseTransportEvent = {\n actionAt: string;\n userId: string;\n tenantId: string;\n transportId: string;\n};\n\nexport type TransportCreateEvent = BaseTransportEvent & {\n action: 'create';\n data: Transport;\n previousData?: undefined;\n};\n\nexport type TransportUpdateEvent = BaseTransportEvent & {\n action: 'update';\n data: Transport;\n previousData: Transport;\n};\n\n/** Published whenever a transport is written. Carries both sides so subscribers judge relevance. */\nexport type TransportEvent = BaseEvent & (TransportCreateEvent | TransportUpdateEvent);\n\nexport enum TransportPaymentStatus {\n PaymentNotNeeded = 'payment_not_needed',\n NoPayment = 'no_payment',\n PartialPaymentReceived = 'partial_payment_received',\n FullPaymentReceived = 'full_payment_received',\n PartialPaymentSent = 'partial_payment_sent',\n FullPaymentSent = 'full_payment_sent',\n}\n\n/**\n * Where the money stands on the record the transport serves: the customer's payments on the\n * opportunity for a sale delivery, ours to the supplier for a purchase pick-up. Denormalised at\n * indexing time so the board can show it without joining.\n */\nexport type TransportPayment = {\n status: OpportunityPaymentStatus;\n /** Only a sale delivery knows the ratio — a pick-up has milestones, not a running total. */\n percentagePaid?: string;\n};\n\n/** The `custom.driver` search value of a transport nobody drives yet. */\nexport const TRANSPORT_NO_DRIVER = 'none';\n\n/**\n * Whether a port delivery has its delivery instructions attached. `YesRecent` means the most recent\n * upload is less than one working day old.\n */\nexport enum TransportDeliveryInstructionsStatus {\n No = 'no',\n YesRecent = 'yesRecent',\n Yes = 'yes',\n}\n\n/** Which address the map pin came from, so the UI can tell an exact pin from an approximate one. */\nexport enum TransportLocationSource {\n DeliveryAddress = 'delivery_address',\n OriginPort = 'origin_port',\n OrgAddress = 'org_address',\n}\n\nexport type SearchTransport = {\n transport: Transport;\n vehicle: Vehicle;\n org: Organization;\n opportunity?: Opportunity;\n purchase: VehiclePurchase;\n tasks: {\n totalTasks: number;\n openTasks: number;\n nextDueAt?: string;\n };\n custom: {\n commercialUserIds: string[];\n warnings: TransportWarning[];\n priorityOrdinal: number;\n payment: TransportPayment;\n paymentStatus: TransportPaymentStatus;\n /**\n * Computed when the transport is indexed, so `YesRecent` only turns into `Yes` on the next\n * reindex. Only set for a port delivery.\n */\n deliveryInstructions?: TransportDeliveryInstructionsStatus;\n /**\n * The assigned driver's picklist value id, or TRANSPORT_NO_DRIVER, so \"no driver\" is a facet\n * value. Computed when the transport is indexed.\n */\n driver?: string;\n /**\n * Where the transport happens: the delivery address, or the origin port for a shipped delivery.\n * Denormalised into one field because the map clusters over a single geo_point, and a port\n * delivery carries no address of its own.\n *\n * Deliberately narrower than `GPSCoord`: a geo_point field rejects any key beyond lat/lon, so\n * the map zoom the coordinates picker stores must not reach the index.\n */\n location?: Pick<GPSCoord, 'lat' | 'lon'>;\n locationSource?: TransportLocationSource;\n /**\n * Set when the organization is one of the group's own branches. Names rather than ids: the\n * branch usually belongs to another tenant, which the client cannot look up.\n */\n intercompany?: {\n tenantName: string;\n branchName: string;\n };\n };\n};\n\nexport type SearchTransportList = PaginatedList<SearchTransport, ReferenceData>;\n\n/**\n * The fields of a transport that the kanban board reads: its cards, its drag and drop, and the\n * drawer a card opens. The kanban search returns only these, so a reader of a field outside this\n * list gets nothing.\n */\nexport const KANBAN_TRANSPORT_ITEM_FIELDS = [\n 'transport',\n 'custom.commercialUserIds',\n 'custom.warnings',\n 'custom.payment',\n 'custom.intercompany',\n 'tasks.openTasks',\n 'org.id',\n 'org.name',\n 'org.countryCode',\n 'org.externalId',\n 'opportunity.deliveredAt',\n 'purchase.logistics.status',\n 'purchase.logistics.availableWeek',\n 'purchase.logistics.pickupAddress',\n 'vehicle.id',\n 'vehicle.internal.identification.stockNumber',\n 'vehicle.internal.identification.administrativeNumber',\n 'vehicle.internal.identification.branch',\n 'vehicle.internal.description.title',\n 'vehicle.external.identification.stockNumber',\n 'vehicle.external.identification.vin',\n 'vehicle.external.mainPicture.url',\n 'vehicle.external.condition.damaged',\n 'vehicle.external.general.category',\n] as const satisfies readonly FieldId<SearchTransport>[];\n\n/** A transport on the kanban board: its search document cut down to what the board reads. */\nexport type KanbanTransportItem = PickFieldIds<\n SearchTransport,\n (typeof KANBAN_TRANSPORT_ITEM_FIELDS)[number]\n>;\n\nexport type KanbanTransportGroup = {\n representative: KanbanTransportItem;\n items: KanbanTransportItem[];\n totalCount: number;\n /** Pass in nextTokens for this column to load more transports from the organization. */\n nextToken?: string;\n};\n\nexport type TransportKanbanColumn = {\n status: TransportStatus;\n results: KanbanTransportItem[];\n groups?: KanbanTransportGroup[];\n totalCount: number;\n};\n\nexport type MSearchTransportsKanbanColumn = {\n column: TransportKanbanColumn;\n nextToken?: string;\n};\n\nexport type KanbanTransportsSearchRequest = BaseSearchRequest & {\n nextTokens?: Record<string, string | undefined>;\n groupByOrganization?: boolean;\n statusSortBy?: Record<TransportStatus, { fieldId: string; order: SortOrder }[]>;\n};\n\nexport type KanbanTransportsNextList = Omit<\n NextList<TransportKanbanColumn, ReferenceData>,\n 'nextToken'\n> & {\n nextTokens?: Record<string, string | undefined>;\n};\n"]}
1
+ {"version":3,"file":"transports.js","sourceRoot":"/","sources":["types/transports.ts"],"names":[],"mappings":"AAEA,OAAO,EAKL,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;AAQzB,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,sCAAqB,CAAA;IACrB,8BAAa,CAAA;AACf,CAAC,EAHW,aAAa,KAAb,aAAa,QAGxB;AAED,MAAM,CAAN,IAAY,eAQX;AARD,WAAY,eAAe;IACzB,gCAAa,CAAA;IACb,wCAAqB,CAAA;IACrB,kCAAe,CAAA;IACf,2DAAwC,CAAA;IACxC,uDAAoC,CAAA;IACpC,+CAA4B,CAAA;IAC5B,gCAAa,CAAA;AACf,CAAC,EARW,eAAe,KAAf,eAAe,QAQ1B;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAsB;IACrD,eAAe,CAAC,IAAI;IACpB,eAAe,CAAC,QAAQ;IACxB,eAAe,CAAC,KAAK;IACrB,e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3B;AAyCD,MAAM,CAAN,IAAY,sBAOX;AAPD,WAAY,sBAAsB;IAChC,iEAAuC,CAAA;IACvC,kDAAwB,CAAA;IACxB,6EAAmD,CAAA;IACnD,uEAA6C,CAAA;IAC7C,qEAA2C,CAAA;IAC3C,+DAAqC,CAAA;AACvC,CAAC,EAPW,sBAAsB,KAAtB,sBAAsB,QAOjC;AAcD,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC;AAM1C,MAAM,CAAN,IAAY,mCAIX;AAJD,WAAY,mCAAmC;IAC7C,gDAAS,CAAA;IACT,8DAAuB,CAAA;IACvB,kDAAW,CAAA;AACb,CAAC,EAJW,mCAAmC,KAAnC,mCAAmC,QAI9C;AAGD,MAAM,CAAN,IAAY,uBAIX;AAJD,WAAY,uBAAuB;IACjC,+DAAoC,CAAA;IACpC,qDAA0B,CAAA;IAC1B,qDAA0B,CAAA;AAC5B,CAAC,EAJW,uBAAuB,KAAvB,uBAAuB,QAIlC;AAyDD,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,WAAW;IACX,0BAA0B;IAC1B,iBAAiB;IACjB,gBAAgB;IAChB,qBAAqB;IACrB,iBAAiB;IACjB,QAAQ;IACR,UAAU;IACV,iBAAiB;IACjB,gBAAgB;IAChB,oBAAoB;IACpB,2BAA2B;IAC3B,kCAAkC;IAClC,kCAAkC;IAClC,YAAY;IACZ,6CAA6C;IAC7C,sDAAsD;IACtD,wCAAwC;IACxC,oCAAoC;IACpC,6CAA6C;IAC7C,qCAAqC;IACrC,kCAAkC;IAClC,oCAAoC;IACpC,mCAAmC;CACmB,CAAC","sourcesContent":["import { GPSCoord, NextList, PaginatedList } from '@bisondesk/commons-sdk/types';\nimport { Organization } from './crm.js';\nimport {\n AddressDeliveryType,\n PickUpDeliveryType,\n PortDeliverytype,\n PurchaseDeliveryType,\n SalesDeliveryTypes,\n} from './deliveries.js';\nimport { BaseEvent } from './internal-events.js';\nimport { Opportunity, OpportunityPaymentStatus } from './opportunities.js';\nimport { PicklistValue } from './picklists.js';\nimport { BaseSearchRequest, FieldId, PickFieldIds, SortOrder } from './search.js';\nimport { DataRecord, ReferenceData } from './utils.js';\nimport { Vehicle, VehiclePurchase } from './vehicles.js';\n\nexport enum TransportType {\n Purchase = 'PURCHASE',\n Sale = 'SALE',\n}\n\nexport enum TransportStatus {\n Todo = 'TODO',\n Planning = 'PLANNING',\n Ready = 'READY',\n ScheduledExternal = 'SCHEDULED_EXTERNAL',\n OngoingInternal = 'ONGOING_INTERNAL',\n OngoingShip = 'ONGOING_SHIP',\n Done = 'DONE',\n}\n\nexport const TransportStatusOrder: TransportStatus[] = [\n TransportStatus.Todo,\n TransportStatus.Planning,\n TransportStatus.Ready,\n TransportStatus.ScheduledExternal,\n TransportStatus.OngoingInternal,\n TransportStatus.OngoingShip,\n];\n\nexport const TransportDoneColumnId = TransportStatus.Done;\n\nexport const TransportKanbanEndColumns: TransportStatus[] = [TransportDoneColumnId];\nexport const TransportKanbanColumns: TransportStatus[] = [\n ...TransportStatusOrder,\n ...TransportKanbanEndColumns,\n];\n\nexport enum TransportPriority {\n Normal = 'NORMAL',\n High = 'HIGH',\n Urgent = 'URGENT',\n}\n\n/**\n * The customer collects the vehicle. Nothing is driven anywhere, but the papers still have to be\n * arranged and paid for — transit plates, technical control, insurance — which is why it is a\n * delivery type administration reviews rather than the absence of one.\n *\n * `dateOfPickUpByCustomer` is dropped from the quote's shape: the transport's own `date` is the\n * collection day, and two fields for one date only ever disagree.\n */\nexport type TransportPickUpDeliveryType = Omit<PickUpDeliveryType, 'dateOfPickUpByCustomer'>;\n\n/** `meta` of a value in the TRANSPORT_DRIVERS_PICKLIST_ID picklist, edited as JSON by an admin. */\nexport type TransportDriverMeta = {\n phone?: string;\n employment?: 'employee' | 'flexi' | 'interim';\n /** The agency we book and pay this driver through; an organization in the driver's tenant. */\n agency?: { id: string; name: string };\n /** When the driver can't drive or what they can't take on, e.g. \"Not on Wednesdays\". */\n notes?: string;\n /** Hidden from the picker; transports that already name the driver keep showing them. */\n inactive?: boolean;\n};\n\nexport type TransportDriver = PicklistValue<TransportDriverMeta>;\n\nexport type TransportDeliveryExtras = {\n cleaningNeeded?: boolean;\n /** Value id in the TRANSPORT_DRIVERS_PICKLIST_ID picklist. */\n driver?: string;\n /** Own-use vehicles doing this transport, e.g. a tractor and its trailer. */\n fleetVehicleIds?: string[];\n /** Organizations we hire for this transport, listed by the TRANSPORT_PARTNER_ORG_TAG tag. */\n externalServiceOrgIds?: string[];\n transportCompany?: string;\n date?: string; // Pick-up (purchase) | Delivery (OPP) (leaves parking)\n adminCost?: string; // user-entered administrative cost summed into totalCostExclVat\n stackingVehicleCostPrice?: string; // overrides the stacking rate from the delivery settings\n};\n\nexport type TransportSalesDeliveryType = (\n | PortDeliverytype\n | AddressDeliveryType\n | TransportPickUpDeliveryType\n) &\n TransportDeliveryExtras;\n\nexport type TransportPurchaseDeliveryType = PurchaseDeliveryType & TransportDeliveryExtras;\n\n/** @deprecated Use SalesDeliveryTypes from ./deliveries.js. */\nexport const TransportSalesDeliveryType = {\n Address: SalesDeliveryTypes.ADDRESS,\n Port: SalesDeliveryTypes.PORT,\n PortAndShip: SalesDeliveryTypes.PORT_AND_SHIP,\n PickUp: SalesDeliveryTypes.PICK_UP,\n} as const;\n\nexport const TRANSPORT_CANCELED_NOTIFICATION_ORIGIN = 'transport-canceled';\nexport const TRANSPORT_QUOTE_DELIVERY_CHANGED_NOTIFICATION_ORIGIN =\n 'transport-quote-delivery-changed';\nexport const TRANSPORT_RESTORED_NOTIFICATION_ORIGIN = 'transport-restored';\n\nexport type Transport = {\n id: string;\n vehicleId: string;\n opportunityId?: string;\n /** Sale deliveries: the quote the transport's delivery follows. */\n quoteId?: string;\n /** A newer quote replaced the delivery. Cleared once someone marks the transport as checked. */\n quoteDeliveryChangedAt?: string;\n\n status: TransportStatus;\n priority: TransportPriority;\n\n // administrative fields\n adminApproved: boolean;\n adminApprovedAt?: string;\n adminApprovedBy?: string;\n transportWithoutPayment?: boolean;\n notes?: string;\n\n totals: {\n totalRetailAmountExclVat: string;\n totalCostExclVat: string;\n estimatedTotalCostExclVat?: string;\n };\n\n log: Array<{\n status: TransportStatus;\n completedAt: string;\n completedBy: string;\n }>;\n\n doneAt?: string;\n doneBy?: string;\n canceledAt?: string;\n canceledBy?: string;\n\n createdAt: string;\n createdBy: string;\n updatedAt: string;\n updatedBy: string;\n} & (\n | {\n type: TransportType.Purchase;\n delivery: TransportPurchaseDeliveryType;\n }\n | {\n type: TransportType.Sale;\n delivery: TransportSalesDeliveryType;\n }\n);\n\nexport enum TransportWarningCode {\n PurchaseLogisticsNotReady = 'purchase_logistics_not_ready',\n OpportunityInReview = 'opportunity_in_review',\n QuoteChanged = 'quote_changed',\n}\n\nexport type TransportWarning = {\n code: TransportWarningCode;\n details?: Record<string, string | number | boolean>;\n};\n\nexport type TransportCost = Pick<Transport, 'totals'>;\n\nexport type TransportRecord = DataRecord<Transport>;\n\n/**\n * What a requester may change on a transport, field group by field group. The server filters an\n * update through these and returns the ones granted on the record, so the drawer disables what the\n * user cannot touch instead of deciding for itself from the user's roles.\n */\nexport enum TransportActions {\n /** The route: addresses, ports, dates, costs. */\n SetDelivery = 'set_delivery',\n SetNotes = 'set_notes',\n /** The administrative sign-off, and the clearance to move before the payment. */\n SetApproval = 'set_approval',\n /** The board column. */\n SetStatus = 'set_status',\n SetPriority = 'set_priority',\n SetBookingRef = 'set_booking_ref',\n}\n\n/**\n * Every field a write may set, in one shape. `delivery` is replaced whole when it is sent — there is\n * no partial merge into the stored one — which is why `bookingRef` rides alongside as a scalar the\n * server writes into the delivery it ends up with.\n */\nexport type TransportUpdate = {\n delivery?: TransportSalesDeliveryType | TransportPurchaseDeliveryType;\n notes?: string | null;\n adminApproved?: boolean;\n transportWithoutPayment?: boolean;\n status?: TransportStatus;\n priority?: TransportPriority;\n bookingRef?: string | null;\n /** Someone checked the delivery a newer quote brought in; the quote_changed warning clears. */\n acknowledgeQuoteChange?: boolean;\n};\n\ntype BaseTransportEvent = {\n actionAt: string;\n userId: string;\n tenantId: string;\n transportId: string;\n};\n\nexport type TransportCreateEvent = BaseTransportEvent & {\n action: 'create';\n data: Transport;\n previousData?: undefined;\n};\n\nexport type TransportUpdateEvent = BaseTransportEvent & {\n action: 'update';\n data: Transport;\n previousData: Transport;\n};\n\n/** Published whenever a transport is written. Carries both sides so subscribers judge relevance. */\nexport type TransportEvent = BaseEvent & (TransportCreateEvent | TransportUpdateEvent);\n\nexport enum TransportPaymentStatus {\n PaymentNotNeeded = 'payment_not_needed',\n NoPayment = 'no_payment',\n PartialPaymentReceived = 'partial_payment_received',\n FullPaymentReceived = 'full_payment_received',\n PartialPaymentSent = 'partial_payment_sent',\n FullPaymentSent = 'full_payment_sent',\n}\n\n/**\n * Where the money stands on the record the transport serves: the customer's payments on the\n * opportunity for a sale delivery, ours to the supplier for a purchase pick-up. Denormalised at\n * indexing time so the board can show it without joining.\n */\nexport type TransportPayment = {\n status: OpportunityPaymentStatus;\n /** Only a sale delivery knows the ratio — a pick-up has milestones, not a running total. */\n percentagePaid?: string;\n};\n\n/** The `custom.driver` search value of a transport nobody drives yet. */\nexport const TRANSPORT_NO_DRIVER = 'none';\n\n/**\n * Whether a port delivery has its delivery instructions attached. `YesRecent` means the most recent\n * upload is less than one working day old.\n */\nexport enum TransportDeliveryInstructionsStatus {\n No = 'no',\n YesRecent = 'yesRecent',\n Yes = 'yes',\n}\n\n/** Which address the map pin came from, so the UI can tell an exact pin from an approximate one. */\nexport enum TransportLocationSource {\n DeliveryAddress = 'delivery_address',\n OriginPort = 'origin_port',\n OrgAddress = 'org_address',\n}\n\nexport type SearchTransport = {\n transport: Transport;\n vehicle: Vehicle;\n org: Organization;\n opportunity?: Opportunity;\n purchase: VehiclePurchase;\n tasks: {\n totalTasks: number;\n openTasks: number;\n nextDueAt?: string;\n };\n custom: {\n commercialUserIds: string[];\n warnings: TransportWarning[];\n priorityOrdinal: number;\n payment: TransportPayment;\n paymentStatus: TransportPaymentStatus;\n /**\n * Computed when the transport is indexed, so `YesRecent` only turns into `Yes` on the next\n * reindex. Only set for a port delivery.\n */\n deliveryInstructions?: TransportDeliveryInstructionsStatus;\n /**\n * The assigned driver's picklist value id, or TRANSPORT_NO_DRIVER, so \"no driver\" is a facet\n * value. Computed when the transport is indexed.\n */\n driver?: string;\n /**\n * Where the transport happens: the delivery address, or the origin port for a shipped delivery.\n * Denormalised into one field because the map clusters over a single geo_point, and a port\n * delivery carries no address of its own.\n *\n * Deliberately narrower than `GPSCoord`: a geo_point field rejects any key beyond lat/lon, so\n * the map zoom the coordinates picker stores must not reach the index.\n */\n location?: Pick<GPSCoord, 'lat' | 'lon'>;\n locationSource?: TransportLocationSource;\n /**\n * Set when the organization is one of the group's own branches. Names rather than ids: the\n * branch usually belongs to another tenant, which the client cannot look up.\n */\n intercompany?: {\n tenantName: string;\n branchName: string;\n };\n };\n};\n\nexport type SearchTransportList = PaginatedList<SearchTransport, ReferenceData>;\n\n/**\n * The fields of a transport that the kanban board reads: its cards, its drag and drop, and the\n * drawer a card opens. The kanban search returns only these, so a reader of a field outside this\n * list gets nothing.\n */\nexport const KANBAN_TRANSPORT_ITEM_FIELDS = [\n 'transport',\n 'custom.commercialUserIds',\n 'custom.warnings',\n 'custom.payment',\n 'custom.intercompany',\n 'tasks.openTasks',\n 'org.id',\n 'org.name',\n 'org.countryCode',\n 'org.externalId',\n 'opportunity.branch',\n 'purchase.logistics.status',\n 'purchase.logistics.availableWeek',\n 'purchase.logistics.pickupAddress',\n 'vehicle.id',\n 'vehicle.internal.identification.stockNumber',\n 'vehicle.internal.identification.administrativeNumber',\n 'vehicle.internal.identification.branch',\n 'vehicle.internal.description.title',\n 'vehicle.external.identification.stockNumber',\n 'vehicle.external.identification.vin',\n 'vehicle.external.mainPicture.url',\n 'vehicle.external.condition.damaged',\n 'vehicle.external.general.category',\n] as const satisfies readonly FieldId<SearchTransport>[];\n\n/** A transport on the kanban board: its search document cut down to what the board reads. */\nexport type KanbanTransportItem = PickFieldIds<\n SearchTransport,\n (typeof KANBAN_TRANSPORT_ITEM_FIELDS)[number]\n>;\n\nexport type KanbanTransportGroup = {\n representative: KanbanTransportItem;\n items: KanbanTransportItem[];\n totalCount: number;\n /** Pass in nextTokens for this column to load more transports from the organization. */\n nextToken?: string;\n};\n\nexport type TransportKanbanColumn = {\n status: TransportStatus;\n results: KanbanTransportItem[];\n groups?: KanbanTransportGroup[];\n totalCount: number;\n};\n\nexport type MSearchTransportsKanbanColumn = {\n column: TransportKanbanColumn;\n nextToken?: string;\n};\n\nexport type KanbanTransportsSearchRequest = BaseSearchRequest & {\n nextTokens?: Record<string, string | undefined>;\n groupByOrganization?: boolean;\n statusSortBy?: Record<TransportStatus, { fieldId: string; order: SortOrder }[]>;\n};\n\nexport type KanbanTransportsNextList = Omit<\n NextList<TransportKanbanColumn, ReferenceData>,\n 'nextToken'\n> & {\n nextTokens?: Record<string, string | undefined>;\n};\n"]}
@@ -1,28 +1,72 @@
1
1
  import { BaseEvent } from './internal-events.js';
2
+ import { OrganizationBankAccountActions } from './organization-bank-accounts.js';
2
3
  import { SearchVehicle } from './vehicles.js';
3
4
  export declare const VEHICLE_PURCHASE_PAYMENT_ALLOWED_NOTIFICATION_ORIGIN = "vehicle-purchase-payment-allowed-notification";
4
- export type VehiclePurchasePaymentForeign = {
5
- amount: string;
6
- currencyCode: string;
7
- exchangeRate: string;
8
- };
5
+ export declare enum PaymentStage {
6
+ Allowed = "allowed",
7
+ Processing = "processing",
8
+ Executed = "executed"
9
+ }
9
10
  export type NewVehiclePurchasePayment = {
10
11
  vehicleId: string;
11
12
  amount: string;
12
- foreign?: Pick<VehiclePurchasePaymentForeign, 'amount' | 'currencyCode'>;
13
13
  description?: string;
14
14
  paidAt?: string;
15
15
  paidBy?: string;
16
16
  };
17
- export type VehiclePurchasePayment = Omit<NewVehiclePurchasePayment, 'foreign'> & {
17
+ export type VehiclePurchasePayment = NewVehiclePurchasePayment & {
18
18
  id: string;
19
19
  createdBy: string;
20
20
  createdAt: string;
21
- foreign?: VehiclePurchasePaymentForeign;
21
+ stage: PaymentStage;
22
+ priority: number;
23
+ exportId?: string;
24
+ paymentBatchId?: string;
25
+ transferReference?: string;
26
+ sentToProcessingBy?: string;
27
+ sentToProcessingAt?: string;
28
+ };
29
+ export type PaymentBatch = {
30
+ id: string;
31
+ createdAt: string;
32
+ createdBy: string;
33
+ };
34
+ export type PaymentExportChecks = {
35
+ bankAccountId?: string;
36
+ hasBankAccount: boolean;
37
+ bankAccountVerified: boolean;
38
+ bankAccountActions: OrganizationBankAccountActions[];
22
39
  };
23
40
  export type VehiclePurchasePaymentBff = {
24
41
  payment: VehiclePurchasePayment;
25
42
  vehicle: SearchVehicle;
43
+ supplierName?: string;
44
+ exportChecks?: PaymentExportChecks;
45
+ };
46
+ export type UnpaidPurchase = {
47
+ vehicle: SearchVehicle;
48
+ purchaseAmount: string;
49
+ allowedAmount: string;
50
+ paidAmount: string;
51
+ remainingAmount: string;
52
+ invoiceDueDate?: string;
53
+ supplierName?: string;
54
+ };
55
+ export type ExportPaymentsRequest = {
56
+ paymentIds: string[];
57
+ debtorBankAccountId: string;
58
+ executionDate?: string;
59
+ };
60
+ export type MarkPaymentsPaidRequest = {
61
+ paymentIds: string[];
62
+ };
63
+ export type SendPaymentsToProcessingRequest = {
64
+ paymentIds: string[];
65
+ };
66
+ export type PurchasePaymentCounts = {
67
+ unpaid: number;
68
+ allowed: number;
69
+ processing: number;
26
70
  };
27
71
  export type VehiclePurchasePaymentCreateEvent = {
28
72
  payment: VehiclePurchasePayment;
@@ -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,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,eAAO,MAAM,oDAAoD,kDAChB,CAAC;AAMlD,MAAM,MAAM,6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AC;IAChB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,iCAAiC,GAAG;IAC9C,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"}
@@ -1,2 +1,8 @@
1
1
  export const VEHICLE_PURCHASE_PAYMENT_ALLOWED_NOTIFICATION_ORIGIN = 'vehicle-purchase-payment-allowed-notification';
2
+ export var PaymentStage;
3
+ (function (PaymentStage) {
4
+ PaymentStage["Allowed"] = "allowed";
5
+ PaymentStage["Processing"] = "processing";
6
+ PaymentStage["Executed"] = "executed";
7
+ })(PaymentStage || (PaymentStage = {}));
2
8
  //# 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":"AAGA,MAAM,CAAC,MAAM,oDAAoD,GAC/D,+CAA+C,CAAC","sourcesContent":["import { BaseEvent } from './internal-events.js';\nimport { SearchVehicle } from './vehicles.js';\n\nexport const VEHICLE_PURCHASE_PAYMENT_ALLOWED_NOTIFICATION_ORIGIN =\n 'vehicle-purchase-payment-allowed-notification';\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};\n\nexport type VehiclePurchasePaymentBff = {\n payment: VehiclePurchasePayment;\n vehicle: SearchVehicle;\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","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 * 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 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/** 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,7 +150,6 @@ export type NewVehicleRequest = {
150
150
  dealStatus: VehiclePurchaseDealStatus;
151
151
  costs: {
152
152
  purchase: string;
153
- foreign?: VehiclePurchaseDealForeign;
154
153
  purchaseVatPercentage: string;
155
154
  commission?: string;
156
155
  externalTransport?: string;
@@ -685,11 +684,6 @@ export type VehiclePriceUpdateResponse = {
685
684
  success: false;
686
685
  errors: VehiclePriceUpdateError[];
687
686
  };
688
- export type VehiclePurchaseDealForeign = {
689
- purchase: string;
690
- currencyCode: string;
691
- exchangeRate: string;
692
- };
693
687
  export type VehiclePurchase = {
694
688
  organizationId: string;
695
689
  contactId: string;
@@ -716,12 +710,12 @@ export type VehiclePurchase = {
716
710
  checkedInAt?: string;
717
711
  checkedInBy?: string;
718
712
  };
713
+ invoiceDueDate?: string;
719
714
  deal: {
720
715
  status: VehiclePurchaseDealStatus;
721
716
  readyToDeliver?: boolean;
722
717
  purchaseVatRate?: string;
723
718
  purchase?: string;
724
- foreign?: VehiclePurchaseDealForeign;
725
719
  bonus?: string;
726
720
  commission?: string;
727
721
  externalTransport?: string;