UNPKG

shyft

Version:

Model driven GraphQL API framework

32 lines (31 loc) 1.21 kB
import { Attribute, AttributesMap, AttributesSetupMap, AttributesMapGenerator } from '../attribute/Attribute'; export declare type ShadowEntitySetup = { name: string; isUserEntity?: boolean; attributes?: AttributesSetupMap | AttributesMapGenerator; storageType?: any; meta?: any; }; export declare class ShadowEntity { name: string; storageType?: any; isUserEntity?: boolean; meta?: any; private _attributesMap; private _primaryAttribute; private referencedByEntities; private _attributes; isFallbackStorageType: any; constructor(setup: ShadowEntitySetup); _injectStorageTypeBySchema(storageType: any): void; getAttributes(): AttributesMap; _checkSystemAttributeNameCollision(attributeMap: any, attributeName: any): void; _processAttribute(rawAttribute: any, attributeName: any): Attribute; _collectSystemAttributes(attributeMap: any): any[]; _processAttributeMap(): {}; getPrimaryAttribute(): Attribute; referenceAttribute(attributeName: any): import("../attribute/Attribute").AttributeBase; getStorageType(): any; toString(): string; } export declare const isShadowEntity: (obj: unknown) => obj is ShadowEntity;