쪽지 protocol added

This commit is contained in:
leejinho 2019-11-14 10:31:23 +09:00
parent 0fb8a56a90
commit 08331aadc0
13 changed files with 1002 additions and 59 deletions

View File

@ -0,0 +1,39 @@
import {
APIRequest,
APIResponse,
APIEncoder,
APIDecoder,
ParameterUtil
} from '@ucap-webmessenger/api';
import { DeviceType } from '@ucap-webmessenger/core';
import { MessageType } from '../types/message.type';
export interface DelRequest extends APIRequest {
userSeq: number;
deviceType: DeviceType;
tokenKey: string;
type: MessageType;
msgList: { msgId: number }[];
}
export interface DelResponse extends APIResponse {
responseCode: string;
responseMsg: string;
}
const DelEncodeMap = {};
export const encodeDel: APIEncoder<DelRequest> = (req: DelRequest) => {
return ParameterUtil.encode(DelEncodeMap, req);
};
export const decodeDel: APIDecoder<DelResponse> = (res: any) => {
return {
statusCode: res.StatusCode,
errorMessage: res.ErrorMessage,
responseCode: res.responseCode,
responseMsg: res.responseMsg
} as DelResponse;
};

View File

@ -0,0 +1,219 @@
import {
APIRequest,
APIResponse,
APIEncoder,
APIDecoder,
ParameterUtil
} from '@ucap-webmessenger/api';
import { DeviceType } from '@ucap-webmessenger/core';
import { MessageType } from '../types/message.type';
import { CategoryType } from '../types/category.type';
export interface DetailRequest extends APIRequest {
userSeq: number;
deviceType: DeviceType;
tokenKey: string;
type: MessageType;
msgId: number;
}
export interface DetailResponse extends APIResponse {
responseCode: string;
responseMsg: string;
msgInfo: {
msgId: number;
category: CategoryType;
title: string;
titleYn: boolean;
};
content: {
type: MessageType;
sendUserSeq: number;
sendUserName: string;
reservationTime: Date | null;
sendYn: boolean;
regDate: Date;
attachmentYn: boolean;
smsYn: boolean;
fileAllow: string;
}[];
recvList: {
userSeq: number;
userName: string;
cancelYn: boolean;
readDate: Date;
readYn: boolean;
}[];
}
const DetailEncodeMap = {};
export const encodeDetail: APIEncoder<DetailRequest> = (req: DetailRequest) => {
return ParameterUtil.encode(DetailEncodeMap, req);
};
export const decodeDetail: APIDecoder<DetailResponse> = (res: any) => {
return {
statusCode: res.StatusCode,
errorMessage: res.ErrorMessage,
responseCode: res.responseCode,
responseMsg: res.responseMsg,
msgInfo: null,
content: [],
recvList: []
} as DetailResponse;
};
export interface ReadRequest extends APIRequest {
userSeq: number;
deviceType: DeviceType;
tokenKey: string;
type: MessageType;
msgId: number;
}
export interface ReadResponse extends APIResponse {
responseCode: string;
responseMsg: string;
}
const ReadEncodeMap = {};
export const encodeRead: APIEncoder<ReadRequest> = (req: ReadRequest) => {
return ParameterUtil.encode(ReadEncodeMap, req);
};
export const decodeRead: APIDecoder<ReadResponse> = (res: any) => {
return {
statusCode: res.StatusCode,
errorMessage: res.ErrorMessage,
responseCode: res.responseCode,
responseMsg: res.responseMsg
} as ReadResponse;
};
export interface ReadCheckResponse extends APIResponse {
responseCode: string;
responseMsg: string;
recvList: {
userSeq: number;
userName: string;
cancelYn: boolean;
readDate: Date;
readYn: boolean;
}[];
}
export const decodeReadCheck: APIDecoder<ReadCheckResponse> = (res: any) => {
return {
statusCode: res.StatusCode,
errorMessage: res.ErrorMessage,
responseCode: res.responseCode,
responseMsg: res.responseMsg,
recvList: []
} as ReadCheckResponse;
};
export interface CancelRequest extends APIRequest {
userSeq: number;
deviceType: DeviceType;
tokenKey: string;
type: MessageType;
msgId: number;
recvUserList: { userSeq: number }[];
}
export interface CancelResponse extends APIResponse {
responseCode: string;
responseMsg: string;
}
const CancelEncodeMap = {};
export const encodeCancel: APIEncoder<CancelRequest> = (req: CancelRequest) => {
return ParameterUtil.encode(CancelEncodeMap, req);
};
export const decodeCancel: APIDecoder<CancelResponse> = (res: any) => {
return {
statusCode: res.StatusCode,
errorMessage: res.ErrorMessage,
responseCode: res.responseCode,
responseMsg: res.responseMsg
} as CancelResponse;
};
export interface CancelReservationRequest extends APIRequest {
userSeq: number;
deviceType: DeviceType;
tokenKey: string;
type: MessageType;
msgId: number;
}
export interface CancelReservationResponse extends APIResponse {
responseCode: string;
responseMsg: string;
}
const CancelReservationEncodeMap = {};
export const encodeCancelReservation: APIEncoder<CancelReservationRequest> = (
req: CancelReservationRequest
) => {
return ParameterUtil.encode(CancelReservationEncodeMap, req);
};
export const decodeCancelReservation: APIDecoder<CancelReservationResponse> = (
res: any
) => {
return {
statusCode: res.StatusCode,
errorMessage: res.ErrorMessage,
responseCode: res.responseCode,
responseMsg: res.responseMsg
} as CancelReservationResponse;
};
export interface RetrieveResourceFileRequest extends APIRequest {
userSeq: number;
deviceType: DeviceType;
tokenKey: string;
type: MessageType;
msgId: number;
resUrl: string;
}
export interface RetrieveResourceFileResponse extends APIResponse {}
const RetrieveResourceFileEncodeMap = {};
export const encodeRetrieveResourceFile: APIEncoder<RetrieveResourceFileRequest> = (
req: RetrieveResourceFileRequest
) => {
return ParameterUtil.encode(RetrieveResourceFileEncodeMap, req);
};
export const decodeRetrieveResourceFile: APIDecoder<RetrieveResourceFileResponse> = (
res: any
) => {
return {} as RetrieveResourceFileResponse;
};

