@bisondesk/core-sdk 1.0.658 → 1.0.659

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 (104) hide show
  1. package/lib/types/deliveries.d.ts +2 -0
  2. package/lib/types/deliveries.d.ts.map +1 -1
  3. package/lib/types/deliveries.js +6 -0
  4. package/lib/types/deliveries.js.map +1 -1
  5. package/lib/types/journeys.d.ts +1 -0
  6. package/lib/types/journeys.d.ts.map +1 -1
  7. package/lib/types/journeys.js.map +1 -1
  8. package/lib/types/reports-arrivals.d.ts +2 -1
  9. package/lib/types/reports-arrivals.d.ts.map +1 -1
  10. package/lib/types/reports-arrivals.js.map +1 -1
  11. package/lib/types/transports.d.ts +12 -8
  12. package/lib/types/transports.d.ts.map +1 -1
  13. package/lib/types/transports.js +2 -7
  14. package/lib/types/transports.js.map +1 -1
  15. package/lib/utils/deliveries.d.ts +2 -1
  16. package/lib/utils/deliveries.d.ts.map +1 -1
  17. package/lib/utils/deliveries.js +1 -0
  18. package/lib/utils/deliveries.js.map +1 -1
  19. package/lib/utils/reports-arrivals.d.ts.map +1 -1
  20. package/lib/utils/reports-arrivals.js +7 -3
  21. package/lib/utils/reports-arrivals.js.map +1 -1
  22. package/lib/utils/transports.d.ts +3 -0
  23. package/lib/utils/transports.d.ts.map +1 -1
  24. package/lib/utils/transports.js +4 -2
  25. package/lib/utils/transports.js.map +1 -1
  26. package/package.json +1 -1
  27. package/src/types/activities.js +13 -0
  28. package/src/types/activities.js.map +1 -0
  29. package/src/types/comparables.js +2 -0
  30. package/src/types/comparables.js.map +1 -0
  31. package/src/types/crm.js +58 -0
  32. package/src/types/crm.js.map +1 -0
  33. package/src/types/dashboard.js +2 -0
  34. package/src/types/dashboard.js.map +1 -0
  35. package/src/types/definitions.js +2 -0
  36. package/src/types/definitions.js.map +1 -0
  37. package/src/types/deliveries.ts +11 -2
  38. package/src/types/fields.js +2 -0
  39. package/src/types/fields.js.map +1 -0
  40. package/src/types/insights.js +2 -0
  41. package/src/types/insights.js.map +1 -0
  42. package/src/types/interests.js +6 -0
  43. package/src/types/interests.js.map +1 -0
  44. package/src/types/internal-events.js +18 -0
  45. package/src/types/internal-events.js.map +1 -0
  46. package/src/types/internet-opportunities.js +2 -0
  47. package/src/types/internet-opportunities.js.map +1 -0
  48. package/src/types/internet-vehicles.js +2 -0
  49. package/src/types/internet-vehicles.js.map +1 -0
  50. package/src/types/journeys.ts +6 -0
  51. package/src/types/leasing-administration.js +2 -0
  52. package/src/types/leasing-administration.js.map +1 -0
  53. package/src/types/leasing-debtors.js +2 -0
  54. package/src/types/leasing-debtors.js.map +1 -0
  55. package/src/types/leasing-search.js +2 -0
  56. package/src/types/leasing-search.js.map +1 -0
  57. package/src/types/leasing-settings.js +7 -0
  58. package/src/types/leasing-settings.js.map +1 -0
  59. package/src/types/leasing.js +38 -0
  60. package/src/types/leasing.js.map +1 -0
  61. package/src/types/marketing.js +35 -0
  62. package/src/types/marketing.js.map +1 -0
  63. package/src/types/offers.js +56 -0
  64. package/src/types/opportunities.js +107 -0
  65. package/src/types/opportunities.js.map +1 -0
  66. package/src/types/payments.js +7 -0
  67. package/src/types/picklists.js +2 -0
  68. package/src/types/picklists.js.map +1 -0
  69. package/src/types/quotes.js +42 -0
  70. package/src/types/recently-viewed.js +2 -0
  71. package/src/types/recently-viewed.js.map +1 -0
  72. package/src/types/reports-arrivals.ts +7 -1
  73. package/src/types/reservations.js +5 -0
  74. package/src/types/reservations.js.map +1 -0
  75. package/src/types/roi-ratings.js +5 -0
  76. package/src/types/roi-ratings.js.map +1 -0
  77. package/src/types/saved-filters.js +9 -0
  78. package/src/types/saved-filters.js.map +1 -0
  79. package/src/types/search.js +2 -0
  80. package/src/types/search.js.map +1 -0
  81. package/src/types/settings.js +2 -0
  82. package/src/types/settings.js.map +1 -0
  83. package/src/types/templates.js +2 -0
  84. package/src/types/templates.js.map +1 -0
  85. package/src/types/tenants.js +21 -0
  86. package/src/types/tenants.js.map +1 -0
  87. package/src/types/transports.ts +14 -15
  88. package/src/types/user-performance.js +7 -0
  89. package/src/types/user-performance.js.map +1 -0
  90. package/src/types/utils.js +2 -0
  91. package/src/types/validation.js +2 -0
  92. package/src/types/validation.js.map +1 -0
  93. package/src/types/vehicle-sales.js +6 -0
  94. package/src/types/vehicle-sales.js.map +1 -0
  95. package/src/types/vehicles.js +98 -0
  96. package/src/types/vehicles.js.map +1 -0
  97. package/src/utils/deliveries.ts +6 -0
  98. package/src/utils/leasing.js +6 -0
  99. package/src/utils/leasing.js.map +1 -0
  100. package/src/utils/opportunities.js +48 -0
  101. package/src/utils/opportunities.js.map +1 -0
  102. package/src/utils/reports-arrivals.ts +7 -3
  103. package/src/utils/transports.ts +8 -6
  104. package/tsconfig.tsbuildinfo +1 -1
@@ -1,4 +1,5 @@
1
1
  import { LocationValue } from '@bisondesk/commons-sdk/types';
2
+ export declare const PARK_DELIVERY_TYPE = "park";
2
3
  export declare enum PurchaseDeliveryTypes {
3
4
  ADDRESS = "address",
4
5
  DROP_OFF = "park"
@@ -45,6 +46,7 @@ export type AddressDeliveryType<T extends SalesDeliveryTypes.ADDRESS | PurchaseD
45
46
  distanceKm: string;
46
47
  technicalControlNeeded: boolean;
47
48
  };
