communication-react-19
Version:
React library for building modern communication user experiences utilizing Azure Communication Services (React 19 compatible fork)
80 lines • 1.99 kB
TypeScript
import { AttachmentUploadTask, AttachmentSelectionHandler, AttachmentActionHandler } from "../../../../../react-components/src";
import { AttachmentMetadata, AttachmentMetadataInProgress, AttachmentProgressError } from "../../../../../acs-ui-common/src";
/**
* @internal
*/
export interface AttachmentUpload extends AttachmentUploadTask {
metadata: AttachmentMetadataInProgress;
}
/**
* @private
*/
export declare enum AttachmentUploadActionType {
Set = "set",
Progress = "progress",
Completed = "completed",
Failed = "failed",
Remove = "remove",
Clear = "clear"
}
/**
* @private
*/
export interface Action {
type: AttachmentUploadActionType;
}
/**
* @private
*/
interface SetAction extends Action {
type: AttachmentUploadActionType.Set;
newUploads: AttachmentUpload[];
}
/**
* @private
*/
export interface ProgressAction extends Action {
type: AttachmentUploadActionType.Progress;
taskId: string;
progress: number;
}
/**
* @private
*/
export interface CompleteAction extends Action {
type: AttachmentUploadActionType.Completed;
taskId: string;
id: string;
url: string;
}
/**
* @private
*/
export interface FailedAction extends Action {
type: AttachmentUploadActionType.Failed;
taskId: string;
message: string;
}
/**
* @private
*/
export interface RemoveAction extends Action {
type: AttachmentUploadActionType.Remove;
id: string;
}
/**
* @private
*/
export interface ClearAction extends Action {
type: AttachmentUploadActionType.Clear;
}
/**
* @private
*/
type Actions = SetAction | ProgressAction | CompleteAction | FailedAction | RemoveAction | ClearAction;
/**
* @internal
*/
export declare const AttachmentUploadReducer: (state: AttachmentUpload[], action: Actions) => AttachmentUpload[];
export type { AttachmentMetadata, AttachmentSelectionHandler, AttachmentActionHandler, AttachmentUploadTask, AttachmentProgressError };
//# sourceMappingURL=AttachmentUpload.d.ts.map