declare module '@shopstack/cc-core-lib/core' { import type { Mock } from 'jest-mock'; // Mocked classes export class BaseSchema { constructor(definition?: any, options?: any); _id: any; id: string; created_at: Date; updated_at: Date; created_by: string; updated_by: string; is_deleted: boolean; is_active: boolean; save: () => Promise; add: Mock; pre: Mock; post: Mock; plugin: Mock; index: Mock; set: Mock; virtual: Mock; path: Mock; } export class BasePipelineProvider { constructor(); init(settings: any): Promise; process(data: any): Promise; queue(data: any): Promise; } export class BaseService { code: string; protected model: any; static prefix: string; constructor(cls: any, model: any); find(query: any): Promise; findOne(query: any, field?: string[], ignore?: any): Promise; findById(id: string): Promise; findByIdAndUpdate(id: string, update: any, options?: any): Promise; findOneAndUpdate(query: any, update: any, options?: any): Promise; create(data: any): Promise; update(id: string, data: any): Promise; delete(id: string): Promise; } export class BaseModuleSettingService { code: string; protected setting: any; cls: any; constructor(code: string, setting: any, cls: any); init(): Promise; getSetting(key?: string): Promise; setSetting(data: any, key?: string): Promise; defaultPermission(): Promise; setPermission(permission: any): Promise; getModuleConfig(): Promise; updateModuleConfig(config: any): Promise; getScheduleConfig(): Promise; updateScheduleConfig(config: any): Promise; } export interface IModuleSetting { defaultPermission(): Promise; setPermission(permission: any): Promise; getSetting(key?: string): Promise; setSetting(data: any, key?: string): Promise; } export interface PipelineExecuteDto { [key: string]: any; } export const CONST: { CUSTOM_PROVIDERS: any[]; IGNORE_ENTITY: any[]; }; export const BaseSchemaFactory: { createForClass: Mock; }; export const callAddQueueInternal: Mock, [string, any]>; export const callCountInternalService: Mock, [string, any]>; export const callFindInternalService: Mock, [string, string?, any?, string?, string?, any?]>; export const callListInternalService: Mock, [string, any?, any?]>; export const callCreateInternalService: Mock, [string, any, any?, boolean?]>; export const callDeleteInternalService: Mock, [string, string]>; export const callBulkDeleteInternalService: Mock, [string, string[]]>; export const callBulkUpdateInternalService: Mock, [string, any[]]>; export const callUpdateInternalService: Mock, [string, string, any]>; export const callInternalService: Mock, [string, string, any?, any?]>; export const callGetInternalService: Mock, [string, string]>; export const transformString: Mock; export const executeFunc: Mock; export const generateRunningNumber: Mock; export const loadEntity: Mock, [string]>; export const getNextExecuteTime: Mock; export const transform: Mock; export const generateOtp: Mock, []>; export const validateOtp: Mock, [string, string]>; export const initQueue: Mock, [string, any]>; export const randomString: Mock; export const convertConditionToMongoQuery: Mock; export const addSystemSchedule: Mock; export interface SearchResultDto { rows: any[]; total: number; page: number; limit: number; } export class EntitiesService { refreshSystemSchema: Mock, [any, any, any, any, any?]>; } export class SettingService { getSetting: Mock, [string?]>; setSetting: Mock, [any, string?]>; } export const UserPermission: { creator: string; viewer: string; access_denied: string; }; export const PointProgramRuleType: { BIRTHDAY: string; SPEND: string; FIXED: string; QR_SCAN: string; GAME_REWARD: string; SIGNUP: string; }; export interface LayoutEntity { name: string; code: string; type: string[]; detail: any; list?: any; allow_workflow_actions?: boolean; [key: string]: any; // Allow additional properties } export interface WorkflowEntity { [key: string]: any; // Allow any properties for workflow } export class BaseController { constructor(service: any); } // Decorators export const Basic: () => (target: any, propertyKey?: string, descriptor?: PropertyDescriptor) => any; export const Public: () => (target: any, propertyKey?: string, descriptor?: PropertyDescriptor) => any; }