@timardex/cluemart-shared 1.2.47 → 1.2.48

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.
Files changed (38) hide show
  1. package/dist/{ad-BWRIcE3i.d.mts → ad-BkTdN8xM.d.mts} +17 -2
  2. package/dist/{ad-WPUxx9MQ.d.ts → ad-STgnIJ8B.d.ts} +17 -2
  3. package/dist/{chunk-TGZY4O6C.mjs → chunk-HL4SAT7R.mjs} +14 -6
  4. package/dist/chunk-HL4SAT7R.mjs.map +1 -0
  5. package/dist/{chunk-7WFI7PUD.mjs → chunk-KZ2VLPYF.mjs} +2 -2
  6. package/dist/enums/index.cjs +13 -4
  7. package/dist/enums/index.cjs.map +1 -1
  8. package/dist/enums/index.d.mts +12 -6
  9. package/dist/enums/index.d.ts +12 -6
  10. package/dist/enums/index.mjs +3 -1
  11. package/dist/formFields/index.cjs +4 -4
  12. package/dist/formFields/index.cjs.map +1 -1
  13. package/dist/formFields/index.mjs +2 -2
  14. package/dist/graphql/index.cjs +84 -0
  15. package/dist/graphql/index.cjs.map +1 -1
  16. package/dist/graphql/index.d.mts +25 -2
  17. package/dist/graphql/index.d.ts +25 -2
  18. package/dist/graphql/index.mjs +81 -1
  19. package/dist/graphql/index.mjs.map +1 -1
  20. package/dist/hooks/index.cjs +4 -4
  21. package/dist/hooks/index.cjs.map +1 -1
  22. package/dist/hooks/index.d.mts +1 -1
  23. package/dist/hooks/index.d.ts +1 -1
  24. package/dist/hooks/index.mjs +2 -2
  25. package/dist/index.cjs +97 -4
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.d.mts +50 -6
  28. package/dist/index.d.ts +50 -6
  29. package/dist/index.mjs +92 -4
  30. package/dist/index.mjs.map +1 -1
  31. package/dist/types/index.d.mts +1 -1
  32. package/dist/types/index.d.ts +1 -1
  33. package/dist/utils/index.cjs +4 -4
  34. package/dist/utils/index.cjs.map +1 -1
  35. package/dist/utils/index.mjs +2 -2
  36. package/package.json +1 -1
  37. package/dist/chunk-TGZY4O6C.mjs.map +0 -1
  38. /package/dist/{chunk-7WFI7PUD.mjs.map → chunk-KZ2VLPYF.mjs.map} +0 -0
