@opencrvs/toolkit 2.0.0-rc.e77f419 → 2.0.0-rc.e9457a7
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/create-countryconfig/package.json +12 -2
- package/dist/application-config/index.js +205 -60
- package/dist/cli.js +3 -1
- package/dist/commons/api/router.d.ts +354 -4
- package/dist/commons/events/ActionInput.d.ts +36 -36
- package/dist/commons/events/Draft.d.ts +2 -3
- package/dist/commons/events/WorkqueueConfig.d.ts +150 -150
- package/dist/conditionals/index.js +3 -1
- package/dist/events/index.js +274 -93
- package/dist/migrations/v2.0/index.js +3 -1
- package/dist/notification/index.js +274 -93
- package/dist/scopes/index.js +3 -1
- package/opencrvs-toolkit-2.0.0-rc.e9457a7.tgz +0 -0
- package/package.json +5 -1
- package/opencrvs-toolkit-2.0.0-rc.e77f419.tgz +0 -0
package/dist/events/index.js
CHANGED
|
@@ -704,7 +704,9 @@ var decodeScope = (query) => {
|
|
|
704
704
|
};
|
|
705
705
|
var DEFAULT_SCOPE_OPTIONS = {
|
|
706
706
|
placeOfEvent: JurisdictionFilter.enum.all,
|
|
707
|
-
accessLevel: JurisdictionFilter.enum.all
|
|
707
|
+
accessLevel: JurisdictionFilter.enum.all,
|
|
708
|
+
registeredIn: JurisdictionFilter.enum.all,
|
|
709
|
+
declaredIn: JurisdictionFilter.enum.all
|
|
708
710
|
};
|
|
709
711
|
function getAcceptedScopesByType({
|
|
710
712
|
acceptedScopes,
|
|
@@ -1077,7 +1079,10 @@ var ActionConditional = z7.discriminatedUnion("type", [
|
|
|
1077
1079
|
ShowConditional,
|
|
1078
1080
|
// Action can be shown to the user in the list but as disabled
|
|
1079
1081
|
EnableConditional
|
|
1080
|
-
])
|
|
1082
|
+
]).meta({
|
|
1083
|
+
id: "ActionConditional",
|
|
1084
|
+
description: "Conditional gating whether an action is shown (SHOW) or enabled (ENABLE). When omitted from an action, the action is shown and enabled for everyone."
|
|
1085
|
+
});
|
|
1081
1086
|
var DisplayOnReviewConditional = z7.object({
|
|
1082
1087
|
type: z7.literal(ConditionalType.DISPLAY_ON_REVIEW),
|
|
1083
1088
|
conditional: Conditional
|
|
@@ -1092,8 +1097,8 @@ var FieldConditional = z7.discriminatedUnion("type", [
|
|
|
1092
1097
|
// Field output can be shown / hidden on the review page
|
|
1093
1098
|
DisplayOnReviewConditional
|
|
1094
1099
|
]).meta({
|
|
1095
|
-
|
|
1096
|
-
|
|
1100
|
+
id: "FieldConditional",
|
|
1101
|
+
description: "Conditional gating whether a form field is shown (SHOW), enabled (ENABLE), or displayed on the review page (DISPLAY_ON_REVIEW). When omitted, the field is shown and enabled for everyone, and is displayed on review whenever it has a value."
|
|
1097
1102
|
});
|
|
1098
1103
|
|
|
1099
1104
|
// ../commons/src/events/FieldType.ts
|
|
@@ -1736,6 +1741,9 @@ var FlagConfig = z15.object({
|
|
|
1736
1741
|
"Indicates if this flag expects an action to be performed to be cleared."
|
|
1737
1742
|
),
|
|
1738
1743
|
label: TranslationConfig.describe("Human readable label of the flag.")
|
|
1744
|
+
}).meta({
|
|
1745
|
+
id: "FlagConfig",
|
|
1746
|
+
description: "Configuration for a custom flag that can be added to or removed from records by event actions."
|
|
1739
1747
|
});
|
|
1740
1748
|
var ActionFlagConfig = z15.object({
|
|
1741
1749
|
id: Flag,
|
|
@@ -1743,6 +1751,9 @@ var ActionFlagConfig = z15.object({
|
|
|
1743
1751
|
conditional: Conditional.optional().describe(
|
|
1744
1752
|
"When conditional is met, the operation is performed on the flag. If not provided, the operation is performed unconditionally."
|
|
1745
1753
|
)
|
|
1754
|
+
}).meta({
|
|
1755
|
+
id: "ActionFlagConfig",
|
|
1756
|
+
description: "Add or remove operation applied to a flag when the parent action is accepted. Optionally gated by a conditional."
|
|
1746
1757
|
});
|
|
1747
1758
|
|
|
1748
1759
|
// ../commons/src/events/EventMetadata.ts
|
|
@@ -2166,14 +2177,21 @@ var FieldId = import_v43.default.string().superRefine((val, ctx) => {
|
|
|
2166
2177
|
}
|
|
2167
2178
|
}).describe("Unique identifier for the field");
|
|
2168
2179
|
var FieldReference = import_v43.default.object({
|
|
2169
|
-
$$field: FieldId,
|
|
2180
|
+
$$field: FieldId.describe("Id of the field to reference"),
|
|
2170
2181
|
$$subfield: import_v43.default.array(import_v43.default.string()).optional().default([]).describe(
|
|
2171
2182
|
'If the FieldValue is an object, subfield can be used to refer to e.g. `["foo", "bar"]` in `{ foo: { bar: 3 } }`'
|
|
2172
2183
|
)
|
|
2173
2184
|
}).describe("Reference to a field by its ID");
|
|
2174
2185
|
var ValidationConfig = import_v43.default.object({
|
|
2175
|
-
validator: Conditional
|
|
2176
|
-
|
|
2186
|
+
validator: Conditional.describe(
|
|
2187
|
+
"Conditional expression that must hold for the field value to be considered valid."
|
|
2188
|
+
),
|
|
2189
|
+
message: TranslationConfig.describe(
|
|
2190
|
+
"Error message displayed when the validator does not hold."
|
|
2191
|
+
)
|
|
2192
|
+
}).meta({
|
|
2193
|
+
id: "ValidationConfig",
|
|
2194
|
+
description: "Validation rule applied to a form field. The validator is a conditional expression that must hold for the field value to be considered valid."
|
|
2177
2195
|
});
|
|
2178
2196
|
var requiredSchema = import_v43.default.union([
|
|
2179
2197
|
import_v43.default.boolean(),
|
|
@@ -2212,6 +2230,9 @@ var BaseField = import_v43.default.object({
|
|
|
2212
2230
|
}).describe("Common properties shared across all field types.");
|
|
2213
2231
|
var Divider = BaseField.extend({
|
|
2214
2232
|
type: import_v43.default.literal(FieldType.DIVIDER)
|
|
2233
|
+
}).meta({
|
|
2234
|
+
description: "A horizontal line divider",
|
|
2235
|
+
id: "Divider"
|
|
2215
2236
|
});
|
|
2216
2237
|
var TextField = BaseField.extend({
|
|
2217
2238
|
type: import_v43.default.literal(FieldType.TEXT),
|
|
@@ -2222,7 +2243,10 @@ var TextField = BaseField.extend({
|
|
|
2222
2243
|
prefix: TranslationConfig.optional(),
|
|
2223
2244
|
postfix: TranslationConfig.optional()
|
|
2224
2245
|
}).default({ type: "text" }).optional()
|
|
2225
|
-
}).
|
|
2246
|
+
}).meta({
|
|
2247
|
+
description: "A text input field",
|
|
2248
|
+
id: "TextField"
|
|
2249
|
+
});
|
|
2226
2250
|
var NumberField = BaseField.extend({
|
|
2227
2251
|
type: import_v43.default.literal(FieldType.NUMBER),
|
|
2228
2252
|
defaultValue: NumberFieldValue.optional(),
|
|
@@ -2232,7 +2256,10 @@ var NumberField = BaseField.extend({
|
|
|
2232
2256
|
prefix: TranslationConfig.optional(),
|
|
2233
2257
|
postfix: TranslationConfig.optional()
|
|
2234
2258
|
}).optional()
|
|
2235
|
-
}).
|
|
2259
|
+
}).meta({
|
|
2260
|
+
description: "A number input field",
|
|
2261
|
+
id: "NumberField"
|
|
2262
|
+
});
|
|
2236
2263
|
var TextAreaField = BaseField.extend({
|
|
2237
2264
|
type: import_v43.default.literal(FieldType.TEXTAREA),
|
|
2238
2265
|
defaultValue: NonEmptyTextValue.optional(),
|
|
@@ -2243,7 +2270,10 @@ var TextAreaField = BaseField.extend({
|
|
|
2243
2270
|
prefix: TranslationConfig.optional(),
|
|
2244
2271
|
postfix: TranslationConfig.optional()
|
|
2245
2272
|
}).default({ rows: 4 }).optional()
|
|
2246
|
-
}).
|
|
2273
|
+
}).meta({
|
|
2274
|
+
description: "A multiline text input",
|
|
2275
|
+
id: "TextAreaField"
|
|
2276
|
+
});
|
|
2247
2277
|
var ImageMimeType = import_v43.default.enum([
|
|
2248
2278
|
"image/png",
|
|
2249
2279
|
"image/jpg",
|
|
@@ -2273,13 +2303,19 @@ var SignatureField = BaseField.extend({
|
|
|
2273
2303
|
}).default({
|
|
2274
2304
|
maxFileSize: DEFAULT_MAX_FILE_SIZE_BYTES
|
|
2275
2305
|
})
|
|
2276
|
-
}).
|
|
2306
|
+
}).meta({
|
|
2307
|
+
description: "A signature input field",
|
|
2308
|
+
id: "SignatureField"
|
|
2309
|
+
});
|
|
2277
2310
|
var EmailField = BaseField.extend({
|
|
2278
2311
|
type: import_v43.default.literal(FieldType.EMAIL),
|
|
2279
2312
|
configuration: import_v43.default.object({
|
|
2280
2313
|
maxLength: import_v43.default.number().optional().describe("Maximum length of the text")
|
|
2281
2314
|
}).default({ maxLength: 255 }).optional(),
|
|
2282
2315
|
defaultValue: NonEmptyTextValue.optional()
|
|
2316
|
+
}).meta({
|
|
2317
|
+
description: "An email input field",
|
|
2318
|
+
id: "EmailField"
|
|
2283
2319
|
});
|
|
2284
2320
|
var DateField = BaseField.extend({
|
|
2285
2321
|
type: import_v43.default.literal(FieldType.DATE),
|
|
@@ -2289,7 +2325,10 @@ var DateField = BaseField.extend({
|
|
|
2289
2325
|
"Text to display above the date input"
|
|
2290
2326
|
).optional()
|
|
2291
2327
|
}).optional()
|
|
2292
|
-
}).
|
|
2328
|
+
}).meta({
|
|
2329
|
+
description: "A date input (yyyy-MM-dd)",
|
|
2330
|
+
id: "DateField"
|
|
2331
|
+
});
|
|
2293
2332
|
var AgeField = BaseField.extend({
|
|
2294
2333
|
type: import_v43.default.literal(FieldType.AGE),
|
|
2295
2334
|
defaultValue: NumberFieldValue.optional(),
|
|
@@ -2298,7 +2337,10 @@ var AgeField = BaseField.extend({
|
|
|
2298
2337
|
prefix: TranslationConfig.optional(),
|
|
2299
2338
|
postfix: TranslationConfig.optional()
|
|
2300
2339
|
})
|
|
2301
|
-
}).
|
|
2340
|
+
}).meta({
|
|
2341
|
+
description: "An age input field which uses the current date as the asOfDate",
|
|
2342
|
+
id: "AgeField"
|
|
2343
|
+
});
|
|
2302
2344
|
var TimeField = BaseField.extend({
|
|
2303
2345
|
type: import_v43.default.literal(FieldType.TIME),
|
|
2304
2346
|
defaultValue: SerializedNowDateTime.or(TimeValue).optional().describe("Default time value (HH-mm)"),
|
|
@@ -2308,7 +2350,10 @@ var TimeField = BaseField.extend({
|
|
|
2308
2350
|
"Text to display above the time input"
|
|
2309
2351
|
).optional()
|
|
2310
2352
|
}).optional()
|
|
2311
|
-
}).
|
|
2353
|
+
}).meta({
|
|
2354
|
+
description: "A single time input (HH-mm)",
|
|
2355
|
+
id: "TimeField"
|
|
2356
|
+
});
|
|
2312
2357
|
var DateRangeField = BaseField.extend({
|
|
2313
2358
|
type: import_v43.default.literal(FieldType.DATE_RANGE),
|
|
2314
2359
|
defaultValue: DateRangeFieldValue.optional(),
|
|
@@ -2317,7 +2362,10 @@ var DateRangeField = BaseField.extend({
|
|
|
2317
2362
|
"Text to display above the date input"
|
|
2318
2363
|
).optional()
|
|
2319
2364
|
}).optional()
|
|
2320
|
-
}).
|
|
2365
|
+
}).meta({
|
|
2366
|
+
description: "A date range input ({ start: yyyy-MM-dd, end: yyyy-MM-dd })",
|
|
2367
|
+
id: "DateRangeField"
|
|
2368
|
+
});
|
|
2321
2369
|
var HtmlFontVariant = import_v43.default.enum([
|
|
2322
2370
|
"reg12",
|
|
2323
2371
|
"reg14",
|
|
@@ -2361,18 +2409,30 @@ var ImageViewField = BaseField.extend({
|
|
|
2361
2409
|
type: import_v43.default.literal(FieldType.IMAGE_VIEW),
|
|
2362
2410
|
defaultValue: NonEmptyTextValue.optional(),
|
|
2363
2411
|
configuration: ImageConfiguration
|
|
2364
|
-
}).
|
|
2412
|
+
}).meta({
|
|
2413
|
+
description: "A read-only image component for form pages",
|
|
2414
|
+
id: "ImageViewField"
|
|
2415
|
+
});
|
|
2365
2416
|
var Paragraph = BaseField.extend({
|
|
2366
2417
|
type: import_v43.default.literal(FieldType.PARAGRAPH),
|
|
2367
2418
|
configuration: ParagraphConfiguration
|
|
2368
|
-
}).
|
|
2419
|
+
}).meta({
|
|
2420
|
+
description: "A read-only HTML <p> paragraph",
|
|
2421
|
+
id: "Paragraph"
|
|
2422
|
+
});
|
|
2369
2423
|
var Heading = BaseField.extend({
|
|
2370
2424
|
type: import_v43.default.literal(FieldType.HEADING),
|
|
2371
2425
|
configuration: HeadingConfiguration
|
|
2372
|
-
}).
|
|
2426
|
+
}).meta({
|
|
2427
|
+
description: "A read-only heading component for form pages",
|
|
2428
|
+
id: "Heading"
|
|
2429
|
+
});
|
|
2373
2430
|
var PageHeader = BaseField.extend({
|
|
2374
2431
|
type: import_v43.default.literal(FieldType.PAGE_HEADER)
|
|
2375
|
-
}).
|
|
2432
|
+
}).meta({
|
|
2433
|
+
description: "A read-only header component for form pages",
|
|
2434
|
+
id: "PageHeader"
|
|
2435
|
+
});
|
|
2376
2436
|
var File = BaseField.extend({
|
|
2377
2437
|
type: import_v43.default.literal(FieldType.FILE),
|
|
2378
2438
|
defaultValue: FileFieldValue.optional(),
|
|
@@ -2391,7 +2451,10 @@ var File = BaseField.extend({
|
|
|
2391
2451
|
}).default({
|
|
2392
2452
|
maxFileSize: DEFAULT_MAX_FILE_SIZE_BYTES
|
|
2393
2453
|
})
|
|
2394
|
-
}).
|
|
2454
|
+
}).meta({
|
|
2455
|
+
description: "A file upload field",
|
|
2456
|
+
id: "File"
|
|
2457
|
+
});
|
|
2395
2458
|
var SelectOption = import_v43.default.object({
|
|
2396
2459
|
value: import_v43.default.string().describe("The value of the option"),
|
|
2397
2460
|
label: import_v43.default.union([import_v43.default.string(), TranslationConfig]).describe("The label of the option"),
|
|
@@ -2408,7 +2471,10 @@ var NumberWithUnitField = BaseField.extend({
|
|
|
2408
2471
|
"Placeholder for the number field"
|
|
2409
2472
|
)
|
|
2410
2473
|
}).optional()
|
|
2411
|
-
}).
|
|
2474
|
+
}).meta({
|
|
2475
|
+
description: "A number with unit input field",
|
|
2476
|
+
id: "NumberWithUnitField"
|
|
2477
|
+
});
|
|
2412
2478
|
var RadioGroup = BaseField.extend({
|
|
2413
2479
|
type: import_v43.default.literal(FieldType.RADIO_GROUP),
|
|
2414
2480
|
defaultValue: TextValue.optional(),
|
|
@@ -2418,7 +2484,10 @@ var RadioGroup = BaseField.extend({
|
|
|
2418
2484
|
size: import_v43.default.enum(["NORMAL", "LARGE"]).optional()
|
|
2419
2485
|
}).optional()
|
|
2420
2486
|
}).optional()
|
|
2421
|
-
}).
|
|
2487
|
+
}).meta({
|
|
2488
|
+
description: "A grouped radio button field",
|
|
2489
|
+
id: "RadioGroup"
|
|
2490
|
+
});
|
|
2422
2491
|
var BulletList = BaseField.extend({
|
|
2423
2492
|
type: import_v43.default.literal(FieldType.BULLET_LIST),
|
|
2424
2493
|
items: import_v43.default.array(TranslationConfig).describe("A list of items"),
|
|
@@ -2427,7 +2496,10 @@ var BulletList = BaseField.extend({
|
|
|
2427
2496
|
fontVariant: HtmlFontVariant.optional()
|
|
2428
2497
|
}).optional()
|
|
2429
2498
|
}).default({})
|
|
2430
|
-
}).
|
|
2499
|
+
}).meta({
|
|
2500
|
+
description: "A list of bullet points",
|
|
2501
|
+
id: "BulletList"
|
|
2502
|
+
});
|
|
2431
2503
|
var Select = BaseField.extend({
|
|
2432
2504
|
type: import_v43.default.literal(FieldType.SELECT),
|
|
2433
2505
|
defaultValue: TextValue.optional(),
|
|
@@ -2442,7 +2514,10 @@ var Select = BaseField.extend({
|
|
|
2442
2514
|
{ ..., defaultMessage: "'{input}' is not listed among the health facilities." }
|
|
2443
2515
|
`
|
|
2444
2516
|
)
|
|
2445
|
-
}).
|
|
2517
|
+
}).meta({
|
|
2518
|
+
description: "A select input field",
|
|
2519
|
+
id: "Select"
|
|
2520
|
+
});
|
|
2446
2521
|
var SelectDateRangeOption = import_v43.default.object({
|
|
2447
2522
|
value: SelectDateRangeValue.describe("The value of the option"),
|
|
2448
2523
|
label: TranslationConfig.describe("The label of the option")
|
|
@@ -2451,7 +2526,10 @@ var SelectDateRangeField = BaseField.extend({
|
|
|
2451
2526
|
type: import_v43.default.literal(FieldType.SELECT_DATE_RANGE),
|
|
2452
2527
|
defaultValue: SelectDateRangeValue.optional(),
|
|
2453
2528
|
options: import_v43.default.array(SelectDateRangeOption).describe("A list of options")
|
|
2454
|
-
}).
|
|
2529
|
+
}).meta({
|
|
2530
|
+
description: "A date range selection field",
|
|
2531
|
+
id: "SelectDateRangeField"
|
|
2532
|
+
});
|
|
2455
2533
|
var NameConfig = import_v43.default.object({
|
|
2456
2534
|
firstname: import_v43.default.object({ required: requiredSchema, label: TranslationConfig.optional() }).optional(),
|
|
2457
2535
|
middlename: import_v43.default.object({ required: requiredSchema, label: TranslationConfig.optional() }).optional(),
|
|
@@ -2482,26 +2560,41 @@ var NameField = BaseField.extend({
|
|
|
2482
2560
|
surname: { required: true }
|
|
2483
2561
|
}
|
|
2484
2562
|
}).optional()
|
|
2485
|
-
}).
|
|
2563
|
+
}).meta({
|
|
2564
|
+
description: "A field for entering a persons name",
|
|
2565
|
+
id: "NameField"
|
|
2566
|
+
});
|
|
2486
2567
|
var PhoneField = BaseField.extend({
|
|
2487
2568
|
defaultValue: NonEmptyTextValue.optional(),
|
|
2488
2569
|
type: import_v43.default.literal(FieldType.PHONE)
|
|
2489
|
-
}).
|
|
2570
|
+
}).meta({
|
|
2571
|
+
description: "A field for entering a phone number",
|
|
2572
|
+
id: "PhoneField"
|
|
2573
|
+
});
|
|
2490
2574
|
var IdField = BaseField.extend({
|
|
2491
2575
|
defaultValue: NonEmptyTextValue.optional(),
|
|
2492
2576
|
type: import_v43.default.literal(FieldType.ID)
|
|
2493
|
-
}).
|
|
2577
|
+
}).meta({
|
|
2578
|
+
description: "A field for entering an ID",
|
|
2579
|
+
id: "IdField"
|
|
2580
|
+
});
|
|
2494
2581
|
var Checkbox = BaseField.extend({
|
|
2495
2582
|
type: import_v43.default.literal(FieldType.CHECKBOX),
|
|
2496
2583
|
defaultValue: CheckboxFieldValue.default(false)
|
|
2497
|
-
}).
|
|
2584
|
+
}).meta({
|
|
2585
|
+
description: "A boolean checkbox field",
|
|
2586
|
+
id: "Checkbox"
|
|
2587
|
+
});
|
|
2498
2588
|
var Country = BaseField.extend({
|
|
2499
2589
|
type: import_v43.default.literal(FieldType.COUNTRY),
|
|
2500
2590
|
defaultValue: NonEmptyTextValue.optional(),
|
|
2501
2591
|
optionOverrides: import_v43.default.array(SelectOption.omit({ label: true })).optional().describe(
|
|
2502
2592
|
"Conditionals for specific countries. Countries not listed are always shown and enabled."
|
|
2503
2593
|
)
|
|
2504
|
-
}).
|
|
2594
|
+
}).meta({
|
|
2595
|
+
description: "A field for selecting a country",
|
|
2596
|
+
id: "Country"
|
|
2597
|
+
});
|
|
2505
2598
|
var AllowedLocations = JurisdictionReference.optional().describe(
|
|
2506
2599
|
"Limits which location options are selectable depending on user jurisdiction and location."
|
|
2507
2600
|
);
|
|
@@ -2510,16 +2603,18 @@ var AdministrativeAreas = import_v43.default.enum([
|
|
|
2510
2603
|
"HEALTH_FACILITY",
|
|
2511
2604
|
"CRVS_OFFICE"
|
|
2512
2605
|
]);
|
|
2513
|
-
var AdministrativeAreaConfiguration = import_v43.default.object({
|
|
2514
|
-
partOf: FieldReference.optional().describe("Parent location"),
|
|
2515
|
-
type: AdministrativeAreas,
|
|
2516
|
-
allowedLocations: AllowedLocations
|
|
2517
|
-
}).describe("Administrative area options");
|
|
2518
2606
|
var AdministrativeAreaField = BaseField.extend({
|
|
2519
2607
|
type: import_v43.default.literal(FieldType.ADMINISTRATIVE_AREA),
|
|
2520
2608
|
defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField]).optional(),
|
|
2521
|
-
configuration:
|
|
2522
|
-
|
|
2609
|
+
configuration: import_v43.default.object({
|
|
2610
|
+
partOf: FieldReference.optional().describe("Parent location"),
|
|
2611
|
+
type: AdministrativeAreas,
|
|
2612
|
+
allowedLocations: AllowedLocations
|
|
2613
|
+
}).describe("Administrative area options")
|
|
2614
|
+
}).meta({
|
|
2615
|
+
description: "Administrative area input field",
|
|
2616
|
+
id: "AdministrativeAreaField"
|
|
2617
|
+
});
|
|
2523
2618
|
var LocationInput = BaseField.extend({
|
|
2524
2619
|
type: import_v43.default.literal(FieldType.LOCATION),
|
|
2525
2620
|
defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField]).optional(),
|
|
@@ -2527,7 +2622,10 @@ var LocationInput = BaseField.extend({
|
|
|
2527
2622
|
locationTypes: import_v43.default.array(import_v43.default.string()).optional().describe("Types of the locations that are available for selection."),
|
|
2528
2623
|
allowedLocations: AllowedLocations
|
|
2529
2624
|
}).optional()
|
|
2530
|
-
}).
|
|
2625
|
+
}).meta({
|
|
2626
|
+
description: "A field for selecting a location",
|
|
2627
|
+
id: "LocationInput"
|
|
2628
|
+
});
|
|
2531
2629
|
var FileUploadWithOptions = BaseField.extend({
|
|
2532
2630
|
type: import_v43.default.literal(FieldType.FILE_WITH_OPTIONS),
|
|
2533
2631
|
options: import_v43.default.array(SelectOption).describe("A list of options"),
|
|
@@ -2541,6 +2639,9 @@ var FileUploadWithOptions = BaseField.extend({
|
|
|
2541
2639
|
}).default({
|
|
2542
2640
|
maxFileSize: DEFAULT_MAX_FILE_SIZE_BYTES
|
|
2543
2641
|
})
|
|
2642
|
+
}).meta({
|
|
2643
|
+
description: "A field for uploading files with file type options",
|
|
2644
|
+
id: "FileUploadWithOptions"
|
|
2544
2645
|
});
|
|
2545
2646
|
var Facility = BaseField.extend({
|
|
2546
2647
|
type: import_v43.default.literal(FieldType.FACILITY),
|
|
@@ -2586,7 +2687,10 @@ var Address = BaseField.extend({
|
|
|
2586
2687
|
allowedLocations: AllowedLocations
|
|
2587
2688
|
}).optional(),
|
|
2588
2689
|
defaultValue: DefaultAddressFieldValue.optional()
|
|
2589
|
-
}).
|
|
2690
|
+
}).meta({
|
|
2691
|
+
description: "Address input field \u2013 a combination of location and text fields",
|
|
2692
|
+
id: "Address"
|
|
2693
|
+
});
|
|
2590
2694
|
var StaticDataEntry = import_v43.default.object({
|
|
2591
2695
|
id: import_v43.default.string().describe("ID for the data entry."),
|
|
2592
2696
|
label: TranslationConfig,
|
|
@@ -2601,7 +2705,10 @@ var DataField = BaseField.extend({
|
|
|
2601
2705
|
subtitle: TranslationConfig.optional(),
|
|
2602
2706
|
data: import_v43.default.array(DataEntry)
|
|
2603
2707
|
})
|
|
2604
|
-
}).
|
|
2708
|
+
}).meta({
|
|
2709
|
+
description: "A field for displaying a table of read-only data",
|
|
2710
|
+
id: "DataField"
|
|
2711
|
+
});
|
|
2605
2712
|
var ButtonSize = import_v43.default.enum(["small", "medium", "large"]);
|
|
2606
2713
|
var ButtonType = import_v43.default.enum([
|
|
2607
2714
|
"primary",
|
|
@@ -2628,11 +2735,17 @@ var ButtonField = BaseField.extend({
|
|
|
2628
2735
|
type: import_v43.default.literal(FieldType.BUTTON),
|
|
2629
2736
|
defaultValue: ButtonFieldValue.optional(),
|
|
2630
2737
|
configuration: ButtonConfiguration
|
|
2631
|
-
}).
|
|
2738
|
+
}).meta({
|
|
2739
|
+
description: "A generic button that can be used to trigger an action",
|
|
2740
|
+
id: "ButtonField"
|
|
2741
|
+
});
|
|
2632
2742
|
var FieldGroup = BaseField.extend({
|
|
2633
2743
|
type: import_v43.default.literal(FieldType.FIELD_GROUP),
|
|
2634
2744
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
2635
2745
|
fields: import_v43.default.lazy(() => import_v43.default.array(FieldConfig))
|
|
2746
|
+
}).meta({
|
|
2747
|
+
description: "A group of fields that are displayed together",
|
|
2748
|
+
id: "FieldGroup"
|
|
2636
2749
|
});
|
|
2637
2750
|
var AlphaPrintButton = BaseField.extend({
|
|
2638
2751
|
type: import_v43.default.literal(FieldType.ALPHA_PRINT_BUTTON),
|
|
@@ -2642,7 +2755,10 @@ var AlphaPrintButton = BaseField.extend({
|
|
|
2642
2755
|
"Label for the print button"
|
|
2643
2756
|
)
|
|
2644
2757
|
})
|
|
2645
|
-
}).
|
|
2758
|
+
}).meta({
|
|
2759
|
+
description: "An experimental print button field for printing certificates during the declaration process",
|
|
2760
|
+
id: "AlphaPrintButton"
|
|
2761
|
+
});
|
|
2646
2762
|
var HttpField = BaseField.extend({
|
|
2647
2763
|
type: import_v43.default.literal(FieldType.HTTP),
|
|
2648
2764
|
defaultValue: HttpFieldValue.optional(),
|
|
@@ -2658,20 +2774,30 @@ var HttpField = BaseField.extend({
|
|
|
2658
2774
|
params: import_v43.default.record(import_v43.default.string(), import_v43.default.union([import_v43.default.string(), FieldReference])).optional(),
|
|
2659
2775
|
timeout: import_v43.default.number().default(15e3).describe("Request timeout in milliseconds")
|
|
2660
2776
|
})
|
|
2661
|
-
}).
|
|
2777
|
+
}).meta({
|
|
2778
|
+
description: "Makes a background HTTP request to an external service and stores the response so other fields can use it. Has no visible UI \u2014 pair with LOADER to show request status.",
|
|
2779
|
+
id: "HttpField"
|
|
2780
|
+
});
|
|
2662
2781
|
var AutocompleteField = BaseField.extend({
|
|
2663
2782
|
type: import_v43.default.literal(FieldType.AUTOCOMPLETE),
|
|
2664
2783
|
configuration: import_v43.default.object({
|
|
2665
|
-
url: import_v43.default.string().describe(
|
|
2784
|
+
url: import_v43.default.string().describe(
|
|
2785
|
+
"URL to fetch autocomplete suggestions from. This should be a country config server endpoint."
|
|
2786
|
+
).optional(),
|
|
2666
2787
|
method: import_v43.default.enum(["GET", "POST"]).default("GET").optional(),
|
|
2667
2788
|
defaultOptions: import_v43.default.array(
|
|
2668
2789
|
import_v43.default.object({
|
|
2669
2790
|
label: import_v43.default.string(),
|
|
2670
2791
|
value: import_v43.default.string()
|
|
2671
2792
|
})
|
|
2672
|
-
).optional()
|
|
2793
|
+
).optional().describe(
|
|
2794
|
+
"Manual entry is supported through configuration, allowing users to provide values not currently represented in the dataset."
|
|
2795
|
+
)
|
|
2673
2796
|
})
|
|
2674
|
-
}).
|
|
2797
|
+
}).meta({
|
|
2798
|
+
description: "Generic autocomplete component designed for use with large dictionary-based datasets. The component supports dynamic retrieval of options from configurable data sources and is intended for datasets that may contain tens or hundreds of thousands of records.",
|
|
2799
|
+
id: "AutocompleteField"
|
|
2800
|
+
});
|
|
2675
2801
|
var SearchField = HttpField.extend({
|
|
2676
2802
|
type: import_v43.default.literal(FieldType.SEARCH),
|
|
2677
2803
|
configuration: SearchQuery.pick({
|
|
@@ -2704,6 +2830,9 @@ var SearchField = HttpField.extend({
|
|
|
2704
2830
|
ok: TranslationConfig.optional()
|
|
2705
2831
|
}).optional()
|
|
2706
2832
|
})
|
|
2833
|
+
}).meta({
|
|
2834
|
+
description: "A search input field",
|
|
2835
|
+
id: "SearchField"
|
|
2707
2836
|
});
|
|
2708
2837
|
var LinkButtonField = BaseField.extend({
|
|
2709
2838
|
type: import_v43.default.literal(FieldType.LINK_BUTTON),
|
|
@@ -2712,7 +2841,10 @@ var LinkButtonField = BaseField.extend({
|
|
|
2712
2841
|
text: TranslationConfig.describe("Text to display on the button"),
|
|
2713
2842
|
icon: import_v43.default.string().optional().describe("Icon for the button. You can find icons from OpenCRVS UI-Kit.")
|
|
2714
2843
|
})
|
|
2715
|
-
}).
|
|
2844
|
+
}).meta({
|
|
2845
|
+
description: "A button that opens a URL link",
|
|
2846
|
+
id: "LinkButtonField"
|
|
2847
|
+
});
|
|
2716
2848
|
var VerificationStatus = BaseField.extend({
|
|
2717
2849
|
type: import_v43.default.literal(FieldType.VERIFICATION_STATUS),
|
|
2718
2850
|
defaultValue: VerificationStatusValue.optional(),
|
|
@@ -2722,15 +2854,19 @@ var VerificationStatus = BaseField.extend({
|
|
|
2722
2854
|
"Explaining text on the banner in form."
|
|
2723
2855
|
)
|
|
2724
2856
|
})
|
|
2857
|
+
}).meta({
|
|
2858
|
+
description: "Displays a verification state (e.g. ID verified / pending). Often paired with ID_READER \u2014 it can read its value off an ID_READER rather than holding its own.",
|
|
2859
|
+
id: "VerificationStatus"
|
|
2725
2860
|
});
|
|
2726
2861
|
var QueryParamReaderField = BaseField.extend({
|
|
2727
2862
|
type: import_v43.default.literal(FieldType.QUERY_PARAM_READER),
|
|
2728
2863
|
configuration: import_v43.default.object({
|
|
2729
2864
|
pickParams: import_v43.default.array(import_v43.default.string()).describe("List of query parameters to read from the URL")
|
|
2730
2865
|
})
|
|
2731
|
-
}).
|
|
2732
|
-
"A field that maps URL query params into form values and clears them afterward"
|
|
2733
|
-
|
|
2866
|
+
}).meta({
|
|
2867
|
+
description: "A field that maps URL query params into form values and clears them afterward",
|
|
2868
|
+
id: "QueryParamReaderField"
|
|
2869
|
+
});
|
|
2734
2870
|
var QrReaderField = BaseField.extend({
|
|
2735
2871
|
type: import_v43.default.literal(FieldType.QR_READER),
|
|
2736
2872
|
defaultValue: QrReaderFieldValue.optional(),
|
|
@@ -2741,7 +2877,7 @@ var QrReaderField = BaseField.extend({
|
|
|
2741
2877
|
})
|
|
2742
2878
|
}).optional()
|
|
2743
2879
|
}).meta({
|
|
2744
|
-
description: "
|
|
2880
|
+
description: "QR code reader field, including optional JSON Schema validator.",
|
|
2745
2881
|
id: "QrReaderField"
|
|
2746
2882
|
});
|
|
2747
2883
|
var IdReaderField = BaseField.extend({
|
|
@@ -2750,12 +2886,18 @@ var IdReaderField = BaseField.extend({
|
|
|
2750
2886
|
methods: import_v43.default.array(
|
|
2751
2887
|
import_v43.default.union([QrReaderField, LinkButtonField]).describe("Methods for reading an ID")
|
|
2752
2888
|
)
|
|
2889
|
+
}).meta({
|
|
2890
|
+
description: "A wrapper around nested form fields, specifically QR_READER and LINK_BUTTON. It can hold the QR_READERs value.",
|
|
2891
|
+
id: "IdReaderField"
|
|
2753
2892
|
});
|
|
2754
2893
|
var CustomField = BaseField.extend({
|
|
2755
2894
|
type: import_v43.default.literal(FieldType._EXPERIMENTAL_CUSTOM),
|
|
2756
2895
|
defaultValue: CustomFieldValue.optional(),
|
|
2757
2896
|
src: import_v43.default.string().describe("Module source path for the custom field component"),
|
|
2758
2897
|
configuration: import_v43.default.unknown().optional()
|
|
2898
|
+
}).meta({
|
|
2899
|
+
description: "An expiremental custom field that is defined by a module source path",
|
|
2900
|
+
id: "CustomField"
|
|
2759
2901
|
});
|
|
2760
2902
|
var FieldStyleVariant = import_v43.default.enum(["default", "highlighted"]);
|
|
2761
2903
|
var LoaderField = BaseField.extend({
|
|
@@ -2765,22 +2907,25 @@ var LoaderField = BaseField.extend({
|
|
|
2765
2907
|
configuration: import_v43.default.object({
|
|
2766
2908
|
text: TranslationConfig.describe("Display text above the loading spinner")
|
|
2767
2909
|
})
|
|
2768
|
-
}).
|
|
2769
|
-
"A non-interactive field that indicates an in progress operation in form"
|
|
2770
|
-
|
|
2910
|
+
}).meta({
|
|
2911
|
+
description: "A non-interactive field that indicates an in progress operation in form",
|
|
2912
|
+
id: "LoaderField"
|
|
2913
|
+
});
|
|
2771
2914
|
var HiddenField = BaseField.extend({
|
|
2772
2915
|
type: import_v43.default.literal(FieldType.ALPHA_HIDDEN),
|
|
2773
2916
|
required: import_v43.default.boolean().default(false).optional(),
|
|
2774
2917
|
defaultValue: TextValue.optional()
|
|
2775
|
-
}).
|
|
2776
|
-
"A non-interactive, hidden field that only hold a value in the form"
|
|
2777
|
-
|
|
2918
|
+
}).meta({
|
|
2919
|
+
description: "A non-interactive, hidden field that only hold a value in the form",
|
|
2920
|
+
id: "HiddenField"
|
|
2921
|
+
});
|
|
2778
2922
|
var UserRoleField = BaseField.extend({
|
|
2779
2923
|
type: import_v43.default.literal(FieldType.USER_ROLE),
|
|
2780
2924
|
defaultValue: TextValue.optional()
|
|
2781
|
-
}).
|
|
2782
|
-
"A select dropdown that is automatically populated with available user roles"
|
|
2783
|
-
|
|
2925
|
+
}).meta({
|
|
2926
|
+
description: "A select dropdown that is automatically populated with available user roles",
|
|
2927
|
+
id: "UserRoleField"
|
|
2928
|
+
});
|
|
2784
2929
|
var FieldConfig = import_v43.default.discriminatedUnion("type", [
|
|
2785
2930
|
FieldGroup,
|
|
2786
2931
|
Address,
|
|
@@ -2879,16 +3024,19 @@ var VerificationPageConfig = FormPageConfig.extend({
|
|
|
2879
3024
|
type: z21.literal(PageTypes.enum.VERIFICATION),
|
|
2880
3025
|
actions: VerificationActionConfig
|
|
2881
3026
|
});
|
|
2882
|
-
var PageConfig = z21.discriminatedUnion("type", [
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
3027
|
+
var PageConfig = z21.discriminatedUnion("type", [FormPageConfig, VerificationPageConfig]).meta({
|
|
3028
|
+
id: "PageConfig",
|
|
3029
|
+
description: "Configuration for a single page in a form. Either a form page with fields and a continue button, or a verification page with verify/cancel options."
|
|
3030
|
+
});
|
|
2886
3031
|
|
|
2887
3032
|
// ../commons/src/events/FormConfig.ts
|
|
2888
3033
|
var DeclarationFormConfig = z22.object({
|
|
2889
3034
|
label: TranslationConfig.describe("Human readable description of the form"),
|
|
2890
3035
|
pages: z22.array(FormPageConfig)
|
|
2891
|
-
}).
|
|
3036
|
+
}).meta({
|
|
3037
|
+
id: "DeclarationFormConfig",
|
|
3038
|
+
description: "Configuration of the declaration form."
|
|
3039
|
+
});
|
|
2892
3040
|
var ActionFormConfig = z22.object({
|
|
2893
3041
|
label: TranslationConfig.describe("Human readable description of the form"),
|
|
2894
3042
|
pages: z22.array(PageConfig)
|
|
@@ -2988,6 +3136,9 @@ var DeduplicationConfig = z23.object({
|
|
|
2988
3136
|
id: z23.string(),
|
|
2989
3137
|
label: TranslationConfig,
|
|
2990
3138
|
query: Clause
|
|
3139
|
+
}).meta({
|
|
3140
|
+
id: "DeduplicationConfig",
|
|
3141
|
+
description: "Configuration for duplicate detection on a declare or register action. The query is built from fuzzy / strict / date-range matchers combined with and/or/not."
|
|
2991
3142
|
});
|
|
2992
3143
|
|
|
2993
3144
|
// ../commons/src/events/ActionConfig.ts
|
|
@@ -3105,17 +3256,42 @@ var ActionConfig = z24.discriminatedUnion("type", [
|
|
|
3105
3256
|
* OpenAPI references are defined here so our generated OpenAPI spec knows to reuse the models
|
|
3106
3257
|
* and treat them as "models" instead of duplicating the data structure in each endpoint.
|
|
3107
3258
|
*/
|
|
3108
|
-
ReadActionConfig.meta({
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3259
|
+
ReadActionConfig.meta({
|
|
3260
|
+
id: "ReadActionConfig",
|
|
3261
|
+
description: "Configuration for the read action \u2014 defines the record-tab content displayed on the event overview page."
|
|
3262
|
+
}),
|
|
3263
|
+
DeclareConfig.meta({
|
|
3264
|
+
id: "DeclareActionConfig",
|
|
3265
|
+
description: "Configuration for the declare action. Includes review-page fields. Shared with the notify action (ActionType.NOTIFY)."
|
|
3266
|
+
}),
|
|
3267
|
+
RejectConfig.meta({
|
|
3268
|
+
id: "RejectActionConfig",
|
|
3269
|
+
description: "Configuration for rejecting a record before registration."
|
|
3270
|
+
}),
|
|
3271
|
+
RegisterConfig.meta({
|
|
3272
|
+
id: "RegisterActionConfig",
|
|
3273
|
+
description: "Configuration for registering a record."
|
|
3274
|
+
}),
|
|
3112
3275
|
PrintCertificateActionConfig.meta({
|
|
3113
|
-
id: "PrintCertificateActionConfig"
|
|
3276
|
+
id: "PrintCertificateActionConfig",
|
|
3277
|
+
description: "Configuration for printing a certificate of a registered record."
|
|
3278
|
+
}),
|
|
3279
|
+
RequestCorrectionConfig.meta({
|
|
3280
|
+
id: "RequestCorrectionActionConfig",
|
|
3281
|
+
description: "Configuration for requesting a correction on a registered record."
|
|
3114
3282
|
}),
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3283
|
+
EditActionConfig.meta({
|
|
3284
|
+
id: "EditActionConfig",
|
|
3285
|
+
description: "Configuration for editing a record before registration."
|
|
3286
|
+
}),
|
|
3287
|
+
ArchiveConfig.meta({
|
|
3288
|
+
id: "ArchiveActionConfig",
|
|
3289
|
+
description: "Configuration for archiving a record."
|
|
3290
|
+
}),
|
|
3291
|
+
CustomActionConfig.meta({
|
|
3292
|
+
id: "CustomActionConfig",
|
|
3293
|
+
description: "Configuration for a country-defined custom action. An event may include any number of these."
|
|
3294
|
+
})
|
|
3119
3295
|
]).describe(
|
|
3120
3296
|
"Configuration of an action available for an event. Data collected depends on the action type and is accessible through the annotation property in ActionDocument."
|
|
3121
3297
|
).meta({ id: "ActionConfig" });
|
|
@@ -3191,7 +3367,10 @@ var Field = BaseField2.extend({
|
|
|
3191
3367
|
}).describe("Custom field defined for the summary view.");
|
|
3192
3368
|
var SummaryConfig = z27.object({
|
|
3193
3369
|
fields: z27.array(z27.union([Field, ReferenceField])).describe("Fields displayed in the event summary view.")
|
|
3194
|
-
}).
|
|
3370
|
+
}).meta({
|
|
3371
|
+
id: "SummaryConfig",
|
|
3372
|
+
description: "Configuration of the event overview page. Defines which declaration fields appear in the record summary, optionally with custom labels, empty-value messages, and templated values."
|
|
3373
|
+
});
|
|
3195
3374
|
|
|
3196
3375
|
// ../commons/src/events/AdvancedSearchConfig.ts
|
|
3197
3376
|
var z28 = __toESM(require("zod/v4"));
|
|
@@ -3315,6 +3494,9 @@ var AdvancedSearchField = z28.discriminatedUnion("fieldType", [FieldConfigSchema
|
|
|
3315
3494
|
var AdvancedSearchConfig = z28.object({
|
|
3316
3495
|
title: TranslationConfig.describe("Advanced search tab title"),
|
|
3317
3496
|
fields: z28.array(AdvancedSearchField).describe("Advanced search fields within the tab.")
|
|
3497
|
+
}).meta({
|
|
3498
|
+
id: "AdvancedSearchConfig",
|
|
3499
|
+
description: "Configuration of one advanced search tab. Each tab has a title and a list of searchable fields \u2014 either declaration fields (via `field()`) or event metadata (via `event()`)."
|
|
3318
3500
|
});
|
|
3319
3501
|
|
|
3320
3502
|
// ../commons/src/events/utils.ts
|
|
@@ -5363,7 +5545,7 @@ var _EventConfigBase = z33.object({
|
|
|
5363
5545
|
),
|
|
5364
5546
|
label: TranslationConfig.describe("Human-readable label for the event type."),
|
|
5365
5547
|
actions: z33.array(ActionConfig).describe(
|
|
5366
|
-
"Configuration of
|
|
5548
|
+
"Configuration of core and custom actions associated with the event."
|
|
5367
5549
|
),
|
|
5368
5550
|
actionOrder: z33.array(z33.string()).optional().describe(
|
|
5369
5551
|
"Order of actions in the action menu. Use either the action type for core actions or the customActionType for custom actions."
|
|
@@ -5375,7 +5557,7 @@ var _EventConfigBase = z33.object({
|
|
|
5375
5557
|
"Configuration of fields available in the advanced search feature."
|
|
5376
5558
|
),
|
|
5377
5559
|
flags: z33.array(FlagConfig).optional().default([]).describe(
|
|
5378
|
-
"Configuration of flags associated with the actions of this event type."
|
|
5560
|
+
"Configuration of custom flags associated with the actions of this event type."
|
|
5379
5561
|
),
|
|
5380
5562
|
analytics: z33.boolean().optional().default(true).describe(
|
|
5381
5563
|
"Indicates whether the records of this event type are included in analytics"
|
|
@@ -5388,8 +5570,9 @@ var EventConfig = _EventConfigBase.superRefine((event2, ctx) => {
|
|
|
5388
5570
|
validateActionFlags(event2, ctx);
|
|
5389
5571
|
validateActionOrder(event2, ctx);
|
|
5390
5572
|
}).meta({
|
|
5391
|
-
id: "EventConfig"
|
|
5392
|
-
|
|
5573
|
+
id: "EventConfig",
|
|
5574
|
+
description: "Configuration defining an event type registered in OpenCRVS (for example birth or death)."
|
|
5575
|
+
});
|
|
5393
5576
|
|
|
5394
5577
|
// ../commons/src/events/EventConfigInput.ts
|
|
5395
5578
|
var defineDeclarationForm = (form) => DeclarationFormConfig.parse(form);
|
|
@@ -5612,6 +5795,9 @@ var WorkqueueColumnValue = z34.object({
|
|
|
5612
5795
|
var WorkqueueColumn = z34.object({
|
|
5613
5796
|
label: TranslationConfig,
|
|
5614
5797
|
value: WorkqueueColumnValue
|
|
5798
|
+
}).meta({
|
|
5799
|
+
id: "WorkqueueColumn",
|
|
5800
|
+
description: "Configuration for a single workqueue column. The value references an event metadata key (e.g. `dateOfEvent`, `status`, `trackingId`)."
|
|
5615
5801
|
});
|
|
5616
5802
|
function defineWorkqueuesColumns(workqueueColumns) {
|
|
5617
5803
|
return workqueueColumns.map(
|
|
@@ -5814,18 +6000,11 @@ var WorkqueueConfigWithoutQuery = WorkqueueConfig.omit({
|
|
|
5814
6000
|
query: true,
|
|
5815
6001
|
columns: true
|
|
5816
6002
|
});
|
|
5817
|
-
var WorkqueueConfigInput =
|
|
5818
|
-
|
|
5819
|
-
|
|
5820
|
-
|
|
5821
|
-
|
|
5822
|
-
query: CountryConfigQueryInputType,
|
|
5823
|
-
action: z37.object({ type: WorkqueueActionType }).optional().describe(
|
|
5824
|
-
"Workqueue call-to-action button configuration. This determines the quick action button shown on each event card and the action taken when the button is clicked."
|
|
5825
|
-
),
|
|
5826
|
-
columns: z37.array(WorkqueueColumn).default(mandatoryColumns),
|
|
5827
|
-
icon: AvailableIcons,
|
|
5828
|
-
emptyMessage: TranslationConfig.optional()
|
|
6003
|
+
var WorkqueueConfigInput = WorkqueueConfig.extend({
|
|
6004
|
+
query: CountryConfigQueryInputType
|
|
6005
|
+
}).meta({
|
|
6006
|
+
id: "WorkqueueConfig",
|
|
6007
|
+
description: "Configuration for a single workqueue. Defines the filter applied to the event index, the quick-action button, the columns shown on each row, and the message rendered when the queue is empty."
|
|
5829
6008
|
});
|
|
5830
6009
|
function defineWorkqueue(workqueueInput) {
|
|
5831
6010
|
const queryInput = workqueueInput.query;
|
|
@@ -5888,7 +6067,9 @@ var BaseActionInput = z38.object({
|
|
|
5888
6067
|
keepAssignment: z38.boolean().optional(),
|
|
5889
6068
|
keepAssignmentIfAccepted: z38.boolean().optional(),
|
|
5890
6069
|
keepAssignmentIfRejected: z38.boolean().optional(),
|
|
5891
|
-
waitFor: z38.boolean().
|
|
6070
|
+
waitFor: z38.boolean().default(true).describe(
|
|
6071
|
+
"Whether action waits for the indexing before returning. Defaults to true. Setting this to to false completes faster but might lead to stale data in the client if the client tries to read the event immediately after performing the action. Use with care."
|
|
6072
|
+
),
|
|
5892
6073
|
// For normal users, the createdAtLocation is resolved on the backend from the user's primaryOfficeId.
|
|
5893
6074
|
// @TODO: createdAtLocation should be limited to actions that system users can perform. For normal users, it should not be part of the base action.
|
|
5894
6075
|
createdAtLocation: UUID.nullish().describe(
|
|
@@ -6068,7 +6249,7 @@ var Draft = z39.object({
|
|
|
6068
6249
|
}).describe(
|
|
6069
6250
|
"A temporary storage for an action. Stored with details of the event, creator and creation time."
|
|
6070
6251
|
);
|
|
6071
|
-
var DraftInput = BaseActionInput.extend({
|
|
6252
|
+
var DraftInput = BaseActionInput.omit({ waitFor: true }).extend({
|
|
6072
6253
|
type: ActionTypes.exclude([ActionTypes.enum.DELETE]),
|
|
6073
6254
|
status: z39.enum([
|
|
6074
6255
|
ActionStatus.Requested,
|