import { ModelWithId } from '@parlor/components';
export declare namespace IMethods {
    type TypedDocumentNode<Result, Variables> = import('@apollo/client').TypedDocumentNode<Result, Variables>;
    type IDocuments<CDocument = IMethods.Create.DocumentNode, UDocument = IMethods.Update.DocumentNode, DDocument = IMethods.Delete.DocumentNode, GDocument = IMethods.Get.DocumentNode, LDocument = IMethods.List.DocumentNode> = {
        create?: CDocument;
        delete?: DDocument;
        get?: GDocument;
        list?: LDocument;
        update?: UDocument;
    };
    namespace Get {
        type Result = {
            get?: Record<string, unknown>;
        };
        type Variables = {
            id: string;
        };
        type DocumentNode = TypedDocumentNode<Result, Variables>;
    }
    namespace Create {
        type Result = {
            createOne: {
                [x: string]: unknown;
                id: string;
            };
        };
        type Variables1 = {
            input: {
                [x: string]: Record<string, unknown>;
            };
        };
        type Variables2 = {
            input: Record<string, unknown>;
        };
        type DocumentNode = TypedDocumentNode<Result, Variables1 | Variables2>;
    }
    namespace Update {
        type Result = {
            updateOne: Record<string, unknown>;
        };
        type Variables = {
            input: {
                id: string;
                update: Record<string, unknown>;
            };
        };
        type DocumentNode = TypedDocumentNode<Result, Variables>;
    }
    namespace List {
        type Result = {
            list: Record<string, unknown>;
        };
        type Variables = Record<string, unknown>;
        type DocumentNode = TypedDocumentNode<Result, Variables>;
    }
    namespace Delete {
        type Result = {
            deleteOne: unknown;
        };
        type Variables = {
            input: {
                id: string;
            };
        };
        type DocumentNode = TypedDocumentNode<Result, Variables>;
    }
    namespace Relationship {
        type HasManyResult = unknown;
        type HasManyVariables = {
            input: {
                id: string;
                relationIds: string[];
            };
        };
        type HasManyDocumentNode = TypedDocumentNode<HasManyResult, HasManyVariables>;
        type HasManyModels = Record<string, ModelWithId[]>;
        type HasOneModels = Record<string, ModelWithId>;
        type RelationshipService<T extends Partial<ModelWithId>, HasManyDocuments extends Record<string, IMethods.Relationship.HasManyDocumentNode>, HasManyModels extends Record<keyof HasManyDocuments, ModelWithId[]>, HasOneModels extends IMethods.Relationship.HasOneModels> = {
            serializePayload(data: T & HasOneModels & HasManyModels): {
                hasManyModels: Partial<HasManyModels>;
                payload: Partial<T>;
                saveHasMany: (id?: string) => Promise<unknown>;
            };
        };
    }
}
