@timardex/cluemart-shared 1.0.86 → 1.0.87

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
@@ -140,6 +140,7 @@ __export(index_exports, {
140
140
  useGetMarkets: () => useGetMarkets,
141
141
  useGetMarketsByRegion: () => useGetMarketsByRegion,
142
142
  useGetMarketsNearMe: () => useGetMarketsNearMe,
143
+ useGetNotificationCount: () => useGetNotificationCount,
143
144
  useGetNotificationCountSubscription: () => useGetNotificationCountSubscription,
144
145
  useGetRelation: () => useGetRelation,
145
146
  useGetRelationByMarketAndStallholder: () => useGetRelationByMarketAndStallholder,
@@ -155,6 +156,7 @@ __export(index_exports, {
155
156
  useGetUserChats: () => useGetUserChats,
156
157
  useGetUserFavourites: () => useGetUserFavourites,
157
158
  useGetUserMarkets: () => useGetUserMarkets,
159
+ useGetUserNotifications: () => useGetUserNotifications,
158
160
  useGetUserNotificationsSubscription: () => useGetUserNotificationsSubscription,
159
161
  useGetUserStallholder: () => useGetUserStallholder,
160
162
  useGetUsers: () => useGetUsers,
@@ -2968,7 +2970,7 @@ var USER_NOTIFICATION_FRAGMENT = import_client18.gql`
2968
2970
  }
2969
2971
  `;
2970
2972
  var GET_USER_NOTIFICATIONS = import_client18.gql`
2971
- query getUserNotifications($userId: String!, $limit: Int, $offset: Int) {
2973
+ query getUserNotifications($userId: ID!, $limit: Int, $offset: Int) {
2972
2974
  userNotifications(userId: $userId, limit: $limit, offset: $offset) {
2973
2975
  ...UserNotificationFields
2974
2976
  }
@@ -2976,7 +2978,7 @@ var GET_USER_NOTIFICATIONS = import_client18.gql`
2976
2978
  ${USER_NOTIFICATION_FRAGMENT}
2977
2979
  `;
2978
2980
  var GET_NOTIFICATION_COUNT = import_client18.gql`
2979
- query getNotificationCount($userId: String!) {
2981
+ query getNotificationCount($userId: ID!) {
2980
2982
  notificationCount(userId: $userId) {
2981
2983
  total
2982
2984
  unread
@@ -3007,8 +3009,8 @@ var MARK_ALL_NOTIFICATIONS_READ = import_client19.gql`
3007
3009
  }
3008
3010
  `;
3009
3011
  var DELETE_NOTIFICATION = import_client19.gql`
3010
- mutation deleteNotification($_id: ID!) {
3011
- deleteNotification(_id: $_id)
3012
+ mutation deleteNotification($input: DeleteNotificationInput!) {
3013
+ deleteNotification(input: $input)
3012
3014
  }
3013
3015
  `;
3014
3016
 
@@ -3047,12 +3049,41 @@ var useDeleteNotification = () => {
3047
3049
  return { deleteNotification, error, loading };
3048
3050
  };
3049
3051
 
3052
+ // src/graphql/hooks/notifications/hooksQuery.ts
3053
+ var import_client21 = require("@apollo/client");
3054
+ var useGetUserNotifications = (userId, limit, offset) => {
3055
+ const { data, loading, error, refetch } = (0, import_client21.useQuery)(GET_USER_NOTIFICATIONS, {
3056
+ fetchPolicy: "cache-and-network",
3057
+ skip: !userId,
3058
+ variables: { limit, offset, userId }
3059
+ });
3060
+ return {
3061
+ error,
3062
+ loading,
3063
+ notifications: data?.userNotifications || [],
3064
+ refetch
3065
+ };
3066
+ };
3067
+ var useGetNotificationCount = (userId) => {
3068
+ const { data, loading, error, refetch } = (0, import_client21.useQuery)(GET_NOTIFICATION_COUNT, {
3069
+ fetchPolicy: "cache-and-network",
3070
+ skip: !userId,
3071
+ variables: { userId }
3072
+ });
3073
+ return {
3074
+ error,
3075
+ loading,
3076
+ notificationCount: data?.notificationCount || { total: 0, unread: 0 },
3077
+ refetch
3078
+ };
3079
+ };
3080
+
3050
3081
  // src/graphql/hooks/notifications/hooksSubscription.ts
3051
- var import_client22 = require("@apollo/client");
3082
+ var import_client23 = require("@apollo/client");
3052
3083
 
3053
3084
  // src/graphql/subscriptions/notification.ts
3054
- var import_client21 = require("@apollo/client");
3055
- var USER_NOTIFICATION_FRAGMENT2 = import_client21.gql`
3085
+ var import_client22 = require("@apollo/client");
3086
+ var USER_NOTIFICATION_FRAGMENT2 = import_client22.gql`
3056
3087
  fragment UserNotificationFields on Notification {
3057
3088
  _id
3058
3089
  userId
@@ -3065,16 +3096,16 @@ var USER_NOTIFICATION_FRAGMENT2 = import_client21.gql`
3065
3096
  updatedAt
3066
3097
  }
3067
3098
  `;
3068
- var GET_USER_NOTIFICATIONS_SUBSCRIPTION = import_client21.gql`
3069
- subscription getUserNotifications($userId: String!) {
3099
+ var GET_USER_NOTIFICATIONS_SUBSCRIPTION = import_client22.gql`
3100
+ subscription getUserNotifications($userId: ID!) {
3070
3101
  getUserNotifications(userId: $userId) {
3071
3102
  ...UserNotificationFields
3072
3103
  }
3073
3104
  }
3074
3105
  ${USER_NOTIFICATION_FRAGMENT2}
3075
3106
  `;
3076
- var GET_NOTIFICATION_COUNT_SUBSCRIPTION = import_client21.gql`
3077
- subscription getNotificationCount($userId: String!) {
3107
+ var GET_NOTIFICATION_COUNT_SUBSCRIPTION = import_client22.gql`
3108
+ subscription getNotificationCount($userId: ID!) {
3078
3109
  getNotificationCount(userId: $userId) {
3079
3110
  total
3080
3111
  unread
@@ -3084,7 +3115,7 @@ var GET_NOTIFICATION_COUNT_SUBSCRIPTION = import_client21.gql`
3084
3115
 
3085
3116
  // src/graphql/hooks/notifications/hooksSubscription.ts
3086
3117
  var useGetUserNotificationsSubscription = (userId) => {
3087
- const { data, loading, error } = (0, import_client22.useSubscription)(GET_USER_NOTIFICATIONS_SUBSCRIPTION, {
3118
+ const { data, loading, error } = (0, import_client23.useSubscription)(GET_USER_NOTIFICATIONS_SUBSCRIPTION, {
3088
3119
  skip: !userId,
3089
3120
  variables: { userId }
3090
3121
  });
@@ -3095,7 +3126,7 @@ var useGetUserNotificationsSubscription = (userId) => {
3095
3126
  };
3096
3127
  };
3097
3128
  var useGetNotificationCountSubscription = (userId) => {
3098
- const { data, loading, error } = (0, import_client22.useSubscription)(GET_NOTIFICATION_COUNT_SUBSCRIPTION, {
3129
+ const { data, loading, error } = (0, import_client23.useSubscription)(GET_NOTIFICATION_COUNT_SUBSCRIPTION, {
3099
3130
  skip: !userId,
3100
3131
  variables: { userId }
3101
3132
  });
@@ -3107,11 +3138,11 @@ var useGetNotificationCountSubscription = (userId) => {
3107
3138
  };
3108
3139
 
3109
3140
  // src/graphql/hooks/poster.ts
3110
- var import_client24 = require("@apollo/client");
3141
+ var import_client25 = require("@apollo/client");
3111
3142
 
3112
3143
  // src/graphql/mutations/poster.ts
3113
- var import_client23 = require("@apollo/client");
3114
- var CREATE_POSTER_MUTATION = import_client23.gql`
3144
+ var import_client24 = require("@apollo/client");
3145
+ var CREATE_POSTER_MUTATION = import_client24.gql`
3115
3146
  mutation createPoster($input: PosterInputType!) {
3116
3147
  createPoster(input: $input) {
3117
3148
  message
@@ -3121,18 +3152,18 @@ var CREATE_POSTER_MUTATION = import_client23.gql`
3121
3152
 
3122
3153
  // src/graphql/hooks/poster.ts
3123
3154
  var useCreatePoster = () => {
3124
- const [createPoster, { loading, error }] = (0, import_client24.useMutation)(
3155
+ const [createPoster, { loading, error }] = (0, import_client25.useMutation)(
3125
3156
  CREATE_POSTER_MUTATION
3126
3157
  );
3127
3158
  return { createPoster, error, loading };
3128
3159
  };
3129
3160
 
3130
3161
  // src/graphql/hooks/pushToken.ts
3131
- var import_client26 = require("@apollo/client");
3162
+ var import_client27 = require("@apollo/client");
3132
3163
 
3133
3164
  // src/graphql/mutations/pushToken.ts
3134
- var import_client25 = require("@apollo/client");
3135
- var CREATE_PUSH_TOKEN_MUTATION = import_client25.gql`
3165
+ var import_client26 = require("@apollo/client");
3166
+ var CREATE_PUSH_TOKEN_MUTATION = import_client26.gql`
3136
3167
  mutation createPushToken($input: PushTokenInput!) {
3137
3168
  createPushToken(input: $input) {
3138
3169
  success
@@ -3142,21 +3173,21 @@ var CREATE_PUSH_TOKEN_MUTATION = import_client25.gql`
3142
3173
 
3143
3174
  // src/graphql/hooks/pushToken.ts
3144
3175
  var useCreatePushToken = () => {
3145
- const [createPushToken, { loading, error }] = (0, import_client26.useMutation)(
3176
+ const [createPushToken, { loading, error }] = (0, import_client27.useMutation)(
3146
3177
  CREATE_PUSH_TOKEN_MUTATION
3147
3178
  );
3148
3179
  return { createPushToken, error, loading };
3149
3180
  };
3150
3181
 
3151
3182
  // src/graphql/hooks/relation/hooksMutation.ts
3152
- var import_client29 = require("@apollo/client");
3183
+ var import_client30 = require("@apollo/client");
3153
3184
 
3154
3185
  // src/graphql/mutations/relation.ts
3155
- var import_client28 = require("@apollo/client");
3186
+ var import_client29 = require("@apollo/client");
3156
3187
 
3157
3188
  // src/graphql/queries/relation.ts
3158
- var import_client27 = require("@apollo/client");
3159
- var RELATION_DATES_FRAGMENT = import_client27.gql`
3189
+ var import_client28 = require("@apollo/client");
3190
+ var RELATION_DATES_FRAGMENT = import_client28.gql`
3160
3191
  fragment RelationDates on RelationDateType {
3161
3192
  lastUpdateBy
3162
3193
  paymentReference
@@ -3170,7 +3201,7 @@ var RELATION_DATES_FRAGMENT = import_client27.gql`
3170
3201
  status
3171
3202
  }
3172
3203
  `;
3173
- var RELATION_FIELDS_FRAGMENT = import_client27.gql`
3204
+ var RELATION_FIELDS_FRAGMENT = import_client28.gql`
3174
3205
  fragment RelationFields on RelationType {
3175
3206
  _id
3176
3207
  apiMessage
@@ -3187,7 +3218,7 @@ var RELATION_FIELDS_FRAGMENT = import_client27.gql`
3187
3218
  }
3188
3219
  ${RELATION_DATES_FRAGMENT}
3189
3220
  `;
3190
- var GET_RELATION = import_client27.gql`
3221
+ var GET_RELATION = import_client28.gql`
3191
3222
  query getRelation($id: ID!) {
3192
3223
  relation(_id: $id) {
3193
3224
  ...RelationFields
@@ -3195,7 +3226,7 @@ var GET_RELATION = import_client27.gql`
3195
3226
  }
3196
3227
  ${RELATION_FIELDS_FRAGMENT}
3197
3228
  `;
3198
- var GET_RELATION_BY_MARKET_AND_STALLHOLDER = import_client27.gql`
3229
+ var GET_RELATION_BY_MARKET_AND_STALLHOLDER = import_client28.gql`
3199
3230
  query getRelationByMarketAndStallholder($marketId: ID!, $stallholderId: ID!) {
3200
3231
  relationByMarketAndStallholder(
3201
3232
  marketId: $marketId
@@ -3206,7 +3237,7 @@ var GET_RELATION_BY_MARKET_AND_STALLHOLDER = import_client27.gql`
3206
3237
  }
3207
3238
  ${RELATION_FIELDS_FRAGMENT}
3208
3239
  `;
3209
- var GET_MARKET_RELATIONS = import_client27.gql`
3240
+ var GET_MARKET_RELATIONS = import_client28.gql`
3210
3241
  query getMarketRelations($marketId: ID!) {
3211
3242
  marketRelations(marketId: $marketId) {
3212
3243
  ...RelationFields
@@ -3214,7 +3245,7 @@ var GET_MARKET_RELATIONS = import_client27.gql`
3214
3245
  }
3215
3246
  ${RELATION_FIELDS_FRAGMENT}
3216
3247
  `;
3217
- var GET_STALLHOLDER_RELATIONS = import_client27.gql`
3248
+ var GET_STALLHOLDER_RELATIONS = import_client28.gql`
3218
3249
  query getStallholderRelations($stallholderId: ID!) {
3219
3250
  stallholderRelations(stallholderId: $stallholderId) {
3220
3251
  ...RelationFields
@@ -3222,7 +3253,7 @@ var GET_STALLHOLDER_RELATIONS = import_client27.gql`
3222
3253
  }
3223
3254
  ${RELATION_FIELDS_FRAGMENT}
3224
3255
  `;
3225
- var GET_RESOURCE_CONNECTIONS = import_client27.gql`
3256
+ var GET_RESOURCE_CONNECTIONS = import_client28.gql`
3226
3257
  query getResourceConnections(
3227
3258
  $resourceId: ID!
3228
3259
  $resourceType: ResourceTypeEnum!
@@ -3325,7 +3356,7 @@ var GET_RESOURCE_CONNECTIONS = import_client27.gql`
3325
3356
  `;
3326
3357
 
3327
3358
  // src/graphql/mutations/relation.ts
3328
- var CREATE_RELATION_MUTATION = import_client28.gql`
3359
+ var CREATE_RELATION_MUTATION = import_client29.gql`
3329
3360
  mutation createRelation($input: RelationInputType!) {
3330
3361
  createRelation(input: $input) {
3331
3362
  ...RelationFields
@@ -3333,7 +3364,7 @@ var CREATE_RELATION_MUTATION = import_client28.gql`
3333
3364
  }
3334
3365
  ${RELATION_FIELDS_FRAGMENT}
3335
3366
  `;
3336
- var UPDATE_RELATION_MUTATION = import_client28.gql`
3367
+ var UPDATE_RELATION_MUTATION = import_client29.gql`
3337
3368
  mutation updateRelation($_id: ID!, $input: RelationInputType!) {
3338
3369
  updateRelation(_id: $_id, input: $input) {
3339
3370
  ...RelationFields
@@ -3341,7 +3372,7 @@ var UPDATE_RELATION_MUTATION = import_client28.gql`
3341
3372
  }
3342
3373
  ${RELATION_FIELDS_FRAGMENT}
3343
3374
  `;
3344
- var DELETE_RELATION_MUTATION = import_client28.gql`
3375
+ var DELETE_RELATION_MUTATION = import_client29.gql`
3345
3376
  mutation deleteRelation($_id: ID!) {
3346
3377
  deleteRelation(_id: $_id) {
3347
3378
  ...RelationFields
@@ -3353,7 +3384,7 @@ var DELETE_RELATION_MUTATION = import_client28.gql`
3353
3384
  // src/graphql/hooks/relation/hooksMutation.ts
3354
3385
  var fetchPolicy = "no-cache";
3355
3386
  var useCreateRelation = () => {
3356
- const [createRelation, { loading, error }] = (0, import_client29.useMutation)(
3387
+ const [createRelation, { loading, error }] = (0, import_client30.useMutation)(
3357
3388
  CREATE_RELATION_MUTATION,
3358
3389
  {
3359
3390
  awaitRefetchQueries: true,
@@ -3405,7 +3436,7 @@ var useCreateRelation = () => {
3405
3436
  return { createRelation, error, loading };
3406
3437
  };
3407
3438
  var useUpdateRelation = () => {
3408
- const [updateRelation, { loading, error }] = (0, import_client29.useMutation)(
3439
+ const [updateRelation, { loading, error }] = (0, import_client30.useMutation)(
3409
3440
  UPDATE_RELATION_MUTATION,
3410
3441
  {
3411
3442
  awaitRefetchQueries: true,
@@ -3453,7 +3484,7 @@ var useUpdateRelation = () => {
3453
3484
  return { error, loading, updateRelation };
3454
3485
  };
3455
3486
  var useDeleteRelation = () => {
3456
- const [deleteRelation, { loading, error }] = (0, import_client29.useMutation)(
3487
+ const [deleteRelation, { loading, error }] = (0, import_client30.useMutation)(
3457
3488
  DELETE_RELATION_MUTATION,
3458
3489
  {
3459
3490
  awaitRefetchQueries: true,
@@ -3501,9 +3532,9 @@ var useDeleteRelation = () => {
3501
3532
  };
3502
3533
 
3503
3534
  // src/graphql/hooks/relation/hooksQuery.ts
3504
- var import_client30 = require("@apollo/client");
3535
+ var import_client31 = require("@apollo/client");
3505
3536
  var useGetRelation = (id) => {
3506
- const { loading, error, data, refetch } = (0, import_client30.useQuery)(GET_RELATION, {
3537
+ const { loading, error, data, refetch } = (0, import_client31.useQuery)(GET_RELATION, {
3507
3538
  fetchPolicy: "network-only",
3508
3539
  skip: id === "",
3509
3540
  variables: { id }
@@ -3512,7 +3543,7 @@ var useGetRelation = (id) => {
3512
3543
  return { error, loading, refetch, relation };
3513
3544
  };
3514
3545
  var useGetRelationByMarketAndStallholder = (marketId, stallholderId) => {
3515
- const { loading, error, data, refetch } = (0, import_client30.useQuery)(
3546
+ const { loading, error, data, refetch } = (0, import_client31.useQuery)(
3516
3547
  GET_RELATION_BY_MARKET_AND_STALLHOLDER,
3517
3548
  {
3518
3549
  fetchPolicy: "network-only",
@@ -3524,7 +3555,7 @@ var useGetRelationByMarketAndStallholder = (marketId, stallholderId) => {
3524
3555
  return { error, loading, refetch, relationByMarketAndStallholder };
3525
3556
  };
3526
3557
  var useGetMarketRelations = (marketId) => {
3527
- const { loading, error, data, refetch } = (0, import_client30.useQuery)(GET_MARKET_RELATIONS, {
3558
+ const { loading, error, data, refetch } = (0, import_client31.useQuery)(GET_MARKET_RELATIONS, {
3528
3559
  fetchPolicy: "network-only",
3529
3560
  skip: marketId === "",
3530
3561
  variables: { marketId }
@@ -3533,7 +3564,7 @@ var useGetMarketRelations = (marketId) => {
3533
3564
  return { error, loading, marketRelations, refetch };
3534
3565
  };
3535
3566
  var useGetStallholderRelations = (stallholderId) => {
3536
- const { loading, error, data, refetch } = (0, import_client30.useQuery)(
3567
+ const { loading, error, data, refetch } = (0, import_client31.useQuery)(
3537
3568
  GET_STALLHOLDER_RELATIONS,
3538
3569
  {
3539
3570
  fetchPolicy: "network-only",
@@ -3545,7 +3576,7 @@ var useGetStallholderRelations = (stallholderId) => {
3545
3576
  return { error, loading, refetch, stallholderRelations };
3546
3577
  };
3547
3578
  var useGetResourceConnections = (resourceId, resourceType) => {
3548
- const { loading, error, data, refetch } = (0, import_client30.useQuery)(GET_RESOURCE_CONNECTIONS, {
3579
+ const { loading, error, data, refetch } = (0, import_client31.useQuery)(GET_RESOURCE_CONNECTIONS, {
3549
3580
  fetchPolicy: "network-only",
3550
3581
  variables: { resourceId, resourceType }
3551
3582
  });
@@ -3554,11 +3585,11 @@ var useGetResourceConnections = (resourceId, resourceType) => {
3554
3585
  };
3555
3586
 
3556
3587
  // src/graphql/hooks/stallholder/hooksMutation.ts
3557
- var import_client32 = require("@apollo/client");
3588
+ var import_client33 = require("@apollo/client");
3558
3589
 
3559
3590
  // src/graphql/mutations/stallholder.ts
3560
- var import_client31 = require("@apollo/client");
3561
- var CREATE_STALLHOLDER_MUTATION = import_client31.gql`
3591
+ var import_client32 = require("@apollo/client");
3592
+ var CREATE_STALLHOLDER_MUTATION = import_client32.gql`
3562
3593
  mutation createStallholder($input: StallholderInputType!) {
3563
3594
  createStallholder(input: $input) {
3564
3595
  ...StallholderFields
@@ -3566,7 +3597,7 @@ var CREATE_STALLHOLDER_MUTATION = import_client31.gql`
3566
3597
  }
3567
3598
  ${STALLHOLDER}
3568
3599
  `;
3569
- var UPDATE_STALLHOLDER_MUTATION = import_client31.gql`
3600
+ var UPDATE_STALLHOLDER_MUTATION = import_client32.gql`
3570
3601
  mutation updateStallholder($_id: ID!, $input: StallholderInputType!) {
3571
3602
  updateStallholder(_id: $_id, input: $input) {
3572
3603
  ...StallholderFields
@@ -3574,12 +3605,12 @@ var UPDATE_STALLHOLDER_MUTATION = import_client31.gql`
3574
3605
  }
3575
3606
  ${STALLHOLDER}
3576
3607
  `;
3577
- var DELETE_STALLHOLDER_MUTATION = import_client31.gql`
3608
+ var DELETE_STALLHOLDER_MUTATION = import_client32.gql`
3578
3609
  mutation deleteStallholder($_id: ID!) {
3579
3610
  deleteStallholder(_id: $_id)
3580
3611
  }
3581
3612
  `;
3582
- var CREATE_STALLHOLDER_INFO_MUTATION = import_client31.gql`
3613
+ var CREATE_STALLHOLDER_INFO_MUTATION = import_client32.gql`
3583
3614
  mutation createStallholderInfo($input: StallholderInfoInputType!) {
3584
3615
  createStallholderInfo(input: $input) {
3585
3616
  ...StallholderInfoFields
@@ -3587,7 +3618,7 @@ var CREATE_STALLHOLDER_INFO_MUTATION = import_client31.gql`
3587
3618
  }
3588
3619
  ${STALLHOLDER_INFO}
3589
3620
  `;
3590
- var UPDATE_STALLHOLDER_INFO_MUTATION = import_client31.gql`
3621
+ var UPDATE_STALLHOLDER_INFO_MUTATION = import_client32.gql`
3591
3622
  mutation updateStallholderInfo($_id: ID!, $input: StallholderInfoInputType!) {
3592
3623
  updateStallholderInfo(_id: $_id, input: $input) {
3593
3624
  ...StallholderInfoFields
@@ -3598,7 +3629,7 @@ var UPDATE_STALLHOLDER_INFO_MUTATION = import_client31.gql`
3598
3629
 
3599
3630
  // src/graphql/hooks/stallholder/hooksMutation.ts
3600
3631
  var useCreateStallholder = () => {
3601
- const [createStallholder, { loading, error }] = (0, import_client32.useMutation)(
3632
+ const [createStallholder, { loading, error }] = (0, import_client33.useMutation)(
3602
3633
  CREATE_STALLHOLDER_MUTATION,
3603
3634
  {
3604
3635
  awaitRefetchQueries: true,
@@ -3610,7 +3641,7 @@ var useCreateStallholder = () => {
3610
3641
  return { createStallholder, error, loading };
3611
3642
  };
3612
3643
  var useUpdateStallholder = () => {
3613
- const [updateStallholder, { loading, error }] = (0, import_client32.useMutation)(
3644
+ const [updateStallholder, { loading, error }] = (0, import_client33.useMutation)(
3614
3645
  UPDATE_STALLHOLDER_MUTATION,
3615
3646
  {
3616
3647
  awaitRefetchQueries: true,
@@ -3622,7 +3653,7 @@ var useUpdateStallholder = () => {
3622
3653
  return { error, loading, updateStallholder };
3623
3654
  };
3624
3655
  var useDeleteStallholder = () => {
3625
- const [deleteStallholder, { loading, error }] = (0, import_client32.useMutation)(
3656
+ const [deleteStallholder, { loading, error }] = (0, import_client33.useMutation)(
3626
3657
  DELETE_STALLHOLDER_MUTATION,
3627
3658
  {
3628
3659
  awaitRefetchQueries: true,
@@ -3634,7 +3665,7 @@ var useDeleteStallholder = () => {
3634
3665
  return { deleteStallholder, error, loading };
3635
3666
  };
3636
3667
  var useCreateStallholderInfo = () => {
3637
- const [createStallholderInfo, { loading, error }] = (0, import_client32.useMutation)(
3668
+ const [createStallholderInfo, { loading, error }] = (0, import_client33.useMutation)(
3638
3669
  CREATE_STALLHOLDER_INFO_MUTATION,
3639
3670
  {
3640
3671
  awaitRefetchQueries: true,
@@ -3658,7 +3689,7 @@ var useCreateStallholderInfo = () => {
3658
3689
  return { createStallholderInfo, error, loading };
3659
3690
  };
3660
3691
  var useUpdateStallholderInfo = () => {
3661
- const [updateStallholderInfo, { loading, error }] = (0, import_client32.useMutation)(
3692
+ const [updateStallholderInfo, { loading, error }] = (0, import_client33.useMutation)(
3662
3693
  UPDATE_STALLHOLDER_INFO_MUTATION,
3663
3694
  {
3664
3695
  awaitRefetchQueries: true,
@@ -3679,9 +3710,9 @@ var useUpdateStallholderInfo = () => {
3679
3710
  };
3680
3711
 
3681
3712
  // src/graphql/hooks/stallholder/hooksQuery.ts
3682
- var import_client33 = require("@apollo/client");
3713
+ var import_client34 = require("@apollo/client");
3683
3714
  var useGetStallholders = () => {
3684
- const { loading, error, data, refetch } = (0, import_client33.useQuery)(GET_STALLHOLDERS, {
3715
+ const { loading, error, data, refetch } = (0, import_client34.useQuery)(GET_STALLHOLDERS, {
3685
3716
  fetchPolicy: "network-only"
3686
3717
  });
3687
3718
  const stallholders = data?.stallholders;
@@ -3693,7 +3724,7 @@ var useGetStallholders = () => {
3693
3724
  };
3694
3725
  };
3695
3726
  var useGetStallholder = (_id) => {
3696
- const { loading, error, data, refetch } = (0, import_client33.useQuery)(GET_STALLHOLDER, {
3727
+ const { loading, error, data, refetch } = (0, import_client34.useQuery)(GET_STALLHOLDER, {
3697
3728
  fetchPolicy: "network-only",
3698
3729
  skip: !_id,
3699
3730
  variables: { _id }
@@ -3702,7 +3733,7 @@ var useGetStallholder = (_id) => {
3702
3733
  return { error, loading, refetch, stallholder };
3703
3734
  };
3704
3735
  var useGetStallholdersByRegion = (region) => {
3705
- const { loading, error, data, refetch } = (0, import_client33.useQuery)(
3736
+ const { loading, error, data, refetch } = (0, import_client34.useQuery)(
3706
3737
  GET_STALLHOLDERS_BY_REGION,
3707
3738
  {
3708
3739
  fetchPolicy: "no-cache",
@@ -3714,7 +3745,7 @@ var useGetStallholdersByRegion = (region) => {
3714
3745
  return { error, loading, refetch, stallholdersByRegion };
3715
3746
  };
3716
3747
  var useSearchStallholders = (search, region) => {
3717
- const { loading, error, data, refetch } = (0, import_client33.useQuery)(SEARCH_STALLHOLDERS, {
3748
+ const { loading, error, data, refetch } = (0, import_client34.useQuery)(SEARCH_STALLHOLDERS, {
3718
3749
  fetchPolicy: "network-only",
3719
3750
  skip: search.length < 3,
3720
3751
  variables: { region, search }
@@ -3723,7 +3754,7 @@ var useSearchStallholders = (search, region) => {
3723
3754
  return { error, loading, refetch, stallholderSearch };
3724
3755
  };
3725
3756
  var useGetStallholderInfo = (stallholderId) => {
3726
- const { loading, error, data, refetch } = (0, import_client33.useQuery)(GET_STALLHOLDER_INFO, {
3757
+ const { loading, error, data, refetch } = (0, import_client34.useQuery)(GET_STALLHOLDER_INFO, {
3727
3758
  fetchPolicy: "network-only",
3728
3759
  skip: !stallholderId,
3729
3760
  variables: { stallholderId }
@@ -3738,14 +3769,14 @@ var useGetStallholderInfo = (stallholderId) => {
3738
3769
  };
3739
3770
 
3740
3771
  // src/graphql/hooks/testers/hooksMutation.ts
3741
- var import_client36 = require("@apollo/client");
3772
+ var import_client37 = require("@apollo/client");
3742
3773
 
3743
3774
  // src/graphql/mutations/testers.ts
3744
- var import_client35 = require("@apollo/client");
3775
+ var import_client36 = require("@apollo/client");
3745
3776
 
3746
3777
  // src/graphql/queries/testers.ts
3747
- var import_client34 = require("@apollo/client");
3748
- var TESTER_FIELDS_FRAGMENT = import_client34.gql`
3778
+ var import_client35 = require("@apollo/client");
3779
+ var TESTER_FIELDS_FRAGMENT = import_client35.gql`
3749
3780
  fragment TesterFields on TesterType {
3750
3781
  _id
3751
3782
  active
@@ -3758,7 +3789,7 @@ var TESTER_FIELDS_FRAGMENT = import_client34.gql`
3758
3789
  updatedAt
3759
3790
  }
3760
3791
  `;
3761
- var GET_TESTERS = import_client34.gql`
3792
+ var GET_TESTERS = import_client35.gql`
3762
3793
  query getTesters {
3763
3794
  testers {
3764
3795
  ...TesterFields
@@ -3766,7 +3797,7 @@ var GET_TESTERS = import_client34.gql`
3766
3797
  }
3767
3798
  ${TESTER_FIELDS_FRAGMENT}
3768
3799
  `;
3769
- var GET_TESTER = import_client34.gql`
3800
+ var GET_TESTER = import_client35.gql`
3770
3801
  query getTester($_id: ID!) {
3771
3802
  tester(_id: $_id) {
3772
3803
  ...TesterFields
@@ -3776,7 +3807,7 @@ var GET_TESTER = import_client34.gql`
3776
3807
  `;
3777
3808
 
3778
3809
  // src/graphql/mutations/testers.ts
3779
- var CREATE_TESTER_MUTATION = import_client35.gql`
3810
+ var CREATE_TESTER_MUTATION = import_client36.gql`
3780
3811
  mutation createTester($input: TesterInputType!) {
3781
3812
  createTester(input: $input) {
3782
3813
  ...TesterFields
@@ -3784,7 +3815,7 @@ var CREATE_TESTER_MUTATION = import_client35.gql`
3784
3815
  }
3785
3816
  ${TESTER_FIELDS_FRAGMENT}
3786
3817
  `;
3787
- var UPDATE_TESTER_MUTATION = import_client35.gql`
3818
+ var UPDATE_TESTER_MUTATION = import_client36.gql`
3788
3819
  mutation updateTester($_id: ID!, $input: TesterInputType!) {
3789
3820
  updateTester(_id: $_id, input: $input) {
3790
3821
  ...TesterFields
@@ -3792,7 +3823,7 @@ var UPDATE_TESTER_MUTATION = import_client35.gql`
3792
3823
  }
3793
3824
  ${TESTER_FIELDS_FRAGMENT}
3794
3825
  `;
3795
- var DELETE_TESTER_MUTATION = import_client35.gql`
3826
+ var DELETE_TESTER_MUTATION = import_client36.gql`
3796
3827
  mutation deleteTester($_id: ID!) {
3797
3828
  deleteTester(_id: $_id)
3798
3829
  }
@@ -3800,7 +3831,7 @@ var DELETE_TESTER_MUTATION = import_client35.gql`
3800
3831
 
3801
3832
  // src/graphql/hooks/testers/hooksMutation.ts
3802
3833
  var useCreateTester = () => {
3803
- const [createTester, { data, loading, error }] = (0, import_client36.useMutation)(
3834
+ const [createTester, { data, loading, error }] = (0, import_client37.useMutation)(
3804
3835
  CREATE_TESTER_MUTATION
3805
3836
  );
3806
3837
  return {
@@ -3811,7 +3842,7 @@ var useCreateTester = () => {
3811
3842
  };
3812
3843
  };
3813
3844
  var useUpdateTester = () => {
3814
- const [updateTester, { data, loading, error }] = (0, import_client36.useMutation)(
3845
+ const [updateTester, { data, loading, error }] = (0, import_client37.useMutation)(
3815
3846
  UPDATE_TESTER_MUTATION
3816
3847
  );
3817
3848
  return {
@@ -3822,16 +3853,16 @@ var useUpdateTester = () => {
3822
3853
  };
3823
3854
  };
3824
3855
  var useDeleteTester = () => {
3825
- const [deleteTester, { loading, error }] = (0, import_client36.useMutation)(
3856
+ const [deleteTester, { loading, error }] = (0, import_client37.useMutation)(
3826
3857
  DELETE_TESTER_MUTATION
3827
3858
  );
3828
3859
  return { deleteTester, error, loading };
3829
3860
  };
3830
3861
 
3831
3862
  // src/graphql/hooks/testers/hooksQuery.ts
3832
- var import_client37 = require("@apollo/client");
3863
+ var import_client38 = require("@apollo/client");
3833
3864
  var useGetTesters = () => {
3834
- const { data, loading, error, refetch } = (0, import_client37.useQuery)(GET_TESTERS);
3865
+ const { data, loading, error, refetch } = (0, import_client38.useQuery)(GET_TESTERS);
3835
3866
  const testers = data?.testers;
3836
3867
  return {
3837
3868
  error,
@@ -3841,7 +3872,7 @@ var useGetTesters = () => {
3841
3872
  };
3842
3873
  };
3843
3874
  var useGetTester = (_id) => {
3844
- const { data, loading, error, refetch } = (0, import_client37.useQuery)(GET_TESTER, {
3875
+ const { data, loading, error, refetch } = (0, import_client38.useQuery)(GET_TESTER, {
3845
3876
  skip: !_id,
3846
3877
  variables: { _id }
3847
3878
  });
@@ -3850,11 +3881,11 @@ var useGetTester = (_id) => {
3850
3881
  };
3851
3882
 
3852
3883
  // src/graphql/hooks/user/hooksMutation.ts
3853
- var import_client39 = require("@apollo/client");
3884
+ var import_client40 = require("@apollo/client");
3854
3885
 
3855
3886
  // src/graphql/mutations/user.ts
3856
- var import_client38 = require("@apollo/client");
3857
- var CREATE_USER_MUTATION = import_client38.gql`
3887
+ var import_client39 = require("@apollo/client");
3888
+ var CREATE_USER_MUTATION = import_client39.gql`
3858
3889
  mutation createUser($input: UserInputType!) {
3859
3890
  createUser(input: $input) {
3860
3891
  ...UserFields
@@ -3862,7 +3893,7 @@ var CREATE_USER_MUTATION = import_client38.gql`
3862
3893
  }
3863
3894
  ${USER_FIELDS_FRAGMENT}
3864
3895
  `;
3865
- var UPDATE_USER_MUTATION = import_client38.gql`
3896
+ var UPDATE_USER_MUTATION = import_client39.gql`
3866
3897
  mutation updateUser($_id: ID!, $input: UserInputType!) {
3867
3898
  updateUser(_id: $_id, input: $input) {
3868
3899
  ...UserFields
@@ -3870,12 +3901,12 @@ var UPDATE_USER_MUTATION = import_client38.gql`
3870
3901
  }
3871
3902
  ${USER_FIELDS_FRAGMENT}
3872
3903
  `;
3873
- var DELETE_USER_MUTATION = import_client38.gql`
3904
+ var DELETE_USER_MUTATION = import_client39.gql`
3874
3905
  mutation deleteUser($_id: ID!) {
3875
3906
  deleteUser(_id: $_id)
3876
3907
  }
3877
3908
  `;
3878
- var ADD_USER_FAVOURITE_RESOURCE_MUTATION = import_client38.gql`
3909
+ var ADD_USER_FAVOURITE_RESOURCE_MUTATION = import_client39.gql`
3879
3910
  mutation addUserFavouriteResource(
3880
3911
  $resourceId: ID!
3881
3912
  $resourceType: ResourceTypeEnum!
@@ -3891,7 +3922,7 @@ var ADD_USER_FAVOURITE_RESOURCE_MUTATION = import_client38.gql`
3891
3922
  }
3892
3923
  ${USER_FIELDS_FRAGMENT}
3893
3924
  `;
3894
- var REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = import_client38.gql`
3925
+ var REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = import_client39.gql`
3895
3926
  mutation removeUserFavouriteResource(
3896
3927
  $resourceId: ID!
3897
3928
  $resourceType: ResourceTypeEnum!
@@ -3910,11 +3941,11 @@ var REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = import_client38.gql`
3910
3941
 
3911
3942
  // src/graphql/hooks/user/hooksMutation.ts
3912
3943
  var useCreateUser = () => {
3913
- const [createUser, { loading, error }] = (0, import_client39.useMutation)(CREATE_USER_MUTATION);
3944
+ const [createUser, { loading, error }] = (0, import_client40.useMutation)(CREATE_USER_MUTATION);
3914
3945
  return { createUser, error, loading };
3915
3946
  };
3916
3947
  var useUpdateUser = () => {
3917
- const [updateUser, { loading, error }] = (0, import_client39.useMutation)(UPDATE_USER_MUTATION, {
3948
+ const [updateUser, { loading, error }] = (0, import_client40.useMutation)(UPDATE_USER_MUTATION, {
3918
3949
  awaitRefetchQueries: true,
3919
3950
  refetchQueries: (mutationResult) => {
3920
3951
  const userId = mutationResult?.data?.updateUser?._id;
@@ -3925,11 +3956,11 @@ var useUpdateUser = () => {
3925
3956
  return { error, loading, updateUser };
3926
3957
  };
3927
3958
  var useDeleteUser = () => {
3928
- const [deleteUser, { loading, error }] = (0, import_client39.useMutation)(DELETE_USER_MUTATION);
3959
+ const [deleteUser, { loading, error }] = (0, import_client40.useMutation)(DELETE_USER_MUTATION);
3929
3960
  return { deleteUser, error, loading };
3930
3961
  };
3931
3962
  var useAddUserFavouriteResource = () => {
3932
- const [addUserFavouriteResource, { loading, error }] = (0, import_client39.useMutation)(
3963
+ const [addUserFavouriteResource, { loading, error }] = (0, import_client40.useMutation)(
3933
3964
  ADD_USER_FAVOURITE_RESOURCE_MUTATION,
3934
3965
  {
3935
3966
  awaitRefetchQueries: true,
@@ -3939,7 +3970,7 @@ var useAddUserFavouriteResource = () => {
3939
3970
  return { addUserFavouriteResource, error, loading };
3940
3971
  };
3941
3972
  var useRemoveUserFavouriteResource = () => {
3942
- const [removeUserFavouriteResource, { loading, error }] = (0, import_client39.useMutation)(
3973
+ const [removeUserFavouriteResource, { loading, error }] = (0, import_client40.useMutation)(
3943
3974
  REMOVE_USER_FAVOURITE_RESOURCE_MUTATION,
3944
3975
  {
3945
3976
  awaitRefetchQueries: true,
@@ -3950,37 +3981,37 @@ var useRemoveUserFavouriteResource = () => {
3950
3981
  };
3951
3982
 
3952
3983
  // src/graphql/hooks/user/hooksQuery.ts
3953
- var import_client40 = require("@apollo/client");
3984
+ var import_client41 = require("@apollo/client");
3954
3985
  var useGetUsers = () => {
3955
- const { loading, error, data, refetch } = (0, import_client40.useQuery)(GET_USERS, {
3986
+ const { loading, error, data, refetch } = (0, import_client41.useQuery)(GET_USERS, {
3956
3987
  fetchPolicy: "network-only"
3957
3988
  });
3958
3989
  const users = data?.users;
3959
3990
  return { error, loading, refetch, users };
3960
3991
  };
3961
3992
  var useGetUser = (_id) => {
3962
- const { loading, error, data, refetch } = (0, import_client40.useQuery)(GET_USER, {
3993
+ const { loading, error, data, refetch } = (0, import_client41.useQuery)(GET_USER, {
3963
3994
  variables: { _id }
3964
3995
  });
3965
3996
  const user = data?.user;
3966
3997
  return { error, loading, refetch, user };
3967
3998
  };
3968
3999
  var useGetUserMarkets = () => {
3969
- const { loading, error, data, refetch } = (0, import_client40.useQuery)(GET_USER_MARKETS, {
4000
+ const { loading, error, data, refetch } = (0, import_client41.useQuery)(GET_USER_MARKETS, {
3970
4001
  fetchPolicy: "network-only"
3971
4002
  });
3972
4003
  const userMarkets = data?.userMarkets;
3973
4004
  return { error, loading, refetch, userMarkets };
3974
4005
  };
3975
4006
  var useGetUserStallholder = () => {
3976
- const { loading, error, data, refetch } = (0, import_client40.useQuery)(GET_USER_STALLHOLDER, {
4007
+ const { loading, error, data, refetch } = (0, import_client41.useQuery)(GET_USER_STALLHOLDER, {
3977
4008
  fetchPolicy: "network-only"
3978
4009
  });
3979
4010
  const userStallholder = data?.userStallholder;
3980
4011
  return { error, loading, refetch, userStallholder };
3981
4012
  };
3982
4013
  var useGetUserFavourites = () => {
3983
- const { loading, error, data, refetch } = (0, import_client40.useQuery)(GET_USER_FAVOURITES, {
4014
+ const { loading, error, data, refetch } = (0, import_client41.useQuery)(GET_USER_FAVOURITES, {
3984
4015
  fetchPolicy: "network-only"
3985
4016
  });
3986
4017
  const markets = data?.userFavourites.markets;
@@ -5338,6 +5369,7 @@ var EnumNotificationType = ((EnumNotificationType2) => {
5338
5369
  useGetMarkets,
5339
5370
  useGetMarketsByRegion,
5340
5371
  useGetMarketsNearMe,
5372
+ useGetNotificationCount,
5341
5373
  useGetNotificationCountSubscription,
5342
5374
  useGetRelation,
5343
5375
  useGetRelationByMarketAndStallholder,
@@ -5353,6 +5385,7 @@ var EnumNotificationType = ((EnumNotificationType2) => {
5353
5385
  useGetUserChats,
5354
5386
  useGetUserFavourites,
5355
5387
  useGetUserMarkets,
5388
+ useGetUserNotifications,
5356
5389
  useGetUserNotificationsSubscription,
5357
5390
  useGetUserStallholder,
5358
5391
  useGetUsers,