waha-shared 1.0.252 → 1.0.254

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,4 +1,15 @@
1
1
  import z from 'zod/v4';
2
+ export declare const MicroLessonRadioButtonSchema: z.ZodObject<{
3
+ heading: z.ZodOptional<z.ZodString>;
4
+ body: z.ZodOptional<z.ZodString>;
5
+ }, z.core.$strip>;
6
+ export type MicroLessonRadioButton = z.infer<typeof MicroLessonRadioButtonSchema>;
7
+ export declare const MicroLessonCtaButtonSchema: z.ZodObject<{
8
+ show: z.ZodBoolean;
9
+ label: z.ZodString;
10
+ href: z.ZodString;
11
+ }, z.core.$strip>;
12
+ export type MicroLessonCtaButton = z.infer<typeof MicroLessonCtaButtonSchema>;
2
13
  export declare const MicroLessonSchema: z.ZodObject<{
3
14
  title: z.ZodString;
4
15
  subtitle: z.ZodOptional<z.ZodString>;
@@ -204,3 +215,7 @@ export declare const MicroLessonSubmissionSchema: z.ZodObject<{
204
215
  }>;
205
216
  }, z.core.$strip>;
206
217
  export type MicroLessonSubmission = z.infer<typeof MicroLessonSubmissionSchema>;
218
+ export declare const MicroLessonLanguagesResponseSchema: z.ZodObject<{
219
+ data: z.ZodArray<z.ZodString>;
220
+ }, z.core.$strip>;
221
+ export type MicroLessonCategory = z.infer<typeof MicroLessonSchema>['category'];
@@ -3,10 +3,19 @@ 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.MicroLessonSubmissionSchema = exports.MicroLessonsResponse = exports.ResponseMicroLessonSchema = exports.MicroLessonSchema = void 0;
6
+ exports.MicroLessonLanguagesResponseSchema = exports.MicroLessonSubmissionSchema = exports.MicroLessonsResponse = exports.ResponseMicroLessonSchema = exports.MicroLessonSchema = exports.MicroLessonCtaButtonSchema = exports.MicroLessonRadioButtonSchema = void 0;
7
7
  const v4_1 = __importDefault(require("zod/v4"));
8
8
  const users_1 = require("./users");
9
9
  const webContent_1 = require("./webContent");
10
+ exports.MicroLessonRadioButtonSchema = v4_1.default.object({
11
+ heading: v4_1.default.string().optional(),
12
+ body: v4_1.default.string().optional(),
13
+ });
14
+ exports.MicroLessonCtaButtonSchema = v4_1.default.object({
15
+ show: v4_1.default.boolean(),
16
+ label: v4_1.default.string(),
17
+ href: v4_1.default.string(),
18
+ });
10
19
  exports.MicroLessonSchema = v4_1.default.object({
11
20
  title: v4_1.default.string(),
12
21
  subtitle: v4_1.default.string().optional(),
@@ -20,7 +29,8 @@ exports.MicroLessonSchema = v4_1.default.object({
20
29
  .string()
21
30
  .optional()
22
31
  .describe('Optional campaign identifier for tracking purposes.'),
23
- pages: v4_1.default.array(v4_1.default.object({
32
+ pages: v4_1.default.array(v4_1.default
33
+ .object({
24
34
  heading: v4_1.default.string().describe('The heading of the page'),
25
35
  body: v4_1.default.string().optional(),
26
36
  icon: v4_1.default.string().optional(),
@@ -35,19 +45,8 @@ exports.MicroLessonSchema = v4_1.default.object({
35
45
  prefilledText: v4_1.default.string().optional(),
36
46
  })
37
47
  .optional(),
38
- ctaButton: v4_1.default
39
- .object({
40
- show: v4_1.default.boolean(),
41
- label: v4_1.default.string(),
42
- href: v4_1.default.string(),
43
- })
44
- .optional(),
45
- radioButtons: v4_1.default
46
- .array(v4_1.default.object({
47
- heading: v4_1.default.string().optional(),
48
- body: v4_1.default.string().optional(),
49
- }))
50
- .optional(),
48
+ ctaButton: exports.MicroLessonCtaButtonSchema.optional(),
49
+ radioButtons: v4_1.default.array(exports.MicroLessonRadioButtonSchema).optional(),
51
50
  platform: webContent_1.PlatformSchema.optional(),
52
51
  notification: v4_1.default
53
52
  .object({
@@ -59,7 +58,8 @@ exports.MicroLessonSchema = v4_1.default.object({
59
58
  })
60
59
  .optional()
61
60
  .describe('Optional notification to send after the lesson is completed.'),
62
- })),
61
+ })
62
+ .describe('The pages of the micro lesson. The last page is always considered the completion page and often contains a CTA button.')),
63
63
  });
64
64
  exports.ResponseMicroLessonSchema = v4_1.default.object({
65
65
  id: v4_1.default.string(),
@@ -78,3 +78,6 @@ exports.MicroLessonSubmissionSchema = users_1.WahaUserLocationSchema.extend({
78
78
  timeSubmitted: v4_1.default.number(),
79
79
  platform: v4_1.default.enum(['ios', 'android', 'web']),
80
80
  });
81
+ exports.MicroLessonLanguagesResponseSchema = v4_1.default.object({
82
+ data: v4_1.default.array(v4_1.default.string()),
83
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waha-shared",
3
- "version": "1.0.252",
3
+ "version": "1.0.254",
4
4
  "author": "Waha",
5
5
  "dependencies": {
6
6
  "@types/signale": "^1.4.7",