tf-checkout-react 1.0.104 → 1.0.105

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 (78) hide show
  1. package/dist/components/ticketsContainer/TicketsSection.d.ts +2 -1
  2. package/dist/components/ticketsContainer/index.d.ts +2 -1
  3. package/dist/images/done.svg +3 -3
  4. package/dist/tf-checkout-react.cjs.development.js +8 -6
  5. package/dist/tf-checkout-react.cjs.development.js.map +1 -1
  6. package/dist/tf-checkout-react.cjs.production.min.js +1 -1
  7. package/dist/tf-checkout-react.cjs.production.min.js.map +1 -1
  8. package/dist/tf-checkout-react.esm.js +8 -6
  9. package/dist/tf-checkout-react.esm.js.map +1 -1
  10. package/package.json +89 -89
  11. package/src/.d.ts +2 -2
  12. package/src/api/index.ts +293 -293
  13. package/src/assets/images/done.svg +3 -3
  14. package/src/components/billing-info-container/index.tsx +796 -796
  15. package/src/components/billing-info-container/style.css +105 -105
  16. package/src/components/billing-info-container/utils.ts +224 -224
  17. package/src/components/common/CheckboxField.tsx +41 -41
  18. package/src/components/common/CustomField.tsx +84 -84
  19. package/src/components/common/FormikPhoneNumberField.tsx +51 -51
  20. package/src/components/common/Loader.tsx +9 -9
  21. package/src/components/common/RadioField.tsx +35 -35
  22. package/src/components/common/RedirectModal.tsx +43 -43
  23. package/src/components/common/SelectField.tsx +80 -80
  24. package/src/components/common/SnackbarAlert.tsx +53 -53
  25. package/src/components/common/index.tsx +4 -4
  26. package/src/components/confirmModal/index.tsx +51 -51
  27. package/src/components/confirmModal/style.css +21 -21
  28. package/src/components/confirmationContainer/config.ts +72 -72
  29. package/src/components/confirmationContainer/index.tsx +197 -197
  30. package/src/components/confirmationContainer/social-buttons.tsx +94 -94
  31. package/src/components/confirmationContainer/style.css +202 -202
  32. package/src/components/countdown/index.tsx +89 -89
  33. package/src/components/countdown/style.css +9 -9
  34. package/src/components/index.ts +7 -7
  35. package/src/components/loginModal/index.tsx +209 -209
  36. package/src/components/loginModal/style.css +71 -71
  37. package/src/components/myTicketsContainer/index.tsx +196 -196
  38. package/src/components/myTicketsContainer/row.tsx +41 -41
  39. package/src/components/myTicketsContainer/style.css +39 -39
  40. package/src/components/myTicketsContainer/tableConfig.tsx +34 -34
  41. package/src/components/orderDetailsContainer/index.tsx +249 -249
  42. package/src/components/orderDetailsContainer/style.css +72 -72
  43. package/src/components/orderDetailsContainer/ticketsTable.tsx +124 -124
  44. package/src/components/paymentContainer/index.tsx +284 -284
  45. package/src/components/registerModal/index.tsx +190 -190
  46. package/src/components/stripePayment/index.tsx +253 -253
  47. package/src/components/stripePayment/style.css +59 -59
  48. package/src/components/ticketResale/index.tsx +56 -56
  49. package/src/components/ticketResaleModal/index.tsx +210 -210
  50. package/src/components/ticketResaleModal/style.css +28 -28
  51. package/src/components/ticketsContainer/PromoCodeSection.tsx +99 -99
  52. package/src/components/ticketsContainer/ReferralLogic.tsx +33 -33
  53. package/src/components/ticketsContainer/TicketRow.tsx +83 -83
  54. package/src/components/ticketsContainer/TicketsSection.tsx +85 -81
  55. package/src/components/ticketsContainer/index.tsx +430 -427
  56. package/src/components/ticketsContainer/style.css +181 -181
  57. package/src/components/ticketsContainer/utils.ts +11 -11
  58. package/src/components/timerWidget/index.tsx +70 -70
  59. package/src/components/timerWidget/style.css +26 -26
  60. package/src/components/waitingList/index.tsx +178 -178
  61. package/src/components/waitingList/style.css +26 -26
  62. package/src/env.ts +20 -20
  63. package/src/index.ts +14 -14
  64. package/src/normalizers/index.ts +45 -45
  65. package/src/types/billing-info-data.ts +37 -37
  66. package/src/types/payment-field.ts +7 -7
  67. package/src/types/referral-promotion.ts +7 -7
  68. package/src/utils/createCheckoutDataBodyWithDefaultHolder.ts +59 -59
  69. package/src/utils/downloadPDF.tsx +30 -30
  70. package/src/utils/formikErrorFocus.ts +24 -24
  71. package/src/utils/getImage.ts +14 -14
  72. package/src/utils/getQueryVariable.ts +13 -13
  73. package/src/utils/index.ts +5 -5
  74. package/src/utils/setConfigs.ts +26 -26
  75. package/src/utils/showZero.tsx +10 -10
  76. package/src/validators/index.ts +20 -20
  77. package/src/.DS_Store +0 -0
  78. package/src/components/.DS_Store +0 -0
package/src/api/index.ts CHANGED
@@ -1,293 +1,293 @@
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 checkTicketStatus = (hash: string) => {
292
- return publicRequest.post(`v1/ticket/${hash}/status/`)
293
- }
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 checkTicketStatus = (hash: string) => {
292
+ return publicRequest.post(`v1/ticket/${hash}/status/`)
293
+ }
@@ -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>