@eventlook/sdk 1.7.0 → 1.7.2-beta.0

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/.claude/settings.local.json +10 -0
  2. package/.prettierignore +3 -0
  3. package/CLAUDE.md +33 -0
  4. package/dist/cjs/{index-0a8uUeDg.js → index-DmK9RPSa.js} +26553 -25757
  5. package/dist/cjs/index-DmK9RPSa.js.map +1 -0
  6. package/dist/cjs/index.js +3 -1
  7. package/dist/cjs/index.js.map +1 -1
  8. package/dist/cjs/{index.umd-BvTBfvwB.js → index.umd-DUMMTVwU.js} +2 -2
  9. package/dist/cjs/{index.umd-BvTBfvwB.js.map → index.umd-DUMMTVwU.js.map} +1 -1
  10. package/dist/cjs/{mui-tel-input.es-Bjml407E.js → mui-tel-input.es-Dk9M_v4X.js} +6 -6
  11. package/dist/{esm/mui-tel-input.es-Bt2rE3An.js.map → cjs/mui-tel-input.es-Dk9M_v4X.js.map} +1 -1
  12. package/dist/esm/{index-ByLnhSXB.js → index-C0HcmMMr.js} +27111 -26333
  13. package/dist/esm/index-C0HcmMMr.js.map +1 -0
  14. package/dist/esm/index.js +3 -1
  15. package/dist/esm/index.js.map +1 -1
  16. package/dist/esm/{index.umd-DepuOxm3.js → index.umd-BqJOlKvJ.js} +4 -4
  17. package/dist/esm/{index.umd-DepuOxm3.js.map → index.umd-BqJOlKvJ.js.map} +1 -1
  18. package/dist/esm/{mui-tel-input.es-Bt2rE3An.js → mui-tel-input.es-Cb4Lpqx7.js} +21 -21
  19. package/dist/{cjs/mui-tel-input.es-Bjml407E.js.map → esm/mui-tel-input.es-Cb4Lpqx7.js.map} +1 -1
  20. package/dist/types/form/paydroid/PaydroidCashlessSection.d.ts +7 -0
  21. package/dist/types/form/paydroid/PaydroidError.d.ts +3 -0
  22. package/dist/types/form/paydroid/PaydroidErrorAccount.d.ts +3 -0
  23. package/dist/types/form/paydroid/PaydroidErrorTicket.d.ts +3 -0
  24. package/dist/types/form/paydroid/PaydroidPage.d.ts +6 -0
  25. package/dist/types/form/paydroid/PaydroidStatusCard.d.ts +10 -0
  26. package/dist/types/form/paydroid/PaydroidSuccess.d.ts +3 -0
  27. package/dist/types/form/paydroid/PaydroidSuccessTopup.d.ts +3 -0
  28. package/dist/types/form/tickets/PrimaryTicketDialog.d.ts +10 -0
  29. package/dist/types/locales/cs.d.ts +38 -0
  30. package/dist/types/locales/en.d.ts +40 -1
  31. package/dist/types/locales/es.d.ts +40 -1
  32. package/dist/types/locales/pl.d.ts +40 -1
  33. package/dist/types/locales/sk.d.ts +40 -1
  34. package/dist/types/locales/uk.d.ts +40 -1
  35. package/dist/types/modules/paydroid.d.ts +4 -0
  36. package/dist/types/modules/ticket.d.ts +1 -0
  37. package/dist/types/utils/data/page.d.ts +7 -0
  38. package/dist/types/utils/page.d.ts +1 -0
  39. package/dist/types/utils/paydroid.d.ts +6 -0
  40. package/dist/types/utils/types/global.type.d.ts +1 -0
  41. package/dist/types/utils/types/order.type.d.ts +2 -0
  42. package/dist/types/utils/types/paydroid.d.ts +23 -0
  43. package/dist/types/utils/types/release-category.type.d.ts +1 -0
  44. package/dist/types/utils/types/release.type.d.ts +2 -0
  45. package/dist/types/utils/types/ticket.type.d.ts +1 -0
  46. package/package.json +3 -1
  47. package/src/form/PaymentSuccess.tsx +6 -2
  48. package/src/form/TicketForm.tsx +28 -1
  49. package/src/form/paydroid/PaydroidCashlessSection.tsx +311 -0
  50. package/src/form/paydroid/PaydroidError.tsx +26 -0
  51. package/src/form/paydroid/PaydroidErrorAccount.tsx +26 -0
  52. package/src/form/paydroid/PaydroidErrorTicket.tsx +26 -0
  53. package/src/form/paydroid/PaydroidPage.tsx +22 -0
  54. package/src/form/paydroid/PaydroidStatusCard.tsx +91 -0
  55. package/src/form/paydroid/PaydroidSuccess.tsx +26 -0
  56. package/src/form/paydroid/PaydroidSuccessTopup.tsx +26 -0
  57. package/src/form/tickets/PrimaryTicketDialog.tsx +144 -0
  58. package/src/form/tickets/ReleaseWithMerchandise.tsx +89 -8
  59. package/src/form/tickets/TicketSelectionMobile.tsx +80 -12
  60. package/src/locales/cs.tsx +45 -0
  61. package/src/locales/en.tsx +47 -1
  62. package/src/locales/es.tsx +48 -1
  63. package/src/locales/pl.tsx +47 -1
  64. package/src/locales/sk.tsx +49 -1
  65. package/src/locales/uk.tsx +47 -2
  66. package/src/modules/paydroid.ts +33 -0
  67. package/src/modules/ticket.ts +13 -0
  68. package/src/utils/data/page.ts +7 -0
  69. package/src/utils/page.ts +4 -0
  70. package/src/utils/paydroid.ts +35 -0
  71. package/src/utils/types/global.type.ts +1 -0
  72. package/src/utils/types/order.type.ts +2 -0
  73. package/src/utils/types/paydroid.ts +26 -0
  74. package/src/utils/types/release-category.type.ts +1 -0
  75. package/src/utils/types/release.type.ts +2 -0
  76. package/src/utils/types/ticket.type.ts +1 -0
  77. package/dist/cjs/index-0a8uUeDg.js.map +0 -1
  78. package/dist/esm/index-ByLnhSXB.js.map +0 -1
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { IOrderPaid } from '@utils/types/order.type';
3
+ interface Props {
4
+ data: IOrderPaid;
5
+ }
6
+ declare const PaydroidCashlessSection: React.FC<Props>;
7
+ export default PaydroidCashlessSection;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const PaydroidError: React.FC;
3
+ export default PaydroidError;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const PaydroidErrorAccount: React.FC;
3
+ export default PaydroidErrorAccount;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const PaydroidErrorTicket: React.FC;
3
+ export default PaydroidErrorTicket;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ interface Props {
3
+ page: string | null;
4
+ }
5
+ declare const PaydroidPage: React.FC<Props>;
6
+ export default PaydroidPage;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ interface Props {
3
+ icon: React.ReactNode;
4
+ heading: string;
5
+ subtitle: string;
6
+ buttonLabel: string;
7
+ onButtonClick: () => void;
8
+ }
9
+ declare const PaydroidStatusCard: React.FC<Props>;
10
+ export default PaydroidStatusCard;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const PaydroidSuccess: React.FC;
3
+ export default PaydroidSuccess;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const PaydroidSuccessTopup: React.FC;
3
+ export default PaydroidSuccessTopup;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ interface Props {
3
+ open: boolean;
4
+ onClose: () => void;
5
+ onConfirm: (number: string) => void;
6
+ usedNumbers?: string[];
7
+ validateRemote?: (number: string) => Promise<void>;
8
+ }
9
+ declare const PrimaryTicketDialog: React.FC<Props>;
10
+ export default PrimaryTicketDialog;
@@ -58,6 +58,11 @@ declare const cs: {
58
58
  payment_overview_close: string;
59
59
  ticket_quantity_decrease: string;
60
60
  ticket_quantity_increase: string;
61
+ primary_ticket_number: string;
62
+ primary_ticket_number_hint: string;
63
+ primary_ticket_dialog_title: string;
64
+ primary_ticket_dialog_input_label: string;
65
+ amount: string;
61
66
  };
