connectbase-client 0.8.1 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/connect-base.umd.js +3 -3
- package/dist/index.d.mts +149 -3
- package/dist/index.d.ts +149 -3
- package/dist/index.js +177 -0
- package/dist/index.mjs +177 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1831,9 +1831,9 @@ interface StreamMessage {
|
|
|
1831
1831
|
}
|
|
1832
1832
|
/** AI 스트리밍 요청 옵션 */
|
|
1833
1833
|
interface StreamOptions {
|
|
1834
|
-
/** AI 프로바이더 (
|
|
1834
|
+
/** AI 프로바이더 (앱 설정의 프로바이더 사용. override 시 지정) */
|
|
1835
1835
|
provider?: 'gemini' | 'openai' | 'claude';
|
|
1836
|
-
/** 모델명 (
|
|
1836
|
+
/** 모델명 (앱 설정의 모델을 override (선택적)) */
|
|
1837
1837
|
model?: string;
|
|
1838
1838
|
/** 시스템 프롬프트 */
|
|
1839
1839
|
system?: string;
|
|
@@ -4465,6 +4465,133 @@ interface LobbyInvite {
|
|
|
4465
4465
|
createdAt: string;
|
|
4466
4466
|
expiresAt: string;
|
|
4467
4467
|
}
|
|
4468
|
+
interface PartyInfo {
|
|
4469
|
+
id: string;
|
|
4470
|
+
app_id: string;
|
|
4471
|
+
leader_id: string;
|
|
4472
|
+
members: PartyMember[];
|
|
4473
|
+
max_size: number;
|
|
4474
|
+
settings?: Record<string, string>;
|
|
4475
|
+
state: string;
|
|
4476
|
+
created_at: string;
|
|
4477
|
+
updated_at: string;
|
|
4478
|
+
}
|
|
4479
|
+
interface PartyMember {
|
|
4480
|
+
player_id: string;
|
|
4481
|
+
display_name?: string;
|
|
4482
|
+
ready: boolean;
|
|
4483
|
+
role: string;
|
|
4484
|
+
joined_at: string;
|
|
4485
|
+
metadata?: Record<string, string>;
|
|
4486
|
+
}
|
|
4487
|
+
interface PartyInvite {
|
|
4488
|
+
invite_id: string;
|
|
4489
|
+
party_id: string;
|
|
4490
|
+
inviter_id: string;
|
|
4491
|
+
status: string;
|
|
4492
|
+
expires_at: string;
|
|
4493
|
+
}
|
|
4494
|
+
interface SpectatorInfo {
|
|
4495
|
+
id: string;
|
|
4496
|
+
user_id?: string;
|
|
4497
|
+
room_id: string;
|
|
4498
|
+
mode: "free" | "follow" | "director";
|
|
4499
|
+
target_id?: string;
|
|
4500
|
+
joined_at: string;
|
|
4501
|
+
delay_seconds?: number;
|
|
4502
|
+
}
|
|
4503
|
+
interface SpectatorState {
|
|
4504
|
+
room_id: string;
|
|
4505
|
+
tick: number;
|
|
4506
|
+
timestamp: number;
|
|
4507
|
+
players: SpectatorPlayerState[];
|
|
4508
|
+
game_state?: Record<string, unknown>;
|
|
4509
|
+
events?: Record<string, unknown>[];
|
|
4510
|
+
}
|
|
4511
|
+
interface SpectatorPlayerState {
|
|
4512
|
+
id: string;
|
|
4513
|
+
display_name: string;
|
|
4514
|
+
position: {
|
|
4515
|
+
x: number;
|
|
4516
|
+
y: number;
|
|
4517
|
+
z: number;
|
|
4518
|
+
};
|
|
4519
|
+
health?: number;
|
|
4520
|
+
score?: number;
|
|
4521
|
+
is_alive: boolean;
|
|
4522
|
+
}
|
|
4523
|
+
interface LeaderboardEntry {
|
|
4524
|
+
rank: number;
|
|
4525
|
+
player_id: string;
|
|
4526
|
+
display_name: string;
|
|
4527
|
+
rating: number;
|
|
4528
|
+
wins: number;
|
|
4529
|
+
losses: number;
|
|
4530
|
+
games_played: number;
|
|
4531
|
+
win_rate: number;
|
|
4532
|
+
tier: string;
|
|
4533
|
+
division: number;
|
|
4534
|
+
updated_at: string;
|
|
4535
|
+
}
|
|
4536
|
+
interface PlayerStats {
|
|
4537
|
+
player_id: string;
|
|
4538
|
+
rating: number;
|
|
4539
|
+
wins: number;
|
|
4540
|
+
losses: number;
|
|
4541
|
+
games_played: number;
|
|
4542
|
+
win_rate: number;
|
|
4543
|
+
tier: string;
|
|
4544
|
+
division: number;
|
|
4545
|
+
match_history: MatchResult[];
|
|
4546
|
+
}
|
|
4547
|
+
interface MatchResult {
|
|
4548
|
+
match_id: string;
|
|
4549
|
+
result: "win" | "loss" | "draw";
|
|
4550
|
+
rating_change: number;
|
|
4551
|
+
played_at: string;
|
|
4552
|
+
}
|
|
4553
|
+
interface VoiceChannel {
|
|
4554
|
+
id: string;
|
|
4555
|
+
room_id: string;
|
|
4556
|
+
name: string;
|
|
4557
|
+
type: "global" | "team" | "proximity" | "private" | "spectator";
|
|
4558
|
+
team_id?: string;
|
|
4559
|
+
max_members: number;
|
|
4560
|
+
members: Record<string, VoiceMember>;
|
|
4561
|
+
webrtc_room_id: string;
|
|
4562
|
+
created_at: string;
|
|
4563
|
+
}
|
|
4564
|
+
interface VoiceMember {
|
|
4565
|
+
player_id: string;
|
|
4566
|
+
display_name: string;
|
|
4567
|
+
joined_at: string;
|
|
4568
|
+
webrtc_url?: string;
|
|
4569
|
+
}
|
|
4570
|
+
interface ReplayInfo {
|
|
4571
|
+
id: string;
|
|
4572
|
+
room_id: string;
|
|
4573
|
+
game_type: string;
|
|
4574
|
+
map_name?: string;
|
|
4575
|
+
duration: number;
|
|
4576
|
+
tick_rate: number;
|
|
4577
|
+
start_tick: number;
|
|
4578
|
+
end_tick: number;
|
|
4579
|
+
players: ReplayPlayerInfo[];
|
|
4580
|
+
file_size: number;
|
|
4581
|
+
created_at: string;
|
|
4582
|
+
schema_version?: string;
|
|
4583
|
+
}
|
|
4584
|
+
interface ReplayPlayerInfo {
|
|
4585
|
+
player_id: string;
|
|
4586
|
+
display_name: string;
|
|
4587
|
+
team_id?: string;
|
|
4588
|
+
}
|
|
4589
|
+
interface ReplayHighlight {
|
|
4590
|
+
tick: number;
|
|
4591
|
+
type: string;
|
|
4592
|
+
actor_id: string;
|
|
4593
|
+
score: number;
|
|
4594
|
+
}
|
|
4468
4595
|
|
|
4469
4596
|
/**
|
|
4470
4597
|
* 게임 룸 클라이언트
|
|
@@ -4656,6 +4783,25 @@ declare class GameAPI {
|
|
|
4656
4783
|
* 플레이어의 받은 초대 목록
|
|
4657
4784
|
*/
|
|
4658
4785
|
getPlayerInvites(playerId: string): Promise<LobbyInvite[]>;
|
|
4786
|
+
createParty(playerId: string, maxSize?: number): Promise<PartyInfo>;
|
|
4787
|
+
joinParty(partyId: string, playerId: string): Promise<PartyInfo>;
|
|
4788
|
+
leaveParty(partyId: string, playerId: string): Promise<void>;
|
|
4789
|
+
kickFromParty(partyId: string, playerId: string): Promise<void>;
|
|
4790
|
+
inviteToParty(partyId: string, inviterId: string, inviteeId: string): Promise<PartyInvite>;
|
|
4791
|
+
sendPartyChat(partyId: string, playerId: string, message: string): Promise<void>;
|
|
4792
|
+
joinSpectator(roomId: string, playerId: string): Promise<SpectatorInfo>;
|
|
4793
|
+
leaveSpectator(roomId: string, spectatorId: string): Promise<void>;
|
|
4794
|
+
getSpectators(roomId: string): Promise<SpectatorInfo[]>;
|
|
4795
|
+
getLeaderboard(top?: number): Promise<LeaderboardEntry[]>;
|
|
4796
|
+
getPlayerStats(playerId: string): Promise<PlayerStats>;
|
|
4797
|
+
getPlayerRank(playerId: string): Promise<LeaderboardEntry>;
|
|
4798
|
+
joinVoiceChannel(roomId: string, playerId: string): Promise<VoiceChannel>;
|
|
4799
|
+
leaveVoiceChannel(roomId: string, playerId: string): Promise<void>;
|
|
4800
|
+
setMute(playerId: string, muted: boolean): Promise<void>;
|
|
4801
|
+
listReplays(roomId?: string): Promise<ReplayInfo[]>;
|
|
4802
|
+
getReplay(replayId: string): Promise<ReplayInfo>;
|
|
4803
|
+
downloadReplay(replayId: string): Promise<ArrayBuffer>;
|
|
4804
|
+
getReplayHighlights(replayId: string): Promise<ReplayHighlight[]>;
|
|
4659
4805
|
private getHeaders;
|
|
4660
4806
|
}
|
|
4661
4807
|
|
|
@@ -5923,4 +6069,4 @@ declare class ConnectBase {
|
|
|
5923
6069
|
updateConfig(config: Partial<ConnectBaseConfig>): void;
|
|
5924
6070
|
}
|
|
5925
6071
|
|
|
5926
|
-
export { type AckMessagesRequest, type AdReportResponse, type AdReportSummary, AdsAPI, type AggregateResult, type AggregateStage, ApiError, type ApiKeyItem, 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 ChatRequest, type ChatResponse, type ChatStreamEvent, type ClientMessage, type ColumnSchema, type CommentListResponse, type CompleteUploadRequest, type CompleteUploadResponse, type ConfirmBillingKeyRequest, type ConfirmPaymentRequest, type ConfirmPaymentResponse, ConnectBase, type ConnectBaseConfig, type ConnectedData, type ConnectionState, type ConsumeMessagesResponse, type ConsumeOptions, type CopyTableRequest, type CopyTableResponse, type CreateApiKeyRequest, type CreateApiKeyResponse, type CreateBackupRequest, type CreateChannelRequest, type CreateColumnRequest, type CreateDataRequest, type CreateDocumentRequest, type CreateFolderRequest, type CreateFolderResponse, type CreateGeoIndexRequest, type CreateIndexRequest, type CreateLobbyRequest, type CreatePlaylistRequest, 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 DatabasePresenceState, type DatabaseRealtimeConnectOptions, type DatabaseRealtimeFilter, type DatabaseRealtimeHandlers, type DatabaseRealtimeSubscription, type DatabaseSnapshot, type DatabaseSnapshotMessage, type DatabaseSubscribeOptions, type DeleteWhereResponse, type DeviceInfo, type DocumentResponse, type EnabledProviderInfo, type EnabledProvidersResponse, type ErrorHandler, type ErrorMessage, type ErrorReport, type ErrorTrackerConfig, type ErrorType, type ExportDataRequest, type ExportDataResponse, type FetchApiKeysResponse, type FetchDataResponse, type FetchFilesResponse, type FileItem, type FileStats, GameAPI, type GameAction, type GameClientConfig, 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 KnowledgeChatMessage, type KnowledgeSearchRequest, type KnowledgeSearchResponse, type KnowledgeSearchResult, 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 MatchmakingTicket, 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 PauseSubscriptionRequest, type PaymentDetail, type PaymentProvider, type PaymentStatus, type PeerInfo, type Platform, type PlayerEvent, type Playlist, type PlaylistItem, type PongMessage, type PopulateOption, type Position, type PreparePaymentRequest, type PreparePaymentResponse, type PresenceChangeHandler, type PresenceInfo, type PresenceSetOptions, type PresenceStatus, type PresenceStatusResult, 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 RestoreBackupRequest, type RestoreBackupResponse, type RetentionPolicy, type RoomInfo, type RoomStats, type RoomsResponse, type SaveDialogOptions, type SaveDialogResult, type SearchIndex, type SearchOptions, type SearchResponse, type SearchResult, type SecurityRule, type SendOptions, type ServerMessage, type SetPageMetaRequest, type Shorts, type ShortsListResponse, type SignalingMessage, type SignalingMessageType, type SlowQueryInfo, type StateChange, type StateChangeHandler, type StorageUploadOptions, type StreamDoneCallback, type StreamDoneData, type StreamErrorCallback, type StreamHandlers, type StreamMessage, type StreamOptions, type StreamSession, type StreamTokenCallback, 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 TableIndex, type TableRelation, type TableSchema, type TransactionRead, type TransactionWrite, type TranscodeStatus, type TransportType, type Trigger, type TriggerEvent, type TriggerHandlerType, type TypingChangeHandler, type TypingInfo, type UpdateApiKeyRequest, type UpdateApiKeyResponse, type UpdateBillingKeyRequest, type UpdateChannelRequest, type UpdateColumnRequest, type UpdateCustomDataRequest, type UpdateCustomDataResponse, type UpdateDataRequest, type UpdateLobbyRequest, type UpdateSecurityRuleRequest, type UpdateSubscriptionRequest, type UpdateTriggerRequest, type UpdateVideoRequest, type UpdateVideoStorageRequest, type UploadByPathOptions, type UploadFileResponse, type UploadOptions, type UploadProgress, type VAPIDPublicKeyResponse, type ValidateResponse, type Video, type VideoComment, type VideoListOptions, type VideoListResponse, VideoProcessingError, type VideoQuality, type VideoStatus, type VideoStorage, type VideoStorageListResponse, type VideoVisibility, type WaitOptions, type WatchHistoryItem, type WebPushSubscription, type WebRTCConnectOptions, type WebRTCConnectionState, type WebRTCMode, type WhereCondition, type WhereOperator, ConnectBase as default, isWebTransportSupported };
|
|
6072
|
+
export { type AckMessagesRequest, type AdReportResponse, type AdReportSummary, AdsAPI, type AggregateResult, type AggregateStage, ApiError, type ApiKeyItem, 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 ChatRequest, type ChatResponse, type ChatStreamEvent, type ClientMessage, type ColumnSchema, type CommentListResponse, type CompleteUploadRequest, type CompleteUploadResponse, type ConfirmBillingKeyRequest, type ConfirmPaymentRequest, type ConfirmPaymentResponse, ConnectBase, type ConnectBaseConfig, type ConnectedData, type ConnectionState, type ConsumeMessagesResponse, type ConsumeOptions, type CopyTableRequest, type CopyTableResponse, type CreateApiKeyRequest, type CreateApiKeyResponse, type CreateBackupRequest, type CreateChannelRequest, type CreateColumnRequest, type CreateDataRequest, type CreateDocumentRequest, type CreateFolderRequest, type CreateFolderResponse, type CreateGeoIndexRequest, type CreateIndexRequest, type CreateLobbyRequest, type CreatePlaylistRequest, 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 DatabasePresenceState, type DatabaseRealtimeConnectOptions, type DatabaseRealtimeFilter, type DatabaseRealtimeHandlers, type DatabaseRealtimeSubscription, type DatabaseSnapshot, type DatabaseSnapshotMessage, type DatabaseSubscribeOptions, type DeleteWhereResponse, type DeviceInfo, type DocumentResponse, type EnabledProviderInfo, type EnabledProvidersResponse, type ErrorHandler, type ErrorMessage, type ErrorReport, type ErrorTrackerConfig, type ErrorType, type ExportDataRequest, type ExportDataResponse, type FetchApiKeysResponse, type FetchDataResponse, type FetchFilesResponse, type FileItem, type FileStats, GameAPI, type GameAction, type GameClientConfig, 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 KnowledgeChatMessage, type KnowledgeSearchRequest, type KnowledgeSearchResponse, type KnowledgeSearchResult, type LeaderboardEntry, 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 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 PongMessage, type PopulateOption, type Position, type PreparePaymentRequest, type PreparePaymentResponse, type PresenceChangeHandler, type PresenceInfo, type PresenceSetOptions, type PresenceStatus, type PresenceStatusResult, 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 SearchIndex, type SearchOptions, type SearchResponse, type SearchResult, type SecurityRule, type SendOptions, type ServerMessage, 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 StreamDoneCallback, type StreamDoneData, type StreamErrorCallback, type StreamHandlers, type StreamMessage, type StreamOptions, type StreamSession, type StreamTokenCallback, 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 TableIndex, type TableRelation, type TableSchema, type TransactionRead, type TransactionWrite, type TranscodeStatus, type TransportType, type Trigger, type TriggerEvent, type TriggerHandlerType, type TypingChangeHandler, type TypingInfo, type UpdateApiKeyRequest, type UpdateApiKeyResponse, type UpdateBillingKeyRequest, type UpdateChannelRequest, type UpdateColumnRequest, type UpdateCustomDataRequest, type UpdateCustomDataResponse, type UpdateDataRequest, type UpdateLobbyRequest, type UpdateSecurityRuleRequest, type UpdateSubscriptionRequest, type UpdateTriggerRequest, type UpdateVideoRequest, type UpdateVideoStorageRequest, type UploadByPathOptions, type UploadFileResponse, type UploadOptions, type UploadProgress, type VAPIDPublicKeyResponse, type ValidateResponse, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1831,9 +1831,9 @@ interface StreamMessage {
|
|
|
1831
1831
|
}
|
|
1832
1832
|
/** AI 스트리밍 요청 옵션 */
|
|
1833
1833
|
interface StreamOptions {
|
|
1834
|
-
/** AI 프로바이더 (
|
|
1834
|
+
/** AI 프로바이더 (앱 설정의 프로바이더 사용. override 시 지정) */
|
|
1835
1835
|
provider?: 'gemini' | 'openai' | 'claude';
|
|
1836
|
-
/** 모델명 (
|
|
1836
|
+
/** 모델명 (앱 설정의 모델을 override (선택적)) */
|
|
1837
1837
|
model?: string;
|
|
1838
1838
|
/** 시스템 프롬프트 */
|
|
1839
1839
|
system?: string;
|
|
@@ -4465,6 +4465,133 @@ interface LobbyInvite {
|
|
|
4465
4465
|
createdAt: string;
|
|
4466
4466
|
expiresAt: string;
|
|
4467
4467
|
}
|
|
4468
|
+
interface PartyInfo {
|
|
4469
|
+
id: string;
|
|
4470
|
+
app_id: string;
|
|
4471
|
+
leader_id: string;
|
|
4472
|
+
members: PartyMember[];
|
|
4473
|
+
max_size: number;
|
|
4474
|
+
settings?: Record<string, string>;
|
|
4475
|
+
state: string;
|
|
4476
|
+
created_at: string;
|
|
4477
|
+
updated_at: string;
|
|
4478
|
+
}
|
|
4479
|
+
interface PartyMember {
|
|
4480
|
+
player_id: string;
|
|
4481
|
+
display_name?: string;
|
|
4482
|
+
ready: boolean;
|
|
4483
|
+
role: string;
|
|
4484
|
+
joined_at: string;
|
|
4485
|
+
metadata?: Record<string, string>;
|
|
4486
|
+
}
|
|
4487
|
+
interface PartyInvite {
|
|
4488
|
+
invite_id: string;
|
|
4489
|
+
party_id: string;
|
|
4490
|
+
inviter_id: string;
|
|
4491
|
+
status: string;
|
|
4492
|
+
expires_at: string;
|
|
4493
|
+
}
|
|
4494
|
+
interface SpectatorInfo {
|
|
4495
|
+
id: string;
|
|
4496
|
+
user_id?: string;
|
|
4497
|
+
room_id: string;
|
|
4498
|
+
mode: "free" | "follow" | "director";
|
|
4499
|
+
target_id?: string;
|
|
4500
|
+
joined_at: string;
|
|
4501
|
+
delay_seconds?: number;
|
|
4502
|
+
}
|
|
4503
|
+
interface SpectatorState {
|
|
4504
|
+
room_id: string;
|
|
4505
|
+
tick: number;
|
|
4506
|
+
timestamp: number;
|
|
4507
|
+
players: SpectatorPlayerState[];
|
|
4508
|
+
game_state?: Record<string, unknown>;
|
|
4509
|
+
events?: Record<string, unknown>[];
|
|
4510
|
+
}
|
|
4511
|
+
interface SpectatorPlayerState {
|
|
4512
|
+
id: string;
|
|
4513
|
+
display_name: string;
|
|
4514
|
+
position: {
|
|
4515
|
+
x: number;
|
|
4516
|
+
y: number;
|
|
4517
|
+
z: number;
|
|
4518
|
+
};
|
|
4519
|
+
health?: number;
|
|
4520
|
+
score?: number;
|
|
4521
|
+
is_alive: boolean;
|
|
4522
|
+
}
|
|
4523
|
+
interface LeaderboardEntry {
|
|
4524
|
+
rank: number;
|
|
4525
|
+
player_id: string;
|
|
4526
|
+
display_name: string;
|
|
4527
|
+
rating: number;
|
|
4528
|
+
wins: number;
|
|
4529
|
+
losses: number;
|
|
4530
|
+
games_played: number;
|
|
4531
|
+
win_rate: number;
|
|
4532
|
+
tier: string;
|
|
4533
|
+
division: number;
|
|
4534
|
+
updated_at: string;
|
|
4535
|
+
}
|
|
4536
|
+
interface PlayerStats {
|
|
4537
|
+
player_id: string;
|
|
4538
|
+
rating: number;
|
|
4539
|
+
wins: number;
|
|
4540
|
+
losses: number;
|
|
4541
|
+
games_played: number;
|
|
4542
|
+
win_rate: number;
|
|
4543
|
+
tier: string;
|
|
4544
|
+
division: number;
|
|
4545
|
+
match_history: MatchResult[];
|
|
4546
|
+
}
|
|
4547
|
+
interface MatchResult {
|
|
4548
|
+
match_id: string;
|
|
4549
|
+
result: "win" | "loss" | "draw";
|
|
4550
|
+
rating_change: number;
|
|
4551
|
+
played_at: string;
|
|
4552
|
+
}
|
|
4553
|
+
interface VoiceChannel {
|
|
4554
|
+
id: string;
|
|
4555
|
+
room_id: string;
|
|
4556
|
+
name: string;
|
|
4557
|
+
type: "global" | "team" | "proximity" | "private" | "spectator";
|
|
4558
|
+
team_id?: string;
|
|
4559
|
+
max_members: number;
|
|
4560
|
+
members: Record<string, VoiceMember>;
|
|
4561
|
+
webrtc_room_id: string;
|
|
4562
|
+
created_at: string;
|
|
4563
|
+
}
|
|
4564
|
+
interface VoiceMember {
|
|
4565
|
+
player_id: string;
|
|
4566
|
+
display_name: string;
|
|
4567
|
+
joined_at: string;
|
|
4568
|
+
webrtc_url?: string;
|
|
4569
|
+
}
|
|
4570
|
+
interface ReplayInfo {
|
|
4571
|
+
id: string;
|
|
4572
|
+
room_id: string;
|
|
4573
|
+
game_type: string;
|
|
4574
|
+
map_name?: string;
|
|
4575
|
+
duration: number;
|
|
4576
|
+
tick_rate: number;
|
|
4577
|
+
start_tick: number;
|
|
4578
|
+
end_tick: number;
|
|
4579
|
+
players: ReplayPlayerInfo[];
|
|
4580
|
+
file_size: number;
|
|
4581
|
+
created_at: string;
|
|
4582
|
+
schema_version?: string;
|
|
4583
|
+
}
|
|
4584
|
+
interface ReplayPlayerInfo {
|
|
4585
|
+
player_id: string;
|
|
4586
|
+
display_name: string;
|
|
4587
|
+
team_id?: string;
|
|
4588
|
+
}
|
|
4589
|
+
interface ReplayHighlight {
|
|
4590
|
+
tick: number;
|
|
4591
|
+
type: string;
|
|
4592
|
+
actor_id: string;
|
|
4593
|
+
score: number;
|
|
4594
|
+
}
|
|
4468
4595
|
|
|
4469
4596
|
/**
|
|
4470
4597
|
* 게임 룸 클라이언트
|
|
@@ -4656,6 +4783,25 @@ declare class GameAPI {
|
|
|
4656
4783
|
* 플레이어의 받은 초대 목록
|
|
4657
4784
|
*/
|
|
4658
4785
|
getPlayerInvites(playerId: string): Promise<LobbyInvite[]>;
|
|
4786
|
+
createParty(playerId: string, maxSize?: number): Promise<PartyInfo>;
|
|
4787
|
+
joinParty(partyId: string, playerId: string): Promise<PartyInfo>;
|
|
4788
|
+
leaveParty(partyId: string, playerId: string): Promise<void>;
|
|
4789
|
+
kickFromParty(partyId: string, playerId: string): Promise<void>;
|
|
4790
|
+
inviteToParty(partyId: string, inviterId: string, inviteeId: string): Promise<PartyInvite>;
|
|
4791
|
+
sendPartyChat(partyId: string, playerId: string, message: string): Promise<void>;
|
|
4792
|
+
joinSpectator(roomId: string, playerId: string): Promise<SpectatorInfo>;
|
|
4793
|
+
leaveSpectator(roomId: string, spectatorId: string): Promise<void>;
|
|
4794
|
+
getSpectators(roomId: string): Promise<SpectatorInfo[]>;
|
|
4795
|
+
getLeaderboard(top?: number): Promise<LeaderboardEntry[]>;
|
|
4796
|
+
getPlayerStats(playerId: string): Promise<PlayerStats>;
|
|
4797
|
+
getPlayerRank(playerId: string): Promise<LeaderboardEntry>;
|
|
4798
|
+
joinVoiceChannel(roomId: string, playerId: string): Promise<VoiceChannel>;
|
|
4799
|
+
leaveVoiceChannel(roomId: string, playerId: string): Promise<void>;
|
|
4800
|
+
setMute(playerId: string, muted: boolean): Promise<void>;
|
|
4801
|
+
listReplays(roomId?: string): Promise<ReplayInfo[]>;
|
|
4802
|
+
getReplay(replayId: string): Promise<ReplayInfo>;
|
|
4803
|
+
downloadReplay(replayId: string): Promise<ArrayBuffer>;
|
|
4804
|
+
getReplayHighlights(replayId: string): Promise<ReplayHighlight[]>;
|
|
4659
4805
|
private getHeaders;
|
|
4660
4806
|
}
|
|
4661
4807
|
|
|
@@ -5923,4 +6069,4 @@ declare class ConnectBase {
|
|
|
5923
6069
|
updateConfig(config: Partial<ConnectBaseConfig>): void;
|
|
5924
6070
|
}
|
|
5925
6071
|
|
|
5926
|
-
export { type AckMessagesRequest, type AdReportResponse, type AdReportSummary, AdsAPI, type AggregateResult, type AggregateStage, ApiError, type ApiKeyItem, 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 ChatRequest, type ChatResponse, type ChatStreamEvent, type ClientMessage, type ColumnSchema, type CommentListResponse, type CompleteUploadRequest, type CompleteUploadResponse, type ConfirmBillingKeyRequest, type ConfirmPaymentRequest, type ConfirmPaymentResponse, ConnectBase, type ConnectBaseConfig, type ConnectedData, type ConnectionState, type ConsumeMessagesResponse, type ConsumeOptions, type CopyTableRequest, type CopyTableResponse, type CreateApiKeyRequest, type CreateApiKeyResponse, type CreateBackupRequest, type CreateChannelRequest, type CreateColumnRequest, type CreateDataRequest, type CreateDocumentRequest, type CreateFolderRequest, type CreateFolderResponse, type CreateGeoIndexRequest, type CreateIndexRequest, type CreateLobbyRequest, type CreatePlaylistRequest, 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 DatabasePresenceState, type DatabaseRealtimeConnectOptions, type DatabaseRealtimeFilter, type DatabaseRealtimeHandlers, type DatabaseRealtimeSubscription, type DatabaseSnapshot, type DatabaseSnapshotMessage, type DatabaseSubscribeOptions, type DeleteWhereResponse, type DeviceInfo, type DocumentResponse, type EnabledProviderInfo, type EnabledProvidersResponse, type ErrorHandler, type ErrorMessage, type ErrorReport, type ErrorTrackerConfig, type ErrorType, type ExportDataRequest, type ExportDataResponse, type FetchApiKeysResponse, type FetchDataResponse, type FetchFilesResponse, type FileItem, type FileStats, GameAPI, type GameAction, type GameClientConfig, 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 KnowledgeChatMessage, type KnowledgeSearchRequest, type KnowledgeSearchResponse, type KnowledgeSearchResult, 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 MatchmakingTicket, 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 PauseSubscriptionRequest, type PaymentDetail, type PaymentProvider, type PaymentStatus, type PeerInfo, type Platform, type PlayerEvent, type Playlist, type PlaylistItem, type PongMessage, type PopulateOption, type Position, type PreparePaymentRequest, type PreparePaymentResponse, type PresenceChangeHandler, type PresenceInfo, type PresenceSetOptions, type PresenceStatus, type PresenceStatusResult, 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 RestoreBackupRequest, type RestoreBackupResponse, type RetentionPolicy, type RoomInfo, type RoomStats, type RoomsResponse, type SaveDialogOptions, type SaveDialogResult, type SearchIndex, type SearchOptions, type SearchResponse, type SearchResult, type SecurityRule, type SendOptions, type ServerMessage, type SetPageMetaRequest, type Shorts, type ShortsListResponse, type SignalingMessage, type SignalingMessageType, type SlowQueryInfo, type StateChange, type StateChangeHandler, type StorageUploadOptions, type StreamDoneCallback, type StreamDoneData, type StreamErrorCallback, type StreamHandlers, type StreamMessage, type StreamOptions, type StreamSession, type StreamTokenCallback, 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 TableIndex, type TableRelation, type TableSchema, type TransactionRead, type TransactionWrite, type TranscodeStatus, type TransportType, type Trigger, type TriggerEvent, type TriggerHandlerType, type TypingChangeHandler, type TypingInfo, type UpdateApiKeyRequest, type UpdateApiKeyResponse, type UpdateBillingKeyRequest, type UpdateChannelRequest, type UpdateColumnRequest, type UpdateCustomDataRequest, type UpdateCustomDataResponse, type UpdateDataRequest, type UpdateLobbyRequest, type UpdateSecurityRuleRequest, type UpdateSubscriptionRequest, type UpdateTriggerRequest, type UpdateVideoRequest, type UpdateVideoStorageRequest, type UploadByPathOptions, type UploadFileResponse, type UploadOptions, type UploadProgress, type VAPIDPublicKeyResponse, type ValidateResponse, type Video, type VideoComment, type VideoListOptions, type VideoListResponse, VideoProcessingError, type VideoQuality, type VideoStatus, type VideoStorage, type VideoStorageListResponse, type VideoVisibility, type WaitOptions, type WatchHistoryItem, type WebPushSubscription, type WebRTCConnectOptions, type WebRTCConnectionState, type WebRTCMode, type WhereCondition, type WhereOperator, ConnectBase as default, isWebTransportSupported };
|
|
6072
|
+
export { type AckMessagesRequest, type AdReportResponse, type AdReportSummary, AdsAPI, type AggregateResult, type AggregateStage, ApiError, type ApiKeyItem, 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 ChatRequest, type ChatResponse, type ChatStreamEvent, type ClientMessage, type ColumnSchema, type CommentListResponse, type CompleteUploadRequest, type CompleteUploadResponse, type ConfirmBillingKeyRequest, type ConfirmPaymentRequest, type ConfirmPaymentResponse, ConnectBase, type ConnectBaseConfig, type ConnectedData, type ConnectionState, type ConsumeMessagesResponse, type ConsumeOptions, type CopyTableRequest, type CopyTableResponse, type CreateApiKeyRequest, type CreateApiKeyResponse, type CreateBackupRequest, type CreateChannelRequest, type CreateColumnRequest, type CreateDataRequest, type CreateDocumentRequest, type CreateFolderRequest, type CreateFolderResponse, type CreateGeoIndexRequest, type CreateIndexRequest, type CreateLobbyRequest, type CreatePlaylistRequest, 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 DatabasePresenceState, type DatabaseRealtimeConnectOptions, type DatabaseRealtimeFilter, type DatabaseRealtimeHandlers, type DatabaseRealtimeSubscription, type DatabaseSnapshot, type DatabaseSnapshotMessage, type DatabaseSubscribeOptions, type DeleteWhereResponse, type DeviceInfo, type DocumentResponse, type EnabledProviderInfo, type EnabledProvidersResponse, type ErrorHandler, type ErrorMessage, type ErrorReport, type ErrorTrackerConfig, type ErrorType, type ExportDataRequest, type ExportDataResponse, type FetchApiKeysResponse, type FetchDataResponse, type FetchFilesResponse, type FileItem, type FileStats, GameAPI, type GameAction, type GameClientConfig, 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 KnowledgeChatMessage, type KnowledgeSearchRequest, type KnowledgeSearchResponse, type KnowledgeSearchResult, type LeaderboardEntry, 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 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 PongMessage, type PopulateOption, type Position, type PreparePaymentRequest, type PreparePaymentResponse, type PresenceChangeHandler, type PresenceInfo, type PresenceSetOptions, type PresenceStatus, type PresenceStatusResult, 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 SearchIndex, type SearchOptions, type SearchResponse, type SearchResult, type SecurityRule, type SendOptions, type ServerMessage, 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 StreamDoneCallback, type StreamDoneData, type StreamErrorCallback, type StreamHandlers, type StreamMessage, type StreamOptions, type StreamSession, type StreamTokenCallback, 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 TableIndex, type TableRelation, type TableSchema, type TransactionRead, type TransactionWrite, type TranscodeStatus, type TransportType, type Trigger, type TriggerEvent, type TriggerHandlerType, type TypingChangeHandler, type TypingInfo, type UpdateApiKeyRequest, type UpdateApiKeyResponse, type UpdateBillingKeyRequest, type UpdateChannelRequest, type UpdateColumnRequest, type UpdateCustomDataRequest, type UpdateCustomDataResponse, type UpdateDataRequest, type UpdateLobbyRequest, type UpdateSecurityRuleRequest, type UpdateSubscriptionRequest, type UpdateTriggerRequest, type UpdateVideoRequest, type UpdateVideoStorageRequest, type UploadByPathOptions, type UploadFileResponse, type UploadOptions, type UploadProgress, type VAPIDPublicKeyResponse, type ValidateResponse, 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 };
|
package/dist/index.js
CHANGED
|
@@ -6258,6 +6258,183 @@ var GameAPI = class {
|
|
|
6258
6258
|
expiresAt: inv.expires_at
|
|
6259
6259
|
}));
|
|
6260
6260
|
}
|
|
6261
|
+
// --- Party API ---
|
|
6262
|
+
async createParty(playerId, maxSize) {
|
|
6263
|
+
const id = this.appId || "";
|
|
6264
|
+
const response = await fetch(`${this.gameServerUrl}/v1/game/${id}/parties`, {
|
|
6265
|
+
method: "POST",
|
|
6266
|
+
headers: { ...this.getHeaders(), "Content-Type": "application/json" },
|
|
6267
|
+
body: JSON.stringify({ player_id: playerId, max_size: maxSize || 4 })
|
|
6268
|
+
});
|
|
6269
|
+
if (!response.ok) throw new Error(`Failed to create party: ${response.statusText}`);
|
|
6270
|
+
return response.json();
|
|
6271
|
+
}
|
|
6272
|
+
async joinParty(partyId, playerId) {
|
|
6273
|
+
const id = this.appId || "";
|
|
6274
|
+
const response = await fetch(`${this.gameServerUrl}/v1/game/${id}/parties/${partyId}/join`, {
|
|
6275
|
+
method: "POST",
|
|
6276
|
+
headers: { ...this.getHeaders(), "Content-Type": "application/json" },
|
|
6277
|
+
body: JSON.stringify({ player_id: playerId })
|
|
6278
|
+
});
|
|
6279
|
+
if (!response.ok) throw new Error(`Failed to join party: ${response.statusText}`);
|
|
6280
|
+
return response.json();
|
|
6281
|
+
}
|
|
6282
|
+
async leaveParty(partyId, playerId) {
|
|
6283
|
+
const id = this.appId || "";
|
|
6284
|
+
const response = await fetch(`${this.gameServerUrl}/v1/game/${id}/parties/${partyId}/leave`, {
|
|
6285
|
+
method: "POST",
|
|
6286
|
+
headers: { ...this.getHeaders(), "Content-Type": "application/json" },
|
|
6287
|
+
body: JSON.stringify({ player_id: playerId })
|
|
6288
|
+
});
|
|
6289
|
+
if (!response.ok) throw new Error(`Failed to leave party: ${response.statusText}`);
|
|
6290
|
+
}
|
|
6291
|
+
async kickFromParty(partyId, playerId) {
|
|
6292
|
+
const id = this.appId || "";
|
|
6293
|
+
const response = await fetch(`${this.gameServerUrl}/v1/game/${id}/parties/${partyId}/kick/${playerId}`, {
|
|
6294
|
+
method: "POST",
|
|
6295
|
+
headers: this.getHeaders()
|
|
6296
|
+
});
|
|
6297
|
+
if (!response.ok) throw new Error(`Failed to kick from party: ${response.statusText}`);
|
|
6298
|
+
}
|
|
6299
|
+
async inviteToParty(partyId, inviterId, inviteeId) {
|
|
6300
|
+
const id = this.appId || "";
|
|
6301
|
+
const response = await fetch(`${this.gameServerUrl}/v1/game/${id}/parties/${partyId}/invite/${inviteeId}`, {
|
|
6302
|
+
method: "POST",
|
|
6303
|
+
headers: { ...this.getHeaders(), "Content-Type": "application/json" },
|
|
6304
|
+
body: JSON.stringify({ inviter_id: inviterId })
|
|
6305
|
+
});
|
|
6306
|
+
if (!response.ok) throw new Error(`Failed to invite to party: ${response.statusText}`);
|
|
6307
|
+
return response.json();
|
|
6308
|
+
}
|
|
6309
|
+
async sendPartyChat(partyId, playerId, message) {
|
|
6310
|
+
const id = this.appId || "";
|
|
6311
|
+
const response = await fetch(`${this.gameServerUrl}/v1/game/${id}/parties/${partyId}/chat`, {
|
|
6312
|
+
method: "POST",
|
|
6313
|
+
headers: { ...this.getHeaders(), "Content-Type": "application/json" },
|
|
6314
|
+
body: JSON.stringify({ player_id: playerId, message })
|
|
6315
|
+
});
|
|
6316
|
+
if (!response.ok) throw new Error(`Failed to send party chat: ${response.statusText}`);
|
|
6317
|
+
}
|
|
6318
|
+
// --- Spectator API ---
|
|
6319
|
+
async joinSpectator(roomId, playerId) {
|
|
6320
|
+
const id = this.appId || "";
|
|
6321
|
+
const response = await fetch(`${this.gameServerUrl}/v1/game/${id}/rooms/${roomId}/spectate`, {
|
|
6322
|
+
method: "POST",
|
|
6323
|
+
headers: { ...this.getHeaders(), "Content-Type": "application/json" },
|
|
6324
|
+
body: JSON.stringify({ player_id: playerId })
|
|
6325
|
+
});
|
|
6326
|
+
if (!response.ok) throw new Error(`Failed to join spectator: ${response.statusText}`);
|
|
6327
|
+
return response.json();
|
|
6328
|
+
}
|
|
6329
|
+
async leaveSpectator(roomId, spectatorId) {
|
|
6330
|
+
const id = this.appId || "";
|
|
6331
|
+
const response = await fetch(`${this.gameServerUrl}/v1/game/${id}/rooms/${roomId}/spectate/stop`, {
|
|
6332
|
+
method: "POST",
|
|
6333
|
+
headers: { ...this.getHeaders(), "Content-Type": "application/json" },
|
|
6334
|
+
body: JSON.stringify({ spectator_id: spectatorId })
|
|
6335
|
+
});
|
|
6336
|
+
if (!response.ok) throw new Error(`Failed to leave spectator: ${response.statusText}`);
|
|
6337
|
+
}
|
|
6338
|
+
async getSpectators(roomId) {
|
|
6339
|
+
const id = this.appId || "";
|
|
6340
|
+
const response = await fetch(`${this.gameServerUrl}/v1/game/${id}/rooms/${roomId}/spectators`, {
|
|
6341
|
+
headers: this.getHeaders()
|
|
6342
|
+
});
|
|
6343
|
+
if (!response.ok) throw new Error(`Failed to get spectators: ${response.statusText}`);
|
|
6344
|
+
const data = await response.json();
|
|
6345
|
+
return data.spectators || [];
|
|
6346
|
+
}
|
|
6347
|
+
// --- Ranking/Leaderboard API ---
|
|
6348
|
+
async getLeaderboard(top) {
|
|
6349
|
+
const id = this.appId || "";
|
|
6350
|
+
const limit = top || 100;
|
|
6351
|
+
const response = await fetch(`${this.gameServerUrl}/v1/game/${id}/ranking/leaderboard/top?limit=${limit}`, {
|
|
6352
|
+
headers: this.getHeaders()
|
|
6353
|
+
});
|
|
6354
|
+
if (!response.ok) throw new Error(`Failed to get leaderboard: ${response.statusText}`);
|
|
6355
|
+
const data = await response.json();
|
|
6356
|
+
return data.entries || [];
|
|
6357
|
+
}
|
|
6358
|
+
async getPlayerStats(playerId) {
|
|
6359
|
+
const id = this.appId || "";
|
|
6360
|
+
const response = await fetch(`${this.gameServerUrl}/v1/game/${id}/ranking/players/${playerId}/stats`, {
|
|
6361
|
+
headers: this.getHeaders()
|
|
6362
|
+
});
|
|
6363
|
+
if (!response.ok) throw new Error(`Failed to get player stats: ${response.statusText}`);
|
|
6364
|
+
return response.json();
|
|
6365
|
+
}
|
|
6366
|
+
async getPlayerRank(playerId) {
|
|
6367
|
+
const id = this.appId || "";
|
|
6368
|
+
const response = await fetch(`${this.gameServerUrl}/v1/game/${id}/ranking/players/${playerId}/rank`, {
|
|
6369
|
+
headers: this.getHeaders()
|
|
6370
|
+
});
|
|
6371
|
+
if (!response.ok) throw new Error(`Failed to get player rank: ${response.statusText}`);
|
|
6372
|
+
return response.json();
|
|
6373
|
+
}
|
|
6374
|
+
// --- Voice API ---
|
|
6375
|
+
async joinVoiceChannel(roomId, playerId) {
|
|
6376
|
+
const id = this.appId || "";
|
|
6377
|
+
const response = await fetch(`${this.gameServerUrl}/v1/game/${id}/voice/rooms/${roomId}/join`, {
|
|
6378
|
+
method: "POST",
|
|
6379
|
+
headers: { ...this.getHeaders(), "Content-Type": "application/json" },
|
|
6380
|
+
body: JSON.stringify({ player_id: playerId })
|
|
6381
|
+
});
|
|
6382
|
+
if (!response.ok) throw new Error(`Failed to join voice channel: ${response.statusText}`);
|
|
6383
|
+
return response.json();
|
|
6384
|
+
}
|
|
6385
|
+
async leaveVoiceChannel(roomId, playerId) {
|
|
6386
|
+
const id = this.appId || "";
|
|
6387
|
+
const response = await fetch(`${this.gameServerUrl}/v1/game/${id}/voice/rooms/${roomId}/leave`, {
|
|
6388
|
+
method: "POST",
|
|
6389
|
+
headers: { ...this.getHeaders(), "Content-Type": "application/json" },
|
|
6390
|
+
body: JSON.stringify({ player_id: playerId })
|
|
6391
|
+
});
|
|
6392
|
+
if (!response.ok) throw new Error(`Failed to leave voice channel: ${response.statusText}`);
|
|
6393
|
+
}
|
|
6394
|
+
async setMute(playerId, muted) {
|
|
6395
|
+
const id = this.appId || "";
|
|
6396
|
+
const response = await fetch(`${this.gameServerUrl}/v1/game/${id}/voice/mute`, {
|
|
6397
|
+
method: "POST",
|
|
6398
|
+
headers: { ...this.getHeaders(), "Content-Type": "application/json" },
|
|
6399
|
+
body: JSON.stringify({ player_id: playerId, muted })
|
|
6400
|
+
});
|
|
6401
|
+
if (!response.ok) throw new Error(`Failed to set mute: ${response.statusText}`);
|
|
6402
|
+
}
|
|
6403
|
+
// --- Replay API ---
|
|
6404
|
+
async listReplays(roomId) {
|
|
6405
|
+
const id = this.appId || "";
|
|
6406
|
+
let url = `${this.gameServerUrl}/v1/game/${id}/replays`;
|
|
6407
|
+
if (roomId) url += `?room_id=${roomId}`;
|
|
6408
|
+
const response = await fetch(url, { headers: this.getHeaders() });
|
|
6409
|
+
if (!response.ok) throw new Error(`Failed to list replays: ${response.statusText}`);
|
|
6410
|
+
const data = await response.json();
|
|
6411
|
+
return data.replays || [];
|
|
6412
|
+
}
|
|
6413
|
+
async getReplay(replayId) {
|
|
6414
|
+
const id = this.appId || "";
|
|
6415
|
+
const response = await fetch(`${this.gameServerUrl}/v1/game/${id}/replays/${replayId}`, {
|
|
6416
|
+
headers: this.getHeaders()
|
|
6417
|
+
});
|
|
6418
|
+
if (!response.ok) throw new Error(`Failed to get replay: ${response.statusText}`);
|
|
6419
|
+
return response.json();
|
|
6420
|
+
}
|
|
6421
|
+
async downloadReplay(replayId) {
|
|
6422
|
+
const id = this.appId || "";
|
|
6423
|
+
const response = await fetch(`${this.gameServerUrl}/v1/game/${id}/replays/${replayId}/download`, {
|
|
6424
|
+
headers: this.getHeaders()
|
|
6425
|
+
});
|
|
6426
|
+
if (!response.ok) throw new Error(`Failed to download replay: ${response.statusText}`);
|
|
6427
|
+
return response.arrayBuffer();
|
|
6428
|
+
}
|
|
6429
|
+
async getReplayHighlights(replayId) {
|
|
6430
|
+
const id = this.appId || "";
|
|
6431
|
+
const response = await fetch(`${this.gameServerUrl}/v1/game/${id}/replays/${replayId}/highlights`, {
|
|
6432
|
+
headers: this.getHeaders()
|
|
6433
|
+
});
|
|
6434
|
+
if (!response.ok) throw new Error(`Failed to get highlights: ${response.statusText}`);
|
|
6435
|
+
const data = await response.json();
|
|
6436
|
+
return data.highlights || [];
|
|
6437
|
+
}
|
|
6261
6438
|
getHeaders() {
|
|
6262
6439
|
const headers = {};
|
|
6263
6440
|
const apiKey = this.http.getApiKey();
|