import { DeviceType } from '@ucap-webmessenger/core';
import {
  APIRequest,
  APIResponse,
  APIEncoder,
  APIDecoder,
  ParameterUtil
} from '@ucap-webmessenger/api';

export interface FileTalkSaveRequest extends APIRequest {
  userSeq: string;
  deviceType: DeviceType;
  token: string;
  file?: File;
  fileName?: string;
  thumb?: File;
  voice?: boolean;
  voiceTime?: string;
  roomId?: string;
  type?: string;
}

export interface FileTalkSaveResponse extends APIResponse {
  RoomID?: string;
  FileName?: string;
  FileExt?: string;
  FileType?: string;
  ThumbURL?: string;
  AttSEQ?: string;
  AttSize?: string;
  AttRegDate?: string;
  ImageWidth?: string;
  ImageHeight?: string;
  CompanyCode?: string;
  VoiceTime?: string;
  SynapKey?: string;
}

const fileTalkSaveEncodeMap = {};

export const encodeFileTalkSave: APIEncoder<FileTalkSaveRequest> = (
  req: FileTalkSaveRequest
) => {
  return ParameterUtil.encode(fileTalkSaveEncodeMap, req);
};

export const decodeFileTalkSave: APIDecoder<FileTalkSaveResponse> = (
  res: any
) => {
  return {} as FileTalkSaveResponse;
};
