@timardex/cluemart-shared 1.5.787 → 1.5.789

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 (39) hide show
  1. package/dist/{affiliate-DOhfbYFj.d.mts → affiliate-Dw6otGha.d.mts} +3 -2
  2. package/dist/{affiliate-BEePbi9S.d.ts → affiliate-VNlbrvgi.d.ts} +3 -2
  3. package/dist/{chunk-E4KHWSQE.mjs → chunk-63F5FP5R.mjs} +1 -1
  4. package/dist/{chunk-E4KHWSQE.mjs.map → chunk-63F5FP5R.mjs.map} +1 -1
  5. package/dist/{chunk-RTF7BGNH.mjs → chunk-G4LVRM53.mjs} +2 -2
  6. package/dist/{chunk-JP76OR4F.mjs → chunk-JVBD55SQ.mjs} +30 -1
  7. package/dist/{chunk-JP76OR4F.mjs.map → chunk-JVBD55SQ.mjs.map} +1 -1
  8. package/dist/{chunk-RUM5PJHN.mjs → chunk-UGA3F23W.mjs} +2 -2
  9. package/dist/{chunk-QFGYDBE7.mjs → chunk-ZZBBANGP.mjs} +2 -2
  10. package/dist/formFields/index.mjs +3 -3
  11. package/dist/graphql/index.cjs +30 -0
  12. package/dist/graphql/index.cjs.map +1 -1
  13. package/dist/graphql/index.d.mts +10 -2
  14. package/dist/graphql/index.d.ts +10 -2
  15. package/dist/graphql/index.mjs +3 -1
  16. package/dist/hooks/index.cjs +25 -19
  17. package/dist/hooks/index.cjs.map +1 -1
  18. package/dist/hooks/index.d.mts +2 -2
  19. package/dist/hooks/index.d.ts +2 -2
  20. package/dist/hooks/index.mjs +16 -24
  21. package/dist/hooks/index.mjs.map +1 -1
  22. package/dist/index.cjs +30 -0
  23. package/dist/index.cjs.map +1 -1
  24. package/dist/index.d.mts +11 -2
  25. package/dist/index.d.ts +11 -2
  26. package/dist/index.mjs +29 -0
  27. package/dist/index.mjs.map +1 -1
  28. package/dist/sharing/index.mjs +3 -3
  29. package/dist/types/index.cjs.map +1 -1
  30. package/dist/types/index.d.mts +1 -1
  31. package/dist/types/index.d.ts +1 -1
  32. package/dist/types/index.mjs +1 -1
  33. package/dist/utils/index.d.mts +1 -1
  34. package/dist/utils/index.d.ts +1 -1
  35. package/dist/utils/index.mjs +2 -2
  36. package/package.json +1 -1
  37. /package/dist/{chunk-RTF7BGNH.mjs.map → chunk-G4LVRM53.mjs.map} +0 -0
  38. /package/dist/{chunk-RUM5PJHN.mjs.map → chunk-UGA3F23W.mjs.map} +0 -0
  39. /package/dist/{chunk-QFGYDBE7.mjs.map → chunk-ZZBBANGP.mjs.map} +0 -0
@@ -4,7 +4,7 @@ import { EnumResourceType, EnumEventDateStatus } from '../enums/index.mjs';
4
4
  import { A as AuthPayloadType, R as RefreshTokenPayloadType, S as SafeUserType, a as RedeemRewardResponse, P as PartnerType, b as ResourceByUser, c as AdType, E as EnumAdStatus, d as SubscriptionPlansResponse, e as SubscriptionStatusData, f as AppSettingsType, g as SchoolReturnType, h as SchoolType } from '../ad-kAjUceeE.mjs';
5
5
  import { C as ChatType, R as ReportChatUser, N as NotificationCount, a as NotificationType, b as ResourceActivityType } from '../resourceActivities-zczOntNk.mjs';
6
6
  import { E as EventType, c as EventListItemType, d as EventInfoType, U as UseGetResourcesByRegionOptions, e as RelationType, f as ResourceConnectionsType, g as UnregisteredVendorType, V as VendorType, h as VendorInfoType, i as UserLicenceType, P as PostType, j as EnumPostType, G as GameDocType, k as GameLeaderboard } from '../global-BUUfmCo7.mjs';
