@timardex/cluemart-shared 1.3.65 → 1.3.67

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.
@@ -97,36 +97,37 @@ type GoogleAddressComponent = {
97
97
  };
98
98
  type GoogleImportedMarket = {
99
99
  _id: string;
100
- name: string;
101
- slug: string;
102
- image?: string;
100
+ accessibilityOptions?: Record<string, boolean>;
103
101
  address: string;
104
- location?: {
105
- lat: number;
106
- lng: number;
107
- };
108
- googlePlaceId: string;
109
- website?: string;
110
- phone?: string;
111
- openingHours?: string[];
112
- rating?: number;
113
- reviewCount?: number;
114
- photos?: string[];
115
- googleMapsUrl?: string;
116
- businessStatus?: string;
117
102
  addressComponents?: GoogleAddressComponent[];
118
- accessibilityOptions?: Record<string, boolean>;
119
103
  allowsDogs?: boolean;
104
+ businessStatus?: string;
105
+ claimed: boolean;
106
+ createdAt: Date;
120
107
  goodForChildren?: boolean;
121
108
  goodForGroups?: boolean;
109
+ googleMapsUrl?: string;
110
+ googlePlaceId: string;
111
+ image?: string;
112
+ importedAt: Date;
122
113
  liveMusic?: boolean;
114
+ location?: {
115
+ lat: number;
116
+ lng: number;
117
+ };
118
+ name: string;
119
+ openingHours?: string[];
123
120
  parkingOptions?: Record<string, boolean>;
124
121
  paymentOptions?: Record<string, boolean>;
122
+ phone?: string;
123
+ photos?: string[];
124
+ rating?: number;
125
+ region: string;
125
126
  restroom?: boolean;
126
- importedAt: Date;
127
- claimed: boolean;
128
- createdAt: Date;
127
+ reviewCount?: number;
128
+ slug: string;
129
129
  updatedAt: Date;
130
+ website?: string;
130
131
  };
131
132
 
132
133
  export { type ChatType as C, EnumActivity as E, type GoogleImportedMarket as G, type NotificationType as N, type ParticipantType as P, type ResourceActivityType as R, type NotificationCount as a, type ChatMessageInput as b, type ChatMessageType as c, type NotificationDataType as d, type CreateBulkNotificationInput as e, type ResourceActivityEntry as f, type ResourceActivityInputType as g, type GoogleAddressComponent as h };
@@ -97,36 +97,37 @@ type GoogleAddressComponent = {
97
97
  };
98
98
  type GoogleImportedMarket = {
99
99
  _id: string;
100
- name: string;
101
- slug: string;
102
- image?: string;
100
+ accessibilityOptions?: Record<string, boolean>;
103
101
  address: string;
104
- location?: {
105
- lat: number;
106
- lng: number;
107
- };
108
- googlePlaceId: string;
109
- website?: string;
110
- phone?: string;
111
- openingHours?: string[];
112
- rating?: number;
113
- reviewCount?: number;
114
- photos?: string[];
115
- googleMapsUrl?: string;
116
- businessStatus?: string;
117
102
  addressComponents?: GoogleAddressComponent[];
118
- accessibilityOptions?: Record<string, boolean>;
119
103
  allowsDogs?: boolean;
104
+ businessStatus?: string;
105
+ claimed: boolean;
106
+ createdAt: Date;
120
107
  goodForChildren?: boolean;
121
108
  goodForGroups?: boolean;
109
+ googleMapsUrl?: string;
110
+ googlePlaceId: string;
111
+ image?: string;
112
+ importedAt: Date;
122
113
  liveMusic?: boolean;
114
+ location?: {
115
+ lat: number;
116
+ lng: number;
117
+ };
118
+ name: string;
119
+ openingHours?: string[];
123
120
  parkingOptions?: Record<string, boolean>;
124
121
  paymentOptions?: Record<string, boolean>;
122
+ phone?: string;
123
+ photos?: string[];
124
+ rating?: number;
125
+ region: string;
125
126
  restroom?: boolean;
126
- importedAt: Date;
127
- claimed: boolean;
128
- createdAt: Date;
127
+ reviewCount?: number;
128
+ slug: string;
129
129
  updatedAt: Date;
130
+ website?: string;
130
131
  };
131
132
 
