@ethora/chat-component 26.10.7 → 26.10.9
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/README.md +88 -3
- package/dist/ChatProfileModal-BspGrTF_.js +2298 -0
- package/dist/{FilePreviewModal-DlOjnYzv.js → FilePreviewModal-DEb--AKO.js} +130 -130
- package/dist/{ManageDataModal-BZLGJZze.js → ManageDataModal-B3AvV0ZK.js} +14 -14
- package/dist/{MarkdownBody-CtArwCDa.js → MarkdownBody-M-Tzn12K.js} +1 -1
- package/dist/{MessageSearchModal-CcUnfZlU.js → MessageSearchModal-aeBm31-J.js} +32 -32
- package/dist/{PublicChatsModal-BWn0NXVo.js → PublicChatsModal-CSxFQNuC.js} +19 -19
- package/dist/{SideDrawer-CqZl9sxK.js → SideDrawer-DQc3Dz7-.js} +28 -28
- package/dist/{UserProfileModal-D0JZ3-uy.js → UserProfileModal-BwXpXfkw.js} +124 -120
- package/dist/{UserSettingsModal-OvykYDsT.js → UserSettingsModal-BxWFLCst.js} +2 -2
- package/dist/{VideoCallOverlay-DrvO2v_g.js → VideoCallOverlay-BO_2G3ys.js} +5908 -4168
- package/dist/{VisibilityModal-pOF9-UXR.js → VisibilityModal-WY5EkrT1.js} +7 -7
- package/dist/assets/icons.d.ts +4 -0
- package/dist/calls/callDisplay.d.ts +22 -0
- package/dist/calls/callMode.d.ts +105 -0
- package/dist/calls/openScheduledCall.d.ts +20 -0
- package/dist/calls/p2p/P2PCallController.d.ts +160 -0
- package/dist/calls/p2p/icePolicy.d.ts +36 -0
- package/dist/calls/p2p/negotiator.d.ts +56 -0
- package/dist/calls/p2p/p2pRuntime.d.ts +35 -0
- package/dist/calls/p2p/signalInbox.d.ts +34 -0
- package/dist/calls/p2p/signalStanza.d.ts +51 -0
- package/dist/calls/placeCall.d.ts +20 -0
- package/dist/calls/scheduledCall.d.ts +101 -0
- package/dist/calls/scheduledCallActions.d.ts +12 -0
- package/dist/calls/scheduledCallFormat.d.ts +13 -0
- package/dist/calls/scheduledCallsConfig.d.ts +27 -0
- package/dist/calls/senderTrust.d.ts +7 -0
- package/dist/calls/startCall.d.ts +16 -0
- package/dist/components/MainComponents/ChatWrapper.d.ts +1 -0
- package/dist/components/MainComponents/LoginWrapper.d.ts +1 -0
- package/dist/components/MainComponents/ProfileImagePlaceholder.d.ts +1 -0
- package/dist/components/MainComponents/ReduxWrapper.d.ts +6 -0
- package/dist/components/MenuRoom/MenuRoom.d.ts +1 -0
- package/dist/components/Modals/NewChatModal/styledNewChatComponents.d.ts +27 -0
- package/dist/components/Modals/styledModalComponents.d.ts +21 -0
- package/dist/components/ScheduledCalls/ScheduleCallModal.d.ts +3 -0
- package/dist/components/ScheduledCalls/ScheduledCallCancelConfirm.d.ts +8 -0
- package/dist/components/ScheduledCalls/ScheduledCallCard.d.ts +7 -0
- package/dist/components/ScheduledCalls/ScheduledCallLayer.d.ts +15 -0
- package/dist/components/ScheduledCalls/ScheduledCallPreJoin.d.ts +3 -0
- package/dist/components/VideoCalls/P2PCallRunner.d.ts +1 -0
- package/dist/components/VideoCalls/P2PCallSession.d.ts +14 -0
- package/dist/components/VideoCalls/VideoCallSession.d.ts +37 -0
- package/dist/{handleCopyClick-BUbVvd2G.js → handleCopyClick-B5hswNPZ.js} +1 -1
- package/dist/helpers/callPush.d.ts +2 -0
- package/dist/helpers/canLeaveRoom.d.ts +3 -0
- package/dist/helpers/chatComponentConfigEvents.d.ts +16 -0
- package/dist/helpers/liveConfig.d.ts +46 -0
- package/dist/helpers/reportRoom.d.ts +18 -0
- package/dist/helpers/scheduledCallMessage.d.ts +23 -0
- package/dist/helpers/storeConsole.d.ts +1 -0
- package/dist/hooks/useNow.d.ts +6 -0
- package/dist/hooks/useRemoteAppearance.d.ts +21 -0
- package/dist/hooks/useTypography.d.ts +4 -0
- package/dist/{main-CpHMnydn.js → main-BNjPaiYs.js} +15479 -12971
- package/dist/main.d.ts +6 -2
- package/dist/main.js +25 -21
- package/dist/networking/api-requests/callState.api.d.ts +24 -0
- package/dist/networking/api-requests/push.api.d.ts +4 -5
- package/dist/networking/api-requests/remoteAppearance.api.d.ts +20 -0
- package/dist/networking/api-requests/rooms.api.d.ts +2 -1
- package/dist/networking/api-requests/scheduledCalls.api.d.ts +19 -0
- package/dist/networking/ethoraEvents.d.ts +14 -1
- package/dist/networking/xmpp/getRoomAccess.xmpp.d.ts +7 -0
- package/dist/networking/xmpp/notifyXmppEvent.d.ts +6 -0
- package/dist/networking/xmppClient.d.ts +2 -0
- package/dist/roomStore/callSlice.d.ts +23 -1
- package/dist/roomStore/chatSettingsSlice.d.ts +9 -1
- package/dist/roomStore/index.d.ts +4 -0
- package/dist/roomStore/scheduledCallSlice.d.ts +47 -0
- package/dist/types/models/config.model.d.ts +71 -1
- package/dist/types/models/message.model.d.ts +2 -0
- package/dist/types/models/room.model.d.ts +2 -0
- package/dist/types/models/scheduledCall.model.d.ts +116 -0
- package/dist/types/models/xmpp.model.d.ts +2 -0
- package/package.json +1 -1
- package/dist/ChatProfileModal-BDZvd0rm.js +0 -2168
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
export type ScheduledCallKind = 'video' | 'audio';
|
|
2
|
+
/** Lifecycle stored on the server row. */
|
|
3
|
+
export type ScheduledCallStatus = 'scheduled' | 'cancelled';
|
|
4
|
+
/**
|
|
5
|
+
* Status carried by the room message. `updated` means the call was edited
|
|
6
|
+
* after the first invite; the card treats it like `scheduled`.
|
|
7
|
+
*/
|
|
8
|
+
export type ScheduledCallMessageStatus = 'scheduled' | 'updated' | 'cancelled';
|
|
9
|
+
export interface ScheduledCall {
|
|
10
|
+
id?: string;
|
|
11
|
+
appId?: string;
|
|
12
|
+
chatName: string;
|
|
13
|
+
chatType?: 'private' | 'group' | 'public';
|
|
14
|
+
createdBy?: string;
|
|
15
|
+
title: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
/** ISO 8601, UTC. */
|
|
18
|
+
startAt: string;
|
|
19
|
+
durationMinutes: number;
|
|
20
|
+
timezone?: string;
|
|
21
|
+
kind: ScheduledCallKind;
|
|
22
|
+
slug: string;
|
|
23
|
+
status: ScheduledCallStatus;
|
|
24
|
+
sequence?: number;
|
|
25
|
+
reminderSentAt?: string | null;
|
|
26
|
+
createdAt?: string;
|
|
27
|
+
updatedAt?: string;
|
|
28
|
+
}
|
|
29
|
+
/** Links are built by the backend only; clients never compose calendar URLs. */
|
|
30
|
+
export interface ScheduledCallLinks {
|
|
31
|
+
join: string;
|
|
32
|
+
ics: string;
|
|
33
|
+
google: string;
|
|
34
|
+
outlook: string;
|
|
35
|
+
office365?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface ScheduledCallWithLinks {
|
|
38
|
+
scheduledCall: ScheduledCall;
|
|
39
|
+
links: ScheduledCallLinks;
|
|
40
|
+
}
|
|
41
|
+
export interface ScheduledCallDetails extends ScheduledCallWithLinks {
|
|
42
|
+
chat: {
|
|
43
|
+
name: string;
|
|
44
|
+
title?: string;
|
|
45
|
+
type?: string;
|
|
46
|
+
jid: string;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
export interface CreateScheduledCallInput {
|
|
50
|
+
chatName: string;
|
|
51
|
+
title?: string;
|
|
52
|
+
description?: string;
|
|
53
|
+
startAt: string;
|
|
54
|
+
durationMinutes?: number;
|
|
55
|
+
timezone?: string;
|
|
56
|
+
kind?: ScheduledCallKind;
|
|
57
|
+
}
|
|
58
|
+
export interface UpdateScheduledCallInput {
|
|
59
|
+
title?: string;
|
|
60
|
+
description?: string;
|
|
61
|
+
startAt?: string;
|
|
62
|
+
durationMinutes?: number;
|
|
63
|
+
kind?: ScheduledCallKind;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* What a `<data type="scheduledCall">` message boils down to. Persisted on the
|
|
67
|
+
* message (like `callLog`) so a reloaded transcript repaints the card before
|
|
68
|
+
* the archive re-delivers the stanza.
|
|
69
|
+
*/
|
|
70
|
+
export interface ScheduledCallMeta {
|
|
71
|
+
slug: string;
|
|
72
|
+
title: string;
|
|
73
|
+
/** ISO 8601, UTC. */
|
|
74
|
+
startAt: string;
|
|
75
|
+
durationMinutes: number;
|
|
76
|
+
kind: ScheduledCallKind;
|
|
77
|
+
status: ScheduledCallMessageStatus;
|
|
78
|
+
/** Creator's user id (`scheduledCallCreatedBy`), decides who sees Edit and Cancel. */
|
|
79
|
+
createdBy?: string;
|
|
80
|
+
joinUrl?: string;
|
|
81
|
+
icsUrl?: string;
|
|
82
|
+
googleUrl?: string;
|
|
83
|
+
outlookUrl?: string;
|
|
84
|
+
}
|
|
85
|
+
/** Why a scheduled call could not be opened. */
|
|
86
|
+
export type ScheduledCallOpenError = 'not-found' | 'not-a-member' | 'cancelled' | 'network';
|
|
87
|
+
export interface ScheduledCallsConfig {
|
|
88
|
+
/**
|
|
89
|
+
* Scheduling and invite cards. Defaults to on whenever video calls are on
|
|
90
|
+
* (`config.videoCalls.enabled`). `false` hides the "Schedule call" action;
|
|
91
|
+
* invite cards still render so a room that already holds one stays readable,
|
|
92
|
+
* but without the Join button.
|
|
93
|
+
*/
|
|
94
|
+
enabled?: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Called when `scheduledCallSlug` (or `openScheduledCall(slug)`) could not be
|
|
97
|
+
* opened. A host that wants its own error screen resolves the slug itself
|
|
98
|
+
* first; this is for the in-chat fallback.
|
|
99
|
+
*/
|
|
100
|
+
onOpenError?: (error: {
|
|
101
|
+
slug: string;
|
|
102
|
+
reason: ScheduledCallOpenError;
|
|
103
|
+
}) => void;
|
|
104
|
+
/**
|
|
105
|
+
* Hosts whose `https://<host>/call/<slug>` links `parseScheduledCallLink`
|
|
106
|
+
* accepts on top of `app.chat.ethora.com` and the page's own host. Same option
|
|
107
|
+
* name and defaults as the React Native SDK.
|
|
108
|
+
*/
|
|
109
|
+
hosts?: string[];
|
|
110
|
+
/**
|
|
111
|
+
* Custom URL schemes (without `://`) that `parseScheduledCallLink` accepts
|
|
112
|
+
* for `<scheme>://call/<slug>`. Unset accepts any scheme. Same option name
|
|
113
|
+
* as the React Native SDK.
|
|
114
|
+
*/
|
|
115
|
+
schemes?: string[];
|
|
116
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Client } from '@xmpp/client';
|
|
2
2
|
import { ReactionStanzaData } from '../../networking/xmpp/sendMessageReaction.xmpp';
|
|
3
|
+
import { RoomAccess } from '../../networking/xmpp/getRoomAccess.xmpp';
|
|
3
4
|
import { Iso639_1Codes } from './language.model';
|
|
4
5
|
import { default as XmppClient, HistoryWindowPage } from '../../networking/xmppClient';
|
|
5
6
|
import { IMessage } from './message.model';
|
|
@@ -100,6 +101,7 @@ export interface XmppClientInterface {
|
|
|
100
101
|
getLastMessageArchiveStanza(roomJID: string): void;
|
|
101
102
|
setRoomImageStanza(roomJid: string, roomThumbnail: string, type: string, roomBackground?: string): void;
|
|
102
103
|
getRoomInfoStanza(roomJID: string): void;
|
|
104
|
+
getRoomAccessStanza(roomJID: string, timeoutMs?: number): Promise<RoomAccess>;
|
|
103
105
|
getRoomMembersStanza(roomJID: string): void;
|
|
104
106
|
setVCardStanza(xmppUsername: string): void;
|
|
105
107
|
sendMessage(roomJID: string, firstName: string, lastName: string, photo: string, walletAddress: string, userMessage: string, notDisplayedValue?: string, isReply?: boolean, showInChannel?: boolean, mainMessage?: string, customId?: string): void;
|