@timardex/cluemart-shared 1.5.640 → 1.5.700

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 (62) hide show
  1. package/dist/{post-CnUaLo8U.d.mts → auth-Dz2MAssU.d.mts} +64 -12
  2. package/dist/{post-DNAoYkrb.d.ts → auth-UPb1_jVK.d.ts} +64 -12
  3. package/dist/{chunk-3NBZGJZM.mjs → chunk-BRJDMHB7.mjs} +4 -3
  4. package/dist/chunk-BRJDMHB7.mjs.map +1 -0
  5. package/dist/{chunk-FGRAXDMS.mjs → chunk-NS3JTI3E.mjs} +90 -5
  6. package/dist/chunk-NS3JTI3E.mjs.map +1 -0
  7. package/dist/{chunk-UVOBCEHA.mjs → chunk-QJI4BF4B.mjs} +2 -2
  8. package/dist/{chunk-Q6R4US6G.mjs → chunk-SHKKKI2H.mjs} +15 -9
  9. package/dist/chunk-SHKKKI2H.mjs.map +1 -0
  10. package/dist/{chunk-WVUM6765.mjs → chunk-XGX7SV5N.mjs} +1 -1
  11. package/dist/chunk-XGX7SV5N.mjs.map +1 -0
  12. package/dist/contactUs-Bj_OPrzH.d.ts +11 -0
  13. package/dist/contactUs-OVbcfAJw.d.mts +11 -0
  14. package/dist/formFields/index.cjs.map +1 -1
  15. package/dist/formFields/index.d.mts +1 -1
  16. package/dist/formFields/index.d.ts +1 -1
  17. package/dist/formFields/index.mjs +2 -3
  18. package/dist/{global-C0oWABvh.d.ts → global-BDCEwnuZ.d.ts} +12 -6
  19. package/dist/{global-DkXf399E.d.mts → global-Oy5CuI_n.d.mts} +12 -6
  20. package/dist/graphql/index.cjs +14 -8
  21. package/dist/graphql/index.cjs.map +1 -1
  22. package/dist/graphql/index.d.mts +30 -18
  23. package/dist/graphql/index.d.ts +30 -18
  24. package/dist/graphql/index.mjs +1 -1
  25. package/dist/hooks/index.cjs +47 -40
  26. package/dist/hooks/index.cjs.map +1 -1
  27. package/dist/hooks/index.d.mts +4 -4
  28. package/dist/hooks/index.d.ts +4 -4
  29. package/dist/hooks/index.mjs +35 -39
  30. package/dist/hooks/index.mjs.map +1 -1
  31. package/dist/index.cjs +53 -43
  32. package/dist/index.cjs.map +1 -1
  33. package/dist/index.d.mts +192 -150
  34. package/dist/index.d.ts +192 -150
  35. package/dist/index.mjs +51 -43
  36. package/dist/index.mjs.map +1 -1
  37. package/dist/{resourceActivities-M-23xcpt.d.mts → resourceActivities-CheTdj4a.d.mts} +7 -7
  38. package/dist/{resourceActivities-CpGhukwk.d.ts → resourceActivities-Du-3z7E1.d.ts} +7 -7
  39. package/dist/sharing/index.cjs +184 -1
  40. package/dist/sharing/index.cjs.map +1 -1
  41. package/dist/sharing/index.d.mts +1 -1
  42. package/dist/sharing/index.d.ts +1 -1
  43. package/dist/sharing/index.mjs +4 -2
  44. package/dist/types/index.cjs.map +1 -1
  45. package/dist/types/index.d.mts +17 -8
  46. package/dist/types/index.d.ts +17 -8
  47. package/dist/types/index.mjs +1 -1
  48. package/dist/utils/index.cjs +6 -0
  49. package/dist/utils/index.cjs.map +1 -1
  50. package/dist/utils/index.d.mts +4 -2
  51. package/dist/utils/index.d.ts +4 -2
  52. package/dist/utils/index.mjs +15 -13
  53. package/package.json +1 -1
  54. package/dist/auth-BHqJ27id.d.ts +0 -51
  55. package/dist/auth-BJpF_-cS.d.mts +0 -51
  56. package/dist/chunk-3NBZGJZM.mjs.map +0 -1
  57. package/dist/chunk-FGRAXDMS.mjs.map +0 -1
  58. package/dist/chunk-Q6R4US6G.mjs.map +0 -1
  59. package/dist/chunk-WVUM6765.mjs.map +0 -1
  60. package/dist/chunk-X4VPNOHX.mjs +0 -88
  61. package/dist/chunk-X4VPNOHX.mjs.map +0 -1
  62. /package/dist/{chunk-UVOBCEHA.mjs.map → chunk-QJI4BF4B.mjs.map} +0 -0
