@timardex/cluemart-shared 1.3.65 → 1.3.66

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,
@@ -3420,40 +3423,40 @@ var APP_SETTINGS_FIELDS_FRAGMENT = import_client64.gql`
3420
3423
  var GOOGLE_IMPORTED_MARKETS_FIELDS_FRAGMENT = import_client64.gql`
3421
3424
  fragment GoogleImportedMarketsFields on GoogleImportedMarketType {
3422
3425
  _id
3423
- name
3424
- slug
3425
- image
3426
+ accessibilityOptions
3426
3427
  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
3428
  addressComponents {
3441
3429
  longName
3442
3430
  shortName
3443
3431
  types
3444
3432
  }
3445
- accessibilityOptions
3446
3433
  allowsDogs
3434
+ businessStatus
3435
+ claimed
3436
+ createdAt
3447
3437
  goodForChildren
3448
3438
  goodForGroups
3439
+ googleMapsUrl
3440
+ googlePlaceId
3441
+ image
3442
+ importedAt
3449
3443
  liveMusic
3444
+ location {
3445
+ lat
3446
+ lng
3447
+ }
3448
+ name
3449
+ openingHours
3450
3450
  parkingOptions
3451
3451
  paymentOptions
3452
+ phone
3453
+ photos
3454
+ rating
3452
3455
  restroom
3453
- importedAt
3454
- claimed
3455
- createdAt
3456
+ reviewCount
3457
+ slug
3456
3458
  updatedAt
3459
+ website
3457
3460
  }
3458
3461
  `;
3459
3462
  var GET_APP_SETTINGS = import_client64.gql`
@@ -3472,6 +3475,38 @@ var GET_GOOGLE_IMPORTED_MARKETS = import_client64.gql`
3472
3475
  }
3473
3476
  ${GOOGLE_IMPORTED_MARKETS_FIELDS_FRAGMENT}
3474
3477
  `;
3478
+ var GET_GOOGLE_IMPORTED_MARKETS_BY_REGION = import_client64.gql`
3479
+ query getGoogleImportedMarketsByRegion($region: String!) {
3480
+ googleImportedMarketsByRegion(region: $region) {
3481
+ ...GoogleImportedMarketsFields
3482
+ }
3483
+ }
3484
+ ${GOOGLE_IMPORTED_MARKETS_FIELDS_FRAGMENT}
3485
+ `;
3486
+ var SEARCH_GOOGLE_IMPORTED_MARKETS = import_client64.gql`
3487
+ query searchGoogleImportedMarkets($search: String!, $region: String) {
3488
+ googleImportedMarketsSearch(search: $search, region: $region) {
3489
+ ...GoogleImportedMarketsFields
3490
+ }
3491
+ }
3492
+ ${GOOGLE_IMPORTED_MARKETS_FIELDS_FRAGMENT}
3493
+ `;
3494
+ var GET_GOOGLE_IMPORTED_MARKETS_NEAR_ME = import_client64.gql`
3495
+ query getGoogleImportedMarketsNearMe(
3496
+ $latitude: Float!
3497
+ $longitude: Float!
3498
+ $radius: Int
3499
+ ) {
3500
+ googleImportedMarketsNearMe(
3501
+ lat: $latitude
3502
+ lng: $longitude
3503
+ radius: $radius
3504
+ ) {
3505
+ ...GoogleImportedMarketsFields
3506
+ }
3507
+ }
3508
+ ${GOOGLE_IMPORTED_MARKETS_FIELDS_FRAGMENT}
3509
+ `;
3475
3510
 
3476
3511
  // src/graphql/hooks/appSettings/hooksMutation.ts
3477
3512
  var useUpdateAppSettings = () => {
@@ -3505,6 +3540,38 @@ var useGetGoogleImportedMarkets = () => {
3505
3540
  const googleImportedMarkets = data?.googleImportedMarkets || [];
3506
3541
  return { error, googleImportedMarkets, loading, refetch };
3507
3542
  };
3543
+ var useGetGoogleImportedMarketsByRegion = (region) => {
3544
+ const { loading, error, data, refetch } = (0, import_client66.useQuery)(GET_GOOGLE_IMPORTED_MARKETS_BY_REGION, {
3545
+ fetchPolicy: "network-only",
3546
+ skip: !region,
3547
+ variables: { region }
3548
+ });
3549
+ const googleImportedMarketsByRegion = data?.googleImportedMarketsByRegion || [];
3550
+ return { error, googleImportedMarketsByRegion, loading, refetch };
3551
+ };
3552
+ var useSearchGoogleImportedMarkets = (search, region) => {
3553
+ const { loading, error, data, refetch } = (0, import_client66.useQuery)(SEARCH_GOOGLE_IMPORTED_MARKETS, {
3554
+ fetchPolicy: "network-only",
3555
+ skip: search.length < 3,
3556
+ variables: { region, search }
3557
+ });
3558
+ const googleImportedMarketsSearch = data?.googleImportedMarketsSearch || [];
3559
+ return { error, googleImportedMarketsSearch, loading, refetch };
3560
+ };
3561
+ var useGetGoogleImportedMarketsNearMe = (latitude, longitude, radius) => {
3562
+ const { loading, error, data, refetch } = (0, import_client66.useQuery)(GET_GOOGLE_IMPORTED_MARKETS_NEAR_ME, {
3563
+ fetchPolicy: "network-only",
3564
+ skip: !latitude || !longitude,
3565
+ variables: {
3566
+ latitude,
3567
+ longitude,
3568
+ radius: radius || 1e4
3569
+ // Default to 10km if no radius is provided
3570
+ }
3571
+ });
3572
+ const googleImportedMarketsNearMe = data?.googleImportedMarketsNearMe || [];
3573
+ return { error, googleImportedMarketsNearMe, loading, refetch };
3574
+ };
3508
3575
  // Annotate the CommonJS export names for ESM import in node:
3509
3576
  0 && (module.exports = {
3510
3577
  useAddParticipantToChat,
@@ -3561,6 +3628,8 @@ var useGetGoogleImportedMarkets = () => {
3561
3628
  useGetEventsByRegion,
3562
3629
  useGetEventsNearMe,
3563
3630
  useGetGoogleImportedMarkets,
3631
+ useGetGoogleImportedMarketsByRegion,
3632
+ useGetGoogleImportedMarketsNearMe,
3564
3633
  useGetNotificationCount,
3565
3634
  useGetNotificationCountSubscription,
3566
3635
  useGetPartner,
@@ -3605,6 +3674,7 @@ var useGetGoogleImportedMarkets = () => {
3605
3674
  useRequestPasswordReset,
3606
3675
  useResetPassword,
3607
3676
  useSearchEvents,
3677
+ useSearchGoogleImportedMarkets,
3608
3678
  useSearchPartners,
3609
3679
  useSearchVendors,
3610
3680
  useSelectPackage,