waha-shared 1.0.456 → 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.
Files changed (35) hide show
  1. package/dist/data/bibleStatuses/bibleStatuses.json +198 -196
  2. package/dist/data/bibleTexts/bibleTexts.json +11 -0
  3. package/dist/data/languages/index.d.ts +5 -4
  4. package/dist/data/languages/languages.json +92 -20
  5. package/dist/data/languages/languages.schema.json +83 -3
  6. package/dist/data/languages/languages.zod.d.ts +94 -23
  7. package/dist/data/languages/languages.zod.js +78 -2
  8. package/dist/data/mediaDurations/mediaDurations.json +147 -128
  9. package/dist/data/releaseNotes/releaseNotes.json +56 -2
  10. package/dist/data/translationsApp/index.d.ts +33 -4
  11. package/dist/data/translationsApp/translationsApp.json +1190 -1
  12. package/dist/data/translationsApp/translationsApp.schema.json +85 -23
  13. package/dist/data/translationsApp/translationsApp.zod.d.ts +107 -18
  14. package/dist/data/translationsApp/translationsApp.zod.js +76 -30
  15. package/dist/functions/magicLink.d.ts +12 -22
  16. package/dist/functions/magicLink.js +19 -25
  17. package/dist/functions/sets.js +4 -4
  18. package/dist/functions/userPaths.d.ts +90 -0
  19. package/dist/functions/userPaths.js +55 -0
  20. package/dist/types/analytics.d.ts +3 -1
  21. package/dist/types/bibleChapters.d.ts +8 -0
  22. package/dist/types/bibleChapters.js +2 -1
  23. package/dist/types/bookmarks.d.ts +23 -0
  24. package/dist/types/bookmarks.js +19 -0
  25. package/dist/types/completions.d.ts +32 -1
  26. package/dist/types/completions.js +22 -0
  27. package/dist/types/logs.d.ts +83 -0
  28. package/dist/types/logs.js +52 -0
  29. package/dist/types/meetFavorites.d.ts +10 -0
  30. package/dist/types/meetFavorites.js +11 -0
  31. package/dist/types/notes.d.ts +10 -0
  32. package/dist/types/notes.js +13 -0
  33. package/dist/types/users.d.ts +189 -309
  34. package/dist/types/users.js +152 -135
  35. package/package.json +9 -9
