@livechatta/sdk 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +218 -0
- package/LICENSE +21 -0
- package/README.md +2558 -2
- package/bin/chatta.mjs +7 -0
- package/bin/lib/cli.d.mts +46 -0
- package/bin/lib/cli.mjs +2088 -0
- package/dist/cjs/livechatta.cjs.js +7258 -0
- package/dist/cjs/livechatta.cjs.js.map +1 -0
- package/dist/cjs/livechatta.cjs.min.js +2 -0
- package/dist/cjs/livechatta.cjs.min.js.map +1 -0
- package/dist/esm/livechatta.esm.js +7077 -0
- package/dist/esm/livechatta.esm.js.map +1 -0
- package/dist/esm/livechatta.esm.min.js +2 -0
- package/dist/esm/livechatta.esm.min.js.map +1 -0
- package/dist/platforms/android/LiveChattaClient.kt +367 -0
- package/dist/platforms/android/LiveChattaHttpAPI.kt +2630 -0
- package/dist/platforms/android/LiveChattaJson.kt +83 -0
- package/dist/platforms/android/LiveChattaModels.kt +22805 -0
- package/dist/platforms/android/LiveChattaSentFrom.kt +30 -0
- package/dist/platforms/android/LiveChattaSocketAPI.kt +2113 -0
- package/dist/platforms/android/LiveChattaTyped.kt +239 -0
- package/dist/platforms/android/LiveChattaWebView.kt +158 -0
- package/dist/platforms/angular/livechatta-bridge.service.d.ts +35 -0
- package/dist/platforms/angular/livechatta-bridge.service.js +1 -0
- package/dist/platforms/angular/livechatta-bridge.service.js.map +1 -0
- package/dist/platforms/angular/livechatta-embed.component.d.ts +46 -0
- package/dist/platforms/angular/livechatta-embed.component.js +1 -0
- package/dist/platforms/angular/livechatta-embed.component.js.map +1 -0
- package/dist/platforms/angular/livechatta.service.d.ts +66 -0
- package/dist/platforms/angular/livechatta.service.js +1 -0
- package/dist/platforms/angular/livechatta.service.js.map +1 -0
- package/dist/platforms/capacitor/CapacitorBridge.d.ts +27 -0
- package/dist/platforms/capacitor/CapacitorBridge.js +1 -0
- package/dist/platforms/capacitor/CapacitorBridge.js.map +1 -0
- package/dist/platforms/capacitor/CapacitorDeepLinks.d.ts +23 -0
- package/dist/platforms/capacitor/CapacitorDeepLinks.js +1 -0
- package/dist/platforms/capacitor/CapacitorDeepLinks.js.map +1 -0
- package/dist/platforms/capacitor/CapacitorPermissions.d.ts +29 -0
- package/dist/platforms/capacitor/CapacitorPermissions.js +1 -0
- package/dist/platforms/capacitor/CapacitorPermissions.js.map +1 -0
- package/dist/platforms/capacitor/CapacitorPush.d.ts +33 -0
- package/dist/platforms/capacitor/CapacitorPush.js +1 -0
- package/dist/platforms/capacitor/CapacitorPush.js.map +1 -0
- package/dist/platforms/capacitor/index.d.ts +24 -0
- package/dist/platforms/capacitor/index.js +1 -0
- package/dist/platforms/capacitor/index.js.map +1 -0
- package/dist/platforms/flutter/livechatta_client.dart +359 -0
- package/dist/platforms/flutter/livechatta_http_api.dart +1942 -0
- package/dist/platforms/flutter/livechatta_json.dart +57 -0
- package/dist/platforms/flutter/livechatta_models.dart +23531 -0
- package/dist/platforms/flutter/livechatta_sent_from.dart +35 -0
- package/dist/platforms/flutter/livechatta_socket_api.dart +1504 -0
- package/dist/platforms/flutter/livechatta_typed.dart +234 -0
- package/dist/platforms/flutter/livechatta_webview.dart +190 -0
- package/dist/platforms/ios/LiveChattaClient.swift +374 -0
- package/dist/platforms/ios/LiveChattaHttpAPI.swift +2431 -0
- package/dist/platforms/ios/LiveChattaJSON.swift +84 -0
- package/dist/platforms/ios/LiveChattaModels.swift +27050 -0
- package/dist/platforms/ios/LiveChattaSentFrom.swift +32 -0
- package/dist/platforms/ios/LiveChattaSocketAPI.swift +1446 -0
- package/dist/platforms/ios/LiveChattaTyped.swift +268 -0
- package/dist/platforms/ios/LiveChattaWebView.swift +191 -0
- package/dist/platforms/nuxt/LiveChattaView.d.ts +1 -0
- package/dist/platforms/nuxt/LiveChattaView.js +1 -0
- package/dist/platforms/nuxt/LiveChattaView.js.map +1 -0
- package/dist/platforms/nuxt/useChattaBridge.d.ts +9 -0
- package/dist/platforms/nuxt/useChattaBridge.js +1 -0
- package/dist/platforms/nuxt/useChattaBridge.js.map +1 -0
- package/dist/platforms/nuxt/useLiveChatta.d.ts +63 -0
- package/dist/platforms/nuxt/useLiveChatta.js +1 -0
- package/dist/platforms/nuxt/useLiveChatta.js.map +1 -0
- package/dist/platforms/react/LiveChattaView.d.ts +58 -0
- package/dist/platforms/react/LiveChattaView.js +1 -0
- package/dist/platforms/react/LiveChattaView.js.map +1 -0
- package/dist/platforms/react/useChattaBridge.d.ts +1 -0
- package/dist/platforms/react/useChattaBridge.js +1 -0
- package/dist/platforms/react/useChattaBridge.js.map +1 -0
- package/dist/platforms/react/useChattaDeepLink.d.ts +2 -0
- package/dist/platforms/react/useChattaDeepLink.js +1 -0
- package/dist/platforms/react/useChattaDeepLink.js.map +1 -0
- package/dist/platforms/react/useChattaPermissions.d.ts +9 -0
- package/dist/platforms/react/useChattaPermissions.js +1 -0
- package/dist/platforms/react/useChattaPermissions.js.map +1 -0
- package/dist/platforms/react/useChattaUnread.d.ts +1 -0
- package/dist/platforms/react/useChattaUnread.js +1 -0
- package/dist/platforms/react/useChattaUnread.js.map +1 -0
- package/dist/platforms/react/useLiveChatta.d.ts +29 -0
- package/dist/platforms/react/useLiveChatta.js +1 -0
- package/dist/platforms/react/useLiveChatta.js.map +1 -0
- package/dist/platforms/react-native/LiveChattaView.d.ts +52 -0
- package/dist/platforms/react-native/LiveChattaView.js +1 -0
- package/dist/platforms/react-native/LiveChattaView.js.map +1 -0
- package/dist/platforms/react-native/useChattaBridge.d.ts +12 -0
- package/dist/platforms/react-native/useChattaBridge.js +1 -0
- package/dist/platforms/react-native/useChattaBridge.js.map +1 -0
- package/dist/platforms/react-native/useLiveChatta.d.ts +29 -0
- package/dist/platforms/react-native/useLiveChatta.js +1 -0
- package/dist/platforms/react-native/useLiveChatta.js.map +1 -0
- package/dist/platforms/svelte/LiveChattaEmbed.d.ts +54 -0
- package/dist/platforms/svelte/LiveChattaEmbed.js +1 -0
- package/dist/platforms/svelte/LiveChattaEmbed.js.map +1 -0
- package/dist/platforms/svelte/chattaBridgeStore.d.ts +19 -0
- package/dist/platforms/svelte/chattaBridgeStore.js +1 -0
- package/dist/platforms/svelte/chattaBridgeStore.js.map +1 -0
- package/dist/platforms/svelte/useLiveChatta.d.ts +61 -0
- package/dist/platforms/svelte/useLiveChatta.js +1 -0
- package/dist/platforms/svelte/useLiveChatta.js.map +1 -0
- package/dist/platforms/tauri/TauriBridge.d.ts +34 -0
- package/dist/platforms/tauri/TauriBridge.js +1 -0
- package/dist/platforms/tauri/TauriBridge.js.map +1 -0
- package/dist/platforms/tauri/TauriDeepLinks.d.ts +29 -0
- package/dist/platforms/tauri/TauriDeepLinks.js +1 -0
- package/dist/platforms/tauri/TauriDeepLinks.js.map +1 -0
- package/dist/platforms/tauri/TauriPermissions.d.ts +21 -0
- package/dist/platforms/tauri/TauriPermissions.js +1 -0
- package/dist/platforms/tauri/TauriPermissions.js.map +1 -0
- package/dist/platforms/tauri/TauriUpdater.d.ts +31 -0
- package/dist/platforms/tauri/TauriUpdater.js +1 -0
- package/dist/platforms/tauri/TauriUpdater.js.map +1 -0
- package/dist/platforms/tauri/index.d.ts +22 -0
- package/dist/platforms/tauri/index.js +1 -0
- package/dist/platforms/tauri/index.js.map +1 -0
- package/dist/platforms/vue/LiveChattaView.d.ts +1 -0
- package/dist/platforms/vue/LiveChattaView.js +1 -0
- package/dist/platforms/vue/LiveChattaView.js.map +1 -0
- package/dist/platforms/vue/useChattaBridge.d.ts +11 -0
- package/dist/platforms/vue/useChattaBridge.js +1 -0
- package/dist/platforms/vue/useChattaBridge.js.map +1 -0
- package/dist/platforms/vue/useChattaDeepLink.d.ts +2 -0
- package/dist/platforms/vue/useChattaDeepLink.js +1 -0
- package/dist/platforms/vue/useChattaDeepLink.js.map +1 -0
- package/dist/platforms/vue/useChattaPermissions.d.ts +9 -0
- package/dist/platforms/vue/useChattaPermissions.js +1 -0
- package/dist/platforms/vue/useChattaPermissions.js.map +1 -0
- package/dist/platforms/vue/useChattaUnread.d.ts +8 -0
- package/dist/platforms/vue/useChattaUnread.js +1 -0
- package/dist/platforms/vue/useChattaUnread.js.map +1 -0
- package/dist/platforms/vue/useLiveChatta.d.ts +58 -0
- package/dist/platforms/vue/useLiveChatta.js +1 -0
- package/dist/platforms/vue/useLiveChatta.js.map +1 -0
- package/dist/platforms/web/LiveChattaEmbed.d.ts +94 -0
- package/dist/platforms/web/LiveChattaEmbed.js +1 -0
- package/dist/platforms/web/LiveChattaEmbed.js.map +1 -0
- package/dist/platforms/web/bridge.d.ts +8 -0
- package/dist/platforms/web/bridge.js +1 -0
- package/dist/platforms/web/bridge.js.map +1 -0
- package/dist/platforms/web/permissions.d.ts +8 -0
- package/dist/platforms/web/permissions.js +1 -0
- package/dist/platforms/web/permissions.js.map +1 -0
- package/dist/types/billing.d.ts +355 -0
- package/dist/types/billing.js +53 -0
- package/dist/types/billing.js.map +1 -0
- package/dist/types/calendar.d.ts +132 -0
- package/dist/types/calendar.js +15 -0
- package/dist/types/calendar.js.map +1 -0
- package/dist/types/chat-core.d.ts +901 -0
- package/dist/types/chat-core.js +98 -0
- package/dist/types/chat-core.js.map +1 -0
- package/dist/types/chat-features.d.ts +775 -0
- package/dist/types/chat-features.js +50 -0
- package/dist/types/chat-features.js.map +1 -0
- package/dist/types/content.d.ts +138 -0
- package/dist/types/content.js +2 -0
- package/dist/types/content.js.map +1 -0
- package/dist/types/core/AutoRefresh.d.ts +68 -0
- package/dist/types/core/Bridge.d.ts +124 -0
- package/dist/types/core/Config.d.ts +26 -0
- package/dist/types/core/DeepLinks.d.ts +38 -0
- package/dist/types/core/EventBus.d.ts +15 -0
- package/dist/types/core/GrantStore.d.ts +29 -0
- package/dist/types/core/LiveChatta.d.ts +128 -0
- package/dist/types/core/Permissions.d.ts +34 -0
- package/dist/types/core/TokenManager.d.ts +25 -0
- package/dist/types/core/events.d.ts +140 -0
- package/dist/types/csat.d.ts +110 -0
- package/dist/types/csat.js +12 -0
- package/dist/types/csat.js.map +1 -0
- package/dist/types/events.d.ts +242 -0
- package/dist/types/events.js +275 -0
- package/dist/types/events.js.map +1 -0
- package/dist/types/extras.d.ts +353 -0
- package/dist/types/extras.js +31 -0
- package/dist/types/extras.js.map +1 -0
- package/dist/types/http/HttpAPI.d.ts +944 -0
- package/dist/types/http/HttpTransport.d.ts +66 -0
- package/dist/types/http/incomingWebhook.d.ts +17 -0
- package/dist/types/incoming-webhooks.d.ts +78 -0
- package/dist/types/incoming-webhooks.js +16 -0
- package/dist/types/incoming-webhooks.js.map +1 -0
- package/dist/types/index.d.ts +15 -0
- package/dist/types/index.js +16 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/liveflex.d.ts +578 -0
- package/dist/types/liveflex.js +7 -0
- package/dist/types/liveflex.js.map +1 -0
- package/dist/types/models.d.ts +1753 -0
- package/dist/types/models.js +148 -0
- package/dist/types/models.js.map +1 -0
- package/dist/types/options.d.ts +190 -0
- package/dist/types/options.js +43 -0
- package/dist/types/options.js.map +1 -0
- package/dist/types/shared-channels.d.ts +236 -0
- package/dist/types/shared-channels.js +50 -0
- package/dist/types/shared-channels.js.map +1 -0
- package/dist/types/socket/SocketAPI.d.ts +1026 -0
- package/dist/types/socket/SocketTransport.d.ts +44 -0
- package/dist/types/types/billing.d.ts +355 -0
- package/dist/types/types/calendar.d.ts +132 -0
- package/dist/types/types/chat-core.d.ts +901 -0
- package/dist/types/types/chat-features.d.ts +775 -0
- package/dist/types/types/content.d.ts +138 -0
- package/dist/types/types/csat.d.ts +110 -0
- package/dist/types/types/events.d.ts +242 -0
- package/dist/types/types/extras.d.ts +353 -0
- package/dist/types/types/incoming-webhooks.d.ts +78 -0
- package/dist/types/types/index.d.ts +15 -0
- package/dist/types/types/liveflex.d.ts +578 -0
- package/dist/types/types/models.d.ts +1753 -0
- package/dist/types/types/options.d.ts +190 -0
- package/dist/types/types/shared-channels.d.ts +236 -0
- package/dist/types/types/workspace-gifs.d.ts +95 -0
- package/dist/types/types/workspace.d.ts +390 -0
- package/dist/types/ui/EmbedConfig.d.ts +38 -0
- package/dist/types/ui/EmbedUI.d.ts +44 -0
- package/dist/types/ui/Launcher.d.ts +122 -0
- package/dist/types/ui/brand.d.ts +27 -0
- package/dist/types/ui/embedMessages.d.ts +23 -0
- package/dist/types/ui/hours.d.ts +35 -0
- package/dist/types/ui/prechat.d.ts +35 -0
- package/dist/types/ui/widgetConfig.d.ts +4 -0
- package/dist/types/utils/crypto.d.ts +6 -0
- package/dist/types/utils/hmac.d.ts +40 -0
- package/dist/types/utils/permissions.d.ts +5 -0
- package/dist/types/utils/platform.d.ts +18 -0
- package/dist/types/utils/visitor.d.ts +2 -0
- package/dist/types/workspace-gifs.d.ts +95 -0
- package/dist/types/workspace-gifs.js +3 -0
- package/dist/types/workspace-gifs.js.map +1 -0
- package/dist/types/workspace.d.ts +390 -0
- package/dist/types/workspace.js +13 -0
- package/dist/types/workspace.js.map +1 -0
- package/dist/umd/livechatta.umd.js +7262 -0
- package/dist/umd/livechatta.umd.js.map +1 -0
- package/dist/umd/livechatta.umd.min.js +2 -0
- package/dist/umd/livechatta.umd.min.js.map +1 -0
- package/package.json +278 -4
|
@@ -0,0 +1,1026 @@
|
|
|
1
|
+
import { SocketTransport } from './SocketTransport';
|
|
2
|
+
import { EventBus } from '../core/EventBus';
|
|
3
|
+
import { ChatEvent } from '../types/events';
|
|
4
|
+
import type { HopMeetingUpdatedEvent } from '../types/calendar';
|
|
5
|
+
import type { GifRef } from '../types/workspace-gifs';
|
|
6
|
+
import type { SharedChannelEvent, SharedChannelUpdatedEvent } from '../types/shared-channels';
|
|
7
|
+
import type { StickerView, StickerPage, StickersSearchPayload, StickerUploadPayload, StickerRefPayload, ChattaMoneyCard, ChattaMoneyConfirmPayload, MoneyCard, MoneyCardGetPayload, MoneyCardActionPayload, CallLoggedEvent, LinkSettingsUpdatedEvent, WebinarViewerCountEvent, WebinarQaRefPayload, WebinarQaAnswerLiveResult } from '../types/liveflex';
|
|
8
|
+
import type { Message, Member, ChatError, PaginatedResult, SocketConversationsResult, AttachmentInput, NewConversationEvent, EditConversationEvent, MakeAdminConversationEvent, MemberStatusEvent, MessageStatusEvent, MessageReactionEvent, TypingEvent, DraftUpdatedEvent, SaveDraftPayload, SetChatStatusPayload, ChatStatusEvent, OnlineEvent, OfflineEvent, UnreadCountUpdate, NotificationEvent, AuthTokenResponse, JoinConversationEvent, EditMessageEvent, ForwardMessageEvent, ForwardPostPayload, ForwardPostEvent, MessageFailedEvent, MarkMessagesReadPayload, MessageReadEvent, SearchMessagesPayload, SearchMessagesResult, ScheduledMessageEvent, SearchChatUsersPayload, SearchChatUsersResult, InviteNewParticipant, ReplyToPayload, ChatConversationType, ValidatePasswordPayload, ForgotPasswordPayload, ResetPasswordPayload, ForgotPasswordResult, ResetPasswordResult, ChangePasswordPayload, RefreshTokenPayload, RevokeTokenPayload, StatusResponse, ThreadMessagesPayload, ThreadMessagesResult, ToggleBookmarkPayload, ToggleBookmarkResult, GetBookmarksPayload, GetBookmarksResult, GetAllBookmarksPayload, GetAllBookmarksResult, MembershipRevokedEvent, ThreadUpdateEvent, VotePollPayload, VotePollResult, Post, CreatePostPayload, GetPostsPayload, ViewPostPayload, ReactToPostPayload, ReplyToPostPayload, UpdatePostPayload, DeletePostPayload, PostsResult, TranslateMessagePayload, TranslateMessageResult, SetLanguagePayload, SetLanguageResult, OnlineUsersPayload, OnlineUsersResult, AiCredits, MessageChangeStatus, GetPostMessagesPayload, GetPostMessagesResult, ConversationMembersPayload, ConversationMembersResult, LinkHandlesResult, StartHopPayload, StartHopAdHocPayload, JoinHopPayload, JoinHopResult, ScheduleHopMeetingPayload, ScheduleHopMeetingResult, HopLobbyWaitingEvent, HopPublicState, HopMeetingRecord, HopListProducersResult, HopListParticipantsResult, HopListActiveResult, PostDeleteEvent, PinConversationEvent, LinkUserJoinedEvent, LinkUserUpdatedEvent, GetAllThreadsPayload, AllThreadsResult, HopParticipantJoinedEvent, HopParticipantLeftEvent, HopInviteEventExtended, HopRedirectEvent, HopRecordingStartedEvent, HopRecordingReadyEvent, HopParticipantMutedEvent, HopParticipantDroppedEvent, HopYouWereDroppedEvent, HopReactionEvent, HopVoteUpdatedEvent, HopRaiseHandEvent, HopVoteCompleteEvent, HopNewVoteRoundEvent, HopHostChangedEvent, Automation, WhiteboardStrokePayload, WhiteboardSnapshotPayload, WhiteboardStrokeEvent, WhiteboardSnapshotEvent, CreateAutomationPayload, UpdateAutomationPayload, DeleteAutomationPayload, GetAutomationsPayload, AutomationsResult, StartWebinarPayload, StartWebinarResult, RaiseHandPayload, LowerHandPayload, PromoteAttendeeAudioPayload, PromoteAttendeeAudioResult, WebinarQaSubmitPayload, WebinarQaAnswerPayload, WebinarQaSubmitResult, WebinarQaAnswerResult, WebinarStartedEvent, WebinarHandRaisedEvent, WebinarHandLoweredEvent, WebinarAttendeePromotedEvent, WebinarQaUpdatedEvent, ConversationStats, UpdateChatUserSettingsPayload, ChatUserSettingsResult, StickerRef } from '../types/models';
|
|
9
|
+
import type { MarkMessagesDeliveredPayload, MessageDeliveredResult, MessageInfoPayload, MessageInfoResult, MuteDuration, ConversationMuteState, QuietHours, CreateMessageReminderPayload, MessageReminderView, MessageRemindersChangedEvent, ReminderDuePayload, UpdateConversationPermissionsPayload, ConversationPermissionsPublic, HuddleStartPayload, HuddleStatusView, TranscribeMessagePayload, TranscriptResponse, InboxUpdatedPayload, InternalNoteEvent, InboxNoteDeleted, ConversationNotesUpdatedEvent } from '../types/chat-features';
|
|
10
|
+
import type { ConversationReadState, UnreadTotalsRequest, UnreadTotalsResult, DeleteMessagePayload, MessageDeletedEvent, SearchAllPayload, SearchAllResult, SubmitPreChatPayload, PreChatSubmittedEvent, HopPollSummary, HopPollVoteUpdatedEvent, HopCollabSnapshot, HopCaptionsSwitch, HopCaptionsStateEvent, HopCaptionPayload, HopCaptionTextEvent, HopRecordingListPayload, HopRecordingListResult, HopPinForAllPayload, HopPinForAllResult, HopPinnedForAllEvent, ConversationMode, HopInviteAnsweredEvent, HopUnmuteRequestedEvent, HopRelayAck } from '../types/chat-core';
|
|
11
|
+
import type { CsatUpdatedEvent } from '../types/csat';
|
|
12
|
+
export interface StartConversationPayload {
|
|
13
|
+
senderId: string;
|
|
14
|
+
type: ChatConversationType;
|
|
15
|
+
name?: string;
|
|
16
|
+
caption?: string;
|
|
17
|
+
profilePhoto?: string;
|
|
18
|
+
participantIds?: string[];
|
|
19
|
+
newParticipants?: InviteNewParticipant[];
|
|
20
|
+
chatLinkCode?: string;
|
|
21
|
+
/** Groups default to private; send false for a public group. Channels default to public. */
|
|
22
|
+
isPrivate?: boolean;
|
|
23
|
+
attachments?: AttachmentInput[];
|
|
24
|
+
/** GROUP / CHANNEL preset; staff-only link modes refuse groups / channels from members. */
|
|
25
|
+
mode?: ConversationMode;
|
|
26
|
+
/** Sidebar category, e.g. 'Text' or 'Voice' (≤ 40 chars). */
|
|
27
|
+
category?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface SendMessagePayload {
|
|
30
|
+
conversationId: string;
|
|
31
|
+
senderId: string;
|
|
32
|
+
referenceId: string;
|
|
33
|
+
/** Optional chat link code — required when sending from a headless client
|
|
34
|
+
* that does not have an active socket connection scoped to a link. */
|
|
35
|
+
chatLinkCode?: string;
|
|
36
|
+
message?: string;
|
|
37
|
+
attachments?: AttachmentInput[];
|
|
38
|
+
replyTo?: ReplyToPayload;
|
|
39
|
+
scheduledAt?: string;
|
|
40
|
+
codeLang?: string;
|
|
41
|
+
parentMessageId?: string;
|
|
42
|
+
/** Send a GIF: `{ provider, id }` from `searchGifs`, with no text, files or sticker. */
|
|
43
|
+
gif?: GifRef;
|
|
44
|
+
messageKind?: string;
|
|
45
|
+
question?: string;
|
|
46
|
+
options?: {
|
|
47
|
+
text: string;
|
|
48
|
+
}[];
|
|
49
|
+
multiSelect?: boolean;
|
|
50
|
+
/** Poll: hide who voted (counts only). */
|
|
51
|
+
anonymous?: boolean;
|
|
52
|
+
/** Sticker from the link's enabled pack; send without `message` (400 otherwise). */
|
|
53
|
+
sticker?: StickerRef;
|
|
54
|
+
/** 1.6.3: share a location (sendable without text). */
|
|
55
|
+
location?: LocationInput;
|
|
56
|
+
/** 1.6.3: share a contact card (sendable without text). */
|
|
57
|
+
contact?: ContactInput;
|
|
58
|
+
/** 1.6.6: up to 6 tappable quick-reply options shown under a prompt message. */
|
|
59
|
+
quickReplies?: string[];
|
|
60
|
+
}
|
|
61
|
+
/** 1.6.3: a shared location point. */
|
|
62
|
+
export interface LocationInput {
|
|
63
|
+
lat: number;
|
|
64
|
+
lng: number;
|
|
65
|
+
label?: string;
|
|
66
|
+
address?: string;
|
|
67
|
+
/** 1.6.5: start live sharing — the point updates in place until it expires. */
|
|
68
|
+
live?: boolean;
|
|
69
|
+
/** 1.6.5: live-share duration in minutes (15–480). */
|
|
70
|
+
durationMinutes?: number;
|
|
71
|
+
}
|
|
72
|
+
/** 1.6.5: move a live-location point. */
|
|
73
|
+
export interface UpdateLiveLocationPayload {
|
|
74
|
+
conversationId: string;
|
|
75
|
+
messageId: string;
|
|
76
|
+
lat: number;
|
|
77
|
+
lng: number;
|
|
78
|
+
}
|
|
79
|
+
export interface StopLiveLocationPayload {
|
|
80
|
+
conversationId: string;
|
|
81
|
+
messageId: string;
|
|
82
|
+
}
|
|
83
|
+
/** 1.6.5: broadcast when a live point moves. */
|
|
84
|
+
export interface LiveLocationUpdatedEvent {
|
|
85
|
+
conversationId: string;
|
|
86
|
+
messageId: string;
|
|
87
|
+
lat: number;
|
|
88
|
+
lng: number;
|
|
89
|
+
updatedAt?: string;
|
|
90
|
+
liveUntil?: string;
|
|
91
|
+
}
|
|
92
|
+
/** 1.6.5: broadcast when a live share ends. */
|
|
93
|
+
export interface LiveLocationEndedEvent {
|
|
94
|
+
conversationId: string;
|
|
95
|
+
messageId: string;
|
|
96
|
+
endedAt?: string;
|
|
97
|
+
}
|
|
98
|
+
/** 1.6.3: a shared contact card. */
|
|
99
|
+
export interface ContactInput {
|
|
100
|
+
memberId?: string;
|
|
101
|
+
name: string;
|
|
102
|
+
handle?: string;
|
|
103
|
+
phone?: string;
|
|
104
|
+
email?: string;
|
|
105
|
+
photo?: string;
|
|
106
|
+
}
|
|
107
|
+
export interface TypingPayload {
|
|
108
|
+
conversationId: string;
|
|
109
|
+
isTyping: boolean;
|
|
110
|
+
}
|
|
111
|
+
export interface JoinConversationPayload {
|
|
112
|
+
conversationId: string;
|
|
113
|
+
senderId: string;
|
|
114
|
+
participantIds?: string[];
|
|
115
|
+
newParticipants?: InviteNewParticipant[];
|
|
116
|
+
chatLinkCode?: string;
|
|
117
|
+
chatLinkId?: string;
|
|
118
|
+
}
|
|
119
|
+
export interface EditConversationPayload {
|
|
120
|
+
conversationId: string;
|
|
121
|
+
senderId: string;
|
|
122
|
+
name?: string;
|
|
123
|
+
caption?: string;
|
|
124
|
+
profilePhoto?: string;
|
|
125
|
+
status?: string;
|
|
126
|
+
disappearAfter?: number | null;
|
|
127
|
+
/** Conversation admins only: Private/Public switch for a group or channel (400 for DMs, meetings, support rooms and shared channels). */
|
|
128
|
+
isPrivate?: boolean;
|
|
129
|
+
}
|
|
130
|
+
export interface ToggleConversationPayload {
|
|
131
|
+
conversationId: string;
|
|
132
|
+
senderId: string;
|
|
133
|
+
}
|
|
134
|
+
export interface ChangeStatusPayload {
|
|
135
|
+
conversationId: string;
|
|
136
|
+
senderId: string;
|
|
137
|
+
status: string;
|
|
138
|
+
}
|
|
139
|
+
export interface MemberStatusPayload {
|
|
140
|
+
conversationId: string;
|
|
141
|
+
memberId: string;
|
|
142
|
+
status: string;
|
|
143
|
+
}
|
|
144
|
+
export interface MessageStatusPayload {
|
|
145
|
+
conversationId: string;
|
|
146
|
+
memberId: string;
|
|
147
|
+
messageId: string;
|
|
148
|
+
status: MessageChangeStatus | string;
|
|
149
|
+
}
|
|
150
|
+
export interface ReactMessagePayload {
|
|
151
|
+
conversationId: string;
|
|
152
|
+
messageId: string;
|
|
153
|
+
emoji: string;
|
|
154
|
+
}
|
|
155
|
+
export interface MakeAdminPayload {
|
|
156
|
+
conversationId: string;
|
|
157
|
+
senderId: string;
|
|
158
|
+
participantIds: string[];
|
|
159
|
+
role?: string;
|
|
160
|
+
action?: 'add' | 'remove';
|
|
161
|
+
}
|
|
162
|
+
/** A sender can edit for 24 h after sending (server window); later calls reject with `EDIT_WINDOW_CLOSED`. */
|
|
163
|
+
export interface EditMessagePayload {
|
|
164
|
+
conversationId: string;
|
|
165
|
+
messageId: string;
|
|
166
|
+
/** Your own chat-user id; filled from the connection's `online` event when omitted. */
|
|
167
|
+
senderId?: string;
|
|
168
|
+
message: string;
|
|
169
|
+
}
|
|
170
|
+
/** Backend `ForwardChatMessageDto`; every field is required (Mongo ids). */
|
|
171
|
+
export interface ForwardMessagePayload {
|
|
172
|
+
messageId: string;
|
|
173
|
+
fromConversationId: string;
|
|
174
|
+
toConversationId: string;
|
|
175
|
+
senderId: string;
|
|
176
|
+
}
|
|
177
|
+
export interface ConversationFilterPayload {
|
|
178
|
+
/** The server always sets this to you (chatta #427). */
|
|
179
|
+
chatUserByMemberIds?: string;
|
|
180
|
+
chatUserByConversationIds?: string;
|
|
181
|
+
chatUserByLinkIds?: string;
|
|
182
|
+
chatUserSearch?: string;
|
|
183
|
+
chatUserByStatuses?: string;
|
|
184
|
+
/** Comma list of conversation types for a type lane (e.g. 'GROUP'). */
|
|
185
|
+
chatConversationByTypes?: string;
|
|
186
|
+
/** Comma list (max 20) of conversation codes: your own row for a deep link (chatta #427). */
|
|
187
|
+
chatConversationByCodes?: string;
|
|
188
|
+
nextCursor?: string;
|
|
189
|
+
prevCursor?: string;
|
|
190
|
+
/** Default 40, max 40 (`SIDEBAR_PAGE_SIZE`); use one size for every page of a list. */
|
|
191
|
+
limit?: string;
|
|
192
|
+
}
|
|
193
|
+
export interface MessageFilterPayload {
|
|
194
|
+
chatMessageByConversationIds: string;
|
|
195
|
+
chatMessageSearch?: string;
|
|
196
|
+
chatMessageBySenderIds?: string;
|
|
197
|
+
chatMessageByTypes?: string;
|
|
198
|
+
chatMessageByStatuses?: string;
|
|
199
|
+
chatMessageByDeliveryStatuses?: string;
|
|
200
|
+
chatMessageByDeleted?: string;
|
|
201
|
+
chatMessageByParentId?: string;
|
|
202
|
+
chatMessageByExcludeThreads?: string;
|
|
203
|
+
chatMessageByHasAttachments?: string;
|
|
204
|
+
/** '1' = `readBy` / `deliveredTo` hold only your own entry, plus `readCount` / `deliveredCount`. */
|
|
205
|
+
compactReceipts?: '1';
|
|
206
|
+
nextCursor?: string;
|
|
207
|
+
prevCursor?: string;
|
|
208
|
+
limit?: string;
|
|
209
|
+
}
|
|
210
|
+
type Callback<T> = (data: T) => void;
|
|
211
|
+
/**
|
|
212
|
+
* Chainable Socket API wrapping all ChatEvent emitters and listeners.
|
|
213
|
+
* All emitters return Promises (socket.io ack pattern) and accept optional callbacks.
|
|
214
|
+
* All listeners are strongly typed.
|
|
215
|
+
*/
|
|
216
|
+
export declare class SocketAPI {
|
|
217
|
+
private readonly transport;
|
|
218
|
+
private readonly eventBus;
|
|
219
|
+
constructor(transport: SocketTransport, eventBus: EventBus);
|
|
220
|
+
getConversations(query?: ConversationFilterPayload, cb?: Callback<SocketConversationsResult>): Promise<SocketConversationsResult>;
|
|
221
|
+
startConversation(data: StartConversationPayload, cb?: Callback<NewConversationEvent>): Promise<NewConversationEvent>;
|
|
222
|
+
enterConversation(conversationId: string, cb?: Callback<OnlineEvent>): Promise<OnlineEvent>;
|
|
223
|
+
joinConversation(data: JoinConversationPayload, cb?: Callback<JoinConversationEvent>): Promise<JoinConversationEvent>;
|
|
224
|
+
editConversation(data: EditConversationPayload, cb?: Callback<EditConversationEvent>): Promise<EditConversationEvent>;
|
|
225
|
+
pinConversation(data: {
|
|
226
|
+
conversationId: string;
|
|
227
|
+
}, cb?: Callback<{
|
|
228
|
+
conversationId: string;
|
|
229
|
+
isPinned: boolean;
|
|
230
|
+
}>): Promise<{
|
|
231
|
+
conversationId: string;
|
|
232
|
+
isPinned: boolean;
|
|
233
|
+
}>;
|
|
234
|
+
makeAdmin(data: MakeAdminPayload, cb?: Callback<MakeAdminConversationEvent>): Promise<MakeAdminConversationEvent>;
|
|
235
|
+
toggleLock(data: ToggleConversationPayload, cb?: Callback<EditConversationEvent>): Promise<EditConversationEvent>;
|
|
236
|
+
changeConversationStatus(data: ChangeStatusPayload, cb?: Callback<EditConversationEvent>): Promise<EditConversationEvent>;
|
|
237
|
+
changeMemberStatus(data: MemberStatusPayload, cb?: Callback<MemberStatusEvent>): Promise<MemberStatusEvent>;
|
|
238
|
+
getMessages(query: MessageFilterPayload, cb?: Callback<{
|
|
239
|
+
conversationId: string;
|
|
240
|
+
messages: PaginatedResult<Message>;
|
|
241
|
+
memberId: string;
|
|
242
|
+
member: Member;
|
|
243
|
+
}>): Promise<any>;
|
|
244
|
+
/** Too many sends in a second fail with code `RATE_LIMITED` (429, see `isRateLimited`): keep the message as not sent and retry. */
|
|
245
|
+
sendMessage(data: SendMessagePayload, cb?: Callback<Message>): Promise<Message>;
|
|
246
|
+
typing(data: TypingPayload, cb?: Callback<TypingEvent>): Promise<TypingEvent>;
|
|
247
|
+
/** Save this member's draft for a conversation; it syncs to their other devices (1.6.1). */
|
|
248
|
+
saveDraft(data: SaveDraftPayload, cb?: Callback<DraftUpdatedEvent>): Promise<DraftUpdatedEvent>;
|
|
249
|
+
/** Set your custom status (/status, /away); empty text + away=false clears it (1.6.4). */
|
|
250
|
+
setChatStatus(data: SetChatStatusPayload, cb?: Callback<ChatStatusEvent>): Promise<ChatStatusEvent>;
|
|
251
|
+
/** Move a live-location point you shared; broadcasts to the conversation (1.6.5). */
|
|
252
|
+
updateLiveLocation(data: UpdateLiveLocationPayload, cb?: Callback<LiveLocationUpdatedEvent>): Promise<LiveLocationUpdatedEvent>;
|
|
253
|
+
/** End a live-location share early (1.6.5). */
|
|
254
|
+
stopLiveLocation(data: StopLiveLocationPayload, cb?: Callback<LiveLocationEndedEvent>): Promise<LiveLocationEndedEvent>;
|
|
255
|
+
changeMessageStatus(data: MessageStatusPayload, cb?: Callback<MessageStatusEvent>): Promise<MessageStatusEvent>;
|
|
256
|
+
reactToMessage(data: ReactMessagePayload, cb?: Callback<MessageReactionEvent>): Promise<MessageReactionEvent>;
|
|
257
|
+
/** Rejects with `LiveChattaError` code `EDIT_WINDOW_CLOSED` (see `isEditWindowClosed`) after the edit window. */
|
|
258
|
+
editMessage(data: EditMessagePayload, cb?: Callback<EditMessageEvent>): Promise<EditMessageEvent>;
|
|
259
|
+
/** One target per call; to forward to several chats, call it per chat. Call recordings can't be forwarded (400). */
|
|
260
|
+
forwardMessage(data: ForwardMessagePayload, cb?: Callback<ForwardMessageEvent>): Promise<ForwardMessageEvent>;
|
|
261
|
+
forwardPost(data: ForwardPostPayload, cb?: Callback<ForwardPostEvent>): Promise<ForwardPostEvent>;
|
|
262
|
+
markMessagesRead(data: MarkMessagesReadPayload, cb?: Callback<MessageReadEvent>): Promise<MessageReadEvent>;
|
|
263
|
+
searchMessages(data: SearchMessagesPayload, cb?: Callback<SearchMessagesResult>): Promise<SearchMessagesResult>;
|
|
264
|
+
searchChatUsers(data: SearchChatUsersPayload, cb?: Callback<SearchChatUsersResult>): Promise<SearchChatUsersResult>;
|
|
265
|
+
getThreadMessages(data: ThreadMessagesPayload, cb?: Callback<ThreadMessagesResult>): Promise<ThreadMessagesResult>;
|
|
266
|
+
toggleBookmark(data: ToggleBookmarkPayload, cb?: Callback<ToggleBookmarkResult>): Promise<ToggleBookmarkResult>;
|
|
267
|
+
getBookmarks(data: GetBookmarksPayload, cb?: Callback<GetBookmarksResult>): Promise<GetBookmarksResult>;
|
|
268
|
+
/** Every bookmarked message across the member's conversations, newest first (cursor paged). */
|
|
269
|
+
getAllBookmarks(data?: GetAllBookmarksPayload, cb?: Callback<GetAllBookmarksResult>): Promise<GetAllBookmarksResult>;
|
|
270
|
+
votePoll(data: VotePollPayload, cb?: Callback<VotePollResult>): Promise<VotePollResult>;
|
|
271
|
+
validatePassword(data: ValidatePasswordPayload, cb?: Callback<StatusResponse>): Promise<StatusResponse>;
|
|
272
|
+
/** Email a chat user a reset code (5/min per IP). BREAKING in 1.2.2: `{ identifier, chatLinkCode }`. */
|
|
273
|
+
forgotPassword(data: ForgotPasswordPayload, cb?: Callback<ForgotPasswordResult>): Promise<ForgotPasswordResult>;
|
|
274
|
+
/** Set a chat user's new password with the emailed code (10/min per IP); signs out their sessions. */
|
|
275
|
+
resetPassword(data: ResetPasswordPayload, cb?: Callback<ResetPasswordResult>): Promise<ResetPasswordResult>;
|
|
276
|
+
changePassword(data: ChangePasswordPayload, cb?: Callback<StatusResponse>): Promise<StatusResponse>;
|
|
277
|
+
refreshToken(data: RefreshTokenPayload, cb?: Callback<AuthTokenResponse>): Promise<AuthTokenResponse>;
|
|
278
|
+
revokeToken(data: RevokeTokenPayload, cb?: Callback<StatusResponse>): Promise<StatusResponse>;
|
|
279
|
+
createPost(data: CreatePostPayload, cb?: Callback<Post>): Promise<Post>;
|
|
280
|
+
getPosts(data?: GetPostsPayload, cb?: Callback<PostsResult>): Promise<PostsResult>;
|
|
281
|
+
getStories(data?: GetPostsPayload, cb?: Callback<PostsResult>): Promise<PostsResult>;
|
|
282
|
+
viewPost(data: ViewPostPayload, cb?: Callback<StatusResponse>): Promise<StatusResponse>;
|
|
283
|
+
reactToPost(data: ReactToPostPayload, cb?: Callback<Post>): Promise<Post>;
|
|
284
|
+
replyToPost(data: ReplyToPostPayload, cb?: Callback<Post>): Promise<Post>;
|
|
285
|
+
updatePost(data: UpdatePostPayload, cb?: Callback<Post>): Promise<Post>;
|
|
286
|
+
deletePost(data: DeletePostPayload, cb?: Callback<StatusResponse>): Promise<StatusResponse>;
|
|
287
|
+
getPostMessages(data: GetPostMessagesPayload, cb?: Callback<GetPostMessagesResult>): Promise<GetPostMessagesResult>;
|
|
288
|
+
/**
|
|
289
|
+
* Fetch all parent thread messages across the user's conversations.
|
|
290
|
+
* Plan-gated: requires `allowThreads`. Cursor-paginated.
|
|
291
|
+
*/
|
|
292
|
+
getAllThreads(data?: GetAllThreadsPayload, cb?: Callback<AllThreadsResult>): Promise<AllThreadsResult>;
|
|
293
|
+
getConversationMembers(data: ConversationMembersPayload, cb?: Callback<ConversationMembersResult>): Promise<ConversationMembersResult>;
|
|
294
|
+
/**
|
|
295
|
+
* Link-wide @mention handles (Redis-cached server-side, safe to call often) for a picker beyond the
|
|
296
|
+
* active conversation. Keep it fresh via `link-user-joined` / `link-user-updated`. */
|
|
297
|
+
getLinkHandles(cb?: Callback<LinkHandlesResult>): Promise<LinkHandlesResult>;
|
|
298
|
+
/**
|
|
299
|
+
* Start a Hop (voice/video) on a SINGLE or GROUP conversation. Plan-gated: SINGLE needs `allowHopNow`,
|
|
300
|
+
* GROUP/CHANNEL `allowHopCircle`. Returns the session + `HOP_SIGNALING_ENDPOINT` for the media socket. */
|
|
301
|
+
startHop(data: StartHopPayload, cb?: Callback<HopPublicState & {
|
|
302
|
+
endpoint?: string;
|
|
303
|
+
}>): Promise<HopPublicState & {
|
|
304
|
+
endpoint?: string;
|
|
305
|
+
}>;
|
|
306
|
+
/**
|
|
307
|
+
* Ad-hoc HopCircle: create a new GROUP conversation from a member
|
|
308
|
+
* list and start a Circle in it. Plan-gated: requires both
|
|
309
|
+
* `allowHopCircle` AND `allowHopAdHoc` (Flash Pro+).
|
|
310
|
+
*/
|
|
311
|
+
startHopAdHoc(data: StartHopAdHocPayload, cb?: Callback<HopPublicState & {
|
|
312
|
+
endpoint?: string;
|
|
313
|
+
}>): Promise<HopPublicState & {
|
|
314
|
+
endpoint?: string;
|
|
315
|
+
}>;
|
|
316
|
+
/**
|
|
317
|
+
* Join an active Hop: router RTP capabilities, transport params and existing producers to consume.
|
|
318
|
+
* `canProduce: false` = webinar attendee (consume only until promoted); joining again elsewhere
|
|
319
|
+
* drops the old socket with `hop-you-were-dropped { reason: 'moved' }`. */
|
|
320
|
+
joinHop(data: JoinHopPayload, cb?: Callback<JoinHopResult>): Promise<JoinHopResult>;
|
|
321
|
+
/**
|
|
322
|
+
* Connect a mediasoup send or recv transport (step 2 of WebRTC setup).
|
|
323
|
+
* Call after `joinHop` returns transport params; pass `dtlsParameters`
|
|
324
|
+
* from the mediasoup-client `transport.on('connect')` callback.
|
|
325
|
+
*/
|
|
326
|
+
connectHopTransport(data: {
|
|
327
|
+
sessionId: string;
|
|
328
|
+
transportId: string;
|
|
329
|
+
dtlsParameters: unknown;
|
|
330
|
+
}, cb?: Callback<{
|
|
331
|
+
ok: boolean;
|
|
332
|
+
}>): Promise<{
|
|
333
|
+
ok: boolean;
|
|
334
|
+
}>;
|
|
335
|
+
/**
|
|
336
|
+
* Create a mediasoup producer (step 3 of WebRTC setup).
|
|
337
|
+
* Triggered from the mediasoup-client `transport.on('produce')` callback.
|
|
338
|
+
* Returns the server-assigned `producerId`.
|
|
339
|
+
*/
|
|
340
|
+
hopProduce(data: {
|
|
341
|
+
sessionId: string;
|
|
342
|
+
transportId: string;
|
|
343
|
+
kind: 'audio' | 'video';
|
|
344
|
+
rtpParameters: unknown;
|
|
345
|
+
appData?: Record<string, unknown>;
|
|
346
|
+
}, cb?: Callback<{
|
|
347
|
+
producerId: string;
|
|
348
|
+
}>): Promise<{
|
|
349
|
+
producerId: string;
|
|
350
|
+
}>;
|
|
351
|
+
/**
|
|
352
|
+
* Create a mediasoup consumer for a specific producer (step 4).
|
|
353
|
+
* Returns consumer params needed to call `recvTransport.consume()`.
|
|
354
|
+
*/
|
|
355
|
+
hopConsume(data: {
|
|
356
|
+
sessionId: string;
|
|
357
|
+
producerId: string;
|
|
358
|
+
transportId: string;
|
|
359
|
+
rtpCapabilities: unknown;
|
|
360
|
+
}, cb?: Callback<{
|
|
361
|
+
consumerId: string;
|
|
362
|
+
producerId: string;
|
|
363
|
+
kind: 'audio' | 'video';
|
|
364
|
+
rtpParameters: unknown;
|
|
365
|
+
}>): Promise<{
|
|
366
|
+
consumerId: string;
|
|
367
|
+
producerId: string;
|
|
368
|
+
kind: 'audio' | 'video';
|
|
369
|
+
rtpParameters: unknown;
|
|
370
|
+
}>;
|
|
371
|
+
/**
|
|
372
|
+
* Resume a paused consumer after calling `consumer.resume()` on the
|
|
373
|
+
* mediasoup-client side (step 5 / required for audio consumers).
|
|
374
|
+
*/
|
|
375
|
+
resumeHopConsumer(data: {
|
|
376
|
+
sessionId: string;
|
|
377
|
+
consumerId: string;
|
|
378
|
+
}, cb?: Callback<{
|
|
379
|
+
ok: boolean;
|
|
380
|
+
}>): Promise<{
|
|
381
|
+
ok: boolean;
|
|
382
|
+
}>;
|
|
383
|
+
/** Leave an active Hop — keeps it running for everyone else. */
|
|
384
|
+
leaveHop(data: {
|
|
385
|
+
sessionId: string;
|
|
386
|
+
}, cb?: Callback<{
|
|
387
|
+
ok: boolean;
|
|
388
|
+
}>): Promise<{
|
|
389
|
+
ok: boolean;
|
|
390
|
+
}>;
|
|
391
|
+
/** Host ends the Hop for every participant. */
|
|
392
|
+
endHop(data: {
|
|
393
|
+
sessionId: string;
|
|
394
|
+
reason?: string;
|
|
395
|
+
}, cb?: Callback<{
|
|
396
|
+
ok: boolean;
|
|
397
|
+
}>): Promise<{
|
|
398
|
+
ok: boolean;
|
|
399
|
+
}>;
|
|
400
|
+
/** Invite additional chat users to an active Hop. */
|
|
401
|
+
inviteToHop(data: {
|
|
402
|
+
sessionId: string;
|
|
403
|
+
chatUserIds: string[];
|
|
404
|
+
}, cb?: Callback<{
|
|
405
|
+
ok: boolean;
|
|
406
|
+
invited: number;
|
|
407
|
+
}>): Promise<{
|
|
408
|
+
ok: boolean;
|
|
409
|
+
invited: number;
|
|
410
|
+
}>;
|
|
411
|
+
/** Cheap "is a Hop live on this conversation?" probe. */
|
|
412
|
+
getHopSession(data: {
|
|
413
|
+
conversationId: string;
|
|
414
|
+
}, cb?: Callback<{
|
|
415
|
+
session: HopPublicState | null;
|
|
416
|
+
}>): Promise<{
|
|
417
|
+
session: HopPublicState | null;
|
|
418
|
+
}>;
|
|
419
|
+
/** Start (or resume) HLS recording on an active Hop. */
|
|
420
|
+
startHopRecording(data: {
|
|
421
|
+
sessionId: string;
|
|
422
|
+
}, cb?: Callback<{
|
|
423
|
+
ok: boolean;
|
|
424
|
+
segmentId?: number;
|
|
425
|
+
folder?: string;
|
|
426
|
+
}>): Promise<{
|
|
427
|
+
ok: boolean;
|
|
428
|
+
segmentId?: number;
|
|
429
|
+
folder?: string;
|
|
430
|
+
}>;
|
|
431
|
+
/** Pause recording on an active Hop. Chunks preserved until Hop end. */
|
|
432
|
+
stopHopRecording(data: {
|
|
433
|
+
sessionId: string;
|
|
434
|
+
}, cb?: Callback<{
|
|
435
|
+
ok: boolean;
|
|
436
|
+
}>): Promise<{
|
|
437
|
+
ok: boolean;
|
|
438
|
+
}>;
|
|
439
|
+
/**
|
|
440
|
+
* Schedule a HopMeeting: creates a GROUP conversation (`isMeetingConversation: true`) and a Google
|
|
441
|
+
* Calendar event on the owner's account; returns the conversation metadata. */
|
|
442
|
+
scheduleHopMeeting(data: ScheduleHopMeetingPayload, cb?: Callback<ScheduleHopMeetingResult>): Promise<ScheduleHopMeetingResult>;
|
|
443
|
+
/** Cancel a scheduled HopMeeting. Archives the conversation. */
|
|
444
|
+
cancelHopMeeting(data: {
|
|
445
|
+
conversationId: string;
|
|
446
|
+
reason?: string;
|
|
447
|
+
}, cb?: Callback<{
|
|
448
|
+
ok: boolean;
|
|
449
|
+
}>): Promise<{
|
|
450
|
+
ok: boolean;
|
|
451
|
+
}>;
|
|
452
|
+
/**
|
|
453
|
+
* List upcoming HopMeetings the caller is a member of. Backed by a
|
|
454
|
+
* 1-hour Redis cache on the server that's invalidated on every
|
|
455
|
+
* create/cancel/status-transition.
|
|
456
|
+
*/
|
|
457
|
+
listHopMeetings(data?: {
|
|
458
|
+
force?: boolean;
|
|
459
|
+
from?: string;
|
|
460
|
+
}, cb?: Callback<{
|
|
461
|
+
results: HopMeetingRecord[];
|
|
462
|
+
fromCache?: boolean;
|
|
463
|
+
}>): Promise<{
|
|
464
|
+
results: HopMeetingRecord[];
|
|
465
|
+
fromCache?: boolean;
|
|
466
|
+
}>;
|
|
467
|
+
/** List current producers in a Hop session (for late-join consume). */
|
|
468
|
+
listHopProducers(data: {
|
|
469
|
+
sessionId: string;
|
|
470
|
+
}, cb?: Callback<HopListProducersResult>): Promise<HopListProducersResult>;
|
|
471
|
+
/** List all participants in a Hop session (on-call + off-call). */
|
|
472
|
+
listHopParticipants(data: {
|
|
473
|
+
sessionId: string;
|
|
474
|
+
conversationId: string;
|
|
475
|
+
}, cb?: Callback<HopListParticipantsResult>): Promise<HopListParticipantsResult>;
|
|
476
|
+
/** Host/admin mutes a participant's audio producer server-side. */
|
|
477
|
+
muteHopParticipant(data: {
|
|
478
|
+
sessionId: string;
|
|
479
|
+
userId: string;
|
|
480
|
+
}, cb?: Callback<void>): Promise<void>;
|
|
481
|
+
/** Host/admin drops a participant from the call. */
|
|
482
|
+
dropHopParticipant(data: {
|
|
483
|
+
sessionId: string;
|
|
484
|
+
userId: string;
|
|
485
|
+
}, cb?: Callback<{
|
|
486
|
+
ok: boolean;
|
|
487
|
+
}>): Promise<{
|
|
488
|
+
ok: boolean;
|
|
489
|
+
}>;
|
|
490
|
+
/** Host / co-host pins one tile for everyone (no `userId` clears); the room gets `onHopPinnedForAll`. */
|
|
491
|
+
hopPinForAll(data: HopPinForAllPayload, cb?: Callback<HopPinForAllResult>): Promise<HopPinForAllResult>;
|
|
492
|
+
/** List all live Hop sessions the caller is a member of. */
|
|
493
|
+
listActiveHops(cb?: Callback<HopListActiveResult>): Promise<HopListActiveResult>;
|
|
494
|
+
/** Reaction for everyone in the call; over 20 per 10 s the ack is `{ ok: false, error: 'RATE_LIMITED' }`. */
|
|
495
|
+
sendHopReaction(data: {
|
|
496
|
+
sessionId: string;
|
|
497
|
+
emoji: string;
|
|
498
|
+
userId: string;
|
|
499
|
+
displayName: string;
|
|
500
|
+
}): Promise<HopRelayAck>;
|
|
501
|
+
/** The only person in a call keeps waiting: restarts the 3 and 5 minute clocks. Acks `{ ok: false }` when others are in the call. */
|
|
502
|
+
keepHopWaiting(data: {
|
|
503
|
+
sessionId: string;
|
|
504
|
+
}): Promise<{
|
|
505
|
+
ok: boolean;
|
|
506
|
+
error?: string;
|
|
507
|
+
}>;
|
|
508
|
+
/** Up / down vote in the call (20 per 10 s, then `RATE_LIMITED`). */
|
|
509
|
+
sendHopVote(data: {
|
|
510
|
+
sessionId: string;
|
|
511
|
+
conversationId: string;
|
|
512
|
+
userId: string;
|
|
513
|
+
direction: 'up' | 'down' | 'none';
|
|
514
|
+
}): Promise<HopRelayAck>;
|
|
515
|
+
/** Raise or lower your hand (6 per 10 s, then `RATE_LIMITED`; a host lowering someone else's is not capped). */
|
|
516
|
+
raiseHand(data: {
|
|
517
|
+
sessionId: string;
|
|
518
|
+
userId: string;
|
|
519
|
+
displayName: string;
|
|
520
|
+
raised: boolean;
|
|
521
|
+
}): Promise<HopRelayAck>;
|
|
522
|
+
/** Start a new vote round (closes the current one). Host/co-host only. */
|
|
523
|
+
startNewVoteRound(data: {
|
|
524
|
+
sessionId: string;
|
|
525
|
+
conversationId: string;
|
|
526
|
+
}): Promise<{
|
|
527
|
+
ok: boolean;
|
|
528
|
+
}>;
|
|
529
|
+
/** Promote a participant to co-host. Host/co-host only. */
|
|
530
|
+
makeHost(data: {
|
|
531
|
+
sessionId: string;
|
|
532
|
+
userId: string;
|
|
533
|
+
}): Promise<{
|
|
534
|
+
ok: boolean;
|
|
535
|
+
}>;
|
|
536
|
+
/** Stop an active screenshare producer in a Hop session. */
|
|
537
|
+
stopHopScreenShare(data: {
|
|
538
|
+
sessionId: string;
|
|
539
|
+
}): Promise<{
|
|
540
|
+
ok: boolean;
|
|
541
|
+
}>;
|
|
542
|
+
/** Start screensharing in a Hop session. */
|
|
543
|
+
startHopScreenShare(data: {
|
|
544
|
+
sessionId: string;
|
|
545
|
+
}): Promise<{
|
|
546
|
+
ok: boolean;
|
|
547
|
+
}>;
|
|
548
|
+
/** Update local media state (video/audio) in a Hop session. */
|
|
549
|
+
hopMediaChange(data: {
|
|
550
|
+
sessionId: string;
|
|
551
|
+
videoEnabled?: boolean;
|
|
552
|
+
audioEnabled?: boolean;
|
|
553
|
+
}): Promise<{
|
|
554
|
+
ok: boolean;
|
|
555
|
+
}>;
|
|
556
|
+
/** Decline a Hop invite. */
|
|
557
|
+
hopInviteDecline(data: {
|
|
558
|
+
sessionId: string;
|
|
559
|
+
}): Promise<{
|
|
560
|
+
ok: boolean;
|
|
561
|
+
}>;
|
|
562
|
+
/**
|
|
563
|
+
* Rejoin a Hop room after a network drop — re-enters the mediasoup room
|
|
564
|
+
* without re-negotiating the full session. Returns existing producers so
|
|
565
|
+
* the client can resume consuming.
|
|
566
|
+
*/
|
|
567
|
+
rejoinHop(data: {
|
|
568
|
+
sessionId: string;
|
|
569
|
+
}): Promise<{
|
|
570
|
+
ok: boolean;
|
|
571
|
+
existingProducers?: any[];
|
|
572
|
+
}>;
|
|
573
|
+
/**
|
|
574
|
+
* Request an ICE restart on a failing transport. Use when the client
|
|
575
|
+
* detects a connection-state change to "failed" on a send or recv transport.
|
|
576
|
+
*/
|
|
577
|
+
restartHopIce(data: {
|
|
578
|
+
sessionId: string;
|
|
579
|
+
transportId: string;
|
|
580
|
+
}): Promise<{
|
|
581
|
+
ok: boolean;
|
|
582
|
+
iceParameters?: any;
|
|
583
|
+
}>;
|
|
584
|
+
/**
|
|
585
|
+
* Admit (or deny) a user waiting in the Hop lobby.
|
|
586
|
+
* Host/co-host only. Set `admit: false` to deny; add `block: true` to also stop them asking to join again.
|
|
587
|
+
*/
|
|
588
|
+
hopAdmit(data: {
|
|
589
|
+
sessionId: string;
|
|
590
|
+
userId: string;
|
|
591
|
+
admit?: boolean;
|
|
592
|
+
block?: boolean;
|
|
593
|
+
}): Promise<{
|
|
594
|
+
ok: boolean;
|
|
595
|
+
}>;
|
|
596
|
+
translateMessage(data: TranslateMessagePayload, cb?: Callback<TranslateMessageResult>): Promise<TranslateMessageResult>;
|
|
597
|
+
setLanguage(data: SetLanguagePayload, cb?: Callback<SetLanguageResult>): Promise<SetLanguageResult>;
|
|
598
|
+
getOnlineUsers(data: OnlineUsersPayload, cb?: Callback<OnlineUsersResult>): Promise<OnlineUsersResult>;
|
|
599
|
+
/**
|
|
600
|
+
* Send a heartbeat (30s). Web clients pass `{ visible: false }` while hidden and `{ visible: true }` on every beat
|
|
601
|
+
* while on screen (a `true` is stale after 2 min); a socket that never reports counts as reading.
|
|
602
|
+
*/
|
|
603
|
+
heartbeat(opts?: {
|
|
604
|
+
visible?: boolean;
|
|
605
|
+
}): Promise<void>;
|
|
606
|
+
/** Ack delivery of up to 100 messages you didn't send (batch on `new-message`). */
|
|
607
|
+
messageDelivered(data: MarkMessagesDeliveredPayload, cb?: Callback<MessageDeliveredResult>): Promise<MessageDeliveredResult>;
|
|
608
|
+
/** Seen-by / delivered list (sender or conversation admin). */
|
|
609
|
+
messageInfo(data: MessageInfoPayload, cb?: Callback<MessageInfoResult>): Promise<MessageInfoResult>;
|
|
610
|
+
/** Mute yourself; 'off' unmutes. Other devices get `conversation-muted`. */
|
|
611
|
+
muteConversation(data: {
|
|
612
|
+
conversationId: string;
|
|
613
|
+
duration: MuteDuration;
|
|
614
|
+
}, cb?: Callback<ConversationMuteState>): Promise<ConversationMuteState>;
|
|
615
|
+
updateQuietHours(data: QuietHours, cb?: Callback<QuietHours>): Promise<QuietHours>;
|
|
616
|
+
setMessageReminder(data: CreateMessageReminderPayload, cb?: Callback<MessageReminderView>): Promise<MessageReminderView>;
|
|
617
|
+
cancelMessageReminder(reminderId: string, cb?: Callback<MessageReminderView>): Promise<MessageReminderView>;
|
|
618
|
+
/** Conversation admins only; denials arrive via `onError` (see `parsePermissionDenial`). */
|
|
619
|
+
updateConversationPermissions(data: UpdateConversationPermissionsPayload & {
|
|
620
|
+
conversationId: string;
|
|
621
|
+
}, cb?: Callback<ConversationPermissionsPublic>): Promise<ConversationPermissionsPublic>;
|
|
622
|
+
/** Start or join a huddle (no ring); then `joinHop({ conversationId })`, leave with `leaveHop`. */
|
|
623
|
+
huddleStart(data: HuddleStartPayload, cb?: Callback<HuddleStatusView>): Promise<HuddleStatusView>;
|
|
624
|
+
huddleStatus(conversationId: string, cb?: Callback<HuddleStatusView>): Promise<HuddleStatusView>;
|
|
625
|
+
/** Host/co-host or conversation admin. */
|
|
626
|
+
huddleEnd(conversationId: string, cb?: Callback<{
|
|
627
|
+
ok: boolean;
|
|
628
|
+
}>): Promise<{
|
|
629
|
+
ok: boolean;
|
|
630
|
+
}>;
|
|
631
|
+
/** Start (or return) a transcript; updates follow on `onMessageTranscriptUpdated`. */
|
|
632
|
+
transcribeMessage(data: TranscribeMessagePayload, cb?: Callback<TranscriptResponse>): Promise<TranscriptResponse>;
|
|
633
|
+
/** Mark read: zeroes your unread count; every device of yours gets `onConversationRead`. */
|
|
634
|
+
conversationRead(conversationId: string, cb?: Callback<ConversationReadState>): Promise<ConversationReadState>;
|
|
635
|
+
/** Mark as unread from a message: your unread count for that chat resets to the messages from there on (≥ 1). */
|
|
636
|
+
conversationUnread(conversationId: string, messageId: string, cb?: Callback<ConversationReadState>): Promise<ConversationReadState>;
|
|
637
|
+
/** Unread per lane for the rows you have not loaded; badge = this + live sum of loaded rows (chatta #427). */
|
|
638
|
+
getUnreadTotals(data?: UnreadTotalsRequest, cb?: Callback<UnreadTotalsResult>): Promise<UnreadTotalsResult>;
|
|
639
|
+
/** `me`: any member, any time. `everyone`: sender within 48 h, or admins/moderators. */
|
|
640
|
+
deleteMessage(data: DeleteMessagePayload, cb?: Callback<MessageDeletedEvent>): Promise<MessageDeletedEvent>;
|
|
641
|
+
/** Messages, chats and people across your conversations (20 searches / 10 s). */
|
|
642
|
+
searchAll(data: SearchAllPayload, cb?: Callback<SearchAllResult>): Promise<SearchAllResult>;
|
|
643
|
+
/** Guest pre-chat answers, validated against the link's fields. */
|
|
644
|
+
submitPreChat(data: SubmitPreChatPayload, cb?: Callback<PreChatSubmittedEvent>): Promise<PreChatSubmittedEvent>;
|
|
645
|
+
/** Host or poll starter; the room gets `hop-poll-vote-updated` with `closed: true`. */
|
|
646
|
+
hopPollClose(data: {
|
|
647
|
+
sessionId: string;
|
|
648
|
+
pollId: string;
|
|
649
|
+
}, cb?: Callback<{
|
|
650
|
+
ok: boolean;
|
|
651
|
+
poll: HopPollSummary;
|
|
652
|
+
}>): Promise<{
|
|
653
|
+
ok: boolean;
|
|
654
|
+
poll: HopPollSummary;
|
|
655
|
+
}>;
|
|
656
|
+
/** Polls, hand queue, captions switch and recording state when (re)joining a call. */
|
|
657
|
+
hopCollabState(sessionId: string, cb?: Callback<HopCollabSnapshot>): Promise<HopCollabSnapshot>;
|
|
658
|
+
/** Turn live captions on/off for the session; the room gets `onHopCaptionsState`. */
|
|
659
|
+
hopCaptionsToggle(data: {
|
|
660
|
+
sessionId: string;
|
|
661
|
+
enabled: boolean;
|
|
662
|
+
}, cb?: Callback<{
|
|
663
|
+
ok: boolean;
|
|
664
|
+
captions: HopCaptionsSwitch;
|
|
665
|
+
}>): Promise<{
|
|
666
|
+
ok: boolean;
|
|
667
|
+
captions: HopCaptionsSwitch;
|
|
668
|
+
}>;
|
|
669
|
+
/** Relay one speech-to-text line while captions are on (burst-limited server side). */
|
|
670
|
+
hopCaption(data: HopCaptionPayload, cb?: Callback<{
|
|
671
|
+
ok: boolean;
|
|
672
|
+
error?: string;
|
|
673
|
+
}>): Promise<{
|
|
674
|
+
ok: boolean;
|
|
675
|
+
error?: string;
|
|
676
|
+
}>;
|
|
677
|
+
/** A conversation's call recordings, newest first; `downloadable` says whether `getRecordingDownloadLink` works. */
|
|
678
|
+
hopRecordingList(data: HopRecordingListPayload, cb?: Callback<HopRecordingListResult>): Promise<HopRecordingListResult>;
|
|
679
|
+
/** My stickers (uploaded, added, used), most recent first. */
|
|
680
|
+
stickersMine(cb?: Callback<{
|
|
681
|
+
results: StickerView[];
|
|
682
|
+
}>): Promise<{
|
|
683
|
+
results: StickerView[];
|
|
684
|
+
}>;
|
|
685
|
+
/** Search every platform sticker (empty `q` = popular); `mine` marks ones already in my set. */
|
|
686
|
+
stickersSearch(data?: StickersSearchPayload, cb?: Callback<StickerPage>): Promise<StickerPage>;
|
|
687
|
+
/** Add a sticker to the platform (and to my set). Send it with `sendMessage({ sticker: { id } })`. */
|
|
688
|
+
stickerUpload(data: StickerUploadPayload, cb?: Callback<{
|
|
689
|
+
sticker: StickerView;
|
|
690
|
+
}>): Promise<{
|
|
691
|
+
sticker: StickerView;
|
|
692
|
+
}>;
|
|
693
|
+
stickerAdd(data: StickerRefPayload, cb?: Callback<{
|
|
694
|
+
ok: true;
|
|
695
|
+
}>): Promise<{
|
|
696
|
+
ok: true;
|
|
697
|
+
}>;
|
|
698
|
+
/** Remove from my set; `everywhere: true` also removes it from the platform (uploader only). */
|
|
699
|
+
stickerRemove(data: StickerRefPayload, cb?: Callback<{
|
|
700
|
+
ok: true;
|
|
701
|
+
}>): Promise<{
|
|
702
|
+
ok: true;
|
|
703
|
+
}>;
|
|
704
|
+
/** Press a button on a private @chatta money card (`onChattaMoneyCard`); `code` for new payout destinations. */
|
|
705
|
+
chattaMoneyConfirm(data: ChattaMoneyConfirmPayload, cb?: Callback<{
|
|
706
|
+
status: true;
|
|
707
|
+
}>): Promise<{
|
|
708
|
+
status: true;
|
|
709
|
+
}>;
|
|
710
|
+
/** 1.7.0: the live state of a shared money card (request, split, pot or payment link) you can see. */
|
|
711
|
+
getMoneyCard(data: MoneyCardGetPayload, cb?: Callback<MoneyCard>): Promise<MoneyCard>;
|
|
712
|
+
/** 1.7.0: tap a card button. Anything that moves money answers on `onChattaMoneyCard` for you to confirm; the rest updates the card. */
|
|
713
|
+
moneyCardAction(data: MoneyCardActionPayload, cb?: Callback<{
|
|
714
|
+
status: true;
|
|
715
|
+
}>): Promise<{
|
|
716
|
+
status: true;
|
|
717
|
+
}>;
|
|
718
|
+
/** Host/admin: bring a Q&A asker on stage to answer live. */
|
|
719
|
+
webinarQaAnswerLive(data: WebinarQaRefPayload, cb?: Callback<WebinarQaAnswerLiveResult>): Promise<WebinarQaAnswerLiveResult>;
|
|
720
|
+
/** Upvote a queued webinar question (members); the room gets `webinar-qa-updated`. */
|
|
721
|
+
webinarQaVote(data: WebinarQaRefPayload, cb?: Callback<unknown>): Promise<unknown>;
|
|
722
|
+
onMessage(cb: Callback<Message>): this;
|
|
723
|
+
onConversation(cb: Callback<NewConversationEvent>): this;
|
|
724
|
+
onEditConversation(cb: Callback<EditConversationEvent>): this;
|
|
725
|
+
onMakeAdmin(cb: Callback<MakeAdminConversationEvent>): this;
|
|
726
|
+
onMemberStatusChange(cb: Callback<MemberStatusEvent>): this;
|
|
727
|
+
/**
|
|
728
|
+
* Lock/unlock alias. The backend re-broadcasts toggles as `edit-conversation`, so prefer
|
|
729
|
+
* `onEditConversation`; this fires only on a direct `toggle-conversation` frame (kept for compatibility). */
|
|
730
|
+
onToggleConversation(cb: Callback<EditConversationEvent>): this;
|
|
731
|
+
/**
|
|
732
|
+
* Convenience listener for conversation status changes. NOTE: the backend
|
|
733
|
+
* re-broadcasts a status change as an `edit-conversation` event — prefer
|
|
734
|
+
* `onEditConversation`. Kept for API compatibility.
|
|
735
|
+
*/
|
|
736
|
+
onStatusChangeConversation(cb: Callback<EditConversationEvent>): this;
|
|
737
|
+
/**
|
|
738
|
+
* Pin/unpin listener. Pinning is per-member via the `pin-conversation` ack and isn't broadcast, so this
|
|
739
|
+
* fires only if the server echoes a frame (kept for compatibility). */
|
|
740
|
+
onPinConversation(cb: Callback<PinConversationEvent>): this;
|
|
741
|
+
onLinkUserJoined(cb: Callback<LinkUserJoinedEvent>): this;
|
|
742
|
+
onLinkUserUpdated(cb: Callback<LinkUserUpdatedEvent>): this;
|
|
743
|
+
onMessageStatusChange(cb: Callback<MessageStatusEvent>): this;
|
|
744
|
+
onMessageReaction(cb: Callback<MessageReactionEvent>): this;
|
|
745
|
+
onTyping(cb: Callback<TypingEvent>): this;
|
|
746
|
+
/** A draft changed on another of this member's devices (1.6.1). */
|
|
747
|
+
onDraftUpdated(cb: Callback<DraftUpdatedEvent>): this;
|
|
748
|
+
/** A chat peer set or cleared their /status or /away (1.6.4). */
|
|
749
|
+
onStatusUpdated(cb: Callback<ChatStatusEvent>): this;
|
|
750
|
+
/** A live-location point moved (1.6.5). */
|
|
751
|
+
onLiveLocationUpdated(cb: Callback<LiveLocationUpdatedEvent>): this;
|
|
752
|
+
/** A live-location share ended (1.6.5). */
|
|
753
|
+
onLiveLocationEnded(cb: Callback<LiveLocationEndedEvent>): this;
|
|
754
|
+
onOnline(cb: Callback<OnlineEvent>): this;
|
|
755
|
+
onOffline(cb: Callback<OfflineEvent>): this;
|
|
756
|
+
onJoinConversation(cb: Callback<JoinConversationEvent>): this;
|
|
757
|
+
onUnreadCountUpdate(cb: Callback<UnreadCountUpdate>): this;
|
|
758
|
+
/** Your membership of a conversation was revoked; later reads are denied server-side. */
|
|
759
|
+
onMembershipRevoked(cb: Callback<MembershipRevokedEvent>): this;
|
|
760
|
+
/** Another workspace invited yours to a channel. Sent to your owner and admins only. */
|
|
761
|
+
onSharedChannelInvite(cb: Callback<SharedChannelEvent>): this;
|
|
762
|
+
/** A share was accepted, ended or changed (owner and admins of both sides), or a shared channel's badge changed (its members; `isSharedChannelBadgeEvent`). */
|
|
763
|
+
onSharedChannelUpdated(cb: Callback<SharedChannelUpdatedEvent>): this;
|
|
764
|
+
onNotification(cb: Callback<NotificationEvent>): this;
|
|
765
|
+
onEditMessage(cb: Callback<EditMessageEvent>): this;
|
|
766
|
+
onForwardMessage(cb: Callback<ForwardMessageEvent>): this;
|
|
767
|
+
onMessageRead(cb: Callback<MessageReadEvent>): this;
|
|
768
|
+
onScheduledMessage(cb: Callback<ScheduledMessageEvent>): this;
|
|
769
|
+
onMessageFailed(cb: Callback<MessageFailedEvent>): this;
|
|
770
|
+
onVotePoll(cb: Callback<VotePollResult>): this;
|
|
771
|
+
onError(cb: Callback<ChatError>): this;
|
|
772
|
+
onAuthError(cb: Callback<{
|
|
773
|
+
message: string;
|
|
774
|
+
}>): this;
|
|
775
|
+
onCreatePost(cb: Callback<Post>): this;
|
|
776
|
+
onNewStory(cb: Callback<Post>): this;
|
|
777
|
+
onUpdatePost(cb: Callback<Post>): this;
|
|
778
|
+
onDeletePost(cb: Callback<PostDeleteEvent>): this;
|
|
779
|
+
onReactToPost(cb: Callback<Post>): this;
|
|
780
|
+
onReplyToPost(cb: Callback<Post>): this;
|
|
781
|
+
onTranslateMessage(cb: Callback<TranslateMessageResult>): this;
|
|
782
|
+
onAiCreditsUpdated(cb: Callback<AiCredits>): this;
|
|
783
|
+
onAiCreditsExhausted(cb: Callback<AiCredits>): this;
|
|
784
|
+
/** Emitted to the invitee when the host admits them from the lobby. */
|
|
785
|
+
onHopAdmitted(cb: Callback<{
|
|
786
|
+
sessionId: string;
|
|
787
|
+
}>): this;
|
|
788
|
+
onHopReaction(cb: Callback<HopReactionEvent>): this;
|
|
789
|
+
onHopVoteUpdated(cb: Callback<HopVoteUpdatedEvent>): this;
|
|
790
|
+
onHopVoteComplete(cb: Callback<HopVoteCompleteEvent>): this;
|
|
791
|
+
onHopNewVoteRound(cb: Callback<HopNewVoteRoundEvent>): this;
|
|
792
|
+
onHopRaiseHand(cb: Callback<HopRaiseHandEvent>): this;
|
|
793
|
+
onHopHostChanged(cb: Callback<HopHostChangedEvent>): this;
|
|
794
|
+
onHopStarted(cb: Callback<HopPublicState>): this;
|
|
795
|
+
onHopEnded(cb: Callback<{
|
|
796
|
+
sessionId: string;
|
|
797
|
+
reason?: string;
|
|
798
|
+
}>): this;
|
|
799
|
+
onHopParticipantJoined(cb: Callback<HopParticipantJoinedEvent>): this;
|
|
800
|
+
onHopParticipantLeft(cb: Callback<HopParticipantLeftEvent>): this;
|
|
801
|
+
onHopInvite(cb: Callback<HopInviteEventExtended>): this;
|
|
802
|
+
/** Hosts: someone is waiting in the lobby; admit with `hopAdmit`. */
|
|
803
|
+
onHopLobbyWaiting(cb: Callback<HopLobbyWaitingEvent>): this;
|
|
804
|
+
/** The host turned you away. `blocked: true` means you cannot ask to join this meeting again. */
|
|
805
|
+
onHopDenied(cb: Callback<{
|
|
806
|
+
sessionId: string;
|
|
807
|
+
blocked?: boolean;
|
|
808
|
+
}>): this;
|
|
809
|
+
onHopRedirect(cb: Callback<HopRedirectEvent>): this;
|
|
810
|
+
onHopRecordingStarted(cb: Callback<HopRecordingStartedEvent>): this;
|
|
811
|
+
onHopRecordingStopped(cb: Callback<{
|
|
812
|
+
sessionId: string;
|
|
813
|
+
}>): this;
|
|
814
|
+
onHopRecordingReady(cb: Callback<HopRecordingReadyEvent>): this;
|
|
815
|
+
onHopRecordingAlreadyActive(cb: Callback<{
|
|
816
|
+
sessionId: string;
|
|
817
|
+
}>): this;
|
|
818
|
+
onHopParticipantMuted(cb: Callback<HopParticipantMutedEvent>): this;
|
|
819
|
+
/** Host pinned (or, with `userId: null`, unpinned) a tile for everyone. */
|
|
820
|
+
onHopPinnedForAll(cb: Callback<HopPinnedForAllEvent>): this;
|
|
821
|
+
onHopParticipantDropped(cb: Callback<HopParticipantDroppedEvent>): this;
|
|
822
|
+
/** Removed from the call; `reason: 'moved'` means you joined it from another tab or device. */
|
|
823
|
+
onHopYouWereDropped(cb: Callback<HopYouWereDroppedEvent>): this;
|
|
824
|
+
/** You joined this call on another device: dismiss the ring here. */
|
|
825
|
+
onHopInviteAnswered(cb: Callback<HopInviteAnsweredEvent>): this;
|
|
826
|
+
/** A host asked you to unmute. Hosts never switch your mic on; show a prompt instead. */
|
|
827
|
+
onHopUnmuteRequested(cb: Callback<HopUnmuteRequestedEvent>): this;
|
|
828
|
+
onHopMeetingReminder(cb: Callback<{
|
|
829
|
+
conversationId: string;
|
|
830
|
+
startAt: string;
|
|
831
|
+
reminderMinutes: number;
|
|
832
|
+
}>): this;
|
|
833
|
+
onHopVote(cb: Callback<{
|
|
834
|
+
sessionId: string;
|
|
835
|
+
userId: string;
|
|
836
|
+
direction: 'up' | 'down' | 'none';
|
|
837
|
+
conversationId: string;
|
|
838
|
+
}>): this;
|
|
839
|
+
onHopNewProducer(cb: Callback<{
|
|
840
|
+
sessionId: string;
|
|
841
|
+
producerId: string;
|
|
842
|
+
userId: string;
|
|
843
|
+
kind: string;
|
|
844
|
+
source?: string;
|
|
845
|
+
}>): this;
|
|
846
|
+
onHopProducerClosed(cb: Callback<{
|
|
847
|
+
sessionId: string;
|
|
848
|
+
producerId: string;
|
|
849
|
+
userId: string;
|
|
850
|
+
}>): this;
|
|
851
|
+
/** Host: turn a lobby visitor away. `block: true` also stops them from asking to join again. */
|
|
852
|
+
hopDeny(sessionId: string, userId: string, block?: boolean): this;
|
|
853
|
+
onHopInviteDeclined(cb: Callback<{
|
|
854
|
+
sessionId: string;
|
|
855
|
+
declinedBy: string;
|
|
856
|
+
}>): this;
|
|
857
|
+
onHopScreenshareStarted(cb: Callback<{
|
|
858
|
+
sessionId: string;
|
|
859
|
+
userId: string;
|
|
860
|
+
producerId?: string;
|
|
861
|
+
}>): this;
|
|
862
|
+
onHopMediaChanged(cb: Callback<{
|
|
863
|
+
sessionId: string;
|
|
864
|
+
userId: string;
|
|
865
|
+
videoEnabled?: boolean;
|
|
866
|
+
audioEnabled?: boolean;
|
|
867
|
+
}>): this;
|
|
868
|
+
onHopTransportParams(cb: Callback<{
|
|
869
|
+
sessionId: string;
|
|
870
|
+
transportId: string;
|
|
871
|
+
status: string;
|
|
872
|
+
}>): this;
|
|
873
|
+
onHopRecordingForbidden(cb: Callback<{
|
|
874
|
+
sessionId: string;
|
|
875
|
+
reason?: string;
|
|
876
|
+
}>): this;
|
|
877
|
+
hopScreenshareStart(data: {
|
|
878
|
+
sessionId: string;
|
|
879
|
+
producerId?: string;
|
|
880
|
+
}): this;
|
|
881
|
+
/** Promote a participant to co-host. Only host/co-host can call this. */
|
|
882
|
+
hopCoHostAssign(data: {
|
|
883
|
+
sessionId: string;
|
|
884
|
+
targetUserId: string;
|
|
885
|
+
}): this;
|
|
886
|
+
/** Listen for co-host list updates broadcast to the session room. */
|
|
887
|
+
onHopCoHostAssigned(cb: Callback<{
|
|
888
|
+
sessionId: string;
|
|
889
|
+
hostId: string;
|
|
890
|
+
coHosts: Record<string, boolean>;
|
|
891
|
+
}>): this;
|
|
892
|
+
/** Launch a new poll visible to all session participants. */
|
|
893
|
+
hopPollLaunch(data: {
|
|
894
|
+
sessionId: string;
|
|
895
|
+
question: string;
|
|
896
|
+
options: string[];
|
|
897
|
+
}): this;
|
|
898
|
+
/** Listen for a new poll broadcast from the host. */
|
|
899
|
+
onHopPollLaunched(cb: Callback<{
|
|
900
|
+
pollId: string;
|
|
901
|
+
sessionId: string;
|
|
902
|
+
question: string;
|
|
903
|
+
options: string[];
|
|
904
|
+
launchedBy: string;
|
|
905
|
+
launchedAt: string;
|
|
906
|
+
}>): this;
|
|
907
|
+
/** Vote in a running poll (10 per 10 s; over the cap the server acks `RATE_LIMITED` and drops it). */
|
|
908
|
+
hopPollVote(data: {
|
|
909
|
+
sessionId: string;
|
|
910
|
+
pollId: string;
|
|
911
|
+
option: string;
|
|
912
|
+
}): this;
|
|
913
|
+
/** Full poll summary (counts, total, closed) after each vote and after `hop-poll-close`. */
|
|
914
|
+
onHopPollVoteUpdated(cb: Callback<HopPollVoteUpdatedEvent>): this;
|
|
915
|
+
/** Send a drawing delta to all other participants in the session. */
|
|
916
|
+
hopWhiteboardSync(data: {
|
|
917
|
+
sessionId: string;
|
|
918
|
+
delta: Record<string, unknown>;
|
|
919
|
+
}): this;
|
|
920
|
+
/** Listen for whiteboard drawing deltas from other participants. */
|
|
921
|
+
onHopWhiteboardDelta(cb: Callback<{
|
|
922
|
+
sessionId: string;
|
|
923
|
+
delta: Record<string, unknown>;
|
|
924
|
+
}>): this;
|
|
925
|
+
/**
|
|
926
|
+
* Open (create) a whiteboard; backend `OpenWhiteboardDto` needs `conversationId` and `chatLinkId`.
|
|
927
|
+
* Keep the returned `_id` and pass it as `whiteboardId` to stroke/clear/close/snapshot. */
|
|
928
|
+
openWhiteboard(conversationId: string, chatLinkId?: string): this;
|
|
929
|
+
sendWhiteboardStroke(data: WhiteboardStrokePayload): this;
|
|
930
|
+
/**
|
|
931
|
+
* Clear a whiteboard. `whiteboardId` is optional (old `clearWhiteboard(conversationId)` calls compile);
|
|
932
|
+
* when given it is forwarded for an exact match. */
|
|
933
|
+
clearWhiteboard(conversationId: string, whiteboardId?: string): this;
|
|
934
|
+
/** Close a whiteboard. `whiteboardId` optional — see `clearWhiteboard`. */
|
|
935
|
+
closeWhiteboard(conversationId: string, whiteboardId?: string): this;
|
|
936
|
+
snapshotWhiteboard(data: WhiteboardSnapshotPayload): this;
|
|
937
|
+
onWhiteboardStroke(cb: Callback<WhiteboardStrokeEvent>): this;
|
|
938
|
+
onWhiteboardCleared(cb: Callback<{
|
|
939
|
+
conversationId?: string;
|
|
940
|
+
whiteboardId?: string;
|
|
941
|
+
}>): this;
|
|
942
|
+
onWhiteboardClosed(cb: Callback<{
|
|
943
|
+
conversationId?: string;
|
|
944
|
+
whiteboardId?: string;
|
|
945
|
+
}>): this;
|
|
946
|
+
onWhiteboardSnapshot(cb: Callback<WhiteboardSnapshotEvent>): this;
|
|
947
|
+
createAutomation(data: CreateAutomationPayload, cb?: Callback<Automation>): Promise<Automation>;
|
|
948
|
+
updateAutomation(data: UpdateAutomationPayload, cb?: Callback<Automation>): Promise<Automation>;
|
|
949
|
+
deleteAutomation(data: DeleteAutomationPayload, cb?: Callback<{
|
|
950
|
+
deleted: boolean;
|
|
951
|
+
}>): Promise<{
|
|
952
|
+
deleted: boolean;
|
|
953
|
+
}>;
|
|
954
|
+
/** List automations for a chat link. The backend requires `chatLinkId` and
|
|
955
|
+
* returns `{ automations }` (not `{ results }`). */
|
|
956
|
+
getAutomations(data: GetAutomationsPayload, cb?: Callback<AutomationsResult>): Promise<AutomationsResult>;
|
|
957
|
+
startWebinar(data: StartWebinarPayload, cb?: Callback<StartWebinarResult>): Promise<StartWebinarResult>;
|
|
958
|
+
raiseHandWebinar(data: RaiseHandPayload): this;
|
|
959
|
+
lowerHand(data: LowerHandPayload): this;
|
|
960
|
+
promoteAttendeeAudio(data: PromoteAttendeeAudioPayload, cb?: Callback<PromoteAttendeeAudioResult>): Promise<PromoteAttendeeAudioResult>;
|
|
961
|
+
submitWebinarQa(data: WebinarQaSubmitPayload, cb?: Callback<WebinarQaSubmitResult>): Promise<WebinarQaSubmitResult>;
|
|
962
|
+
answerWebinarQa(data: WebinarQaAnswerPayload, cb?: Callback<WebinarQaAnswerResult>): Promise<WebinarQaAnswerResult>;
|
|
963
|
+
/** A call was written to the log; `missed` is true when you were rung and didn't join. */
|
|
964
|
+
onCallLogged(cb: Callback<CallLoggedEvent>): this;
|
|
965
|
+
/** Private @chatta money card for the member who asked (confirm, result, or error). */
|
|
966
|
+
onChattaMoneyCard(cb: Callback<ChattaMoneyCard>): this;
|
|
967
|
+
/** 1.7.0: a shared money card changed (paid, declined, cancelled, expired, contribution, payout). */
|
|
968
|
+
onMoneyCardUpdate(cb: Callback<MoneyCard>): this;
|
|
969
|
+
/** The link's owner changed its settings; apply them without a reload. */
|
|
970
|
+
onLinkSettingsUpdated(cb: Callback<LinkSettingsUpdatedEvent>): this;
|
|
971
|
+
onWebinarViewerCount(cb: Callback<WebinarViewerCountEvent>): this;
|
|
972
|
+
onWebinarStarted(cb: Callback<WebinarStartedEvent>): this;
|
|
973
|
+
onWebinarRaisedHand(cb: Callback<WebinarHandRaisedEvent>): this;
|
|
974
|
+
onWebinarHandLowered(cb: Callback<WebinarHandLoweredEvent>): this;
|
|
975
|
+
onWebinarAttendeePromoted(cb: Callback<WebinarAttendeePromotedEvent>): this;
|
|
976
|
+
onWebinarQaSubmitted(cb: Callback<WebinarQaUpdatedEvent>): this;
|
|
977
|
+
getConversationStats(conversationId: string, cb?: Callback<ConversationStats>): Promise<ConversationStats>;
|
|
978
|
+
onConversationStats(cb: Callback<ConversationStats>): this;
|
|
979
|
+
updateChatUserSettings(data: UpdateChatUserSettingsPayload, cb?: Callback<ChatUserSettingsResult>): Promise<ChatUserSettingsResult>;
|
|
980
|
+
onConnect(cb: Callback<void>): this;
|
|
981
|
+
onDisconnect(cb: Callback<{
|
|
982
|
+
reason: string;
|
|
983
|
+
}>): this;
|
|
984
|
+
onReconnect(cb: Callback<{
|
|
985
|
+
attempt: number;
|
|
986
|
+
}>): this;
|
|
987
|
+
onReconnecting(cb: Callback<{
|
|
988
|
+
attempt: number;
|
|
989
|
+
}>): this;
|
|
990
|
+
/** Remove a specific or all listeners for an event */
|
|
991
|
+
off(event: ChatEvent | string, cb?: (...args: any[]) => void): this;
|
|
992
|
+
/** Another member's delivery ack (conversation room). */
|
|
993
|
+
onMessageDelivered(cb: Callback<MessageDeliveredResult>): this;
|
|
994
|
+
/** Your mute changed on any device. */
|
|
995
|
+
onConversationMuted(cb: Callback<ConversationMuteState>): this;
|
|
996
|
+
onQuietHoursUpdated(cb: Callback<QuietHours>): this;
|
|
997
|
+
onMessageRemindersChanged(cb: Callback<MessageRemindersChangedEvent>): this;
|
|
998
|
+
onMessageReminderDue(cb: Callback<ReminderDuePayload>): this;
|
|
999
|
+
onConversationPermissionsUpdated(cb: Callback<ConversationPermissionsPublic>): this;
|
|
1000
|
+
/** A connected calendar moved a meeting you are in (P-E5). Refresh the meeting card; notices to invitees follow later. */
|
|
1001
|
+
onHopMeetingUpdated(cb: Callback<HopMeetingUpdatedEvent>): this;
|
|
1002
|
+
/** Huddle state; `active: false` = ended, `participantCount: 0` + `emptySince` = idle grace. */
|
|
1003
|
+
onHuddleUpdated(cb: Callback<HuddleStatusView>): this;
|
|
1004
|
+
/** Every transcript status change (check `transcript.errorCode` when `status` is 'failed'). */
|
|
1005
|
+
onMessageTranscriptUpdated(cb: Callback<TranscriptResponse>): this;
|
|
1006
|
+
/** Agent inbox changes (owner room — owner/agent dashboard sockets only). */
|
|
1007
|
+
onInboxUpdated(cb: Callback<InboxUpdatedPayload>): this;
|
|
1008
|
+
onInternalNote(cb: Callback<InternalNoteEvent>): this;
|
|
1009
|
+
onInternalNoteDeleted(cb: Callback<InboxNoteDeleted>): this;
|
|
1010
|
+
onConversationNotesUpdated(cb: Callback<ConversationNotesUpdatedEvent>): this;
|
|
1011
|
+
/** A CSAT card was rated or replaced: update `message.csat` by `messageId`. Agents also get `rating` (with the comment). */
|
|
1012
|
+
onCsatUpdated(cb: Callback<CsatUpdatedEvent>): this;
|
|
1013
|
+
/** `thread-messages` broadcasts (`type: 'thread_update'`); `replier` updates the avatar stack. */
|
|
1014
|
+
onThreadUpdate(cb: Callback<ThreadUpdateEvent>): this;
|
|
1015
|
+
/** You marked a conversation unread (any device): show its badge again with `unreadCount`. */
|
|
1016
|
+
onConversationUnread(cb: Callback<ConversationReadState>): this;
|
|
1017
|
+
/** You read a conversation (any device): clear its badge. */
|
|
1018
|
+
onConversationRead(cb: Callback<ConversationReadState>): this;
|
|
1019
|
+
/** `everyone`: show "This message was deleted"; `me`: remove it on your other devices. */
|
|
1020
|
+
onMessageDeleted(cb: Callback<MessageDeletedEvent>): this;
|
|
1021
|
+
/** Conversation room and owner dashboards. */
|
|
1022
|
+
onPreChatSubmitted(cb: Callback<PreChatSubmittedEvent>): this;
|
|
1023
|
+
onHopCaptionsState(cb: Callback<HopCaptionsStateEvent>): this;
|
|
1024
|
+
onHopCaptionText(cb: Callback<HopCaptionTextEvent>): this;
|
|
1025
|
+
}
|
|
1026
|
+
export {};
|