@timardex/cluemart-shared 1.6.130 → 1.7.1
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/ad-BUYzE6zx.d.ts +181 -0
- package/dist/ad-BhLoEul3.d.mts +181 -0
- package/dist/affiliate-BbtjeUP4.d.mts +73 -0
- package/dist/affiliate-C51nzKsw.d.ts +73 -0
- package/dist/apollo/index.d.mts +3 -3
- package/dist/apollo/index.d.ts +3 -3
- package/dist/auth/index.cjs +951 -2546
- package/dist/auth/index.cjs.map +1 -1
- package/dist/auth/index.d.mts +30 -28
- package/dist/auth/index.d.ts +30 -28
- package/dist/auth/index.mjs +25 -24
- package/dist/auth/index.mjs.map +1 -1
- package/dist/chunk-32MKHJTX.mjs +1207 -0
- package/dist/chunk-32MKHJTX.mjs.map +1 -0
- package/dist/chunk-AYO3E4DM.mjs +224 -0
- package/dist/chunk-AYO3E4DM.mjs.map +1 -0
- package/dist/chunk-BIJ5NDXW.mjs +962 -0
- package/dist/chunk-BIJ5NDXW.mjs.map +1 -0
- package/dist/chunk-DQ7ZHIXW.mjs +26 -0
- package/dist/chunk-DQ7ZHIXW.mjs.map +1 -0
- package/dist/chunk-ILILH7E2.mjs +219 -0
- package/dist/chunk-ILILH7E2.mjs.map +1 -0
- package/dist/{chunk-OHHJ3KJJ.mjs → chunk-LBEJECG3.mjs} +64 -71
- package/dist/chunk-LBEJECG3.mjs.map +1 -0
- package/dist/chunk-NPFJ2CN2.mjs +109 -0
- package/dist/chunk-NPFJ2CN2.mjs.map +1 -0
- package/dist/chunk-R6PCFOYO.mjs +3650 -0
- package/dist/chunk-R6PCFOYO.mjs.map +1 -0
- package/dist/{chunk-NWWKI4PJ.mjs → chunk-SD42WIMV.mjs} +5 -5
- package/dist/chunk-SD42WIMV.mjs.map +1 -0
- package/dist/chunk-VA5YN2K3.mjs +48 -0
- package/dist/chunk-VA5YN2K3.mjs.map +1 -0
- package/dist/{chunk-DATBGC2K.mjs → chunk-VPANTTZI.mjs} +23 -108
- package/dist/chunk-VPANTTZI.mjs.map +1 -0
- package/dist/chunk-X3OLM35T.mjs +278 -0
- package/dist/chunk-X3OLM35T.mjs.map +1 -0
- package/dist/contactUs--NoohZBu.d.ts +11 -0
- package/dist/contactUs-CBWzefUS.d.mts +11 -0
- package/dist/enums/index.cjs +229 -2
- package/dist/enums/index.cjs.map +1 -1
- package/dist/enums/index.d.mts +170 -5
- package/dist/enums/index.d.ts +170 -5
- package/dist/enums/index.mjs +41 -1
- package/dist/formFields/index.cjs +112 -284
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.d.mts +2 -4
- package/dist/formFields/index.d.ts +2 -4
- package/dist/formFields/index.mjs +50 -919
- package/dist/formFields/index.mjs.map +1 -1
- package/dist/global-CUYYxpy2.d.ts +699 -0
- package/dist/global-DePDtOFt.d.mts +699 -0
- package/dist/graphql/index.cjs +2304 -2872
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +469 -422
- package/dist/graphql/index.d.ts +469 -422
- package/dist/graphql/index.mjs +160 -2547
- package/dist/graphql/index.mjs.map +1 -1
- package/dist/hooks/index.cjs +3869 -534
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +9 -10
- package/dist/hooks/index.d.ts +9 -10
- package/dist/hooks/index.mjs +72 -54
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/images/index.mjs +21 -86
- package/dist/images/index.mjs.map +1 -1
- package/dist/index.cjs +4477 -5723
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +1679 -2539
- package/dist/index.d.ts +1679 -2539
- package/dist/index.mjs +4453 -5682
- package/dist/index.mjs.map +1 -1
- package/dist/map/index.d.mts +2 -3
- package/dist/map/index.d.ts +2 -3
- package/dist/resourceActivities-CMUcn2P7.d.ts +130 -0
- package/dist/resourceActivities-CwbJFGIp.d.mts +130 -0
- package/dist/sharing/index.cjs +19 -23
- package/dist/sharing/index.cjs.map +1 -1
- package/dist/sharing/index.d.mts +3 -16
- package/dist/sharing/index.d.ts +3 -16
- package/dist/sharing/index.mjs +29 -183
- package/dist/sharing/index.mjs.map +1 -1
- package/dist/subscription-BU8GvH2K.d.ts +12 -0
- package/dist/subscription-bmAdrnfi.d.mts +12 -0
- package/dist/theme/index.mjs +5 -41
- package/dist/theme/index.mjs.map +1 -1
- package/dist/types/index.cjs +123 -868
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.mts +15 -234
- package/dist/types/index.d.ts +15 -234
- package/dist/types/index.mjs +31 -61
- package/dist/user-D47MLFyH.d.ts +134 -0
- package/dist/user-DE8edl3u.d.mts +134 -0
- package/dist/utils/index.cjs +117 -292
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.mts +23 -25
- package/dist/utils/index.d.ts +23 -25
- package/dist/utils/index.mjs +5 -6
- package/package.json +3 -10
- package/dist/affiliate-Bqqlffw8.d.mts +0 -36
- package/dist/affiliate-Btlp5XUp.d.ts +0 -36
- package/dist/affiliateAdapters-BW3BY7c5.d.mts +0 -118
- package/dist/affiliateAdapters-C51ISmuA.d.ts +0 -118
- package/dist/auth-BOmAO53v.d.ts +0 -169
- package/dist/auth-CsITA95p.d.mts +0 -169
- package/dist/chunk-DATBGC2K.mjs.map +0 -1
- package/dist/chunk-DDHECBJR.mjs +0 -726
- package/dist/chunk-DDHECBJR.mjs.map +0 -1
- package/dist/chunk-INQCDU24.mjs +0 -139
- package/dist/chunk-INQCDU24.mjs.map +0 -1
- package/dist/chunk-NWWKI4PJ.mjs.map +0 -1
- package/dist/chunk-OHHJ3KJJ.mjs.map +0 -1
- package/dist/chunk-TOEFAEF2.mjs +0 -69
- package/dist/chunk-TOEFAEF2.mjs.map +0 -1
- package/dist/chunk-UKW7NZEQ.mjs +0 -2813
- package/dist/chunk-UKW7NZEQ.mjs.map +0 -1
- package/dist/dailyClue-C6WXY73z.d.mts +0 -105
- package/dist/dailyClue-C6WXY73z.d.ts +0 -105
- package/dist/event-C9K7CSg4.d.ts +0 -53
- package/dist/event-W0NhL5Cd.d.mts +0 -53
- package/dist/global-BbSFfYdd.d.ts +0 -181
- package/dist/global-C6v9tRji.d.mts +0 -181
- package/dist/graphql-CDOfA79A.d.ts +0 -1253
- package/dist/graphql-CcvzTs9k.d.mts +0 -1253
- package/dist/resourceActivities-CS8YRIIL.d.mts +0 -89
- package/dist/resourceActivities-DOdNPkhW.d.ts +0 -89
- package/dist/subscription-Cj_qBA7u.d.mts +0 -20
- package/dist/subscription-OiJ50uJb.d.ts +0 -20
- package/dist/vendor-DmMi2qmx.d.mts +0 -73
- package/dist/vendor-M9hVZlni.d.ts +0 -73
package/dist/utils/index.d.mts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { J as DailyClueGameData, a0 as GamePlacementClue, $ as GamePlacement, O as OptionItem, k as EnumPostType, aw as SocialMediaType, av as ResourceImageType, K as DateTimeType, L as LocationType, V as VendorType, g as UnregisteredVendorType, c as EventListItemType } from '../global-DePDtOFt.mjs';
|
|
2
2
|
import dayjs from 'dayjs';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { EnumRegions } from '../enums/index.mjs';
|
|
6
|
-
import { c as AffiliateRewardWriteType } from '../affiliate-Bqqlffw8.mjs';
|
|
3
|
+
import { EnumRegions, EnumUserLicence, EnumReward, EnumInviteStatus, EnumEventDateStatus, EnumResourceType } from '../enums/index.mjs';
|
|
4
|
+
import { h as EnumAffiliateRewardType, f as AffiliateRewardType } from '../affiliate-BbtjeUP4.mjs';
|
|
7
5
|
import 'react-hook-form';
|
|
8
|
-
import '../
|
|
6
|
+
import '../user-DE8edl3u.mjs';
|
|
9
7
|
|
|
10
8
|
/** Seeded shuffle so all players see the same letter order / placements for a game. */
|
|
11
9
|
declare function seededShuffle<T>(array: readonly T[], seed: string): T[];
|
|
@@ -68,25 +66,25 @@ declare const removeTypename: (obj: any) => any;
|
|
|
68
66
|
declare const truncateText: (text: string, maxLength?: number) => string;
|
|
69
67
|
declare const capitalizeFirstLetter: (str: string) => string;
|
|
70
68
|
declare const statusOptions: {
|
|
71
|
-
label:
|
|
72
|
-
value:
|
|
69
|
+
label: EnumInviteStatus;
|
|
70
|
+
value: EnumInviteStatus;
|
|
73
71
|
}[];
|
|
74
72
|
declare const availableRegionTypes: EnumRegions[];
|
|
75
73
|
declare const availableRegionOptions: OptionItem[];
|
|
76
74
|
declare const paymentMethodOptions: OptionItem[];
|
|
77
75
|
declare function normalizeUrl(url: string): string;
|
|
78
|
-
declare const licenseNiceNames: Record<
|
|
76
|
+
declare const licenseNiceNames: Record<EnumUserLicence, string>;
|
|
79
77
|
declare const cluemartSocialMedia: SocialMediaType[];
|
|
80
78
|
declare const IOS_URL = "https://apps.apple.com/nz/app/cluemart/id6747251008";
|
|
81
79
|
declare const ANDROID_URL = "https://play.google.com/store/apps/details?id=com.timardex.cluemart";
|
|
82
80
|
declare const DEFAULT_RESOURCES_RETURN_LIMIT = 1000;
|
|
83
81
|
declare const DEFAULT_RESOURCES_RETURN_OFFSET = 0;
|
|
84
82
|
declare const CLUEMART_MAIN_DOMAIN_URL = "https://cluemart.co.nz";
|
|
85
|
-
declare const rewardNiceNames: Record<
|
|
83
|
+
declare const rewardNiceNames: Record<EnumReward, {
|
|
86
84
|
name: string;
|
|
87
85
|
points: number;
|
|
88
86
|
}>;
|
|
89
|
-
declare const PostTypeLabels: Record<
|
|
87
|
+
declare const PostTypeLabels: Record<EnumPostType, string>;
|
|
90
88
|
/** Hardcoded registration gateway code; only valid at sign-up (not a generated school referral code). */
|
|
91
89
|
declare const CM_SCHOOL_PROMO_CODE = "CM-SCHOOL";
|
|
92
90
|
/** Hardcoded registration gateway code; only valid at sign-up (not a generated affiliate referral code). */
|
|
@@ -115,23 +113,23 @@ declare function isResourceImageActive(image: ResourceImageLike | null | undefin
|
|
|
115
113
|
declare const SCHOOL_MIN_STUDENT_COUNT = 300;
|
|
116
114
|
declare const SCHOOL_MAX_STUDENT_COUNT = 0;
|
|
117
115
|
|
|
118
|
-
declare const EVENT_DATE_STATUS_PERIOD_MAP: Partial<Record<
|
|
119
|
-
declare function getAllowedEventDateStatuses(period:
|
|
120
|
-
declare function eventMatchesDateStatusPeriod(dateTime: Pick<DateTimeType, "dateStatus">[] | null | undefined, period:
|
|
116
|
+
declare const EVENT_DATE_STATUS_PERIOD_MAP: Partial<Record<EnumEventDateStatus, EnumEventDateStatus[]>>;
|
|
117
|
+
declare function getAllowedEventDateStatuses(period: EnumEventDateStatus): EnumEventDateStatus[];
|
|
118
|
+
declare function eventMatchesDateStatusPeriod(dateTime: Pick<DateTimeType, "dateStatus">[] | null | undefined, period: EnumEventDateStatus): boolean;
|
|
121
119
|
declare function filterEventsByDateStatusPeriod<T extends {
|
|
122
120
|
dateTime?: Pick<DateTimeType, "dateStatus">[] | null;
|
|
123
|
-
}>(events: T[], period:
|
|
121
|
+
}>(events: T[], period: EnumEventDateStatus): T[];
|
|
124
122
|
|
|
125
123
|
type CalendarSheetContentData = {
|
|
126
124
|
dateTime: DateTimeType;
|
|
127
125
|
location: LocationType;
|
|
128
126
|
resourceId: string;
|
|
129
|
-
resourceType:
|
|
127
|
+
resourceType: EnumResourceType;
|
|
130
128
|
};
|
|
131
|
-
declare const KNOWN_EVENT_SCHEDULE_STATUSES: Set<
|
|
129
|
+
declare const KNOWN_EVENT_SCHEDULE_STATUSES: Set<EnumEventDateStatus>;
|
|
132
130
|
type EventScheduleStatusTone = "started" | "startingSoon" | "ended" | "default";
|
|
133
131
|
type EventScheduleStatusPresentation = {
|
|
134
|
-
status:
|
|
132
|
+
status: EnumEventDateStatus;
|
|
135
133
|
statusLabel: string;
|
|
136
134
|
tone: EventScheduleStatusTone;
|
|
137
135
|
};
|
|
@@ -139,11 +137,11 @@ declare function toCalendarIsoDate(startDate: string): string | null;
|
|
|
139
137
|
declare function fromCalendarIsoDate(isoDate: string): string;
|
|
140
138
|
declare function getEventCalendarIsoDates(dateTimes: DateTimeType[] | null | undefined): string[];
|
|
141
139
|
declare function findEventDateTimeByIsoDate(dateTimes: DateTimeType[] | null | undefined, isoDate: string): DateTimeType | null;
|
|
142
|
-
declare function buildCalendarSheetContentData(dateTimes: DateTimeType[], isoDate: string, location: LocationType, resourceId: string, resourceType:
|
|
143
|
-
declare function getEventScheduleStatusTone(status:
|
|
140
|
+
declare function buildCalendarSheetContentData(dateTimes: DateTimeType[], isoDate: string, location: LocationType, resourceId: string, resourceType: EnumResourceType): CalendarSheetContentData | null;
|
|
141
|
+
declare function getEventScheduleStatusTone(status: EnumEventDateStatus): EventScheduleStatusTone;
|
|
144
142
|
declare function getEventScheduleStatusPresentation(dateTime: DateTimeType): EventScheduleStatusPresentation;
|
|
145
143
|
declare function getEventScheduleStatusLabel(dateTime: DateTimeType, onlyShowKnownStatuses: boolean): string | null;
|
|
146
|
-
declare function shouldShowEventActionsWithWeather(resourceType:
|
|
144
|
+
declare function shouldShowEventActionsWithWeather(resourceType: EnumResourceType, dateTime: DateTimeType, location: LocationType | null | undefined): boolean;
|
|
147
145
|
|
|
148
146
|
type StallholderFilterOption = {
|
|
149
147
|
label: string;
|
|
@@ -167,11 +165,11 @@ declare function getStallholderCategoryNames(registeredVendors: VendorType[], un
|
|
|
167
165
|
declare function getStallholderCategoryOptions(registeredVendors: VendorType[], unregisteredVendors?: UnregisteredVendorType[]): StallholderFilterOption[];
|
|
168
166
|
declare function getEventStallholderEmptyMessage(hasAnyStallholdersForEvent: boolean, selectedDate: string | null): string;
|
|
169
167
|
|
|
170
|
-
type RelationType = NonNullable<
|
|
168
|
+
type RelationType = NonNullable<EventListItemType["relations"]>[number];
|
|
171
169
|
declare function relationHasSelectedDate(relation: RelationType, selectedDate: string): boolean;
|
|
172
170
|
declare function eventHasSelectedDate(event: EventListItemType, selectedDate: string): boolean;
|
|
173
171
|
declare function filterVendorEventsBySelectedDate(events: EventListItemType[] | null | undefined, selectedDate: string | null): EventListItemType[];
|
|
174
|
-
declare function collectVendorEventRelationDateTimes(events: EventListItemType[] | null | undefined):
|
|
172
|
+
declare function collectVendorEventRelationDateTimes(events: EventListItemType[] | null | undefined): DateTimeType[];
|
|
175
173
|
declare function getVendorEventRelationStartDates(events: EventListItemType[] | null | undefined): string[];
|
|
176
174
|
declare function getVendorEventRelationDateOptions(events: EventListItemType[] | null | undefined): StallholderFilterOption[];
|
|
177
175
|
declare function getVendorEventsEmptyMessage(): string;
|
|
@@ -213,10 +211,10 @@ declare const AFFILIATE_REWARDS: {
|
|
|
213
211
|
* @param createdAt - The date the reward was received
|
|
214
212
|
* @returns The affiliate reward
|
|
215
213
|
* @example
|
|
216
|
-
* const reward = createAffiliateReward(
|
|
214
|
+
* const reward = createAffiliateReward(EnumAffiliateRewardType.NEW_EVENT_REGISTRATION, new Date());
|
|
217
215
|
* console.log(reward);
|
|
218
216
|
*/
|
|
219
|
-
declare function createAffiliateReward(rewardType:
|
|
217
|
+
declare function createAffiliateReward(rewardType: EnumAffiliateRewardType, createdAt: Date): AffiliateRewardType;
|
|
220
218
|
|
|
221
219
|
/**
|
|
222
220
|
* NZ IRD number validation (Inland Revenue modulus-11 check digit).
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { J as DailyClueGameData, a0 as GamePlacementClue, $ as GamePlacement, O as OptionItem, k as EnumPostType, aw as SocialMediaType, av as ResourceImageType, K as DateTimeType, L as LocationType, V as VendorType, g as UnregisteredVendorType, c as EventListItemType } from '../global-CUYYxpy2.js';
|
|
2
2
|
import dayjs from 'dayjs';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { EnumRegions } from '../enums/index.js';
|
|
6
|
-
import { c as AffiliateRewardWriteType } from '../affiliate-Btlp5XUp.js';
|
|
3
|
+
import { EnumRegions, EnumUserLicence, EnumReward, EnumInviteStatus, EnumEventDateStatus, EnumResourceType } from '../enums/index.js';
|
|
4
|
+
import { h as EnumAffiliateRewardType, f as AffiliateRewardType } from '../affiliate-C51nzKsw.js';
|
|
7
5
|
import 'react-hook-form';
|
|
8
|
-
import '../
|
|
6
|
+
import '../user-D47MLFyH.js';
|
|
9
7
|
|
|
10
8
|
/** Seeded shuffle so all players see the same letter order / placements for a game. */
|
|
11
9
|
declare function seededShuffle<T>(array: readonly T[], seed: string): T[];
|
|
@@ -68,25 +66,25 @@ declare const removeTypename: (obj: any) => any;
|
|
|
68
66
|
declare const truncateText: (text: string, maxLength?: number) => string;
|
|
69
67
|
declare const capitalizeFirstLetter: (str: string) => string;
|
|
70
68
|
declare const statusOptions: {
|
|
71
|
-
label:
|
|
72
|
-
value:
|
|
69
|
+
label: EnumInviteStatus;
|
|
70
|
+
value: EnumInviteStatus;
|
|
73
71
|
}[];
|
|
74
72
|
declare const availableRegionTypes: EnumRegions[];
|
|
75
73
|
declare const availableRegionOptions: OptionItem[];
|
|
76
74
|
declare const paymentMethodOptions: OptionItem[];
|
|
77
75
|
declare function normalizeUrl(url: string): string;
|
|
78
|
-
declare const licenseNiceNames: Record<
|
|
76
|
+
declare const licenseNiceNames: Record<EnumUserLicence, string>;
|
|
79
77
|
declare const cluemartSocialMedia: SocialMediaType[];
|
|
80
78
|
declare const IOS_URL = "https://apps.apple.com/nz/app/cluemart/id6747251008";
|
|
81
79
|
declare const ANDROID_URL = "https://play.google.com/store/apps/details?id=com.timardex.cluemart";
|
|
82
80
|
declare const DEFAULT_RESOURCES_RETURN_LIMIT = 1000;
|
|
83
81
|
declare const DEFAULT_RESOURCES_RETURN_OFFSET = 0;
|
|
84
82
|
declare const CLUEMART_MAIN_DOMAIN_URL = "https://cluemart.co.nz";
|
|
85
|
-
declare const rewardNiceNames: Record<
|
|
83
|
+
declare const rewardNiceNames: Record<EnumReward, {
|
|
86
84
|
name: string;
|
|
87
85
|
points: number;
|
|
88
86
|
}>;
|
|
89
|
-
declare const PostTypeLabels: Record<
|
|
87
|
+
declare const PostTypeLabels: Record<EnumPostType, string>;
|
|
90
88
|
/** Hardcoded registration gateway code; only valid at sign-up (not a generated school referral code). */
|
|
91
89
|
declare const CM_SCHOOL_PROMO_CODE = "CM-SCHOOL";
|
|
92
90
|
/** Hardcoded registration gateway code; only valid at sign-up (not a generated affiliate referral code). */
|
|
@@ -115,23 +113,23 @@ declare function isResourceImageActive(image: ResourceImageLike | null | undefin
|
|
|
115
113
|
declare const SCHOOL_MIN_STUDENT_COUNT = 300;
|
|
116
114
|
declare const SCHOOL_MAX_STUDENT_COUNT = 0;
|
|
117
115
|
|
|
118
|
-
declare const EVENT_DATE_STATUS_PERIOD_MAP: Partial<Record<
|
|
119
|
-
declare function getAllowedEventDateStatuses(period:
|
|
120
|
-
declare function eventMatchesDateStatusPeriod(dateTime: Pick<DateTimeType, "dateStatus">[] | null | undefined, period:
|
|
116
|
+
declare const EVENT_DATE_STATUS_PERIOD_MAP: Partial<Record<EnumEventDateStatus, EnumEventDateStatus[]>>;
|
|
117
|
+
declare function getAllowedEventDateStatuses(period: EnumEventDateStatus): EnumEventDateStatus[];
|
|
118
|
+
declare function eventMatchesDateStatusPeriod(dateTime: Pick<DateTimeType, "dateStatus">[] | null | undefined, period: EnumEventDateStatus): boolean;
|
|
121
119
|
declare function filterEventsByDateStatusPeriod<T extends {
|
|
122
120
|
dateTime?: Pick<DateTimeType, "dateStatus">[] | null;
|
|
123
|
-
}>(events: T[], period:
|
|
121
|
+
}>(events: T[], period: EnumEventDateStatus): T[];
|
|
124
122
|
|
|
125
123
|
type CalendarSheetContentData = {
|
|
126
124
|
dateTime: DateTimeType;
|
|
127
125
|
location: LocationType;
|
|
128
126
|
resourceId: string;
|
|
129
|
-
resourceType:
|
|
127
|
+
resourceType: EnumResourceType;
|
|
130
128
|
};
|
|
131
|
-
declare const KNOWN_EVENT_SCHEDULE_STATUSES: Set<
|
|
129
|
+
declare const KNOWN_EVENT_SCHEDULE_STATUSES: Set<EnumEventDateStatus>;
|
|
132
130
|
type EventScheduleStatusTone = "started" | "startingSoon" | "ended" | "default";
|
|
133
131
|
type EventScheduleStatusPresentation = {
|
|
134
|
-
status:
|
|
132
|
+
status: EnumEventDateStatus;
|
|
135
133
|
statusLabel: string;
|
|
136
134
|
tone: EventScheduleStatusTone;
|
|
137
135
|
};
|
|
@@ -139,11 +137,11 @@ declare function toCalendarIsoDate(startDate: string): string | null;
|
|
|
139
137
|
declare function fromCalendarIsoDate(isoDate: string): string;
|
|
140
138
|
declare function getEventCalendarIsoDates(dateTimes: DateTimeType[] | null | undefined): string[];
|
|
141
139
|
declare function findEventDateTimeByIsoDate(dateTimes: DateTimeType[] | null | undefined, isoDate: string): DateTimeType | null;
|
|
142
|
-
declare function buildCalendarSheetContentData(dateTimes: DateTimeType[], isoDate: string, location: LocationType, resourceId: string, resourceType:
|
|
143
|
-
declare function getEventScheduleStatusTone(status:
|
|
140
|
+
declare function buildCalendarSheetContentData(dateTimes: DateTimeType[], isoDate: string, location: LocationType, resourceId: string, resourceType: EnumResourceType): CalendarSheetContentData | null;
|
|
141
|
+
declare function getEventScheduleStatusTone(status: EnumEventDateStatus): EventScheduleStatusTone;
|
|
144
142
|
declare function getEventScheduleStatusPresentation(dateTime: DateTimeType): EventScheduleStatusPresentation;
|
|
145
143
|
declare function getEventScheduleStatusLabel(dateTime: DateTimeType, onlyShowKnownStatuses: boolean): string | null;
|
|
146
|
-
declare function shouldShowEventActionsWithWeather(resourceType:
|
|
144
|
+
declare function shouldShowEventActionsWithWeather(resourceType: EnumResourceType, dateTime: DateTimeType, location: LocationType | null | undefined): boolean;
|
|
147
145
|
|
|
148
146
|
type StallholderFilterOption = {
|
|
149
147
|
label: string;
|
|
@@ -167,11 +165,11 @@ declare function getStallholderCategoryNames(registeredVendors: VendorType[], un
|
|
|
167
165
|
declare function getStallholderCategoryOptions(registeredVendors: VendorType[], unregisteredVendors?: UnregisteredVendorType[]): StallholderFilterOption[];
|
|
168
166
|
declare function getEventStallholderEmptyMessage(hasAnyStallholdersForEvent: boolean, selectedDate: string | null): string;
|
|
169
167
|
|
|
170
|
-
type RelationType = NonNullable<
|
|
168
|
+
type RelationType = NonNullable<EventListItemType["relations"]>[number];
|
|
171
169
|
declare function relationHasSelectedDate(relation: RelationType, selectedDate: string): boolean;
|
|
172
170
|
declare function eventHasSelectedDate(event: EventListItemType, selectedDate: string): boolean;
|
|
173
171
|
declare function filterVendorEventsBySelectedDate(events: EventListItemType[] | null | undefined, selectedDate: string | null): EventListItemType[];
|
|
174
|
-
declare function collectVendorEventRelationDateTimes(events: EventListItemType[] | null | undefined):
|
|
172
|
+
declare function collectVendorEventRelationDateTimes(events: EventListItemType[] | null | undefined): DateTimeType[];
|
|
175
173
|
declare function getVendorEventRelationStartDates(events: EventListItemType[] | null | undefined): string[];
|
|
176
174
|
declare function getVendorEventRelationDateOptions(events: EventListItemType[] | null | undefined): StallholderFilterOption[];
|
|
177
175
|
declare function getVendorEventsEmptyMessage(): string;
|
|
@@ -213,10 +211,10 @@ declare const AFFILIATE_REWARDS: {
|
|
|
213
211
|
* @param createdAt - The date the reward was received
|
|
214
212
|
* @returns The affiliate reward
|
|
215
213
|
* @example
|
|
216
|
-
* const reward = createAffiliateReward(
|
|
214
|
+
* const reward = createAffiliateReward(EnumAffiliateRewardType.NEW_EVENT_REGISTRATION, new Date());
|
|
217
215
|
* console.log(reward);
|
|
218
216
|
*/
|
|
219
|
-
declare function createAffiliateReward(rewardType:
|
|
217
|
+
declare function createAffiliateReward(rewardType: EnumAffiliateRewardType, createdAt: Date): AffiliateRewardType;
|
|
220
218
|
|
|
221
219
|
/**
|
|
222
220
|
* NZ IRD number validation (Inland Revenue modulus-11 check digit).
|
package/dist/utils/index.mjs
CHANGED
|
@@ -75,7 +75,7 @@ import {
|
|
|
75
75
|
toCalendarIsoDate,
|
|
76
76
|
toUserFacingErrorMessage,
|
|
77
77
|
truncateText
|
|
78
|
-
} from "../chunk-
|
|
78
|
+
} from "../chunk-LBEJECG3.mjs";
|
|
79
79
|
import {
|
|
80
80
|
dateFormat,
|
|
81
81
|
formatDate,
|
|
@@ -89,14 +89,13 @@ import {
|
|
|
89
89
|
sortDatesChronologically,
|
|
90
90
|
timeFormat,
|
|
91
91
|
toNZTime
|
|
92
|
-
} from "../chunk-
|
|
93
|
-
import "../chunk-
|
|
92
|
+
} from "../chunk-SD42WIMV.mjs";
|
|
93
|
+
import "../chunk-ILILH7E2.mjs";
|
|
94
94
|
import {
|
|
95
95
|
isTransientNetworkError
|
|
96
96
|
} from "../chunk-RAYUJODN.mjs";
|
|
97
|
-
import "../chunk-
|
|
98
|
-
import "../chunk-
|
|
99
|
-
import "../chunk-INQCDU24.mjs";
|
|
97
|
+
import "../chunk-DQ7ZHIXW.mjs";
|
|
98
|
+
import "../chunk-X3OLM35T.mjs";
|
|
100
99
|
export {
|
|
101
100
|
AFFILIATE_PARTICIPANT_TYPE_LABELS,
|
|
102
101
|
AFFILIATE_REWARDS,
|
package/package.json
CHANGED
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@timardex/cluemart-shared",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"scripts": {
|
|
9
|
-
"build": "
|
|
9
|
+
"build": "rimraf dist && tsup && node scripts/copy-images.mjs && npm pack",
|
|
10
10
|
"lint": "eslint --ext .ts,.tsx,.mjs,.cjs src scripts",
|
|
11
11
|
"lint:fix": "eslint --ext .ts,.tsx,.mjs,.cjs --fix src scripts",
|
|
12
|
-
"typecheck": "
|
|
13
|
-
"codegen": "node scripts/pre-codegen.mjs && graphql-codegen --config codegen.ts",
|
|
14
|
-
"codegen:check": "graphql-codegen --config codegen.ts",
|
|
15
|
-
"schema:check": "node scripts/check-schema-sync.mjs",
|
|
12
|
+
"typecheck": "tsc --noEmit",
|
|
16
13
|
"test": "vitest run",
|
|
17
14
|
"test:coverage": "vitest run --coverage",
|
|
18
15
|
"test:watch": "vitest",
|
|
@@ -119,10 +116,6 @@
|
|
|
119
116
|
},
|
|
120
117
|
"devDependencies": {
|
|
121
118
|
"@apollo/client": "^3.14.1",
|
|
122
|
-
"@graphql-codegen/cli": "^7.2.0",
|
|
123
|
-
"@graphql-codegen/typescript": "^6.1.0",
|
|
124
|
-
"@graphql-codegen/typescript-operations": "^6.1.5",
|
|
125
|
-
"@graphql-codegen/typescript-react-apollo": "^4.4.2",
|
|
126
119
|
"@types/node": "^22.13.4",
|
|
127
120
|
"@types/react": "~19.2.10",
|
|
128
121
|
"@typescript-eslint/eslint-plugin": "^8.20.0",
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { L as LocationType, A as AffiliateParticipantTypeEnum, b as AffiliateRewardEnumType } from './graphql-CcvzTs9k.mjs';
|
|
2
|
-
import { S as SocialMediaType, T as TermsAgreement, a as CreateFormData } from './global-C6v9tRji.mjs';
|
|
3
|
-
|
|
4
|
-
/** Form-only contact shape (same fields as GraphQL AffiliateContactDetailsType). */
|
|
5
|
-
type AffiliateContactDetails = {
|
|
6
|
-
mobilePhone: string;
|
|
7
|
-
};
|
|
8
|
-
/** Form-only bank account shape (same fields as GraphQL AffiliateBankAccountDetailsType). */
|
|
9
|
-
type AffiliateBankAccountDetailsForm = {
|
|
10
|
-
accountHolderName: string;
|
|
11
|
-
accountNumber: string;
|
|
12
|
-
};
|
|
13
|
-
type AffiliateFormData = {
|
|
14
|
-
bankAccountDetails: AffiliateBankAccountDetailsForm;
|
|
15
|
-
contactDetails: AffiliateContactDetails;
|
|
16
|
-
irdNumber: string;
|
|
17
|
-
location: LocationType;
|
|
18
|
-
participantType: AffiliateParticipantTypeEnum;
|
|
19
|
-
socialMedia: SocialMediaType[] | null;
|
|
20
|
-
termsAgreement?: TermsAgreement | null;
|
|
21
|
-
};
|
|
22
|
-
type CreateAffiliateFormData = CreateFormData<AffiliateFormData>;
|
|
23
|
-
/**
|
|
24
|
-
* Write-side reward document for mongoose `$push` / `createAffiliateReward`.
|
|
25
|
-
* GraphQL `AffiliateRewardType` serializes dates as ISO strings; this shape
|
|
26
|
-
* keeps JS Date for persistence. Dual-shape — do not collapse.
|
|
27
|
-
*/
|
|
28
|
-
type AffiliateRewardWriteType = {
|
|
29
|
-
createdAt: Date;
|
|
30
|
-
redeemedAt: Date | null;
|
|
31
|
-
rewardDescription: string;
|
|
32
|
-
rewardType: AffiliateRewardEnumType;
|
|
33
|
-
rewardValue: number;
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export type { AffiliateFormData as A, CreateAffiliateFormData as C, AffiliateBankAccountDetailsForm as a, AffiliateContactDetails as b, AffiliateRewardWriteType as c };
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { L as LocationType, A as AffiliateParticipantTypeEnum, b as AffiliateRewardEnumType } from './graphql-CDOfA79A.js';
|
|
2
|
-
import { S as SocialMediaType, T as TermsAgreement, a as CreateFormData } from './global-BbSFfYdd.js';
|
|
3
|
-
|
|
4
|
-
/** Form-only contact shape (same fields as GraphQL AffiliateContactDetailsType). */
|
|
5
|
-
type AffiliateContactDetails = {
|
|
6
|
-
mobilePhone: string;
|
|
7
|
-
};
|
|
8
|
-
/** Form-only bank account shape (same fields as GraphQL AffiliateBankAccountDetailsType). */
|
|
9
|
-
type AffiliateBankAccountDetailsForm = {
|
|
10
|
-
accountHolderName: string;
|
|
11
|
-
accountNumber: string;
|
|
12
|
-
};
|
|
13
|
-
type AffiliateFormData = {
|
|
14
|
-
bankAccountDetails: AffiliateBankAccountDetailsForm;
|
|
15
|
-
contactDetails: AffiliateContactDetails;
|
|
16
|
-
irdNumber: string;
|
|
17
|
-
location: LocationType;
|
|
18
|
-
participantType: AffiliateParticipantTypeEnum;
|
|
19
|
-
socialMedia: SocialMediaType[] | null;
|
|
20
|
-
termsAgreement?: TermsAgreement | null;
|
|
21
|
-
};
|
|
22
|
-
type CreateAffiliateFormData = CreateFormData<AffiliateFormData>;
|
|
23
|
-
/**
|
|
24
|
-
* Write-side reward document for mongoose `$push` / `createAffiliateReward`.
|
|
25
|
-
* GraphQL `AffiliateRewardType` serializes dates as ISO strings; this shape
|
|
26
|
-
* keeps JS Date for persistence. Dual-shape — do not collapse.
|
|
27
|
-
*/
|
|
28
|
-
type AffiliateRewardWriteType = {
|
|
29
|
-
createdAt: Date;
|
|
30
|
-
redeemedAt: Date | null;
|
|
31
|
-
rewardDescription: string;
|
|
32
|
-
rewardType: AffiliateRewardEnumType;
|
|
33
|
-
rewardValue: number;
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export type { AffiliateFormData as A, CreateAffiliateFormData as C, AffiliateBankAccountDetailsForm as a, AffiliateContactDetails as b, AffiliateRewardWriteType as c };
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { a as CreateFormData, B as BaseResourceTypeFormData, c as ResourceContactDetailsType, S as SocialMediaType, T as TermsAgreement, P as PromoCodeType } from './global-C6v9tRji.mjs';
|
|
2
|
-
import { t as AdResourceType, u as AdShowOnEnum, v as AdStatusTypeEnum, L as LocationType, w as PartnerEnumType, B as BaseGameType, R as ResourceImageType, x as PostContentEnum, g as PostTypeEnum, y as PostResourceType, z as AffiliateType } from './graphql-CcvzTs9k.mjs';
|
|
3
|
-
import { A as AffiliateFormData } from './affiliate-Bqqlffw8.mjs';
|
|
4
|
-
|
|
5
|
-
type ContactUsFormData = {
|
|
6
|
-
email: string;
|
|
7
|
-
firstName: string;
|
|
8
|
-
lastName: string;
|
|
9
|
-
message: string;
|
|
10
|
-
};
|
|
11
|
-
type CreateContactUsFormData = CreateFormData<ContactUsFormData>;
|
|
12
|
-
|
|
13
|
-
interface AdFormData {
|
|
14
|
-
active: boolean;
|
|
15
|
-
end: Date;
|
|
16
|
-
resource: AdResourceType;
|
|
17
|
-
showOn: AdShowOnEnum[];
|
|
18
|
-
start?: Date;
|
|
19
|
-
status: AdStatusTypeEnum;
|
|
20
|
-
targetRegion: string[];
|
|
21
|
-
}
|
|
22
|
-
type AdFormState = AdFormData;
|
|
23
|
-
type CreateAdFormData = CreateFormData<AdFormData>;
|
|
24
|
-
type CreateAdFormState = CreateFormData<AdFormState>;
|
|
25
|
-
|
|
26
|
-
interface PartnerFormData extends BaseResourceTypeFormData {
|
|
27
|
-
location: LocationType;
|
|
28
|
-
nzbn: string;
|
|
29
|
-
partnerType: PartnerEnumType;
|
|
30
|
-
}
|
|
31
|
-
type CreatePartnerFormData = CreateFormData<PartnerFormData>;
|
|
32
|
-
|
|
33
|
-
type PostFileInput = {
|
|
34
|
-
source: File;
|
|
35
|
-
title?: string;
|
|
36
|
-
};
|
|
37
|
-
type PostContentTextarea = {
|
|
38
|
-
textarea: {
|
|
39
|
-
title?: string;
|
|
40
|
-
data: string;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
type PostContentImage = {
|
|
44
|
-
images: ResourceImageType[] | null;
|
|
45
|
-
imagesUpload?: PostFileInput[] | null;
|
|
46
|
-
};
|
|
47
|
-
type PostContentVideo = {
|
|
48
|
-
video: {
|
|
49
|
-
source: string;
|
|
50
|
-
title?: string;
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
type PostContentList = {
|
|
54
|
-
list: {
|
|
55
|
-
title?: string;
|
|
56
|
-
items: {
|
|
57
|
-
text: string;
|
|
58
|
-
}[];
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
type PostContentGame = {
|
|
62
|
-
game: BaseGameType;
|
|
63
|
-
};
|
|
64
|
-
/**
|
|
65
|
-
* Union of all possible content-data shapes used in post forms.
|
|
66
|
-
* Renamed from PostContentData to avoid collision with the generated
|
|
67
|
-
* GraphQL PostContentData (flat optional-object type from codegen).
|
|
68
|
-
*/
|
|
69
|
-
type PostContentInputData = PostContentGame | PostContentTextarea | PostContentImage | PostContentVideo | PostContentList;
|
|
70
|
-
type PostContentFormData = {
|
|
71
|
-
contentData?: PostContentInputData | null;
|
|
72
|
-
contentOrder?: number | null;
|
|
73
|
-
contentType?: PostContentEnum | null;
|
|
74
|
-
};
|
|
75
|
-
interface PostFormData {
|
|
76
|
-
active: boolean;
|
|
77
|
-
caption: string;
|
|
78
|
-
content: PostContentFormData[];
|
|
79
|
-
cover?: ResourceImageType | null;
|
|
80
|
-
coverUpload?: PostFileInput | null;
|
|
81
|
-
postType: PostTypeEnum;
|
|
82
|
-
resource?: PostResourceType | null;
|
|
83
|
-
tags?: string[] | null;
|
|
84
|
-
title: string;
|
|
85
|
-
notifyUsers?: boolean | null;
|
|
86
|
-
}
|
|
87
|
-
type CreatePostFormData = CreateFormData<PostFormData>;
|
|
88
|
-
|
|
89
|
-
interface SchoolFormData {
|
|
90
|
-
_id?: string;
|
|
91
|
-
active: boolean;
|
|
92
|
-
contactDetails: ResourceContactDetailsType | null;
|
|
93
|
-
location: LocationType;
|
|
94
|
-
logo?: ResourceImageType | null;
|
|
95
|
-
logoUpload?: ResourceImageType | null;
|
|
96
|
-
name: string;
|
|
97
|
-
region: string;
|
|
98
|
-
studentCount: number;
|
|
99
|
-
socialMedia: SocialMediaType[] | null;
|
|
100
|
-
termsAgreement?: TermsAgreement | null;
|
|
101
|
-
}
|
|
102
|
-
type CreateSchoolFormData = CreateFormData<SchoolFormData>;
|
|
103
|
-
|
|
104
|
-
declare function toAffiliateCode(code: string): PromoCodeType;
|
|
105
|
-
/**
|
|
106
|
-
* Convert a stored Affiliate entity into AffiliateFormData for create/edit forms.
|
|
107
|
-
*
|
|
108
|
-
* GraphQL AffiliateDetailsType requires bank/contact/IRD/location/participant
|
|
109
|
-
* once stored; form drafts allow empty strings. Social media is draft-optional
|
|
110
|
-
* (same dual-shape as Event/Partner). GraphQL termsAgreement is NonNull once
|
|
111
|
-
* stored; form keeps it optional until agreed.
|
|
112
|
-
*
|
|
113
|
-
* Bank account fields are copied as-is (same exposure as the GraphQL query —
|
|
114
|
-
* no extra fields, no masking added or removed).
|
|
115
|
-
*/
|
|
116
|
-
declare function affiliateToFormData(affiliate: Pick<AffiliateType, "affiliateDetails">): AffiliateFormData;
|
|
117
|
-
|
|
118
|
-
export { type AdFormData as A, type ContactUsFormData as C, type PartnerFormData as P, type SchoolFormData as S, type AdFormState as a, type CreateAdFormData as b, type CreateAdFormState as c, type CreateContactUsFormData as d, type CreatePartnerFormData as e, type CreatePostFormData as f, type CreateSchoolFormData as g, type PostContentFormData as h, type PostContentGame as i, type PostContentImage as j, type PostContentInputData as k, type PostContentList as l, type PostContentTextarea as m, type PostContentVideo as n, type PostFileInput as o, type PostFormData as p, affiliateToFormData as q, toAffiliateCode as t };
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { a as CreateFormData, B as BaseResourceTypeFormData, c as ResourceContactDetailsType, S as SocialMediaType, T as TermsAgreement, P as PromoCodeType } from './global-BbSFfYdd.js';
|
|
2
|
-
import { t as AdResourceType, u as AdShowOnEnum, v as AdStatusTypeEnum, L as LocationType, w as PartnerEnumType, B as BaseGameType, R as ResourceImageType, x as PostContentEnum, g as PostTypeEnum, y as PostResourceType, z as AffiliateType } from './graphql-CDOfA79A.js';
|
|
3
|
-
import { A as AffiliateFormData } from './affiliate-Btlp5XUp.js';
|
|
4
|
-
|
|
5
|
-
type ContactUsFormData = {
|
|
6
|
-
email: string;
|
|
7
|
-
firstName: string;
|
|
8
|
-
lastName: string;
|
|
9
|
-
message: string;
|
|
10
|
-
};
|
|
11
|
-
type CreateContactUsFormData = CreateFormData<ContactUsFormData>;
|
|
12
|
-
|
|
13
|
-
interface AdFormData {
|
|
14
|
-
active: boolean;
|
|
15
|
-
end: Date;
|
|
16
|
-
resource: AdResourceType;
|
|
17
|
-
showOn: AdShowOnEnum[];
|
|
18
|
-
start?: Date;
|
|
19
|
-
status: AdStatusTypeEnum;
|
|
20
|
-
targetRegion: string[];
|
|
21
|
-
}
|
|
22
|
-
type AdFormState = AdFormData;
|
|
23
|
-
type CreateAdFormData = CreateFormData<AdFormData>;
|
|
24
|
-
type CreateAdFormState = CreateFormData<AdFormState>;
|
|
25
|
-
|
|
26
|
-
interface PartnerFormData extends BaseResourceTypeFormData {
|
|
27
|
-
location: LocationType;
|
|
28
|
-
nzbn: string;
|
|
29
|
-
partnerType: PartnerEnumType;
|
|
30
|
-
}
|
|
31
|
-
type CreatePartnerFormData = CreateFormData<PartnerFormData>;
|
|
32
|
-
|
|
33
|
-
type PostFileInput = {
|
|
34
|
-
source: File;
|
|
35
|
-
title?: string;
|
|
36
|
-
};
|
|
37
|
-
type PostContentTextarea = {
|
|
38
|
-
textarea: {
|
|
39
|
-
title?: string;
|
|
40
|
-
data: string;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
type PostContentImage = {
|
|
44
|
-
images: ResourceImageType[] | null;
|
|
45
|
-
imagesUpload?: PostFileInput[] | null;
|
|
46
|
-
};
|
|
47
|
-
type PostContentVideo = {
|
|
48
|
-
video: {
|
|
49
|
-
source: string;
|
|
50
|
-
title?: string;
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
type PostContentList = {
|
|
54
|
-
list: {
|
|
55
|
-
title?: string;
|
|
56
|
-
items: {
|
|
57
|
-
text: string;
|
|
58
|
-
}[];
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
type PostContentGame = {
|
|
62
|
-
game: BaseGameType;
|
|
63
|
-
};
|
|
64
|
-
/**
|
|
65
|
-
* Union of all possible content-data shapes used in post forms.
|
|
66
|
-
* Renamed from PostContentData to avoid collision with the generated
|
|
67
|
-
* GraphQL PostContentData (flat optional-object type from codegen).
|
|
68
|
-
*/
|
|
69
|
-
type PostContentInputData = PostContentGame | PostContentTextarea | PostContentImage | PostContentVideo | PostContentList;
|
|
70
|
-
type PostContentFormData = {
|
|
71
|
-
contentData?: PostContentInputData | null;
|
|
72
|
-
contentOrder?: number | null;
|
|
73
|
-
contentType?: PostContentEnum | null;
|
|
74
|
-
};
|
|
75
|
-
interface PostFormData {
|
|
76
|
-
active: boolean;
|
|
77
|
-
caption: string;
|
|
78
|
-
content: PostContentFormData[];
|
|
79
|
-
cover?: ResourceImageType | null;
|
|
80
|
-
coverUpload?: PostFileInput | null;
|
|
81
|
-
postType: PostTypeEnum;
|
|
82
|
-
resource?: PostResourceType | null;
|
|
83
|
-
tags?: string[] | null;
|
|
84
|
-
title: string;
|
|
85
|
-
notifyUsers?: boolean | null;
|
|
86
|
-
}
|
|
87
|
-
type CreatePostFormData = CreateFormData<PostFormData>;
|
|
88
|
-
|
|
89
|
-
interface SchoolFormData {
|
|
90
|
-
_id?: string;
|
|
91
|
-
active: boolean;
|
|
92
|
-
contactDetails: ResourceContactDetailsType | null;
|
|
93
|
-
location: LocationType;
|
|
94
|
-
logo?: ResourceImageType | null;
|
|
95
|
-
logoUpload?: ResourceImageType | null;
|
|
96
|
-
name: string;
|
|
97
|
-
region: string;
|
|
98
|
-
studentCount: number;
|
|
99
|
-
socialMedia: SocialMediaType[] | null;
|
|
100
|
-
termsAgreement?: TermsAgreement | null;
|
|
101
|
-
}
|
|
102
|
-
type CreateSchoolFormData = CreateFormData<SchoolFormData>;
|
|
103
|
-
|
|
104
|
-
declare function toAffiliateCode(code: string): PromoCodeType;
|
|
105
|
-
/**
|
|
106
|
-
* Convert a stored Affiliate entity into AffiliateFormData for create/edit forms.
|
|
107
|
-
*
|
|
108
|
-
* GraphQL AffiliateDetailsType requires bank/contact/IRD/location/participant
|
|
109
|
-
* once stored; form drafts allow empty strings. Social media is draft-optional
|
|
110
|
-
* (same dual-shape as Event/Partner). GraphQL termsAgreement is NonNull once
|
|
111
|
-
* stored; form keeps it optional until agreed.
|
|
112
|
-
*
|
|
113
|
-
* Bank account fields are copied as-is (same exposure as the GraphQL query —
|
|
114
|
-
* no extra fields, no masking added or removed).
|
|
115
|
-
*/
|
|
116
|
-
declare function affiliateToFormData(affiliate: Pick<AffiliateType, "affiliateDetails">): AffiliateFormData;
|
|
117
|
-
|
|
118
|
-
export { type AdFormData as A, type ContactUsFormData as C, type PartnerFormData as P, type SchoolFormData as S, type AdFormState as a, type CreateAdFormData as b, type CreateAdFormState as c, type CreateContactUsFormData as d, type CreatePartnerFormData as e, type CreatePostFormData as f, type CreateSchoolFormData as g, type PostContentFormData as h, type PostContentGame as i, type PostContentImage as j, type PostContentInputData as k, type PostContentList as l, type PostContentTextarea as m, type PostContentVideo as n, type PostFileInput as o, type PostFormData as p, affiliateToFormData as q, toAffiliateCode as t };
|