package/dist/index.d.mts CHANGED
@@ -113,16 +113,16 @@ declare enum EnumNotificationType {
113
113
  declare enum EnumRegions {
114
114
  Auckland = "Auckland",
115
115
  BayOfPlentyGisborne = "Bay of Plenty & Gisborne",
116
- Canterbury = "Canterbury",
116
+ CanterburyWestCoast = "Canterbury & West Coast",
117
117
  HawkesBay = "Hawke's Bay",
118
118
  ManawatuWanganui = "Manawatu-Wanganui",
119
- MarlboroughNelson = "Marlborough & Nelson",
119
+ MarlboroughNelsonTasman = "Marlborough & Nelson & Tasman",
120
120
  Northland = "Northland",
121
- SouthlandOtago = "Southland & Otago",
121
+ Otago = "Otago",
122
+ Southland = "Southland",
122
123
  Taranaki = "Taranaki",
123
124
  Waikato = "Waikato",
124
- Wellington = "Wellington",
125
- TasmanWestCoast = "Tasman & West Coast"
125
+ Wellington = "Wellington"
126
126
  }
127
127
  declare enum ImageTypeEnum {
128
128
  AVATAR = "avatar",
@@ -166,6 +166,12 @@ declare enum EnumEventDateStatus {
166
166
  RE_SCHEDULED = "Rescheduled",
167
167
  CANCELED = "Canceled"
168
168
  }
169
+ declare enum EnumSubscriptionStatus {
170
+ ACTIVE = "active",
171
+ INACTIVE = "inactive",
172
+ CANCELLED = "cancelled",
173
+ NO_SUBSCRIPTION = "no_subscription"
174
+ }
169
175
 
170
176
  type StallType = {
171
177
  label: string;
@@ -669,6 +675,20 @@ type UserActivityEvent = {
669
675
  startDate: string;
670
676
  startTime: string;
671
677
  };
678
+ type StripeSubscription = {
679
+ customerId?: string;
680
+ subscriptionId?: string;
681
+ status?: EnumSubscriptionStatus;
682
+ currentPlan?: EnumUserLicence;
683
+ startDate?: string;
684
+ endDate?: string;
685
+ };
686
+ type SubscriptionStatusData = {
687
+ subscriptionId: string | null;
688
+ status: EnumSubscriptionStatus;
689
+ priceId: string | null;
690
+ currentPlan: EnumUserLicence | null;
691
+ };
672
692
  type UserActivity = {
673
693
  favourites: {
674
694
  events: string[];
@@ -706,6 +726,7 @@ interface UserType {
706
726
  updatedAt: string;
707
727
  userActivity: UserActivity | null;
708
728
  vendor: string | null;
729
+ stripe?: StripeSubscription;
709
730
  }
710
731
 
711
732
  declare enum EnumAdShowOn {
@@ -1364,6 +1385,29 @@ declare const useGetResourceActivities: (resourceId: string, resourceType: EnumR
1364
1385
  resourceActivities: ResourceActivityType[];
1365
1386
  };
1366
1387
 
1388
+ declare const useCreateCheckoutSession: () => {
1389
+ createCheckoutSession: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
1390
+ error: _apollo_client.ApolloError | undefined;
1391
+ loading: boolean;
1392
+ };
1393
+ declare const useCancelSubscription: () => {
1394
+ cancelSubscription: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
1395
+ error: _apollo_client.ApolloError | undefined;
1396
+ loading: boolean;
1397
+ };
1398
+ declare const useUpdateSubscriptionPlan: () => {
1399
+ error: _apollo_client.ApolloError | undefined;
1400
+ loading: boolean;
1401
+ updateSubscriptionPlan: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
1402
+ };
1403
+
1404
+ declare const useGetSubscriptionStatus: () => {
1405
+ data: SubscriptionStatusData | undefined;
1406
+ error: _apollo_client.ApolloError | undefined;
1407
+ loading: boolean;
1408
+ refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<any>>;
1409
+ };
1410
+
1367
1411
  interface PlacePrediction {
1368
1412
  place_id: string;
1369
1413
  description: string;
@@ -1548,4 +1592,4 @@ declare const availableRegionOptions: OptionItem[];
1548
1592
  declare const paymentMethodOptions: OptionItem[];
1549
1593
  declare function normalizeUrl(url: string): string;
1550
1594
 
1551
- export { type AdFormData, type AdType, type AdminUpdateResourceType, type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatMessageInput, type ChatMessageType, type ChatType, type ContactUsFormData, type CreateAdFormData, type CreateBulkNotificationInput, type CreateContactUsFormData, type CreateEventFormData, type CreateEventInfoFormData, type CreateFormData, type CreateLoginFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateTestersFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type CreateVendorFormData, type CreateVendorInfoFormData, type DateTimeType, type DateTimeWithPriceType, type DeviceInfo, EnumActivity, EnumAdShowOn, EnumAdStatus, EnumAdStyle, EnumAdType, EnumChatType, EnumEventDateStatus, EnumEventType, EnumFoodFlavor, EnumFoodType, EnumInviteStatus, EnumNotificationResourceType, EnumNotificationType, EnumOSPlatform, EnumPaymentMethod, EnumRegions, EnumRelationResource, EnumResourceType, EnumSocialMedia, EnumUserLicence, EnumUserRole, EnumVendorType, type EventFormData, type EventInfoFormData, type EventInfoType, type EventType, type FormDateField, type FormField, type GeocodeLocation, type ImageObjectType, ImageTypeEnum, type LocationType, type LoginFormData, type MapMultiLocation, type NotificationCount, type NotificationDataType, type NotificationType, type Nullable, type OptionItem, type OwnerType, type ParticipantType, type PartnerType, type PaymentInfoType, type PlacePrediction, 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 Subcategory, type SubcategoryItems, type TermsAgreement, type TesterType, type TestersFormData, USER_STORAGE_KEY, type UserActivity, type UserActivityEvent, type UserFormData, type UserType, type ValidateVerificationTokenFormData, type VendorAttributes, type VendorFormData, type VendorInfoFormData, type VendorInfoType, type VendorLocation, type VendorMenuType, type VendorType, availableCategories, availableCityOptions, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, companyContactFields, contactUsFields, darkColors, dateFormat, defaultEventFormValues, defaultEventInfoFormValues, defaultRegion, defaultVendorFormValues, defaultVendorInfoFormValues, emailField, eventBasicInfoFields, eventEndDateFields, eventInfo, eventInfoPaymentInfo, eventStartDateFields, fonts, foodFlavourOptions, formatDate, formatTimestamp, getCurrentAndFutureDates, globalDefaultValues, isFutureDatesBeforeThreshold, lightColors, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, normalizeUrl, packagingOptions, paymentMethodOptions, producedIngOptions, productLabelGroups, profileFields, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, socialMediaFields, sortDatesChronologically, stallTypeOptions, statusOptions, tagOptions, testersFields, timeFormat, truncateText, useAdForm, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminUpdateResourceType, useContactUs, useContactUsForm, useCreateAd, useCreateBulkNotifications, useCreateEvent, useCreateEventInfo, useCreatePoster, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateTester, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeleteRelation, useDeleteTester, useDeleteUser, useDeleteVendor, useEventForm, useEventInfoForm, useGetAd, useGetAds, useGetAdsByRegion, useGetChat, useGetChatSubscription, useGetEvent, useGetEventInfo, useGetEventRelations, useGetEvents, useGetEventsByRegion, useGetEventsNearMe, useGetNotificationCount, useGetNotificationCountSubscription, useGetRelation, useGetRelationByEventAndVendor, useGetResourceActivities, useGetResourceConnections, useGetTester, useGetTesters, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLocationSearch, useLogin, useLoginForm, useLogout, useMarkAllNotificationsRead, useMarkNotificationRead, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchEvents, useSearchVendors, useSelectPackage, useSendChatMessage, useTestersForm, useUpdateAd, useUpdateEvent, useUpdateEventInfo, useUpdateRelation, useUpdateTester, 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 };
1595
+ export { type AdFormData, type AdType, type AdminUpdateResourceType, type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatMessageInput, type ChatMessageType, type ChatType, type ContactUsFormData, type CreateAdFormData, type CreateBulkNotificationInput, type CreateContactUsFormData, type CreateEventFormData, type CreateEventInfoFormData, type CreateFormData, type CreateLoginFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateTestersFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type CreateVendorFormData, type CreateVendorInfoFormData, type DateTimeType, type DateTimeWithPriceType, type DeviceInfo, EnumActivity, EnumAdShowOn, EnumAdStatus, EnumAdStyle, EnumAdType, EnumChatType, EnumEventDateStatus, EnumEventType, EnumFoodFlavor, EnumFoodType, EnumInviteStatus, EnumNotificationResourceType, EnumNotificationType, EnumOSPlatform, EnumPaymentMethod, EnumRegions, EnumRelationResource, EnumResourceType, EnumSocialMedia, EnumSubscriptionStatus, EnumUserLicence, EnumUserRole, EnumVendorType, type EventFormData, type EventInfoFormData, type EventInfoType, type EventType, type FormDateField, type FormField, type GeocodeLocation, type ImageObjectType, ImageTypeEnum, type LocationType, type LoginFormData, type MapMultiLocation, type NotificationCount, type NotificationDataType, type NotificationType, type Nullable, type OptionItem, type OwnerType, type ParticipantType, type PartnerType, type PaymentInfoType, type PlacePrediction, 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 TesterType, type TestersFormData, USER_STORAGE_KEY, type UserActivity, type UserActivityEvent, type UserFormData, type UserType, type ValidateVerificationTokenFormData, type VendorAttributes, type VendorFormData, type VendorInfoFormData, type VendorInfoType, type VendorLocation, type VendorMenuType, type VendorType, availableCategories, availableCityOptions, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, companyContactFields, contactUsFields, darkColors, dateFormat, defaultEventFormValues, defaultEventInfoFormValues, defaultRegion, defaultVendorFormValues, defaultVendorInfoFormValues, emailField, eventBasicInfoFields, eventEndDateFields, eventInfo, eventInfoPaymentInfo, eventStartDateFields, fonts, foodFlavourOptions, formatDate, formatTimestamp, getCurrentAndFutureDates, globalDefaultValues, isFutureDatesBeforeThreshold, lightColors, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, normalizeUrl, packagingOptions, paymentMethodOptions, producedIngOptions, productLabelGroups, profileFields, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, socialMediaFields, sortDatesChronologically, stallTypeOptions, statusOptions, tagOptions, testersFields, timeFormat, truncateText, useAdForm, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminUpdateResourceType, useCancelSubscription, useContactUs, useContactUsForm, useCreateAd, useCreateBulkNotifications, useCreateCheckoutSession, useCreateEvent, useCreateEventInfo, useCreatePoster, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateTester, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeleteRelation, useDeleteTester, useDeleteUser, useDeleteVendor, useEventForm, useEventInfoForm, useGetAd, useGetAds, useGetAdsByRegion, useGetChat, useGetChatSubscription, useGetEvent, useGetEventInfo, useGetEventRelations, useGetEvents, useGetEventsByRegion, useGetEventsNearMe, useGetNotificationCount, useGetNotificationCountSubscription, useGetRelation, useGetRelationByEventAndVendor, useGetResourceActivities, useGetResourceConnections, useGetSubscriptionStatus, useGetTester, useGetTesters, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLocationSearch, useLogin, useLoginForm, useLogout, useMarkAllNotificationsRead, useMarkNotificationRead, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchEvents, useSearchVendors, useSelectPackage, useSendChatMessage, useTestersForm, useUpdateAd, useUpdateEvent, useUpdateEventInfo, useUpdateRelation, useUpdateSubscriptionPlan, useUpdateTester, 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
@@ -113,16 +113,16 @@ declare enum EnumNotificationType {
113
113
  declare enum EnumRegions {
114
114
  Auckland = "Auckland",
115
115
  BayOfPlentyGisborne = "Bay of Plenty & Gisborne",
116
- Canterbury = "Canterbury",
116
+ CanterburyWestCoast = "Canterbury & West Coast",
117
117
  HawkesBay = "Hawke's Bay",
118
118
  ManawatuWanganui = "Manawatu-Wanganui",
119
- MarlboroughNelson = "Marlborough & Nelson",
119
+ MarlboroughNelsonTasman = "Marlborough & Nelson & Tasman",
120
120
  Northland = "Northland",
121
- SouthlandOtago = "Southland & Otago",
121
+ Otago = "Otago",
122
+ Southland = "Southland",
122
123
  Taranaki = "Taranaki",
123
124
  Waikato = "Waikato",
124
- Wellington = "Wellington",
125
- TasmanWestCoast = "Tasman & West Coast"
125
+ Wellington = "Wellington"
126
126
  }
127
127
  declare enum ImageTypeEnum {
128
128
  AVATAR = "avatar",
@@ -166,6 +166,12 @@ declare enum EnumEventDateStatus {
166
166
  RE_SCHEDULED = "Rescheduled",
167
167
  CANCELED = "Canceled"
168
168
  }
169
+ declare enum EnumSubscriptionStatus {
170
+ ACTIVE = "active",
171
+ INACTIVE = "inactive",
172
+ CANCELLED = "cancelled",
173
+ NO_SUBSCRIPTION = "no_subscription"
174
+ }
169
175
 
170
176
  type StallType = {
171
177
  label: string;
@@ -669,6 +675,20 @@ type UserActivityEvent = {
669
675
  startDate: string;
670
676
  startTime: string;
671
677
  };
678
+ type StripeSubscription = {
679
+ customerId?: string;
680
+ subscriptionId?: string;
681
+ status?: EnumSubscriptionStatus;
682
+ currentPlan?: EnumUserLicence;
683
+ startDate?: string;
684
+ endDate?: string;
685
+ };
686
+ type SubscriptionStatusData = {
687
+ subscriptionId: string | null;
688
+ status: EnumSubscriptionStatus;
689
+ priceId: string | null;
690
+ currentPlan: EnumUserLicence | null;
691
+ };
672
692
  type UserActivity = {
673
693
  favourites: {
674
694
  events: string[];
@@ -706,6 +726,7 @@ interface UserType {
706
726
  updatedAt: string;
707
727
  userActivity: UserActivity | null;
708
728
  vendor: string | null;
729
+ stripe?: StripeSubscription;
709
730
  }
710
731
 
711
732
  declare enum EnumAdShowOn {
@@ -1364,6 +1385,29 @@ declare const useGetResourceActivities: (resourceId: string, resourceType: EnumR
1364
1385
  resourceActivities: ResourceActivityType[];
1365
1386
  };
1366
1387
 
1388
+ declare const useCreateCheckoutSession: () => {
1389
+ createCheckoutSession: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
1390
+ error: _apollo_client.ApolloError | undefined;
1391
+ loading: boolean;
1392
+ };
1393
+ declare const useCancelSubscription: () => {
1394
+ cancelSubscription: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
1395
+ error: _apollo_client.ApolloError | undefined;
1396
+ loading: boolean;
1397
+ };
1398
+ declare const useUpdateSubscriptionPlan: () => {
1399
+ error: _apollo_client.ApolloError | undefined;
1400
+ loading: boolean;
1401
+ updateSubscriptionPlan: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
1402
+ };
1403
+
1404
+ declare const useGetSubscriptionStatus: () => {
1405
+ data: SubscriptionStatusData | undefined;
1406
+ error: _apollo_client.ApolloError | undefined;
1407
+ loading: boolean;
1408
+ refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<any>>;
1409
+ };
1410
+
1367
1411
  interface PlacePrediction {
1368
1412
  place_id: string;
1369
1413
  description: string;
@@ -1548,4 +1592,4 @@ declare const availableRegionOptions: OptionItem[];
1548
1592
  declare const paymentMethodOptions: OptionItem[];
1549
1593
  declare function normalizeUrl(url: string): string;
1550
1594
 
1551
- export { type AdFormData, type AdType, type AdminUpdateResourceType, type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatMessageInput, type ChatMessageType, type ChatType, type ContactUsFormData, type CreateAdFormData, type CreateBulkNotificationInput, type CreateContactUsFormData, type CreateEventFormData, type CreateEventInfoFormData, type CreateFormData, type CreateLoginFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateTestersFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type CreateVendorFormData, type CreateVendorInfoFormData, type DateTimeType, type DateTimeWithPriceType, type DeviceInfo, EnumActivity, EnumAdShowOn, EnumAdStatus, EnumAdStyle, EnumAdType, EnumChatType, EnumEventDateStatus, EnumEventType, EnumFoodFlavor, EnumFoodType, EnumInviteStatus, EnumNotificationResourceType, EnumNotificationType, EnumOSPlatform, EnumPaymentMethod, EnumRegions, EnumRelationResource, EnumResourceType, EnumSocialMedia, EnumUserLicence, EnumUserRole, EnumVendorType, type EventFormData, type EventInfoFormData, type EventInfoType, type EventType, type FormDateField, type FormField, type GeocodeLocation, type ImageObjectType, ImageTypeEnum, type LocationType, type LoginFormData, type MapMultiLocation, type NotificationCount, type NotificationDataType, type NotificationType, type Nullable, type OptionItem, type OwnerType, type ParticipantType, type PartnerType, type PaymentInfoType, type PlacePrediction, 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 Subcategory, type SubcategoryItems, type TermsAgreement, type TesterType, type TestersFormData, USER_STORAGE_KEY, type UserActivity, type UserActivityEvent, type UserFormData, type UserType, type ValidateVerificationTokenFormData, type VendorAttributes, type VendorFormData, type VendorInfoFormData, type VendorInfoType, type VendorLocation, type VendorMenuType, type VendorType, availableCategories, availableCityOptions, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, companyContactFields, contactUsFields, darkColors, dateFormat, defaultEventFormValues, defaultEventInfoFormValues, defaultRegion, defaultVendorFormValues, defaultVendorInfoFormValues, emailField, eventBasicInfoFields, eventEndDateFields, eventInfo, eventInfoPaymentInfo, eventStartDateFields, fonts, foodFlavourOptions, formatDate, formatTimestamp, getCurrentAndFutureDates, globalDefaultValues, isFutureDatesBeforeThreshold, lightColors, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, normalizeUrl, packagingOptions, paymentMethodOptions, producedIngOptions, productLabelGroups, profileFields, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, socialMediaFields, sortDatesChronologically, stallTypeOptions, statusOptions, tagOptions, testersFields, timeFormat, truncateText, useAdForm, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminUpdateResourceType, useContactUs, useContactUsForm, useCreateAd, useCreateBulkNotifications, useCreateEvent, useCreateEventInfo, useCreatePoster, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateTester, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeleteRelation, useDeleteTester, useDeleteUser, useDeleteVendor, useEventForm, useEventInfoForm, useGetAd, useGetAds, useGetAdsByRegion, useGetChat, useGetChatSubscription, useGetEvent, useGetEventInfo, useGetEventRelations, useGetEvents, useGetEventsByRegion, useGetEventsNearMe, useGetNotificationCount, useGetNotificationCountSubscription, useGetRelation, useGetRelationByEventAndVendor, useGetResourceActivities, useGetResourceConnections, useGetTester, useGetTesters, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLocationSearch, useLogin, useLoginForm, useLogout, useMarkAllNotificationsRead, useMarkNotificationRead, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchEvents, useSearchVendors, useSelectPackage, useSendChatMessage, useTestersForm, useUpdateAd, useUpdateEvent, useUpdateEventInfo, useUpdateRelation, useUpdateTester, 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 };
1595
+ export { type AdFormData, type AdType, type AdminUpdateResourceType, type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatMessageInput, type ChatMessageType, type ChatType, type ContactUsFormData, type CreateAdFormData, type CreateBulkNotificationInput, type CreateContactUsFormData, type CreateEventFormData, type CreateEventInfoFormData, type CreateFormData, type CreateLoginFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateTestersFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type CreateVendorFormData, type CreateVendorInfoFormData, type DateTimeType, type DateTimeWithPriceType, type DeviceInfo, EnumActivity, EnumAdShowOn, EnumAdStatus, EnumAdStyle, EnumAdType, EnumChatType, EnumEventDateStatus, EnumEventType, EnumFoodFlavor, EnumFoodType, EnumInviteStatus, EnumNotificationResourceType, EnumNotificationType, EnumOSPlatform, EnumPaymentMethod, EnumRegions, EnumRelationResource, EnumResourceType, EnumSocialMedia, EnumSubscriptionStatus, EnumUserLicence, EnumUserRole, EnumVendorType, type EventFormData, type EventInfoFormData, type EventInfoType, type EventType, type FormDateField, type FormField, type GeocodeLocation, type ImageObjectType, ImageTypeEnum, type LocationType, type LoginFormData, type MapMultiLocation, type NotificationCount, type NotificationDataType, type NotificationType, type Nullable, type OptionItem, type OwnerType, type ParticipantType, type PartnerType, type PaymentInfoType, type PlacePrediction, 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 TesterType, type TestersFormData, USER_STORAGE_KEY, type UserActivity, type UserActivityEvent, type UserFormData, type UserType, type ValidateVerificationTokenFormData, type VendorAttributes, type VendorFormData, type VendorInfoFormData, type VendorInfoType, type VendorLocation, type VendorMenuType, type VendorType, availableCategories, availableCityOptions, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, companyContactFields, contactUsFields, darkColors, dateFormat, defaultEventFormValues, defaultEventInfoFormValues, defaultRegion, defaultVendorFormValues, defaultVendorInfoFormValues, emailField, eventBasicInfoFields, eventEndDateFields, eventInfo, eventInfoPaymentInfo, eventStartDateFields, fonts, foodFlavourOptions, formatDate, formatTimestamp, getCurrentAndFutureDates, globalDefaultValues, isFutureDatesBeforeThreshold, lightColors, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, normalizeUrl, packagingOptions, paymentMethodOptions, producedIngOptions, productLabelGroups, profileFields, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, socialMediaFields, sortDatesChronologically, stallTypeOptions, statusOptions, tagOptions, testersFields, timeFormat, truncateText, useAdForm, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminUpdateResourceType, useCancelSubscription, useContactUs, useContactUsForm, useCreateAd, useCreateBulkNotifications, useCreateCheckoutSession, useCreateEvent, useCreateEventInfo, useCreatePoster, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateTester, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeleteRelation, useDeleteTester, useDeleteUser, useDeleteVendor, useEventForm, useEventInfoForm, useGetAd, useGetAds, useGetAdsByRegion, useGetChat, useGetChatSubscription, useGetEvent, useGetEventInfo, useGetEventRelations, useGetEvents, useGetEventsByRegion, useGetEventsNearMe, useGetNotificationCount, useGetNotificationCountSubscription, useGetRelation, useGetRelationByEventAndVendor, useGetResourceActivities, useGetResourceConnections, useGetSubscriptionStatus, useGetTester, useGetTesters, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLocationSearch, useLogin, useLoginForm, useLogout, useMarkAllNotificationsRead, useMarkNotificationRead, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchEvents, useSearchVendors, useSelectPackage, useSendChatMessage, useTestersForm, useUpdateAd, useUpdateEvent, useUpdateEventInfo, useUpdateRelation, useUpdateSubscriptionPlan, useUpdateTester, 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
@@ -123,16 +123,16 @@ var EnumNotificationType = /* @__PURE__ */ ((EnumNotificationType2) => {
123
123
  var EnumRegions = /* @__PURE__ */ ((EnumRegions2) => {
124
124
  EnumRegions2["Auckland"] = "Auckland";
125
125
  EnumRegions2["BayOfPlentyGisborne"] = "Bay of Plenty & Gisborne";
126
- EnumRegions2["Canterbury"] = "Canterbury";
126
+ EnumRegions2["CanterburyWestCoast"] = "Canterbury & West Coast";
127
127
  EnumRegions2["HawkesBay"] = "Hawke's Bay";
128
128
  EnumRegions2["ManawatuWanganui"] = "Manawatu-Wanganui";
129
- EnumRegions2["MarlboroughNelson"] = "Marlborough & Nelson";
129
+ EnumRegions2["MarlboroughNelsonTasman"] = "Marlborough & Nelson & Tasman";
130
130
  EnumRegions2["Northland"] = "Northland";
131
- EnumRegions2["SouthlandOtago"] = "Southland & Otago";
131
+ EnumRegions2["Otago"] = "Otago";
132
+ EnumRegions2["Southland"] = "Southland";
132
133
  EnumRegions2["Taranaki"] = "Taranaki";
133
134
  EnumRegions2["Waikato"] = "Waikato";
134
135
  EnumRegions2["Wellington"] = "Wellington";
135
- EnumRegions2["TasmanWestCoast"] = "Tasman & West Coast";
136
136
  return EnumRegions2;
137
137
  })(EnumRegions || {});
138
138
  var ImageTypeEnum = /* @__PURE__ */ ((ImageTypeEnum2) => {
@@ -182,6 +182,13 @@ var EnumEventDateStatus = /* @__PURE__ */ ((EnumEventDateStatus2) => {
182
182
  EnumEventDateStatus2["CANCELED"] = "Canceled";
183
183
  return EnumEventDateStatus2;
184
184
  })(EnumEventDateStatus || {});
185
+ var EnumSubscriptionStatus = /* @__PURE__ */ ((EnumSubscriptionStatus2) => {
186
+ EnumSubscriptionStatus2["ACTIVE"] = "active";
187
+ EnumSubscriptionStatus2["INACTIVE"] = "inactive";
188
+ EnumSubscriptionStatus2["CANCELLED"] = "cancelled";
189
+ EnumSubscriptionStatus2["NO_SUBSCRIPTION"] = "no_subscription";
190
+ return EnumSubscriptionStatus2;
191
+ })(EnumSubscriptionStatus || {});
185
192
 
186
193
  // src/utils/index.ts
187
194
  import dayjs from "dayjs";
@@ -4523,6 +4530,82 @@ var useGetResourceActivities = (resourceId, resourceType) => {
4523
4530
  };
4524
4531
  };
4525
4532
 
4533
+ // src/graphql/hooks/stripe/hooksMutation.ts
4534
+ import { useMutation as useMutation15 } from "@apollo/client";
4535
+
4536
+ // src/graphql/mutations/stripe.ts
4537
+ import { gql as gql27 } from "@apollo/client";
4538
+ var CREATE_CHECKOUT_SESSION_MUTATION = gql27`
4539
+ mutation createCheckoutSession($planId: LicencesEnumType!) {
4540
+ createCheckoutSession(planId: $planId) {
4541
+ sessionId
4542
+ checkoutUrl
4543
+ }
4544
+ }
4545
+ `;
4546
+ var CANCEL_SUBSCRIPTION_MUTATION = gql27`
4547
+ mutation cancelSubscription {
4548
+ cancelSubscription
4549
+ }
4550
+ `;
4551
+ var UPDATE_SUBSCRIPTION_PLAN_MUTATION = gql27`
4552
+ mutation updateSubscriptionPlan($newPlanId: LicencesEnumType!) {
4553
+ updateSubscriptionPlan(newPlanId: $newPlanId) {
4554
+ subscriptionId
4555
+ status
4556
+ priceId
4557
+ currentPlan
4558
+ }
4559
+ }
4560
+ `;
4561
+
4562
+ // src/graphql/hooks/stripe/hooksMutation.ts
4563
+ var useCreateCheckoutSession = () => {
4564
+ const [createCheckoutSession, { loading, error }] = useMutation15(
4565
+ CREATE_CHECKOUT_SESSION_MUTATION
4566
+ );
4567
+ return { createCheckoutSession, error, loading };
4568
+ };
4569
+ var useCancelSubscription = () => {
4570
+ const [cancelSubscription, { loading, error }] = useMutation15(
4571
+ CANCEL_SUBSCRIPTION_MUTATION
4572
+ );
4573
+ return { cancelSubscription, error, loading };
4574
+ };
4575
+ var useUpdateSubscriptionPlan = () => {
4576
+ const [updateSubscriptionPlan, { loading, error }] = useMutation15(
4577
+ UPDATE_SUBSCRIPTION_PLAN_MUTATION
4578
+ );
4579
+ return { error, loading, updateSubscriptionPlan };
4580
+ };
4581
+
4582
+ // src/graphql/hooks/stripe/hooksQuery.ts
4583
+ import { useQuery as useQuery10 } from "@apollo/client";
4584
+
4585
+ // src/graphql/queries/stripe.ts
4586
+ import { gql as gql28 } from "@apollo/client";
4587
+ var GET_SUBSCRIPTION_STATUS = gql28`
4588
+ query getSubscriptionStatus {
4589
+ getSubscriptionStatus {
4590
+ subscriptionId
4591
+ status
4592
+ priceId
4593
+ currentPlan
4594
+ }
4595
+ }
4596
+ `;
4597
+
4598
+ // src/graphql/hooks/stripe/hooksQuery.ts
4599
+ var useGetSubscriptionStatus = () => {
4600
+ const { data, loading, error, refetch } = useQuery10(GET_SUBSCRIPTION_STATUS);
4601
+ return {
4602
+ data: data?.getSubscriptionStatus,
4603
+ error,
4604
+ loading,
4605
+ refetch
4606
+ };
4607
+ };
4608
+
4526
4609
  // src/hooks/useLocationSearch.ts
4527
4610
  var handleApiError = (error, message) => {
4528
4611
  console.error(message, error);
@@ -6068,6 +6151,7 @@ export {
6068
6151
  EnumRelationResource,
6069
6152
  EnumResourceType,
6070
6153
  EnumSocialMedia,
6154
+ EnumSubscriptionStatus,
6071
6155
  EnumUserLicence,
6072
6156
  EnumUserRole,
6073
6157
  EnumVendorType,
@@ -6136,10 +6220,12 @@ export {
6136
6220
  useAddUserInterestResource,
6137
6221
  useAddUserPresentResource,
6138
6222
  useAdminUpdateResourceType,
6223
+ useCancelSubscription,
6139
6224
  useContactUs,
6140
6225
  useContactUsForm,
6141
6226
  useCreateAd,
6142
6227
  useCreateBulkNotifications,
6228
+ useCreateCheckoutSession,
6143
6229
  useCreateEvent,
6144
6230
  useCreateEventInfo,
6145
6231
  useCreatePoster,
@@ -6178,6 +6264,7 @@ export {
6178
6264
  useGetRelationByEventAndVendor,
6179
6265
  useGetResourceActivities,
6180
6266
  useGetResourceConnections,
6267
+ useGetSubscriptionStatus,
6181
6268
  useGetTester,
6182
6269
  useGetTesters,
6183
6270
  useGetUser,
@@ -6220,6 +6307,7 @@ export {
6220
6307
  useUpdateEvent,
6221
6308
  useUpdateEventInfo,
6222
6309
  useUpdateRelation,
6310
+ useUpdateSubscriptionPlan,
6223
6311
  useUpdateTester,
6224
6312
  useUpdateUser,
6225
6313
  useUpdateVendor,