@timardex/cluemart-shared 1.0.20 → 1.0.22

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
@@ -215,9 +215,9 @@ interface DateTimeWithPriceType extends DateTimeType {
215
215
  }
216
216
  interface MarketInfoFormData {
217
217
  _id?: string;
218
- active: boolean;
219
218
  applicationDeadlineHours: number;
220
219
  dateTime: DateTimeWithPriceType[];
220
+ marketId: string;
221
221
  paymentDueHours: number;
222
222
  paymentMethod: EnumPaymentMethod;
223
223
  paymentTarget: {
@@ -232,7 +232,7 @@ interface MarketFormData extends BaseResourceTypeFormData {
232
232
  dateTime: DateTimeType[];
233
233
  location: LocationType;
234
234
  provider: string;
235
- tags?: string[] | null;
235
+ tags: string[];
236
236
  }
237
237
  interface CreateMarketInfoFormData {
238
238
  control: Control<MarketInfoFormData, any>;
@@ -261,11 +261,10 @@ interface MarketType extends BaseResourceType {
261
261
  location: MarketFormData["location"];
262
262
  marketInfoId: string;
263
263
  provider: string;
264
- tags: string[] | null;
264
+ tags: string[];
265
265
  }
266
266
  interface MarketInfoType {
267
267
  _id: string;
268
- active: boolean;
269
268
  applicationDeadlineHours: number;
270
269
  dateTime: DateTimeWithPriceType[];
271
270
  marketId: string;
@@ -315,7 +314,6 @@ type StallholderAttributes = {
315
314
  };
316
315
  type StallholderApplyFormFormData = {
317
316
  _id?: string;
318
- active: boolean;
319
317
  electricity: StallholderAttributes;
320
318
  foodSafetyGradeFiles?: string[] | null;
321
319
  foodSafetyGradeFilesUpload?: string[] | null;
@@ -327,6 +325,7 @@ type StallholderApplyFormFormData = {
327
325
  min: number;
328
326
  };
329
327
  producedIn: string[];
328
+ stallholderId: string;
330
329
  stallSize: {
331
330
  depth: number;
332
331
  width: number;
@@ -354,7 +353,6 @@ interface StallholderType extends BaseResourceType {
354
353
  }
355
354
  interface StallholderApplyFormType {
356
355
  _id: string;
357
- active: boolean;
358
356
  electricity: {
359
357
  details: string | null;
360
358
  isRequired: boolean;
@@ -1038,8 +1036,8 @@ declare const marketEndDateFields: FormDateField[];
1038
1036
  declare const availableTagTypes: string[];
1039
1037
  declare const tagOptions: OptionItem[];
1040
1038
 
1041
- declare const stallApplicationInfo: FormField[];
1042
- declare const stallApplicationInfoPaymentTarget: FormField[];
1039
+ declare const marketInfo: FormField[];
1040
+ declare const marketInfoPaymentTarget: FormField[];
1043
1041
  declare const marketPriceByDateFields: FormField[];
1044
1042
  declare const rejectionPolicyOptions: OptionItem[];
1045
1043
 
@@ -1054,4 +1052,4 @@ declare const profileFields: FormField[];
1054
1052
  declare const availableCategories: Category[];
1055
1053
  declare const categoryColors: Record<string, string>;
1056
1054
 
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 };
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 };
package/dist/index.d.ts CHANGED
@@ -215,9 +215,9 @@ interface DateTimeWithPriceType extends DateTimeType {
215
215
  }
216
216
  interface MarketInfoFormData {
217
217
  _id?: string;
218
- active: boolean;
219
218
  applicationDeadlineHours: number;
220
219
  dateTime: DateTimeWithPriceType[];
220
+ marketId: string;
221
221
  paymentDueHours: number;
222
222
  paymentMethod: EnumPaymentMethod;
223
223
  paymentTarget: {
@@ -232,7 +232,7 @@ interface MarketFormData extends BaseResourceTypeFormData {
232
232
  dateTime: DateTimeType[];
233
233
  location: LocationType;
234
234
  provider: string;
235
- tags?: string[] | null;
235
+ tags: string[];
236
236
  }
237
237
  interface CreateMarketInfoFormData {
238
238
  control: Control<MarketInfoFormData, any>;
@@ -261,11 +261,10 @@ interface MarketType extends BaseResourceType {
261
261
  location: MarketFormData["location"];
262
262
  marketInfoId: string;
263
263
  provider: string;
264
- tags: string[] | null;
264
+ tags: string[];
265
265
  }
266
266
  interface MarketInfoType {
267
267
  _id: string;
268
- active: boolean;
269
268
  applicationDeadlineHours: number;
270
269
  dateTime: DateTimeWithPriceType[];
271
270
  marketId: string;
@@ -315,7 +314,6 @@ type StallholderAttributes = {
315
314
  };
316
315
  type StallholderApplyFormFormData = {
317
316
  _id?: string;
318
- active: boolean;
319
317
  electricity: StallholderAttributes;
320
318
  foodSafetyGradeFiles?: string[] | null;
321
319
  foodSafetyGradeFilesUpload?: string[] | null;
@@ -327,6 +325,7 @@ type StallholderApplyFormFormData = {
327
325
  min: number;
328
326
  };
329
327
  producedIn: string[];
328
+ stallholderId: string;
330
329
  stallSize: {
331
330
  depth: number;
332
331
  width: number;
@@ -354,7 +353,6 @@ interface StallholderType extends BaseResourceType {
354
353
  }
355
354
  interface StallholderApplyFormType {
356
355
  _id: string;
357
- active: boolean;
358
356
  electricity: {
359
357
  details: string | null;
360
358
  isRequired: boolean;
@@ -1038,8 +1036,8 @@ declare const marketEndDateFields: FormDateField[];
1038
1036
  declare const availableTagTypes: string[];
1039
1037
  declare const tagOptions: OptionItem[];
1040
1038
 
1041
- declare const stallApplicationInfo: FormField[];
1042
- declare const stallApplicationInfoPaymentTarget: FormField[];
1039
+ declare const marketInfo: FormField[];
1040
+ declare const marketInfoPaymentTarget: FormField[];
1043
1041
  declare const marketPriceByDateFields: FormField[];
1044
1042
  declare const rejectionPolicyOptions: OptionItem[];
1045
1043
 
@@ -1054,4 +1052,4 @@ declare const profileFields: FormField[];
1054
1052
  declare const availableCategories: Category[];
1055
1053
  declare const categoryColors: Record<string, string>;
1056
1054
 
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 };
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 };
package/dist/index.mjs CHANGED
@@ -392,12 +392,12 @@ var marketSchema = globalResourceSchema.shape({
392
392
  dateTime: yup2.array().of(dateTimeSchema).required("DateTime is required"),
393
393
  location: locationSchema,
394
394
  provider: yup2.string().trim().min(3).required("Provider is required"),
395
- tags: yup2.array().of(yup2.string().defined()).nullable()
395
+ tags: yup2.array().of(yup2.string().defined()).min(1, "Tags are required").required("Tags are required")
396
396
  });
397
397
  var marketInfoSchema = yup2.object().shape({
398
- active: yup2.boolean().required("Active is required"),
399
398
  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")),
400
399
  dateTime: yup2.array().of(dateTimeWithPriceSchema).required("DateTime is required"),
400
+ marketId: yup2.string().trim().required("Market ID is required"),
401
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")),
402
402
  paymentMethod: yup2.mixed().oneOf(Object.values(EnumPaymentMethod)).required("Please select a Payment method"),
403
403
  paymentTarget: yup2.object().when("paymentMethod", (paymentMethod, schema) => {
@@ -408,7 +408,9 @@ var marketInfoSchema = yup2.object().shape({
408
408
  return schema.shape({
409
409
  accountHolderName: yup2.string().notRequired(),
410
410
  accountNumber: yup2.string().notRequired(),
411
- link: yup2.string().trim().required("Link is required for PayPal/Stripe")
411
+ link: yup2.string().trim().url("Link must be a valid URL").transform(
412
+ (value) => typeof value === "string" ? value.toLowerCase() : value
413
+ ).required("Link is required for PayPal/Stripe")
412
414
  });
413
415
  } else if (isBankTransfer) {
414
416
  return schema.shape({
@@ -417,7 +419,9 @@ var marketInfoSchema = yup2.object().shape({
417
419
  nzBankAccountRegex,
418
420
  "Account number must be in format: XX-XXXX-XXXXXXX-XX"
419
421
  ),
420
- link: yup2.string().notRequired()
422
+ link: yup2.string().transform(
423
+ (value) => typeof value === "string" ? value.toLowerCase() : value
424
+ ).notRequired()
421
425
  });
422
426
  } else {
423
427
  return schema.shape({
@@ -451,7 +455,6 @@ var stallHolderSchema = globalResourceSchema.shape({
451
455
  products: yup3.array().of(yup3.string().defined()).min(1, "Product list must contain at least one item").required("Products are required")
452
456
  });
453
457
  var stallholderApplyFormSchema = yup3.object().shape({
454
- active: yup3.boolean().required("Active is required"),
455
458
  electricity: yup3.object().shape({
456
459
  details: yup3.string().trim().test("details-required", "Please add details", function(value) {
457
460
  return !this.parent?.isRequired || (value?.trim().length ?? 0) > 0;
@@ -480,6 +483,7 @@ var stallholderApplyFormSchema = yup3.object().shape({
480
483
  min: yup3.number().min(1).required("Min price is required")
481
484
  }),
482
485
  producedIn: yup3.array().of(yup3.string().defined()).min(1, "Produced in list must contain at least one item").required("Produced in is required"),
486
+ stallholderId: yup3.string().trim().required("Stallholder ID is required"),
483
487
  stallSize: yup3.object().shape({
484
488
  depth: yup3.number().min(1).required("Depth is required"),
485
489
  width: yup3.number().min(1).required("Width is required")
@@ -583,10 +587,9 @@ var defaultMarketFormValues = {
583
587
  // Default type for GeoJSON
584
588
  },
585
589
  provider: "Provider name",
586
- tags: null
590
+ tags: []
587
591
  };
588
592
  var defaultMarketInfoFormValues = {
589
- active: false,
590
593
  applicationDeadlineHours: 0,
591
594
  dateTime: [
592
595
  {
@@ -604,6 +607,7 @@ var defaultMarketInfoFormValues = {
604
607
  startTime: "09:00"
605
608
  }
606
609
  ],
610
+ marketId: "",
607
611
  paymentDueHours: 0,
608
612
  paymentMethod: "",
609
613
  paymentTarget: {
@@ -619,11 +623,10 @@ var defaultStallholderFormValues = {
619
623
  categories: [],
620
624
  locations: null,
621
625
  multiLocation: false,
622
- products: ["Prod uct 1", "Product 2"],
626
+ products: [],
623
627
  specialities: null
624
628
  };
625
629
  var defaultStallholderApplyFormValues = {
626
- active: false,
627
630
  electricity: { details: null, isRequired: false },
628
631
  foodSafetyGradeFiles: null,
629
632
  foodSafetyGradeFilesUpload: null,
@@ -632,6 +635,7 @@ var defaultStallholderApplyFormValues = {
632
635
  paymentMethod: "",
633
636
  priceRange: { max: 0, min: 0 },
634
637
  producedIn: [],
638
+ stallholderId: "",
635
639
  stallSize: { depth: 0, width: 0 },
636
640
  table: { details: null, isRequired: false }
637
641
  };
@@ -744,7 +748,6 @@ function useStallholderApplyForm(data) {
744
748
  if (data) {
745
749
  reset({
746
750
  _id: data._id,
747
- active: data.active,
748
751
  electricity: data.electricity,
749
752
  foodSafetyGradeFiles: data.foodSafetyGradeFiles,
750
753
  foodSafetyGradeFilesUpload: data.foodSafetyGradeFilesUpload,
@@ -753,6 +756,7 @@ function useStallholderApplyForm(data) {
753
756
  paymentMethod: data.paymentMethod,
754
757
  priceRange: data.priceRange,
755
758
  producedIn: data.producedIn,
759
+ stallholderId: data.stallholderId,
756
760
  stallSize: data.stallSize,
757
761
  table: data.table
758
762
  });
@@ -762,7 +766,6 @@ function useStallholderApplyForm(data) {
762
766
  }, [data]);
763
767
  const {
764
768
  _id,
765
- active,
766
769
  electricity,
767
770
  foodSafetyGradeFiles,
768
771
  foodSafetyGradeFilesUpload,
@@ -771,6 +774,7 @@ function useStallholderApplyForm(data) {
771
774
  paymentMethod,
772
775
  priceRange,
773
776
  producedIn,
777
+ stallholderId,
774
778
  stallSize,
775
779
  table
776
780
  } = getValues();
@@ -778,7 +782,6 @@ function useStallholderApplyForm(data) {
778
782
  control,
779
783
  fields: {
780
784
  _id,
781
- active,
782
785
  electricity,
783
786
  foodSafetyGradeFiles,
784
787
  foodSafetyGradeFilesUpload,
@@ -787,6 +790,7 @@ function useStallholderApplyForm(data) {
787
790
  paymentMethod,
788
791
  priceRange,
789
792
  producedIn,
793
+ stallholderId,
790
794
  stallSize,
791
795
  table
792
796
  },
@@ -904,9 +908,9 @@ function useMarketInfoForm(data) {
904
908
  if (data) {
905
909
  reset({
906
910
  _id: data._id,
907
- active: data.active,
908
911
  applicationDeadlineHours: data.applicationDeadlineHours,
909
912
  dateTime: data.dateTime,
913
+ marketId: data.marketId,
910
914
  paymentDueHours: data.paymentDueHours,
911
915
  paymentMethod: data.paymentMethod,
912
916
  paymentTarget: data.paymentTarget,
@@ -919,9 +923,9 @@ function useMarketInfoForm(data) {
919
923
  }, [data]);
920
924
  const {
921
925
  _id,
922
- active,
923
926
  applicationDeadlineHours,
924
927
  dateTime,
928
+ marketId,
925
929
  paymentDueHours,
926
930
  paymentMethod,
927
931
  paymentTarget,
@@ -932,9 +936,9 @@ function useMarketInfoForm(data) {
932
936
  control,
933
937
  fields: {
934
938
  _id,
935
- active,
936
939
  applicationDeadlineHours,
937
940
  dateTime,
941
+ marketId,
938
942
  paymentDueHours,
939
943
  paymentMethod,
940
944
  paymentTarget,
@@ -1567,7 +1571,6 @@ var MARKET_LOCATION_FIELDS_FRAGMENT = gql5`
1567
1571
  var MARKET_INFO = gql5`
1568
1572
  fragment MarketInfoFields on MarketInfoType {
1569
1573
  _id
1570
- active
1571
1574
  applicationDeadlineHours
1572
1575
  dateTime {
1573
1576
  endDate
@@ -1788,7 +1791,6 @@ var STALLHOLDER = gql7`
1788
1791
  var STALLHOLDER_APPLY_FORM = gql7`
1789
1792
  fragment StallholderApplyFormFields on StallholderApplyFormType {
1790
1793
  _id
1791
- active
1792
1794
  electricity {
1793
1795
  details
1794
1796
  isRequired
@@ -2030,8 +2032,8 @@ var useGetMarketInfo = (marketId) => {
2030
2032
  skip: !marketId,
2031
2033
  variables: { marketId }
2032
2034
  });
2033
- const marketInfo = data?.marketInfo;
2034
- return { error, loading, marketInfo, refetch };
2035
+ const marketInfo2 = data?.marketInfo;
2036
+ return { error, loading, marketInfo: marketInfo2, refetch };
2035
2037
  };
2036
2038
 
2037
2039
  // src/graphql/hooks/poster.ts
@@ -3033,43 +3035,46 @@ var availableTagTypes = [
3033
3035
  "Near Playground",
3034
3036
  "Port Nearby"
3035
3037
  ];
3036
- var tagOptions = mapArrayToOptions(availableTagTypes);
3038
+ var tagOptions = availableTagTypes.map((tag) => ({
3039
+ label: tag,
3040
+ value: tag
3041
+ }));
3037
3042
 
3038
3043
  // src/formFields/market/marketInfo.ts
3039
- var stallApplicationInfo = [
3044
+ var marketInfo = [
3040
3045
  {
3041
3046
  helperText: "Application Deadline of the Market *",
3042
3047
  keyboardType: "number-pad",
3043
- name: "stallApplicationInfo.applicationDeadlineHours",
3048
+ name: "applicationDeadlineHours",
3044
3049
  placeholder: "Application Deadline Hours"
3045
3050
  },
3046
3051
  {
3047
3052
  helperText: "Stall Capacity of the Market *",
3048
3053
  keyboardType: "number-pad",
3049
- name: "stallApplicationInfo.stallCapacity",
3054
+ name: "stallCapacity",
3050
3055
  placeholder: "Stall Capacity"
3051
3056
  },
3052
3057
  {
3053
3058
  helperText: "Payment Due Hours of the Market *",
3054
3059
  keyboardType: "number-pad",
3055
- name: "stallApplicationInfo.paymentDueHours",
3060
+ name: "paymentDueHours",
3056
3061
  placeholder: "Payment Due Hours"
3057
3062
  }
3058
3063
  ];
3059
- var stallApplicationInfoPaymentTarget = [
3064
+ var marketInfoPaymentTarget = [
3060
3065
  {
3061
3066
  helperText: "Account holder name *",
3062
- name: "stallApplicationInfo.paymentTarget.accountHolderName",
3067
+ name: "paymentTarget.accountHolderName",
3063
3068
  placeholder: "Account holder name"
3064
3069
  },
3065
3070
  {
3066
3071
  helperText: "Account number *",
3067
- name: "stallApplicationInfo.paymentTarget.accountNumber",
3072
+ name: "paymentTarget.accountNumber",
3068
3073
  placeholder: "Account number"
3069
3074
  },
3070
3075
  {
3071
3076
  helperText: "Link to payment target *",
3072
- name: "stallApplicationInfo.paymentTarget.link",
3077
+ name: "paymentTarget.link",
3073
3078
  placeholder: "Link to payment target"
3074
3079
  }
3075
3080
  ];
@@ -3540,6 +3545,8 @@ export {
3540
3545
  mapArrayToOptions,
3541
3546
  marketBasicInfoFields,
3542
3547
  marketEndDateFields,
3548
+ marketInfo,
3549
+ marketInfoPaymentTarget,
3543
3550
  marketPriceByDateFields,
3544
3551
  marketStartDateFields,
3545
3552
  packagingOptions,
@@ -3552,8 +3559,6 @@ export {
3552
3559
  requestPasswordResetFields,
3553
3560
  resetPasswordFields,
3554
3561
  sortDatesByProximity,
3555
- stallApplicationInfo,
3556
- stallApplicationInfoPaymentTarget,
3557
3562
  stallholderBasicInfoFields,
3558
3563
  stallholderElectricity,
3559
3564
  stallholderEndDateFields,