@encatch/schema 0.1.30 → 0.1.32

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.
package/dist/esm/index.js CHANGED
@@ -769,7 +769,10 @@ var OtherFieldsSchema = z5.object({
769
769
  blockerFeedback: z5.boolean().describe("Whether to show blocker feedback for validation errors"),
770
770
  submitButtonLabel: z5.string().min(1).max(50).describe("Text for the submit button"),
771
771
  previousButtonLabel: z5.string().min(1).max(50).describe("Text for the previous button in pagination"),
772
- nextButtonLabel: z5.string().min(1).max(50).describe("Text for the next button in pagination")
772
+ nextButtonLabel: z5.string().min(1).max(50).describe("Text for the next button in pagination"),
773
+ aiEnhancementSuccessMessage: z5.string().min(1).max(100).describe("Message shown when AI enhancement is successful (max 100 characters)"),
774
+ aiEnhancementCooldownErrorMessage: z5.string().min(1).max(100).describe("Message shown when AI enhancement is on cooldown (max 100 characters)"),
775
+ aiEnhancementMaxReachedErrorMessage: z5.string().min(1).max(100).describe("Message shown when maximum AI enhancements reached (max 100 characters)")
773
776
  }).describe("Schema for other form configuration fields");
774
777
  var LanguageFieldSchema = z5.object({
775
778
  value: z5.string().min(1).max(10).describe("Language code (e.g., 'en', 'es', 'fr')"),
@@ -780,7 +783,10 @@ var LanguagesSchema = z5.array(LanguageFieldSchema).describe("Schema for array o
780
783
  var OtherFieldsTranslationSchema = z5.object({
781
784
  submitButtonLabel: z5.string().min(1).max(50).describe("Translated text for the submit button"),
782
785
  previousButtonLabel: z5.string().min(1).max(50).describe("Translated text for the previous button in pagination"),
783
- nextButtonLabel: z5.string().min(1).max(50).describe("Translated text for the next button in pagination")
786
+ nextButtonLabel: z5.string().min(1).max(50).describe("Translated text for the next button in pagination"),
787
+ aiEnhancementSuccessMessage: z5.string().min(1).max(100).describe("Translated message shown when AI enhancement is successful (max 100 characters)"),
788
+ aiEnhancementCooldownErrorMessage: z5.string().min(1).max(100).describe("Translated message shown when AI enhancement is on cooldown (max 100 characters)"),
789
+ aiEnhancementMaxReachedErrorMessage: z5.string().min(1).max(100).describe("Translated message shown when maximum AI enhancements reached (max 100 characters)")
784
790
  }).describe("Schema for other form configuration field translations");
785
791
 
786
792
  // src/schemas/fields/theme-schema.ts
@@ -921,7 +927,7 @@ var otherConfigurationPropertiesSchema = z8.discriminatedUnion("isEnabled", [
921
927
  // When other configuration is disabled
922
928
  z8.object({
923
929
  isEnabled: z8.literal(false).describe("Whether other configuration properties are enabled"),
924
- otherFields: OtherFieldsSchema.optional().describe("Other form configuration fields including pagination, buttons, and display options"),
930
+ otherFields: OtherFieldsSchema.describe("Other form configuration fields including pagination, buttons, and display options"),
925
931
  translations: z8.record(z8.string(), OtherFieldsTranslationSchema).optional().describe("Translations for other configuration field labels and buttons keyed by language code")
926
932
  }),
927
933
  // When other configuration is enabled
@@ -1119,7 +1125,8 @@ var feedbackConfigurationItemSchema = z12.object({
1119
1125
  }).describe("Feature settings for the feedback form"),
1120
1126
  selectedIconPosition: z12.string().describe("Selected position for the feedback icon"),
1121
1127
  selectedPosition: z12.string().describe("Selected position for the feedback form")
1122
- }).describe("Appearance properties for the feedback form")
1128
+ }).describe("Appearance properties for the feedback form"),
1129
+ frequencyAndScheduling: frequencyAndSchedulingPropertiesSchema.optional().describe("Frequency and scheduling properties for the feedback (optional)")
1123
1130
  }).describe("Individual feedback configuration item in the list");
