waha-shared 1.0.2 → 1.0.3

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,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- declare const WahaUserLocationSchema: z.ZodObject<{
2
+ export declare const WahaUserLocationSchema: z.ZodObject<{
3
3
  city: z.ZodOptional<z.ZodString>;
4
4
  country: z.ZodOptional<z.ZodString>;
5
5
  region: z.ZodOptional<z.ZodString>;
@@ -14,9 +14,9 @@ declare const WahaUserLocationSchema: z.ZodObject<{
14
14
  }>;
15
15
  export type WahaUserLocation = z.infer<typeof WahaUserLocationSchema>;
16
16
  export type WahaAppVersion = `${number}.${number}.${number}`;
17
- declare const DesireIdSchema: z.ZodEnum<["talk_to_others_about_jesus", "build_a_team_of_disciple_makers", "reach_my_entire_people_or_nation_for_god", "understand_wahas_impact", "understand_how_waha_works", "get_coaching", "see_god_transform_my_community", "discover_whats_in_the_bible", "find_hope_in_my_troubles", "get_right_with_god", "learn_more_about_jesus"]>;
17
+ export declare const DesireIdSchema: z.ZodEnum<["talk_to_others_about_jesus", "build_a_team_of_disciple_makers", "reach_my_entire_people_or_nation_for_god", "understand_wahas_impact", "understand_how_waha_works", "get_coaching", "see_god_transform_my_community", "discover_whats_in_the_bible", "find_hope_in_my_troubles", "get_right_with_god", "learn_more_about_jesus"]>;
18
18
  export type DesireId = z.infer<typeof DesireIdSchema>;
19
- declare const WahaUserStateSchema: z.ZodObject<{
19
+ export declare const WahaUserStateSchema: z.ZodObject<{
20
20
  wahaUserId: z.ZodOptional<z.ZodString>;
21
21
  name: z.ZodOptional<z.ZodString>;
22
22
  email: z.ZodOptional<z.ZodString>;
@@ -130,7 +130,8 @@ declare const WahaUserStateSchema: z.ZodObject<{
130
130
  onboardingStatus?: "skipped-from-first" | "skipped-from-second" | "finished-from-first" | "finished-from-second" | "finished-from-languages" | undefined;
131
131
  }>;
132
132
  export type WahaUserState = z.infer<typeof WahaUserStateSchema>;
133
- declare const CompletionEventSchema: z.ZodObject<{
133
+ export declare const WahaAppVersionSchema: z.ZodString;
134
+ export declare const CompletionEventSchema: z.ZodObject<{
134
135
  lessonId: z.ZodString;
135
136
  meetLanguageId: z.ZodString;
136
137
  time: z.ZodNumber;
@@ -160,9 +161,9 @@ declare const CompletionEventSchema: z.ZodObject<{
160
161
  manual?: boolean | undefined;
161
162
  }>;
162
163
  export type CompletionEvent = z.infer<typeof CompletionEventSchema>;
163
- declare const WahaShareContentSchema: z.ZodEnum<["app", "passcode", "lessonAudio", "lessonText", "storyText", "storyAudio", "lessonLink", "setLink", "meetingInvite", "articleLink", "videoLink", "notification", "meetingSchedule", "scriptureText", "mt", "scriptureAudio", "inviteGroup", "lesson", "offlineVersionLink", "note", "customSet"]>;
164
+ export declare const WahaShareContentSchema: z.ZodEnum<["app", "passcode", "lessonAudio", "lessonText", "storyText", "storyAudio", "lessonLink", "setLink", "meetingInvite", "articleLink", "videoLink", "notification", "meetingSchedule", "scriptureText", "mt", "scriptureAudio", "inviteGroup", "lesson", "offlineVersionLink", "note", "customSet"]>;
164
165
  export type WahaShareContent = z.infer<typeof WahaShareContentSchema>;
165
- declare const ShareLogEventSchema: z.ZodObject<{
166
+ export declare const ShareLogEventSchema: z.ZodObject<{
166
167
  time: z.ZodNumber;
167
168
  content: z.ZodEnum<["app", "passcode", "lessonAudio", "lessonText", "storyText", "storyAudio", "lessonLink", "setLink", "meetingInvite", "articleLink", "videoLink", "notification", "meetingSchedule", "scriptureText", "mt", "scriptureAudio", "inviteGroup", "lesson", "offlineVersionLink", "note", "customSet"]>;
168
169
  lessonId: z.ZodOptional<z.ZodString>;
@@ -179,7 +180,7 @@ declare const ShareLogEventSchema: z.ZodObject<{
179
180
  articleSlug?: string | undefined;
180
181
  }>;
181
182
  export type ShareLogEvent = z.infer<typeof ShareLogEventSchema>;
182
- declare const BibleSessionSchema: z.ZodObject<{
183
+ export declare const BibleSessionSchema: z.ZodObject<{
183
184
  chapter: z.ZodString;
184
185
  timeSpent: z.ZodNumber;
185
186
  startTime: z.ZodNumber;
@@ -196,7 +197,7 @@ declare const BibleSessionSchema: z.ZodObject<{
196
197
  translation: string;
197
198
  }>;
198
199
  export type BibleSession = z.infer<typeof BibleSessionSchema>;
199
- declare const ArticleSessionSchema: z.ZodObject<{
200
+ export declare const ArticleSessionSchema: z.ZodObject<{
200
201
  articleSlug: z.ZodString;
201
202
  timeSpent: z.ZodNumber;
202
203
  startTime: z.ZodNumber;
@@ -762,4 +763,3 @@ export declare const PushEnabledWahaUserSchema: z.ZodObject<Omit<{
762
763
  }>;
763
764
  export type PushEnabledWahaUser = z.infer<typeof PushEnabledWahaUserSchema>;
764
765
  export type WahaUser = z.infer<typeof WahaUserSchema>;
765
- export {};
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PushEnabledWahaUserSchema = exports.WahaUserSchema = void 0;
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;
4
4
  const zod_1 = require("zod");
5
- const WahaUserLocationSchema = zod_1.z.object({
5
+ exports.WahaUserLocationSchema = zod_1.z.object({
6
6
  city: zod_1.z.string().optional(),
7
7
  country: zod_1.z.string().optional(),
8
8
  region: zod_1.z.string().optional(),
9
9
  });
10
- const DesireIdSchema = zod_1.z.enum([
10
+ exports.DesireIdSchema = zod_1.z.enum([
11
11
  'talk_to_others_about_jesus',
12
12
  'build_a_team_of_disciple_makers',
13
13
  'reach_my_entire_people_or_nation_for_god',
@@ -20,12 +20,12 @@ const DesireIdSchema = zod_1.z.enum([
20
20
  'get_right_with_god',
21
21
  'learn_more_about_jesus',
22
22
  ]);
23
- const WahaUserStateSchema = zod_1.z.object({
23
+ exports.WahaUserStateSchema = zod_1.z.object({
24
24
  wahaUserId: zod_1.z.string().optional(),
25
25
  name: zod_1.z.string().optional(),
26
26
  email: zod_1.z.string().email().optional(),
27
- location: WahaUserLocationSchema.optional(),
28
- pastLocations: zod_1.z.array(WahaUserLocationSchema).optional(),
27
+ location: exports.WahaUserLocationSchema.optional(),
28
+ pastLocations: zod_1.z.array(exports.WahaUserLocationSchema).optional(),
29
29
  phoneLocation: zod_1.z.string().optional(),
30
30
  isSubscribedToEmailUpdates: zod_1.z.boolean().optional(),
31
31
  pushToken: zod_1.z.string().optional(),
@@ -39,7 +39,7 @@ const WahaUserStateSchema = zod_1.z.object({
39
39
  notificationLinksClicked: zod_1.z.number().optional(),
40
40
  isBeliever: zod_1.z.boolean().optional(),
41
41
  isInAGroup: zod_1.z.boolean().optional(),
42
- desires: zod_1.z.array(DesireIdSchema).optional(),
42
+ desires: zod_1.z.array(exports.DesireIdSchema).optional(),
43
43
  customDesire: zod_1.z.string().optional(),
44
44
  isCCWorker: zod_1.z.boolean().optional(),
45
45
  isAdvocate: zod_1.z.boolean().optional(),
@@ -53,8 +53,8 @@ const WahaUserStateSchema = zod_1.z.object({
53
53
  ])
54
54
  .optional(),
55
55
  });
56
- const WahaAppVersionSchema = zod_1.z.string().regex(/^\d+\.\d+\.\d+$/);
57
- const CompletionEventSchema = zod_1.z.object({
56
+ exports.WahaAppVersionSchema = zod_1.z.string().regex(/^\d+\.\d+\.\d+$/);
57
+ exports.CompletionEventSchema = zod_1.z.object({
58
58
  lessonId: zod_1.z.string(),
59
59
  meetLanguageId: zod_1.z.string(),
60
60
  time: zod_1.z.number(),
@@ -67,7 +67,7 @@ const CompletionEventSchema = zod_1.z.object({
67
67
  */
68
68
  manual: zod_1.z.boolean().optional(),
69
69
  });
70
- const WahaShareContentSchema = zod_1.z.enum([
70
+ exports.WahaShareContentSchema = zod_1.z.enum([
71
71
  'app',
72
72
  'passcode',
73
73
  'lessonAudio',
@@ -90,40 +90,40 @@ const WahaShareContentSchema = zod_1.z.enum([
90
90
  'note',
91
91
  'customSet',
92
92
  ]);
93
- const ShareLogEventSchema = zod_1.z.object({
93
+ exports.ShareLogEventSchema = zod_1.z.object({
94
94
  time: zod_1.z.number(),
95
- content: WahaShareContentSchema,
95
+ content: exports.WahaShareContentSchema,
96
96
  lessonId: zod_1.z.string().optional(),
97
97
  articleSlug: zod_1.z.string().optional(),
98
98
  });
99
- const BibleSessionSchema = zod_1.z.object({
99
+ exports.BibleSessionSchema = zod_1.z.object({
100
100
  chapter: zod_1.z.string(),
101
101
  timeSpent: zod_1.z.number(),
102
102
  startTime: zod_1.z.number(),
103
103
  translation: zod_1.z.string(),
104
104
  });
105
- const ArticleSessionSchema = zod_1.z.object({
105
+ exports.ArticleSessionSchema = zod_1.z.object({
106
106
  articleSlug: zod_1.z.string(),
107
107
  timeSpent: zod_1.z.number(),
108
108
  startTime: zod_1.z.number(),
109
109
  });
110
110
  // Zod schema for WahaUser extending WahaUserStateSchema
111
- exports.WahaUserSchema = WahaUserStateSchema.extend({
111
+ exports.WahaUserSchema = exports.WahaUserStateSchema.extend({
112
112
  pushToken: zod_1.z.string().optional(),
113
113
  securityModeOn: zod_1.z.boolean().optional(),
114
- appVersion: WahaAppVersionSchema,
114
+ appVersion: exports.WahaAppVersionSchema,
115
115
  lastUpdate: zod_1.z.number(),
116
116
  platform: zod_1.z.string(),
117
- completions: zod_1.z.array(CompletionEventSchema),
117
+ completions: zod_1.z.array(exports.CompletionEventSchema),
118
118
  trainingUnlocked: zod_1.z.boolean().optional(),
119
119
  meet: zod_1.z.string(),
120
120
  appInterface: zod_1.z.string(),
121
121
  meetFavorites: zod_1.z.array(zod_1.z.string()),
122
122
  osVersion: zod_1.z.string().nullable(),
123
123
  isDev: zod_1.z.boolean(),
124
- shareLog: zod_1.z.array(ShareLogEventSchema).optional(),
125
- bibleSessions: zod_1.z.array(BibleSessionSchema).optional(),
126
- articleSessions: zod_1.z.array(ArticleSessionSchema).optional(),
124
+ shareLog: zod_1.z.array(exports.ShareLogEventSchema).optional(),
125
+ bibleSessions: zod_1.z.array(exports.BibleSessionSchema).optional(),
126
+ articleSessions: zod_1.z.array(exports.ArticleSessionSchema).optional(),
127
127
  activated: zod_1.z.boolean().optional(),
128
128
  });
129
129
  exports.PushEnabledWahaUserSchema = exports.WahaUserSchema.omit({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waha-shared",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "author": "Waha",
5
5
  "description": "Shared assets for Waha's various apps",
6
6
  "files": [