waha-shared 1.0.457 → 1.0.458
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/data/bibleStatuses/bibleStatuses.json +198 -196
- package/dist/data/bibleTexts/bibleTexts.json +11 -0
- package/dist/data/languages/index.d.ts +5 -4
- package/dist/data/languages/languages.json +92 -20
- package/dist/data/languages/languages.schema.json +83 -3
- package/dist/data/languages/languages.zod.d.ts +94 -23
- package/dist/data/languages/languages.zod.js +78 -2
- package/dist/data/mediaDurations/mediaDurations.json +147 -128
- package/dist/data/releaseNotes/releaseNotes.json +56 -2
- package/dist/data/translationsApp/index.d.ts +33 -4
- package/dist/data/translationsApp/translationsApp.json +1190 -1
- package/dist/data/translationsApp/translationsApp.schema.json +85 -23
- package/dist/data/translationsApp/translationsApp.zod.d.ts +107 -18
- package/dist/data/translationsApp/translationsApp.zod.js +76 -30
- package/dist/functions/magicLink.d.ts +12 -22
- package/dist/functions/magicLink.js +19 -25
- package/dist/functions/sets.js +4 -4
- package/dist/functions/userPaths.d.ts +90 -0
- package/dist/functions/userPaths.js +55 -0
- package/dist/types/analytics.d.ts +3 -1
- package/dist/types/bibleChapters.d.ts +8 -0
- package/dist/types/bibleChapters.js +2 -1
- package/dist/types/bookmarks.d.ts +23 -0
- package/dist/types/bookmarks.js +19 -0
- package/dist/types/completions.d.ts +32 -1
- package/dist/types/completions.js +22 -0
- package/dist/types/logs.d.ts +83 -0
- package/dist/types/logs.js +52 -0
- package/dist/types/meetFavorites.d.ts +10 -0
- package/dist/types/meetFavorites.js +11 -0
- package/dist/types/notes.d.ts +10 -0
- package/dist/types/notes.js +13 -0
- package/dist/types/users.d.ts +189 -309
- package/dist/types/users.js +152 -135
- package/package.json +9 -9
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.userPaths = exports.SYNCED_SCALARS = exports.SYNCED_SUBCOLLECTIONS = exports.DEVICES_SUBCOLLECTION = exports.USERS_COLLECTION = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const languages_zod_1 = require("../data/languages/languages.zod");
|
|
6
|
+
const bookmarks_1 = require("../types/bookmarks");
|
|
7
|
+
const completions_1 = require("../types/completions");
|
|
8
|
+
const meetFavorites_1 = require("../types/meetFavorites");
|
|
9
|
+
const notes_1 = require("../types/notes");
|
|
10
|
+
/** Top-level collection holding one document per Waha user. */
|
|
11
|
+
exports.USERS_COLLECTION = 'users2';
|
|
12
|
+
/**
|
|
13
|
+
* The per-device subcollection segment under a user doc.
|
|
14
|
+
*/
|
|
15
|
+
exports.DEVICES_SUBCOLLECTION = 'devices';
|
|
16
|
+
/**
|
|
17
|
+
* The per-item, 2-way-synced subcollections under a user doc, each paired with
|
|
18
|
+
* the Zod schema its docs are validated against.
|
|
19
|
+
*/
|
|
20
|
+
exports.SYNCED_SUBCOLLECTIONS = {
|
|
21
|
+
completions: { segment: 'completions', schema: completions_1.CompletionEvent },
|
|
22
|
+
bookmarks: { segment: 'bookmarks', schema: bookmarks_1.Bookmark },
|
|
23
|
+
notes: { segment: 'notes', schema: notes_1.Note },
|
|
24
|
+
meetFavorites: {
|
|
25
|
+
segment: 'meetFavorites',
|
|
26
|
+
schema: meetFavorites_1.MeetFavorite,
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
/** Synced scalar docs (shape `{ value }`). */
|
|
30
|
+
exports.SYNCED_SCALARS = {
|
|
31
|
+
trainingUnlocked: { segment: 'synced/trainingUnlocked', schema: zod_1.z.boolean() },
|
|
32
|
+
appLanguage: { segment: 'synced/appLanguage', schema: languages_zod_1.LanguageId },
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Builds every Firestore path under a single user's document. Path strings work
|
|
36
|
+
* with both the admin and react-native Firestore SDKs, so this is shared.
|
|
37
|
+
*/
|
|
38
|
+
const userPaths = (uid) => {
|
|
39
|
+
const base = `${exports.USERS_COLLECTION}/${uid}`;
|
|
40
|
+
/** Join arbitrary segments onto the user doc, e.g. `child('devices', id)` */
|
|
41
|
+
const child = (...segments) => [base, ...segments].join('/');
|
|
42
|
+
return {
|
|
43
|
+
// The user document itself: `users2/{uid}`
|
|
44
|
+
base,
|
|
45
|
+
// The `devices` subcollection
|
|
46
|
+
devices: child(exports.DEVICES_SUBCOLLECTION),
|
|
47
|
+
device: (deviceId) => child(exports.DEVICES_SUBCOLLECTION, deviceId),
|
|
48
|
+
syncedSubcollection: (key) => child(exports.SYNCED_SUBCOLLECTIONS[key].segment),
|
|
49
|
+
// A single doc within a synced subcollection
|
|
50
|
+
syncedSubcollectionDoc: (key, id) => child(exports.SYNCED_SUBCOLLECTIONS[key].segment, id),
|
|
51
|
+
// A synced scalar doc
|
|
52
|
+
syncedScalar: (key) => child(exports.SYNCED_SCALARS[key].segment),
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
exports.userPaths = userPaths;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import z from 'zod';
|
|
2
2
|
import type { LanguageId } from '../data/languages/languages.zod';
|
|
3
|
+
import type { ArticleSession, BibleSession, WahaShareContent } from './logs';
|
|
3
4
|
import { StoplightOption } from './stoplight';
|
|
4
|
-
import type { ArticleSession, BibleSession, WahaShareContent } from './users';
|
|
5
5
|
export interface BaseEventParams {
|
|
6
6
|
meetLanguageId: LanguageId;
|
|
7
7
|
appInterfaceLanguageId: LanguageId;
|
|
@@ -59,6 +59,8 @@ type Share = {
|
|
|
59
59
|
payload: {
|
|
60
60
|
content: WahaShareContent;
|
|
61
61
|
lessonId?: string;
|
|
62
|
+
articleSlug?: string;
|
|
63
|
+
microLessonSlug?: string;
|
|
62
64
|
};
|
|
63
65
|
};
|
|
64
66
|
type Misc = {
|
|
@@ -20,6 +20,14 @@ export declare const BibleChapter: z.ZodObject<{
|
|
|
20
20
|
}, z.core.$strict>>;
|
|
21
21
|
}, z.core.$strict>;
|
|
22
22
|
export type BibleChapter = z.infer<typeof BibleChapter>;
|
|
23
|
+
export declare const BibleChapterFields: {
|
|
24
|
+
verses: "verses";
|
|
25
|
+
titles: "titles";
|
|
26
|
+
bookName: "bookName";
|
|
27
|
+
chapterId: "chapterId";
|
|
28
|
+
reference: "reference";
|
|
29
|
+
translationId: "translationId";
|
|
30
|
+
};
|
|
23
31
|
export declare const BibleChapters: z.ZodArray<z.ZodObject<{
|
|
24
32
|
bookName: z.ZodString;
|
|
25
33
|
chapterId: z.ZodString;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BibleChapters = exports.BibleChapter = exports.BibleVerse = void 0;
|
|
3
|
+
exports.BibleChapters = exports.BibleChapterFields = exports.BibleChapter = exports.BibleVerse = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.BibleVerse = zod_1.z
|
|
6
6
|
.object({
|
|
@@ -24,4 +24,5 @@ exports.BibleChapter = zod_1.z
|
|
|
24
24
|
verses: zod_1.z.array(exports.BibleVerse).min(1),
|
|
25
25
|
})
|
|
26
26
|
.strict();
|
|
27
|
+
exports.BibleChapterFields = exports.BibleChapter.keyof().enum;
|
|
27
28
|
exports.BibleChapters = zod_1.z.array(exports.BibleChapter);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const BookmarkIconName: z.ZodEnum<{
|
|
3
|
+
leaf: "leaf";
|
|
4
|
+
stars: "stars";
|
|
5
|
+
apple: "apple";
|
|
6
|
+
fish: "fish";
|
|
7
|
+
sunny: "sunny";
|
|
8
|
+
}>;
|
|
9
|
+
export type BookmarkIconName = z.infer<typeof BookmarkIconName>;
|
|
10
|
+
export declare const bookmarkIcons: ("leaf" | "stars" | "apple" | "fish" | "sunny")[];
|
|
11
|
+
/** A single bookmarked lesson. Keyed in Firestore by `icon`. */
|
|
12
|
+
export declare const Bookmark: z.ZodObject<{
|
|
13
|
+
icon: z.ZodEnum<{
|
|
14
|
+
leaf: "leaf";
|
|
15
|
+
stars: "stars";
|
|
16
|
+
apple: "apple";
|
|
17
|
+
fish: "fish";
|
|
18
|
+
sunny: "sunny";
|
|
19
|
+
}>;
|
|
20
|
+
languageId: z.ZodString;
|
|
21
|
+
lessonId: z.ZodString;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
export type Bookmark = z.infer<typeof Bookmark>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Bookmark = exports.bookmarkIcons = exports.BookmarkIconName = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const languages_zod_1 = require("../data/languages/languages.zod");
|
|
6
|
+
exports.BookmarkIconName = zod_1.z.enum([
|
|
7
|
+
'leaf',
|
|
8
|
+
'stars',
|
|
9
|
+
'apple',
|
|
10
|
+
'fish',
|
|
11
|
+
'sunny',
|
|
12
|
+
]);
|
|
13
|
+
exports.bookmarkIcons = exports.BookmarkIconName.options;
|
|
14
|
+
/** A single bookmarked lesson. Keyed in Firestore by `icon`. */
|
|
15
|
+
exports.Bookmark = zod_1.z.object({
|
|
16
|
+
icon: exports.BookmarkIconName,
|
|
17
|
+
languageId: languages_zod_1.LanguageId,
|
|
18
|
+
lessonId: zod_1.z.string(),
|
|
19
|
+
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import z from 'zod';
|
|
2
2
|
export interface SetProgress {
|
|
3
3
|
completionEvents: CompletionEvent[];
|
|
4
4
|
uniqueCompletions: CompletionEvent[];
|
|
@@ -6,3 +6,34 @@ export interface SetProgress {
|
|
|
6
6
|
progress: number;
|
|
7
7
|
percent: number;
|
|
8
8
|
}
|
|
9
|
+
export declare const CompletionEvent: z.ZodObject<{
|
|
10
|
+
lessonId: z.ZodString;
|
|
11
|
+
meetLanguageId: z.ZodString;
|
|
12
|
+
time: z.ZodNumber;
|
|
13
|
+
country: z.ZodOptional<z.ZodString>;
|
|
14
|
+
region: z.ZodOptional<z.ZodString>;
|
|
15
|
+
city: z.ZodOptional<z.ZodString>;
|
|
16
|
+
manual: z.ZodOptional<z.ZodBoolean>;
|
|
17
|
+
howManyObeyed: z.ZodOptional<z.ZodEnum<{
|
|
18
|
+
red: "red";
|
|
19
|
+
yellow: "yellow";
|
|
20
|
+
green: "green";
|
|
21
|
+
}>>;
|
|
22
|
+
howManyShared: z.ZodOptional<z.ZodEnum<{
|
|
23
|
+
red: "red";
|
|
24
|
+
yellow: "yellow";
|
|
25
|
+
green: "green";
|
|
26
|
+
}>>;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
export type CompletionEvent = z.infer<typeof CompletionEvent>;
|
|
29
|
+
export declare const CompletionEventFields: {
|
|
30
|
+
city: "city";
|
|
31
|
+
lessonId: "lessonId";
|
|
32
|
+
meetLanguageId: "meetLanguageId";
|
|
33
|
+
time: "time";
|
|
34
|
+
country: "country";
|
|
35
|
+
region: "region";
|
|
36
|
+
manual: "manual";
|
|
37
|
+
howManyObeyed: "howManyObeyed";
|
|
38
|
+
howManyShared: "howManyShared";
|
|
39
|
+
};
|
|
@@ -1,2 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.CompletionEventFields = exports.CompletionEvent = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
const languages_zod_1 = require("../data/languages/languages.zod");
|
|
9
|
+
const stoplight_1 = require("./stoplight");
|
|
10
|
+
exports.CompletionEvent = zod_1.default.object({
|
|
11
|
+
lessonId: zod_1.default.string(),
|
|
12
|
+
meetLanguageId: languages_zod_1.LanguageId,
|
|
13
|
+
time: zod_1.default.number(),
|
|
14
|
+
country: zod_1.default.string().optional(),
|
|
15
|
+
region: zod_1.default.string().optional(),
|
|
16
|
+
city: zod_1.default.string().optional(),
|
|
17
|
+
manual: zod_1.default
|
|
18
|
+
.boolean()
|
|
19
|
+
.optional()
|
|
20
|
+
.describe('Indicates that the lesson was completed manually from the lesson sheet rather than automatically by doing the lesson on the lesson screen.'),
|
|
21
|
+
howManyObeyed: stoplight_1.StoplightOption.optional(),
|
|
22
|
+
howManyShared: stoplight_1.StoplightOption.optional(),
|
|
23
|
+
});
|
|
24
|
+
exports.CompletionEventFields = exports.CompletionEvent.keyof().enum;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import z from 'zod';
|
|
2
|
+
export declare const WahaShareContent: z.ZodEnum<{
|
|
3
|
+
lesson: "lesson";
|
|
4
|
+
note: "note";
|
|
5
|
+
setLink: "setLink";
|
|
6
|
+
lessonLink: "lessonLink";
|
|
7
|
+
app: "app";
|
|
8
|
+
passcode: "passcode";
|
|
9
|
+
lessonAudio: "lessonAudio";
|
|
10
|
+
lessonText: "lessonText";
|
|
11
|
+
storyText: "storyText";
|
|
12
|
+
storyAudio: "storyAudio";
|
|
13
|
+
meetingInvite: "meetingInvite";
|
|
14
|
+
meetingInviteOnboarding: "meetingInviteOnboarding";
|
|
15
|
+
articleLink: "articleLink";
|
|
16
|
+
videoLink: "videoLink";
|
|
17
|
+
notification: "notification";
|
|
18
|
+
meetingSchedule: "meetingSchedule";
|
|
19
|
+
scriptureText: "scriptureText";
|
|
20
|
+
mt: "mt";
|
|
21
|
+
scriptureAudio: "scriptureAudio";
|
|
22
|
+
inviteGroup: "inviteGroup";
|
|
23
|
+
offlineVersionLink: "offlineVersionLink";
|
|
24
|
+
customSet: "customSet";
|
|
25
|
+
microLesson: "microLesson";
|
|
26
|
+
}>;
|
|
27
|
+
export type WahaShareContent = z.infer<typeof WahaShareContent>;
|
|
28
|
+
export declare const ShareLogEvent: z.ZodObject<{
|
|
29
|
+
time: z.ZodNumber;
|
|
30
|
+
content: z.ZodEnum<{
|
|
31
|
+
lesson: "lesson";
|
|
32
|
+
note: "note";
|
|
33
|
+
setLink: "setLink";
|
|
34
|
+
lessonLink: "lessonLink";
|
|
35
|
+
app: "app";
|
|
36
|
+
passcode: "passcode";
|
|
37
|
+
lessonAudio: "lessonAudio";
|
|
38
|
+
lessonText: "lessonText";
|
|
39
|
+
storyText: "storyText";
|
|
40
|
+
storyAudio: "storyAudio";
|
|
41
|
+
meetingInvite: "meetingInvite";
|
|
42
|
+
meetingInviteOnboarding: "meetingInviteOnboarding";
|
|
43
|
+
articleLink: "articleLink";
|
|
44
|
+
videoLink: "videoLink";
|
|
45
|
+
notification: "notification";
|
|
46
|
+
meetingSchedule: "meetingSchedule";
|
|
47
|
+
scriptureText: "scriptureText";
|
|
48
|
+
mt: "mt";
|
|
49
|
+
scriptureAudio: "scriptureAudio";
|
|
50
|
+
inviteGroup: "inviteGroup";
|
|
51
|
+
offlineVersionLink: "offlineVersionLink";
|
|
52
|
+
customSet: "customSet";
|
|
53
|
+
microLesson: "microLesson";
|
|
54
|
+
}>;
|
|
55
|
+
lessonId: z.ZodOptional<z.ZodString>;
|
|
56
|
+
articleSlug: z.ZodOptional<z.ZodString>;
|
|
57
|
+
microLessonSlug: z.ZodOptional<z.ZodString>;
|
|
58
|
+
}, z.core.$strip>;
|
|
59
|
+
export type ShareLogEvent = z.infer<typeof ShareLogEvent>;
|
|
60
|
+
export declare const BibleSession: z.ZodObject<{
|
|
61
|
+
chapter: z.ZodString;
|
|
62
|
+
timeSpent: z.ZodNumber;
|
|
63
|
+
startTime: z.ZodNumber;
|
|
64
|
+
translation: z.ZodString;
|
|
65
|
+
}, z.core.$strip>;
|
|
66
|
+
export type BibleSession = z.infer<typeof BibleSession>;
|
|
67
|
+
export declare const BibleSessionFields: {
|
|
68
|
+
chapter: "chapter";
|
|
69
|
+
startTime: "startTime";
|
|
70
|
+
timeSpent: "timeSpent";
|
|
71
|
+
translation: "translation";
|
|
72
|
+
};
|
|
73
|
+
export declare const ArticleSession: z.ZodObject<{
|
|
74
|
+
articleSlug: z.ZodString;
|
|
75
|
+
timeSpent: z.ZodNumber;
|
|
76
|
+
startTime: z.ZodNumber;
|
|
77
|
+
}, z.core.$strip>;
|
|
78
|
+
export type ArticleSession = z.infer<typeof ArticleSession>;
|
|
79
|
+
export declare const ArticleSessionFields: {
|
|
80
|
+
startTime: "startTime";
|
|
81
|
+
articleSlug: "articleSlug";
|
|
82
|
+
timeSpent: "timeSpent";
|
|
83
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ArticleSessionFields = exports.ArticleSession = exports.BibleSessionFields = exports.BibleSession = exports.ShareLogEvent = exports.WahaShareContent = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
exports.WahaShareContent = zod_1.default.enum([
|
|
9
|
+
'app',
|
|
10
|
+
'passcode',
|
|
11
|
+
'lessonAudio',
|
|
12
|
+
'lessonText',
|
|
13
|
+
'storyText',
|
|
14
|
+
'storyAudio',
|
|
15
|
+
'lessonLink',
|
|
16
|
+
'setLink',
|
|
17
|
+
'meetingInvite',
|
|
18
|
+
'meetingInviteOnboarding',
|
|
19
|
+
'articleLink',
|
|
20
|
+
'videoLink',
|
|
21
|
+
'notification',
|
|
22
|
+
'meetingSchedule',
|
|
23
|
+
'scriptureText',
|
|
24
|
+
'mt',
|
|
25
|
+
'scriptureAudio',
|
|
26
|
+
'inviteGroup',
|
|
27
|
+
'lesson',
|
|
28
|
+
'offlineVersionLink',
|
|
29
|
+
'note',
|
|
30
|
+
'customSet',
|
|
31
|
+
'microLesson',
|
|
32
|
+
]);
|
|
33
|
+
exports.ShareLogEvent = zod_1.default.object({
|
|
34
|
+
time: zod_1.default.number(),
|
|
35
|
+
content: exports.WahaShareContent,
|
|
36
|
+
lessonId: zod_1.default.string().optional(),
|
|
37
|
+
articleSlug: zod_1.default.string().optional(),
|
|
38
|
+
microLessonSlug: zod_1.default.string().optional(),
|
|
39
|
+
});
|
|
40
|
+
exports.BibleSession = zod_1.default.object({
|
|
41
|
+
chapter: zod_1.default.string(),
|
|
42
|
+
timeSpent: zod_1.default.number(),
|
|
43
|
+
startTime: zod_1.default.number(),
|
|
44
|
+
translation: zod_1.default.string(),
|
|
45
|
+
});
|
|
46
|
+
exports.BibleSessionFields = exports.BibleSession.keyof().enum;
|
|
47
|
+
exports.ArticleSession = zod_1.default.object({
|
|
48
|
+
articleSlug: zod_1.default.string(),
|
|
49
|
+
timeSpent: zod_1.default.number(),
|
|
50
|
+
startTime: zod_1.default.number(),
|
|
51
|
+
});
|
|
52
|
+
exports.ArticleSessionFields = exports.ArticleSession.keyof().enum;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* A single favorited meet language. Stored this way both locally and as its own
|
|
4
|
+
* Firestore doc (`meetFavorites/{languageId}`), so the local slice mirrors the
|
|
5
|
+
* subcollection exactly — like completions/bookmarks/notes.
|
|
6
|
+
*/
|
|
7
|
+
export declare const MeetFavorite: z.ZodObject<{
|
|
8
|
+
languageId: z.ZodString;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export type MeetFavorite = z.infer<typeof MeetFavorite>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MeetFavorite = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const languages_zod_1 = require("../data/languages/languages.zod");
|
|
6
|
+
/**
|
|
7
|
+
* A single favorited meet language. Stored this way both locally and as its own
|
|
8
|
+
* Firestore doc (`meetFavorites/{languageId}`), so the local slice mirrors the
|
|
9
|
+
* subcollection exactly — like completions/bookmarks/notes.
|
|
10
|
+
*/
|
|
11
|
+
exports.MeetFavorite = zod_1.z.object({ languageId: languages_zod_1.LanguageId });
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** A single user note. Keyed in Firestore by `sessionId`. */
|
|
3
|
+
export declare const Note: z.ZodObject<{
|
|
4
|
+
sessionId: z.ZodString;
|
|
5
|
+
content: z.ZodString;
|
|
6
|
+
createdAt: z.ZodNumber;
|
|
7
|
+
lessonId: z.ZodString;
|
|
8
|
+
languageId: z.ZodString;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export type Note = z.infer<typeof Note>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Note = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const languages_zod_1 = require("../data/languages/languages.zod");
|
|
6
|
+
/** A single user note. Keyed in Firestore by `sessionId`. */
|
|
7
|
+
exports.Note = zod_1.z.object({
|
|
8
|
+
sessionId: zod_1.z.string(),
|
|
9
|
+
content: zod_1.z.string(),
|
|
10
|
+
createdAt: zod_1.z.number(),
|
|
11
|
+
lessonId: zod_1.z.string(),
|
|
12
|
+
languageId: languages_zod_1.LanguageId,
|
|
13
|
+
});
|