import { ApolloClient, NormalizedCacheObject } from '@apollo/client';
import { ModelWithId } from '@parlor/components';
import { IBaseService } from '../types/base-service';
import { KeyOf, ValueOf } from '../types/common';
import { IMethods } from '../types/methods';
import { ApolloBaseService } from './apollo-base-service';
export declare class RelationshipService<HasManyModels extends IMethods.Relationship.HasManyModels, HasOneModels extends IMethods.Relationship.HasOneModels> extends ApolloBaseService {
    private modelName;
    private relationship;
    constructor({ relationship, modelName, apolloClient, }: {
        apolloClient: ApolloClient<NormalizedCacheObject>;
        modelName: string;
        relationship: IBaseService.Relationship<HasManyModels>;
    });
    serializePayload<T extends Partial<ModelWithId>>(data: T & Partial<HasManyModels> & Partial<HasOneModels>): {
        payload: T;
        hasManyModels: Partial<HasManyModels>;
        saveHasMany: (id?: string) => Promise<unknown>;
    };
    protected _getHasManyModelsAndPayload<T extends Partial<ModelWithId>>(data: T & Partial<HasManyModels> & Partial<HasOneModels>): {
        payload: T;
        hasOneModels: Partial<HasOneModels>;
        hasManyModels: Partial<HasManyModels>;
        updatedHasManyModels: Partial<HasManyModels>;
    };
    protected _getChangedHasManyModels(id: string, data: Partial<HasManyModels>): Partial<HasManyModels>;
    protected _setHasManyRelations(id: string, models: Partial<HasManyModels>): Promise<unknown>;
    protected _setHasManyRelation(options: {
        id: string;
        models: ValueOf<HasManyModels>;
        mutation: IMethods.Relationship.HasManyDocumentNode;
    }): Promise<import("@apollo/client").FetchResult<unknown>>;
    protected _isManyRelation(key: string): boolean;
    protected _isHasOneRelation(key: KeyOf<HasOneModels> | string): boolean;
}