View File

@ -0,0 +1,51 @@
import {
APIRequest,
APIResponse,
APIEncoder,
APIDecoder,
ParameterUtil
} from '@ucap-webmessenger/api';
import { DeviceType } from '@ucap-webmessenger/core';
import { CategoryType } from '../types/category.type';
import { ContentType } from '../types/content.type';
export interface EditReservationRequest extends APIRequest {
userSeq: number;
deviceType: DeviceType;
tokenKey: string;
msgId: number;
category: CategoryType;
title: string;
titleYn: boolean;
listOrder: ContentType[];
reservationTime: string;
smsYn: boolean;
textContent: { text: string }[];
recvUserList: { userSeq: number; userName: string }[];
}
export interface EditReservationResponse extends APIResponse {
responseCode: string;
responseMsg: string;
}
const EditReservationEncodeMap = {};
export const encodeEditReservation: APIEncoder<EditReservationRequest> = (
req: EditReservationRequest
) => {
return ParameterUtil.encode(EditReservationEncodeMap, req);
};
export const decodeEditReservation: APIDecoder<EditReservationResponse> = (
res: any
) => {
return {
statusCode: res.StatusCode,
errorMessage: res.ErrorMessage,
responseCode: res.responseCode,
responseMsg: res.responseMsg
} as EditReservationResponse;
};

View File

