tf-checkout-react 1.0.103 → 1.0.106

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.
Files changed (96) hide show
  1. package/dist/api/index.d.ts +3 -1
  2. package/dist/components/common/CustomField.d.ts +1 -1
  3. package/dist/components/common/DatePickerField.d.ts +14 -0
  4. package/dist/components/common/RedirectModal.d.ts +7 -0
  5. package/dist/components/countdown/index.d.ts +3 -1
  6. package/dist/components/orderDetailsContainer/ticketsTable.d.ts +2 -0
  7. package/dist/components/rsvpContainer/index.d.ts +7 -0
  8. package/dist/components/ticketResale/index.d.ts +5 -3
  9. package/dist/components/ticketsContainer/AccessCodeSection.d.ts +7 -0
  10. package/dist/components/ticketsContainer/PromoCodeSection.d.ts +5 -9
  11. package/dist/components/ticketsContainer/TicketsSection.d.ts +6 -3
  12. package/dist/components/ticketsContainer/index.d.ts +9 -2
  13. package/dist/components/timerWidget/index.d.ts +3 -3
  14. package/dist/images/cross.svg +44 -0
  15. package/dist/images/done.svg +3 -3
  16. package/dist/index.d.ts +2 -0
  17. package/dist/tf-checkout-react.cjs.development.js +639 -223
  18. package/dist/tf-checkout-react.cjs.development.js.map +1 -1
  19. package/dist/tf-checkout-react.cjs.production.min.js +1 -1
  20. package/dist/tf-checkout-react.cjs.production.min.js.map +1 -1
  21. package/dist/tf-checkout-react.esm.js +645 -231
  22. package/dist/tf-checkout-react.esm.js.map +1 -1
  23. package/dist/tf-checkout-styles.css +1 -1
  24. package/package.json +89 -89
  25. package/src/.DS_Store +0 -0
  26. package/src/.d.ts +2 -2
  27. package/src/api/index.ts +300 -278
  28. package/src/assets/images/cross.svg +44 -0
  29. package/src/assets/images/done.svg +3 -3
  30. package/src/components/.DS_Store +0 -0
  31. package/src/components/billing-info-container/index.tsx +811 -799
  32. package/src/components/billing-info-container/style.css +105 -105
  33. package/src/components/billing-info-container/utils.ts +225 -224
  34. package/src/components/common/CheckboxField.tsx +41 -41
  35. package/src/components/common/CustomField.tsx +87 -84
  36. package/src/components/common/DatePickerField.tsx +98 -0
  37. package/src/components/common/FormikPhoneNumberField.tsx +51 -51
  38. package/src/components/common/Loader.tsx +9 -9
  39. package/src/components/common/RadioField.tsx +35 -35
  40. package/src/components/common/RedirectModal.tsx +43 -0
  41. package/src/components/common/SelectField.tsx +80 -80
  42. package/src/components/common/SnackbarAlert.tsx +53 -53
  43. package/src/components/common/index.tsx +4 -4
  44. package/src/components/confirmModal/index.tsx +51 -51
  45. package/src/components/confirmModal/style.css +21 -21
  46. package/src/components/confirmationContainer/config.ts +72 -72
  47. package/src/components/confirmationContainer/index.tsx +197 -197
  48. package/src/components/confirmationContainer/social-buttons.tsx +94 -94
  49. package/src/components/confirmationContainer/style.css +202 -202
  50. package/src/components/countdown/index.tsx +98 -89
  51. package/src/components/countdown/style.css +9 -9
  52. package/src/components/index.ts +7 -7
  53. package/src/components/loginModal/index.tsx +209 -209
  54. package/src/components/loginModal/style.css +71 -71
  55. package/src/components/myTicketsContainer/index.tsx +196 -196
  56. package/src/components/myTicketsContainer/row.tsx +41 -41
  57. package/src/components/myTicketsContainer/style.css +39 -39
  58. package/src/components/myTicketsContainer/tableConfig.tsx +34 -34
  59. package/src/components/orderDetailsContainer/index.tsx +252 -249
  60. package/src/components/orderDetailsContainer/style.css +72 -72
  61. package/src/components/orderDetailsContainer/ticketsTable.tsx +130 -124
  62. package/src/components/paymentContainer/index.tsx +285 -284
  63. package/src/components/registerModal/index.tsx +190 -190
  64. package/src/components/rsvpContainer/index.tsx +126 -0
  65. package/src/components/stripePayment/index.tsx +254 -253
  66. package/src/components/stripePayment/style.css +59 -59
  67. package/src/components/ticketResale/index.tsx +74 -56
  68. package/src/components/ticketResaleModal/index.tsx +215 -210
  69. package/src/components/ticketResaleModal/style.css +28 -28
  70. package/src/components/ticketsContainer/AccessCodeSection.tsx +50 -0
  71. package/src/components/ticketsContainer/PromoCodeSection.tsx +88 -99
  72. package/src/components/ticketsContainer/ReferralLogic.tsx +31 -33
  73. package/src/components/ticketsContainer/TicketRow.tsx +83 -83
  74. package/src/components/ticketsContainer/TicketsSection.tsx +90 -81
  75. package/src/components/ticketsContainer/index.tsx +464 -430
  76. package/src/components/ticketsContainer/style.css +181 -181
  77. package/src/components/ticketsContainer/utils.ts +11 -11
  78. package/src/components/timerWidget/index.tsx +87 -70
  79. package/src/components/timerWidget/style.css +34 -26
  80. package/src/components/waitingList/index.tsx +178 -178
  81. package/src/components/waitingList/style.css +26 -26
  82. package/src/env.ts +20 -20
  83. package/src/index.ts +15 -13
  84. package/src/normalizers/index.ts +45 -45
  85. package/src/types/billing-info-data.ts +37 -37
  86. package/src/types/payment-field.ts +7 -7
  87. package/src/types/referral-promotion.ts +7 -7
  88. package/src/utils/createCheckoutDataBodyWithDefaultHolder.ts +59 -59
  89. package/src/utils/downloadPDF.tsx +30 -30
  90. package/src/utils/formikErrorFocus.ts +24 -24
  91. package/src/utils/getImage.ts +14 -14
  92. package/src/utils/getQueryVariable.ts +13 -13
  93. package/src/utils/index.ts +5 -5
  94. package/src/utils/setConfigs.ts +26 -26
  95. package/src/utils/showZero.tsx +10 -10
  96. package/src/validators/index.ts +20 -20
