@timardex/cluemart-shared 1.0.14 → 1.0.16

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 (54) hide show
  1. package/dist/auth-CdcH8nqw.d.mts +84 -0
  2. package/dist/auth-TM_XttY3.d.ts +84 -0
  3. package/dist/chat-NGx5Emrr.d.mts +27 -0
  4. package/dist/chat-NGx5Emrr.d.ts +27 -0
  5. package/dist/chunk-K5NK2CK5.mjs +133 -0
  6. package/dist/chunk-K5NK2CK5.mjs.map +1 -0
  7. package/dist/chunk-L2H5WFGC.mjs +100 -0
  8. package/dist/chunk-L2H5WFGC.mjs.map +1 -0
  9. package/dist/enums/index.cjs +134 -0
  10. package/dist/enums/index.cjs.map +1 -0
  11. package/dist/enums/index.d.mts +75 -0
  12. package/dist/enums/index.d.ts +75 -0
  13. package/dist/enums/index.mjs +27 -0
  14. package/dist/enums/index.mjs.map +1 -0
  15. package/dist/formFields/index.cjs +888 -0
  16. package/dist/formFields/index.cjs.map +1 -0
  17. package/dist/formFields/index.d.mts +60 -0
  18. package/dist/formFields/index.d.ts +60 -0
  19. package/dist/formFields/index.mjs +754 -0
  20. package/dist/formFields/index.mjs.map +1 -0
  21. package/dist/global-B7gB8cvC.d.ts +338 -0
  22. package/dist/global-B8kYikwQ.d.mts +338 -0
  23. package/dist/graphql/index.cjs +1634 -0
  24. package/dist/graphql/index.cjs.map +1 -0
  25. package/dist/graphql/index.d.mts +299 -0
  26. package/dist/graphql/index.d.ts +299 -0
  27. package/dist/graphql/index.mjs +1558 -0
  28. package/dist/graphql/index.mjs.map +1 -0
  29. package/dist/hooks/index.cjs +1090 -0
  30. package/dist/hooks/index.cjs.map +1 -0
  31. package/dist/hooks/index.d.mts +78 -0
  32. package/dist/hooks/index.d.ts +78 -0
  33. package/dist/hooks/index.mjs +970 -0
  34. package/dist/hooks/index.mjs.map +1 -0
  35. package/dist/index.cjs +89 -83
  36. package/dist/index.cjs.map +1 -0
  37. package/dist/index.d.mts +16 -299
  38. package/dist/index.d.ts +16 -299
  39. package/dist/index.mjs +87 -60
  40. package/dist/index.mjs.map +1 -1
  41. package/dist/types/index.cjs +19 -0
  42. package/dist/types/index.cjs.map +1 -0
  43. package/dist/types/index.d.mts +12 -0
  44. package/dist/types/index.d.ts +12 -0
  45. package/dist/types/index.mjs +1 -0
  46. package/dist/types/index.mjs.map +1 -0
  47. package/dist/utils/index.cjs +215 -0
  48. package/dist/utils/index.cjs.map +1 -0
  49. package/dist/utils/index.d.mts +66 -0
  50. package/dist/utils/index.d.ts +66 -0
  51. package/dist/utils/index.mjs +38 -0
  52. package/dist/utils/index.mjs.map +1 -0
  53. package/package.json +37 -4
  54. package/dist/index.js.map +0 -1
package/dist/index.d.mts CHANGED
@@ -1,27 +1,25 @@
1
1
  import { Control, FieldErrors, UseFormHandleSubmit, UseFormReset, UseFormSetValue, UseFormWatch } from 'react-hook-form';
2
- import * as yup from 'yup';
3
- import { TestFunction } from 'yup';
4
2
  import * as _apollo_client from '@apollo/client';
5
3
 
6
4
  declare enum EnumInviteStatus {
7
5
  ACCEPTED = "Accepted",
8
6
  COMPLETED = "Completed",
9
7
  EXPIRED = "Expired",
10
- NO_STATUS = "No Status",
8
+ NO_STATUS = "No_Status",
11
9
  PENDING = "Pending",
12
10
  REJECTED = "Rejected",
13
- WAITING = "waiting"
11
+ WAITING = "Waiting"
14
12
  }
