From 376069d8ad35aa49f18b0dbd41fc18be8d9b17c9 Mon Sep 17 00:00:00 2001 From: Richard Park Date: Tue, 8 Oct 2019 15:42:36 +0900 Subject: [PATCH] refactoring of api & pi --- .../lib/{models => apis}/file-profile-save.ts | 0 .../{models => apis}/file-talk-download.ts | 0 .../lib/{models => apis}/file-talk-save.ts | 0 .../lib/{models => apis}/file-talk-share.ts | 0 .../{models => apis}/mass-talk-download.ts | 0 .../lib/{models => apis}/mass-talk-save.ts | 0 .../trans-mass-talk-download.ts | 0 .../{models => apis}/trans-mass-talk-save.ts | 0 .../lib/{models => apis}/translation-req.ts | 0 .../lib/{models => apis}/translation-save.ts | 0 .../src/lib/services/common-api.service.ts | 20 +++++++++---------- .../src/public-api.ts | 20 +++++++++---------- .../{models => apis}/check-user-info-ex.ts | 0 .../src/lib/{models => apis}/company-list.ts | 10 +--------- .../src/lib/{models => apis}/token-update.ts | 0 .../src/lib/{models => apis}/url-info.ts | 0 .../src/lib/models/company.ts | 8 ++++++++ .../src/lib/services/external-api.service.ts | 8 ++++---- .../src/public-api.ts | 10 ++++++---- .../src/lib/{models => apis}/update-info.ts | 0 .../src/lib/{models => apis}/version-info2.ts | 0 .../src/lib/services/public-api.service.ts | 4 ++-- .../src/public-api.ts | 4 ++-- .../src/lib/{models => apis}/api.ts | 0 .../ucap-webmessenger-api/src/public-api.ts | 2 +- .../src/lib/{models => apis}/login2.ts | 0 .../src/lib/{models => apis}/pi.ts | 0 .../src/lib/{models => apis}/privacy-total.ts | 0 .../lib/{models => apis}/user-terms-action.ts | 0 .../src/lib/services/pi.service.ts | 9 +++------ .../ucap-webmessenger-pi/src/public-api.ts | 8 ++++---- 31 files changed, 51 insertions(+), 52 deletions(-) rename projects/ucap-webmessenger-api-common/src/lib/{models => apis}/file-profile-save.ts (100%) rename projects/ucap-webmessenger-api-common/src/lib/{models => apis}/file-talk-download.ts (100%) rename projects/ucap-webmessenger-api-common/src/lib/{models => apis}/file-talk-save.ts (100%) rename projects/ucap-webmessenger-api-common/src/lib/{models => apis}/file-talk-share.ts (100%) rename projects/ucap-webmessenger-api-common/src/lib/{models => apis}/mass-talk-download.ts (100%) rename projects/ucap-webmessenger-api-common/src/lib/{models => apis}/mass-talk-save.ts (100%) rename projects/ucap-webmessenger-api-common/src/lib/{models => apis}/trans-mass-talk-download.ts (100%) rename projects/ucap-webmessenger-api-common/src/lib/{models => apis}/trans-mass-talk-save.ts (100%) rename projects/ucap-webmessenger-api-common/src/lib/{models => apis}/translation-req.ts (100%) rename projects/ucap-webmessenger-api-common/src/lib/{models => apis}/translation-save.ts (100%) rename projects/ucap-webmessenger-api-external/src/lib/{models => apis}/check-user-info-ex.ts (100%) rename projects/ucap-webmessenger-api-external/src/lib/{models => apis}/company-list.ts (87%) rename projects/ucap-webmessenger-api-external/src/lib/{models => apis}/token-update.ts (100%) rename projects/ucap-webmessenger-api-external/src/lib/{models => apis}/url-info.ts (100%) create mode 100644 projects/ucap-webmessenger-api-external/src/lib/models/company.ts rename projects/ucap-webmessenger-api-public/src/lib/{models => apis}/update-info.ts (100%) rename projects/ucap-webmessenger-api-public/src/lib/{models => apis}/version-info2.ts (100%) rename projects/ucap-webmessenger-api/src/lib/{models => apis}/api.ts (100%) rename projects/ucap-webmessenger-pi/src/lib/{models => apis}/login2.ts (100%) rename projects/ucap-webmessenger-pi/src/lib/{models => apis}/pi.ts (100%) rename projects/ucap-webmessenger-pi/src/lib/{models => apis}/privacy-total.ts (100%) rename projects/ucap-webmessenger-pi/src/lib/{models => apis}/user-terms-action.ts (100%) diff --git a/projects/ucap-webmessenger-api-common/src/lib/models/file-profile-save.ts b/projects/ucap-webmessenger-api-common/src/lib/apis/file-profile-save.ts similarity index 100% rename from projects/ucap-webmessenger-api-common/src/lib/models/file-profile-save.ts rename to projects/ucap-webmessenger-api-common/src/lib/apis/file-profile-save.ts diff --git a/projects/ucap-webmessenger-api-common/src/lib/models/file-talk-download.ts b/projects/ucap-webmessenger-api-common/src/lib/apis/file-talk-download.ts similarity index 100% rename from projects/ucap-webmessenger-api-common/src/lib/models/file-talk-download.ts rename to projects/ucap-webmessenger-api-common/src/lib/apis/file-talk-download.ts diff --git a/projects/ucap-webmessenger-api-common/src/lib/models/file-talk-save.ts b/projects/ucap-webmessenger-api-common/src/lib/apis/file-talk-save.ts similarity index 100% rename from projects/ucap-webmessenger-api-common/src/lib/models/file-talk-save.ts rename to projects/ucap-webmessenger-api-common/src/lib/apis/file-talk-save.ts diff --git a/projects/ucap-webmessenger-api-common/src/lib/models/file-talk-share.ts b/projects/ucap-webmessenger-api-common/src/lib/apis/file-talk-share.ts similarity index 100% rename from projects/ucap-webmessenger-api-common/src/lib/models/file-talk-share.ts rename to projects/ucap-webmessenger-api-common/src/lib/apis/file-talk-share.ts diff --git a/projects/ucap-webmessenger-api-common/src/lib/models/mass-talk-download.ts b/projects/ucap-webmessenger-api-common/src/lib/apis/mass-talk-download.ts similarity index 100% rename from projects/ucap-webmessenger-api-common/src/lib/models/mass-talk-download.ts rename to projects/ucap-webmessenger-api-common/src/lib/apis/mass-talk-download.ts diff --git a/projects/ucap-webmessenger-api-common/src/lib/models/mass-talk-save.ts b/projects/ucap-webmessenger-api-common/src/lib/apis/mass-talk-save.ts similarity index 100% rename from projects/ucap-webmessenger-api-common/src/lib/models/mass-talk-save.ts rename to projects/ucap-webmessenger-api-common/src/lib/apis/mass-talk-save.ts diff --git a/projects/ucap-webmessenger-api-common/src/lib/models/trans-mass-talk-download.ts b/projects/ucap-webmessenger-api-common/src/lib/apis/trans-mass-talk-download.ts similarity index 100% rename from projects/ucap-webmessenger-api-common/src/lib/models/trans-mass-talk-download.ts rename to projects/ucap-webmessenger-api-common/src/lib/apis/trans-mass-talk-download.ts diff --git a/projects/ucap-webmessenger-api-common/src/lib/models/trans-mass-talk-save.ts b/projects/ucap-webmessenger-api-common/src/lib/apis/trans-mass-talk-save.ts similarity index 100% rename from projects/ucap-webmessenger-api-common/src/lib/models/trans-mass-talk-save.ts rename to projects/ucap-webmessenger-api-common/src/lib/apis/trans-mass-talk-save.ts diff --git a/projects/ucap-webmessenger-api-common/src/lib/models/translation-req.ts b/projects/ucap-webmessenger-api-common/src/lib/apis/translation-req.ts similarity index 100% rename from projects/ucap-webmessenger-api-common/src/lib/models/translation-req.ts rename to projects/ucap-webmessenger-api-common/src/lib/apis/translation-req.ts diff --git a/projects/ucap-webmessenger-api-common/src/lib/models/translation-save.ts b/projects/ucap-webmessenger-api-common/src/lib/apis/translation-save.ts similarity index 100% rename from projects/ucap-webmessenger-api-common/src/lib/models/translation-save.ts rename to projects/ucap-webmessenger-api-common/src/lib/apis/translation-save.ts diff --git a/projects/ucap-webmessenger-api-common/src/lib/services/common-api.service.ts b/projects/ucap-webmessenger-api-common/src/lib/services/common-api.service.ts index 6c7771a6..7e401ac2 100644 --- a/projects/ucap-webmessenger-api-common/src/lib/services/common-api.service.ts +++ b/projects/ucap-webmessenger-api-common/src/lib/services/common-api.service.ts @@ -11,59 +11,59 @@ import { FileProfileSaveResponse, encodeFileProfileSave, decodeFileProfileSave -} from '../models/file-profile-save'; +} from '../apis/file-profile-save'; import { FileTalkDownloadRequest, encodeFileTalkDownload -} from '../models/file-talk-download'; +} from '../apis/file-talk-download'; import { FileTalkSaveRequest, FileTalkSaveResponse, encodeFileTalkSave, decodeFileTalkSave -} from '../models/file-talk-save'; +} from '../apis/file-talk-save'; import { FileTalkShareRequest, FileTalkShareResponse, encodeFileTalkShare, decodeFileTalkShare -} from '../models/file-talk-share'; +} from '../apis/file-talk-share'; import { MassTalkDownloadRequest, MassTalkDownloadResponse, encodeMassTalkDownload, decodeMassTalkDownload -} from '../models/mass-talk-download'; +} from '../apis/mass-talk-download'; import { MassTalkSaveRequest, MassTalkSaveResponse, encodeMassTalkSave, decodeMassTalkSave -} from '../models/mass-talk-save'; +} from '../apis/mass-talk-save'; import { TransMassTalkDownloadRequest, TransMassTalkDownloadResponse, encodeTransMassTalkDownload, decodeTransMassTalkDownload -} from '../models/trans-mass-talk-download'; +} from '../apis/trans-mass-talk-download'; import { TransMassTalkSaveRequest, TransMassTalkSaveResponse, encodeTransMassTalkSave, decodeTransMassTalkSave -} from '../models/trans-mass-talk-save'; +} from '../apis/trans-mass-talk-save'; import { TranslationReqRequest, TranslationReqResponse, encodeTranslationReq, decodeTranslationReq -} from '../models/translation-req'; +} from '../apis/translation-req'; import { TranslationSaveRequest, TranslationSaveResponse, encodeTranslationSave, decodeTranslationSave -} from '../models/translation-save'; +} from '../apis/translation-save'; @Injectable({ providedIn: 'root' diff --git a/projects/ucap-webmessenger-api-common/src/public-api.ts b/projects/ucap-webmessenger-api-common/src/public-api.ts index 9398e8a3..e94b036b 100644 --- a/projects/ucap-webmessenger-api-common/src/public-api.ts +++ b/projects/ucap-webmessenger-api-common/src/public-api.ts @@ -4,16 +4,16 @@ export * from './lib/types/module-config'; -export * from './lib/models/file-profile-save'; -export * from './lib/models/file-talk-download'; -export * from './lib/models/file-talk-save'; -export * from './lib/models/file-talk-share'; -export * from './lib/models/mass-talk-download'; -export * from './lib/models/mass-talk-save'; -export * from './lib/models/trans-mass-talk-download'; -export * from './lib/models/trans-mass-talk-save'; -export * from './lib/models/translation-req'; -export * from './lib/models/translation-save'; +export * from './lib/apis/file-profile-save'; +export * from './lib/apis/file-talk-download'; +export * from './lib/apis/file-talk-save'; +export * from './lib/apis/file-talk-share'; +export * from './lib/apis/mass-talk-download'; +export * from './lib/apis/mass-talk-save'; +export * from './lib/apis/trans-mass-talk-download'; +export * from './lib/apis/trans-mass-talk-save'; +export * from './lib/apis/translation-req'; +export * from './lib/apis/translation-save'; export * from './lib/services/common-api.service'; diff --git a/projects/ucap-webmessenger-api-external/src/lib/models/check-user-info-ex.ts b/projects/ucap-webmessenger-api-external/src/lib/apis/check-user-info-ex.ts similarity index 100% rename from projects/ucap-webmessenger-api-external/src/lib/models/check-user-info-ex.ts rename to projects/ucap-webmessenger-api-external/src/lib/apis/check-user-info-ex.ts diff --git a/projects/ucap-webmessenger-api-external/src/lib/models/company-list.ts b/projects/ucap-webmessenger-api-external/src/lib/apis/company-list.ts similarity index 87% rename from projects/ucap-webmessenger-api-external/src/lib/models/company-list.ts rename to projects/ucap-webmessenger-api-external/src/lib/apis/company-list.ts index 441ea96a..03f47356 100644 --- a/projects/ucap-webmessenger-api-external/src/lib/models/company-list.ts +++ b/projects/ucap-webmessenger-api-external/src/lib/apis/company-list.ts @@ -5,6 +5,7 @@ import { APIEncoder, APIDecoder } from '@ucap-webmessenger/api'; +import { Company } from '../models/company'; export interface CompanyListRequest extends APIRequest { userSeq?: string; @@ -14,15 +15,6 @@ export interface CompanyListRequest extends APIRequest { companyGroupCode: string; } -export interface Company { - companyCode?: string; - companyName?: string; - companyDomain?: string; - companyConfAuthYn?: string; - ucapUseYn?: string; - companyTimerChatAuthYn?: string; -} - export interface CompanyListResponse extends APIResponse { companyList?: Company[]; } diff --git a/projects/ucap-webmessenger-api-external/src/lib/models/token-update.ts b/projects/ucap-webmessenger-api-external/src/lib/apis/token-update.ts similarity index 100% rename from projects/ucap-webmessenger-api-external/src/lib/models/token-update.ts rename to projects/ucap-webmessenger-api-external/src/lib/apis/token-update.ts diff --git a/projects/ucap-webmessenger-api-external/src/lib/models/url-info.ts b/projects/ucap-webmessenger-api-external/src/lib/apis/url-info.ts similarity index 100% rename from projects/ucap-webmessenger-api-external/src/lib/models/url-info.ts rename to projects/ucap-webmessenger-api-external/src/lib/apis/url-info.ts diff --git a/projects/ucap-webmessenger-api-external/src/lib/models/company.ts b/projects/ucap-webmessenger-api-external/src/lib/models/company.ts new file mode 100644 index 00000000..81c3d228 --- /dev/null +++ b/projects/ucap-webmessenger-api-external/src/lib/models/company.ts @@ -0,0 +1,8 @@ +export interface Company { + companyCode?: string; + companyName?: string; + companyDomain?: string; + companyConfAuthYn?: string; + ucapUseYn?: string; + companyTimerChatAuthYn?: string; +} diff --git a/projects/ucap-webmessenger-api-external/src/lib/services/external-api.service.ts b/projects/ucap-webmessenger-api-external/src/lib/services/external-api.service.ts index f8e41abd..a4730adf 100644 --- a/projects/ucap-webmessenger-api-external/src/lib/services/external-api.service.ts +++ b/projects/ucap-webmessenger-api-external/src/lib/services/external-api.service.ts @@ -11,25 +11,25 @@ import { CheckUserInfoExResponse, encodeCheckUserInfoEx, decodeCheckUserInfoEx -} from '../models/check-user-info-ex'; +} from '../apis/check-user-info-ex'; import { CompanyListRequest, CompanyListResponse, encodeCompanyList, decodeCompanyList -} from '../models/company-list'; +} from '../apis/company-list'; import { TokenUpdateRequest, TokenUpdateResponse, encodeTokenUpdate, decodeTokenUpdate -} from '../models/token-update'; +} from '../apis/token-update'; import { UrlInfoResponse, UrlInfoRequest, encodeUrlInfo, decodeUrlInfo -} from '../models/url-info'; +} from '../apis/url-info'; @Injectable({ providedIn: 'root' diff --git a/projects/ucap-webmessenger-api-external/src/public-api.ts b/projects/ucap-webmessenger-api-external/src/public-api.ts index 3398ff7c..b9a5d5ab 100644 --- a/projects/ucap-webmessenger-api-external/src/public-api.ts +++ b/projects/ucap-webmessenger-api-external/src/public-api.ts @@ -4,10 +4,12 @@ export * from './lib/types/module-config'; -export * from './lib/models/check-user-info-ex'; -export * from './lib/models/company-list'; -export * from './lib/models/token-update'; -export * from './lib/models/url-info'; +export * from './lib/models/company'; + +export * from './lib/apis/check-user-info-ex'; +export * from './lib/apis/company-list'; +export * from './lib/apis/token-update'; +export * from './lib/apis/url-info'; export * from './lib/services/external-api.service'; diff --git a/projects/ucap-webmessenger-api-public/src/lib/models/update-info.ts b/projects/ucap-webmessenger-api-public/src/lib/apis/update-info.ts similarity index 100% rename from projects/ucap-webmessenger-api-public/src/lib/models/update-info.ts rename to projects/ucap-webmessenger-api-public/src/lib/apis/update-info.ts diff --git a/projects/ucap-webmessenger-api-public/src/lib/models/version-info2.ts b/projects/ucap-webmessenger-api-public/src/lib/apis/version-info2.ts similarity index 100% rename from projects/ucap-webmessenger-api-public/src/lib/models/version-info2.ts rename to projects/ucap-webmessenger-api-public/src/lib/apis/version-info2.ts diff --git a/projects/ucap-webmessenger-api-public/src/lib/services/public-api.service.ts b/projects/ucap-webmessenger-api-public/src/lib/services/public-api.service.ts index 37a55a45..d3dd1f98 100644 --- a/projects/ucap-webmessenger-api-public/src/lib/services/public-api.service.ts +++ b/projects/ucap-webmessenger-api-public/src/lib/services/public-api.service.ts @@ -10,13 +10,13 @@ import { VersionInfo2Response, encodeVersionInfo2, decodeVersionInfo2 -} from '../models/version-info2'; +} from '../apis/version-info2'; import { UpdateInfoRequest, UpdateInfoResponse, encodeUpdateInfo, decodeUpdateInfo -} from '../models/update-info'; +} from '../apis/update-info'; import { ModuleConfig } from '../types/module-config'; @Injectable({ diff --git a/projects/ucap-webmessenger-api-public/src/public-api.ts b/projects/ucap-webmessenger-api-public/src/public-api.ts index 5ea84af3..eb7db5ee 100644 --- a/projects/ucap-webmessenger-api-public/src/public-api.ts +++ b/projects/ucap-webmessenger-api-public/src/public-api.ts @@ -2,8 +2,8 @@ * Public API Surface of ucap-webmessenger-api-public */ -export * from './lib/models/update-info'; -export * from './lib/models/version-info2'; +export * from './lib/apis/update-info'; +export * from './lib/apis/version-info2'; export * from './lib/services/public-api.service'; diff --git a/projects/ucap-webmessenger-api/src/lib/models/api.ts b/projects/ucap-webmessenger-api/src/lib/apis/api.ts similarity index 100% rename from projects/ucap-webmessenger-api/src/lib/models/api.ts rename to projects/ucap-webmessenger-api/src/lib/apis/api.ts diff --git a/projects/ucap-webmessenger-api/src/public-api.ts b/projects/ucap-webmessenger-api/src/public-api.ts index 7c3bbaf2..145c80d0 100644 --- a/projects/ucap-webmessenger-api/src/public-api.ts +++ b/projects/ucap-webmessenger-api/src/public-api.ts @@ -2,7 +2,7 @@ * Public API Surface of ucap-webmessenger-api */ -export * from './lib/models/api'; +export * from './lib/apis/api'; export * from './lib/types/status-code.type'; 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';