stream-chat-angular 3.5.1 → 3.6.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.
@@ -1,6 +1,6 @@
1
1
  import { NgZone } from '@angular/core';
2
2
  import { Observable } from 'rxjs';
3
- import { Channel, ChannelResponse, OwnUserResponse, UserResponse } from 'stream-chat';
3
+ import { Channel, ChannelResponse, ConnectAPIResponse, OwnUserResponse, UserResponse } from 'stream-chat';
4
4
  import { AppSettings, Event, StreamChat, TokenOrProvider } from 'stream-chat';
5
5
  import { NotificationService } from './notification.service';
6
6
  import { DefaultStreamChatGenerics } from './types';
@@ -38,10 +38,16 @@ export declare class ChatClientService<T extends DefaultStreamChatGenerics = Def
38
38
  * Emits the list of pending invites of the user. It emits every pending invitation during initialization and then extends the list when a new invite is received. More information can be found in the [channel invitations](../code-examples/channel-invites.mdx) guide.
39
39
  */
40
40
  pendingInvites$: Observable<(ChannelResponse<T> | Channel<T>)[]>;
41
+ /**
42
+ * Emits the current chat user
43
+ */
44
+ user$: Observable<UserResponse<T> | undefined>;
41
45
  private notificationSubject;
42
46
  private connectionStateSubject;
43
47
  private appSettingsSubject;
44
48
  private pendingInvitesSubject;
49
+ private userSubject;
50
+ private subscriptions;
45
51
  constructor(ngZone: NgZone, notificationService: NotificationService);
46
52
  /**
47
53
  * Creates a [`StreamChat`](https://github.com/GetStream/stream-chat-js/blob/668b3e5521339f4e14fc657834531b4c8bf8176b/src/client.ts#L124) instance using the provided `apiKey`, and connects a user with the given meta data and token. More info about [connecting users](https://getstream.io/chat/docs/javascript/init_and_users/?language=javascript) can be found in the platform documentation.
@@ -49,7 +55,7 @@ export declare class ChatClientService<T extends DefaultStreamChatGenerics = Def
49
55
  * @param userOrId
50
56
  * @param userTokenOrProvider
51
57
  */
52
- init(apiKey: string, userOrId: string | OwnUserResponse<T> | UserResponse<T>, userTokenOrProvider: TokenOrProvider): Promise<void>;
58
+ init(apiKey: string, userOrId: string | OwnUserResponse<T> | UserResponse<T>, userTokenOrProvider: TokenOrProvider): ConnectAPIResponse<T>;
53
59
  /**
54
60
  * Disconnects the current user, and closes the WebSocket connection. Useful when disconnecting a chat user, use in combination with [`reset`](./ChannelService.mdx/#reset).
55
61
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stream-chat-angular",
3
- "version": "3.5.1",
3
+ "version": "3.6.0",
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 = '3.5.1';
1
+ export const version = '3.6.0';