@timardex/cluemart-shared 2.2.0 → 2.2.2

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 (95) hide show
  1. package/dist/{ad-rrCulESo.d.ts → ad-C4L_-r-4.d.ts} +12 -3
  2. package/dist/{ad-D0xWGTAB.d.mts → ad-XtBAH4rD.d.mts} +12 -3
  3. package/dist/{affiliate-C9eTAxEj.d.ts → affiliate-CxZHVZb2.d.ts} +2 -2
  4. package/dist/{affiliate-CGe0hR-U.d.mts → affiliate-D-L_UtL8.d.mts} +2 -2
  5. package/dist/apollo/index.cjs +12 -7
  6. package/dist/apollo/index.cjs.map +1 -1
  7. package/dist/apollo/index.d.mts +11 -0
  8. package/dist/apollo/index.d.ts +11 -0
  9. package/dist/apollo/index.mjs +12 -7
  10. package/dist/apollo/index.mjs.map +1 -1
  11. package/dist/auth/index.cjs +42 -3
  12. package/dist/auth/index.cjs.map +1 -1
  13. package/dist/auth/index.d.mts +5 -4
  14. package/dist/auth/index.d.ts +5 -4
  15. package/dist/auth/index.mjs +7 -5
  16. package/dist/auth/index.mjs.map +1 -1
  17. package/dist/{chunk-OSSBKFNH.mjs → chunk-BR4XNXE7.mjs} +52 -1
  18. package/dist/chunk-BR4XNXE7.mjs.map +1 -0
  19. package/dist/{chunk-PIEXGXTD.mjs → chunk-FWKZZMQR.mjs} +1 -1
  20. package/dist/chunk-FWKZZMQR.mjs.map +1 -0
  21. package/dist/{chunk-KT65YYOB.mjs → chunk-KHC57ZNS.mjs} +16 -12
  22. package/dist/chunk-KHC57ZNS.mjs.map +1 -0
  23. package/dist/{chunk-T7A7ZG55.mjs → chunk-MTBH5LMV.mjs} +111 -22
  24. package/dist/chunk-MTBH5LMV.mjs.map +1 -0
  25. package/dist/{chunk-OK3BPZYA.mjs → chunk-PUX53EZX.mjs} +3 -3
  26. package/dist/{chunk-YPWBK4WU.mjs → chunk-Q2WLLXTA.mjs} +2 -1
  27. package/dist/chunk-Q2WLLXTA.mjs.map +1 -0
  28. package/dist/{chunk-GOWIY4NZ.mjs → chunk-TCV735VY.mjs} +10 -2
  29. package/dist/chunk-TCV735VY.mjs.map +1 -0
  30. package/dist/{chunk-BTZIWVSF.mjs → chunk-YKJAOTF7.mjs} +3 -3
  31. package/dist/chunk-YKJAOTF7.mjs.map +1 -0
  32. package/dist/{contactUs-Be0zqd9Q.d.ts → contactUs-CR-nghbk.d.ts} +1 -1
  33. package/dist/{contactUs-CQXyz40A.d.mts → contactUs-CwHKoGEt.d.mts} +1 -1
  34. package/dist/enums/index.cjs +1 -0
  35. package/dist/enums/index.cjs.map +1 -1
  36. package/dist/enums/index.d.mts +1 -0
  37. package/dist/enums/index.d.ts +1 -0
  38. package/dist/enums/index.mjs +1 -1
  39. package/dist/formFields/index.cjs +16 -7
  40. package/dist/formFields/index.cjs.map +1 -1
  41. package/dist/formFields/index.d.mts +1 -1
  42. package/dist/formFields/index.d.ts +1 -1
  43. package/dist/formFields/index.mjs +5 -5
  44. package/dist/{global-CAf04GRC.d.ts → global-B4mmQo6R.d.ts} +25 -7
  45. package/dist/{global-d8RFwoYS.d.mts → global-D1r5ZuQO.d.mts} +25 -7
  46. package/dist/graphql/index.cjs +62 -0
  47. package/dist/graphql/index.cjs.map +1 -1
  48. package/dist/graphql/index.d.mts +33 -6
  49. package/dist/graphql/index.d.ts +33 -6
  50. package/dist/graphql/index.mjs +9 -3
  51. package/dist/hooks/index.cjs +84 -37
  52. package/dist/hooks/index.cjs.map +1 -1
  53. package/dist/hooks/index.d.mts +5 -5
  54. package/dist/hooks/index.d.ts +5 -5
  55. package/dist/hooks/index.mjs +20 -20
  56. package/dist/hooks/index.mjs.map +1 -1
  57. package/dist/index.cjs +190 -32
  58. package/dist/index.cjs.map +1 -1
  59. package/dist/index.d.mts +90 -15
  60. package/dist/index.d.ts +90 -15
  61. package/dist/index.mjs +185 -32
  62. package/dist/index.mjs.map +1 -1
  63. package/dist/map/index.d.mts +1 -1
  64. package/dist/map/index.d.ts +1 -1
  65. package/dist/region/index.cjs.map +1 -1
  66. package/dist/region/index.d.mts +1 -1
  67. package/dist/region/index.d.ts +1 -1
  68. package/dist/region/index.mjs +1 -1
  69. package/dist/{resourceActivities-DO_PjmMN.d.mts → resourceActivities-DUReu_jD.d.mts} +1 -1
  70. package/dist/{resourceActivities-ByCZO0rJ.d.ts → resourceActivities-Uz9uavhK.d.ts} +1 -1
  71. package/dist/sharing/index.cjs +21 -10
  72. package/dist/sharing/index.cjs.map +1 -1
  73. package/dist/sharing/index.d.mts +1 -1
  74. package/dist/sharing/index.d.ts +1 -1
  75. package/dist/sharing/index.mjs +3 -3
  76. package/dist/types/index.cjs.map +1 -1
  77. package/dist/types/index.d.mts +7 -7
  78. package/dist/types/index.d.ts +7 -7
  79. package/dist/types/index.mjs +2 -2
  80. package/dist/{user-BHYl7drL.d.mts → user-BpR-FTW2.d.mts} +1 -1
  81. package/dist/{user-DCqDbTLd.d.ts → user-IR0bHKFb.d.ts} +1 -1
  82. package/dist/utils/index.cjs +126 -31
  83. package/dist/utils/index.cjs.map +1 -1
  84. package/dist/utils/index.d.mts +32 -12
  85. package/dist/utils/index.d.ts +32 -12
  86. package/dist/utils/index.mjs +9 -5
  87. package/package.json +1 -1
  88. package/dist/chunk-BTZIWVSF.mjs.map +0 -1
  89. package/dist/chunk-GOWIY4NZ.mjs.map +0 -1
  90. package/dist/chunk-KT65YYOB.mjs.map +0 -1
  91. package/dist/chunk-OSSBKFNH.mjs.map +0 -1
  92. package/dist/chunk-PIEXGXTD.mjs.map +0 -1
  93. package/dist/chunk-T7A7ZG55.mjs.map +0 -1
  94. package/dist/chunk-YPWBK4WU.mjs.map +0 -1
  95. /package/dist/{chunk-OK3BPZYA.mjs.map → chunk-PUX53EZX.mjs.map} +0 -0