@@ -1,11 +1,11 @@
1
1
  import * as _apollo_client from '@apollo/client';
2
2
  import { EnumResourceType } from '../enums/index.mjs';
3
- import { C as ChatType, R as ReportChatUser, N as NotificationCount, a as NotificationType, b as ResourceActivityType } from '../resourceActivities-M-23xcpt.mjs';
4
- import { E as EventType, c as EventListItemType, d as EventInfoType, U as UseGetResourcesByRegionOptions, e as RelationType, f as ResourceConnectionsType, g as UnregisteredVendorType, V as VendorType, h as VendorInfoType, i as UserLicenceType } from '../global-DkXf399E.mjs';
5
- import { U as UserType, P as PartnerType, R as ResourceByUser, A as AdType, E as EnumAdStatus, S as SubscriptionPlansResponse, a as SubscriptionStatusData, b as PostType, c as EnumPostType, d as AppSettingsType, G as GameDocType, e as GameLeaderboard, f as SchoolReturnType, g as SchoolType } from '../post-CnUaLo8U.mjs';
6
- import 'react-hook-form';
3
+ import { A as AuthPayloadType, R as RefreshTokenPayloadType, S as SafeUserType, P as PartnerType, a as ResourceByUser, b as AdType, E as EnumAdStatus, c as SubscriptionPlansResponse, d as SubscriptionStatusData, e as PostType, f as EnumPostType, g as AppSettingsType, G as GameDocType, h as GameLeaderboard, i as SchoolReturnType, j as SchoolType } from '../auth-Dz2MAssU.mjs';
4
+ import { C as ChatType, R as ReportChatUser, N as NotificationCount, a as NotificationType, b as ResourceActivityType } from '../resourceActivities-CheTdj4a.mjs';
5
+ import { E as EventType, c as EventListItemType, d as EventInfoType, U as UseGetResourcesByRegionOptions, e as RelationType, f as ResourceConnectionsType, g as UnregisteredVendorType, V as VendorType, h as VendorInfoType, i as UserLicenceType } from '../global-Oy5CuI_n.mjs';
7
6
  import '../images/index.mjs';
8
7
  import '../dailyClue-D7Df-qCO.mjs';
8
+ import 'react-hook-form';
9
9
 
