@timardex/cluemart-shared 1.0.85 → 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
@@ -118,7 +118,6 @@ __export(index_exports, {
118
118
  useCreateChat: () => useCreateChat,
119
119
  useCreateMarket: () => useCreateMarket,
120
120
  useCreateMarketInfo: () => useCreateMarketInfo,
121
- useCreateNotification: () => useCreateNotification,
122
121
  useCreatePoster: () => useCreatePoster,
123
122
  useCreatePushToken: () => useCreatePushToken,
124
123
  useCreateRelation: () => useCreateRelation,
@@ -141,6 +140,7 @@ __export(index_exports, {
141
140
  useGetMarkets: () => useGetMarkets,
142
141
  useGetMarketsByRegion: () => useGetMarketsByRegion,
143
142
  useGetMarketsNearMe: () => useGetMarketsNearMe,
143
+ useGetNotificationCount: () => useGetNotificationCount,
144
144
  useGetNotificationCountSubscription: () => useGetNotificationCountSubscription,
145
145
  useGetRelation: () => useGetRelation,
146
146
  useGetRelationByMarketAndStallholder: () => useGetRelationByMarketAndStallholder,
@@ -156,6 +156,7 @@ __export(index_exports, {
156
156
  useGetUserChats: () => useGetUserChats,
157
157
  useGetUserFavourites: () => useGetUserFavourites,
158
158
  useGetUserMarkets: () => useGetUserMarkets,
159
+ useGetUserNotifications: () => useGetUserNotifications,
159
160
  useGetUserNotificationsSubscription: () => useGetUserNotificationsSubscription,
160
161
  useGetUserStallholder: () => useGetUserStallholder,
161
162
  useGetUsers: () => useGetUsers,
@@ -2969,7 +2970,7 @@ var USER_NOTIFICATION_FRAGMENT = import_client18.gql`
2969
2970
  }
2970
2971
  `;
2971
2972
  var GET_USER_NOTIFICATIONS = import_client18.gql`
2972
- query getUserNotifications($userId: String!, $limit: Int, $offset: Int) {
2973
+ query getUserNotifications($userId: ID!, $limit: Int, $offset: Int) {
2973
2974
  userNotifications(userId: $userId, limit: $limit, offset: $offset) {
2974
2975
  ...UserNotificationFields
2975
2976
  }
@@ -2977,7 +2978,7 @@ var GET_USER_NOTIFICATIONS = import_client18.gql`
2977
2978
  ${USER_NOTIFICATION_FRAGMENT}
2978
2979
  `;
2979
2980
  var GET_NOTIFICATION_COUNT = import_client18.gql`
2980
- query getNotificationCount($userId: String!) {
2981
+ query getNotificationCount($userId: ID!) {
2981
2982
  notificationCount(userId: $userId) {
2982
2983
  total
2983
2984
  unread
@@ -2986,14 +2987,6 @@ var GET_NOTIFICATION_COUNT = import_client18.gql`
2986
2987
  `;
2987
2988
 
2988
2989
  // src/graphql/mutations/notification.ts
2989
- var CREATE_NOTIFICATION = import_client19.gql`
2990
- mutation createNotification($input: CreateNotificationInput!) {
2991
- createNotification(input: $input) {
2992
- ...UserNotificationFields
2993
- }
2994
- }
2995
- ${USER_NOTIFICATION_FRAGMENT}
2996
- `;
2997
2990
  var CREATE_BULK_NOTIFICATIONS = import_client19.gql`
2998
2991
  mutation createBulkNotifications($input: CreateBulkNotificationInput!) {
2999
2992
  createBulkNotifications(input: $input) {
@@ -3016,16 +3009,12 @@ var MARK_ALL_NOTIFICATIONS_READ = import_client19.gql`
3016
3009
  }
3017
3010
  `;
3018
3011
  var DELETE_NOTIFICATION = import_client19.gql`
3019
- mutation deleteNotification($_id: ID!) {
3020
- deleteNotification(_id: $_id)
3012
+ mutation deleteNotification($input: DeleteNotificationInput!) {
3013
+ deleteNotification(input: $input)
3021
3014
  }
3022
3015
  `;
3023
3016
 
3024
3017
  // src/graphql/hooks/notifications/hooksMutation.ts
3025
- var useCreateNotification = () => {
3026
- const [createNotification, { loading, error }] = (0, import_client20.useMutation)(CREATE_NOTIFICATION);
3027
- return { createNotification, error, loading };
3028
- };
3029
3018
  var useCreateBulkNotifications = () => {
3030
3019
  const [createBulkNotifications, { loading, error }] = (0, import_client20.useMutation)(
3031
3020
  CREATE_BULK_NOTIFICATIONS
@@ -3060,12 +3049,41 @@ var useDeleteNotification = () => {
3060
3049
  return { deleteNotification, error, loading };
3061
3050
  };
3062
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
+
3063
3081
  // src/graphql/hooks/notifications/hooksSubscription.ts
3064
- var import_client22 = require("@apollo/client");
3082
+ var import_client23 = require("@apollo/client");
3065
3083
 
3066
3084
  // src/graphql/subscriptions/notification.ts
3067
- var import_client21 = require("@apollo/client");
3068
- var USER_NOTIFICATION_FRAGMENT2 = import_client21.gql`
3085
+ var import_client22 = require("@apollo/client");
3086
+ var USER_NOTIFICATION_FRAGMENT2 = import_client22.gql`
3069
3087
  fragment UserNotificationFields on Notification {
3070
3088
  _id
3071
3089
  userId
@@ -3078,16 +3096,16 @@ var USER_NOTIFICATION_FRAGMENT2 = import_client21.gql`
3078
3096
  updatedAt
3079
3097
  }
3080
3098
  `;
3081
- var GET_USER_NOTIFICATIONS_SUBSCRIPTION = import_client21.gql`
3082
- subscription getUserNotifications($userId: String!) {
3099
+ var GET_USER_NOTIFICATIONS_SUBSCRIPTION = import_client22.gql`
3100
+ subscription getUserNotifications($userId: ID!) {
3083
3101
  getUserNotifications(userId: $userId) {
3084
3102
  ...UserNotificationFields
3085
3103
  }
3086
3104
  }
3087
3105
  ${USER_NOTIFICATION_FRAGMENT2}
3088
3106
  `;
3089
- var GET_NOTIFICATION_COUNT_SUBSCRIPTION = import_client21.gql`
3090
- subscription getNotificationCount($userId: String!) {
3107
+ var GET_NOTIFICATION_COUNT_SUBSCRIPTION = import_client22.gql`
3108
+ subscription getNotificationCount($userId: ID!) {
3091
3109
  getNotificationCount(userId: $userId) {
3092
3110
  total
3093
3111
  unread
@@ -3097,7 +3115,7 @@ var GET_NOTIFICATION_COUNT_SUBSCRIPTION = import_client21.gql`
3097
3115
 
3098
3116
  // src/graphql/hooks/notifications/hooksSubscription.ts
3099
3117
  var useGetUserNotificationsSubscription = (userId) => {
3100
- 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, {
3101
3119
  skip: !userId,
3102
3120
  variables: { userId }
3103
3121
  });
@@ -3108,7 +3126,7 @@ var useGetUserNotificationsSubscription = (userId) => {
3108
3126
  };
3109
3127
  };
3110
3128
  var useGetNotificationCountSubscription = (userId) => {
3111
- 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, {
3112
3130
  skip: !userId,
3113
3131
  variables: { userId }
3114
3132
  });
@@ -3120,11 +3138,11 @@ var useGetNotificationCountSubscription = (userId) => {
3120
3138
  };
3121
3139
 
3122
3140
  // src/graphql/hooks/poster.ts
3123
- var import_client24 = require("@apollo/client");
3141
+ var import_client25 = require("@apollo/client");
3124
3142
 
3125
3143
  // src/graphql/mutations/poster.ts
3126
- var import_client23 = require("@apollo/client");
3127
- var CREATE_POSTER_MUTATION = import_client23.gql`
3144
+ var import_client24 = require("@apollo/client");
3145
+ var CREATE_POSTER_MUTATION = import_client24.gql`
3128
3146
  mutation createPoster($input: PosterInputType!) {
3129
3147
  createPoster(input: $input) {
3130
3148
  message
@@ -3134,18 +3152,18 @@ var CREATE_POSTER_MUTATION = import_client23.gql`
3134
3152
 
3135
3153
  // src/graphql/hooks/poster.ts
3136
3154
  var useCreatePoster = () => {
3137
- const [createPoster, { loading, error }] = (0, import_client24.useMutation)(
3155
+ const [createPoster, { loading, error }] = (0, import_client25.useMutation)(
3138
3156
  CREATE_POSTER_MUTATION
3139
3157
  );
3140
3158
  return { createPoster, error, loading };
3141
3159
  };
3142
3160
 
3143
3161
  // src/graphql/hooks/pushToken.ts
3144
- var import_client26 = require("@apollo/client");
3162
+ var import_client27 = require("@apollo/client");
3145
3163
 
3146
3164
  // src/graphql/mutations/pushToken.ts
3147
- var import_client25 = require("@apollo/client");
3148
- var CREATE_PUSH_TOKEN_MUTATION = import_client25.gql`
3165
+ var import_client26 = require("@apollo/client");
3166
+ var CREATE_PUSH_TOKEN_MUTATION = import_client26.gql`
3149
3167
  mutation createPushToken($input: PushTokenInput!) {
3150
3168
  createPushToken(input: $input) {
3151
3169
  success
@@ -3155,21 +3173,21 @@ var CREATE_PUSH_TOKEN_MUTATION = import_client25.gql`
3155
3173
 
3156
3174
  // src/graphql/hooks/pushToken.ts
3157
3175
  var useCreatePushToken = () => {
3158
- const [createPushToken, { loading, error }] = (0, import_client26.useMutation)(
3176
+ const [createPushToken, { loading, error }] = (0, import_client27.useMutation)(
3159
3177
  CREATE_PUSH_TOKEN_MUTATION
3160
3178
  );
3161
3179
  return { createPushToken, error, loading };
3162
3180
  };
3163
3181
 
3164
3182
  // src/graphql/hooks/relation/hooksMutation.ts
3165
- var import_client29 = require("@apollo/client");
3183
+ var import_client30 = require("@apollo/client");
3166
3184
 
3167
3185
  // src/graphql/mutations/relation.ts
3168
- var import_client28 = require("@apollo/client");
3186
+ var import_client29 = require("@apollo/client");
3169
3187
 
3170
3188
  // src/graphql/queries/relation.ts
3171
- var import_client27 = require("@apollo/client");
3172
- var RELATION_DATES_FRAGMENT = import_client27.gql`
3189
+ var import_client28 = require("@apollo/client");
3190
+ var RELATION_DATES_FRAGMENT = import_client28.gql`
3173
3191
  fragment RelationDates on RelationDateType {
3174
3192
  lastUpdateBy
3175
3193
  paymentReference
@@ -3183,7 +3201,7 @@ var RELATION_DATES_FRAGMENT = import_client27.gql`
3183
3201
  status
3184
3202
  }
3185
3203
  `;
3186
- var RELATION_FIELDS_FRAGMENT = import_client27.gql`
3204
+ var RELATION_FIELDS_FRAGMENT = import_client28.gql`
3187
3205
  fragment RelationFields on RelationType {
3188
3206
  _id
3189
3207
  apiMessage
@@ -3200,7 +3218,7 @@ var RELATION_FIELDS_FRAGMENT = import_client27.gql`
3200
3218
  }
3201
3219
  ${RELATION_DATES_FRAGMENT}
3202
3220
  `;
3203
- var GET_RELATION = import_client27.gql`
3221
+ var GET_RELATION = import_client28.gql`
3204
3222
  query getRelation($id: ID!) {
3205
3223
  relation(_id: $id) {
3206
3224
  ...RelationFields
@@ -3208,7 +3226,7 @@ var GET_RELATION = import_client27.gql`
3208
3226
  }
3209
3227
  ${RELATION_FIELDS_FRAGMENT}
3210
3228
  `;
3211
- var GET_RELATION_BY_MARKET_AND_STALLHOLDER = import_client27.gql`
3229
+ var GET_RELATION_BY_MARKET_AND_STALLHOLDER = import_client28.gql`
3212
3230
  query getRelationByMarketAndStallholder($marketId: ID!, $stallholderId: ID!) {
3213
3231
  relationByMarketAndStallholder(
3214
3232
  marketId: $marketId
@@ -3219,7 +3237,7 @@ var GET_RELATION_BY_MARKET_AND_STALLHOLDER = import_client27.gql`
3219
3237
  }
3220
3238
  ${RELATION_FIELDS_FRAGMENT}
3221
3239
  `;
3222
- var GET_MARKET_RELATIONS = import_client27.gql`
3240
+ var GET_MARKET_RELATIONS = import_client28.gql`
3223
3241
  query getMarketRelations($marketId: ID!) {
3224
3242
  marketRelations(marketId: $marketId) {
3225
3243
  ...RelationFields
@@ -3227,7 +3245,7 @@ var GET_MARKET_RELATIONS = import_client27.gql`
3227
3245
  }
3228
3246
  ${RELATION_FIELDS_FRAGMENT}
3229
3247
  `;
3230
- var GET_STALLHOLDER_RELATIONS = import_client27.gql`
3248
+ var GET_STALLHOLDER_RELATIONS = import_client28.gql`
3231
3249
  query getStallholderRelations($stallholderId: ID!) {
3232
3250
  stallholderRelations(stallholderId: $stallholderId) {
3233
3251
  ...RelationFields
@@ -3235,7 +3253,7 @@ var GET_STALLHOLDER_RELATIONS = import_client27.gql`
3235
3253
  }
3236
3254
  ${RELATION_FIELDS_FRAGMENT}
3237
3255
  `;
3238
- var GET_RESOURCE_CONNECTIONS = import_client27.gql`
3256
+ var GET_RESOURCE_CONNECTIONS = import_client28.gql`
3239
3257
  query getResourceConnections(
3240
3258
  $resourceId: ID!
3241
3259
  $resourceType: ResourceTypeEnum!
@@ -3338,7 +3356,7 @@ var GET_RESOURCE_CONNECTIONS = import_client27.gql`
3338
3356
  `;
3339
3357
 
3340
3358
  // src/graphql/mutations/relation.ts
3341
- var CREATE_RELATION_MUTATION = import_client28.gql`
3359
+ var CREATE_RELATION_MUTATION = import_client29.gql`
3342
3360
  mutation createRelation($input: RelationInputType!) {
3343
3361
  createRelation(input: $input) {
3344
3362
  ...RelationFields
@@ -3346,7 +3364,7 @@ var CREATE_RELATION_MUTATION = import_client28.gql`
3346
3364
  }
3347
3365
  ${RELATION_FIELDS_FRAGMENT}
3348
3366
  `;
3349
- var UPDATE_RELATION_MUTATION = import_client28.gql`
3367
+ var UPDATE_RELATION_MUTATION = import_client29.gql`
3350
3368
  mutation updateRelation($_id: ID!, $input: RelationInputType!) {
3351
3369
  updateRelation(_id: $_id, input: $input) {
3352
3370
  ...RelationFields
@@ -3354,7 +3372,7 @@ var UPDATE_RELATION_MUTATION = import_client28.gql`
3354
3372
  }
3355
3373
  ${RELATION_FIELDS_FRAGMENT}
3356
3374
  `;
3357
- var DELETE_RELATION_MUTATION = import_client28.gql`
3375
+ var DELETE_RELATION_MUTATION = import_client29.gql`
3358
3376
  mutation deleteRelation($_id: ID!) {
3359
3377
  deleteRelation(_id: $_id) {
3360
3378
  ...RelationFields
@@ -3366,7 +3384,7 @@ var DELETE_RELATION_MUTATION = import_client28.gql`
3366
3384
  // src/graphql/hooks/relation/hooksMutation.ts
3367
3385
  var fetchPolicy = "no-cache";
3368
3386
  var useCreateRelation = () => {
3369
- const [createRelation, { loading, error }] = (0, import_client29.useMutation)(
3387
+ const [createRelation, { loading, error }] = (0, import_client30.useMutation)(
3370
3388
  CREATE_RELATION_MUTATION,
3371
3389
  {
3372
3390
  awaitRefetchQueries: true,
@@ -3418,7 +3436,7 @@ var useCreateRelation = () => {
3418
3436
  return { createRelation, error, loading };
3419
3437
  };
3420
3438
  var useUpdateRelation = () => {
3421
- const [updateRelation, { loading, error }] = (0, import_client29.useMutation)(
3439
+ const [updateRelation, { loading, error }] = (0, import_client30.useMutation)(
3422
3440
  UPDATE_RELATION_MUTATION,
3423
3441
  {
3424
3442
  awaitRefetchQueries: true,
@@ -3466,7 +3484,7 @@ var useUpdateRelation = () => {
3466
3484
  return { error, loading, updateRelation };
3467
3485
  };
3468
3486
  var useDeleteRelation = () => {
3469
- const [deleteRelation, { loading, error }] = (0, import_client29.useMutation)(
3487
+ const [deleteRelation, { loading, error }] = (0, import_client30.useMutation)(
3470
3488
  DELETE_RELATION_MUTATION,
3471
3489
  {
3472
3490
  awaitRefetchQueries: true,
@@ -3514,9 +3532,9 @@ var useDeleteRelation = () => {
3514
3532
  };
3515
3533
 
3516
3534
  // src/graphql/hooks/relation/hooksQuery.ts
3517
- var import_client30 = require("@apollo/client");
3535
+ var import_client31 = require("@apollo/client");
3518
3536
  var useGetRelation = (id) => {
3519
- const { loading, error, data, refetch } = (0, import_client30.useQuery)(GET_RELATION, {
3537
+ const { loading, error, data, refetch } = (0, import_client31.useQuery)(GET_RELATION, {
3520
3538
  fetchPolicy: "network-only",
3521
3539
  skip: id === "",
3522
3540
  variables: { id }
@@ -3525,7 +3543,7 @@ var useGetRelation = (id) => {
3525
3543
  return { error, loading, refetch, relation };
3526
3544
  };
3527
3545
  var useGetRelationByMarketAndStallholder = (marketId, stallholderId) => {
3528
- const { loading, error, data, refetch } = (0, import_client30.useQuery)(
3546
+ const { loading, error, data, refetch } = (0, import_client31.useQuery)(
3529
3547
  GET_RELATION_BY_MARKET_AND_STALLHOLDER,
3530
3548
  {
3531
3549
  fetchPolicy: "network-only",
@@ -3537,7 +3555,7 @@ var useGetRelationByMarketAndStallholder = (marketId, stallholderId) => {
3537
3555
  return { error, loading, refetch, relationByMarketAndStallholder };
3538
3556
  };
3539
3557
  var useGetMarketRelations = (marketId) => {
3540
- 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, {
3541
3559
  fetchPolicy: "network-only",
3542
3560
  skip: marketId === "",
3543
3561
  variables: { marketId }
@@ -3546,7 +3564,7 @@ var useGetMarketRelations = (marketId) => {
3546
3564
  return { error, loading, marketRelations, refetch };
3547
3565
  };
3548
3566
  var useGetStallholderRelations = (stallholderId) => {
3549
- const { loading, error, data, refetch } = (0, import_client30.useQuery)(
3567
+ const { loading, error, data, refetch } = (0, import_client31.useQuery)(
3550
3568
  GET_STALLHOLDER_RELATIONS,
3551
3569
  {
3552
3570
  fetchPolicy: "network-only",
@@ -3558,7 +3576,7 @@ var useGetStallholderRelations = (stallholderId) => {
3558
3576
  return { error, loading, refetch, stallholderRelations };
3559
3577
  };
3560
3578
  var useGetResourceConnections = (resourceId, resourceType) => {
3561
- 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, {
3562
3580
  fetchPolicy: "network-only",
3563
3581
  variables: { resourceId, resourceType }
3564
3582
  });
@@ -3567,11 +3585,11 @@ var useGetResourceConnections = (resourceId, resourceType) => {
3567
3585
  };
3568
3586
 
3569
3587
  // src/graphql/hooks/stallholder/hooksMutation.ts
3570
- var import_client32 = require("@apollo/client");
3588
+ var import_client33 = require("@apollo/client");
3571
3589
 
3572
3590
  // src/graphql/mutations/stallholder.ts
3573
- var import_client31 = require("@apollo/client");
3574
- var CREATE_STALLHOLDER_MUTATION = import_client31.gql`
3591
+ var import_client32 = require("@apollo/client");
3592
+ var CREATE_STALLHOLDER_MUTATION = import_client32.gql`
3575
3593
  mutation createStallholder($input: StallholderInputType!) {
3576
3594
  createStallholder(input: $input) {
3577
3595
  ...StallholderFields
@@ -3579,7 +3597,7 @@ var CREATE_STALLHOLDER_MUTATION = import_client31.gql`
3579
3597
  }
3580
3598
  ${STALLHOLDER}
3581
3599
  `;
3582
- var UPDATE_STALLHOLDER_MUTATION = import_client31.gql`
3600
+ var UPDATE_STALLHOLDER_MUTATION = import_client32.gql`
3583
3601
  mutation updateStallholder($_id: ID!, $input: StallholderInputType!) {
3584
3602
  updateStallholder(_id: $_id, input: $input) {
3585
3603
  ...StallholderFields
@@ -3587,12 +3605,12 @@ var UPDATE_STALLHOLDER_MUTATION = import_client31.gql`
3587
3605
  }
3588
3606
  ${STALLHOLDER}
3589
3607
  `;
3590
- var DELETE_STALLHOLDER_MUTATION = import_client31.gql`
3608
+ var DELETE_STALLHOLDER_MUTATION = import_client32.gql`
3591
3609
  mutation deleteStallholder($_id: ID!) {
3592
3610
  deleteStallholder(_id: $_id)
3593
3611
  }
3594
3612
  `;
3595
- var CREATE_STALLHOLDER_INFO_MUTATION = import_client31.gql`
3613
+ var CREATE_STALLHOLDER_INFO_MUTATION = import_client32.gql`
3596
3614
  mutation createStallholderInfo($input: StallholderInfoInputType!) {
3597
3615
  createStallholderInfo(input: $input) {
3598
3616
  ...StallholderInfoFields
@@ -3600,7 +3618,7 @@ var CREATE_STALLHOLDER_INFO_MUTATION = import_client31.gql`
3600
3618
  }
3601
3619
  ${STALLHOLDER_INFO}
3602
3620
  `;
3603
- var UPDATE_STALLHOLDER_INFO_MUTATION = import_client31.gql`
3621
+ var UPDATE_STALLHOLDER_INFO_MUTATION = import_client32.gql`
3604
3622
  mutation updateStallholderInfo($_id: ID!, $input: StallholderInfoInputType!) {
3605
3623
  updateStallholderInfo(_id: $_id, input: $input) {
3606
3624
  ...StallholderInfoFields
@@ -3611,7 +3629,7 @@ var UPDATE_STALLHOLDER_INFO_MUTATION = import_client31.gql`
3611
3629
 
3612
3630
  // src/graphql/hooks/stallholder/hooksMutation.ts
3613
3631
  var useCreateStallholder = () => {
3614
- const [createStallholder, { loading, error }] = (0, import_client32.useMutation)(
3632
+ const [createStallholder, { loading, error }] = (0, import_client33.useMutation)(
3615
3633
  CREATE_STALLHOLDER_MUTATION,
3616
3634
  {
3617
3635
  awaitRefetchQueries: true,
@@ -3623,7 +3641,7 @@ var useCreateStallholder = () => {
3623
3641
  return { createStallholder, error, loading };
3624
3642
  };
3625
3643
  var useUpdateStallholder = () => {
3626
- const [updateStallholder, { loading, error }] = (0, import_client32.useMutation)(
3644
+ const [updateStallholder, { loading, error }] = (0, import_client33.useMutation)(
3627
3645
  UPDATE_STALLHOLDER_MUTATION,
3628
3646
  {
3629
3647
  awaitRefetchQueries: true,
@@ -3635,7 +3653,7 @@ var useUpdateStallholder = () => {
3635
3653
  return { error, loading, updateStallholder };
3636
3654
  };
3637
3655
  var useDeleteStallholder = () => {
3638
- const [deleteStallholder, { loading, error }] = (0, import_client32.useMutation)(
3656
+ const [deleteStallholder, { loading, error }] = (0, import_client33.useMutation)(
3639
3657
  DELETE_STALLHOLDER_MUTATION,
3640
3658
  {
3641
3659
  awaitRefetchQueries: true,
@@ -3647,7 +3665,7 @@ var useDeleteStallholder = () => {
3647
3665
  return { deleteStallholder, error, loading };
3648
3666
  };
3649
3667
  var useCreateStallholderInfo = () => {
3650
- const [createStallholderInfo, { loading, error }] = (0, import_client32.useMutation)(
3668
+ const [createStallholderInfo, { loading, error }] = (0, import_client33.useMutation)(
3651
3669
  CREATE_STALLHOLDER_INFO_MUTATION,
3652
3670
  {
3653
3671
  awaitRefetchQueries: true,
@@ -3671,7 +3689,7 @@ var useCreateStallholderInfo = () => {
3671
3689
  return { createStallholderInfo, error, loading };
3672
3690
  };
3673
3691
  var useUpdateStallholderInfo = () => {
3674
- const [updateStallholderInfo, { loading, error }] = (0, import_client32.useMutation)(
3692
+ const [updateStallholderInfo, { loading, error }] = (0, import_client33.useMutation)(
3675
3693
  UPDATE_STALLHOLDER_INFO_MUTATION,
3676
3694
  {
3677
3695
  awaitRefetchQueries: true,
@@ -3692,9 +3710,9 @@ var useUpdateStallholderInfo = () => {
3692
3710
  };
3693
3711
 
3694
3712
  // src/graphql/hooks/stallholder/hooksQuery.ts
3695
- var import_client33 = require("@apollo/client");
3713
+ var import_client34 = require("@apollo/client");
3696
3714
  var useGetStallholders = () => {
3697
- const { loading, error, data, refetch } = (0, import_client33.useQuery)(GET_STALLHOLDERS, {
3715
+ const { loading, error, data, refetch } = (0, import_client34.useQuery)(GET_STALLHOLDERS, {
3698
3716
  fetchPolicy: "network-only"
3699
3717
  });
3700
3718
  const stallholders = data?.stallholders;
@@ -3706,7 +3724,7 @@ var useGetStallholders = () => {
3706
3724
  };
3707
3725
  };
3708
3726
  var useGetStallholder = (_id) => {
3709
- const { loading, error, data, refetch } = (0, import_client33.useQuery)(GET_STALLHOLDER, {
3727
+ const { loading, error, data, refetch } = (0, import_client34.useQuery)(GET_STALLHOLDER, {
3710
3728
  fetchPolicy: "network-only",
3711
3729
  skip: !_id,
3712
3730
  variables: { _id }
@@ -3715,7 +3733,7 @@ var useGetStallholder = (_id) => {
3715
3733
  return { error, loading, refetch, stallholder };
3716
3734
  };
3717
3735
  var useGetStallholdersByRegion = (region) => {
3718
- const { loading, error, data, refetch } = (0, import_client33.useQuery)(
3736
+ const { loading, error, data, refetch } = (0, import_client34.useQuery)(
3719
3737
  GET_STALLHOLDERS_BY_REGION,
3720
3738
  {
3721
3739
  fetchPolicy: "no-cache",
@@ -3727,7 +3745,7 @@ var useGetStallholdersByRegion = (region) => {
3727
3745
  return { error, loading, refetch, stallholdersByRegion };
3728
3746
  };
3729
3747
  var useSearchStallholders = (search, region) => {
3730
- const { loading, error, data, refetch } = (0, import_client33.useQuery)(SEARCH_STALLHOLDERS, {
3748
+ const { loading, error, data, refetch } = (0, import_client34.useQuery)(SEARCH_STALLHOLDERS, {
3731
3749
  fetchPolicy: "network-only",
3732
3750
  skip: search.length < 3,
3733
3751
  variables: { region, search }
@@ -3736,7 +3754,7 @@ var useSearchStallholders = (search, region) => {
3736
3754
  return { error, loading, refetch, stallholderSearch };
3737
3755
  };
3738
3756
  var useGetStallholderInfo = (stallholderId) => {
3739
- 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, {
3740
3758
  fetchPolicy: "network-only",
3741
3759
  skip: !stallholderId,
3742
3760
  variables: { stallholderId }
@@ -3751,14 +3769,14 @@ var useGetStallholderInfo = (stallholderId) => {
3751
3769
  };
3752
3770
 
3753
3771
  // src/graphql/hooks/testers/hooksMutation.ts
3754
- var import_client36 = require("@apollo/client");
3772
+ var import_client37 = require("@apollo/client");
3755
3773
 
3756
3774
  // src/graphql/mutations/testers.ts
3757
- var import_client35 = require("@apollo/client");
3775
+ var import_client36 = require("@apollo/client");
3758
3776
 
3759
3777
  // src/graphql/queries/testers.ts
3760
- var import_client34 = require("@apollo/client");
3761
- var TESTER_FIELDS_FRAGMENT = import_client34.gql`
3778
+ var import_client35 = require("@apollo/client");
3779
+ var TESTER_FIELDS_FRAGMENT = import_client35.gql`
3762
3780
  fragment TesterFields on TesterType {
3763
3781
  _id
3764
3782
  active
@@ -3771,7 +3789,7 @@ var TESTER_FIELDS_FRAGMENT = import_client34.gql`
3771
3789
  updatedAt
3772
3790
  }
3773
3791
  `;
3774
- var GET_TESTERS = import_client34.gql`
3792
+ var GET_TESTERS = import_client35.gql`
3775
3793
  query getTesters {
3776
3794
  testers {
3777
3795
  ...TesterFields
@@ -3779,7 +3797,7 @@ var GET_TESTERS = import_client34.gql`
3779
3797
  }
3780
3798
  ${TESTER_FIELDS_FRAGMENT}
3781
3799
  `;
3782
- var GET_TESTER = import_client34.gql`
3800
+ var GET_TESTER = import_client35.gql`
3783
3801
  query getTester($_id: ID!) {
3784
3802
  tester(_id: $_id) {
3785
3803
  ...TesterFields
@@ -3789,7 +3807,7 @@ var GET_TESTER = import_client34.gql`
3789
3807
  `;
3790
3808
 
3791
3809
  // src/graphql/mutations/testers.ts
3792
- var CREATE_TESTER_MUTATION = import_client35.gql`
3810
+ var CREATE_TESTER_MUTATION = import_client36.gql`
3793
3811
  mutation createTester($input: TesterInputType!) {
3794
3812
  createTester(input: $input) {
3795
3813
  ...TesterFields
@@ -3797,7 +3815,7 @@ var CREATE_TESTER_MUTATION = import_client35.gql`
3797
3815
  }
3798
3816
  ${TESTER_FIELDS_FRAGMENT}
3799
3817
  `;
3800
- var UPDATE_TESTER_MUTATION = import_client35.gql`
3818
+ var UPDATE_TESTER_MUTATION = import_client36.gql`
3801
3819
  mutation updateTester($_id: ID!, $input: TesterInputType!) {
3802
3820
  updateTester(_id: $_id, input: $input) {
3803
3821
  ...TesterFields
@@ -3805,7 +3823,7 @@ var UPDATE_TESTER_MUTATION = import_client35.gql`
3805
3823
  }
3806
3824
  ${TESTER_FIELDS_FRAGMENT}
3807
3825
  `;
3808
- var DELETE_TESTER_MUTATION = import_client35.gql`
3826
+ var DELETE_TESTER_MUTATION = import_client36.gql`
3809
3827
  mutation deleteTester($_id: ID!) {
3810
3828
  deleteTester(_id: $_id)
3811
3829
  }
@@ -3813,7 +3831,7 @@ var DELETE_TESTER_MUTATION = import_client35.gql`
3813
3831
 
3814
3832
  // src/graphql/hooks/testers/hooksMutation.ts
3815
3833
  var useCreateTester = () => {
3816
- const [createTester, { data, loading, error }] = (0, import_client36.useMutation)(
3834
+ const [createTester, { data, loading, error }] = (0, import_client37.useMutation)(
3817
3835
  CREATE_TESTER_MUTATION
3818
3836
  );
3819
3837
  return {
@@ -3824,7 +3842,7 @@ var useCreateTester = () => {
3824
3842
  };
3825
3843
  };
3826
3844
  var useUpdateTester = () => {
3827
- const [updateTester, { data, loading, error }] = (0, import_client36.useMutation)(
3845
+ const [updateTester, { data, loading, error }] = (0, import_client37.useMutation)(
3828
3846
  UPDATE_TESTER_MUTATION
3829
3847
  );
3830
3848
  return {
@@ -3835,16 +3853,16 @@ var useUpdateTester = () => {
3835
3853
  };
3836
3854
  };
3837
3855
  var useDeleteTester = () => {
3838
- const [deleteTester, { loading, error }] = (0, import_client36.useMutation)(
3856
+ const [deleteTester, { loading, error }] = (0, import_client37.useMutation)(
3839
3857
  DELETE_TESTER_MUTATION
3840
3858
  );
3841
3859
  return { deleteTester, error, loading };
3842
3860
  };
3843
3861
 
3844
3862
  // src/graphql/hooks/testers/hooksQuery.ts
3845
- var import_client37 = require("@apollo/client");
3863
+ var import_client38 = require("@apollo/client");
3846
3864
  var useGetTesters = () => {
3847
- const { data, loading, error, refetch } = (0, import_client37.useQuery)(GET_TESTERS);
3865
+ const { data, loading, error, refetch } = (0, import_client38.useQuery)(GET_TESTERS);
3848
3866
  const testers = data?.testers;
3849
3867
  return {
3850
3868
  error,
@@ -3854,7 +3872,7 @@ var useGetTesters = () => {
3854
3872
  };
3855
3873
  };
3856
3874
  var useGetTester = (_id) => {
3857
- const { data, loading, error, refetch } = (0, import_client37.useQuery)(GET_TESTER, {
3875
+ const { data, loading, error, refetch } = (0, import_client38.useQuery)(GET_TESTER, {
3858
3876
  skip: !_id,
3859
3877
  variables: { _id }
3860
3878
  });
@@ -3863,11 +3881,11 @@ var useGetTester = (_id) => {
3863
3881
  };
3864
3882
 
3865
3883
  // src/graphql/hooks/user/hooksMutation.ts
3866
- var import_client39 = require("@apollo/client");
3884
+ var import_client40 = require("@apollo/client");
3867
3885
 
3868
3886
  // src/graphql/mutations/user.ts
3869
- var import_client38 = require("@apollo/client");
3870
- var CREATE_USER_MUTATION = import_client38.gql`
3887
+ var import_client39 = require("@apollo/client");
3888
+ var CREATE_USER_MUTATION = import_client39.gql`
3871
3889
  mutation createUser($input: UserInputType!) {
3872
3890
  createUser(input: $input) {
3873
3891
  ...UserFields
@@ -3875,7 +3893,7 @@ var CREATE_USER_MUTATION = import_client38.gql`
3875
3893
  }
3876
3894
  ${USER_FIELDS_FRAGMENT}
3877
3895
  `;
3878
- var UPDATE_USER_MUTATION = import_client38.gql`
3896
+ var UPDATE_USER_MUTATION = import_client39.gql`
3879
3897
  mutation updateUser($_id: ID!, $input: UserInputType!) {
3880
3898
  updateUser(_id: $_id, input: $input) {
3881
3899
  ...UserFields
@@ -3883,12 +3901,12 @@ var UPDATE_USER_MUTATION = import_client38.gql`
3883
3901
  }
3884
3902
  ${USER_FIELDS_FRAGMENT}
3885
3903
  `;
3886
- var DELETE_USER_MUTATION = import_client38.gql`
3904
+ var DELETE_USER_MUTATION = import_client39.gql`
3887
3905
  mutation deleteUser($_id: ID!) {
3888
3906
  deleteUser(_id: $_id)
3889
3907
  }
3890
3908
  `;
3891
- var ADD_USER_FAVOURITE_RESOURCE_MUTATION = import_client38.gql`
3909
+ var ADD_USER_FAVOURITE_RESOURCE_MUTATION = import_client39.gql`
3892
3910
  mutation addUserFavouriteResource(
3893
3911
  $resourceId: ID!
3894
3912
  $resourceType: ResourceTypeEnum!
@@ -3904,7 +3922,7 @@ var ADD_USER_FAVOURITE_RESOURCE_MUTATION = import_client38.gql`
3904
3922
  }
3905
3923
  ${USER_FIELDS_FRAGMENT}
3906
3924
  `;
3907
- var REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = import_client38.gql`
3925
+ var REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = import_client39.gql`
3908
3926
  mutation removeUserFavouriteResource(
3909
3927
  $resourceId: ID!
3910
3928
  $resourceType: ResourceTypeEnum!
@@ -3923,11 +3941,11 @@ var REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = import_client38.gql`
3923
3941
 
3924
3942
  // src/graphql/hooks/user/hooksMutation.ts
3925
3943
  var useCreateUser = () => {
3926
- const [createUser, { loading, error }] = (0, import_client39.useMutation)(CREATE_USER_MUTATION);
3944
+ const [createUser, { loading, error }] = (0, import_client40.useMutation)(CREATE_USER_MUTATION);
3927
3945
  return { createUser, error, loading };
3928
3946
  };
3929
3947
  var useUpdateUser = () => {
3930
- const [updateUser, { loading, error }] = (0, import_client39.useMutation)(UPDATE_USER_MUTATION, {
3948
+ const [updateUser, { loading, error }] = (0, import_client40.useMutation)(UPDATE_USER_MUTATION, {
3931
3949
  awaitRefetchQueries: true,
3932
3950
  refetchQueries: (mutationResult) => {
3933
3951
  const userId = mutationResult?.data?.updateUser?._id;
@@ -3938,11 +3956,11 @@ var useUpdateUser = () => {
3938
3956
  return { error, loading, updateUser };
3939
3957
  };
3940
3958
  var useDeleteUser = () => {
3941
- const [deleteUser, { loading, error }] = (0, import_client39.useMutation)(DELETE_USER_MUTATION);
3959
+ const [deleteUser, { loading, error }] = (0, import_client40.useMutation)(DELETE_USER_MUTATION);
3942
3960
  return { deleteUser, error, loading };
3943
3961
  };
3944
3962
  var useAddUserFavouriteResource = () => {
3945
- const [addUserFavouriteResource, { loading, error }] = (0, import_client39.useMutation)(
3963
+ const [addUserFavouriteResource, { loading, error }] = (0, import_client40.useMutation)(
3946
3964
  ADD_USER_FAVOURITE_RESOURCE_MUTATION,
3947
3965
  {
3948
3966
  awaitRefetchQueries: true,
@@ -3952,7 +3970,7 @@ var useAddUserFavouriteResource = () => {
3952
3970
  return { addUserFavouriteResource, error, loading };
3953
3971
  };
3954
3972
  var useRemoveUserFavouriteResource = () => {
3955
- const [removeUserFavouriteResource, { loading, error }] = (0, import_client39.useMutation)(
3973
+ const [removeUserFavouriteResource, { loading, error }] = (0, import_client40.useMutation)(
3956
3974
  REMOVE_USER_FAVOURITE_RESOURCE_MUTATION,
3957
3975
  {
3958
3976
  awaitRefetchQueries: true,
@@ -3963,37 +3981,37 @@ var useRemoveUserFavouriteResource = () => {
3963
3981
  };
3964
3982
 
3965
3983
  // src/graphql/hooks/user/hooksQuery.ts
3966
- var import_client40 = require("@apollo/client");
3984
+ var import_client41 = require("@apollo/client");
3967
3985
  var useGetUsers = () => {
3968
- const { loading, error, data, refetch } = (0, import_client40.useQuery)(GET_USERS, {
3986
+ const { loading, error, data, refetch } = (0, import_client41.useQuery)(GET_USERS, {
3969
3987
  fetchPolicy: "network-only"
3970
3988
  });
3971
3989
  const users = data?.users;
3972
3990
  return { error, loading, refetch, users };
3973
3991
  };
3974
3992
  var useGetUser = (_id) => {
3975
- const { loading, error, data, refetch } = (0, import_client40.useQuery)(GET_USER, {
3993
+ const { loading, error, data, refetch } = (0, import_client41.useQuery)(GET_USER, {
3976
3994
  variables: { _id }
3977
3995
  });
3978
3996
  const user = data?.user;
3979
3997
  return { error, loading, refetch, user };
3980
3998
  };
3981
3999
  var useGetUserMarkets = () => {
3982
- 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, {
3983
4001
  fetchPolicy: "network-only"
3984
4002
  });
3985
4003
  const userMarkets = data?.userMarkets;
3986
4004
  return { error, loading, refetch, userMarkets };
3987
4005
  };
3988
4006
  var useGetUserStallholder = () => {
3989
- 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, {
3990
4008
  fetchPolicy: "network-only"
3991
4009
  });
3992
4010
  const userStallholder = data?.userStallholder;
3993
4011
  return { error, loading, refetch, userStallholder };
3994
4012
  };
3995
4013
  var useGetUserFavourites = () => {
3996
- 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, {
3997
4015
  fetchPolicy: "network-only"
3998
4016
  });
3999
4017
  const markets = data?.userFavourites.markets;
@@ -5329,7 +5347,6 @@ var EnumNotificationType = ((EnumNotificationType2) => {
5329
5347
  useCreateChat,
5330
5348
  useCreateMarket,
5331
5349
  useCreateMarketInfo,
5332
- useCreateNotification,
5333
5350
  useCreatePoster,
5334
5351
  useCreatePushToken,
5335
5352
  useCreateRelation,
@@ -5352,6 +5369,7 @@ var EnumNotificationType = ((EnumNotificationType2) => {
5352
5369
  useGetMarkets,
5353
5370
  useGetMarketsByRegion,
5354
5371
  useGetMarketsNearMe,
5372
+ useGetNotificationCount,
5355
5373
  useGetNotificationCountSubscription,
5356
5374
  useGetRelation,
5357
5375
  useGetRelationByMarketAndStallholder,
@@ -5367,6 +5385,7 @@ var EnumNotificationType = ((EnumNotificationType2) => {
5367
5385
  useGetUserChats,
5368
5386
  useGetUserFavourites,
5369
5387
  useGetUserMarkets,
5388
+ useGetUserNotifications,
5370
5389
  useGetUserNotificationsSubscription,
5371
5390
  useGetUserStallholder,
5372
5391
  useGetUsers,