@timardex/cluemart-shared 1.6.130 → 1.7.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 (168) hide show
  1. package/dist/ad-CVkVX_z5.d.ts +296 -0
  2. package/dist/ad-DA9ECAhK.d.mts +296 -0
  3. package/dist/affiliate-1RtkLnLP.d.ts +35 -0
  4. package/dist/affiliate-Cos2Syz5.d.mts +35 -0
  5. package/dist/chunk-HZMP7GXC.mjs +5330 -0
  6. package/dist/chunk-HZMP7GXC.mjs.map +1 -0
  7. package/dist/chunk-KZTOISPA.mjs +272 -0
  8. package/dist/chunk-KZTOISPA.mjs.map +1 -0
  9. package/dist/chunk-MVQ3CFQR.mjs +230 -0
  10. package/dist/chunk-MVQ3CFQR.mjs.map +1 -0
  11. package/dist/chunk-NPFJ2CN2.mjs +109 -0
  12. package/dist/chunk-NPFJ2CN2.mjs.map +1 -0
  13. package/dist/chunk-RKIRWZCH.mjs +368 -0
  14. package/dist/chunk-RKIRWZCH.mjs.map +1 -0
  15. package/dist/{chunk-OHHJ3KJJ.mjs → chunk-TAECMXM4.mjs} +267 -304
  16. package/dist/chunk-TAECMXM4.mjs.map +1 -0
  17. package/dist/chunk-VA5YN2K3.mjs +48 -0
  18. package/dist/chunk-VA5YN2K3.mjs.map +1 -0
  19. package/dist/chunk-ZZJSCYJK.mjs +958 -0
  20. package/dist/chunk-ZZJSCYJK.mjs.map +1 -0
  21. package/dist/contactUs-DGrDzJaM.d.mts +11 -0
  22. package/dist/contactUs-H7799pWe.d.ts +11 -0
  23. package/dist/enums/index.cjs +223 -2
  24. package/dist/enums/index.cjs.map +1 -1
  25. package/dist/enums/index.d.mts +164 -5
  26. package/dist/enums/index.d.ts +164 -5
  27. package/dist/enums/index.mjs +41 -1
  28. package/dist/formFields/index.cjs +168 -403
  29. package/dist/formFields/index.cjs.map +1 -1
  30. package/dist/formFields/index.d.mts +3 -6
  31. package/dist/formFields/index.d.ts +3 -6
  32. package/dist/formFields/index.mjs +47 -921
  33. package/dist/formFields/index.mjs.map +1 -1
  34. package/dist/global-BUUfmCo7.d.mts +698 -0
  35. package/dist/global-fKbMmluy.d.ts +698 -0
  36. package/dist/graphql/index.cjs +3329 -3340
  37. package/dist/graphql/index.cjs.map +1 -1
  38. package/dist/graphql/index.d.mts +487 -690
  39. package/dist/graphql/index.d.ts +487 -690
  40. package/dist/graphql/index.mjs +153 -2552
  41. package/dist/graphql/index.mjs.map +1 -1
  42. package/dist/hooks/index.cjs +3478 -773
  43. package/dist/hooks/index.cjs.map +1 -1
  44. package/dist/hooks/index.d.mts +6 -13
  45. package/dist/hooks/index.d.ts +6 -13
  46. package/dist/hooks/index.mjs +99 -193
  47. package/dist/hooks/index.mjs.map +1 -1
  48. package/dist/images/apple-maps-icon.webp.d.ts +1 -8
  49. package/dist/images/banner-horizontal.webp.d.ts +1 -8
  50. package/dist/images/banner-vertical.webp.d.ts +1 -8
  51. package/dist/images/cluiTui.webp.d.ts +1 -8
  52. package/dist/images/corporate.webp.d.ts +1 -8
  53. package/dist/images/facebook.webp.d.ts +1 -8
  54. package/dist/images/gazebo-top.webp.d.ts +1 -8
  55. package/dist/images/google-maps-icon.webp.d.ts +1 -8
  56. package/dist/images/googleMaps-logo-dark.webp.d.ts +1 -8
  57. package/dist/images/googleMaps-logo-light.webp.d.ts +1 -8
  58. package/dist/images/index.mjs +21 -86
  59. package/dist/images/index.mjs.map +1 -1
  60. package/dist/images/instagram.webp.d.ts +1 -8
  61. package/dist/images/logo-atr.webp.d.ts +1 -8
  62. package/dist/images/logo-dark.webp.d.ts +1 -8
  63. package/dist/images/logo.webp.d.ts +1 -8
  64. package/dist/images/meet.webp.d.ts +1 -8
  65. package/dist/images/mini-market1.webp.d.ts +1 -8
  66. package/dist/images/mini-market2.webp.d.ts +1 -8
  67. package/dist/images/mini-market3.webp.d.ts +1 -8
  68. package/dist/images/mini-market4.webp.d.ts +1 -8
  69. package/dist/images/mini-market5.webp.d.ts +1 -8
  70. package/dist/images/poll.webp.d.ts +1 -8
  71. package/dist/images/poster1.webp.d.ts +1 -8
  72. package/dist/images/poster2.webp.d.ts +1 -8
  73. package/dist/images/poster3.webp.d.ts +1 -8
  74. package/dist/images/poster4.webp.d.ts +1 -8
  75. package/dist/images/private.webp.d.ts +1 -8
  76. package/dist/images/qr-code.webp.d.ts +1 -8
  77. package/dist/images/school.webp.d.ts +1 -8
  78. package/dist/images/sima.webp.d.ts +1 -8
  79. package/dist/images/store-android.webp.d.ts +1 -8
  80. package/dist/images/store-ios.webp.d.ts +1 -8
  81. package/dist/images/tablas.webp.d.ts +1 -8
  82. package/dist/images/telefonos.webp.d.ts +1 -8
  83. package/dist/images/tiktok.webp.d.ts +1 -8
  84. package/dist/images/tip.webp.d.ts +1 -8
  85. package/dist/images/ugralos.webp.d.ts +1 -8
  86. package/dist/images/waze-maps-icon.webp.d.ts +1 -8
  87. package/dist/images/website.webp.d.ts +1 -8
  88. package/dist/images/youtube.webp.d.ts +1 -8
  89. package/dist/index.cjs +5883 -7079
  90. package/dist/index.cjs.map +1 -1
  91. package/dist/index.d.mts +1692 -2966
  92. package/dist/index.d.ts +1692 -2966
  93. package/dist/index.mjs +5020 -6162
  94. package/dist/index.mjs.map +1 -1
  95. package/dist/map/index.cjs +9 -14
  96. package/dist/map/index.cjs.map +1 -1
  97. package/dist/map/index.d.mts +14 -18
  98. package/dist/map/index.d.ts +14 -18
  99. package/dist/map/index.mjs +9 -14
  100. package/dist/map/index.mjs.map +1 -1
  101. package/dist/resourceActivities-BL_12IAo.d.ts +125 -0
  102. package/dist/resourceActivities-zczOntNk.d.mts +125 -0
  103. package/dist/sharing/index.cjs +1272 -63
  104. package/dist/sharing/index.cjs.map +1 -1
  105. package/dist/sharing/index.d.mts +7 -32
  106. package/dist/sharing/index.d.ts +7 -32
  107. package/dist/sharing/index.mjs +30 -188
  108. package/dist/sharing/index.mjs.map +1 -1
  109. package/dist/theme/index.mjs +5 -41
  110. package/dist/theme/index.mjs.map +1 -1
  111. package/dist/types/index.cjs +110 -868
  112. package/dist/types/index.cjs.map +1 -1
  113. package/dist/types/index.d.mts +24 -230
  114. package/dist/types/index.d.ts +24 -230
  115. package/dist/types/index.mjs +27 -61
  116. package/dist/utils/index.cjs +214 -608
  117. package/dist/utils/index.cjs.map +1 -1
  118. package/dist/utils/index.d.mts +53 -107
  119. package/dist/utils/index.d.ts +53 -107
  120. package/dist/utils/index.mjs +15 -43
  121. package/package.json +12 -40
  122. package/dist/affiliate-Bqqlffw8.d.mts +0 -36
  123. package/dist/affiliate-Btlp5XUp.d.ts +0 -36
  124. package/dist/affiliateAdapters-BW3BY7c5.d.mts +0 -118
  125. package/dist/affiliateAdapters-C51ISmuA.d.ts +0 -118
  126. package/dist/apollo/index.cjs +0 -1383
  127. package/dist/apollo/index.cjs.map +0 -1
  128. package/dist/apollo/index.d.mts +0 -323
  129. package/dist/apollo/index.d.ts +0 -323
  130. package/dist/apollo/index.mjs +0 -1295
  131. package/dist/apollo/index.mjs.map +0 -1
  132. package/dist/auth/index.cjs +0 -3322
  133. package/dist/auth/index.cjs.map +0 -1
  134. package/dist/auth/index.d.mts +0 -164
  135. package/dist/auth/index.d.ts +0 -164
  136. package/dist/auth/index.mjs +0 -379
  137. package/dist/auth/index.mjs.map +0 -1
  138. package/dist/auth-BOmAO53v.d.ts +0 -169
  139. package/dist/auth-CsITA95p.d.mts +0 -169
  140. package/dist/chunk-DATBGC2K.mjs +0 -347
  141. package/dist/chunk-DATBGC2K.mjs.map +0 -1
  142. package/dist/chunk-DDHECBJR.mjs +0 -726
  143. package/dist/chunk-DDHECBJR.mjs.map +0 -1
  144. package/dist/chunk-INQCDU24.mjs +0 -139
  145. package/dist/chunk-INQCDU24.mjs.map +0 -1
  146. package/dist/chunk-NWWKI4PJ.mjs +0 -297
  147. package/dist/chunk-NWWKI4PJ.mjs.map +0 -1
  148. package/dist/chunk-OHHJ3KJJ.mjs.map +0 -1
  149. package/dist/chunk-RAYUJODN.mjs +0 -45
  150. package/dist/chunk-RAYUJODN.mjs.map +0 -1
  151. package/dist/chunk-TOEFAEF2.mjs +0 -69
  152. package/dist/chunk-TOEFAEF2.mjs.map +0 -1
  153. package/dist/chunk-UKW7NZEQ.mjs +0 -2813
  154. package/dist/chunk-UKW7NZEQ.mjs.map +0 -1
  155. package/dist/dailyClue-C6WXY73z.d.mts +0 -105
  156. package/dist/dailyClue-C6WXY73z.d.ts +0 -105
  157. package/dist/event-C9K7CSg4.d.ts +0 -53
  158. package/dist/event-W0NhL5Cd.d.mts +0 -53
  159. package/dist/global-BbSFfYdd.d.ts +0 -181
  160. package/dist/global-C6v9tRji.d.mts +0 -181
  161. package/dist/graphql-CDOfA79A.d.ts +0 -1253
  162. package/dist/graphql-CcvzTs9k.d.mts +0 -1253
  163. package/dist/resourceActivities-CS8YRIIL.d.mts +0 -89
  164. package/dist/resourceActivities-DOdNPkhW.d.ts +0 -89
  165. package/dist/subscription-Cj_qBA7u.d.mts +0 -20
  166. package/dist/subscription-OiJ50uJb.d.ts +0 -20
  167. package/dist/vendor-DmMi2qmx.d.mts +0 -73
  168. package/dist/vendor-M9hVZlni.d.ts +0 -73
