import { EntityFromIntegration, IntegrationRelationship, RelationshipMapping, RelationshipDirection, TargetEntityProperties, TargetFilterKey } from '../../persister'; declare type DirectRelationshipOptions = { _class: string; from: EntityFromIntegration; to: EntityFromIntegration; properties?: AdditionalRelationshipProperties; }; declare type DirectRelationshipLiteralOptions = { _class: string; fromType: string; fromKey: string; toType: string; toKey: string; properties?: AdditionalRelationshipProperties; }; declare type MappedRelationshipOptions = { _class: string; source: EntityFromIntegration; target: TargetEntity; properties?: AdditionalRelationshipProperties; /** * Defaults to `RelationshipDirection.FORWARD`, assuming the common case of * source -> target. */ relationshipDirection?: RelationshipDirection; /** * Defaults to `[["_type", "_key"]]`, allowing for the simple case of mapping * to a known type and key. */ targetFilterKeys?: TargetFilterKey[]; /** * Defaults to `undefined`, leaving it up to the default established in the * mapper. */ skipTargetCreation?: boolean; }; declare type MappedRelationshipLiteralOptions = { _class: string; _mapping: RelationshipMapping; properties?: AdditionalRelationshipProperties; }; export declare type TargetEntity = TargetEntityProperties & { _type: string; _key: string; }; /** * Allows assignment of any additional properties without being forced to use * specific types where that isn't helpful. */ declare type AdditionalRelationshipProperties = { [key: string]: any; }; /** * Create an `IntegrationRelationship`. * * `DirectRelationshipOptions` and `MappedRelationshipOptions` are recommended * over literal forms. Older integrations may need to use the literal forms to * control values for some reason or other. */ export declare function createIntegrationRelationship(options: DirectRelationshipOptions | DirectRelationshipLiteralOptions | MappedRelationshipOptions | MappedRelationshipLiteralOptions): IntegrationRelationship; /** * Relationship `_type` can be generated from the `_type`s of related entities. * The relationship `_class` is required to ensure that the relationship `_type` * is distinguished from other relationships between entities of the same * `_type`s. This supports finding all relationships of a type for the purpose * of set synchronization. */ export declare function generateRelationshipType(_class: string, from: { _type: string; } | string, to: { _type: string; } | string): string; /** * Relationship `_key` can be generated from the `_key`s of related entities. * The relationship `_class` is required to ensure that the relationship `_key` * is distinguished from other relationships between entities of the same * `_key`s. */ export declare function generateRelationshipKey(_class: string, from: { _key: string; } | string, to: { _key: string; } | string): string; export {};