stream-chat-angular 4.31.0 → 4.31.2

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.
@@ -3,7 +3,7 @@ import { Observable } from 'rxjs';
3
3
  import { Attachment, Channel, ChannelFilters, ChannelOptions, ChannelResponse, ChannelSort, Event, UserResponse } from 'stream-chat';
4
4
  import { ChatClientService, ClientEvent } from './chat-client.service';
5
5
  import { NotificationService } from './notification.service';
6
- import { AttachmentUpload, DefaultStreamChatGenerics, MessageReactionType, StreamMessage } from './types';
6
+ import { AttachmentUpload, ChannelQueryState, DefaultStreamChatGenerics, MessageReactionType, StreamMessage } from './types';
7
7
  import * as i0 from "@angular/core";
8
8
  /**
9
9
  * The `ChannelService` provides data and interaction for the channel list and message list.
@@ -42,6 +42,10 @@ export declare class ChannelService<T extends DefaultStreamChatGenerics = Defaul
42
42
  * Our platform documentation covers the topic of [channel events](https://getstream.io/chat/docs/javascript/event_object/?language=javascript#events) in depth.
43
43
  */
44
44
  channels$: Observable<Channel<T>[] | undefined>;
45
+ /**
46
+ * The result of the latest channel query request.
47
+ */
48
+ channelQueryState$: Observable<ChannelQueryState | undefined>;
45
49
  /**
46
50
  * Emits the currently active channel.
47
51
  *
@@ -174,10 +178,12 @@ export declare class ChannelService<T extends DefaultStreamChatGenerics = Defaul
174
178
  private shouldSetActiveChannel;
175
179
  private clientEventsSubscription;
176
180
  private isStateRecoveryInProgress;
181
+ private channelQueryStateSubject;
177
182
  private channelListSetter;
178
183
  private messageListSetter;
179
184
  private threadListSetter;
180
185
  private parentMessageSetter;
186
+ private dismissErrorNotification?;
181
187
  constructor(chatClientService: ChatClientService<T>, ngZone: NgZone, notificationService: NotificationService);
182
188
  /**
183
189
  * If set to false, read events won't be sent as new messages are received. If set to true active channel (if any) will immediately be marked as read.
@@ -222,7 +228,9 @@ export declare class ChannelService<T extends DefaultStreamChatGenerics = Defaul
222
228
  * @param shouldSetActiveChannel Decides if the first channel in the result should be made as an active channel, or no channel should be marked as active
223
229
  * @returns the list of channels found by the query
224
230
  */
225
- init(filters: ChannelFilters<T>, sort?: ChannelSort<T>, options?: ChannelOptions, shouldSetActiveChannel?: boolean): Promise<Channel<T>[]>;
231
+ init(filters: ChannelFilters<T>, sort?: ChannelSort<T>, options?: ChannelOptions & {
232
+ keepAliveChannels$OnError?: boolean;
233
+ }, shouldSetActiveChannel?: boolean): Promise<Channel<T>[]>;
226
234
  /**
227
235
  * Resets the `activeChannel$`, `channels$` and `activeChannelMessages$` Observables. Useful when disconnecting a chat user, use in combination with [`disconnectUser`](./ChatClientService.mdx/#disconnectuser).
228
236
  */
@@ -15,13 +15,13 @@ export declare class DateParserService {
15
15
  /**
16
16
  * Return a user-friendly string representation of the date (year, month and date)
17
17
  * @param date
18
- * @returns
18
+ * @returns The parsed date
19
19
  */
20
20
  parseDate(date: Date): string;
21
21
  /**
22
22
  * Return a user-friendly string representation of the date and time
23
23
  * @param date
24
- * @returns
24
+ * @returns The parsed date
25
25
  */
26
26
  parseDateTime(date: Date): string;
27
27
  static ɵfac: i0.ɵɵFactoryDeclaration<DateParserService, never>;
@@ -73,6 +73,7 @@ export declare class MessageListComponent implements AfterViewChecked, OnChanges
73
73
  private usersTypingInChannel$;
74
74
  private usersTypingInThread$;
75
75
  private isLatestMessageInList;
76
+ private channelId?;
76
77
  constructor(channelService: ChannelService, chatClientService: ChatClientService, customTemplatesService: CustomTemplatesService, dateParser: DateParserService);
77
78
  ngOnInit(): void;
78
79
  ngOnChanges(changes: SimpleChanges): void;
package/lib/types.d.ts CHANGED
@@ -240,4 +240,8 @@ export declare type DateSeparatorContext = {
240
240
  date: Date;
241
241
  parsedDate: string;
242
242
  };
243
+ export declare type ChannelQueryState = {
244
+ state: 'in-progress' | 'success' | 'error';
245
+ error?: unknown;
246
+ };
243
247
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stream-chat-angular",
3
- "version": "4.31.0",
3
+ "version": "4.31.2",
4
4
  "description": "Angular components to create chat conversations or livestream style chat",
5
5
  "author": "GetStream",
6
6
  "homepage": "https://getstream.io/chat/",
@@ -1 +1 @@
1
- export const version = '4.31.0';
1
+ export const version = '4.31.2';