@@ -1,2566 +1,169 @@
1
1
  import {
2
- AffiliateFieldsFragmentDoc,
3
- ChatDocument,
4
- ChatFieldsFragmentDoc,
5
- ChatReportFieldsFragmentDoc,
6
- CreateAdDocument,
7
- DeleteAdDocument,
8
- EventFieldsFragmentDoc,
9
- EventInfoFieldsFragmentDoc,
10
- GameDocFieldsFragmentDoc,
11
- GetAdDocument,
12
- GetAdsByRegionDocument,
13
- GetAdsDocument,
14
- GetAffiliateDocument,
15
- GetAffiliatesDocument,
16
- GetAppSettingsDocument,
17
- GetChatsByRegionDocument,
18
- GetEventByPlaceIdDocument,
19
- GetEventBySlugDocument,
20
- GetEventDocument,
21
- GetEventInfoDocument,
22
- GetEventRelationsDocument,
23
- GetEventsByRegionDocument,
24
- GetEventsDocument,
25
- GetEventsNearMeDocument,
26
- GetGameDocument,
27
- GetGameLeaderboardDocument,
28
- GetGamesDocument,
29
- GetNotificationCountDocument,
30
- GetPartnerBySlugDocument,
31
- GetPartnerDocument,
32
- GetPartnersByRegionDocument,
33
- GetPartnersDocument,
34
- GetPostBySlugDocument,
35
- GetPostDocument,
36
- GetPostsByTypeDocument,
37
- GetPostsDocument,
38
- GetRelationByEventAndVendorDocument,
39
- GetRelationDocument,
40
- GetResourceActivityDocument,
41
- GetResourceConnectionsDocument,
42
- GetSchoolDocument,
43
- GetSchoolsDocument,
44
- GetSubscriptionPlansDocument,
45
- GetSubscriptionStatusDocument,
46
- GetUnregisteredVendorDocument,
47
- GetUnregisteredVendorsByInviterIdDocument,
48
- GetUnregisteredVendorsDocument,
49
- GetUserActivitiesDocument,
50
- GetUserDocument,
51
- GetUserEventsDocument,
52
- GetUserNotificationsDocument,
53
- GetUserPartnersDocument,
54
- GetUserVendorsDocument,
55
- GetVendorBySlugDocument,
56
- GetVendorDocument,
57
- GetVendorInfoDocument,
58
- GetVendorRelationsDocument,
59
- GetVendorsByRegionDocument,
60
- GetVendorsDocument,
61
- LicenceFieldsFragmentDoc,
62
- NotificationFieldsFragmentDoc,
63
- PartnerFieldsFragmentDoc,
64
- PostFieldsFragmentDoc,
65
- PosterUsageFieldsFragmentDoc,
66
- RelationFieldsFragmentDoc,
67
- SchoolFieldsFragmentDoc,
68
- SearchEventsDocument,
69
- SearchPartnersDocument,
70
- SearchVendorsDocument,
71
- UnregisteredVendorFieldsFragmentDoc,
72
- UpdateAdDocument,
73
- UserChatsDocument,
74
- UserFieldsFragmentDoc,
75
- VendorFieldsFragmentDoc,
76
- VendorInfoFieldsFragmentDoc,
2
+ GET_EVENT,
3
+ GET_EVENT_BY_SLUG,
4
+ GET_EVENT_INFO,
5
+ GET_PARTNER,
6
+ GET_PARTNER_BY_SLUG,
7
+ GET_POST,
8
+ GET_POST_BY_SLUG,
9
+ GET_RESOURCE_CONNECTIONS,
10
+ GET_VENDOR,
11
+ GET_VENDOR_BY_SLUG,
12
+ GET_VENDOR_INFO,
13
+ toGraphqlQueryString,
14
+ useAddParticipantToChat,
15
+ useAddUserFavouriteResource,
16
+ useAddUserGoingResource,
17
+ useAddUserInterestResource,
18
+ useAddUserPresentResource,
19
+ useAdminPermanentlyDeleteResource,
20
+ useAdminResendUserVerificationEmail,
21
+ useAdminUpdateResourceType,
22
+ useCancelSubscription,
23
+ useContactUs,
24
+ useCrawlGoogleMarkets,
25
+ useCreateAd,
26
+ useCreateBulkNotifications,
27
+ useCreateCheckoutSession,
28
+ useCreateCustomerPortal,
29
+ useCreateEvent,
30
+ useCreateEventInfo,
31
+ useCreatePartner,
32
+ useCreatePost,
33
+ useCreatePoster,
34
+ useCreatePrivateChat,
35
+ useCreatePushToken,
36
+ useCreateRelation,
37
+ useCreateResourceActivity,
38
+ useCreateSchool,
39
+ useCreateUnregisteredVendor,
40
+ useCreateUser,
41
+ useCreateVendor,
42
+ useCreateVendorInfo,
43
+ useDeleteAd,
44
+ useDeleteAllNotifications,
45
+ useDeleteChat,
46
+ useDeleteEvent,
47
+ useDeleteNotification,
48
+ useDeletePartner,
49
+ useDeletePost,
50
+ useDeleteRelation,
51
+ useDeleteSchool,
52
+ useDeleteUnregisteredVendor,
53
+ useDeleteUser,
54
+ useDeleteVendor,
55
+ useGetAd,
56
+ useGetAds,
57
+ useGetAdsByRegion,
58
+ useGetAffiliate,
59
+ useGetAffiliates,
60
+ useGetAppSettings,
61
+ useGetChat,
62
+ useGetChatSubscription,
63
+ useGetChatsByRegion,
64
+ useGetEvent,
65
+ useGetEventByPlaceId,
66
+ useGetEventInfo,
67
+ useGetEventRelations,
68
+ useGetEvents,
69
+ useGetEventsByRegion,
70
+ useGetEventsNearMe,
71
+ useGetGame,
72
+ useGetGameLeaderboard,
73
+ useGetGames,
74
+ useGetNotificationCount,
75
+ useGetNotificationCountSubscription,
76
+ useGetPartner,
77
+ useGetPartners,
78
+ useGetPartnersByRegion,
79
+ useGetPost,
80
+ useGetPosts,
81
+ useGetPostsByType,
82
+ useGetRelation,
83
+ useGetRelationByEventAndVendor,
84
+ useGetReportedChatUsers,
85
+ useGetResourceActivity,
86
+ useGetResourceConnections,
87
+ useGetSchool,
88
+ useGetSchools,
89
+ useGetSubscriptionPlans,
90
+ useGetSubscriptionStatus,
91
+ useGetUnregisteredVendor,
92
+ useGetUnregisteredVendors,
93
+ useGetUnregisteredVendorsByInviterId,
77
94
  useGetUser,
78
95
  useGetUserActivities,
96
+ useGetUserChats,
79
97
  useGetUserEvents,
98
+ useGetUserNotifications,
99
+ useGetUserNotificationsSubscription,
80
100
  useGetUserPartners,
81
101
  useGetUserResources,
82
102
  useGetUserVendors,
83
103
  useGetUsers,
104
+ useGetVendor,
105
+ useGetVendorInfo,
106
+ useGetVendorRelations,
107
+ useGetVendors,
108
+ useGetVendorsByRegion,
109
+ useLeaveGame,
84
110
  useLogin,
85
111
  useLogout,
112
+ useMarkAllNotificationsRead,
113
+ useMarkChatMessagesSeen,
114
+ useMarkNotificationRead,
115
+ useRedeemReward,
86
116
  useRefreshToken,
87
117
  useRegister,
118
+ useRemoveParticipantFromChat,
119
+ useRemoveUserFavouriteResource,
120
+ useRemoveUserGoingResource,
121
+ useRemoveUserInterestResource,
122
+ useRemoveUserPresentResource,
123
+ useReportChatUser,
124
+ useRequestMarketingMaterial,
88
125
  useRequestPasswordReset,
89
126
  useResetPassword,
127
+ useSearchEvents,
128
+ useSearchPartners,
129
+ useSearchVendors,
130
+ useSelectPackage,
131
+ useSelectStandardPackage,
132
+ useSendChatMessage,
133
+ useStartGame,
134
+ useToggleChatMessageLike,
135
+ useUnlinkUnregisteredVendorByInviterId,
136
+ useUpdateAd,
137
+ useUpdateAppSettings,
138
+ useUpdateDailyClueGame,
139
+ useUpdateEvent,
140
+ useUpdateEventInfo,
141
+ useUpdateGoogleImportedMarkets,
142
+ useUpdatePartner,
143
+ useUpdatePost,
144
+ useUpdatePuzzleGame,
145
+ useUpdateRelation,
146
+ useUpdateSchool,
147
+ useUpdateSubscriptionPlan,
148
+ useUpdateUnregisteredVendor,
149
+ useUpdateUser,
150
+ useUpdateVendor,
151
+ useUpdateVendorInfo,
90
152
  useValidateVerificationToken
91
- } from "../chunk-UKW7NZEQ.mjs";
92
- import "../chunk-INQCDU24.mjs";
93
-
94
- // src/graphql/toGraphqlQueryString.ts
95
- import { print } from "graphql";
96
- function toGraphqlQueryString(query) {
97
- return print(query);
98
- }
99
-
100
- // src/graphql/hooks/admin/hooksMutation.ts
101
- import { useMutation } from "@apollo/client";
102
-
103
- // src/graphql/mutations/admin.ts
104
- import { gql } from "@apollo/client";
105
- var ADMIN_UPDATE_RESOURCE_TYPE_MUTATION = gql`
106
- mutation adminUpdateResourceType($input: AdminUpdateResourceInputType!) {
107
- adminUpdateResourceType(input: $input) {
108
- data {
109
- active
110
- resourceId
111
- resourceType
112
- }
113
- message
114
- }
115
- }
116
- `;
117
- var ADMIN_RESEND_USER_VERIFICATION_EMAIL_MUTATION = gql`
118
- mutation adminResendUserVerificationEmail($userId: ID!) {
119
- adminResendUserVerificationEmail(userId: $userId) {
120
- data
121
- message
122
- }
123
- }
124
- `;
125
- var ADMIN_PERMANENTLY_DELETE_RESOURCE_MUTATION = gql`
126
- mutation adminPermanentlyDeleteResource(
127
- $resourceId: ID!
128
- $resourceType: ResourceTypeEnum!
129
- ) {
130
- adminPermanentlyDeleteResource(
131
- resourceId: $resourceId
132
- resourceType: $resourceType
133
- ) {
134
- data
135
- message
136
- }
137
- }
138
- `;
139
-
140
- // src/graphql/hooks/admin/hooksMutation.ts
141
- var useAdminUpdateResourceType = () => {
142
- const [adminUpdateResourceType, { loading, error }] = useMutation(ADMIN_UPDATE_RESOURCE_TYPE_MUTATION, {
143
- awaitRefetchQueries: true,
144
- refetchQueries: (mutationResult) => {
145
- const adminUpdateResourceType2 = mutationResult?.data?.adminUpdateResourceType?.data;
146
- const resourceId = adminUpdateResourceType2?.resourceId;
147
- const resourceType = adminUpdateResourceType2?.resourceType;
148
- if (!resourceId) return [];
149
- const detectQuery = resourceType === "event" /* Event */ ? GetEventDocument : GetVendorDocument;
150
- return [
151
- {
152
- query: detectQuery,
153
- variables: { _id: resourceId }
154
- }
155
- ];
156
- }
157
- });
158
- return {
159
- adminUpdateResourceType,
160
- error,
161
- loading
162
- };
163
- };
164
- var useAdminResendUserVerificationEmail = () => {
165
- const [adminResendUserVerificationEmail, { loading, error }] = useMutation(ADMIN_RESEND_USER_VERIFICATION_EMAIL_MUTATION);
166
- return {
167
- adminResendUserVerificationEmail,
168
- error,
169
- loading
170
- };
171
- };
172
- var useAdminPermanentlyDeleteResource = () => {
173
- const [adminPermanentlyDeleteResource, { loading, error }] = useMutation(ADMIN_PERMANENTLY_DELETE_RESOURCE_MUTATION);
174
- return {
175
- adminPermanentlyDeleteResource,
176
- error,
177
- loading
178
- };
179
- };
180
-
181
- // src/graphql/hooks/chat/hooksMutation.ts
182
- import { useMutation as useMutation2 } from "@apollo/client";
183
-
184
- // src/graphql/mutations/chat.ts
185
- import { gql as gql2 } from "@apollo/client";
186
- var CREATE_PRIVATE_CHAT_MUTATION = gql2`
187
- mutation createPrivateChat($userId: ID!) {
188
- createPrivateChat(userId: $userId) {
189
- data {
190
- ...ChatFields
191
- }
192
- message
193
- }
194
- }
195
- ${ChatFieldsFragmentDoc}
196
- `;
197
- var SEND_CHAT_MESSAGE_MUTATION = gql2`
198
- mutation sendChatMessage($_id: ID!, $input: ChatMessageInputType!) {
199
- sendChatMessage(_id: $_id, input: $input) {
200
- data {
201
- ...ChatFields
202
- }
203
- message
204
- }
205
- }
206
- ${ChatFieldsFragmentDoc}
207
- `;
208
- var DELETE_CHAT_MUTATION = gql2`
209
- mutation deleteChat($_id: ID!) {
210
- deleteChat(_id: $_id) {
211
- data
212
- message
213
- }
214
- }
215
- `;
216
- var ADD_PARTICIPANT_TO_CHAT_MUTATION = gql2`
217
- mutation addParticipantToChat($chatId: ID!, $userId: ID!) {
218
- addParticipantToChat(chatId: $chatId, userId: $userId) {
219
- data {
220
- ...ChatFields
221
- }
222
- message
223
- }
224
- }
225
- ${ChatFieldsFragmentDoc}
226
- `;
227
- var REMOVE_PARTICIPANT_FROM_CHAT_MUTATION = gql2`
228
- mutation removeParticipantFromChat($chatId: ID!, $userId: ID!) {
229
- removeParticipantFromChat(chatId: $chatId, userId: $userId) {
230
- data {
231
- success
232
- region
233
- }
234
- message
235
- }
236
- }
237
- `;
238
- var TOGGLE_CHAT_MESSAGE_LIKE_MUTATION = gql2`
239
- mutation toggleChatMessageLike($chatId: ID!, $messageId: ID!) {
240
- toggleChatMessageLike(chatId: $chatId, messageId: $messageId) {
241
- data {
242
- ...ChatFields
243
- }
244
- message
245
- }
246
- }
247
- ${ChatFieldsFragmentDoc}
248
- `;
249
- var MARK_CHAT_MESSAGES_SEEN_MUTATION = gql2`
250
- mutation markChatMessagesSeen($chatId: ID!, $messageIds: [ID!]!) {
251
- markChatMessagesSeen(chatId: $chatId, messageIds: $messageIds) {
252
- data {
253
- ...ChatFields
254
- }
255
- message
256
- }
257
- }
258
- ${ChatFieldsFragmentDoc}
259
- `;
260
- var REPORT_CHAT_USER_MUTATION = gql2`
261
- mutation reportChatUser($input: ReportChatUserInputType!) {
262
- reportChatUser(input: $input) {
263
- data {
264
- ...ChatReportFields
265
- }
266
- message
267
- }
268
- }
269
- ${ChatReportFieldsFragmentDoc}
270
- `;
271
-
272
- // src/graphql/hooks/chat/hooksMutation.ts
273
- var useCreatePrivateChat = () => {
274
- const [createPrivateChat, { loading, error }] = useMutation2(CREATE_PRIVATE_CHAT_MUTATION, {
275
- awaitRefetchQueries: true,
276
- refetchQueries: [{ query: UserChatsDocument }]
277
- });
278
- return { createPrivateChat, error, loading };
279
- };
280
- var useSendChatMessage = () => {
281
- const [sendChatMessage, { loading, error }] = useMutation2(SEND_CHAT_MESSAGE_MUTATION, {
282
- awaitRefetchQueries: true,
283
- refetchQueries: (mutationResult) => {
284
- const chatId = mutationResult?.data?.sendChatMessage?.data?._id;
285
- return [
286
- {
287
- query: ChatDocument,
288
- variables: { _id: chatId }
289
- }
290
- ];
291
- }
292
- });
293
- return { error, loading, sendChatMessage };
294
- };
295
- var useDeleteChat = () => {
296
- const [deleteChat, { loading, error }] = useMutation2(DELETE_CHAT_MUTATION, {
297
- awaitRefetchQueries: true,
298
- refetchQueries: [{ query: UserChatsDocument }]
299
- });
300
- return { deleteChat, error, loading };
301
- };
302
- var useAddParticipantToChat = () => {
303
- const [addParticipantToChat, { loading, error }] = useMutation2(ADD_PARTICIPANT_TO_CHAT_MUTATION, {
304
- awaitRefetchQueries: true,
305
- refetchQueries: (mutationResult) => {
306
- const chatId = mutationResult?.data?.addParticipantToChat?.data?._id;
307
- return [
308
- {
309
- query: ChatDocument,
310
- variables: { _id: chatId }
311
- },
312
- {
313
- query: UserChatsDocument
314
- }
315
- ];
316
- }
317
- });
318
- return { addParticipantToChat, error, loading };
319
- };
320
- var useRemoveParticipantFromChat = () => {
321
- const [removeParticipantFromChat, { loading, error }] = useMutation2(REMOVE_PARTICIPANT_FROM_CHAT_MUTATION, {
322
- awaitRefetchQueries: true,
323
- refetchQueries: (mutationResult) => {
324
- const region = mutationResult?.data?.removeParticipantFromChat?.data?.region;
325
- const queries = [{ query: UserChatsDocument }];
326
- if (region && region.trim() !== "") {
327
- queries.push({
328
- query: GetChatsByRegionDocument,
329
- variables: { region }
330
- });
331
- }
332
- return queries;
333
- }
334
- });
335
- return { error, loading, removeParticipantFromChat };
336
- };
337
- var useToggleChatMessageLike = () => {
338
- const [toggleChatMessageLike, { loading, error }] = useMutation2(TOGGLE_CHAT_MESSAGE_LIKE_MUTATION, {
339
- awaitRefetchQueries: true,
340
- refetchQueries: (mutationResult) => {
341
- const chatId = mutationResult?.data?.toggleChatMessageLike?.data?._id;
342
- return [
343
- {
344
- query: ChatDocument,
345
- variables: { _id: chatId }
346
- }
347
- ];
348
- }
349
- });
350
- return { error, loading, toggleChatMessageLike };
351
- };
352
- var useMarkChatMessagesSeen = () => {
353
- const [markChatMessagesSeen, { loading, error }] = useMutation2(MARK_CHAT_MESSAGES_SEEN_MUTATION, {
354
- awaitRefetchQueries: true,
355
- refetchQueries: (mutationResult) => {
356
- const chatId = mutationResult?.data?.markChatMessagesSeen?.data?._id;
357
- return [
358
- {
359
- query: ChatDocument,
360
- variables: { _id: chatId }
361
- }
362
- ];
363
- }
364
- });
365
- return { error, loading, markChatMessagesSeen };
366
- };
367
- var useReportChatUser = () => {
368
- const [reportChatUser, { loading, error }] = useMutation2(REPORT_CHAT_USER_MUTATION);
369
- return { error, loading, reportChatUser };
370
- };
371
-
372
- // src/graphql/hooks/chat/hooksQuery.ts
373
- import { useQuery, useSubscription } from "@apollo/client";
374
-
375
- // src/graphql/subscriptions/chat.ts
376
- import { gql as gql3 } from "@apollo/client";
377
- var GET_CHAT_MESSAGE = gql3`
378
- subscription GetChatMessage {
379
- getChatMessage {
380
- ...ChatFields
381
- }
382
- }
383
- ${ChatFieldsFragmentDoc}
384
- `;
385
-
386
- // src/graphql/hooks/chat/hooksQuery.ts
387
- var useGetChat = (_id) => {
388
- const { loading, error, data, refetch } = useQuery(
389
- ChatDocument,
390
- {
391
- fetchPolicy: "network-only",
392
- skip: !_id || _id === "",
393
- variables: { _id }
394
- }
395
- );
396
- const chat = data?.chat;
397
- return { chat, error, loading, refetch };
398
- };
399
- var useGetUserChats = () => {
400
- const { loading, error, data, refetch } = useQuery(
401
- UserChatsDocument,
402
- {
403
- fetchPolicy: "network-only"
404
- }
405
- );
406
- const userChats = data?.userChats || [];
407
- return { error, loading, refetch, userChats };
408
- };
409
- var useGetChatSubscription = () => {
410
- const { data, loading, error } = useSubscription(
411
- GET_CHAT_MESSAGE
412
- );
413
- const chat = data?.getChat;
414
- return { chat, error, loading };
415
- };
416
- var useGetChatsByRegion = (region) => {
417
- const { loading, error, data, refetch } = useQuery(GetChatsByRegionDocument, {
418
- fetchPolicy: "network-only",
419
- variables: { region }
420
- });
421
- const chatsByRegion = data?.chatsByRegion || [];
422
- return { chatsByRegion, error, loading, refetch };
423
- };
424
-
425
- // src/graphql/hooks/contactUs.ts
426
- import { useMutation as useMutation3 } from "@apollo/client";
427
-
428
- // src/graphql/mutations/contactUs.ts
429
- import { gql as gql4 } from "@apollo/client";
430
- var CONTACT_US_MUTATION = gql4`
431
- mutation contactUs($input: ContactUsInputType!) {
432
- contactUs(input: $input) {
433
- data
434
- message
435
- }
436
- }
437
- `;
438
-
439
- // src/graphql/hooks/contactUs.ts
440
- var useContactUs = () => {
441
- const [contactUs, { loading, error }] = useMutation3(CONTACT_US_MUTATION);
442
- return { contactUs, error, loading };
443
- };
444
-
445
- // src/graphql/hooks/event/hooksMutation.ts
446
- import { useMutation as useMutation4 } from "@apollo/client";
447
-
448
- // src/graphql/mutations/event.ts
449
- import { gql as gql5 } from "@apollo/client";
450
- var CREATE_EVENT_MUTATION = gql5`
451
- mutation createEvent($input: EventInputType!) {
452
- createEvent(input: $input) {
453
- data {
454
- ...EventFields
455
- }
456
- message
457
- }
458
- }
459
- ${EventFieldsFragmentDoc}
460
- `;
461
- var UPDATE_EVENT_MUTATION = gql5`
462
- mutation updateEvent($_id: ID!, $input: EventInputType!) {
463
- updateEvent(_id: $_id, input: $input) {
464
- data {
465
- ...EventFields
466
- }
467
- message
468
- }
469
- }
470
- ${EventFieldsFragmentDoc}
471
- `;
472
- var DELETE_EVENT_MUTATION = gql5`
473
- mutation deleteEvent($_id: ID!) {
474
- deleteEvent(_id: $_id) {
475
- data
476
- message
477
- }
478
- }
479
- `;
480
- var CREATE_EVENT_INFO_MUTATION = gql5`
481
- mutation createEventInfo($input: EventInfoInputType!) {
482
- createEventInfo(input: $input) {
483
- data {
484
- ...EventInfoFields
485
- }
486
- message
487
- }
488
- }
489
- ${EventInfoFieldsFragmentDoc}
490
- `;
491
- var UPDATE_EVENT_INFO_MUTATION = gql5`
492
- mutation updateEventInfo($_id: ID!, $input: EventInfoInputType!) {
493
- updateEventInfo(_id: $_id, input: $input) {
494
- data {
495
- ...EventInfoFields
496
- }
497
- message
498
- }
499
- }
500
- ${EventInfoFieldsFragmentDoc}
501
- `;
502
-
503
- // src/graphql/hooks/event/hooksMutation.ts
504
- var useCreateEvent = () => {
505
- const [createEvent, { loading, error }] = useMutation4(CREATE_EVENT_MUTATION, {
506
- awaitRefetchQueries: true,
507
- refetchQueries: [{ query: GetUserEventsDocument }]
508
- });
509
- return { createEvent, error, loading };
510
- };
511
- var useUpdateEvent = () => {
512
- const [updateEvent, { loading, error }] = useMutation4(UPDATE_EVENT_MUTATION, {
513
- awaitRefetchQueries: true,
514
- refetchQueries: (mutationResult) => {
515
- const eventId = mutationResult?.data?.updateEvent?.data?._id;
516
- if (!eventId) return [];
517
- return [
518
- {
519
- query: GetUserEventsDocument
520
- },
521
- {
522
- query: GetEventDocument,
523
- variables: { _id: eventId }
524
- },
525
- {
526
- query: GetEventInfoDocument,
527
- variables: { eventId }
528
- }
529
- ];
530
- }
531
- });
532
- return { error, loading, updateEvent };
533
- };
534
- var useDeleteEvent = () => {
535
- const [deleteEvent, { loading, error }] = useMutation4(DELETE_EVENT_MUTATION, {
536
- awaitRefetchQueries: true,
537
- refetchQueries: [{ query: GetUserEventsDocument }]
538
- });
539
- return { deleteEvent, error, loading };
540
- };
541
- var useCreateEventInfo = () => {
542
- const [createEventInfo, { loading, error }] = useMutation4(CREATE_EVENT_INFO_MUTATION, {
543
- awaitRefetchQueries: true,
544
- refetchQueries: (mutationResult) => {
545
- const eventId = mutationResult?.data?.createEventInfo?.data?.eventId;
546
- if (!eventId) return [];
547
- return [
548
- {
549
- query: GetEventInfoDocument,
550
- variables: { eventId }
551
- // Pass the eventId for refetching
552
- },
553
- {
554
- query: GetUserEventsDocument
555
- },
556
- {
557
- query: GetEventDocument,
558
- variables: { _id: eventId }
559
- }
560
- ];
561
- }
562
- });
563
- return { createEventInfo, error, loading };
564
- };
565
- var useUpdateEventInfo = () => {
566
- const [updateEventInfo, { loading, error }] = useMutation4(UPDATE_EVENT_INFO_MUTATION, {
567
- awaitRefetchQueries: true,
568
- refetchQueries: (mutationResult) => {
569
- const eventId = mutationResult?.data?.updateEventInfo?.data?.eventId;
570
- if (!eventId) return [];
571
- return [
572
- {
573
- query: GetEventInfoDocument,
574
- variables: { eventId }
575
- },
576
- {
577
- query: GetEventDocument,
578
- variables: { _id: eventId }
579
- },
580
- {
581
- query: GetUserEventsDocument
582
- }
583
- ];
584
- }
585
- });
586
- return { error, loading, updateEventInfo };
587
- };
588
-
589
- // src/graphql/hooks/event/hooksQuery.ts
590
- import { useQuery as useQuery2 } from "@apollo/client";
591
- var useGetEvents = (dateStatus) => {
592
- const { loading, error, data, refetch } = useQuery2(GetEventsDocument, {
593
- fetchPolicy: "network-only",
594
- variables: { dateStatus }
595
- });
596
- const events = data?.events || [];
597
- return { error, events, loading, refetch };
598
- };
599
- var useGetEvent = (_id) => {
600
- const { loading, error, data, refetch } = useQuery2(GetEventDocument, {
601
- fetchPolicy: "network-only",
602
- skip: !_id,
603
- variables: { _id }
604
- });
605
- const event = data?.event || null;
606
- return { error, event, loading, refetch };
607
- };
608
- var useGetEventByPlaceId = (googlePlaceId) => {
609
- const { loading, error, data, refetch } = useQuery2(GetEventByPlaceIdDocument, {
610
- fetchPolicy: "network-only",
611
- skip: !googlePlaceId,
612
- variables: { googlePlaceId }
613
- });
614
- const eventByPlaceId = data?.eventByPlaceId || null;
615
- return { error, eventByPlaceId, loading, refetch };
616
- };
617
- var useGetEventsByRegion = (region, options, dateStatus) => {
618
- const variables = {
619
- dateStatus,
620
- options,
621
- region
622
- };
623
- const { loading, error, data, refetch, fetchMore } = useQuery2(GetEventsByRegionDocument, {
624
- fetchPolicy: "network-only",
625
- skip: !region || region === "",
626
- variables
627
- });
628
- const eventsByRegion = data?.eventsByRegion || [];
629
- return {
630
- error,
631
- eventsByRegion,
632
- fetchMore,
633
- loading,
634
- refetch
635
- };
636
- };
637
- var useSearchEvents = (region, searchQuery, tags, dateStatus) => {
638
- const normalizedSearch = searchQuery?.trim() ?? "";
639
- const normalizedTags = (tags ?? []).filter(Boolean);
640
- const shouldRunQuery = normalizedSearch.length > 3 || normalizedTags.length > 0;
641
- const { loading, error, data, refetch } = useQuery2(SearchEventsDocument, {
642
- fetchPolicy: "network-only",
643
- skip: !shouldRunQuery,
644
- variables: {
645
- dateStatus,
646
- region,
647
- search: normalizedSearch,
648
- tags: normalizedTags
649
- }
650
- });
651
- return {
652
- error,
653
- eventsSearch: data?.eventsSearch ?? [],
654
- loading,
655
- refetch
656
- };
657
- };
658
- var useGetEventsNearMe = (location, dateStatus) => {
659
- const { loading, error, data, refetch } = useQuery2(GetEventsNearMeDocument, {
660
- fetchPolicy: "network-only",
661
- skip: !location.latitude || !location.longitude,
662
- variables: {
663
- dateStatus,
664
- latitude: location.latitude,
665
- longitude: location.longitude,
666
- radius: location.radius || 1e4
667
- // Default to 10km if no radius is provided
668
- }
669
- });
670
- const eventsNearMe = data?.eventsNearMe || [];
671
- return { error, eventsNearMe, loading, refetch };
672
- };
673
- var useGetEventInfo = (eventId) => {
674
- const { loading, error, data, refetch } = useQuery2(GetEventInfoDocument, {
675
- fetchPolicy: "network-only",
676
- skip: !eventId || eventId === "",
677
- variables: { eventId }
678
- });
679
- const eventInfo = data?.eventInfo;
680
- return { error, eventInfo, loading, refetch };
681
- };
682
-
683
- // src/graphql/hooks/notifications/hooksMutation.ts
684
- import { useMutation as useMutation5 } from "@apollo/client";
685
-
686
- // src/graphql/mutations/notification.ts
687
- import { gql as gql6 } from "@apollo/client";
688
- var CREATE_BULK_NOTIFICATIONS = gql6`
689
- mutation createBulkNotifications($input: CreateBulkNotificationInput!) {
690
- createBulkNotifications(input: $input) {
691
- data
692
- message
693
- }
694
- }
695
- `;
696
- var MARK_NOTIFICATION_READ = gql6`
697
- mutation markNotificationRead($_id: ID!) {
698
- markNotificationRead(_id: $_id) {
699
- data {
700
- ...NotificationFields
701
- }
702
- message
703
- }
704
- }
705
- ${NotificationFieldsFragmentDoc}
706
- `;
707
- var MARK_ALL_NOTIFICATIONS_READ = gql6`
708
- mutation markAllNotificationsRead {
709
- markAllNotificationsRead {
710
- data
711
- message
712
- }
713
- }
714
- `;
715
- var DELETE_NOTIFICATION = gql6`
716
- mutation deleteNotification($_id: ID!) {
717
- deleteNotification(_id: $_id) {
718
- data
719
- message
720
- }
721
- }
722
- `;
723
- var DELETE_ALL_NOTIFICATIONS = gql6`
724
- mutation deleteAllNotifications {
725
- deleteAllNotifications {
726
- data
727
- message
728
- }
729
- }
730
- `;
731
-
732
- // src/graphql/hooks/notifications/hooksMutation.ts
733
- var useCreateBulkNotifications = () => {
734
- const [createBulkNotifications, { loading, error }] = useMutation5(CREATE_BULK_NOTIFICATIONS);
735
- return { createBulkNotifications, error, loading };
736
- };
737
- var useMarkNotificationRead = () => {
738
- const [markNotificationRead, { loading, error }] = useMutation5(MARK_NOTIFICATION_READ, {
739
- refetchQueries: [
740
- {
741
- query: GetUserNotificationsDocument
742
- },
743
- {
744
- query: GetNotificationCountDocument
745
- }
746
- ]
747
- });
748
- return { error, loading, markNotificationRead };
749
- };
750
- var useMarkAllNotificationsRead = () => {
751
- const [markAllNotificationsRead, { loading, error }] = useMutation5(MARK_ALL_NOTIFICATIONS_READ, {
752
- refetchQueries: [
753
- {
754
- query: GetUserNotificationsDocument
755
- },
756
- {
757
- query: GetNotificationCountDocument
758
- }
759
- ]
760
- });
761
- return { error, loading, markAllNotificationsRead };
762
- };
763
- var useDeleteNotification = () => {
764
- const [deleteNotification, { loading, error }] = useMutation5(DELETE_NOTIFICATION, {
765
- refetchQueries: [
766
- {
767
- query: GetUserNotificationsDocument
768
- },
769
- {
770
- query: GetNotificationCountDocument
771
- }
772
- ]
773
- });
774
- return { deleteNotification, error, loading };
775
- };
776
- var useDeleteAllNotifications = () => {
777
- const [deleteAllNotifications, { loading, error }] = useMutation5(DELETE_ALL_NOTIFICATIONS, {
778
- refetchQueries: [
779
- {
780
- query: GetUserNotificationsDocument
781
- },
782
- {
783
- query: GetNotificationCountDocument
784
- }
785
- ]
786
- });
787
- return { deleteAllNotifications, error, loading };
788
- };
789
-
790
- // src/graphql/hooks/notifications/hooksQuery.ts
791
- import { useQuery as useQuery3 } from "@apollo/client";
792
- var useGetUserNotifications = (limit, offset) => {
793
- const { data, loading, error, refetch } = useQuery3(GetUserNotificationsDocument, {
794
- fetchPolicy: "no-cache",
795
- variables: { limit, offset }
796
- });
797
- return {
798
- error,
799
- loading,
800
- notifications: data?.userNotifications || [],
801
- refetch
802
- };
803
- };
804
- var useGetNotificationCount = () => {
805
- const { data, loading, error, refetch } = useQuery3(GetNotificationCountDocument, {
806
- fetchPolicy: "no-cache"
807
- });
808
- return {
809
- error,
810
- loading,
811
- notificationCount: data?.notificationCount || { total: 0, unread: 0 },
812
- refetch
813
- };
814
- };
815
-
816
- // src/graphql/hooks/notifications/hooksSubscription.ts
817
- import { useSubscription as useSubscription2 } from "@apollo/client";
818
-
819
- // src/graphql/subscriptions/notification.ts
820
- import { gql as gql7 } from "@apollo/client";
821
- var GET_NOTIFICATIONS_SUBSCRIPTION = gql7`
822
- subscription UserNotificationsSubscription {
823
- getUserNotifications {
824
- ...NotificationFields
825
- }
826
- }
827
- ${NotificationFieldsFragmentDoc}
828
- `;
829
- var GET_NOTIFICATION_COUNT_SUBSCRIPTION = gql7`
830
- subscription NotificationCountSubscription {
831
- getNotificationCount {
832
- total
833
- unread
834
- }
835
- }
836
- `;
837
-
838
- // src/graphql/hooks/notifications/hooksSubscription.ts
839
- var useGetUserNotificationsSubscription = () => {
840
- const { data, loading, error } = useSubscription2(GET_NOTIFICATIONS_SUBSCRIPTION, {
841
- fetchPolicy: "no-cache",
842
- shouldResubscribe: true
843
- });
844
- return {
845
- error,
846
- loading,
847
- notifications: data?.getUserNotifications
848
- };
849
- };
850
- var useGetNotificationCountSubscription = () => {
851
- const { data, loading, error } = useSubscription2(GET_NOTIFICATION_COUNT_SUBSCRIPTION, {
852
- fetchPolicy: "no-cache",
853
- shouldResubscribe: true
854
- });
855
- return {
856
- error,
857
- loading,
858
- notificationCount: data?.getNotificationCount
859
- };
860
- };
861
-
862
- // src/graphql/hooks/poster.ts
863
- import { useMutation as useMutation6 } from "@apollo/client";
864
-
865
- // src/graphql/mutations/poster.ts
866
- import { gql as gql8 } from "@apollo/client";
867
- var CREATE_POSTER_MUTATION = gql8`
868
- mutation createPoster($input: PosterInputType!) {
869
- createPoster(input: $input) {
870
- data {
871
- posterUsage {
872
- ...PosterUsageFields
873
- }
874
- }
875
- message
876
- }
877
- }
878
- ${PosterUsageFieldsFragmentDoc}
879
- `;
880
-
881
- // src/graphql/hooks/poster.ts
882
- var useCreatePoster = () => {
883
- const [createPoster, { loading, error }] = useMutation6(CREATE_POSTER_MUTATION, {
884
- refetchQueries: [
885
- { query: GetUserEventsDocument },
886
- { query: GetUserVendorsDocument }
887
- ]
888
- });
889
- return { createPoster, error, loading };
890
- };
891
-
892
- // src/graphql/hooks/pushToken.ts
893
- import { useMutation as useMutation7 } from "@apollo/client";
894
-
895
- // src/graphql/mutations/pushToken.ts
896
- import { gql as gql9 } from "@apollo/client";
897
- var CREATE_PUSH_TOKEN_MUTATION = gql9`
898
- mutation createPushToken($input: PushTokenInput!) {
899
- createPushToken(input: $input) {
900
- data {
901
- success
902
- }
903
- message
904
- }
905
- }
906
- `;
907
-
908
- // src/graphql/hooks/pushToken.ts
909
- var useCreatePushToken = () => {
910
- const [createPushToken, { loading, error }] = useMutation7(CREATE_PUSH_TOKEN_MUTATION);
911
- return { createPushToken, error, loading };
912
- };
913
-
914
- // src/graphql/hooks/relation/hooksMutation.ts
915
- import { useMutation as useMutation8 } from "@apollo/client";
916
-
917
- // src/graphql/mutations/relation.ts
918
- import { gql as gql10 } from "@apollo/client";
919
- var CREATE_RELATION_MUTATION = gql10`
920
- mutation createRelation($input: RelationInputType!) {
921
- createRelation(input: $input) {
922
- data {
923
- ...RelationFields
924
- }
925
- message
926
- }
927
- }
928
- ${RelationFieldsFragmentDoc}
929
- `;
930
- var UPDATE_RELATION_MUTATION = gql10`
931
- mutation updateRelation($_id: ID!, $input: RelationInputType!) {
932
- updateRelation(_id: $_id, input: $input) {
933
- data {
934
- ...RelationFields
935
- }
936
- message
937
- }
938
- }
939
- ${RelationFieldsFragmentDoc}
940
- `;
941
- var DELETE_RELATION_MUTATION = gql10`
942
- mutation deleteRelation($_id: ID!) {
943
- deleteRelation(_id: $_id) {
944
- data {
945
- ...RelationFields
946
- }
947
- message
948
- }
949
- }
950
- ${RelationFieldsFragmentDoc}
951
- `;
952
-
953
- // src/graphql/hooks/relation/hooksMutation.ts
954
- var useCreateRelation = () => {
955
- const [createRelation, { loading, error }] = useMutation8(CREATE_RELATION_MUTATION, {
956
- awaitRefetchQueries: true,
957
- refetchQueries: (mutationResult) => {
958
- const createRelation2 = mutationResult?.data?.createRelation?.data;
959
- const eventId = createRelation2?.eventId;
960
- const vendorId = createRelation2?.vendorId;
961
- const resourceType = createRelation2?.lastUpdateBy;
962
- const resourceId = resourceType === "event" /* Event */ ? eventId : vendorId;
963
- return [
964
- {
965
- query: GetEventRelationsDocument,
966
- variables: { eventId }
967
- },
968
- {
969
- query: GetEventDocument,
970
- variables: { _id: eventId }
971
- },
972
- {
973
- query: GetEventInfoDocument,
974
- variables: { eventId }
975
- },
976
- {
977
- query: GetVendorRelationsDocument,
978
- variables: { vendorId }
979
- },
980
- {
981
- query: GetVendorDocument,
982
- variables: { _id: vendorId }
983
- },
984
- {
985
- query: GetRelationByEventAndVendorDocument,
986
- variables: { eventId, vendorId }
987
- },
988
- {
989
- query: GetResourceConnectionsDocument,
990
- variables: { resourceId, resourceType }
991
- },
992
- {
993
- query: UserChatsDocument
994
- }
995
- ];
996
- }
997
- });
998
- return { createRelation, error, loading };
999
- };
1000
- var useUpdateRelation = () => {
1001
- const [updateRelation, { loading, error }] = useMutation8(UPDATE_RELATION_MUTATION, {
1002
- awaitRefetchQueries: true,
1003
- refetchQueries: (mutationResult) => {
1004
- const updateRelation2 = mutationResult?.data?.updateRelation?.data;
1005
- const eventId = updateRelation2?.eventId;
1006
- const vendorId = updateRelation2?.vendorId;
1007
- const resourceType = updateRelation2?.lastUpdateBy;
1008
- const resourceId = resourceType === "event" /* Event */ ? eventId : vendorId;
1009
- return [
1010
- {
1011
- query: GetEventRelationsDocument,
1012
- variables: { eventId }
1013
- },
1014
- {
1015
- query: GetEventDocument,
1016
- variables: { _id: eventId }
1017
- },
1018
- {
1019
- query: GetEventInfoDocument,
1020
- variables: { eventId }
1021
- },
1022
- {
1023
- query: GetVendorRelationsDocument,
1024
- variables: { vendorId }
1025
- },
1026
- {
1027
- query: GetVendorDocument,
1028
- variables: { _id: vendorId }
1029
- },
1030
- {
1031
- query: GetRelationByEventAndVendorDocument,
1032
- variables: { eventId, vendorId }
1033
- },
1034
- {
1035
- query: GetResourceConnectionsDocument,
1036
- variables: { resourceId, resourceType }
1037
- }
1038
- ];
1039
- }
1040
- });
1041
- return { error, loading, updateRelation };
1042
- };
1043
- var useDeleteRelation = () => {
1044
- const [deleteRelation, { loading, error }] = useMutation8(DELETE_RELATION_MUTATION, {
1045
- awaitRefetchQueries: true,
1046
- refetchQueries: (mutationResult) => {
1047
- const deleteRelation2 = mutationResult?.data?.deleteRelation?.data;
1048
- const eventId = deleteRelation2?.eventId;
1049
- const vendorId = deleteRelation2?.vendorId;
1050
- const resourceType = deleteRelation2?.lastUpdateBy;
1051
- const resourceId = resourceType === "event" /* Event */ ? eventId : vendorId;
1052
- return [
1053
- {
1054
- query: GetEventInfoDocument,
1055
- variables: { eventId }
1056
- },
1057
- {
1058
- query: GetEventRelationsDocument,
1059
- variables: { eventId }
1060
- },
1061
- {
1062
- query: GetVendorRelationsDocument,
1063
- variables: { vendorId }
1064
- },
1065
- {
1066
- query: GetRelationByEventAndVendorDocument,
1067
- variables: { eventId, vendorId }
1068
- },
1069
- {
1070
- query: GetResourceConnectionsDocument,
1071
- variables: { resourceId, resourceType }
1072
- },
1073
- {
1074
- query: UserChatsDocument
1075
- }
1076
- ];
1077
- }
1078
- });
1079
- return { deleteRelation, error, loading };
1080
- };
1081
-
1082
- // src/graphql/hooks/relation/hooksQuery.ts
1083
- import { useQuery as useQuery4 } from "@apollo/client";
1084
- var useGetRelation = (_id) => {
1085
- const { loading, error, data, refetch } = useQuery4(GetRelationDocument, {
1086
- fetchPolicy: "network-only",
1087
- skip: !_id,
1088
- variables: _id ? { _id } : void 0
1089
- });
1090
- const relation = data?.relation;
1091
- return { error, loading, refetch, relation };
1092
- };
1093
- var useGetRelationByEventAndVendor = (eventId, vendorId) => {
1094
- const { loading, error, data, refetch } = useQuery4(GetRelationByEventAndVendorDocument, {
1095
- fetchPolicy: "network-only",
1096
- skip: !eventId || eventId === "" || !vendorId || vendorId === "",
1097
- variables: { eventId, vendorId }
1098
- });
1099
- const relationByEventAndVendor = data?.relationByEventAndVendor;
1100
- return { error, loading, refetch, relationByEventAndVendor };
1101
- };
1102
- var useGetEventRelations = (eventId) => {
1103
- const { loading, error, data, refetch } = useQuery4(GetEventRelationsDocument, {
1104
- fetchPolicy: "network-only",
1105
- skip: !eventId || eventId === "",
1106
- variables: { eventId }
1107
- });
1108
- const eventRelations = data?.eventRelations || [];
1109
- return { error, eventRelations, loading, refetch };
1110
- };
1111
- var useGetVendorRelations = (vendorId) => {
1112
- const { loading, error, data, refetch } = useQuery4(GetVendorRelationsDocument, {
1113
- fetchPolicy: "network-only",
1114
- skip: !vendorId || vendorId === "",
1115
- variables: { vendorId }
1116
- });
1117
- const vendorRelations = data?.vendorRelations || [];
1118
- return { error, loading, refetch, vendorRelations };
1119
- };
1120
- var useGetResourceConnections = (resourceId, resourceType) => {
1121
- const { loading, error, data, refetch } = useQuery4(GetResourceConnectionsDocument, {
1122
- fetchPolicy: "network-only",
1123
- skip: !resourceId || resourceId === "" || !resourceType,
1124
- variables: { resourceId, resourceType }
1125
- });
1126
- const resourceConnections = data?.resourceConnections;
1127
- return { error, loading, refetch, resourceConnections };
1128
- };
1129
-
1130
- // src/graphql/hooks/vendor/hooksMutation.ts
1131
- import { useMutation as useMutation9 } from "@apollo/client";
1132
-
1133
- // src/graphql/mutations/vendor.ts
1134
- import { gql as gql11 } from "@apollo/client";
1135
- var CREATE_VENDOR_MUTATION = gql11`
1136
- mutation createVendor($input: VendorInputType!) {
1137
- createVendor(input: $input) {
1138
- data {
1139
- ...VendorFields
1140
- }
1141
- message
1142
- }
1143
- }
1144
- ${VendorFieldsFragmentDoc}
1145
- `;
1146
- var UPDATE_VENDOR_MUTATION = gql11`
1147
- mutation updateVendor($_id: ID!, $input: VendorInputType!) {
1148
- updateVendor(_id: $_id, input: $input) {
1149
- data {
1150
- ...VendorFields
1151
- }
1152
- message
1153
- }
1154
- }
1155
- ${VendorFieldsFragmentDoc}
1156
- `;
1157
- var DELETE_VENDOR_MUTATION = gql11`
1158
- mutation deleteVendor($_id: ID!) {
1159
- deleteVendor(_id: $_id) {
1160
- data
1161
- message
1162
- }
1163
- }
1164
- `;
1165
- var CREATE_VENDOR_INFO_MUTATION = gql11`
1166
- mutation createVendorInfo($input: VendorInfoInputType!) {
1167
- createVendorInfo(input: $input) {
1168
- data {
1169
- ...VendorInfoFields
1170
- }
1171
- message
1172
- }
1173
- }
1174
- ${VendorInfoFieldsFragmentDoc}
1175
- `;
1176
- var UPDATE_VENDOR_INFO_MUTATION = gql11`
1177
- mutation updateVendorInfo($_id: ID!, $input: VendorInfoInputType!) {
1178
- updateVendorInfo(_id: $_id, input: $input) {
1179
- data {
1180
- ...VendorInfoFields
1181
- }
1182
- message
1183
- }
1184
- }
1185
- ${VendorInfoFieldsFragmentDoc}
1186
- `;
1187
- var CREATE_UNREGISTERED_VENDOR_MUTATION = gql11`
1188
- mutation createUnregisteredVendor($input: UnregisteredVendorInputType!) {
1189
- createUnregisteredVendor(input: $input) {
1190
- data {
1191
- ...UnregisteredVendorFields
1192
- }
1193
- message
1194
- }
1195
- }
1196
- ${UnregisteredVendorFieldsFragmentDoc}
1197
- `;
1198
- var UPDATE_UNREGISTERED_VENDOR_MUTATION = gql11`
1199
- mutation updateUnregisteredVendor(
1200
- $_id: ID!
1201
- $input: UnregisteredVendorInputType!
1202
- ) {
1203
- updateUnregisteredVendor(_id: $_id, input: $input) {
1204
- data {
1205
- ...UnregisteredVendorFields
1206
- }
1207
- message
1208
- }
1209
- }
1210
- ${UnregisteredVendorFieldsFragmentDoc}
1211
- `;
1212
- var DELETE_UNREGISTERED_VENDOR_MUTATION = gql11`
1213
- mutation deleteUnregisteredVendor($_id: ID!) {
1214
- deleteUnregisteredVendor(_id: $_id) {
1215
- data
1216
- message
1217
- }
1218
- }
1219
- `;
1220
- var UNLINK_UNREGISTERED_VENDOR_BY_INVITER_ID_MUTATION = gql11`
1221
- mutation unlinkUnregisteredVendorByInviterId($_id: ID!, $inviterId: ID!) {
1222
- unlinkUnregisteredVendorByInviterId(_id: $_id, inviterId: $inviterId) {
1223
- data
1224
- message
1225
- }
1226
- }
1227
- `;
1228
-
1229
- // src/graphql/hooks/vendor/hooksMutation.ts
1230
- var useCreateVendor = () => {
1231
- const [createVendor, { loading, error }] = useMutation9(CREATE_VENDOR_MUTATION, {
1232
- awaitRefetchQueries: true,
1233
- refetchQueries: [{ query: GetUserVendorsDocument }]
1234
- });
1235
- return { createVendor, error, loading };
1236
- };
1237
- var useUpdateVendor = () => {
1238
- const [updateVendor, { loading, error }] = useMutation9(UPDATE_VENDOR_MUTATION, {
1239
- awaitRefetchQueries: true,
1240
- refetchQueries: [{ query: GetUserVendorsDocument }]
1241
- });
1242
- return { error, loading, updateVendor };
1243
- };
1244
- var useDeleteVendor = () => {
1245
- const [deleteVendor, { loading, error }] = useMutation9(DELETE_VENDOR_MUTATION, {
1246
- awaitRefetchQueries: true,
1247
- refetchQueries: [{ query: GetUserVendorsDocument }]
1248
- });
1249
- return { deleteVendor, error, loading };
1250
- };
1251
- var useCreateVendorInfo = () => {
1252
- const [createVendorInfo, { loading, error }] = useMutation9(CREATE_VENDOR_INFO_MUTATION, {
1253
- awaitRefetchQueries: true,
1254
- refetchQueries: (mutationResult) => {
1255
- const vendorId = mutationResult?.data?.createVendorInfo?.data?.vendorId;
1256
- if (!vendorId) return [];
1257
- return [
1258
- {
1259
- query: GetVendorInfoDocument,
1260
- variables: { vendorId }
1261
- // Pass the vendorId for refetching
1262
- },
1263
- {
1264
- query: GetUserVendorsDocument
1265
- },
1266
- {
1267
- query: GetVendorDocument,
1268
- variables: { _id: vendorId }
1269
- }
1270
- ];
1271
- }
1272
- });
1273
- return { createVendorInfo, error, loading };
1274
- };
1275
- var useUpdateVendorInfo = () => {
1276
- const [updateVendorInfo, { loading, error }] = useMutation9(UPDATE_VENDOR_INFO_MUTATION, {
1277
- awaitRefetchQueries: true,
1278
- refetchQueries: (mutationResult) => {
1279
- const vendorId = mutationResult?.data?.updateVendorInfo?.data?.vendorId;
1280
- if (!vendorId) return [];
1281
- return [
1282
- {
1283
- query: GetVendorInfoDocument,
1284
- variables: { vendorId }
1285
- // Pass the vendorId for refetching
1286
- }
1287
- ];
1288
- }
1289
- });
1290
- return { error, loading, updateVendorInfo };
1291
- };
1292
- var useCreateUnregisteredVendor = () => {
1293
- const [createUnregisteredVendor, { loading, error }] = useMutation9(CREATE_UNREGISTERED_VENDOR_MUTATION);
1294
- return { createUnregisteredVendor, error, loading };
1295
- };
1296
- var useUpdateUnregisteredVendor = () => {
1297
- const [updateUnregisteredVendor, { loading, error }] = useMutation9(UPDATE_UNREGISTERED_VENDOR_MUTATION);
1298
- return { error, loading, updateUnregisteredVendor };
1299
- };
1300
- var useDeleteUnregisteredVendor = () => {
1301
- const [deleteUnregisteredVendor, { loading, error }] = useMutation9(DELETE_UNREGISTERED_VENDOR_MUTATION);
1302
- return { deleteUnregisteredVendor, error, loading };
1303
- };
1304
- var useUnlinkUnregisteredVendorByInviterId = () => {
1305
- const [unlinkUnregisteredVendorByInviterId, { loading, error }] = useMutation9(UNLINK_UNREGISTERED_VENDOR_BY_INVITER_ID_MUTATION);
1306
- return { error, loading, unlinkUnregisteredVendorByInviterId };
1307
- };
1308
-
1309
- // src/graphql/hooks/vendor/hooksQuery.ts
1310
- import { useQuery as useQuery5 } from "@apollo/client";
1311
- var useGetVendors = () => {
1312
- const { loading, error, data, refetch } = useQuery5(
1313
- GetVendorsDocument,
1314
- {
1315
- fetchPolicy: "network-only"
1316
- }
1317
- );
1318
- const vendors = data?.vendors || [];
1319
- return {
1320
- error,
1321
- loading,
1322
- refetch,
1323
- vendors
1324
- };
1325
- };
1326
- var useGetVendor = (_id) => {
1327
- const { loading, error, data, refetch } = useQuery5(
1328
- GetVendorDocument,
1329
- {
1330
- fetchPolicy: "network-only",
1331
- skip: !_id || _id === "",
1332
- variables: { _id }
1333
- }
1334
- );
1335
- const vendor = data?.vendor;
1336
- return { error, loading, refetch, vendor };
1337
- };
1338
- var useGetVendorsByRegion = (region, options) => {
1339
- const variables = {
1340
- options,
1341
- region
1342
- };
1343
- const { loading, error, data, refetch, fetchMore } = useQuery5(GetVendorsByRegionDocument, {
1344
- fetchPolicy: "network-only",
1345
- variables
1346
- });
1347
- const vendorsByRegion = data?.vendorsByRegion || [];
1348
- return {
1349
- error,
1350
- fetchMore,
1351
- loading,
1352
- refetch,
1353
- vendorsByRegion
1354
- };
1355
- };
1356
- var useSearchVendors = (search, region) => {
1357
- const { loading, error, data, refetch } = useQuery5(SearchVendorsDocument, {
1358
- fetchPolicy: "network-only",
1359
- skip: search.length < 3,
1360
- variables: { region, search }
1361
- });
1362
- const vendorSearch = data?.vendorSearch || [];
1363
- return { error, loading, refetch, vendorSearch };
1364
- };
1365
- var useGetVendorInfo = (vendorId) => {
1366
- const { loading, error, data, refetch } = useQuery5(GetVendorInfoDocument, {
1367
- fetchPolicy: "network-only",
1368
- skip: !vendorId || vendorId === "",
1369
- variables: { vendorId }
1370
- });
1371
- const vendorInfo = data?.vendorInfo;
1372
- return {
1373
- error,
1374
- loading,
1375
- refetch,
1376
- vendorInfo
1377
- };
1378
- };
1379
- var useGetUnregisteredVendors = () => {
1380
- const { loading, error, data, refetch } = useQuery5(GetUnregisteredVendorsDocument, {
1381
- fetchPolicy: "network-only"
1382
- });
1383
- const unregisteredVendors = data?.unregisteredVendors || [];
1384
- return {
1385
- error,
1386
- loading,
1387
- refetch,
1388
- unregisteredVendors
1389
- };
1390
- };
1391
- var useGetUnregisteredVendorsByInviterId = (inviterId) => {
1392
- const { loading, error, data, refetch } = useQuery5(GetUnregisteredVendorsByInviterIdDocument, {
1393
- fetchPolicy: "network-only",
1394
- skip: !inviterId || inviterId === "",
1395
- variables: { inviterId }
1396
- });
1397
- const unregisteredVendorsByInviterId = data?.unregisteredVendorsByInviterId || [];
1398
- return { error, loading, refetch, unregisteredVendorsByInviterId };
1399
- };
1400
- var useGetUnregisteredVendor = (_id) => {
1401
- const { loading, error, data, refetch } = useQuery5(GetUnregisteredVendorDocument, {
1402
- fetchPolicy: "network-only",
1403
- skip: !_id || _id === "",
1404
- variables: { _id }
1405
- });
1406
- const unregisteredVendor = data?.unregisteredVendor;
1407
- return { error, loading, refetch, unregisteredVendor };
1408
- };
1409
-
1410
- // src/graphql/hooks/user/hooksMutation.ts
1411
- import { useMutation as useMutation10 } from "@apollo/client";
1412
-
1413
- // src/graphql/mutations/user.ts
1414
- import { gql as gql12 } from "@apollo/client";
1415
- var UPDATE_USER_MUTATION = gql12`
1416
- mutation updateUser($_id: ID!, $input: UserInputType!) {
1417
- updateUser(_id: $_id, input: $input) {
1418
- data {
1419
- ...UserFields
1420
- }
1421
- message
1422
- }
1423
- }
1424
- ${UserFieldsFragmentDoc}
1425
- `;
1426
- var DELETE_USER_MUTATION = gql12`
1427
- mutation deleteUser($email: String!) {
1428
- deleteUser(email: $email) {
1429
- data
1430
- message
1431
- }
1432
- }
1433
- `;
1434
- var REDEEM_REWARD_MUTATION = gql12`
1435
- mutation redeemReward($input: RedeemRewardInputType!) {
1436
- redeemReward(input: $input) {
1437
- data {
1438
- userId
1439
- }
1440
- message
1441
- }
1442
- }
1443
- `;
1444
- var ADD_USER_FAVOURITE_RESOURCE_MUTATION = gql12`
1445
- mutation addUserFavouriteResource(
1446
- $resourceId: ID!
1447
- $resourceType: ResourceTypeEnum!
1448
- ) {
1449
- addUserFavouriteResource(
1450
- resourceId: $resourceId
1451
- resourceType: $resourceType
1452
- ) {
1453
- data {
1454
- ...UserFields
1455
- }
1456
- message
1457
- }
1458
- }
1459
- ${UserFieldsFragmentDoc}
1460
- `;
1461
- var REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = gql12`
1462
- mutation removeUserFavouriteResource(
1463
- $resourceId: ID!
1464
- $resourceType: ResourceTypeEnum!
1465
- ) {
1466
- removeUserFavouriteResource(
1467
- resourceId: $resourceId
1468
- resourceType: $resourceType
1469
- ) {
1470
- data {
1471
- ...UserFields
1472
- }
1473
- message
1474
- }
1475
- }
1476
- ${UserFieldsFragmentDoc}
1477
- `;
1478
- var ADD_USER_INTEREST_RESOURCE_MUTATION = gql12`
1479
- mutation addUserInterestResource($input: UserActivityInputType!) {
1480
- addUserInterestResource(input: $input) {
1481
- data {
1482
- ...UserFields
1483
- }
1484
- message
1485
- }
1486
- }
1487
- ${UserFieldsFragmentDoc}
1488
- `;
1489
- var REMOVE_USER_INTEREST_RESOURCE_MUTATION = gql12`
1490
- mutation removeUserInterestResource($input: UserActivityInputType!) {
1491
- removeUserInterestResource(input: $input) {
1492
- data {
1493
- ...UserFields
1494
- }
1495
- message
1496
- }
1497
- }
1498
- ${UserFieldsFragmentDoc}
1499
- `;
1500
- var ADD_USER_GOING_RESOURCE_MUTATION = gql12`
1501
- mutation addUserGoingResource($input: UserActivityInputType!) {
1502
- addUserGoingResource(input: $input) {
1503
- data {
1504
- ...UserFields
1505
- }
1506
- message
1507
- }
1508
- }
1509
- ${UserFieldsFragmentDoc}
1510
- `;
1511
- var REMOVE_USER_GOING_RESOURCE_MUTATION = gql12`
1512
- mutation removeUserGoingResource($input: UserActivityInputType!) {
1513
- removeUserGoingResource(input: $input) {
1514
- data {
1515
- ...UserFields
1516
- }
1517
- message
1518
- }
1519
- }
1520
- ${UserFieldsFragmentDoc}
1521
- `;
1522
- var ADD_USER_PRESENT_RESOURCE_MUTATION = gql12`
1523
- mutation addUserPresentResource($input: UserActivityInputType!) {
1524
- addUserPresentResource(input: $input) {
1525
- data {
1526
- ...UserFields
1527
- }
1528
- message
1529
- }
1530
- }
1531
- ${UserFieldsFragmentDoc}
1532
- `;
1533
- var REMOVE_USER_PRESENT_RESOURCE_MUTATION = gql12`
1534
- mutation removeUserPresentResource($input: UserActivityInputType!) {
1535
- removeUserPresentResource(input: $input) {
1536
- data {
1537
- ...UserFields
1538
- }
1539
- message
1540
- }
1541
- }
1542
- ${UserFieldsFragmentDoc}
1543
- `;
1544
- var SELECT_STANDARD_PACKAGE_MUTATION = gql12`
1545
- mutation selectStandardPackage($selectedLicence: LicencesEnumType!) {
1546
- selectStandardPackage(selectedLicence: $selectedLicence) {
1547
- data {
1548
- licences {
1549
- ...LicenceFields
1550
- }
1551
- userId
1552
- }
1553
- message
1554
- }
1555
- }
1556
- ${LicenceFieldsFragmentDoc}
1557
- `;
1558
-
1559
- // src/graphql/hooks/user/hooksMutation.ts
1560
- var useUpdateUser = () => {
1561
- const [updateUser, { loading, error }] = useMutation10(UPDATE_USER_MUTATION, {
1562
- awaitRefetchQueries: true,
1563
- refetchQueries: (mutationResult) => {
1564
- const userId = mutationResult?.data?.updateUser?.data?._id;
1565
- if (!userId) return [];
1566
- return [{ query: GetUserDocument, variables: { _id: userId } }];
1567
- }
1568
- });
1569
- return { error, loading, updateUser };
1570
- };
1571
- var useDeleteUser = () => {
1572
- const [deleteUser, { loading, error }] = useMutation10(DELETE_USER_MUTATION);
1573
- return { deleteUser, error, loading };
1574
- };
1575
- var useRedeemReward = () => {
1576
- const [redeemReward, { loading, error }] = useMutation10(REDEEM_REWARD_MUTATION, {
1577
- awaitRefetchQueries: true,
1578
- refetchQueries: (mutationResult) => {
1579
- const userId = mutationResult?.data?.redeemReward?.data?.userId;
1580
- if (!userId) return [];
1581
- return [
1582
- {
1583
- query: GetUserDocument,
1584
- variables: { _id: userId }
1585
- // Pass the userId for refetching
1586
- }
1587
- ];
1588
- }
1589
- });
1590
- return { error, loading, redeemReward };
1591
- };
1592
- var useAddUserFavouriteResource = () => {
1593
- const [addUserFavouriteResource, { loading, error }] = useMutation10(ADD_USER_FAVOURITE_RESOURCE_MUTATION, {
1594
- awaitRefetchQueries: true,
1595
- refetchQueries: [{ query: GetUserActivitiesDocument }]
1596
- });
1597
- return { addUserFavouriteResource, error, loading };
1598
- };
1599
- var useRemoveUserFavouriteResource = () => {
1600
- const [removeUserFavouriteResource, { loading, error }] = useMutation10(REMOVE_USER_FAVOURITE_RESOURCE_MUTATION, {
1601
- awaitRefetchQueries: true,
1602
- refetchQueries: [{ query: GetUserActivitiesDocument }]
1603
- });
1604
- return { error, loading, removeUserFavouriteResource };
1605
- };
1606
- var useAddUserInterestResource = () => {
1607
- const [addUserInterestResource, { loading, error }] = useMutation10(ADD_USER_INTEREST_RESOURCE_MUTATION, {
1608
- awaitRefetchQueries: true,
1609
- refetchQueries: [{ query: GetUserActivitiesDocument }]
1610
- });
1611
- return { addUserInterestResource, error, loading };
1612
- };
1613
- var useRemoveUserInterestResource = () => {
1614
- const [removeUserInterestResource, { loading, error }] = useMutation10(REMOVE_USER_INTEREST_RESOURCE_MUTATION, {
1615
- awaitRefetchQueries: true,
1616
- refetchQueries: [{ query: GetUserActivitiesDocument }]
1617
- });
1618
- return { error, loading, removeUserInterestResource };
1619
- };
1620
- var useAddUserGoingResource = () => {
1621
- const [addUserGoingResource, { loading, error }] = useMutation10(ADD_USER_GOING_RESOURCE_MUTATION, {
1622
- awaitRefetchQueries: true,
1623
- refetchQueries: [{ query: GetUserActivitiesDocument }]
1624
- });
1625
- return { addUserGoingResource, error, loading };
1626
- };
1627
- var useRemoveUserGoingResource = () => {
1628
- const [removeUserGoingResource, { loading, error }] = useMutation10(REMOVE_USER_GOING_RESOURCE_MUTATION, {
1629
- awaitRefetchQueries: true,
1630
- refetchQueries: [{ query: GetUserActivitiesDocument }]
1631
- });
1632
- return { error, loading, removeUserGoingResource };
1633
- };
1634
- var useAddUserPresentResource = () => {
1635
- const [addUserPresentResource, { loading, error }] = useMutation10(ADD_USER_PRESENT_RESOURCE_MUTATION, {
1636
- awaitRefetchQueries: true,
1637
- refetchQueries: [{ query: GetUserActivitiesDocument }]
1638
- });
1639
- return { addUserPresentResource, error, loading };
1640
- };
1641
- var useRemoveUserPresentResource = () => {
1642
- const [removeUserPresentResource, { loading, error }] = useMutation10(REMOVE_USER_PRESENT_RESOURCE_MUTATION, {
1643
- awaitRefetchQueries: true,
1644
- refetchQueries: [{ query: GetUserActivitiesDocument }]
1645
- });
1646
- return { error, loading, removeUserPresentResource };
1647
- };
1648
- var useSelectStandardPackage = () => {
1649
- const [selectStandardPackage, { loading, error }] = useMutation10(SELECT_STANDARD_PACKAGE_MUTATION, {
1650
- awaitRefetchQueries: true,
1651
- refetchQueries: (mutationResult) => {
1652
- const userId = mutationResult?.data?.selectStandardPackage?.data?.userId;
1653
- if (!userId) return [];
1654
- return [
1655
- { query: GetUserDocument, variables: { _id: userId } },
1656
- { query: GetUserEventsDocument },
1657
- { query: GetUserVendorsDocument }
1658
- ];
1659
- }
1660
- });
1661
- return { error, loading, selectStandardPackage };
1662
- };
1663
-
1664
- // src/graphql/hooks/ad/hooksMutation.ts
1665
- import { useMutation as useMutation11 } from "@apollo/client";
1666
- var useCreateAd = () => {
1667
- const [createAd, { loading, error }] = useMutation11(CreateAdDocument, {
1668
- awaitRefetchQueries: true,
1669
- refetchQueries: [{ query: GetAdsDocument }]
1670
- });
1671
- return {
1672
- createAd,
1673
- error,
1674
- loading
1675
- };
1676
- };
1677
- var useUpdateAd = () => {
1678
- const [updateAd, { loading, error }] = useMutation11(UpdateAdDocument, {
1679
- awaitRefetchQueries: true,
1680
- refetchQueries: [{ query: GetAdsDocument }]
1681
- });
1682
- return {
1683
- error,
1684
- loading,
1685
- updateAd
1686
- };
1687
- };
1688
- var useDeleteAd = () => {
1689
- const [deleteAd, { loading, error }] = useMutation11(DeleteAdDocument, {
1690
- awaitRefetchQueries: true,
1691
- refetchQueries: [{ query: GetAdsDocument }]
1692
- });
1693
- return {
1694
- deleteAd,
1695
- error,
1696
- loading
1697
- };
1698
- };
1699
-
1700
- // src/graphql/hooks/ad/hooksQuery.ts
1701
- import { useQuery as useQuery6 } from "@apollo/client";
1702
- var useGetAds = () => {
1703
- const { data, loading, error, refetch } = useQuery6(
1704
- GetAdsDocument,
1705
- {
1706
- fetchPolicy: "no-cache"
1707
- }
1708
- );
1709
- return {
1710
- ads: data?.ads || [],
1711
- error,
1712
- loading,
1713
- refetch
1714
- };
1715
- };
1716
- var useGetAd = (_id) => {
1717
- const { data, loading, error, refetch } = useQuery6(
1718
- GetAdDocument,
1719
- {
1720
- fetchPolicy: "no-cache",
1721
- skip: !_id || _id === "",
1722
- variables: { _id }
1723
- }
1724
- );
1725
- return {
1726
- ad: data?.ad,
1727
- error,
1728
- loading,
1729
- refetch
1730
- };
1731
- };
1732
- var useGetAdsByRegion = (region, status) => {
1733
- const { data, loading, error, refetch } = useQuery6(GetAdsByRegionDocument, {
1734
- fetchPolicy: "no-cache",
1735
- skip: !region || region === "",
1736
- variables: { region, status }
1737
- });
1738
- return {
1739
- adsByRegion: data?.adsByRegion || [],
1740
- error,
1741
- loading,
1742
- refetch
1743
- };
1744
- };
1745
-
1746
- // src/graphql/hooks/resourceActivities/hooksMutation.ts
1747
- import { useMutation as useMutation12 } from "@apollo/client";
1748
-
1749
- // src/graphql/mutations/resourceActivities.ts
1750
- import { gql as gql13 } from "@apollo/client";
1751
- var CREATE_RESOURCE_ACTIVITY_MUTATION = gql13`
1752
- mutation createResourceActivity($input: ResourceActivityInputType!) {
1753
- createResourceActivity(input: $input) {
1754
- data
1755
- message
1756
- }
1757
- }
1758
- `;
1759
-
1760
- // src/graphql/hooks/resourceActivities/hooksMutation.ts
1761
- var useCreateResourceActivity = () => {
1762
- const [createResourceActivity, { loading, error }] = useMutation12(CREATE_RESOURCE_ACTIVITY_MUTATION);
1763
- return { createResourceActivity, error, loading };
1764
- };
1765
-
1766
- // src/graphql/hooks/resourceActivities/hooksQuery.ts
1767
- import { useQuery as useQuery7 } from "@apollo/client";
1768
- var useGetResourceActivity = (resourceId, resourceType) => {
1769
- const { data, loading, error, refetch } = useQuery7(GetResourceActivityDocument, {
1770
- fetchPolicy: "network-only",
1771
- variables: { resourceId, resourceType }
1772
- });
1773
- return {
1774
- error,
1775
- loading,
1776
- refetch,
1777
- resourceActivity: data?.resourceActivity || null
1778
- };
1779
- };
1780
-
1781
- // src/graphql/hooks/stripe/hooksMutation.ts
1782
- import { useMutation as useMutation13 } from "@apollo/client";
1783
-
1784
- // src/graphql/mutations/stripe.ts
1785
- import { gql as gql14 } from "@apollo/client";
1786
- var CREATE_CHECKOUT_SESSION_MUTATION = gql14`
1787
- mutation createCheckoutSession(
1788
- $planId: LicencesEnumType!
1789
- $billingPeriod: BillingPeriodEnumType
1790
- ) {
1791
- createCheckoutSession(planId: $planId, billingPeriod: $billingPeriod) {
1792
- data {
1793
- sessionId
1794
- checkoutUrl
1795
- }
1796
- message
1797
- }
1798
- }
1799
- `;
1800
- var CANCEL_SUBSCRIPTION_MUTATION = gql14`
1801
- mutation cancelSubscription {
1802
- cancelSubscription {
1803
- data
1804
- message
1805
- }
1806
- }
1807
- `;
1808
- var UPDATE_SUBSCRIPTION_PLAN_MUTATION = gql14`
1809
- mutation updateSubscriptionPlan(
1810
- $newPlanId: LicencesEnumType!
1811
- $billingPeriod: BillingPeriodEnumType
1812
- ) {
1813
- updateSubscriptionPlan(
1814
- newPlanId: $newPlanId
1815
- billingPeriod: $billingPeriod
1816
- ) {
1817
- data {
1818
- subscriptionId
1819
- status
1820
- priceId
1821
- currentPlan
1822
- }
1823
- message
1824
- }
1825
- }
1826
- `;
1827
- var CREATE_CUSTOMER_PORTAL = gql14`
1828
- mutation createCustomerPortal($returnUrl: String) {
1829
- createCustomerPortal(returnUrl: $returnUrl) {
1830
- data {
1831
- portalUrl
1832
- }
1833
- message
1834
- }
1835
- }
1836
- `;
1837
-
1838
- // src/graphql/hooks/stripe/hooksMutation.ts
1839
- var useCreateCheckoutSession = () => {
1840
- const [createCheckoutSession, { loading, error }] = useMutation13(CREATE_CHECKOUT_SESSION_MUTATION);
1841
- return { createCheckoutSession, error, loading };
1842
- };
1843
- var useCancelSubscription = () => {
1844
- const [cancelSubscription, { loading, error }] = useMutation13(CANCEL_SUBSCRIPTION_MUTATION);
1845
- return { cancelSubscription, error, loading };
1846
- };
1847
- var useUpdateSubscriptionPlan = () => {
1848
- const [updateSubscriptionPlan, { loading, error }] = useMutation13(UPDATE_SUBSCRIPTION_PLAN_MUTATION);
1849
- return { error, loading, updateSubscriptionPlan };
1850
- };
1851
- var useCreateCustomerPortal = () => {
1852
- const [createCustomerPortal, { loading, error }] = useMutation13(CREATE_CUSTOMER_PORTAL);
1853
- return { createCustomerPortal, error, loading };
1854
- };
1855
-
1856
- // src/graphql/hooks/stripe/hooksQuery.ts
1857
- import { useQuery as useQuery8 } from "@apollo/client";
1858
- var useGetSubscriptionStatus = () => {
1859
- const { data, loading, error, refetch } = useQuery8(GetSubscriptionStatusDocument);
1860
- return {
1861
- data: data?.getSubscriptionStatus,
1862
- error,
1863
- loading,
1864
- refetch
1865
- };
1866
- };
1867
- var useGetSubscriptionPlans = () => {
1868
- const { data, loading, error, refetch } = useQuery8(GetSubscriptionPlansDocument);
1869
- return {
1870
- data: data?.getSubscriptionPlans,
1871
- error,
1872
- loading,
1873
- refetch
1874
- };
1875
- };
1876
-
1877
- // src/graphql/hooks/partner/hooksMutation.ts
1878
- import { useMutation as useMutation14 } from "@apollo/client";
1879
-
1880
- // src/graphql/mutations/partner.ts
1881
- import { gql as gql15 } from "@apollo/client";
1882
- var CREATE_PARTNER_MUTATION = gql15`
1883
- mutation createPartner($input: PartnerInputType!) {
1884
- createPartner(input: $input) {
1885
- data {
1886
- ...PartnerFields
1887
- }
1888
- message
1889
- }
1890
- }
1891
- ${PartnerFieldsFragmentDoc}
1892
- `;
1893
- var UPDATE_PARTNER_MUTATION = gql15`
1894
- mutation updatePartner($_id: ID!, $input: PartnerInputType!) {
1895
- updatePartner(_id: $_id, input: $input) {
1896
- data {
1897
- ...PartnerFields
1898
- }
1899
- message
1900
- }
1901
- }
1902
- ${PartnerFieldsFragmentDoc}
1903
- `;
1904
- var DELETE_PARTNER_MUTATION = gql15`
1905
- mutation deletePartner($_id: ID!) {
1906
- deletePartner(_id: $_id) {
1907
- data
1908
- message
1909
- }
1910
- }
1911
- `;
1912
-
1913
- // src/graphql/hooks/partner/hooksMutation.ts
1914
- var useCreatePartner = () => {
1915
- const [createPartner, { loading, error }] = useMutation14(CREATE_PARTNER_MUTATION, {
1916
- awaitRefetchQueries: true,
1917
- refetchQueries: [{ query: GetUserPartnersDocument }]
1918
- });
1919
- return { createPartner, error, loading };
1920
- };
1921
- var useUpdatePartner = () => {
1922
- const [updatePartner, { loading, error }] = useMutation14(UPDATE_PARTNER_MUTATION, {
1923
- awaitRefetchQueries: true,
1924
- refetchQueries: [{ query: GetUserPartnersDocument }]
1925
- });
1926
- return { error, loading, updatePartner };
1927
- };
1928
- var useDeletePartner = () => {
1929
- const [deletePartner, { loading, error }] = useMutation14(DELETE_PARTNER_MUTATION, {
1930
- awaitRefetchQueries: true,
1931
- refetchQueries: [{ query: GetUserPartnersDocument }]
1932
- });
1933
- return { deletePartner, error, loading };
1934
- };
1935
-
1936
- // src/graphql/hooks/partner/hooksQuery.ts
1937
- import { useQuery as useQuery9 } from "@apollo/client";
1938
- var useGetPartners = () => {
1939
- const { loading, error, data, refetch } = useQuery9(GetPartnersDocument, {
1940
- fetchPolicy: "network-only"
1941
- });
1942
- const partners = data?.partners || [];
1943
- return {
1944
- error,
1945
- loading,
1946
- partners,
1947
- refetch
1948
- };
1949
- };
1950
- var useGetPartner = (_id) => {
1951
- const { loading, error, data, refetch } = useQuery9(
1952
- GetPartnerDocument,
1953
- {
1954
- fetchPolicy: "network-only",
1955
- skip: !_id || _id === "",
1956
- variables: { _id }
1957
- }
1958
- );
1959
- const partner = data?.partner;
1960
- return { error, loading, partner, refetch };
1961
- };
1962
- var useGetPartnersByRegion = (region, options) => {
1963
- const variables = {
1964
- options,
1965
- region
1966
- };
1967
- const { loading, error, data, refetch, fetchMore } = useQuery9(GetPartnersByRegionDocument, {
1968
- fetchPolicy: "network-only",
1969
- variables
1970
- });
1971
- const partnersByRegion = data?.partnersByRegion || [];
1972
- return {
1973
- error,
1974
- fetchMore,
1975
- loading,
1976
- partnersByRegion,
1977
- refetch
1978
- };
1979
- };
1980
- var useSearchPartners = (search, region) => {
1981
- const { loading, error, data, refetch } = useQuery9(SearchPartnersDocument, {
1982
- fetchPolicy: "network-only",
1983
- skip: search.length < 3,
1984
- variables: { region, search }
1985
- });
1986
- const partnersSearch = data?.partnersSearch || [];
1987
- return { error, loading, partnersSearch, refetch };
1988
- };
1989
-
1990
- // src/graphql/hooks/post/hooksMutation.ts
1991
- import { useMutation as useMutation15 } from "@apollo/client";
1992
-
1993
- // src/graphql/mutations/post.ts
1994
- import { gql as gql16 } from "@apollo/client";
1995
- var CREATE_POST_MUTATION = gql16`
1996
- mutation createPost($input: PostInputType!) {
1997
- createPost(input: $input) {
1998
- data {
1999
- ...PostFields
2000
- }
2001
- message
2002
- }
2003
- }
2004
- ${PostFieldsFragmentDoc}
2005
- `;
2006
- var UPDATE_POST_MUTATION = gql16`
2007
- mutation updatePost($_id: ID!, $input: PostInputType!) {
2008
- updatePost(_id: $_id, input: $input) {
2009
- data {
2010
- ...PostFields
2011
- }
2012
- message
2013
- }
2014
- }
2015
- ${PostFieldsFragmentDoc}
2016
- `;
2017
- var DELETE_POST_MUTATION = gql16`
2018
- mutation deletePost($_id: ID!) {
2019
- deletePost(_id: $_id) {
2020
- data
2021
- message
2022
- }
2023
- }
2024
- `;
2025
-
2026
- // src/graphql/hooks/post/hooksMutation.ts
2027
- var useCreatePost = () => {
2028
- const [createPost, { loading, error }] = useMutation15(CREATE_POST_MUTATION, {
2029
- awaitRefetchQueries: true,
2030
- refetchQueries: [{ query: GetPostsDocument }]
2031
- });
2032
- return { createPost, error, loading };
2033
- };
2034
- var useUpdatePost = () => {
2035
- const [updatePost, { loading, error }] = useMutation15(UPDATE_POST_MUTATION, {
2036
- awaitRefetchQueries: true,
2037
- refetchQueries: [{ query: GetPostsDocument }]
2038
- });
2039
- return { error, loading, updatePost };
2040
- };
2041
- var useDeletePost = () => {
2042
- const [deletePost, { loading, error }] = useMutation15(DELETE_POST_MUTATION, {
2043
- awaitRefetchQueries: true,
2044
- refetchQueries: [{ query: GetPostsDocument }]
2045
- });
2046
- return { deletePost, error, loading };
2047
- };
2048
-
2049
- // src/graphql/hooks/post/hooksQuery.ts
2050
- import { useQuery as useQuery10 } from "@apollo/client";
2051
- var useGetPosts = () => {
2052
- const { data, loading, error, refetch } = useQuery10(GetPostsDocument, {
2053
- fetchPolicy: "network-only"
2054
- });
2055
- return { error, loading, posts: data?.posts || [], refetch };
2056
- };
2057
- var useGetPost = (_id) => {
2058
- const { data, loading, error, refetch } = useQuery10(GetPostDocument, {
2059
- fetchPolicy: "network-only",
2060
- skip: !_id || _id === "",
2061
- variables: { _id }
2062
- });
2063
- return { error, loading, post: data?.post, refetch };
2064
- };
2065
- var useGetPostsByType = (postType) => {
2066
- const { data, loading, error, refetch } = useQuery10(GetPostsByTypeDocument, {
2067
- fetchPolicy: "network-only",
2068
- skip: !postType,
2069
- variables: { postType }
2070
- });
2071
- return { error, loading, postsByType: data?.postsByType || [], refetch };
2072
- };
2073
-
2074
- // src/graphql/hooks/appSettings/hooksMutation.ts
2075
- import { useMutation as useMutation16 } from "@apollo/client";
2076
-
2077
- // src/graphql/mutations/appSettings.ts
2078
- import { gql as gql17 } from "@apollo/client";
2079
- var UPDATE_APP_SETTINGS_MUTATION = gql17`
2080
- mutation updateAppSettings($input: AppSettingsInputType!) {
2081
- updateAppSettings(input: $input) {
2082
- data
2083
- message
2084
- }
2085
- }
2086
- `;
2087
- var CRAWL_GOOGLE_MARKETS_MUTATION = gql17`
2088
- mutation crawlGoogleMarkets {
2089
- crawlGoogleMarkets {
2090
- data
2091
- message
2092
- }
2093
- }
2094
- `;
2095
- var UPDATE_GOOGLE_IMPORTED_MARKET_MUTATION = gql17`
2096
- mutation updateGoogleImportedMarkets {
2097
- updateGoogleImportedMarkets {
2098
- data
2099
- message
2100
- }
2101
- }
2102
- `;
2103
-
2104
- // src/graphql/hooks/appSettings/hooksMutation.ts
2105
- var useUpdateAppSettings = () => {
2106
- const [updateAppSettings, { loading, error }] = useMutation16(UPDATE_APP_SETTINGS_MUTATION, {
2107
- awaitRefetchQueries: true,
2108
- refetchQueries: [{ query: GetAppSettingsDocument }]
2109
- });
2110
- return { error, loading, updateAppSettings };
2111
- };
2112
- var useCrawlGoogleMarkets = () => {
2113
- const [crawlGoogleMarkets, { loading, error }] = useMutation16(CRAWL_GOOGLE_MARKETS_MUTATION);
2114
- return { crawlGoogleMarkets, error, loading };
2115
- };
2116
- var useUpdateGoogleImportedMarkets = () => {
2117
- const [updateGoogleImportedMarkets, { loading, error }] = useMutation16(UPDATE_GOOGLE_IMPORTED_MARKET_MUTATION);
2118
- return { error, loading, updateGoogleImportedMarkets };
2119
- };
2120
-
2121
- // src/graphql/hooks/appSettings/hooksQuery.ts
2122
- import { useQuery as useQuery11 } from "@apollo/client";
2123
- var useGetAppSettings = () => {
2124
- const { loading, error, data, refetch } = useQuery11(GetAppSettingsDocument, {
2125
- fetchPolicy: "network-only"
2126
- });
2127
- const appSettings = data?.appSettings || null;
2128
- return { appSettings, error, loading, refetch };
2129
- };
2130
-
2131
- // src/graphql/hooks/game/hooksMutation.ts
2132
- import { useMutation as useMutation17 } from "@apollo/client";
2133
-
2134
- // src/graphql/mutations/game.ts
2135
- import { gql as gql18 } from "@apollo/client";
2136
- var START_GAME_MUTATION = gql18`
2137
- mutation startGame($input: BaseGameInputType!) {
2138
- startGame(input: $input) {
2139
- data {
2140
- ...GameDocFields
2141
- }
2142
- message
2143
- }
2144
- }
2145
- ${GameDocFieldsFragmentDoc}
2146
- `;
2147
- var LEAVE_GAME_MUTATION = gql18`
2148
- mutation leaveGame(
2149
- $_id: ID!
2150
- $gameType: GameTypeEnumType!
2151
- $gameTypeId: String!
2152
- ) {
2153
- leaveGame(_id: $_id, gameType: $gameType, gameTypeId: $gameTypeId) {
2154
- data
2155
- message
2156
- }
2157
- }
2158
- `;
2159
- var UPDATE_DAILY_CLUE_MUTATION = gql18`
2160
- mutation updateDailyClueGame(
2161
- $_id: ID!
2162
- $foundLetter: String!
2163
- $gameType: GameTypeEnumType!
2164
- $gameTypeId: String!
2165
- ) {
2166
- updateDailyClueGame(
2167
- _id: $_id
2168
- foundLetter: $foundLetter
2169
- gameType: $gameType
2170
- gameTypeId: $gameTypeId
2171
- ) {
2172
- data {
2173
- ...GameDocFields
2174
- }
2175
- message
2176
- }
2177
- }
2178
- ${GameDocFieldsFragmentDoc}
2179
- `;
2180
- var UPDATE_PUZZLE_GAME_MUTATION = gql18`
2181
- mutation updatePuzzleGame(
2182
- $_id: ID!
2183
- $answeredQuestions: [PuzzleAnsweredQuestionInputType!]!
2184
- $gameType: GameTypeEnumType!
2185
- $gameTypeId: String!
2186
- ) {
2187
- updatePuzzleGame(
2188
- _id: $_id
2189
- answeredQuestions: $answeredQuestions
2190
- gameType: $gameType
2191
- gameTypeId: $gameTypeId
2192
- ) {
2193
- data {
2194
- ...GameDocFields
2195
- }
2196
- message
2197
- }
2198
- }
2199
- ${GameDocFieldsFragmentDoc}
2200
- `;
2201
-
2202
- // src/graphql/hooks/game/hooksMutation.ts
2203
- var useStartGame = () => {
2204
- const [startGame, { loading, error }] = useMutation17(START_GAME_MUTATION, {
2205
- awaitRefetchQueries: true,
2206
- refetchQueries: (mutationResult) => {
2207
- const gameId = mutationResult?.data?.startGame?.data?._id;
2208
- const userId = mutationResult?.data?.startGame?.data?.owner?.userId;
2209
- if (!gameId || !userId) return [];
2210
- return [
2211
- {
2212
- query: GetGameDocument,
2213
- variables: { _id: gameId }
2214
- // Pass the gameId for refetching
2215
- },
2216
- {
2217
- query: GetUserDocument,
2218
- variables: { _id: userId }
2219
- // Pass the userId for refetching
2220
- }
2221
- ];
2222
- }
2223
- });
2224
- return { error, loading, startGame };
2225
- };
2226
- var useLeaveGame = () => {
2227
- const [leaveGame, { loading, error }] = useMutation17(LEAVE_GAME_MUTATION, {
2228
- awaitRefetchQueries: true,
2229
- refetchQueries: [
2230
- {
2231
- query: GetGamesDocument
2232
- }
2233
- ]
2234
- });
2235
- return { error, leaveGame, loading };
2236
- };
2237
- var useUpdateDailyClueGame = () => {
2238
- const [updateDailyClueGame, { loading, error }] = useMutation17(UPDATE_DAILY_CLUE_MUTATION, {
2239
- awaitRefetchQueries: true,
2240
- refetchQueries: (mutationResult) => {
2241
- const gameId = mutationResult?.data?.updateDailyClueGame?.data?._id;
2242
- if (!gameId) return [];
2243
- return [
2244
- {
2245
- query: GetGameDocument,
2246
- variables: { _id: gameId }
2247
- // Pass the gameId for refetching
2248
- }
2249
- ];
2250
- }
2251
- });
2252
- return { error, loading, updateDailyClueGame };
2253
- };
2254
- var useUpdatePuzzleGame = () => {
2255
- const [updatePuzzleGame, { loading, error }] = useMutation17(UPDATE_PUZZLE_GAME_MUTATION, {
2256
- awaitRefetchQueries: true,
2257
- refetchQueries: (mutationResult) => {
2258
- const gameId = mutationResult?.data?.updatePuzzleGame?.data?._id;
2259
- if (!gameId) return [];
2260
- return [
2261
- {
2262
- query: GetGameDocument,
2263
- variables: { _id: gameId }
2264
- // Pass the gameId for refetching
2265
- }
2266
- ];
2267
- }
2268
- });
2269
- return { error, loading, updatePuzzleGame };
2270
- };
2271
-
2272
- // src/graphql/hooks/game/hooksQuery.ts
2273
- import { useQuery as useQuery12 } from "@apollo/client";
2274
- var useGetGames = () => {
2275
- const { loading, error, data, refetch } = useQuery12(GetGamesDocument, {
2276
- fetchPolicy: "network-only"
2277
- });
2278
- const games = data?.games || [];
2279
- return { error, games, loading, refetch };
2280
- };
2281
- var useGetGame = (_id) => {
2282
- const { loading, error, data, refetch } = useQuery12(GetGameDocument, {
2283
- fetchPolicy: "network-only",
2284
- skip: !_id,
2285
- variables: _id ? { _id } : void 0
2286
- });
2287
- const game = data?.game || null;
2288
- return { error, game, loading, refetch };
2289
- };
2290
- var useGetGameLeaderboard = () => {
2291
- const { loading, error, data, refetch } = useQuery12(GetGameLeaderboardDocument, {
2292
- fetchPolicy: "network-only"
2293
- });
2294
- const gameLeaderboard = data?.gameLeaderboard || [];
2295
- return { error, gameLeaderboard, loading, refetch };
2296
- };
2297
-
2298
- // src/graphql/hooks/school/hooksMutation.ts
2299
- import { useMutation as useMutation18 } from "@apollo/client";
2300
-
2301
- // src/graphql/mutations/school.ts
2302
- import { gql as gql19 } from "@apollo/client";
2303
- var CREATE_SCHOOL_MUTATION = gql19`
2304
- mutation createSchool($input: SchoolInputType!) {
2305
- createSchool(input: $input) {
2306
- data {
2307
- ...SchoolFields
2308
- }
2309
- message
2310
- }
2311
- }
2312
- ${SchoolFieldsFragmentDoc}
2313
- `;
2314
- var UPDATE_SCHOOL_MUTATION = gql19`
2315
- mutation updateSchool($_id: ID!, $input: SchoolInputType!) {
2316
- updateSchool(_id: $_id, input: $input) {
2317
- data {
2318
- ...SchoolFields
2319
- }
2320
- message
2321
- }
2322
- }
2323
- ${SchoolFieldsFragmentDoc}
2324
- `;
2325
- var DELETE_SCHOOL_MUTATION = gql19`
2326
- mutation deleteSchool($_id: ID!) {
2327
- deleteSchool(_id: $_id) {
2328
- data
2329
- message
2330
- }
2331
- }
2332
- `;
2333
- var REQUEST_MARKETING_MATERIAL_MUTATION = gql19`
2334
- mutation requestMarketingMaterial(
2335
- $input: MarketingMaterialRequestInputType!
2336
- ) {
2337
- requestMarketingMaterial(input: $input) {
2338
- data
2339
- message
2340
- }
2341
- }
2342
- `;
2343
-
2344
- // src/graphql/hooks/school/hooksMutation.ts
2345
- var useCreateSchool = () => {
2346
- const [createSchool, { loading, error }] = useMutation18(CREATE_SCHOOL_MUTATION, {
2347
- awaitRefetchQueries: true,
2348
- refetchQueries: [{ query: GetSchoolsDocument }]
2349
- });
2350
- return { createSchool, error, loading };
2351
- };
2352
- var useUpdateSchool = () => {
2353
- const [updateSchool, { loading, error }] = useMutation18(UPDATE_SCHOOL_MUTATION, {
2354
- awaitRefetchQueries: true,
2355
- refetchQueries: [{ query: GetSchoolsDocument }]
2356
- });
2357
- return { error, loading, updateSchool };
2358
- };
2359
- var useDeleteSchool = () => {
2360
- const [deleteSchool, { loading, error }] = useMutation18(DELETE_SCHOOL_MUTATION, {
2361
- awaitRefetchQueries: true,
2362
- refetchQueries: [{ query: GetSchoolsDocument }]
2363
- });
2364
- return { deleteSchool, error, loading };
2365
- };
2366
- var useRequestMarketingMaterial = () => {
2367
- const [requestMarketingMaterial, { loading, error }] = useMutation18(REQUEST_MARKETING_MATERIAL_MUTATION);
2368
- return { error, loading, requestMarketingMaterial };
2369
- };
2370
-
2371
- // src/graphql/hooks/school/hooksQuery.ts
2372
- import { useQuery as useQuery13 } from "@apollo/client";
2373
- var useGetSchools = () => {
2374
- const { data, loading, error, refetch } = useQuery13(
2375
- GetSchoolsDocument,
2376
- {
2377
- fetchPolicy: "network-only"
2378
- }
2379
- );
2380
- return {
2381
- error,
2382
- loading,
2383
- refetch,
2384
- schools: data?.schools || []
2385
- };
2386
- };
2387
- var useGetSchool = (_id) => {
2388
- const { data, loading, error, refetch } = useQuery13(GetSchoolDocument, {
2389
- fetchPolicy: "network-only",
2390
- skip: !_id,
2391
- variables: { _id }
2392
- });
2393
- return {
2394
- error,
2395
- loading,
2396
- refetch,
2397
- school: data?.school || null
2398
- };
2399
- };
2400
-
2401
- // src/graphql/hooks/affiliate/hooksQuery.ts
2402
- import { useQuery as useQuery14 } from "@apollo/client";
2403
- var useGetAffiliate = (_id) => {
2404
- const { data, loading, error, refetch } = useQuery14(GetAffiliateDocument, {
2405
- fetchPolicy: "network-only",
2406
- skip: !_id || _id === "",
2407
- variables: { _id }
2408
- });
2409
- const affiliate = data?.affiliate;
2410
- return {
2411
- affiliate,
2412
- error,
2413
- loading,
2414
- refetch
2415
- };
2416
- };
2417
- var useGetAffiliates = () => {
2418
- const { data, loading, error, refetch } = useQuery14(GetAffiliatesDocument, {
2419
- fetchPolicy: "network-only"
2420
- });
2421
- const affiliates = data?.affiliates || [];
2422
- return {
2423
- affiliates,
2424
- error,
2425
- loading,
2426
- refetch
2427
- };
2428
- };
2429
-
2430
- // src/graphql/hooks/affiliate/hooksMutation.ts
2431
- import { useMutation as useMutation19 } from "@apollo/client";
2432
-
2433
- // src/graphql/mutations/affiliate.ts
2434
- import { gql as gql20 } from "@apollo/client";
2435
- var UPDATE_AFFILIATE_DETAILS_MUTATION = gql20`
2436
- mutation updateAffiliateDetails(
2437
- $input: AffiliateDetailsInputType!
2438
- $affiliateId: ID!
2439
- ) {
2440
- updateAffiliateDetails(input: $input, affiliateId: $affiliateId) {
2441
- data {
2442
- ...AffiliateFields
2443
- }
2444
- message
2445
- }
2446
- }
2447
- ${AffiliateFieldsFragmentDoc}
2448
- `;
2449
- var DELETE_AFFILIATE_MUTATION = gql20`
2450
- mutation deleteAffiliate($_id: ID!) {
2451
- deleteAffiliate(_id: $_id) {
2452
- data
2453
- message
2454
- }
2455
- }
2456
- `;
2457
- var REDEEM_AFFILIATE_REWARD_MUTATION = gql20`
2458
- mutation redeemAffiliateReward($affiliateId: ID!) {
2459
- redeemAffiliateReward(affiliateId: $affiliateId) {
2460
- data {
2461
- ...AffiliateFields
2462
- }
2463
- message
2464
- }
2465
- }
2466
- ${AffiliateFieldsFragmentDoc}
2467
- `;
2468
- var ASSIGN_AFFILIATE_RESOURCE_REWARD_MUTATION = gql20`
2469
- mutation assignAffiliateResourceReward(
2470
- $affiliateId: ID!
2471
- $resourceId: ID!
2472
- $resourceType: ResourceTypeEnum!
2473
- $rewardType: AffiliateRewardEnumType!
2474
- ) {
2475
- assignAffiliateResourceReward(
2476
- affiliateId: $affiliateId
2477
- resourceId: $resourceId
2478
- resourceType: $resourceType
2479
- rewardType: $rewardType
2480
- ) {
2481
- data {
2482
- ...AffiliateFields
2483
- }
2484
- message
2485
- }
2486
- }
2487
- ${AffiliateFieldsFragmentDoc}
2488
- `;
2489
- var ASSIGN_AFFILIATE_BONUS_REWARD_MUTATION = gql20`
2490
- mutation assignAffiliateBonusReward(
2491
- $affiliateId: ID!
2492
- $rewardType: AffiliateRewardEnumType!
2493
- ) {
2494
- assignAffiliateBonusReward(
2495
- affiliateId: $affiliateId
2496
- rewardType: $rewardType
2497
- ) {
2498
- data {
2499
- ...AffiliateFields
2500
- }
2501
- message
2502
- }
2503
- }
2504
- ${AffiliateFieldsFragmentDoc}
2505
- `;
2506
-
2507
- // src/graphql/hooks/affiliate/hooksMutation.ts
2508
- var useUpdateAffiliateDetails = () => {
2509
- const [updateAffiliateDetails, { loading, error }] = useMutation19(UPDATE_AFFILIATE_DETAILS_MUTATION, {
2510
- awaitRefetchQueries: true,
2511
- refetchQueries: (mutationResult) => {
2512
- const affiliateId = mutationResult?.data?.updateAffiliateDetails?.data?._id;
2513
- if (!affiliateId) return [];
2514
- return [{ query: GetAffiliateDocument, variables: { _id: affiliateId } }];
2515
- }
2516
- });
2517
- return { error, loading, updateAffiliateDetails };
2518
- };
2519
- var useDeleteAffiliate = () => {
2520
- const [deleteAffiliate, { loading, error }] = useMutation19(DELETE_AFFILIATE_MUTATION, {
2521
- awaitRefetchQueries: true,
2522
- refetchQueries: [{ query: GetAffiliatesDocument }]
2523
- });
2524
- return { deleteAffiliate, error, loading };
2525
- };
2526
- var useRedeemAffiliateReward = () => {
2527
- const [redeemAffiliateReward, { loading, error }] = useMutation19(REDEEM_AFFILIATE_REWARD_MUTATION, {
2528
- awaitRefetchQueries: true,
2529
- refetchQueries: (mutationResult) => {
2530
- const affiliateId = mutationResult?.data?.redeemAffiliateReward?.data?._id;
2531
- if (!affiliateId) return [];
2532
- return [{ query: GetAffiliateDocument, variables: { _id: affiliateId } }];
2533
- }
2534
- });
2535
- return { error, loading, redeemAffiliateReward };
2536
- };
2537
- var useAssignAffiliateResourceReward = () => {
2538
- const [assignAffiliateResourceReward, { loading, error }] = useMutation19(ASSIGN_AFFILIATE_RESOURCE_REWARD_MUTATION, {
2539
- awaitRefetchQueries: true,
2540
- refetchQueries: (mutationResult) => {
2541
- const affiliateId = mutationResult?.data?.assignAffiliateResourceReward?.data?._id;
2542
- if (!affiliateId) return [];
2543
- return [{ query: GetAffiliateDocument, variables: { _id: affiliateId } }];
2544
- }
2545
- });
2546
- return { assignAffiliateResourceReward, error, loading };
2547
- };
2548
- var useAssignAffiliateBonusReward = () => {
2549
- const [assignAffiliateBonusReward, { loading, error }] = useMutation19(ASSIGN_AFFILIATE_BONUS_REWARD_MUTATION, {
2550
- awaitRefetchQueries: true,
2551
- refetchQueries: (mutationResult) => {
2552
- const affiliateId = mutationResult?.data?.assignAffiliateBonusReward?.data?._id;
2553
- if (!affiliateId) return [];
2554
- return [{ query: GetAffiliateDocument, variables: { _id: affiliateId } }];
2555
- }
2556
- });
2557
- return { assignAffiliateBonusReward, error, loading };
2558
- };
153
+ } from "../chunk-HZMP7GXC.mjs";
154
+ import "../chunk-KZTOISPA.mjs";
2559
155
  export {
2560
- GetEventBySlugDocument as GET_EVENT_BY_SLUG,
2561
- GetPartnerBySlugDocument as GET_PARTNER_BY_SLUG,
2562
- GetPostBySlugDocument as GET_POST_BY_SLUG,
2563
- GetVendorBySlugDocument as GET_VENDOR_BY_SLUG,
156
+ GET_EVENT,
157
+ GET_EVENT_BY_SLUG,
158
+ GET_EVENT_INFO,
159
+ GET_PARTNER,
160
+ GET_PARTNER_BY_SLUG,
161
+ GET_POST,
162
+ GET_POST_BY_SLUG,
163
+ GET_RESOURCE_CONNECTIONS,
164
+ GET_VENDOR,
165
+ GET_VENDOR_BY_SLUG,
166
+ GET_VENDOR_INFO,
2564
167
  toGraphqlQueryString,
2565
168
  useAddParticipantToChat,
2566
169
  useAddUserFavouriteResource,
@@ -2570,8 +173,6 @@ export {
2570
173
  useAdminPermanentlyDeleteResource,
2571
174
  useAdminResendUserVerificationEmail,
2572
175
  useAdminUpdateResourceType,
2573
- useAssignAffiliateBonusReward,
2574
- useAssignAffiliateResourceReward,
2575
176
  useCancelSubscription,
2576
177
  useContactUs,
2577
178
  useCrawlGoogleMarkets,
@@ -2590,10 +191,10 @@ export {
2590
191
  useCreateResourceActivity,
2591
192
  useCreateSchool,
2592
193
  useCreateUnregisteredVendor,
194
+ useCreateUser,
2593
195
  useCreateVendor,
2594
196
  useCreateVendorInfo,
2595
197
  useDeleteAd,
2596
- useDeleteAffiliate,
2597
198
  useDeleteAllNotifications,
2598
199
  useDeleteChat,
2599
200
  useDeleteEvent,
@@ -2634,6 +235,7 @@ export {
2634
235
  useGetPostsByType,
2635
236
  useGetRelation,
2636
237
  useGetRelationByEventAndVendor,
238
+ useGetReportedChatUsers,
2637
239
  useGetResourceActivity,
2638
240
  useGetResourceConnections,
2639
241
  useGetSchool,
@@ -2664,7 +266,6 @@ export {
2664
266
  useMarkAllNotificationsRead,
2665
267
  useMarkChatMessagesSeen,
2666
268
  useMarkNotificationRead,
2667
- useRedeemAffiliateReward,
2668
269
  useRedeemReward,
2669
270
  useRefreshToken,
2670
271
  useRegister,
@@ -2680,13 +281,13 @@ export {
2680
281
  useSearchEvents,
2681
282
  useSearchPartners,
2682
283
  useSearchVendors,
284
+ useSelectPackage,
2683
285
  useSelectStandardPackage,
2684
286
  useSendChatMessage,
2685
287
  useStartGame,
2686
288
  useToggleChatMessageLike,
2687
289
  useUnlinkUnregisteredVendorByInviterId,
2688
290
  useUpdateAd,
2689
- useUpdateAffiliateDetails,
2690
291
  useUpdateAppSettings,
2691
292
  useUpdateDailyClueGame,
2692
293
  useUpdateEvent,