@opencrvs/toolkit 2.0.0-rc.e20c746 → 2.0.0-rc.e25c39b
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.
|
@@ -85,58 +85,6 @@ export declare const ActionConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
85
85
|
fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
86
86
|
}, z.core.$strip>;
|
|
87
87
|
conditionals: z.ZodOptional<z.ZodNever>;
|
|
88
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
89
|
-
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
90
|
-
supportingCopy: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>>;
|
|
91
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
92
|
-
conditionals: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
93
|
-
type: z.ZodLiteral<"SHOW">;
|
|
94
|
-
conditional: z.ZodAny;
|
|
95
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
96
|
-
type: z.ZodLiteral<"ENABLE">;
|
|
97
|
-
conditional: z.ZodAny;
|
|
98
|
-
}, z.core.$strip>], "type">>>;
|
|
99
|
-
type: z.ZodLiteral<"ASSIGN">;
|
|
100
|
-
flags: z.ZodOptional<z.ZodNever>;
|
|
101
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
102
|
-
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
103
|
-
supportingCopy: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>>;
|
|
104
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
105
|
-
conditionals: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
106
|
-
type: z.ZodLiteral<"SHOW">;
|
|
107
|
-
conditional: z.ZodAny;
|
|
108
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
109
|
-
type: z.ZodLiteral<"ENABLE">;
|
|
110
|
-
conditional: z.ZodAny;
|
|
111
|
-
}, z.core.$strip>], "type">>>;
|
|
112
|
-
type: z.ZodLiteral<"UNASSIGN">;
|
|
113
|
-
flags: z.ZodOptional<z.ZodNever>;
|
|
114
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
115
|
-
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
116
|
-
flags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
117
|
-
id: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
118
|
-
readonly INCOMPLETE: "incomplete";
|
|
119
|
-
readonly REJECTED: "rejected";
|
|
120
|
-
readonly CORRECTION_REQUESTED: "correction-requested";
|
|
121
|
-
readonly POTENTIAL_DUPLICATE: "potential-duplicate";
|
|
122
|
-
readonly EDIT_IN_PROGRESS: "edit-in-progress";
|
|
123
|
-
}>]>, z.ZodString]>;
|
|
124
|
-
operation: z.ZodEnum<{
|
|
125
|
-
add: "add";
|
|
126
|
-
remove: "remove";
|
|
127
|
-
}>;
|
|
128
|
-
conditional: z.ZodOptional<z.ZodAny>;
|
|
129
|
-
}, z.core.$strip>>>>;
|
|
130
|
-
supportingCopy: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>>;
|
|
131
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
132
|
-
conditionals: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
133
|
-
type: z.ZodLiteral<"SHOW">;
|
|
134
|
-
conditional: z.ZodAny;
|
|
135
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
136
|
-
type: z.ZodLiteral<"ENABLE">;
|
|
137
|
-
conditional: z.ZodAny;
|
|
138
|
-
}, z.core.$strip>], "type">>>;
|
|
139
|
-
type: z.ZodLiteral<"DELETE">;
|
|
140
88
|
}, z.core.$strip>, z.ZodObject<{
|
|
141
89
|
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
142
90
|
flags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -203,78 +151,6 @@ export declare const ActionConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
203
151
|
declare: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
204
152
|
register: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
205
153
|
}, z.core.$strip>>;
|
|
206
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
207
|
-
flags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
208
|
-
id: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
209
|
-
readonly INCOMPLETE: "incomplete";
|
|
210
|
-
readonly REJECTED: "rejected";
|
|
211
|
-
readonly CORRECTION_REQUESTED: "correction-requested";
|
|
212
|
-
readonly POTENTIAL_DUPLICATE: "potential-duplicate";
|
|
213
|
-
readonly EDIT_IN_PROGRESS: "edit-in-progress";
|
|
214
|
-
}>]>, z.ZodString]>;
|
|
215
|
-
operation: z.ZodEnum<{
|
|
216
|
-
add: "add";
|
|
217
|
-
remove: "remove";
|
|
218
|
-
}>;
|
|
219
|
-
conditional: z.ZodOptional<z.ZodAny>;
|
|
220
|
-
}, z.core.$strip>>>>;
|
|
221
|
-
type: z.ZodLiteral<"DUPLICATE_DETECTED">;
|
|
222
|
-
label: z.ZodOptional<z.ZodNever>;
|
|
223
|
-
supportingCopy: z.ZodOptional<z.ZodNever>;
|
|
224
|
-
icon: z.ZodOptional<z.ZodNever>;
|
|
225
|
-
conditionals: z.ZodOptional<z.ZodNever>;
|
|
226
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
227
|
-
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
228
|
-
flags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
229
|
-
id: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
230
|
-
readonly INCOMPLETE: "incomplete";
|
|
231
|
-
readonly REJECTED: "rejected";
|
|
232
|
-
readonly CORRECTION_REQUESTED: "correction-requested";
|
|
233
|
-
readonly POTENTIAL_DUPLICATE: "potential-duplicate";
|
|
234
|
-
readonly EDIT_IN_PROGRESS: "edit-in-progress";
|
|
235
|
-
}>]>, z.ZodString]>;
|
|
236
|
-
operation: z.ZodEnum<{
|
|
237
|
-
add: "add";
|
|
238
|
-
remove: "remove";
|
|
239
|
-
}>;
|
|
240
|
-
conditional: z.ZodOptional<z.ZodAny>;
|
|
241
|
-
}, z.core.$strip>>>>;
|
|
242
|
-
supportingCopy: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>>;
|
|
243
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
244
|
-
conditionals: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
245
|
-
type: z.ZodLiteral<"SHOW">;
|
|
246
|
-
conditional: z.ZodAny;
|
|
247
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
248
|
-
type: z.ZodLiteral<"ENABLE">;
|
|
249
|
-
conditional: z.ZodAny;
|
|
250
|
-
}, z.core.$strip>], "type">>>;
|
|
251
|
-
type: z.ZodLiteral<"MARK_AS_DUPLICATE">;
|
|
252
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
253
|
-
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
254
|
-
flags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
255
|
-
id: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
256
|
-
readonly INCOMPLETE: "incomplete";
|
|
257
|
-
readonly REJECTED: "rejected";
|
|
258
|
-
readonly CORRECTION_REQUESTED: "correction-requested";
|
|
259
|
-
readonly POTENTIAL_DUPLICATE: "potential-duplicate";
|
|
260
|
-
readonly EDIT_IN_PROGRESS: "edit-in-progress";
|
|
261
|
-
}>]>, z.ZodString]>;
|
|
262
|
-
operation: z.ZodEnum<{
|
|
263
|
-
add: "add";
|
|
264
|
-
remove: "remove";
|
|
265
|
-
}>;
|
|
266
|
-
conditional: z.ZodOptional<z.ZodAny>;
|
|
267
|
-
}, z.core.$strip>>>>;
|
|
268
|
-
supportingCopy: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>>;
|
|
269
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
270
|
-
conditionals: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
271
|
-
type: z.ZodLiteral<"SHOW">;
|
|
272
|
-
conditional: z.ZodAny;
|
|
273
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
274
|
-
type: z.ZodLiteral<"ENABLE">;
|
|
275
|
-
conditional: z.ZodAny;
|
|
276
|
-
}, z.core.$strip>], "type">>>;
|
|
277
|
-
type: z.ZodLiteral<"MARK_AS_NOT_DUPLICATE">;
|
|
278
154
|
}, z.core.$strip>, z.ZodObject<{
|
|
279
155
|
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
280
156
|
flags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -444,58 +320,6 @@ export declare const ActionConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
444
320
|
}, z.core.$strip>;
|
|
445
321
|
}, z.core.$strip>], "type">>;
|
|
446
322
|
}, z.core.$strip>;
|
|
447
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
448
|
-
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
449
|
-
flags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
450
|
-
id: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
451
|
-
readonly INCOMPLETE: "incomplete";
|
|
452
|
-
readonly REJECTED: "rejected";
|
|
453
|
-
readonly CORRECTION_REQUESTED: "correction-requested";
|
|
454
|
-
readonly POTENTIAL_DUPLICATE: "potential-duplicate";
|
|
455
|
-
readonly EDIT_IN_PROGRESS: "edit-in-progress";
|
|
456
|
-
}>]>, z.ZodString]>;
|
|
457
|
-
operation: z.ZodEnum<{
|
|
458
|
-
add: "add";
|
|
459
|
-
remove: "remove";
|
|
460
|
-
}>;
|
|
461
|
-
conditional: z.ZodOptional<z.ZodAny>;
|
|
462
|
-
}, z.core.$strip>>>>;
|
|
463
|
-
supportingCopy: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>>;
|
|
464
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
465
|
-
conditionals: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
466
|
-
type: z.ZodLiteral<"SHOW">;
|
|
467
|
-
conditional: z.ZodAny;
|
|
468
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
469
|
-
type: z.ZodLiteral<"ENABLE">;
|
|
470
|
-
conditional: z.ZodAny;
|
|
471
|
-
}, z.core.$strip>], "type">>>;
|
|
472
|
-
type: z.ZodLiteral<"APPROVE_CORRECTION">;
|
|
473
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
474
|
-
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
475
|
-
flags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
476
|
-
id: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
477
|
-
readonly INCOMPLETE: "incomplete";
|
|
478
|
-
readonly REJECTED: "rejected";
|
|
479
|
-
readonly CORRECTION_REQUESTED: "correction-requested";
|
|
480
|
-
readonly POTENTIAL_DUPLICATE: "potential-duplicate";
|
|
481
|
-
readonly EDIT_IN_PROGRESS: "edit-in-progress";
|
|
482
|
-
}>]>, z.ZodString]>;
|
|
483
|
-
operation: z.ZodEnum<{
|
|
484
|
-
add: "add";
|
|
485
|
-
remove: "remove";
|
|
486
|
-
}>;
|
|
487
|
-
conditional: z.ZodOptional<z.ZodAny>;
|
|
488
|
-
}, z.core.$strip>>>>;
|
|
489
|
-
supportingCopy: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>>;
|
|
490
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
491
|
-
conditionals: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
492
|
-
type: z.ZodLiteral<"SHOW">;
|
|
493
|
-
conditional: z.ZodAny;
|
|
494
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
495
|
-
type: z.ZodLiteral<"ENABLE">;
|
|
496
|
-
conditional: z.ZodAny;
|
|
497
|
-
}, z.core.$strip>], "type">>>;
|
|
498
|
-
type: z.ZodLiteral<"REJECT_CORRECTION">;
|
|
499
323
|
}, z.core.$strip>, z.ZodObject<{
|
|
500
324
|
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
501
325
|
flags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
package/dist/events/index.js
CHANGED
|
@@ -3228,52 +3228,6 @@ var NotifyConfig = ActionConfigBase.extend(
|
|
|
3228
3228
|
type: z24.literal(ActionType.NOTIFY)
|
|
3229
3229
|
}).shape
|
|
3230
3230
|
);
|
|
3231
|
-
var DuplicateDetectedConfig = ActionConfigBase.extend(
|
|
3232
|
-
z24.object({
|
|
3233
|
-
type: z24.literal(ActionType.DUPLICATE_DETECTED),
|
|
3234
|
-
label: z24.never().optional().describe(
|
|
3235
|
-
"DUPLICATE_DETECTED is system-generated and never shown as a button, so it has no label."
|
|
3236
|
-
),
|
|
3237
|
-
supportingCopy: z24.never().optional(),
|
|
3238
|
-
icon: z24.never().optional().describe(
|
|
3239
|
-
"DUPLICATE_DETECTED is system-generated and never shown as a button, so it has no icon."
|
|
3240
|
-
),
|
|
3241
|
-
conditionals: z24.never().optional().describe(
|
|
3242
|
-
"DUPLICATE_DETECTED is system-generated and never shown as a button, so it cannot be disabled or hidden with conditionals."
|
|
3243
|
-
)
|
|
3244
|
-
}).shape
|
|
3245
|
-
);
|
|
3246
|
-
var MarkAsDuplicateConfig = ActionConfigBase.extend(
|
|
3247
|
-
z24.object({
|
|
3248
|
-
type: z24.literal(ActionType.MARK_AS_DUPLICATE)
|
|
3249
|
-
}).shape
|
|
3250
|
-
);
|
|
3251
|
-
var MarkAsNotDuplicateConfig = ActionConfigBase.extend(
|
|
3252
|
-
z24.object({
|
|
3253
|
-
type: z24.literal(ActionType.MARK_AS_NOT_DUPLICATE)
|
|
3254
|
-
}).shape
|
|
3255
|
-
);
|
|
3256
|
-
var AssignConfig = ActionConfigBase.extend(
|
|
3257
|
-
z24.object({
|
|
3258
|
-
type: z24.literal(ActionType.ASSIGN),
|
|
3259
|
-
flags: z24.never().optional().describe(
|
|
3260
|
-
"ASSIGN is a meta action excluded from flag resolution, so flags configured here would never apply."
|
|
3261
|
-
)
|
|
3262
|
-
}).shape
|
|
3263
|
-
);
|
|
3264
|
-
var UnassignConfig = ActionConfigBase.extend(
|
|
3265
|
-
z24.object({
|
|
3266
|
-
type: z24.literal(ActionType.UNASSIGN),
|
|
3267
|
-
flags: z24.never().optional().describe(
|
|
3268
|
-
"UNASSIGN is a meta action excluded from flag resolution, so flags configured here would never apply."
|
|
3269
|
-
)
|
|
3270
|
-
}).shape
|
|
3271
|
-
);
|
|
3272
|
-
var DeleteConfig = ActionConfigBase.extend(
|
|
3273
|
-
z24.object({
|
|
3274
|
-
type: z24.literal(ActionType.DELETE)
|
|
3275
|
-
}).shape
|
|
3276
|
-
);
|
|
3277
3231
|
var DeclareConfig = DeclarationActionBase.extend(
|
|
3278
3232
|
z24.object({
|
|
3279
3233
|
type: z24.literal(ActionType.DECLARE),
|
|
@@ -3336,17 +3290,7 @@ var RequestCorrectionConfig = ActionConfigBase.extend(
|
|
|
3336
3290
|
correctionForm: ActionFormConfig
|
|
3337
3291
|
}).shape
|
|
3338
3292
|
);
|
|
3339
|
-
var
|
|
3340
|
-
z24.object({
|
|
3341
|
-
type: z24.literal(ActionType.APPROVE_CORRECTION)
|
|
3342
|
-
}).shape
|
|
3343
|
-
);
|
|
3344
|
-
var RejectCorrectionConfig = ActionConfigBase.extend(
|
|
3345
|
-
z24.object({
|
|
3346
|
-
type: z24.literal(ActionType.REJECT_CORRECTION)
|
|
3347
|
-
}).shape
|
|
3348
|
-
);
|
|
3349
|
-
var CustomActionConfig = ActionConfigBase.extend(
|
|
3293
|
+
var CustomActionConfig = ActionConfigBase.merge(
|
|
3350
3294
|
z24.object({
|
|
3351
3295
|
type: z24.literal(ActionType.CUSTOM),
|
|
3352
3296
|
customActionType: z24.string().describe("Type identifier of the custom action."),
|
|
@@ -3357,7 +3301,7 @@ var CustomActionConfig = ActionConfigBase.extend(
|
|
|
3357
3301
|
auditHistoryLabel: TranslationConfig.describe(
|
|
3358
3302
|
'The label to show in audit history for this action. For example "Approved".'
|
|
3359
3303
|
)
|
|
3360
|
-
})
|
|
3304
|
+
})
|
|
3361
3305
|
);
|
|
3362
3306
|
var ActionConfig = z24.discriminatedUnion("type", [
|
|
3363
3307
|
/*
|
|
@@ -3368,18 +3312,6 @@ var ActionConfig = z24.discriminatedUnion("type", [
|
|
|
3368
3312
|
id: "ReadActionConfig",
|
|
3369
3313
|
description: "Configuration for the read action \u2014 defines the record-tab content displayed on the event overview page."
|
|
3370
3314
|
}),
|
|
3371
|
-
AssignConfig.meta({
|
|
3372
|
-
id: "AssignActionConfig",
|
|
3373
|
-
description: "Configuration for assigning a record to the current user."
|
|
3374
|
-
}),
|
|
3375
|
-
UnassignConfig.meta({
|
|
3376
|
-
id: "UnassignActionConfig",
|
|
3377
|
-
description: "Configuration for unassigning a record from its current assignee."
|
|
3378
|
-
}),
|
|
3379
|
-
DeleteConfig.meta({
|
|
3380
|
-
id: "DeleteActionConfig",
|
|
3381
|
-
description: "Configuration for deleting a draft record."
|
|
3382
|
-
}),
|
|
3383
3315
|
NotifyConfig.meta({
|
|
3384
3316
|
id: "NotifyActionConfig",
|
|
3385
3317
|
description: "Configuration for the notify action. When present, NOTIFY uses this config independently from DECLARE. When absent, NOTIFY falls back to the DeclareActionConfig."
|
|
@@ -3388,18 +3320,6 @@ var ActionConfig = z24.discriminatedUnion("type", [
|
|
|
3388
3320
|
id: "DeclareActionConfig",
|
|
3389
3321
|
description: "Configuration for the declare action. Includes review-page fields. NOTIFY falls back to this config when no dedicated NotifyActionConfig is provided."
|
|
3390
3322
|
}),
|
|
3391
|
-
DuplicateDetectedConfig.meta({
|
|
3392
|
-
id: "DuplicateDetectedActionConfig",
|
|
3393
|
-
description: "Configuration for the system-generated duplicate-detection action. Never shown as a button, so it only supports flags \u2014 not label, icon, or conditionals."
|
|
3394
|
-
}),
|
|
3395
|
-
MarkAsDuplicateConfig.meta({
|
|
3396
|
-
id: "MarkAsDuplicateActionConfig",
|
|
3397
|
-
description: "Configuration for marking a record as a duplicate."
|
|
3398
|
-
}),
|
|
3399
|
-
MarkAsNotDuplicateConfig.meta({
|
|
3400
|
-
id: "MarkAsNotDuplicateActionConfig",
|
|
3401
|
-
description: "Configuration for marking a record as not a duplicate, after it was previously flagged as one."
|
|
3402
|
-
}),
|
|
3403
3323
|
RejectConfig.meta({
|
|
3404
3324
|
id: "RejectActionConfig",
|
|
3405
3325
|
description: "Configuration for rejecting a record before registration."
|
|
@@ -3416,14 +3336,6 @@ var ActionConfig = z24.discriminatedUnion("type", [
|
|
|
3416
3336
|
id: "RequestCorrectionActionConfig",
|
|
3417
3337
|
description: "Configuration for requesting a correction on a registered record."
|
|
3418
3338
|
}),
|
|
3419
|
-
ApproveCorrectionConfig.meta({
|
|
3420
|
-
id: "ApproveCorrectionActionConfig",
|
|
3421
|
-
description: "Configuration for approving a requested correction."
|
|
3422
|
-
}),
|
|
3423
|
-
RejectCorrectionConfig.meta({
|
|
3424
|
-
id: "RejectCorrectionActionConfig",
|
|
3425
|
-
description: "Configuration for rejecting a requested correction."
|
|
3426
|
-
}),
|
|
3427
3339
|
EditActionConfig.meta({
|
|
3428
3340
|
id: "EditActionConfig",
|
|
3429
3341
|
description: "Configuration for editing a record before registration."
|
|
@@ -4582,6 +4494,9 @@ function getActionConfig({
|
|
|
4582
4494
|
if (a.type === ActionType.CUSTOM && customActionType) {
|
|
4583
4495
|
return a.customActionType === customActionType;
|
|
4584
4496
|
}
|
|
4497
|
+
if (actionType === ActionType.APPROVE_CORRECTION || actionType === ActionType.REJECT_CORRECTION) {
|
|
4498
|
+
return a.type === ActionType.REQUEST_CORRECTION;
|
|
4499
|
+
}
|
|
4585
4500
|
return a.type === actionType;
|
|
4586
4501
|
});
|
|
4587
4502
|
}
|
|
@@ -5735,7 +5650,7 @@ function validateActionFlags(event2, ctx) {
|
|
|
5735
5650
|
const isInherentFlag = (value) => Object.values(InherentFlags).includes(value);
|
|
5736
5651
|
const configuredFlagIds = event2.flags.map((flag2) => flag2.id);
|
|
5737
5652
|
const actionFlagIds = event2.actions.flatMap(
|
|
5738
|
-
(action) =>
|
|
5653
|
+
(action) => action.flags.map((flag2) => flag2.id)
|
|
5739
5654
|
);
|
|
5740
5655
|
for (const actionFlagId of actionFlagIds) {
|
|
5741
5656
|
const isConfigured = configuredFlagIds.includes(actionFlagId);
|
|
@@ -6774,7 +6689,7 @@ function resolveEventCustomFlags(event2, eventConfiguration) {
|
|
|
6774
6689
|
const declaration = aggregateActionDeclarations(eventUpToThisAction);
|
|
6775
6690
|
const annotation = aggregateActionAnnotations(eventUpToThisAction);
|
|
6776
6691
|
const form = { ...declaration, ...annotation };
|
|
6777
|
-
const flagsWithMetConditions =
|
|
6692
|
+
const flagsWithMetConditions = actionConfig.flags.filter(
|
|
6778
6693
|
({ conditional }) => (
|
|
6779
6694
|
// If conditional is not provided, the flag is resolved
|
|
6780
6695
|
conditional ? isFlagConditionMet(conditional, form, action) : true
|
|
@@ -2685,52 +2685,6 @@ var NotifyConfig = ActionConfigBase.extend(
|
|
|
2685
2685
|
type: z24.literal(ActionType.NOTIFY)
|
|
2686
2686
|
}).shape
|
|
2687
2687
|
);
|
|
2688
|
-
var DuplicateDetectedConfig = ActionConfigBase.extend(
|
|
2689
|
-
z24.object({
|
|
2690
|
-
type: z24.literal(ActionType.DUPLICATE_DETECTED),
|
|
2691
|
-
label: z24.never().optional().describe(
|
|
2692
|
-
"DUPLICATE_DETECTED is system-generated and never shown as a button, so it has no label."
|
|
2693
|
-
),
|
|
2694
|
-
supportingCopy: z24.never().optional(),
|
|
2695
|
-
icon: z24.never().optional().describe(
|
|
2696
|
-
"DUPLICATE_DETECTED is system-generated and never shown as a button, so it has no icon."
|
|
2697
|
-
),
|
|
2698
|
-
conditionals: z24.never().optional().describe(
|
|
2699
|
-
"DUPLICATE_DETECTED is system-generated and never shown as a button, so it cannot be disabled or hidden with conditionals."
|
|
2700
|
-
)
|
|
2701
|
-
}).shape
|
|
2702
|
-
);
|
|
2703
|
-
var MarkAsDuplicateConfig = ActionConfigBase.extend(
|
|
2704
|
-
z24.object({
|
|
2705
|
-
type: z24.literal(ActionType.MARK_AS_DUPLICATE)
|
|
2706
|
-
}).shape
|
|
2707
|
-
);
|
|
2708
|
-
var MarkAsNotDuplicateConfig = ActionConfigBase.extend(
|
|
2709
|
-
z24.object({
|
|
2710
|
-
type: z24.literal(ActionType.MARK_AS_NOT_DUPLICATE)
|
|
2711
|
-
}).shape
|
|
2712
|
-
);
|
|
2713
|
-
var AssignConfig = ActionConfigBase.extend(
|
|
2714
|
-
z24.object({
|
|
2715
|
-
type: z24.literal(ActionType.ASSIGN),
|
|
2716
|
-
flags: z24.never().optional().describe(
|
|
2717
|
-
"ASSIGN is a meta action excluded from flag resolution, so flags configured here would never apply."
|
|
2718
|
-
)
|
|
2719
|
-
}).shape
|
|
2720
|
-
);
|
|
2721
|
-
var UnassignConfig = ActionConfigBase.extend(
|
|
2722
|
-
z24.object({
|
|
2723
|
-
type: z24.literal(ActionType.UNASSIGN),
|
|
2724
|
-
flags: z24.never().optional().describe(
|
|
2725
|
-
"UNASSIGN is a meta action excluded from flag resolution, so flags configured here would never apply."
|
|
2726
|
-
)
|
|
2727
|
-
}).shape
|
|
2728
|
-
);
|
|
2729
|
-
var DeleteConfig = ActionConfigBase.extend(
|
|
2730
|
-
z24.object({
|
|
2731
|
-
type: z24.literal(ActionType.DELETE)
|
|
2732
|
-
}).shape
|
|
2733
|
-
);
|
|
2734
2688
|
var DeclareConfig = DeclarationActionBase.extend(
|
|
2735
2689
|
z24.object({
|
|
2736
2690
|
type: z24.literal(ActionType.DECLARE),
|
|
@@ -2793,17 +2747,7 @@ var RequestCorrectionConfig = ActionConfigBase.extend(
|
|
|
2793
2747
|
correctionForm: ActionFormConfig
|
|
2794
2748
|
}).shape
|
|
2795
2749
|
);
|
|
2796
|
-
var
|
|
2797
|
-
z24.object({
|
|
2798
|
-
type: z24.literal(ActionType.APPROVE_CORRECTION)
|
|
2799
|
-
}).shape
|
|
2800
|
-
);
|
|
2801
|
-
var RejectCorrectionConfig = ActionConfigBase.extend(
|
|
2802
|
-
z24.object({
|
|
2803
|
-
type: z24.literal(ActionType.REJECT_CORRECTION)
|
|
2804
|
-
}).shape
|
|
2805
|
-
);
|
|
2806
|
-
var CustomActionConfig = ActionConfigBase.extend(
|
|
2750
|
+
var CustomActionConfig = ActionConfigBase.merge(
|
|
2807
2751
|
z24.object({
|
|
2808
2752
|
type: z24.literal(ActionType.CUSTOM),
|
|
2809
2753
|
customActionType: z24.string().describe("Type identifier of the custom action."),
|
|
@@ -2814,7 +2758,7 @@ var CustomActionConfig = ActionConfigBase.extend(
|
|
|
2814
2758
|
auditHistoryLabel: TranslationConfig.describe(
|
|
2815
2759
|
'The label to show in audit history for this action. For example "Approved".'
|
|
2816
2760
|
)
|
|
2817
|
-
})
|
|
2761
|
+
})
|
|
2818
2762
|
);
|
|
2819
2763
|
var ActionConfig = z24.discriminatedUnion("type", [
|
|
2820
2764
|
/*
|
|
@@ -2825,18 +2769,6 @@ var ActionConfig = z24.discriminatedUnion("type", [
|
|
|
2825
2769
|
id: "ReadActionConfig",
|
|
2826
2770
|
description: "Configuration for the read action \u2014 defines the record-tab content displayed on the event overview page."
|
|
2827
2771
|
}),
|
|
2828
|
-
AssignConfig.meta({
|
|
2829
|
-
id: "AssignActionConfig",
|
|
2830
|
-
description: "Configuration for assigning a record to the current user."
|
|
2831
|
-
}),
|
|
2832
|
-
UnassignConfig.meta({
|
|
2833
|
-
id: "UnassignActionConfig",
|
|
2834
|
-
description: "Configuration for unassigning a record from its current assignee."
|
|
2835
|
-
}),
|
|
2836
|
-
DeleteConfig.meta({
|
|
2837
|
-
id: "DeleteActionConfig",
|
|
2838
|
-
description: "Configuration for deleting a draft record."
|
|
2839
|
-
}),
|
|
2840
2772
|
NotifyConfig.meta({
|
|
2841
2773
|
id: "NotifyActionConfig",
|
|
2842
2774
|
description: "Configuration for the notify action. When present, NOTIFY uses this config independently from DECLARE. When absent, NOTIFY falls back to the DeclareActionConfig."
|
|
@@ -2845,18 +2777,6 @@ var ActionConfig = z24.discriminatedUnion("type", [
|
|
|
2845
2777
|
id: "DeclareActionConfig",
|
|
2846
2778
|
description: "Configuration for the declare action. Includes review-page fields. NOTIFY falls back to this config when no dedicated NotifyActionConfig is provided."
|
|
2847
2779
|
}),
|
|
2848
|
-
DuplicateDetectedConfig.meta({
|
|
2849
|
-
id: "DuplicateDetectedActionConfig",
|
|
2850
|
-
description: "Configuration for the system-generated duplicate-detection action. Never shown as a button, so it only supports flags \u2014 not label, icon, or conditionals."
|
|
2851
|
-
}),
|
|
2852
|
-
MarkAsDuplicateConfig.meta({
|
|
2853
|
-
id: "MarkAsDuplicateActionConfig",
|
|
2854
|
-
description: "Configuration for marking a record as a duplicate."
|
|
2855
|
-
}),
|
|
2856
|
-
MarkAsNotDuplicateConfig.meta({
|
|
2857
|
-
id: "MarkAsNotDuplicateActionConfig",
|
|
2858
|
-
description: "Configuration for marking a record as not a duplicate, after it was previously flagged as one."
|
|
2859
|
-
}),
|
|
2860
2780
|
RejectConfig.meta({
|
|
2861
2781
|
id: "RejectActionConfig",
|
|
2862
2782
|
description: "Configuration for rejecting a record before registration."
|
|
@@ -2873,14 +2793,6 @@ var ActionConfig = z24.discriminatedUnion("type", [
|
|
|
2873
2793
|
id: "RequestCorrectionActionConfig",
|
|
2874
2794
|
description: "Configuration for requesting a correction on a registered record."
|
|
2875
2795
|
}),
|
|
2876
|
-
ApproveCorrectionConfig.meta({
|
|
2877
|
-
id: "ApproveCorrectionActionConfig",
|
|
2878
|
-
description: "Configuration for approving a requested correction."
|
|
2879
|
-
}),
|
|
2880
|
-
RejectCorrectionConfig.meta({
|
|
2881
|
-
id: "RejectCorrectionActionConfig",
|
|
2882
|
-
description: "Configuration for rejecting a requested correction."
|
|
2883
|
-
}),
|
|
2884
2796
|
EditActionConfig.meta({
|
|
2885
2797
|
id: "EditActionConfig",
|
|
2886
2798
|
description: "Configuration for editing a record before registration."
|
|
@@ -4008,7 +3920,7 @@ function validateActionFlags(event2, ctx) {
|
|
|
4008
3920
|
const isInherentFlag = (value) => Object.values(InherentFlags).includes(value);
|
|
4009
3921
|
const configuredFlagIds = event2.flags.map((flag) => flag.id);
|
|
4010
3922
|
const actionFlagIds = event2.actions.flatMap(
|
|
4011
|
-
(action) =>
|
|
3923
|
+
(action) => action.flags.map((flag) => flag.id)
|
|
4012
3924
|
);
|
|
4013
3925
|
for (const actionFlagId of actionFlagIds) {
|
|
4014
3926
|
const isConfigured = configuredFlagIds.includes(actionFlagId);
|
|
Binary file
|
package/package.json
CHANGED
|
Binary file
|