connectbase-client 3.35.2 → 3.37.0

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,49 @@
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.37.0] - 2026-06-25
7
+
8
+ ### Changed (Breaking) — `cb.video.sendSuperChat` 시그니처 변경
9
+
10
+ 슈퍼챗 전송이 백엔드 계약(`POST /v1/public/super-chats`, `channel_id` 필수)에 맞춰 정렬됐다.
11
+
12
+ - **이전**: `sendSuperChat(videoId, amount, message?, currency?)` → `SuperChat`
13
+ - **이후**: `sendSuperChat(channelId, amount, options?: { videoId?, liveId?, type?, message?, currency?, stickerId? })` → `SendSuperChatResponse`
14
+ - 대상은 `videoId` 또는 `liveId` 로 지정한다. 응답의 `client_secret` 으로 결제(Stripe PaymentIntent)를 확정해야 슈퍼챗이 노출된다.
15
+ - 새 타입 `SendSuperChatOptions`, `SendSuperChatResponse`, `SuperChatType` export.
16
+
17
+ 마이그레이션: `cb.video.sendSuperChat('video-id', 5000, '메시지')` → `cb.video.sendSuperChat('channel-id', 5000, { videoId: 'video-id', message: '메시지' })`.
18
+
19
+ ### Fixed — 비디오 메서드 백엔드 정렬 (이전엔 404/우회 필요했던 것들)
20
+
21
+ 백엔드 구현·라우트 정렬로 다음 메서드가 실제로 동작한다 (채널/시청/좋아요취소/스토리지컨테이너는 SDK 시그니처 동일, 플레이리스트는 경로만 백엔드와 일치하도록 수정):
22
+
23
+ - **플레이리스트**: `createPlaylist` / `getPlaylists` / `getPlaylistItems` 경로를 백엔드 계약에 맞춤
24
+ (`POST /playlists` body `channel_id`, `GET /playlists/public?channel_id=`, `GET /playlists/:id` 의 `items`).
25
+ - **채널 CRUD**: `createChannel` / `getChannel` / `getChannelByHandle` / `updateChannel` (백엔드 라우트 신규 구현).
26
+ - **시청 기록**: `reportWatchProgress` / `getWatchHistory` / `clearWatchHistory`.
27
+ - **좋아요 취소**: `unlikeVideo` (멱등 DELETE) — 빈 body 의 `likeVideo` 도 정상 동작하도록 백엔드 수정.
28
+ - **스토리지 컨테이너**: `storage.create` / `list` / `get` / `update` / `delete`.
29
+
30
+ ## [3.36.0] - 2026-06-24
31
+
32
+ ### Added — Functions 에서 시크릿 키 없이 푸시 발송 (service_role / act-as-member)
33
+
34
+ 서버사이드 함수가 별도 시크릿 키(`cb_sk_`) 발급 없이 `ctx.cbAdmin`(service_role) 또는
35
+ `ctx.cb`(act-as-member)로 푸시를 보낼 수 있도록 `push.sendToMembers` 의 호출 가드를 완화했다.
36
+ 백엔드 dual-auth(`POST /v1/apps/:appID/push/send`)가 service_role 토큰을 받도록 함께 확장됐다.
37
+
38
+ - **`push.sendToMembers` 위임 Bearer 허용** — 기존 가드 `if (hasPublicKey()) throw` 는
39
+ `cbWithToken`(ctx.cbAdmin/ctx.cb) 클라이언트가 앱 식별용 `cb_pk_` 를 함께 보내는 탓에
40
+ 위임 호출까지 차단했다. 가드를 **`hasPublicKey() && !hasJWT()`** 로 변경해, 순수 브라우저
41
+ (Public Key 단독) 인스턴스만 차단하고 위임 Bearer 토큰을 가진 인스턴스는 통과시킨다.
42
+ 공개 API 시그니처·타입 표면은 동일하다.
43
+
44
+ ```ts
45
+ // service_role: true 함수에서 — 시크릿 키 불필요
46
+ await ctx.cbAdmin.push.sendToMembers(ctx.appId, [memberId], { title, body, data })
47
+ ```
48
+
6
49
  ## [3.35.2] - 2026-06-22
7
50
 
8
51
  ### Changed — 문서·타입 폴리시 (런타임 동작 변화 없음)