@timardex/cluemart-shared 1.5.788 → 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.
@@ -43,4 +43,4 @@ interface AffiliateType {
43
43
  type AffiliateFormData = AffiliateDetailsType & Pick<AffiliateType, "_id">;
44
44
  type CreateAffiliateFormData = CreateFormData<AffiliateFormData>;
45
45
 
46
- export { type AffiliateType as A, type CreateAffiliateFormData as C, EnumAffiliateRewardType as E, type AffiliateFormData as a, type AffiliateContactDetails as b, type AffiliateDetailsType as c, type AffiliateResourceType as d, type AffiliateReward as e };
46
+ export { type AffiliateType as A, type CreateAffiliateFormData as C, EnumAffiliateRewardType as E, type AffiliateResourceType as a, type AffiliateFormData as b, type AffiliateContactDetails as c, type AffiliateDetailsType as d, type AffiliateReward as e };
@@ -43,4 +43,4 @@ interface AffiliateType {
43
43
  type AffiliateFormData = AffiliateDetailsType & Pick<AffiliateType, "_id">;
44
44
  type CreateAffiliateFormData = CreateFormData<AffiliateFormData>;
45
45
 
46
- export { type AffiliateType as A, type CreateAffiliateFormData as C, EnumAffiliateRewardType as E, type AffiliateFormData as a, type AffiliateContactDetails as b, type AffiliateDetailsType as c, type AffiliateResourceType as d, type AffiliateReward as e };
46
+ export { type AffiliateType as A, type CreateAffiliateFormData as C, EnumAffiliateRewardType as E, type AffiliateResourceType as a, type AffiliateFormData as b, type AffiliateContactDetails as c, type AffiliateDetailsType as d, type AffiliateReward as e };
@@ -5147,6 +5147,20 @@ var GET_AFFILIATES = gql40`
5147
5147
  }
5148
5148
  ${AFFILIATE_FIELDS_FRAGMENT}
5149
5149
  `;
5150
+ var GET_AFFILIATE_RESOURCE_BY_AFFILIATE_ID_AND_RESOURCE_ID = gql40`
5151
+ query getAffiliateResourceByAffiliateIdAndResourceId(
5152
+ $affiliateId: ID!
5153
+ $resourceId: ID!
5154
+ ) {
5155
+ affiliateResourceByAffiliateIdAndResourceId(
5156
+ affiliateId: $affiliateId
5157
+ resourceId: $resourceId
5158
+ ) {
5159
+ ...AffiliateResourceFields
5160
+ }
5161
+ }
5162
+ ${AFFILIATE_RESOURCE_FIELDS_FRAGMENT}
5163
+ `;
5150
5164
 
5151
5165
  // src/graphql/hooks/affiliate/hooksQuery.ts
5152
5166
  var useGetAffiliate = (_id) => {
@@ -5175,6 +5189,20 @@ var useGetAffiliates = () => {
5175
5189
  refetch
5176
5190
  };
5177
5191
  };
5192
+ var useGetAffiliateResourceByAffiliateIdAndResourceId = (affiliateId, resourceId) => {
5193
+ const { data, loading, error, refetch } = useQuery15(GET_AFFILIATE_RESOURCE_BY_AFFILIATE_ID_AND_RESOURCE_ID, {
5194
+ fetchPolicy: "network-only",
5195
+ skip: !affiliateId || affiliateId === "" || !resourceId || resourceId === "",
5196
+ variables: { affiliateId, resourceId }
5197
+ });
5198
+ const affiliateResource = data?.affiliateResourceByAffiliateIdAndResourceId;
5199
+ return {
5200
+ affiliateResource,
5201
+ error,
5202
+ loading,
5203
+ refetch
5204
+ };
5205
+ };
5178
5206
 
5179
5207
  // src/graphql/hooks/affiliate/hooksMutation.ts
5180
5208
  import { useMutation as useMutation20 } from "@apollo/client";
@@ -5376,7 +5404,8 @@ export {
5376
5404
  useGetSchool,
5377
5405
  useGetAffiliate,
5378
5406
  useGetAffiliates,
5407
+ useGetAffiliateResourceByAffiliateIdAndResourceId,
5379
5408
  useUpdateAffiliateDetails,
5380
5409
  useDeleteAffiliate
5381
5410
  };
5382
- //# sourceMappingURL=chunk-JP76OR4F.mjs.map
5411
+ //# sourceMappingURL=chunk-JVBD55SQ.mjs.map