import { PIRequest } from './pi';
import { DeviceType, LocaleCode } from '@ucap-webmessenger/core';
import { APIEncoder, ParameterUtil } from '@ucap-webmessenger/api';

export interface PrivacyTotalRequest extends PIRequest {
  companyCode: string;
  userSeq: number;
  token: string;
  deviceType: DeviceType;
  localeCode: LocaleCode;
  textOnly: string;
}

const privacyTotalEncodeMap = {
  companyCode: 'companyCode',
  userSeq: 'userSeq',
  token: 'tokenKey',
  deviceType: 'deviceType',
  localeCode: 'locale',
  textOnly: 'textOnly'
};

export const encodePrivacyTotal: APIEncoder<PrivacyTotalRequest> = (
  req: PrivacyTotalRequest
) => {
  return ParameterUtil.encode(privacyTotalEncodeMap, req);
};
