connectbase-client 3.36.0 → 3.38.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,53 @@
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.38.0] - 2026-06-25
7
+
8
+ ### Added — `cb.push.sendToTopic` (토픽 구독자 전체 발송, service_role 지원)
9
+
10
+ 토픽 구독자 전체에게 푸시를 보내는 `push.sendToTopic(appId, topicName, payload)` 를 추가했다.
11
+ `sendToMembers`(3.36.0)와 동일한 위임 가드(`hasPublicKey() && !hasJWT()`)를 적용해, 콘솔 JWT /
12
+ User Secret Key(`cb_sk_`) / service_role(`ctx.cbAdmin`) 인증으로 호출할 수 있고 순수 브라우저
13
+ Public Key(`cb_pk_`) 단독 인스턴스에서는 차단된다. 백엔드 라우트
14
+ `POST /v1/apps/:appID/push/send-to-topic` 는 이미 dual-auth(service_role 포함)를 지원한다.
15
+
16
+ - 대표 유스케이스: ConnectBase Function 스케줄러가 **시크릿 키 발급 없이** `ctx.cbAdmin` 으로
17
+ 정기 토픽 알림(일일 리마인더 등)을 발송. 콘솔에서 `cb_sk_` 를 만들어 함수 secret 에 넣던
18
+ 단계가 사라져 "MCP/Functions 만으로 끝까지" 자동화가 가능해진다.
19
+ - 새 타입 `SendToTopicPayload` 추가 (`SendToMembersPayload` 와 동일 옵션, 대상만 토픽).
20
+
21
+ ```ts
22
+ await ctx.cbAdmin.push.sendToTopic(ctx.appId, 'daily-0900', {
23
+ title: '오늘의 학습 리마인더',
24
+ body: '잊지 말고 학습을 이어가세요!',
25
+ data: { route: '/today' },
26
+ })
27
+ ```
28
+
29
+ ## [3.37.0] - 2026-06-25
30
+
31
+ ### Changed (Breaking) — `cb.video.sendSuperChat` 시그니처 변경
32
+
33
+ 슈퍼챗 전송이 백엔드 계약(`POST /v1/public/super-chats`, `channel_id` 필수)에 맞춰 정렬됐다.
34
+
35
+ - **이전**: `sendSuperChat(videoId, amount, message?, currency?)` → `SuperChat`
36
+ - **이후**: `sendSuperChat(channelId, amount, options?: { videoId?, liveId?, type?, message?, currency?, stickerId? })` → `SendSuperChatResponse`
37
+ - 대상은 `videoId` 또는 `liveId` 로 지정한다. 응답의 `client_secret` 으로 결제(Stripe PaymentIntent)를 확정해야 슈퍼챗이 노출된다.
38
+ - 새 타입 `SendSuperChatOptions`, `SendSuperChatResponse`, `SuperChatType` export.
39
+
40
+ 마이그레이션: `cb.video.sendSuperChat('video-id', 5000, '메시지')` → `cb.video.sendSuperChat('channel-id', 5000, { videoId: 'video-id', message: '메시지' })`.
41
+
42
+ ### Fixed — 비디오 메서드 백엔드 정렬 (이전엔 404/우회 필요했던 것들)
43
+
44
+ 백엔드 구현·라우트 정렬로 다음 메서드가 실제로 동작한다 (채널/시청/좋아요취소/스토리지컨테이너는 SDK 시그니처 동일, 플레이리스트는 경로만 백엔드와 일치하도록 수정):
45
+
46
+ - **플레이리스트**: `createPlaylist` / `getPlaylists` / `getPlaylistItems` 경로를 백엔드 계약에 맞춤
47
+ (`POST /playlists` body `channel_id`, `GET /playlists/public?channel_id=`, `GET /playlists/:id` 의 `items`).
48
+ - **채널 CRUD**: `createChannel` / `getChannel` / `getChannelByHandle` / `updateChannel` (백엔드 라우트 신규 구현).
49
+ - **시청 기록**: `reportWatchProgress` / `getWatchHistory` / `clearWatchHistory`.
50
+ - **좋아요 취소**: `unlikeVideo` (멱등 DELETE) — 빈 body 의 `likeVideo` 도 정상 동작하도록 백엔드 수정.
51
+ - **스토리지 컨테이너**: `storage.create` / `list` / `get` / `update` / `delete`.
52
+
6
53
  ## [3.36.0] - 2026-06-24
7
54
 
8
55
  ### Added — Functions 에서 시크릿 키 없이 푸시 발송 (service_role / act-as-member)