import type { Docs, Property } from '@jsii/spec'; import type { typescript } from 'projen'; import { Component } from 'projen'; import type { TypeScriptInterfaceFileOptions } from './ts-interface'; import type { HasProperties, IStructBuilder, HasFullyQualifiedName, HasStructSpec } from '../builder'; export interface ProjenStructOptions { /** * The name of the new struct */ readonly name: string; /** * Doc string for the struct * * Just does the summary * If you want to add a full description, use `docs` instead. * This will not be used if `docs` is provided. * * @default - struct name */ readonly description?: string; /** * Docs for the struct * * Use this to add a full description. * If you only want to add a summary, use `description` instead. * * @default - none, use `description` if provided */ readonly docs?: Docs; /** * The fqn of the struct * * Used to auto-add imports. * All referenced types are loaded based on the fqn hierarchy. * * See `importLocations` for customization options. * * @default `${project.name}.${options.name}` */ readonly fqn?: string; /** * Output file path * @default - inside `srcdir` or `outdir` with the fqn turned into a path */ readonly filePath?: string; /** * The module locations assemblies should be imported from * * All types are imported from the top-level of the module. * This map can be used to overwrite the default import locations. * * For local imports, the import traverse up a number of levels equivalent to the number of fqn parts of the rendered type. * E.g. if the the rendered type is `pkg.interface`, it is assumed to be at the top-level and imports from the same assembly would be from `./`. * If the rendered type is `pkg.nested.sub.interface` a local import will be from `../../`. * * @default - uses the assembly name for external packages * local imports traverse up a number of levels equivalent to the number of fqn parts */ readonly importLocations?: Record; /** * Options for the created output `TypeScriptInterfaceFile` */ readonly outputFileOptions?: Omit; } /** * A component generating a jsii-compatible struct */ export declare class ProjenStruct extends Component implements IStructBuilder, HasProperties, HasFullyQualifiedName, HasStructSpec { private tsProject; private options; private builder; constructor(tsProject: typescript.TypeScriptProject, options: ProjenStructOptions); preSynthesize(): void; get spec(): import("@jsii/spec").InterfaceType; add(...props: Property[]): this; mixin(...sources: HasProperties[]): this; replace(name: string, replacement: Property): IStructBuilder; map(callbackfn: (prop: Property) => Property): this; update(name: string, update: Partial): this; updateEvery(callbackfn: (prop: Property) => Partial): this; updateAll(update: Partial): this; rename(from: string, to: string): this; allOptional(): this; filter(predicate: (prop: Property) => boolean): this; only(...keep: string[]): this; omit(...remove: string[]): this; withoutDeprecated(): this; get properties(): Property[]; get fqn(): string; }