@timardex/cluemart-shared 1.2.47 → 1.2.49

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-WPUxx9MQ.d.ts → ad-BBJMdfCl.d.ts} +18 -2
  2. package/dist/{ad-BWRIcE3i.d.mts → ad-DPP5n_ZS.d.mts} +18 -2
  3. package/dist/{chunk-7WFI7PUD.mjs → chunk-HFYQRL77.mjs} +2 -2
  4. package/dist/{chunk-TGZY4O6C.mjs → chunk-WNRV4DSZ.mjs} +15 -6
  5. package/dist/{chunk-TGZY4O6C.mjs.map → chunk-WNRV4DSZ.mjs.map} +1 -1
  6. package/dist/enums/index.cjs +14 -4
  7. package/dist/enums/index.cjs.map +1 -1
  8. package/dist/enums/index.d.mts +13 -6
  9. package/dist/enums/index.d.ts +13 -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 +86 -2
  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 +83 -3
  19. package/dist/graphql/index.mjs.map +1 -1
  20. package/dist/hooks/index.cjs +9 -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 +7 -2
  25. package/dist/hooks/index.mjs.map +1 -1
  26. package/dist/index.cjs +105 -6
  27. package/dist/index.cjs.map +1 -1
  28. package/dist/index.d.mts +52 -6
  29. package/dist/index.d.ts +52 -6
  30. package/dist/index.mjs +100 -6
  31. package/dist/index.mjs.map +1 -1
  32. package/dist/types/index.d.mts +1 -1
  33. package/dist/types/index.d.ts +1 -1
  34. package/dist/utils/index.cjs +4 -4
  35. package/dist/utils/index.cjs.map +1 -1
  36. package/dist/utils/index.mjs +2 -2
  37. package/package.json +1 -1
  38. /package/dist/{chunk-7WFI7PUD.mjs.map → chunk-HFYQRL77.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,13 @@ 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
+ PAST_DUE = "past_due"
175
+ }
169
176
 