7
- import { A as AffiliateType } from '../affiliate-DOhfbYFj.mjs';
7
+ import { A as AffiliateType, a as AffiliateResourceType } from '../affiliate-Dw6otGha.mjs';
8
8
  import '../images/index.mjs';
9
9
  import 'react-hook-form';
10
10
 
@@ -1180,6 +1180,14 @@ declare const useGetAffiliates: () => {
1180
1180
  affiliates: AffiliateType[];
1181
1181
  }>>;
1182
1182
  };
1183
+ declare const useGetAffiliateResourceByAffiliateIdAndResourceId: (affiliateId: string, resourceId: string) => {
1184
+ affiliateResource: AffiliateResourceType | undefined;
1185
+ error: _apollo_client.ApolloError | undefined;
1186
+ loading: boolean;
1187
+ refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<{
1188
+ affiliateResourceByAffiliateIdAndResourceId: AffiliateResourceType;
1189
+ }>>;
1190
+ };
1183
1191
 
1184
1192
  declare const useUpdateAffiliateDetails: () => {
1185
1193
  error: _apollo_client.ApolloError | undefined;
@@ -1192,4 +1200,4 @@ declare const useDeleteAffiliate: () => {
1192
1200
  loading: boolean;
1193
1201
  };
1194
1202
 
1195
- export { GET_EVENT, GET_EVENT_BY_SLUG, GET_EVENT_INFO, GET_PARTNER, GET_PARTNER_BY_SLUG, GET_POST, GET_POST_BY_SLUG, GET_RESOURCE_CONNECTIONS, GET_VENDOR, GET_VENDOR_BY_SLUG, GET_VENDOR_INFO, toGraphqlQueryString, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminPermanentlyDeleteResource, useAdminResendUserVerificationEmail, useAdminUpdateResourceType, useCancelSubscription, useContactUs, useCrawlGoogleMarkets, useCreateAd, useCreateBulkNotifications, useCreateCheckoutSession, useCreateCustomerPortal, useCreateEvent, useCreateEventInfo, useCreatePartner, useCreatePost, useCreatePoster, useCreatePrivateChat, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateSchool, useCreateUnregisteredVendor, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAffiliate, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeletePartner, useDeletePost, useDeleteRelation, useDeleteSchool, useDeleteUnregisteredVendor, useDeleteUser, useDeleteVendor, useGetAd, useGetAds, useGetAdsByRegion, useGetAffiliate, useGetAffiliates, useGetAppSettings, useGetChat, useGetChatSubscription, useGetChatsByRegion, useGetEvent, useGetEventByPlaceId, useGetEventInfo, useGetEventRelations, useGetEvents, useGetEventsByRegion, useGetEventsNearMe, useGetGame, useGetGameLeaderboard, useGetGames, useGetNotificationCount, useGetNotificationCountSubscription, useGetPartner, useGetPartners, useGetPartnersByRegion, useGetPost, useGetPosts, useGetPostsByType, useGetRelation, useGetRelationByEventAndVendor, useGetReportedChatUsers, useGetResourceActivity, useGetResourceConnections, useGetSchool, useGetSchools, useGetSubscriptionPlans, useGetSubscriptionStatus, useGetUnregisteredVendor, useGetUnregisteredVendors, useGetUnregisteredVendorsByInviterId, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserPartners, useGetUserResources, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLeaveGame, useLogin, useLogout, useMarkAllNotificationsRead, useMarkChatMessagesSeen, useMarkNotificationRead, useRedeemReward, useRefreshToken, useRegister, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useReportChatUser, useRequestMarketingMaterial, useRequestPasswordReset, useResetPassword, useSearchEvents, useSearchPartners, useSearchVendors, useSelectPackage, useSelectStandardPackage, useSendChatMessage, useStartGame, useToggleChatMessageLike, useUnlinkUnregisteredVendorByInviterId, useUpdateAd, useUpdateAffiliateDetails, useUpdateAppSettings, useUpdateDailyClueGame, useUpdateEvent, useUpdateEventInfo, useUpdateGoogleImportedMarkets, useUpdatePartner, useUpdatePost, useUpdatePuzzleGame, useUpdateRelation, useUpdateSchool, useUpdateSubscriptionPlan, useUpdateUnregisteredVendor, useUpdateUser, useUpdateVendor, useUpdateVendorInfo, useValidateVerificationToken };
1203
+ export { GET_EVENT, GET_EVENT_BY_SLUG, GET_EVENT_INFO, GET_PARTNER, GET_PARTNER_BY_SLUG, GET_POST, GET_POST_BY_SLUG, GET_RESOURCE_CONNECTIONS, GET_VENDOR, GET_VENDOR_BY_SLUG, GET_VENDOR_INFO, toGraphqlQueryString, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminPermanentlyDeleteResource, useAdminResendUserVerificationEmail, useAdminUpdateResourceType, useCancelSubscription, useContactUs, useCrawlGoogleMarkets, useCreateAd, useCreateBulkNotifications, useCreateCheckoutSession, useCreateCustomerPortal, useCreateEvent, useCreateEventInfo, useCreatePartner, useCreatePost, useCreatePoster, useCreatePrivateChat, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateSchool, useCreateUnregisteredVendor, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAffiliate, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeletePartner, useDeletePost, useDeleteRelation, useDeleteSchool, useDeleteUnregisteredVendor, useDeleteUser, useDeleteVendor, useGetAd, useGetAds, useGetAdsByRegion, useGetAffiliate, useGetAffiliateResourceByAffiliateIdAndResourceId, useGetAffiliates, useGetAppSettings, useGetChat, useGetChatSubscription, useGetChatsByRegion, useGetEvent, useGetEventByPlaceId, useGetEventInfo, useGetEventRelations, useGetEvents, useGetEventsByRegion, useGetEventsNearMe, useGetGame, useGetGameLeaderboard, useGetGames, useGetNotificationCount, useGetNotificationCountSubscription, useGetPartner, useGetPartners, useGetPartnersByRegion, useGetPost, useGetPosts, useGetPostsByType, useGetRelation, useGetRelationByEventAndVendor, useGetReportedChatUsers, useGetResourceActivity, useGetResourceConnections, useGetSchool, useGetSchools, useGetSubscriptionPlans, useGetSubscriptionStatus, useGetUnregisteredVendor, useGetUnregisteredVendors, useGetUnregisteredVendorsByInviterId, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserPartners, useGetUserResources, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLeaveGame, useLogin, useLogout, useMarkAllNotificationsRead, useMarkChatMessagesSeen, useMarkNotificationRead, useRedeemReward, useRefreshToken, useRegister, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useReportChatUser, useRequestMarketingMaterial, useRequestPasswordReset, useResetPassword, useSearchEvents, useSearchPartners, useSearchVendors, useSelectPackage, useSelectStandardPackage, useSendChatMessage, useStartGame, useToggleChatMessageLike, useUnlinkUnregisteredVendorByInviterId, useUpdateAd, useUpdateAffiliateDetails, useUpdateAppSettings, useUpdateDailyClueGame, useUpdateEvent, useUpdateEventInfo, useUpdateGoogleImportedMarkets, useUpdatePartner, useUpdatePost, useUpdatePuzzleGame, useUpdateRelation, useUpdateSchool, useUpdateSubscriptionPlan, useUpdateUnregisteredVendor, useUpdateUser, useUpdateVendor, useUpdateVendorInfo, useValidateVerificationToken };
@@ -4,7 +4,7 @@ import { EnumResourceType, EnumEventDateStatus } from '../enums/index.js';
4
4
  import { A as AuthPayloadType, R as RefreshTokenPayloadType, S as SafeUserType, a as RedeemRewardResponse, P as PartnerType, b as ResourceByUser, c as AdType, E as EnumAdStatus, d as SubscriptionPlansResponse, e as SubscriptionStatusData, f as AppSettingsType, g as SchoolReturnType, h as SchoolType } from '../ad-BmDOVKmE.js';
5
5
  import { C as ChatType, R as ReportChatUser, N as NotificationCount, a as NotificationType, b as ResourceActivityType } from '../resourceActivities-BL_12IAo.js';
6
6
  import { E as EventType, c as EventListItemType, d as EventInfoType, U as UseGetResourcesByRegionOptions, e as RelationType, f as ResourceConnectionsType, g as UnregisteredVendorType, V as VendorType, h as VendorInfoType, i as UserLicenceType, P as PostType, j as EnumPostType, G as GameDocType, k as GameLeaderboard } from '../global-fKbMmluy.js';
7
- import { A as AffiliateType } from '../affiliate-BEePbi9S.js';
7
+ import { A as AffiliateType, a as AffiliateResourceType } from '../affiliate-VNlbrvgi.js';
8
8
  import '../images/index.js';
9
9
  import 'react-hook-form';
10
10
 
@@ -1180,6 +1180,14 @@ declare const useGetAffiliates: () => {
1180
1180
  affiliates: AffiliateType[];
1181
1181
  }>>;
1182
1182
  };
