37 lines
819 B
TypeScript
37 lines
819 B
TypeScript
import { DeviceType } from '@ucap-webmessenger/core';
|
|
import {
|
|
APIRequest,
|
|
APIResponse,
|
|
APIEncoder,
|
|
APIDecoder,
|
|
ParameterUtil
|
|
} from '@ucap-webmessenger/api';
|
|
|
|
export interface FileProfileSaveRequest extends APIRequest {
|
|
userSeq: string;
|
|
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;
|
|
};
|