waha-shared 1.0.359 → 1.0.361

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.
@@ -683,6 +683,18 @@
683
683
  }
684
684
  ]
685
685
  },
686
+ {
687
+ "bibleAudioId": "TANT2022",
688
+ "canDownload": true,
689
+ "copyright": "Text: © United Bible Societies, 2011, 2018, 2022, Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. Audio: ℗ Hosanna, 2024, Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License",
690
+ "audioSource": [
691
+ {
692
+ "scope": "all",
693
+ "source": "dbl",
694
+ "sourceId": "c2d41121545143a0-01"
695
+ }
696
+ ]
697
+ },
686
698
  {
687
699
  "bibleAudioId": "TCL02",
688
700
  "canDownload": false,
@@ -653,6 +653,18 @@
653
653
  "nameEnglish": "Sudanese Arabic Audio Bible",
654
654
  "textSource": {
655
655
  "source": "custom"
656
+ },
657
+ "version": 2
658
+ },
659
+ {
660
+ "bibleTextId": "TANT2022",
661
+ "copyright": "Text copyright © United Bible Societies, 2011, 2018, 2022.",
662
+ "languageId": "aeb",
663
+ "name": "العهد الجديد بالدارجة التونسية 2022",
664
+ "nameEnglish": "Tunisian Arabic New Testament",
665
+ "textSource": {
666
+ "source": "dbl",
667
+ "sourceId": "26e0bbc90cf70432-01"
656
668
  }
657
669
  },
658
670
  {
@@ -117,10 +117,10 @@
117
117
  "languageId": "aeb",
118
118
  "appInterface": false,
119
119
  "assetVersions": {
120
- "dbs": 2
120
+ "dbs": 3
121
121
  },
122
122
  "bcpLanguageId": "ar-TN",
123
- "bible": "NAV",
123
+ "bible": "TANT2022",
124
124
  "bridgeLanguages": {
125
125
  "ftbs": "ara",
126
126
  "intros": "ara",
@@ -151,6 +151,7 @@
151
151
  "web": "notStarted"
152
152
  },
153
153
  "uuid": "b4c558bf-10bb-495c-8d9c-f4d9cf9cd0f0",
154
+ "bibleFallbacks": ["NAV"],
154
155
  "countries": ["TN", "LY"]
155
156
  },
156
157
  {
@@ -47,6 +47,32 @@ export declare const AssetVersions: z.ZodObject<{
47
47
  dmc: z.ZodOptional<z.ZodInt>;
48
48
  cast: z.ZodOptional<z.ZodInt>;
49
49
  }, z.core.$strip>;
50
+ export declare const LanguageStatuses: z.ZodObject<{
51
+ dbs: z.ZodEnum<{
52
+ notStarted: "notStarted";
53
+ inProgress: "inProgress";
54
+ testing: "testing";
55
+ launched: "launched";
56
+ }>;
57
+ trainingVideos: z.ZodEnum<{
58
+ notStarted: "notStarted";
59
+ inProgress: "inProgress";
60
+ testing: "testing";
61
+ launched: "launched";
62
+ }>;
63
+ gdmc: z.ZodEnum<{
64
+ notStarted: "notStarted";
65
+ inProgress: "inProgress";
66
+ testing: "testing";
67
+ launched: "launched";
68
+ }>;
69
+ web: z.ZodEnum<{
70
+ notStarted: "notStarted";
71
+ inProgress: "inProgress";
72
+ testing: "testing";
73
+ launched: "launched";
74
+ }>;
75
+ }, z.core.$strip>;
50
76
  export declare const Languages: z.ZodArray<z.ZodObject<{
51
77
  languageId: z.ZodString;
52
78
  exonym: z.ZodString;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Languages = exports.AssetVersions = exports.BibleModifier = exports.BridgeLanguages = exports.Status = exports.BibleTestament = exports.SetCategory = void 0;
3
+ exports.Languages = exports.LanguageStatuses = exports.AssetVersions = exports.BibleModifier = exports.BridgeLanguages = exports.Status = exports.BibleTestament = exports.SetCategory = void 0;
4
4
  const zod_1 = require("zod");
5
5
  exports.SetCategory = zod_1.z.enum(['Foundations', 'Topics', 'WahaTraining']);
6
6
  exports.BibleTestament = zod_1.z.enum(['OT', 'NT']);
@@ -65,6 +65,12 @@ exports.AssetVersions = zod_1.z
65
65
  .describe('Asset version for cast-ready Foundations/Topics/GMDC video lessons.'),
66
66
  })
