@timardex/cluemart-shared 1.7.28 → 1.7.29

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 (57) hide show
  1. package/dist/{ad-B9tX1jAF.d.ts → ad-CQrQILqt.d.ts} +2 -2
  2. package/dist/{ad-C8XVY1Ig.d.mts → ad-DaMV_FdN.d.mts} +2 -2
  3. package/dist/{coupon-BDEw47eR.d.ts → affiliate-BjNe7vrz.d.ts} +3 -47
  4. package/dist/{coupon-C6CyYA96.d.mts → affiliate-CRzUWMPv.d.mts} +3 -47
  5. package/dist/auth/index.cjs +118 -27
  6. package/dist/auth/index.cjs.map +1 -1
  7. package/dist/auth/index.d.mts +3 -3
  8. package/dist/auth/index.d.ts +3 -3
  9. package/dist/auth/index.mjs +1 -1
  10. package/dist/{chunk-2G4J6K5K.mjs → chunk-2KVUR42L.mjs} +9 -85
  11. package/dist/chunk-2KVUR42L.mjs.map +1 -0
  12. package/dist/{chunk-4G4OFSBZ.mjs → chunk-PACEDU64.mjs} +11 -6
  13. package/dist/{chunk-4G4OFSBZ.mjs.map → chunk-PACEDU64.mjs.map} +1 -1
  14. package/dist/{chunk-LS3KB634.mjs → chunk-PFY3LS6P.mjs} +120 -27
  15. package/dist/chunk-PFY3LS6P.mjs.map +1 -0
  16. package/dist/{contactUs-BZf4DfMe.d.ts → contactUs-BCkSecPW.d.ts} +1 -1
  17. package/dist/{contactUs-C-pVJyZB.d.mts → contactUs-ryrB_j4c.d.mts} +1 -1
  18. package/dist/formFields/index.d.mts +1 -1
  19. package/dist/formFields/index.d.ts +1 -1
  20. package/dist/formFields/index.mjs +1 -1
  21. package/dist/{global-Ch0I5X41.d.ts → global-CF8hwvkc.d.ts} +51 -2
  22. package/dist/{global-BC6YWupC.d.mts → global-Ch11tfC6.d.mts} +51 -2
  23. package/dist/graphql/index.cjs +499 -486
  24. package/dist/graphql/index.cjs.map +1 -1
  25. package/dist/graphql/index.d.mts +5 -5
  26. package/dist/graphql/index.d.ts +5 -5
  27. package/dist/graphql/index.mjs +2 -2
  28. package/dist/hooks/index.cjs +353 -340
  29. package/dist/hooks/index.cjs.map +1 -1
  30. package/dist/hooks/index.d.mts +8 -8
  31. package/dist/hooks/index.d.ts +8 -8
  32. package/dist/hooks/index.mjs +4 -4
  33. package/dist/hooks/index.mjs.map +1 -1
  34. package/dist/index.cjs +510 -492
  35. package/dist/index.cjs.map +1 -1
  36. package/dist/index.d.mts +53 -47
  37. package/dist/index.d.ts +53 -47
  38. package/dist/index.mjs +326 -308
  39. package/dist/index.mjs.map +1 -1
  40. package/dist/map/index.d.mts +1 -1
  41. package/dist/map/index.d.ts +1 -1
  42. package/dist/{resourceActivities-C6EjqEG7.d.ts → resourceActivities-2SjrHpuU.d.ts} +1 -1
  43. package/dist/{resourceActivities-Vh5zcV02.d.mts → resourceActivities-isol6rr_.d.mts} +1 -1
  44. package/dist/sharing/index.d.mts +1 -1
  45. package/dist/sharing/index.d.ts +1 -1
  46. package/dist/types/index.d.mts +7 -7
  47. package/dist/types/index.d.ts +7 -7
  48. package/dist/{user-DrA0HITt.d.ts → user-BdvV_3eW.d.ts} +2 -1
  49. package/dist/{user-DWNmVv-L.d.mts → user-CFVqH8Xk.d.mts} +2 -1
  50. package/dist/utils/index.cjs +11 -6
  51. package/dist/utils/index.cjs.map +1 -1
  52. package/dist/utils/index.d.mts +5 -5
  53. package/dist/utils/index.d.ts +5 -5
  54. package/dist/utils/index.mjs +3 -3
  55. package/package.json +1 -1
  56. package/dist/chunk-2G4J6K5K.mjs.map +0 -1
  57. package/dist/chunk-LS3KB634.mjs.map +0 -1
@@ -157,6 +157,7 @@ var USER_FIELDS_FRAGMENT = gql`
157
157
  avatar {
158
158
  ...ResourceImageFields
159
159
  }
160
+ coupon
160
161
  createdAt
161
162
  deletedAt
162
163
  email
@@ -714,8 +715,95 @@ var SEARCH_PARTNERS = gql4`
714
715
  `;
715
716
 
716
717
  // src/graphql/queries/vendor.ts
718
+ import { gql as gql6 } from "@apollo/client";
719
+
720
+ // src/graphql/queries/coupon.ts
717
721
  import { gql as gql5 } from "@apollo/client";
718
- var VENDOR_DATETIME_FIELDS_FRAGMENT = gql5`
722
+ var PRODUCT_COUPON_FIELDS_FRAGMENT = gql5`
723
+ fragment ProductCouponFields on ProductCouponType {
724
+ couponDocumentId
725
+ couponId
726
+ }
727
+ `;
728
+ var COUPON_CODE_FIELDS_FRAGMENT = gql5`
729
+ fragment CouponCodeFields on CouponCodeType {
730
+ code
731
+ qrCode {
732
+ ...ResourceImageFields
733
+ }
734
+ }
735
+ ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
736
+ `;
737
+ var COUPON_PARTICIPANT_USER_FIELDS_FRAGMENT = gql5`
738
+ fragment CouponParticipantUserFields on CouponParticipantUserType {
739
+ couponCollectedCount
740
+ couponRedeemedAt
741
+ createdAt
742
+ updatedAt
743
+ userId
744
+ }
745
+ `;
746
+ var COUPON_DATA_FIELDS_FRAGMENT = gql5`
747
+ fragment CouponDataFields on CouponDataType {
748
+ _id
749
+ active
750
+ couponCode {
751
+ ...CouponCodeFields
752
+ }
753
+ couponDescription
754
+ couponOption
755
+ createdAt
756
+ endDate
757
+ participantProductId
758
+ participantUsers {
759
+ ...CouponParticipantUserFields
760
+ }
761
+ resourceId
762
+ resourceType
763
+ startDate
764
+ updatedAt
765
+ }
766
+ ${COUPON_CODE_FIELDS_FRAGMENT}
767
+ ${COUPON_PARTICIPANT_USER_FIELDS_FRAGMENT}
768
+ `;
769
+ var COUPON = gql5`
770
+ fragment CouponFields on CouponType {
771
+ _id
772
+ active
773
+ couponData {
774
+ ...CouponDataFields
775
+ }
776
+ createdAt
777
+ deletedAt
778
+ owner {
779
+ ...OwnerFields
780
+ }
781
+ updatedAt
782
+ }
783
+ ${OWNER_FIELDS_FRAGMENT}
784
+ ${COUPON_DATA_FIELDS_FRAGMENT}
785
+ ${COUPON_CODE_FIELDS_FRAGMENT}
786
+ ${COUPON_PARTICIPANT_USER_FIELDS_FRAGMENT}
787
+ `;
788
+ var GET_COUPONS = gql5`
789
+ query getCoupons {
790
+ coupons {
791
+ ...CouponFields
792
+ }
793
+ }
794
+ ${COUPON}
795
+ `;
796
+ var GET_COUPON = gql5`
797
+ query getCoupon($_id: ID!) {
798
+ coupon(_id: $_id) {
799
+ ...CouponFields
800
+ }
801
+ }
802
+ ${COUPON}
803
+ `;
804
+
805
+ // src/graphql/queries/vendor.ts
806
+ var VENDOR_DATETIME_FIELDS_FRAGMENT = gql6`
719
807
  fragment VendorDateTimeFields on VendorDateTimeType {
720
808
  dateStatus
721
809
  endDate
@@ -724,20 +812,23 @@ var VENDOR_DATETIME_FIELDS_FRAGMENT = gql5`
724
812
  startTime
725
813
  }
726
814
  `;
727
- var VENDOR_PRODUCT_LIST_FIELDS_FRAGMENT = gql5`
815
+ var VENDOR_PRODUCT_LIST_FIELDS_FRAGMENT = gql6`
728
816
  fragment VendorProductListFields on VendorProductListType {
729
817
  _id
818
+ coupon {
819
+ ...ProductCouponFields
820
+ }
730
821
  createdAt
731
822
  description
732
- hasCoupon
733
823
  name
734
824
  price
735
825
  priceUnit
736
826
  productGroups
737
827
  updatedAt
738
828
  }
829
+ ${PRODUCT_COUPON_FIELDS_FRAGMENT}
739
830
  `;
