@timardex/cluemart-shared 1.5.789 → 1.5.791
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.
- package/dist/{affiliate-VNlbrvgi.d.ts → affiliate-B-jSNkBB.d.ts} +9 -2
- package/dist/{affiliate-Dw6otGha.d.mts → affiliate-CfLsTGgF.d.mts} +9 -2
- package/dist/{chunk-JVBD55SQ.mjs → chunk-2US6BYNF.mjs} +13 -30
- package/dist/{chunk-JVBD55SQ.mjs.map → chunk-2US6BYNF.mjs.map} +1 -1
- package/dist/{chunk-63F5FP5R.mjs → chunk-45PVMXYY.mjs} +1 -1
- package/dist/{chunk-63F5FP5R.mjs.map → chunk-45PVMXYY.mjs.map} +1 -1
- package/dist/{chunk-G4LVRM53.mjs → chunk-HATC3Y5J.mjs} +2 -2
- package/dist/{chunk-UGA3F23W.mjs → chunk-V25PPJEQ.mjs} +2 -2
- package/dist/{chunk-ZZBBANGP.mjs → chunk-XR5RTNG3.mjs} +2 -2
- package/dist/formFields/index.mjs +3 -3
- package/dist/graphql/index.cjs +12 -30
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +2 -10
- package/dist/graphql/index.d.ts +2 -10
- package/dist/graphql/index.mjs +1 -3
- package/dist/hooks/index.cjs +71 -21
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +4 -2
- package/dist/hooks/index.d.ts +4 -2
- package/dist/hooks/index.mjs +62 -12
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +12 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +9 -10
- package/dist/index.d.ts +9 -10
- package/dist/index.mjs +12 -29
- package/dist/index.mjs.map +1 -1
- package/dist/sharing/index.mjs +3 -3
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.mjs +1 -1
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.mjs +2 -2
- package/package.json +1 -1
- /package/dist/{chunk-G4LVRM53.mjs.map → chunk-HATC3Y5J.mjs.map} +0 -0
- /package/dist/{chunk-UGA3F23W.mjs.map → chunk-V25PPJEQ.mjs.map} +0 -0
- /package/dist/{chunk-ZZBBANGP.mjs.map → chunk-XR5RTNG3.mjs.map} +0 -0
package/dist/graphql/index.d.mts
CHANGED
|
@@ -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
|
|
7
|
+
import { A as AffiliateType } from '../affiliate-CfLsTGgF.mjs';
|
|
8
8
|
import '../images/index.mjs';
|
|
9
9
|
import 'react-hook-form';
|
|
10
10
|
|
|
@@ -1180,14 +1180,6 @@ 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
|
-
};
|
|
1191
1183
|
|
|
1192
1184
|
declare const useUpdateAffiliateDetails: () => {
|
|
1193
1185
|
error: _apollo_client.ApolloError | undefined;
|
|
@@ -1200,4 +1192,4 @@ declare const useDeleteAffiliate: () => {
|
|
|
1200
1192
|
loading: boolean;
|
|
1201
1193
|
};
|
|
1202
1194
|
|
|
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,
|
|
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 };
|
package/dist/graphql/index.d.ts
CHANGED
|
@@ -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
|
|
7
|
+
import { A as AffiliateType } from '../affiliate-B-jSNkBB.js';
|
|
8
8
|
import '../images/index.js';
|
|
9
9
|
import 'react-hook-form';
|
|
10
10
|
|
|
@@ -1180,14 +1180,6 @@ 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
|
-
};
|
|
1191
1183
|
|
|
1192
1184
|
declare const useUpdateAffiliateDetails: () => {
|
|
1193
1185
|
error: _apollo_client.ApolloError | undefined;
|
|
@@ -1200,4 +1192,4 @@ declare const useDeleteAffiliate: () => {
|
|
|
1200
1192
|
loading: boolean;
|
|
1201
1193
|
};
|
|
1202
1194
|
|
|
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,
|
|
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 };
|
package/dist/graphql/index.mjs
CHANGED
|
@@ -57,7 +57,6 @@ import {
|
|
|
57
57
|
useGetAds,
|
|
58
58
|
useGetAdsByRegion,
|
|
59
59
|
useGetAffiliate,
|
|
60
|
-
useGetAffiliateResourceByAffiliateIdAndResourceId,
|
|
61
60
|
useGetAffiliates,
|
|
62
61
|
useGetAppSettings,
|
|
63
62
|
useGetChat,
|
|
@@ -153,7 +152,7 @@ import {
|
|
|
153
152
|
useUpdateVendor,
|
|
154
153
|
useUpdateVendorInfo,
|
|
155
154
|
useValidateVerificationToken
|
|
156
|
-
} from "../chunk-
|
|
155
|
+
} from "../chunk-2US6BYNF.mjs";
|
|
157
156
|
import "../chunk-LETM2YHF.mjs";
|
|
158
157
|
export {
|
|
159
158
|
GET_EVENT,
|
|
@@ -214,7 +213,6 @@ export {
|
|
|
214
213
|
useGetAds,
|
|
215
214
|
useGetAdsByRegion,
|
|
216
215
|
useGetAffiliate,
|
|
217
|
-
useGetAffiliateResourceByAffiliateIdAndResourceId,
|
|
218
216
|
useGetAffiliates,
|
|
219
217
|
useGetAppSettings,
|
|
220
218
|
useGetChat,
|
package/dist/hooks/index.cjs
CHANGED
|
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/hooks/index.ts
|
|
31
31
|
var hooks_exports = {};
|
|
32
32
|
__export(hooks_exports, {
|
|
33
|
+
defaultAffiliateFormValues: () => defaultAffiliateFormValues,
|
|
33
34
|
defaultEventFormValues: () => defaultEventFormValues,
|
|
34
35
|
defaultEventInfoFormValues: () => defaultEventInfoFormValues,
|
|
35
36
|
defaultLocation: () => defaultLocation,
|
|
@@ -38,6 +39,7 @@ __export(hooks_exports, {
|
|
|
38
39
|
defaultVendorFormValues: () => defaultVendorFormValues,
|
|
39
40
|
defaultVendorInfoFormValues: () => defaultVendorInfoFormValues,
|
|
40
41
|
globalDefaultValues: () => globalDefaultValues,
|
|
42
|
+
mapAffiliateToFormData: () => mapAffiliateToFormData,
|
|
41
43
|
mapBaseResourceTypeToFormData: () => mapBaseResourceTypeToFormData,
|
|
42
44
|
useAdForm: () => useAdForm,
|
|
43
45
|
useAffiliateForm: () => useAffiliateForm,
|
|
@@ -5018,8 +5020,17 @@ var AFFILIATE_RESOURCE_FIELDS_FRAGMENT = import_client74.gql`
|
|
|
5018
5020
|
}
|
|
5019
5021
|
${AFFILIATE_REWARD_FIELDS_FRAGMENT}
|
|
5020
5022
|
`;
|
|
5023
|
+
var AFFILIATE_BANK_ACCOUNT_DETAILS_FIELDS_FRAGMENT = import_client74.gql`
|
|
5024
|
+
fragment AffiliateBankAccountDetailsFields on AffiliateBankAccountDetailsType {
|
|
5025
|
+
accountHolderName
|
|
5026
|
+
accountNumber
|
|
5027
|
+
}
|
|
5028
|
+
`;
|
|
5021
5029
|
var AFFILIATE_DETAILS_FIELDS_FRAGMENT = import_client74.gql`
|
|
5022
5030
|
fragment AffiliateDetailsFields on AffiliateDetailsType {
|
|
5031
|
+
bankAccountDetails {
|
|
5032
|
+
...AffiliateBankAccountDetailsFields
|
|
5033
|
+
}
|
|
5023
5034
|
contactDetails {
|
|
5024
5035
|
mobilePhone
|
|
5025
5036
|
}
|
|
@@ -5031,6 +5042,7 @@ var AFFILIATE_DETAILS_FIELDS_FRAGMENT = import_client74.gql`
|
|
|
5031
5042
|
...TermsAgreementFields
|
|
5032
5043
|
}
|
|
5033
5044
|
}
|
|
5045
|
+
${AFFILIATE_BANK_ACCOUNT_DETAILS_FIELDS_FRAGMENT}
|
|
5034
5046
|
${SOCIAL_MEDIA_FIELDS_FRAGMENT}
|
|
5035
5047
|
${TERMS_AGREEMENT_FIELDS_FRAGMENT}
|
|
5036
5048
|
`;
|
|
@@ -5047,6 +5059,8 @@ var AFFILIATE_FIELDS_FRAGMENT = import_client74.gql`
|
|
|
5047
5059
|
}
|
|
5048
5060
|
createdAt
|
|
5049
5061
|
deletedAt
|
|
5062
|
+
lastRewardRedemptionAt
|
|
5063
|
+
lastRewardRedemptionPoints
|
|
5050
5064
|
overallPoints
|
|
5051
5065
|
owner {
|
|
5052
5066
|
...OwnerFields
|
|
@@ -5073,20 +5087,6 @@ var GET_AFFILIATES = import_client74.gql`
|
|
|
5073
5087
|
}
|
|
5074
5088
|
${AFFILIATE_FIELDS_FRAGMENT}
|
|
5075
5089
|
`;
|
|
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
|
-
`;
|
|
5090
5090
|
|
|
5091
5091
|
// src/graphql/hooks/affiliate/hooksMutation.ts
|
|
5092
5092
|
var import_client77 = require("@apollo/client");
|
|
@@ -5399,6 +5399,34 @@ var defaultVendorInfoFormValues = {
|
|
|
5399
5399
|
},
|
|
5400
5400
|
vendorId: ""
|
|
5401
5401
|
};
|
|
5402
|
+
var defaultAffiliateFormValues = {
|
|
5403
|
+
_id: "",
|
|
5404
|
+
bankAccountDetails: {
|
|
5405
|
+
accountHolderName: "",
|
|
5406
|
+
accountNumber: ""
|
|
5407
|
+
},
|
|
5408
|
+
contactDetails: {
|
|
5409
|
+
mobilePhone: ""
|
|
5410
|
+
},
|
|
5411
|
+
region: "",
|
|
5412
|
+
socialMedia: null,
|
|
5413
|
+
termsAgreement: null
|
|
5414
|
+
};
|
|
5415
|
+
function mapAffiliateToFormData(affiliate) {
|
|
5416
|
+
return {
|
|
5417
|
+
_id: affiliate._id,
|
|
5418
|
+
bankAccountDetails: affiliate.affiliateDetails?.bankAccountDetails ?? {
|
|
5419
|
+
accountHolderName: "",
|
|
5420
|
+
accountNumber: ""
|
|
5421
|
+
},
|
|
5422
|
+
contactDetails: affiliate.affiliateDetails?.contactDetails ?? {
|
|
5423
|
+
mobilePhone: ""
|
|
5424
|
+
},
|
|
5425
|
+
region: affiliate.affiliateDetails?.region ?? "",
|
|
5426
|
+
socialMedia: affiliate.affiliateDetails?.socialMedia ?? null,
|
|
5427
|
+
termsAgreement: affiliate.affiliateDetails?.termsAgreement ?? null
|
|
5428
|
+
};
|
|
5429
|
+
}
|
|
5402
5430
|
function mapBaseResourceTypeToFormData(data) {
|
|
5403
5431
|
return {
|
|
5404
5432
|
_id: data._id,
|
|
@@ -6557,12 +6585,17 @@ var affiliateContactDetailsSchema = yup12.object({
|
|
|
6557
6585
|
(value) => mobileRegex.test(value)
|
|
6558
6586
|
)
|
|
6559
6587
|
});
|
|
6588
|
+
var bankAccountDetailsSchema = yup12.object({
|
|
6589
|
+
accountHolderName: yup12.string().required("Account holder name is required"),
|
|
6590
|
+
accountNumber: yup12.string().required("Account number is required")
|
|
6591
|
+
});
|
|
6560
6592
|
var affiliateSchema = yup12.object().shape({
|
|
6561
6593
|
_id: yup12.string().required(),
|
|
6562
|
-
|
|
6563
|
-
"
|
|
6564
|
-
|
|
6565
|
-
|
|
6594
|
+
bankAccountDetails: bankAccountDetailsSchema.required(
|
|
6595
|
+
"Bank account details are required"
|
|
6596
|
+
),
|
|
6597
|
+
contactDetails: affiliateContactDetailsSchema.required(
|
|
6598
|
+
"Contact details are required"
|
|
6566
6599
|
),
|
|
6567
6600
|
region: yup12.string().trim().required("Region is required"),
|
|
6568
6601
|
socialMedia: yup12.array().of(socialMediaSchema).nullable().default(null)
|
|
@@ -6579,22 +6612,37 @@ function useAffiliateForm(data) {
|
|
|
6579
6612
|
setValue,
|
|
6580
6613
|
watch
|
|
6581
6614
|
} = (0, import_react_hook_form18.useForm)({
|
|
6582
|
-
defaultValues:
|
|
6615
|
+
defaultValues: defaultAffiliateFormValues,
|
|
6583
6616
|
resolver: (0, import_yup18.yupResolver)(affiliateSchema)
|
|
6584
6617
|
});
|
|
6585
6618
|
(0, import_react6.useEffect)(() => {
|
|
6586
6619
|
reset({
|
|
6587
6620
|
_id: data._id,
|
|
6621
|
+
bankAccountDetails: data.bankAccountDetails,
|
|
6588
6622
|
contactDetails: data.contactDetails,
|
|
6589
6623
|
region: data.region,
|
|
6590
6624
|
socialMedia: data.socialMedia,
|
|
6591
6625
|
termsAgreement: data.termsAgreement
|
|
6592
6626
|
});
|
|
6593
6627
|
}, [data, reset]);
|
|
6594
|
-
const {
|
|
6628
|
+
const {
|
|
6629
|
+
_id,
|
|
6630
|
+
bankAccountDetails,
|
|
6631
|
+
contactDetails,
|
|
6632
|
+
region,
|
|
6633
|
+
socialMedia: socialMedia2,
|
|
6634
|
+
termsAgreement
|
|
6635
|
+
} = getValues();
|
|
6595
6636
|
return {
|
|
6596
6637
|
control,
|
|
6597
|
-
fields: {
|
|
6638
|
+
fields: {
|
|
6639
|
+
_id,
|
|
6640
|
+
bankAccountDetails,
|
|
6641
|
+
contactDetails,
|
|
6642
|
+
region,
|
|
6643
|
+
socialMedia: socialMedia2,
|
|
6644
|
+
termsAgreement
|
|
6645
|
+
},
|
|
6598
6646
|
formState,
|
|
6599
6647
|
getValues,
|
|
6600
6648
|
handleSubmit,
|
|
@@ -6605,6 +6653,7 @@ function useAffiliateForm(data) {
|
|
|
6605
6653
|
}
|
|
6606
6654
|
// Annotate the CommonJS export names for ESM import in node:
|
|
6607
6655
|
0 && (module.exports = {
|
|
6656
|
+
defaultAffiliateFormValues,
|
|
6608
6657
|
defaultEventFormValues,
|
|
6609
6658
|
defaultEventInfoFormValues,
|
|
6610
6659
|
defaultLocation,
|
|
@@ -6613,6 +6662,7 @@ function useAffiliateForm(data) {
|
|
|
6613
6662
|
defaultVendorFormValues,
|
|
6614
6663
|
defaultVendorInfoFormValues,
|
|
6615
6664
|
globalDefaultValues,
|
|
6665
|
+
mapAffiliateToFormData,
|
|
6616
6666
|
mapBaseResourceTypeToFormData,
|
|
6617
6667
|
useAdForm,
|
|
6618
6668
|
useAffiliateForm,
|