@opencrvs/toolkit 2.0.0-rc.bbcd72a → 2.0.0-rc.bc74505
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/build.sh +2 -2
- package/dist/cli.js +5108 -167
- package/dist/commons/events/ActionConfig.d.ts +0 -176
- package/dist/events/index.js +7 -92
- package/dist/migrations/v2.0/index.js +5144 -88
- package/dist/notification/index.js +3 -91
- package/opencrvs-toolkit-2.0.0-rc.bc74505.tgz +0 -0
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/migrations/v2.1/add-explicit-correction-flags.d.ts +0 -3
- package/dist/migrations/v2.1/add-explicit-correction-flags.d.ts.map +0 -1
- package/dist/migrations/v2.1/add-explicit-correction-flags.js +0 -234
- package/dist/migrations/v2.1/index.d.ts +0 -6
- package/dist/migrations/v2.1/index.d.ts.map +0 -1
- package/dist/migrations/v2.1/index.js +0 -218
- package/opencrvs-toolkit-2.0.0-rc.bbcd72a.tgz +0 -0
|
@@ -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
|
@@ -3238,52 +3238,6 @@ var NotifyConfig = ActionConfigBase.extend(
|
|
|
3238
3238
|
type: z24.literal(ActionType.NOTIFY)
|
|
3239
3239
|
}).shape
|
|
3240
3240
|
);
|
|
3241
|
-
var DuplicateDetectedConfig = ActionConfigBase.extend(
|
|
3242
|
-
z24.object({
|
|
3243
|
-
type: z24.literal(ActionType.DUPLICATE_DETECTED),
|
|
3244
|
-
label: z24.never().optional().describe(
|
|
3245
|
-
"DUPLICATE_DETECTED is system-generated and never shown as a button, so it has no label."
|
|
3246
|
-
),
|
|
3247
|
-
supportingCopy: z24.never().optional(),
|
|
3248
|
-
icon: z24.never().optional().describe(
|
|
3249
|
-
"DUPLICATE_DETECTED is system-generated and never shown as a button, so it has no icon."
|
|
3250
|
-
),
|
|
3251
|
-
conditionals: z24.never().optional().describe(
|
|
3252
|
-
"DUPLICATE_DETECTED is system-generated and never shown as a button, so it cannot be disabled or hidden with conditionals."
|
|
3253
|
-
)
|
|
3254
|
-
}).shape
|
|
3255
|
-
);
|
|
3256
|
-
var MarkAsDuplicateConfig = ActionConfigBase.extend(
|
|
3257
|
-
z24.object({
|
|
3258
|
-
type: z24.literal(ActionType.MARK_AS_DUPLICATE)
|
|
3259
|
-
}).shape
|
|
3260
|
-
);
|
|
3261
|
-
var MarkAsNotDuplicateConfig = ActionConfigBase.extend(
|
|
3262
|
-
z24.object({
|
|
3263
|
-
type: z24.literal(ActionType.MARK_AS_NOT_DUPLICATE)
|
|
3264
|
-
}).shape
|
|
3265
|
-
);
|
|
3266
|
-
var AssignConfig = ActionConfigBase.extend(
|
|
3267
|
-
z24.object({
|
|
3268
|
-
type: z24.literal(ActionType.ASSIGN),
|
|
3269
|
-
flags: z24.never().optional().describe(
|
|
3270
|
-
"ASSIGN is a meta action excluded from flag resolution, so flags configured here would never apply."
|
|
3271
|
-
)
|
|
3272
|
-
}).shape
|
|
3273
|
-
);
|
|
3274
|
-
var UnassignConfig = ActionConfigBase.extend(
|
|
3275
|
-
z24.object({
|
|
3276
|
-
type: z24.literal(ActionType.UNASSIGN),
|
|
3277
|
-
flags: z24.never().optional().describe(
|
|
3278
|
-
"UNASSIGN is a meta action excluded from flag resolution, so flags configured here would never apply."
|
|
3279
|
-
)
|
|
3280
|
-
}).shape
|
|
3281
|
-
);
|
|
3282
|
-
var DeleteConfig = ActionConfigBase.extend(
|
|
3283
|
-
z24.object({
|
|
3284
|
-
type: z24.literal(ActionType.DELETE)
|
|
3285
|
-
}).shape
|
|
3286
|
-
);
|
|
3287
3241
|
var DeclareConfig = DeclarationActionBase.extend(
|
|
3288
3242
|
z24.object({
|
|
3289
3243
|
type: z24.literal(ActionType.DECLARE),
|
|
@@ -3346,17 +3300,7 @@ var RequestCorrectionConfig = ActionConfigBase.extend(
|
|
|
3346
3300
|
correctionForm: ActionFormConfig
|
|
3347
3301
|
}).shape
|
|
3348
3302
|
);
|
|
3349
|
-
var
|
|
3350
|
-
z24.object({
|
|
3351
|
-
type: z24.literal(ActionType.APPROVE_CORRECTION)
|
|
3352
|
-
}).shape
|
|
3353
|
-
);
|
|
3354
|
-
var RejectCorrectionConfig = ActionConfigBase.extend(
|
|
3355
|
-
z24.object({
|
|
3356
|
-
type: z24.literal(ActionType.REJECT_CORRECTION)
|
|
3357
|
-
}).shape
|
|
3358
|
-
);
|
|
3359
|
-
var CustomActionConfig = ActionConfigBase.extend(
|
|
3303
|
+
var CustomActionConfig = ActionConfigBase.merge(
|
|
3360
3304
|
z24.object({
|
|
3361
3305
|
type: z24.literal(ActionType.CUSTOM),
|
|
3362
3306
|
customActionType: z24.string().describe("Type identifier of the custom action."),
|
|
@@ -3367,7 +3311,7 @@ var CustomActionConfig = ActionConfigBase.extend(
|
|
|
3367
3311
|
auditHistoryLabel: TranslationConfig.describe(
|
|
3368
3312
|
'The label to show in audit history for this action. For example "Approved".'
|
|
3369
3313
|
)
|
|
3370
|
-
})
|
|
3314
|
+
})
|
|
3371
3315
|
);
|
|
3372
3316
|
var ActionConfig = z24.discriminatedUnion("type", [
|
|
3373
3317
|
/*
|
|
@@ -3378,18 +3322,6 @@ var ActionConfig = z24.discriminatedUnion("type", [
|
|
|
3378
3322
|
id: "ReadActionConfig",
|
|
3379
3323
|
description: "Configuration for the read action \u2014 defines the record-tab content displayed on the event overview page."
|
|
3380
3324
|
}),
|
|
3381
|
-
AssignConfig.meta({
|
|
3382
|
-
id: "AssignActionConfig",
|
|
3383
|
-
description: "Configuration for assigning a record to the current user."
|
|
3384
|
-
}),
|
|
3385
|
-
UnassignConfig.meta({
|
|
3386
|
-
id: "UnassignActionConfig",
|
|
3387
|
-
description: "Configuration for unassigning a record from its current assignee."
|
|
3388
|
-
}),
|
|
3389
|
-
DeleteConfig.meta({
|
|
3390
|
-
id: "DeleteActionConfig",
|
|
3391
|
-
description: "Configuration for deleting a draft record."
|
|
3392
|
-
}),
|
|
3393
3325
|
NotifyConfig.meta({
|
|
3394
3326
|
id: "NotifyActionConfig",
|
|
3395
3327
|
description: "Configuration for the notify action. When present, NOTIFY uses this config independently from DECLARE. When absent, NOTIFY falls back to the DeclareActionConfig."
|
|
@@ -3398,18 +3330,6 @@ var ActionConfig = z24.discriminatedUnion("type", [
|
|
|
3398
3330
|
id: "DeclareActionConfig",
|
|
3399
3331
|
description: "Configuration for the declare action. Includes review-page fields. NOTIFY falls back to this config when no dedicated NotifyActionConfig is provided."
|
|
3400
3332
|
}),
|
|
3401
|
-
DuplicateDetectedConfig.meta({
|
|
3402
|
-
id: "DuplicateDetectedActionConfig",
|
|
3403
|
-
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."
|
|
3404
|
-
}),
|
|
3405
|
-
MarkAsDuplicateConfig.meta({
|
|
3406
|
-
id: "MarkAsDuplicateActionConfig",
|
|
3407
|
-
description: "Configuration for marking a record as a duplicate."
|
|
3408
|
-
}),
|
|
3409
|
-
MarkAsNotDuplicateConfig.meta({
|
|
3410
|
-
id: "MarkAsNotDuplicateActionConfig",
|
|
3411
|
-
description: "Configuration for marking a record as not a duplicate, after it was previously flagged as one."
|
|
3412
|
-
}),
|
|
3413
3333
|
RejectConfig.meta({
|
|
3414
3334
|
id: "RejectActionConfig",
|
|
3415
3335
|
description: "Configuration for rejecting a record before registration."
|
|
@@ -3426,14 +3346,6 @@ var ActionConfig = z24.discriminatedUnion("type", [
|
|
|
3426
3346
|
id: "RequestCorrectionActionConfig",
|
|
3427
3347
|
description: "Configuration for requesting a correction on a registered record."
|
|
3428
3348
|
}),
|
|
3429
|
-
ApproveCorrectionConfig.meta({
|
|
3430
|
-
id: "ApproveCorrectionActionConfig",
|
|
3431
|
-
description: "Configuration for approving a requested correction."
|
|
3432
|
-
}),
|
|
3433
|
-
RejectCorrectionConfig.meta({
|
|
3434
|
-
id: "RejectCorrectionActionConfig",
|
|
3435
|
-
description: "Configuration for rejecting a requested correction."
|
|
3436
|
-
}),
|
|
3437
3349
|
EditActionConfig.meta({
|
|
3438
3350
|
id: "EditActionConfig",
|
|
3439
3351
|
description: "Configuration for editing a record before registration."
|
|
@@ -4592,6 +4504,9 @@ function getActionConfig({
|
|
|
4592
4504
|
if (a.type === ActionType.CUSTOM && customActionType) {
|
|
4593
4505
|
return a.customActionType === customActionType;
|
|
4594
4506
|
}
|
|
4507
|
+
if (actionType === ActionType.APPROVE_CORRECTION || actionType === ActionType.REJECT_CORRECTION) {
|
|
4508
|
+
return a.type === ActionType.REQUEST_CORRECTION;
|
|
4509
|
+
}
|
|
4595
4510
|
return a.type === actionType;
|
|
4596
4511
|
});
|
|
4597
4512
|
}
|
|
@@ -5745,7 +5660,7 @@ function validateActionFlags(event2, ctx) {
|
|
|
5745
5660
|
const isInherentFlag = (value) => Object.values(InherentFlags).includes(value);
|
|
5746
5661
|
const configuredFlagIds = event2.flags.map((flag2) => flag2.id);
|
|
5747
5662
|
const actionFlagIds = event2.actions.flatMap(
|
|
5748
|
-
(action) =>
|
|
5663
|
+
(action) => action.flags.map((flag2) => flag2.id)
|
|
5749
5664
|
);
|
|
5750
5665
|
for (const actionFlagId of actionFlagIds) {
|
|
5751
5666
|
const isConfigured = configuredFlagIds.includes(actionFlagId);
|
|
@@ -6788,7 +6703,7 @@ function resolveEventCustomFlags(event2, eventConfiguration) {
|
|
|
6788
6703
|
const declaration = aggregateActionDeclarations(eventUpToThisAction);
|
|
6789
6704
|
const annotation = aggregateActionAnnotations(eventUpToThisAction);
|
|
6790
6705
|
const form = { ...declaration, ...annotation };
|
|
6791
|
-
const flagsWithMetConditions =
|
|
6706
|
+
const flagsWithMetConditions = actionConfig.flags.filter(
|
|
6792
6707
|
({ conditional }) => (
|
|
6793
6708
|
// If conditional is not provided, the flag is resolved
|
|
6794
6709
|
conditional ? isFlagConditionMet(conditional, form, action) : true
|