@@ -79,43 +79,38 @@ const schema = {
7979 } ,
8080 updateElectrificationProject : {
8181 body : Joi . object ( {
82- contact : contactSchema ,
83- project : {
84- activityId : activityId . allow ( null ) ,
85- projectName : Joi . string ( ) . required ( ) . max ( 255 ) . trim ( ) ,
86- companyNameRegistered : Joi . string ( ) . max ( 255 ) . trim ( ) . allow ( null ) ,
87- companyIdRegistered : Joi . string ( ) . max ( 255 ) . trim ( ) . allow ( null ) ,
88- projectType : Joi . string ( )
89- . required ( )
90- . valid ( ...electrificationProjectTypeCodes ) ,
91- bcHydroNumber : Joi . string ( ) . max ( 255 ) . trim ( ) . allow ( null ) ,
92- projectDescription : Joi . when ( 'projectType' , {
93- is : ProjectType . OTHER ,
94- then : Joi . string ( ) . required ( ) . max ( 4000 ) ,
95- otherwise : Joi . string ( ) . max ( 4000 ) . allow ( null )
96- } ) ,
97- electrificationProjectId : uuidv4 . required ( ) ,
98- projectCategory : Joi . string ( )
99- . valid ( ...electrificationProjectCategoryCodes )
100- . allow ( null ) ,
101- assignedUserId : uuidv4 . allow ( null ) ,
102- hasEpa : Joi . string ( )
103- . valid ( ...YES_NO_LIST )
104- . allow ( null ) ,
105- megawatts : Joi . number ( ) . positive ( ) . allow ( null ) ,
106- bcEnvironmentAssessNeeded : Joi . string ( )
107- . valid ( ...YES_NO_LIST )
108- . allow ( null ) ,
109- locationDescription : Joi . string ( ) . max ( 4000 ) . allow ( null ) ,
110- astNotes : Joi . string ( ) . max ( 4000 ) . allow ( null ) ,
111- queuePriority : Joi . number ( ) . integer ( ) . required ( ) . min ( 0 ) . max ( 3 ) ,
112- submissionType : Joi . string ( )
113- . required ( )
114- . valid ( ...SUBMISSION_TYPE_LIST ) ,
115- applicationStatus : Joi . string ( ) . valid ( ...APPLICATION_STATUS_LIST ) ,
116- ...atsValidator . atsEnquirySubmissionFields ,
117- aaiUpdated : Joi . boolean ( ) . required ( )
118- }
82+ projectName : Joi . string ( ) . required ( ) . max ( 255 ) . trim ( ) ,
83+ companyNameRegistered : Joi . string ( ) . max ( 255 ) . trim ( ) . allow ( null ) ,
84+ companyIdRegistered : Joi . string ( ) . max ( 255 ) . trim ( ) . allow ( null ) ,
85+ projectType : Joi . string ( )
86+ . required ( )
87+ . valid ( ...electrificationProjectTypeCodes ) ,
88+ bcHydroNumber : Joi . string ( ) . max ( 255 ) . trim ( ) . allow ( null ) ,
89+ projectDescription : Joi . when ( 'projectType' , {
90+ is : ProjectType . OTHER ,
91+ then : Joi . string ( ) . required ( ) . max ( 4000 ) ,
92+ otherwise : Joi . string ( ) . max ( 4000 ) . allow ( null )
93+ } ) ,
94+ projectCategory : Joi . string ( )
95+ . valid ( ...electrificationProjectCategoryCodes )
96+ . allow ( null ) ,
97+ assignedUserId : uuidv4 . allow ( null ) ,
98+ hasEpa : Joi . string ( )
99+ . valid ( ...YES_NO_LIST )
100+ . allow ( null ) ,
101+ megawatts : Joi . number ( ) . positive ( ) . allow ( null ) ,
102+ bcEnvironmentAssessNeeded : Joi . string ( )
103+ . valid ( ...YES_NO_LIST )
104+ . allow ( null ) ,
105+ locationDescription : Joi . string ( ) . max ( 4000 ) . allow ( null ) ,
106+ astNotes : Joi . string ( ) . max ( 4000 ) . allow ( null ) ,
107+ queuePriority : Joi . number ( ) . integer ( ) . required ( ) . min ( 0 ) . max ( 3 ) ,
108+ submissionType : Joi . string ( )
109+ . required ( )
110+ . valid ( ...SUBMISSION_TYPE_LIST ) ,
111+ applicationStatus : Joi . string ( ) . valid ( ...APPLICATION_STATUS_LIST ) ,
112+ ...atsValidator . atsEnquirySubmissionFields ,
113+ aaiUpdated : Joi . boolean ( ) . required ( )
119114 } ) ,
120115 params : Joi . object ( {
121116 electrificationProjectId : uuidv4 . required ( )
0 commit comments