waha-shared 1.0.200 → 1.0.201

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.
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.MicroLessonsResponse = exports.ResponseMicroLessonSchema = exports.MicroLessonSchema = void 0;
7
+ const zod_1 = __importDefault(require("zod"));
8
+ const webContent_1 = require("./webContent");
9
+ exports.MicroLessonSchema = zod_1.default.object({
10
+ title: zod_1.default.string(),
11
+ subtitle: zod_1.default.string().optional(),
12
+ date: webContent_1.DateSchema,
13
+ isDraft: webContent_1.IsDraftSchema,
14
+ seekerFriendly: webContent_1.SeekerFriendlySchema,
15
+ platform: webContent_1.PlatformSchema,
16
+ campaign: zod_1.default
17
+ .string()
18
+ .optional()
19
+ .describe('Optional campaign identifier for tracking purposes.'),
20
+ pages: zod_1.default.array(zod_1.default.object({
21
+ heading: zod_1.default.string().describe('The heading of the page'),
22
+ body: zod_1.default.string().optional(),
23
+ image: zod_1.default.string().optional(),
24
+ audio: zod_1.default
25
+ .object({
26
+ audioUrl: zod_1.default.string(),
27
+ loop: zod_1.default.boolean().optional(),
28
+ })
29
+ .optional(),
30
+ video: zod_1.default
31
+ .object({
32
+ videoUrl: zod_1.default.string(),
33
+ autoplay: zod_1.default.boolean().optional(),
34
+ loop: zod_1.default.boolean().optional(),
35
+ })
36
+ .optional(),
37
+ textInput: zod_1.default
38
+ .object({
39
+ show: zod_1.default.boolean(),
40
+ placeholder: zod_1.default.string().optional(),
41
+ showCopyButton: zod_1.default.boolean().optional(),
42
+ prefilledText: zod_1.default.string().optional(),
43
+ })
44
+ .optional(),
45
+ radioButtons: zod_1.default
46
+ .array(zod_1.default.object({
47
+ heading: zod_1.default.string().optional(),
48
+ body: zod_1.default.string().optional(),
49
+ }))
50
+ .optional(),
51
+ platform: webContent_1.PlatformSchema.optional(),
52
+ notification: zod_1.default
53
+ .object({
54
+ title: zod_1.default.string(),
55
+ body: zod_1.default.string(),
56
+ delayInHours: zod_1.default
57
+ .number()
58
+ .describe('The delay in hours before the notification is sent.'),
59
+ })
60
+ .optional()
61
+ .describe('Optional notification to send after the lesson is completed.'),
62
+ })),
63
+ });
64
+ exports.ResponseMicroLessonSchema = zod_1.default.object({
65
+ id: zod_1.default.string(),
66
+ data: exports.MicroLessonSchema,
67
+ });
68
+ exports.MicroLessonsResponse = zod_1.default.object({
69
+ data: zod_1.default.array(exports.ResponseMicroLessonSchema),
70
+ });
@@ -0,0 +1,5 @@
1
+ import z from 'zod';
2
+ export declare const DateSchema: z.ZodUnion<[z.ZodString, z.ZodDate]>;
3
+ export declare const IsDraftSchema: z.ZodBoolean;
4
+ export declare const SeekerFriendlySchema: z.ZodBoolean;
5
+ export declare const PlatformSchema: z.ZodEnum<["Web Only", "App Only", "All"]>;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.PlatformSchema = exports.SeekerFriendlySchema = exports.IsDraftSchema = exports.DateSchema = void 0;
7
+ const zod_1 = __importDefault(require("zod"));
8
+ exports.DateSchema = zod_1.default
9
+ .union([zod_1.default.string().datetime(), zod_1.default.date()])
10
+ .describe('The date to publish the content. Can be in the future.');
11
+ exports.IsDraftSchema = zod_1.default
12
+ .boolean()
13
+ .describe('If this is checked the content will be marked as a draft and only available on the test website.');
14
+ exports.SeekerFriendlySchema = zod_1.default
15
+ .boolean()
16
+ .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.');
17
+ exports.PlatformSchema = zod_1.default
18
+ .enum(['Web Only', 'App Only', 'All'])
19
+ .describe('Set to determine which platform the content is available on.');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waha-shared",
3
- "version": "1.0.200",
3
+ "version": "1.0.201",
4
4
  "author": "Waha",
5
5
  "dependencies": {
6
6
  "@types/signale": "^1.4.7",