@autobusal/providers 1.36.0 → 1.37.1

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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.37.1
4
+
5
+ ### Added
6
+
7
+ - **`MenuData.location` gains `'footer_1' | 'footer_2'`** - the site footer's two link columns are now admin-managed Menu items (same model the header nav's left/right already use) instead of hardcoded JSX. See `@autobusal/admin-menu` 1.1.3.
8
+
9
+ ## 1.37.0
10
+
11
+ ### Added
12
+
13
+ - **Shipments types** (`ShipmentData`, `ShipmentStatus`, `SHIPMENT_STATUSES`, `ShipmentHistoryData`, etc.) for the new operator shipping module - see `@autobusal/operator-shipments` and `@autobusal/track-shipment`.
14
+ - **`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.
15
+
3
16
  ## 1.36.0
4
17
 
5
18
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobusal/providers",
3
- "version": "1.36.0",
3
+ "version": "1.37.1",
4
4
  "author": "Ferjolt Ozuni",
5
5
  "type": "module",
6
6
  "main": "index.ts"
@@ -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 {
package/types/routes.ts CHANGED
@@ -78,6 +78,12 @@ export interface TripData {
78
78
  available_seats: number
79
79
  blocked_seats: number
80
80
  seating: string
81
+
82
+ // Edited: Claude (BusMagus mobile app) - Date: 2026-08-10
83
+ // Whether this route accepts an e-ticket at boarding or requires a
84
+ // physical printout. null/unset = e-ticket accepted (every route's
85
+ // behaviour before this field existed).
86
+ ticket_delivery?: 'e_ticket' | 'printed_only' | null
81
87
  }
82
88
 
83
89
  export interface FeatureData {
package/types/settings.ts CHANGED
@@ -117,7 +117,7 @@ export interface MenuData {
117
117
  link: string
118
118
  new: 'yes' | 'no'
119
119
  children: MenuData[]
120
- location: 'any' | 'left' | 'right'
120
+ location: 'any' | 'left' | 'right' | 'footer_1' | 'footer_2'
121
121
  parent_id: number | null
122
122
  menu?: MenuData
123
123
  order_id: number
@@ -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
+ }