@ -0,0 +1,131 @@
import {
APIRequest,
APIResponse,
APIEncoder,
APIDecoder,
ParameterUtil
} from '@ucap-webmessenger/api';
import { DeviceType } from '@ucap-webmessenger/core';
export interface SaveMyRequest extends APIRequest {
userSeq: number;
deviceType: DeviceType;
tokenKey: string;
userName: string;
message: string;
}
export interface SaveMyResponse extends APIResponse {
responseCode: string;
responseMsg: string;
}
const SaveMyEncodeMap = {};
export const encodeSaveMy: APIEncoder<SaveMyRequest> = (req: SaveMyRequest) => {
return ParameterUtil.encode(SaveMyEncodeMap, req);
};
export const decodeSaveMy: APIDecoder<SaveMyResponse> = (res: any) => {
return {
statusCode: res.StatusCode,
errorMessage: res.ErrorMessage,
responseCode: res.responseCode,
responseMsg: res.responseMsg
} as SaveMyResponse;
};
export interface RetrieveMyRequest extends APIRequest {
userSeq: number;
deviceType: DeviceType;
tokenKey: string;
pageSize: number;
pageCount: number;
}
export interface RetrieveMyResponse extends APIResponse {
responseCode: string;
responseMsg: string;
msgList: {
msgId: number;
message: string;
}[];
}
const RetrieveMyEncodeMap = {};
export const encodeRetrieveMy: APIEncoder<RetrieveMyRequest> = (
req: RetrieveMyRequest
) => {
return ParameterUtil.encode(RetrieveMyEncodeMap, req);
};
export const decodeRetrieveMy: APIDecoder<RetrieveMyResponse> = (res: any) => {
return {
statusCode: res.StatusCode,
errorMessage: res.ErrorMessage,
responseCode: res.responseCode,
responseMsg: res.responseMsg,
msgList: []
} as RetrieveMyResponse;
};
export interface DelMyRequest extends APIRequest {
userSeq: number;
deviceType: DeviceType;
tokenKey: string;
}
export interface DelMyResponse extends APIResponse {
responseCode: string;
responseMsg: string;
}
const DelMyEncodeMap = {};
export const encodeDelMy: APIEncoder<DelMyRequest> = (req: DelMyRequest) => {
return ParameterUtil.encode(DelMyEncodeMap, req);
};
export const decodeDelMy: APIDecoder<DelMyResponse> = (res: any) => {
return {
statusCode: res.StatusCode,
errorMessage: res.ErrorMessage,
responseCode: res.responseCode,
responseMsg: res.responseMsg
} as DelMyResponse;
};
export interface EditMyRequest extends APIRequest {
userSeq: number;
deviceType: DeviceType;
tokenKey: string;
msgId: number;
message: string;
}
export interface EditMyResponse extends APIResponse {
responseCode: string;
responseMsg: string;
}
const EditMyEncodeMap = {};
export const encodeEditMy: APIEncoder<EditMyRequest> = (req: EditMyRequest) => {
return ParameterUtil.encode(EditMyEncodeMap, req);
};
export const decodeEditMy: APIDecoder<EditMyResponse> = (res: any) => {
return {
statusCode: res.StatusCode,
errorMessage: res.ErrorMessage,
responseCode: res.responseCode,
responseMsg: res.responseMsg
} as EditMyResponse;
};

View File

@ -1,49 +0,0 @@
import {
APIRequest,
APIResponse,
APIEncoder,
APIDecoder,
ParameterUtil
} from '@ucap-webmessenger/api';
import { DeviceType } from '@ucap-webmessenger/core';
import { MessageType } from '../types/message.type';
import { MessageList } from '../models/message-list';
export interface RetrieveRequest extends APIRequest {
userSeq: number;
deviceType: DeviceType;
tokenKey: string;
type: MessageType;
pageSize: number;
pageCount: number;
}
export interface RetrieveSendResponse extends APIResponse {
responseCode: string;
responseMsg: string;
totalCount: number;
messageList: MessageList[];
}
const RetrieveSendEncodeMap = {};
export const encodeRetrieve: APIEncoder<RetrieveRequest> = (
req: RetrieveRequest
) => {
return ParameterUtil.encode(RetrieveSendEncodeMap, req);
};
export const decodeRetrieveSend: APIDecoder<RetrieveSendResponse> = (
res: any
) => {
return {
statusCode: res.StatusCode,
errorMessage: res.ErrorMessage,
responseCode: res.responseCode,
responseMsg: res.responseMsg,
totalCount: res.totalCount,
messageList: []
} as RetrieveSendResponse;
};

