{"_id":"@ridi/simple-service-status","_rev":"39-c974cce3e1f65e629affdfed5f36aebf","name":"@ridi/simple-service-status","dist-tags":{"latest":"1.4.0"},"versions":{"1.4.0":{"name":"@ridi/simple-service-status","version":"1.4.0","keywords":["status"],"author":"","license":"MIT","_id":"@ridi/simple-service-status@1.4.0","maintainers":[{"name":"heejae","email":"j132134@gmail.com"},{"name":"mskims","email":"its@mskim.me"},{"name":"namenu","email":"namenu@gmail.com"},{"name":"jh.park","email":"jh.park@ridi.com"},{"name":"freekering","email":"kering@ridi.com"},{"name":"davin.ahn","email":"davin.ahn@ridi.com"},{"name":"devgrapher","email":"devgrapher@ridi.com"},{"name":"kt.kang","email":"kt.kang@ridi.com"},{"name":"ridicorp","email":"developer@ridi.com"}],"homepage":"https://github.com/ridi/simple-service-status#readme","bugs":{"url":"https://github.com/ridi/simple-service-status/issues"},"dist":{"shasum":"a00d0bae00a8b6f4f75880c3419d547db303accc","tarball":"https://registry.npmjs.org/@ridi/simple-service-status/-/simple-service-status-1.4.0.tgz","fileCount":167,"integrity":"sha512-sy/657fGrWEOd98dZ39MVe7SSLlQFc92C5ZqV0VvoW9m/wekkOm5RLjYOjUYfYDbj+waCuY50xtbyxuUus4cwg==","signatures":[{"sig":"MEUCIG0OR0rIYgI0ws6NjpQ+IDoV8pvqWOa0AS+stcOn7EBEAiEAtTIsKORuriI6EjuZfw+quS6YcIKU68jFuATn+QrU0Uc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":840653,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeKRtJCRA9TVsSAnZWagAANK0P/RUmtwrT0azYMo/g3i6m\novQWNf959Um6hbTtSzfS1KQ/YI3Q7E9AJrvH8XtE3QKg07Q564BXHCL5JV1y\nft7vKR7gUymiTimtqEgl0zxjShl84t1mYIbm7s7few2NdFntYhjZHILTh0Vv\ndeaIvfjfLW2NAyWD39Gzi6bflCQuH68zo4l3ORAyXBY9lsGgyss+MbQAUvU6\n82+ss4a367z2yprlC+QrH4tVdcGXUUW3s+Bk5p0HtREwFtMQeUigYY8zDCl/\n3B64M4kgWaWnDFUKPPvb5OPDcRE5FAns1uzWi5eW9W34ExhOFKNwo/J/dccn\nVsj1X2LIO7K7P/l4JEvEF6lpNdmF0QTjYrPJuvMx/kIwI6Wj5c9i+MyELWiK\n784q6yaArnremxoPkH1ToFUU/D28TlwZKqTQEt30vdwU2s2AjLOfpIV3MO9E\nhmrABJCr+0LzvqfMfM/srjO13cHaGIx22NqNdvShqidk1YccVClrb8ClERDh\nJXYaGOeA0egLCMChMAhokrmjpUMPheNlxuGIL+xqqGzWkDVyO4M/LK2gyiD1\ntzAJnV++JRmBZFmH9qYCe3qshcrASp8smgxFJgRZPjY72cvOf4pq8lJ2FoOz\nZvBL+F1Oeopxy0mEoPCzDPisr0EdkWcxKBpQHvtjZ7pBDnPBbT0sVpgR2GDo\nTCQI\r\n=V+jM\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"verbose":true,"transform":{"^.+\\.jsx?$":"babel-jest"},"collectCoverage":true,"coverageReporters":["clover"]},"main":"dist/index.js","gitHead":"a38a3e35454d93da739299f9c9c581e0289265ff","scripts":{"lint":"eslint ./src","test":"jest --forceExit","start":"npm run start:prod","start:dev":"gulp dev-start","start:prod":"node dist/index.js","webpack:dev":"NODE_ENV=development webpack --config=./webpack.config.js","webpack:prod":"NODE_ENV=production webpack --config=./webpack.config.js","heroku-postbuild":"gulp server-build && npm run webpack:prod"},"_npmUser":{"name":"ridicorp","email":"developer@ridi.com"},"repository":{"url":"git+https://github.com/ridi/simple-service-status.git","type":"git"},"_npmVersion":"6.13.4","description":"A simple tool that supports management UI and query API for announcement service status designating specific version of app or platform","directories":{"test":"tests"},"_nodeVersion":"12.14.0","dependencies":{"co":"^4.6.0","joi":"^10.2.0","axios":"^0.19.1","react":"^15.4.1","dotenv":"^4.0.0","moment":"^2.24.0","semver":"^5.7.1","mongodb":"^3.5.1","winston":"^2.3.0","draft-js":"^0.10.0","react-dom":"^15.4.1","@hapi/hapi":"^17.9.0","node-cache":"^4.2.1","prop-types":"^15.7.2","@hapi/inert":"^5.2.2","@hapi/vision":"^5.5.4","babel-loader":"^7.1.1","jsonwebtoken":"^8.5.1","babel-polyfill":"^6.20.0","babel-register":"^6.18.0","hapi-auth-jwt2":"^8.8.1","react-datetime":"^2.8.1","react-bootstrap":"^0.31.2","react-selectize":"^3.0.1","hapi-auth-cookie":"^8.1.0","hapi-react-views":"^9.2.1","react-hot-loader":"^3.0.0-beta.6","react-dom-factories":"^1.0.1","draft-js-export-html":"^0.6.0","react-addons-shallow-compare":"^15.4.1","react-addons-css-transition-group":"^15.4.1","babel-plugin-transform-builtin-extend":"^1.1.2"},"_hasShrinkwrap":false,"devDependencies":{"gulp":"^4.0.2","eslint":"^4.4.0","express":"^4.17.1","webpack":"^4.41.5","jest-cli":"^24.9.0","node-sass":"^4.13.1","@hapi/h2o2":"^8.3.2","babel-core":"^6.26.3","babel-jest":"^24.9.0","css-loader":"^2.1.1","gulp-babel":"^6.1.2","json-loader":"^0.5.4","sass-loader":"^7.3.1","webpack-cli":"^3.3.10","gulp-nodemon":"^2.4.2","style-loader":"^0.18.2","gulp-sourcemaps":"^2.6.5","babel-preset-env":"^1.7.0","babel-preset-react":"^6.16.0","webpack-dev-server":"^3.10.1","@ridi/eslint-config":"*"},"_npmOperationalInternal":{"tmp":"tmp/simple-service-status_1.4.0_1579752264836_0.20513005758546177","host":"s3://npm-registry-packages"}}},"time":{"created":"2020-01-23T04:04:24.690Z","modified":"2026-07-01T06:20:30.910Z","1.4.0":"2020-01-23T04:04:25.072Z"},"bugs":{"url":"https://github.com/ridi/simple-service-status/issues"},"license":"MIT","homepage":"https://github.com/ridi/simple-service-status#readme","keywords":["status"],"repository":{"url":"git+https://github.com/ridi/simple-service-status.git","type":"git"},"description":"A simple tool that supports management UI and query API for announcement service status designating specific version of app or platform","maintainers":[{"email":"davin.ahn@ridi.com","name":"davin.ahn"},{"email":"developer@ridi.com","name":"ridicorp"},{"email":"junhee.han@ridi.com","name":"ridi-junhee"},{"email":"nsa06031@gmail.com","name":"mando212"},{"email":"hw.choi@ridi.com","name":"hw.choi"},{"email":"ys.yoon@ridi.com","name":"ys.yoon"}],"readme":"# Simple Service Status\n\n[![Build Status](https://travis-ci.com/ridi/simple-service-status.svg?branch=master)](https://travis-ci.com/ridi/simple-service-status)\n[![npm](https://img.shields.io/npm/v/simple-service-status.svg)](https://www.npmjs.com/package/simple-service-status)\n\n## Overview\n\n특정 앱/플랫폼 버전을 지정하여 공지사항을 전달할 수 있는 간단한 도구입니다.\n공지사항을 관리할 수 있는 웹 UI와 질의를 위한 API를 제공합니다.\n\n버전 비교를 위해서 내부적으로 [SemVer](http://semver.org/)를 사용하고 있습니다.\n자세한 비교 방식을 확인하시려면 [SemVer Calculator](https://semver.npmjs.com/)를 참조하세요.\n\n## Prerequisite\n\n- [Node](https://nodejs.org/ko/) 설치 (>= 8.x)\n- [MongoDB](https://www.mongodb.com/) 설치\n\n## Install\n\n```\n$ git clone git@github.com:ridi/simple-service-status.git [target directory]\n$ cd [taget directory]\n$ npm install\n```\n\n## Configure\n\n필요한 경우 아래의 `src/config/*.config.js`를 수정하세요.\n\n### Configure Server `server.config.js`\n\n- `defaults.host`: 서버 구동 호스트\n- `defaults.port`: 서버 구동 포트\n- `defaults.mongoDBUrl`: MongoDB 접속 주소 (없을 경우 mongodb://localhost 사용)\n- `auth.secretKey`: 패스워드와 인증 토큰 암호화를 위한 비밀키 (없을 경우 \"secretKey\" 문자열 사용)\n- `auth.tokenTTL`: 발급된 token의 만료 시간\n- `initialData`: 서버 초기화 시 DB에 생성될 데이터\n\n### Configure Client `client.config.js`\n\n- `editor.supportEnhancedFormat`: 이 값을 `true`로 설정할 경우 UI Editor들의 모든 포매팅 기능을 사용할 수 있습니다.\n\n### Make `.env` file\n\n`server.config.js`를 직접 수정하는 대신 환경변수를 사용해 설정 값을 덮어쓸 수 있습니다.\n필요한 경우 프로젝트 루트에 `.env` 파일을 생성하고 다음의 값들을 설정합니다.\n\n- `PORT`: `server.config.js`의 `defaults.port` 참고\n- `MONGODB_URI`: `server.config.js`의 `defaults.mongoDBUrl` 참고\n- `SECRET_KEY`: `server.config.js`의 `auth.secretKey` 참고\n\n```\nMONGODB_URI=mongodb://your.domain:port/database_name\nSECRET_KEY=secret_key\nPORT=8080\n```\n\n## Run\n\n### Run Script\n\nFor development\n```\n# 다음을 실행하면 서버(포트 번호: 8080)와 모듈 핫 리로딩을 위한 서버(포트 번호: 3000)가 함께 구동됩니다.\nnpm run start:dev\n```\n\nFor production\n```\nnpm start\n```\n\n구동 후 [http://localhost:8080](http://localhost:8080)으로 접속하면 관리 UI로 연결됩니다.\n\n## Test\n\n```\nnpm test\n```\n\n## Public API\n### Check Service Status\n\n현재 디바이스 플랫폼과 앱 버전에 대해 공지사항이 있는지 확인한다.\n\n```\nGET /v1/status/check?device_type=[device_type]&device_version=[device_version]&app_version=[app_version]\n```\n\n#### Parameters\n\n| 이름           | 타입                                              | 설명                                      |\n| -------------- | ------------------------------------------------- | ----------------------------------------- |\n| device_type    | enum (*, android, ios, paper, qt)                 | 디바이스(플랫폼) 종류 (더 추가될 수 있음) |\n| device_version | string (* or [SemVer format](http://semver.org/)) | 디바이스 플랫폼 버전                      |\n| app_version    | string (* or [SemVer format](http://semver.org/)) | 뷰어 앱 버전 ('x.x.x' 형태 or '*' 입력)   |\n\n#### Response (JSON)\n\n배열 형태로 전달됩니다. 질의한 디바이스 타입과 버전에 맞는 알림이 없을 경우 빈 배열이 전달됩니다.\n\n| 이름               | 타입                                     | 설명                                                                    |\n| ------------------ | ---------------------------------------- | ----------------------------------------------------------------------- |\n| id                 | string                                   | 상태 ID                                                                 |\n| title              | string                                   | 알림 제목                                                               |\n| type               | enum (serviceFailure, routineInspection) | 상태 종류 (serviceFailure: 서버 문제, routineInspection: 정기 점검)     |\n| device_types       | array                                    | 알림의 대상 디바이스 종류                                               |\n| contents           | string                                   | 알림 내용 (HTML 형태)                                                   |\n| is_activated       | boolean                                  | 알림 활성화 여부 (항상 true)                                            |\n| device_sem_version | string                                   | 대상 디바이스 플랫폼 버전 비교 기준 (SemVer를 따름)                     |\n| app_sem_version    | string                                   | 대상 뷰어 앱 버전 비교 기준 (SemVer를 따름)                             |\n| start_time         | string (ISO 8601 포맷)                   | 알림 시작 시간 (timezone 포함) - 설정되어 있지 않은 경우 모든 기간 대상 |\n| end_time           | string (ISO 8601 포맷)                   | 알림 종료 시간 (timezone 포함) - 설정되어 있지 않은 경우 모든 기간 대상 |\n| create_time        | string (ISO 8601 포맷)                   | 알림 생성 시간                                                          |\n| update_time        | string (ISO 8601 포맷)                   | 알림 수정 시간                                                          |\n\n#### Example\n\n##### Request\n```\nGET /api/v1/status/check?device_type=android&device_version=3.5.6&app_version=3.5.6\n```\n\n##### Response (Success)\n```json\n{\n    \"data\": [\n        {\n            \"id\": \"58783e50fdfef4e35318f620\",\n            \"title\": \"...\",\n            \"type\": \"routineInspection\",\n            \"device_types\": [\n                \"android\"\n            ],\n            \"contents\": \"<p>...</p>\",\n            \"is_activated\": true,\n            \"device_sem_version\": \">=1.0.0  || =7.0.0-alpha.1\",\n            \"app_sem_version\": \"<3.0.0 || =6.0.0\",\n            \"start_time\": \"2017-01-13T11:40:55+09:00\",\n            \"end_time\": \"2017-01-13T13:40:55+09:00\",\n            \"create_time\": \"2017-04-19T16:53:30+09:00\",\n            \"update_time\": \"2017-04-19T16:53:30+09:00\"\n        }\n    ],\n    \"success\": true\n}\n```\n","readmeFilename":"README.md"}