@timardex/cluemart-shared 1.0.76 → 1.0.78

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,6 +118,7 @@ __export(index_exports, {
118
118
  useCreateMarket: () => useCreateMarket,
119
119
  useCreateMarketInfo: () => useCreateMarketInfo,
120
120
  useCreatePoster: () => useCreatePoster,
121
+ useCreatePushToken: () => useCreatePushToken,
121
122
  useCreateRelation: () => useCreateRelation,
122
123
  useCreateStallholder: () => useCreateStallholder,
123
124
  useCreateStallholderInfo: () => useCreateStallholderInfo,
@@ -2957,15 +2958,36 @@ var useCreatePoster = () => {
2957
2958
  return { createPoster, error, loading };
2958
2959
  };
2959
2960
 
2961
+ // src/graphql/hooks/pushToken.ts
2962
+ var import_client21 = require("@apollo/client");
2963
+
2964
+ // src/graphql/mutations/pushToken.ts
2965
+ var import_client20 = require("@apollo/client");
2966
+ var CREATE_PUSH_TOKEN_MUTATION = import_client20.gql`
2967
+ mutation createPushToken($input: PushTokenInput!) {
2968
+ createPushToken(input: $input) {
2969
+ success
2970
+ }
2971
+ }
2972
+ `;
2973
+
2974
+ // src/graphql/hooks/pushToken.ts
2975
+ var useCreatePushToken = () => {
2976
+ const [createPushToken, { loading, error }] = (0, import_client21.useMutation)(
2977
+ CREATE_PUSH_TOKEN_MUTATION
2978
+ );
2979
+ return { createPushToken, error, loading };
2980
+ };
2981
+
2960
2982
  // src/graphql/hooks/relation/hooksMutation.ts
2961
- var import_client22 = require("@apollo/client");
2983
+ var import_client24 = require("@apollo/client");
2962
2984
 
2963
2985
  // src/graphql/mutations/relation.ts
2964
- var import_client21 = require("@apollo/client");
2986
+ var import_client23 = require("@apollo/client");
2965
2987
 
2966
2988
  // src/graphql/queries/relation.ts
2967
- var import_client20 = require("@apollo/client");
2968
- var RELATION_DATES_FRAGMENT = import_client20.gql`
2989
+ var import_client22 = require("@apollo/client");
2990
+ var RELATION_DATES_FRAGMENT = import_client22.gql`
2969
2991
  fragment RelationDates on RelationDateType {
2970
2992
  lastUpdateBy
2971
2993
  paymentReference
@@ -2979,7 +3001,7 @@ var RELATION_DATES_FRAGMENT = import_client20.gql`
2979
3001
  status
2980
3002
  }
2981
3003
  `;
2982
- var RELATION_FIELDS_FRAGMENT = import_client20.gql`
3004
+ var RELATION_FIELDS_FRAGMENT = import_client22.gql`
2983
3005
  fragment RelationFields on RelationType {
2984
3006
  _id
2985
3007
  apiMessage
@@ -2996,7 +3018,7 @@ var RELATION_FIELDS_FRAGMENT = import_client20.gql`
2996
3018
  }
2997
3019
  ${RELATION_DATES_FRAGMENT}
2998
3020
  `;
2999
- var GET_RELATION = import_client20.gql`
3021
+ var GET_RELATION = import_client22.gql`
3000
3022
  query getRelation($id: ID!) {
3001
3023
  relation(_id: $id) {
3002
3024
  ...RelationFields
@@ -3004,7 +3026,7 @@ var GET_RELATION = import_client20.gql`
3004
3026
  }
3005
3027
  ${RELATION_FIELDS_FRAGMENT}
3006
3028
  `;
3007
- var GET_RELATION_BY_MARKET_AND_STALLHOLDER = import_client20.gql`
3029
+ var GET_RELATION_BY_MARKET_AND_STALLHOLDER = import_client22.gql`
3008
3030
  query getRelationByMarketAndStallholder($marketId: ID!, $stallholderId: ID!) {
3009
3031
  relationByMarketAndStallholder(
3010
3032
  marketId: $marketId
@@ -3015,7 +3037,7 @@ var GET_RELATION_BY_MARKET_AND_STALLHOLDER = import_client20.gql`
3015
3037
  }
3016
3038
  ${RELATION_FIELDS_FRAGMENT}
3017
3039
  `;
3018
- var GET_MARKET_RELATIONS = import_client20.gql`
3040
+ var GET_MARKET_RELATIONS = import_client22.gql`
3019
3041
  query getMarketRelations($marketId: ID!) {
3020
3042
  marketRelations(marketId: $marketId) {
3021
3043
  ...RelationFields
@@ -3023,7 +3045,7 @@ var GET_MARKET_RELATIONS = import_client20.gql`
3023
3045
  }
3024
3046
  ${RELATION_FIELDS_FRAGMENT}
3025
3047
  `;
3026
- var GET_STALLHOLDER_RELATIONS = import_client20.gql`
3048
+ var GET_STALLHOLDER_RELATIONS = import_client22.gql`
3027
3049
  query getStallholderRelations($stallholderId: ID!) {
3028
3050
  stallholderRelations(stallholderId: $stallholderId) {
3029
3051
  ...RelationFields
@@ -3031,7 +3053,7 @@ var GET_STALLHOLDER_RELATIONS = import_client20.gql`
3031
3053
  }
3032
3054
  ${RELATION_FIELDS_FRAGMENT}
3033
3055
  `;
3034
- var GET_RESOURCE_CONNECTIONS = import_client20.gql`
3056
+ var GET_RESOURCE_CONNECTIONS = import_client22.gql`
3035
3057
  query getResourceConnections(
3036
3058
  $resourceId: ID!
3037
3059
  $resourceType: ResourceTypeEnum!
@@ -3134,7 +3156,7 @@ var GET_RESOURCE_CONNECTIONS = import_client20.gql`
3134
3156
  `;
3135
3157
 
3136
3158
  // src/graphql/mutations/relation.ts
3137
- var CREATE_RELATION_MUTATION = import_client21.gql`
3159
+ var CREATE_RELATION_MUTATION = import_client23.gql`
3138
3160
  mutation createRelation($input: RelationInputType!) {
3139
3161
  createRelation(input: $input) {
3140
3162
  ...RelationFields
@@ -3142,7 +3164,7 @@ var CREATE_RELATION_MUTATION = import_client21.gql`
3142
3164
  }
3143
3165
  ${RELATION_FIELDS_FRAGMENT}
3144
3166
  `;
3145
- var UPDATE_RELATION_MUTATION = import_client21.gql`
3167
+ var UPDATE_RELATION_MUTATION = import_client23.gql`
3146
3168
  mutation updateRelation($_id: ID!, $input: RelationInputType!) {
3147
3169
  updateRelation(_id: $_id, input: $input) {
3148
3170
  ...RelationFields
@@ -3150,7 +3172,7 @@ var UPDATE_RELATION_MUTATION = import_client21.gql`
3150
3172
  }
3151
3173
  ${RELATION_FIELDS_FRAGMENT}
3152
3174
  `;
3153
- var DELETE_RELATION_MUTATION = import_client21.gql`
3175
+ var DELETE_RELATION_MUTATION = import_client23.gql`
3154
3176
  mutation deleteRelation($_id: ID!) {
3155
3177
  deleteRelation(_id: $_id) {
3156
3178
  ...RelationFields
@@ -3162,7 +3184,7 @@ var DELETE_RELATION_MUTATION = import_client21.gql`
3162
3184
  // src/graphql/hooks/relation/hooksMutation.ts
3163
3185
  var fetchPolicy = "no-cache";
3164
3186
  var useCreateRelation = () => {
3165
- const [createRelation, { loading, error }] = (0, import_client22.useMutation)(
3187
+ const [createRelation, { loading, error }] = (0, import_client24.useMutation)(
3166
3188
  CREATE_RELATION_MUTATION,
3167
3189
  {
3168
3190
  awaitRefetchQueries: true,
@@ -3214,7 +3236,7 @@ var useCreateRelation = () => {
3214
3236
  return { createRelation, error, loading };
3215
3237
  };
3216
3238
  var useUpdateRelation = () => {
3217
- const [updateRelation, { loading, error }] = (0, import_client22.useMutation)(
3239
+ const [updateRelation, { loading, error }] = (0, import_client24.useMutation)(
3218
3240
  UPDATE_RELATION_MUTATION,
3219
3241
  {
3220
3242
  awaitRefetchQueries: true,
@@ -3262,7 +3284,7 @@ var useUpdateRelation = () => {
3262
3284
  return { error, loading, updateRelation };
3263
3285
  };
3264
3286
  var useDeleteRelation = () => {
3265
- const [deleteRelation, { loading, error }] = (0, import_client22.useMutation)(
3287
+ const [deleteRelation, { loading, error }] = (0, import_client24.useMutation)(
3266
3288
  DELETE_RELATION_MUTATION,
3267
3289
  {
3268
3290
  awaitRefetchQueries: true,
@@ -3310,9 +3332,9 @@ var useDeleteRelation = () => {
3310
3332
  };
3311
3333
 
3312
3334
  // src/graphql/hooks/relation/hooksQuery.ts
3313
- var import_client23 = require("@apollo/client");
3335
+ var import_client25 = require("@apollo/client");
3314
3336
  var useGetRelation = (id) => {
3315
- const { loading, error, data, refetch } = (0, import_client23.useQuery)(GET_RELATION, {
3337
+ const { loading, error, data, refetch } = (0, import_client25.useQuery)(GET_RELATION, {
3316
3338
  fetchPolicy: "network-only",
3317
3339
  skip: id === "",
3318
3340
  variables: { id }
@@ -3321,7 +3343,7 @@ var useGetRelation = (id) => {
3321
3343
  return { error, loading, refetch, relation };
3322
3344
  };
3323
3345
  var useGetRelationByMarketAndStallholder = (marketId, stallholderId) => {
3324
- const { loading, error, data, refetch } = (0, import_client23.useQuery)(
3346
+ const { loading, error, data, refetch } = (0, import_client25.useQuery)(
3325
3347
  GET_RELATION_BY_MARKET_AND_STALLHOLDER,
3326
3348
  {
3327
3349
  fetchPolicy: "network-only",
@@ -3333,7 +3355,7 @@ var useGetRelationByMarketAndStallholder = (marketId, stallholderId) => {
3333
3355
  return { error, loading, refetch, relationByMarketAndStallholder };
3334
3356
  };
3335
3357
  var useGetMarketRelations = (marketId) => {
3336
- const { loading, error, data, refetch } = (0, import_client23.useQuery)(GET_MARKET_RELATIONS, {
3358
+ const { loading, error, data, refetch } = (0, import_client25.useQuery)(GET_MARKET_RELATIONS, {
3337
3359
  fetchPolicy: "network-only",
3338
3360
  skip: marketId === "",
3339
3361
  variables: { marketId }
@@ -3342,7 +3364,7 @@ var useGetMarketRelations = (marketId) => {
3342
3364
  return { error, loading, marketRelations, refetch };
3343
3365
  };
3344
3366
  var useGetStallholderRelations = (stallholderId) => {
3345
- const { loading, error, data, refetch } = (0, import_client23.useQuery)(
3367
+ const { loading, error, data, refetch } = (0, import_client25.useQuery)(
3346
3368
  GET_STALLHOLDER_RELATIONS,
3347
3369
  {
3348
3370
  fetchPolicy: "network-only",
@@ -3354,7 +3376,7 @@ var useGetStallholderRelations = (stallholderId) => {
3354
3376
  return { error, loading, refetch, stallholderRelations };
3355
3377
  };
3356
3378
  var useGetResourceConnections = (resourceId, resourceType) => {
3357
- const { loading, error, data, refetch } = (0, import_client23.useQuery)(GET_RESOURCE_CONNECTIONS, {
3379
+ const { loading, error, data, refetch } = (0, import_client25.useQuery)(GET_RESOURCE_CONNECTIONS, {
3358
3380
  fetchPolicy: "network-only",
3359
3381
  variables: { resourceId, resourceType }
3360
3382
  });
@@ -3363,11 +3385,11 @@ var useGetResourceConnections = (resourceId, resourceType) => {
3363
3385
  };
3364
3386
 
3365
3387
  // src/graphql/hooks/stallholder/hooksMutation.ts
3366
- var import_client25 = require("@apollo/client");
3388
+ var import_client27 = require("@apollo/client");
3367
3389
 
3368
3390
  // src/graphql/mutations/stallholder.ts
3369
- var import_client24 = require("@apollo/client");
3370
- var CREATE_STALLHOLDER_MUTATION = import_client24.gql`
3391
+ var import_client26 = require("@apollo/client");
3392
+ var CREATE_STALLHOLDER_MUTATION = import_client26.gql`
3371
3393
  mutation createStallholder($input: StallholderInputType!) {
3372
3394
  createStallholder(input: $input) {
3373
3395
  ...StallholderFields
@@ -3375,7 +3397,7 @@ var CREATE_STALLHOLDER_MUTATION = import_client24.gql`
3375
3397
  }
3376
3398
  ${STALLHOLDER}
3377
3399
  `;
3378
- var UPDATE_STALLHOLDER_MUTATION = import_client24.gql`
3400
+ var UPDATE_STALLHOLDER_MUTATION = import_client26.gql`
3379
3401
  mutation updateStallholder($_id: ID!, $input: StallholderInputType!) {
3380
3402
  updateStallholder(_id: $_id, input: $input) {
3381
3403
  ...StallholderFields
@@ -3383,12 +3405,12 @@ var UPDATE_STALLHOLDER_MUTATION = import_client24.gql`
3383
3405
  }
3384
3406
  ${STALLHOLDER}
3385
3407
  `;
3386
- var DELETE_STALLHOLDER_MUTATION = import_client24.gql`
3408
+ var DELETE_STALLHOLDER_MUTATION = import_client26.gql`
3387
3409
  mutation deleteStallholder($_id: ID!) {
3388
3410
  deleteStallholder(_id: $_id)
3389
3411
  }
3390
3412
  `;
3391
- var CREATE_STALLHOLDER_INFO_MUTATION = import_client24.gql`
3413
+ var CREATE_STALLHOLDER_INFO_MUTATION = import_client26.gql`
3392
3414
  mutation createStallholderInfo($input: StallholderInfoInputType!) {
3393
3415
  createStallholderInfo(input: $input) {
3394
3416
  ...StallholderInfoFields
@@ -3396,7 +3418,7 @@ var CREATE_STALLHOLDER_INFO_MUTATION = import_client24.gql`
3396
3418
  }
3397
3419
  ${STALLHOLDER_INFO}
3398
3420
  `;
3399
- var UPDATE_STALLHOLDER_INFO_MUTATION = import_client24.gql`
3421
+ var UPDATE_STALLHOLDER_INFO_MUTATION = import_client26.gql`
3400
3422
  mutation updateStallholderInfo($_id: ID!, $input: StallholderInfoInputType!) {
3401
3423
  updateStallholderInfo(_id: $_id, input: $input) {
3402
3424
  ...StallholderInfoFields
@@ -3407,7 +3429,7 @@ var UPDATE_STALLHOLDER_INFO_MUTATION = import_client24.gql`
3407
3429
 
3408
3430
  // src/graphql/hooks/stallholder/hooksMutation.ts
3409
3431
  var useCreateStallholder = () => {
3410
- const [createStallholder, { loading, error }] = (0, import_client25.useMutation)(
3432
+ const [createStallholder, { loading, error }] = (0, import_client27.useMutation)(
3411
3433
  CREATE_STALLHOLDER_MUTATION,
3412
3434
  {
3413
3435
  awaitRefetchQueries: true,
@@ -3419,7 +3441,7 @@ var useCreateStallholder = () => {
3419
3441
  return { createStallholder, error, loading };
3420
3442
  };
3421
3443
  var useUpdateStallholder = () => {
3422
- const [updateStallholder, { loading, error }] = (0, import_client25.useMutation)(
3444
+ const [updateStallholder, { loading, error }] = (0, import_client27.useMutation)(
3423
3445
  UPDATE_STALLHOLDER_MUTATION,
3424
3446
  {
3425
3447
  awaitRefetchQueries: true,
@@ -3431,7 +3453,7 @@ var useUpdateStallholder = () => {
3431
3453
  return { error, loading, updateStallholder };
3432
3454
  };
3433
3455
  var useDeleteStallholder = () => {
3434
- const [deleteStallholder, { loading, error }] = (0, import_client25.useMutation)(
3456
+ const [deleteStallholder, { loading, error }] = (0, import_client27.useMutation)(
3435
3457
  DELETE_STALLHOLDER_MUTATION,
3436
3458
  {
3437
3459
  awaitRefetchQueries: true,
@@ -3443,7 +3465,7 @@ var useDeleteStallholder = () => {
3443
3465
  return { deleteStallholder, error, loading };
3444
3466
  };
3445
3467
  var useCreateStallholderInfo = () => {
3446
- const [createStallholderInfo, { loading, error }] = (0, import_client25.useMutation)(
3468
+ const [createStallholderInfo, { loading, error }] = (0, import_client27.useMutation)(
3447
3469
  CREATE_STALLHOLDER_INFO_MUTATION,
3448
3470
  {
3449
3471
  awaitRefetchQueries: true,
@@ -3467,7 +3489,7 @@ var useCreateStallholderInfo = () => {
3467
3489
  return { createStallholderInfo, error, loading };
3468
3490
  };
3469
3491
  var useUpdateStallholderInfo = () => {
3470
- const [updateStallholderInfo, { loading, error }] = (0, import_client25.useMutation)(
3492
+ const [updateStallholderInfo, { loading, error }] = (0, import_client27.useMutation)(
3471
3493
  UPDATE_STALLHOLDER_INFO_MUTATION,
3472
3494
  {
3473
3495
  awaitRefetchQueries: true,
@@ -3488,9 +3510,9 @@ var useUpdateStallholderInfo = () => {
3488
3510
  };
3489
3511
 
3490
3512
  // src/graphql/hooks/stallholder/hooksQuery.ts
3491
- var import_client26 = require("@apollo/client");
3513
+ var import_client28 = require("@apollo/client");
3492
3514
  var useGetStallholders = () => {
3493
- const { loading, error, data, refetch } = (0, import_client26.useQuery)(GET_STALLHOLDERS, {
3515
+ const { loading, error, data, refetch } = (0, import_client28.useQuery)(GET_STALLHOLDERS, {
3494
3516
  fetchPolicy: "network-only"
3495
3517
  });
3496
3518
  const stallholders = data?.stallholders;
@@ -3502,7 +3524,7 @@ var useGetStallholders = () => {
3502
3524
  };
3503
3525
  };
3504
3526
  var useGetStallholder = (_id) => {
3505
- const { loading, error, data, refetch } = (0, import_client26.useQuery)(GET_STALLHOLDER, {
3527
+ const { loading, error, data, refetch } = (0, import_client28.useQuery)(GET_STALLHOLDER, {
3506
3528
  fetchPolicy: "network-only",
3507
3529
  skip: !_id,
3508
3530
  variables: { _id }
@@ -3511,7 +3533,7 @@ var useGetStallholder = (_id) => {
3511
3533
  return { error, loading, refetch, stallholder };
3512
3534
  };
3513
3535
  var useGetStallholdersByRegion = (region) => {
3514
- const { loading, error, data, refetch } = (0, import_client26.useQuery)(
3536
+ const { loading, error, data, refetch } = (0, import_client28.useQuery)(
3515
3537
  GET_STALLHOLDERS_BY_REGION,
3516
3538
  {
3517
3539
  fetchPolicy: "no-cache",
@@ -3523,7 +3545,7 @@ var useGetStallholdersByRegion = (region) => {
3523
3545
  return { error, loading, refetch, stallholdersByRegion };
3524
3546
  };
3525
3547
  var useSearchStallholders = (search, region) => {
3526
- const { loading, error, data, refetch } = (0, import_client26.useQuery)(SEARCH_STALLHOLDERS, {
3548
+ const { loading, error, data, refetch } = (0, import_client28.useQuery)(SEARCH_STALLHOLDERS, {
3527
3549
  fetchPolicy: "network-only",
3528
3550
  skip: search.length < 3,
3529
3551
  variables: { region, search }
@@ -3532,7 +3554,7 @@ var useSearchStallholders = (search, region) => {
3532
3554
  return { error, loading, refetch, stallholderSearch };
3533
3555
  };
3534
3556
  var useGetStallholderInfo = (stallholderId) => {
3535
- const { loading, error, data, refetch } = (0, import_client26.useQuery)(GET_STALLHOLDER_INFO, {
3557
+ const { loading, error, data, refetch } = (0, import_client28.useQuery)(GET_STALLHOLDER_INFO, {
3536
3558
  fetchPolicy: "network-only",
3537
3559
  skip: !stallholderId,
3538
3560
  variables: { stallholderId }
@@ -3547,11 +3569,11 @@ var useGetStallholderInfo = (stallholderId) => {
3547
3569
  };
3548
3570
 
3549
3571
  // src/graphql/hooks/subscriptions.ts
3550
- var import_client29 = require("@apollo/client");
3572
+ var import_client31 = require("@apollo/client");
3551
3573
 
3552
3574
  // src/graphql/subscriptions/chat.ts
3553
- var import_client27 = require("@apollo/client");
3554
- var GET_CHAT_MESSAGE = import_client27.gql`
3575
+ var import_client29 = require("@apollo/client");
3576
+ var GET_CHAT_MESSAGE = import_client29.gql`
3555
3577
  subscription {
3556
3578
  getChatMessage {
3557
3579
  ...ChatFields
@@ -3561,8 +3583,8 @@ var GET_CHAT_MESSAGE = import_client27.gql`
3561
3583
  `;
3562
3584
 
3563
3585
  // src/graphql/subscriptions/notification.ts
3564
- var import_client28 = require("@apollo/client");
3565
- var NOTIFICATION_FIELDS_FRAGMENT = import_client28.gql`
3586
+ var import_client30 = require("@apollo/client");
3587
+ var NOTIFICATION_FIELDS_FRAGMENT = import_client30.gql`
3566
3588
  fragment NotificationFields on NotificationType {
3567
3589
  createdBy
3568
3590
  important
@@ -3572,7 +3594,7 @@ var NOTIFICATION_FIELDS_FRAGMENT = import_client28.gql`
3572
3594
  resourceType
3573
3595
  }
3574
3596
  `;
3575
- var GET_GLOBAL_NOTIFICATION = import_client28.gql`
3597
+ var GET_GLOBAL_NOTIFICATION = import_client30.gql`
3576
3598
  subscription {
3577
3599
  getGlobalNotification {
3578
3600
  ...NotificationFields
@@ -3580,7 +3602,7 @@ var GET_GLOBAL_NOTIFICATION = import_client28.gql`
3580
3602
  }
3581
3603
  ${NOTIFICATION_FIELDS_FRAGMENT}
3582
3604
  `;
3583
- var GET_RELATION_NOTIFICATION = import_client28.gql`
3605
+ var GET_RELATION_NOTIFICATION = import_client30.gql`
3584
3606
  subscription {
3585
3607
  getRelationNotification {
3586
3608
  ...NotificationFields
@@ -3595,32 +3617,32 @@ var useGetNotification = () => {
3595
3617
  data: global,
3596
3618
  loading: loadingGlobal,
3597
3619
  error: errorGlobal
3598
- } = (0, import_client29.useSubscription)(GET_GLOBAL_NOTIFICATION);
3620
+ } = (0, import_client31.useSubscription)(GET_GLOBAL_NOTIFICATION);
3599
3621
  const {
3600
3622
  data: relation,
3601
3623
  loading: loadingImportant,
3602
3624
  error: errorImportant
3603
- } = (0, import_client29.useSubscription)(GET_RELATION_NOTIFICATION);
3625
+ } = (0, import_client31.useSubscription)(GET_RELATION_NOTIFICATION);
3604
3626
  const error = errorGlobal || errorImportant;
3605
3627
  const loading = loadingGlobal || loadingImportant;
3606
3628
  const notification = relation?.getRelationNotification || global?.getGlobalNotification;
3607
3629
  return { error, loading, notification };
3608
3630
  };
3609
3631
  var useGetChatSubscription = () => {
3610
- const { data, loading, error } = (0, import_client29.useSubscription)(GET_CHAT_MESSAGE);
3632
+ const { data, loading, error } = (0, import_client31.useSubscription)(GET_CHAT_MESSAGE);
3611
3633
  const chat = data?.getChat;
3612
3634
  return { chat, error, loading };
3613
3635
  };
3614
3636
 
3615
3637
  // src/graphql/hooks/testers/hooksMutation.ts
3616
- var import_client32 = require("@apollo/client");
3638
+ var import_client34 = require("@apollo/client");
3617
3639
 
3618
3640
  // src/graphql/mutations/testers.ts
3619
- var import_client31 = require("@apollo/client");
3641
+ var import_client33 = require("@apollo/client");
3620
3642
 
3621
3643
  // src/graphql/queries/testers.ts
3622
- var import_client30 = require("@apollo/client");
3623
- var TESTER_FIELDS_FRAGMENT = import_client30.gql`
3644
+ var import_client32 = require("@apollo/client");
3645
+ var TESTER_FIELDS_FRAGMENT = import_client32.gql`
3624
3646
  fragment TesterFields on TesterType {
3625
3647
  _id
3626
3648
  active
@@ -3633,7 +3655,7 @@ var TESTER_FIELDS_FRAGMENT = import_client30.gql`
3633
3655
  updatedAt
3634
3656
  }
3635
3657
  `;
3636
- var GET_TESTERS = import_client30.gql`
3658
+ var GET_TESTERS = import_client32.gql`
3637
3659
  query getTesters {
3638
3660
  testers {
3639
3661
  ...TesterFields
@@ -3641,7 +3663,7 @@ var GET_TESTERS = import_client30.gql`
3641
3663
  }
3642
3664
  ${TESTER_FIELDS_FRAGMENT}
3643
3665
  `;
3644
- var GET_TESTER = import_client30.gql`
3666
+ var GET_TESTER = import_client32.gql`
3645
3667
  query getTester($_id: ID!) {
3646
3668
  tester(_id: $_id) {
3647
3669
  ...TesterFields
@@ -3651,7 +3673,7 @@ var GET_TESTER = import_client30.gql`
3651
3673
  `;
3652
3674
 
3653
3675
  // src/graphql/mutations/testers.ts
3654
- var CREATE_TESTER_MUTATION = import_client31.gql`
3676
+ var CREATE_TESTER_MUTATION = import_client33.gql`
3655
3677
  mutation createTester($input: TesterInputType!) {
3656
3678
  createTester(input: $input) {
3657
3679
  ...TesterFields
@@ -3659,7 +3681,7 @@ var CREATE_TESTER_MUTATION = import_client31.gql`
3659
3681
  }
3660
3682
  ${TESTER_FIELDS_FRAGMENT}
3661
3683
  `;
3662
- var UPDATE_TESTER_MUTATION = import_client31.gql`
3684
+ var UPDATE_TESTER_MUTATION = import_client33.gql`
3663
3685
  mutation updateTester($_id: ID!, $input: TesterInputType!) {
3664
3686
  updateTester(_id: $_id, input: $input) {
3665
3687
  ...TesterFields
@@ -3667,7 +3689,7 @@ var UPDATE_TESTER_MUTATION = import_client31.gql`
3667
3689
  }
3668
3690
  ${TESTER_FIELDS_FRAGMENT}
3669
3691
  `;
3670
- var DELETE_TESTER_MUTATION = import_client31.gql`
3692
+ var DELETE_TESTER_MUTATION = import_client33.gql`
3671
3693
  mutation deleteTester($_id: ID!) {
3672
3694
  deleteTester(_id: $_id)
3673
3695
  }
@@ -3675,7 +3697,7 @@ var DELETE_TESTER_MUTATION = import_client31.gql`
3675
3697
 
3676
3698
  // src/graphql/hooks/testers/hooksMutation.ts
3677
3699
  var useCreateTester = () => {
3678
- const [createTester, { data, loading, error }] = (0, import_client32.useMutation)(
3700
+ const [createTester, { data, loading, error }] = (0, import_client34.useMutation)(
3679
3701
  CREATE_TESTER_MUTATION
3680
3702
  );
3681
3703
  return {
@@ -3686,7 +3708,7 @@ var useCreateTester = () => {
3686
3708
  };
3687
3709
  };
3688
3710
  var useUpdateTester = () => {
3689
- const [updateTester, { data, loading, error }] = (0, import_client32.useMutation)(
3711
+ const [updateTester, { data, loading, error }] = (0, import_client34.useMutation)(
3690
3712
  UPDATE_TESTER_MUTATION
3691
3713
  );
3692
3714
  return {
@@ -3697,16 +3719,16 @@ var useUpdateTester = () => {
3697
3719
  };
3698
3720
  };
3699
3721
  var useDeleteTester = () => {
3700
- const [deleteTester, { loading, error }] = (0, import_client32.useMutation)(
3722
+ const [deleteTester, { loading, error }] = (0, import_client34.useMutation)(
3701
3723
  DELETE_TESTER_MUTATION
3702
3724
  );
3703
3725
  return { deleteTester, error, loading };
3704
3726
  };
3705
3727
 
3706
3728
  // src/graphql/hooks/testers/hooksQuery.ts
3707
- var import_client33 = require("@apollo/client");
3729
+ var import_client35 = require("@apollo/client");
3708
3730
  var useGetTesters = () => {
3709
- const { data, loading, error, refetch } = (0, import_client33.useQuery)(GET_TESTERS);
3731
+ const { data, loading, error, refetch } = (0, import_client35.useQuery)(GET_TESTERS);
3710
3732
  const testers = data?.testers;
3711
3733
  return {
3712
3734
  error,
@@ -3716,7 +3738,7 @@ var useGetTesters = () => {
3716
3738
  };
3717
3739
  };
3718
3740
  var useGetTester = (_id) => {
3719
- const { data, loading, error, refetch } = (0, import_client33.useQuery)(GET_TESTER, {
3741
+ const { data, loading, error, refetch } = (0, import_client35.useQuery)(GET_TESTER, {
3720
3742
  skip: !_id,
3721
3743
  variables: { _id }
3722
3744
  });
@@ -3725,11 +3747,11 @@ var useGetTester = (_id) => {
3725
3747
  };
3726
3748
 
3727
3749
  // src/graphql/hooks/user/hooksMutation.ts
3728
- var import_client35 = require("@apollo/client");
3750
+ var import_client37 = require("@apollo/client");
3729
3751
 
3730
3752
  // src/graphql/mutations/user.ts
3731
- var import_client34 = require("@apollo/client");
3732
- var CREATE_USER_MUTATION = import_client34.gql`
3753
+ var import_client36 = require("@apollo/client");
3754
+ var CREATE_USER_MUTATION = import_client36.gql`
3733
3755
  mutation createUser($input: UserInputType!) {
3734
3756
  createUser(input: $input) {
3735
3757
  ...UserFields
@@ -3737,7 +3759,7 @@ var CREATE_USER_MUTATION = import_client34.gql`
3737
3759
  }
3738
3760
  ${USER_FIELDS_FRAGMENT}
3739
3761
  `;
3740
- var UPDATE_USER_MUTATION = import_client34.gql`
3762
+ var UPDATE_USER_MUTATION = import_client36.gql`
3741
3763
  mutation updateUser($_id: ID!, $input: UserInputType!) {
3742
3764
  updateUser(_id: $_id, input: $input) {
3743
3765
  ...UserFields
@@ -3745,12 +3767,12 @@ var UPDATE_USER_MUTATION = import_client34.gql`
3745
3767
  }
3746
3768
  ${USER_FIELDS_FRAGMENT}
3747
3769
  `;
3748
- var DELETE_USER_MUTATION = import_client34.gql`
3770
+ var DELETE_USER_MUTATION = import_client36.gql`
3749
3771
  mutation deleteUser($_id: ID!) {
3750
3772
  deleteUser(_id: $_id)
3751
3773
  }
3752
3774
  `;
3753
- var ADD_USER_FAVOURITE_RESOURCE_MUTATION = import_client34.gql`
3775
+ var ADD_USER_FAVOURITE_RESOURCE_MUTATION = import_client36.gql`
3754
3776
  mutation addUserFavouriteResource(
3755
3777
  $resourceId: ID!
3756
3778
  $resourceType: ResourceTypeEnum!
@@ -3766,7 +3788,7 @@ var ADD_USER_FAVOURITE_RESOURCE_MUTATION = import_client34.gql`
3766
3788
  }
3767
3789
  ${USER_FIELDS_FRAGMENT}
3768
3790
  `;
3769
- var REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = import_client34.gql`
3791
+ var REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = import_client36.gql`
3770
3792
  mutation removeUserFavouriteResource(
3771
3793
  $resourceId: ID!
3772
3794
  $resourceType: ResourceTypeEnum!
@@ -3785,11 +3807,11 @@ var REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = import_client34.gql`
3785
3807
 
3786
3808
  // src/graphql/hooks/user/hooksMutation.ts
3787
3809
  var useCreateUser = () => {
3788
- const [createUser, { loading, error }] = (0, import_client35.useMutation)(CREATE_USER_MUTATION);
3810
+ const [createUser, { loading, error }] = (0, import_client37.useMutation)(CREATE_USER_MUTATION);
3789
3811
  return { createUser, error, loading };
3790
3812
  };
3791
3813
  var useUpdateUser = () => {
3792
- const [updateUser, { loading, error }] = (0, import_client35.useMutation)(UPDATE_USER_MUTATION, {
3814
+ const [updateUser, { loading, error }] = (0, import_client37.useMutation)(UPDATE_USER_MUTATION, {
3793
3815
  awaitRefetchQueries: true,
3794
3816
  refetchQueries: (mutationResult) => {
3795
3817
  const userId = mutationResult?.data?.updateUser?._id;
@@ -3800,11 +3822,11 @@ var useUpdateUser = () => {
3800
3822
  return { error, loading, updateUser };
3801
3823
  };
3802
3824
  var useDeleteUser = () => {
3803
- const [deleteUser, { loading, error }] = (0, import_client35.useMutation)(DELETE_USER_MUTATION);
3825
+ const [deleteUser, { loading, error }] = (0, import_client37.useMutation)(DELETE_USER_MUTATION);
3804
3826
  return { deleteUser, error, loading };
3805
3827
  };
3806
3828
  var useAddUserFavouriteResource = () => {
3807
- const [addUserFavouriteResource, { loading, error }] = (0, import_client35.useMutation)(
3829
+ const [addUserFavouriteResource, { loading, error }] = (0, import_client37.useMutation)(
3808
3830
  ADD_USER_FAVOURITE_RESOURCE_MUTATION,
3809
3831
  {
3810
3832
  awaitRefetchQueries: true,
@@ -3814,7 +3836,7 @@ var useAddUserFavouriteResource = () => {
3814
3836
  return { addUserFavouriteResource, error, loading };
3815
3837
  };
3816
3838
  var useRemoveUserFavouriteResource = () => {
3817
- const [removeUserFavouriteResource, { loading, error }] = (0, import_client35.useMutation)(
3839
+ const [removeUserFavouriteResource, { loading, error }] = (0, import_client37.useMutation)(
3818
3840
  REMOVE_USER_FAVOURITE_RESOURCE_MUTATION,
3819
3841
  {
3820
3842
  awaitRefetchQueries: true,
@@ -3825,37 +3847,37 @@ var useRemoveUserFavouriteResource = () => {
3825
3847
  };
3826
3848
 
3827
3849
  // src/graphql/hooks/user/hooksQuery.ts
3828
- var import_client36 = require("@apollo/client");
3850
+ var import_client38 = require("@apollo/client");
3829
3851
  var useGetUsers = () => {
3830
- const { loading, error, data, refetch } = (0, import_client36.useQuery)(GET_USERS, {
3852
+ const { loading, error, data, refetch } = (0, import_client38.useQuery)(GET_USERS, {
3831
3853
  fetchPolicy: "network-only"
3832
3854
  });
3833
3855
  const users = data?.users;
3834
3856
  return { error, loading, refetch, users };
3835
3857
  };
3836
3858
  var useGetUser = (_id) => {
3837
- const { loading, error, data, refetch } = (0, import_client36.useQuery)(GET_USER, {
3859
+ const { loading, error, data, refetch } = (0, import_client38.useQuery)(GET_USER, {
3838
3860
  variables: { _id }
3839
3861
  });
3840
3862
  const user = data?.user;
3841
3863
  return { error, loading, refetch, user };
3842
3864
  };
3843
3865
  var useGetUserMarkets = () => {
3844
- const { loading, error, data, refetch } = (0, import_client36.useQuery)(GET_USER_MARKETS, {
3866
+ const { loading, error, data, refetch } = (0, import_client38.useQuery)(GET_USER_MARKETS, {
3845
3867
  fetchPolicy: "network-only"
3846
3868
  });
3847
3869
  const userMarkets = data?.userMarkets;
3848
3870
  return { error, loading, refetch, userMarkets };
3849
3871
  };
3850
3872
  var useGetUserStallholder = () => {
3851
- const { loading, error, data, refetch } = (0, import_client36.useQuery)(GET_USER_STALLHOLDER, {
3873
+ const { loading, error, data, refetch } = (0, import_client38.useQuery)(GET_USER_STALLHOLDER, {
3852
3874
  fetchPolicy: "network-only"
3853
3875
  });
3854
3876
  const userStallholder = data?.userStallholder;
3855
3877
  return { error, loading, refetch, userStallholder };
3856
3878
  };
3857
3879
  var useGetUserFavourites = () => {
3858
- const { loading, error, data, refetch } = (0, import_client36.useQuery)(GET_USER_FAVOURITES, {
3880
+ const { loading, error, data, refetch } = (0, import_client38.useQuery)(GET_USER_FAVOURITES, {
3859
3881
  fetchPolicy: "network-only"
3860
3882
  });
3861
3883
  const markets = data?.userFavourites.markets;
@@ -3867,7 +3889,7 @@ var useGetUserFavourites = () => {
3867
3889
  return { error, loading, refetch, userFavourites };
3868
3890
  };
3869
3891
  var useGetUserNotifications = () => {
3870
- const { loading, error, data, refetch } = (0, import_client36.useQuery)(GET_USER_NOTIFICATIONS, {
3892
+ const { loading, error, data, refetch } = (0, import_client38.useQuery)(GET_USER_NOTIFICATIONS, {
3871
3893
  fetchPolicy: "network-only"
3872
3894
  });
3873
3895
  const userNotifications = data?.userNotifications;
@@ -5188,6 +5210,7 @@ var fonts = {
5188
5210
  useCreateMarket,
5189
5211
  useCreateMarketInfo,
5190
5212
  useCreatePoster,
5213
+ useCreatePushToken,
5191
5214
  useCreateRelation,
5192
5215
  useCreateStallholder,
5193
5216
  useCreateStallholderInfo,