@encatch/schema 1.1.0-beta.8 → 1.1.0

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
@@ -96,6 +96,9 @@ var thankYouQuestionTranslationSchema = baseQuestionTranslationFieldsSchema.exte
96
96
  var messagePanelQuestionTranslationSchema = baseQuestionTranslationFieldsSchema.extend({
97
97
  type: z.literal("message_panel").describe("Question type identifier")
98
98
  }).describe("Translation schema for message panel questions");
99
+ var consentQuestionTranslationSchema = baseQuestionTranslationFieldsSchema.extend({
100
+ type: z.literal("consent").describe("Question type identifier")
101
+ }).describe("Translation schema for consent questions; description carries the translated checkbox label (markdown supported)");
99
102
  var yesNoQuestionTranslationSchema = baseQuestionTranslationFieldsSchema.extend({
100
103
  type: z.literal("yes_no").describe("Question type identifier"),
101
104
  yesLabel: translationEntrySchema.optional().describe("Translated Yes label"),
@@ -167,6 +170,7 @@ var questionTranslationSchema = z.union([
167
170
  thankYouQuestionTranslationSchema,
168
171
  messagePanelQuestionTranslationSchema,
169
172
  yesNoQuestionTranslationSchema,
173
+ consentQuestionTranslationSchema,
170
174
  ratingMatrixQuestionTranslationSchema,
171
175
  matrixSingleChoiceQuestionTranslationSchema,
172
176
  matrixMultipleChoiceQuestionTranslationSchema
@@ -380,6 +384,9 @@ var sectionSchema = z2.object({
380
384
  inAppSingleQuestion: z2.boolean().default(false).describe(
381
385
  "When true, the native app shows one question at a time within this section"
382
386
  ),
387
+ isPreviousAllowed: z2.boolean().default(false).optional().describe(
388
+ "When the global previousButton mode is 'auto', controls whether the Previous button is shown for this section. Defaults to false (hidden)."
389
+ ),
383
390
  questionIds: z2.array(z2.string()).min(1).describe("Array of question IDs that belong to this section")
384
391
  }).describe("Schema defining sections that organize questions into logical groups");
385
392
  var questionStatusSchema = z2.enum(["D", "P", "A", "S"]);
@@ -478,8 +485,10 @@ var questionSchema = z2.object({
478
485
  status: questionStatusSchema.describe(
479
486
  "Current status of the question (Draft, Published, etc.)"
480
487
  ),
481
- textAlign: z2.enum(["left", "center"]).optional().default("left").describe("Text alignment for the question title and description"),
482
- nextButtonLabel: z2.string().min(1).max(50).optional().describe(
488
+ textAlign: z2.enum(["left", "center", "justify"]).optional().default("left").describe(
489
+ "Text alignment for the question title and description; `justify` is intended for consent questions (full-width justified consent body markdown)"
490
+ ),
491
+ nextButtonLabel: z2.string().min(1).max(50).default("Next").describe(
483
492
  "Label for the next button when advancing past this question (overrides section or form defaults when set)"
484
493
  )
485
494
  }).describe("Base schema for all question types with common properties");
@@ -920,7 +929,7 @@ var feedbackConfigurationSchema = z4.object({
920
929
  }).describe("Schema defining feedback configuration properties");
921
930
 
922
931
  // src/schemas/fields/form-properties-schema.ts
923
- import { z as z8 } from "zod";
932
+ import { z as z9 } from "zod";
924
933
 
925
934
  // src/schemas/fields/other-screen-schema.ts
926
935
  import { z as z5 } from "zod";
@@ -982,7 +991,9 @@ var ShareableModes = {
982
991
  DARK: "dark",
983
992
  SYSTEM: "system"
984
993
  };
985
- var previousButtonModeSchema = z6.enum(["never", "always", "auto"]).describe("Previous button visibility mode: never, always, or auto");
994
+ var previousButtonModeSchema = z6.enum(["never", "always", "auto"]).describe(
995
+ "Previous button visibility: never (always hidden), always (always shown), or auto (per-section via isPreviousAllowed)"
996
+ );
986
997
  var PreviousButtonModes = {
987
998
  NEVER: "never",
988
999
  ALWAYS: "always",
@@ -995,6 +1006,7 @@ var featureSettingsSchema = z6.object({
995
1006
  showBranding: z6.boolean().default(true).describe("Whether to display branding elements on the widget"),
996
1007
  customPosition: z6.boolean().describe("Whether custom positioning is enabled"),
997
1008
  customCss: z6.string().optional().describe("Custom CSS link to apply for the feedback form"),
1009
+ fontFamily: z6.string().optional().default("default").describe("Font family to use for the widget"),
998
1010
  shareableMode: shareableModeSchema.optional().default(ShareableModes.LIGHT).describe(
999
1011
  "Display mode for the shareable: light, dark, or system preference"
1000
1012
  ),
@@ -1002,7 +1014,7 @@ var featureSettingsSchema = z6.object({
1002
1014
  "Whether keyboard navigation is enabled for the shareable widget experience"
1003
1015
  ),
1004
1016
  rtl: z6.boolean().default(false).describe("Whether right-to-left text direction is enabled"),
1005
- previousButton: previousButtonModeSchema.default(PreviousButtonModes.ALWAYS).describe("Previous button visibility mode: never, always, or auto")
1017
+ previousButton: previousButtonModeSchema.default(PreviousButtonModes.ALWAYS).describe("Previous button: never (hidden) or always (shown)")
1006
1018
  }).describe("Feature settings controlling widget UI behavior and appearance");
1007
1019
  var themeColorsSchema = z6.object({
1008
1020
  theme: z6.string().optional().describe("Theme for a single mode (shadcn variables JSON)")
@@ -1101,30 +1113,158 @@ var audienceTriggerPropertiesSchema = z7.object({
1101
1113
  }
1102
1114
  ).describe("Schema defining audience trigger properties for form targeting");
1103
1115
 
1116
+ // src/schemas/fields/layout-schema.ts
1117
+ import { z as z8 } from "zod";
1118
+ var focalPointSchema = z8.object({
1119
+ x: z8.number().min(-1).max(1).describe("Horizontal focal point from -1 (far left) to 1 (far right)"),
1120
+ y: z8.number().min(-1).max(1).describe("Vertical focal point from -1 (top) to 1 (bottom)")
1121
+ }).describe("Focal point for image cropping and positioning within its container");
1122
+ var imageAttachmentSchema = z8.object({
1123
+ type: z8.literal("image"),
1124
+ href: z8.string().url().describe("URL of the image asset"),
1125
+ properties: z8.object({
1126
+ description: z8.string().optional().describe("Accessible description of the image (used as alt text when decorative is false)"),
1127
+ decorative: z8.boolean().default(false).describe(
1128
+ "When true the image is purely visual; screen readers skip it and description is not surfaced as alt text"
1129
+ ),
1130
+ brightness: z8.number().min(-100).max(100).optional().describe("Brightness adjustment: -100 darkest, 0 unchanged, +100 brightest. Applied as filter: brightness(1 + value/100)."),
1131
+ focalPoint: focalPointSchema.optional()
1132
+ }).optional().describe("Optional display properties for the image")
1133
+ }).describe("Image attachment for section layouts");
1134
+ var videoAttachmentSchema = z8.object({
1135
+ type: z8.literal("video"),
1136
+ href: z8.string().url().describe(
1137
+ "URL of the video \u2014 YouTube, Vimeo, Pexels, or self-hosted CDN"
1138
+ ),
1139
+ scale: z8.enum(["0.4", "0.6", "0.8", "1"]).default("0.6").optional().describe("Responsive scale for the video within its container"),
1140
+ properties: z8.object({
1141
+ description: z8.string().optional().describe("Accessible description of the video"),
1142
+ decorative: z8.boolean().default(false).describe("When true the video is purely decorative and screen readers skip it"),
1143
+ brightness: z8.number().min(-100).max(100).optional().describe("Brightness adjustment: -100 darkest, 0 unchanged, +100 brightest. Applied as filter: brightness(1 + value/100).")
1144
+ }).optional().describe("Optional display properties for the video")
1145
+ }).describe("Video attachment for section layouts (external embed or self-hosted CDN)");
1146
+ var colorAttachmentSchema = z8.object({
1147
+ type: z8.literal("color"),
1148
+ value: z8.string().regex(
1149
+ /^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$/,
1150
+ "Must be a valid hex color: #RGB, #RRGGBB, or #RRGGBBAA"
1151
+ ).describe("Hex color value e.g. #FF5733 (opaque) or #FF5733CC (with alpha)")
1152
+ }).describe("Solid color background attachment for section layouts");
1153
+ var gradientAttachmentSchema = z8.object({
1154
+ type: z8.literal("gradient"),
1155
+ value: z8.string().min(1).describe(
1156
+ "CSS gradient string e.g. linear-gradient(135deg, #FF5733, #3498db) or radial-gradient(circle, #FF5733, #3498db)"
1157
+ )
1158
+ }).describe("CSS gradient background attachment for section layouts");
1159
+ var layoutAttachmentSchema = z8.discriminatedUnion("type", [
1160
+ imageAttachmentSchema,
1161
+ videoAttachmentSchema,
1162
+ colorAttachmentSchema,
1163
+ gradientAttachmentSchema
1164
+ ]).describe(
1165
+ "Attachment used in a section layout \u2014 image, video, solid color, or gradient"
1166
+ );
1167
+ var LayoutAttachmentTypes = {
1168
+ IMAGE: "image",
1169
+ VIDEO: "video",
1170
+ COLOR: "color",
1171
+ GRADIENT: "gradient"
1172
+ };
1173
+ var stackLayoutSchema = z8.object({
1174
+ type: z8.literal("stack"),
1175
+ align: z8.enum(["left", "center", "cover"]).default("center").optional().describe(
1176
+ "How the media strip is displayed: 'center' (default, natural size centred at form width), 'left' (natural size left-aligned), 'cover' (full-bleed, fills strip edge-to-edge)"
1177
+ ),
1178
+ attachment: layoutAttachmentSchema.optional().describe("Background media rendered behind the question content")
1179
+ }).describe(
1180
+ "Stack layout: attachment renders as a full-bleed background behind the question"
1181
+ );
1182
+ var floatLayoutSchema = z8.object({
1183
+ type: z8.literal("float"),
1184
+ placement: z8.enum(["left", "right"]).describe("Side the media floats on"),
1185
+ attachment: layoutAttachmentSchema.optional().describe("Media that floats beside the question content")
1186
+ }).describe(
1187
+ "Float layout: attachment floats to the left or right of the question content"
1188
+ );
1189
+ var splitLayoutSchema = z8.object({
1190
+ type: z8.literal("split"),
1191
+ placement: z8.enum(["left", "right"]).describe("Side the media occupies in the split"),
1192
+ attachment: layoutAttachmentSchema.optional().describe("Media that occupies its half of the split viewport")
1193
+ }).describe(
1194
+ "Split layout: viewport is divided equally between media and question content"
1195
+ );
1196
+ var wallpaperLayoutSchema = z8.object({
1197
+ type: z8.literal("wallpaper"),
1198
+ attachment: layoutAttachmentSchema.optional().describe("Full-page background media")
1199
+ }).describe(
1200
+ "Wallpaper layout: attachment stretches or tiles across the entire viewport"
1201
+ );
1202
+ var sectionLayoutVariantSchema = z8.discriminatedUnion("type", [
1203
+ stackLayoutSchema,
1204
+ floatLayoutSchema,
1205
+ splitLayoutSchema,
1206
+ wallpaperLayoutSchema
1207
+ ]).describe(
1208
+ "Layout variant controlling how attachment is rendered relative to the question"
1209
+ );
1210
+ var LayoutTypes = {
1211
+ STACK: "stack",
1212
+ FLOAT: "float",
1213
+ SPLIT: "split",
1214
+ WALLPAPER: "wallpaper"
1215
+ };
1216
+ var layoutSurfaceSchema = z8.object({
1217
+ attachment: layoutAttachmentSchema.optional().describe(
1218
+ "Top-level media displayed inline with the question (separate from the layout's own attachment)"
1219
+ ),
1220
+ layout: sectionLayoutVariantSchema.describe(
1221
+ "How the attachment is positioned relative to the question content"
1222
+ )
1223
+ }).describe("Layout configuration for a single rendering surface");
1224
+ var sectionLayoutSchema = z8.object({
1225
+ inApp: layoutSurfaceSchema.optional().describe("Layout for in-app (native/webview) surfaces"),
1226
+ link: z8.object({
1227
+ mobile: layoutSurfaceSchema.optional().describe("Layout for link-based forms on mobile viewports (phones)"),
1228
+ others: layoutSurfaceSchema.optional().describe(
1229
+ "Layout for link-based forms on tablet and desktop viewports"
1230
+ )
1231
+ }).optional().describe(
1232
+ "Layout overrides for link/shareable surfaces, split by mobile and others (tablet + desktop)"
1233
+ )
1234
+ }).describe(
1235
+ "Per-section layout configuration scoped to in-app and link surfaces"
1236
+ );
1237
+
1104
1238
  // src/schemas/fields/form-properties-schema.ts
1105
- var otherConfigurationPropertiesSchema = z8.discriminatedUnion("isEnabled", [
1239
+ var otherConfigurationPropertiesSchema = z9.discriminatedUnion("isEnabled", [
1106
1240
  // When other configuration is disabled
1107
- z8.object({
1108
- isEnabled: z8.literal(false).describe("Whether other configuration properties are enabled"),
1241
+ z9.object({
1242
+ isEnabled: z9.literal(false).describe("Whether other configuration properties are enabled"),
1109
1243
  otherFields: OtherFieldsSchema.describe("Other form configuration fields including buttons and display options"),
1110
- translations: z8.record(z8.string(), OtherFieldsTranslationSchema).optional().describe("Translations for other configuration field labels and buttons keyed by language code")
1244
+ translations: z9.record(z9.string(), OtherFieldsTranslationSchema).optional().describe("Translations for other configuration field labels and buttons keyed by language code")
1111
1245
  }),
1112
1246
  // When other configuration is enabled
1113
- z8.object({
1114
- isEnabled: z8.literal(true).describe("Whether other configuration properties are enabled"),
1247
+ z9.object({
1248
+ isEnabled: z9.literal(true).describe("Whether other configuration properties are enabled"),
1115
1249
  otherFields: OtherFieldsSchema.describe("Other form configuration fields including buttons and display options"),
1116
- translations: z8.record(z8.string(), OtherFieldsTranslationSchema).describe("Translations for other configuration field labels and buttons keyed by language code")
1250
+ translations: z9.record(z9.string(), OtherFieldsTranslationSchema).describe("Translations for other configuration field labels and buttons keyed by language code")
1117
1251
  })
1118
1252
  ]).describe("Schema for other configuration properties including fields and translations");
1119
- var appearancePropertiesSchema = z8.object({
1120
- themeConfiguration: themeConfigurationSchema.describe("Theme configuration including colors, features, and positioning")
1121
- }).describe("Schema for appearance properties including theme configuration");
1122
- var formPropertiesSchema = z8.object({
1123
- feedbackConfigurationId: z8.uuid().describe("Unique identifier for the feedback configuration"),
1253
+ var appearancePropertiesSchema = z9.object({
1254
+ themeConfiguration: themeConfigurationSchema.describe("Theme configuration including colors, features, and positioning"),
1255
+ sectionLayoutDefaults: sectionLayoutSchema.optional().describe(
1256
+ "Default layout applied to sections that have no explicit entry in sectionLayouts. Resolved independently per surface (inApp, link.mobile, link.others)"
1257
+ ),
1258
+ sectionLayouts: z9.record(z9.string(), sectionLayoutSchema).optional().describe(
1259
+ "Per-section layout overrides keyed by section id. Takes precedence over sectionLayoutDefaults. Omit a section to fall back to sectionLayoutDefaults or engine default"
1260
+ )
1261
+ }).describe("Schema for appearance properties including theme configuration and per-section layouts");
1262
+ var formPropertiesSchema = z9.object({
1263
+ feedbackConfigurationId: z9.uuid().describe("Unique identifier for the feedback configuration"),
1124
1264
  feedbackConfiguration: feedbackConfigurationSchema.describe("Configuration properties for the feedback form"),
1125
- questionnaireFields: z8.object({
1126
- questions: z8.record(z8.string(), combinedQuestionSchema).describe("Collection of questions keyed by their string identifiers"),
1127
- sections: z8.array(sectionSchema).describe("Array of sections that organize questions into logical groups"),
1265
+ questionnaireFields: z9.object({
1266
+ questions: z9.record(z9.string(), combinedQuestionSchema).describe("Collection of questions keyed by their string identifiers"),
1267
+ sections: z9.array(sectionSchema).describe("Array of sections that organize questions into logical groups"),
1128
1268
  selectedLanguages: LanguagesSchema.describe("Array of languages selected for this questionnaire"),
1129
1269
  translations: translationsSchema.describe("Multi-language translations for questions and form content")
1130
1270
  }).describe("Fields defining the questionnaire structure, questions, sections, selected languages, and translations"),
@@ -1135,82 +1275,91 @@ var formPropertiesSchema = z8.object({
1135
1275
  }).describe("Complete schema for all feedback-level properties including publishing, audience targeting, configuration, and appearance");
1136
1276
 
1137
1277
  // src/schemas/fields/other-properties-schema.ts
1138
- import { z as z9 } from "zod";
1139
- var masterPropertiesSchema = z9.object({
1140
- mandatoryFetchConfigAtPaths: z9.array(z9.string()).describe("Array of paths where configuration must be fetched from server when navigated by user"),
1141
- configSyncIntervalSeconds: z9.number().int().positive().describe("Interval in seconds for configuration synchronization between client and server"),
1142
- disableAllSurvey: z9.boolean().describe("Flag to disable all surveys globally"),
1143
- feedbackIntervalDuration: z9.number().int().positive().describe("Duration in seconds for feedback interval between two auto triggered feedbacks")
1278
+ import { z as z10 } from "zod";
1279
+ var masterPropertiesSchema = z10.object({
1280
+ mandatoryFetchConfigAtPaths: z10.array(z10.string()).describe("Array of paths where configuration must be fetched from server when navigated by user"),
1281
+ configSyncIntervalSeconds: z10.number().int().positive().describe("Interval in seconds for configuration synchronization between client and server"),
1282
+ disableAllSurvey: z10.boolean().describe("Flag to disable all surveys globally"),
1283
+ feedbackIntervalDuration: z10.number().int().positive().describe("Duration in seconds for feedback interval between two auto triggered feedbacks")
1144
1284
  }).describe("Master properties configuration for global survey settings");
1145
1285
 
1146
1286
  // src/schemas/api/other-schema.ts
1147
- import { z as z10 } from "zod";
1148
- var deviceThemeSchema = z10.enum(["light", "dark", "system"]).describe("Enumeration of supported theme modes");
1287
+ import { z as z11 } from "zod";
1288
+ var deviceThemeSchema = z11.enum(["light", "dark", "system"]).describe("Enumeration of supported theme modes");
1149
1289
  var DeviceThemes = {
1150
1290
  LIGHT: "light",
1151
1291
  DARK: "dark",
1152
1292
  SYSTEM: "system"
1153
1293
  };
1154
- var deviceInfoSchema = z10.object({
1155
- $deviceType: z10.string().describe("Type of device being used"),
1156
- $timezone: z10.string().describe("Device timezone (e.g., 'Asia/Calcutta')"),
1294
+ var deviceInfoSchema = z11.object({
1295
+ $deviceType: z11.string().describe("Type of device being used"),
1296
+ $timezone: z11.string().describe("Device timezone (e.g., 'Asia/Calcutta')"),
1157
1297
  $theme: deviceThemeSchema.describe("Current theme mode preference"),
1158
- $os: z10.string().describe("Operating system running on the device"),
1159
- $osVersion: z10.string().describe("Version of the operating system"),
1160
- $appVersion: z10.string().describe("Version of the application"),
1161
- $app: z10.string().describe("Browser or application being used"),
1162
- $language: z10.string().describe("Language preference (e.g., 'en-GB')"),
1163
- $deviceId: z10.string().describe("Unique device identifier")
1298
+ $os: z11.string().describe("Operating system running on the device"),
1299
+ $osVersion: z11.string().describe("Version of the operating system"),
1300
+ $appVersion: z11.string().describe("Version of the application"),
1301
+ $app: z11.string().describe("Browser or application being used"),
1302
+ $language: z11.string().describe("Language preference (e.g., 'en-GB')"),
1303
+ $deviceId: z11.string().describe("Unique device identifier")
1164
1304
  }).describe("Device information collected from the client");
1165
- var sessionInfoSchema = z10.object({
1166
- $sessionId: z10.string().uuid().describe("Unique session identifier"),
1167
- $timestamp: z10.string().optional().describe("ISO timestamp of the session")
1305
+ var sessionInfoSchema = z11.object({
1306
+ $sessionId: z11.string().uuid().describe("Unique session identifier"),
1307
+ $timestamp: z11.string().optional().describe("ISO timestamp of the session")
1168
1308
  }).describe("Session information for tracking user sessions");
1169
- var deviceSessionInfoSchema = z10.object({
1309
+ var deviceSessionInfoSchema = z11.object({
1170
1310
  deviceInfo: deviceInfoSchema.describe("Device information"),
1171
1311
  sessionInfo: sessionInfoSchema.describe("Session information")
1172
1312
  }).describe("Combined device and session information");
1173
- var userPropertiesSchema = z10.object({
1174
- $counter: z10.record(z10.string(), z10.number().int()).describe(
1313
+ var userPropertiesSchema = z11.object({
1314
+ $counter: z11.record(z11.string(), z11.number().int()).describe(
1175
1315
  "Counter properties for user tracking (can be positive or negative)"
1176
1316
  ).optional(),
1177
- $set: z10.record(z10.string(), z10.any()).describe("Properties to set for the user").optional(),
1178
- $setOnce: z10.record(z10.string(), z10.any()).describe(
1317
+ $set: z11.record(z11.string(), z11.any()).describe("Properties to set for the user").optional(),
1318
+ $setOnce: z11.record(z11.string(), z11.any()).describe(
1179
1319
  "Properties to set once for the user (won't overwrite existing values)"
1180
1320
  ).optional(),
1181
- $unset: z10.array(z10.string()).describe("Array of property names to unset/remove from the user").optional()
1321
+ $unset: z11.array(z11.string()).describe("Array of property names to unset/remove from the user").optional()
1182
1322
  }).loose().describe(
1183
1323
  "User properties including counters, set operations, and other dynamic data"
1184
1324
  );
1185
- var userInfoSchema = z10.object({
1186
- userName: z10.string().email().describe("User's email address as username"),
1325
+ var userInfoSchema = z11.object({
1326
+ userName: z11.string().email().describe("User's email address as username"),
1187
1327
  properties: userPropertiesSchema.describe("User properties and counters")
1188
1328
  }).describe("User information including identification and properties");
1189
1329
 
1190
1330
  // src/schemas/api/submit-feedback-schema.ts
1191
- import { z as z11 } from "zod";
1192
- var formConfigSchema = z11.object({
1193
- feedbackIdentifier: z11.string().uuid().describe("Unique identifier for the feedback instance"),
1194
- feedbackConfigurationId: z11.string().uuid().describe("Unique identifier for the feedback configuration"),
1195
- completionTimeInSeconds: z11.number().int().min(0).describe("Time taken to complete the feedback in seconds"),
1196
- isPartialSubmit: z11.boolean().describe("Whether this is a partial submission (true) or full submission (false)"),
1197
- responseLanguageCode: z11.string().length(2).describe("Language code for the response (e.g., 'en', 'es')")
1331
+ import { z as z12 } from "zod";
1332
+ var formConfigSchema = z12.object({
1333
+ feedbackIdentifier: z12.string().uuid().describe("Unique identifier for the feedback instance"),
1334
+ feedbackConfigurationId: z12.string().uuid().describe("Unique identifier for the feedback configuration"),
1335
+ completionTimeInSeconds: z12.number().int().min(0).describe("Time taken to complete the feedback in seconds"),
1336
+ isPartialSubmit: z12.boolean().describe("Whether this is a partial submission (true) or full submission (false)"),
1337
+ responseLanguageCode: z12.string().length(2).describe("Language code for the response (e.g., 'en', 'es')")
1198
1338
  }).describe("Configuration information for the feedback form");
1199
- var questionResponseSchema = z11.object({
1200
- questionId: z11.string().uuid().describe("Unique identifier for the question"),
1339
+ var questionResponseSchema = z12.object({
1340
+ questionId: z12.string().uuid().describe("Unique identifier for the question"),
1201
1341
  answer: AnswerSchema.describe("The answer provided for this question"),
1202
- type: z11.string().describe("Type of the question (e.g., 'rating', 'single_choice')"),
1203
- error: z11.string().optional().describe("Error message if any validation failed")
1342
+ type: z12.string().describe("Type of the question (e.g., 'rating', 'single_choice')"),
1343
+ error: z12.string().optional().describe("Error message if any validation failed"),
1344
+ isOnPath: z12.boolean().optional().describe(
1345
+ "When present, whether this question was on the respondent's navigation path (e.g. logic jumps); false for questions not reached"
1346
+ ),
1347
+ timeSpentMs: z12.number().int().min(0).optional().describe(
1348
+ "Milliseconds the respondent spent on this question (even split across all visible questions in the section)"
1349
+ ),
1350
+ isPathTraversed: z12.boolean().optional().describe(
1351
+ "Whether this question was on the logical traversal path \u2014 true for visible questions and hidden questions whose rules were evaluated, false for questions never reached"
1352
+ )
1204
1353
  }).describe("Response to a specific question in the feedback form");
1205
- var responseSchema = z11.object({
1206
- questions: z11.array(questionResponseSchema).min(1).describe("Array of question responses")
1354
+ var responseSchema = z12.object({
1355
+ questions: z12.array(questionResponseSchema).min(1).describe("Array of question responses")
1207
1356
  }).describe("User responses to feedback questions");
1208
- var matchedTriggerPropertiesSchema = z11.object({
1209
- customEventName: z11.string().nullable().describe("Custom event name that triggered the feedback"),
1210
- currentPath: z11.string().describe("Current page path where feedback was triggered"),
1211
- eventType: z11.string().describe("Type of event that triggered the feedback")
1357
+ var matchedTriggerPropertiesSchema = z12.object({
1358
+ customEventName: z12.string().nullable().describe("Custom event name that triggered the feedback"),
1359
+ currentPath: z12.string().describe("Current page path where feedback was triggered"),
1360
+ eventType: z12.string().describe("Type of event that triggered the feedback")
1212
1361
  }).passthrough().describe("Properties of the trigger that matched for this feedback");
1213
- var baseSubmitFeedbackSchema = z11.object({
1362
+ var baseSubmitFeedbackSchema = z12.object({
1214
1363
  formConfig: formConfigSchema.describe("Form configuration information"),
1215
1364
  deviceInfo: deviceInfoSchema.describe("Device information"),
1216
1365
  sessionInfo: sessionInfoSchema.optional().describe("Session information"),
@@ -1218,70 +1367,70 @@ var baseSubmitFeedbackSchema = z11.object({
1218
1367
  matchedTriggerProperties: matchedTriggerPropertiesSchema.optional().describe(
1219
1368
  "Properties of the matched trigger"
1220
1369
  ),
1221
- customProperties: z11.record(z11.string(), z11.unknown()).optional().describe("Custom properties for advanced use cases")
1370
+ customProperties: z12.record(z12.string(), z12.unknown()).optional().describe("Custom properties for advanced use cases")
1222
1371
  }).describe("Base submit feedback request schema");
1223
1372
  var partialFeedbackSchema = baseSubmitFeedbackSchema.extend({
1224
1373
  formConfig: formConfigSchema.extend({
1225
- isPartialSubmit: z11.literal(true).describe("Indicates this is a partial submission")
1374
+ isPartialSubmit: z12.literal(true).describe("Indicates this is a partial submission")
1226
1375
  }),
1227
1376
  response: responseSchema.optional().describe("User responses (optional for partial submit)")
1228
1377
  }).describe("Partial feedback request schema (response optional)");
1229
1378
  var submitFeedbackSchema = baseSubmitFeedbackSchema.extend({
1230
1379
  formConfig: formConfigSchema.extend({
1231
- isPartialSubmit: z11.literal(false).describe("Indicates this is a full submission")
1380
+ isPartialSubmit: z12.literal(false).describe("Indicates this is a full submission")
1232
1381
  }),
1233
1382
  response: responseSchema.describe("User responses (required for full submit)")
1234
1383
  }).describe("Full submit feedback request schema (response required)");
1235
- var feedbackRequestSchema = z11.union([partialFeedbackSchema, submitFeedbackSchema]).describe("Union schema for both partial and full feedback submissions");
1384
+ var feedbackRequestSchema = z12.union([partialFeedbackSchema, submitFeedbackSchema]).describe("Union schema for both partial and full feedback submissions");
1236
1385
 
1237
1386
  // src/schemas/api/fetch-feedback-schema.ts
1238
- import { z as z12 } from "zod";
1239
- var feedbackConfigurationItemSchema = z12.object({
1240
- feedbackConfigurationId: z12.string().uuid().describe("Unique identifier for the feedback configuration"),
1241
- feedbackTitle: z12.string().describe("Title of the feedback configuration"),
1387
+ import { z as z13 } from "zod";
1388
+ var feedbackConfigurationItemSchema = z13.object({
1389
+ feedbackConfigurationId: z13.string().uuid().describe("Unique identifier for the feedback configuration"),
1390
+ feedbackTitle: z13.string().describe("Title of the feedback configuration"),
1242
1391
  // duration: durationSchema
1243
1392
  // .describe("Active duration for this feedback configuration"),
1244
1393
  triggerProperties: audienceTriggerPropertiesSchema.describe(
1245
1394
  "Trigger properties including auto/manual settings and audience segments"
1246
1395
  ),
1247
- appearanceProperties: z12.object({
1248
- themes: z12.object({
1249
- light: z12.object({
1250
- theme: z12.string().optional().describe("Theme for light mode (shadcn variables JSON)")
1396
+ appearanceProperties: z13.object({
1397
+ themes: z13.object({
1398
+ light: z13.object({
1399
+ theme: z13.string().optional().describe("Theme for light mode (shadcn variables JSON)")
1251
1400
  }).describe("Light theme"),
1252
- dark: z12.object({
1253
- theme: z12.string().optional().describe("Theme for dark mode (shadcn variables JSON)")
1401
+ dark: z13.object({
1402
+ theme: z13.string().optional().describe("Theme for dark mode (shadcn variables JSON)")
1254
1403
  }).describe("Dark theme")
1255
1404
  }).nullable().optional().describe("Theme configuration (optional)"),
1256
- featureSettings: z12.object({
1257
- darkOverlay: z12.boolean().describe("Whether to show dark overlay"),
1258
- closeButton: z12.boolean().describe("Whether to show close button"),
1259
- progressBar: z12.boolean().describe("Whether to show progress bar"),
1260
- showBranding: z12.boolean().describe("Whether to show branding"),
1261
- customPosition: z12.boolean().describe("Whether custom position is enabled"),
1262
- customIconPosition: z12.boolean().describe("Whether custom icon position is enabled"),
1263
- customCss: z12.string().nullable().optional().describe("Custom CSS link (optional)"),
1264
- enableShareableKeyboardNavigation: z12.boolean().default(false).describe(
1405
+ featureSettings: z13.object({
1406
+ darkOverlay: z13.boolean().describe("Whether to show dark overlay"),
1407
+ closeButton: z13.boolean().describe("Whether to show close button"),
1408
+ progressBar: z13.boolean().describe("Whether to show progress bar"),
1409
+ showBranding: z13.boolean().describe("Whether to show branding"),
1410
+ customPosition: z13.boolean().describe("Whether custom position is enabled"),
1411
+ customIconPosition: z13.boolean().describe("Whether custom icon position is enabled"),
1412
+ customCss: z13.string().nullable().optional().describe("Custom CSS link (optional)"),
1413
+ enableShareableKeyboardNavigation: z13.boolean().default(false).describe(
1265
1414
  "Whether keyboard navigation is enabled for the shareable widget experience"
1266
1415
  ),
1267
- rtl: z12.boolean().describe("Whether right-to-left text direction is enabled"),
1268
- previousButton: z12.enum(["never", "always", "auto"]).describe("Previous button visibility mode: never, always, or auto")
1416
+ rtl: z13.boolean().describe("Whether right-to-left text direction is enabled"),
1417
+ previousButton: z13.enum(["never", "always"]).describe("Previous button: never (hidden) or always (shown)")
1269
1418
  }).describe("Feature settings for the feedback form"),
1270
- selectedIconPosition: z12.string().describe("Selected position for the feedback icon"),
1271
- selectedPosition: z12.string().describe("Selected position for the feedback form")
1419
+ selectedIconPosition: z13.string().describe("Selected position for the feedback icon"),
1420
+ selectedPosition: z13.string().describe("Selected position for the feedback form")
1272
1421
  }).describe("Appearance properties for the feedback form")
1273
1422
  }).describe("Individual feedback configuration item in the list");
1274
- var fetchFormConfigSchema = z12.object({
1275
- feedbackConfigurationId: z12.string().uuid().describe("Unique identifier for the feedback configuration"),
1276
- responseLanguageCode: z12.string().length(2).describe("Language code for the response (e.g., 'en', 'es')")
1423
+ var fetchFormConfigSchema = z13.object({
1424
+ feedbackConfigurationId: z13.string().uuid().describe("Unique identifier for the feedback configuration"),
1425
+ responseLanguageCode: z13.string().length(2).describe("Language code for the response (e.g., 'en', 'es')")
1277
1426
  }).describe("Form configuration for fetching feedback details");
1278
- var fetchConfigurationListSchema = z12.object({
1427
+ var fetchConfigurationListSchema = z13.object({
1279
1428
  deviceInfo: deviceInfoSchema.describe("Device information"),
1280
1429
  sessionInfo: sessionInfoSchema.describe("Session information"),
1281
1430
  userInfo: userInfoSchema.optional().describe("User information (optional)"),
1282
- force: z12.boolean().optional().describe("Forcefully fetch eligible feedback list (optional)")
1431
+ force: z13.boolean().optional().describe("Forcefully fetch eligible feedback list (optional)")
1283
1432
  }).strict().describe("Request schema for fetching available feedback configurations");
1284
- var fetchFeedbackDetailsSchema = z12.object({
1433
+ var fetchFeedbackDetailsSchema = z13.object({
1285
1434
  formConfig: fetchFormConfigSchema.describe(
1286
1435
  "Form configuration for the specific feedback"
1287
1436
  ),
@@ -1289,40 +1438,40 @@ var fetchFeedbackDetailsSchema = z12.object({
1289
1438
  sessionInfo: sessionInfoSchema.describe("Session information"),
1290
1439
  userInfo: userInfoSchema.optional().describe("User information (optional)")
1291
1440
  }).strict().describe("Request schema for fetching specific feedback form details");
1292
- var formConfigurationResponseSchema = z12.object({
1293
- formTitle: z12.string().describe("Title of the feedback form"),
1294
- formDescription: z12.string().describe("Description of the feedback form")
1441
+ var formConfigurationResponseSchema = z13.object({
1442
+ formTitle: z13.string().describe("Title of the feedback form"),
1443
+ formDescription: z13.string().describe("Description of the feedback form")
1295
1444
  }).describe("Form configuration response with title and description");
1296
- var logicJumpRuleSchema = z12.object({
1297
- jsonLogic: z12.record(z12.string(), z12.unknown()).describe("JSON Logic expression to evaluate"),
1298
- targetQuestionId: z12.string().describe("Question ID to navigate to when this rule matches")
1445
+ var logicJumpRuleSchema = z13.object({
1446
+ jsonLogic: z13.record(z13.string(), z13.unknown()).describe("JSON Logic expression to evaluate"),
1447
+ targetQuestionId: z13.string().describe("Question ID to navigate to when this rule matches")
1299
1448
  }).describe("A single logic jump rule mapping a condition to a target question");
1300
- var logicJumpRulesSchema = z12.record(
1301
- z12.string(),
1302
- z12.array(logicJumpRuleSchema)
1449
+ var logicJumpRulesSchema = z13.record(
1450
+ z13.string(),
1451
+ z13.array(logicJumpRuleSchema)
1303
1452
  ).describe(
1304
1453
  "Logic jump rules keyed by question ID (or '__workflow_start__'). Each entry is an ordered array of rules evaluated top-down; the first matching rule wins."
1305
1454
  );
1306
- var questionnaireFieldsResponseSchema = z12.object({
1307
- questions: z12.record(z12.string(), combinedQuestionSchema).describe("Collection of questions keyed by their string identifiers"),
1308
- sections: z12.array(sectionSchema).describe(
1455
+ var questionnaireFieldsResponseSchema = z13.object({
1456
+ questions: z13.record(z13.string(), combinedQuestionSchema).describe("Collection of questions keyed by their string identifiers"),
1457
+ sections: z13.array(sectionSchema).describe(
1309
1458
  "Array of sections that organize questions into logical groups"
1310
1459
  ),
1311
- translations: z12.record(z12.string(), z12.any()).describe(
1460
+ translations: z13.record(z13.string(), z13.any()).describe(
1312
1461
  "Translations object (can be empty or contain language-specific translations)"
1313
1462
  ),
1314
1463
  selectedLanguages: LanguagesSchema.describe(
1315
1464
  "Array of languages selected for this questionnaire"
1316
1465
  ),
1317
- isLogicJumpsEnabled: z12.boolean().optional().default(false).describe("When true, form navigation follows logicJumpRules instead of linear section order"),
1466
+ isLogicJumpsEnabled: z13.boolean().optional().default(false).describe("When true, form navigation follows logicJumpRules instead of linear section order"),
1318
1467
  logicJumpRules: logicJumpRulesSchema.optional().describe("Conditional navigation rules evaluated per question to determine the next question to show"),
1319
- contextVariables: z12.array(z12.string()).optional().describe("List of context variable keys expected by the form (informational)")
1468
+ contextVariables: z13.array(z13.string()).optional().describe("List of context variable keys expected by the form (informational)")
1320
1469
  }).describe(
1321
1470
  "Questionnaire fields response including questions, sections, translations, selected languages, and optional logic jump configuration"
1322
1471
  );
1323
- var fetchFeedbackDetailsResponseSchema = z12.object({
1324
- feedbackConfigurationId: z12.string().uuid().describe("Unique identifier for the feedback configuration"),
1325
- feedbackIdentifier: z12.string().uuid().describe("Unique identifier for this specific feedback instance"),
1472
+ var fetchFeedbackDetailsResponseSchema = z13.object({
1473
+ feedbackConfigurationId: z13.string().uuid().describe("Unique identifier for the feedback configuration"),
1474
+ feedbackIdentifier: z13.string().uuid().describe("Unique identifier for this specific feedback instance"),
1326
1475
  formConfiguration: formConfigurationResponseSchema.describe(
1327
1476
  "Form configuration with title and description"
1328
1477
  ),
@@ -1338,30 +1487,30 @@ var fetchFeedbackDetailsResponseSchema = z12.object({
1338
1487
  }).strict().describe(
1339
1488
  "Complete response schema for fetchFeedbackDetails API using existing field schemas"
1340
1489
  );
1341
- var fetchConfigurationListResponseSchema = z12.object({
1490
+ var fetchConfigurationListResponseSchema = z13.object({
1342
1491
  masterProperties: masterPropertiesSchema.describe(
1343
1492
  "Master properties for global survey settings"
1344
1493
  ),
1345
- feedbackConfiguration: z12.array(feedbackConfigurationItemSchema).describe("Array of available feedback configurations")
1494
+ feedbackConfiguration: z13.array(feedbackConfigurationItemSchema).describe("Array of available feedback configurations")
1346
1495
  }).strict().describe("Response schema for fetchConfigurationList API");
1347
1496
 
1348
1497
  // src/schemas/api/refine-text-schema.ts
1349
- import { z as z13 } from "zod";
1350
- var refineTextParamsSchema = z13.object({
1351
- questionId: z13.string().describe("Unique identifier for the question"),
1352
- feedbackConfigurationId: z13.string().uuid().describe("Unique identifier for the feedback configuration"),
1353
- userText: z13.string().describe("Original text input from the user")
1498
+ import { z as z14 } from "zod";
1499
+ var refineTextParamsSchema = z14.object({
1500
+ questionId: z14.string().describe("Unique identifier for the question"),
1501
+ feedbackConfigurationId: z14.string().uuid().describe("Unique identifier for the feedback configuration"),
1502
+ userText: z14.string().describe("Original text input from the user")
1354
1503
  }).strict().describe("Request schema for refining user text input");
1355
- var refineTextResponseSchema = z13.object({
1356
- message: z13.string().optional().describe("Human-readable message"),
1357
- refinedText: z13.string().optional().describe("Refined/improved version of the user text (success only)"),
1358
- status: z13.number().optional().describe("HTTP status code (error responses)"),
1359
- error: z13.string().optional().describe("Error type (error responses)"),
1360
- code: z13.string().optional().describe("Error code for display mapping")
1504
+ var refineTextResponseSchema = z14.object({
1505
+ message: z14.string().optional().describe("Human-readable message"),
1506
+ refinedText: z14.string().optional().describe("Refined/improved version of the user text (success only)"),
1507
+ status: z14.number().optional().describe("HTTP status code (error responses)"),
1508
+ error: z14.string().optional().describe("Error type (error responses)"),
1509
+ code: z14.string().optional().describe("Error code for display mapping")
1361
1510
  }).describe("Response schema for refine text API operation");
1362
- var refineTextDataSchema = z13.object({
1363
- userText: z13.string().describe("Original text input from the user"),
1364
- refinedText: z13.string().describe("Refined/improved version of the user text")
1511
+ var refineTextDataSchema = z14.object({
1512
+ userText: z14.string().describe("Original text input from the user"),
1513
+ refinedText: z14.string().describe("Refined/improved version of the user text")
1365
1514
  }).describe("Data containing original and refined text (legacy nested format)");
1366
1515
 
1367
1516
  // src/helpers/case-convert-helper.ts
@@ -1427,13 +1576,13 @@ function objectToPascal(obj) {
1427
1576
  __name(objectToPascal, "objectToPascal");
1428
1577
 
1429
1578
  // src/schemas/fields/app-props-schema.ts
1430
- import { z as z14 } from "zod";
1431
- var currentModeSchema = z14.enum(["light", "dark"]).describe("Current theme mode of the application");
1579
+ import { z as z15 } from "zod";
1580
+ var currentModeSchema = z15.enum(["light", "dark"]).describe("Current theme mode of the application");
1432
1581
  var CurrentModes = {
1433
1582
  LIGHT: "light",
1434
1583
  DARK: "dark"
1435
1584
  };
1436
- var appPropsSchema = z14.object({
1585
+ var appPropsSchema = z15.object({
1437
1586
  theme: themesSchema.describe(
1438
1587
  "Theme configuration including light and dark theme colors"
1439
1588
  ),
@@ -1443,7 +1592,7 @@ var appPropsSchema = z14.object({
1443
1592
  currentLanguage: LanguageFieldSchema.describe(
1444
1593
  "Currently selected language configuration"
1445
1594
  ),
1446
- questions: z14.record(z14.string(), combinedQuestionSchema).describe("Collection of questions keyed by their string identifiers"),
1595
+ questions: z15.record(z15.string(), combinedQuestionSchema).describe("Collection of questions keyed by their string identifiers"),
1447
1596
  questionLanguages: LanguagesSchema.describe(
1448
1597
  "Available languages for questions"
1449
1598
  ),
@@ -1453,15 +1602,15 @@ var appPropsSchema = z14.object({
1453
1602
  translations: translationsSchema.optional().describe(
1454
1603
  "Multi-language translations for questions and form content (optional)"
1455
1604
  ),
1456
- onSectionChange: z14.function({
1457
- input: [z14.number()],
1458
- output: z14.void()
1605
+ onSectionChange: z15.function({
1606
+ input: [z15.number()],
1607
+ output: z15.void()
1459
1608
  }).optional().describe("Optional callback function triggered when section changes"),
1460
- onClose: z14.function({
1609
+ onClose: z15.function({
1461
1610
  input: [],
1462
- output: z14.void()
1611
+ output: z15.void()
1463
1612
  }).optional().describe("Optional callback function triggered when the form is closed"),
1464
- sections: z14.array(sectionSchema).describe(
1613
+ sections: z15.array(sectionSchema).describe(
1465
1614
  "Array of sections that organize questions into logical groups"
1466
1615
  ),
1467
1616
  themeSettings: themeConfigurationSchema.describe(
@@ -1472,7 +1621,7 @@ var appPropsSchema = z14.object({
1472
1621
  );
1473
1622
 
1474
1623
  // src/index.ts
1475
- import { z as z15 } from "zod";
1624
+ import { z as z16 } from "zod";
1476
1625
  export {
1477
1626
  AnnotationMarkerSchema,
1478
1627
  AnnotationSchema,
@@ -1483,6 +1632,8 @@ export {
1483
1632
  DeviceThemes,
1484
1633
  LanguageFieldSchema,
1485
1634
  LanguagesSchema,
1635
+ LayoutAttachmentTypes,
1636
+ LayoutTypes,
1486
1637
  MultipleChoiceDisplayStyles,
1487
1638
  MultipleChoiceMultipleDisplayStyles,
1488
1639
  OtherFieldsSchema,
@@ -1510,11 +1661,13 @@ export {
1510
1661
  baseSubmitFeedbackSchema,
1511
1662
  categorySpecificFiltersSchema,
1512
1663
  choiceOrderOptionSchema,
1664
+ colorAttachmentSchema,
1513
1665
  combinedQuestionSchema,
1514
1666
  conditionalIfMetadataSchema,
1515
1667
  conditionalIfSchema,
1516
1668
  conditionalWhenSchema,
1517
1669
  consentQuestionSchema,
1670
+ consentQuestionTranslationSchema,
1518
1671
  createTranslationProvider,
1519
1672
  currentModeSchema,
1520
1673
  customEventFieldOperatorSchema,
@@ -1534,9 +1687,15 @@ export {
1534
1687
  fetchFeedbackDetailsSchema,
1535
1688
  fetchFormConfigSchema,
1536
1689
  filterConditionSchema,
1690
+ floatLayoutSchema,
1691
+ focalPointSchema,
1537
1692
  formConfigSchema,
1538
1693
  formConfigurationResponseSchema,
1539
1694
  formPropertiesSchema,
1695
+ gradientAttachmentSchema,
1696
+ imageAttachmentSchema,
1697
+ layoutAttachmentSchema,
1698
+ layoutSurfaceSchema,
1540
1699
  logicJumpRuleSchema,
1541
1700
  logicJumpRulesSchema,
1542
1701
  longAnswerQuestionSchema,
@@ -1592,6 +1751,8 @@ export {
1592
1751
  refineTextParamsSchema,
1593
1752
  refineTextResponseSchema,
1594
1753
  responseSchema,
1754
+ sectionLayoutSchema,
1755
+ sectionLayoutVariantSchema,
1595
1756
  sectionSchema,
1596
1757
  sectionTranslationSchema,
1597
1758
  sectionTranslationsByLanguageSchema,
@@ -1600,6 +1761,8 @@ export {
1600
1761
  shortAnswerQuestionSchema,
1601
1762
  shortAnswerQuestionTranslationSchema,
1602
1763
  singleChoiceQuestionTranslationSchema,
1764
+ splitLayoutSchema,
1765
+ stackLayoutSchema,
1603
1766
  submitFeedbackSchema,
1604
1767
  thankYouQuestionSchema,
1605
1768
  thankYouQuestionTranslationSchema,
@@ -1617,13 +1780,15 @@ export {
1617
1780
  userPropertiesSchema,
1618
1781
  validationRuleSchema,
1619
1782
  validationRuleTypeSchema,
1783
+ videoAttachmentSchema,
1620
1784
  visibilityConditionSchema,
1785
+ wallpaperLayoutSchema,
1621
1786
  welcomeQuestionSchema,
1622
1787
  welcomeQuestionTranslationSchema,
1623
1788
  whoSchema,
1624
1789
  yesNoDisplayStyleSchema,
1625
1790
  yesNoQuestionSchema,
1626
1791
  yesNoQuestionTranslationSchema,
1627
- z15 as z
1792
+ z16 as z
1628
1793
  };
1629
1794
  //# sourceMappingURL=index.js.map