@odynn/awayz-core 0.3.11 → 0.3.12
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/assets/_styles.css +1 -1
- package/dist/assets/_styles2.css +1 -1
- package/dist/assets/_styles3.css +1 -1
- package/dist/assets/_styles4.css +1 -1
- package/dist/assets/_styles5.css +1 -0
- package/dist/components/Bookings/FlightBooking/FlightBooking.js +2 -2
- package/dist/components/Bookings/HotelBooking/HotelBooking.js +2 -2
- package/dist/components/CashValue/CashValue.js +7 -5
- package/dist/components/CashValue/CashValue.stories.js +14 -13
- package/dist/components/Menu/Menu.js +11 -10
- package/dist/components/Wallet/Card/Card.js +35 -0
- package/dist/components/Wallet/Card/Card.stories.js +62 -0
- package/dist/components/index.js +6 -4
- package/dist/configs/endpoints.js +2 -2
- package/dist/hooks/useBookingManagement/useBookingManagement.js +57 -48
- package/dist/hooks/useBookingManagement/useBookingManagement.test.js +40 -39
- package/dist/hooks/useTripManagement/useTripManagement.js +4 -3
- package/dist/hooks/useTripManagement/useTripManagement.test.js +2 -1
- package/dist/hooks/useWallet/useWallet.js +52 -33
- package/dist/hooks/useWallet/useWallet.test.js +85 -15
- package/dist/hooks/useWallet/useWallet.types.js +1 -0
- package/dist/index-BC-KTkxU.js +1571 -0
- package/dist/index-CDh8vAM_.js +132 -0
- package/dist/lib/components/Wallet/Card/Card.d.ts +6 -0
- package/dist/lib/components/Wallet/Card/Card.stories.d.ts +14 -0
- package/dist/lib/components/index.d.ts +1 -0
- package/dist/lib/configs/endpoints.d.ts +2 -0
- package/dist/lib/hooks/useBookingManagement/mocks/HotelBooking200.json.d.ts +608 -67
- package/dist/lib/hooks/useBookingManagement/useBookingManagement.types.d.ts +8 -0
- package/dist/lib/hooks/useWallet/mocks/AllCardsResponse200.json.d.ts +177 -0
- package/dist/lib/hooks/useWallet/mocks/GetAllProgramsReponse200.json.d.ts +705 -0
- package/dist/lib/hooks/useWallet/mocks/UserCardsResponse200.json.d.ts +139 -0
- package/dist/lib/hooks/useWallet/useWallet.d.ts +2 -16
- package/dist/lib/hooks/useWallet/useWallet.types.d.ts +50 -0
- package/dist/lib/services/wallet/WalletService.d.ts +2 -0
- package/dist/lib/services/wallet/WalletService.types.d.ts +2 -5
- package/dist/main.js +20 -18
- package/dist/providers/AwayzProvider.js +4 -3
- package/dist/services/currency/CurrencyService.js +4 -3
- package/dist/services/wallet/WalletService.js +43 -63
- package/package.json +1 -1
- package/dist/index-COgXcb6p.js +0 -1696
- package/dist/lib/hooks/useWallet/mocks/CardsResponse.json.d.ts +0 -34
|
@@ -17,6 +17,10 @@ export interface IUseBookingManagement {
|
|
|
17
17
|
* This is **ONLY** used for flight bookings
|
|
18
18
|
*/
|
|
19
19
|
initiateCancellation: () => void;
|
|
20
|
+
/**
|
|
21
|
+
* Indicates if the cancellation initiation request is successful
|
|
22
|
+
*/
|
|
23
|
+
isInitiateCancellationSuccess: boolean;
|
|
20
24
|
/**
|
|
21
25
|
* Indicates if the cancellation initiation request is pending
|
|
22
26
|
*/
|
|
@@ -34,6 +38,10 @@ export interface IUseBookingManagement {
|
|
|
34
38
|
* This can be used for both flight and hotel bookings
|
|
35
39
|
*/
|
|
36
40
|
cancelBooking: () => void;
|
|
41
|
+
/**
|
|
42
|
+
* Indicates if the cancel booking request is successful
|
|
43
|
+
*/
|
|
44
|
+
isCancelBookingSuccess: boolean;
|
|
37
45
|
/**
|
|
38
46
|
* Indicates if the cancel booking request is pending
|
|
39
47
|
*/
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
"success": true,
|
|
3
|
+
"data": [
|
|
4
|
+
{
|
|
5
|
+
"_id": "AAAviatorBis",
|
|
6
|
+
"name": "AAdvantage Aviator Business",
|
|
7
|
+
"signupBonus": 70000,
|
|
8
|
+
"cashBonus": 0,
|
|
9
|
+
"minimumSpend": 2000,
|
|
10
|
+
"daysToSpend": 90,
|
|
11
|
+
"annual_fee": 95,
|
|
12
|
+
"annualFeeWaived": false,
|
|
13
|
+
"cashPerks": 0,
|
|
14
|
+
"bank": {
|
|
15
|
+
"name": "Barclays"
|
|
16
|
+
},
|
|
17
|
+
"rewards_currency": "American Airlines Miles",
|
|
18
|
+
"bisCard": true,
|
|
19
|
+
"chargeCard": false,
|
|
20
|
+
"cardFamily": 0,
|
|
21
|
+
"websiteUrl": "https://frequentmiler.com/AviatorBiz/#Goto",
|
|
22
|
+
"network": {
|
|
23
|
+
"name": "Mastercard"
|
|
24
|
+
},
|
|
25
|
+
"_modified": "2022-08-30T00:24:55.568Z",
|
|
26
|
+
"colour": "#1A3251",
|
|
27
|
+
"region": "US",
|
|
28
|
+
"faredrop_card_id": "",
|
|
29
|
+
"alternateRegions": [],
|
|
30
|
+
"logoUrl": "https://s3.us-east-1.amazonaws.com/awayz/card_logos/barclays-white.svg"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"_id": "AARed",
|
|
34
|
+
"name": "AAdvantage Aviator Red",
|
|
35
|
+
"signupBonus": 60000,
|
|
36
|
+
"cashBonus": 0,
|
|
37
|
+
"minimumSpend": 0,
|
|
38
|
+
"daysToSpend": 30,
|
|
39
|
+
"annual_fee": 99,
|
|
40
|
+
"annualFeeWaived": true,
|
|
41
|
+
"cashPerks": 0,
|
|
42
|
+
"bank": {
|
|
43
|
+
"name": "Barclays"
|
|
44
|
+
},
|
|
45
|
+
"rewards_currency": "American Airlines Miles",
|
|
46
|
+
"bisCard": false,
|
|
47
|
+
"chargeCard": false,
|
|
48
|
+
"cardFamily": 1,
|
|
49
|
+
"websiteUrl": "https://frequentmiler.com/AviatorRed/#Goto",
|
|
50
|
+
"network": {
|
|
51
|
+
"name": "Mastercard"
|
|
52
|
+
},
|
|
53
|
+
"colour": "#1A3251",
|
|
54
|
+
"region": "US",
|
|
55
|
+
"faredrop_card_id": "",
|
|
56
|
+
"alternateRegions": [],
|
|
57
|
+
"logoUrl": "https://s3.us-east-1.amazonaws.com/awayz/card_logos/barclays-white.svg"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"_id": "AASilver",
|
|
61
|
+
"name": "AAdvantage Aviator Silver",
|
|
62
|
+
"signupBonus": 0,
|
|
63
|
+
"cashBonus": 0,
|
|
64
|
+
"minimumSpend": 0,
|
|
65
|
+
"daysToSpend": 0,
|
|
66
|
+
"annual_fee": 195,
|
|
67
|
+
"annualFeeWaived": false,
|
|
68
|
+
"cashPerks": 75,
|
|
69
|
+
"bank": {
|
|
70
|
+
"name": "Barclays"
|
|
71
|
+
},
|
|
72
|
+
"rewards_currency": "American Airlines Miles",
|
|
73
|
+
"bisCard": false,
|
|
74
|
+
"chargeCard": false,
|
|
75
|
+
"cardFamily": 1,
|
|
76
|
+
"websiteUrl": "https://frequentmiler.boardingarea.com/AviatorSilver/#Goto",
|
|
77
|
+
"network": {
|
|
78
|
+
"name": "Mastercard"
|
|
79
|
+
},
|
|
80
|
+
"_modified": "2022-08-30T00:27:10.347Z",
|
|
81
|
+
"updatedAt": "2022-10-26T06:55:01.187Z",
|
|
82
|
+
"colour": "#C8C8C8",
|
|
83
|
+
"region": "US",
|
|
84
|
+
"faredrop_card_id": "",
|
|
85
|
+
"alternateRegions": [],
|
|
86
|
+
"logoUrl": "https://s3.us-east-1.amazonaws.com/awayz/card_logos/barclays-black.svg"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"_id": "AFKLMcard",
|
|
90
|
+
"name": "Air France KLM Card",
|
|
91
|
+
"signupBonus": 70000,
|
|
92
|
+
"cashBonus": 0,
|
|
93
|
+
"minimumSpend": 2000,
|
|
94
|
+
"daysToSpend": 90,
|
|
95
|
+
"annual_fee": 89,
|
|
96
|
+
"annualFeeWaived": false,
|
|
97
|
+
"cashPerks": 150,
|
|
98
|
+
"bank": {
|
|
99
|
+
"name": "BofA"
|
|
100
|
+
},
|
|
101
|
+
"rewards_currency": "Flying Blue Miles",
|
|
102
|
+
"bisCard": false,
|
|
103
|
+
"chargeCard": false,
|
|
104
|
+
"cardFamily": 6,
|
|
105
|
+
"websiteUrl": "https://frequentmiler.com/AFKLM/#Goto",
|
|
106
|
+
"network": {
|
|
107
|
+
"name": "Mastercard"
|
|
108
|
+
},
|
|
109
|
+
"_modified": "2022-08-30T00:41:10.038Z",
|
|
110
|
+
"colour": "#1A3251",
|
|
111
|
+
"region": "US",
|
|
112
|
+
"faredrop_card_id": "",
|
|
113
|
+
"alternateRegions": [],
|
|
114
|
+
"logoUrl": "https://s3.us-east-1.amazonaws.com/awayz/card_logos/bofa-white.svg"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"_id": "ASBis",
|
|
118
|
+
"name": "Alaska Airlines Visa Business",
|
|
119
|
+
"signupBonus": 70000,
|
|
120
|
+
"cashBonus": 0,
|
|
121
|
+
"minimumSpend": 4000,
|
|
122
|
+
"daysToSpend": 90,
|
|
123
|
+
"annual_fee": 75,
|
|
124
|
+
"annualFeeWaived": false,
|
|
125
|
+
"cashPerks": 0,
|
|
126
|
+
"bank": {
|
|
127
|
+
"name": "BofA"
|
|
128
|
+
},
|
|
129
|
+
"rewards_currency": "Alaska MileagePlan",
|
|
130
|
+
"bisCard": true,
|
|
131
|
+
"chargeCard": false,
|
|
132
|
+
"cardFamily": 10,
|
|
133
|
+
"websiteUrl": "https://frequentmiler.com/ASbiz/#Goto",
|
|
134
|
+
"network": {
|
|
135
|
+
"name": "Visa"
|
|
136
|
+
},
|
|
137
|
+
"_modified": "2022-08-30T00:41:42.408Z",
|
|
138
|
+
"colour": "#1A3251",
|
|
139
|
+
"region": "US",
|
|
140
|
+
"faredrop_card_id": "",
|
|
141
|
+
"alternateRegions": [],
|
|
142
|
+
"logoUrl": "https://s3.us-east-1.amazonaws.com/awayz/card_logos/bofa-white.svg"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"_id": "AltReserve",
|
|
146
|
+
"name": "Altitude Reserve",
|
|
147
|
+
"signupBonus": 50000,
|
|
148
|
+
"cashBonus": 0,
|
|
149
|
+
"minimumSpend": 4500,
|
|
150
|
+
"daysToSpend": 90,
|
|
151
|
+
"annual_fee": 400,
|
|
152
|
+
"annualFeeWaived": false,
|
|
153
|
+
"cashPerks": 0,
|
|
154
|
+
"bank": {
|
|
155
|
+
"name": "US Bank"
|
|
156
|
+
},
|
|
157
|
+
"rewards_currency": "Altitude Reserve Points",
|
|
158
|
+
"bisCard": false,
|
|
159
|
+
"chargeCard": false,
|
|
160
|
+
"cardFamily": 28,
|
|
161
|
+
"websiteUrl": "https://frequentmiler.com/USBAR/#Goto",
|
|
162
|
+
"network": {
|
|
163
|
+
"name": "Visa"
|
|
164
|
+
},
|
|
165
|
+
"colour": "#3767A2",
|
|
166
|
+
"region": "US",
|
|
167
|
+
"faredrop_card_id": "",
|
|
168
|
+
"points_as_cash_conversion_ratio": 0.015,
|
|
169
|
+
"updatedAt": "2024-10-18T14:47:25.187Z",
|
|
170
|
+
"alternateRegions": [],
|
|
171
|
+
"logoUrl": "https://s3.us-east-1.amazonaws.com/awayz/card_logos/us-bank-white.svg"
|
|
172
|
+
}
|
|
173
|
+
]
|
|
174
|
+
}
|
|
175
|
+
;
|
|
176
|
+
|
|
177
|
+
export default _default;
|