connectbase-client 6.15.0 → 6.16.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/dist/index.d.mts CHANGED
@@ -9601,6 +9601,24 @@ declare class StorageAPI {
9601
9601
  * 파일 URL 가져오기
9602
9602
  */
9603
9603
  getFileUrl(file: FileItem): string | null;
9604
+ /**
9605
+ * 경로 주소 만들기 — 파일을 경로로 읽는 고정 주소 (요청을 보내지 않는다)
9606
+ *
9607
+ * 돌려주는 주소는 그 경로의 파일로 리다이렉트된다. 인증 헤더가 필요 없어 `<img src>`, `fetch()`,
9608
+ * 기준 주소 + 상대 경로 로딩에 쓸 수 있다. 파일의 `url`(직접 주소)에는 경로가 들어 있지 않으므로,
9609
+ * 한 폴더의 파일들을 상대 경로로 읽으려면 이 주소를 기준으로 쓴다.
9610
+ *
9611
+ * 대상은 주소만 알면 읽히는 스토리지(`server_write`, `public_read`, `shared`)다. `private` 스토리지는 404 이고
9612
+ * 응답의 `url`(서명 주소)을 써야 한다.
9613
+ *
9614
+ * @example
9615
+ * ```typescript
9616
+ * const base = cb.storage.getPathUrl(storageId, `/l2d/rigs/${rigId}/`)
9617
+ * const meta = await (await fetch(base + 'meta.json')).json()
9618
+ * img.src = base + 'base.webp'
9619
+ * ```
9620
+ */
9621
+ getPathUrl(storageId: string, path: string): string;
9604
9622
  /**
9605
9623
  * 이미지 파일 여부 확인
9606
9624
  */
@@ -11783,6 +11801,45 @@ interface WebRTCWarning {
11783
11801
  code: string;
11784
11802
  message: string;
11785
11803
  }
11804
+ /** SFU 방 입장 토큰 요청 (`cb.webrtc.getSFUToken`) */
11805
+ interface SFUTokenOptions {
11806
+ /** P2P 와 같은 `channel:room` 형식의 룸 ID (콜론이 없으면 default 채널) */
11807
+ roomId: string;
11808
+ /**
11809
+ * 보내기(마이크, 카메라, 화면)를 요청할지.
11810
+ * 생략하면 interactive 채널은 보내기, broadcast 채널은 받기 전용이다.
11811
+ * 요청이 받아들여졌는지는 응답의 `can_publish` 로 확인한다.
11812
+ */
11813
+ publish?: boolean;
11814
+ /** 다른 참가자에게 보이는 표시 이름 (64자까지) */
11815
+ name?: string;
11816
+ /**
11817
+ * 같은 회원의 여러 기기(탭)를 구분하는 값 (영문, 숫자, `-`, 1~32자).
11818
+ * 없으면 같은 회원이 다시 들어올 때 앞 연결이 끊긴다. 익명은 매번 새 신원이라 필요 없다.
11819
+ */
11820
+ device?: string;
11821
+ }
11822
+ /** SFU 방 입장 토큰 응답 */
11823
+ interface SFUTokenResponse {
11824
+ /** SFU 신호 서버 주소 (`livekit-client` 의 `room.connect(url, token)` 첫 인자) */
11825
+ url: string;
11826
+ /** 입장 토큰 (`room.connect(url, token)` 둘째 인자). 10분 안에 접속에 써야 한다 */
11827
+ token: string;
11828
+ /** 요청한 룸 ID */
11829
+ room_id: string;
11830
+ /** SFU 서버 안에서의 방 이름 */
11831
+ sfu_room: string;
11832
+ /** 이 참가자의 SFU 신원 (회원은 `member_<id>`, 익명은 `anon_<난수>`) */
11833
+ identity: string;
11834
+ /** 보내기 권한. false 면 서버가 이 참가자의 미디어를 받지 않는다 */
11835
+ can_publish: boolean;
11836
+ /** 데이터 보내기 권한 (보내기 권한을 따른다) */
11837
+ can_publish_data: boolean;
11838
+ /** 토큰 만료 시각 (Unix epoch 초) */
11839
+ expires_at: number;
11840
+ /** 보내기 요청을 받기 전용으로 낮췄을 때의 알림 */
11841
+ warning?: WebRTCWarning;
11842
+ }
11786
11843
  /** 피어 정보 */
11787
11844
  interface PeerInfo {
11788
11845
  /** 피어 ID */
@@ -12141,6 +12198,27 @@ declare class WebRTCAPI {
12141
12198
  * ```
12142
12199
  */
12143
12200
  validate(): Promise<ValidateResponse>;
12201
+ /**
12202
+ * SFU 방 입장 토큰 발급
12203
+ *
12204
+ * `connect()` 는 미디어가 브라우저끼리 직접(P2P) 오가서 상대에게 IP 가 보이고 참가자가 많은 방을 만들 수 없다.
12205
+ * SFU 는 서버가 미디어를 받아 나눠 주는 방식이라 참가자끼리 IP 를 보지 못하고 수십 명 방이 가능하다.
12206
+ * 이 메서드는 채널 정책(인증, 역할, 정원)을 서버에서 판정한 입장 토큰을 돌려주고, 미디어 연결은 앱이
12207
+ * `livekit-client` 로 직접 한다(SDK 는 `livekit-client` 를 포함하지 않는다).
12208
+ *
12209
+ * @example
12210
+ * ```typescript
12211
+ * import { Room } from 'livekit-client'
12212
+ *
12213
+ * const sfu = await cb.webrtc.getSFUToken({ roomId: 'voice:fanmeeting-1', publish: true })
12214
+ * const room = new Room()
12215
+ * await room.connect(sfu.url, sfu.token)
12216
+ * if (sfu.can_publish) {
12217
+ * await room.localParticipant.setMicrophoneEnabled(true)
12218
+ * }
12219
+ * ```
12220
+ */
12221
+ getSFUToken(options: SFUTokenOptions): Promise<SFUTokenResponse>;
12144
12222
  /**
12145
12223
  * 앱의 WebRTC 통계 조회
12146
12224
  */
@@ -12635,4 +12713,4 @@ declare class ConnectBase {
12635
12713
  updateConfig(config: Partial<ConnectBaseConfig>): void;
12636
12714
  }
12637
12715
 
12638
- export { AIAPI, type AIChatOptions, type AIChatRequest, type AIChatResponse, type AIChatStreamCallbacks, type AIChatStreamOptions, AIError, type AIErrorCode, type AIMessage, type AISource, type AIStreamChunk, type AITool, type AIToolCall, type AIToolEvent, AUTH_MEMBER_ID_TOKEN, type AcceptInvitationResponse, type AckMessagesRequest, type AdMobDailyReport, type AdMobReportResponse, type AdMobReportSummary, type AdReportResponse, type AdReportSummary, type AdmobConnectionInfo, AdsAPI, type AdsenseConnectionInfo, type AgenticSearchProgress, type AggregateResult, type AggregateStage, type AnalyticsConfig, type AnalyticsEvent, ApiError, type ApiErrorDetail, type AppMemberDetail, type AppMemberIdentityDetail, type AppMemberIdentitySummary, type AppMemberList, type AppMemberListItem, type AppMemberProviderType, AppMembersAPI, type AppStatsResponse, type ArchivePolicy, type AtomicOperator, type AtomicOperatorType, AuthError, type AuthSettingsResponse, type BackupInfo, type BatchOperation, type BatchOperationResult, type BatchSetPageMetaRequest, type BatchWriteResult, type BillingCycle, type BillingKeyResponse, type BiometricInfo, type BiometricResult, type BulkCreateResponse, type BulkError, type CPUInfo, type CancelPaymentRequest, type CancelPaymentResponse, type CancelSubscriptionRequest, type CategoryInfo, type ChangePlanOptions, type ChangePlanPreview, type ChangePlanRequest, type ChangePlanWithPriceRef, type ChangePlanWithProduct, type Channel, type ChannelMembership, type ChannelStats, type ChargeWithBillingKeyAmount, type ChargeWithBillingKeyOptions, type ChargeWithBillingKeyProduct, type ChargeWithBillingKeyRequest, type ChargeWithBillingKeyResponse, type ChatMessage, type ClientMessage, type ColumnSchema, type CommentListResponse, type CompleteUploadRequest, type CompleteUploadResponse, type ConfirmBillingKeyRequest, type ConfirmPaymentRequest, type ConfirmPaymentResponse, ConnectBase, type ConnectBaseConfig, type ConnectedData, type ConnectionState, type ConsentOptions, type ConsumeMessagesResponse, type ConsumeOptions, type CopyTableRequest, type CopyTableResponse, type CreateBackupRequest, type CreateChannelRequest, type CreateCheckoutSessionOptions, type CreateCheckoutSessionRequest, type CreateCheckoutSessionResponse, type CreateCheckoutSessionWithAmount, type CreateCheckoutSessionWithProduct, type CreateColumnRequest, type CreateDataRequest, type CreateDocumentRequest, type CreateFolderRequest, type CreateFolderResponse, type CreateGeoIndexRequest, type CreateIndexRequest, type CreateInvitationRequest, type CreateInvitationResponse, type CreateLobbyRequest, type CreateOrganizationRequest, type CreatePlaylistRequest, type CreatePublicKeyRequest, type CreatePublicKeyResponse, type CreateRelationRequest, type CreateRolePayload, type CreateRoleResult, type CreateRoomResult, type CreateSearchIndexRequest, type CreateSecurityRuleRequest, type CreateSubscriptionOptions, type CreateSubscriptionRequest, type CreateSubscriptionWithAmount, type CreateSubscriptionWithProduct, type CreateTableRequest, type CreateTopicOptions, type CreateTriggerRequest, type CreateVideoStorageRequest, type DailyReport, type DataItem, type DataType, type DatabaseChange, type DatabaseChangeMessage, type DatabaseChangeType, type DatabaseRealtimeConnectOptions, type DatabaseRealtimeFilter, type DatabaseRealtimeHandlers, type DatabaseRealtimeSubscription, type DatabaseSnapshot, type DatabaseSnapshotMessage, type DatabaseSubscribeOptions, type DeleteBillingKeyResponse, type DeleteWhereResponse, type DeviceInfo, type DocumentResponse, type EnabledProviderInfo, type EnabledProvidersResponse, EndpointAPI, type EndpointCallInit, type ErrorHandler, type ErrorMessage, type ErrorReport, type ErrorTrackerConfig, type ErrorType, type ExportDataRequest, type ExportDataResponse, type FetchDataResponse, type FetchFilesResponse, type FetchPublicKeysResponse, type FileItem, type FileStats, GameAPI, type GameAction, type GameClientConfig, type GameConfig, GameConfigAPI, type GameConfigPatch, type GameConnectionState, type GameConnectionStatus, type GameDelta, GameError, type GameErrorCode, type GameEventHandlers, type GamePlayer, GameRoom, type GameRoomConfig, type GameRoomInfo, GameRoomTransport, type GameServerMessage, type GameServerMessageType, type GameState, type GameTransportConfig, type GenerateUploadURLByPathRequest, type GenerateUploadURLRequest, type GenerateUploadURLResponse, type GeoBoundingBox, type GeoIndex, type GeoNear, type GeoPoint, type GeoPolygon, type GeoQuery, type GeoResponse, type GeoResult, type GetAuthorizationURLResponse, type GetFileByPathResponse, type GoogleConnectionStatus, type HistoryResponse, type ICEServer, type ICEServersResponse, type ImageResult, type ImportDataRequest, type ImportDataResponse, type IndexAnalysis, type IndexRecommendation, type InitUploadResponse, type InvokeFunctionRequest, type InvokeFunctionResponse, type IssueBillingKeyRequest, type IssueBillingKeyResponse, type JoinQueueRequest, type JoinRoomRequest, type JoinRoomResponse, type KnowledgeSearchRequest, type KnowledgeSearchResponse, type KnowledgeSearchResult, type LeaderboardEntry, type LeaderboardListResponse, type LeaderboardScoreEntry, type LifecyclePolicy, type ListAppMembersOptions, type ListBillingKeysResponse, type ListDocumentsResponse, type ListPageMetasOptions, type ListPageMetasResponse, type ListPaymentsOptions, type ListSubscriptionPaymentsRequest, type ListSubscriptionPaymentsResponse, type ListSubscriptionsRequest, type ListSubscriptionsResponse, type LobbyInfo, type LobbyInvite, type LobbyMember, type LobbyVisibility, type MatchResult, type MatchmakingTicket, type MatchqueueListResponse, type MatchqueueTicket, type MemberChangePasswordRequest, type MemberCredentialMessageResponse, type MemberEmailVerificationConfirmRequest, type MemberEmailVerificationConfirmResponse, type MemberEmailVerificationRequest, type MemberInfoResponse, type MemberPasswordResetConfirmRequest, type MemberPasswordResetRequest, type MemberRedirectOption, type MemberSession, type MemberSessionList, type MemberSessionRevokeResponse, type MemberSignInRequest, type MemberSignInResponse, type MemberSignUpRequest, type MemberSignUpResponse, type MembershipTier, type MemoryInfo, type MessageHandler, type MigrateDataRequest, type MigrateDataResponse, type MoveFileRequest, type NackMessageRequest, NativeAPI, type OAuthCallbackResponse, type OAuthProvider, type OnPaymentFailure, type OpenDialogOptions, type OpenDialogResult, type Organization, type OrganizationContext, type OrganizationInvitation, type OrganizationMember, type OrganizationMemberList, type OrganizationRole, OrganizationsAPI, type PageMetaResponse, type PartyInfo, type PartyInvite, type PartyMember, type PauseSubscriptionRequest, type PaymentDetail, type PaymentListItem, type PaymentListResult, type PaymentMode, type PaymentProvider, type PaymentStatus, type PeerInfo, type Platform, type PlayerEvent, type PlayerStats, type Playlist, type PlaylistItem, type PollUntilOptions, type PongMessage, type PopulateOption, type Position, type PostponeBillingRequest, type PreparePaymentOptions, type PreparePaymentRequest, type PreparePaymentResponse, type PreparePaymentWithAmount, type PreparePaymentWithProduct, type PresenceChangeHandler, type PresenceInfo, type PresenceSetOptions, type PresenceStatus, type PresenceStatusResult, type ProrationMode, type PublicKeyItem, type PublicKeyPaymentMode, type PublishBatchRequest, type PublishBatchResponse, type PublishMessageRequest, type PublishMessageResponse, type PushPlatform, type PushStatsResult, type PushTopicInfo, type QualityProgress, type QueryOptions, type QueueInfoResponse, type QueueMessage, type ReadReceiptHandler, type ReadReceiptInfo, type RealtimeConnectOptions, RealtimeConnectionError, type RealtimeConnectionErrorCode, type RealtimeMessage, RealtimeRequestError, type RealtimeSendPolicy, type RegisterDeviceRequest, type RelationType, type RenameFileRequest, type RenameFileResponse, type ReplayHighlight, type ReplayInfo, type ReplayPlayerInfo, type RestoreBackupRequest, type RestoreBackupResponse, type RetentionPolicy, type RoleDetail, type RoleList, type RoleListItem, type RolePermissionItem, type RoleUserItem, RolesAPI, type RoomInfo, type RoomStaleMessage, type RoomSummary, type RoomsResponse, type RotatePublicKeyRequest, type RotatePublicKeyResponse, type SaveDialogOptions, type SaveDialogResult, type ScriptDetailResponse, type ScriptListResponse, type ScriptLogEntry, type ScriptLogsResponse, type ScriptMeta, type ScriptMetricsResponse, type ScriptVersion, type ScriptVersionListResponse, type SearchIndex, type SearchOptions, type SearchResponse, type SearchResult, type SecurityRule, type SendOptions, type SendSuperChatOptions, type SendSuperChatResponse, type ServerMessage, SessionManager, type SetPageMetaRequest, type Shorts, type ShortsListResponse, type SignalingMessage, type SignalingMessageType, type SlowQueryInfo, type SpectatorInfo, type SpectatorPlayerState, type SpectatorState, type SpeechRecognizeOptions, type SpeechResult, type StateChange, type StateChangeHandler, type StorageUploadOptions, type StorageUploadProgress, type StreamContentPart, type StreamDoneCallback, type StreamDoneData, type StreamErrorCallback, type StreamHandlers, type StreamImageURLPart, type StreamMessage, type StreamOptions, type StreamSession, type StreamTextPart, type StreamTokenCallback, type StreamToolCallCallback, type StreamToolResultCallback, type StreamURLResponse, type SubscribeOptions, type SubscribeTopicRequest, type SubscribedData, type Subscription, type SubscriptionPaymentResponse, type SubscriptionPaymentStatus, type SubscriptionResponse, type SubscriptionStatus, type SuperChat, type SuperChatType, type SuspendAppMemberOptions, type SuspendAppMemberResult, type SyncLostMessage, type SystemInfo, type TTLConfig, type TableAccessLevel, type TableColumnDef, type TableIndex, type TableRelation, type TableSchema, type TableSchemaDefinition, type TokenPersistence, type TransactionRead, type TransactionResult, type TransactionWrite, type TransactionWriteResult, type TranscodeStatus, type TransportType, type Trigger, type TriggerEvent, type TriggerHandlerType, type TypingChangeHandler, type TypingInfo, type UnsuspendAppMemberResult, type UpdateBillingKeyRequest, type UpdateChannelRequest, type UpdateColumnRequest, type UpdateCustomDataRequest, type UpdateCustomDataResponse, type UpdateDataRequest, type UpdateDocumentRequest, type UpdateLobbyRequest, type UpdateOrganizationRequest, type UpdatePublicKeyRequest, type UpdatePublicKeyResponse, type UpdateRolePayload, type UpdateSecurityRuleRequest, type UpdateSubscriptionRequest, type UpdateTriggerRequest, type UpdateVideoRequest, type UpdateVideoStorageRequest, type UploadByPathOptions, type UploadFileOptions, type UploadFileResponse, type UploadOptions, type UploadProgress, type VAPIDPublicKeyResponse, type ValidateResponse, type ValidationSchema, type ValidationSchemaField, type ValidationStateTransitions, type Video, type VideoComment, type VideoCompleteUploadResponse, type VideoListOptions, type VideoListResponse, VideoProcessingError, type VideoQuality, type VideoStatus, type VideoStorage, type VideoStorageAccessLevel, type VideoStorageListResponse, type VideoVisibility, type VoiceChannel, type VoiceMember, type WaitOptions, type WatchHistoryItem, type WebPushSubscription, type WebRTCConnectOptions, type WebRTCConnectionState, type WebRTCMode, type WebRTCWarning, type WhereCondition, type WhereOperator, WsTicketError, ConnectBase as default, detectInAppBrowser, escapeToExternalBrowser, isWebTransportSupported, toAIError, toCreateRoomWire };
12716
+ export { AIAPI, type AIChatOptions, type AIChatRequest, type AIChatResponse, type AIChatStreamCallbacks, type AIChatStreamOptions, AIError, type AIErrorCode, type AIMessage, type AISource, type AIStreamChunk, type AITool, type AIToolCall, type AIToolEvent, AUTH_MEMBER_ID_TOKEN, type AcceptInvitationResponse, type AckMessagesRequest, type AdMobDailyReport, type AdMobReportResponse, type AdMobReportSummary, type AdReportResponse, type AdReportSummary, type AdmobConnectionInfo, AdsAPI, type AdsenseConnectionInfo, type AgenticSearchProgress, type AggregateResult, type AggregateStage, type AnalyticsConfig, type AnalyticsEvent, ApiError, type ApiErrorDetail, type AppMemberDetail, type AppMemberIdentityDetail, type AppMemberIdentitySummary, type AppMemberList, type AppMemberListItem, type AppMemberProviderType, AppMembersAPI, type AppStatsResponse, type ArchivePolicy, type AtomicOperator, type AtomicOperatorType, AuthError, type AuthSettingsResponse, type BackupInfo, type BatchOperation, type BatchOperationResult, type BatchSetPageMetaRequest, type BatchWriteResult, type BillingCycle, type BillingKeyResponse, type BiometricInfo, type BiometricResult, type BulkCreateResponse, type BulkError, type CPUInfo, type CancelPaymentRequest, type CancelPaymentResponse, type CancelSubscriptionRequest, type CategoryInfo, type ChangePlanOptions, type ChangePlanPreview, type ChangePlanRequest, type ChangePlanWithPriceRef, type ChangePlanWithProduct, type Channel, type ChannelMembership, type ChannelStats, type ChargeWithBillingKeyAmount, type ChargeWithBillingKeyOptions, type ChargeWithBillingKeyProduct, type ChargeWithBillingKeyRequest, type ChargeWithBillingKeyResponse, type ChatMessage, type ClientMessage, type ColumnSchema, type CommentListResponse, type CompleteUploadRequest, type CompleteUploadResponse, type ConfirmBillingKeyRequest, type ConfirmPaymentRequest, type ConfirmPaymentResponse, ConnectBase, type ConnectBaseConfig, type ConnectedData, type ConnectionState, type ConsentOptions, type ConsumeMessagesResponse, type ConsumeOptions, type CopyTableRequest, type CopyTableResponse, type CreateBackupRequest, type CreateChannelRequest, type CreateCheckoutSessionOptions, type CreateCheckoutSessionRequest, type CreateCheckoutSessionResponse, type CreateCheckoutSessionWithAmount, type CreateCheckoutSessionWithProduct, type CreateColumnRequest, type CreateDataRequest, type CreateDocumentRequest, type CreateFolderRequest, type CreateFolderResponse, type CreateGeoIndexRequest, type CreateIndexRequest, type CreateInvitationRequest, type CreateInvitationResponse, type CreateLobbyRequest, type CreateOrganizationRequest, type CreatePlaylistRequest, type CreatePublicKeyRequest, type CreatePublicKeyResponse, type CreateRelationRequest, type CreateRolePayload, type CreateRoleResult, type CreateRoomResult, type CreateSearchIndexRequest, type CreateSecurityRuleRequest, type CreateSubscriptionOptions, type CreateSubscriptionRequest, type CreateSubscriptionWithAmount, type CreateSubscriptionWithProduct, type CreateTableRequest, type CreateTopicOptions, type CreateTriggerRequest, type CreateVideoStorageRequest, type DailyReport, type DataItem, type DataType, type DatabaseChange, type DatabaseChangeMessage, type DatabaseChangeType, type DatabaseRealtimeConnectOptions, type DatabaseRealtimeFilter, type DatabaseRealtimeHandlers, type DatabaseRealtimeSubscription, type DatabaseSnapshot, type DatabaseSnapshotMessage, type DatabaseSubscribeOptions, type DeleteBillingKeyResponse, type DeleteWhereResponse, type DeviceInfo, type DocumentResponse, type EnabledProviderInfo, type EnabledProvidersResponse, EndpointAPI, type EndpointCallInit, type ErrorHandler, type ErrorMessage, type ErrorReport, type ErrorTrackerConfig, type ErrorType, type ExportDataRequest, type ExportDataResponse, type FetchDataResponse, type FetchFilesResponse, type FetchPublicKeysResponse, type FileItem, type FileStats, GameAPI, type GameAction, type GameClientConfig, type GameConfig, GameConfigAPI, type GameConfigPatch, type GameConnectionState, type GameConnectionStatus, type GameDelta, GameError, type GameErrorCode, type GameEventHandlers, type GamePlayer, GameRoom, type GameRoomConfig, type GameRoomInfo, GameRoomTransport, type GameServerMessage, type GameServerMessageType, type GameState, type GameTransportConfig, type GenerateUploadURLByPathRequest, type GenerateUploadURLRequest, type GenerateUploadURLResponse, type GeoBoundingBox, type GeoIndex, type GeoNear, type GeoPoint, type GeoPolygon, type GeoQuery, type GeoResponse, type GeoResult, type GetAuthorizationURLResponse, type GetFileByPathResponse, type GoogleConnectionStatus, type HistoryResponse, type ICEServer, type ICEServersResponse, type ImageResult, type ImportDataRequest, type ImportDataResponse, type IndexAnalysis, type IndexRecommendation, type InitUploadResponse, type InvokeFunctionRequest, type InvokeFunctionResponse, type IssueBillingKeyRequest, type IssueBillingKeyResponse, type JoinQueueRequest, type JoinRoomRequest, type JoinRoomResponse, type KnowledgeSearchRequest, type KnowledgeSearchResponse, type KnowledgeSearchResult, type LeaderboardEntry, type LeaderboardListResponse, type LeaderboardScoreEntry, type LifecyclePolicy, type ListAppMembersOptions, type ListBillingKeysResponse, type ListDocumentsResponse, type ListPageMetasOptions, type ListPageMetasResponse, type ListPaymentsOptions, type ListSubscriptionPaymentsRequest, type ListSubscriptionPaymentsResponse, type ListSubscriptionsRequest, type ListSubscriptionsResponse, type LobbyInfo, type LobbyInvite, type LobbyMember, type LobbyVisibility, type MatchResult, type MatchmakingTicket, type MatchqueueListResponse, type MatchqueueTicket, type MemberChangePasswordRequest, type MemberCredentialMessageResponse, type MemberEmailVerificationConfirmRequest, type MemberEmailVerificationConfirmResponse, type MemberEmailVerificationRequest, type MemberInfoResponse, type MemberPasswordResetConfirmRequest, type MemberPasswordResetRequest, type MemberRedirectOption, type MemberSession, type MemberSessionList, type MemberSessionRevokeResponse, type MemberSignInRequest, type MemberSignInResponse, type MemberSignUpRequest, type MemberSignUpResponse, type MembershipTier, type MemoryInfo, type MessageHandler, type MigrateDataRequest, type MigrateDataResponse, type MoveFileRequest, type NackMessageRequest, NativeAPI, type OAuthCallbackResponse, type OAuthProvider, type OnPaymentFailure, type OpenDialogOptions, type OpenDialogResult, type Organization, type OrganizationContext, type OrganizationInvitation, type OrganizationMember, type OrganizationMemberList, type OrganizationRole, OrganizationsAPI, type PageMetaResponse, type PartyInfo, type PartyInvite, type PartyMember, type PauseSubscriptionRequest, type PaymentDetail, type PaymentListItem, type PaymentListResult, type PaymentMode, type PaymentProvider, type PaymentStatus, type PeerInfo, type Platform, type PlayerEvent, type PlayerStats, type Playlist, type PlaylistItem, type PollUntilOptions, type PongMessage, type PopulateOption, type Position, type PostponeBillingRequest, type PreparePaymentOptions, type PreparePaymentRequest, type PreparePaymentResponse, type PreparePaymentWithAmount, type PreparePaymentWithProduct, type PresenceChangeHandler, type PresenceInfo, type PresenceSetOptions, type PresenceStatus, type PresenceStatusResult, type ProrationMode, type PublicKeyItem, type PublicKeyPaymentMode, type PublishBatchRequest, type PublishBatchResponse, type PublishMessageRequest, type PublishMessageResponse, type PushPlatform, type PushStatsResult, type PushTopicInfo, type QualityProgress, type QueryOptions, type QueueInfoResponse, type QueueMessage, type ReadReceiptHandler, type ReadReceiptInfo, type RealtimeConnectOptions, RealtimeConnectionError, type RealtimeConnectionErrorCode, type RealtimeMessage, RealtimeRequestError, type RealtimeSendPolicy, type RegisterDeviceRequest, type RelationType, type RenameFileRequest, type RenameFileResponse, type ReplayHighlight, type ReplayInfo, type ReplayPlayerInfo, type RestoreBackupRequest, type RestoreBackupResponse, type RetentionPolicy, type RoleDetail, type RoleList, type RoleListItem, type RolePermissionItem, type RoleUserItem, RolesAPI, type RoomInfo, type RoomStaleMessage, type RoomSummary, type RoomsResponse, type RotatePublicKeyRequest, type RotatePublicKeyResponse, type SFUTokenOptions, type SFUTokenResponse, type SaveDialogOptions, type SaveDialogResult, type ScriptDetailResponse, type ScriptListResponse, type ScriptLogEntry, type ScriptLogsResponse, type ScriptMeta, type ScriptMetricsResponse, type ScriptVersion, type ScriptVersionListResponse, type SearchIndex, type SearchOptions, type SearchResponse, type SearchResult, type SecurityRule, type SendOptions, type SendSuperChatOptions, type SendSuperChatResponse, type ServerMessage, SessionManager, type SetPageMetaRequest, type Shorts, type ShortsListResponse, type SignalingMessage, type SignalingMessageType, type SlowQueryInfo, type SpectatorInfo, type SpectatorPlayerState, type SpectatorState, type SpeechRecognizeOptions, type SpeechResult, type StateChange, type StateChangeHandler, type StorageUploadOptions, type StorageUploadProgress, type StreamContentPart, type StreamDoneCallback, type StreamDoneData, type StreamErrorCallback, type StreamHandlers, type StreamImageURLPart, type StreamMessage, type StreamOptions, type StreamSession, type StreamTextPart, type StreamTokenCallback, type StreamToolCallCallback, type StreamToolResultCallback, type StreamURLResponse, type SubscribeOptions, type SubscribeTopicRequest, type SubscribedData, type Subscription, type SubscriptionPaymentResponse, type SubscriptionPaymentStatus, type SubscriptionResponse, type SubscriptionStatus, type SuperChat, type SuperChatType, type SuspendAppMemberOptions, type SuspendAppMemberResult, type SyncLostMessage, type SystemInfo, type TTLConfig, type TableAccessLevel, type TableColumnDef, type TableIndex, type TableRelation, type TableSchema, type TableSchemaDefinition, type TokenPersistence, type TransactionRead, type TransactionResult, type TransactionWrite, type TransactionWriteResult, type TranscodeStatus, type TransportType, type Trigger, type TriggerEvent, type TriggerHandlerType, type TypingChangeHandler, type TypingInfo, type UnsuspendAppMemberResult, type UpdateBillingKeyRequest, type UpdateChannelRequest, type UpdateColumnRequest, type UpdateCustomDataRequest, type UpdateCustomDataResponse, type UpdateDataRequest, type UpdateDocumentRequest, type UpdateLobbyRequest, type UpdateOrganizationRequest, type UpdatePublicKeyRequest, type UpdatePublicKeyResponse, type UpdateRolePayload, type UpdateSecurityRuleRequest, type UpdateSubscriptionRequest, type UpdateTriggerRequest, type UpdateVideoRequest, type UpdateVideoStorageRequest, type UploadByPathOptions, type UploadFileOptions, type UploadFileResponse, type UploadOptions, type UploadProgress, type VAPIDPublicKeyResponse, type ValidateResponse, type ValidationSchema, type ValidationSchemaField, type ValidationStateTransitions, type Video, type VideoComment, type VideoCompleteUploadResponse, type VideoListOptions, type VideoListResponse, VideoProcessingError, type VideoQuality, type VideoStatus, type VideoStorage, type VideoStorageAccessLevel, type VideoStorageListResponse, type VideoVisibility, type VoiceChannel, type VoiceMember, type WaitOptions, type WatchHistoryItem, type WebPushSubscription, type WebRTCConnectOptions, type WebRTCConnectionState, type WebRTCMode, type WebRTCWarning, type WhereCondition, type WhereOperator, WsTicketError, ConnectBase as default, detectInAppBrowser, escapeToExternalBrowser, isWebTransportSupported, toAIError, toCreateRoomWire };
package/dist/index.d.ts CHANGED
@@ -9601,6 +9601,24 @@ declare class StorageAPI {
9601
9601
  * 파일 URL 가져오기
9602
9602
  */
9603
9603
  getFileUrl(file: FileItem): string | null;
9604
+ /**
9605
+ * 경로 주소 만들기 — 파일을 경로로 읽는 고정 주소 (요청을 보내지 않는다)
9606
+ *
9607
+ * 돌려주는 주소는 그 경로의 파일로 리다이렉트된다. 인증 헤더가 필요 없어 `<img src>`, `fetch()`,
9608
+ * 기준 주소 + 상대 경로 로딩에 쓸 수 있다. 파일의 `url`(직접 주소)에는 경로가 들어 있지 않으므로,
9609
+ * 한 폴더의 파일들을 상대 경로로 읽으려면 이 주소를 기준으로 쓴다.
9610
+ *
9611
+ * 대상은 주소만 알면 읽히는 스토리지(`server_write`, `public_read`, `shared`)다. `private` 스토리지는 404 이고
9612
+ * 응답의 `url`(서명 주소)을 써야 한다.
9613
+ *
9614
+ * @example
9615
+ * ```typescript
9616
+ * const base = cb.storage.getPathUrl(storageId, `/l2d/rigs/${rigId}/`)
9617
+ * const meta = await (await fetch(base + 'meta.json')).json()
9618
+ * img.src = base + 'base.webp'
9619
+ * ```
9620
+ */
9621
+ getPathUrl(storageId: string, path: string): string;
9604
9622
  /**
9605
9623
  * 이미지 파일 여부 확인
9606
9624
  */
@@ -11783,6 +11801,45 @@ interface WebRTCWarning {
11783
11801
  code: string;
11784
11802
  message: string;
11785
11803
  }
11804
+ /** SFU 방 입장 토큰 요청 (`cb.webrtc.getSFUToken`) */
11805
+ interface SFUTokenOptions {
11806
+ /** P2P 와 같은 `channel:room` 형식의 룸 ID (콜론이 없으면 default 채널) */
11807
+ roomId: string;
11808
+ /**
11809
+ * 보내기(마이크, 카메라, 화면)를 요청할지.
11810
+ * 생략하면 interactive 채널은 보내기, broadcast 채널은 받기 전용이다.
11811
+ * 요청이 받아들여졌는지는 응답의 `can_publish` 로 확인한다.
11812
+ */
11813
+ publish?: boolean;
11814
+ /** 다른 참가자에게 보이는 표시 이름 (64자까지) */
11815
+ name?: string;
11816
+ /**
11817
+ * 같은 회원의 여러 기기(탭)를 구분하는 값 (영문, 숫자, `-`, 1~32자).
11818
+ * 없으면 같은 회원이 다시 들어올 때 앞 연결이 끊긴다. 익명은 매번 새 신원이라 필요 없다.
11819
+ */
11820
+ device?: string;
11821
+ }
11822
+ /** SFU 방 입장 토큰 응답 */
11823
+ interface SFUTokenResponse {
11824
+ /** SFU 신호 서버 주소 (`livekit-client` 의 `room.connect(url, token)` 첫 인자) */
11825
+ url: string;
11826
+ /** 입장 토큰 (`room.connect(url, token)` 둘째 인자). 10분 안에 접속에 써야 한다 */
11827
+ token: string;
11828
+ /** 요청한 룸 ID */
11829
+ room_id: string;
11830
+ /** SFU 서버 안에서의 방 이름 */
11831
+ sfu_room: string;
11832
+ /** 이 참가자의 SFU 신원 (회원은 `member_<id>`, 익명은 `anon_<난수>`) */
11833
+ identity: string;
11834
+ /** 보내기 권한. false 면 서버가 이 참가자의 미디어를 받지 않는다 */
11835
+ can_publish: boolean;
11836
+ /** 데이터 보내기 권한 (보내기 권한을 따른다) */
11837
+ can_publish_data: boolean;
11838
+ /** 토큰 만료 시각 (Unix epoch 초) */
11839
+ expires_at: number;
11840
+ /** 보내기 요청을 받기 전용으로 낮췄을 때의 알림 */
11841
+ warning?: WebRTCWarning;
11842
+ }
11786
11843
  /** 피어 정보 */
11787
11844
  interface PeerInfo {
11788
11845
  /** 피어 ID */
@@ -12141,6 +12198,27 @@ declare class WebRTCAPI {
12141
12198
  * ```
12142
12199
  */
12143
12200
  validate(): Promise<ValidateResponse>;
12201
+ /**
12202
+ * SFU 방 입장 토큰 발급
12203
+ *
12204
+ * `connect()` 는 미디어가 브라우저끼리 직접(P2P) 오가서 상대에게 IP 가 보이고 참가자가 많은 방을 만들 수 없다.
12205
+ * SFU 는 서버가 미디어를 받아 나눠 주는 방식이라 참가자끼리 IP 를 보지 못하고 수십 명 방이 가능하다.
12206
+ * 이 메서드는 채널 정책(인증, 역할, 정원)을 서버에서 판정한 입장 토큰을 돌려주고, 미디어 연결은 앱이
12207
+ * `livekit-client` 로 직접 한다(SDK 는 `livekit-client` 를 포함하지 않는다).
12208
+ *
12209
+ * @example
12210
+ * ```typescript
12211
+ * import { Room } from 'livekit-client'
12212
+ *
12213
+ * const sfu = await cb.webrtc.getSFUToken({ roomId: 'voice:fanmeeting-1', publish: true })
12214
+ * const room = new Room()
12215
+ * await room.connect(sfu.url, sfu.token)
12216
+ * if (sfu.can_publish) {
12217
+ * await room.localParticipant.setMicrophoneEnabled(true)
12218
+ * }
12219
+ * ```
12220
+ */
12221
+ getSFUToken(options: SFUTokenOptions): Promise<SFUTokenResponse>;
12144
12222
  /**
12145
12223
  * 앱의 WebRTC 통계 조회
12146
12224
  */
@@ -12635,4 +12713,4 @@ declare class ConnectBase {
12635
12713
  updateConfig(config: Partial<ConnectBaseConfig>): void;
12636
12714
  }
12637
12715
 
12638
- export { AIAPI, type AIChatOptions, type AIChatRequest, type AIChatResponse, type AIChatStreamCallbacks, type AIChatStreamOptions, AIError, type AIErrorCode, type AIMessage, type AISource, type AIStreamChunk, type AITool, type AIToolCall, type AIToolEvent, AUTH_MEMBER_ID_TOKEN, type AcceptInvitationResponse, type AckMessagesRequest, type AdMobDailyReport, type AdMobReportResponse, type AdMobReportSummary, type AdReportResponse, type AdReportSummary, type AdmobConnectionInfo, AdsAPI, type AdsenseConnectionInfo, type AgenticSearchProgress, type AggregateResult, type AggregateStage, type AnalyticsConfig, type AnalyticsEvent, ApiError, type ApiErrorDetail, type AppMemberDetail, type AppMemberIdentityDetail, type AppMemberIdentitySummary, type AppMemberList, type AppMemberListItem, type AppMemberProviderType, AppMembersAPI, type AppStatsResponse, type ArchivePolicy, type AtomicOperator, type AtomicOperatorType, AuthError, type AuthSettingsResponse, type BackupInfo, type BatchOperation, type BatchOperationResult, type BatchSetPageMetaRequest, type BatchWriteResult, type BillingCycle, type BillingKeyResponse, type BiometricInfo, type BiometricResult, type BulkCreateResponse, type BulkError, type CPUInfo, type CancelPaymentRequest, type CancelPaymentResponse, type CancelSubscriptionRequest, type CategoryInfo, type ChangePlanOptions, type ChangePlanPreview, type ChangePlanRequest, type ChangePlanWithPriceRef, type ChangePlanWithProduct, type Channel, type ChannelMembership, type ChannelStats, type ChargeWithBillingKeyAmount, type ChargeWithBillingKeyOptions, type ChargeWithBillingKeyProduct, type ChargeWithBillingKeyRequest, type ChargeWithBillingKeyResponse, type ChatMessage, type ClientMessage, type ColumnSchema, type CommentListResponse, type CompleteUploadRequest, type CompleteUploadResponse, type ConfirmBillingKeyRequest, type ConfirmPaymentRequest, type ConfirmPaymentResponse, ConnectBase, type ConnectBaseConfig, type ConnectedData, type ConnectionState, type ConsentOptions, type ConsumeMessagesResponse, type ConsumeOptions, type CopyTableRequest, type CopyTableResponse, type CreateBackupRequest, type CreateChannelRequest, type CreateCheckoutSessionOptions, type CreateCheckoutSessionRequest, type CreateCheckoutSessionResponse, type CreateCheckoutSessionWithAmount, type CreateCheckoutSessionWithProduct, type CreateColumnRequest, type CreateDataRequest, type CreateDocumentRequest, type CreateFolderRequest, type CreateFolderResponse, type CreateGeoIndexRequest, type CreateIndexRequest, type CreateInvitationRequest, type CreateInvitationResponse, type CreateLobbyRequest, type CreateOrganizationRequest, type CreatePlaylistRequest, type CreatePublicKeyRequest, type CreatePublicKeyResponse, type CreateRelationRequest, type CreateRolePayload, type CreateRoleResult, type CreateRoomResult, type CreateSearchIndexRequest, type CreateSecurityRuleRequest, type CreateSubscriptionOptions, type CreateSubscriptionRequest, type CreateSubscriptionWithAmount, type CreateSubscriptionWithProduct, type CreateTableRequest, type CreateTopicOptions, type CreateTriggerRequest, type CreateVideoStorageRequest, type DailyReport, type DataItem, type DataType, type DatabaseChange, type DatabaseChangeMessage, type DatabaseChangeType, type DatabaseRealtimeConnectOptions, type DatabaseRealtimeFilter, type DatabaseRealtimeHandlers, type DatabaseRealtimeSubscription, type DatabaseSnapshot, type DatabaseSnapshotMessage, type DatabaseSubscribeOptions, type DeleteBillingKeyResponse, type DeleteWhereResponse, type DeviceInfo, type DocumentResponse, type EnabledProviderInfo, type EnabledProvidersResponse, EndpointAPI, type EndpointCallInit, type ErrorHandler, type ErrorMessage, type ErrorReport, type ErrorTrackerConfig, type ErrorType, type ExportDataRequest, type ExportDataResponse, type FetchDataResponse, type FetchFilesResponse, type FetchPublicKeysResponse, type FileItem, type FileStats, GameAPI, type GameAction, type GameClientConfig, type GameConfig, GameConfigAPI, type GameConfigPatch, type GameConnectionState, type GameConnectionStatus, type GameDelta, GameError, type GameErrorCode, type GameEventHandlers, type GamePlayer, GameRoom, type GameRoomConfig, type GameRoomInfo, GameRoomTransport, type GameServerMessage, type GameServerMessageType, type GameState, type GameTransportConfig, type GenerateUploadURLByPathRequest, type GenerateUploadURLRequest, type GenerateUploadURLResponse, type GeoBoundingBox, type GeoIndex, type GeoNear, type GeoPoint, type GeoPolygon, type GeoQuery, type GeoResponse, type GeoResult, type GetAuthorizationURLResponse, type GetFileByPathResponse, type GoogleConnectionStatus, type HistoryResponse, type ICEServer, type ICEServersResponse, type ImageResult, type ImportDataRequest, type ImportDataResponse, type IndexAnalysis, type IndexRecommendation, type InitUploadResponse, type InvokeFunctionRequest, type InvokeFunctionResponse, type IssueBillingKeyRequest, type IssueBillingKeyResponse, type JoinQueueRequest, type JoinRoomRequest, type JoinRoomResponse, type KnowledgeSearchRequest, type KnowledgeSearchResponse, type KnowledgeSearchResult, type LeaderboardEntry, type LeaderboardListResponse, type LeaderboardScoreEntry, type LifecyclePolicy, type ListAppMembersOptions, type ListBillingKeysResponse, type ListDocumentsResponse, type ListPageMetasOptions, type ListPageMetasResponse, type ListPaymentsOptions, type ListSubscriptionPaymentsRequest, type ListSubscriptionPaymentsResponse, type ListSubscriptionsRequest, type ListSubscriptionsResponse, type LobbyInfo, type LobbyInvite, type LobbyMember, type LobbyVisibility, type MatchResult, type MatchmakingTicket, type MatchqueueListResponse, type MatchqueueTicket, type MemberChangePasswordRequest, type MemberCredentialMessageResponse, type MemberEmailVerificationConfirmRequest, type MemberEmailVerificationConfirmResponse, type MemberEmailVerificationRequest, type MemberInfoResponse, type MemberPasswordResetConfirmRequest, type MemberPasswordResetRequest, type MemberRedirectOption, type MemberSession, type MemberSessionList, type MemberSessionRevokeResponse, type MemberSignInRequest, type MemberSignInResponse, type MemberSignUpRequest, type MemberSignUpResponse, type MembershipTier, type MemoryInfo, type MessageHandler, type MigrateDataRequest, type MigrateDataResponse, type MoveFileRequest, type NackMessageRequest, NativeAPI, type OAuthCallbackResponse, type OAuthProvider, type OnPaymentFailure, type OpenDialogOptions, type OpenDialogResult, type Organization, type OrganizationContext, type OrganizationInvitation, type OrganizationMember, type OrganizationMemberList, type OrganizationRole, OrganizationsAPI, type PageMetaResponse, type PartyInfo, type PartyInvite, type PartyMember, type PauseSubscriptionRequest, type PaymentDetail, type PaymentListItem, type PaymentListResult, type PaymentMode, type PaymentProvider, type PaymentStatus, type PeerInfo, type Platform, type PlayerEvent, type PlayerStats, type Playlist, type PlaylistItem, type PollUntilOptions, type PongMessage, type PopulateOption, type Position, type PostponeBillingRequest, type PreparePaymentOptions, type PreparePaymentRequest, type PreparePaymentResponse, type PreparePaymentWithAmount, type PreparePaymentWithProduct, type PresenceChangeHandler, type PresenceInfo, type PresenceSetOptions, type PresenceStatus, type PresenceStatusResult, type ProrationMode, type PublicKeyItem, type PublicKeyPaymentMode, type PublishBatchRequest, type PublishBatchResponse, type PublishMessageRequest, type PublishMessageResponse, type PushPlatform, type PushStatsResult, type PushTopicInfo, type QualityProgress, type QueryOptions, type QueueInfoResponse, type QueueMessage, type ReadReceiptHandler, type ReadReceiptInfo, type RealtimeConnectOptions, RealtimeConnectionError, type RealtimeConnectionErrorCode, type RealtimeMessage, RealtimeRequestError, type RealtimeSendPolicy, type RegisterDeviceRequest, type RelationType, type RenameFileRequest, type RenameFileResponse, type ReplayHighlight, type ReplayInfo, type ReplayPlayerInfo, type RestoreBackupRequest, type RestoreBackupResponse, type RetentionPolicy, type RoleDetail, type RoleList, type RoleListItem, type RolePermissionItem, type RoleUserItem, RolesAPI, type RoomInfo, type RoomStaleMessage, type RoomSummary, type RoomsResponse, type RotatePublicKeyRequest, type RotatePublicKeyResponse, type SaveDialogOptions, type SaveDialogResult, type ScriptDetailResponse, type ScriptListResponse, type ScriptLogEntry, type ScriptLogsResponse, type ScriptMeta, type ScriptMetricsResponse, type ScriptVersion, type ScriptVersionListResponse, type SearchIndex, type SearchOptions, type SearchResponse, type SearchResult, type SecurityRule, type SendOptions, type SendSuperChatOptions, type SendSuperChatResponse, type ServerMessage, SessionManager, type SetPageMetaRequest, type Shorts, type ShortsListResponse, type SignalingMessage, type SignalingMessageType, type SlowQueryInfo, type SpectatorInfo, type SpectatorPlayerState, type SpectatorState, type SpeechRecognizeOptions, type SpeechResult, type StateChange, type StateChangeHandler, type StorageUploadOptions, type StorageUploadProgress, type StreamContentPart, type StreamDoneCallback, type StreamDoneData, type StreamErrorCallback, type StreamHandlers, type StreamImageURLPart, type StreamMessage, type StreamOptions, type StreamSession, type StreamTextPart, type StreamTokenCallback, type StreamToolCallCallback, type StreamToolResultCallback, type StreamURLResponse, type SubscribeOptions, type SubscribeTopicRequest, type SubscribedData, type Subscription, type SubscriptionPaymentResponse, type SubscriptionPaymentStatus, type SubscriptionResponse, type SubscriptionStatus, type SuperChat, type SuperChatType, type SuspendAppMemberOptions, type SuspendAppMemberResult, type SyncLostMessage, type SystemInfo, type TTLConfig, type TableAccessLevel, type TableColumnDef, type TableIndex, type TableRelation, type TableSchema, type TableSchemaDefinition, type TokenPersistence, type TransactionRead, type TransactionResult, type TransactionWrite, type TransactionWriteResult, type TranscodeStatus, type TransportType, type Trigger, type TriggerEvent, type TriggerHandlerType, type TypingChangeHandler, type TypingInfo, type UnsuspendAppMemberResult, type UpdateBillingKeyRequest, type UpdateChannelRequest, type UpdateColumnRequest, type UpdateCustomDataRequest, type UpdateCustomDataResponse, type UpdateDataRequest, type UpdateDocumentRequest, type UpdateLobbyRequest, type UpdateOrganizationRequest, type UpdatePublicKeyRequest, type UpdatePublicKeyResponse, type UpdateRolePayload, type UpdateSecurityRuleRequest, type UpdateSubscriptionRequest, type UpdateTriggerRequest, type UpdateVideoRequest, type UpdateVideoStorageRequest, type UploadByPathOptions, type UploadFileOptions, type UploadFileResponse, type UploadOptions, type UploadProgress, type VAPIDPublicKeyResponse, type ValidateResponse, type ValidationSchema, type ValidationSchemaField, type ValidationStateTransitions, type Video, type VideoComment, type VideoCompleteUploadResponse, type VideoListOptions, type VideoListResponse, VideoProcessingError, type VideoQuality, type VideoStatus, type VideoStorage, type VideoStorageAccessLevel, type VideoStorageListResponse, type VideoVisibility, type VoiceChannel, type VoiceMember, type WaitOptions, type WatchHistoryItem, type WebPushSubscription, type WebRTCConnectOptions, type WebRTCConnectionState, type WebRTCMode, type WebRTCWarning, type WhereCondition, type WhereOperator, WsTicketError, ConnectBase as default, detectInAppBrowser, escapeToExternalBrowser, isWebTransportSupported, toAIError, toCreateRoomWire };
12716
+ export { AIAPI, type AIChatOptions, type AIChatRequest, type AIChatResponse, type AIChatStreamCallbacks, type AIChatStreamOptions, AIError, type AIErrorCode, type AIMessage, type AISource, type AIStreamChunk, type AITool, type AIToolCall, type AIToolEvent, AUTH_MEMBER_ID_TOKEN, type AcceptInvitationResponse, type AckMessagesRequest, type AdMobDailyReport, type AdMobReportResponse, type AdMobReportSummary, type AdReportResponse, type AdReportSummary, type AdmobConnectionInfo, AdsAPI, type AdsenseConnectionInfo, type AgenticSearchProgress, type AggregateResult, type AggregateStage, type AnalyticsConfig, type AnalyticsEvent, ApiError, type ApiErrorDetail, type AppMemberDetail, type AppMemberIdentityDetail, type AppMemberIdentitySummary, type AppMemberList, type AppMemberListItem, type AppMemberProviderType, AppMembersAPI, type AppStatsResponse, type ArchivePolicy, type AtomicOperator, type AtomicOperatorType, AuthError, type AuthSettingsResponse, type BackupInfo, type BatchOperation, type BatchOperationResult, type BatchSetPageMetaRequest, type BatchWriteResult, type BillingCycle, type BillingKeyResponse, type BiometricInfo, type BiometricResult, type BulkCreateResponse, type BulkError, type CPUInfo, type CancelPaymentRequest, type CancelPaymentResponse, type CancelSubscriptionRequest, type CategoryInfo, type ChangePlanOptions, type ChangePlanPreview, type ChangePlanRequest, type ChangePlanWithPriceRef, type ChangePlanWithProduct, type Channel, type ChannelMembership, type ChannelStats, type ChargeWithBillingKeyAmount, type ChargeWithBillingKeyOptions, type ChargeWithBillingKeyProduct, type ChargeWithBillingKeyRequest, type ChargeWithBillingKeyResponse, type ChatMessage, type ClientMessage, type ColumnSchema, type CommentListResponse, type CompleteUploadRequest, type CompleteUploadResponse, type ConfirmBillingKeyRequest, type ConfirmPaymentRequest, type ConfirmPaymentResponse, ConnectBase, type ConnectBaseConfig, type ConnectedData, type ConnectionState, type ConsentOptions, type ConsumeMessagesResponse, type ConsumeOptions, type CopyTableRequest, type CopyTableResponse, type CreateBackupRequest, type CreateChannelRequest, type CreateCheckoutSessionOptions, type CreateCheckoutSessionRequest, type CreateCheckoutSessionResponse, type CreateCheckoutSessionWithAmount, type CreateCheckoutSessionWithProduct, type CreateColumnRequest, type CreateDataRequest, type CreateDocumentRequest, type CreateFolderRequest, type CreateFolderResponse, type CreateGeoIndexRequest, type CreateIndexRequest, type CreateInvitationRequest, type CreateInvitationResponse, type CreateLobbyRequest, type CreateOrganizationRequest, type CreatePlaylistRequest, type CreatePublicKeyRequest, type CreatePublicKeyResponse, type CreateRelationRequest, type CreateRolePayload, type CreateRoleResult, type CreateRoomResult, type CreateSearchIndexRequest, type CreateSecurityRuleRequest, type CreateSubscriptionOptions, type CreateSubscriptionRequest, type CreateSubscriptionWithAmount, type CreateSubscriptionWithProduct, type CreateTableRequest, type CreateTopicOptions, type CreateTriggerRequest, type CreateVideoStorageRequest, type DailyReport, type DataItem, type DataType, type DatabaseChange, type DatabaseChangeMessage, type DatabaseChangeType, type DatabaseRealtimeConnectOptions, type DatabaseRealtimeFilter, type DatabaseRealtimeHandlers, type DatabaseRealtimeSubscription, type DatabaseSnapshot, type DatabaseSnapshotMessage, type DatabaseSubscribeOptions, type DeleteBillingKeyResponse, type DeleteWhereResponse, type DeviceInfo, type DocumentResponse, type EnabledProviderInfo, type EnabledProvidersResponse, EndpointAPI, type EndpointCallInit, type ErrorHandler, type ErrorMessage, type ErrorReport, type ErrorTrackerConfig, type ErrorType, type ExportDataRequest, type ExportDataResponse, type FetchDataResponse, type FetchFilesResponse, type FetchPublicKeysResponse, type FileItem, type FileStats, GameAPI, type GameAction, type GameClientConfig, type GameConfig, GameConfigAPI, type GameConfigPatch, type GameConnectionState, type GameConnectionStatus, type GameDelta, GameError, type GameErrorCode, type GameEventHandlers, type GamePlayer, GameRoom, type GameRoomConfig, type GameRoomInfo, GameRoomTransport, type GameServerMessage, type GameServerMessageType, type GameState, type GameTransportConfig, type GenerateUploadURLByPathRequest, type GenerateUploadURLRequest, type GenerateUploadURLResponse, type GeoBoundingBox, type GeoIndex, type GeoNear, type GeoPoint, type GeoPolygon, type GeoQuery, type GeoResponse, type GeoResult, type GetAuthorizationURLResponse, type GetFileByPathResponse, type GoogleConnectionStatus, type HistoryResponse, type ICEServer, type ICEServersResponse, type ImageResult, type ImportDataRequest, type ImportDataResponse, type IndexAnalysis, type IndexRecommendation, type InitUploadResponse, type InvokeFunctionRequest, type InvokeFunctionResponse, type IssueBillingKeyRequest, type IssueBillingKeyResponse, type JoinQueueRequest, type JoinRoomRequest, type JoinRoomResponse, type KnowledgeSearchRequest, type KnowledgeSearchResponse, type KnowledgeSearchResult, type LeaderboardEntry, type LeaderboardListResponse, type LeaderboardScoreEntry, type LifecyclePolicy, type ListAppMembersOptions, type ListBillingKeysResponse, type ListDocumentsResponse, type ListPageMetasOptions, type ListPageMetasResponse, type ListPaymentsOptions, type ListSubscriptionPaymentsRequest, type ListSubscriptionPaymentsResponse, type ListSubscriptionsRequest, type ListSubscriptionsResponse, type LobbyInfo, type LobbyInvite, type LobbyMember, type LobbyVisibility, type MatchResult, type MatchmakingTicket, type MatchqueueListResponse, type MatchqueueTicket, type MemberChangePasswordRequest, type MemberCredentialMessageResponse, type MemberEmailVerificationConfirmRequest, type MemberEmailVerificationConfirmResponse, type MemberEmailVerificationRequest, type MemberInfoResponse, type MemberPasswordResetConfirmRequest, type MemberPasswordResetRequest, type MemberRedirectOption, type MemberSession, type MemberSessionList, type MemberSessionRevokeResponse, type MemberSignInRequest, type MemberSignInResponse, type MemberSignUpRequest, type MemberSignUpResponse, type MembershipTier, type MemoryInfo, type MessageHandler, type MigrateDataRequest, type MigrateDataResponse, type MoveFileRequest, type NackMessageRequest, NativeAPI, type OAuthCallbackResponse, type OAuthProvider, type OnPaymentFailure, type OpenDialogOptions, type OpenDialogResult, type Organization, type OrganizationContext, type OrganizationInvitation, type OrganizationMember, type OrganizationMemberList, type OrganizationRole, OrganizationsAPI, type PageMetaResponse, type PartyInfo, type PartyInvite, type PartyMember, type PauseSubscriptionRequest, type PaymentDetail, type PaymentListItem, type PaymentListResult, type PaymentMode, type PaymentProvider, type PaymentStatus, type PeerInfo, type Platform, type PlayerEvent, type PlayerStats, type Playlist, type PlaylistItem, type PollUntilOptions, type PongMessage, type PopulateOption, type Position, type PostponeBillingRequest, type PreparePaymentOptions, type PreparePaymentRequest, type PreparePaymentResponse, type PreparePaymentWithAmount, type PreparePaymentWithProduct, type PresenceChangeHandler, type PresenceInfo, type PresenceSetOptions, type PresenceStatus, type PresenceStatusResult, type ProrationMode, type PublicKeyItem, type PublicKeyPaymentMode, type PublishBatchRequest, type PublishBatchResponse, type PublishMessageRequest, type PublishMessageResponse, type PushPlatform, type PushStatsResult, type PushTopicInfo, type QualityProgress, type QueryOptions, type QueueInfoResponse, type QueueMessage, type ReadReceiptHandler, type ReadReceiptInfo, type RealtimeConnectOptions, RealtimeConnectionError, type RealtimeConnectionErrorCode, type RealtimeMessage, RealtimeRequestError, type RealtimeSendPolicy, type RegisterDeviceRequest, type RelationType, type RenameFileRequest, type RenameFileResponse, type ReplayHighlight, type ReplayInfo, type ReplayPlayerInfo, type RestoreBackupRequest, type RestoreBackupResponse, type RetentionPolicy, type RoleDetail, type RoleList, type RoleListItem, type RolePermissionItem, type RoleUserItem, RolesAPI, type RoomInfo, type RoomStaleMessage, type RoomSummary, type RoomsResponse, type RotatePublicKeyRequest, type RotatePublicKeyResponse, type SFUTokenOptions, type SFUTokenResponse, type SaveDialogOptions, type SaveDialogResult, type ScriptDetailResponse, type ScriptListResponse, type ScriptLogEntry, type ScriptLogsResponse, type ScriptMeta, type ScriptMetricsResponse, type ScriptVersion, type ScriptVersionListResponse, type SearchIndex, type SearchOptions, type SearchResponse, type SearchResult, type SecurityRule, type SendOptions, type SendSuperChatOptions, type SendSuperChatResponse, type ServerMessage, SessionManager, type SetPageMetaRequest, type Shorts, type ShortsListResponse, type SignalingMessage, type SignalingMessageType, type SlowQueryInfo, type SpectatorInfo, type SpectatorPlayerState, type SpectatorState, type SpeechRecognizeOptions, type SpeechResult, type StateChange, type StateChangeHandler, type StorageUploadOptions, type StorageUploadProgress, type StreamContentPart, type StreamDoneCallback, type StreamDoneData, type StreamErrorCallback, type StreamHandlers, type StreamImageURLPart, type StreamMessage, type StreamOptions, type StreamSession, type StreamTextPart, type StreamTokenCallback, type StreamToolCallCallback, type StreamToolResultCallback, type StreamURLResponse, type SubscribeOptions, type SubscribeTopicRequest, type SubscribedData, type Subscription, type SubscriptionPaymentResponse, type SubscriptionPaymentStatus, type SubscriptionResponse, type SubscriptionStatus, type SuperChat, type SuperChatType, type SuspendAppMemberOptions, type SuspendAppMemberResult, type SyncLostMessage, type SystemInfo, type TTLConfig, type TableAccessLevel, type TableColumnDef, type TableIndex, type TableRelation, type TableSchema, type TableSchemaDefinition, type TokenPersistence, type TransactionRead, type TransactionResult, type TransactionWrite, type TransactionWriteResult, type TranscodeStatus, type TransportType, type Trigger, type TriggerEvent, type TriggerHandlerType, type TypingChangeHandler, type TypingInfo, type UnsuspendAppMemberResult, type UpdateBillingKeyRequest, type UpdateChannelRequest, type UpdateColumnRequest, type UpdateCustomDataRequest, type UpdateCustomDataResponse, type UpdateDataRequest, type UpdateDocumentRequest, type UpdateLobbyRequest, type UpdateOrganizationRequest, type UpdatePublicKeyRequest, type UpdatePublicKeyResponse, type UpdateRolePayload, type UpdateSecurityRuleRequest, type UpdateSubscriptionRequest, type UpdateTriggerRequest, type UpdateVideoRequest, type UpdateVideoStorageRequest, type UploadByPathOptions, type UploadFileOptions, type UploadFileResponse, type UploadOptions, type UploadProgress, type VAPIDPublicKeyResponse, type ValidateResponse, type ValidationSchema, type ValidationSchemaField, type ValidationStateTransitions, type Video, type VideoComment, type VideoCompleteUploadResponse, type VideoListOptions, type VideoListResponse, VideoProcessingError, type VideoQuality, type VideoStatus, type VideoStorage, type VideoStorageAccessLevel, type VideoStorageListResponse, type VideoVisibility, type VoiceChannel, type VoiceMember, type WaitOptions, type WatchHistoryItem, type WebPushSubscription, type WebRTCConnectOptions, type WebRTCConnectionState, type WebRTCMode, type WebRTCWarning, type WhereCondition, type WhereOperator, WsTicketError, ConnectBase as default, detectInAppBrowser, escapeToExternalBrowser, isWebTransportSupported, toAIError, toCreateRoomWire };
package/dist/index.js CHANGED
@@ -12622,6 +12622,29 @@ var StorageAPI = class {
12622
12622
  getFileUrl(file) {
12623
12623
  return file.url || null;
12624
12624
  }
12625
+ /**
12626
+ * 경로 주소 만들기 — 파일을 경로로 읽는 고정 주소 (요청을 보내지 않는다)
12627
+ *
12628
+ * 돌려주는 주소는 그 경로의 파일로 리다이렉트된다. 인증 헤더가 필요 없어 `<img src>`, `fetch()`,
12629
+ * 기준 주소 + 상대 경로 로딩에 쓸 수 있다. 파일의 `url`(직접 주소)에는 경로가 들어 있지 않으므로,
12630
+ * 한 폴더의 파일들을 상대 경로로 읽으려면 이 주소를 기준으로 쓴다.
12631
+ *
12632
+ * 대상은 주소만 알면 읽히는 스토리지(`server_write`, `public_read`, `shared`)다. `private` 스토리지는 404 이고
12633
+ * 응답의 `url`(서명 주소)을 써야 한다.
12634
+ *
12635
+ * @example
12636
+ * ```typescript
12637
+ * const base = cb.storage.getPathUrl(storageId, `/l2d/rigs/${rigId}/`)
12638
+ * const meta = await (await fetch(base + 'meta.json')).json()
12639
+ * img.src = base + 'base.webp'
12640
+ * ```
12641
+ */
12642
+ getPathUrl(storageId, path) {
12643
+ const encoded = path.split("/").filter(
12644
+ (segment, index, all) => segment !== "" || index === all.length - 1
12645
+ ).map((segment) => encodeURIComponent(segment)).join("/");
12646
+ return `${this.http.getBaseUrl()}/v1/file-path/${storageId}/${encoded}`;
12647
+ }
12625
12648
  /**
12626
12649
  * 이미지 파일 여부 확인
12627
12650
  */
@@ -13609,8 +13632,8 @@ var SupportAPI = class {
13609
13632
  }
13610
13633
  };
13611
13634
  function detectSdkVersion() {
13612
- if ("6.15.0") {
13613
- return "6.15.0";
13635
+ if ("6.16.0") {
13636
+ return "6.16.0";
13614
13637
  }
13615
13638
  return "unknown";
13616
13639
  }
@@ -15197,6 +15220,43 @@ var WebRTCAPI = class _WebRTCAPI {
15197
15220
  baseUrl: this.webrtcUrl
15198
15221
  });
15199
15222
  }
15223
+ /**
15224
+ * SFU 방 입장 토큰 발급
15225
+ *
15226
+ * `connect()` 는 미디어가 브라우저끼리 직접(P2P) 오가서 상대에게 IP 가 보이고 참가자가 많은 방을 만들 수 없다.
15227
+ * SFU 는 서버가 미디어를 받아 나눠 주는 방식이라 참가자끼리 IP 를 보지 못하고 수십 명 방이 가능하다.
15228
+ * 이 메서드는 채널 정책(인증, 역할, 정원)을 서버에서 판정한 입장 토큰을 돌려주고, 미디어 연결은 앱이
15229
+ * `livekit-client` 로 직접 한다(SDK 는 `livekit-client` 를 포함하지 않는다).
15230
+ *
15231
+ * @example
15232
+ * ```typescript
15233
+ * import { Room } from 'livekit-client'
15234
+ *
15235
+ * const sfu = await cb.webrtc.getSFUToken({ roomId: 'voice:fanmeeting-1', publish: true })
15236
+ * const room = new Room()
15237
+ * await room.connect(sfu.url, sfu.token)
15238
+ * if (sfu.can_publish) {
15239
+ * await room.localParticipant.setMicrophoneEnabled(true)
15240
+ * }
15241
+ * ```
15242
+ */
15243
+ async getSFUToken(options) {
15244
+ if (!this.appId) {
15245
+ throw new Error(
15246
+ "WebRTC getSFUToken \uC5D0\uB294 appId \uAC00 \uD544\uC694\uD569\uB2C8\uB2E4. ConnectBase \uCD08\uAE30\uD654 \uC2DC appId \uB97C \uC124\uC815\uD558\uC138\uC694."
15247
+ );
15248
+ }
15249
+ return this.http.post(
15250
+ `/v1/apps/${this.appId}/sfu/token`,
15251
+ {
15252
+ room_id: options.roomId,
15253
+ publish: options.publish,
15254
+ name: options.name,
15255
+ device: options.device
15256
+ },
15257
+ { baseUrl: this.webrtcUrl }
15258
+ );
15259
+ }
15200
15260
  /**
15201
15261
  * 앱의 WebRTC 통계 조회
15202
15262
  */
package/dist/index.mjs CHANGED
@@ -12569,6 +12569,29 @@ var StorageAPI = class {
12569
12569
  getFileUrl(file) {
12570
12570
  return file.url || null;
12571
12571
  }
12572
+ /**
12573
+ * 경로 주소 만들기 — 파일을 경로로 읽는 고정 주소 (요청을 보내지 않는다)
12574
+ *
12575
+ * 돌려주는 주소는 그 경로의 파일로 리다이렉트된다. 인증 헤더가 필요 없어 `<img src>`, `fetch()`,
12576
+ * 기준 주소 + 상대 경로 로딩에 쓸 수 있다. 파일의 `url`(직접 주소)에는 경로가 들어 있지 않으므로,
12577
+ * 한 폴더의 파일들을 상대 경로로 읽으려면 이 주소를 기준으로 쓴다.
12578
+ *
12579
+ * 대상은 주소만 알면 읽히는 스토리지(`server_write`, `public_read`, `shared`)다. `private` 스토리지는 404 이고
12580
+ * 응답의 `url`(서명 주소)을 써야 한다.
12581
+ *
12582
+ * @example
12583
+ * ```typescript
12584
+ * const base = cb.storage.getPathUrl(storageId, `/l2d/rigs/${rigId}/`)
12585
+ * const meta = await (await fetch(base + 'meta.json')).json()
12586
+ * img.src = base + 'base.webp'
12587
+ * ```
12588
+ */
12589
+ getPathUrl(storageId, path) {
12590
+ const encoded = path.split("/").filter(
12591
+ (segment, index, all) => segment !== "" || index === all.length - 1
12592
+ ).map((segment) => encodeURIComponent(segment)).join("/");
12593
+ return `${this.http.getBaseUrl()}/v1/file-path/${storageId}/${encoded}`;
12594
+ }
12572
12595
  /**
12573
12596
  * 이미지 파일 여부 확인
12574
12597
  */
@@ -13556,8 +13579,8 @@ var SupportAPI = class {
13556
13579
  }
13557
13580
  };
13558
13581
  function detectSdkVersion() {
13559
- if ("6.15.0") {
13560
- return "6.15.0";
13582
+ if ("6.16.0") {
13583
+ return "6.16.0";
13561
13584
  }
13562
13585
  return "unknown";
13563
13586
  }
@@ -15144,6 +15167,43 @@ var WebRTCAPI = class _WebRTCAPI {
15144
15167
  baseUrl: this.webrtcUrl
15145
15168
  });
15146
15169
  }
15170
+ /**
15171
+ * SFU 방 입장 토큰 발급
15172
+ *
15173
+ * `connect()` 는 미디어가 브라우저끼리 직접(P2P) 오가서 상대에게 IP 가 보이고 참가자가 많은 방을 만들 수 없다.
15174
+ * SFU 는 서버가 미디어를 받아 나눠 주는 방식이라 참가자끼리 IP 를 보지 못하고 수십 명 방이 가능하다.
15175
+ * 이 메서드는 채널 정책(인증, 역할, 정원)을 서버에서 판정한 입장 토큰을 돌려주고, 미디어 연결은 앱이
15176
+ * `livekit-client` 로 직접 한다(SDK 는 `livekit-client` 를 포함하지 않는다).
15177
+ *
15178
+ * @example
15179
+ * ```typescript
15180
+ * import { Room } from 'livekit-client'
15181
+ *
15182
+ * const sfu = await cb.webrtc.getSFUToken({ roomId: 'voice:fanmeeting-1', publish: true })
15183
+ * const room = new Room()
15184
+ * await room.connect(sfu.url, sfu.token)
15185
+ * if (sfu.can_publish) {
15186
+ * await room.localParticipant.setMicrophoneEnabled(true)
15187
+ * }
15188
+ * ```
15189
+ */
15190
+ async getSFUToken(options) {
15191
+ if (!this.appId) {
15192
+ throw new Error(
15193
+ "WebRTC getSFUToken \uC5D0\uB294 appId \uAC00 \uD544\uC694\uD569\uB2C8\uB2E4. ConnectBase \uCD08\uAE30\uD654 \uC2DC appId \uB97C \uC124\uC815\uD558\uC138\uC694."
15194
+ );
15195
+ }
15196
+ return this.http.post(
15197
+ `/v1/apps/${this.appId}/sfu/token`,
15198
+ {
15199
+ room_id: options.roomId,
15200
+ publish: options.publish,
15201
+ name: options.name,
15202
+ device: options.device
15203
+ },
15204
+ { baseUrl: this.webrtcUrl }
15205
+ );
15206
+ }
15147
15207
  /**
15148
15208
  * 앱의 WebRTC 통계 조회
15149
15209
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "connectbase-client",
3
- "version": "6.15.0",
3
+ "version": "6.16.0",
4
4
  "description": "Connect Base JavaScript/TypeScript SDK for browser and Node.js",
5
5
  "repository": {
6
6
  "type": "git",