@timardex/cluemart-shared 1.2.46 → 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.
- package/dist/{ad-BnY_hAq4.d.ts → ad-BkTdN8xM.d.mts} +18 -3
- package/dist/{ad-8uwFwLyG.d.mts → ad-STgnIJ8B.d.ts} +18 -3
- package/dist/{auth-ASeQbrMo.d.mts → auth-CQPRj4DB.d.mts} +1 -1
- package/dist/{auth-DFjTVwMp.d.ts → auth-OLWCR6Zr.d.ts} +1 -1
- package/dist/{chunk-TGZY4O6C.mjs → chunk-HL4SAT7R.mjs} +14 -6
- package/dist/chunk-HL4SAT7R.mjs.map +1 -0
- package/dist/{chunk-7WFI7PUD.mjs → chunk-KZ2VLPYF.mjs} +2 -2
- package/dist/enums/index.cjs +13 -4
- package/dist/enums/index.cjs.map +1 -1
- package/dist/enums/index.d.mts +12 -6
- package/dist/enums/index.d.ts +12 -6
- package/dist/enums/index.mjs +3 -1
- package/dist/formFields/index.cjs +4 -4
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.d.mts +1 -1
- package/dist/formFields/index.d.ts +1 -1
- package/dist/formFields/index.mjs +2 -2
- package/dist/{global-DNG_KXig.d.ts → global-Be5v6emI.d.ts} +5 -6
- package/dist/{global-4G0uUe2Y.d.mts → global-qg1lwtYo.d.mts} +5 -6
- package/dist/graphql/index.cjs +94 -6
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +26 -3
- package/dist/graphql/index.d.ts +26 -3
- package/dist/graphql/index.mjs +91 -7
- package/dist/graphql/index.mjs.map +1 -1
- package/dist/hooks/index.cjs +19 -4
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +3 -3
- package/dist/hooks/index.d.ts +3 -3
- package/dist/hooks/index.mjs +4 -2
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +108 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +54 -11
- package/dist/index.d.ts +54 -11
- package/dist/index.mjs +103 -10
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.d.mts +3 -3
- package/dist/types/index.d.ts +3 -3
- package/dist/utils/index.cjs +4 -4
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-TGZY4O6C.mjs.map +0 -1
- /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
|
-
|
|
116
|
+
CanterburyWestCoast = "Canterbury & West Coast",
|
|
117
117
|
HawkesBay = "Hawke's Bay",
|
|
118
118
|
ManawatuWanganui = "Manawatu-Wanganui",
|
|
119
|
-
|
|
119
|
+
MarlboroughNelsonTasman = "Marlborough & Nelson & Tasman",
|
|
120
120
|
Northland = "Northland",
|
|
121
|
-
|
|
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;
|
|
@@ -226,15 +232,14 @@ type EventInfoType = Omit<EventInfoFormData, "_id"> & {
|
|
|
226
232
|
};
|
|
227
233
|
|
|
228
234
|
type RelationDate = {
|
|
235
|
+
dateTime: DateTimeType & {
|
|
236
|
+
stallType: StallType | null;
|
|
237
|
+
};
|
|
229
238
|
lastUpdateBy: {
|
|
230
239
|
resourceId: string;
|
|
231
240
|
userEmail: string;
|
|
232
241
|
};
|
|
233
|
-
dateStatus?: EnumEventDateStatus | null;
|
|
234
242
|
paymentReference?: string;
|
|
235
|
-
stallType: StallType | null;
|
|
236
|
-
startDate: string;
|
|
237
|
-
startTime: string;
|
|
238
243
|
status: EnumInviteStatus;
|
|
239
244
|
};
|
|
240
245
|
interface RelationType {
|
|
@@ -420,7 +425,7 @@ type LocationType = {
|
|
|
420
425
|
type: "Point";
|
|
421
426
|
};
|
|
422
427
|
type DateTimeType = {
|
|
423
|
-
dateStatus
|
|
428
|
+
dateStatus: EnumEventDateStatus;
|
|
424
429
|
endDate: string;
|
|
425
430
|
endTime: string;
|
|
426
431
|
startDate: string;
|
|
@@ -670,6 +675,20 @@ type UserActivityEvent = {
|
|
|
670
675
|
startDate: string;
|
|
671
676
|
startTime: string;
|
|
672
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
|
+
};
|
|
673
692
|
type UserActivity = {
|
|
674
693
|
favourites: {
|
|
675
694
|
events: string[];
|
|
@@ -707,6 +726,7 @@ interface UserType {
|
|
|
707
726
|
updatedAt: string;
|
|
708
727
|
userActivity: UserActivity | null;
|
|
709
728
|
vendor: string | null;
|
|
729
|
+
stripe?: StripeSubscription;
|
|
710
730
|
}
|
|
711
731
|
|
|
712
732
|
declare enum EnumAdShowOn {
|
|
@@ -1365,6 +1385,29 @@ declare const useGetResourceActivities: (resourceId: string, resourceType: EnumR
|
|
|
1365
1385
|
resourceActivities: ResourceActivityType[];
|
|
1366
1386
|
};
|
|
1367
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
|
+
|
|
1368
1411
|
interface PlacePrediction {
|
|
1369
1412
|
place_id: string;
|
|
1370
1413
|
description: string;
|
|
@@ -1549,4 +1592,4 @@ declare const availableRegionOptions: OptionItem[];
|
|
|
1549
1592
|
declare const paymentMethodOptions: OptionItem[];
|
|
1550
1593
|
declare function normalizeUrl(url: string): string;
|
|
1551
1594
|
|
|
1552
|
-
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
|
-
|
|
116
|
+
CanterburyWestCoast = "Canterbury & West Coast",
|
|
117
117
|
HawkesBay = "Hawke's Bay",
|
|
118
118
|
ManawatuWanganui = "Manawatu-Wanganui",
|
|
119
|
-
|
|
119
|
+
MarlboroughNelsonTasman = "Marlborough & Nelson & Tasman",
|
|
120
120
|
Northland = "Northland",
|
|
121
|
-
|
|
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;
|
|
@@ -226,15 +232,14 @@ type EventInfoType = Omit<EventInfoFormData, "_id"> & {
|
|
|
226
232
|
};
|
|
227
233
|
|
|
228
234
|
type RelationDate = {
|
|
235
|
+
dateTime: DateTimeType & {
|
|
236
|
+
stallType: StallType | null;
|
|
237
|
+
};
|
|
229
238
|
lastUpdateBy: {
|
|
230
239
|
resourceId: string;
|
|
231
240
|
userEmail: string;
|
|
232
241
|
};
|
|
233
|
-
dateStatus?: EnumEventDateStatus | null;
|
|
234
242
|
paymentReference?: string;
|
|
235
|
-
stallType: StallType | null;
|
|
236
|
-
startDate: string;
|
|
237
|
-
startTime: string;
|
|
238
243
|
status: EnumInviteStatus;
|
|
239
244
|
};
|
|
240
245
|
interface RelationType {
|
|
@@ -420,7 +425,7 @@ type LocationType = {
|
|
|
420
425
|
type: "Point";
|
|
421
426
|
};
|
|
422
427
|
type DateTimeType = {
|
|
423
|
-
dateStatus
|
|
428
|
+
dateStatus: EnumEventDateStatus;
|
|
424
429
|
endDate: string;
|
|
425
430
|
endTime: string;
|
|
426
431
|
startDate: string;
|
|
@@ -670,6 +675,20 @@ type UserActivityEvent = {
|
|
|
670
675
|
startDate: string;
|
|
671
676
|
startTime: string;
|
|
672
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
|
+
};
|
|
673
692
|
type UserActivity = {
|
|
674
693
|
favourites: {
|
|
675
694
|
events: string[];
|
|
@@ -707,6 +726,7 @@ interface UserType {
|
|
|
707
726
|
updatedAt: string;
|
|
708
727
|
userActivity: UserActivity | null;
|
|
709
728
|
vendor: string | null;
|
|
729
|
+
stripe?: StripeSubscription;
|
|
710
730
|
}
|
|
711
731
|
|
|
712
732
|
declare enum EnumAdShowOn {
|
|
@@ -1365,6 +1385,29 @@ declare const useGetResourceActivities: (resourceId: string, resourceType: EnumR
|
|
|
1365
1385
|
resourceActivities: ResourceActivityType[];
|
|
1366
1386
|
};
|
|
1367
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
|
+
|
|
1368
1411
|
interface PlacePrediction {
|
|
1369
1412
|
place_id: string;
|
|
1370
1413
|
description: string;
|
|
@@ -1549,4 +1592,4 @@ declare const availableRegionOptions: OptionItem[];
|
|
|
1549
1592
|
declare const paymentMethodOptions: OptionItem[];
|
|
1550
1593
|
declare function normalizeUrl(url: string): string;
|
|
1551
1594
|
|
|
1552
|
-
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["
|
|
126
|
+
EnumRegions2["CanterburyWestCoast"] = "Canterbury & West Coast";
|
|
127
127
|
EnumRegions2["HawkesBay"] = "Hawke's Bay";
|
|
128
128
|
EnumRegions2["ManawatuWanganui"] = "Manawatu-Wanganui";
|
|
129
|
-
EnumRegions2["
|
|
129
|
+
EnumRegions2["MarlboroughNelsonTasman"] = "Marlborough & Nelson & Tasman";
|
|
130
130
|
EnumRegions2["Northland"] = "Northland";
|
|
131
|
-
EnumRegions2["
|
|
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";
|
|
@@ -2149,17 +2156,21 @@ var STALL_TYPE_FIELDS_FRAGMENT = gql2`
|
|
|
2149
2156
|
`;
|
|
2150
2157
|
var RELATION_DATES_FRAGMENT = gql2`
|
|
2151
2158
|
fragment RelationDates on RelationDateType {
|
|
2159
|
+
dateTime {
|
|
2160
|
+
dateStatus
|
|
2161
|
+
endDate
|
|
2162
|
+
endTime
|
|
2163
|
+
startDate
|
|
2164
|
+
startTime
|
|
2165
|
+
stallType {
|
|
2166
|
+
...StallTypeFields
|
|
2167
|
+
}
|
|
2168
|
+
}
|
|
2152
2169
|
lastUpdateBy {
|
|
2153
2170
|
resourceId
|
|
2154
2171
|
userEmail
|
|
2155
2172
|
}
|
|
2156
2173
|
paymentReference
|
|
2157
|
-
stallType {
|
|
2158
|
-
...StallTypeFields
|
|
2159
|
-
}
|
|
2160
|
-
dateStatus
|
|
2161
|
-
startDate
|
|
2162
|
-
startTime
|
|
2163
2174
|
status
|
|
2164
2175
|
}
|
|
2165
2176
|
${STALL_TYPE_FIELDS_FRAGMENT}
|
|
@@ -4519,6 +4530,82 @@ var useGetResourceActivities = (resourceId, resourceType) => {
|
|
|
4519
4530
|
};
|
|
4520
4531
|
};
|
|
4521
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
|
+
|
|
4522
4609
|
// src/hooks/useLocationSearch.ts
|
|
4523
4610
|
var handleApiError = (error, message) => {
|
|
4524
4611
|
console.error(message, error);
|
|
@@ -4704,6 +4791,7 @@ var startTimeCannotBeInPastTest = yup.string().test(
|
|
|
4704
4791
|
}
|
|
4705
4792
|
);
|
|
4706
4793
|
var dateTimeSchema = yup.object().shape({
|
|
4794
|
+
dateStatus: yup.mixed().oneOf(Object.values(EnumEventDateStatus)).required("Date status is required"),
|
|
4707
4795
|
endDate: yup.string().label("End Date").concat(endDateNotInPastTest).concat(endDateAfterStartDateTest).required("End date is required"),
|
|
4708
4796
|
endTime: yup.string().label("End Time").concat(endTimeMustBeAfterStartTimeTest).required("End time is required"),
|
|
4709
4797
|
startDate: yup.string().label("Start Date").concat(startDateNotInPastTest).required("Start date is required"),
|
|
@@ -6063,6 +6151,7 @@ export {
|
|
|
6063
6151
|
EnumRelationResource,
|
|
6064
6152
|
EnumResourceType,
|
|
6065
6153
|
EnumSocialMedia,
|
|
6154
|
+
EnumSubscriptionStatus,
|
|
6066
6155
|
EnumUserLicence,
|
|
6067
6156
|
EnumUserRole,
|
|
6068
6157
|
EnumVendorType,
|
|
@@ -6131,10 +6220,12 @@ export {
|
|
|
6131
6220
|
useAddUserInterestResource,
|
|
6132
6221
|
useAddUserPresentResource,
|
|
6133
6222
|
useAdminUpdateResourceType,
|
|
6223
|
+
useCancelSubscription,
|
|
6134
6224
|
useContactUs,
|
|
6135
6225
|
useContactUsForm,
|
|
6136
6226
|
useCreateAd,
|
|
6137
6227
|
useCreateBulkNotifications,
|
|
6228
|
+
useCreateCheckoutSession,
|
|
6138
6229
|
useCreateEvent,
|
|
6139
6230
|
useCreateEventInfo,
|
|
6140
6231
|
useCreatePoster,
|
|
@@ -6173,6 +6264,7 @@ export {
|
|
|
6173
6264
|
useGetRelationByEventAndVendor,
|
|
6174
6265
|
useGetResourceActivities,
|
|
6175
6266
|
useGetResourceConnections,
|
|
6267
|
+
useGetSubscriptionStatus,
|
|
6176
6268
|
useGetTester,
|
|
6177
6269
|
useGetTesters,
|
|
6178
6270
|
useGetUser,
|
|
@@ -6215,6 +6307,7 @@ export {
|
|
|
6215
6307
|
useUpdateEvent,
|
|
6216
6308
|
useUpdateEventInfo,
|
|
6217
6309
|
useUpdateRelation,
|
|
6310
|
+
useUpdateSubscriptionPlan,
|
|
6218
6311
|
useUpdateTester,
|
|
6219
6312
|
useUpdateUser,
|
|
6220
6313
|
useUpdateVendor,
|