import { OperationType, Resource, ResourceError, ResourceState, ManyResourceRelationship, OneResourceRelationship, ResourceIdentifier, StoreResource } from 'ngrx-json-api'; import { BeanPath, StringPath } from '../expression'; /** * For some reason the compiler does not get in applicaiton projects it if we make use of StoreResource directly. * For this reason we repeat the fields here. */ export interface CrnkStoreResource extends StoreResource { type: string; id: string; state?: ResourceState; persistedResource?: Resource; loading?: OperationType; errors?: Array; hasTemporaryId?: boolean; } export interface TypedManyResourceRelationship extends ManyResourceRelationship { reference?: Array; } export interface TypedOneResourceRelationship extends OneResourceRelationship { reference?: T; } export declare class QResourceIdentifier extends BeanPath { id: StringPath; type: StringPath; } export declare class QTypedOneResourceRelationship, T extends StoreResource> extends BeanPath> { private _referenceType; data: QResourceIdentifier; private _reference; constructor(parent: BeanPath, property: string, _referenceType: new (...args: any[]) => Q); readonly reference: Q; } export declare class QTypedManyResourceRelationship, T extends StoreResource> extends BeanPath> { private _referenceType; data: QResourceIdentifier; private _reference; constructor(parent: BeanPath, property: string, _referenceType: new (...args: any[]) => Q); readonly reference: Q; }