/*! * Copyright (C) Microsoft Corporation. All rights reserved. */ import type { ILogger } from '../../services/index.js'; import type { ReadOnlyVfs } from '../../Types/Vfs.types.js'; import type { CodegenV2Project } from '../v2/project.js'; import type { ICodegenProject } from './project.js'; interface ISharedContext { /** The folder containing the schema file being processed */ schemaFolder: string; /** The path to the specific schema file being processed */ schemaFile: string; /** The output folder where generated TypeScript files will be written */ outputFolder: string; /** Logger for diagnostic messages */ logger: ILogger; } /** * Vfs needed to read provided schema files. */ export interface IProcessingContext extends ISharedContext { /** Virtual file system for (only) reading schema files */ vfs: ReadOnlyVfs; } /** * Contains additional context as a result of parsing schema. * Vfs is replaced by ICodegenProject for all IO. */ export interface ICodegenContext extends ISharedContext { /** Parsed JSON schema node */ schema: unknown; /** The model name extracted from the schema (e.g., 'Account', 'Contact') */ modelName: string; /** The data source name (e.g., 'Dataverse', 'Sharepoint', 'SqlServer') */ dataSourceName: string; /** Codegen project for managing files */ project: ICodegenProject; /** is V2 codegen enabled */ isV2Enabled: boolean; } export interface ICodegenV2Context extends ICodegenContext { project: CodegenV2Project; isV2Enabled: true; } export declare function isCodegenV2Context(context: ICodegenContext): context is ICodegenV2Context; export {}; //# sourceMappingURL=types.d.ts.map