From 3e59693e017742d971f490eb7c58870cb745a98d Mon Sep 17 00:00:00 2001 From: joonhoekim <26rote@gmail.com> Date: Fri, 18 Jul 2025 03:58:34 +0000 Subject: (김준회) 결재 모듈 개발 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../realtime-notification-guide.html | 764 +++++++++++++++++++++ .../realtime-notification/realtime-notification.ts | 333 +++++++++ 2 files changed, 1097 insertions(+) create mode 100644 lib/knox-api/realtime-notification/realtime-notification-guide.html create mode 100644 lib/knox-api/realtime-notification/realtime-notification.ts (limited to 'lib/knox-api/realtime-notification') diff --git a/lib/knox-api/realtime-notification/realtime-notification-guide.html b/lib/knox-api/realtime-notification/realtime-notification-guide.html new file mode 100644 index 00000000..728df9c1 --- /dev/null +++ b/lib/knox-api/realtime-notification/realtime-notification-guide.html @@ -0,0 +1,764 @@ +
Knox Suite을 통해 토스트 알림을 전송합니다.
+| API | +URI | +Method | +Description | +
|---|
| 알림 전송 | +/sendnotification | +POST | +실시간 토스트 알림 전송 | +
Request Parameter
URL : + /notification/api/v2.0/sendnotification +| No. | +Properties | +Attribute | +Mandatory | +Parameter Type | +Data Type | +Sample Data | +Note | +
|---|
| 1 | +연계 시스템 ID + | +System-ID | +Y | +Header | +String | +C60REST0001 | +발급받은 + 연계 ID | +
| 2 | +수신계정 | +targetAddress | +Y | +Body | +String Array | +["knoxportal@samsung.com"] | +알림수신인 + 메일계정 | +
| 3 | +이벤트속성 | +ntype | +Y | +Body | +String | +NEW | +이벤트의 + 속성 | +
| 4 | +시스템이름 | +systemname | +Y | +Body | +String | +Push service | +외부 + 시스템 식별 Name | +
| 5 | +알림표시명 | +from | +Y | +Body | +String | +녹스포털 테스트 | +외부 + 시스템 Toast 표시명(Local) | +
| 6 | +알림표시명(영) + | +fromGlobal | +Y | +Body | +String | +Knox Portal Test | +외부 + 시스템 Toast 표시명(Global) | +
| 7 | +Visual속성 + | +exVisualVO | +Y | +Body | +JsonString | +N/A | +알림 + Visual 속성 | +
| 8 | +토스트이름 | +template | +N | +Body | +String | +default template | +Pre-Defined된 Toast + 이름 | +
| 9 | +로고이미지 | +skin | +N | +Body | +String | +default skin | +Background 와 기본제공 + Logo 이미지 | +
| 10 | +영문사용여부 + | +global | +N | +Body | +String | +N | +Text에 + 설정된 global 사용여부 | +
| 11 | +로고표시여부 + | +logo | +N | +Body | +String | +Y | +logo + 표시여부 | +
| 12 | +로고이미지URL + | +logourl | +N | +Query | +String | +http://www.samsung.net/logo.jpg | +불러올 + logo 표시 이미지 url | +
| 13 | +Text속성 + | +exTextVO | +Y | +Query | +JsonStringArray | +N/A | +알림 + Text 속성 | +
| 14 | +표시문자열 | +content | +Y | +Body | +String | +한글기준 10자이내, 30byte 이내 | +표시 + 문자열 | +
| 15 | +표시문자열(영) + | +contentglobal | +N | +Body | +String | +Toast Title | +표시 + 문자열 Global | +
| 16 | +표시문자크기 + | +size | +N | +Body | +Int | +512 | +표시 + 문자열 문자 크기 | +
| 17 | +표시문자위치 + | +pos | +Y | +Body | +Int | +2 | +표시 + 문자열 위치 | +
| 18 | +표시문자스타일 + | +style | +N | +Body | +String | +BOLD | +표시 + 문자열 문자 스타일 | +
| 19 | +Color속성 + | +exColorVO | +N | +Body | +JsonString | +N/A | +표시 + 문자열 문자 색상 | +
| 20 | +표시문자Red + | +r | +Y | +Body | +Int | +255 | +RGB + 값중 red 값 | +
| 21 | +표시문자Green + | +g | +Y | +Body | +Int | +255 | +RGB + 값중 green 값 | +
| 22 | +표시문자Blue + | +b | +Y | +Body | +Int | +0 | +RGB + 값중 blue 값 | +
| 23 | +Action속성 + | +exActionsVO | +Y | +Body | +JsonString | +N/A | +알림 + Action 속성 | +
| 24 | +팝업여부 | +popup | +N | +Body | +String | +Y | +Toast + 클릭 시 links 값 중 rel 이 popup인 href 호출 | +
| 25 | +클릭허용여부 + | +clickable | +N | +Body | +String | +Y | +Toast + 영역 클릭 허용 여부 | +
| 26 | +Link속성 + | +exLinksVO | +N | +Body | +JsonString | +N/A | +알림 + Link 속성 | +
| 27 | +링크속성값 | +rel | +N | +Body | +String | +popup | +링크 식별 + 값 | +
| 28 | +링크URL | +href | +N | +Body | +String | +http://www.samsung.net | +link + URL | +
| 29 | +부가 옵션 | +hint | +Y | +Header | +String | +multibrowser | +multibrowser값 지정 시 녹스포털을 로그인한 브라우저의 Tab으로 href URL을 로딩
+ * IE 는 Popup으로 표시됨 |
+
Response Parameter
+| No. | +Properties | +Attribute | +Data Type | +Sample Data | +Note | +
|---|
| 1 | +API 호출 + 성공여부 | +Result | +String | +Success | +실시간알림 연계 + 성공여부 | +
| 2 | +에러코드 | +ErrorCode | +String | +null | +에러발생 + 시 코드 값 | +
| 3 | +응답메시지 및 알림 + ID | +Message and ID | +String | +Alarm Created, uid : 3cd8085ff2c4420bb4cf1828d6369ea4 | +응답 + 메시지 및 알림 ID | +
Sample
+| Request | +Response | +
|---|
+ {
+ |
+
+ {
+ |
+
Error Code
+| HTTP응답코드 | +에러코드 | +에러메시지 | +조치방안 | +
|---|
| 400 | +EX001 | +Notification information is null. | +알림 인풋 + 전체가 NULL일 경우 발생 | +
| 400 | +EX002 | +[ntype] value is NEW or RECALL. | +ntype + 값이 NEW이거나 RECALL이지 않은 경우 발생 | +
| 400 | +EX003 | +[from] is mendentory. | +from값이 + 입력되지 않은 경우 발생 | +
| 400 | +EX004 | +[fromGlobal] is mendentory. | +fromGlobal값이 입력되지 않은 경우 + 발생 | +
| 400 | +EX006 | +[systemname] is mendentory. | +systemname값이 입력되지 않은 경우 + 발생 | +
| 400 | +EX007 | +[exVisualVO] is mendentory. | +exVisualVO값이 입력되지 않은 경우 + 발생 | +
| 400 | +EX008 | +[exActionsVO] is mendentory. | +exActionsVO값이 입력되지 않은 경우 + 발생 | +
| 400 | +EX009 | +The length of [template] is max 10 characters. | +template 값이 10자 이상 입력될 경우 + 발생 | +
| 400 | +EX010 | +The length of [skin] is max 10 characters. | +skin 값이 + 10자 이상 입력될 경우 발생 | +
| 400 | +EX011 | +The value of [global] value is not Y or N. | +global + 값이 Y혹은 N이 입력되지 않는 경우 발생 | +
| 400 | +EX012 | +The value of [logo] value is not Y or N. | +logo 값이 + Y 혹은 N이 입력되지 않는 경우 발생 | +
| 400 | +EX013 | +The value of [logourl] must start with url pattern(http://). | +Logourl값이 정상적인 URL이 아닌 경우 + 발생(http://로 시작필요) | +
| 400 | +EX014 | +[exTextVO] is mendentory. | +exTextVO 값이 입력되지 않은 경우 + 발생 | +
| 400 | +EX015 | +[content] is mendentory. | +content + 값이 입력되지 않은 경우 발생 | +
| 400 | +EX016 | +[R,G,B] value range is 0 to 255. | +R,G,B + 값이 0~255범위에서 벗어나는 경우 발생 | +
| 400 | +EX017 | +For the requested search conditions, paging is not possible. | +href 값이 + 정상적인 URL이 아닌 경우 발생(http://로 시작필요) | +
| 400 | +EX018 | +The value of [template] encoding is supported UTF-8. | +Template 값이 UTF-8로 인코딩 되지 + 않은 경우 발생 | +
| 400 | +EX019 | +The value of [skin] encoding is supported UTF-8. | +Skin 값이 + UTF-8로 인코딩 되지 않은 경우 발생 | +
| 400 | +EX020 | +The value of [rel] is max 10 characters. | +Rel 값이 + 10자 이상 입력될 경우 발생 | +
| 400 | +EX021 | +The value of [rel] encoding is supported UTF-8. | +rel 값이 + UTF-8로 인코딩 되지 않은 경우 발생 | +
| 400 | +EX022 | +[targetAddress] is invalid. Check if an on-leave or retired person. | +targetAddress 값의 임직원 정보가 없는 + 경우 발생 | +
| 400 | +EX023 | +[size] value range is 0 to 1024. | +size 값이 + 0~1024범위에서 벗어나는 경우 발생 | +
| 400 | +EX024 | +[pos] value range is 1 to 3. | +pos 값이 + 1~3위에서 벗어나는 경우 발생 | +