@encatch/schema 0.0.1

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.
Files changed (52) hide show
  1. package/README.md +7 -0
  2. package/dist/cjs/index.js +30 -0
  3. package/dist/cjs/index.js.map +1 -0
  4. package/dist/cjs/schemas/fields/answer-schema.js +103 -0
  5. package/dist/cjs/schemas/fields/answer-schema.js.map +1 -0
  6. package/dist/cjs/schemas/fields/auto-trigger-schema.js +49 -0
  7. package/dist/cjs/schemas/fields/auto-trigger-schema.js.map +1 -0
  8. package/dist/cjs/schemas/fields/field-schema.js +678 -0
  9. package/dist/cjs/schemas/fields/field-schema.js.map +1 -0
  10. package/dist/cjs/schemas/fields/form-properties-schema.js +136 -0
  11. package/dist/cjs/schemas/fields/form-properties-schema.js.map +1 -0
  12. package/dist/cjs/schemas/fields/form-schema.js +123 -0
  13. package/dist/cjs/schemas/fields/form-schema.js.map +1 -0
  14. package/dist/cjs/schemas/fields/other-screen-schema.js +169 -0
  15. package/dist/cjs/schemas/fields/other-screen-schema.js.map +1 -0
  16. package/dist/cjs/schemas/fields/theme-schema.js +85 -0
  17. package/dist/cjs/schemas/fields/theme-schema.js.map +1 -0
  18. package/dist/cjs/schemas/fields/translations-example.js +187 -0
  19. package/dist/cjs/schemas/fields/translations-example.js.map +1 -0
  20. package/dist/cjs/schemas/fields/translations-schema.js +198 -0
  21. package/dist/cjs/schemas/fields/translations-schema.js.map +1 -0
  22. package/dist/esm/index.js +12 -0
  23. package/dist/esm/index.js.map +1 -0
  24. package/dist/esm/schemas/fields/answer-schema.js +100 -0
  25. package/dist/esm/schemas/fields/answer-schema.js.map +1 -0
  26. package/dist/esm/schemas/fields/auto-trigger-schema.js +46 -0
  27. package/dist/esm/schemas/fields/auto-trigger-schema.js.map +1 -0
  28. package/dist/esm/schemas/fields/field-schema.js +675 -0
  29. package/dist/esm/schemas/fields/field-schema.js.map +1 -0
  30. package/dist/esm/schemas/fields/form-properties-schema.js +133 -0
  31. package/dist/esm/schemas/fields/form-properties-schema.js.map +1 -0
  32. package/dist/esm/schemas/fields/form-schema.js +120 -0
  33. package/dist/esm/schemas/fields/form-schema.js.map +1 -0
  34. package/dist/esm/schemas/fields/other-screen-schema.js +166 -0
  35. package/dist/esm/schemas/fields/other-screen-schema.js.map +1 -0
  36. package/dist/esm/schemas/fields/theme-schema.js +82 -0
  37. package/dist/esm/schemas/fields/theme-schema.js.map +1 -0
  38. package/dist/esm/schemas/fields/translations-example.js +181 -0
  39. package/dist/esm/schemas/fields/translations-example.js.map +1 -0
  40. package/dist/esm/schemas/fields/translations-schema.js +193 -0
  41. package/dist/esm/schemas/fields/translations-schema.js.map +1 -0
  42. package/dist/types/index.d.ts +9 -0
  43. package/dist/types/schemas/fields/answer-schema.d.ts +77 -0
  44. package/dist/types/schemas/fields/auto-trigger-schema.d.ts +21 -0
  45. package/dist/types/schemas/fields/field-schema.d.ts +1114 -0
  46. package/dist/types/schemas/fields/form-properties-schema.d.ts +1035 -0
  47. package/dist/types/schemas/fields/form-schema.d.ts +68 -0
  48. package/dist/types/schemas/fields/other-screen-schema.d.ts +58 -0
  49. package/dist/types/schemas/fields/theme-schema.d.ts +91 -0
  50. package/dist/types/schemas/fields/translations-example.d.ts +10 -0
  51. package/dist/types/schemas/fields/translations-schema.d.ts +863 -0
  52. package/package.json +33 -0