@@ -11,6 +11,28 @@
11
11
  "additionalProperties": {
12
12
  "type": "object",
13
13
  "properties": {
14
+ "how_many_shared": { "type": "string" },
15
+ "how_many_obeyed": { "type": "string" },
16
+ "most": { "type": "string" },
17
+ "some": { "type": "string" },
18
+ "none": { "type": "string" },
19
+ "highlight_verse": { "type": "string" },
20
+ "join_others_discovering": { "type": "string" },
21
+ "people_shared_last_week": { "type": "string" },
22
+ "onboarding_dbs_intro_heading": { "type": "string" },
23
+ "onboarding_dbs_intro_body": { "type": "string" },
24
+ "onboarding_invite_group_heading": { "type": "string" },
25
+ "onboarding_invite_group_body": { "type": "string" },
26
+ "popups_need_help_with_group_title": { "type": "string" },
27
+ "popups_need_help_with_group_message": { "type": "string" },
28
+ "popups_micro_lessons_banner": { "type": "string" },
29
+ "question_in_a_group": { "type": "string" },
30
+ "question_what_brings_you_question": { "type": "string" },
31
+ "question_what_brings_you_body": { "type": "string" },
32
+ "question_what_brings_you_option_1": { "type": "string" },
33
+ "question_what_brings_you_option_2": { "type": "string" },
34
+ "question_what_brings_you_option_3": { "type": "string" },
35
+ "question_what_brings_you_option_4": { "type": "string" },
14
36
  "name": { "type": "string", "minLength": 1 },
15
37
  "version": { "type": "string", "minLength": 1 },
16
38
  "a11y_add_secondary_language_hint": {
@@ -502,35 +524,42 @@
502
524
  "micro_lessons": { "type": "string", "minLength": 1 },
503
525
  "filter_micro_lessons": { "type": "string", "minLength": 1 },
504
526
  "question_placeholder": { "type": "string", "minLength": 1 },
505
- "how_many_shared": { "type": "string" },
506
- "how_many_obeyed": { "type": "string" },
507
- "most": { "type": "string" },
508
- "some": { "type": "string" },
509
- "none": { "type": "string" },
510
- "highlight_verse": { "type": "string" },
511
527
  "no_text_available": { "type": "string" },
512
- "join_others_discovering": { "type": "string" },
513
- "people_shared_last_week": { "type": "string" },
514
- "onboarding_dbs_intro_heading": { "type": "string" },
515
- "onboarding_dbs_intro_body": { "type": "string" },
516
- "onboarding_invite_group_heading": { "type": "string" },
517
- "onboarding_invite_group_body": { "type": "string" },
518
- "popups_need_help_with_group_title": { "type": "string" },
519
- "popups_need_help_with_group_message": { "type": "string" },
520
- "popups_micro_lessons_banner": { "type": "string" },
521
- "question_in_a_group": { "type": "string" },
522
- "question_what_brings_you_question": { "type": "string" },
523
- "question_what_brings_you_body": { "type": "string" },
524
- "question_what_brings_you_option_1": { "type": "string" },
525
- "question_what_brings_you_option_2": { "type": "string" },
526
- "question_what_brings_you_option_3": { "type": "string" },
527
- "question_what_brings_you_option_4": { "type": "string" },
528
528
  "share_story_audio": { "type": "string" },
529
529
  "read_along": { "type": "string" },
530
530
  "choose_read_along_bible": { "type": "string" },
531
531
  "exit": { "type": "string" },
532
532
  "stay": { "type": "string" },
533
533
  "popups_exit_micro_lesson": { "type": "string" },
534
+ "popups_auth_errors_too_many_requests": { "type": "string" },
535
+ "popups_auth_errors_user_disabled": { "type": "string" },
536
+ "popups_auth_errors_provider_error": { "type": "string" },
537
+ "popups_auth_errors_generic": { "type": "string" },
538
+ "popups_auth_errors_link_expired": { "type": "string" },
539
+ "popups_auth_errors_link_wrong_device": { "type": "string" },
540
+ "sign_in_or_create_account": { "type": "string" },
541
+ "continue_with": { "type": "string" },
542
+ "delete_account": { "type": "string" },
543
+ "sign_out": { "type": "string" },
544
+ "account": { "type": "string" },
545
+ "already_have_an_account": { "type": "string" },
546
+ "popups_sign_out_confirm": { "type": "string" },
547
+ "popups_delete_account_confirm": { "type": "string" },
548
+ "sign_in_failed": { "type": "string" },
549
+ "sign_in_successful": { "type": "string" },
550
+ "signing_you_in": { "type": "string" },
551
+ "set_name_prompt": { "type": "string" },
552
+ "privacy_policy_agreement": { "type": "string" },
553
+ "sign_in_card_title": { "type": "string" },
554
+ "sign_in_card_body": { "type": "string" },
555
+ "signed_in": { "type": "string" },
556
+ "signed_out": { "type": "string" },
557
+ "wont_ask_again": { "type": "string" },
558
+ "popups_magic_link_sent_title": { "type": "string" },
559
+ "popups_magic_link_sent_message": { "type": "string" },
560
+ "edit_account": { "type": "string" },
561
+ "save": { "type": "string" },
562
+ "or": { "type": "string" },
534
563
  "finish_signing_in": { "type": "string" },
535
564
  "open_in_waha": { "type": "string" }
536
565
  },
@@ -849,9 +878,42 @@
849
878
  "question_placeholder",
850
879
  "no_text_available",
851
880
  "share_story_audio",
881
+ "read_along",
882
+ "choose_read_along_bible",
852
883
  "exit",
853
884
  "stay",
854
- "popups_exit_micro_lesson"
885
+ "popups_exit_micro_lesson",
886
+ "popups_auth_errors_too_many_requests",
887
+ "popups_auth_errors_user_disabled",
888
+ "popups_auth_errors_provider_error",
889
+ "popups_auth_errors_generic",
890
+ "popups_auth_errors_link_expired",
891
+ "popups_auth_errors_link_wrong_device",
892
+ "sign_in_or_create_account",
893
+ "continue_with",
894
+ "delete_account",
895
+ "sign_out",
896
+ "account",
897
+ "already_have_an_account",
898
+ "popups_sign_out_confirm",
899
+ "popups_delete_account_confirm",
900
+ "sign_in_failed",
901
+ "sign_in_successful",
902
+ "signing_you_in",
903
+ "set_name_prompt",
904
+ "privacy_policy_agreement",
905
+ "sign_in_card_title",
906
+ "sign_in_card_body",
907
+ "signed_in",
908
+ "signed_out",
909
+ "wont_ask_again",
910
+ "popups_magic_link_sent_title",
911
+ "popups_magic_link_sent_message",
912
+ "edit_account",
913
+ "save",
914
+ "or",
915
+ "finish_signing_in",
916
+ "open_in_waha"
855
917
  ],
856
918
  "additionalProperties": false,
857
919
  "description": "Translations for a single language (identified by a 3-letter code)_"
@@ -1,4 +1,35 @@
1
1
  import { z } from 'zod';
2
+ /**
3
+ * These are trickier strings that contain more contextual words and need to be
4
+ * proofread by a human. Thus, we may launch app updates without certain
5
+ * languages having translated them, and the app needs to handle this
6
+ * gracefully. Once they are fully translated by all launched languages, they
7
+ * can be moved out of this schema and into the main translations schema.
8
+ */
9
+ export declare const TrickyStrings: z.ZodObject<{
10
+ how_many_shared: z.ZodOptional<z.ZodString>;
11
+ how_many_obeyed: z.ZodOptional<z.ZodString>;
12
+ most: z.ZodOptional<z.ZodString>;
13
+ some: z.ZodOptional<z.ZodString>;
14
+ none: z.ZodOptional<z.ZodString>;
15
+ highlight_verse: z.ZodOptional<z.ZodString>;
16
+ join_others_discovering: z.ZodOptional<z.ZodString>;
17
+ people_shared_last_week: z.ZodOptional<z.ZodString>;
18
+ onboarding_dbs_intro_heading: z.ZodOptional<z.ZodString>;
19
+ onboarding_dbs_intro_body: z.ZodOptional<z.ZodString>;
20
+ onboarding_invite_group_heading: z.ZodOptional<z.ZodString>;
21
+ onboarding_invite_group_body: z.ZodOptional<z.ZodString>;
22
+ popups_need_help_with_group_title: z.ZodOptional<z.ZodString>;
23
+ popups_need_help_with_group_message: z.ZodOptional<z.ZodString>;
24
+ popups_micro_lessons_banner: z.ZodOptional<z.ZodString>;
25
+ question_in_a_group: z.ZodOptional<z.ZodString>;
26
+ question_what_brings_you_question: z.ZodOptional<z.ZodString>;
27
+ question_what_brings_you_body: z.ZodOptional<z.ZodString>;
28
+ question_what_brings_you_option_1: z.ZodOptional<z.ZodString>;
29
+ question_what_brings_you_option_2: z.ZodOptional<z.ZodString>;
30
+ question_what_brings_you_option_3: z.ZodOptional<z.ZodString>;
31
+ question_what_brings_you_option_4: z.ZodOptional<z.ZodString>;
32
+ }, z.core.$strip>;
2
33
  export declare const LanguageTranslationsApp: z.ZodObject<{
3
34
  name: z.ZodString;
4
35
  version: z.ZodString;
@@ -312,13 +343,50 @@ export declare const LanguageTranslationsApp: z.ZodObject<{
312
343
  micro_lessons: z.ZodString;
313
344
  filter_micro_lessons: z.ZodString;
314
345
  question_placeholder: z.ZodString;
346
+ no_text_available: z.ZodString;
347
+ share_story_audio: z.ZodString;
348
+ read_along: z.ZodString;
349
+ choose_read_along_bible: z.ZodString;
350
+ exit: z.ZodString;
351
+ stay: z.ZodString;
352
+ popups_exit_micro_lesson: z.ZodString;
353
+ popups_auth_errors_too_many_requests: z.ZodString;
354
+ popups_auth_errors_user_disabled: z.ZodString;
355
+ popups_auth_errors_provider_error: z.ZodString;
356
+ popups_auth_errors_generic: z.ZodString;
357
+ popups_auth_errors_link_expired: z.ZodString;
358
+ popups_auth_errors_link_wrong_device: z.ZodString;
359
+ sign_in_or_create_account: z.ZodString;
360
+ continue_with: z.ZodString;
361
+ delete_account: z.ZodString;
362
+ sign_out: z.ZodString;
363
+ account: z.ZodString;
364
+ already_have_an_account: z.ZodString;
365
+ popups_sign_out_confirm: z.ZodString;
366
+ popups_delete_account_confirm: z.ZodString;
367
+ sign_in_failed: z.ZodString;
368
+ sign_in_successful: z.ZodString;
369
+ signing_you_in: z.ZodString;
370
+ set_name_prompt: z.ZodString;
371
+ privacy_policy_agreement: z.ZodString;
372
+ sign_in_card_title: z.ZodString;
373
+ sign_in_card_body: z.ZodString;
374
+ signed_in: z.ZodString;
375
+ signed_out: z.ZodString;
376
+ wont_ask_again: z.ZodString;
377
+ popups_magic_link_sent_title: z.ZodString;
378
+ popups_magic_link_sent_message: z.ZodString;
379
+ edit_account: z.ZodString;
380
+ save: z.ZodString;
381
+ or: z.ZodString;
382
+ finish_signing_in: z.ZodString;
383
+ open_in_waha: z.ZodString;
315
384
  how_many_shared: z.ZodOptional<z.ZodString>;
316
385
  how_many_obeyed: z.ZodOptional<z.ZodString>;
317
386
  most: z.ZodOptional<z.ZodString>;
318
387
  some: z.ZodOptional<z.ZodString>;
319
388
  none: z.ZodOptional<z.ZodString>;
320
389
  highlight_verse: z.ZodOptional<z.ZodString>;
321
- no_text_available: z.ZodString;
322
390
  join_others_discovering: z.ZodOptional<z.ZodString>;
323
391
  people_shared_last_week: z.ZodOptional<z.ZodString>;
324
392
  onboarding_dbs_intro_heading: z.ZodOptional<z.ZodString>;
@@ -335,14 +403,6 @@ export declare const LanguageTranslationsApp: z.ZodObject<{
335
403
  question_what_brings_you_option_2: z.ZodOptional<z.ZodString>;
336
404
  question_what_brings_you_option_3: z.ZodOptional<z.ZodString>;
337
405
  question_what_brings_you_option_4: z.ZodOptional<z.ZodString>;
338
- share_story_audio: z.ZodString;
339
- read_along: z.ZodOptional<z.ZodString>;
340
- choose_read_along_bible: z.ZodOptional<z.ZodString>;
341
- exit: z.ZodString;
342
- stay: z.ZodString;
343
- popups_exit_micro_lesson: z.ZodString;
344
- finish_signing_in: z.ZodOptional<z.ZodString>;
345
- open_in_waha: z.ZodOptional<z.ZodString>;
346
406
  }, z.core.$strip>;
347
407
  export type LanguageTranslationsApp = z.infer<typeof LanguageTranslationsApp>;
348
408
  export declare const TranslationsApp: z.ZodRecord<z.ZodString, z.ZodObject<{
@@ -658,13 +718,50 @@ export declare const TranslationsApp: z.ZodRecord<z.ZodString, z.ZodObject<{
658
718
  micro_lessons: z.ZodString;
659
719
  filter_micro_lessons: z.ZodString;
660
720
  question_placeholder: z.ZodString;
721
+ no_text_available: z.ZodString;
722
+ share_story_audio: z.ZodString;
723
+ read_along: z.ZodString;
724
+ choose_read_along_bible: z.ZodString;
725
+ exit: z.ZodString;
726
+ stay: z.ZodString;
727
+ popups_exit_micro_lesson: z.ZodString;
728
+ popups_auth_errors_too_many_requests: z.ZodString;
729
+ popups_auth_errors_user_disabled: z.ZodString;
730
+ popups_auth_errors_provider_error: z.ZodString;
731
+ popups_auth_errors_generic: z.ZodString;
732
+ popups_auth_errors_link_expired: z.ZodString;
733
+ popups_auth_errors_link_wrong_device: z.ZodString;
734
+ sign_in_or_create_account: z.ZodString;
735
+ continue_with: z.ZodString;
736
+ delete_account: z.ZodString;
737
+ sign_out: z.ZodString;
738
+ account: z.ZodString;
739
+ already_have_an_account: z.ZodString;
740
+ popups_sign_out_confirm: z.ZodString;
741
+ popups_delete_account_confirm: z.ZodString;
742
+ sign_in_failed: z.ZodString;
743
+ sign_in_successful: z.ZodString;
744
+ signing_you_in: z.ZodString;
745
+ set_name_prompt: z.ZodString;
746
+ privacy_policy_agreement: z.ZodString;
747
+ sign_in_card_title: z.ZodString;
748
+ sign_in_card_body: z.ZodString;
749
+ signed_in: z.ZodString;
750
+ signed_out: z.ZodString;
751
+ wont_ask_again: z.ZodString;
752
+ popups_magic_link_sent_title: z.ZodString;
753
+ popups_magic_link_sent_message: z.ZodString;
754
+ edit_account: z.ZodString;
755
+ save: z.ZodString;
756
+ or: z.ZodString;
757
+ finish_signing_in: z.ZodString;
758
+ open_in_waha: z.ZodString;
661
759
  how_many_shared: z.ZodOptional<z.ZodString>;
662
760
  how_many_obeyed: z.ZodOptional<z.ZodString>;
663
761
  most: z.ZodOptional<z.ZodString>;
664
762
  some: z.ZodOptional<z.ZodString>;
665
763
  none: z.ZodOptional<z.ZodString>;
666
764
  highlight_verse: z.ZodOptional<z.ZodString>;
667
- no_text_available: z.ZodString;
668
765
  join_others_discovering: z.ZodOptional<z.ZodString>;
669
766
  people_shared_last_week: z.ZodOptional<z.ZodString>;
670
767
  onboarding_dbs_intro_heading: z.ZodOptional<z.ZodString>;
@@ -681,13 +778,5 @@ export declare const TranslationsApp: z.ZodRecord<z.ZodString, z.ZodObject<{
681
778
  question_what_brings_you_option_2: z.ZodOptional<z.ZodString>;
682
779
  question_what_brings_you_option_3: z.ZodOptional<z.ZodString>;
683
780
  question_what_brings_you_option_4: z.ZodOptional<z.ZodString>;
684
- share_story_audio: z.ZodString;
685
- read_along: z.ZodOptional<z.ZodString>;
686
- choose_read_along_bible: z.ZodOptional<z.ZodString>;
687
- exit: z.ZodString;
688
- stay: z.ZodString;
689
- popups_exit_micro_lesson: z.ZodString;
690
- finish_signing_in: z.ZodOptional<z.ZodString>;
691
- open_in_waha: z.ZodOptional<z.ZodString>;
692
781
  }, z.core.$strip>>;
693
782
  export type TranslationsApp = z.infer<typeof TranslationsApp>;
@@ -1,8 +1,45 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TranslationsApp = exports.LanguageTranslationsApp = void 0;
3
+ exports.TranslationsApp = exports.LanguageTranslationsApp = exports.TrickyStrings = void 0;
4
4
  const zod_1 = require("zod");
5
+ /**
6
+ * These are trickier strings that contain more contextual words and need to be
7
+ * proofread by a human. Thus, we may launch app updates without certain
8
+ * languages having translated them, and the app needs to handle this
9
+ * gracefully. Once they are fully translated by all launched languages, they
10
+ * can be moved out of this schema and into the main translations schema.
11
+ */
12
+ exports.TrickyStrings = zod_1.z
13
+ .object({
14
+ // Obedience/sharing scores
15
+ how_many_shared: zod_1.z.string(),
16
+ how_many_obeyed: zod_1.z.string(),
17
+ most: zod_1.z.string(),
18
+ some: zod_1.z.string(),
19
+ none: zod_1.z.string(),
20
+ // Verse highlighting
21
+ highlight_verse: zod_1.z.string(),
22
+ // New onboarding
23
+ join_others_discovering: zod_1.z.string(),
24
+ people_shared_last_week: zod_1.z.string(),
25
+ onboarding_dbs_intro_heading: zod_1.z.string(),
26
+ onboarding_dbs_intro_body: zod_1.z.string(),
27
+ onboarding_invite_group_heading: zod_1.z.string(),
28
+ onboarding_invite_group_body: zod_1.z.string(),
29
+ popups_need_help_with_group_title: zod_1.z.string(),
30
+ popups_need_help_with_group_message: zod_1.z.string(),
31
+ popups_micro_lessons_banner: zod_1.z.string(),
32
+ question_in_a_group: zod_1.z.string(),
33
+ question_what_brings_you_question: zod_1.z.string(),
34
+ question_what_brings_you_body: zod_1.z.string(),
35
+ question_what_brings_you_option_1: zod_1.z.string(),
36
+ question_what_brings_you_option_2: zod_1.z.string(),
37
+ question_what_brings_you_option_3: zod_1.z.string(),
38
+ question_what_brings_you_option_4: zod_1.z.string(),
39
+ })
40
+ .partial();
5
41
  exports.LanguageTranslationsApp = zod_1.z.object({
42
+ ...exports.TrickyStrings.shape,
6
43
  name: zod_1.z.string().min(1),
7
44
  version: zod_1.z.string().min(1),
8
45
  a11y_add_secondary_language_hint: zod_1.z.string().min(1),
@@ -317,40 +354,49 @@ exports.LanguageTranslationsApp = zod_1.z.object({
317
354
  micro_lessons: zod_1.z.string().min(1),
318
355
  filter_micro_lessons: zod_1.z.string().min(1),
319
356
  question_placeholder: zod_1.z.string().min(1),
320
- how_many_shared: zod_1.z.string().optional(),
321
- how_many_obeyed: zod_1.z.string().optional(),
322
- most: zod_1.z.string().optional(),
323
- some: zod_1.z.string().optional(),
324
- none: zod_1.z.string().optional(),
325
- highlight_verse: zod_1.z.string().optional(),
326
357
  no_text_available: zod_1.z.string(),
327
- // These are trickier strings and will take some time to localize.
328
- // onboarding.tsx is set up to default to the old onboarding if strings for
329
- // the new onboarding are not localized.
330
- join_others_discovering: zod_1.z.string().optional(),
331
- people_shared_last_week: zod_1.z.string().optional(),
332
- onboarding_dbs_intro_heading: zod_1.z.string().optional(),
333
- onboarding_dbs_intro_body: zod_1.z.string().optional(),
334
- onboarding_invite_group_heading: zod_1.z.string().optional(),
335
- onboarding_invite_group_body: zod_1.z.string().optional(),
336
- popups_need_help_with_group_title: zod_1.z.string().optional(),
337
- popups_need_help_with_group_message: zod_1.z.string().optional(),
338
- popups_micro_lessons_banner: zod_1.z.string().optional(),
339
- question_in_a_group: zod_1.z.string().optional(),
340
- question_what_brings_you_question: zod_1.z.string().optional(),
341
- question_what_brings_you_body: zod_1.z.string().optional(),
342
- question_what_brings_you_option_1: zod_1.z.string().optional(),
343
- question_what_brings_you_option_2: zod_1.z.string().optional(),
344
- question_what_brings_you_option_3: zod_1.z.string().optional(),
345
- question_what_brings_you_option_4: zod_1.z.string().optional(),
358
+ // ---
359
+ // Auth feature
346
360
  share_story_audio: zod_1.z.string(),
347
- read_along: zod_1.z.string().optional(),
348
- choose_read_along_bible: zod_1.z.string().optional(),
361
+ read_along: zod_1.z.string(),
362
+ choose_read_along_bible: zod_1.z.string(),
349
363
  exit: zod_1.z.string(),
350
364
  stay: zod_1.z.string(),
351
365
  popups_exit_micro_lesson: zod_1.z.string(),
352
- finish_signing_in: zod_1.z.string().optional(),
353
- open_in_waha: zod_1.z.string().optional(),
366
+ popups_auth_errors_too_many_requests: zod_1.z.string(),
367
+ popups_auth_errors_user_disabled: zod_1.z.string(),
368
+ popups_auth_errors_provider_error: zod_1.z.string(),
369
+ popups_auth_errors_generic: zod_1.z.string(),
370
+ popups_auth_errors_link_expired: zod_1.z.string(),
371
+ popups_auth_errors_link_wrong_device: zod_1.z.string(),
372
+ sign_in_or_create_account: zod_1.z.string(),
373
+ continue_with: zod_1.z.string(),
374
+ delete_account: zod_1.z.string(),
375
+ sign_out: zod_1.z.string(),
376
+ account: zod_1.z.string(),
377
+ already_have_an_account: zod_1.z.string(),
378
+ popups_sign_out_confirm: zod_1.z.string(),
379
+ popups_delete_account_confirm: zod_1.z.string(),
380
+ sign_in_failed: zod_1.z.string(),
381
+ sign_in_successful: zod_1.z.string(),
382
+ signing_you_in: zod_1.z.string(),
383
+ set_name_prompt: zod_1.z.string(),
384
+ privacy_policy_agreement: zod_1.z.string(),
385
+ sign_in_card_title: zod_1.z.string(),
386
+ sign_in_card_body: zod_1.z.string(),
387
+ signed_in: zod_1.z.string(),
388
+ signed_out: zod_1.z.string(),
389
+ wont_ask_again: zod_1.z.string(),
390
+ popups_magic_link_sent_title: zod_1.z.string(),
391
+ popups_magic_link_sent_message: zod_1.z.string(),
392
+ edit_account: zod_1.z.string(),
393
+ save: zod_1.z.string(),
394
+ or: zod_1.z.string(),
395
+ // ---
396
+ // Used in the web app.
397
+ finish_signing_in: zod_1.z.string(),
398
+ open_in_waha: zod_1.z.string(),
399
+ // ---
354
400
  });
355
401
  exports.TranslationsApp = zod_1.z
356
402
  .record(zod_1.z.string(), exports.LanguageTranslationsApp.describe('Translations for a single language (identified by a 3-letter code)_'))
@@ -1,31 +1,21 @@
1
1
  /**
2
- * Shared Firebase passwordless ("magic link") helpers used by both the app
3
- * (`waha-app`) and the web fallback page (`waha-web`). Sharing keeps the
4
- * sign-in-link detection and the deep-link token encoding from drifting between
5
- * the two, which would silently break the hand-off between them.
2
+ * Whether a URL is a Firebase passwordless sign-in link. Links can take
3
+ * multiple forms:
6
4
  *
7
- * Relies on `btoa`/`atob`, which every target runtime provides (Hermes, Node
8
- * ≥16, browsers) and the DOM lib types.
9
- */
10
- /**
11
- * Whether a URL is a Firebase passwordless sign-in link — i.e. carries the
12
- * `mode=signIn` + `oobCode` action params at the top level. Used by the app's
13
- * `+native-intent` (to route a reopened link to `auth-callback`) and by the web
14
- * fallback page (to decide whether to show its "finish signing in" UI).
5
+ * 1. Raw link from the sign-in email (auth/links): `https://waha-app-db.firebaseapp.com/__/auth/links?link=https://waha-app-db.firebaseapp.com/__/auth/action?apiKey%3D<api_key>%26mode%3DsignIn%26oobCode%3D<oob_code>%26continueUrl%3Dhttps://web.waha.app/auth`
6
+ * 2. Unwrapped url (auth/action): `https://waha-app-db.firebaseapp.com/__/auth/action?apiKey=<api_key>&mode=signIn&oobCode=<oob_code>&continueUrl=https://web.waha.app/auth`
7
+ * 3. Universal Link (iOS) / App Link (Android) deep-link: `https://web.waha.app/auth?apiKey=<key>&oobCode=<oob_code>&mode=signIn`
15
8
  */
16
9
  export declare function isMagicSignInLink(url: URL): boolean;
17
10
  /**
18
11
  * Base64url-encodes a Firebase sign-in URL for transport in a deep-link query
19
- * param.
20
- *
21
- * The sign-in URL contains its own `?`, `&` and `=`. Nesting it in a query
22
- * param and percent-encoding isn't enough: deep links get URL-decoded an
23
- * unpredictable number of times before the app's router reads them
24
- * (expo-router's query parser ultimately splits on a literal `&`), so an inner
25
- * `&` re-emerges and the value is truncated at it. base64url carries none of
26
- * those characters, so it survives intact through any number of decode passes.
27
- * Sign-in URLs are ASCII, so `btoa`/`atob` round-trip them exactly.
12
+ * param. `expo-router` has trouble with urls as query params.
28
13
  */
29
14
  export declare function encodeMagicLinkToken(url: string): string;
30
- /** Reverses {@link encodeMagicLinkToken}; null on a malformed token. */
15
+ /** Reverses {@link encodeMagicLinkToken}. */
31
16
  export declare function decodeMagicLinkToken(token: string): string | null;
17
+ /**
18
+ * Builds a custom-scheme deep-link that the app can receive directly for
19
+ * signing in.
20
+ */
21
+ export declare function buildOpenInAppUrl(signInUrl: string): string;
@@ -1,43 +1,30 @@
1
1
  "use strict";
2
- /**
3
- * Shared Firebase passwordless ("magic link") helpers used by both the app
4
- * (`waha-app`) and the web fallback page (`waha-web`). Sharing keeps the
5
- * sign-in-link detection and the deep-link token encoding from drifting between
6
- * the two, which would silently break the hand-off between them.
7
- *
8
- * Relies on `btoa`/`atob`, which every target runtime provides (Hermes, Node
9
- * ≥16, browsers) and the DOM lib types.
10
- */
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.isMagicSignInLink = isMagicSignInLink;
13
4
  exports.encodeMagicLinkToken = encodeMagicLinkToken;
14
5
  exports.decodeMagicLinkToken = decodeMagicLinkToken;
6
+ exports.buildOpenInAppUrl = buildOpenInAppUrl;
15
7
  /**
16
- * Whether a URL is a Firebase passwordless sign-in link — i.e. carries the
17
- * `mode=signIn` + `oobCode` action params at the top level. Used by the app's
18
- * `+native-intent` (to route a reopened link to `auth-callback`) and by the web
19
- * fallback page (to decide whether to show its "finish signing in" UI).
8
+ * Whether a URL is a Firebase passwordless sign-in link. Links can take
9
+ * multiple forms:
10
+ *
11
+ * 1. Raw link from the sign-in email (auth/links): `https://waha-app-db.firebaseapp.com/__/auth/links?link=https://waha-app-db.firebaseapp.com/__/auth/action?apiKey%3D<api_key>%26mode%3DsignIn%26oobCode%3D<oob_code>%26continueUrl%3Dhttps://web.waha.app/auth`
12
+ * 2. Unwrapped url (auth/action): `https://waha-app-db.firebaseapp.com/__/auth/action?apiKey=<api_key>&mode=signIn&oobCode=<oob_code>&continueUrl=https://web.waha.app/auth`
13
+ * 3. Universal Link (iOS) / App Link (Android) deep-link: `https://web.waha.app/auth?apiKey=<key>&oobCode=<oob_code>&mode=signIn`
20
14
  */
21
15
  function isMagicSignInLink(url) {
22
- return (url.searchParams.get('mode') === 'signIn' &&
23
- !!url.searchParams.get('oobCode'));
16
+ return (url.pathname.startsWith('/__/auth/links') ||
17
+ (url.searchParams.get('mode') === 'signIn' &&
18
+ !!url.searchParams.get('oobCode')));
24
19
  }
25
20
  /**
26
21
  * Base64url-encodes a Firebase sign-in URL for transport in a deep-link query
27
- * param.
28
- *
29
- * The sign-in URL contains its own `?`, `&` and `=`. Nesting it in a query
30
- * param and percent-encoding isn't enough: deep links get URL-decoded an
31
- * unpredictable number of times before the app's router reads them
32
- * (expo-router's query parser ultimately splits on a literal `&`), so an inner
33
- * `&` re-emerges and the value is truncated at it. base64url carries none of
34
- * those characters, so it survives intact through any number of decode passes.
35
- * Sign-in URLs are ASCII, so `btoa`/`atob` round-trip them exactly.
22
+ * param. `expo-router` has trouble with urls as query params.
36
23
  */
37
24
  function encodeMagicLinkToken(url) {
38
25
  return btoa(url).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '');
39
26
  }
40
- /** Reverses {@link encodeMagicLinkToken}; null on a malformed token. */
27
+ /** Reverses {@link encodeMagicLinkToken}. */
41
28
  function decodeMagicLinkToken(token) {
42
29
  try {
43
30
  const b64 = token.replace(/-/g, '+').replace(/_/g, '/');
@@ -49,3 +36,10 @@ function decodeMagicLinkToken(token) {
49
36
  return null;
50
37
  }
51
38
  }
39
+ /**
40
+ * Builds a custom-scheme deep-link that the app can receive directly for
41
+ * signing in.
42
+ */
43
+ function buildOpenInAppUrl(signInUrl) {
44
+ return `waha:///auth-callback?link=${encodeMagicLinkToken(signInUrl)}`;
45
+ }
@@ -16,10 +16,10 @@ const utils_1 = require("./utils");
16
16
  function getSetInfo({ setId, languageId, setIds, t, }) {
17
17
  const idComponents = setId.split('.');
18
18
  const category = idComponents[0] === '01'
19
- ? 'Foundations'
19
+ ? 'foundations'
20
20
  : idComponents[0] === '02'
21
- ? 'Topics'
22
- : 'WahaTraining';
21
+ ? 'topics'
22
+ : 'training';
23
23
  const setNumber = (setIds
24
24
  .filter((set) => set.split('.')[0] === idComponents[0])
25
25
  .findIndex((set) => set === setId) + 1).toString();
@@ -42,7 +42,7 @@ function getSetInfo({ setId, languageId, setIds, t, }) {
42
42
  const toReturn = {
43
43
  ...thisSetTranslations,
44
44
  ...thisSet,
45
- setSubtitle: category === 'Topics'
45
+ setSubtitle: category === 'topics'
46
46
  ? (thisSetTranslations?.setTag ?? '')
47
47
  : `${categoryName} ${parseInt(setNumber)}`,
48
48
  setLink: `https://web.waha.app/set?set-id=${setId}&meet-language=${languageId}`,
@@ -0,0 +1,90 @@
1
+ import { z } from 'zod';
2
+ /** Top-level collection holding one document per Waha user. */
3
+ export declare const USERS_COLLECTION = "users2";
4
+ /**
5
+ * The per-device subcollection segment under a user doc.
6
+ */
7
+ export declare const DEVICES_SUBCOLLECTION = "devices";
8
+ /**
9
+ * The per-item, 2-way-synced subcollections under a user doc, each paired with
10
+ * the Zod schema its docs are validated against.
11
+ */
12
+ export declare const SYNCED_SUBCOLLECTIONS: {
13
+ readonly completions: {
14
+ readonly segment: "completions";
15
+ readonly schema: z.ZodObject<{
16
+ lessonId: z.ZodString;
17
+ meetLanguageId: z.ZodString;
18
+ time: z.ZodNumber;
19
+ country: z.ZodOptional<z.ZodString>;
20
+ region: z.ZodOptional<z.ZodString>;
21
+ city: z.ZodOptional<z.ZodString>;
22
+ manual: z.ZodOptional<z.ZodBoolean>;
23
+ howManyObeyed: z.ZodOptional<z.ZodEnum<{
24
+ red: "red";
25
+ yellow: "yellow";
26
+ green: "green";
27
+ }>>;
28
+ howManyShared: z.ZodOptional<z.ZodEnum<{
29
+ red: "red";
30
+ yellow: "yellow";
31
+ green: "green";
32
+ }>>;
33
+ }, z.core.$strip>;
34
+ };
35
+ readonly bookmarks: {
36
+ readonly segment: "bookmarks";
37
+ readonly schema: z.ZodObject<{
38
+ icon: z.ZodEnum<{
39
+ leaf: "leaf";
40
+ stars: "stars";
41
+ apple: "apple";
42
+ fish: "fish";
43
+ sunny: "sunny";
44
+ }>;
45
+ languageId: z.ZodString;
46
+ lessonId: z.ZodString;
47
+ }, z.core.$strip>;
48
+ };
49
+ readonly notes: {
50
+ readonly segment: "notes";
51
+ readonly schema: z.ZodObject<{
52
+ sessionId: z.ZodString;
53
+ content: z.ZodString;
54
+ createdAt: z.ZodNumber;
55
+ lessonId: z.ZodString;
56
+ languageId: z.ZodString;
57
+ }, z.core.$strip>;
58
+ };
59
+ readonly meetFavorites: {
60
+ readonly segment: "meetFavorites";
61
+ readonly schema: z.ZodObject<{
62
+ languageId: z.ZodString;
63
+ }, z.core.$strip>;
64
+ };
65
+ };
66
+ export type UserCollectionKey = keyof typeof SYNCED_SUBCOLLECTIONS;
67
+ /** Synced scalar docs (shape `{ value }`). */
68
+ export declare const SYNCED_SCALARS: {
69
+ readonly trainingUnlocked: {
70
+ readonly segment: "synced/trainingUnlocked";
71
+ readonly schema: z.ZodBoolean;
72
+ };
73
+ readonly appLanguage: {
74
+ readonly segment: "synced/appLanguage";
75
+ readonly schema: z.ZodString;
76
+ };
77
+ };
78
+ export type SyncedScalarKey = keyof typeof SYNCED_SCALARS;
79
+ /**
80
+ * Builds every Firestore path under a single user's document. Path strings work
81
+ * with both the admin and react-native Firestore SDKs, so this is shared.
82
+ */
83
+ export declare const userPaths: (uid: string) => {
84
+ base: string;
85
+ devices: string;
86
+ device: (deviceId: string) => string;
87
+ syncedSubcollection: (key: UserCollectionKey) => string;
88
+ syncedSubcollectionDoc: (key: UserCollectionKey, id: string | number) => string;
89
+ syncedScalar: (key: SyncedScalarKey) => string;
90
+ };