-
Notifications
You must be signed in to change notification settings - Fork 78
[Chat] Update inline image / file sharing data type names #3846
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 22 commits
6099188
f93220a
7cb421f
ad34525
45e1dc4
b1341ff
129d4eb
2c781e7
38cc789
fb34297
d0c625b
478ced6
09850f2
fa5a889
0c588a8
0104ac6
0b9d923
3267d14
0600d9c
a8feb21
87fbc0f
4ccf842
de0bfa1
139388f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "type": "prerelease", | ||
| "area": "improvement", | ||
| "workstream": "Inline Image and file sharing", | ||
| "comment": "Rename inlineImage / file card types as per internal reviews", | ||
| "packageName": "@azure/communication-react", | ||
| "email": "3941071+emlynmac@users.noreply.github.com", | ||
| "dependentChangeType": "patch" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "type": "prerelease", | ||
| "area": "improvement", | ||
| "workstream": "Inline Image and file sharing", | ||
| "comment": "Rename inlineImage / file card types as per internal reviews", | ||
| "packageName": "@azure/communication-react", | ||
| "email": "3941071+emlynmac@users.noreply.github.com", | ||
| "dependentChangeType": "patch" | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -150,6 +150,9 @@ export interface AttachmentDownloadResult { | |
| blobUrl: string; | ||
| } | ||
|
|
||
| // @beta | ||
| export type AttachmentMetadata = FileMetadata | /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */ InlineImageMetadata; | ||
|
emlynmac marked this conversation as resolved.
|
||
|
|
||
| // @public | ||
| export type AvatarPersonaData = { | ||
| text?: string; | ||
|
|
@@ -227,15 +230,6 @@ export interface BaseCustomStyles { | |
| root?: IStyle; | ||
| } | ||
|
|
||
| // @beta | ||
| export interface BaseFileMetadata { | ||
| attachmentType: FileMetadataAttachmentType; | ||
| extension: string; | ||
| id: string; | ||
| name: string; | ||
| url: string; | ||
| } | ||
|
|
||
| // @beta | ||
| export interface BlockedMessage extends MessageCommon { | ||
| // (undocumented) | ||
|
|
@@ -956,7 +950,7 @@ export interface CallWithChatAdapterManagement { | |
| // @beta (undocumented) | ||
| registerActiveFileUploads: (files: File[]) => FileUploadManager[]; | ||
| // @beta (undocumented) | ||
| registerCompletedFileUploads: (metadata: FileMetadata[]) => FileUploadManager[]; | ||
| registerCompletedFileUploads: (metadata: AttachmentMetadata[]) => FileUploadManager[]; | ||
| removeParticipant(userId: string): Promise<void>; | ||
| // @beta | ||
| removeParticipant(participant: CommunicationIdentifier): Promise<void>; | ||
|
|
@@ -988,7 +982,7 @@ export interface CallWithChatAdapterManagement { | |
| // @beta (undocumented) | ||
| updateFileUploadErrorMessage: (id: string, errorMessage: string) => void; | ||
| // @beta (undocumented) | ||
| updateFileUploadMetadata: (id: string, metadata: FileMetadata) => void; | ||
| updateFileUploadMetadata: (id: string, metadata: AttachmentMetadata) => void; | ||
| // @beta (undocumented) | ||
| updateFileUploadProgress: (id: string, progress: number) => void; | ||
| updateMessage(messageId: string, content: string, metadata?: Record<string, string>): Promise<void>; | ||
|
|
@@ -1532,7 +1526,7 @@ export interface ChatAdapterThreadManagement { | |
| sendTypingIndicator(): Promise<void>; | ||
| setTopic(topicName: string): Promise<void>; | ||
| updateMessage(messageId: string, content: string, metadata?: Record<string, string>, options?: { | ||
| attachedFilesMetadata?: FileMetadata[]; | ||
| attachedFilesMetadata?: AttachmentMetadata[]; | ||
| }): Promise<void>; | ||
| } | ||
|
|
||
|
|
@@ -1542,6 +1536,9 @@ export type ChatAdapterUiState = { | |
| fileUploads?: FileUploadsUiState; | ||
| }; | ||
|
|
||
| // @beta | ||
| export type ChatAttachmentType = 'file' | /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */ 'inlineImage' | 'unknown'; | ||
|
|
||
| // @public | ||
| export type ChatBaseSelectorProps = { | ||
| threadId: string; | ||
|
|
@@ -1649,7 +1646,7 @@ export type ChatHandlers = { | |
| onLoadPreviousChatMessages: (messagesToLoad: number) => Promise<boolean>; | ||
| onUpdateMessage: (messageId: string, content: string, options?: { | ||
| metadata?: Record<string, string>; | ||
| attachedFilesMetadata?: FileMetadata[]; | ||
| attachedFilesMetadata?: AttachmentMetadata[]; | ||
|
emlynmac marked this conversation as resolved.
Outdated
|
||
| }) => Promise<void>; | ||
| onDeleteMessage: (messageId: string) => Promise<void>; | ||
| }; | ||
|
|
@@ -1658,8 +1655,6 @@ export type ChatHandlers = { | |
| export interface ChatMessage extends MessageCommon { | ||
| // (undocumented) | ||
| attached?: MessageAttachedStatus; | ||
| // @beta | ||
| attachedFilesMetadata?: FileMetadata[]; | ||
| // (undocumented) | ||
| clientMessageId?: string; | ||
| // (undocumented) | ||
|
|
@@ -1672,6 +1667,10 @@ export interface ChatMessage extends MessageCommon { | |
| editedOn?: Date; | ||
| // (undocumented) | ||
| failureReason?: string; | ||
| // @beta | ||
| files?: FileMetadata[]; | ||
| // @beta | ||
| inlineImages?: InlineImageMetadata[]; | ||
| // (undocumented) | ||
| messageType: 'chat'; | ||
| metadata?: Record<string, string>; | ||
|
|
@@ -2697,20 +2696,18 @@ export interface FileDownloadError { | |
| } | ||
|
|
||
| // @beta | ||
| export type FileDownloadHandler = (userId: string, fileMetadata: FileMetadata) => Promise<URL | FileDownloadError>; | ||
| export type FileDownloadHandler = (userId: string, fileMetadata: AttachmentMetadata) => Promise<URL | FileDownloadError>; | ||
|
|
||
| // @beta | ||
| export type FileMetadata = FileSharingMetadata | /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */ ImageFileMetadata; | ||
|
|
||
| // @beta (undocumented) | ||
| export type FileMetadataAttachmentType = 'fileSharing' | /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */ 'inlineImage' | 'unknown'; | ||
|
|
||
| // @beta | ||
| export interface FileSharingMetadata extends BaseFileMetadata { | ||
| export interface FileMetadata { | ||
| // (undocumented) | ||
| attachmentType: 'fileSharing'; | ||
| attachmentType: 'file'; | ||
| extension: string; | ||
| id: string; | ||
| name: string; | ||
| // (undocumented) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Optional: Would be nice to add document of what this payload is about and what are the keys and values.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The type is documented: https://github.com/Azure/communication-ui-library/pull/3846/files/0c588a84d91b17d2c283c66bb7bc83abfc6a1bcb#diff-d257e524dc363b5145a6b1c8b21f6f13fa9238b80aa0e665ce5505edc58ee9d9R29 |
||
| payload?: Record<string, string>; | ||
| url: string; | ||
| } | ||
|
|
||
| // @beta | ||
|
|
@@ -2730,11 +2727,11 @@ export interface FileUploadAdapter { | |
| // (undocumented) | ||
| registerActiveFileUploads: (files: File[]) => FileUploadManager[]; | ||
| // (undocumented) | ||
| registerCompletedFileUploads: (metadata: FileMetadata[]) => FileUploadManager[]; | ||
| registerCompletedFileUploads: (metadata: AttachmentMetadata[]) => FileUploadManager[]; | ||
| // (undocumented) | ||
| updateFileUploadErrorMessage: (id: string, errorMessage: string) => void; | ||
| // (undocumented) | ||
| updateFileUploadMetadata: (id: string, metadata: FileMetadata) => void; | ||
| updateFileUploadMetadata: (id: string, metadata: AttachmentMetadata) => void; | ||
| // (undocumented) | ||
| updateFileUploadProgress: (id: string, progress: number) => void; | ||
| } | ||
|
|
@@ -2752,7 +2749,7 @@ export type FileUploadHandler = (userId: string, fileUploads: FileUploadManager[ | |
| export interface FileUploadManager { | ||
| file?: File; | ||
| id: string; | ||
| notifyUploadCompleted: (metadata: FileMetadata) => void; | ||
| notifyUploadCompleted: (metadata: AttachmentMetadata) => void; | ||
| notifyUploadFailed: (message: string) => void; | ||
| notifyUploadProgressChanged: (value: number) => void; | ||
| } | ||
|
|
@@ -2762,7 +2759,7 @@ export interface FileUploadState { | |
| error?: FileUploadError; | ||
| filename: string; | ||
| id: string; | ||
| metadata?: FileMetadata; | ||
| metadata?: AttachmentMetadata; | ||
| progress: number; | ||
| } | ||
|
|
||
|
|
@@ -2871,14 +2868,6 @@ export interface _Identifiers { | |
| videoTile: string; | ||
| } | ||
|
|
||
| // @beta | ||
| export interface ImageFileMetadata extends BaseFileMetadata { | ||
| // (undocumented) | ||
| attachmentType: 'inlineImage'; | ||
| // (undocumented) | ||
| previewUrl?: string; | ||
| } | ||
|
|
||
| // @beta | ||
| export const ImageGallery: (props: ImageGalleryProps) => JSX.Element; | ||
|
|
||
|
|
@@ -2921,6 +2910,16 @@ export interface IncomingCallState { | |
| startTime: Date; | ||
| } | ||
|
|
||
| // @beta | ||
| export interface InlineImageMetadata { | ||
| // (undocumented) | ||
| attachmentType: 'inlineImage'; | ||
| id: string; | ||
| // (undocumented) | ||
| previewUrl?: string; | ||
| url: string; | ||
| } | ||
|
|
||
| // @public | ||
| export type IsCaptionLanguageChangedListener = (event: { | ||
| activeCaptionLanguage: string; | ||
|
|
@@ -3150,7 +3149,7 @@ export type MessageThreadProps = { | |
| onLoadPreviousChatMessages?: (messagesToLoad: number) => Promise<boolean>; | ||
| onRenderMessage?: (messageProps: MessageProps, messageRenderer?: MessageRenderer) => JSX.Element; | ||
| onRenderFileDownloads?: (userId: string, message: ChatMessage) => JSX.Element; | ||
| onFetchAttachments?: (attachments: FileMetadata[]) => Promise<AttachmentDownloadResult[]>; | ||
| onFetchAttachments?: (attachments: AttachmentMetadata[]) => Promise<AttachmentDownloadResult[]>; | ||
| onUpdateMessage?: UpdateMessageCallback; | ||
| onCancelEditMessage?: CancelEditCallback; | ||
| onDeleteMessage?: (messageId: string) => Promise<void>; | ||
|
|
@@ -4002,7 +4001,7 @@ export interface UnsupportedOperatingSystemStrings { | |
| // @public | ||
| export type UpdateMessageCallback = (messageId: string, content: string, options?: { | ||
| metadata?: Record<string, string>; | ||
| attachedFilesMetadata?: FileMetadata[]; | ||
| attachedFilesMetadata?: AttachmentMetadata[]; | ||
| }) => Promise<void>; | ||
|
|
||
| // @public | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.