@timardex/cluemart-shared 1.5.550 → 1.5.551
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/{chunk-LOABFNIJ.mjs → chunk-5LODYRBR.mjs} +10 -16
- package/dist/chunk-5LODYRBR.mjs.map +1 -0
- package/dist/{chunk-CPT4WZKU.mjs → chunk-DYUATO2Z.mjs} +5 -5
- package/dist/chunk-DYUATO2Z.mjs.map +1 -0
- package/dist/{chunk-CRZP6KYI.mjs → chunk-OVEYADVZ.mjs} +2 -2
- package/dist/{chunk-UBAAAYJY.mjs → chunk-SUCEE4LU.mjs} +15 -7
- package/dist/{chunk-UBAAAYJY.mjs.map → chunk-SUCEE4LU.mjs.map} +1 -1
- package/dist/{chunk-FICQ3PR5.mjs → chunk-ZOPHRV6M.mjs} +12 -2
- package/dist/chunk-ZOPHRV6M.mjs.map +1 -0
- package/dist/{game-1CSiEjlf.d.ts → dailyClue-CvOPk6am.d.mts} +12 -56
- package/dist/{game-BPtE3yaQ.d.mts → dailyClue-CvOPk6am.d.ts} +12 -56
- package/dist/formFields/index.cjs +4 -1
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.mjs +3 -3
- package/dist/graphql/index.cjs +14 -6
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +2 -2
- package/dist/graphql/index.d.ts +2 -2
- package/dist/graphql/index.mjs +1 -1
- package/dist/hooks/index.cjs +18 -7
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +2 -2
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.mjs +5 -5
- package/dist/index.cjs +33 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +21 -13
- package/dist/index.d.ts +21 -13
- package/dist/index.mjs +33 -21
- package/dist/index.mjs.map +1 -1
- package/dist/{post-Lc5PrxY6.d.ts → post-B941IgWP.d.ts} +54 -4
- package/dist/{post-CY53UsA7.d.mts → post-C3L-bejc.d.mts} +54 -4
- package/dist/types/index.cjs +16 -12
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.mts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.mjs +3 -3
- package/dist/utils/index.cjs +7 -4
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-CPT4WZKU.mjs.map +0 -1
- package/dist/chunk-FICQ3PR5.mjs.map +0 -1
- package/dist/chunk-LOABFNIJ.mjs.map +0 -1
- /package/dist/{chunk-CRZP6KYI.mjs.map → chunk-OVEYADVZ.mjs.map} +0 -0
|
@@ -59,6 +59,15 @@ var EnumPostContentType = /* @__PURE__ */ ((EnumPostContentType2) => {
|
|
|
59
59
|
return EnumPostContentType2;
|
|
60
60
|
})(EnumPostContentType || {});
|
|
61
61
|
|
|
62
|
+
// src/types/game/index.ts
|
|
63
|
+
var EnumGameStatus = /* @__PURE__ */ ((EnumGameStatus2) => {
|
|
64
|
+
EnumGameStatus2["GAME_COMPLETED"] = "GAME_COMPLETED";
|
|
65
|
+
EnumGameStatus2["GAME_IN_PROGRESS"] = "GAME_IN_PROGRESS";
|
|
66
|
+
EnumGameStatus2["GAME_LEFT"] = "GAME_LEFT";
|
|
67
|
+
EnumGameStatus2["GAME_STARTED"] = "GAME_STARTED";
|
|
68
|
+
return EnumGameStatus2;
|
|
69
|
+
})(EnumGameStatus || {});
|
|
70
|
+
|
|
62
71
|
export {
|
|
63
72
|
EnumAdShowOn,
|
|
64
73
|
EnumAdStatus,
|
|
@@ -68,6 +77,7 @@ export {
|
|
|
68
77
|
PROMO_CODE_PREFIX,
|
|
69
78
|
EnumActivity,
|
|
70
79
|
EnumPostType,
|
|
71
|
-
EnumPostContentType
|
|
80
|
+
EnumPostContentType,
|
|
81
|
+
EnumGameStatus
|
|
72
82
|
};
|
|
73
|
-
//# sourceMappingURL=chunk-
|
|
83
|
+
//# sourceMappingURL=chunk-ZOPHRV6M.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/types/auth.ts","../src/types/global.ts","../src/types/ad.ts","../src/types/resourceActivities.ts","../src/types/post.ts","../src/types/game/index.ts"],"sourcesContent":["import {\n CreateFormData,\n EnumOSPlatform,\n PromoCodeType,\n TermsAgreement,\n} from \"src\";\n\nexport enum EnumVerificationType {\n REGISTER = \"register\",\n RESET_PASSWORD = \"resetPassword\",\n}\n\nexport type LoginFormData = {\n email: string;\n isAdminPage?: boolean;\n password: string;\n platform?: EnumOSPlatform;\n};\n\nexport type CreateLoginFormData = CreateFormData<LoginFormData>;\n\nexport type RegisterFormData = {\n email: string;\n firstName: string;\n lastName: string;\n password: string;\n platform?: EnumOSPlatform;\n preferredRegion: string;\n promoCode?: PromoCodeType | null;\n termsAgreement?: TermsAgreement | null;\n};\n\nexport type CreateRegisterFormData = CreateFormData<RegisterFormData>;\n\nexport type RequestPasswordResetFormData = {\n email: string;\n};\n\nexport type CreateRequestPasswordResetFormData =\n CreateFormData<RequestPasswordResetFormData>;\n\nexport type ResetPasswordFormData = {\n confirmPassword: string;\n email: string;\n password: string;\n};\n\nexport type CreateResetPasswordFormData = CreateFormData<ResetPasswordFormData>;\n\nexport type ValidateVerificationTokenFormData = {\n email: string;\n verificationToken: string;\n verificationType?: EnumVerificationType;\n};\n\nexport type CreateValidateVerificationTokenFormData =\n CreateFormData<ValidateVerificationTokenFormData>;\n","import {\n Control,\n FieldValues,\n FormState,\n UseFormHandleSubmit,\n UseFormReset,\n UseFormSetValue,\n UseFormWatch,\n} from \"react-hook-form\";\n\nimport {\n EnumEventDateStatus,\n EnumEventType,\n EnumResourceType,\n EnumSocialMedia,\n EnumUserLicence,\n} from \"../enums\";\n\nimport { EventListItemType } from \"./event\";\nimport { VendorType } from \"./vendor\";\n\nexport const PROMO_CODE_PREFIX = \"CM-\";\n\nexport type PromoCodeType = `${typeof PROMO_CODE_PREFIX}${string}`;\n\nexport type Nullable<T> = {\n [K in keyof T]: T[K] | null | undefined;\n};\n\nexport type DeviceInfo = {\n appBuildNumber: string;\n appId: string;\n appVersion: string;\n brand: string;\n deviceName: string;\n installationId: string;\n manufacturer: string;\n modelName: string;\n osName: string;\n osVersion: string;\n timestamp: string;\n};\n\nexport type TermsAgreement = DeviceInfo & {\n termVersion: string;\n};\n\nexport type ResourceContactDetailsType = {\n email?: string | null;\n landlinePhone?: string | null;\n mobilePhone?: string | null;\n};\n\nexport type ResourceImageType = {\n active?: boolean | null;\n source: string;\n title: string;\n};\n\nexport type SocialMediaType = {\n name?: EnumSocialMedia;\n link?: string;\n};\n\nexport type UserLicenceType = {\n expiryDate: Date;\n issuedDate: Date;\n licenceType: EnumUserLicence;\n prevLicenceType?: EnumUserLicence | null;\n};\n\nexport type AssociateType = {\n email: string;\n resourceId: string;\n resourceType: EnumResourceType;\n licence: UserLicenceType;\n};\n\nexport type OwnerType = {\n email: string;\n userId: string;\n};\n\nexport interface BaseResourceTypeFormData {\n _id?: string;\n active: boolean;\n associates: AssociateType[] | null;\n contactDetails: ResourceContactDetailsType | null;\n cover: ResourceImageType;\n coverUpload?: ResourceImageType | null;\n description: string;\n images?: ResourceImageType[] | null;\n imagesUpload?: ResourceImageType[] | null;\n logo?: ResourceImageType | null;\n logoUpload?: ResourceImageType | null;\n name: string;\n owner?: OwnerType | null;\n promoCodes?: PromoCodeType[] | null;\n region: string;\n socialMedia: SocialMediaType[] | null;\n termsAgreement?: TermsAgreement | null;\n}\n\nexport type PosterUsageType = {\n month: string;\n count: number;\n};\n\nexport type BaseResourceType = Omit<\n BaseResourceTypeFormData,\n \"_id\" | \"coverUpload\" | \"imagesUpload\" | \"logoUpload\"\n> & {\n _id: string;\n adIds?: string[] | null;\n createdAt: Date;\n deletedAt: Date | null;\n posterUsage?: PosterUsageType | null;\n rating?: number | null;\n reviewCount?: number | null;\n updatedAt: Date | null;\n};\n\nexport type LocationGeoType = {\n coordinates: number[]; // [longitude, latitude]\n type: \"Point\"; // Mongoose GeoJSON type\n};\n\nexport type LocationType = {\n city: string;\n country: string;\n fullAddress: string;\n geo: LocationGeoType;\n latitude: number;\n longitude: number;\n region: string;\n};\n\nexport type DateTimeType = {\n dateStatus: EnumEventDateStatus;\n endDate: string;\n endTime: string;\n startDate: string;\n startTime: string;\n};\n\nexport type Region = {\n latitude: number;\n latitudeDelta: number;\n longitude: number;\n longitudeDelta: number;\n};\n\nexport type ResourceDetails = {\n dateTime: DateTimeType[] | null;\n description: string | null;\n eventStatus?: EventStatusType | null;\n location: LocationType | null;\n resourceCover: ResourceImageType | null;\n resourceId: string;\n resourceLogo: ResourceImageType | null;\n resourceName: string;\n resourceType: EnumResourceType;\n};\n\nexport type GeocodeLocation = Pick<LocationType, \"latitude\" | \"longitude\">;\n\nexport type EventStatusType = {\n claimed: boolean;\n eventType: EnumEventType;\n googlePlaceId?: string | null;\n};\n\nexport interface FormField {\n disabled?: boolean;\n helperText?: string;\n isTextArea?: boolean;\n keyboardType?:\n | \"default\"\n | \"email-address\"\n | \"number-pad\"\n | \"url\"\n | \"decimal-pad\"\n | \"phone-pad\";\n name: string;\n placeholder: string;\n required?: boolean;\n secureTextEntry?: boolean;\n}\n\nexport interface FormDateField {\n dateMode: \"date\" | \"time\";\n helperText?: string;\n name: \"endDate\" | \"endTime\" | \"startDate\" | \"startTime\";\n placeholder: string;\n}\n\nexport interface SubcategoryItems {\n id: string;\n name: string;\n description?: string | null;\n}\n\nexport interface Subcategory {\n id: string;\n name: string;\n items?: SubcategoryItems[] | null;\n}\n\nexport interface Category {\n color?: string | null;\n description?: string | null;\n id: string;\n name: string;\n subcategories: Subcategory[];\n}\n\nexport type OptionItem = {\n value: string;\n label: string;\n};\n\nexport type ImageObjectType = {\n uri: string;\n type: string;\n name: string;\n};\n\nexport interface ResourceConnectionsType {\n events: EventListItemType[] | null;\n vendors: VendorType[] | null;\n}\n\nexport interface CreateFormData<T extends FieldValues> {\n control: Control<T, any>;\n fields: T;\n formState: FormState<T>;\n handleSubmit: UseFormHandleSubmit<T, any>;\n reset: UseFormReset<T>;\n setValue: UseFormSetValue<T>;\n watch: UseFormWatch<T>;\n}\n","import { EnumResourceType } from \"src/enums\";\n\nimport { CreateFormData, SocialMediaType } from \"./global\";\n\nexport enum EnumAdShowOn {\n EVENTS_PAGE = \"Events_page\",\n FRONT_PAGE = \"Front_page\",\n PARTNERS_PAGE = \"Partners_page\",\n VENDORS_PAGE = \"Vendors_page\",\n}\n\nexport enum EnumAdStatus {\n ACTIVE = \"Active\",\n PAUSED = \"Paused\",\n EXPIRED = \"Expired\",\n}\n\nexport enum EnumAdType {\n SPONSORED = \"Sponsored\",\n FREE = \"Free\",\n}\n\nexport enum EnumAdStyle {\n BLOOM = \"Bloom\",\n RISE = \"Rise\",\n}\n\nexport type AdResource = {\n adDescription: string | null;\n adImage: string | null;\n adStyle: EnumAdStyle | null;\n adTitle: string | null;\n adType: EnumAdType | null;\n resourceId: string | null;\n resourceName: string | null;\n resourceRegion: string | null;\n resourceType: EnumResourceType | null;\n};\n\nexport interface AdFormData {\n active: boolean;\n end: Date; // ISO date string\n resource: AdResource;\n showOn: EnumAdShowOn[];\n start?: Date; // ISO date string\n status: EnumAdStatus;\n targetRegion: string[];\n}\n\nexport type CreateAdFormData = CreateFormData<AdFormData>;\n\nexport interface AdType extends AdFormData {\n _id: string;\n clicks?: number; // How many times the ad was clicked\n createdAt: Date;\n impressions?: number; // How often the ad was seen\n start: Date; // ISO date string\n updatedAt: Date | null;\n}\n","import {\n EnumEventDateStatus,\n EnumOSPlatform,\n EnumResourceType,\n} from \"src/enums\";\n\nimport { LocationGeoType } from \"./global\";\n\nexport enum EnumActivity {\n FAVORITE = \"FAVORITE\",\n GOING = \"GOING\",\n INTERESTED = \"INTERESTED\",\n PRESENT = \"PRESENT\",\n VIEW = \"VIEW\",\n}\n\nexport type ResourceActivityEntry = {\n activityType: EnumActivity;\n location: LocationGeoType | null;\n dateStatus?: EnumEventDateStatus | null;\n startDate?: string | null;\n startTime?: string | null;\n timestamp: Date;\n userAgent: EnumOSPlatform;\n userId?: string | null;\n};\n\nexport type ResourceActivityType = {\n _id: string;\n resourceType: EnumResourceType;\n resourceId: string;\n activity: ResourceActivityEntry[];\n};\n\nexport type ResourceActivityInputType = {\n resourceId: string;\n resourceType: EnumResourceType;\n activity: Omit<ResourceActivityEntry, \"timestamp\">;\n};\n","import { EnumResourceType } from \"src/enums\";\n\nimport { BaseGameType } from \"./game\";\nimport { CreateFormData, ResourceImageType } from \"./global\";\n\nexport enum EnumPostType {\n DAILY_MEETS = \"daily_meets\",\n DAILY_TIPS = \"daily_tips\",\n DAILY_GAMES = \"daily_games\",\n}\n\nexport enum EnumPostContentType {\n GAME = \"game\",\n IMAGE = \"image\",\n LIST = \"list\",\n TEXTAREA = \"textarea\",\n VIDEO = \"video\",\n}\n\nexport type PostFileInput = {\n source: File;\n title?: string;\n};\n\nexport type PostContentTextarea = {\n textarea: {\n title?: string;\n data: string;\n };\n};\n\nexport type PostContentImage = {\n images: ResourceImageType[] | null;\n imagesUpload?: PostFileInput[] | null;\n};\n\nexport type PostContentVideo = {\n video: {\n source: string;\n title?: string;\n };\n};\n\nexport type PostContentList = {\n list: {\n title?: string;\n items: {\n text: string;\n }[];\n };\n};\n\nexport type PostContentGame = {\n game: BaseGameType;\n};\n\nexport type PostContentData =\n | PostContentGame\n | PostContentTextarea\n | PostContentImage\n | PostContentVideo\n | PostContentList;\n\nexport type PostContentFormData = {\n contentData?: PostContentData | null;\n contentOrder?: number | null;\n contentType?: EnumPostContentType | null;\n};\n\nexport interface PostFormData {\n active: boolean;\n caption: string;\n content: PostContentFormData[];\n cover?: ResourceImageType | null;\n coverUpload?: PostFileInput | null;\n postType: EnumPostType;\n resource?: {\n resourceId: string;\n resourceType: EnumResourceType;\n resourceRegion: string;\n } | null;\n tags?: string[] | null;\n title: string;\n}\n\nexport type CreatePostFormData = CreateFormData<PostFormData>;\n\nexport type PostContentType = Omit<PostContentFormData, \"contentData\"> & {\n contentData: Omit<PostContentData, \"imagesUpload\">;\n};\n\nexport type PostType = Omit<PostFormData, \"content\" | \"coverUpload\"> & {\n _id: string;\n content: PostContentType[];\n createdAt: Date;\n deletedAt: Date | null;\n updatedAt: Date | null;\n};\n","import { OwnerType } from \"../global\";\n\nimport { DailyClueBaseGame, DailyClueGameData } from \"./dailyClue\";\nimport { EnumGameType, GameDate } from \"./global\";\n\nexport type BaseGameMap = {\n [EnumGameType.DAILY_CLUE]: DailyClueBaseGame;\n};\n\nexport type BaseGameType = {\n [K in keyof BaseGameMap]: BaseGameMap[K] | null;\n};\n\nexport enum EnumGameStatus {\n GAME_COMPLETED = \"GAME_COMPLETED\",\n GAME_IN_PROGRESS = \"GAME_IN_PROGRESS\",\n GAME_LEFT = \"GAME_LEFT\",\n GAME_STARTED = \"GAME_STARTED\",\n}\n\nexport type GameHistory = {\n createdAt: Date;\n gameDate: GameDate;\n gameStatus: EnumGameStatus;\n gameType: EnumGameType;\n pointsEarned: number;\n};\n\ntype GameDataMap = {\n [EnumGameType.DAILY_CLUE]: DailyClueGameData;\n};\ntype GameDataType = {\n [K in keyof GameDataMap]?: GameDataMap[K] | null;\n};\n\nexport type GameType = {\n _id: string;\n active: boolean;\n createdAt: Date;\n gameData: GameDataType;\n gameHistory: GameHistory[] | null;\n gameType: EnumGameType;\n updatedAt: Date | null;\n};\n\nexport type GameDocType = {\n _id: string;\n active: boolean;\n createdAt: Date;\n deletedAt: Date | null;\n games: GameType[] | null;\n owner: OwnerType;\n points: number;\n updatedAt: Date | null;\n};\n\nexport type GameLeaderboard = {\n gameHistory: GameHistory[] | null;\n overallPoints: number;\n owner: OwnerType;\n};\n"],"mappings":";AAOO,IAAK,uBAAL,kBAAKA,0BAAL;AACL,EAAAA,sBAAA,cAAW;AACX,EAAAA,sBAAA,oBAAiB;AAFP,SAAAA;AAAA,GAAA;;;ACcL,IAAM,oBAAoB;;;ACjB1B,IAAK,eAAL,kBAAKC,kBAAL;AACL,EAAAA,cAAA,iBAAc;AACd,EAAAA,cAAA,gBAAa;AACb,EAAAA,cAAA,mBAAgB;AAChB,EAAAA,cAAA,kBAAe;AAJL,SAAAA;AAAA,GAAA;AAOL,IAAK,eAAL,kBAAKC,kBAAL;AACL,EAAAA,cAAA,YAAS;AACT,EAAAA,cAAA,YAAS;AACT,EAAAA,cAAA,aAAU;AAHA,SAAAA;AAAA,GAAA;AAML,IAAK,aAAL,kBAAKC,gBAAL;AACL,EAAAA,YAAA,eAAY;AACZ,EAAAA,YAAA,UAAO;AAFG,SAAAA;AAAA,GAAA;AAKL,IAAK,cAAL,kBAAKC,iBAAL;AACL,EAAAA,aAAA,WAAQ;AACR,EAAAA,aAAA,UAAO;AAFG,SAAAA;AAAA,GAAA;;;ACdL,IAAK,eAAL,kBAAKC,kBAAL;AACL,EAAAA,cAAA,cAAW;AACX,EAAAA,cAAA,WAAQ;AACR,EAAAA,cAAA,gBAAa;AACb,EAAAA,cAAA,aAAU;AACV,EAAAA,cAAA,UAAO;AALG,SAAAA;AAAA,GAAA;;;ACHL,IAAK,eAAL,kBAAKC,kBAAL;AACL,EAAAA,cAAA,iBAAc;AACd,EAAAA,cAAA,gBAAa;AACb,EAAAA,cAAA,iBAAc;AAHJ,SAAAA;AAAA,GAAA;AAML,IAAK,sBAAL,kBAAKC,yBAAL;AACL,EAAAA,qBAAA,UAAO;AACP,EAAAA,qBAAA,WAAQ;AACR,EAAAA,qBAAA,UAAO;AACP,EAAAA,qBAAA,cAAW;AACX,EAAAA,qBAAA,WAAQ;AALE,SAAAA;AAAA,GAAA;;;ACEL,IAAK,iBAAL,kBAAKC,oBAAL;AACL,EAAAA,gBAAA,oBAAiB;AACjB,EAAAA,gBAAA,sBAAmB;AACnB,EAAAA,gBAAA,eAAY;AACZ,EAAAA,gBAAA,kBAAe;AAJL,SAAAA;AAAA,GAAA;","names":["EnumVerificationType","EnumAdShowOn","EnumAdStatus","EnumAdType","EnumAdStyle","EnumActivity","EnumPostType","EnumPostContentType","EnumGameStatus"]}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
declare enum EnumGameType {
|
|
2
|
+
DAILY_CLUE = "dailyClue"
|
|
3
|
+
}
|
|
4
|
+
type GameDate = {
|
|
5
|
+
startDate: Date;
|
|
6
|
+
endDate: Date;
|
|
7
|
+
};
|
|
2
8
|
|
|
3
9
|
declare const gameScreenIdentifierList: readonly [{
|
|
4
10
|
readonly clue: "Where your actions turn into a timeline.";
|
|
@@ -75,74 +81,24 @@ declare const gameScreenIdentifierList: readonly [{
|
|
|
75
81
|
}];
|
|
76
82
|
type GamePlacement = (typeof gameScreenIdentifierList)[number]["id"];
|
|
77
83
|
type GamePlacementClue = (typeof gameScreenIdentifierList)[number]["clue"];
|
|
78
|
-
declare enum EnumGameType {
|
|
79
|
-
DAILY_CLUE = "dailyClue"
|
|
80
|
-
}
|
|
81
84
|
declare const gameTypeToDisplayName: Record<EnumGameType, string>;
|
|
82
|
-
type
|
|
83
|
-
startDate: Date;
|
|
84
|
-
endDate: Date;
|
|
85
|
-
};
|
|
86
|
-
type BaseGame = {
|
|
85
|
+
type DailyClueBaseGame = {
|
|
87
86
|
gameDate: GameDate;
|
|
88
87
|
gameSolution: string;
|
|
89
88
|
gameType: EnumGameType;
|
|
90
89
|
};
|
|
91
90
|
type DailyClueGameData = {
|
|
92
|
-
gameFields:
|
|
91
|
+
gameFields: DailyClueBaseGame;
|
|
93
92
|
lastFoundDate: Date | null;
|
|
94
93
|
points: number;
|
|
95
94
|
letterInfo: {
|
|
96
95
|
collected: string[] | null;
|
|
97
|
-
|
|
98
|
-
todaysLetter: string | null;
|
|
96
|
+
solutionShuffled: string[];
|
|
99
97
|
todaysClue: GamePlacementClue | null;
|
|
98
|
+
todaysLetter: string | null;
|
|
100
99
|
todaysPlacement: GamePlacement | null;
|
|
101
100
|
};
|
|
102
101
|
streak: number;
|
|
103
102
|
};
|
|
104
|
-
declare enum EnumGameStatus {
|
|
105
|
-
GAME_COMPLETED = "GAME_COMPLETED",
|
|
106
|
-
GAME_IN_PROGRESS = "GAME_IN_PROGRESS",
|
|
107
|
-
GAME_LEFT = "GAME_LEFT",
|
|
108
|
-
GAME_STARTED = "GAME_STARTED"
|
|
109
|
-
}
|
|
110
|
-
type GameHistory = {
|
|
111
|
-
createdAt: Date;
|
|
112
|
-
gameDate: GameDate;
|
|
113
|
-
gameStatus: EnumGameStatus;
|
|
114
|
-
gameType: EnumGameType;
|
|
115
|
-
pointsEarned: number;
|
|
116
|
-
};
|
|
117
|
-
type GameDataMap = {
|
|
118
|
-
[EnumGameType.DAILY_CLUE]: DailyClueGameData;
|
|
119
|
-
};
|
|
120
|
-
type GameDataType = {
|
|
121
|
-
[K in keyof GameDataMap]?: GameDataMap[K] | null;
|
|
122
|
-
};
|
|
123
|
-
type GameType = {
|
|
124
|
-
_id: string;
|
|
125
|
-
active: boolean;
|
|
126
|
-
createdAt: Date;
|
|
127
|
-
gameData: GameDataType;
|
|
128
|
-
gameHistory: GameHistory[] | null;
|
|
129
|
-
gameType: EnumGameType;
|
|
130
|
-
updatedAt: Date | null;
|
|
131
|
-
};
|
|
132
|
-
type GameDocType = {
|
|
133
|
-
_id: string;
|
|
134
|
-
active: boolean;
|
|
135
|
-
createdAt: Date;
|
|
136
|
-
deletedAt: Date | null;
|
|
137
|
-
games: GameType[] | null;
|
|
138
|
-
owner: OwnerType;
|
|
139
|
-
points: number;
|
|
140
|
-
updatedAt: Date | null;
|
|
141
|
-
};
|
|
142
|
-
type GameLeaderboard = {
|
|
143
|
-
gameHistory: GameHistory[] | null;
|
|
144
|
-
overallPoints: number;
|
|
145
|
-
owner: OwnerType;
|
|
146
|
-
};
|
|
147
103
|
|
|
148
|
-
export { type
|
|
104
|
+
export { type DailyClueBaseGame as D, EnumGameType as E, type GameDate as G, type DailyClueGameData as a, type GamePlacement as b, type GamePlacementClue as c, gameTypeToDisplayName as d, gameScreenIdentifierList as g };
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
declare enum EnumGameType {
|
|
2
|
+
DAILY_CLUE = "dailyClue"
|
|
3
|
+
}
|
|
4
|
+
type GameDate = {
|
|
5
|
+
startDate: Date;
|
|
6
|
+
endDate: Date;
|
|
7
|
+
};
|
|
2
8
|
|
|
3
9
|
declare const gameScreenIdentifierList: readonly [{
|
|
4
10
|
readonly clue: "Where your actions turn into a timeline.";
|
|
@@ -75,74 +81,24 @@ declare const gameScreenIdentifierList: readonly [{
|
|
|
75
81
|
}];
|
|
76
82
|
type GamePlacement = (typeof gameScreenIdentifierList)[number]["id"];
|
|
77
83
|
type GamePlacementClue = (typeof gameScreenIdentifierList)[number]["clue"];
|
|
78
|
-
declare enum EnumGameType {
|
|
79
|
-
DAILY_CLUE = "dailyClue"
|
|
80
|
-
}
|
|
81
84
|
declare const gameTypeToDisplayName: Record<EnumGameType, string>;
|
|
82
|
-
type
|
|
83
|
-
startDate: Date;
|
|
84
|
-
endDate: Date;
|
|
85
|
-
};
|
|
86
|
-
type BaseGame = {
|
|
85
|
+
type DailyClueBaseGame = {
|
|
87
86
|
gameDate: GameDate;
|
|
88
87
|
gameSolution: string;
|
|
89
88
|
gameType: EnumGameType;
|
|
90
89
|
};
|
|
91
90
|
type DailyClueGameData = {
|
|
92
|
-
gameFields:
|
|
91
|
+
gameFields: DailyClueBaseGame;
|
|
93
92
|
lastFoundDate: Date | null;
|
|
94
93
|
points: number;
|
|
95
94
|
letterInfo: {
|
|
96
95
|
collected: string[] | null;
|
|
97
|
-
|
|
98
|
-
todaysLetter: string | null;
|
|
96
|
+
solutionShuffled: string[];
|
|
99
97
|
todaysClue: GamePlacementClue | null;
|
|
98
|
+
todaysLetter: string | null;
|
|
100
99
|
todaysPlacement: GamePlacement | null;
|
|
101
100
|
};
|
|
102
101
|
streak: number;
|
|
103
102
|
};
|
|
104
|
-
declare enum EnumGameStatus {
|
|
105
|
-
GAME_COMPLETED = "GAME_COMPLETED",
|
|
106
|
-
GAME_IN_PROGRESS = "GAME_IN_PROGRESS",
|
|
107
|
-
GAME_LEFT = "GAME_LEFT",
|
|
108
|
-
GAME_STARTED = "GAME_STARTED"
|
|
109
|
-
}
|
|
110
|
-
type GameHistory = {
|
|
111
|
-
createdAt: Date;
|
|
112
|
-
gameDate: GameDate;
|
|
113
|
-
gameStatus: EnumGameStatus;
|
|
114
|
-
gameType: EnumGameType;
|
|
115
|
-
pointsEarned: number;
|
|
116
|
-
};
|
|
117
|
-
type GameDataMap = {
|
|
118
|
-
[EnumGameType.DAILY_CLUE]: DailyClueGameData;
|
|
119
|
-
};
|
|
120
|
-
type GameDataType = {
|
|
121
|
-
[K in keyof GameDataMap]?: GameDataMap[K] | null;
|
|
122
|
-
};
|
|
123
|
-
type GameType = {
|
|
124
|
-
_id: string;
|
|
125
|
-
active: boolean;
|
|
126
|
-
createdAt: Date;
|
|
127
|
-
gameData: GameDataType;
|
|
128
|
-
gameHistory: GameHistory[] | null;
|
|
129
|
-
gameType: EnumGameType;
|
|
130
|
-
updatedAt: Date | null;
|
|
131
|
-
};
|
|
132
|
-
type GameDocType = {
|
|
133
|
-
_id: string;
|
|
134
|
-
active: boolean;
|
|
135
|
-
createdAt: Date;
|
|
136
|
-
deletedAt: Date | null;
|
|
137
|
-
games: GameType[] | null;
|
|
138
|
-
owner: OwnerType;
|
|
139
|
-
points: number;
|
|
140
|
-
updatedAt: Date | null;
|
|
141
|
-
};
|
|
142
|
-
type GameLeaderboard = {
|
|
143
|
-
gameHistory: GameHistory[] | null;
|
|
144
|
-
overallPoints: number;
|
|
145
|
-
owner: OwnerType;
|
|
146
|
-
};
|
|
147
103
|
|
|
148
|
-
export { type
|
|
104
|
+
export { type DailyClueBaseGame as D, EnumGameType as E, type GameDate as G, type DailyClueGameData as a, type GamePlacement as b, type GamePlacementClue as c, gameTypeToDisplayName as d, gameScreenIdentifierList as g };
|
|
@@ -324,7 +324,7 @@ var EnumRegions = /* @__PURE__ */ ((EnumRegions2) => {
|
|
|
324
324
|
return EnumRegions2;
|
|
325
325
|
})(EnumRegions || {});
|
|
326
326
|
|
|
327
|
-
// src/types/game.ts
|
|
327
|
+
// src/types/game/dailyClue.ts
|
|
328
328
|
var OBJECT_ID_PATH_SEGMENT = "[a-f0-9]{24}";
|
|
329
329
|
var OBJECT_ID_PATH_SEGMENT_END = `${OBJECT_ID_PATH_SEGMENT}$`;
|
|
330
330
|
var gameScreenIdentifierList = [
|
|
@@ -419,6 +419,9 @@ var gameScreenIdentifierList = [
|
|
|
419
419
|
match: "/visitors"
|
|
420
420
|
}
|
|
421
421
|
];
|
|
422
|
+
var gameTypeToDisplayName = {
|
|
423
|
+
["dailyClue" /* DAILY_CLUE */]: "Daily Clue"
|
|
424
|
+
};
|
|
422
425
|
|
|
423
426
|
// src/utils/date.ts
|
|
424
427
|
var import_dayjs = __toESM(require("dayjs"));
|