@timardex/cluemart-shared 1.3.64 → 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.
- package/dist/{googleImportedMarket-BECKtVJ4.d.ts → googleImportedMarket-BuxDo6MX.d.ts} +27 -25
- package/dist/{googleImportedMarket-Sl0y8deO.d.mts → googleImportedMarket-D2HOg7O-.d.mts} +27 -25
- package/dist/graphql/index.cjs +90 -20
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +26 -2
- package/dist/graphql/index.d.ts +26 -2
- package/dist/graphql/index.mjs +87 -20
- package/dist/graphql/index.mjs.map +1 -1
- package/dist/hooks/index.cjs +42 -19
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.mjs +42 -19
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +132 -39
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +51 -25
- package/dist/index.d.ts +51 -25
- package/dist/index.mjs +129 -39
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1025,42 +1025,44 @@ type AppSettingsType = AppSettingsFormData & {
|
|
|
1025
1025
|
updatedAt: Date | null;
|
|
1026
1026
|
};
|
|
1027
1027
|
|
|
1028
|
+
type GoogleAddressComponent = {
|
|
1029
|
+
longName?: string;
|
|
1030
|
+
shortName?: string;
|
|
1031
|
+
types?: string[];
|
|
1032
|
+
};
|
|
1028
1033
|
type GoogleImportedMarket = {
|
|
1029
1034
|
_id: string;
|
|
1030
|
-
|
|
1031
|
-
slug: string;
|
|
1032
|
-
image?: string;
|
|
1035
|
+
accessibilityOptions?: Record<string, boolean>;
|
|
1033
1036
|
address: string;
|
|
1037
|
+
addressComponents?: GoogleAddressComponent[];
|
|
1038
|
+
allowsDogs?: boolean;
|
|
1039
|
+
businessStatus?: string;
|
|
1040
|
+
claimed: boolean;
|
|
1041
|
+
createdAt: Date;
|
|
1042
|
+
goodForChildren?: boolean;
|
|
1043
|
+
goodForGroups?: boolean;
|
|
1044
|
+
googleMapsUrl?: string;
|
|
1045
|
+
googlePlaceId: string;
|
|
1046
|
+
image?: string;
|
|
1047
|
+
importedAt: Date;
|
|
1048
|
+
liveMusic?: boolean;
|
|
1034
1049
|
location?: {
|
|
1035
1050
|
lat: number;
|
|
1036
1051
|
lng: number;
|
|
1037
1052
|
};
|
|
1038
|
-
|
|
1039
|
-
website?: string;
|
|
1040
|
-
phone?: string;
|
|
1053
|
+
name: string;
|
|
1041
1054
|
openingHours?: string[];
|
|
1042
|
-
rating?: number;
|
|
1043
|
-
reviewCount?: number;
|
|
1044
|
-
photos?: string[];
|
|
1045
|
-
googleMapsUrl?: string;
|
|
1046
|
-
businessStatus?: string;
|
|
1047
|
-
addressComponents?: Array<{
|
|
1048
|
-
longName?: string;
|
|
1049
|
-
shortName?: string;
|
|
1050
|
-
types?: string[];
|
|
1051
|
-
}>;
|
|
1052
|
-
accessibilityOptions?: Record<string, boolean>;
|
|
1053
|
-
allowsDogs?: boolean;
|
|
1054
|
-
goodForChildren?: boolean;
|
|
1055
|
-
goodForGroups?: boolean;
|
|
1056
|
-
liveMusic?: boolean;
|
|
1057
1055
|
parkingOptions?: Record<string, boolean>;
|
|
1058
1056
|
paymentOptions?: Record<string, boolean>;
|
|
1057
|
+
phone?: string;
|
|
1058
|
+
photos?: string[];
|
|
1059
|
+
rating?: number;
|
|
1060
|
+
region: string;
|
|
1059
1061
|
restroom?: boolean;
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
createdAt: Date;
|
|
1062
|
+
reviewCount?: number;
|
|
1063
|
+
slug: string;
|
|
1063
1064
|
updatedAt: Date;
|
|
1065
|
+
website?: string;
|
|
1064
1066
|
};
|
|
1065
1067
|
|
|
1066
1068
|
declare const vendorElectricity: {
|
|
@@ -2019,6 +2021,30 @@ declare const useGetGoogleImportedMarkets: () => {
|
|
|
2019
2021
|
googleImportedMarkets: GoogleImportedMarket[];
|
|
2020
2022
|
}>>;
|
|
2021
2023
|
};
|
|
2024
|
+
declare const useGetGoogleImportedMarketsByRegion: (region: string) => {
|
|
2025
|
+
error: _apollo_client.ApolloError | undefined;
|
|
2026
|
+
googleImportedMarketsByRegion: GoogleImportedMarket[];
|
|
2027
|
+
loading: boolean;
|
|
2028
|
+
refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<{
|
|
2029
|
+
googleImportedMarketsByRegion: GoogleImportedMarket[];
|
|
2030
|
+
}>>;
|
|
2031
|
+
};
|
|
2032
|
+
declare const useSearchGoogleImportedMarkets: (search: string, region: string) => {
|
|
2033
|
+
error: _apollo_client.ApolloError | undefined;
|
|
2034
|
+
googleImportedMarketsSearch: GoogleImportedMarket[];
|
|
2035
|
+
loading: boolean;
|
|
2036
|
+
refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<{
|
|
2037
|
+
googleImportedMarketsSearch: GoogleImportedMarket[];
|
|
2038
|
+
}>>;
|
|
2039
|
+
};
|
|
2040
|
+
declare const useGetGoogleImportedMarketsNearMe: (latitude: number, longitude: number, radius?: number) => {
|
|
2041
|
+
error: _apollo_client.ApolloError | undefined;
|
|
2042
|
+
googleImportedMarketsNearMe: GoogleImportedMarket[];
|
|
2043
|
+
loading: boolean;
|
|
2044
|
+
refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<{
|
|
2045
|
+
googleImportedMarketsNearMe: GoogleImportedMarket[];
|
|
2046
|
+
}>>;
|
|
2047
|
+
};
|
|
2022
2048
|
|
|
2023
2049
|
interface PlacePrediction {
|
|
2024
2050
|
place_id: string;
|
|
@@ -2216,4 +2242,4 @@ declare function normalizeUrl(url: string): string;
|
|
|
2216
2242
|
declare const licenseNiceNames: Record<EnumUserLicence, string>;
|
|
2217
2243
|
declare const cluemartSocialMedia: SocialMediaType[];
|
|
2218
2244
|
|
|
2219
|
-
export { type AdFormData, type AdType, type AdminUpdateResourceType, type AppSettingsFormData, type AppSettingsType, type AssociateType, type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatMessageInput, type ChatMessageType, type ChatType, type ContactUsFormData, type CreateAdFormData, type CreateAppSettingsFormData, type CreateBulkNotificationInput, type CreateContactUsFormData, type CreateEventFormData, type CreateEventInfoFormData, type CreateFormData, type CreateLoginFormData, type CreatePartnerFormData, type CreatePostFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateTesterFormData, type CreateUnregisteredVendorFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type CreateVendorFormData, type CreateVendorInfoFormData, type DateTimeType, type DateTimeWithPriceType, type DeviceInfo, EnumActivity, EnumAdShowOn, EnumAdStatus, EnumAdStyle, EnumAdType, EnumBillingPeriod, EnumChatType, EnumEventDateStatus, EnumEventType, EnumFoodFlavor, EnumFoodType, EnumInviteStatus, EnumNotificationResourceType, EnumNotificationType, EnumOSPlatform, EnumPartnerType, EnumPaymentMethod, EnumPostContentType, EnumPostType, EnumRegions, EnumRelationResource, EnumResourceType, EnumSocialMedia, EnumSubscriptionStatus, EnumUserLicence, EnumUserRole, EnumVendorType, type EventFormData, type EventInfoFormData, type EventInfoType, type EventType, type FormDateField, type FormField, type GeocodeLocation, type GoogleImportedMarket, type ImageObjectType, ImageTypeEnum, type LocationType, type LoginFormData, type MapMultiLocation, type NotificationCount, type NotificationDataType, type NotificationType, type Nullable, type OptionItem, OrganizedMarketCount, OrganizerMarketFrequency, type OwnerType, type ParticipantType, type PartnerFormData, type PartnerType, type PaymentInfoType, type PlacePrediction, type PostContentCover, type PostContentData, type PostContentFormData, type PostContentImage, type PostContentList, type PostContentTextarea, type PostContentType, type PostContentVideo, type PostFileInput, type PostFormData, type PostType, type PosterInputType, type PosterUsageType, type Region, type RegisterFormData, type RelationDate, type RelationType, type RequestPasswordResetFormData, type Requirement, type ResetPasswordFormData, type ResourceActivityEntry, type ResourceActivityInputType, type ResourceActivityType, type ResourceConnectionsType, type ResourceContactDetailsType, type ResourceImageType, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, type SocialMediaType, type StallType, type StripeSubscription, type Subcategory, type SubcategoryItems, type SubscriptionStatusData, type TermsAgreement, type TesterEvent, type TesterFormData, type TesterType, type TesterVendor, USER_STORAGE_KEY, type UnregisteredVendorFormData, type UnregisteredVendorInvitationType, type UnregisteredVendorType, type UserActivity, type UserActivityEvent, type UserActivityEventType, type UserFormData, type UserLicenceType, type UserType, type ValidateVerificationTokenFormData, type VendorAttributes, type VendorFormData, type VendorInfoFormData, type VendorInfoType, type VendorLocation, type VendorMenuType, VendorSellingFrequency, type VendorType, availableCategories, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, cluemartSocialMedia, companyContactFields, contactUsFields, darkColors, dateFormat, defaultEventFormValues, defaultEventInfoFormValues, defaultPartnerFormValues, defaultRegion, defaultUnregisteredVendorFormValues, defaultVendorFormValues, defaultVendorInfoFormValues, emailField, eventBasicInfoFields, eventEndDateFields, eventInfo, eventInfoPaymentInfo, eventStartDateFields, fonts, foodFlavourOptions, formatDate, formatTimestamp, getCurrentAndFutureDates, globalDefaultValues, isFutureDatesBeforeThreshold, licenseNiceNames, lightColors, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, normalizeUrl, packagingOptions, partnerBasicInfoFields, paymentMethodOptions, producedIngOptions, productLabelGroups, profileFields, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, socialMediaFields, sortDatesChronologically, stallTypeOptions, statusOptions, tagOptions, testersFields, timeFormat, toNZTime, truncateText, useAdForm, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminResendTesterVerificationEmail, useAdminResendUserVerificationEmail, useAdminUpdateResourceType, useAdminUpdateTester, useAppSettingsForm, useCancelSubscription, useContactUs, useContactUsForm, useCrawlGoogleMarkets, useCreateAd, useCreateBulkNotifications, useCreateCheckoutSession, useCreateCustomerPortal, useCreateEvent, useCreateEventInfo, useCreatePartner, useCreatePost, useCreatePoster, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateTester, useCreateUnregisteredVendor, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeletePartner, useDeletePost, useDeleteRelation, useDeleteTester, useDeleteUnregisteredVendor, useDeleteUser, useDeleteVendor, useEventForm, useEventInfoForm, useGetAd, useGetAds, useGetAdsByRegion, useGetAppSettings, useGetChat, useGetChatSubscription, useGetEvent, useGetEventInfo, useGetEventRelations, useGetEvents, useGetEventsByRegion, useGetEventsNearMe, useGetGoogleImportedMarkets, useGetNotificationCount, useGetNotificationCountSubscription, useGetPartner, useGetPartners, useGetPartnersByRegion, useGetPost, useGetPosts, useGetPostsByType, useGetRelation, useGetRelationByEventAndVendor, useGetResourceActivity, useGetResourceConnections, useGetSubscriptionStatus, useGetTester, useGetTesters, useGetUnregisteredVendor, useGetUnregisteredVendors, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLocationSearch, useLogin, useLoginForm, useLogout, useMarkAllNotificationsRead, useMarkNotificationRead, usePartnerForm, usePostForm, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchEvents, useSearchPartners, useSearchVendors, useSelectPackage, useSendChatMessage, useTesterForm, useUpdateAd, useUpdateAppSettings, useUpdateEvent, useUpdateEventInfo, useUpdatePartner, useUpdatePost, useUpdateRelation, useUpdateSubscriptionPlan, useUpdateTester, useUpdateUnregisteredVendor, useUpdateUser, useUpdateVendor, useUpdateVendorInfo, useUserForm, useValidateVerificationToken, useValidateVerificationTokenForm, useVendorForm, useVendorInfoForm, validateVerificationTokenFields, vendorAvailability, vendorBasicInfoFields, vendorCompliance, vendorElectricity, vendorEndDateFields, vendorFoodFlavour, vendorFullAddress, vendorGazebo, vendorLocationDescription, vendorMenuFields, vendorMultiLocation, vendorPackaging, vendorPriceRange, vendorProducedIn, vendorStallSize, vendorStartDateFields, vendorTable };
|
|
2245
|
+
export { type AdFormData, type AdType, type AdminUpdateResourceType, type AppSettingsFormData, type AppSettingsType, type AssociateType, type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatMessageInput, type ChatMessageType, type ChatType, type ContactUsFormData, type CreateAdFormData, type CreateAppSettingsFormData, type CreateBulkNotificationInput, type CreateContactUsFormData, type CreateEventFormData, type CreateEventInfoFormData, type CreateFormData, type CreateLoginFormData, type CreatePartnerFormData, type CreatePostFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateTesterFormData, type CreateUnregisteredVendorFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type CreateVendorFormData, type CreateVendorInfoFormData, type DateTimeType, type DateTimeWithPriceType, type DeviceInfo, EnumActivity, EnumAdShowOn, EnumAdStatus, EnumAdStyle, EnumAdType, EnumBillingPeriod, EnumChatType, EnumEventDateStatus, EnumEventType, EnumFoodFlavor, EnumFoodType, EnumInviteStatus, EnumNotificationResourceType, EnumNotificationType, EnumOSPlatform, EnumPartnerType, EnumPaymentMethod, EnumPostContentType, EnumPostType, EnumRegions, EnumRelationResource, EnumResourceType, EnumSocialMedia, EnumSubscriptionStatus, EnumUserLicence, EnumUserRole, EnumVendorType, type EventFormData, type EventInfoFormData, type EventInfoType, type EventType, type FormDateField, type FormField, type GeocodeLocation, type GoogleAddressComponent, type GoogleImportedMarket, type ImageObjectType, ImageTypeEnum, type LocationType, type LoginFormData, type MapMultiLocation, type NotificationCount, type NotificationDataType, type NotificationType, type Nullable, type OptionItem, OrganizedMarketCount, OrganizerMarketFrequency, type OwnerType, type ParticipantType, type PartnerFormData, type PartnerType, type PaymentInfoType, type PlacePrediction, type PostContentCover, type PostContentData, type PostContentFormData, type PostContentImage, type PostContentList, type PostContentTextarea, type PostContentType, type PostContentVideo, type PostFileInput, type PostFormData, type PostType, type PosterInputType, type PosterUsageType, type Region, type RegisterFormData, type RelationDate, type RelationType, type RequestPasswordResetFormData, type Requirement, type ResetPasswordFormData, type ResourceActivityEntry, type ResourceActivityInputType, type ResourceActivityType, type ResourceConnectionsType, type ResourceContactDetailsType, type ResourceImageType, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, type SocialMediaType, type StallType, type StripeSubscription, type Subcategory, type SubcategoryItems, type SubscriptionStatusData, type TermsAgreement, type TesterEvent, type TesterFormData, type TesterType, type TesterVendor, USER_STORAGE_KEY, type UnregisteredVendorFormData, type UnregisteredVendorInvitationType, type UnregisteredVendorType, type UserActivity, type UserActivityEvent, type UserActivityEventType, type UserFormData, type UserLicenceType, type UserType, type ValidateVerificationTokenFormData, type VendorAttributes, type VendorFormData, type VendorInfoFormData, type VendorInfoType, type VendorLocation, type VendorMenuType, VendorSellingFrequency, type VendorType, availableCategories, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, cluemartSocialMedia, companyContactFields, contactUsFields, darkColors, dateFormat, defaultEventFormValues, defaultEventInfoFormValues, defaultPartnerFormValues, defaultRegion, defaultUnregisteredVendorFormValues, defaultVendorFormValues, defaultVendorInfoFormValues, emailField, eventBasicInfoFields, eventEndDateFields, eventInfo, eventInfoPaymentInfo, eventStartDateFields, fonts, foodFlavourOptions, formatDate, formatTimestamp, getCurrentAndFutureDates, globalDefaultValues, isFutureDatesBeforeThreshold, licenseNiceNames, lightColors, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, normalizeUrl, packagingOptions, partnerBasicInfoFields, paymentMethodOptions, producedIngOptions, productLabelGroups, profileFields, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, socialMediaFields, sortDatesChronologically, stallTypeOptions, statusOptions, tagOptions, testersFields, timeFormat, toNZTime, truncateText, useAdForm, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminResendTesterVerificationEmail, useAdminResendUserVerificationEmail, useAdminUpdateResourceType, useAdminUpdateTester, useAppSettingsForm, useCancelSubscription, useContactUs, useContactUsForm, useCrawlGoogleMarkets, useCreateAd, useCreateBulkNotifications, useCreateCheckoutSession, useCreateCustomerPortal, useCreateEvent, useCreateEventInfo, useCreatePartner, useCreatePost, useCreatePoster, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateTester, useCreateUnregisteredVendor, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeletePartner, useDeletePost, useDeleteRelation, useDeleteTester, useDeleteUnregisteredVendor, useDeleteUser, useDeleteVendor, useEventForm, useEventInfoForm, useGetAd, useGetAds, useGetAdsByRegion, useGetAppSettings, useGetChat, useGetChatSubscription, useGetEvent, useGetEventInfo, useGetEventRelations, useGetEvents, useGetEventsByRegion, useGetEventsNearMe, useGetGoogleImportedMarkets, useGetGoogleImportedMarketsByRegion, useGetGoogleImportedMarketsNearMe, useGetNotificationCount, useGetNotificationCountSubscription, useGetPartner, useGetPartners, useGetPartnersByRegion, useGetPost, useGetPosts, useGetPostsByType, useGetRelation, useGetRelationByEventAndVendor, useGetResourceActivity, useGetResourceConnections, useGetSubscriptionStatus, useGetTester, useGetTesters, useGetUnregisteredVendor, useGetUnregisteredVendors, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLocationSearch, useLogin, useLoginForm, useLogout, useMarkAllNotificationsRead, useMarkNotificationRead, usePartnerForm, usePostForm, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchEvents, useSearchGoogleImportedMarkets, useSearchPartners, useSearchVendors, useSelectPackage, useSendChatMessage, useTesterForm, useUpdateAd, useUpdateAppSettings, useUpdateEvent, useUpdateEventInfo, useUpdatePartner, useUpdatePost, useUpdateRelation, useUpdateSubscriptionPlan, useUpdateTester, useUpdateUnregisteredVendor, useUpdateUser, useUpdateVendor, useUpdateVendorInfo, useUserForm, useValidateVerificationToken, useValidateVerificationTokenForm, useVendorForm, useVendorInfoForm, validateVerificationTokenFields, vendorAvailability, vendorBasicInfoFields, vendorCompliance, vendorElectricity, vendorEndDateFields, vendorFoodFlavour, vendorFullAddress, vendorGazebo, vendorLocationDescription, vendorMenuFields, vendorMultiLocation, vendorPackaging, vendorPriceRange, vendorProducedIn, vendorStallSize, vendorStartDateFields, vendorTable };
|
package/dist/index.d.ts
CHANGED
|
@@ -1025,42 +1025,44 @@ type AppSettingsType = AppSettingsFormData & {
|
|
|
1025
1025
|
updatedAt: Date | null;
|
|
1026
1026
|
};
|
|
1027
1027
|
|
|
1028
|
+
type GoogleAddressComponent = {
|
|
1029
|
+
longName?: string;
|
|
1030
|
+
shortName?: string;
|
|
1031
|
+
types?: string[];
|
|
1032
|
+
};
|
|
1028
1033
|
type GoogleImportedMarket = {
|
|
1029
1034
|
_id: string;
|
|
1030
|
-
|
|
1031
|
-
slug: string;
|
|
1032
|
-
image?: string;
|
|
1035
|
+
accessibilityOptions?: Record<string, boolean>;
|
|
1033
1036
|
address: string;
|
|
1037
|
+
addressComponents?: GoogleAddressComponent[];
|
|
1038
|
+
allowsDogs?: boolean;
|
|
1039
|
+
businessStatus?: string;
|
|
1040
|
+
claimed: boolean;
|
|
1041
|
+
createdAt: Date;
|
|
1042
|
+
goodForChildren?: boolean;
|
|
1043
|
+
goodForGroups?: boolean;
|
|
1044
|
+
googleMapsUrl?: string;
|
|
1045
|
+
googlePlaceId: string;
|
|
1046
|
+
image?: string;
|
|
1047
|
+
importedAt: Date;
|
|
1048
|
+
liveMusic?: boolean;
|
|
1034
1049
|
location?: {
|
|
1035
1050
|
lat: number;
|
|
1036
1051
|
lng: number;
|
|
1037
1052
|
};
|
|
1038
|
-
|
|
1039
|
-
website?: string;
|
|
1040
|
-
phone?: string;
|
|
1053
|
+
name: string;
|
|
1041
1054
|
openingHours?: string[];
|
|
1042
|
-
rating?: number;
|
|
1043
|
-
reviewCount?: number;
|
|
1044
|
-
photos?: string[];
|
|
1045
|
-
googleMapsUrl?: string;
|
|
1046
|
-
businessStatus?: string;
|
|
1047
|
-
addressComponents?: Array<{
|
|
1048
|
-
longName?: string;
|
|
1049
|
-
shortName?: string;
|
|
1050
|
-
types?: string[];
|
|
1051
|
-
}>;
|
|
1052
|
-
accessibilityOptions?: Record<string, boolean>;
|
|
1053
|
-
allowsDogs?: boolean;
|
|
1054
|
-
goodForChildren?: boolean;
|
|
1055
|
-
goodForGroups?: boolean;
|
|
1056
|
-
liveMusic?: boolean;
|
|
1057
1055
|
parkingOptions?: Record<string, boolean>;
|
|
1058
1056
|
paymentOptions?: Record<string, boolean>;
|
|
1057
|
+
phone?: string;
|
|
1058
|
+
photos?: string[];
|
|
1059
|
+
rating?: number;
|
|
1060
|
+
region: string;
|
|
1059
1061
|
restroom?: boolean;
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
createdAt: Date;
|
|
1062
|
+
reviewCount?: number;
|
|
1063
|
+
slug: string;
|
|
1063
1064
|
updatedAt: Date;
|
|
1065
|
+
website?: string;
|
|
1064
1066
|
};
|
|
1065
1067
|
|
|
1066
1068
|
declare const vendorElectricity: {
|
|
@@ -2019,6 +2021,30 @@ declare const useGetGoogleImportedMarkets: () => {
|
|
|
2019
2021
|
googleImportedMarkets: GoogleImportedMarket[];
|
|
2020
2022
|
}>>;
|
|
2021
2023
|
};
|
|
2024
|
+
declare const useGetGoogleImportedMarketsByRegion: (region: string) => {
|
|
2025
|
+
error: _apollo_client.ApolloError | undefined;
|
|
2026
|
+
googleImportedMarketsByRegion: GoogleImportedMarket[];
|
|
2027
|
+
loading: boolean;
|
|
2028
|
+
refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<{
|
|
2029
|
+
googleImportedMarketsByRegion: GoogleImportedMarket[];
|
|
2030
|
+
}>>;
|
|
2031
|
+
};
|
|
2032
|
+
declare const useSearchGoogleImportedMarkets: (search: string, region: string) => {
|
|
2033
|
+
error: _apollo_client.ApolloError | undefined;
|
|
2034
|
+
googleImportedMarketsSearch: GoogleImportedMarket[];
|
|
2035
|
+
loading: boolean;
|
|
2036
|
+
refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<{
|
|
2037
|
+
googleImportedMarketsSearch: GoogleImportedMarket[];
|
|
2038
|
+
}>>;
|
|
2039
|
+
};
|
|
2040
|
+
declare const useGetGoogleImportedMarketsNearMe: (latitude: number, longitude: number, radius?: number) => {
|
|
2041
|
+
error: _apollo_client.ApolloError | undefined;
|
|
2042
|
+
googleImportedMarketsNearMe: GoogleImportedMarket[];
|
|
2043
|
+
loading: boolean;
|
|
2044
|
+
refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<{
|
|
2045
|
+
googleImportedMarketsNearMe: GoogleImportedMarket[];
|
|
2046
|
+
}>>;
|
|
2047
|
+
};
|
|
2022
2048
|
|
|
2023
2049
|
interface PlacePrediction {
|
|
2024
2050
|
place_id: string;
|
|
@@ -2216,4 +2242,4 @@ declare function normalizeUrl(url: string): string;
|
|
|
2216
2242
|
declare const licenseNiceNames: Record<EnumUserLicence, string>;
|
|
2217
2243
|
declare const cluemartSocialMedia: SocialMediaType[];
|
|
2218
2244
|
|
|
2219
|
-
export { type AdFormData, type AdType, type AdminUpdateResourceType, type AppSettingsFormData, type AppSettingsType, type AssociateType, type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatMessageInput, type ChatMessageType, type ChatType, type ContactUsFormData, type CreateAdFormData, type CreateAppSettingsFormData, type CreateBulkNotificationInput, type CreateContactUsFormData, type CreateEventFormData, type CreateEventInfoFormData, type CreateFormData, type CreateLoginFormData, type CreatePartnerFormData, type CreatePostFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateTesterFormData, type CreateUnregisteredVendorFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type CreateVendorFormData, type CreateVendorInfoFormData, type DateTimeType, type DateTimeWithPriceType, type DeviceInfo, EnumActivity, EnumAdShowOn, EnumAdStatus, EnumAdStyle, EnumAdType, EnumBillingPeriod, EnumChatType, EnumEventDateStatus, EnumEventType, EnumFoodFlavor, EnumFoodType, EnumInviteStatus, EnumNotificationResourceType, EnumNotificationType, EnumOSPlatform, EnumPartnerType, EnumPaymentMethod, EnumPostContentType, EnumPostType, EnumRegions, EnumRelationResource, EnumResourceType, EnumSocialMedia, EnumSubscriptionStatus, EnumUserLicence, EnumUserRole, EnumVendorType, type EventFormData, type EventInfoFormData, type EventInfoType, type EventType, type FormDateField, type FormField, type GeocodeLocation, type GoogleImportedMarket, type ImageObjectType, ImageTypeEnum, type LocationType, type LoginFormData, type MapMultiLocation, type NotificationCount, type NotificationDataType, type NotificationType, type Nullable, type OptionItem, OrganizedMarketCount, OrganizerMarketFrequency, type OwnerType, type ParticipantType, type PartnerFormData, type PartnerType, type PaymentInfoType, type PlacePrediction, type PostContentCover, type PostContentData, type PostContentFormData, type PostContentImage, type PostContentList, type PostContentTextarea, type PostContentType, type PostContentVideo, type PostFileInput, type PostFormData, type PostType, type PosterInputType, type PosterUsageType, type Region, type RegisterFormData, type RelationDate, type RelationType, type RequestPasswordResetFormData, type Requirement, type ResetPasswordFormData, type ResourceActivityEntry, type ResourceActivityInputType, type ResourceActivityType, type ResourceConnectionsType, type ResourceContactDetailsType, type ResourceImageType, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, type SocialMediaType, type StallType, type StripeSubscription, type Subcategory, type SubcategoryItems, type SubscriptionStatusData, type TermsAgreement, type TesterEvent, type TesterFormData, type TesterType, type TesterVendor, USER_STORAGE_KEY, type UnregisteredVendorFormData, type UnregisteredVendorInvitationType, type UnregisteredVendorType, type UserActivity, type UserActivityEvent, type UserActivityEventType, type UserFormData, type UserLicenceType, type UserType, type ValidateVerificationTokenFormData, type VendorAttributes, type VendorFormData, type VendorInfoFormData, type VendorInfoType, type VendorLocation, type VendorMenuType, VendorSellingFrequency, type VendorType, availableCategories, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, cluemartSocialMedia, companyContactFields, contactUsFields, darkColors, dateFormat, defaultEventFormValues, defaultEventInfoFormValues, defaultPartnerFormValues, defaultRegion, defaultUnregisteredVendorFormValues, defaultVendorFormValues, defaultVendorInfoFormValues, emailField, eventBasicInfoFields, eventEndDateFields, eventInfo, eventInfoPaymentInfo, eventStartDateFields, fonts, foodFlavourOptions, formatDate, formatTimestamp, getCurrentAndFutureDates, globalDefaultValues, isFutureDatesBeforeThreshold, licenseNiceNames, lightColors, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, normalizeUrl, packagingOptions, partnerBasicInfoFields, paymentMethodOptions, producedIngOptions, productLabelGroups, profileFields, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, socialMediaFields, sortDatesChronologically, stallTypeOptions, statusOptions, tagOptions, testersFields, timeFormat, toNZTime, truncateText, useAdForm, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminResendTesterVerificationEmail, useAdminResendUserVerificationEmail, useAdminUpdateResourceType, useAdminUpdateTester, useAppSettingsForm, useCancelSubscription, useContactUs, useContactUsForm, useCrawlGoogleMarkets, useCreateAd, useCreateBulkNotifications, useCreateCheckoutSession, useCreateCustomerPortal, useCreateEvent, useCreateEventInfo, useCreatePartner, useCreatePost, useCreatePoster, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateTester, useCreateUnregisteredVendor, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeletePartner, useDeletePost, useDeleteRelation, useDeleteTester, useDeleteUnregisteredVendor, useDeleteUser, useDeleteVendor, useEventForm, useEventInfoForm, useGetAd, useGetAds, useGetAdsByRegion, useGetAppSettings, useGetChat, useGetChatSubscription, useGetEvent, useGetEventInfo, useGetEventRelations, useGetEvents, useGetEventsByRegion, useGetEventsNearMe, useGetGoogleImportedMarkets, useGetNotificationCount, useGetNotificationCountSubscription, useGetPartner, useGetPartners, useGetPartnersByRegion, useGetPost, useGetPosts, useGetPostsByType, useGetRelation, useGetRelationByEventAndVendor, useGetResourceActivity, useGetResourceConnections, useGetSubscriptionStatus, useGetTester, useGetTesters, useGetUnregisteredVendor, useGetUnregisteredVendors, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLocationSearch, useLogin, useLoginForm, useLogout, useMarkAllNotificationsRead, useMarkNotificationRead, usePartnerForm, usePostForm, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchEvents, useSearchPartners, useSearchVendors, useSelectPackage, useSendChatMessage, useTesterForm, useUpdateAd, useUpdateAppSettings, useUpdateEvent, useUpdateEventInfo, useUpdatePartner, useUpdatePost, useUpdateRelation, useUpdateSubscriptionPlan, useUpdateTester, useUpdateUnregisteredVendor, useUpdateUser, useUpdateVendor, useUpdateVendorInfo, useUserForm, useValidateVerificationToken, useValidateVerificationTokenForm, useVendorForm, useVendorInfoForm, validateVerificationTokenFields, vendorAvailability, vendorBasicInfoFields, vendorCompliance, vendorElectricity, vendorEndDateFields, vendorFoodFlavour, vendorFullAddress, vendorGazebo, vendorLocationDescription, vendorMenuFields, vendorMultiLocation, vendorPackaging, vendorPriceRange, vendorProducedIn, vendorStallSize, vendorStartDateFields, vendorTable };
|
|
2245
|
+
export { type AdFormData, type AdType, type AdminUpdateResourceType, type AppSettingsFormData, type AppSettingsType, type AssociateType, type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatMessageInput, type ChatMessageType, type ChatType, type ContactUsFormData, type CreateAdFormData, type CreateAppSettingsFormData, type CreateBulkNotificationInput, type CreateContactUsFormData, type CreateEventFormData, type CreateEventInfoFormData, type CreateFormData, type CreateLoginFormData, type CreatePartnerFormData, type CreatePostFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateTesterFormData, type CreateUnregisteredVendorFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type CreateVendorFormData, type CreateVendorInfoFormData, type DateTimeType, type DateTimeWithPriceType, type DeviceInfo, EnumActivity, EnumAdShowOn, EnumAdStatus, EnumAdStyle, EnumAdType, EnumBillingPeriod, EnumChatType, EnumEventDateStatus, EnumEventType, EnumFoodFlavor, EnumFoodType, EnumInviteStatus, EnumNotificationResourceType, EnumNotificationType, EnumOSPlatform, EnumPartnerType, EnumPaymentMethod, EnumPostContentType, EnumPostType, EnumRegions, EnumRelationResource, EnumResourceType, EnumSocialMedia, EnumSubscriptionStatus, EnumUserLicence, EnumUserRole, EnumVendorType, type EventFormData, type EventInfoFormData, type EventInfoType, type EventType, type FormDateField, type FormField, type GeocodeLocation, type GoogleAddressComponent, type GoogleImportedMarket, type ImageObjectType, ImageTypeEnum, type LocationType, type LoginFormData, type MapMultiLocation, type NotificationCount, type NotificationDataType, type NotificationType, type Nullable, type OptionItem, OrganizedMarketCount, OrganizerMarketFrequency, type OwnerType, type ParticipantType, type PartnerFormData, type PartnerType, type PaymentInfoType, type PlacePrediction, type PostContentCover, type PostContentData, type PostContentFormData, type PostContentImage, type PostContentList, type PostContentTextarea, type PostContentType, type PostContentVideo, type PostFileInput, type PostFormData, type PostType, type PosterInputType, type PosterUsageType, type Region, type RegisterFormData, type RelationDate, type RelationType, type RequestPasswordResetFormData, type Requirement, type ResetPasswordFormData, type ResourceActivityEntry, type ResourceActivityInputType, type ResourceActivityType, type ResourceConnectionsType, type ResourceContactDetailsType, type ResourceImageType, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, type SocialMediaType, type StallType, type StripeSubscription, type Subcategory, type SubcategoryItems, type SubscriptionStatusData, type TermsAgreement, type TesterEvent, type TesterFormData, type TesterType, type TesterVendor, USER_STORAGE_KEY, type UnregisteredVendorFormData, type UnregisteredVendorInvitationType, type UnregisteredVendorType, type UserActivity, type UserActivityEvent, type UserActivityEventType, type UserFormData, type UserLicenceType, type UserType, type ValidateVerificationTokenFormData, type VendorAttributes, type VendorFormData, type VendorInfoFormData, type VendorInfoType, type VendorLocation, type VendorMenuType, VendorSellingFrequency, type VendorType, availableCategories, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, cluemartSocialMedia, companyContactFields, contactUsFields, darkColors, dateFormat, defaultEventFormValues, defaultEventInfoFormValues, defaultPartnerFormValues, defaultRegion, defaultUnregisteredVendorFormValues, defaultVendorFormValues, defaultVendorInfoFormValues, emailField, eventBasicInfoFields, eventEndDateFields, eventInfo, eventInfoPaymentInfo, eventStartDateFields, fonts, foodFlavourOptions, formatDate, formatTimestamp, getCurrentAndFutureDates, globalDefaultValues, isFutureDatesBeforeThreshold, licenseNiceNames, lightColors, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, normalizeUrl, packagingOptions, partnerBasicInfoFields, paymentMethodOptions, producedIngOptions, productLabelGroups, profileFields, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, socialMediaFields, sortDatesChronologically, stallTypeOptions, statusOptions, tagOptions, testersFields, timeFormat, toNZTime, truncateText, useAdForm, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminResendTesterVerificationEmail, useAdminResendUserVerificationEmail, useAdminUpdateResourceType, useAdminUpdateTester, useAppSettingsForm, useCancelSubscription, useContactUs, useContactUsForm, useCrawlGoogleMarkets, useCreateAd, useCreateBulkNotifications, useCreateCheckoutSession, useCreateCustomerPortal, useCreateEvent, useCreateEventInfo, useCreatePartner, useCreatePost, useCreatePoster, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateTester, useCreateUnregisteredVendor, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeletePartner, useDeletePost, useDeleteRelation, useDeleteTester, useDeleteUnregisteredVendor, useDeleteUser, useDeleteVendor, useEventForm, useEventInfoForm, useGetAd, useGetAds, useGetAdsByRegion, useGetAppSettings, useGetChat, useGetChatSubscription, useGetEvent, useGetEventInfo, useGetEventRelations, useGetEvents, useGetEventsByRegion, useGetEventsNearMe, useGetGoogleImportedMarkets, useGetGoogleImportedMarketsByRegion, useGetGoogleImportedMarketsNearMe, useGetNotificationCount, useGetNotificationCountSubscription, useGetPartner, useGetPartners, useGetPartnersByRegion, useGetPost, useGetPosts, useGetPostsByType, useGetRelation, useGetRelationByEventAndVendor, useGetResourceActivity, useGetResourceConnections, useGetSubscriptionStatus, useGetTester, useGetTesters, useGetUnregisteredVendor, useGetUnregisteredVendors, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLocationSearch, useLogin, useLoginForm, useLogout, useMarkAllNotificationsRead, useMarkNotificationRead, usePartnerForm, usePostForm, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchEvents, useSearchGoogleImportedMarkets, useSearchPartners, useSearchVendors, useSelectPackage, useSendChatMessage, useTesterForm, useUpdateAd, useUpdateAppSettings, useUpdateEvent, useUpdateEventInfo, useUpdatePartner, useUpdatePost, useUpdateRelation, useUpdateSubscriptionPlan, useUpdateTester, useUpdateUnregisteredVendor, useUpdateUser, useUpdateVendor, useUpdateVendorInfo, useUserForm, useValidateVerificationToken, useValidateVerificationTokenForm, useVendorForm, useVendorInfoForm, validateVerificationTokenFields, vendorAvailability, vendorBasicInfoFields, vendorCompliance, vendorElectricity, vendorEndDateFields, vendorFoodFlavour, vendorFullAddress, vendorGazebo, vendorLocationDescription, vendorMenuFields, vendorMultiLocation, vendorPackaging, vendorPriceRange, vendorProducedIn, vendorStallSize, vendorStartDateFields, vendorTable };
|
package/dist/index.mjs
CHANGED
|
@@ -5465,40 +5465,40 @@ var APP_SETTINGS_FIELDS_FRAGMENT = gql34`
|
|
|
5465
5465
|
var GOOGLE_IMPORTED_MARKETS_FIELDS_FRAGMENT = gql34`
|
|
5466
5466
|
fragment GoogleImportedMarketsFields on GoogleImportedMarketType {
|
|
5467
5467
|
_id
|
|
5468
|
-
|
|
5469
|
-
slug
|
|
5470
|
-
image
|
|
5468
|
+
accessibilityOptions
|
|
5471
5469
|
address
|
|
5472
|
-
location {
|
|
5473
|
-
lat
|
|
5474
|
-
lng
|
|
5475
|
-
}
|
|
5476
|
-
googlePlaceId
|
|
5477
|
-
website
|
|
5478
|
-
phone
|
|
5479
|
-
openingHours
|
|
5480
|
-
rating
|
|
5481
|
-
reviewCount
|
|
5482
|
-
photos
|
|
5483
|
-
googleMapsUrl
|
|
5484
|
-
businessStatus
|
|
5485
5470
|
addressComponents {
|
|
5486
5471
|
longName
|
|
5487
5472
|
shortName
|
|
5488
5473
|
types
|
|
5489
5474
|
}
|
|
5490
|
-
accessibilityOptions
|
|
5491
5475
|
allowsDogs
|
|
5476
|
+
businessStatus
|
|
5477
|
+
claimed
|
|
5478
|
+
createdAt
|
|
5492
5479
|
goodForChildren
|
|
5493
5480
|
goodForGroups
|
|
5481
|
+
googleMapsUrl
|
|
5482
|
+
googlePlaceId
|
|
5483
|
+
image
|
|
5484
|
+
importedAt
|
|
5494
5485
|
liveMusic
|
|
5486
|
+
location {
|
|
5487
|
+
lat
|
|
5488
|
+
lng
|
|
5489
|
+
}
|
|
5490
|
+
name
|
|
5491
|
+
openingHours
|
|
5495
5492
|
parkingOptions
|
|
5496
5493
|
paymentOptions
|
|
5494
|
+
phone
|
|
5495
|
+
photos
|
|
5496
|
+
rating
|
|
5497
5497
|
restroom
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
createdAt
|
|
5498
|
+
reviewCount
|
|
5499
|
+
slug
|
|
5501
5500
|
updatedAt
|
|
5501
|
+
website
|
|
5502
5502
|
}
|
|
5503
5503
|
`;
|
|
5504
5504
|
var GET_APP_SETTINGS = gql34`
|
|
@@ -5517,6 +5517,38 @@ var GET_GOOGLE_IMPORTED_MARKETS = gql34`
|
|
|
5517
5517
|
}
|
|
5518
5518
|
${GOOGLE_IMPORTED_MARKETS_FIELDS_FRAGMENT}
|
|
5519
5519
|
`;
|
|
5520
|
+
var GET_GOOGLE_IMPORTED_MARKETS_BY_REGION = gql34`
|
|
5521
|
+
query getGoogleImportedMarketsByRegion($region: String!) {
|
|
5522
|
+
googleImportedMarketsByRegion(region: $region) {
|
|
5523
|
+
...GoogleImportedMarketsFields
|
|
5524
|
+
}
|
|
5525
|
+
}
|
|
5526
|
+
${GOOGLE_IMPORTED_MARKETS_FIELDS_FRAGMENT}
|
|
5527
|
+
`;
|
|
5528
|
+
var SEARCH_GOOGLE_IMPORTED_MARKETS = gql34`
|
|
5529
|
+
query searchGoogleImportedMarkets($search: String!, $region: String) {
|
|
5530
|
+
googleImportedMarketsSearch(search: $search, region: $region) {
|
|
5531
|
+
...GoogleImportedMarketsFields
|
|
5532
|
+
}
|
|
5533
|
+
}
|
|
5534
|
+
${GOOGLE_IMPORTED_MARKETS_FIELDS_FRAGMENT}
|
|
5535
|
+
`;
|
|
5536
|
+
var GET_GOOGLE_IMPORTED_MARKETS_NEAR_ME = gql34`
|
|
5537
|
+
query getGoogleImportedMarketsNearMe(
|
|
5538
|
+
$latitude: Float!
|
|
5539
|
+
$longitude: Float!
|
|
5540
|
+
$radius: Int
|
|
5541
|
+
) {
|
|
5542
|
+
googleImportedMarketsNearMe(
|
|
5543
|
+
lat: $latitude
|
|
5544
|
+
lng: $longitude
|
|
5545
|
+
radius: $radius
|
|
5546
|
+
) {
|
|
5547
|
+
...GoogleImportedMarketsFields
|
|
5548
|
+
}
|
|
5549
|
+
}
|
|
5550
|
+
${GOOGLE_IMPORTED_MARKETS_FIELDS_FRAGMENT}
|
|
5551
|
+
`;
|
|
5520
5552
|
|
|
5521
5553
|
// src/graphql/hooks/appSettings/hooksMutation.ts
|
|
5522
5554
|
var useUpdateAppSettings = () => {
|
|
@@ -5550,6 +5582,38 @@ var useGetGoogleImportedMarkets = () => {
|
|
|
5550
5582
|
const googleImportedMarkets = data?.googleImportedMarkets || [];
|
|
5551
5583
|
return { error, googleImportedMarkets, loading, refetch };
|
|
5552
5584
|
};
|
|
5585
|
+
var useGetGoogleImportedMarketsByRegion = (region) => {
|
|
5586
|
+
const { loading, error, data, refetch } = useQuery13(GET_GOOGLE_IMPORTED_MARKETS_BY_REGION, {
|
|
5587
|
+
fetchPolicy: "network-only",
|
|
5588
|
+
skip: !region,
|
|
5589
|
+
variables: { region }
|
|
5590
|
+
});
|
|
5591
|
+
const googleImportedMarketsByRegion = data?.googleImportedMarketsByRegion || [];
|
|
5592
|
+
return { error, googleImportedMarketsByRegion, loading, refetch };
|
|
5593
|
+
};
|
|
5594
|
+
var useSearchGoogleImportedMarkets = (search, region) => {
|
|
5595
|
+
const { loading, error, data, refetch } = useQuery13(SEARCH_GOOGLE_IMPORTED_MARKETS, {
|
|
5596
|
+
fetchPolicy: "network-only",
|
|
5597
|
+
skip: search.length < 3,
|
|
5598
|
+
variables: { region, search }
|
|
5599
|
+
});
|
|
5600
|
+
const googleImportedMarketsSearch = data?.googleImportedMarketsSearch || [];
|
|
5601
|
+
return { error, googleImportedMarketsSearch, loading, refetch };
|
|
5602
|
+
};
|
|
5603
|
+
var useGetGoogleImportedMarketsNearMe = (latitude, longitude, radius) => {
|
|
5604
|
+
const { loading, error, data, refetch } = useQuery13(GET_GOOGLE_IMPORTED_MARKETS_NEAR_ME, {
|
|
5605
|
+
fetchPolicy: "network-only",
|
|
5606
|
+
skip: !latitude || !longitude,
|
|
5607
|
+
variables: {
|
|
5608
|
+
latitude,
|
|
5609
|
+
longitude,
|
|
5610
|
+
radius: radius || 1e4
|
|
5611
|
+
// Default to 10km if no radius is provided
|
|
5612
|
+
}
|
|
5613
|
+
});
|
|
5614
|
+
const googleImportedMarketsNearMe = data?.googleImportedMarketsNearMe || [];
|
|
5615
|
+
return { error, googleImportedMarketsNearMe, loading, refetch };
|
|
5616
|
+
};
|
|
5553
5617
|
|
|
5554
5618
|
// src/hooks/useLocationSearch.ts
|
|
5555
5619
|
var handleApiError = (error, message) => {
|
|
@@ -5559,13 +5623,31 @@ var useLocationSearch = (googleApi) => {
|
|
|
5559
5623
|
const getPredictions = async (text) => {
|
|
5560
5624
|
try {
|
|
5561
5625
|
const response = await fetch(
|
|
5562
|
-
|
|
5626
|
+
"https://places.googleapis.com/v1/places:autocomplete",
|
|
5627
|
+
{
|
|
5628
|
+
body: JSON.stringify({
|
|
5629
|
+
includedRegionCodes: ["nz"],
|
|
5630
|
+
input: text,
|
|
5631
|
+
languageCode: "en"
|
|
5632
|
+
}),
|
|
5633
|
+
headers: {
|
|
5634
|
+
"Content-Type": "application/json",
|
|
5635
|
+
"X-Goog-Api-Key": googleApi,
|
|
5636
|
+
"X-Goog-FieldMask": "suggestions.placePrediction.placeId,suggestions.placePrediction.text.text"
|
|
5637
|
+
},
|
|
5638
|
+
method: "POST"
|
|
5639
|
+
}
|
|
5563
5640
|
);
|
|
5564
5641
|
if (!response.ok) {
|
|
5565
5642
|
throw new Error(`HTTP error! Status: ${response.status}`);
|
|
5566
5643
|
}
|
|
5567
5644
|
const data = await response.json();
|
|
5568
|
-
|
|
5645
|
+
const suggestions = data.suggestions ?? [];
|
|
5646
|
+
const predictions = suggestions.map((suggestion) => suggestion.placePrediction).filter(Boolean).map((prediction) => ({
|
|
5647
|
+
description: prediction?.text?.text || "",
|
|
5648
|
+
place_id: prediction?.placeId || ""
|
|
5649
|
+
})).filter((prediction) => prediction.place_id && prediction.description);
|
|
5650
|
+
return predictions;
|
|
5569
5651
|
} catch (error) {
|
|
5570
5652
|
console.error("Error fetching predictions:", error);
|
|
5571
5653
|
handleApiError(error, "Failed to fetch address predictions.");
|
|
@@ -5574,42 +5656,47 @@ var useLocationSearch = (googleApi) => {
|
|
|
5574
5656
|
const getPlaceDetails = async (placeId) => {
|
|
5575
5657
|
try {
|
|
5576
5658
|
const response = await fetch(
|
|
5577
|
-
`https://
|
|
5659
|
+
`https://places.googleapis.com/v1/places/${placeId}`,
|
|
5660
|
+
{
|
|
5661
|
+
headers: {
|
|
5662
|
+
"X-Goog-Api-Key": googleApi,
|
|
5663
|
+
"X-Goog-FieldMask": "addressComponents,formattedAddress,location"
|
|
5664
|
+
}
|
|
5665
|
+
}
|
|
5578
5666
|
);
|
|
5579
5667
|
if (!response.ok) {
|
|
5580
5668
|
throw new Error(`HTTP error! Status: ${response.status}`);
|
|
5581
5669
|
}
|
|
5582
|
-
const
|
|
5583
|
-
const {
|
|
5584
|
-
const {
|
|
5585
|
-
const
|
|
5586
|
-
const address = address_components.reduce((acc, item) => {
|
|
5670
|
+
const result = await response.json();
|
|
5671
|
+
const { latitude, longitude } = result.location;
|
|
5672
|
+
const { addressComponents, formattedAddress } = result;
|
|
5673
|
+
const address = addressComponents.reduce((acc, item) => {
|
|
5587
5674
|
if (item.types.includes("street_number")) {
|
|
5588
|
-
return { ...acc, streetNumber: item.
|
|
5675
|
+
return { ...acc, streetNumber: item.longText };
|
|
5589
5676
|
}
|
|
5590
5677
|
if (item.types.includes("route")) {
|
|
5591
|
-
return { ...acc, streetName: item.
|
|
5678
|
+
return { ...acc, streetName: item.longText };
|
|
5592
5679
|
}
|
|
5593
5680
|
if (item.types.includes("locality")) {
|
|
5594
|
-
return { ...acc, city: item.
|
|
5681
|
+
return { ...acc, city: item.longText };
|
|
5595
5682
|
}
|
|
5596
5683
|
if (item.types.includes("administrative_area_level_1")) {
|
|
5597
|
-
return { ...acc, region: item.
|
|
5684
|
+
return { ...acc, region: item.longText };
|
|
5598
5685
|
}
|
|
5599
5686
|
if (item.types.includes("country")) {
|
|
5600
|
-
return { ...acc, country: item.
|
|
5687
|
+
return { ...acc, country: item.longText };
|
|
5601
5688
|
}
|
|
5602
5689
|
return acc;
|
|
5603
5690
|
}, {});
|
|
5604
5691
|
const newLocation = {
|
|
5605
|
-
city: address.city.toLowerCase(),
|
|
5606
|
-
coordinates: [
|
|
5692
|
+
city: address.city ? address.city.toLowerCase() : "",
|
|
5693
|
+
coordinates: [longitude, latitude],
|
|
5607
5694
|
// [longitude, latitude]
|
|
5608
5695
|
country: address.country,
|
|
5609
|
-
fullAddress:
|
|
5610
|
-
latitude
|
|
5611
|
-
longitude
|
|
5612
|
-
region: address.region.replace(/ Region$/, ""),
|
|
5696
|
+
fullAddress: formattedAddress,
|
|
5697
|
+
latitude,
|
|
5698
|
+
longitude,
|
|
5699
|
+
region: address.region ? address.region.replace(/ Region$/, "") : "",
|
|
5613
5700
|
// Remove " Region" suffix
|
|
5614
5701
|
type: "Point"
|
|
5615
5702
|
// Mongoose GeoJSON type
|
|
@@ -7647,6 +7734,8 @@ export {
|
|
|
7647
7734
|
useGetEventsByRegion,
|
|
7648
7735
|
useGetEventsNearMe,
|
|
7649
7736
|
useGetGoogleImportedMarkets,
|
|
7737
|
+
useGetGoogleImportedMarketsByRegion,
|
|
7738
|
+
useGetGoogleImportedMarketsNearMe,
|
|
7650
7739
|
useGetNotificationCount,
|
|
7651
7740
|
useGetNotificationCountSubscription,
|
|
7652
7741
|
useGetPartner,
|
|
@@ -7698,6 +7787,7 @@ export {
|
|
|
7698
7787
|
useResetPassword,
|
|
7699
7788
|
useResetPasswordForm,
|
|
7700
7789
|
useSearchEvents,
|
|
7790
|
+
useSearchGoogleImportedMarkets,
|
|
7701
7791
|
useSearchPartners,
|
|
7702
7792
|
useSearchVendors,
|
|
7703
7793
|
useSelectPackage,
|