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

export interface FileProfileSaveRequest extends APIRequest {
  userSeq: number;
  deviceType: DeviceType;
  token: string;
  file?: File;
  intro?: string;
  initProfileImage?: boolean;
}

export interface FileProfileSaveResponse extends APIResponse {
  ProfileURL?: string;
  ProfileSubDir?: string;
}

const fileProfileEncodeMap = {};

export const encodeFileProfileSave: APIEncoder<FileProfileSaveRequest> = (
  req: FileProfileSaveRequest
) => {
  return ParameterUtil.encode(fileProfileEncodeMap, req);
};

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