declare module 'logger'; declare module 'iso-639-1'; declare module 'newrelic'; declare module 'html-to-docx'; interface Logger { debug(text: string): void; info(text: string): void; warn(text: string): void; error(text: string): void; } interface Models { [key: string]: typeof DbData; // Assuming all models extend DbData Post?: typeof PostData; Domain?: typeof DomainData; User?: typeof UserData; } interface DbData extends Model { created_at: string; updated_at: string; id: number; static findOne(options: any): Promise; static findAll(options: any): Promise; static destroy(options: any): Promise; static update(options: any, data: any): Promise; static create(options: any): Promise; static count(options: any | undefined = undefined): Promise; static build(options: any): Promise; save(): Promise; set(col: string, value: any): void; } interface DomainClass extends DbData { configuration: { ltp?: { crt?: LtpCurrentRealityTreeData } customerAiTokenMarkupPercent?: number; }; } interface CommunityClass extends DbData { Domain: DomainClass; } interface PostClass extends DbData { data?: { crt?: LtpCurrentRealityTreeData }; } interface GroupClass extends DbData { description: string; configuration: YpGroupConfiguration; hasGroupAdmins(user: UserClass): Promise; addGroupAdmins(user: UserClass): Promise; hasGroupUsers(user: UserClass): Promise; addGroupUsers(user: UserClass): Promise; changed(field: string, value: any): void; } interface UserClass extends DbData { email: string; name: string; new (): Promise; } interface AcBackgroundJobClass extends DbData { static updateDataAsync(jobId: number, data: any): Promise; static updateErrorAsync(jobId: number, error: string): Promise; static createJob(data: any, dataTwo: any, done: Function): Promise; } interface AcXlsExportJobData { jobId: number; userId: number; exportType: string; fileName: string; utmSource: string; questionId: number; } interface ImageClass extends DbData { formats: string[]; } type YpChatBotMemoryStageTypes = PsMemoryStageTypes | "chatbot-conversation"; interface PsChatBotMemoryData extends PsBaseMemoryData { stages: Record; chatLog?: YpSimpleChatLog[]; problemStatement?: PsProblemStatement; currentStage: YpChatBotMemoryStageTypes; groupId?: number; communityId?: number; domainId?: number; totalCost?: number; customInstructions?: object, subProblems?: IEngineSubProblem[], currentStageData?: undefined; }