connectbase-client 3.11.0 → 3.12.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 +52 -0
- package/dist/connect-base.umd.js +4 -4
- package/dist/index.d.mts +135 -8
- package/dist/index.d.ts +135 -8
- package/dist/index.js +99 -3
- package/dist/index.mjs +99 -3
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1355,6 +1355,31 @@ interface TransactionWrite {
|
|
|
1355
1355
|
exists?: boolean;
|
|
1356
1356
|
};
|
|
1357
1357
|
}
|
|
1358
|
+
interface BatchOperationResult {
|
|
1359
|
+
index: number;
|
|
1360
|
+
success: boolean;
|
|
1361
|
+
doc_id?: string;
|
|
1362
|
+
error?: string;
|
|
1363
|
+
}
|
|
1364
|
+
interface BatchWriteResult {
|
|
1365
|
+
success: boolean;
|
|
1366
|
+
results: BatchOperationResult[];
|
|
1367
|
+
total_count?: number;
|
|
1368
|
+
success_count?: number;
|
|
1369
|
+
failed_count?: number;
|
|
1370
|
+
}
|
|
1371
|
+
interface TransactionWriteResult {
|
|
1372
|
+
index: number;
|
|
1373
|
+
doc_id?: string;
|
|
1374
|
+
success: boolean;
|
|
1375
|
+
}
|
|
1376
|
+
interface TransactionResult {
|
|
1377
|
+
success: boolean;
|
|
1378
|
+
transaction_id?: string;
|
|
1379
|
+
reads?: Record<string, unknown>;
|
|
1380
|
+
results?: TransactionWriteResult[];
|
|
1381
|
+
error?: string;
|
|
1382
|
+
}
|
|
1358
1383
|
interface TTLConfig {
|
|
1359
1384
|
table_name: string;
|
|
1360
1385
|
field: string;
|
|
@@ -1811,16 +1836,18 @@ declare class DatabaseAPI {
|
|
|
1811
1836
|
}): Promise<GeoResponse>;
|
|
1812
1837
|
/**
|
|
1813
1838
|
* 배치 쓰기 (여러 테이블 다중 문서 원자적 처리)
|
|
1839
|
+
*
|
|
1840
|
+
* 서버는 HTTP 200 + `success:false` + 개별 op `error` 로 부분 실패를 표현한다.
|
|
1841
|
+
* SDK 는 호출자가 silent success 로 오해하지 않도록 첫 실패 op 의 메시지로 throw 한다.
|
|
1814
1842
|
*/
|
|
1815
|
-
batch(operations: BatchOperation[]): Promise<
|
|
1816
|
-
results: Record<string, unknown>[];
|
|
1817
|
-
}>;
|
|
1843
|
+
batch(operations: BatchOperation[]): Promise<BatchWriteResult>;
|
|
1818
1844
|
/**
|
|
1819
1845
|
* 트랜잭션 실행 (읽기 → 쓰기 ACID)
|
|
1846
|
+
*
|
|
1847
|
+
* 서버는 부분 실패가 없는 ACID 트랜잭션을 보장하지만, 검증/RLS/충돌은
|
|
1848
|
+
* `success:false` + `error` 로 알린다. SDK 는 silent success 회귀 방지 차원에서 throw.
|
|
1820
1849
|
*/
|
|
1821
|
-
transaction(reads: TransactionRead[], writes: TransactionWrite[]): Promise<
|
|
1822
|
-
results: Record<string, unknown>;
|
|
1823
|
-
}>;
|
|
1850
|
+
transaction(reads: TransactionRead[], writes: TransactionWrite[]): Promise<TransactionResult>;
|
|
1824
1851
|
/**
|
|
1825
1852
|
* 데이터 조회 시 릴레이션 로딩 (JOIN)
|
|
1826
1853
|
*/
|
|
@@ -5377,7 +5404,7 @@ interface GameRoomInfo {
|
|
|
5377
5404
|
/**
|
|
5378
5405
|
* 게임 서버 메시지 타입
|
|
5379
5406
|
*/
|
|
5380
|
-
type GameServerMessageType = 'room_created' | 'room_joined' | 'room_left' | 'state' | 'delta' | 'player_event' | 'chat' | 'pong' | 'room_list' | 'error';
|
|
5407
|
+
type GameServerMessageType = 'room_created' | 'room_joined' | 'room_left' | 'state' | 'delta' | 'player_event' | 'chat' | 'pong' | 'room_list' | 'error' | 'room_stale' | 'sync_lost';
|
|
5381
5408
|
/**
|
|
5382
5409
|
* 게임 서버 메시지
|
|
5383
5410
|
* 서버는 모든 필드를 최상위에 보냄 (data 래퍼 없음)
|
|
@@ -5414,6 +5441,12 @@ interface GameServerMessage {
|
|
|
5414
5441
|
timestamp?: number;
|
|
5415
5442
|
client_timestamp?: number;
|
|
5416
5443
|
server_timestamp?: number;
|
|
5444
|
+
phase?: string;
|
|
5445
|
+
feature?: string;
|
|
5446
|
+
script_id?: string;
|
|
5447
|
+
reason?: string;
|
|
5448
|
+
script_version?: number;
|
|
5449
|
+
hint?: string;
|
|
5417
5450
|
}
|
|
5418
5451
|
/**
|
|
5419
5452
|
* 플레이어 이벤트
|
|
@@ -5440,6 +5473,19 @@ interface ChatMessage {
|
|
|
5440
5473
|
interface ErrorMessage {
|
|
5441
5474
|
code: string;
|
|
5442
5475
|
message: string;
|
|
5476
|
+
/**
|
|
5477
|
+
* 서버측 Lua hook 단계 식별자 — 값이 있으면 lua 실행 에러.
|
|
5478
|
+
* "onJoin" | "onLeave" | "onTick" | "onAction".
|
|
5479
|
+
* 일반 transport / protocol 에러는 phase 없음.
|
|
5480
|
+
*/
|
|
5481
|
+
phase?: string;
|
|
5482
|
+
/**
|
|
5483
|
+
* code === "FEATURE_DISABLED" 일 때 비활성 feature 이름.
|
|
5484
|
+
* "entity" | "matchqueue" | "leaderboard" 등 — `toggle_game_features` 와 1:1 매핑.
|
|
5485
|
+
*/
|
|
5486
|
+
feature?: string;
|
|
5487
|
+
roomId?: string;
|
|
5488
|
+
scriptId?: string;
|
|
5443
5489
|
}
|
|
5444
5490
|
/**
|
|
5445
5491
|
* Ping/Pong 응답
|
|
@@ -5448,6 +5494,25 @@ interface PongMessage {
|
|
|
5448
5494
|
clientTimestamp: number;
|
|
5449
5495
|
serverTimestamp: number;
|
|
5450
5496
|
}
|
|
5497
|
+
/**
|
|
5498
|
+
* room_stale 이벤트 페이로드.
|
|
5499
|
+
* 서버 측 hot reload(active_version bump) 등으로 현재 room 의 lua 핸들러가
|
|
5500
|
+
* 갱신됐지만 기존 state 가 보존되어 사용자 lua 의 `state.initialized` 같은
|
|
5501
|
+
* 가드로 `handlers.init` 가 재실행되지 않을 수 있을 때 발화된다.
|
|
5502
|
+
*
|
|
5503
|
+
* 권장 처리: leaveRoom → joinRoom 또는 새 roomId 로 createRoom.
|
|
5504
|
+
* 자동 disconnect 는 SDK 가 하지 않는다 — 정책은 사용자 게임이 결정.
|
|
5505
|
+
*/
|
|
5506
|
+
interface RoomStaleMessage {
|
|
5507
|
+
/** "script_reloaded" | "schema_changed" | "manual" 등 — 자유 문자열 */
|
|
5508
|
+
reason: string;
|
|
5509
|
+
roomId: string;
|
|
5510
|
+
/** appID:scriptName 형태. 없을 수 있음. */
|
|
5511
|
+
scriptId?: string;
|
|
5512
|
+
/** 새 active_version. 없을 수 있음. */
|
|
5513
|
+
scriptVersion?: number;
|
|
5514
|
+
serverTime: number;
|
|
5515
|
+
}
|
|
5451
5516
|
/**
|
|
5452
5517
|
* 게임 클라이언트 이벤트 핸들러
|
|
5453
5518
|
*/
|
|
@@ -5467,6 +5532,11 @@ interface GameEventHandlers {
|
|
|
5467
5532
|
onPlayerLeft?: (player: GamePlayer) => void;
|
|
5468
5533
|
onChat?: (message: ChatMessage) => void;
|
|
5469
5534
|
onPong?: (pong: PongMessage) => void;
|
|
5535
|
+
/**
|
|
5536
|
+
* 서버가 room 을 stale 로 표시했을 때 발화. 자세한 사양은 `RoomStaleMessage` 참고.
|
|
5537
|
+
* 미설정 시 SDK 는 console.warn 으로 가시화만 하고 자동 동작은 하지 않는다.
|
|
5538
|
+
*/
|
|
5539
|
+
onRoomStale?: (msg: RoomStaleMessage) => void;
|
|
5470
5540
|
}
|
|
5471
5541
|
/**
|
|
5472
5542
|
* 게임 클라이언트 설정
|
|
@@ -7321,6 +7391,32 @@ interface ReportIssueResponse {
|
|
|
7321
7391
|
status: 'open';
|
|
7322
7392
|
created_at: string;
|
|
7323
7393
|
}
|
|
7394
|
+
/**
|
|
7395
|
+
* Cross-app 위임 user 발행 요청 본문.
|
|
7396
|
+
*
|
|
7397
|
+
* 일반 `reportIssue` 와 다른 점:
|
|
7398
|
+
* - target_app 이 호출자(source_app) 와 다름 (다른 앱에 보내는 위임 제보)
|
|
7399
|
+
* - SDK 인증 컨텍스트(publicKey/secretKey) 가 아닌 cross-app OAuth Bearer access_token 사용
|
|
7400
|
+
* - reporter_member_id 는 access_token 의 end_user_id claim 에서 자동 추출 (body 로 전달 불가)
|
|
7401
|
+
*/
|
|
7402
|
+
interface ReportIssueOnBehalfOfUserRequest {
|
|
7403
|
+
/** 수신 앱(target) 의 ID. OAuth token 의 audience(`app:<uuid>`) 와 일치해야 함. */
|
|
7404
|
+
targetAppId: string;
|
|
7405
|
+
/**
|
|
7406
|
+
* Cross-app OAuth access_token (`authorization_code` grant — user binding 필수).
|
|
7407
|
+
* scope 에 `issue:report:on-behalf-of-user` 가 포함돼야 한다.
|
|
7408
|
+
* `client_credentials` grant 토큰은 401 `delegated_user_required` 로 거부됨.
|
|
7409
|
+
*/
|
|
7410
|
+
accessToken: string;
|
|
7411
|
+
/** 제목 (최대 200자) */
|
|
7412
|
+
title: string;
|
|
7413
|
+
/** 본문 (최대 16KB, 마크다운) */
|
|
7414
|
+
body: string;
|
|
7415
|
+
/** 카테고리. 기본값 `other`. AI triage 가 보정. */
|
|
7416
|
+
category?: SupportIssueCategory;
|
|
7417
|
+
/** 자유 컨텍스트 (페이지 URL, request_id 등). PII 직접 포함 금지. */
|
|
7418
|
+
metadata?: Record<string, unknown>;
|
|
7419
|
+
}
|
|
7324
7420
|
/**
|
|
7325
7421
|
* Support API — 사용자 제보 (end-user issue) 발행.
|
|
7326
7422
|
*
|
|
@@ -7369,6 +7465,37 @@ declare class SupportAPI {
|
|
|
7369
7465
|
* @throws ApiError — 본문 길이 초과 / 쿼터 초과(429) / reCAPTCHA 거부(403) 등.
|
|
7370
7466
|
*/
|
|
7371
7467
|
reportIssue(req: ReportIssueRequest): Promise<ReportIssueResponse>;
|
|
7468
|
+
/**
|
|
7469
|
+
* 다른 앱(target) 에 자기 사용자(end-user) 명의로 cross-app 위임 이슈를 발행한다.
|
|
7470
|
+
*
|
|
7471
|
+
* **사용 시나리오**: source_app(예: Makers) 의 backend 가 OAuth `authorization_code` grant 로
|
|
7472
|
+
* 발급받은 사용자 access_token 을 사용해, target_app(예: ai-tool) 에게 "Makers user A 가 보낸"
|
|
7473
|
+
* 이슈로 제보. target 측 콘솔 inbox 에는 `reporter_kind=user` + `reporter_app_id=Makers` 로 표시.
|
|
7474
|
+
*
|
|
7475
|
+
* 본 메서드는 SDK 의 publicKey/secretKey 인증 컨텍스트를 사용하지 않고, 호출자가 명시적으로 전달한
|
|
7476
|
+
* cross-app OAuth Bearer access_token 만 사용 (server-to-server 위임 흐름).
|
|
7477
|
+
*
|
|
7478
|
+
* @param req - 발행 본문
|
|
7479
|
+
* @param req.targetAppId - 수신 앱 ID (= OAuth token 의 audience `app:<uuid>` 와 일치해야 함)
|
|
7480
|
+
* @param req.accessToken - source_app 이 발급받은 cross-app OAuth access_token (authorization_code grant)
|
|
7481
|
+
*
|
|
7482
|
+
* @throws ApiError 401 — `delegated_user_required`: access_token 이 client_credentials grant
|
|
7483
|
+
* @throws ApiError 403 — `trust_chain_violation`: source_app 이 target_app 의 cross-app provider 로 등록되지 않음
|
|
7484
|
+
* @throws ApiError 403 — `insufficient_scope`: token 에 `issue:report:on-behalf-of-user` 미포함
|
|
7485
|
+
*
|
|
7486
|
+
* @example Makers backend → ai-tool 에 사용자 명의 제보
|
|
7487
|
+
* ```typescript
|
|
7488
|
+
* await cb.support.reportIssueOnBehalfOfUser({
|
|
7489
|
+
* targetAppId: 'ai-tool-uuid',
|
|
7490
|
+
* accessToken: makersUserAccessToken, // authorization_code grant 토큰
|
|
7491
|
+
* title: '생성 실패',
|
|
7492
|
+
* body: 'prompt X 가 5분째 응답 없음',
|
|
7493
|
+
* category: 'bug',
|
|
7494
|
+
* metadata: { prompt_id: 'p_42' },
|
|
7495
|
+
* })
|
|
7496
|
+
* ```
|
|
7497
|
+
*/
|
|
7498
|
+
reportIssueOnBehalfOfUser(req: ReportIssueOnBehalfOfUserRequest): Promise<ReportIssueResponse>;
|
|
7372
7499
|
/**
|
|
7373
7500
|
* ConnectBase 플랫폼 자체 버그/요청/문의를 발행한다.
|
|
7374
7501
|
*
|
|
@@ -7979,4 +8106,4 @@ declare class ConnectBase {
|
|
|
7979
8106
|
updateConfig(config: Partial<ConnectBaseConfig>): void;
|
|
7980
8107
|
}
|
|
7981
8108
|
|
|
7982
|
-
export { AIAPI, type AIChatRequest, type AIChatResponse, 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 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 BatchSetPageMetaRequest, type BillingCycle, type BillingKeyResponse, type BiometricInfo, type BiometricResult, type BulkCreateResponse, type BulkError, type CPUInfo, type CancelPaymentRequest, type CancelPaymentResponse, type CancelSubscriptionRequest, type CategoryInfo, type Channel, type ChannelMembership, 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 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, 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 GeoIndex, type GeoNear, type GeoPoint, type GeoPolygon, type GeoQuery, type GeoResponse, type GeoResult, type GeoWithin, type GetAuthorizationURLResponse, type GetFileByPathResponse, type GoogleConnectionStatus, type GuestMemberSignInResponse, 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 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 OpenDialogOptions, type OpenDialogResult, type PageMetaResponse, type PartyInfo, type PartyInvite, type PartyMember, type PauseSubscriptionRequest, type PaymentDetail, 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 PublicKeyItem, type PublishBatchRequest, type PublishBatchResponse, type PublishMessageRequest, type PublishMessageResponse, type PushPlatform, 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 RoomInfo, type RoomStats, 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 ServerMessage, SessionManager, type SetPageMetaRequest, type Shorts, type ShortsListResponse, type SignalingMessage, type SignalingMessageType, type SlowQueryInfo, type SpectatorInfo, type SpectatorPlayerState, type SpectatorState, type StateChange, type StateChangeHandler, type StorageUploadOptions, 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 SystemInfo, type TTLConfig, type TableAccessLevel, type TableColumnDef, type TableIndex, type TableRelation, type TableSchema, type TableSchemaDefinition, type TokenPersistence, type TransactionRead, type TransactionWrite, 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 UpdateLobbyRequest, type UpdatePublicKeyRequest, type UpdatePublicKeyResponse, type UpdateSecurityRuleRequest, type UpdateSubscriptionRequest, type UpdateTriggerRequest, type UpdateVideoRequest, type UpdateVideoStorageRequest, type UploadByPathOptions, type UploadFileResponse, type UploadOptions, type UploadProgress, type VAPIDPublicKeyResponse, type ValidateResponse, type ValidationSchema, type ValidationSchemaField, type ValidationStateTransitions, type Video, type VideoComment, 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, isWebTransportSupported, toCreateRoomWire };
|
|
8109
|
+
export { AIAPI, type AIChatRequest, type AIChatResponse, 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 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 Channel, type ChannelMembership, 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 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, 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 GeoIndex, type GeoNear, type GeoPoint, type GeoPolygon, type GeoQuery, type GeoResponse, type GeoResult, type GeoWithin, type GetAuthorizationURLResponse, type GetFileByPathResponse, type GoogleConnectionStatus, type GuestMemberSignInResponse, 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 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 OpenDialogOptions, type OpenDialogResult, type PageMetaResponse, type PartyInfo, type PartyInvite, type PartyMember, type PauseSubscriptionRequest, type PaymentDetail, 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 PublicKeyItem, type PublishBatchRequest, type PublishBatchResponse, type PublishMessageRequest, type PublishMessageResponse, type PushPlatform, 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 RoomInfo, type RoomStaleMessage, type RoomStats, 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 ServerMessage, SessionManager, type SetPageMetaRequest, type Shorts, type ShortsListResponse, type SignalingMessage, type SignalingMessageType, type SlowQueryInfo, type SpectatorInfo, type SpectatorPlayerState, type SpectatorState, type StateChange, type StateChangeHandler, type StorageUploadOptions, 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 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 UpdateLobbyRequest, type UpdatePublicKeyRequest, type UpdatePublicKeyResponse, type UpdateSecurityRuleRequest, type UpdateSubscriptionRequest, type UpdateTriggerRequest, type UpdateVideoRequest, type UpdateVideoStorageRequest, type UploadByPathOptions, type UploadFileResponse, type UploadOptions, type UploadProgress, type VAPIDPublicKeyResponse, type ValidateResponse, type ValidationSchema, type ValidationSchemaField, type ValidationStateTransitions, type Video, type VideoComment, 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, isWebTransportSupported, toCreateRoomWire };
|
package/dist/index.d.ts
CHANGED
|
@@ -1355,6 +1355,31 @@ interface TransactionWrite {
|
|
|
1355
1355
|
exists?: boolean;
|
|
1356
1356
|
};
|
|
1357
1357
|
}
|
|
1358
|
+
interface BatchOperationResult {
|
|
1359
|
+
index: number;
|
|
1360
|
+
success: boolean;
|
|
1361
|
+
doc_id?: string;
|
|
1362
|
+
error?: string;
|
|
1363
|
+
}
|
|
1364
|
+
interface BatchWriteResult {
|
|
1365
|
+
success: boolean;
|
|
1366
|
+
results: BatchOperationResult[];
|
|
1367
|
+
total_count?: number;
|
|
1368
|
+
success_count?: number;
|
|
1369
|
+
failed_count?: number;
|
|
1370
|
+
}
|
|
1371
|
+
interface TransactionWriteResult {
|
|
1372
|
+
index: number;
|
|
1373
|
+
doc_id?: string;
|
|
1374
|
+
success: boolean;
|
|
1375
|
+
}
|
|
1376
|
+
interface TransactionResult {
|
|
1377
|
+
success: boolean;
|
|
1378
|
+
transaction_id?: string;
|
|
1379
|
+
reads?: Record<string, unknown>;
|
|
1380
|
+
results?: TransactionWriteResult[];
|
|
1381
|
+
error?: string;
|
|
1382
|
+
}
|
|
1358
1383
|
interface TTLConfig {
|
|
1359
1384
|
table_name: string;
|
|
1360
1385
|
field: string;
|
|
@@ -1811,16 +1836,18 @@ declare class DatabaseAPI {
|
|
|
1811
1836
|
}): Promise<GeoResponse>;
|
|
1812
1837
|
/**
|
|
1813
1838
|
* 배치 쓰기 (여러 테이블 다중 문서 원자적 처리)
|
|
1839
|
+
*
|
|
1840
|
+
* 서버는 HTTP 200 + `success:false` + 개별 op `error` 로 부분 실패를 표현한다.
|
|
1841
|
+
* SDK 는 호출자가 silent success 로 오해하지 않도록 첫 실패 op 의 메시지로 throw 한다.
|
|
1814
1842
|
*/
|
|
1815
|
-
batch(operations: BatchOperation[]): Promise<
|
|
1816
|
-
results: Record<string, unknown>[];
|
|
1817
|
-
}>;
|
|
1843
|
+
batch(operations: BatchOperation[]): Promise<BatchWriteResult>;
|
|
1818
1844
|
/**
|
|
1819
1845
|
* 트랜잭션 실행 (읽기 → 쓰기 ACID)
|
|
1846
|
+
*
|
|
1847
|
+
* 서버는 부분 실패가 없는 ACID 트랜잭션을 보장하지만, 검증/RLS/충돌은
|
|
1848
|
+
* `success:false` + `error` 로 알린다. SDK 는 silent success 회귀 방지 차원에서 throw.
|
|
1820
1849
|
*/
|
|
1821
|
-
transaction(reads: TransactionRead[], writes: TransactionWrite[]): Promise<
|
|
1822
|
-
results: Record<string, unknown>;
|
|
1823
|
-
}>;
|
|
1850
|
+
transaction(reads: TransactionRead[], writes: TransactionWrite[]): Promise<TransactionResult>;
|
|
1824
1851
|
/**
|
|
1825
1852
|
* 데이터 조회 시 릴레이션 로딩 (JOIN)
|
|
1826
1853
|
*/
|
|
@@ -5377,7 +5404,7 @@ interface GameRoomInfo {
|
|
|
5377
5404
|
/**
|
|
5378
5405
|
* 게임 서버 메시지 타입
|
|
5379
5406
|
*/
|
|
5380
|
-
type GameServerMessageType = 'room_created' | 'room_joined' | 'room_left' | 'state' | 'delta' | 'player_event' | 'chat' | 'pong' | 'room_list' | 'error';
|
|
5407
|
+
type GameServerMessageType = 'room_created' | 'room_joined' | 'room_left' | 'state' | 'delta' | 'player_event' | 'chat' | 'pong' | 'room_list' | 'error' | 'room_stale' | 'sync_lost';
|
|
5381
5408
|
/**
|
|
5382
5409
|
* 게임 서버 메시지
|
|
5383
5410
|
* 서버는 모든 필드를 최상위에 보냄 (data 래퍼 없음)
|
|
@@ -5414,6 +5441,12 @@ interface GameServerMessage {
|
|
|
5414
5441
|
timestamp?: number;
|
|
5415
5442
|
client_timestamp?: number;
|
|
5416
5443
|
server_timestamp?: number;
|
|
5444
|
+
phase?: string;
|
|
5445
|
+
feature?: string;
|
|
5446
|
+
script_id?: string;
|
|
5447
|
+
reason?: string;
|
|
5448
|
+
script_version?: number;
|
|
5449
|
+
hint?: string;
|
|
5417
5450
|
}
|
|
5418
5451
|
/**
|
|
5419
5452
|
* 플레이어 이벤트
|
|
@@ -5440,6 +5473,19 @@ interface ChatMessage {
|
|
|
5440
5473
|
interface ErrorMessage {
|
|
5441
5474
|
code: string;
|
|
5442
5475
|
message: string;
|
|
5476
|
+
/**
|
|
5477
|
+
* 서버측 Lua hook 단계 식별자 — 값이 있으면 lua 실행 에러.
|
|
5478
|
+
* "onJoin" | "onLeave" | "onTick" | "onAction".
|
|
5479
|
+
* 일반 transport / protocol 에러는 phase 없음.
|
|
5480
|
+
*/
|
|
5481
|
+
phase?: string;
|
|
5482
|
+
/**
|
|
5483
|
+
* code === "FEATURE_DISABLED" 일 때 비활성 feature 이름.
|
|
5484
|
+
* "entity" | "matchqueue" | "leaderboard" 등 — `toggle_game_features` 와 1:1 매핑.
|
|
5485
|
+
*/
|
|
5486
|
+
feature?: string;
|
|
5487
|
+
roomId?: string;
|
|
5488
|
+
scriptId?: string;
|
|
5443
5489
|
}
|
|
5444
5490
|
/**
|
|
5445
5491
|
* Ping/Pong 응답
|
|
@@ -5448,6 +5494,25 @@ interface PongMessage {
|
|
|
5448
5494
|
clientTimestamp: number;
|
|
5449
5495
|
serverTimestamp: number;
|
|
5450
5496
|
}
|
|
5497
|
+
/**
|
|
5498
|
+
* room_stale 이벤트 페이로드.
|
|
5499
|
+
* 서버 측 hot reload(active_version bump) 등으로 현재 room 의 lua 핸들러가
|
|
5500
|
+
* 갱신됐지만 기존 state 가 보존되어 사용자 lua 의 `state.initialized` 같은
|
|
5501
|
+
* 가드로 `handlers.init` 가 재실행되지 않을 수 있을 때 발화된다.
|
|
5502
|
+
*
|
|
5503
|
+
* 권장 처리: leaveRoom → joinRoom 또는 새 roomId 로 createRoom.
|
|
5504
|
+
* 자동 disconnect 는 SDK 가 하지 않는다 — 정책은 사용자 게임이 결정.
|
|
5505
|
+
*/
|
|
5506
|
+
interface RoomStaleMessage {
|
|
5507
|
+
/** "script_reloaded" | "schema_changed" | "manual" 등 — 자유 문자열 */
|
|
5508
|
+
reason: string;
|
|
5509
|
+
roomId: string;
|
|
5510
|
+
/** appID:scriptName 형태. 없을 수 있음. */
|
|
5511
|
+
scriptId?: string;
|
|
5512
|
+
/** 새 active_version. 없을 수 있음. */
|
|
5513
|
+
scriptVersion?: number;
|
|
5514
|
+
serverTime: number;
|
|
5515
|
+
}
|
|
5451
5516
|
/**
|
|
5452
5517
|
* 게임 클라이언트 이벤트 핸들러
|
|
5453
5518
|
*/
|
|
@@ -5467,6 +5532,11 @@ interface GameEventHandlers {
|
|
|
5467
5532
|
onPlayerLeft?: (player: GamePlayer) => void;
|
|
5468
5533
|
onChat?: (message: ChatMessage) => void;
|
|
5469
5534
|
onPong?: (pong: PongMessage) => void;
|
|
5535
|
+
/**
|
|
5536
|
+
* 서버가 room 을 stale 로 표시했을 때 발화. 자세한 사양은 `RoomStaleMessage` 참고.
|
|
5537
|
+
* 미설정 시 SDK 는 console.warn 으로 가시화만 하고 자동 동작은 하지 않는다.
|
|
5538
|
+
*/
|
|
5539
|
+
onRoomStale?: (msg: RoomStaleMessage) => void;
|
|
5470
5540
|
}
|
|
5471
5541
|
/**
|
|
5472
5542
|
* 게임 클라이언트 설정
|
|
@@ -7321,6 +7391,32 @@ interface ReportIssueResponse {
|
|
|
7321
7391
|
status: 'open';
|
|
7322
7392
|
created_at: string;
|
|
7323
7393
|
}
|
|
7394
|
+
/**
|
|
7395
|
+
* Cross-app 위임 user 발행 요청 본문.
|
|
7396
|
+
*
|
|
7397
|
+
* 일반 `reportIssue` 와 다른 점:
|
|
7398
|
+
* - target_app 이 호출자(source_app) 와 다름 (다른 앱에 보내는 위임 제보)
|
|
7399
|
+
* - SDK 인증 컨텍스트(publicKey/secretKey) 가 아닌 cross-app OAuth Bearer access_token 사용
|
|
7400
|
+
* - reporter_member_id 는 access_token 의 end_user_id claim 에서 자동 추출 (body 로 전달 불가)
|
|
7401
|
+
*/
|
|
7402
|
+
interface ReportIssueOnBehalfOfUserRequest {
|
|
7403
|
+
/** 수신 앱(target) 의 ID. OAuth token 의 audience(`app:<uuid>`) 와 일치해야 함. */
|
|
7404
|
+
targetAppId: string;
|
|
7405
|
+
/**
|
|
7406
|
+
* Cross-app OAuth access_token (`authorization_code` grant — user binding 필수).
|
|
7407
|
+
* scope 에 `issue:report:on-behalf-of-user` 가 포함돼야 한다.
|
|
7408
|
+
* `client_credentials` grant 토큰은 401 `delegated_user_required` 로 거부됨.
|
|
7409
|
+
*/
|
|
7410
|
+
accessToken: string;
|
|
7411
|
+
/** 제목 (최대 200자) */
|
|
7412
|
+
title: string;
|
|
7413
|
+
/** 본문 (최대 16KB, 마크다운) */
|
|
7414
|
+
body: string;
|
|
7415
|
+
/** 카테고리. 기본값 `other`. AI triage 가 보정. */
|
|
7416
|
+
category?: SupportIssueCategory;
|
|
7417
|
+
/** 자유 컨텍스트 (페이지 URL, request_id 등). PII 직접 포함 금지. */
|
|
7418
|
+
metadata?: Record<string, unknown>;
|
|
7419
|
+
}
|
|
7324
7420
|
/**
|
|
7325
7421
|
* Support API — 사용자 제보 (end-user issue) 발행.
|
|
7326
7422
|
*
|
|
@@ -7369,6 +7465,37 @@ declare class SupportAPI {
|
|
|
7369
7465
|
* @throws ApiError — 본문 길이 초과 / 쿼터 초과(429) / reCAPTCHA 거부(403) 등.
|
|
7370
7466
|
*/
|
|
7371
7467
|
reportIssue(req: ReportIssueRequest): Promise<ReportIssueResponse>;
|
|
7468
|
+
/**
|
|
7469
|
+
* 다른 앱(target) 에 자기 사용자(end-user) 명의로 cross-app 위임 이슈를 발행한다.
|
|
7470
|
+
*
|
|
7471
|
+
* **사용 시나리오**: source_app(예: Makers) 의 backend 가 OAuth `authorization_code` grant 로
|
|
7472
|
+
* 발급받은 사용자 access_token 을 사용해, target_app(예: ai-tool) 에게 "Makers user A 가 보낸"
|
|
7473
|
+
* 이슈로 제보. target 측 콘솔 inbox 에는 `reporter_kind=user` + `reporter_app_id=Makers` 로 표시.
|
|
7474
|
+
*
|
|
7475
|
+
* 본 메서드는 SDK 의 publicKey/secretKey 인증 컨텍스트를 사용하지 않고, 호출자가 명시적으로 전달한
|
|
7476
|
+
* cross-app OAuth Bearer access_token 만 사용 (server-to-server 위임 흐름).
|
|
7477
|
+
*
|
|
7478
|
+
* @param req - 발행 본문
|
|
7479
|
+
* @param req.targetAppId - 수신 앱 ID (= OAuth token 의 audience `app:<uuid>` 와 일치해야 함)
|
|
7480
|
+
* @param req.accessToken - source_app 이 발급받은 cross-app OAuth access_token (authorization_code grant)
|
|
7481
|
+
*
|
|
7482
|
+
* @throws ApiError 401 — `delegated_user_required`: access_token 이 client_credentials grant
|
|
7483
|
+
* @throws ApiError 403 — `trust_chain_violation`: source_app 이 target_app 의 cross-app provider 로 등록되지 않음
|
|
7484
|
+
* @throws ApiError 403 — `insufficient_scope`: token 에 `issue:report:on-behalf-of-user` 미포함
|
|
7485
|
+
*
|
|
7486
|
+
* @example Makers backend → ai-tool 에 사용자 명의 제보
|
|
7487
|
+
* ```typescript
|
|
7488
|
+
* await cb.support.reportIssueOnBehalfOfUser({
|
|
7489
|
+
* targetAppId: 'ai-tool-uuid',
|
|
7490
|
+
* accessToken: makersUserAccessToken, // authorization_code grant 토큰
|
|
7491
|
+
* title: '생성 실패',
|
|
7492
|
+
* body: 'prompt X 가 5분째 응답 없음',
|
|
7493
|
+
* category: 'bug',
|
|
7494
|
+
* metadata: { prompt_id: 'p_42' },
|
|
7495
|
+
* })
|
|
7496
|
+
* ```
|
|
7497
|
+
*/
|
|
7498
|
+
reportIssueOnBehalfOfUser(req: ReportIssueOnBehalfOfUserRequest): Promise<ReportIssueResponse>;
|
|
7372
7499
|
/**
|
|
7373
7500
|
* ConnectBase 플랫폼 자체 버그/요청/문의를 발행한다.
|
|
7374
7501
|
*
|
|
@@ -7979,4 +8106,4 @@ declare class ConnectBase {
|
|
|
7979
8106
|
updateConfig(config: Partial<ConnectBaseConfig>): void;
|
|
7980
8107
|
}
|
|
7981
8108
|
|
|
7982
|
-
export { AIAPI, type AIChatRequest, type AIChatResponse, 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 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 BatchSetPageMetaRequest, type BillingCycle, type BillingKeyResponse, type BiometricInfo, type BiometricResult, type BulkCreateResponse, type BulkError, type CPUInfo, type CancelPaymentRequest, type CancelPaymentResponse, type CancelSubscriptionRequest, type CategoryInfo, type Channel, type ChannelMembership, 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 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, 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 GeoIndex, type GeoNear, type GeoPoint, type GeoPolygon, type GeoQuery, type GeoResponse, type GeoResult, type GeoWithin, type GetAuthorizationURLResponse, type GetFileByPathResponse, type GoogleConnectionStatus, type GuestMemberSignInResponse, 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 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 OpenDialogOptions, type OpenDialogResult, type PageMetaResponse, type PartyInfo, type PartyInvite, type PartyMember, type PauseSubscriptionRequest, type PaymentDetail, 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 PublicKeyItem, type PublishBatchRequest, type PublishBatchResponse, type PublishMessageRequest, type PublishMessageResponse, type PushPlatform, 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 RoomInfo, type RoomStats, 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 ServerMessage, SessionManager, type SetPageMetaRequest, type Shorts, type ShortsListResponse, type SignalingMessage, type SignalingMessageType, type SlowQueryInfo, type SpectatorInfo, type SpectatorPlayerState, type SpectatorState, type StateChange, type StateChangeHandler, type StorageUploadOptions, 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 SystemInfo, type TTLConfig, type TableAccessLevel, type TableColumnDef, type TableIndex, type TableRelation, type TableSchema, type TableSchemaDefinition, type TokenPersistence, type TransactionRead, type TransactionWrite, 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 UpdateLobbyRequest, type UpdatePublicKeyRequest, type UpdatePublicKeyResponse, type UpdateSecurityRuleRequest, type UpdateSubscriptionRequest, type UpdateTriggerRequest, type UpdateVideoRequest, type UpdateVideoStorageRequest, type UploadByPathOptions, type UploadFileResponse, type UploadOptions, type UploadProgress, type VAPIDPublicKeyResponse, type ValidateResponse, type ValidationSchema, type ValidationSchemaField, type ValidationStateTransitions, type Video, type VideoComment, 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, isWebTransportSupported, toCreateRoomWire };
|
|
8109
|
+
export { AIAPI, type AIChatRequest, type AIChatResponse, 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 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 Channel, type ChannelMembership, 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 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, 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 GeoIndex, type GeoNear, type GeoPoint, type GeoPolygon, type GeoQuery, type GeoResponse, type GeoResult, type GeoWithin, type GetAuthorizationURLResponse, type GetFileByPathResponse, type GoogleConnectionStatus, type GuestMemberSignInResponse, 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 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 OpenDialogOptions, type OpenDialogResult, type PageMetaResponse, type PartyInfo, type PartyInvite, type PartyMember, type PauseSubscriptionRequest, type PaymentDetail, 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 PublicKeyItem, type PublishBatchRequest, type PublishBatchResponse, type PublishMessageRequest, type PublishMessageResponse, type PushPlatform, 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 RoomInfo, type RoomStaleMessage, type RoomStats, 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 ServerMessage, SessionManager, type SetPageMetaRequest, type Shorts, type ShortsListResponse, type SignalingMessage, type SignalingMessageType, type SlowQueryInfo, type SpectatorInfo, type SpectatorPlayerState, type SpectatorState, type StateChange, type StateChangeHandler, type StorageUploadOptions, 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 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 UpdateLobbyRequest, type UpdatePublicKeyRequest, type UpdatePublicKeyResponse, type UpdateSecurityRuleRequest, type UpdateSubscriptionRequest, type UpdateTriggerRequest, type UpdateVideoRequest, type UpdateVideoStorageRequest, type UploadByPathOptions, type UploadFileResponse, type UploadOptions, type UploadProgress, type VAPIDPublicKeyResponse, type ValidateResponse, type ValidationSchema, type ValidationSchemaField, type ValidationStateTransitions, type Video, type VideoComment, 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, isWebTransportSupported, toCreateRoomWire };
|
package/dist/index.js
CHANGED
|
@@ -1344,23 +1344,38 @@ var DatabaseAPI = class {
|
|
|
1344
1344
|
// ============ Batch & Transactions ============
|
|
1345
1345
|
/**
|
|
1346
1346
|
* 배치 쓰기 (여러 테이블 다중 문서 원자적 처리)
|
|
1347
|
+
*
|
|
1348
|
+
* 서버는 HTTP 200 + `success:false` + 개별 op `error` 로 부분 실패를 표현한다.
|
|
1349
|
+
* SDK 는 호출자가 silent success 로 오해하지 않도록 첫 실패 op 의 메시지로 throw 한다.
|
|
1347
1350
|
*/
|
|
1348
1351
|
async batch(operations) {
|
|
1349
1352
|
const prefix = this.getPublicPrefix();
|
|
1350
|
-
|
|
1353
|
+
const response = await this.http.post(
|
|
1351
1354
|
`${prefix}/batch`,
|
|
1352
1355
|
{ operations }
|
|
1353
1356
|
);
|
|
1357
|
+
if (response && response.success === false) {
|
|
1358
|
+
const first = response.results?.find((r) => r && r.success === false);
|
|
1359
|
+
throw new Error(first?.error || "batch operation failed");
|
|
1360
|
+
}
|
|
1361
|
+
return response;
|
|
1354
1362
|
}
|
|
1355
1363
|
/**
|
|
1356
1364
|
* 트랜잭션 실행 (읽기 → 쓰기 ACID)
|
|
1365
|
+
*
|
|
1366
|
+
* 서버는 부분 실패가 없는 ACID 트랜잭션을 보장하지만, 검증/RLS/충돌은
|
|
1367
|
+
* `success:false` + `error` 로 알린다. SDK 는 silent success 회귀 방지 차원에서 throw.
|
|
1357
1368
|
*/
|
|
1358
1369
|
async transaction(reads, writes) {
|
|
1359
1370
|
const prefix = this.getPublicPrefix();
|
|
1360
|
-
|
|
1371
|
+
const response = await this.http.post(
|
|
1361
1372
|
`${prefix}/transactions`,
|
|
1362
1373
|
{ reads, writes }
|
|
1363
1374
|
);
|
|
1375
|
+
if (response && response.success === false) {
|
|
1376
|
+
throw new Error(response.error || "transaction failed");
|
|
1377
|
+
}
|
|
1378
|
+
return response;
|
|
1364
1379
|
}
|
|
1365
1380
|
// ============ Populate (Relation Query) ============
|
|
1366
1381
|
/**
|
|
@@ -9115,6 +9130,67 @@ var SupportAPI = class {
|
|
|
9115
9130
|
if (req.recaptchaToken) body.recaptcha_token = req.recaptchaToken;
|
|
9116
9131
|
return this.http.post("/v1/public/reports", body);
|
|
9117
9132
|
}
|
|
9133
|
+
/**
|
|
9134
|
+
* 다른 앱(target) 에 자기 사용자(end-user) 명의로 cross-app 위임 이슈를 발행한다.
|
|
9135
|
+
*
|
|
9136
|
+
* **사용 시나리오**: source_app(예: Makers) 의 backend 가 OAuth `authorization_code` grant 로
|
|
9137
|
+
* 발급받은 사용자 access_token 을 사용해, target_app(예: ai-tool) 에게 "Makers user A 가 보낸"
|
|
9138
|
+
* 이슈로 제보. target 측 콘솔 inbox 에는 `reporter_kind=user` + `reporter_app_id=Makers` 로 표시.
|
|
9139
|
+
*
|
|
9140
|
+
* 본 메서드는 SDK 의 publicKey/secretKey 인증 컨텍스트를 사용하지 않고, 호출자가 명시적으로 전달한
|
|
9141
|
+
* cross-app OAuth Bearer access_token 만 사용 (server-to-server 위임 흐름).
|
|
9142
|
+
*
|
|
9143
|
+
* @param req - 발행 본문
|
|
9144
|
+
* @param req.targetAppId - 수신 앱 ID (= OAuth token 의 audience `app:<uuid>` 와 일치해야 함)
|
|
9145
|
+
* @param req.accessToken - source_app 이 발급받은 cross-app OAuth access_token (authorization_code grant)
|
|
9146
|
+
*
|
|
9147
|
+
* @throws ApiError 401 — `delegated_user_required`: access_token 이 client_credentials grant
|
|
9148
|
+
* @throws ApiError 403 — `trust_chain_violation`: source_app 이 target_app 의 cross-app provider 로 등록되지 않음
|
|
9149
|
+
* @throws ApiError 403 — `insufficient_scope`: token 에 `issue:report:on-behalf-of-user` 미포함
|
|
9150
|
+
*
|
|
9151
|
+
* @example Makers backend → ai-tool 에 사용자 명의 제보
|
|
9152
|
+
* ```typescript
|
|
9153
|
+
* await cb.support.reportIssueOnBehalfOfUser({
|
|
9154
|
+
* targetAppId: 'ai-tool-uuid',
|
|
9155
|
+
* accessToken: makersUserAccessToken, // authorization_code grant 토큰
|
|
9156
|
+
* title: '생성 실패',
|
|
9157
|
+
* body: 'prompt X 가 5분째 응답 없음',
|
|
9158
|
+
* category: 'bug',
|
|
9159
|
+
* metadata: { prompt_id: 'p_42' },
|
|
9160
|
+
* })
|
|
9161
|
+
* ```
|
|
9162
|
+
*/
|
|
9163
|
+
async reportIssueOnBehalfOfUser(req) {
|
|
9164
|
+
if (!req.targetAppId) throw new Error("targetAppId is required");
|
|
9165
|
+
if (!req.accessToken) throw new Error("accessToken is required");
|
|
9166
|
+
const body = {
|
|
9167
|
+
title: req.title,
|
|
9168
|
+
body: req.body
|
|
9169
|
+
};
|
|
9170
|
+
if (req.category) body.category = req.category;
|
|
9171
|
+
if (req.metadata) body.metadata = req.metadata;
|
|
9172
|
+
const url = `${this.http.getBaseUrl()}/v1/integrations/providers/${encodeURIComponent(req.targetAppId)}/issues/by-user`;
|
|
9173
|
+
const response = await fetch(url, {
|
|
9174
|
+
method: "POST",
|
|
9175
|
+
headers: {
|
|
9176
|
+
"Content-Type": "application/json",
|
|
9177
|
+
Authorization: `Bearer ${req.accessToken}`
|
|
9178
|
+
},
|
|
9179
|
+
body: JSON.stringify(body)
|
|
9180
|
+
});
|
|
9181
|
+
if (!response.ok) {
|
|
9182
|
+
let errorBody;
|
|
9183
|
+
try {
|
|
9184
|
+
errorBody = await response.json();
|
|
9185
|
+
} catch {
|
|
9186
|
+
errorBody = { error: response.statusText };
|
|
9187
|
+
}
|
|
9188
|
+
const errObj = errorBody ?? {};
|
|
9189
|
+
const message = errObj.error_description ?? errObj.error ?? `HTTP ${response.status}`;
|
|
9190
|
+
throw new Error(`reportIssueOnBehalfOfUser failed (${response.status}): ${message}`);
|
|
9191
|
+
}
|
|
9192
|
+
return await response.json();
|
|
9193
|
+
}
|
|
9118
9194
|
/**
|
|
9119
9195
|
* ConnectBase 플랫폼 자체 버그/요청/문의를 발행한다.
|
|
9120
9196
|
*
|
|
@@ -9800,9 +9876,29 @@ var GameRoomTransport = class {
|
|
|
9800
9876
|
case "error":
|
|
9801
9877
|
this.handlers.onError?.({
|
|
9802
9878
|
code: msg.code || "UNKNOWN",
|
|
9803
|
-
message: msg.message || "Unknown error"
|
|
9879
|
+
message: msg.message || "Unknown error",
|
|
9880
|
+
phase: msg.phase,
|
|
9881
|
+
feature: msg.feature,
|
|
9882
|
+
roomId: msg.room_id,
|
|
9883
|
+
scriptId: msg.script_id
|
|
9804
9884
|
});
|
|
9805
9885
|
break;
|
|
9886
|
+
case "room_stale":
|
|
9887
|
+
if (this.handlers.onRoomStale) {
|
|
9888
|
+
this.handlers.onRoomStale({
|
|
9889
|
+
reason: msg.reason || "unknown",
|
|
9890
|
+
roomId: msg.room_id || "",
|
|
9891
|
+
scriptId: msg.script_id,
|
|
9892
|
+
scriptVersion: msg.script_version,
|
|
9893
|
+
serverTime: msg.server_time || 0
|
|
9894
|
+
});
|
|
9895
|
+
} else {
|
|
9896
|
+
console.warn(
|
|
9897
|
+
"[connect-base game] room_stale received but onRoomStale handler not set:",
|
|
9898
|
+
{ reason: msg.reason, roomId: msg.room_id, scriptVersion: msg.script_version }
|
|
9899
|
+
);
|
|
9900
|
+
}
|
|
9901
|
+
break;
|
|
9806
9902
|
}
|
|
9807
9903
|
} catch {
|
|
9808
9904
|
console.error("Failed to parse game message:", data);
|