package/dist/index.mjs CHANGED
@@ -130,6 +130,7 @@ var EnumNotificationResourceType = /* @__PURE__ */ ((EnumNotificationResourceTyp
130
130
  EnumNotificationResourceType2["CREATED_EVENT"] = "created_event";
131
131
  EnumNotificationResourceType2["CREATED_PARTNER"] = "created_partner";
132
132
  EnumNotificationResourceType2["CREATED_VENDOR"] = "created_vendor";
133
+ EnumNotificationResourceType2["CREATED_COUPON"] = "created_coupon";
133
134
  EnumNotificationResourceType2["DAILY_CLUE_GAME"] = "daily_clue_game";
134
135
  EnumNotificationResourceType2["DEACTIVATED_EVENT"] = "deactivated_event";
135
136
  EnumNotificationResourceType2["DEACTIVATED_PARTNER"] = "deactivated_partner";
@@ -587,13 +588,22 @@ var gameScreenIdentifierList = [
587
588
  ];
588
589
 
589
590
  // src/utils/date.ts
590
- import dayjs from "dayjs";
591
- import customParseFormat from "dayjs/plugin/customParseFormat.js";
591
+ import dayjs2 from "dayjs";
592
+ import customParseFormat2 from "dayjs/plugin/customParseFormat.js";
592
593
  import isSameOrAfter from "dayjs/plugin/isSameOrAfter.js";
593
594
  import timezone from "dayjs/plugin/timezone.js";
594
595
  import utc from "dayjs/plugin/utc.js";
595
596
 
597
+ // src/utils/dateFormats.ts
598
+ var dateFormat = "DD-MM-YYYY";
599
+ var timeFormat = "HH:mm";
600
+
596
601
  // src/utils/eventDateStatus.ts
602
+ import dayjs from "dayjs";
603
+ import customParseFormat from "dayjs/plugin/customParseFormat.js";
604
+ import isoWeek from "dayjs/plugin/isoWeek.js";
605
+ dayjs.extend(customParseFormat);
606
+ dayjs.extend(isoWeek);
597
607
  var EVENT_DATE_STATUS_PERIOD_MAP = {
598
608
  ["Today" /* TODAY */]: [
599
609
  "Started" /* STARTED */,
@@ -634,27 +644,90 @@ function isFutureEventDateStatus(dateStatus) {
634
644
  function filterDatesByFutureStatus(dates) {
635
645
  return dates.filter((date) => isFutureEventDateStatus(date.dateStatus));
636
646
  }
647
+ var MANUAL_DATE_STATUSES = /* @__PURE__ */ new Set([
648
+ "Canceled" /* CANCELED */,
649
+ "Rescheduled" /* RE_SCHEDULED */
650
+ ]);
651
+ function getFutureEventStatus(startDateTime, now) {
652
+ const hoursUntilStart = startDateTime.diff(now, "hour", true);
653
+ if (hoursUntilStart > 0 && hoursUntilStart <= 4) {
654
+ return "Starting_Soon" /* STARTING_SOON */;
655
+ }
656
+ if (startDateTime.isSame(now, "day")) {
657
+ return "Today" /* TODAY */;
658
+ }
659
+ if (startDateTime.isSame(now.add(1, "day"), "day")) {
660
+ return "Tomorrow" /* TOMORROW */;
661
+ }
662
+ if (startDateTime.isSame(now, "isoWeek")) {
663
+ return "This_Week" /* THIS_WEEK */;
664
+ }
665
+ if (startDateTime.isSame(now.add(1, "week"), "isoWeek")) {
666
+ return "Next_Week" /* NEXT_WEEK */;
667
+ }
668
+ return "Upcoming" /* UPCOMING */;
669
+ }
670
+ function updateSingleDateTimeStatus(dateTime, now = dayjs()) {
671
+ if (MANUAL_DATE_STATUSES.has(dateTime.dateStatus)) {
672
+ return dateTime;
673
+ }
674
+ const dateTimeFormat = `${dateFormat} ${timeFormat}`;
675
+ const startDateTime = dayjs(
676
+ `${dateTime.startDate} ${dateTime.startTime}`,
677
+ dateTimeFormat,
678
+ true
679
+ );
680
+ const endDateTime = dayjs(
681
+ `${dateTime.endDate} ${dateTime.endTime}`,
682
+ dateTimeFormat,
683
+ true
684
+ );
685
+ if (!startDateTime.isValid() || !endDateTime.isValid()) {
686
+ return {
687
+ ...dateTime,
688
+ dateStatus: "Invalid" /* INVALID */
689
+ };
690
+ }
691
+ if (endDateTime.isBefore(startDateTime)) {
692
+ return {
693
+ ...dateTime,
694
+ dateStatus: "Invalid" /* INVALID */
695
+ };
696
+ }
697
+ let dateStatus;
698
+ if (endDateTime.isAfter(now)) {
699
+ if (startDateTime.isAfter(now)) {
700
+ dateStatus = getFutureEventStatus(startDateTime, now);
701
+ } else {
702
+ dateStatus = "Started" /* STARTED */;
703
+ }
704
+ } else {
705
+ dateStatus = "Ended" /* ENDED */;
706
+ }
707
+ return {
708
+ ...dateTime,
709
+ dateStatus
710
+ };
711
+ }
637
712
 
638
713
  // src/utils/date.ts
639
- var dateFormat = "DD-MM-YYYY";
640
- var timeFormat = "HH:mm";
641
- dayjs.extend(customParseFormat);
642
- dayjs.extend(utc);
643
- dayjs.extend(timezone);
644
- dayjs.extend(isSameOrAfter);
714
+ dayjs2.extend(customParseFormat2);
715
+ dayjs2.extend(utc);
716
+ dayjs2.extend(timezone);
717
+ dayjs2.extend(isSameOrAfter);
645
718
  var NZ_TZ = "Pacific/Auckland";
646
719
  function toNZTime(date) {
647
- return date ? dayjs(date).tz(NZ_TZ) : dayjs().tz(NZ_TZ);
720
+ return date ? dayjs2(date).tz(NZ_TZ) : dayjs2().tz(NZ_TZ);
648
721
  }
649
722
  function nzStartOfDay(input) {
650
723
  if (input == null) {
651
- return dayjs().tz(NZ_TZ).startOf("day");
724
+ return dayjs2().tz(NZ_TZ).startOf("day");
652
725
  }
653
- return dayjs.tz(input, NZ_TZ).startOf("day");
726
+ return dayjs2.tz(input, NZ_TZ).startOf("day");
654
727
  }
655
728
  var formatDate = (dateStr, display = "datetime", timeStr) => {
656
729
  const dateTimeStr = timeStr ? `${dateStr} ${timeStr}` : dateStr;
657
- const dateTime = timeStr ? dayjs(dateTimeStr, `${dateFormat} ${timeFormat}`) : dayjs(dateStr, dateFormat);
730
+ const dateTime = timeStr ? dayjs2(dateTimeStr, `${dateFormat} ${timeFormat}`) : dayjs2(dateStr, dateFormat);
658
731
  const formattedDate = dateTime.format("dddd, D MMMM, YYYY");
659
732
  const formattedTime = dateTime.format("h:mm a");
660
733
  switch (display) {
@@ -669,9 +742,12 @@ var formatDate = (dateStr, display = "datetime", timeStr) => {
669
742
  }
670
743
  };
671
744
  var getCurrentAndFutureDates = (dates) => {
672
- const now = dayjs();
745
+ const now = dayjs2();
673
746
  return dates.filter((dateObj) => {
674
- const dateTime = dayjs(
747
+ if (!dateObj.startDate || !dateObj.startTime) {
748
+ return false;
749
+ }
750
+ const dateTime = dayjs2(
675
751
  `${dateObj.startDate} ${dateObj.startTime}`,
676
752
  `${dateFormat} ${timeFormat}`
677
753
  );
@@ -679,8 +755,11 @@ var getCurrentAndFutureDates = (dates) => {
679
755
  });
680
756
  };
681
757
  var isFutureDatesBeforeThreshold = (date, minHoursFromNow) => {
682
- const threshold = minHoursFromNow ? dayjs().add(minHoursFromNow, "hour") : dayjs().startOf("day");
683
- const dateTime = dayjs(
758
+ if (!date.startDate || !date.startTime) {
759
+ return false;
760
+ }
761
+ const threshold = minHoursFromNow ? dayjs2().add(minHoursFromNow, "hour") : dayjs2().startOf("day");
762
+ const dateTime = dayjs2(
684
763
  `${date.startDate} ${date.startTime}`,
685
764
  `${dateFormat} ${timeFormat}`
686
765
  );
@@ -699,9 +778,18 @@ function sortDatesChronologically(dates) {
699
778
  }
700
779
  return [...dates].sort((a, b) => {
701
780
  const dateTimeFormat = `${dateFormat} ${timeFormat}`;
702
- const dateA = dayjs(`${a.startDate} ${a.startTime}`, dateTimeFormat);
703
- const dateB = dayjs(`${b.startDate} ${b.startTime}`, dateTimeFormat);
704
- return dateA.valueOf() - dateB.valueOf();
781
+ const dateA = a.startDate && a.startTime ? dayjs2(`${a.startDate} ${a.startTime}`, dateTimeFormat) : null;
782
+ const dateB = b.startDate && b.startTime ? dayjs2(`${b.startDate} ${b.startTime}`, dateTimeFormat) : null;
783
+ if (dateA && dateB) {
784
+ return dateA.valueOf() - dateB.valueOf();
785
+ }
786
+ if (dateA) {
787
+ return -1;
788
+ }
789
+ if (dateB) {
790
+ return 1;
791
+ }
792
+ return 0;
705
793
  });
706
794
  }
707
795
  var futureTimePeriods = FUTURE_EVENT_DATE_STATUSES.filter(
@@ -1320,16 +1408,18 @@ var SCHOOL_MIN_STUDENT_COUNT = 300;
1320
1408
  var SCHOOL_MAX_STUDENT_COUNT = 0;
1321
1409
 
1322
1410
  // src/calendar/eventCalendar.ts
1323
- import dayjs2 from "dayjs";
1411
+ import dayjs3 from "dayjs";
1324
1412
  function toCalendarIsoDate(startDate) {
1325
- const formatted = dayjs2(startDate, dateFormat).format("YYYY-MM-DD");
1326
- return dayjs2(formatted, "YYYY-MM-DD", true).isValid() ? formatted : null;
1413
+ const formatted = dayjs3(startDate, dateFormat).format("YYYY-MM-DD");
1414
+ return dayjs3(formatted, "YYYY-MM-DD", true).isValid() ? formatted : null;
1327
1415
  }
1328
1416
  function fromCalendarIsoDate(isoDate) {
1329
- return dayjs2(isoDate, "YYYY-MM-DD").format(dateFormat);
1417
+ return dayjs3(isoDate, "YYYY-MM-DD").format(dateFormat);
1330
1418
  }
1331
1419
  function getEventCalendarIsoDates(dateTimes) {
1332
- return dateTimes?.map((dateTime) => toCalendarIsoDate(dateTime.startDate)).filter((date) => Boolean(date)) ?? [];
1420
+ return dateTimes?.map(
1421
+ (dateTime) => dateTime.startDate ? toCalendarIsoDate(dateTime.startDate) : null
1422
+ ).filter((date) => Boolean(date)) ?? [];
1333
1423
  }
1334
1424
  function findEventDateTimeByIsoDate(dateTimes, isoDate) {
1335
1425
  const selected = fromCalendarIsoDate(isoDate);
@@ -2418,7 +2508,9 @@ var availableCategories = assignColorToCategories([
2418
2508
 
2419
2509
  // src/eventStallholders/eventStallholderFilters.ts
2420
2510
  function eventStartDatesSet(dateTime) {
2421
- return new Set((dateTime ?? []).map((date) => date.startDate));
2511
+ return new Set(
2512
+ (dateTime ?? []).map((date) => date.startDate).filter((date) => Boolean(date))
2513
+ );
2422
2514
  }
2423
2515
  function hasMatchingEventDate(vendorStartDates, eventStartDates) {
2424
2516
  return vendorStartDates.some((startDate) => eventStartDates.has(startDate));
@@ -2438,9 +2530,7 @@ function matchesCategory(categoryNames, selectedCategory) {
2438
2530
  function getRegisteredVendorStartDates(vendor) {
2439
2531
  const relations = vendor.relations ?? [];
2440
2532
  return relations.flatMap(
2441
- (relation) => (relation.relationDates ?? []).map(
2442
- (relationDate) => relationDate.dateTime.startDate
2443
- )
2533
+ (relation) => (relation.relationDates ?? []).map((relationDate) => relationDate.dateTime.startDate).filter((date) => Boolean(date))
2444
2534
  );
2445
2535
  }
2446
2536
  function getRegisteredVendorCategoryNames(vendor) {
@@ -2448,7 +2538,7 @@ function getRegisteredVendorCategoryNames(vendor) {
2448
2538
  }
2449
2539
  function getUnregisteredVendorStartDates(vendor) {
2450
2540
  return (vendor.invitations ?? []).flatMap(
2451
- (invitation) => invitation.dateTime.map((date) => date.startDate)
2541
+ (invitation) => invitation.dateTime.map((date) => date.startDate).filter((date) => Boolean(date))
2452
2542
  );
2453
2543
  }
2454
2544
  function getUnregisteredVendorCategoryNames(vendor) {
@@ -2508,7 +2598,9 @@ function getEventDatesWithStallholders(eventDateTime, stallholderStartDates) {
2508
2598
  }
2509
2599
  const startDates = new Set(stallholderStartDates);
2510
2600
  return sortDatesChronologically(
2511
- eventDateTime.filter((date) => startDates.has(date.startDate))
2601
+ eventDateTime.filter(
2602
+ (date) => Boolean(date.startDate) && startDates.has(date.startDate)
2603
+ )
2512
2604
  );
2513
2605
  }
2514
2606
  function getStallholderCategoryNames(registeredVendors, unregisteredVendors = []) {
@@ -2569,7 +2661,7 @@ function getVendorEventRelationStartDates(events) {
2569
2661
  );
2570
2662
  const uniqueStartDates = [];
2571
2663
  for (const dateTime of sortedDates) {
2572
- if (!uniqueStartDates.includes(dateTime.startDate)) {
2664
+ if (dateTime.startDate && !uniqueStartDates.includes(dateTime.startDate)) {
2573
2665
  uniqueStartDates.push(dateTime.startDate);
2574
2666
  }
2575
2667
  }
@@ -5157,6 +5249,42 @@ var REFRESH_TOKEN_MUTATION = gql13`
5157
5249
  }
5158
5250
  }
5159
5251
  `;
5252
+ var START_IMPERSONATION_MUTATION = gql13`
5253
+ mutation startImpersonation($input: StartImpersonationInputType!) {
5254
+ startImpersonation(input: $input) {
5255
+ data {
5256
+ expiresAt
5257
+ refreshToken
5258
+ sessionId
5259
+ token
5260
+ user {
5261
+ ...UserFields
5262
+ }
5263
+ }
5264
+ message
5265
+ }
5266
+ }
5267
+ ${USER_FIELDS_FRAGMENT}
5268
+ `;
5269
+ var REFRESH_IMPERSONATION_MUTATION = gql13`
5270
+ mutation refreshImpersonation($input: RefreshImpersonationInputType!) {
5271
+ refreshImpersonation(input: $input) {
5272
+ data {
5273
+ refreshToken
5274
+ token
5275
+ }
5276
+ message
5277
+ }
5278
+ }
5279
+ `;
5280
+ var END_IMPERSONATION_MUTATION = gql13`
5281
+ mutation endImpersonation {
5282
+ endImpersonation {
5283
+ data
5284
+ message
5285
+ }
5286
+ }
5287
+ `;
5160
5288
  var RESET_PASSWORD_MUTATION = gql13`
5161
5289
  mutation resetPassword($input: ResetPasswordInputType!) {
5162
5290
  resetPassword(input: $input) {
@@ -5201,6 +5329,18 @@ var useRefreshToken = () => {
5201
5329
  const [refreshToken, { loading, error }] = useMutation2(REFRESH_TOKEN_MUTATION);
5202
5330
  return { error, loading, refreshToken };
5203
5331
  };
5332
+ var useStartImpersonation = () => {
5333
+ const [startImpersonation, { loading, error }] = useMutation2(START_IMPERSONATION_MUTATION);
5334
+ return { error, loading, startImpersonation };
5335
+ };
5336
+ var useRefreshImpersonation = () => {
5337
+ const [refreshImpersonation, { loading, error }] = useMutation2(REFRESH_IMPERSONATION_MUTATION);
5338
+ return { error, loading, refreshImpersonation };
5339
+ };
5340
+ var useEndImpersonation = () => {
5341
+ const [endImpersonation, { loading, error }] = useMutation2(END_IMPERSONATION_MUTATION);
5342
+ return { endImpersonation, error, loading };
5343
+ };
5204
5344
  var useRequestPasswordReset = () => {
5205
5345
  const [requestPasswordReset, { loading, error }] = useMutation2(REQUEST_PASSWORD_RESET_MUTATION);
5206
5346
  return { error, loading, requestPasswordReset };
@@ -5645,14 +5785,22 @@ var UPDATE_EVENT_INFO_MUTATION = gql18`
5645
5785
  // src/graphql/hooks/event/hooksMutation.ts
5646
5786
  var useCreateEvent = () => {
5647
5787
  const [createEvent, { loading, error }] = useMutation5(CREATE_EVENT_MUTATION, {
5788
+ // The mutation response is a live-only view of EventType. Don't write it
5789
+ // into the normalized EventType cache, where it would overwrite the full
5790
+ // (live + archived) `dateTime` that `getEvent` fetches for the detail page.
5648
5791
  awaitRefetchQueries: true,
5792
+ fetchPolicy: "no-cache",
5649
5793
  refetchQueries: [{ query: GET_USER_EVENTS }]
5650
5794
  });
5651
5795
  return { createEvent, error, loading };
5652
5796
  };
5653
5797
  var useUpdateEvent = () => {
5654
5798
  const [updateEvent, { loading, error }] = useMutation5(UPDATE_EVENT_MUTATION, {
5799
+ // See useCreateEvent: the update response only carries the live schedule,
5800
+ // so keep it out of the normalized EventType cache to avoid clobbering the
5801
+ // archived dates merged by `getEvent`.
5655
5802
  awaitRefetchQueries: true,
5803
+ fetchPolicy: "no-cache",
5656
5804
  refetchQueries: (mutationResult) => {
5657
5805
  const eventId = mutationResult?.data?.updateEvent?.data?._id;
5658
5806
  if (!eventId) return [];
@@ -9014,7 +9162,7 @@ function formatShareStallLine(stall) {
9014
9162
  }
9015
9163
  function formatShareInvitationMarketDatesSection(dateTime) {
9016
9164
  const dateBlocks = dateTime.map((date) => {
9017
- const formattedDate = formatShareMarketDate(date.startDate);
9165
+ const formattedDate = date.startDate ? formatShareMarketDate(date.startDate) : "Unknown date";
9018
9166
  const stallLines = date.stallTypes.map(formatShareStallLine);
9019
9167
  return [`- ${formattedDate}`, ...stallLines].join("\n");
9020
9168
  });
@@ -9701,6 +9849,7 @@ export {
9701
9849
  getEventScheduleStatusPresentation,
9702
9850
  getEventScheduleStatusTone,
9703
9851
  getEventStallholderEmptyMessage,
9852
+ getFutureEventStatus,
9704
9853
  getPermissionsForRoles,
9705
9854
  getRegisteredVendorCategoryNames,
9706
9855
  getRegisteredVendorStartDates,
@@ -9791,6 +9940,7 @@ export {
9791
9940
  toShareSocialImageCacheVersion,
9792
9941
  toUserFacingErrorMessage,
9793
9942
  truncateText,
9943
+ updateSingleDateTimeStatus,
9794
9944
  useActivateVendorClaim,
9795
9945
  useAddParticipantToChat,
9796
9946
  useAddUserFavouriteResource,
@@ -9840,6 +9990,7 @@ export {
9840
9990
  useDeleteUnregisteredVendor,
9841
9991
  useDeleteUser,
9842
9992
  useDeleteVendor,
9993
+ useEndImpersonation,
9843
9994
  useGetAd,
9844
9995
  useGetAds,
9845
9996
  useGetAdsByRegion,
@@ -9903,6 +10054,7 @@ export {
9903
10054
  usePaginatedList,
9904
10055
  useRedeemAffiliateReward,
9905
10056
  useRedeemReward,
10057
+ useRefreshImpersonation,
9906
10058
  useRefreshToken,
9907
10059
  useRegister,
9908
10060
  useRemoveParticipantFromChat,
@@ -9922,6 +10074,7 @@ export {
9922
10074
  useSelectStandardPackage,
9923
10075
  useSendChatMessage,
9924
10076
  useStartGame,
10077
+ useStartImpersonation,
9925
10078
  useSyncBillingCatalogPrice,
9926
10079
  useToggleChatMessageLike,
9927
10080
  useUnlinkUnregisteredVendorByInviterId,