stream-chat-angular 2.21.0 → 2.22.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.
@@ -27,6 +27,7 @@ export declare class AttachmentListComponent implements OnChanges {
27
27
  isImage(attachment: Attachment): boolean;
28
28
  isFile(attachment: Attachment): boolean;
29
29
  isGallery(attachment: Attachment): boolean;
30
+ isVideo(attachment: Attachment): boolean | "" | undefined;
30
31
  isCard(attachment: Attachment): boolean;
31
32
  imageLoaded(): void;
32
33
  hasFileSize(attachment: Attachment<DefaultAttachmentType>): boolean | "" | 0 | undefined;
@@ -2,8 +2,8 @@ import { NgZone } from '@angular/core';
2
2
  import { Observable } from 'rxjs';
3
3
  import { Attachment, Channel, ChannelFilters, ChannelOptions, ChannelResponse, ChannelSort, Event, UserResponse } from 'stream-chat';
4
4
  import { ChatClientService, Notification } from './chat-client.service';
5
- import { MessageReactionType } from './message-reactions/message-reactions.component';
6
5
  import { AttachmentUpload, StreamMessage } from './types';
6
+ import { MessageReactionType } from './message-reactions/message-reactions.component';
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. TEST
@@ -119,6 +119,26 @@ export declare class ChannelService {
119
119
  * Custom event handler to call if a new message received from a channel that is being watched, provide an event handler if you want to override the [default channel list ordering](./ChannelService.mdx/#channels)
120
120
  */
121
121
  customNewMessageHandler?: (event: Event, channel: Channel, channelListSetter: (channels: (Channel | ChannelResponse)[]) => void, messageListSetter: (messages: StreamMessage[]) => void, threadListSetter: (messages: StreamMessage[]) => void, parentMessageSetter: (message: StreamMessage | undefined) => void) => void;
122
+ /**
123
+ * You can override the default file upload request - you can use this to upload files to your own CDN
124
+ */
125
+ customFileUploadRequest?: (file: File, channel: Channel) => Promise<{
126
+ file: string;
127
+ }>;
128
+ /**
129
+ * You can override the default image upload request - you can use this to upload images to your own CDN
130
+ */
131
+ customImageUploadRequest?: (file: File, channel: Channel) => Promise<{
132
+ file: string;
133
+ }>;
134
+ /**
135
+ * You can override the default file delete request - override this if you use your own CDN
136
+ */
137
+ customFileDeleteRequest?: (url: string, channel: Channel) => Promise<void>;
138
+ /**
139
+ * You can override the default image delete request - override this if you use your own CDN
140
+ */
141
+ customImageDeleteRequest?: (url: string, channel: Channel) => Promise<void>;
122
142
  private channelsSubject;
123
143
  private activeChannelSubject;
124
144
  private activeChannelMessagesSubject;
package/lib/types.d.ts CHANGED
@@ -41,7 +41,7 @@ export declare type AttachmentUpload = {
41
41
  file: File;
42
42
  state: 'error' | 'success' | 'uploading';
43
43
  url?: string;
44
- type: 'image' | 'file';
44
+ type: 'image' | 'file' | 'video';
45
45
  previewUri?: string | ArrayBuffer;
46
46
  };
47
47
  export declare type MentionAutcompleteListItemContext = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stream-chat-angular",
3
- "version": "2.21.0",
3
+ "version": "2.22.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 = '2.21.0';
1
+ export const version = '2.22.0';