1124
1131
  var fetchFormConfigSchema = z12.object({
1125
1132
  feedbackConfigurationId: z12.string().uuid().describe("Unique identifier for the feedback configuration"),
@@ -1268,14 +1275,62 @@ function objectToPascal(obj) {
1268
1275
  }
1269
1276
  __name(objectToPascal, "objectToPascal");
1270
1277
 
1271
- // src/index.ts
1278
+ // src/schemas/fields/app-props-schema.ts
1272
1279
  import { z as z14 } from "zod";
1280
+ var currentModeSchema = z14.enum(["light", "dark"]).describe("Current theme mode of the application");
1281
+ var CurrentModes = {
1282
+ LIGHT: "light",
1283
+ DARK: "dark"
1284
+ };
1285
+ var appPropsSchema = z14.object({
1286
+ theme: themesSchema.describe(
1287
+ "Theme configuration including light and dark theme colors"
1288
+ ),
1289
+ currentMode: currentModeSchema.describe(
1290
+ "Current theme mode (light or dark)"
1291
+ ),
1292
+ currentLanguage: LanguageFieldSchema.describe(
1293
+ "Currently selected language configuration"
1294
+ ),
1295
+ questions: z14.record(z14.string(), combinedQuestionSchema).describe("Collection of questions keyed by their string identifiers"),
1296
+ questionLanguages: LanguagesSchema.describe(
1297
+ "Available languages for questions"
1298
+ ),
1299
+ otherConfigurationProperties: otherConfigurationPropertiesSchema.describe(
1300
+ "Other configuration properties including form display options and translations"
1301
+ ),
1302
+ welcomeScreenProperties: welcomeScreenPropertiesSchema.optional().describe("Welcome screen configuration (optional)"),
1303
+ endScreenProperties: endScreenPropertiesSchema.optional().describe("End screen configuration (optional)"),
1304
+ translations: translationsSchema.optional().describe(
1305
+ "Multi-language translations for questions and form content (optional)"
1306
+ ),
1307
+ onSectionChange: z14.function({
1308
+ input: [z14.number()],
1309
+ output: z14.void()
1310
+ }).optional().describe("Optional callback function triggered when section changes"),
1311
+ onClose: z14.function({
1312
+ input: [],
1313
+ output: z14.void()
1314
+ }).optional().describe("Optional callback function triggered when the form is closed"),
1315
+ sections: z14.array(sectionSchema).describe(
1316
+ "Array of sections that organize questions into logical groups"
1317
+ ),
1318
+ themeSettings: themeConfigurationSchema.describe(
1319
+ "Complete theme configuration including colors, features, and positioning"
1320
+ )
1321
+ }).describe(
1322
+ "Schema for application props interface containing all form configuration and state"
1323
+ );
1324
+
1325
+ // src/index.ts
1326
+ import { z as z15 } from "zod";
1273
1327
  export {
1274
1328
  AnnotationMarkerSchema,
1275
1329
  AnnotationSchema,
1276
1330
  AnswerItemSchema,
1277
1331
  AnswerSchema,
1278
1332
  ChoiceOrderOptions,
1333
+ CurrentModes,
1279
1334
  DeviceThemes,
1280
1335
  DismissBehaviors,
1281
1336
  EndFieldsTranslationSchema,
@@ -1304,6 +1359,7 @@ export {
1304
1359
  YesNoValues,
1305
1360
  annotationQuestionSchema,
1306
1361
  annotationQuestionTranslationSchema,
1362
+ appPropsSchema,
1307
1363
  appearancePropertiesSchema,
1308
1364
  audienceSegmentSchema,
1309
1365
  audienceTriggerPropertiesSchema,
@@ -1315,6 +1371,7 @@ export {
1315
1371
  conditionalIfSchema,
1316
1372
  conditionalWhenSchema,
1317
1373
  createTranslationProvider,
1374
+ currentModeSchema,
1318
1375
  customEventFieldOperatorSchema,
1319
1376
  customEventFieldSchema,
1320
1377
  deviceInfoSchema,
@@ -1402,6 +1459,6 @@ export {
1402
1459
  welcomeScreenPropertiesSchema,
1403
1460
  whoSchema,
1404
1461
  yesNoSchema,
1405
- z14 as z
1462
+ z15 as z
1406
1463
  };
1407
1464
  //# sourceMappingURL=index.js.map