connectbase-client 6.4.0 → 6.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +106 -0
- package/README.md +62 -0
- package/dist/cli.js +1 -1
- package/dist/connect-base.umd.js +5 -5
- package/dist/index.d.mts +199 -1
- package/dist/index.d.ts +199 -1
- package/dist/index.js +410 -73
- package/dist/index.mjs +408 -73
- package/package.json +2 -1
package/dist/index.d.mts
CHANGED
|
@@ -152,6 +152,111 @@ declare class GameError extends Error {
|
|
|
152
152
|
/** `JSON.stringify(err)` 가 `{}` 가 되지 않도록 한다 (ApiError.toJSON 참조). */
|
|
153
153
|
toJSON(): Record<string, unknown>;
|
|
154
154
|
}
|
|
155
|
+
/**
|
|
156
|
+
* 실시간(WebSocket) 연결 거부 코드. socket-server 가 연결을 받지 않은 이유이고, 대응이 코드마다 다르다.
|
|
157
|
+
*
|
|
158
|
+
* | 코드 | 원인 | 재시도 | 권장 대응 |
|
|
159
|
+
* |------|------|--------|-----------|
|
|
160
|
+
* | `connection_limit_exceeded` | 플랜의 동시접속 한도 도달 | 가능 | 다른 연결이 끊기면 자리가 난다. `details.current`/`details.limit` 확인, 계속되면 플랜 상향 |
|
|
161
|
+
* | `quota_exceeded` | 월간 WebSocket 사용 시간 소진 | 불가 | 플랜 업그레이드 전까지 재시도 무의미 |
|
|
162
|
+
* | `server_at_capacity` | 서버 일시 혼잡 | 가능 | 잠시 후 재시도 |
|
|
163
|
+
* | `rate_limited` | 한 IP 에서 연결 시도가 너무 잦음 (6.6.0+) | 가능 | `connect()` 가 `retryAfterMs` 만큼(지터 포함) 기다렸다 스스로 다시 붙는다. 연결 제한 시간 안에 못 붙으면 이 에러를 던진다 |
|
|
164
|
+
* | `auth_unavailable` | 인증 서버 일시 장애 | 가능 | 잠시 후 재시도 |
|
|
165
|
+
* | `unauthorized` | 공개 키/액세스 토큰이 유효하지 않음 | 불가 | 키·토큰 확인 (토큰 만료면 새 토큰으로 `connect()`) |
|
|
166
|
+
* | `forbidden` | 다른 앱의 경로로 접속 | 불가 | 설정 확인 |
|
|
167
|
+
* | `invalid_user_id` | 공개 키 연결에 UUID 형식 `userId` | 불가 | `accessToken` 을 쓰거나 UUID 가 아닌 식별자 사용 |
|
|
168
|
+
* | `internal_error` | 서버 설정 오류 | 가능 | 잠시 후 재시도 |
|
|
169
|
+
*/
|
|
170
|
+
type RealtimeConnectionErrorCode = "connection_limit_exceeded" | "quota_exceeded" | "server_at_capacity" | "rate_limited" | "auth_unavailable" | "unauthorized" | "forbidden" | "invalid_user_id" | "internal_error" | (string & {});
|
|
171
|
+
/**
|
|
172
|
+
* 서버가 이유를 밝히고 실시간 연결을 거부했을 때 `cb.realtime.connect()` 가 던지는 에러.
|
|
173
|
+
*
|
|
174
|
+
* 브라우저의 WebSocket API 는 실패한 핸드셰이크의 HTTP 상태를 읽을 수 없어, 예전에는 동시접속
|
|
175
|
+
* 초과도 인증 실패도 "Connection timeout"/"Failed to connect" 로만 보였고 SDK 는 SSE 폴백으로
|
|
176
|
+
* 넘어가 subscribe/send 가 나중에야 이유 없이 실패했다(platform-issue 01a15d9d). 이제 서버가
|
|
177
|
+
* 연결을 받은 뒤 거부 이유를 보내고 4000+HTTP상태 close 코드(예: 4401, 4402, 4503)로 닫는다.
|
|
178
|
+
*
|
|
179
|
+
* - 거부는 SSE 폴백 대상이 아니다 — 네트워크는 정상이고 서버가 받지 않은 것이다.
|
|
180
|
+
* - 서버가 재시도 시각을 알려 준 거부(`retryAfterMs`, 예: `rate_limited`)는 `connect()` 가 연결 제한
|
|
181
|
+
* 시간(`timeout`) 안에서 그 시각에 지터를 더해 스스로 다시 시도한다. 그 밖의 거부는 바로 던진다.
|
|
182
|
+
* - 자동 재연결 중에 받은 거부는 `retryable` 이면 백오프로 계속 시도하고, 아니면 재연결을 멈추고
|
|
183
|
+
* `cb.realtime.onError` 로 이 에러를 알린다.
|
|
184
|
+
*
|
|
185
|
+
* ```ts
|
|
186
|
+
* try {
|
|
187
|
+
* await cb.realtime.connect()
|
|
188
|
+
* } catch (e) {
|
|
189
|
+
* if (e instanceof RealtimeConnectionError) {
|
|
190
|
+
* if (e.code === 'connection_limit_exceeded') showFull(e.details?.limit)
|
|
191
|
+
* else if (e.retryable) setTimeout(() => cb.realtime.connect(), 5000)
|
|
192
|
+
* else showConfigError(e.message)
|
|
193
|
+
* }
|
|
194
|
+
* }
|
|
195
|
+
* ```
|
|
196
|
+
*/
|
|
197
|
+
declare class RealtimeConnectionError extends Error {
|
|
198
|
+
/** 문서화된 거부 코드. 분기 기준은 항상 이 필드다. */
|
|
199
|
+
code: RealtimeConnectionErrorCode;
|
|
200
|
+
/** WebSocket close 코드 (4000 + 서버의 HTTP 상태). */
|
|
201
|
+
closeCode: number;
|
|
202
|
+
/** 시간차를 두고 다시 연결하면 성공할 수 있는지. */
|
|
203
|
+
retryable: boolean;
|
|
204
|
+
/** 거부 상세 (예: connection_limit_exceeded 의 `current`/`limit`, quota_exceeded 의 `quota`/`unit`). */
|
|
205
|
+
details?: Record<string, unknown>;
|
|
206
|
+
/**
|
|
207
|
+
* 서버가 알려 준, 다시 시도해도 되는 시각까지의 대기(ms). 언제 풀리는지 서버가 정확히 아는 거부
|
|
208
|
+
* (`rate_limited`)에만 있다.
|
|
209
|
+
*/
|
|
210
|
+
retryAfterMs?: number;
|
|
211
|
+
constructor(init: {
|
|
212
|
+
code?: string;
|
|
213
|
+
message?: string;
|
|
214
|
+
closeCode: number;
|
|
215
|
+
retryable?: boolean;
|
|
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;
|
|
256
|
+
});
|
|
257
|
+
/** `JSON.stringify(err)` 가 `{}` 가 되지 않도록 한다 (ApiError.toJSON 참조). */
|
|
258
|
+
toJSON(): Record<string, unknown>;
|
|
259
|
+
}
|
|
155
260
|
|
|
156
261
|
interface AbortOptions {
|
|
157
262
|
timeout?: number;
|
|
@@ -490,6 +595,21 @@ declare class HttpClient {
|
|
|
490
595
|
* 일은 없어야 한다.
|
|
491
596
|
*/
|
|
492
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>;
|
|
493
613
|
/**
|
|
494
614
|
* SDK 인증 헤더를 **주입하지 않는** raw fetch. 저지연 원본 선택과 폴백만 얹는다.
|
|
495
615
|
*
|
|
@@ -7832,12 +7952,28 @@ interface SubscribeOptions {
|
|
|
7832
7952
|
/** 히스토리 로드 개수 (persist=true인 카테고리만) */
|
|
7833
7953
|
historyLimit?: number;
|
|
7834
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";
|
|
7835
7963
|
/** 카테고리 정보 */
|
|
7836
7964
|
interface CategoryInfo {
|
|
7837
7965
|
category: string;
|
|
7838
7966
|
persist: boolean;
|
|
7839
7967
|
historyCount: number;
|
|
7840
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;
|
|
7841
7977
|
}
|
|
7842
7978
|
/** 메시지 데이터 */
|
|
7843
7979
|
interface RealtimeMessage<T = unknown> {
|
|
@@ -7846,6 +7982,11 @@ interface RealtimeMessage<T = unknown> {
|
|
|
7846
7982
|
from?: string;
|
|
7847
7983
|
data: T;
|
|
7848
7984
|
sentAt: number;
|
|
7985
|
+
/**
|
|
7986
|
+
* 보낸 연결이 이 카테고리의 방송인이라는 **서버 보증** (6.6.0+). `data` 안의 값과 달리 클라이언트가
|
|
7987
|
+
* 위조할 수 없다 — 방송인 메시지만 골라 처리할 때 이 값으로 가린다. 히스토리 메시지에는 없다.
|
|
7988
|
+
*/
|
|
7989
|
+
fromPublisher?: boolean;
|
|
7849
7990
|
}
|
|
7850
7991
|
/** 히스토리 응답 */
|
|
7851
7992
|
interface HistoryResponse<T = unknown> {
|
|
@@ -7893,6 +8034,12 @@ type StateChangeHandler = (state: ConnectionState) => void;
|
|
|
7893
8034
|
interface SendOptions {
|
|
7894
8035
|
/** true면 발신자도 메시지를 받음 (기본값: true) */
|
|
7895
8036
|
includeSelf?: boolean;
|
|
8037
|
+
/**
|
|
8038
|
+
* `'publishers'` 면 이 메시지는 카테고리의 방송인에게만 간다 (6.6.0+). 발행 정책이 `open` 인 카테고리에서
|
|
8039
|
+
* 채팅은 모두에게, 반응만 방송인에게 보내고 싶을 때 쓴다. 카테고리에 방송인 역할(`publisher_roles`)이
|
|
8040
|
+
* 없으면 받을 사람이 없어 `INVALID_MESSAGE` 로 거부된다. 방송인에게만 가는 메시지는 히스토리에 저장되지 않는다.
|
|
8041
|
+
*/
|
|
8042
|
+
to?: "publishers";
|
|
7896
8043
|
}
|
|
7897
8044
|
/** 구독 객체 */
|
|
7898
8045
|
interface Subscription {
|
|
@@ -8026,6 +8173,8 @@ interface SubscribedData {
|
|
|
8026
8173
|
persist: boolean;
|
|
8027
8174
|
history_count: number;
|
|
8028
8175
|
read_receipt: boolean;
|
|
8176
|
+
publisher?: boolean;
|
|
8177
|
+
send_policy?: string;
|
|
8029
8178
|
}
|
|
8030
8179
|
/** 프레전스 상태 */
|
|
8031
8180
|
type PresenceStatus = "online" | "away" | "busy" | "offline";
|
|
@@ -8099,6 +8248,28 @@ declare class RealtimeAPI {
|
|
|
8099
8248
|
get transport(): "ws" | "sse" | null;
|
|
8100
8249
|
private options;
|
|
8101
8250
|
private retryCount;
|
|
8251
|
+
/**
|
|
8252
|
+
* 재연결 뒤 복구할 구독 상태. 연결이 끊긴 첫 순간에 떠 두고, 재연결이 성공해 복구한 뒤 비운다.
|
|
8253
|
+
*
|
|
8254
|
+
* 재연결 시도가 실패할 때마다 onclose → handleDisconnect 가 다시 불린다. 예전에는 그때마다 구독 맵을
|
|
8255
|
+
* 새로 떴는데, 첫 끊김에서 이미 비워진 맵이라 빈 스냅샷으로 덮였다 — 첫 재연결 시도가 실패하면
|
|
8256
|
+
* (서버 롤링 재시작 등) 재연결에 성공해도 구독이 하나도 복구되지 않았다.
|
|
8257
|
+
*/
|
|
8258
|
+
private pendingRestore;
|
|
8259
|
+
/** 첫 연결 전에 direct 원본 힌트를 한 번 물었는지 (primeDirectRealtime). */
|
|
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;
|
|
8102
8273
|
private pendingRequests;
|
|
8103
8274
|
private subscriptions;
|
|
8104
8275
|
private streamSessions;
|
|
@@ -8383,6 +8554,28 @@ declare class RealtimeAPI {
|
|
|
8383
8554
|
* ```
|
|
8384
8555
|
*/
|
|
8385
8556
|
onReadReceipt(category: string, handler: ReadReceiptHandler): () => void;
|
|
8557
|
+
/**
|
|
8558
|
+
* direct(저지연) 원본을 아직 모르면 첫 연결 전에 한 번 묻는다 — `GET /v1/public/edge-hints`.
|
|
8559
|
+
*
|
|
8560
|
+
* direct 원본은 core-server 응답 헤더(`X-CB-Realtime-Direct-Base`)로만 배운다. realtime 만 쓰는
|
|
8561
|
+
* 페이지는 WS 를 열기 전에 REST 를 부르지 않아 배울 기회가 없었고, 첫 연결이 늘 Cloudflare 를 타
|
|
8562
|
+
* 한국 사용자는 미국(LAX)을 거친 ~270ms 로 붙었다(platform-issue 01a15d9d 의 273ms). 응답 헤더는
|
|
8563
|
+
* HttpClient 가 평소처럼 학습한다. 광고 대상이 아니면(해외, 킬 스위치) 빈 응답이라 원래 소켓
|
|
8564
|
+
* URL 로 간다. 실패하거나 느리면(1.5초) 그냥 넘어간다 — 최적화일 뿐 연결의 전제가 아니다.
|
|
8565
|
+
* 세션당 한 번만 묻는다.
|
|
8566
|
+
*/
|
|
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;
|
|
8386
8579
|
private doConnect;
|
|
8387
8580
|
private log;
|
|
8388
8581
|
/**
|
|
@@ -8393,6 +8586,11 @@ declare class RealtimeAPI {
|
|
|
8393
8586
|
private logError;
|
|
8394
8587
|
private handleServerMessage;
|
|
8395
8588
|
private handleDisconnect;
|
|
8589
|
+
/**
|
|
8590
|
+
* 재연결을 멈추고 앱에 알린다 — 서버가 재시도해도 소용없는 이유(자격증명, 할당량)로 거부했거나
|
|
8591
|
+
* 재시도할 수 있는 거부가 maxRetries 를 다 썼다.
|
|
8592
|
+
*/
|
|
8593
|
+
private failRealtime;
|
|
8396
8594
|
/**
|
|
8397
8595
|
* 이전 구독 상태를 복구합니다.
|
|
8398
8596
|
* 재연결 성공 후 호출됩니다.
|
|
@@ -11757,4 +11955,4 @@ declare class ConnectBase {
|
|
|
11757
11955
|
updateConfig(config: Partial<ConnectBaseConfig>): void;
|
|
11758
11956
|
}
|
|
11759
11957
|
|
|
11760
|
-
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, 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
|
@@ -152,6 +152,111 @@ declare class GameError extends Error {
|
|
|
152
152
|
/** `JSON.stringify(err)` 가 `{}` 가 되지 않도록 한다 (ApiError.toJSON 참조). */
|
|
153
153
|
toJSON(): Record<string, unknown>;
|
|
154
154
|
}
|
|
155
|
+
/**
|
|
156
|
+
* 실시간(WebSocket) 연결 거부 코드. socket-server 가 연결을 받지 않은 이유이고, 대응이 코드마다 다르다.
|
|
157
|
+
*
|
|
158
|
+
* | 코드 | 원인 | 재시도 | 권장 대응 |
|
|
159
|
+
* |------|------|--------|-----------|
|
|
160
|
+
* | `connection_limit_exceeded` | 플랜의 동시접속 한도 도달 | 가능 | 다른 연결이 끊기면 자리가 난다. `details.current`/`details.limit` 확인, 계속되면 플랜 상향 |
|
|
161
|
+
* | `quota_exceeded` | 월간 WebSocket 사용 시간 소진 | 불가 | 플랜 업그레이드 전까지 재시도 무의미 |
|
|
162
|
+
* | `server_at_capacity` | 서버 일시 혼잡 | 가능 | 잠시 후 재시도 |
|
|
163
|
+
* | `rate_limited` | 한 IP 에서 연결 시도가 너무 잦음 (6.6.0+) | 가능 | `connect()` 가 `retryAfterMs` 만큼(지터 포함) 기다렸다 스스로 다시 붙는다. 연결 제한 시간 안에 못 붙으면 이 에러를 던진다 |
|
|
164
|
+
* | `auth_unavailable` | 인증 서버 일시 장애 | 가능 | 잠시 후 재시도 |
|
|
165
|
+
* | `unauthorized` | 공개 키/액세스 토큰이 유효하지 않음 | 불가 | 키·토큰 확인 (토큰 만료면 새 토큰으로 `connect()`) |
|
|
166
|
+
* | `forbidden` | 다른 앱의 경로로 접속 | 불가 | 설정 확인 |
|
|
167
|
+
* | `invalid_user_id` | 공개 키 연결에 UUID 형식 `userId` | 불가 | `accessToken` 을 쓰거나 UUID 가 아닌 식별자 사용 |
|
|
168
|
+
* | `internal_error` | 서버 설정 오류 | 가능 | 잠시 후 재시도 |
|
|
169
|
+
*/
|
|
170
|
+
type RealtimeConnectionErrorCode = "connection_limit_exceeded" | "quota_exceeded" | "server_at_capacity" | "rate_limited" | "auth_unavailable" | "unauthorized" | "forbidden" | "invalid_user_id" | "internal_error" | (string & {});
|
|
171
|
+
/**
|
|
172
|
+
* 서버가 이유를 밝히고 실시간 연결을 거부했을 때 `cb.realtime.connect()` 가 던지는 에러.
|
|
173
|
+
*
|
|
174
|
+
* 브라우저의 WebSocket API 는 실패한 핸드셰이크의 HTTP 상태를 읽을 수 없어, 예전에는 동시접속
|
|
175
|
+
* 초과도 인증 실패도 "Connection timeout"/"Failed to connect" 로만 보였고 SDK 는 SSE 폴백으로
|
|
176
|
+
* 넘어가 subscribe/send 가 나중에야 이유 없이 실패했다(platform-issue 01a15d9d). 이제 서버가
|
|
177
|
+
* 연결을 받은 뒤 거부 이유를 보내고 4000+HTTP상태 close 코드(예: 4401, 4402, 4503)로 닫는다.
|
|
178
|
+
*
|
|
179
|
+
* - 거부는 SSE 폴백 대상이 아니다 — 네트워크는 정상이고 서버가 받지 않은 것이다.
|
|
180
|
+
* - 서버가 재시도 시각을 알려 준 거부(`retryAfterMs`, 예: `rate_limited`)는 `connect()` 가 연결 제한
|
|
181
|
+
* 시간(`timeout`) 안에서 그 시각에 지터를 더해 스스로 다시 시도한다. 그 밖의 거부는 바로 던진다.
|
|
182
|
+
* - 자동 재연결 중에 받은 거부는 `retryable` 이면 백오프로 계속 시도하고, 아니면 재연결을 멈추고
|
|
183
|
+
* `cb.realtime.onError` 로 이 에러를 알린다.
|
|
184
|
+
*
|
|
185
|
+
* ```ts
|
|
186
|
+
* try {
|
|
187
|
+
* await cb.realtime.connect()
|
|
188
|
+
* } catch (e) {
|
|
189
|
+
* if (e instanceof RealtimeConnectionError) {
|
|
190
|
+
* if (e.code === 'connection_limit_exceeded') showFull(e.details?.limit)
|
|
191
|
+
* else if (e.retryable) setTimeout(() => cb.realtime.connect(), 5000)
|
|
192
|
+
* else showConfigError(e.message)
|
|
193
|
+
* }
|
|
194
|
+
* }
|
|
195
|
+
* ```
|
|
196
|
+
*/
|
|
197
|
+
declare class RealtimeConnectionError extends Error {
|
|
198
|
+
/** 문서화된 거부 코드. 분기 기준은 항상 이 필드다. */
|
|
199
|
+
code: RealtimeConnectionErrorCode;
|
|
200
|
+
/** WebSocket close 코드 (4000 + 서버의 HTTP 상태). */
|
|
201
|
+
closeCode: number;
|
|
202
|
+
/** 시간차를 두고 다시 연결하면 성공할 수 있는지. */
|
|
203
|
+
retryable: boolean;
|
|
204
|
+
/** 거부 상세 (예: connection_limit_exceeded 의 `current`/`limit`, quota_exceeded 의 `quota`/`unit`). */
|
|
205
|
+
details?: Record<string, unknown>;
|
|
206
|
+
/**
|
|
207
|
+
* 서버가 알려 준, 다시 시도해도 되는 시각까지의 대기(ms). 언제 풀리는지 서버가 정확히 아는 거부
|
|
208
|
+
* (`rate_limited`)에만 있다.
|
|
209
|
+
*/
|
|
210
|
+
retryAfterMs?: number;
|
|
211
|
+
constructor(init: {
|
|
212
|
+
code?: string;
|
|
213
|
+
message?: string;
|
|
214
|
+
closeCode: number;
|
|
215
|
+
retryable?: boolean;
|
|
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;
|
|
256
|
+
});
|
|
257
|
+
/** `JSON.stringify(err)` 가 `{}` 가 되지 않도록 한다 (ApiError.toJSON 참조). */
|
|
258
|
+
toJSON(): Record<string, unknown>;
|
|
259
|
+
}
|
|
155
260
|
|
|
156
261
|
interface AbortOptions {
|
|
157
262
|
timeout?: number;
|
|
@@ -490,6 +595,21 @@ declare class HttpClient {
|
|
|
490
595
|
* 일은 없어야 한다.
|
|
491
596
|
*/
|
|
492
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>;
|
|
493
613
|
/**
|
|
494
614
|
* SDK 인증 헤더를 **주입하지 않는** raw fetch. 저지연 원본 선택과 폴백만 얹는다.
|
|
495
615
|
*
|
|
@@ -7832,12 +7952,28 @@ interface SubscribeOptions {
|
|
|
7832
7952
|
/** 히스토리 로드 개수 (persist=true인 카테고리만) */
|
|
7833
7953
|
historyLimit?: number;
|
|
7834
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";
|
|
7835
7963
|
/** 카테고리 정보 */
|
|
7836
7964
|
interface CategoryInfo {
|
|
7837
7965
|
category: string;
|
|
7838
7966
|
persist: boolean;
|
|
7839
7967
|
historyCount: number;
|
|
7840
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;
|
|
7841
7977
|
}
|
|
7842
7978
|
/** 메시지 데이터 */
|
|
7843
7979
|
interface RealtimeMessage<T = unknown> {
|
|
@@ -7846,6 +7982,11 @@ interface RealtimeMessage<T = unknown> {
|
|
|
7846
7982
|
from?: string;
|
|
7847
7983
|
data: T;
|
|
7848
7984
|
sentAt: number;
|
|
7985
|
+
/**
|
|
7986
|
+
* 보낸 연결이 이 카테고리의 방송인이라는 **서버 보증** (6.6.0+). `data` 안의 값과 달리 클라이언트가
|
|
7987
|
+
* 위조할 수 없다 — 방송인 메시지만 골라 처리할 때 이 값으로 가린다. 히스토리 메시지에는 없다.
|
|
7988
|
+
*/
|
|
7989
|
+
fromPublisher?: boolean;
|
|
7849
7990
|
}
|
|
7850
7991
|
/** 히스토리 응답 */
|
|
7851
7992
|
interface HistoryResponse<T = unknown> {
|
|
@@ -7893,6 +8034,12 @@ type StateChangeHandler = (state: ConnectionState) => void;
|
|
|
7893
8034
|
interface SendOptions {
|
|
7894
8035
|
/** true면 발신자도 메시지를 받음 (기본값: true) */
|
|
7895
8036
|
includeSelf?: boolean;
|
|
8037
|
+
/**
|
|
8038
|
+
* `'publishers'` 면 이 메시지는 카테고리의 방송인에게만 간다 (6.6.0+). 발행 정책이 `open` 인 카테고리에서
|
|
8039
|
+
* 채팅은 모두에게, 반응만 방송인에게 보내고 싶을 때 쓴다. 카테고리에 방송인 역할(`publisher_roles`)이
|
|
8040
|
+
* 없으면 받을 사람이 없어 `INVALID_MESSAGE` 로 거부된다. 방송인에게만 가는 메시지는 히스토리에 저장되지 않는다.
|
|
8041
|
+
*/
|
|
8042
|
+
to?: "publishers";
|
|
7896
8043
|
}
|
|
7897
8044
|
/** 구독 객체 */
|
|
7898
8045
|
interface Subscription {
|
|
@@ -8026,6 +8173,8 @@ interface SubscribedData {
|
|
|
8026
8173
|
persist: boolean;
|
|
8027
8174
|
history_count: number;
|
|
8028
8175
|
read_receipt: boolean;
|
|
8176
|
+
publisher?: boolean;
|
|
8177
|
+
send_policy?: string;
|
|
8029
8178
|
}
|
|
8030
8179
|
/** 프레전스 상태 */
|
|
8031
8180
|
type PresenceStatus = "online" | "away" | "busy" | "offline";
|
|
@@ -8099,6 +8248,28 @@ declare class RealtimeAPI {
|
|
|
8099
8248
|
get transport(): "ws" | "sse" | null;
|
|
8100
8249
|
private options;
|
|
8101
8250
|
private retryCount;
|
|
8251
|
+
/**
|
|
8252
|
+
* 재연결 뒤 복구할 구독 상태. 연결이 끊긴 첫 순간에 떠 두고, 재연결이 성공해 복구한 뒤 비운다.
|
|
8253
|
+
*
|
|
8254
|
+
* 재연결 시도가 실패할 때마다 onclose → handleDisconnect 가 다시 불린다. 예전에는 그때마다 구독 맵을
|
|
8255
|
+
* 새로 떴는데, 첫 끊김에서 이미 비워진 맵이라 빈 스냅샷으로 덮였다 — 첫 재연결 시도가 실패하면
|
|
8256
|
+
* (서버 롤링 재시작 등) 재연결에 성공해도 구독이 하나도 복구되지 않았다.
|
|
8257
|
+
*/
|
|
8258
|
+
private pendingRestore;
|
|
8259
|
+
/** 첫 연결 전에 direct 원본 힌트를 한 번 물었는지 (primeDirectRealtime). */
|
|
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;
|
|
8102
8273
|
private pendingRequests;
|
|
8103
8274
|
private subscriptions;
|
|
8104
8275
|
private streamSessions;
|
|
@@ -8383,6 +8554,28 @@ declare class RealtimeAPI {
|
|
|
8383
8554
|
* ```
|
|
8384
8555
|
*/
|
|
8385
8556
|
onReadReceipt(category: string, handler: ReadReceiptHandler): () => void;
|
|
8557
|
+
/**
|
|
8558
|
+
* direct(저지연) 원본을 아직 모르면 첫 연결 전에 한 번 묻는다 — `GET /v1/public/edge-hints`.
|
|
8559
|
+
*
|
|
8560
|
+
* direct 원본은 core-server 응답 헤더(`X-CB-Realtime-Direct-Base`)로만 배운다. realtime 만 쓰는
|
|
8561
|
+
* 페이지는 WS 를 열기 전에 REST 를 부르지 않아 배울 기회가 없었고, 첫 연결이 늘 Cloudflare 를 타
|
|
8562
|
+
* 한국 사용자는 미국(LAX)을 거친 ~270ms 로 붙었다(platform-issue 01a15d9d 의 273ms). 응답 헤더는
|
|
8563
|
+
* HttpClient 가 평소처럼 학습한다. 광고 대상이 아니면(해외, 킬 스위치) 빈 응답이라 원래 소켓
|
|
8564
|
+
* URL 로 간다. 실패하거나 느리면(1.5초) 그냥 넘어간다 — 최적화일 뿐 연결의 전제가 아니다.
|
|
8565
|
+
* 세션당 한 번만 묻는다.
|
|
8566
|
+
*/
|
|
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;
|
|
8386
8579
|
private doConnect;
|
|
8387
8580
|
private log;
|
|
8388
8581
|
/**
|
|
@@ -8393,6 +8586,11 @@ declare class RealtimeAPI {
|
|
|
8393
8586
|
private logError;
|
|
8394
8587
|
private handleServerMessage;
|
|
8395
8588
|
private handleDisconnect;
|
|
8589
|
+
/**
|
|
8590
|
+
* 재연결을 멈추고 앱에 알린다 — 서버가 재시도해도 소용없는 이유(자격증명, 할당량)로 거부했거나
|
|
8591
|
+
* 재시도할 수 있는 거부가 maxRetries 를 다 썼다.
|
|
8592
|
+
*/
|
|
8593
|
+
private failRealtime;
|
|
8396
8594
|
/**
|
|
8397
8595
|
* 이전 구독 상태를 복구합니다.
|
|
8398
8596
|
* 재연결 성공 후 호출됩니다.
|
|
@@ -11757,4 +11955,4 @@ declare class ConnectBase {
|
|
|
11757
11955
|
updateConfig(config: Partial<ConnectBaseConfig>): void;
|
|
11758
11956
|
}
|
|
11759
11957
|
|
|
11760
|
-
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, 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 };
|