import { ThreadType, type API } from 'zca-js'; import type { IDataObject, INodeExecutionData } from 'n8n-workflow'; import type { FileDownloadOptions } from './fileHelper'; import { type VideoSendPlan } from './videoSendHelper'; export type AlbumMediaItem = { type: 'video'; url: string; thumbnailUrl?: string; idInGroup?: number; durationMs?: number; width?: number; height?: number; fileSize?: number; msgId?: string; ts?: number; rawParams?: string; childnumber?: number; } | { type: 'photo'; url: string; idInGroup?: number; msgId?: string; ts?: number; rawParams?: string; childnumber?: number; }; export type MediaAlbumSendPlan = { kind: 'none'; } | VideoSendPlan | { kind: 'photoAlbum'; urls: string[]; inputSource: 'field'; } | { kind: 'mixedAlbum'; items: AlbumMediaItem[]; inputSource: 'field'; }; export type MixedAlbumSendResult = { videoResults: unknown[]; photoResults: unknown[]; captionResults: unknown[]; sendMode: 'forwardMixedAlbum'; albumLayoutAchieved: boolean; forwardAttempts?: string[]; skipForwardReason?: string; }; /** Resolve album items — ưu tiên `albumItems` typed từ trigger. */ export declare function resolveAlbumItemsFromJson(json: IDataObject, fieldUrls: string[]): AlbumMediaItem[]; export declare function planMediaAlbumSend(items: INodeExecutionData[], index: number, fieldUrlsRaw: string): MediaAlbumSendPlan; /** Gửi album mixed (ảnh + video) — cùng groupLayoutId, forward từng phần tử theo idInGroup. */ export declare function sendMixedAlbumToThreads(api: API, threadIds: string[], threadType: ThreadType, items: AlbumMediaItem[], sourceJson: IDataObject, caption: string, options?: { delayMs?: number; downloadOptions?: FileDownloadOptions; }): Promise;