62
67
  validation: {
63
68
  required: string;
@@ -71,6 +76,9 @@ declare const cs: {
71
76
  min_purchase_not_met: string;
72
77
  count_tickets_or_products: string;
73
78
  insurance_terms_and_conditions: string;
79
+ primary_ticket_required: string;
80
+ primary_ticket_numeric: string;
81
+ primary_ticket_duplicate: string;
74
82
  };
75
83
  };
76
84
  event: {
@@ -160,6 +168,36 @@ declare const cs: {
160
168
  button: string;
161
169
  products: string;
162
170
  };
171
+ paydroid: {
172
+ label: string;
173
+ heading: string;
174
+ heading_cta: string;
175
+ subtitle: string;
176
+ amount_label: string;
177
+ amount_placeholder: string;
178
+ promo: string;
179
+ terms_prefix: string;
180
+ terms_conditions: string;
181
+ terms_middle: string;
182
+ terms_privacy: string;
183
+ terms: string;
184
+ skip: string;
185
+ submit: string;
186
+ success_title: string;
187
+ success_subtitle: string;
188
+ topup_success_title: string;
189
+ topup_success_subtitle: string;
190
+ error_title: string;
191
+ error_subtitle: string;
192
+ error_account_title: string;
193
+ error_account_subtitle: string;
194
+ error_account_button: string;
195
+ error_ticket_title: string;
196
+ error_ticket_subtitle: string;
197
+ faq_button: string;
198
+ retry_button: string;
199
+ missing_api_key: string;
200
+ };
163
201
  unpaid: string;
164
202
  unpaid_description: string;
165
203
  };
