waha-shared 1.0.397 → 1.0.398

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.
@@ -1,10 +1,7 @@
1
1
  import { z } from 'zod';
2
- import { WahaUserLocationSchema } from './location';
3
2
  export type FaithJourney = 'seekers' | 'believers' | 'all';
4
- export type WahaUserLocation = z.infer<typeof WahaUserLocationSchema>;
5
- export { WahaUserLocationSchema };
6
3
  export type WahaAppVersion = `${number}.${number}.${number}`;
7
- export declare const DesireIdSchema: z.ZodEnum<{
4
+ export declare const DesireId: z.ZodEnum<{
8
5
  talk_to_others_about_jesus: "talk_to_others_about_jesus";
9
6
  build_a_team_of_disciple_makers: "build_a_team_of_disciple_makers";
10
7
  reach_my_entire_people_or_nation_for_god: "reach_my_entire_people_or_nation_for_god";
@@ -17,8 +14,8 @@ export declare const DesireIdSchema: z.ZodEnum<{
17
14
  get_right_with_god: "get_right_with_god";
18
15
  learn_more_about_jesus: "learn_more_about_jesus";
19
16
  }>;
20
- export type DesireId = z.infer<typeof DesireIdSchema>;
21
- export declare const WahaUserStateSchema: z.ZodObject<{
17
+ export type DesireId = z.infer<typeof DesireId>;
18
+ export declare const WahaUserState: z.ZodObject<{
22
19
  wahaUserId: z.ZodOptional<z.ZodString>;
23
20
  name: z.ZodOptional<z.ZodString>;
24
21
  email: z.ZodOptional<z.ZodEmail>;
@@ -79,9 +76,9 @@ export declare const WahaUserStateSchema: z.ZodObject<{
79
76
  "finished-from-languages": "finished-from-languages";
80
77
  }>>;
81
78
  }, z.core.$strip>;
82
- export type WahaUserState = z.infer<typeof WahaUserStateSchema>;
83
- export declare const WahaAppVersionSchema: z.ZodString;
84
- export declare const CompletionEventSchema: z.ZodObject<{
79
+ export type WahaUserState = z.infer<typeof WahaUserState>;
80
+ export declare const WahaAppVersion: z.ZodString;
81
+ export declare const CompletionEvent: z.ZodObject<{
85
82
  lessonId: z.ZodString;
86
83
  meetLanguageId: z.ZodString;
87
84
  time: z.ZodNumber;
@@ -100,8 +97,8 @@ export declare const CompletionEventSchema: z.ZodObject<{
100
97
  green: "green";
101
98
  }>>;
102
99
  }, z.core.$strip>;
103
- export type CompletionEvent = z.infer<typeof CompletionEventSchema>;
104
- export declare const WahaShareContentSchema: z.ZodEnum<{
100
+ export type CompletionEvent = z.infer<typeof CompletionEvent>;
101
+ export declare const WahaShareContent: z.ZodEnum<{
105
102
  lesson: "lesson";
106
103
  note: "note";
107
104
  setLink: "setLink";
@@ -114,6 +111,7 @@ export declare const WahaShareContentSchema: z.ZodEnum<{
114
111
  storyText: "storyText";
115
112
  storyAudio: "storyAudio";
116
113
  meetingInvite: "meetingInvite";
114
+ meetingInviteOnboarding: "meetingInviteOnboarding";
117
115
  articleLink: "articleLink";
118
116
  videoLink: "videoLink";
119
117
  meetingSchedule: "meetingSchedule";
@@ -125,8 +123,8 @@ export declare const WahaShareContentSchema: z.ZodEnum<{
125
123
  customSet: "customSet";
126
124
  microLesson: "microLesson";
127
125
  }>;
128
- export type WahaShareContent = z.infer<typeof WahaShareContentSchema>;
129
- export declare const ShareLogEventSchema: z.ZodObject<{
126
+ export type WahaShareContent = z.infer<typeof WahaShareContent>;
127
+ export declare const ShareLogEvent: z.ZodObject<{
130
128
  time: z.ZodNumber;
131
129
  content: z.ZodEnum<{
132
130
  lesson: "lesson";
@@ -141,6 +139,7 @@ export declare const ShareLogEventSchema: z.ZodObject<{
141
139
  storyText: "storyText";
142
140
  storyAudio: "storyAudio";
143
141
  meetingInvite: "meetingInvite";
142
+ meetingInviteOnboarding: "meetingInviteOnboarding";
144
143
  articleLink: "articleLink";
145
144
  videoLink: "videoLink";
146
145
  meetingSchedule: "meetingSchedule";
@@ -156,21 +155,21 @@ export declare const ShareLogEventSchema: z.ZodObject<{
156
155
  articleSlug: z.ZodOptional<z.ZodString>;
157
156
  microLessonSlug: z.ZodOptional<z.ZodString>;
158
157
  }, z.core.$strip>;
159
- export type ShareLogEvent = z.infer<typeof ShareLogEventSchema>;
160
- export declare const BibleSessionSchema: z.ZodObject<{
158
+ export type ShareLogEvent = z.infer<typeof ShareLogEvent>;
159
+ export declare const BibleSession: z.ZodObject<{
161
160
  chapter: z.ZodString;
162
161
  timeSpent: z.ZodNumber;
163
162
  startTime: z.ZodNumber;
164
163
  translation: z.ZodString;
165
164
  }, z.core.$strip>;
166
- export type BibleSession = z.infer<typeof BibleSessionSchema>;
167
- export declare const ArticleSessionSchema: z.ZodObject<{
165
+ export type BibleSession = z.infer<typeof BibleSession>;
166
+ export declare const ArticleSession: z.ZodObject<{
168
167
  articleSlug: z.ZodString;
169
168
  timeSpent: z.ZodNumber;
170
169
  startTime: z.ZodNumber;
171
170
  }, z.core.$strip>;
172
- export type ArticleSession = z.infer<typeof ArticleSessionSchema>;
173
- export declare const WahaUserSchema: z.ZodObject<{
171
+ export type ArticleSession = z.infer<typeof ArticleSession>;
172
+ export declare const WahaUser: z.ZodObject<{
174
173
  wahaUserId: z.ZodOptional<z.ZodString>;
175
174
  name: z.ZodOptional<z.ZodString>;
176
175
  email: z.ZodOptional<z.ZodEmail>;
@@ -274,6 +273,7 @@ export declare const WahaUserSchema: z.ZodObject<{
274
273
  storyText: "storyText";
275
274
  storyAudio: "storyAudio";
276
275
  meetingInvite: "meetingInvite";
276
+ meetingInviteOnboarding: "meetingInviteOnboarding";
277
277
  articleLink: "articleLink";
278
278
  videoLink: "videoLink";
279
279
  meetingSchedule: "meetingSchedule";
@@ -321,7 +321,8 @@ export declare const WahaUserSchema: z.ZodObject<{
321
321
  obedienceScore: z.ZodOptional<z.ZodNumber>;
322
322
  sharingScore: z.ZodOptional<z.ZodNumber>;
323
323
  }, z.core.$strip>;
324
- export declare const PushEnabledWahaUserSchema: z.ZodObject<{
324
+ export type WahaUser = z.infer<typeof WahaUser>;
325
+ export declare const PushEnabledWahaUser: z.ZodObject<{
325
326
  name: z.ZodOptional<z.ZodString>;
326
327
  appInterface: z.ZodString;
327
328
  email: z.ZodOptional<z.ZodEmail>;
@@ -418,6 +419,7 @@ export declare const PushEnabledWahaUserSchema: z.ZodObject<{
418
419
  storyText: "storyText";
419
420
  storyAudio: "storyAudio";
420
421
  meetingInvite: "meetingInvite";
422
+ meetingInviteOnboarding: "meetingInviteOnboarding";
421
423
  articleLink: "articleLink";
422
424
  videoLink: "videoLink";
423
425
  meetingSchedule: "meetingSchedule";
@@ -468,5 +470,4 @@ export declare const PushEnabledWahaUserSchema: z.ZodObject<{
468
470
  pushToken: z.ZodString;
469
471
  notificationPermission: z.ZodLiteral<"granted">;
470
472
  }, z.core.$strip>;
471
- export type PushEnabledWahaUser = z.infer<typeof PushEnabledWahaUserSchema>;
472
- export type WahaUser = z.infer<typeof WahaUserSchema>;
473
+ export type PushEnabledWahaUser = z.infer<typeof PushEnabledWahaUser>;
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PushEnabledWahaUserSchema = exports.WahaUserSchema = exports.ArticleSessionSchema = exports.BibleSessionSchema = exports.ShareLogEventSchema = exports.WahaShareContentSchema = exports.CompletionEventSchema = exports.WahaAppVersionSchema = exports.WahaUserStateSchema = exports.DesireIdSchema = exports.WahaUserLocationSchema = void 0;
3
+ exports.PushEnabledWahaUser = exports.WahaUser = exports.ArticleSession = exports.BibleSession = exports.ShareLogEvent = exports.WahaShareContent = exports.CompletionEvent = exports.WahaAppVersion = exports.WahaUserState = exports.DesireId = void 0;
4
4
  const zod_1 = require("zod");
5
+ const languages_zod_1 = require("../data/languages/languages.zod");
5
6
  const location_1 = require("./location");
6
- Object.defineProperty(exports, "WahaUserLocationSchema", { enumerable: true, get: function () { return location_1.WahaUserLocationSchema; } });
7
7
  const microLessons_1 = require("./microLessons");
8
8
  const stoplight_1 = require("./stoplight");
9
- exports.DesireIdSchema = zod_1.z.enum([
9
+ exports.DesireId = zod_1.z.enum([
10
10
  'talk_to_others_about_jesus',
11
11
  'build_a_team_of_disciple_makers',
12
12
  'reach_my_entire_people_or_nation_for_god',
@@ -19,12 +19,12 @@ exports.DesireIdSchema = zod_1.z.enum([
19
19
  'get_right_with_god',
20
20
  'learn_more_about_jesus',
21
21
  ]);
22
- exports.WahaUserStateSchema = zod_1.z.object({
22
+ exports.WahaUserState = zod_1.z.object({
23
23
  wahaUserId: zod_1.z.string().optional(),
24
24
  name: zod_1.z.string().optional(),
25
25
  email: zod_1.z.email().optional(),
26
- location: location_1.WahaUserLocationSchema.optional(),
27
- pastLocations: zod_1.z.array(location_1.WahaUserLocationSchema).optional(),
26
+ location: location_1.WahaUserLocation.optional(),
27
+ pastLocations: zod_1.z.array(location_1.WahaUserLocation).optional(),
28
28
  phoneLocation: zod_1.z.string().optional(),
29
29
  isSubscribedToEmailUpdates: zod_1.z.boolean().optional(),
30
30
  pushToken: zod_1.z.string().optional(),
@@ -38,7 +38,7 @@ exports.WahaUserStateSchema = zod_1.z.object({
38
38
  notificationLinksClicked: zod_1.z.number().optional(),
39
39
  isBeliever: zod_1.z.boolean().optional(),
40
40
  isInAGroup: zod_1.z.boolean().optional(),
41
- desires: zod_1.z.array(exports.DesireIdSchema).optional(),
41
+ desires: zod_1.z.array(exports.DesireId).optional(),
42
42
  customDesire: zod_1.z.string().optional(),
43
43
  isCCWorker: zod_1.z.boolean().optional(),
44
44
  isAdvocate: zod_1.z.boolean().optional(),
@@ -58,10 +58,10 @@ exports.WahaUserStateSchema = zod_1.z.object({
58
58
  ])
59
59
  .optional(),
60
60
  });
61
- exports.WahaAppVersionSchema = zod_1.z.string().regex(/^\d+\.\d+\.\d+$/);
62
- exports.CompletionEventSchema = zod_1.z.object({
61
+ exports.WahaAppVersion = zod_1.z.string().regex(/^\d+\.\d+\.\d+$/);
62
+ exports.CompletionEvent = zod_1.z.object({
63
63
  lessonId: zod_1.z.string(),
64
- meetLanguageId: zod_1.z.string(),
64
+ meetLanguageId: languages_zod_1.LanguageId,
65
65
  time: zod_1.z.number(),
66
66
  country: zod_1.z.string().optional(),
67
67
  region: zod_1.z.string().optional(),
@@ -71,10 +71,10 @@ exports.CompletionEventSchema = zod_1.z.object({
71
71
  * rather than automatically by doing the lesson on the lesson screen.
72
72
  */
73
73
  manual: zod_1.z.boolean().optional(),
74
- howManyObeyed: stoplight_1.StoplightOptionSchema.optional(),
75
- howManyShared: stoplight_1.StoplightOptionSchema.optional(),
74
+ howManyObeyed: stoplight_1.StoplightOption.optional(),
75
+ howManyShared: stoplight_1.StoplightOption.optional(),
76
76
  });
77
- exports.WahaShareContentSchema = zod_1.z.enum([
77
+ exports.WahaShareContent = zod_1.z.enum([
78
78
  'app',
79
79
  'passcode',
80
80
  'lessonAudio',
@@ -84,6 +84,7 @@ exports.WahaShareContentSchema = zod_1.z.enum([
84
84
  'lessonLink',
85
85
  'setLink',
86
86
  'meetingInvite',
87
+ 'meetingInviteOnboarding',
87
88
  'articleLink',
88
89
  'videoLink',
89
90
  'notification',
@@ -98,47 +99,46 @@ exports.WahaShareContentSchema = zod_1.z.enum([
98
99
  'customSet',
99
100
  'microLesson',
100
101
  ]);
101
- exports.ShareLogEventSchema = zod_1.z.object({
102
+ exports.ShareLogEvent = zod_1.z.object({
102
103
  time: zod_1.z.number(),
103
- content: exports.WahaShareContentSchema,
104
+ content: exports.WahaShareContent,
104
105
  lessonId: zod_1.z.string().optional(),
105
106
  articleSlug: zod_1.z.string().optional(),
106
107
  microLessonSlug: zod_1.z.string().optional(),
107
108
  });
108
- exports.BibleSessionSchema = zod_1.z.object({
109
+ exports.BibleSession = zod_1.z.object({
109
110
  chapter: zod_1.z.string(),
110
111
  timeSpent: zod_1.z.number(),
111
112
  startTime: zod_1.z.number(),
112
113
  translation: zod_1.z.string(),
113
114
  });
114
- exports.ArticleSessionSchema = zod_1.z.object({
115
+ exports.ArticleSession = zod_1.z.object({
115
116
  articleSlug: zod_1.z.string(),
116
117
  timeSpent: zod_1.z.number(),
117
118
  startTime: zod_1.z.number(),
118
119
  });
119
- // Zod schema for WahaUser extending WahaUserStateSchema
120
- exports.WahaUserSchema = exports.WahaUserStateSchema.extend({
120
+ exports.WahaUser = exports.WahaUserState.extend({
121
121
  pushToken: zod_1.z.string().optional(),
122
122
  securityModeOn: zod_1.z.boolean().optional(),
123
- appVersion: exports.WahaAppVersionSchema,
123
+ appVersion: exports.WahaAppVersion,
124
124
  lastUpdate: zod_1.z.number(),
125
125
  platform: zod_1.z.string(),
126
- completions: zod_1.z.array(exports.CompletionEventSchema),
126
+ completions: zod_1.z.array(exports.CompletionEvent),
127
127
  trainingUnlocked: zod_1.z.boolean().optional(),
128
- meet: zod_1.z.string(),
129
- appInterface: zod_1.z.string(),
130
- meetFavorites: zod_1.z.array(zod_1.z.string()),
128
+ meet: languages_zod_1.LanguageId,
129
+ appInterface: languages_zod_1.LanguageId,
130
+ meetFavorites: zod_1.z.array(languages_zod_1.LanguageId),
131
131
  osVersion: zod_1.z.string().nullable(),
132
132
  isDev: zod_1.z.boolean(),
133
- shareLog: zod_1.z.array(exports.ShareLogEventSchema).optional(),
134
- bibleSessions: zod_1.z.array(exports.BibleSessionSchema).optional(),
135
- articleSessions: zod_1.z.array(exports.ArticleSessionSchema).optional(),
133
+ shareLog: zod_1.z.array(exports.ShareLogEvent).optional(),
134
+ bibleSessions: zod_1.z.array(exports.BibleSession).optional(),
135
+ articleSessions: zod_1.z.array(exports.ArticleSession).optional(),
136
136
  activated: zod_1.z.boolean().optional(),
137
- microLessonCompletions: zod_1.z.array(microLessons_1.MicroLessonSubmissionSchema).optional(),
137
+ microLessonCompletions: zod_1.z.array(microLessons_1.MicroLessonSubmission).optional(),
138
138
  obedienceScore: zod_1.z.number().optional(),
139
139
  sharingScore: zod_1.z.number().optional(),
140
140
  });
141
- exports.PushEnabledWahaUserSchema = exports.WahaUserSchema.omit({
141
+ exports.PushEnabledWahaUser = exports.WahaUser.omit({
142
142
  wahaUserId: true,
143
143
  pushToken: true,
144
144
  notificationPermission: true,
@@ -1,24 +1,24 @@
1
1
  import z from 'zod';
2
- export declare const DateSchema: z.ZodCoercedDate<unknown>;
3
- export declare const IsDraftSchema: z.ZodOptional<z.ZodBoolean>;
4
- export declare const SeekerFriendlySchema: z.ZodOptional<z.ZodBoolean>;
5
- export declare const PlatformSchema: z.ZodEnum<{
2
+ export declare const Date: z.ZodCoercedDate<unknown>;
3
+ export declare const IsDraft: z.ZodOptional<z.ZodBoolean>;
4
+ export declare const SeekerFriendly: z.ZodOptional<z.ZodBoolean>;
5
+ export declare const Platform: z.ZodEnum<{
6
6
  "Web Only": "Web Only";
7
7
  "App Only": "App Only";
8
8
  All: "All";
9
9
  }>;
10
- export declare const AudioSchema: z.ZodOptional<z.ZodObject<{
10
+ export declare const Audio: z.ZodOptional<z.ZodObject<{
11
11
  audioUrl: z.ZodString;
12
12
  loop: z.ZodOptional<z.ZodBoolean>;
13
13
  }, z.core.$strip>>;
14
- export declare const VideoSchema: z.ZodOptional<z.ZodObject<{
14
+ export declare const Video: z.ZodOptional<z.ZodObject<{
15
15
  videoUrl: z.ZodString;
16
16
  autoplay: z.ZodOptional<z.ZodBoolean>;
17
17
  loop: z.ZodOptional<z.ZodBoolean>;
18
18
  disableControls: z.ZodOptional<z.ZodBoolean>;
19
19
  aspectRatio: z.ZodOptional<z.ZodNumber>;
20
20
  }, z.core.$strip>>;
21
- export declare const CategorySchema: z.ZodEnum<{
21
+ export declare const Category: z.ZodEnum<{
22
22
  "Case Studies": "Case Studies";
23
23
  "Discovering God": "Discovering God";
24
24
  "Disciple Making Secrets": "Disciple Making Secrets";
@@ -3,30 +3,30 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.CategorySchema = exports.VideoSchema = exports.AudioSchema = exports.PlatformSchema = exports.SeekerFriendlySchema = exports.IsDraftSchema = exports.DateSchema = void 0;
6
+ exports.Category = exports.Video = exports.Audio = exports.Platform = exports.SeekerFriendly = exports.IsDraft = exports.Date = void 0;
7
7
  const zod_1 = __importDefault(require("zod"));
8
- exports.DateSchema = zod_1.default.coerce
8
+ exports.Date = zod_1.default.coerce
9
9
  .date()
10
10
  .describe('The date to publish the content. Can be in the future.');
11
- exports.IsDraftSchema = zod_1.default
11
+ exports.IsDraft = zod_1.default
12
12
  .boolean()
13
13
  .describe('If this is checked the content will be marked as a draft and only available on the test website.')
14
14
  .optional();
15
- exports.SeekerFriendlySchema = zod_1.default
15
+ exports.SeekerFriendly = zod_1.default
16
16
  .boolean()
17
17
  .describe('If this is checked the micro lesson will be marked as seeker friendly. Seeker friendly micro lessons will not link back to the website.')
18
18
  .optional();
19
- exports.PlatformSchema = zod_1.default
19
+ exports.Platform = zod_1.default
20
20
  .enum(['Web Only', 'App Only', 'All'])
21
21
  .describe('Set to determine which platform the content is available on.');
22
- exports.AudioSchema = zod_1.default
22
+ exports.Audio = zod_1.default
23
23
  .object({
24
24
  audioUrl: zod_1.default.string(),
25
25
  loop: zod_1.default.boolean().optional(),
26
26
  })
27
27
  .describe('Optional audio to embed on the page.')
28
28
  .optional();
29
- exports.VideoSchema = zod_1.default
29
+ exports.Video = zod_1.default
30
30
  .object({
31
31
  videoUrl: zod_1.default.string(),
32
32
  autoplay: zod_1.default.boolean().optional(),
@@ -40,7 +40,7 @@ exports.VideoSchema = zod_1.default
40
40
  })
41
41
  .describe('Optional video to embed on the page.')
42
42
  .optional();
43
- exports.CategorySchema = zod_1.default.enum([
43
+ exports.Category = zod_1.default.enum([
44
44
  'Case Studies',
45
45
  'Discovering God',
46
46
  'Disciple Making Secrets',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waha-shared",
3
- "version": "1.0.397",
3
+ "version": "1.0.398",
4
4
  "author": "Waha",
5
5
  "dependencies": {
6
6
  "@types/signale": "^1.4.7",