@encatch/schema 1.2.0-beta.11 → 1.2.0-beta.12
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 +16 -10
- package/dist/esm/index.js.map +2 -2
- package/dist/types/schemas/api/fetch-feedback-schema.d.ts +16 -12
- package/dist/types/schemas/fields/app-props-schema.d.ts +8 -6
- package/dist/types/schemas/fields/field-schema.d.ts +24 -18
- package/dist/types/schemas/fields/form-properties-schema.d.ts +8 -6
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -1487,18 +1487,24 @@ var paymentsUpiAmountConfigSchema = z2.discriminatedUnion("mode", [
|
|
|
1487
1487
|
defaultAmount: z2.number().positive().optional().describe("Optional initial amount shown to the respondent")
|
|
1488
1488
|
}),
|
|
1489
1489
|
z2.object({
|
|
1490
|
-
mode: z2.literal("
|
|
1491
|
-
|
|
1492
|
-
"ID of the prior question whose answer determines the amount"
|
|
1493
|
-
),
|
|
1494
|
-
mappings: z2.array(
|
|
1490
|
+
mode: z2.literal("question_mappings").describe("Amount is summed from one or more previous question answers"),
|
|
1491
|
+
sources: z2.array(
|
|
1495
1492
|
z2.object({
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1493
|
+
sourceQuestionId: z2.string().describe(
|
|
1494
|
+
"ID of the prior question whose answer contributes to the amount"
|
|
1495
|
+
),
|
|
1496
|
+
mappings: z2.array(
|
|
1497
|
+
z2.object({
|
|
1498
|
+
answerValue: z2.string().describe("Previous question answer value to match"),
|
|
1499
|
+
amount: z2.number().nonnegative().describe(
|
|
1500
|
+
"Amount to add in INR when this answer is selected"
|
|
1501
|
+
),
|
|
1502
|
+
label: z2.string().max(120).optional().describe("Optional display label for this mapped amount")
|
|
1503
|
+
})
|
|
1504
|
+
).min(1).describe("Answer-to-amount mappings for this source question")
|
|
1499
1505
|
})
|
|
1500
|
-
).min(1).describe("
|
|
1501
|
-
fallbackAmount: z2.number().
|
|
1506
|
+
).min(1).describe("Previous question sources that contribute to the amount"),
|
|
1507
|
+
fallbackAmount: z2.number().nonnegative().optional().describe("Optional amount to use when no source mapping matches")
|
|
1502
1508
|
})
|
|
1503
1509
|
]).superRefine((data, ctx) => {
|
|
1504
1510
|
if (data.mode !== "range") return;
|