furystack-core
Version:
FuryStack framework, Core package
35 lines (34 loc) • 1.48 kB
TypeScript
import { ActionOwnerAbstract } from "./";
import { EndpointEntitySet } from "./EndpointEntitySet";
import { EndpointEntityType } from "./EndpointEntityType";
/**
* The Builder class provides you an API to create OData ShcemaTypes
*/
export declare class EndpointBuilder extends ActionOwnerAbstract {
nameSpaceRoot: string;
private entityTypes;
GetAllEntityTypes(): EndpointEntityType[];
private entitySets;
GetAllEntitySets(): EndpointEntitySet[];
/**
* The Builder class provides you an API to create OData ShcemaTypes
* @param NameSpaceRoot The root of the public Express route where the Builder will be accessible
*/
constructor(nameSpaceRoot: string);
/**
* Returns an EntityType for the model class (and registers it to the Builder is neccessary)
* @param entityTypeClass The model class for the EntityType. @PrimaryKey is required.
*/
EntityType<T>(entityTypeClass: {
new (): T;
}): EndpointEntityType;
/**
* Gets an EntitySet with a specified name for an EntityType. Will be registered to the builder if neccessary
* @param entityTypeClass entityTypeClass The model class for the EntitySet.
* Register as an EntityType before adding an EntitySet
* @param entitySetName The collection name (will be part of the API URL)
*/
EntitySet<T>(entityTypeClass: {
new (): T;
}, entitySetName?: string): EndpointEntitySet;
}