15
13
  declare enum EnumRejectionPolicy {
16
- SINGLE_DATE_ALLOWED = "Single date allowed",
17
- MULTI_DATE_ALLOWED = "Multi date allowed"
14
+ SINGLE_DATE_ALLOWED = "single_date_allowed",
15
+ MULTI_DATE_ALLOWED = "multi_date_allowed"
18
16
  }
19
17
  declare enum EnumPaymentMethod {
20
- CASH = "Cash",
21
- EFTPOS = "Eftpos",
22
- BANK_TRANSFER = "Bank Transfer",
23
- PAYPAL = "PayPal",
24
- STRIPE = "Stripe"
18
+ CASH = "cash",
19
+ EFTPOS = "eftpos",
20
+ BANK_TRANSFER = "bank_transfer",
21
+ PAYPAL = "paypal",
22
+ STRIPE = "stripe"
25
23
  }
26
24
  declare enum EnumResourceType {
27
25
  MARKET = "market",
@@ -220,7 +218,11 @@ type StallApplicationInfoType = {
220
218
  applicationDeadlineHours: number;
221
219
  paymentDueHours: number;
222
220
  paymentMethod: EnumPaymentMethod;
223
- paymentTarget: string;
221
+ paymentTarget: {
222
+ accountHolderName?: string;
223
+ accountNumber?: string;
224
+ link?: string;
225
+ };
224
226
  rejectionPolicy: EnumRejectionPolicy;
225
227
  stallCapacity: number;
226
228
  };
@@ -651,290 +653,6 @@ declare const defaultMarketFormValues: MarketFormData;
651
653
  declare const defaultStallholderFormValues: StallholderFormData;
652
654
  declare const defaultStallholderApplyFormValues: StallholderApplyFormFormData;
653
655
 
654
- type NoLeadingZerosOptions = {
655
- allowDecimal?: boolean;
656
- };
657
- declare const noLeadingZeros: (fieldName: string, options?: NoLeadingZerosOptions) => TestFunction<number | undefined>;
658
- declare const endDateNotInPastTest: yup.StringSchema<string | undefined, yup.AnyObject, undefined, "">;
659
- declare const startDateNotInPastTest: yup.StringSchema<string | undefined, yup.AnyObject, undefined, "">;
660
- declare const endDateAfterStartDateTest: yup.StringSchema<string | undefined, yup.AnyObject, undefined, "">;
661
- declare const endTimeMustBeAfterStartTimeTest: yup.StringSchema<string | undefined, yup.AnyObject, undefined, "">;
662
- declare const startTimeCannotBeInPastTest: yup.StringSchema<string | undefined, yup.AnyObject, undefined, "">;
663
- declare const dateTimeSchema: yup.ObjectSchema<{
664
- endDate: string;
665
- endTime: string;
666
- marketPrice: number;
667
- startDate: string;
668
- startTime: string;
669
- }, yup.AnyObject, {
670
- endDate: undefined;
671
- endTime: undefined;
672
- marketPrice: undefined;
673
- startDate: undefined;
674
- startTime: undefined;
675
- }, "">;
676
- declare const locationSchema: yup.ObjectSchema<{
677
- city: string;
678
- coordinates: number[];
679
- country: string;
680
- fullAddress: string;
681
- latitude: number;
682
- longitude: number;
683
- region: string;
684
- type: "Point";
685
- }, yup.AnyObject, {
686
- city: undefined;
687
- coordinates: "";
688
- country: undefined;
689
- fullAddress: undefined;
690
- latitude: undefined;
691
- longitude: undefined;
692
- region: undefined;
693
- type: "Point";
694
- }, "">;
695
- declare const emailSchema: yup.StringSchema<string, yup.AnyObject, undefined, "">;
696
- declare const passwordSchema: yup.StringSchema<string, yup.AnyObject, undefined, "">;
697
- declare const globalResourceSchema: yup.ObjectSchema<{
698
- active: NonNullable<boolean | undefined>;
699
- cover: {
700
- source: string;
701
- title: string;
702
- };
703
- description: string;
704
- name: string;
705
- region: string;
706
- }, yup.AnyObject, {
707
- active: undefined;
708
- cover: {
709
- source: undefined;
710
- title: undefined;
711
- };
712
- description: undefined;
713
- name: undefined;
714
- region: undefined;
715
- }, "">;
716
-
717
- declare const marketSchema: yup.ObjectSchema<{
718
- active: NonNullable<boolean | undefined>;
719
- cover: {
720
- source: string;
721
- title: string;
722
- };
723
- description: string;
724
- name: string;
725
- region: string;
726
- dateTime: {
727
- endDate: string;
728
- endTime: string;
729
- startDate: string;
730
- startTime: string;
731
- marketPrice: number;
732
- }[];
733
- location: {
734
- region: string;
735
- latitude: number;
736
- longitude: number;
737
- city: string;
738
- coordinates: number[];
739
- country: string;
740
- fullAddress: string;
741
- type: "Point";
742
- };
743
- provider: string;
744
- stallApplicationInfo: {
745
- paymentMethod: NonNullable<EnumPaymentMethod | undefined>;
746
- applicationDeadlineHours: number;
747
- paymentDueHours: number;
748
- paymentTarget: string;
749
- rejectionPolicy: NonNullable<EnumRejectionPolicy | undefined>;
750
- stallCapacity: number;
751
- };
752
- tags: string[] | null | undefined;
753
- }, yup.AnyObject, {
754
- active: undefined;
755
- cover: {
756
- source: undefined;
757
- title: undefined;
758
- };
759
- description: undefined;
760
- name: undefined;
761
- region: undefined;
762
- dateTime: "";
763
- location: {
764
- city: undefined;
765
- coordinates: "";
766
- country: undefined;
767
- fullAddress: undefined;
768
- latitude: undefined;
769
- longitude: undefined;
770
- region: undefined;
771
- type: "Point";
772
- };
773
- provider: undefined;
774
- stallApplicationInfo: {
775
- applicationDeadlineHours: undefined;
776
- paymentDueHours: undefined;
777
- paymentMethod: undefined;
778
- paymentTarget: undefined;
779
- rejectionPolicy: undefined;
780
- stallCapacity: undefined;
781
- };
782
- tags: "";
783
- }, "">;
784
-
785
- declare const stallHolderSchema: yup.ObjectSchema<{
786
- active: NonNullable<boolean | undefined>;
787
- cover: {
788
- source: string;
789
- title: string;
790
- };
791
- description: string;
792
- name: string;
793
- region: string;
794
- categories: {
795
- subcategories?: {
796
- items?: string[] | null | undefined;
797
- name: string;
798
- id: string;
799
- }[] | null | undefined;
800
- name: string;
801
- id: string;
802
- }[];
803
- multiLocation: NonNullable<boolean | undefined>;
804
- products: string[];
805
- }, yup.AnyObject, {
806
- active: undefined;
807
- cover: {
808
- source: undefined;
809
- title: undefined;
810
- };
811
- description: undefined;
812
- name: undefined;
813
- region: undefined;
814
- categories: "";
815
- multiLocation: undefined;
816
- products: "";
817
- }, "">;
818
- declare const stallholderApplyFormSchema: yup.ObjectSchema<{
819
- active: NonNullable<boolean | undefined>;
820
- electricity: {
821
- details?: string | null | undefined;
822
- isRequired: NonNullable<boolean | undefined>;
823
- };
824
- foodSafetyGradeFiles: string[] | null | undefined;
825
- foodSafetyGradeFilesUpload: string[] | null | undefined;
826
- gazebo: {
827
- details?: string | null | undefined;
828
- isRequired: NonNullable<boolean | undefined>;
829
- };
830
- packaging: string[];
831
- paymentMethod: NonNullable<EnumPaymentMethod | undefined>;
832
- priceRange: {
833
- max: number;
834
- min: number;
835
- };
836
- producedIn: string[];
837
- stallSize: {
838
- depth: number;
839
- width: number;
840
- };
841
- table: {
842
- details?: string | null | undefined;
843
- isRequired: NonNullable<boolean | undefined>;
844
- };
845
- }, yup.AnyObject, {
846
- active: undefined;
847
- electricity: {
848
- details: undefined;
849
- isRequired: undefined;
850
- };
851
- foodSafetyGradeFiles: "";
852
- foodSafetyGradeFilesUpload: "";
853
- gazebo: {
854
- details: undefined;
855
- isRequired: undefined;
856
- };
857
- packaging: "";
858
- paymentMethod: undefined;
859
- priceRange: {
860
- max: undefined;
861
- min: undefined;
862
- };
863
- producedIn: "";
864
- stallSize: {
865
- depth: undefined;
866
- width: undefined;
867
- };
868
- table: {
869
- details: undefined;
870
- isRequired: undefined;
871
- };
872
- }, "">;
873
-
874
- declare const userSchema: yup.ObjectSchema<{
875
- active: NonNullable<boolean | undefined>;
876
- email: string;
877
- firstName: string;
878
- lastName: string;
879
- password: string;
880
- preferredRegion: string;
881
- confirmPassword: string;
882
- role: NonNullable<EnumUserRole | undefined>;
883
- }, yup.AnyObject, {
884
- active: undefined;
885
- email: undefined;
886
- firstName: undefined;
887
- lastName: undefined;
888
- password: undefined;
889
- preferredRegion: undefined;
890
- confirmPassword: undefined;
891
- role: undefined;
892
- }, "">;
893
-
894
- declare const loginSchema: yup.ObjectSchema<{
895
- email: string;
896
- password: string;
897
- }, yup.AnyObject, {
898
- email: undefined;
899
- password: undefined;
900
- }, "">;
901
- declare const registerSchema: yup.ObjectSchema<{
902
- email: string;
903
- firstName: string;
904
- lastName: string;
905
- password: string;
906
- preferredRegion: string;
907
- role: NonNullable<EnumUserRole | undefined>;
908
- }, yup.AnyObject, {
909
- email: undefined;
910
- firstName: undefined;
911
- lastName: undefined;
912
- password: undefined;
913
- preferredRegion: undefined;
914
- role: undefined;
915
- }, "">;
916
- declare const requestPasswordResetSchema: yup.ObjectSchema<{
917
- email: string;
918
- }, yup.AnyObject, {
919
- email: undefined;
920
- }, "">;
921
- declare const resetPasswordSchema: yup.ObjectSchema<{
922
- email: string;
923
- password: string;
924
- confirmPassword: string;
925
- }, yup.AnyObject, {
926
- email: undefined;
927
- password: undefined;
928
- confirmPassword: undefined;
929
- }, "">;
930
- declare const validateTokenSchema: yup.ObjectSchema<{
931
- email: string;
932
- token: string;
933
- }, yup.AnyObject, {
934
- email: undefined;
935
- token: undefined;
936
- }, "">;
937
-
938
656
  declare const useLogin: () => {
939
657
  error: _apollo_client.ApolloError | undefined;
940
658
  loading: boolean;
@@ -1263,8 +981,7 @@ declare const producedIngOptions: OptionItem[];
1263
981
 
1264
982
  declare const marketBasicInfoFields: FormField[];
1265
983
  declare const stallApplicationInfo: FormField[];
1266
- declare const stallApplicationInfoPaymentTarget: FormField;
1267
- declare const stallApplicationInfoDropdowns: FormField[];
984
+ declare const stallApplicationInfoPaymentTarget: FormField[];
1268
985
  declare const marketStartDateFields: FormDateField[];
1269
986
  declare const marketPriceByDateFields: FormField[];
1270
987
  declare const marketEndDateFields: FormDateField[];
@@ -1283,4 +1000,4 @@ declare const profileFields: FormField[];
1283
1000
  declare const availableCategories: Category[];
1284
1001
  declare const categoryColors: Record<string, string>;
1285
1002
 
1286
- export { type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatInput, type ChatMessageInput, type ChatMessageType, type ChatType, type CreateLoginFormData, type CreateMarketFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateStallholderApplyFormFormData, type CreateStallholderFormData, type CreateUserFormData, type CreateValidateTokenFormData, type DateTimeType, type DateTimeWithPrice, 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 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 StallApplicationInfoType, 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, dateTimeSchema, defaultMarketFormValues, defaultRegion, defaultStallholderApplyFormValues, defaultStallholderFormValues, emailSchema, endDateAfterStartDateTest, endDateNotInPastTest, endTimeMustBeAfterStartTimeTest, formatDate, formatTimestamp, getCurrentAndFutureDates, getFutureDatesAfterThreshold, globalDefaultValues, globalResourceSchema, locationSchema, loginFields, loginSchema, mapArrayToOptions, marketBasicInfoFields, marketEndDateFields, marketPriceByDateFields, marketSchema, marketStartDateFields, noLeadingZeros, packagingOptions, passwordSchema, paymentMethodOptions, producedIngOptions, profileFields, registerFields, registerSchema, rejectionPolicyOptions, removeTypename, requestPasswordResetFields, requestPasswordResetSchema, resetPasswordFields, resetPasswordSchema, sortDatesByProximity, stallApplicationInfo, stallApplicationInfoDropdowns, stallApplicationInfoPaymentTarget, stallHolderSchema, stallholderApplyFormSchema, stallholderBasicInfoFields, stallholderElectricity, stallholderEndDateFields, stallholderFullAddress, stallholderGazebo, stallholderLocationDescription, stallholderMultiLocation, stallholderPackaging, stallholderPaymentMethod, stallholderPriceRange, stallholderProducedIn, stallholderStallSize, stallholderStartDateFields, stallholderTable, startDateNotInPastTest, startTimeCannotBeInPastTest, statusOptions, tagOptions, timeFormat, truncateText, useAddParticipantToChat, useAddUserFavouriteResource, useCreateChat, useCreateMarket, useCreatePoster, useCreateRelation, useCreateStallholder, useCreateStallholderApplyForm, useCreateUser, useDeleteChat, useDeleteMarket, useDeleteRelation, useDeleteStallholder, useGetChat, useGetChatSubscription, useGetMarket, useGetMarketRelations, useGetMarkets, useGetMarketsByRegion, useGetMarketsNearMe, useGetNotification, useGetRelation, useGetRelationByMarketAndStallholder, useGetResourceConnections, useGetStallholder, useGetStallholderApplyForm, useGetStallholderRelations, useGetStallholders, useGetStallholdersByRegion, useGetUser, useGetUserChats, useGetUserFavourites, useGetUserMarkets, useGetUserNotifications, useGetUsers, useLocationSearch, useLogin, useLoginForm, useMarketForm, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchMarkets, useSearchStallholders, useSendChatMessage, useStallholderApplyForm, useStallholderForm, useUpdateMarket, useUpdateRelation, useUpdateStallholder, useUpdateStallholderApplyForm, useUpdateUser, useUserForm, useValidateToken, useValidateTokenForm, userSchema, validateTokenFields, validateTokenSchema };
1003
+ export { type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatInput, type ChatMessageInput, type ChatMessageType, type ChatType, type CreateLoginFormData, type CreateMarketFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateStallholderApplyFormFormData, type CreateStallholderFormData, type CreateUserFormData, type CreateValidateTokenFormData, type DateTimeType, type DateTimeWithPrice, 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 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 StallApplicationInfoType, 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, 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, useCreatePoster, useCreateRelation, useCreateStallholder, useCreateStallholderApplyForm, useCreateUser, useDeleteChat, useDeleteMarket, useDeleteRelation, useDeleteStallholder, useGetChat, useGetChatSubscription, useGetMarket, useGetMarketRelations, useGetMarkets, useGetMarketsByRegion, useGetMarketsNearMe, useGetNotification, useGetRelation, useGetRelationByMarketAndStallholder, useGetResourceConnections, useGetStallholder, useGetStallholderApplyForm, useGetStallholderRelations, useGetStallholders, useGetStallholdersByRegion, useGetUser, useGetUserChats, useGetUserFavourites, useGetUserMarkets, useGetUserNotifications, useGetUsers, useLocationSearch, useLogin, useLoginForm, useMarketForm, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchMarkets, useSearchStallholders, useSendChatMessage, useStallholderApplyForm, useStallholderForm, useUpdateMarket, useUpdateRelation, useUpdateStallholder, useUpdateStallholderApplyForm, useUpdateUser, useUserForm, useValidateToken, useValidateTokenForm, validateTokenFields };