@lyxa.ai/marketing 1.0.48 → 1.0.49

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 (196) hide show
  1. package/dist/lib/event/event-initializations.js +2 -2
  2. package/dist/lib/event/event-initializations.js.map +1 -1
  3. package/dist/lib/index.d.ts +228 -493
  4. package/dist/lib/index.d.ts.map +1 -1
  5. package/dist/lib/modules/coupon/services/coupon.service.d.ts +2 -2
  6. package/dist/lib/modules/coupon/services/coupon.service.d.ts.map +1 -1
  7. package/dist/lib/modules/coupon/services/coupon.service.js.map +1 -1
  8. package/dist/lib/modules/coupon/services/global-coupon.service.d.ts.map +1 -1
  9. package/dist/lib/modules/coupon/services/global-coupon.service.js +2 -0
  10. package/dist/lib/modules/coupon/services/global-coupon.service.js.map +1 -1
  11. package/dist/lib/modules/coupon/services/helper.service.d.ts.map +1 -1
  12. package/dist/lib/modules/coupon/services/helper.service.js +2 -0
  13. package/dist/lib/modules/coupon/services/helper.service.js.map +1 -1
  14. package/dist/lib/modules/coupon/services/individual-user-coupon.service.d.ts.map +1 -1
  15. package/dist/lib/modules/coupon/services/individual-user-coupon.service.js +2 -0
  16. package/dist/lib/modules/coupon/services/individual-user-coupon.service.js.map +1 -1
  17. package/dist/lib/modules/coupon/services/referral-reward-coupon.service.d.ts.map +1 -1
  18. package/dist/lib/modules/coupon/services/referral-reward-coupon.service.js +2 -0
  19. package/dist/lib/modules/coupon/services/referral-reward-coupon.service.js.map +1 -1
  20. package/dist/lib/modules/limited-time-offer/campaign/campaign.router.d.ts +10 -21
  21. package/dist/lib/modules/limited-time-offer/campaign/campaign.router.d.ts.map +1 -1
  22. package/dist/lib/modules/limited-time-offer/campaign/campaign.router.js +5 -4
  23. package/dist/lib/modules/limited-time-offer/campaign/campaign.router.js.map +1 -1
  24. package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.d.ts +154 -0
  25. package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.d.ts.map +1 -1
  26. package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.js +13 -1
  27. package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.js.map +1 -1
  28. package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.d.ts +8 -2
  29. package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.d.ts.map +1 -1
  30. package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.js +11 -2
  31. package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.js.map +1 -1
  32. package/dist/lib/modules/limited-time-offer/limited-time-offer.router.d.ts +10 -21
  33. package/dist/lib/modules/limited-time-offer/limited-time-offer.router.d.ts.map +1 -1
  34. package/dist/lib/modules/tournament/config/config.builder.d.ts.map +1 -1
  35. package/dist/lib/modules/tournament/config/config.builder.js +4 -0
  36. package/dist/lib/modules/tournament/config/config.builder.js.map +1 -1
  37. package/dist/lib/modules/tournament/config/config.repository.d.ts +1 -0
  38. package/dist/lib/modules/tournament/config/config.repository.d.ts.map +1 -1
  39. package/dist/lib/modules/tournament/config/config.repository.js +7 -1
  40. package/dist/lib/modules/tournament/config/config.repository.js.map +1 -1
  41. package/dist/lib/modules/tournament/config/config.router.d.ts +96 -208
  42. package/dist/lib/modules/tournament/config/config.router.d.ts.map +1 -1
  43. package/dist/lib/modules/tournament/config/config.service.d.ts +2 -2
  44. package/dist/lib/modules/tournament/config/config.service.d.ts.map +1 -1
  45. package/dist/lib/modules/tournament/config/config.service.js.map +1 -1
  46. package/dist/lib/modules/tournament/config/config.validation.d.ts +412 -659
  47. package/dist/lib/modules/tournament/config/config.validation.d.ts.map +1 -1
  48. package/dist/lib/modules/tournament/config/config.validation.js +40 -25
  49. package/dist/lib/modules/tournament/config/config.validation.js.map +1 -1
  50. package/dist/lib/modules/tournament/match/events/evaluate-predictions.consumer.d.ts +2 -0
  51. package/dist/lib/modules/tournament/match/events/evaluate-predictions.consumer.d.ts.map +1 -0
  52. package/dist/lib/modules/tournament/match/events/evaluate-predictions.consumer.js +20 -0
  53. package/dist/lib/modules/tournament/match/events/evaluate-predictions.consumer.js.map +1 -0
  54. package/dist/lib/modules/tournament/match/events/evaluate-predictions.event.d.ts +15 -0
  55. package/dist/lib/modules/tournament/match/events/evaluate-predictions.event.d.ts.map +1 -0
  56. package/dist/lib/modules/tournament/match/events/evaluate-predictions.event.js +12 -0
  57. package/dist/lib/modules/tournament/match/events/evaluate-predictions.event.js.map +1 -0
  58. package/dist/lib/modules/tournament/match/match.builder.d.ts +5 -2
  59. package/dist/lib/modules/tournament/match/match.builder.d.ts.map +1 -1
  60. package/dist/lib/modules/tournament/match/match.builder.js +12 -7
  61. package/dist/lib/modules/tournament/match/match.builder.js.map +1 -1
  62. package/dist/lib/modules/tournament/match/match.router.d.ts +50 -187
  63. package/dist/lib/modules/tournament/match/match.router.d.ts.map +1 -1
  64. package/dist/lib/modules/tournament/match/match.router.js +0 -7
  65. package/dist/lib/modules/tournament/match/match.router.js.map +1 -1
  66. package/dist/lib/modules/tournament/match/match.service.d.ts +1 -11
  67. package/dist/lib/modules/tournament/match/match.service.d.ts.map +1 -1
  68. package/dist/lib/modules/tournament/match/match.service.js +17 -61
  69. package/dist/lib/modules/tournament/match/match.service.js.map +1 -1
  70. package/dist/lib/modules/tournament/match/match.validation.d.ts +46 -34
  71. package/dist/lib/modules/tournament/match/match.validation.d.ts.map +1 -1
  72. package/dist/lib/modules/tournament/match/match.validation.js +4 -2
  73. package/dist/lib/modules/tournament/match/match.validation.js.map +1 -1
  74. package/dist/lib/modules/tournament/notification/notification.service.d.ts +2 -1
  75. package/dist/lib/modules/tournament/notification/notification.service.d.ts.map +1 -1
  76. package/dist/lib/modules/tournament/notification/notification.service.js +16 -11
  77. package/dist/lib/modules/tournament/notification/notification.service.js.map +1 -1
  78. package/dist/lib/modules/tournament/participant/participant.router.d.ts +9 -9
  79. package/dist/lib/modules/tournament/participant/participant.validation.d.ts +84 -84
  80. package/dist/lib/modules/tournament/prediction/prediction.repository.d.ts +4 -1
  81. package/dist/lib/modules/tournament/prediction/prediction.repository.d.ts.map +1 -1
  82. package/dist/lib/modules/tournament/prediction/prediction.repository.js +20 -2
  83. package/dist/lib/modules/tournament/prediction/prediction.repository.js.map +1 -1
  84. package/dist/lib/modules/tournament/prediction/prediction.router.d.ts +12 -12
  85. package/dist/lib/modules/tournament/prediction/prediction.service.d.ts +8 -0
  86. package/dist/lib/modules/tournament/prediction/prediction.service.d.ts.map +1 -1
  87. package/dist/lib/modules/tournament/prediction/prediction.service.js +20 -3
  88. package/dist/lib/modules/tournament/prediction/prediction.service.js.map +1 -1
  89. package/dist/lib/modules/tournament/prediction/prediction.validation.d.ts +64 -64
  90. package/dist/lib/modules/tournament/reward/handlers/coupon-reward.handler.d.ts +3 -0
  91. package/dist/lib/modules/tournament/reward/handlers/coupon-reward.handler.d.ts.map +1 -1
  92. package/dist/lib/modules/tournament/reward/handlers/coupon-reward.handler.js +21 -5
  93. package/dist/lib/modules/tournament/reward/handlers/coupon-reward.handler.js.map +1 -1
  94. package/dist/lib/modules/tournament/reward/reward.builder.d.ts +6 -0
  95. package/dist/lib/modules/tournament/reward/reward.builder.d.ts.map +1 -0
  96. package/dist/lib/modules/tournament/reward/reward.builder.js +43 -0
  97. package/dist/lib/modules/tournament/reward/reward.builder.js.map +1 -0
  98. package/dist/lib/modules/tournament/reward/reward.interface.d.ts.map +1 -1
  99. package/dist/lib/modules/tournament/reward/reward.interface.js.map +1 -1
  100. package/dist/lib/modules/tournament/reward/reward.service.d.ts.map +1 -1
  101. package/dist/lib/modules/tournament/reward/reward.service.js.map +1 -1
  102. package/dist/lib/modules/tournament/reward/reward.types.d.ts +1 -1
  103. package/dist/lib/modules/tournament/reward/reward.types.d.ts.map +1 -1
  104. package/dist/lib/modules/tournament/reward/reward.types.js.map +1 -1
  105. package/dist/lib/modules/tournament/score/score.repository.d.ts +6 -0
  106. package/dist/lib/modules/tournament/score/score.repository.d.ts.map +1 -0
  107. package/dist/lib/modules/tournament/score/score.repository.js +60 -0
  108. package/dist/lib/modules/tournament/score/score.repository.js.map +1 -0
  109. package/dist/lib/modules/tournament/score/score.service.d.ts +6 -0
  110. package/dist/lib/modules/tournament/score/score.service.d.ts.map +1 -0
  111. package/dist/lib/modules/tournament/score/score.service.js +60 -0
  112. package/dist/lib/modules/tournament/score/score.service.js.map +1 -0
  113. package/dist/lib/modules/tournament/team/team.router.d.ts +22 -54
  114. package/dist/lib/modules/tournament/team/team.router.d.ts.map +1 -1
  115. package/dist/lib/modules/tournament/team/team.validation.d.ts +14 -14
  116. package/dist/lib/modules/tournament/tournament.router.d.ts +216 -470
  117. package/dist/lib/modules/tournament/tournament.router.d.ts.map +1 -1
  118. package/dist/lib/modules/tournament/tournament.router.js +8 -0
  119. package/dist/lib/modules/tournament/tournament.router.js.map +1 -1
  120. package/dist/lib/modules/tournament/tournament.service.d.ts +8 -0
  121. package/dist/lib/modules/tournament/tournament.service.d.ts.map +1 -0
  122. package/dist/lib/modules/tournament/tournament.service.js +63 -0
  123. package/dist/lib/modules/tournament/tournament.service.js.map +1 -0
  124. package/dist/lib/modules/tournament/tournament.validation.d.ts +133 -0
  125. package/dist/lib/modules/tournament/tournament.validation.d.ts.map +1 -0
  126. package/dist/lib/modules/tournament/tournament.validation.js +14 -0
  127. package/dist/lib/modules/tournament/tournament.validation.js.map +1 -0
  128. package/dist/types/index.d.ts +228 -493
  129. package/dist/types/index.d.ts.map +1 -1
  130. package/dist/types/modules/coupon/services/coupon.service.d.ts +2 -2
  131. package/dist/types/modules/coupon/services/coupon.service.d.ts.map +1 -1
  132. package/dist/types/modules/coupon/services/global-coupon.service.d.ts.map +1 -1
  133. package/dist/types/modules/coupon/services/helper.service.d.ts.map +1 -1
  134. package/dist/types/modules/coupon/services/individual-user-coupon.service.d.ts.map +1 -1
  135. package/dist/types/modules/coupon/services/referral-reward-coupon.service.d.ts.map +1 -1
  136. package/dist/types/modules/limited-time-offer/campaign/campaign.router.d.ts +10 -21
  137. package/dist/types/modules/limited-time-offer/campaign/campaign.router.d.ts.map +1 -1
  138. package/dist/types/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.d.ts +154 -0
  139. package/dist/types/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.d.ts.map +1 -1
  140. package/dist/types/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.d.ts +8 -2
  141. package/dist/types/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.d.ts.map +1 -1
  142. package/dist/types/modules/limited-time-offer/limited-time-offer.router.d.ts +10 -21
  143. package/dist/types/modules/limited-time-offer/limited-time-offer.router.d.ts.map +1 -1
  144. package/dist/types/modules/tournament/config/config.builder.d.ts.map +1 -1
  145. package/dist/types/modules/tournament/config/config.repository.d.ts +1 -0
  146. package/dist/types/modules/tournament/config/config.repository.d.ts.map +1 -1
  147. package/dist/types/modules/tournament/config/config.router.d.ts +96 -208
  148. package/dist/types/modules/tournament/config/config.router.d.ts.map +1 -1
  149. package/dist/types/modules/tournament/config/config.service.d.ts +2 -2
  150. package/dist/types/modules/tournament/config/config.service.d.ts.map +1 -1
  151. package/dist/types/modules/tournament/config/config.validation.d.ts +412 -659
  152. package/dist/types/modules/tournament/config/config.validation.d.ts.map +1 -1
  153. package/dist/types/modules/tournament/match/events/evaluate-predictions.consumer.d.ts +2 -0
  154. package/dist/types/modules/tournament/match/events/evaluate-predictions.consumer.d.ts.map +1 -0
  155. package/dist/types/modules/tournament/match/events/evaluate-predictions.event.d.ts +15 -0
  156. package/dist/types/modules/tournament/match/events/evaluate-predictions.event.d.ts.map +1 -0
  157. package/dist/types/modules/tournament/match/match.builder.d.ts +5 -2
  158. package/dist/types/modules/tournament/match/match.builder.d.ts.map +1 -1
  159. package/dist/types/modules/tournament/match/match.router.d.ts +50 -187
  160. package/dist/types/modules/tournament/match/match.router.d.ts.map +1 -1
  161. package/dist/types/modules/tournament/match/match.service.d.ts +1 -11
  162. package/dist/types/modules/tournament/match/match.service.d.ts.map +1 -1
  163. package/dist/types/modules/tournament/match/match.validation.d.ts +46 -34
  164. package/dist/types/modules/tournament/match/match.validation.d.ts.map +1 -1
  165. package/dist/types/modules/tournament/notification/notification.service.d.ts +2 -1
  166. package/dist/types/modules/tournament/notification/notification.service.d.ts.map +1 -1
  167. package/dist/types/modules/tournament/participant/participant.router.d.ts +9 -9
  168. package/dist/types/modules/tournament/participant/participant.validation.d.ts +84 -84
  169. package/dist/types/modules/tournament/prediction/prediction.repository.d.ts +4 -1
  170. package/dist/types/modules/tournament/prediction/prediction.repository.d.ts.map +1 -1
  171. package/dist/types/modules/tournament/prediction/prediction.router.d.ts +12 -12
  172. package/dist/types/modules/tournament/prediction/prediction.service.d.ts +8 -0
  173. package/dist/types/modules/tournament/prediction/prediction.service.d.ts.map +1 -1
  174. package/dist/types/modules/tournament/prediction/prediction.validation.d.ts +64 -64
  175. package/dist/types/modules/tournament/reward/handlers/coupon-reward.handler.d.ts +3 -0
  176. package/dist/types/modules/tournament/reward/handlers/coupon-reward.handler.d.ts.map +1 -1
  177. package/dist/types/modules/tournament/reward/reward.builder.d.ts +6 -0
  178. package/dist/types/modules/tournament/reward/reward.builder.d.ts.map +1 -0
  179. package/dist/types/modules/tournament/reward/reward.interface.d.ts.map +1 -1
  180. package/dist/types/modules/tournament/reward/reward.service.d.ts.map +1 -1
  181. package/dist/types/modules/tournament/reward/reward.types.d.ts +1 -1
  182. package/dist/types/modules/tournament/reward/reward.types.d.ts.map +1 -1
  183. package/dist/types/modules/tournament/score/score.repository.d.ts +6 -0
  184. package/dist/types/modules/tournament/score/score.repository.d.ts.map +1 -0
  185. package/dist/types/modules/tournament/score/score.service.d.ts +6 -0
  186. package/dist/types/modules/tournament/score/score.service.d.ts.map +1 -0
  187. package/dist/types/modules/tournament/team/team.router.d.ts +22 -54
  188. package/dist/types/modules/tournament/team/team.router.d.ts.map +1 -1
  189. package/dist/types/modules/tournament/team/team.validation.d.ts +14 -14
  190. package/dist/types/modules/tournament/tournament.router.d.ts +216 -470
  191. package/dist/types/modules/tournament/tournament.router.d.ts.map +1 -1
  192. package/dist/types/modules/tournament/tournament.service.d.ts +8 -0
  193. package/dist/types/modules/tournament/tournament.service.d.ts.map +1 -0
  194. package/dist/types/modules/tournament/tournament.validation.d.ts +133 -0
  195. package/dist/types/modules/tournament/tournament.validation.d.ts.map +1 -0
  196. package/package.json +2 -2
