@bisondesk/core-sdk 1.0.662 → 1.0.664

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 (76) hide show
  1. package/lib/types/transports.d.ts +4 -0
  2. package/lib/types/transports.d.ts.map +1 -1
  3. package/lib/types/transports.js.map +1 -1
  4. package/package.json +1 -1
  5. package/src/types/transports.ts +8 -0
  6. package/tsconfig.tsbuildinfo +1 -1
  7. package/src/types/activities.js +0 -13
  8. package/src/types/activities.js.map +0 -1
  9. package/src/types/comparables.js +0 -2
  10. package/src/types/comparables.js.map +0 -1
  11. package/src/types/crm.js +0 -58
  12. package/src/types/crm.js.map +0 -1
  13. package/src/types/dashboard.js +0 -2
  14. package/src/types/dashboard.js.map +0 -1
  15. package/src/types/definitions.js +0 -2
  16. package/src/types/definitions.js.map +0 -1
  17. package/src/types/fields.js +0 -2
  18. package/src/types/fields.js.map +0 -1
  19. package/src/types/insights.js +0 -2
  20. package/src/types/insights.js.map +0 -1
  21. package/src/types/interests.js +0 -6
  22. package/src/types/interests.js.map +0 -1
  23. package/src/types/internal-events.js +0 -18
  24. package/src/types/internal-events.js.map +0 -1
  25. package/src/types/internet-opportunities.js +0 -2
  26. package/src/types/internet-opportunities.js.map +0 -1
  27. package/src/types/internet-vehicles.js +0 -2
  28. package/src/types/internet-vehicles.js.map +0 -1
  29. package/src/types/leasing-administration.js +0 -2
  30. package/src/types/leasing-administration.js.map +0 -1
  31. package/src/types/leasing-debtors.js +0 -2
  32. package/src/types/leasing-debtors.js.map +0 -1
  33. package/src/types/leasing-search.js +0 -2
  34. package/src/types/leasing-search.js.map +0 -1
  35. package/src/types/leasing-settings.js +0 -7
  36. package/src/types/leasing-settings.js.map +0 -1
  37. package/src/types/leasing.js +0 -38
  38. package/src/types/leasing.js.map +0 -1
  39. package/src/types/marketing.js +0 -35
  40. package/src/types/marketing.js.map +0 -1
  41. package/src/types/offers.js +0 -56
  42. package/src/types/opportunities.js +0 -107
  43. package/src/types/opportunities.js.map +0 -1
  44. package/src/types/payments.js +0 -7
  45. package/src/types/picklists.js +0 -2
  46. package/src/types/picklists.js.map +0 -1
  47. package/src/types/quotes.js +0 -42
  48. package/src/types/recently-viewed.js +0 -2
  49. package/src/types/recently-viewed.js.map +0 -1
  50. package/src/types/reservations.js +0 -5
  51. package/src/types/reservations.js.map +0 -1
  52. package/src/types/roi-ratings.js +0 -5
  53. package/src/types/roi-ratings.js.map +0 -1
  54. package/src/types/saved-filters.js +0 -9
  55. package/src/types/saved-filters.js.map +0 -1
  56. package/src/types/search.js +0 -2
  57. package/src/types/search.js.map +0 -1
  58. package/src/types/settings.js +0 -2
  59. package/src/types/settings.js.map +0 -1
  60. package/src/types/templates.js +0 -2
  61. package/src/types/templates.js.map +0 -1
  62. package/src/types/tenants.js +0 -21
  63. package/src/types/tenants.js.map +0 -1
  64. package/src/types/user-performance.js +0 -7
  65. package/src/types/user-performance.js.map +0 -1
  66. package/src/types/utils.js +0 -2
  67. package/src/types/validation.js +0 -2
  68. package/src/types/validation.js.map +0 -1
  69. package/src/types/vehicle-sales.js +0 -6
  70. package/src/types/vehicle-sales.js.map +0 -1
  71. package/src/types/vehicles.js +0 -98
  72. package/src/types/vehicles.js.map +0 -1
  73. package/src/utils/leasing.js +0 -6
  74. package/src/utils/leasing.js.map +0 -1
  75. package/src/utils/opportunities.js +0 -48
  76. package/src/utils/opportunities.js.map +0 -1
@@ -160,6 +160,10 @@ export type SearchTransport = {
160
160
  paymentStatus: TransportPaymentStatus;
161
161
  location?: Pick<GPSCoord, 'lat' | 'lon'>;
162
162
  locationSource?: TransportLocationSource;
163
+ intercompany?: {
164
+ tenantName: string;
165
+ branchName: string;
166
+ };
163
167
  };
164
168
  };
165
169
  export type SearchTransportList = PaginatedList<SearchTransport, ReferenceData>;
@@ -1 +1 @@
1
- {"version":3,"file":"transports.d.ts","sourceRoot":"/","sources":["types/transports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAA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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
+ {"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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,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 * 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\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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bisondesk/core-sdk",
3
- "version": "1.0.662",
3
+ "version": "1.0.664",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "author": "TheTruckCompany",
@@ -255,6 +255,14 @@ export type SearchTransport = {
255
255
  */
256
256
  location?: Pick<GPSCoord, 'lat' | 'lon'>;
257
257
  locationSource?: TransportLocationSource;
258
+ /**
259
+ * Set when the organization is one of the group's own branches. Names rather than ids: the
260
+ * branch usually belongs to another tenant, which the client cannot look up.
261
+ */
262
+ intercompany?: {
263
+ tenantName: string;
264
+ branchName: string;
265
+ };
258
266
  };
259
267
  };
260
268