@@ -53,59 +53,45 @@ const DeclarationActionBase = ActionConfigBase.extend({
5353 deduplication : DeduplicationConfig . optional ( )
5454} )
5555
56- const ReadActionConfig = ActionConfigBase . extend (
57- z . object ( {
58- type : z . literal ( ActionType . READ ) ,
59- review : DeclarationReviewConfig . describe (
60- 'Configuration of the review page for read-only view.'
61- ) ,
62- conditionals : z
63- . never ( )
64- . optional ( )
65- . describe ( 'Read-action can not be disabled or hidden with conditionals.' )
66- } ) . shape
67- )
56+ const ReadActionConfig = ActionConfigBase . extend ( {
57+ type : z . literal ( ActionType . READ ) ,
58+ review : DeclarationReviewConfig . describe (
59+ 'Configuration of the review page for read-only view.'
60+ ) ,
61+ conditionals : z
62+ . never ( )
63+ . optional ( )
64+ . describe ( 'Read-action can not be disabled or hidden with conditionals.' )
65+ } )
6866
69- const DeclareConfig = DeclarationActionBase . extend (
70- z . object ( {
71- type : z . literal ( ActionType . DECLARE ) ,
72- review : DeclarationReviewConfig . describe (
73- 'Configuration of the review page fields.'
74- )
75- } ) . shape
76- )
67+ const DeclareConfig = DeclarationActionBase . extend ( {
68+ type : z . literal ( ActionType . DECLARE ) ,
69+ review : DeclarationReviewConfig . describe (
70+ 'Configuration of the review page fields.'
71+ )
72+ } )
7773
78- const RejectConfig = ActionConfigBase . extend (
79- z . object ( {
80- type : z . literal ( ActionType . REJECT )
81- } ) . shape
82- )
74+ const RejectConfig = ActionConfigBase . extend ( {
75+ type : z . literal ( ActionType . REJECT )
76+ } )
8377
84- const ValidateConfig = DeclarationActionBase . extend (
85- z . object ( {
86- type : z . literal ( ActionType . VALIDATE )
87- } ) . shape
88- )
78+ const ValidateConfig = DeclarationActionBase . extend ( {
79+ type : z . literal ( ActionType . VALIDATE )
80+ } )
8981
90- const RegisterConfig = DeclarationActionBase . extend (
91- z . object ( {
92- type : z . literal ( ActionType . REGISTER )
93- } ) . shape
94- )
82+ const RegisterConfig = DeclarationActionBase . extend ( {
83+ type : z . literal ( ActionType . REGISTER )
84+ } )
9585
96- const PrintCertificateActionConfig = ActionConfigBase . extend (
97- z . object ( {
98- type : z . literal ( ActionType . PRINT_CERTIFICATE ) ,
99- printForm : ActionFormConfig
100- } ) . shape
101- )
86+ const PrintCertificateActionConfig = ActionConfigBase . extend ( {
87+ type : z . literal ( ActionType . PRINT_CERTIFICATE ) ,
88+ printForm : ActionFormConfig
89+ } )
10290
103- const RequestCorrectionConfig = ActionConfigBase . extend (
104- z . object ( {
105- type : z . literal ( ActionType . REQUEST_CORRECTION ) ,
106- correctionForm : ActionFormConfig
107- } ) . shape
108- )
91+ const RequestCorrectionConfig = ActionConfigBase . extend ( {
92+ type : z . literal ( ActionType . REQUEST_CORRECTION ) ,
93+ correctionForm : ActionFormConfig
94+ } )
10995
11096const CustomActionConfig = ActionConfigBase . merge (
11197 z . object ( {
@@ -149,7 +135,8 @@ export type ActionConfig = z.infer<typeof ActionConfig>
149135
150136// Build a runtime set directly from the schema
151137export const actionConfigTypes : Set < ActionConfigTypes > = new Set (
152- ActionConfig . options . map ( ( opt ) => opt . shape . type . value )
138+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
139+ ActionConfig . options . map ( ( opt : z . ZodObject < any > ) => opt . shape . type . value )
153140)
154141/**
155142 * Action types that come specifically from the country configuration.
0 commit comments