+
+
+
User-list-item
+ >
+
+
Organization
+
+
+
+ Tenant Search
+
+
+
+
+
+
+
Chat::MessageBox
+
+
+
+ date splitter
+
+
+
+
+
+
+
+
+
+ information
+
+
+
+
+
+
+
+ mass-translation
+
+
+
+
+
+
+
+
+
+
+
+
+
+ translation
+
+
+
+
+
+
+
+
+ video-conference
+
+
+
+
+
+
diff --git a/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.ts b/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.ts
index 190c8c00..b1738f70 100644
--- a/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.ts
+++ b/projects/ucap-webmessenger-app/src/app/pages/template/components/template.page.component.ts
@@ -8,6 +8,8 @@ import {
TerminalStatusNumber
} from '@ucap-webmessenger/protocol-status';
import { StatusCode } from '@ucap-webmessenger/core';
+import { Router } from '@angular/router';
+import { Company } from '@ucap-webmessenger/api-external';
@Component({
selector: 'app-template.page',
@@ -21,9 +23,17 @@ export class TemplatePageComponent implements OnInit {
presence: StatusBulkInfo = status;
- constructor() {}
+ companyList: Company[] = companyList;
+
+ companyCode: string = 'GUC006';
+
+ constructor(private router: Router) {}
ngOnInit() {}
+
+ onClickLogin() {
+ this.router.navigate(['/account/login']);
+ }
}
export const status: StatusBulkInfo = {
@@ -79,3 +89,182 @@ export const buddyData: UserInfo = {
employeeType: EmployeeType.Regular,
nickName: '채책임(닉)'
};
+
+const companyList: Company[] = [
+ {
+ companyCode: 'GUC002',
+ companyName: 'LG Electronics.',
+ companyDomain: 'lge.com',
+ companyConfAuthYn: 'N',
+ ucapUseYn: 'Y',
+ companyTimerChatAuthYn: 'Y'
+ },
+ {
+ companyCode: 'GUC040',
+ companyName: 'LGE한국영업협력사',
+ companyDomain: 'lgepartner.com',
+ companyConfAuthYn: 'Y',
+ ucapUseYn: 'Y',
+ companyTimerChatAuthYn: 'Y'
+ },
+ {
+ companyCode: 'GUC021',
+ companyName: 'LG이노텍',
+ companyDomain: 'lginnotek.com',
+ companyConfAuthYn: 'N',
+ ucapUseYn: 'Y',
+ companyTimerChatAuthYn: 'Y'
+ },
+ {
+ companyCode: 'GUC036',
+ companyName: '하이프라자',
+ companyDomain: 'hiplaza.co.kr',
+ companyConfAuthYn: 'Y',
+ ucapUseYn: 'Y',
+ companyTimerChatAuthYn: 'Y'
+ },
+ {
+ companyCode: 'GUC006',
+ companyName: 'LG CNS',
+ companyDomain: 'lgcns.com',
+ companyConfAuthYn: 'Y',
+ ucapUseYn: 'Y',
+ companyTimerChatAuthYn: 'Y'
+ },
+ {
+ companyCode: 'GUC041',
+ companyName: 'LGEIL',
+ companyDomain: 'lgeil.com',
+ companyConfAuthYn: 'Y',
+ ucapUseYn: 'Y',
+ companyTimerChatAuthYn: 'Y'
+ },
+ {
+ companyCode: 'GUC100',
+ companyName: 'LG UCAP',
+ companyDomain: 'lgucap.com',
+ companyConfAuthYn: 'Y',
+ ucapUseYn: 'Y',
+ companyTimerChatAuthYn: 'Y'
+ },
+ {
+ companyCode: 'GUCIM',
+ companyName: '아메사용회사',
+ companyDomain: 'test.com',
+ companyConfAuthYn: 'N',
+ ucapUseYn: 'N',
+ companyTimerChatAuthYn: 'Y'
+ },
+ {
+ companyCode: 'GUC005',
+ companyName: 'LG화학',
+ companyDomain: 'lgchem.com',
+ companyConfAuthYn: 'N',
+ ucapUseYn: 'Y',
+ companyTimerChatAuthYn: 'Y'
+ },
+ {
+ companyCode: 'GSGAL',
+ companyName: 'GS칼텍스',
+ companyDomain: 'gscaltex.com',
+ companyConfAuthYn: 'N',
+ ucapUseYn: 'Y',
+ companyTimerChatAuthYn: 'Y'
+ },
+ {
+ companyCode: 'GUC001',
+ companyName: 'LG U+',
+ companyDomain: 'lguplus.com',
+ companyConfAuthYn: 'N',
+ ucapUseYn: 'Y',
+ companyTimerChatAuthYn: 'Y'
+ },
+ {
+ companyCode: 'GUC007',
+ companyName: 'LG Display',
+ companyDomain: 'lgdisplay.com',
+ companyConfAuthYn: 'N',
+ ucapUseYn: 'Y',
+ companyTimerChatAuthYn: 'N'
+ },
+ {
+ companyCode: 'GUC011',
+ companyName: 'LG인화원',
+ companyDomain: 'lgacademy.com',
+ companyConfAuthYn: 'N',
+ ucapUseYn: 'Y',
+ companyTimerChatAuthYn: 'Y'
+ },
+ {
+ companyCode: 'GUC013',
+ companyName: 'LG MMA',
+ companyDomain: 'lgmma.com',
+ companyConfAuthYn: 'N',
+ ucapUseYn: 'Y',
+ companyTimerChatAuthYn: 'Y'
+ },
+ {
+ companyCode: 'GUC015',
+ companyName: '(주)LG',
+ companyDomain: 'lg.com',
+ companyConfAuthYn: 'N',
+ ucapUseYn: 'Y',
+ companyTimerChatAuthYn: 'Y'
+ },
+ {
+ companyCode: 'GUC016',
+ companyName: 'LGERI',
+ companyDomain: 'lgeri.com',
+ companyConfAuthYn: 'N',
+ ucapUseYn: 'Y',
+ companyTimerChatAuthYn: 'Y'
+ },
+ {
+ companyCode: 'GUC024',
+ companyName: 'LG Hausys',
+ companyDomain: 'lghausys.com',
+ companyConfAuthYn: 'N',
+ ucapUseYn: 'Y',
+ companyTimerChatAuthYn: 'Y'
+ },
+ {
+ companyCode: 'GUC028',
+ companyName: 'LG상사',
+ companyDomain: 'lgi.co.kr',
+ companyConfAuthYn: 'N',
+ ucapUseYn: 'Y',
+ companyTimerChatAuthYn: 'Y'
+ },
+ {
+ companyCode: 'GUC032',
+ companyName: '코리아일레콤',
+ companyDomain: 'koreaelecom.com',
+ companyConfAuthYn: 'N',
+ ucapUseYn: 'Y',
+ companyTimerChatAuthYn: 'Y'
+ },
+ {
+ companyCode: 'GUC035',
+ companyName: 'HLDS',
+ companyDomain: 'hlds.co.kr',
+ companyConfAuthYn: 'N',
+ ucapUseYn: 'Y',
+ companyTimerChatAuthYn: 'Y'
+ },
+ {
+ companyCode: 'GUC038',
+ companyName: 'BizTech Partners',
+ companyDomain: 'GUC018',
+ companyConfAuthYn: 'N',
+ ucapUseYn: 'Y',
+ companyTimerChatAuthYn: 'Y'
+ },
+ {
+ companyCode: 'GUC042',
+ companyName: 'Japan R&D Lab',
+ companyDomain: 'lgjlab.com',
+ companyConfAuthYn: 'N',
+ ucapUseYn: 'Y',
+ companyTimerChatAuthYn: 'Y'
+ }
+];
diff --git a/projects/ucap-webmessenger-app/src/app/pages/template/template.page.module.ts b/projects/ucap-webmessenger-app/src/app/pages/template/template.page.module.ts
index 65291d9e..3c543f3e 100644
--- a/projects/ucap-webmessenger-app/src/app/pages/template/template.page.module.ts
+++ b/projects/ucap-webmessenger-app/src/app/pages/template/template.page.module.ts
@@ -3,20 +3,27 @@ import { CommonModule } from '@angular/common';
import { FlexLayoutModule } from '@angular/flex-layout';
+import { MatButtonModule } from '@angular/material/button';
+
+import { UCapUiChatModule } from '@ucap-webmessenger/ui-chat';
import { UCapUiGroupModule } from '@ucap-webmessenger/ui-group';
+import { UCapUiOrganizationModule } from '@ucap-webmessenger/ui-organization';
+import { UCapUiProfileModule } from '@ucap-webmessenger/ui-profile';
import { AppTemplateRoutingPageModule } from './template-routing.page.module';
import { COMPONENTS, MET_MODULES } from './components';
-import { UcapUiProfileModule } from '@ucap-webmessenger/ui-profile';
@NgModule({
imports: [
...MET_MODULES,
CommonModule,
FlexLayoutModule,
+ MatButtonModule,
+ UCapUiChatModule,
UCapUiGroupModule,
- UcapUiProfileModule,
+ UCapUiOrganizationModule,
+ UCapUiProfileModule,
AppTemplateRoutingPageModule
],
declarations: [...COMPONENTS],
diff --git a/projects/ucap-webmessenger-app/src/app/resolvers/messenger.resolver.ts b/projects/ucap-webmessenger-app/src/app/resolvers/messenger.resolver.ts
index 7652158b..d20fadb4 100644
--- a/projects/ucap-webmessenger-app/src/app/resolvers/messenger.resolver.ts
+++ b/projects/ucap-webmessenger-app/src/app/resolvers/messenger.resolver.ts
@@ -4,15 +4,12 @@ import {
ActivatedRouteSnapshot,
RouterStateSnapshot
} from '@angular/router';
-import { Observable, throwError, of, EMPTY, forkJoin } from 'rxjs';
+import { Observable, throwError, forkJoin } from 'rxjs';
import {
map,
tap,
- mergeMap,
catchError,
take,
- exhaustMap,
- concatMap,
switchMap,
withLatestFrom
} from 'rxjs/operators';
@@ -21,17 +18,14 @@ import { Store, select } from '@ngrx/store';
import { ProtocolService } from '@ucap-webmessenger/protocol';
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
-import {
- PublicApiService,
- VersionInfo2Response
-} from '@ucap-webmessenger/api-public';
+import { PublicApiService } from '@ucap-webmessenger/api-public';
import {
LoginInfo,
KEY_LOGIN_INFO,
EnvironmentsInfo,
KEY_ENVIRONMENTS_INFO
-} from '../types';
+} from '@app/types';
import { InnerProtocolService } from '@ucap-webmessenger/protocol-inner';
import {
AuthenticationProtocolService,
@@ -40,16 +34,15 @@ import {
} from '@ucap-webmessenger/protocol-authentication';
import * as AuthenticationStore from '@app/store/account/authentication';
-import { ConnResponse } from 'projects/ucap-webmessenger-protocol-inner/src/lib/models/conn';
-import { PiService } from '@ucap-webmessenger/pi';
import { NGXLogger } from 'ngx-logger';
import { QueryProtocolService } from '@ucap-webmessenger/protocol-query';
import { OptionProtocolService } from '@ucap-webmessenger/protocol-option';
import * as AppStore from '@app/store';
+import * as CompanyStore from '@app/store/setting/company';
import * as VersionInfoStore from '@app/store/setting/version-info';
-import * as OptionStore from '@app/store/setting/option';
-import * as QueryStore from '@app/store/setting/query';
+import * as OptionStore from '@app/store/messenger/option';
+import * as QueryStore from '@app/store/messenger/query';
import * as SyncStore from '@app/store/messenger/sync';
@Injectable()
@@ -58,7 +51,6 @@ export class AppMessengerResolver implements Resolve
{
private store: Store,
private sessionStorageService: SessionStorageService,
private publicApiService: PublicApiService,
- private piService: PiService,
private protocolService: ProtocolService,
private queryProtocolService: QueryProtocolService,
private optionProtocolService: OptionProtocolService,
@@ -72,8 +64,6 @@ export class AppMessengerResolver implements Resolve {
routerStateSnapshot: RouterStateSnapshot
): void | Observable | Promise {
return new Promise((resolve, reject) => {
- let versionInfo2Res: VersionInfo2Response;
- let connRres: ConnResponse;
let loginRes: LoginResponse;
const loginInfo = this.sessionStorageService.get(
@@ -92,13 +82,14 @@ export class AppMessengerResolver implements Resolve {
})
.pipe(
take(1),
+ tap(res => {
+ this.store.dispatch(VersionInfoStore.versionInfo2Success({ res }));
+ }),
switchMap(res => {
- versionInfo2Res = res;
- return this.protocolService.connect(versionInfo2Res.serverIp);
+ return this.protocolService.connect(res.serverIp);
}),
switchMap(() => this.innerProtocolService.conn({})),
switchMap(res => {
- connRres = res;
return this.authenticationProtocolService.login({
loginId: loginInfo.loginId,
loginPw: loginInfo.loginPw,
@@ -119,19 +110,28 @@ export class AppMessengerResolver implements Resolve {
productName: 'EZMessenger'
});
}),
- switchMap(res =>
- forkJoin([
+ switchMap(res => {
+ loginRes = res;
+ return forkJoin([
this.queryProtocolService.auth({
deviceType: environmentsInfo.deviceType
}),
this.optionProtocolService.regView({})
- ])
- ),
- tap(([authRes, regViewRes]) => {
+ ]);
+ }),
+ map(([authRes, regViewRes]) => {
this.store.dispatch(
OptionStore.regViewSuccess({ res: regViewRes })
);
this.store.dispatch(QueryStore.authSuccess({ res: authRes }));
+
+ this.store.dispatch(
+ CompanyStore.companyList({
+ companyGroupCode: 'LG'
+ })
+ );
+
+ // this.store.dispatch(AuthenticationStore.postLogin({ loginRes }));
}),
withLatestFrom(
this.store.pipe(
@@ -139,11 +139,26 @@ export class AppMessengerResolver implements Resolve {
),
this.store.pipe(
select(AppStore.MessengerSelector.SyncSelector.group2SyncDate)
+ ),
+ this.store.pipe(
+ select(AppStore.MessengerSelector.SyncSelector.roomSyncDate)
)
),
- map(([[], buddy2SyncDate, group2SyncDate]) => {
+ map(([_, buddy2SyncDate, group2SyncDate, roomSyncDate]) => {
this.store.dispatch(SyncStore.buddy2({ syncDate: buddy2SyncDate }));
this.store.dispatch(SyncStore.group2({ syncDate: group2SyncDate }));
+ this.store.dispatch(
+ SyncStore.room({
+ syncDate: roomSyncDate,
+ localeCode: loginInfo.localeCode
+ })
+ );
+ this.store.dispatch(
+ QueryStore.dept({
+ divCd: 'ORG',
+ companyCode: loginInfo.companyCode
+ })
+ );
}),
catchError(err => {
return throwError(err);
@@ -153,18 +168,13 @@ export class AppMessengerResolver implements Resolve {
() => {
this.store.dispatch(
AuthenticationStore.loginSuccess({
- loginInfo: loginRes
+ loginRes
})
);
- console.log('next');
resolve();
},
err => {
- console.log('err', err);
reject(err);
- },
- () => {
- console.log('complete');
}
);
});
diff --git a/projects/ucap-webmessenger-app/src/app/services/notification.service.ts b/projects/ucap-webmessenger-app/src/app/services/notification.service.ts
index ff31045b..474bbdb3 100644
--- a/projects/ucap-webmessenger-app/src/app/services/notification.service.ts
+++ b/projects/ucap-webmessenger-app/src/app/services/notification.service.ts
@@ -1,16 +1,15 @@
import { Injectable } from '@angular/core';
-import { filter, tap } from 'rxjs/operators';
+import { tap } from 'rxjs/operators';
import { Store } from '@ngrx/store';
-import { ProtocolService } from '@ucap-webmessenger/protocol';
import {
- SVC_TYPE_LOGOUT,
SSVC_TYPE_LOGOUT_RES,
SSVC_TYPE_LOGOUT_REMOTE_NOTI,
- decodeLogout,
- decodeLogoutRemoteNotification
+ AuthenticationProtocolService,
+ LogoutResponse,
+ LogoutRemoteNotification
} from '@ucap-webmessenger/protocol-authentication';
import * as AuthenticationStore from '../store/account/authentication';
@@ -19,36 +18,29 @@ import { NGXLogger } from 'ngx-logger';
@Injectable()
export class AppNotificationService {
constructor(
- private protocolService: ProtocolService,
+ private authenticationProtocolService: AuthenticationProtocolService,
private store: Store,
private logger: NGXLogger
) {}
public subscribe(): void {
- this.protocolService.serverMessage
+ this.authenticationProtocolService.logoutNotification$
.pipe(
- filter(
- message =>
- message.serviceType === SVC_TYPE_LOGOUT &&
- message.subServiceType === SSVC_TYPE_LOGOUT_RES
- ),
- tap(message => {
- const logoutRes = decodeLogout(message);
- this.logger.debug('logoutRes', logoutRes);
- this.store.dispatch(AuthenticationStore.logout());
- })
- )
- .subscribe();
-
- this.protocolService.serverMessage
- .pipe(
- filter(
- message =>
- message.serviceType === SVC_TYPE_LOGOUT &&
- message.subServiceType === SSVC_TYPE_LOGOUT_REMOTE_NOTI
- ),
- tap(message => {
- const logoutRemoteNoti = decodeLogoutRemoteNotification(message);
+ tap(notiOrRes => {
+ switch (notiOrRes.Type) {
+ case SSVC_TYPE_LOGOUT_RES:
+ {
+ const res = notiOrRes as LogoutResponse;
+ }
+ break;
+ case SSVC_TYPE_LOGOUT_REMOTE_NOTI:
+ {
+ const noti = notiOrRes as LogoutRemoteNotification;
+ }
+ break;
+ default:
+ break;
+ }
this.store.dispatch(AuthenticationStore.logout());
})
)
diff --git a/projects/ucap-webmessenger-app/src/app/store/account/authentication/actions.ts b/projects/ucap-webmessenger-app/src/app/store/account/authentication/actions.ts
index 1e10669f..c87419be 100644
--- a/projects/ucap-webmessenger-app/src/app/store/account/authentication/actions.ts
+++ b/projects/ucap-webmessenger-app/src/app/store/account/authentication/actions.ts
@@ -3,7 +3,11 @@ import { createAction, props } from '@ngrx/store';
import { Login2Response } from '@ucap-webmessenger/pi';
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
-import { LoginInfo } from '../../../types';
+import { LoginInfo } from '@app/types';
+import {
+ UserPasswordSetRequest,
+ UserPasswordSetResponse
+} from '@ucap-webmessenger/protocol-service';
export const webLogin = createAction(
'[Account::Authentication] Web Login',
@@ -30,7 +34,7 @@ export const webLoginFailure = createAction(
export const loginSuccess = createAction(
'[Account::Authentication] Login Success',
props<{
- loginInfo: LoginResponse;
+ loginRes: LoginResponse;
}>()
);
@@ -52,3 +56,47 @@ export const logoutConfirmation = createAction(
export const logoutConfirmationDismiss = createAction(
'[Account::Authentication] Logout Confirmation Dismiss'
);
+
+export const postLogin = createAction(
+ '[Account::Authentication] Post Login',
+ props<{
+ loginRes: LoginResponse;
+ }>()
+);
+
+export const privacyAgree = createAction(
+ '[Account::Authentication] Privacy Agree',
+ props<{
+ loginRes: LoginResponse;
+ }>()
+);
+
+export const privacyAgreeSuccess = createAction(
+ '[Account::Authentication] Privacy Agree Success'
+);
+
+export const privacyAgreeFailure = createAction(
+ '[Account::Authentication] Privacy Agree Failure',
+ props<{ error: any }>()
+);
+
+export const privacyDisagree = createAction(
+ '[Account::Authentication] Privacy Disagree'
+);
+
+export const changePassword = createAction(
+ '[Account::Authentication] Change Password',
+ props<{ req: UserPasswordSetRequest }>()
+);
+
+export const changePasswordSuccess = createAction(
+ '[Account::Authentication] Change Password Success',
+ props<{
+ res: UserPasswordSetResponse;
+ }>()
+);
+
+export const changePasswordFailure = createAction(
+ '[Account::Authentication] Change Password Failure',
+ props<{ error: any }>()
+);
diff --git a/projects/ucap-webmessenger-app/src/app/store/account/authentication/effects.ts b/projects/ucap-webmessenger-app/src/app/store/account/authentication/effects.ts
index a6095306..c0253fd8 100644
--- a/projects/ucap-webmessenger-app/src/app/store/account/authentication/effects.ts
+++ b/projects/ucap-webmessenger-app/src/app/store/account/authentication/effects.ts
@@ -6,7 +6,11 @@ import { catchError, exhaustMap, map, tap, switchMap } from 'rxjs/operators';
import { Actions, ofType, createEffect } from '@ngrx/effects';
-import { PiService, Login2Response } from '@ucap-webmessenger/pi';
+import {
+ PiService,
+ Login2Response,
+ UserTermsActionResponse
+} from '@ucap-webmessenger/pi';
import { NativeService, UCAP_NATIVE_SERVICE } from '@ucap-webmessenger/native';
import {
DialogService,
@@ -22,11 +26,30 @@ import {
logoutConfirmationDismiss,
webLogin,
webLoginSuccess,
- webLoginFailure
+ webLoginFailure,
+ postLogin,
+ privacyAgree,
+ privacyDisagree,
+ privacyAgreeFailure,
+ privacyAgreeSuccess,
+ changePassword,
+ changePasswordFailure,
+ changePasswordSuccess
} from './actions';
-import { LoginInfo } from '../../../types';
-import { AppAuthenticationService } from '../../../services/authentication.service';
+import {
+ LoginInfo,
+ KEY_LOGIN_INFO,
+ EnvironmentsInfo,
+ KEY_ENVIRONMENTS_INFO
+} from '@app/types';
+import { AppAuthenticationService } from '@app/services/authentication.service';
import { NGXLogger } from 'ngx-logger';
+import { Store } from '@ngrx/store';
+import { SessionStorageService } from '@ucap-webmessenger/web-storage';
+import {
+ ServiceProtocolService,
+ UserPasswordSetResponse
+} from '@ucap-webmessenger/protocol-service';
@Injectable()
export class Effects {
@@ -125,11 +148,139 @@ export class Effects {
)
);
+ postLogin$ = createEffect(
+ () =>
+ this.actions$.pipe(
+ ofType(postLogin),
+ map(action => action.loginRes),
+ tap(async loginRes => {
+ const loginInfo = this.sessionStorageService.get(
+ KEY_LOGIN_INFO
+ );
+ const environmentsInfo = this.sessionStorageService.get<
+ EnvironmentsInfo
+ >(KEY_ENVIRONMENTS_INFO);
+
+ if (!loginRes.privateInformationAgree) {
+ const privacyTotalUrl = this.piService.privacyTotalUrl({
+ companyCode: loginInfo.companyCode,
+ userSeq: loginRes.userSeq,
+ token: loginRes.tokenString,
+ deviceType: environmentsInfo.deviceType,
+ localeCode: loginInfo.localeCode,
+ textOnly: 'true'
+ });
+
+ const result = await this.dialogService.open<
+ ConfirmDialogComponent,
+ ConfirmDialogData,
+ ConfirmDialogResult
+ >(ConfirmDialogComponent, {
+ width: '100%',
+ height: '500px',
+ disableClose: true,
+ data: {
+ title: '개인정보 동의'
+ // html: ``
+ }
+ });
+
+ if (result.choice) {
+ this.store.dispatch(privacyAgree({ loginRes }));
+ } else {
+ this.store.dispatch(privacyDisagree());
+ return;
+ }
+ }
+
+ if (!!loginRes.passwordExpired) {
+ const result = await this.dialogService.open<
+ ConfirmDialogComponent,
+ ConfirmDialogData,
+ ConfirmDialogResult
+ >(ConfirmDialogComponent, {
+ width: '100%',
+ height: '500px',
+ disableClose: true,
+ data: {
+ title: '패스워드 만료',
+ message: ''
+ }
+ });
+
+ if (result.choice) {
+ } else {
+ return;
+ }
+ }
+ })
+ ),
+ { dispatch: false }
+ );
+
+ privacyAgree$ = createEffect(() =>
+ this.actions$.pipe(
+ ofType(privacyAgree),
+ map(action => {
+ const loginInfo = this.sessionStorageService.get(
+ KEY_LOGIN_INFO
+ );
+ const environmentsInfo = this.sessionStorageService.get<
+ EnvironmentsInfo
+ >(KEY_ENVIRONMENTS_INFO);
+
+ return {
+ loginInfo,
+ environmentsInfo,
+ loginResponse: action.loginRes
+ };
+ }),
+ exhaustMap(params =>
+ this.piService
+ .userTermsAction({
+ userSeq: params.loginResponse.userSeq,
+ token: params.loginResponse.tokenString,
+ deviceType: params.environmentsInfo.deviceType
+ })
+ .pipe(
+ map((res: UserTermsActionResponse) => {
+ if ('00' !== res.responseCode) {
+ return privacyAgreeFailure({ error: 'Failed' });
+ } else {
+ return privacyAgreeSuccess();
+ }
+ }),
+ catchError(error => of(privacyAgreeFailure({ error })))
+ )
+ )
+ )
+ );
+
+ changePassword$ = createEffect(() =>
+ this.actions$.pipe(
+ ofType(changePassword),
+ map(action => action.req),
+ exhaustMap(req =>
+ this.serviceProtocolService.userPasswordSet(req).pipe(
+ map((res: UserPasswordSetResponse) => {
+ return changePasswordSuccess({
+ res
+ });
+ }),
+ catchError(error => of(changePasswordFailure({ error })))
+ )
+ )
+ )
+ );
+
constructor(
private actions$: Actions,
private router: Router,
+ private store: Store,
+ private sessionStorageService: SessionStorageService,
private piService: PiService,
private appAuthenticationService: AppAuthenticationService,
+ private serviceProtocolService: ServiceProtocolService,
private dialogService: DialogService,
@Inject(UCAP_NATIVE_SERVICE) private nativeService: NativeService,
private logger: NGXLogger
diff --git a/projects/ucap-webmessenger-app/src/app/store/account/authentication/reducers.ts b/projects/ucap-webmessenger-app/src/app/store/account/authentication/reducers.ts
index c67608e3..31016fc3 100644
--- a/projects/ucap-webmessenger-app/src/app/store/account/authentication/reducers.ts
+++ b/projects/ucap-webmessenger-app/src/app/store/account/authentication/reducers.ts
@@ -7,7 +7,7 @@ export const reducer = createReducer(
on(loginSuccess, (state, action) => {
return {
...state,
- loginInfo: action.loginInfo
+ loginRes: action.loginRes
};
})
);
diff --git a/projects/ucap-webmessenger-app/src/app/store/account/authentication/state.ts b/projects/ucap-webmessenger-app/src/app/store/account/authentication/state.ts
index 579cad2a..95b51728 100644
--- a/projects/ucap-webmessenger-app/src/app/store/account/authentication/state.ts
+++ b/projects/ucap-webmessenger-app/src/app/store/account/authentication/state.ts
@@ -3,18 +3,18 @@ import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
// tslint:disable-next-line: no-empty-interface
export interface State {
- loginInfo: LoginResponse | null;
+ loginRes: LoginResponse | null;
}
export const initialState: State = {
- loginInfo: null
+ loginRes: null
};
export function selectors(selector: Selector) {
return {
- loginInfo: createSelector(
+ loginRes: createSelector(
selector,
- (state: State) => state.loginInfo
+ (state: State) => state.loginRes
)
};
}
diff --git a/projects/ucap-webmessenger-app/src/app/store/account/index.ts b/projects/ucap-webmessenger-app/src/app/store/account/index.ts
index bc8bc382..13adc103 100644
--- a/projects/ucap-webmessenger-app/src/app/store/account/index.ts
+++ b/projects/ucap-webmessenger-app/src/app/store/account/index.ts
@@ -2,22 +2,16 @@ import { Type } from '@angular/core';
import { Action, combineReducers, Selector, createSelector } from '@ngrx/store';
import * as AuthenticationStore from './authentication';
-import * as PrivacyStore from './privacy';
export interface State {
authentication: AuthenticationStore.State;
- privacy: PrivacyStore.State;
}
-export const effects: Type[] = [
- AuthenticationStore.Effects,
- PrivacyStore.Effects
-];
+export const effects: Type[] = [AuthenticationStore.Effects];
export function reducers(state: State | undefined, action: Action) {
return combineReducers({
- authentication: AuthenticationStore.reducer,
- privacy: PrivacyStore.reducer
+ authentication: AuthenticationStore.reducer
})(state, action);
}
@@ -28,12 +22,6 @@ export function selectors(selector: Selector) {
selector,
(state: State) => state.authentication
)
- ),
- PrivacySelector: PrivacyStore.selectors(
- createSelector(
- selector,
- (state: State) => state.privacy
- )
)
};
}
diff --git a/projects/ucap-webmessenger-app/src/app/store/account/privacy/actions.ts b/projects/ucap-webmessenger-app/src/app/store/account/privacy/actions.ts
deleted file mode 100644
index b31794d6..00000000
--- a/projects/ucap-webmessenger-app/src/app/store/account/privacy/actions.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createAction, props } from '@ngrx/store';
-
-import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
-
-export const agreeConfirmationNotNeeded = createAction(
- '[Account::Privacy] Agree Confirmation not needed'
-);
-
-export const agreeConfirmationYes = createAction(
- '[Account::Privacy] Agree Confirmation Yes',
- props<{
- loginInfo: LoginResponse;
- }>()
-);
-
-export const agreeConfirmationNo = createAction(
- '[Account::Privacy] Agree Confirmation No'
-);
-
-export const agreeSuccess = createAction('[Account::Privacy] Agree Success');
-
-export const agreeFailure = createAction(
- '[Account::Privacy] Agree Failure',
- props<{ error: any }>()
-);
diff --git a/projects/ucap-webmessenger-app/src/app/store/account/privacy/effects.ts b/projects/ucap-webmessenger-app/src/app/store/account/privacy/effects.ts
deleted file mode 100644
index 1515b66b..00000000
--- a/projects/ucap-webmessenger-app/src/app/store/account/privacy/effects.ts
+++ /dev/null
@@ -1,157 +0,0 @@
-import { Injectable } from '@angular/core';
-import { Router } from '@angular/router';
-
-import { Actions, ofType, createEffect } from '@ngrx/effects';
-
-import { of } from 'rxjs';
-import { catchError, exhaustMap, map } from 'rxjs/operators';
-
-import {
- PiService,
- UserTermsActionResponse,
- ResponseStatus
-} from '@ucap-webmessenger/pi';
-import {
- DialogService,
- ConfirmDialogComponent,
- ConfirmDialogData,
- ConfirmDialogResult
-} from '@ucap-webmessenger/ui';
-
-import { AppAuthenticationService } from '@app/services/authentication.service';
-import { loginSuccess, logout } from '../authentication';
-import {
- agreeConfirmationYes,
- agreeConfirmationNo,
- agreeConfirmationNotNeeded,
- agreeSuccess,
- agreeFailure
-} from './actions';
-import { SessionStorageService } from '@ucap-webmessenger/web-storage';
-import {
- LoginInfo,
- KEY_LOGIN_INFO,
- EnvironmentsInfo,
- KEY_ENVIRONMENTS_INFO
-} from '@app/types';
-
-import { initSettings } from '@app/store/setting/init';
-
-@Injectable()
-export class Effects {
- // agreeConfirmation$ = createEffect(() =>
- // this.actions$.pipe(
- // ofType(loginSuccess),
- // exhaustMap(async params => {
- // if (params.loginInfo.privateInformationAgree) {
- // return null;
- // }
- // const loginInfo = this.sessionStorageService.get(
- // KEY_LOGIN_INFO
- // );
- // const environmentsInfo = this.sessionStorageService.get<
- // EnvironmentsInfo
- // >(KEY_ENVIRONMENTS_INFO);
-
- // const privacyTotalUrl = this.piService.privacyTotalUrl({
- // companyCode: params.loginInfo.companyCode,
- // userSeq: params.loginInfo.userSeq,
- // token: params.loginInfo.tokenString,
- // deviceType: environmentsInfo.deviceType,
- // localeCode: loginInfo.localeCode,
- // textOnly: 'true'
- // });
-
- // const result = await this.dialogService.open<
- // ConfirmDialogComponent,
- // ConfirmDialogData,
- // ConfirmDialogResult
- // >(ConfirmDialogComponent, {
- // width: '100%',
- // height: '500px',
- // disableClose: true,
- // data: {
- // title: '개인정보 동의',
- // html: ``
- // }
- // });
-
- // return {
- // loginInfo: params.loginInfo,
- // choice: result.choice
- // };
- // }),
- // map(params => {
- // if (!params) {
- // return agreeConfirmationNotNeeded();
- // }
-
- // return params.choice
- // ? agreeConfirmationYes({ loginInfo: params.loginInfo })
- // : agreeConfirmationNo();
- // })
- // )
- // );
-
- agreeConfirmationYes$ = createEffect(() =>
- this.actions$.pipe(
- ofType(agreeConfirmationYes),
- map(action => {
- const loginInfo = this.sessionStorageService.get(
- KEY_LOGIN_INFO
- );
- const environmentsInfo = this.sessionStorageService.get<
- EnvironmentsInfo
- >(KEY_ENVIRONMENTS_INFO);
-
- return {
- loginInfo,
- environmentsInfo,
- loginResponse: action.loginInfo
- };
- }),
- exhaustMap(params =>
- this.piService
- .userTermsAction({
- userSeq: params.loginResponse.userSeq,
- token: params.loginResponse.tokenString,
- deviceType: params.environmentsInfo.deviceType
- })
- .pipe(
- map((res: UserTermsActionResponse) => {
- if ('00' !== res.responseCode) {
- return agreeFailure({ error: 'Failed' });
- } else {
- return agreeSuccess();
- }
- }),
- catchError(error => of(agreeFailure({ error })))
- )
- )
- )
- );
-
- agreeSuccess$ = createEffect(() =>
- this.actions$.pipe(
- ofType(agreeSuccess),
- map(() => initSettings())
- )
- );
-
- agreeFailure$ = createEffect(() =>
- this.actions$.pipe(
- ofType(agreeFailure),
- map(action => action),
- map(() => logout())
- )
- );
-
- constructor(
- private actions$: Actions,
- private router: Router,
- private piService: PiService,
- private sessionStorageService: SessionStorageService,
- private appAuthenticationService: AppAuthenticationService,
- private dialogService: DialogService
- ) {}
-}
diff --git a/projects/ucap-webmessenger-app/src/app/store/account/privacy/reducers.ts b/projects/ucap-webmessenger-app/src/app/store/account/privacy/reducers.ts
deleted file mode 100644
index b6a32d37..00000000
--- a/projects/ucap-webmessenger-app/src/app/store/account/privacy/reducers.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import { Action, combineReducers, createReducer, on } from '@ngrx/store';
-import { State, initialState } from './state';
-
-export const reducer = createReducer(initialState);
diff --git a/projects/ucap-webmessenger-app/src/app/store/account/privacy/state.ts b/projects/ucap-webmessenger-app/src/app/store/account/privacy/state.ts
deleted file mode 100644
index e83560d9..00000000
--- a/projects/ucap-webmessenger-app/src/app/store/account/privacy/state.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { Selector, createSelector } from '@ngrx/store';
-import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
-
-// tslint:disable-next-line: no-empty-interface
-export interface State {}
-
-export const initialState: State = {};
-
-export function selectors(selector: Selector) {
- return {};
-}
diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/chat/actions.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/chat/actions.ts
index bc1f34b8..f9505363 100644
--- a/projects/ucap-webmessenger-app/src/app/store/messenger/chat/actions.ts
+++ b/projects/ucap-webmessenger-app/src/app/store/messenger/chat/actions.ts
@@ -2,5 +2,5 @@ import { createAction, props } from '@ngrx/store';
export const selectedRoom = createAction(
'[Messenger::Chat] selectedRoom',
- props<{ roomSeq: number }>()
+ props<{ roomSeq: string }>()
);
diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/chat/state.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/chat/state.ts
index 62a27a94..24114eb8 100644
--- a/projects/ucap-webmessenger-app/src/app/store/messenger/chat/state.ts
+++ b/projects/ucap-webmessenger-app/src/app/store/messenger/chat/state.ts
@@ -1,7 +1,7 @@
import { Selector, createSelector } from '@ngrx/store';
export interface State {
- selectedRoom: number | null;
+ selectedRoom: string | null;
}
export const initialState: State = {
diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/event/actions.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/event/actions.ts
new file mode 100644
index 00000000..f3e10511
--- /dev/null
+++ b/projects/ucap-webmessenger-app/src/app/store/messenger/event/actions.ts
@@ -0,0 +1,51 @@
+import { createAction, props } from '@ngrx/store';
+import {
+ InfoRequest,
+ Info,
+ InfoResponse,
+ SendResponse,
+ SendRequest
+} from '@ucap-webmessenger/protocol-event';
+
+export const info = createAction(
+ '[Messenger::Event] Info',
+ props()
+);
+
+export const infoSuccess = createAction(
+ '[Messenger::Event] Info Success',
+ props<{
+ infoList: Info[];
+ res: InfoResponse;
+ }>()
+);
+
+export const infoFailure = createAction(
+ '[Messenger::Event] Info Failure',
+ props<{ error: any }>()
+);
+
+export const appendInfoList = createAction(
+ '[Messenger::Event] Append InfoList',
+ props<{
+ info: Info;
+ }>()
+);
+
+export const send = createAction(
+ '[Messenger::Event] Send',
+ props<{ senderSeq: number; req: SendRequest }>()
+);
+
+export const sendSuccess = createAction(
+ '[Messenger::Event] Send Success',
+ props<{
+ senderSeq: number;
+ res: SendResponse;
+ }>()
+);
+
+export const sendFailure = createAction(
+ '[Messenger::Event] Send Failure',
+ props<{ error: any }>()
+);
diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/event/effects.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/event/effects.ts
new file mode 100644
index 00000000..fff6aa99
--- /dev/null
+++ b/projects/ucap-webmessenger-app/src/app/store/messenger/event/effects.ts
@@ -0,0 +1,129 @@
+import { Injectable } from '@angular/core';
+
+import { Actions, createEffect, ofType } from '@ngrx/effects';
+
+import { Store } from '@ngrx/store';
+
+import { NGXLogger } from 'ngx-logger';
+
+import { of } from 'rxjs';
+import { tap, switchMap, map, catchError, exhaustMap } from 'rxjs/operators';
+import {
+ InfoData,
+ Info,
+ InfoResponse,
+ EventProtocolService,
+ SSVC_TYPE_EVENT_INFO_DATA,
+ SSVC_TYPE_EVENT_INFO_RES,
+ SendResponse
+} from '@ucap-webmessenger/protocol-event';
+
+import * as ChatStore from '@app/store/messenger/chat';
+
+import {
+ info,
+ infoSuccess,
+ infoFailure,
+ send,
+ sendSuccess,
+ sendFailure,
+ appendInfoList
+} from './actions';
+import { SessionStorageService } from '@ucap-webmessenger/web-storage';
+
+@Injectable()
+export class Effects {
+ selectedRoomForInfo$ = createEffect(() =>
+ this.actions$.pipe(
+ ofType(ChatStore.selectedRoom),
+ map(action => {
+ return info({
+ roomSeq: action.roomSeq,
+ baseSeq: 0,
+ requestCount: 50
+ });
+ })
+ )
+ );
+
+ info$ = createEffect(
+ () => {
+ let infoList: Info[];
+
+ return this.actions$.pipe(
+ ofType(info),
+ tap(() => {
+ infoList = [];
+ }),
+ switchMap(req => {
+ return this.eventProtocolService.info(req).pipe(
+ map(res => {
+ switch (res.Type) {
+ case SSVC_TYPE_EVENT_INFO_DATA:
+ infoList.push(...(res as InfoData).infoList);
+ break;
+ case SSVC_TYPE_EVENT_INFO_RES:
+ this.store.dispatch(
+ infoSuccess({
+ infoList,
+ res: res as InfoResponse
+ })
+ );
+ break;
+ }
+ }),
+ catchError(error => of(infoFailure({ error })))
+ );
+ })
+ );
+ },
+ { dispatch: false }
+ );
+
+ send$ = createEffect(() =>
+ this.actions$.pipe(
+ ofType(send),
+ exhaustMap(action =>
+ this.eventProtocolService.send(action.req).pipe(
+ map((res: SendResponse) => {
+ return sendSuccess({
+ senderSeq: action.senderSeq,
+ res
+ });
+ }),
+ catchError(error => of(sendFailure({ error })))
+ )
+ )
+ )
+ );
+
+ sendSuccess$ = createEffect(
+ () => {
+ return this.actions$.pipe(
+ ofType(sendSuccess),
+ tap(action => {
+ const res = action.res;
+ const appendInfo: Info = {
+ seq: res.seq,
+ type: res.eventType,
+ senderSeq: action.senderSeq,
+ sendDate: res.sendDate,
+ sentMessage: res.message,
+ receiverCount: res.receiverCount
+ };
+
+ this.store.dispatch(appendInfoList({ info: appendInfo }));
+ })
+ );
+ },
+ { dispatch: false }
+ );
+
+ constructor(
+ private actions$: Actions,
+ private store: Store,
+ private eventProtocolService: EventProtocolService,
+ private sessionStorageService: SessionStorageService,
+ private logger: NGXLogger
+ ) {}
+}
diff --git a/projects/ucap-webmessenger-app/src/app/store/account/privacy/index.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/event/index.ts
similarity index 100%
rename from projects/ucap-webmessenger-app/src/app/store/account/privacy/index.ts
rename to projects/ucap-webmessenger-app/src/app/store/messenger/event/index.ts
diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/event/reducers.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/event/reducers.ts
new file mode 100644
index 00000000..58719033
--- /dev/null
+++ b/projects/ucap-webmessenger-app/src/app/store/messenger/event/reducers.ts
@@ -0,0 +1,36 @@
+import { createReducer, on } from '@ngrx/store';
+import { initialState } from './state';
+import { infoSuccess, appendInfoList, info, infoFailure } from './actions';
+
+export const reducer = createReducer(
+ initialState,
+ on(info, (state, action) => {
+ return {
+ ...state,
+ infoListProcessing: true
+ };
+ }),
+
+ on(infoSuccess, (state, action) => {
+ return {
+ ...state,
+ infoList: action.infoList,
+ infoStatus: action.res,
+ infoListProcessing: false
+ };
+ }),
+
+ on(infoFailure, (state, action) => {
+ return {
+ ...state,
+ infoListProcessing: false
+ };
+ }),
+
+ on(appendInfoList, (state, action) => {
+ return {
+ ...state,
+ infoList: [...state.infoList, action.info]
+ };
+ })
+);
diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/event/state.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/event/state.ts
new file mode 100644
index 00000000..42dcda6f
--- /dev/null
+++ b/projects/ucap-webmessenger-app/src/app/store/messenger/event/state.ts
@@ -0,0 +1,31 @@
+import { Selector, createSelector } from '@ngrx/store';
+import { InfoResponse, Info } from '@ucap-webmessenger/protocol-event';
+
+export interface State {
+ infoListProcessing: boolean;
+ infoList: Info[] | null;
+ infoStatus: InfoResponse | null;
+}
+
+export const initialState: State = {
+ infoListProcessing: false,
+ infoList: null,
+ infoStatus: null
+};
+
+export function selectors(selector: Selector) {
+ return {
+ infoListProcessing: createSelector(
+ selector,
+ (state: State) => state.infoListProcessing
+ ),
+ infoList: createSelector(
+ selector,
+ (state: State) => state.infoList
+ ),
+ infoStatus: createSelector(
+ selector,
+ (state: State) => state.infoStatus
+ )
+ };
+}
diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/index.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/index.ts
index 7d85092c..86c65df5 100644
--- a/projects/ucap-webmessenger-app/src/app/store/messenger/index.ts
+++ b/projects/ucap-webmessenger-app/src/app/store/messenger/index.ts
@@ -2,18 +2,41 @@ import { Type } from '@angular/core';
import { Action, combineReducers, Selector, createSelector } from '@ngrx/store';
import * as ChatStore from './chat';
+import * as EventStore from './event';
+import * as OptionStore from './option';
+import * as QueryStore from './query';
+import * as RoomStore from './room';
+import * as StatusStore from './status';
import * as SyncStore from './sync';
export interface State {
chat: ChatStore.State;
+ event: EventStore.State;
+ option: OptionStore.State;
+ query: QueryStore.State;
+ room: RoomStore.State;
+ status: StatusStore.State;
sync: SyncStore.State;
}
-export const effects: Type[] = [ChatStore.Effects, SyncStore.Effects];
+export const effects: Type[] = [
+ ChatStore.Effects,
+ EventStore.Effects,
+ OptionStore.Effects,
+ QueryStore.Effects,
+ RoomStore.Effects,
+ StatusStore.Effects,
+ SyncStore.Effects
+];
export function reducers(state: State | undefined, action: Action) {
return combineReducers({
chat: ChatStore.reducer,
+ event: EventStore.reducer,
+ option: OptionStore.reducer,
+ query: QueryStore.reducer,
+ room: RoomStore.reducer,
+ status: StatusStore.reducer,
sync: SyncStore.reducer
})(state, action);
}
@@ -26,6 +49,36 @@ export function selectors(selector: Selector) {
(state: State) => state.chat
)
),
+ EventSelector: EventStore.selectors(
+ createSelector(
+ selector,
+ (state: State) => state.event
+ )
+ ),
+ OptionSelector: OptionStore.selectors(
+ createSelector(
+ selector,
+ (state: State) => state.option
+ )
+ ),
+ RoomSelector: RoomStore.selectors(
+ createSelector(
+ selector,
+ (state: State) => state.room
+ )
+ ),
+ QuerySelector: QueryStore.selectors(
+ createSelector(
+ selector,
+ (state: State) => state.query
+ )
+ ),
+ StatusSelector: StatusStore.selectors(
+ createSelector(
+ selector,
+ (state: State) => state.status
+ )
+ ),
SyncSelector: SyncStore.selectors(
createSelector(
selector,
diff --git a/projects/ucap-webmessenger-app/src/app/store/setting/option/actions.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/option/actions.ts
similarity index 73%
rename from projects/ucap-webmessenger-app/src/app/store/setting/option/actions.ts
rename to projects/ucap-webmessenger-app/src/app/store/messenger/option/actions.ts
index 1f1e3242..7deb8164 100644
--- a/projects/ucap-webmessenger-app/src/app/store/setting/option/actions.ts
+++ b/projects/ucap-webmessenger-app/src/app/store/messenger/option/actions.ts
@@ -8,31 +8,31 @@ import {
} from '@ucap-webmessenger/protocol-option';
export const regView = createAction(
- '[Setting::Option] RegView',
+ '[Messenger::Option] RegView',
props()
);
export const regViewSuccess = createAction(
- '[Setting::Option] RegView Success',
+ '[Messenger::Option] RegView Success',
props<{ res: RegViewResponse }>()
);
export const regViewFailure = createAction(
- '[Setting::Option] RegView Failure',
+ '[Messenger::Option] RegView Failure',
props<{ error: any }>()
);
export const regUpdate = createAction(
- '[Setting::Option] RegUpdate',
+ '[Messenger::Option] RegUpdate',
props()
);
export const regUpdateSuccess = createAction(
- '[Setting::Option] RegUpdate Success',
+ '[Messenger::Option] RegUpdate Success',
props<{ res: RegUpdateResponse }>()
);
export const regUpdateFailure = createAction(
- '[Setting::Option] RegUpdate Failure',
+ '[Messenger::Option] RegUpdate Failure',
props<{ error: any }>()
);
diff --git a/projects/ucap-webmessenger-app/src/app/store/setting/option/effects.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/option/effects.ts
similarity index 59%
rename from projects/ucap-webmessenger-app/src/app/store/setting/option/effects.ts
rename to projects/ucap-webmessenger-app/src/app/store/messenger/option/effects.ts
index 7cde4fcc..c5780998 100644
--- a/projects/ucap-webmessenger-app/src/app/store/setting/option/effects.ts
+++ b/projects/ucap-webmessenger-app/src/app/store/messenger/option/effects.ts
@@ -6,24 +6,12 @@ import { of } from 'rxjs';
import { catchError, exhaustMap, map, tap } from 'rxjs/operators';
import { regViewSuccess, regViewFailure } from './actions';
-import { initSettings } from '../init';
+
import { OptionProtocolService } from '@ucap-webmessenger/protocol-option';
import { loginSuccess } from '@app/store/account/authentication';
@Injectable()
export class Effects {
- // initSettings$ = createEffect(() =>
- // this.actions$.pipe(
- // ofType(loginSuccess),
- // exhaustMap(() =>
- // this.optionProtocolService.regView({}).pipe(
- // map(res => regViewSuccess({ res })),
- // catchError(error => of(regViewFailure({ error })))
- // )
- // )
- // )
- // );
-
constructor(
private actions$: Actions,
private optionProtocolService: OptionProtocolService
diff --git a/projects/ucap-webmessenger-app/src/app/store/setting/option/index.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/option/index.ts
similarity index 100%
rename from projects/ucap-webmessenger-app/src/app/store/setting/option/index.ts
rename to projects/ucap-webmessenger-app/src/app/store/messenger/option/index.ts
diff --git a/projects/ucap-webmessenger-app/src/app/store/setting/option/reducers.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/option/reducers.ts
similarity index 100%
rename from projects/ucap-webmessenger-app/src/app/store/setting/option/reducers.ts
rename to projects/ucap-webmessenger-app/src/app/store/messenger/option/reducers.ts
diff --git a/projects/ucap-webmessenger-app/src/app/store/setting/option/state.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/option/state.ts
similarity index 89%
rename from projects/ucap-webmessenger-app/src/app/store/setting/option/state.ts
rename to projects/ucap-webmessenger-app/src/app/store/messenger/option/state.ts
index 15b5f587..3cc3cec6 100644
--- a/projects/ucap-webmessenger-app/src/app/store/setting/option/state.ts
+++ b/projects/ucap-webmessenger-app/src/app/store/messenger/option/state.ts
@@ -1,7 +1,6 @@
import { Selector, createSelector } from '@ngrx/store';
import { RegViewResponse } from '@ucap-webmessenger/protocol-option';
-// tslint:disable-next-line: no-empty-interface
export interface State {
reg?: RegViewResponse;
}
diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/query/actions.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/query/actions.ts
new file mode 100644
index 00000000..1030975d
--- /dev/null
+++ b/projects/ucap-webmessenger-app/src/app/store/messenger/query/actions.ts
@@ -0,0 +1,56 @@
+import { createAction, props } from '@ngrx/store';
+
+import {
+ AuthRequest,
+ AuthResponse,
+ DeptRequest,
+ DeptInfo,
+ DeptUserRequest,
+ UserInfoSS,
+ DeptUserResponse
+} from '@ucap-webmessenger/protocol-query';
+
+export const auth = createAction(
+ '[Messenger::Query] Auth',
+ props()
+);
+
+export const authSuccess = createAction(
+ '[Messenger::Query] Auth Success',
+ props<{ res: AuthResponse }>()
+);
+
+export const authFailure = createAction(
+ '[Messenger::Query] Auth Failure',
+ props<{ error: any }>()
+);
+
+export const dept = createAction(
+ '[Messenger::Query] Dept',
+ props()
+);
+
+export const deptSuccess = createAction(
+ '[Messenger::Query] Dept Success',
+ props<{ departmentInfoList: DeptInfo[] }>()
+);
+
+export const deptFailure = createAction(
+ '[Messenger::Query] Dept Failure',
+ props<{ error: any }>()
+);
+
+export const deptUser = createAction(
+ '[Messenger::Query] Dept User',
+ props()
+);
+
+export const deptUserSuccess = createAction(
+ '[Messenger::Query] Dept User Success',
+ props<{ userInfos: UserInfoSS[]; res: DeptUserResponse }>()
+);
+
+export const deptUserFailure = createAction(
+ '[Messenger::Query] Dept User Failure',
+ props<{ error: any }>()
+);
diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/query/effects.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/query/effects.ts
new file mode 100644
index 00000000..72ef7d6b
--- /dev/null
+++ b/projects/ucap-webmessenger-app/src/app/store/messenger/query/effects.ts
@@ -0,0 +1,108 @@
+import { Injectable } from '@angular/core';
+
+import { Actions, ofType, createEffect } from '@ngrx/effects';
+
+import { of } from 'rxjs';
+import { catchError, map, tap, switchMap } from 'rxjs/operators';
+
+import {
+ dept,
+ deptSuccess,
+ deptFailure,
+ deptUser,
+ deptUserSuccess,
+ deptUserFailure
+} from './actions';
+
+import {
+ QueryProtocolService,
+ DeptInfo,
+ SSVC_TYPE_QUERY_DEPT_DATA,
+ SSVC_TYPE_QUERY_DEPT_RES,
+ DeptData,
+ UserInfoSS,
+ SSVC_TYPE_QUERY_DEPT_USER_DATA,
+ DeptUserData,
+ SSVC_TYPE_QUERY_DEPT_USER_RES,
+ DeptUserResponse
+} from '@ucap-webmessenger/protocol-query';
+import { SessionStorageService } from '@ucap-webmessenger/web-storage';
+
+import { Store } from '@ngrx/store';
+
+@Injectable()
+export class Effects {
+ dept$ = createEffect(
+ () => {
+ let departmentInfoList: DeptInfo[];
+
+ return this.actions$.pipe(
+ ofType(dept),
+ tap(() => {
+ departmentInfoList = [];
+ }),
+ switchMap(req => {
+ return this.queryProtocolService.dept(req).pipe(
+ map(res => {
+ switch (res.Type) {
+ case SSVC_TYPE_QUERY_DEPT_DATA:
+ departmentInfoList.push(...(res as DeptData).departmentInfos);
+ break;
+ case SSVC_TYPE_QUERY_DEPT_RES:
+ this.store.dispatch(
+ deptSuccess({
+ departmentInfoList
+ })
+ );
+ break;
+ }
+ }),
+ catchError(error => of(deptFailure({ error })))
+ );
+ })
+ );
+ },
+ { dispatch: false }
+ );
+
+ deptUser$ = createEffect(
+ () => {
+ let userInfos: UserInfoSS[];
+
+ return this.actions$.pipe(
+ ofType(deptUser),
+ tap(() => {
+ userInfos = [];
+ }),
+ switchMap(req => {
+ return this.queryProtocolService.deptUser(req).pipe(
+ map(res => {
+ switch (res.Type) {
+ case SSVC_TYPE_QUERY_DEPT_USER_DATA:
+ userInfos.push(...(res as DeptUserData).userInfos);
+ break;
+ case SSVC_TYPE_QUERY_DEPT_USER_RES:
+ this.store.dispatch(
+ deptUserSuccess({
+ userInfos,
+ res: res as DeptUserResponse
+ })
+ );
+ break;
+ }
+ }),
+ catchError(error => of(deptUserFailure({ error })))
+ );
+ })
+ );
+ },
+ { dispatch: false }
+ );
+
+ constructor(
+ private actions$: Actions,
+ private store: Store,
+ private sessionStorageService: SessionStorageService,
+ private queryProtocolService: QueryProtocolService
+ ) {}
+}
diff --git a/projects/ucap-webmessenger-app/src/app/store/setting/query/index.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/query/index.ts
similarity index 100%
rename from projects/ucap-webmessenger-app/src/app/store/setting/query/index.ts
rename to projects/ucap-webmessenger-app/src/app/store/messenger/query/index.ts
diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/query/reducers.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/query/reducers.ts
new file mode 100644
index 00000000..53314fe9
--- /dev/null
+++ b/projects/ucap-webmessenger-app/src/app/store/messenger/query/reducers.ts
@@ -0,0 +1,28 @@
+import { createReducer, on } from '@ngrx/store';
+import { initialState } from './state';
+import { authSuccess, deptSuccess, deptUserSuccess } from './actions';
+
+export const reducer = createReducer(
+ initialState,
+ on(authSuccess, (state, action) => {
+ return {
+ ...state,
+ auth: action.res
+ };
+ }),
+
+ on(deptSuccess, (state, action) => {
+ return {
+ ...state,
+ departmentInfoList: action.departmentInfoList
+ };
+ }),
+
+ on(deptUserSuccess, (state, action) => {
+ return {
+ ...state,
+ selectedDepartmentUserInfoList: action.userInfos,
+ selectedDepartmentStatus: action.res
+ };
+ })
+);
diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/query/state.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/query/state.ts
new file mode 100644
index 00000000..03340cf0
--- /dev/null
+++ b/projects/ucap-webmessenger-app/src/app/store/messenger/query/state.ts
@@ -0,0 +1,44 @@
+import { Selector, createSelector } from '@ngrx/store';
+import {
+ AuthResponse,
+ DeptInfo,
+ UserInfoSS,
+ DeptUserResponse
+} from '@ucap-webmessenger/protocol-query';
+
+export interface State {
+ auth?: AuthResponse;
+
+ departmentInfoList: DeptInfo[] | null;
+
+ selectedDepartmentUserInfoList: UserInfoSS[] | null;
+ selectedDepartmentStatus: DeptUserResponse | null;
+}
+
+export const initialState: State = {
+ auth: null,
+ departmentInfoList: null,
+ selectedDepartmentUserInfoList: null,
+ selectedDepartmentStatus: null
+};
+
+export function selectors(selector: Selector) {
+ return {
+ auth: createSelector(
+ selector,
+ (state: State) => state.auth
+ ),
+ departmentInfoList: createSelector(
+ selector,
+ (state: State) => state.departmentInfoList
+ ),
+ selectedDepartmentUserInfoList: createSelector(
+ selector,
+ (state: State) => state.selectedDepartmentUserInfoList
+ ),
+ selectedDepartmentStatus: createSelector(
+ selector,
+ (state: State) => state.selectedDepartmentStatus
+ )
+ };
+}
diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/room/actions.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/room/actions.ts
new file mode 100644
index 00000000..c2668f19
--- /dev/null
+++ b/projects/ucap-webmessenger-app/src/app/store/messenger/room/actions.ts
@@ -0,0 +1,26 @@
+import { createAction, props } from '@ngrx/store';
+import {
+ InfoRequest,
+ RoomInfo,
+ UserInfoShort,
+ UserInfo
+} from '@ucap-webmessenger/protocol-room';
+
+export const info = createAction(
+ '[Messenger::Room] Info',
+ props()
+);
+
+export const infoSuccess = createAction(
+ '[Messenger::Room] Info Success',
+ props<{
+ roomInfo: RoomInfo;
+ userInfoShortList: UserInfoShort[];
+ userInfoList: UserInfo[];
+ }>()
+);
+
+export const infoFailure = createAction(
+ '[Messenger::Room] Info Failure',
+ props<{ error: any }>()
+);
diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/room/effects.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/room/effects.ts
new file mode 100644
index 00000000..dc42c58d
--- /dev/null
+++ b/projects/ucap-webmessenger-app/src/app/store/messenger/room/effects.ts
@@ -0,0 +1,101 @@
+import { Injectable } from '@angular/core';
+
+import { Actions, createEffect, ofType } from '@ngrx/effects';
+
+import { Store } from '@ngrx/store';
+
+import { NGXLogger } from 'ngx-logger';
+
+import { of } from 'rxjs';
+import { tap, switchMap, map, catchError } from 'rxjs/operators';
+import {
+ RoomInfo,
+ UserInfoShort,
+ UserInfo,
+ RoomProtocolService,
+ SSVC_TYPE_ROOM_INFO_ROOM,
+ InfoData,
+ SSVC_TYPE_ROOM_INFO_USER,
+ SSVC_TYPE_ROOM_INFO_USER2,
+ SSVC_TYPE_ROOM_INFO_RES,
+ UserShortData,
+ UserData
+} from '@ucap-webmessenger/protocol-room';
+
+import * as ChatStore from '@app/store/messenger/chat';
+
+import { info, infoSuccess, infoFailure } from './actions';
+import { SessionStorageService } from '@ucap-webmessenger/web-storage';
+import { LoginInfo, KEY_LOGIN_INFO } from '@app/types';
+
+@Injectable()
+export class Effects {
+ selectedRoomForInfo$ = createEffect(() =>
+ this.actions$.pipe(
+ ofType(ChatStore.selectedRoom),
+ map(action => {
+ const loginInfo = this.sessionStorageService.get(
+ KEY_LOGIN_INFO
+ );
+ return info({
+ roomSeq: action.roomSeq,
+ isDetail: true,
+ localeCode: loginInfo.localeCode
+ });
+ })
+ )
+ );
+
+ info$ = createEffect(
+ () => {
+ let roomInfo: RoomInfo;
+ let userInfoShortList: UserInfoShort[];
+ let userInfoList: UserInfo[];
+
+ return this.actions$.pipe(
+ ofType(info),
+ tap(() => {
+ roomInfo = null;
+ userInfoShortList = [];
+ userInfoList = [];
+ }),
+ switchMap(req => {
+ return this.roomProtocolService.info(req).pipe(
+ map(res => {
+ switch (res.Type) {
+ case SSVC_TYPE_ROOM_INFO_ROOM:
+ roomInfo = (res as InfoData).roomInfo;
+ break;
+ case SSVC_TYPE_ROOM_INFO_USER:
+ userInfoShortList.push(...(res as UserShortData).userInfos);
+ break;
+ case SSVC_TYPE_ROOM_INFO_USER2:
+ userInfoList.push(...(res as UserData).userInfos);
+ break;
+ case SSVC_TYPE_ROOM_INFO_RES:
+ this.store.dispatch(
+ infoSuccess({
+ roomInfo,
+ userInfoShortList,
+ userInfoList
+ })
+ );
+ break;
+ }
+ }),
+ catchError(error => of(infoFailure({ error })))
+ );
+ })
+ );
+ },
+ { dispatch: false }
+ );
+
+ constructor(
+ private actions$: Actions,
+ private store: Store,
+ private roomProtocolService: RoomProtocolService,
+ private sessionStorageService: SessionStorageService,
+ private logger: NGXLogger
+ ) {}
+}
diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/room/index.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/room/index.ts
new file mode 100644
index 00000000..2663cade
--- /dev/null
+++ b/projects/ucap-webmessenger-app/src/app/store/messenger/room/index.ts
@@ -0,0 +1,4 @@
+export * from './actions';
+export * from './effects';
+export * from './reducers';
+export * from './state';
diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/room/reducers.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/room/reducers.ts
new file mode 100644
index 00000000..daf11df6
--- /dev/null
+++ b/projects/ucap-webmessenger-app/src/app/store/messenger/room/reducers.ts
@@ -0,0 +1,15 @@
+import { createReducer, on } from '@ngrx/store';
+import { initialState } from './state';
+import { infoSuccess } from './actions';
+
+export const reducer = createReducer(
+ initialState,
+ on(infoSuccess, (state, action) => {
+ return {
+ ...state,
+ roomInfo: action.roomInfo,
+ userInfoList: action.userInfoList,
+ userInfoShortList: action.userInfoShortList
+ };
+ })
+);
diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/room/state.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/room/state.ts
new file mode 100644
index 00000000..4662af0a
--- /dev/null
+++ b/projects/ucap-webmessenger-app/src/app/store/messenger/room/state.ts
@@ -0,0 +1,36 @@
+import { Selector, createSelector } from '@ngrx/store';
+import {
+ InfoRequest,
+ RoomInfo,
+ UserInfoShort,
+ UserInfo
+} from '@ucap-webmessenger/protocol-room';
+
+export interface State {
+ roomInfo: RoomInfo | null;
+ userInfoShortList: UserInfoShort[] | null;
+ userInfoList: UserInfo[] | null;
+}
+
+export const initialState: State = {
+ roomInfo: null,
+ userInfoShortList: null,
+ userInfoList: null
+};
+
+export function selectors(selector: Selector) {
+ return {
+ roomInfo: createSelector(
+ selector,
+ (state: State) => state.roomInfo
+ ),
+ userInfoShortList: createSelector(
+ selector,
+ (state: State) => state.userInfoShortList
+ ),
+ userInfoList: createSelector(
+ selector,
+ (state: State) => state.userInfoList
+ )
+ };
+}
diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/status/actions.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/status/actions.ts
new file mode 100644
index 00000000..4dc37685
--- /dev/null
+++ b/projects/ucap-webmessenger-app/src/app/store/messenger/status/actions.ts
@@ -0,0 +1,20 @@
+import { createAction, props } from '@ngrx/store';
+import {
+ BulkInfoRequest,
+ StatusBulkInfo
+} from '@ucap-webmessenger/protocol-status';
+
+export const bulkInfo = createAction(
+ '[Messenger::Status] Bulk Info',
+ props()
+);
+
+export const bulkInfoSuccess = createAction(
+ '[Messenger::Status] Bulk Info Success',
+ props<{ statusBulkInfoList: StatusBulkInfo[] }>()
+);
+
+export const bulkInfoFailure = createAction(
+ '[Messenger::Status] Bulk Info Failure',
+ props<{ error: any }>()
+);
diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/status/effects.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/status/effects.ts
new file mode 100644
index 00000000..60f1c708
--- /dev/null
+++ b/projects/ucap-webmessenger-app/src/app/store/messenger/status/effects.ts
@@ -0,0 +1,77 @@
+import { Injectable } from '@angular/core';
+
+import { Actions, createEffect, ofType } from '@ngrx/effects';
+
+import { Store } from '@ngrx/store';
+
+import { NGXLogger } from 'ngx-logger';
+import * as SyncStore from '@app/store/messenger/sync';
+import { bulkInfo, bulkInfoSuccess, bulkInfoFailure } from './actions';
+import { tap, switchMap, map, catchError } from 'rxjs/operators';
+import {
+ StatusProtocolService,
+ SSVC_TYPE_STATUS_BULK_INFO_DATA,
+ SSVC_TYPE_STATUS_BULK_INFO_RES,
+ BulkInfoData,
+ StatusBulkInfo
+} from '@ucap-webmessenger/protocol-status';
+import { of } from 'rxjs';
+
+@Injectable()
+export class Effects {
+ buddy2SuccessPostBulk$ = createEffect(() =>
+ this.actions$.pipe(
+ ofType(SyncStore.buddy2Success),
+ map(params => {
+ const userSeqList: number[] = [];
+ for (const buddy of params.buddyList) {
+ userSeqList.push(buddy.seq);
+ }
+
+ return bulkInfo({ divCd: 'bulk', userSeqs: userSeqList });
+ })
+ )
+ );
+
+ bulkInfo$ = createEffect(
+ () => {
+ let statusBulkInfoList: StatusBulkInfo[];
+
+ return this.actions$.pipe(
+ ofType(bulkInfo),
+ tap(() => {
+ statusBulkInfoList = [];
+ }),
+ switchMap(req => {
+ return this.statusProtocolService.bulkInfo(req).pipe(
+ map(res => {
+ switch (res.Type) {
+ case SSVC_TYPE_STATUS_BULK_INFO_DATA:
+ statusBulkInfoList.push(
+ ...(res as BulkInfoData).statusBulkInfos
+ );
+ break;
+ case SSVC_TYPE_STATUS_BULK_INFO_RES:
+ this.store.dispatch(
+ bulkInfoSuccess({
+ statusBulkInfoList
+ })
+ );
+ break;
+ }
+ }),
+ catchError(error => of(bulkInfoFailure({ error })))
+ );
+ })
+ );
+ },
+ { dispatch: false }
+ );
+
+ constructor(
+ private actions$: Actions,
+ private store: Store,
+ private statusProtocolService: StatusProtocolService,
+ private logger: NGXLogger
+ ) {}
+}
diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/status/index.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/status/index.ts
new file mode 100644
index 00000000..2663cade
--- /dev/null
+++ b/projects/ucap-webmessenger-app/src/app/store/messenger/status/index.ts
@@ -0,0 +1,4 @@
+export * from './actions';
+export * from './effects';
+export * from './reducers';
+export * from './state';
diff --git a/projects/ucap-webmessenger-app/src/app/store/setting/query/reducers.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/status/reducers.ts
similarity index 57%
rename from projects/ucap-webmessenger-app/src/app/store/setting/query/reducers.ts
rename to projects/ucap-webmessenger-app/src/app/store/messenger/status/reducers.ts
index ec5008a3..91e6f681 100644
--- a/projects/ucap-webmessenger-app/src/app/store/setting/query/reducers.ts
+++ b/projects/ucap-webmessenger-app/src/app/store/messenger/status/reducers.ts
@@ -1,13 +1,13 @@
import { createReducer, on } from '@ngrx/store';
import { initialState } from './state';
-import { authSuccess } from './actions';
+import { bulkInfoSuccess } from './actions';
export const reducer = createReducer(
initialState,
- on(authSuccess, (state, action) => {
+ on(bulkInfoSuccess, (state, action) => {
return {
...state,
- auth: action.res
+ statusBulkInfoList: action.statusBulkInfoList
};
})
);
diff --git a/projects/ucap-webmessenger-app/src/app/store/setting/query/state.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/status/state.ts
similarity index 50%
rename from projects/ucap-webmessenger-app/src/app/store/setting/query/state.ts
rename to projects/ucap-webmessenger-app/src/app/store/messenger/status/state.ts
index 74f75f49..3a0c1767 100644
--- a/projects/ucap-webmessenger-app/src/app/store/setting/query/state.ts
+++ b/projects/ucap-webmessenger-app/src/app/store/messenger/status/state.ts
@@ -1,19 +1,19 @@
import { Selector, createSelector } from '@ngrx/store';
-import { AuthResponse } from '@ucap-webmessenger/protocol-query';
+import { StatusBulkInfo } from '@ucap-webmessenger/protocol-status';
export interface State {
- auth?: AuthResponse;
+ statusBulkInfoList: StatusBulkInfo[];
}
export const initialState: State = {
- auth: null
+ statusBulkInfoList: []
};
export function selectors(selector: Selector) {
return {
- auth: createSelector(
+ statusBulkInfoList: createSelector(
selector,
- (state: State) => state.auth
+ (state: State) => state.statusBulkInfoList
)
};
}
diff --git a/projects/ucap-webmessenger-app/src/app/store/messenger/sync/effects.ts b/projects/ucap-webmessenger-app/src/app/store/messenger/sync/effects.ts
index b938e874..fb4a9e3d 100644
--- a/projects/ucap-webmessenger-app/src/app/store/messenger/sync/effects.ts
+++ b/projects/ucap-webmessenger-app/src/app/store/messenger/sync/effects.ts
@@ -49,7 +49,7 @@ import {
RoomUserDetailData,
RoomResponse
} from '@ucap-webmessenger/protocol-sync';
-import { regViewSuccess } from '@app/store/setting/option';
+import { regViewSuccess } from '@app/store/messenger/option';
import {
RoomInfo,
UserInfoShort,
@@ -127,29 +127,6 @@ export class Effects {
{ dispatch: false }
);
- buddy2SuccessPostRoom$ = createEffect(() =>
- this.actions$.pipe(
- ofType(buddy2Success),
- map(action => {
- const loginInfo = this.sessionStorageService.get(
- KEY_LOGIN_INFO
- );
-
- return loginInfo.localeCode;
- }),
- withLatestFrom(
- this.store.pipe(
- select(state => {
- return state.messenger.sync.roomSyncDate as string;
- })
- )
- ),
- map(([localeCode, roomSyncDate]) =>
- room({ syncDate: roomSyncDate, localeCode })
- )
- )
- );
-
room$ = createEffect(
() => {
let roomList: RoomInfo[];
@@ -203,12 +180,6 @@ export class Effects {
break;
case SSVC_TYPE_SYNC_ROOM_RES:
{
- this.logger.debug(
- 'roomList',
- roomList,
- 'roomUserInfoMap',
- roomUserInfoMap
- );
this.store.dispatch(
roomSuccess({
roomList,
diff --git a/projects/ucap-webmessenger-app/src/app/store/setting/index.ts b/projects/ucap-webmessenger-app/src/app/store/setting/index.ts
index d771110f..e6919574 100644
--- a/projects/ucap-webmessenger-app/src/app/store/setting/index.ts
+++ b/projects/ucap-webmessenger-app/src/app/store/setting/index.ts
@@ -3,23 +3,17 @@ import { Action, combineReducers, Selector, createSelector } from '@ngrx/store';
import * as CompanyStore from './company';
import * as InitStore from './init';
-import * as OptionStore from './option';
-import * as QueryStore from './query';
import * as VersionInfoStore from './version-info';
export interface State {
company: CompanyStore.State;
init: InitStore.State;
- option: OptionStore.State;
- query: QueryStore.State;
versionInfo: VersionInfoStore.State;
}
export const effects: Type[] = [
CompanyStore.Effects,
InitStore.Effects,
- OptionStore.Effects,
- QueryStore.Effects,
VersionInfoStore.Effects
];
@@ -27,8 +21,6 @@ export function reducers(state: State | undefined, action: Action) {
return combineReducers({
company: CompanyStore.reducer,
init: InitStore.reducer,
- option: OptionStore.reducer,
- query: QueryStore.reducer,
versionInfo: VersionInfoStore.reducer
})(state, action);
}
@@ -47,18 +39,6 @@ export function selectors(selector: Selector) {
(state: State) => state.init
)
),
- OptionSelector: OptionStore.selectors(
- createSelector(
- selector,
- (state: State) => state.option
- )
- ),
- QuerySelector: QueryStore.selectors(
- createSelector(
- selector,
- (state: State) => state.query
- )
- ),
VersionInfoSelector: VersionInfoStore.selectors(
createSelector(
selector,
diff --git a/projects/ucap-webmessenger-app/src/app/store/setting/query/actions.ts b/projects/ucap-webmessenger-app/src/app/store/setting/query/actions.ts
deleted file mode 100644
index f0c5f92f..00000000
--- a/projects/ucap-webmessenger-app/src/app/store/setting/query/actions.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { createAction, props } from '@ngrx/store';
-
-import { AuthRequest, AuthResponse } from '@ucap-webmessenger/protocol-query';
-
-export const auth = createAction('[Setting::Query] Auth', props());
-
-export const authSuccess = createAction(
- '[Setting::Query] Auth Success',
- props<{ res: AuthResponse }>()
-);
-
-export const authFailure = createAction(
- '[Setting::Query] Auth Failure',
- props<{ error: any }>()
-);
diff --git a/projects/ucap-webmessenger-app/src/app/store/setting/query/effects.ts b/projects/ucap-webmessenger-app/src/app/store/setting/query/effects.ts
deleted file mode 100644
index cdbc2232..00000000
--- a/projects/ucap-webmessenger-app/src/app/store/setting/query/effects.ts
+++ /dev/null
@@ -1,55 +0,0 @@
-import { Injectable } from '@angular/core';
-
-import { Actions, ofType, createEffect } from '@ngrx/effects';
-
-import { of } from 'rxjs';
-import { catchError, exhaustMap, map, tap } from 'rxjs/operators';
-
-import { authSuccess, authFailure } from './actions';
-import { initSettings } from '../init';
-
-import {
- QueryProtocolService,
- AuthRequest
-} from '@ucap-webmessenger/protocol-query';
-import { SessionStorageService } from '@ucap-webmessenger/web-storage';
-import {
- LoginInfo,
- KEY_LOGIN_INFO,
- EnvironmentsInfo,
- KEY_ENVIRONMENTS_INFO
-} from '@app/types';
-import { loginSuccess } from '@app/store/account/authentication';
-
-@Injectable()
-export class Effects {
- // initSettings$ = createEffect(() =>
- // this.actions$.pipe(
- // ofType(loginSuccess),
- // map(() => {
- // const loginInfo = this.sessionStorageService.get(
- // KEY_LOGIN_INFO
- // );
- // const environmentsInfo = this.sessionStorageService.get<
- // EnvironmentsInfo
- // >(KEY_ENVIRONMENTS_INFO);
-
- // return {
- // deviceType: environmentsInfo.deviceType
- // } as AuthRequest;
- // }),
- // exhaustMap(req =>
- // this.queryProtocolService.auth(req).pipe(
- // map(res => authSuccess({ res })),
- // catchError(error => of(authFailure({ error })))
- // )
- // )
- // )
- // );
-
- constructor(
- private actions$: Actions,
- private sessionStorageService: SessionStorageService,
- private queryProtocolService: QueryProtocolService
- ) {}
-}
diff --git a/projects/ucap-webmessenger-app/src/app/store/setting/version-info/actions.ts b/projects/ucap-webmessenger-app/src/app/store/setting/version-info/actions.ts
index fe0b17fd..c8d1f5aa 100644
--- a/projects/ucap-webmessenger-app/src/app/store/setting/version-info/actions.ts
+++ b/projects/ucap-webmessenger-app/src/app/store/setting/version-info/actions.ts
@@ -5,17 +5,17 @@ import {
VersionInfo2Response
} from '@ucap-webmessenger/api-public';
-export const fetch = createAction(
- '[Setting::VersionInfo] Fetch',
+export const versionInfo2 = createAction(
+ '[Setting::VersionInfo] VersionInfo2',
props()
);
-export const fetchSuccess = createAction(
- '[Setting::VersionInfo] Fetch Success',
- props()
+export const versionInfo2Success = createAction(
+ '[Setting::VersionInfo] VersionInfo2 Success',
+ props<{ res: VersionInfo2Response }>()
);
-export const fetchFailure = createAction(
- '[Setting::VersionInfo] Fetch Failure',
+export const versionInfo2Failure = createAction(
+ '[Setting::VersionInfo] VersionInfo2 Failure',
props<{ error: any }>()
);
diff --git a/projects/ucap-webmessenger-app/src/app/store/setting/version-info/effects.ts b/projects/ucap-webmessenger-app/src/app/store/setting/version-info/effects.ts
index 8c374d60..465a4042 100644
--- a/projects/ucap-webmessenger-app/src/app/store/setting/version-info/effects.ts
+++ b/projects/ucap-webmessenger-app/src/app/store/setting/version-info/effects.ts
@@ -12,39 +12,33 @@ import { SessionStorageService } from '@ucap-webmessenger/web-storage';
import { NGXLogger } from 'ngx-logger';
-import { fetch, fetchSuccess, fetchFailure } from './actions';
+import {
+ versionInfo2,
+ versionInfo2Success,
+ versionInfo2Failure
+} from './actions';
@Injectable()
export class Effects {
- fetch$ = createEffect(() =>
+ versionInfo2$ = createEffect(() =>
this.actions$.pipe(
- ofType(fetch),
+ ofType(versionInfo2),
map(action => action),
exhaustMap(req =>
this.publicApiService.versionInfo2(req).pipe(
map(res => {
if (res.statusCode === StatusCode.Success) {
- this.logger.debug('fetchSuccess', res);
- return fetchSuccess(res);
+ return versionInfo2Success({ res });
} else {
- return fetchFailure({ error: 'Failed' });
+ return versionInfo2Failure({ error: 'Failed' });
}
}),
- catchError(error => of(fetchFailure({ error })))
+ catchError(error => of(versionInfo2Failure({ error })))
)
)
)
);
- fetchSuccess$ = createEffect(
- () =>
- this.actions$.pipe(
- ofType(fetchSuccess),
- tap(params => {})
- ),
- { dispatch: false }
- );
-
constructor(
private actions$: Actions,
private publicApiService: PublicApiService,
diff --git a/projects/ucap-webmessenger-app/src/app/store/setting/version-info/reducers.ts b/projects/ucap-webmessenger-app/src/app/store/setting/version-info/reducers.ts
index a89a373d..b924cee4 100644
--- a/projects/ucap-webmessenger-app/src/app/store/setting/version-info/reducers.ts
+++ b/projects/ucap-webmessenger-app/src/app/store/setting/version-info/reducers.ts
@@ -1,23 +1,23 @@
import { createReducer, on } from '@ngrx/store';
import { initialState } from './state';
-import { fetchSuccess } from './actions';
+import { versionInfo2Success } from './actions';
export const reducer = createReducer(
initialState,
- on(fetchSuccess, (state, action) => {
+ on(versionInfo2Success, (state, action) => {
return {
...state,
- profileImageRoot: action.profileRoot,
- profileImageUploadUrl: action.profileUploadUrl,
+ profileImageRoot: action.res.profileRoot,
+ profileImageUploadUrl: action.res.profileUploadUrl,
fileUploadMaxSize:
- !!action.fileAllowSize &&
- !isNaN(action.fileAllowSize) &&
- 0 < action.fileAllowSize
- ? action.fileAllowSize
+ !!action.res.fileAllowSize &&
+ !isNaN(action.res.fileAllowSize) &&
+ 0 < action.res.fileAllowSize
+ ? action.res.fileAllowSize
: 0,
- fileUploadUrl: action.uploadUrl,
- fileDownloadUrl: action.downloadUrl,
- serverIp: action.serverIp
+ fileUploadUrl: action.res.uploadUrl,
+ fileDownloadUrl: action.res.downloadUrl,
+ serverIp: action.res.serverIp
};
})
);
diff --git a/projects/ucap-webmessenger-pi/src/lib/models/login2.ts b/projects/ucap-webmessenger-pi/src/lib/apis/login2.ts
similarity index 100%
rename from projects/ucap-webmessenger-pi/src/lib/models/login2.ts
rename to projects/ucap-webmessenger-pi/src/lib/apis/login2.ts
diff --git a/projects/ucap-webmessenger-pi/src/lib/models/pi.ts b/projects/ucap-webmessenger-pi/src/lib/apis/pi.ts
similarity index 100%
rename from projects/ucap-webmessenger-pi/src/lib/models/pi.ts
rename to projects/ucap-webmessenger-pi/src/lib/apis/pi.ts
diff --git a/projects/ucap-webmessenger-pi/src/lib/models/privacy-total.ts b/projects/ucap-webmessenger-pi/src/lib/apis/privacy-total.ts
similarity index 100%
rename from projects/ucap-webmessenger-pi/src/lib/models/privacy-total.ts
rename to projects/ucap-webmessenger-pi/src/lib/apis/privacy-total.ts
diff --git a/projects/ucap-webmessenger-pi/src/lib/models/user-terms-action.ts b/projects/ucap-webmessenger-pi/src/lib/apis/user-terms-action.ts
similarity index 100%
rename from projects/ucap-webmessenger-pi/src/lib/models/user-terms-action.ts
rename to projects/ucap-webmessenger-pi/src/lib/apis/user-terms-action.ts
diff --git a/projects/ucap-webmessenger-pi/src/lib/services/pi.service.ts b/projects/ucap-webmessenger-pi/src/lib/services/pi.service.ts
index 40d94810..294cf6e8 100644
--- a/projects/ucap-webmessenger-pi/src/lib/services/pi.service.ts
+++ b/projects/ucap-webmessenger-pi/src/lib/services/pi.service.ts
@@ -11,18 +11,15 @@ import {
Login2Response,
encodeLogin2,
decodeLogin2
-} from '../models/login2';
-import {
- PrivacyTotalRequest,
- encodePrivacyTotal
-} from '../models/privacy-total';
+} from '../apis/login2';
+import { PrivacyTotalRequest, encodePrivacyTotal } from '../apis/privacy-total';
import { UrlUtil, Parameter } from '@ucap-webmessenger/api';
import {
UserTermsActionRequest,
UserTermsActionResponse,
encodeUserTermsAction,
decodeUserTermsAction
-} from '../models/user-terms-action';
+} from '../apis/user-terms-action';
@Injectable({
providedIn: 'root'
diff --git a/projects/ucap-webmessenger-pi/src/public-api.ts b/projects/ucap-webmessenger-pi/src/public-api.ts
index ff90a125..9ffbe7a7 100644
--- a/projects/ucap-webmessenger-pi/src/public-api.ts
+++ b/projects/ucap-webmessenger-pi/src/public-api.ts
@@ -4,10 +4,10 @@
export * from './lib/types/module-config';
-export * from './lib/models/pi';
-export * from './lib/models/login2';
-export * from './lib/models/privacy-total';
-export * from './lib/models/user-terms-action';
+export * from './lib/apis/pi';
+export * from './lib/apis/login2';
+export * from './lib/apis/privacy-total';
+export * from './lib/apis/user-terms-action';
export * from './lib/types/response-status.type';
diff --git a/projects/ucap-webmessenger-protocol-authentication/src/lib/models/user-info.ts b/projects/ucap-webmessenger-protocol-authentication/src/lib/models/user-info.ts
new file mode 100644
index 00000000..91177155
--- /dev/null
+++ b/projects/ucap-webmessenger-protocol-authentication/src/lib/models/user-info.ts
@@ -0,0 +1,51 @@
+import { RoleCode } from '../types/role-code';
+import { EmployeeType } from '@ucap-webmessenger/protocol-room';
+
+export interface UserInfo {
+ /** 사용자SEQ */
+ seq: number;
+ /** 사용자명 */
+ name: string;
+ /** 사진파일 */
+ profileImageFile: string;
+ /** 직급 */
+ grade: string;
+ /** 업무소개 */
+ intro: string;
+ /** 기관코드 */
+ companyCode: string;
+ /** 핸드폰번호 */
+ hpNumber: string;
+ /** 내선번호 */
+ lineNumber: string;
+ /** 이메일 */
+ email: string;
+ /** 모바일YN */
+ isMobile: boolean;
+ /** 부서명 */
+ deptName: string;
+ /** 조회순서 */
+ selectOrder: number;
+ /** ActiveYN */
+ isActive: boolean;
+ /** 역할코드 */
+ roleCd: RoleCode;
+ /** 사번 */
+ employeeNum: string;
+ /** 사용자명(영어) */
+ nameEn: string;
+ /** 사용자명(중국어) */
+ nameCn: string;
+ /** 직급(영어) */
+ gradeEn: string;
+ /** 직급(중국어) */
+ gradeCn: string;
+ /** 부서명(영어) */
+ deptNameEn: string;
+ /** 부서명(중국어) */
+ deptNameCn: string;
+ /** 임직원유형(s) */
+ employeeType: EmployeeType;
+ /** 국내임직원여부(s) */
+ inDomestic: boolean;
+}
diff --git a/projects/ucap-webmessenger-protocol-authentication/src/lib/models/fmc.ts b/projects/ucap-webmessenger-protocol-authentication/src/lib/protocols/fmc.ts
similarity index 100%
rename from projects/ucap-webmessenger-protocol-authentication/src/lib/models/fmc.ts
rename to projects/ucap-webmessenger-protocol-authentication/src/lib/protocols/fmc.ts
diff --git a/projects/ucap-webmessenger-protocol-authentication/src/lib/models/login.ts b/projects/ucap-webmessenger-protocol-authentication/src/lib/protocols/login.ts
similarity index 84%
rename from projects/ucap-webmessenger-protocol-authentication/src/lib/models/login.ts
rename to projects/ucap-webmessenger-protocol-authentication/src/lib/protocols/login.ts
index 497a5ebf..07229922 100644
--- a/projects/ucap-webmessenger-protocol-authentication/src/lib/models/login.ts
+++ b/projects/ucap-webmessenger-protocol-authentication/src/lib/protocols/login.ts
@@ -6,10 +6,13 @@ import {
PacketBody,
PacketBodyValue,
ProtocolDecoder,
- ProtocolMessage
+ ProtocolMessage,
+ BodyStringDivider
} from '@ucap-webmessenger/protocol';
import { SSOMode } from '../types/sso-mode';
import { RoleCode } from '../types/role-code';
+import { UserInfo } from '../models/user-info';
+import { EmployeeType } from '@ucap-webmessenger/protocol-room';
export interface LoginRequest extends ProtocolRequest {
// 0. LoginID(s)
@@ -55,7 +58,7 @@ export interface LoginRequest extends ProtocolRequest {
export interface LoginResponse extends ProtocolResponse {
loginId: string;
userSeq: number;
- userInfo: string;
+ userInfo: UserInfo;
token: number;
companyCode: string;
departmentCode: number;
@@ -88,6 +91,36 @@ export interface LoginResponse extends ProtocolResponse {
havePermissionsForDevice: boolean;
}
+const decodeUserInfo = (encodedValue: string) => {
+ const info = encodedValue.split(BodyStringDivider);
+
+ return {
+ seq: Number(info[0]),
+ name: info[1],
+ profileImageFile: info[2],
+ grade: info[3],
+ intro: info[4],
+ companyCode: info[5],
+ hpNumber: info[6],
+ lineNumber: info[7],
+ email: info[8],
+ isMobile: info[9] === 'Y' ? true : false,
+ deptName: info[10],
+ selectOrder: Number(info[11]),
+ isActive: info[12] === 'Y' ? true : false,
+ roleCd: Number(info[13]) as RoleCode,
+ employeeNum: info[14],
+ nameEn: info[15],
+ nameCn: info[16],
+ gradeEn: info[17],
+ gradeCn: info[18],
+ deptNameEn: info[19],
+ deptNameCn: info[20],
+ employeeType: info[21] as EmployeeType,
+ inDomestic: info[22] === 'Y' ? true : false
+ } as UserInfo;
+};
+
export const encodeLogin: ProtocolEncoder = (
req: LoginRequest
) => {
@@ -129,7 +162,7 @@ export const decodeLogin: ProtocolDecoder = (
return {
loginId: message.bodyList[0],
userSeq: message.bodyList[1],
- userInfo: message.bodyList[2],
+ userInfo: decodeUserInfo(message.bodyList[2]),
token: message.bodyList[3],
companyCode: message.bodyList[4],
departmentCode: message.bodyList[5],
diff --git a/projects/ucap-webmessenger-protocol-authentication/src/lib/models/logout-remote.ts b/projects/ucap-webmessenger-protocol-authentication/src/lib/protocols/logout-remote.ts
similarity index 100%
rename from projects/ucap-webmessenger-protocol-authentication/src/lib/models/logout-remote.ts
rename to projects/ucap-webmessenger-protocol-authentication/src/lib/protocols/logout-remote.ts
diff --git a/projects/ucap-webmessenger-protocol-authentication/src/lib/models/logout.ts b/projects/ucap-webmessenger-protocol-authentication/src/lib/protocols/logout.ts
similarity index 100%
rename from projects/ucap-webmessenger-protocol-authentication/src/lib/models/logout.ts
rename to projects/ucap-webmessenger-protocol-authentication/src/lib/protocols/logout.ts
diff --git a/projects/ucap-webmessenger-protocol-authentication/src/lib/services/authentication-protocol.service.ts b/projects/ucap-webmessenger-protocol-authentication/src/lib/services/authentication-protocol.service.ts
index 57810761..1cd48016 100644
--- a/projects/ucap-webmessenger-protocol-authentication/src/lib/services/authentication-protocol.service.ts
+++ b/projects/ucap-webmessenger-protocol-authentication/src/lib/services/authentication-protocol.service.ts
@@ -1,7 +1,7 @@
import { Injectable } from '@angular/core';
-import { Observable } from 'rxjs';
-import { map, take } from 'rxjs/operators';
+import { Observable, Subject } from 'rxjs';
+import { map, take, filter, tap, share } from 'rxjs/operators';
import { ProtocolService } from '@ucap-webmessenger/protocol';
import {
@@ -9,32 +9,77 @@ import {
LoginResponse,
encodeLogin,
decodeLogin
-} from '../models/login';
+} from '../protocols/login';
import {
SVC_TYPE_LOGIN,
SSVC_TYPE_LOGIN_REQ,
SVC_TYPE_LOGOUT,
SSVC_TYPE_LOGOUT_REQ,
- SSVC_TYPE_LOGOUT_REMOTE_REQ
+ SSVC_TYPE_LOGOUT_REMOTE_REQ,
+ SSVC_TYPE_LOGOUT_RES,
+ SSVC_TYPE_LOGOUT_REMOTE_NOTI
} from '../types/service';
import {
LogoutRequest,
LogoutResponse,
encodeLogout,
decodeLogout
-} from '../models/logout';
+} from '../protocols/logout';
import {
encodeLogoutRemote,
decodeLogoutRemote,
LogoutRemoteRequest,
- LogoutRemoteResponse
-} from '../models/logout-remote';
+ LogoutRemoteResponse,
+ decodeLogoutRemoteNotification,
+ LogoutRemoteNotification
+} from '../protocols/logout-remote';
@Injectable({
providedIn: 'root'
})
export class AuthenticationProtocolService {
- constructor(private protocolService: ProtocolService) {}
+ private logoutNotificationSubject: Subject<
+ LogoutResponse | LogoutRemoteNotification
+ >;
+ public logoutNotification$: Observable<
+ LogoutResponse | LogoutRemoteNotification
+ >;
+
+ constructor(private protocolService: ProtocolService) {
+ this.logoutNotificationSubject = new Subject();
+ this.logoutNotification$ = this.logoutNotificationSubject
+ .asObservable()
+ .pipe(share());
+
+ this.protocolService.serverMessage
+ .pipe(
+ filter(message => message.serviceType === SVC_TYPE_LOGOUT),
+ tap(message => {
+ switch (message.subServiceType) {
+ case SSVC_TYPE_LOGOUT_RES:
+ {
+ this.logoutNotificationSubject.next({
+ ...decodeLogout(message),
+ Type: SSVC_TYPE_LOGOUT_RES
+ });
+ }
+ break;
+ case SSVC_TYPE_LOGOUT_REMOTE_NOTI:
+ {
+ this.logoutNotificationSubject.next({
+ ...decodeLogoutRemoteNotification(message),
+ Type: SSVC_TYPE_LOGOUT_REMOTE_NOTI
+ });
+ }
+ break;
+
+ default:
+ break;
+ }
+ })
+ )
+ .subscribe();
+ }
public login(req: LoginRequest): Observable {
return this.protocolService
diff --git a/projects/ucap-webmessenger-protocol-authentication/src/public-api.ts b/projects/ucap-webmessenger-protocol-authentication/src/public-api.ts
index ea35d110..5c86ea82 100644
--- a/projects/ucap-webmessenger-protocol-authentication/src/public-api.ts
+++ b/projects/ucap-webmessenger-protocol-authentication/src/public-api.ts
@@ -2,10 +2,10 @@
* Public API Surface of ucap-webmessenger-protocol-authentication
*/
-export * from './lib/models/fmc';
-export * from './lib/models/login';
-export * from './lib/models/logout';
-export * from './lib/models/logout-remote';
+export * from './lib/protocols/fmc';
+export * from './lib/protocols/login';
+export * from './lib/protocols/logout';
+export * from './lib/protocols/logout-remote';
export * from './lib/services/authentication-protocol.service';
diff --git a/projects/ucap-webmessenger-protocol-buddy/src/lib/models/add.ts b/projects/ucap-webmessenger-protocol-buddy/src/lib/protocols/add.ts
similarity index 100%
rename from projects/ucap-webmessenger-protocol-buddy/src/lib/models/add.ts
rename to projects/ucap-webmessenger-protocol-buddy/src/lib/protocols/add.ts
diff --git a/projects/ucap-webmessenger-protocol-buddy/src/lib/models/del.ts b/projects/ucap-webmessenger-protocol-buddy/src/lib/protocols/del.ts
similarity index 100%
rename from projects/ucap-webmessenger-protocol-buddy/src/lib/models/del.ts
rename to projects/ucap-webmessenger-protocol-buddy/src/lib/protocols/del.ts
diff --git a/projects/ucap-webmessenger-protocol-buddy/src/lib/models/update.ts b/projects/ucap-webmessenger-protocol-buddy/src/lib/protocols/update.ts
similarity index 100%
rename from projects/ucap-webmessenger-protocol-buddy/src/lib/models/update.ts
rename to projects/ucap-webmessenger-protocol-buddy/src/lib/protocols/update.ts
diff --git a/projects/ucap-webmessenger-protocol-buddy/src/lib/services/buddy-protocol.service.ts b/projects/ucap-webmessenger-protocol-buddy/src/lib/services/buddy-protocol.service.ts
index 90fe5d0e..dc303f13 100644
--- a/projects/ucap-webmessenger-protocol-buddy/src/lib/services/buddy-protocol.service.ts
+++ b/projects/ucap-webmessenger-protocol-buddy/src/lib/services/buddy-protocol.service.ts
@@ -12,14 +12,24 @@ import {
SSVC_TYPE_BUDDY_UPD_REQ
} from '../types/service';
-import { AddRequest, encodeAdd, decodeAdd, AddResponse } from '../models/add';
-import { DelRequest, encodeDel, decodeDel, DelResponse } from '../models/del';
+import {
+ AddRequest,
+ encodeAdd,
+ decodeAdd,
+ AddResponse
+} from '../protocols/add';
+import {
+ DelRequest,
+ encodeDel,
+ decodeDel,
+ DelResponse
+} from '../protocols/del';
import {
UpdateRequest,
decodeUpdate,
encodeUpdate,
UpdateResponse
-} from '../models/update';
+} from '../protocols/update';
@Injectable({
providedIn: 'root'
diff --git a/projects/ucap-webmessenger-protocol-buddy/src/public-api.ts b/projects/ucap-webmessenger-protocol-buddy/src/public-api.ts
index 826985ea..bbf93a45 100644
--- a/projects/ucap-webmessenger-protocol-buddy/src/public-api.ts
+++ b/projects/ucap-webmessenger-protocol-buddy/src/public-api.ts
@@ -1,9 +1,9 @@
/*
* Public API Surface of ucap-webmessenger-protocol-buddy
*/
-export * from './lib/models/add';
-export * from './lib/models/del';
-export * from './lib/models/update';
+export * from './lib/protocols/add';
+export * from './lib/protocols/del';
+export * from './lib/protocols/update';
export * from './lib/services/buddy-protocol.service';
diff --git a/projects/ucap-webmessenger-protocol-event/src/lib/models/info.ts b/projects/ucap-webmessenger-protocol-event/src/lib/models/info.ts
index 6e26e8c7..df8727f4 100644
--- a/projects/ucap-webmessenger-protocol-event/src/lib/models/info.ts
+++ b/projects/ucap-webmessenger-protocol-event/src/lib/models/info.ts
@@ -1,24 +1,5 @@
-import {
- ProtocolRequest,
- ProtocolResponse,
- ProtocolEncoder,
- PacketBody,
- ProtocolDecoder,
- ProtocolMessage,
- ProtocolStream,
- PacketBodyValue
-} from '@ucap-webmessenger/protocol';
import { EventType } from '../types/event.type';
-export interface InfoRequest extends ProtocolRequest {
- // 대화방SEQ(s)
- roomSeq: string;
- // 기준이벤트SEQ(n)
- baseSeq: number;
- // 요청이벤트개수(n)
- requestCount: number;
-}
-
export interface Info {
// 이벤트SEQ
seq: number;
@@ -33,64 +14,3 @@ export interface Info {
// 수신자수
receiverCount: number;
}
-
-export interface InfoData extends ProtocolStream {
- // 대화방SEQ(s)
- roomSeq: string;
- infoList: Info[];
-}
-
-export interface InfoResponse extends ProtocolResponse {
- // 대화방SEQ(s)
- roomSeq: string;
- // 기준이벤트SEQ(n)
- baseSeq: number;
- // 유효한파일기준이벤트SEQ(n)
- validFileBaseSeq: number;
- // 이벤트정보 개수(n)
- count: number;
-}
-
-export const encodeInfo: ProtocolEncoder = (req: InfoRequest) => {
- const bodyList: PacketBody[] = [];
-
- bodyList.push(
- { type: PacketBodyValue.String, value: req.roomSeq },
- { type: PacketBodyValue.Integer, value: req.baseSeq },
- { type: PacketBodyValue.Integer, value: req.requestCount }
- );
-
- return bodyList;
-};
-
-export const decodeInfoData: ProtocolDecoder = (
- message: ProtocolMessage
-) => {
- const infoList: Info[] = [];
- for (let i = 1; i < message.bodyList.length; ) {
- infoList.push({
- seq: message.bodyList[0],
- type: message.bodyList[1],
- senderSeq: message.bodyList[2],
- sendDate: message.bodyList[3],
- sentMessage: message.bodyList[4],
- receiverCount: message.bodyList[5]
- });
- }
-
- return {
- roomSeq: message.bodyList[0],
- infoList
- } as InfoData;
-};
-
-export const decodeInfo: ProtocolDecoder = (
- message: ProtocolMessage
-) => {
- return {
- roomSeq: message.bodyList[0],
- baseSeq: message.bodyList[1],
- validFileBaseSeq: message.bodyList[2],
- count: message.bodyList[3]
- } as InfoResponse;
-};
diff --git a/projects/ucap-webmessenger-protocol-event/src/lib/models/cancel.ts b/projects/ucap-webmessenger-protocol-event/src/lib/protocols/cancel.ts
similarity index 100%
rename from projects/ucap-webmessenger-protocol-event/src/lib/models/cancel.ts
rename to projects/ucap-webmessenger-protocol-event/src/lib/protocols/cancel.ts
diff --git a/projects/ucap-webmessenger-protocol-event/src/lib/models/del.ts b/projects/ucap-webmessenger-protocol-event/src/lib/protocols/del.ts
similarity index 100%
rename from projects/ucap-webmessenger-protocol-event/src/lib/models/del.ts
rename to projects/ucap-webmessenger-protocol-event/src/lib/protocols/del.ts
diff --git a/projects/ucap-webmessenger-protocol-event/src/lib/protocols/info.ts b/projects/ucap-webmessenger-protocol-event/src/lib/protocols/info.ts
new file mode 100644
index 00000000..92c73ea1
--- /dev/null
+++ b/projects/ucap-webmessenger-protocol-event/src/lib/protocols/info.ts
@@ -0,0 +1,87 @@
+import {
+ ProtocolRequest,
+ ProtocolResponse,
+ ProtocolEncoder,
+ PacketBody,
+ ProtocolDecoder,
+ ProtocolMessage,
+ ProtocolStream,
+ PacketBodyValue,
+ BodyStringDivider
+} from '@ucap-webmessenger/protocol';
+import { EventType } from '../types/event.type';
+import { Info } from '../models/info';
+
+export interface InfoRequest extends ProtocolRequest {
+ // 대화방SEQ(s)
+ roomSeq: string;
+ // 기준이벤트SEQ(n)
+ baseSeq: number;
+ // 요청이벤트개수(n)
+ requestCount: number;
+}
+
+export interface InfoData extends ProtocolStream {
+ // 대화방SEQ(s)
+ roomSeq: string;
+ infoList: Info[];
+}
+
+export interface InfoResponse extends ProtocolResponse {
+ // 대화방SEQ(s)
+ roomSeq: string;
+ // 기준이벤트SEQ(n)
+ baseSeq: number;
+ // 유효한파일기준이벤트SEQ(n)
+ validFileBaseSeq: number;
+ // 이벤트정보 개수(n)
+ count: number;
+}
+
+export const encodeInfo: ProtocolEncoder = (req: InfoRequest) => {
+ const bodyList: PacketBody[] = [];
+
+ bodyList.push(
+ { type: PacketBodyValue.String, value: req.roomSeq },
+ { type: PacketBodyValue.Integer, value: req.baseSeq },
+ { type: PacketBodyValue.Integer, value: req.requestCount }
+ );
+
+ return bodyList;
+};
+
+export const decodeInfoData: ProtocolDecoder = (
+ message: ProtocolMessage
+) => {
+ const infoList: Info[] = [];
+
+ for (const body of message.bodyList) {
+ const info = body.split(BodyStringDivider);
+ if (info.length > 5) {
+ infoList.push({
+ seq: info[0],
+ type: info[1] as EventType,
+ senderSeq: Number(info[2]),
+ sendDate: new Date(info[3]),
+ sentMessage: info[4],
+ receiverCount: Number(info[5])
+ });
+ }
+ }
+
+ return {
+ roomSeq: message.bodyList[0],
+ infoList
+ } as InfoData;
+};
+
+export const decodeInfo: ProtocolDecoder = (
+ message: ProtocolMessage
+) => {
+ return {
+ roomSeq: message.bodyList[0],
+ baseSeq: message.bodyList[1],
+ validFileBaseSeq: message.bodyList[2],
+ count: message.bodyList[3]
+ } as InfoResponse;
+};
diff --git a/projects/ucap-webmessenger-protocol-event/src/lib/models/push.ts b/projects/ucap-webmessenger-protocol-event/src/lib/protocols/push.ts
similarity index 95%
rename from projects/ucap-webmessenger-protocol-event/src/lib/models/push.ts
rename to projects/ucap-webmessenger-protocol-event/src/lib/protocols/push.ts
index ba01d642..a45e9cad 100644
--- a/projects/ucap-webmessenger-protocol-event/src/lib/models/push.ts
+++ b/projects/ucap-webmessenger-protocol-event/src/lib/protocols/push.ts
@@ -7,7 +7,7 @@ import {
PacketBodyValue
} from '@ucap-webmessenger/protocol';
import { EventType } from '../types/event.type';
-import { PushClType } from '../types/pushCl.type';
+import { PushClType } from '../types/push-cl.type';
export interface PushRequest extends ProtocolRequest {
// 대화방SEQ(s)
diff --git a/projects/ucap-webmessenger-protocol-event/src/lib/models/read.ts b/projects/ucap-webmessenger-protocol-event/src/lib/protocols/read.ts
similarity index 100%
rename from projects/ucap-webmessenger-protocol-event/src/lib/models/read.ts
rename to projects/ucap-webmessenger-protocol-event/src/lib/protocols/read.ts
diff --git a/projects/ucap-webmessenger-protocol-event/src/lib/models/send.ts b/projects/ucap-webmessenger-protocol-event/src/lib/protocols/send.ts
similarity index 90%
rename from projects/ucap-webmessenger-protocol-event/src/lib/models/send.ts
rename to projects/ucap-webmessenger-protocol-event/src/lib/protocols/send.ts
index e1b57327..b03682ea 100644
--- a/projects/ucap-webmessenger-protocol-event/src/lib/models/send.ts
+++ b/projects/ucap-webmessenger-protocol-event/src/lib/protocols/send.ts
@@ -10,13 +10,13 @@ import {
ProtocolNotification
} from '@ucap-webmessenger/protocol';
import { EventType } from '../types/event.type';
-import { PushStatus } from '../types/pushStatus.type';
+import { PushStatus } from '../types/push-status.type';
export interface SendRequest extends ProtocolRequest {
// 0. 대화방SEQ(s)
roomSeq: string;
// 1. 이벤트타입(s)
- type: EventType;
+ eventType: EventType;
// 2. 이벤트내용(s)
sentMessage: string;
}
@@ -27,9 +27,9 @@ export interface SendResponse extends ProtocolResponse {
// 이벤트SEQ(n)
seq: number;
// 이벤트타입(s)
- type: EventType;
+ eventType: EventType;
// 발생일시(s)
- sendDate: string;
+ sendDate: Date;
// 이벤트내용(s)
message: string;
// 수신자수
@@ -48,7 +48,7 @@ export interface SendNotification extends ProtocolNotification {
// 이벤트SEQ(n)
seq: number;
// 이벤트타입(s)
- type: EventType;
+ eventType: EventType;
// 발생일시(s)
sendDate: string;
// 이벤트내용(s)
@@ -72,7 +72,7 @@ export const encodeSend: ProtocolEncoder = (req: SendRequest) => {
bodyList.push(
{ type: PacketBodyValue.String, value: req.roomSeq },
- { type: PacketBodyValue.String, value: req.type },
+ { type: PacketBodyValue.String, value: req.eventType },
{ type: PacketBodyValue.String, value: req.sentMessage }
);
@@ -85,7 +85,7 @@ export const decodeSend: ProtocolDecoder = (
return {
roomSeq: message.bodyList[0],
seq: message.bodyList[1],
- type: message.bodyList[2] as EventType,
+ eventType: message.bodyList[2] as EventType,
sendDate: message.bodyList[3],
message: message.bodyList[4],
receiverCount: message.bodyList[5] || 0,
@@ -101,7 +101,7 @@ export const decodeSendNotification: ProtocolDecoder = (
return {
roomSeq: message.bodyList[0],
seq: message.bodyList[1],
- type: message.bodyList[2] as EventType,
+ eventType: message.bodyList[2] as EventType,
sendDate: message.bodyList[3],
message: message.bodyList[4],
receiverCount: message.bodyList[5] || 0,
diff --git a/projects/ucap-webmessenger-protocol-event/src/lib/services/event-protocol.service.ts b/projects/ucap-webmessenger-protocol-event/src/lib/services/event-protocol.service.ts
index a16c5f19..bf4156ae 100644
--- a/projects/ucap-webmessenger-protocol-event/src/lib/services/event-protocol.service.ts
+++ b/projects/ucap-webmessenger-protocol-event/src/lib/services/event-protocol.service.ts
@@ -1,7 +1,15 @@
import { Injectable } from '@angular/core';
-import { Observable } from 'rxjs';
-import { map, takeWhile, timeout, take } from 'rxjs/operators';
+import { Observable, Subject } from 'rxjs';
+import {
+ map,
+ takeWhile,
+ timeout,
+ take,
+ share,
+ filter,
+ tap
+} from 'rxjs/operators';
import { ProtocolService } from '@ucap-webmessenger/protocol';
@@ -12,7 +20,7 @@ import {
decodeInfo,
decodeInfoData,
InfoData
-} from '../models/info';
+} from '../protocols/info';
import {
SVC_TYPE_EVENT,
SSVC_TYPE_EVENT_INFO_REQ,
@@ -22,21 +30,22 @@ import {
SSVC_TYPE_EVENT_PUSH_CL_REQ,
SSVC_TYPE_EVENT_READ_REQ,
SSVC_TYPE_EVENT_DEL_REQ,
- SSVC_TYPE_EVENT_CANCEL_REQ
+ SSVC_TYPE_EVENT_CANCEL_REQ,
+ SSVC_TYPE_EVENT_CANCEL_NOTI
} from '../types/service';
import {
SendRequest,
SendResponse,
decodeSend,
encodeSend
-} from '../models/send';
-import { PushRequest, encodePush } from '../models/push';
+} from '../protocols/send';
+import { PushRequest, encodePush } from '../protocols/push';
import {
ReadResponse,
ReadRequest,
encodeRead,
decodeRead
-} from '../models/read';
+} from '../protocols/read';
import {
DelRequest,
DelResponse,
@@ -47,14 +56,44 @@ import {
CancelRequest,
CancelResponse,
encodeCancel,
- decodeCancel
-} from '../models/cancel';
+ decodeCancel,
+ CancelNotification,
+ decodeCancelNotification
+} from '../protocols/cancel';
@Injectable({
providedIn: 'root'
})
export class EventProtocolService {
- constructor(private protocolService: ProtocolService) {}
+ private eventNotificationSubject: Subject;
+ public eventNotification$: Observable;
+
+ constructor(private protocolService: ProtocolService) {
+ this.eventNotificationSubject = new Subject();
+ this.eventNotification$ = this.eventNotificationSubject
+ .asObservable()
+ .pipe(share());
+
+ this.protocolService.serverMessage
+ .pipe(
+ filter(message => message.serviceType === SVC_TYPE_EVENT),
+ tap(message => {
+ switch (message.subServiceType) {
+ case SSVC_TYPE_EVENT_CANCEL_NOTI:
+ {
+ this.eventNotificationSubject.next({
+ ...decodeCancelNotification(message),
+ Type: SSVC_TYPE_EVENT_CANCEL_NOTI
+ });
+ }
+ break;
+ default:
+ break;
+ }
+ })
+ )
+ .subscribe();
+ }
public info(req: InfoRequest): Observable {
return this.protocolService
diff --git a/projects/ucap-webmessenger-protocol-event/src/lib/types/pushCl.type.ts b/projects/ucap-webmessenger-protocol-event/src/lib/types/push-cl.type.ts
similarity index 100%
rename from projects/ucap-webmessenger-protocol-event/src/lib/types/pushCl.type.ts
rename to projects/ucap-webmessenger-protocol-event/src/lib/types/push-cl.type.ts
diff --git a/projects/ucap-webmessenger-protocol-event/src/lib/types/pushStatus.type.ts b/projects/ucap-webmessenger-protocol-event/src/lib/types/push-status.type.ts
similarity index 100%
rename from projects/ucap-webmessenger-protocol-event/src/lib/types/pushStatus.type.ts
rename to projects/ucap-webmessenger-protocol-event/src/lib/types/push-status.type.ts
diff --git a/projects/ucap-webmessenger-protocol-event/src/public-api.ts b/projects/ucap-webmessenger-protocol-event/src/public-api.ts
index edb73779..44ee9937 100644
--- a/projects/ucap-webmessenger-protocol-event/src/public-api.ts
+++ b/projects/ucap-webmessenger-protocol-event/src/public-api.ts
@@ -3,10 +3,15 @@
*/
export * from './lib/models/info';
-export * from './lib/models/send';
+
+export * from './lib/protocols/info';
+export * from './lib/protocols/send';
export * from './lib/services/event-protocol.service';
export * from './lib/ucap-event-protocol.module';
export * from './lib/types/event.type';
+export * from './lib/types/push-cl.type';
+export * from './lib/types/push-status.type';
+export * from './lib/types/service';
diff --git a/projects/ucap-webmessenger-protocol-file/src/lib/models/file-download-info.ts b/projects/ucap-webmessenger-protocol-file/src/lib/models/file-download-info.ts
new file mode 100644
index 00000000..b59e1bd5
--- /dev/null
+++ b/projects/ucap-webmessenger-protocol-file/src/lib/models/file-download-info.ts
@@ -0,0 +1,14 @@
+export interface FileDownloadInfo {
+ // 대화방SEQ
+ roomSeq: string;
+ // 파일SEQ
+ seq: number;
+ // 사용자SEQ
+ userSeq: number;
+ // 사용자명
+ userName: string;
+ // 다운로드일시
+ downloadDate: string;
+ // DownYN
+ isDownload: boolean;
+}
diff --git a/projects/ucap-webmessenger-protocol-file/src/lib/models/file-info.ts b/projects/ucap-webmessenger-protocol-file/src/lib/models/file-info.ts
new file mode 100644
index 00000000..94daf82b
--- /dev/null
+++ b/projects/ucap-webmessenger-protocol-file/src/lib/models/file-info.ts
@@ -0,0 +1,26 @@
+import { FileType } from '../types/file.type';
+
+export interface FileInfo {
+ // 대화방SEQ
+ roomSeq: string;
+ // 이벤트SEQ
+ eventSeq: number;
+ // 파일SEQ
+ seq: number;
+ // 송신자SEQ
+ senderSeq: number;
+ // 파일타입
+ type: FileType;
+ // 파일이름
+ name: string;
+ // 파일URL
+ url: string;
+ // 파일크기(byte)
+ size: number;
+ // 전송일시
+ sendDate: string;
+ // 수신완료자수
+ receivedUserCount: number;
+ // 수신자수
+ receiverCount: number;
+}
diff --git a/projects/ucap-webmessenger-protocol-file/src/lib/models/down-check.ts b/projects/ucap-webmessenger-protocol-file/src/lib/protocols/down-check.ts
similarity index 100%
rename from projects/ucap-webmessenger-protocol-file/src/lib/models/down-check.ts
rename to projects/ucap-webmessenger-protocol-file/src/lib/protocols/down-check.ts
diff --git a/projects/ucap-webmessenger-protocol-file/src/lib/models/info.ts b/projects/ucap-webmessenger-protocol-file/src/lib/protocols/info.ts
similarity index 78%
rename from projects/ucap-webmessenger-protocol-file/src/lib/models/info.ts
rename to projects/ucap-webmessenger-protocol-file/src/lib/protocols/info.ts
index c2da7dfa..9bf26e9a 100644
--- a/projects/ucap-webmessenger-protocol-file/src/lib/models/info.ts
+++ b/projects/ucap-webmessenger-protocol-file/src/lib/protocols/info.ts
@@ -10,6 +10,8 @@ import {
ProtocolStream
} from '@ucap-webmessenger/protocol';
import { FileType } from '../types/file.type';
+import { FileInfo } from '../models/file-info';
+import { FileDownloadInfo } from '../models/file-download-info';
export interface InfoRequest extends ProtocolRequest {
// 대화방SEQ(s)
@@ -18,51 +20,11 @@ export interface InfoRequest extends ProtocolRequest {
type: FileType;
}
-export interface FileInfo {
- // 대화방SEQ
- roomSeq: string;
- // 이벤트SEQ
- eventSeq: number;
- // 파일SEQ
- seq: number;
- // 송신자SEQ
- senderSeq: number;
- // 파일타입
- type: FileType;
- // 파일이름
- name: string;
- // 파일URL
- url: string;
- // 파일크기(byte)
- size: number;
- // 전송일시
- sendDate: string;
- // 수신완료자수
- receivedUserCount: number;
- // 수신자수
- receiverCount: number;
-}
-
export interface InfoData extends ProtocolStream {
// { 대화방파일정보 }...
fileInfos: FileInfo[];
}
-export interface FileDownloadInfo {
- // 대화방SEQ
- roomSeq: string;
- // 파일SEQ
- seq: number;
- // 사용자SEQ
- userSeq: number;
- // 사용자명
- userName: string;
- // 다운로드일시
- downloadDate: string;
- // DownYN
- isDownload: boolean;
-}
-
export interface InfoCheckData extends ProtocolStream {
// { 파일다운로드정보 }...
fileDownloadInfos: FileDownloadInfo[];
diff --git a/projects/ucap-webmessenger-protocol-file/src/lib/services/file-protocol.service.ts b/projects/ucap-webmessenger-protocol-file/src/lib/services/file-protocol.service.ts
index a0c277eb..feadd330 100644
--- a/projects/ucap-webmessenger-protocol-file/src/lib/services/file-protocol.service.ts
+++ b/projects/ucap-webmessenger-protocol-file/src/lib/services/file-protocol.service.ts
@@ -21,13 +21,13 @@ import {
InfoCheckData,
decodeInfoData,
decodeInfoCheckData
-} from '../models/info';
+} from '../protocols/info';
import {
DownCheckRequest,
DownCheckResponse,
encodeDownCheck,
decodeDownCheck
-} from '../models/down-check';
+} from '../protocols/down-check';
@Injectable({
providedIn: 'root'
})
diff --git a/projects/ucap-webmessenger-protocol-file/src/public-api.ts b/projects/ucap-webmessenger-protocol-file/src/public-api.ts
index b8b41e1b..ac882923 100644
--- a/projects/ucap-webmessenger-protocol-file/src/public-api.ts
+++ b/projects/ucap-webmessenger-protocol-file/src/public-api.ts
@@ -2,8 +2,11 @@
* Public API Surface of ucap-webmessenger-protocol-file
*/
-export * from './lib/models/down-check';
-export * from './lib/models/info';
+export * from './lib/models/file-download-info';
+export * from './lib/models/file-info';
+
+export * from './lib/protocols/down-check';
+export * from './lib/protocols/info';
export * from './lib/services/file-protocol.service';
diff --git a/projects/ucap-webmessenger-protocol-group/src/lib/models/add.ts b/projects/ucap-webmessenger-protocol-group/src/lib/protocols/add.ts
similarity index 100%
rename from projects/ucap-webmessenger-protocol-group/src/lib/models/add.ts
rename to projects/ucap-webmessenger-protocol-group/src/lib/protocols/add.ts
diff --git a/projects/ucap-webmessenger-protocol-group/src/lib/models/del.ts b/projects/ucap-webmessenger-protocol-group/src/lib/protocols/del.ts
similarity index 100%
rename from projects/ucap-webmessenger-protocol-group/src/lib/models/del.ts
rename to projects/ucap-webmessenger-protocol-group/src/lib/protocols/del.ts
diff --git a/projects/ucap-webmessenger-protocol-group/src/lib/models/update.ts b/projects/ucap-webmessenger-protocol-group/src/lib/protocols/update.ts
similarity index 100%
rename from projects/ucap-webmessenger-protocol-group/src/lib/models/update.ts
rename to projects/ucap-webmessenger-protocol-group/src/lib/protocols/update.ts
diff --git a/projects/ucap-webmessenger-protocol-group/src/lib/services/group-protocol.service.ts b/projects/ucap-webmessenger-protocol-group/src/lib/services/group-protocol.service.ts
index b95dea2f..4fa1d324 100644
--- a/projects/ucap-webmessenger-protocol-group/src/lib/services/group-protocol.service.ts
+++ b/projects/ucap-webmessenger-protocol-group/src/lib/services/group-protocol.service.ts
@@ -11,8 +11,18 @@ import {
SSVC_TYPE_GROUP_UPD_REQ,
SSVC_TYPE_GROUP_UPD_REQ2
} from '../types/service';
-import { AddRequest, encodeAdd, decodeAdd, AddResponse } from '../models/add';
-import { DelRequest, encodeDel, decodeDel, DelResponse } from '../models/del';
+import {
+ AddRequest,
+ encodeAdd,
+ decodeAdd,
+ AddResponse
+} from '../protocols/add';
+import {
+ DelRequest,
+ encodeDel,
+ decodeDel,
+ DelResponse
+} from '../protocols/del';
import {
UpdateRequest,
encodeUpdate,
@@ -20,7 +30,7 @@ import {
encodeUpdate2,
decodeUpdate2,
UpdateResponse
-} from '../models/update';
+} from '../protocols/update';
@Injectable({
providedIn: 'root'
})
diff --git a/projects/ucap-webmessenger-protocol-group/src/public-api.ts b/projects/ucap-webmessenger-protocol-group/src/public-api.ts
index 517ea747..b80b8f24 100644
--- a/projects/ucap-webmessenger-protocol-group/src/public-api.ts
+++ b/projects/ucap-webmessenger-protocol-group/src/public-api.ts
@@ -1,9 +1,9 @@
/*
* Public API Surface of ucap-webmessenger-protocol-group
*/
-export * from './lib/models/add';
-export * from './lib/models/del';
-export * from './lib/models/update';
+export * from './lib/protocols/add';
+export * from './lib/protocols/del';
+export * from './lib/protocols/update';
export * from './lib/services/group-protocol.service';
diff --git a/projects/ucap-webmessenger-protocol-info/src/lib/models/status.ts b/projects/ucap-webmessenger-protocol-info/src/lib/protocols/status.ts
similarity index 100%
rename from projects/ucap-webmessenger-protocol-info/src/lib/models/status.ts
rename to projects/ucap-webmessenger-protocol-info/src/lib/protocols/status.ts
diff --git a/projects/ucap-webmessenger-protocol-info/src/lib/models/user-option.ts b/projects/ucap-webmessenger-protocol-info/src/lib/protocols/user-option.ts
similarity index 100%
rename from projects/ucap-webmessenger-protocol-info/src/lib/models/user-option.ts
rename to projects/ucap-webmessenger-protocol-info/src/lib/protocols/user-option.ts
diff --git a/projects/ucap-webmessenger-protocol-info/src/lib/models/user.ts b/projects/ucap-webmessenger-protocol-info/src/lib/protocols/user.ts
similarity index 100%
rename from projects/ucap-webmessenger-protocol-info/src/lib/models/user.ts
rename to projects/ucap-webmessenger-protocol-info/src/lib/protocols/user.ts
diff --git a/projects/ucap-webmessenger-protocol-info/src/lib/services/info-protocol.service.ts b/projects/ucap-webmessenger-protocol-info/src/lib/services/info-protocol.service.ts
index 11ef17d9..35bc132b 100644
--- a/projects/ucap-webmessenger-protocol-info/src/lib/services/info-protocol.service.ts
+++ b/projects/ucap-webmessenger-protocol-info/src/lib/services/info-protocol.service.ts
@@ -16,13 +16,13 @@ import {
encodeUser,
UserResponse,
decodeUser
-} from '../models/user';
+} from '../protocols/user';
import {
StatusRequest,
StatusResponse,
encodeStatus,
decodeStatus
-} from '../models/status';
+} from '../protocols/status';
import {
UserOptionResponse,
decodeUserOption,
@@ -30,7 +30,7 @@ import {
encodeUserOptionUpdate,
UserOptionUpdateResponse,
decodeUserOptionUpdate
-} from '../models/user-option';
+} from '../protocols/user-option';
@Injectable({
providedIn: 'root'
diff --git a/projects/ucap-webmessenger-protocol-info/src/public-api.ts b/projects/ucap-webmessenger-protocol-info/src/public-api.ts
index 07f45e4c..5d005532 100644
--- a/projects/ucap-webmessenger-protocol-info/src/public-api.ts
+++ b/projects/ucap-webmessenger-protocol-info/src/public-api.ts
@@ -2,9 +2,9 @@
* Public API Surface of ucap-webmessenger-protocol-info
*/
-export * from './lib/models/status';
-export * from './lib/models/user-option';
-export * from './lib/models/user';
+export * from './lib/protocols/status';
+export * from './lib/protocols/user-option';
+export * from './lib/protocols/user';
export * from './lib/services/info-protocol.service';
diff --git a/projects/ucap-webmessenger-protocol-inner/src/lib/models/conn.ts b/projects/ucap-webmessenger-protocol-inner/src/lib/protocols/conn.ts
similarity index 100%
rename from projects/ucap-webmessenger-protocol-inner/src/lib/models/conn.ts
rename to projects/ucap-webmessenger-protocol-inner/src/lib/protocols/conn.ts
diff --git a/projects/ucap-webmessenger-protocol-inner/src/lib/services/inner-protocol.service.ts b/projects/ucap-webmessenger-protocol-inner/src/lib/services/inner-protocol.service.ts
index fee603f5..990b6f3d 100644
--- a/projects/ucap-webmessenger-protocol-inner/src/lib/services/inner-protocol.service.ts
+++ b/projects/ucap-webmessenger-protocol-inner/src/lib/services/inner-protocol.service.ts
@@ -10,7 +10,7 @@ import {
ConnRequest,
encodeConn,
decodeConn
-} from '../models/conn';
+} from '../protocols/conn';
import { SVC_TYPE_INNER, SSVC_TYPE_CONN_REQ } from '../types/service';
@Injectable({
diff --git a/projects/ucap-webmessenger-protocol-inner/src/public-api.ts b/projects/ucap-webmessenger-protocol-inner/src/public-api.ts
index 1fdd7fef..f1a39c07 100644
--- a/projects/ucap-webmessenger-protocol-inner/src/public-api.ts
+++ b/projects/ucap-webmessenger-protocol-inner/src/public-api.ts
@@ -2,6 +2,8 @@
* Public API Surface of ucap-webmessenger-protocol-inner
*/
+export * from './lib/protocols/conn';
+
export * from './lib/services/inner-protocol.service';
export * from './lib/ucap-inner-protocol.module';
diff --git a/projects/ucap-webmessenger-protocol-option/src/lib/models/call-update.ts b/projects/ucap-webmessenger-protocol-option/src/lib/protocols/call-update.ts
similarity index 98%
rename from projects/ucap-webmessenger-protocol-option/src/lib/models/call-update.ts
rename to projects/ucap-webmessenger-protocol-option/src/lib/protocols/call-update.ts
index dfb34efa..25e6f0aa 100644
--- a/projects/ucap-webmessenger-protocol-option/src/lib/models/call-update.ts
+++ b/projects/ucap-webmessenger-protocol-option/src/lib/protocols/call-update.ts
@@ -14,7 +14,6 @@ import {
CallForwardType
} from '@ucap-webmessenger/core';
-// tslint:disable-next-line: no-empty-interface
export interface CallUpdateRequest extends ProtocolRequest {
// 0 IPPhoneYN(s)
useIpPhone: boolean;
diff --git a/projects/ucap-webmessenger-protocol-option/src/lib/models/call-view.ts b/projects/ucap-webmessenger-protocol-option/src/lib/protocols/call-view.ts
similarity index 100%
rename from projects/ucap-webmessenger-protocol-option/src/lib/models/call-view.ts
rename to projects/ucap-webmessenger-protocol-option/src/lib/protocols/call-view.ts
diff --git a/projects/ucap-webmessenger-protocol-option/src/lib/models/reg-update.ts b/projects/ucap-webmessenger-protocol-option/src/lib/protocols/reg-update.ts
similarity index 98%
rename from projects/ucap-webmessenger-protocol-option/src/lib/models/reg-update.ts
rename to projects/ucap-webmessenger-protocol-option/src/lib/protocols/reg-update.ts
index ab69df7f..c4376e03 100644
--- a/projects/ucap-webmessenger-protocol-option/src/lib/models/reg-update.ts
+++ b/projects/ucap-webmessenger-protocol-option/src/lib/protocols/reg-update.ts
@@ -10,7 +10,6 @@ import {
PacketBodyValue
} from '@ucap-webmessenger/protocol';
-// tslint:disable-next-line: no-empty-interface
export interface RegUpdateRequest extends ProtocolRequest {
// 0 알림방법(n)
notificationMethod: NotificationMethod;
diff --git a/projects/ucap-webmessenger-protocol-option/src/lib/models/reg-view.ts b/projects/ucap-webmessenger-protocol-option/src/lib/protocols/reg-view.ts
similarity index 100%
rename from projects/ucap-webmessenger-protocol-option/src/lib/models/reg-view.ts
rename to projects/ucap-webmessenger-protocol-option/src/lib/protocols/reg-view.ts
diff --git a/projects/ucap-webmessenger-protocol-option/src/lib/models/update.ts b/projects/ucap-webmessenger-protocol-option/src/lib/protocols/update.ts
similarity index 97%
rename from projects/ucap-webmessenger-protocol-option/src/lib/models/update.ts
rename to projects/ucap-webmessenger-protocol-option/src/lib/protocols/update.ts
index b6646199..5c867bba 100644
--- a/projects/ucap-webmessenger-protocol-option/src/lib/models/update.ts
+++ b/projects/ucap-webmessenger-protocol-option/src/lib/protocols/update.ts
@@ -8,7 +8,6 @@ import {
PacketBodyValue
} from '@ucap-webmessenger/protocol';
-// tslint:disable-next-line: no-empty-interface
export interface UpdateRequest extends ProtocolRequest {
// 알람여부(y)
receiveAlarm: boolean;
diff --git a/projects/ucap-webmessenger-protocol-option/src/lib/models/view.ts b/projects/ucap-webmessenger-protocol-option/src/lib/protocols/view.ts
similarity index 100%
rename from projects/ucap-webmessenger-protocol-option/src/lib/models/view.ts
rename to projects/ucap-webmessenger-protocol-option/src/lib/protocols/view.ts
diff --git a/projects/ucap-webmessenger-protocol-option/src/lib/services/option-protocol.service.ts b/projects/ucap-webmessenger-protocol-option/src/lib/services/option-protocol.service.ts
index 99d10f05..bcba489d 100644
--- a/projects/ucap-webmessenger-protocol-option/src/lib/services/option-protocol.service.ts
+++ b/projects/ucap-webmessenger-protocol-option/src/lib/services/option-protocol.service.ts
@@ -18,37 +18,37 @@ import {
decodeView,
ViewRequest,
ViewResponse
-} from '../models/view';
+} from '../protocols/view';
import {
UpdateRequest,
UpdateResponse,
encodeUpdate,
decodeUpdate
-} from '../models/update';
+} from '../protocols/update';
import {
RegViewRequest,
RegViewResponse,
encodeRegView,
decodeRegView
-} from '../models/reg-view';
+} from '../protocols/reg-view';
import {
RegUpdateRequest,
RegUpdateResponse,
encodeRegUpdate,
decodeRegUpdate
-} from '../models/reg-update';
+} from '../protocols/reg-update';
import {
CallViewRequest,
CallViewResponse,
encodeCallView,
decodeCallView
-} from '../models/call-view';
+} from '../protocols/call-view';
import {
CallUpdateRequest,
CallUpdateResponse,
encodeCallUpdate,
decodeCallUpdate
-} from '../models/call-update';
+} from '../protocols/call-update';
@Injectable({
providedIn: 'root'
diff --git a/projects/ucap-webmessenger-protocol-option/src/public-api.ts b/projects/ucap-webmessenger-protocol-option/src/public-api.ts
index 59c5c147..2cc02cc4 100644
--- a/projects/ucap-webmessenger-protocol-option/src/public-api.ts
+++ b/projects/ucap-webmessenger-protocol-option/src/public-api.ts
@@ -2,12 +2,12 @@
* Public API Surface of ucap-webmessenger-protocol-option
*/
-export * from './lib/models/call-update';
-export * from './lib/models/call-view';
-export * from './lib/models/reg-update';
-export * from './lib/models/reg-view';
-export * from './lib/models/update';
-export * from './lib/models/view';
+export * from './lib/protocols/call-update';
+export * from './lib/protocols/call-view';
+export * from './lib/protocols/reg-update';
+export * from './lib/protocols/reg-view';
+export * from './lib/protocols/update';
+export * from './lib/protocols/view';
export * from './lib/services/option-protocol.service';
diff --git a/projects/ucap-webmessenger-protocol-ping/src/lib/protocols/ping.ts b/projects/ucap-webmessenger-protocol-ping/src/lib/protocols/ping.ts
new file mode 100644
index 00000000..f0db9e61
--- /dev/null
+++ b/projects/ucap-webmessenger-protocol-ping/src/lib/protocols/ping.ts
@@ -0,0 +1,34 @@
+import {
+ ProtocolRequest,
+ ProtocolResponse,
+ ProtocolEncoder,
+ PacketBody,
+ ProtocolDecoder,
+ ProtocolMessage,
+ PacketBodyValue
+} from '@ucap-webmessenger/protocol';
+
+export interface PingRequest extends ProtocolRequest {
+ /** 상태코드(s) */
+ statusCode: string;
+}
+
+// tslint:disable-next-line: no-empty-interface
+export interface PingResponse extends ProtocolResponse {}
+
+export const encodePing: ProtocolEncoder = (req: PingRequest) => {
+ const bodyList: PacketBody[] = [];
+
+ bodyList.push({
+ type: PacketBodyValue.String,
+ value: req.statusCode
+ });
+
+ return bodyList;
+};
+
+export const decodePing: ProtocolDecoder = (
+ message: ProtocolMessage
+) => {
+ return {} as PingResponse;
+};
diff --git a/projects/ucap-webmessenger-protocol-ping/src/lib/services/ping-protocol.service.ts b/projects/ucap-webmessenger-protocol-ping/src/lib/services/ping-protocol.service.ts
index 82e533fd..2e570501 100644
--- a/projects/ucap-webmessenger-protocol-ping/src/lib/services/ping-protocol.service.ts
+++ b/projects/ucap-webmessenger-protocol-ping/src/lib/services/ping-protocol.service.ts
@@ -1,8 +1,29 @@
import { Injectable } from '@angular/core';
+import { ProtocolService } from '@ucap-webmessenger/protocol';
+
+import { Observable } from 'rxjs';
+import { take, map } from 'rxjs/operators';
+
+import {
+ PingRequest,
+ PingResponse,
+ encodePing,
+ decodePing
+} from '../protocols/ping';
+import { SVC_TYPE_PING, SSVC_TYPE_PING_REQ } from '../types/service';
@Injectable({
providedIn: 'root'
})
export class PingProtocolService {
- constructor() {}
+ constructor(private protocolService: ProtocolService) {}
+
+ public ping(req: PingRequest): Observable {
+ return this.protocolService
+ .call(SVC_TYPE_PING, SSVC_TYPE_PING_REQ, ...encodePing(req))
+ .pipe(
+ take(1),
+ map(res => decodePing(res))
+ );
+ }
}
diff --git a/projects/ucap-webmessenger-protocol-ping/src/lib/types/service.ts b/projects/ucap-webmessenger-protocol-ping/src/lib/types/service.ts
new file mode 100644
index 00000000..044a5d7f
--- /dev/null
+++ b/projects/ucap-webmessenger-protocol-ping/src/lib/types/service.ts
@@ -0,0 +1,4 @@
+export const SVC_TYPE_PING = 99;
+
+export const SSVC_TYPE_PING_REQ = 1;
+export const SSVC_TYPE_PING_RES = 2;
diff --git a/projects/ucap-webmessenger-protocol-ping/src/public-api.ts b/projects/ucap-webmessenger-protocol-ping/src/public-api.ts
index 6e0259ee..82235eff 100644
--- a/projects/ucap-webmessenger-protocol-ping/src/public-api.ts
+++ b/projects/ucap-webmessenger-protocol-ping/src/public-api.ts
@@ -4,4 +4,6 @@
export * from './lib/services/ping-protocol.service';
+export * from './lib/types/service';
+
export * from './lib/ucap-ping-protocol.module';
diff --git a/projects/ucap-webmessenger-protocol-query/src/lib/models/dept-info.ts b/projects/ucap-webmessenger-protocol-query/src/lib/models/dept-info.ts
new file mode 100644
index 00000000..4d3ea6a2
--- /dev/null
+++ b/projects/ucap-webmessenger-protocol-query/src/lib/models/dept-info.ts
@@ -0,0 +1,26 @@
+import { DeptType } from '../types/dept.type';
+
+export interface DeptInfo {
+ // 부서SEQ
+ seq: number;
+ // 부서명
+ name: string;
+ // 기관코드
+ companyCode: string;
+ // 부서타입
+ type: DeptType;
+ // 본부SEQ
+ rootSeq: number;
+ // 상위부서SEQ
+ parentSeq: number;
+ // 조회순서
+ order: string;
+ // 조회레벨
+ depth: number;
+ // ActiveYN
+ isActive: boolean;
+ // 부서명(영어)
+ nameEn: string;
+ // 부서명(중국어)
+ nameCn: string;
+}
diff --git a/projects/ucap-webmessenger-protocol-query/src/lib/models/user-info-dn.ts b/projects/ucap-webmessenger-protocol-query/src/lib/models/user-info-dn.ts
new file mode 100644
index 00000000..2375e75b
--- /dev/null
+++ b/projects/ucap-webmessenger-protocol-query/src/lib/models/user-info-dn.ts
@@ -0,0 +1,52 @@
+import { RoleCode } from '@ucap-webmessenger/protocol-authentication';
+
+export interface UserInfoDN {
+ /** 사용자SEQ */
+ seq: number;
+ /** 사용자명 */
+ name: string;
+ /** 사진파일 */
+ profileImageFile: string;
+ /** 직급 */
+ grade: string;
+ /** 업무소개 */
+ intro: string;
+ // 기관코드
+ companyCode: string;
+ // 핸드폰번호
+ hpNumber: string;
+ // 내선번호
+ lineNumber: string;
+ // 이메일
+ email: string;
+ // 모바일YN
+ isMobile: boolean;
+ // 조회순서
+ order: string;
+ // ActiveYN
+ isActive: boolean;
+ // 역할코드
+ roleCd: RoleCode;
+ // 사번
+ employeeNum: string;
+ // 부서명
+ deptName: string;
+ // MADN
+ madn: string;
+ // HARDPHONE_SADN
+ hardSadn: string;
+ // FMC_SADN
+ fmcSadn: string;
+ // 사용자명(영어)
+ nameEn: string;
+ // 사용자명(중국어)
+ nameCn: string;
+ // 직급(영어)
+ gradeEn: string;
+ // 직급(중국어)
+ gradeCn: string;
+ // 부서명(영어)
+ deptNameEn: string;
+ // 부서명(중국어)
+ deptNameCn: string;
+}
diff --git a/projects/ucap-webmessenger-protocol-query/src/lib/models/user-info-f.ts b/projects/ucap-webmessenger-protocol-query/src/lib/models/user-info-f.ts
new file mode 100644
index 00000000..6f8536f8
--- /dev/null
+++ b/projects/ucap-webmessenger-protocol-query/src/lib/models/user-info-f.ts
@@ -0,0 +1,63 @@
+import { EmployeeType } from '@ucap-webmessenger/protocol-room';
+import { RoleCode } from '@ucap-webmessenger/protocol-authentication';
+
+export interface UserInfoF {
+ // 사용자SEQ
+ seq: number;
+ // 사용자명
+ name: string;
+ // 사진파일
+ profileImageFile: string;
+ // 직급
+ grade: string;
+ // 업무소개
+ intro: string;
+ // 기관코드
+ companyCode: string;
+ // 핸드폰번호
+ hpNumber: string;
+ // 내선번호
+ lineNumber: string;
+ // 이메일
+ email: string;
+ // 모바일YN
+ isMobile: boolean;
+ // 부서명
+ deptName: string;
+ // 즐.찾 여부
+ isFavorit: boolean;
+ // 친구여부
+ isBuddy: boolean;
+ // ActiveYN
+ isActive: boolean;
+ // 역할코드
+ roleCd: RoleCode;
+ // 사번
+ employeeNum: string;
+ // MADN
+ madn: string;
+ // HARDPHONE_SADN
+ hardSadn: string;
+ // FMC_SADN
+ fmcSadn: string;
+ // 사용자명(영어)
+ nameEn: string;
+ // 사용자명(중국어)
+ nameCn: string;
+ // 직급(영어)
+ gradeEn: string;
+ // 직급(중국어)
+ gradeCn: string;
+ // 부서명(영어)
+ deptNameEn: string;
+ // 부서명(중국어)
+ deptNameCn: string;
+ // 이용약관동의여부YN
+ isPrivacyAgree: boolean;
+ // 유효접속여부YN
+ isValidLogin: boolean;
+ // 임직원유형(s)
+ employeeType: EmployeeType;
+ // 별명
+ nickName: string;
+}
diff --git a/projects/ucap-webmessenger-protocol-query/src/lib/models/user-info-ss.ts b/projects/ucap-webmessenger-protocol-query/src/lib/models/user-info-ss.ts
new file mode 100644
index 00000000..6883118a
--- /dev/null
+++ b/projects/ucap-webmessenger-protocol-query/src/lib/models/user-info-ss.ts
@@ -0,0 +1,64 @@
+import { RoleCode } from '@ucap-webmessenger/protocol-authentication';
+import { CallMode } from '@ucap-webmessenger/core';
+import { EmployeeType } from '@ucap-webmessenger/protocol-room';
+
+export interface UserInfoSS {
+ /** 사용자SEQ */
+ seq: number;
+ /** 사용자명 */
+ name: string;
+ /** 사진파일 */
+ profileImageFile: string;
+ /** 직급 */
+ grade: string;
+ /** 업무소개 */
+ intro: string;
+ /** 기관코드 */
+ companyCode: string;
+ /** 핸드폰번호 */
+ hpNumber: string;
+ /** 내선번호 */
+ lineNumber: string;
+ /** 이메일 */
+ email: string;
+ /** 모바일YN */
+ isMobile: boolean;
+ /** 부서명 */
+ deptName: string;
+ /** 조회순서 */
+ order: string;
+ /** ActiveYN */
+ isActive: boolean;
+ /** 역할코드 */
+ roleCd: RoleCode;
+ /** 사번 */
+ employeeNum: string;
+ /** MADN */
+ madn: string;
+ /** HARDPHONE_SADN */
+ hardSadn: string;
+ /** FMC_SADN */
+ fmcSadn: string;
+ /** CALL_MODE */
+ callMode: CallMode;
+ /** 사용자명(영어) */
+ nameEn: string;
+ /** 사용자명(중국어) */
+ nameCn: string;
+ /** 직급(영어) */
+ gradeEn: string;
+ /** 직급(중국어) */
+ gradeCn: string;
+ /** 부서명(영어) */
+ deptNameEn: string;
+ /** 부서명(중국어) */
+ deptNameCn: string;
+ /** 부서SEQ */
+ deptSeq: number;
+ /** 이용약관동의여부YN */
+ isPrivacyAgree: boolean;
+ /** 유효접속여부YN */
+ isValidLogin: boolean;
+ /** 임직원유형(s) */
+ employeeType: EmployeeType;
+}
diff --git a/projects/ucap-webmessenger-protocol-query/src/lib/models/user-seq-info.ts b/projects/ucap-webmessenger-protocol-query/src/lib/models/user-seq-info.ts
new file mode 100644
index 00000000..75550f46
--- /dev/null
+++ b/projects/ucap-webmessenger-protocol-query/src/lib/models/user-seq-info.ts
@@ -0,0 +1,10 @@
+export interface UserSeqInfo {
+ // 로그인ID
+ id: string;
+ // 사용자SEQ
+ seq: number;
+ // 모바일YN
+ isMobile: boolean;
+ // 회사코드
+ companyCode: string;
+}
diff --git a/projects/ucap-webmessenger-protocol-query/src/lib/models/auth.ts b/projects/ucap-webmessenger-protocol-query/src/lib/protocols/auth.ts
similarity index 100%
rename from projects/ucap-webmessenger-protocol-query/src/lib/models/auth.ts
rename to projects/ucap-webmessenger-protocol-query/src/lib/protocols/auth.ts
diff --git a/projects/ucap-webmessenger-protocol-query/src/lib/models/data-user-ext.ts b/projects/ucap-webmessenger-protocol-query/src/lib/protocols/data-user-ext.ts
similarity index 100%
rename from projects/ucap-webmessenger-protocol-query/src/lib/models/data-user-ext.ts
rename to projects/ucap-webmessenger-protocol-query/src/lib/protocols/data-user-ext.ts
diff --git a/projects/ucap-webmessenger-protocol-query/src/lib/models/data-user.ts b/projects/ucap-webmessenger-protocol-query/src/lib/protocols/data-user.ts
similarity index 97%
rename from projects/ucap-webmessenger-protocol-query/src/lib/models/data-user.ts
rename to projects/ucap-webmessenger-protocol-query/src/lib/protocols/data-user.ts
index 595aed4d..af406bc0 100644
--- a/projects/ucap-webmessenger-protocol-query/src/lib/models/data-user.ts
+++ b/projects/ucap-webmessenger-protocol-query/src/lib/protocols/data-user.ts
@@ -10,7 +10,7 @@ import {
} from '@ucap-webmessenger/protocol';
import { EmployeeType } from '@ucap-webmessenger/protocol-room';
import { RoleCode } from '@ucap-webmessenger/protocol-authentication';
-import { UserInfoSS } from './dept-user';
+import { UserInfoSS } from '../models/user-info-ss';
export interface DataUserRequest extends ProtocolRequest {
// DivCD(s)
diff --git a/projects/ucap-webmessenger-protocol-query/src/lib/models/dept-user.ts b/projects/ucap-webmessenger-protocol-query/src/lib/protocols/dept-user.ts
similarity index 68%
rename from projects/ucap-webmessenger-protocol-query/src/lib/models/dept-user.ts
rename to projects/ucap-webmessenger-protocol-query/src/lib/protocols/dept-user.ts
index d487db6f..3bc97615 100644
--- a/projects/ucap-webmessenger-protocol-query/src/lib/models/dept-user.ts
+++ b/projects/ucap-webmessenger-protocol-query/src/lib/protocols/dept-user.ts
@@ -13,102 +13,43 @@ import { EmployeeType } from '@ucap-webmessenger/protocol-room';
import { RoleCode } from '@ucap-webmessenger/protocol-authentication';
import { DeptSearchType } from '../types/dept-search.type';
import { CallMode } from '@ucap-webmessenger/core';
+import { UserInfoSS } from '../models/user-info-ss';
export interface DeptUserRequest extends ProtocolRequest {
- // DivCD(s)
+ /** DivCD(s) */
divCd: string;
- // 기관코드(s)
+ /** 기관코드(s) */
companyCode: string;
- // 부서SEQ(n)
+ /** 부서SEQ(n) */
seq?: number;
- // 검색string(s)
+ /** 검색string(s) */
search?: string;
- // 검색범위(s)
+ /** 검색범위(s) */
searchRange: DeptSearchType;
- // 요청리스트(n) 사용안하면 0 최대 200
+ /** 요청리스트(n) 사용안하면 0 최대 200 */
pageListCount?: number;
- // 요청페이지(n) 사용안하면 0 처음은 1
+ /** 요청페이지(n) 사용안하면 0 처음은 1 */
pageCurrent?: number;
- // 발신자회사코드(s)
+ /** 발신자회사코드(s) */
senderCompanyCode: string;
- // 발신자임직원유형(s)
+ /** 발신자임직원유형(s) */
senderEmployeeType: EmployeeType;
}
-export interface UserInfoSS {
- // 사용자SEQ
- seq: number;
- // 사용자명
- name: string;
- // 사진파일
- profileImageFile: string;
- // 직급
- grade: string;
- // 업무소개
- intro: string;
- // 기관코드
- companyCode: string;
- // 핸드폰번호
- hpNumber: string;
- // 내선번호
- lineNumber: string;
- // 이메일
- email: string;
- // 모바일YN
- isMobile: boolean;
- // 부서명
- deptName: string;
- // 조회순서
- order: string;
- // ActiveYN
- isActive: boolean;
- // 역할코드
- roleCd: RoleCode;
- // 사번
- employeeNum: string;
- // MADN
- madn: string;
- // HARDPHONE_SADN
- hardSadn: string;
- // FMC_SADN
- fmcSadn: string;
- // CALL_MODE
- callMode: CallMode;
- // 사용자명(영어)
- nameEn: string;
- // 사용자명(중국어)
- nameCn: string;
- // 직급(영어)
- gradeEn: string;
- // 직급(중국어)
- gradeCn: string;
- // 부서명(영어)
- deptNameEn: string;
- // 부서명(중국어)
- deptNameCn: string;
- // 부서SEQ
- deptSeq: number;
- // 이용약관동의여부YN
- isPrivacyAgree: boolean;
- // 유효접속여부YN
- isValidLogin: boolean;
- // 임직원유형(s)
- employeeType: EmployeeType;
-}
export interface DeptUserData extends ProtocolStream {
- // DivCD(s)
+ /** DivCD(s) */
divCd: string;
- // {부서정보-S}...
+ /** {부서정보-S}... */
userInfos: UserInfoSS[];
}
export interface DeptUserResponse extends ProtocolResponse {
- // DivCD(s)
+ /** DivCD(s) */
divCd: string;
- // 전체갯수(n)
+ /** 전체갯수(n) */
pageTotalCount: number;
- // 요청리스트(n)
+ /** 요청리스트(n) */
pageListCount?: number;
- // 페이지(n)
+ /** 페이지(n) */
pageCurrent?: number;
}
diff --git a/projects/ucap-webmessenger-protocol-query/src/lib/models/dept.ts b/projects/ucap-webmessenger-protocol-query/src/lib/protocols/dept.ts
similarity index 80%
rename from projects/ucap-webmessenger-protocol-query/src/lib/models/dept.ts
rename to projects/ucap-webmessenger-protocol-query/src/lib/protocols/dept.ts
index 3026a45a..7b1149db 100644
--- a/projects/ucap-webmessenger-protocol-query/src/lib/models/dept.ts
+++ b/projects/ucap-webmessenger-protocol-query/src/lib/protocols/dept.ts
@@ -10,6 +10,7 @@ import {
ProtocolStream
} from '@ucap-webmessenger/protocol';
import { DeptType } from '../types/dept.type';
+import { DeptInfo } from '../models/dept-info';
export interface DeptRequest extends ProtocolRequest {
// DivCD(s)
@@ -18,30 +19,6 @@ export interface DeptRequest extends ProtocolRequest {
companyCode: string;
}
-export interface DeptInfo {
- // 부서SEQ
- seq: number;
- // 부서명
- name: string;
- // 기관코드
- companyCode: string;
- // 부서타입
- type: DeptType;
- // 본부SEQ
- rootSeq: number;
- // 상위부서SEQ
- parentSeq: number;
- // 조회순서
- order: string;
- // 조회레벨
- depth: number;
- // ActiveYN
- isActive: boolean;
- // 부서명(영어)
- nameEn: string;
- // 부서명(중국어)
- nameCn: string;
-}
export interface DeptData extends ProtocolStream {
// DivCD(s)
divCd: string;
diff --git a/projects/ucap-webmessenger-protocol-query/src/lib/models/user-dn.ts b/projects/ucap-webmessenger-protocol-query/src/lib/protocols/user-dn.ts
similarity index 78%
rename from projects/ucap-webmessenger-protocol-query/src/lib/models/user-dn.ts
rename to projects/ucap-webmessenger-protocol-query/src/lib/protocols/user-dn.ts
index cf299d3a..02c3f606 100644
--- a/projects/ucap-webmessenger-protocol-query/src/lib/models/user-dn.ts
+++ b/projects/ucap-webmessenger-protocol-query/src/lib/protocols/user-dn.ts
@@ -12,6 +12,7 @@ import {
import { EmployeeType } from '@ucap-webmessenger/protocol-room';
import { RoleCode } from '@ucap-webmessenger/protocol-authentication';
import { UserDnSearchType } from '../types/user-dn-search.type';
+import { UserInfoDN } from '../models/user-info-dn';
export interface UserDnRequest extends ProtocolRequest {
// DivCD(s)
@@ -34,56 +35,6 @@ export interface UserDnRequest extends ProtocolRequest {
senderEmployeeType: EmployeeType;
}
-export interface UserInfoDN {
- // 사용자SEQ
- seq: number;
- // 사용자명
- name: string;
- // 사진파일
- profileImageFile: string;
- // 직급
- grade: string;
- // 업무소개
- intro: string;
- // 기관코드
- companyCode: string;
- // 핸드폰번호
- hpNumber: string;
- // 내선번호
- lineNumber: string;
- // 이메일
- email: string;
- // 모바일YN
- isMobile: boolean;
- // 조회순서
- order: string;
- // ActiveYN
- isActive: boolean;
- // 역할코드
- roleCd: RoleCode;
- // 사번
- employeeNum: string;
- // 부서명
- deptName: string;
- // MADN
- madn: string;
- // HARDPHONE_SADN
- hardSadn: string;
- // FMC_SADN
- fmcSadn: string;
- // 사용자명(영어)
- nameEn: string;
- // 사용자명(중국어)
- nameCn: string;
- // 직급(영어)
- gradeEn: string;
- // 직급(중국어)
- gradeCn: string;
- // 부서명(영어)
- deptNameEn: string;
- // 부서명(중국어)
- deptNameCn: string;
-}
export interface UserDnData extends ProtocolStream {
// DivCD(s)
divCd: string;
diff --git a/projects/ucap-webmessenger-protocol-query/src/lib/models/user-id.ts b/projects/ucap-webmessenger-protocol-query/src/lib/protocols/user-id.ts
similarity index 91%
rename from projects/ucap-webmessenger-protocol-query/src/lib/models/user-id.ts
rename to projects/ucap-webmessenger-protocol-query/src/lib/protocols/user-id.ts
index 5dc94f41..1eb71a16 100644
--- a/projects/ucap-webmessenger-protocol-query/src/lib/models/user-id.ts
+++ b/projects/ucap-webmessenger-protocol-query/src/lib/protocols/user-id.ts
@@ -10,6 +10,7 @@ import {
ProtocolStream
} from '@ucap-webmessenger/protocol';
import { EmployeeType } from '@ucap-webmessenger/protocol-room';
+import { UserSeqInfo } from '../models/user-seq-info';
export interface UserIdRequest extends ProtocolRequest {
// DivCD(s)
@@ -21,22 +22,14 @@ export interface UserIdRequest extends ProtocolRequest {
// 발신자임직원유형(s)
senderEmployeeType: EmployeeType;
}
-export interface UserSeqInfo {
- // 로그인ID
- id: string;
- // 사용자SEQ
- seq: number;
- // 모바일YN
- isMobile: boolean;
- // 회사코드
- companyCode: string;
-}
+
export interface UserIdData extends ProtocolStream {
// DivCD(s)
divCd: string;
// {SEQ정보}1...
userSeqInfos: UserSeqInfo[];
}
+
export interface UserIdResponse extends ProtocolResponse {
// DivCD(s)
divCd: string;
diff --git a/projects/ucap-webmessenger-protocol-query/src/lib/models/user-seq.ts b/projects/ucap-webmessenger-protocol-query/src/lib/protocols/user-seq.ts
similarity index 78%
rename from projects/ucap-webmessenger-protocol-query/src/lib/models/user-seq.ts
rename to projects/ucap-webmessenger-protocol-query/src/lib/protocols/user-seq.ts
index 989103eb..341662f2 100644
--- a/projects/ucap-webmessenger-protocol-query/src/lib/models/user-seq.ts
+++ b/projects/ucap-webmessenger-protocol-query/src/lib/protocols/user-seq.ts
@@ -10,7 +10,8 @@ import {
} from '@ucap-webmessenger/protocol';
import { EmployeeType } from '@ucap-webmessenger/protocol-room';
import { RoleCode } from '@ucap-webmessenger/protocol-authentication';
-import { UserInfoSS } from './dept-user';
+import { UserInfoF } from '../models/user-info-f';
+import { UserInfoSS } from '../models/user-info-ss';
export interface UserSeqRequest extends ProtocolRequest {
// DivCD(s)
@@ -26,66 +27,7 @@ export interface UserSeqRequest extends ProtocolRequest {
// 발신자임직원유형(s)
senderEmployeeType: EmployeeType;
}
-export interface UserInfoF {
- // 사용자SEQ
- seq: number;
- // 사용자명
- name: string;
- // 사진파일
- profileImageFile: string;
- // 직급
- grade: string;
- // 업무소개
- intro: string;
- // 기관코드
- companyCode: string;
- // 핸드폰번호
- hpNumber: string;
- // 내선번호
- lineNumber: string;
- // 이메일
- email: string;
- // 모바일YN
- isMobile: boolean;
- // 부서명
- deptName: string;
- // 즐.찾 여부
- isFavorit: boolean;
- // 친구여부
- isBuddy: boolean;
- // ActiveYN
- isActive: boolean;
- // 역할코드
- roleCd: RoleCode;
- // 사번
- employeeNum: string;
- // MADN
- madn: string;
- // HARDPHONE_SADN
- hardSadn: string;
- // FMC_SADN
- fmcSadn: string;
- // 사용자명(영어)
- nameEn: string;
- // 사용자명(중국어)
- nameCn: string;
- // 직급(영어)
- gradeEn: string;
- // 직급(중국어)
- gradeCn: string;
- // 부서명(영어)
- deptNameEn: string;
- // 부서명(중국어)
- deptNameCn: string;
- // 이용약관동의여부YN
- isPrivacyAgree: boolean;
- // 유효접속여부YN
- isValidLogin: boolean;
- // 임직원유형(s)
- employeeType: EmployeeType;
- // 별명
- nickName: string;
-}
+
export interface UserSeqData extends ProtocolStream {
// DivCD(s)
divCd: string;
diff --git a/projects/ucap-webmessenger-protocol-query/src/lib/services/query-protocol.service.ts b/projects/ucap-webmessenger-protocol-query/src/lib/services/query-protocol.service.ts
index 26abcd33..f4d875d4 100644
--- a/projects/ucap-webmessenger-protocol-query/src/lib/services/query-protocol.service.ts
+++ b/projects/ucap-webmessenger-protocol-query/src/lib/services/query-protocol.service.ts
@@ -7,7 +7,7 @@ import {
AuthResponse,
encodeAuth,
decodeAuth
-} from '../models/auth';
+} from '../protocols/auth';
import {
SVC_TYPE_QUERY_DATA,
SSVC_TYPE_QUERY_AUTH_REQ,
@@ -40,7 +40,7 @@ import {
decodeDept,
decodeDeptData,
DeptData
-} from '../models/dept';
+} from '../protocols/dept';
import {
encodeDeptUser,
decodeDeptUser,
@@ -48,7 +48,7 @@ import {
DeptUserRequest,
DeptUserData,
DeptUserResponse
-} from '../models/dept-user';
+} from '../protocols/dept-user';
import {
UserSeqData,
UserSeqData2,
@@ -56,7 +56,7 @@ import {
decodeUserSeqData,
decodeUserSeqData2,
UserSeqRequest
-} from '../models/user-seq';
+} from '../protocols/user-seq';
import {
UserIdRequest,
UserIdResponse,
@@ -64,7 +64,7 @@ import {
encodeUserId,
decodeUserId,
decodeUserIdData
-} from '../models/user-id';
+} from '../protocols/user-id';
import {
UserDnRequest,
UserDnResponse,
@@ -72,19 +72,19 @@ import {
encodeUserDn,
decodeUserDnData,
decodeUserDn
-} from '../models/user-dn';
+} from '../protocols/user-dn';
import {
DataUserRequest,
DataUserResponse,
encodeDataUser,
decodeDataUser
-} from '../models/data-user';
+} from '../protocols/data-user';
import {
DataUserExtRequest,
DataUserExtResponse,
encodeDataUserExt,
decodeDataUserExt
-} from '../models/data-user-ext';
+} from '../protocols/data-user-ext';
@Injectable({
providedIn: 'root'
diff --git a/projects/ucap-webmessenger-protocol-query/src/public-api.ts b/projects/ucap-webmessenger-protocol-query/src/public-api.ts
index 0b072b39..185d4895 100644
--- a/projects/ucap-webmessenger-protocol-query/src/public-api.ts
+++ b/projects/ucap-webmessenger-protocol-query/src/public-api.ts
@@ -2,14 +2,20 @@
* Public API Surface of ucap-webmessenger-protocol-query
*/
-export * from './lib/models/auth';
-export * from './lib/models/data-user-ext';
-export * from './lib/models/data-user';
-export * from './lib/models/dept-user';
-export * from './lib/models/dept';
-export * from './lib/models/user-dn';
-export * from './lib/models/user-id';
-export * from './lib/models/user-seq';
+export * from './lib/models/dept-info';
+export * from './lib/models/user-info-dn';
+export * from './lib/models/user-info-f';
+export * from './lib/models/user-info-ss';
+export * from './lib/models/user-seq-info';
+
+export * from './lib/protocols/auth';
+export * from './lib/protocols/data-user-ext';
+export * from './lib/protocols/data-user';
+export * from './lib/protocols/dept-user';
+export * from './lib/protocols/dept';
+export * from './lib/protocols/user-dn';
+export * from './lib/protocols/user-id';
+export * from './lib/protocols/user-seq';
export * from './lib/services/query-protocol.service';
diff --git a/projects/ucap-webmessenger-protocol-room/src/lib/models/room-info.ts b/projects/ucap-webmessenger-protocol-room/src/lib/models/room-info.ts
new file mode 100644
index 00000000..412b89af
--- /dev/null
+++ b/projects/ucap-webmessenger-protocol-room/src/lib/models/room-info.ts
@@ -0,0 +1,31 @@
+import { RoomType } from '../types/room.type';
+import { EventType } from '@ucap-webmessenger/protocol-event';
+
+export interface RoomInfo {
+ // 0. 대화방SEQ
+ roomSeq: string;
+ // 1. 대화방종류
+ roomType: RoomType;
+ // 2. 대화방명
+ roomName: string;
+ // 3. 최종타입
+ finalEventType: EventType;
+ // 4. 최종대화
+ finalEventMessage: string;
+ // 5. 최종시간
+ finalEventDate: string;
+ // 6. 참여인원수
+ joinUserCount: number;
+ // 7. 안읽은수
+ noReadCnt: number;
+ // 8. 알람여부
+ isAlarm: boolean;
+ // 9. 참여여부
+ isJoinRoom: boolean;
+ // 10. 유효한파일 이벤트 기준 SEQ
+ expiredFileStdSeq: number;
+ // 11. 타이머대화방여부YN
+ isTimeRoom: boolean;
+ // 12. 타이머시간(n)
+ timeRoomInterval: number;
+}
diff --git a/projects/ucap-webmessenger-protocol-room/src/lib/models/user-info-short.ts b/projects/ucap-webmessenger-protocol-room/src/lib/models/user-info-short.ts
new file mode 100644
index 00000000..5be97c66
--- /dev/null
+++ b/projects/ucap-webmessenger-protocol-room/src/lib/models/user-info-short.ts
@@ -0,0 +1,32 @@
+import { EmployeeType } from '../types/employee.type';
+
+export interface UserInfoShort {
+ // 0. 사용자SEQ
+ seq: number;
+ // 1. 사용자명
+ name: string;
+ // 2. 사진파일
+ profileImageFile: string;
+ // 3. 참여여부
+ isJoinRoom: boolean;
+ // 4. 최종확인SEQ
+ lastReadEventSeq: number;
+ // 5. MADN
+ madn: string;
+ // 6. HARDPHONE_SADN
+ hardSadn: string;
+ // 7. FMC_SADN
+ fmcSadn: string;
+ // 8. 사용자명(영어)
+ nameEn: string;
+ // 9. 사용자명(중국어)
+ nameCn: string;
+ // 10. 이용약관동의여부YN
+ isPrivacyAgree: boolean;
+ // 11. 유효접속여부YN
+ isValidLogin: boolean;
+ // 12. 임직원유형(s)
+ employeeType: EmployeeType;
+ // 13. 폰트색(s)
+ fontColor: string;
+}
diff --git a/projects/ucap-webmessenger-protocol-room/src/lib/models/user-info.ts b/projects/ucap-webmessenger-protocol-room/src/lib/models/user-info.ts
new file mode 100644
index 00000000..23adae01
--- /dev/null
+++ b/projects/ucap-webmessenger-protocol-room/src/lib/models/user-info.ts
@@ -0,0 +1,65 @@
+import { RoleCode } from '@ucap-webmessenger/protocol-authentication';
+import { EmployeeType } from '../types/employee.type';
+
+export interface UserInfo {
+ // 0. 사용자SEQ
+ seq: number;
+ // 1. 사용자명
+ name: string;
+ // 2. 사진파일
+ profileImageFile: string;
+ // 3. 직급
+ grade: string;
+ // 4. 업무소개
+ intro: string;
+ // 5. 기관코드
+ companyCode: string;
+ // 6. 핸드폰번호
+ hpNumber: string;
+ // 7. 내선번호
+ lineNumber: string;
+ // 8. 이메일
+ email: string;
+ // 9. 모바일YN
+ isMobile: boolean;
+ // 10. 부서명
+ deptName: string;
+ // 11. 참여 여부 <<<<
+ isJoinRoom: boolean;
+ // 12. 최종확인SEQ <<<<
+ lastReadEventSeq: number;
+ // 13. ActiveYN
+ isActive: boolean;
+ // 14. 역할코드
+ roleCd: RoleCode;
+ // 15. 사번
+ employeeNum: string;
+ // 16. MADN
+ madn: string;
+ // 17. HARDPHONE_SADN
+ hardSadn: string;
+ // 18. FMC_SADN
+ fmcSadn: string;
+ // 19. 사용자명(영어)
+ nameEn: string;
+ // 20. 사용자명(중국어)
+ nameCn: string;
+ // 21. 직급(영어)
+ gradeEn: string;
+ // 22. 직급(중국어)
+ gradeCn: string;
+ // 23. 부서명(영어)
+ deptNameEn: string;
+ // 24. 부서명(중국어)
+ deptNameCn: string;
+ // 25. CALL_MODE <<<
+ callMode: string;
+ // 26. 이용약관동의여부YN
+ isPrivacyAgree: boolean;
+ // 27. 유효접속여부YN
+ isValidLogin: boolean;
+ // 28. 임직원유형(s)
+ employeeType: EmployeeType;
+ // 29. 사용자아이디(s) <<<
+ id: string;
+}
diff --git a/projects/ucap-webmessenger-protocol-room/src/lib/models/exit.ts b/projects/ucap-webmessenger-protocol-room/src/lib/protocols/exit.ts
similarity index 100%
rename from projects/ucap-webmessenger-protocol-room/src/lib/models/exit.ts
rename to projects/ucap-webmessenger-protocol-room/src/lib/protocols/exit.ts
diff --git a/projects/ucap-webmessenger-protocol-room/src/lib/models/info.ts b/projects/ucap-webmessenger-protocol-room/src/lib/protocols/info.ts
similarity index 67%
rename from projects/ucap-webmessenger-protocol-room/src/lib/models/info.ts
rename to projects/ucap-webmessenger-protocol-room/src/lib/protocols/info.ts
index 53b9b9c4..b80d4a15 100644
--- a/projects/ucap-webmessenger-protocol-room/src/lib/models/info.ts
+++ b/projects/ucap-webmessenger-protocol-room/src/lib/protocols/info.ts
@@ -14,129 +14,9 @@ import { RoomType } from '../types/room.type';
import { EventType } from '@ucap-webmessenger/protocol-event';
import { EmployeeType } from '../types/employee.type';
import { RoleCode } from '@ucap-webmessenger/protocol-authentication';
-
-export interface RoomInfo {
- // 0. 대화방SEQ
- roomSeq: string;
- // 1. 대화방종류
- roomType: RoomType;
- // 2. 대화방명
- roomName: string;
- // 3. 최종타입
- finalEventType: EventType;
- // 4. 최종대화
- finalEventMessage: string;
- // 5. 최종시간
- finalEventDate: string;
- // 6. 참여인원수
- joinUserCount: number;
- // 7. 안읽은수
- noReadCnt: number;
- // 8. 알람여부
- isAlarm: boolean;
- // 9. 참여여부
- isJoinRoom: boolean;
- // 10. 유효한파일 이벤트 기준 SEQ
- expiredFileStdSeq: number;
- // 11. 타이머대화방여부YN
- isTimeRoom: boolean;
- // 12. 타이머시간(n)
- timeRoomInterval: number;
-}
-
-export interface UserInfoShort {
- // 0. 사용자SEQ
- seq: number;
- // 1. 사용자명
- name: string;
- // 2. 사진파일
- profileImageFile: string;
- // 3. 참여여부
- isJoinRoom: boolean;
- // 4. 최종확인SEQ
- lastReadEventSeq: number;
- // 5. MADN
- madn: string;
- // 6. HARDPHONE_SADN
- hardSadn: string;
- // 7. FMC_SADN
- fmcSadn: string;
- // 8. 사용자명(영어)
- nameEn: string;
- // 9. 사용자명(중국어)
- nameCn: string;
- // 10. 이용약관동의여부YN
- isPrivacyAgree: boolean;
- // 11. 유효접속여부YN
- isValidLogin: boolean;
- // 12. 임직원유형(s)
- employeeType: EmployeeType;
- // 13. 폰트색(s)
- fontColor: string;
-}
-
-export interface UserInfo {
- // 0. 사용자SEQ
- seq: number;
- // 1. 사용자명
- name: string;
- // 2. 사진파일
- profileImageFile: string;
- // 3. 직급
- grade: string;
- // 4. 업무소개
- intro: string;
- // 5. 기관코드
- companyCode: string;
- // 6. 핸드폰번호
- hpNumber: string;
- // 7. 내선번호
- lineNumber: string;
- // 8. 이메일
- email: string;
- // 9. 모바일YN
- isMobile: boolean;
- // 10. 부서명
- deptName: string;
- // 11. 참여 여부 <<<<
- isJoinRoom: boolean;
- // 12. 최종확인SEQ <<<<
- lastReadEventSeq: number;
- // 13. ActiveYN
- isActive: boolean;
- // 14. 역할코드
- roleCd: RoleCode;
- // 15. 사번
- employeeNum: string;
- // 16. MADN
- madn: string;
- // 17. HARDPHONE_SADN
- hardSadn: string;
- // 18. FMC_SADN
- fmcSadn: string;
- // 19. 사용자명(영어)
- nameEn: string;
- // 20. 사용자명(중국어)
- nameCn: string;
- // 21. 직급(영어)
- gradeEn: string;
- // 22. 직급(중국어)
- gradeCn: string;
- // 23. 부서명(영어)
- deptNameEn: string;
- // 24. 부서명(중국어)
- deptNameCn: string;
- // 25. CALL_MODE <<<
- callMode: string;
- // 26. 이용약관동의여부YN
- isPrivacyAgree: boolean;
- // 27. 유효접속여부YN
- isValidLogin: boolean;
- // 28. 임직원유형(s)
- employeeType: EmployeeType;
- // 29. 사용자아이디(s) <<<
- id: string;
-}
+import { RoomInfo } from '../models/room-info';
+import { UserInfoShort } from '../models/user-info-short';
+import { UserInfo } from '../models/user-info';
export interface InfoRequest extends ProtocolRequest {
// 0. 대화방SEQ(s)
diff --git a/projects/ucap-webmessenger-protocol-room/src/lib/models/invite.ts b/projects/ucap-webmessenger-protocol-room/src/lib/protocols/invite.ts
similarity index 100%
rename from projects/ucap-webmessenger-protocol-room/src/lib/models/invite.ts
rename to projects/ucap-webmessenger-protocol-room/src/lib/protocols/invite.ts
diff --git a/projects/ucap-webmessenger-protocol-room/src/lib/models/open.ts b/projects/ucap-webmessenger-protocol-room/src/lib/protocols/open.ts
similarity index 100%
rename from projects/ucap-webmessenger-protocol-room/src/lib/models/open.ts
rename to projects/ucap-webmessenger-protocol-room/src/lib/protocols/open.ts
diff --git a/projects/ucap-webmessenger-protocol-room/src/lib/models/update.ts b/projects/ucap-webmessenger-protocol-room/src/lib/protocols/update.ts
similarity index 100%
rename from projects/ucap-webmessenger-protocol-room/src/lib/models/update.ts
rename to projects/ucap-webmessenger-protocol-room/src/lib/protocols/update.ts
diff --git a/projects/ucap-webmessenger-protocol-room/src/lib/services/room-protocol.service.ts b/projects/ucap-webmessenger-protocol-room/src/lib/services/room-protocol.service.ts
index 579c3b3f..a0109103 100644
--- a/projects/ucap-webmessenger-protocol-room/src/lib/services/room-protocol.service.ts
+++ b/projects/ucap-webmessenger-protocol-room/src/lib/services/room-protocol.service.ts
@@ -41,13 +41,13 @@ import {
Open4Response,
encodeOpen4,
decodeOpen4
-} from '../models/open';
+} from '../protocols/open';
import {
InviteRequest,
InviteResponse,
encodeInvite,
decodeInvite
-} from '../models/invite';
+} from '../protocols/invite';
import {
InfoRequest,
InfoResponse,
@@ -63,7 +63,7 @@ import {
UserStatusOfflineResponse,
encodeUserStatusOffline,
decodeUserStatusOffline
-} from '../models/info';
+} from '../protocols/info';
import {
ExitRequest,
ExitResponse,
@@ -77,7 +77,7 @@ import {
decodeExitForcing,
decodeAllExit,
ExitAllResponse
-} from '../models/exit';
+} from '../protocols/exit';
import {
UpdateRequest,
UpdateResponse,
@@ -91,7 +91,7 @@ import {
UpdateFontResponse,
encodeUpdateFont,
decodeUpdateFont
-} from '../models/update';
+} from '../protocols/update';
@Injectable({
providedIn: 'root'
diff --git a/projects/ucap-webmessenger-protocol-room/src/public-api.ts b/projects/ucap-webmessenger-protocol-room/src/public-api.ts
index f70bf8f3..a8d42deb 100644
--- a/projects/ucap-webmessenger-protocol-room/src/public-api.ts
+++ b/projects/ucap-webmessenger-protocol-room/src/public-api.ts
@@ -2,12 +2,17 @@
* Public API Surface of ucap-webmessenger-protocol-room
*/
-export * from './lib/models/info';
-export * from './lib/models/invite';
-export * from './lib/models/open';
+export * from './lib/models/room-info';
+export * from './lib/models/user-info';
+export * from './lib/models/user-info-short';
+
+export * from './lib/protocols/info';
+export * from './lib/protocols/invite';
+export * from './lib/protocols/open';
export * from './lib/services/room-protocol.service';
export * from './lib/types/employee.type';
export * from './lib/types/room.type';
+export * from './lib/types/service';
export * from './lib/ucap-room-protocol.module';
diff --git a/projects/ucap-webmessenger-protocol-service/src/lib/models/password-set.ts b/projects/ucap-webmessenger-protocol-service/src/lib/protocols/password-set.ts
similarity index 100%
rename from projects/ucap-webmessenger-protocol-service/src/lib/models/password-set.ts
rename to projects/ucap-webmessenger-protocol-service/src/lib/protocols/password-set.ts
diff --git a/projects/ucap-webmessenger-protocol-service/src/lib/services/service-protocol.service.ts b/projects/ucap-webmessenger-protocol-service/src/lib/services/service-protocol.service.ts
index 08c646a2..53aa9672 100644
--- a/projects/ucap-webmessenger-protocol-service/src/lib/services/service-protocol.service.ts
+++ b/projects/ucap-webmessenger-protocol-service/src/lib/services/service-protocol.service.ts
@@ -7,7 +7,7 @@ import {
UserPasswordSetResponse,
encodeUserPasswordSet,
decodeUserPasswordSet
-} from '../models/password-set';
+} from '../protocols/password-set';
import { ProtocolService } from '@ucap-webmessenger/protocol';
import { SVC_TYPE_SERVICE, SSVC_TYPE_USER_PW_SET_REQ } from '../types/service';
diff --git a/projects/ucap-webmessenger-protocol-service/src/public-api.ts b/projects/ucap-webmessenger-protocol-service/src/public-api.ts
index 94d85a36..7be91d40 100644
--- a/projects/ucap-webmessenger-protocol-service/src/public-api.ts
+++ b/projects/ucap-webmessenger-protocol-service/src/public-api.ts
@@ -2,6 +2,10 @@
* Public API Surface of ucap-webmessenger-protocol-service
*/
+export * from './lib/protocols/password-set';
+
export * from './lib/services/service-protocol.service';
+export * from './lib/types/service';
+
export * from './lib/ucap-service-protocol.module';
diff --git a/projects/ucap-webmessenger-protocol-status/src/lib/models/status-bulk-info.ts b/projects/ucap-webmessenger-protocol-status/src/lib/models/status-bulk-info.ts
new file mode 100644
index 00000000..51b1cb14
--- /dev/null
+++ b/projects/ucap-webmessenger-protocol-status/src/lib/models/status-bulk-info.ts
@@ -0,0 +1,21 @@
+import { StatusInfo } from './status-info';
+import {
+ TerminalStatusInfo,
+ TerminalStatusNumber
+} from '../types/terminal-status.type';
+
+export interface StatusBulkInfo extends StatusInfo {
+ // 사용자SEQ
+ // 상태코드(PC)
+ // 상태코드(통화)
+ // 상태코드(모바일)
+ // 상태코드(PC화상)
+ // 상태메시지
+ // 상태코드(Mobile화상)
+ // 상태코드(iMessenger)
+
+ /** 단말상태정보(s) */
+ terminalStatus: TerminalStatusInfo;
+ /** 단말상태번호(n) */
+ terminalStatusNumber: TerminalStatusNumber;
+}
diff --git a/projects/ucap-webmessenger-protocol-status/src/lib/models/status-info.ts b/projects/ucap-webmessenger-protocol-status/src/lib/models/status-info.ts
new file mode 100644
index 00000000..27dc2aef
--- /dev/null
+++ b/projects/ucap-webmessenger-protocol-status/src/lib/models/status-info.ts
@@ -0,0 +1,20 @@
+import { StatusCode } from '@ucap-webmessenger/core';
+
+export interface StatusInfo {
+ // 사용자SEQ
+ userSeq: number;
+ // 상태코드(PC)
+ pcStatus: StatusCode;
+ // 상태코드(통화)
+ phoneStatus: StatusCode;
+ // 상태코드(모바일)
+ mobileStatus: StatusCode;
+ // 상태코드(PC화상)
+ conferenceStatus: StatusCode;
+ // 상태메시지
+ statusMessage: string;
+ // 상태코드(Mobile화상)
+ mobileConferenceStatus: StatusCode;
+ // 상태코드(iMessenger)
+ imessengerStatus: StatusCode;
+}
diff --git a/projects/ucap-webmessenger-protocol-status/src/lib/models/buddy.ts b/projects/ucap-webmessenger-protocol-status/src/lib/protocols/buddy.ts
similarity index 94%
rename from projects/ucap-webmessenger-protocol-status/src/lib/models/buddy.ts
rename to projects/ucap-webmessenger-protocol-status/src/lib/protocols/buddy.ts
index dc928574..a6d9e3b6 100644
--- a/projects/ucap-webmessenger-protocol-status/src/lib/models/buddy.ts
+++ b/projects/ucap-webmessenger-protocol-status/src/lib/protocols/buddy.ts
@@ -5,7 +5,7 @@ import {
BodyStringDivider
} from '@ucap-webmessenger/protocol';
import { StatusCode } from '@ucap-webmessenger/core';
-import { StatusInfo } from './status';
+import { StatusInfo } from '../models/status-info';
export interface BuddyResponse extends ProtocolResponse {
// {상태정보}...
diff --git a/projects/ucap-webmessenger-protocol-status/src/lib/models/bulk.ts b/projects/ucap-webmessenger-protocol-status/src/lib/protocols/bulk-info.ts
similarity index 76%
rename from projects/ucap-webmessenger-protocol-status/src/lib/models/bulk.ts
rename to projects/ucap-webmessenger-protocol-status/src/lib/protocols/bulk-info.ts
index f6cd03ae..7d644339 100644
--- a/projects/ucap-webmessenger-protocol-status/src/lib/models/bulk.ts
+++ b/projects/ucap-webmessenger-protocol-status/src/lib/protocols/bulk-info.ts
@@ -9,42 +9,29 @@ import {
BodyStringDivider,
ProtocolStream
} from '@ucap-webmessenger/protocol';
-import { StatusType, StatusCode } from '@ucap-webmessenger/core';
-import { StatusInfo } from './status';
+import { StatusCode } from '@ucap-webmessenger/core';
import {
TerminalStatusInfo,
TerminalStatusNumber
} from '../types/terminal-status.type';
+import { StatusInfo } from '../models/status-info';
+import { StatusBulkInfo } from '../models/status-bulk-info';
export interface BulkInfoRequest extends ProtocolRequest {
- // DivCD(s)
+ /** DivCD(s) */
divCd: string;
- // 사용자SEQ(n)...
+ /** 사용자SEQ(n)[] */
userSeqs: number[];
}
-export interface StatusBulkInfo extends StatusInfo {
- // 사용자SEQ
- // 상태코드(PC)
- // 상태코드(통화)
- // 상태코드(모바일)
- // 상태코드(PC화상)
- // 상태메시지
- // 상태코드(Mobile화상)
- // 상태코드(iMessenger)
- // 단말상태정보(s)
- terminalStatus: TerminalStatusInfo;
- // 단말상태번호(n)
- terminalStatusNumber: TerminalStatusNumber;
-}
export interface BulkInfoData extends ProtocolStream {
- // DivCD(s)
+ /** DivCD(s) */
divCd: string;
- // {상태정보Bulk}...
+ /** {상태정보Bulk}... */
statusBulkInfos: StatusBulkInfo[];
}
export interface BulkInfoResponse extends ProtocolResponse {
- // DivCD(s)
+ /** DivCD(s) */
divCd: string;
}
diff --git a/projects/ucap-webmessenger-protocol-status/src/lib/models/message-update.ts b/projects/ucap-webmessenger-protocol-status/src/lib/protocols/message-update.ts
similarity index 100%
rename from projects/ucap-webmessenger-protocol-status/src/lib/models/message-update.ts
rename to projects/ucap-webmessenger-protocol-status/src/lib/protocols/message-update.ts
diff --git a/projects/ucap-webmessenger-protocol-status/src/lib/models/status.ts b/projects/ucap-webmessenger-protocol-status/src/lib/protocols/status.ts
similarity index 82%
rename from projects/ucap-webmessenger-protocol-status/src/lib/models/status.ts
rename to projects/ucap-webmessenger-protocol-status/src/lib/protocols/status.ts
index 7bae2ace..a1e1e47a 100644
--- a/projects/ucap-webmessenger-protocol-status/src/lib/models/status.ts
+++ b/projects/ucap-webmessenger-protocol-status/src/lib/protocols/status.ts
@@ -10,6 +10,7 @@ import {
ProtocolNotification
} from '@ucap-webmessenger/protocol';
import { StatusType, StatusCode } from '@ucap-webmessenger/core';
+import { StatusInfo } from '../models/status-info';
export interface StatusRequest extends ProtocolRequest {
// 상태타입(s)
@@ -29,24 +30,6 @@ export interface StatusResponse extends ProtocolResponse {
statusMessage: string;
}
-export interface StatusInfo {
- // 사용자SEQ
- userSeq: number;
- // 상태코드(PC)
- pcStatus: StatusCode;
- // 상태코드(통화)
- phoneStatus: StatusCode;
- // 상태코드(모바일)
- mobileStatus: StatusCode;
- // 상태코드(PC화상)
- conferenceStatus: StatusCode;
- // 상태메시지
- statusMessage: string;
- // 상태코드(Mobile화상)
- mobileConferenceStatus: StatusCode;
- // 상태코드(iMessenger)
- imessengerStatus: StatusCode;
-}
export interface StatusNotification extends StatusInfo, ProtocolNotification {}
export const encodeStatus: ProtocolEncoder = (
diff --git a/projects/ucap-webmessenger-protocol-status/src/lib/models/subscribe.ts b/projects/ucap-webmessenger-protocol-status/src/lib/protocols/subscribe.ts
similarity index 97%
rename from projects/ucap-webmessenger-protocol-status/src/lib/models/subscribe.ts
rename to projects/ucap-webmessenger-protocol-status/src/lib/protocols/subscribe.ts
index a6a18555..54f202b2 100644
--- a/projects/ucap-webmessenger-protocol-status/src/lib/models/subscribe.ts
+++ b/projects/ucap-webmessenger-protocol-status/src/lib/protocols/subscribe.ts
@@ -10,7 +10,7 @@ import {
ProtocolStream
} from '@ucap-webmessenger/protocol';
import { StatusCode } from '@ucap-webmessenger/core';
-import { StatusInfo } from './status';
+import { StatusInfo } from '../models/status-info';
export interface SubscribeRequest extends ProtocolRequest {
// 사용자SEQ(n)...
diff --git a/projects/ucap-webmessenger-protocol-status/src/lib/models/unsubscribe.ts b/projects/ucap-webmessenger-protocol-status/src/lib/protocols/unsubscribe.ts
similarity index 92%
rename from projects/ucap-webmessenger-protocol-status/src/lib/models/unsubscribe.ts
rename to projects/ucap-webmessenger-protocol-status/src/lib/protocols/unsubscribe.ts
index d4bc92cb..41f71711 100644
--- a/projects/ucap-webmessenger-protocol-status/src/lib/models/unsubscribe.ts
+++ b/projects/ucap-webmessenger-protocol-status/src/lib/protocols/unsubscribe.ts
@@ -5,7 +5,7 @@ import {
PacketBody,
PacketBodyValue
} from '@ucap-webmessenger/protocol';
-import { StatusInfo } from './status';
+import { StatusInfo } from '../models/status-info';
export interface UnSubscribeRequest extends ProtocolRequest {
// 사용자SEQ(n)...
diff --git a/projects/ucap-webmessenger-protocol-status/src/lib/services/status-protocol.service.ts b/projects/ucap-webmessenger-protocol-status/src/lib/services/status-protocol.service.ts
index 04c41a72..adaefd64 100644
--- a/projects/ucap-webmessenger-protocol-status/src/lib/services/status-protocol.service.ts
+++ b/projects/ucap-webmessenger-protocol-status/src/lib/services/status-protocol.service.ts
@@ -9,7 +9,7 @@ import {
encodeStatus,
decodeStatus,
StatusResponse
-} from '../models/status';
+} from '../protocols/status';
import {
SVC_TYPE_STATUS,
SSVC_TYPE_STATUS_REQ,
@@ -28,21 +28,24 @@ import {
encodeBulkInfo,
decodeBulkInfo,
decodeBulkInfoData
-} from '../models/bulk';
-import { BuddyResponse, decodeBuddy } from '../models/buddy';
+} from '../protocols/bulk-info';
+import { BuddyResponse, decodeBuddy } from '../protocols/buddy';
import {
MessageUpdateRequest,
MessageUpdateResponse,
encodeMessageUpdate,
decodeMessageUpdate
-} from '../models/message-update';
+} from '../protocols/message-update';
import {
SubscribeRequest,
SubscribeResponse,
decodeSubscribe,
encodeSubscribe
-} from '../models/subscribe';
-import { UnSubscribeRequest, encodeUnSubscribe } from '../models/unsubscribe';
+} from '../protocols/subscribe';
+import {
+ UnSubscribeRequest,
+ encodeUnSubscribe
+} from '../protocols/unsubscribe';
@Injectable({
providedIn: 'root'
diff --git a/projects/ucap-webmessenger-protocol-status/src/public-api.ts b/projects/ucap-webmessenger-protocol-status/src/public-api.ts
index 037c6d9b..23f2868c 100644
--- a/projects/ucap-webmessenger-protocol-status/src/public-api.ts
+++ b/projects/ucap-webmessenger-protocol-status/src/public-api.ts
@@ -1,13 +1,15 @@
/*
* Public API Surface of ucap-webmessenger-protocol-status
*/
+export * from './lib/models/status-bulk-info';
+export * from './lib/models/status-info';
-export * from './lib/models/buddy';
-export * from './lib/models/bulk';
-export * from './lib/models/message-update';
-export * from './lib/models/status';
-export * from './lib/models/subscribe';
-export * from './lib/models/unsubscribe';
+export * from './lib/protocols/buddy';
+export * from './lib/protocols/bulk-info';
+export * from './lib/protocols/message-update';
+export * from './lib/protocols/status';
+export * from './lib/protocols/subscribe';
+export * from './lib/protocols/unsubscribe';
export * from './lib/services/status-protocol.service';
diff --git a/projects/ucap-webmessenger-protocol-sync/src/lib/models/buddy-info.ts b/projects/ucap-webmessenger-protocol-sync/src/lib/models/buddy-info.ts
new file mode 100644
index 00000000..0576860c
--- /dev/null
+++ b/projects/ucap-webmessenger-protocol-sync/src/lib/models/buddy-info.ts
@@ -0,0 +1,8 @@
+export interface BuddyInfo {
+ // 사용자SEQ
+ seq: number;
+ // 즐.찾 여부
+ isFavorit: boolean;
+ // 친구여부
+ isBuddy: boolean;
+}
diff --git a/projects/ucap-webmessenger-protocol-sync/src/lib/models/group-info.ts b/projects/ucap-webmessenger-protocol-sync/src/lib/models/group-info.ts
new file mode 100644
index 00000000..ac1b4d06
--- /dev/null
+++ b/projects/ucap-webmessenger-protocol-sync/src/lib/models/group-info.ts
@@ -0,0 +1,10 @@
+export interface GroupInfo {
+ // 그룹SEQ(n)
+ seq: number;
+ // 그룹이름(s)
+ name: string;
+ // ActiveYN(s)
+ isActive: boolean;
+ // 사용자SEQ(s)
+ userSeqStr: string;
+}
diff --git a/projects/ucap-webmessenger-protocol-sync/src/lib/models/buddy.ts b/projects/ucap-webmessenger-protocol-sync/src/lib/protocols/buddy.ts
similarity index 95%
rename from projects/ucap-webmessenger-protocol-sync/src/lib/models/buddy.ts
rename to projects/ucap-webmessenger-protocol-sync/src/lib/protocols/buddy.ts
index 789fb05a..cdfd8e64 100644
--- a/projects/ucap-webmessenger-protocol-sync/src/lib/models/buddy.ts
+++ b/projects/ucap-webmessenger-protocol-sync/src/lib/protocols/buddy.ts
@@ -11,15 +11,7 @@ import {
} from '@ucap-webmessenger/protocol';
import { UserInfo } from '../types/userInfo';
import { EmployeeType } from '@ucap-webmessenger/protocol-room';
-
-export interface BuddyInfo {
- // 사용자SEQ
- seq: number;
- // 즐.찾 여부
- isFavorit: boolean;
- // 친구여부
- isBuddy: boolean;
-}
+import { BuddyInfo } from '../models/buddy-info';
export interface BuddyRequest extends ProtocolRequest {
// 0. 동료 씽크일시(s) cf)2019-09-24 16:51:42
diff --git a/projects/ucap-webmessenger-protocol-sync/src/lib/models/group.ts b/projects/ucap-webmessenger-protocol-sync/src/lib/protocols/group.ts
similarity index 92%
rename from projects/ucap-webmessenger-protocol-sync/src/lib/models/group.ts
rename to projects/ucap-webmessenger-protocol-sync/src/lib/protocols/group.ts
index 95e9b49f..f8f47177 100644
--- a/projects/ucap-webmessenger-protocol-sync/src/lib/models/group.ts
+++ b/projects/ucap-webmessenger-protocol-sync/src/lib/protocols/group.ts
@@ -9,17 +9,8 @@ import {
BodyStringDivider,
ProtocolStream
} from '@ucap-webmessenger/protocol';
+import { GroupInfo } from '../models/group-info';
-export interface GroupInfo {
- // 그룹SEQ(n)
- seq: number;
- // 그룹이름(s)
- name: string;
- // ActiveYN(s)
- isActive: boolean;
- // 사용자SEQ(s)
- userSeqStr: string;
-}
export interface GroupRequest extends ProtocolRequest {
// 0. 동료 씽크일시(s) cf)2019-09-24 16:51:42
syncDate: string;
diff --git a/projects/ucap-webmessenger-protocol-sync/src/lib/models/room.ts b/projects/ucap-webmessenger-protocol-sync/src/lib/protocols/room.ts
similarity index 100%
rename from projects/ucap-webmessenger-protocol-sync/src/lib/models/room.ts
rename to projects/ucap-webmessenger-protocol-sync/src/lib/protocols/room.ts
diff --git a/projects/ucap-webmessenger-protocol-sync/src/lib/services/sync-protocol.service.ts b/projects/ucap-webmessenger-protocol-sync/src/lib/services/sync-protocol.service.ts
index 3233574a..f9304bb3 100644
--- a/projects/ucap-webmessenger-protocol-sync/src/lib/services/sync-protocol.service.ts
+++ b/projects/ucap-webmessenger-protocol-sync/src/lib/services/sync-protocol.service.ts
@@ -13,7 +13,7 @@ import {
decodeBuddy,
decodeBuddyDetailData,
BuddyDetailData
-} from '../models/buddy';
+} from '../protocols/buddy';
import {
SVC_TYPE_SYNC_BUDDY,
SSVC_TYPE_SYNC_BUDDY_REQ,
@@ -50,7 +50,7 @@ import {
decodeGroup,
decodeGroupData,
GroupDetailData
-} from '../models/group';
+} from '../protocols/group';
import {
RoomRequest,
RoomResponse,
@@ -62,7 +62,7 @@ import {
decodeRoomData,
decodeRoomUserData,
decodeRoomUserDataDetail
-} from '../models/room';
+} from '../protocols/room';
@Injectable({
providedIn: 'root'
diff --git a/projects/ucap-webmessenger-protocol-sync/src/public-api.ts b/projects/ucap-webmessenger-protocol-sync/src/public-api.ts
index b8e35a3f..7ec5d221 100644
--- a/projects/ucap-webmessenger-protocol-sync/src/public-api.ts
+++ b/projects/ucap-webmessenger-protocol-sync/src/public-api.ts
@@ -1,9 +1,13 @@
/*
* Public API Surface of ucap-webmessenger-protocol-sync
*/
-export * from './lib/models/buddy';
-export * from './lib/models/group';
-export * from './lib/models/room';
+
+export * from './lib/models/buddy-info';
+export * from './lib/models/group-info';
+
+export * from './lib/protocols/buddy';
+export * from './lib/protocols/group';
+export * from './lib/protocols/room';
export * from './lib/services/sync-protocol.service';
diff --git a/projects/ucap-webmessenger-protocol/src/lib/models/packet.ts b/projects/ucap-webmessenger-protocol/src/lib/protocols/packet.ts
similarity index 100%
rename from projects/ucap-webmessenger-protocol/src/lib/models/packet.ts
rename to projects/ucap-webmessenger-protocol/src/lib/protocols/packet.ts
diff --git a/projects/ucap-webmessenger-protocol/src/lib/models/protocol.ts b/projects/ucap-webmessenger-protocol/src/lib/protocols/protocol.ts
similarity index 84%
rename from projects/ucap-webmessenger-protocol/src/lib/models/protocol.ts
rename to projects/ucap-webmessenger-protocol/src/lib/protocols/protocol.ts
index 49a5e827..cdeb6149 100644
--- a/projects/ucap-webmessenger-protocol/src/lib/models/protocol.ts
+++ b/projects/ucap-webmessenger-protocol/src/lib/protocols/protocol.ts
@@ -14,8 +14,9 @@ export interface ProtocolStream {
Type?: number;
}
-// tslint:disable-next-line: no-empty-interface
-export interface ProtocolNotification {}
+export interface ProtocolNotification {
+ Type?: number;
+}
export interface ProtocolMessage {
serviceType: number;
diff --git a/projects/ucap-webmessenger-protocol/src/lib/services/protocol.service.ts b/projects/ucap-webmessenger-protocol/src/lib/services/protocol.service.ts
index 6776e647..df698334 100644
--- a/projects/ucap-webmessenger-protocol/src/lib/services/protocol.service.ts
+++ b/projects/ucap-webmessenger-protocol/src/lib/services/protocol.service.ts
@@ -13,14 +13,14 @@ import {
import { _MODULE_CONFIG } from '../types/token';
import { ModuleConfig } from '../types/module-config';
-import { PacketBody } from '../models/packet';
+import { PacketBody } from '../protocols/packet';
import {
PacketBodyValueDivider,
PacketBodyDivider
} from '../types/packet-body-divider';
import { PacketBodyValue } from '../types/packet-body-value.type';
import { SSVC_TYPE_ERROR_RES, ServerErrorCode } from '../types/service';
-import { ProtocolMessage } from '../models/protocol';
+import { ProtocolMessage } from '../protocols/protocol';
import { NGXLogger } from 'ngx-logger';
diff --git a/projects/ucap-webmessenger-protocol/src/public-api.ts b/projects/ucap-webmessenger-protocol/src/public-api.ts
index df9dea2f..c0cd2637 100644
--- a/projects/ucap-webmessenger-protocol/src/public-api.ts
+++ b/projects/ucap-webmessenger-protocol/src/public-api.ts
@@ -2,8 +2,8 @@
* Public API Surface of ucap-webmessenger-protocol
*/
-export * from './lib/models/packet';
-export * from './lib/models/protocol';
+export * from './lib/protocols/packet';
+export * from './lib/protocols/protocol';
export * from './lib/services/protocol.service';
diff --git a/projects/ucap-webmessenger-ui-account/src/lib/components/login.component.html b/projects/ucap-webmessenger-ui-account/src/lib/components/login.component.html
index 6b3e73cd..cbddde99 100644
--- a/projects/ucap-webmessenger-ui-account/src/lib/components/login.component.html
+++ b/projects/ucap-webmessenger-ui-account/src/lib/components/login.component.html
@@ -5,7 +5,10 @@
Company
- {{ company.companyName }}
+ {{ company.companyName }}
@@ -32,7 +35,12 @@
-
+
Remember Me
@@ -42,8 +50,14 @@
-
-
-
-
- Template
-
diff --git a/projects/ucap-webmessenger-ui-account/src/lib/components/login.component.ts b/projects/ucap-webmessenger-ui-account/src/lib/components/login.component.ts
index d59775b6..ed774837 100644
--- a/projects/ucap-webmessenger-ui-account/src/lib/components/login.component.ts
+++ b/projects/ucap-webmessenger-ui-account/src/lib/components/login.component.ts
@@ -27,8 +27,6 @@ export class LoginComponent implements OnInit {
rememberMe: boolean;
notValid: () => void;
}>();
- @Output()
- template = new EventEmitter();
@ViewChild('loginPw', { static: true }) loginPwElementRef: ElementRef;
@@ -55,8 +53,4 @@ export class LoginComponent implements OnInit {
}
});
}
-
- onClickTemplate() {
- this.template.emit();
- }
}
diff --git a/projects/ucap-webmessenger-ui-chat/src/lib/components/form.component.html b/projects/ucap-webmessenger-ui-chat/src/lib/components/form.component.html
index cd9cc5bc..dbac7cb7 100644
--- a/projects/ucap-webmessenger-ui-chat/src/lib/components/form.component.html
+++ b/projects/ucap-webmessenger-ui-chat/src/lib/components/form.component.html
@@ -6,8 +6,8 @@
>