UNPKG

jinaga

Version:

Data management for web and mobile applications.

77 lines 2.54 kB
export interface Label { name: string; type: string; } export interface Role { name: string; predecessorType: string; } export interface PathCondition { type: "path"; rolesLeft: Role[]; labelRight: string; rolesRight: Role[]; } export interface ExistentialCondition { type: "existential"; exists: boolean; matches: Match[]; } export declare type Condition = PathCondition | ExistentialCondition; export declare function isPathCondition(condition: Condition): condition is PathCondition; export declare function isExistentialCondition(condition: Condition): condition is ExistentialCondition; export interface SpecificationProjection { type: "specification"; matches: Match[]; projection: Projection; } export interface FieldProjection { type: "field"; label: string; field: string; } export interface HashProjection { type: "hash"; label: string; } export interface FactProjection { type: "fact"; label: string; } export interface CompositeProjection { type: "composite"; components: NamedComponentProjection[]; } export declare type NamedComponentProjection = { name: string; } & ComponentProjection; export declare type ComponentProjection = SpecificationProjection | SingularProjection; export declare type SingularProjection = FieldProjection | HashProjection | FactProjection; export declare type Projection = CompositeProjection | SingularProjection; export interface Match { unknown: Label; conditions: Condition[]; } export interface Specification { given: Label[]; matches: Match[]; projection: Projection; } export declare const emptySpecification: Specification; export declare function getAllFactTypes(specification: Specification): string[]; interface RoleDescription { successorType: string; name: string; predecessorType: string; } export declare function getAllRoles(specification: Specification): RoleDescription[]; export declare function specificationIsDeterministic(specification: Specification): boolean; export declare function specificationIsNotDeterministic(specification: Specification): boolean; export declare function splitBeforeFirstSuccessor(specification: Specification): { head: Specification | undefined; tail: Specification | undefined; }; export declare function specificationIsIdentity(specification: Specification): boolean; export declare function reduceSpecification(specification: Specification): Specification; export {}; //# sourceMappingURL=specification.d.ts.map