@timardex/cluemart-shared 1.5.741 → 1.5.742
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-CqfSmtG_.d.ts → ad-DTOtubs3.d.ts} +1 -1
- package/dist/{ad-sgD-lSbO.d.mts → ad-DpwV6VZX.d.mts} +1 -1
- package/dist/{chunk-7JDAKGGH.mjs → chunk-64ZADXXH.mjs} +2 -2
- package/dist/{chunk-VPYYAF3L.mjs → chunk-K5OWNJY5.mjs} +3 -3
- package/dist/chunk-K5OWNJY5.mjs.map +1 -0
- package/dist/{chunk-L5BYCXXP.mjs → chunk-KXQLOILF.mjs} +2 -2
- package/dist/{chunk-7VNXO63T.mjs → chunk-LNIT5OS3.mjs} +1 -1
- package/dist/chunk-LNIT5OS3.mjs.map +1 -0
- package/dist/{chunk-3AI2ROPT.mjs → chunk-TIXEG66V.mjs} +19 -1
- package/dist/chunk-TIXEG66V.mjs.map +1 -0
- package/dist/{contactUs-DA3p41Uq.d.ts → contactUs-BK5MKYPx.d.ts} +1 -1
- package/dist/{contactUs-B6lQQq-x.d.mts → contactUs-CRypzI-A.d.mts} +1 -1
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.d.mts +1 -1
- package/dist/formFields/index.d.ts +1 -1
- package/dist/formFields/index.mjs +3 -3
- package/dist/{global-BEUzBSyY.d.mts → global-q9JjONd1.d.mts} +280 -1
- package/dist/{global-585slmSH.d.ts → global-vWzQNI8w.d.ts} +280 -1
- package/dist/graphql/index.cjs +18 -0
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +3 -4
- package/dist/graphql/index.d.ts +3 -4
- package/dist/graphql/index.mjs +1 -1
- package/dist/hooks/index.cjs +18 -0
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +3 -4
- package/dist/hooks/index.d.ts +3 -4
- package/dist/hooks/index.mjs +5 -5
- package/dist/index.cjs +19 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +904 -900
- package/dist/index.d.ts +904 -900
- package/dist/index.mjs +19 -1
- package/dist/index.mjs.map +1 -1
- package/dist/{resourceActivities-CZqXBve8.d.mts → resourceActivities-CpjJeH23.d.mts} +1 -1
- package/dist/{resourceActivities-CjJdhVR7.d.ts → resourceActivities-DtxRUlrT.d.ts} +1 -1
- package/dist/sharing/index.cjs.map +1 -1
- package/dist/sharing/index.d.mts +1 -1
- package/dist/sharing/index.d.ts +1 -1
- package/dist/sharing/index.mjs +3 -3
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.mts +5 -6
- package/dist/types/index.d.ts +5 -6
- package/dist/types/index.mjs +1 -1
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.mts +1 -2
- package/dist/utils/index.d.ts +1 -2
- package/dist/utils/index.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-3AI2ROPT.mjs.map +0 -1
- package/dist/chunk-7VNXO63T.mjs.map +0 -1
- package/dist/chunk-VPYYAF3L.mjs.map +0 -1
- package/dist/post-CdLrXuH1.d.mts +0 -279
- package/dist/post-D6n4Vszs.d.ts +0 -279
- /package/dist/{chunk-7JDAKGGH.mjs.map → chunk-64ZADXXH.mjs.map} +0 -0
- /package/dist/{chunk-L5BYCXXP.mjs.map → chunk-KXQLOILF.mjs.map} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -322,1025 +322,1029 @@ type EventInfoType = Omit<EventInfoFormData, "_id"> & {
|
|
|
322
322
|
active?: boolean;
|
|
323
323
|
};
|
|
324
324
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
description?: string | null;
|
|
330
|
-
name: string;
|
|
331
|
-
price: number;
|
|
332
|
-
priceUnit: string;
|
|
333
|
-
productGroups?: string[] | null;
|
|
334
|
-
};
|
|
335
|
-
interface VendorFormData extends BaseResourceTypeFormData {
|
|
336
|
-
availability?: {
|
|
337
|
-
school: boolean;
|
|
338
|
-
private: boolean;
|
|
339
|
-
corporate: boolean;
|
|
340
|
-
};
|
|
341
|
-
claimed?: boolean;
|
|
342
|
-
calendar?: {
|
|
343
|
-
active?: boolean | null;
|
|
344
|
-
calendarData?: VendorCalendarData[] | null;
|
|
345
|
-
} | null;
|
|
346
|
-
categories: Category[];
|
|
347
|
-
foodTruck: boolean;
|
|
348
|
-
products?: {
|
|
349
|
-
active?: boolean | null;
|
|
350
|
-
productsList?: VendorProductList[] | null;
|
|
351
|
-
} | null;
|
|
352
|
-
unregisteredVendorId?: string | null;
|
|
353
|
-
vendorType: EnumVendorType;
|
|
325
|
+
declare enum EnumGameType {
|
|
326
|
+
DAILY_CLUE = "dailyClue",
|
|
327
|
+
MINI_QUIZ = "miniQuiz",
|
|
328
|
+
ODD_ONE_OUT = "oddOneOut"
|
|
354
329
|
}
|
|
355
|
-
type
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
isRequired: boolean;
|
|
330
|
+
type GameDate = {
|
|
331
|
+
startDate: Date;
|
|
332
|
+
endDate: Date;
|
|
359
333
|
};
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
foodBeverageLicense: boolean;
|
|
365
|
-
};
|
|
366
|
-
documents?: ResourceImageType[] | null;
|
|
367
|
-
documentsUpload?: ResourceImageType[] | null;
|
|
368
|
-
product: {
|
|
369
|
-
foodFlavors: EnumFoodFlavor[];
|
|
370
|
-
packaging: string[];
|
|
371
|
-
priceRange: {
|
|
372
|
-
max: string;
|
|
373
|
-
min: string;
|
|
374
|
-
};
|
|
375
|
-
producedIn: string[];
|
|
376
|
-
};
|
|
377
|
-
requirements?: {
|
|
378
|
-
electricity: VendorAttributes;
|
|
379
|
-
gazebo: VendorAttributes;
|
|
380
|
-
table: VendorAttributes;
|
|
381
|
-
};
|
|
382
|
-
stallInfo: {
|
|
383
|
-
size: {
|
|
384
|
-
depth: string;
|
|
385
|
-
width: string;
|
|
386
|
-
};
|
|
387
|
-
};
|
|
388
|
-
vendorId: string;
|
|
334
|
+
declare const gameTypeToDisplayName: Record<EnumGameType, string>;
|
|
335
|
+
type GlobalGameData = {
|
|
336
|
+
points: number;
|
|
337
|
+
streak: number;
|
|
389
338
|
};
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
339
|
+
|
|
340
|
+
declare const gameScreenIdentifierList: readonly [{
|
|
341
|
+
readonly clue: "Where your actions turn into a timeline.";
|
|
342
|
+
readonly id: "activities";
|
|
343
|
+
readonly match: "/profile/activities";
|
|
344
|
+
}, {
|
|
345
|
+
readonly clue: "Where conversations happen without speaking.";
|
|
346
|
+
readonly id: "chat";
|
|
347
|
+
readonly match: "/profile/chat";
|
|
348
|
+
}, {
|
|
349
|
+
readonly clue: "The place to redefine who you are.";
|
|
350
|
+
readonly id: "edit-profile";
|
|
351
|
+
readonly match: "/profile/edit-profile";
|
|
352
|
+
}, {
|
|
353
|
+
readonly clue: "A single moment worth showing up for.";
|
|
354
|
+
readonly id: "single-event";
|
|
355
|
+
readonly match: RegExp;
|
|
356
|
+
}, {
|
|
357
|
+
readonly clue: "What’s happening around you, right now.";
|
|
358
|
+
readonly id: "events-near-me";
|
|
359
|
+
readonly match: "/events/events-near-me";
|
|
360
|
+
}, {
|
|
361
|
+
readonly clue: "Where events appear as pins on a map.";
|
|
362
|
+
readonly id: "events-map";
|
|
363
|
+
readonly match: "/events/events-map";
|
|
364
|
+
}, {
|
|
365
|
+
readonly clue: "A collection of events worth attending.";
|
|
366
|
+
readonly id: "events";
|
|
367
|
+
readonly match: "/events";
|
|
368
|
+
}, {
|
|
369
|
+
readonly clue: "What’s happening in a wider area — not just nearby.";
|
|
370
|
+
readonly id: "events-region";
|
|
371
|
+
readonly match: RegExp;
|
|
372
|
+
}, {
|
|
373
|
+
readonly clue: "Where fun becomes a challenge.";
|
|
374
|
+
readonly id: "games";
|
|
375
|
+
readonly match: "/games";
|
|
376
|
+
}, {
|
|
377
|
+
readonly clue: "Your starting point for everything.";
|
|
378
|
+
readonly id: "home";
|
|
379
|
+
readonly match: "/";
|
|
380
|
+
}, {
|
|
381
|
+
readonly clue: "Where the app whispers what you shouldn’t miss.";
|
|
382
|
+
readonly id: "notifications";
|
|
383
|
+
readonly match: "/notifications";
|
|
384
|
+
}, {
|
|
385
|
+
readonly clue: "Where you fine-tune your experience.";
|
|
386
|
+
readonly id: "options";
|
|
387
|
+
readonly match: "/options";
|
|
388
|
+
}, {
|
|
389
|
+
readonly clue: "An organisation or creator supporting the community.";
|
|
390
|
+
readonly id: "single-partner";
|
|
391
|
+
readonly match: RegExp;
|
|
392
|
+
}, {
|
|
393
|
+
readonly clue: "Organisations and creators supporting the community.";
|
|
394
|
+
readonly id: "partners";
|
|
395
|
+
readonly match: "/partners";
|
|
396
|
+
}, {
|
|
397
|
+
readonly clue: "A single published post in full view.";
|
|
398
|
+
readonly id: "single-visitor-post";
|
|
399
|
+
readonly match: RegExp;
|
|
400
|
+
}, {
|
|
401
|
+
readonly clue: "Your identity, on display.";
|
|
402
|
+
readonly id: "profile";
|
|
403
|
+
readonly match: "/profile";
|
|
404
|
+
}, {
|
|
405
|
+
readonly clue: "One stallholder offering something valuable.";
|
|
406
|
+
readonly id: "single-vendor";
|
|
407
|
+
readonly match: RegExp;
|
|
408
|
+
}, {
|
|
409
|
+
readonly clue: "Where every stallholder waits under the right category.";
|
|
410
|
+
readonly id: "vendors";
|
|
411
|
+
readonly match: "/vendors";
|
|
412
|
+
}, {
|
|
413
|
+
readonly clue: "Where you browse articles and posts from around the platform.";
|
|
414
|
+
readonly id: "visitors";
|
|
415
|
+
readonly match: "/visitors";
|
|
416
|
+
}];
|
|
417
|
+
type GamePlacement = (typeof gameScreenIdentifierList)[number]["id"];
|
|
418
|
+
type GamePlacementClue = (typeof gameScreenIdentifierList)[number]["clue"];
|
|
419
|
+
type DailyClueBaseGame = {
|
|
420
|
+
gameDate: GameDate;
|
|
421
|
+
gameSolution: string;
|
|
413
422
|
};
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
type UnregisteredVendorType = Omit<UnregisteredVendorFormData, "dateTime" | "inviterId"> & {
|
|
425
|
-
_id: string;
|
|
426
|
-
active: boolean;
|
|
427
|
-
claimed: boolean;
|
|
428
|
-
claimedAt?: Date;
|
|
429
|
-
claimedByUserId?: string;
|
|
430
|
-
createdAt: Date;
|
|
431
|
-
deletedAt: Date | null;
|
|
432
|
-
invitations: UnregisteredVendorInvitationType[];
|
|
433
|
-
updatedAt: Date | null;
|
|
423
|
+
type DailyClueGameData = GlobalGameData & {
|
|
424
|
+
gameFields: DailyClueBaseGame;
|
|
425
|
+
lastFoundDate: Date | null;
|
|
426
|
+
letterInfo: {
|
|
427
|
+
collected: string[] | null;
|
|
428
|
+
solutionShuffled: string[];
|
|
429
|
+
todaysClue: GamePlacementClue | null;
|
|
430
|
+
todaysLetter: string | null;
|
|
431
|
+
todaysPlacement: GamePlacement | null;
|
|
432
|
+
};
|
|
434
433
|
};
|
|
435
434
|
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
435
|
+
type PuzzleAnswer = {
|
|
436
|
+
answerId: string;
|
|
437
|
+
answer: string;
|
|
438
|
+
correct: boolean;
|
|
440
439
|
};
|
|
441
|
-
type
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
brand: string;
|
|
446
|
-
deviceName: string;
|
|
447
|
-
installationId: string;
|
|
448
|
-
manufacturer: string;
|
|
449
|
-
modelName: string;
|
|
450
|
-
osName: string;
|
|
451
|
-
osVersion: string;
|
|
452
|
-
timestamp: string;
|
|
440
|
+
type PuzzleQuestion = {
|
|
441
|
+
answers: PuzzleAnswer[];
|
|
442
|
+
question: string;
|
|
443
|
+
questionId: string;
|
|
453
444
|
};
|
|
454
|
-
|
|
455
|
-
|
|
445
|
+
/**
|
|
446
|
+
* Stores only the answerId and the questionId of the selected answer.
|
|
447
|
+
*/
|
|
448
|
+
type PuzzleAnsweredQuestion = {
|
|
449
|
+
selectedAnswerId: string;
|
|
450
|
+
questionId: string;
|
|
456
451
|
};
|
|
457
|
-
type
|
|
458
|
-
|
|
459
|
-
landlinePhone?: string | null;
|
|
460
|
-
mobilePhone?: string | null;
|
|
452
|
+
type PuzzleBaseGame = {
|
|
453
|
+
questions: PuzzleQuestion[];
|
|
461
454
|
};
|
|
462
|
-
type
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
455
|
+
type PuzzleGameData = GlobalGameData & {
|
|
456
|
+
gameFields: PuzzleBaseGame;
|
|
457
|
+
/**
|
|
458
|
+
* Stores user answers only.
|
|
459
|
+
* Never store correctness from client.
|
|
460
|
+
*/
|
|
461
|
+
answeredQuestions: PuzzleAnsweredQuestion[];
|
|
466
462
|
};
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
463
|
+
|
|
464
|
+
type BaseGameMap = {
|
|
465
|
+
[EnumGameType.DAILY_CLUE]: DailyClueBaseGame;
|
|
466
|
+
[EnumGameType.MINI_QUIZ]: PuzzleBaseGame;
|
|
467
|
+
[EnumGameType.ODD_ONE_OUT]: PuzzleBaseGame;
|
|
470
468
|
};
|
|
471
|
-
type
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
469
|
+
type BaseGameType = {
|
|
470
|
+
gameType: EnumGameType;
|
|
471
|
+
gameTypeId: string;
|
|
472
|
+
gameTitle: string;
|
|
473
|
+
} & {
|
|
474
|
+
[K in keyof BaseGameMap]?: BaseGameMap[K] | null;
|
|
476
475
|
};
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
476
|
+
declare enum EnumGameStatus {
|
|
477
|
+
GAME_COMPLETED = "GAME_COMPLETED",
|
|
478
|
+
GAME_IN_PROGRESS = "GAME_IN_PROGRESS",
|
|
479
|
+
GAME_LEFT = "GAME_LEFT",
|
|
480
|
+
GAME_STARTED = "GAME_STARTED"
|
|
481
|
+
}
|
|
482
|
+
type GameHistory = Pick<BaseGameType, "gameTitle" | "gameType" | "gameTypeId"> & {
|
|
483
|
+
createdAt: Date;
|
|
484
|
+
gameDate: GameDate;
|
|
485
|
+
gameStatus: EnumGameStatus;
|
|
486
|
+
/** Per-event delta. Not persisted for overallGamePoints (computed at read time). */
|
|
487
|
+
pointsEarned: number;
|
|
488
|
+
/** Running total for this game instance; computed at read time, not stored in Mongo. */
|
|
489
|
+
overallGamePoints?: number;
|
|
482
490
|
};
|
|
483
|
-
type
|
|
484
|
-
|
|
485
|
-
|
|
491
|
+
type GameDataMap = {
|
|
492
|
+
[EnumGameType.DAILY_CLUE]: DailyClueGameData;
|
|
493
|
+
[EnumGameType.MINI_QUIZ]: PuzzleGameData;
|
|
494
|
+
[EnumGameType.ODD_ONE_OUT]: PuzzleGameData;
|
|
486
495
|
};
|
|
487
|
-
|
|
488
|
-
|
|
496
|
+
type GameDataType = {
|
|
497
|
+
[K in keyof GameDataMap]?: GameDataMap[K] | null;
|
|
498
|
+
};
|
|
499
|
+
type GameType = Pick<BaseGameType, "gameTitle" | "gameType" | "gameTypeId"> & {
|
|
500
|
+
_id: string;
|
|
489
501
|
active: boolean;
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
description: string;
|
|
495
|
-
images?: ResourceImageType[] | null;
|
|
496
|
-
imagesUpload?: ResourceImageType[] | null;
|
|
497
|
-
logo?: ResourceImageType | null;
|
|
498
|
-
logoUpload?: ResourceImageType | null;
|
|
499
|
-
name: string;
|
|
500
|
-
owner?: OwnerType | null;
|
|
501
|
-
promoCodes?: PromoCodeType[] | null;
|
|
502
|
-
region: string;
|
|
503
|
-
socialMedia: SocialMediaType[] | null;
|
|
504
|
-
termsAgreement?: TermsAgreement | null;
|
|
505
|
-
}
|
|
506
|
-
type PosterUsageType = {
|
|
507
|
-
month: string;
|
|
508
|
-
count: number;
|
|
502
|
+
createdAt: Date;
|
|
503
|
+
gameData: GameDataType;
|
|
504
|
+
gameHistory: GameHistory[] | null;
|
|
505
|
+
updatedAt: Date | null;
|
|
509
506
|
};
|
|
510
|
-
type
|
|
507
|
+
type GameDocType = {
|
|
511
508
|
_id: string;
|
|
512
|
-
|
|
509
|
+
active: boolean;
|
|
513
510
|
createdAt: Date;
|
|
514
511
|
deletedAt: Date | null;
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
512
|
+
games: GameType[] | null;
|
|
513
|
+
owner: OwnerType;
|
|
514
|
+
points: number;
|
|
518
515
|
updatedAt: Date | null;
|
|
519
516
|
};
|
|
520
|
-
type
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
type LocationType = {
|
|
525
|
-
city: string;
|
|
526
|
-
country: string;
|
|
527
|
-
fullAddress: string;
|
|
528
|
-
geo: LocationGeoType;
|
|
529
|
-
latitude: number;
|
|
530
|
-
longitude: number;
|
|
531
|
-
region: string;
|
|
532
|
-
};
|
|
533
|
-
type DateTimeType = {
|
|
534
|
-
dateStatus: EnumEventDateStatus;
|
|
535
|
-
endDate: string;
|
|
536
|
-
endTime: string;
|
|
537
|
-
startDate: string;
|
|
538
|
-
startTime: string;
|
|
539
|
-
};
|
|
540
|
-
type Region = {
|
|
541
|
-
latitude: number;
|
|
542
|
-
latitudeDelta: number;
|
|
543
|
-
longitude: number;
|
|
544
|
-
longitudeDelta: number;
|
|
545
|
-
};
|
|
546
|
-
type ResourceDetails = {
|
|
547
|
-
dateTime: DateTimeType[] | null;
|
|
548
|
-
description: string | null;
|
|
549
|
-
eventStatus?: EventStatusType | null;
|
|
550
|
-
location: LocationType | null;
|
|
551
|
-
resourceCover: ResourceImageType | null;
|
|
552
|
-
resourceId: string;
|
|
553
|
-
resourceLogo: ResourceImageType | null;
|
|
554
|
-
resourceName: string;
|
|
555
|
-
resourceType: EnumResourceType;
|
|
556
|
-
};
|
|
557
|
-
type GeocodeLocation = Pick<LocationType, "latitude" | "longitude">;
|
|
558
|
-
type EventStatusType = {
|
|
559
|
-
claimed: boolean;
|
|
560
|
-
eventType: EnumEventType;
|
|
561
|
-
googlePlaceId?: string | null;
|
|
517
|
+
type GameLeaderboard = {
|
|
518
|
+
gameHistory: GameHistory[] | null;
|
|
519
|
+
overallPoints: number;
|
|
520
|
+
owner: OwnerType;
|
|
562
521
|
};
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
name: string;
|
|
569
|
-
placeholder: string;
|
|
570
|
-
required?: boolean;
|
|
571
|
-
secureTextEntry?: boolean;
|
|
572
|
-
}
|
|
573
|
-
interface FormDateField {
|
|
574
|
-
dateMode: "date" | "time";
|
|
575
|
-
helperText?: string;
|
|
576
|
-
name: "endDate" | "endTime" | "startDate" | "startTime";
|
|
577
|
-
placeholder: string;
|
|
578
|
-
}
|
|
579
|
-
interface SubcategoryItems {
|
|
580
|
-
id: string;
|
|
581
|
-
name: string;
|
|
582
|
-
description?: string | null;
|
|
583
|
-
}
|
|
584
|
-
interface Subcategory {
|
|
585
|
-
id: string;
|
|
586
|
-
name: string;
|
|
587
|
-
items?: SubcategoryItems[] | null;
|
|
522
|
+
|
|
523
|
+
declare enum EnumPostType {
|
|
524
|
+
MARKET_FACES = "market_faces",
|
|
525
|
+
CLUE_BITES = "clue_bites",
|
|
526
|
+
PLAY_AND_WIN = "play_and_win"
|
|
588
527
|
}
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
528
|
+
declare enum EnumPostContentType {
|
|
529
|
+
GAME = "game",
|
|
530
|
+
IMAGE = "image",
|
|
531
|
+
LIST = "list",
|
|
532
|
+
TEXTAREA = "textarea",
|
|
533
|
+
VIDEO = "video"
|
|
595
534
|
}
|
|
596
|
-
type
|
|
597
|
-
|
|
598
|
-
|
|
535
|
+
type PostFileInput = {
|
|
536
|
+
source: File;
|
|
537
|
+
title?: string;
|
|
599
538
|
};
|
|
600
|
-
type
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
539
|
+
type PostContentTextarea = {
|
|
540
|
+
textarea: {
|
|
541
|
+
title?: string;
|
|
542
|
+
data: string;
|
|
543
|
+
};
|
|
604
544
|
};
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
}
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
offset?: number;
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
declare const vendorBasicInfoFields: FormField[];
|
|
626
|
-
declare const vendorFullAddress: FormField;
|
|
627
|
-
declare const vendorStartDateFields: FormDateField[];
|
|
628
|
-
declare const vendorEndDateFields: FormDateField[];
|
|
629
|
-
declare const vendorAvailability: FormField[];
|
|
630
|
-
declare const vendorLocationDescription: FormField;
|
|
631
|
-
declare const vendorMenuFields: FormField[];
|
|
632
|
-
declare const productLabelGroups: {
|
|
633
|
-
category: string;
|
|
634
|
-
items: {
|
|
635
|
-
abbreviation: string;
|
|
636
|
-
fullName: string;
|
|
637
|
-
}[];
|
|
638
|
-
}[];
|
|
639
|
-
declare const priceUnits: OptionItem[];
|
|
640
|
-
|
|
641
|
-
interface AdminUpdateResourceType {
|
|
642
|
-
active: boolean;
|
|
643
|
-
resourceId: string;
|
|
644
|
-
resourceType: EnumResourceType;
|
|
645
|
-
}
|
|
646
|
-
|
|
647
|
-
type UserFormData = {
|
|
648
|
-
_id?: string;
|
|
649
|
-
active: boolean;
|
|
650
|
-
avatar?: ResourceImageType | null;
|
|
651
|
-
avatarUpload?: ResourceImageType | null;
|
|
652
|
-
confirmPassword?: string | null;
|
|
653
|
-
email: string;
|
|
654
|
-
firstName: string;
|
|
655
|
-
isTester: boolean;
|
|
656
|
-
lastName: string;
|
|
657
|
-
location?: LocationType | null;
|
|
658
|
-
password?: string | null;
|
|
659
|
-
platform?: EnumOSPlatform;
|
|
660
|
-
preferredRegion: string;
|
|
661
|
-
role: EnumUserRole;
|
|
662
|
-
termsAgreement?: TermsAgreement | null;
|
|
545
|
+
type PostContentImage = {
|
|
546
|
+
images: ResourceImageType[] | null;
|
|
547
|
+
imagesUpload?: PostFileInput[] | null;
|
|
548
|
+
};
|
|
549
|
+
type PostContentVideo = {
|
|
550
|
+
video: {
|
|
551
|
+
source: string;
|
|
552
|
+
title?: string;
|
|
553
|
+
};
|
|
554
|
+
};
|
|
555
|
+
type PostContentList = {
|
|
556
|
+
list: {
|
|
557
|
+
title?: string;
|
|
558
|
+
items: {
|
|
559
|
+
text: string;
|
|
560
|
+
}[];
|
|
561
|
+
};
|
|
663
562
|
};
|
|
664
|
-
type
|
|
665
|
-
|
|
666
|
-
resourceId: string;
|
|
667
|
-
dateTime: DateTimeType;
|
|
563
|
+
type PostContentGame = {
|
|
564
|
+
game: BaseGameType;
|
|
668
565
|
};
|
|
669
|
-
type
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
startDate?: string;
|
|
675
|
-
endDate?: string;
|
|
566
|
+
type PostContentData = PostContentGame | PostContentTextarea | PostContentImage | PostContentVideo | PostContentList;
|
|
567
|
+
type PostContentFormData = {
|
|
568
|
+
contentData?: PostContentData | null;
|
|
569
|
+
contentOrder?: number | null;
|
|
570
|
+
contentType?: EnumPostContentType | null;
|
|
676
571
|
};
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
572
|
+
interface PostFormData {
|
|
573
|
+
active: boolean;
|
|
574
|
+
caption: string;
|
|
575
|
+
content: PostContentFormData[];
|
|
576
|
+
cover?: ResourceImageType | null;
|
|
577
|
+
coverUpload?: PostFileInput | null;
|
|
578
|
+
postType: EnumPostType;
|
|
579
|
+
resource?: {
|
|
580
|
+
resourceId: string;
|
|
581
|
+
resourceType: EnumResourceType;
|
|
582
|
+
resourceRegion: string;
|
|
583
|
+
} | null;
|
|
584
|
+
tags?: string[] | null;
|
|
585
|
+
title: string;
|
|
586
|
+
notifyUsers?: boolean | null;
|
|
587
|
+
}
|
|
588
|
+
type CreatePostFormData = CreateFormData<PostFormData>;
|
|
589
|
+
type PostContentType = Omit<PostContentFormData, "contentData"> & {
|
|
590
|
+
contentData: Omit<PostContentData, "imagesUpload">;
|
|
682
591
|
};
|
|
683
|
-
type
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
currency: string;
|
|
690
|
-
formattedBasePrice: string;
|
|
691
|
-
formattedDiscountedPrice: string | null;
|
|
592
|
+
type PostType = Omit<PostFormData, "content" | "coverUpload"> & {
|
|
593
|
+
_id: string;
|
|
594
|
+
content: PostContentType[];
|
|
595
|
+
createdAt: Date;
|
|
596
|
+
deletedAt: Date | null;
|
|
597
|
+
updatedAt: Date | null;
|
|
692
598
|
};
|
|
693
|
-
|
|
599
|
+
|
|
600
|
+
type VendorCalendarData = Omit<ResourceDetails, "dateTime" | "eventStatus"> & {
|
|
601
|
+
dateTime: DateTimeType;
|
|
602
|
+
};
|
|
603
|
+
type VendorProductList = {
|
|
604
|
+
description?: string | null;
|
|
694
605
|
name: string;
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
stripeProductId: string;
|
|
699
|
-
stripePriceId: string;
|
|
700
|
-
isEligibleForDiscount: boolean;
|
|
701
|
-
pricing: SubscriptionPricingData;
|
|
606
|
+
price: number;
|
|
607
|
+
priceUnit: string;
|
|
608
|
+
productGroups?: string[] | null;
|
|
702
609
|
};
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
610
|
+
interface VendorFormData extends BaseResourceTypeFormData {
|
|
611
|
+
availability?: {
|
|
612
|
+
school: boolean;
|
|
613
|
+
private: boolean;
|
|
614
|
+
corporate: boolean;
|
|
615
|
+
};
|
|
616
|
+
claimed?: boolean;
|
|
617
|
+
calendar?: {
|
|
618
|
+
active?: boolean | null;
|
|
619
|
+
calendarData?: VendorCalendarData[] | null;
|
|
620
|
+
} | null;
|
|
621
|
+
categories: Category[];
|
|
622
|
+
foodTruck: boolean;
|
|
623
|
+
products?: {
|
|
624
|
+
active?: boolean | null;
|
|
625
|
+
productsList?: VendorProductList[] | null;
|
|
626
|
+
} | null;
|
|
627
|
+
unregisteredVendorId?: string | null;
|
|
628
|
+
vendorType: EnumVendorType;
|
|
629
|
+
}
|
|
630
|
+
type CreateVendorFormData = CreateFormData<VendorFormData>;
|
|
631
|
+
type VendorAttributes = {
|
|
632
|
+
details?: string | null;
|
|
633
|
+
isRequired: boolean;
|
|
708
634
|
};
|
|
709
|
-
type
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
635
|
+
type VendorInfoFormData = {
|
|
636
|
+
_id?: string;
|
|
637
|
+
compliance?: {
|
|
638
|
+
liabilityInsurance: boolean;
|
|
639
|
+
foodBeverageLicense: boolean;
|
|
714
640
|
};
|
|
715
|
-
|
|
716
|
-
|
|
641
|
+
documents?: ResourceImageType[] | null;
|
|
642
|
+
documentsUpload?: ResourceImageType[] | null;
|
|
643
|
+
product: {
|
|
644
|
+
foodFlavors: EnumFoodFlavor[];
|
|
645
|
+
packaging: string[];
|
|
646
|
+
priceRange: {
|
|
647
|
+
max: string;
|
|
648
|
+
min: string;
|
|
649
|
+
};
|
|
650
|
+
producedIn: string[];
|
|
717
651
|
};
|
|
718
|
-
|
|
719
|
-
|
|
652
|
+
requirements?: {
|
|
653
|
+
electricity: VendorAttributes;
|
|
654
|
+
gazebo: VendorAttributes;
|
|
655
|
+
table: VendorAttributes;
|
|
720
656
|
};
|
|
721
|
-
|
|
722
|
-
|
|
657
|
+
stallInfo: {
|
|
658
|
+
size: {
|
|
659
|
+
depth: string;
|
|
660
|
+
width: string;
|
|
661
|
+
};
|
|
723
662
|
};
|
|
663
|
+
vendorId: string;
|
|
724
664
|
};
|
|
725
|
-
type
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
};
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
665
|
+
type CreateVendorInfoFormData = CreateFormData<VendorInfoFormData>;
|
|
666
|
+
interface VendorType extends BaseResourceType {
|
|
667
|
+
availability?: {
|
|
668
|
+
school: boolean;
|
|
669
|
+
private: boolean;
|
|
670
|
+
corporate: boolean;
|
|
671
|
+
};
|
|
672
|
+
claimed: boolean;
|
|
673
|
+
calendar: VendorFormData["calendar"] | null;
|
|
674
|
+
categories: VendorFormData["categories"];
|
|
675
|
+
foodTruck: boolean;
|
|
676
|
+
products: VendorFormData["products"] | null;
|
|
677
|
+
vendorInfoId: string;
|
|
678
|
+
vendorType: EnumVendorType;
|
|
679
|
+
relations: {
|
|
680
|
+
relationId: string | null;
|
|
681
|
+
relationDates: RelationDate[] | null;
|
|
682
|
+
}[] | null;
|
|
683
|
+
unregisteredVendorId?: string | null;
|
|
684
|
+
}
|
|
685
|
+
type VendorInfoType = Omit<VendorInfoFormData, "_id" | "documentsUpload"> & {
|
|
686
|
+
_id: string;
|
|
687
|
+
active?: boolean;
|
|
736
688
|
};
|
|
737
|
-
|
|
689
|
+
interface UnregisteredVendorFormData {
|
|
690
|
+
categoryIds: string[];
|
|
691
|
+
dateTime: DateTimeType[];
|
|
692
|
+
email?: string | null;
|
|
693
|
+
inviterId: string;
|
|
694
|
+
name: string;
|
|
695
|
+
region: string;
|
|
696
|
+
}
|
|
697
|
+
type CreateUnregisteredVendorFormData = CreateFormData<UnregisteredVendorFormData>;
|
|
698
|
+
type UnregisteredVendorInvitationType = Pick<UnregisteredVendorFormData, "dateTime" | "inviterId">;
|
|
699
|
+
type UnregisteredVendorType = Omit<UnregisteredVendorFormData, "dateTime" | "inviterId"> & {
|
|
738
700
|
_id: string;
|
|
739
|
-
|
|
701
|
+
active: boolean;
|
|
702
|
+
claimed: boolean;
|
|
703
|
+
claimedAt?: Date;
|
|
704
|
+
claimedByUserId?: string;
|
|
740
705
|
createdAt: Date;
|
|
741
706
|
deletedAt: Date | null;
|
|
742
|
-
|
|
743
|
-
game: string | null;
|
|
744
|
-
licences: UserLicenceType[] | null;
|
|
745
|
-
overallPoints: number | null;
|
|
746
|
-
partner: string | null;
|
|
747
|
-
promoCodes?: PromoCodeType[] | null;
|
|
748
|
-
redeemedRewards?: RedeemedReward[] | null;
|
|
749
|
-
refreshToken: string | null;
|
|
750
|
-
school: string | null;
|
|
751
|
-
stripe?: StripeSubscription;
|
|
707
|
+
invitations: UnregisteredVendorInvitationType[];
|
|
752
708
|
updatedAt: Date | null;
|
|
753
|
-
userActivity: UserActivity | null;
|
|
754
|
-
vendor: string | null;
|
|
755
|
-
};
|
|
756
|
-
type SafeUserType = Omit<UserType, "password" | "refreshToken">;
|
|
757
|
-
type ResourceByUser = {
|
|
758
|
-
_id: string;
|
|
759
|
-
active: boolean;
|
|
760
|
-
logo: string;
|
|
761
|
-
name: string;
|
|
762
|
-
resourceType: EnumResourceType;
|
|
763
709
|
};
|
|
764
710
|
|
|
765
|
-
declare
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
type LoginFormData = {
|
|
770
|
-
email: string;
|
|
771
|
-
isAdminPage?: boolean;
|
|
772
|
-
password: string;
|
|
773
|
-
platform?: EnumOSPlatform;
|
|
774
|
-
};
|
|
775
|
-
type CreateLoginFormData = CreateFormData<LoginFormData>;
|
|
776
|
-
type RegisterFormData = {
|
|
777
|
-
email: string;
|
|
778
|
-
firstName: string;
|
|
779
|
-
lastName: string;
|
|
780
|
-
password: string;
|
|
781
|
-
platform?: EnumOSPlatform;
|
|
782
|
-
preferredRegion: string;
|
|
783
|
-
promoCode?: PromoCodeType | null;
|
|
784
|
-
termsAgreement?: TermsAgreement | null;
|
|
785
|
-
};
|
|
786
|
-
type CreateRegisterFormData = CreateFormData<RegisterFormData>;
|
|
787
|
-
type RequestPasswordResetFormData = {
|
|
788
|
-
email: string;
|
|
711
|
+
declare const PROMO_CODE_PREFIX = "CM-";
|
|
712
|
+
type PromoCodeType = `${typeof PROMO_CODE_PREFIX}${string}`;
|
|
713
|
+
type Nullable<T> = {
|
|
714
|
+
[K in keyof T]: T[K] | null | undefined;
|
|
789
715
|
};
|
|
790
|
-
type
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
716
|
+
type DeviceInfo = {
|
|
717
|
+
appBuildNumber: string;
|
|
718
|
+
appId: string;
|
|
719
|
+
appVersion: string;
|
|
720
|
+
brand: string;
|
|
721
|
+
deviceName: string;
|
|
722
|
+
installationId: string;
|
|
723
|
+
manufacturer: string;
|
|
724
|
+
modelName: string;
|
|
725
|
+
osName: string;
|
|
726
|
+
osVersion: string;
|
|
727
|
+
timestamp: string;
|
|
795
728
|
};
|
|
796
|
-
type
|
|
797
|
-
|
|
798
|
-
email: string;
|
|
799
|
-
verificationToken: string;
|
|
800
|
-
verificationType?: EnumVerificationType;
|
|
729
|
+
type TermsAgreement = DeviceInfo & {
|
|
730
|
+
termVersion: string;
|
|
801
731
|
};
|
|
802
|
-
type
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
refreshToken: string | null;
|
|
807
|
-
user: SafeUserType;
|
|
732
|
+
type ResourceContactDetailsType = {
|
|
733
|
+
email?: string | null;
|
|
734
|
+
landlinePhone?: string | null;
|
|
735
|
+
mobilePhone?: string | null;
|
|
808
736
|
};
|
|
809
|
-
type
|
|
810
|
-
|
|
811
|
-
|
|
737
|
+
type ResourceImageType = {
|
|
738
|
+
active?: boolean | null;
|
|
739
|
+
source: string;
|
|
740
|
+
title: string;
|
|
812
741
|
};
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
isAssociate?: boolean | null;
|
|
817
|
-
userAvatar: string | null;
|
|
818
|
-
userEmail: string;
|
|
819
|
-
userId: string;
|
|
820
|
-
userName: string;
|
|
742
|
+
type SocialMediaType = {
|
|
743
|
+
name?: EnumSocialMedia;
|
|
744
|
+
link?: string;
|
|
821
745
|
};
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
type ChatMessageReplyPreview = {
|
|
828
|
-
senderId: string;
|
|
829
|
-
senderName: string;
|
|
830
|
-
contentPreview: string;
|
|
746
|
+
type UserLicenceType = {
|
|
747
|
+
expiryDate: Date;
|
|
748
|
+
issuedDate: Date;
|
|
749
|
+
licenceType: EnumUserLicence;
|
|
750
|
+
prevLicenceType?: EnumUserLicence | null;
|
|
831
751
|
};
|
|
832
|
-
type
|
|
833
|
-
|
|
834
|
-
|
|
752
|
+
type AssociateType = {
|
|
753
|
+
email: string;
|
|
754
|
+
resourceId: string;
|
|
755
|
+
resourceType: EnumResourceType;
|
|
756
|
+
licence: UserLicenceType;
|
|
835
757
|
};
|
|
836
|
-
type
|
|
758
|
+
type OwnerType = {
|
|
759
|
+
email: string;
|
|
837
760
|
userId: string;
|
|
838
|
-
seenAt: Date;
|
|
839
761
|
};
|
|
840
|
-
interface
|
|
762
|
+
interface BaseResourceTypeFormData {
|
|
841
763
|
_id?: string;
|
|
842
|
-
content: string;
|
|
843
|
-
createdAt?: Date;
|
|
844
|
-
replyToMessageId?: string | null;
|
|
845
|
-
replyPreview?: ChatMessageReplyPreview | null;
|
|
846
|
-
likedBy?: ChatMessageReaction[];
|
|
847
|
-
senderId: string;
|
|
848
|
-
seenBy?: ChatMessageSeen[];
|
|
849
|
-
updatedAt?: Date;
|
|
850
|
-
}
|
|
851
|
-
interface ChatType {
|
|
852
|
-
_id: string;
|
|
853
764
|
active: boolean;
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
765
|
+
associates: AssociateType[] | null;
|
|
766
|
+
contactDetails: ResourceContactDetailsType | null;
|
|
767
|
+
cover: ResourceImageType;
|
|
768
|
+
coverUpload?: ResourceImageType | null;
|
|
769
|
+
description: string;
|
|
770
|
+
images?: ResourceImageType[] | null;
|
|
771
|
+
imagesUpload?: ResourceImageType[] | null;
|
|
772
|
+
logo?: ResourceImageType | null;
|
|
773
|
+
logoUpload?: ResourceImageType | null;
|
|
774
|
+
name: string;
|
|
775
|
+
owner?: OwnerType | null;
|
|
776
|
+
promoCodes?: PromoCodeType[] | null;
|
|
777
|
+
region: string;
|
|
778
|
+
socialMedia: SocialMediaType[] | null;
|
|
779
|
+
termsAgreement?: TermsAgreement | null;
|
|
863
780
|
}
|
|
864
|
-
|
|
781
|
+
type PosterUsageType = {
|
|
782
|
+
month: string;
|
|
783
|
+
count: number;
|
|
784
|
+
};
|
|
785
|
+
type BaseResourceType = Omit<BaseResourceTypeFormData, "_id" | "coverUpload" | "imagesUpload" | "logoUpload"> & {
|
|
865
786
|
_id: string;
|
|
866
|
-
|
|
787
|
+
adIds?: string[] | null;
|
|
867
788
|
createdAt: Date;
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
reportedUserId: string;
|
|
873
|
-
reporterUserId: string;
|
|
874
|
-
resolved: boolean;
|
|
789
|
+
deletedAt: Date | null;
|
|
790
|
+
posterUsage?: PosterUsageType | null;
|
|
791
|
+
rating?: number | null;
|
|
792
|
+
reviewCount?: number | null;
|
|
875
793
|
updatedAt: Date | null;
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
firstName: string;
|
|
881
|
-
lastName: string;
|
|
882
|
-
message: string;
|
|
794
|
+
relatedPost?: {
|
|
795
|
+
postId: string;
|
|
796
|
+
postType: EnumPostType;
|
|
797
|
+
} | null;
|
|
883
798
|
};
|
|
884
|
-
type
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
resourceId: string;
|
|
888
|
-
resourceName: string;
|
|
889
|
-
resourceType: EnumNotificationResourceType;
|
|
890
|
-
}
|
|
891
|
-
type NotificationType = {
|
|
892
|
-
_id: string;
|
|
893
|
-
userId: string;
|
|
894
|
-
title: string;
|
|
895
|
-
message: string;
|
|
896
|
-
isRead: boolean;
|
|
897
|
-
type: EnumNotificationType;
|
|
898
|
-
data: NotificationDataType | null;
|
|
899
|
-
createdAt: Date;
|
|
900
|
-
updatedAt: Date;
|
|
799
|
+
type LocationGeoType = {
|
|
800
|
+
coordinates: number[];
|
|
801
|
+
type: "Point";
|
|
901
802
|
};
|
|
902
|
-
type
|
|
903
|
-
|
|
904
|
-
|
|
803
|
+
type LocationType = {
|
|
804
|
+
city: string;
|
|
805
|
+
country: string;
|
|
806
|
+
fullAddress: string;
|
|
807
|
+
geo: LocationGeoType;
|
|
808
|
+
latitude: number;
|
|
809
|
+
longitude: number;
|
|
810
|
+
region: string;
|
|
905
811
|
};
|
|
906
|
-
type
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
812
|
+
type DateTimeType = {
|
|
813
|
+
dateStatus: EnumEventDateStatus;
|
|
814
|
+
endDate: string;
|
|
815
|
+
endTime: string;
|
|
816
|
+
startDate: string;
|
|
817
|
+
startTime: string;
|
|
912
818
|
};
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
* `images/node` reads this at runtime for `getSharedImagePath` allow-listing.
|
|
926
|
-
*/
|
|
927
|
-
declare const cluiIds: readonly ["cluiTui", "sima", "tablas", "telefonos", "ugralos"];
|
|
928
|
-
declare const cluiFiles: { readonly [K in (typeof cluiIds)[number]]: `${K}${typeof IMAGE_EXTENSION}`; };
|
|
929
|
-
declare const iconIds: readonly ["apple-maps-icon", "facebook", "google-maps-icon", "instagram", "meet", "poll", "tiktok", "tip", "waze-maps-icon", "website", "youtube"];
|
|
930
|
-
declare const iconFiles: { readonly [K in (typeof iconIds)[number]]: `${K}${typeof IMAGE_EXTENSION}`; };
|
|
931
|
-
declare const badgeIds: readonly ["corporate", "private", "school"];
|
|
932
|
-
declare const badgeFiles: { readonly [K in (typeof badgeIds)[number]]: `${K}${typeof IMAGE_EXTENSION}`; };
|
|
933
|
-
declare const logoIds: readonly ["googleMaps-logo-dark", "googleMaps-logo-light", "logo-atr", "logo-dark", "logo"];
|
|
934
|
-
declare const logoFiles: { readonly [K in (typeof logoIds)[number]]: `${K}${typeof IMAGE_EXTENSION}`; };
|
|
935
|
-
declare const otherImagesIds: readonly ["banner-horizontal", "banner-vertical", "gazebo-top", "qr-code", "store-android", "store-ios"];
|
|
936
|
-
declare const otherImagesFiles: { readonly [K in (typeof otherImagesIds)[number]]: `${K}${typeof IMAGE_EXTENSION}`; };
|
|
937
|
-
/**
|
|
938
|
-
* Module specifiers for each poster (not resolved file URLs). Use a static import or require with these paths
|
|
939
|
-
* so your bundler resolves the file, e.g.
|
|
940
|
-
* `import poster1 from "@timardex/cluemart-shared/images/poster1.webp"`
|
|
941
|
-
* or `require("@timardex/cluemart-shared/images/poster1.webp")` (React Native / Metro).
|
|
942
|
-
*
|
|
943
|
-
* Derived from `posterFiles` so keys and filenames stay aligned.
|
|
944
|
-
*/
|
|
945
|
-
declare const posters: { readonly [K in keyof typeof posterFiles]: `${typeof PKG}/images/${(typeof posterFiles)[K]}`; };
|
|
946
|
-
/**
|
|
947
|
-
* Module specifiers for Clui assets (same flat `@…/images/<file>.webp` pattern as posters), e.g.
|
|
948
|
-
* `import clui from "@timardex/cluemart-shared/images/cluiTui.webp"`.
|
|
949
|
-
*/
|
|
950
|
-
declare const cluiImages: { readonly [K in keyof typeof cluiFiles]: `${typeof PKG}/images/${(typeof cluiFiles)[K]}`; };
|
|
951
|
-
declare const icons: { readonly [K in keyof typeof iconFiles]: `${typeof PKG}/images/${(typeof iconFiles)[K]}`; };
|
|
952
|
-
declare const badges: { readonly [K in keyof typeof badgeFiles]: `${typeof PKG}/images/${(typeof badgeFiles)[K]}`; };
|
|
953
|
-
declare const logos: { readonly [K in keyof typeof logoFiles]: `${typeof PKG}/images/${(typeof logoFiles)[K]}`; };
|
|
954
|
-
declare const otherImages: { readonly [K in keyof typeof otherImagesFiles]: `${typeof PKG}/images/${(typeof otherImagesFiles)[K]}`; };
|
|
955
|
-
type PosterAssetId = keyof typeof posters;
|
|
956
|
-
/** A single filename under the shared images directory (values of `posterFiles`). */
|
|
957
|
-
type PosterImageBasename = (typeof posterFiles)[PosterAssetId];
|
|
958
|
-
type CluiImageId = keyof typeof cluiImages;
|
|
959
|
-
/** Basename under the shared images directory (values of `cluiFiles`). */
|
|
960
|
-
type CluiImageBasename = (typeof cluiFiles)[CluiImageId];
|
|
961
|
-
type IconId = keyof typeof icons;
|
|
962
|
-
type IconBasename = (typeof iconFiles)[IconId];
|
|
963
|
-
type BadgeId = keyof typeof badges;
|
|
964
|
-
type BadgeBasename = (typeof badgeFiles)[BadgeId];
|
|
965
|
-
type LogoId = keyof typeof logos;
|
|
966
|
-
type LogoBasename = (typeof logoFiles)[LogoId];
|
|
967
|
-
type OtherImagesId = keyof typeof otherImages;
|
|
968
|
-
type OtherImagesBasename = (typeof otherImagesFiles)[OtherImagesId];
|
|
969
|
-
|
|
970
|
-
interface PosterInputType {
|
|
971
|
-
description: string;
|
|
972
|
-
posterName: PosterAssetId;
|
|
819
|
+
type Region = {
|
|
820
|
+
latitude: number;
|
|
821
|
+
latitudeDelta: number;
|
|
822
|
+
longitude: number;
|
|
823
|
+
longitudeDelta: number;
|
|
824
|
+
};
|
|
825
|
+
type ResourceDetails = {
|
|
826
|
+
dateTime: DateTimeType[] | null;
|
|
827
|
+
description: string | null;
|
|
828
|
+
eventStatus?: EventStatusType | null;
|
|
829
|
+
location: LocationType | null;
|
|
830
|
+
resourceCover: ResourceImageType | null;
|
|
973
831
|
resourceId: string;
|
|
832
|
+
resourceLogo: ResourceImageType | null;
|
|
833
|
+
resourceName: string;
|
|
974
834
|
resourceType: EnumResourceType;
|
|
835
|
+
};
|
|
836
|
+
type GeocodeLocation = Pick<LocationType, "latitude" | "longitude">;
|
|
837
|
+
type EventStatusType = {
|
|
838
|
+
claimed: boolean;
|
|
839
|
+
eventType: EnumEventType;
|
|
840
|
+
googlePlaceId?: string | null;
|
|
841
|
+
};
|
|
842
|
+
interface FormField {
|
|
843
|
+
disabled?: boolean;
|
|
844
|
+
helperText?: string;
|
|
845
|
+
isTextArea?: boolean;
|
|
846
|
+
keyboardType?: "default" | "email-address" | "number-pad" | "url" | "decimal-pad" | "phone-pad";
|
|
847
|
+
name: string;
|
|
848
|
+
placeholder: string;
|
|
849
|
+
required?: boolean;
|
|
850
|
+
secureTextEntry?: boolean;
|
|
975
851
|
}
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
VENDORS_PAGE = "Vendors_page"
|
|
852
|
+
interface FormDateField {
|
|
853
|
+
dateMode: "date" | "time";
|
|
854
|
+
helperText?: string;
|
|
855
|
+
name: "endDate" | "endTime" | "startDate" | "startTime";
|
|
856
|
+
placeholder: string;
|
|
982
857
|
}
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
858
|
+
interface SubcategoryItems {
|
|
859
|
+
id: string;
|
|
860
|
+
name: string;
|
|
861
|
+
description?: string | null;
|
|
987
862
|
}
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
863
|
+
interface Subcategory {
|
|
864
|
+
id: string;
|
|
865
|
+
name: string;
|
|
866
|
+
items?: SubcategoryItems[] | null;
|
|
991
867
|
}
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
868
|
+
interface Category {
|
|
869
|
+
color?: string | null;
|
|
870
|
+
description?: string | null;
|
|
871
|
+
id: string;
|
|
872
|
+
name: string;
|
|
873
|
+
subcategories: Subcategory[];
|
|
995
874
|
}
|
|
996
|
-
type
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
adStyle: EnumAdStyle;
|
|
1000
|
-
adTitle: string;
|
|
1001
|
-
adType: EnumAdType;
|
|
1002
|
-
resourceId: string;
|
|
1003
|
-
resourceName: string;
|
|
1004
|
-
resourceRegion: string;
|
|
1005
|
-
resourceType: EnumResourceType;
|
|
875
|
+
type OptionItem = {
|
|
876
|
+
value: string;
|
|
877
|
+
label: string;
|
|
1006
878
|
};
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
879
|
+
type ImageObjectType = {
|
|
880
|
+
uri: string;
|
|
881
|
+
type: string;
|
|
882
|
+
name: string;
|
|
883
|
+
};
|
|
884
|
+
interface ResourceConnectionsType {
|
|
885
|
+
events: EventListItemType[] | null;
|
|
886
|
+
vendors: VendorType[] | null;
|
|
1015
887
|
}
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
888
|
+
interface CreateFormData<T extends FieldValues> {
|
|
889
|
+
control: Control<T, any>;
|
|
890
|
+
fields: T;
|
|
891
|
+
formState: FormState<T>;
|
|
892
|
+
handleSubmit: UseFormHandleSubmit<T, any>;
|
|
893
|
+
reset: UseFormReset<T>;
|
|
894
|
+
setValue: UseFormSetValue<T>;
|
|
895
|
+
watch: UseFormWatch<T>;
|
|
896
|
+
getValues: UseFormGetValues<T>;
|
|
897
|
+
}
|
|
898
|
+
interface UseGetResourcesByRegionOptions {
|
|
899
|
+
onlyClaimed?: boolean;
|
|
900
|
+
limit?: number;
|
|
901
|
+
offset?: number;
|
|
1026
902
|
}
|
|
1027
903
|
|
|
1028
|
-
declare
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
904
|
+
declare const vendorBasicInfoFields: FormField[];
|
|
905
|
+
declare const vendorFullAddress: FormField;
|
|
906
|
+
declare const vendorStartDateFields: FormDateField[];
|
|
907
|
+
declare const vendorEndDateFields: FormDateField[];
|
|
908
|
+
declare const vendorAvailability: FormField[];
|
|
909
|
+
declare const vendorLocationDescription: FormField;
|
|
910
|
+
declare const vendorMenuFields: FormField[];
|
|
911
|
+
declare const productLabelGroups: {
|
|
912
|
+
category: string;
|
|
913
|
+
items: {
|
|
914
|
+
abbreviation: string;
|
|
915
|
+
fullName: string;
|
|
916
|
+
}[];
|
|
917
|
+
}[];
|
|
918
|
+
declare const priceUnits: OptionItem[];
|
|
919
|
+
|
|
920
|
+
interface AdminUpdateResourceType {
|
|
921
|
+
active: boolean;
|
|
922
|
+
resourceId: string;
|
|
923
|
+
resourceType: EnumResourceType;
|
|
1034
924
|
}
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
925
|
+
|
|
926
|
+
type UserFormData = {
|
|
927
|
+
_id?: string;
|
|
928
|
+
active: boolean;
|
|
929
|
+
avatar?: ResourceImageType | null;
|
|
930
|
+
avatarUpload?: ResourceImageType | null;
|
|
931
|
+
confirmPassword?: string | null;
|
|
932
|
+
email: string;
|
|
933
|
+
firstName: string;
|
|
934
|
+
isTester: boolean;
|
|
935
|
+
lastName: string;
|
|
936
|
+
location?: LocationType | null;
|
|
937
|
+
password?: string | null;
|
|
938
|
+
platform?: EnumOSPlatform;
|
|
939
|
+
preferredRegion: string;
|
|
940
|
+
role: EnumUserRole;
|
|
941
|
+
termsAgreement?: TermsAgreement | null;
|
|
1044
942
|
};
|
|
1045
|
-
type
|
|
1046
|
-
|
|
1047
|
-
resourceType: EnumResourceType;
|
|
943
|
+
type CreateUserFormData = CreateFormData<UserFormData>;
|
|
944
|
+
type UserActivityEvent = {
|
|
1048
945
|
resourceId: string;
|
|
1049
|
-
|
|
946
|
+
dateTime: DateTimeType;
|
|
1050
947
|
};
|
|
1051
|
-
type
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
948
|
+
type StripeSubscription = {
|
|
949
|
+
customerId?: string;
|
|
950
|
+
subscriptionId?: string;
|
|
951
|
+
status?: EnumSubscriptionStatus;
|
|
952
|
+
currentPlan?: EnumUserLicence;
|
|
953
|
+
startDate?: string;
|
|
954
|
+
endDate?: string;
|
|
1055
955
|
};
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
}
|
|
1062
|
-
type
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
956
|
+
type SubscriptionStatusData = {
|
|
957
|
+
subscriptionId: string | null;
|
|
958
|
+
status: EnumSubscriptionStatus;
|
|
959
|
+
priceId: string | null;
|
|
960
|
+
currentPlan: EnumUserLicence | null;
|
|
961
|
+
};
|
|
962
|
+
type SubscriptionPricingData = {
|
|
963
|
+
basePrice: number;
|
|
964
|
+
discountedPrice: number | null;
|
|
965
|
+
hasDiscount: boolean;
|
|
966
|
+
discountPercent: number | null;
|
|
967
|
+
discountAmount: number | null;
|
|
968
|
+
currency: string;
|
|
969
|
+
formattedBasePrice: string;
|
|
970
|
+
formattedDiscountedPrice: string | null;
|
|
971
|
+
};
|
|
972
|
+
type SubscriptionPlanData = {
|
|
973
|
+
name: string;
|
|
974
|
+
description: string | null;
|
|
975
|
+
licenceType: EnumUserLicence;
|
|
976
|
+
billingPeriod: string;
|
|
977
|
+
stripeProductId: string;
|
|
978
|
+
stripePriceId: string;
|
|
979
|
+
isEligibleForDiscount: boolean;
|
|
980
|
+
pricing: SubscriptionPricingData;
|
|
981
|
+
};
|
|
982
|
+
type SubscriptionPlansResponse = {
|
|
983
|
+
plans: SubscriptionPlanData[];
|
|
984
|
+
isNewUser: boolean;
|
|
985
|
+
isTester: boolean;
|
|
986
|
+
appliedDiscountType: string;
|
|
987
|
+
};
|
|
988
|
+
type UserActivity = {
|
|
989
|
+
favourites: {
|
|
990
|
+
events: string[];
|
|
991
|
+
vendors: string[];
|
|
992
|
+
partners: string[];
|
|
993
|
+
};
|
|
994
|
+
going: {
|
|
995
|
+
events: UserActivityEvent[];
|
|
996
|
+
};
|
|
997
|
+
interested: {
|
|
998
|
+
events: UserActivityEvent[];
|
|
999
|
+
};
|
|
1000
|
+
present: {
|
|
1001
|
+
events: UserActivityEvent[];
|
|
1002
|
+
};
|
|
1003
|
+
};
|
|
1004
|
+
type RedeemRewardInput = {
|
|
1005
|
+
reward: EnumReward;
|
|
1006
|
+
};
|
|
1007
|
+
type RedeemRewardResponse = {
|
|
1008
|
+
userId: string;
|
|
1009
|
+
message: string;
|
|
1010
|
+
};
|
|
1011
|
+
type RedeemedReward = {
|
|
1012
|
+
name: EnumReward;
|
|
1013
|
+
pointsUsed: number;
|
|
1014
|
+
redeemedAt: Date;
|
|
1015
|
+
};
|
|
1016
|
+
type UserType = Omit<UserFormData, "confirmPassword" | "avatarUpload" | "_id"> & {
|
|
1017
|
+
_id: string;
|
|
1018
|
+
associates?: AssociateType[] | null;
|
|
1019
|
+
createdAt: Date;
|
|
1020
|
+
deletedAt: Date | null;
|
|
1021
|
+
events: string[] | null;
|
|
1022
|
+
game: string | null;
|
|
1023
|
+
licences: UserLicenceType[] | null;
|
|
1024
|
+
overallPoints: number | null;
|
|
1025
|
+
partner: string | null;
|
|
1026
|
+
promoCodes?: PromoCodeType[] | null;
|
|
1027
|
+
redeemedRewards?: RedeemedReward[] | null;
|
|
1028
|
+
refreshToken: string | null;
|
|
1029
|
+
school: string | null;
|
|
1030
|
+
stripe?: StripeSubscription;
|
|
1031
|
+
updatedAt: Date | null;
|
|
1032
|
+
userActivity: UserActivity | null;
|
|
1033
|
+
vendor: string | null;
|
|
1077
1034
|
};
|
|
1078
|
-
|
|
1079
|
-
type
|
|
1080
|
-
|
|
1081
|
-
|
|
1035
|
+
type SafeUserType = Omit<UserType, "password" | "refreshToken">;
|
|
1036
|
+
type ResourceByUser = {
|
|
1037
|
+
_id: string;
|
|
1038
|
+
active: boolean;
|
|
1039
|
+
logo: string;
|
|
1040
|
+
name: string;
|
|
1041
|
+
resourceType: EnumResourceType;
|
|
1082
1042
|
};
|
|
1083
1043
|
|
|
1084
|
-
declare
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
readonly clue: "The place to redefine who you are.";
|
|
1094
|
-
readonly id: "edit-profile";
|
|
1095
|
-
readonly match: "/profile/edit-profile";
|
|
1096
|
-
}, {
|
|
1097
|
-
readonly clue: "A single moment worth showing up for.";
|
|
1098
|
-
readonly id: "single-event";
|
|
1099
|
-
readonly match: RegExp;
|
|
1100
|
-
}, {
|
|
1101
|
-
readonly clue: "What’s happening around you, right now.";
|
|
1102
|
-
readonly id: "events-near-me";
|
|
1103
|
-
readonly match: "/events/events-near-me";
|
|
1104
|
-
}, {
|
|
1105
|
-
readonly clue: "Where events appear as pins on a map.";
|
|
1106
|
-
readonly id: "events-map";
|
|
1107
|
-
readonly match: "/events/events-map";
|
|
1108
|
-
}, {
|
|
1109
|
-
readonly clue: "A collection of events worth attending.";
|
|
1110
|
-
readonly id: "events";
|
|
1111
|
-
readonly match: "/events";
|
|
1112
|
-
}, {
|
|
1113
|
-
readonly clue: "What’s happening in a wider area — not just nearby.";
|
|
1114
|
-
readonly id: "events-region";
|
|
1115
|
-
readonly match: RegExp;
|
|
1116
|
-
}, {
|
|
1117
|
-
readonly clue: "Where fun becomes a challenge.";
|
|
1118
|
-
readonly id: "games";
|
|
1119
|
-
readonly match: "/games";
|
|
1120
|
-
}, {
|
|
1121
|
-
readonly clue: "Your starting point for everything.";
|
|
1122
|
-
readonly id: "home";
|
|
1123
|
-
readonly match: "/";
|
|
1124
|
-
}, {
|
|
1125
|
-
readonly clue: "Where the app whispers what you shouldn’t miss.";
|
|
1126
|
-
readonly id: "notifications";
|
|
1127
|
-
readonly match: "/notifications";
|
|
1128
|
-
}, {
|
|
1129
|
-
readonly clue: "Where you fine-tune your experience.";
|
|
1130
|
-
readonly id: "options";
|
|
1131
|
-
readonly match: "/options";
|
|
1132
|
-
}, {
|
|
1133
|
-
readonly clue: "An organisation or creator supporting the community.";
|
|
1134
|
-
readonly id: "single-partner";
|
|
1135
|
-
readonly match: RegExp;
|
|
1136
|
-
}, {
|
|
1137
|
-
readonly clue: "Organisations and creators supporting the community.";
|
|
1138
|
-
readonly id: "partners";
|
|
1139
|
-
readonly match: "/partners";
|
|
1140
|
-
}, {
|
|
1141
|
-
readonly clue: "A single published post in full view.";
|
|
1142
|
-
readonly id: "single-visitor-post";
|
|
1143
|
-
readonly match: RegExp;
|
|
1144
|
-
}, {
|
|
1145
|
-
readonly clue: "Your identity, on display.";
|
|
1146
|
-
readonly id: "profile";
|
|
1147
|
-
readonly match: "/profile";
|
|
1148
|
-
}, {
|
|
1149
|
-
readonly clue: "One stallholder offering something valuable.";
|
|
1150
|
-
readonly id: "single-vendor";
|
|
1151
|
-
readonly match: RegExp;
|
|
1152
|
-
}, {
|
|
1153
|
-
readonly clue: "Where every stallholder waits under the right category.";
|
|
1154
|
-
readonly id: "vendors";
|
|
1155
|
-
readonly match: "/vendors";
|
|
1156
|
-
}, {
|
|
1157
|
-
readonly clue: "Where you browse articles and posts from around the platform.";
|
|
1158
|
-
readonly id: "visitors";
|
|
1159
|
-
readonly match: "/visitors";
|
|
1160
|
-
}];
|
|
1161
|
-
type GamePlacement = (typeof gameScreenIdentifierList)[number]["id"];
|
|
1162
|
-
type GamePlacementClue = (typeof gameScreenIdentifierList)[number]["clue"];
|
|
1163
|
-
type DailyClueBaseGame = {
|
|
1164
|
-
gameDate: GameDate;
|
|
1165
|
-
gameSolution: string;
|
|
1044
|
+
declare enum EnumVerificationType {
|
|
1045
|
+
REGISTER = "register",
|
|
1046
|
+
RESET_PASSWORD = "resetPassword"
|
|
1047
|
+
}
|
|
1048
|
+
type LoginFormData = {
|
|
1049
|
+
email: string;
|
|
1050
|
+
isAdminPage?: boolean;
|
|
1051
|
+
password: string;
|
|
1052
|
+
platform?: EnumOSPlatform;
|
|
1166
1053
|
};
|
|
1167
|
-
type
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1054
|
+
type CreateLoginFormData = CreateFormData<LoginFormData>;
|
|
1055
|
+
type RegisterFormData = {
|
|
1056
|
+
email: string;
|
|
1057
|
+
firstName: string;
|
|
1058
|
+
lastName: string;
|
|
1059
|
+
password: string;
|
|
1060
|
+
platform?: EnumOSPlatform;
|
|
1061
|
+
preferredRegion: string;
|
|
1062
|
+
promoCode?: PromoCodeType | null;
|
|
1063
|
+
termsAgreement?: TermsAgreement | null;
|
|
1177
1064
|
};
|
|
1178
|
-
|
|
1179
|
-
type
|
|
1180
|
-
|
|
1181
|
-
answer: string;
|
|
1182
|
-
correct: boolean;
|
|
1065
|
+
type CreateRegisterFormData = CreateFormData<RegisterFormData>;
|
|
1066
|
+
type RequestPasswordResetFormData = {
|
|
1067
|
+
email: string;
|
|
1183
1068
|
};
|
|
1184
|
-
type
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1069
|
+
type CreateRequestPasswordResetFormData = CreateFormData<RequestPasswordResetFormData>;
|
|
1070
|
+
type ResetPasswordFormData = {
|
|
1071
|
+
confirmPassword: string;
|
|
1072
|
+
email: string;
|
|
1073
|
+
password: string;
|
|
1188
1074
|
};
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
questionId: string;
|
|
1075
|
+
type CreateResetPasswordFormData = CreateFormData<ResetPasswordFormData>;
|
|
1076
|
+
type ValidateVerificationTokenFormData = {
|
|
1077
|
+
email: string;
|
|
1078
|
+
verificationToken: string;
|
|
1079
|
+
verificationType?: EnumVerificationType;
|
|
1195
1080
|
};
|
|
1196
|
-
type
|
|
1197
|
-
|
|
1081
|
+
type CreateValidateVerificationTokenFormData = CreateFormData<ValidateVerificationTokenFormData>;
|
|
1082
|
+
type AuthPayloadType = {
|
|
1083
|
+
message: string;
|
|
1084
|
+
token: string;
|
|
1085
|
+
refreshToken: string | null;
|
|
1086
|
+
user: SafeUserType;
|
|
1198
1087
|
};
|
|
1199
|
-
type
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
* Stores user answers only.
|
|
1203
|
-
* Never store correctness from client.
|
|
1204
|
-
*/
|
|
1205
|
-
answeredQuestions: PuzzleAnsweredQuestion[];
|
|
1088
|
+
type RefreshTokenPayloadType = {
|
|
1089
|
+
refreshToken: string;
|
|
1090
|
+
token: string;
|
|
1206
1091
|
};
|
|
1207
1092
|
|
|
1208
|
-
type
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
gameTypeId: string;
|
|
1216
|
-
gameTitle: string;
|
|
1217
|
-
} & {
|
|
1218
|
-
[K in keyof BaseGameMap]?: BaseGameMap[K] | null;
|
|
1093
|
+
type ParticipantType = {
|
|
1094
|
+
active: boolean;
|
|
1095
|
+
isAssociate?: boolean | null;
|
|
1096
|
+
userAvatar: string | null;
|
|
1097
|
+
userEmail: string;
|
|
1098
|
+
userId: string;
|
|
1099
|
+
userName: string;
|
|
1219
1100
|
};
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
GAME_STARTED = "GAME_STARTED"
|
|
1101
|
+
interface ChatMessageInput {
|
|
1102
|
+
content: string;
|
|
1103
|
+
replyToMessageId?: string | null;
|
|
1104
|
+
senderId: string;
|
|
1225
1105
|
}
|
|
1226
|
-
type
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
/** Per-event delta. Not persisted for overallGamePoints (computed at read time). */
|
|
1231
|
-
pointsEarned: number;
|
|
1232
|
-
/** Running total for this game instance; computed at read time, not stored in Mongo. */
|
|
1233
|
-
overallGamePoints?: number;
|
|
1106
|
+
type ChatMessageReplyPreview = {
|
|
1107
|
+
senderId: string;
|
|
1108
|
+
senderName: string;
|
|
1109
|
+
contentPreview: string;
|
|
1234
1110
|
};
|
|
1235
|
-
type
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
[EnumGameType.ODD_ONE_OUT]: PuzzleGameData;
|
|
1111
|
+
type ChatMessageReaction = {
|
|
1112
|
+
userId: string;
|
|
1113
|
+
createdAt: Date;
|
|
1239
1114
|
};
|
|
1240
|
-
type
|
|
1241
|
-
|
|
1115
|
+
type ChatMessageSeen = {
|
|
1116
|
+
userId: string;
|
|
1117
|
+
seenAt: Date;
|
|
1242
1118
|
};
|
|
1243
|
-
|
|
1119
|
+
interface ChatMessageType {
|
|
1120
|
+
_id?: string;
|
|
1121
|
+
content: string;
|
|
1122
|
+
createdAt?: Date;
|
|
1123
|
+
replyToMessageId?: string | null;
|
|
1124
|
+
replyPreview?: ChatMessageReplyPreview | null;
|
|
1125
|
+
likedBy?: ChatMessageReaction[];
|
|
1126
|
+
senderId: string;
|
|
1127
|
+
seenBy?: ChatMessageSeen[];
|
|
1128
|
+
updatedAt?: Date;
|
|
1129
|
+
}
|
|
1130
|
+
interface ChatType {
|
|
1244
1131
|
_id: string;
|
|
1245
1132
|
active: boolean;
|
|
1133
|
+
chatDescription?: string | null;
|
|
1134
|
+
chatName: string;
|
|
1135
|
+
chatType: EnumChatType;
|
|
1246
1136
|
createdAt: Date;
|
|
1247
|
-
|
|
1248
|
-
|
|
1137
|
+
deletedAt: Date | null;
|
|
1138
|
+
messages: ChatMessageType[];
|
|
1139
|
+
participants: ParticipantType[];
|
|
1140
|
+
region: string | null;
|
|
1141
|
+
updatedAt: Date | null;
|
|
1142
|
+
}
|
|
1143
|
+
interface ReportChatUser {
|
|
1144
|
+
_id: string;
|
|
1145
|
+
chatId: string;
|
|
1146
|
+
createdAt: Date;
|
|
1147
|
+
reason: {
|
|
1148
|
+
reasonType: EnumChatReportReason;
|
|
1149
|
+
details: string | null;
|
|
1150
|
+
};
|
|
1151
|
+
reportedUserId: string;
|
|
1152
|
+
reporterUserId: string;
|
|
1153
|
+
resolved: boolean;
|
|
1249
1154
|
updatedAt: Date | null;
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
type ContactUsFormData = {
|
|
1158
|
+
email: string;
|
|
1159
|
+
firstName: string;
|
|
1160
|
+
lastName: string;
|
|
1161
|
+
message: string;
|
|
1250
1162
|
};
|
|
1251
|
-
type
|
|
1163
|
+
type CreateContactUsFormData = CreateFormData<ContactUsFormData>;
|
|
1164
|
+
|
|
1165
|
+
interface NotificationDataType {
|
|
1166
|
+
resourceId: string;
|
|
1167
|
+
resourceName: string;
|
|
1168
|
+
resourceType: EnumNotificationResourceType;
|
|
1169
|
+
}
|
|
1170
|
+
type NotificationType = {
|
|
1252
1171
|
_id: string;
|
|
1253
|
-
|
|
1172
|
+
userId: string;
|
|
1173
|
+
title: string;
|
|
1174
|
+
message: string;
|
|
1175
|
+
isRead: boolean;
|
|
1176
|
+
type: EnumNotificationType;
|
|
1177
|
+
data: NotificationDataType | null;
|
|
1254
1178
|
createdAt: Date;
|
|
1255
|
-
|
|
1256
|
-
games: GameType[] | null;
|
|
1257
|
-
owner: OwnerType;
|
|
1258
|
-
points: number;
|
|
1259
|
-
updatedAt: Date | null;
|
|
1179
|
+
updatedAt: Date;
|
|
1260
1180
|
};
|
|
1261
|
-
type
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1181
|
+
type NotificationCount = {
|
|
1182
|
+
total: number;
|
|
1183
|
+
unread: number;
|
|
1184
|
+
};
|
|
1185
|
+
type CreateBulkNotificationInput = {
|
|
1186
|
+
data: NotificationDataType | null;
|
|
1187
|
+
message: string;
|
|
1188
|
+
title: string;
|
|
1189
|
+
type: EnumNotificationType;
|
|
1190
|
+
userIds: string[];
|
|
1265
1191
|
};
|
|
1266
1192
|
|
|
1267
|
-
declare
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1193
|
+
declare const PKG: "@timardex/cluemart-shared";
|
|
1194
|
+
declare const IMAGE_EXTENSION: ".webp";
|
|
1195
|
+
/**
|
|
1196
|
+
* Basenames under the shared images directory — use with `getSharedImagePath` from `@timardex/cluemart-shared/images/node` (Express / Node).
|
|
1197
|
+
* This object is the single source of poster keys; `posters` is derived from it. Add an image with `IMAGE_EXTENSION` under `src/images/posters/` when adding an entry.
|
|
1198
|
+
* `images/node` reads this at runtime for `getSharedImagePath` allow-listing.
|
|
1199
|
+
*/
|
|
1200
|
+
declare const posterIds: readonly ["mini-market1", "mini-market2", "mini-market3", "mini-market4", "mini-market5", "poster1", "poster2", "poster3", "poster4"];
|
|
1201
|
+
declare const posterFiles: { readonly [K in (typeof posterIds)[number]]: `${K}${typeof IMAGE_EXTENSION}`; };
|
|
1202
|
+
/**
|
|
1203
|
+
* Basenames for assets under `src/images/clui/` in source; they are copied flat into `dist/images/` (same as posters).
|
|
1204
|
+
* `images/node` reads this at runtime for `getSharedImagePath` allow-listing.
|
|
1205
|
+
*/
|
|
1206
|
+
declare const cluiIds: readonly ["cluiTui", "sima", "tablas", "telefonos", "ugralos"];
|
|
1207
|
+
declare const cluiFiles: { readonly [K in (typeof cluiIds)[number]]: `${K}${typeof IMAGE_EXTENSION}`; };
|
|
1208
|
+
declare const iconIds: readonly ["apple-maps-icon", "facebook", "google-maps-icon", "instagram", "meet", "poll", "tiktok", "tip", "waze-maps-icon", "website", "youtube"];
|
|
1209
|
+
declare const iconFiles: { readonly [K in (typeof iconIds)[number]]: `${K}${typeof IMAGE_EXTENSION}`; };
|
|
1210
|
+
declare const badgeIds: readonly ["corporate", "private", "school"];
|
|
1211
|
+
declare const badgeFiles: { readonly [K in (typeof badgeIds)[number]]: `${K}${typeof IMAGE_EXTENSION}`; };
|
|
1212
|
+
declare const logoIds: readonly ["googleMaps-logo-dark", "googleMaps-logo-light", "logo-atr", "logo-dark", "logo"];
|
|
1213
|
+
declare const logoFiles: { readonly [K in (typeof logoIds)[number]]: `${K}${typeof IMAGE_EXTENSION}`; };
|
|
1214
|
+
declare const otherImagesIds: readonly ["banner-horizontal", "banner-vertical", "gazebo-top", "qr-code", "store-android", "store-ios"];
|
|
1215
|
+
declare const otherImagesFiles: { readonly [K in (typeof otherImagesIds)[number]]: `${K}${typeof IMAGE_EXTENSION}`; };
|
|
1216
|
+
/**
|
|
1217
|
+
* Module specifiers for each poster (not resolved file URLs). Use a static import or require with these paths
|
|
1218
|
+
* so your bundler resolves the file, e.g.
|
|
1219
|
+
* `import poster1 from "@timardex/cluemart-shared/images/poster1.webp"`
|
|
1220
|
+
* or `require("@timardex/cluemart-shared/images/poster1.webp")` (React Native / Metro).
|
|
1221
|
+
*
|
|
1222
|
+
* Derived from `posterFiles` so keys and filenames stay aligned.
|
|
1223
|
+
*/
|
|
1224
|
+
declare const posters: { readonly [K in keyof typeof posterFiles]: `${typeof PKG}/images/${(typeof posterFiles)[K]}`; };
|
|
1225
|
+
/**
|
|
1226
|
+
* Module specifiers for Clui assets (same flat `@…/images/<file>.webp` pattern as posters), e.g.
|
|
1227
|
+
* `import clui from "@timardex/cluemart-shared/images/cluiTui.webp"`.
|
|
1228
|
+
*/
|
|
1229
|
+
declare const cluiImages: { readonly [K in keyof typeof cluiFiles]: `${typeof PKG}/images/${(typeof cluiFiles)[K]}`; };
|
|
1230
|
+
declare const icons: { readonly [K in keyof typeof iconFiles]: `${typeof PKG}/images/${(typeof iconFiles)[K]}`; };
|
|
1231
|
+
declare const badges: { readonly [K in keyof typeof badgeFiles]: `${typeof PKG}/images/${(typeof badgeFiles)[K]}`; };
|
|
1232
|
+
declare const logos: { readonly [K in keyof typeof logoFiles]: `${typeof PKG}/images/${(typeof logoFiles)[K]}`; };
|
|
1233
|
+
declare const otherImages: { readonly [K in keyof typeof otherImagesFiles]: `${typeof PKG}/images/${(typeof otherImagesFiles)[K]}`; };
|
|
1234
|
+
type PosterAssetId = keyof typeof posters;
|
|
1235
|
+
/** A single filename under the shared images directory (values of `posterFiles`). */
|
|
1236
|
+
type PosterImageBasename = (typeof posterFiles)[PosterAssetId];
|
|
1237
|
+
type CluiImageId = keyof typeof cluiImages;
|
|
1238
|
+
/** Basename under the shared images directory (values of `cluiFiles`). */
|
|
1239
|
+
type CluiImageBasename = (typeof cluiFiles)[CluiImageId];
|
|
1240
|
+
type IconId = keyof typeof icons;
|
|
1241
|
+
type IconBasename = (typeof iconFiles)[IconId];
|
|
1242
|
+
type BadgeId = keyof typeof badges;
|
|
1243
|
+
type BadgeBasename = (typeof badgeFiles)[BadgeId];
|
|
1244
|
+
type LogoId = keyof typeof logos;
|
|
1245
|
+
type LogoBasename = (typeof logoFiles)[LogoId];
|
|
1246
|
+
type OtherImagesId = keyof typeof otherImages;
|
|
1247
|
+
type OtherImagesBasename = (typeof otherImagesFiles)[OtherImagesId];
|
|
1248
|
+
|
|
1249
|
+
interface PosterInputType {
|
|
1250
|
+
description: string;
|
|
1251
|
+
posterName: PosterAssetId;
|
|
1252
|
+
resourceId: string;
|
|
1253
|
+
resourceType: EnumResourceType;
|
|
1271
1254
|
}
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1255
|
+
|
|
1256
|
+
declare enum EnumAdShowOn {
|
|
1257
|
+
EVENTS_PAGE = "Events_page",
|
|
1258
|
+
FRONT_PAGE = "Front_page",
|
|
1259
|
+
PARTNERS_PAGE = "Partners_page",
|
|
1260
|
+
VENDORS_PAGE = "Vendors_page"
|
|
1278
1261
|
}
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
items: {
|
|
1303
|
-
text: string;
|
|
1304
|
-
}[];
|
|
1305
|
-
};
|
|
1306
|
-
};
|
|
1307
|
-
type PostContentGame = {
|
|
1308
|
-
game: BaseGameType;
|
|
1309
|
-
};
|
|
1310
|
-
type PostContentData = PostContentGame | PostContentTextarea | PostContentImage | PostContentVideo | PostContentList;
|
|
1311
|
-
type PostContentFormData = {
|
|
1312
|
-
contentData?: PostContentData | null;
|
|
1313
|
-
contentOrder?: number | null;
|
|
1314
|
-
contentType?: EnumPostContentType | null;
|
|
1262
|
+
declare enum EnumAdStatus {
|
|
1263
|
+
ACTIVE = "Active",
|
|
1264
|
+
PAUSED = "Paused",
|
|
1265
|
+
EXPIRED = "Expired"
|
|
1266
|
+
}
|
|
1267
|
+
declare enum EnumAdType {
|
|
1268
|
+
SPONSORED = "Sponsored",
|
|
1269
|
+
FREE = "Free"
|
|
1270
|
+
}
|
|
1271
|
+
declare enum EnumAdStyle {
|
|
1272
|
+
BLOOM = "Bloom",
|
|
1273
|
+
RISE = "Rise"
|
|
1274
|
+
}
|
|
1275
|
+
type AdResource = {
|
|
1276
|
+
adDescription: string;
|
|
1277
|
+
adImage: string;
|
|
1278
|
+
adStyle: EnumAdStyle;
|
|
1279
|
+
adTitle: string;
|
|
1280
|
+
adType: EnumAdType;
|
|
1281
|
+
resourceId: string;
|
|
1282
|
+
resourceName: string;
|
|
1283
|
+
resourceRegion: string;
|
|
1284
|
+
resourceType: EnumResourceType;
|
|
1315
1285
|
};
|
|
1316
|
-
interface
|
|
1286
|
+
interface AdFormData {
|
|
1317
1287
|
active: boolean;
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
resourceId: string;
|
|
1325
|
-
resourceType: EnumResourceType;
|
|
1326
|
-
resourceRegion: string;
|
|
1327
|
-
} | null;
|
|
1328
|
-
tags?: string[] | null;
|
|
1329
|
-
title: string;
|
|
1330
|
-
notifyUsers?: boolean | null;
|
|
1288
|
+
end: Date;
|
|
1289
|
+
resource: AdResource;
|
|
1290
|
+
showOn: EnumAdShowOn[];
|
|
1291
|
+
start?: Date;
|
|
1292
|
+
status: EnumAdStatus;
|
|
1293
|
+
targetRegion: string[];
|
|
1331
1294
|
}
|
|
1332
|
-
type
|
|
1333
|
-
type
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
type PostType = Omit<PostFormData, "content" | "coverUpload"> & {
|
|
1295
|
+
type AdFormState = AdFormData;
|
|
1296
|
+
type CreateAdFormData = CreateFormData<AdFormData>;
|
|
1297
|
+
type CreateAdFormState = CreateFormData<AdFormState>;
|
|
1298
|
+
interface AdType extends AdFormData {
|
|
1337
1299
|
_id: string;
|
|
1338
|
-
|
|
1300
|
+
clicks?: number;
|
|
1339
1301
|
createdAt: Date;
|
|
1340
|
-
|
|
1302
|
+
impressions?: number;
|
|
1303
|
+
start: Date;
|
|
1341
1304
|
updatedAt: Date | null;
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1307
|
+
declare enum EnumActivity {
|
|
1308
|
+
FAVORITE = "FAVORITE",
|
|
1309
|
+
GOING = "GOING",
|
|
1310
|
+
INTERESTED = "INTERESTED",
|
|
1311
|
+
PRESENT = "PRESENT",
|
|
1312
|
+
VIEW = "VIEW"
|
|
1313
|
+
}
|
|
1314
|
+
type ResourceActivityEntry = {
|
|
1315
|
+
activityType: EnumActivity;
|
|
1316
|
+
location: LocationGeoType | null;
|
|
1317
|
+
dateStatus?: EnumEventDateStatus | null;
|
|
1318
|
+
startDate?: string | null;
|
|
1319
|
+
startTime?: string | null;
|
|
1320
|
+
timestamp: Date;
|
|
1321
|
+
userAgent: EnumOSPlatform;
|
|
1322
|
+
userId?: string | null;
|
|
1323
|
+
};
|
|
1324
|
+
type ResourceActivityType = {
|
|
1325
|
+
_id: string;
|
|
1326
|
+
resourceType: EnumResourceType;
|
|
1327
|
+
resourceId: string;
|
|
1328
|
+
activity: ResourceActivityEntry[];
|
|
1329
|
+
};
|
|
1330
|
+
type ResourceActivityInputType = {
|
|
1331
|
+
resourceId: string;
|
|
1332
|
+
resourceType: EnumResourceType;
|
|
1333
|
+
activity: Omit<ResourceActivityEntry, "timestamp">;
|
|
1342
1334
|
};
|
|
1343
1335
|
|
|
1336
|
+
interface PartnerFormData extends BaseResourceTypeFormData {
|
|
1337
|
+
location: LocationType;
|
|
1338
|
+
nzbn: string;
|
|
1339
|
+
partnerType: EnumPartnerType;
|
|
1340
|
+
}
|
|
1341
|
+
type CreatePartnerFormData = CreateFormData<PartnerFormData>;
|
|
1342
|
+
interface PartnerType extends BaseResourceType {
|
|
1343
|
+
location: LocationType;
|
|
1344
|
+
nzbn: string;
|
|
1345
|
+
partnerType: EnumPartnerType;
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1344
1348
|
type PushTokenType = {
|
|
1345
1349
|
_id: string;
|
|
1346
1350
|
createdAt: Date;
|