package/src/api/index.ts CHANGED
@@ -1,278 +1,300 @@
1
- import axios, { AxiosInstance, AxiosRequestConfig } from 'axios'
2
- import _get from 'lodash/get'
3
-
4
- import { CONFIGS } from '../utils'
5
-
6
- const isWindowDefined = typeof window !== 'undefined'
7
-
8
- const ttfHeaders: { [key: string]: any } = {
9
- Accept: 'application/vnd.api+json',
10
- 'Content-Type': 'application/vnd.api+json',
11
- }
12
-
13
- if (isWindowDefined && localStorage.getItem('auth_guest_token')) {
14
- ttfHeaders['Authorization-Guest'] = localStorage.getItem('auth_guest_token')
15
- }
16
-
17
- interface IPublicRequest extends AxiosInstance {
18
- setGuestToken: (token: string) => void;
19
- setAccessToken: (token: string) => void;
20
- setBaseUrl: (baseUrl: string) => void;
21
- }
22
-
23
- export const publicRequest: IPublicRequest = axios.create({
24
- baseURL: CONFIGS.BASE_URL || `https://www.ticketfairy.com/api`,
25
- headers: ttfHeaders,
26
- }) as IPublicRequest
27
-
28
- publicRequest.interceptors.response.use(
29
- response => response,
30
- error => {
31
- if (error?.response?.status === 401) {
32
- if (isWindowDefined) {
33
- window.localStorage.removeItem('auth_guest_token')
34
- window.localStorage.removeItem('user_data')
35
- window.localStorage.removeItem('access_token')
36
- const errorType = error?.response?.data?.error
37
- if (errorType === 'invalid_token') {
38
- window.location.href = '/'
39
- }
40
- }
41
- }
42
- return Promise.reject(error)
43
- }
44
- )
45
-
46
- publicRequest.interceptors.request.use((config: AxiosRequestConfig) => {
47
- const guestToken = isWindowDefined
48
- ? window.localStorage.getItem('auth_guest_token')
49
- : null
50
- const userData = isWindowDefined
51
- ? window.localStorage.getItem('user_data')
52
- : null
53
- const accessToken = isWindowDefined
54
- ? window.localStorage.getItem('access_token')
55
- : null
56
-
57
- if (userData && accessToken) {
58
- const updatedHeaders = {
59
- ...config.headers,
60
- Authorization: `Bearer ${accessToken}`,
61
- }
62
- config.headers = updatedHeaders
63
- }
64
-
65
- if (guestToken) {
66
- publicRequest.setGuestToken(guestToken)
67
- const updatedHeaders = {
68
- ...config.headers,
69
- 'Authorization-Guest': guestToken,
70
- }
71
- config.headers = updatedHeaders
72
- }
73
-
74
- if (CONFIGS.X_SOURCE_ORIGIN) {
75
- const updatedHeaders = {
76
- ...config.headers,
77
- 'X-Source-Origin': CONFIGS.X_SOURCE_ORIGIN,
78
- }
79
- config.headers = updatedHeaders
80
- }
81
-
82
- if (CONFIGS.BASE_URL) {
83
- config.baseURL = CONFIGS.BASE_URL + '/api'
84
- }
85
-
86
- return config
87
- })
88
-
89
- publicRequest.setGuestToken = token =>
90
- (publicRequest.defaults.headers.common['Authorization-Guest'] = token)
91
-
92
- publicRequest.setBaseUrl = (baseUrl: string) =>
93
- (publicRequest.defaults.baseURL = baseUrl + '/api')
94
-
95
- publicRequest.setAccessToken = token =>
96
- (publicRequest.defaults.headers.common.Authorization = token)
97
-
98
- export const setXSourceOrigin = (sourceOrigin: string) => {
99
- ttfHeaders['X-Source-Origin'] = sourceOrigin
100
- }
101
-
102
- export const setCustomHeader = (response: any) => {
103
- const guestHeaderResponseValue = _get(response, 'headers.authorization-guest')
104
- const guestHeaderExistingValue = _get(
105
- response,
106
- 'config.headers[Authorization-Guest]'
107
- )
108
- const guestHeader = guestHeaderResponseValue || guestHeaderExistingValue
109
-
110
- if (guestHeader) {
111
- if (isWindowDefined) {
112
- window.localStorage.setItem('auth_guest_token', guestHeader)
113
- publicRequest.setGuestToken(guestHeader)
114
- }
115
- }
116
- }
117
-
118
- export const handleSetAccessToken = (token: any) => {
119
- if (token) {
120
- if (isWindowDefined) {
121
- window.localStorage.setItem('access_token', token)
122
- publicRequest.setAccessToken(token)
123
- }
124
- }
125
- }
126
-
127
- export function getEvent(id: string | number) {
128
- const response = publicRequest
129
- .get(`v1/event/${id}`, { headers: ttfHeaders })
130
- .catch(error => {
131
- throw error
132
- })
133
- return response
134
- }
135
-
136
- export function getTickets(id: string | number, promoCode: string) {
137
- const response = publicRequest
138
- .get(`v1/event/${id}/tickets/`, {
139
- headers: promoCode
140
- ? {
141
- ...ttfHeaders,
142
- 'Promotion-Event': String(id),
143
- 'Promotion-Code': promoCode,
144
- }
145
- : { ...ttfHeaders },
146
- })
147
- .catch(error => {
148
- throw error
149
- })
150
- return response
151
- }
152
-
153
- export const addToCart = (id: string | number, data: any) => {
154
- const res = publicRequest.post(`v1/event/${id}/add-to-cart/`, { data })
155
- return res
156
- }
157
-
158
- export const getCart = () => {
159
- const res = publicRequest.get(`v1/cart/`)
160
- return res
161
- }
162
-
163
- export const postOnCheckout = (data: any, accessToken: string) => {
164
- const res = publicRequest.post(
165
- `v1/on-checkout/`,
166
- { data },
167
- {
168
- headers: {
169
- ...ttfHeaders,
170
- Authorization: `Bearer ${accessToken}`,
171
- },
172
- }
173
- )
174
- return res
175
- }
176
-
177
- export const authorize = (data: FormData) =>
178
- publicRequest.post(
179
- `v1/oauth/authorize-rn?client_id=${CONFIGS.CLIENT_ID ||
180
- 'e9d8f8922797b4621e562255afe90dbf'}`,
181
- data
182
- )
183
-
184
- export const register = (data: FormData) =>
185
- publicRequest.post('v1/oauth/register-rn', data)
186
-
187
- export const getAccessToken = (data: FormData) =>
188
- publicRequest.post('v1/oauth/access_token', data)
189
-
190
- export const getPaymentData = (hash: string) => {
191
- const response = publicRequest
192
- .get(`v1/order/${hash}/review/`)
193
- .catch(error => {
194
- throw error
195
- })
196
- return response
197
- }
198
-
199
- export const handlePaymentData = (orderHash: string, data: any) => {
200
- const res = publicRequest
201
- .post(`v1/order/${orderHash}/pay`, {
202
- data: { attributes: { 'stripe-source': data } },
203
- })
204
- .catch(error => {
205
- throw error
206
- })
207
- return res
208
- }
209
-
210
- export const handlePaymentSuccess = (orderHash: string) => {
211
- const res = publicRequest
212
- .post(`v1/order/${orderHash}/success`)
213
- .catch(error => {
214
- throw error
215
- })
216
- return res
217
- }
218
-
219
- export const handleFreeSuccess = (orderHash: string) => {
220
- const res = publicRequest
221
- .post(`v1/order/${orderHash}/complete_free_registration`)
222
- .catch(error => {
223
- throw error
224
- })
225
- return res
226
- }
227
-
228
- export const getProfileData = (accessToken: any) =>
229
- publicRequest
230
- .get('/customer/profile/', {
231
- headers: {
232
- ...ttfHeaders,
233
- Authorization: `Bearer ${accessToken}`,
234
- },
235
- })
236
- .catch((e: any) => {
237
- return e
238
- })
239
-
240
- export const getCountries = () => publicRequest.get('/countries/')
241
-
242
- export const getConfirmationData = (orderHash: string) =>
243
- publicRequest.get(`v1/order/${orderHash}/payment/complete`)
244
-
245
- export const getStates = (countryId: string) =>
246
- publicRequest.get(`/countries/${countryId}/states/`)
247
-
248
- export const getOrders = (page: number, limit: number, eventSlug: string) =>
249
- publicRequest.get(
250
- `v1/account/orders/?page=${page}&limit=${limit}&filter[event]=${eventSlug}&filter[brand]=${CONFIGS.BRAND_SLUG}`
251
- )
252
-
253
- export const getOrderDetails = (orderId: string) =>
254
- publicRequest.get(`v1/account/order/${orderId}`)
255
-
256
- export const addToWaitingList = (id: number, data: any) =>
257
- publicRequest.post(`v1/event/${id}/add_to_waiting_list`, data)
258
-
259
- export const getConditions = (eventId: string) =>
260
- publicRequest.get(`v1/event/${eventId}/conditions`)
261
-
262
- // resale
263
- export const resaleTicket = (data: any, hash: string) => {
264
- return publicRequest.post(`v1/ticket/${hash}/sell`, data)
265
- }
266
-
267
- export const removeFromResale = (hash: string) => {
268
- return publicRequest.delete(`v1/ticket/${hash}/sell`)
269
- }
270
-
271
- export const postReferralVisits = (eventId: string, referralId: string) =>
272
- publicRequest.post(`v1/event/${eventId}/referrer/`, {
273
- referrer: `${referralId}`,
274
- })
275
-
276
- export const checkTicketStatus = (hash: string) => {
277
- return publicRequest.post(`v1/ticket/${hash}/status/`)
278
- }
1
+ import axios, { AxiosInstance, AxiosRequestConfig } from 'axios'
2
+ import _get from 'lodash/get'
3
+
4
+ import { CONFIGS } from '../utils'
5
+
6
+ const isWindowDefined = typeof window !== 'undefined'
7
+
8
+ const ttfHeaders: { [key: string]: any } = {
9
+ Accept: 'application/vnd.api+json',
10
+ 'Content-Type': 'application/vnd.api+json',
11
+ }
12
+
13
+ if (isWindowDefined && localStorage.getItem('auth_guest_token')) {
14
+ ttfHeaders['Authorization-Guest'] = localStorage.getItem('auth_guest_token')
15
+ }
16
+
17
+ interface IPublicRequest extends AxiosInstance {
18
+ setGuestToken: (token: string) => void;
19
+ setAccessToken: (token: string) => void;
20
+ setBaseUrl: (baseUrl: string) => void;
21
+ }
22
+
23
+ export const publicRequest: IPublicRequest = axios.create({
24
+ baseURL: CONFIGS.BASE_URL || `https://www.ticketfairy.com/api`,
25
+ headers: ttfHeaders,
26
+ }) as IPublicRequest
27
+
28
+ publicRequest.interceptors.response.use(
29
+ response => {
30
+ const authGuestToken = _get(response, 'headers.authorization-guest')
31
+
32
+ if (isWindowDefined && authGuestToken) {
33
+ window.localStorage.setItem('auth_guest_token', authGuestToken)
34
+ publicRequest.setGuestToken(authGuestToken)
35
+ }
36
+
37
+ return response
38
+ },
39
+ error => {
40
+ if (error?.response?.status === 401) {
41
+ if (isWindowDefined) {
42
+ window.localStorage.removeItem('user_data')
43
+ window.localStorage.removeItem('access_token')
44
+ const errorType = error?.response?.data?.error
45
+ if (errorType === 'invalid_token') {
46
+ window.location.href = '/'
47
+ }
48
+ }
49
+ }
50
+
51
+ const authGuestToken = _get(error, 'response.headers.authorization-guest')
52
+ if (isWindowDefined && authGuestToken) {
53
+ window.localStorage.setItem('auth_guest_token', authGuestToken)
54
+ publicRequest.setGuestToken(authGuestToken)
55
+ }
56
+
57
+ return Promise.reject(error)
58
+ }
59
+ )
60
+
61
+ publicRequest.interceptors.request.use((config: AxiosRequestConfig) => {
62
+ const guestToken = isWindowDefined
63
+ ? window.localStorage.getItem('auth_guest_token')
64
+ : null
65
+ const userData = isWindowDefined
66
+ ? window.localStorage.getItem('user_data')
67
+ : null
68
+ const accessToken = isWindowDefined
69
+ ? window.localStorage.getItem('access_token')
70
+ : null
71
+
72
+ if (userData && accessToken) {
73
+ const updatedHeaders = {
74
+ ...config.headers,
75
+ Authorization: `Bearer ${accessToken}`,
76
+ }
77
+ config.headers = updatedHeaders
78
+ }
79
+
80
+ if (guestToken) {
81
+ publicRequest.setGuestToken(guestToken)
82
+ const updatedHeaders = {
83
+ ...config.headers,
84
+ 'Authorization-Guest': guestToken,
85
+ }
86
+ config.headers = updatedHeaders
87
+ }
88
+
89
+ if (CONFIGS.X_SOURCE_ORIGIN) {
90
+ const updatedHeaders = {
91
+ ...config.headers,
92
+ 'X-Source-Origin': CONFIGS.X_SOURCE_ORIGIN,
93
+ }
94
+ config.headers = updatedHeaders
95
+ }
96
+
97
+ if (CONFIGS.BASE_URL) {
98
+ config.baseURL = CONFIGS.BASE_URL + '/api'
99
+ }
100
+
101
+ return config
102
+ })
103
+
104
+ publicRequest.setGuestToken = token =>
105
+ (publicRequest.defaults.headers.common['Authorization-Guest'] = token)
106
+
107
+ publicRequest.setBaseUrl = (baseUrl: string) =>
108
+ (publicRequest.defaults.baseURL = baseUrl + '/api')
109
+
110
+ publicRequest.setAccessToken = token =>
111
+ (publicRequest.defaults.headers.common.Authorization = token)
112
+
113
+ export const setXSourceOrigin = (sourceOrigin: string) => {
114
+ ttfHeaders['X-Source-Origin'] = sourceOrigin
115
+ }
116
+
117
+ export const setCustomHeader = (response: any) => {
118
+ const guestHeaderResponseValue = _get(response, 'headers.authorization-guest')
119
+ const guestHeaderExistingValue = _get(
120
+ response,
121
+ 'config.headers[Authorization-Guest]'
122
+ )
123
+ const guestHeader = guestHeaderResponseValue || guestHeaderExistingValue
124
+
125
+ if (guestHeader) {
126
+ if (isWindowDefined) {
127
+ window.localStorage.setItem('auth_guest_token', guestHeader)
128
+ publicRequest.setGuestToken(guestHeader)
129
+ }
130
+ }
131
+ }
132
+
133
+ export const handleSetAccessToken = (token: any) => {
134
+ if (token) {
135
+ if (isWindowDefined) {
136
+ window.localStorage.setItem('access_token', token)
137
+ publicRequest.setAccessToken(token)
138
+ }
139
+ }
140
+ }
141
+
142
+ export function getEvent(id: string | number) {
143
+ const response = publicRequest
144
+ .get(`v1/event/${id}`, { headers: ttfHeaders })
145
+ .catch(error => {
146
+ throw error
147
+ })
148
+ return response
149
+ }
150
+
151
+ export function getTickets(id: string | number, promoCode: string) {
152
+ const response = publicRequest
153
+ .get(`v1/event/${id}/tickets/`, {
154
+ headers: promoCode
155
+ ? {
156
+ ...ttfHeaders,
157
+ 'Promotion-Event': String(id),
158
+ 'Promotion-Code': promoCode,
159
+ }
160
+ : { ...ttfHeaders },
161
+ })
162
+ .catch(error => {
163
+ throw error
164
+ })
165
+ return response
166
+ }
167
+
168
+ export const addToCart = (id: string | number, data: any) => {
169
+ const res = publicRequest.post(`v1/event/${id}/add-to-cart/`, { data })
170
+ return res
171
+ }
172
+
173
+ export const getCart = () => {
174
+ const res = publicRequest.get(`v1/cart/`)
175
+ return res
176
+ }
177
+
178
+ export const postOnCheckout = (data: any, accessToken: string) => {
179
+ const res = publicRequest.post(
180
+ `v1/on-checkout/`,
181
+ { data },
182
+ {
183
+ headers: {
184
+ ...ttfHeaders,
185
+ Authorization: `Bearer ${accessToken}`,
186
+ },
187
+ }
188
+ )
189
+ return res
190
+ }
191
+
192
+ export const authorize = (data: FormData) =>
193
+ publicRequest.post(
194
+ `v1/oauth/authorize-rn?client_id=${CONFIGS.CLIENT_ID ||
195
+ 'e9d8f8922797b4621e562255afe90dbf'}`,
196
+ data
197
+ )
198
+
199
+ export const register = (data: FormData) =>
200
+ publicRequest.post('v1/oauth/register-rn', data)
201
+
202
+ export const getAccessToken = (data: FormData) =>
203
+ publicRequest.post('v1/oauth/access_token', data)
204
+
205
+ export const getPaymentData = (hash: string) => {
206
+ const response = publicRequest
207
+ .get(`v1/order/${hash}/review/`)
208
+ .catch(error => {
209
+ throw error
210
+ })
211
+ return response
212
+ }
213
+
214
+ export const handlePaymentData = (orderHash: string, data: any) => {
215
+ const res = publicRequest
216
+ .post(`v1/order/${orderHash}/pay`, {
217
+ data: { attributes: { 'stripe-source': data } },
218
+ })
219
+ .catch(error => {
220
+ throw error
221
+ })
222
+ return res
223
+ }
224
+
225
+ export const handlePaymentSuccess = (orderHash: string) => {
226
+ const res = publicRequest
227
+ .post(`v1/order/${orderHash}/success`)
228
+ .catch(error => {
229
+ throw error
230
+ })
231
+ return res
232
+ }
233
+
234
+ export const handleFreeSuccess = (orderHash: string) => {
235
+ const res = publicRequest
236
+ .post(`v1/order/${orderHash}/complete_free_registration`)
237
+ .catch(error => {
238
+ throw error
239
+ })
240
+ return res
241
+ }
242
+
243
+ export const getProfileData = (accessToken: any) =>
244
+ publicRequest
245
+ .get('/customer/profile/', {
246
+ headers: {
247
+ ...ttfHeaders,
248
+ Authorization: `Bearer ${accessToken}`,
249
+ },
250
+ })
251
+ .catch((e: any) => {
252
+ return e
253
+ })
254
+
255
+ export const getCountries = () => publicRequest.get('/countries/')
256
+
257
+ export const getConfirmationData = (orderHash: string) =>
258
+ publicRequest.get(`v1/order/${orderHash}/payment/complete`)
259
+
260
+ export const getStates = (countryId: string) =>
261
+ publicRequest.get(`/countries/${countryId}/states/`)
262
+
263
+ export const getOrders = (page: number, limit: number, eventSlug: string) =>
264
+ publicRequest.get(
265
+ `v1/account/orders/?page=${page}&limit=${limit}&filter[event]=${eventSlug}&filter[brand]=${CONFIGS.BRAND_SLUG}`
266
+ )
267
+
268
+ export const getOrderDetails = (orderId: string) =>
269
+ publicRequest.get(`v1/account/order/${orderId}`)
270
+
271
+ export const addToWaitingList = (id: number, data: any) =>
272
+ publicRequest.post(`v1/event/${id}/add_to_waiting_list`, data)
273
+
274
+ export const getConditions = (eventId: string) =>
275
+ publicRequest.get(`v1/event/${eventId}/conditions`)
276
+
277
+ // resale
278
+ export const resaleTicket = (data: any, hash: string) => {
279
+ return publicRequest.post(`v1/ticket/${hash}/sell`, data)
280
+ }
281
+
282
+ export const removeFromResale = (hash: string) => {
283
+ return publicRequest.delete(`v1/ticket/${hash}/sell`)
284
+ }
285
+
286
+ export const postReferralVisits = (eventId: string, referralId: string) =>
287
+ publicRequest.post(`v1/event/${eventId}/referrer/`, {
288
+ referrer: `${referralId}`,
289
+ })
290
+
291
+ export const processTicket = (hash: string) => {
292
+ return publicRequest.post(`v1/ticket/${hash}/process/`)
293
+ }
294
+
295
+ export const declineInvitation = (hash: string) => {
296
+ return publicRequest.post(`v1/ticket/${hash}/decline`)
297
+ }
298
+
299
+ export const sendRSVPInfo = (eventId: number, data: any) =>
300
+ publicRequest.post(`v1/event/${eventId}/send-rsvp-info`, data)
@@ -0,0 +1,44 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
+ width="94.926px" height="94.926px" viewBox="0 0 94.926 94.926" style="enable-background:new 0 0 94.926 94.926;"
6
+ xml:space="preserve">
7
+ <g>
8
+ <path d="M55.931,47.463L94.306,9.09c0.826-0.827,0.826-2.167,0-2.994L88.833,0.62C88.436,0.224,87.896,0,87.335,0
9
+ c-0.562,0-1.101,0.224-1.498,0.62L47.463,38.994L9.089,0.62c-0.795-0.795-2.202-0.794-2.995,0L0.622,6.096
10
+ c-0.827,0.827-0.827,2.167,0,2.994l38.374,38.373L0.622,85.836c-0.827,0.827-0.827,2.167,0,2.994l5.473,5.476
11
+ c0.397,0.396,0.936,0.62,1.498,0.62s1.1-0.224,1.497-0.62l38.374-38.374l38.374,38.374c0.397,0.396,0.937,0.62,1.498,0.62
12
+ s1.101-0.224,1.498-0.62l5.473-5.476c0.826-0.827,0.826-2.167,0-2.994L55.931,47.463z"/>
13
+ </g>
14
+ <g>
15
+ </g>
16
+ <g>
17
+ </g>
18
+ <g>
19
+ </g>
20
+ <g>
21
+ </g>
22
+ <g>
23
+ </g>
24
+ <g>
25
+ </g>
26
+ <g>
27
+ </g>
28
+ <g>
29
+ </g>
30
+ <g>
31
+ </g>
32
+ <g>
33
+ </g>
34
+ <g>
35
+ </g>
36
+ <g>
37
+ </g>
38
+ <g>
39
+ </g>
40
+ <g>
41
+ </g>
42
+ <g>
43
+ </g>
44
+ </svg>
@@ -1,3 +1,3 @@
1
- <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path fill-rule="evenodd" clip-rule="evenodd" d="M10 20C15.5228 20 20 15.5228 20 10C20 4.47717 15.5228 0 10 0C4.47717 0 0 4.47717 0 10C0 15.5228 4.47717 20 10 20ZM8.14661 15.8678L16.8782 6.39722C16.9561 6.31335 17 6.19922 17 6.08008C17 5.96094 16.9561 5.8468 16.8782 5.76282L16.3016 5.12854C16.1386 4.95715 15.8796 4.95715 15.7167 5.12854L7.85004 13.661L4.28326 9.79236C4.20593 9.70776 4.10071 9.66016 3.99084 9.66016C3.9353 9.66016 3.88086 9.67236 3.83069 9.69531C3.78168 9.71777 3.73663 9.75061 3.69843 9.79236L3.12183 10.4177C3.07635 10.4667 3.04248 10.5259 3.02216 10.5905C3.00763 10.6365 3 10.6853 3 10.735C3 10.8541 3.04388 10.9683 3.12183 11.0521L7.56177 15.8678C7.6391 15.9524 7.74438 16 7.85419 16C7.96399 16 8.06927 15.9524 8.14661 15.8678Z" fill="#569F44"/>
3
- </svg>
1
+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M10 20C15.5228 20 20 15.5228 20 10C20 4.47717 15.5228 0 10 0C4.47717 0 0 4.47717 0 10C0 15.5228 4.47717 20 10 20ZM8.14661 15.8678L16.8782 6.39722C16.9561 6.31335 17 6.19922 17 6.08008C17 5.96094 16.9561 5.8468 16.8782 5.76282L16.3016 5.12854C16.1386 4.95715 15.8796 4.95715 15.7167 5.12854L7.85004 13.661L4.28326 9.79236C4.20593 9.70776 4.10071 9.66016 3.99084 9.66016C3.9353 9.66016 3.88086 9.67236 3.83069 9.69531C3.78168 9.71777 3.73663 9.75061 3.69843 9.79236L3.12183 10.4177C3.07635 10.4667 3.04248 10.5259 3.02216 10.5905C3.00763 10.6365 3 10.6853 3 10.735C3 10.8541 3.04388 10.9683 3.12183 11.0521L7.56177 15.8678C7.6391 15.9524 7.74438 16 7.85419 16C7.96399 16 8.06927 15.9524 8.14661 15.8678Z" fill="#569F44"/>
3
+ </svg>
Binary file