connectbase-client 6.5.0 → 6.6.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 +70 -0
- package/README.md +39 -0
- package/dist/cli.js +1 -1
- package/dist/connect-base.umd.js +5 -5
- package/dist/index.d.mts +116 -2
- package/dist/index.d.ts +116 -2
- package/dist/index.js +263 -64
- package/dist/index.mjs +262 -64
- package/package.json +14 -7
package/dist/index.d.mts
CHANGED
|
@@ -160,13 +160,14 @@ declare class GameError extends Error {
|
|
|
160
160
|
* | `connection_limit_exceeded` | 플랜의 동시접속 한도 도달 | 가능 | 다른 연결이 끊기면 자리가 난다. `details.current`/`details.limit` 확인, 계속되면 플랜 상향 |
|
|
161
161
|
* | `quota_exceeded` | 월간 WebSocket 사용 시간 소진 | 불가 | 플랜 업그레이드 전까지 재시도 무의미 |
|
|
162
162
|
* | `server_at_capacity` | 서버 일시 혼잡 | 가능 | 잠시 후 재시도 |
|
|
163
|
+
* | `rate_limited` | 한 IP 에서 연결 시도가 너무 잦음 (6.6.0+) | 가능 | `connect()` 가 `retryAfterMs` 만큼(지터 포함) 기다렸다 스스로 다시 붙는다. 연결 제한 시간 안에 못 붙으면 이 에러를 던진다 |
|
|
163
164
|
* | `auth_unavailable` | 인증 서버 일시 장애 | 가능 | 잠시 후 재시도 |
|
|
164
165
|
* | `unauthorized` | 공개 키/액세스 토큰이 유효하지 않음 | 불가 | 키·토큰 확인 (토큰 만료면 새 토큰으로 `connect()`) |
|
|
165
166
|
* | `forbidden` | 다른 앱의 경로로 접속 | 불가 | 설정 확인 |
|
|
166
167
|
* | `invalid_user_id` | 공개 키 연결에 UUID 형식 `userId` | 불가 | `accessToken` 을 쓰거나 UUID 가 아닌 식별자 사용 |
|
|
167
168
|
* | `internal_error` | 서버 설정 오류 | 가능 | 잠시 후 재시도 |
|
|
168
169
|
*/
|
|
169
|
-
type RealtimeConnectionErrorCode = "connection_limit_exceeded" | "quota_exceeded" | "server_at_capacity" | "auth_unavailable" | "unauthorized" | "forbidden" | "invalid_user_id" | "internal_error" | (string & {});
|
|
170
|
+
type RealtimeConnectionErrorCode = "connection_limit_exceeded" | "quota_exceeded" | "server_at_capacity" | "rate_limited" | "auth_unavailable" | "unauthorized" | "forbidden" | "invalid_user_id" | "internal_error" | (string & {});
|
|
170
171
|
/**
|
|
171
172
|
* 서버가 이유를 밝히고 실시간 연결을 거부했을 때 `cb.realtime.connect()` 가 던지는 에러.
|
|
172
173
|
*
|
|
@@ -176,6 +177,8 @@ type RealtimeConnectionErrorCode = "connection_limit_exceeded" | "quota_exceeded
|
|
|
176
177
|
* 연결을 받은 뒤 거부 이유를 보내고 4000+HTTP상태 close 코드(예: 4401, 4402, 4503)로 닫는다.
|
|
177
178
|
*
|
|
178
179
|
* - 거부는 SSE 폴백 대상이 아니다 — 네트워크는 정상이고 서버가 받지 않은 것이다.
|
|
180
|
+
* - 서버가 재시도 시각을 알려 준 거부(`retryAfterMs`, 예: `rate_limited`)는 `connect()` 가 연결 제한
|
|
181
|
+
* 시간(`timeout`) 안에서 그 시각에 지터를 더해 스스로 다시 시도한다. 그 밖의 거부는 바로 던진다.
|
|
179
182
|
* - 자동 재연결 중에 받은 거부는 `retryable` 이면 백오프로 계속 시도하고, 아니면 재연결을 멈추고
|
|
180
183
|
* `cb.realtime.onError` 로 이 에러를 알린다.
|
|
181
184
|
*
|
|
@@ -200,12 +203,56 @@ declare class RealtimeConnectionError extends Error {
|
|
|
200
203
|
retryable: boolean;
|
|
201
204
|
/** 거부 상세 (예: connection_limit_exceeded 의 `current`/`limit`, quota_exceeded 의 `quota`/`unit`). */
|
|
202
205
|
details?: Record<string, unknown>;
|
|
206
|
+
/**
|
|
207
|
+
* 서버가 알려 준, 다시 시도해도 되는 시각까지의 대기(ms). 언제 풀리는지 서버가 정확히 아는 거부
|
|
208
|
+
* (`rate_limited`)에만 있다.
|
|
209
|
+
*/
|
|
210
|
+
retryAfterMs?: number;
|
|
203
211
|
constructor(init: {
|
|
204
212
|
code?: string;
|
|
205
213
|
message?: string;
|
|
206
214
|
closeCode: number;
|
|
207
215
|
retryable?: boolean;
|
|
208
216
|
details?: Record<string, unknown>;
|
|
217
|
+
retryAfterMs?: number;
|
|
218
|
+
});
|
|
219
|
+
/** `JSON.stringify(err)` 가 `{}` 가 되지 않도록 한다 (ApiError.toJSON 참조). */
|
|
220
|
+
toJSON(): Record<string, unknown>;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* 실시간 요청(`subscribe`, `send`, `getHistory` 등)을 서버가 거부했을 때 던지는 에러 (6.6.0+).
|
|
224
|
+
* 예전에는 서버가 보낸 오류 코드를 버리고 메시지만 담은 `Error` 를 던져 앱이 문자열로 분기해야 했다.
|
|
225
|
+
* `RealtimeRequestError` 는 `Error` 를 상속하므로 기존 `catch (e) { e.message }` 코드는 그대로 동작한다.
|
|
226
|
+
*
|
|
227
|
+
* | 코드 | 원인 |
|
|
228
|
+
* |------|------|
|
|
229
|
+
* | `SEND_NOT_ALLOWED` | 카테고리 발행 정책이 `publishers_only` 인데 방송인이 아닌 연결이 보냈다 |
|
|
230
|
+
* | `INVALID_MESSAGE` | 메시지 형식 오류 (예: 방송인 역할이 없는 카테고리에 `to: 'publishers'`) |
|
|
231
|
+
* | `NOT_SUBSCRIBED` | 구독하지 않은 카테고리에 보냈다 |
|
|
232
|
+
* | `RATE_LIMITED` | 카테고리 또는 연결의 초당 메시지 한도 초과 |
|
|
233
|
+
* | `MESSAGE_TOO_LARGE` | 카테고리 최대 메시지 크기 초과 |
|
|
234
|
+
* | `QUOTA_EXCEEDED` | 플랜 할당량 초과 |
|
|
235
|
+
* | `CATEGORY_NOT_FOUND` | 카테고리가 없거나 비활성 |
|
|
236
|
+
* | `MAX_SUBSCRIBERS_REACHED` | 카테고리 최대 구독자 수 도달 |
|
|
237
|
+
* | `ROOM_ACCESS_DENIED` | room 인가 함수가 거부했다 |
|
|
238
|
+
*
|
|
239
|
+
* ```ts
|
|
240
|
+
* try {
|
|
241
|
+
* await concert.send({ cheer: 1 })
|
|
242
|
+
* } catch (e) {
|
|
243
|
+
* if (e instanceof RealtimeRequestError && e.code === 'SEND_NOT_ALLOWED') hideSendButton()
|
|
244
|
+
* }
|
|
245
|
+
* ```
|
|
246
|
+
*/
|
|
247
|
+
declare class RealtimeRequestError extends Error {
|
|
248
|
+
/** 서버 오류 코드. 분기 기준은 이 필드다. 서버가 코드를 보내지 않으면 `"unknown"`. */
|
|
249
|
+
code: string;
|
|
250
|
+
/** 요청한 카테고리 (있으면). */
|
|
251
|
+
category?: string;
|
|
252
|
+
constructor(init: {
|
|
253
|
+
code?: string;
|
|
254
|
+
message?: string;
|
|
255
|
+
category?: string;
|
|
209
256
|
});
|
|
210
257
|
/** `JSON.stringify(err)` 가 `{}` 가 되지 않도록 한다 (ApiError.toJSON 참조). */
|
|
211
258
|
toJSON(): Record<string, unknown>;
|
|
@@ -548,6 +595,21 @@ declare class HttpClient {
|
|
|
548
595
|
* 일은 없어야 한다.
|
|
549
596
|
*/
|
|
550
597
|
private learnDirectOrigin;
|
|
598
|
+
/**
|
|
599
|
+
* 광고된 direct 원본을 검증해 받아들인다. 응답 헤더(learnDirectOrigin)와 edge-hints 본문
|
|
600
|
+
* (primeEdgeHints)이 같은 검증을 거친다.
|
|
601
|
+
*/
|
|
602
|
+
private adoptDirectBases;
|
|
603
|
+
/**
|
|
604
|
+
* realtime 첫 연결 전에 저지연 direct 원본 힌트를 묻는다 (`GET /v1/public/edge-hints`, 6.6.0+).
|
|
605
|
+
*
|
|
606
|
+
* **커스텀 헤더 없는 단순 GET** 이다. `X-Public-Key` 같은 헤더가 붙으면 브라우저가 CORS 사전 요청을
|
|
607
|
+
* 먼저 보내 Cloudflare 를 두 번 왕복하고, 앱의 "로컬 개발 origin 허용" 이 꺼진 localhost 페이지에서는
|
|
608
|
+
* 키 기반 opt-in 에 막혀 브라우저만 direct 를 못 썼다(Node 는 썼다 — platform-issue 01a15e24).
|
|
609
|
+
* 서버는 이 경로를 키 없이 열어 두고 같은 값을 본문으로도 준다. 본문을 읽으므로 CORS
|
|
610
|
+
* Expose-Headers 에도 기대지 않는다. 실패는 조용히 무시한다 — direct 는 최적화일 뿐이다.
|
|
611
|
+
*/
|
|
612
|
+
primeEdgeHints(timeoutMs: number): Promise<void>;
|
|
551
613
|
/**
|
|
552
614
|
* SDK 인증 헤더를 **주입하지 않는** raw fetch. 저지연 원본 선택과 폴백만 얹는다.
|
|
553
615
|
*
|
|
@@ -7890,12 +7952,28 @@ interface SubscribeOptions {
|
|
|
7890
7952
|
/** 히스토리 로드 개수 (persist=true인 카테고리만) */
|
|
7891
7953
|
historyLimit?: number;
|
|
7892
7954
|
}
|
|
7955
|
+
/**
|
|
7956
|
+
* 카테고리 발행 정책 (6.6.0+). 콘솔이나 API 로 카테고리에 설정한다.
|
|
7957
|
+
* - `open`: 누가 보내든 구독자 모두가 받는다 (기본, 6.6.0 이전과 같다).
|
|
7958
|
+
* - `upstream`: 방송인의 메시지는 모두에게, 방송인이 아닌 구독자의 메시지는 방송인에게만 간다
|
|
7959
|
+
* (관객 반응, 질문, 투표). 방송인이 아닌 구독자의 메시지는 히스토리에 저장되지 않는다.
|
|
7960
|
+
* - `publishers_only`: 방송인만 보낼 수 있다. 나머지는 받기만 한다 (보내면 `SEND_NOT_ALLOWED`).
|
|
7961
|
+
*/
|
|
7962
|
+
type RealtimeSendPolicy = "open" | "upstream" | "publishers_only";
|
|
7893
7963
|
/** 카테고리 정보 */
|
|
7894
7964
|
interface CategoryInfo {
|
|
7895
7965
|
category: string;
|
|
7896
7966
|
persist: boolean;
|
|
7897
7967
|
historyCount: number;
|
|
7898
7968
|
readReceipt: boolean;
|
|
7969
|
+
/**
|
|
7970
|
+
* 이 연결이 이 카테고리의 방송인인지 (6.6.0+). 카테고리 `publisher_roles` 의 역할을 가진
|
|
7971
|
+
* **로그인 멤버(accessToken) 연결**만 방송인이다 — 공개 키(익명) 연결은 항상 `false`.
|
|
7972
|
+
* 구독할 때 정해지므로 역할이나 카테고리 설정이 바뀌면 다시 구독해야 반영된다.
|
|
7973
|
+
*/
|
|
7974
|
+
isPublisher: boolean;
|
|
7975
|
+
/** 카테고리 발행 정책 (6.6.0+). 구버전 서버는 `open`. */
|
|
7976
|
+
sendPolicy: RealtimeSendPolicy;
|
|
7899
7977
|
}
|
|
7900
7978
|
/** 메시지 데이터 */
|
|
7901
7979
|
interface RealtimeMessage<T = unknown> {
|
|
@@ -7904,6 +7982,11 @@ interface RealtimeMessage<T = unknown> {
|
|
|
7904
7982
|
from?: string;
|
|
7905
7983
|
data: T;
|
|
7906
7984
|
sentAt: number;
|
|
7985
|
+
/**
|
|
7986
|
+
* 보낸 연결이 이 카테고리의 방송인이라는 **서버 보증** (6.6.0+). `data` 안의 값과 달리 클라이언트가
|
|
7987
|
+
* 위조할 수 없다 — 방송인 메시지만 골라 처리할 때 이 값으로 가린다. 히스토리 메시지에는 없다.
|
|
7988
|
+
*/
|
|
7989
|
+
fromPublisher?: boolean;
|
|
7907
7990
|
}
|
|
7908
7991
|
/** 히스토리 응답 */
|
|
7909
7992
|
interface HistoryResponse<T = unknown> {
|
|
@@ -7951,6 +8034,12 @@ type StateChangeHandler = (state: ConnectionState) => void;
|
|
|
7951
8034
|
interface SendOptions {
|
|
7952
8035
|
/** true면 발신자도 메시지를 받음 (기본값: true) */
|
|
7953
8036
|
includeSelf?: boolean;
|
|
8037
|
+
/**
|
|
8038
|
+
* `'publishers'` 면 이 메시지는 카테고리의 방송인에게만 간다 (6.6.0+). 발행 정책이 `open` 인 카테고리에서
|
|
8039
|
+
* 채팅은 모두에게, 반응만 방송인에게 보내고 싶을 때 쓴다. 카테고리에 방송인 역할(`publisher_roles`)이
|
|
8040
|
+
* 없으면 받을 사람이 없어 `INVALID_MESSAGE` 로 거부된다. 방송인에게만 가는 메시지는 히스토리에 저장되지 않는다.
|
|
8041
|
+
*/
|
|
8042
|
+
to?: "publishers";
|
|
7954
8043
|
}
|
|
7955
8044
|
/** 구독 객체 */
|
|
7956
8045
|
interface Subscription {
|
|
@@ -8084,6 +8173,8 @@ interface SubscribedData {
|
|
|
8084
8173
|
persist: boolean;
|
|
8085
8174
|
history_count: number;
|
|
8086
8175
|
read_receipt: boolean;
|
|
8176
|
+
publisher?: boolean;
|
|
8177
|
+
send_policy?: string;
|
|
8087
8178
|
}
|
|
8088
8179
|
/** 프레전스 상태 */
|
|
8089
8180
|
type PresenceStatus = "online" | "away" | "busy" | "offline";
|
|
@@ -8167,6 +8258,18 @@ declare class RealtimeAPI {
|
|
|
8167
8258
|
private pendingRestore;
|
|
8168
8259
|
/** 첫 연결 전에 direct 원본 힌트를 한 번 물었는지 (primeDirectRealtime). */
|
|
8169
8260
|
private directRealtimePrimed;
|
|
8261
|
+
/** disconnect() 마다 늘린다 — connect() 의 재시도 대기가 그 사이 취소됐는지 알아보는 데 쓴다. */
|
|
8262
|
+
private connectGeneration;
|
|
8263
|
+
/**
|
|
8264
|
+
* connect() 가 첫 연결을 시도하는 중인지. 이때의 핸드셰이크 실패는 connect() 가 직접 다시 시도하거나
|
|
8265
|
+
* 폴백하므로, onclose 가 백그라운드 재연결 체인(handleDisconnect)을 따로 시작하면 안 된다 — 두 경로가
|
|
8266
|
+
* 동시에 연결을 열게 된다.
|
|
8267
|
+
*/
|
|
8268
|
+
private initialConnecting;
|
|
8269
|
+
/** 다음 재연결 대기의 하한(ms) — 서버가 알려 준 retry_after_ms. handleDisconnect 가 한 번 쓰고 비운다. */
|
|
8270
|
+
private reconnectFloorMs;
|
|
8271
|
+
/** connect() 의 재시도 대기를 끝내는 함수 — disconnect() 가 기다림 없이 바로 취소하게 한다. */
|
|
8272
|
+
private cancelConnectWait;
|
|
8170
8273
|
private pendingRequests;
|
|
8171
8274
|
private subscriptions;
|
|
8172
8275
|
private streamSessions;
|
|
@@ -8462,6 +8565,17 @@ declare class RealtimeAPI {
|
|
|
8462
8565
|
* 세션당 한 번만 묻는다.
|
|
8463
8566
|
*/
|
|
8464
8567
|
private primeDirectRealtime;
|
|
8568
|
+
/**
|
|
8569
|
+
* 첫 연결을 연결 제한 시간(`timeout`) 안에서 다시 시도한다 (6.6.0+, platform-issue 01a15e24).
|
|
8570
|
+
*
|
|
8571
|
+
* - 서버가 재시도 시각을 알려 준 거부(`retryAfterMs`, 예: 한 IP 에서 연결이 몰린 `rate_limited`):
|
|
8572
|
+
* 그 시각에 지터를 더해 다시 붙는다. 공연 시작처럼 한꺼번에 들어올 때 앱이 재시도를 짜지 않아도 된다.
|
|
8573
|
+
* - 이유 없는 핸드셰이크 실패: 두 번까지 백오프 후 다시 한다. 네트워크가 WebSocket 을 실제로 막으면
|
|
8574
|
+
* 매번 실패하고, 앞단의 일시 거부는 다시 하면 붙는다 — 한 번 실패로 SSE 폴백하던 것이 연결 속도
|
|
8575
|
+
* 제한을 "네트워크 차단" 으로 오진한 원인이었다.
|
|
8576
|
+
* - 그 밖의 거부(자격증명, 동시접속 한도 등)와 시간 초과는 바로 던진다.
|
|
8577
|
+
*/
|
|
8578
|
+
private connectWithRetry;
|
|
8465
8579
|
private doConnect;
|
|
8466
8580
|
private log;
|
|
8467
8581
|
/**
|
|
@@ -11841,4 +11955,4 @@ declare class ConnectBase {
|
|
|
11841
11955
|
updateConfig(config: Partial<ConnectBaseConfig>): void;
|
|
11842
11956
|
}
|
|
11843
11957
|
|
|
11844
|
-
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 ChangePlanPreview, type ChangePlanRequest, type Channel, type ChannelMembership, type ChannelStats, 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 CreateCheckoutSessionRequest, type CreateCheckoutSessionResponse, 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 CreateSubscriptionRequest, type CreateTableRequest, 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 PreparePaymentRequest, type PreparePaymentResponse, 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 QualityProgress, type QueryOptions, type QueueInfoResponse, type QueueMessage, type ReadReceiptHandler, type ReadReceiptInfo, type RealtimeConnectOptions, RealtimeConnectionError, type RealtimeConnectionErrorCode, type RealtimeMessage, 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 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 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 WhereCondition, type WhereOperator, ConnectBase as default, detectInAppBrowser, escapeToExternalBrowser, isWebTransportSupported, toAIError, toCreateRoomWire };
|
|
11958
|
+
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 ChangePlanPreview, type ChangePlanRequest, type Channel, type ChannelMembership, type ChannelStats, 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 CreateCheckoutSessionRequest, type CreateCheckoutSessionResponse, 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 CreateSubscriptionRequest, type CreateTableRequest, 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 PreparePaymentRequest, type PreparePaymentResponse, 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 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 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 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 WhereCondition, type WhereOperator, ConnectBase as default, detectInAppBrowser, escapeToExternalBrowser, isWebTransportSupported, toAIError, toCreateRoomWire };
|
package/dist/index.d.ts
CHANGED
|
@@ -160,13 +160,14 @@ declare class GameError extends Error {
|
|
|
160
160
|
* | `connection_limit_exceeded` | 플랜의 동시접속 한도 도달 | 가능 | 다른 연결이 끊기면 자리가 난다. `details.current`/`details.limit` 확인, 계속되면 플랜 상향 |
|
|
161
161
|
* | `quota_exceeded` | 월간 WebSocket 사용 시간 소진 | 불가 | 플랜 업그레이드 전까지 재시도 무의미 |
|
|
162
162
|
* | `server_at_capacity` | 서버 일시 혼잡 | 가능 | 잠시 후 재시도 |
|
|
163
|
+
* | `rate_limited` | 한 IP 에서 연결 시도가 너무 잦음 (6.6.0+) | 가능 | `connect()` 가 `retryAfterMs` 만큼(지터 포함) 기다렸다 스스로 다시 붙는다. 연결 제한 시간 안에 못 붙으면 이 에러를 던진다 |
|
|
163
164
|
* | `auth_unavailable` | 인증 서버 일시 장애 | 가능 | 잠시 후 재시도 |
|
|
164
165
|
* | `unauthorized` | 공개 키/액세스 토큰이 유효하지 않음 | 불가 | 키·토큰 확인 (토큰 만료면 새 토큰으로 `connect()`) |
|
|
165
166
|
* | `forbidden` | 다른 앱의 경로로 접속 | 불가 | 설정 확인 |
|
|
166
167
|
* | `invalid_user_id` | 공개 키 연결에 UUID 형식 `userId` | 불가 | `accessToken` 을 쓰거나 UUID 가 아닌 식별자 사용 |
|
|
167
168
|
* | `internal_error` | 서버 설정 오류 | 가능 | 잠시 후 재시도 |
|
|
168
169
|
*/
|
|
169
|
-
type RealtimeConnectionErrorCode = "connection_limit_exceeded" | "quota_exceeded" | "server_at_capacity" | "auth_unavailable" | "unauthorized" | "forbidden" | "invalid_user_id" | "internal_error" | (string & {});
|
|
170
|
+
type RealtimeConnectionErrorCode = "connection_limit_exceeded" | "quota_exceeded" | "server_at_capacity" | "rate_limited" | "auth_unavailable" | "unauthorized" | "forbidden" | "invalid_user_id" | "internal_error" | (string & {});
|
|
170
171
|
/**
|
|
171
172
|
* 서버가 이유를 밝히고 실시간 연결을 거부했을 때 `cb.realtime.connect()` 가 던지는 에러.
|
|
172
173
|
*
|
|
@@ -176,6 +177,8 @@ type RealtimeConnectionErrorCode = "connection_limit_exceeded" | "quota_exceeded
|
|
|
176
177
|
* 연결을 받은 뒤 거부 이유를 보내고 4000+HTTP상태 close 코드(예: 4401, 4402, 4503)로 닫는다.
|
|
177
178
|
*
|
|
178
179
|
* - 거부는 SSE 폴백 대상이 아니다 — 네트워크는 정상이고 서버가 받지 않은 것이다.
|
|
180
|
+
* - 서버가 재시도 시각을 알려 준 거부(`retryAfterMs`, 예: `rate_limited`)는 `connect()` 가 연결 제한
|
|
181
|
+
* 시간(`timeout`) 안에서 그 시각에 지터를 더해 스스로 다시 시도한다. 그 밖의 거부는 바로 던진다.
|
|
179
182
|
* - 자동 재연결 중에 받은 거부는 `retryable` 이면 백오프로 계속 시도하고, 아니면 재연결을 멈추고
|
|
180
183
|
* `cb.realtime.onError` 로 이 에러를 알린다.
|
|
181
184
|
*
|
|
@@ -200,12 +203,56 @@ declare class RealtimeConnectionError extends Error {
|
|
|
200
203
|
retryable: boolean;
|
|
201
204
|
/** 거부 상세 (예: connection_limit_exceeded 의 `current`/`limit`, quota_exceeded 의 `quota`/`unit`). */
|
|
202
205
|
details?: Record<string, unknown>;
|
|
206
|
+
/**
|
|
207
|
+
* 서버가 알려 준, 다시 시도해도 되는 시각까지의 대기(ms). 언제 풀리는지 서버가 정확히 아는 거부
|
|
208
|
+
* (`rate_limited`)에만 있다.
|
|
209
|
+
*/
|
|
210
|
+
retryAfterMs?: number;
|
|
203
211
|
constructor(init: {
|
|
204
212
|
code?: string;
|
|
205
213
|
message?: string;
|
|
206
214
|
closeCode: number;
|
|
207
215
|
retryable?: boolean;
|
|
208
216
|
details?: Record<string, unknown>;
|
|
217
|
+
retryAfterMs?: number;
|
|
218
|
+
});
|
|
219
|
+
/** `JSON.stringify(err)` 가 `{}` 가 되지 않도록 한다 (ApiError.toJSON 참조). */
|
|
220
|
+
toJSON(): Record<string, unknown>;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* 실시간 요청(`subscribe`, `send`, `getHistory` 등)을 서버가 거부했을 때 던지는 에러 (6.6.0+).
|
|
224
|
+
* 예전에는 서버가 보낸 오류 코드를 버리고 메시지만 담은 `Error` 를 던져 앱이 문자열로 분기해야 했다.
|
|
225
|
+
* `RealtimeRequestError` 는 `Error` 를 상속하므로 기존 `catch (e) { e.message }` 코드는 그대로 동작한다.
|
|
226
|
+
*
|
|
227
|
+
* | 코드 | 원인 |
|
|
228
|
+
* |------|------|
|
|
229
|
+
* | `SEND_NOT_ALLOWED` | 카테고리 발행 정책이 `publishers_only` 인데 방송인이 아닌 연결이 보냈다 |
|
|
230
|
+
* | `INVALID_MESSAGE` | 메시지 형식 오류 (예: 방송인 역할이 없는 카테고리에 `to: 'publishers'`) |
|
|
231
|
+
* | `NOT_SUBSCRIBED` | 구독하지 않은 카테고리에 보냈다 |
|
|
232
|
+
* | `RATE_LIMITED` | 카테고리 또는 연결의 초당 메시지 한도 초과 |
|
|
233
|
+
* | `MESSAGE_TOO_LARGE` | 카테고리 최대 메시지 크기 초과 |
|
|
234
|
+
* | `QUOTA_EXCEEDED` | 플랜 할당량 초과 |
|
|
235
|
+
* | `CATEGORY_NOT_FOUND` | 카테고리가 없거나 비활성 |
|
|
236
|
+
* | `MAX_SUBSCRIBERS_REACHED` | 카테고리 최대 구독자 수 도달 |
|
|
237
|
+
* | `ROOM_ACCESS_DENIED` | room 인가 함수가 거부했다 |
|
|
238
|
+
*
|
|
239
|
+
* ```ts
|
|
240
|
+
* try {
|
|
241
|
+
* await concert.send({ cheer: 1 })
|
|
242
|
+
* } catch (e) {
|
|
243
|
+
* if (e instanceof RealtimeRequestError && e.code === 'SEND_NOT_ALLOWED') hideSendButton()
|
|
244
|
+
* }
|
|
245
|
+
* ```
|
|
246
|
+
*/
|
|
247
|
+
declare class RealtimeRequestError extends Error {
|
|
248
|
+
/** 서버 오류 코드. 분기 기준은 이 필드다. 서버가 코드를 보내지 않으면 `"unknown"`. */
|
|
249
|
+
code: string;
|
|
250
|
+
/** 요청한 카테고리 (있으면). */
|
|
251
|
+
category?: string;
|
|
252
|
+
constructor(init: {
|
|
253
|
+
code?: string;
|
|
254
|
+
message?: string;
|
|
255
|
+
category?: string;
|
|
209
256
|
});
|
|
210
257
|
/** `JSON.stringify(err)` 가 `{}` 가 되지 않도록 한다 (ApiError.toJSON 참조). */
|
|
211
258
|
toJSON(): Record<string, unknown>;
|
|
@@ -548,6 +595,21 @@ declare class HttpClient {
|
|
|
548
595
|
* 일은 없어야 한다.
|
|
549
596
|
*/
|
|
550
597
|
private learnDirectOrigin;
|
|
598
|
+
/**
|
|
599
|
+
* 광고된 direct 원본을 검증해 받아들인다. 응답 헤더(learnDirectOrigin)와 edge-hints 본문
|
|
600
|
+
* (primeEdgeHints)이 같은 검증을 거친다.
|
|
601
|
+
*/
|
|
602
|
+
private adoptDirectBases;
|
|
603
|
+
/**
|
|
604
|
+
* realtime 첫 연결 전에 저지연 direct 원본 힌트를 묻는다 (`GET /v1/public/edge-hints`, 6.6.0+).
|
|
605
|
+
*
|
|
606
|
+
* **커스텀 헤더 없는 단순 GET** 이다. `X-Public-Key` 같은 헤더가 붙으면 브라우저가 CORS 사전 요청을
|
|
607
|
+
* 먼저 보내 Cloudflare 를 두 번 왕복하고, 앱의 "로컬 개발 origin 허용" 이 꺼진 localhost 페이지에서는
|
|
608
|
+
* 키 기반 opt-in 에 막혀 브라우저만 direct 를 못 썼다(Node 는 썼다 — platform-issue 01a15e24).
|
|
609
|
+
* 서버는 이 경로를 키 없이 열어 두고 같은 값을 본문으로도 준다. 본문을 읽으므로 CORS
|
|
610
|
+
* Expose-Headers 에도 기대지 않는다. 실패는 조용히 무시한다 — direct 는 최적화일 뿐이다.
|
|
611
|
+
*/
|
|
612
|
+
primeEdgeHints(timeoutMs: number): Promise<void>;
|
|
551
613
|
/**
|
|
552
614
|
* SDK 인증 헤더를 **주입하지 않는** raw fetch. 저지연 원본 선택과 폴백만 얹는다.
|
|
553
615
|
*
|
|
@@ -7890,12 +7952,28 @@ interface SubscribeOptions {
|
|
|
7890
7952
|
/** 히스토리 로드 개수 (persist=true인 카테고리만) */
|
|
7891
7953
|
historyLimit?: number;
|
|
7892
7954
|
}
|
|
7955
|
+
/**
|
|
7956
|
+
* 카테고리 발행 정책 (6.6.0+). 콘솔이나 API 로 카테고리에 설정한다.
|
|
7957
|
+
* - `open`: 누가 보내든 구독자 모두가 받는다 (기본, 6.6.0 이전과 같다).
|
|
7958
|
+
* - `upstream`: 방송인의 메시지는 모두에게, 방송인이 아닌 구독자의 메시지는 방송인에게만 간다
|
|
7959
|
+
* (관객 반응, 질문, 투표). 방송인이 아닌 구독자의 메시지는 히스토리에 저장되지 않는다.
|
|
7960
|
+
* - `publishers_only`: 방송인만 보낼 수 있다. 나머지는 받기만 한다 (보내면 `SEND_NOT_ALLOWED`).
|
|
7961
|
+
*/
|
|
7962
|
+
type RealtimeSendPolicy = "open" | "upstream" | "publishers_only";
|
|
7893
7963
|
/** 카테고리 정보 */
|
|
7894
7964
|
interface CategoryInfo {
|
|
7895
7965
|
category: string;
|
|
7896
7966
|
persist: boolean;
|
|
7897
7967
|
historyCount: number;
|
|
7898
7968
|
readReceipt: boolean;
|
|
7969
|
+
/**
|
|
7970
|
+
* 이 연결이 이 카테고리의 방송인인지 (6.6.0+). 카테고리 `publisher_roles` 의 역할을 가진
|
|
7971
|
+
* **로그인 멤버(accessToken) 연결**만 방송인이다 — 공개 키(익명) 연결은 항상 `false`.
|
|
7972
|
+
* 구독할 때 정해지므로 역할이나 카테고리 설정이 바뀌면 다시 구독해야 반영된다.
|
|
7973
|
+
*/
|
|
7974
|
+
isPublisher: boolean;
|
|
7975
|
+
/** 카테고리 발행 정책 (6.6.0+). 구버전 서버는 `open`. */
|
|
7976
|
+
sendPolicy: RealtimeSendPolicy;
|
|
7899
7977
|
}
|
|
7900
7978
|
/** 메시지 데이터 */
|
|
7901
7979
|
interface RealtimeMessage<T = unknown> {
|
|
@@ -7904,6 +7982,11 @@ interface RealtimeMessage<T = unknown> {
|
|
|
7904
7982
|
from?: string;
|
|
7905
7983
|
data: T;
|
|
7906
7984
|
sentAt: number;
|
|
7985
|
+
/**
|
|
7986
|
+
* 보낸 연결이 이 카테고리의 방송인이라는 **서버 보증** (6.6.0+). `data` 안의 값과 달리 클라이언트가
|
|
7987
|
+
* 위조할 수 없다 — 방송인 메시지만 골라 처리할 때 이 값으로 가린다. 히스토리 메시지에는 없다.
|
|
7988
|
+
*/
|
|
7989
|
+
fromPublisher?: boolean;
|
|
7907
7990
|
}
|
|
7908
7991
|
/** 히스토리 응답 */
|
|
7909
7992
|
interface HistoryResponse<T = unknown> {
|
|
@@ -7951,6 +8034,12 @@ type StateChangeHandler = (state: ConnectionState) => void;
|
|
|
7951
8034
|
interface SendOptions {
|
|
7952
8035
|
/** true면 발신자도 메시지를 받음 (기본값: true) */
|
|
7953
8036
|
includeSelf?: boolean;
|
|
8037
|
+
/**
|
|
8038
|
+
* `'publishers'` 면 이 메시지는 카테고리의 방송인에게만 간다 (6.6.0+). 발행 정책이 `open` 인 카테고리에서
|
|
8039
|
+
* 채팅은 모두에게, 반응만 방송인에게 보내고 싶을 때 쓴다. 카테고리에 방송인 역할(`publisher_roles`)이
|
|
8040
|
+
* 없으면 받을 사람이 없어 `INVALID_MESSAGE` 로 거부된다. 방송인에게만 가는 메시지는 히스토리에 저장되지 않는다.
|
|
8041
|
+
*/
|
|
8042
|
+
to?: "publishers";
|
|
7954
8043
|
}
|
|
7955
8044
|
/** 구독 객체 */
|
|
7956
8045
|
interface Subscription {
|
|
@@ -8084,6 +8173,8 @@ interface SubscribedData {
|
|
|
8084
8173
|
persist: boolean;
|
|
8085
8174
|
history_count: number;
|
|
8086
8175
|
read_receipt: boolean;
|
|
8176
|
+
publisher?: boolean;
|
|
8177
|
+
send_policy?: string;
|
|
8087
8178
|
}
|
|
8088
8179
|
/** 프레전스 상태 */
|
|
8089
8180
|
type PresenceStatus = "online" | "away" | "busy" | "offline";
|
|
@@ -8167,6 +8258,18 @@ declare class RealtimeAPI {
|
|
|
8167
8258
|
private pendingRestore;
|
|
8168
8259
|
/** 첫 연결 전에 direct 원본 힌트를 한 번 물었는지 (primeDirectRealtime). */
|
|
8169
8260
|
private directRealtimePrimed;
|
|
8261
|
+
/** disconnect() 마다 늘린다 — connect() 의 재시도 대기가 그 사이 취소됐는지 알아보는 데 쓴다. */
|
|
8262
|
+
private connectGeneration;
|
|
8263
|
+
/**
|
|
8264
|
+
* connect() 가 첫 연결을 시도하는 중인지. 이때의 핸드셰이크 실패는 connect() 가 직접 다시 시도하거나
|
|
8265
|
+
* 폴백하므로, onclose 가 백그라운드 재연결 체인(handleDisconnect)을 따로 시작하면 안 된다 — 두 경로가
|
|
8266
|
+
* 동시에 연결을 열게 된다.
|
|
8267
|
+
*/
|
|
8268
|
+
private initialConnecting;
|
|
8269
|
+
/** 다음 재연결 대기의 하한(ms) — 서버가 알려 준 retry_after_ms. handleDisconnect 가 한 번 쓰고 비운다. */
|
|
8270
|
+
private reconnectFloorMs;
|
|
8271
|
+
/** connect() 의 재시도 대기를 끝내는 함수 — disconnect() 가 기다림 없이 바로 취소하게 한다. */
|
|
8272
|
+
private cancelConnectWait;
|
|
8170
8273
|
private pendingRequests;
|
|
8171
8274
|
private subscriptions;
|
|
8172
8275
|
private streamSessions;
|
|
@@ -8462,6 +8565,17 @@ declare class RealtimeAPI {
|
|
|
8462
8565
|
* 세션당 한 번만 묻는다.
|
|
8463
8566
|
*/
|
|
8464
8567
|
private primeDirectRealtime;
|
|
8568
|
+
/**
|
|
8569
|
+
* 첫 연결을 연결 제한 시간(`timeout`) 안에서 다시 시도한다 (6.6.0+, platform-issue 01a15e24).
|
|
8570
|
+
*
|
|
8571
|
+
* - 서버가 재시도 시각을 알려 준 거부(`retryAfterMs`, 예: 한 IP 에서 연결이 몰린 `rate_limited`):
|
|
8572
|
+
* 그 시각에 지터를 더해 다시 붙는다. 공연 시작처럼 한꺼번에 들어올 때 앱이 재시도를 짜지 않아도 된다.
|
|
8573
|
+
* - 이유 없는 핸드셰이크 실패: 두 번까지 백오프 후 다시 한다. 네트워크가 WebSocket 을 실제로 막으면
|
|
8574
|
+
* 매번 실패하고, 앞단의 일시 거부는 다시 하면 붙는다 — 한 번 실패로 SSE 폴백하던 것이 연결 속도
|
|
8575
|
+
* 제한을 "네트워크 차단" 으로 오진한 원인이었다.
|
|
8576
|
+
* - 그 밖의 거부(자격증명, 동시접속 한도 등)와 시간 초과는 바로 던진다.
|
|
8577
|
+
*/
|
|
8578
|
+
private connectWithRetry;
|
|
8465
8579
|
private doConnect;
|
|
8466
8580
|
private log;
|
|
8467
8581
|
/**
|
|
@@ -11841,4 +11955,4 @@ declare class ConnectBase {
|
|
|
11841
11955
|
updateConfig(config: Partial<ConnectBaseConfig>): void;
|
|
11842
11956
|
}
|
|
11843
11957
|
|
|
11844
|
-
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 ChangePlanPreview, type ChangePlanRequest, type Channel, type ChannelMembership, type ChannelStats, 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 CreateCheckoutSessionRequest, type CreateCheckoutSessionResponse, 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 CreateSubscriptionRequest, type CreateTableRequest, 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 PreparePaymentRequest, type PreparePaymentResponse, 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 QualityProgress, type QueryOptions, type QueueInfoResponse, type QueueMessage, type ReadReceiptHandler, type ReadReceiptInfo, type RealtimeConnectOptions, RealtimeConnectionError, type RealtimeConnectionErrorCode, type RealtimeMessage, 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 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 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 WhereCondition, type WhereOperator, ConnectBase as default, detectInAppBrowser, escapeToExternalBrowser, isWebTransportSupported, toAIError, toCreateRoomWire };
|
|
11958
|
+
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 ChangePlanPreview, type ChangePlanRequest, type Channel, type ChannelMembership, type ChannelStats, 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 CreateCheckoutSessionRequest, type CreateCheckoutSessionResponse, 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 CreateSubscriptionRequest, type CreateTableRequest, 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 PreparePaymentRequest, type PreparePaymentResponse, 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 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 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 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 WhereCondition, type WhereOperator, ConnectBase as default, detectInAppBrowser, escapeToExternalBrowser, isWebTransportSupported, toAIError, toCreateRoomWire };
|