740
- var VENDOR = gql5`
831
+ var VENDOR = gql6`
741
832
  fragment VendorFields on VendorType {
742
833
  _id
743
834
  active
@@ -838,13 +929,13 @@ var VENDOR = gql5`
838
929
  ${RELATED_POST_FIELDS_FRAGMENT}
839
930
  ${SOCIAL_SHARE_RESOURCE_FIELDS_FRAGMENT}
840
931
  `;
841
- var VENDOR_ATTRIBUTES_FRAGMENT = gql5`
932
+ var VENDOR_ATTRIBUTES_FRAGMENT = gql6`
842
933
  fragment VendorAttributesFields on VendorAttributesType {
843
934
  details
844
935
  isRequired
845
936
  }
846
937
  `;
847
- var VENDOR_INFO = gql5`
938
+ var VENDOR_INFO = gql6`
848
939
  fragment VendorInfoFields on VendorInfoType {
849
940
  _id
850
941
  compliance {
@@ -885,7 +976,7 @@ var VENDOR_INFO = gql5`
885
976
  ${VENDOR_ATTRIBUTES_FRAGMENT}
886
977
  ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
887
978
  `;
888
- var UNREGISTERED_VENDOR_INVITATION_FRAGMENT = gql5`
979
+ var UNREGISTERED_VENDOR_INVITATION_FRAGMENT = gql6`
889
980
  fragment UnregisteredVendorInvitationFields on UnregisteredVendorInvitationType {
890
981
  dateTime {
891
982
  ...DateTimeFields
@@ -894,7 +985,7 @@ var UNREGISTERED_VENDOR_INVITATION_FRAGMENT = gql5`
894
985
  }
895
986
  ${DATETIME_FIELDS_FRAGMENT}
896
987
  `;
897
- var UNREGISTERED_VENDOR = gql5`
988
+ var UNREGISTERED_VENDOR = gql6`
898
989
  fragment UnregisteredVendorFields on UnregisteredVendorType {
899
990
  _id
900
991
  active
@@ -914,7 +1005,7 @@ var UNREGISTERED_VENDOR = gql5`
914
1005
  }
915
1006
  ${UNREGISTERED_VENDOR_INVITATION_FRAGMENT}
916
1007
  `;
917
- var GET_VENDORS = gql5`
1008
+ var GET_VENDORS = gql6`
918
1009
  query getVendors {
919
1010
  vendors {
920
1011
  ...VendorFields
@@ -922,7 +1013,7 @@ var GET_VENDORS = gql5`
922
1013
  }
923
1014
  ${VENDOR}
924
1015
  `;
925
- var GET_VENDOR = gql5`
1016
+ var GET_VENDOR = gql6`
926
1017
  query getVendor($_id: ID!) {
927
1018
  vendor(_id: $_id) {
928
1019
  ...VendorFields
@@ -930,7 +1021,7 @@ var GET_VENDOR = gql5`
930
1021
  }
931
1022
  ${VENDOR}
932
1023
  `;
933
- var GET_VENDORS_BY_REGION = gql5`
1024
+ var GET_VENDORS_BY_REGION = gql6`
934
1025
  query getVendorsByRegion(
935
1026
  $region: String!
936
1027
  $options: ResourcesByRegionOptions
@@ -941,7 +1032,7 @@ var GET_VENDORS_BY_REGION = gql5`
941
1032
  }
942
1033
  ${VENDOR}
943
1034
  `;
944
- var SEARCH_VENDORS = gql5`
1035
+ var SEARCH_VENDORS = gql6`
945
1036
  query searchVendors($search: String!, $region: String!) {
946
1037
  vendorSearch(search: $search, region: $region) {
947
1038
  ...VendorFields
@@ -949,7 +1040,7 @@ var SEARCH_VENDORS = gql5`
949
1040
  }
950
1041
  ${VENDOR}
951
1042
  `;
952
- var GET_VENDOR_INFO = gql5`
1043
+ var GET_VENDOR_INFO = gql6`
953
1044
  query getVendorInfo($vendorId: ID!) {
954
1045
  vendorInfo(vendorId: $vendorId) {
955
1046
  ...VendorInfoFields
@@ -957,7 +1048,7 @@ var GET_VENDOR_INFO = gql5`
957
1048
  }
958
1049
  ${VENDOR_INFO}
959
1050
  `;
960
- var GET_UNREGISTERED_VENDORS = gql5`
1051
+ var GET_UNREGISTERED_VENDORS = gql6`
961
1052
  query getUnregisteredVendors {
962
1053
  unregisteredVendors {
963
1054
  ...UnregisteredVendorFields
@@ -965,7 +1056,7 @@ var GET_UNREGISTERED_VENDORS = gql5`
965
1056
  }
966
1057
  ${UNREGISTERED_VENDOR}
967
1058
  `;
968
- var GET_UNREGISTERED_VENDORS_BY_INVITER_ID = gql5`
1059
+ var GET_UNREGISTERED_VENDORS_BY_INVITER_ID = gql6`
969
1060
  query getUnregisteredVendorsByInviterId($inviterId: ID!) {
970
1061
  unregisteredVendorsByInviterId(inviterId: $inviterId) {
971
1062
  ...UnregisteredVendorFields
@@ -973,7 +1064,7 @@ var GET_UNREGISTERED_VENDORS_BY_INVITER_ID = gql5`
973
1064
  }
974
1065
  ${UNREGISTERED_VENDOR}
975
1066
  `;
976
- var GET_UNREGISTERED_VENDOR = gql5`
1067
+ var GET_UNREGISTERED_VENDOR = gql6`
977
1068
  query getUnregisteredVendor($_id: ID!) {
978
1069
  unregisteredVendor(_id: $_id) {
979
1070
  ...UnregisteredVendorFields
@@ -981,7 +1072,7 @@ var GET_UNREGISTERED_VENDOR = gql5`
981
1072
  }
982
1073
  ${UNREGISTERED_VENDOR}
983
1074
  `;
984
- var MY_PENDING_VENDOR_CLAIM = gql5`
1075
+ var MY_PENDING_VENDOR_CLAIM = gql6`
985
1076
  query myPendingVendorClaim {
986
1077
  myPendingVendorClaim {
987
1078
  _id
@@ -995,8 +1086,8 @@ var MY_PENDING_VENDOR_CLAIM = gql5`
995
1086
  import { useQuery } from "@apollo/client";
996
1087
 
997
1088
  // src/graphql/queries/user.ts
