@talkjs/core 1.5.4 → 1.5.6

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * A node in a {@link TextBlock} that renders its children as a clickable {@link https://talkjs.com/docs/Features/Customizations/Action_Buttons_Links/ | action button} which triggers a custom action.
2
+ * A node in a {@link TextBlock} that renders its children as a clickable {@link https://talkjs.com/docs/Guides/JavaScript/Classic/Action_Buttons_Links/ | action button} which triggers a custom action.
3
3
  *
4
4
  * @remarks
5
5
  * By default, users do not have permission to send messages containing action buttons as they can be used maliciously to trick others into invoking custom actions.
@@ -8,20 +8,20 @@
8
8
  * @public
9
9
  */
10
10
  export declare interface ActionButtonNode {
11
- type: "actionButton";
11
+ readonly type: "actionButton";
12
12
  /**
13
13
  * The name of the custom action to invoke when the button is clicked.
14
14
  */
15
- action: string;
15
+ readonly action: string;
16
16
  /**
17
17
  * The parameters to pass to the custom action when the button is clicked.
18
18
  */
19
- params: Record<string, string>;
20
- children: TextNode[];
19
+ readonly params: Record<string, string>;
20
+ readonly children: TextNode[];
21
21
  }
22
22
 
23
23
  /**
24
- * A node in a {@link TextBlock} that renders its children as a clickable {@link https://talkjs.com/docs/Features/Customizations/Action_Buttons_Links/ | action link} which triggers a custom action.
24
+ * A node in a {@link TextBlock} that renders its children as a clickable {@link https://talkjs.com/docs/Guides/JavaScript/Classic/Action_Buttons_Links/ | action link} which triggers a custom action.
25
25
  *
26
26
  * @remarks
27
27
  * By default, users do not have permission to send messages containing `ActionLinkNode` as it can be used maliciously to trick others into invoking custom actions.
@@ -30,16 +30,16 @@ export declare interface ActionButtonNode {
30
30
  * @public
31
31
  */
32
32
  export declare interface ActionLinkNode {
33
- type: "actionLink";
33
+ readonly type: "actionLink";
34
34
  /**
35
35
  * The name of the custom action to invoke when the link is clicked.
36
36
  */
37
- action: string;
37
+ readonly action: string;
38
38
  /**
39
39
  * The parameters to pass to the custom action when the link is clicked.
40
40
  */
41
- params: Record<string, string>;
42
- children: TextNode[];
41
+ readonly params: Record<string, string>;
42
+ readonly children: TextNode[];
43
43
  }
44
44
 
45
45
  /**
@@ -60,28 +60,28 @@ export declare interface ActionLinkNode {
60
60
  * @public
61
61
  */
62
62
  export declare interface AudioBlock {
63
- type: "file";
64
- subtype: "audio";
63
+ readonly type: "file";
64
+ readonly subtype: "audio";
65
65
  /**
66
66
  * An encoded identifier for this file. Use in {@link SendFileBlock} to send this file in another message.
67
67
  */
68
- fileToken: FileToken;
68
+ readonly fileToken: FileToken;
69
69
  /**
70
70
  * The URL where you can fetch the file
71
71
  */
72
- url: string;
72
+ readonly url: string;
73
73
  /**
74
74
  * The size of the file in bytes
75
75
  */
76
- size: number;
76
+ readonly size: number;
77
77
  /**
78
78
  * The name of the audio file, including file extension
79
79
  */
80
- filename: string;
80
+ readonly filename: string;
81
81
  /**
82
82
  * The duration of the audio in seconds, if known
83
83
  */
84
- duration?: number;
84
+ readonly duration?: number;
85
85
  }
86
86
 
87
87
  export declare interface AudioFileMetadata {
@@ -118,7 +118,7 @@ export declare interface AudioFileMetadata {
118
118
  * {
119
119
  * type: "autoLink",
120
120
  * text: "talkjs.com"
121
- * url: "https://talkjs.com/docs/Reference/JavaScript_Data_API/Message_Content/#AutoLinkNode"
121
+ * url: "https://talkjs.com/docs/SDKs/JavaScript_Data_API/Message_Content/#AutoLinkNode"
122
122
  * }
123
123
  * ```
124
124
  *
@@ -130,15 +130,15 @@ export declare interface AudioFileMetadata {
130
130
  * @public
131
131
  */
132
132
  export declare interface AutoLinkNode {
133
- type: "autoLink";
133
+ readonly type: "autoLink";
134
134
  /**
135
135
  * The URL to open when a user clicks this node.
136
136
  */
137
- url: string;
137
+ readonly url: string;
138
138
  /**
139
139
  * The text to display in the link.
140
140
  */
141
- text: string;
141
+ readonly text: string;
142
142
  }
143
143
 
144
144
  /**
@@ -150,8 +150,8 @@ export declare interface AutoLinkNode {
150
150
  * @public
151
151
  */
152
152
  export declare interface BulletListNode {
153
- type: "bulletList";
154
- children: TextNode[];
153
+ readonly type: "bulletList";
154
+ readonly children: TextNode[];
155
155
  }
156
156
 
157
157
  /**
@@ -163,8 +163,8 @@ export declare interface BulletListNode {
163
163
  * @public
164
164
  */
165
165
  export declare interface BulletPointNode {
166
- type: "bulletPoint";
167
- children: TextNode[];
166
+ readonly type: "bulletPoint";
167
+ readonly children: TextNode[];
168
168
  }
169
169
 
170
170
  /**
@@ -176,8 +176,8 @@ export declare interface BulletPointNode {
176
176
  * @public
177
177
  */
178
178
  export declare interface CodeSpanNode {
179
- type: "codeSpan";
180
- text: string;
179
+ readonly type: "codeSpan";
180
+ readonly text: string;
181
181
  }
182
182
 
183
183
  /**
@@ -207,11 +207,11 @@ export declare type ContentBlock = TextBlock | FileBlock | LocationBlock;
207
207
  * @public
208
208
  */
209
209
  export declare interface ConversationActiveState {
210
- type: "active";
210
+ readonly type: "active";
211
211
  /**
212
212
  * The most recently received snapshot for the conversation, or `null` if you are not a participant in the conversation (including when the conversation does not exist).
213
213
  */
214
- latestSnapshot: ConversationSnapshot | null;
214
+ readonly latestSnapshot: ConversationSnapshot | null;
215
215
  }
216
216
 
217
217
  /**
@@ -220,16 +220,16 @@ export declare interface ConversationActiveState {
220
220
  * @public
221
221
  */
222
222
  export declare interface ConversationListActiveState {
223
- type: "active";
223
+ readonly type: "active";
224
224
  /**
225
225
  * The most recently received snapshot for the conversations
226
226
  */
227
- latestSnapshot: ConversationSnapshot[];
227
+ readonly latestSnapshot: ConversationSnapshot[];
228
228
  /**
229
229
  * True if `latestSnapshot` contains all conversations you are in.
230
230
  * Use {@link ConversationListSubscription.loadMore} to load more.
231
231
  */
232
- loadedAll: boolean;
232
+ readonly loadedAll: boolean;
233
233
  }
234
234
 
235
235
  /**
@@ -275,14 +275,14 @@ export declare interface ConversationListSubscription {
275
275
  *
276
276
  * The promise rejects if the subscription is terminated before it connects.
277
277
  */
278
- connected: Promise<ConversationListActiveState>;
278
+ readonly connected: Promise<ConversationListActiveState>;
279
279
  /**
280
280
  * Resolves when the subscription permanently stops receiving updates from the server.
281
281
  *
282
282
  * @remarks
283
283
  * This is either because you unsubscribed or because the subscription encountered an unrecoverable error.
284
284
  */
285
- terminated: Promise<UnsubscribedState | ErrorState>;
285
+ readonly terminated: Promise<UnsubscribedState | ErrorState>;
286
286
  /**
287
287
  * Expand the window to include older conversations
288
288
  *
@@ -307,12 +307,19 @@ export declare interface ConversationListSubscription {
307
307
  }
308
308
 
309
309
  /**
310
- * References the conversation with a given conversation ID, from the perspective of the current user.
310
+ * References the current user's view of the conversation with a given conversation ID.
311
311
  *
312
312
  * @remarks
313
313
  * Used in all Data API operations affecting that conversation, such as fetching or updating conversation attributes.
314
314
  * Created via {@link Session.conversation|Session.conversation()}.
315
315
  *
316
+ * Important note: ConversationRef is a reference to *the current user's view* of the conversation.
317
+ *
318
+ * If they are not a participant, "their view" of the conversation does not exist.
319
+ * This means that {@link ConversationRef.get|ConversationRef.get()} will return null.
320
+ * Additionally, it means that {@link ConversationRef.set|set()} and {@link ConversationRef.createIfNotExists|createIfNotExists()} will add the current user as a participant, in order to create "their view" of the conversation.
321
+ * For more details, see the documentation for those methods.
322
+ *
316
323
  * @public
317
324
  */
318
325
  export declare interface ConversationRef {
@@ -358,6 +365,7 @@ export declare interface ConversationRef {
358
365
  * @remarks
359
366
  * Use this if you need to fetch, delete, or edit a specific message in this conversation, and you know its message ID.
360
367
  * To fetch the most recent messages in this conversation, use {@link ConversationRef.subscribeMessages} instead.
368
+ * To send a message, use {@link ConversationRef.send}.
361
369
  *
362
370
  * @param id - The ID of the message that you want to reference
363
371
  * @returns A {@linkcode MessageRef} for the message with that ID in this conversation
@@ -375,11 +383,12 @@ export declare interface ConversationRef {
375
383
  */
376
384
  get(): Promise<ConversationSnapshot | null>;
377
385
  /**
378
- * Sets properties of this conversation and your participation in it.
386
+ * Sets properties of this conversation and the current user's participation.
379
387
  *
380
388
  * @remarks
381
- * The conversation is created if a conversation with this ID doesn't already exist.
382
- * You are added as a participant if you are not already a participant in the conversation.
389
+ * If this conversation does not already exist, it will be created.
390
+ *
391
+ * If the user is not currently a participant in this conversation, they will be added.
383
392
  *
384
393
  * @returns A promise that resolves when the operation completes.
385
394
  * When client-side conversation syncing is disabled, you must already be a participant and you cannot set anything except the `notify` property.
@@ -587,15 +596,15 @@ export declare interface ConversationSnapshot {
587
596
  /**
588
597
  * The ID of the conversation
589
598
  */
590
- id: string;
599
+ readonly id: string;
591
600
  /**
592
601
  * Contains the conversation subject, or `null` if the conversation does not have a subject specified.
593
602
  */
594
- subject: string | null;
603
+ readonly subject: string | null;
595
604
  /**
596
605
  * Contains the URL of a photo to represent the topic of the conversation or `null` if the conversation does not have a photo specified.
597
606
  */
598
- photoUrl: string | null;
607
+ readonly photoUrl: string | null;
599
608
  /**
600
609
  * One or more welcome messages that will be rendered at the start of this conversation as system messages.
601
610
  *
@@ -603,27 +612,27 @@ export declare interface ConversationSnapshot {
603
612
  * Welcome messages are rendered in the UI as messages, but they are not real messages.
604
613
  * This means they do not appear when you list messages using the REST API or JS Data API, and you cannot reply or react to them.
605
614
  */
606
- welcomeMessages: string[];
615
+ readonly welcomeMessages: string[];
607
616
  /**
608
617
  * Custom metadata you have set on the conversation
609
618
  */
610
- custom: Record<string, string>;
619
+ readonly custom: Record<string, string>;
611
620
  /**
612
621
  * The date that the conversation was created, as a unix timestamp in milliseconds.
613
622
  */
614
- createdAt: number;
623
+ readonly createdAt: number;
615
624
  /**
616
625
  * The date that the current user joined the conversation, as a unix timestamp in milliseconds.
617
626
  */
618
- joinedAt: number;
627
+ readonly joinedAt: number;
619
628
  /**
620
629
  * The last message sent in this conversation, or null if no messages have been sent.
621
630
  */
622
- lastMessage: MessageSnapshot | null;
631
+ readonly lastMessage: MessageSnapshot | null;
623
632
  /**
624
633
  * The number of messages in this conversation that the current user hasn't read.
625
634
  */
626
- unreadMessageCount: number;
635
+ readonly unreadMessageCount: number;
627
636
  /**
628
637
  * The most recent date that the current user read the conversation.
629
638
  *
@@ -632,7 +641,7 @@ export declare interface ConversationSnapshot {
632
641
  *
633
642
  * Any messages sent after this timestamp are unread messages.
634
643
  */
635
- readUntil: number;
644
+ readonly readUntil: number;
636
645
  /**
637
646
  * Everyone in the conversation has read any messages sent on or before this date.
638
647
  *
@@ -643,25 +652,25 @@ export declare interface ConversationSnapshot {
643
652
  * This value will rarely change in very large conversations.
644
653
  * If just one person stops checking their messages, `everyoneReadUntil` will never update.
645
654
  */
646
- everyoneReadUntil: number;
655
+ readonly everyoneReadUntil: number;
647
656
  /**
648
657
  * Whether the conversation should be considered unread.
649
658
  *
650
659
  * @remarks
651
660
  * This can be true even when `unreadMessageCount` is zero, if the user has manually marked the conversation as unread.
652
661
  */
653
- isUnread: boolean;
662
+ readonly isUnread: boolean;
654
663
  /**
655
664
  * The current user's permission level in this conversation.
656
665
  */
657
- access: "Read" | "ReadWrite";
666
+ readonly access: "Read" | "ReadWrite";
658
667
  /**
659
668
  * The current user's notification settings for this conversation.
660
669
  *
661
670
  * @remarks
662
671
  * `false` means no notifications, `true` means notifications for all messages, and `"MentionsOnly"` means that the user will only be notified when they are mentioned with an `@`.
663
672
  */
664
- notify: boolean | "MentionsOnly";
673
+ readonly notify: boolean | "MentionsOnly";
665
674
  }
666
675
 
667
676
  /**
@@ -692,14 +701,14 @@ export declare interface ConversationSubscription {
692
701
  /**
693
702
  * Resolves when the subscription starts receiving updates from the server.
694
703
  */
695
- connected: Promise<ConversationActiveState>;
704
+ readonly connected: Promise<ConversationActiveState>;
696
705
  /**
697
706
  * Resolves when the subscription permanently stops receiving updates from the server.
698
707
  *
699
708
  * @remarks
700
709
  * This is either because you unsubscribed or because the subscription encountered an unrecoverable error.
701
710
  */
702
- terminated: Promise<UnsubscribedState | ErrorState>;
711
+ readonly terminated: Promise<UnsubscribedState | ErrorState>;
703
712
  /**
704
713
  * Unsubscribe from this resource and stop receiving updates.
705
714
  *
@@ -797,7 +806,7 @@ export declare interface CreateUserParams {
797
806
  custom?: Record<string, string>;
798
807
  /**
799
808
  * An {@link https://www.w3.org/International/articles/language-tags/ | IETF language tag}.
800
- * See the {@link https://talkjs.com/docs/Features/Language_Support/Localization.html | localization documentation}
809
+ * See the {@link https://talkjs.com/docs/Features/Language_Support/#localization | localization documentation}
801
810
  * Default = the locale selected on the dashboard
802
811
  */
803
812
  locale?: string;
@@ -844,16 +853,16 @@ export declare interface CreateUserParams {
844
853
  }
845
854
 
846
855
  /**
847
- * A node in a {@link TextBlock} that is used for {@link https://talkjs.com/docs/Features/Message_Features/Emoji_Reactions/#custom-emojis | custom emoji}.
856
+ * A node in a {@link TextBlock} that is used for {@link https://talkjs.com/docs/Features/Messages/Emojis/#custom-emojis | custom emoji}.
848
857
  *
849
858
  * @public
850
859
  */
851
860
  export declare interface CustomEmojiNode {
852
- type: "customEmoji";
861
+ readonly type: "customEmoji";
853
862
  /**
854
863
  * The name (including colons at the start and end) of the custom emoji to show.
855
864
  */
856
- text: string;
865
+ readonly text: string;
857
866
  }
858
867
 
859
868
  /**
@@ -910,7 +919,7 @@ export declare interface EditTextMessageParams {
910
919
  * @remarks
911
920
  * This is parsed the same way as the text entered in the message field. For example, `*hi*` will appear as `hi` in bold.
912
921
  *
913
- * See the {@link https://talkjs.com/docs/Features/Message_Features/Formatting/ | message formatting documentation} for more details.
922
+ * See the {@link https://talkjs.com/docs/Features/Messages/Formatting/ | message formatting documentation} for more details.
914
923
  */
915
924
  text?: string;
916
925
  }
@@ -921,11 +930,11 @@ export declare interface EditTextMessageParams {
921
930
  * @public
922
931
  */
923
932
  export declare interface ErrorState {
924
- type: "error";
933
+ readonly type: "error";
925
934
  /**
926
935
  * The error that caused the subscription to be terminated
927
936
  */
928
- error: Error;
937
+ readonly error: Error;
929
938
  }
930
939
 
931
940
  /**
@@ -938,7 +947,7 @@ export declare interface FewTypingSnapshot {
938
947
  * @remarks
939
948
  * When `false`, you can see the list of users who are typing in the `users` property.
940
949
  */
941
- many: false;
950
+ readonly many: false;
942
951
  /**
943
952
  * The users who are currently typing in this conversation.
944
953
  *
@@ -946,7 +955,7 @@ export declare interface FewTypingSnapshot {
946
955
  * The list is in chronological order, starting with the users who have been typing the longest.
947
956
  * The current user is never contained in the list, only other users.
948
957
  */
949
- users: UserSnapshot[];
958
+ readonly users: UserSnapshot[];
950
959
  }
951
960
 
952
961
  /**
@@ -978,7 +987,7 @@ export declare type FileBlock = VideoBlock | ImageBlock | AudioBlock | VoiceBloc
978
987
  * @remarks
979
988
  * You cannot create a FileToken yourself. Get a file token by uploading your file to TalkJS with {@link Session.uploadFile}, or one of the subtype-specific variants like {@link Session.uploadImage}.
980
989
  * Alternatively, take a file token from an existing {@link FileBlock} to re-send an attachment you received, without having to download and re-upload the file.
981
- * You can also upload files using the {@link https://talkjs.com/docs/Reference/REST_API/Messages/#1-upload-a-file| REST API}.
990
+ * You can also upload files using the {@link https://talkjs.com/docs/REST_API/Messages/#1-upload-a-file| REST API}.
982
991
  * This system ensures that all files must be uploaded to TalkJS before being sent to users, limiting the risk of malware.
983
992
  *
984
993
  * Passed in {@link SendFileBlock} when you send a message containing a file attachment.
@@ -1009,7 +1018,7 @@ export declare type FileBlock = VideoBlock | ImageBlock | AudioBlock | VoiceBloc
1009
1018
  * @public
1010
1019
  */
1011
1020
  export declare type FileToken = string & {
1012
- __tag: Record<"TalkJS Encoded File Token", true>;
1021
+ readonly __tag: Record<"TalkJS Encoded File Token", true>;
1013
1022
  };
1014
1023
 
1015
1024
  /**
@@ -1037,27 +1046,27 @@ export declare type FileToken = string & {
1037
1046
  * @public
1038
1047
  */
1039
1048
  export declare interface GenericFileBlock {
1040
- type: "file";
1049
+ readonly type: "file";
1041
1050
  /**
1042
1051
  * Never set for generic file blocks.
1043
1052
  */
1044
- subtype?: never;
1053
+ readonly subtype?: never;
1045
1054
  /**
1046
1055
  * An encoded identifier for this file. Use in {@link SendFileBlock} to send this file in another message.
1047
1056
  */
1048
- fileToken: FileToken;
1057
+ readonly fileToken: FileToken;
1049
1058
  /**
1050
1059
  * The URL where you can fetch the file
1051
1060
  */
1052
- url: string;
1061
+ readonly url: string;
1053
1062
  /**
1054
1063
  * The size of the file in bytes
1055
1064
  */
1056
- size: number;
1065
+ readonly size: number;
1057
1066
  /**
1058
1067
  * The name of the file, including file extension
1059
1068
  */
1060
- filename: string;
1069
+ readonly filename: string;
1061
1070
  }
1062
1071
 
1063
1072
  export declare interface GenericFileMetadata {
@@ -1093,32 +1102,32 @@ export declare function getTalkSession(options: TalkSessionOptions): TalkSession
1093
1102
  * @public
1094
1103
  */
1095
1104
  export declare interface ImageBlock {
1096
- type: "file";
1097
- subtype: "image";
1105
+ readonly type: "file";
1106
+ readonly subtype: "image";
1098
1107
  /**
1099
1108
  * An encoded identifier for this file. Use in {@link SendFileBlock} to send this image in another message.
1100
1109
  */
1101
- fileToken: FileToken;
1110
+ readonly fileToken: FileToken;
1102
1111
  /**
1103
1112
  * The URL where you can fetch the file.
1104
1113
  */
1105
- url: string;
1114
+ readonly url: string;
1106
1115
  /**
1107
1116
  * The size of the file in bytes.
1108
1117
  */
1109
- size: number;
1118
+ readonly size: number;
1110
1119
  /**
1111
1120
  * The name of the image file, including file extension.
1112
1121
  */
1113
- filename: string;
1122
+ readonly filename: string;
1114
1123
  /**
1115
1124
  * The width of the image in pixels, if known.
1116
1125
  */
1117
- width?: number;
1126
+ readonly width?: number;
1118
1127
  /**
1119
1128
  * The height of the image in pixels, if known.
1120
1129
  */
1121
- height?: number;
1130
+ readonly height?: number;
1122
1131
  }
1123
1132
 
1124
1133
  export declare interface ImageFileMetadata {
@@ -1145,12 +1154,12 @@ export declare interface ImageFileMetadata {
1145
1154
  * @public
1146
1155
  */
1147
1156
  export declare interface LinkNode {
1148
- type: "link";
1157
+ readonly type: "link";
1149
1158
  /**
1150
1159
  * The URL to open when the node is clicked.
1151
1160
  */
1152
- url: string;
1153
- children: TextNode[];
1161
+ readonly url: string;
1162
+ readonly children: TextNode[];
1154
1163
  }
1155
1164
 
1156
1165
  /**
@@ -1163,7 +1172,7 @@ export declare interface LinkNode {
1163
1172
  * @public
1164
1173
  */
1165
1174
  export declare interface LocationBlock {
1166
- type: "location";
1175
+ readonly type: "location";
1167
1176
  /**
1168
1177
  * The north-south coordinate of the location.
1169
1178
  *
@@ -1172,7 +1181,7 @@ export declare interface LocationBlock {
1172
1181
  *
1173
1182
  * Must be a number between -90 and 90
1174
1183
  */
1175
- latitude: number;
1184
+ readonly latitude: number;
1176
1185
  /**
1177
1186
  * The east-west coordinate of the location.
1178
1187
  *
@@ -1181,7 +1190,7 @@ export declare interface LocationBlock {
1181
1190
  *
1182
1191
  * Must be a number between -180 and 180
1183
1192
  */
1184
- longitude: number;
1193
+ readonly longitude: number;
1185
1194
  }
1186
1195
 
1187
1196
  /**
@@ -1195,7 +1204,7 @@ export declare interface ManyTypingSnapshot {
1195
1204
  * When `true`, you do not receive a list of users who are typing.
1196
1205
  * You should show a message like "several people are typing" instead.
1197
1206
  */
1198
- many: true;
1207
+ readonly many: true;
1199
1208
  }
1200
1209
 
1201
1210
  /**
@@ -1213,12 +1222,12 @@ export declare interface MarkupNode {
1213
1222
  *
1214
1223
  * - `type: "strikethrough"` is used when users type `~text~` and is rendered with HTML `<s>`
1215
1224
  */
1216
- type: "bold" | "italic" | "strikethrough";
1217
- children: TextNode[];
1225
+ readonly type: "bold" | "italic" | "strikethrough";
1226
+ readonly children: TextNode[];
1218
1227
  }
1219
1228
 
1220
1229
  /**
1221
- * A node in a {@link TextBlock} that is used when a user is {@link https://talkjs.com/docs/Features/Message_Features/Mentions/ | mentioned}.
1230
+ * A node in a {@link TextBlock} that is used when a user is {@link https://talkjs.com/docs/Features/Messages/Mentions/ | mentioned}.
1222
1231
  *
1223
1232
  * @remarks
1224
1233
  * Used when a user types `@name` and selects the user they want to mention.
@@ -1226,15 +1235,15 @@ export declare interface MarkupNode {
1226
1235
  * @public
1227
1236
  */
1228
1237
  export declare interface MentionNode {
1229
- type: "mention";
1238
+ readonly type: "mention";
1230
1239
  /**
1231
1240
  * The ID of the user who is mentioned.
1232
1241
  */
1233
- id: string;
1242
+ readonly id: string;
1234
1243
  /**
1235
1244
  * The name of the user who is mentioned.
1236
1245
  */
1237
- text: string;
1246
+ readonly text: string;
1238
1247
  }
1239
1248
 
1240
1249
  /**
@@ -1243,16 +1252,16 @@ export declare interface MentionNode {
1243
1252
  * @public
1244
1253
  */
1245
1254
  export declare interface MessageActiveState {
1246
- type: "active";
1255
+ readonly type: "active";
1247
1256
  /**
1248
1257
  * The most recently received snapshot for the messages, or `null` if you're not a participant in the conversation.
1249
1258
  */
1250
- latestSnapshot: MessageSnapshot[] | null;
1259
+ readonly latestSnapshot: MessageSnapshot[] | null;
1251
1260
  /**
1252
1261
  * True if `latestSnapshot` contains all messages in the conversation.
1253
1262
  * Use {@link MessageSubscription.loadMore} to load more.
1254
1263
  */
1255
- loadedAll: boolean;
1264
+ readonly loadedAll: boolean;
1256
1265
  }
1257
1266
 
1258
1267
  /**
@@ -1307,9 +1316,6 @@ export declare interface MessageRef {
1307
1316
  /**
1308
1317
  * Fetches a snapshot of the message.
1309
1318
  *
1310
- * @remarks
1311
- * Supports {@link https://talkjs.com/docs/Reference/JavaScript_Data_API/Performance/#cached-fetch | Cached Fetch}
1312
- *
1313
1319
  * @returns A snapshot of the message's attributes, or null if the message doesn't exist, the conversation doesn't exist, or you're not a participant in the conversation.
1314
1320
  */
1315
1321
  get(): Promise<MessageSnapshot | null>;
@@ -1344,32 +1350,32 @@ export declare interface MessageSnapshot {
1344
1350
  /**
1345
1351
  * The unique ID that is used to identify the message in TalkJS
1346
1352
  */
1347
- id: string;
1353
+ readonly id: string;
1348
1354
  /**
1349
1355
  * Whether this message was "from a user" or a general system message without a specific sender.
1350
1356
  *
1351
1357
  * The `sender` property is always present for "UserMessage" messages and never present for "SystemMessage" messages.
1352
1358
  */
1353
- type: "UserMessage" | "SystemMessage";
1359
+ readonly type: "UserMessage" | "SystemMessage";
1354
1360
  /**
1355
1361
  * A snapshot of the user who sent the message, or null if it is a system message.
1356
1362
  * The user's attributes may have been updated since they sent the message, in which case this snapshot contains the updated data.
1357
1363
  * It is not a historical snapshot.
1358
1364
  */
1359
- sender: UserSnapshot | null;
1365
+ readonly sender: UserSnapshot | null;
1360
1366
  /**
1361
1367
  * Custom metadata you have set on the message
1362
1368
  */
1363
- custom: Record<string, string>;
1369
+ readonly custom: Record<string, string>;
1364
1370
  /**
1365
1371
  * Time at which the message was sent, as a unix timestamp in milliseconds
1366
1372
  */
1367
- createdAt: number;
1373
+ readonly createdAt: number;
1368
1374
  /**
1369
1375
  * Time at which the message was last edited, as a unix timestamp in milliseconds.
1370
1376
  * `null` if the message has never been edited.
1371
1377
  */
1372
- editedAt: number | null;
1378
+ readonly editedAt: number | null;
1373
1379
  /**
1374
1380
  * A snapshot of the message that this message is a reply to, or null if this message is not a reply.
1375
1381
  *
@@ -1379,7 +1385,7 @@ export declare interface MessageSnapshot {
1379
1385
  * Instead, it has `referencedMessageId`.
1380
1386
  * This prevents TalkJS fetching an unlimited number of messages in a long chain of replies.
1381
1387
  */
1382
- referencedMessage: ReferencedMessageSnapshot | null;
1388
+ readonly referencedMessage: ReferencedMessageSnapshot | null;
1383
1389
  /**
1384
1390
  * Where this message originated from:
1385
1391
  *
@@ -1391,23 +1397,23 @@ export declare interface MessageSnapshot {
1391
1397
  *
1392
1398
  * - "email" = Message sent by replying to an email notification
1393
1399
  */
1394
- origin: "web" | "rest" | "import" | "email";
1400
+ readonly origin: "web" | "rest" | "import" | "email";
1395
1401
  /**
1396
1402
  * The contents of the message, as a plain text string without any formatting or attachments.
1397
1403
  * Useful for showing in a conversation list or in notifications.
1398
1404
  */
1399
- plaintext: string;
1405
+ readonly plaintext: string;
1400
1406
  /**
1401
1407
  * The main body of the message, as a list of blocks that are rendered top-to-bottom.
1402
1408
  */
1403
- content: ContentBlock[];
1409
+ readonly content: ContentBlock[];
1404
1410
  /**
1405
1411
  * All the emoji reactions that have been added to this message.
1406
1412
  *
1407
1413
  * @remarks
1408
1414
  * There can be up to 50 different reactions on each message.
1409
1415
  */
1410
- reactions: ReactionSnapshot[];
1416
+ readonly reactions: ReactionSnapshot[];
1411
1417
  }
1412
1418
 
1413
1419
  /**
@@ -1451,14 +1457,14 @@ export declare interface MessageSubscription {
1451
1457
  *
1452
1458
  * The promise rejects if the subscription is terminated before it connects.
1453
1459
  */
1454
- connected: Promise<MessageActiveState>;
1460
+ readonly connected: Promise<MessageActiveState>;
1455
1461
  /**
1456
1462
  * Resolves when the subscription permanently stops receiving updates from the server.
1457
1463
  *
1458
1464
  * @remarks
1459
1465
  * This is either because you unsubscribed or because the subscription encountered an unrecoverable error.
1460
1466
  */
1461
- terminated: Promise<UnsubscribedState | ErrorState>;
1467
+ readonly terminated: Promise<UnsubscribedState | ErrorState>;
1462
1468
  /**
1463
1469
  * Expand the window to include older messages
1464
1470
  *
@@ -1487,16 +1493,16 @@ export declare interface MessageSubscription {
1487
1493
  * @public
1488
1494
  */
1489
1495
  export declare interface ParticipantActiveState {
1490
- type: "active";
1496
+ readonly type: "active";
1491
1497
  /**
1492
1498
  * The most recently received snapshot for the participants, or `null` if you are not a participant in that conversation.
1493
1499
  */
1494
- latestSnapshot: ParticipantSnapshot[] | null;
1500
+ readonly latestSnapshot: ParticipantSnapshot[] | null;
1495
1501
  /**
1496
1502
  * True if `latestSnapshot` contains all participants in the conversation.
1497
1503
  * Use {@link ParticipantSubscription.loadMore} to load more.
1498
1504
  */
1499
- loadedAll: boolean;
1505
+ readonly loadedAll: boolean;
1500
1506
  }
1501
1507
 
1502
1508
  /**
@@ -1535,9 +1541,6 @@ export declare interface ParticipantRef {
1535
1541
  /**
1536
1542
  * Sets properties of this participant. If the user is not already a participant in the conversation, they will be added.
1537
1543
  *
1538
- * @remarks
1539
- * Supports {@link https://talkjs.com/docs/Reference/JavaScript_Data_API/Performance/#automatic-batching | Automatic Batching}
1540
- *
1541
1544
  * @returns A promise that resolves when the operation completes.
1542
1545
  * When client-side conversation syncing is disabled, you must already be a participant and you cannot set anything except the `notify` property.
1543
1546
  * Everything else requires client-side conversation syncing to be enabled, and will cause the promise to reject.
@@ -1546,9 +1549,6 @@ export declare interface ParticipantRef {
1546
1549
  /**
1547
1550
  * Edits properties of a pre-existing participant. If the user is not already a participant in the conversation, the promise will reject.
1548
1551
  *
1549
- * @remarks
1550
- * Supports {@link https://talkjs.com/docs/Reference/JavaScript_Data_API/Performance/#automatic-batching | Automatic Batching}
1551
- *
1552
1552
  * @returns A promise that resolves when the operation completes.
1553
1553
  * When client-side conversation syncing is disabled, you must already be a participant and you cannot set anything except the `notify` property.
1554
1554
  * Everything else requires client-side conversation syncing to be enabled, and will cause the promise to reject.
@@ -1560,8 +1560,6 @@ export declare interface ParticipantRef {
1560
1560
  * @remarks
1561
1561
  * If the participant already exists, this operation is still considered successful and the promise will still resolve.
1562
1562
  *
1563
- * Supports {@link https://talkjs.com/docs/Reference/JavaScript_Data_API/Performance/#automatic-batching | Automatic Batching}
1564
- *
1565
1563
  * @returns A promise that resolves when the operation completes. The promise will reject if client-side conversation syncing is disabled and the user is not already a participant.
1566
1564
  */
1567
1565
  createIfNotExists(params?: CreateParticipantParams): Promise<void>;
@@ -1590,22 +1588,22 @@ export declare interface ParticipantSnapshot {
1590
1588
  /**
1591
1589
  * The user who this participant snapshot is referring to
1592
1590
  */
1593
- user: UserSnapshot;
1591
+ readonly user: UserSnapshot;
1594
1592
  /**
1595
1593
  * The level of access this participant has in the conversation.
1596
1594
  */
1597
- access: "ReadWrite" | "Read";
1595
+ readonly access: "ReadWrite" | "Read";
1598
1596
  /**
1599
1597
  * When the participant will be notified about new messages in this conversation.
1600
1598
  *
1601
1599
  * @remarks
1602
1600
  * `false` means no notifications, `true` means notifications for all messages, and `"MentionsOnly"` means that the user will only be notified when they are mentioned with an `@`.
1603
1601
  */
1604
- notify: boolean | "MentionsOnly";
1602
+ readonly notify: boolean | "MentionsOnly";
1605
1603
  /**
1606
1604
  * The date that this user joined the conversation, as a unix timestamp in milliseconds.
1607
1605
  */
1608
- joinedAt: number;
1606
+ readonly joinedAt: number;
1609
1607
  }
1610
1608
 
1611
1609
  /**
@@ -1650,14 +1648,14 @@ export declare interface ParticipantSubscription {
1650
1648
  *
1651
1649
  * The promise rejects if the subscription is terminated before it connects.
1652
1650
  */
1653
- connected: Promise<ParticipantActiveState>;
1651
+ readonly connected: Promise<ParticipantActiveState>;
1654
1652
  /**
1655
1653
  * Resolves when the subscription permanently stops receiving updates from the server.
1656
1654
  *
1657
1655
  * @remarks
1658
1656
  * This is either because you unsubscribed or because the subscription encountered an unrecoverable error.
1659
1657
  */
1660
- terminated: Promise<UnsubscribedState | ErrorState>;
1658
+ readonly terminated: Promise<UnsubscribedState | ErrorState>;
1661
1659
  /**
1662
1660
  * Expand the window to include older participants
1663
1661
  *
@@ -1686,7 +1684,7 @@ export declare interface ParticipantSubscription {
1686
1684
  * @public
1687
1685
  */
1688
1686
  export declare interface PendingState {
1689
- type: "pending";
1687
+ readonly type: "pending";
1690
1688
  }
1691
1689
 
1692
1690
  /**
@@ -1788,15 +1786,15 @@ export declare interface ReactionSnapshot {
1788
1786
  * @example Custom emoji
1789
1787
  * ":cat-roomba:"
1790
1788
  */
1791
- emoji: string;
1789
+ readonly emoji: string;
1792
1790
  /**
1793
1791
  * The number of times this emoji has been added to the message.
1794
1792
  */
1795
- count: number;
1793
+ readonly count: number;
1796
1794
  /**
1797
1795
  * Whether the current user has reacted to the message with this emoji.
1798
1796
  */
1799
- currentUserReacted: boolean;
1797
+ readonly currentUserReacted: boolean;
1800
1798
  }
1801
1799
 
1802
1800
  /**
@@ -1815,11 +1813,11 @@ export declare interface ReferencedMessageSnapshot {
1815
1813
  /**
1816
1814
  * The unique ID that is used to identify the message in TalkJS
1817
1815
  */
1818
- id: string;
1816
+ readonly id: string;
1819
1817
  /**
1820
1818
  * Referenced messages are always "UserMessage" because you cannot reply to a system message.
1821
1819
  */
1822
- type: "UserMessage";
1820
+ readonly type: "UserMessage";
1823
1821
  /**
1824
1822
  * A snapshot of the user who sent the message.
1825
1823
  * The user's attributes may have been updated since they sent the message, in which case this snapshot contains the updated data.
@@ -1828,20 +1826,20 @@ export declare interface ReferencedMessageSnapshot {
1828
1826
  * @remarks
1829
1827
  * Guaranteed to be set, unlike in MessageSnapshot, because you cannot reference a SystemMessage
1830
1828
  */
1831
- sender: UserSnapshot;
1829
+ readonly sender: UserSnapshot;
1832
1830
  /**
1833
1831
  * Custom metadata you have set on the message
1834
1832
  */
1835
- custom: Record<string, string>;
1833
+ readonly custom: Record<string, string>;
1836
1834
  /**
1837
1835
  * Time at which the message was sent, as a unix timestamp in milliseconds
1838
1836
  */
1839
- createdAt: number;
1837
+ readonly createdAt: number;
1840
1838
  /**
1841
1839
  * Time at which the message was last edited, as a unix timestamp in milliseconds.
1842
1840
  * `null` if the message has never been edited.
1843
1841
  */
1844
- editedAt: number | null;
1842
+ readonly editedAt: number | null;
1845
1843
  /**
1846
1844
  * The ID of the message that this message is a reply to, or null if this message is not a reply.
1847
1845
  *
@@ -1849,7 +1847,7 @@ export declare interface ReferencedMessageSnapshot {
1849
1847
  * Since this is a snapshot of a referenced message, we do not automatically expand its referenced message.
1850
1848
  * The ID of its referenced message is provided here instead.
1851
1849
  */
1852
- referencedMessageId: string | null;
1850
+ readonly referencedMessageId: string | null;
1853
1851
  /**
1854
1852
  * Where this message originated from:
1855
1853
  *
@@ -1861,20 +1859,20 @@ export declare interface ReferencedMessageSnapshot {
1861
1859
  *
1862
1860
  * - "email" = Message sent by replying to an email notification
1863
1861
  */
1864
- origin: "web" | "rest" | "import" | "email";
1862
+ readonly origin: "web" | "rest" | "import" | "email";
1865
1863
  /**
1866
1864
  * The contents of the message, as a plain text string without any formatting or attachments.
1867
1865
  * Useful for showing in a conversation list or in notifications.
1868
1866
  */
1869
- plaintext: string;
1867
+ readonly plaintext: string;
1870
1868
  /**
1871
1869
  * The main body of the message, as a list of blocks that are rendered top-to-bottom.
1872
1870
  */
1873
- content: ContentBlock[];
1871
+ readonly content: ContentBlock[];
1874
1872
  /**
1875
1873
  * All the emoji reactions that have been added to this message.
1876
1874
  */
1877
- reactions: ReactionSnapshot[];
1875
+ readonly reactions: ReactionSnapshot[];
1878
1876
  }
1879
1877
 
1880
1878
  export declare function registerPolyfills({ WebSocket }: {
@@ -1990,7 +1988,7 @@ export declare interface SendTextMessageParams {
1990
1988
  * @remarks
1991
1989
  * This is parsed the same way as the text entered in the message field. For example, `*hi*` will appear as `hi` in bold.
1992
1990
  *
1993
- * See the {@link https://talkjs.com/docs/Features/Message_Features/Formatting/ | message formatting documentation} for more details.
1991
+ * See the {@link https://talkjs.com/docs/Features/Messages/Formatting/ | message formatting documentation} for more details.
1994
1992
  */
1995
1993
  text: string;
1996
1994
  }
@@ -2088,7 +2086,7 @@ export declare interface SetUserParams {
2088
2086
  custom?: Record<string, string | null> | null;
2089
2087
  /**
2090
2088
  * An {@link https://www.w3.org/International/articles/language-tags/ | IETF language tag}.
2091
- * See the {@link https://talkjs.com/docs/Features/Language_Support/Localization.html | localization documentation}
2089
+ * See the {@link https://talkjs.com/docs/Features/Language_Support/#localization | localization documentation}
2092
2090
  * Default = the locale selected on the dashboard
2093
2091
  */
2094
2092
  locale?: string;
@@ -2265,7 +2263,7 @@ export declare interface TalkSession {
2265
2263
  * This function does not send any message, it only uploads the file and returns a file token.
2266
2264
  * To send the file in a message, pass the file token in a {@linkcode SendFileBlock} when calling {@linkcode ConversationRef.send}.
2267
2265
  *
2268
- * {@link https://talkjs.com/docs/Reference/Concepts/Message_Content/#sending-message-content | See the documentation} for more information about sending files in messages.
2266
+ * {@link https://talkjs.com/docs/Concepts/Message_Content/#sending-message-content | See the documentation} for more information about sending files in messages.
2269
2267
  *
2270
2268
  * If the file is a video, image, audio file, or voice recording, use one of the other functions like {@linkcode uploadImage} instead.
2271
2269
  *
@@ -2367,8 +2365,8 @@ export declare interface TalkSessionOptions {
2367
2365
  * @public
2368
2366
  */
2369
2367
  export declare interface TextBlock {
2370
- type: "text";
2371
- children: TextNode[];
2368
+ readonly type: "text";
2369
+ readonly children: TextNode[];
2372
2370
  }
2373
2371
 
2374
2372
  /**
@@ -2415,11 +2413,11 @@ export declare type TextNode = string | MarkupNode | BulletListNode | BulletPoin
2415
2413
  * @public
2416
2414
  */
2417
2415
  export declare interface TypingActiveState {
2418
- type: "active";
2416
+ readonly type: "active";
2419
2417
  /**
2420
2418
  * The most recently received typing indicator snapshot, or `null` if you are not a participant in the conversation (including when the conversation does not exist).
2421
2419
  */
2422
- latestSnapshot: TypingSnapshot | null;
2420
+ readonly latestSnapshot: TypingSnapshot | null;
2423
2421
  }
2424
2422
 
2425
2423
  /**
@@ -2494,14 +2492,14 @@ export declare interface TypingSubscription {
2494
2492
  *
2495
2493
  * The promise rejects if the subscription is terminated before it connects.
2496
2494
  */
2497
- connected: Promise<TypingActiveState>;
2495
+ readonly connected: Promise<TypingActiveState>;
2498
2496
  /**
2499
2497
  * Resolves when the subscription permanently stops receiving updates from the server.
2500
2498
  *
2501
2499
  * @remarks
2502
2500
  * This is either because you unsubscribed or because the subscription encountered an unrecoverable error.
2503
2501
  */
2504
- terminated: Promise<UnsubscribedState | ErrorState>;
2502
+ readonly terminated: Promise<UnsubscribedState | ErrorState>;
2505
2503
  /**
2506
2504
  * Unsubscribe from this resource and stop receiving updates.
2507
2505
  *
@@ -2517,7 +2515,7 @@ export declare interface TypingSubscription {
2517
2515
  * @public
2518
2516
  */
2519
2517
  export declare interface UnsubscribedState {
2520
- type: "unsubscribed";
2518
+ readonly type: "unsubscribed";
2521
2519
  }
2522
2520
 
2523
2521
  /**
@@ -2526,11 +2524,11 @@ export declare interface UnsubscribedState {
2526
2524
  * @public
2527
2525
  */
2528
2526
  export declare interface UserActiveState {
2529
- type: "active";
2527
+ readonly type: "active";
2530
2528
  /**
2531
2529
  * The most recently received snapshot for the user, or `null` if the user does not exist yet.
2532
2530
  */
2533
- latestSnapshot: UserSnapshot | null;
2531
+ readonly latestSnapshot: UserSnapshot | null;
2534
2532
  }
2535
2533
 
2536
2534
  /**
@@ -2539,11 +2537,11 @@ export declare interface UserActiveState {
2539
2537
  * @public
2540
2538
  */
2541
2539
  export declare interface UserOnlineActiveState {
2542
- type: "active";
2540
+ readonly type: "active";
2543
2541
  /**
2544
2542
  * The most recently received snapshot
2545
2543
  */
2546
- latestSnapshot: UserOnlineSnapshot | null;
2544
+ readonly latestSnapshot: UserOnlineSnapshot | null;
2547
2545
  }
2548
2546
 
2549
2547
  /**
@@ -2558,7 +2556,7 @@ export declare interface UserOnlineSnapshot {
2558
2556
  /**
2559
2557
  * The user this snapshot relates to
2560
2558
  */
2561
- user: UserSnapshot;
2559
+ readonly user: UserSnapshot;
2562
2560
  /**
2563
2561
  * Whether the user is connected right now
2564
2562
  *
@@ -2566,14 +2564,14 @@ export declare interface UserOnlineSnapshot {
2566
2564
  * Users are considered connected whenever they have an active websocket connection to the TalkJS servers.
2567
2565
  * In practice, this means:
2568
2566
  *
2569
- * People using the {@link https://talkjs.com/docs/Reference/JavaScript_Data_API/ | JS Data API} are considered connected if they are subscribed to something, or if they sent a request in the last few seconds.
2567
+ * People using the {@link https://talkjs.com/docs/SDKs/JavaScript_Data_API/ | JS Data API} are considered connected if they are subscribed to something, or if they sent a request in the last few seconds.
2570
2568
  * Creating a `TalkSession` is not enough to appear connected.
2571
2569
  *
2572
- * People using {@link https://talkjs.com/docs/Reference/Components/ | Components}, are considered connected if they have a UI open.
2570
+ * People using {@link https://talkjs.com/docs/SDKs/ | Components}, are considered connected if they have a UI open.
2573
2571
  *
2574
- * People using the {@link https://talkjs.com/docs/Reference/JavaScript_Chat_SDK/ | JavaScript SDK}, {@link https://talkjs.com/docs/Reference/React_SDK/Installation/ | React SDK}, {@link https://talkjs.com/docs/Reference/React_Native_SDK/Installation/ | React Native SDK}, or {@link https://talkjs.com/docs/Reference/Flutter_SDK/Installation/ | Flutter SDK} are considered connected whenever they have an active `Session` object.
2572
+ * People using the {@link https://talkjs.com/docs/SDKs/JavaScript/Classic/ | JavaScript SDK}, {@link https://talkjs.com/docs/SDKs/React/Classic/ | React SDK}, {@link https://talkjs.com/docs/SDKs/React_Native/ | React Native SDK}, or {@link https://talkjs.com/docs/SDKs/Flutter/ | Flutter SDK} are considered connected whenever they have an active `Session` object.
2575
2573
  */
2576
- isConnected: boolean;
2574
+ readonly isConnected: boolean;
2577
2575
  }
2578
2576
 
2579
2577
  /**
@@ -2609,14 +2607,14 @@ export declare interface UserOnlineSubscription {
2609
2607
  *
2610
2608
  * The promise rejects if the subscription is terminated before it connects.
2611
2609
  */
2612
- connected: Promise<UserOnlineActiveState>;
2610
+ readonly connected: Promise<UserOnlineActiveState>;
2613
2611
  /**
2614
2612
  * Resolves when the subscription permanently stops receiving updates from the server.
2615
2613
  *
2616
2614
  * @remarks
2617
2615
  * This is either because you unsubscribed or because the subscription encountered an unrecoverable error.
2618
2616
  */
2619
- terminated: Promise<UnsubscribedState | ErrorState>;
2617
+ readonly terminated: Promise<UnsubscribedState | ErrorState>;
2620
2618
  /**
2621
2619
  * Unsubscribe from this resource and stop receiving updates.
2622
2620
  *
@@ -2651,8 +2649,6 @@ export declare interface UserRef {
2651
2649
  * Fetching a user snapshot doesn't require any permissions. You can read the public information of any user.
2652
2650
  * Private information, such as email addresses and phone numbers, aren't included in the response.
2653
2651
  *
2654
- * Supports {@link https://talkjs.com/docs/Reference/JavaScript_Data_API/Performance/#automatic-batching | Automatic Batching} and {@link https://talkjs.com/docs/Reference/JavaScript_Data_API/Performance/#cached-fetch | Cached Fetch}
2655
- *
2656
2652
  * @returns A snapshot of the user's public attributes, or null if the user doesn't exist.
2657
2653
  */
2658
2654
  get(): Promise<UserSnapshot | null>;
@@ -2702,7 +2698,7 @@ export declare interface UserRef {
2702
2698
  * A snapshot of a user's attributes at a given moment in time.
2703
2699
  *
2704
2700
  * @remarks
2705
- * Users also have private information, such as email addresses and phone numbers, but these are only exposed on the {@link https://talkjs.com/docs/Reference/REST_API/Getting_Started/Introduction/ | REST API}.
2701
+ * Users also have private information, such as email addresses and phone numbers, but these are only exposed on the {@link https://talkjs.com/docs/REST_API/ | REST API}.
2706
2702
  *
2707
2703
  * Snapshots are immutable and we try to reuse them when possible. You should only re-render your UI when `oldSnapshot !== newSnapshot`.
2708
2704
  *
@@ -2712,31 +2708,31 @@ export declare interface UserSnapshot {
2712
2708
  /**
2713
2709
  * The unique ID that is used to identify the user in TalkJS
2714
2710
  */
2715
- id: string;
2711
+ readonly id: string;
2716
2712
  /**
2717
2713
  * The user's name, which is displayed on the TalkJS UI
2718
2714
  */
2719
- name: string;
2715
+ readonly name: string;
2720
2716
  /**
2721
2717
  * Custom metadata you have set on the user
2722
2718
  */
2723
- custom: Record<string, string>;
2719
+ readonly custom: Record<string, string>;
2724
2720
  /**
2725
2721
  * An {@link https://www.w3.org/International/articles/language-tags/ | IETF language tag}.
2726
- * For more information, see: {@link https://talkjs.com/docs/Features/Language_Support/Localization.html | Localization}.
2722
+ * For more information, see: {@link https://talkjs.com/docs/Features/Language_Support/#localization | Localization}.
2727
2723
  *
2728
2724
  * When `locale` is null, the app's default locale will be used
2729
2725
  */
2730
- locale: string | null;
2726
+ readonly locale: string | null;
2731
2727
  /**
2732
2728
  * An optional URL to a photo that is displayed as the user's avatar
2733
2729
  */
2734
- photoUrl: string | null;
2730
+ readonly photoUrl: string | null;
2735
2731
  /**
2736
2732
  * TalkJS supports multiple sets of settings for users, called "roles". Roles allow you to change the behavior of TalkJS for different users.
2737
2733
  * You have full control over which user gets which configuration.
2738
2734
  */
2739
- role: string;
2735
+ readonly role: string;
2740
2736
  /**
2741
2737
  * The default message a person sees when starting a chat with this user
2742
2738
  *
@@ -2744,7 +2740,7 @@ export declare interface UserSnapshot {
2744
2740
  * Welcome messages are rendered in the UI as messages, but they are not real messages.
2745
2741
  * This means they do not appear when you list messages using the REST API or JS Data API, and you cannot reply or react to them.
2746
2742
  */
2747
- welcomeMessage: string | null;
2743
+ readonly welcomeMessage: string | null;
2748
2744
  }
2749
2745
 
2750
2746
  /**
@@ -2774,14 +2770,14 @@ export declare interface UserSubscription {
2774
2770
  /**
2775
2771
  * Resolves when the subscription starts receiving updates from the server.
2776
2772
  */
2777
- connected: Promise<UserActiveState>;
2773
+ readonly connected: Promise<UserActiveState>;
2778
2774
  /**
2779
2775
  * Resolves when the subscription permanently stops receiving updates from the server.
2780
2776
  *
2781
2777
  * @remarks
2782
2778
  * This is either because you unsubscribed or because the subscription encountered an unrecoverable error.
2783
2779
  */
2784
- terminated: Promise<UnsubscribedState | ErrorState>;
2780
+ readonly terminated: Promise<UnsubscribedState | ErrorState>;
2785
2781
  /**
2786
2782
  * Unsubscribe from this resource and stop receiving updates.
2787
2783
  *
@@ -2806,36 +2802,36 @@ export declare interface UserSubscription {
2806
2802
  * @public
2807
2803
  */
2808
2804
  export declare interface VideoBlock {
2809
- type: "file";
2810
- subtype: "video";
2805
+ readonly type: "file";
2806
+ readonly subtype: "video";
2811
2807
  /**
2812
2808
  * An encoded identifier for this file. Use in {@link SendFileBlock} to send this video in another message.
2813
2809
  */
2814
- fileToken: FileToken;
2810
+ readonly fileToken: FileToken;
2815
2811
  /**
2816
2812
  * The URL where you can fetch the file.
2817
2813
  */
2818
- url: string;
2814
+ readonly url: string;
2819
2815
  /**
2820
2816
  * The size of the file in bytes.
2821
2817
  */
2822
- size: number;
2818
+ readonly size: number;
2823
2819
  /**
2824
2820
  * The name of the video file, including file extension.
2825
2821
  */
2826
- filename: string;
2822
+ readonly filename: string;
2827
2823
  /**
2828
2824
  * The width of the video in pixels, if known.
2829
2825
  */
2830
- width?: number;
2826
+ readonly width?: number;
2831
2827
  /**
2832
2828
  * The height of the video in pixels, if known.
2833
2829
  */
2834
- height?: number;
2830
+ readonly height?: number;
2835
2831
  /**
2836
2832
  * The duration of the video in seconds, if known.
2837
2833
  */
2838
- duration?: number;
2834
+ readonly duration?: number;
2839
2835
  }
2840
2836
 
2841
2837
  export declare interface VideoFileMetadata {
@@ -2877,28 +2873,28 @@ export declare interface VideoFileMetadata {
2877
2873
  * @public
2878
2874
  */
2879
2875
  export declare interface VoiceBlock {
2880
- type: "file";
2881
- subtype: "voice";
2876
+ readonly type: "file";
2877
+ readonly subtype: "voice";
2882
2878
  /**
2883
2879
  * An encoded identifier for this file. Use in {@link SendFileBlock} to send this voice recording in another message.
2884
2880
  */
2885
- fileToken: FileToken;
2881
+ readonly fileToken: FileToken;
2886
2882
  /**
2887
2883
  * The URL where you can fetch the file
2888
2884
  */
2889
- url: string;
2885
+ readonly url: string;
2890
2886
  /**
2891
2887
  * The size of the file in bytes
2892
2888
  */
2893
- size: number;
2889
+ readonly size: number;
2894
2890
  /**
2895
2891
  * The name of the file, including file extension
2896
2892
  */
2897
- filename: string;
2893
+ readonly filename: string;
2898
2894
  /**
2899
2895
  * The duration of the voice recording in seconds, if known
2900
2896
  */
2901
- duration?: number;
2897
+ readonly duration?: number;
2902
2898
  }
2903
2899
 
2904
2900
  export declare interface VoiceRecordingFileMetadata {