import { SetTypeSubArg } from '@aws-amplify/data-schema-types'; import { Brand } from './util'; import { AllowModifier, Authorization } from './Authorization'; import { __auth } from './ModelField'; declare const _brandName = "ref"; type RefTypeData = { type: 'ref'; link: string; valueRequired: boolean; array: boolean; arrayRequired: boolean; mutationOperations: MutationOperations[]; authorization: Authorization[]; }; export type RefTypeParamShape = { type: 'ref'; link: string; valueRequired: boolean; array: boolean; arrayRequired: boolean; authorization: Authorization[]; }; type MutationOperations = 'create' | 'update' | 'delete'; /** * Reference type definition interface * * @param T - The shape of the reference type * @param K - The keys already defined */ export type RefType = never, Auth = undefined> = Omit<{ /** * Marks a field as required. */ required(): RefType, K | 'required'>; /** * Marks a field as an array of the specified ref type. */ array(): RefType, Exclude | 'array'>; /** * Configures field-level authorization rules. Pass in an array of authorizations `(allow => allow.____)` to mix and match * multiple authorization rules for this field. */ authorization>(callback: (allow: AllowModifier) => AuthRuleType | AuthRuleType[]): RefType; mutations(operations: MutationOperations[]): RefType; }, K> & { [__auth]?: Auth; } & Brand; /** * Internal representation of Ref that exposes the `data` property. * Used at buildtime. */ export type InternalRef = RefType & { data: RefTypeData; }; type RefTypeArgFactory = { type: 'ref'; link: Link; valueRequired: false; array: false; arrayRequired: false; authorization: []; }; export declare function ref(link: T): RefType, never, undefined>; export {};