2019-09-18 15:02:21 +09:00
|
|
|
import { DeviceType } from '@ucap-webmessenger/core';
|
2019-09-20 11:39:09 +09:00
|
|
|
import {
|
|
|
|
APIRequest,
|
|
|
|
APIResponse,
|
|
|
|
APIEncoder,
|
|
|
|
APIDecoder,
|
|
|
|
ParameterUtil
|
|
|
|
} from '@ucap-webmessenger/api';
|
2019-09-18 15:02:21 +09:00
|
|
|
|
|
|
|
export interface TranslationSaveRequest extends APIRequest {
|
|
|
|
userSeq: string;
|
|
|
|
deviceType: DeviceType;
|
|
|
|
token: string;
|
|
|
|
roomId?: string;
|
|
|
|
original?: string;
|
|
|
|
srcLocale: string;
|
|
|
|
destLocale: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface TranslationSaveResponse extends APIResponse {
|
|
|
|
EventTransSeq?: string;
|
|
|
|
RoomID?: string;
|
|
|
|
RegDate?: string;
|
|
|
|
SrcLocale?: string;
|
|
|
|
DestLocale?: string;
|
|
|
|
Original?: string;
|
|
|
|
Translation?: string;
|
|
|
|
}
|
2019-09-20 11:39:09 +09:00
|
|
|
|
|
|
|
const translationSaveEncodeMap = {};
|
|
|
|
|
|
|
|
export const encodeTranslationSave: APIEncoder<TranslationSaveRequest> = (
|
|
|
|
req: TranslationSaveRequest
|
|
|
|
) => {
|
|
|
|
return ParameterUtil.encode(translationSaveEncodeMap, req);
|
|
|
|
};
|
|
|
|
|
|
|
|
export const decodeTranslationSave: APIDecoder<TranslationSaveResponse> = (
|
|
|
|
res: any
|
|
|
|
) => {
|
|
|
|
return {} as TranslationSaveResponse;
|
|
|
|
};
|