@autobusal/providers 1.30.0 → 1.31.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 +21 -0
- package/Queries/apiClient.ts +25 -2
- package/package.json +1 -1
- package/types/locations.ts +19 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.31.0
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- **`PopularRoutesData`** - the city pairs behind the home page's route
|
|
8
|
+
columns. `from` and `to` arrive localised and `link` is built server-side,
|
|
9
|
+
so the search URL's date and slug rules live in one place.
|
|
10
|
+
|
|
11
|
+
## 1.30.1
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- **Only the documents 403 redirects to the documents page.** This fired on
|
|
16
|
+
every 403 there is. The intent is sound - an account blocked by an unsigned
|
|
17
|
+
document should be taken to the screen that unblocks it - but the other
|
|
18
|
+
source of a 403 in this API is the email-verification gate, and sending
|
|
19
|
+
somebody there for that told them nothing and fixed nothing. It read as a
|
|
20
|
+
deliberate product redirect and was this line. Keyed on a `reason` the
|
|
21
|
+
server sets rather than the message, which is translated fifteen ways, and
|
|
22
|
+
guarded against redirecting the documents page to itself.
|
|
23
|
+
|
|
3
24
|
## 1.30.0
|
|
4
25
|
|
|
5
26
|
### Added
|
package/Queries/apiClient.ts
CHANGED
|
@@ -88,8 +88,31 @@ apiClient.interceptors.response.use(response => (
|
|
|
88
88
|
return Promise.reject(error);
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
/*
|
|
92
|
+
* Edited: Ferjolt Ozuni - Date: 2026-08-07
|
|
93
|
+
*
|
|
94
|
+
* Only the DOCUMENTS 403 goes to the documents page.
|
|
95
|
+
*
|
|
96
|
+
* This used to fire on every 403 there is. The intent is sound - an
|
|
97
|
+
* account blocked by an unsigned document should be taken to the one
|
|
98
|
+
* screen that unblocks it - but the other source of a 403 in this API is
|
|
99
|
+
* the email-verification gate, and sending somebody there for that told
|
|
100
|
+
* them nothing and fixed nothing. It read as a deliberate product
|
|
101
|
+
* redirect; it was this line.
|
|
102
|
+
*
|
|
103
|
+
* Keyed on a `reason` the server sets (Middleware\ValidUser), not on the
|
|
104
|
+
* message: that text is translated into fifteen languages, so comparing
|
|
105
|
+
* it would work in one.
|
|
106
|
+
*
|
|
107
|
+
* The pathname guard matters as much as the reason. Without it, a 403
|
|
108
|
+
* raised BY the documents page redirects the documents page to itself,
|
|
109
|
+
* which is a reload loop rather than a fix.
|
|
110
|
+
*/
|
|
111
|
+
if (
|
|
112
|
+
error.response.status === 403
|
|
113
|
+
&& error.response.data?.reason === 'documents'
|
|
114
|
+
&& window.location.pathname !== '/account/documents'
|
|
115
|
+
) {
|
|
93
116
|
window.location.href = '/account/documents';
|
|
94
117
|
}
|
|
95
118
|
|
package/package.json
CHANGED
package/types/locations.ts
CHANGED
|
@@ -98,4 +98,22 @@ export interface StopData {
|
|
|
98
98
|
id: number
|
|
99
99
|
name: string
|
|
100
100
|
location: string[]
|
|
101
|
-
}
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* A city pair people buy, for the home page's route columns.
|
|
104
|
+
*
|
|
105
|
+
* Ferjolt Ozuni - Date: 2026-08-07
|
|
106
|
+
* `from` and `to` are already localised city names, and `link` is a search
|
|
107
|
+
* built server-side - the client renders it and never assembles one, so the
|
|
108
|
+
* date and slug rules live in exactly one place (Traits\Orderable).
|
|
109
|
+
*/
|
|
110
|
+
export interface PopularRouteData {
|
|
111
|
+
from: string
|
|
112
|
+
to: string
|
|
113
|
+
link: string
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export interface PopularRoutesData {
|
|
117
|
+
top: PopularRouteData[]
|
|
118
|
+
trending: PopularRouteData[]
|
|
119
|
+
}
|