fix: ensure retro-compatibility (we hope)

This commit is contained in:
Mohamed Marrouchi 2025-01-21 14:25:47 +01:00
parent f01d5a4ee3
commit be1a79f3ea
2 changed files with 19 additions and 2 deletions

View File

@ -235,6 +235,19 @@ export default abstract class ChannelHandler<
event: EventWrapper<any, any, N>,
): Promise<AttachmentFile | undefined>;
/**
* Fetch the subscriber profile data
*
* @deprecated
* @param event - The message event received
* @returns {Promise<Subscriber>} - The channel's response, otherwise an error
*/
async getUserData(
event: EventWrapper<any, any, N>,
): Promise<SubscriberCreateDto> {
return await this.getSubscriberData(event);
}
/**
* Fetch the subscriber profile data
*

View File

@ -31,7 +31,11 @@ export type AttachmentRef =
url: string;
};
export interface AttachmentPayload {
/** IMPORTANT: No need to use generic type here */
export interface AttachmentPayload<T extends AttachmentRef = AttachmentRef> {
type: FileType;
payload: AttachmentRef;
payload: T;
}
/** @deprecated */
export type WithUrl<A> = A & { url?: string };