@autobusal/providers 1.37.9 → 1.37.11
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 +12 -0
- package/package.json +1 -1
- package/types/persons.ts +65 -1
- package/types/reviews.ts +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.37.11
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Saved-passenger types and the account query, shared by the checkout chooser and the account manager so both read one shape.
|
|
8
|
+
|
|
9
|
+
## 1.37.10
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- `ReviewData.published_on` - the review's date as ISO 8601, beside the localized display string. Structured data needs a machine date, and reversing a printed `d/m/Y` back into one would couple the schema to a locale format.
|
|
14
|
+
|
|
3
15
|
## 1.37.9
|
|
4
16
|
|
|
5
17
|
### Added
|
package/package.json
CHANGED
package/types/persons.ts
CHANGED
|
@@ -14,4 +14,68 @@ export interface BillingData {
|
|
|
14
14
|
bill_nipt: string
|
|
15
15
|
comments: string
|
|
16
16
|
terms: string
|
|
17
|
-
}
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* A traveller this account has asked us to remember.
|
|
20
|
+
*
|
|
21
|
+
* Edited: Claude - Date: 2026-08-20
|
|
22
|
+
*
|
|
23
|
+
* Here rather than in either package that uses it, because BOTH do: the
|
|
24
|
+
* checkout chooser (@autobusal/routes-order) and the account manager
|
|
25
|
+
* (@autobusal/account-passengers) read the same rows from the same
|
|
26
|
+
* endpoints, and two copies of this shape would be free to disagree about
|
|
27
|
+
* the one field that matters most - which of them carries a passport number.
|
|
28
|
+
*
|
|
29
|
+
* THE LIST NEVER CARRIES THE NUMBER. `passport_masked` is the last few
|
|
30
|
+
* characters, enough to tell two of your own documents apart;
|
|
31
|
+
* `has_passport` is the yes/no. The raw value exists only on
|
|
32
|
+
* SavedPassengerRecord, which is what /get answers with - see obtapi's
|
|
33
|
+
* Account\PassengersController for why the split is there.
|
|
34
|
+
*/
|
|
35
|
+
export interface SavedPassenger {
|
|
36
|
+
id: number
|
|
37
|
+
|
|
38
|
+
first_name: string
|
|
39
|
+
last_name: string
|
|
40
|
+
/** d/m/Y, the format every date field in this app is typed in */
|
|
41
|
+
dob: string
|
|
42
|
+
|
|
43
|
+
/** what this person was last ticketed as - a record, never a price */
|
|
44
|
+
type: string | null
|
|
45
|
+
/** the fare band they fall into TODAY, derived from `dob` by the server */
|
|
46
|
+
age_type: 'adult' | 'child' | 'baby'
|
|
47
|
+
|
|
48
|
+
sex: number | null
|
|
49
|
+
|
|
50
|
+
passport_masked: string | null
|
|
51
|
+
has_passport: boolean
|
|
52
|
+
|
|
53
|
+
phone: string | null
|
|
54
|
+
whatsapp: string | null
|
|
55
|
+
telegram: string | null
|
|
56
|
+
email: string | null
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* What the journey being booked would still have to ask for - the option
|
|
60
|
+
* keys of routes_trip.passenger_fields (sex, passport, phone, whatsapp,
|
|
61
|
+
* telegram).
|
|
62
|
+
*
|
|
63
|
+
* ABSENT, not empty, when no journey was named: the account page asks for
|
|
64
|
+
* the list with no price ids and gets no `missing` at all, and reading
|
|
65
|
+
* that as "nothing missing" would be a promise about a route nobody has
|
|
66
|
+
* chosen yet. Hence optional, and hence every reader tests for an array
|
|
67
|
+
* rather than for length.
|
|
68
|
+
*/
|
|
69
|
+
missing?: string[]
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/** One traveller, passport included - the answer /get alone gives */
|
|
73
|
+
export interface SavedPassengerRecord extends SavedPassenger {
|
|
74
|
+
passport: string | null
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface SavedPassengersData {
|
|
78
|
+
data: SavedPassenger[]
|
|
79
|
+
/** how many one account may keep, so a UI can say so before refusing */
|
|
80
|
+
max: number
|
|
81
|
+
}
|
package/types/reviews.ts
CHANGED
|
@@ -39,5 +39,9 @@ export interface ReviewData {
|
|
|
39
39
|
// first name plus an initial, built server-side
|
|
40
40
|
author: string
|
|
41
41
|
published: string | null
|
|
42
|
+
// Edited: Claude - Date: 2026-08-20
|
|
43
|
+
// the same day as `published` but plain ISO 8601 (YYYY-MM-DD) - schema.org's
|
|
44
|
+
// datePublished refuses the d/m/Y display string above
|
|
45
|
+
published_on: string | null
|
|
42
46
|
reply: ReviewReplyData | null
|
|
43
47
|
}
|