View File

@ -0,0 +1,100 @@
import {
APIRequest,
APIResponse,
APIEncoder,
APIDecoder,
ParameterUtil
} from '@ucap-webmessenger/api';
import { DeviceType } from '@ucap-webmessenger/core';
import { MessageType } from '../types/message.type';
import { MessageList } from '../models/message-list';
export interface RetrieveRequest extends APIRequest {
userSeq: number;
deviceType: DeviceType;
tokenKey: string;
type: MessageType;
pageSize: number;
pageCount: number;
}
export interface RetrieveSearchRequest extends RetrieveRequest {
searchTitle: string;
searchName: string;
searchContent: string;
}
export interface RetrieveResponse extends APIResponse {
responseCode: string;
responseMsg: string;
totalCount: number;
messageList: MessageList[];
}
const RetrieveEncodeMap = {};
const RetrieveSearchEncodeMap = {};
export const encodeRetrieve: APIEncoder<RetrieveRequest> = (
req: RetrieveRequest
) => {
return ParameterUtil.encode(RetrieveEncodeMap, req);
};
export const encodeRetrieveSearch: APIEncoder<RetrieveResponse> = (
req: RetrieveResponse
) => {
return ParameterUtil.encode(RetrieveSearchEncodeMap, req);
};
export const decodeRetrieveSend: APIDecoder<RetrieveResponse> = (res: any) => {
return {
statusCode: res.StatusCode,
errorMessage: res.ErrorMessage,
responseCode: res.responseCode,
responseMsg: res.responseMsg,
totalCount: res.totalCount,
messageList: []
} as RetrieveResponse;
};
export const decodeRetrieveReceive: APIDecoder<RetrieveResponse> = (
res: any
) => {
return {
statusCode: res.StatusCode,
errorMessage: res.ErrorMessage,
responseCode: res.responseCode,
responseMsg: res.responseMsg,
totalCount: res.totalCount,
messageList: []
} as RetrieveResponse;
};
export const decodeRetrieveReservation: APIDecoder<RetrieveResponse> = (
res: any
) => {
return {
statusCode: res.StatusCode,
errorMessage: res.ErrorMessage,
responseCode: res.responseCode,
responseMsg: res.responseMsg,
totalCount: res.totalCount,
messageList: []
} as RetrieveResponse;
};
export const decodeRetrieveSearch: APIDecoder<RetrieveResponse> = (
res: any
) => {
return {
statusCode: res.StatusCode,
errorMessage: res.ErrorMessage,
responseCode: res.responseCode,
responseMsg: res.responseMsg,
totalCount: res.totalCount,
messageList: []
} as RetrieveResponse;
};

View File

@ -0,0 +1,50 @@
import {
APIRequest,
APIResponse,
APIEncoder,
APIDecoder,
ParameterUtil
} from '@ucap-webmessenger/api';
import { DeviceType } from '@ucap-webmessenger/core';
import { CategoryType } from '../types/category.type';
import { ContentType } from '../types/content.type';
export interface SendCopyRequest extends APIRequest {
userSeq: number;
deviceType: DeviceType;
tokenKey: string;
userName: string;
msgId: number;
category: CategoryType;
title: string;
titleYn: boolean;
listOrder: ContentType[];
reservationTime: string;
smsYn: boolean;
textContent: { text: string }[];
recvUserList: { userSeq: number; userName: string }[];
}
export interface SendCopyResponse extends APIResponse {
responseCode: string;
responseMsg: string;
}
const SendCopyEncodeMap = {};
export const encodeSendCopy: APIEncoder<SendCopyRequest> = (
req: SendCopyRequest
) => {
return ParameterUtil.encode(SendCopyEncodeMap, req);
};
export const decodeSendCopy: APIDecoder<SendCopyResponse> = (res: any) => {
return {
statusCode: res.StatusCode,
errorMessage: res.ErrorMessage,
responseCode: res.responseCode,
responseMsg: res.responseMsg
} as SendCopyResponse;
};

