Skip to content

Commit 8c61fed

Browse files
committed
CHANGELOG 추가
1 parent 58bcce7 commit 8c61fed

4 files changed

Lines changed: 102 additions & 11 deletions

File tree

v1/CHANGELOG.ko.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# TS-API 변경이력
2+
3+
[English](CHANGELOG.md) | **한국어**
4+
5+
## v1.0.1
6+
7+
### LPR 이벤트: 번호판 배열 형식 (WebSocket)
8+
9+
한 프레임에서 여러 번호판이 인식된 경우, 개별 이벤트 대신 `plates` 배열로 하나의 이벤트에 통합 전송합니다.
10+
11+
```json
12+
{
13+
"topic": "LPR",
14+
"channel": 1,
15+
"image": "/storage/lpr/...",
16+
"plates": [
17+
{"plateNo":"12가3456","score":95,"srcCode":"A01",...},
18+
{"plateNo":"34나5678","score":88,"srcCode":"A02",...}
19+
]
20+
}
21+
```
22+
23+
**클라이언트 호환 처리** — 구/신 형식 모두 대응:
24+
```javascript
25+
const plates = data.plates || [data];
26+
plates.forEach(p => console.log(p.plateNo, p.score));
27+
```
28+
29+
> **참고**: 이 형식은 **v1 WebSocket** (`/wsapi/v1/events`)에만 적용됩니다. v0 WebSocket (`/wsapi/subscribeEvents`)은 기존 단일 plate 형식을 유지합니다.
30+
31+
### 주차면 이벤트 개선 (WebSocket)
32+
33+
- **차량 정보 항상 포함**: 주차장 등록 여부와 관계없이 번호판 인식 데이터가 있으면 `vehicle` 필드를 전송합니다.
34+
- **중복 이벤트 수정**: 한 번의 인식에서 `parkingSpot` 이벤트가 두 번 발생하던 문제를 수정하여 하나의 이벤트로 통합합니다.
35+
36+
### Breaking Changes
37+
38+
없음. 모든 변경사항은 하위 호환됩니다.
39+
40+
---
41+
42+
## v1.0.0
43+
44+
최초 릴리스.

v1/CHANGELOG.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# TS-API Changelog
2+
3+
**English** | [한국어](CHANGELOG.ko.md)
4+
5+
## v1.0.1
6+
7+
### LPR Event: Batch Plate Array (WebSocket)
8+
9+
Multiple plates recognized in a single frame are now delivered as one event with a `plates` array, instead of separate events per plate.
10+
11+
```json
12+
{
13+
"topic": "LPR",
14+
"channel": 1,
15+
"image": "/storage/lpr/...",
16+
"plates": [
17+
{"plateNo":"12가3456","score":95,"srcCode":"A01",...},
18+
{"plateNo":"34나5678","score":88,"srcCode":"A02",...}
19+
]
20+
}
21+
```
22+
23+
**Client compatibility** — handle both formats:
24+
```javascript
25+
const plates = data.plates || [data];
26+
plates.forEach(p => console.log(p.plateNo, p.score));
27+
```
28+
29+
> **Note**: This format applies to **v1 WebSocket** (`/wsapi/v1/events`) only. v0 WebSocket (`/wsapi/subscribeEvents`) continues to use the legacy single-plate format.
30+
31+
### Parking Spot Improvements (WebSocket)
32+
33+
- **Vehicle info always included**: `vehicle` field is now populated whenever plate data exists, regardless of parking lot registration.
34+
- **Duplicate event fix**: A single recognition no longer triggers two `parkingSpot` events. Occupancy + vehicle data are combined into one event.
35+
36+
### Breaking Changes
37+
38+
None. All changes are backward compatible.
39+
40+
---
41+
42+
## v1.0.0
43+
44+
Initial release.

v1/tsapi-v1.ko.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[English](tsapi-v1.md) | **한국어**
44

5-
> **관련 문서:** [마이그레이션 가이드](MIGRATION.ko.md)
5+
> **관련 문서:** [마이그레이션 가이드](MIGRATION.ko.md) · [변경이력](CHANGELOG.ko.md)
66
77
## 목차
88

