@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,944 @@
|
|
|
1
|
+
import { HttpTransport } from './HttpTransport';
|
|
2
|
+
import type { LiveFlexView, LiveFlexTransactionPage, LiveFlexTransactionQuery, LiveFlexFundPayload, LiveFlexFundStart, LiveFlexFundVerify, LiveFlexRecipient, LiveFlexBank, LiveFlexPayoutBankPayload, LiveFlexPayoutCryptoPayload, LiveFlexPayoutPending, LiveFlexWithdrawPayload, LiveFlexPayoutResult, LiveFlexSendPayload, LiveFlexSendResult, LiveFlexApprovalWaiting, LiveFlexTeamApproval, LiveFlexTeamLimits, LiveFlexTeamLimitsPayload, LiveFlexApprovalDecision, LiveFlexLinkResult, MoneyRequestCard, MoneySplitCard, MoneyPotCard, MoneyPayLinkCard, MoneyRequestCreatePayload, MoneySplitCreatePayload, MoneyStanding, MoneyStandingCreatePayload, MoneyPotCreatePayload, MoneyRefundPayload, MoneyRefundResult, MoneyPayLinkCreatePayload, MoneyPayLinkPayPayload, MoneyPayLinkPaid, MoneyPayLinkCheckout, MoneyReceiptLink, MoneyStatementLinks, MoneyConfirm, StaffAccessGrantPayload, StaffAccessGrantView, StickerPage, WorkspaceStickerQuery } from '../types/liveflex';
|
|
3
|
+
import type { MemberQuery, ChatLinkQuery, ConversationQuery, MessageQuery, PaginationQuery } from '../types/options';
|
|
4
|
+
import type { Member, ChatUserMe, Conversation, Message, PaginatedResult, ConversationUsersPage, CursorPage, NotificationData, StatusResponse, SuccessResponse, MessageMutationResult, FeaturePurchase, AttachmentInput, CannedResponse, CreateCannedResponsePayload, UpdateCannedResponsePayload, Webhook, CreateWebhookPayload, UpdateWebhookPayload, TranslateMessageResult, UpdateChatUserProfilePayload, HandleEditInfo, AdminReplyPayload, FeaturePricing, GiftFeaturePayload, GiftFeatureResult, VerifyGiftPayload, SuggestedCannedResponse, GlobalSearchResult, BulkExportChatPayload, BulkExportChatResult, LinkWorkspaceInfo, WebinarRegistration, AppVersionInfo, Post, StickerRef, ForgotPasswordPayload, ForgotPasswordResult, ResetPasswordPayload, ResetPasswordResult, ResetTokenStatus, DraftView } from '../types/models';
|
|
5
|
+
import type { CustomEmoji, CreateCustomEmojiPayload, UpdateCustomEmojiPayload, CustomEmojiQuery, DeleteCustomEmojiResult, EmojiPack, CreateOwnerPostPayload, SchedulePostPayload, PostScheduleResult, OwnerPostQuery, PromoClickResult, PromoAnalytics } from '../types/content';
|
|
6
|
+
import type { MessageInfoResult, MessageInfoQuery, MessageEditHistory, MuteDuration, ConversationMuteState, QuietHours, QuietHoursView, UpdateQuietHoursPayload, AuthSessionList, AuthSessionRevokeResult, AccountChatLink, UpdateAccountProfilePayload, AccountProfile, CreateMessageReminderPayload, MessageReminderView, ReminderListQuery, ChatFeaturePage, ConversationPermissionsPublic, UpdateConversationPermissionsPayload, HuddleStatusView, TranscribeAvailability, TranscriptResponse, TranscriptSummaryResult, TranscriptTranslationResult, InboxListQuery, InboxConversationView, InboxUpdatedPayload, InboxStatus, LinkAutoTranscribeResult, LinkAgentInboxResult, ConversationExportFormat, MemberConversationExportResult, MemberExportOptions, ConversationExportStatus, OwnerExportPayload, OwnerExportResult, LeaveLinkResult, ClaimGuestPayload, ClaimGuestResult, AutomationKeywordTest, InboxAgentProfile, InboxCursorQuery, CreateInternalNotePayload, InternalNoteView, InboxNoteDeleted, AgentInboxStateView, ConversationNoteView, ConversationSummaryView, ConversationTopicResult, InboxDraftReplyView, InboxLinkSettingsPayload, InboxLinkSettingsView, JoinPresenceStats, SignInCodeRequestResult, BusinessLoginResult, BusinessSessionTokens, SupportGroupTeamView, CreatedChatLink, ChatLinkSettingsPatch } from '../types/chat-features';
|
|
7
|
+
import type { MyChatLinksQuery, MyChatLinksPage, LinkDiscoverableResult, WidgetConfig, LinkAvailability, GiftAnnounceResult, LinkOnlineCount, JoinLinkAsGuestPayload, LinkJoinSession, MeetingGuestCodeSent, LinkReopenWatchResult, ScheduledSendNowResult, StatusSubscribeResult, StatusUnsubscribeResult, WebhookTestResult, HopDeclineResult, WebinarPublicInfo, RegisterWebinarPayload, WebinarRegisterResult, LinkNotifyLevel, LinkNotifyResult, LinkMemberSuggestions, LinkMode, ConversationMode, SetLinkModePayload, LinkModeChangeResult, PublicLinkInfo, LinkModeOptions, LinkChannelPreview, SetJoinPolicyPayload, JoinPolicy, JoinRequestPayload, JoinRequestPublicResult, JoinRequestListQuery, JoinRequestPage, JoinRequestView, WebhookDeliveryRow, WebhookRetryResult, WebhookSecretRotation, WebhookCaptureView, WebhookCaptureStopped, HopInviteResult, RegisterDevicePayload, PushDeclineResult, LinkMemberListQuery, LinkMemberPage, RevokeLinkInviteResult, RecordingDownloadLink } from '../types/chat-core';
|
|
8
|
+
import type { SubmitCsatPayload, CsatRating, CsatQuery, CsatRatingPage, CsatSummary } from '../types/csat';
|
|
9
|
+
import type { Plan, SubscribePayload, ChangePlanPayload, PaymentCheckout, PlanChangeResult, PaymentPendingResult, PlanSubscription, CustomPlanRequestPayload, CustomPlanRequestStatusView, LatestPlanRequest, StoreFeature, PurchaseFeaturePayload, MyFeaturePurchase, GiftPlanPayload, EmbedDomainsResult, PublicGiftStoreData, StorageUsage, TrialStatus, StartTrialPayload, TrialStartResult, RenewalStatus, RenewalCheckout, PaymentChannel, PaymentChannelResult } from '../types/billing';
|
|
10
|
+
import type { WorkspaceTeamList, WorkspaceTeamView, CreateWorkspaceTeamPayload, UpdateWorkspaceTeamPayload, WorkspaceTeamDeleteResult, InviteTeamMemberPayload, TeamInviteResult, InviteChatUserPayload, InviteChatUserResult, MemberFollowStatus, PushReplyResult, HopMeetingJoinResult, WebinarRecordingsView, WebinarRecordingLinkResult, GiftCatalogItem, SendPeerGiftPayload, PeerGiftCheckout, PeerGiftVerifyResult, GiftsReceivedPage, GiftsReceivedQuery, PayeeBalanceView, GiftPayoutResult, OwnerGiftsPage, CursorPageQuery, StaffAccessPage, OwnerMeeting, OwnerMeetingsQuery, ScheduleOwnerMeetingPayload, ScheduledOwnerMeeting, ScheduleMeetingOptions, OwnerMeetingCancelResult } from '../types/workspace';
|
|
11
|
+
import type { CalendarProviderId, CalendarSyncStatus, CalendarConnectPayload, CalendarConnectResult, CalendarOkResult, CalendarSyncQueued, CalendarBusy, CalendarBusyQuery, ActivityNotification, ActivityQuery, ActivityUnreadCount, SidebarCategories, ConversationCategoryResult, RenameSidebarCategoryPayload, LinkAppOriginsResult } from '../types/calendar';
|
|
12
|
+
import type { SharedChannelScopeQuery, SharedChannelListQuery, SharedChannelPage, InviteSharedChannelPayload, SharedChannelInviteResult, SharedChannelPreview, AcceptSharedChannelPayload, AcceptSharedChannelByTokenPayload, SharedChannelMembersQuery, SharedChannelMembersPage, SharedChannelAuditPage, SharedChannelView, SharedConversationPermissions, OpenSharedDirectPayload, SharedDirectResult, RemoveSharedMemberPayload, RemoveSharedMessagePayload, RemoveSharedMessageResult, LinkChatUserToAccountPayload, LinkChatUserToAccountResult } from '../types/shared-channels';
|
|
13
|
+
import type { IncomingWebhook, IncomingWebhookPage, IncomingWebhooksQuery, CreateIncomingWebhookPayload, UpdateIncomingWebhookPayload } from '../types/incoming-webhooks';
|
|
14
|
+
import type { GifConfigView, GifPage, GifQuery, GifShareRef, GifShareResult, GifReportResult, ReportGifPayload } from '../types/workspace-gifs';
|
|
15
|
+
import type { LinkCodeCheck, ModeCatalog, LinkWhoCanJoin, LinkWhoCanJoinResult, LinkCustomDomainView, ChatLinkOverviewStats, WipeLinkMessagesResult, PersonalNote, ConversationPinResult, StarredPeoplePage, StarredPeopleQuery, StarredIdsResult, StarToggleResult, FlagRegistryEntry, PendingTransfersResult, PurchaseExtraSeatsPayload, ExtraSeatsResult, StorageAddonView, CreateApiKeyPayload, UpdateApiKeyPayload, ApiKeyView, ApiKeyUsage, ApiKeyUsagePeriod, CallHistoryPage, CallHistoryQuery, ContactMessagePayload, ContactMessageResult } from '../types/extras';
|
|
16
|
+
/** Mentions query; `handles` (lanes) and `q` (≤ 80 chars) work on both mention routes since chatta #408. */
|
|
17
|
+
export interface AdminMentionsQuery {
|
|
18
|
+
nextCursor?: string;
|
|
19
|
+
prevCursor?: string;
|
|
20
|
+
limit?: string;
|
|
21
|
+
/** Mention lanes to include, e.g. `['admin', 'support']`. */
|
|
22
|
+
handles?: string | string[];
|
|
23
|
+
/** Text search inside the mentions. */
|
|
24
|
+
q?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Body for `POST /external/members` (backend `RegisterChatMembersDto`). Key is `participants`,
|
|
28
|
+
* not `members` — the old shape was whitelist-stripped and always 400'd. */
|
|
29
|
+
export interface RegisterMembersPayload {
|
|
30
|
+
/** 1–100 participants per call (backend-enforced). */
|
|
31
|
+
participants: RegisterMemberPayload[];
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* One participant (backend `ChatLinkParticipantDto`): `displayName`, `email`, `country` (ISO,
|
|
35
|
+
* e.g. "NG") are required; there are no firstName/lastName/username fields. */
|
|
36
|
+
export interface RegisterMemberPayload {
|
|
37
|
+
displayName: string;
|
|
38
|
+
email: string;
|
|
39
|
+
/** Country ISO code, e.g. "NG". */
|
|
40
|
+
country: string;
|
|
41
|
+
photo?: string;
|
|
42
|
+
chatLinkCode?: string;
|
|
43
|
+
/** Validated against `country` by the backend when present. */
|
|
44
|
+
phone?: string;
|
|
45
|
+
deviceToken?: string;
|
|
46
|
+
webToken?: string;
|
|
47
|
+
/** Min 8 chars when present. */
|
|
48
|
+
password?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Wanted @handle for a new member (3-30 letters, numbers, `_` or `-`); defaults to the part of the email
|
|
51
|
+
* before the @. A taken handle gets the next free `-2`, `-3`, ...; read the final one from the response.
|
|
52
|
+
*/
|
|
53
|
+
handle?: string;
|
|
54
|
+
}
|
|
55
|
+
/** Theme colors accepted by the backend `ChatLinkThemeDto` (all optional). */
|
|
56
|
+
export interface ChatLinkThemePayload {
|
|
57
|
+
primaryColor?: string;
|
|
58
|
+
secondaryColor?: string;
|
|
59
|
+
primaryLight?: string;
|
|
60
|
+
bgMain?: string;
|
|
61
|
+
bgSecondary?: string;
|
|
62
|
+
textPrimary?: string;
|
|
63
|
+
textMuted?: string;
|
|
64
|
+
borderColor?: string;
|
|
65
|
+
borderLight?: string;
|
|
66
|
+
fontFamily?: string;
|
|
67
|
+
logoUrl?: string;
|
|
68
|
+
/** Join-card hero image: https URL or a `data:` URI (≤ 7 MB as text); stored by the server. */
|
|
69
|
+
welcomeImageUrl?: string;
|
|
70
|
+
/** Footer line on the join card and chat, ≤ 140 chars. */
|
|
71
|
+
footerText?: string;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Body for `POST /external/chat-links` (backend `CreateChatLinkDto`). `linkType`, `status`,
|
|
75
|
+
* `maxVisitors` don't exist server-side; real fields: maxMembers, profilePhoto, welcomeMessage, theme… */
|
|
76
|
+
export interface CreateChatLinkPayload {
|
|
77
|
+
name: string;
|
|
78
|
+
/** Custom address `/in/<code>`: 3–40 lowercase letters, digits, single hyphens. Omit for a random code. Check first with `checkLinkCode`. */
|
|
79
|
+
code?: string;
|
|
80
|
+
caption?: string;
|
|
81
|
+
profilePhoto?: string;
|
|
82
|
+
conversationType?: string;
|
|
83
|
+
expiresAt?: string;
|
|
84
|
+
maxMembers?: number;
|
|
85
|
+
allowAttachments?: boolean;
|
|
86
|
+
allowMemberInvite?: boolean;
|
|
87
|
+
welcomeMessage?: string;
|
|
88
|
+
theme?: ChatLinkThemePayload;
|
|
89
|
+
/** Allowlisted keys only (`CHAT_LINK_SETTINGS_KEYS`); others are dropped by the server. */
|
|
90
|
+
settings?: ChatLinkSettingsPatch;
|
|
91
|
+
participants?: RegisterMemberPayload[];
|
|
92
|
+
/** Space preset: link type, join rules and default conversations; the reply carries `modeResult`. */
|
|
93
|
+
mode?: LinkMode;
|
|
94
|
+
/** Step 2 switches (both routes; the API-key route needs chatta #412, older servers ignore them there). */
|
|
95
|
+
modeOptions?: LinkModeOptions;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Body for `PATCH /external/chat-links/:linkId` — backend `UpdateChatLinkDto`.
|
|
99
|
+
* Contract fix: `maxVisitors` → `maxMembers`; adds the full updatable set.
|
|
100
|
+
*/
|
|
101
|
+
export interface UpdateChatLinkPayload {
|
|
102
|
+
name?: string;
|
|
103
|
+
caption?: string;
|
|
104
|
+
profilePhoto?: string;
|
|
105
|
+
expiresAt?: string;
|
|
106
|
+
maxMembers?: number;
|
|
107
|
+
allowAttachments?: boolean;
|
|
108
|
+
allowMemberInvite?: boolean;
|
|
109
|
+
welcomeMessage?: string;
|
|
110
|
+
theme?: ChatLinkThemePayload;
|
|
111
|
+
/** Merged key by key (chatta #408): send only what changes; keys outside the allowlist are dropped. */
|
|
112
|
+
settings?: ChatLinkSettingsPatch;
|
|
113
|
+
/** ChatLinkStatus enum value, e.g. ACTIVE | INACTIVE. */
|
|
114
|
+
status?: string;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Body for `POST /external/chat-links/:linkId/conversations` (`ExternalCreateConversationDto`):
|
|
118
|
+
* `memberId` (creator) + `conversationType` are required; the old `{ type, participantIds }` 400'd. */
|
|
119
|
+
export interface CreateConversationPayload {
|
|
120
|
+
/** The member creating the conversation (required). */
|
|
121
|
+
memberId: string;
|
|
122
|
+
/** ChatConversationType enum value, e.g. GROUP | PRIVATE. */
|
|
123
|
+
conversationType: string;
|
|
124
|
+
name?: string;
|
|
125
|
+
/** New participants to register into the conversation. */
|
|
126
|
+
participants?: RegisterMemberPayload[];
|
|
127
|
+
includeSelf?: boolean;
|
|
128
|
+
/** GROUP only: false makes it public (listed, self-joinable). Omitted = private; channels stay public unless true. */
|
|
129
|
+
isPrivate?: boolean;
|
|
130
|
+
}
|
|
131
|
+
export interface SendMessagePayload {
|
|
132
|
+
conversationId: string;
|
|
133
|
+
senderId: string;
|
|
134
|
+
referenceId: string;
|
|
135
|
+
message?: string;
|
|
136
|
+
attachments?: AttachmentInput[];
|
|
137
|
+
/** ISO date — set to schedule the message for future delivery. */
|
|
138
|
+
scheduledAt?: string;
|
|
139
|
+
codeLang?: string;
|
|
140
|
+
chatLinkCode?: string;
|
|
141
|
+
replyTo?: {
|
|
142
|
+
messageId: string;
|
|
143
|
+
senderName: string;
|
|
144
|
+
text: string;
|
|
145
|
+
};
|
|
146
|
+
/** Parent message ID for threaded replies. */
|
|
147
|
+
parentMessageId?: string;
|
|
148
|
+
/** e.g. 'POLL' — backend `messageKind`. */
|
|
149
|
+
messageKind?: string;
|
|
150
|
+
/** Poll question (when messageKind is a poll). */
|
|
151
|
+
question?: string;
|
|
152
|
+
/** Poll options (when messageKind is a poll). */
|
|
153
|
+
options?: {
|
|
154
|
+
text: string;
|
|
155
|
+
}[];
|
|
156
|
+
multiSelect?: boolean;
|
|
157
|
+
/** Poll: hide who voted (counts only). */
|
|
158
|
+
anonymous?: boolean;
|
|
159
|
+
/** Sticker from the link's enabled pack; send without `message` (400 otherwise). */
|
|
160
|
+
sticker?: StickerRef;
|
|
161
|
+
}
|
|
162
|
+
export interface SendPushNotificationPayload {
|
|
163
|
+
deviceToken: string;
|
|
164
|
+
body: string;
|
|
165
|
+
title?: string;
|
|
166
|
+
imageUrl?: string;
|
|
167
|
+
topic?: string;
|
|
168
|
+
metaData?: NotificationData;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Body for `POST /external/chats/exports`: `conversationId` is required, there is no `chatLinkId`,
|
|
172
|
+
* and `email` defaults to the key owner's username. */
|
|
173
|
+
export interface ExportChatPayload {
|
|
174
|
+
conversationId: string;
|
|
175
|
+
email?: string;
|
|
176
|
+
/** CSV (default) | PDF | JSON | ZIP. Date range and includeMedia need `exportConversationAsOwner`. */
|
|
177
|
+
format?: string;
|
|
178
|
+
}
|
|
179
|
+
export interface SentMessagesQuery {
|
|
180
|
+
/** Filter to a single conversation. Serialized as the backend
|
|
181
|
+
* `chatMessageByConversationIds` filter key (a bare `conversationId`
|
|
182
|
+
* param is ignored by the backend query builder). */
|
|
183
|
+
conversationId?: string;
|
|
184
|
+
nextCursor?: string;
|
|
185
|
+
prevCursor?: string;
|
|
186
|
+
limit?: string;
|
|
187
|
+
}
|
|
188
|
+
export declare class HttpAPI {
|
|
189
|
+
private readonly transport;
|
|
190
|
+
constructor(transport: HttpTransport);
|
|
191
|
+
/** Set (or clear with null) the owner account token used by owner-console methods. */
|
|
192
|
+
setOwnerToken(token: string | null): void;
|
|
193
|
+
/** Set (or clear with null) the chat-member token used by member routes (mute, reminders…). */
|
|
194
|
+
setMemberToken(token: string | null): void;
|
|
195
|
+
/** Register up to 100 members. A taken handle gets the next free `-N`; each returned member shows its final handle. */
|
|
196
|
+
registerMembers(payload: RegisterMembersPayload): Promise<Member[]>;
|
|
197
|
+
/** Register one member. A taken handle gets the next free `-N`; the returned member shows the final handle. */
|
|
198
|
+
registerMember(payload: RegisterMemberPayload): Promise<Member>;
|
|
199
|
+
listMembers(query?: MemberQuery): Promise<PaginatedResult<Member>>;
|
|
200
|
+
getMember(memberIdOrUsername: string): Promise<Member>;
|
|
201
|
+
/** API key. With `mode`, the preset is applied and the link carries `modeResult` (chatta #385). */
|
|
202
|
+
createChatLink(payload: CreateChatLinkPayload): Promise<CreatedChatLink>;
|
|
203
|
+
listChatLinks(query?: ChatLinkQuery): Promise<any>;
|
|
204
|
+
getChatLink(linkId: string): Promise<any>;
|
|
205
|
+
updateChatLink(linkId: string, payload: UpdateChatLinkPayload): Promise<any>;
|
|
206
|
+
createConversation(linkId: string, payload: CreateConversationPayload): Promise<any>;
|
|
207
|
+
/** Public channels and groups only (no DMs, private groups, support groups or meetings); 400 for an expired or off link. */
|
|
208
|
+
listPublicConversations(linkCode: string, query?: {
|
|
209
|
+
nextCursor?: string;
|
|
210
|
+
prevCursor?: string;
|
|
211
|
+
limit?: number;
|
|
212
|
+
ownerUsername?: string;
|
|
213
|
+
}): Promise<CursorPage<Conversation>>;
|
|
214
|
+
getMemberConversations(memberId: string, query?: ConversationQuery): Promise<ConversationUsersPage>;
|
|
215
|
+
getConversationUsers(conversationId: string, query?: ConversationQuery): Promise<ConversationUsersPage>;
|
|
216
|
+
getMessages(memberId: string, conversationId: string, query?: MessageQuery): Promise<PaginatedResult<Message>>;
|
|
217
|
+
sendMessage(payload: SendMessagePayload): Promise<Message>;
|
|
218
|
+
/**
|
|
219
|
+
* Messages sent by the key owner (`GET /external/chats/messages`), newest first, excluding scheduled
|
|
220
|
+
* and thread children. `conversationId` is sent as `chatMessageByConversationIds` (the bare key is ignored). */
|
|
221
|
+
listSentMessages(query?: SentMessagesQuery): Promise<PaginatedResult<Message>>;
|
|
222
|
+
/**
|
|
223
|
+
* Cancel (soft-delete) a scheduled message via `DELETE /external/chats/messages/:id`; the body must
|
|
224
|
+
* carry `conversationId`. Returns the mutation payload (the JWT-only bare variant is unreachable here). */
|
|
225
|
+
cancelScheduledMessage(messageId: string, conversationId: string): Promise<MessageMutationResult>;
|
|
226
|
+
/**
|
|
227
|
+
* Reschedule via `PATCH /external/chats/messages/:id` (owner-scoped); body needs both a future
|
|
228
|
+
* `scheduledAt` and `conversationId`. Returns the updated message. */
|
|
229
|
+
rescheduleMessage(messageId: string, conversationId: string, scheduledAt: string): Promise<Message>;
|
|
230
|
+
sendPushNotification(payload: SendPushNotificationPayload): Promise<StatusResponse>;
|
|
231
|
+
exportChat(payload: ExportChatPayload): Promise<any>;
|
|
232
|
+
getExports(query?: PaginationQuery): Promise<any>;
|
|
233
|
+
getCannedResponses(): Promise<CannedResponse[]>;
|
|
234
|
+
createCannedResponse(payload: CreateCannedResponsePayload): Promise<CannedResponse>;
|
|
235
|
+
updateCannedResponse(id: string, payload: UpdateCannedResponsePayload): Promise<CannedResponse>;
|
|
236
|
+
deleteCannedResponse(id: string): Promise<SuccessResponse>;
|
|
237
|
+
/** Count one use when a composer inserts the reply (feeds the dashboard "Used" column). */
|
|
238
|
+
markCannedResponseUsed(id: string): Promise<SuccessResponse>;
|
|
239
|
+
getWebhooks(query?: PaginationQuery): Promise<PaginatedResult<Webhook>>;
|
|
240
|
+
getWebhook(webhookId: string): Promise<Webhook>;
|
|
241
|
+
createWebhook(payload: CreateWebhookPayload): Promise<Webhook>;
|
|
242
|
+
updateWebhook(webhookId: string, payload: UpdateWebhookPayload): Promise<Webhook>;
|
|
243
|
+
deleteWebhook(webhookId: string): Promise<SuccessResponse>;
|
|
244
|
+
/** One immediate `webhook.test` delivery to your endpoint (never retried); 400 if not yours. */
|
|
245
|
+
testWebhook(webhookId: string): Promise<WebhookTestResult>;
|
|
246
|
+
/** How many of the link's last-7-day messages these keywords (≤ 10) would match. Owner token. */
|
|
247
|
+
testAutomationKeywords(chatLinkId: string, keywords: string[]): Promise<AutomationKeywordTest>;
|
|
248
|
+
/** Same test from the owner console (`POST /api/v1/chats/webhooks/:id/test`). Owner token. */
|
|
249
|
+
testWebhookAsOwner(webhookId: string): Promise<WebhookTestResult>;
|
|
250
|
+
/** Deliveries for one endpoint, newest first (`limit` 1–20, default 10). Owner token. */
|
|
251
|
+
getWebhookDeliveries(webhookId: string, query?: {
|
|
252
|
+
limit?: number;
|
|
253
|
+
}): Promise<WebhookDeliveryRow[]>;
|
|
254
|
+
/** Retry a failed or pending delivery (a row with `canRetry`); 400 when it is gone or delivered. Owner token. */
|
|
255
|
+
retryWebhookDelivery(webhookId: string, deliveryId: string): Promise<WebhookRetryResult>;
|
|
256
|
+
/** New signing secret (shown once; queued retries use it too). Update your server first. Owner token. */
|
|
257
|
+
rotateWebhookSecret(webhookId: string): Promise<WebhookSecretRotation>;
|
|
258
|
+
/** Start (or extend) listening: the next deliveries are kept for 30 minutes, the last 50. Owner token. */
|
|
259
|
+
startWebhookCapture(webhookId: string): Promise<WebhookCaptureView>;
|
|
260
|
+
/** Captured deliveries after sequence `after`, oldest first; pass the returned `lastSeq` next time. Owner token. */
|
|
261
|
+
readWebhookCapture(webhookId: string, after?: number): Promise<WebhookCaptureView>;
|
|
262
|
+
/** Stop listening and delete what was kept. Owner token. */
|
|
263
|
+
stopWebhookCapture(webhookId: string): Promise<WebhookCaptureStopped>;
|
|
264
|
+
/** The hooks of one group or channel, newest first (`status` active by default). The secret is never in the list. */
|
|
265
|
+
listIncomingWebhooks(conversationId: string, query?: IncomingWebhooksQuery): Promise<IncomingWebhookPage>;
|
|
266
|
+
/** Make a hook. The result carries the one-time `url`: store it now, it is never shown again. Up to 10 active per conversation. */
|
|
267
|
+
createIncomingWebhook(conversationId: string, payload: CreateIncomingWebhookPayload): Promise<IncomingWebhook>;
|
|
268
|
+
/** Rename a hook or change the name and picture of its posts. The URL does not change. */
|
|
269
|
+
updateIncomingWebhook(conversationId: string, hookId: string, payload: UpdateIncomingWebhookPayload): Promise<IncomingWebhook>;
|
|
270
|
+
/** Swap the secret: the old URL answers 404 at once and the result carries the new one-time `url`. */
|
|
271
|
+
regenerateIncomingWebhook(conversationId: string, hookId: string): Promise<IncomingWebhook>;
|
|
272
|
+
/** Stop a hook for good (its URL answers 404). Messages it already posted stay. */
|
|
273
|
+
revokeIncomingWebhook(conversationId: string, hookId: string): Promise<IncomingWebhook>;
|
|
274
|
+
/** A link's meetings (`status` upcoming by default, only `all` lists cancelled), cursor paged. Owner token. */
|
|
275
|
+
listMeetings(query: OwnerMeetingsQuery): Promise<PaginatedResult<OwnerMeeting>>;
|
|
276
|
+
/**
|
|
277
|
+
* Schedule a meeting on one of your links; invitees (1 to 70) are emailed. Owner token.
|
|
278
|
+
* Pass `idempotencyKey` to make a retry replay the first result (24 h) instead of scheduling twice. */
|
|
279
|
+
scheduleMeeting(payload: ScheduleOwnerMeetingPayload, options?: ScheduleMeetingOptions): Promise<ScheduledOwnerMeeting>;
|
|
280
|
+
/** Cancel a meeting (up to 300 characters of `reason`); invitees are told. Safe to repeat. Owner token. */
|
|
281
|
+
cancelMeeting(meetingId: string, reason?: string): Promise<OwnerMeetingCancelResult>;
|
|
282
|
+
/** Same as `listMeetings`, with the API key (`GET /external/meetings`). */
|
|
283
|
+
listMeetingsWithKey(query: OwnerMeetingsQuery): Promise<PaginatedResult<OwnerMeeting>>;
|
|
284
|
+
/** Same as `scheduleMeeting`, with the API key (`POST /external/meetings`). */
|
|
285
|
+
scheduleMeetingWithKey(payload: ScheduleOwnerMeetingPayload, options?: ScheduleMeetingOptions): Promise<ScheduledOwnerMeeting>;
|
|
286
|
+
/** Same as `cancelMeeting`, with the API key (`DELETE /external/meetings/:id`). */
|
|
287
|
+
cancelMeetingWithKey(meetingId: string, reason?: string): Promise<OwnerMeetingCancelResult>;
|
|
288
|
+
translateMessage(messageId: string, targetLanguage: string): Promise<TranslateMessageResult>;
|
|
289
|
+
/** The signed-in chat user, incl. `hasBusinessAccount`. */
|
|
290
|
+
getChatUserProfile(): Promise<ChatUserMe>;
|
|
291
|
+
updateChatUserProfile(payload: UpdateChatUserProfilePayload): Promise<Member>;
|
|
292
|
+
getHandleEditInfo(): Promise<HandleEditInfo>;
|
|
293
|
+
sendAdminReply(payload: AdminReplyPayload): Promise<Message>;
|
|
294
|
+
getFeaturePricing(): Promise<FeaturePricing[]>;
|
|
295
|
+
giftFeature(payload: GiftFeaturePayload): Promise<GiftFeatureResult>;
|
|
296
|
+
verifyGiftFeature(payload: VerifyGiftPayload): Promise<FeaturePurchase | null>;
|
|
297
|
+
getCannedResponseSuggested(category?: string): Promise<SuggestedCannedResponse[]>;
|
|
298
|
+
useSuggestedCannedResponse(suggestedId: string): Promise<CannedResponse>;
|
|
299
|
+
/** API key: mentions across the workspace; `handles` (default `admin`, unknown = 400) and `q` since chatta #408. */
|
|
300
|
+
getAdminMentions(query?: AdminMentionsQuery): Promise<PaginatedResult<Message>>;
|
|
301
|
+
/** Owner token: mention lanes (`handles`, e.g. `['admin', 'support']`; unknown handles 400) and `q` (≤ 80 chars). */
|
|
302
|
+
getAdminMentionsAsOwner(query?: AdminMentionsQuery): Promise<PaginatedResult<Message>>;
|
|
303
|
+
globalSearch(q: string): Promise<GlobalSearchResult>;
|
|
304
|
+
bulkExportChat(payload: BulkExportChatPayload): Promise<BulkExportChatResult>;
|
|
305
|
+
getLinkWorkspaceInfo(code: string): Promise<LinkWorkspaceInfo>;
|
|
306
|
+
getWebinarRegistrations(conversationId: string): Promise<WebinarRegistration[]>;
|
|
307
|
+
getAppVersion(): Promise<AppVersionInfo>;
|
|
308
|
+
createLinkEmoji(linkId: string, payload: CreateCustomEmojiPayload): Promise<CustomEmoji>;
|
|
309
|
+
listLinkEmojis(linkId: string, query?: CustomEmojiQuery): Promise<CursorPage<CustomEmoji>>;
|
|
310
|
+
updateLinkEmoji(linkId: string, emojiId: string, payload: UpdateCustomEmojiPayload): Promise<CustomEmoji>;
|
|
311
|
+
enableLinkEmoji(linkId: string, emojiId: string): Promise<CustomEmoji>;
|
|
312
|
+
disableLinkEmoji(linkId: string, emojiId: string): Promise<CustomEmoji>;
|
|
313
|
+
deleteLinkEmoji(linkId: string, emojiId: string): Promise<DeleteCustomEmojiResult>;
|
|
314
|
+
/** Public member pack (`GET /in/:linkCode/emoji-pack`, no auth). Fetch once per chat load. */
|
|
315
|
+
getLinkEmojiPack(linkCode: string): Promise<EmojiPack>;
|
|
316
|
+
/** Owner `POST /posts`; `scheduledAt` creates SCHEDULED, `asDraft` creates DRAFT. */
|
|
317
|
+
createPost(payload: CreateOwnerPostPayload): Promise<Post>;
|
|
318
|
+
/** Owner post list, e.g. the queue: `{ postByStatuses: 'SCHEDULED' }` or `'DRAFT'`. */
|
|
319
|
+
listPosts(query?: OwnerPostQuery): Promise<CursorPage<Post>>;
|
|
320
|
+
/** Schedule a draft or reschedule a scheduled post. */
|
|
321
|
+
schedulePost(postId: string, payload: SchedulePostPayload): Promise<PostScheduleResult>;
|
|
322
|
+
/** Publish a draft or scheduled post now (400 if already past expiresAt). */
|
|
323
|
+
publishPost(postId: string): Promise<Post>;
|
|
324
|
+
/** Move a scheduled post back to draft (clears scheduledAt). */
|
|
325
|
+
cancelPostSchedule(postId: string): Promise<PostScheduleResult>;
|
|
326
|
+
/** 30-day + lifetime stats for a PROMOTION post (owner console — needs ownerToken). */
|
|
327
|
+
getPromoAnalytics(postId: string): Promise<PromoAnalytics>;
|
|
328
|
+
/**
|
|
329
|
+
* Public CTA click (no auth, never retried). Call before opening `result.url`; pass a stable
|
|
330
|
+
* per-device `visitorId` ([A-Za-z0-9_-]{8,64}) — malformed ids are omitted (IP + UA used). */
|
|
331
|
+
trackPromoClick(postId: string, visitorId?: string): Promise<PromoClickResult>;
|
|
332
|
+
/** Seen-by / delivered list (sender or conversation admin; owner org-scoped). */
|
|
333
|
+
getMessageInfo(conversationId: string, messageId: string, query?: MessageInfoQuery): Promise<MessageInfoResult>;
|
|
334
|
+
/** A message's edit history (prior versions + the current one), gated by the link's editHistoryAdminsOnly (1.6.2). */
|
|
335
|
+
getMessageEditHistory(conversationId: string, messageId: string): Promise<MessageEditHistory>;
|
|
336
|
+
/** Conversation admins export a conversation; emailed to your own account email. Member token. */
|
|
337
|
+
exportConversationAsAdmin(conversationId: string, format?: ConversationExportFormat): Promise<MemberConversationExportResult>;
|
|
338
|
+
/** Member export with options: scope 'mine' (any member) or 'all' (admins), ZIP, date range, emailMe. Member token. */
|
|
339
|
+
exportConversationAsMember(conversationId: string, options?: MemberExportOptions): Promise<MemberConversationExportResult>;
|
|
340
|
+
/** Status + download link of your own member export (use with `emailMe: false`). Member token. */
|
|
341
|
+
getMemberExportStatus(conversationId: string, exportId: string): Promise<ConversationExportStatus>;
|
|
342
|
+
/** Owner export emailed to `email`, with ZIP, includeMedia and a from / to range. Owner token. */
|
|
343
|
+
exportConversationAsOwner(conversationId: string, payload: OwnerExportPayload): Promise<OwnerExportResult>;
|
|
344
|
+
/** Mute yourself in a conversation ('off' unmutes). Member token. */
|
|
345
|
+
muteConversation(conversationId: string, duration: MuteDuration): Promise<ConversationMuteState>;
|
|
346
|
+
/** Your quiet hours plus `account` (linked business window, or null). Member token. */
|
|
347
|
+
getQuietHours(): Promise<QuietHoursView>;
|
|
348
|
+
setQuietHours(payload: QuietHours): Promise<QuietHours>;
|
|
349
|
+
/** Remind me / read later (setting the same one again reschedules; max 200 pending). Member token. */
|
|
350
|
+
createReminder(payload: CreateMessageReminderPayload): Promise<MessageReminderView>;
|
|
351
|
+
/** Pending reminders only. */
|
|
352
|
+
listReminders(query?: ReminderListQuery): Promise<ChatFeaturePage<MessageReminderView>>;
|
|
353
|
+
cancelReminder(reminderId: string): Promise<MessageReminderView>;
|
|
354
|
+
/** Mark done (e.g. "read later → done"). */
|
|
355
|
+
completeReminder(reminderId: string): Promise<MessageReminderView>;
|
|
356
|
+
getConversationPermissions(conversationId: string): Promise<ConversationPermissionsPublic>;
|
|
357
|
+
/** Conversation admin (member token) or owner. */
|
|
358
|
+
updateConversationPermissions(conversationId: string, payload: UpdateConversationPermissionsPayload): Promise<ConversationPermissionsPublic>;
|
|
359
|
+
/** Hide the Transcribe button when `enabled` is false. */
|
|
360
|
+
getTranscribeAvailability(): Promise<TranscribeAvailability>;
|
|
361
|
+
/** Starts (or returns) a transcript; failures come back as `transcript.errorCode`. */
|
|
362
|
+
transcribeMessage(conversationId: string, messageId: string): Promise<TranscriptResponse>;
|
|
363
|
+
getTranscript(conversationId: string, messageId: string): Promise<TranscriptResponse>;
|
|
364
|
+
summarizeTranscript(conversationId: string, messageId: string): Promise<TranscriptSummaryResult>;
|
|
365
|
+
/** `targetLanguage`: ISO 639-1, e.g. 'fr'. */
|
|
366
|
+
translateTranscript(conversationId: string, messageId: string, targetLanguage: string): Promise<TranscriptTranslationResult>;
|
|
367
|
+
/** Start or join the conversation's huddle (CHANNEL/GROUP). Then `sock().joinHop()` for media. Member token. */
|
|
368
|
+
startHuddle(conversationId: string, initialMediaKind?: 'audio' | 'video'): Promise<HuddleStatusView>;
|
|
369
|
+
getHuddle(conversationId: string): Promise<HuddleStatusView>;
|
|
370
|
+
/** Host/co-host or conversation admin. */
|
|
371
|
+
endHuddle(conversationId: string): Promise<{
|
|
372
|
+
ok: boolean;
|
|
373
|
+
}>;
|
|
374
|
+
/** Decline a ringing call without a socket (lock-screen push); the call gets `hop-invite-declined`. Member token. */
|
|
375
|
+
declineHopInvite(sessionId: string): Promise<HopDeclineResult>;
|
|
376
|
+
/** Decline from the native call screen with the push's `declineToken` (public, single use, ~2 min). */
|
|
377
|
+
pushDeclineCall(token: string): Promise<PushDeclineResult>;
|
|
378
|
+
/** Register this device for pushes (FCM, web, iOS VoIP for CallKit). Member or owner token. */
|
|
379
|
+
registerDevice(payload: RegisterDevicePayload): Promise<SuccessResponse>;
|
|
380
|
+
/** Ring people into a call you are in (≤ 50 ids): socket `hop-invite` + incoming-call push. Member token. */
|
|
381
|
+
inviteToHop(sessionId: string, chatUserIds: string[]): Promise<HopInviteResult>;
|
|
382
|
+
/** Per-link auto-transcribe on send (billed to the owner). */
|
|
383
|
+
setLinkAutoTranscribe(linkId: string, enabled: boolean): Promise<LinkAutoTranscribeResult>;
|
|
384
|
+
/** Per-link agent-inbox tracking. */
|
|
385
|
+
setLinkAgentInbox(linkId: string, enabled: boolean): Promise<LinkAgentInboxResult>;
|
|
386
|
+
listInbox(query: InboxListQuery): Promise<ChatFeaturePage<InboxConversationView>>;
|
|
387
|
+
/** Assign to the owner or a teammate; null unassigns. */
|
|
388
|
+
assignInbox(conversationId: string, assigneeId: string | null): Promise<InboxUpdatedPayload>;
|
|
389
|
+
setInboxStatus(conversationId: string, status: InboxStatus): Promise<InboxUpdatedPayload>;
|
|
390
|
+
/** Per-link SLA target (minutes) and join-card topics (≤ 8). */
|
|
391
|
+
setLinkInboxSettings(linkId: string, payload: InboxLinkSettingsPayload): Promise<InboxLinkSettingsView>;
|
|
392
|
+
/** Offer this link as a "Did you mean" suggestion on not-found pages (default off). */
|
|
393
|
+
setLinkDiscoverable(linkId: string, enabled: boolean): Promise<LinkDiscoverableResult>;
|
|
394
|
+
/** The customer rates the open card 1–5 (member token, the conversation's customer only). Never retried. */
|
|
395
|
+
submitCsat(conversationId: string, payload: SubmitCsatPayload): Promise<CsatRating>;
|
|
396
|
+
/** Rated requests in a window, newest first (API key). */
|
|
397
|
+
listCsatRatings(query?: CsatQuery): Promise<CsatRatingPage>;
|
|
398
|
+
/** Requests, responses, average, satisfied %, response rate, per agent and team (API key). */
|
|
399
|
+
getCsatSummary(query?: Omit<CsatQuery, 'nextCursor' | 'limit'>): Promise<CsatSummary>;
|
|
400
|
+
/** `listCsatRatings` with the owner token. */
|
|
401
|
+
listCsatRatingsAsOwner(query?: CsatQuery): Promise<CsatRatingPage>;
|
|
402
|
+
/** `getCsatSummary` with the owner token. */
|
|
403
|
+
getCsatSummaryAsOwner(query?: Omit<CsatQuery, 'nextCursor' | 'limit'>): Promise<CsatSummary>;
|
|
404
|
+
/** Owner Members list; `status: 'invited'` lists people on an invite-only link's list who have not joined. */
|
|
405
|
+
getLinkMemberList(linkId: string, query?: LinkMemberListQuery): Promise<LinkMemberPage>;
|
|
406
|
+
/** Take someone off the invite list; a member who already joined is blocked too (`blocked: true`). */
|
|
407
|
+
revokeLinkInvite(linkId: string, memberId: string): Promise<RevokeLinkInviteResult>;
|
|
408
|
+
/** Save the pre-chat form and business hours together; returns the normalised config. */
|
|
409
|
+
setWidgetConfig(linkId: string, config: WidgetConfig): Promise<WidgetConfig>;
|
|
410
|
+
/** `agent: false` for chat users who are not on the workspace team. */
|
|
411
|
+
getInboxAgentProfile(): Promise<InboxAgentProfile>;
|
|
412
|
+
listInternalNotes(conversationId: string, query?: InboxCursorQuery): Promise<ChatFeaturePage<InternalNoteView>>;
|
|
413
|
+
/** Agents-only note in the conversation; customers never receive it. */
|
|
414
|
+
createInternalNote(conversationId: string, payload: CreateInternalNotePayload): Promise<InternalNoteView>;
|
|
415
|
+
deleteInternalNote(conversationId: string, noteId: string): Promise<InboxNoteDeleted>;
|
|
416
|
+
/** Inbox status, SLA progress, topic and tag for the context pane. */
|
|
417
|
+
getAgentInboxState(conversationId: string): Promise<AgentInboxStateView>;
|
|
418
|
+
/** Assign to a team member's business user id; null unassigns. */
|
|
419
|
+
agentAssignConversation(conversationId: string, assigneeId: string | null): Promise<InboxUpdatedPayload>;
|
|
420
|
+
agentSetInboxStatus(conversationId: string, status: InboxStatus): Promise<InboxUpdatedPayload>;
|
|
421
|
+
/** Team notes on the customer (they follow the customer across conversations). */
|
|
422
|
+
listConversationNotes(conversationId: string, query?: InboxCursorQuery): Promise<ChatFeaturePage<ConversationNoteView>>;
|
|
423
|
+
createConversationNote(conversationId: string, text: string): Promise<ConversationNoteView>;
|
|
424
|
+
/** Agents edit their own notes; owner/admin agents may edit any. */
|
|
425
|
+
updateConversationNote(conversationId: string, noteId: string, text: string): Promise<ConversationNoteView>;
|
|
426
|
+
deleteConversationNote(conversationId: string, noteId: string): Promise<InboxNoteDeleted>;
|
|
427
|
+
/** AI summary (cached per newest message); failures come back as `errorCode`. */
|
|
428
|
+
getConversationSummary(conversationId: string): Promise<ConversationSummaryView>;
|
|
429
|
+
/** Any member: a private AI draft for your next message (nothing is posted); `note` = what to say. Spends AI credits. */
|
|
430
|
+
draftConversationReply(conversationId: string, note?: string): Promise<InboxDraftReplyView>;
|
|
431
|
+
/** Agents: one AI reply draft from the recent conversation; spends the owner's AI credits. */
|
|
432
|
+
getDraftReply(conversationId: string): Promise<InboxDraftReplyView>;
|
|
433
|
+
/** "Catch me up" for a returning member; needs `unreadCount` ≥ CATCH_UP_MIN_UNREAD (8). */
|
|
434
|
+
getConversationCatchUp(conversationId: string, unreadCount: number): Promise<ConversationSummaryView>;
|
|
435
|
+
/** Every unsent draft this member has, for cross-device sync on load (1.6.1). */
|
|
436
|
+
getDrafts(): Promise<{
|
|
437
|
+
drafts: DraftView[];
|
|
438
|
+
}>;
|
|
439
|
+
/** Customer join-card pick (first pick wins) or agent re-route; may auto-assign. */
|
|
440
|
+
setConversationTopic(conversationId: string, topicId: string): Promise<ConversationTopicResult>;
|
|
441
|
+
/** Public join-card stat (no auth): agents online and typical reply time. */
|
|
442
|
+
getPresenceStats(linkCode: string): Promise<JoinPresenceStats>;
|
|
443
|
+
/** Links the signed-in chat user belongs to, with a live per-link `unreadCount`. Member token. */
|
|
444
|
+
listMyChatLinks(query?: MyChatLinksQuery): Promise<MyChatLinksPage>;
|
|
445
|
+
/** Leave every conversation in a link (history kept) and drop it from your links. Member token. */
|
|
446
|
+
leaveMyLink(linkId: string): Promise<LeaveLinkResult>;
|
|
447
|
+
/**
|
|
448
|
+
* Fold the no-email guest this device held into the signed-in member, so one person shows once in every list. Member token.
|
|
449
|
+
* Pass the guest's still-live access token (the proof); 10 a minute. The guest row is soft-deleted and its session ends.
|
|
450
|
+
*/
|
|
451
|
+
claimGuest(payload: ClaimGuestPayload): Promise<ClaimGuestResult>;
|
|
452
|
+
/** Your push level for one link (all / mentions / off); the push queue honours it. Member token. */
|
|
453
|
+
setMyLinkNotify(linkId: string, level: LinkNotifyLevel): Promise<LinkNotifyResult>;
|
|
454
|
+
/** Up to `limit` (1–5, default 3) teammates on one of your links, online first. Member token. */
|
|
455
|
+
listLinkMembers(chatLinkId: string, limit?: number): Promise<LinkMemberSuggestions>;
|
|
456
|
+
/** Public (no auth): business hours state for a launcher's "we're away" line. */
|
|
457
|
+
getLinkAvailability(linkCode: string): Promise<LinkAvailability>;
|
|
458
|
+
/** Share a verified gift you paid for in this conversation (once per `reference`). Member token. */
|
|
459
|
+
announceGift(conversationId: string, reference: string, note?: string): Promise<GiftAnnounceResult>;
|
|
460
|
+
/** Business account's signed-in devices. Owner token. */
|
|
461
|
+
listAccountSessions(): Promise<AuthSessionList>;
|
|
462
|
+
/** Sign out one business device (400 for the calling session, 404 if not yours). Owner token. */
|
|
463
|
+
revokeAccountSession(sessionId: string): Promise<AuthSessionRevokeResult>;
|
|
464
|
+
/** Sign out every business device except this one. Owner token. */
|
|
465
|
+
revokeOtherAccountSessions(): Promise<AuthSessionRevokeResult>;
|
|
466
|
+
/** Chat user's signed-in devices. Member token. */
|
|
467
|
+
listMySessions(): Promise<AuthSessionList>;
|
|
468
|
+
/** Sign out one chat-user device (400 for the calling session, 404 if not yours). Member token. */
|
|
469
|
+
revokeMySession(sessionId: string): Promise<AuthSessionRevokeResult>;
|
|
470
|
+
/** Sign out every chat-user device except this one. Member token. */
|
|
471
|
+
revokeMyOtherSessions(): Promise<AuthSessionRevokeResult>;
|
|
472
|
+
/** Business account quiet hours (a chat token gets 400). Owner token. */
|
|
473
|
+
getAccountQuietHours(): Promise<QuietHours>;
|
|
474
|
+
/** Save business quiet hours; also silences the chat identity with the same e-mail. Owner token. */
|
|
475
|
+
setAccountQuietHours(payload: UpdateQuietHoursPayload): Promise<QuietHours>;
|
|
476
|
+
/** Send one of your scheduled messages now (delivered within a minute); 400 if already sent. Member token. */
|
|
477
|
+
sendScheduledMessageNow(messageId: string): Promise<ScheduledSendNowResult>;
|
|
478
|
+
/** "Live now · N online" for a link's join card. Public, 60/min, cached 60 s. */
|
|
479
|
+
getLinkOnlineCount(linkCode: string): Promise<LinkOnlineCount>;
|
|
480
|
+
/** One-step guest join: name + optional email, same session as join-new. 400 `LINK_FULL` / `ACCOUNT_EXISTS`. Public.
|
|
481
|
+
* With `meetingCode` (email required) a returning guest gets `{ verifyRequired }` and an emailed code instead. */
|
|
482
|
+
joinLinkAsGuest(linkCode: string, payload: JoinLinkAsGuestPayload): Promise<LinkJoinSession | MeetingGuestCodeSent>;
|
|
483
|
+
/** Returning meeting guest: the emailed 6-digit code signs them back into their guest profile. Public. */
|
|
484
|
+
verifyMeetingGuest(linkCode: string, payload: {
|
|
485
|
+
email: string;
|
|
486
|
+
code: string;
|
|
487
|
+
meetingCode: string;
|
|
488
|
+
}): Promise<LinkJoinSession>;
|
|
489
|
+
/** Paused link: email `email` once when the owner turns it back on (400 if not paused). Public, 5/min. */
|
|
490
|
+
notifyWhenLinkReopens(linkCode: string, email: string): Promise<LinkReopenWatchResult>;
|
|
491
|
+
/** Status page "Subscribe to updates": one email per incident open / status change. Public, 5/min. */
|
|
492
|
+
subscribeToStatusUpdates(email: string): Promise<StatusSubscribeResult>;
|
|
493
|
+
/** Undo it with the signed `token` from the email's unsubscribe link (400 if invalid). Public. */
|
|
494
|
+
unsubscribeFromStatusUpdates(email: string, token: string): Promise<StatusUnsubscribeResult>;
|
|
495
|
+
/** Webinar landing data (schedule, state, seats, host); 404 when not a webinar. Public. */
|
|
496
|
+
getWebinarInfo(conversationId: string): Promise<WebinarPublicInfo>;
|
|
497
|
+
/** Register without logging in; `waitlist: true` joins the waitlist when full (else 400). Public. */
|
|
498
|
+
registerForWebinar(conversationId: string, payload: RegisterWebinarPayload): Promise<WebinarRegisterResult>;
|
|
499
|
+
/** Email a 6-digit code (10 min, single use). Always the same answer, so it can't probe accounts. Public. */
|
|
500
|
+
requestBusinessSignInCode(email: string): Promise<SignInCodeRequestResult>;
|
|
501
|
+
/** Exchange the code for a session; tokens are also set as the owner token. 5 wrong tries lock the code. */
|
|
502
|
+
verifyBusinessSignInCode(email: string, code: string): Promise<BusinessLoginResult>;
|
|
503
|
+
/** Finish a login that returned `require2fa` with the authenticator-app code. Public. */
|
|
504
|
+
verifyBusinessTotp(pendingToken: string, code: string): Promise<BusinessSessionTokens>;
|
|
505
|
+
/** Your links (`GET /chats/links`); `chatLinkExpiringDays: '7'` = the Expiring lane. Owner token (chat tokens get 403). */
|
|
506
|
+
listAccountChatLinks(query?: ChatLinkQuery): Promise<PaginatedResult<AccountChatLink>>;
|
|
507
|
+
/** Business profile + preferences (notifyTopics, language, translateIncomingTo, soundPreferences). Owner token. */
|
|
508
|
+
updateAccountProfile(payload: UpdateAccountProfilePayload): Promise<AccountProfile>;
|
|
509
|
+
/** Named teams ("Refunds", "Billing") used by inbox routing and ASSIGN_TEAM. Owner token. */
|
|
510
|
+
listWorkspaceTeams(): Promise<WorkspaceTeamList>;
|
|
511
|
+
/** Owner or ADMIN teammate; 400 for a chat-user token. */
|
|
512
|
+
createWorkspaceTeam(payload: CreateWorkspaceTeamPayload): Promise<WorkspaceTeamView>;
|
|
513
|
+
/** `memberIds` replaces the members; `chatLinkId: null` clears the link scope. Owner token. */
|
|
514
|
+
updateWorkspaceTeam(teamId: string, payload: UpdateWorkspaceTeamPayload): Promise<WorkspaceTeamView>;
|
|
515
|
+
deleteWorkspaceTeam(teamId: string): Promise<WorkspaceTeamDeleteResult>;
|
|
516
|
+
/** Invite a teammate by email; AGENTs can be limited to `answerLinks`. Owner token. */
|
|
517
|
+
inviteTeamMember(payload: InviteTeamMemberPayload): Promise<TeamInviteResult>;
|
|
518
|
+
/** Add someone to one of your links; new accounts get a set-password email. Owner token. */
|
|
519
|
+
inviteChatUser(payload: InviteChatUserPayload): Promise<InviteChatUserResult>;
|
|
520
|
+
/** Follower counts and your relation to `memberId` inside a link. */
|
|
521
|
+
getMemberFollowStatus(linkId: string, memberId: string): Promise<MemberFollowStatus>;
|
|
522
|
+
/** Follow a member of the same link; their FOLLOWERS posts then reach you. */
|
|
523
|
+
followMember(linkId: string, memberId: string): Promise<MemberFollowStatus>;
|
|
524
|
+
unfollowMember(linkId: string, memberId: string): Promise<MemberFollowStatus>;
|
|
525
|
+
/** Which calendars the workspace offers and which ones you connected. `enabled: false` when the server has no calendar keys. */
|
|
526
|
+
getCalendarSyncStatus(): Promise<CalendarSyncStatus>;
|
|
527
|
+
/** Start connecting a calendar: open the returned `authUrl`. Native apps pass `native: true`. 400 for an unknown provider, 429 after 6 starts in 10 min. */
|
|
528
|
+
connectCalendar(provider: CalendarProviderId, payload?: CalendarConnectPayload): Promise<CalendarConnectResult>;
|
|
529
|
+
/** Native apps: redeem the one-time `code` from `livechatta://calendar-sync/done?code=`. 400 `CALENDAR_ACCOUNT_MISMATCH` or `CALENDAR_SIGNIN_EXPIRED`. */
|
|
530
|
+
completeNativeCalendarConnect(code: string): Promise<CalendarOkResult>;
|
|
531
|
+
/** Disconnect and take your upcoming synced events off that calendar; repeating it is safe. */
|
|
532
|
+
disconnectCalendar(provider: CalendarProviderId): Promise<CalendarOkResult>;
|
|
533
|
+
/** Show your busy times (never titles) to members who share a conversation with you. Off until you turn it on. */
|
|
534
|
+
setCalendarShareBusy(provider: CalendarProviderId, shareBusy: boolean): Promise<CalendarOkResult>;
|
|
535
|
+
/** Sync your active calendars now (202). 429 after 4 a minute. */
|
|
536
|
+
syncCalendarNow(): Promise<CalendarSyncQueued>;
|
|
537
|
+
/** Busy blocks of up to 20 members who share a conversation with you and chose to share; `from` to `to` is at most 14 days. */
|
|
538
|
+
getCalendarBusy(query: CalendarBusyQuery): Promise<CalendarBusy>;
|
|
539
|
+
/** Mentions of you and reactions to your messages, newest first. Page with `prevCursor` (older) from the result. */
|
|
540
|
+
listActivity(query?: ActivityQuery): Promise<PaginatedResult<ActivityNotification>>;
|
|
541
|
+
getActivityUnreadCount(): Promise<ActivityUnreadCount>;
|
|
542
|
+
/** Mark every mention and reaction read. */
|
|
543
|
+
markAllActivityRead(): Promise<SuccessResponse>;
|
|
544
|
+
/** Your own category names for the sidebar (one link when `chatLinkId` is given). */
|
|
545
|
+
getSidebarCategories(chatLinkId?: string): Promise<SidebarCategories>;
|
|
546
|
+
/** Put a conversation in one of your categories (up to 40 characters); an empty string takes it out. */
|
|
547
|
+
setConversationCategory(conversationId: string, category: string): Promise<ConversationCategoryResult>;
|
|
548
|
+
/** Rename a category; its conversations follow. 400 when `from` is missing or `to` is already used. */
|
|
549
|
+
renameSidebarCategory(payload: RenameSidebarCategoryPayload): Promise<SidebarCategories>;
|
|
550
|
+
/** Delete a category; its conversations go back to Channels, Groups and People. */
|
|
551
|
+
deleteSidebarCategory(name: string, chatLinkId?: string): Promise<SidebarCategories>;
|
|
552
|
+
/**
|
|
553
|
+
* Send the inline Reply typed on a chat notification; use the returned token for a follow-up.
|
|
554
|
+
* `deviceHint` ('ios-app' | 'android-app') sets the message's `sentFrom`; the server checks it against the request's user agent.
|
|
555
|
+
*/
|
|
556
|
+
sendPushReply(token: string, message: string, deviceHint?: 'ios-app' | 'android-app'): Promise<PushReplyResult>;
|
|
557
|
+
/** Redeem the `?guest=` pass from a meeting invite email (single use, bound to you). */
|
|
558
|
+
redeemMeetingGuestPass(code: string, token: string): Promise<HopMeetingJoinResult>;
|
|
559
|
+
/** Plain `/hop/{code}` meeting link (no invite): join the meeting; the host admits you from the lobby. */
|
|
560
|
+
joinMeetingByLink(code: string): Promise<HopMeetingJoinResult>;
|
|
561
|
+
/** "Join" on a HOP_MEETING card: adds a member of the card's channel to the meeting. */
|
|
562
|
+
joinMeetingFromChannel(meetingConversationId: string): Promise<HopMeetingJoinResult>;
|
|
563
|
+
/** Public: email a registrant their personal "Watch recording" link (always `{ sent: true }`). */
|
|
564
|
+
requestWebinarRecordingLink(conversationId: string, email: string): Promise<WebinarRecordingLinkResult>;
|
|
565
|
+
/**
|
|
566
|
+
* Public: playback list for the signed `token` from that email (403 invalid / not registered).
|
|
567
|
+
* Sends it as `X-Recording-Token`, never in the URL; needs chatta development after that fix. */
|
|
568
|
+
getWebinarRecording(conversationId: string, token: string): Promise<WebinarRecordingsView>;
|
|
569
|
+
/** The same recordings for the webinar's owner. Owner token. */
|
|
570
|
+
getWebinarRecordingsAsOwner(conversationId: string): Promise<WebinarRecordingsView>;
|
|
571
|
+
/** Active catalog items (e.g. Coffee 300, Confetti 100). Member or owner token. */
|
|
572
|
+
getGiftCatalog(): Promise<GiftCatalogItem[]>;
|
|
573
|
+
/** Start a gift to another member of a conversation; open `authorizationUrl`, then verify. */
|
|
574
|
+
sendPeerGift(payload: SendPeerGiftPayload): Promise<PeerGiftCheckout>;
|
|
575
|
+
/** Public, idempotent: settle after checkout; 'pending' means try again shortly. */
|
|
576
|
+
verifyPeerGift(reference: string): Promise<PeerGiftVerifyResult>;
|
|
577
|
+
/** Gifts you received, newest first, with your balance and any open payout. */
|
|
578
|
+
listReceivedGifts(query?: GiftsReceivedQuery): Promise<GiftsReceivedPage>;
|
|
579
|
+
/** Paid gifts in your links with platform fee and net, plus totals (`limit` ≤ 20). Owner token; members get 403. */
|
|
580
|
+
getOwnerGifts(query?: CursorPageQuery): Promise<OwnerGiftsPage>;
|
|
581
|
+
getGiftBalance(): Promise<PayeeBalanceView>;
|
|
582
|
+
/** Ask for your available balance to be paid out (minimum 1000 = 10 FlexCoin). */
|
|
583
|
+
requestGiftPayout(): Promise<GiftPayoutResult>;
|
|
584
|
+
/** Business or admin account: email a reset link + code. Same answer whether or not it exists. */
|
|
585
|
+
requestBusinessPasswordReset(identifier: string): Promise<ForgotPasswordResult>;
|
|
586
|
+
/** Business / admin codes only; signs out every session of the account. 400 for a bad or used code. */
|
|
587
|
+
resetBusinessPassword(payload: ResetPasswordPayload): Promise<ResetPasswordResult>;
|
|
588
|
+
/** Is a reset code still usable (any door)? `{ state, audience?, purpose?, linkCode?, email? }`. */
|
|
589
|
+
getPasswordResetStatus(token: string): Promise<ResetTokenStatus>;
|
|
590
|
+
/** Chat user of one chat space; `chatLinkCode` is required (without it nothing is sent). */
|
|
591
|
+
requestChatPasswordReset(payload: ForgotPasswordPayload): Promise<ForgotPasswordResult>;
|
|
592
|
+
/** Chat codes only; signs out that chat user's sessions. */
|
|
593
|
+
resetChatPassword(payload: ResetPasswordPayload): Promise<ResetPasswordResult>;
|
|
594
|
+
/** The chat page's door: same as `requestChatPasswordReset`, link from the path (5/min per IP). */
|
|
595
|
+
requestLinkPasswordReset(linkCode: string, identifier: string): Promise<ForgotPasswordResult>;
|
|
596
|
+
/** Reset with a code that belongs to a member of this link's owner. */
|
|
597
|
+
resetLinkPassword(linkCode: string, payload: ResetPasswordPayload): Promise<ResetPasswordResult>;
|
|
598
|
+
/** Re-apply a link's mode preset (link type, join rules, discovery, inbox). Owner token. */
|
|
599
|
+
setLinkMode(linkId: string, payload: SetLinkModePayload): Promise<LinkModeChangeResult>;
|
|
600
|
+
/** Re-apply a conversation's mode preset; conversation admin (member token) or the owner. */
|
|
601
|
+
setConversationMode(conversationId: string, payload: {
|
|
602
|
+
mode: ConversationMode;
|
|
603
|
+
}): Promise<ConversationPermissionsPublic>;
|
|
604
|
+
/** Public link card (`GET /in/:code`) with `mode` and `joinPolicy`, before showing a join form. */
|
|
605
|
+
getPublicLinkInfo(linkCode: string): Promise<PublicLinkInfo>;
|
|
606
|
+
/** Create a link from the owner console (`POST chats/links`); honours `modeOptions`. Owner or admin teammate. */
|
|
607
|
+
createAccountChatLink(payload: CreateChatLinkPayload): Promise<CreatedChatLink>;
|
|
608
|
+
/** Public join-card channel preview: member / online counts and ≤ 12 public channels. */
|
|
609
|
+
getLinkChannels(linkCode: string): Promise<LinkChannelPreview>;
|
|
610
|
+
/** Public gift store: public plans, add-ons and `currentPlanId` (never the owner's subscription). */
|
|
611
|
+
getGiftStoreData(linkCode: string): Promise<PublicGiftStoreData>;
|
|
612
|
+
/** Change single join rules; returns the resolved policy. Business console token (chat tokens get 403). */
|
|
613
|
+
setLinkJoinPolicy(linkId: string, payload: SetJoinPolicyPayload): Promise<JoinPolicy>;
|
|
614
|
+
/** Public Ask to join (5 per minute). 403 `APPROVAL_OFF` when the link doesn't take requests. */
|
|
615
|
+
requestToJoinLink(linkCode: string, payload: JoinRequestPayload): Promise<JoinRequestPublicResult>;
|
|
616
|
+
/** Staff review list (pending by default), newest first. Business console token. */
|
|
617
|
+
listJoinRequests(linkId: string, query?: JoinRequestListQuery): Promise<JoinRequestPage>;
|
|
618
|
+
/** Approve (pending or denied → approved); the requester is emailed. Business console token. */
|
|
619
|
+
approveJoinRequest(linkId: string, requestId: string): Promise<JoinRequestView>;
|
|
620
|
+
/** Deny a pending request; the requester is emailed. Business console token. */
|
|
621
|
+
denyJoinRequest(linkId: string, requestId: string): Promise<JoinRequestView>;
|
|
622
|
+
/** The named team a support group's join-card topic routes to. Member token of a group admin (staff). */
|
|
623
|
+
getSupportGroupTeam(conversationId: string): Promise<SupportGroupTeamView>;
|
|
624
|
+
/** Route the support group to a team (round-robin), or `null` to stop. Member token of a group admin. */
|
|
625
|
+
setSupportGroupTeam(conversationId: string, teamId: string | null): Promise<SupportGroupTeamView>;
|
|
626
|
+
/** Native app origins that may frame this link's app embed (up to 10: `capacitor://localhost`, `ionic://localhost`, `app://name`, `https://localhost`); an empty list allows none. Owner token. */
|
|
627
|
+
setLinkAppOrigins(linkId: string, origins: string[]): Promise<LinkAppOriginsResult>;
|
|
628
|
+
/** Websites allowed to frame the link's embed chat (≤ 20 origins or domains; `[]` = any site). Owner token. */
|
|
629
|
+
setLinkEmbedDomains(linkId: string, domains: string[]): Promise<EmbedDomainsResult>;
|
|
630
|
+
/** Public tiers; with an owner token set, also your own CUSTOM plan once chatta reads it here. */
|
|
631
|
+
listPlans(): Promise<Plan[]>;
|
|
632
|
+
/** One plan; 404 (`planAccessError` → 'not-found') for hidden, template or another client's plans. */
|
|
633
|
+
getPlan(planId: string): Promise<Plan>;
|
|
634
|
+
/** Start a checkout. 400 'not-available' / 'team-activated' from the plan-access guard. Owner token. */
|
|
635
|
+
subscribeToPlan(payload: SubscribePayload): Promise<PaymentCheckout>;
|
|
636
|
+
/** Public, after checkout: activates the subscription, or `{ status: 'pending' }` for bank transfers. */
|
|
637
|
+
verifySubscription(reference: string): Promise<PlanSubscription | PaymentPendingResult>;
|
|
638
|
+
/** Active subscriptions with the plan populated. Owner token. */
|
|
639
|
+
listMySubscriptions(): Promise<PlanSubscription[]>;
|
|
640
|
+
/** Upgrade (prorated checkout) or schedule a public-tier downgrade. Same plan-access errors. Owner token. */
|
|
641
|
+
changePlan(subscriptionId: string, payload: ChangePlanPayload): Promise<PlanChangeResult>;
|
|
642
|
+
/** Cancel an active subscription. Owner token. */
|
|
643
|
+
cancelSubscription(subscriptionId: string): Promise<PlanSubscription>;
|
|
644
|
+
/** Drop a scheduled downgrade. Owner token. */
|
|
645
|
+
cancelScheduledPlanChange(subscriptionId: string): Promise<PlanSubscription>;
|
|
646
|
+
/** Member (or owner) pays for a plan for the workspace; same plan-access errors as subscribe. */
|
|
647
|
+
giftPlan(payload: GiftPlanPayload): Promise<PaymentCheckout>;
|
|
648
|
+
/** Public, after a plan-gift checkout. */
|
|
649
|
+
verifyPlanGift(reference: string): Promise<PlanSubscription | PaymentPendingResult>;
|
|
650
|
+
/** Free trial status: `{ eligible, trial }`. Owner token. */
|
|
651
|
+
getTrialStatus(): Promise<TrialStatus>;
|
|
652
|
+
/** Start the plan's free trial (`Plan.trialDays` > 0; one per account, no active plan). No card needed. Owner token. */
|
|
653
|
+
startTrial(payload: StartTrialPayload): Promise<TrialStartResult>;
|
|
654
|
+
/** Where a bank-transfer or paused plan stands: `{ renewal: null | { state, daysLeft, amountUsd, … } }`. Owner token. */
|
|
655
|
+
getRenewalStatus(): Promise<RenewalStatus>;
|
|
656
|
+
/** Pay the next period (due within 7 days, PAST_DUE, or any time in a trial); 400 "Nothing is due yet". Owner token. */
|
|
657
|
+
renewSubscription(subscriptionId: string, payload?: {
|
|
658
|
+
paymentMethod?: PaymentChannel;
|
|
659
|
+
}): Promise<RenewalCheckout>;
|
|
660
|
+
/** Stop auto-charging the card: every active plan renews by bank transfer. Owner token. */
|
|
661
|
+
useBankTransferRenewals(): Promise<PaymentChannelResult>;
|
|
662
|
+
/** This month's uploads against the allowance; teammates and chat users resolve to their owner. Member or owner token. */
|
|
663
|
+
getStorageUsage(): Promise<StorageUsage>;
|
|
664
|
+
/** LiveChatta staff access log (view / act sessions), newest first. Owner or team admin; members get 403. */
|
|
665
|
+
listStaffAccess(query?: CursorPageQuery): Promise<StaffAccessPage>;
|
|
666
|
+
/** Public "Request a custom plan" (rate-limited per IP, 429). A repeat within 10 min returns the open one. */
|
|
667
|
+
requestCustomPlan(payload: CustomPlanRequestPayload): Promise<CustomPlanRequestStatusView>;
|
|
668
|
+
/** The same, linked to your business so you can follow it. Owner token; chat users get 400. */
|
|
669
|
+
requestCustomPlanAsOwner(payload: CustomPlanRequestPayload): Promise<CustomPlanRequestStatusView>;
|
|
670
|
+
/** Your newest request and its status, or `{ request: null }`. Owner token. */
|
|
671
|
+
getMyLatestPlanRequest(): Promise<LatestPlanRequest>;
|
|
672
|
+
/** Public: active add-ons and AI credit packs with per-day prices (no API key needed). */
|
|
673
|
+
listStoreFeatures(): Promise<StoreFeature[]>;
|
|
674
|
+
/** Buy an add-on for your workspace (needs an active plan, 400 otherwise). Owner token. */
|
|
675
|
+
purchaseFeature(payload: PurchaseFeaturePayload): Promise<PaymentCheckout>;
|
|
676
|
+
/** Public, after a feature checkout; 400 when already verified. */
|
|
677
|
+
verifyFeaturePurchase(reference: string): Promise<MyFeaturePurchase | PaymentPendingResult | null>;
|
|
678
|
+
/** The workspace's purchases, active and expired, newest first (≤ 100). Member or owner token. */
|
|
679
|
+
listMyFeaturePurchases(): Promise<MyFeaturePurchase[]>;
|
|
680
|
+
/** A member gifts an add-on to the workspace they chat in (the owner needs an active plan). */
|
|
681
|
+
giftWorkspaceFeature(payload: PurchaseFeaturePayload): Promise<PaymentCheckout>;
|
|
682
|
+
/** Public, after a feature-gift checkout. */
|
|
683
|
+
verifyWorkspaceFeatureGift(reference: string): Promise<MyFeaturePurchase | PaymentPendingResult | null>;
|
|
684
|
+
/** Is this custom link address free? Same rules as create: 3–40 chars, reserved words, taken. Owner token. */
|
|
685
|
+
checkLinkCode(code: string): Promise<LinkCodeCheck>;
|
|
686
|
+
/** Link and conversation mode templates as data (New link cards, switches, copy). Owner token. */
|
|
687
|
+
getLinkModeCatalog(): Promise<ModeCatalog>;
|
|
688
|
+
/** Replace a link's theme; `primaryColor` and `secondaryColor` are required, images may be `data:` URIs. Owner token. */
|
|
689
|
+
updateLinkTheme(linkId: string, theme: ChatLinkThemePayload): Promise<AccountChatLink>;
|
|
690
|
+
/** Settings › Access: guest, signed-in members, or invite only. Owner token. */
|
|
691
|
+
setLinkWhoCanJoin(linkId: string, who: LinkWhoCanJoin): Promise<LinkWhoCanJoinResult>;
|
|
692
|
+
/** The link's custom domain and whether its CNAME checks out (white-label plans). Owner token. */
|
|
693
|
+
getLinkCustomDomain(linkId: string): Promise<LinkCustomDomainView>;
|
|
694
|
+
/** Save the domain (host name only) and check it; an empty string removes it. Owner token. */
|
|
695
|
+
setLinkCustomDomain(linkId: string, domain: string): Promise<LinkCustomDomainView>;
|
|
696
|
+
/** Check the domain's CNAME again. Owner token. */
|
|
697
|
+
verifyLinkCustomDomain(linkId: string): Promise<LinkCustomDomainView>;
|
|
698
|
+
/** Delete every message on the link; the link and its conversations stay. Never retried. Owner token. */
|
|
699
|
+
wipeLinkMessages(linkId: string): Promise<WipeLinkMessagesResult>;
|
|
700
|
+
/** Link Overview cards: visitors, conversations, first reply, members (30 day windows, cached 5 min). Owner token. */
|
|
701
|
+
getLinkOverview(linkId: string): Promise<ChatLinkOverviewStats>;
|
|
702
|
+
/** API key: the mode catalog (`GET external/chat-links/modes`). */
|
|
703
|
+
getChatLinkModeCatalog(): Promise<ModeCatalog>;
|
|
704
|
+
/** API key: re-apply a link's mode preset (`PATCH external/chat-links/:linkId/mode`). */
|
|
705
|
+
setChatLinkMode(linkId: string, payload: SetLinkModePayload): Promise<LinkModeChangeResult>;
|
|
706
|
+
/** Your private note on a conversation (empty text when none). Member token. */
|
|
707
|
+
getMyNote(conversationId: string): Promise<PersonalNote>;
|
|
708
|
+
/** Save your note (≤ 2000 chars); empty text clears it. Member token. */
|
|
709
|
+
setMyNote(conversationId: string, text: string): Promise<PersonalNote>;
|
|
710
|
+
/** Pin or unpin a conversation for yourself (needs the plan's pin feature, else 403). Member token. */
|
|
711
|
+
setConversationPinned(conversationId: string, pinned: boolean): Promise<ConversationPinResult>;
|
|
712
|
+
/** People you starred, newest first, 20 per page with an offset cursor. Member token. */
|
|
713
|
+
listStarredPeople(query?: StarredPeopleQuery): Promise<StarredPeoplePage>;
|
|
714
|
+
/** Ids of everyone you starred, to mark stars in lists. Member token. */
|
|
715
|
+
listStarredIds(): Promise<StarredIdsResult>;
|
|
716
|
+
/** Star a person on your link. Member token. */
|
|
717
|
+
starPerson(memberId: string): Promise<StarToggleResult>;
|
|
718
|
+
/** Remove a star. Member token. */
|
|
719
|
+
unstarPerson(memberId: string): Promise<StarToggleResult>;
|
|
720
|
+
/** The business account with preferences and evaluated `flags`. Owner token. */
|
|
721
|
+
getAccountProfile(): Promise<AccountProfile>;
|
|
722
|
+
/** LiveChatta staff: the flags the server reads, with defaults. Set a staff token with `setOwnerToken`; owners get 403. */
|
|
723
|
+
getKnownFeatureFlags(): Promise<FlagRegistryEntry[]>;
|
|
724
|
+
/** Plan changes and extra seats paid by bank transfer that Paystack has not settled yet. Owner token. */
|
|
725
|
+
listPendingTransfers(): Promise<PendingTransfersResult>;
|
|
726
|
+
/** Buy extra seats pro-rated to the period end; a saved card is charged at once, a transfer opens a checkout. Never retried. */
|
|
727
|
+
purchaseExtraSeats(payload: PurchaseExtraSeatsPayload): Promise<ExtraSeatsResult>;
|
|
728
|
+
/** Public, after an extra-seats checkout (`SEAT-` reference); safe to call alongside the webhook. */
|
|
729
|
+
verifyExtraSeats(reference: string): Promise<{
|
|
730
|
+
status: string;
|
|
731
|
+
}>;
|
|
732
|
+
/** Charge a storage pack with each plan renewal (card) or add it to the invoice (transfer); off lets it lapse. Owner token. */
|
|
733
|
+
setStorageAddonAutoRenew(purchaseId: string, autoRenew: boolean): Promise<StorageAddonView>;
|
|
734
|
+
/** Create a key; `allowedOrigins` limits it to browsers on those sites (others get 403, sockets `connect_error`). Owner token. */
|
|
735
|
+
createApiKey(payload: CreateApiKeyPayload): Promise<ApiKeyView>;
|
|
736
|
+
/** Your keys; query: nextCursor?, prevCursor?, limit?, apiKeySearch?, apiKeyByStatuses?, dateRange?. Owner token. */
|
|
737
|
+
listApiKeys(query?: ChatLinkQuery): Promise<PaginatedResult<ApiKeyView>>;
|
|
738
|
+
/** Rename a key or replace its `allowedOrigins` (`[]` = any site). Owner token. */
|
|
739
|
+
updateApiKey(keyId: string, payload: UpdateApiKeyPayload): Promise<ApiKeyView>;
|
|
740
|
+
/** A new key with the same name and sites; the old one is revoked after. The new secret is shown once. Never retried. */
|
|
741
|
+
rotateApiKey(keyId: string): Promise<ApiKeyView>;
|
|
742
|
+
/** Stops the key at once; it can't be turned back on. */
|
|
743
|
+
revokeApiKey(keyId: string): Promise<ApiKeyView>;
|
|
744
|
+
/** Requests and errors per day for the last 7, 30 or 90 days. */
|
|
745
|
+
getApiKeyUsage(keyId: string, period?: ApiKeyUsagePeriod): Promise<ApiKeyUsage>;
|
|
746
|
+
/** Balance, masked payout details, withdrawal limits, hold and freeze state. */
|
|
747
|
+
getLiveFlex(): Promise<LiveFlexView>;
|
|
748
|
+
/** The money log, newest first; query: cursor?, limit?, kind? (all | fund | withdraw | transfer_in | …). */
|
|
749
|
+
listLiveFlexTransactions(query?: LiveFlexTransactionQuery): Promise<LiveFlexTransactionPage>;
|
|
750
|
+
/** Buy FlexCoin (1–10,000; 1.5% fee capped at 2 FlexCoin on top). Open `authorizationUrl`, then `verifyLiveFlexFunding`. Never retried. */
|
|
751
|
+
fundLiveFlex(payload: LiveFlexFundPayload): Promise<LiveFlexFundStart>;
|
|
752
|
+
/** Check a top-up after checkout (webhooks also settle it). */
|
|
753
|
+
verifyLiveFlexFunding(reference: string): Promise<LiveFlexFundVerify>;
|
|
754
|
+
/** People in your workspace you can send to (name or @handle search). */
|
|
755
|
+
listLiveFlexRecipients(q?: string): Promise<LiveFlexRecipient[]>;
|
|
756
|
+
/** Banks for bank payouts (Paystack list). */
|
|
757
|
+
listLiveFlexBanks(): Promise<LiveFlexBank[]>;
|
|
758
|
+
/** Start a bank payout change: the account is name-checked and a 6-digit code is emailed. Never retried. */
|
|
759
|
+
setLiveFlexPayoutBank(payload: LiveFlexPayoutBankPayload): Promise<LiveFlexPayoutPending>;
|
|
760
|
+
/** Start a crypto payout change (USDT, USDC, BTC, ETH; address checked per network); a code is emailed. Never retried. */
|
|
761
|
+
setLiveFlexPayoutCrypto(payload: LiveFlexPayoutCryptoPayload): Promise<LiveFlexPayoutPending>;
|
|
762
|
+
/** Finish a payout change with the emailed code (5 tries, 15 min). Withdrawals then wait out the hold. */
|
|
763
|
+
confirmLiveFlexPayout(code: string): Promise<LiveFlexView>;
|
|
764
|
+
/** Remove the saved bank account or crypto address. */
|
|
765
|
+
clearLiveFlexPayout(which: 'bank' | 'crypto'): Promise<LiveFlexView>;
|
|
766
|
+
/** Cash out FlexCoin to the saved bank or crypto address (10 FlexCoin minimum; admin caps apply). Never retried. */
|
|
767
|
+
withdrawLiveFlex(payload: LiveFlexWithdrawPayload): Promise<LiveFlexPayoutResult | LiveFlexApprovalWaiting>;
|
|
768
|
+
/** Free send inside your workspace. Never retried; pass `idempotencyKey` so your own retry can't send twice. */
|
|
769
|
+
sendLiveFlex(payload: LiveFlexSendPayload): Promise<LiveFlexSendResult | LiveFlexApprovalWaiting>;
|
|
770
|
+
/** Emails a 6-digit code to set or change the LiveFlex PIN. Never retried. */
|
|
771
|
+
startLiveFlexPinSetup(): Promise<{
|
|
772
|
+
sentTo: string;
|
|
773
|
+
}>;
|
|
774
|
+
/** Sets the 4–6 digit PIN with the emailed code. Pass `pin` on `sendLiveFlex` / `withdrawLiveFlex` over `pinOverMinor`. */
|
|
775
|
+
setLiveFlexPin(payload: {
|
|
776
|
+
code: string;
|
|
777
|
+
pin: string;
|
|
778
|
+
}): Promise<{
|
|
779
|
+
pinSet: true;
|
|
780
|
+
}>;
|
|
781
|
+
/** 1.6.0: emails a code to link this workspace's LiveFlex into the person's one LiveFlex. Never retried. */
|
|
782
|
+
startLiveFlexLink(): Promise<{
|
|
783
|
+
sentTo: string;
|
|
784
|
+
}>;
|
|
785
|
+
/** One way: any balance here moves into the person's LiveFlex, which then works in every linked workspace. */
|
|
786
|
+
linkLiveFlex(payload: {
|
|
787
|
+
code: string;
|
|
788
|
+
}): Promise<LiveFlexLinkResult>;
|
|
789
|
+
/** Opt-in global `$tag` (linked LiveFlex only); `''` turns it off. */
|
|
790
|
+
setLiveFlexTag(tag: string): Promise<{
|
|
791
|
+
tag: string | null;
|
|
792
|
+
}>;
|
|
793
|
+
/** Exact tag lookup (name only); then `sendLiveFlex({ toTag })`. */
|
|
794
|
+
findLiveFlexTag(tag: string): Promise<{
|
|
795
|
+
tag: string;
|
|
796
|
+
name: string;
|
|
797
|
+
}>;
|
|
798
|
+
/** Team admins' business sends waiting for the owner (24 h). Owner token. */
|
|
799
|
+
listLiveFlexApprovals(): Promise<{
|
|
800
|
+
results: LiveFlexTeamApproval[];
|
|
801
|
+
}>;
|
|
802
|
+
/** Approve (the money moves now) or decline. Single use; never retried. Owner token. */
|
|
803
|
+
decideLiveFlexApproval(approvalId: string, status: 'approved' | 'declined'): Promise<LiveFlexApprovalDecision>;
|
|
804
|
+
/** Approval threshold and daily cap for team admins. Owner or team admin token. */
|
|
805
|
+
getLiveFlexTeamLimits(): Promise<LiveFlexTeamLimits>;
|
|
806
|
+
/** Owner token. Cents; 0 turns one off; null goes back to LiveChatta's defaults (200 / 1,000 FlexCoin). */
|
|
807
|
+
setLiveFlexTeamLimits(payload: LiveFlexTeamLimitsPayload): Promise<LiveFlexTeamLimits>;
|
|
808
|
+
/** Ask a member (id or handle) or a `$tag` for money. Never takes money by itself. */
|
|
809
|
+
createLiveFlexRequest(payload: MoneyRequestCreatePayload): Promise<MoneyRequestCard>;
|
|
810
|
+
/** Requests asked of you (`incoming`, default) or made by you (`outgoing`). */
|
|
811
|
+
listLiveFlexRequests(box?: 'incoming' | 'outgoing'): Promise<{
|
|
812
|
+
results: MoneyRequestCard[];
|
|
813
|
+
}>;
|
|
814
|
+
getLiveFlexRequest(id: string): Promise<MoneyRequestCard>;
|
|
815
|
+
/** The payer pays a request from their own LiveFlex: PIN over the limit, holds and the first-payment code apply. */
|
|
816
|
+
payLiveFlexRequest(id: string, confirm?: MoneyConfirm): Promise<{
|
|
817
|
+
status: 'paid';
|
|
818
|
+
reference: string;
|
|
819
|
+
balanceMinor: number;
|
|
820
|
+
}>;
|
|
821
|
+
declineLiveFlexRequest(id: string): Promise<MoneyRequestCard>;
|
|
822
|
+
/** The payer stops requests from this person: a waiting one is declined and new ones are refused. Nothing moves. */
|
|
823
|
+
blockLiveFlexRequester(id: string): Promise<MoneyRequestCard>;
|
|
824
|
+
/** The requester withdraws a request that is still pending. */
|
|
825
|
+
cancelLiveFlexRequest(id: string): Promise<MoneyRequestCard>;
|
|
826
|
+
/** Split a bill: even by default (the remainder stays with you), or an `amountMinor` for every payer. */
|
|
827
|
+
createLiveFlexSplit(payload: MoneySplitCreatePayload): Promise<MoneySplitCard>;
|
|
828
|
+
getLiveFlexSplit(id: string): Promise<MoneySplitCard>;
|
|
829
|
+
/** Cancels the shares nobody has paid yet. */
|
|
830
|
+
cancelLiveFlexSplit(id: string): Promise<MoneySplitCard>;
|
|
831
|
+
/** Yours and ones aimed at you (read-only); the owner token lists the business's. */
|
|
832
|
+
listLiveFlexStanding(): Promise<{
|
|
833
|
+
results: MoneyStanding[];
|
|
834
|
+
}>;
|
|
835
|
+
/** Setting it up is the one confirmation for every run; the PIN applies to the schedule's total. */
|
|
836
|
+
createLiveFlexStanding(payload: MoneyStandingCreatePayload): Promise<MoneyStanding>;
|
|
837
|
+
pauseLiveFlexStanding(id: string): Promise<MoneyStanding>;
|
|
838
|
+
resumeLiveFlexStanding(id: string): Promise<MoneyStanding>;
|
|
839
|
+
cancelLiveFlexStanding(id: string): Promise<MoneyStanding>;
|
|
840
|
+
/** Start a group pot in a chat. Leave `amountMinor` out to let people choose theirs. */
|
|
841
|
+
createLiveFlexPot(payload: MoneyPotCreatePayload): Promise<MoneyPotCard>;
|
|
842
|
+
getLiveFlexPot(id: string): Promise<MoneyPotCard>;
|
|
843
|
+
/** Put money in: held for the pot, never in anyone's balance. `amountMinor` for any-amount pots only. */
|
|
844
|
+
contributeLiveFlexPot(id: string, payload?: MoneyConfirm & {
|
|
845
|
+
amountMinor?: number;
|
|
846
|
+
}): Promise<MoneyPotCard>;
|
|
847
|
+
/** Organizer only: pays the pot out to the organizer, once. */
|
|
848
|
+
closeLiveFlexPot(id: string): Promise<MoneyPotCard>;
|
|
849
|
+
/** Organizer only: refunds everyone in full. */
|
|
850
|
+
cancelLiveFlexPot(id: string): Promise<MoneyPotCard>;
|
|
851
|
+
/** Refund (part of) a payment you received, from the LiveFlex that received it. Never above the original. Pass `key` so a retry refunds once. */
|
|
852
|
+
refundLiveFlexTransaction(transactionId: string, payload?: MoneyRefundPayload): Promise<MoneyRefundResult | LiveFlexApprovalWaiting>;
|
|
853
|
+
/** Owner, team admin or inbox agent: post a checkout card in the customer's chat. */
|
|
854
|
+
createLiveFlexPayLink(payload: MoneyPayLinkCreatePayload): Promise<MoneyPayLinkCard>;
|
|
855
|
+
getLiveFlexPayLink(id: string): Promise<MoneyPayLinkCard>;
|
|
856
|
+
cancelLiveFlexPayLink(id: string): Promise<MoneyPayLinkCard>;
|
|
857
|
+
/** Customer: `method: 'wallet'` pays from LiveFlex; `'card'` returns a Paystack checkout for the exact amount on record. */
|
|
858
|
+
payLiveFlexPayLink(id: string, payload: MoneyPayLinkPayPayload): Promise<MoneyPayLinkPaid | MoneyPayLinkCheckout>;
|
|
859
|
+
/** After a card checkout (the Paystack webhook settles it too). Idempotent. */
|
|
860
|
+
verifyLiveFlexPayLink(reference: string): Promise<{
|
|
861
|
+
status: 'success' | 'pending' | 'ignored';
|
|
862
|
+
reference: string;
|
|
863
|
+
}>;
|
|
864
|
+
/** Signed 10-minute link to the receipt for a paid payment link (the customer who paid, or staff). */
|
|
865
|
+
getLiveFlexPayLinkReceiptLink(id: string): Promise<{
|
|
866
|
+
url: string;
|
|
867
|
+
}>;
|
|
868
|
+
/** Your latest finished payments as signed 10-minute receipt links (owner token for the business's). */
|
|
869
|
+
listLiveFlexReceipts(): Promise<{
|
|
870
|
+
results: MoneyReceiptLink[];
|
|
871
|
+
}>;
|
|
872
|
+
/** A signed 10-minute PDF link for one payment, by its reference. Only the two people in the payment. */
|
|
873
|
+
getLiveFlexReceiptLink(reference: string): Promise<MoneyReceiptLink>;
|
|
874
|
+
/** PDF and CSV links for a month (`YYYY-MM`). The owner token gets the business statement. */
|
|
875
|
+
getLiveFlexStatementLinks(month: string): Promise<MoneyStatementLinks>;
|
|
876
|
+
/** Whether LiveChatta support may open this account now, and until when. Owner token. */
|
|
877
|
+
getStaffAccessGrant(): Promise<StaffAccessGrantView>;
|
|
878
|
+
/** Let support in for 1, 24, 72 or 168 hours, view only or able to act. Owner token. */
|
|
879
|
+
setStaffAccessGrant(payload: StaffAccessGrantPayload): Promise<StaffAccessGrantView>;
|
|
880
|
+
/** Turn support access off; any open staff session ends. Owner token. */
|
|
881
|
+
revokeStaffAccessGrant(): Promise<StaffAccessGrantView>;
|
|
882
|
+
/** Owner or team admin: every platform sticker with its content check (a flag never hides it). */
|
|
883
|
+
listWorkspaceStickers(query?: WorkspaceStickerQuery): Promise<StickerPage>;
|
|
884
|
+
/** Block (hide in your workspace only) or allow a sticker again; sent messages keep it. */
|
|
885
|
+
setWorkspaceStickerState(stickerId: string, state: 'blocked' | 'allowed'): Promise<{
|
|
886
|
+
ok: true;
|
|
887
|
+
}>;
|
|
888
|
+
/** Take down a sticker one of your members uploaded (off the platform for everyone). */
|
|
889
|
+
takeDownSticker(stickerId: string): Promise<{
|
|
890
|
+
ok: true;
|
|
891
|
+
}>;
|
|
892
|
+
/** Calls tab: every ended call in your conversations, newest first, plus upcoming meetings on page 1. Member token. */
|
|
893
|
+
listCallHistory(query?: CallHistoryQuery): Promise<CallHistoryPage>;
|
|
894
|
+
/**
|
|
895
|
+
* A 10-minute signed MP4 download link for one call recording (member token, a member of its conversation).
|
|
896
|
+
* 403 `RECORDING_DOWNLOAD_OFF` unless the link's `allowRecordingDownload` is on. `url` is server-relative. */
|
|
897
|
+
getRecordingDownloadLink(messageId: string): Promise<RecordingDownloadLink>;
|
|
898
|
+
/** Public "Get in touch" form (`POST /public/contact`); 429 after 10 messages per hour from one network. Never retried. */
|
|
899
|
+
sendContactMessage(payload: ContactMessagePayload): Promise<ContactMessageResult>;
|
|
900
|
+
/** URL that starts "Continue with Google" (`GET /users/google/start`); open it in the browser. No request is made. */
|
|
901
|
+
googleSignInUrl(returnUrl?: string): string;
|
|
902
|
+
/** Finish Google sign-in with the `#google=<handoff>` the callback left in the login URL; tokens become the owner token. */
|
|
903
|
+
redeemGoogleSignIn(handoff: string): Promise<BusinessLoginResult>;
|
|
904
|
+
/** Whether GIFs are on, which providers answer, and the rating shown (business plans always get `g`). */
|
|
905
|
+
getGifConfig(): Promise<GifConfigView>;
|
|
906
|
+
/** Search GIFs. With no provider, a provider down, or no match, the LiveChatta default GIFs come back (`source: 'default'`). `source: 'livechatta'` always searches the pack and moves to the provider (`switched: true`) when nothing matches. 30 searches a minute for each member. */
|
|
907
|
+
searchGifs(query?: GifQuery): Promise<GifPage>;
|
|
908
|
+
/** Trending GIFs; the default pack when no provider is set. */
|
|
909
|
+
trendingGifs(query?: Pick<GifQuery, 'nextCursor' | 'source'>): Promise<GifPage>;
|
|
910
|
+
/** Tell the provider a GIF was sent (the analytics ping some providers require). Counted once per member and GIF a day. */
|
|
911
|
+
registerGifShare(payload: GifShareRef): Promise<GifShareResult>;
|
|
912
|
+
/** Report a GIF. One report per member and GIF; sending it again changes nothing. 20 an hour. */
|
|
913
|
+
reportGif(payload: ReportGifPayload): Promise<GifReportResult>;
|
|
914
|
+
/** Invite another workspace to one of your channels (owner or team admin). Without `partnerLinkCode` you get a single-use link; its token is in the response once. */
|
|
915
|
+
inviteSharedChannel(payload: InviteSharedChannelPayload): Promise<SharedChannelInviteResult>;
|
|
916
|
+
/** Shares of your workspace, live and ended in the last 30 days, newest first. Shared direct messages are left out. */
|
|
917
|
+
listSharedChannels(query: SharedChannelListQuery): Promise<SharedChannelPage>;
|
|
918
|
+
/** Look at an invite link before accepting; does not use it up. Owner or team admin of another workspace only. */
|
|
919
|
+
previewSharedChannelInvite(token: string): Promise<SharedChannelPreview>;
|
|
920
|
+
/** People of your workspace the admin can pick for a `PICKED` audience: display name and handle, no email or phone. */
|
|
921
|
+
listSharedChannelMembers(query: SharedChannelMembersQuery): Promise<SharedChannelMembersPage>;
|
|
922
|
+
/** The shares of one of your channels (host side; channel admin or workspace admin). */
|
|
923
|
+
getConversationSharedChannels(conversationId: string, query: SharedChannelScopeQuery): Promise<SharedChannelView[]>;
|
|
924
|
+
/** What your workspace may do in a shared channel and which members come from another workspace (`side: null` when it is not shared with you). */
|
|
925
|
+
getSharedChannelPermissions(conversationId: string, query: SharedChannelScopeQuery): Promise<SharedConversationPermissions>;
|
|
926
|
+
/** Accept an invite sent to your link code (partner owner or team admin). Works once: a second call is refused. */
|
|
927
|
+
acceptSharedChannel(sharedChannelId: string, payload: AcceptSharedChannelPayload): Promise<SharedChannelView>;
|
|
928
|
+
/** Accept a single-use invite link with its token. The token works once and lapses on its expiry. */
|
|
929
|
+
acceptSharedChannelByToken(payload: AcceptSharedChannelByTokenPayload): Promise<SharedChannelView>;
|
|
930
|
+
/** Host removes the partner, partner leaves, or either side cancels or declines a pending invite. Each side keeps its own history. */
|
|
931
|
+
endSharedChannel(sharedChannelId: string, query: SharedChannelScopeQuery): Promise<SharedChannelView>;
|
|
932
|
+
/** Partner owner or team admin changes who has the channel (same body as accepting). */
|
|
933
|
+
updateSharedChannelMembers(sharedChannelId: string, payload: AcceptSharedChannelPayload): Promise<SharedChannelView>;
|
|
934
|
+
/** Your workspace's activity log for one share. Each side reads only its own. */
|
|
935
|
+
getSharedChannelAudit(sharedChannelId: string, query: SharedChannelListQuery): Promise<SharedChannelAuditPage>;
|
|
936
|
+
/** Message a person of a partner workspace. Needs `allowSharedDms` on both links and an active shared channel you are both in; `{ internal: true }` for your own workspace. */
|
|
937
|
+
openSharedDirect(payload: OpenSharedDirectPayload): Promise<SharedDirectResult>;
|
|
938
|
+
/** Host only (workspace admin or channel admin): remove one partner member. They stay out when the same two workspaces share the channel again. */
|
|
939
|
+
removeSharedChannelMember(payload: RemoveSharedMemberPayload): Promise<SharedChannelView>;
|
|
940
|
+
/** Wipe a message for everyone. Workspace owners and admins; partner staff only for their own people's messages. */
|
|
941
|
+
removeSharedChannelMessage(payload: RemoveSharedMessagePayload): Promise<RemoveSharedMessageResult>;
|
|
942
|
+
/** Owner token: bind a verified teammate to the chat user that is theirs, so they count as workspace staff for shared channels. */
|
|
943
|
+
linkChatUserToAccount(payload: LinkChatUserToAccountPayload): Promise<LinkChatUserToAccountResult>;
|
|
944
|
+
}
|