View File

@ -0,0 +1,50 @@
import {
APIRequest,
APIResponse,
APIEncoder,
APIDecoder,
ParameterUtil
} from '@ucap-webmessenger/api';
import { DeviceType } from '@ucap-webmessenger/core';
import { MessageType } from '../types/message.type';
import { CategoryType } from '../types/category.type';
import { ContentType } from '../types/content.type';
export interface SendRequest extends APIRequest {
userSeq: number;
deviceType: DeviceType;
tokenKey: string;
type: MessageType;
userName: string;
category: CategoryType;
title: string;
titleYn: boolean;
listOrder: ContentType[];
reservationTime: string;
smsYn: boolean;
textContent: { text: string }[];
recvUserList: { userSeq: number; userName: string }[];
}
export interface SendResponse extends APIResponse {
responseCode: string;
responseMsg: string;
}
const SendEncodeMap = {};
export const encodeSend: APIEncoder<SendRequest> = (req: SendRequest) => {
return ParameterUtil.encode(SendEncodeMap, req);
};
export const decodeSend: APIDecoder<SendResponse> = (res: any) => {
return {
statusCode: res.StatusCode,
errorMessage: res.ErrorMessage,
responseCode: res.responseCode,
responseMsg: res.responseMsg
} as SendResponse;
};

View File

@ -0,0 +1,42 @@
import {
APIRequest,
APIResponse,
APIEncoder,
APIDecoder,
ParameterUtil
} from '@ucap-webmessenger/api';
import { DeviceType } from '@ucap-webmessenger/core';
export interface UnreadCountRequest extends APIRequest {
userSeq: number;
deviceType: DeviceType;
tokenKey: string;
}
export interface UnreadCountResponse extends APIResponse {
responseCode: string;
responseMsg: string;
unreadCount: number;
}
const UnreadCountEncodeMap = {};
export const encodeUnreadCount: APIEncoder<UnreadCountRequest> = (
req: UnreadCountRequest
) => {
return ParameterUtil.encode(UnreadCountEncodeMap, req);
};
export const decodeUnreadCount: APIDecoder<UnreadCountResponse> = (
res: any
) => {
return {
statusCode: res.StatusCode,
errorMessage: res.ErrorMessage,
responseCode: res.responseCode,
responseMsg: res.responseMsg,
unreadCount: res.unreadCount
} as UnreadCountResponse;
};

View File

@ -14,17 +14,21 @@ export interface MessageList {
/** 메시지 TYPE */
type: MessageType;
/** 수신자의 시퀀스 */
userSeq: number;
userSeq?: number;
/** 수신자 */
userName: string;
/** 수신자 수 */
userCount: number;
userCount?: number;
/** 읽은 사람 수 */
userReadCount: number;
userReadCount?: number;
/** 예약시간 :: DATE 형식은 "yyyy-MM-dd HH:mm:ss" (단 초는 00고정. 예약메일은 분단위까지만) */
reservationTime?: Date;
/** 발신시간 */
regDate: Date;
/** CONTENT 타입 */
resType: ContentType;
/** 첨부파일 존재여부 */
attachmentYn: boolean;
/** 읽음여부 */
readYn?: boolean;
}

View File

