import { Ref, ComputedRef } from 'vue'; import { PaginatedMetadataTemplateList, MetadataTemplateField } from '../../types/openapi'; export interface UseMetadataTemplatesOptions { initialTemplate?: Required['results'][0]; itemsRef?: Ref | ComputedRef; } export default function useMetadataTemplates(options?: UseMetadataTemplatesOptions): { template: Ref<{ readonly id: string; readonly instance: { readonly id: string; name: string; }; readonly file: { readonly id: string; name: string; }; sections?: { label: string; fields: { type: import('../../types/openapi').MetadataTemplateFieldTypeEnum; name: string; label: string; help_text?: string | undefined; is_required?: boolean | undefined; is_filterable?: boolean | undefined; is_sortable?: boolean | undefined; is_pitch_master?: boolean | undefined; options?: { label: string; value: string; }[] | undefined; default?: (string | boolean | number) | null | undefined; }[]; are_fields_dependent?: boolean | undefined; }[] | undefined; readonly created_at: string; readonly created_by: { readonly id: number; readonly name: string; email?: string | undefined; }; readonly modified_at: string; readonly modified_by: { readonly id: number; readonly name: string; email?: string | undefined; }; readonly owned_by: { readonly id: number; readonly name: string; email?: string | undefined; }; } | undefined, import('../../types/openapi').MetadataTemplate | { readonly id: string; readonly instance: { readonly id: string; name: string; }; readonly file: { readonly id: string; name: string; }; sections?: { label: string; fields: { type: import('../../types/openapi').MetadataTemplateFieldTypeEnum; name: string; label: string; help_text?: string | undefined; is_required?: boolean | undefined; is_filterable?: boolean | undefined; is_sortable?: boolean | undefined; is_pitch_master?: boolean | undefined; options?: { label: string; value: string; }[] | undefined; default?: (string | boolean | number) | null | undefined; }[]; are_fields_dependent?: boolean | undefined; }[] | undefined; readonly created_at: string; readonly created_by: { readonly id: number; readonly name: string; email?: string | undefined; }; readonly modified_at: string; readonly modified_by: { readonly id: number; readonly name: string; email?: string | undefined; }; readonly owned_by: { readonly id: number; readonly name: string; email?: string | undefined; }; } | undefined>; originalTemplate: Ref<{ readonly id: string; readonly instance: { readonly id: string; name: string; }; readonly file: { readonly id: string; name: string; }; sections?: { label: string; fields: { type: import('../../types/openapi').MetadataTemplateFieldTypeEnum; name: string; label: string; help_text?: string | undefined; is_required?: boolean | undefined; is_filterable?: boolean | undefined; is_sortable?: boolean | undefined; is_pitch_master?: boolean | undefined; options?: { label: string; value: string; }[] | undefined; default?: (string | boolean | number) | null | undefined; }[]; are_fields_dependent?: boolean | undefined; }[] | undefined; readonly created_at: string; readonly created_by: { readonly id: number; readonly name: string; email?: string | undefined; }; readonly modified_at: string; readonly modified_by: { readonly id: number; readonly name: string; email?: string | undefined; }; readonly owned_by: { readonly id: number; readonly name: string; email?: string | undefined; }; } | undefined, import('../../types/openapi').MetadataTemplate | { readonly id: string; readonly instance: { readonly id: string; name: string; }; readonly file: { readonly id: string; name: string; }; sections?: { label: string; fields: { type: import('../../types/openapi').MetadataTemplateFieldTypeEnum; name: string; label: string; help_text?: string | undefined; is_required?: boolean | undefined; is_filterable?: boolean | undefined; is_sortable?: boolean | undefined; is_pitch_master?: boolean | undefined; options?: { label: string; value: string; }[] | undefined; default?: (string | boolean | number) | null | undefined; }[]; are_fields_dependent?: boolean | undefined; }[] | undefined; readonly created_at: string; readonly created_by: { readonly id: number; readonly name: string; email?: string | undefined; }; readonly modified_at: string; readonly modified_by: { readonly id: number; readonly name: string; email?: string | undefined; }; readonly owned_by: { readonly id: number; readonly name: string; email?: string | undefined; }; } | undefined>; isLoading: Ref; getFields: ComputedRef; processItemMetadata: (item: any) => Record; processCollectionMetadata: (items: any[]) => Record; fetchTemplate: () => Promise<{ readonly id: string; readonly instance: { readonly id: string; name: string; }; readonly file: { readonly id: string; name: string; }; sections?: { label: string; fields: { type: import('../../types/openapi').MetadataTemplateFieldTypeEnum; name: string; label: string; help_text?: string | undefined; is_required?: boolean | undefined; is_filterable?: boolean | undefined; is_sortable?: boolean | undefined; is_pitch_master?: boolean | undefined; options?: { label: string; value: string; }[] | undefined; default?: (string | boolean | number) | null | undefined; }[]; are_fields_dependent?: boolean | undefined; }[] | undefined; readonly created_at: string; readonly created_by: { readonly id: number; readonly name: string; email?: string | undefined; }; readonly modified_at: string; readonly modified_by: { readonly id: number; readonly name: string; email?: string | undefined; }; readonly owned_by: { readonly id: number; readonly name: string; email?: string | undefined; }; } | null>; processedMetadata: ComputedRef> | Ref, Record>; };