connectbase-client 4.4.1 → 5.0.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 +50 -0
- package/dist/connect-base.umd.js +5 -5
- package/dist/index.d.mts +114 -3
- package/dist/index.d.ts +114 -3
- package/dist/index.js +195 -56
- package/dist/index.mjs +193 -56
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -8,7 +8,95 @@ declare class ApiError extends Error {
|
|
|
8
8
|
code: string | undefined;
|
|
9
9
|
details: unknown | undefined;
|
|
10
10
|
constructor(statusCode: number, message: string, code?: string, details?: unknown);
|
|
11
|
+
/**
|
|
12
|
+
* `JSON.stringify(err)` 가 `{}` 로 찍히지 않게 한다.
|
|
13
|
+
*
|
|
14
|
+
* 표준 `Error` 는 message/stack 이 non-enumerable 이라 JSON 직렬화 시 빈 객체가
|
|
15
|
+
* 된다. 로그를 `JSON.stringify` 로 남기는 소비자에게는 "에러 정보가 아무것도 안
|
|
16
|
+
* 온다"로 보여, 실제로는 있는 정보까지 없는 것으로 오진하게 만든다
|
|
17
|
+
* (platform-issue 019fa21c).
|
|
18
|
+
*/
|
|
19
|
+
toJSON(): Record<string, unknown>;
|
|
11
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* AI 호출/스트리밍 실패의 문서화된 코드. 대응 방법이 코드마다 다르므로
|
|
23
|
+
* 소비자는 `error.code` 로 분기해야 한다.
|
|
24
|
+
*
|
|
25
|
+
* | 코드 | 원인 | 권장 대응 |
|
|
26
|
+
* |------|------|-----------|
|
|
27
|
+
* | `rate_limit_exceeded` | 호출 빈도/동시 스트림 한도 초과 | 호출을 줄이고 `retryAfter` 만큼 대기 후 재시도 |
|
|
28
|
+
* | `quota_exceeded` | 플랜 할당량 소진 | 업그레이드 전까지 재시도 무의미 |
|
|
29
|
+
* | `provider_timeout` | 업스트림 LLM 무응답 | 기다렸다 그대로 재시도 |
|
|
30
|
+
* | `service_unavailable` | 업스트림 연결 불가/과부하 | 기다렸다 그대로 재시도 |
|
|
31
|
+
* | `provider_error` | 프로바이더가 요청을 거부 | API 키·모델 유효성 확인 (재시도 무의미) |
|
|
32
|
+
* | `invalid_request` | 요청 형식 오류 | 재시도 금지 — 요청을 고쳐야 함 |
|
|
33
|
+
* | `config_error` | 앱 AI 설정(키/모델) 누락 | 콘솔에서 설정 |
|
|
34
|
+
* | `unauthorized` | 인증 필요 | 로그인 후 재시도 |
|
|
35
|
+
* | `stream_failed` | 그 외 스트림 처리 실패 | 재시도 가능 — `retryable` 확인 |
|
|
36
|
+
*/
|
|
37
|
+
type AIErrorCode = "rate_limit_exceeded" | "quota_exceeded" | "provider_timeout" | "service_unavailable" | "provider_error" | "invalid_request" | "config_error" | "unauthorized" | "stream_failed" | (string & {});
|
|
38
|
+
/**
|
|
39
|
+
* AIError 는 `cb.ai.chatStream` / `cb.realtime.stream` 실패를 소비자가 분기 가능한
|
|
40
|
+
* 형태로 surface 한다.
|
|
41
|
+
*
|
|
42
|
+
* 기존엔 모든 실패가 `new Error(message)` 였고 서버도 코드를 보내지 않아,
|
|
43
|
+
* `onError` 로 온 값을 `JSON.stringify` 하면 `{}` 였다. 그래서 "업스트림 다운(기다렸다
|
|
44
|
+
* 재시도)"과 "동시 스트림 한도 초과(호출을 줄여야 함)"를 구분할 수 없었다
|
|
45
|
+
* (platform-issue 019fa21c).
|
|
46
|
+
*
|
|
47
|
+
* ```ts
|
|
48
|
+
* await cb.realtime.stream(messages, {
|
|
49
|
+
* onToken: (t) => process.stdout.write(t),
|
|
50
|
+
* onError: (e) => {
|
|
51
|
+
* if (e.code === 'rate_limit_exceeded') backOff(e.retryAfter ?? 30)
|
|
52
|
+
* else if (e.retryable) scheduleRetry() // provider_timeout / service_unavailable
|
|
53
|
+
* else giveUp(e.message) // invalid_request / provider_error
|
|
54
|
+
* },
|
|
55
|
+
* })
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
declare class AIError extends Error {
|
|
59
|
+
/** 문서화된 에러 코드. 분기 기준은 항상 이 필드다. */
|
|
60
|
+
code: AIErrorCode;
|
|
61
|
+
/** 시간차를 두고 같은 요청을 재시도할 가치가 있는지. */
|
|
62
|
+
retryable: boolean;
|
|
63
|
+
/** 업스트림 HTTP 상태 코드 (알려진 경우에만). */
|
|
64
|
+
status?: number;
|
|
65
|
+
/** 실패를 일으킨 업스트림 프로바이더 (예: `openai_compatible`). */
|
|
66
|
+
provider?: string;
|
|
67
|
+
/** 실패를 일으킨 모델명. */
|
|
68
|
+
model?: string;
|
|
69
|
+
/** rate_limit_exceeded/quota_exceeded 에서 권장 대기 시간(초). */
|
|
70
|
+
retryAfter?: number;
|
|
71
|
+
/** 프로바이더가 준 하위 코드 (예: `max_tokens_exceeds_context`). 진단 보조용. */
|
|
72
|
+
detailCode?: string;
|
|
73
|
+
/** AI 스트리밍 세션 ID (실시간 스트림에서만). */
|
|
74
|
+
sessionId?: string;
|
|
75
|
+
constructor(init: {
|
|
76
|
+
code?: string;
|
|
77
|
+
message?: string;
|
|
78
|
+
retryable?: boolean;
|
|
79
|
+
status?: number;
|
|
80
|
+
provider?: string;
|
|
81
|
+
model?: string;
|
|
82
|
+
retryAfter?: number;
|
|
83
|
+
detailCode?: string;
|
|
84
|
+
sessionId?: string;
|
|
85
|
+
});
|
|
86
|
+
/** `JSON.stringify(err)` 가 `{}` 가 되지 않도록 한다 (ApiError.toJSON 참조). */
|
|
87
|
+
toJSON(): Record<string, unknown>;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* 서버가 보낸 에러 페이로드(WS `stream_error` data / SSE in-band 이벤트 /
|
|
91
|
+
* HTTP 에러 본문)를 AIError 로 정규화한다. 필드명은 snake_case(서버) 와
|
|
92
|
+
* camelCase(SDK 내부) 양쪽을 모두 수용한다.
|
|
93
|
+
*/
|
|
94
|
+
declare function toAIError(payload: unknown, fallback?: {
|
|
95
|
+
code?: string;
|
|
96
|
+
message?: string;
|
|
97
|
+
sessionId?: string;
|
|
98
|
+
status?: number;
|
|
99
|
+
}): AIError;
|
|
12
100
|
declare class AuthError extends Error {
|
|
13
101
|
constructor(message: string);
|
|
14
102
|
}
|
|
@@ -61,6 +149,8 @@ declare class GameError extends Error {
|
|
|
61
149
|
requested?: string;
|
|
62
150
|
available?: string[];
|
|
63
151
|
});
|
|
152
|
+
/** `JSON.stringify(err)` 가 `{}` 가 되지 않도록 한다 (ApiError.toJSON 참조). */
|
|
153
|
+
toJSON(): Record<string, unknown>;
|
|
64
154
|
}
|
|
65
155
|
|
|
66
156
|
interface AbortOptions {
|
|
@@ -526,7 +616,15 @@ interface AIChatStreamCallbacks {
|
|
|
526
616
|
*/
|
|
527
617
|
onSearching?: (progress: AgenticSearchProgress) => void;
|
|
528
618
|
onDone?: () => void;
|
|
529
|
-
|
|
619
|
+
/**
|
|
620
|
+
* 스트림 실패. `error.code` 로 대응을 분기한다 — `rate_limit_exceeded` 는
|
|
621
|
+
* 호출을 줄여야 하고, `provider_timeout`/`service_unavailable` 은 기다렸다
|
|
622
|
+
* 재시도하며, `invalid_request`/`provider_error` 는 재시도해도 계속 실패한다.
|
|
623
|
+
*
|
|
624
|
+
* 5.0.0 이전에는 `string` 이 전달되어 코드로 분기할 수 없었다
|
|
625
|
+
* (platform-issue 019fa21c). 문자열이 필요하면 `error.message` 를 쓴다.
|
|
626
|
+
*/
|
|
627
|
+
onError?: (error: AIError) => void;
|
|
530
628
|
/**
|
|
531
629
|
* `options.signal` 로 스트림을 취소(abort)했을 때 호출된다. 정상적인
|
|
532
630
|
* 사용자 취소이므로 `onError` 대신 본 콜백이 호출되며, `onDone` 은 호출되지
|
|
@@ -614,8 +712,15 @@ interface AIStreamChunk {
|
|
|
614
712
|
success?: boolean;
|
|
615
713
|
durationMs?: number;
|
|
616
714
|
searching?: AgenticSearchProgress;
|
|
715
|
+
/** 문서화된 에러 코드 (`provider_timeout` 등). AIError.code 가 된다. */
|
|
617
716
|
error?: string;
|
|
618
717
|
message?: string;
|
|
718
|
+
/** 프로바이더가 준 하위 코드 (`max_tokens_exceeds_context` 등). */
|
|
719
|
+
code?: string;
|
|
720
|
+
/** 실패를 일으킨 업스트림 프로바이더. */
|
|
721
|
+
provider?: string;
|
|
722
|
+
/** 실패를 일으킨 모델. */
|
|
723
|
+
model?: string;
|
|
619
724
|
}
|
|
620
725
|
|
|
621
726
|
/**
|
|
@@ -6399,7 +6504,13 @@ interface StreamDoneData {
|
|
|
6399
6504
|
/** AI 스트리밍 완료 콜백 */
|
|
6400
6505
|
type StreamDoneCallback = (result: StreamDoneData) => void;
|
|
6401
6506
|
/** AI 스트리밍 에러 콜백 */
|
|
6402
|
-
|
|
6507
|
+
/**
|
|
6508
|
+
* AI 스트리밍 실패 콜백. 전달되는 값은 `AIError` 로, `error.code` 로 대응을
|
|
6509
|
+
* 분기할 수 있다 (`provider_timeout`/`service_unavailable` = 기다렸다 재시도,
|
|
6510
|
+
* `rate_limit_exceeded` = 호출 감소, `invalid_request` = 재시도 금지).
|
|
6511
|
+
* 5.0.0 이전에는 코드 없는 `Error` 라 구분이 불가능했다 (platform-issue 019fa21c).
|
|
6512
|
+
*/
|
|
6513
|
+
type StreamErrorCallback = (error: AIError) => void;
|
|
6403
6514
|
/** AI 도구 호출 콜백 */
|
|
6404
6515
|
type StreamToolCallCallback = (toolName: string, args: Record<string, unknown>, index: number) => void;
|
|
6405
6516
|
/** AI 도구 실행 완료 콜백 */
|
|
@@ -9784,4 +9895,4 @@ declare class ConnectBase {
|
|
|
9784
9895
|
updateConfig(config: Partial<ConnectBaseConfig>): void;
|
|
9785
9896
|
}
|
|
9786
9897
|
|
|
9787
|
-
export { AIAPI, type AIChatRequest, type AIChatResponse, type AIChatStreamCallbacks, type AIChatStreamOptions, type AIMessage, type AISource, type AIStreamChunk, type AITool, type AIToolCall, type AIToolEvent, AUTH_MEMBER_ID_TOKEN, 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 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 CreateLobbyRequest, 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 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 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 MemberInfoResponse, 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 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 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 SaveDialogOptions, type SaveDialogResult, type ScriptDetailResponse, type ScriptListResponse, type ScriptMeta, 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 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 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 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, toCreateRoomWire };
|
|
9898
|
+
export { AIAPI, 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 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 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 CreateLobbyRequest, 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 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 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 MemberInfoResponse, 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 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 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 SaveDialogOptions, type SaveDialogResult, type ScriptDetailResponse, type ScriptListResponse, type ScriptMeta, 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 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 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 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
|
@@ -8,7 +8,95 @@ declare class ApiError extends Error {
|
|
|
8
8
|
code: string | undefined;
|
|
9
9
|
details: unknown | undefined;
|
|
10
10
|
constructor(statusCode: number, message: string, code?: string, details?: unknown);
|
|
11
|
+
/**
|
|
12
|
+
* `JSON.stringify(err)` 가 `{}` 로 찍히지 않게 한다.
|
|
13
|
+
*
|
|
14
|
+
* 표준 `Error` 는 message/stack 이 non-enumerable 이라 JSON 직렬화 시 빈 객체가
|
|
15
|
+
* 된다. 로그를 `JSON.stringify` 로 남기는 소비자에게는 "에러 정보가 아무것도 안
|
|
16
|
+
* 온다"로 보여, 실제로는 있는 정보까지 없는 것으로 오진하게 만든다
|
|
17
|
+
* (platform-issue 019fa21c).
|
|
18
|
+
*/
|
|
19
|
+
toJSON(): Record<string, unknown>;
|
|
11
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* AI 호출/스트리밍 실패의 문서화된 코드. 대응 방법이 코드마다 다르므로
|
|
23
|
+
* 소비자는 `error.code` 로 분기해야 한다.
|
|
24
|
+
*
|
|
25
|
+
* | 코드 | 원인 | 권장 대응 |
|
|
26
|
+
* |------|------|-----------|
|
|
27
|
+
* | `rate_limit_exceeded` | 호출 빈도/동시 스트림 한도 초과 | 호출을 줄이고 `retryAfter` 만큼 대기 후 재시도 |
|
|
28
|
+
* | `quota_exceeded` | 플랜 할당량 소진 | 업그레이드 전까지 재시도 무의미 |
|
|
29
|
+
* | `provider_timeout` | 업스트림 LLM 무응답 | 기다렸다 그대로 재시도 |
|
|
30
|
+
* | `service_unavailable` | 업스트림 연결 불가/과부하 | 기다렸다 그대로 재시도 |
|
|
31
|
+
* | `provider_error` | 프로바이더가 요청을 거부 | API 키·모델 유효성 확인 (재시도 무의미) |
|
|
32
|
+
* | `invalid_request` | 요청 형식 오류 | 재시도 금지 — 요청을 고쳐야 함 |
|
|
33
|
+
* | `config_error` | 앱 AI 설정(키/모델) 누락 | 콘솔에서 설정 |
|
|
34
|
+
* | `unauthorized` | 인증 필요 | 로그인 후 재시도 |
|
|
35
|
+
* | `stream_failed` | 그 외 스트림 처리 실패 | 재시도 가능 — `retryable` 확인 |
|
|
36
|
+
*/
|
|
37
|
+
type AIErrorCode = "rate_limit_exceeded" | "quota_exceeded" | "provider_timeout" | "service_unavailable" | "provider_error" | "invalid_request" | "config_error" | "unauthorized" | "stream_failed" | (string & {});
|
|
38
|
+
/**
|
|
39
|
+
* AIError 는 `cb.ai.chatStream` / `cb.realtime.stream` 실패를 소비자가 분기 가능한
|
|
40
|
+
* 형태로 surface 한다.
|
|
41
|
+
*
|
|
42
|
+
* 기존엔 모든 실패가 `new Error(message)` 였고 서버도 코드를 보내지 않아,
|
|
43
|
+
* `onError` 로 온 값을 `JSON.stringify` 하면 `{}` 였다. 그래서 "업스트림 다운(기다렸다
|
|
44
|
+
* 재시도)"과 "동시 스트림 한도 초과(호출을 줄여야 함)"를 구분할 수 없었다
|
|
45
|
+
* (platform-issue 019fa21c).
|
|
46
|
+
*
|
|
47
|
+
* ```ts
|
|
48
|
+
* await cb.realtime.stream(messages, {
|
|
49
|
+
* onToken: (t) => process.stdout.write(t),
|
|
50
|
+
* onError: (e) => {
|
|
51
|
+
* if (e.code === 'rate_limit_exceeded') backOff(e.retryAfter ?? 30)
|
|
52
|
+
* else if (e.retryable) scheduleRetry() // provider_timeout / service_unavailable
|
|
53
|
+
* else giveUp(e.message) // invalid_request / provider_error
|
|
54
|
+
* },
|
|
55
|
+
* })
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
declare class AIError extends Error {
|
|
59
|
+
/** 문서화된 에러 코드. 분기 기준은 항상 이 필드다. */
|
|
60
|
+
code: AIErrorCode;
|
|
61
|
+
/** 시간차를 두고 같은 요청을 재시도할 가치가 있는지. */
|
|
62
|
+
retryable: boolean;
|
|
63
|
+
/** 업스트림 HTTP 상태 코드 (알려진 경우에만). */
|
|
64
|
+
status?: number;
|
|
65
|
+
/** 실패를 일으킨 업스트림 프로바이더 (예: `openai_compatible`). */
|
|
66
|
+
provider?: string;
|
|
67
|
+
/** 실패를 일으킨 모델명. */
|
|
68
|
+
model?: string;
|
|
69
|
+
/** rate_limit_exceeded/quota_exceeded 에서 권장 대기 시간(초). */
|
|
70
|
+
retryAfter?: number;
|
|
71
|
+
/** 프로바이더가 준 하위 코드 (예: `max_tokens_exceeds_context`). 진단 보조용. */
|
|
72
|
+
detailCode?: string;
|
|
73
|
+
/** AI 스트리밍 세션 ID (실시간 스트림에서만). */
|
|
74
|
+
sessionId?: string;
|
|
75
|
+
constructor(init: {
|
|
76
|
+
code?: string;
|
|
77
|
+
message?: string;
|
|
78
|
+
retryable?: boolean;
|
|
79
|
+
status?: number;
|
|
80
|
+
provider?: string;
|
|
81
|
+
model?: string;
|
|
82
|
+
retryAfter?: number;
|
|
83
|
+
detailCode?: string;
|
|
84
|
+
sessionId?: string;
|
|
85
|
+
});
|
|
86
|
+
/** `JSON.stringify(err)` 가 `{}` 가 되지 않도록 한다 (ApiError.toJSON 참조). */
|
|
87
|
+
toJSON(): Record<string, unknown>;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* 서버가 보낸 에러 페이로드(WS `stream_error` data / SSE in-band 이벤트 /
|
|
91
|
+
* HTTP 에러 본문)를 AIError 로 정규화한다. 필드명은 snake_case(서버) 와
|
|
92
|
+
* camelCase(SDK 내부) 양쪽을 모두 수용한다.
|
|
93
|
+
*/
|
|
94
|
+
declare function toAIError(payload: unknown, fallback?: {
|
|
95
|
+
code?: string;
|
|
96
|
+
message?: string;
|
|
97
|
+
sessionId?: string;
|
|
98
|
+
status?: number;
|
|
99
|
+
}): AIError;
|
|
12
100
|
declare class AuthError extends Error {
|
|
13
101
|
constructor(message: string);
|
|
14
102
|
}
|
|
@@ -61,6 +149,8 @@ declare class GameError extends Error {
|
|
|
61
149
|
requested?: string;
|
|
62
150
|
available?: string[];
|
|
63
151
|
});
|
|
152
|
+
/** `JSON.stringify(err)` 가 `{}` 가 되지 않도록 한다 (ApiError.toJSON 참조). */
|
|
153
|
+
toJSON(): Record<string, unknown>;
|
|
64
154
|
}
|
|
65
155
|
|
|
66
156
|
interface AbortOptions {
|
|
@@ -526,7 +616,15 @@ interface AIChatStreamCallbacks {
|
|
|
526
616
|
*/
|
|
527
617
|
onSearching?: (progress: AgenticSearchProgress) => void;
|
|
528
618
|
onDone?: () => void;
|
|
529
|
-
|
|
619
|
+
/**
|
|
620
|
+
* 스트림 실패. `error.code` 로 대응을 분기한다 — `rate_limit_exceeded` 는
|
|
621
|
+
* 호출을 줄여야 하고, `provider_timeout`/`service_unavailable` 은 기다렸다
|
|
622
|
+
* 재시도하며, `invalid_request`/`provider_error` 는 재시도해도 계속 실패한다.
|
|
623
|
+
*
|
|
624
|
+
* 5.0.0 이전에는 `string` 이 전달되어 코드로 분기할 수 없었다
|
|
625
|
+
* (platform-issue 019fa21c). 문자열이 필요하면 `error.message` 를 쓴다.
|
|
626
|
+
*/
|
|
627
|
+
onError?: (error: AIError) => void;
|
|
530
628
|
/**
|
|
531
629
|
* `options.signal` 로 스트림을 취소(abort)했을 때 호출된다. 정상적인
|
|
532
630
|
* 사용자 취소이므로 `onError` 대신 본 콜백이 호출되며, `onDone` 은 호출되지
|
|
@@ -614,8 +712,15 @@ interface AIStreamChunk {
|
|
|
614
712
|
success?: boolean;
|
|
615
713
|
durationMs?: number;
|
|
616
714
|
searching?: AgenticSearchProgress;
|
|
715
|
+
/** 문서화된 에러 코드 (`provider_timeout` 등). AIError.code 가 된다. */
|
|
617
716
|
error?: string;
|
|
618
717
|
message?: string;
|
|
718
|
+
/** 프로바이더가 준 하위 코드 (`max_tokens_exceeds_context` 등). */
|
|
719
|
+
code?: string;
|
|
720
|
+
/** 실패를 일으킨 업스트림 프로바이더. */
|
|
721
|
+
provider?: string;
|
|
722
|
+
/** 실패를 일으킨 모델. */
|
|
723
|
+
model?: string;
|
|
619
724
|
}
|
|
620
725
|
|
|
621
726
|
/**
|
|
@@ -6399,7 +6504,13 @@ interface StreamDoneData {
|
|
|
6399
6504
|
/** AI 스트리밍 완료 콜백 */
|
|
6400
6505
|
type StreamDoneCallback = (result: StreamDoneData) => void;
|
|
6401
6506
|
/** AI 스트리밍 에러 콜백 */
|
|
6402
|
-
|
|
6507
|
+
/**
|
|
6508
|
+
* AI 스트리밍 실패 콜백. 전달되는 값은 `AIError` 로, `error.code` 로 대응을
|
|
6509
|
+
* 분기할 수 있다 (`provider_timeout`/`service_unavailable` = 기다렸다 재시도,
|
|
6510
|
+
* `rate_limit_exceeded` = 호출 감소, `invalid_request` = 재시도 금지).
|
|
6511
|
+
* 5.0.0 이전에는 코드 없는 `Error` 라 구분이 불가능했다 (platform-issue 019fa21c).
|
|
6512
|
+
*/
|
|
6513
|
+
type StreamErrorCallback = (error: AIError) => void;
|
|
6403
6514
|
/** AI 도구 호출 콜백 */
|
|
6404
6515
|
type StreamToolCallCallback = (toolName: string, args: Record<string, unknown>, index: number) => void;
|
|
6405
6516
|
/** AI 도구 실행 완료 콜백 */
|
|
@@ -9784,4 +9895,4 @@ declare class ConnectBase {
|
|
|
9784
9895
|
updateConfig(config: Partial<ConnectBaseConfig>): void;
|
|
9785
9896
|
}
|
|
9786
9897
|
|
|
9787
|
-
export { AIAPI, type AIChatRequest, type AIChatResponse, type AIChatStreamCallbacks, type AIChatStreamOptions, type AIMessage, type AISource, type AIStreamChunk, type AITool, type AIToolCall, type AIToolEvent, AUTH_MEMBER_ID_TOKEN, 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 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 CreateLobbyRequest, 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 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 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 MemberInfoResponse, 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 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 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 SaveDialogOptions, type SaveDialogResult, type ScriptDetailResponse, type ScriptListResponse, type ScriptMeta, 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 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 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 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, toCreateRoomWire };
|
|
9898
|
+
export { AIAPI, 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 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 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 CreateLobbyRequest, 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 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 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 MemberInfoResponse, 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 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 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 SaveDialogOptions, type SaveDialogResult, type ScriptDetailResponse, type ScriptListResponse, type ScriptMeta, 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 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 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 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 };
|