"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SocialNetworkInstagramsValidator = 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 SocialNetworkInstagramsValidator 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)("provider_id").exists().isMongoId(),
            (0, express_validator_1.check)("username").exists().isString(),
            (0, express_validator_1.check)("password").exists().isString(),
            (req, res, next) => {
                (0, validator_handle_1.validateResult)(req, res, next);
            },
        ];
    }
    disconnect() {
        return [
            (0, express_validator_1.check)("provider_id").exists().isMongoId(),
            (0, express_validator_1.check)("username").exists().isString(),
            (req, res, next) => {
                (0, validator_handle_1.validateResult)(req, res, next);
            },
        ];
    }
    sendMessages() {
        return [
            (0, express_validator_1.check)("provider_id").exists().isMongoId(),
            (0, express_validator_1.check)("username").exists().isString(),
            (0, express_validator_1.check)("list").exists().isArray({ min: 1 }),
            (0, express_validator_1.check)("list.*.username").exists().isString(),
            (0, express_validator_1.check)("list.*.message").exists().isString(),
            (req, res, next) => {
                (0, validator_handle_1.validateResult)(req, res, next);
            },
        ];
    }
    sendPhotos() {
        return [
            (0, express_validator_1.check)("provider_id").exists().isMongoId(),
            (0, express_validator_1.check)("username").exists().isString(),
            (0, express_validator_1.check)("list").exists().isArray({ min: 1 }),
            (0, express_validator_1.check)("list.*.username").exists().isString(),
            (0, express_validator_1.check)("list.*.url").exists().isString(),
            (req, res, next) => {
                (0, validator_handle_1.validateResult)(req, res, next);
            },
        ];
    }
    sendVideos() {
        return [
            (0, express_validator_1.check)("provider_id").exists().isMongoId(),
            (0, express_validator_1.check)("username").exists().isString(),
            (0, express_validator_1.check)("list").exists().isArray({ min: 1 }),
            (0, express_validator_1.check)("list.*.username").exists().isString(),
            (0, express_validator_1.check)("list.*.url").exists().isString(),
            (req, res, next) => {
                (0, validator_handle_1.validateResult)(req, res, next);
            },
        ];
    }
    sendStories() {
        return [
            (0, express_validator_1.check)("provider_id").exists().isMongoId(),
            (0, express_validator_1.check)("username").exists().isString(),
            (0, express_validator_1.check)("list").exists().isArray({ min: 1 }),
            (0, express_validator_1.check)("list.*.username").exists().isString(),
            (0, express_validator_1.check)("list.*.url").exists().isString(),
            (0, express_validator_1.check)("list.*.url_cover").optional().isString(),
            (req, res, next) => {
                (0, validator_handle_1.validateResult)(req, res, next);
            },
        ];
    }
    sendAudios() {
        return [
            (0, express_validator_1.check)("provider_id").exists().isMongoId(),
            (0, express_validator_1.check)("username").exists().isString(),
            (0, express_validator_1.check)("list").exists().isArray({ min: 1 }),
            (0, express_validator_1.check)("list.*.username").exists().isString(),
            (0, express_validator_1.check)("list.*.url").exists().isString(),
            (req, res, next) => {
                (0, validator_handle_1.validateResult)(req, res, next);
            },
        ];
    }
    publishMultimedia() {
        return [
            (0, express_validator_1.check)("provider_id").exists().isMongoId(),
            (0, express_validator_1.check)("username").exists().isString(),
            (0, express_validator_1.check)("list").exists().isArray({ min: 1 }),
            (0, express_validator_1.check)("list.*.url").exists().isString(),
            (0, express_validator_1.check)("list.*.url_cover").optional().isString(),
            (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.SocialNetworkInstagramsValidator = SocialNetworkInstagramsValidator;