998
- import { gql as gql6 } from "@apollo/client";
999
- var GET_USERS = gql6`
1089
+ import { gql as gql7 } from "@apollo/client";
1090
+ var GET_USERS = gql7`
1000
1091
  query getUsers {
1001
1092
  users {
1002
1093
  ...UserFields
@@ -1004,7 +1095,7 @@ var GET_USERS = gql6`
1004
1095
  }
1005
1096
  ${USER_FIELDS_FRAGMENT}
1006
1097
  `;
1007
- var GET_USER = gql6`
1098
+ var GET_USER = gql7`
1008
1099
  query getUser($_id: ID!) {
1009
1100
  user(_id: $_id) {
1010
1101
  ...UserFields
@@ -1012,7 +1103,7 @@ var GET_USER = gql6`
1012
1103
  }
1013
1104
  ${USER_FIELDS_FRAGMENT}
1014
1105
  `;
1015
- var GET_USER_EVENTS = gql6`
1106
+ var GET_USER_EVENTS = gql7`
1016
1107
  query getUserEvents {
1017
1108
  userEvents {
1018
1109
  ...EventFields
@@ -1020,7 +1111,7 @@ var GET_USER_EVENTS = gql6`
1020
1111
  }
1021
1112
  ${EVENT}
1022
1113
  `;
1023
- var GET_USER_VENDORS = gql6`
1114
+ var GET_USER_VENDORS = gql7`
1024
1115
  query getUserVendors {
1025
1116
  userVendors {
1026
1117
  ...VendorFields
@@ -1028,7 +1119,7 @@ var GET_USER_VENDORS = gql6`
1028
1119
  }
1029
1120
  ${VENDOR}
1030
1121
  `;
1031
- var GET_USER_PARTNERS = gql6`
1122
+ var GET_USER_PARTNERS = gql7`
1032
1123
  query getUserPartners {
1033
1124
  userPartners {
1034
1125
  ...PartnerFields
@@ -1036,7 +1127,7 @@ var GET_USER_PARTNERS = gql6`
1036
1127
  }
1037
1128
  ${PARTNER}
1038
1129
  `;
1039
- var GET_USER_ACTIVITIES = gql6`
1130
+ var GET_USER_ACTIVITIES = gql7`
1040
1131
  query getUserActivities {
1041
1132
  userActivities {
1042
1133
  favourites {
@@ -1071,7 +1162,7 @@ var GET_USER_ACTIVITIES = gql6`
1071
1162
  ${VENDOR}
1072
1163
  ${PARTNER}
1073
1164
  `;
1074
- var GET_USER_RESOURCES = gql6`
1165
+ var GET_USER_RESOURCES = gql7`
1075
1166
  query getUserResources($userId: ID!) {
1076
1167
  userResources(userId: $userId) {
1077
1168
  resources {
@@ -1195,7 +1286,9 @@ export {
1195
1286
  GET_PARTNER,
1196
1287
  GET_PARTNERS_BY_REGION,
1197
1288
  SEARCH_PARTNERS,
1198
- VENDOR_PRODUCT_LIST_FIELDS_FRAGMENT,
1289
+ COUPON,
1290
+ GET_COUPONS,
1291
+ GET_COUPON,
1199
1292
  VENDOR,
1200
1293
  VENDOR_INFO,
1201
1294
  UNREGISTERED_VENDOR,
@@ -1221,4 +1314,4 @@ export {
1221
1314
  useGetUserActivities,
1222
1315
  useGetUserResources
1223
1316
  };
1224
- //# sourceMappingURL=chunk-LS3KB634.mjs.map
1317
+ //# sourceMappingURL=chunk-PFY3LS6P.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/graphql/hooks/auth.ts","../src/graphql/mutations/auth.ts","../src/graphql/queries/global.ts","../src/graphql/queries/event.ts","../src/graphql/queries/partner.ts","../src/graphql/queries/vendor.ts","../src/graphql/queries/coupon.ts","../src/graphql/hooks/user/hooksQuery.ts","../src/graphql/queries/user.ts"],"sourcesContent":["import { useMutation } from \"@apollo/client\";\n\nimport {\n AuthMutationResponse,\n RefreshTokenMutationResponse,\n} from \"src/types/auth\";\nimport { MutationResponse } from \"src/types/global\";\n\nimport {\n LOGIN_MUTATION,\n LOGOUT_MUTATION,\n REFRESH_TOKEN_MUTATION,\n REGISTER_MUTATION,\n REQUEST_PASSWORD_RESET_MUTATION,\n RESET_PASSWORD_MUTATION,\n VALIDATE_VERIFICATION_TOKEN_MUTATION,\n} from \"../mutations/auth\";\n\ntype MessageOnlyResponse = MutationResponse<boolean>;\n\nexport const useRegister = () => {\n const [register, { loading, error }] = useMutation<{\n register: AuthMutationResponse;\n }>(REGISTER_MUTATION);\n return { error, loading, register };\n};\n\nexport const useLogin = () => {\n const [login, { loading, error }] = useMutation<{\n login: AuthMutationResponse;\n }>(LOGIN_MUTATION);\n return { error, loading, login };\n};\n\nexport const useLogout = () => {\n const [logout, { loading, error }] = useMutation<{\n logout: MessageOnlyResponse;\n }>(LOGOUT_MUTATION);\n return { error, loading, logout };\n};\n\nexport const useRefreshToken = () => {\n const [refreshToken, { loading, error }] = useMutation<{\n refreshToken: RefreshTokenMutationResponse;\n }>(REFRESH_TOKEN_MUTATION);\n return { error, loading, refreshToken };\n};\n\nexport const useRequestPasswordReset = () => {\n const [requestPasswordReset, { loading, error }] = useMutation<{\n requestPasswordReset: MessageOnlyResponse;\n }>(REQUEST_PASSWORD_RESET_MUTATION);\n\n return { error, loading, requestPasswordReset };\n};\n\nexport const useValidateVerificationToken = () => {\n const [validateVerificationToken, { loading, error }] = useMutation<{\n validateVerificationToken: MessageOnlyResponse;\n }>(VALIDATE_VERIFICATION_TOKEN_MUTATION);\n\n return { error, loading, validateVerificationToken };\n};\n\nexport const useResetPassword = () => {\n const [resetPassword, { loading, error }] = useMutation<{\n resetPassword: MessageOnlyResponse;\n }>(RESET_PASSWORD_MUTATION);\n\n return { error, loading, resetPassword };\n};\n","import { gql } from \"@apollo/client\";\n\nimport { USER_FIELDS_FRAGMENT } from \"../queries/global\";\n\nexport const REGISTER_MUTATION = gql`\n mutation register($input: RegisterInputType!) {\n register(input: $input) {\n data {\n refreshToken\n token\n user {\n ...UserFields\n }\n }\n message\n }\n }\n ${USER_FIELDS_FRAGMENT}\n`;\n\nexport const LOGIN_MUTATION = gql`\n mutation login($input: LoginInputType!) {\n login(input: $input) {\n data {\n refreshToken\n token\n user {\n ...UserFields\n }\n }\n message\n }\n }\n ${USER_FIELDS_FRAGMENT}\n`;\n\nexport const LOGOUT_MUTATION = gql`\n mutation logout {\n logout {\n data\n message\n }\n }\n`;\n\nexport const REFRESH_TOKEN_MUTATION = gql`\n mutation refreshToken($input: RefreshTokenInputType!) {\n refreshToken(input: $input) {\n data {\n refreshToken\n token\n }\n message\n }\n }\n`;\n\nexport const RESET_PASSWORD_MUTATION = gql`\n mutation resetPassword($input: ResetPasswordInputType!) {\n resetPassword(input: $input) {\n data\n message\n }\n }\n`;\n\nexport const REQUEST_PASSWORD_RESET_MUTATION = gql`\n mutation requestPasswordReset($input: RequestPasswordResetInputType!) {\n requestPasswordReset(input: $input) {\n data\n message\n }\n }\n`;\n\nexport const VALIDATE_VERIFICATION_TOKEN_MUTATION = gql`\n mutation validateVerificationToken(\n $input: ValidateVerificationTokenInputType!\n ) {\n validateVerificationToken(input: $input) {\n data\n message\n }\n }\n`;\n","import { gql } from \"@apollo/client\";\n\nexport const POSTER_USAGE_FIELDS_FRAGMENT = gql`\n fragment PosterUsageFields on PosterUsageType {\n month\n count\n }\n`;\n\nexport const SOCIAL_MEDIA_FIELDS_FRAGMENT = gql`\n fragment SocialMediaFields on SocialMediaType {\n name\n link\n }\n`;\n\nexport const RESOURCE_IMAGE_FIELDS_FRAGMENT = gql`\n fragment ResourceImageFields on ResourceImageType {\n active\n source\n title\n }\n`;\n\nexport const OWNER_FIELDS_FRAGMENT = gql`\n fragment OwnerFields on OwnerType {\n email\n userId\n }\n`;\n\nexport const CATEGORY_FIELDS_FRAGMENT = gql`\n fragment CategoryFields on CategoryType {\n id\n name\n subcategories {\n id\n items {\n id\n name\n }\n name\n }\n }\n`;\n\nexport const LICENCE_FIELDS_FRAGMENT = gql`\n fragment LicenceFields on UserLicenceType {\n expiryDate\n issuedDate\n licenceType\n prevLicenceType\n }\n`;\n\nexport const TERMS_AGREEMENT_FIELDS_FRAGMENT = gql`\n fragment TermsAgreementFields on TermsAgreementType {\n appBuildNumber\n appId\n appVersion\n brand\n deviceName\n installationId\n manufacturer\n modelName\n osName\n osVersion\n termVersion\n timestamp\n }\n`;\n\nexport const DATETIME_FIELDS_FRAGMENT = gql`\n fragment DateTimeFields on DateTimeType {\n dateStatus\n endDate\n endTime\n startDate\n startTime\n }\n`;\n\nexport const LOCATION_GEO_FIELDS_FRAGMENT = gql`\n fragment LocationGeoFields on LocationGeoType {\n coordinates\n type\n }\n`;\n\nexport const LOCATION_FIELDS_FRAGMENT = gql`\n fragment LocationFields on LocationType {\n city\n country\n fullAddress\n geo {\n ...LocationGeoFields\n }\n latitude\n longitude\n region\n }\n ${LOCATION_GEO_FIELDS_FRAGMENT}\n`;\n\nconst USER_ACTIVITY_FIELDS_FRAGMENT = gql`\n fragment UserActivityFields on UserActivityType {\n favourites {\n events\n partners\n vendors\n }\n going {\n events {\n resourceId\n dateTime {\n ...DateTimeFields\n }\n }\n }\n interested {\n events {\n resourceId\n dateTime {\n ...DateTimeFields\n }\n }\n }\n present {\n events {\n resourceId\n dateTime {\n ...DateTimeFields\n }\n }\n }\n }\n ${DATETIME_FIELDS_FRAGMENT}\n`;\n\nexport const REDEEMED_REWARD_FIELDS_FRAGMENT = gql`\n fragment RedeemedRewardFields on RedeemedRewardType {\n name\n pointsUsed\n redeemedAt\n }\n`;\n\nconst STRIPE_FIELDS_FRAGMENT = gql`\n fragment StripeSubscriptionFields on StripeSubscriptionType {\n customerId\n subscriptionId\n status\n currentPlan\n startDate\n endDate\n }\n`;\n\nexport const USER_FIELDS_FRAGMENT = gql`\n fragment UserFields on UserType {\n _id\n active\n affiliate\n avatar {\n ...ResourceImageFields\n }\n coupon\n createdAt\n deletedAt\n email\n events\n firstName\n game\n isTester\n lastName\n licences {\n ...LicenceFields\n }\n location {\n ...LocationFields\n }\n partner\n overallPoints\n platform\n preferredRegion\n permissions\n promoCodes\n roles\n redeemedRewards {\n ...RedeemedRewardFields\n }\n school\n stripe {\n ...StripeSubscriptionFields\n }\n termsAgreement {\n ...TermsAgreementFields\n }\n userActivity {\n ...UserActivityFields\n }\n vendor\n updatedAt\n }\n ${RESOURCE_IMAGE_FIELDS_FRAGMENT}\n ${TERMS_AGREEMENT_FIELDS_FRAGMENT}\n ${USER_ACTIVITY_FIELDS_FRAGMENT}\n ${LICENCE_FIELDS_FRAGMENT}\n ${LOCATION_FIELDS_FRAGMENT}\n ${REDEEMED_REWARD_FIELDS_FRAGMENT}\n ${STRIPE_FIELDS_FRAGMENT}\n`;\n\nexport const STALL_TYPE_FIELDS_FRAGMENT = gql`\n fragment StallTypeFields on StallTypeType {\n label\n price\n stallCapacity\n }\n`;\n\nexport const RELATION_DATES_FRAGMENT = gql`\n fragment RelationDates on RelationDateType {\n dateTime {\n dateStatus\n endDate\n endTime\n startDate\n startTime\n stallType {\n ...StallTypeFields\n }\n }\n lastUpdateBy {\n resourceId\n userEmail\n }\n paymentReference\n status\n }\n ${STALL_TYPE_FIELDS_FRAGMENT}\n`;\n\nexport const CONTACT_DETAILS_FIELDS_FRAGMENT = gql`\n fragment ContactDetailsFields on ContactDetailsType {\n email\n landlinePhone\n mobilePhone\n }\n`;\n\nexport const EVENT_LIST_ITEM = gql`\n fragment EventListItemFields on EventListItemType {\n _id\n active\n approvedAt\n claimed\n cover {\n ...ResourceImageFields\n }\n createdAt\n dateTime {\n ...DateTimeFields\n }\n deletedAt\n description\n eventType\n googlePlaceId\n images {\n ...ResourceImageFields\n }\n location {\n ...LocationFields\n }\n logo {\n ...ResourceImageFields\n }\n name\n rainOrShine\n rating\n region\n relations {\n relationId\n relationDates {\n ...RelationDates\n }\n }\n reviewCount\n slug\n updatedAt\n }\n ${DATETIME_FIELDS_FRAGMENT}\n ${LOCATION_FIELDS_FRAGMENT}\n ${RESOURCE_IMAGE_FIELDS_FRAGMENT}\n ${RELATION_DATES_FRAGMENT}\n`;\n\nexport const RELATED_POST_FIELDS_FRAGMENT = gql`\n fragment RelatedPostFields on RelatedPostType {\n postActive\n postId\n postSlug\n postType\n }\n`;\n\nexport const SOCIAL_SHARE_RESOURCE_FIELDS_FRAGMENT = gql`\n fragment SocialShareResourceFields on SocialShareResourceType {\n qrCode {\n ...ResourceImageFields\n }\n socialImage {\n ...ResourceImageFields\n }\n }\n ${RESOURCE_IMAGE_FIELDS_FRAGMENT}\n`;\n","import { gql } from \"@apollo/client\";\n\nimport {\n CONTACT_DETAILS_FIELDS_FRAGMENT,\n DATETIME_FIELDS_FRAGMENT,\n OWNER_FIELDS_FRAGMENT,\n POSTER_USAGE_FIELDS_FRAGMENT,\n RELATION_DATES_FRAGMENT,\n RESOURCE_IMAGE_FIELDS_FRAGMENT,\n SOCIAL_MEDIA_FIELDS_FRAGMENT,\n STALL_TYPE_FIELDS_FRAGMENT,\n TERMS_AGREEMENT_FIELDS_FRAGMENT,\n LOCATION_FIELDS_FRAGMENT,\n EVENT_LIST_ITEM,\n RELATED_POST_FIELDS_FRAGMENT,\n SOCIAL_SHARE_RESOURCE_FIELDS_FRAGMENT,\n} from \"./global\";\n\nexport const EVENT_INFO = gql`\n fragment EventInfoFields on EventInfoType {\n _id\n applicationDeadlineHours\n dateTime {\n dateStatus\n endDate\n endTime\n stallTypes {\n ...StallTypeFields\n }\n startDate\n startTime\n }\n eventId\n packInTime\n paymentDueHours\n paymentInfo {\n accountHolderName\n accountNumber\n link\n paymentMethod\n }\n refundPolicy {\n category\n label\n value\n }\n requirements {\n category\n label\n value\n }\n }\n ${STALL_TYPE_FIELDS_FRAGMENT}\n`;\n\nexport const EVENT = gql`\n fragment EventFields on EventType {\n _id\n active\n adIds\n approvedAt\n cover {\n ...ResourceImageFields\n }\n claimed\n createdAt\n contactDetails {\n ...ContactDetailsFields\n }\n dateTime {\n ...DateTimeFields\n }\n description\n deletedAt\n googlePlaceId\n images {\n ...ResourceImageFields\n }\n eventType\n location {\n ...LocationFields\n }\n logo {\n ...ResourceImageFields\n }\n eventInfoId\n name\n nzbn\n owner {\n ...OwnerFields\n }\n promoCodes\n provider\n posterUsage {\n ...PosterUsageFields\n }\n region\n relations {\n relationId\n relationDates {\n ...RelationDates\n }\n }\n rating\n reviewCount\n rainOrShine\n relatedPost {\n ...RelatedPostFields\n }\n socialMedia {\n ...SocialMediaFields\n }\n sharePublic {\n ...SocialShareResourceFields\n }\n shareRelation {\n ...SocialShareResourceFields\n }\n slug\n tags\n termsAgreement {\n ...TermsAgreementFields\n }\n updatedAt\n }\n ${DATETIME_FIELDS_FRAGMENT}\n ${LOCATION_FIELDS_FRAGMENT}\n ${OWNER_FIELDS_FRAGMENT}\n ${RESOURCE_IMAGE_FIELDS_FRAGMENT}\n ${SOCIAL_MEDIA_FIELDS_FRAGMENT}\n ${POSTER_USAGE_FIELDS_FRAGMENT}\n ${CONTACT_DETAILS_FIELDS_FRAGMENT}\n ${TERMS_AGREEMENT_FIELDS_FRAGMENT}\n ${RELATION_DATES_FRAGMENT}\n ${RELATED_POST_FIELDS_FRAGMENT}\n ${SOCIAL_SHARE_RESOURCE_FIELDS_FRAGMENT}\n`;\n\nexport const GET_EVENTS = gql`\n query getEvents($dateStatus: EventDateStatusEnumType) {\n events(dateStatus: $dateStatus) {\n ...EventListItemFields\n }\n }\n ${EVENT_LIST_ITEM}\n`;\n\nexport const GET_EVENT = gql`\n query getEvent($_id: ID!) {\n event(_id: $_id) {\n ...EventFields\n }\n }\n ${EVENT}\n`;\n\nexport const GET_EVENT_BY_PLACE_ID = gql`\n query getEventByPlaceId($googlePlaceId: String!) {\n eventByPlaceId(googlePlaceId: $googlePlaceId) {\n ...EventListItemFields\n }\n }\n ${EVENT_LIST_ITEM}\n`;\n\nexport const GET_EVENTS_BY_REGION = gql`\n query getEventsByRegion(\n $region: String!\n $options: ResourcesByRegionOptions\n $dateStatus: EventDateStatusEnumType\n ) {\n eventsByRegion(\n region: $region\n options: $options\n dateStatus: $dateStatus\n ) {\n ...EventListItemFields\n }\n }\n ${EVENT_LIST_ITEM}\n`;\n\nexport const SEARCH_EVENTS = gql`\n query searchEvents(\n $region: String!\n $search: String\n $tags: [String]\n $dateStatus: EventDateStatusEnumType\n ) {\n eventsSearch(\n region: $region\n search: $search\n tags: $tags\n dateStatus: $dateStatus\n ) {\n ...EventListItemFields\n }\n }\n ${EVENT_LIST_ITEM}\n`;\n\nexport const GET_EVENTS_NEAR_ME = gql`\n query getEventsNearMe(\n $latitude: Float!\n $longitude: Float!\n $radius: Int\n $dateStatus: EventDateStatusEnumType\n ) {\n eventsNearMe(\n latitude: $latitude\n longitude: $longitude\n radius: $radius\n dateStatus: $dateStatus\n ) {\n ...EventListItemFields\n }\n }\n ${EVENT_LIST_ITEM}\n`;\n\nexport const GET_EVENT_INFO = gql`\n query getEventInfo($eventId: ID!) {\n eventInfo(eventId: $eventId) {\n ...EventInfoFields\n }\n }\n ${EVENT_INFO}\n`;\n","import { gql } from \"@apollo/client\";\n\nimport {\n CONTACT_DETAILS_FIELDS_FRAGMENT,\n LOCATION_FIELDS_FRAGMENT,\n OWNER_FIELDS_FRAGMENT,\n POSTER_USAGE_FIELDS_FRAGMENT,\n RELATED_POST_FIELDS_FRAGMENT,\n RESOURCE_IMAGE_FIELDS_FRAGMENT,\n SOCIAL_MEDIA_FIELDS_FRAGMENT,\n SOCIAL_SHARE_RESOURCE_FIELDS_FRAGMENT,\n TERMS_AGREEMENT_FIELDS_FRAGMENT,\n} from \"./global\";\n\nexport const PARTNER = gql`\n fragment PartnerFields on PartnerType {\n _id\n active\n adIds\n approvedAt\n cover {\n ...ResourceImageFields\n }\n createdAt\n contactDetails {\n ...ContactDetailsFields\n }\n description\n deletedAt\n images {\n ...ResourceImageFields\n }\n location {\n ...LocationFields\n }\n logo {\n ...ResourceImageFields\n }\n name\n nzbn\n owner {\n ...OwnerFields\n }\n partnerType\n posterUsage {\n ...PosterUsageFields\n }\n rating\n region\n reviewCount\n relatedPost {\n ...RelatedPostFields\n }\n socialMedia {\n ...SocialMediaFields\n }\n slug\n sharePublic {\n ...SocialShareResourceFields\n }\n termsAgreement {\n ...TermsAgreementFields\n }\n updatedAt\n }\n ${TERMS_AGREEMENT_FIELDS_FRAGMENT}\n ${LOCATION_FIELDS_FRAGMENT}\n ${OWNER_FIELDS_FRAGMENT}\n ${RESOURCE_IMAGE_FIELDS_FRAGMENT}\n ${POSTER_USAGE_FIELDS_FRAGMENT}\n ${SOCIAL_MEDIA_FIELDS_FRAGMENT}\n ${CONTACT_DETAILS_FIELDS_FRAGMENT}\n ${RELATED_POST_FIELDS_FRAGMENT}\n ${SOCIAL_SHARE_RESOURCE_FIELDS_FRAGMENT}\n`;\n\nexport const GET_PARTNERS = gql`\n query getPartners {\n partners {\n ...PartnerFields\n }\n }\n ${PARTNER}\n`;\n\nexport const GET_PARTNER = gql`\n query getPartner($_id: ID!) {\n partner(_id: $_id) {\n ...PartnerFields\n }\n }\n ${PARTNER}\n`;\n\nexport const GET_PARTNERS_BY_REGION = gql`\n query getPartnersByRegion(\n $region: String!\n $options: ResourcesByRegionOptions\n ) {\n partnersByRegion(region: $region, options: $options) {\n ...PartnerFields\n }\n }\n ${PARTNER}\n`;\n\nexport const SEARCH_PARTNERS = gql`\n query searchPartners($search: String!, $region: String!) {\n partnersSearch(search: $search, region: $region) {\n ...PartnerFields\n }\n }\n ${PARTNER}\n`;\n","import { gql } from \"@apollo/client\";\n\nimport { PRODUCT_COUPON_FIELDS_FRAGMENT } from \"./coupon\";\nimport {\n OWNER_FIELDS_FRAGMENT,\n CATEGORY_FIELDS_FRAGMENT,\n RESOURCE_IMAGE_FIELDS_FRAGMENT,\n SOCIAL_MEDIA_FIELDS_FRAGMENT,\n POSTER_USAGE_FIELDS_FRAGMENT,\n CONTACT_DETAILS_FIELDS_FRAGMENT,\n TERMS_AGREEMENT_FIELDS_FRAGMENT,\n RELATION_DATES_FRAGMENT,\n DATETIME_FIELDS_FRAGMENT,\n LOCATION_FIELDS_FRAGMENT,\n RELATED_POST_FIELDS_FRAGMENT,\n SOCIAL_SHARE_RESOURCE_FIELDS_FRAGMENT,\n} from \"./global\";\n\nconst VENDOR_DATETIME_FIELDS_FRAGMENT = gql`\n fragment VendorDateTimeFields on VendorDateTimeType {\n dateStatus\n endDate\n endTime\n startDate\n startTime\n }\n`;\n\nexport const VENDOR_PRODUCT_LIST_FIELDS_FRAGMENT = gql`\n fragment VendorProductListFields on VendorProductListType {\n _id\n coupon {\n ...ProductCouponFields\n }\n createdAt\n description\n name\n price\n priceUnit\n productGroups\n updatedAt\n }\n ${PRODUCT_COUPON_FIELDS_FRAGMENT}\n`;\n\nexport const VENDOR = gql`\n fragment VendorFields on VendorType {\n _id\n active\n adIds\n approvedAt\n availability {\n corporate\n private\n school\n }\n vendorInfoId\n categories {\n ...CategoryFields\n }\n calendar {\n active\n calendarData {\n dateTime {\n ...VendorDateTimeFields\n }\n description\n location {\n ...LocationFields\n }\n }\n }\n contactDetails {\n ...ContactDetailsFields\n }\n cover {\n ...ResourceImageFields\n }\n createdAt\n claimed\n description\n deletedAt\n foodTruck\n images {\n ...ResourceImageFields\n }\n logo {\n ...ResourceImageFields\n }\n name\n owner {\n ...OwnerFields\n }\n products {\n active\n productsList {\n ...VendorProductListFields\n }\n }\n promoCodes\n posterUsage {\n ...PosterUsageFields\n }\n rating\n region\n reviewCount\n relatedPost {\n ...RelatedPostFields\n }\n relations {\n relationId\n relationDates {\n ...RelationDates\n }\n }\n slug\n socialMedia {\n ...SocialMediaFields\n }\n sharePublic {\n ...SocialShareResourceFields\n }\n shareRelation {\n ...SocialShareResourceFields\n }\n termsAgreement {\n ...TermsAgreementFields\n }\n updatedAt\n vendorType\n unregisteredVendorId\n }\n ${CATEGORY_FIELDS_FRAGMENT}\n ${VENDOR_DATETIME_FIELDS_FRAGMENT}\n ${LOCATION_FIELDS_FRAGMENT}\n ${OWNER_FIELDS_FRAGMENT}\n ${RESOURCE_IMAGE_FIELDS_FRAGMENT}\n ${SOCIAL_MEDIA_FIELDS_FRAGMENT}\n ${POSTER_USAGE_FIELDS_FRAGMENT}\n ${VENDOR_PRODUCT_LIST_FIELDS_FRAGMENT}\n ${CONTACT_DETAILS_FIELDS_FRAGMENT}\n ${TERMS_AGREEMENT_FIELDS_FRAGMENT}\n ${RELATION_DATES_FRAGMENT}\n ${RELATED_POST_FIELDS_FRAGMENT}\n ${SOCIAL_SHARE_RESOURCE_FIELDS_FRAGMENT}\n`;\n\nconst VENDOR_ATTRIBUTES_FRAGMENT = gql`\n fragment VendorAttributesFields on VendorAttributesType {\n details\n isRequired\n }\n`;\n\nexport const VENDOR_INFO = gql`\n fragment VendorInfoFields on VendorInfoType {\n _id\n compliance {\n foodBeverageLicense\n liabilityInsurance\n }\n documents {\n ...ResourceImageFields\n }\n requirements {\n electricity {\n ...VendorAttributesFields\n }\n gazebo {\n ...VendorAttributesFields\n }\n table {\n ...VendorAttributesFields\n }\n }\n product {\n foodFlavors\n packaging\n priceRange {\n max\n min\n }\n producedIn\n }\n stallInfo {\n size {\n depth\n width\n }\n }\n vendorId\n }\n ${VENDOR_ATTRIBUTES_FRAGMENT}\n ${RESOURCE_IMAGE_FIELDS_FRAGMENT}\n`;\n\nconst UNREGISTERED_VENDOR_INVITATION_FRAGMENT = gql`\n fragment UnregisteredVendorInvitationFields on UnregisteredVendorInvitationType {\n dateTime {\n ...DateTimeFields\n }\n inviterId\n }\n ${DATETIME_FIELDS_FRAGMENT}\n`;\n\nexport const UNREGISTERED_VENDOR = gql`\n fragment UnregisteredVendorFields on UnregisteredVendorType {\n _id\n active\n categoryIds\n claimed\n claimedAt\n claimedByUserId\n createdAt\n deletedAt\n email\n invitations {\n ...UnregisteredVendorInvitationFields\n }\n name\n region\n updatedAt\n }\n ${UNREGISTERED_VENDOR_INVITATION_FRAGMENT}\n`;\n\nexport const GET_VENDORS = gql`\n query getVendors {\n vendors {\n ...VendorFields\n }\n }\n ${VENDOR}\n`;\n\nexport const GET_VENDOR = gql`\n query getVendor($_id: ID!) {\n vendor(_id: $_id) {\n ...VendorFields\n }\n }\n ${VENDOR}\n`;\n\nexport const GET_VENDORS_BY_REGION = gql`\n query getVendorsByRegion(\n $region: String!\n $options: ResourcesByRegionOptions\n ) {\n vendorsByRegion(region: $region, options: $options) {\n ...VendorFields\n }\n }\n ${VENDOR}\n`;\n\nexport const SEARCH_VENDORS = gql`\n query searchVendors($search: String!, $region: String!) {\n vendorSearch(search: $search, region: $region) {\n ...VendorFields\n }\n }\n ${VENDOR}\n`;\n\nexport const GET_VENDOR_INFO = gql`\n query getVendorInfo($vendorId: ID!) {\n vendorInfo(vendorId: $vendorId) {\n ...VendorInfoFields\n }\n }\n ${VENDOR_INFO}\n`;\n\nexport const GET_UNREGISTERED_VENDORS = gql`\n query getUnregisteredVendors {\n unregisteredVendors {\n ...UnregisteredVendorFields\n }\n }\n ${UNREGISTERED_VENDOR}\n`;\n\nexport const GET_UNREGISTERED_VENDORS_BY_INVITER_ID = gql`\n query getUnregisteredVendorsByInviterId($inviterId: ID!) {\n unregisteredVendorsByInviterId(inviterId: $inviterId) {\n ...UnregisteredVendorFields\n }\n }\n ${UNREGISTERED_VENDOR}\n`;\n\nexport const GET_UNREGISTERED_VENDOR = gql`\n query getUnregisteredVendor($_id: ID!) {\n unregisteredVendor(_id: $_id) {\n ...UnregisteredVendorFields\n }\n }\n ${UNREGISTERED_VENDOR}\n`;\n\nexport const MY_PENDING_VENDOR_CLAIM = gql`\n query myPendingVendorClaim {\n myPendingVendorClaim {\n _id\n name\n region\n }\n }\n`;\n","import { gql } from \"@apollo/client\";\n\nimport {\n OWNER_FIELDS_FRAGMENT,\n RESOURCE_IMAGE_FIELDS_FRAGMENT,\n} from \"./global\";\n\nexport const PRODUCT_COUPON_FIELDS_FRAGMENT = gql`\n fragment ProductCouponFields on ProductCouponType {\n couponDocumentId\n couponId\n }\n`;\n\nconst COUPON_CODE_FIELDS_FRAGMENT = gql`\n fragment CouponCodeFields on CouponCodeType {\n code\n qrCode {\n ...ResourceImageFields\n }\n }\n ${RESOURCE_IMAGE_FIELDS_FRAGMENT}\n`;\n\nconst COUPON_PARTICIPANT_USER_FIELDS_FRAGMENT = gql`\n fragment CouponParticipantUserFields on CouponParticipantUserType {\n couponCollectedCount\n couponRedeemedAt\n createdAt\n updatedAt\n userId\n }\n`;\n\nconst COUPON_DATA_FIELDS_FRAGMENT = gql`\n fragment CouponDataFields on CouponDataType {\n _id\n active\n couponCode {\n ...CouponCodeFields\n }\n couponDescription\n couponOption\n createdAt\n endDate\n participantProductId\n participantUsers {\n ...CouponParticipantUserFields\n }\n resourceId\n resourceType\n startDate\n updatedAt\n }\n ${COUPON_CODE_FIELDS_FRAGMENT}\n ${COUPON_PARTICIPANT_USER_FIELDS_FRAGMENT}\n`;\n\nexport const COUPON = gql`\n fragment CouponFields on CouponType {\n _id\n active\n couponData {\n ...CouponDataFields\n }\n createdAt\n deletedAt\n owner {\n ...OwnerFields\n }\n updatedAt\n }\n ${OWNER_FIELDS_FRAGMENT}\n ${COUPON_DATA_FIELDS_FRAGMENT}\n ${COUPON_CODE_FIELDS_FRAGMENT}\n ${COUPON_PARTICIPANT_USER_FIELDS_FRAGMENT}\n`;\n\nexport const GET_COUPONS = gql`\n query getCoupons {\n coupons {\n ...CouponFields\n }\n }\n ${COUPON}\n`;\n\nexport const GET_COUPON = gql`\n query getCoupon($_id: ID!) {\n coupon(_id: $_id) {\n ...CouponFields\n }\n }\n ${COUPON}\n`;\n","import { useQuery } from \"@apollo/client\";\n\nimport {\n EventListItemType,\n EventType,\n PartnerType,\n VendorType,\n ResourceByUser,\n SafeUserType,\n} from \"src/types\";\n\nimport {\n GET_USER,\n GET_USER_ACTIVITIES,\n GET_USER_EVENTS,\n GET_USER_PARTNERS,\n GET_USER_RESOURCES,\n GET_USER_VENDORS,\n GET_USERS,\n} from \"../../queries/user\";\n\nexport const useGetUsers = () => {\n const { loading, error, data, refetch } = useQuery<{ users: SafeUserType[] }>(\n GET_USERS,\n {\n fetchPolicy: \"network-only\",\n },\n );\n\n const users = data?.users || [];\n\n return { error, loading, refetch, users };\n};\n\nexport const useGetUser = (_id: string) => {\n const { loading, error, data, refetch } = useQuery<{ user: SafeUserType }>(\n GET_USER,\n {\n fetchPolicy: \"network-only\",\n skip: !_id || _id === \"\",\n variables: { _id },\n },\n );\n\n const user = data?.user;\n\n return { error, loading, refetch, user };\n};\n\nexport const useGetUserEvents = () => {\n const { loading, error, data, refetch } = useQuery<{\n userEvents: EventType[];\n }>(GET_USER_EVENTS, {\n fetchPolicy: \"network-only\",\n });\n\n const userEvents = data?.userEvents || [];\n\n return { error, loading, refetch, userEvents };\n};\n\nexport const useGetUserVendors = () => {\n const { loading, error, data, refetch } = useQuery<{\n userVendors: VendorType[];\n }>(GET_USER_VENDORS, {\n fetchPolicy: \"network-only\",\n });\n\n const userVendors = data?.userVendors || [];\n\n return { error, loading, refetch, userVendors };\n};\n\nexport const useGetUserPartners = () => {\n const { loading, error, data, refetch } = useQuery<{\n userPartners: PartnerType[];\n }>(GET_USER_PARTNERS, {\n fetchPolicy: \"network-only\",\n });\n\n const userPartners = data?.userPartners || [];\n\n return { error, loading, refetch, userPartners };\n};\n\nexport const useGetUserActivities = () => {\n const { loading, error, data, refetch } = useQuery<{\n userActivities: {\n favourites: {\n events: EventListItemType[];\n partners: PartnerType[];\n vendors: VendorType[];\n };\n going: {\n events: EventListItemType[];\n };\n interested: {\n events: EventListItemType[];\n };\n present: {\n events: EventListItemType[];\n };\n };\n }>(GET_USER_ACTIVITIES, {\n fetchPolicy: \"network-only\",\n });\n\n const userActivities = {\n favourites: {\n events: data?.userActivities.favourites.events || [],\n partners: data?.userActivities.favourites.partners || [],\n vendors: data?.userActivities.favourites.vendors || [],\n },\n going: {\n events: data?.userActivities.going.events || [],\n },\n interested: {\n events: data?.userActivities.interested.events || [],\n },\n present: {\n events: data?.userActivities.present.events || [],\n },\n };\n\n return { error, loading, refetch, userActivities };\n};\n\nexport const useGetUserResources = (userId: string) => {\n const { loading, error, data, refetch } = useQuery<{\n userResources: {\n resources: ResourceByUser[];\n };\n }>(GET_USER_RESOURCES, {\n fetchPolicy: \"network-only\",\n skip: !userId || userId === \"\",\n variables: { userId },\n });\n\n const userResources = data?.userResources.resources || [];\n\n return { error, loading, refetch, userResources };\n};\n","import { gql } from \"@apollo/client\";\n\nimport { EVENT } from \"./event\";\nimport { EVENT_LIST_ITEM, USER_FIELDS_FRAGMENT } from \"./global\";\nimport { PARTNER } from \"./partner\";\nimport { VENDOR } from \"./vendor\";\n\nexport const GET_USERS = gql`\n query getUsers {\n users {\n ...UserFields\n }\n }\n ${USER_FIELDS_FRAGMENT}\n`;\n\nexport const GET_USER = gql`\n query getUser($_id: ID!) {\n user(_id: $_id) {\n ...UserFields\n }\n }\n ${USER_FIELDS_FRAGMENT}\n`;\n\nexport const GET_USER_EVENTS = gql`\n query getUserEvents {\n userEvents {\n ...EventFields\n }\n }\n ${EVENT}\n`;\n\nexport const GET_USER_VENDORS = gql`\n query getUserVendors {\n userVendors {\n ...VendorFields\n }\n }\n ${VENDOR}\n`;\n\nexport const GET_USER_PARTNERS = gql`\n query getUserPartners {\n userPartners {\n ...PartnerFields\n }\n }\n ${PARTNER}\n`;\n\nexport const GET_USER_ACTIVITIES = gql`\n query getUserActivities {\n userActivities {\n favourites {\n events {\n ...EventListItemFields\n }\n partners {\n ...PartnerFields\n }\n vendors {\n ...VendorFields\n }\n }\n going {\n events {\n ...EventListItemFields\n }\n }\n interested {\n events {\n ...EventListItemFields\n }\n }\n present {\n events {\n ...EventListItemFields\n }\n }\n }\n }\n ${EVENT_LIST_ITEM}\n ${VENDOR}\n ${PARTNER}\n`;\n\nexport const GET_USER_RESOURCES = gql`\n query getUserResources($userId: ID!) {\n userResources(userId: $userId) {\n resources {\n _id\n logo\n name\n resourceType\n }\n }\n }\n`;\n"],"mappings":";AAAA,SAAS,mBAAmB;;;ACA5B,SAAS,OAAAA,YAAW;;;ACApB,SAAS,WAAW;AAEb,IAAM,+BAA+B;AAAA;AAAA;AAAA;AAAA;AAAA;AAOrC,IAAM,+BAA+B;AAAA;AAAA;AAAA;AAAA;AAAA;AAOrC,IAAM,iCAAiC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQvC,I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X41.js';
1
+ import { Z as CreateFormData } from './global-CF8hwvkc.js';
2
2
 
3
3
  type ContactUsFormData = {
4
4
  email: string;
@@ -1,4 +1,4 @@
1
- import { J as CreateFormData } from './global-BC6YWupC.mjs';
1
+ import { Z as CreateFormData } from './global-Ch11tfC6.mjs';
2
2
 
3
3
  type ContactUsFormData = {
4
4
  email: string;
@@ -1,4 +1,4 @@
1
- import { O as OptionItem, F as FormField, a as FormDateField, R as RefundPolicy, b as Requirement, S as StallType, C as Category } from '../global-BC6YWupC.mjs';
1
+ import { O as OptionItem, F as FormField, a as FormDateField, R as RefundPolicy, b as Requirement, S as StallType, C as Category } from '../global-Ch11tfC6.mjs';
2
2
  import 'react-hook-form';
3
3
  import '../enums/index.mjs';
4
4
 
@@ -1,4 +1,4 @@
1
- import { O as OptionItem, F as FormField, a as FormDateField, R as RefundPolicy, b as Requirement, S as StallType, C as Category } from '../global-Ch0I5X41.js';
1
+ import { O as OptionItem, F as FormField, a as FormDateField, R as RefundPolicy, b as Requirement, S as StallType, C as Category } from '../global-CF8hwvkc.js';
2
2
  import 'react-hook-form';
3
3
  import '../enums/index.js';
4
4
 
@@ -46,7 +46,7 @@ import {
46
46
  import {
47
47
  availableCategories,
48
48
  categoryColors
49
- } from "../chunk-4G4OFSBZ.mjs";
49
+ } from "../chunk-PACEDU64.mjs";
50
50
  import "../chunk-SD42WIMV.mjs";
51
51
  import "../chunk-7TL4ZSUO.mjs";
52
52
  import "../chunk-RAYUJODN.mjs";
@@ -383,14 +383,63 @@ type PostType = Omit<PostFormData, "content" | "coverUpload" | "resource"> & {
383
383
  updatedAt: Date | null;
384
384
  };
385
385
 
386
+ type ProductCoupon = {
387
+ couponDocumentId: string;
388
+ couponId: string;
389
+ };
390
+ type CouponTypeOption = {
391
+ buy: number;
392
+ get: number;
393
+ unit: string;
394
+ };
395
+ type CouponDefaultsFormData = {
396
+ couponDescription: string;
397
+ couponOption: CouponTypeOption;
398
+ endDate: Date;
399
+ participantProductId: string;
400
+ startDate: Date;
401
+ };
402
+ type CreateCouponFormData = CreateFormData<CouponDefaultsFormData>;
403
+ type CouponParticipantUserType = {
404
+ couponCollectedCount: number;
405
+ couponRedeemedAt: Date | null;
406
+ createdAt: Date;
407
+ updatedAt: Date | null;
408
+ userId: string;
409
+ };
410
+ type CouponCodeType = {
411
+ code: string;
412
+ qrCode: ResourceImageType;
413
+ };
414
+ type CouponDataType = CouponDefaultsFormData & {
415
+ _id: string;
416
+ active: boolean;
417
+ couponCode: CouponCodeType;
418
+ createdAt: Date;
419
+ participantUsers: CouponParticipantUserType[] | null;
420
+ resourceId: string;
421
+ resourceType: EnumResourceType;
422
+ updatedAt: Date | null;
423
+ };
424
+ type CreateCouponDefaults = Omit<CouponDataType, "_id">;
425
+ interface CouponType {
426
+ _id: string;
427
+ active: boolean;
428
+ couponData: CouponDataType[] | null;
429
+ createdAt: Date;
430
+ deletedAt: Date | null;
431
+ owner: OwnerType;
432
+ updatedAt: Date | null;
433
+ }
434
+
386
435
  type VendorCalendarData = Omit<ResourceDetails, "dateTime" | "eventStatus"> & {
387
436
  dateTime: DateTimeType;
388
437
  };
389
438
  type VendorProductList = {
390
439
  _id?: string;
440
+ coupon?: ProductCoupon | null;
391
441
  createdAt?: Date | null;
392
442
  description?: string | null;
393
- hasCoupon?: boolean | null;
394
443
  name: string;
395
444
  price: number;
396
445
  priceUnit: string;
@@ -709,4 +758,4 @@ interface UseGetResourcesByRegionOptions {
709
758
  offset?: number;
710
759
  }
711
760
 
712
- export { type GameDate as $, type Region as A, type BaseResourceTypeFormData as B, type Category as C, type BaseGameMap as D, type EventType as E, type FormField as F, type GameDocType as G, type BaseGameType as H, type BaseResourceType as I, type CreateFormData as J, type DailyClueBaseGame as K, type LocationType as L, type MutationResponse as M, type DailyClueGameData as N, type OptionItem as O, type PosterUsageType as P, type DateTimeType as Q, type RefundPolicy as R, type StallType as S, type DateTimeWithPriceType as T, type UseGetResourcesByRegionOptions as U, type VendorClaimTokenValidation as V, type DeviceInfo as W, EnumGameStatus as X, EnumGameType as Y, EnumPostContentType as Z, type EventStatusType as _, type FormDateField as a, type GameHistory as a0, type GamePlacement as a1, type GamePlacementClue as a2, type GameType as a3, type GeocodeLocation as a4, type GlobalGameData as a5, type ImageObjectType as a6, type LocationGeoType as a7, type Nullable as a8, type OwnerType as a9, type Subcategory as aA, type SubcategoryItems as aB, type TermsAgreement as aC, type UnregisteredVendorInvitationType as aD, type VendorAttributes as aE, type VendorCalendarData as aF, type VendorProductList as aG, gameScreenIdentifierList as aH, gameTypeToDisplayName as aI, PROMO_CODE_PREFIX as aa, type PaymentInfoType as ab, type PostContentData as ac, type PostContentFormData as ad, type PostContentGame as ae, type PostContentImage as af, type PostContentList as ag, type PostContentTextarea as ah, type PostContentType as ai, type PostContentVideo as aj, type PostFileInput as ak, type PostResource as al, type PromoCodeType as am, type PuzzleAnswer as an, type PuzzleAnsweredQuestion as ao, type PuzzleBaseGame as ap, type PuzzleGameData as aq, type PuzzleQuestion as ar, type RelatedPostType as as, type RelationDate as at, type RelationInputType as au, type ResourceContactDetailsType as av, type ResourceDetails as aw, type ResourceImageType as ax, type SocialMediaType as ay, type SocialShareResourceType as az, type Requirement as b, type EventListItemType as c, type EventInfoType as d, type RelationType as e, type ResourceConnectionsType as f, type UnregisteredVendorType as g, type VendorType as h, type VendorInfoType as i, type MyPendingVendorClaim as j, type UserLicenceType as k, type PostType as l, EnumPostType as m, type GameLeaderboard as n, type VendorFormData as o, type CreateVendorFormData as p, type VendorInfoFormData as q, type CreateVendorInfoFormData as r, type UnregisteredVendorFormData as s, type CreateUnregisteredVendorFormData as t, type EventFormData as u, type CreateEventFormData as v, type EventInfoFormData as w, type CreateEventInfoFormData as x, type PostFormData as y, type CreatePostFormData as z };
761
+ export { type DailyClueGameData as $, type CreatePostFormData as A, type BaseResourceTypeFormData as B, type Category as C, type CouponDefaultsFormData as D, type EventType as E, type FormField as F, type GameDocType as G, type CreateCouponFormData as H, type Region as I, type BaseGameMap as J, type BaseGameType as K, type LocationType as L, type MutationResponse as M, type BaseResourceType as N, type OptionItem as O, type PosterUsageType as P, type CouponCodeType as Q, type RefundPolicy as R, type StallType as S, type CouponDataType as T, type UseGetResourcesByRegionOptions as U, type VendorClaimTokenValidation as V, type CouponParticipantUserType as W, type CouponTypeOption as X, type CreateCouponDefaults as Y, type CreateFormData as Z, type DailyClueBaseGame as _, type FormDateField as a, type DateTimeType as a0, type DateTimeWithPriceType as a1, type DeviceInfo as a2, EnumGameStatus as a3, EnumGameType as a4, EnumPostContentType as a5, type EventStatusType as a6, type GameDate as a7, type GameHistory as a8, type GamePlacement as a9, type PuzzleQuestion as aA, type RelatedPostType as aB, type RelationDate as aC, type RelationInputType as aD, type ResourceContactDetailsType as aE, type ResourceDetails as aF, type ResourceImageType as aG, type SocialMediaType as aH, type SocialShareResourceType as aI, type Subcategory as aJ, type SubcategoryItems as aK, type TermsAgreement as aL, type UnregisteredVendorInvitationType as aM, type VendorAttributes as aN, type VendorCalendarData as aO, type VendorProductList as aP, gameScreenIdentifierList as aQ, gameTypeToDisplayName as aR, type GamePlacementClue as aa, type GameType as ab, type GeocodeLocation as ac, type GlobalGameData as ad, type ImageObjectType as ae, type LocationGeoType as af, type Nullable as ag, type OwnerType as ah, PROMO_CODE_PREFIX as ai, type PaymentInfoType as aj, type PostContentData as ak, type PostContentFormData as al, type PostContentGame as am, type PostContentImage as an, type PostContentList as ao, type PostContentTextarea as ap, type PostContentType as aq, type PostContentVideo as ar, type PostFileInput as as, type PostResource as at, type ProductCoupon as au, type PromoCodeType as av, type PuzzleAnswer as aw, type PuzzleAnsweredQuestion as ax, type PuzzleBaseGame as ay, type PuzzleGameData as az, type Requirement as b, type EventListItemType as c, type EventInfoType as d, type RelationType as e, type ResourceConnectionsType as f, type UnregisteredVendorType as g, type VendorType as h, type VendorInfoType as i, type MyPendingVendorClaim as j, type UserLicenceType as k, type PostType as l, EnumPostType as m, type GameLeaderboard as n, type CouponType as o, type VendorFormData as p, type CreateVendorFormData as q, type VendorInfoFormData as r, type CreateVendorInfoFormData as s, type UnregisteredVendorFormData as t, type CreateUnregisteredVendorFormData as u, type EventFormData as v, type CreateEventFormData as w, type EventInfoFormData as x, type CreateEventInfoFormData as y, type PostFormData as z };
@@ -383,14 +383,63 @@ type PostType = Omit<PostFormData, "content" | "coverUpload" | "resource"> & {
383
383
  updatedAt: Date | null;
384
384
  };
385
385
 
386
+ type ProductCoupon = {
387
+ couponDocumentId: string;
388
+ couponId: string;
389
+ };
390
+ type CouponTypeOption = {
391
+ buy: number;
392
+ get: number;
393
+ unit: string;
394
+ };
395
+ type CouponDefaultsFormData = {
396
+ couponDescription: string;
397
+ couponOption: CouponTypeOption;
398
+ endDate: Date;
399
+ participantProductId: string;
400
+ startDate: Date;
401
+ };
402
+ type CreateCouponFormData = CreateFormData<CouponDefaultsFormData>;
403
+ type CouponParticipantUserType = {
404
+ couponCollectedCount: number;
405
+ couponRedeemedAt: Date | null;
406
+ createdAt: Date;
407
+ updatedAt: Date | null;
408
+ userId: string;
409
+ };
410
+ type CouponCodeType = {
411
+ code: string;
412
+ qrCode: ResourceImageType;
413
+ };
414
+ type CouponDataType = CouponDefaultsFormData & {
415
+ _id: string;
416
+ active: boolean;
417
+ couponCode: CouponCodeType;
418
+ createdAt: Date;
419
+ participantUsers: CouponParticipantUserType[] | null;
420
+ resourceId: string;
421
+ resourceType: EnumResourceType;
422
+ updatedAt: Date | null;
423
+ };
424
+ type CreateCouponDefaults = Omit<CouponDataType, "_id">;
425
+ interface CouponType {
426
+ _id: string;
427
+ active: boolean;
428
+ couponData: CouponDataType[] | null;
429
+ createdAt: Date;
430
+ deletedAt: Date | null;
431
+ owner: OwnerType;
432
+ updatedAt: Date | null;
433
+ }
434
+
386
435
  type VendorCalendarData = Omit<ResourceDetails, "dateTime" | "eventStatus"> & {
387
436
  dateTime: DateTimeType;
388
437
  };
389
438
  type VendorProductList = {
390
439
  _id?: string;
440
+ coupon?: ProductCoupon | null;
391
441
  createdAt?: Date | null;
392
442
  description?: string | null;
393
- hasCoupon?: boolean | null;
394
443
  name: string;
395
444
  price: number;
396
445
  priceUnit: string;
@@ -709,4 +758,4 @@ interface UseGetResourcesByRegionOptions {
709
758
  offset?: number;
710
759
  }
711
760
 
712
- export { type GameDate as $, type Region as A, type BaseResourceTypeFormData as B, type Category as C, type BaseGameMap as D, type EventType as E, type FormField as F, type GameDocType as G, type BaseGameType as H, type BaseResourceType as I, type CreateFormData as J, type DailyClueBaseGame as K, type LocationType as L, type MutationResponse as M, type DailyClueGameData as N, type OptionItem as O, type PosterUsageType as P, type DateTimeType as Q, type RefundPolicy as R, type StallType as S, type DateTimeWithPriceType as T, type UseGetResourcesByRegionOptions as U, type VendorClaimTokenValidation as V, type DeviceInfo as W, EnumGameStatus as X, EnumGameType as Y, EnumPostContentType as Z, type EventStatusType as _, type FormDateField as a, type GameHistory as a0, type GamePlacement as a1, type GamePlacementClue as a2, type GameType as a3, type GeocodeLocation as a4, type GlobalGameData as a5, type ImageObjectType as a6, type LocationGeoType as a7, type Nullable as a8, type OwnerType as a9, type Subcategory as aA, type SubcategoryItems as aB, type TermsAgreement as aC, type UnregisteredVendorInvitationType as aD, type VendorAttributes as aE, type VendorCalendarData as aF, type VendorProductList as aG, gameScreenIdentifierList as aH, gameTypeToDisplayName as aI, PROMO_CODE_PREFIX as aa, type PaymentInfoType as ab, type PostContentData as ac, type PostContentFormData as ad, type PostContentGame as ae, type PostContentImage as af, type PostContentList as ag, type PostContentTextarea as ah, type PostContentType as ai, type PostContentVideo as aj, type PostFileInput as ak, type PostResource as al, type PromoCodeType as am, type PuzzleAnswer as an, type PuzzleAnsweredQuestion as ao, type PuzzleBaseGame as ap, type PuzzleGameData as aq, type PuzzleQuestion as ar, type RelatedPostType as as, type RelationDate as at, type RelationInputType as au, type ResourceContactDetailsType as av, type ResourceDetails as aw, type ResourceImageType as ax, type SocialMediaType as ay, type SocialShareResourceType as az, type Requirement as b, type EventListItemType as c, type EventInfoType as d, type RelationType as e, type ResourceConnectionsType as f, type UnregisteredVendorType as g, type VendorType as h, type VendorInfoType as i, type MyPendingVendorClaim as j, type UserLicenceType as k, type PostType as l, EnumPostType as m, type GameLeaderboard as n, type VendorFormData as o, type CreateVendorFormData as p, type VendorInfoFormData as q, type CreateVendorInfoFormData as r, type UnregisteredVendorFormData as s, type CreateUnregisteredVendorFormData as t, type EventFormData as u, type CreateEventFormData as v, type EventInfoFormData as w, type CreateEventInfoFormData as x, type PostFormData as y, type CreatePostFormData as z };
761
+ export { type DailyClueGameData as $, type CreatePostFormData as A, type BaseResourceTypeFormData as B, type Category as C, type CouponDefaultsFormData as D, type EventType as E, type FormField as F, type GameDocType as G, type CreateCouponFormData as H, type Region as I, type BaseGameMap as J, type BaseGameType as K, type LocationType as L, type MutationResponse as M, type BaseResourceType as N, type OptionItem as O, type PosterUsageType as P, type CouponCodeType as Q, type RefundPolicy as R, type StallType as S, type CouponDataType as T, type UseGetResourcesByRegionOptions as U, type VendorClaimTokenValidation as V, type CouponParticipantUserType as W, type CouponTypeOption as X, type CreateCouponDefaults as Y, type CreateFormData as Z, type DailyClueBaseGame as _, type FormDateField as a, type DateTimeType as a0, type DateTimeWithPriceType as a1, type DeviceInfo as a2, EnumGameStatus as a3, EnumGameType as a4, EnumPostContentType as a5, type EventStatusType as a6, type GameDate as a7, type GameHistory as a8, type GamePlacement as a9, type PuzzleQuestion as aA, type RelatedPostType as aB, type RelationDate as aC, type RelationInputType as aD, type ResourceContactDetailsType as aE, type ResourceDetails as aF, type ResourceImageType as aG, type SocialMediaType as aH, type SocialShareResourceType as aI, type Subcategory as aJ, type SubcategoryItems as aK, type TermsAgreement as aL, type UnregisteredVendorInvitationType as aM, type VendorAttributes as aN, type VendorCalendarData as aO, type VendorProductList as aP, gameScreenIdentifierList as aQ, gameTypeToDisplayName as aR, type GamePlacementClue as aa, type GameType as ab, type GeocodeLocation as ac, type GlobalGameData as ad, type ImageObjectType as ae, type LocationGeoType as af, type Nullable as ag, type OwnerType as ah, PROMO_CODE_PREFIX as ai, type PaymentInfoType as aj, type PostContentData as ak, type PostContentFormData as al, type PostContentGame as am, type PostContentImage as an, type PostContentList as ao, type PostContentTextarea as ap, type PostContentType as aq, type PostContentVideo as ar, type PostFileInput as as, type PostResource as at, type ProductCoupon as au, type PromoCodeType as av, type PuzzleAnswer as aw, type PuzzleAnsweredQuestion as ax, type PuzzleBaseGame as ay, type PuzzleGameData as az, type Requirement as b, type EventListItemType as c, type EventInfoType as d, type RelationType as e, type ResourceConnectionsType as f, type UnregisteredVendorType as g, type VendorType as h, type VendorInfoType as i, type MyPendingVendorClaim as j, type UserLicenceType as k, type PostType as l, EnumPostType as m, type GameLeaderboard as n, type CouponType as o, type VendorFormData as p, type CreateVendorFormData as q, type VendorInfoFormData as r, type CreateVendorInfoFormData as s, type UnregisteredVendorFormData as t, type CreateUnregisteredVendorFormData as u, type EventFormData as v, type CreateEventFormData as w, type EventInfoFormData as x, type CreateEventInfoFormData as y, type PostFormData as z };