@timardex/cluemart-shared 1.6.130 → 1.7.0
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-CVkVX_z5.d.ts +296 -0
- package/dist/ad-DA9ECAhK.d.mts +296 -0
- package/dist/affiliate-1RtkLnLP.d.ts +35 -0
- package/dist/affiliate-Cos2Syz5.d.mts +35 -0
- package/dist/chunk-HZMP7GXC.mjs +5330 -0
- package/dist/chunk-HZMP7GXC.mjs.map +1 -0
- package/dist/chunk-KZTOISPA.mjs +272 -0
- package/dist/chunk-KZTOISPA.mjs.map +1 -0
- package/dist/chunk-MVQ3CFQR.mjs +230 -0
- package/dist/chunk-MVQ3CFQR.mjs.map +1 -0
- package/dist/chunk-NPFJ2CN2.mjs +109 -0
- package/dist/chunk-NPFJ2CN2.mjs.map +1 -0
- package/dist/chunk-RKIRWZCH.mjs +368 -0
- package/dist/chunk-RKIRWZCH.mjs.map +1 -0
- package/dist/{chunk-OHHJ3KJJ.mjs → chunk-TAECMXM4.mjs} +267 -304
- package/dist/chunk-TAECMXM4.mjs.map +1 -0
- package/dist/chunk-VA5YN2K3.mjs +48 -0
- package/dist/chunk-VA5YN2K3.mjs.map +1 -0
- package/dist/chunk-ZZJSCYJK.mjs +958 -0
- package/dist/chunk-ZZJSCYJK.mjs.map +1 -0
- package/dist/contactUs-DGrDzJaM.d.mts +11 -0
- package/dist/contactUs-H7799pWe.d.ts +11 -0
- package/dist/enums/index.cjs +223 -2
- package/dist/enums/index.cjs.map +1 -1
- package/dist/enums/index.d.mts +164 -5
- package/dist/enums/index.d.ts +164 -5
- package/dist/enums/index.mjs +41 -1
- package/dist/formFields/index.cjs +168 -403
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.d.mts +3 -6
- package/dist/formFields/index.d.ts +3 -6
- package/dist/formFields/index.mjs +47 -921
- package/dist/formFields/index.mjs.map +1 -1
- package/dist/global-BUUfmCo7.d.mts +698 -0
- package/dist/global-fKbMmluy.d.ts +698 -0
- package/dist/graphql/index.cjs +3329 -3340
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +487 -690
- package/dist/graphql/index.d.ts +487 -690
- package/dist/graphql/index.mjs +153 -2552
- package/dist/graphql/index.mjs.map +1 -1
- package/dist/hooks/index.cjs +3478 -773
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +6 -13
- package/dist/hooks/index.d.ts +6 -13
- package/dist/hooks/index.mjs +99 -193
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/images/apple-maps-icon.webp.d.ts +1 -8
- package/dist/images/banner-horizontal.webp.d.ts +1 -8
- package/dist/images/banner-vertical.webp.d.ts +1 -8
- package/dist/images/cluiTui.webp.d.ts +1 -8
- package/dist/images/corporate.webp.d.ts +1 -8
- package/dist/images/facebook.webp.d.ts +1 -8
- package/dist/images/gazebo-top.webp.d.ts +1 -8
- package/dist/images/google-maps-icon.webp.d.ts +1 -8
- package/dist/images/googleMaps-logo-dark.webp.d.ts +1 -8
- package/dist/images/googleMaps-logo-light.webp.d.ts +1 -8
- package/dist/images/index.mjs +21 -86
- package/dist/images/index.mjs.map +1 -1
- package/dist/images/instagram.webp.d.ts +1 -8
- package/dist/images/logo-atr.webp.d.ts +1 -8
- package/dist/images/logo-dark.webp.d.ts +1 -8
- package/dist/images/logo.webp.d.ts +1 -8
- package/dist/images/meet.webp.d.ts +1 -8
- package/dist/images/mini-market1.webp.d.ts +1 -8
- package/dist/images/mini-market2.webp.d.ts +1 -8
- package/dist/images/mini-market3.webp.d.ts +1 -8
- package/dist/images/mini-market4.webp.d.ts +1 -8
- package/dist/images/mini-market5.webp.d.ts +1 -8
- package/dist/images/poll.webp.d.ts +1 -8
- package/dist/images/poster1.webp.d.ts +1 -8
- package/dist/images/poster2.webp.d.ts +1 -8
- package/dist/images/poster3.webp.d.ts +1 -8
- package/dist/images/poster4.webp.d.ts +1 -8
- package/dist/images/private.webp.d.ts +1 -8
- package/dist/images/qr-code.webp.d.ts +1 -8
- package/dist/images/school.webp.d.ts +1 -8
- package/dist/images/sima.webp.d.ts +1 -8
- package/dist/images/store-android.webp.d.ts +1 -8
- package/dist/images/store-ios.webp.d.ts +1 -8
- package/dist/images/tablas.webp.d.ts +1 -8
- package/dist/images/telefonos.webp.d.ts +1 -8
- package/dist/images/tiktok.webp.d.ts +1 -8
- package/dist/images/tip.webp.d.ts +1 -8
- package/dist/images/ugralos.webp.d.ts +1 -8
- package/dist/images/waze-maps-icon.webp.d.ts +1 -8
- package/dist/images/website.webp.d.ts +1 -8
- package/dist/images/youtube.webp.d.ts +1 -8
- package/dist/index.cjs +5883 -7079
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +1692 -2966
- package/dist/index.d.ts +1692 -2966
- package/dist/index.mjs +5020 -6162
- package/dist/index.mjs.map +1 -1
- package/dist/map/index.cjs +9 -14
- package/dist/map/index.cjs.map +1 -1
- package/dist/map/index.d.mts +14 -18
- package/dist/map/index.d.ts +14 -18
- package/dist/map/index.mjs +9 -14
- package/dist/map/index.mjs.map +1 -1
- package/dist/resourceActivities-BL_12IAo.d.ts +125 -0
- package/dist/resourceActivities-zczOntNk.d.mts +125 -0
- package/dist/sharing/index.cjs +1272 -63
- package/dist/sharing/index.cjs.map +1 -1
- package/dist/sharing/index.d.mts +7 -32
- package/dist/sharing/index.d.ts +7 -32
- package/dist/sharing/index.mjs +30 -188
- package/dist/sharing/index.mjs.map +1 -1
- package/dist/theme/index.mjs +5 -41
- package/dist/theme/index.mjs.map +1 -1
- package/dist/types/index.cjs +110 -868
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.mts +24 -230
- package/dist/types/index.d.ts +24 -230
- package/dist/types/index.mjs +27 -61
- package/dist/utils/index.cjs +214 -608
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.mts +53 -107
- package/dist/utils/index.d.ts +53 -107
- package/dist/utils/index.mjs +15 -43
- package/package.json +12 -40
- 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/apollo/index.cjs +0 -1383
- package/dist/apollo/index.cjs.map +0 -1
- package/dist/apollo/index.d.mts +0 -323
- package/dist/apollo/index.d.ts +0 -323
- package/dist/apollo/index.mjs +0 -1295
- package/dist/apollo/index.mjs.map +0 -1
- package/dist/auth/index.cjs +0 -3322
- package/dist/auth/index.cjs.map +0 -1
- package/dist/auth/index.d.mts +0 -164
- package/dist/auth/index.d.ts +0 -164
- package/dist/auth/index.mjs +0 -379
- package/dist/auth/index.mjs.map +0 -1
- package/dist/auth-BOmAO53v.d.ts +0 -169
- package/dist/auth-CsITA95p.d.mts +0 -169
- package/dist/chunk-DATBGC2K.mjs +0 -347
- 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 +0 -297
- package/dist/chunk-NWWKI4PJ.mjs.map +0 -1
- package/dist/chunk-OHHJ3KJJ.mjs.map +0 -1
- package/dist/chunk-RAYUJODN.mjs +0 -45
- package/dist/chunk-RAYUJODN.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,698 @@
|
|
|
1
|
+
import { FieldValues, Control, FormState, UseFormHandleSubmit, UseFormReset, UseFormSetValue, UseFormWatch, UseFormGetValues } from 'react-hook-form';
|
|
2
|
+
import { EnumResourceType, EnumInviteStatus, EnumRelationResource, EnumEventType, EnumPaymentMethod, EnumVendorType, EnumFoodFlavor, EnumEventDateStatus, EnumUserLicence, 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" | "associates" | "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
|
+
content: PostContentType[];
|
|
377
|
+
createdAt: Date;
|
|
378
|
+
deletedAt: Date | null;
|
|
379
|
+
resource?: PostResource | null;
|
|
380
|
+
slug: string;
|
|
381
|
+
sharePublic?: SocialShareResourceType | null;
|
|
382
|
+
updatedAt: Date | null;
|
|
383
|
+
};
|
|
384
|
+
|
|
385
|
+
type VendorCalendarData = Omit<ResourceDetails, "dateTime" | "eventStatus"> & {
|
|
386
|
+
dateTime: DateTimeType;
|
|
387
|
+
};
|
|
388
|
+
type VendorProductList = {
|
|
389
|
+
description?: string | null;
|
|
390
|
+
name: string;
|
|
391
|
+
price: number;
|
|
392
|
+
priceUnit: string;
|
|
393
|
+
productGroups?: string[] | null;
|
|
394
|
+
};
|
|
395
|
+
interface VendorFormData extends BaseResourceTypeFormData {
|
|
396
|
+
availability?: {
|
|
397
|
+
school: boolean;
|
|
398
|
+
private: boolean;
|
|
399
|
+
corporate: boolean;
|
|
400
|
+
};
|
|
401
|
+
claimed?: boolean;
|
|
402
|
+
calendar?: {
|
|
403
|
+
active?: boolean | null;
|
|
404
|
+
calendarData?: VendorCalendarData[] | null;
|
|
405
|
+
} | null;
|
|
406
|
+
categories: Category[];
|
|
407
|
+
foodTruck: boolean;
|
|
408
|
+
products?: {
|
|
409
|
+
active?: boolean | null;
|
|
410
|
+
productsList?: VendorProductList[] | null;
|
|
411
|
+
} | null;
|
|
412
|
+
unregisteredVendorId?: string | null;
|
|
413
|
+
vendorType: EnumVendorType;
|
|
414
|
+
}
|
|
415
|
+
type CreateVendorFormData = CreateFormData<VendorFormData>;
|
|
416
|
+
type VendorAttributes = {
|
|
417
|
+
details?: string | null;
|
|
418
|
+
isRequired: boolean;
|
|
419
|
+
};
|
|
420
|
+
type VendorInfoFormData = {
|
|
421
|
+
_id?: string;
|
|
422
|
+
compliance?: {
|
|
423
|
+
liabilityInsurance: boolean;
|
|
424
|
+
foodBeverageLicense: boolean;
|
|
425
|
+
};
|
|
426
|
+
documents?: ResourceImageType[] | null;
|
|
427
|
+
documentsUpload?: ResourceImageType[] | null;
|
|
428
|
+
product: {
|
|
429
|
+
foodFlavors: EnumFoodFlavor[];
|
|
430
|
+
packaging: string[];
|
|
431
|
+
priceRange: {
|
|
432
|
+
max: string;
|
|
433
|
+
min: string;
|
|
434
|
+
};
|
|
435
|
+
producedIn: string[];
|
|
436
|
+
};
|
|
437
|
+
requirements?: {
|
|
438
|
+
electricity: VendorAttributes;
|
|
439
|
+
gazebo: VendorAttributes;
|
|
440
|
+
table: VendorAttributes;
|
|
441
|
+
};
|
|
442
|
+
stallInfo: {
|
|
443
|
+
size: {
|
|
444
|
+
depth: string;
|
|
445
|
+
width: string;
|
|
446
|
+
};
|
|
447
|
+
};
|
|
448
|
+
vendorId: string;
|
|
449
|
+
};
|
|
450
|
+
type CreateVendorInfoFormData = CreateFormData<VendorInfoFormData>;
|
|
451
|
+
interface VendorType extends BaseResourceType {
|
|
452
|
+
availability?: {
|
|
453
|
+
school: boolean;
|
|
454
|
+
private: boolean;
|
|
455
|
+
corporate: boolean;
|
|
456
|
+
};
|
|
457
|
+
claimed: boolean;
|
|
458
|
+
calendar: VendorFormData["calendar"] | null;
|
|
459
|
+
categories: VendorFormData["categories"];
|
|
460
|
+
foodTruck: boolean;
|
|
461
|
+
products: VendorFormData["products"] | null;
|
|
462
|
+
vendorInfoId: string;
|
|
463
|
+
vendorType: EnumVendorType;
|
|
464
|
+
relations: {
|
|
465
|
+
relationId: string | null;
|
|
466
|
+
relationDates: RelationDate[] | null;
|
|
467
|
+
}[] | null;
|
|
468
|
+
sharePublic?: SocialShareResourceType | null;
|
|
469
|
+
shareRelation?: SocialShareResourceType | null;
|
|
470
|
+
unregisteredVendorId?: string | null;
|
|
471
|
+
}
|
|
472
|
+
type VendorInfoType = Omit<VendorInfoFormData, "_id" | "documentsUpload"> & {
|
|
473
|
+
_id: string;
|
|
474
|
+
active?: boolean;
|
|
475
|
+
};
|
|
476
|
+
interface UnregisteredVendorFormData {
|
|
477
|
+
categoryIds: string[];
|
|
478
|
+
dateTime: DateTimeType[];
|
|
479
|
+
email?: string | null;
|
|
480
|
+
inviterId: string;
|
|
481
|
+
name: string;
|
|
482
|
+
region: string;
|
|
483
|
+
}
|
|
484
|
+
type CreateUnregisteredVendorFormData = CreateFormData<UnregisteredVendorFormData>;
|
|
485
|
+
type UnregisteredVendorInvitationType = Pick<UnregisteredVendorFormData, "dateTime" | "inviterId">;
|
|
486
|
+
type UnregisteredVendorType = Omit<UnregisteredVendorFormData, "dateTime" | "inviterId"> & {
|
|
487
|
+
_id: string;
|
|
488
|
+
active: boolean;
|
|
489
|
+
claimed: boolean;
|
|
490
|
+
claimedAt?: Date;
|
|
491
|
+
claimedByUserId?: string;
|
|
492
|
+
createdAt: Date;
|
|
493
|
+
deletedAt: Date | null;
|
|
494
|
+
invitations: UnregisteredVendorInvitationType[];
|
|
495
|
+
updatedAt: Date | null;
|
|
496
|
+
};
|
|
497
|
+
|
|
498
|
+
declare const PROMO_CODE_PREFIX = "CM-";
|
|
499
|
+
type PromoCodeType = `${typeof PROMO_CODE_PREFIX}${string}`;
|
|
500
|
+
type Nullable<T> = {
|
|
501
|
+
[K in keyof T]: T[K] | null | undefined;
|
|
502
|
+
};
|
|
503
|
+
type DeviceInfo = {
|
|
504
|
+
appBuildNumber: string;
|
|
505
|
+
appId: string;
|
|
506
|
+
appVersion: string;
|
|
507
|
+
brand: string;
|
|
508
|
+
deviceName: string;
|
|
509
|
+
installationId: string;
|
|
510
|
+
manufacturer: string;
|
|
511
|
+
modelName: string;
|
|
512
|
+
osName: string;
|
|
513
|
+
osVersion: string;
|
|
514
|
+
timestamp: string;
|
|
515
|
+
};
|
|
516
|
+
type TermsAgreement = DeviceInfo & {
|
|
517
|
+
termVersion: string;
|
|
518
|
+
};
|
|
519
|
+
type ResourceContactDetailsType = {
|
|
520
|
+
email?: string | null;
|
|
521
|
+
landlinePhone?: string | null;
|
|
522
|
+
mobilePhone?: string | null;
|
|
523
|
+
};
|
|
524
|
+
type ResourceImageType = {
|
|
525
|
+
active: boolean;
|
|
526
|
+
source: string;
|
|
527
|
+
title: string;
|
|
528
|
+
};
|
|
529
|
+
type SocialMediaType = {
|
|
530
|
+
name?: EnumSocialMedia;
|
|
531
|
+
link?: string;
|
|
532
|
+
};
|
|
533
|
+
type UserLicenceType = {
|
|
534
|
+
expiryDate: Date;
|
|
535
|
+
issuedDate: Date;
|
|
536
|
+
licenceType: EnumUserLicence;
|
|
537
|
+
prevLicenceType?: EnumUserLicence | null;
|
|
538
|
+
};
|
|
539
|
+
type AssociateType = {
|
|
540
|
+
email: string;
|
|
541
|
+
resourceId: string;
|
|
542
|
+
resourceType: EnumResourceType;
|
|
543
|
+
licence: UserLicenceType;
|
|
544
|
+
};
|
|
545
|
+
type OwnerType = {
|
|
546
|
+
email: string;
|
|
547
|
+
userId: string;
|
|
548
|
+
};
|
|
549
|
+
interface BaseResourceTypeFormData {
|
|
550
|
+
_id?: string;
|
|
551
|
+
active: boolean;
|
|
552
|
+
associates: AssociateType[] | null;
|
|
553
|
+
contactDetails: ResourceContactDetailsType | null;
|
|
554
|
+
cover: ResourceImageType;
|
|
555
|
+
coverUpload?: ResourceImageType | null;
|
|
556
|
+
description: string;
|
|
557
|
+
images?: ResourceImageType[] | null;
|
|
558
|
+
imagesUpload?: ResourceImageType[] | null;
|
|
559
|
+
logo?: ResourceImageType | null;
|
|
560
|
+
logoUpload?: ResourceImageType | null;
|
|
561
|
+
name: string;
|
|
562
|
+
owner?: OwnerType | null;
|
|
563
|
+
promoCodes?: PromoCodeType[] | null;
|
|
564
|
+
region: string;
|
|
565
|
+
socialMedia: SocialMediaType[] | null;
|
|
566
|
+
termsAgreement?: TermsAgreement | null;
|
|
567
|
+
}
|
|
568
|
+
type PosterUsageType = {
|
|
569
|
+
month: string;
|
|
570
|
+
count: number;
|
|
571
|
+
};
|
|
572
|
+
type RelatedPostType = {
|
|
573
|
+
postId: string;
|
|
574
|
+
postSlug: string;
|
|
575
|
+
postType: EnumPostType;
|
|
576
|
+
};
|
|
577
|
+
type SocialShareResourceType = {
|
|
578
|
+
qrCode: ResourceImageType;
|
|
579
|
+
socialImage: ResourceImageType;
|
|
580
|
+
};
|
|
581
|
+
type BaseResourceType = Omit<BaseResourceTypeFormData, "_id" | "coverUpload" | "imagesUpload" | "logoUpload"> & {
|
|
582
|
+
_id: string;
|
|
583
|
+
adIds?: string[] | null;
|
|
584
|
+
createdAt: Date;
|
|
585
|
+
deletedAt: Date | null;
|
|
586
|
+
posterUsage?: PosterUsageType | null;
|
|
587
|
+
rating?: number | null;
|
|
588
|
+
relatedPost?: RelatedPostType | null;
|
|
589
|
+
reviewCount?: number | null;
|
|
590
|
+
slug: string;
|
|
591
|
+
updatedAt: Date | null;
|
|
592
|
+
};
|
|
593
|
+
type LocationGeoType = {
|
|
594
|
+
coordinates: number[];
|
|
595
|
+
type: "Point";
|
|
596
|
+
};
|
|
597
|
+
type LocationType = {
|
|
598
|
+
city: string;
|
|
599
|
+
country: string;
|
|
600
|
+
fullAddress: string;
|
|
601
|
+
geo: LocationGeoType;
|
|
602
|
+
latitude: number;
|
|
603
|
+
longitude: number;
|
|
604
|
+
region: string;
|
|
605
|
+
};
|
|
606
|
+
type DateTimeType = {
|
|
607
|
+
dateStatus: EnumEventDateStatus;
|
|
608
|
+
endDate: string;
|
|
609
|
+
endTime: string;
|
|
610
|
+
startDate: string;
|
|
611
|
+
startTime: string;
|
|
612
|
+
};
|
|
613
|
+
type Region = {
|
|
614
|
+
latitude: number;
|
|
615
|
+
latitudeDelta: number;
|
|
616
|
+
longitude: number;
|
|
617
|
+
longitudeDelta: number;
|
|
618
|
+
};
|
|
619
|
+
type ResourceDetails = {
|
|
620
|
+
dateTime: DateTimeType[] | null;
|
|
621
|
+
description: string | null;
|
|
622
|
+
eventStatus?: EventStatusType | null;
|
|
623
|
+
location: LocationType | null;
|
|
624
|
+
resourceCover: ResourceImageType | null;
|
|
625
|
+
resourceId: string;
|
|
626
|
+
resourceLogo: ResourceImageType | null;
|
|
627
|
+
resourceName: string;
|
|
628
|
+
resourceType: EnumResourceType;
|
|
629
|
+
};
|
|
630
|
+
type GeocodeLocation = Pick<LocationType, "latitude" | "longitude">;
|
|
631
|
+
type EventStatusType = {
|
|
632
|
+
claimed: boolean;
|
|
633
|
+
eventType: EnumEventType;
|
|
634
|
+
googlePlaceId?: string | null;
|
|
635
|
+
};
|
|
636
|
+
interface FormField {
|
|
637
|
+
disabled?: boolean;
|
|
638
|
+
helperText?: string;
|
|
639
|
+
isTextArea?: boolean;
|
|
640
|
+
keyboardType?: "default" | "email-address" | "number-pad" | "url" | "decimal-pad" | "phone-pad";
|
|
641
|
+
name: string;
|
|
642
|
+
placeholder: string;
|
|
643
|
+
required?: boolean;
|
|
644
|
+
secureTextEntry?: boolean;
|
|
645
|
+
}
|
|
646
|
+
interface FormDateField {
|
|
647
|
+
dateMode: "date" | "time";
|
|
648
|
+
helperText?: string;
|
|
649
|
+
name: "endDate" | "endTime" | "startDate" | "startTime";
|
|
650
|
+
placeholder: string;
|
|
651
|
+
}
|
|
652
|
+
interface SubcategoryItems {
|
|
653
|
+
id: string;
|
|
654
|
+
name: string;
|
|
655
|
+
description?: string | null;
|
|
656
|
+
}
|
|
657
|
+
interface Subcategory {
|
|
658
|
+
id: string;
|
|
659
|
+
name: string;
|
|
660
|
+
items?: SubcategoryItems[] | null;
|
|
661
|
+
}
|
|
662
|
+
interface Category {
|
|
663
|
+
color?: string | null;
|
|
664
|
+
description?: string | null;
|
|
665
|
+
id: string;
|
|
666
|
+
name: string;
|
|
667
|
+
subcategories: Subcategory[];
|
|
668
|
+
}
|
|
669
|
+
type OptionItem = {
|
|
670
|
+
value: string;
|
|
671
|
+
label: string;
|
|
672
|
+
};
|
|
673
|
+
type ImageObjectType = {
|
|
674
|
+
uri: string;
|
|
675
|
+
type: string;
|
|
676
|
+
name: string;
|
|
677
|
+
};
|
|
678
|
+
interface ResourceConnectionsType {
|
|
679
|
+
events: EventListItemType[] | null;
|
|
680
|
+
vendors: VendorType[] | null;
|
|
681
|
+
}
|
|
682
|
+
interface CreateFormData<T extends FieldValues> {
|
|
683
|
+
control: Control<T, any>;
|
|
684
|
+
fields: T;
|
|
685
|
+
formState: FormState<T>;
|
|
686
|
+
handleSubmit: UseFormHandleSubmit<T, any>;
|
|
687
|
+
reset: UseFormReset<T>;
|
|
688
|
+
setValue: UseFormSetValue<T>;
|
|
689
|
+
watch: UseFormWatch<T>;
|
|
690
|
+
getValues: UseFormGetValues<T>;
|
|
691
|
+
}
|
|
692
|
+
interface UseGetResourcesByRegionOptions {
|
|
693
|
+
onlyClaimed?: boolean;
|
|
694
|
+
limit?: number;
|
|
695
|
+
offset?: number;
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
export { type GamePlacementClue as $, type AssociateType 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 DateTimeWithPriceType as M, type DeviceInfo as N, type OptionItem as O, type PostType as P, EnumGameStatus as Q, type RefundPolicy as R, type StallType as S, EnumGameType as T, type UseGetResourcesByRegionOptions as U, type VendorType as V, EnumPostContentType as W, type EventStatusType as X, type GameDate as Y, type GameHistory as Z, type GamePlacement as _, type FormDateField as a, type GameType as a0, type GeocodeLocation as a1, type GlobalGameData as a2, type ImageObjectType as a3, type LocationGeoType as a4, type Nullable as a5, type OwnerType as a6, PROMO_CODE_PREFIX as a7, type PaymentInfoType as a8, type PostContentData 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 PostContentFormData as aa, type PostContentGame as ab, type PostContentImage as ac, type PostContentList as ad, type PostContentTextarea as ae, type PostContentType as af, type PostContentVideo as ag, type PostFileInput as ah, type PostResource as ai, type PosterUsageType 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, EnumPostType as j, type GameLeaderboard as k, type VendorFormData as l, type CreateVendorFormData as m, type VendorInfoFormData as n, type CreateVendorInfoFormData as o, type UnregisteredVendorFormData as p, type CreateUnregisteredVendorFormData as q, type EventFormData as r, type CreateEventFormData as s, type EventInfoFormData as t, type CreateEventInfoFormData as u, type PostFormData as v, type CreatePostFormData as w, type Region as x, type BaseGameMap as y, type BaseGameType as z };
|