import type { IDataObject, IExecuteFunctions, INodeExecutionData } from 'n8n-workflow'; import { NodeOperationError } from 'n8n-workflow'; import { ThreadType, type API } from 'zca-js'; import { buildDownloadOptionsFromCredentials } from './fileHelper'; export type ZaloSendErrorMeta = { itemIndex: number; operation: string; threadId: string; threadType: ThreadType; sendPath?: string; attachmentUrls?: string[]; forwardAttempts?: string[]; json?: IDataObject; /** Thêm sau khi diagnose getGroupInfo */ diagnostic?: string; }; declare function resolveThreadId(items: INodeExecutionData[], index: number, threadId: unknown): string; declare function resolveThreadType(context: IExecuteFunctions, index: number): ThreadType; declare function wrapZaloSendError(context: IExecuteFunctions, error: Error, meta: ZaloSendErrorMeta): NodeOperationError; export declare function executeZaloMessageOperation(context: IExecuteFunctions, api: API, items: INodeExecutionData[], index: number, operation: string, getDownloadOptions: () => Promise>): Promise<{ outputs: INodeExecutionData[]; skipDefaultPush: boolean; response?: unknown; }>; export { wrapZaloSendError, resolveThreadType, resolveThreadId };