connectbase-client 6.30.0 → 6.31.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/index.d.mts CHANGED
@@ -6055,6 +6055,47 @@ declare class GameAPI {
6055
6055
  getScriptMetrics(appId: string, name: string): Promise<ScriptMetricsResponse>;
6056
6056
  }
6057
6057
 
6058
+ /**
6059
+ * 앱 간 연동 이벤트 발송 옵션 (`cb.integrations.emitEvent`).
6060
+ */
6061
+ interface EmitIntegrationEventOptions {
6062
+ /** 이 연결 앱(OAuth client id)의 웹훅으로만 보낸다. 생략하면 이벤트를 구독한 모든 연결 앱. */
6063
+ targetClientId?: string;
6064
+ }
6065
+ /**
6066
+ * 앱 간 연동 이벤트 발송 응답 (`POST /v1/public/integrations/events`, 202).
6067
+ * 받는 주소가 없어도 `queued` 다 — 실제 발송 결과는 연결 앱 쪽 웹훅 발송 기록에서 본다.
6068
+ */
6069
+ interface EmitIntegrationEventResponse {
6070
+ status: "queued";
6071
+ event_type: string;
6072
+ }
6073
+
6074
+ /**
6075
+ * 앱 간 연동 API (서버 전용).
6076
+ *
6077
+ * 콘솔 "앱 간 연동 → 보낼 이벤트" 에 등록한 이벤트를, 이 앱과 연결된 앱들의 웹훅으로 보낸다.
6078
+ * 연결된 앱마다 서명된 웹훅이 나가는 쓰기라 브라우저(퍼블릭 키만)에서는 부를 수 없다 —
6079
+ * 서버에서 `secretKey`(cb_sk_) 와 함께, 또는 함수의 `ctx.cbAdmin`(management_scopes: ["integration:emit"]) 으로 쓴다.
6080
+ */
6081
+ declare class IntegrationsAPI {
6082
+ private http;
6083
+ constructor(http: HttpClient);
6084
+ /**
6085
+ * 등록한 이벤트를 연결된 앱들에 보낸다.
6086
+ *
6087
+ * 등록하지 않았거나 꺼 둔 이벤트, `payload_schema` 에 맞지 않는 값, 플랫폼 이벤트 이름
6088
+ * (`consent.` `token.` `oauth.` `oidc.` `issue.`), 64KB 넘는 payload 는 서버가 거절한다.
6089
+ *
6090
+ * @example
6091
+ * ```ts
6092
+ * // 함수 (service_role + management_scopes: ["integration:emit"])
6093
+ * await ctx.cbAdmin.integrations.emitEvent("order.paid", { order_id: "o_1", amount: 1200 })
6094
+ * ```
6095
+ */
6096
+ emitEvent(eventType: string, payload?: Record<string, unknown>, options?: EmitIntegrationEventOptions): Promise<EmitIntegrationEventResponse>;
6097
+ }
6098
+
6058
6099
  interface CreateDocumentRequest {
6059
6100
  name: string;
6060
6101
  source_type?: "file" | "text" | "url";
@@ -6204,6 +6245,13 @@ interface KnowledgeSearchResponse {
6204
6245
  agentic?: boolean;
6205
6246
  /** 수행된 agentic 검색 라운드 수 (1~2). 0 또는 미존재는 폴백을 의미. */
6206
6247
  agentic_rounds?: number;
6248
+ /**
6249
+ * 의미(벡터) 검색이 실제로 섞였는지. `false` 면 키워드(BM25)만 돌았다 — 이유는 `semantic_reason`.
6250
+ * agentic 응답에는 없다.
6251
+ */
6252
+ semantic?: boolean;
6253
+ /** `semantic: false` 인 이유: 임베딩 켠 키 없음 / 임베딩 호출 실패 / 요청이 `hybrid: false`. */
6254
+ semantic_reason?: "no_embedding_key" | "embedding_failed" | "disabled";
6207
6255
  }
6208
6256
 
6209
6257
  /**
@@ -13798,6 +13846,10 @@ declare class ConnectBase {
13798
13846
  * 결제 API (토스페이먼츠)
13799
13847
  */
13800
13848
  readonly payment: PaymentAPI;
13849
+ /**
13850
+ * 앱 간 연동 API — 등록한 이벤트를 연결된 앱들에 보내기 (서버 전용: secretKey 또는 함수 ctx.cbAdmin)
13851
+ */
13852
+ readonly integrations: IntegrationsAPI;
13801
13853
  /**
13802
13854
  * 정기결제/구독 API
13803
13855
  */
@@ -13913,4 +13965,4 @@ declare class ConnectBase {
13913
13965
  updateConfig(config: Partial<ConnectBaseConfig>): void;
13914
13966
  }
13915
13967
 
13916
- export { AIAPI, type AIChatOptions, type AIChatRequest, type AIChatResponse, type AIChatStreamCallbacks, type AIChatStreamOptions, AIError, type AIErrorCode, type AIGeneratedImage, type AIMessage, type AISource, type AIStreamChunk, type AITool, type AIToolCall, type AIToolEvent, AUTH_MEMBER_ID_TOKEN, type AcceptInvitationResponse, type AckMessagesRequest, type AckMessagesResponse, type AdMobDailyReport, type AdMobReportResponse, type AdMobReportSummary, type AdReportResponse, type AdReportSummary, type AdmobConnectionInfo, AdsAPI, type AdsenseConnectionInfo, type AgenticSearchProgress, type AggregateResult, type AggregateStage, type AnalyticsConfig, type AnalyticsEvent, ApiError, type ApiErrorDetail, type AppMemberDetail, type AppMemberIdentityDetail, type AppMemberIdentitySummary, type AppMemberList, type AppMemberListItem, type AppMemberProviderType, AppMembersAPI, type AppStatsResponse, type ArchivePolicy, type AtomicOperator, type AtomicOperatorType, AuthError, type AuthSettingsResponse, type BackupInfo, type BatchOperation, type BatchOperationResult, type BatchSetPageMetaRequest, type BatchWriteResult, type BillingCycle, type BillingKeyResponse, type BiometricInfo, type BiometricResult, type BulkCreateResponse, type BulkError, type CPUInfo, type CancelPaymentRequest, type CancelPaymentResponse, type CancelSubscriptionRequest, type CategoryInfo, type ChangePlanOptions, type ChangePlanPreview, type ChangePlanRequest, type ChangePlanWithPriceRef, type ChangePlanWithProduct, type Channel, type ChannelMembership, type ChannelStats, type ChargeWithBillingKeyAmount, type ChargeWithBillingKeyOptions, type ChargeWithBillingKeyProduct, 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 CreateCheckoutSessionOptions, type CreateCheckoutSessionRequest, type CreateCheckoutSessionResponse, type CreateCheckoutSessionWithAmount, type CreateCheckoutSessionWithProduct, type CreateColumnRequest, type CreateDataRequest, type CreateDocumentRequest, type CreateFolderRequest, type CreateFolderResponse, type CreateGameUnitRequest, type CreateGeoIndexRequest, type CreateIndexRequest, type CreateInvitationRequest, type CreateInvitationResponse, type CreateLobbyRequest, type CreateOrganizationRequest, type CreatePlaylistRequest, type CreatePublicKeyRequest, type CreatePublicKeyResponse, type CreateRelationRequest, type CreateRolePayload, type CreateRoleResult, type CreateRoomResult, type CreateSearchIndexRequest, type CreateSecurityRuleRequest, type CreateSubscriptionOptions, type CreateSubscriptionRequest, type CreateSubscriptionWithAmount, type CreateSubscriptionWithProduct, type CreateTableRequest, type CreateTopicOptions, type CreateTriggerRequest, type CreateVideoStorageRequest, type DailyReport, type DataItem, type DataType, type DatabaseChange, type DatabaseChangeMessage, type DatabaseChangeType, type DatabaseRealtimeConnectOptions, type DatabaseRealtimeFilter, type DatabaseRealtimeHandlers, type DatabaseRealtimeSubscription, type DatabaseSnapshot, type DatabaseSnapshotMessage, type DatabaseSubscribeOptions, type DeleteBillingKeyResponse, type DeleteWhereResponse, type DeviceInfo, type DocumentResponse, type EnabledProviderInfo, type EnabledProvidersResponse, EndpointAPI, type EndpointCallInit, type ErrorHandler, type ErrorMessage, type ErrorReport, type ErrorTrackerConfig, type ErrorType, type ExportDataRequest, type ExportDataResponse, type FetchDataResponse, type FetchFilesResponse, type FetchPublicKeysResponse, type FileItem, type FileStats, GAME_MESSAGE, GameAPI, type GameAction, type GameAppIsolation, type GameCaps, type GameClientConfig, type GameConfig, GameConfigAPI, type GameConfigPatch, type GameConnectionState, type GameConnectionStatus, type GameCreatedVia, type GameCreatorToken, type GameCreatorTokenScope, type GameDelta, type GameEffectiveCaps, type GameEffectiveFeatures, type GameEntity, type GameEntityListResponse, GameError, type GameErrorCode, type GameEventHandlers, type GameFeatureOverrides, type GameFromHostOptions, GameHubAPI, type GameHubHandle, type GameHubMountOptions, type GamePlayer, type GamePlayerIdMode, GameRoom, type GameRoomConfig, type GameRoomInfo, GameRoomTransport, GameScope, type GameScopeOptions, type GameServerMessage, type GameServerMessageType, type GameState, type GameStatus, type GameTokenGrant, type GameTokenResponse, type GameTransportConfig, type GameUnit, type GameUsageDay, type GameUsageResponse, GamesAPI, type GenerateUploadURLByPathRequest, type GenerateUploadURLRequest, type GenerateUploadURLResponse, type GeoBoundingBox, type GeoIndex, type GeoNear, type GeoPoint, type GeoPolygon, type GeoQuery, type GeoResponse, type GeoResult, type GetAuthorizationURLResponse, type GetFileByPathResponse, type GoogleConnectionStatus, type HistoryResponse, type HubLeaderboardBoards, type HubLeaderboardReader, 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 IssueGameCreatorTokenRequest, type IssueGameTokenOptions, type IssuedGameCreatorToken, type JoinQueueRequest, type JoinRoomRequest, type JoinRoomResponse, type KnowledgeSearchRequest, type KnowledgeSearchResponse, type KnowledgeSearchResult, type LeaderboardEntry, type LeaderboardListResponse, type LeaderboardScoreEntry, type LifecyclePolicy, type ListAppMembersOptions, type ListBillingKeysResponse, type ListDocumentsResponse, type ListFilesOptions, type ListFilesResult, type ListPageMetasOptions, type ListPageMetasResponse, type ListPaymentsOptions, type ListSubscriptionPaymentsRequest, type ListSubscriptionPaymentsResponse, type ListSubscriptionsRequest, type ListSubscriptionsResponse, type LobbyInfo, type LobbyInvite, type LobbyMember, type LobbyVisibility, type MatchResult, type MatchmakingTicket, type MatchqueueListResponse, type MatchqueueTicket, type MemberChangePasswordRequest, type MemberCredentialMessageResponse, type MemberEmailVerificationConfirmRequest, type MemberEmailVerificationConfirmResponse, type MemberEmailVerificationRequest, type MemberInfoResponse, type MemberPasswordResetConfirmRequest, type MemberPasswordResetRequest, type MemberRedirectOption, type MemberSession, type MemberSessionList, type MemberSessionRevokeResponse, type MemberSignInRequest, type MemberSignInResponse, type MemberSignUpRequest, type MemberSignUpResponse, type MembershipTier, type MemoryInfo, type MessageHandler, type MigrateDataRequest, type MigrateDataResponse, type MoveFileRequest, type NackMessageRequest, type NackMessageResponse, NativeAPI, type OAuthCallbackResponse, type OAuthPrompt, type OAuthProvider, type OnPaymentFailure, type OpenDialogOptions, type OpenDialogResult, type Organization, type OrganizationContext, type OrganizationInvitation, type OrganizationMember, type OrganizationMemberList, type OrganizationRole, OrganizationsAPI, type PageMetaResponse, type PartyInfo, type PartyInvite, type PartyMember, type PauseSubscriptionRequest, type PaymentDetail, type PaymentListItem, type PaymentListResult, type PaymentMode, type PaymentProvider, type PaymentStatus, type PaymentSummaryAmounts, type PaymentSummaryOptions, type PaymentSummaryResult, type PeerInfo, type Platform, type PlayerEvent, type PlayerKVItem, type PlayerKVListResponse, type PlayerKVWriteResult, type PlayerStats, type Playlist, type PlaylistItem, type PollUntilOptions, type PongMessage, type PopulateOption, type Position, type PostponeBillingRequest, type PreparePaymentOptions, type PreparePaymentRequest, type PreparePaymentResponse, type PreparePaymentWithAmount, type PreparePaymentWithProduct, type PresenceChangeHandler, type PresenceInfo, type PresenceSetOptions, type PresenceStatus, type PresenceStatusResult, type ProrationMode, type PublicKeyItem, type PublicKeyPaymentMode, type PublishBatchError, type PublishBatchRequest, type PublishBatchResponse, type PublishMessageRequest, type PublishMessageResponse, type PushPlatform, type PushStatsResult, type PushTopicInfo, type QueryOptions, type QueueInfoResponse, type QueueMessage, type ReadReceiptHandler, type ReadReceiptInfo, type RealtimeConnectOptions, RealtimeConnectionError, type RealtimeConnectionErrorCode, type RealtimeMessage, RealtimeRequestError, type RealtimeSendPolicy, type RegisterDeviceRequest, type RelationType, type RenameFileRequest, type RenameFileResponse, type ReplayHighlight, type ReplayInfo, type ReplayPlayerInfo, type ResolveGamePlayersResponse, type RestoreBackupRequest, type RestoreBackupResponse, type RetentionPolicy, type RoleDetail, type RoleList, type RoleListItem, type RolePermissionItem, type RoleUserItem, RolesAPI, type RoomInfo, type RoomStaleMessage, type RoomSummary, type RoomsResponse, type RotatePublicKeyRequest, type RotatePublicKeyResponse, type SFUTokenOptions, type SFUTokenResponse, type SaveDialogOptions, type SaveDialogResult, type ScriptDetailResponse, type ScriptListResponse, type ScriptLogEntry, type ScriptLogsResponse, type ScriptMeta, type ScriptMetricsResponse, type ScriptVersion, type ScriptVersionListResponse, type SearchIndex, type SearchOptions, type SearchResponse, type SearchResult, type SecurityRule, type SendOptions, type SendSuperChatOptions, type SendSuperChatResponse, type ServerMessage, SessionManager, type SetPageMetaRequest, type Shorts, type ShortsListResponse, type SignalingMessage, type SignalingMessageType, type SlowQueryInfo, type SpectatorInfo, type SpectatorPlayerState, type SpectatorState, type SpeechRecognizeOptions, type SpeechResult, type StateChange, type StateChangeHandler, type StorageUploadOptions, type StorageUploadProgress, type StorageVideoListOptions, type StreamContentPart, type StreamDoneCallback, type StreamDoneData, type StreamErrorCallback, type StreamHandlers, type StreamImageURLPart, type StreamMessage, type StreamOptions, type StreamSession, type StreamTextPart, type StreamTokenCallback, type StreamToolCallCallback, type StreamToolResultCallback, type StreamURLResponse, type SubscribeOptions, type SubscribeTopicRequest, type SubscribedData, type Subscription, type SubscriptionPaymentResponse, type SubscriptionPaymentStatus, type SubscriptionResponse, type SubscriptionStatus, type SuperChat, type SuperChatType, type SuspendAppMemberOptions, type SuspendAppMemberResult, type SyncLostMessage, type SystemInfo, type TTLConfig, type TableAccessLevel, type TableColumnDef, type TableIndex, type TableRelation, type TableSchema, type TableSchemaDefinition, type TokenPersistence, type TransactionRead, type TransactionResult, type TransactionWrite, type TransactionWriteResult, type TranscodeJob, type TranscodeStatus, type TransportType, type Trigger, type TriggerEvent, type TriggerHandlerType, type TypingChangeHandler, type TypingInfo, type UnsuspendAppMemberResult, type UpdateBillingKeyRequest, type UpdateChannelRequest, type UpdateColumnRequest, type UpdateCustomDataRequest, type UpdateCustomDataResponse, type UpdateDataRequest, type UpdateDocumentRequest, type UpdateGameUnitRequest, type UpdateLobbyRequest, type UpdateOrganizationRequest, type UpdatePublicKeyRequest, type UpdatePublicKeyResponse, type UpdateRolePayload, type UpdateSecurityRuleRequest, type UpdateSubscriptionRequest, type UpdateTriggerRequest, type UpdateVideoRequest, type UpdateVideoStorageRequest, type UploadByPathOptions, type UploadFileOptions, type UploadFileResponse, type UploadOptions, type UploadProgress, type VAPIDPublicKeyResponse, type ValidateResponse, type ValidationSchema, type ValidationSchemaField, type ValidationStateTransitions, type Video, type VideoComment, type VideoCompleteUploadResponse, type VideoListOptions, type VideoListResponse, VideoProcessingError, type VideoQuality, type VideoStatus, type VideoStorage, type VideoStorageAccessLevel, type VideoStorageListResponse, type VideoVisibility, type VoiceChannel, type VoiceMember, type WaitOptions, type WatchHistoryItem, type WebPushSubscription, type WebRTCConnectOptions, type WebRTCConnectionState, type WebRTCMode, type WebRTCWarning, type WhereCondition, type WhereOperator, WsTicketError, ConnectBase as default, detectInAppBrowser, escapeToExternalBrowser, isWebTransportSupported, toAIError, toCreateRoomWire };
13968
+ export { AIAPI, type AIChatOptions, type AIChatRequest, type AIChatResponse, type AIChatStreamCallbacks, type AIChatStreamOptions, AIError, type AIErrorCode, type AIGeneratedImage, type AIMessage, type AISource, type AIStreamChunk, type AITool, type AIToolCall, type AIToolEvent, AUTH_MEMBER_ID_TOKEN, type AcceptInvitationResponse, type AckMessagesRequest, type AckMessagesResponse, type AdMobDailyReport, type AdMobReportResponse, type AdMobReportSummary, type AdReportResponse, type AdReportSummary, type AdmobConnectionInfo, AdsAPI, type AdsenseConnectionInfo, type AgenticSearchProgress, type AggregateResult, type AggregateStage, type AnalyticsConfig, type AnalyticsEvent, ApiError, type ApiErrorDetail, type AppMemberDetail, type AppMemberIdentityDetail, type AppMemberIdentitySummary, type AppMemberList, type AppMemberListItem, type AppMemberProviderType, AppMembersAPI, type AppStatsResponse, type ArchivePolicy, type AtomicOperator, type AtomicOperatorType, AuthError, type AuthSettingsResponse, type BackupInfo, type BatchOperation, type BatchOperationResult, type BatchSetPageMetaRequest, type BatchWriteResult, type BillingCycle, type BillingKeyResponse, type BiometricInfo, type BiometricResult, type BulkCreateResponse, type BulkError, type CPUInfo, type CancelPaymentRequest, type CancelPaymentResponse, type CancelSubscriptionRequest, type CategoryInfo, type ChangePlanOptions, type ChangePlanPreview, type ChangePlanRequest, type ChangePlanWithPriceRef, type ChangePlanWithProduct, type Channel, type ChannelMembership, type ChannelStats, type ChargeWithBillingKeyAmount, type ChargeWithBillingKeyOptions, type ChargeWithBillingKeyProduct, 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 CreateCheckoutSessionOptions, type CreateCheckoutSessionRequest, type CreateCheckoutSessionResponse, type CreateCheckoutSessionWithAmount, type CreateCheckoutSessionWithProduct, type CreateColumnRequest, type CreateDataRequest, type CreateDocumentRequest, type CreateFolderRequest, type CreateFolderResponse, type CreateGameUnitRequest, type CreateGeoIndexRequest, type CreateIndexRequest, type CreateInvitationRequest, type CreateInvitationResponse, type CreateLobbyRequest, type CreateOrganizationRequest, type CreatePlaylistRequest, type CreatePublicKeyRequest, type CreatePublicKeyResponse, type CreateRelationRequest, type CreateRolePayload, type CreateRoleResult, type CreateRoomResult, type CreateSearchIndexRequest, type CreateSecurityRuleRequest, type CreateSubscriptionOptions, type CreateSubscriptionRequest, type CreateSubscriptionWithAmount, type CreateSubscriptionWithProduct, type CreateTableRequest, type CreateTopicOptions, type CreateTriggerRequest, type CreateVideoStorageRequest, type DailyReport, type DataItem, type DataType, type DatabaseChange, type DatabaseChangeMessage, type DatabaseChangeType, type DatabaseRealtimeConnectOptions, type DatabaseRealtimeFilter, type DatabaseRealtimeHandlers, type DatabaseRealtimeSubscription, type DatabaseSnapshot, type DatabaseSnapshotMessage, type DatabaseSubscribeOptions, type DeleteBillingKeyResponse, type DeleteWhereResponse, type DeviceInfo, type DocumentResponse, type EmitIntegrationEventOptions, type EmitIntegrationEventResponse, 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, GAME_MESSAGE, GameAPI, type GameAction, type GameAppIsolation, type GameCaps, type GameClientConfig, type GameConfig, GameConfigAPI, type GameConfigPatch, type GameConnectionState, type GameConnectionStatus, type GameCreatedVia, type GameCreatorToken, type GameCreatorTokenScope, type GameDelta, type GameEffectiveCaps, type GameEffectiveFeatures, type GameEntity, type GameEntityListResponse, GameError, type GameErrorCode, type GameEventHandlers, type GameFeatureOverrides, type GameFromHostOptions, GameHubAPI, type GameHubHandle, type GameHubMountOptions, type GamePlayer, type GamePlayerIdMode, GameRoom, type GameRoomConfig, type GameRoomInfo, GameRoomTransport, GameScope, type GameScopeOptions, type GameServerMessage, type GameServerMessageType, type GameState, type GameStatus, type GameTokenGrant, type GameTokenResponse, type GameTransportConfig, type GameUnit, type GameUsageDay, type GameUsageResponse, GamesAPI, type GenerateUploadURLByPathRequest, type GenerateUploadURLRequest, type GenerateUploadURLResponse, type GeoBoundingBox, type GeoIndex, type GeoNear, type GeoPoint, type GeoPolygon, type GeoQuery, type GeoResponse, type GeoResult, type GetAuthorizationURLResponse, type GetFileByPathResponse, type GoogleConnectionStatus, type HistoryResponse, type HubLeaderboardBoards, type HubLeaderboardReader, type ICEServer, type ICEServersResponse, type ImageResult, type ImportDataRequest, type ImportDataResponse, type IndexAnalysis, type IndexRecommendation, type InitUploadResponse, IntegrationsAPI, type InvokeFunctionRequest, type InvokeFunctionResponse, type IssueBillingKeyRequest, type IssueBillingKeyResponse, type IssueGameCreatorTokenRequest, type IssueGameTokenOptions, type IssuedGameCreatorToken, type JoinQueueRequest, type JoinRoomRequest, type JoinRoomResponse, type KnowledgeSearchRequest, type KnowledgeSearchResponse, type KnowledgeSearchResult, type LeaderboardEntry, type LeaderboardListResponse, type LeaderboardScoreEntry, type LifecyclePolicy, type ListAppMembersOptions, type ListBillingKeysResponse, type ListDocumentsResponse, type ListFilesOptions, type ListFilesResult, type ListPageMetasOptions, type ListPageMetasResponse, type ListPaymentsOptions, type ListSubscriptionPaymentsRequest, type ListSubscriptionPaymentsResponse, type ListSubscriptionsRequest, type ListSubscriptionsResponse, type LobbyInfo, type LobbyInvite, type LobbyMember, type LobbyVisibility, type MatchResult, type MatchmakingTicket, type MatchqueueListResponse, type MatchqueueTicket, type MemberChangePasswordRequest, type MemberCredentialMessageResponse, type MemberEmailVerificationConfirmRequest, type MemberEmailVerificationConfirmResponse, type MemberEmailVerificationRequest, type MemberInfoResponse, type MemberPasswordResetConfirmRequest, type MemberPasswordResetRequest, type MemberRedirectOption, type MemberSession, type MemberSessionList, type MemberSessionRevokeResponse, type MemberSignInRequest, type MemberSignInResponse, type MemberSignUpRequest, type MemberSignUpResponse, type MembershipTier, type MemoryInfo, type MessageHandler, type MigrateDataRequest, type MigrateDataResponse, type MoveFileRequest, type NackMessageRequest, type NackMessageResponse, NativeAPI, type OAuthCallbackResponse, type OAuthPrompt, type OAuthProvider, type OnPaymentFailure, type OpenDialogOptions, type OpenDialogResult, type Organization, type OrganizationContext, type OrganizationInvitation, type OrganizationMember, type OrganizationMemberList, type OrganizationRole, OrganizationsAPI, type PageMetaResponse, type PartyInfo, type PartyInvite, type PartyMember, type PauseSubscriptionRequest, type PaymentDetail, type PaymentListItem, type PaymentListResult, type PaymentMode, type PaymentProvider, type PaymentStatus, type PaymentSummaryAmounts, type PaymentSummaryOptions, type PaymentSummaryResult, type PeerInfo, type Platform, type PlayerEvent, type PlayerKVItem, type PlayerKVListResponse, type PlayerKVWriteResult, type PlayerStats, type Playlist, type PlaylistItem, type PollUntilOptions, type PongMessage, type PopulateOption, type Position, type PostponeBillingRequest, type PreparePaymentOptions, type PreparePaymentRequest, type PreparePaymentResponse, type PreparePaymentWithAmount, type PreparePaymentWithProduct, type PresenceChangeHandler, type PresenceInfo, type PresenceSetOptions, type PresenceStatus, type PresenceStatusResult, type ProrationMode, type PublicKeyItem, type PublicKeyPaymentMode, type PublishBatchError, type PublishBatchRequest, type PublishBatchResponse, type PublishMessageRequest, type PublishMessageResponse, type PushPlatform, type PushStatsResult, type PushTopicInfo, type QueryOptions, type QueueInfoResponse, type QueueMessage, type ReadReceiptHandler, type ReadReceiptInfo, type RealtimeConnectOptions, RealtimeConnectionError, type RealtimeConnectionErrorCode, type RealtimeMessage, RealtimeRequestError, type RealtimeSendPolicy, type RegisterDeviceRequest, type RelationType, type RenameFileRequest, type RenameFileResponse, type ReplayHighlight, type ReplayInfo, type ReplayPlayerInfo, type ResolveGamePlayersResponse, type RestoreBackupRequest, type RestoreBackupResponse, type RetentionPolicy, type RoleDetail, type RoleList, type RoleListItem, type RolePermissionItem, type RoleUserItem, RolesAPI, type RoomInfo, type RoomStaleMessage, type RoomSummary, type RoomsResponse, type RotatePublicKeyRequest, type RotatePublicKeyResponse, type SFUTokenOptions, type SFUTokenResponse, type SaveDialogOptions, type SaveDialogResult, type ScriptDetailResponse, type ScriptListResponse, type ScriptLogEntry, type ScriptLogsResponse, type ScriptMeta, type ScriptMetricsResponse, type ScriptVersion, type ScriptVersionListResponse, type SearchIndex, type SearchOptions, type SearchResponse, type SearchResult, type SecurityRule, type SendOptions, type SendSuperChatOptions, type SendSuperChatResponse, type ServerMessage, SessionManager, type SetPageMetaRequest, type Shorts, type ShortsListResponse, type SignalingMessage, type SignalingMessageType, type SlowQueryInfo, type SpectatorInfo, type SpectatorPlayerState, type SpectatorState, type SpeechRecognizeOptions, type SpeechResult, type StateChange, type StateChangeHandler, type StorageUploadOptions, type StorageUploadProgress, type StorageVideoListOptions, type StreamContentPart, type StreamDoneCallback, type StreamDoneData, type StreamErrorCallback, type StreamHandlers, type StreamImageURLPart, type StreamMessage, type StreamOptions, type StreamSession, type StreamTextPart, type StreamTokenCallback, type StreamToolCallCallback, type StreamToolResultCallback, type StreamURLResponse, type SubscribeOptions, type SubscribeTopicRequest, type SubscribedData, type Subscription, type SubscriptionPaymentResponse, type SubscriptionPaymentStatus, type SubscriptionResponse, type SubscriptionStatus, type SuperChat, type SuperChatType, type SuspendAppMemberOptions, type SuspendAppMemberResult, type SyncLostMessage, type SystemInfo, type TTLConfig, type TableAccessLevel, type TableColumnDef, type TableIndex, type TableRelation, type TableSchema, type TableSchemaDefinition, type TokenPersistence, type TransactionRead, type TransactionResult, type TransactionWrite, type TransactionWriteResult, type TranscodeJob, type TranscodeStatus, type TransportType, type Trigger, type TriggerEvent, type TriggerHandlerType, type TypingChangeHandler, type TypingInfo, type UnsuspendAppMemberResult, type UpdateBillingKeyRequest, type UpdateChannelRequest, type UpdateColumnRequest, type UpdateCustomDataRequest, type UpdateCustomDataResponse, type UpdateDataRequest, type UpdateDocumentRequest, type UpdateGameUnitRequest, type UpdateLobbyRequest, type UpdateOrganizationRequest, type UpdatePublicKeyRequest, type UpdatePublicKeyResponse, type UpdateRolePayload, type UpdateSecurityRuleRequest, type UpdateSubscriptionRequest, type UpdateTriggerRequest, type UpdateVideoRequest, type UpdateVideoStorageRequest, type UploadByPathOptions, type UploadFileOptions, type UploadFileResponse, type UploadOptions, type UploadProgress, type VAPIDPublicKeyResponse, type ValidateResponse, type ValidationSchema, type ValidationSchemaField, type ValidationStateTransitions, type Video, type VideoComment, type VideoCompleteUploadResponse, type VideoListOptions, type VideoListResponse, VideoProcessingError, type VideoQuality, type VideoStatus, type VideoStorage, type VideoStorageAccessLevel, type VideoStorageListResponse, type VideoVisibility, type VoiceChannel, type VoiceMember, type WaitOptions, type WatchHistoryItem, type WebPushSubscription, type WebRTCConnectOptions, type WebRTCConnectionState, type WebRTCMode, type WebRTCWarning, type WhereCondition, type WhereOperator, WsTicketError, ConnectBase as default, detectInAppBrowser, escapeToExternalBrowser, isWebTransportSupported, toAIError, toCreateRoomWire };
package/dist/index.d.ts CHANGED
@@ -6055,6 +6055,47 @@ declare class GameAPI {
6055
6055
  getScriptMetrics(appId: string, name: string): Promise<ScriptMetricsResponse>;
6056
6056
  }
6057
6057
 
6058
+ /**
6059
+ * 앱 간 연동 이벤트 발송 옵션 (`cb.integrations.emitEvent`).
6060
+ */
6061
+ interface EmitIntegrationEventOptions {
6062
+ /** 이 연결 앱(OAuth client id)의 웹훅으로만 보낸다. 생략하면 이벤트를 구독한 모든 연결 앱. */
6063
+ targetClientId?: string;
6064
+ }
6065
+ /**
6066
+ * 앱 간 연동 이벤트 발송 응답 (`POST /v1/public/integrations/events`, 202).
6067
+ * 받는 주소가 없어도 `queued` 다 — 실제 발송 결과는 연결 앱 쪽 웹훅 발송 기록에서 본다.
6068
+ */
6069
+ interface EmitIntegrationEventResponse {
6070
+ status: "queued";
6071
+ event_type: string;
6072
+ }
6073
+
6074
+ /**
6075
+ * 앱 간 연동 API (서버 전용).
6076
+ *
6077
+ * 콘솔 "앱 간 연동 → 보낼 이벤트" 에 등록한 이벤트를, 이 앱과 연결된 앱들의 웹훅으로 보낸다.
6078
+ * 연결된 앱마다 서명된 웹훅이 나가는 쓰기라 브라우저(퍼블릭 키만)에서는 부를 수 없다 —
6079
+ * 서버에서 `secretKey`(cb_sk_) 와 함께, 또는 함수의 `ctx.cbAdmin`(management_scopes: ["integration:emit"]) 으로 쓴다.
6080
+ */
6081
+ declare class IntegrationsAPI {
6082
+ private http;
6083
+ constructor(http: HttpClient);
6084
+ /**
6085
+ * 등록한 이벤트를 연결된 앱들에 보낸다.
6086
+ *
6087
+ * 등록하지 않았거나 꺼 둔 이벤트, `payload_schema` 에 맞지 않는 값, 플랫폼 이벤트 이름
6088
+ * (`consent.` `token.` `oauth.` `oidc.` `issue.`), 64KB 넘는 payload 는 서버가 거절한다.
6089
+ *
6090
+ * @example
6091
+ * ```ts
6092
+ * // 함수 (service_role + management_scopes: ["integration:emit"])
6093
+ * await ctx.cbAdmin.integrations.emitEvent("order.paid", { order_id: "o_1", amount: 1200 })
6094
+ * ```
6095
+ */
6096
+ emitEvent(eventType: string, payload?: Record<string, unknown>, options?: EmitIntegrationEventOptions): Promise<EmitIntegrationEventResponse>;
6097
+ }
6098
+
6058
6099
  interface CreateDocumentRequest {
6059
6100
  name: string;
6060
6101
  source_type?: "file" | "text" | "url";
@@ -6204,6 +6245,13 @@ interface KnowledgeSearchResponse {
6204
6245
  agentic?: boolean;
6205
6246
  /** 수행된 agentic 검색 라운드 수 (1~2). 0 또는 미존재는 폴백을 의미. */
6206
6247
  agentic_rounds?: number;
6248
+ /**
6249
+ * 의미(벡터) 검색이 실제로 섞였는지. `false` 면 키워드(BM25)만 돌았다 — 이유는 `semantic_reason`.
6250
+ * agentic 응답에는 없다.
6251
+ */
6252
+ semantic?: boolean;
6253
+ /** `semantic: false` 인 이유: 임베딩 켠 키 없음 / 임베딩 호출 실패 / 요청이 `hybrid: false`. */
6254
+ semantic_reason?: "no_embedding_key" | "embedding_failed" | "disabled";
6207
6255
  }
6208
6256
 
6209
6257
  /**
@@ -13798,6 +13846,10 @@ declare class ConnectBase {
13798
13846
  * 결제 API (토스페이먼츠)
13799
13847
  */
13800
13848
  readonly payment: PaymentAPI;
13849
+ /**
13850
+ * 앱 간 연동 API — 등록한 이벤트를 연결된 앱들에 보내기 (서버 전용: secretKey 또는 함수 ctx.cbAdmin)
13851
+ */
13852
+ readonly integrations: IntegrationsAPI;
13801
13853
  /**
13802
13854
  * 정기결제/구독 API
13803
13855
  */
@@ -13913,4 +13965,4 @@ declare class ConnectBase {
13913
13965
  updateConfig(config: Partial<ConnectBaseConfig>): void;
13914
13966
  }
13915
13967
 
13916
- export { AIAPI, type AIChatOptions, type AIChatRequest, type AIChatResponse, type AIChatStreamCallbacks, type AIChatStreamOptions, AIError, type AIErrorCode, type AIGeneratedImage, type AIMessage, type AISource, type AIStreamChunk, type AITool, type AIToolCall, type AIToolEvent, AUTH_MEMBER_ID_TOKEN, type AcceptInvitationResponse, type AckMessagesRequest, type AckMessagesResponse, type AdMobDailyReport, type AdMobReportResponse, type AdMobReportSummary, type AdReportResponse, type AdReportSummary, type AdmobConnectionInfo, AdsAPI, type AdsenseConnectionInfo, type AgenticSearchProgress, type AggregateResult, type AggregateStage, type AnalyticsConfig, type AnalyticsEvent, ApiError, type ApiErrorDetail, type AppMemberDetail, type AppMemberIdentityDetail, type AppMemberIdentitySummary, type AppMemberList, type AppMemberListItem, type AppMemberProviderType, AppMembersAPI, type AppStatsResponse, type ArchivePolicy, type AtomicOperator, type AtomicOperatorType, AuthError, type AuthSettingsResponse, type BackupInfo, type BatchOperation, type BatchOperationResult, type BatchSetPageMetaRequest, type BatchWriteResult, type BillingCycle, type BillingKeyResponse, type BiometricInfo, type BiometricResult, type BulkCreateResponse, type BulkError, type CPUInfo, type CancelPaymentRequest, type CancelPaymentResponse, type CancelSubscriptionRequest, type CategoryInfo, type ChangePlanOptions, type ChangePlanPreview, type ChangePlanRequest, type ChangePlanWithPriceRef, type ChangePlanWithProduct, type Channel, type ChannelMembership, type ChannelStats, type ChargeWithBillingKeyAmount, type ChargeWithBillingKeyOptions, type ChargeWithBillingKeyProduct, 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 CreateCheckoutSessionOptions, type CreateCheckoutSessionRequest, type CreateCheckoutSessionResponse, type CreateCheckoutSessionWithAmount, type CreateCheckoutSessionWithProduct, type CreateColumnRequest, type CreateDataRequest, type CreateDocumentRequest, type CreateFolderRequest, type CreateFolderResponse, type CreateGameUnitRequest, type CreateGeoIndexRequest, type CreateIndexRequest, type CreateInvitationRequest, type CreateInvitationResponse, type CreateLobbyRequest, type CreateOrganizationRequest, type CreatePlaylistRequest, type CreatePublicKeyRequest, type CreatePublicKeyResponse, type CreateRelationRequest, type CreateRolePayload, type CreateRoleResult, type CreateRoomResult, type CreateSearchIndexRequest, type CreateSecurityRuleRequest, type CreateSubscriptionOptions, type CreateSubscriptionRequest, type CreateSubscriptionWithAmount, type CreateSubscriptionWithProduct, type CreateTableRequest, type CreateTopicOptions, type CreateTriggerRequest, type CreateVideoStorageRequest, type DailyReport, type DataItem, type DataType, type DatabaseChange, type DatabaseChangeMessage, type DatabaseChangeType, type DatabaseRealtimeConnectOptions, type DatabaseRealtimeFilter, type DatabaseRealtimeHandlers, type DatabaseRealtimeSubscription, type DatabaseSnapshot, type DatabaseSnapshotMessage, type DatabaseSubscribeOptions, type DeleteBillingKeyResponse, type DeleteWhereResponse, type DeviceInfo, type DocumentResponse, type EnabledProviderInfo, type EnabledProvidersResponse, EndpointAPI, type EndpointCallInit, type ErrorHandler, type ErrorMessage, type ErrorReport, type ErrorTrackerConfig, type ErrorType, type ExportDataRequest, type ExportDataResponse, type FetchDataResponse, type FetchFilesResponse, type FetchPublicKeysResponse, type FileItem, type FileStats, GAME_MESSAGE, GameAPI, type GameAction, type GameAppIsolation, type GameCaps, type GameClientConfig, type GameConfig, GameConfigAPI, type GameConfigPatch, type GameConnectionState, type GameConnectionStatus, type GameCreatedVia, type GameCreatorToken, type GameCreatorTokenScope, type GameDelta, type GameEffectiveCaps, type GameEffectiveFeatures, type GameEntity, type GameEntityListResponse, GameError, type GameErrorCode, type GameEventHandlers, type GameFeatureOverrides, type GameFromHostOptions, GameHubAPI, type GameHubHandle, type GameHubMountOptions, type GamePlayer, type GamePlayerIdMode, GameRoom, type GameRoomConfig, type GameRoomInfo, GameRoomTransport, GameScope, type GameScopeOptions, type GameServerMessage, type GameServerMessageType, type GameState, type GameStatus, type GameTokenGrant, type GameTokenResponse, type GameTransportConfig, type GameUnit, type GameUsageDay, type GameUsageResponse, GamesAPI, type GenerateUploadURLByPathRequest, type GenerateUploadURLRequest, type GenerateUploadURLResponse, type GeoBoundingBox, type GeoIndex, type GeoNear, type GeoPoint, type GeoPolygon, type GeoQuery, type GeoResponse, type GeoResult, type GetAuthorizationURLResponse, type GetFileByPathResponse, type GoogleConnectionStatus, type HistoryResponse, type HubLeaderboardBoards, type HubLeaderboardReader, 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 IssueGameCreatorTokenRequest, type IssueGameTokenOptions, type IssuedGameCreatorToken, type JoinQueueRequest, type JoinRoomRequest, type JoinRoomResponse, type KnowledgeSearchRequest, type KnowledgeSearchResponse, type KnowledgeSearchResult, type LeaderboardEntry, type LeaderboardListResponse, type LeaderboardScoreEntry, type LifecyclePolicy, type ListAppMembersOptions, type ListBillingKeysResponse, type ListDocumentsResponse, type ListFilesOptions, type ListFilesResult, type ListPageMetasOptions, type ListPageMetasResponse, type ListPaymentsOptions, type ListSubscriptionPaymentsRequest, type ListSubscriptionPaymentsResponse, type ListSubscriptionsRequest, type ListSubscriptionsResponse, type LobbyInfo, type LobbyInvite, type LobbyMember, type LobbyVisibility, type MatchResult, type MatchmakingTicket, type MatchqueueListResponse, type MatchqueueTicket, type MemberChangePasswordRequest, type MemberCredentialMessageResponse, type MemberEmailVerificationConfirmRequest, type MemberEmailVerificationConfirmResponse, type MemberEmailVerificationRequest, type MemberInfoResponse, type MemberPasswordResetConfirmRequest, type MemberPasswordResetRequest, type MemberRedirectOption, type MemberSession, type MemberSessionList, type MemberSessionRevokeResponse, type MemberSignInRequest, type MemberSignInResponse, type MemberSignUpRequest, type MemberSignUpResponse, type MembershipTier, type MemoryInfo, type MessageHandler, type MigrateDataRequest, type MigrateDataResponse, type MoveFileRequest, type NackMessageRequest, type NackMessageResponse, NativeAPI, type OAuthCallbackResponse, type OAuthPrompt, type OAuthProvider, type OnPaymentFailure, type OpenDialogOptions, type OpenDialogResult, type Organization, type OrganizationContext, type OrganizationInvitation, type OrganizationMember, type OrganizationMemberList, type OrganizationRole, OrganizationsAPI, type PageMetaResponse, type PartyInfo, type PartyInvite, type PartyMember, type PauseSubscriptionRequest, type PaymentDetail, type PaymentListItem, type PaymentListResult, type PaymentMode, type PaymentProvider, type PaymentStatus, type PaymentSummaryAmounts, type PaymentSummaryOptions, type PaymentSummaryResult, type PeerInfo, type Platform, type PlayerEvent, type PlayerKVItem, type PlayerKVListResponse, type PlayerKVWriteResult, type PlayerStats, type Playlist, type PlaylistItem, type PollUntilOptions, type PongMessage, type PopulateOption, type Position, type PostponeBillingRequest, type PreparePaymentOptions, type PreparePaymentRequest, type PreparePaymentResponse, type PreparePaymentWithAmount, type PreparePaymentWithProduct, type PresenceChangeHandler, type PresenceInfo, type PresenceSetOptions, type PresenceStatus, type PresenceStatusResult, type ProrationMode, type PublicKeyItem, type PublicKeyPaymentMode, type PublishBatchError, type PublishBatchRequest, type PublishBatchResponse, type PublishMessageRequest, type PublishMessageResponse, type PushPlatform, type PushStatsResult, type PushTopicInfo, type QueryOptions, type QueueInfoResponse, type QueueMessage, type ReadReceiptHandler, type ReadReceiptInfo, type RealtimeConnectOptions, RealtimeConnectionError, type RealtimeConnectionErrorCode, type RealtimeMessage, RealtimeRequestError, type RealtimeSendPolicy, type RegisterDeviceRequest, type RelationType, type RenameFileRequest, type RenameFileResponse, type ReplayHighlight, type ReplayInfo, type ReplayPlayerInfo, type ResolveGamePlayersResponse, type RestoreBackupRequest, type RestoreBackupResponse, type RetentionPolicy, type RoleDetail, type RoleList, type RoleListItem, type RolePermissionItem, type RoleUserItem, RolesAPI, type RoomInfo, type RoomStaleMessage, type RoomSummary, type RoomsResponse, type RotatePublicKeyRequest, type RotatePublicKeyResponse, type SFUTokenOptions, type SFUTokenResponse, type SaveDialogOptions, type SaveDialogResult, type ScriptDetailResponse, type ScriptListResponse, type ScriptLogEntry, type ScriptLogsResponse, type ScriptMeta, type ScriptMetricsResponse, type ScriptVersion, type ScriptVersionListResponse, type SearchIndex, type SearchOptions, type SearchResponse, type SearchResult, type SecurityRule, type SendOptions, type SendSuperChatOptions, type SendSuperChatResponse, type ServerMessage, SessionManager, type SetPageMetaRequest, type Shorts, type ShortsListResponse, type SignalingMessage, type SignalingMessageType, type SlowQueryInfo, type SpectatorInfo, type SpectatorPlayerState, type SpectatorState, type SpeechRecognizeOptions, type SpeechResult, type StateChange, type StateChangeHandler, type StorageUploadOptions, type StorageUploadProgress, type StorageVideoListOptions, type StreamContentPart, type StreamDoneCallback, type StreamDoneData, type StreamErrorCallback, type StreamHandlers, type StreamImageURLPart, type StreamMessage, type StreamOptions, type StreamSession, type StreamTextPart, type StreamTokenCallback, type StreamToolCallCallback, type StreamToolResultCallback, type StreamURLResponse, type SubscribeOptions, type SubscribeTopicRequest, type SubscribedData, type Subscription, type SubscriptionPaymentResponse, type SubscriptionPaymentStatus, type SubscriptionResponse, type SubscriptionStatus, type SuperChat, type SuperChatType, type SuspendAppMemberOptions, type SuspendAppMemberResult, type SyncLostMessage, type SystemInfo, type TTLConfig, type TableAccessLevel, type TableColumnDef, type TableIndex, type TableRelation, type TableSchema, type TableSchemaDefinition, type TokenPersistence, type TransactionRead, type TransactionResult, type TransactionWrite, type TransactionWriteResult, type TranscodeJob, type TranscodeStatus, type TransportType, type Trigger, type TriggerEvent, type TriggerHandlerType, type TypingChangeHandler, type TypingInfo, type UnsuspendAppMemberResult, type UpdateBillingKeyRequest, type UpdateChannelRequest, type UpdateColumnRequest, type UpdateCustomDataRequest, type UpdateCustomDataResponse, type UpdateDataRequest, type UpdateDocumentRequest, type UpdateGameUnitRequest, type UpdateLobbyRequest, type UpdateOrganizationRequest, type UpdatePublicKeyRequest, type UpdatePublicKeyResponse, type UpdateRolePayload, type UpdateSecurityRuleRequest, type UpdateSubscriptionRequest, type UpdateTriggerRequest, type UpdateVideoRequest, type UpdateVideoStorageRequest, type UploadByPathOptions, type UploadFileOptions, type UploadFileResponse, type UploadOptions, type UploadProgress, type VAPIDPublicKeyResponse, type ValidateResponse, type ValidationSchema, type ValidationSchemaField, type ValidationStateTransitions, type Video, type VideoComment, type VideoCompleteUploadResponse, type VideoListOptions, type VideoListResponse, VideoProcessingError, type VideoQuality, type VideoStatus, type VideoStorage, type VideoStorageAccessLevel, type VideoStorageListResponse, type VideoVisibility, type VoiceChannel, type VoiceMember, type WaitOptions, type WatchHistoryItem, type WebPushSubscription, type WebRTCConnectOptions, type WebRTCConnectionState, type WebRTCMode, type WebRTCWarning, type WhereCondition, type WhereOperator, WsTicketError, ConnectBase as default, detectInAppBrowser, escapeToExternalBrowser, isWebTransportSupported, toAIError, toCreateRoomWire };
13968
+ export { AIAPI, type AIChatOptions, type AIChatRequest, type AIChatResponse, type AIChatStreamCallbacks, type AIChatStreamOptions, AIError, type AIErrorCode, type AIGeneratedImage, type AIMessage, type AISource, type AIStreamChunk, type AITool, type AIToolCall, type AIToolEvent, AUTH_MEMBER_ID_TOKEN, type AcceptInvitationResponse, type AckMessagesRequest, type AckMessagesResponse, type AdMobDailyReport, type AdMobReportResponse, type AdMobReportSummary, type AdReportResponse, type AdReportSummary, type AdmobConnectionInfo, AdsAPI, type AdsenseConnectionInfo, type AgenticSearchProgress, type AggregateResult, type AggregateStage, type AnalyticsConfig, type AnalyticsEvent, ApiError, type ApiErrorDetail, type AppMemberDetail, type AppMemberIdentityDetail, type AppMemberIdentitySummary, type AppMemberList, type AppMemberListItem, type AppMemberProviderType, AppMembersAPI, type AppStatsResponse, type ArchivePolicy, type AtomicOperator, type AtomicOperatorType, AuthError, type AuthSettingsResponse, type BackupInfo, type BatchOperation, type BatchOperationResult, type BatchSetPageMetaRequest, type BatchWriteResult, type BillingCycle, type BillingKeyResponse, type BiometricInfo, type BiometricResult, type BulkCreateResponse, type BulkError, type CPUInfo, type CancelPaymentRequest, type CancelPaymentResponse, type CancelSubscriptionRequest, type CategoryInfo, type ChangePlanOptions, type ChangePlanPreview, type ChangePlanRequest, type ChangePlanWithPriceRef, type ChangePlanWithProduct, type Channel, type ChannelMembership, type ChannelStats, type ChargeWithBillingKeyAmount, type ChargeWithBillingKeyOptions, type ChargeWithBillingKeyProduct, 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 CreateCheckoutSessionOptions, type CreateCheckoutSessionRequest, type CreateCheckoutSessionResponse, type CreateCheckoutSessionWithAmount, type CreateCheckoutSessionWithProduct, type CreateColumnRequest, type CreateDataRequest, type CreateDocumentRequest, type CreateFolderRequest, type CreateFolderResponse, type CreateGameUnitRequest, type CreateGeoIndexRequest, type CreateIndexRequest, type CreateInvitationRequest, type CreateInvitationResponse, type CreateLobbyRequest, type CreateOrganizationRequest, type CreatePlaylistRequest, type CreatePublicKeyRequest, type CreatePublicKeyResponse, type CreateRelationRequest, type CreateRolePayload, type CreateRoleResult, type CreateRoomResult, type CreateSearchIndexRequest, type CreateSecurityRuleRequest, type CreateSubscriptionOptions, type CreateSubscriptionRequest, type CreateSubscriptionWithAmount, type CreateSubscriptionWithProduct, type CreateTableRequest, type CreateTopicOptions, type CreateTriggerRequest, type CreateVideoStorageRequest, type DailyReport, type DataItem, type DataType, type DatabaseChange, type DatabaseChangeMessage, type DatabaseChangeType, type DatabaseRealtimeConnectOptions, type DatabaseRealtimeFilter, type DatabaseRealtimeHandlers, type DatabaseRealtimeSubscription, type DatabaseSnapshot, type DatabaseSnapshotMessage, type DatabaseSubscribeOptions, type DeleteBillingKeyResponse, type DeleteWhereResponse, type DeviceInfo, type DocumentResponse, type EmitIntegrationEventOptions, type EmitIntegrationEventResponse, 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, GAME_MESSAGE, GameAPI, type GameAction, type GameAppIsolation, type GameCaps, type GameClientConfig, type GameConfig, GameConfigAPI, type GameConfigPatch, type GameConnectionState, type GameConnectionStatus, type GameCreatedVia, type GameCreatorToken, type GameCreatorTokenScope, type GameDelta, type GameEffectiveCaps, type GameEffectiveFeatures, type GameEntity, type GameEntityListResponse, GameError, type GameErrorCode, type GameEventHandlers, type GameFeatureOverrides, type GameFromHostOptions, GameHubAPI, type GameHubHandle, type GameHubMountOptions, type GamePlayer, type GamePlayerIdMode, GameRoom, type GameRoomConfig, type GameRoomInfo, GameRoomTransport, GameScope, type GameScopeOptions, type GameServerMessage, type GameServerMessageType, type GameState, type GameStatus, type GameTokenGrant, type GameTokenResponse, type GameTransportConfig, type GameUnit, type GameUsageDay, type GameUsageResponse, GamesAPI, type GenerateUploadURLByPathRequest, type GenerateUploadURLRequest, type GenerateUploadURLResponse, type GeoBoundingBox, type GeoIndex, type GeoNear, type GeoPoint, type GeoPolygon, type GeoQuery, type GeoResponse, type GeoResult, type GetAuthorizationURLResponse, type GetFileByPathResponse, type GoogleConnectionStatus, type HistoryResponse, type HubLeaderboardBoards, type HubLeaderboardReader, type ICEServer, type ICEServersResponse, type ImageResult, type ImportDataRequest, type ImportDataResponse, type IndexAnalysis, type IndexRecommendation, type InitUploadResponse, IntegrationsAPI, type InvokeFunctionRequest, type InvokeFunctionResponse, type IssueBillingKeyRequest, type IssueBillingKeyResponse, type IssueGameCreatorTokenRequest, type IssueGameTokenOptions, type IssuedGameCreatorToken, type JoinQueueRequest, type JoinRoomRequest, type JoinRoomResponse, type KnowledgeSearchRequest, type KnowledgeSearchResponse, type KnowledgeSearchResult, type LeaderboardEntry, type LeaderboardListResponse, type LeaderboardScoreEntry, type LifecyclePolicy, type ListAppMembersOptions, type ListBillingKeysResponse, type ListDocumentsResponse, type ListFilesOptions, type ListFilesResult, type ListPageMetasOptions, type ListPageMetasResponse, type ListPaymentsOptions, type ListSubscriptionPaymentsRequest, type ListSubscriptionPaymentsResponse, type ListSubscriptionsRequest, type ListSubscriptionsResponse, type LobbyInfo, type LobbyInvite, type LobbyMember, type LobbyVisibility, type MatchResult, type MatchmakingTicket, type MatchqueueListResponse, type MatchqueueTicket, type MemberChangePasswordRequest, type MemberCredentialMessageResponse, type MemberEmailVerificationConfirmRequest, type MemberEmailVerificationConfirmResponse, type MemberEmailVerificationRequest, type MemberInfoResponse, type MemberPasswordResetConfirmRequest, type MemberPasswordResetRequest, type MemberRedirectOption, type MemberSession, type MemberSessionList, type MemberSessionRevokeResponse, type MemberSignInRequest, type MemberSignInResponse, type MemberSignUpRequest, type MemberSignUpResponse, type MembershipTier, type MemoryInfo, type MessageHandler, type MigrateDataRequest, type MigrateDataResponse, type MoveFileRequest, type NackMessageRequest, type NackMessageResponse, NativeAPI, type OAuthCallbackResponse, type OAuthPrompt, type OAuthProvider, type OnPaymentFailure, type OpenDialogOptions, type OpenDialogResult, type Organization, type OrganizationContext, type OrganizationInvitation, type OrganizationMember, type OrganizationMemberList, type OrganizationRole, OrganizationsAPI, type PageMetaResponse, type PartyInfo, type PartyInvite, type PartyMember, type PauseSubscriptionRequest, type PaymentDetail, type PaymentListItem, type PaymentListResult, type PaymentMode, type PaymentProvider, type PaymentStatus, type PaymentSummaryAmounts, type PaymentSummaryOptions, type PaymentSummaryResult, type PeerInfo, type Platform, type PlayerEvent, type PlayerKVItem, type PlayerKVListResponse, type PlayerKVWriteResult, type PlayerStats, type Playlist, type PlaylistItem, type PollUntilOptions, type PongMessage, type PopulateOption, type Position, type PostponeBillingRequest, type PreparePaymentOptions, type PreparePaymentRequest, type PreparePaymentResponse, type PreparePaymentWithAmount, type PreparePaymentWithProduct, type PresenceChangeHandler, type PresenceInfo, type PresenceSetOptions, type PresenceStatus, type PresenceStatusResult, type ProrationMode, type PublicKeyItem, type PublicKeyPaymentMode, type PublishBatchError, type PublishBatchRequest, type PublishBatchResponse, type PublishMessageRequest, type PublishMessageResponse, type PushPlatform, type PushStatsResult, type PushTopicInfo, type QueryOptions, type QueueInfoResponse, type QueueMessage, type ReadReceiptHandler, type ReadReceiptInfo, type RealtimeConnectOptions, RealtimeConnectionError, type RealtimeConnectionErrorCode, type RealtimeMessage, RealtimeRequestError, type RealtimeSendPolicy, type RegisterDeviceRequest, type RelationType, type RenameFileRequest, type RenameFileResponse, type ReplayHighlight, type ReplayInfo, type ReplayPlayerInfo, type ResolveGamePlayersResponse, type RestoreBackupRequest, type RestoreBackupResponse, type RetentionPolicy, type RoleDetail, type RoleList, type RoleListItem, type RolePermissionItem, type RoleUserItem, RolesAPI, type RoomInfo, type RoomStaleMessage, type RoomSummary, type RoomsResponse, type RotatePublicKeyRequest, type RotatePublicKeyResponse, type SFUTokenOptions, type SFUTokenResponse, type SaveDialogOptions, type SaveDialogResult, type ScriptDetailResponse, type ScriptListResponse, type ScriptLogEntry, type ScriptLogsResponse, type ScriptMeta, type ScriptMetricsResponse, type ScriptVersion, type ScriptVersionListResponse, type SearchIndex, type SearchOptions, type SearchResponse, type SearchResult, type SecurityRule, type SendOptions, type SendSuperChatOptions, type SendSuperChatResponse, type ServerMessage, SessionManager, type SetPageMetaRequest, type Shorts, type ShortsListResponse, type SignalingMessage, type SignalingMessageType, type SlowQueryInfo, type SpectatorInfo, type SpectatorPlayerState, type SpectatorState, type SpeechRecognizeOptions, type SpeechResult, type StateChange, type StateChangeHandler, type StorageUploadOptions, type StorageUploadProgress, type StorageVideoListOptions, type StreamContentPart, type StreamDoneCallback, type StreamDoneData, type StreamErrorCallback, type StreamHandlers, type StreamImageURLPart, type StreamMessage, type StreamOptions, type StreamSession, type StreamTextPart, type StreamTokenCallback, type StreamToolCallCallback, type StreamToolResultCallback, type StreamURLResponse, type SubscribeOptions, type SubscribeTopicRequest, type SubscribedData, type Subscription, type SubscriptionPaymentResponse, type SubscriptionPaymentStatus, type SubscriptionResponse, type SubscriptionStatus, type SuperChat, type SuperChatType, type SuspendAppMemberOptions, type SuspendAppMemberResult, type SyncLostMessage, type SystemInfo, type TTLConfig, type TableAccessLevel, type TableColumnDef, type TableIndex, type TableRelation, type TableSchema, type TableSchemaDefinition, type TokenPersistence, type TransactionRead, type TransactionResult, type TransactionWrite, type TransactionWriteResult, type TranscodeJob, type TranscodeStatus, type TransportType, type Trigger, type TriggerEvent, type TriggerHandlerType, type TypingChangeHandler, type TypingInfo, type UnsuspendAppMemberResult, type UpdateBillingKeyRequest, type UpdateChannelRequest, type UpdateColumnRequest, type UpdateCustomDataRequest, type UpdateCustomDataResponse, type UpdateDataRequest, type UpdateDocumentRequest, type UpdateGameUnitRequest, type UpdateLobbyRequest, type UpdateOrganizationRequest, type UpdatePublicKeyRequest, type UpdatePublicKeyResponse, type UpdateRolePayload, type UpdateSecurityRuleRequest, type UpdateSubscriptionRequest, type UpdateTriggerRequest, type UpdateVideoRequest, type UpdateVideoStorageRequest, type UploadByPathOptions, type UploadFileOptions, type UploadFileResponse, type UploadOptions, type UploadProgress, type VAPIDPublicKeyResponse, type ValidateResponse, type ValidationSchema, type ValidationSchemaField, type ValidationStateTransitions, type Video, type VideoComment, type VideoCompleteUploadResponse, type VideoListOptions, type VideoListResponse, VideoProcessingError, type VideoQuality, type VideoStatus, type VideoStorage, type VideoStorageAccessLevel, type VideoStorageListResponse, type VideoVisibility, type VoiceChannel, type VoiceMember, type WaitOptions, type WatchHistoryItem, type WebPushSubscription, type WebRTCConnectOptions, type WebRTCConnectionState, type WebRTCMode, type WebRTCWarning, type WhereCondition, type WhereOperator, WsTicketError, ConnectBase as default, detectInAppBrowser, escapeToExternalBrowser, isWebTransportSupported, toAIError, toCreateRoomWire };
package/dist/index.js CHANGED
@@ -38,6 +38,7 @@ __export(index_exports, {
38
38
  GameRoomTransport: () => GameRoomTransport,
39
39
  GameScope: () => GameScope,
40
40
  GamesAPI: () => GamesAPI,
41
+ IntegrationsAPI: () => IntegrationsAPI,
41
42
  NativeAPI: () => NativeAPI,
42
43
  OrganizationsAPI: () => OrganizationsAPI,
43
44
  RealtimeConnectionError: () => RealtimeConnectionError,
@@ -8085,6 +8086,41 @@ var GameAPI = class {
8085
8086
  }
8086
8087
  };
8087
8088
 
8089
+ // src/api/integrations.ts
8090
+ var IntegrationsAPI = class {
8091
+ constructor(http) {
8092
+ this.http = http;
8093
+ }
8094
+ /**
8095
+ * 등록한 이벤트를 연결된 앱들에 보낸다.
8096
+ *
8097
+ * 등록하지 않았거나 꺼 둔 이벤트, `payload_schema` 에 맞지 않는 값, 플랫폼 이벤트 이름
8098
+ * (`consent.` `token.` `oauth.` `oidc.` `issue.`), 64KB 넘는 payload 는 서버가 거절한다.
8099
+ *
8100
+ * @example
8101
+ * ```ts
8102
+ * // 함수 (service_role + management_scopes: ["integration:emit"])
8103
+ * await ctx.cbAdmin.integrations.emitEvent("order.paid", { order_id: "o_1", amount: 1200 })
8104
+ * ```
8105
+ */
8106
+ async emitEvent(eventType, payload = {}, options = {}) {
8107
+ if (!this.http.hasJWT() && !this.http.hasSecretKey()) {
8108
+ throw new Error(
8109
+ 'cb.integrations.emitEvent() \uB294 \uC2DC\uD06C\uB9BF \uD0A4(cb_sk_) \uB610\uB294 \uD568\uC218\uC758 ctx.cbAdmin(management_scopes: ["integration:emit"]) \uC774 \uD544\uC694\uD569\uB2C8\uB2E4. Public Key(cb_pk_) \uB2E8\uB3C5 SDK \uC778\uC2A4\uD134\uC2A4(\uBE0C\uB77C\uC6B0\uC800)\uB85C\uB294 \uD638\uCD9C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.'
8110
+ );
8111
+ }
8112
+ if (!eventType) {
8113
+ throw new Error("cb.integrations.emitEvent: eventType \uC774 \uD544\uC694\uD569\uB2C8\uB2E4.");
8114
+ }
8115
+ const body = { event_type: eventType, payload };
8116
+ if (options.targetClientId) body.target_client_id = options.targetClientId;
8117
+ return this.http.post(
8118
+ "/v1/public/integrations/events",
8119
+ body
8120
+ );
8121
+ }
8122
+ };
8123
+
8088
8124
  // src/api/knowledge.ts
8089
8125
  async function readFileInput(file) {
8090
8126
  if (typeof Blob !== "undefined" && file instanceof Blob) {
@@ -14667,8 +14703,8 @@ var SupportAPI = class {
14667
14703
  }
14668
14704
  };
14669
14705
  function detectSdkVersion() {
14670
- if ("6.30.0") {
14671
- return "6.30.0";
14706
+ if ("6.31.0") {
14707
+ return "6.31.0";
14672
14708
  }
14673
14709
  return "unknown";
14674
14710
  }
@@ -17172,6 +17208,7 @@ var ConnectBase = class {
17172
17208
  this.errorTracker = new ErrorTrackerAPI(this.http, config.errorTracker);
17173
17209
  this.oauth = new OAuthAPI(this.http);
17174
17210
  this.payment = new PaymentAPI(this.http);
17211
+ this.integrations = new IntegrationsAPI(this.http);
17175
17212
  this.subscription = new SubscriptionAPI(this.http);
17176
17213
  this.organizations = new OrganizationsAPI(this.http);
17177
17214
  this.push = new PushAPI(this.http);
@@ -17277,6 +17314,7 @@ var index_default = ConnectBase;
17277
17314
  GameRoomTransport,
17278
17315
  GameScope,
17279
17316
  GamesAPI,
17317
+ IntegrationsAPI,
17280
17318
  NativeAPI,
17281
17319
  OrganizationsAPI,
17282
17320
  RealtimeConnectionError,
package/dist/index.mjs CHANGED
@@ -8028,6 +8028,41 @@ var GameAPI = class {
8028
8028
  }
8029
8029
  };
8030
8030
 
8031
+ // src/api/integrations.ts
8032
+ var IntegrationsAPI = class {
8033
+ constructor(http) {
8034
+ this.http = http;
8035
+ }
8036
+ /**
8037
+ * 등록한 이벤트를 연결된 앱들에 보낸다.
8038
+ *
8039
+ * 등록하지 않았거나 꺼 둔 이벤트, `payload_schema` 에 맞지 않는 값, 플랫폼 이벤트 이름
8040
+ * (`consent.` `token.` `oauth.` `oidc.` `issue.`), 64KB 넘는 payload 는 서버가 거절한다.
8041
+ *
8042
+ * @example
8043
+ * ```ts
8044
+ * // 함수 (service_role + management_scopes: ["integration:emit"])
8045
+ * await ctx.cbAdmin.integrations.emitEvent("order.paid", { order_id: "o_1", amount: 1200 })
8046
+ * ```
8047
+ */
8048
+ async emitEvent(eventType, payload = {}, options = {}) {
8049
+ if (!this.http.hasJWT() && !this.http.hasSecretKey()) {
8050
+ throw new Error(
8051
+ 'cb.integrations.emitEvent() \uB294 \uC2DC\uD06C\uB9BF \uD0A4(cb_sk_) \uB610\uB294 \uD568\uC218\uC758 ctx.cbAdmin(management_scopes: ["integration:emit"]) \uC774 \uD544\uC694\uD569\uB2C8\uB2E4. Public Key(cb_pk_) \uB2E8\uB3C5 SDK \uC778\uC2A4\uD134\uC2A4(\uBE0C\uB77C\uC6B0\uC800)\uB85C\uB294 \uD638\uCD9C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.'
8052
+ );
8053
+ }
8054
+ if (!eventType) {
8055
+ throw new Error("cb.integrations.emitEvent: eventType \uC774 \uD544\uC694\uD569\uB2C8\uB2E4.");
8056
+ }
8057
+ const body = { event_type: eventType, payload };
8058
+ if (options.targetClientId) body.target_client_id = options.targetClientId;
8059
+ return this.http.post(
8060
+ "/v1/public/integrations/events",
8061
+ body
8062
+ );
8063
+ }
8064
+ };
8065
+
8031
8066
  // src/api/knowledge.ts
8032
8067
  async function readFileInput(file) {
8033
8068
  if (typeof Blob !== "undefined" && file instanceof Blob) {
@@ -14610,8 +14645,8 @@ var SupportAPI = class {
14610
14645
  }
14611
14646
  };
14612
14647
  function detectSdkVersion() {
14613
- if ("6.30.0") {
14614
- return "6.30.0";
14648
+ if ("6.31.0") {
14649
+ return "6.31.0";
14615
14650
  }
14616
14651
  return "unknown";
14617
14652
  }
@@ -17115,6 +17150,7 @@ var ConnectBase = class {
17115
17150
  this.errorTracker = new ErrorTrackerAPI(this.http, config.errorTracker);
17116
17151
  this.oauth = new OAuthAPI(this.http);
17117
17152
  this.payment = new PaymentAPI(this.http);
17153
+ this.integrations = new IntegrationsAPI(this.http);
17118
17154
  this.subscription = new SubscriptionAPI(this.http);
17119
17155
  this.organizations = new OrganizationsAPI(this.http);
17120
17156
  this.push = new PushAPI(this.http);
@@ -17219,6 +17255,7 @@ export {
17219
17255
  GameRoomTransport,
17220
17256
  GameScope,
17221
17257
  GamesAPI,
17258
+ IntegrationsAPI,
17222
17259
  NativeAPI,
17223
17260
  OrganizationsAPI,
17224
17261
  RealtimeConnectionError,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "connectbase-client",
3
- "version": "6.30.0",
3
+ "version": "6.31.0",
4
4
  "description": "Connect Base JavaScript/TypeScript SDK for browser and Node.js",
5
5
  "repository": {
6
6
  "type": "git",