connectbase-client 3.34.0 → 3.35.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,35 @@
3
3
  본 SDK 의 모든 주요 변경사항을 [Keep a Changelog](https://keepachangelog.com/ko/1.1.0/) 형식으로 기록합니다.
4
4
  버전은 [Semantic Versioning](https://semver.org/lang/ko/) 을 따릅니다.
5
5
 
6
+ ## [3.35.1] - 2026-06-19
7
+
8
+ ### Changed — 내부 하드닝 (공개 API 동작 변화 없음)
9
+
10
+ 프론트엔드 감사에서 발견된 SDK 내부 타입·안전성 개선. 공개 API 시그니처와 런타임 동작은 동일하다.
11
+
12
+ - **`HttpClient.getAppId()` 공개 접근자 추가** — `database` API 의 `requireAppId()` 가 `(this.http as unknown as { config })` 로 private 필드를 침투하던 cast 를 제거하고 정식 접근자를 사용.
13
+ - **토큰 응답 검증 가드 추가** — `signUpMember`/게스트 재발급/신규 게스트 로그인의 `setTokens` 호출 전에 `assertShape({ access_token, refresh_token, ... })` 검증을 추가(기존 `signInMember`/`getMe` 와 동일 패턴). 정상 응답은 그대로 동작하며, 서버가 잘못된 토큰 응답을 줄 때만 조용히 잘못된 토큰을 저장하지 않고 throw 한다.
14
+ - **타입 안전성** — analytics 의 `(window as any)`/`(navigator as any)` 를 좁은 인터페이스(`VisitorTrackerBridge`/`NavigatorWithGPC`)로 교체. 런타임 동작 무변화.
15
+
16
+ ## [3.35.0] - 2026-06-17
17
+
18
+ ### Fixed — doc-audit 발견 SDK/서버 계약 버그 (퍼블리시 전엔 미동작이던 기능 정상화)
19
+
20
+ 3-way 문서 정합성 감사 중 발견된 SDK↔서버 계약 불일치를 코드 기준으로 정렬.
21
+
22
+ - **video 업로드 전면 정상화** — SDK↔서버 계약 불일치로 업로드가 동작하지 않던 것을 수정.
23
+ - **Breaking (타입)**: `InitUploadResponse` 가 `{ session_id, video_id, ... }` → **`{ upload_id, chunk_size, total_chunks, expires_at }`** (서버 실제 응답).
24
+ - 청크 업로드는 `PUT .../uploads/:uploadId/chunk?chunk_index=N`, 완료 응답 `{ video_id, status }` → `get(video_id)` 로 전체 Video 조회.
25
+ - `getThumbnails()` 를 서버 단일 thumbnail 엔드포인트(`/thumbnail`)에 정합.
26
+ - **WebRTC 응답 타입 정합** — `getStats()`/`getRooms()` 타입이 서버 wire shape 와 달랐음.
27
+ - **Breaking (타입)**: `AppStatsResponse` = `{ room_count, total_peers, total_broadcasters, total_viewers, channel_stats }`; rooms 는 `{ rooms: RoomSummary[] }` (`RoomStats` 제거, `ChannelStats`/`RoomSummary` 추가).
28
+ - **`subscription.cancel()`** — `immediate` 옵션이 서버에 전달되지 않던 것을 `cancel_at_end` 로 매핑. 인자 없이 호출 시 기본 = 현재 결제 주기 종료 시 해지.
29
+ - **`game.getRoom()`** — 서버 `{ room: ... }` 래핑을 언랩하지 않아 `undefined` 를 반환하던 것 수정.
30
+ - **HTTP `PUT`** — `FormData` 본문일 때 `Content-Type` 을 제거하지 않아 storage video 프록시 청크 업로드가 깨지던 것 수정.
31
+ - analytics JSDoc 예제의 존재하지 않는 `track()` → `trackEvent()` 정정.
32
+
33
+ > 모두 pre-launch(사용자 0) 단계 수정으로 실사용 호환성 파괴는 없습니다. video/WebRTC 타입 Breaking 은 직전까지 해당 기능이 end-to-end 로 동작한 적이 없습니다.
34
+
6
35
  ## [3.34.0] - 2026-06-15
7
36
 
8
37
  ### Changed — `geoQuery` 계약 표준화 (이전엔 백엔드와 형식이 달라 동작하지 않던 기능)
package/README.md CHANGED
@@ -1282,17 +1282,20 @@ cb.webrtc.disconnect()
1282
1282
  ### Payments & Subscriptions
1283
1283
 
1284
1284
  ```typescript
1285
- // Create a subscription
1285
+ // Create a subscription (정기 결제)
1286
1286
  const subscription = await cb.subscription.create({
1287
- planId: 'premium-monthly',
1288
- billingKeyId: 'billing-key-1'
1287
+ billing_key_id: 'billing-key-1',
1288
+ plan_name: 'premium-monthly',
1289
+ amount: 9900,
1290
+ billing_cycle: 'monthly'
1289
1291
  })
1290
1292
 
1291
- // Check subscription status
1292
- const status = await cb.subscription.getStatus()
1293
+ // Check subscription status (단건 조회)
1294
+ const detail = await cb.subscription.get(subscription.id)
1295
+ console.log(detail.status)
1293
1296
 
1294
- // Cancel subscription
1295
- await cb.subscription.cancel()
1297
+ // Cancel subscription (기본: 현재 결제 주기 종료 시 해지)
1298
+ await cb.subscription.cancel(subscription.id)
1296
1299
  ```
1297
1300
 
1298
1301
  ### Support (End-user Issue Reporting)