"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SocialNetworkWhatsappsValidator = void 0;
const express_validator_1 = require("express-validator");
const validator_handle_1 = require("../../utils/handlers/validator.handle");
const abstract_validator_1 = require("../abstract.validator");
class SocialNetworkWhatsappsValidator extends abstract_validator_1.AbstractValidator {
    constructor() {
        super();
    }
    session() {
        return [
            (0, express_validator_1.check)("id").exists().isString(),
            (req, res, next) => {
                (0, validator_handle_1.validateResult)(req, res, next);
            },
        ];
    }
    connect() {
        return [
            (0, express_validator_1.check)("username").exists().isString(),
            (0, express_validator_1.check)("provider_id").exists().isMongoId(),
            (req, res, next) => {
                (0, validator_handle_1.validateResult)(req, res, next);
            },
        ];
    }
    sendMessages() {
        return [
            (0, express_validator_1.check)("username").exists().isString(),
            (0, express_validator_1.check)("list").exists().isArray({ min: 1 }),
            (0, express_validator_1.check)("list.*.number").exists().isString(),
            (0, express_validator_1.check)("list.*.message").exists().isString(),
            (0, express_validator_1.check)("list.*.options").optional().isObject(),
            (req, res, next) => {
                (0, validator_handle_1.validateResult)(req, res, next);
            },
        ];
    }
    sendPhotos() {
        return [
            (0, express_validator_1.check)("username").exists().isString(),
            (0, express_validator_1.check)("list").exists().isArray({ min: 1 }),
            (0, express_validator_1.check)("list.*.number").exists().isString(),
            (0, express_validator_1.check)("list.*.message").exists().isString(),
            (0, express_validator_1.check)("list.*.options").optional().isObject(),
            (req, res, next) => {
                (0, validator_handle_1.validateResult)(req, res, next);
            },
        ];
    }
    sendVideos() {
        return [
            (0, express_validator_1.check)("username").exists().isString(),
            (0, express_validator_1.check)("list").exists().isArray({ min: 1 }),
            (0, express_validator_1.check)("list.*.number").exists().isString(),
            (0, express_validator_1.check)("list.*.message").exists().isString(),
            (0, express_validator_1.check)("list.*.options").optional().isObject(),
            (req, res, next) => {
                (0, validator_handle_1.validateResult)(req, res, next);
            },
        ];
    }
    sendAudios() {
        return [
            (0, express_validator_1.check)("username").exists().isString(),
            (0, express_validator_1.check)("list").exists().isArray({ min: 1 }),
            (0, express_validator_1.check)("list.*.number").exists().isString(),
            (0, express_validator_1.check)("list.*.message").exists().isString(),
            (0, express_validator_1.check)("list.*.options").optional().isObject(),
            (req, res, next) => {
                (0, validator_handle_1.validateResult)(req, res, next);
            },
        ];
    }
    createItem() {
        return [
            (req, res, next) => {
                (0, validator_handle_1.validateResult)(req, res, next);
            },
        ];
    }
    updateItem() {
        return [
            (0, express_validator_1.check)("_id").exists().isMongoId(),
            (req, res, next) => {
                (0, validator_handle_1.validateResult)(req, res, next);
            },
        ];
    }
}
exports.SocialNetworkWhatsappsValidator = SocialNetworkWhatsappsValidator;