49
+ export declare const ADDRESS_DELIVERY_FIELDS: readonly ["address", "distanceKm", "technicalControlNeeded"];
48
50
  export type PortDeliverytype = BaseDeliveryType & {
49
51
  type: SalesDeliveryTypes.PORT | SalesDeliveryTypes.PORT_AND_SHIP;
50
52
  portOriginId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"deliveries.d.ts","sourceRoot":"/","sources":["types/deliveries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAG7D,oBAAY,qBAAqB;IAC/B,OAAO,YAAY;IACnB,QAAQ,SAAS;CAClB;AAED,oBAAY,kBAAkB;IAC5B,OAAO,SAAS;IAChB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,aAAa,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D,IAAI,EAAE,kBAAkB,CAAC,IAAI,GAAG,kBAAkB,CAAC,aAAa,CAAC;IACjE,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,gBAAgB,EAAE,MAAM,CAAC;IACzB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,kBAAkB,GAAG,mBAAmB,GAAG,gBAAgB,CAAC;AAG5F,MAAM,MAAM,oBAAoB,GAC5B,mBAAmB,CAAC,kBAAkB,CAAC,OAAO,GAAG,qBAAqB,CAAC,OAAO,CAAC,GAC/E,mBAAmB,CAAC;AAExB,MAAM,MAAM,qBAAqB,GAAG,IAAI,CAAC,aAAa,EAAE,cAAc,GAAG,MAAM,CAAC,GAAG;IACjF,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,qBAAqB,CAAC;IAC9B,WAAW,EAAE,qBAAqB,CAAC;CACpC,CAAC"}
@@ -1,3 +1,4 @@
1
+ export const PARK_DELIVERY_TYPE = 'park';
1
2
  export var PurchaseDeliveryTypes;
2
3
  (function (PurchaseDeliveryTypes) {
3
4
  PurchaseDeliveryTypes["ADDRESS"] = "address";
@@ -21,4 +22,9 @@ export var TransportationMode;
21
22
  TransportationMode["BY_ROAD"] = "byRoad";
22
23
  TransportationMode["ON_LOW_BED"] = "onLowBed";
23
24
  })(TransportationMode || (TransportationMode = {}));
25
+ export const ADDRESS_DELIVERY_FIELDS = [
26
+ 'address',
27
+ 'distanceKm',
28
+ 'technicalControlNeeded',
29
+ ];
24
30
  //# sourceMappingURL=deliveries.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"deliveries.js","sourceRoot":"/","sources":["types/deliveries.ts"],"names":[],"mappings":"AAGA,MAAM,CAAN,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC/B,4CAAmB,CAAA;IACnB,0CAAiB,CAAA;AACnB,CAAC,EAHW,qBAAqB,KAArB,qBAAqB,QAGhC;AAED,MAAM,CAAN,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC5B,sCAAgB,CAAA;IAChB,yCAAmB,CAAA;IACnB,mCAAa,CAAA;IACb,mDAA6B,CAAA;AAC/B,CAAC,EALW,kBAAkB,KAAlB,kBAAkB,QAK7B;AAED,MAAM,CAAN,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,8BAAe,CAAA;IACf,kCAAmB,CAAA;IACnB,qCAAsB,CAAA;AACxB,CAAC,EAJW,WAAW,KAAX,WAAW,QAItB;AAED,MAAM,CAAN,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,wCAAkB,CAAA;IAClB,6CAAuB,CAAA;AACzB,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B","sourcesContent":["import { LocationValue } from '@bisondesk/commons-sdk/types';\n\n/** Supplier collection keeps the existing address value in stored transports. */\nexport enum PurchaseDeliveryTypes {\n ADDRESS = 'address',\n DROP_OFF = 'park',\n}\n\nexport enum SalesDeliveryTypes {\n PICK_UP = 'park',\n ADDRESS = 'address',\n PORT = 'port',\n PORT_AND_SHIP = 'portAndShip',\n}\n\nexport enum SpoilerInfo {\n MOUNT = 'mount',\n UNMOUNT = 'unmount',\n NO_ACTION = 'noAction',\n}\n\nexport enum TransportationMode {\n BY_ROAD = 'byRoad',\n ON_LOW_BED = 'onLowBed',\n}\n\ntype BaseDeliveryType = {\n agreedPrice: string;\n spoiler?: SpoilerInfo;\n stackingVehicleNeeded?: boolean;\n detailsStacking?: string;\n};\n\nexport type PickUpDeliveryType = BaseDeliveryType & {\n type: SalesDeliveryTypes.PICK_UP;\n urgent: boolean;\n transportationMode?: TransportationMode;\n detailsBorderCrossing?: string;\n technicalControlNeeded: boolean;\n insuranceNeeded: boolean;\n transitPlateBelgiumNeeded: boolean;\n transitPlateAustriaNeeded: boolean;\n licensePlateNeeded: boolean;\n dateOfPickUpByCustomer?: string;\n};\n\n/** The supplier brings the vehicle to our park without a collection address or distance. */\nexport type DropOffDeliveryType = BaseDeliveryType & {\n type: PurchaseDeliveryTypes.DROP_OFF;\n};\n\nexport type AddressDeliveryType<\n T extends SalesDeliveryTypes.ADDRESS | PurchaseDeliveryTypes.ADDRESS = SalesDeliveryTypes.ADDRESS,\n> = BaseDeliveryType & {\n type: T;\n address: LocationValue;\n distanceKm: string;\n technicalControlNeeded: boolean;\n};\n\nexport type PortDeliverytype = BaseDeliveryType & {\n type: SalesDeliveryTypes.PORT | SalesDeliveryTypes.PORT_AND_SHIP;\n portOriginId: string;\n portDestination?: string;\n shippingCompany?: string;\n portToPortCostPrice: string;\n parkToPortCostPrice?: string;\n portToPortMargin: string;\n ets?: string;\n eta?: string;\n etd?: string;\n shipClosingDate?: string;\n bookingRef?: string;\n deliveryLocation?: string;\n};\n\nexport type SalesDeliveryType = PickUpDeliveryType | AddressDeliveryType | PortDeliverytype;\n\n/** Earlier SDKs also used the sales address enum for purchase collection. Both store address. */\nexport type PurchaseDeliveryType =\n | AddressDeliveryType<SalesDeliveryTypes.ADDRESS | PurchaseDeliveryTypes.ADDRESS>\n | DropOffDeliveryType;\n\nexport type DeliveryLocationValue = Omit<LocationValue, 'addressLine1' | 'city'> & {\n addressLine1: string;\n city: string;\n};\n\nexport type DeliveryRoutesRequest = {\n origin: DeliveryLocationValue;\n destination: DeliveryLocationValue;\n};\n"]}
1
+ {"version":3,"file":"deliveries.js","sourceRoot":"/","sources":["types/deliveries.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAGzC,MAAM,CAAN,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC/B,4CAAmB,CAAA;IACnB,0CAA6B,CAAA;AAC/B,CAAC,EAHW,qBAAqB,KAArB,qBAAqB,QAGhC;AAED,MAAM,CAAN,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC5B,sCAA4B,CAAA;IAC5B,yCAAmB,CAAA;IACnB,mCAAa,CAAA;IACb,mDAA6B,CAAA;AAC/B,CAAC,EALW,kBAAkB,KAAlB,kBAAkB,QAK7B;AAED,MAAM,CAAN,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,8BAAe,CAAA;IACf,kCAAmB,CAAA;IACnB,qCAAsB,CAAA;AACxB,CAAC,EAJW,WAAW,KAAX,WAAW,QAItB;AAED,MAAM,CAAN,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,wCAAkB,CAAA;IAClB,6CAAuB,CAAA;AACzB,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B;AAoCD,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,SAAS;IACT,YAAY;IACZ,wBAAwB;CACiC,CAAC","sourcesContent":["import { LocationValue } from '@bisondesk/commons-sdk/types';\n\n/** Supplier drop-off and customer pickup both take place at our park. */\nexport const PARK_DELIVERY_TYPE = 'park';\n\n/** Supplier collection keeps the existing address value in stored transports. */\nexport enum PurchaseDeliveryTypes {\n ADDRESS = 'address',\n DROP_OFF = PARK_DELIVERY_TYPE,\n}\n\nexport enum SalesDeliveryTypes {\n PICK_UP = PARK_DELIVERY_TYPE,\n ADDRESS = 'address',\n PORT = 'port',\n PORT_AND_SHIP = 'portAndShip',\n}\n\nexport enum SpoilerInfo {\n MOUNT = 'mount',\n UNMOUNT = 'unmount',\n NO_ACTION = 'noAction',\n}\n\nexport enum TransportationMode {\n BY_ROAD = 'byRoad',\n ON_LOW_BED = 'onLowBed',\n}\n\ntype BaseDeliveryType = {\n agreedPrice: string;\n spoiler?: SpoilerInfo;\n stackingVehicleNeeded?: boolean;\n detailsStacking?: string;\n};\n\nexport type PickUpDeliveryType = BaseDeliveryType & {\n type: SalesDeliveryTypes.PICK_UP;\n urgent: boolean;\n transportationMode?: TransportationMode;\n detailsBorderCrossing?: string;\n technicalControlNeeded: boolean;\n insuranceNeeded: boolean;\n transitPlateBelgiumNeeded: boolean;\n transitPlateAustriaNeeded: boolean;\n licensePlateNeeded: boolean;\n dateOfPickUpByCustomer?: string;\n};\n\n/** The supplier brings the vehicle to our park without a collection address or distance. */\nexport type DropOffDeliveryType = BaseDeliveryType & {\n type: PurchaseDeliveryTypes.DROP_OFF;\n};\n\nexport type AddressDeliveryType<\n T extends SalesDeliveryTypes.ADDRESS | PurchaseDeliveryTypes.ADDRESS = SalesDeliveryTypes.ADDRESS,\n> = BaseDeliveryType & {\n type: T;\n address: LocationValue;\n distanceKm: string;\n technicalControlNeeded: boolean;\n};\n\nexport const ADDRESS_DELIVERY_FIELDS = [\n 'address',\n 'distanceKm',\n 'technicalControlNeeded',\n] as const satisfies readonly (keyof AddressDeliveryType)[];\n\nexport type PortDeliverytype = BaseDeliveryType & {\n type: SalesDeliveryTypes.PORT | SalesDeliveryTypes.PORT_AND_SHIP;\n portOriginId: string;\n portDestination?: string;\n shippingCompany?: string;\n portToPortCostPrice: string;\n parkToPortCostPrice?: string;\n portToPortMargin: string;\n ets?: string;\n eta?: string;\n etd?: string;\n shipClosingDate?: string;\n bookingRef?: string;\n deliveryLocation?: string;\n};\n\nexport type SalesDeliveryType = PickUpDeliveryType | AddressDeliveryType | PortDeliverytype;\n\n/** Earlier SDKs also used the sales address enum for purchase collection. Both store address. */\nexport type PurchaseDeliveryType =\n | AddressDeliveryType<SalesDeliveryTypes.ADDRESS | PurchaseDeliveryTypes.ADDRESS>\n | DropOffDeliveryType;\n\nexport type DeliveryLocationValue = Omit<LocationValue, 'addressLine1' | 'city'> & {\n addressLine1: string;\n city: string;\n};\n\nexport type DeliveryRoutesRequest = {\n origin: DeliveryLocationValue;\n destination: DeliveryLocationValue;\n};\n"]}
@@ -17,6 +17,7 @@ export type JourneyTaskConfig<T> = {
17
17
  disabled: boolean;
18
18
  autoAssignToRequester?: boolean;
19
19
  autoAssignToRecordOwner?: boolean;
20
+ assignTo?: string;
20
21
  };
21
22
  export type JourneyConfig<T> = {
22
23
  businessEntityId: BusinessEntityIds;
@@ -1 +1 @@
1
- {"version":3,"file":"journeys.d.ts","sourceRoot":"/","sources":["types/journeys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEpD,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAAC;AAEpE,MAAM,MAAM,iBAAiB,CAAC,CAAC,IAAI;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,cAAc,CAAC;IACtB,aAAa,CAAC,EAAE,qBAAqB,CAAC;IACtC,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,cAAc,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,EAAE,UAAU,CAAC,mBAAmB,CAAC,CAAC;IACpD,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,gBAAgB,CAAC,EAAE,CAAC,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAKhC,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,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AgB,CAAC,EAAE,CAAC,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAKhC,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAMlC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI;IAC7B,gBAAgB,EAAE,iBAAiB,CAAC;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,wBAAwB,CAAC,CAAC,IAAI,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,GAAG;IAC/F,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"journeys.js","sourceRoot":"/","sources":["types/journeys.ts"],"names":[],"mappings":"","sourcesContent":["import { TaskPriority } from '@bisondesk/commons-sdk/tasks';\nimport { MultiLangValue } from '@bisondesk/commons-sdk/types';\nimport type { AdditionalOperation, RulesLogic } from 'json-logic-js';\nimport { BusinessEntityIds } from '../constants.js';\n\nexport type JourneyTaskDependency = RulesLogic<AdditionalOperation>;\n\nexport type JourneyTaskConfig<T> = {\n configId: string;\n title: MultiLangValue;\n entryCriteria?: JourneyTaskDependency;\n priority?: TaskPriority;\n tag?: string;\n description?: MultiLangValue;\n dueDateOn?: string;\n completionCriteria: RulesLogic<AdditionalOperation>;\n prerequisiteTaskIds: string[];\n requiredAtStatus?: T; //Required at a given status or higher\n disabled: boolean;\n autoAssignToRequester?: boolean;\n /**\n * Assign the task to whoever handles the record it hangs off, as the processor for that entity\n * defines it. Ignored when the processor has no such person. `autoAssignToRequester` wins.\n */\n autoAssignToRecordOwner?: boolean;\n};\n\nexport type JourneyConfig<T> = {\n businessEntityId: BusinessEntityIds;\n versionId: string;\n tasks: JourneyTaskConfig<T>[];\n createdAt: string;\n createdBy: string;\n disabled: boolean;\n};\n\nexport type JourneyConfigCustomTasks<T> = Pick<JourneyConfig<T>, 'businessEntityId' | 'tasks'> & {\n recordId: string;\n createdAt: string;\n createdBy: string;\n};\n"]}
1
+ {"version":3,"file":"journeys.js","sourceRoot":"/","sources":["types/journeys.ts"],"names":[],"mappings":"","sourcesContent":["import { TaskPriority } from '@bisondesk/commons-sdk/tasks';\nimport { MultiLangValue } from '@bisondesk/commons-sdk/types';\nimport type { AdditionalOperation, RulesLogic } from 'json-logic-js';\nimport { BusinessEntityIds } from '../constants.js';\n\nexport type JourneyTaskDependency = RulesLogic<AdditionalOperation>;\n\nexport type JourneyTaskConfig<T> = {\n configId: string;\n title: MultiLangValue;\n entryCriteria?: JourneyTaskDependency;\n priority?: TaskPriority;\n tag?: string;\n description?: MultiLangValue;\n dueDateOn?: string;\n completionCriteria: RulesLogic<AdditionalOperation>;\n prerequisiteTaskIds: string[];\n requiredAtStatus?: T; //Required at a given status or higher\n disabled: boolean;\n autoAssignToRequester?: boolean;\n /**\n * Assign the task to whoever handles the record it hangs off, as the processor for that entity\n * defines it. Ignored when the processor has no such person. `autoAssignToRequester` wins.\n */\n autoAssignToRecordOwner?: boolean;\n /**\n * A user id to fall back on when neither auto-assign option yields anyone — for work that always\n * lands on the same desk whoever triggered it, such as raising a supplier bonus invoice. Last\n * resort by design, so adding it cannot change an existing config.\n */\n assignTo?: string;\n};\n\nexport type JourneyConfig<T> = {\n businessEntityId: BusinessEntityIds;\n versionId: string;\n tasks: JourneyTaskConfig<T>[];\n createdAt: string;\n createdBy: string;\n disabled: boolean;\n};\n\nexport type JourneyConfigCustomTasks<T> = Pick<JourneyConfig<T>, 'businessEntityId' | 'tasks'> & {\n recordId: string;\n createdAt: string;\n createdBy: string;\n};\n"]}
@@ -1,5 +1,5 @@
1
1
  import { LocationValue } from '@bisondesk/commons-sdk/locations';
2
- import { TransportLocationSource, TransportStatus, TransportType } from './transports.js';
2
+ import { Transport, TransportLocationSource, TransportStatus, TransportType } from './transports.js';
3
3
  import { VehiclePurchaseDeliveryType } from './vehicles.js';
4
4
  export declare const ARRIVALS_HISTORY_MONTHS = 24;
5
5
  export declare const ARRIVALS_USUAL_WAIT_MONTHS = 3;
@@ -7,6 +7,7 @@ export declare const ARRIVALS_LATE_AFTER_DAYS = 30;
7
7
  export type ExpectedArrivalTransport = {
8
8
  id: string;
9
9
  type: TransportType;
10
+ delivery: Pick<Transport['delivery'], 'type'>;
10
11
  status: TransportStatus;
11
12
  date?: string;
12
13
  transportCompany?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"reports-arrivals.d.ts","sourceRoot":"/","sources":["types/reports-arrivals.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC1F,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAG5D,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAG1C,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAG5C,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAE3C,MAAM,MAAM,wBAAwB,GAAG;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,aAAa,CAAC;IACpB,MAAM,EAAE,eAAe,CAAC;IAExB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,C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E,aAAa,EAAE,CAAC;IAEzB,SAAS,EAAE,YAAY,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAC1C,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"reports-arrivals.js","sourceRoot":"/","sources":["types/reports-arrivals.ts"],"names":[],"mappings":"AAcA,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAG1C,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC;AAG5C,MAAM,CAAC,MAAM,wBAAwB,GAAG,EAAE,CAAC","sourcesContent":["/**\n * Expected arrivals report — the payload for the `Reports → Expected arrivals` tab: every\n * vehicle whose supplier has been fully paid but which has not arrived on our park (or, for a\n * direct supplier-to-client delivery, has not been delivered), with the monthly history of how\n * long a paid vehicle takes to arrive. The per-purchaser overview and the KPIs follow the\n * table's filters, so the client computes them from the rows it shows.\n *\n * The API returns raw numbers only; the client formats amounts and dates.\n */\nimport { LocationValue } from '@bisondesk/commons-sdk/locations';\nimport { TransportLocationSource, TransportStatus, TransportType } from './transports.js';\nimport { VehiclePurchaseDeliveryType } from './vehicles.js';\n\n/** Months of arrivals the history chart covers. */\nexport const ARRIVALS_HISTORY_MONTHS = 24;\n\n/** Full months of arrivals behind the \"usual wait\" benchmark. */\nexport const ARRIVALS_USUAL_WAIT_MONTHS = 3;\n\n/** Days after the full payment beyond which a vehicle still not arrived is flagged. */\nexport const ARRIVALS_LATE_AFTER_DAYS = 30;\n\nexport type ExpectedArrivalTransport = {\n id: string;\n type: TransportType;\n status: TransportStatus;\n /** Planned pick-up / delivery day. */\n date?: string;\n transportCompany?: string;\n driver?: string;\n};\n\nexport type ExpectedArrivalRow = {\n vehicleId: string;\n stockNumber: string;\n title: string;\n /** Vehicle condition; null when it has not been recorded. */\n used: boolean | null;\n /** Main picture, else the first picture; the client appends the resize parameters. */\n pictureUrl?: string;\n /** The client reads the branch location for the maps origin. */\n branchId: string;\n currency: string;\n /** User id from `purchase.purchasedBy`; the client resolves name + avatar. */\n purchasedBy: string;\n supplier: { id: string; name: string };\n /** `deal.purchase`, exclusive VAT. */\n purchasePrice: number | null;\n /** Σ of the payment rows marked paid — what left the bank. */\n amountPaid: number;\n fullPaymentSentAt: string;\n firstPaymentSentAt?: string;\n daysSincePayment: number;\n sold: boolean;\n opportunityId?: string;\n clientOrgId?: string;\n clientName?: string;\n /** The purchase transport's delivery address, else the supplier's legal address. */\n pickupAddress?: { address: LocationValue; source: TransportLocationSource };\n deliveryType?: VehiclePurchaseDeliveryType;\n /** Direct supplier-to-client delivery: no purchase logistics, the sale delivery is the exit. */\n readyToDeliver: boolean;\n availableWeek?: string;\n /** The purchase transport for a park vehicle, the sale delivery for a direct delivery. */\n transport?: ExpectedArrivalTransport;\n};\n\n/** One month of arrivals, keyed by month of arrival. Percentiles cover the paid-first rows only. */\nexport type ArrivalsMonth = {\n /** `YYYY-MM`. */\n month: string;\n arrivals: number;\n /** Fully paid before arriving — the ones with a wait to measure. */\n paidFirst: number;\n arrivedBeforePaid: number;\n p50Days: number | null;\n p80Days: number | null;\n /** Paid-first arrivals that waited more than `ARRIVALS_LATE_AFTER_DAYS`. */\n late: number;\n};\n\n/** Days between the full payment and the arrival, over a window of arrivals. */\nexport type ArrivalsWait = { p50Days: number | null; p80Days: number | null };\n\nexport type ExpectedArrivalsReportResponse = {\n rows: ExpectedArrivalRow[];\n /** The last `ARRIVALS_HISTORY_MONTHS` months, oldest first, every month present. */\n history: ArrivalsMonth[];\n /** Over the last `ARRIVALS_USUAL_WAIT_MONTHS` full months of arrivals. */\n usualWait: ArrivalsWait;\n};\n\nexport type ExpectedArrivalsExportRequest = {\n vehicleIds: string[];\n};\n"]}
1
+ {"version":3,"file":"reports-arrivals.js","sourceRoot":"/","sources":["types/reports-arrivals.ts"],"names":[],"mappings":"AAmBA,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAG1C,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC;AAG5C,MAAM,CAAC,MAAM,wBAAwB,GAAG,EAAE,CAAC","sourcesContent":["/**\n * Expected arrivals report — the payload for the `Reports → Expected arrivals` tab: every\n * vehicle whose supplier has been fully paid but which has not arrived on our park (or, for a\n * direct supplier-to-client delivery, has not been delivered), with the monthly history of how\n * long a paid vehicle takes to arrive. The per-purchaser overview and the KPIs follow the\n * table's filters, so the client computes them from the rows it shows.\n *\n * The API returns raw numbers only; the client formats amounts and dates.\n */\nimport { LocationValue } from '@bisondesk/commons-sdk/locations';\nimport {\n Transport,\n TransportLocationSource,\n TransportStatus,\n TransportType,\n} from './transports.js';\nimport { VehiclePurchaseDeliveryType } from './vehicles.js';\n\n/** Months of arrivals the history chart covers. */\nexport const ARRIVALS_HISTORY_MONTHS = 24;\n\n/** Full months of arrivals behind the \"usual wait\" benchmark. */\nexport const ARRIVALS_USUAL_WAIT_MONTHS = 3;\n\n/** Days after the full payment beyond which a vehicle still not arrived is flagged. */\nexport const ARRIVALS_LATE_AFTER_DAYS = 30;\n\nexport type ExpectedArrivalTransport = {\n id: string;\n type: TransportType;\n delivery: Pick<Transport['delivery'], 'type'>;\n status: TransportStatus;\n /** Planned pick-up / delivery day. */\n date?: string;\n transportCompany?: string;\n driver?: string;\n};\n\nexport type ExpectedArrivalRow = {\n vehicleId: string;\n stockNumber: string;\n title: string;\n /** Vehicle condition; null when it has not been recorded. */\n used: boolean | null;\n /** Main picture, else the first picture; the client appends the resize parameters. */\n pictureUrl?: string;\n /** The client reads the branch location for the maps origin. */\n branchId: string;\n currency: string;\n /** User id from `purchase.purchasedBy`; the client resolves name + avatar. */\n purchasedBy: string;\n supplier: { id: string; name: string };\n /** `deal.purchase`, exclusive VAT. */\n purchasePrice: number | null;\n /** Σ of the payment rows marked paid — what left the bank. */\n amountPaid: number;\n fullPaymentSentAt: string;\n firstPaymentSentAt?: string;\n daysSincePayment: number;\n sold: boolean;\n opportunityId?: string;\n clientOrgId?: string;\n clientName?: string;\n /** The purchase transport's delivery address, else the supplier's legal address. */\n pickupAddress?: { address: LocationValue; source: TransportLocationSource };\n deliveryType?: VehiclePurchaseDeliveryType;\n /** Direct supplier-to-client delivery: no purchase logistics, the sale delivery is the exit. */\n readyToDeliver: boolean;\n availableWeek?: string;\n /** The purchase transport for a park vehicle, the sale delivery for a direct delivery. */\n transport?: ExpectedArrivalTransport;\n};\n\n/** One month of arrivals, keyed by month of arrival. Percentiles cover the paid-first rows only. */\nexport type ArrivalsMonth = {\n /** `YYYY-MM`. */\n month: string;\n arrivals: number;\n /** Fully paid before arriving — the ones with a wait to measure. */\n paidFirst: number;\n arrivedBeforePaid: number;\n p50Days: number | null;\n p80Days: number | null;\n /** Paid-first arrivals that waited more than `ARRIVALS_LATE_AFTER_DAYS`. */\n late: number;\n};\n\n/** Days between the full payment and the arrival, over a window of arrivals. */\nexport type ArrivalsWait = { p50Days: number | null; p80Days: number | null };\n\nexport type ExpectedArrivalsReportResponse = {\n rows: ExpectedArrivalRow[];\n /** The last `ARRIVALS_HISTORY_MONTHS` months, oldest first, every month present. */\n history: ArrivalsMonth[];\n /** Over the last `ARRIVALS_USUAL_WAIT_MONTHS` full months of arrivals. */\n usualWait: ArrivalsWait;\n};\n\nexport type ExpectedArrivalsExportRequest = {\n vehicleIds: string[];\n};\n"]}
@@ -7,12 +7,9 @@ import { BaseSearchRequest, SortOrder } from './search.js';
7
7
  import { DataRecord, ReferenceData } from './utils.js';
8
8
  import { Vehicle, VehiclePurchase } from './vehicles.js';
9
9
  export declare enum TransportType {
10
- PurchasePickUp = "PURCHASE_PICK_UP",
11
- PurchaseDropOff = "PURCHASE_DROP_OFF",
12
- SaleDelivery = "SALE_DELIVERY"
10
+ Purchase = "PURCHASE",
11
+ Sale = "SALE"
13
12
  }
14
- export type TransportPurchaseType = TransportType.PurchasePickUp | TransportType.PurchaseDropOff;
15
- export declare const TransportPurchaseTypes: TransportPurchaseType[];
16
13
  export declare enum TransportStatus {
17
14
  Todo = "TODO",
18
15
  Planning = "PLANNING",
@@ -78,10 +75,10 @@ export type Transport = {
78
75
  updatedAt: string;
79
76
  updatedBy: string;
80
77
  } & ({
81
- type: TransportPurchaseType;
78
+ type: TransportType.Purchase;
82
79
  delivery: TransportPurchaseDeliveryType;
83
80
  } | {
84
- type: TransportType.SaleDelivery;
81
+ type: TransportType.Sale;
85
82
  delivery: TransportSalesDeliveryType;
86
83
  });
87
84
  export declare enum TransportWarningCode {
@@ -102,7 +99,6 @@ export declare enum TransportActions {
102
99
  SetBookingRef = "set_booking_ref"
103
100
  }
104
101
  export type TransportUpdate = {
105
- type?: TransportPurchaseType;
106
102
  delivery?: TransportSalesDeliveryType | TransportPurchaseDeliveryType;
107
103
  notes?: string | null;
108
104
  adminApproved?: boolean;
@@ -167,9 +163,16 @@ export type SearchTransport = {
167
163
  };
168
164
  };
169
165
  export type SearchTransportList = PaginatedList<SearchTransport, ReferenceData>;
166
+ export type KanbanTransportGroup = {
167
+ representative: SearchTransport;
168
+ items: SearchTransport[];
169
+ totalCount: number;
170
+ nextToken?: string;
171
+ };
170
172
  export type TransportKanbanColumn = {
171
173
  status: TransportStatus;
172
174
  results: SearchTransport[];
175
+ groups?: KanbanTransportGroup[];
173
176
  totalCount: number;
174
177
  };
175
178
  export type MSearchTransportsKanbanColumn = {
@@ -178,6 +181,7 @@ export type MSearchTransportsKanbanColumn = {
178
181
  };
179
182
  export type KanbanTransportsSearchRequest = BaseSearchRequest & {
180
183
  nextTokens?: Record<string, string | undefined>;
184
+ groupByOrganization?: boolean;
181
185
  statusSortBy?: Record<TransportStatus, {
182
186
  fieldId: string;
183
187
  order: SortOrder;
@@ -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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,9 @@
1
1
  import { SalesDeliveryTypes, } from './deliveries.js';
2
2
  export var TransportType;
3
3
  (function (TransportType) {
4
- TransportType["PurchasePickUp"] = "PURCHASE_PICK_UP";
5
- TransportType["PurchaseDropOff"] = "PURCHASE_DROP_OFF";
6
- TransportType["SaleDelivery"] = "SALE_DELIVERY";
4
+ TransportType["Purchase"] = "PURCHASE";
5
+ TransportType["Sale"] = "SALE";
7
6
  })(TransportType || (TransportType = {}));
8
- export const TransportPurchaseTypes = [
9
- TransportType.PurchasePickUp,
10
- TransportType.PurchaseDropOff,
11
- ];
12
7
  export var TransportStatus;
13
8
  (function (TransportStatus) {
14
9
  TransportStatus["Todo"] = "TODO";
@@ -1 +1 @@
1
- {"version":3,"file":"transports.js","sourceRoot":"/","sources":["types/transports.ts"],"names":[],"mappings":"AAEA,OAAO,EAKL,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;AAOzB,MAAM,CAAN,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,oDAAmC,CAAA;IACnC,sDAAqC,CAAA;IACrC,+CAA8B,CAAA;AAChC,CAAC,EAJW,aAAa,KAAb,aAAa,QAIxB;AAKD,MAAM,CAAC,MAAM,sBAAsB,GAA4B;IAC7D,aAAa,CAAC,cAAc;IAC5B,aAAa,CAAC,eAAe;CAC9B,CAAC;AAEF,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,eAAe,CAAC,iBAAiB;IACjC,eAAe,CAAC,eAAe;IAC/B,eAAe,CAAC,WAAW;CAC5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AuB;IACjC,+DAAoC,CAAA;IACpC,qDAA0B,CAAA;IAC1B,qDAA0B,CAAA;AAC5B,CAAC,EAJW,uBAAuB,KAAvB,uBAAuB,QAIlC","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 { BaseSearchRequest, SortOrder } from './search.js';\nimport { DataRecord, ReferenceData } from './utils.js';\nimport { Vehicle, VehiclePurchase } from './vehicles.js';\n\nexport enum TransportType {\n PurchasePickUp = 'PURCHASE_PICK_UP',\n PurchaseDropOff = 'PURCHASE_DROP_OFF',\n SaleDelivery = 'SALE_DELIVERY',\n}\n\n/** Both inbound journeys, whoever drives them. Mirrors the purchase's own delivery type. */\nexport type TransportPurchaseType = TransportType.PurchasePickUp | TransportType.PurchaseDropOff;\n\nexport const TransportPurchaseTypes: TransportPurchaseType[] = [\n TransportType.PurchasePickUp,\n TransportType.PurchaseDropOff,\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\ntype TransportDeliveryExtras = {\n cleaningNeeded?: boolean;\n driver?: 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 type Transport = {\n id: string;\n vehicleId: string;\n opportunityId?: 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: TransportPurchaseType;\n delivery: TransportPurchaseDeliveryType;\n }\n | {\n type: TransportType.SaleDelivery;\n delivery: TransportSalesDeliveryType;\n }\n);\n\nexport enum TransportWarningCode {\n PurchaseLogisticsNotReady = 'purchase_logistics_not_ready',\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 /** Changes the purchase method and the purchase agreement together. */\n type?: TransportPurchaseType;\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};\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/** 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 * 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};\n\nexport type SearchTransportList = PaginatedList<SearchTransport, ReferenceData>;\n\nexport type TransportKanbanColumn = {\n status: TransportStatus;\n results: SearchTransport[];\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 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;AAOzB,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,eAAe,CAAC,iBAAiB;IACjC,eAAe,CAAC,eAAe;IAC/B,eAAe,CAAC,WAAW;CAC5B,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,eAAe,CAAC,IAAI,CAAC;AAE1D,MAAM,CAAC,MAAM,yBAAyB,GAAsB,CAAC,qBAAqB,CAAC,CAAC;AACpF,MAAM,CAAC,MAAM,sBAAsB,GAAsB;IACvD,GAAG,oBAAoB;IACvB,GAAG,yBAAyB;CAC7B,CAAC;AAEF,MAAM,CAAN,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,sCAAiB,CAAA;IACjB,kCAAa,CAAA;IACb,sCAAiB,CAAA;AACnB,CAAC,EAJW,iBAAiB,KAAjB,iBAAiB,QAI5B;AA+BD,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,OAAO,EAAE,kBAAkB,CAAC,OAAO;IACnC,IAAI,EAAE,kBAAkB,CAAC,IAAI;IAC7B,WAAW,EAAE,kBAAkB,CAAC,aAAa;IAC7C,MAAM,EAAE,kBAAkB,CAAC,OAAO;CAC1B,CAAC;AAiDX,MAAM,CAAN,IAAY,oBAEX;AAFD,WAAY,oBAAoB;IAC9B,kFAA0D,CAAA;AAC5D,CAAC,EAFW,oBAAoB,KAApB,oBAAoB,QAE/B;AAgBD,MAAM,CAAN,IAAY,gBAUX;AAVD,WAAY,gBAAgB;IAE1B,gDAA4B,CAAA;IAC5B,0CAAsB,CAAA;IAEtB,gDAA4B,CAAA;IAE5B,4CAAwB,CAAA;IACxB,gDAA4B,CAAA;IAC5B,qDAAiC,CAAA;AACnC,CAAC,EAVW,gBAAgB,KAAhB,gBAAgB,QAU3B;AAuCD,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,CAAN,IAAY,uBAIX;AAJD,WAAY,uBAAuB;IACjC,+DAAoC,CAAA;IACpC,qDAA0B,CAAA;IAC1B,qDAA0B,CAAA;AAC5B,CAAC,EAJW,uBAAuB,KAAvB,uBAAuB,QAIlC","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 { BaseSearchRequest, 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\ntype TransportDeliveryExtras = {\n cleaningNeeded?: boolean;\n driver?: 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 type Transport = {\n id: string;\n vehicleId: string;\n opportunityId?: 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}\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};\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/** 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 * 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};\n\nexport type SearchTransportList = PaginatedList<SearchTransport, ReferenceData>;\n\nexport type KanbanTransportGroup = {\n representative: SearchTransport;\n items: SearchTransport[];\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: SearchTransport[];\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,3 +1,4 @@
1
- import { AddressDeliveryType, PurchaseDeliveryType, PurchaseDeliveryTypes, SalesDeliveryType, SalesDeliveryTypes } from '../types/deliveries.js';
1
+ import { AddressDeliveryType, PortDeliverytype, PurchaseDeliveryType, PurchaseDeliveryTypes, SalesDeliveryType, SalesDeliveryTypes } from '../types/deliveries.js';
2
2
  export declare const isAddressDelivery: (delivery?: PurchaseDeliveryType | SalesDeliveryType) => delivery is AddressDeliveryType<PurchaseDeliveryTypes.ADDRESS | SalesDeliveryTypes.ADDRESS>;
3
+ export declare const isPortDelivery: (delivery?: PurchaseDeliveryType | SalesDeliveryType) => delivery is PortDeliverytype;
3
4
  //# sourceMappingURL=deliveries.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"deliveries.d.ts","sourceRoot":"/","sources":["utils/deliveries.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,wBAAwB,CAAC;AAGhC,eAAO,MAAM,iBAAiB,cACjB,oBAAoB,GAAG,iBAAiB,KAClD,QAAQ,IAAI,mBAAmB,CAAC,qBAAqB,CAAC,OAAO,GAAG,kBAAkB,CAAC,OAAO,CACM,CAAC"}
1
+ {"version":3,"file":"deliveries.d.ts","sourceRoot":"/","sources":["utils/deliveries.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,wBAAwB,CAAC;AAGhC,eAAO,MAAM,iBAAiB,cACjB,oBAAoB,GAAG,iBAAiB,KAClD,QAAQ,IAAI,mBAAmB,CAAC,qBAAqB,CAAC,OAAO,GAAG,kBAAkB,CAAC,OAAO,CACM,CAAC;AAEpG,eAAO,MAAM,cAAc,cACd,oBAAoB,GAAG,iBAAiB,KAClD,QAAQ,IAAI,gBACoF,CAAC"}
@@ -1,3 +1,4 @@
1
1
  import { PurchaseDeliveryTypes, SalesDeliveryTypes, } from '../types/deliveries.js';
2
2
  export const isAddressDelivery = (delivery) => delivery?.type === PurchaseDeliveryTypes.ADDRESS || delivery?.type === SalesDeliveryTypes.ADDRESS;
3
+ export const isPortDelivery = (delivery) => delivery?.type === SalesDeliveryTypes.PORT || delivery?.type === SalesDeliveryTypes.PORT_AND_SHIP;
3
4
  //# sourceMappingURL=deliveries.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"deliveries.js","sourceRoot":"/","sources":["utils/deliveries.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,qBAAqB,EAErB,kBAAkB,GACnB,MAAM,wBAAwB,CAAC;AAGhC,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,QAAmD,EAC0C,EAAE,CAC/F,QAAQ,EAAE,IAAI,KAAK,qBAAqB,CAAC,OAAO,IAAI,QAAQ,EAAE,IAAI,KAAK,kBAAkB,CAAC,OAAO,CAAC","sourcesContent":["import {\n AddressDeliveryType,\n PurchaseDeliveryType,\n PurchaseDeliveryTypes,\n SalesDeliveryType,\n SalesDeliveryTypes,\n} from '../types/deliveries.js';\n\n/** Purchase collection and sales delivery share the same stored address fields. */\nexport const isAddressDelivery = (\n delivery?: PurchaseDeliveryType | SalesDeliveryType,\n): delivery is AddressDeliveryType<PurchaseDeliveryTypes.ADDRESS | SalesDeliveryTypes.ADDRESS> =>\n delivery?.type === PurchaseDeliveryTypes.ADDRESS || delivery?.type === SalesDeliveryTypes.ADDRESS;\n"]}
1
+ {"version":3,"file":"deliveries.js","sourceRoot":"/","sources":["utils/deliveries.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,qBAAqB,EAErB,kBAAkB,GACnB,MAAM,wBAAwB,CAAC;AAGhC,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,QAAmD,EAC0C,EAAE,CAC/F,QAAQ,EAAE,IAAI,KAAK,qBAAqB,CAAC,OAAO,IAAI,QAAQ,EAAE,IAAI,KAAK,kBAAkB,CAAC,OAAO,CAAC;AAEpG,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,QAAmD,EACrB,EAAE,CAChC,QAAQ,EAAE,IAAI,KAAK,kBAAkB,CAAC,IAAI,IAAI,QAAQ,EAAE,IAAI,KAAK,kBAAkB,CAAC,aAAa,CAAC","sourcesContent":["import {\n AddressDeliveryType,\n PortDeliverytype,\n PurchaseDeliveryType,\n PurchaseDeliveryTypes,\n SalesDeliveryType,\n SalesDeliveryTypes,\n} from '../types/deliveries.js';\n\n/** Purchase collection and sales delivery share the same stored address fields. */\nexport const isAddressDelivery = (\n delivery?: PurchaseDeliveryType | SalesDeliveryType,\n): delivery is AddressDeliveryType<PurchaseDeliveryTypes.ADDRESS | SalesDeliveryTypes.ADDRESS> =>\n delivery?.type === PurchaseDeliveryTypes.ADDRESS || delivery?.type === SalesDeliveryTypes.ADDRESS;\n\nexport const isPortDelivery = (\n delivery?: PurchaseDeliveryType | SalesDeliveryType,\n): delivery is PortDeliverytype =>\n delivery?.type === SalesDeliveryTypes.PORT || delivery?.type === SalesDeliveryTypes.PORT_AND_SHIP;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"reports-arrivals.d.ts","sourceRoot":"/","sources":["utils/reports-arrivals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAIlE,eAAO,MAAM,sBAAsB,QAC5B,kBAAkB,KACtB,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,SAYpC,CAAC"}
1
+ {"version":3,"file":"reports-arrivals.d.ts","sourceRoot":"/","sources":["utils/reports-arrivals.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAIlE,eAAO,MAAM,sBAAsB,QAC5B,kBAAkB,KACtB,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,SAepC,CAAC"}
@@ -1,12 +1,16 @@
1
+ import { PurchaseDeliveryTypes } from '../types/deliveries.js';
1
2
  import { TransportType } from '../types/transports.js';
2
3
  export const getArrivalDeliveryType = (row) => {
3
4
  if (row.readyToDeliver) {
4
5
  return 'direct';
5
6
  }
6
- switch (row.transport?.type) {
7
- case TransportType.PurchasePickUp:
7
+ if (row.transport?.type !== TransportType.Purchase) {
8
+ return undefined;
9
+ }
10
+ switch (row.transport.delivery.type) {
11
+ case PurchaseDeliveryTypes.ADDRESS:
8
12
  return 'pickUp';
9
- case TransportType.PurchaseDropOff:
13
+ case PurchaseDeliveryTypes.DROP_OFF:
10
14
  return 'dropOff';
11
15
  default:
12
16
  return undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"reports-arrivals.js","sourceRoot":"/","sources":["utils/reports-arrivals.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAGvD,MAAM,CAAC,MAAM,sBAAsB,GAAG,CACpC,GAAuB,EACsB,EAAE;IAC/C,IAAI,GAAG,CAAC,cAAc,EAAE,CAAC;QACvB,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,QAAQ,GAAG,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC;QAC5B,KAAK,aAAa,CAAC,cAAc;YAC/B,OAAO,QAAQ,CAAC;QAClB,KAAK,aAAa,CAAC,eAAe;YAChC,OAAO,SAAS,CAAC;QACnB;YACE,OAAO,SAAS,CAAC;IACrB,CAAC;AACH,CAAC,CAAC","sourcesContent":["import { ExpectedArrivalRow } from '../types/reports-arrivals.js';\nimport { TransportType } from '../types/transports.js';\n\n/** Pick up and drop off come from the transport; direct-to-client deliveries stay separate. */\nexport const getArrivalDeliveryType = (\n row: ExpectedArrivalRow,\n): 'pickUp' | 'dropOff' | 'direct' | undefined => {\n if (row.readyToDeliver) {\n return 'direct';\n }\n switch (row.transport?.type) {\n case TransportType.PurchasePickUp:\n return 'pickUp';\n case TransportType.PurchaseDropOff:\n return 'dropOff';\n default:\n return undefined;\n }\n};\n"]}
1
+ {"version":3,"file":"reports-arrivals.js","sourceRoot":"/","sources":["utils/reports-arrivals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAGvD,MAAM,CAAC,MAAM,sBAAsB,GAAG,CACpC,GAAuB,EACsB,EAAE;IAC/C,IAAI,GAAG,CAAC,cAAc,EAAE,CAAC;QACvB,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,IAAI,GAAG,CAAC,SAAS,EAAE,IAAI,KAAK,aAAa,CAAC,QAAQ,EAAE,CAAC;QACnD,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,QAAQ,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;QACpC,KAAK,qBAAqB,CAAC,OAAO;YAChC,OAAO,QAAQ,CAAC;QAClB,KAAK,qBAAqB,CAAC,QAAQ;YACjC,OAAO,SAAS,CAAC;QACnB;YACE,OAAO,SAAS,CAAC;IACrB,CAAC;AACH,CAAC,CAAC","sourcesContent":["import { PurchaseDeliveryTypes } from '../types/deliveries.js';\nimport { ExpectedArrivalRow } from '../types/reports-arrivals.js';\nimport { TransportType } from '../types/transports.js';\n\n/** Pick up and drop off come from the transport; direct-to-client deliveries stay separate. */\nexport const getArrivalDeliveryType = (\n row: ExpectedArrivalRow,\n): 'pickUp' | 'dropOff' | 'direct' | undefined => {\n if (row.readyToDeliver) {\n return 'direct';\n }\n if (row.transport?.type !== TransportType.Purchase) {\n return undefined;\n }\n switch (row.transport.delivery.type) {\n case PurchaseDeliveryTypes.ADDRESS:\n return 'pickUp';\n case PurchaseDeliveryTypes.DROP_OFF:\n return 'dropOff';\n default:\n return undefined;\n }\n};\n"]}
@@ -2,6 +2,9 @@ import { Opportunity } from '../types/opportunities.js';
2
2
  import { SearchTransport, Transport } from '../types/transports.js';
3
3
  import { VehiclePurchase } from '../types/vehicles.js';
4
4
  export declare const isPurchaseTransport: (transport: Pick<Transport, 'type'>) => boolean;
5
+ export declare const isPurchaseDropOffTransport: (transport: Pick<Transport, 'type'> & {
6
+ delivery: Pick<Transport['delivery'], 'type'>;
7
+ }) => boolean;
5
8
  export declare const isTransportCompleted: (transport: Transport, context: {
6
9
  opportunity?: Opportunity;
7
10
  purchase?: VehiclePurchase;
@@ -1 +1 @@
1
- {"version":3,"file":"transports.d.ts","sourceRoot":"/","sources":["utils/transports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,SAAS,EAAiB,MAAM,wBAAwB,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAOvD,eAAO,MAAM,mBAAmB,cAAe,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,KAAG,OAC1B,CAAC;AAchD,eAAO,MAAM,oBAAoB,cACpB,SAAS,WACX;IAAE,WAAW,CAAC,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,EAAE,eAAe,CAAA;CAAE,KACjE,OAMF,CAAC;AAGF,eAAO,MAAM,0BAA0B,WAAY,eAAe,KAAG,OAIjE,CAAC"}
1
+ {"version":3,"file":"transports.d.ts","sourceRoot":"/","sources":["utils/transports.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,SAAS,EAAiB,MAAM,wBAAwB,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAGvD,eAAO,MAAM,mBAAmB,cAAe,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,KAAG,OAC9B,CAAC;AAE5C,eAAO,MAAM,0BAA0B,cAC1B,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,GAAG;IAAE,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,CAAA;CAAE,KACrF,OAC2F,CAAC;AAc/F,eAAO,MAAM,oBAAoB,cACpB,SAAS,WACX;IAAE,WAAW,CAAC,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,EAAE,eAAe,CAAA;CAAE,KACjE,OAMF,CAAC;AAGF,eAAO,MAAM,0BAA0B,WAAY,eAAe,KAAG,OAIjE,CAAC"}
@@ -1,8 +1,10 @@
1
+ import { PurchaseDeliveryTypes } from '../types/deliveries.js';
1
2
  import { TransportType } from '../types/transports.js';
2
3
  import { hasPurchaseArrived } from './vehicles.js';
3
- export const isPurchaseTransport = (transport) => transport.type !== TransportType.SaleDelivery;
4
+ export const isPurchaseTransport = (transport) => transport.type === TransportType.Purchase;
5
+ export const isPurchaseDropOffTransport = (transport) => isPurchaseTransport(transport) && transport.delivery.type === PurchaseDeliveryTypes.DROP_OFF;
4
6
  export const isTransportCompleted = (transport, context) => {
5
- if (transport.type === TransportType.SaleDelivery) {
7
+ if (transport.type === TransportType.Sale) {
6
8
  return context.opportunity?.deliveredAt != null;
7
9
  }
8
10
  return context.purchase != null && hasPurchaseArrived(context.purchase);
@@ -1 +1 @@
1
- {"version":3,"file":"transports.js","sourceRoot":"/","sources":["utils/transports.ts"],"names":[],"mappings":"AACA,OAAO,EAA8B,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAMnD,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,SAAkC,EAAW,EAAE,CACjF,SAAS,CAAC,IAAI,KAAK,aAAa,CAAC,YAAY,CAAC;AAchD,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,SAAoB,EACpB,OAAkE,EACzD,EAAE;IACX,IAAI,SAAS,CAAC,IAAI,KAAK,aAAa,CAAC,YAAY,EAAE,CAAC;QAClD,OAAO,OAAO,CAAC,WAAW,EAAE,WAAW,IAAI,IAAI,CAAC;IAClD,CAAC;IAED,OAAO,OAAO,CAAC,QAAQ,IAAI,IAAI,IAAI,kBAAkB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC1E,CAAC,CAAC;AAGF,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,MAAuB,EAAW,EAAE,CAC7E,oBAAoB,CAAC,MAAM,CAAC,SAAS,EAAE;IACrC,WAAW,EAAE,MAAM,CAAC,WAAW;IAC/B,QAAQ,EAAE,MAAM,CAAC,QAAQ;CAC1B,CAAC,CAAC","sourcesContent":["import { Opportunity } from '../types/opportunities.js';\nimport { SearchTransport, Transport, TransportType } from '../types/transports.js';\nimport { VehiclePurchase } from '../types/vehicles.js';\nimport { hasPurchaseArrived } from './vehicles.js';\n\n/**\n * Both purchase types bring a vehicle to our park: we collect a pickup, and the supplier brings\n * a drop-off. They share the purchase payment and arrival rules.\n */\nexport const isPurchaseTransport = (transport: Pick<Transport, 'type'>): boolean =>\n transport.type !== TransportType.SaleDelivery;\n\n/**\n * A transport is finished when the journey it describes has demonstrably happened: the customer has\n * the vehicle for a sale delivery, the vehicle is on our park for a purchase. From then on\n * the record is history and the server refuses edits to it.\n *\n * Not the same thing as the transport's own `doneAt`. Delivery can be declared on the opportunity\n * (a CMR, a delivery confirmation) and arrival on the purchase, without the transport ever being\n * moved — and reversing either of those is what unlocks the transport again, which a status stamped\n * on the transport itself could not express.\n *\n * Shared so the board, the drawer and the server all answer the question the same way.\n */\nexport const isTransportCompleted = (\n transport: Transport,\n context: { opportunity?: Opportunity; purchase?: VehiclePurchase },\n): boolean => {\n if (transport.type === TransportType.SaleDelivery) {\n return context.opportunity?.deliveredAt != null;\n }\n\n return context.purchase != null && hasPurchaseArrived(context.purchase);\n};\n\n/** The same question asked of a search document, which already carries both sides. */\nexport const isSearchTransportCompleted = (record: SearchTransport): boolean =>\n isTransportCompleted(record.transport, {\n opportunity: record.opportunity,\n purchase: record.purchase,\n });\n"]}
1
+ {"version":3,"file":"transports.js","sourceRoot":"/","sources":["utils/transports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,OAAO,EAA8B,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,SAAkC,EAAW,EAAE,CACjF,SAAS,CAAC,IAAI,KAAK,aAAa,CAAC,QAAQ,CAAC;AAE5C,MAAM,CAAC,MAAM,0BAA0B,GAAG,CACxC,SAAsF,EAC7E,EAAE,CACX,mBAAmB,CAAC,SAAS,CAAC,IAAI,SAAS,CAAC,QAAQ,CAAC,IAAI,KAAK,qBAAqB,CAAC,QAAQ,CAAC;AAc/F,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,SAAoB,EACpB,OAAkE,EACzD,EAAE;IACX,IAAI,SAAS,CAAC,IAAI,KAAK,aAAa,CAAC,IAAI,EAAE,CAAC;QAC1C,OAAO,OAAO,CAAC,WAAW,EAAE,WAAW,IAAI,IAAI,CAAC;IAClD,CAAC;IAED,OAAO,OAAO,CAAC,QAAQ,IAAI,IAAI,IAAI,kBAAkB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC1E,CAAC,CAAC;AAGF,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,MAAuB,EAAW,EAAE,CAC7E,oBAAoB,CAAC,MAAM,CAAC,SAAS,EAAE;IACrC,WAAW,EAAE,MAAM,CAAC,WAAW;IAC/B,QAAQ,EAAE,MAAM,CAAC,QAAQ;CAC1B,CAAC,CAAC","sourcesContent":["import { PurchaseDeliveryTypes } from '../types/deliveries.js';\nimport { Opportunity } from '../types/opportunities.js';\nimport { SearchTransport, Transport, TransportType } from '../types/transports.js';\nimport { VehiclePurchase } from '../types/vehicles.js';\nimport { hasPurchaseArrived } from './vehicles.js';\n\nexport const isPurchaseTransport = (transport: Pick<Transport, 'type'>): boolean =>\n transport.type === TransportType.Purchase;\n\nexport const isPurchaseDropOffTransport = (\n transport: Pick<Transport, 'type'> & { delivery: Pick<Transport['delivery'], 'type'> },\n): boolean =>\n isPurchaseTransport(transport) && transport.delivery.type === PurchaseDeliveryTypes.DROP_OFF;\n\n/**\n * A transport is finished when the journey it describes has demonstrably happened: the customer has\n * the vehicle for a sale delivery, the vehicle is on our park for a purchase. From then on\n * the record is history and the server refuses edits to it.\n *\n * Not the same thing as the transport's own `doneAt`. Delivery can be declared on the opportunity\n * (a CMR, a delivery confirmation) and arrival on the purchase, without the transport ever being\n * moved — and reversing either of those is what unlocks the transport again, which a status stamped\n * on the transport itself could not express.\n *\n * Shared so the board, the drawer and the server all answer the question the same way.\n */\nexport const isTransportCompleted = (\n transport: Transport,\n context: { opportunity?: Opportunity; purchase?: VehiclePurchase },\n): boolean => {\n if (transport.type === TransportType.Sale) {\n return context.opportunity?.deliveredAt != null;\n }\n\n return context.purchase != null && hasPurchaseArrived(context.purchase);\n};\n\n/** The same question asked of a search document, which already carries both sides. */\nexport const isSearchTransportCompleted = (record: SearchTransport): boolean =>\n isTransportCompleted(record.transport, {\n opportunity: record.opportunity,\n purchase: record.purchase,\n });\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bisondesk/core-sdk",
3
- "version": "1.0.658",
3
+ "version": "1.0.659",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "author": "TheTruckCompany",
@@ -0,0 +1,13 @@
1
+ export var ActivityType;
2
+ (function (ActivityType) {
3
+ ActivityType["CALL"] = "call";
4
+ ActivityType["MEETING"] = "meeting";
5
+ ActivityType["EMAIL"] = "email";
6
+ ActivityType["CHAT"] = "chat";
7
+ })(ActivityType || (ActivityType = {}));
8
+ export var ActivityActions;
9
+ (function (ActivityActions) {
10
+ ActivityActions["DELETE"] = "delete";
11
+ ActivityActions["EDIT"] = "edit";
12
+ })(ActivityActions || (ActivityActions = {}));
13
+ //# sourceMappingURL=activities.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activities.js","sourceRoot":"","sources":["activities.ts"],"names":[],"mappings":"AAGA,MAAM,CAAN,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,6BAAa,CAAA;IACb,mCAAmB,CAAA;IACnB,+BAAe,CAAA;IACf,6BAAa,CAAA;AACf,CAAC,EALW,YAAY,KAAZ,YAAY,QAKvB;AAED,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,gCAAa,CAAA;AACf,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=comparables.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comparables.js","sourceRoot":"","sources":["comparables.ts"],"names":[],"mappings":""}
@@ -0,0 +1,58 @@
1
+ export var OrganizatioRiskTags;
2
+ (function (OrganizatioRiskTags) {
3
+ OrganizatioRiskTags["BAD_FINANCIAL_INFO"] = "BAD_FINANCIAL_INFO";
4
+ OrganizatioRiskTags["VAT_NUMBER_INVALID"] = "VAT_NUMBER_INVALID";
5
+ OrganizatioRiskTags["INSTINCT"] = "INSTINCT";
6
+ OrganizatioRiskTags["NEW_CUSTOMER"] = "NEW_CUSTOMER";
7
+ OrganizatioRiskTags["BANK_ACCOUNT_BLOCKED"] = "BANK_ACCOUNT_BLOCKED";
8
+ OrganizatioRiskTags["NO_GPS"] = "NO_GPS";
9
+ })(OrganizatioRiskTags || (OrganizatioRiskTags = {}));
10
+ export var ContactActions;
11
+ (function (ContactActions) {
12
+ ContactActions["UPSERT"] = "upsert";
13
+ ContactActions["DELETE"] = "delete";
14
+ })(ContactActions || (ContactActions = {}));
15
+ export var OrganizationActions;
16
+ (function (OrganizationActions) {
17
+ OrganizationActions["ADD_ACTIVITY"] = "add_activity";
18
+ OrganizationActions["UPSERT"] = "upsert";
19
+ OrganizationActions["DELETE"] = "delete";
20
+ OrganizationActions["SELL_TO_ORGANIZATION"] = "sell_to_organization";
21
+ })(OrganizationActions || (OrganizationActions = {}));
22
+ export var MarketingChannel;
23
+ (function (MarketingChannel) {
24
+ MarketingChannel["Email"] = "email";
25
+ MarketingChannel["Whatsapp"] = "whatsapp";
26
+ MarketingChannel["Sms"] = "sms";
27
+ MarketingChannel["Phone"] = "phone";
28
+ })(MarketingChannel || (MarketingChannel = {}));
29
+ export var PartnerLevel;
30
+ (function (PartnerLevel) {
31
+ PartnerLevel["Internal"] = "05-internal";
32
+ PartnerLevel["Gold"] = "10-gold";
33
+ PartnerLevel["Silver"] = "20-silver";
34
+ PartnerLevel["Bronze"] = "30-bronze";
35
+ })(PartnerLevel || (PartnerLevel = {}));
36
+ export var SaveContactResolution;
37
+ (function (SaveContactResolution) {
38
+ SaveContactResolution["IgnoreDuplicates"] = "IGNORE_DUPLICATES";
39
+ SaveContactResolution["BlockDuplicates"] = "BLOCK_DUPLICATES";
40
+ })(SaveContactResolution || (SaveContactResolution = {}));
41
+ export var SaveOrgResolution;
42
+ (function (SaveOrgResolution) {
43
+ SaveOrgResolution["IgnoreDuplicates"] = "IGNORE_DUPLICATES";
44
+ SaveOrgResolution["BlockDuplicates"] = "BLOCK_DUPLICATES";
45
+ })(SaveOrgResolution || (SaveOrgResolution = {}));
46
+ export var CrmSearchScope;
47
+ (function (CrmSearchScope) {
48
+ CrmSearchScope["Tenant"] = "tenant";
49
+ CrmSearchScope["Conglomerate"] = "conglomerate";
50
+ })(CrmSearchScope || (CrmSearchScope = {}));
51
+ export var OrgEngagementType;
52
+ (function (OrgEngagementType) {
53
+ OrgEngagementType["offers"] = "offers";
54
+ OrgEngagementType["purchases"] = "purchases";
55
+ OrgEngagementType["opportunities"] = "opportunities";
56
+ OrgEngagementType["sales"] = "sales";
57
+ })(OrgEngagementType || (OrgEngagementType = {}));
58
+ //# sourceMappingURL=crm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crm.js","sourceRoot":"","sources":["crm.ts"],"names":[],"mappings":"AAUA,MAAM,CAAN,IAAY,mBAOX;AAPD,WAAY,mBAAmB;IAC7B,gEAAyC,CAAA;IACzC,gEAAyC,CAAA;IACzC,4CAAqB,CAAA;IACrB,oDAA6B,CAAA;IAC7B,oEAA6C,CAAA;IAC7C,wCAAiB,CAAA;AACnB,CAAC,EAPW,mBAAmB,KAAnB,mBAAmB,QAO9B;AAED,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,mCAAiB,CAAA;IACjB,mCAAiB,CAAA;AACnB,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AAED,MAAM,CAAN,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC7B,oDAA6B,CAAA;IAC7B,wCAAiB,CAAA;IACjB,wCAAiB,CAAA;IACjB,oEAA6C,CAAA;AAC/C,CAAC,EALW,mBAAmB,KAAnB,mBAAmB,QAK9B;AAgKD,MAAM,CAAN,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC1B,mCAAe,CAAA;IACf,yCAAqB,CAAA;IACrB,+BAAW,CAAA;IACX,mCAAe,CAAA;AACjB,CAAC,EALW,gBAAgB,KAAhB,gBAAgB,QAK3B;AAWD,MAAM,CAAN,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,wCAAwB,CAAA;IACxB,gCAAgB,CAAA;IAChB,oCAAoB,CAAA;IACpB,oCAAoB,CAAA;AACtB,CAAC,EALW,YAAY,KAAZ,YAAY,QAKvB;AA6CD,MAAM,CAAN,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC/B,+DAAsC,CAAA;IACtC,6DAAoC,CAAA;AACtC,CAAC,EAHW,qBAAqB,KAArB,qBAAqB,QAGhC;AAED,MAAM,CAAN,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,2DAAsC,CAAA;IACtC,yDAAoC,CAAA;AACtC,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,QAG5B;AAED,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,mCAAiB,CAAA;IACjB,+CAA6B,CAAA;AAC/B,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AAED,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,sCAAiB,CAAA;IACjB,4CAAuB,CAAA;IACvB,oDAA+B,CAAA;IAC/B,oCAAe,CAAA;AACjB,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=dashboard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard.js","sourceRoot":"","sources":["dashboard.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export * from '@bisondesk/commons-sdk/definitions';
2
+ //# sourceMappingURL=definitions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["definitions.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC"}
@@ -1,13 +1,16 @@
1
1
  import { LocationValue } from '@bisondesk/commons-sdk/types';
2
2
 
3
+ /** Supplier drop-off and customer pickup both take place at our park. */
4
+ export const PARK_DELIVERY_TYPE = 'park';
5
+
3
6
  /** Supplier collection keeps the existing address value in stored transports. */
4
7
  export enum PurchaseDeliveryTypes {
5
8
  ADDRESS = 'address',
6
- DROP_OFF = 'park',
9
+ DROP_OFF = PARK_DELIVERY_TYPE,
7
10
  }
8
11
 
9
12
  export enum SalesDeliveryTypes {
10
- PICK_UP = 'park',
13
+ PICK_UP = PARK_DELIVERY_TYPE,
11
14
  ADDRESS = 'address',
12
15
  PORT = 'port',
13
16
  PORT_AND_SHIP = 'portAndShip',
@@ -58,6 +61,12 @@ export type AddressDeliveryType<
58
61
  technicalControlNeeded: boolean;
59
62
  };
60
63
 
64
+ export const ADDRESS_DELIVERY_FIELDS = [
65
+ 'address',
66
+ 'distanceKm',
67
+ 'technicalControlNeeded',
68
+ ] as const satisfies readonly (keyof AddressDeliveryType)[];
69
+
61
70
  export type PortDeliverytype = BaseDeliveryType & {
62
71
  type: SalesDeliveryTypes.PORT | SalesDeliveryTypes.PORT_AND_SHIP;
63
72
  portOriginId: string;
@@ -0,0 +1,2 @@
1
+ export * from '@bisondesk/commons-sdk/fields';
2
+ //# sourceMappingURL=fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["fields.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=insights.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"insights.js","sourceRoot":"","sources":["insights.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ export var InterestActions;
2
+ (function (InterestActions) {
3
+ InterestActions["SET_INTEREST"] = "set_interest";
4
+ })(InterestActions || (InterestActions = {}));
5
+ export const isOpportunityInterest = (interest) => 'opportunityId' in interest;
6
+ //# sourceMappingURL=interests.js.map