@autobusal/providers 1.36.0 → 1.37.0
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.
- package/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/types/operators.ts +9 -0
- package/types/shipments.ts +57 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.37.0
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- **Shipments types** (`ShipmentData`, `ShipmentStatus`, `SHIPMENT_STATUSES`, `ShipmentHistoryData`, etc.) for the new operator shipping module - see `@autobusal/operator-shipments` and `@autobusal/track-shipment`.
|
|
8
|
+
- **`OperatorData.mobile_access` / `OperatorData.shipping_enabled`** - both admin-only booleans, properly typed now rather than one of them (`mobile_access`) being narrow-cast at its one call site to avoid a cross-repo publish that this release needed anyway.
|
|
9
|
+
|
|
3
10
|
## 1.36.0
|
|
4
11
|
|
|
5
12
|
### Added
|
package/package.json
CHANGED
package/types/operators.ts
CHANGED
|
@@ -42,6 +42,15 @@ export interface OperatorData {
|
|
|
42
42
|
user: UserData
|
|
43
43
|
funds_display: string
|
|
44
44
|
logo?: string[]
|
|
45
|
+
// Edited: Ferjolt Ozuni - Date: 2026-08-10
|
|
46
|
+
// Both admin-only, both booleans - whether this operator (and its
|
|
47
|
+
// employees) may use the mobile apps, and whether it sees the
|
|
48
|
+
// Shipments module at all. Previously mobile_access was left off this
|
|
49
|
+
// shared type deliberately, to avoid a cross-repo publish for a single
|
|
50
|
+
// field - no longer a reason to exclude it now that this file is
|
|
51
|
+
// already being published for shipping_enabled.
|
|
52
|
+
mobile_access?: boolean
|
|
53
|
+
shipping_enabled?: boolean
|
|
45
54
|
}
|
|
46
55
|
|
|
47
56
|
export interface GalleryData {
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export const SHIPMENT_STATUSES = [
|
|
2
|
+
'registered', 'picked_up', 'in_transit', 'arrived', 'delivered', 'returned', 'cancelled'
|
|
3
|
+
] as const;
|
|
4
|
+
|
|
5
|
+
export type ShipmentStatus = typeof SHIPMENT_STATUSES[number]
|
|
6
|
+
|
|
7
|
+
export interface ShipmentHistoryData {
|
|
8
|
+
id: number
|
|
9
|
+
status: ShipmentStatus
|
|
10
|
+
location?: string
|
|
11
|
+
note?: string
|
|
12
|
+
created_at: string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface ShipmentRouteData {
|
|
16
|
+
id: number
|
|
17
|
+
name: string
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface ShipmentOperatorData {
|
|
21
|
+
id: number
|
|
22
|
+
company: string
|
|
23
|
+
brand_name?: string
|
|
24
|
+
display_name: string
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface ShipmentData {
|
|
28
|
+
id: number
|
|
29
|
+
operator_id?: number
|
|
30
|
+
route_id: number
|
|
31
|
+
date_travel: string
|
|
32
|
+
tracking_number: string
|
|
33
|
+
status: ShipmentStatus
|
|
34
|
+
|
|
35
|
+
sender_name: string
|
|
36
|
+
sender_phone: string
|
|
37
|
+
sender_email?: string
|
|
38
|
+
|
|
39
|
+
receiver_name: string
|
|
40
|
+
receiver_phone: string
|
|
41
|
+
receiver_email?: string
|
|
42
|
+
|
|
43
|
+
pickup_point?: string
|
|
44
|
+
dropoff_point?: string
|
|
45
|
+
|
|
46
|
+
weight?: number
|
|
47
|
+
dimensions?: string
|
|
48
|
+
description?: string
|
|
49
|
+
declared_value?: number
|
|
50
|
+
|
|
51
|
+
price: number
|
|
52
|
+
notes?: string
|
|
53
|
+
|
|
54
|
+
route?: ShipmentRouteData
|
|
55
|
+
operator?: ShipmentOperatorData
|
|
56
|
+
history?: ShipmentHistoryData[]
|
|
57
|
+
}
|