132
133
  export { type ChatType as C, EnumActivity as E, type GoogleImportedMarket as G, type NotificationType as N, type ParticipantType as P, type ResourceActivityType as R, type NotificationCount as a, type ChatMessageInput as b, type ChatMessageType as c, type NotificationDataType as d, type CreateBulkNotificationInput as e, type ResourceActivityEntry as f, type ResourceActivityInputType as g, type GoogleAddressComponent as h };
@@ -74,6 +74,8 @@ __export(graphql_exports, {
74
74
  useGetEventsByRegion: () => useGetEventsByRegion,
75
75
  useGetEventsNearMe: () => useGetEventsNearMe,
76
76
  useGetGoogleImportedMarkets: () => useGetGoogleImportedMarkets,
77
+ useGetGoogleImportedMarketsByRegion: () => useGetGoogleImportedMarketsByRegion,
78
+ useGetGoogleImportedMarketsNearMe: () => useGetGoogleImportedMarketsNearMe,
77
79
  useGetNotificationCount: () => useGetNotificationCount,
78
80
  useGetNotificationCountSubscription: () => useGetNotificationCountSubscription,
79
81
  useGetPartner: () => useGetPartner,
@@ -118,6 +120,7 @@ __export(graphql_exports, {
118
120
  useRequestPasswordReset: () => useRequestPasswordReset,
119
121
  useResetPassword: () => useResetPassword,
120
122
  useSearchEvents: () => useSearchEvents,
123
+ useSearchGoogleImportedMarkets: () => useSearchGoogleImportedMarkets,
121
124
  useSearchPartners: () => useSearchPartners,
122
125
  useSearchVendors: () => useSearchVendors,
123
126
  useSelectPackage: () => useSelectPackage,
@@ -3398,13 +3401,6 @@ var UPDATE_APP_SETTINGS_MUTATION = import_client63.gql`
3398
3401
  updateAppSettings(input: $input)
3399
3402
  }
3400
3403
  `;
3401
- var CRAWL_GOOGLE_MARKETS_MUTATION = import_client63.gql`
3402
- mutation crawlGoogleMarkets {
3403
- crawlGoogleMarkets {
3404
- message
3405
- }
3406
- }
3407
- `;
3408
3404
 
3409
3405
  // src/graphql/queries/appSettings.ts
3410
3406
  var import_client64 = require("@apollo/client");
@@ -3417,45 +3413,6 @@ var APP_SETTINGS_FIELDS_FRAGMENT = import_client64.gql`
3417
3413
  updatedAt
3418
3414
  }
3419
3415
  `;
3420
- var GOOGLE_IMPORTED_MARKETS_FIELDS_FRAGMENT = import_client64.gql`
3421
- fragment GoogleImportedMarketsFields on GoogleImportedMarketType {
3422
- _id
3423
- name
3424
- slug
3425
- image
3426
- address
3427
- location {
3428
- lat
3429
- lng
3430
- }
3431
- googlePlaceId
3432
- website
3433
- phone
3434
- openingHours
3435
- rating
3436
- reviewCount
3437
- photos
3438
- googleMapsUrl
3439
- businessStatus
3440
- addressComponents {
3441
- longName
3442
- shortName
3443
- types
3444
- }
3445
- accessibilityOptions
3446
- allowsDogs
3447
- goodForChildren
3448
- goodForGroups
3449
- liveMusic
3450
- parkingOptions
3451
- paymentOptions
3452
- restroom
3453
- importedAt
3454
- claimed
3455
- createdAt
3456
- updatedAt
3457
- }
3458
- `;
3459
3416
  var GET_APP_SETTINGS = import_client64.gql`
3460
3417
  query getAppSettings {
3461
3418
  appSettings {
@@ -3464,14 +3421,6 @@ var GET_APP_SETTINGS = import_client64.gql`
3464
3421
  }
3465
3422
  ${APP_SETTINGS_FIELDS_FRAGMENT}
3466
3423
  `;
3467
- var GET_GOOGLE_IMPORTED_MARKETS = import_client64.gql`
3468
- query getGoogleImportedMarkets {
3469
- googleImportedMarkets {
3470
- ...GoogleImportedMarketsFields
3471
- }
3472
- }
3473
- ${GOOGLE_IMPORTED_MARKETS_FIELDS_FRAGMENT}
3474
- `;
3475
3424
 
3476
3425
  // src/graphql/hooks/appSettings/hooksMutation.ts
3477
3426
  var useUpdateAppSettings = () => {
@@ -3484,10 +3433,6 @@ var useUpdateAppSettings = () => {
3484
3433
  );
3485
3434
  return { error, loading, updateAppSettings };
3486
3435
  };
3487
- var useCrawlGoogleMarkets = () => {
3488
- const [crawlGoogleMarkets, { loading, error }] = (0, import_client65.useMutation)(CRAWL_GOOGLE_MARKETS_MUTATION);
3489
- return { crawlGoogleMarkets, error, loading };
3490
- };
3491
3436
 
3492
3437
  // src/graphql/hooks/appSettings/hooksQuery.ts
3493
3438
  var import_client66 = require("@apollo/client");
@@ -3498,13 +3443,152 @@ var useGetAppSettings = () => {
3498
3443
  const appSettings = data?.appSettings || null;
3499
3444
  return { appSettings, error, loading, refetch };
3500
3445
  };
3446
+
3447
+ // src/graphql/hooks/googleImportedMarkets/hooksMutation.ts
3448
+ var import_client68 = require("@apollo/client");
3449
+
3450
+ // src/graphql/mutations/googleImportedMarkets.ts
3451
+ var import_client67 = require("@apollo/client");
3452
+ var CRAWL_GOOGLE_MARKETS_MUTATION = import_client67.gql`
3453
+ mutation crawlGoogleMarkets {
3454
+ crawlGoogleMarkets {
3455
+ message
3456
+ }
3457
+ }
3458
+ `;
3459
+
3460
+ // src/graphql/hooks/googleImportedMarkets/hooksMutation.ts
3461
+ var useCrawlGoogleMarkets = () => {
3462
+ const [crawlGoogleMarkets, { loading, error }] = (0, import_client68.useMutation)(CRAWL_GOOGLE_MARKETS_MUTATION);
3463
+ return { crawlGoogleMarkets, error, loading };
3464
+ };
3465
+
3466
+ // src/graphql/hooks/googleImportedMarkets/hooksQuery.ts
3467
+ var import_client70 = require("@apollo/client");
3468
+
3469
+ // src/graphql/queries/googleImportedMarkets.ts
3470
+ var import_client69 = require("@apollo/client");
3471
+ var GOOGLE_IMPORTED_MARKETS_FIELDS_FRAGMENT = import_client69.gql`
3472
+ fragment GoogleImportedMarketsFields on GoogleImportedMarketType {
3473
+ _id
3474
+ accessibilityOptions
3475
+ address
3476
+ addressComponents {
3477
+ longName
3478
+ shortName
3479
+ types
3480
+ }
3481
+ allowsDogs
3482
+ businessStatus
3483
+ claimed
3484
+ createdAt
3485
+ goodForChildren
3486
+ goodForGroups
3487
+ googleMapsUrl
3488
+ googlePlaceId
3489
+ image
3490
+ importedAt
3491
+ liveMusic
3492
+ location {
3493
+ lat
3494
+ lng
3495
+ }
3496
+ name
3497
+ openingHours
3498
+ parkingOptions
3499
+ paymentOptions
3500
+ phone
3501
+ photos
3502
+ rating
3503
+ region
3504
+ restroom
3505
+ reviewCount
3506
+ slug
3507
+ updatedAt
3508
+ website
3509
+ }
3510
+ `;
3511
+ var GET_GOOGLE_IMPORTED_MARKETS = import_client69.gql`
3512
+ query getGoogleImportedMarkets {
3513
+ googleImportedMarkets {
3514
+ ...GoogleImportedMarketsFields
3515
+ }
3516
+ }
3517
+ ${GOOGLE_IMPORTED_MARKETS_FIELDS_FRAGMENT}
3518
+ `;
3519
+ var GET_GOOGLE_IMPORTED_MARKETS_BY_REGION = import_client69.gql`
3520
+ query getGoogleImportedMarketsByRegion($region: String!) {
3521
+ googleImportedMarketsByRegion(region: $region) {
3522
+ ...GoogleImportedMarketsFields
3523
+ }
3524
+ }
3525
+ ${GOOGLE_IMPORTED_MARKETS_FIELDS_FRAGMENT}
3526
+ `;
3527
+ var SEARCH_GOOGLE_IMPORTED_MARKETS = import_client69.gql`
3528
+ query searchGoogleImportedMarkets($search: String!, $region: String) {
3529
+ googleImportedMarketsSearch(search: $search, region: $region) {
3530
+ ...GoogleImportedMarketsFields
3531
+ }
3532
+ }
3533
+ ${GOOGLE_IMPORTED_MARKETS_FIELDS_FRAGMENT}
3534
+ `;
3535
+ var GET_GOOGLE_IMPORTED_MARKETS_NEAR_ME = import_client69.gql`
3536
+ query getGoogleImportedMarketsNearMe(
3537
+ $latitude: Float!
3538
+ $longitude: Float!
3539
+ $radius: Int
3540
+ ) {
3541
+ googleImportedMarketsNearMe(
3542
+ lat: $latitude
3543
+ lng: $longitude
3544
+ radius: $radius
3545
+ ) {
3546
+ ...GoogleImportedMarketsFields
3547
+ }
3548
+ }
3549
+ ${GOOGLE_IMPORTED_MARKETS_FIELDS_FRAGMENT}
3550
+ `;
3551
+
3552
+ // src/graphql/hooks/googleImportedMarkets/hooksQuery.ts
3501
3553
  var useGetGoogleImportedMarkets = () => {
3502
- const { loading, error, data, refetch } = (0, import_client66.useQuery)(GET_GOOGLE_IMPORTED_MARKETS, {
3554
+ const { loading, error, data, refetch } = (0, import_client70.useQuery)(GET_GOOGLE_IMPORTED_MARKETS, {
3503
3555
  fetchPolicy: "network-only"
3504
3556
  });
3505
3557
  const googleImportedMarkets = data?.googleImportedMarkets || [];
3506
3558
  return { error, googleImportedMarkets, loading, refetch };
3507
3559
  };
3560
+ var useGetGoogleImportedMarketsByRegion = (region) => {
3561
+ const { loading, error, data, refetch } = (0, import_client70.useQuery)(GET_GOOGLE_IMPORTED_MARKETS_BY_REGION, {
3562
+ fetchPolicy: "network-only",
3563
+ skip: !region,
3564
+ variables: { region }
3565
+ });
3566
+ const googleImportedMarketsByRegion = data?.googleImportedMarketsByRegion || [];
3567
+ return { error, googleImportedMarketsByRegion, loading, refetch };
3568
+ };
3569
+ var useSearchGoogleImportedMarkets = (search, region) => {
3570
+ const { loading, error, data, refetch } = (0, import_client70.useQuery)(SEARCH_GOOGLE_IMPORTED_MARKETS, {
3571
+ fetchPolicy: "network-only",
3572
+ skip: search.length < 3,
3573
+ variables: { region, search }
3574
+ });
3575
+ const googleImportedMarketsSearch = data?.googleImportedMarketsSearch || [];
3576
+ return { error, googleImportedMarketsSearch, loading, refetch };
3577
+ };
3578
+ var useGetGoogleImportedMarketsNearMe = (latitude, longitude, radius) => {
3579
+ const { loading, error, data, refetch } = (0, import_client70.useQuery)(GET_GOOGLE_IMPORTED_MARKETS_NEAR_ME, {
3580
+ fetchPolicy: "network-only",
3581
+ skip: !latitude || !longitude,
3582
+ variables: {
3583
+ latitude,
3584
+ longitude,
3585
+ radius: radius || 1e4
3586
+ // Default to 10km if no radius is provided
3587
+ }
3588
+ });
3589
+ const googleImportedMarketsNearMe = data?.googleImportedMarketsNearMe || [];
3590
+ return { error, googleImportedMarketsNearMe, loading, refetch };
3591
+ };
3508
3592
  // Annotate the CommonJS export names for ESM import in node:
3509
3593
  0 && (module.exports = {
3510
3594
  useAddParticipantToChat,
@@ -3561,6 +3645,8 @@ var useGetGoogleImportedMarkets = () => {
3561
3645
  useGetEventsByRegion,
3562
3646
  useGetEventsNearMe,
3563
3647
  useGetGoogleImportedMarkets,
3648
+ useGetGoogleImportedMarketsByRegion,
3649
+ useGetGoogleImportedMarketsNearMe,
3564
3650
  useGetNotificationCount,
3565
3651
  useGetNotificationCountSubscription,
3566
3652
  useGetPartner,
@@ -3605,6 +3691,7 @@ var useGetGoogleImportedMarkets = () => {
3605
3691
  useRequestPasswordReset,
3606
3692
  useResetPassword,
3607
3693
  useSearchEvents,
3694
+ useSearchGoogleImportedMarkets,
3608
3695
  useSearchPartners,
3609
3696
  useSearchVendors,
3610
3697
  useSelectPackage,