@timardex/cluemart-shared 1.0.87 → 1.0.89

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/index.cjs CHANGED
@@ -2576,8 +2576,8 @@ var ADD_PARTICIPANT_TO_CHAT_MUTATION = import_client9.gql`
2576
2576
  addParticipantToChat(_id: $_id, input: $input) {
2577
2577
  ...ChatFields
2578
2578
  }
2579
- ${CHAT_FIELDS_FRAGMENT}
2580
2579
  }
2580
+ ${CHAT_FIELDS_FRAGMENT}
2581
2581
  `;
2582
2582
  var REMOVE_PARTICIPANT_FROM_CHAT_MUTATION = import_client9.gql`
2583
2583
  mutation removeParticipantFromChat($_id: ID!, $input: ID!) {
@@ -2970,16 +2970,16 @@ var USER_NOTIFICATION_FRAGMENT = import_client18.gql`
2970
2970
  }
2971
2971
  `;
2972
2972
  var GET_USER_NOTIFICATIONS = import_client18.gql`
2973
- query getUserNotifications($userId: ID!, $limit: Int, $offset: Int) {
2974
- userNotifications(userId: $userId, limit: $limit, offset: $offset) {
2973
+ query getUserNotifications($limit: Int, $offset: Int) {
2974
+ userNotifications(limit: $limit, offset: $offset) {
2975
2975
  ...UserNotificationFields
2976
2976
  }
2977
2977
  }
2978
2978
  ${USER_NOTIFICATION_FRAGMENT}
2979
2979
  `;
2980
2980
  var GET_NOTIFICATION_COUNT = import_client18.gql`
2981
- query getNotificationCount($userId: ID!) {
2982
- notificationCount(userId: $userId) {
2981
+ query getNotificationCount {
2982
+ notificationCount {
2983
2983
  total
2984
2984
  unread
2985
2985
  }
@@ -2996,21 +2996,21 @@ var CREATE_BULK_NOTIFICATIONS = import_client19.gql`
2996
2996
  ${USER_NOTIFICATION_FRAGMENT}
2997
2997
  `;
2998
2998
  var MARK_NOTIFICATION_READ = import_client19.gql`
2999
- mutation markNotificationRead($input: MarkNotificationReadInput!) {
3000
- markNotificationRead(input: $input) {
2999
+ mutation markNotificationRead($_id: ID!) {
3000
+ markNotificationRead(_id: $_id) {
3001
3001
  ...UserNotificationFields
3002
3002
  }
3003
3003
  }
3004
3004
  ${USER_NOTIFICATION_FRAGMENT}
3005
3005
  `;
3006
3006
  var MARK_ALL_NOTIFICATIONS_READ = import_client19.gql`
3007
- mutation markAllNotificationsRead($input: MarkAllNotificationsReadInput!) {
3008
- markAllNotificationsRead(input: $input)
3007
+ mutation markAllNotificationsRead {
3008
+ markAllNotificationsRead
3009
3009
  }
3010
3010
  `;
3011
3011
  var DELETE_NOTIFICATION = import_client19.gql`
3012
- mutation deleteNotification($input: DeleteNotificationInput!) {
3013
- deleteNotification(input: $input)
3012
+ mutation deleteNotification($_id: ID!) {
3013
+ deleteNotification(_id: $_id)
3014
3014
  }
3015
3015
  `;
3016
3016
 
@@ -3051,11 +3051,10 @@ var useDeleteNotification = () => {
3051
3051
 
3052
3052
  // src/graphql/hooks/notifications/hooksQuery.ts
3053
3053
  var import_client21 = require("@apollo/client");
3054
- var useGetUserNotifications = (userId, limit, offset) => {
3054
+ var useGetUserNotifications = (limit, offset) => {
3055
3055
  const { data, loading, error, refetch } = (0, import_client21.useQuery)(GET_USER_NOTIFICATIONS, {
3056
3056
  fetchPolicy: "cache-and-network",
3057
- skip: !userId,
3058
- variables: { limit, offset, userId }
3057
+ variables: { limit, offset }
3059
3058
  });
3060
3059
  return {
3061
3060
  error,
@@ -3064,11 +3063,9 @@ var useGetUserNotifications = (userId, limit, offset) => {
3064
3063
  refetch
3065
3064
  };
3066
3065
  };
3067
- var useGetNotificationCount = (userId) => {
3066
+ var useGetNotificationCount = () => {
3068
3067
  const { data, loading, error, refetch } = (0, import_client21.useQuery)(GET_NOTIFICATION_COUNT, {
3069
- fetchPolicy: "cache-and-network",
3070
- skip: !userId,
3071
- variables: { userId }
3068
+ fetchPolicy: "cache-and-network"
3072
3069
  });
3073
3070
  return {
3074
3071
  error,
@@ -3097,16 +3094,16 @@ var USER_NOTIFICATION_FRAGMENT2 = import_client22.gql`
3097
3094
  }
3098
3095
  `;
3099
3096
  var GET_USER_NOTIFICATIONS_SUBSCRIPTION = import_client22.gql`
3100
- subscription getUserNotifications($userId: ID!) {
3101
- getUserNotifications(userId: $userId) {
3097
+ subscription getUserNotifications() {
3098
+ getUserNotifications {
3102
3099
  ...UserNotificationFields
3103
3100
  }
3104
3101
  }
3105
3102
  ${USER_NOTIFICATION_FRAGMENT2}
3106
3103
  `;
3107
3104
  var GET_NOTIFICATION_COUNT_SUBSCRIPTION = import_client22.gql`
3108
- subscription getNotificationCount($userId: ID!) {
3109
- getNotificationCount(userId: $userId) {
3105
+ subscription getNotificationCount() {
3106
+ getNotificationCount{
3110
3107
  total
3111
3108
  unread
3112
3109
  }
@@ -3114,22 +3111,16 @@ var GET_NOTIFICATION_COUNT_SUBSCRIPTION = import_client22.gql`
3114
3111
  `;
3115
3112
 
3116
3113
  // src/graphql/hooks/notifications/hooksSubscription.ts
3117
- var useGetUserNotificationsSubscription = (userId) => {
3118
- const { data, loading, error } = (0, import_client23.useSubscription)(GET_USER_NOTIFICATIONS_SUBSCRIPTION, {
3119
- skip: !userId,
3120
- variables: { userId }
3121
- });
3114
+ var useGetUserNotificationsSubscription = () => {
3115
+ const { data, loading, error } = (0, import_client23.useSubscription)(GET_USER_NOTIFICATIONS_SUBSCRIPTION);
3122
3116
  return {
3123
3117
  error,
3124
3118
  loading,
3125
3119
  notifications: data?.getUserNotifications || []
3126
3120
  };
3127
3121
  };
3128
- var useGetNotificationCountSubscription = (userId) => {
3129
- const { data, loading, error } = (0, import_client23.useSubscription)(GET_NOTIFICATION_COUNT_SUBSCRIPTION, {
3130
- skip: !userId,
3131
- variables: { userId }
3132
- });
3122
+ var useGetNotificationCountSubscription = () => {
3123
+ const { data, loading, error } = (0, import_client23.useSubscription)(GET_NOTIFICATION_COUNT_SUBSCRIPTION);
3133
3124
  return {
3134
3125
  error,
3135
3126
  loading,