tf-checkout-react-native 1.0.26 → 1.0.28
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/README.md +473 -97
- package/android/.gradle/7.4.2/checksums/checksums.lock +0 -0
- package/android/.gradle/7.4.2/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/7.4.2/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/7.4.2/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/7.4.2/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/7.4.2/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/7.4.2/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.4.2/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.4.2/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/file-system.probe +0 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.idea/compiler.xml +6 -0
- package/android/.idea/gradle.xml +18 -0
- package/android/.idea/jarRepositories.xml +25 -0
- package/android/.idea/misc.xml +10 -0
- package/android/.idea/vcs.xml +6 -0
- package/android/local.properties +8 -0
- package/ios/TFCheckoutRNModule.xcodeproj/project.xcworkspace/xcuserdata/jorgegutierrez.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/TFCheckoutRNModule.xcodeproj/xcshareddata/xcschemes/TFCheckoutRNModule.xcscheme +67 -0
- package/lib/api/ApiClient.d.ts +10 -4
- package/lib/api/ApiClient.js +133 -13
- package/lib/api/ApiClient.js.map +1 -1
- package/lib/api/Constants.js +1 -1
- package/lib/api/ErrorHandler.d.ts +3 -0
- package/lib/api/ErrorHandler.js +23 -0
- package/lib/api/ErrorHandler.js.map +1 -0
- package/lib/api/types.d.ts +119 -60
- package/lib/api/types.js.map +1 -1
- package/lib/components/dropdown/types.d.ts +1 -0
- package/lib/components/login/LoginView.js +0 -1
- package/lib/components/login/LoginView.js.map +1 -1
- package/lib/containers/billingInfo/Billing.js +46 -17
- package/lib/containers/billingInfo/Billing.js.map +1 -1
- package/lib/containers/billingInfo/types.d.ts +2 -1
- package/lib/containers/checkout/Checkout.js +13 -4
- package/lib/containers/checkout/Checkout.js.map +1 -1
- package/lib/containers/checkout/types.d.ts +0 -1
- package/lib/containers/myOrders/MyOrders.js +74 -14
- package/lib/containers/myOrders/MyOrders.js.map +1 -1
- package/lib/containers/myOrders/MyOrdersView.js +30 -8
- package/lib/containers/myOrders/MyOrdersView.js.map +1 -1
- package/lib/containers/myOrders/types.d.ts +21 -3
- package/lib/containers/resetPassword/ResetPassword.js +0 -1
- package/lib/containers/resetPassword/ResetPassword.js.map +1 -1
- package/lib/containers/tickets/Tickets.js.map +1 -1
- package/lib/core/CheckoutCore/CheckoutCore.js +2 -2
- package/lib/core/CheckoutCore/CheckoutCore.js.map +1 -1
- package/lib/core/CheckoutCore/CheckoutCoreTypes.d.ts +1 -1
- package/lib/core/MyOrdersCore/MyOrdersCore.js +6 -3
- package/lib/core/MyOrdersCore/MyOrdersCore.js.map +1 -1
- package/lib/core/MyOrdersCore/MyOrdersCoreTypes.d.ts +4 -2
- package/lib/core/TicketsCore/TicketsCore.js +11 -1
- package/lib/core/TicketsCore/TicketsCore.js.map +1 -1
- package/lib/core/TicketsCore/TicketsCoreTypes.d.ts +3 -2
- package/lib/helpers/Config.d.ts +1 -1
- package/lib/helpers/LocalStorage.d.ts +1 -0
- package/lib/helpers/LocalStorage.js +3 -0
- package/lib/helpers/LocalStorage.js.map +1 -1
- package/lib/index.d.ts +3 -3
- package/lib/index.js.map +1 -1
- package/lib/types/IAccountTickets.d.ts +70 -0
- package/lib/types/IAccountTickets.js +2 -0
- package/lib/types/IAccountTickets.js.map +1 -0
- package/lib/types/ICountry.d.ts +5 -0
- package/lib/types/ICountry.js +2 -0
- package/lib/types/ICountry.js.map +1 -0
- package/lib/types/IEvent.d.ts +66 -55
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.js +1 -0
- package/lib/types/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const ERROR = 'Something went wrong!';
|
|
2
|
+
export const getApiError = (error, defaultMessage) => {
|
|
3
|
+
var _a, _b;
|
|
4
|
+
const errorJSON = error.toJSON();
|
|
5
|
+
if (error.response) {
|
|
6
|
+
return {
|
|
7
|
+
message: ((_a = error.response) === null || _a === void 0 ? void 0 : _a.data.message) || defaultMessage,
|
|
8
|
+
code: (_b = error.response) === null || _b === void 0 ? void 0 : _b.status,
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
if (error.code === 'ECONNABORTED') {
|
|
13
|
+
return {
|
|
14
|
+
// @ts-ignore
|
|
15
|
+
message: errorJSON.message || 'Connection time out',
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return {
|
|
20
|
+
message: defaultMessage || ERROR,
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=ErrorHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorHandler.js","sourceRoot":"","sources":["../../src/api/ErrorHandler.ts"],"names":[],"mappings":"AAIA,MAAM,KAAK,GAAG,uBAAuB,CAAA;AAErC,MAAM,CAAC,MAAM,WAAW,GAAG,CACzB,KAAiB,EACjB,cAAuB,EACf,EAAE;;IACV,MAAM,SAAS,GAAG,KAAK,CAAC,MAAM,EAAE,CAAA;IAEhC,IAAI,KAAK,CAAC,QAAQ,EAAE;QAClB,OAAO;YACL,OAAO,EAAE,CAAA,MAAA,KAAK,CAAC,QAAQ,0CAAE,IAAI,CAAC,OAAO,KAAI,cAAc;YACvD,IAAI,EAAE,MAAA,KAAK,CAAC,QAAQ,0CAAE,MAAM;SAC7B,CAAA;KACF;SAAM;QACL,IAAI,KAAK,CAAC,IAAI,KAAK,cAAc,EAAE;YACjC,OAAO;gBACL,aAAa;gBACb,OAAO,EAAE,SAAS,CAAC,OAAO,IAAI,qBAAqB;aACpD,CAAA;SACF;KACF;IAED,OAAO;QACL,OAAO,EAAE,cAAc,IAAI,KAAK;KACjC,CAAA;AACH,CAAC,CAAA"}
|
package/lib/api/types.d.ts
CHANGED
|
@@ -1,30 +1,31 @@
|
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
|
2
2
|
import { IOnCheckoutSuccess } from '..';
|
|
3
3
|
import { IError, IEvent, ITicket, IUserProfile } from '../types';
|
|
4
|
+
import { ICountry } from '../types/ICountry';
|
|
4
5
|
export interface IClientRequest extends AxiosInstance {
|
|
5
|
-
|
|
6
|
+
removeAccessToken: () => void;
|
|
7
|
+
removeGuestToken: () => void;
|
|
6
8
|
setAccessToken: (token: string) => void;
|
|
7
9
|
setBaseUrl: (baseUrl: string) => void;
|
|
8
|
-
setTimeOut: (timeOut: number) => void;
|
|
9
|
-
setDomain: (domain: string) => void;
|
|
10
10
|
setContentType: (contentType: string) => void;
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
setDomain: (domain: string) => void;
|
|
12
|
+
setGuestToken: (token: string) => void;
|
|
13
|
+
setTimeOut: (timeOut: number) => void;
|
|
13
14
|
}
|
|
14
15
|
export interface IPromoCodeResponse {
|
|
15
16
|
isValid: boolean | number;
|
|
16
17
|
message: string;
|
|
17
18
|
}
|
|
18
19
|
export interface IFetchTicketsResponse {
|
|
19
|
-
tickets?: ITicket[];
|
|
20
20
|
error?: IError;
|
|
21
|
-
promoCodeResult?: IPromoCodeResponse;
|
|
22
|
-
isInWaitingList?: boolean;
|
|
23
21
|
isAccessCodeRequired?: boolean;
|
|
22
|
+
isInWaitingList?: boolean;
|
|
23
|
+
promoCodeResult?: IPromoCodeResponse;
|
|
24
|
+
tickets?: ITicket[];
|
|
24
25
|
}
|
|
25
26
|
export interface IAuthorizeResponse {
|
|
26
|
-
error?: IError;
|
|
27
27
|
code?: string;
|
|
28
|
+
error?: IError;
|
|
28
29
|
}
|
|
29
30
|
export interface IAddToCartParams {
|
|
30
31
|
attributes: {
|
|
@@ -46,23 +47,23 @@ export interface IAddToCartParams {
|
|
|
46
47
|
};
|
|
47
48
|
}
|
|
48
49
|
export interface IAddToWaitingListResponse {
|
|
49
|
-
addToWaitingListError?: IError;
|
|
50
50
|
addToWaitingListData?: {
|
|
51
51
|
error: boolean;
|
|
52
52
|
message: string;
|
|
53
53
|
status: number;
|
|
54
54
|
success: boolean;
|
|
55
55
|
};
|
|
56
|
+
addToWaitingListError?: IError;
|
|
56
57
|
}
|
|
57
58
|
export interface IEventData {
|
|
58
|
-
slug: string;
|
|
59
|
-
name: string;
|
|
60
59
|
description?: string;
|
|
60
|
+
name: string;
|
|
61
|
+
slug: string;
|
|
61
62
|
title: string;
|
|
62
63
|
}
|
|
63
64
|
export interface IEventResponse {
|
|
64
|
-
eventError?: IError;
|
|
65
65
|
eventData?: IEvent;
|
|
66
|
+
eventError?: IError;
|
|
66
67
|
}
|
|
67
68
|
export interface ICheckoutTicketHolder {
|
|
68
69
|
email: string;
|
|
@@ -92,15 +93,15 @@ export interface ICheckoutBody {
|
|
|
92
93
|
};
|
|
93
94
|
}
|
|
94
95
|
export interface IFreeRegistrationData {
|
|
95
|
-
id: string;
|
|
96
|
-
customerId: string;
|
|
97
|
-
total: string;
|
|
98
96
|
currency: string;
|
|
97
|
+
customerId: string;
|
|
98
|
+
id: string;
|
|
99
99
|
orderHash: string;
|
|
100
|
+
total: string;
|
|
100
101
|
}
|
|
101
102
|
export interface IFreeRegistrationResponse {
|
|
102
|
-
freeRegistrationError?: IError;
|
|
103
103
|
freeRegistrationData?: IFreeRegistrationData;
|
|
104
|
+
freeRegistrationError?: IError;
|
|
104
105
|
}
|
|
105
106
|
export interface IRegisterNewUserBody {
|
|
106
107
|
attributes: {
|
|
@@ -121,9 +122,9 @@ export interface IRegisterNewUserBody {
|
|
|
121
122
|
};
|
|
122
123
|
}
|
|
123
124
|
export interface IRegisterNewUserProfileResponseData {
|
|
125
|
+
email: string;
|
|
124
126
|
firstName: string;
|
|
125
127
|
lastName: string;
|
|
126
|
-
email: string;
|
|
127
128
|
}
|
|
128
129
|
export interface IRegisterNewUserSuccessData {
|
|
129
130
|
accessTokenData: IFetchAccessTokenData;
|
|
@@ -135,12 +136,12 @@ export interface IRegisterNewUserError {
|
|
|
135
136
|
raw?: any;
|
|
136
137
|
}
|
|
137
138
|
export interface IRegisterNewUserResponse {
|
|
138
|
-
registerNewUserResponseError?: IRegisterNewUserError;
|
|
139
139
|
registerNewUserResponseData?: IRegisterNewUserSuccessData;
|
|
140
|
+
registerNewUserResponseError?: IRegisterNewUserError;
|
|
140
141
|
}
|
|
141
142
|
export interface ICheckoutResponse {
|
|
142
|
-
error?: IError;
|
|
143
143
|
data?: IOnCheckoutSuccess;
|
|
144
|
+
error?: IError;
|
|
144
145
|
}
|
|
145
146
|
export interface IPaymentConfig {
|
|
146
147
|
id: string;
|
|
@@ -152,11 +153,17 @@ export interface IPaymentConfig {
|
|
|
152
153
|
export interface IPaymentAddress {
|
|
153
154
|
city: string;
|
|
154
155
|
line1: string;
|
|
155
|
-
state: string;
|
|
156
156
|
postalCode: string;
|
|
157
|
+
state: string;
|
|
157
158
|
}
|
|
158
159
|
export interface IOrderReview {
|
|
160
|
+
addressData: IPaymentAddress;
|
|
161
|
+
billingData: {
|
|
162
|
+
firstName: string;
|
|
163
|
+
lastName: string;
|
|
164
|
+
};
|
|
159
165
|
expiresAt: number;
|
|
166
|
+
paymentData: IPaymentConfig;
|
|
160
167
|
reviewData: {
|
|
161
168
|
event: string;
|
|
162
169
|
price: string;
|
|
@@ -165,47 +172,75 @@ export interface IOrderReview {
|
|
|
165
172
|
numberOfTickets: string;
|
|
166
173
|
currency: string;
|
|
167
174
|
};
|
|
168
|
-
paymentData: IPaymentConfig;
|
|
169
|
-
addressData: IPaymentAddress;
|
|
170
|
-
billingData: {
|
|
171
|
-
firstName: string;
|
|
172
|
-
lastName: string;
|
|
173
|
-
};
|
|
174
175
|
}
|
|
175
176
|
export interface IOrderReviewResponse {
|
|
176
|
-
orderReviewError?: IError;
|
|
177
177
|
orderReviewData?: IOrderReview;
|
|
178
|
+
orderReviewError?: IError;
|
|
178
179
|
}
|
|
179
180
|
export interface IMyOrdersEvent {
|
|
180
|
-
url_name: string;
|
|
181
181
|
event_name: string;
|
|
182
|
+
url_name: string;
|
|
182
183
|
}
|
|
183
184
|
export interface IMyOrdersOrder {
|
|
184
|
-
id: string;
|
|
185
|
-
date: string;
|
|
186
|
-
currency: string;
|
|
187
185
|
amount: string;
|
|
186
|
+
currency: string;
|
|
187
|
+
date: string;
|
|
188
|
+
eventEndDate: string;
|
|
189
|
+
eventId: string;
|
|
188
190
|
eventName: string;
|
|
191
|
+
eventSalesEndDate: string;
|
|
192
|
+
eventSalesStartDate: string | null;
|
|
193
|
+
eventStartDate: string;
|
|
189
194
|
eventUrl: string;
|
|
195
|
+
hideVenue: boolean;
|
|
196
|
+
hideVenueUntil: string | null;
|
|
197
|
+
id: string;
|
|
190
198
|
image: string;
|
|
199
|
+
timezone: string;
|
|
200
|
+
venueCity: string;
|
|
201
|
+
venueCountry: string;
|
|
202
|
+
venueGooglePlaceId?: string;
|
|
203
|
+
venueLatitude?: string;
|
|
204
|
+
venueLongitude?: string;
|
|
205
|
+
venueName?: string;
|
|
206
|
+
venuePostalCode?: string;
|
|
207
|
+
venueState: string;
|
|
208
|
+
venueStreet?: string;
|
|
209
|
+
venueStreetNumber?: string;
|
|
191
210
|
}
|
|
192
211
|
export interface IMyOrdersData {
|
|
212
|
+
brandFilter?: string;
|
|
193
213
|
events: IMyOrdersEvent[];
|
|
214
|
+
filter?: string;
|
|
194
215
|
orders: IMyOrdersOrder[];
|
|
216
|
+
pagination: {
|
|
217
|
+
page: number;
|
|
218
|
+
limit: number;
|
|
219
|
+
totalCount: number;
|
|
220
|
+
totalPages: number;
|
|
221
|
+
};
|
|
222
|
+
subBrands?: boolean;
|
|
195
223
|
}
|
|
196
224
|
export interface IMyOrdersResponse {
|
|
197
225
|
myOrdersData?: IMyOrdersData;
|
|
198
226
|
myOrdersError?: IError;
|
|
199
227
|
}
|
|
228
|
+
export declare type MyOrderRequestFromType = 'upcoming_events' | 'ongoing_and_upcoming_events' | 'ongoing_events' | 'past_events' | '';
|
|
229
|
+
export interface IMyOrdersRequestParams {
|
|
230
|
+
page: number;
|
|
231
|
+
limit?: number;
|
|
232
|
+
filter?: string;
|
|
233
|
+
from?: MyOrderRequestFromType;
|
|
234
|
+
}
|
|
200
235
|
export interface IMyOrderDetailsItem {
|
|
201
|
-
isActive: boolean;
|
|
202
236
|
currency: string;
|
|
203
237
|
discount: string;
|
|
238
|
+
hash: string;
|
|
239
|
+
isActive: boolean;
|
|
204
240
|
name: string;
|
|
205
241
|
price: string;
|
|
206
242
|
quantity: string;
|
|
207
243
|
total: string;
|
|
208
|
-
hash: string;
|
|
209
244
|
}
|
|
210
245
|
export interface IMyOrderDetailsTicket {
|
|
211
246
|
currency: string;
|
|
@@ -218,6 +253,7 @@ export interface IMyOrderDetailsTicket {
|
|
|
218
253
|
holderPhone?: string;
|
|
219
254
|
isOnSale: boolean;
|
|
220
255
|
isSellable: boolean;
|
|
256
|
+
isTable: boolean;
|
|
221
257
|
pdfLink: string;
|
|
222
258
|
qrData: string;
|
|
223
259
|
resaleFeeAmount: number;
|
|
@@ -226,10 +262,36 @@ export interface IMyOrderDetailsTicket {
|
|
|
226
262
|
ticketTypeHash: string;
|
|
227
263
|
}
|
|
228
264
|
export interface IMyOrderDetailsHeader {
|
|
265
|
+
currency: string;
|
|
266
|
+
date: string;
|
|
267
|
+
eventEndDate: string;
|
|
268
|
+
eventId: string;
|
|
269
|
+
eventName: string;
|
|
270
|
+
eventSalesEndDate: string;
|
|
271
|
+
eventSalesStartDate: string;
|
|
272
|
+
eventStartDate: string;
|
|
273
|
+
eventUrl: string;
|
|
274
|
+
hideVenueUntil: string | null;
|
|
275
|
+
id: string;
|
|
276
|
+
image: string;
|
|
229
277
|
isReferralDisabled: boolean;
|
|
278
|
+
isVenueHidden: boolean;
|
|
279
|
+
salesReferred: string;
|
|
230
280
|
shareLink: string;
|
|
281
|
+
timeZone: string;
|
|
231
282
|
total: string;
|
|
232
|
-
|
|
283
|
+
venue: {
|
|
284
|
+
city: string;
|
|
285
|
+
country: string;
|
|
286
|
+
googlePlaceId?: string;
|
|
287
|
+
latitude?: string;
|
|
288
|
+
longitude?: string;
|
|
289
|
+
name?: string;
|
|
290
|
+
postalCode?: string;
|
|
291
|
+
state: string;
|
|
292
|
+
street?: string;
|
|
293
|
+
streetNumber?: string;
|
|
294
|
+
};
|
|
233
295
|
}
|
|
234
296
|
export interface IMyOrderDetailsData {
|
|
235
297
|
header: IMyOrderDetailsHeader;
|
|
@@ -237,37 +299,34 @@ export interface IMyOrderDetailsData {
|
|
|
237
299
|
tickets: IMyOrderDetailsTicket[];
|
|
238
300
|
}
|
|
239
301
|
export interface IMyOrderDetailsResponse {
|
|
240
|
-
orderDetailsError?: IError;
|
|
241
302
|
orderDetailsData?: IMyOrderDetailsData;
|
|
303
|
+
orderDetailsError?: IError;
|
|
242
304
|
}
|
|
243
305
|
export interface ICartData {
|
|
244
|
-
quantity: number;
|
|
245
|
-
isTfOptInHidden?: boolean;
|
|
246
|
-
isTfOptIn: boolean;
|
|
247
|
-
isMarketingOptedIn: boolean;
|
|
248
306
|
expiresAt: number;
|
|
307
|
+
isMarketingOptedIn: boolean;
|
|
308
|
+
isTfOptIn: boolean;
|
|
309
|
+
isTfOptInHidden?: boolean;
|
|
310
|
+
quantity: number;
|
|
249
311
|
}
|
|
250
312
|
export interface ICartResponse {
|
|
251
|
-
cartError?: IError;
|
|
252
313
|
cartData?: ICartData;
|
|
253
|
-
|
|
254
|
-
export interface ICountryData {
|
|
255
|
-
[key: number | string]: string;
|
|
314
|
+
cartError?: IError;
|
|
256
315
|
}
|
|
257
316
|
export interface ICountriesResponse {
|
|
317
|
+
countriesData?: ICountry[];
|
|
258
318
|
countriesError?: IError;
|
|
259
|
-
countriesData?: ICountryData;
|
|
260
319
|
}
|
|
261
320
|
export interface IStateData {
|
|
262
321
|
[key: number | string]: string;
|
|
263
322
|
}
|
|
264
323
|
export interface IStatesResponse {
|
|
265
|
-
statesError?: IError;
|
|
266
324
|
statesData?: IStateData;
|
|
325
|
+
statesError?: IError;
|
|
267
326
|
}
|
|
268
327
|
export interface IUserProfileResponse {
|
|
269
|
-
userProfileError?: IError;
|
|
270
328
|
userProfileData?: IUserProfile;
|
|
329
|
+
userProfileError?: IError;
|
|
271
330
|
}
|
|
272
331
|
export interface IPurchaseConfirmationData {
|
|
273
332
|
conversionPixels?: any;
|
|
@@ -278,61 +337,61 @@ export interface IPurchaseConfirmationData {
|
|
|
278
337
|
};
|
|
279
338
|
customConfirmationPageText?: string;
|
|
280
339
|
customerId: string;
|
|
281
|
-
isReferralDisabled: boolean;
|
|
282
340
|
eventDate: string;
|
|
283
341
|
eventDescription: string;
|
|
284
342
|
eventType: string;
|
|
343
|
+
isReferralDisabled: boolean;
|
|
285
344
|
message: string;
|
|
286
345
|
orderTotal: number;
|
|
287
346
|
personalShareLink: string;
|
|
347
|
+
personalShareSales: {
|
|
348
|
+
price: number;
|
|
349
|
+
sales: number;
|
|
350
|
+
}[];
|
|
288
351
|
productId: string;
|
|
289
352
|
productImage: string;
|
|
290
353
|
productName: string;
|
|
291
354
|
productPrice: number;
|
|
292
355
|
productUrl: string;
|
|
293
356
|
twitterHashtag?: string;
|
|
294
|
-
personalShareSales: {
|
|
295
|
-
price: number;
|
|
296
|
-
sales: number;
|
|
297
|
-
}[];
|
|
298
357
|
}
|
|
299
358
|
export interface IPurchaseConfirmationResponse {
|
|
300
|
-
purchaseConfirmationError?: IError;
|
|
301
359
|
purchaseConfirmationData?: IPurchaseConfirmationData;
|
|
360
|
+
purchaseConfirmationError?: IError;
|
|
302
361
|
}
|
|
303
362
|
export interface IResaleTicketData {
|
|
304
363
|
message: string;
|
|
305
364
|
}
|
|
306
365
|
export interface IResaleTicketResponse {
|
|
307
|
-
resaleTicketError?: IError;
|
|
308
366
|
resaleTicketData?: IResaleTicketData;
|
|
367
|
+
resaleTicketError?: IError;
|
|
309
368
|
}
|
|
310
369
|
export interface IRemoveTicketFromResaleData {
|
|
311
370
|
message: string;
|
|
312
371
|
}
|
|
313
372
|
export interface IRemoveTicketFromResaleResponse {
|
|
314
|
-
removeTicketFromResaleError?: IError;
|
|
315
373
|
removeTicketFromResaleData?: IRemoveTicketFromResaleData;
|
|
374
|
+
removeTicketFromResaleError?: IError;
|
|
316
375
|
}
|
|
317
376
|
export interface IPostReferralData {
|
|
318
377
|
message: string;
|
|
319
378
|
status: number;
|
|
320
379
|
}
|
|
321
380
|
export interface IPostReferralResponse {
|
|
322
|
-
postReferralError?: IError;
|
|
323
381
|
postReferralData?: IPostReferralData;
|
|
382
|
+
postReferralError?: IError;
|
|
324
383
|
}
|
|
325
384
|
export interface ICloseSessionData {
|
|
326
385
|
message: string;
|
|
327
386
|
}
|
|
328
387
|
export interface ICloseSessionResponse {
|
|
329
|
-
closeSessionError?: IError;
|
|
330
388
|
closeSessionData?: ICloseSessionData;
|
|
389
|
+
closeSessionError?: IError;
|
|
331
390
|
}
|
|
332
391
|
export interface IResetPasswordRequestData {
|
|
333
|
-
token: string;
|
|
334
392
|
password: string;
|
|
335
393
|
password_confirmation: string;
|
|
394
|
+
token: string;
|
|
336
395
|
}
|
|
337
396
|
export interface IRestorePasswordData {
|
|
338
397
|
message: string;
|
|
@@ -347,10 +406,10 @@ export interface IResetPasswordResponse extends IRestorePasswordResponse {
|
|
|
347
406
|
export interface IFetchAccessTokenData {
|
|
348
407
|
accessToken: string;
|
|
349
408
|
refreshToken: string;
|
|
350
|
-
tokenType: string;
|
|
351
409
|
scope: string;
|
|
410
|
+
tokenType: string;
|
|
352
411
|
}
|
|
353
412
|
export interface IFetchAccessTokenResponse {
|
|
354
|
-
accessTokenError?: IError;
|
|
355
413
|
accessTokenData?: IFetchAccessTokenData;
|
|
414
|
+
accessTokenError?: IError;
|
|
356
415
|
}
|
package/lib/api/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/api/types.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/api/types.ts"],"names":[],"mappings":";AAseA,gCAAgC"}
|
|
@@ -2,6 +2,7 @@ import { ImageStyle, StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
|
2
2
|
export interface IDropdownItem {
|
|
3
3
|
label: string;
|
|
4
4
|
value: string | number;
|
|
5
|
+
[key: string]: string | number;
|
|
5
6
|
}
|
|
6
7
|
export interface IDropdownListItemStyles {
|
|
7
8
|
container?: StyleProp<ViewStyle>;
|
|
@@ -109,7 +109,6 @@ const LoginView = ({ showDialog, hideDialog, isDialogVisible, onPressLogin, isLo
|
|
|
109
109
|
return (React.createElement(RestorePassword, { onPressRestorePasswordButton: restorePasswordProps.onPressRestorePasswordButton, onPressCancelButton: restorePasswordProps.onPressCancelButton, styles: styles === null || styles === void 0 ? void 0 : styles.restorePassword, texts: texts === null || texts === void 0 ? void 0 : texts.restorePassword, isLoading: restorePasswordProps.isLoading }));
|
|
110
110
|
case 'restorePasswordSuccess':
|
|
111
111
|
return (React.createElement(ResultDialog, { onPressButton: () => {
|
|
112
|
-
console.log('ALV');
|
|
113
112
|
resultDialogPropsProps === null || resultDialogPropsProps === void 0 ? void 0 : resultDialogPropsProps.onPressButton();
|
|
114
113
|
}, message: resultDialogPropsProps === null || resultDialogPropsProps === void 0 ? void 0 : resultDialogPropsProps.message }));
|
|
115
114
|
default:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoginView.js","sourceRoot":"","sources":["../../../src/components/login/LoginView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAM,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACpD,OAAO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e,EAC7B,SAAS,EAAE,oBAAoB,CAAC,SAAS,GACzC,CACH,CAAA;YAEH,KAAK,wBAAwB;gBAC3B,OAAO,CACL,oBAAC,YAAY,IACX,aAAa,EAAE,GAAG,EAAE;wBAClB,sBAAsB,aAAtB,sBAAsB,uBAAtB,sBAAsB,CAAE,aAAa,EAAE,CAAA;oBACzC,CAAC,EACD,OAAO,EAAE,sBAAsB,aAAtB,sBAAsB,uBAAtB,sBAAsB,CAAE,OAAO,GACxC,CACH,CAAA;YAEH;gBACE,OAAO,SAAS,CAAA;SACnB;IACH,CAAC,CAAA;IAED,+BAA+B;IAC/B,OAAO,CACL,oBAAC,IAAI,IAAC,KAAK,EAAE,CAAC,CAAC,aAAa;QACzB,aAAa,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,cAAc,EAAE;QAEpD,eAAe,IAAI,CAClB,oBAAC,KAAK,IAAC,WAAW,EAAE,IAAI,EAAE,iBAAiB,EAAC,gBAAgB;YAC1D,oBAAC,IAAI,IAAC,KAAK,EAAE,CAAC,CAAC,kBAAkB;gBAC/B,oBAAC,gBAAgB,IAAC,KAAK,EAAE,CAAC,CAAC,eAAe,EAAE,OAAO,EAAE,UAAU;oBAC7D,oBAAC,gBAAgB,IAAC,aAAa,EAAE,CAAC,IAC/B,aAAa,EAAE,CACC,CACF,CACd,CACD,CACT,CACI,CACR,CAAA;IACD,kCAAkC;AACpC,CAAC,CAAA;AAED,eAAe,SAAS,CAAA"}
|
|
@@ -267,7 +267,7 @@ const Billing = forwardRef(({ styles, texts, cartProps: { isAgeRequired, isNameR
|
|
|
267
267
|
const handleOnLoginError = (error) => {
|
|
268
268
|
onLoginError === null || onLoginError === void 0 ? void 0 : onLoginError(error);
|
|
269
269
|
};
|
|
270
|
-
const handleOnLogoutSuccess = () => {
|
|
270
|
+
const handleOnLogoutSuccess = async () => {
|
|
271
271
|
var _a, _b;
|
|
272
272
|
setFirstName('');
|
|
273
273
|
setLastName('');
|
|
@@ -281,9 +281,11 @@ const Billing = forwardRef(({ styles, texts, cartProps: { isAgeRequired, isNameR
|
|
|
281
281
|
setPasswordConfirmation('');
|
|
282
282
|
setCountryId('');
|
|
283
283
|
setStateId('');
|
|
284
|
+
const eventCountry = await getData(LocalStorageKeys.EVENT_COUNTRY);
|
|
284
285
|
setSelectedCountry({
|
|
285
286
|
value: '-1',
|
|
286
287
|
label: ((_a = texts === null || texts === void 0 ? void 0 : texts.form) === null || _a === void 0 ? void 0 : _a.country) || 'Country',
|
|
288
|
+
code: '__',
|
|
287
289
|
});
|
|
288
290
|
setStates([
|
|
289
291
|
{
|
|
@@ -605,6 +607,19 @@ const Billing = forwardRef(({ styles, texts, cartProps: { isAgeRequired, isNameR
|
|
|
605
607
|
}
|
|
606
608
|
};
|
|
607
609
|
//#endregion
|
|
610
|
+
const setCountryByEvent = async () => {
|
|
611
|
+
const eventCountry = await getData(LocalStorageKeys.EVENT_COUNTRY);
|
|
612
|
+
if (!eventCountry) {
|
|
613
|
+
return;
|
|
614
|
+
}
|
|
615
|
+
if (countries.length > 1 && eventCountry) {
|
|
616
|
+
const selectedCountryItem = _find(countries, (item) => {
|
|
617
|
+
const stringValue = item.code;
|
|
618
|
+
return stringValue.toUpperCase() === (eventCountry === null || eventCountry === void 0 ? void 0 : eventCountry.toUpperCase());
|
|
619
|
+
});
|
|
620
|
+
setSelectedCountry(selectedCountryItem);
|
|
621
|
+
}
|
|
622
|
+
};
|
|
608
623
|
//#region Fetch Initial Data
|
|
609
624
|
const fetchData = async () => {
|
|
610
625
|
var _a, _b;
|
|
@@ -613,17 +628,7 @@ const Billing = forwardRef(({ styles, texts, cartProps: { isAgeRequired, isNameR
|
|
|
613
628
|
return showAlert('BillingCoreRef not initialized');
|
|
614
629
|
}
|
|
615
630
|
setIsLoading(true);
|
|
616
|
-
let phoneCountry = 'US';
|
|
617
|
-
let phoneCountryDialCode = '+1';
|
|
618
631
|
let usrPrfl;
|
|
619
|
-
try {
|
|
620
|
-
const deviceCountry = await DeviceCountry.getCountryCode(TYPE_ANY);
|
|
621
|
-
phoneCountry = deviceCountry.code.toUpperCase();
|
|
622
|
-
phoneCountryDialCode = getCountryDialCode(phoneCountry);
|
|
623
|
-
}
|
|
624
|
-
catch (err) {
|
|
625
|
-
phoneCountry = 'US';
|
|
626
|
-
}
|
|
627
632
|
const usrTkn = await getData(LocalStorageKeys.ACCESS_TOKEN);
|
|
628
633
|
let skippingStatusInner;
|
|
629
634
|
const { countriesData, countriesError } = await billingCoreRef.current.getCountries();
|
|
@@ -633,9 +638,9 @@ const Billing = forwardRef(({ styles, texts, cartProps: { isAgeRequired, isNameR
|
|
|
633
638
|
onFetchCountriesError === null || onFetchCountriesError === void 0 ? void 0 : onFetchCountriesError(countriesError);
|
|
634
639
|
return showAlert(countriesError.message || 'Error fetching countries');
|
|
635
640
|
}
|
|
636
|
-
onFetchCountriesSuccess === null || onFetchCountriesSuccess === void 0 ? void 0 : onFetchCountriesSuccess();
|
|
637
|
-
const parsedCountries = _map(countriesData, (item
|
|
638
|
-
return { label: item, value:
|
|
641
|
+
onFetchCountriesSuccess === null || onFetchCountriesSuccess === void 0 ? void 0 : onFetchCountriesSuccess(countriesData);
|
|
642
|
+
const parsedCountries = _map(countriesData, (item) => {
|
|
643
|
+
return { label: item.name, value: item.id, code: item.code };
|
|
639
644
|
});
|
|
640
645
|
if (usrTkn) {
|
|
641
646
|
storedToken.current = usrTkn;
|
|
@@ -657,10 +662,12 @@ const Billing = forwardRef(({ styles, texts, cartProps: { isAgeRequired, isNameR
|
|
|
657
662
|
parsedCountries.unshift({
|
|
658
663
|
value: '-1',
|
|
659
664
|
label: ((_a = texts === null || texts === void 0 ? void 0 : texts.form) === null || _a === void 0 ? void 0 : _a.country) || 'Country',
|
|
665
|
+
code: '__',
|
|
660
666
|
});
|
|
661
667
|
setSelectedCountry({
|
|
662
668
|
value: '-1',
|
|
663
669
|
label: ((_b = texts === null || texts === void 0 ? void 0 : texts.form) === null || _b === void 0 ? void 0 : _b.country) || 'Country',
|
|
670
|
+
code: '__',
|
|
664
671
|
});
|
|
665
672
|
}
|
|
666
673
|
const { cartData, cartError } = await billingCoreRef.current.getCart();
|
|
@@ -693,6 +700,23 @@ const Billing = forwardRef(({ styles, texts, cartProps: { isAgeRequired, isNameR
|
|
|
693
700
|
phone: i === 0 && usrPrfl ? usrPrfl.phone : '',
|
|
694
701
|
});
|
|
695
702
|
}
|
|
703
|
+
let phoneCountry = 'US';
|
|
704
|
+
let phoneCountryDialCode = '+1';
|
|
705
|
+
const eventCountry = await getData(LocalStorageKeys.EVENT_COUNTRY);
|
|
706
|
+
if (eventCountry) {
|
|
707
|
+
phoneCountry = eventCountry.toUpperCase();
|
|
708
|
+
phoneCountryDialCode = getCountryDialCode(phoneCountry);
|
|
709
|
+
}
|
|
710
|
+
else {
|
|
711
|
+
try {
|
|
712
|
+
const deviceCountry = await DeviceCountry.getCountryCode(TYPE_ANY);
|
|
713
|
+
phoneCountry = deviceCountry.code.toUpperCase();
|
|
714
|
+
phoneCountryDialCode = getCountryDialCode(phoneCountry);
|
|
715
|
+
}
|
|
716
|
+
catch (err) {
|
|
717
|
+
phoneCountry = 'US';
|
|
718
|
+
}
|
|
719
|
+
}
|
|
696
720
|
if (usrPrfl) {
|
|
697
721
|
if (!isPhoneHidden && isPhoneRequired) {
|
|
698
722
|
if (!checkIsStoredPhoneNumberFormat(usrPrfl.phone)) {
|
|
@@ -756,9 +780,14 @@ const Billing = forwardRef(({ styles, texts, cartProps: { isAgeRequired, isNameR
|
|
|
756
780
|
handleOnSkippingStatusChange(skippingStatus);
|
|
757
781
|
}, [handleOnSkippingStatusChange, skippingStatus]);
|
|
758
782
|
useEffect(() => {
|
|
759
|
-
if (
|
|
760
|
-
|
|
761
|
-
|
|
783
|
+
if (countryId) {
|
|
784
|
+
if (countries.length > 1) {
|
|
785
|
+
const selectedCountryItem = _find(countries, (item) => item.value === countryId);
|
|
786
|
+
setSelectedCountry(selectedCountryItem);
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
else {
|
|
790
|
+
setCountryByEvent();
|
|
762
791
|
}
|
|
763
792
|
}, [countries, countryId]);
|
|
764
793
|
useEffect(() => {
|