import { IsNotEmpty, IsString } from "class-validator"; import { ChannelSettingsCommand } from "./ChannelSettingsCommand"; export class ConnectLineChannelCommand extends ChannelSettingsCommand { static readonly commandName = "ConnectLineChannelCommand"; @IsString() @IsNotEmpty() readonly channelName:string; @IsString() @IsNotEmpty() readonly lineChannelId:string; @IsString() @IsNotEmpty() readonly channelSecret:string; @IsString() @IsNotEmpty() readonly accessToken:string; constructor({ tenantId, channelId, channelName, lineChannelId, channelSecret, accessToken }: { tenantId: string; channelId:string; channelName:string; lineChannelId:string; channelSecret:string; accessToken:string; }) { super({ commandName: ConnectLineChannelCommand.commandName, tenantId, channelId }); this.channelName = channelName; this.lineChannelId = lineChannelId; this.channelSecret = channelSecret; this.accessToken = accessToken; } }