@@ -463,7 +463,7 @@ Authorization: Bearer {admin_token}
463463
464464
| 엔드포인트 | 인증 | 설명 |
465465
|----------|:----:|-------------|
466-
| `GET /api/v1/info?apiVersion` | - | API 버전 조회 (예: "TS-API@1.0.0") |
466+
| `GET /api/v1/info?apiVersion` | - | API 버전 조회 (예: "TS-API@1.0.1") |
467467
| `GET /api/v1/info?siteName` | - | 사이트 이름 조회 |
468468
| `GET /api/v1/info?timezone` | - | 서버 타임존 조회 (name, bias) |
469469
| `GET /api/v1/info?product` | - | 제품 정보 조회 (name, version) |
@@ -498,7 +498,7 @@ curl "http://localhost/api/v1/info?all" -H "Authorization: Bearer eyJhbGc..."
498498
**응답**:
499499
```json
500500
{
501-
"apiVersion": "TS-API@1.0.0",
501+
"apiVersion": "TS-API@1.0.1",
502502
"siteName": "Main Office",
503503
"timezone": {"name": "Asia/Seoul", "bias": "+09:00"},
504504
"product": {"name": "TS-NVR", "version": "2.14.1"},
@@ -2114,7 +2114,7 @@ sequenceDiagram
21142114
21152115
Note over Client,Server: 2. 실시간 이벤트 수신
21162116
loop 이벤트 발생 시
2117-
Server-->>Client: {"topic":"LPR","plateNo":"12가3456",...}
2117+
Server-->>Client: {"topic":"LPR","channel":1,"plates":[{"plateNo":"12가3456",...}]}
21182118
end
21192119
21202120
Note over Client,Server: 3. 토픽 추가 구독
@@ -2294,7 +2294,8 @@ ws.onmessage = (event) => {
22942294

22952295
switch(data.topic) {
22962296
case 'LPR':
2297-
console.log('Plate:', data.plateNo, 'Score:', data.score);
2297+
// v1.0.1: data.plates (배열), v1.0.0: data (단일 객체) — 양쪽 모두 호환
2298+
(data.plates || [data]).forEach(p => console.log('Plate:', p.plateNo, 'Score:', p.score));
22982299
break;
22992300
case 'channelStatus':
23002301
console.log('Channel', data.chid, 'Status:', data.status);

v1/tsapi-v1.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
**English** | [한국어](tsapi-v1.ko.md)
44

5-
> **See also:** [Migration Guide](MIGRATION.md)
5+
> **See also:** [Migration Guide](MIGRATION.md) · [Changelog](CHANGELOG.md)
66
77
## Table of Contents
88

@@ -463,7 +463,7 @@ Retrieves server and product information.
463463
464464
| Endpoint | Auth | Description |
465465
|----------|:----:|-------------|
466-
| `GET /api/v1/info?apiVersion` | - | API version query (e.g., "TS-API@1.0.0") |
466+
| `GET /api/v1/info?apiVersion` | - | API version query (e.g., "TS-API@1.0.1") |
467467
| `GET /api/v1/info?siteName` | - | Site name query |
468468
| `GET /api/v1/info?timezone` | - | Server timezone query (name, bias) |
469469
| `GET /api/v1/info?product` | - | Product info query (name, version) |
@@ -498,7 +498,7 @@ curl "http://localhost/api/v1/info?all" -H "Authorization: Bearer eyJhbGc..."
498498
**Response**:
499499
```json
500500
{
501-
"apiVersion": "TS-API@1.0.0",
501+
"apiVersion": "TS-API@1.0.1",
502502
"siteName": "Main Office",
503503
"timezone": {"name": "Asia/Seoul", "bias": "+09:00"},
504504
"product": {"name": "TS-NVR", "version": "2.14.1"},
@@ -2106,7 +2106,7 @@ sequenceDiagram
21062106
21072107
Note over Client,Server: 2. Receiving Real-time Events
21082108
loop On event
2109-
Server-->>Client: {"topic":"LPR","plateNo":"12가3456",...}
2109+
Server-->>Client: {"topic":"LPR","channel":1,"plates":[{"plateNo":"12가3456",...}]}
21102110
end
21112111
21122112
Note over Client,Server: 3. Subscribe to Additional Topic
@@ -2286,7 +2286,8 @@ ws.onmessage = (event) => {
22862286

22872287
switch(data.topic) {
22882288
case 'LPR':
2289-
console.log('Plate:', data.plateNo, 'Score:', data.score);
2289+
// v1.0.1: data.plates (array), v1.0.0: data (single object) — handle both
2290+
(data.plates || [data]).forEach(p => console.log('Plate:', p.plateNo, 'Score:', p.score));
22902291
break;
22912292
case 'channelStatus':
22922293
console.log('Channel', data.chid, 'Status:', data.status);
@@ -2455,7 +2456,8 @@ ws.onmessage = (event) => {
24552456
// Handle event data
24562457
switch (data.topic) {
24572458
case 'LPR':
2458-
console.log('Plate:', data.plateNo);
2459+
// v1.0.1: data.plates (array), v1.0.0: data (single object) — handle both
2460+
(data.plates || [data]).forEach(p => console.log('Plate:', p.plateNo));
24592461
break;
24602462
case 'channelStatus':
24612463
console.log('Channel', data.chid, 'Status:', data.status);

0 commit comments

Comments
 (0)