@umbraco/json-models-builders
Version:
Builders and models for Umbraco Sites
85 lines (84 loc) • 2.62 kB
TypeScript
import { MemberTypeCompositionBuilder } from "./memberTypeCompositionBuilder";
import { MemberTypeContainerBuilder } from "./memberTypeContainerBuilder";
import { MemberTypePropertyBuilder } from "./memberTypePropertyBuilder";
export declare class MemberTypeBuilder {
alias: string;
name: string;
description: string;
icon: string;
allowedAsRoot: boolean;
variesByCulture: boolean;
variesBySegment: boolean;
collectionId: string;
isElement: boolean;
memberTypePropertyBuilder: MemberTypePropertyBuilder[];
memberTypeContainerBuilder: MemberTypeContainerBuilder[];
id: string;
memberTypeCompositionBuilder: MemberTypeCompositionBuilder[];
constructor();
withAlias(alias: string): this;
withName(name: string): this;
withDescription(description: string): this;
withIcon(icon: string): this;
withAllowedAsRoot(allowedAsRoot: boolean): this;
withVariesByCulture(variesByCulture: boolean): this;
withVariesBySegment(variesBySegment: boolean): this;
withIsElement(isElement: boolean): this;
addProperty(): MemberTypePropertyBuilder;
addContainer(): MemberTypeContainerBuilder;
addComposition(): MemberTypeCompositionBuilder;
withId(id: string): this;
build(): {
alias: string;
name: string;
description: string;
icon: string;
allowedAsRoot: boolean;
variesByCulture: boolean;
variesBySegment: boolean;
collection: {
id: string;
} | null;
isElement: boolean;
properties: {
id: string;
container: {
id: string | null;
};
sortOrder: number;
alias: string;
name: string;
description: string;
dataType: {
id: string | null;
};
variesByCulture: boolean;
variesBySegment: boolean;
validation: {
mandatory: boolean;
mandatoryMessage: string;
regEx: string;
regExMessage: string;
};
appearance: {
labelOnTop: boolean;
};
}[];
containers: {
id: string | null;
parent: {
id: string;
} | null;
name: string;
type: string;
sortOrder: number;
}[];
id: string;
compositions: {
memberType: {
id: string | null;
};
compositionType: string;
}[];
};
}