2019-11-09 21:56:11 +09:00

39 lines
896 B
TypeScript

import { DeviceType } from '@ucap-webmessenger/core';
import {
APIRequest,
APIResponse,
APIEncoder,
APIDecoder,
ParameterUtil
} from '@ucap-webmessenger/api';
export interface TranslationReqRequest extends APIRequest {
userSeq: number;
deviceType: DeviceType;
token: string;
original: string;
srcLocale: string;
destLocale: string;
}
export interface TranslationReqResponse extends APIResponse {
SrcLocale?: string;
DestLocale?: string;
Original?: string;
Translation?: string;
}
const translationReqEncodeMap = {};
export const encodeTranslationReq: APIEncoder<TranslationReqRequest> = (
req: TranslationReqRequest
) => {
return ParameterUtil.encode(translationReqEncodeMap, req);
};
export const decodeTranslationReq: APIDecoder<TranslationReqResponse> = (
res: any
) => {
return {} as TranslationReqResponse;
};