@@ -0,0 +1,68 @@
1
+ import { z } from "zod";
2
+ export declare const surveyTypeSchema: z.ZodEnum<{
3
+ R: "R";
4
+ O: "O";
5
+ }>;
6
+ export declare const yesNoSchema: z.ZodEnum<{
7
+ Y: "Y";
8
+ N: "N";
9
+ }>;
10
+ export declare const recurringUnitSchema: z.ZodEnum<{
11
+ minutes: "minutes";
12
+ hours: "hours";
13
+ days: "days";
14
+ weeks: "weeks";
15
+ months: "months";
16
+ years: "years";
17
+ }>;
18
+ export declare const frequencyAndSchedulingPropertiesSchema: z.ZodObject<{
19
+ surveyType: z.ZodEnum<{
20
+ R: "R";
21
+ O: "O";
22
+ }>;
23
+ showOnce: z.ZodEnum<{
24
+ Y: "Y";
25
+ N: "N";
26
+ }>;
27
+ stopWhenResponsesCount: z.ZodString;
28
+ recurringValue: z.ZodString;
29
+ recurringUnit: z.ZodEnum<{
30
+ minutes: "minutes";
31
+ hours: "hours";
32
+ days: "days";
33
+ weeks: "weeks";
34
+ months: "months";
35
+ years: "years";
36
+ }>;
37
+ startDate: z.ZodString;
38
+ stopDate: z.ZodString;
39
+ }, z.core.$strip>;
40
+ export declare const externalPublishingPropertiesSchema: z.ZodObject<{
41
+ isShareable: z.ZodBoolean;
42
+ isEmailShareable: z.ZodBoolean;
43
+ }, z.core.$strip>;
44
+ export declare const publicationStatusSchema: z.ZodEnum<{
45
+ D: "D";
46
+ P: "P";
47
+ A: "A";
48
+ }>;
49
+ export declare const feedbackConfigurationSchema: z.ZodObject<{
50
+ form_title: z.ZodString;
51
+ form_description: z.ZodString;
52
+ duration: z.ZodObject<{
53
+ from: z.ZodString;
54
+ to: z.ZodString;
55
+ }, z.core.$strip>;
56
+ is_published: z.ZodEnum<{
57
+ D: "D";
58
+ P: "P";
59
+ A: "A";
60
+ }>;
61
+ }, z.core.$strip>;
62
+ export type SurveyType = z.infer<typeof surveyTypeSchema>;
63
+ export type YesNo = z.infer<typeof yesNoSchema>;
64
+ export type RecurringUnit = z.infer<typeof recurringUnitSchema>;
65
+ export type PublicationStatus = z.infer<typeof publicationStatusSchema>;
66
+ export type FeedbackConfiguration = z.infer<typeof feedbackConfigurationSchema>;
67
+ export type FrequencyAndSchedulingProperties = z.infer<typeof frequencyAndSchedulingPropertiesSchema>;
68
+ export type ExternalPublishingProperties = z.infer<typeof externalPublishingPropertiesSchema>;
@@ -0,0 +1,58 @@
1
+ import { z } from "zod";
2
+ export declare const WelcomeScreenFieldsSchema: z.ZodObject<{
3
+ title: z.ZodString;
4
+ description: z.ZodString;
5
+ buttonLabel: z.ZodString;
6
+ }, z.core.$strip>;
7
+ export declare const EndScreenFieldsSchema: z.ZodObject<{
8
+ title: z.ZodString;
9
+ message: z.ZodString;
10
+ buttonLabel: z.ZodString;
11
+ dismissBehavior: z.ZodEnum<{
12
+ fade: "fade";
13
+ manual: "manual";
14
+ }>;
15
+ fadeDuration: z.ZodNumber;
16
+ }, z.core.$strip>;
17
+ export declare const WelcomeFieldsTranslationSchema: z.ZodObject<{
18
+ title: z.ZodString;
19
+ description: z.ZodString;
20
+ buttonLabel: z.ZodString;
21
+ }, z.core.$strip>;
22
+ export declare const EndFieldsTranslationSchema: z.ZodObject<{
23
+ buttonLabel: z.ZodString;
24
+ title: z.ZodString;
25
+ message: z.ZodString;
26
+ }, z.core.$strip>;
27
+ export declare const OtherFieldsSchema: z.ZodObject<{
28
+ pagination: z.ZodBoolean;
29
+ questionNumber: z.ZodBoolean;
30
+ pageTitle: z.ZodBoolean;
31
+ blockerFeedback: z.ZodBoolean;
32
+ submitButtonLabel: z.ZodString;
33
+ previousButtonLabel: z.ZodString;
34
+ nextButtonLabel: z.ZodString;
35
+ }, z.core.$strip>;
36
+ export declare const LanguageFieldSchema: z.ZodObject<{
37
+ value: z.ZodString;
38
+ label: z.ZodString;
39
+ isFixed: z.ZodDefault<z.ZodBoolean>;
40
+ }, z.core.$strip>;
41
+ export declare const LanguagesSchema: z.ZodArray<z.ZodObject<{
42
+ value: z.ZodString;
43
+ label: z.ZodString;
44
+ isFixed: z.ZodDefault<z.ZodBoolean>;
45
+ }, z.core.$strip>>;
46
+ export declare const OtherFieldsTranslationSchema: z.ZodObject<{
47
+ submitButtonLabel: z.ZodString;
48
+ previousButtonLabel: z.ZodString;
49
+ nextButtonLabel: z.ZodString;
50
+ }, z.core.$strip>;
51
+ export type WelcomeFields = z.infer<typeof WelcomeScreenFieldsSchema>;
52
+ export type EndFields = z.infer<typeof EndScreenFieldsSchema>;
53
+ export type WelcomeFieldsTranslation = z.infer<typeof WelcomeFieldsTranslationSchema>;
54
+ export type EndFieldsTranslation = z.infer<typeof EndFieldsTranslationSchema>;
55
+ export type OtherFields = z.infer<typeof OtherFieldsSchema>;
56
+ export type OtherFieldsTranslation = z.infer<typeof OtherFieldsTranslationSchema>;
57
+ export type LanguageField = z.infer<typeof LanguageFieldSchema>;
58
+ export type Languages = z.infer<typeof LanguagesSchema>;
@@ -0,0 +1,91 @@
1
+ import { z } from "zod";
2
+ export declare const positionSchema: z.ZodEnum<{
3
+ "top-left": "top-left";
4
+ "top-center": "top-center";
5
+ "top-right": "top-right";
6
+ "middle-left": "middle-left";
7
+ "middle-center": "middle-center";
8
+ "middle-right": "middle-right";
9
+ "bottom-left": "bottom-left";
10
+ "bottom-center": "bottom-center";
11
+ "bottom-right": "bottom-right";
12
+ }>;
13
+ export declare const featureSettingsSchema: z.ZodObject<{
14
+ darkOverlay: z.ZodBoolean;
15
+ closeButton: z.ZodBoolean;
16
+ progressBar: z.ZodBoolean;
17
+ showBranding: z.ZodBoolean;
18
+ customPosition: z.ZodBoolean;
19
+ customIconPosition: z.ZodBoolean;
20
+ }, z.core.$strip>;
21
+ export declare const themeColorsSchema: z.ZodObject<{
22
+ brandColor: z.ZodString;
23
+ overlayColor: z.ZodString;
24
+ textColor: z.ZodString;
25
+ backgroundColor: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
26
+ }, z.core.$strip>;
27
+ export declare const themesSchema: z.ZodObject<{
28
+ light: z.ZodObject<{
29
+ brandColor: z.ZodString;
30
+ overlayColor: z.ZodString;
31
+ textColor: z.ZodString;
32
+ backgroundColor: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
33
+ }, z.core.$strip>;
34
+ dark: z.ZodObject<{
35
+ brandColor: z.ZodString;
36
+ overlayColor: z.ZodString;
37
+ textColor: z.ZodString;
38
+ backgroundColor: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
39
+ }, z.core.$strip>;
40
+ }, z.core.$strip>;
41
+ export declare const themeConfigurationSchema: z.ZodObject<{
42
+ themes: z.ZodObject<{
43
+ light: z.ZodObject<{
44
+ brandColor: z.ZodString;
45
+ overlayColor: z.ZodString;
46
+ textColor: z.ZodString;
47
+ backgroundColor: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
48
+ }, z.core.$strip>;
49
+ dark: z.ZodObject<{
50
+ brandColor: z.ZodString;
51
+ overlayColor: z.ZodString;
52
+ textColor: z.ZodString;
53
+ backgroundColor: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
54
+ }, z.core.$strip>;
55
+ }, z.core.$strip>;
56
+ featureSettings: z.ZodObject<{
57
+ darkOverlay: z.ZodBoolean;
58
+ closeButton: z.ZodBoolean;
59
+ progressBar: z.ZodBoolean;
60
+ showBranding: z.ZodBoolean;
61
+ customPosition: z.ZodBoolean;
62
+ customIconPosition: z.ZodBoolean;
63
+ }, z.core.$strip>;
64
+ selectedPosition: z.ZodEnum<{
65
+ "top-left": "top-left";
66
+ "top-center": "top-center";
67
+ "top-right": "top-right";
68
+ "middle-left": "middle-left";
69
+ "middle-center": "middle-center";
70
+ "middle-right": "middle-right";
71
+ "bottom-left": "bottom-left";
72
+ "bottom-center": "bottom-center";
73
+ "bottom-right": "bottom-right";
74
+ }>;
75
+ selectedIconPosition: z.ZodEnum<{
76
+ "top-left": "top-left";
77
+ "top-center": "top-center";
78
+ "top-right": "top-right";
79
+ "middle-left": "middle-left";
80
+ "middle-center": "middle-center";
81
+ "middle-right": "middle-right";
82
+ "bottom-left": "bottom-left";
83
+ "bottom-center": "bottom-center";
84
+ "bottom-right": "bottom-right";
85
+ }>;
86
+ }, z.core.$strip>;
87
+ export type Position = z.infer<typeof positionSchema>;
88
+ export type FeatureSettings = z.infer<typeof featureSettingsSchema>;
89
+ export type ThemeColors = z.infer<typeof themeColorsSchema>;
90
+ export type Themes = z.infer<typeof themesSchema>;
91
+ export type ThemeConfiguration = z.infer<typeof themeConfigurationSchema>;
@@ -0,0 +1,10 @@
1
+ import { Translations } from './translations-schema';
2
+ import { Languages, LanguageField } from './other-screen-schema';
3
+ export declare const exampleTranslations: Translations;
4
+ export declare const availableLanguages: Languages;
5
+ export declare const translationProvider: import("./translations-schema").TranslationProvider;
6
+ export declare function getLanguageDisplayName(languageCode: string): string;
7
+ export declare function getSupportedLanguages(): LanguageField[];
8
+ export declare function demonstrateUsage(): void;
9
+ export type { Translations } from './translations-schema';
10
+ export type { Languages, LanguageField } from './other-screen-schema';