@@ -58,6 +58,11 @@ declare const en: {
58
58
  payment_overview_close: string;
59
59
  ticket_quantity_decrease: string;
60
60
  ticket_quantity_increase: string;
61
+ primary_ticket_number: string;
62
+ primary_ticket_number_hint: string;
63
+ primary_ticket_dialog_title: string;
64
+ primary_ticket_dialog_input_label: string;
65
+ amount: string;
61
66
  };
62
67
  validation: {
63
68
  required: string;
@@ -70,6 +75,10 @@ declare const en: {
70
75
  promo_code_cant_combine: string;
71
76
  min_purchase_not_met: string;
72
77
  count_tickets_or_products: string;
78
+ insurance_terms_and_conditions: string;
79
+ primary_ticket_required: string;
80
+ primary_ticket_numeric: string;
81
+ primary_ticket_duplicate: string;
73
82
  };
74
83
  };
75
84
  event: {
@@ -116,9 +125,9 @@ declare const en: {
116
125
  terms_and_conditions: string;
117
126
  insurance: {
118
127
  label: string;
128
+ checkbox: string;
119
129
  per_ticket: string;
120
130
  modal: {
121
- title: string;
122
131
  description: string[];
123
132
  links: {
124
133
  insurance: string;
@@ -159,6 +168,36 @@ declare const en: {
159
168
  button: string;
160
169
  products: string;
161
170
  };
171
+ paydroid: {
172
+ label: string;
173
+ heading: string;
174
+ heading_cta: string;
175
+ subtitle: string;
176
+ amount_label: string;
177
+ amount_placeholder: string;
178
+ promo: string;
179
+ terms_prefix: string;
180
+ terms_conditions: string;
181
+ terms_middle: string;
182
+ terms_privacy: string;
183
+ terms: string;
184
+ skip: string;
185
+ submit: string;
186
+ success_title: string;
187
+ success_subtitle: string;
188
+ topup_success_title: string;
189
+ topup_success_subtitle: string;
190
+ error_title: string;
191
+ error_subtitle: string;
192
+ error_account_title: string;
193
+ error_account_subtitle: string;
194
+ error_account_button: string;
195
+ error_ticket_title: string;
196
+ error_ticket_subtitle: string;
197
+ faq_button: string;
198
+ retry_button: string;
199
+ missing_api_key: string;
200
+ };
162
201
  unpaid: string;
163
202
  unpaid_description: string;
164
203
  };
@@ -58,6 +58,11 @@ declare const es: {
58
58
  payment_overview_close: string;
59
59
  ticket_quantity_decrease: string;
60
60
  ticket_quantity_increase: string;
61
+ primary_ticket_number: string;
62
+ primary_ticket_number_hint: string;
63
+ primary_ticket_dialog_title: string;
64
+ primary_ticket_dialog_input_label: string;
65
+ amount: string;
61
66
  };
62
67
  validation: {
63
68
  required: string;
@@ -70,6 +75,10 @@ declare const es: {
70
75
  promo_code_cant_combine: string;
71
76
  min_purchase_not_met: string;
72
77
  count_tickets_or_products: string;
78
+ insurance_terms_and_conditions: string;
79
+ primary_ticket_required: string;
80
+ primary_ticket_numeric: string;
81
+ primary_ticket_duplicate: string;
73
82
  };
74
83
  };
75
84
  event: {
@@ -116,9 +125,9 @@ declare const es: {
116
125
  terms_and_conditions: string;
117
126
  insurance: {
118
127
  label: string;
128
+ checkbox: string;
119
129
  per_ticket: string;
120
130
  modal: {
121
- title: string;
122
131
  description: string[];
123
132
  links: {
124
133
  insurance: string;
@@ -159,6 +168,36 @@ declare const es: {
159
168
  button: string;
160
169
  products: string;
161
170
  };
171
+ paydroid: {
172
+ label: string;
173
+ heading: string;
174
+ heading_cta: string;
175
+ subtitle: string;
176
+ amount_label: string;
177
+ amount_placeholder: string;
178
+ promo: string;
179
+ terms_prefix: string;
180
+ terms_conditions: string;
181
+ terms_middle: string;
182
+ terms_privacy: string;
183
+ terms: string;
184
+ skip: string;
185
+ submit: string;
186
+ success_title: string;
187
+ success_subtitle: string;
188
+ topup_success_title: string;
189
+ topup_success_subtitle: string;
190
+ error_title: string;
191
+ error_subtitle: string;
192
+ error_account_title: string;
193
+ error_account_subtitle: string;
194
+ error_account_button: string;
195
+ error_ticket_title: string;
196
+ error_ticket_subtitle: string;
197
+ faq_button: string;
198
+ retry_button: string;
199
+ missing_api_key: string;
200
+ };
162
201
  unpaid: string;
163
202
  unpaid_description: string;
164
203
  };
@@ -58,6 +58,11 @@ declare const pl: {
58
58
  payment_overview_close: string;
59
59
  ticket_quantity_decrease: string;
60
60
  ticket_quantity_increase: string;
61
+ primary_ticket_number: string;
62
+ primary_ticket_number_hint: string;
63
+ primary_ticket_dialog_title: string;
64
+ primary_ticket_dialog_input_label: string;
65
+ amount: string;
61
66
  };
62
67
  validation: {
63
68
  required: string;
@@ -70,6 +75,10 @@ declare const pl: {
70
75
  promo_code_cant_combine: string;
71
76
  min_purchase_not_met: string;
72
77
  count_tickets_or_products: string;
78
+ insurance_terms_and_conditions: string;
79
+ primary_ticket_required: string;
80
+ primary_ticket_numeric: string;
81
+ primary_ticket_duplicate: string;
73
82
  };
74
83
  };
75
84
  event: {
@@ -116,9 +125,9 @@ declare const pl: {
116
125
  terms_and_conditions: string;
117
126
  insurance: {
118
127
  label: string;
128
+ checkbox: string;
119
129
  per_ticket: string;
120
130
  modal: {
121
- title: string;
122
131
  description: string[];
123
132
  links: {
124
133
  insurance: string;
@@ -159,6 +168,36 @@ declare const pl: {
159
168
  button: string;
160
169
  products: string;
161
170
  };
171
+ paydroid: {
172
+ label: string;
173
+ heading: string;
174
+ heading_cta: string;
175
+ subtitle: string;
176
+ amount_label: string;
177
+ amount_placeholder: string;
178
+ promo: string;
179
+ terms_prefix: string;
180
+ terms_conditions: string;
181
+ terms_middle: string;
182
+ terms_privacy: string;
183
+ terms: string;
184
+ skip: string;
185
+ submit: string;
186
+ success_title: string;
187
+ success_subtitle: string;
188
+ topup_success_title: string;
189
+ topup_success_subtitle: string;
190
+ error_title: string;
191
+ error_subtitle: string;
192
+ error_account_title: string;
193
+ error_account_subtitle: string;
194
+ error_account_button: string;
195
+ error_ticket_title: string;
196
+ error_ticket_subtitle: string;
197
+ faq_button: string;
198
+ retry_button: string;
199
+ missing_api_key: string;
200
+ };
162
201
  unpaid: string;
163
202
  unpaid_description: string;
164
203
  };
@@ -58,6 +58,11 @@ declare const sk: {
58
58
  payment_overview_close: string;
59
59
  ticket_quantity_decrease: string;
60
60
  ticket_quantity_increase: string;
61
+ primary_ticket_number: string;
62
+ primary_ticket_number_hint: string;
63
+ primary_ticket_dialog_title: string;
64
+ primary_ticket_dialog_input_label: string;
65
+ amount: string;
61
66
  };
62
67
  validation: {
63
68
  required: string;
@@ -70,6 +75,10 @@ declare const sk: {
70
75
  promo_code_cant_combine: string;
71
76
  min_purchase_not_met: string;
72
77
  count_tickets_or_products: string;
78
+ insurance_terms_and_conditions: string;
79
+ primary_ticket_required: string;
80
+ primary_ticket_numeric: string;
81
+ primary_ticket_duplicate: string;
73
82
  };
74
83
  };
75
84
  event: {
@@ -116,9 +125,9 @@ declare const sk: {
116
125
  terms_and_conditions: string;
117
126
  insurance: {
118
127
  label: string;
128
+ checkbox: string;
119
129
  per_ticket: string;
120
130
  modal: {
121
- title: string;
122
131
  description: string[];
123
132
  links: {
124
133
  insurance: string;
@@ -159,6 +168,36 @@ declare const sk: {
159
168
  button: string;
160
169
  products: string;
161
170
  };
171
+ paydroid: {
172
+ label: string;
173
+ heading: string;
174
+ heading_cta: string;
175
+ subtitle: string;
176
+ amount_label: string;
177
+ amount_placeholder: string;
178
+ promo: string;
179
+ terms_prefix: string;
180
+ terms_conditions: string;
181
+ terms_middle: string;
182
+ terms_privacy: string;
183
+ terms: string;
184
+ skip: string;
185
+ submit: string;
186
+ success_title: string;
187
+ success_subtitle: string;
188
+ topup_success_title: string;
189
+ topup_success_subtitle: string;
190
+ error_title: string;
191
+ error_subtitle: string;
192
+ error_account_title: string;
193
+ error_account_subtitle: string;
194
+ error_account_button: string;
195
+ error_ticket_title: string;
196
+ error_ticket_subtitle: string;
197
+ faq_button: string;
198
+ retry_button: string;
199
+ missing_api_key: string;
200
+ };
162
201
  unpaid: string;
163
202
  unpaid_description: string;
164
203
  };
@@ -58,6 +58,11 @@ declare const uk: {
58
58
  payment_overview_close: string;
59
59
  ticket_quantity_decrease: string;
60
60
  ticket_quantity_increase: string;
61
+ primary_ticket_number: string;
62
+ primary_ticket_number_hint: string;
63
+ primary_ticket_dialog_title: string;
64
+ primary_ticket_dialog_input_label: string;
65
+ amount: string;
61
66
  };
62
67
  validation: {
63
68
  required: string;
@@ -70,6 +75,10 @@ declare const uk: {
70
75
  promo_code_cant_combine: string;
71
76
  min_purchase_not_met: string;
72
77
  count_tickets_or_products: string;
78
+ insurance_terms_and_conditions: string;
79
+ primary_ticket_required: string;
80
+ primary_ticket_numeric: string;
81
+ primary_ticket_duplicate: string;
73
82
  };
74
83
  };
75
84
  event: {
@@ -116,9 +125,9 @@ declare const uk: {
116
125
  terms_and_conditions: string;
117
126
  insurance: {
118
127
  label: string;
128
+ checkbox: string;
119
129
  per_ticket: string;
120
130
  modal: {
121
- title: string;
122
131
  description: string[];
123
132
  links: {
124
133
  insurance: string;
@@ -159,6 +168,36 @@ declare const uk: {
159
168
  button: string;
160
169
  products: string;
161
170
  };
171
+ paydroid: {
172
+ label: string;
173
+ heading: string;
174
+ heading_cta: string;
175
+ subtitle: string;
176
+ amount_label: string;
177
+ amount_placeholder: string;
178
+ promo: string;
179
+ terms_prefix: string;
180
+ terms_conditions: string;
181
+ terms_middle: string;
182
+ terms_privacy: string;
183
+ terms: string;
184
+ skip: string;
185
+ submit: string;
186
+ success_title: string;
187
+ success_subtitle: string;
188
+ topup_success_title: string;
189
+ topup_success_subtitle: string;
190
+ error_title: string;
191
+ error_subtitle: string;
192
+ error_account_title: string;
193
+ error_account_subtitle: string;
194
+ error_account_button: string;
195
+ error_ticket_title: string;
196
+ error_ticket_subtitle: string;
197
+ faq_button: string;
198
+ retry_button: string;
199
+ missing_api_key: string;
200
+ };
162
201
  unpaid: string;
163
202
  unpaid_description: string;
164
203
  };
@@ -0,0 +1,4 @@
1
+ import { IResponse } from '@utils/types/global.type';
2
+ import { IPaydroidCreateAccountData, IPaydroidTopupAccountData, IPaydroidTopupAccountResponse } from '@utils/types/paydroid';
3
+ export declare const postPaydroidCreateAccount: (apiKey: string, data: IPaydroidCreateAccountData) => Promise<IResponse<null>>;
4
+ export declare const postPaydroidTopupAccount: (apiKey: string, data: IPaydroidTopupAccountData) => Promise<IResponse<IPaydroidTopupAccountResponse>>;
@@ -0,0 +1 @@
1
+ export declare const validatePrimaryTicketNumber: (releaseCategoryId: number, number: string) => Promise<void>;
@@ -0,0 +1,7 @@
1
+ export declare enum Page {
2
+ PAYDROID_SUCCESS = "paydroid-success",
3
+ PAYDROID_TOPUP_SUCCESS = "paydroid-topup-success",
4
+ PAYDROID_ERROR = "paydroid-error",
5
+ PAYDROID_ERROR_ACCOUNT = "paydroid-error-account",
6
+ PAYDROID_ERROR_TICKET = "paydroid-error-ticket"
7
+ }
@@ -0,0 +1 @@
1
+ export declare const isPaydroidPage: (page: string | null) => boolean;
@@ -0,0 +1,6 @@
1
+ import { Page } from '@utils/data/page';
2
+ import { IOrderPaid } from '@utils/types/order.type';
3
+ import { IPaydroidCreateAccountData, IPaydroidTopupAccountData } from '@utils/types/paydroid';
4
+ export declare const getRedirectUrl: (page: Page) => string;
5
+ export declare const transformToCreateAccountData: (data: IOrderPaid) => IPaydroidCreateAccountData;
6
+ export declare const transformToTopupAccountData: (amount: string, data: IOrderPaid) => IPaydroidTopupAccountData;
@@ -34,6 +34,7 @@ export interface IGlobalContextOptions {
34
34
  termsAndConditionsCompanies?: string[];
35
35
  autoscrollAfterViewChange?: boolean;
36
36
  hasGopayId?: boolean;
37
+ paydroidApiKey?: string;
37
38
  }
38
39
  export interface IBase {
39
40
  id: number;
@@ -36,9 +36,11 @@ export interface IOrderPaid {
36
36
  orderNumber: number;
37
37
  tickets: IPaidTicket[];
38
38
  products: IPaidProduct[];
39
+ customer: ICustomer;
39
40
  extraFee: number;
40
41
  currency: Currencies;
41
42
  promoCodes: IPromoCode[] | null;
43
+ paydroidEventId: string | null;
42
44
  }
43
45
  export interface IAllowedPaymentMethod {
44
46
  enabledPaymentInstruments: IPaymentInstrument[];
@@ -0,0 +1,23 @@
1
+ export interface IPaydroidCreateAccountTicket {
2
+ number: string;
3
+ category?: string;
4
+ }
5
+ export interface IPaydroidCreateAccountData {
6
+ first_name: string;
7
+ last_name: string;
8
+ email: string;
9
+ phone_number: string;
10
+ event_id: string;
11
+ tickets: IPaydroidCreateAccountTicket[];
12
+ date_of_birth?: string;
13
+ }
14
+ export interface IPaydroidTopupAccountData {
15
+ email: string;
16
+ event_id: string;
17
+ amount: number;
18
+ success_url: string;
19
+ failure_url: string;
20
+ }
21
+ export interface IPaydroidTopupAccountResponse {
22
+ url: string;
23
+ }
@@ -9,6 +9,7 @@ export interface IReleaseCategory extends IBase {
9
9
  releases: IReleaseShort[];
10
10
  translation: IReleaseCategoryTranslation[];
11
11
  totalTickets: number;
12
+ requiresPrimaryTicket: boolean;
12
13
  }
13
14
  interface IReleaseCategoryTranslation extends IBaseLocale {
14
15
  name: string;
@@ -7,12 +7,14 @@ export interface IReleaseShort {
7
7
  name: string;
8
8
  price: number;
9
9
  availableTickets: number;
10
+ releaseCategoryId: number;
10
11
  releaseCategoryName: string;
11
12
  locked: boolean;
12
13
  order: number;
13
14
  description: string;
14
15
  product: IEventProduct | null;
15
16
  extraFields: IEventExtraField[] | null;
17
+ requiresPrimaryTicket: boolean;
16
18
  }
17
19
  export interface IRelease extends IBase {
18
20
  name: string;
@@ -33,6 +33,7 @@ export interface ITicketFormTicket {
33
33
  extraFields: IExtraFieldForm[][];
34
34
  eventTimeslotId?: number | null;
35
35
  location?: ITicketLocation | null;
36
+ primaryTicketNumbers?: string[];
36
37
  }
37
38
  export interface ITicketLocation {
38
39
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eventlook/sdk",
3
- "version": "1.7.0",
3
+ "version": "1.7.2-beta.0",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -31,6 +31,7 @@
31
31
  "peerDependencies": {
32
32
  "@emotion/react": "^11.14.0",
33
33
  "@emotion/styled": "^11.14.1",
34
+ "@mui/lab": "^7.0.0",
34
35
  "@mui/material": "^7.0.0",
35
36
  "@mui/x-date-pickers": "^8.0.0",
36
37
  "motion": "^12.12.1",
@@ -44,6 +45,7 @@
44
45
  "@hookform/resolvers": "^5.2.2",
45
46
  "@iconify/icons-carbon": "^1.2.20",
46
47
  "@iconify/react": "^6.0.2",
48
+ "@mui/lab": "^7.0.0",
47
49
  "@mui/material": "^7.3.8",
48
50
  "@mui/system": "^7.3.9",
49
51
  "@mui/x-date-pickers": "^8.27.2",
@@ -1,5 +1,6 @@
1
1
  import { Iconify, Image, MotionContainer, varBounce } from '@components';
2
2
  import { Box, Button, Card, Grid, LinearProgress, Link, Typography } from '@mui/material';
3
+ import PaydroidCashlessSection from '@form/paydroid/PaydroidCashlessSection';
3
4
  import React, { Dispatch, SetStateAction, useEffect, useState } from 'react';
4
5
  import { getSearchParamsInObject } from '@utils/url';
5
6
  import { postOrderPaid } from '@modules/order';
@@ -17,6 +18,7 @@ import useGlobal from '@hooks/useGlobal';
17
18
  import { Trans } from '@components/Trans';
18
19
  import { getGtmPurchasePaid, gtmPurchasePaid, mapUserToUserData } from '@utils/gtm';
19
20
  import { IPixels } from '@utils/types/gtm.type';
21
+ import { IOrderPaid } from '@utils/types/order.type';
20
22
 
21
23
  interface Props {
22
24
  setIsPaying: Dispatch<SetStateAction<boolean>>;
@@ -31,6 +33,7 @@ const PaymentSuccess: React.FC<Props> = ({ setIsPaying, isIframe, pixels }) => {
31
33
  const errorState = 'ERROR';
32
34
  const [tickets, setTickets] = useState<IPaidTicket[]>([]);
33
35
  const [products, setProducts] = useState<IPaidProduct[]>([]);
36
+ const [data, setData] = useState<IOrderPaid | null>(null);
34
37
  const [state, setState] = useState<string>(defaultState);
35
38
  const [title, setTitle] = useState<string>(t('event.tickets.payment_success.loading'));
36
39
  const [description, setDescription] = useState<string | null>(null);
@@ -50,12 +53,12 @@ const PaymentSuccess: React.FC<Props> = ({ setIsPaying, isIframe, pixels }) => {
50
53
  const { data } = await postOrderPaid({
51
54
  gopayId: Number(paymentId),
52
55
  });
53
- const { tickets } = data;
56
+ const { tickets, products } = data;
54
57
  setTickets(tickets);
55
- const { products } = data;
56
58
  setProducts(products);
57
59
  setState(data.state);
58
60
  setGwUrl(data.gwUrl);
61
+ setData(data);
59
62
 
60
63
  const items = [
61
64
  ...data.tickets.map((ticket) => ({
@@ -329,6 +332,7 @@ const PaymentSuccess: React.FC<Props> = ({ setIsPaying, isIframe, pixels }) => {
329
332
  </Grid>
330
333
  </>
331
334
  )}
335
+ {data?.paydroidEventId && <PaydroidCashlessSection data={data} />}
332
336
  {!isIframe && (
333
337
  <Box textAlign="center">
334
338
  <CustomButton