array( 'type' => 'integer', 'minimum' => 1, 'description' => __( 'Form post ID, from contact-form-7/list-forms.', 'acrossai-abilities-manager' ), ), ); } protected function output_properties(): array { return array( 'form' => array( 'type' => 'object' ), 'config_errors' => array( 'type' => 'array' ), ); } protected function required_input(): array { return array( 'form_id' ); } protected function annotations(): array { return array( 'readonly' => true, 'destructive' => false, 'idempotent' => true, ); } protected function run( array $input ) { $form = Form_Repository::get( absint( $input['form_id'] ?? 0 ) ); if ( is_wp_error( $form ) ) { return $form; } return array( 'form' => Form_Repository::describe( $form ), 'config_errors' => Form_Repository::config_errors( $form ), 'message' => sprintf( /* translators: %s: form title */ __( 'Contact form "%s".', 'acrossai-abilities-manager' ), $form->title() ), ); } }