@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
|
@@ -0,0 +1,699 @@
|
|
|
1
|
+
import { FieldValues, Control, FormState, UseFormHandleSubmit, UseFormReset, UseFormSetValue, UseFormWatch, UseFormGetValues } from 'react-hook-form';
|
|
2
|
+
import { EnumInviteStatus, EnumResourceType, EnumRelationResource, EnumEventType, EnumPaymentMethod, EnumVendorType, EnumFoodFlavor, EnumUserLicence, EnumEventDateStatus, EnumSocialMedia } from './enums/index.mjs';
|
|
3
|
+
|
|
4
|
+
type RelationDate = {
|
|
5
|
+
dateTime: DateTimeType & {
|
|
6
|
+
stallType: StallType | null;
|
|
7
|
+
};
|
|
8
|
+
lastUpdateBy: {
|
|
9
|
+
resourceId: string;
|
|
10
|
+
userEmail: string;
|
|
11
|
+
};
|
|
12
|
+
paymentReference?: string;
|
|
13
|
+
status: EnumInviteStatus;
|
|
14
|
+
};
|
|
15
|
+
interface RelationType {
|
|
16
|
+
_id?: string;
|
|
17
|
+
active: boolean;
|
|
18
|
+
chatId: string;
|
|
19
|
+
createdAt?: Date;
|
|
20
|
+
deletedAt?: Date | null;
|
|
21
|
+
eventId: string;
|
|
22
|
+
lastUpdateBy: EnumResourceType;
|
|
23
|
+
relationDates: RelationDate[];
|
|
24
|
+
relationType: EnumRelationResource;
|
|
25
|
+
updatedAt?: Date;
|
|
26
|
+
vendorId: string;
|
|
27
|
+
}
|
|
28
|
+
/** GraphQL RelationInputType — chatId is optional; server assigns it on create. */
|
|
29
|
+
type RelationInputType = Omit<RelationType, "_id" | "chatId" | "createdAt" | "updatedAt" | "deletedAt"> & {
|
|
30
|
+
chatId?: string;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
type StallType = {
|
|
34
|
+
label: string;
|
|
35
|
+
price: number;
|
|
36
|
+
stallCapacity: number;
|
|
37
|
+
};
|
|
38
|
+
interface DateTimeWithPriceType extends DateTimeType {
|
|
39
|
+
stallTypes: StallType[];
|
|
40
|
+
}
|
|
41
|
+
type PaymentInfoType = {
|
|
42
|
+
accountHolderName?: string;
|
|
43
|
+
accountNumber?: string;
|
|
44
|
+
link?: string;
|
|
45
|
+
paymentMethod: EnumPaymentMethod;
|
|
46
|
+
};
|
|
47
|
+
type Requirement = {
|
|
48
|
+
category: "Food Safety" | "Environment" | "Operations" | "Legal & Safety";
|
|
49
|
+
label: string;
|
|
50
|
+
value: boolean;
|
|
51
|
+
};
|
|
52
|
+
type RefundPolicy = {
|
|
53
|
+
category: "Cancelled by Organiser" | "Cancelled by Vendor";
|
|
54
|
+
label: string;
|
|
55
|
+
value: boolean;
|
|
56
|
+
};
|
|
57
|
+
interface EventInfoFormData {
|
|
58
|
+
_id?: string;
|
|
59
|
+
applicationDeadlineHours: number;
|
|
60
|
+
dateTime: DateTimeWithPriceType[];
|
|
61
|
+
eventId: string;
|
|
62
|
+
packInTime: number;
|
|
63
|
+
paymentDueHours: number;
|
|
64
|
+
paymentInfo: PaymentInfoType[];
|
|
65
|
+
refundPolicy: RefundPolicy[];
|
|
66
|
+
requirements?: Requirement[];
|
|
67
|
+
}
|
|
68
|
+
interface EventFormData extends BaseResourceTypeFormData {
|
|
69
|
+
claimed?: boolean;
|
|
70
|
+
dateTime: DateTimeType[];
|
|
71
|
+
eventType: EnumEventType;
|
|
72
|
+
googlePlaceId?: string | null;
|
|
73
|
+
location: LocationType;
|
|
74
|
+
nzbn: string;
|
|
75
|
+
provider?: string | null;
|
|
76
|
+
rainOrShine: boolean;
|
|
77
|
+
tags: string[];
|
|
78
|
+
}
|
|
79
|
+
type CreateEventInfoFormData = CreateFormData<EventInfoFormData>;
|
|
80
|
+
type CreateEventFormData = CreateFormData<EventFormData>;
|
|
81
|
+
interface EventType extends BaseResourceType {
|
|
82
|
+
claimed: boolean;
|
|
83
|
+
dateTime: DateTimeType[];
|
|
84
|
+
eventInfoId: string;
|
|
85
|
+
eventType: EnumEventType;
|
|
86
|
+
googlePlaceId?: string | null;
|
|
87
|
+
location: LocationType;
|
|
88
|
+
nzbn: string;
|
|
89
|
+
provider: string | null;
|
|
90
|
+
rainOrShine: boolean;
|
|
91
|
+
tags: string[];
|
|
92
|
+
relations: {
|
|
93
|
+
relationId: string | null;
|
|
94
|
+
relationDates: RelationDate[] | null;
|
|
95
|
+
}[] | null;
|
|
96
|
+
sharePublic?: SocialShareResourceType | null;
|
|
97
|
+
shareRelation?: SocialShareResourceType | null;
|
|
98
|
+
}
|
|
99
|
+
type EventListItemType = Omit<EventType, "adIds" | "contactDetails" | "eventInfoId" | "nzbn" | "owner" | "posterUsage" | "promoCodes" | "provider" | "relatedPost" | "socialMedia" | "socialShare" | "tags" | "termsAgreement">;
|
|
100
|
+
type EventInfoType = Omit<EventInfoFormData, "_id"> & {
|
|
101
|
+
_id: string;
|
|
102
|
+
active?: boolean;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
declare enum EnumGameType {
|
|
106
|
+
DAILY_CLUE = "dailyClue",
|
|
107
|
+
MINI_QUIZ = "miniQuiz",
|
|
108
|
+
ODD_ONE_OUT = "oddOneOut"
|
|
109
|
+
}
|
|
110
|
+
type GameDate = {
|
|
111
|
+
startDate: Date;
|
|
112
|
+
endDate: Date;
|
|
113
|
+
};
|
|
114
|
+
declare const gameTypeToDisplayName: Record<EnumGameType, string>;
|
|
115
|
+
type GlobalGameData = {
|
|
116
|
+
points: number;
|
|
117
|
+
streak: number;
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
declare const gameScreenIdentifierList: readonly [{
|
|
121
|
+
readonly clue: "Where your actions turn into a timeline.";
|
|
122
|
+
readonly id: "activities";
|
|
123
|
+
readonly match: "/profile/activities";
|
|
124
|
+
}, {
|
|
125
|
+
readonly clue: "Where conversations happen without speaking.";
|
|
126
|
+
readonly id: "chat";
|
|
127
|
+
readonly match: "/profile/chat";
|
|
128
|
+
}, {
|
|
129
|
+
readonly clue: "The place to redefine who you are.";
|
|
130
|
+
readonly id: "edit-profile";
|
|
131
|
+
readonly match: "/profile/edit-profile";
|
|
132
|
+
}, {
|
|
133
|
+
readonly clue: "A single moment worth showing up for.";
|
|
134
|
+
readonly id: "single-event";
|
|
135
|
+
readonly match: RegExp;
|
|
136
|
+
}, {
|
|
137
|
+
readonly clue: "What’s happening around you, right now.";
|
|
138
|
+
readonly id: "events-near-me";
|
|
139
|
+
readonly match: "/events/events-near-me";
|
|
140
|
+
}, {
|
|
141
|
+
readonly clue: "Where events appear as pins on a map.";
|
|
142
|
+
readonly id: "events-map";
|
|
143
|
+
readonly match: "/events/events-map";
|
|
144
|
+
}, {
|
|
145
|
+
readonly clue: "A collection of events worth attending.";
|
|
146
|
+
readonly id: "events";
|
|
147
|
+
readonly match: "/events";
|
|
148
|
+
}, {
|
|
149
|
+
readonly clue: "What’s happening in a wider area — not just nearby.";
|
|
150
|
+
readonly id: "events-region";
|
|
151
|
+
readonly match: RegExp;
|
|
152
|
+
}, {
|
|
153
|
+
readonly clue: "Where fun becomes a challenge.";
|
|
154
|
+
readonly id: "games";
|
|
155
|
+
readonly match: "/games";
|
|
156
|
+
}, {
|
|
157
|
+
readonly clue: "Your starting point for everything.";
|
|
158
|
+
readonly id: "home";
|
|
159
|
+
readonly match: "/";
|
|
160
|
+
}, {
|
|
161
|
+
readonly clue: "Where the app whispers what you shouldn’t miss.";
|
|
162
|
+
readonly id: "notifications";
|
|
163
|
+
readonly match: "/notifications";
|
|
164
|
+
}, {
|
|
165
|
+
readonly clue: "Where you fine-tune your experience.";
|
|
166
|
+
readonly id: "options";
|
|
167
|
+
readonly match: "/options";
|
|
168
|
+
}, {
|
|
169
|
+
readonly clue: "An organisation or creator supporting the community.";
|
|
170
|
+
readonly id: "single-partner";
|
|
171
|
+
readonly match: RegExp;
|
|
172
|
+
}, {
|
|
173
|
+
readonly clue: "Organisations and creators supporting the community.";
|
|
174
|
+
readonly id: "partners";
|
|
175
|
+
readonly match: "/partners";
|
|
176
|
+
}, {
|
|
177
|
+
readonly clue: "A single published post in full view.";
|
|
178
|
+
readonly id: "single-visitor-post";
|
|
179
|
+
readonly match: RegExp;
|
|
180
|
+
}, {
|
|
181
|
+
readonly clue: "Your identity, on display.";
|
|
182
|
+
readonly id: "profile";
|
|
183
|
+
readonly match: "/profile";
|
|
184
|
+
}, {
|
|
185
|
+
readonly clue: "One stallholder offering something valuable.";
|
|
186
|
+
readonly id: "single-vendor";
|
|
187
|
+
readonly match: RegExp;
|
|
188
|
+
}, {
|
|
189
|
+
readonly clue: "Where every stallholder waits under the right category.";
|
|
190
|
+
readonly id: "vendors";
|
|
191
|
+
readonly match: "/vendors";
|
|
192
|
+
}, {
|
|
193
|
+
readonly clue: "Where you browse articles and posts from around the platform.";
|
|
194
|
+
readonly id: "visitors";
|
|
195
|
+
readonly match: "/visitors";
|
|
196
|
+
}];
|
|
197
|
+
type GamePlacement = (typeof gameScreenIdentifierList)[number]["id"];
|
|
198
|
+
type GamePlacementClue = (typeof gameScreenIdentifierList)[number]["clue"];
|
|
199
|
+
type DailyClueBaseGame = {
|
|
200
|
+
gameDate: GameDate;
|
|
201
|
+
gameSolution: string;
|
|
202
|
+
};
|
|
203
|
+
type DailyClueGameData = GlobalGameData & {
|
|
204
|
+
gameFields: DailyClueBaseGame;
|
|
205
|
+
lastFoundDate: Date | null;
|
|
206
|
+
letterInfo: {
|
|
207
|
+
collected: string[] | null;
|
|
208
|
+
solutionShuffled: string[];
|
|
209
|
+
todaysClue: GamePlacementClue | null;
|
|
210
|
+
todaysLetter: string | null;
|
|
211
|
+
todaysPlacement: GamePlacement | null;
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
type PuzzleAnswer = {
|
|
216
|
+
answerId: string;
|
|
217
|
+
answer: string;
|
|
218
|
+
correct: boolean;
|
|
219
|
+
};
|
|
220
|
+
type PuzzleQuestion = {
|
|
221
|
+
answers: PuzzleAnswer[];
|
|
222
|
+
question: string;
|
|
223
|
+
questionId: string;
|
|
224
|
+
};
|
|
225
|
+
/**
|
|
226
|
+
* Stores only the answerId and the questionId of the selected answer.
|
|
227
|
+
*/
|
|
228
|
+
type PuzzleAnsweredQuestion = {
|
|
229
|
+
selectedAnswerId: string;
|
|
230
|
+
questionId: string;
|
|
231
|
+
};
|
|
232
|
+
type PuzzleBaseGame = {
|
|
233
|
+
questions: PuzzleQuestion[];
|
|
234
|
+
};
|
|
235
|
+
type PuzzleGameData = GlobalGameData & {
|
|
236
|
+
gameFields: PuzzleBaseGame;
|
|
237
|
+
/**
|
|
238
|
+
* Stores user answers only.
|
|
239
|
+
* Never store correctness from client.
|
|
240
|
+
*/
|
|
241
|
+
answeredQuestions: PuzzleAnsweredQuestion[];
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
type BaseGameMap = {
|
|
245
|
+
[EnumGameType.DAILY_CLUE]: DailyClueBaseGame;
|
|
246
|
+
[EnumGameType.MINI_QUIZ]: PuzzleBaseGame;
|
|
247
|
+
[EnumGameType.ODD_ONE_OUT]: PuzzleBaseGame;
|
|
248
|
+
};
|
|
249
|
+
type BaseGameType = {
|
|
250
|
+
gameType: EnumGameType;
|
|
251
|
+
gameTypeId: string;
|
|
252
|
+
gameTitle: string;
|
|
253
|
+
} & {
|
|
254
|
+
[K in keyof BaseGameMap]?: BaseGameMap[K] | null;
|
|
255
|
+
};
|
|
256
|
+
declare enum EnumGameStatus {
|
|
257
|
+
GAME_COMPLETED = "GAME_COMPLETED",
|
|
258
|
+
GAME_IN_PROGRESS = "GAME_IN_PROGRESS",
|
|
259
|
+
GAME_LEFT = "GAME_LEFT",
|
|
260
|
+
GAME_STARTED = "GAME_STARTED"
|
|
261
|
+
}
|
|
262
|
+
type GameHistory = Pick<BaseGameType, "gameTitle" | "gameType" | "gameTypeId"> & {
|
|
263
|
+
createdAt: Date;
|
|
264
|
+
gameDate: GameDate;
|
|
265
|
+
gameStatus: EnumGameStatus;
|
|
266
|
+
/** Per-event delta. Not persisted for overallGamePoints (computed at read time). */
|
|
267
|
+
pointsEarned: number;
|
|
268
|
+
/** Running total for this game instance; computed at read time, not stored in Mongo. */
|
|
269
|
+
overallGamePoints?: number;
|
|
270
|
+
};
|
|
271
|
+
type GameDataMap = {
|
|
272
|
+
[EnumGameType.DAILY_CLUE]: DailyClueGameData;
|
|
273
|
+
[EnumGameType.MINI_QUIZ]: PuzzleGameData;
|
|
274
|
+
[EnumGameType.ODD_ONE_OUT]: PuzzleGameData;
|
|
275
|
+
};
|
|
276
|
+
type GameDataType = {
|
|
277
|
+
[K in keyof GameDataMap]?: GameDataMap[K] | null;
|
|
278
|
+
};
|
|
279
|
+
type GameType = Pick<BaseGameType, "gameTitle" | "gameType" | "gameTypeId"> & {
|
|
280
|
+
_id: string;
|
|
281
|
+
active: boolean;
|
|
282
|
+
createdAt: Date;
|
|
283
|
+
gameData: GameDataType;
|
|
284
|
+
gameHistory: GameHistory[] | null;
|
|
285
|
+
updatedAt: Date | null;
|
|
286
|
+
};
|
|
287
|
+
type GameDocType = {
|
|
288
|
+
_id: string;
|
|
289
|
+
active: boolean;
|
|
290
|
+
createdAt: Date;
|
|
291
|
+
deletedAt: Date | null;
|
|
292
|
+
games: GameType[] | null;
|
|
293
|
+
owner: OwnerType;
|
|
294
|
+
points: number;
|
|
295
|
+
updatedAt: Date | null;
|
|
296
|
+
};
|
|
297
|
+
type GameLeaderboard = {
|
|
298
|
+
gameHistory: GameHistory[] | null;
|
|
299
|
+
overallPoints: number;
|
|
300
|
+
owner: OwnerType;
|
|
301
|
+
};
|
|
302
|
+
|
|
303
|
+
declare enum EnumPostType {
|
|
304
|
+
MARKET_FACES = "market_faces",
|
|
305
|
+
CLUE_BITES = "clue_bites",
|
|
306
|
+
PLAY_AND_WIN = "play_and_win"
|
|
307
|
+
}
|
|
308
|
+
declare enum EnumPostContentType {
|
|
309
|
+
GAME = "game",
|
|
310
|
+
IMAGE = "image",
|
|
311
|
+
LIST = "list",
|
|
312
|
+
TEXTAREA = "textarea",
|
|
313
|
+
VIDEO = "video"
|
|
314
|
+
}
|
|
315
|
+
type PostFileInput = {
|
|
316
|
+
source: File;
|
|
317
|
+
title?: string;
|
|
318
|
+
};
|
|
319
|
+
type PostContentTextarea = {
|
|
320
|
+
textarea: {
|
|
321
|
+
title?: string;
|
|
322
|
+
data: string;
|
|
323
|
+
};
|
|
324
|
+
};
|
|
325
|
+
type PostContentImage = {
|
|
326
|
+
images: ResourceImageType[] | null;
|
|
327
|
+
imagesUpload?: PostFileInput[] | null;
|
|
328
|
+
};
|
|
329
|
+
type PostContentVideo = {
|
|
330
|
+
video: {
|
|
331
|
+
source: string;
|
|
332
|
+
title?: string;
|
|
333
|
+
};
|
|
334
|
+
};
|
|
335
|
+
type PostContentList = {
|
|
336
|
+
list: {
|
|
337
|
+
title?: string;
|
|
338
|
+
items: {
|
|
339
|
+
text: string;
|
|
340
|
+
}[];
|
|
341
|
+
};
|
|
342
|
+
};
|
|
343
|
+
type PostContentGame = {
|
|
344
|
+
game: BaseGameType;
|
|
345
|
+
};
|
|
346
|
+
type PostContentData = PostContentGame | PostContentTextarea | PostContentImage | PostContentVideo | PostContentList;
|
|
347
|
+
type PostContentFormData = {
|
|
348
|
+
contentData?: PostContentData | null;
|
|
349
|
+
contentOrder?: number | null;
|
|
350
|
+
contentType?: EnumPostContentType | null;
|
|
351
|
+
};
|
|
352
|
+
type PostResource = {
|
|
353
|
+
resourceSlug: string;
|
|
354
|
+
resourceId: string;
|
|
355
|
+
resourceType: EnumResourceType;
|
|
356
|
+
resourceRegion: string;
|
|
357
|
+
};
|
|
358
|
+
interface PostFormData {
|
|
359
|
+
active: boolean;
|
|
360
|
+
caption: string;
|
|
361
|
+
content: PostContentFormData[];
|
|
362
|
+
cover?: ResourceImageType | null;
|
|
363
|
+
coverUpload?: PostFileInput | null;
|
|
364
|
+
postType: EnumPostType;
|
|
365
|
+
resource?: PostResource | null;
|
|
366
|
+
tags?: string[] | null;
|
|
367
|
+
title: string;
|
|
368
|
+
notifyUsers?: boolean | null;
|
|
369
|
+
}
|
|
370
|
+
type CreatePostFormData = CreateFormData<PostFormData>;
|
|
371
|
+
type PostContentType = Omit<PostContentFormData, "contentData"> & {
|
|
372
|
+
contentData: Omit<PostContentData, "imagesUpload">;
|
|
373
|
+
};
|
|
374
|
+
type PostType = Omit<PostFormData, "content" | "coverUpload" | "resource"> & {
|
|
375
|
+
_id: string;
|
|
376
|
+
approvedAt?: Date | null;
|
|
377
|
+
content: PostContentType[];
|
|
378
|
+
createdAt: Date;
|
|
379
|
+
deletedAt: Date | null;
|
|
380
|
+
resource?: PostResource | null;
|
|
381
|
+
slug: string;
|
|
382
|
+
sharePublic?: SocialShareResourceType | null;
|
|
383
|
+
updatedAt: Date | null;
|
|
384
|
+
};
|
|
385
|
+
|
|
386
|
+
type VendorCalendarData = Omit<ResourceDetails, "dateTime" | "eventStatus"> & {
|
|
387
|
+
dateTime: DateTimeType;
|
|
388
|
+
};
|
|
389
|
+
type VendorProductList = {
|
|
390
|
+
description?: string | null;
|
|
391
|
+
name: string;
|
|
392
|
+
price: number;
|
|
393
|
+
priceUnit: string;
|
|
394
|
+
productGroups?: string[] | null;
|
|
395
|
+
};
|
|
396
|
+
interface VendorFormData extends BaseResourceTypeFormData {
|
|
397
|
+
availability?: {
|
|
398
|
+
school: boolean;
|
|
399
|
+
private: boolean;
|
|
400
|
+
corporate: boolean;
|
|
401
|
+
};
|
|
402
|
+
claimed?: boolean;
|
|
403
|
+
calendar?: {
|
|
404
|
+
active?: boolean | null;
|
|
405
|
+
calendarData?: VendorCalendarData[] | null;
|
|
406
|
+
} | null;
|
|
407
|
+
categories: Category[];
|
|
408
|
+
foodTruck: boolean;
|
|
409
|
+
products?: {
|
|
410
|
+
active?: boolean | null;
|
|
411
|
+
productsList?: VendorProductList[] | null;
|
|
412
|
+
} | null;
|
|
413
|
+
unregisteredVendorId?: string | null;
|
|
414
|
+
vendorType: EnumVendorType;
|
|
415
|
+
}
|
|
416
|
+
type CreateVendorFormData = CreateFormData<VendorFormData>;
|
|
417
|
+
type VendorAttributes = {
|
|
418
|
+
details?: string | null;
|
|
419
|
+
isRequired: boolean;
|
|
420
|
+
};
|
|
421
|
+
type VendorInfoFormData = {
|
|
422
|
+
_id?: string;
|
|
423
|
+
compliance?: {
|
|
424
|
+
liabilityInsurance: boolean;
|
|
425
|
+
foodBeverageLicense: boolean;
|
|
426
|
+
};
|
|
427
|
+
documents?: ResourceImageType[] | null;
|
|
428
|
+
documentsUpload?: ResourceImageType[] | null;
|
|
429
|
+
product: {
|
|
430
|
+
foodFlavors: EnumFoodFlavor[];
|
|
431
|
+
packaging: string[];
|
|
432
|
+
priceRange: {
|
|
433
|
+
max: string;
|
|
434
|
+
min: string;
|
|
435
|
+
};
|
|
436
|
+
producedIn: string[];
|
|
437
|
+
};
|
|
438
|
+
requirements?: {
|
|
439
|
+
electricity: VendorAttributes;
|
|
440
|
+
gazebo: VendorAttributes;
|
|
441
|
+
table: VendorAttributes;
|
|
442
|
+
};
|
|
443
|
+
stallInfo: {
|
|
444
|
+
size: {
|
|
445
|
+
depth: string;
|
|
446
|
+
width: string;
|
|
447
|
+
};
|
|
448
|
+
};
|
|
449
|
+
vendorId: string;
|
|
450
|
+
};
|
|
451
|
+
type CreateVendorInfoFormData = CreateFormData<VendorInfoFormData>;
|
|
452
|
+
interface VendorType extends BaseResourceType {
|
|
453
|
+
availability?: {
|
|
454
|
+
school: boolean;
|
|
455
|
+
private: boolean;
|
|
456
|
+
corporate: boolean;
|
|
457
|
+
};
|
|
458
|
+
claimed: boolean;
|
|
459
|
+
calendar: VendorFormData["calendar"] | null;
|
|
460
|
+
categories: VendorFormData["categories"];
|
|
461
|
+
foodTruck: boolean;
|
|
462
|
+
products: VendorFormData["products"] | null;
|
|
463
|
+
vendorInfoId: string;
|
|
464
|
+
vendorType: EnumVendorType;
|
|
465
|
+
relations: {
|
|
466
|
+
relationId: string | null;
|
|
467
|
+
relationDates: RelationDate[] | null;
|
|
468
|
+
}[] | null;
|
|
469
|
+
sharePublic?: SocialShareResourceType | null;
|
|
470
|
+
shareRelation?: SocialShareResourceType | null;
|
|
471
|
+
unregisteredVendorId?: string | null;
|
|
472
|
+
}
|
|
473
|
+
type VendorInfoType = Omit<VendorInfoFormData, "_id" | "documentsUpload"> & {
|
|
474
|
+
_id: string;
|
|
475
|
+
active?: boolean;
|
|
476
|
+
};
|
|
477
|
+
interface UnregisteredVendorFormData {
|
|
478
|
+
categoryIds: string[];
|
|
479
|
+
dateTime: DateTimeType[];
|
|
480
|
+
email?: string | null;
|
|
481
|
+
inviterId: string;
|
|
482
|
+
name: string;
|
|
483
|
+
region: string;
|
|
484
|
+
}
|
|
485
|
+
type CreateUnregisteredVendorFormData = CreateFormData<UnregisteredVendorFormData>;
|
|
486
|
+
type UnregisteredVendorInvitationType = Pick<UnregisteredVendorFormData, "dateTime" | "inviterId">;
|
|
487
|
+
type UnregisteredVendorType = Omit<UnregisteredVendorFormData, "dateTime" | "inviterId"> & {
|
|
488
|
+
_id: string;
|
|
489
|
+
active: boolean;
|
|
490
|
+
claimed: boolean;
|
|
491
|
+
claimedAt?: Date;
|
|
492
|
+
claimedByUserId?: string;
|
|
493
|
+
createdAt: Date;
|
|
494
|
+
deletedAt: Date | null;
|
|
495
|
+
invitations: UnregisteredVendorInvitationType[];
|
|
496
|
+
updatedAt: Date | null;
|
|
497
|
+
};
|
|
498
|
+
|
|
499
|
+
declare const PROMO_CODE_PREFIX = "CM-";
|
|
500
|
+
type PromoCodeType = `${typeof PROMO_CODE_PREFIX}${string}`;
|
|
501
|
+
type Nullable<T> = {
|
|
502
|
+
[K in keyof T]: T[K] | null | undefined;
|
|
503
|
+
};
|
|
504
|
+
/** Uniform mutation response envelope used across GraphQL mutations. */
|
|
505
|
+
type MutationResponse<T> = {
|
|
506
|
+
data: T | null;
|
|
507
|
+
message: string | null;
|
|
508
|
+
};
|
|
509
|
+
type DeviceInfo = {
|
|
510
|
+
appBuildNumber: string;
|
|
511
|
+
appId: string;
|
|
512
|
+
appVersion: string;
|
|
513
|
+
brand: string;
|
|
514
|
+
deviceName: string;
|
|
515
|
+
installationId: string;
|
|
516
|
+
manufacturer: string;
|
|
517
|
+
modelName: string;
|
|
518
|
+
osName: string;
|
|
519
|
+
osVersion: string;
|
|
520
|
+
timestamp: string;
|
|
521
|
+
};
|
|
522
|
+
type TermsAgreement = DeviceInfo & {
|
|
523
|
+
termVersion: string;
|
|
524
|
+
};
|
|
525
|
+
type ResourceContactDetailsType = {
|
|
526
|
+
email?: string | null;
|
|
527
|
+
landlinePhone?: string | null;
|
|
528
|
+
mobilePhone?: string | null;
|
|
529
|
+
};
|
|
530
|
+
type ResourceImageType = {
|
|
531
|
+
active: boolean;
|
|
532
|
+
source: string;
|
|
533
|
+
title: string;
|
|
534
|
+
};
|
|
535
|
+
type SocialMediaType = {
|
|
536
|
+
name?: EnumSocialMedia;
|
|
537
|
+
link?: string;
|
|
538
|
+
};
|
|
539
|
+
type UserLicenceType = {
|
|
540
|
+
expiryDate: Date;
|
|
541
|
+
issuedDate: Date;
|
|
542
|
+
licenceType: EnumUserLicence;
|
|
543
|
+
prevLicenceType?: EnumUserLicence | null;
|
|
544
|
+
};
|
|
545
|
+
type OwnerType = {
|
|
546
|
+
email: string;
|
|
547
|
+
userId: string;
|
|
548
|
+
};
|
|
549
|
+
interface BaseResourceTypeFormData {
|
|
550
|
+
_id?: string;
|
|
551
|
+
active: boolean;
|
|
552
|
+
contactDetails: ResourceContactDetailsType | null;
|
|
553
|
+
cover: ResourceImageType;
|
|
554
|
+
coverUpload?: ResourceImageType | null;
|
|
555
|
+
description: string;
|
|
556
|
+
images?: ResourceImageType[] | null;
|
|
557
|
+
imagesUpload?: ResourceImageType[] | null;
|
|
558
|
+
logo?: ResourceImageType | null;
|
|
559
|
+
logoUpload?: ResourceImageType | null;
|
|
560
|
+
name: string;
|
|
561
|
+
promoCodes?: PromoCodeType[] | null;
|
|
562
|
+
region: string;
|
|
563
|
+
socialMedia: SocialMediaType[] | null;
|
|
564
|
+
termsAgreement?: TermsAgreement | null;
|
|
565
|
+
}
|
|
566
|
+
type PosterUsageType = {
|
|
567
|
+
month: string;
|
|
568
|
+
count: number;
|
|
569
|
+
};
|
|
570
|
+
type RelatedPostType = {
|
|
571
|
+
postActive: boolean;
|
|
572
|
+
postId: string;
|
|
573
|
+
postSlug: string;
|
|
574
|
+
postType: EnumPostType;
|
|
575
|
+
};
|
|
576
|
+
type SocialShareResourceType = {
|
|
577
|
+
qrCode: ResourceImageType;
|
|
578
|
+
socialImage: ResourceImageType;
|
|
579
|
+
};
|
|
580
|
+
type BaseResourceType = Omit<BaseResourceTypeFormData, "_id" | "coverUpload" | "imagesUpload" | "logoUpload"> & {
|
|
581
|
+
_id: string;
|
|
582
|
+
adIds?: string[] | null;
|
|
583
|
+
approvedAt?: Date | null;
|
|
584
|
+
createdAt: Date;
|
|
585
|
+
deletedAt: Date | null;
|
|
586
|
+
owner: OwnerType;
|
|
587
|
+
posterUsage?: PosterUsageType | null;
|
|
588
|
+
rating?: number | null;
|
|
589
|
+
relatedPost?: RelatedPostType | null;
|
|
590
|
+
reviewCount?: number | null;
|
|
591
|
+
slug: string;
|
|
592
|
+
updatedAt: Date | null;
|
|
593
|
+
};
|
|
594
|
+
type LocationGeoType = {
|
|
595
|
+
coordinates: number[];
|
|
596
|
+
type: "Point";
|
|
597
|
+
};
|
|
598
|
+
type LocationType = {
|
|
599
|
+
city: string;
|
|
600
|
+
country: string;
|
|
601
|
+
fullAddress: string;
|
|
602
|
+
geo: LocationGeoType;
|
|
603
|
+
latitude: number;
|
|
604
|
+
longitude: number;
|
|
605
|
+
region: string;
|
|
606
|
+
};
|
|
607
|
+
type DateTimeType = {
|
|
608
|
+
dateStatus: EnumEventDateStatus;
|
|
609
|
+
endDate: string;
|
|
610
|
+
endTime: string;
|
|
611
|
+
startDate: string;
|
|
612
|
+
startTime: string;
|
|
613
|
+
};
|
|
614
|
+
type Region = {
|
|
615
|
+
latitude: number;
|
|
616
|
+
latitudeDelta: number;
|
|
617
|
+
longitude: number;
|
|
618
|
+
longitudeDelta: number;
|
|
619
|
+
};
|
|
620
|
+
type ResourceDetails = {
|
|
621
|
+
dateTime: DateTimeType[] | null;
|
|
622
|
+
description: string | null;
|
|
623
|
+
eventStatus?: EventStatusType | null;
|
|
624
|
+
location: LocationType | null;
|
|
625
|
+
resourceCover: ResourceImageType | null;
|
|
626
|
+
resourceId: string;
|
|
627
|
+
resourceLogo: ResourceImageType | null;
|
|
628
|
+
resourceName: string;
|
|
629
|
+
resourceType: EnumResourceType;
|
|
630
|
+
};
|
|
631
|
+
type GeocodeLocation = Pick<LocationType, "latitude" | "longitude">;
|
|
632
|
+
type EventStatusType = {
|
|
633
|
+
claimed: boolean;
|
|
634
|
+
eventType: EnumEventType;
|
|
635
|
+
googlePlaceId?: string | null;
|
|
636
|
+
};
|
|
637
|
+
interface FormField {
|
|
638
|
+
disabled?: boolean;
|
|
639
|
+
helperText?: string;
|
|
640
|
+
isTextArea?: boolean;
|
|
641
|
+
keyboardType?: "default" | "email-address" | "number-pad" | "url" | "decimal-pad" | "phone-pad";
|
|
642
|
+
name: string;
|
|
643
|
+
placeholder: string;
|
|
644
|
+
required?: boolean;
|
|
645
|
+
secureTextEntry?: boolean;
|
|
646
|
+
}
|
|
647
|
+
interface FormDateField {
|
|
648
|
+
dateMode: "date" | "time";
|
|
649
|
+
helperText?: string;
|
|
650
|
+
name: "endDate" | "endTime" | "startDate" | "startTime";
|
|
651
|
+
placeholder: string;
|
|
652
|
+
}
|
|
653
|
+
interface SubcategoryItems {
|
|
654
|
+
id: string;
|
|
655
|
+
name: string;
|
|
656
|
+
description?: string | null;
|
|
657
|
+
}
|
|
658
|
+
interface Subcategory {
|
|
659
|
+
id: string;
|
|
660
|
+
name: string;
|
|
661
|
+
items?: SubcategoryItems[] | null;
|
|
662
|
+
}
|
|
663
|
+
interface Category {
|
|
664
|
+
color?: string | null;
|
|
665
|
+
description?: string | null;
|
|
666
|
+
id: string;
|
|
667
|
+
name: string;
|
|
668
|
+
subcategories: Subcategory[];
|
|
669
|
+
}
|
|
670
|
+
type OptionItem = {
|
|
671
|
+
value: string;
|
|
672
|
+
label: string;
|
|
673
|
+
};
|
|
674
|
+
type ImageObjectType = {
|
|
675
|
+
uri: string;
|
|
676
|
+
type: string;
|
|
677
|
+
name: string;
|
|
678
|
+
};
|
|
679
|
+
interface ResourceConnectionsType {
|
|
680
|
+
events: EventListItemType[] | null;
|
|
681
|
+
vendors: VendorType[] | null;
|
|
682
|
+
}
|
|
683
|
+
interface CreateFormData<T extends FieldValues> {
|
|
684
|
+
control: Control<T, any>;
|
|
685
|
+
fields: T;
|
|
686
|
+
formState: FormState<T>;
|
|
687
|
+
handleSubmit: UseFormHandleSubmit<T, any>;
|
|
688
|
+
reset: UseFormReset<T>;
|
|
689
|
+
setValue: UseFormSetValue<T>;
|
|
690
|
+
watch: UseFormWatch<T>;
|
|
691
|
+
getValues: UseFormGetValues<T>;
|
|
692
|
+
}
|
|
693
|
+
interface UseGetResourcesByRegionOptions {
|
|
694
|
+
onlyClaimed?: boolean;
|
|
695
|
+
limit?: number;
|
|
696
|
+
offset?: number;
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
export { type GamePlacement as $, type BaseGameType as A, type BaseResourceTypeFormData as B, type Category as C, type BaseResourceType as D, type EventType as E, type FormField as F, type GameDocType as G, type CreateFormData as H, type DailyClueBaseGame as I, type DailyClueGameData as J, type DateTimeType as K, type LocationType as L, type MutationResponse as M, type DateTimeWithPriceType as N, type OptionItem as O, type PosterUsageType as P, type DeviceInfo as Q, type RefundPolicy as R, type StallType as S, EnumGameStatus as T, type UseGetResourcesByRegionOptions as U, type VendorType as V, EnumGameType as W, EnumPostContentType as X, type EventStatusType as Y, type GameDate as Z, type GameHistory as _, type FormDateField as a, type GamePlacementClue as a0, type GameType as a1, type GeocodeLocation as a2, type GlobalGameData as a3, type ImageObjectType as a4, type LocationGeoType as a5, type Nullable as a6, type OwnerType as a7, PROMO_CODE_PREFIX as a8, type PaymentInfoType as a9, type TermsAgreement as aA, type UnregisteredVendorInvitationType as aB, type VendorAttributes as aC, type VendorCalendarData as aD, type VendorProductList as aE, gameScreenIdentifierList as aF, gameTypeToDisplayName as aG, type PostContentData as aa, type PostContentFormData as ab, type PostContentGame as ac, type PostContentImage as ad, type PostContentList as ae, type PostContentTextarea as af, type PostContentType as ag, type PostContentVideo as ah, type PostFileInput as ai, type PostResource as aj, type PromoCodeType as ak, type PuzzleAnswer as al, type PuzzleAnsweredQuestion as am, type PuzzleBaseGame as an, type PuzzleGameData as ao, type PuzzleQuestion as ap, type RelatedPostType as aq, type RelationDate as ar, type RelationInputType as as, type ResourceContactDetailsType as at, type ResourceDetails as au, type ResourceImageType as av, type SocialMediaType as aw, type SocialShareResourceType as ax, type Subcategory as ay, type SubcategoryItems as az, type Requirement as b, type EventListItemType as c, type EventInfoType as d, type RelationType as e, type ResourceConnectionsType as f, type UnregisteredVendorType as g, type VendorInfoType as h, type UserLicenceType as i, type PostType as j, EnumPostType as k, type GameLeaderboard as l, type VendorFormData as m, type CreateVendorFormData as n, type VendorInfoFormData as o, type CreateVendorInfoFormData as p, type UnregisteredVendorFormData as q, type CreateUnregisteredVendorFormData as r, type EventFormData as s, type CreateEventFormData as t, type EventInfoFormData as u, type CreateEventInfoFormData as v, type PostFormData as w, type CreatePostFormData as x, type Region as y, type BaseGameMap as z };
|