1183
+ declare const useGetAffiliateResourceByAffiliateIdAndResourceId: (affiliateId: string, resourceId: string) => {
1184
+ affiliateResource: AffiliateResourceType | undefined;
1185
+ error: _apollo_client.ApolloError | undefined;
1186
+ loading: boolean;
1187
+ refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<{
1188
+ affiliateResourceByAffiliateIdAndResourceId: AffiliateResourceType;
1189
+ }>>;
1190
+ };
1183
1191
 
1184
1192
  declare const useUpdateAffiliateDetails: () => {
1185
1193
  error: _apollo_client.ApolloError | undefined;
@@ -1192,4 +1200,4 @@ declare const useDeleteAffiliate: () => {
1192
1200
  loading: boolean;
1193
1201
  };
1194
1202
 
1195
- export { GET_EVENT, GET_EVENT_BY_SLUG, GET_EVENT_INFO, GET_PARTNER, GET_PARTNER_BY_SLUG, GET_POST, GET_POST_BY_SLUG, GET_RESOURCE_CONNECTIONS, GET_VENDOR, GET_VENDOR_BY_SLUG, GET_VENDOR_INFO, toGraphqlQueryString, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminPermanentlyDeleteResource, useAdminResendUserVerificationEmail, useAdminUpdateResourceType, useCancelSubscription, useContactUs, useCrawlGoogleMarkets, useCreateAd, useCreateBulkNotifications, useCreateCheckoutSession, useCreateCustomerPortal, useCreateEvent, useCreateEventInfo, useCreatePartner, useCreatePost, useCreatePoster, useCreatePrivateChat, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateSchool, useCreateUnregisteredVendor, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAffiliate, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeletePartner, useDeletePost, useDeleteRelation, useDeleteSchool, useDeleteUnregisteredVendor, useDeleteUser, useDeleteVendor, useGetAd, useGetAds, useGetAdsByRegion, useGetAffiliate, useGetAffiliates, useGetAppSettings, useGetChat, useGetChatSubscription, useGetChatsByRegion, useGetEvent, useGetEventByPlaceId, useGetEventInfo, useGetEventRelations, useGetEvents, useGetEventsByRegion, useGetEventsNearMe, useGetGame, useGetGameLeaderboard, useGetGames, useGetNotificationCount, useGetNotificationCountSubscription, useGetPartner, useGetPartners, useGetPartnersByRegion, useGetPost, useGetPosts, useGetPostsByType, useGetRelation, useGetRelationByEventAndVendor, useGetReportedChatUsers, useGetResourceActivity, useGetResourceConnections, useGetSchool, useGetSchools, useGetSubscriptionPlans, useGetSubscriptionStatus, useGetUnregisteredVendor, useGetUnregisteredVendors, useGetUnregisteredVendorsByInviterId, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserPartners, useGetUserResources, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLeaveGame, useLogin, useLogout, useMarkAllNotificationsRead, useMarkChatMessagesSeen, useMarkNotificationRead, useRedeemReward, useRefreshToken, useRegister, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useReportChatUser, useRequestMarketingMaterial, useRequestPasswordReset, useResetPassword, useSearchEvents, useSearchPartners, useSearchVendors, useSelectPackage, useSelectStandardPackage, useSendChatMessage, useStartGame, useToggleChatMessageLike, useUnlinkUnregisteredVendorByInviterId, useUpdateAd, useUpdateAffiliateDetails, useUpdateAppSettings, useUpdateDailyClueGame, useUpdateEvent, useUpdateEventInfo, useUpdateGoogleImportedMarkets, useUpdatePartner, useUpdatePost, useUpdatePuzzleGame, useUpdateRelation, useUpdateSchool, useUpdateSubscriptionPlan, useUpdateUnregisteredVendor, useUpdateUser, useUpdateVendor, useUpdateVendorInfo, useValidateVerificationToken };
1203
+ export { GET_EVENT, GET_EVENT_BY_SLUG, GET_EVENT_INFO, GET_PARTNER, GET_PARTNER_BY_SLUG, GET_POST, GET_POST_BY_SLUG, GET_RESOURCE_CONNECTIONS, GET_VENDOR, GET_VENDOR_BY_SLUG, GET_VENDOR_INFO, toGraphqlQueryString, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminPermanentlyDeleteResource, useAdminResendUserVerificationEmail, useAdminUpdateResourceType, useCancelSubscription, useContactUs, useCrawlGoogleMarkets, useCreateAd, useCreateBulkNotifications, useCreateCheckoutSession, useCreateCustomerPortal, useCreateEvent, useCreateEventInfo, useCreatePartner, useCreatePost, useCreatePoster, useCreatePrivateChat, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateSchool, useCreateUnregisteredVendor, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAffiliate, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeletePartner, useDeletePost, useDeleteRelation, useDeleteSchool, useDeleteUnregisteredVendor, useDeleteUser, useDeleteVendor, useGetAd, useGetAds, useGetAdsByRegion, useGetAffiliate, useGetAffiliateResourceByAffiliateIdAndResourceId, useGetAffiliates, useGetAppSettings, useGetChat, useGetChatSubscription, useGetChatsByRegion, useGetEvent, useGetEventByPlaceId, useGetEventInfo, useGetEventRelations, useGetEvents, useGetEventsByRegion, useGetEventsNearMe, useGetGame, useGetGameLeaderboard, useGetGames, useGetNotificationCount, useGetNotificationCountSubscription, useGetPartner, useGetPartners, useGetPartnersByRegion, useGetPost, useGetPosts, useGetPostsByType, useGetRelation, useGetRelationByEventAndVendor, useGetReportedChatUsers, useGetResourceActivity, useGetResourceConnections, useGetSchool, useGetSchools, useGetSubscriptionPlans, useGetSubscriptionStatus, useGetUnregisteredVendor, useGetUnregisteredVendors, useGetUnregisteredVendorsByInviterId, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserPartners, useGetUserResources, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLeaveGame, useLogin, useLogout, useMarkAllNotificationsRead, useMarkChatMessagesSeen, useMarkNotificationRead, useRedeemReward, useRefreshToken, useRegister, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useReportChatUser, useRequestMarketingMaterial, useRequestPasswordReset, useResetPassword, useSearchEvents, useSearchPartners, useSearchVendors, useSelectPackage, useSelectStandardPackage, useSendChatMessage, useStartGame, useToggleChatMessageLike, useUnlinkUnregisteredVendorByInviterId, useUpdateAd, useUpdateAffiliateDetails, useUpdateAppSettings, useUpdateDailyClueGame, useUpdateEvent, useUpdateEventInfo, useUpdateGoogleImportedMarkets, useUpdatePartner, useUpdatePost, useUpdatePuzzleGame, useUpdateRelation, useUpdateSchool, useUpdateSubscriptionPlan, useUpdateUnregisteredVendor, useUpdateUser, useUpdateVendor, useUpdateVendorInfo, useValidateVerificationToken };
@@ -57,6 +57,7 @@ import {
57
57
  useGetAds,
58
58
  useGetAdsByRegion,
59
59
  useGetAffiliate,
60
+ useGetAffiliateResourceByAffiliateIdAndResourceId,
60
61
  useGetAffiliates,
61
62
  useGetAppSettings,
62
63
  useGetChat,
@@ -152,7 +153,7 @@ import {
152
153
  useUpdateVendor,
153
154
  useUpdateVendorInfo,
154
155
  useValidateVerificationToken
155
- } from "../chunk-JP76OR4F.mjs";
156
+ } from "../chunk-JVBD55SQ.mjs";
156
157
  import "../chunk-LETM2YHF.mjs";
157
158
  export {
158
159
  GET_EVENT,
@@ -213,6 +214,7 @@ export {
213
214
  useGetAds,
214
215
  useGetAdsByRegion,
215
216
  useGetAffiliate,
217
+ useGetAffiliateResourceByAffiliateIdAndResourceId,
216
218
  useGetAffiliates,
217
219
  useGetAppSettings,
218
220
  useGetChat,
@@ -5073,6 +5073,20 @@ var GET_AFFILIATES = import_client74.gql`
5073
5073
  }
5074
5074
  ${AFFILIATE_FIELDS_FRAGMENT}
5075
5075
  `;
5076
+ var GET_AFFILIATE_RESOURCE_BY_AFFILIATE_ID_AND_RESOURCE_ID = import_client74.gql`
5077
+ query getAffiliateResourceByAffiliateIdAndResourceId(
5078
+ $affiliateId: ID!
5079
+ $resourceId: ID!
5080
+ ) {
5081
+ affiliateResourceByAffiliateIdAndResourceId(
5082
+ affiliateId: $affiliateId
5083
+ resourceId: $resourceId
5084
+ ) {
5085
+ ...AffiliateResourceFields
5086
+ }
5087
+ }
5088
+ ${AFFILIATE_RESOURCE_FIELDS_FRAGMENT}
5089
+ `;
5076
5090
 
5077
5091
  // src/graphql/hooks/affiliate/hooksMutation.ts
5078
5092
  var import_client77 = require("@apollo/client");
@@ -6544,6 +6558,7 @@ var affiliateContactDetailsSchema = yup12.object({
6544
6558
  )
6545
6559
  });
6546
6560
  var affiliateSchema = yup12.object().shape({
6561
+ _id: yup12.string().required(),
6547
6562
  contactDetails: affiliateContactDetailsSchema.nullable().default(null).test(
6548
6563
  "contact-details-required",
6549
6564
  "Mobile phone is required",
@@ -6554,12 +6569,6 @@ var affiliateSchema = yup12.object().shape({
6554
6569
  });
6555
6570
 
6556
6571
  // src/hooks/useAffiliateForm.ts
6557
- var defaultAffiliateFormValues = {
6558
- contactDetails: null,
6559
- region: "",
6560
- socialMedia: [],
6561
- termsAgreement: null
6562
- };
6563
6572
  function useAffiliateForm(data) {
6564
6573
  const {
6565
6574
  control,
@@ -6570,25 +6579,22 @@ function useAffiliateForm(data) {
6570
6579
  setValue,
6571
6580
  watch
6572
6581
  } = (0, import_react_hook_form18.useForm)({
6573
- defaultValues: defaultAffiliateFormValues,
6582
+ defaultValues: data,
6574
6583
  resolver: (0, import_yup18.yupResolver)(affiliateSchema)
6575
6584
  });
6576
6585
  (0, import_react6.useEffect)(() => {
6577
- if (data) {
6578
- reset({
6579
- contactDetails: data.contactDetails,
6580
- region: data.region,
6581
- socialMedia: data.socialMedia,
6582
- termsAgreement: data.termsAgreement
6583
- });
6584
- } else {
6585
- reset(defaultAffiliateFormValues);
6586
- }
6586
+ reset({
6587
+ _id: data._id,
6588
+ contactDetails: data.contactDetails,
6589
+ region: data.region,
6590
+ socialMedia: data.socialMedia,
6591
+ termsAgreement: data.termsAgreement
6592
+ });
6587
6593
  }, [data, reset]);
6588
- const { contactDetails, region, socialMedia: socialMedia2, termsAgreement } = getValues();
6594
+ const { _id, contactDetails, region, socialMedia: socialMedia2, termsAgreement } = getValues();
6589
6595
  return {
6590
6596
  control,
6591
- fields: { contactDetails, region, socialMedia: socialMedia2, termsAgreement },
6597
+ fields: { _id, contactDetails, region, socialMedia: socialMedia2, termsAgreement },
6592
6598
  formState,
6593
6599
  getValues,
6594
6600
  handleSubmit,