67
67
  .describe('Version numbers for various language assets that determine where files will be generated and retrieved. Omitting will always look for all assets in `full_lessons`. Adding for a category will generate and look for assets in `full_lessons${versionNumber}`.');
68
+ exports.LanguageStatuses = zod_1.z.object({
69
+ dbs: exports.Status.describe("The overall status of this language. Determines whether or not the language will show up in the app. Only language's marked `launched` will be selectable in Waha."),
70
+ trainingVideos: exports.Status.describe("The status of this language's disciple making course training videos."),
71
+ gdmc: exports.Status.describe("The status of this language's growing as a dmc sets."),
72
+ web: exports.Status.describe("The status of this language's website localization on https://waha.app."),
73
+ });
68
74
  exports.Languages = zod_1.z.array(zod_1.z
69
75
  .object({
70
76
  languageId: zod_1.z
@@ -116,12 +122,7 @@ exports.Languages = zod_1.z.array(zod_1.z
116
122
  })
117
123
  .strict()
118
124
  .describe('Determines what curriculums this language will use for its various content. Each must be linked to objects in data/foundationsCurriculums.json, data/topicsCurriculums.json , or data/questionsCurriculums.json.'),
119
- status: zod_1.z.object({
120
- dbs: exports.Status.describe("The overall status of this language. Determines whether or not the language will show up in the app. Only language's marked `launched` will be selectable in Waha."),
121
- trainingVideos: exports.Status.describe("The status of this language's disciple making course training videos."),
122
- gdmc: exports.Status.describe("The status of this language's growing as a dmc sets."),
123
- web: exports.Status.describe("The status of this language's website localization on https://waha.app."),
124
- }),
125
+ status: exports.LanguageStatuses,
125
126
  endonym: zod_1.z
126
127
  .string()
127
128
  .regex(new RegExp('^.+$'))
@@ -56,6 +56,7 @@ function getLanguageInfo(languageId, options) {
56
56
  lessonPauses: lessonPauses_1.lessonPauses,
57
57
  allBibleIds: [],
58
58
  onboardingPassageIds: curriculumOnboarding_1.curriculumOnboarding[0].passages,
59
+ status: { ...languages_1.languages[0].status, dmCourse: 'notStarted' },
59
60
  };
60
61
  const language = languages_1.languages.find((language) => language.languageId === languageId);
61
62
  if (!language) {
@@ -89,6 +90,23 @@ function getLanguageInfo(languageId, options) {
89
90
  setIds.push(gdmcSetId);
90
91
  }
91
92
  }
93
+ let dmCourseStatus = 'notStarted';
94
+ if (language.status.trainingVideos === 'notStarted') {
95
+ if (!language.bridgeLanguages?.trainingVideos) {
96
+ dmCourseStatus = 'notStarted';
97
+ }
98
+ else {
99
+ if (language.status.dbs !== 'launched')
100
+ dmCourseStatus = language.status.dbs;
101
+ else {
102
+ const bridgeLanguageTrainingVideoStatus = languages_1.languages.find((l) => l.languageId === language.bridgeLanguages?.trainingVideos)?.status.trainingVideos ?? 'notStarted';
103
+ dmCourseStatus = bridgeLanguageTrainingVideoStatus;
104
+ }
105
+ }
106
+ }
107
+ else {
108
+ dmCourseStatus = language.status.trainingVideos;
109
+ }
92
110
  const toReturn = {
93
111
  ...language,
94
112
  setIds: setIds,
@@ -112,6 +130,7 @@ function getLanguageInfo(languageId, options) {
112
130
  lessonPauses: lessonPauses_1.lessonPauses,
113
131
  allBibleIds: (0, bibles_1.getAllBibleIds)(language),
114
132
  onboardingPassageIds: onboardingCurriculum?.passages ?? defaultReturn.onboardingPassageIds,
133
+ status: { ...language.status, dmCourse: dmCourseStatus },
115
134
  };
116
135
  return toReturn;
117
136
  }
@@ -32,7 +32,40 @@ declare const RequiredBridgeLanguages: z.ZodObject<{
32
32
  onboardingPassages: z.ZodNonOptional<z.ZodOptional<z.ZodString>>;
33
33
  }, z.core.$strip>;
34
34
  type RequiredBridgeLanguages = z.infer<typeof RequiredBridgeLanguages>;
35
- export interface LanguageInfo extends Omit<Language, 'bible' | 'bibleFallbacks' | 'script' | 'bridgeLanguages'> {
35
+ export declare const LanguageInfoStatuses: z.ZodObject<{
36
+ dbs: z.ZodEnum<{
37
+ notStarted: "notStarted";
38
+ inProgress: "inProgress";
39
+ testing: "testing";
40
+ launched: "launched";
41
+ }>;
42
+ trainingVideos: z.ZodEnum<{
43
+ notStarted: "notStarted";
44
+ inProgress: "inProgress";
45
+ testing: "testing";
46
+ launched: "launched";
47
+ }>;
48
+ gdmc: z.ZodEnum<{
49
+ notStarted: "notStarted";
50
+ inProgress: "inProgress";
51
+ testing: "testing";
52
+ launched: "launched";
53
+ }>;
54
+ web: z.ZodEnum<{
55
+ notStarted: "notStarted";
56
+ inProgress: "inProgress";
57
+ testing: "testing";
58
+ launched: "launched";
59
+ }>;
60
+ dmCourse: z.ZodEnum<{
61
+ notStarted: "notStarted";
62
+ inProgress: "inProgress";
63
+ testing: "testing";
64
+ launched: "launched";
65
+ }>;
66
+ }, z.core.$strip>;
67
+ export type LanguageInfoStatuses = z.infer<typeof LanguageInfoStatuses>;
68
+ export interface LanguageInfo extends Omit<Language, 'bible' | 'bibleFallbacks' | 'script' | 'bridgeLanguages' | 'status'> {
36
69
  /** The set ids that make up this language's curriculum. */
37
70
  setIds: string[];
38
71
  /** The question sets available for this language. */
@@ -66,6 +99,8 @@ export interface LanguageInfo extends Omit<Language, 'bible' | 'bibleFallbacks'
66
99
  * curriculum (some languages use different psalm numberings).
67
100
  */
68
101
  onboardingPassageIds: CurriculumOnboarding[number]['passages'];
102
+ /** The statuses of this language. */
103
+ status: LanguageInfoStatuses;
69
104
  }
70
105
  export interface MeetTranslations {
71
106
  sets: TranslationsSet[string];
@@ -1,4 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LanguageInfoStatuses = void 0;
3
4
  const languages_zod_1 = require("../data/languages/languages.zod");
4
5
  const RequiredBridgeLanguages = languages_zod_1.BridgeLanguages.required();
6
+ exports.LanguageInfoStatuses = languages_zod_1.LanguageStatuses.extend({
7
+ dmCourse: languages_zod_1.Status.describe("Whether or not the DM course is available for a language. Calculated via a combination of language's dbs status, language's training video status, and language's bridge languages."),
8
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waha-shared",
3
- "version": "1.0.359",
3
+ "version": "1.0.361",
4
4
  "author": "Waha",
5
5
  "dependencies": {
6
6
  "@types/signale": "^1.4.7",