10
10
  declare const useAdminUpdateResourceType: () => {
11
11
  adminUpdateResourceType: (options?: _apollo_client.MutationFunctionOptions<{
@@ -36,12 +36,20 @@ declare const useAdminPermanentlyDeleteResource: () => {
36
36
  declare const useRegister: () => {
37
37
  error: _apollo_client.ApolloError | undefined;
38
38
  loading: boolean;
39
- register: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
39
+ register: (options?: _apollo_client.MutationFunctionOptions<{
40
+ register: AuthPayloadType;
41
+ }, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<{
42
+ register: AuthPayloadType;
43
+ }>>;
40
44
  };
41
45
  declare const useLogin: () => {
42
46
  error: _apollo_client.ApolloError | undefined;
43
47
  loading: boolean;
44
- login: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
48
+ login: (options?: _apollo_client.MutationFunctionOptions<{
49
+ login: AuthPayloadType;
50
+ }, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<{
51
+ login: AuthPayloadType;
52
+ }>>;
45
53
  };
46
54
  declare const useLogout: () => {
47
55
  error: _apollo_client.ApolloError | undefined;
@@ -51,7 +59,11 @@ declare const useLogout: () => {
51
59
  declare const useRefreshToken: () => {
52
60
  error: _apollo_client.ApolloError | undefined;
53
61
  loading: boolean;
54
- refreshToken: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
62
+ refreshToken: (options?: _apollo_client.MutationFunctionOptions<{
63
+ refreshToken: RefreshTokenPayloadType;
64
+ }, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<{
65
+ refreshToken: RefreshTokenPayloadType;
66
+ }>>;
55
67
  };
56
68
  declare const useRequestPasswordReset: () => {
57
69
  error: _apollo_client.ApolloError | undefined;
@@ -602,7 +614,11 @@ declare const useGetUnregisteredVendor: (_id: string) => {
602
614
  };
603
615
 
604
616
  declare const useCreateUser: () => {
605
- createUser: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
617
+ createUser: (options?: _apollo_client.MutationFunctionOptions<{
618
+ createUser: SafeUserType;
619
+ }, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<{
620
+ createUser: SafeUserType;
621
+ }>>;
606
622
  error: _apollo_client.ApolloError | undefined;
607
623
  loading: boolean;
608
624
  };
@@ -610,13 +626,9 @@ declare const useUpdateUser: () => {
610
626
  error: _apollo_client.ApolloError | undefined;
611
627
  loading: boolean;
612
628
  updateUser: (options?: _apollo_client.MutationFunctionOptions<{
613
- updateUser: {
614
- _id: string;
615
- };
629
+ updateUser: SafeUserType;
616
630
  }, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<{
617
- updateUser: {
618
- _id: string;
619
- };
631
+ updateUser: SafeUserType;
620
632
  }>>;
621
633
  };
622
634
  declare const useDeleteUser: () => {
@@ -686,17 +698,17 @@ declare const useGetUsers: () => {
686
698
  error: _apollo_client.ApolloError | undefined;
687
699
  loading: boolean;
688
700
  refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<{
689
- users: UserType[];
701
+ users: SafeUserType[];
690
702
  }>>;
691
- users: UserType[];
703
+ users: SafeUserType[];
692
704
  };
693
705
  declare const useGetUser: (_id: string) => {
694
706
  error: _apollo_client.ApolloError | undefined;
695
707
  loading: boolean;
696
708
  refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<{
697
- user: UserType;
709
+ user: SafeUserType;
698
710
  }>>;
699
- user: UserType | undefined;
711
+ user: SafeUserType | undefined;
700
712
  };
701
713
  declare const useGetUserEvents: () => {
702
714
  error: _apollo_client.ApolloError | undefined;
@@ -1,11 +1,11 @@
1
1
  import * as _apollo_client from '@apollo/client';
2
2
  import { EnumResourceType } from '../enums/index.js';
3
- import { C as ChatType, R as ReportChatUser, N as NotificationCount, a as NotificationType, b as ResourceActivityType } from '../resourceActivities-CpGhukwk.js';
4
- import { E as EventType, c as EventListItemType, d as EventInfoType, U as UseGetResourcesByRegionOptions, e as RelationType, f as ResourceConnectionsType, g as UnregisteredVendorType, V as VendorType, h as VendorInfoType, i as UserLicenceType } from '../global-C0oWABvh.js';
5
- import { U as UserType, P as PartnerType, R as ResourceByUser, A as AdType, E as EnumAdStatus, S as SubscriptionPlansResponse, a as SubscriptionStatusData, b as PostType, c as EnumPostType, d as AppSettingsType, G as GameDocType, e as GameLeaderboard, f as SchoolReturnType, g as SchoolType } from '../post-DNAoYkrb.js';
6
- import 'react-hook-form';
3
+ import { A as AuthPayloadType, R as RefreshTokenPayloadType, S as SafeUserType, P as PartnerType, a as ResourceByUser, b as AdType, E as EnumAdStatus, c as SubscriptionPlansResponse, d as SubscriptionStatusData, e as PostType, f as EnumPostType, g as AppSettingsType, G as GameDocType, h as GameLeaderboard, i as SchoolReturnType, j as SchoolType } from '../auth-UPb1_jVK.js';
4
+ import { C as ChatType, R as ReportChatUser, N as NotificationCount, a as NotificationType, b as ResourceActivityType } from '../resourceActivities-Du-3z7E1.js';
5
+ import { E as EventType, c as EventListItemType, d as EventInfoType, U as UseGetResourcesByRegionOptions, e as RelationType, f as ResourceConnectionsType, g as UnregisteredVendorType, V as VendorType, h as VendorInfoType, i as UserLicenceType } from '../global-BDCEwnuZ.js';
7
6
  import '../images/index.js';
8
7
  import '../dailyClue-D7Df-qCO.js';
8
+ import 'react-hook-form';
9
9
 
10
10
  declare const useAdminUpdateResourceType: () => {
11
11
  adminUpdateResourceType: (options?: _apollo_client.MutationFunctionOptions<{
@@ -36,12 +36,20 @@ declare const useAdminPermanentlyDeleteResource: () => {
36
36
  declare const useRegister: () => {
37
37
  error: _apollo_client.ApolloError | undefined;
38
38
  loading: boolean;
39
- register: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
39
+ register: (options?: _apollo_client.MutationFunctionOptions<{
40
+ register: AuthPayloadType;
41
+ }, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<{
42
+ register: AuthPayloadType;
43
+ }>>;
40
44
  };
41
45
  declare const useLogin: () => {
42
46
  error: _apollo_client.ApolloError | undefined;
43
47
  loading: boolean;
44
- login: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
48
+ login: (options?: _apollo_client.MutationFunctionOptions<{
49
+ login: AuthPayloadType;
50
+ }, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<{
51
+ login: AuthPayloadType;
52
+ }>>;
45
53
  };
46
54
  declare const useLogout: () => {
47
55
  error: _apollo_client.ApolloError | undefined;
@@ -51,7 +59,11 @@ declare const useLogout: () => {
51
59
  declare const useRefreshToken: () => {
52
60
  error: _apollo_client.ApolloError | undefined;
53
61
  loading: boolean;
54
- refreshToken: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
62
+ refreshToken: (options?: _apollo_client.MutationFunctionOptions<{
63
+ refreshToken: RefreshTokenPayloadType;
64
+ }, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<{
65
+ refreshToken: RefreshTokenPayloadType;
66
+ }>>;
55
67
  };
56
68
  declare const useRequestPasswordReset: () => {
57
69
  error: _apollo_client.ApolloError | undefined;
@@ -602,7 +614,11 @@ declare const useGetUnregisteredVendor: (_id: string) => {
602
614
  };
603
615
 
604
616
  declare const useCreateUser: () => {
605
- createUser: (options?: _apollo_client.MutationFunctionOptions<any, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<any>>;
617
+ createUser: (options?: _apollo_client.MutationFunctionOptions<{
618
+ createUser: SafeUserType;
619
+ }, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<{
620
+ createUser: SafeUserType;
621
+ }>>;
606
622
  error: _apollo_client.ApolloError | undefined;
607
623
  loading: boolean;
608
624
  };
@@ -610,13 +626,9 @@ declare const useUpdateUser: () => {
610
626
  error: _apollo_client.ApolloError | undefined;
611
627
  loading: boolean;
612
628
  updateUser: (options?: _apollo_client.MutationFunctionOptions<{
613
- updateUser: {
614
- _id: string;
615
- };
629
+ updateUser: SafeUserType;
616
630
  }, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<{
617
- updateUser: {
618
- _id: string;
619
- };
631
+ updateUser: SafeUserType;
620
632
  }>>;
621
633
  };
622
634
  declare const useDeleteUser: () => {
@@ -686,17 +698,17 @@ declare const useGetUsers: () => {
686
698
  error: _apollo_client.ApolloError | undefined;
687
699
  loading: boolean;
688
700
  refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<{
689
- users: UserType[];
701
+ users: SafeUserType[];
690
702
  }>>;
691
- users: UserType[];
703
+ users: SafeUserType[];
692
704
  };
693
705
  declare const useGetUser: (_id: string) => {
694
706
  error: _apollo_client.ApolloError | undefined;
695
707
  loading: boolean;
696
708
  refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<{
697
- user: UserType;
709
+ user: SafeUserType;
698
710
  }>>;
699
- user: UserType | undefined;
711
+ user: SafeUserType | undefined;
700
712
  };
701
713
  declare const useGetUserEvents: () => {
702
714
  error: _apollo_client.ApolloError | undefined;
@@ -135,7 +135,7 @@ import {
135
135
  useUpdateVendor,
136
136
  useUpdateVendorInfo,
137
137
  useValidateVerificationToken
138
- } from "../chunk-Q6R4US6G.mjs";
138
+ } from "../chunk-SHKKKI2H.mjs";
139
139
  import "../chunk-JMOGW4IX.mjs";
140
140
  export {
141
141
  useAddParticipantToChat,
@@ -443,6 +443,7 @@ var cluemartSocialMedia = [
443
443
  name: "youtube" /* YOUTUBE */
444
444
  }
445
445
  ];
446
+ var CLUEMART_MAIN_DOMAIN_URL = "https://cluemart.co.nz";
446
447
 
447
448
  // src/utils/school.ts
448
449
  var SCHOOL_MIN_STUDENT_COUNT = 300;
@@ -902,12 +903,12 @@ var validateVerificationTokenSchema = yup5.object().shape({
902
903
  var yup6 = __toESM(require("yup"));
903
904
 
904
905
  // src/types/ad.ts
905
- var EnumAdShowOn = /* @__PURE__ */ ((EnumAdShowOn3) => {
906
- EnumAdShowOn3["EVENTS_PAGE"] = "Events_page";
907
- EnumAdShowOn3["FRONT_PAGE"] = "Front_page";
908
- EnumAdShowOn3["PARTNERS_PAGE"] = "Partners_page";
909
- EnumAdShowOn3["VENDORS_PAGE"] = "Vendors_page";
910
- return EnumAdShowOn3;
906
+ var EnumAdShowOn = /* @__PURE__ */ ((EnumAdShowOn2) => {
907
+ EnumAdShowOn2["EVENTS_PAGE"] = "Events_page";
908
+ EnumAdShowOn2["FRONT_PAGE"] = "Front_page";
909
+ EnumAdShowOn2["PARTNERS_PAGE"] = "Partners_page";
910
+ EnumAdShowOn2["VENDORS_PAGE"] = "Vendors_page";
911
+ return EnumAdShowOn2;
911
912
  })(EnumAdShowOn || {});
912
913
  var EnumAdStatus = /* @__PURE__ */ ((EnumAdStatus2) => {
913
914
  EnumAdStatus2["ACTIVE"] = "Active";
@@ -928,15 +929,15 @@ var EnumAdStyle = /* @__PURE__ */ ((EnumAdStyle2) => {
928
929
 
929
930
  // src/yupSchema/ad.ts
930
931
  var adResourceSchema = yup6.object({
931
- adDescription: yup6.string().nullable().trim().required("Ad description is required").max(150, "Ad description must be at most 150 characters"),
932
- adImage: yup6.string().nullable().required("Ad image is required"),
933
- adStyle: yup6.mixed().nullable().oneOf(Object.values(EnumAdStyle), "Please select a valid ad style").required("Ad style is required"),
934
- adTitle: yup6.string().nullable().trim().required("Ad title is required").max(30, "Ad title must be at most 30 characters"),
935
- adType: yup6.mixed().nullable().oneOf(Object.values(EnumAdType), "Please select a valid ad type").required("Ad type is required"),
936
- resourceId: yup6.string().nullable().required("Resource ID is required"),
937
- resourceName: yup6.string().nullable().required("Resource name is required"),
938
- resourceRegion: yup6.string().nullable().required("Resource region is required"),
939
- resourceType: yup6.mixed().nullable().oneOf(Object.values(EnumResourceType), "Please select Event or Vendor").required("Resource type is required")
932
+ adDescription: yup6.string().trim().required("Ad description is required").max(150, "Ad description must be at most 150 characters"),
933
+ adImage: yup6.string().required("Ad image is required"),
934
+ adStyle: yup6.mixed().oneOf(Object.values(EnumAdStyle), "Please select a valid ad style").required("Ad style is required"),
935
+ adTitle: yup6.string().trim().required("Ad title is required").max(30, "Ad title must be at most 30 characters"),
936
+ adType: yup6.mixed().oneOf(Object.values(EnumAdType), "Please select a valid ad type").required("Ad type is required"),
937
+ resourceId: yup6.string().required("Resource ID is required"),
938
+ resourceName: yup6.string().required("Resource name is required"),
939
+ resourceRegion: yup6.string().required("Resource region is required"),
940
+ resourceType: yup6.mixed().oneOf(Object.values(EnumResourceType), "Please select Event or Vendor").required("Resource type is required")
940
941
  });
941
942
  var adSchema = yup6.object().shape({
942
943
  active: yup6.boolean().required("Active status is required"),
@@ -966,7 +967,8 @@ var adSchema = yup6.object().shape({
966
967
  if (!value) return false;
967
968
  return value > /* @__PURE__ */ new Date();
968
969
  }),
969
- otherwise: () => yup6.date().nullable().notRequired()
970
+ // Keep `start` optional (not null) when ACTIVE to match TS type `start?: Date`.
971
+ otherwise: () => yup6.date().notRequired()
970
972
  }),
971
973
  targetRegion: yup6.array().of(yup6.string().required()).min(1, "At least one target region is required").required("Target region is required")
972
974
  });
@@ -2435,7 +2437,6 @@ var USER_FIELDS_FRAGMENT = import_client2.gql`
2435
2437
  platform
2436
2438
  preferredRegion
2437
2439
  promoCodes
2438
- refreshToken
2439
2440
  role
2440
2441
  school
2441
2442
  termsAgreement {
@@ -2687,7 +2688,10 @@ var GET_EVENT_BY_PLACE_ID = import_client3.gql`
2687
2688
  ${EVENT_LIST_ITEM}
2688
2689
  `;
2689
2690
  var GET_EVENTS_BY_REGION = import_client3.gql`
2690
- query getEventsByRegion($region: String!, $options: EventsByRegionOptions) {
2691
+ query getEventsByRegion(
2692
+ $region: String!
2693
+ $options: ResourcesByRegionOptions
2694
+ ) {
2691
2695
  eventsByRegion(region: $region, options: $options) {
2692
2696
  ...EventListItemFields
2693
2697
  }
@@ -2695,7 +2699,7 @@ var GET_EVENTS_BY_REGION = import_client3.gql`
2695
2699
  ${EVENT_LIST_ITEM}
2696
2700
  `;
2697
2701
  var SEARCH_EVENTS = import_client3.gql`
2698
- query searchEvents($region: String, $search: String,$tags: [String]) {
2702
+ query searchEvents($region: String, $search: String, $tags: [String]) {
2699
2703
  eventsSearch(region: $region, search: $search, tags: $tags) {
2700
2704
  ...EventListItemFields
2701
2705
  }
@@ -2922,7 +2926,10 @@ var GET_VENDOR = import_client4.gql`
2922
2926
  ${VENDOR}
2923
2927
  `;
2924
2928
  var GET_VENDORS_BY_REGION = import_client4.gql`
2925
- query getVendorsByRegion($region: String!, $options: EventsByRegionOptions) {
2929
+ query getVendorsByRegion(
2930
+ $region: String!
2931
+ $options: ResourcesByRegionOptions
2932
+ ) {
2926
2933
  vendorsByRegion(region: $region, options: $options) {
2927
2934
  ...VendorFields
2928
2935
  }
@@ -3360,7 +3367,10 @@ var GET_PARTNER = import_client16.gql`
3360
3367
  ${PARTNER}
3361
3368
  `;
3362
3369
  var GET_PARTNERS_BY_REGION = import_client16.gql`
3363
- query getPartnersByRegion($region: String!, $options: EventsByRegionOptions) {
3370
+ query getPartnersByRegion(
3371
+ $region: String!
3372
+ $options: ResourcesByRegionOptions
3373
+ ) {
3364
3374
  partnersByRegion(region: $region, options: $options) {
3365
3375
  ...PartnerFields
3366
3376
  }
@@ -4791,7 +4801,7 @@ var RELATION_SHARE_INVITATION = "invitation";
4791
4801
  var RELATION_SHARE_APPLICATION = "application";
4792
4802
 
4793
4803
  // src/sharing/constants.ts
4794
- var SHARE_SITE_URL = "https://cluemart.co.nz";
4804
+ var SHARE_SITE_URL = CLUEMART_MAIN_DOMAIN_URL;
4795
4805
  var SHARE_CALENDAR_ICON = "\u{1F4C5}";
4796
4806
  var SHARE_MARKET_DATES_SECTION_HEADING = `${SHARE_CALENDAR_ICON} Market dates:`;
4797
4807
  var SHARE_CHECKMARK_ICON = "\u2705";
@@ -5758,26 +5768,23 @@ var import_react2 = __toESM(require("react"));
5758
5768
  var import_react_hook_form13 = require("react-hook-form");
5759
5769
  var defaultValues8 = {
5760
5770
  active: true,
5761
- end: /* @__PURE__ */ new Date(),
5771
+ // Use a future default so yup "future date" rules pass on first submit.
5772
+ end: new Date(Date.now() + 7 * 24 * 60 * 60 * 1e3),
5762
5773
  resource: {
5763
- adDescription: null,
5764
- adImage: null,
5765
- adStyle: null,
5766
- // default to bloom
5767
- adTitle: null,
5768
- adType: null,
5769
- // default to sponsored
5770
- resourceId: null,
5771
- resourceName: null,
5772
- resourceRegion: null,
5773
- resourceType: null
5774
- // default to event
5774
+ adDescription: "",
5775
+ adImage: "",
5776
+ adStyle: "Bloom" /* BLOOM */,
5777
+ adTitle: "",
5778
+ adType: "Sponsored" /* SPONSORED */,
5779
+ resourceId: "",
5780
+ resourceName: "",
5781
+ resourceRegion: "",
5782
+ resourceType: "event" /* EVENT */
5775
5783
  },
5776
- showOn: [""],
5777
- // default to front page
5778
- start: /* @__PURE__ */ new Date(),
5779
- status: "Paused" /* PAUSED */,
5780
- // default to paused
5784
+ showOn: ["Front_page" /* FRONT_PAGE */],
5785
+ // `start` is only required (and must be future) when status !== ACTIVE.
5786
+ start: void 0,
5787
+ status: "Active" /* ACTIVE */,
5781
5788
  targetRegion: []
5782
5789
  };
5783
5790
  function useAdForm(data) {