@encatch/schema 0.1.24 → 0.1.25
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 +45 -21
- package/dist/esm/index.js.map +4 -4
- package/dist/types/index.d.ts +2 -1
- package/dist/types/schemas/api/fetch-feedback-schema.d.ts +20 -18
- package/dist/types/schemas/api/other-schema.d.ts +20 -18
- package/dist/types/schemas/api/refine-text-schema.d.ts +25 -0
- package/dist/types/schemas/api/submit-feedback-schema.d.ts +50 -45
- package/dist/types/schemas/fields/answer-schema.d.ts +0 -25
- package/package.json +40 -5
- package/dist/types/schemas/api/feedback-actions-schema.d.ts +0 -0
- package/dist/types/schemas/api/feedback-fetch-schema.d.ts +0 -0
package/dist/esm/index.js
CHANGED
|
@@ -422,12 +422,6 @@ var AnswerItemSchema = z2.object({
|
|
|
422
422
|
}).describe(
|
|
423
423
|
"Flexible answer item supporting various question types and custom fields"
|
|
424
424
|
);
|
|
425
|
-
var QuestionsResponseSchema = z2.object({
|
|
426
|
-
question_id: z2.string(),
|
|
427
|
-
error: z2.string().optional(),
|
|
428
|
-
answer: AnswerItemSchema,
|
|
429
|
-
type: z2.string()
|
|
430
|
-
});
|
|
431
425
|
var AnswerSchema = AnswerItemSchema;
|
|
432
426
|
|
|
433
427
|
// src/schemas/fields/form-schema.ts
|
|
@@ -1004,28 +998,35 @@ var DeviceThemes = {
|
|
|
1004
998
|
SYSTEM: "system"
|
|
1005
999
|
};
|
|
1006
1000
|
var deviceInfoSchema = z10.object({
|
|
1007
|
-
deviceType: z10.string().describe("Type of device being used"),
|
|
1008
|
-
timezone: z10.string().describe("Device timezone (e.g., 'Asia/Calcutta')"),
|
|
1009
|
-
theme: deviceThemeSchema.describe("Current theme mode preference"),
|
|
1010
|
-
os: z10.string().describe("Operating system running on the device"),
|
|
1011
|
-
osVersion: z10.string().describe("Version of the operating system"),
|
|
1012
|
-
appVersion: z10.string().describe("Version of the application"),
|
|
1013
|
-
app: z10.string().describe("Browser or application being used"),
|
|
1014
|
-
language: z10.string().describe("Language preference (e.g., 'en-GB')")
|
|
1001
|
+
$deviceType: z10.string().describe("Type of device being used"),
|
|
1002
|
+
$timezone: z10.string().describe("Device timezone (e.g., 'Asia/Calcutta')"),
|
|
1003
|
+
$theme: deviceThemeSchema.describe("Current theme mode preference"),
|
|
1004
|
+
$os: z10.string().describe("Operating system running on the device"),
|
|
1005
|
+
$osVersion: z10.string().describe("Version of the operating system"),
|
|
1006
|
+
$appVersion: z10.string().describe("Version of the application"),
|
|
1007
|
+
$app: z10.string().describe("Browser or application being used"),
|
|
1008
|
+
$language: z10.string().describe("Language preference (e.g., 'en-GB')")
|
|
1015
1009
|
}).describe("Device information collected from the client");
|
|
1016
1010
|
var sessionInfoSchema = z10.object({
|
|
1017
|
-
sessionId: z10.string().uuid().describe("Unique session identifier")
|
|
1011
|
+
$sessionId: z10.string().uuid().describe("Unique session identifier"),
|
|
1012
|
+
$timestamp: z10.string().optional().describe("ISO timestamp of the session")
|
|
1018
1013
|
}).describe("Session information for tracking user sessions");
|
|
1019
1014
|
var deviceSessionInfoSchema = z10.object({
|
|
1020
1015
|
deviceInfo: deviceInfoSchema.describe("Device information"),
|
|
1021
1016
|
sessionInfo: sessionInfoSchema.describe("Session information")
|
|
1022
1017
|
}).describe("Combined device and session information");
|
|
1023
1018
|
var userPropertiesSchema = z10.object({
|
|
1024
|
-
$counter: z10.record(z10.string(), z10.number().int()).describe(
|
|
1019
|
+
$counter: z10.record(z10.string(), z10.number().int()).describe(
|
|
1020
|
+
"Counter properties for user tracking (can be positive or negative)"
|
|
1021
|
+
).optional(),
|
|
1025
1022
|
$set: z10.record(z10.string(), z10.any()).describe("Properties to set for the user").optional(),
|
|
1026
|
-
$setOnce: z10.record(z10.string(), z10.any()).describe(
|
|
1023
|
+
$setOnce: z10.record(z10.string(), z10.any()).describe(
|
|
1024
|
+
"Properties to set once for the user (won't overwrite existing values)"
|
|
1025
|
+
).optional(),
|
|
1027
1026
|
$unset: z10.array(z10.string()).describe("Array of property names to unset/remove from the user").optional()
|
|
1028
|
-
}).
|
|
1027
|
+
}).loose().describe(
|
|
1028
|
+
"User properties including counters, set operations, and other dynamic data"
|
|
1029
|
+
);
|
|
1029
1030
|
var userInfoSchema = z10.object({
|
|
1030
1031
|
userName: z10.string().email().describe("User's email address as username"),
|
|
1031
1032
|
properties: userPropertiesSchema.describe("User properties and counters")
|
|
@@ -1158,8 +1159,29 @@ var fetchConfigurationListResponseSchema = z12.object({
|
|
|
1158
1159
|
feedbackConfiguration: z12.array(feedbackConfigurationItemSchema).describe("Array of available feedback configurations")
|
|
1159
1160
|
}).strict().describe("Response schema for fetchConfigurationList API");
|
|
1160
1161
|
|
|
1161
|
-
// src/
|
|
1162
|
+
// src/schemas/api/refine-text-schema.ts
|
|
1162
1163
|
import { z as z13 } from "zod";
|
|
1164
|
+
var refineTextParamsSchema = z13.object({
|
|
1165
|
+
question_id: z13.string().describe("Unique identifier for the question"),
|
|
1166
|
+
identifier: z13.string().uuid().describe("Unique identifier for the feedback instance"),
|
|
1167
|
+
feedback_configuration_id: z13.string().uuid().describe("Unique identifier for the feedback configuration"),
|
|
1168
|
+
user_text: z13.string().describe("Original text input from the user")
|
|
1169
|
+
}).strict().describe("Request schema for refining user text input");
|
|
1170
|
+
var refineTextDataSchema = z13.object({
|
|
1171
|
+
user_text: z13.string().describe("Original text input from the user"),
|
|
1172
|
+
refined_text: z13.string().describe("Refined/improved version of the user text")
|
|
1173
|
+
}).describe("Data containing original and refined text");
|
|
1174
|
+
var refineTextResponseSchema = z13.object({
|
|
1175
|
+
success: z13.boolean().describe("Indicates whether the operation was successful"),
|
|
1176
|
+
code: z13.string().describe("Response code indicating the status"),
|
|
1177
|
+
message: z13.string().describe("Human-readable message describing the result"),
|
|
1178
|
+
messageId: z13.string().describe("Unique identifier for the response message"),
|
|
1179
|
+
data: refineTextDataSchema.describe("Response data containing original and refined text"),
|
|
1180
|
+
error: z13.string().optional().describe("Error message if the operation failed (optional)")
|
|
1181
|
+
}).strict().describe("Response schema for refine text API operation");
|
|
1182
|
+
|
|
1183
|
+
// src/index.ts
|
|
1184
|
+
import { z as z14 } from "zod";
|
|
1163
1185
|
export {
|
|
1164
1186
|
AnnotationMarkerSchema,
|
|
1165
1187
|
AnnotationSchema,
|
|
@@ -1180,7 +1202,6 @@ export {
|
|
|
1180
1202
|
PublicationStatuses,
|
|
1181
1203
|
QuestionStatuses,
|
|
1182
1204
|
QuestionTypes,
|
|
1183
|
-
QuestionsResponseSchema,
|
|
1184
1205
|
RatingDisplayStyles,
|
|
1185
1206
|
RatingRepresentationSizes,
|
|
1186
1207
|
RecurringUnits,
|
|
@@ -1259,6 +1280,9 @@ export {
|
|
|
1259
1280
|
ratingQuestionTranslationSchema,
|
|
1260
1281
|
ratingRepresentationSizeSchema,
|
|
1261
1282
|
recurringUnitSchema,
|
|
1283
|
+
refineTextDataSchema,
|
|
1284
|
+
refineTextParamsSchema,
|
|
1285
|
+
refineTextResponseSchema,
|
|
1262
1286
|
responseSchema,
|
|
1263
1287
|
sectionSchema,
|
|
1264
1288
|
sessionInfoSchema,
|
|
@@ -1284,6 +1308,6 @@ export {
|
|
|
1284
1308
|
welcomeScreenPropertiesSchema,
|
|
1285
1309
|
whoSchema,
|
|
1286
1310
|
yesNoSchema,
|
|
1287
|
-
|
|
1311
|
+
z14 as z
|
|
1288
1312
|
};
|
|
1289
1313
|
//# sourceMappingURL=index.js.map
|