@kekkle/shared 1.4.1 → 1.5.0-next.2
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/esm/constants/collections.js +9 -6
- package/dist/esm/enums/group-permission.js +5 -2
- package/dist/esm/enums/push-settings-options.js +5 -2
- package/dist/esm/fixtures/character-state.fixtures.js +4 -1
- package/dist/esm/fixtures/wordle-row.fixtures.js +15 -9
- package/dist/esm/helpers/permissions/is-valid-permission.js +6 -3
- package/dist/esm/helpers/worlde/all-correct-in-row.js +4 -1
- package/dist/esm/helpers/worlde/calculate-wordle-score.js +7 -4
- package/dist/esm/types/comment.js +2 -1
- package/dist/esm/types/fcm-token.js +2 -1
- package/dist/esm/types/group-general-data.js +2 -1
- package/dist/esm/types/group-member.js +2 -1
- package/dist/esm/types/group.js +2 -1
- package/dist/esm/types/match-tries.js +2 -1
- package/dist/esm/types/push-document.js +2 -1
- package/dist/esm/types/quote.js +2 -1
- package/dist/esm/types/uid.js +2 -1
- package/dist/esm/types/user.js +2 -1
- package/dist/esm/types/wordle-game-state-document.js +2 -1
- package/dist/esm/types/wordle-game-state.js +2 -1
- package/dist/esm/types/wordle-game.js +2 -1
- package/dist/esm/types/wordle-leaderboard.js +2 -1
- package/dist/esm/types/wordle-monthly-score.js +2 -1
- package/dist/esm/types/wordle-score.js +2 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +5 -8
- package/dist/node/constants/collections.d.ts +0 -7
- package/dist/node/constants/collections.d.ts.map +0 -1
- package/dist/node/constants/collections.js +0 -6
- package/dist/node/enums/group-permission.d.ts +0 -6
- package/dist/node/enums/group-permission.d.ts.map +0 -1
- package/dist/node/enums/group-permission.js +0 -6
- package/dist/node/enums/push-settings-options.d.ts +0 -10
- package/dist/node/enums/push-settings-options.d.ts.map +0 -1
- package/dist/node/enums/push-settings-options.js +0 -10
- package/dist/node/fixtures/character-state.fixtures.d.ts +0 -3
- package/dist/node/fixtures/character-state.fixtures.d.ts.map +0 -1
- package/dist/node/fixtures/character-state.fixtures.js +0 -3
- package/dist/node/fixtures/wordle-row.fixtures.d.ts +0 -6
- package/dist/node/fixtures/wordle-row.fixtures.d.ts.map +0 -1
- package/dist/node/fixtures/wordle-row.fixtures.js +0 -20
- package/dist/node/helpers/permissions/is-valid-permission.d.ts +0 -2
- package/dist/node/helpers/permissions/is-valid-permission.d.ts.map +0 -1
- package/dist/node/helpers/permissions/is-valid-permission.js +0 -4
- package/dist/node/helpers/worlde/all-correct-in-row.d.ts +0 -6
- package/dist/node/helpers/worlde/all-correct-in-row.d.ts.map +0 -1
- package/dist/node/helpers/worlde/all-correct-in-row.js +0 -6
- package/dist/node/helpers/worlde/calculate-wordle-score.d.ts +0 -13
- package/dist/node/helpers/worlde/calculate-wordle-score.d.ts.map +0 -1
- package/dist/node/helpers/worlde/calculate-wordle-score.js +0 -42
- package/dist/node/types/comment.d.ts +0 -10
- package/dist/node/types/comment.d.ts.map +0 -1
- package/dist/node/types/comment.js +0 -1
- package/dist/node/types/fcm-token.d.ts +0 -2
- package/dist/node/types/fcm-token.d.ts.map +0 -1
- package/dist/node/types/fcm-token.js +0 -1
- package/dist/node/types/group-general-data.d.ts +0 -7
- package/dist/node/types/group-general-data.d.ts.map +0 -1
- package/dist/node/types/group-general-data.js +0 -1
- package/dist/node/types/group-member.d.ts +0 -9
- package/dist/node/types/group-member.d.ts.map +0 -1
- package/dist/node/types/group-member.js +0 -1
- package/dist/node/types/group.d.ts +0 -23
- package/dist/node/types/group.d.ts.map +0 -1
- package/dist/node/types/group.js +0 -1
- package/dist/node/types/match-tries.d.ts +0 -10
- package/dist/node/types/match-tries.d.ts.map +0 -1
- package/dist/node/types/match-tries.js +0 -1
- package/dist/node/types/push-document.d.ts +0 -21
- package/dist/node/types/push-document.d.ts.map +0 -1
- package/dist/node/types/push-document.js +0 -1
- package/dist/node/types/quote.d.ts +0 -13
- package/dist/node/types/quote.d.ts.map +0 -1
- package/dist/node/types/quote.js +0 -1
- package/dist/node/types/uid.d.ts +0 -2
- package/dist/node/types/uid.d.ts.map +0 -1
- package/dist/node/types/uid.js +0 -1
- package/dist/node/types/user.d.ts +0 -14
- package/dist/node/types/user.d.ts.map +0 -1
- package/dist/node/types/user.js +0 -1
- package/dist/node/types/wordle-game-state-document.d.ts +0 -13
- package/dist/node/types/wordle-game-state-document.d.ts.map +0 -1
- package/dist/node/types/wordle-game-state-document.js +0 -1
- package/dist/node/types/wordle-game-state.d.ts +0 -9
- package/dist/node/types/wordle-game-state.d.ts.map +0 -1
- package/dist/node/types/wordle-game-state.js +0 -1
- package/dist/node/types/wordle-game.d.ts +0 -19
- package/dist/node/types/wordle-game.d.ts.map +0 -1
- package/dist/node/types/wordle-game.js +0 -1
- package/dist/node/types/wordle-leaderboard.d.ts +0 -29
- package/dist/node/types/wordle-leaderboard.d.ts.map +0 -1
- package/dist/node/types/wordle-leaderboard.js +0 -1
- package/dist/node/types/wordle-monthly-score.d.ts +0 -33
- package/dist/node/types/wordle-monthly-score.d.ts.map +0 -1
- package/dist/node/types/wordle-monthly-score.js +0 -1
- package/dist/node/types/wordle-score.d.ts +0 -17
- package/dist/node/types/wordle-score.d.ts.map +0 -1
- package/dist/node/types/wordle-score.js +0 -1
- package/dist/tsconfig.node.tsbuildinfo +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is-valid-permission.d.ts","sourceRoot":"","sources":["../../../../src/helpers/permissions/is-valid-permission.ts"],"names":[],"mappings":"AAEA,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAE7D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"all-correct-in-row.d.ts","sourceRoot":"","sources":["../../../../src/helpers/worlde/all-correct-in-row.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAEzE;;GAEG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO,CAEvD"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { WordleGameState } from "../../types/wordle-game-state.js";
|
|
2
|
-
/**
|
|
3
|
-
* Calculates the score for a Wordle game based on the current game state.
|
|
4
|
-
*
|
|
5
|
-
* Scoring rules:
|
|
6
|
-
* - If the game is won (any row has all correct letters):
|
|
7
|
-
* - Base score equals the length of a row (typically 5)
|
|
8
|
-
* - Bonus points are added based on how quickly the word was guessed (6 minus attempts used)
|
|
9
|
-
* - If the game is not won yet:
|
|
10
|
-
* - Score equals the number of correct cells in the latest row
|
|
11
|
-
*/
|
|
12
|
-
export declare function calculateWordleScore(gameState: WordleGameState): number;
|
|
13
|
-
//# sourceMappingURL=calculate-wordle-score.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"calculate-wordle-score.d.ts","sourceRoot":"","sources":["../../../../src/helpers/worlde/calculate-wordle-score.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAGxE;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,eAAe,GAAG,MAAM,CAuCvE"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { allCorrectInRow } from "./all-correct-in-row.js";
|
|
2
|
-
/**
|
|
3
|
-
* Calculates the score for a Wordle game based on the current game state.
|
|
4
|
-
*
|
|
5
|
-
* Scoring rules:
|
|
6
|
-
* - If the game is won (any row has all correct letters):
|
|
7
|
-
* - Base score equals the length of a row (typically 5)
|
|
8
|
-
* - Bonus points are added based on how quickly the word was guessed (6 minus attempts used)
|
|
9
|
-
* - If the game is not won yet:
|
|
10
|
-
* - Score equals the number of correct cells in the latest row
|
|
11
|
-
*/
|
|
12
|
-
export function calculateWordleScore(gameState) {
|
|
13
|
-
// Handle empty game state
|
|
14
|
-
if (gameState.length === 0) {
|
|
15
|
-
return 0;
|
|
16
|
-
}
|
|
17
|
-
let score = 0;
|
|
18
|
-
let hasWon = false;
|
|
19
|
-
// Iterate over each row in the game state to check for a win condition
|
|
20
|
-
for (const row of gameState) {
|
|
21
|
-
// If all cells in a row are correct, the game is won
|
|
22
|
-
if (allCorrectInRow(row)) {
|
|
23
|
-
hasWon = true;
|
|
24
|
-
break;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
// Case 1: Game in progress (not yet won)
|
|
28
|
-
if (!hasWon) {
|
|
29
|
-
// Score is based on correct cells in the latest attempt
|
|
30
|
-
score = gameState[gameState.length - 1].filter((cell) => cell.isCorrect).length;
|
|
31
|
-
return score;
|
|
32
|
-
}
|
|
33
|
-
// Case 2: Game is won
|
|
34
|
-
// Base score is the row length (number of letters in the word)
|
|
35
|
-
score = gameState[0].length;
|
|
36
|
-
// Calculate which attempt was successful (1-based index)
|
|
37
|
-
const numberOfTriesNeeded = gameState.findIndex(allCorrectInRow) + 1;
|
|
38
|
-
// Award bonus points based on how quickly the word was guessed
|
|
39
|
-
// Maximum bonus (5) for first try, decreasing by 1 for each additional attempt
|
|
40
|
-
const bonusPoints = 6 - numberOfTriesNeeded;
|
|
41
|
-
return score + bonusPoints;
|
|
42
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Timestamp } from "firebase-admin/firestore";
|
|
2
|
-
type Comment = {
|
|
3
|
-
author: string;
|
|
4
|
-
comment: string;
|
|
5
|
-
date: Date | Timestamp;
|
|
6
|
-
};
|
|
7
|
-
export type PhotoComment = Comment;
|
|
8
|
-
export type QuoteComment = Comment;
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=comment.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"comment.d.ts","sourceRoot":"","sources":["../../../src/types/comment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAE1D,KAAK,OAAO,GAAG;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,IAAI,GAAG,SAAS,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC;AAEnC,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fcm-token.d.ts","sourceRoot":"","sources":["../../../src/types/fcm-token.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"group-general-data.d.ts","sourceRoot":"","sources":["../../../src/types/group-general-data.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { GroupPermission } from "../enums/group-permission.js";
|
|
2
|
-
import type { Timestamp } from "firebase-admin/firestore";
|
|
3
|
-
export type GroupMember = {
|
|
4
|
-
birthday: Timestamp | null;
|
|
5
|
-
name: string;
|
|
6
|
-
permission: GroupPermission;
|
|
7
|
-
profile_picture: string;
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=group-member.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"group-member.d.ts","sourceRoot":"","sources":["../../../src/types/group-member.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAE1D,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,SAAS,GAAG,IAAI,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,eAAe,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { Timestamp } from "firebase-admin/firestore";
|
|
2
|
-
import type { GroupGeneralData } from "../types/group-general-data.js";
|
|
3
|
-
import type { GroupMember } from "../types/group-member.js";
|
|
4
|
-
import type { Uid } from "../types/uid.js";
|
|
5
|
-
export type Group = {
|
|
6
|
-
created_at: Timestamp;
|
|
7
|
-
updated_at: Timestamp;
|
|
8
|
-
description: string | undefined;
|
|
9
|
-
general_data: GroupGeneralData;
|
|
10
|
-
ical_token: string;
|
|
11
|
-
join_token: string | null | undefined;
|
|
12
|
-
join_token_timestamp: Timestamp | null | undefined;
|
|
13
|
-
members: {
|
|
14
|
-
[key: Uid]: GroupMember;
|
|
15
|
-
};
|
|
16
|
-
members_uuids: string[];
|
|
17
|
-
name: string;
|
|
18
|
-
premium: boolean | null | undefined;
|
|
19
|
-
premium_till: Timestamp | null | undefined;
|
|
20
|
-
group_picture?: string;
|
|
21
|
-
group_picture_blurhash?: string;
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=group.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"group.d.ts","sourceRoot":"","sources":["../../../src/types/group.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAE1C,MAAM,MAAM,KAAK,GAAG;IAClB,UAAU,EAAE,SAAS,CAAC;IACtB,UAAU,EAAE,SAAS,CAAC;IACtB,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,YAAY,EAAE,gBAAgB,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACtC,oBAAoB,EAAE,SAAS,GAAG,IAAI,GAAG,SAAS,CAAC;IACnD,OAAO,EAAE;QACP,CAAC,GAAG,EAAE,GAAG,GAAG,WAAW,CAAC;KACzB,CAAC;IACF,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;IACpC,YAAY,EAAE,SAAS,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC,CAAC"}
|
package/dist/node/types/group.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"match-tries.d.ts","sourceRoot":"","sources":["../../../src/types/match-tries.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { Timestamp } from "firebase-admin/firestore";
|
|
2
|
-
import type { PushSettingsOptions } from "../enums/push-settings-options.js";
|
|
3
|
-
import type { Uid } from "../types/uid.js";
|
|
4
|
-
export type AllPushSettings = {
|
|
5
|
-
[key in PushSettingsOptions]: boolean | null;
|
|
6
|
-
};
|
|
7
|
-
export type GroupPushDocumentSettings = {
|
|
8
|
-
[key: Uid]: AllPushSettings;
|
|
9
|
-
};
|
|
10
|
-
export type GroupPushDocumentTokens = {
|
|
11
|
-
[key: Uid]: Array<PushTokenObject>;
|
|
12
|
-
};
|
|
13
|
-
export type PushTokenObject = {
|
|
14
|
-
token: string | null;
|
|
15
|
-
updated_at: Timestamp | string;
|
|
16
|
-
};
|
|
17
|
-
export type GroupPushDocument = {
|
|
18
|
-
settings: GroupPushDocumentSettings;
|
|
19
|
-
tokens: GroupPushDocumentTokens;
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=push-document.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"push-document.d.ts","sourceRoot":"","sources":["../../../src/types/push-document.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAE1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAE1C,MAAM,MAAM,eAAe,GAAG;KAC3B,GAAG,IAAI,mBAAmB,GAAG,OAAO,GAAG,IAAI;CAC7C,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,CAAC,GAAG,EAAE,GAAG,GAAG,eAAe,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,CAAC,GAAG,EAAE,GAAG,GAAG,KAAK,CAAC,eAAe,CAAC,CAAC;CACpC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,UAAU,EAAE,SAAS,GAAG,MAAM,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,yBAAyB,CAAC;IACpC,MAAM,EAAE,uBAAuB,CAAC;CACjC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { Timestamp } from "firebase-admin/firestore";
|
|
2
|
-
export type Quote = {
|
|
3
|
-
authors: Array<string> | null;
|
|
4
|
-
quote: string;
|
|
5
|
-
context: string | null;
|
|
6
|
-
created_by: string;
|
|
7
|
-
custom_author: string | null;
|
|
8
|
-
timestamp: Date | Timestamp;
|
|
9
|
-
trigrams: {
|
|
10
|
-
[key: string]: string;
|
|
11
|
-
} | null;
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=quote.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"quote.d.ts","sourceRoot":"","sources":["../../../src/types/quote.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAE1D,MAAM,MAAM,KAAK,GAAG;IAClB,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,IAAI,GAAG,SAAS,CAAC;IAC5B,QAAQ,EAAE;QACR,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;KACvB,GAAG,IAAI,CAAC;CACV,CAAC"}
|
package/dist/node/types/quote.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/node/types/uid.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"uid.d.ts","sourceRoot":"","sources":["../../../src/types/uid.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,GAAG,GAAG,MAAM,CAAC"}
|
package/dist/node/types/uid.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Timestamp } from "firebase-admin/firestore";
|
|
2
|
-
import type { PushTokenObject, AllPushSettings } from "../types/push-document.js";
|
|
3
|
-
export type User = {
|
|
4
|
-
active_group: "";
|
|
5
|
-
birthdate: Timestamp;
|
|
6
|
-
groups: string[];
|
|
7
|
-
message_tokens?: Array<PushTokenObject>;
|
|
8
|
-
push_settings?: AllPushSettings;
|
|
9
|
-
language?: string;
|
|
10
|
-
name: string;
|
|
11
|
-
new_auth_claim: boolean;
|
|
12
|
-
profile_picture: string;
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=user.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../src/types/user.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EAChB,MAAM,0BAA0B,CAAC;AAElC,MAAM,MAAM,IAAI,GAAG;IACjB,YAAY,EAAE,EAAE,CAAC;IACjB,SAAS,EAAE,SAAS,CAAC;IACrB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,cAAc,CAAC,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;IACxC,aAAa,CAAC,EAAE,eAAe,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC"}
|
package/dist/node/types/user.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { StringifiedWordleGameState } from "../types/wordle-game-state.js";
|
|
2
|
-
import type { Timestamp } from "firebase-admin/firestore";
|
|
3
|
-
export type WordleGameStateDocument = {
|
|
4
|
-
calculated_score: number;
|
|
5
|
-
game_state: StringifiedWordleGameState;
|
|
6
|
-
has_finished: boolean;
|
|
7
|
-
has_lost: boolean;
|
|
8
|
-
has_won: boolean;
|
|
9
|
-
number_of_tries_needed: number;
|
|
10
|
-
updated_at: Timestamp;
|
|
11
|
-
user_id: string;
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=wordle-game-state-document.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"wordle-game-state-document.d.ts","sourceRoot":"","sources":["../../../src/types/wordle-game-state-document.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAE1D,MAAM,MAAM,uBAAuB,GAAG;IACpC,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,0BAA0B,CAAC;IACvC,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,UAAU,EAAE,SAAS,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export type CharacterState = {
|
|
2
|
-
character: string;
|
|
3
|
-
isCorrect: boolean;
|
|
4
|
-
isLocked: boolean;
|
|
5
|
-
};
|
|
6
|
-
export type WordleRow = CharacterState[];
|
|
7
|
-
export type WordleGameState = WordleRow[];
|
|
8
|
-
export type StringifiedWordleGameState = string;
|
|
9
|
-
//# sourceMappingURL=wordle-game-state.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"wordle-game-state.d.ts","sourceRoot":"","sources":["../../../src/types/wordle-game-state.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,cAAc,EAAE,CAAC;AAEzC,MAAM,MAAM,eAAe,GAAG,SAAS,EAAE,CAAC;AAE1C,MAAM,MAAM,0BAA0B,GAAG,MAAM,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Timestamp } from "firebase-admin/firestore";
|
|
2
|
-
export type WordleGame = {
|
|
3
|
-
language: string;
|
|
4
|
-
word: string;
|
|
5
|
-
locked: boolean;
|
|
6
|
-
date: Timestamp;
|
|
7
|
-
created_at: Timestamp;
|
|
8
|
-
updated_at: Timestamp;
|
|
9
|
-
game_number: number;
|
|
10
|
-
year?: number;
|
|
11
|
-
month?: number;
|
|
12
|
-
date_number?: number;
|
|
13
|
-
day?: number;
|
|
14
|
-
year_utc?: number;
|
|
15
|
-
month_utc?: number;
|
|
16
|
-
date_number_utc?: number;
|
|
17
|
-
day_utc?: number;
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=wordle-game.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"wordle-game.d.ts","sourceRoot":"","sources":["../../../src/types/wordle-game.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAE1D,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,SAAS,CAAC;IAChB,UAAU,EAAE,SAAS,CAAC;IACtB,UAAU,EAAE,SAAS,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { Timestamp } from "firebase-admin/firestore";
|
|
2
|
-
import type { MatchTries } from "../types/match-tries.js";
|
|
3
|
-
export type WordleLeaderboard = {
|
|
4
|
-
created_at: Timestamp;
|
|
5
|
-
has_lost: number;
|
|
6
|
-
has_won: number;
|
|
7
|
-
language: string;
|
|
8
|
-
match_tries: MatchTries;
|
|
9
|
-
matches_played: string[];
|
|
10
|
-
new_score: number | null;
|
|
11
|
-
score: number;
|
|
12
|
-
updated_at: Timestamp;
|
|
13
|
-
username: string;
|
|
14
|
-
user_id: string;
|
|
15
|
-
};
|
|
16
|
-
export type PartialWordleLeaderboard = Partial<{
|
|
17
|
-
created_at: Timestamp;
|
|
18
|
-
has_lost: number;
|
|
19
|
-
has_won: number;
|
|
20
|
-
language: string;
|
|
21
|
-
match_tries: MatchTries;
|
|
22
|
-
matches_played: string[];
|
|
23
|
-
new_score: number | null;
|
|
24
|
-
score: number;
|
|
25
|
-
updated_at: Timestamp;
|
|
26
|
-
username: string;
|
|
27
|
-
user_id: string;
|
|
28
|
-
}>;
|
|
29
|
-
//# sourceMappingURL=wordle-leaderboard.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"wordle-leaderboard.d.ts","sourceRoot":"","sources":["../../../src/types/wordle-leaderboard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,UAAU,EAAE,SAAS,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,UAAU,CAAC;IACxB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,SAAS,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,OAAO,CAAC;IAC7C,UAAU,EAAE,SAAS,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,UAAU,CAAC;IACxB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,SAAS,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { Timestamp } from "firebase-admin/firestore";
|
|
2
|
-
import type { MatchTries } from "../types/match-tries.js";
|
|
3
|
-
export type WordleMonthlyScore = {
|
|
4
|
-
created_at: Timestamp;
|
|
5
|
-
has_lost: number;
|
|
6
|
-
has_won: number;
|
|
7
|
-
language: string;
|
|
8
|
-
match_tries: MatchTries;
|
|
9
|
-
matches_played: string[];
|
|
10
|
-
month: number;
|
|
11
|
-
new_score: number;
|
|
12
|
-
score: number;
|
|
13
|
-
updated_at: Timestamp;
|
|
14
|
-
user_id: string;
|
|
15
|
-
username: string;
|
|
16
|
-
year: number;
|
|
17
|
-
};
|
|
18
|
-
export type PartialWordleMonthlyScore = Partial<{
|
|
19
|
-
created_at: Timestamp;
|
|
20
|
-
has_lost: number;
|
|
21
|
-
has_won: number;
|
|
22
|
-
language: string;
|
|
23
|
-
match_tries: MatchTries;
|
|
24
|
-
matches_played: string[];
|
|
25
|
-
month: number;
|
|
26
|
-
new_score: number;
|
|
27
|
-
score: number;
|
|
28
|
-
updated_at: Timestamp;
|
|
29
|
-
user_id: string;
|
|
30
|
-
username: string;
|
|
31
|
-
year: number;
|
|
32
|
-
}>;
|
|
33
|
-
//# sourceMappingURL=wordle-monthly-score.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"wordle-monthly-score.d.ts","sourceRoot":"","sources":["../../../src/types/wordle-monthly-score.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,UAAU,EAAE,SAAS,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,UAAU,CAAC;IACxB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,SAAS,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,OAAO,CAAC;IAC9C,UAAU,EAAE,SAAS,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,UAAU,CAAC;IACxB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,SAAS,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { Timestamp } from "firebase-admin/firestore";
|
|
2
|
-
import type { StringifiedWordleGameState } from "../types/wordle-game-state.js";
|
|
3
|
-
export type WordleScore = {
|
|
4
|
-
created_at: Timestamp;
|
|
5
|
-
game_id: string;
|
|
6
|
-
game_state: StringifiedWordleGameState;
|
|
7
|
-
has_lost: boolean;
|
|
8
|
-
has_won: boolean;
|
|
9
|
-
language: string;
|
|
10
|
-
new_score: number | null;
|
|
11
|
-
score: number;
|
|
12
|
-
number_of_tries_needed: number;
|
|
13
|
-
updated_at: Timestamp;
|
|
14
|
-
user_id: string;
|
|
15
|
-
username: string;
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=wordle-score.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"wordle-score.d.ts","sourceRoot":"","sources":["../../../src/types/wordle-score.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAE/E,MAAM,MAAM,WAAW,GAAG;IACxB,UAAU,EAAE,SAAS,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,0BAA0B,CAAC;IACvC,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,sBAAsB,EAAE,MAAM,CAAC;IAC/B,UAAU,EAAE,SAAS,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|