@timardex/cluemart-shared 1.0.22 → 1.0.24

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 (41) hide show
  1. package/dist/{chunk-K5NK2CK5.mjs → chunk-GMCWFVU5.mjs} +2 -2
  2. package/dist/{chunk-L2H5WFGC.mjs → chunk-GMOTXE7A.mjs} +12 -2
  3. package/dist/chunk-GMOTXE7A.mjs.map +1 -0
  4. package/dist/enums/index.cjs +11 -0
  5. package/dist/enums/index.cjs.map +1 -1
  6. package/dist/enums/index.d.mts +9 -1
  7. package/dist/enums/index.d.ts +9 -1
  8. package/dist/enums/index.mjs +3 -1
  9. package/dist/formFields/index.cjs +53 -0
  10. package/dist/formFields/index.cjs.map +1 -1
  11. package/dist/formFields/index.d.mts +6 -3
  12. package/dist/formFields/index.d.ts +6 -3
  13. package/dist/formFields/index.mjs +53 -2
  14. package/dist/formFields/index.mjs.map +1 -1
  15. package/dist/{global-DRq1uIHw.d.ts → global-CKXxsx3Q.d.ts} +14 -54
  16. package/dist/{global-B_4lAGhj.d.mts → global-CbY7duG3.d.mts} +14 -54
  17. package/dist/graphql/index.cjs +32 -1
  18. package/dist/graphql/index.cjs.map +1 -1
  19. package/dist/graphql/index.d.mts +1 -1
  20. package/dist/graphql/index.d.ts +1 -1
  21. package/dist/graphql/index.mjs +32 -1
  22. package/dist/graphql/index.mjs.map +1 -1
  23. package/dist/hooks/index.cjs.map +1 -1
  24. package/dist/hooks/index.d.mts +1 -1
  25. package/dist/hooks/index.d.ts +1 -1
  26. package/dist/hooks/index.mjs +2 -2
  27. package/dist/index.cjs +96 -1
  28. package/dist/index.cjs.map +1 -1
  29. package/dist/index.d.mts +24 -53
  30. package/dist/index.d.ts +24 -53
  31. package/dist/index.mjs +93 -1
  32. package/dist/index.mjs.map +1 -1
  33. package/dist/types/index.d.mts +1 -1
  34. package/dist/types/index.d.ts +1 -1
  35. package/dist/utils/index.cjs.map +1 -1
  36. package/dist/utils/index.d.mts +1 -1
  37. package/dist/utils/index.d.ts +1 -1
  38. package/dist/utils/index.mjs +2 -2
  39. package/package.json +15 -15
  40. package/dist/chunk-L2H5WFGC.mjs.map +0 -1
  41. /package/dist/{chunk-K5NK2CK5.mjs.map → chunk-GMCWFVU5.mjs.map} +0 -0
package/dist/index.d.mts CHANGED
@@ -74,6 +74,14 @@ declare enum EnumUserRole {
74
74
  ADMIN = "admin",
75
75
  CUSTOMER = "customer"
76
76
  }
77
+ declare enum EnumSocialMedia {
78
+ FACEBOOK = "facebook",
79
+ INSTAGRAM = "instagram",
80
+ TIKTOK = "tiktok",
81
+ TWITTER = "twitter",
82
+ WEBSITE = "website",
83
+ YOUTUBE = "youtube"
84
+ }
77
85
 
