@timardex/cluemart-shared 1.0.17 → 1.0.19

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/index.d.mts CHANGED
@@ -194,7 +194,6 @@ type RelationLog = {
194
194
  };
195
195
  type RelationDate = {
196
196
  lastUpdateBy: string;
197
- marketPrice: number;
198
197
  startDate: string;
199
198
  status: EnumInviteStatus;
200
199
  };
@@ -214,8 +213,9 @@ interface RelationType {
214
213
  interface DateTimeWithPriceType extends DateTimeType {
215
214
  marketPrice: number;
216
215
  }
217
- interface MarketInfoType {
216
+ interface MarketInfoFormData {
218
217
  _id?: string;
218
+ active: boolean;
219
219
  applicationDeadlineHours: number;
220
220
  dateTime: DateTimeWithPriceType[];
221
221
  paymentDueHours: number;
@@ -235,15 +235,15 @@ interface MarketFormData extends BaseResourceTypeFormData {
235
235
  tags?: string[] | null;
236
236
  }
237
237
  interface CreateMarketInfoFormData {
238
- control: Control<MarketInfoType, any>;
239
- fields: MarketInfoType;
238
+ control: Control<MarketInfoFormData, any>;
239
+ fields: MarketInfoFormData;
240
240
  formState: {
241
- errors: FieldErrors<MarketInfoType>;
241
+ errors: FieldErrors<MarketInfoFormData>;
242
242
  };
243
- handleSubmit: UseFormHandleSubmit<MarketInfoType, any>;
244
- reset: UseFormReset<MarketInfoType>;
245
- setValue: UseFormSetValue<MarketInfoType>;
246
- watch: UseFormWatch<MarketInfoType>;
243
+ handleSubmit: UseFormHandleSubmit<MarketInfoFormData, any>;
244
+ reset: UseFormReset<MarketInfoFormData>;
245
+ setValue: UseFormSetValue<MarketInfoFormData>;
246
+ watch: UseFormWatch<MarketInfoFormData>;
247
247
  }
248
248
  interface CreateMarketFormData {
249
249
  control: Control<MarketFormData, any>;
@@ -259,9 +259,26 @@ interface CreateMarketFormData {
259
259
  interface MarketType extends BaseResourceType {
260
260
  dateTime: MarketFormData["dateTime"];
261
261
  location: MarketFormData["location"];
262
+ marketInfoId: string;
262
263
  provider: string;
263
264
  tags: string[] | null;
264
265
  }
266
+ interface MarketInfoType {
267
+ _id: string;
268
+ active: boolean;
269
+ applicationDeadlineHours: number;
270
+ dateTime: DateTimeWithPriceType[];
271
+ marketId: string;
272
+ paymentDueHours: number;
273
+ paymentMethod: EnumPaymentMethod;
274
+ paymentTarget: {
275
+ accountHolderName?: string;
276
+ accountNumber?: string;
277
+ link?: string;
278
+ };
279
+ rejectionPolicy: EnumRejectionPolicy;
280
+ stallCapacity: number;
281
+ }
265
282
  interface MarketWithConnectionDatesType extends MarketType {
266
283
  relationDates: RelationDate[] | undefined;
267
284
  }
@@ -634,10 +651,10 @@ declare function useMarketForm(data?: MarketFormData): CreateMarketFormData;
634
651
  /**
635
652
  * Custom hook to manage the market form state and validation.
636
653
  *
637
- * @param {MarketInfoType} data - The initial form data.
654
+ * @param {MarketInfoFormData} data - The initial form data.
638
655
  * @returns {CreateMarketInfoFormData} - The form methods and state.
639
656
  */
640
- declare function useMarketInfoForm(data?: MarketInfoType): CreateMarketInfoFormData;
657
+ declare function useMarketInfoForm(data?: MarketInfoFormData): CreateMarketInfoFormData;
641
658
 
642
659
  /**
643
660
  * Custom hook to manage the user form state and validation.
@@ -669,7 +686,7 @@ declare function useResetPasswordForm(): CreateResetPasswordFormData;
669
686
 
670
687
  declare const globalDefaultValues: BaseResourceTypeFormData;
671
688
  declare const defaultMarketFormValues: MarketFormData;
672
- declare const defaultMarketInfoFormValues: MarketInfoType;
689
+ declare const defaultMarketInfoFormValues: MarketInfoFormData;
673
690
  declare const defaultStallholderFormValues: StallholderFormData;
674
691
  declare const defaultStallholderApplyFormValues: StallholderApplyFormFormData;
675
692
 
@@ -1037,4 +1054,4 @@ declare const profileFields: FormField[];
1037
1054
  declare const availableCategories: Category[];
1038
1055
  declare const categoryColors: Record<string, string>;
1039
1056
 
1040
- 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 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, marketPriceByDateFields, marketStartDateFields, packagingOptions, paymentMethodOptions, producedIngOptions, profileFields, registerFields, rejectionPolicyOptions, removeTypename, requestPasswordResetFields, resetPasswordFields, sortDatesByProximity, stallApplicationInfo, stallApplicationInfoPaymentTarget, 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 };
1057
+ 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, marketPriceByDateFields, marketStartDateFields, packagingOptions, paymentMethodOptions, producedIngOptions, profileFields, registerFields, rejectionPolicyOptions, removeTypename, requestPasswordResetFields, resetPasswordFields, sortDatesByProximity, stallApplicationInfo, stallApplicationInfoPaymentTarget, 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
@@ -194,7 +194,6 @@ type RelationLog = {
194
194
  };
195
195
  type RelationDate = {
196
196
  lastUpdateBy: string;
197
- marketPrice: number;
198
197
  startDate: string;
199
198
  status: EnumInviteStatus;
200
199
  };
@@ -214,8 +213,9 @@ interface RelationType {
214
213
  interface DateTimeWithPriceType extends DateTimeType {
215
214
  marketPrice: number;
216
215
  }
217
- interface MarketInfoType {
216
+ interface MarketInfoFormData {
218
217
  _id?: string;
218
+ active: boolean;
219
219
  applicationDeadlineHours: number;
220
220
  dateTime: DateTimeWithPriceType[];
221
221
  paymentDueHours: number;
@@ -235,15 +235,15 @@ interface MarketFormData extends BaseResourceTypeFormData {
235
235
  tags?: string[] | null;
236
236
  }
237
237
  interface CreateMarketInfoFormData {
238
- control: Control<MarketInfoType, any>;
239
- fields: MarketInfoType;
238
+ control: Control<MarketInfoFormData, any>;
239
+ fields: MarketInfoFormData;
240
240
  formState: {
241
- errors: FieldErrors<MarketInfoType>;
241
+ errors: FieldErrors<MarketInfoFormData>;
242
242
  };
243
- handleSubmit: UseFormHandleSubmit<MarketInfoType, any>;
244
- reset: UseFormReset<MarketInfoType>;
245
- setValue: UseFormSetValue<MarketInfoType>;
246
- watch: UseFormWatch<MarketInfoType>;
243
+ handleSubmit: UseFormHandleSubmit<MarketInfoFormData, any>;
244
+ reset: UseFormReset<MarketInfoFormData>;
245
+ setValue: UseFormSetValue<MarketInfoFormData>;
246
+ watch: UseFormWatch<MarketInfoFormData>;
247
247
  }
248
248
  interface CreateMarketFormData {
249
249
  control: Control<MarketFormData, any>;
@@ -259,9 +259,26 @@ interface CreateMarketFormData {
259
259
  interface MarketType extends BaseResourceType {
260
260
  dateTime: MarketFormData["dateTime"];
261
261
  location: MarketFormData["location"];
262
+ marketInfoId: string;
262
263
  provider: string;
263
264
  tags: string[] | null;
264
265
  }
266
+ interface MarketInfoType {
267
+ _id: string;
268
+ active: boolean;
269
+ applicationDeadlineHours: number;
270
+ dateTime: DateTimeWithPriceType[];
271
+ marketId: string;
272
+ paymentDueHours: number;
273
+ paymentMethod: EnumPaymentMethod;
274
+ paymentTarget: {
275
+ accountHolderName?: string;
276
+ accountNumber?: string;
277
+ link?: string;
278
+ };
279
+ rejectionPolicy: EnumRejectionPolicy;
280
+ stallCapacity: number;
281
+ }
265
282
  interface MarketWithConnectionDatesType extends MarketType {
266
283
  relationDates: RelationDate[] | undefined;
267
284
  }
@@ -634,10 +651,10 @@ declare function useMarketForm(data?: MarketFormData): CreateMarketFormData;
634
651
  /**
635
652
  * Custom hook to manage the market form state and validation.
636
653
  *
637
- * @param {MarketInfoType} data - The initial form data.
654
+ * @param {MarketInfoFormData} data - The initial form data.
638
655
  * @returns {CreateMarketInfoFormData} - The form methods and state.
639
656
  */
640
- declare function useMarketInfoForm(data?: MarketInfoType): CreateMarketInfoFormData;
657
+ declare function useMarketInfoForm(data?: MarketInfoFormData): CreateMarketInfoFormData;
641
658
 
642
659
  /**
643
660
  * Custom hook to manage the user form state and validation.
@@ -669,7 +686,7 @@ declare function useResetPasswordForm(): CreateResetPasswordFormData;
669
686
 
670
687
  declare const globalDefaultValues: BaseResourceTypeFormData;
671
688
  declare const defaultMarketFormValues: MarketFormData;
672
- declare const defaultMarketInfoFormValues: MarketInfoType;
689
+ declare const defaultMarketInfoFormValues: MarketInfoFormData;
673
690
  declare const defaultStallholderFormValues: StallholderFormData;
674
691
  declare const defaultStallholderApplyFormValues: StallholderApplyFormFormData;
675
692
 
@@ -1037,4 +1054,4 @@ declare const profileFields: FormField[];
1037
1054
  declare const availableCategories: Category[];
1038
1055
  declare const categoryColors: Record<string, string>;
1039
1056
 
1040
- 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 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, marketPriceByDateFields, marketStartDateFields, packagingOptions, paymentMethodOptions, producedIngOptions, profileFields, registerFields, rejectionPolicyOptions, removeTypename, requestPasswordResetFields, resetPasswordFields, sortDatesByProximity, stallApplicationInfo, stallApplicationInfoPaymentTarget, 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 };
1057
+ 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, marketPriceByDateFields, marketStartDateFields, packagingOptions, paymentMethodOptions, producedIngOptions, profileFields, registerFields, rejectionPolicyOptions, removeTypename, requestPasswordResetFields, resetPasswordFields, sortDatesByProximity, stallApplicationInfo, stallApplicationInfoPaymentTarget, 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
@@ -395,6 +395,7 @@ var marketSchema = globalResourceSchema.shape({
395
395
  tags: yup2.array().of(yup2.string().defined()).nullable()
396
396
  });
397
397
  var marketInfoSchema = yup2.object().shape({
398
+ active: yup2.boolean().required("Active is required"),
398
399
  applicationDeadlineHours: yup2.number().typeError("Application deadline hours must be a number").min(1, "Application deadline hours must be at least 1").required("Application deadline hours is required").test("no-leading-zeros", "", noLeadingZeros("Application deadline hours")),
399
400
  dateTime: yup2.array().of(dateTimeWithPriceSchema).required("DateTime is required"),
400
401
  paymentDueHours: yup2.number().typeError("Payment due hours must be a number").min(1, "Payment due hours must be at least 1").required("Payment due hours is required").test("no-leading-zeros", "", noLeadingZeros("Payment due hours")),
@@ -557,15 +558,15 @@ var defaultMarketFormValues = {
557
558
  ...globalDefaultValues,
558
559
  dateTime: [
559
560
  {
560
- endDate: "04-05-2025",
561
+ endDate: "04-07-2025",
561
562
  endTime: "15:00",
562
- startDate: "04-05-2025",
563
+ startDate: "04-07-2025",
563
564
  startTime: "09:00"
564
565
  },
565
566
  {
566
- endDate: "05-05-2025",
567
+ endDate: "05-07-2025",
567
568
  endTime: "15:00",
568
- startDate: "05-05-2025",
569
+ startDate: "05-07-2025",
569
570
  startTime: "09:00"
570
571
  }
571
572
  ],
@@ -585,6 +586,7 @@ var defaultMarketFormValues = {
585
586
  tags: null
586
587
  };
587
588
  var defaultMarketInfoFormValues = {
589
+ active: false,
588
590
  applicationDeadlineHours: 0,
589
591
  dateTime: [
590
592
  {
@@ -902,6 +904,7 @@ function useMarketInfoForm(data) {
902
904
  if (data) {
903
905
  reset({
904
906
  _id: data._id,
907
+ active: data.active,
905
908
  applicationDeadlineHours: data.applicationDeadlineHours,
906
909
  dateTime: data.dateTime,
907
910
  paymentDueHours: data.paymentDueHours,
@@ -916,6 +919,7 @@ function useMarketInfoForm(data) {
916
919
  }, [data]);
917
920
  const {
918
921
  _id,
922
+ active,
919
923
  applicationDeadlineHours,
920
924
  dateTime,
921
925
  paymentDueHours,
@@ -928,6 +932,7 @@ function useMarketInfoForm(data) {
928
932
  control,
929
933
  fields: {
930
934
  _id,
935
+ active,
931
936
  applicationDeadlineHours,
932
937
  dateTime,
933
938
  paymentDueHours,
@@ -1562,6 +1567,7 @@ var MARKET_LOCATION_FIELDS_FRAGMENT = gql5`
1562
1567
  var MARKET_INFO = gql5`
1563
1568
  fragment MarketInfoFields on MarketInfoType {
1564
1569
  _id
1570
+ active
1565
1571
  applicationDeadlineHours
1566
1572
  dateTime {
1567
1573
  endDate
@@ -1570,6 +1576,7 @@ var MARKET_INFO = gql5`
1570
1576
  startDate
1571
1577
  startTime
1572
1578
  }
1579
+ marketId
1573
1580
  paymentDueHours
1574
1581
  paymentMethod
1575
1582
  paymentTarget {
@@ -1602,6 +1609,7 @@ var MARKET = gql5`
1602
1609
  logo {
1603
1610
  ...ResourceImageFields
1604
1611
  }
1612
+ marketInfoId
1605
1613
  name
1606
1614
  owner {
1607
1615
  ...OwnerFields
@@ -2077,7 +2085,6 @@ var RELATION_LOGS_FRAGMENT = gql10`
2077
2085
  var RELATION_DATES_FRAGMENT = gql10`
2078
2086
  fragment RelationDates on RelationDateType {
2079
2087
  lastUpdateBy
2080
- marketPrice
2081
2088
  startDate
2082
2089
  status
2083
2090
  }
@@ -2144,94 +2151,22 @@ var GET_RESOURCE_CONNECTIONS = gql10`
2144
2151
  ) {
2145
2152
  resourceConnections(resourceId: $resourceId, resourceType: $resourceType) {
2146
2153
  markets {
2147
- _id
2148
- active
2149
- cover {
2150
- ...ResourceImageFields
2151
- }
2152
- createdAt
2153
- dateTime {
2154
- ...MarketDateTimeFields
2155
- }
2156
- description
2157
- images {
2158
- ...ResourceImageFields
2159
- }
2160
- location {
2161
- ...MarketLocationFields
2162
- }
2163
- logo {
2164
- ...ResourceImageFields
2165
- }
2166
- name
2167
- owner {
2168
- ...OwnerFields
2169
- }
2170
- promoCode
2171
- provider
2154
+ ...MarketFields
2172
2155
  relationDates {
2173
2156
  ...RelationDates
2174
2157
  }
2175
- relationIds
2176
- stallApplicationInfo {
2177
- applicationDeadlineHours
2178
- rejectionPolicy
2179
- stallCapacity
2180
- }
2181
- tags
2182
- updatedAt
2183
2158
  }
2184
2159
  stallholders {
2185
- _id
2186
- active
2187
- applyFormId
2188
- categories {
2189
- ...CategoryFields
2190
- }
2191
- cover {
2192
- ...ResourceImageFields
2193
- }
2194
- createdAt
2195
- description
2196
- images {
2197
- ...ResourceImageFields
2198
- }
2199
- locations {
2200
- dateTime {
2201
- ...StallholderDateTimeFields
2202
- }
2203
- location {
2204
- ...StallholderLocationFields
2205
- }
2206
- }
2207
- logo {
2208
- ...ResourceImageFields
2209
- }
2210
- multiLocation
2211
- name
2212
- owner {
2213
- ...OwnerFields
2214
- }
2215
- products
2216
- promoCode
2160
+ ...StallholderFields
2217
2161
  relationDates {
2218
2162
  ...RelationDates
2219
2163
  }
2220
- relationIds
2221
- specialities
2222
- updatedAt
2223
2164
  }
2224
2165
  }
2225
2166
  }
2226
- ${MARKET_DATETIME_FIELDS_FRAGMENT}
2227
- ${MARKET_LOCATION_FIELDS_FRAGMENT}
2228
- ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
2167
+ ${MARKET}
2168
+ ${STALLHOLDER}
2229
2169
  ${RELATION_DATES_FRAGMENT}
2230
- ${CATEGORY_FIELDS_FRAGMENT}
2231
- ${STALLHOLDER_DATETIME_FIELDS_FRAGMENT}
2232
- ${STALLHOLDER_LOCATION_FIELDS_FRAGMENT}
2233
- ${OWNER_FIELDS_FRAGMENT}
2234
- ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
2235
2170
  `;
2236
2171
 
2237
2172
  // src/graphql/mutations/relation.ts