@odynn/awayz-core 0.3.14 → 0.3.16
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/dist/hooks/useBookingManagement/useBookingManagement.test.js +165 -49
- package/dist/hooks/useTripManagement/mocks/index.js +1 -1
- package/dist/hooks/useTripManagement/useTripManagement.test.js +18 -18
- package/dist/lib/hooks/useBookingManagement/mocks/FlightBooking200.json.d.ts +211 -286
- package/dist/lib/hooks/useBookingManagement/mocks/HotelBooking200.json.d.ts +625 -597
- package/dist/lib/hooks/useTripManagement/mocks/UpcomingTrip200.json.d.ts +4 -4
- package/dist/lib/services/bookings/BookingService.types.d.ts +6 -1
- package/dist/services/bookings/BookingService.js +79 -55
- package/package.json +1 -1
|
@@ -1,311 +1,236 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
"data": {
|
|
3
3
|
"_id": "6811290ef16af25943018944",
|
|
4
|
-
"
|
|
4
|
+
"order_id": "ord_0000AvQk8IXqiCE2o20e00",
|
|
5
5
|
"user_id": "67d82b1c52c4a4dbe4e640c0",
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"total_currency": "USD",
|
|
9
|
-
"arrival_date": "2025-05-28T21:46:00.000Z",
|
|
10
|
-
"base_amount": "196.19",
|
|
11
|
-
"extras_amount": "0.00",
|
|
12
|
-
"extras_currency": "USD",
|
|
13
|
-
"base_currency": "USD",
|
|
14
|
-
"conditions": {
|
|
15
|
-
"refund_before_departure": {
|
|
16
|
-
"penalty_currency": null,
|
|
17
|
-
"penalty_amount": null,
|
|
18
|
-
"allowed": false
|
|
19
|
-
},
|
|
20
|
-
"change_before_departure": {
|
|
21
|
-
"penalty_currency": "GBP",
|
|
22
|
-
"penalty_amount": "30.00",
|
|
23
|
-
"allowed": true
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
"departure_date": "2025-05-28T18:54:00.000Z",
|
|
27
|
-
"passengers": [{ "id": "pas_0000AtaoutTnf1TdKbCeNV", "type": null }],
|
|
28
|
-
"slices": [
|
|
6
|
+
"void_window_ends_at": null,
|
|
7
|
+
"documents": [
|
|
29
8
|
{
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
"id": "sli_0000AtaoutgusFy7zHL7pI",
|
|
35
|
-
"origin": "JFK",
|
|
36
|
-
"destination": "LAX",
|
|
37
|
-
"fare_brand_name": null
|
|
9
|
+
"passenger_ids": ["pas_0000AvQjcLZRvVQivKWRxi"],
|
|
10
|
+
"unique_identifier": "1",
|
|
11
|
+
"type": "electronic_ticket"
|
|
38
12
|
}
|
|
39
13
|
],
|
|
40
|
-
"
|
|
14
|
+
"synced_at": "2025-06-23T18:32:48Z",
|
|
15
|
+
"available_actions": ["cancel", "change", "update"],
|
|
16
|
+
"airline_initiated_changes": [],
|
|
17
|
+
"cancellation": null,
|
|
41
18
|
"tax_currency": "USD",
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
19
|
+
"base_currency": "USD",
|
|
20
|
+
"base_amount": "77.49",
|
|
21
|
+
"tax_amount": "13.94",
|
|
22
|
+
"total_currency": "USD",
|
|
23
|
+
"offer_id": "off_0000AvQjcLqSuF2bm6U2U7",
|
|
24
|
+
"booking_reference": "GHNRHO",
|
|
25
|
+
"created_at": "2025-06-23T18:31:58.211428Z",
|
|
48
26
|
"payment_status": {
|
|
49
|
-
"paid_at": "2025-
|
|
27
|
+
"paid_at": "2025-06-23T18:31:58Z",
|
|
50
28
|
"price_guarantee_expires_at": null,
|
|
51
29
|
"payment_required_by": null,
|
|
52
30
|
"awaiting_payment": false
|
|
53
31
|
},
|
|
54
|
-
"
|
|
32
|
+
"live_mode": false,
|
|
33
|
+
"total_amount": "91.43",
|
|
34
|
+
"slices": [
|
|
55
35
|
{
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
"
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
"
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
"iata_code": "
|
|
123
|
-
"
|
|
124
|
-
"
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
"distance": "3974.2717774447433",
|
|
130
|
-
"passengers": [
|
|
131
|
-
{
|
|
132
|
-
"baggages": [
|
|
133
|
-
{ "quantity": 1, "type": "checked" },
|
|
134
|
-
{ "quantity": 1, "type": "carry_on" }
|
|
135
|
-
],
|
|
136
|
-
"cabin_class_marketing_name": "Economy",
|
|
137
|
-
"passenger_id": "pas_0000AtaoutTnf1TdKbCeNV",
|
|
138
|
-
"seat": null,
|
|
139
|
-
"cabin_class": "economy"
|
|
140
|
-
}
|
|
141
|
-
],
|
|
142
|
-
"duration": "PT5H52M",
|
|
143
|
-
"destination": {
|
|
144
|
-
"city_name": "Los Angeles",
|
|
145
|
-
"icao_code": "KLAX",
|
|
146
|
-
"iata_country_code": "US",
|
|
147
|
-
"iata_code": "LAX",
|
|
148
|
-
"iata_city_code": "LAX",
|
|
149
|
-
"latitude": 33.942045,
|
|
150
|
-
"longitude": -118.408263,
|
|
151
|
-
"city": {
|
|
152
|
-
"city_name": null,
|
|
153
|
-
"icao_code": null,
|
|
154
|
-
"iata_country_code": "US",
|
|
155
|
-
"iata_code": "LAX",
|
|
156
|
-
"iata_city_code": "LAX",
|
|
157
|
-
"latitude": null,
|
|
158
|
-
"longitude": null,
|
|
159
|
-
"time_zone": null,
|
|
160
|
-
"type": "city",
|
|
161
|
-
"name": "Los Angeles",
|
|
162
|
-
"id": "cit_lax_us"
|
|
163
|
-
},
|
|
164
|
-
"time_zone": "America/Los_Angeles",
|
|
165
|
-
"type": "airport",
|
|
166
|
-
"name": "Los Angeles International Airport",
|
|
167
|
-
"id": "arp_lax_us"
|
|
168
|
-
},
|
|
169
|
-
"origin": {
|
|
170
|
-
"city_name": "New York",
|
|
171
|
-
"icao_code": "KJFK",
|
|
172
|
-
"iata_country_code": "US",
|
|
173
|
-
"iata_code": "JFK",
|
|
174
|
-
"iata_city_code": "NYC",
|
|
175
|
-
"latitude": 40.640556,
|
|
176
|
-
"longitude": -73.778519,
|
|
177
|
-
"city": {
|
|
178
|
-
"city_name": null,
|
|
179
|
-
"icao_code": null,
|
|
180
|
-
"iata_country_code": "US",
|
|
181
|
-
"iata_code": "NYC",
|
|
182
|
-
"iata_city_code": "NYC",
|
|
183
|
-
"latitude": null,
|
|
184
|
-
"longitude": null,
|
|
185
|
-
"time_zone": null,
|
|
186
|
-
"type": "city",
|
|
187
|
-
"name": "New York",
|
|
188
|
-
"id": "cit_nyc_us"
|
|
189
|
-
},
|
|
190
|
-
"time_zone": "America/New_York",
|
|
191
|
-
"type": "airport",
|
|
192
|
-
"name": "John F. Kennedy International Airport",
|
|
193
|
-
"id": "arp_jfk_us"
|
|
36
|
+
"destination_type": "airport",
|
|
37
|
+
"origin_type": "airport",
|
|
38
|
+
"fare_brand_name": "Basic",
|
|
39
|
+
"segments": [
|
|
40
|
+
{
|
|
41
|
+
"origin_terminal": "2",
|
|
42
|
+
"destination_terminal": "1",
|
|
43
|
+
"aircraft": {
|
|
44
|
+
"iata_code": "773",
|
|
45
|
+
"name": "Boeing 777-300",
|
|
46
|
+
"id": "arc_00009VMF8AhXSSRnQDI6HE"
|
|
47
|
+
},
|
|
48
|
+
"departing_at": "2025-07-30T22:27:00",
|
|
49
|
+
"arriving_at": "2025-07-31T00:24:00",
|
|
50
|
+
"operating_carrier": {
|
|
51
|
+
"logo_symbol_url": "https://assets.duffel.com/img/airlines/for-light-background/full-color-logo/ZZ.svg",
|
|
52
|
+
"logo_lockup_url": null,
|
|
53
|
+
"conditions_of_carriage_url": "https://duffelairways.com/dummy-url/conditions-of-carriage",
|
|
54
|
+
"iata_code": "ZZ",
|
|
55
|
+
"name": "Duffel Airways",
|
|
56
|
+
"id": "arl_00009VME7D6ivUu8dn35WK"
|
|
57
|
+
},
|
|
58
|
+
"marketing_carrier": {
|
|
59
|
+
"logo_symbol_url": "https://assets.duffel.com/img/airlines/for-light-background/full-color-logo/ZZ.svg",
|
|
60
|
+
"logo_lockup_url": null,
|
|
61
|
+
"conditions_of_carriage_url": "https://duffelairways.com/dummy-url/conditions-of-carriage",
|
|
62
|
+
"iata_code": "ZZ",
|
|
63
|
+
"name": "Duffel Airways",
|
|
64
|
+
"id": "arl_00009VME7D6ivUu8dn35WK"
|
|
65
|
+
},
|
|
66
|
+
"stops": [],
|
|
67
|
+
"operating_carrier_flight_number": "9596",
|
|
68
|
+
"marketing_carrier_flight_number": "9596",
|
|
69
|
+
"distance": "1034.9960998474376",
|
|
70
|
+
"passengers": [
|
|
71
|
+
{
|
|
72
|
+
"baggages": [
|
|
73
|
+
{
|
|
74
|
+
"quantity": 1,
|
|
75
|
+
"type": "checked"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"quantity": 1,
|
|
79
|
+
"type": "carry_on"
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
"cabin_class_marketing_name": "Economy",
|
|
83
|
+
"passenger_id": "pas_0000AvQjcLZRvVQivKWRxi",
|
|
84
|
+
"seat": null,
|
|
85
|
+
"cabin_class": "economy"
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
"duration": "PT1H57M",
|
|
89
|
+
"destination": {
|
|
90
|
+
"icao_code": "LFPG",
|
|
91
|
+
"iata_country_code": "FR",
|
|
92
|
+
"iata_city_code": "PAR",
|
|
93
|
+
"city_name": "Paris",
|
|
94
|
+
"iata_code": "CDG",
|
|
95
|
+
"latitude": 49.011244,
|
|
96
|
+
"longitude": 2.548962,
|
|
97
|
+
"city": {
|
|
98
|
+
"icao_code": null,
|
|
99
|
+
"iata_country_code": "FR",
|
|
100
|
+
"iata_city_code": "PAR",
|
|
101
|
+
"city_name": null,
|
|
102
|
+
"iata_code": "PAR",
|
|
103
|
+
"latitude": null,
|
|
104
|
+
"longitude": null,
|
|
105
|
+
"time_zone": null,
|
|
106
|
+
"type": "city",
|
|
107
|
+
"name": "Paris",
|
|
108
|
+
"id": "cit_par_fr"
|
|
194
109
|
},
|
|
195
|
-
"
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
"change_before_departure": {
|
|
200
|
-
"penalty_currency": "GBP",
|
|
201
|
-
"penalty_amount": "30.00",
|
|
202
|
-
"allowed": true
|
|
203
|
-
}
|
|
204
|
-
},
|
|
205
|
-
"duration": "PT5H52M",
|
|
206
|
-
"destination": {
|
|
207
|
-
"city_name": "Los Angeles",
|
|
208
|
-
"icao_code": "KLAX",
|
|
209
|
-
"iata_country_code": "US",
|
|
210
|
-
"iata_code": "LAX",
|
|
211
|
-
"iata_city_code": "LAX",
|
|
212
|
-
"latitude": 33.942045,
|
|
213
|
-
"longitude": -118.408263,
|
|
214
|
-
"city": {
|
|
215
|
-
"city_name": null,
|
|
216
|
-
"icao_code": null,
|
|
217
|
-
"iata_country_code": "US",
|
|
218
|
-
"iata_code": "LAX",
|
|
219
|
-
"iata_city_code": "LAX",
|
|
220
|
-
"latitude": null,
|
|
221
|
-
"longitude": null,
|
|
222
|
-
"time_zone": null,
|
|
223
|
-
"type": "city",
|
|
224
|
-
"name": "Los Angeles",
|
|
225
|
-
"id": "cit_lax_us"
|
|
110
|
+
"time_zone": "Europe/Paris",
|
|
111
|
+
"type": "airport",
|
|
112
|
+
"name": "Paris Charles de Gaulle Airport",
|
|
113
|
+
"id": "arp_cdg_fr"
|
|
226
114
|
},
|
|
227
|
-
"
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
"city": {
|
|
241
|
-
"city_name": null,
|
|
242
|
-
"icao_code": null,
|
|
243
|
-
"iata_country_code": "US",
|
|
244
|
-
"iata_code": "NYC",
|
|
245
|
-
"iata_city_code": "NYC",
|
|
246
|
-
"latitude": null,
|
|
247
|
-
"longitude": null,
|
|
248
|
-
"time_zone": null,
|
|
249
|
-
"type": "city",
|
|
250
|
-
"name": "New York",
|
|
251
|
-
"id": "cit_nyc_us"
|
|
115
|
+
"origin": {
|
|
116
|
+
"icao_code": "LOWW",
|
|
117
|
+
"iata_country_code": "AT",
|
|
118
|
+
"iata_city_code": "VIE",
|
|
119
|
+
"city_name": "Vienna",
|
|
120
|
+
"iata_code": "VIE",
|
|
121
|
+
"latitude": 48.113065,
|
|
122
|
+
"longitude": 16.568137,
|
|
123
|
+
"city": null,
|
|
124
|
+
"time_zone": "Europe/Vienna",
|
|
125
|
+
"type": "airport",
|
|
126
|
+
"name": "Vienna International Airport",
|
|
127
|
+
"id": "arp_vie_at"
|
|
252
128
|
},
|
|
253
|
-
"
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
129
|
+
"id": "seg_0000AvQjcLqSuF2bm6U2U5"
|
|
130
|
+
}
|
|
131
|
+
],
|
|
132
|
+
"conditions": {
|
|
133
|
+
"change_before_departure": {
|
|
134
|
+
"penalty_currency": "GBP",
|
|
135
|
+
"penalty_amount": "10.00",
|
|
136
|
+
"allowed": true
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"duration": "PT1H57M",
|
|
140
|
+
"destination": {
|
|
141
|
+
"icao_code": "LFPG",
|
|
142
|
+
"iata_country_code": "FR",
|
|
143
|
+
"iata_city_code": "PAR",
|
|
144
|
+
"city_name": "Paris",
|
|
145
|
+
"iata_code": "CDG",
|
|
146
|
+
"latitude": 49.011244,
|
|
147
|
+
"longitude": 2.548962,
|
|
148
|
+
"city": {
|
|
149
|
+
"icao_code": null,
|
|
150
|
+
"iata_country_code": "FR",
|
|
151
|
+
"iata_city_code": "PAR",
|
|
152
|
+
"city_name": null,
|
|
153
|
+
"iata_code": "PAR",
|
|
154
|
+
"latitude": null,
|
|
155
|
+
"longitude": null,
|
|
156
|
+
"time_zone": null,
|
|
157
|
+
"type": "city",
|
|
158
|
+
"name": "Paris",
|
|
159
|
+
"id": "cit_par_fr"
|
|
257
160
|
},
|
|
258
|
-
"
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
{
|
|
263
|
-
"born_on": "2007-04-29",
|
|
264
|
-
"loyalty_programme_accounts": [],
|
|
265
|
-
"family_name": "Botha",
|
|
266
|
-
"given_name": "Adriaan",
|
|
267
|
-
"gender": "m",
|
|
268
|
-
"infant_passenger_id": null,
|
|
269
|
-
"phone_number": "+12345642342",
|
|
270
|
-
"user_id": null,
|
|
271
|
-
"email": "adriaan.botha@typedev.co.za",
|
|
272
|
-
"title": "mr",
|
|
273
|
-
"type": "adult",
|
|
274
|
-
"id": "pas_0000AtaoutTnf1TdKbCeNV"
|
|
275
|
-
}
|
|
276
|
-
],
|
|
277
|
-
"conditions": {
|
|
278
|
-
"refund_before_departure": {
|
|
279
|
-
"penalty_currency": null,
|
|
280
|
-
"penalty_amount": null,
|
|
281
|
-
"allowed": false
|
|
161
|
+
"time_zone": "Europe/Paris",
|
|
162
|
+
"type": "airport",
|
|
163
|
+
"name": "Paris Charles de Gaulle Airport",
|
|
164
|
+
"id": "arp_cdg_fr"
|
|
282
165
|
},
|
|
283
|
-
"
|
|
284
|
-
"
|
|
285
|
-
"
|
|
286
|
-
"
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
"
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
"
|
|
166
|
+
"origin": {
|
|
167
|
+
"icao_code": "LOWW",
|
|
168
|
+
"iata_country_code": "AT",
|
|
169
|
+
"iata_city_code": "VIE",
|
|
170
|
+
"city_name": "Vienna",
|
|
171
|
+
"iata_code": "VIE",
|
|
172
|
+
"latitude": 48.113065,
|
|
173
|
+
"longitude": 16.568137,
|
|
174
|
+
"city": null,
|
|
175
|
+
"time_zone": "Europe/Vienna",
|
|
176
|
+
"type": "airport",
|
|
177
|
+
"name": "Vienna International Airport",
|
|
178
|
+
"id": "arp_vie_at"
|
|
179
|
+
},
|
|
180
|
+
"id": "sli_0000AvQjcLqSuF2bm6U2U6"
|
|
181
|
+
}
|
|
182
|
+
],
|
|
183
|
+
"passengers": [
|
|
184
|
+
{
|
|
185
|
+
"born_on": "2007-04-29",
|
|
186
|
+
"loyalty_programme_accounts": [],
|
|
187
|
+
"family_name": "Botha",
|
|
188
|
+
"given_name": "Adriaan",
|
|
189
|
+
"gender": "m",
|
|
190
|
+
"infant_passenger_id": null,
|
|
191
|
+
"phone_number": "+12345642342",
|
|
192
|
+
"user_id": null,
|
|
193
|
+
"email": "adriaan.botha@typedev.co.za",
|
|
194
|
+
"title": "mr",
|
|
195
|
+
"type": "adult",
|
|
196
|
+
"id": "pas_0000AvQjcLZRvVQivKWRxi"
|
|
197
|
+
}
|
|
198
|
+
],
|
|
199
|
+
"conditions": {
|
|
200
|
+
"refund_before_departure": {
|
|
201
|
+
"penalty_currency": null,
|
|
202
|
+
"penalty_amount": null,
|
|
203
|
+
"allowed": false
|
|
303
204
|
},
|
|
304
|
-
"
|
|
305
|
-
|
|
205
|
+
"change_before_departure": {
|
|
206
|
+
"penalty_currency": "GBP",
|
|
207
|
+
"penalty_amount": "10.00",
|
|
208
|
+
"allowed": true
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
"cancelled_at": null,
|
|
212
|
+
"changes": [],
|
|
213
|
+
"content": "managed",
|
|
214
|
+
"services": [],
|
|
215
|
+
"users": ["icu_0000Asbm8q0FlWOhf0fDUm"],
|
|
216
|
+
"metadata": null,
|
|
217
|
+
"type": "instant",
|
|
218
|
+
"owner": {
|
|
219
|
+
"logo_symbol_url": "https://assets.duffel.com/img/airlines/for-light-background/full-color-logo/ZZ.svg",
|
|
220
|
+
"logo_lockup_url": null,
|
|
221
|
+
"conditions_of_carriage_url": "https://duffelairways.com/dummy-url/conditions-of-carriage",
|
|
222
|
+
"iata_code": "ZZ",
|
|
223
|
+
"name": "Duffel Airways",
|
|
224
|
+
"id": "arl_00009VME7D6ivUu8dn35WK"
|
|
225
|
+
},
|
|
226
|
+
"id": "ord_0000AvQk8IXqiCE2o20e00",
|
|
227
|
+
"status": "flight confirmed"
|
|
306
228
|
},
|
|
307
229
|
"message": "Flight booking found",
|
|
308
|
-
"success": true
|
|
230
|
+
"success": true,
|
|
231
|
+
"metadata": {
|
|
232
|
+
"internalRequestId": "f6b54196-4d33-434d-9800-d9dc72a074ab"
|
|
233
|
+
}
|
|
309
234
|
}
|
|
310
235
|
;
|
|
311
236
|
|