@timardex/cluemart-shared 1.5.786 → 1.5.787
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/{chunk-YYRWWHUW.mjs → chunk-JP76OR4F.mjs} +52 -2
- package/dist/chunk-JP76OR4F.mjs.map +1 -0
- package/dist/graphql/index.cjs +52 -0
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +12 -1
- package/dist/graphql/index.d.ts +12 -1
- package/dist/graphql/index.mjs +5 -1
- package/dist/hooks/index.cjs +22 -0
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/index.cjs +52 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +12 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.mjs +50 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-YYRWWHUW.mjs.map +0 -1
package/dist/hooks/index.mjs
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -312,6 +312,7 @@ __export(index_exports, {
|
|
|
312
312
|
useCreateVendor: () => useCreateVendor,
|
|
313
313
|
useCreateVendorInfo: () => useCreateVendorInfo,
|
|
314
314
|
useDeleteAd: () => useDeleteAd,
|
|
315
|
+
useDeleteAffiliate: () => useDeleteAffiliate,
|
|
315
316
|
useDeleteAllNotifications: () => useDeleteAllNotifications,
|
|
316
317
|
useDeleteChat: () => useDeleteChat,
|
|
317
318
|
useDeleteEvent: () => useDeleteEvent,
|
|
@@ -405,6 +406,7 @@ __export(index_exports, {
|
|
|
405
406
|
useToggleChatMessageLike: () => useToggleChatMessageLike,
|
|
406
407
|
useUnlinkUnregisteredVendorByInviterId: () => useUnlinkUnregisteredVendorByInviterId,
|
|
407
408
|
useUpdateAd: () => useUpdateAd,
|
|
409
|
+
useUpdateAffiliateDetails: () => useUpdateAffiliateDetails,
|
|
408
410
|
useUpdateAppSettings: () => useUpdateAppSettings,
|
|
409
411
|
useUpdateDailyClueGame: () => useUpdateDailyClueGame,
|
|
410
412
|
useUpdateEvent: () => useUpdateEvent,
|
|
@@ -8560,6 +8562,54 @@ var useGetAffiliates = () => {
|
|
|
8560
8562
|
};
|
|
8561
8563
|
};
|
|
8562
8564
|
|
|
8565
|
+
// src/graphql/hooks/affiliate/hooksMutation.ts
|
|
8566
|
+
var import_client77 = require("@apollo/client");
|
|
8567
|
+
|
|
8568
|
+
// src/graphql/mutations/affiliate.ts
|
|
8569
|
+
var import_client76 = require("@apollo/client");
|
|
8570
|
+
var UPDATE_AFFILIATE_DETAILS_MUTATION = import_client76.gql`
|
|
8571
|
+
mutation updateAffiliateDetails(
|
|
8572
|
+
$input: AffiliateDetailsInputType!
|
|
8573
|
+
$affiliateId: ID!
|
|
8574
|
+
) {
|
|
8575
|
+
updateAffiliateDetails(input: $input, affiliateId: $affiliateId) {
|
|
8576
|
+
...AffiliateFields
|
|
8577
|
+
}
|
|
8578
|
+
}
|
|
8579
|
+
${AFFILIATE_FIELDS_FRAGMENT}
|
|
8580
|
+
`;
|
|
8581
|
+
var DELETE_AFFILIATE_MUTATION = import_client76.gql`
|
|
8582
|
+
mutation deleteAffiliate($_id: ID!) {
|
|
8583
|
+
deleteAffiliate(_id: $_id)
|
|
8584
|
+
}
|
|
8585
|
+
`;
|
|
8586
|
+
|
|
8587
|
+
// src/graphql/hooks/affiliate/hooksMutation.ts
|
|
8588
|
+
var useUpdateAffiliateDetails = () => {
|
|
8589
|
+
const [updateAffiliateDetails, { loading, error }] = (0, import_client77.useMutation)(
|
|
8590
|
+
UPDATE_AFFILIATE_DETAILS_MUTATION,
|
|
8591
|
+
{
|
|
8592
|
+
awaitRefetchQueries: true,
|
|
8593
|
+
refetchQueries: (mutationResult) => {
|
|
8594
|
+
const affiliateId = mutationResult?.data?.updateAffiliateDetails?._id;
|
|
8595
|
+
if (!affiliateId) return [];
|
|
8596
|
+
return [{ query: GET_AFFILIATE, variables: { _id: affiliateId } }];
|
|
8597
|
+
}
|
|
8598
|
+
}
|
|
8599
|
+
);
|
|
8600
|
+
return { error, loading, updateAffiliateDetails };
|
|
8601
|
+
};
|
|
8602
|
+
var useDeleteAffiliate = () => {
|
|
8603
|
+
const [deleteAffiliate, { loading, error }] = (0, import_client77.useMutation)(
|
|
8604
|
+
DELETE_AFFILIATE_MUTATION,
|
|
8605
|
+
{
|
|
8606
|
+
awaitRefetchQueries: true,
|
|
8607
|
+
refetchQueries: [{ query: GET_AFFILIATES }]
|
|
8608
|
+
}
|
|
8609
|
+
);
|
|
8610
|
+
return { deleteAffiliate, error, loading };
|
|
8611
|
+
};
|
|
8612
|
+
|
|
8563
8613
|
// src/images/index.ts
|
|
8564
8614
|
var PKG = "@timardex/cluemart-shared";
|
|
8565
8615
|
var IMAGE_EXTENSION = ".webp";
|
|
@@ -9275,6 +9325,7 @@ var fonts = {
|
|
|
9275
9325
|
useCreateVendor,
|
|
9276
9326
|
useCreateVendorInfo,
|
|
9277
9327
|
useDeleteAd,
|
|
9328
|
+
useDeleteAffiliate,
|
|
9278
9329
|
useDeleteAllNotifications,
|
|
9279
9330
|
useDeleteChat,
|
|
9280
9331
|
useDeleteEvent,
|
|
@@ -9368,6 +9419,7 @@ var fonts = {
|
|
|
9368
9419
|
useToggleChatMessageLike,
|
|
9369
9420
|
useUnlinkUnregisteredVendorByInviterId,
|
|
9370
9421
|
useUpdateAd,
|
|
9422
|
+
useUpdateAffiliateDetails,
|
|
9371
9423
|
useUpdateAppSettings,
|
|
9372
9424
|
useUpdateDailyClueGame,
|
|
9373
9425
|
useUpdateEvent,
|