urlInfo 정보 수집
This commit is contained in:
parent
0271d86add
commit
dc26faa618
|
@ -9,6 +9,7 @@ import {
|
||||||
|
|
||||||
export interface UrlInfoRequest extends APIRequest {
|
export interface UrlInfoRequest extends APIRequest {
|
||||||
deviceType: DeviceType;
|
deviceType: DeviceType;
|
||||||
|
loginId?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface UrlInfoResponse extends APIResponse {
|
export interface UrlInfoResponse extends APIResponse {
|
||||||
|
@ -26,8 +27,19 @@ export interface UrlInfoResponse extends APIResponse {
|
||||||
synapViewUrl?: string;
|
synapViewUrl?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface DaesangUrlInfoResponse extends UrlInfoResponse {
|
||||||
|
webLink: WebLink[];
|
||||||
|
webLinkAllowedList: string[];
|
||||||
|
}
|
||||||
|
export interface WebLink {
|
||||||
|
key: string;
|
||||||
|
title: string;
|
||||||
|
url: string;
|
||||||
|
}
|
||||||
|
|
||||||
const urlInfoEncodeMap = {
|
const urlInfoEncodeMap = {
|
||||||
deviceType: 'p_device_type'
|
deviceType: 'p_device_type',
|
||||||
|
loginId: 'p_user_id'
|
||||||
};
|
};
|
||||||
|
|
||||||
export const encodeUrlInfo: APIEncoder<UrlInfoRequest> = (
|
export const encodeUrlInfo: APIEncoder<UrlInfoRequest> = (
|
||||||
|
@ -54,3 +66,149 @@ export const decodeUrlInfo: APIDecoder<UrlInfoResponse> = (res: any) => {
|
||||||
synapViewUrl: res.SynapViewURL
|
synapViewUrl: res.SynapViewURL
|
||||||
} as UrlInfoResponse;
|
} as UrlInfoResponse;
|
||||||
};
|
};
|
||||||
|
export const decodeUrlInfoDaesang: APIDecoder<DaesangUrlInfoResponse> = (
|
||||||
|
res: any
|
||||||
|
) => {
|
||||||
|
const webLink: WebLink[] = [];
|
||||||
|
|
||||||
|
if (!!res.WebLinkWebhard) {
|
||||||
|
const arr = res.WebLinkWebhard.split(',');
|
||||||
|
webLink.push({
|
||||||
|
key: 'WebLinkWebhard',
|
||||||
|
title: arr.length > 1 ? arr[0] : '',
|
||||||
|
url: arr.length > 1 ? arr[1] : arr[0]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (!!res.WebLinkDsp) {
|
||||||
|
const arr = res.WebLinkDsp.split(',');
|
||||||
|
webLink.push({
|
||||||
|
key: 'WebLinkDsp',
|
||||||
|
title: arr.length > 1 ? arr[0] : '',
|
||||||
|
url: arr.length > 1 ? arr[1] : arr[0]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (!!res.WebLinkSms) {
|
||||||
|
const arr = res.WebLinkSms.split(',');
|
||||||
|
webLink.push({
|
||||||
|
key: 'WebLinkSms',
|
||||||
|
title: arr.length > 1 ? arr[0] : '',
|
||||||
|
url: arr.length > 1 ? arr[1] : arr[0]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (!!res.WebLinkConf) {
|
||||||
|
const arr = res.WebLinkConf.split(',');
|
||||||
|
webLink.push({
|
||||||
|
key: 'WebLinkConf',
|
||||||
|
title: arr.length > 1 ? arr[0] : '',
|
||||||
|
url: arr.length > 1 ? arr[1] : arr[0]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (!!res.WebLinkEp) {
|
||||||
|
const arr = res.WebLinkEp.split(',');
|
||||||
|
webLink.push({
|
||||||
|
key: 'WebLinkEp',
|
||||||
|
title: arr.length > 1 ? arr[0] : '',
|
||||||
|
url: arr.length > 1 ? arr[1] : arr[0]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (!!res.WebLinkSop) {
|
||||||
|
const arr = res.WebLinkSop.split(',');
|
||||||
|
webLink.push({
|
||||||
|
key: 'WebLinkSop',
|
||||||
|
title: arr.length > 1 ? arr[0] : '',
|
||||||
|
url: arr.length > 1 ? arr[1] : arr[0]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (!!res.WebLinkSom) {
|
||||||
|
const arr = res.WebLinkSom.split(',');
|
||||||
|
webLink.push({
|
||||||
|
key: 'WebLinkSom',
|
||||||
|
title: arr.length > 1 ? arr[0] : '',
|
||||||
|
url: arr.length > 1 ? arr[1] : arr[0]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (!!res.WebLinkElephant) {
|
||||||
|
const arr = res.WebLinkElephant.split(',');
|
||||||
|
webLink.push({
|
||||||
|
key: 'WebLinkElephant',
|
||||||
|
title: arr.length > 1 ? arr[0] : '',
|
||||||
|
url: arr.length > 1 ? arr[1] : arr[0]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (!!res.WebLinkItsvcdesk) {
|
||||||
|
const arr = res.WebLinkItsvcdesk.split(',');
|
||||||
|
webLink.push({
|
||||||
|
key: 'WebLinkItsvcdesk',
|
||||||
|
title: arr.length > 1 ? arr[0] : '',
|
||||||
|
url: arr.length > 1 ? arr[1] : arr[0]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (!!res.WebLinkUrgntNews) {
|
||||||
|
const arr = res.WebLinkUrgntNews.split(',');
|
||||||
|
webLink.push({
|
||||||
|
key: 'WebLinkUrgntNews',
|
||||||
|
title: arr.length > 1 ? arr[0] : '',
|
||||||
|
url: arr.length > 1 ? arr[1] : arr[0]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (!!res.WebLinkMailCnt) {
|
||||||
|
const arr = res.WebLinkMailCnt.split(',');
|
||||||
|
webLink.push({
|
||||||
|
key: 'WebLinkMailCnt',
|
||||||
|
title: arr.length > 1 ? arr[0] : '',
|
||||||
|
url: arr.length > 1 ? arr[1] : arr[0]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (!!res.WebLinkMail) {
|
||||||
|
const arr = res.WebLinkMail.split(',');
|
||||||
|
webLink.push({
|
||||||
|
key: 'WebLinkMail',
|
||||||
|
title: arr.length > 1 ? arr[0] : '',
|
||||||
|
url: arr.length > 1 ? arr[1] : arr[0]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (!!res.WebLinkPaymentCnt) {
|
||||||
|
const arr = res.WebLinkPaymentCnt.split(',');
|
||||||
|
webLink.push({
|
||||||
|
key: 'WebLinkPaymentCnt',
|
||||||
|
title: arr.length > 1 ? arr[0] : '',
|
||||||
|
url: arr.length > 1 ? arr[1] : arr[0]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (!!res.WebLinkPayment) {
|
||||||
|
const arr = res.WebLinkPayment.split(',');
|
||||||
|
webLink.push({
|
||||||
|
key: 'WebLinkPayment',
|
||||||
|
title: arr.length > 1 ? arr[0] : '',
|
||||||
|
url: arr.length > 1 ? arr[1] : arr[0]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (!!res.WebLinkChgPassword) {
|
||||||
|
const arr = res.WebLinkChgPassword.split(',');
|
||||||
|
webLink.push({
|
||||||
|
key: 'WebLinkChgPassword',
|
||||||
|
title: arr.length > 1 ? arr[0] : '',
|
||||||
|
url: arr.length > 1 ? arr[1] : arr[0]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
statusCode: res.StatusCode,
|
||||||
|
errorMessage: res.ErrorMessage,
|
||||||
|
portCheckUrl: res.PortCheckURL,
|
||||||
|
messageUrl: res.MsgURL,
|
||||||
|
messageUrl2: res.MsgURL2,
|
||||||
|
passwordUrl: res.PasswordURL,
|
||||||
|
planUrl: res.PlanURL,
|
||||||
|
planUrl2: res.PlanURL2,
|
||||||
|
vocUrl: res.VocURL,
|
||||||
|
confUrl: res.ConfURL,
|
||||||
|
uprApiUrl: res.UprApiURL,
|
||||||
|
uprSvcUrl: res.UprSvcURL,
|
||||||
|
uprDownloadUrl: res.UprDownloadURL,
|
||||||
|
synapViewUrl: res.SynapViewURL,
|
||||||
|
|
||||||
|
webLink,
|
||||||
|
webLinkAllowedList: res.WebLinkAllowedList.split(',')
|
||||||
|
} as DaesangUrlInfoResponse;
|
||||||
|
};
|
||||||
|
|
|
@ -8,25 +8,27 @@ import {
|
||||||
CheckUserInfoExRequest,
|
CheckUserInfoExRequest,
|
||||||
CheckUserInfoExResponse,
|
CheckUserInfoExResponse,
|
||||||
encodeCheckUserInfoEx,
|
encodeCheckUserInfoEx,
|
||||||
decodeCheckUserInfoEx,
|
decodeCheckUserInfoEx
|
||||||
} from '../apis/check-user-info-ex';
|
} from '../apis/check-user-info-ex';
|
||||||
import {
|
import {
|
||||||
CompanyListRequest,
|
CompanyListRequest,
|
||||||
CompanyListResponse,
|
CompanyListResponse,
|
||||||
encodeCompanyList,
|
encodeCompanyList,
|
||||||
decodeCompanyList,
|
decodeCompanyList
|
||||||
} from '../apis/company-list';
|
} from '../apis/company-list';
|
||||||
import {
|
import {
|
||||||
TokenUpdateRequest,
|
TokenUpdateRequest,
|
||||||
TokenUpdateResponse,
|
TokenUpdateResponse,
|
||||||
encodeTokenUpdate,
|
encodeTokenUpdate,
|
||||||
decodeTokenUpdate,
|
decodeTokenUpdate
|
||||||
} from '../apis/token-update';
|
} from '../apis/token-update';
|
||||||
import {
|
import {
|
||||||
UrlInfoResponse,
|
UrlInfoResponse,
|
||||||
UrlInfoRequest,
|
UrlInfoRequest,
|
||||||
encodeUrlInfo,
|
encodeUrlInfo,
|
||||||
decodeUrlInfo,
|
decodeUrlInfo,
|
||||||
|
DaesangUrlInfoResponse,
|
||||||
|
decodeUrlInfoDaesang
|
||||||
} from '../apis/url-info';
|
} from '../apis/url-info';
|
||||||
|
|
||||||
import { _MODULE_CONFIG } from '../config/token';
|
import { _MODULE_CONFIG } from '../config/token';
|
||||||
|
@ -35,7 +37,7 @@ import { Urls } from '../config/urls';
|
||||||
import { UrlConfig } from '@ucap-webmessenger/core';
|
import { UrlConfig } from '@ucap-webmessenger/core';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root',
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class ExternalApiService {
|
export class ExternalApiService {
|
||||||
readonly urls: Urls;
|
readonly urls: Urls;
|
||||||
|
@ -58,7 +60,7 @@ export class ExternalApiService {
|
||||||
this.urls.checkUserInfoEx,
|
this.urls.checkUserInfoEx,
|
||||||
{},
|
{},
|
||||||
{
|
{
|
||||||
params: encodeCheckUserInfoEx(req),
|
params: encodeCheckUserInfoEx(req)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.pipe(map(res => decodeCheckUserInfoEx(res)));
|
.pipe(map(res => decodeCheckUserInfoEx(res)));
|
||||||
|
@ -70,7 +72,7 @@ export class ExternalApiService {
|
||||||
this.urls.companyList,
|
this.urls.companyList,
|
||||||
{},
|
{},
|
||||||
{
|
{
|
||||||
params: encodeCompanyList(req),
|
params: encodeCompanyList(req)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.pipe(map(res => decodeCompanyList(res)));
|
.pipe(map(res => decodeCompanyList(res)));
|
||||||
|
@ -82,7 +84,7 @@ export class ExternalApiService {
|
||||||
this.urls.tokenUpdate,
|
this.urls.tokenUpdate,
|
||||||
{},
|
{},
|
||||||
{
|
{
|
||||||
params: encodeTokenUpdate(req),
|
params: encodeTokenUpdate(req)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.pipe(map(res => decodeTokenUpdate(res)));
|
.pipe(map(res => decodeTokenUpdate(res)));
|
||||||
|
@ -94,9 +96,22 @@ export class ExternalApiService {
|
||||||
this.urls.urlInfo,
|
this.urls.urlInfo,
|
||||||
{},
|
{},
|
||||||
{
|
{
|
||||||
params: encodeUrlInfo(req),
|
params: encodeUrlInfo(req)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.pipe(map(res => decodeUrlInfo(res)));
|
.pipe(map(res => decodeUrlInfo(res)));
|
||||||
}
|
}
|
||||||
|
public urlInfoDaesang(
|
||||||
|
req: UrlInfoRequest
|
||||||
|
): Observable<DaesangUrlInfoResponse> {
|
||||||
|
return this.httpClient
|
||||||
|
.post<any>(
|
||||||
|
this.urls.urlInfo,
|
||||||
|
{},
|
||||||
|
{
|
||||||
|
params: encodeUrlInfo(req)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.pipe(map(res => decodeUrlInfoDaesang(res)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,9 +32,7 @@ import {
|
||||||
import { MatTabChangeEvent } from '@angular/material';
|
import { MatTabChangeEvent } from '@angular/material';
|
||||||
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
||||||
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
||||||
import { KEY_LOGIN_RES_INFO } from '@app/types/login-res-info.type';
|
|
||||||
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
|
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
|
||||||
import { KEY_VER_INFO } from '@app/types/ver-info.type';
|
|
||||||
import { MessageApiService, MessageType } from '@ucap-webmessenger/api-message';
|
import { MessageApiService, MessageType } from '@ucap-webmessenger/api-message';
|
||||||
import { DeviceType } from '@ucap-webmessenger/core';
|
import { DeviceType } from '@ucap-webmessenger/core';
|
||||||
import { UnreadCountRequest } from 'projects/ucap-webmessenger-api-message/src/lib/apis/unread-count';
|
import { UnreadCountRequest } from 'projects/ucap-webmessenger-api-message/src/lib/apis/unread-count';
|
||||||
|
@ -45,7 +43,12 @@ import {
|
||||||
MessageWriteDialogResult,
|
MessageWriteDialogResult,
|
||||||
MessageWriteDialogData
|
MessageWriteDialogData
|
||||||
} from '../dialogs/message/message-write.dialog.component';
|
} from '../dialogs/message/message-write.dialog.component';
|
||||||
import { EnvironmentsInfo, KEY_ENVIRONMENTS_INFO } from '@app/types';
|
import {
|
||||||
|
EnvironmentsInfo,
|
||||||
|
KEY_ENVIRONMENTS_INFO,
|
||||||
|
KEY_VER_INFO,
|
||||||
|
KEY_LOGIN_RES_INFO
|
||||||
|
} from '@app/types';
|
||||||
import { MessageBoxComponent } from './left-sidenav/message.component';
|
import { MessageBoxComponent } from './left-sidenav/message.component';
|
||||||
|
|
||||||
export enum MainMenu {
|
export enum MainMenu {
|
||||||
|
|
|
@ -25,7 +25,7 @@ import {
|
||||||
} from '@ucap-webmessenger/protocol-sync';
|
} from '@ucap-webmessenger/protocol-sync';
|
||||||
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
|
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
|
||||||
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
||||||
import { KEY_VER_INFO } from '@app/types/ver-info.type';
|
import { KEY_VER_INFO } from '@app/types';
|
||||||
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
||||||
import { MatMenuTrigger } from '@angular/material';
|
import { MatMenuTrigger } from '@angular/material';
|
||||||
import { FormGroup, FormBuilder } from '@angular/forms';
|
import { FormGroup, FormBuilder } from '@angular/forms';
|
||||||
|
|
|
@ -26,9 +26,9 @@ import {
|
||||||
KEY_LOGIN_INFO,
|
KEY_LOGIN_INFO,
|
||||||
UserSelectDialogType,
|
UserSelectDialogType,
|
||||||
EnvironmentsInfo,
|
EnvironmentsInfo,
|
||||||
KEY_ENVIRONMENTS_INFO
|
KEY_ENVIRONMENTS_INFO,
|
||||||
|
KEY_VER_INFO
|
||||||
} from '@app/types';
|
} from '@app/types';
|
||||||
import { KEY_VER_INFO } from '@app/types/ver-info.type';
|
|
||||||
import { ExpansionPanelComponent as GroupExpansionPanelComponent } from '@ucap-webmessenger/ui-group';
|
import { ExpansionPanelComponent as GroupExpansionPanelComponent } from '@ucap-webmessenger/ui-group';
|
||||||
|
|
||||||
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
||||||
|
|
|
@ -18,7 +18,6 @@ import * as AppStore from '@app/store';
|
||||||
import { UserInfo } from '@ucap-webmessenger/protocol-room';
|
import { UserInfo } from '@ucap-webmessenger/protocol-room';
|
||||||
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
|
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
|
||||||
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
||||||
import { KEY_VER_INFO } from '@app/types/ver-info.type';
|
|
||||||
import { DialogService } from '@ucap-webmessenger/ui';
|
import { DialogService } from '@ucap-webmessenger/ui';
|
||||||
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
||||||
import { KEY_LOGIN_RES_INFO } from '@app/types/login-res-info.type';
|
import { KEY_LOGIN_RES_INFO } from '@app/types/login-res-info.type';
|
||||||
|
@ -48,7 +47,11 @@ import {
|
||||||
MessageDetailDialogResult,
|
MessageDetailDialogResult,
|
||||||
MessageDetailDialogData
|
MessageDetailDialogData
|
||||||
} from '../../dialogs/message/message-detail.dialog.component';
|
} from '../../dialogs/message/message-detail.dialog.component';
|
||||||
import { EnvironmentsInfo, KEY_ENVIRONMENTS_INFO } from '@app/types';
|
import {
|
||||||
|
EnvironmentsInfo,
|
||||||
|
KEY_ENVIRONMENTS_INFO,
|
||||||
|
KEY_VER_INFO
|
||||||
|
} from '@app/types';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-layout-chat-left-sidenav-message',
|
selector: 'app-layout-chat-left-sidenav-message',
|
||||||
|
|
|
@ -32,10 +32,9 @@ import * as SyncStore from '@app/store/messenger/sync';
|
||||||
import * as ChatStore from '@app/store/messenger/chat';
|
import * as ChatStore from '@app/store/messenger/chat';
|
||||||
import * as StatusStore from '@app/store/messenger/status';
|
import * as StatusStore from '@app/store/messenger/status';
|
||||||
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
||||||
import { LoginInfo, KEY_LOGIN_INFO } from '@app/types';
|
import { LoginInfo, KEY_LOGIN_INFO, KEY_VER_INFO } from '@app/types';
|
||||||
import { take, map, tap, delay, catchError } from 'rxjs/operators';
|
import { take, map, tap, delay, catchError } from 'rxjs/operators';
|
||||||
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
|
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
|
||||||
import { KEY_VER_INFO } from '@app/types/ver-info.type';
|
|
||||||
import {
|
import {
|
||||||
SelectGroupDialogComponent,
|
SelectGroupDialogComponent,
|
||||||
SelectGroupDialogData,
|
SelectGroupDialogData,
|
||||||
|
|
|
@ -61,7 +61,7 @@ import {
|
||||||
FileInfo,
|
FileInfo,
|
||||||
FormComponent as UCapUiChatFormComponent
|
FormComponent as UCapUiChatFormComponent
|
||||||
} from '@ucap-webmessenger/ui-chat';
|
} from '@ucap-webmessenger/ui-chat';
|
||||||
import { KEY_VER_INFO } from '@app/types/ver-info.type';
|
import { KEY_VER_INFO } from '@app/types';
|
||||||
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
|
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
|
||||||
import {
|
import {
|
||||||
MatMenuTrigger,
|
MatMenuTrigger,
|
||||||
|
|
|
@ -15,9 +15,12 @@ import { CommonApiService } from '@ucap-webmessenger/api-common';
|
||||||
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
||||||
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
||||||
import { KEY_LOGIN_RES_INFO } from '@app/types/login-res-info.type';
|
import { KEY_LOGIN_RES_INFO } from '@app/types/login-res-info.type';
|
||||||
import { EnvironmentsInfo, KEY_ENVIRONMENTS_INFO } from '@app/types';
|
import {
|
||||||
|
EnvironmentsInfo,
|
||||||
|
KEY_ENVIRONMENTS_INFO,
|
||||||
|
KEY_VER_INFO
|
||||||
|
} from '@app/types';
|
||||||
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
|
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
|
||||||
import { KEY_VER_INFO } from '@app/types/ver-info.type';
|
|
||||||
import { UCAP_NATIVE_SERVICE, NativeService } from '@ucap-webmessenger/native';
|
import { UCAP_NATIVE_SERVICE, NativeService } from '@ucap-webmessenger/native';
|
||||||
import { NGXLogger } from 'ngx-logger';
|
import { NGXLogger } from 'ngx-logger';
|
||||||
import { SnackBarService } from '@ucap-webmessenger/ui';
|
import { SnackBarService } from '@ucap-webmessenger/ui';
|
||||||
|
|
|
@ -17,7 +17,6 @@ import * as RoomStore from '@app/store/messenger/room';
|
||||||
import { UserInfo, RoomInfo } from '@ucap-webmessenger/protocol-room';
|
import { UserInfo, RoomInfo } from '@ucap-webmessenger/protocol-room';
|
||||||
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
|
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
|
||||||
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
||||||
import { KEY_VER_INFO } from '@app/types/ver-info.type';
|
|
||||||
import {
|
import {
|
||||||
DialogService,
|
DialogService,
|
||||||
ConfirmDialogComponent,
|
ConfirmDialogComponent,
|
||||||
|
@ -35,9 +34,12 @@ import {
|
||||||
CreateChatDialogResult,
|
CreateChatDialogResult,
|
||||||
CreateChatDialogData
|
CreateChatDialogData
|
||||||
} from '../../dialogs/chat/create-chat.dialog.component';
|
} from '../../dialogs/chat/create-chat.dialog.component';
|
||||||
import { UserSelectDialogType } from '@app/types';
|
import {
|
||||||
|
UserSelectDialogType,
|
||||||
|
KEY_LOGIN_RES_INFO,
|
||||||
|
KEY_VER_INFO
|
||||||
|
} from '@app/types';
|
||||||
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
||||||
import { KEY_LOGIN_RES_INFO } from '@app/types/login-res-info.type';
|
|
||||||
import { MatMenuTrigger, MatDialog } from '@angular/material';
|
import { MatMenuTrigger, MatDialog } from '@angular/material';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
|
|
@ -25,8 +25,7 @@ import * as StatusStore from '@app/store/messenger/status';
|
||||||
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
||||||
import { Company } from '@ucap-webmessenger/api-external';
|
import { Company } from '@ucap-webmessenger/api-external';
|
||||||
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
|
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
|
||||||
import { LoginInfo, KEY_LOGIN_INFO } from '@app/types';
|
import { LoginInfo, KEY_LOGIN_INFO, KEY_VER_INFO } from '@app/types';
|
||||||
import { KEY_VER_INFO } from '@app/types/ver-info.type';
|
|
||||||
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
||||||
import {
|
import {
|
||||||
UserInfo,
|
UserInfo,
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import { Component, OnInit, Inject, ViewChild, OnDestroy } from '@angular/core';
|
import { Component, OnInit, Inject, ViewChild, OnDestroy } from '@angular/core';
|
||||||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
|
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
|
||||||
import { KEY_LOGIN_RES_INFO } from '@app/types/login-res-info.type';
|
import { KEY_LOGIN_RES_INFO, KEY_VER_INFO } from '@app/types';
|
||||||
import { KEY_VER_INFO } from '@app/types/ver-info.type';
|
|
||||||
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
||||||
|
|
||||||
import { Store, select } from '@ngrx/store';
|
import { Store, select } from '@ngrx/store';
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import { Component, OnInit, Inject, Renderer2 } from '@angular/core';
|
import { Component, OnInit, Inject, Renderer2 } from '@angular/core';
|
||||||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
|
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
|
||||||
import { KEY_LOGIN_RES_INFO } from '@app/types/login-res-info.type';
|
import { KEY_LOGIN_RES_INFO, KEY_VER_INFO } from '@app/types';
|
||||||
import { KEY_VER_INFO } from '@app/types/ver-info.type';
|
|
||||||
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
||||||
|
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
|
|
|
@ -4,7 +4,7 @@ import {
|
||||||
ActivatedRouteSnapshot,
|
ActivatedRouteSnapshot,
|
||||||
RouterStateSnapshot
|
RouterStateSnapshot
|
||||||
} from '@angular/router';
|
} from '@angular/router';
|
||||||
import { Observable, throwError, forkJoin } from 'rxjs';
|
import { Observable, throwError, forkJoin, of } from 'rxjs';
|
||||||
import {
|
import {
|
||||||
map,
|
map,
|
||||||
tap,
|
tap,
|
||||||
|
@ -27,7 +27,8 @@ import {
|
||||||
LoginInfo,
|
LoginInfo,
|
||||||
KEY_LOGIN_INFO,
|
KEY_LOGIN_INFO,
|
||||||
EnvironmentsInfo,
|
EnvironmentsInfo,
|
||||||
KEY_ENVIRONMENTS_INFO
|
KEY_ENVIRONMENTS_INFO,
|
||||||
|
KEY_URL_INFO
|
||||||
} from '@app/types';
|
} from '@app/types';
|
||||||
import { InnerProtocolService } from '@ucap-webmessenger/protocol-inner';
|
import { InnerProtocolService } from '@ucap-webmessenger/protocol-inner';
|
||||||
import {
|
import {
|
||||||
|
@ -47,12 +48,18 @@ import * as VersionInfoStore from '@app/store/setting/version-info';
|
||||||
import * as OptionStore from '@app/store/messenger/option';
|
import * as OptionStore from '@app/store/messenger/option';
|
||||||
import * as QueryStore from '@app/store/messenger/query';
|
import * as QueryStore from '@app/store/messenger/query';
|
||||||
import * as SyncStore from '@app/store/messenger/sync';
|
import * as SyncStore from '@app/store/messenger/sync';
|
||||||
import { KEY_VER_INFO } from '@app/types/ver-info.type';
|
import { KEY_LOGIN_RES_INFO, KEY_VER_INFO } from '@app/types';
|
||||||
import { KEY_LOGIN_RES_INFO } from '@app/types/login-res-info.type';
|
|
||||||
|
|
||||||
import { environment } from '../../environments/environment';
|
import { environment } from '../../environments/environment';
|
||||||
import { SnackBarService } from '@ucap-webmessenger/ui';
|
import { SnackBarService } from '@ucap-webmessenger/ui';
|
||||||
import { AppNativeService } from '@app/services/native.service';
|
import { AppNativeService } from '@app/services/native.service';
|
||||||
|
import {
|
||||||
|
ExternalApiService,
|
||||||
|
UrlInfoResponse,
|
||||||
|
DaesangUrlInfoResponse
|
||||||
|
} from '@ucap-webmessenger/api-external';
|
||||||
|
import { DeviceType } from '@ucap-webmessenger/core';
|
||||||
|
import { StatusCode } from '@ucap-webmessenger/api';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class AppMessengerResolver implements Resolve<void> {
|
export class AppMessengerResolver implements Resolve<void> {
|
||||||
|
@ -60,6 +67,7 @@ export class AppMessengerResolver implements Resolve<void> {
|
||||||
private store: Store<any>,
|
private store: Store<any>,
|
||||||
private sessionStorageService: SessionStorageService,
|
private sessionStorageService: SessionStorageService,
|
||||||
private publicApiService: PublicApiService,
|
private publicApiService: PublicApiService,
|
||||||
|
private externalApiService: ExternalApiService,
|
||||||
private protocolService: ProtocolService,
|
private protocolService: ProtocolService,
|
||||||
private queryProtocolService: QueryProtocolService,
|
private queryProtocolService: QueryProtocolService,
|
||||||
private optionProtocolService: OptionProtocolService,
|
private optionProtocolService: OptionProtocolService,
|
||||||
|
@ -103,6 +111,25 @@ export class AppMessengerResolver implements Resolve<void> {
|
||||||
switchMap(res => {
|
switchMap(res => {
|
||||||
return this.protocolService.connect(res.serverIp);
|
return this.protocolService.connect(res.serverIp);
|
||||||
}),
|
}),
|
||||||
|
switchMap(res => {
|
||||||
|
return this.externalApiService
|
||||||
|
.urlInfoDaesang({
|
||||||
|
deviceType: environmentsInfo.deviceType,
|
||||||
|
loginId: loginInfo.loginId
|
||||||
|
})
|
||||||
|
.pipe(
|
||||||
|
map(response => {
|
||||||
|
console.log(response);
|
||||||
|
if (response.statusCode === StatusCode.Success) {
|
||||||
|
this.sessionStorageService.set<
|
||||||
|
UrlInfoResponse | DaesangUrlInfoResponse
|
||||||
|
>(KEY_URL_INFO, response);
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
catchError(error => of(this.logger.error({ error })))
|
||||||
|
);
|
||||||
|
}),
|
||||||
switchMap(() => this.innerProtocolService.conn({})),
|
switchMap(() => this.innerProtocolService.conn({})),
|
||||||
switchMap(res => {
|
switchMap(res => {
|
||||||
return this.authenticationProtocolService
|
return this.authenticationProtocolService
|
||||||
|
|
|
@ -5,9 +5,12 @@ import {
|
||||||
LocalStorageService
|
LocalStorageService
|
||||||
} from '@ucap-webmessenger/web-storage';
|
} from '@ucap-webmessenger/web-storage';
|
||||||
import { LocaleCode } from '@ucap-webmessenger/core';
|
import { LocaleCode } from '@ucap-webmessenger/core';
|
||||||
import { LoginInfo, KEY_LOGIN_INFO } from '../types';
|
import {
|
||||||
import { KEY_VER_INFO } from '@app/types/ver-info.type';
|
LoginInfo,
|
||||||
import { KEY_LOGIN_RES_INFO } from '@app/types/login-res-info.type';
|
KEY_LOGIN_INFO,
|
||||||
|
KEY_LOGIN_RES_INFO,
|
||||||
|
KEY_VER_INFO
|
||||||
|
} from '../types';
|
||||||
import { PasswordUtil } from '@ucap-webmessenger/pi';
|
import { PasswordUtil } from '@ucap-webmessenger/pi';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
|
|
|
@ -3,3 +3,6 @@ export * from './login-info.type';
|
||||||
export * from './userselect.dialog.type';
|
export * from './userselect.dialog.type';
|
||||||
export * from './right-drawer.type';
|
export * from './right-drawer.type';
|
||||||
export * from './sticker-info.type';
|
export * from './sticker-info.type';
|
||||||
|
export * from './url-info.type';
|
||||||
|
export * from './ver-info.type';
|
||||||
|
export * from './login-res-info.type';
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
export const KEY_URL_INFO = 'ucap::URL_INFO';
|
Loading…
Reference in New Issue
Block a user