@@ -32,81 +32,58 @@ export declare const tournamentRouter: import("@trpc/server").TRPCBuiltRouter<{
32
32
  }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
33
33
  create: import("@trpc/server").TRPCMutationProcedure<{
34
34
  input: {
35
+ name: string;
35
36
  startDate: string | Date;
36
37
  endDate: string | Date;
37
38
  tag: string;
38
39
  status?: import("@lyxa.ai/core/dist/utilities/enum").Status | undefined;
40
+ reward?: {
41
+ type: import("@lyxa.ai/core/dist/utilities/enum").TournamentRewardType.FREE_DELIVERY;
42
+ } | {
43
+ type: import("@lyxa.ai/core/dist/utilities/enum").TournamentRewardType.COUPON;
44
+ couponNamePrefix: string;
45
+ percentage: number;
46
+ maxDiscountPerOrder?: number | null | undefined;
47
+ } | undefined;
39
48
  };
40
49
  output: {
41
50
  message: string;
42
51
  success: boolean;
43
52
  data?: {
44
53
  status: import("@lyxa.ai/core/dist/utilities/enum").Status;
45
- _id: string | import("mongoose").Types.ObjectId;
54
+ name: string;
46
55
  tag: string;
56
+ _id?: string | import("mongoose").Types.ObjectId | undefined;
47
57
  createdAt?: Date | null | undefined;
48
58
  startDate?: Date | null | undefined;
49
59
  endDate?: Date | null | undefined;
50
60
  updatedAt?: Date | null | undefined;
51
- matches?: {
52
- _id: string | import("mongoose").Types.ObjectId;
53
- team1: {
54
- name: string;
55
- teamId: string | import("mongoose").Types.ObjectId;
56
- };
57
- team2: {
58
- name: string;
59
- teamId: string | import("mongoose").Types.ObjectId;
60
- };
61
- score: {
62
- team1: number | null;
63
- team2: number | null;
64
- };
65
- stage: string;
66
- endDate?: Date | null | undefined;
67
- startingDate?: Date | null | undefined;
68
- additionalTag?: string | undefined;
69
- winnerId?: string | import("mongoose").Types.ObjectId | null | undefined;
70
- }[] | undefined;
71
- teams?: {
72
- name: string;
73
- _id: string | import("mongoose").Types.ObjectId;
74
- picture?: string | null | undefined;
75
- }[] | undefined;
61
+ reward?: {
62
+ type: import("@lyxa.ai/core/dist/utilities/enum").TournamentRewardType.FREE_DELIVERY;
63
+ } | {
64
+ type: import("@lyxa.ai/core/dist/utilities/enum").TournamentRewardType.COUPON;
65
+ maxDiscountPerOrder?: number | null | undefined;
66
+ couponNamePrefix?: string | undefined;
67
+ percentage?: number | undefined;
68
+ } | undefined;
76
69
  } | {
77
70
  documents: {
78
71
  status: import("@lyxa.ai/core/dist/utilities/enum").Status;
79
- _id: string | import("mongoose").Types.ObjectId;
72
+ name: string;
80
73
  tag: string;
74
+ _id?: string | import("mongoose").Types.ObjectId | undefined;
81
75
  createdAt?: Date | null | undefined;
82
76
  startDate?: Date | null | undefined;
83
77
  endDate?: Date | null | undefined;
84
78
  updatedAt?: Date | null | undefined;
85
- matches?: {
86
- _id: string | import("mongoose").Types.ObjectId;
87
- team1: {
88
- name: string;
89
- teamId: string | import("mongoose").Types.ObjectId;
90
- };
91
- team2: {
92
- name: string;
93
- teamId: string | import("mongoose").Types.ObjectId;
94
- };
95
- score: {
96
- team1: number | null;
97
- team2: number | null;
98
- };
99
- stage: string;
100
- endDate?: Date | null | undefined;
101
- startingDate?: Date | null | undefined;
102
- additionalTag?: string | undefined;
103
- winnerId?: string | import("mongoose").Types.ObjectId | null | undefined;
104
- }[] | undefined;
105
- teams?: {
106
- name: string;
107
- _id: string | import("mongoose").Types.ObjectId;
108
- picture?: string | null | undefined;
109
- }[] | undefined;
79
+ reward?: {
80
+ type: import("@lyxa.ai/core/dist/utilities/enum").TournamentRewardType.FREE_DELIVERY;
81
+ } | {
82
+ type: import("@lyxa.ai/core/dist/utilities/enum").TournamentRewardType.COUPON;
83
+ maxDiscountPerOrder?: number | null | undefined;
84
+ couponNamePrefix?: string | undefined;
85
+ percentage?: number | undefined;
86
+ } | undefined;
110
87
  }[];
111
88
  metadata?: {
112
89
  page: number;
@@ -125,71 +102,37 @@ export declare const tournamentRouter: import("@trpc/server").TRPCBuiltRouter<{
125
102
  success: boolean;
126
103
  data?: {
127
104
  status: import("@lyxa.ai/core/dist/utilities/enum").Status;
128
- _id: string | import("mongoose").Types.ObjectId;
105
+ name: string;
129
106
  tag: string;
107
+ _id?: string | import("mongoose").Types.ObjectId | undefined;
130
108
  createdAt?: Date | null | undefined;
131
109
  startDate?: Date | null | undefined;
132
110
  endDate?: Date | null | undefined;
133
111
  updatedAt?: Date | null | undefined;
134
- matches?: {
135
- _id: string | import("mongoose").Types.ObjectId;
136
- team1: {
137
- name: string;
138
- teamId: string | import("mongoose").Types.ObjectId;
139
- };
140
- team2: {
141
- name: string;
142
- teamId: string | import("mongoose").Types.ObjectId;
143
- };
144
- score: {
145
- team1: number | null;
146
- team2: number | null;
147
- };
148
- stage: string;
149
- endDate?: Date | null | undefined;
150
- startingDate?: Date | null | undefined;
151
- additionalTag?: string | undefined;
152
- winnerId?: string | import("mongoose").Types.ObjectId | null | undefined;
153
- }[] | undefined;
154
- teams?: {
155
- name: string;
156
- _id: string | import("mongoose").Types.ObjectId;
157
- picture?: string | null | undefined;
158
- }[] | undefined;
112
+ reward?: {
113
+ type: import("@lyxa.ai/core/dist/utilities/enum").TournamentRewardType.FREE_DELIVERY;
114
+ } | {
115
+ type: import("@lyxa.ai/core/dist/utilities/enum").TournamentRewardType.COUPON;
116
+ maxDiscountPerOrder?: number | null | undefined;
117
+ percentage?: number | undefined;
118
+ } | undefined;
159
119
  }[] | {
160
120
  documents: {
161
121
  status: import("@lyxa.ai/core/dist/utilities/enum").Status;
162
- _id: string | import("mongoose").Types.ObjectId;
122
+ name: string;
163
123
  tag: string;
124
+ _id?: string | import("mongoose").Types.ObjectId | undefined;
164
125
  createdAt?: Date | null | undefined;
165
126
  startDate?: Date | null | undefined;
166
127
  endDate?: Date | null | undefined;
167
128
  updatedAt?: Date | null | undefined;
168
- matches?: {
169
- _id: string | import("mongoose").Types.ObjectId;
170
- team1: {
171
- name: string;
172
- teamId: string | import("mongoose").Types.ObjectId;
173
- };
174
- team2: {
175
- name: string;
176
- teamId: string | import("mongoose").Types.ObjectId;
177
- };
178
- score: {
179
- team1: number | null;
180
- team2: number | null;
181
- };
182
- stage: string;
183
- endDate?: Date | null | undefined;
184
- startingDate?: Date | null | undefined;
185
- additionalTag?: string | undefined;
186
- winnerId?: string | import("mongoose").Types.ObjectId | null | undefined;
187
- }[] | undefined;
188
- teams?: {
189
- name: string;
190
- _id: string | import("mongoose").Types.ObjectId;
191
- picture?: string | null | undefined;
192
- }[] | undefined;
129
+ reward?: {
130
+ type: import("@lyxa.ai/core/dist/utilities/enum").TournamentRewardType.FREE_DELIVERY;
131
+ } | {
132
+ type: import("@lyxa.ai/core/dist/utilities/enum").TournamentRewardType.COUPON;
133
+ maxDiscountPerOrder?: number | null | undefined;
134
+ percentage?: number | undefined;
135
+ } | undefined;
193
136
  }[][];
194
137
  metadata?: {
195
138
  page: number;
@@ -210,71 +153,39 @@ export declare const tournamentRouter: import("@trpc/server").TRPCBuiltRouter<{
210
153
  success: boolean;
211
154
  data?: {
212
155
  status: import("@lyxa.ai/core/dist/utilities/enum").Status;
213
- _id: string | import("mongoose").Types.ObjectId;
156
+ name: string;
214
157
  tag: string;
158
+ _id?: string | import("mongoose").Types.ObjectId | undefined;
215
159
  createdAt?: Date | null | undefined;
216
160
  startDate?: Date | null | undefined;
217
161
  endDate?: Date | null | undefined;
218
162
  updatedAt?: Date | null | undefined;
219
- matches?: {
220
- _id: string | import("mongoose").Types.ObjectId;
221
- team1: {
222
- name: string;
223
- teamId: string | import("mongoose").Types.ObjectId;
224
- };
225
- team2: {
226
- name: string;
227
- teamId: string | import("mongoose").Types.ObjectId;
228
- };
229
- score: {
230
- team1: number | null;
231
- team2: number | null;
232
- };
233
- stage: string;
234
- endDate?: Date | null | undefined;
235
- startingDate?: Date | null | undefined;
236
- additionalTag?: string | undefined;
237
- winnerId?: string | import("mongoose").Types.ObjectId | null | undefined;
238
- }[] | undefined;
239
- teams?: {
240
- name: string;
241
- _id: string | import("mongoose").Types.ObjectId;
242
- picture?: string | null | undefined;
243
- }[] | undefined;
163
+ reward?: {
164
+ type: import("@lyxa.ai/core/dist/utilities/enum").TournamentRewardType.FREE_DELIVERY;
165
+ } | {
166
+ type: import("@lyxa.ai/core/dist/utilities/enum").TournamentRewardType.COUPON;
167
+ maxDiscountPerOrder?: number | null | undefined;
168
+ couponNamePrefix?: string | undefined;
169
+ percentage?: number | undefined;
170
+ } | undefined;
244
171
  } | {
245
172
  documents: {
246
173
  status: import("@lyxa.ai/core/dist/utilities/enum").Status;
247
- _id: string | import("mongoose").Types.ObjectId;
174
+ name: string;
248
175
  tag: string;
176
+ _id?: string | import("mongoose").Types.ObjectId | undefined;
249
177
  createdAt?: Date | null | undefined;
250
178
  startDate?: Date | null | undefined;
251
179
  endDate?: Date | null | undefined;
252
180
  updatedAt?: Date | null | undefined;
253
- matches?: {
254
- _id: string | import("mongoose").Types.ObjectId;
255
- team1: {
256
- name: string;
257
- teamId: string | import("mongoose").Types.ObjectId;
258
- };
259
- team2: {
260
- name: string;
261
- teamId: string | import("mongoose").Types.ObjectId;
262
- };
263
- score: {
264
- team1: number | null;
265
- team2: number | null;
266
- };
267
- stage: string;
268
- endDate?: Date | null | undefined;
269
- startingDate?: Date | null | undefined;
270
- additionalTag?: string | undefined;
271
- winnerId?: string | import("mongoose").Types.ObjectId | null | undefined;
272
- }[] | undefined;
273
- teams?: {
274
- name: string;
275
- _id: string | import("mongoose").Types.ObjectId;
276
- picture?: string | null | undefined;
277
- }[] | undefined;
181
+ reward?: {
182
+ type: import("@lyxa.ai/core/dist/utilities/enum").TournamentRewardType.FREE_DELIVERY;
183
+ } | {
184
+ type: import("@lyxa.ai/core/dist/utilities/enum").TournamentRewardType.COUPON;
185
+ maxDiscountPerOrder?: number | null | undefined;
186
+ couponNamePrefix?: string | undefined;
187
+ percentage?: number | undefined;
188
+ } | undefined;
278
189
  }[];
279
190
  metadata?: {
280
191
  page: number;
@@ -290,80 +201,57 @@ export declare const tournamentRouter: import("@trpc/server").TRPCBuiltRouter<{
290
201
  input: {
291
202
  _id: string | import("mongoose").Types.ObjectId;
292
203
  status?: import("@lyxa.ai/core/dist/utilities/enum").Status | undefined;
204
+ name?: string | undefined;
293
205
  startDate?: string | Date | undefined;
294
206
  endDate?: string | Date | undefined;
295
207
  tag?: string | undefined;
208
+ reward?: {
209
+ type: import("@lyxa.ai/core/dist/utilities/enum").TournamentRewardType.FREE_DELIVERY;
210
+ } | {
211
+ type: import("@lyxa.ai/core/dist/utilities/enum").TournamentRewardType.COUPON;
212
+ couponNamePrefix: string;
213
+ percentage: number;
214
+ maxDiscountPerOrder?: number | null | undefined;
215
+ } | undefined;
296
216
  };
297
217
  output: {
298
218
  message: string;
299
219
  success: boolean;
300
220
  data?: {
301
221
  status: import("@lyxa.ai/core/dist/utilities/enum").Status;
302
- _id: string | import("mongoose").Types.ObjectId;
222
+ name: string;
303
223
  tag: string;
224
+ _id?: string | import("mongoose").Types.ObjectId | undefined;
304
225
  createdAt?: Date | null | undefined;
305
226
  startDate?: Date | null | undefined;
306
227
  endDate?: Date | null | undefined;
307
228
  updatedAt?: Date | null | undefined;
308
- matches?: {
309
- _id: string | import("mongoose").Types.ObjectId;
310
- team1: {
311
- name: string;
312
- teamId: string | import("mongoose").Types.ObjectId;
313
- };
314
- team2: {
315
- name: string;
316
- teamId: string | import("mongoose").Types.ObjectId;
317
- };
318
- score: {
319
- team1: number | null;
320
- team2: number | null;
321
- };
322
- stage: string;
323
- endDate?: Date | null | undefined;
324
- startingDate?: Date | null | undefined;
325
- additionalTag?: string | undefined;
326
- winnerId?: string | import("mongoose").Types.ObjectId | null | undefined;
327
- }[] | undefined;
328
- teams?: {
329
- name: string;
330
- _id: string | import("mongoose").Types.ObjectId;
331
- picture?: string | null | undefined;
332
- }[] | undefined;
229
+ reward?: {
230
+ type: import("@lyxa.ai/core/dist/utilities/enum").TournamentRewardType.FREE_DELIVERY;
231
+ } | {
232
+ type: import("@lyxa.ai/core/dist/utilities/enum").TournamentRewardType.COUPON;
233
+ maxDiscountPerOrder?: number | null | undefined;
234
+ couponNamePrefix?: string | undefined;
235
+ percentage?: number | undefined;
236
+ } | undefined;
333
237
  } | {
334
238
  documents: {
335
239
  status: import("@lyxa.ai/core/dist/utilities/enum").Status;
336
- _id: string | import("mongoose").Types.ObjectId;
240
+ name: string;
337
241
  tag: string;
242
+ _id?: string | import("mongoose").Types.ObjectId | undefined;
338
243
  createdAt?: Date | null | undefined;
339
244
  startDate?: Date | null | undefined;
340
245
  endDate?: Date | null | undefined;
341
246
  updatedAt?: Date | null | undefined;
342
- matches?: {
343
- _id: string | import("mongoose").Types.ObjectId;
344
- team1: {
345
- name: string;
346
- teamId: string | import("mongoose").Types.ObjectId;
347
- };
348
- team2: {
349
- name: string;
350
- teamId: string | import("mongoose").Types.ObjectId;
351
- };
352
- score: {
353
- team1: number | null;
354
- team2: number | null;
355
- };
356
- stage: string;
357
- endDate?: Date | null | undefined;
358
- startingDate?: Date | null | undefined;
359
- additionalTag?: string | undefined;
360
- winnerId?: string | import("mongoose").Types.ObjectId | null | undefined;
361
- }[] | undefined;
362
- teams?: {
363
- name: string;
364
- _id: string | import("mongoose").Types.ObjectId;
365
- picture?: string | null | undefined;
366
- }[] | undefined;
247
+ reward?: {
248
+ type: import("@lyxa.ai/core/dist/utilities/enum").TournamentRewardType.FREE_DELIVERY;
249
+ } | {
250
+ type: import("@lyxa.ai/core/dist/utilities/enum").TournamentRewardType.COUPON;
251
+ maxDiscountPerOrder?: number | null | undefined;
252
+ couponNamePrefix?: string | undefined;
253
+ percentage?: number | undefined;
254
+ } | undefined;
367
255
  }[];
368
256
  metadata?: {
369
257
  page: number;
@@ -405,71 +293,39 @@ export declare const tournamentRouter: import("@trpc/server").TRPCBuiltRouter<{
405
293
  success: boolean;
406
294
  data?: {
407
295
  status: import("@lyxa.ai/core/dist/utilities/enum").Status;
408
- _id: string | import("mongoose").Types.ObjectId;
296
+ name: string;
409
297
  tag: string;
298
+ _id?: string | import("mongoose").Types.ObjectId | undefined;
410
299
  createdAt?: Date | null | undefined;
411
300
  startDate?: Date | null | undefined;
412
301
  endDate?: Date | null | undefined;
413
302
  updatedAt?: Date | null | undefined;
414
- matches?: {
415
- _id: string | import("mongoose").Types.ObjectId;
416
- team1: {
417
- name: string;
418
- teamId: string | import("mongoose").Types.ObjectId;
419
- };
420
- team2: {
421
- name: string;
422
- teamId: string | import("mongoose").Types.ObjectId;
423
- };
424
- score: {
425
- team1: number | null;
426
- team2: number | null;
427
- };
428
- stage: string;
429
- endDate?: Date | null | undefined;
430
- startingDate?: Date | null | undefined;
431
- additionalTag?: string | undefined;
432
- winnerId?: string | import("mongoose").Types.ObjectId | null | undefined;
433
- }[] | undefined;
434
- teams?: {
435
- name: string;
436
- _id: string | import("mongoose").Types.ObjectId;
437
- picture?: string | null | undefined;
438
- }[] | undefined;
303
+ reward?: {
304
+ type: import("@lyxa.ai/core/dist/utilities/enum").TournamentRewardType.FREE_DELIVERY;
305
+ } | {
306
+ type: import("@lyxa.ai/core/dist/utilities/enum").TournamentRewardType.COUPON;
307
+ maxDiscountPerOrder?: number | null | undefined;
308
+ couponNamePrefix?: string | undefined;
309
+ percentage?: number | undefined;
310
+ } | undefined;
439
311
  } | {
440
312
  documents: {
441
313
  status: import("@lyxa.ai/core/dist/utilities/enum").Status;
442
- _id: string | import("mongoose").Types.ObjectId;
314
+ name: string;
443
315
  tag: string;
316
+ _id?: string | import("mongoose").Types.ObjectId | undefined;
444
317
  createdAt?: Date | null | undefined;
445
318
  startDate?: Date | null | undefined;
446
319
  endDate?: Date | null | undefined;
447
320
  updatedAt?: Date | null | undefined;
448
- matches?: {
449
- _id: string | import("mongoose").Types.ObjectId;
450
- team1: {
451
- name: string;
452
- teamId: string | import("mongoose").Types.ObjectId;
453
- };
454
- team2: {
455
- name: string;
456
- teamId: string | import("mongoose").Types.ObjectId;
457
- };
458
- score: {
459
- team1: number | null;
460
- team2: number | null;
461
- };
462
- stage: string;
463
- endDate?: Date | null | undefined;
464
- startingDate?: Date | null | undefined;
465
- additionalTag?: string | undefined;
466
- winnerId?: string | import("mongoose").Types.ObjectId | null | undefined;
467
- }[] | undefined;
468
- teams?: {
469
- name: string;
470
- _id: string | import("mongoose").Types.ObjectId;
471
- picture?: string | null | undefined;
472
- }[] | undefined;
321
+ reward?: {
322
+ type: import("@lyxa.ai/core/dist/utilities/enum").TournamentRewardType.FREE_DELIVERY;
323
+ } | {
324
+ type: import("@lyxa.ai/core/dist/utilities/enum").TournamentRewardType.COUPON;
325
+ maxDiscountPerOrder?: number | null | undefined;
326
+ couponNamePrefix?: string | undefined;
327
+ percentage?: number | undefined;
328
+ } | undefined;
473
329
  }[];
474
330
  metadata?: {
475
331
  page: number;
@@ -558,9 +414,9 @@ export declare const tournamentRouter: import("@trpc/server").TRPCBuiltRouter<{
558
414
  } | null;
559
415
  canPredict: boolean;
560
416
  endDate?: Date | null | undefined;
561
- startingDate?: Date | null | undefined;
562
417
  additionalTag?: string | undefined;
563
418
  winnerId?: string | import("mongoose").Types.ObjectId | null | undefined;
419
+ startingDate?: Date | null | undefined;
564
420
  }[];
565
421
  startDate?: Date | null | undefined;
566
422
  endDate?: Date | null | undefined;
@@ -593,9 +449,9 @@ export declare const tournamentRouter: import("@trpc/server").TRPCBuiltRouter<{
593
449
  } | null;
594
450
  canPredict: boolean;
595
451
  endDate?: Date | null | undefined;
596
- startingDate?: Date | null | undefined;
597
452
  additionalTag?: string | undefined;
598
453
  winnerId?: string | import("mongoose").Types.ObjectId | null | undefined;
454
+ startingDate?: Date | null | undefined;
599
455
  }[];
600
456
  startDate?: Date | null | undefined;
601
457
  endDate?: Date | null | undefined;
@@ -632,9 +488,9 @@ export declare const tournamentRouter: import("@trpc/server").TRPCBuiltRouter<{
632
488
  tournamentId: string | import("mongoose").Types.ObjectId;
633
489
  matches: {
634
490
  stage: string;
491
+ startingDate: string | Date;
635
492
  team1Id: string | import("mongoose").Types.ObjectId;
636
493
  team2Id: string | import("mongoose").Types.ObjectId;
637
- startingDate: string | Date;
638
494
  endDate?: string | Date | undefined;
639
495
  additionalTag?: string | undefined;
640
496
  }[];
@@ -644,71 +500,39 @@ export declare const tournamentRouter: import("@trpc/server").TRPCBuiltRouter<{
644
500
  success: boolean;
645
501
  data?: {
646
502
  status: import("@lyxa.ai/core/dist/utilities/enum").Status;
647
- _id: string | import("mongoose").Types.ObjectId;
503
+ name: string;
648
504
  tag: string;
505
+ _id?: string | import("mongoose").Types.ObjectId | undefined;
649
506
  createdAt?: Date | null | undefined;
650
507
  startDate?: Date | null | undefined;
651
508
  endDate?: Date | null | undefined;
652
509
  updatedAt?: Date | null | undefined;
653
- matches?: {
654
- _id: string | import("mongoose").Types.ObjectId;
655
- team1: {
656
- name: string;
657
- teamId: string | import("mongoose").Types.ObjectId;
658
- };
659
- team2: {
660
- name: string;
661
- teamId: string | import("mongoose").Types.ObjectId;
662
- };
663
- score: {
664
- team1: number | null;
665
- team2: number | null;
666
- };
667
- stage: string;
668
- endDate?: Date | null | undefined;
669
- startingDate?: Date | null | undefined;
670
- additionalTag?: string | undefined;
671
- winnerId?: string | import("mongoose").Types.ObjectId | null | undefined;
672
- }[] | undefined;
673
- teams?: {
674
- name: string;
675
- _id: string | import("mongoose").Types.ObjectId;
676
- picture?: string | null | undefined;
677
- }[] | undefined;
510
+ reward?: {
511
+ type: import("@lyxa.ai/core/dist/utilities/enum").TournamentRewardType.FREE_DELIVERY;
512
+ } | {
513
+ type: import("@lyxa.ai/core/dist/utilities/enum").TournamentRewardType.COUPON;
514
+ maxDiscountPerOrder?: number | null | undefined;
515
+ couponNamePrefix?: string | undefined;
516
+ percentage?: number | undefined;
517
+ } | undefined;
678
518
  } | {
679
519
  documents: {
680
520
  status: import("@lyxa.ai/core/dist/utilities/enum").Status;
681
- _id: string | import("mongoose").Types.ObjectId;
521
+ name: string;
682
522
  tag: string;
523
+ _id?: string | import("mongoose").Types.ObjectId | undefined;
683
524
  createdAt?: Date | null | undefined;
684
525
  startDate?: Date | null | undefined;
685
526
  endDate?: Date | null | undefined;
686
527
  updatedAt?: Date | null | undefined;
687
- matches?: {
688
- _id: string | import("mongoose").Types.ObjectId;
689
- team1: {
690
- name: string;
691
- teamId: string | import("mongoose").Types.ObjectId;
692
- };
693
- team2: {
694
- name: string;
695
- teamId: string | import("mongoose").Types.ObjectId;
696
- };
697
- score: {
698
- team1: number | null;
699
- team2: number | null;
700
- };
701
- stage: string;
702
- endDate?: Date | null | undefined;
703
- startingDate?: Date | null | undefined;
704
- additionalTag?: string | undefined;
705
- winnerId?: string | import("mongoose").Types.ObjectId | null | undefined;
706
- }[] | undefined;
707
- teams?: {
708
- name: string;
709
- _id: string | import("mongoose").Types.ObjectId;
710
- picture?: string | null | undefined;
711
- }[] | undefined;
528
+ reward?: {
529
+ type: import("@lyxa.ai/core/dist/utilities/enum").TournamentRewardType.FREE_DELIVERY;
530
+ } | {
531
+ type: import("@lyxa.ai/core/dist/utilities/enum").TournamentRewardType.COUPON;
532
+ maxDiscountPerOrder?: number | null | undefined;
533
+ couponNamePrefix?: string | undefined;
534
+ percentage?: number | undefined;
535
+ } | undefined;
712
536
  }[];
713
537
  metadata?: {
714
538
  page: number;
@@ -743,9 +567,9 @@ export declare const tournamentRouter: import("@trpc/server").TRPCBuiltRouter<{
743
567
  };
744
568
  stage: string;
745
569
  endDate?: Date | null | undefined;
746
- startingDate?: Date | null | undefined;
747
570
  additionalTag?: string | undefined;
748
571
  winnerId?: string | import("mongoose").Types.ObjectId | null | undefined;
572
+ startingDate?: Date | null | undefined;
749
573
  prediction?: {
750
574
  score: {
751
575
  team1: number | null;
@@ -770,9 +594,9 @@ export declare const tournamentRouter: import("@trpc/server").TRPCBuiltRouter<{
770
594
  };
771
595
  stage: string;
772
596
  endDate?: Date | null | undefined;
773
- startingDate?: Date | null | undefined;
774
597
  additionalTag?: string | undefined;
775
598
  winnerId?: string | import("mongoose").Types.ObjectId | null | undefined;
599
+ startingDate?: Date | null | undefined;
776
600
  prediction?: {
777
601
  score: {
778
602
  team1: number | null;
@@ -815,84 +639,9 @@ export declare const tournamentRouter: import("@trpc/server").TRPCBuiltRouter<{
815
639
  };
816
640
  stage: string;
817
641
  endDate?: Date | null | undefined;
818
- startingDate?: Date | null | undefined;
819
642
  additionalTag?: string | undefined;
820
643
  winnerId?: string | import("mongoose").Types.ObjectId | null | undefined;
821
- prediction?: {
822
- score: {
823
- team1: number | null;
824
- team2: number | null;
825
- };
826
- succeeded?: boolean | null | undefined;
827
- } | null | undefined;
828
- } | {
829
- documents: {
830
- _id: string | import("mongoose").Types.ObjectId;
831
- team1: {
832
- name: string;
833
- teamId: string | import("mongoose").Types.ObjectId;
834
- };
835
- team2: {
836
- name: string;
837
- teamId: string | import("mongoose").Types.ObjectId;
838
- };
839
- score: {
840
- team1: number | null;
841
- team2: number | null;
842
- };
843
- stage: string;
844
- endDate?: Date | null | undefined;
845
- startingDate?: Date | null | undefined;
846
- additionalTag?: string | undefined;
847
- winnerId?: string | import("mongoose").Types.ObjectId | null | undefined;
848
- prediction?: {
849
- score: {
850
- team1: number | null;
851
- team2: number | null;
852
- };
853
- succeeded?: boolean | null | undefined;
854
- } | null | undefined;
855
- }[];
856
- metadata?: {
857
- page: number;
858
- size: number;
859
- totalElements: number;
860
- totalPages: number;
861
- } | undefined;
862
- } | undefined;
863
- };
864
- meta: object;
865
- }>;
866
- updateScore: import("@trpc/server").TRPCMutationProcedure<{
867
- input: {
868
- tournamentId: string | import("mongoose").Types.ObjectId;
869
- matchId: string | import("mongoose").Types.ObjectId;
870
- team1Score: number;
871
- team2Score: number;
872
- winnerId?: string | import("mongoose").Types.ObjectId | undefined;
873
- };
874
- output: {
875
- message: string;
876
- success: boolean;
877
- data?: {
878
- _id: string | import("mongoose").Types.ObjectId;
879
- team1: {
880
- name: string;
881
- teamId: string | import("mongoose").Types.ObjectId;
882
- };
883
- team2: {
884
- name: string;
885
- teamId: string | import("mongoose").Types.ObjectId;
886
- };
887
- score: {
888
- team1: number | null;
889
- team2: number | null;
890
- };
891
- stage: string;
892
- endDate?: Date | null | undefined;
893
644
  startingDate?: Date | null | undefined;
894
- additionalTag?: string | undefined;
895
- winnerId?: string | import("mongoose").Types.ObjectId | null | undefined;
896
645
  prediction?: {
897
646
  score: {
898
647
  team1: number | null;
@@ -917,9 +666,9 @@ export declare const tournamentRouter: import("@trpc/server").TRPCBuiltRouter<{
917
666
  };
918
667
  stage: string;
919
668
  endDate?: Date | null | undefined;
920
- startingDate?: Date | null | undefined;
921
669
  additionalTag?: string | undefined;
922
670
  winnerId?: string | import("mongoose").Types.ObjectId | null | undefined;
671
+ startingDate?: Date | null | undefined;
923
672
  prediction?: {
924
673
  score: {
925
674
  team1: number | null;
@@ -942,8 +691,10 @@ export declare const tournamentRouter: import("@trpc/server").TRPCBuiltRouter<{
942
691
  input: {
943
692
  tournamentId: string | import("mongoose").Types.ObjectId;
944
693
  matchId: string | import("mongoose").Types.ObjectId;
945
- endDate?: string | Date | undefined;
946
- winnerId?: string | import("mongoose").Types.ObjectId | undefined;
694
+ finalScore?: {
695
+ team1: number;
696
+ team2: number;
697
+ } | undefined;
947
698
  };
948
699
  output: {
949
700
  message: string;
@@ -964,9 +715,9 @@ export declare const tournamentRouter: import("@trpc/server").TRPCBuiltRouter<{
964
715
  };
965
716
  stage: string;
966
717
  endDate?: Date | null | undefined;
967
- startingDate?: Date | null | undefined;
968
718
  additionalTag?: string | undefined;
969
719
  winnerId?: string | import("mongoose").Types.ObjectId | null | undefined;
720
+ startingDate?: Date | null | undefined;
970
721
  prediction?: {
971
722
  score: {
972
723
  team1: number | null;
@@ -991,9 +742,9 @@ export declare const tournamentRouter: import("@trpc/server").TRPCBuiltRouter<{
991
742
  };
992
743
  stage: string;
993
744
  endDate?: Date | null | undefined;
994
- startingDate?: Date | null | undefined;
995
745
  additionalTag?: string | undefined;
996
746
  winnerId?: string | import("mongoose").Types.ObjectId | null | undefined;
747
+ startingDate?: Date | null | undefined;
997
748
  prediction?: {
998
749
  score: {
999
750
  team1: number | null;
@@ -1022,71 +773,39 @@ export declare const tournamentRouter: import("@trpc/server").TRPCBuiltRouter<{
1022
773
  success: boolean;
1023
774
  data?: {
1024
775
  status: import("@lyxa.ai/core/dist/utilities/enum").Status;
1025
- _id: string | import("mongoose").Types.ObjectId;
776
+ name: string;
1026
777
  tag: string;
778
+ _id?: string | import("mongoose").Types.ObjectId | undefined;
1027
779
  createdAt?: Date | null | undefined;
1028
780
  startDate?: Date | null | undefined;
1029
781
  endDate?: Date | null | undefined;
1030
782
  updatedAt?: Date | null | undefined;
1031
- matches?: {
1032
- _id: string | import("mongoose").Types.ObjectId;
1033
- team1: {
1034
- name: string;
1035
- teamId: string | import("mongoose").Types.ObjectId;
1036
- };
1037
- team2: {
1038
- name: string;
1039
- teamId: string | import("mongoose").Types.ObjectId;
1040
- };
1041
- score: {
1042
- team1: number | null;
1043
- team2: number | null;
1044
- };
1045
- stage: string;
1046
- endDate?: Date | null | undefined;
1047
- startingDate?: Date | null | undefined;
1048
- additionalTag?: string | undefined;
1049
- winnerId?: string | import("mongoose").Types.ObjectId | null | undefined;
1050
- }[] | undefined;
1051
- teams?: {
1052
- name: string;
1053
- _id: string | import("mongoose").Types.ObjectId;
1054
- picture?: string | null | undefined;
1055
- }[] | undefined;
783
+ reward?: {
784
+ type: import("@lyxa.ai/core/dist/utilities/enum").TournamentRewardType.FREE_DELIVERY;
785
+ } | {
786
+ type: import("@lyxa.ai/core/dist/utilities/enum").TournamentRewardType.COUPON;
787
+ maxDiscountPerOrder?: number | null | undefined;
788
+ couponNamePrefix?: string | undefined;
789
+ percentage?: number | undefined;
790
+ } | undefined;
1056
791
  } | {
1057
792
  documents: {
1058
793
  status: import("@lyxa.ai/core/dist/utilities/enum").Status;
1059
- _id: string | import("mongoose").Types.ObjectId;
794
+ name: string;
1060
795
  tag: string;
796
+ _id?: string | import("mongoose").Types.ObjectId | undefined;
1061
797
  createdAt?: Date | null | undefined;
1062
798
  startDate?: Date | null | undefined;
1063
799
  endDate?: Date | null | undefined;
1064
800
  updatedAt?: Date | null | undefined;
1065
- matches?: {
1066
- _id: string | import("mongoose").Types.ObjectId;
1067
- team1: {
1068
- name: string;
1069
- teamId: string | import("mongoose").Types.ObjectId;
1070
- };
1071
- team2: {
1072
- name: string;
1073
- teamId: string | import("mongoose").Types.ObjectId;
1074
- };
1075
- score: {
1076
- team1: number | null;
1077
- team2: number | null;
1078
- };
1079
- stage: string;
1080
- endDate?: Date | null | undefined;
1081
- startingDate?: Date | null | undefined;
1082
- additionalTag?: string | undefined;
1083
- winnerId?: string | import("mongoose").Types.ObjectId | null | undefined;
1084
- }[] | undefined;
1085
- teams?: {
1086
- name: string;
1087
- _id: string | import("mongoose").Types.ObjectId;
1088
- picture?: string | null | undefined;
1089
- }[] | undefined;
801
+ reward?: {
802
+ type: import("@lyxa.ai/core/dist/utilities/enum").TournamentRewardType.FREE_DELIVERY;
803
+ } | {
804
+ type: import("@lyxa.ai/core/dist/utilities/enum").TournamentRewardType.COUPON;
805
+ maxDiscountPerOrder?: number | null | undefined;
806
+ couponNamePrefix?: string | undefined;
807
+ percentage?: number | undefined;
808
+ } | undefined;
1090
809
  }[];
1091
810
  metadata?: {
1092
811
  page: number;
@@ -1117,22 +836,22 @@ export declare const tournamentRouter: import("@trpc/server").TRPCBuiltRouter<{
1117
836
  }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
1118
837
  join: import("@trpc/server").TRPCMutationProcedure<{
1119
838
  input: {
1120
- teamId: string | import("mongoose").Types.ObjectId;
1121
839
  tournamentId: string | import("mongoose").Types.ObjectId;
840
+ teamId: string | import("mongoose").Types.ObjectId;
1122
841
  };
1123
842
  output: {
1124
843
  message: string;
1125
844
  success: boolean;
1126
845
  data?: {
1127
846
  _id: string | import("mongoose").Types.ObjectId;
1128
- teamId: string | import("mongoose").Types.ObjectId;
1129
847
  tournamentId: string | import("mongoose").Types.ObjectId;
848
+ teamId: string | import("mongoose").Types.ObjectId;
1130
849
  createdAt?: Date | null | undefined;
1131
850
  } | {
1132
851
  documents: {
1133
852
  _id: string | import("mongoose").Types.ObjectId;
1134
- teamId: string | import("mongoose").Types.ObjectId;
1135
853
  tournamentId: string | import("mongoose").Types.ObjectId;
854
+ teamId: string | import("mongoose").Types.ObjectId;
1136
855
  createdAt?: Date | null | undefined;
1137
856
  }[];
1138
857
  metadata?: {
@@ -1155,39 +874,39 @@ export declare const tournamentRouter: import("@trpc/server").TRPCBuiltRouter<{
1155
874
  data?: {
1156
875
  _id: string | import("mongoose").Types.ObjectId;
1157
876
  userId: string | import("mongoose").Types.ObjectId;
1158
- teamId: string | import("mongoose").Types.ObjectId;
1159
877
  tournamentId: string | import("mongoose").Types.ObjectId;
878
+ teamId: string | import("mongoose").Types.ObjectId;
1160
879
  createdAt?: Date | null | undefined;
1161
880
  updatedAt?: Date | null | undefined;
1162
881
  predictions?: {
1163
882
  _id: string | import("mongoose").Types.ObjectId;
883
+ matchId: string | import("mongoose").Types.ObjectId;
1164
884
  score: {
1165
885
  team1: number | null;
1166
886
  team2: number | null;
1167
887
  };
1168
- matchId: string | import("mongoose").Types.ObjectId;
1169
888
  coupon?: string | import("mongoose").Types.ObjectId | undefined;
1170
- succeeded?: boolean | null | undefined;
1171
889
  predictionTime?: Date | null | undefined;
890
+ succeeded?: boolean | null | undefined;
1172
891
  }[] | undefined;
1173
892
  }[] | {
1174
893
  documents: {
1175
894
  _id: string | import("mongoose").Types.ObjectId;
1176
895
  userId: string | import("mongoose").Types.ObjectId;
1177
- teamId: string | import("mongoose").Types.ObjectId;
1178
896
  tournamentId: string | import("mongoose").Types.ObjectId;
897
+ teamId: string | import("mongoose").Types.ObjectId;
1179
898
  createdAt?: Date | null | undefined;
1180
899
  updatedAt?: Date | null | undefined;
1181
900
  predictions?: {
1182
901
  _id: string | import("mongoose").Types.ObjectId;
902
+ matchId: string | import("mongoose").Types.ObjectId;
1183
903
  score: {
1184
904
  team1: number | null;
1185
905
  team2: number | null;
1186
906
  };
1187
- matchId: string | import("mongoose").Types.ObjectId;
1188
907
  coupon?: string | import("mongoose").Types.ObjectId | undefined;
1189
- succeeded?: boolean | null | undefined;
1190
908
  predictionTime?: Date | null | undefined;
909
+ succeeded?: boolean | null | undefined;
1191
910
  }[] | undefined;
1192
911
  }[][];
1193
912
  metadata?: {
@@ -1219,31 +938,31 @@ export declare const tournamentRouter: import("@trpc/server").TRPCBuiltRouter<{
1219
938
  }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
1220
939
  create: import("@trpc/server").TRPCMutationProcedure<{
1221
940
  input: {
941
+ tournamentId: string | import("mongoose").Types.ObjectId;
942
+ matchId: string | import("mongoose").Types.ObjectId;
1222
943
  score: {
1223
944
  team1: number;
1224
945
  team2: number;
1225
946
  };
1226
- tournamentId: string | import("mongoose").Types.ObjectId;
1227
- matchId: string | import("mongoose").Types.ObjectId;
1228
947
  };
1229
948
  output: {
1230
949
  message: string;
1231
950
  success: boolean;
1232
951
  data?: {
1233
952
  _id: string | import("mongoose").Types.ObjectId;
953
+ matchId: string | import("mongoose").Types.ObjectId;
1234
954
  score: {
1235
955
  team1: number | null;
1236
956
  team2: number | null;
1237
957
  };
1238
- matchId: string | import("mongoose").Types.ObjectId;
1239
958
  } | {
1240
959
  documents: {
1241
960
  _id: string | import("mongoose").Types.ObjectId;
961
+ matchId: string | import("mongoose").Types.ObjectId;
1242
962
  score: {
1243
963
  team1: number | null;
1244
964
  team2: number | null;
1245
965
  };
1246
- matchId: string | import("mongoose").Types.ObjectId;
1247
966
  }[];
1248
967
  metadata?: {
1249
968
  page: number;
@@ -1257,31 +976,31 @@ export declare const tournamentRouter: import("@trpc/server").TRPCBuiltRouter<{
1257
976
  }>;
1258
977
  edit: import("@trpc/server").TRPCMutationProcedure<{
1259
978
  input: {
979
+ tournamentId: string | import("mongoose").Types.ObjectId;
980
+ matchId: string | import("mongoose").Types.ObjectId;
1260
981
  score: {
1261
982
  team1: number;
1262
983
  team2: number;
1263
984
  };
1264
- tournamentId: string | import("mongoose").Types.ObjectId;
1265
- matchId: string | import("mongoose").Types.ObjectId;
1266
985
  };
1267
986
  output: {
1268
987
  message: string;
1269
988
  success: boolean;
1270
989
  data?: {
1271
990
  _id: string | import("mongoose").Types.ObjectId;
991
+ matchId: string | import("mongoose").Types.ObjectId;
1272
992
  score: {
1273
993
  team1: number | null;
1274
994
  team2: number | null;
1275
995
  };
1276
- matchId: string | import("mongoose").Types.ObjectId;
1277
996
  } | {
1278
997
  documents: {
1279
998
  _id: string | import("mongoose").Types.ObjectId;
999
+ matchId: string | import("mongoose").Types.ObjectId;
1280
1000
  score: {
1281
1001
  team1: number | null;
1282
1002
  team2: number | null;
1283
1003
  };
1284
- matchId: string | import("mongoose").Types.ObjectId;
1285
1004
  }[];
1286
1005
  metadata?: {
1287
1006
  page: number;
@@ -1303,23 +1022,23 @@ export declare const tournamentRouter: import("@trpc/server").TRPCBuiltRouter<{
1303
1022
  success: boolean;
1304
1023
  data?: {
1305
1024
  _id: string | import("mongoose").Types.ObjectId;
1025
+ matchId: string | import("mongoose").Types.ObjectId;
1306
1026
  score: {
1307
1027
  team1: number | null;
1308
1028
  team2: number | null;
1309
1029
  };
1310
- matchId: string | import("mongoose").Types.ObjectId;
1311
- succeeded?: boolean | null | undefined;
1312
1030
  predictionTime?: Date | null | undefined;
1031
+ succeeded?: boolean | null | undefined;
1313
1032
  } | {
1314
1033
  documents: ({
1315
1034
  _id: string | import("mongoose").Types.ObjectId;
1035
+ matchId: string | import("mongoose").Types.ObjectId;
1316
1036
  score: {
1317
1037
  team1: number | null;
1318
1038
  team2: number | null;
1319
1039
  };
1320
- matchId: string | import("mongoose").Types.ObjectId;
1321
- succeeded?: boolean | null | undefined;
1322
1040
  predictionTime?: Date | null | undefined;
1041
+ succeeded?: boolean | null | undefined;
1323
1042
  } | null)[];
1324
1043
  metadata?: {
1325
1044
  page: number;
@@ -1332,5 +1051,32 @@ export declare const tournamentRouter: import("@trpc/server").TRPCBuiltRouter<{
1332
1051
  meta: object;
1333
1052
  }>;
1334
1053
  }>>;
1054
+ getActive: import("@trpc/server").TRPCQueryProcedure<{
1055
+ input: void;
1056
+ output: {
1057
+ message: string;
1058
+ success: boolean;
1059
+ data?: {
1060
+ name: string;
1061
+ tag: string;
1062
+ startDate?: Date | null | undefined;
1063
+ endDate?: Date | null | undefined;
1064
+ } | {
1065
+ documents: ({
1066
+ name: string;
1067
+ tag: string;
1068
+ startDate?: Date | null | undefined;
1069
+ endDate?: Date | null | undefined;
1070
+ } | null)[];
1071
+ metadata?: {
1072
+ page: number;
1073
+ size: number;
1074
+ totalElements: number;
1075
+ totalPages: number;
1076
+ } | undefined;
1077
+ } | null | undefined;
1078
+ };
1079
+ meta: object;
1080
+ }>;
1335
1081
  }>>;
1336
1082
  //# sourceMappingURL=tournament.router.d.ts.map