import type { IDataObject } from 'n8n-workflow'; export interface ITwentyApiResponse { data: IDataObject | IDataObject[]; pageInfo?: { hasNextPage: boolean; endCursor: string; }; } export interface ICompany { id?: string; name: string; domainName?: string; address?: string; employees?: number; linkedinUrl?: string; xUrl?: string; annualRecurringRevenue?: number; idealCustomerProfile?: boolean; createdAt?: string; updatedAt?: string; } export interface IPerson { id?: string; firstName: string; lastName: string; email?: string; phone?: string; city?: string; jobTitle?: string; linkedinUrl?: string; avatarUrl?: string; companyId?: string; createdAt?: string; updatedAt?: string; } export type OpportunityStage = 'NEW' | 'SCREENING' | 'MEETING' | 'PROPOSAL' | 'CUSTOMER' | string; export interface IOpportunity { id?: string; name: string; amount?: number; closeDate?: string; stage?: OpportunityStage; companyId?: string; pointOfContactId?: string; createdAt?: string; updatedAt?: string; } export interface INote { id?: string; title: string; body: string; position?: number; createdAt?: string; updatedAt?: string; } export type TaskStatus = 'TODO' | 'IN_PROGRESS' | 'DONE'; export interface ITask { id?: string; title: string; body?: string; status?: TaskStatus; dueAt?: string; assigneeId?: string; position?: number; createdAt?: string; updatedAt?: string; } export type ActivityType = 'Call' | 'Email' | 'Meeting' | 'Note' | 'Task'; export interface IActivity { id?: string; title: string; type: ActivityType; body?: string; dueAt?: string; completedAt?: string; reminderAt?: string; companyId?: string; personId?: string; createdAt?: string; updatedAt?: string; } export type SearchObjectType = 'people' | 'companies' | 'opportunities' | 'notes' | 'tasks'; export interface ISearchResult { objectType: SearchObjectType; records: IDataObject[]; } export interface ITwentyCrmCredentials { apiUrl: string; apiKey: string; } export type TwentyResource = 'company' | 'person' | 'opportunity' | 'note' | 'task' | 'activity' | 'bulk' | 'search'; export type TwentyOperation = 'create' | 'delete' | 'get' | 'getAll' | 'update' | 'upsert' | 'bulkCreate' | 'bulkUpdate' | 'bulkDelete' | 'search';