@ -10,10 +10,81 @@ import { UrlConfig } from '@ucap-webmessenger/core';
import { Urls } from '../config/urls';
import {
RetrieveRequest,
RetrieveSendResponse,
RetrieveResponse,
encodeRetrieve,
decodeRetrieveSend
} from '../apis/retrieve-send';
decodeRetrieveSend,
decodeRetrieveReceive,
decodeRetrieveReservation,
RetrieveSearchRequest,
decodeRetrieveSearch
} from '../apis/retrieve';
import {
SendRequest,
SendResponse,
encodeSend,
decodeSend
} from '../apis/send';
import {
DetailRequest,
DetailResponse,
encodeDetail,
decodeDetail,
ReadRequest,
ReadResponse,
encodeRead,
decodeRead,
ReadCheckResponse,
decodeReadCheck,
CancelRequest,
CancelResponse,
encodeCancel,
decodeCancel,
CancelReservationRequest,
CancelReservationResponse,
encodeCancelReservation,
decodeCancelReservation,
RetrieveResourceFileRequest,
RetrieveResourceFileResponse,
encodeRetrieveResourceFile,
decodeRetrieveResourceFile
} from '../apis/detail';
import { DelRequest, DelResponse, decodeDel, encodeDel } from '../apis/del';
import {
SaveMyRequest,
SaveMyResponse,
encodeSaveMy,
decodeSaveMy,
RetrieveMyRequest,
RetrieveMyResponse,
encodeRetrieveMy,
decodeRetrieveMy,
DelMyRequest,
DelMyResponse,
encodeDelMy,
decodeDelMy,
EditMyRequest,
EditMyResponse,
encodeEditMy,
decodeEditMy
} from '../apis/my-message';
import {
EditReservationRequest,
EditReservationResponse,
encodeEditReservation,
decodeEditReservation
} from '../apis/edit-reservation-ex';
import {
SendCopyRequest,
SendCopyResponse,
encodeSendCopy,
decodeSendCopy
} from '../apis/send-copy';
import {
UnreadCountRequest,
UnreadCountResponse,
encodeUnreadCount,
decodeUnreadCount
} from '../apis/unread-count';
@Injectable({
providedIn: 'root'
@ -31,9 +102,10 @@ export class MessageApiService {
);
}
/** retrieve */
public retrieveSendMessage(
req: RetrieveRequest
): Observable<RetrieveSendResponse> {
): Observable<RetrieveResponse> {
return this.httpClient
.post<any>(
this.urls.retrieveSendMessageList,
@ -44,4 +116,232 @@ export class MessageApiService {
)
.pipe(map(res => decodeRetrieveSend(res)));
}
public retrieveReceiveMessage(
req: RetrieveRequest
): Observable<RetrieveResponse> {
return this.httpClient
.post<any>(
this.urls.retrieveRecvMessageList,
{},
{
params: encodeRetrieve(req)
}
)
.pipe(map(res => decodeRetrieveReceive(res)));
}
public retrieveReservationMessage(
req: RetrieveRequest
): Observable<RetrieveResponse> {
return this.httpClient
.post<any>(
this.urls.retrieveReservationMessageList,
{},
{
params: encodeRetrieve(req)
}
)
.pipe(map(res => decodeRetrieveReservation(res)));
}
public retrieveSearchMessage(
req: RetrieveSearchRequest
): Observable<RetrieveResponse> {
return this.httpClient
.post<any>(
this.urls.retrieveSearchMessage,
{},
{
params: encodeRetrieve(req)
}
)
.pipe(map(res => decodeRetrieveSearch(res)));
}
/** send */
public sendMessage(req: SendRequest): Observable<SendResponse> {
return this.httpClient
.post<any>(
this.urls.sendNewMessage,
{},
{
params: encodeSend(req)
}
)
.pipe(map(res => decodeSend(res)));
}
/** detail */
public detailMessage(req: DetailRequest): Observable<DetailResponse> {
return this.httpClient
.post<any>(
this.urls.retrieveMessageDetail,
{},
{
params: encodeDetail(req)
}
)
.pipe(map(res => decodeDetail(res)));
}
public readMessage(req: ReadRequest): Observable<ReadResponse> {
return this.httpClient
.post<any>(
this.urls.readMessage,
{},
{
params: encodeRead(req)
}
)
.pipe(map(res => decodeRead(res)));
}
public retrieveReadCheck(req: ReadRequest): Observable<ReadCheckResponse> {
return this.httpClient
.post<any>(
this.urls.retrieveReadCheck,
{},
{
params: encodeRead(req)
}
)
.pipe(map(res => decodeReadCheck(res)));
}
public cancelMessage(req: CancelRequest): Observable<CancelResponse> {
return this.httpClient
.post<any>(
this.urls.cancelMessage,
{},
{
params: encodeCancel(req)
}
)
.pipe(map(res => decodeCancel(res)));
}
public cancelReservationMessage(
req: CancelReservationRequest
): Observable<CancelReservationResponse> {
return this.httpClient
.post<any>(
this.urls.cancelReservationMessage,
{},
{
params: encodeCancelReservation(req)
}
)
.pipe(map(res => decodeCancelReservation(res)));
}
public retrieveResourceFile(
req: RetrieveResourceFileRequest
): Observable<RetrieveResourceFileResponse> {
return this.httpClient
.post<any>(
this.urls.retrieveResourceFile,
{},
{
params: encodeRetrieveResourceFile(req)
}
)
.pipe(map(res => decodeRetrieveResourceFile(res)));
}
/** del */
public deleteMessage(req: DelRequest): Observable<DelResponse> {
return this.httpClient
.post<any>(
this.urls.deleteMessage,
{},
{
params: encodeDel(req)
}
)
.pipe(map(res => decodeDel(res)));
}
/** save my message */
public saveMyMessage(req: SaveMyRequest): Observable<SaveMyResponse> {
return this.httpClient
.post<any>(
this.urls.saveMyMessage,
{},
{
params: encodeSaveMy(req)
}
)
.pipe(map(res => decodeSaveMy(res)));
}
public retrieveMyMessage(
req: RetrieveMyRequest
): Observable<RetrieveMyResponse> {
return this.httpClient
.post<any>(
this.urls.retrieveMyMessage,
{},
{
params: encodeRetrieveMy(req)
}
)
.pipe(map(res => decodeRetrieveMy(res)));
}
public deleteMyMessage(req: DelMyRequest): Observable<DelMyResponse> {
return this.httpClient
.post<any>(
this.urls.deleteMyMessage,
{},
{
params: encodeDelMy(req)
}
)
.pipe(map(res => decodeDelMy(res)));
}
public editMyMessage(req: EditMyRequest): Observable<EditMyResponse> {
return this.httpClient
.post<any>(
this.urls.editMyMessage,
{},
{
params: encodeEditMy(req)
}
)
.pipe(map(res => decodeEditMy(res)));
}
/** edit reservation */
public editReservationMessageEx(
req: EditReservationRequest
): Observable<EditReservationResponse> {
return this.httpClient
.post<any>(
this.urls.editReservationMessageEx,
{},
{
params: encodeEditReservation(req)
}
)
.pipe(map(res => decodeEditReservation(res)));
}
/** send-copy(forward) */
public sendCopyMessage(req: SendCopyRequest): Observable<SendCopyResponse> {
return this.httpClient
.post<any>(
this.urls.sendCopyMessage,
{},
{
params: encodeSendCopy(req)
}
)
.pipe(map(res => decodeSendCopy(res)));
}
/** unread count */
public retrieveUnreadCount(
req: UnreadCountRequest
): Observable<UnreadCountResponse> {
return this.httpClient
.post<any>(
this.urls.retrieveUnreadCount,
{},
{
params: encodeUnreadCount(req)
}
)
.pipe(map(res => decodeUnreadCount(res)));
}
}

View File

@ -1,7 +1,13 @@
/*
* Public API Surface of ucap-webmessenger-api-message
*/
export * from './lib/apis/retrieve-send';
export * from './lib/apis/del';
export * from './lib/apis/detail';
export * from './lib/apis/edit-reservation-ex';
export * from './lib/apis/my-message';
export * from './lib/apis/retrieve';
export * from './lib/apis/send-copy';
export * from './lib/apis/send';
export * from './lib/services/message-api.service';

View File

@ -34,8 +34,8 @@ import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
import { KEY_LOGIN_RES_INFO } from '@app/types/login-res-info.type';
import {
MessageApiService,
RetrieveRequest,
MessageType
MessageType,
RetrieveRequest
} from '@ucap-webmessenger/api-message';
import { DeviceType } from '@ucap-webmessenger/core';
import { StatusCode } from '@ucap-webmessenger/api';