"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ExecuteActionRequestSchema = void 0; var _configSchema = require("@kbn/config-schema"); var _base = require("./common/base"); /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ const ExecuteActionRequestSchema = { body: _configSchema.schema.object({ ..._base.BaseActionRequestSchema, parameters: _configSchema.schema.object({ command: _configSchema.schema.string({ minLength: 1, validate: value => { if (!value.trim().length) { return 'command cannot be an empty string'; } } }), /** * The max timeout value before the command is killed. Number represents milliseconds */ timeout: _configSchema.schema.maybe(_configSchema.schema.number({ min: 1 })) }) }) }; exports.ExecuteActionRequestSchema = ExecuteActionRequestSchema;