@timardex/cluemart-shared 1.2.1 → 1.2.3

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 (35) hide show
  1. package/dist/{ad-utcwpkKv.d.mts → ad-CjJ4eOXQ.d.mts} +1 -1
  2. package/dist/{ad-BTebYGa6.d.ts → ad-bZBXVzB4.d.ts} +1 -1
  3. package/dist/{auth-DO7TRji8.d.ts → auth-CUFK_NWr.d.ts} +1 -1
  4. package/dist/{auth-BH5KfDFw.d.mts → auth-DD3sE2bg.d.mts} +1 -1
  5. package/dist/formFields/index.cjs +35 -24
  6. package/dist/formFields/index.cjs.map +1 -1
  7. package/dist/formFields/index.d.mts +4 -3
  8. package/dist/formFields/index.d.ts +4 -3
  9. package/dist/formFields/index.mjs +34 -24
  10. package/dist/formFields/index.mjs.map +1 -1
  11. package/dist/{global-CntHxpmg.d.mts → global-CuI_od8W.d.mts} +19 -11
  12. package/dist/{global-K1ennCrw.d.ts → global-DB_pNCpw.d.ts} +19 -11
  13. package/dist/graphql/index.cjs +29 -13
  14. package/dist/graphql/index.cjs.map +1 -1
  15. package/dist/graphql/index.d.mts +2 -2
  16. package/dist/graphql/index.d.ts +2 -2
  17. package/dist/graphql/index.mjs +29 -13
  18. package/dist/graphql/index.mjs.map +1 -1
  19. package/dist/hooks/index.cjs +21 -18
  20. package/dist/hooks/index.cjs.map +1 -1
  21. package/dist/hooks/index.d.mts +3 -3
  22. package/dist/hooks/index.d.ts +3 -3
  23. package/dist/hooks/index.mjs +21 -18
  24. package/dist/hooks/index.mjs.map +1 -1
  25. package/dist/index.cjs +85 -55
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.d.mts +21 -12
  28. package/dist/index.d.ts +21 -12
  29. package/dist/index.mjs +84 -55
  30. package/dist/index.mjs.map +1 -1
  31. package/dist/types/index.d.mts +3 -3
  32. package/dist/types/index.d.ts +3 -3
  33. package/dist/utils/index.d.mts +1 -1
  34. package/dist/utils/index.d.ts +1 -1
  35. package/package.json +1 -1
package/dist/index.d.mts CHANGED
@@ -209,12 +209,21 @@ type VendorLocation = {
209
209
  resourceName?: MapMultiLocation["resourceName"];
210
210
  resourceType?: MapMultiLocation["resourceType"];
211
211
  };
212
+ type VendorMenuType = {
213
+ name?: string | null;
214
+ description?: string | null;
215
+ price?: number | null;
216
+ };
212
217
  interface VendorFormData extends BaseResourceTypeFormData {
218
+ availability?: {
219
+ school: boolean;
220
+ private: boolean;
221
+ corporate: boolean;
222
+ };
213
223
  categories: Category[];
214
224
  locations?: VendorLocation[] | null;
215
225
  multiLocation: boolean;
216
- products?: string[] | null;
217
- specialities?: string[] | null;
226
+ products?: VendorMenuType[] | null;
218
227
  vendorType: EnumVendorType;
219
228
  }
220
229
  type CreateVendorFormData = CreateFormData<VendorFormData>;
@@ -224,11 +233,6 @@ type VendorAttributes = {
224
233
  };