170
177
  type StallType = {
171
178
  label: string;
@@ -655,6 +662,7 @@ type UserFormData = {
655
662
  confirmPassword?: string | null;
656
663
  email: string;
657
664
  firstName: string;
665
+ isTester: boolean;
658
666
  lastName: string;
659
667
  password?: string | null;
660
668
  platform?: EnumOSPlatform;
@@ -669,6 +677,20 @@ type UserActivityEvent = {
669
677
  startDate: string;
670
678
  startTime: string;
671
679
  };
680
+ type StripeSubscription = {
681
+ customerId?: string;
682
+ subscriptionId?: string;
683
+ status?: EnumSubscriptionStatus;
684
+ currentPlan?: EnumUserLicence;
685
+ startDate?: string;
686
+ endDate?: string;
687
+ };
688
+ type SubscriptionStatusData = {
689
+ subscriptionId: string | null;
690
+ status: EnumSubscriptionStatus;
691
+ priceId: string | null;
692
+ currentPlan: EnumUserLicence | null;
693
+ };
672
694
  type UserActivity = {
673
695
  favourites: {
674
696
  events: string[];
@@ -706,6 +728,7 @@ interface UserType {
706
728
  updatedAt: string;
707
729
  userActivity: UserActivity | null;
708
730
  vendor: string | null;
731
+ stripe?: StripeSubscription;
709
732
  }
710
733
 
711
734
  declare enum EnumAdShowOn {
@@ -1364,6 +1387,29 @@ declare const useGetResourceActivities: (resourceId: string, resourceType: EnumR
1364
1387
  resourceActivities: ResourceActivityType[];
1365
1388
  };
1366
1389
 
1390
+ declare const useCreateCheckoutSession: () => {
1391
+ createCheckoutSession: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
1392
+ error: _apollo_client.ApolloError | undefined;
1393
+ loading: boolean;
1394
+ };
1395
+ declare const useCancelSubscription: () => {
1396
+ cancelSubscription: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
1397
+ error: _apollo_client.ApolloError | undefined;
1398
+ loading: boolean;
1399
+ };
1400
+ declare const useUpdateSubscriptionPlan: () => {
1401
+ error: _apollo_client.ApolloError | undefined;
1402
+ loading: boolean;
1403
+ updateSubscriptionPlan: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
1404
+ };
1405
+
1406
+ declare const useGetSubscriptionStatus: () => {
1407
+ data: SubscriptionStatusData | undefined;
1408
+ error: _apollo_client.ApolloError | undefined;
1409
+ loading: boolean;
1410
+ refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<any>>;
1411
+ };
1412
+
1367
1413
  interface PlacePrediction {
1368
1414
  place_id: string;
1369
1415
  description: string;
@@ -1548,4 +1594,4 @@ declare const availableRegionOptions: OptionItem[];
1548
1594
  declare const paymentMethodOptions: OptionItem[];
1549
1595
  declare function normalizeUrl(url: string): string;
1550
1596
 
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 };
1597
+ 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,13 @@ 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
+ PAST_DUE = "past_due"
175
+ }
169
176
 
170
177
  type StallType = {
171
178
  label: string;
@@ -655,6 +662,7 @@ type UserFormData = {
655
662
  confirmPassword?: string | null;
656
663
  email: string;
657
664
  firstName: string;
665
+ isTester: boolean;
658
666
  lastName: string;
659
667
  password?: string | null;
660
668
  platform?: EnumOSPlatform;
@@ -669,6 +677,20 @@ type UserActivityEvent = {
669
677
  startDate: string;
670
678
  startTime: string;
671
679
  };
680
+ type StripeSubscription = {
681
+ customerId?: string;
682
+ subscriptionId?: string;
683
+ status?: EnumSubscriptionStatus;
684
+ currentPlan?: EnumUserLicence;
685
+ startDate?: string;
686
+ endDate?: string;
687
+ };
688
+ type SubscriptionStatusData = {
689
+ subscriptionId: string | null;
690
+ status: EnumSubscriptionStatus;
691
+ priceId: string | null;
692
+ currentPlan: EnumUserLicence | null;
693
+ };
672
694
  type UserActivity = {
673
695
  favourites: {
674
696
  events: string[];
@@ -706,6 +728,7 @@ interface UserType {
706
728
  updatedAt: string;
707
729
  userActivity: UserActivity | null;
708
730
  vendor: string | null;
731
+ stripe?: StripeSubscription;
709
732
  }
710
733
 
711
734
  declare enum EnumAdShowOn {
@@ -1364,6 +1387,29 @@ declare const useGetResourceActivities: (resourceId: string, resourceType: EnumR
1364
1387
  resourceActivities: ResourceActivityType[];
1365
1388
  };
1366
1389
 
1390
+ declare const useCreateCheckoutSession: () => {
1391
+ createCheckoutSession: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
1392
+ error: _apollo_client.ApolloError | undefined;
1393
+ loading: boolean;
1394
+ };
1395
+ declare const useCancelSubscription: () => {
1396
+ cancelSubscription: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
1397
+ error: _apollo_client.ApolloError | undefined;
1398
+ loading: boolean;
1399
+ };
1400
+ declare const useUpdateSubscriptionPlan: () => {
1401
+ error: _apollo_client.ApolloError | undefined;
1402
+ loading: boolean;
1403
+ updateSubscriptionPlan: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
1404
+ };
1405
+
1406
+ declare const useGetSubscriptionStatus: () => {
1407
+ data: SubscriptionStatusData | undefined;
1408
+ error: _apollo_client.ApolloError | undefined;
1409
+ loading: boolean;
1410
+ refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<any>>;
1411
+ };
1412
+
1367
1413
  interface PlacePrediction {
1368
1414
  place_id: string;
1369
1415
  description: string;
@@ -1548,4 +1594,4 @@ declare const availableRegionOptions: OptionItem[];
1548
1594
  declare const paymentMethodOptions: OptionItem[];
1549
1595
  declare function normalizeUrl(url: string): string;
1550
1596
 
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 };
1597
+ 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,14 @@ 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
+ EnumSubscriptionStatus2["PAST_DUE"] = "past_due";
191
+ return EnumSubscriptionStatus2;
192
+ })(EnumSubscriptionStatus || {});
185
193
 
186
194
  // src/utils/index.ts
187
195
  import dayjs from "dayjs";
@@ -2110,11 +2118,11 @@ var USER_FIELDS_FRAGMENT = gql2`
2110
2118
  createdAt
2111
2119
  deletedAt
2112
2120
  email
2113
- isTester
2121
+ events
2114
2122
  firstName
2123
+ isTester
2115
2124
  lastName
2116
2125
  licences
2117
- events
2118
2126
  platform
2119
2127
  preferredRegion
2120
2128
  partners {
@@ -4523,6 +4531,82 @@ var useGetResourceActivities = (resourceId, resourceType) => {
4523
4531
  };
4524
4532
  };
4525
4533
 
4534
+ // src/graphql/hooks/stripe/hooksMutation.ts
4535
+ import { useMutation as useMutation15 } from "@apollo/client";
4536
+
4537
+ // src/graphql/mutations/stripe.ts
4538
+ import { gql as gql27 } from "@apollo/client";
4539
+ var CREATE_CHECKOUT_SESSION_MUTATION = gql27`
4540
+ mutation createCheckoutSession($planId: LicencesEnumType!) {
4541
+ createCheckoutSession(planId: $planId) {
4542
+ sessionId
4543
+ checkoutUrl
4544
+ }
4545
+ }
4546
+ `;
4547
+ var CANCEL_SUBSCRIPTION_MUTATION = gql27`
4548
+ mutation cancelSubscription {
4549
+ cancelSubscription
4550
+ }
4551
+ `;
4552
+ var UPDATE_SUBSCRIPTION_PLAN_MUTATION = gql27`
4553
+ mutation updateSubscriptionPlan($newPlanId: LicencesEnumType!) {
4554
+ updateSubscriptionPlan(newPlanId: $newPlanId) {
4555
+ subscriptionId
4556
+ status
4557
+ priceId
4558
+ currentPlan
4559
+ }
4560
+ }
4561
+ `;
4562
+
4563
+ // src/graphql/hooks/stripe/hooksMutation.ts
4564
+ var useCreateCheckoutSession = () => {
4565
+ const [createCheckoutSession, { loading, error }] = useMutation15(
4566
+ CREATE_CHECKOUT_SESSION_MUTATION
4567
+ );
4568
+ return { createCheckoutSession, error, loading };
4569
+ };
4570
+ var useCancelSubscription = () => {
4571
+ const [cancelSubscription, { loading, error }] = useMutation15(
4572
+ CANCEL_SUBSCRIPTION_MUTATION
4573
+ );
4574
+ return { cancelSubscription, error, loading };
4575
+ };
4576
+ var useUpdateSubscriptionPlan = () => {
4577
+ const [updateSubscriptionPlan, { loading, error }] = useMutation15(
4578
+ UPDATE_SUBSCRIPTION_PLAN_MUTATION
4579
+ );
4580
+ return { error, loading, updateSubscriptionPlan };
4581
+ };
4582
+
4583
+ // src/graphql/hooks/stripe/hooksQuery.ts
4584
+ import { useQuery as useQuery10 } from "@apollo/client";
4585
+
4586
+ // src/graphql/queries/stripe.ts
4587
+ import { gql as gql28 } from "@apollo/client";
4588
+ var GET_SUBSCRIPTION_STATUS = gql28`
4589
+ query getSubscriptionStatus {
4590
+ getSubscriptionStatus {
4591
+ subscriptionId
4592
+ status
4593
+ priceId
4594
+ currentPlan
4595
+ }
4596
+ }
4597
+ `;
4598
+
4599
+ // src/graphql/hooks/stripe/hooksQuery.ts
4600
+ var useGetSubscriptionStatus = () => {
4601
+ const { data, loading, error, refetch } = useQuery10(GET_SUBSCRIPTION_STATUS);
4602
+ return {
4603
+ data: data?.getSubscriptionStatus,
4604
+ error,
4605
+ loading,
4606
+ refetch
4607
+ };
4608
+ };
4609
+
4526
4610
  // src/hooks/useLocationSearch.ts
4527
4611
  var handleApiError = (error, message) => {
4528
4612
  console.error(message, error);
@@ -4931,6 +5015,7 @@ var userSchema = yup4.object().shape({
4931
5015
  email: emailRequiredSchema,
4932
5016
  firstName: yup4.string().label("First Name").required("First name is required"),
4933
5017
  lastName: yup4.string().label("Last Name").required("Last name is required"),
5018
+ isTester: yup4.boolean().required("Tester status is required"),
4934
5019
  password: yup4.string().nullable().trim().label("Password").min(8, "Password must be at least 8 characters long").notRequired(),
4935
5020
  preferredRegion: yup4.string().label("Preferred Region").required("Preferred region is required"),
4936
5021
  confirmPassword: yup4.string().nullable().trim().label("Confirm Password").when("password", {
@@ -5491,6 +5576,7 @@ var defaultValues = {
5491
5576
  confirmPassword: "",
5492
5577
  email: "",
5493
5578
  firstName: "",
5579
+ isTester: false,
5494
5580
  lastName: "",
5495
5581
  password: null,
5496
5582
  preferredRegion: "",
@@ -5518,6 +5604,7 @@ function useUserForm(data) {
5518
5604
  avatarUpload: data.avatarUpload,
5519
5605
  email: data.email,
5520
5606
  firstName: data.firstName,
5607
+ isTester: data.isTester,
5521
5608
  lastName: data.lastName,
5522
5609
  password: data.password,
5523
5610
  preferredRegion: data.preferredRegion,
@@ -5535,6 +5622,7 @@ function useUserForm(data) {
5535
5622
  avatarUpload,
5536
5623
  email,
5537
5624
  firstName,
5625
+ isTester,
5538
5626
  lastName,
5539
5627
  password,
5540
5628
  preferredRegion,
@@ -5550,6 +5638,7 @@ function useUserForm(data) {
5550
5638
  avatarUpload,
5551
5639
  email,
5552
5640
  firstName,
5641
+ isTester,
5553
5642
  lastName,
5554
5643
  password,
5555
5644
  preferredRegion,
@@ -6068,6 +6157,7 @@ export {
6068
6157
  EnumRelationResource,
6069
6158
  EnumResourceType,
6070
6159
  EnumSocialMedia,
6160
+ EnumSubscriptionStatus,
6071
6161
  EnumUserLicence,
6072
6162
  EnumUserRole,
6073
6163
  EnumVendorType,
@@ -6136,10 +6226,12 @@ export {
6136
6226
  useAddUserInterestResource,
6137
6227
  useAddUserPresentResource,
6138
6228
  useAdminUpdateResourceType,
6229
+ useCancelSubscription,
6139
6230
  useContactUs,
6140
6231
  useContactUsForm,
6141
6232
  useCreateAd,
6142
6233
  useCreateBulkNotifications,
6234
+ useCreateCheckoutSession,
6143
6235
  useCreateEvent,
6144
6236
  useCreateEventInfo,
6145
6237
  useCreatePoster,
@@ -6178,6 +6270,7 @@ export {
6178
6270
  useGetRelationByEventAndVendor,
6179
6271
  useGetResourceActivities,
6180
6272
  useGetResourceConnections,
6273
+ useGetSubscriptionStatus,
6181
6274
  useGetTester,
6182
6275
  useGetTesters,
6183
6276
  useGetUser,
@@ -6220,6 +6313,7 @@ export {
6220
6313
  useUpdateEvent,
6221
6314
  useUpdateEventInfo,
6222
6315
  useUpdateRelation,
6316
+ useUpdateSubscriptionPlan,
6223
6317
  useUpdateTester,
6224
6318
  useUpdateUser,
6225
6319
  useUpdateVendor,