78
86
  type LoginFormData = {
79
87
  email: string;
@@ -263,21 +271,9 @@ interface MarketType extends BaseResourceType {
263
271
  provider: string;
264
272
  tags: string[];
265
273
  }
266
- interface MarketInfoType {
274
+ type MarketInfoType = Omit<MarketInfoFormData, "_id"> & {
267
275
  _id: string;
268
- applicationDeadlineHours: number;
269
- dateTime: DateTimeWithPriceType[];
270
- marketId: string;
271
- paymentDueHours: number;
272
- paymentMethod: EnumPaymentMethod;
273
- paymentTarget: {
274
- accountHolderName?: string;
275
- accountNumber?: string;
276
- link?: string;
277
- };
278
- rejectionPolicy: EnumRejectionPolicy;
279
- stallCapacity: number;
280
- }
276
+ };
281
277
  interface MarketWithConnectionDatesType extends MarketType {
282
278
  relationDates: RelationDate[] | undefined;
283
279
  }
@@ -351,34 +347,9 @@ interface StallholderType extends BaseResourceType {
351
347
  products: StallholderFormData["products"];
352
348
  specialities: string[] | null;
353
349
  }
354
- interface StallholderApplyFormType {
350
+ type StallholderApplyFormType = Omit<StallholderApplyFormFormData, "_id" | "foodSafetyGradeFilesUpload"> & {
355
351
  _id: string;
356
- electricity: {
357
- details: string | null;
358
- isRequired: boolean;
359
- };
360
- foodSafetyGradeFiles: string[] | null;
361
- gazebo: {
362
- details: string | null;
363
- isRequired: boolean;
364
- };
365
- packaging: string[];
366
- paymentMethod: EnumPaymentMethod;
367
- priceRange: {
368
- max: number;
369
- min: number;
370
- };
371
- producedIn: string[];
372
- stallholderId: string;
373
- stallSize: {
374
- depth: number;
375
- width: number;
376
- };
377
- table: {
378
- details: string | null;
379
- isRequired: boolean;
380
- };
381
- }
352
+ };
382
353
  interface SatllholderWithConnectionDatesType extends StallholderType {
383
354
  relationDates: RelationDate[] | undefined;
384
355
  }
@@ -435,6 +406,10 @@ type ResourceImageType = {
435
406
  source: string;
436
407
  title: string;
437
408
  };
409
+ type SocialMediaType = {
410
+ name: EnumSocialMedia;
411
+ link: string;
412
+ };
438
413
  interface BaseResourceTypeFormData {
439
414
  _id?: string;
440
415
  active: boolean;
@@ -448,22 +423,15 @@ interface BaseResourceTypeFormData {
448
423
  name: string;
449
424
  promoCode?: string | null;
450
425
  region: string;
426
+ socialMedia?: SocialMediaType[] | null;
451
427
  }
452
- interface BaseResourceType {
428
+ type BaseResourceType = Omit<BaseResourceTypeFormData, "_id" | "coverUpload" | "imagesUpload" | "logoUpload"> & {
453
429
  _id: string;
454
- active: boolean;
455
- cover: ResourceImageType;
456
430
  createdAt: string;
457
- description: string;
458
- images: ResourceImageType[] | null;
459
- logo: ResourceImageType | null;
460
- name: string;
461
431
  owner: Pick<UserType, "_id" | "email" | "licences">;
462
- promoCode: string | null;
463
- region: string;
464
432
  relationIds: string[] | null;
465
433
  updatedAt: string;
466
- }
434
+ };
467
435
  type LocationType = {
468
436
  city: string;
469
437
  coordinates: number[];
@@ -498,7 +466,7 @@ interface FormField {
498
466
  disabled?: boolean;
499
467
  helperText?: string;
500
468
  isTextArea?: boolean;
501
- keyboardType?: "default" | "email-address" | "number-pad";
469
+ keyboardType?: "default" | "email-address" | "number-pad" | "url";
502
470
  name: string;
503
471
  placeholder: string;
504
472
  secureTextEntry?: boolean;
@@ -1052,4 +1020,7 @@ declare const profileFields: FormField[];
1052
1020
  declare const availableCategories: Category[];
1053
1021
  declare const categoryColors: Record<string, string>;
1054
1022
 
1055
- export { type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatInput, type ChatMessageInput, type ChatMessageType, type ChatType, type CreateLoginFormData, type CreateMarketFormData, type CreateMarketInfoFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateStallholderApplyFormFormData, type CreateStallholderFormData, type CreateUserFormData, type CreateValidateTokenFormData, type DateTimeType, EnumInviteStatus, EnumNotification, EnumPaymentMethod, EnumRegions, EnumRejectionPolicy, EnumRelationResource, EnumResourceType, EnumResourceTypeIcon, EnumUserLicence, EnumUserRole, type FormDateField, type FormField, type GeocodeLocation, type ImageObjectType, ImageTypeEnum, type LocationType, type LoginFormData, type MapMultiLocation, type MarketFormData, type MarketInfoFormData, type MarketInfoType, type MarketType, type MarketWithConnectionDatesType, type NotificationType, type Nullable, type OptionItem, type PlacePrediction, type PosterInputType, type Region, type RegisterFormData, type RelationDate, type RelationLog, type RelationType, type RequestPasswordResetFormData, type ResetPasswordFormData, type ResourceConnectionsType, type ResourceImageType, type SatllholderWithConnectionDatesType, type StallholderApplyFormFormData, type StallholderApplyFormType, type StallholderAttributes, type StallholderFormData, type StallholderLocation, type StallholderType, type Subcategory, type UserFormData, type UserType, type ValidateTokenFormData, availableCategories, availableCityOptions, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, dateFormat, defaultMarketFormValues, defaultMarketInfoFormValues, defaultRegion, defaultStallholderApplyFormValues, defaultStallholderFormValues, formatDate, formatTimestamp, getCurrentAndFutureDates, getFutureDatesAfterThreshold, globalDefaultValues, loginFields, mapArrayToOptions, marketBasicInfoFields, marketEndDateFields, marketInfo, marketInfoPaymentTarget, marketPriceByDateFields, marketStartDateFields, packagingOptions, paymentMethodOptions, producedIngOptions, profileFields, registerFields, rejectionPolicyOptions, removeTypename, requestPasswordResetFields, resetPasswordFields, sortDatesByProximity, stallholderBasicInfoFields, stallholderElectricity, stallholderEndDateFields, stallholderFullAddress, stallholderGazebo, stallholderLocationDescription, stallholderMultiLocation, stallholderPackaging, stallholderPaymentMethod, stallholderPriceRange, stallholderProducedIn, stallholderStallSize, stallholderStartDateFields, stallholderTable, statusOptions, tagOptions, timeFormat, truncateText, useAddParticipantToChat, useAddUserFavouriteResource, useCreateChat, useCreateMarket, useCreateMarketInfo, useCreatePoster, useCreateRelation, useCreateStallholder, useCreateStallholderApplyForm, useCreateUser, useDeleteChat, useDeleteMarket, useDeleteRelation, useDeleteStallholder, useGetChat, useGetChatSubscription, useGetMarket, useGetMarketInfo, useGetMarketRelations, useGetMarkets, useGetMarketsByRegion, useGetMarketsNearMe, useGetNotification, useGetRelation, useGetRelationByMarketAndStallholder, useGetResourceConnections, useGetStallholder, useGetStallholderApplyForm, useGetStallholderRelations, useGetStallholders, useGetStallholdersByRegion, useGetUser, useGetUserChats, useGetUserFavourites, useGetUserMarkets, useGetUserNotifications, useGetUsers, useLocationSearch, useLogin, useLoginForm, useMarketForm, useMarketInfoForm, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchMarkets, useSearchStallholders, useSendChatMessage, useStallholderApplyForm, useStallholderForm, useUpdateMarket, useUpdateMarketInfo, useUpdateRelation, useUpdateStallholder, useUpdateStallholderApplyForm, useUpdateUser, useUserForm, useValidateToken, useValidateTokenForm, validateTokenFields };
1023
+ declare const socialMediaIcon: Record<EnumSocialMedia, string>;
1024
+ declare const socialMediaFields: FormField[];
1025
+
1026
+ export { type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatInput, type ChatMessageInput, type ChatMessageType, type ChatType, type CreateLoginFormData, type CreateMarketFormData, type CreateMarketInfoFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateStallholderApplyFormFormData, type CreateStallholderFormData, type CreateUserFormData, type CreateValidateTokenFormData, type DateTimeType, EnumInviteStatus, EnumNotification, EnumPaymentMethod, EnumRegions, EnumRejectionPolicy, EnumRelationResource, EnumResourceType, EnumResourceTypeIcon, EnumSocialMedia, EnumUserLicence, EnumUserRole, type FormDateField, type FormField, type GeocodeLocation, type ImageObjectType, ImageTypeEnum, type LocationType, type LoginFormData, type MapMultiLocation, type MarketFormData, type MarketInfoFormData, type MarketInfoType, type MarketType, type MarketWithConnectionDatesType, type NotificationType, type Nullable, type OptionItem, type PlacePrediction, type PosterInputType, type Region, type RegisterFormData, type RelationDate, type RelationLog, type RelationType, type RequestPasswordResetFormData, type ResetPasswordFormData, type ResourceConnectionsType, type ResourceImageType, type SatllholderWithConnectionDatesType, type SocialMediaType, type StallholderApplyFormFormData, type StallholderApplyFormType, type StallholderAttributes, type StallholderFormData, type StallholderLocation, type StallholderType, type Subcategory, type UserFormData, type UserType, type ValidateTokenFormData, availableCategories, availableCityOptions, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, dateFormat, defaultMarketFormValues, defaultMarketInfoFormValues, defaultRegion, defaultStallholderApplyFormValues, defaultStallholderFormValues, formatDate, formatTimestamp, getCurrentAndFutureDates, getFutureDatesAfterThreshold, globalDefaultValues, loginFields, mapArrayToOptions, marketBasicInfoFields, marketEndDateFields, marketInfo, marketInfoPaymentTarget, marketPriceByDateFields, marketStartDateFields, packagingOptions, paymentMethodOptions, producedIngOptions, profileFields, registerFields, rejectionPolicyOptions, removeTypename, requestPasswordResetFields, resetPasswordFields, socialMediaFields, socialMediaIcon, sortDatesByProximity, stallholderBasicInfoFields, stallholderElectricity, stallholderEndDateFields, stallholderFullAddress, stallholderGazebo, stallholderLocationDescription, stallholderMultiLocation, stallholderPackaging, stallholderPaymentMethod, stallholderPriceRange, stallholderProducedIn, stallholderStallSize, stallholderStartDateFields, stallholderTable, statusOptions, tagOptions, timeFormat, truncateText, useAddParticipantToChat, useAddUserFavouriteResource, useCreateChat, useCreateMarket, useCreateMarketInfo, useCreatePoster, useCreateRelation, useCreateStallholder, useCreateStallholderApplyForm, useCreateUser, useDeleteChat, useDeleteMarket, useDeleteRelation, useDeleteStallholder, useGetChat, useGetChatSubscription, useGetMarket, useGetMarketInfo, useGetMarketRelations, useGetMarkets, useGetMarketsByRegion, useGetMarketsNearMe, useGetNotification, useGetRelation, useGetRelationByMarketAndStallholder, useGetResourceConnections, useGetStallholder, useGetStallholderApplyForm, useGetStallholderRelations, useGetStallholders, useGetStallholdersByRegion, useGetUser, useGetUserChats, useGetUserFavourites, useGetUserMarkets, useGetUserNotifications, useGetUsers, useLocationSearch, useLogin, useLoginForm, useMarketForm, useMarketInfoForm, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchMarkets, useSearchStallholders, useSendChatMessage, useStallholderApplyForm, useStallholderForm, useUpdateMarket, useUpdateMarketInfo, useUpdateRelation, useUpdateStallholder, useUpdateStallholderApplyForm, useUpdateUser, useUserForm, useValidateToken, useValidateTokenForm, validateTokenFields };
package/dist/index.d.ts CHANGED
@@ -74,6 +74,14 @@ declare enum EnumUserRole {
74
74
  ADMIN = "admin",
75
75
  CUSTOMER = "customer"
76
76
  }
77
+ declare enum EnumSocialMedia {
78
+ FACEBOOK = "facebook",
79
+ INSTAGRAM = "instagram",
80
+ TIKTOK = "tiktok",
81
+ TWITTER = "twitter",
82
+ WEBSITE = "website",
83
+ YOUTUBE = "youtube"
84
+ }
77
85
 
78
86
  type LoginFormData = {
79
87
  email: string;
@@ -263,21 +271,9 @@ interface MarketType extends BaseResourceType {
263
271
  provider: string;
264
272
  tags: string[];
265
273
  }
266
- interface MarketInfoType {
274
+ type MarketInfoType = Omit<MarketInfoFormData, "_id"> & {
267
275
  _id: string;
268
- applicationDeadlineHours: number;
269
- dateTime: DateTimeWithPriceType[];
270
- marketId: string;
271
- paymentDueHours: number;
272
- paymentMethod: EnumPaymentMethod;
273
- paymentTarget: {
274
- accountHolderName?: string;
275
- accountNumber?: string;
276
- link?: string;
277
- };
278
- rejectionPolicy: EnumRejectionPolicy;
279
- stallCapacity: number;
280
- }
276
+ };
281
277
  interface MarketWithConnectionDatesType extends MarketType {
282
278
  relationDates: RelationDate[] | undefined;
283
279
  }
@@ -351,34 +347,9 @@ interface StallholderType extends BaseResourceType {
351
347
  products: StallholderFormData["products"];
352
348
  specialities: string[] | null;
353
349
  }
354
- interface StallholderApplyFormType {
350
+ type StallholderApplyFormType = Omit<StallholderApplyFormFormData, "_id" | "foodSafetyGradeFilesUpload"> & {
355
351
  _id: string;
356
- electricity: {
357
- details: string | null;
358
- isRequired: boolean;
359
- };
360
- foodSafetyGradeFiles: string[] | null;
361
- gazebo: {
362
- details: string | null;
363
- isRequired: boolean;
364
- };
365
- packaging: string[];
366
- paymentMethod: EnumPaymentMethod;
367
- priceRange: {
368
- max: number;
369
- min: number;
370
- };
371
- producedIn: string[];
372
- stallholderId: string;
373
- stallSize: {
374
- depth: number;
375
- width: number;
376
- };
377
- table: {
378
- details: string | null;
379
- isRequired: boolean;
380
- };
381
- }
352
+ };
382
353
  interface SatllholderWithConnectionDatesType extends StallholderType {
383
354
  relationDates: RelationDate[] | undefined;
384
355
  }
@@ -435,6 +406,10 @@ type ResourceImageType = {
435
406
  source: string;
436
407
  title: string;
437
408
  };
409
+ type SocialMediaType = {
410
+ name: EnumSocialMedia;
411
+ link: string;
412
+ };
438
413
  interface BaseResourceTypeFormData {
439
414
  _id?: string;
440
415
  active: boolean;
@@ -448,22 +423,15 @@ interface BaseResourceTypeFormData {
448
423
  name: string;
449
424
  promoCode?: string | null;
450
425
  region: string;
426
+ socialMedia?: SocialMediaType[] | null;
451
427
  }
452
- interface BaseResourceType {
428
+ type BaseResourceType = Omit<BaseResourceTypeFormData, "_id" | "coverUpload" | "imagesUpload" | "logoUpload"> & {
453
429
  _id: string;
454
- active: boolean;
455
- cover: ResourceImageType;
456
430
  createdAt: string;
457
- description: string;
458
- images: ResourceImageType[] | null;
459
- logo: ResourceImageType | null;
460
- name: string;
461
431
  owner: Pick<UserType, "_id" | "email" | "licences">;
462
- promoCode: string | null;
463
- region: string;
464
432
  relationIds: string[] | null;
465
433
  updatedAt: string;
466
- }
434
+ };
467
435
  type LocationType = {
468
436
  city: string;
469
437
  coordinates: number[];
@@ -498,7 +466,7 @@ interface FormField {
498
466
  disabled?: boolean;
499
467
  helperText?: string;
500
468
  isTextArea?: boolean;
501
- keyboardType?: "default" | "email-address" | "number-pad";
469
+ keyboardType?: "default" | "email-address" | "number-pad" | "url";
502
470
  name: string;
503
471
  placeholder: string;
504
472
  secureTextEntry?: boolean;
@@ -1052,4 +1020,7 @@ declare const profileFields: FormField[];
1052
1020
  declare const availableCategories: Category[];
1053
1021
  declare const categoryColors: Record<string, string>;
1054
1022
 
1055
- export { type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatInput, type ChatMessageInput, type ChatMessageType, type ChatType, type CreateLoginFormData, type CreateMarketFormData, type CreateMarketInfoFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateStallholderApplyFormFormData, type CreateStallholderFormData, type CreateUserFormData, type CreateValidateTokenFormData, type DateTimeType, EnumInviteStatus, EnumNotification, EnumPaymentMethod, EnumRegions, EnumRejectionPolicy, EnumRelationResource, EnumResourceType, EnumResourceTypeIcon, EnumUserLicence, EnumUserRole, type FormDateField, type FormField, type GeocodeLocation, type ImageObjectType, ImageTypeEnum, type LocationType, type LoginFormData, type MapMultiLocation, type MarketFormData, type MarketInfoFormData, type MarketInfoType, type MarketType, type MarketWithConnectionDatesType, type NotificationType, type Nullable, type OptionItem, type PlacePrediction, type PosterInputType, type Region, type RegisterFormData, type RelationDate, type RelationLog, type RelationType, type RequestPasswordResetFormData, type ResetPasswordFormData, type ResourceConnectionsType, type ResourceImageType, type SatllholderWithConnectionDatesType, type StallholderApplyFormFormData, type StallholderApplyFormType, type StallholderAttributes, type StallholderFormData, type StallholderLocation, type StallholderType, type Subcategory, type UserFormData, type UserType, type ValidateTokenFormData, availableCategories, availableCityOptions, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, dateFormat, defaultMarketFormValues, defaultMarketInfoFormValues, defaultRegion, defaultStallholderApplyFormValues, defaultStallholderFormValues, formatDate, formatTimestamp, getCurrentAndFutureDates, getFutureDatesAfterThreshold, globalDefaultValues, loginFields, mapArrayToOptions, marketBasicInfoFields, marketEndDateFields, marketInfo, marketInfoPaymentTarget, marketPriceByDateFields, marketStartDateFields, packagingOptions, paymentMethodOptions, producedIngOptions, profileFields, registerFields, rejectionPolicyOptions, removeTypename, requestPasswordResetFields, resetPasswordFields, sortDatesByProximity, stallholderBasicInfoFields, stallholderElectricity, stallholderEndDateFields, stallholderFullAddress, stallholderGazebo, stallholderLocationDescription, stallholderMultiLocation, stallholderPackaging, stallholderPaymentMethod, stallholderPriceRange, stallholderProducedIn, stallholderStallSize, stallholderStartDateFields, stallholderTable, statusOptions, tagOptions, timeFormat, truncateText, useAddParticipantToChat, useAddUserFavouriteResource, useCreateChat, useCreateMarket, useCreateMarketInfo, useCreatePoster, useCreateRelation, useCreateStallholder, useCreateStallholderApplyForm, useCreateUser, useDeleteChat, useDeleteMarket, useDeleteRelation, useDeleteStallholder, useGetChat, useGetChatSubscription, useGetMarket, useGetMarketInfo, useGetMarketRelations, useGetMarkets, useGetMarketsByRegion, useGetMarketsNearMe, useGetNotification, useGetRelation, useGetRelationByMarketAndStallholder, useGetResourceConnections, useGetStallholder, useGetStallholderApplyForm, useGetStallholderRelations, useGetStallholders, useGetStallholdersByRegion, useGetUser, useGetUserChats, useGetUserFavourites, useGetUserMarkets, useGetUserNotifications, useGetUsers, useLocationSearch, useLogin, useLoginForm, useMarketForm, useMarketInfoForm, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchMarkets, useSearchStallholders, useSendChatMessage, useStallholderApplyForm, useStallholderForm, useUpdateMarket, useUpdateMarketInfo, useUpdateRelation, useUpdateStallholder, useUpdateStallholderApplyForm, useUpdateUser, useUserForm, useValidateToken, useValidateTokenForm, validateTokenFields };
1023
+ declare const socialMediaIcon: Record<EnumSocialMedia, string>;
1024
+ declare const socialMediaFields: FormField[];
1025
+
1026
+ export { type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatInput, type ChatMessageInput, type ChatMessageType, type ChatType, type CreateLoginFormData, type CreateMarketFormData, type CreateMarketInfoFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateStallholderApplyFormFormData, type CreateStallholderFormData, type CreateUserFormData, type CreateValidateTokenFormData, type DateTimeType, EnumInviteStatus, EnumNotification, EnumPaymentMethod, EnumRegions, EnumRejectionPolicy, EnumRelationResource, EnumResourceType, EnumResourceTypeIcon, EnumSocialMedia, EnumUserLicence, EnumUserRole, type FormDateField, type FormField, type GeocodeLocation, type ImageObjectType, ImageTypeEnum, type LocationType, type LoginFormData, type MapMultiLocation, type MarketFormData, type MarketInfoFormData, type MarketInfoType, type MarketType, type MarketWithConnectionDatesType, type NotificationType, type Nullable, type OptionItem, type PlacePrediction, type PosterInputType, type Region, type RegisterFormData, type RelationDate, type RelationLog, type RelationType, type RequestPasswordResetFormData, type ResetPasswordFormData, type ResourceConnectionsType, type ResourceImageType, type SatllholderWithConnectionDatesType, type SocialMediaType, type StallholderApplyFormFormData, type StallholderApplyFormType, type StallholderAttributes, type StallholderFormData, type StallholderLocation, type StallholderType, type Subcategory, type UserFormData, type UserType, type ValidateTokenFormData, availableCategories, availableCityOptions, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, dateFormat, defaultMarketFormValues, defaultMarketInfoFormValues, defaultRegion, defaultStallholderApplyFormValues, defaultStallholderFormValues, formatDate, formatTimestamp, getCurrentAndFutureDates, getFutureDatesAfterThreshold, globalDefaultValues, loginFields, mapArrayToOptions, marketBasicInfoFields, marketEndDateFields, marketInfo, marketInfoPaymentTarget, marketPriceByDateFields, marketStartDateFields, packagingOptions, paymentMethodOptions, producedIngOptions, profileFields, registerFields, rejectionPolicyOptions, removeTypename, requestPasswordResetFields, resetPasswordFields, socialMediaFields, socialMediaIcon, sortDatesByProximity, stallholderBasicInfoFields, stallholderElectricity, stallholderEndDateFields, stallholderFullAddress, stallholderGazebo, stallholderLocationDescription, stallholderMultiLocation, stallholderPackaging, stallholderPaymentMethod, stallholderPriceRange, stallholderProducedIn, stallholderStallSize, stallholderStartDateFields, stallholderTable, statusOptions, tagOptions, timeFormat, truncateText, useAddParticipantToChat, useAddUserFavouriteResource, useCreateChat, useCreateMarket, useCreateMarketInfo, useCreatePoster, useCreateRelation, useCreateStallholder, useCreateStallholderApplyForm, useCreateUser, useDeleteChat, useDeleteMarket, useDeleteRelation, useDeleteStallholder, useGetChat, useGetChatSubscription, useGetMarket, useGetMarketInfo, useGetMarketRelations, useGetMarkets, useGetMarketsByRegion, useGetMarketsNearMe, useGetNotification, useGetRelation, useGetRelationByMarketAndStallholder, useGetResourceConnections, useGetStallholder, useGetStallholderApplyForm, useGetStallholderRelations, useGetStallholders, useGetStallholdersByRegion, useGetUser, useGetUserChats, useGetUserFavourites, useGetUserMarkets, useGetUserNotifications, useGetUsers, useLocationSearch, useLogin, useLoginForm, useMarketForm, useMarketInfoForm, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchMarkets, useSearchStallholders, useSendChatMessage, useStallholderApplyForm, useStallholderForm, useUpdateMarket, useUpdateMarketInfo, useUpdateRelation, useUpdateStallholder, useUpdateStallholderApplyForm, useUpdateUser, useUserForm, useValidateToken, useValidateTokenForm, validateTokenFields };
package/dist/index.mjs CHANGED
@@ -90,6 +90,15 @@ var EnumUserRole = /* @__PURE__ */ ((EnumUserRole2) => {
90
90
  EnumUserRole2["CUSTOMER"] = "customer";
91
91
  return EnumUserRole2;
92
92
  })(EnumUserRole || {});
93
+ var EnumSocialMedia = /* @__PURE__ */ ((EnumSocialMedia2) => {
94
+ EnumSocialMedia2["FACEBOOK"] = "facebook";
95
+ EnumSocialMedia2["INSTAGRAM"] = "instagram";
96
+ EnumSocialMedia2["TIKTOK"] = "tiktok";
97
+ EnumSocialMedia2["TWITTER"] = "twitter";
98
+ EnumSocialMedia2["WEBSITE"] = "website";
99
+ EnumSocialMedia2["YOUTUBE"] = "youtube";
100
+ return EnumSocialMedia2;
101
+ })(EnumSocialMedia || {});
93
102
 
94
103
  // src/utils/index.ts
95
104
  var dateFormat = "DD-MM-YYYY";
@@ -1228,6 +1237,12 @@ import { gql as gql2 } from "@apollo/client";
1228
1237
 
1229
1238
  // src/graphql/queries/global.ts
1230
1239
  import { gql } from "@apollo/client";
1240
+ var SOCIAL_MEDIA_FIELDS_FRAGMENT = gql`
1241
+ fragment SocialMediaFields on SocialMediaType {
1242
+ name
1243
+ link
1244
+ }
1245
+ `;
1231
1246
  var RESOURCE_IMAGE_FIELDS_FRAGMENT = gql`
1232
1247
  fragment ResourceImageFields on ResourceImageType {
1233
1248
  source
@@ -1621,6 +1636,9 @@ var MARKET = gql5`
1621
1636
  provider
1622
1637
  region
1623
1638
  relationIds
1639
+ socialMedia {
1640
+ ...SocialMediaFields
1641
+ }
1624
1642
  tags
1625
1643
  updatedAt
1626
1644
  }
@@ -1628,6 +1646,7 @@ var MARKET = gql5`
1628
1646
  ${MARKET_LOCATION_FIELDS_FRAGMENT}
1629
1647
  ${OWNER_FIELDS_FRAGMENT}
1630
1648
  ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
1649
+ ${SOCIAL_MEDIA_FIELDS_FRAGMENT}
1631
1650
  `;
1632
1651
  var GET_MARKETS = gql5`
1633
1652
  query getMarkets {
@@ -1779,6 +1798,9 @@ var STALLHOLDER = gql7`
1779
1798
  promoCode
1780
1799
  region
1781
1800
  relationIds
1801
+ socialMedia {
1802
+ ...SocialMediaFields
1803
+ }
1782
1804
  specialities
1783
1805
  updatedAt
1784
1806
  }
@@ -1787,6 +1809,7 @@ var STALLHOLDER = gql7`
1787
1809
  ${STALLHOLDER_LOCATION_FIELDS_FRAGMENT}
1788
1810
  ${OWNER_FIELDS_FRAGMENT}
1789
1811
  ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
1812
+ ${SOCIAL_MEDIA_FIELDS_FRAGMENT}
1790
1813
  `;
1791
1814
  var STALLHOLDER_APPLY_FORM = gql7`
1792
1815
  fragment StallholderApplyFormFields on StallholderApplyFormType {
@@ -1941,13 +1964,18 @@ var useCreateMarketInfo = () => {
1941
1964
  {
1942
1965
  awaitRefetchQueries: true,
1943
1966
  refetchQueries: (mutationResult) => {
1944
- const marketId = mutationResult?.data?.createMarketInfo?.stallholderId;
1967
+ const marketId = mutationResult?.data?.createMarketInfo?.marketId;
1945
1968
  if (!marketId) return [];
1946
1969
  return [
1947
1970
  {
1948
1971
  query: GET_MARKET_INFO,
1949
1972
  variables: { marketId }
1950
1973
  // Pass the marketId for refetching
1974
+ },
1975
+ {
1976
+ query: GET_MARKET,
1977
+ variables: { _id: marketId }
1978
+ // Pass the marketId for refetching
1951
1979
  }
1952
1980
  ];
1953
1981
  }
@@ -1968,6 +1996,11 @@ var useUpdateMarketInfo = () => {
1968
1996
  query: GET_MARKET_INFO,
1969
1997
  variables: { marketId }
1970
1998
  // Pass the marketId for refetching
1999
+ },
2000
+ {
2001
+ query: GET_MARKET,
2002
+ variables: { _id: marketId }
2003
+ // Pass the marketId for refetching
1971
2004
  }
1972
2005
  ];
1973
2006
  }
@@ -2181,6 +2214,9 @@ var GET_RESOURCE_CONNECTIONS = gql10`
2181
2214
  provider
2182
2215
  region
2183
2216
  relationIds
2217
+ socialMedia {
2218
+ ...SocialMediaFields
2219
+ }
2184
2220
  tags
2185
2221
  updatedAt
2186
2222
  relationDates {
@@ -2224,6 +2260,9 @@ var GET_RESOURCE_CONNECTIONS = gql10`
2224
2260
  region
2225
2261
  relationIds
2226
2262
  specialities
2263
+ socialMedia {
2264
+ ...SocialMediaFields
2265
+ }
2227
2266
  updatedAt
2228
2267
  relationDates {
2229
2268
  ...RelationDates
@@ -2239,6 +2278,7 @@ var GET_RESOURCE_CONNECTIONS = gql10`
2239
2278
  ${STALLHOLDER_DATETIME_FIELDS_FRAGMENT}
2240
2279
  ${STALLHOLDER_LOCATION_FIELDS_FRAGMENT}
2241
2280
  ${RELATION_DATES_FRAGMENT}
2281
+ ${SOCIAL_MEDIA_FIELDS_FRAGMENT}
2242
2282
  `;
2243
2283
 
2244
2284
  // src/graphql/mutations/relation.ts
@@ -3074,6 +3114,7 @@ var marketInfoPaymentTarget = [
3074
3114
  },
3075
3115
  {
3076
3116
  helperText: "Link to payment target *",
3117
+ keyboardType: "url",
3077
3118
  name: "paymentTarget.link",
3078
3119
  placeholder: "Link to payment target"
3079
3120
  }
@@ -3511,6 +3552,54 @@ var categoryColors = {
3511
3552
  "home-garden-household": "#006400",
3512
3553
  "toys-pets": "#3357FF"
3513
3554
  };
3555
+
3556
+ // src/formFields/socialMedia.ts
3557
+ var socialMediaIcon = {
3558
+ ["facebook" /* FACEBOOK */]: "facebook",
3559
+ ["instagram" /* INSTAGRAM */]: "instagram",
3560
+ ["tiktok" /* TIKTOK */]: "tiktok",
3561
+ ["twitter" /* TWITTER */]: "twitter",
3562
+ ["website" /* WEBSITE */]: "web",
3563
+ ["youtube" /* YOUTUBE */]: "youtube"
3564
+ };
3565
+ var socialMedia = [
3566
+ {
3567
+ key: "facebook",
3568
+ name: "Facebook",
3569
+ placeholder: "https://www.facebook.com/your-page"
3570
+ },
3571
+ {
3572
+ key: "instagram",
3573
+ name: "Instagram",
3574
+ placeholder: "https://www.instagram.com/your-profile"
3575
+ },
3576
+ {
3577
+ key: "tiktok",
3578
+ name: "TikTok",
3579
+ placeholder: "https://www.tiktok.com/@your-profile"
3580
+ },
3581
+ {
3582
+ key: "twitter",
3583
+ name: "Twitter",
3584
+ placeholder: "https://twitter.com/your-profile"
3585
+ },
3586
+ {
3587
+ key: "website",
3588
+ name: "Website",
3589
+ placeholder: "https://www.yourwebsite.com"
3590
+ },
3591
+ {
3592
+ key: "youtube",
3593
+ name: "YouTube",
3594
+ placeholder: "https://www.youtube.com/channel/your-channel"
3595
+ }
3596
+ ];
3597
+ var socialMediaFields = socialMedia.map((link) => ({
3598
+ helperText: link.name,
3599
+ keyboardType: "url",
3600
+ name: `socialMedia.${link.key}`,
3601
+ placeholder: link.placeholder
3602
+ }));
3514
3603
  export {
3515
3604
  EnumInviteStatus,
3516
3605
  EnumNotification,
@@ -3520,6 +3609,7 @@ export {
3520
3609
  EnumRelationResource,
3521
3610
  EnumResourceType,
3522
3611
  EnumResourceTypeIcon,
3612
+ EnumSocialMedia,
3523
3613
  EnumUserLicence,
3524
3614
  EnumUserRole,
3525
3615
  ImageTypeEnum,
@@ -3558,6 +3648,8 @@ export {
3558
3648
  removeTypename,
3559
3649
  requestPasswordResetFields,
3560
3650
  resetPasswordFields,
3651
+ socialMediaFields,
3652
+ socialMediaIcon,
3561
3653
  sortDatesByProximity,
3562
3654
  stallholderBasicInfoFields,
3563
3655
  stallholderElectricity,