@crnk/angular-ngrx
Version:
Angular helper library for ngrx-json-api and crnk:
77 lines (76 loc) • 3.74 kB
TypeScript
import { BeanPath, BooleanPath, StringPath } from '../expression/';
import { QTypedManyResourceRelationship, QTypedOneResourceRelationship } from '../stub/';
import { MetaAttribute, QMetaAttribute } from './meta.attribute';
import { MetaElement, QMetaElement } from './meta.element';
import { MetaInterface, QMetaInterface } from './meta.interface';
import { MetaKey, QMetaKey } from './meta.key';
import { MetaPrimaryKey, QMetaPrimaryKey } from './meta.primary.key';
import { MetaType, QMetaType } from './meta.type';
import { ManyQueryResult, OneQueryResult, ResourceRelationship, TypedManyResourceRelationship, TypedOneResourceRelationship } from 'ngrx-json-api';
export declare module MetaDataObject {
interface Relationships extends MetaType.Relationships {
[key: string]: ResourceRelationship;
subTypes?: TypedManyResourceRelationship<MetaDataObject>;
superType?: TypedOneResourceRelationship<MetaDataObject>;
attributes?: TypedManyResourceRelationship<MetaAttribute>;
declaredAttributes?: TypedManyResourceRelationship<MetaAttribute>;
primaryKey?: TypedOneResourceRelationship<MetaPrimaryKey>;
declaredKeys?: TypedManyResourceRelationship<MetaKey>;
interfaces?: TypedManyResourceRelationship<MetaInterface>;
}
interface Attributes extends MetaElement.Attributes {
insertable?: boolean;
updatable?: boolean;
deletable?: boolean;
readable?: boolean;
}
}
export interface MetaDataObject extends MetaType {
relationships?: MetaDataObject.Relationships;
attributes?: MetaDataObject.Attributes;
}
export interface MetaDataObjectResult extends OneQueryResult {
data?: MetaDataObject;
}
export interface MetaDataObjectListResult extends ManyQueryResult {
data?: Array<MetaDataObject>;
}
export declare class QMetaDataObject extends BeanPath<MetaDataObject> {
metaId: string;
id: StringPath;
type: StringPath;
relationships: QMetaDataObject.QRelationships;
attributes: QMetaDataObject.QAttributes;
}
export declare module QMetaDataObject {
class QRelationships extends BeanPath<MetaDataObject.Relationships> {
private _subTypes;
readonly subTypes: QTypedManyResourceRelationship<QMetaDataObject, MetaDataObject>;
private _superType;
readonly superType: QTypedOneResourceRelationship<QMetaDataObject, MetaDataObject>;
private _attributes;
readonly attributes: QTypedManyResourceRelationship<QMetaAttribute, MetaAttribute>;
private _declaredAttributes;
readonly declaredAttributes: QTypedManyResourceRelationship<QMetaAttribute, MetaAttribute>;
private _primaryKey;
readonly primaryKey: QTypedOneResourceRelationship<QMetaPrimaryKey, MetaPrimaryKey>;
private _declaredKeys;
readonly declaredKeys: QTypedManyResourceRelationship<QMetaKey, MetaKey>;
private _interfaces;
readonly interfaces: QTypedManyResourceRelationship<QMetaInterface, MetaInterface>;
private _elementType;
readonly elementType: QTypedOneResourceRelationship<QMetaType, MetaType>;
private _parent;
readonly parent: QTypedOneResourceRelationship<QMetaElement, MetaElement>;
private _children;
readonly children: QTypedManyResourceRelationship<QMetaElement, MetaElement>;
}
class QAttributes extends BeanPath<MetaDataObject.Attributes> {
insertable: BooleanPath;
updatable: BooleanPath;
deletable: BooleanPath;
readable: BooleanPath;
name: StringPath;
}
}
export declare let createEmptyMetaDataObject: (id: string) => MetaDataObject;