225
234
  type VendorInfoFormData = {
226
235
  _id?: string;
227
- availability?: {
228
- school: boolean;
229
- private: boolean;
230
- corporate: boolean;
231
- };
232
236
  compliance?: {
233
237
  liabilityInsurance: boolean;
234
238
  foodBeverageLicense: boolean;
@@ -260,11 +264,15 @@ type VendorInfoFormData = {
260
264
  };
261
265
  type CreateVendorInfoFormData = CreateFormData<VendorInfoFormData>;
262
266
  interface VendorType extends BaseResourceType {
267
+ availability?: {
268
+ school: boolean;
269
+ private: boolean;
270
+ corporate: boolean;
271
+ };
263
272
  categories: VendorFormData["categories"];
264
273
  locations: VendorLocation[] | null;
265
274
  multiLocation: boolean;
266
- products: string[] | null;
267
- specialities: string[] | null;
275
+ products: VendorMenuType[] | null;
268
276
  vendorInfoId: string;
269
277
  vendorType: EnumVendorType;
270
278
  }
@@ -307,7 +315,7 @@ interface BaseResourceTypeFormData {
307
315
  logo?: ResourceImageType | null;
308
316
  logoUpload?: ResourceImageType | null;
309
317
  name: string;
310
- promoCode?: string | null;
318
+ promoCodes?: string[] | null;
311
319
  region: string;
312
320
  socialMedia?: SocialMediaType[] | null;
313
321
  partners?: PartnerType[] | null;
@@ -424,7 +432,9 @@ declare const vendorMultiLocation: FormField;
424
432
  declare const vendorFullAddress: FormField;
425
433
  declare const vendorStartDateFields: FormDateField[];
426
434
  declare const vendorEndDateFields: FormDateField[];
435
+ declare const vendorAvailability: FormField[];
427
436
  declare const vendorLocationDescription: FormField;
437
+ declare const vendorMenuFields: FormField[];
428
438
  declare const availableCityOptions: OptionItem[];
429
439
 
430
440
  interface AdminUpdateResourceType {
@@ -699,7 +709,6 @@ declare const vendorStallSize: {
699
709
  declare const vendorPackaging: FormField;
700
710
  declare const vendorProducedIn: FormField;
701
711
  declare const vendorFoodFlavour: FormField;
702
- declare const vendorAvailability: FormField[];
703
712
  declare const vendorCompliance: FormField[];
704
713
  declare const packagingOptions: OptionItem[];
705
714
  declare const producedIngOptions: OptionItem[];
@@ -1396,4 +1405,4 @@ declare const availableRegionOptions: OptionItem[];
1396
1405
  declare const paymentMethodOptions: OptionItem[];
1397
1406
  declare function normalizeUrl(url: string): string;
1398
1407
 
1399
- 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, EnumAdShowOn, EnumAdStatus, EnumAdStyle, EnumAdType, EnumChatType, EnumEventType, EnumFoodFlavor, EnumInviteStatus, EnumNotificationResourceType, EnumNotificationType, EnumOSPlatform, EnumPaymentMethod, EnumRegions, EnumRelationResource, EnumResourceType, EnumSocialMedia, EnumUserLicence, EnumUserRole, EnumVendorType, type EventFormData, type EventInfoFormData, type EventInfoType, type EventType, type EventWithConnectionDatesType, 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 ResourceConnectionsType, type ResourceContactDetailsType, type ResourceImageType, type ResourceViewEntry, type ResourceViewInputType, type ResourceViewsType, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, type SocialMediaType, type StallType, type Subcategory, type SubcategoryItems, type TesterType, type TestersFormData, USER_STORAGE_KEY, type UserFormData, type UserType, type ValidateVerificationTokenFormData, type VendorAttributes, type VendorFormData, type VendorInfoFormData, type VendorInfoType, type VendorLocation, type VendorType, type VendorWithConnectionDatesType, availableCategories, availableCityOptions, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, companyContactFields, contactUsFields, darkColors, dateFormat, defaultEventFormValues, defaultEventInfoFormValues, defaultRegion, defaultVendorFormValues, defaultVendorInfoFormValues, eventBasicInfoFields, eventEndDateFields, eventInfo, eventInfoPaymentInfo, eventStartDateFields, fonts, foodFlavourOptions, formatDate, formatTimestamp, getCurrentAndFutureDates, globalDefaultValues, isFutureDatesBeforeThreshold, lightColors, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, normalizeUrl, packagingOptions, paymentMethodOptions, producedIngOptions, profileFields, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, socialMediaFields, sortDatesChronologically, stallTypeOptions, statusOptions, tagOptions, testersFields, timeFormat, truncateText, useAdForm, useAddParticipantToChat, useAddUserFavouriteResource, useAdminUpdateResourceType, useContactUs, useContactUsForm, useCreateAd, useCreateBulkNotifications, useCreateEvent, useCreateEventInfo, useCreatePoster, useCreatePushToken, useCreateRelation, useCreateResourceViews, 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, useGetResourceConnections, useGetResourceViews, useGetTester, useGetTesters, useGetUser, useGetUserChats, useGetUserEvents, useGetUserFavourites, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLocationSearch, useLogin, useLoginForm, useLogout, useMarkAllNotificationsRead, useMarkNotificationRead, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, 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, vendorMultiLocation, vendorPackaging, vendorPriceRange, vendorProducedIn, vendorStallSize, vendorStartDateFields, vendorTable };
1408
+ 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, EnumAdShowOn, EnumAdStatus, EnumAdStyle, EnumAdType, EnumChatType, EnumEventType, EnumFoodFlavor, EnumInviteStatus, EnumNotificationResourceType, EnumNotificationType, EnumOSPlatform, EnumPaymentMethod, EnumRegions, EnumRelationResource, EnumResourceType, EnumSocialMedia, EnumUserLicence, EnumUserRole, EnumVendorType, type EventFormData, type EventInfoFormData, type EventInfoType, type EventType, type EventWithConnectionDatesType, 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 ResourceConnectionsType, type ResourceContactDetailsType, type ResourceImageType, type ResourceViewEntry, type ResourceViewInputType, type ResourceViewsType, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, type SocialMediaType, type StallType, type Subcategory, type SubcategoryItems, type TesterType, type TestersFormData, USER_STORAGE_KEY, type UserFormData, type UserType, type ValidateVerificationTokenFormData, type VendorAttributes, type VendorFormData, type VendorInfoFormData, type VendorInfoType, type VendorLocation, type VendorMenuType, type VendorType, type VendorWithConnectionDatesType, availableCategories, availableCityOptions, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, companyContactFields, contactUsFields, darkColors, dateFormat, defaultEventFormValues, defaultEventInfoFormValues, defaultRegion, defaultVendorFormValues, defaultVendorInfoFormValues, eventBasicInfoFields, eventEndDateFields, eventInfo, eventInfoPaymentInfo, eventStartDateFields, fonts, foodFlavourOptions, formatDate, formatTimestamp, getCurrentAndFutureDates, globalDefaultValues, isFutureDatesBeforeThreshold, lightColors, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, normalizeUrl, packagingOptions, paymentMethodOptions, producedIngOptions, profileFields, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, socialMediaFields, sortDatesChronologically, stallTypeOptions, statusOptions, tagOptions, testersFields, timeFormat, truncateText, useAdForm, useAddParticipantToChat, useAddUserFavouriteResource, useAdminUpdateResourceType, useContactUs, useContactUsForm, useCreateAd, useCreateBulkNotifications, useCreateEvent, useCreateEventInfo, useCreatePoster, useCreatePushToken, useCreateRelation, useCreateResourceViews, 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, useGetResourceConnections, useGetResourceViews, useGetTester, useGetTesters, useGetUser, useGetUserChats, useGetUserEvents, useGetUserFavourites, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLocationSearch, useLogin, useLoginForm, useLogout, useMarkAllNotificationsRead, useMarkNotificationRead, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, 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 };
package/dist/index.d.ts CHANGED
@@ -209,12 +209,21 @@ type VendorLocation = {
209
209
  resourceName?: MapMultiLocation["resourceName"];
210
210
  resourceType?: MapMultiLocation["resourceType"];
211
211
  };
212
+ type VendorMenuType = {
213
+ name?: string | null;
214
+ description?: string | null;
215
+ price?: number | null;
216
+ };
212
217
  interface VendorFormData extends BaseResourceTypeFormData {
218
+ availability?: {
219
+ school: boolean;
220
+ private: boolean;
221
+ corporate: boolean;
222
+ };
213
223
  categories: Category[];
214
224
  locations?: VendorLocation[] | null;
215
225
  multiLocation: boolean;
216
- products?: string[] | null;
217
- specialities?: string[] | null;
226
+ products?: VendorMenuType[] | null;
218
227
  vendorType: EnumVendorType;
219
228
  }
220
229
  type CreateVendorFormData = CreateFormData<VendorFormData>;
@@ -224,11 +233,6 @@ type VendorAttributes = {
224
233
  };
225
234
  type VendorInfoFormData = {
226
235
  _id?: string;
227
- availability?: {
228
- school: boolean;
229
- private: boolean;
230
- corporate: boolean;
231
- };
232
236
  compliance?: {
233
237
  liabilityInsurance: boolean;
234
238
  foodBeverageLicense: boolean;
@@ -260,11 +264,15 @@ type VendorInfoFormData = {
260
264
  };
261
265
  type CreateVendorInfoFormData = CreateFormData<VendorInfoFormData>;
262
266
  interface VendorType extends BaseResourceType {
267
+ availability?: {
268
+ school: boolean;
269
+ private: boolean;
270
+ corporate: boolean;
271
+ };
263
272
  categories: VendorFormData["categories"];
264
273
  locations: VendorLocation[] | null;
265
274
  multiLocation: boolean;
266
- products: string[] | null;
267
- specialities: string[] | null;
275
+ products: VendorMenuType[] | null;
268
276
  vendorInfoId: string;
269
277
  vendorType: EnumVendorType;
270
278
  }
@@ -307,7 +315,7 @@ interface BaseResourceTypeFormData {
307
315
  logo?: ResourceImageType | null;
308
316
  logoUpload?: ResourceImageType | null;
309
317
  name: string;
310
- promoCode?: string | null;
318
+ promoCodes?: string[] | null;
311
319
  region: string;
312
320
  socialMedia?: SocialMediaType[] | null;
313
321
  partners?: PartnerType[] | null;
@@ -424,7 +432,9 @@ declare const vendorMultiLocation: FormField;
424
432
  declare const vendorFullAddress: FormField;
425
433
  declare const vendorStartDateFields: FormDateField[];
426
434
  declare const vendorEndDateFields: FormDateField[];
435
+ declare const vendorAvailability: FormField[];
427
436
  declare const vendorLocationDescription: FormField;
437
+ declare const vendorMenuFields: FormField[];
428
438
  declare const availableCityOptions: OptionItem[];
429
439
 
430
440
  interface AdminUpdateResourceType {
@@ -699,7 +709,6 @@ declare const vendorStallSize: {
699
709
  declare const vendorPackaging: FormField;
700
710
  declare const vendorProducedIn: FormField;
701
711
  declare const vendorFoodFlavour: FormField;
702
- declare const vendorAvailability: FormField[];
703
712
  declare const vendorCompliance: FormField[];
704
713
  declare const packagingOptions: OptionItem[];
705
714
  declare const producedIngOptions: OptionItem[];
@@ -1396,4 +1405,4 @@ declare const availableRegionOptions: OptionItem[];
1396
1405
  declare const paymentMethodOptions: OptionItem[];
1397
1406
  declare function normalizeUrl(url: string): string;
1398
1407
 
1399
- 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, EnumAdShowOn, EnumAdStatus, EnumAdStyle, EnumAdType, EnumChatType, EnumEventType, EnumFoodFlavor, EnumInviteStatus, EnumNotificationResourceType, EnumNotificationType, EnumOSPlatform, EnumPaymentMethod, EnumRegions, EnumRelationResource, EnumResourceType, EnumSocialMedia, EnumUserLicence, EnumUserRole, EnumVendorType, type EventFormData, type EventInfoFormData, type EventInfoType, type EventType, type EventWithConnectionDatesType, 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 ResourceConnectionsType, type ResourceContactDetailsType, type ResourceImageType, type ResourceViewEntry, type ResourceViewInputType, type ResourceViewsType, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, type SocialMediaType, type StallType, type Subcategory, type SubcategoryItems, type TesterType, type TestersFormData, USER_STORAGE_KEY, type UserFormData, type UserType, type ValidateVerificationTokenFormData, type VendorAttributes, type VendorFormData, type VendorInfoFormData, type VendorInfoType, type VendorLocation, type VendorType, type VendorWithConnectionDatesType, availableCategories, availableCityOptions, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, companyContactFields, contactUsFields, darkColors, dateFormat, defaultEventFormValues, defaultEventInfoFormValues, defaultRegion, defaultVendorFormValues, defaultVendorInfoFormValues, eventBasicInfoFields, eventEndDateFields, eventInfo, eventInfoPaymentInfo, eventStartDateFields, fonts, foodFlavourOptions, formatDate, formatTimestamp, getCurrentAndFutureDates, globalDefaultValues, isFutureDatesBeforeThreshold, lightColors, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, normalizeUrl, packagingOptions, paymentMethodOptions, producedIngOptions, profileFields, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, socialMediaFields, sortDatesChronologically, stallTypeOptions, statusOptions, tagOptions, testersFields, timeFormat, truncateText, useAdForm, useAddParticipantToChat, useAddUserFavouriteResource, useAdminUpdateResourceType, useContactUs, useContactUsForm, useCreateAd, useCreateBulkNotifications, useCreateEvent, useCreateEventInfo, useCreatePoster, useCreatePushToken, useCreateRelation, useCreateResourceViews, 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, useGetResourceConnections, useGetResourceViews, useGetTester, useGetTesters, useGetUser, useGetUserChats, useGetUserEvents, useGetUserFavourites, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLocationSearch, useLogin, useLoginForm, useLogout, useMarkAllNotificationsRead, useMarkNotificationRead, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, 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, vendorMultiLocation, vendorPackaging, vendorPriceRange, vendorProducedIn, vendorStallSize, vendorStartDateFields, vendorTable };
1408
+ 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, EnumAdShowOn, EnumAdStatus, EnumAdStyle, EnumAdType, EnumChatType, EnumEventType, EnumFoodFlavor, EnumInviteStatus, EnumNotificationResourceType, EnumNotificationType, EnumOSPlatform, EnumPaymentMethod, EnumRegions, EnumRelationResource, EnumResourceType, EnumSocialMedia, EnumUserLicence, EnumUserRole, EnumVendorType, type EventFormData, type EventInfoFormData, type EventInfoType, type EventType, type EventWithConnectionDatesType, 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 ResourceConnectionsType, type ResourceContactDetailsType, type ResourceImageType, type ResourceViewEntry, type ResourceViewInputType, type ResourceViewsType, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, type SocialMediaType, type StallType, type Subcategory, type SubcategoryItems, type TesterType, type TestersFormData, USER_STORAGE_KEY, type UserFormData, type UserType, type ValidateVerificationTokenFormData, type VendorAttributes, type VendorFormData, type VendorInfoFormData, type VendorInfoType, type VendorLocation, type VendorMenuType, type VendorType, type VendorWithConnectionDatesType, availableCategories, availableCityOptions, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, companyContactFields, contactUsFields, darkColors, dateFormat, defaultEventFormValues, defaultEventInfoFormValues, defaultRegion, defaultVendorFormValues, defaultVendorInfoFormValues, eventBasicInfoFields, eventEndDateFields, eventInfo, eventInfoPaymentInfo, eventStartDateFields, fonts, foodFlavourOptions, formatDate, formatTimestamp, getCurrentAndFutureDates, globalDefaultValues, isFutureDatesBeforeThreshold, lightColors, loginFields, mapArrayToOptions, mapBaseResourceTypeToFormData, normalizeUrl, packagingOptions, paymentMethodOptions, producedIngOptions, profileFields, registerFields, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, socialMediaFields, sortDatesChronologically, stallTypeOptions, statusOptions, tagOptions, testersFields, timeFormat, truncateText, useAdForm, useAddParticipantToChat, useAddUserFavouriteResource, useAdminUpdateResourceType, useContactUs, useContactUsForm, useCreateAd, useCreateBulkNotifications, useCreateEvent, useCreateEventInfo, useCreatePoster, useCreatePushToken, useCreateRelation, useCreateResourceViews, 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, useGetResourceConnections, useGetResourceViews, useGetTester, useGetTesters, useGetUser, useGetUserChats, useGetUserEvents, useGetUserFavourites, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLocationSearch, useLogin, useLoginForm, useLogout, useMarkAllNotificationsRead, useMarkNotificationRead, useRefreshToken, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, 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 };
package/dist/index.mjs CHANGED
@@ -252,11 +252,6 @@ var vendorBasicInfoFields = [
252
252
  isTextArea: true,
253
253
  name: "description",
254
254
  placeholder: "Description"
255
- },
256
- {
257
- helperText: "Enter Promo code if you have one.",
258
- name: "promoCode",
259
- placeholder: "Promo code"
260
255
  }
261
256
  ];
262
257
  var vendorMultiLocation = {
@@ -297,12 +292,45 @@ var vendorEndDateFields = [
297
292
  placeholder: "End Time"
298
293
  }
299
294
  ];
295
+ var vendorAvailability = [
296
+ {
297
+ name: "availability.school",
298
+ placeholder: "School events"
299
+ },
300
+ {
301
+ name: "availability.private",
302
+ placeholder: "Private events"
303
+ },
304
+ {
305
+ name: "availability.corporate",
306
+ placeholder: "Corporate events"
307
+ }
308
+ ];
300
309
  var vendorLocationDescription = {
301
310
  helperText: "Description",
302
311
  isTextArea: true,
303
312
  name: "description",
304
313
  placeholder: "Description"
305
314
  };
315
+ var vendorMenuFields = [
316
+ {
317
+ helperText: "Item name",
318
+ name: "name",
319
+ placeholder: "Item name"
320
+ },
321
+ {
322
+ helperText: "Item Description",
323
+ isTextArea: true,
324
+ name: "description",
325
+ placeholder: "Item Description"
326
+ },
327
+ {
328
+ helperText: "Price",
329
+ keyboardType: "decimal-pad",
330
+ name: "price",
331
+ placeholder: "Price"
332
+ }
333
+ ];
306
334
  var availableCityTypes = [
307
335
  "Auckland",
308
336
  "Christchurch",
@@ -387,20 +415,6 @@ var vendorFoodFlavour = {
387
415
  name: "product.foodFlavors",
388
416
  placeholder: "Food flavours"
389
417
  };
390
- var vendorAvailability = [
391
- {
392
- name: "availability.school",
393
- placeholder: "School events"
394
- },
395
- {
396
- name: "availability.private",
397
- placeholder: "Private events"
398
- },
399
- {
400
- name: "availability.corporate",
401
- placeholder: "Corporate events"
402
- }
403
- ];
404
418
  var vendorCompliance = [
405
419
  {
406
420
  name: "compliance.liabilityInsurance",
@@ -462,11 +476,6 @@ var eventBasicInfoFields = [
462
476
  isTextArea: true,
463
477
  name: "description",
464
478
  placeholder: "Description"
465
- },
466
- {
467
- helperText: "Enter Promo code if you have one.",
468
- name: "promoCode",
469
- placeholder: "Promo code"
470
479
  }
471
480
  ];
472
481
  var eventStartDateFields = [
@@ -2065,7 +2074,7 @@ var EVENT = gql3`
2065
2074
  partners {
2066
2075
  ...PartnerFields
2067
2076
  }
2068
- promoCode
2077
+ promoCodes
2069
2078
  provider
2070
2079
  posterUsage {
2071
2080
  ...PosterUsageFields
@@ -2158,11 +2167,23 @@ var VENDOR_DATETIME_FIELDS_FRAGMENT = gql4`
2158
2167
  startTime
2159
2168
  }
2160
2169
  `;
2170
+ var VENDOR_MENU_FIELDS_FRAGMENT = gql4`
2171
+ fragment VendorMenuFields on VendorMenuType {
2172
+ name
2173
+ description
2174
+ price
2175
+ }
2176
+ `;
2161
2177
  var VENDOR = gql4`
2162
2178
  fragment VendorFields on VendorType {
2163
2179
  _id
2164
2180
  active
2165
2181
  adIds
2182
+ availability {
2183
+ corporate
2184
+ private
2185
+ school
2186
+ }
2166
2187
  vendorInfoId
2167
2188
  categories {
2168
2189
  ...CategoryFields
@@ -2196,8 +2217,10 @@ var VENDOR = gql4`
2196
2217
  partners {
2197
2218
  ...PartnerFields
2198
2219
  }
2199
- products
2200
- promoCode
2220
+ products {
2221
+ ...VendorMenuFields
2222
+ }
2223
+ promoCodes
2201
2224
  posterUsage {
2202
2225
  ...PosterUsageFields
2203
2226
  }
@@ -2206,7 +2229,6 @@ var VENDOR = gql4`
2206
2229
  socialMedia {
2207
2230
  ...SocialMediaFields
2208
2231
  }
2209
- specialities
2210
2232
  updatedAt
2211
2233
  vendorType
2212
2234
  }
@@ -2218,6 +2240,7 @@ var VENDOR = gql4`
2218
2240
  ${SOCIAL_MEDIA_FIELDS_FRAGMENT}
2219
2241
  ${POSTER_USAGE_FIELDS_FRAGMENT}
2220
2242
  ${PARTNER_FIELDS_FRAGMENT}
2243
+ ${VENDOR_MENU_FIELDS_FRAGMENT}
2221
2244
  `;
2222
2245
  var VENDOR_ATTRIBUTES_FRAGMENT = gql4`
2223
2246
  fragment VendorAttributesFields on VendorAttributesType {
@@ -2228,11 +2251,6 @@ var VENDOR_ATTRIBUTES_FRAGMENT = gql4`
2228
2251
  var VENDOR_INFO = gql4`
2229
2252
  fragment VendorInfoFields on VendorInfoType {
2230
2253
  _id
2231
- availability {
2232
- corporate
2233
- private
2234
- school
2235
- }
2236
2254
  compliance {
2237
2255
  foodBeverageLicense
2238
2256
  liabilityInsurance
@@ -3286,7 +3304,7 @@ var GET_RESOURCE_CONNECTIONS = gql17`
3286
3304
  partners {
3287
3305
  ...PartnerFields
3288
3306
  }
3289
- promoCode
3307
+ promoCodes
3290
3308
  provider
3291
3309
  posterUsage {
3292
3310
  ...PosterUsageFields
@@ -3307,6 +3325,11 @@ var GET_RESOURCE_CONNECTIONS = gql17`
3307
3325
  _id
3308
3326
  active
3309
3327
  adIds
3328
+ availability {
3329
+ corporate
3330
+ private
3331
+ school
3332
+ }
3310
3333
  vendorInfoId
3311
3334
  categories {
3312
3335
  ...CategoryFields
@@ -3340,14 +3363,15 @@ var GET_RESOURCE_CONNECTIONS = gql17`
3340
3363
  partners {
3341
3364
  ...PartnerFields
3342
3365
  }
3343
- products
3344
- promoCode
3366
+ products {
3367
+ ...VendorMenuFields
3368
+ }
3369
+ promoCodes
3345
3370
  posterUsage {
3346
3371
  ...PosterUsageFields
3347
3372
  }
3348
3373
  region
3349
3374
  relationIds
3350
- specialities
3351
3375
  socialMedia {
3352
3376
  ...SocialMediaFields
3353
3377
  }
@@ -3370,6 +3394,7 @@ var GET_RESOURCE_CONNECTIONS = gql17`
3370
3394
  ${SOCIAL_MEDIA_FIELDS_FRAGMENT}
3371
3395
  ${POSTER_USAGE_FIELDS_FRAGMENT}
3372
3396
  ${PARTNER_FIELDS_FRAGMENT}
3397
+ ${VENDOR_MENU_FIELDS_FRAGMENT}
3373
3398
  `;
3374
3399
 
3375
3400
  // src/graphql/mutations/relation.ts
@@ -4642,9 +4667,16 @@ var eventInfoSchema = yup2.object().shape({
4642
4667
 
4643
4668
  // src/yupSchema/vendor.ts
4644
4669
  import * as yup3 from "yup";
4670
+ var vendroMenuSchema = yup3.object().shape({
4671
+ description: yup3.string().trim().max(100).optional().nullable(),
4672
+ price: yup3.number().transform((value, originalValue) => originalValue === "" ? null : value).min(0).optional().nullable(),
4673
+ title: yup3.string().trim().max(50).optional().nullable()
4674
+ });
4645
4675
  var vendorSchema = globalResourceSchema.shape({
4646
4676
  categories: categorySchema.min(1, "Category list must contain at least one item").required("Categories are required"),
4647
4677
  multiLocation: yup3.boolean().required("Multi location is required"),
4678
+ products: yup3.array().of(vendroMenuSchema).optional().nullable(),
4679
+ specialties: yup3.array().of(vendroMenuSchema).optional().nullable(),
4648
4680
  vendorType: yup3.mixed().oneOf(Object.values(EnumVendorType)).required("Please select a Vendor type")
4649
4681
  });
4650
4682
  var vendorInfoSchema = yup3.object().shape({
@@ -4846,7 +4878,7 @@ var globalDefaultValues = {
4846
4878
  logoUpload: null,
4847
4879
  name: "",
4848
4880
  partners: null,
4849
- promoCode: "",
4881
+ promoCodes: [],
4850
4882
  region: "",
4851
4883
  socialMedia: []
4852
4884
  };
@@ -4903,19 +4935,18 @@ var defaultEventInfoFormValues = {
4903
4935
  };
4904
4936
  var defaultVendorFormValues = {
4905
4937
  ...globalDefaultValues,
4938
+ availability: {
4939
+ corporate: false,
4940
+ private: false,
4941
+ school: false
4942
+ },
4906
4943
  categories: [],
4907
4944
  locations: null,
4908
4945
  multiLocation: false,
4909
4946
  products: null,
4910
- specialities: null,
4911
4947
  vendorType: "stallholder" /* STALLHOLDER */
4912
4948
  };
4913
4949
  var defaultVendorInfoFormValues = {
4914
- availability: {
4915
- corporate: false,
4916
- private: false,
4917
- school: false
4918
- },
4919
4950
  compliance: { foodBeverageLicense: false, liabilityInsurance: false },
4920
4951
  contactDetails: {
4921
4952
  email: null,
@@ -4954,7 +4985,7 @@ function mapBaseResourceTypeToFormData(data) {
4954
4985
  name: data.name,
4955
4986
  owner: data.owner,
4956
4987
  partners: data.partners,
4957
- promoCode: data.promoCode,
4988
+ promoCodes: data.promoCodes,
4958
4989
  region: data.region,
4959
4990
  socialMedia: data.socialMedia
4960
4991
  };
@@ -4978,11 +5009,11 @@ function useVendorForm(data) {
4978
5009
  if (data) {
4979
5010
  reset({
4980
5011
  ...mapBaseResourceTypeToFormData(data),
5012
+ availability: data.availability,
4981
5013
  categories: data.categories,
4982
5014
  locations: data.locations,
4983
5015
  multiLocation: data.multiLocation,
4984
5016
  products: data.products,
4985
- specialities: data.specialities,
4986
5017
  vendorType: data.vendorType
4987
5018
  });
4988
5019
  } else {
@@ -4992,6 +5023,7 @@ function useVendorForm(data) {
4992
5023
  const {
4993
5024
  _id,
4994
5025
  active,
5026
+ availability,
4995
5027
  categories,
4996
5028
  cover,
4997
5029
  coverUpload,
@@ -5006,10 +5038,9 @@ function useVendorForm(data) {
5006
5038
  owner,
5007
5039
  partners,
5008
5040
  products,
5009
- promoCode,
5041
+ promoCodes,
5010
5042
  region,
5011
5043
  socialMedia: socialMedia2,
5012
- specialities,
5013
5044
  vendorType
5014
5045
  } = getValues();
5015
5046
  return {
@@ -5017,6 +5048,7 @@ function useVendorForm(data) {
5017
5048
  fields: {
5018
5049
  _id,
5019
5050
  active,
5051
+ availability,
5020
5052
  categories,
5021
5053
  cover,
5022
5054
  coverUpload,
@@ -5031,10 +5063,9 @@ function useVendorForm(data) {
5031
5063
  owner,
5032
5064
  partners,
5033
5065
  products,
5034
- promoCode,
5066
+ promoCodes,
5035
5067
  region,
5036
5068
  socialMedia: socialMedia2,
5037
- specialities,
5038
5069
  vendorType
5039
5070
  },
5040
5071
  formState: { errors },
@@ -5066,7 +5097,6 @@ function useVendorInfoForm(data) {
5066
5097
  if (data) {
5067
5098
  reset({
5068
5099
  _id: data._id,
5069
- availability: data.availability,
5070
5100
  compliance: data.compliance,
5071
5101
  contactDetails: data.contactDetails,
5072
5102
  documents: data.documents,
@@ -5082,7 +5112,6 @@ function useVendorInfoForm(data) {
5082
5112
  }, [data]);
5083
5113
  const {
5084
5114
  _id,
5085
- availability,
5086
5115
  compliance,
5087
5116
  contactDetails,
5088
5117
  documents,
@@ -5096,7 +5125,6 @@ function useVendorInfoForm(data) {
5096
5125
  control,
5097
5126
  fields: {
5098
5127
  _id,
5099
- availability,
5100
5128
  compliance,
5101
5129
  contactDetails,
5102
5130
  documents,
@@ -5164,7 +5192,7 @@ function useEventForm(data) {
5164
5192
  nzbn,
5165
5193
  owner,
5166
5194
  partners,
5167
- promoCode,
5195
+ promoCodes,
5168
5196
  provider,
5169
5197
  rainOrShine,
5170
5198
  region,
@@ -5190,7 +5218,7 @@ function useEventForm(data) {
5190
5218
  nzbn,
5191
5219
  owner,
5192
5220
  partners,
5193
- promoCode,
5221
+ promoCodes,
5194
5222
  provider,
5195
5223
  rainOrShine,
5196
5224
  region,
@@ -6009,6 +6037,7 @@ export {
6009
6037
  vendorFullAddress,
6010
6038
  vendorGazebo,
6011
6039
  vendorLocationDescription,
6040
+ vendorMenuFields,
6012
6041
  vendorMultiLocation,
6013
6042
  vendorPackaging,
6014
6043
  vendorPriceRange,